PageSourceSearch

https://baskinrobbins.com.my/_next/static/chunks/18d_4upbl9fu1.js

js baskinrobbins.com.my collected 2026-09-24 10:03:09 UTC 25,510 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,715168,e=>{"use strict";var a=e.i(271645),t=e.i(739295),i=e.i(207670),n=e.i(440383),r=e.i(830731);function s(){return(s=Object.assign.bind()).apply(this,arguments)}let d=a.forwardRef(({prefixCls:e="rc-switch",className:t,checked:d,defaultChecked:l,disabled:o,loadingIcon:c,checkedChildren:u,unCheckedChildren:m,onClick:h,onChange:p,onKeyDown:g,styles:w,classNames:_,...f},x)=>{let[v,y]=(0,n.default)(l??!1,d);function N(e,a){let t=v;return o||(y(t=e),p?.(t,a)),t}let j=(0,i.clsx)(e,t,{[`${e}-checked`]:v,[`${e}-disabled`]:o});return a.createElement("button",s({},f,{type:"button",role:"switch","aria-checked":v,disabled:o,className:j,ref:x,onKeyDown:function(e){e.which===r.default.LEFT?N(!1,e):e.which===r.default.RIGHT&&N(!0,e),g?.(e)},onClick:function(e){let a=N(!v,e);h?.(a,e)}}),c,a.createElement("span",{className:`${e}-inner`},a.createElement("span",{className:(0,i.clsx)(`${e}-inner-checked`,_?.content),style:w?.content},u),a.createElement("span",{className:(0,i.clsx)(`${e}-inner-unchecked`,_?.content),style:w?.content},m)))});d.displayName="Switch",e.i(63335);var l=e.i(30294),o=e.i(711517),c=e.i(121872),u=e.i(242064),m=e.i(937328),h=e.i(517455);e.i(296059);var p=e.i(915654),g=e.i(135551),w=e.i(183293),_=e.i(828040),f=e.i(246422),x=e.i(838378);let v=(0,f.genStyleHooks)("Switch",e=>{let a=(0,x.mergeToken)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:a,trackHeight:t,trackMinWidth:i}=e;return{[a]:{...(0,w.resetComponent)(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:t,lineHeight:(0,p.unit)(t),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",...(0,_.genNoMotionStyle)(),[`&:hover:not(${a}-disabled)`]:{background:e.colorTextTertiary},...(0,w.genFocusStyle)(e),[`&${a}-checked`]:{background:e.switchColor,[`&:hover:not(${a}-disabled)`]:{background:e.colorPrimaryHover}},[`&${a}-loading, &${a}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${a}-rtl`]:{direction:"rtl"}}}})(a),(e=>{let{componentCls:a,trackHeight:t,trackPadding:i,innerMinMargin:n,innerMaxMargin:r,handleSize:s,switchDuration:d,calc:l}=e,o=`${a}-inner`,c=(0,p.unit)(l(s).add(l(i).mul(2)).equal()),u=(0,p.unit)(l(r).mul(2).equal());return{[a]:{[o]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:r,paddingInlineEnd:n,transition:["padding-inline-start","padding-inline-end"].map(e=>`${e} ${d} ease-in-out`).join(", "),...(0,_.genNoMotionStyle)(),[`${o}-checked, ${o}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:"none",minHeight:t,transition:["margin-inline-start","margin-inline-end"].map(e=>`${e} ${d} ease-in-out`).join(", "),...(0,_.genNoMotionStyle)()},[`${o}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${o}-unchecked`]:{marginTop:l(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${a}-checked ${o}`]:{paddingInlineStart:n,paddingInlineEnd:r,[`${o}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${o}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${a}-disabled):active`]:{[`&:not(${a}-checked) ${o}`]:{[`${o}-unchecked`]:{marginInlineStart:l(i).mul(2).equal(),marginInlineEnd:l(i).mul(-1).mul(2).equal()}},[`&${a}-checked ${o}`]:{[`${o}-checked`]:{marginInlineStart:l(i).mul(-1).mul(2).equal(),marginInlineEnd:l(i).mul(2).equal()}}}}}})(a),(e=>{let{componentCls:a,trackPadding:t,handleBg:i,handleShadow:n,handleSize:r,calc:s}=e,d=`${a}-handle`;return{[a]:{[d]:{position:"absolute",top:t,insetInlineStart:t,width:r,height:r,transition:`all ${e.switchDuration} ease-in-out`,...(0,_.genNoMotionStyle)(),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:s(r).div(2).equal(),boxSh
1adow:n,transition:`all ${e.switchDuration} ease-in-out`,content:'""',...(0,_.genNoMotionStyle)()}},[`&${a}-checked ${d}`]:{insetInlineStart:`calc(100% - ${(0,p.unit)(s(r).add(t).equal())})`},[`&:not(${a}-disabled):active`]:{[`${d}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${a}-checked ${d}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(a),(e=>{let{componentCls:a,handleSize:t,calc:i}=e;return{[a]:{[`${a}-loading-icon${e.iconCls}`]:{position:"relative",top:i(i(t).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${a}-checked ${a}-loading-icon`]:{color:e.switchColor}}}})(a),(e=>{let{componentCls:a,trackHeightSM:t,trackPadding:i,trackMinWidthSM:n,innerMinMarginSM:r,innerMaxMarginSM:s,handleSizeSM:d,calc:l}=e,o=`${a}-inner`,c=(0,p.unit)(l(d).add(l(i).mul(2)).equal()),u=(0,p.unit)(l(s).mul(2).equal());return{[a]:{[`&${a}-small`]:{minWidth:n,height:t,lineHeight:(0,p.unit)(t),[`${a}-inner`]:{paddingInlineStart:s,paddingInlineEnd:r,[`${o}-checked, ${o}-unchecked`]:{minHeight:t},[`${o}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${o}-unchecked`]:{marginTop:l(t).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${a}-handle`]:{width:d,height:d},[`${a}-loading-icon`]:{top:l(l(d).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${a}-checked`]:{[`${a}-inner`]:{paddingInlineStart:r,paddingInlineEnd:s,[`${o}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${o}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`${a}-handle`]:{insetInlineStart:`calc(100% - ${(0,p.unit)(l(d).add(i).equal())})`}},[`&:not(${a}-disabled):active`]:{[`&:not(${a}-checked) ${o}`]:{[`${o}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${a}-checked ${o}`]:{[`${o}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}})(a)]},e=>{let{fontSize:a,lineHeight:t,controlHeight:i,colorWhite:n}=e,r=a*t,s=i/2,d=r-4,l=s-4;return{trackHeight:r,trackHeightSM:s,trackMinWidth:2*d+8,trackMinWidthSM:2*l+4,trackPadding:2,handleBg:n,handleSize:d,handleSizeSM:l,handleShadow:`0 2px 4px 0 ${new g.FastColor("#00230b").setA(.2).toRgbString()}`,innerMinMargin:d/2,innerMaxMargin:d+2+4,innerMinMarginSM:l/2,innerMaxMarginSM:l+2+4}}),y=a.forwardRef((e,n)=>{let{prefixCls:r,size:s,disabled:p,loading:g,className:w,rootClassName:_,style:f,checked:x,value:y,defaultChecked:N,defaultValue:j,onChange:k,styles:b,classNames:R,...$}=e,[S,M]=(0,l.useControlledState)(N??j??!1,x??y),{getPrefixCls:I,direction:C,className:D,style:P,classNames:T,styles:q}=(0,u.useComponentConfig)("switch"),E=a.useContext(m.default),L=(p??E)||g,A=I("switch",r),[U,W]=v(A),B=(0,h.default)(s),H={...e,size:B,disabled:L},[G,z]=(0,o.useMergeSemantic)([T,R],[q,b],{props:H}),F=a.createElement("div",{className:(0,i.clsx)(`${A}-handle`,G.indicator),style:z.indicator},g&&a.createElement(t.default,{className:`${A}-loading-icon`})),Q=(0,i.clsx)(D,{[`${A}-small`]:"small"===B,[`${A}-loading`]:g,[`${A}-rtl`]:"rtl"===C},w,_,G.root,U,W),O={...z.root,...P,...f};return a.createElement(c.default,{component:"Switch",disabled:L},a.createElement(d,{...$,classNames:G,styles:z,checked:S,onChange:(...e)=>{M(e[0]),k?.(...e)},prefixCls:A,className:Q,style:O,disabled:L,ref:n,loadingIcon:F}))});y.__ANT_SWITCH=!0,e.s(["default",0,y],715168)},790848,e=>{"use strict";var a=e.i(715168);e.s(["Switch",()=>a.default])},962477,e=>{"use strict";let{useGetRewardRedemptionListQuery:a,useGetRewardDetailQuery:t,useClaimRewardMutation:i,useGetMyRewardsQuery:n,useGetMyRewardDetailQuery:r,useGetPointHistoryQuery:s}=e.i(596263).proxyApi.injectEndpoints({endpoints:e=>({getRewardRedemptionList:e.query({query:e=>({url:"/api/V1/perks/reward-redemption/list",method:"GET",params:e}),providesTags:["Rewards"]}),getRewardDetail:e.query({query:e=>({url:`/api/V1/perks/reward-redemption/info/${e}`,method:"GET"}),providesTags:["Rewards"]}),claimReward:e.mutation({query:e=>({url:"/api/V1/perks/reward-redemption/claim",method:"POST",body:e}),invalidatesTags:["Rewards","MyTier"]}),getMyRewards:e.query({query:e=>({url:"/api/V1/perks/reward-redemption/my-rewards",method:"GET",params:e}),providesTags:["Rewards"]}),getMyRewardDetail:e.query({query:e=>({url:`/api/V1/perks/reward-redemption/my-rewards/${e}`,method:"GET"}),providesTags:["Rewards"]}),getPointHistory:e.query({query:e=>({url:"/api/V1/perks/point-history",method:"GET",params:e})})})});e.s(["useClaimRewardMutation",0,i,"useGetMyRewardDetailQuery",0,r,"useGetMyRewardsQuery",0,n,"useGetPointHistoryQuery",0,s,"useGetRewardDetailQuery",0,t,"useGetRewardRedemptionListQuery",0,a])},493289,e=>{e.v({message:"ConfirmRedemptionModal-module__dIKCua__message",modal:"ConfirmRedemptionModal-module__dIKCua__modal",pointsContainer:"ConfirmRedemptionModal-module__dIKCua__pointsContainer",pointsText:"ConfirmRedemptionModal-module__dIKCua__pointsText"})},477009,e=>{"use strict";var a=e.i(843476),t=e.i(271645),i=e.i(21548),n=e.i(482725),r=e.i(685610),s=e.i(371909);e.i(268109);var d=e.i(430666),l=e.i(822315);let o={voucher:"/images/my-order/coupon.svg",referral:"/images/my-order/br-points.svg",order:"/images/my-order/br-points.svg",others:"/images/my-order/br-points.svg"}
1,c=({item:e})=>{let t="add"===e.operation,i=t?`+${e.amount}`:`-${e.amount}`,n=o[e.type];return(0,a.jsxs)("div",{className:"flex gap-x-4 pb-4 border-b border-gray-100 last:border-b-0 last:pb-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 bg-pink-100 rounded-full flex items-center justify-center shrink-0",children:(0,a.jsx)(d.Image,{src:n,alt:"points",width:32,height:32,className:"w-6 h-6"})}),(0,a.jsxs)("div",{className:"flex justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,a.jsx)("span",{className:"font-bold text-neutral-700",children:"order"===e.type?`Earned from Order #${e.orderShortCode}`:e.remarks}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:(0,l.default)(e.createdAt).format("D/M/YYYY, hh:mmA")})]}),(0,a.jsx)("span",{className:`font-bold text-base ${t?"text-green-500":"text-red-500"}`,children:i})]})]})};var u=e.i(962477);e.s(["default",0,()=>{let{page:e,setPage:d,paginationParams:l}=(0,r.usePagination)({perPage:20}),{items:o,reset:m,append:h}=(0,s.useInfiniteList)({getId:e=>e.id}),p=(0,t.useRef)(null),{data:g,isFetching:w,isError:_}=(0,u.useGetPointHistoryQuery)(l),f=g?.links?.next!==null;(0,t.useEffect)(()=>{g?.data&&(1===e?m(g.data):h(g.data))},[g,e,m,h]),(0,t.useEffect)(()=>{let e=new IntersectionObserver(([e])=>{e.isIntersecting&&d(e=>e+1)},{threshold:.1});return p.current&&f&&!w&&e.observe(p.current),()=>e.disconnect()},[w,f,d,o.length]);let x=w&&0===o.length,v=w&&o.length>0;return x?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(n.Spin,{size:"large"})}):_?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(i.Empty,{description:"Failed to load points history"})}):0===o.length?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(i.Empty,{description:"No points history"})}):(0,a.jsxs)("div",{className:"flex flex-col gap-y-4",children:[(0,a.jsx)("div",{className:"bg-white rounded-lg p-4 flex flex-col gap-y-4",children:o.map(e=>(0,a.jsx)(c,{item:e},e.id))}),f&&(0,a.jsx)("div",{ref:p,className:"flex items-center justify-center py-4 min-h-15",children:v&&(0,a.jsx)(n.Spin,{})}),!f&&o.length>0&&!w&&(0,a.jsx)("p",{className:"text-center text-xs text-neutral-400 py-4",children:"End of list"})]})}],477009)},755982,e=>{e.v({content:"PointsToggle-module__nQ8Tra__content",text:"PointsToggle-module__nQ8Tra__text",wrapper:"PointsToggle-module__nQ8Tra__wrapper"})},998374,e=>{"use strict";var a=e.i(843476),t=e.i(522016),i=e.i(464176),n=e.i(790848),r=e.i(155487);e.i(660509);var s=e.i(730018);e.i(52948);var d=e.i(646445),l=e.i(556887),o=e.i(238627),c=e.i(755982);e.s(["default",0,({checked:e=!1,onChange:u})=>{let m=(0,r.useDispatch)(),h=(0,r.useSelector)(e=>e.auth.isAuthenticated),p=(0,r.useSelector)(e=>e.cart.activePerk),{data:g}=(0,s.useGetMyTierQuery)(void 0,{skip:!h}),w=(0,d.useLoginRedirectUrl)(),_=g?.data?.availablePoints??0,f=g?.data?.pointsInRm??"0.00";return(0,a.jsxs)("div",{className:c.default.wrapper,children:[(0,a.jsxs)("div",{className:c.default.content,children:[(0,a.jsx)(i.default,{src:"/images/orders/br-points-40.png",alt:"BR Points",width:24,height:24,className:"w-6 h-6"}),(0,a.jsx)("span",{className:c.default.text,children:h?`${_} pts (RM${f} off)`:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.default,{href:w,className:"underline!",children:"Log in"})," ","to use your points"]})})]}),h&&(0,a.jsx)(n.Switch,{checked:e,onChange:e=>{e&&p?o.modal.confirm({title:"Remove Applied Perk?",content:`Your cart has an applied ${p.perkType}. Using BR Points will remove it. Do you want to proceed?`,icon:null,centered:!0,mask:{closable:!0},okText:"Use Points",cancelText:"Cancel",onOk:()=>{m((0,l.removeCartActivePerkAndMergeItems)()),u?.(e)}}):u?.(e)}})]})}])},267331,e=>{e.v({badge:"RewardCard-module__N3whqW__badge",card:"RewardCard-module__N3whqW__card",cardUsed:"RewardCard-module__N3whqW__cardUsed",countdownWrapper:"RewardCard-module__N3whqW__countdownWrapper",currentPoints:"RewardCard-module__N3whqW__currentPoints",currentPointsUsed:"RewardCard-module__N3whqW__currentPointsUsed",image:"RewardCard-module__N3whqW__image",imageContainer:"RewardCard-module__N3whqW__imageContainer",infoContainer:"RewardCard-module__N3whqW__infoContainer",name:"RewardCard-module__N3whqW__name",originalPoints:"RewardCard-module__N3whqW__originalPoints",originalPointsUsed:"RewardCard-module__N3whqW__originalPointsUsed",points:"RewardCard-module__N3whqW__points",usedBadge:"RewardCard-module__N3whqW__usedBadge",usedOverlay:"RewardCard-module__N3whqW__usedOverlay"})},339655,e=>{e.v({container:"UseNowButton-module__iAheHa__container",qrButton:"UseNowButton-module__iAheHa__qrButton"})},358285,e=>{e.v({badge:"RewardDetailModal-module__u2DMda__badge",badgeRow:"RewardDetailModal-module__u2DMda__badgeRow",container:"RewardDetailModal-module__u2DMda__container",contentSection:"RewardDetailModal-module__u2DMda__contentSection",currentPoints:"RewardDetailModal-module__u2DMda__currentPoints",description:"RewardDetailModal-module__u2DMda__description",footer
1:"RewardDetailModal-module__u2DMda__footer",guestLink:"RewardDetailModal-module__u2DMda__guestLink",guestMessage:"RewardDetailModal-module__u2DMda__guestMessage",imageSection:"RewardDetailModal-module__u2DMda__imageSection",modal:"RewardDetailModal-module__u2DMda__modal",originalPoints:"RewardDetailModal-module__u2DMda__originalPoints",pointsRow:"RewardDetailModal-module__u2DMda__pointsRow",productImage:"RewardDetailModal-module__u2DMda__productImage",productInfo:"RewardDetailModal-module__u2DMda__productInfo",productName:"RewardDetailModal-module__u2DMda__productName",scrollableContent:"RewardDetailModal-module__u2DMda__scrollableContent",termsContent:"RewardDetailModal-module__u2DMda__termsContent",termsSection:"RewardDetailModal-module__u2DMda__termsSection",termsTitle:"RewardDetailModal-module__u2DMda__termsTitle",usedBadge:"RewardDetailModal-module__u2DMda__usedBadge"})},631731,696621,e=>{"use strict";var a=e.i(843476),t=e.i(207670),i=e.i(464176);e.i(268109);var n=e.i(393535);let r=["hotItem","topRedeem","seasonal"],s={hotItem:{label:"Hot Item",icon:"/images/perks/badges/hot-item-icon.svg"},topRedeem:{label:"Top Redeem",icon:"/images/perks/badges/top-redeem-icon.svg"},seasonal:{label:"Seasonal",icon:"/images/perks/badges/seasonal-icon.svg"}},d=e=>r.find(a=>e[a])??null;var l=e.i(267331);e.s(["default",0,({reward:e,onClick:r,variant:o="default"})=>{let c=d(e),u="myReward"===o,m=u&&e.isUsed,h=u&&!e.isUsed&&e.expireAt;return(0,a.jsxs)("div",{className:(0,t.default)(l.default.card,m&&l.default.cardUsed),onClick:r,children:[(0,a.jsxs)("div",{className:l.default.imageContainer,children:[(0,a.jsx)(i.default,{src:e.productImage,alt:e.productName,fill:!0,className:l.default.image,sizes:"(max-width: 640px) 50vw, (max-width: 1024px) 25vw, 20vw"}),m&&(0,a.jsx)("div",{className:l.default.usedOverlay}),h&&(0,a.jsx)("div",{className:l.default.countdownWrapper,children:(0,a.jsx)(n.CountdownBadge,{endTime:e.expireAt})}),!u&&c&&(0,a.jsxs)("div",{className:l.default.badge,children:[(0,a.jsx)(i.default,{src:s[c].icon,alt:"",width:16,height:16}),(0,a.jsx)("span",{children:s[c].label})]})]}),(0,a.jsxs)("div",{className:l.default.infoContainer,children:[m&&(0,a.jsx)("div",{className:l.default.usedBadge,children:(0,a.jsx)("span",{children:"Used"})}),(0,a.jsx)("p",{className:l.default.name,children:(0,a.jsx)("span",{children:e.productName})}),(0,a.jsxs)("div",{className:l.default.points,children:[(0,a.jsxs)("span",{className:(0,t.default)(l.default.currentPoints,m&&l.default.currentPointsUsed),children:[e.discountedPoints??e.points," pts"]}),e.discountedPoints&&(0,a.jsx)("span",{className:(0,t.default)(l.default.originalPoints,m&&l.default.originalPointsUsed),children:e.points})]})]})]})}],631731);var o=e.i(271645),c=e.i(155487),u=e.i(618566),m=e.i(522016),h=e.i(197301),p=e.i(464571),g=e.i(981339),w=e.i(900681),_=e.i(162630),f=e.i(99083),x=e.i(962477);e.i(95507);var v=e.i(238627),y=e.i(691331),N=e.i(493289);let j=({open:e,onCancel:t,onSuccess:n,rewardId:r,points:s})=>{let[d,{isLoading:l}]=(0,x.useClaimRewardMutation)(),o=async()=>{try{await d({perkId:r}).unwrap(),n(),v.message.success("Reward redeemed successfully!")}catch(a){let e=(0,y.getFirstErrorMessage)(a,"Failed to redeem reward. Please try again.");v.message.error(e)}};return(0,a.jsxs)(w.ResponsiveModal,{open:e,onCancel:t,onOk:o,title:"Confirm Redemption",okText:"Redeem",okButtonLoading:l,className:N.default.modal,showHeaderDivider:!0,footerDirection:"row",width:480,children:[(0,a.jsxs)("div",{className:N.default.pointsContainer,children:[(0,a.jsx)(i.default,{src:"/images/perks/rewards/br-points-56.png",alt:"BR Points",width:48,height:48,className:"w-8 h-8 lg:w-12 lg:h-12"}),(0,a.jsxs)("span",{className:N.default.pointsText,children:["-",s," points"]})]}),(0,a.jsxs)("div",{className:N.default.message,children:[(0,a.jsxs)("p",{children:["Points are ",(0,a.jsx)("strong",{children:"deducted immediately."})]}),(0,a.jsxs)("p",{children:["Claim your ice cream within ",(0,a.jsx)("strong",{children:"24 hours"})," before it expires."]})]})]})};var k=e.i(31849),b=e.i(248880);e.i(223269);var R=e.i(978242),$=e.i(621817);e.i(800982);var S=e.i(97119),M=e.i(398823),I=e.i(339655);let C="This reward is not available at the selected store. Please select a different store.",D=({rewardId:e,reward:t,onClose:i})=>{let n=(0,u.useRouter)(),r=(0,c.useDispatch)(),s=(0,c.useSelector)(e=>e.store.selectedStore),{productId:d,code:l,productName:m,isUsed:h}=t,[g,w]=(0,o.useState)(!1),[_,f]=(0,o.useState)(!1),[x,N]=(0,o.useState)(null),[j,{isFetching:D}]=(0,M.useLazyGetMenuInfoQuery)(),P=async a=>
1{let t=await j({productIds:[d],storeId:a,userPerkId:e}).unwrap(),i=t.data?.[0];if(!i)throw Error("Reward not found");let n=0===parseFloat(i.price)&&i.isAvailable;return{product:i,isFreeAndAvailable:n}},T=()=>{v.message.error(C),N(C),f(!0)},q=e=>{let a=(0,$.createPendingProduct)(e,1);a.perk={userPerkId:t.id,perkType:"reward",perkRole:"promo"},r((0,R.setMode)("preview")),r((0,R.setActivePerk)({...t,perkType:"reward"})),r((0,R.setPreviewModeProducts)([a])),f(!1),i(),n.push("/products/detail-reward")},E=async e=>{N(null);try{let a=await P(e.id);a.isFreeAndAvailable?q(a.product):T()}catch(a){let e=(0,y.getFirstErrorMessage)(a,"Failed to load reward information. Please try again.");v.message.error(e)}},L=async()=>{N(null);try{if(!s)return void T();let e=await P(s.id);e.isFreeAndAvailable?q(e.product):T()}catch(a){let e=(0,y.getFirstErrorMessage)(a,"Failed to load reward information. Please try again.");v.message.error(e)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:I.default.container,children:[(0,a.jsx)(p.Button,{type:"primary",onClick:L,shape:"round",size:"large",block:!0,disabled:h||D,loading:D,children:h?"Already Used":"Use Now"}),!h&&(0,a.jsx)("button",{className:I.default.qrButton,onClick:()=>w(!0),"aria-label":"Show QR Code",children:(0,a.jsx)(k.QrCodeIcon,{className:"w-6 h-6"})})]}),(0,a.jsx)(b.QRCodeModal,{open:g,onClose:()=>w(!1),code:l,displayName:m}),(0,a.jsx)(S.StoreSelectorModal,{open:_,onCancel:()=>{f(!1),N(null)},customInstructions:"Select a store that offers this reward",onSelect:E,errorMessage:x,perkReference:{userPerkId:e,perkType:"reward",perkRole:"promo"}})]})};var P=e.i(358285);e.s(["default",0,({open:e,onClose:t,rewardId:n,mode:r="claim"})=>{let l=(0,u.useRouter)(),{width:v}=(0,f.default)(),y=void 0!==v&&v<=1024,{isAuthenticated:N}=(0,c.useSelector)(e=>e.auth),[k,b]=(0,o.useState)(!1),R="use"===r,{data:$,isLoading:S}=(0,x.useGetRewardDetailQuery)(n,{skip:!n||!e||R}),{data:M,isLoading:I}=(0,x.useGetMyRewardDetailQuery)(n,{skip:!n||!e||!R}),C=M?.data,T=$?.data,q=R?C:T,E=R?I:S,L=q?d(q):null,A=q?h.default.sanitize(q.termCondition):"",U=T?.discountedPoints??T?.points??0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w.ResponsiveModal,{open:e,onCancel:t,title:y?"Reward Details":null,footer:null,width:y?"100%":1121,className:P.default.modal,showHeaderDivider:y,mask:!y&&!k,children:E||!q?(0,a.jsxs)("div",{className:P.default.container,children:[(0,a.jsx)("div",{className:P.default.imageSection,children:(0,a.jsx)(g.Skeleton.Node,{active:!0,className:"w-full! h-full!",style:{width:"100%",height:"100%"},children:(0,a.jsx)("span",{})})}),(0,a.jsx)("div",{className:P.default.contentSection,children:(0,a.jsx)("div",{className:`${P.default.scrollableContent} scrollbar-hide`,children:(0,a.jsx)(g.Skeleton,{active:!0,paragraph:{rows:6}})})})]}):(0,a.jsxs)("div",{className:P.default.container,children:[(0,a.jsx)("div",{className:P.default.imageSection,children:(0,a.jsx)(i.default,{src:q.productImage,alt:q.productName,fill:!0,className:P.default.productImage,sizes:"(max-width: 1024px) 100vw, 482px"})}),(0,a.jsxs)("div",{className:P.default.contentSection,children:[(0,a.jsxs)("div",{className:`${P.default.scrollableContent} scrollbar-hide`,children:[q.isUsed&&(0,a.jsx)("span",{className:P.default.usedBadge,children:"Used"}),(0,a.jsxs)("div",{className:P.default.productInfo,children:[(0,a.jsx)("h2",{className:P.default.productName,children:q.productName}),!R&&T&&(0,a.jsxs)("div",{className:P.default.pointsRow,children:[(0,a.jsxs)("span",{className:P.default.currentPoints,children:[U," pts"]}),T.discountedPoints&&(0,a.jsxs)("span",{className:P.default.originalPoints,children:[T.points," pts"]})]}),(0,a.jsxs)("div",{className:P.default.badgeRow,children:[L&&(0,a.jsxs)("div",{className:P.default.badge,children:[(0,a.jsx)(i.default,{src:s[L].icon,alt:"",width:16,height:16}),(0,a.jsx)("span",{children:s[L].label})]}),!N&&(0,a.jsxs)(m.default,{href:"/login",className:P.default.guestMessage,children:[(0,a.jsx)("span",{className:P.default.guestLink,children:"Log in"})," or"," ",(0,a.jsx)("span",{className:P.default.guestLink,children:"sign up"})," to redeem rewards."]})]})]}),(0,a.jsx)("p",{className:P.default.description,children:q.description}),(0,a.jsxs)("div",{className:P.default.termsSection,children:[(0,a.jsx)("h3",{className:P.default.termsTitle,children:"Terms & Conditions"}),(0,a.jsx)("div",{className:P.default.termsContent,dangerouslySetInnerHTML:{__html:A}})]})]}),(0,a.jsx)("div",{className:P.default.footer,children:N?R&&n&&q?.code?(0,a.jsx)(D,{rewardId:n,reward:q,onClose:t}):(0,a.jsx)(p.Button,{type:"primary",shape:"round",size:"large",block:!0,onClick:()=>{b(!0)},children:"Get Reward"}):(0,a.jsx)(_.LoginSignUpButton,{block:!0})})]})]})}),n&&(0,a.jsx)(j,{open:k,onCancel:()=>{b(!1)},onSuccess:()=>{b(!1),t(),l.push("/perks/rewards?tab=my-rewards")},rewardId:n,points:U})]})}],696621)},301086,e=>{e.v({container:"RewardsCarousel-module__sK_4wG__container"})},66256,e=>{"use strict";var a=e.i(843476),t=e.i(271645),i=e.i(21548),n=e.i(295611),r=e.i(992249);e.i(52948);var s=e.i(685610),d=e.i(371909),l=e.i(962477),o=e.i(631731),c=e.i(696621),u=e.i(301086);e.s(["default",0,({initialRewards:e,perPage:m,title:h})=>{let[p,g]=(0,t.useState)(null),[w,_]=(0,t.useState)(!1),{page:f,setPage:x,paginationParams:v}=(0,s.usePagination)({perPage:m}),{items:y,append:N}=(0,d.useInfiniteList)({initialItems:e}),{data:j,isFetching:k}=(0,l.useGetRewardRedemptionListQuery)(v,{skip:1===f}),b=1===f?e.length>=m:j?.links?.next!==null;return(0,t.useEffect)(()=>{j?.data&&1!==f&&N(j.data)},[j,f,N]),(0,a.jsxs)("div",{className:u.default.container,id:"rewards",children:[(0,a.jsx)(n.default,{title:h,link:"/perks/rewards"}),0===y.length?(0,a.jsx)(i.Empty,{description:"No rewards available."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.default,{hasMore:b,isLoading:k,onLoadMore:()=>{!k&&b&&x(e=>e+1)},children:y.map(e=>(0,a.jsx)("div",{className:"w-[130px] md:w-[179px] shrink-0",children:(0,a.jsx)(o.default,{reward:e,onClick:()=>{g(e.id),_(!0)}})},e.id))}),(0,a.jsx)(c.default,{open:w,onClose:()=>{_(!1),g(null)},rewardId:p},p)]})]})}])}]);

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.