PageSourceSearch

https://golektruk.com/_next/static/chunks/8261-90c782ce2907b379.js

js golektruk.com collected 2026-10-01 15:19:17 UTC 8,940 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8261],{56533:function(e,t,a){var n=a(85893),s=a(4298),l=a.n(s),o=a(67294);t.Z=(0,o.memo)(function(){return(0,n.jsx)(l(),{src:"https://app.midtrans.com/snap/snap.js","data-client-key":"Mid-client-Ub_dFwP6tw7WzOYa"})})},74998:function(e,t,a){var n=a(85893),s=a(82639);let l=e=>{let{router:t,closeModal:a,asPathQuery:l}=e,o=t.pathname.includes("gokil");return(0,n.jsx)(s.Z,{message:"Silahkan selesaikan pembayaran Golek Koin sebelumnya",onButtonClick:()=>{var e={};t.query.asPath?e.asPath=l?"".concat(t.query.asPath,"?").concat(l):t.query.asPath:l&&(e.asPath=l),t.push({pathname:o?"/gokil/coin/pending-list":"/coin/pending-list",query:e}),a()}})};t.Z=l},82639:function(e,t,a){var n=a(85893),s=a(1280),l=a(5434);let o=e=>{let{message:t,onButtonClick:a}=e;return(0,n.jsxs)("section",{className:"space-y-4",children:[(0,n.jsx)(l.vVM,{className:"mx-auto h-12 w-12 text-danger"}),(0,n.jsx)("p",{className:"text-14 font-medium text-neutral-1000 desktop:text-16",children:t}),(0,n.jsx)(s.Z,{className:"w-full desktop:w-3/5",onClick:a,children:"Bayar Sekarang"})]})};t.Z=o},58261:function(e,t,a){a.d(t,{Z:function(){return S}});var n=a(85893),s=a(67294),l=a(11163),o=a(56216),i=a(48434),r=a(64035),c=a(91594);let d=e=>{let{totalCard:t=1}=e,a=(0,n.jsxs)("div",{className:"flex cursor-pointer items-center justify-between rounded-lg border border-solid border-neutral-400 px-2 py-3 desktop:flex-col desktop:justify-start desktop:space-y-2.5 desktop:py-6",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-1 desktop:flex-col desktop:space-x-0 desktop:space-y-2",children:[(0,n.jsx)("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-full bg-neutral-300 desktop:h-8 desktop:w-8"}),(0,n.jsx)("div",{className:"h-2.5 w-24 animate-pulse rounded-full bg-neutral-300 desktop:h-3"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-end space-y-1 desktop:items-center desktop:space-y-2.5",children:[(0,n.jsx)("div",{className:"h-2.5 w-16 rounded-full bg-neutral-300"}),(0,n.jsx)("div",{className:"h-3 w-32 rounded-full bg-neutral-300 desktop:h-4"})]})]}),l=[];for(let e=0;e<t;e++)l.push((0,n.jsx)(s.Fragment,{children:a},"coin-price-list-card-skeleton-".concat(e)));return(0,n.jsx)(n.Fragment,{children:l})};var u=a(74998),p=a(25675),h=a.n(p);let k=e=>{let{value:t,oldValue:a,price:s,oldPrice:l,isSelected:o,onClick:i}=e;return(0,n.jsxs)("section",{className:"flex cursor-pointer items-center justify-between rounded-lg px-2 py-3 outline outline-1 desktop:flex-col desktop:justify-start desktop:space-y-2 desktop:py-6 ".concat(o?"outline-primary desktop:outline-2":"outline-neutral-400"),onClick:i,children:[(0,n.jsxs)("div",{className:"flex items-center justify-center space-x-1 desktop:flex-col desktop:space-x-0 desktop:space-y-1",children:[(0,n.jsx)("div",{className:"pointer-events-none relative h-5 w-5 select-none desktop:h-8 desktop:w-8",children:(0,n.jsx)(h(),{src:"/golekcoin-logo.svg",alt:"coin",fill:!0})}),(0,n.jsxs)("div",{className:"space-y-1 desktop:text-center",children:[!!a&&a!==t&&(0,n.jsxs)("p",{className:"text-12 text-neutral-600 line-through",children:[a.toLocaleString("id-ID")," Golek Koin"]}),(0,n.jsxs)("p",{className:"text-14 font-medium text-neutral-1000",children:[t.toLocaleString("id-ID")," Golek Koin"]})]})]}),(0,n.jsxs)("div",{className:"space-y-1 text-right desktop:text-center",children:[!!l&&l!==s&&(0,n.jsxs)("p",{className:"text-12 text-neutral-600 line-through",children:["Rp ",l.toLocaleString("id-ID")]}),(0,n.jsxs)("p",{className:"text-14 font-bold text-neutral-1000 desktop:text-16",children:["Rp ",s.toLocaleString("id-ID")]})]})]})};var x=a(1280),m=a(56533),g=a(48379),v=a(21311),y=a(22920),f=a(85945),j=a(43903),w=a(23861),b=a(57308),N=a(16157),P=a(54246);let Z=()=>{var e,t;(0,i.Z)();let a=(0,l.useRouter)(),p=a.pathname.includes("gokil"),h=(0,f.NL)(),{data:Z}=(0,N.d)(),{data:S,isLoading:q}=(0,o.sz)(),[C,$]=(0,s.useState)(1/0),[_,L]=(0,s.useState)(!1);(0,j.Z)();let{payWithMidtrans:T}=(0,w.Z)(),{backUntilTarget:U}=(0,b.Z)(),B=()=>{a.query.asPath?U({newTarget:a.query.asPath,disablePreserveScroll:!0,
1callback:()=>(0,y.Am)("Berhasil melakukan pembayaran",{type:"success"})}):U({newTarget:/\/shipper$|\/trucker$|\/my-account$|\/gokil$|\/gokil\/posts$/,disablePreserveScroll:!0,callback:()=>(0,y.Am)("Berhasil melakukan pembayaran",{type:"success"})})},I=()=>{a.query.asPath?U({newTarget:a.query.asPath,hideLoadingUrl:p?"/gokil/coin/pending-list":"/coin/pending-list",disablePreserveScroll:!0}):U({newTarget:/\/shipper$|\/trucker$|\/my-account$|\/gokil$|\/gokil\/posts$/,hideLoadingUrl:p?"/gokil/coin/pending-list":"/coin/pending-list",disablePreserveScroll:!0})};return(0,n.jsxs)(r.Z,{isOwner:!0,golekIklanMenu:p,children:[(0,n.jsx)(m.Z,{}),(0,n.jsx)(c.Z,{header:"Top Up Golek Koin",desktopIconNonHidden:!1,onBack:()=>a.back()}),(0,n.jsxs)("main",{className:"container my-4 space-y-4",children:[(0,n.jsx)("h2",{className:"text-14 font-semibold text-neutral-1000",children:"Pilih Nominal"}),(0,n.jsxs)("div",{children:[!!(null==Z?void 0:Z.data)&&(0,n.jsx)("p",{className:"mb-0.5 text-right text-12 text-warning",children:"*Sudah termasuk pajak"}),(0,n.jsx)("section",{className:"grid auto-rows-fr grid-cols-1 gap-y-2 desktop:grid-cols-3 desktop:gap-x-2 desktop:gap-y-3",children:q?(0,n.jsx)(d,{totalCard:6}):null==S?void 0:S.data.map((a,s)=>a.is_active&&(0,n.jsx)(k,{oldValue:a.value_old,value:a.value,oldPrice:a.price_old?(0,P.lv)(a.price_old,null!==(e=null==Z?void 0:Z.data)&&void 0!==e?e:0):void 0,price:(0,P.lv)(a.price,null!==(t=null==Z?void 0:Z.data)&&void 0!==t?t:0),isSelected:C===a.id,onClick:()=>$(a.id)},"coin-price-list-".concat(s)))})]}),(0,n.jsx)("div",{className:"h-16 desktop:hidden"})]}),(0,n.jsx)("section",{className:"container fixed bottom-0 left-0 right-0 flex justify-center bg-neutral-100 px-4 pb-4 pt-2 shadow-2 desktop:no-container desktop:static desktop:bg-none desktop:shadow-none",children:(0,n.jsx)(x.Z,{className:"w-full desktop:w-1/4",disabled:C===1/0||_,onClick:()=>{L(!0),g.Z.get("/coin-transaction/store/".concat(C)).then(e=>{T(e.data.token,{onSuccess:()=>B(),onPending:()=>I(),onClose:()=>I(),onFinal:()=>{L(e=>!e),h.invalidateQueries({queryKey:["wallet"]}),h.invalidateQueries({queryKey:["coin-topup-history"]})}},{showLoadingOnAllEvents:!0})}).catch(e=>{405===e.response.status?(0,v.Z)(e=>(0,n.jsx)(u.Z,{closeModal:e,router:a,asPathQuery:a.query.asPath?a.query.asPath:void 0})):(0,y.Am)("Terjadi kesalahan. Silahkan coba beberapa saat lagi",{type:"error"}),L(!1)})},children:"Beli"})})]})};var S=Z},57308:function(e,t,a){var n=a(11163),s=a(60872),l=a(68106);let o=()=>{let e=(0,n.useRouter)(),{showLoading:t,hideLoading:a}=(0,s.Z)(),{setScrollPosition:o}=(0,l.Z)(),i=t=>{let a="".concat(window.location.pathname).concat(window.location.search);return t instanceof RegExp&&t.test(a)||t===a?Promise.resolve():new Promise(t=>{e.back(),setTimeout(()=>t("currentUrl doesn't match with the targetUrl!"),200)}).then(()=>i(t))},r=n=>{let{newTarget:s,hideLoadingUrl:l,callback:r,disablePreserveScroll:c=!1,replaceHideLoadingUrl:d}=n;t(),c&&("string"==typeof s?o(e=>({...e,[s]:0})):o({})),i(s).then(()=>{l&&l!==s?e.push(l).then(()=>{a(),null==r||r()}):d&&d!==s?e.replace(d).then(()=>{a(),null==r||r()}):(a(),null==r||r())})};return{backUntilTarget:r}};t.Z=o},23861:function(e,t,a){var n=a(11163),s=a(60872);let l=()=>{let e=(0,n.useRouter)(),{showLoading:t}=(0,s.Z)(),a=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s="".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash);return s!==t?Promise.resolve():new Promise(t=>{e.back(),setTimeout(()=>t("currentUrl is still as same as targetUrl!"),100)}).then(()=>a(t,n+1))};return{payWithMidtrans:function(n){let{onSuccess:s,onPending:l,onError:o,onClose:i,onFinal:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{showLoadingOnAllEvents:c,showLoadingOnSuccess:d,showLoadingOnPending:u,showLoadingOnError:p,showLoadingOnClose:h}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.push({query:{...e.query},hash:"SNAP"}),snap.pay(n,{uiMode:"qr",onSuccess:n=>{(c||d)&&t(),a("".concat(e.asPath).concat(location.hash)).then(()=>{null==s||s(n),null==r||r()})},onPending:n=>{(c||u)&&t(),a("".concat(e.asPath).concat(location.hash)).then(()=>{null==l||l(n),null==r||r()})},onError:n=>{(c||p)&&t(),a("".concat(e.asPath).concat(location.hash)).then(()=>{null==o||o(n),null==r||r()})},onClose:()=>{(c||h)&&t(),a("".concat(e.asPath).concat(location.hash)).then(()=>{null==i||i(),null==r||r()})}})}}};t.Z=l},54246:function(e,t,a){a.d(t,{_P:function(){return n},aj:function(){return o},gt:function(){return l},lv:function(){return s}});let n=(e,t)=>e*t/100,s=(e,t)=>t?e+n(e,t):e,l=e=>"PPN (".concat(e,")%"),o="*Harga sudah termasuk pajak"},16157:function(e,t,a){a.d(t,{d:function(){return l}});var n=a(48379),s=a(36492);let l=()=>(0,s.a)(["ppn"],()=>n.Z.get("/ppn"))}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.