PageSourceSearch

https://www.beechenghiang.com.sg/_next/static/chunks/pages/user/my…voucher-transaction-f93e4bcc70e8409e3620.js

js beechenghiang.com.sg collected 2026-09-24 10:05:36 UTC 8,199 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8365],{6230:function(e){e.exports="object"==typeof self?self.FormData:window.FormData},96105:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return A}});var a=n(85893),r=n(809),c=n.n(r),s=n(92447),o=n(67294),i=n(11163),u=n(7145),l=n.n(u),f=n(86337),d=n(39704),m=n(63276),p=n(12573),h=n(30381),v=n.n(h),x=n(58533),g=n(55909),k=n(35519),w=n(68641),_=n(46998),y=n(48633),N=n(2714),S=n(11752),j=n(18847),T=n(57768),P=n(23259),b=n(77489),C=n(16882),D=(0,S.default)().publicRuntimeConfig,I=D.cookiesConstant,Z=D.currencySymbol,A=!0;t.default=function(e){var t,n=(0,m.$G)(["common","cms","account","gift_vouchers"]).t,r=(0,d.I0)(),u=((0,i.useRouter)(),e._nextI18Next),h=e.privateAccessToken,S=(e.preferenceParams,e.siteLangs),D=e.isRequiredCompleteProfile,A=(0,o.useState)(!0),E=A[0],M=A[1],J=(0,o.useState)(null),L=J[0],O=J[1],G=(0,o.useState)(null),U=(G[0],G[1]),Y=(0,o.useState)(!1),$=Y[0],B=Y[1],R=(0,o.useContext)(f.n),F=(0,o.useState)(null),q=F[0],X=F[1],H=(0,o.useState)(""),K=(H[0],H[1]),z=(0,o.useState)(null),Q=(z[0],z[1]),V=(0,o.useState)(null),W=V[0],ee=V[1],te=(0,o.useState)([]),ne=te[0],ae=te[1],re=(0,o.useState)(!0),ce=re[0],se=re[1],oe=(0,o.useState)(1),ie=oe[0],ue=oe[1],le=(0,o.useState)({PageNum:1,TotalPerPage:20,CultureId:(null===R||void 0===R||null===(t=R.userPreference)||void 0===t?void 0:t.cultureId)||1}),fe=le[0],de=le[1];(0,o.useEffect)((function(){var e=!0;function t(){return(t=(0,s.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ee(h),B(!0);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return!0===e&&(!function(){t.apply(this,arguments)}(),O(null),!0===D&&O(n("account:msg_account_incomplete"))),function(){e=!1}}),[]),(0,o.useEffect)((function(){var e=!0;if(!0===e&&null!=R.webAccessData){var t=R.webAccessData;Q(t)}if(null!=R.userPreference){var n=l()(fe,{CultureId:{$set:R.userPreference.cultureId}});de(n)}return function(){e=!1}}),[R]),(0,o.useEffect)((function(){function e(){return(e=(0,s.Z)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,M(!0),U(null),e.next=5,r((0,N.Ai)(W));case 5:t=e.sent,X(t),n=l()(fe,{PageNum:{$set:fe.PageNum+1<ie?fe.PageNum+1:ie},CultureId:{$set:R.userPreference.cultureId}}),me(n),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),e.t0.message.includes("401")?ge():(M(!1),U(e.t0.message));case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}return null!=W&&!0===$&&null!=R.userPreference&&function(){e.apply(this,arguments)}(),function(){}}),[W,$,R]),(0,o.useEffect)((function(){if(null!=S){var e="en-US"==S.lang?"/":"/".concat(S.lang,"/");K(e)}}),[S]);var me=(0,o.useCallback)(function(){var e=(0,s.Z)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,U(null),ae([]),e.next=5,r((0,b.Yx)(h,t));case 5:n=e.sent,ue(n.DataTotalPage),ae(n.Data),M(!1),n.TotalPage>=fe.PageNum+1?se(!0):se(!1),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),U(e.t0.message),M(!1);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),[W]),pe=(0,o.useCallback)((0,s.Z)(c().mark((function e(){var t,n,a,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l()(fe,{PageNum:{$set:fe.PageNum+1},CultureId:{$set:R.userPreference.cultureId}}),se(!1),e.prev=2,e.next=5,r((0,b.Yx)(h,t));case 5:a=e.sent,de(t),s=ne.concat(a.Data),ae(s),(null===(n=a.Data)||void 0===n?void 0:n.length)>0?se(!0):se(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),U(e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[2,12]])}))),[ne]),he=function(){var e=(0,s.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:document.cookie="".concat(I.cookiesAuth_accessToken,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"),document.cookie="".concat(I.cookiesAuth_tokenType,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"),document.cookie="".concat(I.cookiesAuth_expires,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"),document.cookie="".concat(I.cookiesAuth_isLogin,"=0;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"),document.cookie="".concat(I.cookiesAuth_refreshToken,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/");case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function ve(){return xe.apply(this,arguments)}function xe(){return(xe=(0,s.Z)(c().mark((function e(){var t;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r(p.GK());case 3:(t=e.sent).length>0&&(t[0].isError||window.localStorage.setItem("userPublicToken",null!==t[0].data?JSON.stringify(t[0].data):"")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("renewPublicToken",e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function ge(){return ke.apply(this,arguments)}function ke(){return(ke=(0,s.Z)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),t=JSON.stringify({myCart:[]}),n=JSON.stringify({myBuyLaterCart:[]}),window.localStorage.setItem("_cartSession",t),window.localStorage.setItem("_cartBuyLaterSession",n),window.localStorage.removeItem("_deliveryLoc"),he(),e.t0=Promise,e.next=8,ve();case 8:e.t1=e.sent,e.t2=[e.t1],e.t0.all.call(e.t0,e.t2).then((function(e){console.log("Promise Done",e),setTimeout((function(){(0,y.w7)({callbackUrl:"/"})}),1500)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,a.jsxs)(a.Fragment,{children:[null!==L&&(0,a.jsx)(k.Z,{showTitle:!1,customStyle:w.ty,customBodyStyle:{height:"100%"},isOpen:!0,shouldCloseOnOverlayClick:!1,onRequestClose:function(){O(null)},title:n("common:alert_heading_info"),children:(0,a.jsxs)("div",{className:"message-modal-container",children:[(0,a.jsx)("p",{style:{textAlign:"center"},dangerouslySetInnerHTML:{__html:L}}),(0,a.jsxs)("div",{style:{marginTop:40},children:[(0,a.jsx)(P.Z,{buttonStyle:{textTransform:"uppercase",marginBottom:20},title:n("btn_continue"),onClick:function(){window.location.href="".concat("en-US"==(null===S||void 0===S?void 0:S.lang)?"/":"/".concat(null===S||void 0===S?void 0:S.lang,"/"),"account/complete-profile/")}}),(0,a.jsx)(T.Z,{title:n("btn_logout"),onClick:ge})]})]})}
1),!0===E&&(0,a.jsx)("div",{className:"overlayBackground",style:{background:"#ffffff"},children:(0,a.jsx)(g.Z,{})}),null!=q&&(0,a.jsx)("div",{className:"account-container main",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"main-container",children:[(0,a.jsxs)("div",{className:"main-profile-container",children:[(0,a.jsx)(_.Z,{locale:u,profileData:q,privateToken:h}),(0,a.jsx)(j.Z,{isAffiliate:q.affiliate,privateTokenData:h,activeMenu:9,onLogoutPress:ge})]}),null===L&&(0,a.jsxs)("div",{className:"main-gift-transaction-list-container",children:[(0,a.jsx)("h2",{children:n("account:heading_my_gift_voucher_transaction_history")}),(0,a.jsx)("div",{className:"gift-transaction-list",children:(null===ne||void 0===ne?void 0:ne.length)>0&&(0,a.jsx)(x.Z,{dataLength:null===ne||void 0===ne?void 0:ne.length,next:pe,hasMore:ce,loader:(0,a.jsx)(g.Z,{}),children:(0,a.jsx)("div",{className:"gift-transaction-container",children:ne.map((function(e,t){return function(e,t){return(0,a.jsxs)("div",{className:"gift-transaction-list-item",children:[(0,a.jsxs)("div",{className:"item-row-container",children:[(0,a.jsx)("div",{children:v()(e.Date).format("YYYY-MM-DD")}),(0,a.jsx)("div",{children:e.Code})]}),(0,a.jsxs)("div",{className:"item-row-container",children:[(0,a.jsx)("div",{className:"item-col-left",children:e.Description}),(0,a.jsx)("div",{className:"item-col-right",children:1===e.UseAmountType?"+".concat(Z+(0,C.x)(e.UseAmount)):"-".concat(Z+(0,C.x)(e.UseAmount))})]})]},t)}(e,t)}))})})})]})]})})})]})}},66245:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/my-e-gift-voucher-transaction",function(){return n(96105)}])}},function(e){e.O(0,[9756,2714,5216,935,9774,2888,179],(function(){return t=66245,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.