1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="fd8498e6-7b51-4a01-a22e-adc5a47cc5d9",e._sentryDebugIdIdentifier="sentry-dbid-fd8498e6-7b51-4a01-a22e-adc5a47cc5d9")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8859],{68859:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return ed}});var i,n,d=t(85893),a=t(67294),s=t(59081),o=t(87745),c=t(93967),x=t.n(c),r=t(37156),m=t(3751),u=t(92919),v=t.n(u);let p=e=>e>9?""+e:"0"+e,f=e=>{let{time:l,copy:t,s:i,last:n,hideFormMode:a,unit:s}=e;return(0,d.jsx)("div",{children:(0,d.jsx)("div",{className:x()("relative flex "),children:(0,d.jsx)("div",{className:x()("h-[calc(60/1920*100vw)] w-[calc(60/1920*100vw)] rounded-[calc(8/1920*100vw)] bg-[#3ADB67] md:h-[calc(51/390*100vw)] md:w-[calc(56/390*100vw)] md:rounded-[calc(6/390*100vw)] md-l:h-[calc(51/768*100vw)] md-l:w-[calc(56/768*100vw)] md-l:rounded-[calc(6/768*100vw)]"),children:(0,d.jsxs)("div",{className:"flex w-[calc(60/1920*100vw)] flex-col items-center px-[calc(10/1920*100vw)] pt-[calc(8/1920*100vw)] pb-[calc(6/1920*100vw)] md:h-[calc(51/390*100vw)] md:w-[calc(56/390*100vw)] md:pt-[calc(6/390*100vw)] md-l:h-[calc(51/768*100vw)] md-l:w-[calc(56/768*100vw)] md-l:pt-[calc(6/768*100vw)]",children:[(0,d.jsx)("div",{suppressHydrationWarning:!0,className:"text-[calc(24/1920*100vw)] font-[800] leading-[1] text-[#000] md:text-[calc(20/390*100vw)] md:leading-[1.2] md-l:text-[calc(20/768*100vw)] md-l:font-[700] md-l:leading-[1.2]",children:p(l)}),(0,d.jsx)("div",{className:"text-[calc(12/1920*100vw)] font-[800] leading-[calc(20/1920*100vw)] tracking-[-2%] text-[#000] md:text-[calc(12/390*100vw)] md:leading-[1.4] md-l:text-[calc(12/768*100vw)] md-l:font-[700] md-l:leading-[1.4]",children:s})]})})})})};var h=e=>{var l,t,i,n;let{data:a}=e,{endTime:s=""}=a,{seconds:o,minutes:c,hours:u,days:p}=(0,m.useTimer)({expiryTimestamp:new Date(s)}),h=(0,r.useRouter)();if(!s)return null;let{locale:w}=h;return new Date>new Date(s)?(window.location.reload(),null):(0,d.jsx)("div",{className:x()(v().countDown,"eu-de"===w?v().deCountDown:""),children:(0,d.jsxs)("div",{className:v().time,children:[p>0&&(0,d.jsx)(f,{time:p,unit:null==a?void 0:null===(l=a.endTimeUnit)||void 0===l?void 0:l.day,s:v()}),(0,d.jsx)(f,{time:u,unit:null==a?void 0:null===(t=a.endTimeUnit)||void 0===t?void 0:t.hours,s:v()}),(0,d.jsx)(f,{time:c,unit:null==a?void 0:null===(i=a.endTimeUnit)||void 0===i?void 0:i.minutes,s:v()}),(0,d.jsx)(f,{time:o,unit:null==a?void 0:null===(n=a.endTimeUnit)||void 0===n?void 0:n.seconds,last:!0,s:v()})]})})};let w=e=>{var l;let{data:t}=e;return(0,d.jsx)("div",{className:"banner w-full overflow-hidden",children:(0,d.jsxs)("div",{className:"main-container relative h-[calc(890/1920*100vw)] w-full md:h-[calc(660/390*100vw)] md-l:h-[calc(656/768*100vw)]",children:[(0,d.jsx)(o.t,{source:"".concat(null==t?void 0:t.mobBg," 767, ").concat(null==t?void 0:t.padBg," 1023, ").concat(null==t?void 0:t.bg," 9999"),imgClassName:"object-cover",className:"absolute left-0 top-0 z-0 flex h-full w-full"}),(0,d.jsx)("div",{className:"absolute left-0 top-0 z-0 flex h-full w-full"}),(0,d.jsx)("div",{className:"z-1 relative flex h-full w-full l:justify-center min-l:ml-[calc(128/1920*100vw)]",children:(0,d.jsxs)("div",{className:x()("mt-[-100px] flex h-full w-full max-w-[86.67vw] flex-col justify-center pt-[100px] font-[700] text-[#fff] md:w-full md:pt-[calc(48/768*100vw)] l:mt-[0px] l:items-center l:justify-start l:leading-[1.4] md-l:pt-[calc(16/768*100vw)]"),children:[(null==t?void 0:t.subTitle)&&(0,d.jsx)(s.X6,{as:"h2",html:null==t?void 0:t.subTitle,className:"l-xl:text-[14px] mb-[calc(8/1920*100vw)] text-[calc(18/1920*100vw)] font-[600] tracking-[-2%] md:mb-[4px] md:font-[600] md:leading-tight l:text-[16px] md-l:text-[calc(14/768*100vw)] md-l:font-[700]"}),(null==t?void 0:t.title)&&(0,d.jsx)(s.X6,{as:"h1",html:null==t?void 0:t.title,className:"l-xl:text-[26px] mb-[calc(16/1920*100vw)] text-[calc(64/1920*100vw)] font-[700] leading-[1] md:!mb-[4px] md:text-[30px] md:font-[700] md:leading-[1.2] l:text-center md-l
1:text-[calc(36/768*100vw)] md-l:font-[800]"}),(null==t?void 0:t.desc)&&(0,d.jsx)(s.xv,{as:"p",html:null==t?void 0:t.desc,className:"l-xl:text-[14px] mb-[calc(48/1920*100vw)] text-[calc(24/1920*100vw)] font-[600] leading-[1.38] tracking-[-2%] md:mb-[calc(24/390*100vw)] md:text-[14px] md:font-[600] md:leading-[1.4] md-l:text-[calc(18/768*100vw)] md-l:font-[700]"}),(null==t?void 0:null===(l=t.sticky)||void 0===l?void 0:l.endTime)&&new Date(t.sticky.endTime)>new Date&&(0,d.jsx)(h,{data:null==t?void 0:t.sticky})]})})]})})};var b=t(59307),g=t(58045),j=t(28367),N=t(13910),y=t(99137),D=t(35869),_=t(58509),k=t(44599),C=t(63843),T=t(74284),F=t(85103),S=t(95591);let z=e=>{var l,t,i;let{myRewards:n,dealsType:s}=e,[c,x]=(0,a.useState)((null==n?void 0:null===(l=n.tab[0])||void 0===l?void 0:l.id)||""),{locale:m}=(0,r.useRouter)(),{profile:u}=(0,N.a)(),v=(0,a.useCallback)(async e=>{let l=new URLSearchParams({email:(null==u?void 0:u.email)||"",shopify_domain:F.BR["".concat(m)],current_page:"1",page_size:"999",state:e,genre:s||""}).toString(),t=await (0,T.Z)({url:"/api/multipass/rainbowbridge/lottery/user/lottery-records?".concat(l),method:"GET",locale:m});return null==t?void 0:t.data},[m,null==u?void 0:u.email,s]),{isLoading:p,data:f}=(0,S.ZP)(["myRewards",c],e=>{let[l,t]=e;return v(t)});return(0,d.jsxs)("div",{className:"member-week-rewards flex h-[65vh] w-full flex-col px-[32px] py-[32px] pb-[40px] md:w-[370px]",children:[(0,d.jsx)("div",{className:"tabs flex w-full flex-shrink-0 items-center justify-center mxl:!my-[16px]",children:(0,d.jsx)("div",{className:"grid grid-flow-col justify-center gap-[8px] rounded-[100px] bg-[#F6F6F6] text-[16px] font-bold text-[#333]",children:null==n?void 0:n.tab.map(e=>(0,d.jsx)("div",{className:"hover:bg-brand cursor-pointer rounded-[100px] px-[20px] py-[8px] hover:text-white ".concat(c===e.id&&"bg-brand text-white"),onClick:()=>x(e.id),onKeyDown:l=>{("Enter"===l.key||" "===l.key)&&(l.preventDefault(),x(e.id))},role:"button",tabIndex:0,children:e.name},e.id))})}),(0,d.jsxs)("div",{className:"main-content mt-[20px] h-0 flex-1 overflow-auto",children:[(0,d.jsx)("div",{className:"grid gap-[16px]",children:null==f?void 0:null===(t=f.list)||void 0===t?void 0:t.map((e,l)=>(0,d.jsx)("div",{className:"grid gap-[12px]",children:(0,d.jsxs)("div",{className:"grid gap-[4px] rounded-[10px] bg-[#eee] px-[16px] py-[20px]",children:[(0,d.jsx)("a",{className:"flex text-[16px] font-black text-[#111111] ".concat(e.product_url?"!cursor-pointer hover:!underline":"hover:cursor-text"),href:e.product_url||"javascript:;",children:(null==e?void 0:e.title)||(null==e?void 0:e.desc)}),(null==e?void 0:e.code)&&(0,d.jsx)("div",{className:"text-[14px] font-semibold ",children:(0,d.jsx)(b.Z,{className:"text-[14px] font-bold text-[#000] x:text-[12px]",s:{codePrefix:"text-[#000]",code:"x:overflow-hidden x:text-ellipsis pr-[10px] text-[#000]",copy:"text-black text-[12px] font-bold py-[3px] px-[10px] rounded-full bg-white"},code:e.code||""})})]})},l))}),0>=((null==f?void 0:null===(i=f.list)||void 0===i?void 0:i.length)||0)&&!p&&(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center pb-[20px]",children:[(0,d.jsx)(o.t,{url:null==n?void 0:n.emptyListImageUrl,className:"mb-[16px] block h-[120px] w-[160px] overflow-hidden"}),(0,d.jsx)("div",{className:"text-[16px] font-semibold text-[#111111]",children:null==n?void 0:n.emptyListLabel})]})]})]})};var A=t(80355),E=t(75795),I=t(63742);let M=e=>{var l,t,i,n;let{config:o,position:c,getPrize:m,showOperateText:u,showMore:v,closeShowOperateText:p}=e,f=(0,k.L)(),[h,w]=(0,a.useState)(!1),[b,g]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1),[y,D]=(0,a.useState)(""),[_,C]=(0,a.useState)(!1),[T,F]=(0,a.useState)(!1),[S,z]=(0,a.useState)(!1),[M,R]=(0,a.useState)(!1),U=null===(t=f.metafields)||void 0===t?void 0:null===(l=t.common)||void 0===l?void 0:l.copywriting;null==f||null===(n=f.metafields)||void 0===n||null===(i=n.common)||void 0===i||i.copywriting;let{recaptchaReady:L}=(0,I.l8)(),P=(0,A.n)({onSuccess(e){(null==e?void 0:e.is_participated)?C(!0):(m(y),F(!0),setTimeout(()=>{F(!1)},1500)),w(!1),R(!1)}}),{query:B}=(0,r.useRouter)();(0,a.useMemo)(()=>{L&&M&&(w(!0),P.trigger({email:y,dealsType:o.dealsType,position:c}))},[L,M,y,o.dealsType,c,P]);let O=async()=>
1{if(g(!1),N(!1),C(!1),p(),!S){N(!0);return}if(!(0,E.D)(y)){g(!0);return}if(!L){R(!0);return}w(!0),P.trigger({email:y,dealsType:o.dealsType,position:c})};return(0,d.jsxs)("div",{className:x()("flex w-full flex-col md:items-center"),children:[(0,d.jsx)(s.xv,{html:o.email,className:"mt-[32px] w-full text-left text-[16px] leading-[1.3] text-[#6D6D6F] md:mt-[24px] md:text-[14px]"}),(0,d.jsx)(s.II,{placeholder:o.placeholder,value:y,onChange:e=>D(e.target.value),className:"mt-[8px] h-[48px] w-full rounded-full border-none pl-[20px] text-left text-[16px] text-black outline-none placeholder:text-[#a1a1a1] md:mt-[10px] md:mb-[4px] md:h-[42px]"}),(0,d.jsxs)("div",{className:"flex items-center md:h-[24px] min-l:hidden md-l:h-[32px]",children:[j&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==U?void 0:U.agreePolicy}),b&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==U?void 0:U.errEmail}),T&&!v&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==U?void 0:U.footerSuccess}),_&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==o?void 0:o.orderRepeat}),u&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==o?void 0:o.operateTooMuch}),v&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==o?void 0:o.moreAlert})]}),(0,d.jsx)(s.zx,{id:"Register",loading:h,onClick:O,className:x()("Register flex h-[48px] w-full items-center justify-center whitespace-nowrap bg-[#3ADB67] text-[18px] font-bold text-[#1D1D1F] md:my-[10px] md:h-[42px] min-l:mt-[calc(32/1920*100vw)] min-l:mb-[calc(8/1920*100vw)]"),children:o.confirm}),(0,d.jsxs)("div",{className:x()("flex md:w-full md:items-start md:text-center md-l:mx-auto md-l:mt-[13px] [&_a]:underline"),children:[(0,d.jsx)(s.XZ,{id:"policy-check",checked:S,onCheckedChange:e=>{z(e)},className:x()(S?"border-none":"border-[1px] border-[#000000]","size-[16px] mr-[4px] h-[16px] w-[16px] bg-white min-md:mr-[10px]")}),(0,d.jsx)("label",{htmlFor:"policy-check",className:"-full max-w-[466px] text-left text-[14px] text-[#000] md:text-[12px]",children:(0,d.jsx)(s.xv,{as:"span",className:"cursor-pointer",html:null==o?void 0:o.policyText})})]}),(0,d.jsxs)("div",{className:"l:hidden",children:[j&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==U?void 0:U.agreePolicy}),b&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==U?void 0:U.errEmail}),T&&!v&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==U?void 0:U.footerSuccess}),_&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==o?void 0:o.orderRepeat}),u&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==o?void 0:o.operateTooMuch}),v&&(0,d.jsx)("div",{className:x()("text-left leading-[1.2] text-[#ff2323] md:text-center"),children:null==o?void 0:o.moreAlert})]})]})};(i=n||(n={}))[i.Ready=0]="Ready",i[i.Drawing=1]="Drawing",i[i.Success=2]="Success",i[i.Error=3]="Error";let R=e=>{var l,t,i,c;let{config:m,myRewards:u,isMobileAir:v}=e,[p,f]=(0,a.useState)(!1),[h,w]=(0,a.useState)(n.Ready),[T,F]=(0,a.useState)(!1),[S,A]=(0,a.useState)(),{handle:E}=(0,g.l)(),{isLogin:I,profile:R}=(0,N.a)();null===(t=(0,k.L)().metafields)||void 0===t||null===(l=t.common)||void 0===l||l.copywriting;let{locale:L}=(0,r.useRouter)(),[P,B]=(0,a.useState)(!1),{prizeInfo:O}=m,[W,Z]=(0,a.useState)(0),[G,K]=(0,a.useState)(0),{openSignUpPopup:X,openModal:q}=(0,j.l)(),V=(e,l)=>{q({title:"",domContent:(0,d.jsx)(U,{rules:e,rules2:l})})},H=(0,y.u)({async onSuccess(e){if(e){let l=e.prize.name,t=m.prizeList.find(e=>e.prizeName==l)||{id:-1};t.id&&t.id>0&&(w(n.Success),Z(720+(null==t?void 0:t.id)*72),A({prizeInfo:t,prizeResult:e.prize.prize_detail}),setTimeout(()=>{f(!0),Z(0),(0,_.Qp)(document.body)},2e3))}else B(!0);(0,D.DU)({event:"ga4Event",event_name:"lp_button",event_parameters:{info:"",position:"",button_name:"luckydraw_spinnow"}})},async onError(e){console.error("onError",e),B(!0),F(!0),setTimeout(()=>{F(!1)},1500)}}),Q=(0,a.useCallback)(e=>{A(void 0),H.isMutating||(w(n.Drawing),H.trigger({email:e,dealsType:m.dealsType||""}).catch(()=>{F(!0)}))},[]),J=()=>{I?q({title:m.rewardsData.title,domContent:(0,d.jsx)(z,{myRewards:u,dealsType:m.dealsType})}):X()};return(0,d.jsxs)("div",{className:"relative z-[3] mx-auto vw:-mt-[100px] md:w-[calc(360/390*100vw)] min-md:w-[calc(584/768*100vw)] min-l:h-[calc(790/1920*100vw)] min-l:!w-[calc(1384/1920*100vw)]",children:[(0,d.jsx)("div",{className:"mx-auto w-full rounded-[40px] md:h-[calc(677/390*100vw)]",children:(0,d.jsxs)("div",{className:"flex h-full w-full justify-between rounded-[16px] border-2 border-[var(--light-texts-lcons-white,#F
1FF)] bg-[rgba(214,244,222,0.40)] px-[calc(96/1920*100vw)] py-[48px] shadow-[6px_6px_40px_0px_rgba(0,0,0,0.12)] md:px-[24px] md:py-[32px] md:pb-[20px] l:flex-col min-l:h-[calc(790/1920*100vw)]",children:[(0,d.jsx)("div",{className:"flex w-full items-center l:justify-center l:text-center",children:(0,d.jsxs)("div",{className:"flex w-full flex-col justify-center md:ml-0 min-l:max-w-[calc(466/1920*100vw)] ",children:[(0,d.jsx)(s.xv,{as:"p",html:m.title,className:"text-[48px] font-[700] leading-[1] text-[#1D1D1F] md:text-center md:text-[26px] md-l:text-[calc(32/768*100vw)]"}),(0,d.jsx)(s.xv,{as:"p",html:m.desc,className:"mt-[18px] text-[16px] leading-[1.3] text-[#6D6D6F] md:mt-[8px] md:text-center md:text-[14px] md-l:mt-[calc(8/768*100vw)] md-l:text-[calc(16/768*100vw)]"}),(0,d.jsx)("div",{className:"",children:(0,d.jsx)(M,{closeShowOperateText:()=>B(!1),showOperateText:P,getPrize:Q,config:m,position:"lottery",showMore:T})})]})}),(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center md:pr-0 md:pt-0",children:[(0,d.jsxs)("div",{className:"relative flex w-[calc(654/1920*100vw)] max-w-[654px] items-center justify-center rounded-full md:h-[290px] md:w-[290px] md-l:mt-[48px] md-l:h-[466px] md-l:w-[466px]",children:[(0,d.jsx)(o.t,{url:m.content,className:"h-full w-full"}),(0,d.jsx)(C.E.div,{transition:{duration:W?2:0},animate:{rotate:"".concat(W,"deg")},className:"absolute",style:{transformOrigin:"center"},children:(0,d.jsx)(o.t,{url:m.content,className:"md:h-[296px] md:w-[296px] md-l:h-[466px] md-l:w-[466px]"})}),(0,d.jsx)(o.t,{url:m.pointer,className:"absolute h-[152px] w-[123px] md:h-[68px] md:w-[68px]"})]}),(0,d.jsxs)("div",{className:"flex flex-row md:mt-[30px] min-l:mt-[calc(24/1920*100vw)] md-l:mt-[40px]",children:[(0,d.jsx)(s.xv,{onClick:()=>V(m.rule,m.rule2),html:m.rule.title+" >",className:"mb-[10px] cursor-pointer text-[16px] font-[700] leading-[1.2] text-[#1D1D1F]"}),(0,d.jsx)(s.xv,{onClick:()=>J(),html:m.rewardsData.title+" >",className:"mb-[10px] ml-[20px] cursor-pointer text-[16px] font-[700] leading-[1.2] text-[#1D1D1F]"})]})]})]})}),p&&(0,d.jsx)("div",{className:"fixed left-0 top-0 z-[60] flex h-[100vh] w-[100vw] flex-row items-center justify-center bg-black/80",children:(0,d.jsx)("div",{className:"relative flex items-center justify-center md:flex-col min-md:w-[calc(360/390*100vw)] min-l:w-[calc(584/768*100vw)] min-xxl:w-[calc(1104/1920*100vw)] ",children:(0,d.jsxs)("div",{className:"flex justify-center md:justify-center md:rounded-[12px] lg:mx-[92px] ",children:[(0,d.jsxs)("div",{className:"relative md:h-[calc(508/390*100vw)] md:w-[calc(360/390*100vw)] lg:w-[calc(584/768*100vw)] ",children:[(0,d.jsx)("div",{className:"overflow-hidden rounded-[12px]",children:(0,d.jsx)(o.t,{url:v?null==S?void 0:S.prizeInfo.mobImg:null==S?void 0:S.prizeInfo.img,className:x()((null==S?void 0:S.prizeInfo.type)=="code","relative")})}),(0,d.jsx)("div",{onClick:()=>{(0,_.tG)(document.body),f(!1)},role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&e.preventDefault()},children:(0,d.jsx)(o.t,{className:"absolute top-[25px] right-[25px]",url:m.closeBtn})})]}),(0,d.jsxs)("div",{className:"pointer-events-none absolute flex h-full flex-col text-center text-[#1D1D1F] vw:rounded-[20px] md:w-full md:rounded-[12px]",children:[(0,d.jsx)("div",{className:"text-[40px] font-[700] leading-[1] vw:mt-[64px] md:mt-[60px] md:text-center md:text-[28px] lg:mt-[120px]",children:O.title}),(0,d.jsx)("p",{className:"text-[32px] font-bold leading-[1.2] text-[#3ADB67] vw:mt-[16px] md:text-center md:text-[24px]",children:O.prizeName})]}),(0,d.jsxs)("div",{className:"absolute bottom-[46px] flex flex-col items-center",children:[(0,d.jsx)(s.xv,{html:null==S?void 0:S.prizeInfo.name,className:"mb-[12px] mt-[7px] flex flex-row items-center text-[24px] font-[700] leading-[1.2] text-[#1D1D1F] md:mb-[18px] md:mt-[18px] md:justify-center md:text-[26px] [&_i]:mr-[3px] [&_i]:font-extrabold [&_i]:leading-[1.3] vw:[&_i]:text-[100px] md:[&_i]:text-[60px]"}),(0,d.jsxs)("div",{className:"fton -[700] flex flex-col justify-center text-center text-[14px] leading-[1.4] text-[#3D3D3F]",children:[(0,d.jsx)(s.xv,{html:null==S?void 0:null===(i=S.prizeInfo)||void 0===i?void 0:i.note}),(0,d.jsx)(s.xv,{className:"",html:null==S?void 0:null===(c=S.prizeInfo)||void 0===c?void 0:c.note2})]}),(null==S?void 0:S.prizeResult.code)&&(0,d.jsx)(b.Z,{className:"mt-[15px] text-center font-bold leading-[1.4] text-[#6D6D6F] vw:text-[20px] md:justify-center x:text-[16
1px]",s:{codePrefix:"text-[#6D6D6F] rounded-full",code:"x:overflow-hidden text-white x:text-ellipsis text-[16px] font-[700] text-[#6D6D6F]",copy:"text-black text-[#3ADB67] text-[16px] font-[700] "},code:(null==S?void 0:S.prizeResult.code)||""})]})]})})})]})},U=e=>{let{rules:l,rules2:t}=e;return(0,d.jsxs)("div",{className:"w-[1200px] md:w-[342px]",children:[(0,d.jsx)("p",{className:"my-[40px] text-center text-[32px] font-bold leading-[1.5] text-[#1D1D1F] md:mb-[11px] md:text-[20px]",children:null==l?void 0:l.title}),(0,d.jsxs)("div",{className:"rules mt-[30px] gap-[12px] overflow-auto px-[80px] pb-[52px] text-[18px] text-[#6D6D6F] md:mt-[11px] md:px-[20px] md:pb-[20px] md:text-[14px] lg:text-[16px]",children:[null==l?void 0:l.rules.map((e,l)=>(0,d.jsxs)("div",{className:"rule flex flex-row leading-[1.3]",children:[(0,d.jsxs)("p",{className:"",children:[l+1,"."]}),(0,d.jsx)(s.xv,{className:"ml-[5px] [&_a]:underline",html:e})]},l)),(0,d.jsx)("p",{className:"mt-[12px] leading-[1.3]",children:null==t?void 0:t.title}),null==t?void 0:t.rules.map((e,l)=>(0,d.jsxs)("div",{className:"rule flex flex-row leading-[1.3]",children:[(0,d.jsxs)("p",{className:"",children:[l+1,"."]}),(0,d.jsx)(s.xv,{className:"ml-[5px] [&_a]:underline",html:e})]},l))]})]})};function L(e){let{data:l,isMobile:t}=e,{title:i,subtitle:n,list:a=[]}=l;return(0,d.jsxs)("section",{className:"mx-auto box-border flex flex-col items-center justify-center media_py-[128,128,96,96,32] md:!pt-[64px] min-l:!w-[calc(1384/1920*100vw)]",children:[(0,d.jsx)("h2",{className:"text-center font-[700] leading-[1] text-[#1D1D1F] media_text-[48,48,32,32,32] media_pb-[16,16,8,8,6] md:w-[calc(358/390*100vw)] min-md:w-[calc(584/768*100vw)] min-l:!w-[calc(1384/1920*100vw)]",children:i}),(0,d.jsx)("p",{className:"text-center font-[700] leading-[1.4] text-[#6D6D6F] media_text-[16] media_pb-[40,32] md:w-[calc(358/390*100vw)] min-md:w-[calc(584/768*100vw)] min-l:!w-[calc(1384/1920*100vw)]",children:n}),(0,d.jsx)("div",{className:"w-full overflow-x-auto overflow-y-hidden md:pl-[calc(16/390*100vw)] md-l:pl-[calc(72/768*100vw)]",style:{scrollbarWidth:"none",WebkitOverflowScrolling:"touch"},children:(0,d.jsx)("div",{className:"md-l:gap-[12px0vw)] min] flex min-h-full gap-[16px] md:gap-[calc(12/390*100vw)]",children:a.map((e,l)=>(0,d.jsxs)("div",{className:"flex-shrink-0 rounded-[16px] border border-gray-100 bg-white p-[8px] shadow-sm md:w-[calc(266/390*100vw)] min-l:min-h-[calc(562/1920*100vw)] min-l:w-[calc(334/1920*100vw)] md-l:w-[calc(274/768*100vw)]",children:[(0,d.jsx)("div",{className:"overflow-hidden rounded-[8px]",children:(0,d.jsx)(o.t,{source:"".concat(e.mobileImg," 1024, ").concat(e.desktopImg," 9999"),className:"w-full rounded-[8px] object-cover ",loading:"eager",imgClassName:"object-cover",fetchpriority:"high"})}),(0,d.jsxs)("div",{className:"md-l:px-[calc(17/768*100vw`)] flex flex-col py-[24px] px-[16px] md:px-[calc(8/390*100vw)] md:pt-[calc(20/390*100vw)] md:pb-[calc(16/390*100vw)] md-l:pt-[calc(16/768*100vw)]",children:[(0,d.jsx)(s.xv,{className:"whitespace-normal break-words text-left font-[700] text-[#1D1D1F] media_text-[24,24,20,20,20]",html:e.title}),(0,d.jsx)(s.xv,{className:"text-left font-[700] text-[#6D6D6F] media_text-[16,16,14,14,14]",html:e.subTitle})]})]},l))})})]})}var P=t(52748),B=t.n(P),O=e=>{let{data:l,isMobile:t}=e,{title:i="",subTitle:n="",items:a=[]}=l;return(0,d.jsxs)("section",{className:"mx-auto box-border md:!pt-[64px] min-l:!w-[calc(1384/1920*100vw)]",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center text-center",children:[(0,d.jsx)("h2",{className:"text-center font-[700] leading-[1] text-[#1D1D1F] media_text-[48,48,32,32,24] media_pb-[16,16,8,8,6] md:w-[calc(358/390*100vw)] min-md:w-[calc(584/768*100vw)] min-l:!w-[calc(1384/1920*100vw)]",children:i}),(0,d.jsx)("p",{className:"text-center font-[700] leading-[1.4] text-[#6D6D6F] media_text-[16] media_pb-[40,32] md:w-[calc(358/390*100vw)] min-md:w-[calc(584/768*100vw)] min-l:!w-[calc(1384/1920*100vw)]",children:n})]}),(0,d.jsx)("div",{className:"w-full overflow-x-auto overflow-y-hidden md:pl-[calc(16/390*100vw)] md-l:pl-[calc(72/768*100vw)]",style:{scrollbarWidth:"none",WebkitOverflowScrolling:"touch"},children:(0,d.jsx)("div",{className:"flex min-h-full gap-[16px] md:gap-[calc(12/390*100vw)] min-l:gap-[calc(16/1920*100vw)] md-l:gap-[12px]",children:a.map((e,l)=>(0,d.jsxs)("div",{className:"flex-shrink-0 overflow-hidden rounded-xl border border-gray-100 bg-white p-[16px] shadow-sm transition-all duration-300 hover:shadow-md md:w-[calc(266/390*100vw)] min-l
1:w-[calc(334/1920*100vw)] md-l:w-[calc(274/768*100vw)] ",children:[(0,d.jsx)("div",{className:"flex justify-center media_pb-[24,24,12,12,12]",children:(0,d.jsxs)("div",{className:"relative media_w-[300,300,262,262,242] media_h-[300,300,262,262,242]",children:[(0,d.jsx)(B(),{src:t?e.mobileImg:e.desktopImg,alt:e.label||e.title,fill:!0,className:"rounded-[12px] object-contain"}),e.label&&(0,d.jsx)("div",{className:"absolute top-0 right-0 rounded-[8px] bg-[#AEE9BD] px-[4px] text-[14px] font-[700] leading-[1.4] text-[#1D1D1F] md:text-[11px]",children:e.label})]})}),(0,d.jsx)("div",{className:"flex cursor-pointer items-center justify-center pb-[8px] text-center",children:(0,d.jsxs)("a",{href:e.url,onClick:()=>{(0,D.DU)({event:"ga4Event",event_name:"lp_button",event_parameters:{info:"",position:"discount",button_name:0===l?"luckydraw_guide":1===l?"luckydraw_printers":2===l?"luckydraw_accessories":3===l?"luckydraw_Materials":""}})},className:"text-blue-600 hover:text-blue-800 flex items-center justify-center text-sm font-medium transition-colors",children:[(0,d.jsx)("h3",{className:"font-[700] text-[#6D6D6F] media_text-[20,20,16,16,14]",children:e.title}),(0,d.jsx)("span",{children:e.linkText}),(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M9 6.69824L15 12.6982L9 18.6982",stroke:"#6D6D6F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})})]},l))})})]})},W=t(8303),Z=t(48642),G=t(69687),K=t(32355),X=t(12306),q=t(77977),V=t(90968),H=t(69317),Q=t(65294),J=t(4674),Y=t(4716),$=t(91087),ee=t(20686);let el=e=>{var l;let{rules:t}=e;return(0,d.jsx)("div",{className:"flex flex-col gap-[10px] p-[24px]",children:null===(l=t.list)||void 0===l?void 0:l.map((e,l)=>(0,d.jsx)(s.xv,{as:"p",html:e,className:"text-[18px] font-semibold leading-tight text-[#939393] x:text-[14px]"},l))})},et=e=>{let{title:l,subTitle:t,titleBgs:i,rules:n,logins:a,className:c=""}=e,{openModal:x}=(0,j.l)(),{openSignInPopup:r,openSignUpPopup:m}=(0,j.l)();if(!l)return null;let u=()=>{n&&x({title:n.title,domContent:(0,d.jsx)(el,{rules:n}),needClickAway:!1})},v="".concat(null==n?void 0:n.ruleButtonClass," cursor-pointer text-brand md:ml-0 md:text-[10px]");return(0,d.jsxs)("div",{className:"title-container items-center justify-center pt-[128px] pb-[40px] text-center lg:pt-[96px] md:pt-[64px] md:pb-[32px]",children:[(0,d.jsxs)("div",{className:"flex items-center justify-center",children:[i&&i[0]&&(0,d.jsx)(o.t,{className:"title-bg-left mr-[24px] h-[58px] flex-shrink-0 x:mr-[12px] x:h-[30px]",imgClassName:"h-full !w-auto",url:i[0].pc,mobileUrl:i[0].mobile}),(0,d.jsx)(s.X6,{as:"h3",className:"".concat(c," section-title text-center font-[700] leading-[1] text-[#1D1D1F] media_text-[48,48,32,32,24] media_pb-[16,16,8,8,6]"),html:l}),i&&i[1]&&(0,d.jsx)(o.t,{className:"title-bg-right ml-[24px] h-[58px] flex-shrink-0 x:ml-[12px] x:h-[30px]",imgClassName:"h-full !w-auto",url:i[1].pc,mobileUrl:i[1].mobile})]}),(t||(null==n?void 0:n.ruleButton)||(null==a?void 0:a.loginText))&&(0,d.jsxs)("div",{className:"mt-[6px] text-center text-[18px] font-semibold w-safes md:mt-0 md:leading-[12px]",children:[t&&(0,d.jsx)(s.xv,{html:t,className:"text-center font-[700] leading-[1.4] text-[#6D6D6F] media_text-[16] "}),(null==n?void 0:n.ruleButton)&&(0,d.jsx)("span",{className:v,onClick:u,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),u())},role:"button",tabIndex:0,children:n.ruleButton}),(null==a?void 0:a.loginText)&&(0,d.jsx)(s.xv,{html:null==a?void 0:a.loginText,className:"cursor-pointer text-[18px] !text-black underline md:text-[12px]",onClick:()=>{(null==a?void 0:a.signType)==="sign_up"?m():r()}})]})]})},ei=e=>{var l,t,i,n;let{id:c,config:m,className:u,SectionTitleComponent:v,discountMobile:p,discountPc:f,isMobileAir:h}=e,w=(0,k.L)(),b=(null===(t=w.metafields)||void 0===t?void 0:null===(l=t.common)||void 0===l?void 0:l.copywriting)||{},{data:j}=(0,H.G)({handles:m.list.map(e=>{var l;return(null==e?void 0:null===(l=e.variant)||void 0===l?void 0:l.handle)||""})||[],metafieldIdentifiers:{product:q.P,variant:V.N}}),{locale:y=""}=(0,r.useRouter)();m.list.map(e=>{var l;return(null==e?void 0:null===(l=e.variant)||void 0===l?void 0:l.sku)||""});let{isLogin:_}=(0,N.a)(),C=null===(n=w.metafields)||void 0===n?void 0:null===(i=n.discount)||void 0===i?void 0:i.member,{handle:T,common:F}=(0,g.l)(),[S,z]=(0,a.useState)(),A=(e,l)=>{if((null==m?void 0:m.productClickAction)==="modal"){var t,i,n,d;let a=m.list.find(l=>l.variant.handle===e.handle),s=null==a?void 0:null===(t=a.variant)||void 0===t?void 0:t.sku,o=(null==e?void 0:null===(i=e.variants)||void 0===i?void 0:i.find(e=>e.sku===s))||(null==e?void 0:null===(n=e.variants)||void 0===n?void 0:n[0]);z({data:(null==m?void 0:m.dialogConfig)||{},index:0,product:{...e,variants:e.variants||[],activeVariant:o,soldOut:!(null==l?void 0:l.availableForSale)||(null==l?void 0:null===(d=l.price)||void 0===d?void 0:d.amount)===Y.Ag}})}},E=(0,a.useMemo)(()=>j&&j.map(e=>{var l,t;let i=m.list.find(l=>l.variant.handle===e.handle),n=(null===(l=e.variants)||void 0===l?void 0:l.find(e=>(null==i?void 0:i.variant.sku)===e.sku))||e.variants[0];if(!n)return e;{let l=(0,X.f8)({variant:n}),{price:i}=n,d=!1;_&&(null==C?void 0:C.active)&&!(null==C?void 0:null===(t=C.excludeSkus)||void 0===t?void 0:t.includes(n.sku))&&(d=!0);let a={},s=(0,$.t)({variant:n,couponDiscount:l,scriptDiscount:d?{type:Y.Lb.percentage,discount:null==C?void 0:C.discount,excludeSkus:(null==C?void 0:C.excludeSkus)||[]}:a.discount?a:void 0}),o=l||d||a.discount?(0,Q.T4)({locale:y,amount:Number(Math.floor(null==s?void 0:s.totalSavings)),currencyCode:n.price.currencyCode,maximumFractionDigits:2}):"";return{...e,discountValue:o,oldPrice:(null==n?void 0:n.compareAtPrice)?null==n?void 0:n.compareAtPrice:i,discountCode:(null==l?void 0:l.title)||"",price:{...i,amount:s.finalPrice||i.amount}}}}),[j,_,C,y]),I=(0,r.useRouter)();return(0,a.useEffect)(()=>{var e;(0,D.DU)({event:"ga4Event",event_name:"view_item_list",event_parameters:{page_group:"Activity Page_"+T,item_list_name:"bestDeals-image-text",items:null==E?void 0:null===(e=E.filter(e=>{var l;return null==e?void 0:null===(l=e.variants)||void 0===l?void 0:l[0]}))||void 0===e?void 0:e.map((e,l)=>{let t=e.variants[0];return{item_id:t.sku,item_name:t.product.title,item_variant:t.title,price:t.price.amount,index:l+1}})}})},[E,T]),(0,d.jsxs)("div",{className:(0,K.A)("relative flex flex-col items-center pt-[0] ",u),id:c,children:[v||(0,d.jsx)(et,{className:x()("font-[600]",m.titleClass),title:m.title,subTitle:m.subTitle,titleBgs:null==m?void 0:m.titleBgs}),(0,d.jsx)("div",{className:"min-lg:h-[calc(790/1920*100vw)] flex h-full flex-col gap-[50px] md:w-[calc(358/390*100vw)] min-md:w-[calc(584/768*100vw)] min-l:!w-[calc(1384/1920*100vw)]",children:m.list.map((e,l)=>{var t,i;let n=null==j?void 0:j.find(l=>l.handle===e.variant.handle),a=null==E?void 0:E.find(l=>l.handle===e.variant.handle);return n?(0,d.jsxs)("div",{className:x()(e.reverse?"min-x:flex-row-reverse":"min-x:flex-row","min-md:h-[calc(599/390*100vw) min-h-[calc(500/1920*100vw)] lg:h-[c
1alc(704/768*100vw)]","relative flex overflow-hidden rounded-[10px] l:flex-col x:h-fit"),children:[(0,d.jsx)(o.t,{url:e.image,mobileUrl:e.mobileImage,mobileWidth:1279,className:" min-md:h-[calc(599/390*100vw) min-h-[calc(500/1920*100vw)] w-full lg:h-[calc(704/768*100vw)]",imgClassName:"h-full"}),(null==a?void 0:a.discountValue)&&(0,d.jsxs)("div",{className:x()(" left-0 top-0 flex w-[84px] items-center text-[#345D1B] md:w-[48px] min-x:hidden",null==p?void 0:p.containerClass),children:[(0,d.jsx)(o.t,{url:null==F?void 0:F.pcCouponUrl,className:"absolute left-0 top-0",imgClassName:"h-full"}),(0,d.jsxs)(s.xv,{as:"div",className:x()("relative mx-auto flex flex-col items-center pt-[14px] text-[25px] font-bold leading-[1] text-white md:pt-[12px] md:text-[13px]",null==p?void 0:p.valueClass),children:[null==a?void 0:a.discountValue,(0,d.jsx)("span",{className:x()("text-[20px] font-normal md:text-[11px]",null==p?void 0:p.offClass,"de"==y&&"text-[10px]","fr"==y&&"text-[10px] md:whitespace-nowrap md:text-[8px]"),children:b.off})]})]}),(0,d.jsxs)("div",{className:(0,K.A)("relative flex flex-shrink-0 flex-col justify-between bg-white pb-[40px] pt-[40px]","l:w-full lg:px-[32px] lg:py-[32px]","md:px-[18px] md:py-[24px]","px-[calc(64/1384*100%)]","w-[calc(600/1384*100%)]"),children:[" ",(null==m?void 0:m.productClickAction)==="modal"?(0,d.jsxs)("div",{className:"flex h-full cursor-pointer flex-col items-center justify-center",onClick:()=>{A(n,a),(0,ee.kG)({router:I,buttonName:null==n?void 0:n.title.split("|")[0],position:"imageAndText"})},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),A(n,a),(0,ee.kG)({router:I,buttonName:null==n?void 0:n.title.split("|")[0],position:"imageAndText"}))},role:"button",tabIndex:0,children:[(0,d.jsxs)("div",{className:"flex w-full flex-col justify-start text-left",children:[(0,d.jsx)(s.xv,{className:" pb-[16px] text-[32px] font-[700] leading-[1.2] text-[#1D1D1F] md:text-[14px] l:pb-[12px] l:text-[24px] ",html:null==m?void 0:m.constTitle}),(0,d.jsx)(s.xv,{className:"l:ledaing-[1.4] pb-[24px] text-[16px] font-[700] leading-[1.2] text-[#6D6D6F] md:text-[14px] ",html:null==m?void 0:m.constSubTitle})]}),(0,d.jsx)("div",{className:"flex w-full justify-start",children:a&&(0,d.jsx)(en,{index:l,productItem:{...a,buttons:(null==e?void 0:e.buttons)||void 0,subscribeLinkUrl:(null==e?void 0:e.subscribeLinkUrl)||void 0},handle:e.variant.handle,sku:e.variant.sku,title:m.title,data:m})}),(0,d.jsx)("div",{})]}):(0,d.jsxs)(W.r,{href:"/products/".concat(e.variant.handle,"?variant=").concat((0,X.Ll)((null==a?void 0:a.id)||""),"&ref=").concat(T),className:"h-full",onClick:()=>{(0,ee.kG)({router:I,buttonName:null==n?void 0:n.title.split("|")[0],position:"imageAndText"})},children:[(0,d.jsx)("div",{className:"flex h-[calc(100%-78px)] items-center justify-center",children:(0,d.jsx)(o.t,{url:(null===(t=e.variant)||void 0===t?void 0:t.image)||(null==e?void 0:e.productImg)||(null==n?void 0:null===(i=n.featuredImage)||void 0===i?void 0:i.url)||"",className:"size-[200px] x:size-[140px] mx-auto x:absolute x:-top-[55px] x:right-0",imgClassName:"h-full"})}),(0,d.jsx)("p",{className:"text-left text-[24px] font-medium x:max-w-[70%] x:text-[22px] min-x:w-[calc(100%_-_60px)]",children:null==n?void 0:n.title.split("|")[0]}),(0,d.jsx)("p",{className:"h-fit text-[14px] text-[#585858] x:h-[35px] x:max-w-[70%] x:text-[14px] x:leading-[1] x:line-clamp-2",children:null==n?void 0:n.title.split("|")[1]})]})]})]},l):null})})]})},en=e=>{var l,t,i,n;let{productItem:o,handle:c,index:m,sku:u,title:v,data:p}=e,{price:f,oldPrice:h}=o,{copywriting:w}=(null===(l=(0,k.L)().metafields)||void 0===l?void 0:l.common)||{},{handle:j,common:N}=(0,g.l)();(0,J.k)({amount:Number(null==f?void 0:f.amount),baseAmount:Number(null==h?void 0:h.amount)||Number(null==f?void 0:f.amount),currencyCode:(null==f?void 0:f.currencyCode)||"USD",soldOutDescription:null==w?void 0:w.soldOut});let y=(0,a.useMemo)(()=>!(null==o?void 0:o.availableForSale)||(null==o?void 0:o.price.amount)==Y.Ag,[o]),_=null==o?void 0:null===(t=o.variants)||void 0===t?void 0:t.find(e=>e.sku===u),C=(0,a.useMemo)(()=>"/products/".concat(c,"?variant=").concat((0,X.Ll)((null==o?void 0:o.id)||""),"&ref=").concat(j),[c,j,null==o?void 0:o.id]),T=(0,a.useMemo)(()=>(null==p?void 0:p.discount)||{},[null==p?void 0:p.discount]),F=(0,G.t)({withMember:!(null==T?void 0:T.withoutMember)}),S=(null==o?void 0:o.buttons)||(null==p?void 0:p.buttons)||["buyNow","learnMore"],z=(0,Z.t)({needOpenCart:!1}),A=(e=>{var l,t;let{metafields:i,variantId:n}=e;return(null==i?void 0:null===(t=i.__discountCodeApp)||void 0===t?void 0:null===(l=t.data)||void 0===l?void 0:l.filter(e=>{let l=String(e.variant_shopify_id)===(0,X.Ll)(n),t=(null===e.ends_at||new Date(e.ends_at).getTime()>
1new Date().getTime())&&(null===e.starts_at||new Date(e.starts_at).getTime()<=new Date().getTime());return l&&t}))||[]})({metafields:null==_?void 0:_.metafields,variantId:(null==_?void 0:_.id)||""});console.error(A,"coupons6808");let E=null==o?void 0:null===(i=o.variants)||void 0===i?void 0:i.filter(e=>e.sku===u).map(e=>{var l,t,i;return null==e?void 0:null===(i=e.metafields)||void 0===i?void 0:null===(t=i.__discountCodeApp)||void 0===t?void 0:null===(l=t.data[0])||void 0===l?void 0:l.title}).filter(Boolean);null==A||A[0];let{locale:I=""}=(0,r.useRouter)(),M=(0,$.t)({variant:_,couponDiscount:(null==A?void 0:A.length)>0?A[0]:null}),{price:R,basePrice:U}=(0,Q.w7)({locale:I,amount:null==M?void 0:M.finalPrice,baseAmount:null==M?void 0:M.comparePrice,currencyCode:(null==_?void 0:null===(n=_.price)||void 0===n?void 0:n.currencyCode)||"USD"});return console.error(R,U,"price6808"),(0,d.jsxs)("div",{className:"flex flex-col items-start justify-between x:flex-col",children:[(0,d.jsx)("div",{className:" flex w-full flex-col items-start pb-[24px] l:items-start",children:(0,d.jsx)("div",{className:"flex flex-col md:flex-row md:items-end",children:y?(0,d.jsx)("span",{className:"text-[28px] font-semibold leading-[1] md:text-[26px]",children:null==w?void 0:w.soldOut}):(0,d.jsxs)("div",{className:"flex flex-row items-end",children:[(0,d.jsx)("p",{className:"text-[28px] font-semibold leading-[1] md:text-[26px]",children:R}),(0,d.jsx)("p",{className:"ml-[5px] text-[16px] text-[#8e8e8e] line-through md:ml-[8px] md:text-[14px]",children:U})]})})}),(0,d.jsxs)("div",{className:"l-x:gap-[12px] flex w-full flex-row items-center gap-[10px] md:justify-center",children:[!y&&(0,d.jsxs)(d.Fragment,{children:[(null==S?void 0:S[0])&&(0,d.jsx)(s.zx,{loading:F.isMutating,onClick:()=>{(0,D.DU)({event:"ga4Event",event_name:"lp_button",event_parameters:{info:"",position:"offers",button_name:"luckydraw_buynow"}}),F.trigger({items:[{variant:{...o.variants.find(e=>e.sku===u)||o.variants[0],finalPrice:{amount:Number(null==f?void 0:f.amount),currencyCode:(null==f?void 0:f.currencyCode)||"USD"}},quantity:1}],discountCode:o.discountCode,gtmParams:{position:v.replace(/<br\/>/g,"")}})},className:x()(y?"pointer-events-none cursor-not-allowed !bg-black/50 !text-[#dcdcdc]":"hover:bg-brand bg-eufymake-color text-[#1D1D1F]","l-x:h-[33px] l-x:text-[16px] relative flex h-[50px] max-w-[50%] flex-1 items-center justify-center overflow-hidden rounded-full px-[28px] text-[20px] font-medium md:h-[40px] md-l:h-[44px] md-l:w-[144px]","de"===I&&"l-x:text-[14px] text-[14px]"),children:(0,d.jsx)("span",{className:"z-1 relative whitespace-nowrap font-[700]",children:null==w?void 0:w.buyNow})}),(null==S?void 0:S.includes("Add to cart"))&&(0,d.jsx)(s.zx,{className:(0,K.A)("text-brand hover:text-brand h-[50px] max-w-[50%] flex-1 rounded-full border-[#000] !bg-[#17bbef] px-0 text-[16px] font-bold hover:!bg-[#48cffa] x:h-[40px] x:text-[14px]",!S.includes("buyNow")&&"hover:bg-brand !text-white","de"===I&&"l-x:text-[14px] text-[14px]"),loading:z.isMutating,disabled:y,variant:S.includes("buyNow")?"secondary":"primary",onClick:()=>{z.trigger({variants:[{quantity:1,variant:{...o.variants.find(e=>e.sku===u)||o.variants[0],finalPrice:{amount:Number(null==f?void 0:f.amount),currencyCode:(null==f?void 0:f.currencyCode)||"USD"}}}],discountCode:o.discountCode,gtmParams:{position:null==p?void 0:p.title}})},children:y?null==w?void 0:w.soldOut:null==w?void 0:w.addToCart})]}),(null==S?void 0:S.includes("subscribe"))&&(0,d.jsx)(W.r,{href:(null==o?void 0:o.subscribeLinkUrl)||(null==p?void 0:p.subscribeLinkUrl)||C,className:(0,K.A)("bg-brand hover:bg-brand x-xl:text-[18px] flex h-[50px] max-w-[50%] flex-1 items-center justify-center rounded-full text-[20px] font-medium text-white x:h-[36px] x:text-[14px] min-x:flex-1","de"===I&&"text-[14px]"),children:null==p?void 0:p.subscribeText}),(null==S?void 0:S[1])&&(0,d.jsx)(W.r,{href:C,onClick:()=>{(0,D.DU)({event:"ga4Event",event_name:"lp_button",event_parameters:{info:"",position:"offers",button_name:"luckydraw_learnmore"}})},className:x()("text-brand hover:text-brand l-x:h-[33px] l-x:text-[16
1px] flex h-[50px] max-w-[50%] flex-1 items-center justify-center whitespace-nowrap rounded-full border-2 border-[#1D1D1F] px-[28px] text-center text-[16px] font-[700] hover:bg-white md:h-[40px] md:text-[14px] md-l:h-[44px] md-l:w-[144px] lg:text-[14px]","de"===I&&"l-x:text-[14px] !text-[14px]"),children:null==w?void 0:w.learnMore})]}),(null==E?void 0:E[0])&&(0,d.jsx)(b.Z,{className:"mt-[15px] text-center text-[12px] font-[400] leading-[1.4] text-[#999] md:justify-center l:font-[700]",s:{codePrefix:"text-[#999] rounded-full",code:"x:overflow-hidden text-white x:text-ellipsis l:font-[700] text-[12px] font-[400] text-[#999]",copy:"text-[500] text-[#1D1D1F] l:font-[700] text-[12px] "},code:(null==E?void 0:E[0])||""})]})};var ed=e=>{var l;let{component:t}=(null===(l=e.page)||void 0===l?void 0:l.metafields)||{},[i,n]=(0,a.useState)(!1),[s,o]=(0,a.useState)(!1),c=(0,a.useRef)({isMobile:i,isMobileAir:s});(0,a.useEffect)(()=>{c.current={isMobile:i,isMobileAir:s}},[i,s]);let x=()=>{let e=window.innerWidth<=768,l=window.innerWidth<=1024;e!==c.current.isMobile&&n(e),l!==c.current.isMobileAir&&o(l)};(0,a.useEffect)(()=>(x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}),[]);let r=(0,a.useMemo)(()=>{var e;return(null==t?void 0:null===(e=t._order)||void 0===e?void 0:e.map(e=>e))||[]},[null==t?void 0:t._order]),m=e=>{let l=e.split("_")[0],n=null==t?void 0:t[e];if(!n)return null;switch(l){case"lottery":return(0,d.jsx)(R,{config:n,myRewards:n.myRewards,isMobileAir:s});case"prizeDescription":return(0,d.jsx)(L,{data:n,isMobile:i});case"bigDiscountSection":return(0,d.jsx)(O,{data:n,isMobile:i});case"imageAndText":return(0,d.jsx)(ei,{id:e,config:n,isMobileAir:s},e);default:return null}},u=(0,a.useMemo)(()=>r.map(m),[r,t,i,s]);return(0,d.jsxs)("div",{className:"best-deals",children:[(null==t?void 0:t.banner)&&(0,d.jsx)(w,{data:t.banner}),(0,d.jsx)("div",{className:"bg-[#F5F5F7] pb-[128px] text-center md:pb-[64px] lg:pb-[96px] [&_#purchase]:[background:unset]",children:u})]})}},92919:function(e){e.exports={countDown:"CountDown_countDown__E3s4K",time:"CountDown_time__ExZXu",item:"CountDown_item__bvpPb",code:"CountDown_code__neuBq",unit:"CountDown_unit__UyBaP",colon:"CountDown_colon__gdybn"}}}]);
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.