1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8686],{19528:(e,t,a)=>{"use strict";a.d(t,{Bg:()=>i,RA:()=>p,aT:()=>n,m0:()=>d,ph:()=>s,sG:()=>r,un:()=>c});let r="https://apps.apple.com/us/app/crumbl-cookies/id1438166219?ls=1&mt=8",i="https://play.google.com/store/apps/details?id=crumbl.cookies",l=()=>["tmobile-tuesday-oct-2024","/off-site/","/order/off-site","/flavor-vote","/flavour-vote"].some(e=>window.location.pathname.includes(e)),n=()=>{if(l())return!1;window.location.href=r},s=()=>{if(l())return!1;window.location.href=i},c=()=>"undefined"!=typeof navigator&&(navigator.userAgent.match("iPad")||navigator.userAgent.match("iPhone")||navigator.userAgent.match("iPod")),o=/Android/i,d=()=>"undefined"!=typeof navigator&&o.test(navigator.userAgent),p=()=>{c()?n():d()&&(window.location.href="intent://order/#Intent;package=crumbl.cookies;scheme=crumbl.cookies;action=android.intent.action.VIEW;S.browser_fallback_url=https://play.google.com/store/apps/details?id=crumbl.cookies;end")}},30114:(e,t,a)=>{"use strict";a.d(t,{e:()=>h});var r=a(37876),i=a(89033),l=a(54587),n=a.n(l),s=a(48230),c=a.n(s),o=a(14232),d=a(69936),p=a(4359),u=a(19528),x=a(83941);let h=e=>{let{children:t}=e,{t:a}=(0,i.Bd)("order"),[l,s]=(0,o.useState)(!1),[h,m]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{s(!0);let e=!!(0,u.m0)(),t=!!(0,u.un)();m(e||t)},[]),l)?h?(0,r.jsx)(p.A,{onClick:()=>{(0,u.RA)()},children:t||(0,r.jsx)(d.A,{children:a("download_the_app")})}):(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(c(),{href:u.Bg,children:(0,r.jsx)(n(),{src:x.Lm.playStoreBadge,alt:"Play Store button",width:168,height:50})}),(0,r.jsx)(c(),{href:u.sG,children:(0,r.jsx)(n(),{src:x.Lm.downloadAppStore,alt:"App Store button",width:154,height:50})})]}):(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("div",{className:"w-[168px] h-[50px] bg-gray-200 rounded animate-pulse"}),(0,r.jsx)("div",{className:"w-[154px] h-[50px] bg-gray-200 rounded animate-pulse"})]})}},46980:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/giftcard/[code]",function(){return a(88022)}])},88022:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSG:()=>b,default:()=>w});var r=a(37876),i=a(89033),l=a(54587),n=a.n(l),s=a(89099),c=a(14232),o=a(16253),d=a(73604),p=a(69936),u=a(85426),x=a(4359),h=a(30114),m=a(46637),g=a(65432),f=a(76202),_=a(12099),v=a(57303),b=!0;function w(e){var t,a,l,b,w,j,y,A,N;let{code:k,giftcardImage:C,giftcardBalance:S}=e,E=(0,s.useRouter)(),P=E.query.claimToken,{t:G}=(0,i.Bd)("gifting"),{customer:I,openSignIn:O}=(0,u.L)(),{data:T,loading:B}=(0,m.sb)({code:k}),R=null==T||null==(a=T.public)||null==(t=a.giftcardOrVoucherFromCode)?void 0:t.giftcard,[L]=(0,_.nN)(f.K9T),[q,F]=(0,c.useState)(!1),[V,X]=(0,c.useState)(!1),K=async()=>{F(!0);try{await L({variables:{code:k,claimToken:P}})}catch(e){console.error("Error claiming gift card:",e)}finally{X(!0),F(!1)}};return(0,c.useEffect)(()=>{R&&!B&&P&&!q&&!V&&(null==I?void 0:I.userId)&&K()},[R,B,P,null==I?void 0:I.userId,q,V]),(0,r.jsx)(g.A,{footer:!1,cta:!1,bgPrimary:!0,overrideOpenGraphImage:null!=C?C:"",overrideOpenGraphTitle:S?"".concat((0,v.up)(S)," Crumbl Gift Card"):"Crumbl Gift Card",children:(0,r.jsx)("div",{className:"w-full flex justify-center h-full min-h-[calc(100svh-60px)] sm:min-h-[calc(100svh-80px)] bg-white sm:bg-primary max-w-9xl lg:py-[40px] lg:px-[30px] lg:gap-[40px] pb-[20px] pt-4 md:pt-[30px] px-[15px] md:pb-[40px] md:px-[30px] md:w-full",children:B?(0,r.jsx)(o.A,{}):R?(0,r.jsxs)("div",{className:"max-w-[628px] bg-white rounded-[16px] px-[0px] sm:px-[80px] py-[0px] sm:py-[40px] flex flex-col items-center h-fit gap-6",children:[(0,r.jsx)(n(),{src:"/images/v2/gift_crumbl.png",alt:"crumbl gift image",width:100,height:100}),(null==R||null==(l=R.originalOwner)?void 0:l.name)&&(0,r.jsx)(p.A,{variant:"title1",className:"text-center",children:G("gift_card_sent_by_x",{x:null==R||null==(b=R.originalOwner)?void 0:b.name})}),(0,r.jsx)(n(),{src:null==R||null==(w=R.design)?void 0:w.image,alt:"gift card image",width:500,height:500,className:"w-full h-auto rounded-[10px] border border-grey-200 max-w-[356px]"}),(0,r.jsx)(p.A,{variant:"title1",className:"text-center",children:(0,v.up)(null!=(A=null==R||null==(j=R.account)?void 0:j.balance)?A:0)}),(0,r.jsx)(h.e,{}),(0,r.jsx)(p.A,{variant:"body1",children:G("download_the_app_best_experience")}),(0,r.jsx)(d.A,{}),(0,r.jsx)(n(),{src:null!=(N=null==R||null==(y=R.qrCodeUrl)?void 0:y.url)?N:"",alt:"QR Code",width:500,height:500,className:"w-full h-auto rounded-[10px] max-w-[115px] max-h-[115px] self-center"}),(0,r.jsx)(p.A,{variant:"body1",children:G("scan_to_use_in_store")}),(0,r.jsx)(d.A,{}),!(null==I?void 0:I.userId)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.A,{onClick:()=>O({next:E.asPath}),children:G("sign_in_to_redeem")}),(0,r.jsx)(d.A,{})]}),(0,r.jsx)(p.A,{variant:"finePrint",className:"text-grey-60 text-center",children:G("gift_card_fine_print")})]}):(0,r.jsxs)("div",{className:"max-w-[628px] bg-white rounded-[16px] px-[0px] sm:px-[80px] py-[0px] sm:py-[40px] flex flex-col items-center h-fit gap-8",children:[(0,r.jsx)(n(),{src:"/images/v2/gift_crumbl.png",alt:"crumbl gift card",width:100,height:100,className:"opacity-40"}),(0,r.jsx)(p.A,{variant:"title1",className:"text-center",children:G("gift_card_not_found")}),(0,r.jsx)(p.A,{variant:"body1",className:"text-center text-grey-60",children:G("gift_card_not_found_description")}),(null==I?void 0:I.userId)?(0,r.jsx)(x.A,{onClick:()=>E.push("/account?tab=my_gift_cards"),children:G("back_to_my_gift_cards")}):(0,r.jsx)(x.A,{onClick:()=>E.push("/giftcard"),children:G("back_to_gift_cards")})]})})})}}},e=>{e.O(0,[4e3,9555,1221,5432,636,6593,8792],()=>e(e.s=46980)),_N_E=e.O()}]); 2//# sourceMappingURL=[code]-78c4de5c58cae174.js.map
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.