PageSourceSearch

https://thriftedthreads.com/cdn/shopifycloud/checkout-web/assets/c1/164ad2e3.-hfWY9cN.js

js thriftedthreads.com collected 2026-10-08 07:56:11 UTC 799,148 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["b887ec56.DzE6gwts.js","4b4bc88f.JFrEI7LU.js","2c1ab0fe.B2yRRyAW.js","app.C_W8kcQ4.js","assets/app.CcGlIMpn.css","assets/wallet-prefilled-guest-return.BJvF0-q4.css","fe885b80.D8CKOxv4.js","d0bb51ec.CiN57OqX.js","f67abd2c.Boj0gJpa.js","60a453ce.aSs2kW8G.js","e12db40c.ZpKYxNRe.js","9dba8418.BqWu-Ch9.js","a6e11e56.B6gAyllt.js","assets/AdminPreviewBar.BpHI7Zwr.css","33682ee7.Bbros4ez.js","e77d135d.Dz0RetrO.js","c610ba76.RRLogGHa.js","66338e00.D7k1ZYrh.js","28ac86c0.CtlCuSTM.js","3e6029dd.C66TQUeC.js","assets/QRCode.BZ_m5G5a.css","30074413.BMm7CBR8.js","assets/Pressable.D9SfDfsb.css","efa0389a.DgBvBH2e.js","22345fd4.CQJ0n-1P.js","assets/Choice.CrYuHUmO.css","9f57d2aa.DSqzrCrl.js","8574876b.DO_JQrVo.js","064f6ac1.CZOb24JP.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.C__a6xIj.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.Cd6g6AsB.js","assets/NumberField.CRpcZnVJ.css","39921a74.DpNP_yGV.js","assets/Switch.BS8yVgoP.css","27f09e31.9JRPaddX.js","137622f3.C92Jcg0T.js","54bf0ebb.CX8EQobY.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.CRF_7oqg.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.CAXoTPkz.js","47b970b2.B55cGlxq.js","a9fa9fda.DtwHg2w5.js","ca3e798e.j1SNghYW.js","assets/PhoneField.uZEuHncj.css","1444e6bd.m8JEnfnf.js","29034f35.C6JyczrR.js","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","413b21e2.DV0WgVem.js","2210eadb.DF0gIp_2.js","0fb2c600.CtLQgpFF.js","7ee73f43.DtddgRqM.js","2a0f03e4.DWBBqYJI.js","5ef0d995.gXIjgSI_.js","dd9b68fc.CQKKvsqq.js","adeb5fdb.r_ZerIHv.js","8498e76b.lZBs13y3.js","2255f8fa.wSOEwuVy.js","3ca8ef7e.CGmhNbCs.js","2495faa4.B5RDSEV2.js","d08a6c7d.CEvBs_8L.js","78ab3dd0.CxYXHIAF.js","d4ea2faa.BWUhdW6Q.js","13b13169.Cm2eUubL.js","cdfd59e6.DxvM3skh.js","7fc410e0.CU0zQ1ZA.js","d02f7b10.Cd_3Y8qg.js","ed9f2238.DoGJCDiA.js","33464469.rqhlJd2Z.js","b8733b27.B-ZhbwZE.js","ec391382.DK5Vlhzz.js","24773686.DbrpS9Ga.js","7724832f.Y9EtgguL.js","9655ebc9.CX4pB1Ku.js","bad03769.IWe9-g46.js","assets/DevTools.DTK7lleS.css","abd080c1.DmSv4ttW.js","2acfb1ce.CddL1Ehx.js","9d12dea3.Cj135aEl.js","b9c0319a.B2HCovnd.js","74835653.B3C9_9vV.js","4b1c22b7.BOiV_1od.js","assets/BillingAddressForm.BdwN7V1K.css","910cd6e2.DZkJplDp.js","17425706.ozCo4ACy.js","347b440c.b4pdpzx1.js","9ce08e25.q3KqAteP.js","assets/EstimatedDeliveryContent.B_THySFF.css","181d38d3.T13hkdEm.js","792bb671.B3OvVnSg.js","assets/Middot.D7Ujmshx.css","03fde911.CapGavQb.js","assets/LocalPickupReviewMethod.aM0rPpGF.css","79974aab.Du4uYIZv.js","e77f7fe0.B1UY2cg5.js","assets/PaymentLine.DT05kVlY.css","60575ca1.D_30zYzb.js","assets/DeliveryReviewMethods.DezeyHQn.css","160e80e7.CqtLTL1-.js","9e94a50b.BevpX_k4.js","17324a0b.C0LkGR88.js","b3389d5c.BeFZm6h8.js","dffdfb34.CA8WE4ll.js","1f5e7811.PrD3cLrR.js","assets/ShopPayLogo.87JMHPUK.css","c6c0cbda.AqWWc50G.js","assets/useHasViolations.BnDF3H7t.css","0e67bd3b.DYIAHGYe.js","55098bf1.OVeEjE2R.js","cb5cf153.BGCuT8HB.js","e3e348f2.CUB8gYam.js","71ae3d5c.BTocP6cf.js","cb38e5c2.6itoXFFb.js","6fb6f9d8.D5bv4loK.js","0b8657b8.-bvTvyc8.js","a422df8c.p_hgP_ap.js","assets/EmptyState.BEvzDDvy.css","7b0c98ea.DsQmemn7.js","assets/TransitionHeight.CuRoM9zv.css","d22d2b80.Bn2GBJa_.js","f49d4216.Dq3WwT1N.js","assets/VatNumberValidationField.CYhzzEkL.css","0a30a815.Cf_n7BVP.js","assets/Page.BYM12A8B.css","7e8cd205.CVODtlUD.js","5fda1420.BwaRlU2R.js","9f047e05.D-yqdheF.js","9babe369.YjVJF-bz.js","4421b714.AbCmBanQ.js","d6972375.jFp4LQIH.js","f36e5f3f.BB0m5pdO.js","assets/CalloutIcon.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","60d61386.Cc3Ws_OM.js","656fad11.CRAx1U8r.js","890247a7.B_XFkYZv.js","assets/FullScreenBackground.B_iZlQze.css","f8706cb6.BKYQh9AK.js","0e9ee714.p7sY_b4Y.js","ccdf3592.8u-hHDlt.js","71b60e0a.DfPLdYsH.js","assets/StickyPayButton.Cv62Qqkq.css","6bfea526.DhpjKDX-.js","ac5a19ff.BhdcadwW.js","cc6ff67d.C_qUEjhN.js","08a3b809.DE8GX3m3.js","d25d1b95.DkedqTWK.js","bf513f9c.BITc5iYn.js","e39bc11c.DZRk2vl_.js","7a8217fd.C2rM5fX2.js","8599b02a.C02H2K0N.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","cf29e63b.CWl11nWq.js","assets/Tipping.BcTJoNaV.css","dfca5da5.CtpsmRuf.js","dae24aab.xiAL8T3Q.js","assets/Section.CU18S7Ap.css","a25deb9a.BCJws3RR.js","01973ac7.BHLY876L.js","58314944.DeRGAACO.js","945a08d6.zhlWcV3z.js","7bc8057b.C2psJszD.js","assets/constants.xO_7ctnq.css","f1968089.B9S0NE97.js","2b89a178.FWorZmkI.js","b684bff6.YNZp59HI.js","d6447d9e.IglBvAnL.js","f51e663e.DTa726QN.js","64de7b49.BpfyYV-0.js","8e79be58.DGz48SHb.js","assets/ShippingMethodSelector.B0hio2RO.css","90e26f5f.QVrWOr6w.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","31cc568e.95lmLO5k.js","assets/ShippingLines.LcqrKXE1.css","65f3d4da.Bb3QiqCm.js","ca5e9c49.DCsOjSbY.js","f3e117aa.CW9Vq1VP.js","assets/OnePage.B-NX-U9c.css","9e3968a8.BHTTykCl.js","fc21c11a.aqndU9GV.js","e129c76e.D6dvxVQ1.js","f78726c8.90HJ76iF.js","assets/hooks.CKE1iCma.css","e477f96c.BeMbLJgj.js","0c0ad074.BoVClIit.js","assets/useShopPayButtonClassName.BrcQzLuH.css","87bfafec.CxwEzGHg.js","434e3b0a.B1BBnK_d.js","assets/PayButtonSection.CZuxzxFG.css","d2e6a587.DsEYL8br.js","assets/MobileOrderSummary.DjDhVpQB.css","74122478.DXDbusDr.js","73a9b0a0.D2P9KQKP.js","81e109b1.DOkM2TK2.js","86720dbb.C0NBtMoX.js","f692f62f.T4hOHGz4.js","assets/RedirectionNotice.DgiInWJ-.css","assets/PaymentMethodProgressionHost.BIxPaYCu.css","e0989459.bnt6Bm9T.js","assets/RememberMeSection.JBO5WNhc.css","4ea44c06.BRa-2bKX.js","0627daf2.B_oTSblM.js","dfc03c53.Dg5Pab1i.js","50130ded.DH09jAiU.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","896e8dde.qXiojVif.js","633ac094.DhijtGPP.js","24fcbaf6.DBFCdxRc.js","assets/PostPurchase.e2mo8B8q.css","090b00f0.By_QqD8y.js","assets/Processing.D4vG8dn7.css","b120ac11.DXuBKhvp.js","289b89e4.box3e9XI.js","9011490c.CPGqN9hS.js","8c0eaf27.AI3YCJ7M.js","91319467.BJ3hZi-R.js","assets/ShopPayLoginLoader.B1_neltu.css","0cd5b134.COsAZd_K.js","5c5c2e96.Ca1pzIEB.js","f5a7bb50.mEqqOsF_.js","a9ba8e86.BHbi6jR5.js","909cc5d6.YVAuXVSA.js","c57e39e6.DKzurOYx.js","be176b00.C8NX_IPD.js","17e57de1.d8zWzF56.js","assets/Map.cbVP6Hp_.css","0e4087ec.C61RjYJw.js","9f3d9f8c.BgKcLET0.js","8d3a12c3.Bdh6O0rg.js","4aab4b34.djos3AbN.js","assets/ThankYou.WROckxhR.css","01f1d1bd.BNXejKS_.js","assets/Throttle.CK6IAVuq.css","b538640d.DMi6wBw8.js","49758c58.BZmxmRcY.js","assets/RuntimeExtension.DWkDBM73.css","7fd9930c.D-t88s3f.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","39bf6084.sOhh1FwI.js","ee2bb050.C2oice07.js","assets/CryptoModalManager.CqiWenQK.css","7d468a18.BG7RHEao.js","1d52cad1.C0MQgmv6.js","7b11cac4.CDdE7eq7.js","ca8e826d.Z4Yo84Sw.js","assets/Avatar.gBkEAe_p.css","assets/AccountAvatar.CG_WOP4G.css","461aedcc.Oy7jhdu2.js","assets/ShopPayCheckout.CDRlDVu0.css","56bd1136.GDoWqLz1.js","cb8fcd45.C9-AT65l.js","8536083a.C5C5qnTL.js","assets/WalletSandbox.BoV0vp4z.css","4c290a1e.6nHpdlCi.js","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]);
2import{a2 as e,k as t,q as n,T as r,h as a,g as i,L as o,z as s,_ as l,ak as c,ao as u,u as d,b7 as p,o as m,x as h,Z as g,X as f,S as y,m as v,D as _,J as b,I as k,p as P,y as S,i as w,j as C,N as E,w as x,a9 as I,n as A,s as T,G as L,U as N,r as R,ad as M,a0 as D,t as O,aa as z,a5 as B,b8 as V,b9 as F,a1 as U,ba as q,W as j,a6 as H,H as $,a7 as Y,a8 as W,bb as G,bc as J,bd as K,be as X,az as Q,bf as Z}from"./2c1ab0fe.B2yRRyAW.js";import{b_ as ee,mw as te,cG as ne,aj as re,u as ae,c as ie,n as oe,b$ as se,v as le,mx as ce,hX as ue,bn as de,L as pe,dR as me,as as he,my as ge,en as fe,d2 as ye,cw as ve,cR as _e,gg as be,aW as ke,aV as Pe,z as Se,cO as we,cK as Ce,cJ as Ee,cP as xe,cQ as Ie,cF as Ae,mz as Te,mA as Le,mB as Ne,el as Re,mh as Me,mC as De,mD as Oe,da as ze,fx as Be,j9 as Ve,_ as Fe,au as Ue,ar as qe,mE as je,jI as He,mF as $e,mG as Ye,mH as We,dK as Ge,mI as Je,mJ as Ke,mK as Xe,dO as Qe,dN as Ze,dM as et,dL as tt,mL as nt,eA as rt,lW as at,g1 as it,mM as ot,mN as st,lX as lt,b8 as ct,bl as ut,lR as dt,fU as pt,j as mt,fV as ht,dZ as gt,mO as ft,mP as yt,ch as vt,mQ as _t,mR as bt,aO as kt,kR as Pt,s as St,o as wt,b2 as Ct,mS as Et,d$ as xt,at as It,dU as At,ag as Tt,eN as Lt,O as Nt,aP as Rt,ai as Mt,bY as Dt,bJ as Ot,gP as zt,gN as Bt,t as Vt,q as Ft,mT as Ut,mU as qt,kj as jt,c8 as Ht,mV as $t,mW as Yt,b5 as Wt,mX as Gt,mY as Jt,mZ as Kt,m_ as Xt,m$ as Qt,le as Zt,ef as en,ee as tn,iY as nn,eb as rn,n0 as an,ed as on,n1 as sn,ec as ln,N as cn,hd as un,hb as dn,aR as pn,n2 as mn,cb as hn,a6 as gn,c0 as fn,lt as yn,b9 as vn,h8 as _n,n3 as bn,a as kn,lJ as Pn,eU as Sn,W as wn,cV as Cn,mt as En,c1 as xn,hg as In,aF as An,hh as Tn,aM as Ln,n4 as Nn,n5 as Rn,n6 as Mn,kF as Dn,jY as On,mr as zn,n7 as Bn,c2 as Vn,ld as Fn,iz as Un,am as qn,fa as 
2jn,J as Hn,ah as $n,ki as Yn,dk as Wn,e7 as Gn,h as Jn,C as Kn,n8 as Xn,bL as Qn,ik as Zn,i5 as er,iF as tr,bf as nr,bb as rr,iv as ar,iy as ir,iu as or,lB as sr,fl as lr,lM as cr,lL as ur,fp as dr,fm as pr,lN as mr,m4 as hr,cZ as gr,ex as fr,I as yr,bc as vr,n9 as _r,na as br,kD as kr,nb as Pr,eg as Sr,gL as wr,nc as Cr,l4 as Er,nd as xr,ne as Ir,nf as Ar,ng as Tr,nh as Lr,ni as Nr,nj as Rr,dy as Mr,nk as Dr,nl as Or,nm as zr,nn as Br,no as Vr,np as Fr,nq as Ur,nr as qr,eR as jr,ns as Hr,nt as $r,mu as Yr,ml as Wr,B as Gr,mk as Jr,mm as Kr,nu as Xr,b7 as Qr,nv as Zr,nw as ea,nx as ta,ny as na,aJ as ra,nz as aa,jr as ia,js as oa,gy as sa,nA as la,nB as ca,jq as ua,gl as da,nC as pa,gI as ma,nD as ha,nE as ga,c7 as fa,cD as ya,ab as va,f5 as _a,f6 as ba,lw as ka,jO as Pa,f7 as Sa,ge as wa,bI as Ca,gK as Ea,gb as xa,nF as Ia,ga as Aa,ao as Ta,e5 as La,nG as Na,lY as Ra,aQ as Ma,h9 as Da,nH as Oa,nI as za,X as Ba,nJ as Va,nK as Fa,nL as Ua,nM as qa,j6 as ja,nN as Ha,g0 as $a,g2 as Ya,nO as Wa,im as Ga,nP as Ja,nQ as Ka,nR as Xa,nS as Qa,du as Za,gA as ei,m as ti,kx as ni,nT as ri,ek as ai,iT as ii,k6 as oi,c_ as si,aD as li,nU as ci,nV as ui,nW as di,cz as pi,dx as mi,fv as hi,nX as gi,w as fi,j1 as yi,hl as vi,nY as _i,nZ as bi,j5 as ki,c6 as Pi,ko as Si,jN as wi,hO as Ci,bN as Ei,x as xi,dB as Ii,dC as Ai,d0 as Ti,n_ as Li,F as Ni,n$ as Ri,l0 as Mi,o0 as Di,bd as Oi,b4 as zi,b6 as Bi,eH as Vi,y as Fi,bv as Ui,bK as qi,bt as ji,jd as Hi,o1 as $i,h_ as Yi,o2 as Wi,hs as Gi,o3 as Ji,j2 as Ki,o4 as Xi,hW as Qi,o5 as Zi,ev as eo,ck as to,ew as no,kX as ro,o6 as ao,o7 as io,o8 as oo,o9 as so,dP as lo,oa as co,dI as uo,ob as po,d6 as mo,j0 as ho,oc as go,g6 as fo,od as yo,oe as vo,d3 as _o,jx as bo,jz as ko,gB as Po,of as So,dH as wo,dS as Co,gq as Eo,dG as xo,dF as Io,og as Ao,ad as To,e4 as Lo,dT as No,oh as Ro,gJ as Mo,cy as Do,h6 as Oo,jk as zo,kS as Bo,jW as Vo,oi as Fo,oj as Uo,ok as qo,S as jo,j$ as Ho,gF as $o,ol as Yo,jL as Wo,om as Go,lv as Jo,lu as Ko,gG as Xo,gH as Qo,on as Zo,oo as es,op as ts,oq as ns,gM as rs,gc as as,dl as is,c4 as os,bg as ss,h$ as ls,l7 as cs,g9 as us,iZ as ds,j3 as ps,ae as ms,gY as hs,gO as gs,or as f
2s,os as ys,ot as vs,ou as _s,ov as bs,ow as ks,f1 as Ps,ox as Ss,oy as ws,oz as Cs,eT as Es,ha as xs,hr as Is,ac as As,lo as Ts,oA as Ls,jc as Ns,e_ as Rs,cE as Ms,U as Ds,oB as Os,bM as zs,dw as Bs,kP as Vs,jf as Fs,jg as Us,aS as qs,fF as js,j_ as Hs,oC as $s,lU as Ys,lE as Ws,eK as Gs,oD as Js,oE as Ks,oF as Xs,oG as Qs}from"./4b4bc88f.JFrEI7LU.js";import{r as Zs,w as el,C as tl,a as nl,b as rl,D as al,s as il,f as ol,c as sl,d as ll}from"./d0bb51ec.CiN57OqX.js";import{s as cl,S as ul,_ as dl,j as pl,w as ml,i as hl,c as gl,t as fl,O as yl,u as vl,v as _l,k as bl,m as kl,r as Pl,l as Sl,n as wl,o as Cl}from"./app.C_W8kcQ4.js";import{a as El,b as xl,c as Il,s as Al,h as Tl,j as Ll,I as Nl,k as Rl,e as Ml}from"./f67abd2c.Boj0gJpa.js";import{i as Dl,f as Ol,r as zl,j as Bl,k as Vl,h as Fl,l as Ul,m as ql,A as jl}from"./60a453ce.aSs2kW8G.js";import{d as Hl,i as $l,c as Yl,b as Wl}from"./e12db40c.ZpKYxNRe.js";import{i as Gl}from"./9dba8418.BqWu-Ch9.js";function Jl(e,t){e.error(t instanceof Error?t:new tl("Required checkout profile could not be loaded",{cause:t}))}async function Kl(e,t){const{data:n}=await e.staticQuery(ee,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function Xl(t,n){if(!t||e(ee,t)!==e(ee,n))throw new tl("Required checkout profile could not be loaded")}function Ql(e){return function(e,t){if(!t)return;if(void 0!==e[t])return e[t];const n=Object.keys(ne);for(let r=n.indexOf(t);r>=0;r--){const t=n[r];if(void 0!==e[t])return e[t]}}(e,te())}function Zl(e){if("object"!=typeof e||!e)return!1;let t=!1;for(const n of Object.keys(e)){if(!(n in ne))return!1;t=!0}return t}function ec(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}function tc(e){return Boolean(e.analyticsProcessingAllowed||e.marketingAllowed)}const nc=re("JourneyContext"),rc=re("JourneyProgressionContext");function ac(){const{journeyState:e,pageBeforeDetour:n,...r}=ae(nc),{router:a}=ie();return t(()=>{const t=a.currentUrl.value.normalizedPath,{plan:i,history:o,redirectTo:s}=e.value,l=i.detours.find(e=>e.route===t),c=i.greenPath.find(e=>e.route===t),u=n.value;return{...r,plan:i,currentPage:c??u,currentDetour:l,history:o,redirectTo:s,journeyState:e}})}function ic(){const e=ae(rc),{detour:t,progress:a,progressing:i,completing:o,prefetch:s,negotiate:l}=e,c=n(e=>l({identifier:Symbol("journeyNegotiation"),...e}),[l]);return r(()=>({detour:t,progress:a,progressing:i,completing:o,prefetch:s,negotiate:c}),[t,a,i,o,s,c])}function oc(e){const{checkout:{negotiator:t}}=ie(),n=oe(e);a(()=>t.listen((...e)=>n.current(...e)),[n,t])}function sc(e){const{checkout:{negotiator:t}}=ie(),n=oe(e);a(()=>t.listenBeforeNegotiation((...e)=>n.current(...e)),[n,t])}function lc({active:e=!0}={}){const{checkout:{negotiator:t}}=ie();a(()=>{if(e)return t.block()},[t,e])}const cc=["information","shipping","payment","review"];function uc(){const e=ie().checkout.latestReceipt.value;return"processed"===e?.status?e:void 0}function dc(){const e=uc(),t=ac(),a=i(!1),o=n(()=>(a.current=!0,a),[a]),s=n(()=>{if(a.current)return!0;const n="postPurchase"===t.value.currentDetour?.type;return!e||Boolean(e.redirectUrl)&&!n},[e,t]);return r(()=>({shouldPrevent:s,markAsEmitted:o}),[o,s])}function pc(e){const t=e.current.fields.taxes.peek();if(t)switch(t.status){case"available_total":return{amount:t.totalTax.amount,currencyCode:t.totalTax.currencyCode};case"available_total_included":return{amount:t.totalIncludedInTarget.amount,currencyCode:t.totalIncludedInTarget.currencyCode}}}const mc={thankYou:"c1_typ",postPurchase:"post_purchase"};function hc(e){return{CREDIT_CARD_ON_FILE:"creditCard",PAYPAL_ON_FILE:"wallet",customManualPayment:"manualPayment",deferred:"deferred",direct:"creditCard",giftCard:"redeemable",local:"local",manualPayment:"manualPayment",noop:"other",offsite:"offsite",other:"other",paymentOnDelivery:"paymentOnDelivery",redeemable:"redeemable",wallet:"wallet",walletsPlatform:"wallet",walletsPlatformPaymentMethod:"wallet",customOnsite:"customOnsite"}[e]||"other"}
2function gc(e,t,n){const r=[e.split(/(?=[A-Z])/).join("-")];return n?r.push(n):r.push(t?t.replace("_","-"):""),r.filter(e=>Boolean(e)).join("-").toLocaleLowerCase()}function fc(e){return e.checkoutSessionIdentifier}function yc(e){return e||void 0}function vc(e){return e?le(e):void 0}function _c(e){const t=e?.customerProfile;if(!t)return;const n=le(t.id),r=t.email??null,a=t.firstName??null,i=t.lastName??null,o=t.phone??null;return{id:n,email:r,firstName:a,lastName:i,ordersCount:t.ordersCount??null,phone:o}}function bc({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,a=e.current.fields.remoteMerchandiseDetails?.value,i=r?me(r.lines,a):void 0,o=function(e,t){return t?t.map(t=>{const n=de(t.variantId??void 0),r={totalAmount:xc((a=t.lineAllocations).reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),a[0]?.totalAmountAfterLineDiscounts.currencyCode)};var a;const i=t.itemPrice?t.itemPrice:{amount:0,currencyCode:e};return{cost:r,merchandise:{id:n??null,image:{src:t.image?.url??null},price:i,product:{id:de(t.productId??void 0)??null,title:t.title,untranslatedTitle:t.untranslatedTitle??null,url:t.productUrl??null,vendor:t.vendor,type:t.productType},sku:t.sku??null,title:t.subtitle??null,untranslatedTitle:t.untranslatedSubtitle??null},quantity:t.quantity}}):[]}(t.currencyCode,i),s=e.current.fields.customAttributes.value??[],l=["cartNext","abandonedCart"].includes(n.type)?n.sourceId:null;let c=0,u=0,d=t.currencyCode;return(i?.flatMap(e=>e.lineAllocations)||[]).forEach(e=>{u+=e.totalAmountAfterDiscounts.amount,c+=e.quantity,d=e.totalAmountAfterDiscounts.currencyCode}),{id:l,cost:{totalAmount:xc(u,d)},lines:o,totalQuantity:c,attributes:s}}function kc({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function Pc(e){const t=e?.purchasingCompany;if(t)return{company:{id:t.company.id,externalId:t.company.externalId??null,name:t.company.name},location:{id:t.location.id,externalId:t.location.externalId??null,name:t.location.name}}}function Sc(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function wc(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:Tc(e.targetType),title:e.title,type:Sc(e),value:Lc(e,t)}}function Cc(e){const t=[];return e.forEach(e=>{e.allocations.forEach(e=>{const n=e.discountDetails.discount;xl(n)&&t.push({amount:e.amount,discountApplication:wc(n,e.amount)})})}),t}function Ec(e){return xc(e.reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function xc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function Ic(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function Ac(e){return e.map(e=>({key:e.name,value:String(e.value)}))}function Tc(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function Lc(e,t){const n=e.value;return"FixedAmountValue"===n.typename?t:{percentage:n.percentage}}function Nc(e,t,n,r){const a=!0===r?.[e],i=n?.[e]&&!0===n[e].value,o=!0===t.current.fields[e]?.value;return a||i||o||!1}function Rc(e,t){const n=new Map;return zc(e,t).forEach(e=>{Bc(n,e),e.lineComponents.forEach(e=>Bc(n,e))}),n}function Mc(e,t,n,r,a,i=!1){const o=n?.purchaseOrder?.deliveryNext||e.current.fields.deliveryNext.value;if("filled"!==o?.status)return[];const s=e.current.fields.remoteMerchandiseDetails?.value??n?.remoteMerchandiseDetails,l=ce(o.lines,s),c=(t?.deliveryLines?.value??[]).map(e=>e.fields.deliveryMethodHandle?.value).filter(Boolean),u=l.filter(e=>"available"===e.status).map(e=>e).flatMap(e=>n?e.methods.map(t=>({method:t,availableDeliveryLine:e})):c.length>0?e.methods.filter(e=>c.includes(e.handle)).map(t=>({method:t,availableDeliveryLine:e})):[]),d=i?ue(u,({method:e})=>e.cost.amount,({method:e,availableDeliveryLine:t})=>"ONE_TIME_PURCHASE"===t.type?he(e):void 0):new Set;return u.map(({method:e,availableDeliveryLine:t},n)=>function(e,t,n){let r,a=e.cost,i=n?{...e.costAfterDiscounts,amount:0}:e.costAfterDiscounts;switch(e.methodType){case"PICK_UP":r="pickup",a=null,i=null;break;case"PICKUP_POINT":r="pickupPoint";break;case"SHIPPING":r="shipping";break;case"LOCAL":r="local";break;default:return}
2return{cost:a,costAfterDiscounts:i,description:e.description||null,handle:e.handle,title:e.title||null,type:r,...void 0===t?{}:{targetLineItems:t}}}(e,r&&a?function(e,t,{componentStableIdsByParent:n,parentStableIdByComponent:r}){const{targetMerchandiseLines:a}=e;if(!a)return;const i=new Set(a.map(e=>e.stableId)),o=[],s=new Set;return a.forEach(e=>{const a=r.get(e.stableId);if(void 0===a){const n=t.get(e.stableId);return void(void 0!==n&&o.push(n))}const l=(n.get(a)??[]).every(e=>i.has(e)),c=t.get(a);if(l&&void 0!==c)return void(s.has(a)||(o.push(c),s.add(a)));const u=t.get(e.stableId);void 0!==u&&o.push(u)}),o}(t,r,a):void 0,d.has(n))).filter(Boolean)}function Dc({negotiated:e,source:t,orderId:n,customerId:r,isFirstOrder:a,proposedParts:i,receipt:o,locale:s,shopCurrencyCode:l,marketDrivenShippingEnabled:c=!1}){const u=e.current.fields.contactInfo.value,d=vc(fc(t))??null,p=i?i.email.value:u?.email||o?.purchaseOrder?.email||null,m=i?i.phone.value:u?.phone||o?.purchaseOrder?.phone||null,h=e.current.fields.subtotalAfterMerchandiseDiscounts.value??o?.subtotalAfterMerchandiseDiscounts??null,g=e.current.fields.runningTotal.value??o?.checkoutTotal??null,f=g?.currencyCode??l??null,y=function(e,t,n){return zc(e,n).map(e=>{const n=vc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Cc(e.lineAllocations),id:n??null,quantity:e.quantity,title:e.title,variant:{id:n??null,image:{src:e.image?.url??null},price:r,product:{id:vc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:yc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:Ec(e.lineAllocations),sellingPlanAllocation:Ic(e),properties:Ac(e.properties),lineComponents:e.lineComponents.map(e=>function(e,t){const n=vc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Cc(e.lineAllocations),id:n??null,quantity:e.quantity,title:e.title,variant:{id:n??null,image:{src:e.image?.url??null},price:r,product:{id:vc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:yc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:Ec(e.lineAllocations),sellingPlanAllocation:Ic(e),properties:Ac(e.properties)}}(e,t))}})}(e,l,o),v={selectedDeliveryOptions:Mc(e,i,o,Rc(e,o),Vc(e,o),c)},_=Boolean(p)&&Nc("acceptEmailMarketing",e,i,o),b=Nc("acceptSmsMarketing",e,i,o),k=o?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let P=!1;P=o?Boolean(b):b&&Boolean(k);const S=P&&k||null,w=function(e,t){const n=e.current.fields.discountLines.value,r=(n?.lines?.length?n:void 0)??t?.discountLines;return r?.lines?.length?r.lines.reduce((e,t)=>{if(El(t)){const n=t.amount;if(!n)return e;e.push(wc(t.discount,n))}return e},[]):[]}(e,o),C=o?.totalSavings||e?.current?.fields?.totalSavings.value||null,E=pc(e)||o?.checkoutTotalTaxes||{amount:0,currencyCode:l},x=function(e,t,n,r){let a={amount:0,currencyCode:t};const i=e.current.fields.deliveryNext.value??r?.purchaseOrder?.deliveryNext;if("filled"===i?.status){const t=e.current.fields.remoteMerchandiseDetails?.value??r?.remoteMerchandiseDetails,o=ce(i.lines,t),s=[];o.forEach(e=>{if("available"===e.status){const t=e.selectedDeliveryMethodHandle;if(t){const n=e.methods.filter(e=>e.handle===t&&void 0!==e.costAfterDiscounts);s.push(...n.map(t=>({line:e,method:t})))}}});const l=n?ue(s,({method:e})=>e.cost.amount,({method:e,line:t})=>"ONE_TIME_PURCHASE"===t.type?he(e):void 0):new Set;a=s.reduce((e,{method:t},n)=>l.has(n)?e:{amount:e.amount+t.costAfterDiscounts.amount,currencyCode:t.costAfterDiscounts.currencyCode},a)}return a}(e,l,c,o),I=i?i.shippingAddress.value:e.current.fields.shippingAddress.value??o?.purchaseOrder?.shippingAddress,A={address1:I?.address1||null,address2:I?.address2||null,city:I?.city||null,country:I?.countryCode||null,countryCode:I?.countryCode||null,firstName:I?.firstName||null,lastName:I?.lastName||null,phone:I?.phone||null,province:I?.zoneCode||null,provinceCode:I?.zoneCode||null,zip:I?.postalCode||null},T=i?i.billingAddress.value:e.current.fields.billingAddress.value??o?.purchaseOrder?.billingAddress,L={address1:T?.address1||null,address2:T?.address2||null,city:T?.city||null,country:T?.countryCode||null,countryCode:T?.countryCode||null,firstName:T?.firstName||null,lastName:T?.lastName||null,phone:T?.phone||null,province:T?.zoneCode||null,provinceCode:T?.zoneCode||null,zip:T?.postalCode||null},N=function({orderId:e,customerId:t,isFirstOrder:n}){const r={id:de(t)??t??null,isFirstOrder:n??null};return{id:de(e)??e??null,customer:r}}
2({orderId:n,customerId:r,isFirstOrder:a}),R=e.current.fields.customAttributes.value,M=(R?.length?R:void 0)??o?.customAttributes??[],D=function(e,t,n){const r=e.current.fields.paymentLines.value?.lines,a=(r?.length?r:void 0)??n?.purchaseOrder?.paymentLines,i=[];return a?.forEach(e=>{if(!e.cost)return;let n=t||"",r="";switch(e.method.type){case"direct":case pe.CreditCard:r=e.method.brand||"";break;case"deferred":r=e.method.displayName||"";break;case"redeemable":n="",r=e.method.redemptionSource;break;case"giftCard":n="gift_card",r="";break;case pe.PayPal:case"bank":case"noop":case"paymentOnDelivery":case"other":case"shopWallet":r="";break;default:r=e.method.name}i.push({amount:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},gateway:n,paymentMethod:{type:hc(e.method.type),name:r}})}),i}(e,o?.paymentDetails?.paymentGateway||void 0,o),O=function(e,t,n){const r=e.current.fields.buyerIdentity.value??n?.buyerIdentity;return{country:{isoCode:r?.countryCode??null},language:{isoCode:t},market:{id:r?.market?.id??null,handle:r?.market?.handle??null}}}(e,s,o);return{buyerAcceptsEmailMarketing:_,buyerAcceptsSmsMarketing:P,attributes:M,billingAddress:L,token:d,currencyCode:f,discountApplications:w,discountsAmount:C,email:p,phone:m,lineItems:y,localization:O,order:N,delivery:v,shippingAddress:A,subtotalPrice:h,shippingLine:{price:x},smsMarketingPhone:S,totalTax:E,totalPrice:g,transactions:D}}function Oc(e){return{...e,value:"<redacted>"}}function zc(e,t){const n=e.current.fields.merchandiseLines.value,r=(n?.lines?.length?n:void 0)??t?.purchaseOrder?.merchandiseLines,a=e.current.fields.remoteMerchandiseDetails?.value??t?.remoteMerchandiseDetails;return r?.lines?.length?me(r.lines,a):[]}function Bc(e,t){const n=vc(t.variantId);void 0!==n&&e.set(t.stableId,n)}function Vc(e,t){const n=new Map,r=new Map;return zc(e,t).forEach(e=>{0!==e.lineComponents.length&&(n.set(e.stableId,e.lineComponents.map(e=>e.stableId)),e.lineComponents.forEach(t=>{r.set(t.stableId,e.stableId)}))}),{componentStableIdsByParent:n,parentStableIdByComponent:r}}const Fc={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function Uc(e){if(!(e.type in Fc))return!1;switch(e.type){case"sectionComplete":return"contact"===e.section||"deliveryAddress"===e.section;case"pageSubmit":return"shipping"===e.step;case"shippingMethodsFilled":case"shippingMethodSelected":return"onePage"===e.step}}function qc(e,t){if(Uc(e))return Dc(t)}function jc(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.buyerIdentity;return t(()=>{const e=n.value?.customerProfile;return Boolean("BusinessCustomerProfile"===e?.__typename&&e?.checkoutExperienceConfiguration?.editableShippingAddress)})}function Hc(){const[e,t]=s(!1);return l(()=>{t("undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},[]),a(()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(e.matches)};return e.addListener(n),()=>{e.removeListener(n)}},[]),e}function $c(e){return t=>`${e}${t}`}function Yc(e,t){const n=c().replace(/:/g,"");return e??t(n)}const Wc="PortalHost",Gc="data-portal-order";function Jc(e){e.setAttribute(Gc,String(performance.now()))}function Kc(e){let t=null,n=-1;for(let r=e?.firstElementChild??null;r;r=r.nextElementSibling){if("true"===r.firstElementChild?.getAttribute("data-popper-hidden"))continue;const e=Number(r.getAttribute(Gc));e>n&&(n=e,t=r)}return t}function Xc(e){const t=function(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n!==document&&(t.push(n),n=n.parentNode,n););return t.push(document),t}(e),n=Kc(document.getElementById(Wc));return t.some(e=>e instanceof Node&&n?.contains(e))}function Qc(e){if(!e)return!1;const t=Kc(document.getElementById(Wc));return t?.contains(e)??!1}function Zc(e){if(!e)return!1;const t=document.getElementById(Wc);return t?.contains(e)??!1}const eu=$c("Portal");function tu(){return d("div",{id:Wc})}function nu({children:e}){const[t,n]=s(null),r=Yc(void 0,eu);return a(()=>{const e=document.getElementById(Wc)??document.body,t=document.createElement("div");return t.setAttribute("id",r),Jc(t),e.appendChild(t),n(t),()=>{e.removeChild(t)}},[r]),t&&u(e,t)}
2class ru extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash="checkout-web-ui:sprite-load-error"}}function au(e,t){return new ru(`Failed to fetch sprite "${function(e){try{const t=new URL(e);return t.username="",t.password="",t.search="",t.hash="",t.toString()}catch{return e.split("#")[0].split("?")[0]}}(e)}": ${t}`)}function iu(e,t){return t instanceof ru?t:au(e,t instanceof Error?t.message:String(t))}const ou={errorClass:"SpriteLoadError",severity:"warning"};function su(e,t){try{return lu.ensureFetched(e)}catch(n){throw lu.reportLoadFailure(e,n,t),n}}const lu=new class{#e=new Map;#t=new Set;ensureFetched(e){const t=this.#e.get(e);if("resolved"===t?.status)return t.content;if("rejected"===t?.status)throw t.error;if("pending"===t?.status)throw t.promise;throw this.#n(e)}reportLoadFailure(e,t,n){null==n||this.#t.has(e)||(this.#t.add(e),t instanceof Promise?t.catch(t=>{n.error(iu(e,t),ou)}):n.error(iu(e,t),ou))}#n(e){const t=fetch(e).then(t=>{if(!t.ok)throw au(e,`HTTP ${t.status}`);return t.text()}).then(t=>(this.#e.set(e,{status:"resolved",content:t}),t)).catch(t=>{throw this.#e.set(e,{status:"rejected",error:iu(e,t)}),t});return this.#e.set(e,{status:"pending",promise:t}),t}},cu=["cdn.shopify.com"],uu=f(null);function du({children:e,logger:t}){const n=m([]),a=r(()=>{const e=new Set;return{logger:t,sprites:n,embed(t,r){e.has(t)||(e.add(t),n.value=[{url:t,content:r},...n.peek()])}}},[t,n]);return d(uu.Provider,{value:a,children:[e,d(pu,{sprites:n})]})}function pu({sprites:e}){return d("div",{className:"_1rnsrjf0 _1fragem6y","aria-hidden":"true",children:e.value.map(({url:e,content:t})=>d("div",{"data-sprite-url":e,dangerouslySetInnerHTML:{__html:t}},e))})}function mu({iconUrl:e,allowRelativeUrl:t}){const n=m(!1);l(()=>{n.value=!0},[n]);const r=h(uu),{spriteUrl:a,symbolId:i}=function(e){const t=e.indexOf("#");return-1===t?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}(e);if(!function(e,t){let n;try{n=new URL(e)}catch{return t}return!!t||"https:"===n.protocol&&cu.includes(n.hostname)}(a,t))return console.warn(`[SpriteLoader] Blocked icon load from untrusted URL: ${a}`),null;if(!n.value)return d("span",{"aria-hidden":"true",children:d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true"})});if(i)return d(hu,{spriteUrl:a,symbolId:i});const o=su(a,r?.logger);return d("span",{dangerouslySetInnerHTML:{__html:o},"aria-hidden":"true"})}function hu({spriteUrl:e,symbolId:t}){const n=h(uu);if(!n)throw new ge("No sprite registry available");const r=su(e,n.logger);return l(()=>{n.embed(e,r)},[n,e,r]),d("span",{"aria-hidden":"true",children:d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:d("use",{href:`#${t}`})})})}let gu=class extends g{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function fu({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return d(gu,{fallback:t,children:d(p,{fallback:t,children:d(mu,{iconUrl:e,allowRelativeUrl:n})})})}const yu=f(void 0);function vu(){return h(yu)}function _u({children:e,level:t}){const n=vu(),r=t??(n??0)+1;return d(yu.Provider,{value:r,children:e})}const bu=f({colorMix:!1,customProperties:!1,flexGap:!1});function ku({children:e}){const t=r(()=>"undefined"!=typeof CSS&&CSS.supports("color","color-mix(in srgb, red 50%, white)"),[]),n=r(()=>"undefined"==typeof window||"undefined"!=typeof CSS&&CSS.supports("color","var(--test)"),[]),a=r(()=>{if("undefined"==typeof window)return!0;if(!document.body)return!0;const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=1===e.scrollHeight;return e.parentNode?.removeChild(e),t},[]),i=r(()=>({colorMix:t,customProperties:n,flexGap:a}),[t,n,a]);return d(bu.Provider,{value:i,children:e})}const Pu=f(null);function Su({children:e}){const[t,a]=s(new Map),i=n(e=>t.get(e),[t]),o=n(e=>{a(t=>{const n=t.get(e.id);if(n&&!Object.keys(e).some(t=>n[t]!==e[t]))return t;const r=new Map(t);return r.set(e.id,{...n,...e}),r})},[]),l=n(e=>{a(t=>{const n=new Map(t);return n.delete(e),n})},[]),c=n(()=>{a(new Map)},[]),u=r(()=>({getInteraction:i,upsertInteraction:o,deleteInteraction:l,clearInteractions:c}),[c,l,i,o]);return d(Pu.Provider,{value:u,children:e})}const wu="forwarding-external-new-window-message";function Cu({external:e,native:t}){if(e&&t)return wu}const Eu=f(null),xu=f(void 0),Iu=$c("Overlay");function Au({activatorRef:e,children:t}){const n=i(new Map),a=Yc(void 0,Iu),[o,l]=s(()=>a),[c,u]=s(!1),[p,m]=s({}),h=r(()=>({activatorRef:e,overlayId:o,setOverlayId:l,attach(e,t){n.current?.set(e,t)},trigger(e,t){n.current?.get(e)?.(t)},active:c,setActive:u,activatorAttributes:p,setActivatorAttributes(e){Object.keys(e).every(t=>p[t]===e[t])||m(t=>({...t,...e}))}}),[e,o,n,c,p]);return d(xu.Provider,{value:h,children:t})}function Tu({children:e}){return d(xu.Provider,{value:void 0,children:d(Eu.Provider,{value:null,children:e})})}function Lu(){const e=h(xu);if(e)return e}const Nu=f(void 0),Ru=()=>h(Nu),Mu=()=>{const e=Ru();return r(()=>({closeOverlay(t){e?.close(t)}}),[e])};function Du({children:e}){const t=i(new Map),n=r(()=>({register(e,n){t.current.set(e,n)},unregister(e){t.current.delete(e)},close(e){t.current.get(e)?.close()}}),[t]);return d(Nu.Provider,{value:n,children:e})}const Ou=f(void 0);function zu({children:e}){const n=i({sheet:!1,modal:!1}),a=m(0),o=t(()=>a.value>0),s=r(()=>({isLocked:e=>n.current[e],lock(e){n.current[e]=!0},unlock(e){n.current[e]=!1},openModalCount:a,isModalOpen:o}),[a,o]);return d(Ou.Provider,{value:s,children:e})}function Bu(e){const t=h(Ou),[n,i]=s(!1);return a(()=>()=>{t&&n&&t.unlock(e)},[t,n,e]),r(()=>{if(!t)return;const{lock:r,unlock:a,isLocked:o}=t;return{setActive(t){i(i=>("function"==typeof t?t(i):t)?o(e)&&!n?(console.warn(`Multiple <${"modal"===e?"Modal":"Sheet"} /> components cannot be rendered at the same time`),i):o(e)?i:(r(e),!0):(n&&a(e),!1))},active:n}},[t,n,e])}function Vu(e){const t=Lu(),n=Bu(e);return r(()=>{if(!n)return;const{active:e,setActive:r}=n;return t?{...t,setActive:r,active:e}:void 0},[t,n])}
2const Fu=f(void 0);function Uu({announcementEmitter:e,children:t}){return d(Fu.Provider,{value:e,children:t})}function qu(){const e=h(Fu);if(!e)throw new ge("Missing AnnouncementContext Context ");return e}var ju="_14u2r6s0 _1fragem121";const Hu=new class{#r=new Set;#a=new Set;#i=new Map;subscribe(e){return this.#r.add(e),()=>{this.#r.delete(e),0===this.#r.size&&this.#o()}}#s(){this.#r.forEach(e=>e(Array.from(this.#a)))}#o(){this.#a.clear(),this.#i.forEach(e=>{clearTimeout(e)})}announce(e){const t=Array.from(this.#a).find(t=>t.content===e.content&&t.role===e.role);if(t){const e=this.#i.get(t);e&&clearTimeout(e),this.#i.delete(t),this.#a.delete(t)}this.#a.add(e),this.#s();const n=setTimeout(()=>{this.#i.delete(e),this.#a.delete(e),this.#s()},1e4);return this.#i.set(e,n),()=>{this.#a.delete(e),clearTimeout(n),this.#i.delete(e),this.#s()}}};function $u({content:e,role:t="status"}){return Hu.announce({content:e,role:t})}function Yu(){const[e,t]=s([]),n=e.filter(e=>"status"===e.role),r=e.filter(e=>"alert"===e.role);return a(()=>Hu.subscribe(e=>{t(e)}),[]),d(y,{children:[d("div",{role:"status",className:ju,children:n.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))}),d("div",{role:"alert",className:ju,children:r.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))})]})}var Wu="rij0560 _1fragem121";const Gu=f(null);function Ju(){const e=h(Gu);if(null==e)throw new fe("No app context available");return e}function Ku(){return h(Gu)?.animatedTextFieldLabels??!1}function Xu(){return Ju().currency}function Qu(){return Ju().translate}function Zu(){return Ju().formatNumber}function ed(){return Ju().geolocation}function td(){return Ju().locale}function nd({children:e,currency:t,embed:n,linkComponent:a,geolocation:i,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,animatedTextFieldLabels:u=!1,translate:p,formatNumber:m,announcementEmitter:h,inlineIcons:g,logger:f}){const y=r(()=>({currency:t,embed:n,formatNumber:m,geolocation:i,linkComponent:a,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,animatedTextFieldLabels:u,translate:p,inlineIcons:g,logger:f}),[t,n,p,m,a,i,o,s,l,c,u,g,f]);return d(Gu.Provider,{value:y,children:d(Uu,{announcementEmitter:h,children:d(ku,{children:d(_u,{children:d(zu,{children:d(Du,{children:d(Su,{children:[d(du,{logger:f,children:e}),d(rd,{}),d(Yu,{})]})})})})})})})}function rd(){const e=Qu();return d(y,{children:[d("div",{id:wu,"aria-hidden":!0,className:Wu,children:e("externalNewWindow")}),d("div",{id:"forwarding-new-window-message","aria-hidden":!0,className:Wu,children:e("newWindow")}),d("div",{id:"forwarding-external-message","aria-hidden":!0,className:Wu,children:e("external")})]})}function ad(e){return/\[.*?\]/.test(e)&&console.warn(`Grid template named lines are not supported. Found named lines in template: "${e}". Please use only size values without bracketed names.`),e}function id(e){return/^span\s+\d+$/.test(e)?e:"auto"}function od(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function sd(e){return ld(e)}function ld(e){if("0"===e)return 0;const t=_e(e);return void 0===t||"px"!==t.unit&&"%"!==t.unit?void 0:"%"===t.unit?`${t.number}%`:t.number}function cd(e){if("auto"===e||"string"!=typeof e)return"auto";const t=ld(e);return void 0===t?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):ve(t)??"auto"}function ud(e){return pd(e,{auto:!0,fitContent:!0})}function dd(e){return pd(e,{none:!0})}function pd(e,t){if(t?.fitContent&&"fit-content"===e)return"fitContent";if(t&&e in t&&t[e])return e;if("0"===e)return"0";const n=_e(e),r=!n||"px"!==n.unit&&"%"!==n.unit&&"ch"!==n.unit&&"em"!==n.unit&&"lh"!==n.unit&&"vh"!==n.unit?void 0:ve(e);if(void 0===r){const n=[t?.auto?"'auto'":void 0,t?.none?"'none'":void 0,t?.fitContent?"'fit-content'":void 0].filter(Boolean);console.warn(`Invalid size value '${String(e)}'. Expected a px, %, ch, em, lh or vh size${n.length>0?`, or ${n.join(", ")}`:""}.`)}return r}function md(e){return`url(${JSON.stringify(e)})`}const hd={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},gd={auto:"block",inline:"inline",block:"block",none:"none"},fd={auto:"inline",inline:"inline",block:"block",none:"none"},yd={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},vd=e=>gd[e],_d=e=>fd[e],bd=e=>hd[e],kd=e=>yd[e],Pd=f(void 0),Sd=()=>h(Pd),wd=f(!1);function Cd(){return h(wd)}const Ed=f(!1);function xd(){return h(Ed)}const Id=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowe
2st",675]]);function Ad(e,t="slow",n=!1){const[r,o]=s(!n&&e),[l,c]=s(!1),u=i(!n&&e),d=i(()=>{o(u.current),c(!1)}),p=Hc();let m="string"==typeof t?t:t.enter,h="string"==typeof t?t:t.exit;return p&&(m="none",h="none"),a(()=>{let t;e!==u.current&&(t=setTimeout(()=>{c(!0)},0)),u.current=e;const n=setTimeout(d.current,e?Id.get(m??"none"):Id.get(h??"none"));return()=>{clearTimeout(n),clearTimeout(t)}},[m,h,e]),l?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var Td={Transition:"_94sxtb1 _94sxtb0 _1fragemup _1fragemv4 _1fragemws _1fragem12q",transitionDurationVariant:{none:"_94sxtb9 _94sxtb2 _1fragem12i",faster:"_94sxtba _94sxtb3 _1fragem12c",fast:"_94sxtbb _94sxtb4 _1fragem12d",base:"_94sxtbc _94sxtb5 _1fragem12e",slow:"_94sxtbd _94sxtb6 _1fragem12f",slower:"_94sxtbe _94sxtb7 _1fragem12g",slowest:"_94sxtbf _94sxtb8 _1fragem12h"},transitionOpacity:{enter:"_94sxtbm _94sxtbg _1fragem11k",entering:"_94sxtbn _94sxtbh _1fragem11u",entered:"_94sxtbo _94sxtbi _1fragem11u",exit:"_94sxtbp _94sxtbj _1fragem11u",exiting:"_94sxtbq _94sxtbk _1fragem11k",exited:"_94sxtbr _94sxtbl _1fragem11k"}};function Ld({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:s=["height"],onTransition:l}){const c=Ad(t,o),u=i(null);a(()=>{l?.(c)},[c,l]);const p=new Map([["enter",()=>({height:0})],["entering",()=>({height:u?.current?.clientHeight})],["entered",()=>({height:"auto",overflow:"visible"})],["exit",()=>({height:u?.current?.clientHeight})],["exiting",()=>({height:0})],["exited",()=>({height:0})]]),m="exited"===c;return d("div",{id:e,style:{...s.includes("height")&&p.get(c)()},className:v(Td.Transition,Td.transitionDurationVariant[o],s.includes("opacity")&&Td.transitionOpacity[c]),hidden:m,children:d("div",{ref:u,children:m&&!n?null:r})})}const Nd=f(void 0);function Rd({children:e,openByDefault:t,openMap:n,onToggle:a,duration:i="slow",transition:o="revealBlock"}){const s=m({}),l=m(new Set),c=r(()=>({openMap:n,onToggle:a,duration:i,transition:o,openByDefault:t,activatorIdMap:s,togglableLayoutIds:l}),[n,a,i,o,t,s,l]);return d(Nd.Provider,{value:c,children:e})}function Md({layoutId:e,activatorId:t}){const n=h(Nd);if(a(()=>{if(n&&e&&t){const{activatorIdMap:r}=n;r.value[e]||(r.value={...r.value,[e]:t})}},[n,e,t]),n&&e){const{openMap:t,onToggle:r,duration:a,transition:i,openByDefault:o,activatorIdMap:s,togglableLayoutIds:l}=n,c=`${e}-transition`,u=l.value.has(e),d=(t[e]??o)||!u;return{activatorAttributes:{"aria-controls":"revealBlock"===i?c:e,"aria-expanded":d},layoutAttributes:{"aria-labelledby":s.value[e],role:"region"},toggle:()=>{r?.({...o&&Bd(Array.from(l.value)),...t,[e]:!(t[e]??o)})},setToggleable:()=>{if(!l.value.has(e)){const t=new Set(l.value);t.add(e),l.value=t}},open:d,duration:a,transition:i,transitionId:c,isToggleable:u}}}Nd.displayName="DisclosureContext";const Dd=$c("DisclosureActivator");function Od(e,t){const n=e.displayName||e.name||"Component",r=_(({id:r,toggles:a,...i},o)=>{const s=Yc(r,Dd),l=Md({layoutId:a,activatorId:s});if(l){const{setToggleable:n,activatorAttributes:r,open:a,toggle:c}=l;n();const{toggleEvent:u="onPress",setAriaExpanded:p=!0}=t||{},{onPress:m,onChange:h}=i,{"aria-expanded":g,...f}=r,y={..."onPress"===u?{onPress:()=>{c(),m?.()}}:{onChange:e=>{c(),h?.(e)}},...p?r:f};return d(e,{id:s,..."onChange"===u&&{value:a},...i,...y,ref:o})}return a&&console.warn(`${n} sets "toggles" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`),d(e,{id:r,...i,ref:o})});return r.displayName=`DisclosureActivator(${n})`,r}function zd(e){const t=_((t,n)=>{const{id:r}=t,a=Md({layoutId:r});if(a){const{open:r,duration:i,transition:o,isToggleable:s,transitionId:l,layoutAttributes:c}=a,u=d(e,{...t,...c,ref:n});return"revealBlock"===o&&s?d(Ld,{open:r,id:l,duration:i,children:u}):r?u:null}return d(e,{...t,ref:n})});return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function Bd(e=[]){return"boolean"==typeof e?{}:(Array.isArray(e)?e:[e]).reduce((e,t)=>({...e,[t]:!0}),{})}function Vd(e){return"command"===e?.type&&"clipboard"===e.kind}function Fd(e){return"command"===e?.type&&"visibility"===e.kind}function Ud(e){return"command"===e?.type&&"overlay"===e.kind}function qd(e){return"interest"===e?.type}
2function jd(){const e=h(Pu);if(null===e)throw new fe("No Interactions in context");return e}function Hd(){const{getInteraction:e}=jd();return{showOverlay:n(t=>{const n=e(t);Ud(n)?n.open():console.warn(`No overlay found for ID "${t}".`)},[e]),hideOverlay:n(t=>{const n=e(t);Ud(n)?n.close():console.warn(`No overlay found for ID "${t}".`)},[e])}}let $d="",Yd=[],Wd=0,Gd=0,Jd=[],Kd=!1;class Xd extends Error{}function Qd(){return Wd>=$d.length}function Zd(){return $d[Wd++]}function ep(e){const t=$d.substring(Gd,Wd).trim();Yd.push({type:e,text:t})}function tp(){return Qd()?lp:$d[Wd]}function np(){const e=Zd();switch(e){case cp:break;case rp:ep("LEFT_PAREN");break;case ap:ep("RIGHT_PAREN");break;case"@":{for(;!mp.has(tp());)Zd();const e=$d.substring(Gd,Wd);"@media"===e||"@container"===e?ep("MEDIA_TYPE"):Jd.push(`Invalid media type "${e}" starting at position ${Gd}.`);break}case ip:ep("COMMA");break;case sp:case op:t="=",Qd()||$d[Wd]!==t||Wd++,ep("COMPARATOR");break;case up:case dp:for(Gd++;tp()!==e;)Zd();ep("IDENTIFIER"),Zd();break;default:if(function(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}(e)){for(;!mp.has(tp());)Zd();const e=$d.substring(Gd,Wd),t=e.toLowerCase();if("and"===t||"or"===t)e!==t?Jd.push(`Keyword "${e}" is not case sensitive at position ${Gd}.`):ep("OPERATOR");else if("inline-size"===t||"block-size"===t)e!==t?Jd.push(`Property "${e}" is not case sensitive at position ${Gd}.`):ep("PROPERTY");else{if(tp()===cp)for(Zd();!pp.has(tp());)Zd();ep("IDENTIFIER")}}else Jd.push(`Unexpected character "${e}" at position ${Wd}.`)}var t}const rp="(",ap=")",ip=",",op="<",sp=">",lp="\0",cp=" ",up="'",dp='"',pp=new Set([lp,rp,ap,ip,op,sp]),mp=new Set([...pp,cp]);let hp=[],gp=0;function fp(e){for(const t of e)if(yp(t))return vp(),!0;return!1}function yp(e){return!bp()&&(Array.isArray(e)?e.includes(kp().type):kp().type===e)}function vp(){return bp()||gp++,Pp()}function _p(e,t){if(yp(e))return vp();throw new Xd(`${t}\nInstead we found this word/character: "${kp().text}"`)}function bp(){return"EOF"===hp[gp].type}function kp(){return hp[gp]}function Pp(){return hp[gp-1]}const Sp="s-default";function wp(){return{condition:Cp(),value:_p("IDENTIFIER","Expected an identifier").text}}function Cp(){_p("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=Ep();let t=null;yp("COMPARATOR")&&(t=Ep(e.operator)),_p("RIGHT_PAREN",'Expected a condition to end with a right parenthesis ")"');let n=e;if(t&&(n={type:"compound-condition",left:e,right:t,operator:"and"}),"OPERATOR"===kp().type){const e=_p("OPERATOR","Expected an operator");return{type:"compound-condition",left:n,right:Cp(),operator:e.text}}return n}function Ep(e){const t=e?Pp():_p(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=_p("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new Xd("Cannot have two different comparison operators (a less-than and a greater-than) in the same condition.");const r=_p("IDENTIFIER"===t.type?"PROPERTY":"IDENTIFIER",`Expected a ${"IDENTIFIER"===t.type?'property (like "inline-size")':'identifier (like "500px")'} to compare against.`);let a=n.text;return"IDENTIFIER"===t.type&&(a="<"===a?">":"<="===a?">=":">"===a?"<":"<="),{type:"condition",property:"PROPERTY"===t.type?t.text:r.text,operator:a,value:"PROPERTY"===t.type?r.text:t.text}}function xp(e){try{return t=function(e){if(Kd)throw Error("Cannot tokenize recursively");for(Kd=!0,$d=e,Yd=[],Wd=0,Gd=0,Jd=[];!Qd();)Gd=Wd,np();if(Gd=Wd,ep("EOF"),Kd=!1,Jd.length)throw new Xd(Jd.join("\n"));return Yd}(e),hp=t,gp=0,function(){const e={responsiveType:_p("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if("@container"===e.responsiveType){const t="IDENTIFIER"===kp().type?vp().text:Sp;e.name=t}for(e.conditionalValues.push(wp());fp(["COMMA"])&&"LEFT_PAREN"===kp().type;)e.conditionalValues.push(wp());if("COMMA"!==Pp().type)throw new Xd(`Expected a comma before the fallback value of "${kp().text}"`);if(e.fallbackValue=_p("IDENTIFIER","Expected a final fallback value to be defined").text,"EOF"!==kp().type)throw new Xd(`Expected the query to end, instead found "${kp().text}"`);return e}()}catch(n){if(n instanceof Xd)return{state:"invalid",error:n.message};throw new Error("Unknown error",{cause:n})}var t}function Ip(e){return"string"==typeof e&&e.startsWith("@container")}function Ap(e){return"string"==typeof e&&e.startsWith("@media")}function Tp(e){if(Zl(e))return e.base;if(!Ip(e)&&!Ap(e))return e;const t=xp(e);return"invalid"===t.state?void 0:t.fallbackValue}function Lp(e,t){if(e===t)return!0;
2if(Zl(e))return Object.values(e).some(e=>Lp(e,t));if(!Ip(e)&&!Ap(e))return!1;const n=xp(e);return"invalid"!==n.state&&(n.fallbackValue===t||n.conditionalValues.some(e=>e.value===t))}function Np(e,t){return Zl(e)?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])):t(e)}function Rp(e){const t=e,i=_(function(e,i){const{upsertInteraction:o,deleteInteraction:l}=jd(),{display:c}=e,u="none"===c,p=r(()=>Lp(c,"none"),[c]),[m,h]=s(),[g,f]=s(p);p!==g&&(f(p),"shown"===m&&h(void 0));const y=void 0===m?!u:"shown"===m,v="hidden"===m,_="shown"===m&&p,b=n(()=>h("hidden"),[]),k=n(()=>h(e=>"hidden"===e||p?"shown":void 0),[p]),P=n(()=>h(e=>(void 0===e?u:"shown"!==e)?"shown":"hidden"),[u]),{id:S}=e;if(a(()=>(S&&o({id:S,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:b,show:k,toggle:P,visible:y}),()=>{S&&l(S)}),[S,y,b,k,P,o,l]),S&&v)return null;const w=S&&_?{...e,display:"auto"}:e;return d(t,{...w,ref:i})});return i.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,i}function Mp(e,{overlayType:t}){const r=_(function(r,i){const{open:o}=r,{upsertInteraction:l,deleteInteraction:c}=jd(),{active:u,setActive:p}=function(e){const t=function(e){return"modal"===e||"sheet"===e?()=>{const t=Bu(e),n=s(!1);if(t)return t;const[r,a]=n;return{active:r,setActive:a}}:()=>{const[e,t]=s(!1);return{active:e,setActive:t}}}(e);return t()}(t),m=Lu(),{id:h,onClose:g,onHide:f}=r,y=n(()=>{p(!1),"function"==typeof g&&g(),"function"==typeof f&&f()},[p,g,f]),v=n(()=>{p(!0)},[p]);if(a(()=>()=>{h&&c(h)},[h]),a(()=>{h&&l({id:h,type:"command",kind:"overlay",overlayType:t,defaultCommand:"--toggle",close:y,open:v,toggle:()=>{u?y():v()},active:u})},[u,y,c,h,v,l]),h&&!m&&void 0===o){const t={setActive:p,open:u,onClose:y,onHide:y};return d(e,{...r,...t,ref:i})}return d(e,{...r,ref:i})});return r.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,r}function Dp(e){return n(t=>{"function"==typeof e?e(t):null!=e&&(e.current=t)},[e])}function Op(e,t){const r=Dp(e),a=Dp(t);return n(e=>{r(e),a(e)},[r,a])}const zp=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Bp(e,t){return zp.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Vp=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Fp(e,t){return Vp.map(n=>{return{[n]:(r=t?.[n],a=Up(n,e),function(e){const t="function"==typeof r?r(e):void 0;return a?.(e),t})};var r,a}).reduce((e,t)=>({...e,...t}),{})}function Up(e,t){return function(n){t?.trigger(e,n)}}function qp(e){const t=_(({overlay:t,...n},r)=>{const a=i(null),o=Op(r,a);return t?d(Au,{activatorRef:a,children:[d(e,{...n,ref:o}),t]}):d(e,{...n,ref:r})});return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function jp(e,{focusActivatorWhenClosing:t=!1}={}){const n=_((n,r)=>{const{id:i,onClose:o,onHide:s}=n,l=Lu(),c=Ru();return a(()=>(i&&c?.register(i,{close(){o?.(),s?.(),l?.setActive(!1),t&&l?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{i&&c?.unregister(i)}),[i,o,s,c,l]),d(e,{...n,ref:r,id:i??l?.overlayId})});return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function Hp(e){if(e)return`${e}Title`}const $p=(e,t)=>{let n=0,r=null;return function(...a){const i=Date.now();r&&(clearTimeout(r),r=null),i-n>=t&&(e.apply(this,a),n=i),r=setTimeout(()=>{e.apply(this,a),n=Date.now(),r=null},t)}},Yp=f(null);function Wp(){const e=h(Yp);if(null===e)throw new fe("No Popper in context");return e}const Gp=f({}),Jp=()=>h(Gp);function Kp(e,t){if("center"===t)return e;const n=e.startsWith("block");return`${e}Span${n?"Inline":"Block"}${"start"===t?"End":"Start"}`}function Xp(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function Qp(e,t,n){if("ltr"===n)return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};case"inlineEnd":return{position:"inlineStart",alignment:t};default:return"center"===t?{position:e,alignment:t}:{position:e,alignment:"start"===t?"end":"start"}}}function Zp(e,t,n,r,a,i,o){const s={x:0,y:0}
2,l="rtl"===o?r.right-n.width:r.left,c=i?l:r.left+r.width/2-n.width/2,u=r.top+r.height/2-n.height/2;switch(e){case"inlineStart":s.x=r.left-n.width-a,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"inlineEnd":s.x=r.right+a,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"blockStart":s.y=r.top-n.height-a,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width);break;case"blockEnd":s.y=r.bottom+a,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width)}return s}function em(e,t){const n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,a=e.x+t.width,i=e.y+t.height;let o={left:0,right:0,top:0,bottom:0};return a>n&&(o={...o,right:n-a}),e.x<0&&(o={...o,left:-e.x}),i>r&&(o={...o,bottom:i-r}),e.y<0&&(o={...o,top:-e.y}),o}const tm=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function nm(e){return tm.test(e)}function rm(e){const t=e.match(tm);if(!t)return null;const[,n,r,,a,i]=t;return{axis:n,edge:r,...a&&i?{spanAxis:a,spanEdge:i}:{}}}function am(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}var im={Popper:"xoxyfm1 xoxyfm0 _1fragem132",colorSchemeVariant:{scheme1:"xoxyfma xoxyfm2 _1fragemxx",scheme2:"xoxyfmb xoxyfm3 _1fragemxy",scheme3:"xoxyfmc xoxyfm4 _1fragemxz",scheme4:"xoxyfmd xoxyfm5 _1fragemy0",scheme5:"xoxyfme xoxyfm6 _1fragemy1",scheme6:"xoxyfmf xoxyfm7 _1fragemy2",scheme7:"xoxyfmg xoxyfm8 _1fragemy3",scheme8:"xoxyfmh xoxyfm9 _1fragemy4"},positionVariant:{absolute:"xoxyfmk xoxyfmi _1fragemwi",fixed:"xoxyfml xoxyfmj _1fragemwn"},hidden:"xoxyfmm"};function om(e){if(nm(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:Pe(t),alignment:n.includes("start")?"end":"start"}:{position:Pe(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function sm(e){return e.split(",").map(e=>e.trim()).filter(e=>!!nm(e))}function lm({activator:e,children:t,hidden:a,id:o,offset:c,minInlineSize:u,positionArea:p="block-start",positionTryFallbacks:h,preventOverflow:g,sameInlineSize:f}){const{rect:y,direction:_}=function(e){const[t,r]=s(null),a=m("ltr"),o=i([]),c=i(null),u=n(()=>{null!==e&&(a.value="rtl"===window.getComputedStyle(e).direction?"rtl":"ltr",r(e.getBoundingClientRect()))},[e,a]);return l(()=>{u();const t=$p(u,16);c.current=t,window.addEventListener("resize",u),window.addEventListener("scroll",t);for(const e of o.current)e.removeEventListener("scroll",t);const n=e?function(e){const t=[];let n=e.parentElement;for(;n;){const{overflow:e,overflowX:r,overflowY:a}=getComputedStyle(n);(/(auto|scroll|overlay)/.test(e)||/(auto|scroll|overlay)/.test(r)||/(auto|scroll|overlay)/.test(a))&&t.push(n),n=n.parentElement}return t}(e):[];o.current=n;for(const e of n)e.addEventListener("scroll",t);return()=>{window.removeEventListener("resize",u),window.removeEventListener("scroll",t);for(const e of n)e.removeEventListener("scroll",t);o.current=[],c.current=null}},[e,u]),{rect:t,direction:a.value}}(e),[b,k]=function(){const[e,t]=s(null),r=i(null),a=n(e=>{if(r.current?.disconnect(),r.current=null,null!==e&&(t(e.getBoundingClientRect()),"undefined"!=typeof ResizeObserver)){const n=new ResizeObserver(()=>{t(e.getBoundingClientRect())});n.observe(e),r.current=n}},[]);return l(()=>()=>{r.current?.disconnect()},[]),[e,a]}(),P=i(null),S=n(e=>{k(e),P.current=e},[k]),[w,C]=s(""),{current:E,parent:x}=Jp(),I=m("absolute"),{position:A,alignment:T}=om(p),L=r(()=>{if("none"!==h)return h??function(e){const t=function(e){const t=rm(e);return t?am({...t,edge:"start"===t.edge?"end":"start"}):e}(e),n=function(e){const t=rm(e);if(!t)return[];const n="block"===t.axis?"inline":"block",r=t.spanAxis&&t.spanEdge?{spanAxis:"inline"===t.spanAxis?"block":"inline",spanEdge:t.spanEdge}:{};return[am({axis:n,edge:"start",...r}),am({axis:n,edge:"end",...r})]}(e);return[t,...n].join(", ")}(p)},[h,p]),{clipping:N,offsets:R,spacing:M,resolvedPosition:D,resolvedAlignment:O}=r(()=>function(e,t,n,r,{offset:a=0,preventOverflow:i=!1,sameInlineSize:o=!1,direction:s="ltr",fallbackPositions:l}={}){const{position:c,alignment:u}=Qp(e,t,s),d=l?.map(({position:e,alignment:t})=>Qp(e,t,s)),p={x:0,y:0};let m={left:0,right:0,top:0,bottom:0},h=0,g=c,f=u;if(!n||!r)return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f};const y=Zp(c,u,n,r,a,o,s);if(p.x=y.x,p.y=y.y,i){if(m=em(p,n),function(e,t){const n=0!==t.top||0!==t.bottom,r=0!==t.left||0!==t.right;return"blockStart"===e||"blockEnd"===e?n:n||r}(c,m)&&d?.length){const e=Xp(m);for(const t of d){const e=Zp(t.position,t.alignment,n,r,a,o,s),i=em(e,n);if(0===Xp(i)){p.x=e.x,p.y=e.y,m=i,g=t.position,f=t.alignment;break}}if(Xp(m)>0){let t=e;for(const e of d){const i=Zp(e.position,e.alignment,n,r,a,o,s),l=em(i,n),c=Xp(l);c<t&&(t=c,p.x=i.x,p.y=i.y,m=l,g=e.position,f=e.alignment)}}}m.right&&!m.left&&(p.x+=m.right,h=-10),!m.right&&m.left&&(p.x=0,h=10)}return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f}}(A,T,b,y,{direction:_,offset:c,preventOverflow:g,sameInlineSize:f,fallbackPositions:L?sm(L).map(om):void 0}),[_,c,A,T,b,g,y,f,L]),z=r(()=>({clipping:N,offsets:R,position:D,alignment:O,popperRect:b,referenceRect:y,spacing:M}),[N,R,D,O,b,y,M]);return l(()=>{const t=e&&function(e){let t=e.parentElement;for(;t&&t!==document.body;){const{position:e}=getComputedStyle(t);if("fixed"===e||"sticky"===e)return!0;t=t.parentElement}return!1}(e)?"fixed":"absolute";I.value=t;const n="absolute"===t?window.scrollX||window.pageXOffset:0,r="absolute"===t&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:a,y:i}=function({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}({x:R.x+M+n,y:R.y+r});C((window.devicePixelRatio||1)<2?`translate(${a}px, ${i}px)`:`translate3d(${a}px, ${i}px, 0)`)},[R.x,R.y,M,e]),l(()=>{if(a)return;const e=P.current?.parentElement;e&&Jc(e)}
2,[a]),d(Yp.Provider,{value:z,children:d(nu,{children:d("div",{className:v(im.Popper,im.positionVariant[I.value],(x??E)&&im.colorSchemeVariant[x??E],a&&im.hidden),style:{...y&&{transform:w,...f&&{width:y.width},...u&&{minWidth:ke(u)}}},ref:S,id:o,"aria-hidden":a||void 0,"data-popper-hidden":a||void 0,children:x&&E?d("div",{className:im.colorSchemeVariant[E],children:t}):t})})})}var cm={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inlineEnd:"by0ptki"},Tooltip:"by0ptk8 by0ptk7 _1fragempp _1fragemri _1fragemnw _1fragemtb _1fragem6e _1fragem11k _1fragemws _1fragemyt _1fragem124 _1fragemy5",tooltipPositionVariant:{blockStart:"by0ptk9",blockEnd:"by0ptka",inlineStart:"by0ptkb",inlineEnd:"by0ptkc"},tooltipTransitionVariant:{entered:"by0ptk0",exit:"by0ptk1",exiting:"by0ptk2",enter:"by0ptk3",entering:"by0ptk4",exited:"by0ptk5"}};function um(e){const{children:t,id:r}=e,o=i(!1),s=Lu(),{active:l=!1,setActive:c}=s??{},u=n(e=>{["Escape","Esc"].includes(e.key)&&l&&(e.preventDefault(),c?.(!1))},[l,c]);return a(()=>{if(s&&l)return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[s,l,u]),s?(s?.attach("onMouseEnter",()=>{o.current||c?.(!0)}),s?.attach("onMouseLeave",()=>{c?.(!1)}),s?.attach("onTouchStart",()=>{o.current=!0}),s?.attach("onClick",()=>{c?.(!l)}),d(y,{children:[l&&d("div",{role:"tooltip",className:Se({screenReaders:"only"}),children:t}),d(dm,{id:r,open:l,onMouseEnter:()=>{o.current||c?.(!0)},onMouseLeave:()=>{c?.(!1)},children:t})]})):d(dm,{...e})}const dm=jp(function(e){const t=_(function(t,r){const{id:o,open:l}=t,{upsertInteraction:c,deleteInteraction:u}=jd(),[p,m]=s(!1),h=i(),g=n(()=>{h.current&&(clearTimeout(h.current),h.current=void 0)},[]),f=n(({delay:e=0}={})=>{g(),e>0?h.current=setTimeout(()=>m(!1),e):m(!1)},[g]),y=n(()=>{g(),m(!0)},[g]);return a(()=>()=>{g(),o&&u(o)},[o]),a(()=>{o&&c({id:o,type:"interest",hide:f,show:y,active:p})},[p,f,o,y,c]),d(e,o&&void 0===l?{...t,open:p,ref:r}:{...t,ref:r})});return t.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,t}(function({children:e,id:t,open:n,onMouseEnter:r,onMouseLeave:a}){const{getInteraction:i}=jd(),o=t?i(t):void 0,s=Lu(),{active:l=!1}=s??{};s?.setActivatorAttributes({"aria-controls":l?t:void 0,"aria-expanded":l});const c=o?.invokerRef?.current||s?.activatorRef.current||null,u=Ad(Boolean(n),{exit:"base"}),p=Boolean(t&&qd(o)&&!s),m=p?d("div",{id:t,role:"tooltip","aria-hidden":"true",className:Se({screenReaders:"only"}),children:e}):null;return d(y,{children:[m,"exited"!==u&&d(lm,{activator:c,preventOverflow:!0,offset:8,children:d(pm,{id:p?void 0:t,transition:u,onMouseEnter:()=>{qd(o)&&o.show(),r?.()},onMouseLeave:()=>{qd(o)&&o.hide({delay:100}),a?.()},children:e})})]})}));function pm({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:a}){const{clipping:i,spacing:o,position:s}=Wp(),l="blockStart"===s||"blockEnd"===s,c=i.right||i.left,u=l&&c?b({[cm.arrowNudge]:`${c+o}px`}):void 0,p=v(cm.Tooltip,cm.tooltipPositionVariant[s],cm.tooltipTransitionVariant[a]);return d("div",{id:t,role:"tooltip","aria-hidden":void 0===t||void 0,onMouseEnter:n,onMouseLeave:r,className:p,style:u,children:[e,d(mm,{})]})}function mm(){const{position:e}=Wp();return d("div",{className:v(cm.Arrow,cm.arrowPositionVariant[e])})}async function hm(e){if(navigator.clipboard?.writeText)try{return void(await navigator.clipboard.writeText(e))}catch(r){console.warn("navigator.clipboard API failed, trying fallback method",r)}if(void 0===document.execCommand)throw new fe("Browser does not support copy to clipboard");let t=!1;const n=document.createElement("textarea");if(n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),t=document.execCommand("copy"),document.body.removeChild(n),!t)throw new fe("Failed to copy text to clipboard")}const gm=$c("CommandInvoker");function fm(e,{commands:{clipboard:t=!0,visibility:r=!0,overlay:o=!0}={}}={}){const l=e.displayName||e.name||"Component",c=_(function({command:t,commandFor:r,onClick:o,overlay:l,...c},u){const{getInteraction:p}=jd(),[m,h]=s(!1),[g,f]=s(""),y=Qu(),v=r?p(r):void 0,_=Vd(v)&&null!=v.clipboard.text?v:void 0,b=n(async()=>{o?.();const{text:e,onCopy:t,onCopyError:n}=_.clipboard;let r=!1;try{await hm(e),r=!0}catch(a){console.warn("ClipboardItem: failed to copy text to clipboard",a)}finally{if(r){const e=y("clipboardCopied");f(e),h(!0),$u({content:e}),t?.()}else{const e=y("clipboardFailedToCopy");f(e),h(!0),$u({content:e}),n?.()}P(),k.current=setTimeout(()=>{h(!1)},2500)}},[o,_,y]),k=i(),P=()=>{k.current&&clearTimeout(k.current)};return a(()=>()=>P(),[]),d(e,{...c,command:t,commandFor:r,onClick:_?b:o,overlay:_?d(dm,{open:m,children:g}):l,ref:u})}),u=_(function({commandFor:t,id:n,onClick:r,...a},i){const o=Yc(n,gm),s=Md({layoutId:t,activatorId:o});if(s){const{setToggleable:t,activatorAttributes:n,toggle:l}=s;t();const c={onClick:()=>{l(),r?.()},...n};return d(e,{...a,id:o,...c,ref:i})}return t&&console.warn(`${l} sets "command" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`),d(e,{...a,id:n,ref:i}
2)}),p=_(function({command:t,commandFor:r,id:a,onClick:o,...s},l){const c=Yc(a,gm),{getInteraction:u,upsertInteraction:p}=jd(),m=r?u(r):void 0,h=i(null),g=Op(l,h),f=n(e=>{const t=r?u(r):void 0;if(Ud(t)){const{overlayType:n}=t;h.current&&"popover"===n&&e&&p({...t,invokerRef:h})}},[r,u,p]);if(m){let n={};if(Fd(m)){const{hide:e,show:a,toggle:i,visible:s}=m;n={onClick:()=>{switch(t){case"--hide":e();break;case"--show":a();break;case"--toggle":i()}o?.()},"aria-controls":r,"aria-expanded":s}}else if(Ud(m)){const{active:e,close:a,open:i,overlayType:s,toggle:l}=m;n={onClick:()=>{var n;switch(("--show"===t||"--toggle"===t&&!e)&&(n=h.current)instanceof HTMLElement&&document.activeElement!==n&&n.focus({preventScroll:!0}),t){case"--hide":a();break;case"--show":i();break;case"--toggle":l()}f(!e),o?.()},...("modal"===s||"sheet"===s)&&{"aria-haspopup":"dialog"},..."popover"===s&&{"aria-controls":r,"aria-expanded":e}}}return d(e,{...s,command:t,commandFor:r,id:c,...n,ref:g})}return null}),m=_(function({command:n="--auto",commandFor:a,...i},s){const{getInteraction:m}=jd();if(Md({layoutId:a})&&("--hide"===n||"--show"===n||"--toggle"===n))return d(u,{...i,command:n,commandFor:a,ref:s});const h=a?m(a):void 0;if(h&&!qd(h)){const{defaultCommand:e}=h,u="--auto"===n?e:n;if("--copy"===u&&t&&Vd(h))return d(c,{...i,command:u,commandFor:a,ref:s});if(("--hide"===u||"--show"===u||"--toggle"===u)&&(r&&Fd(h)||o&&Ud(h)))return d(p,{...i,command:u,commandFor:a,ref:s});if("--show"===u||"--hide"===u||"--toggle"===u||"--copy"===u){let e;Vd(h)?e="clipboard":Fd(h)?e="visibility":Ud(h)&&(e="overlay"),console.warn(`Command "${n}" targets "${a}" but ${l} does not support ${e} commands.`)}else console.warn(`Unknown command "${n}" for ${l}`)}return d(e,{...i,command:n,commandFor:a,ref:s})});return m.displayName=`CommandInvokerComponent(${l})`,m}function ym(e,{tapToggles:t=!1}={}){const r=e.displayName||e.name||"Component",o=_(function({interestFor:r,...o},s){const{onBlur:l,onClick:c,onFocus:u,onMouseEnter:p,onMouseLeave:m}=o,{getInteraction:h,upsertInteraction:g}=jd(),f=r?h(r):void 0,y=i(null),v=i(),_=i(),b=n(e=>{if(_.current?.(),_.current=void 0,!(e instanceof HTMLElement))return;const t=e=>{v.current=e.pointerType};e.addEventListener("pointerenter",t),_.current=()=>{e.removeEventListener("pointerenter",t)}},[]),k=Op(s,y),P=Op(k,b),S=n(e=>{const t=r?h(r):void 0;qd(t)&&g(e?{...t,invokerRef:y}:{...t,invokerRef:void 0})},[r,h,g]),w=qd(f)&&f.active,C=n(e=>{["Escape","Esc"].includes(e.key)&&qd(f)&&(e.preventDefault(),f.hide(),S(!1))},[f,S]);a(()=>{if(w)return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[w,C]);const E=n(e=>{const t=e.target;t instanceof Node&&!y.current?.contains(t)&&(t instanceof Element&&t.closest('[role="tooltip"]')||qd(f)&&(f.hide(),S(!1)))},[f,S]);if(a(()=>{if(t&&w)return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}},[w,E]),qd(f)){const n={"aria-describedby":r,onFocus:()=>{("touch"!==v.current||function(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}(y.current))&&(f.show(),S(!0)),u?.()},onBlur:()=>{f.hide(),S(!1),l?.()},onMouseLeave:()=>{f.hide({delay:100}),S(!1),m?.()},onMouseEnter:()=>{"touch"!==v.current&&(f.show(),S(!0)),p?.()},...t&&{onClick:()=>{"touch"===v.current&&(f.active?(f.hide(),S(!1)):(f.show(),S(!0))),c?.()}}};return d(e,{...o,...n,ref:P})}return d(e,{...o,ref:s})});return o.displayName=`InterestInvokerComponent(${r})`,o}const vm=Object.fromEntries(Object.entries({alignSelf:"auto",backgroundColor:"transparent",blockSize:"auto",borderRadius:"none",borderStyle:"none",inlineSize:"auto",maxBlockSize:"none",maxInlineSize:"none",minBlockSize:"0",minInlineSize:"0",padding:"none",placeContent:"normal",placeItems:"normal"}).flatMap(([e,t])=>we(e)?.map(e=>[e,t])??[[e,t]])),_m={none:"none","small-500":"small500","small-400":"small400","small-300":"small300","small-200":"small200","small-100":"small100",small:"small100",base:"base",large:"large100","large-100":"large100","large-200":"large200","large-300":"large300","large-400":"large400","large-500":"large500","large-600":"large600"},bm={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},km={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},Pm={auto:"auto",hidden:"hidden"},Sm={alignContent:{...bm},placeContent:{...bm},alignItems:{...km},alignSelf:{auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},placeItems:{...km}
2,backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:{base:"base",transparent:"transparent",subdued:"subdued"},borderRadius:{none:"none","small-100":"small",small:"small",base:"base",large:"large","large-100":"large",max:"max",fullyRounded:"fullyRounded"},borderWidth:{none:"none",base:"base",large:"large100","large-100":"large100","large-200":"large200"},borderStyle:{none:"none",dotted:"dotted",dashed:"dashed",solid:"base",auto:"base"},borderColor:{base:"base"},display:{inline:"inline",block:"block",flex:"flex",inlineBlock:"inlineBlock",inlineFlex:"inlineFlex",grid:"grid",inlineGrid:"inlineGrid",none:"none"},flexDirection:{column:"column",row:"row"},flexWrap:{wrap:"wrap",nowrap:"nowrap"},gridAutoFlow:{row:"row",column:"column"},justifyContent:{...bm},justifyItems:{...km},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...Pm},overflowBlock:{...Pm},overflowInline:{...Pm},padding:{..._m},paddingBlock:{..._m},paddingInline:{..._m},paddingBlockStart:{..._m},paddingBlockEnd:{..._m},paddingInlineStart:{..._m},paddingInlineEnd:{..._m},gap:{..._m},rowGap:{..._m},columnGap:{..._m},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},wm={borderRadius:{limit:4},borderStyle:{limit:4},borderWidth:{limit:4},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:4},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},Cm={backgroundImage:md,blockSize:ud,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:id,gridRow:id,gridTemplateColumns:ad,gridTemplateRows:ad,inlineSize:ud,insetBlock:cd,insetBlockEnd:cd,insetBlockStart:cd,insetInline:cd,insetInlineEnd:cd,insetInlineStart:cd,maxBlockSize:dd,maxInlineSize:dd,minBlockSize:pd,minInlineSize:pd,transform:function(e){if("none"===e)return"none";if("string"!=typeof e||!e.startsWith("translate(")||!e.endsWith(")"))return od(e);const t=e.slice(10,-1).split(",");if(t.length>2)return od(e);const n=sd(t[0].trim()),r=2===t.length?sd(t[1].trim()):0;return void 0===n||void 0===r?od(e):`translateX(calc(${ve(n)} * ${ye.global.transformDirectionModifier})) translateY(${ve(r)})`}},Em=/\s+/;function xm(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[u,d]of Object.entries(e)){if(void 0===d||""===d)continue;const e=u in wm?Im(d,u):d;void 0!==e&&(r[u]=e)}const a=n?function(e){const t={};for(const[n,r]of Object.entries(e))n in vm&&r===vm[n]||(t[n]=r);return t}(Am(r,t)):Am(r,t),i=Nm(a,Cm),o=Nm(a,Sm),s=Se(i),{className:l,style:c}=Ce(o);return{className:v(s,l),style:c}}function Im(e,t){const{limit:n}=wm[t];return Np(e,e=>{if(void 0===e||"string"!=typeof e)return;const t=e.trim().split(Em,n??4);return 1===t.length?t[0]:(3===t.length&&t.push(t[1]),t)})}function Am(e,t){const n={},r=(e,r)=>{const a=function(e,t){return function(e){return e.property in Cm}(e)?function(e,t,n){const r=n?.transforms?.[e]??Cm[e];return Np(t,e=>{if(void 0!==e)return Ie(e)?Lm(e.map(e=>r?.(e))):r?.(e)})}(e.property,e.value,t):function(e){return e.property in Sm}(e)?function(e,t,n){const r=Sm[e],a=t=>{const a=n?.transforms?.[e]?.(t);return r[a??t]};return Np(t,e=>Ie(e)?Lm(e.map(a)):a(e))}(e.property,e.value,t):void 0}({property:e,value:r},t),i=function(e,t){const n=we(e);if(!n||0===n.length)return{[e]:t};if(Zl(t)){const e=Object.entries(t),r={};for(let t=0;t<n.length;t++){const a=n[t],i={};for(const[n,r]of e)i[n]=xe(r)?r[t]:r;r[a]=i}return r}const r=xe(t),a={};for(let i=0;i<n.length;i++)a[n[i]]=r?t[i]:t;return a}(e,a);for(const[t,o]of Object.entries(i)){const e=Tm(o);if(void 0===e)continue;const r=n[t];if(Zl(e)&&void 0!==r){const a=Zl(r)?r:{base:r};n[t]={...a,...e}}else n[t]=e}};for(const a of Ee)a in e&&r(a,e[a]);for(const[a,i]of Object.entries(e))Ee.includes(a)||r(a,i);return n}function Tm(e){if(!Zl(e))return e;const t=Object.entries(e).filter(([,e])=>void 0!==e&&""!==e);return t.length>0?Object.fromEntries(t):void 0}function Lm(e){if(!Array.isArray(e)||2!==e.length)return e;const[t,n]=e;return[t,n,t,n]}function Nm(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const Rm=Object.keys(ne).filter(e=>"base"!==e),Mm=new Set([">",">="]),Dm=new Set(["<","<="]);
2function Om(e){return"inline-size"===e}function zm(e){if("invalid"===e.state)return e;function t(e){return!!Om(e)||(console.warn(`Container queries should be based on the inline dimensions of the container. Use 'inline-size' instead of '${e}'.`),!1)}function n(e){return"compound-condition"===e.type?!("condition"===e.left.type&&!t(e.left.property)||"condition"===e.right.type&&!t(e.right.property))&&(function(e){if("and"!==e.operator)return!1;if("condition"!==e.left.type||"condition"!==e.right.type)return!1;if(e.left.property!==e.right.property)return!1;const t=e.left,n=e.right,r=parseFloat(t.value),a=parseFloat(n.value),i=Mm.has(t.operator),o=Mm.has(n.operator),s=Dm.has(t.operator),l=Dm.has(n.operator);return!!(i&&l||s&&o)&&(i?r:a)<(s?r:a)}(e)?function(e){const t=e.left,n=e.right,r=Mm.has(t.operator),a=Mm.has(n.operator),i=Dm.has(t.operator),o=Dm.has(n.operator);let s;if(r&&o)s=t;else{if(!i||!a)return console.warn("Invalid range query structure. Expected one lower bound and one upper bound."),!1;s=n}return!!Mm.has(s.operator)||(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>=' operators. Found '${s.operator}' in condition '${s.property} ${s.operator} ${s.value}'. Use '>' or '>=' instead.`),!1)}(e):n(e.left)&&n(e.right)):!("condition"!==e.type||!t(e.property)||!Mm.has(e.operator)&&(console.warn(`Mobile-first approach requires '>' or '>=' operators. Found '${e.operator}' in condition '${e.property} ${e.operator} ${e.value}'. Use '>' or '>=' instead.`),1))}return e.conditionalValues.every(e=>n(e.condition))?e:{state:"invalid",error:"Expected a mobile-first responsive query, instead found one that does not follow mobile-first principles."}}function Bm(e,t){if("invalid"===e.state)return e;const n=t?` for property '${t}'`:"";function r(e){return"compound-condition"===e.type?r(e.left)&&r(e.right):"condition"===e.type&&!(!Om(o=e.property)&&(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${o}'.`),1)||(i=e.value,!Rm.includes(i)&&("base"===i?console.warn(`Media queries should use valid breakpoints${n}. Found 'base' (use 'base' only as fallback, minimum condition is 'extraSmall'). Use one of '${Rm.join("', '")}' instead.`):console.warn(`Media queries should use valid breakpoints${n}. Found '${i}'. Use one of '${Rm.join("', '")}' instead.`),1))||(t=e.operator,a=e.value,">="!==t&&(console.warn(`Media queries should use '>=' operator${n}. Found '${t}' (expected '>=' for breakpoint '${a}').`),1)));var t,a,i,o}return e.conditionalValues.every(e=>r(e.condition))?e:{state:"invalid",error:"Expected a valid media query with breakpoint conditions, instead found invalid property, breakpoints, or operators."}}const Vm=$c("ContainerQueryStyle");function Fm({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:a,style:i}=xm({[t]:n},r);if(!a)return null;const o=function(e){if(Um.has(e))return Um.get(e)||null;if("undefined"==typeof document)return null;const t=e.split(" ").filter(Boolean);if(0===t.length)return null;const n=[];for(const a of Array.from(document.styleSheets))try{const e=a.cssRules||a.rules;for(const r of Array.from(e))if(r instanceof CSSStyleRule)for(const e of t)new RegExp(`\\.${e}(?![\\w-])`).test(r.selectorText)&&n.push(r.cssText)}catch{continue}const r=n.length>0?n.join("\n"):null;return Um.set(e,r),r}(a);if(!o)return null;const s=function(e,t,n){const r=e.split("\n"),a=[];for(const i of r){const e=i.match(/^([^{]+)\{([^}]+)\}/);if(e){const r=e[1].trim(),i=qm(e[2].trim(),n);if(r.includes("[dir=")){const e=r.match(/\[dir="[^"]+"\]/)?.[0];e&&r.match(/\.([^\s[\]]+)/)&&a.push(`${e} .${t}{${i}}`)}else a.push(`.${t}{${i}}`)}}return a.join("")}(o,e,i);return s}const Um=new Map;function qm(e,t){return e.replace(/var\(--[^)]+\)/g,e=>{const n=e.match(/var\(([^)]+)\)/)?.[1];return n&&t[n]?t[n]:e})}function jm(e){if("compound-condition"===e.type){const t=jm(e.left),n=jm(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function Hm(e,t){const{containerQueryProps:n,mediaQueryProps:a,literalProps:i}=r(()=>{const t={},n={},r={};for(const[i,o]of Object.entries(e||{}))null!=o&&(Ip(o)?t[i]=o:Ap(o)?n[i]=o:r[i]=o);const a=new Set(Object.keys(n).flatMap(e=>we(e)??[e]));for(let e=a.size>0;e;){e=!1;for(const[t,i]of Object.entries(r)){if(Ae(i))continue;const o=we(t);if(o?.length&&$m(o[0],i))continue;const s=o?.length?o:[t];if(s.some(e=>a.has(e))){n[t]=i,delete r[t];for(const e of s)a.add(e);e=!0}}}return{containerQueryProps:t,mediaQueryProps:n,literalProps:r}},[e]),{className:o,style:s,styleElement:l}=function(e,t){const n=Yc(void 0,Vm),{containerQueryCssStrings:a,fallbackClassName:i,fallbackStyle:o}=r(()=>{const r={},a=[];if(!e)return{fallbackClassName:"",fallbackStyle:{},containerQueryCssStrings:a};for(const[s,l]of Object.entries(e)){if(!Ip(l))continue;const e=zm(xp(l));if("invalid"===e.state)continue;r[s]=e.fallbackValue;const i=e.conditionalValues.map(r=>{const a=Fm({cssClassNameSelector:n,property:s,value:r.value,config:t});return a?`${e.responsiveType}${"@container"===e.responsiveType&&e.name?` ${e.name} `:""}${jm(r.condition)}{${a}}`:""}
2).filter(Boolean).join("");a.push({property:s,cssString:i})}const{className:i,style:o}=xm(r,t);return{containerQueryCssStrings:a,fallbackClassName:i,fallbackStyle:o}},[t,e,n]),s=a.length>0?d("style",{children:a.map(({cssString:e})=>e).join("")},n):null;return{className:v(n,i),style:o,styleElement:s}}(n,t),{className:c,style:u}=function(e,t){const{className:n,style:a}=r(()=>{const n={};if(!e)return{className:"",style:{}};for(const[t,r]of Object.entries(e)){if(!Ap(r)){n[t]=r;continue}const e=Bm(xp(r),t);if("invalid"===e.state)continue;const a={base:e.fallbackValue};for(const t of e.conditionalValues){const e=t.condition;"condition"===e.type&&(a[e.value]=t.value)}n[t]=a}return xm(n,t)},[t,e]);return{className:v(n),style:a}}(a,t),{className:p,style:m}=function(e,t){return r(()=>e&&0!==Object.keys(e).length?xm(e,t,{filterDefaultValues:!0}):{className:"",style:{}},[t,e])}(i,t);!function(e,t,n){const r=new Set,a=new Set,i=new Set,o=new Set;if(0===Object.keys(e).length&&0===Object.keys(t).length&&0===Object.keys(n).length)return;for(const[c,u]of Object.entries(e))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&$m(e[0],u))continue;for(const t of e)r.add(t)}else{if($m(c,u))continue;r.add(c)}for(const[c,u]of Object.entries(t))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&$m(e[0],u))continue;for(const t of e)a.add(t)}else{if($m(c,u))continue;a.add(c)}for(const[c,u]of Object.entries(n))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&$m(e[0],u))continue;for(const t of e)i.add(t),o.add(t)}else{if($m(c,u))continue;i.add(c)}const s=new Set,l=n=>o.has(n)&&(n in t||n in e);for(const c of r)if(a.has(c)||i.has(c)){if(l(c))continue;s.add(c)}for(const c of a)if(i.has(c)){if(l(c))continue;s.add(c)}s.size>0&&console.warn(`ResponsiveStyle: style property conflicts detected - ${Array.from(s).join(", ")}. These style properties are being set by multiple styling methods (container query, media query, or conditional). Consider avoiding mixing different responsive value types for the same properties.`)}(n,a,i),function(e){const t=Object.keys(e).filter(t=>Ae(e[t]));t.length>0&&console.warn(`ResponsiveStyle: conditional values are no longer resolved - ${t.join(", ")}. Convert them to an \`@media\` string or a per-breakpoint object at the component boundary.`)}(i);const h=Object.keys(n).length>0,g=Object.keys(a).length>0;return{className:v(h?o:void 0,g?c:void 0,p),style:{...s,...u,...m},styleElement:l}}function $m(e,t){const n=vm[e];return void 0!==n&&t===n}const Ym=ym(fm(qp(_(function({ariaBusy:e,ariaHidden:t,ariaLabel:n,ariaLive:r,children:a,className:i,commandFor:o,command:s,href:l,id:c,lang:u,onClick:p,onFocus:m,onMouseEnter:h,target:g,...f},y){const v=Ju().linkComponent,_=Cd(),b="function"==typeof p?()=>p():void 0,k="function"==typeof m?()=>m():void 0,P="function"==typeof h?()=>h():void 0,S=i??"_1M6e9",w=Lu(),C=Fp(w,{onClick:b,onFocus:k,onMouseEnter:P}),E=w?.activatorAttributes,x=!(!t&&!_)||void 0,I=x?-1:void 0;return v?d(v,{className:S,"aria-busy":e||void 0,"aria-hidden":x,"aria-label":n,"aria-live":r,href:l,id:c,lang:u,ref:y,tabIndex:I,target:g,...C,...E,...f,children:a}):d("a",{"aria-busy":e||void 0,"aria-describedby":Cu({external:"_blank"===g||!1,native:!0}),"aria-label":n,"aria-live":r,"aria-hidden":x,className:S,href:l,id:c,lang:u,ref:y,rel:"_blank"===g?"noopener noreferrer":void 0,tabIndex:I,target:"_blank"===g?g:void 0,...C,...E,...f,children:a})}))));function Wm(){const e=h(Te);if(null==e)throw new fe("No theme found in context");return e}function Gm(){const e=Wm();if("undefined"==typeof window)return e.configuration;const t=i();if(null!=t.current&&t.current.theme!==e&&(t.current=void 0),null==t.current){const n=e.configurationSignal,r=new Map,a={};for(const t of Object.keys(e.configuration))Object.defineProperty(a,t,{enumerable:!0,get:()=>(r.has(t)||r.set(t,k(()=>n.value[t])),r.get(t).value)});t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:a}}return t.current.reactiveConfiguration}function Jm(e){const t=_(function({disableGlobalBranding:t,...n},r){const{global:{cornerRadius:a}}=Gm(),i=Le(a),o=t?n:{...n,borderRadius:i??n.borderRadius};return d(e,{...o,ref:r})});return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}const Km=Od(Jm(ym(fm(qp(_(function({accessibilityLabel:e,accessibilityVisibility:t="visible",background:n="transparent",blockSize:r="auto",border:i="none",borderRadius:o="none",borderStyle:s,borderWidth:l,children:c,className:u,command:p,commandFor:m,controlId:h,disabled:g=!1,display:f="auto",expanded:_,href:b,id:k,inlineSize:P="auto",lang:S,loading:w=!1,maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",onBlur:A,onClick:T,onFocus:L,onPointerDown:N,onPointerEnter:R,onPointerLeave:M,onPointerUp:D,overflow:O="visible",padding:z="none",paddingBlock:B,paddingInline:V,paddingBlockEnd:F,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,target:H="auto",type:$="button",...Y},W){a(()=>{null!=_&&null==h&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[h,_]);const G=Cd(),J=Lu(),{className:K,style:X,styleElement:Q}=Hm({backgroundColor:n,blockSize:r,...Ne({border:i,borderStyle:s,borderWidth:l}),borderRadius:o,display:f,inlineSize:P,maxBlockSize:C,maxInlineSize:E,minInlineSize:I,minBlockSize:x,padding:z,paddingBlock:B,paddingBlockEnd:F,paddingBlockStart:U,paddingInline:V,paddingInlineEnd:q,paddingInlineStart:j},{transforms:{display:vd}}
2),Z=v("_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw","exclusive"===t&&"_1s82kpb5 _1fragem121",K,"hidden"===O&&"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",G&&"_1s82kpb2 _1fragemz0",u),ee=Sd(),te=Dp(W),ne=Fp(J,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{R?.()},onMouseLeave:()=>{M?.()},onMouseDown:e=>{N&&0===e.button&&N?.()},onMouseUp:()=>{D?.()}}),re=w?"assertive":void 0,ae="hidden"===t||G,ie={className:Z,id:k,lang:S,style:X,tabIndex:ae?-1:void 0,...Bp(J,{"aria-controls":h,"aria-expanded":_}),...ne,...Y};return d(y,{children:[Q,d(Ed.Provider,{value:!0,children:b&&void 0===m?d(Ym,{...ie,href:b,ref:te,ariaBusy:w,ariaHidden:!!ae||void 0,ariaLive:re,ariaLabel:e,target:H,children:c}):d("button",{ref:te,type:m?"button":$,disabled:g||w,form:"submit"===$&&ee?.nested?ee.id:void 0,"aria-busy":w,"aria-hidden":!!ae||void 0,"aria-live":re,"aria-label":e,...ie,children:c})})]})})))))),Xm="generic",Qm=new Map([["main",{element:"main"}],["header",{element:"header"}],["footer",{element:"footer"}],["section",{element:"section"}],["aside",{element:"aside"}],["navigation",{element:"nav"}],["ordered-list",{element:"ol",role:"list"}],["unordered-list",{element:"ul",role:"list"}],["list-item",{element:"li"}],["list-item-separator",{element:"li",role:"separator"}],["separator",{role:"separator"}],["status",{role:"status"}],["alert",{role:"alert"}],["group",{role:"group"}],["listbox",{role:"listbox"}],["generic",{}],["presentation",{}],["none",{}]]);function Zm(e,{defaultRole:t=Xm,defaultElement:n="div"}={}){const r=Qm.get(e??t)??Qm.get(t)??Qm.get(Xm);return{Element:r.element??n,role:r.role}}const eh=zd(Jm(function({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignContent:r,alignItems:a,background:i="transparent",backgroundHoverAndFocus:o,blockSize:s="auto",border:l="none",borderColor:c,borderRadius:u="none",borderStyle:p,borderWidth:m,children:h,columnGap:g,display:f="auto",gap:_="none",gridAutoColumns:b,gridAutoFlow:k,gridAutoRows:P,gridTemplateColumns:S="none",gridTemplateRows:w="none",id:C,inlineSize:E="auto",justifyContent:x,justifyItems:I,maxBlockSize:A="none",maxInlineSize:T="none",minBlockSize:L="0",minInlineSize:N="0",overflow:R="visible",padding:M="none",paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,placeContent:U="normal normal",placeItems:q="normal normal",rowGap:j,...H}){const $=xd(),{Element:Y,role:W}=Zm(t,{defaultElement:$?"span":"div"}),{className:G,style:J,styleElement:K}=Hm({gap:_,placeContent:U,placeItems:q,alignContent:r,alignItems:a,backgroundColor:i,backgroundColorHoverAndFocus:o,blockSize:s,...Ne({border:l,borderStyle:p,borderWidth:m}),borderRadius:u,columnGap:g,display:f,gridAutoColumns:b,gridAutoFlow:k,gridAutoRows:P,gridTemplateColumns:S,gridTemplateRows:w,inlineSize:E,justifyContent:x,justifyItems:I,maxBlockSize:A,maxInlineSize:T,minBlockSize:L,minInlineSize:N,padding:M,paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,rowGap:j},{transforms:{blockSize:ud,display:kd}});return d(y,{children:[K,d(Y,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("_1mrl40q0 _1fragemws","exclusive"===n&&"_1mrl40q2 _1fragem121","hidden"===R&&"_1mrl40q1 _1fragemup _1fragemv4",G),id:C,role:W,style:J,...H,children:h})]})})),th=["alertCircle","alertTriangle","alertTriangleFilled","arrowDown","arrowLeft","arrowRight","arrowUp","arrowUpRight","bag","bullet","calendar","camera","caretDown","cart","cashDollar","categories","check","checkCircle","checkCircleFilled","chevronDown","chevronLeft","chevronRight","chevronUp","circle","clipboard","clock","creditCard","delete","delivered","delivery","disabled","discount","edit","email","empty","external","filter","geolocation","giftCard","globe","grid","image","info","infoFilled","listBulleted","location","lock","map","menu","menuHorizontal","menuVertical","minus","mobile","note","order","organization","packageDelivery","plus","profile","questionCircle","questionCircleFilled","reorder","reset","return","savings","search","settings","star","starFilled","starHalf","store","truck","upload","x","xCircle","xCircleFilled"];var nh=1,rh={colorVariant:{base:"a8x1wuj",strong:"a8x1wuk"},toneVariant:{auto:"a8x1wua",neutral:"a8x1wub",accent:"a8x1wuc a8x1wu4 _1fragemxq",custom:"a8x1wud a8x1wu5 _1fragemxs",info:"a8x1wue a8x1wu6 _1fragemxt",success:"a8x1wuf a8x1wu7 _1fragemxu",critical:"a8x1wug a8x1wu8 _1fragemxr",warning:"a8x1wuh a8x1wu9 _1fragemxv",monochrome:"a8x1wu
2i"},displayVariant:{block:"a8x1wun a8x1wul _1fragem5u",inline:"a8x1wuo a8x1wum _1fragem6e _1fragem12x"},sizeVariant:{"small-200":"a8x1wuq a8x1wup","small-100":"a8x1wur a8x1wup",base:"a8x1wus a8x1wup","large-100":"a8x1wut a8x1wup",fill:"a8x1wuu a8x1wup"},fillVariant:{fill:"a8x1wuw",outline:"a8x1wux"},Icon:"a8x1wu3 a8x1wu2 _1fragemzf _1fragem4q _1fragemvo _1fragemve _1fragem12k _1fragem12p _1fragem12e",InterestActivator:"a8x1wuz a8x1wuy _1fragemws _1fragemyk",mirrored:"a8x1wuv"};const ah=["arrow-left","arrow-right","arrow-up-right","cart","chevron-left","chevron-right","delivery","external","list","note","package-delivery","return","star-half","truck","arrowLeft","arrowRight","arrowUpRight","chevronLeft","chevronRight","starHalf"],ih=["alert-triangle-filled","caret-down","check-circle-filled","info-filled","question-circle-filled","star-filled","star-half","x-circle-filled","caretDown","errorFill","infoFill","questionFill","starFill","starHalf","warningFill"];function oh({interestFor:e,...t}){return e?d(lh,{...t,interestFor:e}):d(sh,{...t})}function sh({accessibilityLabel:e,...t}){const{className:n,children:r}=ch(t);return d("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const lh=ym(_(function({accessibilityLabel:e,"aria-describedby":t,id:n,onBlur:r,onClick:a,onFocus:i,onMouseEnter:o,onMouseLeave:s,...l},c){const{className:u,children:p}=ch(l);return d("span",{role:"img",tabIndex:t?0:void 0,id:n,ref:c,className:v(rh.InterestActivator,u),"aria-label":e,"aria-labelledby":e?void 0:t,"aria-describedby":e?t:void 0,onBlur:r,onClick:a,onFocus:i,onMouseEnter:o,onMouseLeave:s,children:p})}),{tapToggles:!0});function ch({type:e,tone:t="auto",color:n="base",size:r="base",display:a="block",className:i}){const{icons:o}=Gm(),s=Ju().inlineIcons??!1;let l;e?l=e:(""===e||console.warn(`"${e}" is not a valid <Icon /> type`),l="empty");const c=ah.includes(l),u=ih.includes(l)?"fill":"outline";let p;switch(r){case"small":p="small-100";break;case"large":p="large-100";break;default:p=r}const m=v(rh.Icon,rh.toneVariant[t],("auto"===t||"neutral"===t)&&rh.colorVariant[n],rh.displayVariant[a],rh.sizeVariant[p],c&&rh.mirrored,rh.fillVariant[u],i);let h=function(e){const t=Pe(e);return t in uh?uh[t]:th.includes(t)?t:void 0}(l);h||(console.warn(`"${l}" is not a valid <Icon /> type`),h="empty");const g=o[h],f=g??`/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg#${h}`,y=d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:d("use",{href:f})});return{className:m,children:null!=g||s?d(fu,{iconUrl:f,fallback:y,allowRelativeUrl:null==g}):y}}const uh={checkmark:"check",close:"x",critical:"alertCircle",error:"xCircle",errorFill:"xCircleFilled",gift:"giftCard",giftFill:"giftCard",hamburger:"menu",hollowCircle:"circle",horizontalDots:"menuHorizontal",infoFill:"infoFilled",list:"listBulleted",magnify:"search",marker:"location",orderBox:"order",pen:"edit",question:"questionCircle",questionFill:"questionCircleFilled",starFill:"starFilled",success:"checkCircle",verticalDots:"menuVertical",warning:"alertTriangle",warningFill:"alertTriangleFilled"};function dh({message:e,dismiss:t}){const n=Qu();return a(()=>$u({content:e}),[e]),a(()=>{const e=setTimeout(t,5300);return()=>clearTimeout(e)},[t]),d("span",{className:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120",children:d(eh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"base",children:[d("span",{children:e}),d(Km,{onClick:t,accessibilityLabel:n("closeNotification"),children:d(oh,{type:"x",size:"small",tone:"monochrome"})})]})})}const ph=f(null);function mh({children:e,handleToast:t}){const[a,o]=s([]),l=i(0),c=n(e=>{o(t=>t.filter(t=>t.id!==e))},[]),u=n(()=>(l.current+=1,`toast-message-${l.current}`),[]),p=r(()=>({setMessages:o,removeMessage:c,createMessageId:u,handleToast:t}),[o,c,u,t]);return d(ph.Provider,{value:p,children:[e,a.length>0?d(nu,{children:d(hh,{children:a.map(({id:e,content:t})=>d(dh,{message:t,dismiss:()=>c(e)},e))})}):null]})}function hh({children:e}){const t=Hc(),n=i(null),r=i(void 0);return l(()=>{const e=n.current;if(!e)return;const a=e.offsetHeight,i=a-(r.current??a);r.current=a,t||!e.animate||i<=0||e.animate([{transform:`translateY(${i}px)`},{transform:"translateY(0)"}],{duration:150,easing:"ease-out"})}),d("div",{ref:n,className:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z",children:e})}function gh(){const e=h(ph),{setMessages:t,removeMessage:r,createMessageId:a,handleToast:i}=e??{};return n(e=>{if(!t||!r||!a)throw new fe("useToast must be used within Toaster context provider");if("string"!=typeof e||"string"==typeof e&&""===e.trim())return{hide:()=>{}};if(i?.(e))return{hide:()=>{}};const n=a();return t(t=>[...t,{id:n,content:e}]),{hide:()=>r(n)}},[t,r,a,i])}function fh(e,t){if(!e)throw new TypeError(t)}function yh(e){return r(()=>Re(e),[])}function vh(e,t){const n=oe(t),r=i();r.current||(r.current=e.listen(n.current)),a(()=>()=>r.current?.(),[e,n])}
2const _h="·",bh=150,kh="ASAP",Ph=re("ShippingMethodsContext");function Sh(){const e=h(Ph);if(null!=e)return e}function wh(){const{observability:e}=ie();return n((t,n)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:t,attributes:{apiClientId:n.toString()}})},[e])}const Ch=()=>De((e,t)=>{switch(e){case"ignored":if("timeout"===t)return"idle";break;case"idle":if("countryChange"===t)return"debounced";if("otherAddressFieldChange"===t)return"ignored";break;case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}},"idle"),Eh=["streetName","streetNumber","neighborhood","line2"];function xh(e,t){const n=r(Ch,[e]),i=n.value;vh(n,({previousState:e,action:n})=>{"debounced"===e&&"timeout"===n&&t()}),a(()=>{let t=!1;return e.fields.countryCode.subscribe(()=>{t&&(n.value="countryChange"),t=!0})},[e.fields.countryCode,n]),a(()=>{if("debounced"===i||"ignored"===i){const e=setTimeout(()=>{n.value="timeout"},100);return()=>{clearTimeout(e)}}},[n,i]),a(()=>{let t=!1;const r=Object.keys(e.fields).filter(e=>!["countryCode",...Eh].includes(e)).map(r=>e.fields[r].subscribe(e=>{e&&t&&(n.value="otherAddressFieldChange")}));return t=!0,()=>{r.forEach(e=>e())}},[e.fields,n])}function Ih(){const{shop:{shippingRatesReloadStrategy:e}}=ie();return n(({countryCode:t,zoneCode:n})=>{try{fh("string"==typeof t,"Expected a country code");const r=e.get(t);switch(fh(null!=r,`Could not find a strategy for ${t}`),r.type){case"regional":{const e=Math.max(...r.regions.values());return null==n?e:r.regions.get(n)??e}case"national":return r.strategy}}catch{const t=e.get("ZZ");return"national"===t?.type?t.strategy:Me.Anything}},[e])}function Ah(){const{i18n:e}=ie(),t=new Map;return t.set("year",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.year",{count:t})),t.set("month",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.month",{count:t})),t.set("week",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.week",{count:t})),t.set("day",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.day",{count:t})),(e,n)=>{const r=t.get(e);return r?.(n)||""}}function Th({proposedDeliveryLines:e,onlyShippingOneTimePurchase:t=!1}){return e.value.map(e=>e.value).reduce((e,{type:n,id:r,deliveryMethodTypes:a,deliveryMethodHandle:i})=>{const o=["SHIPPING","LOCAL"];if(t&&("ONE_TIME_PURCHASE"!==n||0===a.length||!a.some(e=>o.includes(e))))return e;const s=ze(n,r);return{...e,[s]:i}},{})}function Lh(e,t){const n=e.value;void 0!==t?Object.entries(t).forEach(([e,t])=>{const[r,a]=e.split("-"),i=n.find(e=>{const{type:t,id:n}=e.value;return!(t!==r||a&&n&&le(n)!==a)});i&&(i.value={...i.value,deliveryMethodHandle:t})}):n.forEach(e=>{e.value={...e.value,deliveryMethodHandle:void 0}})}function Nh(e,t,n){const{checkout:{negotiator:r}}=ie(),{parts:a}=r,i=a.deliveryLines.value;function o(e){return!n||e.deliveryMethodTypes.includes(n)}return i.find(n=>{const r=n.peek(),a=r.deliveryMethodTypes.length>0;return r.type===e&&a&&(!t||r.id===t)&&o(r)})||i.find(e=>o(e.peek()))}function Rh(e){const t=Nh(e);return Boolean(t?.fields)}function Mh(e,t){const r=Nh(e,t);return[r?.fields.deliveryMethodTypes.value||[],n(e=>{r&&(r.value={...r.value,deliveryMethodTypes:e})},[r])]}function Dh({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:r}){const a=Nh(e,t,r);return[a?.fields.deliveryMethodHandle.value||void 0,n(e=>{a&&(a.value={...a.value,deliveryMethodHandle:e})},[a])]}function Oh(e,t){const n=Nh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.phone||S(void 0),[n])}function zh(e,t){const n=Nh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.instructions||S(void 0),[n])}function Bh(e,a){const i="ONE_TIME_PURCHASE"===a?"SUBSCRIPTION":"ONE_TIME_PURCHASE",{checkout:{negotiator:o}}=ie(),s=o.current.fields.deliveryNext,l=n(e=>Ue(s.value).filter(qe).find(t=>t.type===e),[s]),c=n((e,t)=>{const n=l(e),r=n?.methods.find(e=>e.methodType===t);if(r)return r},[l]),u=n(t=>{const n=e.find(e=>e.handle===t);if(!n)return;if("PICK_UP"===n.methodType){const e=l(i),t=e?.methods.find(e=>"PICK_UP"===e.methodType&&n.title===e.title);return t?.handle}const r=c(i,n.methodType);return r?.handle},[l,c,i,e]),{deliveryLines:d}=o.parts,p=t(()=>Th({proposedDeliveryLines:d})),m=n(e=>{Lh(d,{[i]:e})},[d,i]),h=p.value;return r(()=>({inverseGroupType:i,inverseGroupDeliveryMethodHandle:h,setInverseGroupDeliveryMethodHandle:m,getInverseGroupDeliveryMethodHandle:u}),[u,h,i,m])}function Vh(){const{checkout:{negotiator:e}}=ie(),{parts:t}=e;return[Oe(t.deliveryLines.peek()),n(e=>{t.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodTypes:e}})},[t.deliveryLines])]}function Fh(){const{negotiate:e}=ic(),{i18n:t,checkout:{negotiator:r}}=ie(),{parts:a}=r,i=gh(),o=Be(),s=Sh();return n(({targetDeliveryMethodType:n,merchandiseStableIds:r})=>{const{orphanedMovedToShipping:l,orphanedRemovedFromCartStableIds:c}=Ve({deliveryLines:a.deliveryLines,merchandiseLines:a.merchandiseLines,targetDeliveryMethodType:n,merchandiseStableIds:r,sellableDeliveryMethodsByStableId:o.value.deliveryMethodsByMerchandise,discountLines:a.discountLines});c.length>0?i(t.translate("stock.removed_from_cart_notice")):l&&i(t.translate("split_delivery.items_moved_to_shipping_toast")),s?.dispatch?.("deliveryMethodChanged"),e({silenceViolations:Fe(["deliveryNext","merchandiseLines"])})},[a.deliveryLines,a.merchandiseLines,o,a.discountLines,s,e,i,t])}function Uh(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t,deliveryMacros:r}=e.parts,{negotiate:a}=ic(),i=Th({proposedDeliveryLines:t,onlyShippingOneTimePurchase:!0}),o=r.value?.length?je(r.value,i):void 0,s=n(async e=>{if(!e||e===o?.id)return;const n=r.value.find(({id:t})=>t===e);return n?(Lh(t,n.deliveryMethodHandles),a({silenceViolations:Fe(["deliveryNext"])})):void 0},[t,r,o,a]);return{selectedMacro:o,setSelectedMacro:s}}function qh(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=ie(),n="shopPay"===e.current.value,a=t.unique,i=t.visit;return r(()=>{if(n)return"undefined"!=typeof window&&window.ShopPay&&(window.ShopPay.trackingUnique=a,window.ShopPay.trackingVisit=i),{trackingUnique:a,trackingVisit:i}},[a,i,n])}const jh=re("CheckoutSheetProtocolContext"),Hh=re("MobileCheckoutSdkContext");function $h(){const e=h(jh),t=h(Hh);return null!=e?e:null!=t?t:null}function Yh(e){const t=$h();return function(e,t){return null==e||"MERCHANT"===e&&"checkout_started"===t}(t?.config?.type,e)}function Wh(){const{checkout:e,shop:t}=ie();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(He)}function Gh(){const{checkout:e,shop:t}=ie();return Wh()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled($e))}class Jh extends ul{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}
2class Kh extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let Xh=null;const Qh=re("webPixels");function Zh({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:l,thankYouEntrance:c,negotiator:u},observability:p,shop:m,mobileCheckoutSdk:h,source:g,router:f}=ie(),y="shopPay"===l.current.value,v=m.hasFlagEnabled(Ye),_=function(){const{shop:e,source:t,checkout:{negotiator:n}}=ie();return o(()=>{const r=n.current.fields.buyerIdentity.value;return{cart:bc({negotiated:n,shop:e,source:t}),customer:_c(r),shop:kc({shop:e}),purchasingCompany:Pc(r)}})}(),b=$h(),k=b?.config?.pixelEventsMode,P=n?.configuration?.pixelMode,S=Boolean(n?.isCheckoutKit({includeLegacyCsk:!1})),w="DISABLED"===k||"DISABLED"===P,{checkoutProtocolPresentedSignal:C}=u.context,E=C.value,x=S&&!0===n?.isPreload&&!E,I=Gh()&&"settled"!==c.phase.value&&(f.currentUrlMatches("/thank-you")||f.currentUrlMatches("/processing")&&null!=c.progress&&"cancelled"!==c.progress.phase.value),A=r.webPixelsManager.url;r.webPixelsManager.type;const T=r.webPixelsManagerExtensions.url,L=i(),N=i(),R=i(!1),[M]=s(()=>{const e=new Promise((e,t)=>{L.current=e,N.current=t});return e.catch(()=>{}),e}),D={[tt]:m.hasFlagEnabled(tt),[et]:m.hasFlagEnabled(et),[Ze]:m.hasFlagEnabled(Ze),[Qe]:m.hasFlagEnabled(Qe),[Xe]:m.hasFlagEnabled(Xe),[Ke]:m.hasFlagEnabled(Ke),[Je]:m.hasFlagEnabled(Je),[Ge]:m.hasFlagEnabled(Ge),[We]:m.hasFlagEnabled(We)},O=Object.entries(D).filter(([e,t])=>t).map(([e])=>e),[z]=s({async publish(e,t,n){try{return(await M).publish(e,t,n)}catch{return!1}},async publishCustomEvent(e,t,n){try{return(await M).publishCustomEvent(e,t,n)}catch{return!1}},async publishDomEvent(e,t,n){try{return(await M).publishDomEvent(e,t,n),{type:"success"}}catch(r){return{type:"error",message:r.message}}},async subscribe(e,t,n){try{return(await M).subscribe(e,t,n)}catch{return()=>!1}},async visitor(e,t){try{return(await M).visitor(e,t),{type:"success"}}catch(n){return{type:"error",message:n.message}}}});return a(()=>{const e=e=>{p.log("web_pixel_manager_init",`WebPixelsProvider init: ${e}`,{outcome:e,shopAppDomain:y},{exportImmediately:"loading"!==e})};if(null===m.webPixelConfigurations)return e("web_pixel_configurations_null");if(!m.storefrontUrl)return e("storefront_url_missing");const r=Boolean(nt(navigator.userAgent));if(r&&!v)return e("shop_mobile_app_context");const a=y||r;if("disabled"===m.webPixelManagerVersion)return e("wpm_version_disabled");const i=a?[]:m.webPixelConfigurations;if(w)return N.current?.(new Kh("Checkout SDK enabled for partner with pixels suppressed")),void e("pixels_suppressed_by_config");if(x||R.current)return void(x&&!R.current&&e("deferred_for_preload"));if(I)return void e("deferred_for_thank_you");if(R.current=!0,e("loading"),"undefined"!=typeof PerformanceMark)try{window.performance.mark("wpm:start")}catch{}const o=h.variant.isStandard(),s=!n?.isFlagshipPartner&&Boolean(n?.isCheckoutSheetKit),l=function({shopAppDomain:e,isNativeShopApp:t,isCheckoutKit:n,isSdkSurface:r}){let a=n?"checkout-kit":"checkout-one";return r&&(a+="-sdk"),t?a+="-native-shop-app":e&&(a+="-shop-app"),a}({shopAppDomain:y,isNativeShopApp:r,isCheckoutKit:S,isSdkSurface:o||s});try{const e=function({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:a,enabledBetaFlags:i=[],surface:o,monorailRegion:s,sriMap:l,managerBaseUrl:c,extensionsUrl:u,apiClientId:d,checkoutToken:p,facebookCapiEnabled:m=!1}){if(Xh)return Xh;const h=parseInt(le(t),10),g=function(){const{modern:e,legacy:t}={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/},n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}(),f="modern"===g?"modern":"legacy",y=`${c}/b${r}${f.substring(0,1)}.js`,v=`${u}/cdn/shopifycloud/web-pixels-manager`,_=document.createElement("script");_.setAttribute("async","true"),_.setAttribute("src",y);const b={shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,browserTarget:g,surface:o,enabledBetaFlags:JSON.stringify(i),hashVersion:r,publish:"all",...null!=d&&{apiClientId:String(d)},...p&&{checkoutToken:p},...a.customer?.id&&{customerId:a.customer.id},facebookCapiEnabled:String(m)};b.trekkieShim="true";for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P))try{_.dataset[P]=String(b[P])}catch{}const k=l[f];return k&&(_.setAttribute("integrity",k),_.setAttribute("crossorigin","anonymous")),Xh=new Promise((t,r)=>{if(_.onload=()=>
2{if(Boolean(window.Shopify?.analytics?.initialized))return;if(null==window.webPixelsManager||!("init"in window.webPixelsManager))return void r(new Jh("WebPixelManager is not available"));const l=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,surface:o,webPixelsConfigList:n.map(e=>{const t=e.dataSharingAdjustments&&{dataSharingAdjustments:e.dataSharingAdjustments},n=e.integrityHash&&{integrityHash:e.integrityHash};return{configuration:e.configuration,eventPayloadVersion:e.eventPayloadVersion,id:e.idTmp,runtimeContext:e.runtimeContext,scriptVersion:e.scriptVersion,type:e.type,apiClientId:e.apiClientId,privacyPurposes:e.purposes,name:e.name,capabilities:e.capabilities||[],enabledFlags:e.enabledFlags||[],dataSharingState:e.dataSharingState,...t,...n}}),initData:a,enabledBetaFlags:i,monorailRegion:s});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=l.publishCustomEvent,window.Shopify.analytics.initialized=!0,t(l)},_.onerror=()=>{r(new Jh(`Failed to load WebPixelManager runtime from ${y}`))},document.querySelector(`script[src="${_.src}"]`))r(new Jh("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(_)}catch{throw new Jh("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),Xh}({storefrontBaseUrl:m.storefrontUrl,shopId:m.id,webPixelConfigurations:i,webPixelManagerVersion:m.webPixelManagerVersion,initData:_,enabledBetaFlags:O,surface:l,sriMap:m.webPixelsManagerSriMap,managerBaseUrl:A,extensionsUrl:T,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:fc(g)||g.sourceId,facebookCapiEnabled:m.facebookCapiEnabled??!1});let n=!0;e.then(e=>{if(!L.current)throw N.current?.(),new Jh("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined");L.current(e)}).catch(e=>{n=!1,p.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${e?.message}`)}).finally(()=>{p.counter({name:"web_pixel_manager_load",value:1,attributes:{status:n?"success":"failed",surface:l}})})}catch(c){N.current?.(c),p.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:l}})}},[x,I]),d(Qh.Provider,{value:z,children:e})}function eg(){return ae(Qh)}const tg=new Map([[6167201,"hydrogen"],[12875497473,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);function ng(e,t,n){const r=new Set([129785,6517121,757165]),a=new Set([3890849,3850711,5198245]);return tg.has(e)?tg.get(e):r.has(e)?"retail":a.has(e)?"shop_app":t===rt.CartPermalink?"permalink":580111===e?"online_store":n}function rg(){const e=window,t=e?.ShopifyAnalytics?.lib;return t?.trekkie?.defaultAttributes}function ag({eventName:e,checkoutType:t,walletName:r,progressionStepName:a,redirectSource:i,trackingUnique:o,trackingVisit:s}){const{client:l,checkout:c,consentManager:u,i18n:d,observability:p,userEvents:m,shop:h,source:g}=ie(),{id:f}=h,y=c.negotiator.current.fields.buyerIdentity.value?.customerProfile,v=Yh(e),_=$h(),b=_?.config?.type,k=parseInt(le(f),10),P=l.unstable_getSerialization("apiClientId")??0,S=o??(l.cookies.get("_shopify_y")||void 0),w=s??(l.cookies.get("_shopify_s")||void 0);return n(()=>{const n=u.analyticsProcessingAllowed.value,o=u.marketingAllowed.value,s=Boolean(n||o),l={eventName:e,buyerConsentAnalyticsAllowed:n,buyerConsentMarketingAllowed:o,progressionStepName:a,userToken:S,walletName:r};if(!("checkout_started"===e&&"ShopifyPay"===r||s)||!v)return p.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:e,application:"checkout-web"}}),void p.log("checkout_lifecycle_events_not_emitting_event","checkout_lifecycle_events.not_emitting_event",{logPayload:l});const h="contact_information"===a?1:void 0,f=ig(g.type),_=f?g.sourceId:void 0,C=c.configuration.profileId.value,E=function({eventName:e,walletName:t,shopId:n,checkoutSessionIdentifier:r="default",checkoutProfileId:a,trackingVisitToken:i,userToken:o,sourceId:s,sourceType:l,customerId:c,apiClientId:u=0,checkoutType:d,currency:p,locale:m,progressionStepName:h,progressionStepNumber:g,redirectSource:f,checkoutProtocolType:y,consentManager:v}){const _=rg(),b="MERCHANT"===y?{apiName:"mobile_checkout_sdk_merchant",checkoutType:ng(u,f,"api")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:a,eventName:e,checkoutType:ng(u,f),checkoutExperience:t?"wallet":"web",entryPoint:"checkout",checkoutPlatform:"checkout_one",checkoutVersion:[d],walletName:t,apiClientId:u||0,currency:p||_?.currency,shopId:n,customerId:c,sourceId:s,sourceType:l,userToken:o||_?.uniqToken,deprecatedVisitToken:i||_?.visitToken,referrer:_?.referer,userAgent:navigator.userAgent,contentLanguage:m,eventTime:(new Date).toISOString(),progressionStepName:h,progressionStepNumber:g,buyerConsentAnalyticsAllowed:v.analyticsProcessingAllowed.value,buyerConsentSaleOfDataAllowed:v.saleOfDataAllowed.value,buyerConsentMarketingAllowed:v.marketingAllowed.value,...b}}}({eventName:e,walletName:r,shopId:k,checkoutSessionIdentifier:g.checkoutSessionIdentifier,checkoutProfileId:C?parseInt(le(C),10):void 0,trackingVisitToken:w,userToken:S,sourceId:_,sourceType:f,customerId:y?.id?parseInt(le(y.id),10):void 0,apiClientId:P,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:a,progressionStepNumber:h,redirectSource:i,checkoutProtocolType:b,consentManager:u}),x=E.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...l,progressionStepNumber:h,"context.sourceType":g.type,"context.sourceId":g.sourceId,checkoutType:t,entryPoint:x}),m.monorailEvent(E),p.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:e,checkoutType:g.type,isWallet:r?"true":"false",...r?{walletName:r}:{}}})},[e,a,S,r,k,g,c.configuration.profileId,w,y?.id,P,t,d,i,p,m,v,b,u])}function ig(e){const t={orderEdit:"order",paymentCollection:"paymentCollection",cartNext:"cart",checkout:"checkout",abandonedCart:"abandoned_cart",simulated:"simulated",draftOrder:"draft_order",buyItNow:void 0,shopPayExternal:void 0,other:void 0};return Object.keys(t).includes(e)?t[e]:void 0}function og(e){return ag({eventName:"checkout_progression",checkoutType:ie().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,progressionStepName:"contact_information"})}function sg(e,t,n,r){return ag({eventName:"checkout_started",checkoutType:ie().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var lg=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(lg||{});class cg{constructor({observability:e,userEvents:t,shopPay:n,isShopPayActive:r,router:a,consentManager:i,shouldEmitEvent:o=!0,context:s,target:l}){this.acceptableEventType=new Set(["pageViewed","sectionComplete","shippingMethodsFilled","sectionInteraction","dom_clicked"]),this.#l=!0,this.#c=e,this.#u=t,this.#d=n,this.#p=r,this.#m=a,this.#h=i,this.#l=o,this.#g=s,this.#f=l}#c;#u;#d;#p;#m;#h;#l;#g;#f;willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:lg.Lifecycle,payload:t}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}transmitImmediately(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:lg.Lifecycle,payload:t},{exportImmediately:!0}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}#_(e){const{context:t,type:n}=e;this.#g=t,this.#f=at(this.#b(t),{isShopPayActive:this.#p,shopPay:this.#d});const r=this.#k(e.timestamp);if(!r)return null;if(this.#P()){if("pageViewed"===n){if(this.#S()){const[e,t]=this.#w("contact");return{...r,progressionStepName:e,progressionStepNumber:t}}if(this.#C()){const[e,t]=this.#w("review");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("shippingMethodsFilled"===n){const[e,t]=this.#w("shipping");return{...r,progressionStepName:e,progressionStepNumber:t,...this.#E()}}if("sectionInteraction"===n&&"payment"===e.section){const[e,t]=this.#w("payment");return{...r,progressionStepName:e,progressionStepNumber:t}}
2if("dom_clicked"===n){if("summary_pay_button"===e.element.id){if(this.#g.reviewPageRequired){const[e,t]=this.#w("review_order_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}{const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("review_pay_button"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}if(this.#x()){if("pageViewed"===n&&this.#I()){const[e,t]=this.#w(this.#g.step);return{...r,progressionStepName:e,progressionStepNumber:t,..."shipping"===e?this.#E():{}}}if("dom_clicked"===n){if("payment_go_to_next_step"===e.element.id){const[e,t]=this.#w(this.#g.reviewPageRequired?"review_order_clicked":"pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}if("review_go_to_next_step"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}return null}#b(e){const t=this.#m.currentUrl.value;return e.pathname?new URL(e.pathname,t):t}#k(e){if(!this.#g)return null;const t=ig(this.#g.sourceType),n=t?this.#g.sourceId:void 0;return{userToken:this.#g.userToken,apiClientId:this.#g.apiClientId,sourceId:n,sourceType:t,currency:this.#g.currency,shopId:parseInt(le(this.#g.shopId),10),checkoutChainToken:this.#g.checkoutToken,checkoutProfileId:this.#g.checkoutProfileId,checkoutExperience:"web",checkoutPlatform:"checkout_one",eventName:"checkout_progression",deprecatedVisitToken:this.#g.trackingVisit,requestId:this.#g.requestId,checkoutVersion:[this.#P()?"one_page":"three_page",this.#g.workerVersion,this.#g.serverHandling],checkoutType:ng(this.#g.apiClientId),entryPoint:void 0,eventTime:e.toISOString(),buyerConsentAnalyticsAllowed:this.#A(),buyerConsentSaleOfDataAllowed:this.#T(),buyerConsentMarketingAllowed:this.#L()}}#y(e){const t=e.context.consent;return t?tc(t):Boolean(this.#A()||this.#L())}#A(){return this.#h.analyticsProcessingAllowed.value}#T(){return this.#h.saleOfDataAllowed.value}#L(){return this.#h.marketingAllowed.value}#w(e){const{shippingRequired:t,reviewPageRequired:n}=this.#g||{};let r=2;t&&(r=3);let a=r+1;n&&(a=r+3);const i=r+1;switch(e){case"information":case"contact":case"deliveryAddress":return["contact_information",1];case"shipping":case"delivery":return["shipping",2];case"payment":return["payment",r];case"pay_now_clicked":return["pay_now_clicked",a];case"review_order_clicked":return["review_order_clicked",i];case"review":return["review",t?5:4];default:return[void 0,void 0]}}#P(){return"c1_redesign"===this.#g?.sourceDesign}#x(){return"c1_legacy"===this.#g?.sourceDesign}#C(){return this.#f&&/review/.test(this.#f)}#I(){return["information","shipping","payment","review"].some(e=>this.#f&&new RegExp(e).test(this.#f))}#S(){return this.#f&&/information/.test(this.#f)}#E(){return this.#g?{shippingMacroCostLocal:String(this.#g.selectedDeliveryMacro?.cost?.amount),shippingMacroList:this.#g.deliveryMacros?.map(({id:e})=>e),numDeliveryLines:[this.#g.deliveryLines?.filter(({type:e})=>"ONE_TIME_PURCHASE"===e).length||0,this.#g.deliveryLines?.filter(({type:e})=>"SUBSCRIPTION"===e).length||0],shippingMacroSelected:this.#g?.selectedDeliveryMacro?.id}:{}}#v(e,t){const n={buyerConsentAnalyticsAllowed:this.#A(),buyerConsentMarketingAllowed:this.#L()};e&&t?this.#c.log("buyer_progression_events_adapter_event_transmitted","Emitting checkout lifecycle event",{...n,progressionStepName:t.progressionStepName,progressionStepNumber:t.progressionStepNumber,userToken:t.userToken,"context.sourceType":this.#g?.sourceType,"context.sourceId":this.#g?.sourceId,"context.apiClientId":this.#g?.apiClientId}):this.#c.log("buyer_progression_events_adapter_event_not_transmitted","Not emitting checkout lifecycle event",n)}}class ug extends Error{constructor(e){super(`Unknown event type: ${e}`),this.name="UnknownEventTypeError"}}function dg(e){return{shopId:le(e.shopId),checkoutToken:e.checkoutSessionIdentifier?le(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?le(e.customerId):void 0}}function pg(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return function(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return function(e,t){const n=it(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:le(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?le(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:dg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return function(e,t){const n=it(e.extensionTarget);
2return{event:{...e,appId:le(e.appId),extensionId:e.extensionId?le(e.extensionId):void 0,extensionTarget:n},context:dg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_FETCH":return function(e,t){const n=it(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:le(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?le(e.extensionId):void 0,registrationId:e.registrationId,extensionTarget:n,placementReference:e.placementReference,durationMs:e.durationMs,httpStatus:e.httpStatus,httpMethod:e.httpMethod,requestUrl:e.requestUrl,context:e.context},context:dg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new ug(e.type)}}(e,t);case"shopify.event.BuyerEvent":return function(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:dg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":case"shopify.checkout.payment_approvals.AgentPaymentApprovalEnteredEvent":return function(e,t){return{event:e,context:dg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new ug(e.eventTypeName)}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class mg{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError"]),this.#u=e.userEvents,this.#N=e.source}#u;#N;willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){const{context:t}=e,n=fc(this.#N),r=parseInt(le(t.shopId),10),a={pageUrl:t.href??window.location.href,shopId:r,checkoutToken:n?le(n):"",eventName:e.type,userToken:t.userToken};if("alertDisplayed"===e.type){const{target:t,value:n,errorType:r,message:i}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...a,errorTarget:t,errorValue:n??void 0,errorType:r,errorMessage:i}})}if("uiExtensionError"===e.type){const{apiVersion:r,appId:i,appName:o,appVersion:s,extensionName:l,placementReference:c,extensionTarget:u,trace:d,code:p,message:m}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...a,extensionApiVersion:r,extensionAppId:i,extensionAppName:o??"",extensionAppVersion:s,extensionName:l,extensionPlacementReference:c??"",errorTarget:u,errorTrace:d??"",errorType:p,errorMessage:m}}),"local"!==e.extensionType&&this.#u.refineryEvent(pg({...void 0===e.placementReference?{extensionTarget:e.extensionTarget,placementReference:void 0}:{extensionTarget:e.extensionTarget,placementReference:e.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_ERROR",apiVersion:e.apiVersion,appId:e.appId,appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId,registrationId:e.registrationId,message:e.message,schemaVersion:1,context:e.context},{shopId:t.shopId,checkoutSessionIdentifier:n,customerId:t.customerId}))}}}const hg="checkout_c1_extension_skeleton_dimensions/3.4";class gg{constructor(e,t,n=!0){this.client=e,this.userEvents=t,this.shouldEmitEvent=n}transmit(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:hg,payload:this.mapEventToMonorailSchema(e)}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}willAccept(e){return"extensionDimension"===e.type}transmitImmediately(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:hg,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}mapEventToMonorailSchema(e){const{context:t,extension:n}=e;return{userToken:t.userToken,customerId:t.customerId,shopId:parseInt(le(t.shopId),10),sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,extensionInstanceId:e.extensionInstanceId,step:e.page,pageLoadId:t.pageLoadId,extensionId:n.extensionId,extensionApiClientId:n.appId,extensionRegistrationId:n.registrationId,extensionType:n.type,extensionPoint:n.extensionPoint.target,extensionPlacementReference:n.placementReference,extensionWidth:e.width,extensionHeight:e.height,viewportWidth:e.viewportWidth,viewportHe
2ight:e.viewportHeight,extensionPositionX:e.positionX,extensionPositionY:e.positionY,publicIdentifier:e.targetPublicIdentifier||e.publicIdentifier,targetPublicIdentifier:e.targetPublicIdentifier,skeletonHeight:e.skeletonHeight,countryCode:e.countryCode,configurationRecordId:t.checkoutProfileId}}}const fg=new Set(["941ed414-846b-48da-ba78-f015038d42a1","b837b75c-d827-4a16-9fe6-0b556bbbcfa2","bead5f8a-a991-4378-8ac3-b757353d3423","3caac7fb-9307-42ea-ad62-5bddbc7fb6c9","800c1727-ae5b-4f7d-be6c-502933f9257d","2382db67-d84b-4c12-a2a7-2ae97e93f8aa","22d72ba7-bed0-4301-9eb1-50b47b797d65","9b1870d3-fdc9-4b48-9143-2dc2715e5f48","62ea86bc-927b-492c-a434-af86abdffa37","df2e3eb6-8403-4239-a060-586ad8e84c4c","9ad836e8-e0d7-41c9-b46e-323373cad94f","cd33b11c-1347-4482-9468-35d3c2466ece","a5f4f09b-f177-41c6-b9f2-4c5af0a06756","742df6b1-ec95-47f4-9bab-c39cff66fa64","580e5211-39d7-4f9b-9feb-61966d75d7d6","90d86972-4f99-40aa-a733-81fb169e125a"]),yg=new Set([...fg,"de6f8c7c-99d4-4ed7-bef3-9bc5485e5afa","81ef0db5-f008-4775-abf0-9eea53e348b9","5a4dcc13-5e28-43d3-8fe0-9047c8b1e9a1","36d82657-0623-44a6-a765-ca8ca2bb1d70","68757a68-0d13-43c7-9d92-389fa35ceae9","fe246ebb-49e3-49f6-bf7b-62a1bfd3fd0c","c2efdc0e-0538-4111-ba60-c300fce86c62","756d9412-1da6-41a5-b317-f590511ead72","cb60c3d0-6406-4e9c-9558-b5088a3f8610","7aaf94fa-1c49-48eb-ad72-32c7d9a3c1da","3f51fa85-5bda-4dbb-bd3a-15711c90bff2","1b8ddc3b-7fb7-46c7-aa56-c5b359d5005c","6cff6580-7b31-4bf4-86de-daea0d733c8d","b6873cb2-1546-469d-921b-f64ecbd95548","4ded2224-9d1e-4861-8c10-bee777c11f7c","d65d9a59-47d0-4bde-a637-4d2df8354d1c","2b415f2a-38a2-4bb1-8df6-509443baef72","1d0d6217-e99f-4c5a-b0c0-f0a0acb29072","f2f6b43a-dc2b-4583-b5df-1023da235bde","7437505c-bad7-4735-977b-c32c56e7a92d","d20aee3b-4068-409d-ad66-88032bd6ee0f","ad9dbcd5-9772-48cc-a914-8a672640661a","86c7aec0-d984-4bdd-b30d-73068c7de1a2","7dd5c930-e1a5-49d7-a9cd-6aa012abd302","d6796644-c5fa-4454-8043-e927276c22f6","3a5daf6a-54b6-40f9-a665-d95de608415b","9b2c4a74-34c5-4394-b13c-74d689e45675","1a828591-4b2f-4784-adf7-c314917c8eb9","c602fcb4-51ba-4524-a0a7-55288b7f810a","baed0a29-534e-4f7f-8123-c72e0ef0a0bd","b64f0497-e450-453a-898f-6e3181fadaed","4aea3abe-18e4-4902-a9e8-241f92c98e4b","b1a20474-31b5-496c-93d9-856734fe321a","d00e75dc-b367-40f9-a37a-95a89a875e9f","6200a1a6-b4a0-4d2b-9733-ab7cccf2aa59","e7e403b2-970f-4341-9ed0-f10f54fc1f33","54aedcf6-a0a7-4ccf-8572-bbbfe9230037","db5704ac-aa91-4fd8-9fae-0e80b98f0882","b471b42d-8e9a-457f-a3c0-88d8e479bb8d","dc14e7f0-c251-4287-ae5e-d6e9f88f3b23","35563e44-df53-4ac0-8562-3710c5f82d8b","506f9167-3a90-463a-a58d-558988306e6b","a6a1267a-f3dc-425b-990b-811748126dc1","b69beea0-269d-4448-84b9-d99e5c05e833","c44a7a57-1140-4fc4-aa9a-8058f665287c","319648e8-8032-48a2-ac6e-ce2f58f8a553","df4e106f-4b61-4585-b3eb-5a53dd01d89e","2f3f3eea-fc1f-4dd7-8f34-26bd31d5163f","12d50b8f-7ef5-4eac-b347-561b9bacd485","e1e4907d-6174-4760-a073-761a6eab7baf"]);class vg{#c;#u;#N;constructor(e){this.#c=e.observability,this.#u=e.userEvents,this.#N=e.source}willAccept(e){return"extensionFetchCall"===e.type}transmit(e){if(!this.willAccept(e))return;const t=e,n=this.#R(t.httpStatus),r="registrationId"in t.extension?t.extension.registrationId:void 0,a=null!=r&&yg.has(r),i={destination:t.destination,isHighValueExtension:a,...n&&{http_status_bucket:n},...t.errorType&&{error_type:t.errorType}},o=t.duration??0;if(this.#c.histogram({name:"extension_fetch_call_duration",value:o,unit:"ms",attributes:i}),a&&"type"in t.extension&&"registrationId"in t.extension&&("persisted"===t.extension.type||"global"===t.extension.type)&&this.#c.log("extension_fetch_call_duration","Extension fetch call duration",{value:o,unit:"ms",appId:t.extension.appId,extensionRegistrationId:t.extension.registrationId,...i}),"local"!==t.extension.type&&"storefront"!==t.destination){const e=fc(this.#N);this.#u.refineryEvent(pg({eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_FETCH",apiVersion:t.extension.apiVersion,appId:t.extension.appId,appApiKey:t.extension.appApiKey,appVersion:t.extension.version,extensionId:t.extension.extensionId,registrationId:t.extension.registrationId,extensionTarget:t.extension.extensionPoint.target,placementReference:t.extension.placementReference,durationMs:t.duration,httpStatus:t.httpStatus,httpMethod:t.httpMethod,requestUrl:t.requestUrl,context:t.context},{shopId:t.context.shopId,checkoutSessionIdentifier:e,customerId:t.context.customerId}))}}transmitImmediately(e){this.transmit(e)}#R(e){if(void 0!==e)return String(100*Math.floor(e/100))}}class _g{#N;#u;constructor(e){this.#N=e.source,this.#u=e.userEvents}willAccept(e){if("extensionLifecycle"!==e.type)return!1;const{extension:t,phase:n}=e;return("mountStart"===n||"mountSuccess"===n||"mountError"===n)&&null!=t}transmit(e){if(!this.willAccept(e))return;const{extension:t,mountId:n}=e,r=fc(this.#N),a={...void 0===t.placementReference?{extensionTarget:t.extensionPoint.target,placementReference:void 0}:{extensionTarget:t.extensionPoint.target,placementReference:t.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",apiVersion:t.apiVersion,appId:t.appId,appApiKey:t.appApiKey,appVersion:t.version,extensionId:t.extensionId,mou
2ntId:n,registrationId:t.registrationId,schemaVersion:1,context:e.context};let i;var o;i="mountStart"===e.phase?{...a,type:"UI_EXTENSION_MOUNT_START"}:{...a,type:"UI_EXTENSION_MOUNT_END",durationMs:e.duration??0,...e.error?.name&&{failureErrorName:e.error.name},mountOutcome:"mountSuccess"===e.phase?"SUCCESS":(o=e.error,o?.name&&ot(o.name)?"APP_FAILURE":"OTHER_FAILURE")},this.#u.refineryEvent(pg(i,{shopId:e.context.shopId,checkoutSessionIdentifier:r,customerId:e.context.customerId}))}}const bg=["buyerUsable","timeToFirstMeaningfulCheckoutInteraction","apiObjectEnd","apiRead","appMetafieldsLoadEnd","sandboxIframeLoadEnd","postPurchaseIframeLoadEnd","sandboxJsFetchEnd","sandboxJsFetchPostPurchaseEnd","sandboxJsFetch2023_04End","sandboxJsFetch2025_07End","sandboxPolyfillFetchEnd","sandboxJsEvalEnd","sandboxJsEval2025_07End","sandboxJsEval2023_04End","partnerJsFetchEnd","partnerJsEvalEnd","executionEnd","partnerJsExecEnd","skeletonEnd","timeToSettleEnd"],kg=Object.values({updateAttribute:"updateAttribute",removeAttribute:"removeAttribute",addCartLine:"addCartLine",updateCartLine:"updateCartLine",removeCartLine:"removeCartLine",addDiscountCode:"addDiscountCode",removeDiscountCode:"removeDiscountCode",addGiftCard:"addGiftCard",removeGiftCard:"removeGiftCard",updateMetafield:"updateMetafield",removeMetafield:"removeMetafield",updateCartMetafield:"updateCartMetafield",removeCartMetafield:"removeCartMetafield",updateNote:"updateNote",removeNote:"removeNote",updateShippingAddress:"updateShippingAddress",updatePaymentMethodAttributes:"updatePaymentMethodAttributes",redeemableAddChange:"redeemableAddChange",changeVisitorConsent:"changeVisitorConsent"}),Pg=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...kg.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"];class Sg{constructor(){this.type="extensionBuyerJourneyBlock"}map(e){if(e.type!==this.type)return;const t=e.extension.registrationId;return{type:"counter",name:"extension_buyer_journey_block_event",value:1,attributes:{isHighValueExtension:null!=t&&yg.has(t)}}}}class wg{constructor(){this.type="extensionInteraction"}map(e){if(e.type!==this.type)return;let t=e.interaction;Pg.includes(t)||(t="unknownEvent");const n=e.error?nl(e.error):void 0;return null==e.duration?{type:"counter",name:"extension_interaction_count_event",value:1,attributes:{event_name:t,validation_error:n}}:{type:"histogram",name:"extension_interaction_distribution_event",value:e.duration,attributes:{event_name:t,validation_error:n}}}}class Cg{constructor(){this.type="extensionLifecycle"}map(e){if(e.type!==this.type)return;if(bg.includes(e.phase))return;const t=e.extension?.registrationId,n={step:e.phase,checkoutType:ng(e.context.apiClientId),isRemoteDom:!!e.extension?.apiVersion&&Dl(e.extension?.apiVersion),isHighValueExtension:null!=t&&yg.has(t)};return void 0!==e.error&&(n.error=nl(e.error)),null==e.duration?{type:"counter",name:"extension_lifecycle_count_event",value:1,attributes:n}:null!=e.duration?{type:"histogram",name:"extension_lifecycle_distribution_event",value:e.duration,attributes:n}:void 0}}class Eg{constructor(e){this.client=e}#M=new Map([new Sg,new wg,new Cg].map(e=>[e.type,e]));willAccept(e){return this.#M.has(e.type)}transmit(e){const t=this.#D(e);if(!t)return;const{name:n,value:r,attributes:a,unit:i,type:o}=t;switch(o){case"histogram":this.client.histogram({name:n,value:r,attributes:a,unit:i});break;case"gauge":this.client.gauge({name:n,value:r,attributes:a,unit:i});break;case"counter":this.client.counter({name:n,value:r,attributes:a,unit:i})}}transmitImmediately(e){this.transmit(e)}#D(e){const t=this.#M.get(e.type);return t?.map(e)}}var xg=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(xg||{});function Ig(e){return function(e){return e.replace(/([a-z])([A-Z]+)/g,(e,t,n)=>`${t} ${n}`).replace(/([A-Z])([A-Z]+)([^a-zA-Z0-9]*)$/,(e,t,n,r)=>t+n.toLowerCase()+r).replace(/([A-Z]+)([A-Z][a-z])/g,(e,t,n)=>`${t.toLowerCase()} ${n}`)}(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(e=>e.toLowerCase()).join("_")}class Ag{constructor(e,t=!0){this.client=e,this.shouldEmitEvent=t,this.acceptableEventType=new Set(["extensionLifecycle","extensionInteraction","extensionUiInteraction","extensionBuyerJourneyBlock","extensionFetchCall","click","change","inventoryPriceChange","autofill","
2impression","moreShippingOptions","deliveryMacroInteraction","splitShipAndPickupIntent"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:xg.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:xg.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}commonExtensionEventFields(e){return null===e.extension?{}:{extensionId:e.extension.extensionId,extensionApiClientId:e.extension.appId,extensionRegistrationId:e.extension.registrationId,extensionPublicIdentifier:e.extension.publicIdentifier,extensionTargetPublicIdentifier:e.extension.targetPublicIdentifier,extensionType:e.extension.type,extensionPoint:e.extension.extensionPoint.target,extensionPlacementReference:e.extension.placementReference,section:e.section}}mapEventToMonorailSchema(e){const{context:t,timestamp:n,type:r}=e,a={frontendEventTimestampEpochMs:n.getTime(),userToken:t.userToken,customerId:t.customerId,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,checkoutProfileId:t.checkoutProfileId,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,identityProvider:t.identityProvider,sourceDesign:t.sourceDesign,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,frontendEventTimeZone:t.frontendEventTimeZone,companyContactId:t.companyContactId,companyLocationId:t.companyLocationId,checkoutToDraft:t.checkoutToDraft,editableShippingAddress:t.editableShippingAddress,payNowOnly:t.payNowOnly,clientIp:t.clientIp,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion,serverRendered:t.serverRendered,clientHydrated:t.clientHydrated,pageLoadId:t.pageLoadId};switch(r){case"change":{const t="tel"===e.element.type||"email"===e.element.name?"contact":e.element.name;return{...a,eventName:(t?`${Ig(t)}_`:"")+"field_value_changed",eventType:`${e.element.type?`${e.element.type}_`:""}${e.element.tagName.toLowerCase()}_change`,fieldValue:e.element.value,labelValue:e.element.label,section:e.section}}case"click":return{...a,eventName:(e.element.textContent?`${Ig(e.element.textContent)}_`:"")+"clicked",eventType:`${e.element.tagName.toLowerCase()}_click`,labelValue:e.element.label,section:e.section,identityProvider:e.identityProvider};case"autofill":return{...a,eventName:`${Ig(e.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${Ig(e.source)}_autofill`,section:e.section};case"extensionLifecycle":{const t=e=>{switch(e){case"mountError":return"extension_mount_failed";case"mountStart":return"extension_mount_started";case"mountSuccess":return"extension_mount_ended";case"sandboxIframeLoadEnd":return"extension_sandbox_iframe_load_ended";case"postPurchaseIframeLoadEnd":return"extension_post_purchase_iframe_load_ended";case"sandboxJsFetchEnd":return"extension_sandbox_js_fetch_ended";case"sandboxJsFetchPostPurchaseEnd":return"extension_sandbox_js_fetch_post_purchase_ended";case"sandboxJsFetch2023_04End":return"extension_sandbox_js_fetch_2023_04_ended";case"sandboxJsFetch2025_07End":return"extension_sandbox_js_fetch_2025_07_ended";case"sandboxPolyfillFetchEnd":return"extension_sandbox_polyfill_fetch_ended";case"sandboxJsEvalEnd":return"extension_sandbox_js_eval_ended";case"sandboxJsEval2025_07End":return"extension_sandbox_js_eval_2025_07_ended";case"sandboxJsEval2023_04End":return"extension_sandbox_js_eval_2023_04_ended";case"partnerJsFetchEnd":return"extension_partner_js_fetch_ended";case"partnerJsEvalEnd":return"extension_partner_js_eval_ended";case"partnerJsExecEnd":return"extension_partner_js_exec_ended";case"apiObjectEnd":return"extension_api_object_ended";case"apiRead":return"extension_api_read";case"appMetafieldsLoadEnd":return"extension_app_metafields_load_ended";case"jsLoadingEnd":return"extension_js_loading_ended";case"executionEnd":return"extension_execution_ended";case"skeletonEnd":return"extension_skeleton_ended";case"visible":return"extension_visible";case"buyerUsable":return"extension_buyer_usable";case"waitTimeAfterExecution":return"extension_wait_time_after_execution";case"checkoutProfileChangeDestroy":return"extension_destroyed_by_checkout_profile_change";case"timeToFirstMeaningfulCheckoutInteraction":return"extension_time_to_first_meaningful_checkout_interaction";case"timeToSettleEnd":return"extension_time_to_settle_ended";default:return`extension_${e}`}};return{...a,...void 0!==e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...void 0!==e.eventValue&&{eventValue:e.eventValue.toString()},...void 0!==e.apiPropertyName&&{eventValue:e.apiPropertyName},...this.commonExtensionEventFields(e),eventName:t(e.phase),eventType:"extension_lifecycle",step:e.page,extensionInstanceId:e.instanceId,...e.mountId&&{mountId:e.mountId},...void 0!==e.ttsCompletionReason&&{extensionTtsCompletionReason:e.ttsCompletionReason}
2,...void 0!==e.ttsRenderObserved&&{extensionTtsRenderObserved:e.ttsRenderObserved},...void 0!==e.ttsRequestCount&&{extensionTtsRequestCount:e.ttsRequestCount},initialLoad:e.initialPageLoad,transferredBundleSize:e.transferredBundleSize,bundleSize:e.bundleSize,validationErrors:e.error?[rl(e.error)]:[]}}case"extensionFetchCall":return{...a,...this.commonExtensionEventFields(e),eventName:e.errorType?"extension_network_call_errored":"extension_network_call_ended",eventType:"extension_lifecycle",frontendEventsTimeDifferenceMs:Math.round(e.duration),fetchDestination:e.origin,fetchHttpStatus:e.httpStatus,fetchErrorType:e.errorType};case"extensionBuyerJourneyBlock":return{...a,...this.commonExtensionEventFields(e),eventName:"extension_buyer_journey_blocked",eventType:"extension_buyer_journey_block_progress",eventValue:e.reason,validationErrors:e.validationErrors.map(e=>JSON.stringify(e))};case"extensionInteraction":{const t=e=>{switch(e){case"updateNoteStart":return"note_update_started";case"updateNoteSuccess":return"note_update_succeeded";case"updateNoteError":return"note_update_errored";case"removeNoteStart":return"note_remove_started";case"removeNoteSuccess":return"note_remove_succeeded";case"removeNoteError":return"note_remove_errored";case"updateMetafieldStart":return"metafield_update_started";case"updateMetafieldSuccess":return"metafield_update_succeeded";case"updateMetafieldError":return"metafield_update_errored";case"removeMetafieldStart":return"metafield_remove_started";case"removeMetafieldSuccess":return"metafield_remove_succeeded";case"removeMetafieldError":return"metafield_remove_errored";case"updateCartMetafieldStart":return"cart_metafield_update_started";case"updateCartMetafieldSuccess":return"cart_metafield_update_succeeded";case"updateCartMetafieldError":return"cart_metafield_update_errored";case"removeCartMetafieldStart":return"cart_metafield_remove_started";case"removeCartMetafieldSuccess":return"cart_metafield_remove_succeeded";case"removeCartMetafieldError":return"cart_metafield_remove_errored";case"updateAttributeStart":return"attribute_update_started";case"updateAttributeSuccess":return"attribute_update_succeeded";case"updateAttributeError":return"attribute_update_errored";case"removeAttributeStart":return"attribute_remove_started";case"removeAttributeSuccess":return"attribute_remove_succeeded";case"removeAttributeError":return"attribute_remove_errored";case"addCartLineStart":return"cart_line_add_started";case"removeCartLineStart":return"cart_line_remove_started";case"updateCartLineStart":return"cart_line_update_started";case"addCartLineSuccess":return"cart_line_add_succeeded";case"addCartLineError":return"cart_line_add_errored";case"removeCartLineSuccess":return"cart_line_remove_succeeded";case"removeCartLineError":return"cart_line_remove_errored";case"updateCartLineError":return"cart_line_update_errored";case"updateCartLineSuccess":return"cart_line_update_succeeded";case"addDiscountCodeStart":return"discount_code_add_started";case"addDiscountCodeSuccess":return"discount_code_add_succeeded";case"addDiscountCodeError":return"discount_code_add_errored";case"removeDiscountCodeStart":return"discount_code_remove_started";case"removeDiscountCodeSuccess":return"discount_code_remove_succeeded";case"removeDiscountCodeError":return"discount_code_remove_errored";case"addGiftCardStart":return"gift_card_add_started";case"removeGiftCardStart":return"gift_card_remove_started";case"addGiftCardSuccess":return"gift_card_add_succeeded";case"removeGiftCardSuccess":return"gift_card_remove_succeeded";case"addGiftCardError":return"gift_card_add_errored";case"removeGiftCardError":return"gift_card_remove_errored";case"getSessionToken":return"session_token_retrieved";case"getSessionTokenError":return"session_token_retrieval_errored";case"getSessionTokenCached":return"cached_session_token_retrieved";case"storefrontApiTokenRefresh":return"storefront_api_token_refreshed";case"storefrontApiQueryStart":return"storefront_api_query_started";case"storefrontApiQueryError":return"storefront_api_query_errored";case"storefrontApiQuerySuccess":return"storefront_api_query_succeeded";case"storefrontResponseParseError":return"storefront_response_parse_errored";case"updateShippingAddressStart":return"shipping_address_update_started";case"updateShippingAddressSuccess":return"shipping_address_update_succeeded";case"updateShippingAddressError":return"shipping_address_update_errored";case"buyerJourneyInterceptor":return"buyer_journey_intercept_ran";case"redeemableAddChangeStart":return"redeemable_add_started";case"redeemableAddChangeSuccess":return"redeemable_add_succeeded";case"redeemableAddChangeError":return"redeemable_add_errored";case"updatePaymentMethodAttributesStart":return"payment_method_attributes_change_started";case"updatePaymentMethodAttributesSuccess":return"payment_method_attributes_change_succeeded";case"updatePaymentMethodAttributesError":return"payment_method_attributes_change_errored";case"changeVisitorConsentStart":return"visitor_consent_change_started";case"changeVisitorConsentSuccess":return"visitor_consent_change_succeeded";case"changeVisitorConsentError":return"visitor_consent_change_errored";case"marketDriverChangeShippingAddressCountryCode":return"market_driver_change_shipping_address_country_code";default:return"unknown_event"}};return{...a,...e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...this.commonExtensionEventFields(e),eventName:`extension_${t(e.interaction)}
2`,eventType:"extension_interaction",validationErrors:e.error?[rl(e.error)]:[],extensionInstanceId:e.extensionInstanceId,initialLoad:e.initialLoad,...e.eventId&&{eventValue:e.eventId},...void 0!==e.throttleCounter&&{throttleCounter:e.throttleCounter}}}case"extensionUiInteraction":{const t=e=>{switch(e){case"modalOpen":return"modal_opened";case"modalClose":return"modal_closed";case"modalRender":return"modal_rendered";case"mapRender":return"map_rendered";case"sheetOpen":return"sheet_opened";case"sheetClose":return"sheet_closed";case"sheetRender":return"sheet_rendered";case"announcementExpanded":return"announcement_expanded";case"announcementCollapsed":return"announcement_collapsed";case"announcementDismissedFromHost":return"announcement_dismissed_from_host";case"announcementDismissedFromExtension":return"announcement_dismissed_from_extension"}},n=e=>{switch(e){case"modalOpen":case"modalClose":case"sheetOpen":case"sheetClose":case"announcementExpanded":case"announcementCollapsed":case"announcementDismissedFromHost":case"announcementDismissedFromExtension":return"component_buyer_interaction";case"modalRender":case"sheetRender":case"mapRender":return"component_lifecycle"}};return{...a,componentType:e.componentType,componentInstanceId:e.componentInstanceId,...this.commonExtensionEventFields(e),eventName:t(e.interaction),eventType:n(e.interaction)}}case"impression":return{...a,eventType:"impression",eventName:`${e.impressionType}_impression`,eventValue:e.eventValue,impressionFeatures:e.impressionFeatures,section:e.section,identityProvider:e.identityProvider,..."delivery_macros"===e.impressionType?Tg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[]):{}};case"moreShippingOptions":return{...a,eventType:"more_shipping_options",eventName:e.subEvent,...Tg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"deliveryMacroInteraction":return{...a,eventType:"delivery_macro_interaction",eventName:e.subEvent,...Tg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"splitShipAndPickupIntent":return{...a,eventType:"split_ship_and_pickup",eventName:"split_ship_and_pickup_intended"};default:return{...a,eventName:"unknown_interaction_event",eventType:"interaction"}}}}function Tg(e,t,n){return{shippingNumSplits:n?.length,splitShippingDeliveryGroups:JSON.stringify(n.map(e=>({id:e.id,numItems:e.targetMerchandiseLines?.length??0,productItemIds:e.targetMerchandiseLines?.map(e=>e.id?le(e.id):"")??[],deliveryMethods:e.methods.map(e=>({title:e.title,handle:e.handle,cost:e.cost.amount,deliveryEstimate:e.deliveryPromisePresentmentTitle?.long}))}))),splitShippingMacros:JSON.stringify(t.map(t=>({selected:e?.id===t.id,handle:t.id,cost:t.cost.amount,title:t.title,methods:Object.entries(t.deliveryMethodHandles).map(([e,t])=>({deliveryGroup:e,deliveryMethod:t}))})))}}class Lg{constructor(e){this.client=e,this.acceptableEventType=new Set(["receiptError","paymentError","violationError","addressError"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}mapEventToMonorailSchema(e){const{context:t,type:n}=e,r={userToken:t.userToken,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,sourceDesign:t.sourceDesign,requestId:t.requestId,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion};switch(n){case"receiptError":return{...r,errorMessage:e.error.message||"",eventName:"receipt_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"addressError":return{...r,errorMessage:e.error.message||"",eventName:"address_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"paymentError":return{...r,errorMessage:e.error.message||"",eventName:"payment_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"violationError":return{...r,errorMessage:e.error.message||"",eventName:"validation_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""}}return{...r,errorMessage:"Unknown error",eventName:"error",eventType:"interaction_error",errorReason:"",silencedViolation:!1,errorOrigin:"unknown",errorType:"unknown"}}}class Ng{constructor(e,t=!0){this.observability=e,this.shouldEmitEvent=t,this.acceptedTypes=new Set(["click"])}willAccept(e){return this.acceptedTypes.has(e.type)}transmit(e){if(!this.shouldEmitEvent)return;const t=this.createDescriptiveLogName(e),{context:n,...r}=e;this.observability.log("telemetry_events_adapter_event_transmitted",t,r)}createDescriptiveLogName(e){const{section:t,type:n,element:r}=e;return[t,n,r.tagName.toLowerCase()].join("_")}}class Rg{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError","pageViewed","sectionComplete","shippingMethodSelected","shippingMethodsFilled","sectionInteraction","pageSubmit","dom_
2clicked","dom_input_focused","dom_input_blurred","dom_input_changed"]),this.webPixels=e.webPixels}willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){"pageViewed"===e.type&&this.webPixels.publish("page_viewed",{});const t=function(e){return JSON.stringify(e,(e,t)=>"timestamp"===e||"webPixelCheckout"===e?"":t)}(e);if(t!==this.mostRecentEvent){if(this.mostRecentEvent=t,"shippingMethodsFilled"===e.type||"shippingMethodSelected"===e.type){const t=Mg(e),n=(t?.delivery?.selectedDeliveryOptions??[]).some(e=>"shipping"===e.type);t&&n&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("sectionComplete"===e.type){const t=Mg(e);if(t)switch(e.section){case"contact":this.webPixels.publish("checkout_contact_info_submitted",{checkout:t});break;case"deliveryAddress":this.webPixels.publish("checkout_address_info_submitted",{checkout:t})}}if("pageSubmit"===e.type){const t=Mg(e);t&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("alertDisplayed"===e.type&&this.webPixels.publish("alert_displayed",{alert:{target:e.target,value:e.value,type:e.errorType,message:e.message}}),"uiExtensionError"===e.type&&this.webPixels.publish("ui_extension_errored",{error:{apiVersion:e.apiVersion,appId:e.appId,appName:e.appName??"",appVersion:e.appVersion,extensionName:e.extensionName,message:e.message,placementReference:e.placementReference??null,extensionTarget:e.extensionTarget,trace:e.trace??"",type:e.code}}),function(e){return e.type.startsWith("dom")}(e))if(function(e){return"dom_clicked"===e.type}(e))this.webPixels.publishDomEvent("clicked",{...st(e,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const t=e.type.replace("dom_","");this.webPixels.publishDomEvent(t,{element:e.element})}}}}function Mg(e){return Uc({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}const Dg=re("EventHubContext");function Og({children:e}){const{observability:t,userEvents:n,shopPay:a,checkout:{identity:i},source:o,router:s,consentManager:l}=ie(),c="shopPay"===i.current.value,u=eg(),p=Yh(),m=r(()=>{const e=[new Ag(n,p),new Lg(n),new Eg(t),new gg(t,n,p),new vg({observability:t,userEvents:n,source:o}),new _g({userEvents:n,source:o}),new Ng(t,p),new Rg({webPixels:u}),new cg({observability:t,userEvents:n,shopPay:a,isShopPayActive:c,router:s,consentManager:l}),new mg({userEvents:n,source:o})];return new zg(e)},[t,n,a,c,u,o,p,s,l]);return d(Dg.Provider,{value:m,children:e})}class zg{constructor(e){this.clients=e}emit(e){this.transmit(e)}transmit(e){this.clients.forEach(t=>{t.willAccept(e)&&(e.transmitImmediately&&t.transmitImmediately?t.transmitImmediately(e):t.transmit(e))})}}function Bg(){const{client:e,shop:t,checkout:n,i18n:a,source:i,mobileCheckoutSdk:o,router:s}=ie(),{currentPage:l}=ac().value,{pathname:c}=s.currentUrl.value,u=qh(),d=u?.trackingUnique??lt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??lt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=n.negotiator.current.fields.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=jc(),f=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:y}=n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,v=ct(),{value:_}=n.negotiator.current.fields.deliveryNext,{selectedMacro:b}=Uh(),k=Ql({base:!0,small:!1}),P=n.configuration.layout.isOnePage.value,S="shopPay"===n.identity.current.value,w=navigator.connection?.effectiveType??"unknown",C=e.unstable_getSerialization("requestId"),E=l?.id,x=e.unstable_getSerialization("apiClientId")??0,I=e.unstable_getSerialization("workerVersion")??"proxy",A=e.unstable_getSerialization("serverHandling")??"proxy";let T="c1_legacy";P&&(T="c1_redesign"),S&&(T="shop_pay");const L=ut(_),{deliveryMacros:N}=n.negotiator.parts,R=N.value,{isServerRendered:M}=e.initialRequest,D=n.configuration.profileId.value;return r(()=>({userToken:d,trackingVisit:p,customerId:m?.id,shopId:t.id,sessionToken:h,checkoutToken:i.checkoutSessionIdentifier,checkoutProfileId:D?parseInt(le(D),10):void 0,apiClientId:x,sourceId:i.sourceId,sourceType:i.type,identityProvi
2der:void 0,sourceDesign:T,deviceType:k?"mobile":"desktop",locale:a.locale,currency:a.currency,browser:navigator.userAgent,browserConnectionType:w,frontendEventTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,clientIp:"0.0.0.0",userAgent:navigator.userAgent,companyContactId:f?m?.id:void 0,companyLocationId:f?.location.id,companyId:f?.company.id,checkoutToDraft:v.value,editableShippingAddress:g.value,payNowOnly:!y&&!v.value,shippingRequired:n.isShippingRequired.value,requestId:C,step:E,pathname:c,checkoutSdkSchemaVersion:o.config.schema||void 0,checkoutSdkVersion:o.config.version||void 0,checkoutSdkVariant:o.variant.value?.toUpperCase(),workerVersion:I,serverHandling:A,reviewPageRequired:t.confirmationPageEnabled,serverRendered:M,clientHydrated:M,..."filled"===_?.status?{selectedDeliveryMacro:L?b:void 0,deliveryMacros:L?R:[],deliveryLines:_.lines.filter(qe)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:dt}),[d,p,m?.id,t.id,t.confirmationPageEnabled,h,i.checkoutSessionIdentifier,i.sourceId,i.type,D,x,T,k,a.locale,a.currency,w,f,v.value,g.value,y,n.isShippingRequired.value,C,E,c,o,I,A,_,L,b,R,M])}function Vg(){if("undefined"==typeof window)return Fg;const{shop:e,consentManager:t,source:r,i18n:a,checkout:{negotiator:i}}=ie(),o=ae(Dg),s=Bg(),l=oe(s),c=i.parts;return n((n,s)=>{o.emit({type:n,context:{...l.current,href:window.location.href,consent:ec(t),webPixelCheckout:qc({type:n,step:l.current.step,section:s.section},{negotiated:i,proposedParts:c,source:r,locale:a.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...s})},[o,l,e,t,i,c,r,a])}function Fg(){}function Ug(e,t){const{router:n}=ie();a(()=>{if(""!==n.currentUrl.peek().hash)return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function qg(){const e=Vg(),{client:t}=ie();return n(n=>{if(!t.isFirstMeaningfulInteractionMarked.value){const r=performance.now();e("extensionLifecycle",{phase:"timeToFirstMeaningfulCheckoutInteraction",eventValue:r,duration:r,extension:null,section:"extension",initialPageLoad:!0,timestamp:new Date,page:n??""}),t.markFirstMeaningfulInteraction()}},[e,t])}function jg(){const e=Vg(),{observability:t}=ie();return function(n){e("alertDisplayed",n),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:Oc(n)})}}function Hg(){const{checkout:e}=ie(),n=e.configuration.addressSettings.nonBillingAddressSettings;return t(()=>{const e=n.value?.validationEnabled;if(!e)return"BASIC"})}function $g(){const{i18n:e}=ie();return n((t,n)=>pt(e,t,n),[e])}function Yg(){const{i18n:e,checkout:n,shopPay:r}=ie(),a=$g(),i=r.user.installments.isRetryable.value,{paymentMethods:o,paymentDue:s}=n.negotiator.current.fields,l=t(()=>mt(o.value));if(!n.installments.isSupported.value||!l.value)return"";const c=l.value,u=s.value,d=Boolean(c.cbtEnabled&&u&&(c.minPrice.currencyCode!==u.currencyCode||c.maxPrice.currencyCode!==u.currencyCode));if(i)return e.translate("installments.installments_condition_retryable");const p=t=>{switch(t){case"US":return e.translate("installments.installments_country_adjective.US");case"CA":return e.translate("installments.installments_country_adjective.CA");case"GB":return e.translate("installments.installments_country_adjective.GB");default:return t}},m=n.installments.ineligibilityReasons.value,h=!r.user.installments.isRejected.value;if(h&&0===m.length)return"";const g=(h&&m.length>0?m:["user_rejected"]).map(t=>{switch(t){case"amount":return d||c.cbtEnabled&&0===c.availableLoanTypes.length&&u&&u.amount>=c.minPrice.amount&&u.amount<=c.maxPrice.amount?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(c.minPrice.amount,{currency:c.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(c.maxPrice.amount,{currency:c.maxPrice.currencyCode,form:"short"})});case"billing_address":return e.translate("installments.installments_condition_billing_address");case"billing_shipping_country_mismatch":return e.translate("installments.installments_condition_billing_shipping_country_mismatch");case"shipping_address":return e.translate("installments.installments_condition_shipping_address",{listOfCountryCodes:a(c.supportedCountries.map(p),ht.Or)});case"currency":return d&&u&&c.supportedCurrencies.includes(u.currencyCode)?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:a(c.supportedCurrencies,ht.Or)});case"gift_cards":return e.translate("installments.installments_condition_gift_cards");case"subscriptions":return e.translate("installments.installments_condition_subscriptions");case"order_edit":return e.translate("installments.installments_condition_order_edit");case"test_mode":return e.translate("installments.installments_condition_test_mode");default:return e.translate("installments.installments_condition_generic")}});return(c.cbtEnabled?[...new Set(g)]:g).join(" ")}function Wg(e,t){return t?.availableLoanTypes?.includes(e)??!1}function Gg(e){const{retailTraceId:n,deviceId:a,userId:i,locationId:o}=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.customAttributes;return t(()=>{const e=gt(ft,n?.value),t=gt(yt,n?.value),r=gt(vt,n?.value),a=gt(_t,n?.value);return{retailTraceId:e?.value||"",deviceId:t?.value||"",locationId:r?.value||"0",userId:a?.value||"0"}})}().value,{shop:{id:s},source:{checkoutSessionIdentifier:l},checkout:c}=ie(),u=bt(),{value:d}=kt(),p=c.installments.config.value,m=d?.amount?Number(d.amount):0,h=c.installments.isCheckoutEligible.value,g=Yg(),f=Wg("SPLIT_PAY",p),y=Wg("INTEREST",p),v=Wg("ZERO_PERCENT",p),_=d?.currencyCode,b=_||"USD";return r(()=>({userId:parseInt(i,10),shopId:parseInt(le(s),10),locationId:parseInt(o,10),posCheckoutToken:n,stage:e||"",totalOrderValue:m||0,cartItemsCount:u.value||0,installmentsEligible:h||!1,posDeviceId:a,currency:b,shopPayCheckoutToken:l,ineligibilityReason:g,splitPayEligible:f,interestBearingEligible:y,zeroPercentEligible:v}),[e,n,a,i,o,m,h,s,u.value,b,l,g,f,y,v])}function Jg(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.customAttributes;return t(()=>Pt(n.value))}function Kg(e){const{observability:t}=ie(),[n,r]=s(()=>wt(e));return a(()=>{const r=function(e,t){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):(t?.leaveErrorBreadcrumb("[usePersistedState] requestIdleCallback was not available, used setTimeout fallback"),window.setTimeout(e,0))}(()=>{St(e,n)},t);return()=>{!function(e,t){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):"number"==typeof e&&(window.clearTimeout(e),t?.leaveErrorBreadcrumb("[usePersistedState] cancelIdleCallback was not available during cleanup, used clearTimeout fallback"))}(r,t)}},[e,t,n]),[n,r]}function Xg(e,t){const{persistence:n}=ie(),r=n?.get(e,t),a=m(r);return P(()=>{n?.createUpdate(e,t)(a.value)}),a}const Qg=re("AnalyticsContext");function Zg({children:e}){const t=r(()=>new tf,[]);return d(Qg.Provider,{value:t,children:e})}function ef(){return ae(Qg)}class tf{constructor(){this.eventHistory=[],this.listeners=new Set}emit(e){this.eventHistory.push(e);for(const t of this.listeners)t(e)}subscribe(e){this.listeners.add(e);for(const t of this.eventHistory)e(t);return()=>{this.listeners.delete(e)}}}function nf(){const e=ef();return n(t=>e.emit(t),[e])}function rf(e){const t=ef();a(()=>t.subscribe(e),[e,t])}const af=()=>{const{url:e}=ie(),t=e.shopPayRememberMe(),n=uc(),r=n?.redirectUrl?.includes(t);return Boolean(r)};function of({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:r,shop:{id:a},checkout:{identity:i,negotiator:o},source:s}=ie(),l="shopPay"===i.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=t=>t.handle===e,d=t.find(u)?.originLocation?.id,p=t.findIndex(u);return n(e=>r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:e,checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(le(a),10),locationId:d&&le(d),selectedLocationRank:p,userId:c?.id?parseInt(le(c.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}),[c?.id,l,d,t.length,r,p,a,s.checkoutSessionIdentifier])}const sf=580111;function lf(){const{client:e,userEvents:o,i18n:{locale:l},shop:c,source:u,mobileCheckoutSdk:p,checkout:{negotiator:m}}=ie(),h=m.current.fields.buyerIdentity.value?.customerProfile,g=Yh(),f=function(){const e=ac();return t(()=>{const t=e.value.currentPage?.id||e.value.currentDetour?.type;switch(t){case"information":return"contact_information";case"shipping":return"shipping_method";case"payment":return"payment_method";case"review":return"review";case"thankYou":return"thank_you";case"stockProblems":return"stock_problems";case"postPurchase":return"post_purchase";default:return t}})}(),{value:v}=Et(),{value:_}=xt("ONE_TIME_PURCHASE"),b=It(_),k=Boolean(b)&&0===b?.costAfterDiscounts.amount,{value:S}=m.current.fields.taxes,{value:w}=m.current.fields.merchandiseLines,{value:C}=m.current.fields.paymentLines,{value:E}=m.current.fields.discountLines,{value:x}
2=m.current.fields.contactInfo,{value:I}=m.current.fields.buyerIdentity,{value:A}=At(),[T,L]=s("");function N(e){return e.toFixed(2)}function R(e){return parseInt(le(e),10)}!function(){const e=i(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:a}}=ie(),o="shopPay"===a.current.value,s=Be();P(()=>{s.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(le(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:o?"shop_pay":"guest_checkout"}}),e.current=!0)})}();const M=r(()=>k?void 0:b?.costAfterDiscounts?.amount||b?.cost.amount,[k,b?.costAfterDiscounts?.amount,b?.cost?.amount]),D=r(()=>"USD"===A?.currencyCode?A.amount:void 0,[A?.amount,A?.currencyCode]),O=r(()=>w?.lines?.filter(e=>e.productId).map(e=>R(e.productId)),[w?.lines]),z=r(()=>w?.lines?.filter(e=>e.variantId).map(e=>R(e.variantId)),[w?.lines]),B=r(()=>w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":N(t)}),[w?.lines]),V=r(()=>w?.lines?.every(e=>"USD"===e.totalPrice.currencyCode)?w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":N(t)}):void 0,[w?.lines]),F=r(()=>w?.lines?.map(e=>e.quantity),[w?.lines]),U=r(()=>F?.reduce((e,t)=>e+t,0),[F]),q=r(()=>F?.length,[F]),j=r(()=>C?.lines.filter(e=>"giftCard"===e.method.type&&e.cost?.amount).map(e=>N(e.cost.amount)),[C?.lines]),H=r(()=>{if("thank_you"!==f.value&&"post_purchase"!==f.value)return;const e=C?.lines.find(e=>"giftCard"===e.method.type&&e.cost?.amount)?"giftCard":void 0,t=C?.lines.filter(e=>"giftCard"!==e.method.type).map(e=>e.method.type);return t&&t?.length>0?t[0]:e},[C?.lines,f.value]),$=r(()=>E?.lines.reduce((e,t)=>{if(!El(t))return e;let n=e;n||(n=[]);const r=t.amount?.amount;return r&&n.push(N(r)),n},[]),[E]),Y=qh(),W=n(()=>{const t="available_total"===S?.status?S.totalTax.amount:void 0,n=h?.id?R(h.id):void 0,r=h?.fullName||void 0,a=Y?.trackingUnique??lt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),i=Y?.trackingVisit??lt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:"cartNext"===u.type?u.sourceId:void 0,customerId:n,trackingUnique:a,shopId:R(c.id),eventTimestampEpochMs:Date.now(),trackingVisit:i,userAgent:navigator.userAgent,landingPage:e.cookies.get("_landing_page")||void 0,customerEmail:h?.email||x?.email,contentLanguage:l,actionName:"query",remoteIp:void 0,totalPrice:A?.amount?N(A?.amount):void 0,customerName:r,lineItemProductIds:O,lineItemVariantIds:z,lineItemTotalPrice:B,lineItemTotalPriceUsd:V,lineItemQuantity:F,currency:I?.presentmentCurrency||c.currencyCode,totalItemCount:U,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:D?N(D):void 0,apiClientId:sf,currentApiClientId:sf,paymentMethod:H,paymentProviderId:void 0,currentStep:f.value,checkoutToken:u.checkoutSessionIdentifier,totalShipping:M?N(M):void 0,sourceProcessor:"web_checkout",appliedGiftCards:j?.length?j:void 0,subtotalPrice:v?.amount?N(v.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:k.valueOf(),totalTax:t?N(t):void 0,appliedDiscounts:!$||$.length<1?void 0:$,orderId:void 0,distinctItemCount:q,javascriptEnabled:!0,checkoutPlatform:"checkout_one",checkoutSdkVersion:p.config.version||void 0,checkoutSdkSchemaVersion:p.config.schema||void 0,checkoutSdkVariant:p.variant.value?.toUpperCase()}}},[$,S,k,v,j,u,M,A?.amount,D,f,I?.presentmentCurrency,c,U,F,B,V,z,O,h,x,q,l,H,Y,e,p]);return a(()=>{g&&(T!==f.value&&o.monorailEvent(W()),L(f.value))},[T,f.value,o,W,L,g]),d(y,{})}const cf=w({suspenseName:"trekkie",displayName:"Trekkie",load:()=>C(()=>dl(()=>import("./b887ec56.DzE6gwts.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])))});function uf(){const e=eg(),{plan:t}=ac().value,{router:r,i18n:{locale:a},shop:{currencyCode:i,marketDrivenShippingEnabled:o},source:s,checkout:{negotiator:l}}=ie(),c=l.parts,u=uc(),d=dc(),p=n(()=>{const t=Dc({negotiated:l,source:s,proposedParts:c,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});requestAnimationFrame(()=>{e.publish("payment_info_submitted",{checkout:t})})},[l,s,e,c,a,i,o]),m=n(()=>{const t=Dc({negotiated:l,source:s,proposedParts:c,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});e.publish("checkout_started",{checkout:t})},[l,s,e,c,a,i,o]),h=n(()=>
2{if(!u)return;if(d.shouldPrevent())return;const n=Dc({negotiated:l,receipt:u,source:s,orderId:u.orderIdentity.id,customerId:u.customerId||void 0,isFirstOrder:u.isFirstOrder,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});d.markAsEmitted();const c=u.analytics?.checkoutCompletedEventId;let p=!1;function m(){if(p)return;p=!0,window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",h);const a=function(e,t){const n=e.find(e=>e.route===t);return n?mc[n.type]??"unknown":"unknown"}(t.detours,r.currentUrl.value.normalizedPath),i={...c&&{eventId:c},checkoutCompletedPageType:a},o=Object.keys(i).length>0?i:void 0;e.publish("checkout_completed",{checkout:n},o)}function h(){"hidden"===document.visibilityState&&m()}window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",h),"hidden"===document.visibilityState?m():requestAnimationFrame(m)},[u,l,s,e,r,t.detours,a,i,o,d]);return rf(n(e=>{"initiate_checkout"===e.type&&m()},[m])),rf(n(e=>{"add_payment_info"===e.type&&p()},[p])),rf(n(e=>{"complete_checkout"===e.type&&h()},[h])),null}const df=["/processing","/thank-you","/error","/post-purchase"],pf=[rt.DirectCheckoutCheckout,rt.CheckoutPaymentStep,rt.ShopPayInstallmentsAsPaymentMethod,rt.ShopPayAsPaymentMethod];function mf(){qh();const e=nf(),{currentPage:t,currentDetour:n}=ac().value,{userEvents:r,source:i,router:o,checkout:{negotiator:s}}=ie(),l=function(){const[e,t]=Kg(Ct.TrackedSourceId),{source:{sourceId:n}}=ie();return a(()=>{t(n)},[n,t]),n===e}(),c=function(){const[e,t]=Kg(Ct.TrackedCompleteOrderSourceId),n=uc(),r=af(),{source:{sourceId:i}}=ie();return a(()=>{n&&!r&&t(i)},[i,n,r,t]),i===e}(),{normalizedPath:u}=o.currentUrl.value,p=uc(),m=Jg().value,h=Gg(Lt.SHOP_PAY_CHECKOUT_COMPLETE),g=s.current.fields.paymentLines?.value?.lines,f=function(){const{client:e}=ie();return e.unstable_getSerialization("shopPayConfig").redirect_source}(),v=Vg(),_=af();return a(()=>{const r=n?.route??t?.route;if(r){v("pageViewed",{timestamp:new Date});const n=["/"];t&&["onePage"].includes(t.id)&&n.includes(r)?e({type:"one_page_checkout_page_view",url:r}):e({type:"page_view",url:r})}},[t,n,v,e]),oc(n=>{"negotiationStage"in n&&"negotiation"===n.negotiationStage||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})}),a(()=>{p&&(_||c||(e({type:"complete_checkout"}),m&&function(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:se(t.orderIdentity.id)}})}(r,p,h)))},[e,p,_,c,m,r,h]),a(()=>{"cartNext"!==i.type&&"checkout"!==i.type||l||e({type:"initiate_checkout_once_per_checkout",url:u})},[e,u,i.type,l]),a(()=>{const t=o.currentUrl.value.normalizedPath,n=Boolean(Nt(g,"GOOGLE_PAY")),r="cartNext"===i.type||"checkout"===i.type,a=!f||!pf.includes(f);r&&(n&&"/processing"===t||!df.includes(t))&&a&&e({type:"initiate_checkout",url:t})},[]),d(y,{children:[d(lf,{}),d(cf,{}),d(uf,{})]})}const hf=E(function({children:e}){const t=Tt();return d(Zg,{children:[e,d(x,{when:t,children:d(mf,{})})]})});function gf(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r},checkout:{negotiator:a}}=ie(),i=Rt(),{billingAddress:o}=a.parts,s=o.value,{details:l}=Mt(s.countryCode),c=Hg();return oc(a=>
2{if("complete"===a.type&&o&&i.value.defaultAttributes){const a=i.value.defaultAttributes?.uniqToken||"",o=l?.zones?.find(e=>e.code===s.zoneCode)?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.checkoutSessionIdentifier||"",shopId:parseInt(le(t),10),uniqueToken:a,territory:l?.name||"",context:"Billing address",address1:s.address1||"",address2:s.address2||"",city:s.city||"",zone:o||"",zip:s.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:c.value}})}}),null}const ff=re("WebPixelTargetContext"),yf=({children:e,target:t})=>d(ff.Provider,{value:t,children:e});function vf(){const{checkout:e}=ie();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}const _f=w({displayName:"AdminPreviewBar",load:()=>dl(()=>import("./a6e11e56.B6gAyllt.js"),__vite__mapDeps([12,2,1,3,4,5,7,8,9,10,11,13])),suspense:!1});function bf(){const{router:e,source:t,shop:n}=ie(),r="no-preview"!==n.configurationPreviewContext,a=i(e.currentUrl.peek()).current,o=function({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return null!=e.previewScript?.name||"simulated"!==e.type&&!t&&n}({source:t,isThemeEditor:Dt(),hasServerPreviewContext:r});return o?d(_f,{initialUrl:a}):null}function kf(){const e=i(!1);return a(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Pf=f(void 0);function Sf(){const e=h(Pf);if(!e)throw new ge("Missing FocusManager Context ");return e.focusErrors}function wf(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return"rtl"===t||"ltr"===t?t:"rtl"===e.dir?"rtl":"ltr"}function Cf({children:e}){const t=i(new Set),a=kf(),o=(e,t,n)=>e.top===t.top?"ltr"===n?e.left<t.left:e.right>t.right:e.top<t.top,s=n(()=>{let e;for(const n of t.current){if(!n.current)continue;const t={coordinates:n.current.getBoundingClientRect(),ref:n};e&&!o(t.coordinates,e.coordinates,wf(n.current.ownerDocument))||(e=t)}a.current&&e&&function(e){const t=e.ref.current;if(!t)return;if(t.focus({preventScroll:!0}),function({coordinates:e,ref:t}){const n=t.current?.ownerDocument.defaultView??window;return e.top>=0&&e.left>=0&&e.bottom<=n.innerHeight&&e.right<=n.innerWidth}(e))return;""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)");const n=t.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches??!1;t.scrollIntoView({behavior:n?"instant":"smooth"})}(e)},[a]),l=n(e=>(t.current.add(e),()=>t.current.delete(e)),[]),c=r(()=>({requestFocus:l,focusErrors:s,numberOfErrors:()=>t.current.size}),[s,l]);return d(Pf.Provider,{value:c,children:e})}function Ef({active:e}){const t=i(null),n=h(Pf);return l(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function xf(){return h(Pf)}function If(e){return document.activeElement===e}const Af='\n  a[href],\n  area[href],\n  input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]):not([tabindex="-1"]),\n  iframe:not([tabindex="-1"]),\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls]';function Tf(e,t=!0){return!t&&e.matches(Af)?e:e.querySelector(Af)}function Lf(e,t=!0){if(!t&&e.matches(Af))return e;const n=e.querySelectorAll(Af);return n[n.length-1]}function Nf(e){const t=[...document.querySelectorAll(Af)],n=t.findIndex(t=>e===t);return n?t[n+1]:null}function Rf(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts,r=e.current.fields.paymentMethods;return t(()=>{const e=n.value.at(0);if(!e)return null;const t="walletContent"in e.method?e.method.walletContent?.paymentMethodIdentifier:"popupEnabled"in e.method?e.method.paymentMethodIdentifier:void 0,a=r.value?.find(e=>"popupEnabled"in e&&e.popupEnabled&&e.paymentMethodIdentifier===t);return Ot()?null:a&&"name"in a?a.name:null})}var Mf={backgroundPositionVariant:{bottom:"_17kya4u5 _17kya4u0 _1fragemxj",center:"_17kya4u6 _17kya4u1 _1fragemxk",left:"_17kya4u7 _17kya4u2 _1fragemxl",right:"_17kya4u8 _17kya4u3 _1fragemxm",top:"_17kya4u9 _17kya4u4 _1fragemxn"},backgroundRepeatVariant:{noRepeat:"_17kya4uc _17kya4ua _1fragemxo",repeat:"_17kya4ud _17kya4ub _1fragemxp"},backgroundSizeVariant:{cover:"_17kya4ue",contain:"_17kya4uf"},colorLayerVariant:{base:"_17kya4ui _17kya4ug _1fragemy5",control:"_17kya4uj _17kya4uh _1fragemy6"},inert:"_17kya4un _17kya4um _1fragemyb _1fragem11z _1fragem12w",containerName:"_17kya4ul",opacityVariant:{10:"_17kya4uz _17kya4uq _1fragem11l",20:"_17kya4u10 _17kya4ur _1fragem11m",30:"_17kya4u11 _17kya4us _1fragem11n",40:"_17kya4u12 _17kya4ut _1fragem11o",50:"_17kya4u13 _17kya4uu _1fragem11p",60:"_17kya4u14 _17kya4uv _1fragem11q",70:"_17kya4u15 _17kya4uw _1fragem11r",80:"_17kya4u16 _17kya4ux _1fragem11s",90:"_17kya4u17 _17kya4uy _1fragem11t"},overflowHidden:"_17kya4up _17kya4uo _1fragemup _1fragemv4",visuallyHidden:"_17kya4u18 _1fragem121",withAlignment:"_17kya4u19 _1fragem73",vars:{containerNameVar:"var(--_17kya4uk)"}};const Df=Jm(Rp(zd(_(function({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:r="visible",autoFocus:a,background:i="transparent",backgroundHoverAndFocus:o,backgroundFit:s,backgroundImage:l,backgroundPosition:c,backgroundRepeat:u="noRepeat",blockAlignment:p,blockSize:m="auto",border:h="none",borderRadius:g="none",borderStyle:f,borderWidth:y,boxShadow:_,children:k,
2className:P,colorLayer:S,containerName:w,display:C="auto",id:E,inert:x,inlineAlignment:I,inlineSize:A="auto",maxBlockSize:T="none",maxInlineSize:L="none",minBlockSize:N="0",minInlineSize:R="0",opacity:M,overflow:D="visible",padding:O="none",paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j="relative",insetBlock:H,insetInline:$,transform:Y,translate:W,zIndex:G,...J},K){const X=p||I,Q=Op(K,n(e=>{a&&e&&e.focus({preventScroll:!0})},[a])),{className:Z,style:ee,styleElement:te}=Hm({alignItems:I,backgroundColor:i,backgroundColorHoverAndFocus:o,backgroundImage:l,blockSize:m,...Ne({border:h,borderStyle:f,borderWidth:y}),borderRadius:g,boxShadow:_,display:C,inlineSize:A,insetBlock:H,insetInline:$,justifyContent:p,maxBlockSize:T,maxInlineSize:L,minBlockSize:N,minInlineSize:R,padding:O,paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j,transform:Y,zIndex:G},{transforms:{display:X?bd:vd}}),ne=xd(),{Element:re,role:ae}=Zm(t,{defaultElement:ne?"span":"div"}),ie=w?b({[Mf.vars.containerNameVar]:w}):void 0;return d(Of,{condition:x,children:[te,d(re,{"aria-hidden":!("hidden"!==r&&!x)||void 0,"aria-label":e,className:v("exclusive"===r&&Mf.visuallyHidden,l&&s&&Mf.backgroundSizeVariant[s],l&&c&&Mf.backgroundPositionVariant[c],l&&Mf.backgroundRepeatVariant[u],S&&Mf.colorLayerVariant[S],w&&Mf.containerName,X&&Mf.withAlignment,x&&Mf.inert,M&&Mf.opacityVariant[M],"hidden"===D&&Mf.overflowHidden,Z,{notranslate:!1===W},P),id:E,inert:x?" ":void 0,ref:Q,role:ae,style:{...ee,...ie},tabIndex:a?-1:void 0,translate:(!0===W?"yes":void 0)??(!1===W?"no":void 0),...J,children:k})]})}))));function Of({children:e,condition:t}){return null==t?d(y,{children:e}):d(wd.Provider,{value:t,children:e})}var zf={Spinner:"_1ggkr8p4 _1ggkr8p3 _1fragemzf _1fragem4q _1fragemvo _1fragemve _1fragem12k _1fragem12p _1fragem12e",appearanceVariant:{auto:"_1ggkr8p6",accent:"_1ggkr8p7 _1ggkr8p5 _1fragemxq",monochrome:"_1ggkr8p8"},sizeVariant:{"small-200":"_1ggkr8p9",small:"_1ggkr8pa",base:"_1ggkr8pb",large:"_1ggkr8pc",fill:"_1ggkr8pd"},SVG:"_1ggkr8pf _1ggkr8pe _1fragem5u _1fragemzf _1fragemvo _1fragemve"};function Bf({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const a=Hc(),i=Boolean(n&&a),o=function(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}(e),s=v(zf.Spinner,t&&zf.appearanceVariant[t],zf.sizeVariant[o]),l=d("fill"===o||"large"===o?Vf:Ff,{...{"aria-label":n,"aria-hidden":n?void 0:"true"}});return i?d(y,{children:n}):d("div",{className:s,id:r,children:l})}function Vf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:zf.SVG,focusable:"false",...e,children:d("path",{d:"M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0v2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14z"})})}function Ff(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:zf.SVG,focusable:"false",...e,children:d("path",{d:"M20 10c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0v2a8 8 0 1 0 8 8z"})})}var Uf={accessibilityVisibilityVariant:{exclusive:"_19gi7yt1u _19gi7yt1t _1fragem121"},colorVariant:{base:"_19gi7yt1g",subdued:"_19gi7yt1h"},decorationVariant:{none:"_19gi7ytz _19gi7ytx _1fragem128",underline:"_19gi7yt10 _19gi7yty _1fragem129"},fontsVariant:{primary:"_19gi7ytv _19gi7ytt _1fragemyg",secondary:"_19gi7ytw _19gi7ytu _1fragemyh"},kerningVariant:{base:"_19gi7ytc",large100:"_19gi7ytd",large200:"_19gi7yte"},letterCaseVariant:{uppercase:"_19gi7yt8",lowercase:"_19gi7yt9",capitalize:"_19gi7yta",none:"_19gi7ytb"},sizeVariant:{extraSmall:"_19gi7ytm _19gi7ytf _1fragemys",small:"_19gi7ytn _19gi7ytg _1fragemyt",base:"_19gi7yto _19gi7yth _1fragemyu",medium:"_19gi7ytp _19gi7yti _1fragemyv",large:"_19gi7ytq _19gi7ytj _1fragemyw",extraLarge:"_19gi7ytr _19gi7ytk _1fragemyx",extraExtraLarge:"_19gi7yts _19gi7ytl _1fragemyy"},Text:"_19gi7yt0",toneVariant:{auto:"_19gi7yt18",neutral:"_19gi7yt19",info:"_19gi7yt1a _19gi7yt11 _19gi7yt12 _1fragemxt",success:"_19gi7yt1b _19gi7yt11 _19gi7yt13 _1fragemxu",warning:"_19gi7yt1c _19gi7yt11 _19gi7yt14 _1fragemxv",critical:"_19gi7yt1d _19gi7yt11 _19gi7yt15 _1fragemxr",custom:"_19gi7yt1e _19gi7yt11 _19gi7yt16 _1fragemxs",accent:"_19gi7yt1f _19gi7yt17 _1fragemxq"}
2,typeVariant:{address:"_19gi7yt1l",emphasis:"_19gi7yt1m",generic:"_19gi7yt1n",mark:"_19gi7yt1o _19gi7yt1i _1fragem13i",offset:"_19gi7yt1p",redundant:"_19gi7yt1q _19gi7yt1j _1fragem12a",small:"_19gi7yt1r _19gi7ytn _19gi7ytg _1fragemyt",strong:"_19gi7yt1s _19gi7yt1k _1fragemyz"}};const qf=_(function({accessibilityLive:e,accessibilityVisibility:t,children:n,color:r="base",decoration:a,dir:i,display:o="auto",fonts:s,id:l,kerning:c,lang:u,letterCase:p,size:m,translate:h,tone:g="auto",type:f="generic"},_){const b=(e=>{switch(e){case"address":return"address";case"emphasis":return"em";case"generic":return"span";case"mark":return"mark";case"offset":return"i";case"redundant":return"s";case"strong":return"strong";case"small":return"small";default:return console.warn("Invalid Text’s `type`"),"span"}})(f),{className:k,styleElement:P}=Hm({display:o},{transforms:{display:_d}});return d(y,{children:[P,d(b,{"aria-hidden":"hidden"===t||void 0,"aria-live":e,className:"exclusive"===t?Uf.accessibilityVisibilityVariant[t]:v(Uf.Text,a&&Uf.decorationVariant[a],s&&Uf.fontsVariant[s],c&&Uf.kerningVariant[c],p&&Uf.letterCaseVariant[p],m&&Uf.sizeVariant[m],g&&Uf.toneVariant[g],r&&("auto"===g||"neutral"===g)&&Uf.colorVariant[r],f&&Uf.typeVariant[f],k,{notranslate:!1===h}),dir:i,id:l,lang:u,translate:(!0===h?"yes":void 0)??(!1===h?"no":void 0),ref:_,children:n})]})});var jf,Hf={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
2iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},$f={borderVariant:{blockEnd:"_1m2hr9g14",full:"_1m2hr9g15",none:"_1m2hr9g16"},colorLayerVariant:{primary:"_1m2hr9g1l _1m2hr9g1j _1fragemy9",secondary:"_1m2hr9g1m _1m2hr9g1k _1fragemya",tertiary:"_1m2hr9g1n",plain:"_1m2hr9g1o","shop-pay":"_1m2hr9g1p"},Content:"_1m2hr9gx _1m2hr9gw _1fragem11z _1fragem12j _1fragem12d _1fragem12q",disabled:"_1m2hr9g20 _1m2hr9g1z _1fragem11z",displayVariant:{block:"_1m2hr9gm _1m2hr9gk _1fragem5u",inline:"_1m2hr9gn _1m2hr9gl _1fragem6e"},editorDisabled:"_1m2hr9g21",forcedColorsPrimaryFill:"_1m2hr9g22",inlineAlignmentVariant:{center:"_1m2hr9gr _1m2hr9gp _1fragem64 _1fragembj _1fragem124",start:"_1m2hr9gs",end:"_1m2hr9gt _1m2hr9gq _1fragem64 _1fragembt _1fragem125"},loading:"_1m2hr9gv _1m2hr9gu _1fragem11z _1fragemyb",LoadingContent:"_1m2hr9gz _1m2hr9gy _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",ExtendedLoadingContent:"_1m2hr9g11 _1m2hr9g10 _1fragem12q _1fragem12y",segmentVariant:{start:"_1m2hr9g23",end:"_1m2hr9g24"},Spinner:"_1m2hr9g13 _1m2hr9g12 _1fragemwi _1fragem109 _1fragem113",sizeVariant:{small:"_1m2hr9g1v _1m2hr9g1u",base:"_1m2hr9g1w _1m2hr9g1u",large:"_1m2hr9g1x _1m2hr9g1u",extraLarge:"_1m2hr9g1y _1m2hr9g1u"},textDecorationVariant:{underline:"_1m2hr9g1h _1m2hr9g1g _1fragem129",none:"_1m2hr9g1i"},toneVariant:{critical:"_1m2hr9g1q",monochrome:"_1m2hr9g1r",neutral:"_1m2hr9g1s",custom:"_1m2hr9g1t"},verticalAlignVariant:{"text-bottom":"_1m2hr9go"},inMenu:"_1m2hr9g25",inert:"_1m2hr9g26 _1fragemz0"};const Yf=ym(fm(qp((jf=_(function({accessibilityLabel:e,accessibilityLive:t,children:n,className:r,disabled:a,command:i,commandFor:o,display:s="block",href:l,id:c,inlineAlignment:u="center",inlineSize:p="auto",loading:m,loadingLabel:h,loadingMode:g="auto",onClick:f,onFocus:y,onMouseEnter:_,overlay:b,segment:k,size:P="base",textDecoration:S,target:w="auto",tone:C="auto",type:E="button",variant:x="auto",verticalAlign:I="baseline",...A},T){const L=a?void 0:l,N=Gf(f)?()=>f?.():void 0,R=Gf(y)?()=>y?.():void 0,M=Gf(_)?()=>_?.():void 0,D=Dp(T),O="auto"===x?"secondary":x,z="shop-pay"===O||"auto"===C?"neutral":C,{className:B,style:V,styleElement:F}=Hm({inlineSize:p},{transforms:{inlineSize:Wf}}),U=Qu(),q=Hc(),{primaryButton:{border:j="none"},secondaryButton:{border:H="full"},link:{typographyDecoration:$="underline"}}=Gm(),Y=Sd(),W=Cd(),G=Ju().editor??!1,J=Boolean(a)&&!G,K="plain"===O,X="in-menu"===O,Q=!m&&J?"full":j,Z=(()=>{switch(O){case"tertiary":return"none";case"secondary":return H;default:return Q}})(),ee=S||("monochrome"===z?"underline":$),te=v("_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",(m||!J)&&!K&&!X&&"neutral"===z&&$f.colorLayerVariant[O],Hf[X?"plain":O],!K&&$f.sizeVariant[P],Z&&!K&&$f.borderVariant[Z],("primary"===O||"shop-pay"===O)&&$f.forcedColorsPrimaryFill,$f.displayVariant[s],"text-bottom"===I&&$f.verticalAlignVariant[I],$f.toneVariant[z],B,(J||W)&&$f.disabled,G&&a&&$f.editorDisabled,W&&$f.inert,m&&$f.loading,$f.textDecorationVariant[K?ee:"none"],k&&$f.segmentVariant[k],X&&$f.inMenu,r),ne=h||U("processing"),re=d("span",{className:v($f.Content,u&&$f.inlineAlignmentVariant[u]),"aria-hidden":m||void 0,children:n}),ae=d("span",{className:v($f.LoadingContent,u&&$f.inlineAlignmentVariant[u],!q&&$f.Spinner),dir:"auto",children:[d(Bf,{accessibilityLabel:ne}),"extended"===g&&!q&&d("span",{className:$f.ExtendedLoadingContent,dir:"auto",children:d(qf,{children:ne})})]}),ie=Lu(),oe=ie?.activatorAttributes,se=void 0!==m;if(L&&void 0===o)return d(Ed.Provider,{value:!0,children:[F,d(Ym,{ariaBusy:se?m:void 0,ariaLabel:m?void 0:e,ariaLive:se?"polite":t,className:te,href:L,id:c,onClick:f,onFocus:y,onMouseEnter:_,overlay:b,ref:D,style:V,target:w,...A,children:[re,m&&ae]})]});const le=Fp(ie,{onClick:N,onFocus:R,onMouseEnter:M});return d(Ed.Provider,{value:!0,children:[F,d("button",{"aria-busy":se?m:void 0,"aria-hidden":!!W||void 0,"aria-label":m?void 0:e,"aria-live":se?"polite":t,className:te,disabled:a||m,form:"submit"===E&&Y?.nested?Y.id:void 0,id:c,ref:D,style:V,type:o?"button":E,tabIndex:W?-1:void 0,...le,...oe,...A,children:[re,m&&ae]})]})}),_((e,t)=>
2{switch(h(Eu)){case"Menu":{const n={...e,size:"base",tone:e.tone||"monochrome",variant:"in-menu",textDecoration:"none",inlineAlignment:"start",inlineSize:"fill"};return d("li",{children:d(jf,{...n,ref:t})})}case"Sheet":{const n={...e,size:"small"};return d(jf,{...n,ref:t})}case"Banner":{const n={...e,tone:"auto"===e.tone||void 0===e.tone&&"plain"!==e.variant?"monochrome":e.tone};return d(jf,{...n,ref:t})}default:return d(jf,{...e,ref:t})}})))));function Wf(e){if("legacy-default"!==e)return"fill"===e?"100%":ud("auto"===e?"fit-content":e)}function Gf(e){return"function"==typeof e}var Jf={Link:"s2kwpi1 s2kwpi0 _1fragemws _1fragem12n _1fragem12p _1fragem12d _1fragem12u _1fragemxw _1fragem12v _1fragemyk",toneVariant:{neutral:"s2kwpi2",monochrome:"s2kwpi3"},textDecorationVariant:{underline:"s2kwpi5 s2kwpi4 _1fragem129",none:"s2kwpi6"},displayVariant:{inline:"s2kwpi8",block:"s2kwpi9 s2kwpi7 _1fragem5u _1fragemzg"},verticalAlignVariant:{"text-bottom":"s2kwpia"}};function Kf({accessibilityLabel:e,accessibilityLive:t,command:n="--auto",commandFor:r,children:a,display:i="inline",href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,target:m="auto",textDecoration:h,tone:g="auto",verticalAlign:f="baseline",overlay:y,..._}){const{link:{typographyDecoration:b="underline"}}=Gm(),k="text-bottom"===f?Jf.verticalAlignVariant[f]:void 0;return o&&void 0===r?d(Ym,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:v(Jf.Link,Jf.toneVariant["auto"===g?"neutral":g],Jf.textDecorationVariant[h||("monochrome"===g?"underline":b)],Jf.displayVariant[i],k),href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,overlay:y,target:m,..._,children:a}):d(Yf,{accessibilityLabel:e,accessibilityLive:t,command:n,commandFor:r,display:i,onClick:c,onFocus:u,onMouseEnter:p,id:s,overlay:y,textDecoration:h,tone:"auto"===g?"neutral":g,variant:"plain",verticalAlign:f,..._,children:a})}var Xf={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const Qf=Jm(Rp(_(function({accessibilityCurrent:e,accessibilityLabel:t,accessibilityRole:n="generic",accessibilityLabelledBy:r,alignContent:a="normal",alignItems:i="normal",background:o,backgroundHoverAndFocus:s,blockSize:l="auto",border:c="none",borderRadius:u="none",borderStyle:p,borderWidth:m,children:h,className:g,columnGap:f,display:_="auto",direction:b="block",gap:k,id:P,inlineSize:S="auto",justifyContent:w="normal",maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",overflow:A="visible",padding:T="none",paddingBlock:L,paddingInline:N,paddingBlockEnd:R,paddingBlockStart:M,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z,...B},V){const{className:F,style:U,styleElement:q}=Hm({alignContent:a,alignItems:i,backgroundColor:o,backgroundColorHoverAndFocus:s,...Ne({border:c,borderStyle:p,borderWidth:m}),blockSize:l,borderRadius:u,columnGap:f,display:_,flexDirection:b,flexWrap:b,gap:k,inlineSize:S,justifyContent:w,maxBlockSize:C,maxInlineSize:E,minBlockSize:x,minInlineSize:I,padding:T,paddingBlock:L,paddingBlockEnd:R,paddingBlockStart:M,paddingInline:N,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z},{transforms:{display:bd,flexDirection:e=>"block"===e?"column":"row",flexWrap:e=>"block"===e?"nowrap":"wrap"}}),j=xd(),{Element:H,role:$}=Zm(n,{defaultElement:j?"span":"div"});return d(y,{children:[q,d(H,{className:v(Xf.Stack,Xf.overflowHidden[A],F,g),role:$,"aria-label":t,"aria-current":e,"aria-labelledby":r,style:U,id:P,...B,ref:V,children:h})]})})));var Zf="_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k";function ey({children:e}){const t=i(null),n=i(null),r=i(null),a=i(document.activeElement);l(()=>{const e=r.current;if(e){const t=Tf(e);t?t.focus():e.focus()}const t=a.current;if(t)return()=>{t.focus()}},[]);const o=e=>{const t=r.current;if(t){const n=e?Tf(t):Lf(t);n?n.focus():t.focus()}};return d(y,{children:[d("button",{className:Zf,ref:t,"aria-hidden":"true",onFocus:()=>o(!1),type:"button"}),I(e,{tabIndex:-1,ref:r}),d("button",{className:Zf,ref:n,"aria-hidden":"true",onFocus:()=>o(!0),type:"button"})]})}const ty="scrollbar-gutter",ny="stable";function ry(){const[e,t]=s(!1),r=i(0),o=i(null),l=i(null),c=n(()=>
2{if(!document.body||o.current)return;const{position:e,top:n,overflow:a}=document.body.style,i=function(e){if(!function(e){return function(e){return window.innerWidth>e.clientWidth}(e)&&(t=window.getComputedStyle(e).getPropertyValue(ty),!t?.split(/\s+/).includes(ny));var t}(e))return null;const t=e.style.getPropertyValue(ty);return e.style.setProperty(ty,ny),t}(document.documentElement);o.current={position:e,top:n,overflow:a},l.current=i,r.current=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${r.current}px`,document.body.style.overflow="hidden",t(!0)},[]),u=n(()=>{if(!document.body)return;var e,n;null!==l.current&&(e=document.documentElement,(n=l.current)?e.style.setProperty(ty,n):e.style.removeProperty(ty),l.current=null);const a=o.current;o.current=null,a&&"fixed"!==a.position&&(document.body.style.position=a.position,document.body.style.top=a.top,document.body.style.overflow=a.overflow,window.scrollTo(0,r.current)),t(!1)},[]);return a(()=>()=>{u()},[u]),{isLocked:e,lock:c,unlock:u}}function ay({children:e,isInvisible:n,onClick:r}){const{lock:i}=ry(),{i18n:o}=ie();a(()=>{i()},[i]);const s=t(()=>n?.value??!1),l=d("div",{children:d(x,{when:s,fallback:d(y,{children:[d("div",{className:"hYGiX"}),d("div",{className:"UGCQu",children:e})]}),children:d("div",{className:"yF8Vq",onClick:r,role:"button",tabIndex:0,"aria-label":o.translate("wallets.scrim.cancel"),onKeyDown:e=>{"Escape"!==e.key&&"Enter"!==e.key||!r||r()},children:e})})});return d(nu,{children:d(ey,{children:l})})}function iy({isOpen:e,isInvisible:t,children:n,onClick:r}){return d(x,{when:e,children:d(ay,{isInvisible:t,onClick:r,children:n})})}function oy({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return d(iy,{isOpen:e,children:d(sy,{handleClose:n,walletName:t,handleFocus:r})})}function sy({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=ie();return d(Df,{children:d(Qf,{gap:"large-400",alignItems:"center",children:[d(qf,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?d(Kf,{tone:"monochrome",onClick:t,children:n}):n})}),d(qf,{children:[d(Kf,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function ly(){const{checkout:{offsitePopupController:e}}=ie(),t=Rf();return d(oy,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const cy={address1:!0,address2:!0,city:!0,company:!0,countryCode:!0,district:!0,firstName:!0,lastName:!0,line2:!0,neighborhood:!0,phone:!0,postalCode:!0,streetName:!0,streetNumber:!0,subdistrict:!0,zoneCode:!0},uy=new Set(Object.values(zt).flat());function dy(e){return Object.hasOwn(cy,e)}function py({address:e,addressSettings:t,countryDetails:n}){if(!e)return!1;const{isRequired:r}=t,a=e.countryCode,i=n&&n.code===a&&!n.isFallback?n:void 0,o=i?new Set(Bt({country:i,editFormat:i.formatting.edit,addressSettings:t})):void 0;for(const s of Object.keys(e))if(dy(s)&&!uy.has(s)&&(!o||o.has(s))&&("postalCode"===s&&i?i.postalCodeRequired:r(s,{countryCode:a}))&&(null==e[s]||0===e[s]?.length))return!1;return!0}const my=re("RequestContext");function hy(){return ae(my)}const gy=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],fy=["JP"];function yy(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:a}={}){const i=_y(e,a);if(!i)return;const{addr:o,details:s,zoneFormat:l}=i;return Vt(o,s,t,n,r,l)}function vy(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const a=_y(e,r);if(!a)return;const{addr:i,details:o,zoneFormat:s}=a;return Ut(i,o,t,n,s)}function _y(e,t){const{i18n:n}=ie(),{details:r}=Mt(e?.countryCode);if(!e)return;if(!r&&e.countryCode)return;const a=r??Ft(void 0,n),i=e.countryCode&&gy.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:a,zoneFormat:i}}function by(e){const{details:t,loading:n}=Mt(e?.countryCode);if(!t||!e||n)return{countryName:void 0,zoneName:void 0,loading:n};const r=t.zones.find(t=>t.code===e.zoneCode)?.name;return{countryName:t.name,zoneName:r,loading:n}}function ky(e){return n(t=>{e.value={coordinates:t.coordinates,address1:t.address1??"",address2:t.address2??"",city:t.city,zoneCode:t.zoneCode,countryCode:t.countryCode,postalCode:t.postalCode,district:t.district,subdistrict:t.subdistrict,streetName:t.streetName,streetNumber:t.streetNumber,line2:t.line2,neighborhood:t.neighborhood}},[e])}const Py=e=>{const t=n((t,n)=>{e[t].value=n},[e]),r=n(()=>{A(()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.company.value=void 0,e.coordinates.value=void 0,e.countryCode.value=void 0,e.firstName.value=void 0,e.lastName.value=void 0,e.name.value=void 0,e.phone.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0,e.district.value=void 0,e.subdistrict.value=void 0})},[e]),a=n(t=>{e[t].value=void 0},[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:r,resetAddressFieldErrors:a}},Sy=(e,t)=>({resetAddressSuggestions:function(){Object.entries(t).forEach(([n])=>{Object.keys(e).includes(n)&&void 0!==e[n].peek()&&(t[n].value=void 0)}),A(()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.countryCode.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0})},resetAddressFieldSuggestions:function(n){t[n].value=void 0,e[n].value=void 0}});function wy(e,t,a,i){const{i18n:o,checkout:s}=ie(),{geolocation:l}=hy(),c=s.configuration.addressSettings.nonBillingAddressSettings.value,u=s.negotiator.current.fields.deliveryNext,{details:d}=Mt(e),{getIsMobilePhoneFieldVisible:p}=Cy(),m=s.address.extendedAddressMode.get(e),h=void 0===i?m:i,g=r(()=>d??l.country,[d,l.country]),f=r(()=>s.address.extendedAddressMode.getFormatFromCountry(g,h),[s.address.extendedAddressMode,h,g]),y=r(()=>a??c,[a,c]),v=r(()=>t??[{value:g.code,label:g.name}],[t,g]);return n((e,t)=>qt(e,t,{addressSettings:y,countryDetails:d,fallbackCountry:l.country,editFormat:f,availableCountries:v,deliveryNextValue:u.value,isMobilePhoneFieldVisible:p(t),additionalFieldsEnabled:null!==h,i18n:o}),[y,d,f,l.country,h,v,u,p,o])}const Cy=()=>{const{checkout:{identity:e},shopPay:t}=ie(),r="shopPay"===e.current.value,a=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:n(e=>r&&!a.value&&"shipping"===e,[r,a])}};function Ey(){const{i18n:e,checkout:{negotiator:n}}=ie(),{shippingAddress:r}=n.parts;return t(()=>{const t=r.fields.firstName.value,n=r.fields.lastName.value,a=r.value.oneTimeUse;return Ht(t)&&Ht(n)&&!a?e.formatName(t,n,!0):null})}function xy(e,t,n,r){const{i18n:a}=ie();
2return function(i){if(e&&n.has(e)){if("label"===i)return a.translate("contact",{scope:r?`optional_${e}`:e});const t=`${n.get(e)}_${i}`;return a.translate("contact",{scope:r?`optional_${t}`:t})}return t}}function Iy({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:a=""}=e,{details:i,loading:o}=Mt(a),{i18n:s}=ie();return function(e,t,n,r,a,i=!1){const{firstName:o="",lastName:s="",address1:l="",address2:c="",city:u="",postalCode:d="",company:p="",zoneCode:m="",countryCode:h=""}=e,g=p;let f=Ny([o,s]),y=Ny([l,c]),v=Ny([u,m??"",d,h],", ");if(r){const t=fy.includes(h),n={countryFormat:t?"explicit":"short",zoneFormat:t?"explicit":"short"};f=function({firstName:e,lastName:t,countryDetails:n,locale:r}){const a=n?.formatting.show;if(!a)return Ny([e,t]);let i="";const o=a.split("_").find(e=>e.includes("{firstName}")||e.includes("{lastName}"));if(o){let n=o.replace("{lastName}",t).replace("{firstName}",e);if(r){const e=r.toLowerCase(),t=e.startsWith("ja")||e.startsWith("zh")||e.startsWith("ko");n.includes("様")&&!e.startsWith("ja")&&(n=n.replace("様","")),i=t?n.trim().replace(/\s+/g,""):n.trim().replace(/\s\s+/g," ")}}else i=Ny([e,t]);return i}({firstName:o,lastName:s,countryDetails:r,locale:a});const l=["address1","address2","firstName","lastName","company",...i?[]:["phone"]];y=Vt(e,r,["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," "),v=Vt(e,r,l,!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," ")}return n?{nameLine:f,companyLine:g,primary:n,secondary:Ny([y,v])}:{nameLine:f,companyLine:g,primary:Ny(["inline"===t?f:"",g,y],", "),secondary:v}}(e,t,n,o?void 0:i,s.locale,r)}function Ay(e){const{checkout:{negotiator:t}}=ie(),n=`${e}Address`,r=t.parts[n].value,{primary:a,secondary:i}=Iy({address:r,nameLinePosition:"inline"});return`${a} ${i}`}function Ty(e,t){const{checkout:n}=ie(),a=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Mt(e),o=i?n.address.extendedAddressMode.getFormatFromCountry(i):void 0;return r(()=>$t({countryDetails:i,format:o,addressSettings:a}),[i,o,a])}function Ly(e,t){const{checkout:r}=ie(),a=t??r.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Mt(e);return n((e,t)=>jt({addressType:e,violations:t,countryDetails:i,format:i?r.address.extendedAddressMode.getFormatFromCountry(i):void 0,addressSettings:a}),[i,a,r.address.extendedAddressMode])}function Ny(e,t=" "){return e.filter(Boolean).join(t)}function Ry(e){return"string"==typeof e?""!==e.trim():null!=e}function My(e){return Object.entries(e).filter(([e,t])=>dy(e)&&Ry(t)).map(([e])=>e)}function Dy(e){return Ry(e.address1)||Ry(e.streetName)}function Oy(e){const t=Object.fromEntries(Object.entries(e).filter(([t,n])=>dy(t)&&Ry(n)&&!function(e,t,n){if("string"!=typeof n)return!1;if("address1"===t){const t=Xt({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Ry(t)&&n.trim()===t?.trim()}if("address2"===t){const t=Qt({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Ry(t)&&n.trim()===t?.trim()}return!1}(e,t,n)).map(([e,t])=>[e,"string"==typeof t?t.trim():t]).sort(([e],[t])=>e.localeCompare(t)));return Kt(JSON.stringify(t))}function zy(e,t,n,r,a,i,o){o.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(le(r),10),checkoutToken:a||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function By(){const{checkout:{negotiator:e}}=ie(),t=e.parts.shippingAddress.value,n=!Zt(t),r=yy(t,{hiddenFields:["phone"]});return!n&&r?r:null}function Vy(e){return"failed"===e.status}function Fy(e){return"payment"===e.type}function Uy(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function qy(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type}function jy(e){return"action_required"===e.status&&"complete_payment_challenge_v2"===e.action.type}function Hy(e){return"complete_payment_challenge"===e.type}function $y(e){return"complete_payment_challenge_v2"===e.type}function Yy(e){return{receiptId:e?.id?de(e.id)??e.id:void 0,status:e?.
2status}}function Wy(e=[]){return e?.flatMap(e=>"submitted"===e.status?e.remotePurchaseOrder.deliveryLines?.map(t=>({...t,shopId:e.shopId}))??[]:[])??[]}function Gy(e){return e.some(({code:e})=>new Set([...en,...tn]).has(e))}function Jy(e){return e.some(({code:e})=>nn.has(e))}function Ky(e){return e.some(e=>rn.has(e.code)&&"RemoveTermViolation"===e.__typename)}function Xy(e){return e.some(e=>an.has(e.code)&&"RemoveTermViolation"===e.__typename)}function Qy(e){const t=nv({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function Zy(e){return nv({subscribedViolations:e,onlySubscribeToProgression:!1})}function ev(e){return nv({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function tv(e){const{checkout:{wallets:t}}=ie(),n=Zy(e);return P(()=>{t.activeSession.value&&n.violations.value.size>0&&o(()=>{n.clearViolations()})}),n}function nv({subscribedViolations:e,onlySubscribeToProgression:r,skipProgressionNegotiations:i}){const{observability:o,checkout:{wallets:s,negotiator:l}}=ie(),{lastJourneyProgression:c,lastNegotiation:u}=l,d=r?c:u,p=m({violations:new Set}),h=t(()=>p.value.violations),g=n(()=>{p.value={violations:new Set}},[p]),f=T(e);return a(()=>d.subscribe(e=>{if(s.activeSession.value)return;if("invalid"===e.type)return void o.log("violations_subscription_invalid_result_detected","Not updating violation subscription because of invalid result",{reasons:e.reasons,beforeViolations:h.value});if("error"!==e.type&&"success"!==e.type)return;if(i&&"progression"!==e.negotiationStage&&"completion"!==e.negotiationStage)return;const t=f.value.size>0,n=e.violations.filter(e=>!t||f.value.has(e.code));p.value={violations:new Set(n),negotiationStage:e.negotiationStage}}),[f,o,s,d,i,p,h]),{snapshot:p,violations:h,clearViolations:g}}function rv(e){const{checkout:t,embed:r}=ie(),o=t.wallets.activeSession.value,l=t.latestReceipt.value,{delegatedPaymentInstrument:c}=t.negotiator.context,[u,d]=s(),p=i(c.peek()),m=n(()=>{d(void 0)},[]),h=n(t=>{e.has(t.code)?d(t.code):d(void 0)},[e]);return a(()=>{o||"failed"===l?.status&&"payment"===l.failure?.type&&h(l.failure)},[o,h,l]),a(()=>{if(!r)return;const e=c.value;e!==p.current&&(p.current=e,e&&d(void 0))},[r,c.value]),{error:u,hasError:Boolean(u),clearError:m}}function av(e){if("failed"===e?.status&&"hsa_qualification"===e.failure.type&&"SURVEY_EXITED"!==e.failure.code)return e.failure}function iv(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(()=>t?void 0:av(n));return a(()=>{t||i(av(n))},[t,n]),{error:r,hasError:void 0!==r}}function ov(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(!1);return a(()=>{t||("failed"===n?.status&&"inventory"===n.failure?.type?i(!0):i(!1))},[t,n]),{hasError:r}}function sv(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(!1);return a(()=>{t||("failed"===n?.status&&"order"===n.failure?.type?i(!0):i(!1))},[t,n]),{hasError:r}}function lv(e){const{checkout:{negotiator:n}}=ie(),{allViolations:r}=n.current.fields;return t(()=>Boolean(r.value?.some(t=>t.code===e)))}function cv(e){return e?"object"==typeof e&&"value"in e?e.value&&"string"==typeof e.value?e.value:e.textValue?e.textValue:"":"string"==typeof e?e:"":""}function uv(){const e=Vg(),{message:t,code:n}=function(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(null),[o,l]=s("");return a(()=>{t||n&&Vy(n)&&("payment"===n.failure.type?(i(n.failure.code??null),l("payment_receipt_error")):l(`${n.failure.type}_receipt_error`))},[n,t]),{hasError:Boolean(o),message:o,code:r}}();a(()=>{(t||n)&&e("receiptError",{error:{message:t,code:n||"",silencedViolation:!1,origin:"server",type:"submit-violation"},timestamp:new Date})},[e,t,n]);const{checkout:{negotiator:r}}=ie(),{directPaymentErrors:i,generalPaymentError:l}=r.parts;P(()=>{const t=i.name.value;t&&o(()=>{const{message:n,origin:r}=t;
2e("paymentError",{error:{message:n,code:"payment_name_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=i.verificationValue.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_cvv_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=i.number.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_number_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=i.expiry.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_expiry_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),P(()=>{const t=l.value;t&&o(()=>{e("paymentError",{error:{message:t,code:"general_payment_error"},timestamp:new Date})})});const c=function(){const[e,t]=s([]),[n,r]=s(null),{violations:i}=Qy(new Set);return oc(e=>{"invalid"===e.type?r(e):r(null)}),a(()=>{let e=null;if(n){const t=n.reasons.filter(e=>e!==Wt.InvalidAddress)[0];t&&(e={message:t,origin:"server",type:"negotiation"})}const r=[];Array.from(i).forEach(e=>{r.push({message:e?.localizedMessage??"",code:e?.code,origin:"server",type:"negotiation"})});const a=[...r];e&&a.push(e),t(a.filter(e=>Boolean(e)))},[n,i]),e}();a(()=>{c?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{e("violationError",{error:{message:cv(t),code:n,field:r,origin:a,type:i},timestamp:new Date})})},[e,c]);const{deliveryMethodsAddressErrors:u}=r.context,d=function(e){const[t,n]=s(null),[r,i]=s([]);return P(()=>{Object.entries(e).forEach(([e,t])=>{const r=t.value;n(t=>{let n=null===t?{}:{...t};return r?n={...n,[e]:r}:delete n[e],0===Object.keys(n).length?null:n})})}),a(()=>{if(t){const e=[];Object.keys(t).forEach(n=>{const{message:r,origin:a,type:i}=t[n];e.push({message:r,code:void 0,field:n,origin:a,type:i})}),i(e)}},[t]),r}(u);return a(()=>{d?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{(t||n||r||a||i)&&e("addressError",{error:{message:cv(t),code:n,field:r,origin:a,type:i,silencedViolation:!1},timestamp:new Date})})},[e,d]),null}function dv(e){return e}function pv(e,t){if(t)return e.find(e=>e.deliveryStrategyHandle===t)}var mv=(e=>(e.TaxExemption="TaxExemption",e.SellingPlanDigest="SellingPlanDigest",e.CompanyLocationChanged="CompanyLocationChanged",e.ShippingAddressIsMissing="ShippingAddressIsMissing",e.PaymentsViolations="PaymentViolations",e.DeliveryViolations="DeliveryViolations",e.DeliveryAddressValidationErrors="DeliveryAddressValidationErrors",e.ReductionViolations="ReductionViolations",e.ContactInformationViolations="ContactInformationViolations",e.TipsViolations="TipsViolations",e.OtherViolations="OtherViolations",e.PaymentSheetViolations="PaymentSheetViolations",e.MerchandiseQuantityRulesNotMet="MerchandiseQuantityRulesNotMet",e.PaymentMethodIncompatibleWithPaymentTerms="PaymentMethodIncompatibleWithPaymentTerms",e))(mv||{});function hv(){const{client:e,shop:t}=ie();if(!t.hasFlagEnabled(un))return null;const n=e.unstable_getSerialization("experiments");return dn(n)}function gv(e){return"thankYou"===e?.type||"postPurchase"===e?.type}function fv(e,t){return void 0!==e.greenPath.find(e=>e.route===t)}const yv=()=>{const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentFlexibilityPaymentTermsTemplate,a=ct();return t(()=>{const t=r.value;return a.value&&!t?e.translate("notice_banner.payment_method_not_available_with_review_requirement"):t?"FULFILLMENT"===t.type?e.translate("notice_banner.payment_method_not_available_with_fulfillment_terms"):"NET"===t.type?e.translate("notice_banner.payment_method_not_available_with_payment_terms",{paymentTerms:t.translatedName}):e.translate("notice_banner.payment_method_not_available_with_fixed_terms"):void 0})},vv=re("ShellContext");function _v({children:e,shell:t}){return d(vv.Provider,{value:t,children:e})}function bv(){return ae(vv)}function kv(){const e=bv(),t=i();if(null!=t.current&&t.current.shell!==e&&(t.current=void 0),null==t.current){const n=new Map,r={};for(const t of Object.keys(e.configuration))Object.defineProperty(r,t,{enumerable:!0,get:()=>(n.has(t)||n.set(t,k(()=>e.configurationSignal.value[t])),n.get(t).value)});
2t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function Pv(){const{checkout:{configuration:e}}=ie(),{orderSummary:t}=kv(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return!n||"VISIBLE"===n}function Sv(e){const{checkout:t,observability:a,router:i,shop:o}=ie(),s=void 0===e||(Array.isArray(e)?e:[e]).some(e=>o.hasFlagEnabled(e)),l=n(e=>{s&&(t.unstable_forceCheckoutLayoutToOnePage(),wv(a,{...e,result:"success"}))},[t,s,a]),c=n((e={wallet:null})=>{if(!s)return;if(!t.isCheckoutLayoutForcedToOnePage.value)return;const n={wallet:e.wallet};a.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:n}),a.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",n),i.navigate("/information",{replace:!0}),t.unstable_clearForcedCheckoutLayout()},[t,s,a,i]);return r(()=>({forceOnePageCheckoutLayout:l,clearForcedCheckoutLayout:c}),[c,l])}function wv(e,t){e.counter({name:"wallet_3page_vaulted_review_layout_switch_attempt",value:1,attributes:t}),e.log("wallet_3page_vaulted_review_layout_switch_attempt","Attempted to force wallet from three-page checkout to one-page vaulted review",t)}function Cv(){const{i18n:e}=ie(),n=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=vn("paymentMethods");return t(()=>!(r.value||!n.value||0===n.value?.length)&&Boolean(n.value?.every(e=>"wallet"===e.type||"walletsPlatform"===e.type||"giftCard"===e.type)))}(),{availableWallets:r}=gn(),a=T(r);return t(()=>{if(!(a.value.length>0)&&n.value)return{code:mv.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function Ev(){const e=Wm(),n=bv(),r=Jp();return t(()=>{const t=e.configurationSignal.value.colors,a=n.configurationSignal.value.main,{current:i,parent:o}=r,s=[i,o].map(e=>e?t.schemes?.[e]?.base?.background:void 0).find(e=>e&&!hn(e));if(s)return s.l<50?"light":"dark";const l=a.colorScheme?t.schemes?.[a.colorScheme]?.base?.background:void 0;return l&&!hn(l)&&l.l<50?"light":"dark"}).value}function xv(){const{shop:{customerAccountRequirement:e},checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,{email:a}=n.parts;return t(()=>{const t=Boolean(!!r.value?.customerProfile&&(r.value.customerProfile.email||a.value));return!("REQUIRED"===e||t)})}function Iv(){const{shop:e,checkout:{negotiator:n}}=ie(),{deliveryNext:r}=n.current.fields,{deliveryLines:a}=n.parts,i=ac(),o=xt("ONE_TIME_PURCHASE");return t(()=>{if(e.shipPickupInOneOrderEnabled){if(gv(i.value.currentDetour))return pn(r.value);const e=a.value.filter(e=>!e.value.deliveryMethodTypes.includes("NONE"));return e.length>0&&e.every(e=>e.value.deliveryMethodTypes.some(mn))}const t=It(o.value);return mn(t?.methodType)})}function Av(){const{checkout:e}=ie(),n=Iv();return t(()=>!n.value&&e.isShippingRequired.value)}function Tv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentMethods;return t(()=>r.value?.find(t=>"wallet"===t.type&&t.name===e))}function Lv(){const{client:e,shop:t,source:r,observability:a}=ie(),i=e.unstable_getSerialization("sessionToken");return n(({postalCode:e,countryCode:n,city:o,zoneCode:s},l)=>{const c={wallet:l,postalCode:e,countryCode:n,city:o,zoneCode:s,shopId:t.id,sourceId:r.sourceId,sourceType:r.type,checkoutSessionIdentifier:r.checkoutSessionIdentifier,sessionToken:i};Hl(e,n)||a.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",c),kn(e,n)&&a.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",c)},[a,t.id,r.sourceId,r.type,r.checkoutSessionIdentifier,i])}function Nv(){try{const e=window.__WALLET_TIMEOUT_MULTIPLIER;if(null==e)return 1;const t=Number(e);return!Number.isFinite(t)||t<1?1:Math.min(t,10)}catch{return 1}}function Rv(){return 1e4*Nv()}function Mv(){return 45e3*Nv()}function Dv(e){const n=e.inMemoryApplePayParts.paymentSheetError,r=e.inMemoryGooglePayParts.paymentSheetError;return t(()=>{const e=n.value;if("unusable_partial_address"===e?.type)return"APPLE_PAY";const t=r.value;return"unusable_partial_address"===t?.type?"GOOGLE_PAY":null})}function Ov({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:i,router:o,shop:s}=ie(),l=o.currentUrl.value,c=s.hasFlagEnabled(un),u=_n(),d=s.hasFlagEnabled(fn),p=i.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=Sv(fn),{queryParam:h,errorMessage:g,errorTitle:f,tone:y}=function(e){const{i18n:t}=ie(),n=yv().value,r=[{queryParam:"wallet_unsupported_apple_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallet_unsupported_google_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallets_payment_invalid_country",errorMessage:t.translate("wallets.errors.generic"),tone:"critical"},{queryParam:"wallet_shipping_country_unavailable",errorMessage:t.translate("shipping_errors.unavailable_address_country"),tone:"critical"},{queryParam:"wallet_currency_change",errorMessage:t.translate("change_country.cart_updated_based_on_country"),tone:"info"},{queryParam:"wallet_captcha_required",errorMessage:t.translate("captcha.errors.not_solved"),tone:"info"},{queryParam:"wallet_payment_method_not_applicable",errorMessage:n||"",tone:"info",condition:()=>Boolean(n)},{queryParam:"wallet_invalid_payment_deferred_payment_required",errorMessage:t.translate("notice_banner.company_location_changed"),tone:"info"},{queryParam:"wallet_not_enough_stock",errorMessage:t.translate("stock.price_and_quantity_update.description"),tone:"info"},{queryParam:"wallet_price_increased",errorMessage:t.translate("payment_errors.order_total_changed"),tone:"info"},{queryParam:yn,errorMessage:t.translate("wallets.errors.subscription_review_required"),tone:"warning"},...["wallet_cart_not_ready","localization_extension_field_error","wallet_processing_failed"].map(e=>({queryParam:e,errorTitle:t.translate("notice_banner.generic_processing_error.title"),errorMessage:t.translate("notice_banner.generic_processing_error.body"),tone:"critical"}))];for(const a of r)if(e.searchParams.has(a.queryParam)){if(a.condition&&!a.condition())continue;return{queryParam:a.queryParam,errorMessage:a.errorMessage||"",errorTitle:a.errorTitle,tone:a.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}(l),v=hv(),_=h===yn&&void 0!==t&&(n??$l({applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),b=_;return a(()=>
2{if(h){_&&t&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&bn({isABTestActive:c,variant:v,isCaliforniaBillingOrShippingAddress:u.value})?(p||m({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),i.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",i.wallets.setHasActiveApplePaySubscriptionReview(!0)):_&&void 0!==t?.value&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,i.wallets.setIsDecelerating(!1));const n=new URL(l);n.searchParams.delete(h),history.replaceState(null,"",n.href)}},[e,t,v,l,m,c,u,p,h,b,_,n,i.wallets]),r(()=>({queryParam:h,errorMessage:g,errorTitle:f,tone:y,shouldSuppressNotice:b}),[h,g,f,y,b])}const zv=()=>n(e=>{const t=e.current;if(t){const e=t.getBoundingClientRect(),n=e.left+e.width/2,r=e.top+e.height/2;t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,clientX:n,clientY:r,screenX:window.screenX+n,screenY:window.screenY+r}))}},[]);Pn.portableWallets.url;const Bv="guest";function Vv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentMethods;return t(()=>r.value?.find(t=>"walletsPlatform"===t.type&&t.name===e))}function Fv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentLines;return t(()=>r.value?.lines.find(t=>"walletsPlatformPaymentMethod"===t.method.type&&t.method.name===e))}function Uv(){const{checkout:{negotiator:e}}=ie(),{email:t,shippingAddress:r,billingAddress:a,billingAddressOption:i,paymentLines:o}=e.parts,s=function(){const{checkout:e}=ie(),t=e.configuration.addressSettings.nonBillingAddressSettings;return n(function({addressSignal:e,buyerDetailsAddress:n}){A(()=>{for(const[r,a]of Object.entries(n)){if("__typename"===r||void 0===a)continue;if("InvalidWalletPrefillingAddress"===n.__typename&&!t.value.isVisible(r))continue;const i=e.fields[r];i&&(i.value=a)}})},[t])}();return n((e,n)=>{n.email&&(t.value=n.email),n.prefillingShippingAddress&&s({addressSignal:r,buyerDetailsAddress:n.prefillingShippingAddress}),n.prefillingBillingAddress&&(i.value="custom",s({addressSignal:a,buyerDetailsAddress:n.prefillingBillingAddress})),n.walletParams&&function({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const a={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},i=e.peek();switch(t){case wn.AmazonPay:case wn.BuyWithPrime:{const[e]=cn(i,[t]),o=n;if(!e||!e.method.walletParams){a.method.walletParams={...o,...r?{email:r}:{}};break}const s=e.method.walletParams;a.method.walletParams={...s,...o,...r?{email:r}:{}}}}e.value=Cn(i,a)}({paymentLineSignal:o,walletName:e,walletParams:n.walletParams,email:n.email??void 0})},[a,i,t,s,o,r])}function qv(e=["phone"]){const{checkout:{negotiator:t}}=ie(),{shippingAddress:n}=t.parts,r=n.value;return{formattedAddress:yy(r,{hiddenFields:e}),address:r}}function jv(){const e=Vv(wn.BuyWithPrime);return t(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return Boolean(n)})}var Hv=(e=>(e.Api="ApplePay::Exception::API",e))(Hv||{}),$v=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))($v||{}),Yv=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(Yv||{});function Wv(e,t,n){return!("SHOP_PAY"===e&&!n)&&(t?.includes("ACCELERATED_CHECKOUT")??!1)}function Gv(e){const{embed:t}=ie(),n=Boolean(t?.isFlagshipPartner)&&!En(t?.embedder),a=e.buttonStatus.value;return r(()=>"error"!==a.status&&"not_eligible"!==a.status&&(!n||"not_rendered"!==a.status),[a.status,n])}function Jv(e,t,n){try{return n()}catch(r){if(r instanceof Error&&"InvalidAccessError"===r.name)return e.log(`apple_pay_session_${t}_error`,`Apple Pay ${t} check failed from insecure context`,{errorName:"InvalidAccessError"}),!1;throw r}}function Kv(e,t=0){const n="undefined"==typeof window?0:window.innerWidth;return n<=279?2:n<=375?e||3===t?3:2:4}function Xv(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e},checkout:{negotiator:n}}=ie(),{shopPayEnabledForSellerOfRecord:r}=n.current.fields;return t(()=>r.value??e)}function Qv(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:n,negotiator:r}}=ie(),a=Xv(),i=Ln(),{deferredTotal:o}=r.current.fields,s=n.current;return t(()=>i.value&&o.value?"deferred_payment":"shopPay"===s.value&&e||a.value?void 0:"shop_pay_disabled")}function Zv(){const e=Qv();return t(()=>void 0===e.value)}function e_(e){const{inMemoryGooglePayParts:o,inMemoryPayPalParts:s,inMemoryAmazonPayParts:l,inMemoryApplePayParts:c,inMemoryVenmoParts:u}=e,{client:{userAgent:d},checkout:{negotiator:p}}=ie(),{value:m}=p.current.fields.paymentMethods,h=m?.some(e=>"wallet"===e.type&&"APPLE_PAY"===e.name)??!1,g=function(e){const n=Dv(e);return t(()=>null!==n.value)}(e);
2!function(e){const t=Dv(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=ie();a(()=>{const e=t.value;n.value||null===e||(r.leaveErrorBreadcrumb("Hiding some wallets due to unusable partial address",{wallet:e}),r.counter({name:"wallets_unusable_partial_address",value:1,attributes:{wallet:e.toString()}}),n.value=!0)},[t.value,r,n])}(e);const f=g.value,y=function({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:a}=ie(),{shippingCountries:i}=a,o=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company"),s=e.sdkStatus.value,l=e.buttonStatus.value,c=n.configuration.layout.isOnePage.value,u=a.hasFlagEnabled(xn);return r(()=>!(o&&!c&&!u||"error"===s.status||"error"===l.status||"not_eligible"===l.status||n.isShippingRequired.value&&0===i?.length||t&&!c),[o,l.status,s.status,n.isShippingRequired,i?.length,c,u,t])}({hasUnusablePartialAddress:f,inMemoryGooglePayParts:o}),v=function({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const a=hy().geolocation.country.code,{shop:o,observability:s,client:{userAgent:l},embed:c}=ie(),u=o.hasFlagEnabled(In)?c?.client?.embedderHostname:void 0,d=i(),p=vf(),m=Tt().value,[h]=Vh(),g=h.includes("PICKUP_POINT");return r(()=>!!e&&!t&&!n.sessionLoadFailed.value&&!!m&&!g&&function({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:a,embedderHostname:i}){if(Boolean("undefined"==typeof window||window.self!==window.top)){const e=r||Boolean(i),t=function(e){const t=An(e);return Boolean("Safari"===t?.name&&t.version&&Number(t.version)>=17)}(a);if(!e||!t)return!1}
2const o=Boolean(window.ApplePaySession)&&Jv(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&function(e){return"function"==typeof ApplePaySession.supportsVersion&&Jv(e,"supportsVersion",()=>ApplePaySession.supportsVersion(Tn))}(t);if(!o)return!1;const s=function(e,t){return void 0!==t.current?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}(t,n);return!!s&&("CN"!==e||function(e){const t=e.match(/(\((iPhone|iPad); CPU (iPhone )?OS ((\d+(_?)){1,3}))/g);if(!t)return!1;const n=t[0].match(/(\d+(_?)){1,3}/);if(!n)return!1;const[r,a]=n[0].split("_").map(e=>Number(e));return void 0!==r&&(r>11||11===r&&void 0!==a&&a>=2)}(a))}({geolocatedCountryCode:a,observability:s,slowCanMakePaymentCache:d,isCheckoutEditor:p,userAgent:l,embedderHostname:u}),[e,t,n.sessionLoadFailed.value,m,g,a,s,d,p,l,u])}({hasApplePayPaymentMethod:h,hasUnusablePartialAddress:f,inMemoryApplePayParts:c}),_=function(e){const n=e.sdkStatus,r=e.buttonStatus;return t(()=>n.value.status!==Yv.Error&&"error"!==r.value.status)}(l),b=_.value,k=function({inMemoryAmazonPayParts:e}){const n=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext;return t(()=>{const e=n.value;if(!e||"unavailable"===e.status)return!1;const t=e.lines.filter(qe);if(1!==t.length)return!1;const[r]=t;return!!r&&r.methods.some(e=>"LOCAL"===e.methodType)})}(),r=jv(),a=e.sdkStatus,i=e.buyWithPrimeButtonStatus;return t(()=>r.value&&!n.value&&a.value.status!==Yv.Error&&"error"!==i.value.status)}({inMemoryAmazonPayParts:l}).value,P=t(()=>function(e){const{status:t}=e;return"error"!==t&&"not_eligible"!==t}(u.buttonStatus.value)).value,S=function(e){const t=e.buttonStatus.value.status;return n(e=>{if("APPLE_PAY"!==e.name||"error"!==t)return e;const n=e.placements?.filter(e=>"ACCELERATED_CHECKOUT"!==e);return n?.length?{...e,placements:n}:void 0},[t])}(c),w=function(e){const t=e.acceleratedCheckoutButtonStatus.value,r=e.payWithPayPalButtonStatus.value;return n(e=>{if("PAYPAL_EXPRESS"!==e.name)return e;if(!e.placements||0===e.placements.length)return;const n=e.placements.filter(e=>!("ACCELERATED_CHECKOUT"===e&&"error"===t.status||"PAYMENT_METHOD"===e&&"error"===r.status));return 0!==n.length?{...e,placements:n}:void 0},[t.status,r.status])}(s),C=Zv().value,E=r(()=>{const e=function(){const e=m?.filter(e=>("wallet"===e.type||"walletsPlatform"===e.type)&&function(e){const t=e.name;switch(t){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return v;case"GOOGLE_PAY":return y;case wn.BuyWithPrime:return k;case wn.AmazonPay:return b;case"SHOP_PAY":return C;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return P;default:return L(t)}}(e))??[];return t_(e)}().flatMap(e=>w(e)??[]).flatMap(e=>S(e)??[]),t=function({maxWalletButtonCount:e,userAgent:t}){if(""===t)return Nn;function n(t=[]){const n=t.indexOf(wn.BuyWithPrime);-1!==n&&(n<e||(t.splice(n,1),t.splice(e-1,0,wn.BuyWithPrime)))}if(t.match(/Apple Mail|Chromium|Crosswalk|Dragon|Electron|; MSIE xyz;|Trident 7.0|.\*rv|Pale Moon|Puffin|QQ Browser|SeaMonkey|Sogou Explorer|UC Browser|Vivaldi/i))return["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"];if(t.match(/Edge|Firefox Mobile|Iron|OPR|Yandex Browser/i)||t.match(/Firefox/i)&&!t.match(/Firefox iOS/i))return["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",wn.BuyWithPrime,wn.AmazonPay,"VENMO"];return n(e),e}if(t.match(/CFNetwork|Chrome Mobile iOS|Coc Coc|Googlebot|Maxthon|Safari|Mobile Safari|Mobile Safari UI\/WKWebView|Oper Mini|Pinterest|Shopify Mobile/i)||t.match(/Safari/i)&&!t.match(/Chrome/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}if(t.match(/Amazon Silk|Chrome|Chrome Mobile WebView|Chrome Mobile|Opera|Opera Mobile|Samsung Internet/i))return["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",wn.BuyWithPrime,wn.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}return t.match(/IE/),["SHOP_PAY","PAYPAL_EXPRESS",wn.BuyWithPrime,wn.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}({maxWalletButtonCount:Kv(C,e.length),userAgent:d});return e.sort((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))},[m,v,y,k,b,P,S,w,C,d]);return E}const t_=e=>e.find(e=>e.name===wn.BuyWithPrime)?e.filter(e=>e.name!==wn.AmazonPay):e;function n_(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=vn("paymentMethods");return t(()=>!(r.value||!n.value||0===n.value?.length)&&Boolean(n.value?.some(e=>"wallet"===e.type||"walletsPlatform"===e.type)))}function r_(){const{checkout:e,source:n}
2=ie(),{didIncrementUnusablePartialAddressMetric:r,inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=gn(),u=T(e_({inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:r})),d=T(Gv(c)),p=t(()=>u.value?.filter(({placements:e,name:t})=>Wv(t,e,d.value)).length),m=n_();return t(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||"simulated"===n.type&&!p.value&&m.value))}const a_=f({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function i_({children:e}){const t=o_();return d(a_.Provider,{value:t,children:e})}function o_(){const e=r_(),{shop:{acceptTipPayments:t},checkout:n}=ie(),a=n.configuration.layout.isOnePage.value,i=On(n.identity.current.value),o=!vn("isShippingRequired").value&&!n.isShippingRequired.value;return r(()=>function({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:a}){const i=new Set(Dn),o=new Set([...Rn,...Mn]),s=new Set;return e&&!a||s.add("WALLETS1"),r&&s.add("DELIVERY1"),(r||t)&&s.add("DELIVERY2"),t&&(s.add("INFORMATION3"),n||r||(s.add("PAYMENT3"),s.add("PAYMENT4")),(!n&&r||n&&!r)&&s.add("PAYMENT4")),{swappable:i,fixed:o,disabled:s,supported:new Set([...o,...i])}}({showExpressCheckout:e.value,isOnePageCheckout:a,acceptTipPayments:t,disableDeliveryExtensions:o,isVaultedWalletIdentity:i}),[t,o,i,a,e.value])}const s_=new Map([["thankYou",[...Rn,...Mn]]]),l_=w({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>dl(()=>import("./33682ee7.Bbros4ez.js"),__vite__mapDeps([14,2,9,1,3,4,5,15,16,17,8,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,7,10,11]))});function c_(e){const{checkout:{extensibility:{ui:t}}}=ie();return d(i_,{children:d(x,{when:t.enabled,fallback:e.children,children:d(l_,{...e})})})}const u_=re("PostPurchaseContext");function d_({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:a}=ie(),i=a.currentUrl.value,o=r(()=>{const e=new URLSearchParams(i.search),t=e.get("script_url"),r=e.get("api_key")||e.get("post_purchase_dev_api_key"),a=e.get("config")??void 0;return n&&t&&r?{scriptUrl:t,apiKey:r,config:a}:void 0},[n,i.search]),s=n&&Boolean(o),l=r(()=>{const e=new URLSearchParams(i.search),t=e.get("uuid"),r=e.get("socket_url");return n&&t&&r?{uuid:t,socketUrl:r}:void 0},[n,i.search]),c=r(()=>{const e=`https://${i.host}/checkouts/unstable/changesets`;return{extensionAvailable:t,postPurchaseEnabled:t||s,developmentMode:s,developmentOptions:o,liveReload:l,changesetsUrl:e}},[t,s,o,l,i.host]);return d(u_.Provider,{value:c,children:e})}const p_=N,m_=p_(({checkout:e,graphql:{coreGraphql:t}},{queueToken:n,serializedReceipt:r,sessionFinished:a})=>{const i=t.query(zn,{variables:{checkpointData:e.checkpointToken.peek()??null,queueToken:n??null},skip:Bn(a,r)});return{context:k(()=>({data:i.data.value??void 0,loading:i.loading.value})),data:i.data,error:i.error}});class h_ extends Error{constructor(){super(...arguments),this.name="InitialNegotiationError"}}const g_=re("InitialNegotiationContext");function f_({children:e}){const{client:t,observability:r,url:a,router:i}=ie(),o=t.unstable_getSerialization("sessionFinished"),s=t.unstable_getSerialization("receipt"),l=t.unstable_getSerialization("queueToken"),{context:c,data:u,error:p}=Vn(m_,{queueToken:l,serializedReceipt:s,sessionFinished:o}),m=function(){const{observability:e}=ie();return n((t,n)=>{const r=Fn(t,n);return r&&(e.counter({name:"negotiation_session_source_missing",value:1}),e.log("negotiation_session_source_missing","An error occurred fetching negotation result due to missing source")),r},[e])}();if(p.value)throw r.leaveErrorBreadcrumb("InitialNegotiation: serialized data",{sessionFinished:o,receiptExist:Boolean(s?.exists),receiptInProgress:Boolean(s?.inProgress),receiptStatus:s?.status}),new h_(`Error loading cart from negotiateFromSessionQuery: ${p.value.message}`);return m(s,u.value?.session?.negotiate)?("undefined"==typeof window?i.redirect(a.c
2art()):window.location.replace(a.cart()),null):d(g_.Provider,{value:c.value,children:e})}function y_(){return ae(g_)}function v_({children:e}){const{router:t,checkout:{negotiator:n}}=ie(),r=n.initializationError.value,{data:i,loading:o}=y_();if(r)throw r;const s=i?.session?.negotiate?.result,c="CheckpointDenied"===s?.__typename;if(l(()=>{n.prepareStartup()},[n]),a(()=>{n.runStartup()},[n]),null==i&&o)return null;if(c){const e=Un(s.redirectUrl,"undefined"==typeof window?t.currentUrl.value.toString():void 0);return"undefined"==typeof window?t.redirect(e):window.location.assign(e.href),null}return d(y,{children:e})}function __({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return Boolean(t&&qn.has(t))}function b_({checkout:e,mobileCheckoutSdk:t}){if(!e.configuration.layout.isOnePage.value)return!1;const{version:n,schema:r}=t.config;return Boolean(n&&r||t.variant.recovery)}function k_({children:e}){return d(y,{children:e})}const P_={"checkout-sheet":w({displayName:"CheckoutSheetProtocolProvider",renderError:C_,renderLoading:k_,load:()=>C(()=>dl(async()=>{const{CheckoutSheetProtocolProvider:e}=await(import("./0fb2c600.CtLQgpFF.js"));return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([53,2,1,3,4,5,11,54,55,56,49,8,7,9,10])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),"mobile-sdk":w({displayName:"MobileCheckoutSdkProvider",renderError:C_,renderLoading:k_,load:()=>C(()=>dl(async()=>{const{MobileCheckoutSdkProvider:e}=await(import("./dd9b68fc.CQKKvsqq.js"));return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([57,2,1,3,4,5,54,55,56,49,8,7,9,10,11])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))})};function S_(e){const t=function(e){return __(e)?"checkout-sheet":b_(e)?"mobile-sdk":null}(e);return t?P_[t]:null}function w_({children:e}){const t=S_(ie());return d(t||y,{children:e})}function C_(e){throw e}const E_=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],x_=re("AnnouncementEmitterContext");function I_({children:e}){const t=i(new Map),a=n((e,n)=>{t.current.has(e)||t.current.set(e,new Set);const r=t.current.get(e);r.has(n)||(R(n),r.add(n))},[t]),o=n((e,n)=>{const r=t.current.get(e);if(r)for(const t of r)t(n)},[t]),s=n((e,n)=>{const r=t.current.get(e);r?.has(n)&&(M(n),r.delete(n))},[t]),l=n(e=>{const n=e?[e]:E_;for(const r of n){const e=t.current.get(r);if(e){for(const t of e)M(t);e.clear()}}},[t]),c=r(()=>({on:a,emit:o,off:s,removeAllListeners:l}),[a,o,s,l]);return d(x_.Provider,{value:c,children:e})}function A_(){return ae(x_)}const T_=f(null),L_=re("PendingComponentContext");function N_({children:e}){const t=r(()=>{const e=S(new Set);return{registerComponent:t=>(e.value=new Set([...e.peek(),t]),()=>{e.value=new Set([...e.peek()].filter(e=>e!==t))}),pendingComponentsSignal:e}},[]);return d(T_.Provider,{value:t,children:e})}function R_(){return h(T_)}const M_=re("ExtensionPointContext"),D_=re("ExtensionContext"),O_=re("CheckoutEditorBridgeContext");function z_({children:e}){const t=vf(),n=function(){const{client:e}=ie(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return!0===t&&!0===n}(),[r,a]=s(null),i=Tt();return t?d(O_.Provider,{value:r,children:[n||r?e:null,d(x,{when:i,children:d(B_,{setContext:a})})]}):e}const B_=w({load:()=>dl(()=>import("./adeb5fdb.r_ZerIHv.js"),__vite__mapDeps([58,2,37,17,1,3,4,5,59,60,56,61,62,7,8,9,10,11]))}),V_=f({loading:!1}),F_="dev";function U_(){return h(V_)}function q_(e){return!(!e?.version||parseInt(e.version,10)<3)}const j_="dev_mode";function H_({children:e}){const t=function(){const e=function(){const{client:e}=ie();return r(()=>{return t=e.cookies,{get:()=>t.get(j_),set:e=>{const n=(new Date).getTime(),r=new Date(n+18144e5);t.set(j_,e,{expiry:r})},remove:()=>{t.delete(j_)}};var t},[e.cookies])}(),{router:t,shop:n}=ie(),i=r(()=>t.currentUrl.value.searchParams.get("dev")??e.get(),[t,e]),o=null!=i&&(n.allowExtensionDevelopment||!1),[s,l]=D((e,t)=>{switch(t.type){case"fetched":{const e=q_(t.workspace)?{...t.workspace,extensions:(n=t.workspace.extensions,n.filter(e=>"checkout"===e.surface||!!Array.isArray(e.extensionPoints)&&(e.extensionPoints=e.extensionPoints.filter(e=>"object"==typeof e&&"surface"in e&&"checkout"===e?.surface)).length>0).map(e=>({...e,extensionPoints:e.extensionPoints.map(t=>"object"==typeof t?t:{target:t,metafields:e.metafields,surface:"checkout"})})))}:{...t.workspace,extensions:t.workspace.extensions.map(({extensionPoint:e,...t})=>({version:null,...t,extensionPoints:e?[e]:t.extensionPoints}))};return e.appId&&(e.appId=function(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:jn("App",t)}(e.appId)),{loading:!1,workspace:e}}case"error":return{loading:!1}}var n},{loading:o});return a(()=>
2{if(!o)return;let t=!0;return(async()=>{try{const n=await fetch(i),r=await n.json();if(!t)return;e.set(i),l({type:"fetched",workspace:r})}catch{if(!t)return;l({type:"error"})}})(),()=>{t=!1}},[i,e,o]),s}();return d(V_.Provider,{value:t,children:e})}function $_(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function Y_(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function W_(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function G_(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function J_(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function K_(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function X_(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function Q_(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function Z_(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function eb(e,{beforeStock:t=[],afterStock:n=[X_(e)]}={}){return[$_(e),Y_(e),W_(e),...t,J_(e),...n]}function tb(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function nb(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if("wallet"!==r?.type)return!1;const a=Gl(n);return"APPLE_PAY"===r.name||"PAYPAL_EXPRESS"===r.name&&a}function rb(){const{checkout:e,shop:n,i18n:r}=ie(),{buyerIdentity:a,deliveryNext:i}=e.negotiator.current.fields,o=t(()=>$n(a.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:s}=Mt(o.value),l=T(s),c=n.additionalAddressFieldsEnabled;return t(()=>Yn({purchasingCompany:a.value?.purchasingCompany,shippingCountries:n.shippingCountries,addressSettings:e.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,editFormat:e.address.extendedAddressMode.getFormat(o.value,null),deliveryNextValue:i.value,additionalFieldsEnabled:c,i18n:r}))}function ab(){const{checkout:{negotiator:e}}=ie(),{buyerIdentity:n}=e.current.fields,r=Be();return t(()=>r.value.enabledDeliveryMethods.includes("PICK_UP")&&Boolean(n.value?.purchasingCompany))}function ib({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(Hn(t)&&n.length>0)return n[0]}function ob(){const e=ab(),{checkout:n}=ie(),r=n.negotiator.current.fields.deliveryNext;return t(()=>{const t=n.proposal.facts.delivery??[],a=t.length>0&&t.every(e=>null!==e.pickupAddress);return e.value&&(pn(r.value)||a)})}function sb(){const e=ct(),{checkout:n,source:r}=ie(),{buyerIdentity:a,shippingAddress:i}=n.negotiator.current.fields,o=ob(),s=ab(),l=jc();return t(()=>!(l.value||!s.value&&!e.value||o.value||Zt(ib({checkout:n,source:r})?.deliveryAddress??i.value)||a.value?.purchasingCompany?.location.shippingAddress))}function lb(){const e=jc(),n=ab(),{checkout:r,source:a}=ie(),i=r.negotiator.current.fields.buyerIdentity,o=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return t(()=>{const t=i.value?.purchasingCompany,s=(o.value??!1)||Boolean(ib({checkout:r,source:a}));return Boolean(t)&&(e.value||n.value&&!s)&&r.isShippingRequired.value})}const cb=["contact-information","shipping-address"],ub=["delivery-method"],db=["payment-methods","billing-address","localization-extension"];function pb(e,t){return e?.id===t?.id&&e?.route===t?.route}function mb(e){e.parts.email.value.trim()&&e.parts.acceptEmailMarketing.value&&(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function hb(){const e=ac(),{checkout:t}=ie(),n=t.negotiator,r=t.configuration.layout.isOnePage.value;return sc(async(t,a)=>{if("completion"===t)return void mb(n);if("progression"!==t||a?.prefetch||r)return;const{currentDetour:i,currentPage:o,plan:s}=e.value;if(i||null==o)return;const l=n.current.value,c=s.greenPath.findIndex(e=>pb(e,o)),u=function(e,t,n){return e.slice(t+1).find(e=>null==e.skipOverPage||!e.skipOverPage(n))}(s.greenPath,c,l);("shipping"===o.id||"information"===o.id&&"shipping"===u?.id)&&mb(n)}),null}function gb(e){const t="string"==typeof e?e:e.type;return Hn(e)||"draftOrder"===t}function fb(e){if(!("target"in e))return;const[t,n]=(r=e.target,r.split("$.")[1]?.split(".").map(e=>e.replace(/\[\d+\]/g,""))??[]);var r;switch(t){case"payment":return"billingAddress"===n?"billing-address":"payment-methods";case"tip":return"payment-methods";case"buyerIdentity":return"contact-information";case"delivery":return Gn.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}function yb(e,t=[]){return Boolean(e?.email??e?.phone)&&t.every(e=>"contact-information"!==fb(e))}class vb extends pl{constructor(){super(...arguments),this.name="JourneyError"}}class _b extends ul{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function bb(e){return Jn(e)&&!e.some(e=>Kn.has(e.code))}function kb(e){return e.some(e=>"UnprocessableTermViolation"===e.__typename&&Xn.has(e.code))}class Pb extends ul{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}class Sb{#O={};#z=null;#B=!1;detectInfiniteRedirect(e,t,n){const r=e.pathname;if(this.#z&&clearTimeout(this.#z),this.#O[r]=(this.#O[r]||0)+1,this.#O[r]>=10&&!this.#B){const a=new Pb(`Detected potential infinite redirect: ${this.#O[r]} navigations to ${r} within 200ms`),i=t.value;n.error(a,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#O),currentUrl:e.toString(),path:r,threshold:10,timeframe:200},journeyState:{redirectTo:i.redirectTo?.route}}}),this.#B=!0,this.#O={}}this.#z=setTimeout(()=>{this.#O={},this.#z=null},200)}cleanup(){this.#z&&(clearTimeout(this.#z),this.#z=null)}}function wb(e){const{router:t,checkout:o,observability:s,source:l}=ie(),c=o.proposal.facts.delivery??[],u=o.negotiator,d=Boolean(o.proposal.facts.requiresShipping),p=Hn(l)?d:o.isShippingRequired.value,m=o.configuration.layout.isOnePage.value,h=function(){const{data:e}=y_();return"NegotiationResultAvailable"===e?.session?.negotiate.result.__typename&&"PendingTerms"===e.session.negotiate.result.sellerProposal.delivery.__typename}(),g=function(){const{data:e}=y_(),{checkout:t}
2=ie(),n=e?.session?.negotiate.result;let r;if("NegotiationResultAvailable"===n?.__typename&&"PendingTerms"===n.sellerProposal.delivery.__typename){const{sellerProposal:e,buyerProposal:t}=n;r=Zn({delivery:e.delivery,buyerDelivery:t.delivery,remoteDelivery:er(e.remote).remoteDelivery})}const{details:a}=Mt(r?.countryCode);return null!=r&&py({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:a})}(),f=ob(),y=function(){const e=i(null);return e.current||(e.current=new Sb),a(()=>()=>{e.current?.cleanup()},[]),e.current}();!function({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:o,initialPath:s,sessionType:l}){a(()=>{const a=t.current.value,i=t.parts.email.value,c=t.current.fields.allViolations.value??[];e.log("journey_init_contact_state","Initial contact-info state captured at journey initialization",{layout:o?"onePage":"threePage",planPages:n.greenPath.map(e=>e.id).join(","),initialPath:s,sessionType:l,identity:r,customerProfileType:a?.buyerIdentity?.customerProfile?.__typename,hasNegotiatedContactEmail:Boolean(a?.contactInfo?.email),hasNegotiatedCustomerProfileEmail:Boolean(a?.buyerIdentity?.customerProfile?.email),hasProposedEmail:Boolean(i),hasMissingContactViolation:c.some(e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code)})},[]);const c=i(!0);P(()=>{const n=t.current.fields.allViolations.value??[];c.current?c.current=!1:n.some(e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code)&&e.log("negotiated_missing_contact_violation_observed","Subsequent negotiation surfaced a missing-contact violation",{hasNegotiatedContactEmail:Boolean(t.current.fields.contactInfo.peek()?.email),hadProposedEmailFallback:Boolean(t.parts.email.peek()),customerProfileType:t.current.peek().buyerIdentity?.customerProfile?.__typename,identity:r,sessionType:l,layout:o?"onePage":"threePage"})})}({observability:s,negotiated:u,plan:e,identity:o.identity.current.value,isOnePageLayout:m,initialPath:t.currentUrl.value.normalizedPath,sessionType:l.type});const{postPurchaseInquiryStatus:v,paymentLines:_}=o.negotiator.parts,b=v.value,k=()=>function({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:a,negotiatedState:i,plan:o,postPurchaseInquiryStatus:s,proposedPaymentLines:l,receipt:c,sessionType:u,shippingRequired:d,throttle:p,url:m}){const h=o.greenPath.findIndex(e=>{if(e.skipOverPage?.(i))return!1;const t=Ol(e.features,i);return!e.fastForwardThroughPage||!e.fastForwardThroughPage(i,t)}),g=o.greenPath[h];if(!g)throw new vb("Cannot initialize a journey without a reachable green-path page",{groupingHash:"JourneyError::InitializeJourneyNoReachablePage"});const f=[];a.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:h,firstPage:g.id,plan:JSON.stringify(o.greenPath)}),o.greenPath.slice(0,h).forEach(e=>{if("information"===e.id){const t=yb(i.contactInfo,i.allViolations??[]);a.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:t,contactInfo:JSON.stringify(i.contactInfo),violations:i.allViolations??[]}),f.push({id:e.id,skipped:!1,complete:t})}else f.push({id:e.id,skipped:!1,complete:!0})}),f.push({id:g.id,skipped:!1,complete:!1});const y=o.greenPath.findIndex(e=>!(e.route!==m.normalizedPath||e.skipOverPage&&e.skipOverPage(i))),v=l.some(e=>"direct"===e.method.type&&e.method.sessionId),_=0===i.runningTotal?.amount||v,b="review"===o.greenPath[y]?.id&&!_,k=b?y-1:y,P=o.greenPath[k],S=Boolean(P?.skipOverPage?.(i));if(t&&n&&P&&!S&&k>h&&g.blockedOnlyByShippingAddress?.(i,Ol(g.features,i))){for(const[e,t]of o.greenPath.entries()){if(e<h)continue;if(e>=k)break;const n=f[e];f[e]=n?{...n,complete:!0}:{id:t.id,skipped:!0,complete:!0}}f[k]={id:P.id,skipped:!1,complete:!1},a.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:u,firstPageIndex:h,currentPageFromUrlIndex:y,advanceTo:k,clamped:b})}const w=f.find(e=>!e.complete&&!e.skipped),C=o.greenPath.findIndex(e=>w?.id===e.id),E=o.greenPath[C],x=o.greenPath[y],I=function({plan:e,isSimulated:t,currentPageFromUrlIndex:n,currentPageFromHistoryIndex:r,canLoadReview:a}){const i=e.greenPath[n];if(t&&i)return i;if(n>=0&&n<=r)return i;const o=e.greenPath[r];if("review"===o?.id&&!a){const t=e.greenPath.findIndex(e=>"review"===e.id);return e.greenPath[t-1]||e.greenPath[0]}return o}({plan:o,isSimulated:"simulated"===u,currentPageFromUrlIndex:y,currentPageFromHistoryIndex:C,canLoadReview:_}),A=o.detours.find(e=>"route"in e&&e.route===m.normalizedPath),T=bb(i.allViolations??[]),L=i.shippingAddress,[N]=r,R=N?.deliveryAddress??L,M="BusinessCustomerProfile"===i.buyerIdentity?.customerProfile?.__typename&&!e&&Qn(R)&&gb(u)&&d,D=new URLSearchParams(m.search),O="processing"===A?.type&&"true"===D.get("post_purchase"),z=("postPurchase"===A?.type||O)&&"success"===s&&"processed"===c?.status&&"created"===c.orderCreationStatus.status,B=("shopPayLogin"===A?.type?o.detours.find(e=>"shopPayLogin"===e.type):void 0)??("offsitePaymentFailed"===A?.type?o.detours.find(e=>"offsitePaymentFailed"===e.type):void 0)??(z?o.detours.find(e=>"postPurchase"===e.type):void 0)??("queued"===p.status?o.detours.find(e=>"throttle"===e.type):void 0)??(T?o.detours.find(e=>"stockProblems"===e.type):void 0)??(M?o.detours.find(e=>"noAddressLocation"===e.type):void 0)??("action_required"===c?.status||"processing"===c?.status||"processing_remote_checkouts"===c?.status?o.detours.find(e=>"processing"===e.type):void 0)??("processed"===c?.status&&c.redirectUrl?o.detours.find(e=>"processing"===e.type):void 0)??("processed"===c?.status?o.detours.find(e=>"thankYou"===e.type):void 0)??("thankYou"===A?.type&&"simulated"===u?o.detours.find(e=>"thankYou"===e.type):void 0);if(a.leaveErrorBreadcrumb("Journey:initializeJourney: resulting currentPage and expectedDetourFromState",{history:JSON.stringify(f.map(e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped})),normalizedUrlPath:m.normalizedPath,currentPageFromHistory:String(E?.id),currentPage:String(I?.id),expectedDetourFromState:B?.route,receipt:JSON.stringify(c)}),null==B&&null==I)throw new vb("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return B?{plan:o,history:f,redirectTo:(V=A,F=B,V?.type===F?.type&&V?.route===F?.route?void 0:B)}:{plan:o,history:f,redirectTo:pb(x,I)?void 0:I};var V,F}({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:h,buyerProposalHasDestination:g,deliveryFact:c,observability:s,negotiatedState:u.current.peek(),plan:e,postPurchaseInquiryStatus:b,proposedPaymentLines:_.value,receipt:o.latestReceipt.value,sessionType:l.type,shippingRequired:p,throttle:o.negotiator.throttleState.peek(),url:t.currentUrl.value}),S=r(()=>De((e,n)=>function(e,t,n,r,a){n.leaveErrorBreadcrumb("Journey:updateJourney: initiated with action",{actionType:t.type});const{plan:i}=e,o=e.redirectTo?{...e,redirectTo:void 0}:e,s=r.currentUrl.value.normalizedPath,l=i.greenPath.find(e=>e.route===s),c=i.detours.find(e=>e.route===s);switch(t.type){case"reinitialize":return t.state;case"clearRedirect":return o;case"skipRemainingPages":{const{plan:t,history:r}=e;if(!l){if("thankYou"===c?.type)return e;const t="undefined"!=typeof window&&window.location?window.location.href:"SSR: no location available";throw n.leaveErrorBreadcrumb("Skipping to completion, but no current page",{currentDetour:c,currentUrl:t}),new vb("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const a=t.greenPath.findIndex(e=>pb(e,l)),i=r.slice(0,a+1),s=i.pop();i.push({...s,complete:!0});for(const[e,n]of t.greenPath.entries()){if(e<=a)continue;const t=i[e];i[e]=t?{...t,skipped:!0}:{id:n.id,skipped:!0,complete:!1}}return n.leaveErrorBreadcrumb("Journey:updateJourney: on progress, skip to completion",{history:i.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),currentDetourRoute:c?.route}),{...o,history:i}}case"progress":{const{plan:r,history:a}=e,{page:i}=t;if(null==i)throw n.leaveErrorBreadcrumb("Journey:updateJourney: progress failed, no next page",{currentPage:l?.id,currentDetour:c?.type,actionType:t.type}),new vb(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const s=r.greenPath.findIndex(e=>pb(e,i)),u=a.slice(0,s);for(const[e,t]of r.greenPath.entries()){if(e>=s)break;const n=u[e];null==n?u[e]={id:t.id,skipped:!0,complete:!0}
2:n.complete||(u[e]={...n,complete:!0})}return u.push({id:i.id,skipped:!1,complete:!1}),n.leaveErrorBreadcrumb("Journey:updateJourney: on progress",{history:u.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),currentPageRoute:i.route}),{...o,history:u}}case"complete":{const{history:t}=e,r=[...t],a=r.pop();return r.push({...a,complete:!0}),n.leaveErrorBreadcrumb("Journey:updateJourney: on complete, set currentPage to undefined",{history:JSON.stringify(r.map(e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped}))}),{...o,history:r}}case"error":{const{plan:r,history:i}=e,{page:s=l}=t;if(null==s)return n.leaveErrorBreadcrumb("Journey:updateJourney: currentPage from state",{history:JSON.stringify(i.map(e=>e?.id)),currentPage:String(l?.id)}),n.error(new vb(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...o,redirectTo:r.greenPath[0]};const u=a?function(e,t,n,r){const[a]=t.greenPath;if(!a)throw new vb("Cannot validate journey prerequisites without a green-path page",{groupingHash:"JourneyError::ValidatePrerequisitesNoGreenPath"});const i=t.greenPath.findIndex(t=>pb(t,e));if(-1===i)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: target page not found in plan",{targetPageId:e.id,targetPageRoute:e.route}),a;if(!n)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: no negotiated context available",{targetPageId:e.id}),a;for(const[o,s]of t.greenPath.entries()){if(o>=i)break;let t=!1;if(t="information"!==s.id||yb(n.contactInfo,n.allViolations??[]),!t)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:s.id,unsatisfiedPrerequisitePageRoute:s.route}),s}return e}(s,r,a.current.peek(),n):s,d=!pb(s,u);a&&d&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:s.id,redirectedToPage:u.id});const p=r.greenPath.findIndex(e=>pb(e,u));return n.leaveErrorBreadcrumb("Journey:updateJourney: on error",{history:i.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),originalTargetPageRoute:s.route,finalTargetPageRoute:u.route,currentDetourRoute:c?.route}),{...o,history:[...i.slice(0,p),{id:u.id,skipped:!1,complete:!1}]}}default:L(t)}}(e,n,s,t,u),k()),[]),w=n(e=>{S.value=e},[S]),C=i(m);C.current!==m&&(C.current=m,w({type:"reinitialize",state:k()}));const E=oe(t.currentUrl.value);return a(()=>t.currentUrl.subscribe(e=>{E.current!==e&&(E.current=e,w({type:"clearRedirect"}),y.detectInfiniteRedirect(e,S,s))}),[t,w,y,S,s,E]),a(()=>t.block(e=>{const n=t.currentUrl.value,r=function(e,t){const n=new URLSearchParams(e.searchParams),r=new URLSearchParams(t.searchParams);return n.sort(),r.sort(),e.pathname===t.pathname&&n.toString()===r.toString()&&JSON.stringify(e.state)===JSON.stringify(t.state)}(n,e);return r&&s.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:n.pathname,search:n.search},requested:{path:e.pathname,search:e.search}}),r}),[t,s]),[S,w]}function Cb(e){return"complete"===e.status||"inactive"===e.status}function Eb(e){return"failed"===e?.status||"processed"===e?.status}const xb="checkout_queue_token",Ib="departure_page";function Ab({violations:e,greenPath:t,negotiated:n,currentPage:r}){const a=new Set(e.map(fb)),i=t.filter(e=>!e.skipOverPage||!e.skipOverPage(n)),o=i.findIndex(e=>e.id===r?.id);return(-1===o?i:i.slice(0,o)).find(e=>("function"==typeof e.features?e.features(n):e.features).some(e=>a.has(e)))}function Tb(){const{router:e}=ie(),t=Lb();return n((n,r)=>{const a={pathname:t(n).route,search:e.currentUrl.value.search};r?.replace?e.navigate(a,r):e.navigate(a)},[t,e])}function Lb(){const{observability:e,checkout:{negotiator:t}}=ie(),{history:r,plan:a}=ac().value;return n(n=>function({feature:e,greenPath:t,history:n,negotiated:r,observability:a}){let i=Nb(t,r,e);const o=n.find(e=>!e.complete&&!e.skipped),s=t.findIndex(e=>e.id===i?.id),l=t.findIndex(e=>o?.id===e.id);if(!i||!(s>=0&&s<=l)){const n=t[l]??Rb(t);a.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${n.id}`),i=n}return i}({feature:n,greenPath:a.greenPath,history:r,negotiated:t,observability:e}),[a.greenPath,t,r,e])}function Nb(e,t,n){return[...e].reverse().find(e=>("function"==typeof e.features?e.features(t.current.peek()):e.features).includes(n))}function Rb(e){const[t]=e;if(!t)throw new vb("Cannot choose a journey page from an empty green path",{groupingHash:"JourneyError::EmptyGreenPath"});return t}
2const Mb=1500,Db=450,Ob=64,zb=14;function Bb(e){return"customOnsite"===e.method.type&&1===e.method.paymentBrands?.length&&e.method.paymentBrands.includes("usdc")}function Vb(e){return"customOnsite"===e.type&&1===e.paymentBrands?.length&&e.paymentBrands.includes("usdc")}const Fb={id:"9779efd6b1c1d52d60cdb714cd02e665a74335de44ef60f64279a9bc82c88a1b",type:"query",name:"PollForReceipt",source:""};function Ub(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=e.parts.paymentLines;return t(()=>{const e=r.value.at(0);return!!e&&(Bb(e)||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find(e=>Vb(e)&&e.paymentMethodIdentifier===n);return Boolean(r)}(e,n.value))})}const qb=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function jb(e){const t=location.hostname;return qb.includes(t)}const Hb=3e3,$b=15e3,Yb="hsa_survey_completed";function Wb(e){if(!e)return"";try{return new URL(Gb(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const Gb=e=>e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(e,t,n)=>t?e:`https://${n}`),Jb="3ds_completed",Kb=6e5;function Xb(e){if(!e)return"none";try{const t=new URL(Gb(e)).hostname.toLowerCase().replace(/^www\./,"");return"hooks.stripe.com"===t?"hooks.stripe.com":"uk.affirm.com"===t?"uk.affirm.com":"sandbox.uk.affirm.com"===t?"sandbox.uk.affirm.com":"affirm.com"===t?"affirm.com":"sandbox.affirm.com"===t?"sandbox.affirm.com":t.endsWith(".affirm.com")?"affirm_subdomain":t.endsWith(".stripe.com")?"stripe_subdomain":"other"}catch{return"invalid"}}const Qb=Symbol("pollRequestTimedOut");async function Zb(e,t){let n;const r=new Promise(e=>{n=setTimeout(()=>e(Qb),t)});try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function ek(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type&&e.action.offsiteRedirect}function tk(e){if(void 0===e)return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const nk=["failed","processed"];function rk(){const{currentPage:e,currentDetour:r}=ac().value,{observability:o,checkout:{offsitePopupController:s},mobileCheckoutSdk:l,embed:c}=ie(),u=i(),d=function(){const e=z({maxAttempts:120}),{client:t,checkout:r,persistence:o,observability:s,embed:l,source:c,graphql:{coreGraphql:u}}=ie(),d=t.unstable_getSerialization("sessionToken"),p=i(),m=Ub();return a(()=>()=>{p.current=void 0},[]),n(async t=>{const n=Symbol("receipt-poll");p.current=n;const a=r.latestReceipt.value?.id,i=()=>p.current===n&&y&&!(a!==r.latestReceipt.value?.id),h=r.latestReceipt.value;if(null==h?.id||null==h)return;t?.(h),s.log("receipt_polling_detected","[Receipt Polling] Receipt polling started with initial receipt",Yy(h));let g,f,y=!0,v=0,_=!1,b=Date.now(),k=!1,P=!1,S=!1;switch(h.status){case"processing":case"processing_remote_checkouts":f=h.pollAt;break;case"action_required":f=await w(h);break;case"polling_for_order":f=sr+Date.now()}async function w(e){return new Promise(t=>{if(r.configuration.isUniversalCheckoutFinalizer&&"complete_payment_challenge"===e.action.type&&!1===e.action.offsiteRedirect&&!m.value||k||(k=!0,rr(l,`action_required_receipt - ${e.action.type}`)),"complete_payment_challenge"===e.action.type){if(m.value)return t(Date.now()+Hb);if(e.action.offsiteRedirect)return t(void 0)}else{if("pre_payment_buyer_action_required"===e.action.type){if(S)return t(Date.now()+Hb);const n=Date.now(),r={...Yy(e),actionType:e.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},a=({data:e})=>{e?.type===Yb&&(window.removeEventListener("message",a),S=!0,v=0,b=Date.now(),s.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...r,dataType:Yb,elapsedTimeMs:Date.now()-n}),t(Date.now()))};return s.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",r),void window.addEventListener("message",a)}if("complete_payment_challenge_v2"===e.action.type){const n=e.timeout?.millisecondsRemaining;return _&&0===n&&(v=0,b=Date.now()),_=Boolean(n),t(_?Date.now()+Hb:Date.now()+ar)}}const n=Date.now(),a="complete_payment_challenge"===e.action.type?e.action:void 0,u={...Yy(e),actionType:e.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:a?.offsiteRedirect,sourceHostCategory:Xb(a?.url),surface:"checkout-web"},d=({data:a,origin:o})=>{if(a.type===Jb){if(clearTimeout(p),window.removeEventListener("message",d),!i()||!Uy(r.latestReceipt.value,e))return void t(void 0);v=0,b=Date.now();const a=Date.now()-n;s.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:Jb}),s.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...u,dataType:Jb,elapsedTimeMs:a,originHostCategory:Xb(o)}),t(Date.now())}},p=setTimeout(()=>{window.removeEventListener("message",d),i()&&Uy(r.latestReceipt.value,e)?(r.unstable_overwriteLatestReceipt({status:"failed",id:e.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),o&&ir(o,c),s.counter({name:"three_d_secure_challenge_timeout",value:1}),s.log("use_receipt_polling_three_ds_challenge_timed_out","3DS challenge timed out",Yy(e)),s.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...u,elapsedTimeMs:Date.now()-n}),t(void 0)):t(void 0)}
2,e.timeout?.millisecondsRemaining??Kb);s.log("receipt_polling_detected","[Receipt Polling] Adding event listener for 3DS challenge event"),s.log("three_ds_postmessage_listener_started","[Receipt Polling] 3DS postMessage listener started",u),window.addEventListener("message",d)})}async function C(){const e={receiptId:r.latestReceipt.value?.id,sessionToken:d},t=await Zb(u.staticQuery(Fb,{cache:!1,variables:e}),$b);if(t!==Qb)return t;if(E(1),!i())return;const n=u.query(Fb,{cache:!1,variables:e});try{const e=await Zb(Promise.resolve(n.refetch()),$b);if(e!==Qb)return e}finally{n[Symbol.dispose]()}E(2)}function E(e){s.log("receipt_polling_request_timed_out","[Receipt Polling] Receipt poll request timed out",{...Yy(r.latestReceipt.value),attempt:e,timeout:$b})}for(;null!=f;){await B(f-Date.now());const n=Date.now()-b;if(++v,!_&&v>120&&n>12e4&&(y=!1,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...Yy(h),pollAttempts:v}),s.counter({name:"receipt_polling_timeout",value:1}),s.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...Yy(r.latestReceipt.value),timePolling:n,pollAttempts:v})),!i())break;const a=await C(),l=a?.data,u=a?.error;if(u||null==l||"ReceiptNotFound"===l.receipt.__typename){if(!i())break;f=Date.now()+(e.next().value||6e4);continue}if(!i())break;const d=g?Date.now()-g:0,p=jb()?3e4:1e4,k=!!g&&d>=p;let S;if(!P)try{S=await or()}catch(x){if(!i())break;P=!0,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(x),receiptType:l.receipt.__typename})}if(P){if("ProcessingReceipt"===l.receipt.__typename||"WaitingReceipt"===l.receipt.__typename){e.reset(),f=Date.now()+l.receipt.pollDelay;continue}if("ProcessedReceipt"!==l.receipt.__typename)break;if(e.reset(),l.receipt.redirectUrl){window.location.replace(l.receipt.redirectUrl);break}if(l.receipt.orderStatusPageUrl){window.location.replace(l.receipt.orderStatusPageUrl);break}f=sr+Date.now();continue}if(!i())break;if(!S)break;e.reset();const E=S(l.receipt,{pollingTimeoutReached:k});"polling_for_order"===r.latestReceipt.value?.status&&"processed"===E?.status&&(k?s.counter({name:"PostPurchase_order_polling_timeout",value:1}):s.histogram({name:"PostPurchase_order_polling_duration",value:d}));const I=!(!m.value&&ek(E)||Uy(E,h)),A=Yy(h),T=Yy(E),L={receiptId:T.receiptId,status:T.status,prevReceiptId:A.receiptId,prevReceiptStatus:A.status};if(I?(s.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",L),r.unstable_overwriteLatestReceipt(E)):Uy(E,h)&&s.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",L),!i())break;if(t?.(E),"processing"===E.status||"processing_remote_checkouts"===E.status)f=E.pollAt;else if("action_required"===E.status)f=await w(E);else{if("polling_for_order"!==E.status){o&&ir(o,c);break}f=sr+Date.now(),g||(g=f)}if(!i())break}},[r,o,u,d,s,e,l,m,c])}(),p=function(){const e=Ub();return n((t,n)=>{e.value||qy(t)&&Hy(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}(),m=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=e.parts.paymentLines;return t(()=>{const e=r.value.at(0);return!!e&&("customOnsite"===(t=e).method.type&&(t.method.paymentBrands??[]).some(e=>"wechatpay"===e.toLowerCase())||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find(e=>{return"customOnsite"===(t=e).type&&(t.paymentBrands??[]).some(e=>"wechatpay"===e.toLowerCase())&&e.paymentMethodIdentifier===n;var t});return Boolean(r)}(e,n.value));var t})}(),h=l.variant.isStandard()||Boolean(c?.isCheckoutKit()),g=n(()=>{document.hidden||(document.removeEventListener("visibilitychange",g),o.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:tk(u.current)},{exportImmediately:!0}),d(e=>{p(e,()=>{document.addEventListener("visibilitychange",g)})}))},[p,d,o]),f=n(()=>{d(t=>{nk.includes(t.status)&&s.isOpen.value&&s.close({}),p(t,n=>{o.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:t,currentPage:e,currentDetour:r}),o.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:tk(n),providerUrl:n},{exportImmediately:!0}),s.isOpen.value?s.redirect(n):(m.value?function(e){const t=document.createElement("a");
2t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}(n):window.location.assign(n),u.current=n,h&&document.addEventListener("visibilitychange",g))})})},[p,m,d,h,r,e,g,o,s]);return a(()=>()=>document.removeEventListener("visibilitychange",g),[]),f}function ak(){const{shop:{id:e}}=ie();return r(()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);return isNaN(n)?void 0:n},[e])}function ik({mode:e="set",include:t={}}={}){const{shopClientUuid:r=!1,shopId:a=!1}=t,i=ie().embed?.shopClientUuid,o=ak();return n((t,n)=>{a&&void 0!==o&&("set"===e||!t.has("shop_id"))&&t.set("shop_id",String(o));const{embedParam:s,ecAuthParam:l,ecVersionParam:c,ecColorSchemeParam:u,ecDelegateParam:d,checkoutKitBrandingParam:p,checkoutKitVersionParam:m,shopifyEssential:h,skipInterstitial:g,shopClientUuid:f}=function(e,t){return{embedParam:e.get("embed"),ecAuthParam:e.get(ur),ecVersionParam:e.get(lr),ecColorSchemeParam:e.get(cr),ecDelegateParam:e.get(dr),checkoutKitBrandingParam:e.get(mr),checkoutKitVersionParam:e.get(pr),shopifyEssential:e.get("shopify_essential"),skipInterstitial:e.get(hr),shopClientUuid:e.get("shop_client_uuid")??t}}(n,i),y=t.has("embed")||t.has("ec_version");("set"===e||!y)&&(s&&t.set("embed",s),c&&(t.set(lr,c),u&&t.set(cr,u),l&&t.set(ur,l),d&&t.set(dr,d),m&&t.set(pr,m),p&&t.set(mr,p)));const v="set"===e||!t.has("shopify_essential");h&&v&&t.set("shopify_essential",h);const _="set"===e||!t.has(hr);if(g&&_&&t.set(hr,g),r){const n="set"===e||!t.has("shop_client_uuid");f&&n&&t.set("shop_client_uuid",f)}},[i,r,a,e,o])}function ok(e,t,n,r,a){const i=e.some(e=>"BUYER_IDENTITY_PERSONAL_ORDER_NOT_ALLOWED"===e.code),o=e.some(e=>"BUYER_IDENTITY_COMPANY_LOCATION_REQUIRED"===e.code);i&&t&&(a.log("redirect_to_storefront","[B2B] Buyer identity violation: personal order not allowed, redirecting to storefront",{redirectSuccess:Boolean(t)}),window.location.replace(t)),o&&window.location.replace(n??r)}function sk(){const{client:e,shop:n,checkout:{negotiator:r,configuration:a}}=ie(),i=r.current.fields.buyerIdentity;return t(()=>Boolean(n.loginLinkVisible)&&n.hasStorefront&&a.allowRedirectToStorefront&&Boolean(e.unstable_getSerialization("loginUrl"))&&"OPTIONAL"===n.customerAccountRequirement&&!i.value?.customerProfile)}function lk(){const{shop:e,checkout:{identity:n,configuration:r,negotiator:a},mobileCheckoutSdk:i,source:o}=ie(),s=a.current.fields.buyerIdentity,l="shopPay"===n.current.value;return t(()=>{const t="OPTIONAL"===e.customerAccountRequirement,n="REQUIRED"===e.customerAccountRequirement,a="DISABLED"===e.customerAccountRequirement;return"draftOrder"!==o.type&&e.hasStorefront&&!i.variant.isPartner()&&r.allowRedirectToStorefront&&!l&&(t||n||a&&Boolean(s.value?.customerProfile))})}function ck(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.buyerIdentity;return n(e=>{const n=t.value?.customerProfile,r=t.value?.purchasingCompany;if(n)return"billing"===e?"CustomerProfile"===n.__typename?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0:"shipping"===e?"CustomerProfile"===n.__typename?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0:void 0},[t])}function uk(){const{embed:e,mobileCheckoutSdk:n,shop:r,source:a,checkout:{negotiator:i,configuration:o}}=ie(),s=ac(),l=i.current.fields.buyerIdentity,c=Wh(),u=Boolean(e)||n.enabled,d=Boolean(r.remoteShopsConfigMap?.size);return t(()=>{const e=l.value,t=Boolean(r.loginLinkVisible)&&Boolean(e?.customerProfile)&&(e?.purchasingCompany?!u:r.hasStorefront&&o.allowRedirectToStorefront&&"draftOrder"!==a.type);return c&&"thankYou"===s.value.currentDetour?.type&&!d&&t})}function dk(e=!1){const{i18n:n,router:r,shop:a,checkout:{negotiator:i}}=ie(),{buyerIdentity:o}=i.current.fields;return t(()=>{const t=o.value?.purchasingCompany;if(!a.customerAccountLocationsUrl)return;const i=new URL(a.customerAccountLocationsUrl);return i.searchParams.set("return_to",r.currentUrl.value.pathname),t&&!e&&i.searchParams.set("current_location",t.location.id),i.searchParams.set("locale",n.locale),String(i)})}function pk(){const e=i(!0);return l(()=>()=>{e.current=!1},[]),e}const mk=["discountLines","totalSavings","merchandiseLines","deliveryNext"],hk=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),gk=new Set(["PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_NOT_FOUND","DISCOUNTS_NOT_FOUND","REDUCTION_INVA
2LID_CODE","REDUCTION_INVALID_DISCOUNT_CODE","PAYMENTS_GIFT_CARD_NON_SUFFICIENT_FUNDS","PAYMENTS_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_BUYING_GIFT_CARD","PAYMENTS_GIFT_CARD_EXPIRED","REDUCTION_INVALID_GIFT_CARD_CODE","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_FIXED_SELLING_PLANS","DISCOUNTS_DISCOUNTS_NOT_ALLOWED_FOR_B2B","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_B2B"]),fk=new Set([...al,...gk]),yk=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),vk=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),_k=new Set([...vk,...fk]);function bk(){const{checkout:{negotiator:e}}=ie(),{paymentLines:t}=e.parts,{voidedGiftCardsSignal:r}=e.context,a=n((e,t)=>{if(t.length<e.length)return[];const n=[];return t.forEach(t=>{const r=t.method;"giftCard"===r.type&&"code"in r&&!e.some(e=>"giftCard"===e.method.type&&"code"in e.method&&r.code===e.method.code)&&n.push(r.code)}),n},[]);return n(({violations:e,remotePaymentLines:n})=>{if(e.some(e=>hk.has(e.code))){const e=a(n,t.value);r.value=e,t.value=n}},[a,t,r])}function*kk(e,t=[]){const{customFields:n,placementReferences:r}=e,a=br(t,r);for(const[i,o]of n.entries())a(kr(o))||(yield`${Pr}[${i}]`)}function Pk({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(e=>function({violation:e,currentPageId:t,isOnePageCheckout:n}){return!!n||"payment"===t||!(Sr.has(e.code)||wr.has(e.code)||tn.has(e.code))}({violation:e,currentPageId:t,isOnePageCheckout:n}))}function Sk(){const{observability:e}=ie();return n(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}class wk extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function Ck(){const e=(()=>{const{source:{checkoutSessionIdentifier:e},checkout:{negotiator:n}}=ie(),{email:r}=n.parts;return t(()=>`guest-${e}-${r.value.replace(/[^a-zA-Z0-9]/g,"")}`)})();return{isDismissedGuestModal:n(()=>{try{return Boolean(sessionStorage.getItem(e.value))}catch{return!1}},[e]),setDismissedGuestModal:n(()=>{try{sessionStorage.setItem(e.value,"true")}catch{}},[e])}}const Ek="EU_REVERSE_CHARGE_EXEMPTION_RULE";function xk(){const{checkout:{negotiator:e}}=ie(),r=e.current.fields.taxExemptions,a=function(e){const{checkout:{negotiator:n}}=ie(),{taxExemptions:r}=n.parts,a=T(e);return t(()=>r.value.find(e=>e.handle===a.value))}(Ek).value,i=function(e){const{checkout:{negotiator:t}}=ie(),{taxExemptions:r}=t.parts;return n(t=>{const n=r.value.filter(t=>t.handle!==e);r.value=[...n,{handle:e,details:t}]},[e,r])}(Ek),o=vn("taxExemptions").value,s=vn("shippingAddress").value;if("unavailable"===r.value?.status||!r.value?.available||0===r.value?.available.length)return null;const{available:l}=r.value,c=l.find(e=>xr(e.handle));if(!c?.details)return null;const u=a?.details?.taxId??"",{registrationFormats:d,warnings:p}=c.details,m=e=>Ir(e,d),h=o?{type:"pending"}:u?m(u)?u===c.details.taxId&&c.details.status?{type:"resolved",validationStatus:c.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:c.applied,taxId:{warnings:p,value:u,loading:o||s,set:e=>{i({taxId:e.toUpperCase()})},status:h,reset:()=>i({taxId:""}),validated:{status:c.details.status,taxId:c.details.taxId},format:{valid:!!u&&m(u),validate:m}}}}function Ik(){const{userEvents:e}=ie(),t=Ak();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function Ak(){const{client:e,shop:t,source:n,checkout:{negotiator:r}}=ie(),a=e.unstable_getSerialization("requestId"),i=r.current.fields.buyerIdentity.value?.customerProfile,{shippingAddress:o,billingAddress:s,email:l}=r.parts,c=xk();return{build:({eventType:e,vatId:r})=>{return{schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:e,shopId:Number(le(t.id)),customerId:Rk(i),checkoutToken:n.
2checkoutSessionIdentifier,requestId:a,vatId:r,vatIdValidationStatus:Tk({taxId:c?.taxId,eventType:e}),applied:c?.applied,email:l.value,userAgent:(u=navigator,void 0===u?void 0:u.userAgent),...Lk(o.value),...Nk(s.value)}};var u}}}function Tk({taxId:e,eventType:t}){if("NEGOTIATE"!==t&&e){if("invalid_format"===e.status.type)return"INVALID_FORMAT";if("pending"===e.status.type)return"PENDING";if(e.status.validationStatus)return String(e.status.validationStatus)}}function Lk(e){return e?{shippingCompanyName:e.company,shippingAddress1:e.address1,shippingAddress2:e.address2,shippingCity:e.city,shippingZipcode:e.postalCode,shippingProvinceCode:e.zoneCode,shippingCountryCode:e.countryCode}:{}}function Nk(e){return e?{billingCompanyName:e.company,billingAddress1:e.address1,billingAddress2:e.address2,billingCity:e.city,billingZipcode:e.postalCode,billingProvinceCode:e.zoneCode,billingCountryCode:e.countryCode}:{}}function Rk(e){if(!e)return;const t=Number(le(e.id));return isNaN(t)?void 0:t}function Mk(e,t){const{checkout:r,shop:a,observability:i,url:o,router:s}=ie(),l=function(){const{checkout:{negotiator:e}}=ie(),t=pk(),{setGuestDismissedModalKey:r}=function(){const{setDismissedGuestModal:e}=Ck(),{shopPay:t}=ie();return{setGuestDismissedModalKey:n(()=>{t.userIdentified.value&&e()},[e,t.userIdentified])}}();return n(async({onComplete:n,setSubmitting:a,...i})=>{r(),a(!0);const o=await e.complete({...i});t.current&&(a(!1),await(n?.(o)))},[t,e,r])}(),{plan:c}=ac().value,u=r.negotiator,d=r.negotiator,p=Tb(),m=dk(!0),h=bk();return function(){const{userEvents:e}=ie(),t=Ak(),n=xk();sc(async(r,a)=>{if("completion"!==r)return;if(a?.retry)return;if(!n)return;const{value:i}=n.taxId,o=t.build({eventType:"PAY_NOW_CLICKED",vatId:i});e.monorailEvent(o)})}(),n(async(n,g,f,y)=>{const{skipToCompletion:v,..._}=y??{};"processing"!==g?.type&&v&&(i.leaveErrorBreadcrumb("Journey:updateJourney: updating journey HistoryMark onSubmitForCompletion if skipToCompletion is true and detourType is not processing",{skipToCompletion:!0,detourType:g?.type}),e({type:"skipRemainingPages"}));let b=1;const k=async()=>{let y=!1;await d.waitForPendingNegotiations({setProgressing:t});const P=b<1;await u.runBeforeNegotiationListeners("completion",P?{retry:!0}:void 0),await l({..._,setSubmitting:e=>u.setSubmitting(e),setProgressing:t,onValidationSuccess:()=>{_.onValidationSuccess?.(),t(!0)},async onComplete(l){if("stale"===l.status&&"interceptors"===l.phase&&b>0)return b-=1,y=!0,t(!0),void i.log("submit_for_completion_stale_retried","Stale completion retried automatically");switch("stale"===l.status&&b<1&&i.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await(f?.(l)),l.status){case"success":{r.unstable_overwriteLatestReceipt(l.receipt);const e={type:"complete"};u.recordProgression(e),await u.runListeners(e);break}case"alreadyCompleted":r.unstable_overwriteLatestReceipt(l.receipt);break;case"throttled":{const e=c.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new vb("Throttled, but no detour",{groupingHash:"JourneyError::ThrottledNoDetour"});s.navigate(e.route);break}case"rejected":{if(n||i.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:n}
2),kb(l.violations))return window.location.replace(o.login(window.location.href));if(ok(l.violations,a.storefrontUrl,m.value,s.currentUrl.value,i),Jn(l.violations)){s.currentUrl.peek().searchParams.delete(Ib);const e=c.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new vb("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});s.navigate(e.route);break}h({violations:l.violations,remotePaymentLines:l.negotiated?.paymentLines?.lines??[]});const t={type:"error",violations:l.violations,errors:l.errors,negotiationStage:"completion"};if(u.recordProgression(t),await u.runListeners(t),v)break;const r=Ab({violations:l.violations,greenPath:c.greenPath,negotiated:l.negotiated,currentPage:n});r&&(s.currentUrl.peek().searchParams.delete(Ib),s.navigate(r.route));break}case"invalid":t(!1),await u.runListeners({type:"invalid",reasons:l.reasons});break;case"fetch_failed":case"failed":{const t={type:"failed",reason:l.reason,negotiationStage:"completion",fetchFailed:"fetch_failed"===l.status};if("fetch_failed"===l.status)if(il(l.reason)||!l.isActionable)i.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:l.reason}),i.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:ol(l.reason)}});else{const e=l.reason;i.error(new _b(e,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${e}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.recordProgression(t),await u.runListeners(t),e({type:"error",page:n}),s.currentUrl.peek().searchParams.delete(Ib),p("payment-methods",{replace:void 0!==g});break}default:t(!1),n||i.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:n})}"success"===l.status&&"processing"===l.receipt.status||t(!1)}}),y&&await k()};await k()},[t,u,d,l,a,e,r,c.detours,c.greenPath,s,h,o,m,p,i])}const Dk=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function Ok(e,t){const n=Ol(e.features,t),r=new Set(["merchandiseLines"]);for(const a of n){const e=Dk.get(a)??[];for(const t of e)r.add(t)}return r}function zk({children:e,dispatch:s,progressing:l,onProgressionChange:c}){const u=ac(),{plan:p,currentPage:h,currentDetour:g}=u.value,{observability:f,checkout:y,router:v}=ie(),{postPurchaseInquiryStatus:_}=y.negotiator.parts,b=function(e,t){const{client:r,router:a,checkout:i,shop:o,observability:s,url:l}=ie(),c=i.negotiator,u=o_(),{plan:d,currentPage:p,currentDetour:m}=ac().value,h=i.negotiator,g=r.unstable_legacyNavigationPerformance,f=dk(!0),y=bk(),v=pk(),_=i.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:b}}=gn(),k=Sk();return n(async({onComplete:n,walletValidationAttemptId:r,prefetch:P=!1,negotiationStage:S,...w})=>{const C=p,E=S??"negotiation",x=e=>{if(r)try{s.log("wallet_validation_phase","Wallet validation phase",{attemptId:r,phase:e,negotiationStage:E,prefetch:P,mounted:v.current,hasOnComplete:Boolean(n)})}catch{}};x("entered"),"progression"!==E||P||t(!0),s.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:E}),"progression"===E&&await h.runBeforeNegotiationListeners(E,{prefetch:P});const I=C?Ol(C.features,c.current.value):void 0,A=[...new Set([...w.silenceViolations??[],...kk({customFields:c.current.value.customFields??[],placementReferences:u},I)])];try{x("core_started");const r=await h.negotiate({...w,silenceViolations:A,skipStateUpdates:P,negotiationStage:E});if(x("core_returned"),s.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:r.status,negotiationStage:E,violations:"violations"in r?Cr(r.violations):void 0}),v.current){if(P)return void x("callback_skipped_prefetch");try{const n="success"===r.status||"error"===r.status;if(n&&Jn(r.violations)){const e=d.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new vb("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMat
2chingDetourNegotiate"});return k(),void a.navigate(e.route)}if(n&&kb(r.violations))return s.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));switch(n&&ok(r.violations,o.storefrontUrl,f.value,a.currentUrl.value,s),n&&y({violations:r.violations,remotePaymentLines:r.negotiated?.paymentLines?.lines??[]}),r.status){case"success":{const e={type:"success",violations:r.violations,errors:r.errors,negotiationStage:E};h.recordNegotiation(e,{progression:!0}),x("listeners_started"),await h.runListeners(e),x("listeners_returned");break}case"alreadyCompleted":i.unstable_overwriteLatestReceipt(r.receipt);break;case"error":{g?.cancelNavigation();const t={type:"error",violations:r.violations,errors:r.errors,negotiationStage:E};h.recordNegotiation(t),("progression"===E||w.runListenersOnError)&&(h.recordProgression(t),x("listeners_started"),await h.runListeners(t),x("listeners_returned")),C&&Pk({violations:r.violations,currentPageId:C.id,isOnePageCheckout:_.value})&&e({type:"error",page:C});break}case"throttled":{const e=d.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new vb("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});a.navigate(e.route);break}case"invalid":h.runListeners({type:"invalid",reasons:r.reasons}),C&&e({type:"error",page:C});break;case"denied":case"fetch_failed":C&&e({type:"error",page:C});break;case"stale":case"tooManyRequests":s.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:r.status,currentPage:C,currentDetour:m,negotiationStage:E});break;default:L(r)}"progression"===E&&t(!1)}finally{x("callback_delivering"),n?.(r),x("callback_returned");const e=b.value&&i.wallets.activeSession.value;if("success"!==r.status&&"violations"in r&&C&&!e){const e=Ab({currentPage:C,greenPath:d.greenPath,negotiated:r.negotiated,violations:r.violations});e&&a.navigate(e.route)}}}else x("callback_skipped_unmounted")}catch(T){if(T instanceof Er)return void x("rejected_request_swallowed");x("wrapper_threw");const e=T instanceof Error?T:new wk;if(e)throw e}},[b,i,p,f,e,_,v,c,t,g,u,d,h,y,a,o?.storefrontUrl,k,l,s,m])}(s,c),k=y.negotiator,S=function(e,t,r){const{router:a,observability:i,checkout:o}=ie(),{plan:s}=ac().value,l=o.negotiator,c=o.configuration.layout.isOnePage,u=n((e,n)=>{const r=s.greenPath.slice(n+1).find(t=>null==t.skipOverPage||!t.skipOverPage(e.negotiated));if(!r)throw new vb("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"});t({type:"progress",page:r}),a.navigate(r.route)},[s.greenPath,t,a]);return n(async(t,n)=>{r(!0);const a=s.greenPath.findIndex(e=>pb(e,t)),o=l.current.value,d=Ok(t,o),p=new Set;for(const e of s.greenPath.slice(0,a+1))for(const t of Ol(e.features,o))p.add(t);const m=function(e=[]){const t=[];return e.includes("delivery-method")||t.push("delivery-method"),t.push("payment-terms-changed"),t.push("payment-session"),e.includes("billing-address")||t.push("payment-address"),e.includes("payment-methods")||t.push("captcha"),e?.includes("localization-extension")||t.push("localization-extension"),t}([...p]);try{await e({negotiationStage:"progression",silenceViolations:m,fieldsToResolve:Array.from(d),onComplete(e){switch(i.leaveErrorBreadcrumb("Negotiation completed",{status:e.status,violations:"violations"in e?e.violations.map(e=>e.code):[]}),n?.(e),e.status){case"success":u(e,a);break;case"error":Pk({violations:e.violations,currentPageId:t.id,isOnePageCheckout:c.value})||u(e,a);break;case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}})}finally{r(!1)}},[r,s.greenPath,l,e,u,c,i])}(b,s,c),w=Mk(s,c),C=function(e,t,r){const{checkout:a,client:i,shop:o,source:s,observability:l,url:c,router:u}=ie(),d=a.negotiator,p=a.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return n(async(n,m,h)=>{switch(n.type){case"thankYou":case"postPurchase":return void l.log("use_exit_detour_detected",`Tried to progress out of a ${n.type} detour`,{currentPage:m?.route,currentDetour:n.type});case"throttle":r(!0),await new Promise(e=>{if(Cb(a.negotiator.throttleState.peek()))return void e();const t=a.negotiator.listenThrottle(n=>{Cb(n)&&(t(),e())})}),await e({force:!0,silenceViolations:"redirectToCart"===n.behavior?["non-stock",...nr]:["all"],negotiationStage:"progression",onComplete(e){switch(h?.(e),e.status){case"success":if(!m)throw new vb("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});{t({type:"progress",page:m});const e=`${m.route}${m.queryParams||""}`;u.navigate(e,{replace:!0})}break;
2case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"alreadyCompleted":case"tooManyRequests":l.log("use_exit_detour_throttle_negotiation_non_success","Throttle negotiation completed with non-success result",{status:e.status,currentPage:m?.route});break;default:L(e)}}}),r(!1);break;case"stockProblems":if(r(!0),0!==d.parts.merchandiseLines.value.length&&p)await e({force:!0,silenceViolations:["non-stock",...nr],onComplete(e){switch(e.status){case"success":if(!m)throw new vb("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});t({type:"progress",page:m}),u.navigate(m.route,{replace:!0});break;case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":l.log("use_exit_detour_stock_problems_negotiation_non_success","[Journey] Exiting stock problems detour with non-success result",{resultStatus:e.status,currentPage:m?.route});break;default:L(e)}}});else{if(!a.configuration.allowRedirectToStorefront){l.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:o.hasStorefront,currentPage:m?.route,canUpdateMerchandise:p,merchandiseLinesCount:d.parts.merchandiseLines.value.length});break}l.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:o.hasStorefront,currentPage:m?.route,canUpdateMerchandise:p,merchandiseLinesCount:d.parts.merchandiseLines.value.length}),tr({client:i,url:c,source:s,configuration:a.configuration})}r(!1);break;case"processing":r(!0),l.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(e=>{if(Eb(a.latestReceipt.value))return void e();const t=O(()=>{Eb(a.latestReceipt.value)&&(t(),e())})}),r(!1);break;case"shopPayLogin":if(r(!0),!m)throw new vb("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});{t({type:"progress",page:m});const e=`${m.route}${m.queryParams||""}`;u.navigate(e,{replace:!0})}r(!1);break;case"offsitePaymentFailed":r(!1);break;case"noAddressLocation":case"terminalError":throw new vb(`Can't progress out of a ${n.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:L(n)}},[l,r,e,t,u,d.parts.merchandiseLines,p,i,c,s,o.hasStorefront,a])}(b,s,c),E=function({plan:e,currentDetour:t,dispatch:r,onProgressionChange:o,negotiate:s,negotiated:l,proposedPostPurchaseInquiryStatus:c}){const u=ie(),{checkout:d,embed:p,persistence:m,source:h,observability:g,client:f,mobileCheckoutSdk:y,router:v}=u,{configuration:_}=d,b=d.latestReceipt.value,{hasExternalReceiptHandling:k}=_,P="shopPay"===d.identity.current.value,S=Lb(),w=vf(),C=gr(),E=rk(),x=b?.id,I=u.checkout.negotiator,T=u.checkout.configuration.layout.isOnePage,N=Gh()&&!fr(v.currentUrl.value.search),R=d.negotiator.throttleState.peek().token,M=ac(),D=Hc(),O=function({redirectProgressEnabled:e=!1}={}){const t=i(!1),{checkout:r,client:a,observability:o}=ie(),s=ik({mode:"copy-if-missing"});return n(n=>{if(t.current)return void o.counter({name:"thank_you_page_already_redirected",value:1});t.current=!0;const i=new URL(n,window.location.href),l=new URLSearchParams(a.initialRequest.url.search);return s(i.searchParams,l),e&&r.checkoutExit.startRedirectProgress(),window.location.replace(i.toString())},[s,r.checkoutExit,a.initialRequest.url.search,o,e])}({redirectProgressEnabled:P&&!_.isUniversalCheckoutFinalizer&&N&&!t&&!D});a(()=>{k||E()},[x]);const z=n((e,t)=>{setTimeout(()=>{t()},function(e){return 1500*e+450}(e))},[]);return n(n=>{if(!n||w)return;g.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",Yy(n));const a=c.value;if("processed"===n.status&&n.waitingForPostPurchaseDone&&"done"!==a)return;const i=(e,t)=>e&&e>0?z(e,t):t();switch(n.status){case"abandoned":o(!1),m&&ir(m,h),C();break;case"failed":{o(!1),m&&ir(m,h);const a=new URL(window.location.href);if(a.searchParams.get("completed")&&a.searchParams.get("reload_receipt")){g.log("use_handle_receipt_progression_update","[Journey] Reloading processing page after failed receipt",{receiptId:n.id}),g.counter({name:"refresh_processing_step",value:1}),a.searchParams.delete("reload_receipt"),window.location.replace(a.toString());break}if("inventory"===n.failure.type){if(null==e.detours.find(e=>"stockProblems"===e.type))throw new vb("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const t=I.lastNegotiation.value;s({force:!0,silenceViolations:["payment-session","payment-terms-changed"],onComplete(e){switch(e.status){case"success":{const e=I.lastJourneyProgression.value,a=I.lastNegotiation.value;if(d.latestReceipt.value?.id!==n.id||a!==t&&"error"===a.type||("failed"===e.type||"error"===e.type)&&"completion"===e.negotiationStage)break;g.leaveErrorBreadcrumb("[Journey] Performed successful negotiation with a failed receipt"),g.log("use_handle_receipt_progression_update","[Journey] Performed successful negotiation with a failed receipt");const i=S("payment-methods");A(()=>
2{I.context.inventoryRecoverySignal.value={receiptId:n.id},function(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;A(()=>{e.generalPaymentError.value=void 0,e.generalPaymentErrorCode.value=void 0;for(const e of Object.values(n))"server"===e.value?.origin&&(e.value=void 0)})}(I.parts)}),r({type:"error",page:i}),v.navigate({pathname:i.route,search:v.currentUrl.value.search});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}});break}if("payment"===n.failure.type&&(vr.has(n.failure.code)?s({silenceViolations:Fe(["captcha"]),skipStateUpdates:!0}):("CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"===n.failure.code&&s({force:!0,fieldsToResolve:["shopPromotion"]}),C())),"offsitePaymentFailed"===t?.type){v.navigate(t.route,{replace:!0});break}const i=function({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:a,receipt:i}){const o=Nb(t,r,"payment-methods");if(function(e){return"payment"===e?.failure.type&&!0===e.failure.hasOffsitePaymentMethod}(i)&&o)return o;const s=function(e,t){return t?e.find(({id:e})=>e===t):void 0}(t,e);if(s)return"review"===s.id?(o||a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no last page with payment methods found, falling back to first page "),o??Rb(t)):s;const l=n.find(e=>!e.complete&&!e.skipped),c=t.findIndex(e=>l?.id===e.id),u=t[c];if(!o){const e=u??Rb(t);return a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:e?.id}),e}const d=t.findIndex(e=>e.id===o.id);return u&&d>c?(a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:o.id,fallbackPageId:u.id}),u):o}({departurePageId:v.currentUrl.value.searchParams.get(Ib),greenPath:e.greenPath,history:M.value.history,observability:g,negotiated:l,receipt:n});r({type:"error",page:i}),v.navigate(i.route,{replace:!0});break}case"processed":{g.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:n.redirectUrl,receiptId:n.id});const s=e.detours.find(e=>"postPurchase"===e.type),l=Boolean(s)&&Boolean(n.postPurchasePageRequested)&&"ready"===n.postPurchaseVaultingStatus&&"success"===a,c=!p?.isFlagshipPartner&&l;if(p?.isFlagshipPartner&&l&&"thankYou"!==t?.type&&g.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:n.id}),c&&"thankYou"!==t?.type){if(g.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:n.id,postPurchasePageUrl:n.postPurchasePageUrl,postPurchasePageRequested:n.postPurchasePageRequested,postPurchaseVaultingStatus:n.postPurchaseVaultingStatus}),shopAppDomain:P}),P&&n.postPurchasePageUrl)window.location.replace(n.postPurchasePageUrl);else{const e=s;v.currentUrl.value.searchParams.delete("post_purchase");const t=`${e.route}${v.currentUrl.value.search}`;I.applyProcessedReceipt(n),v.navigate(t,{replace:!0})}break}if(p?.client?.complete(),!_.isUniversalCheckoutFinalizer&&yr(p?.embedder))break;if(!_.isUniversalCheckoutFinalizer&&n.redirectUrl){const e=n.redirectUrl;n.skipToThankYouPage?(g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:n.id,redirectUrl:e,postPurchasePageRequested:n.postPurchasePageRequested,postPurchasePageUrl:n.postPurchasePageUrl})}),r({type:"skipRemainingPages"})):r({type:"complete"}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:P,checkoutDesign:T.value?"ONE_STEP":"THREE_STEP",typType:"classic",visibility_state:document.visibilityState}}),g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with redirectUrl",{redirectUrl:e});const a=new URL(e);return R&&a.searchParams.set(xb,R),i(n?.completedRemoteCheckouts?.length,()=>{return e=a.toString(),!N||t||D||cl(()=>{d.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),void O(e);var e})}const m=e.detours.find(e=>"thankYou"===e.type);if(!m?.route)throw new vb("On thank-you, but no matching detour!",{groupingHash:"JourneyError::OnThankYouNoMatchingDetour"});{const e="prevent_order_redirect",a=new URLSearchParams(v.currentUrl.value.search);let s=a.has(e)&&"false"!==a.get(e)?`${m.route}?${e}=true`:m.route;y.variant.recovery&&(s=function(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}(s,n.id));const l=()=>{if(g.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:m.route}),n.skipToThankYouPage){g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:n.id,redirectUrl:n.redirectUrl,postPurchasePageRequested:n.postPurchasePageRequested,postPurchasePageUrl:n.postPurchasePageUrl})}),r({type:"skipRemainingPages"});const e=f.cookies.get(_r);e&&h.sourceId===e.split("%3F")[0]&&f.cookies.delete(_r)}else f.cookies.delete(_r),r({type:"complete"});I.applyProcessedReceipt(n)},c=e=>{g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:s}),i(n?.completedRemoteCheckouts?.length,()=>function(e,n){const r=()=>{v.navigate(e,{replace:!0,state:{...v.currentUrl.value.state,redirectingToThankYou:!0}})};N&&!t?(n?.(),cl(r,["checkout-exit"],{replace:!0,interrupt:!0})):cl(()=>{n?.(),r()}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:P,checkoutDesign:T.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),o(!1)}(s,e))},d=_.deferredProfileChangeId;if(d||_.profileKey.peek()?.requireBusinessCriticalOnly){_.update({deferredProfileChangeId:void 0});const e=d??_.profileId.peek();el(l,{trigger:"completion",profileRequest:e?{id:e,requireBusinessCriticalOnly:!1}:void 0,graphql:u.graphql.coreGraphql,extensibility:u.checkout.extensibility,configuration:_,observability:g,userEvents:u.userEvents,telemetryContext:{source:h,shop:u.shop,sessionToken:f.unstable_getSerialization("sessionToken"),current:I.current}}).then(c).catch(()=>{})}else l(),c()}break}case"polling_for_order":case"action_required":case"processing":{if("processing"===t?.type)break;if("polling_for_order"===n.status&&"thankYou"===t?.type){g.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify(n),routerCurrentUrl:v.currentUrl.value.toString()});break}const r=e.detours.find(e=>"processing"===e.type);r?.route&&o(!0);break}case"processing_remote_checkouts":{if("processing"===t?.type)break;const n=e.detours.find(e=>"processing"===e.type);if(!n?.route)break;cl(()=>{const e=v.currentUrl.value.search;v.navigate(e?{pathname:n.route,search:e}:n.route,{replace:!0})});break}default:L(n)}},[f,p?.client,p?.embedder,p?.isFlagshipPartner,y,C,t,d,r,w,T,N,P,M,S,u,_,s,l,I,o,m,e.detours,e.greenPath,D,c,R,O,v,h,g,z])}({plan:p,currentDetour:g,dispatch:s,onProgressionChange:c,negotiate:b,negotiated:k,proposedPostPurchaseInquiryStatus:_});a(()=>{const{negotiator:e}=y,t=e=>{if("queued"!==e.status)return;const t=p.detours.find(e=>"throttle"===e.type);if(t?.route)v.navigate(t.route);else if(h)throw new vb(`Throttled, but no matching detour from ${h&&JSON.stringify(h,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return t(e.throttleState.peek()),e.listenThrottle(t)},[y,v,h,p.detours,s]),P(()=>{const e=y.latestReceipt.value;f.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",Yy(e)),o(()=>E(e))});const x=i(_.peek());P(()=>{const e="thankYou"===g?.type||"postPurchase"===g?.type,t=_.value,n=x.current;if(e&&t!==n){x.current=t;const e=y.latestReceipt.value;f.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...Yy(e),previousStatus:n}),o(()=>E(e))}});const{progress:I,completing:T}=function({journey:e,exitDetour:a,pageComplete:i,pageNegotiate:o}){const{client:s,observability:l,router:c}=ie(),u=m(0),d=t(()=>u.value>0),p=s.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:h,handleClosingPopup:g}=function(){const e=rk(),t=Rf(),n=Wm(),{i18n:a,observability:i,userEvents:o,checkout:{offsitePopupController:s,negotiator:l},shop:{id:c}}=ie(),{paymentLines:u}=l.parts;return r(()=>({handleOffsitePopupOpen:()=>{const r=u.value.at(0);let d=!1;if("customOnsite"===r?.method.type)d=Bb(r);else if(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name){const e=r.method.walletContent?.paymentMethodIdentifier,t=(l.current?.fields?.paymentMethods?.value||[]).find(t=>Vb(t)&&t.paymentMethodIdentifier===e);d=Boolean(t)}if(t.value){if(d){i.counter({name:"offsite_payment_popup_flow_initiated",value:1,attributes:{payment_method_name:"Crypto: USDC",is_shop_pay_wrapped:Boolean(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name),is_mobile:Ot()}});const e=de(c);if(e){const t=parseInt(e,10);if(!isNaN(t)){const e=function(e){const t=rg();
2return t?{schemaId:"shopify_wallet_checkout_track/6.3",payload:{event:"spb_instrument_click__sheet__clicked",eventSubtype:"payment_method",appName:"checkout",pageType:"checkout",checkoutToken:t?.checkoutToken,instrumentId:"USDC",shopId:e,checkoutOne:!0,uniqToken:t?.uniqToken,visitToken:t?.visitToken,microSessionId:t?.microSessionId,microSessionCount:t?.microSessionCount??0,screenWidth:window.innerWidth,themeId:t?.themeId,themeCityHash:t?.themeCityHash||"",contentLanguage:t?.contentLanguage,referer:t?.referer}}:null}(t);e&&o&&o.monorailEvent(e)}}}const t={width:600,height:455};s.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:t,isCryptoPayment:d,title:a.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&s.isOpen.value&&s.close({})}}),[t.value,u,i,o,l,s,n,a,e,c])}(),f=oe(a),y=oe(i),v=oe(o),_=oe(h),b=oe(g),k=oe(c);return{progress:n(async(t,n,r)=>{const a=async e=>{try{await(n?.(e))}finally{"success"!==e.status&&b.current()}},i={...r,onProgressBlocked:()=>{try{r?.onProgressBlocked?.()}finally{b.current()}},onValidationSuccess:()=>{try{r?.onValidationSuccess?.()}finally{_.current()}}},{plan:o,currentPage:s,currentDetour:c}=e.value,d=f.current;if(l.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:t,skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),detours:o.detours.map(e=>e.route),currentPageRoute:s?.route,currentDetourRoute:c?.route}),!i?.skipToCompletion&&c&&s){const e=o.detours.find(e=>"thankYou"===e.type),t="processing"===c.type?e:s;return p?.start({target:t?.route}),l.leaveErrorBreadcrumb(`[Journey] Exiting "${c.route}" detour, moving to "${t?.route}"`,{currentDetourRoute:c.route,exitDetourTargetRoute:t?.route,targetPageRoute:s.route}),d(c,s,a)}if(null==s)return l.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),void i?.onProgressBlocked?.();const m=pb(s,o.greenPath[o.greenPath.length-1])||i?.skipToCompletion,h=o.greenPath.findIndex(({id:e})=>e===s.id),g=o.detours.find(e=>"processing"===e.type),P=m?g:o.greenPath[h+1];p?.start({target:P?.route});const S=k.current.currentUrl.peek(),w=o.greenPath.find(e=>e.route===S.normalizedPath)??s;if(m?S.searchParams.set(Ib,w.id):S.searchParams.delete(Ib),l.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),isLastPage:m,currentPageRoute:s.route,currentDetourRoute:c?.route,nextPageRoute:P?.route}),!m)return v.current(s,a);u.value+=1;try{await y.current(s,c,a,i)}finally{u.value-=1}},[f,e,y,v,u,p,l,b,_,k]),completing:d}}({journey:u,exitDetour:C,pageComplete:w,pageNegotiate:S}),N=function({plan:e}){const{router:t,observability:r}=ie();return n(async(n,a)=>{const i=e.detours.find(e=>e?.type===n);if(!i)throw r.leaveErrorBreadcrumb("Detour, but no matching detour",{detourType:n,detours:e.detours,currentUrl:t.currentUrl.value.href}),new vb("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const[o]=e.greenPath;if(!o)throw new vb("Cannot detour without a green-path page",{groupingHash:"JourneyError::EmptyGreenPath"});const s=`${i.route}${o.queryParams||""}`;t.navigate(s,a?.routerOptions)},[e.detours,e.greenPath,t,r])}({plan:p}),R=function({negotiate:e}){return n(()=>{e({prefetch:!0,negotiationStage:"progression",silenceViolations:["all"]})},[e])}({negotiate:b}),M=Sk();a(()=>k.pendingFieldsNegotiation.subscribe(e=>{"success"!==e?.status&&"error"!==e?.status||u.peek().currentDetour||bb(k.current.fields.allViolations.peek()??[])&&(M(),N("stockProblems",{routerOptions:{replace:!0}}))}),[k,u,N,M]);const D=r(()=>({detour:N,progress:I,negotiate:b,progressing:l,completing:T,prefetch:R}),[N,I,l,T,b,R]);return d(rc.Provider,{value:D,children:e})}function Bk({plan:e,children:a}){const o=m(!1),s=n(e=>{o.value=e},[o]),{observability:l,router:c}=ie(),u=c.currentUrl.value,[p,h]=wb(e);vh(p,({previousState:e,action:t,nextState:n})=>{l.leaveErrorBreadcrumb("Journey state transition",{previousState:{redirectTo:e.redirectTo?.route},action:t,nextState:{redirectTo:n.redirectTo?.route},routerCurrentUrl:u.normalizedPath})});const{redirectTo:g}
2=p.value,f=m(),{pageBeforeDetour:y,completed:v}=function({router:e,plan:n,journeyStateSignal:r}){const a=i(void 0),o=t(()=>{const t=e.currentUrl.value.normalizedPath;return n.greenPath.find(e=>e.route===t)});return{pageBeforeDetour:t(()=>{const t=o.value;t&&(a.current=t);const i=a.current,s=e.currentUrl.value.normalizedPath,{history:l}=r.value,c=n.detours.find(e=>e.route===s);if(t)return t;if(c&&i)return i;if(c&&!i){const e=n.greenPath[0],t=l.find(e=>!e.complete);return n.greenPath.find(e=>e.id===t?.id)??e}}),completed:t(()=>{return t=r.value.plan.detours.find(t=>t.route===e.currentUrl.value.normalizedPath),"thankYou"===t?.type;var t})}}({router:c,plan:e,journeyStateSignal:p}),_=r(()=>({journeyState:p,currentFocus:f,completed:v,pageBeforeDetour:y}),[p,f,v,y]);if(null!=g){const e=u.search?{pathname:g.route,search:u.search}:g.route;return c.redirect(e),null}return d(nc.Provider,{value:_,children:[d(hb,{}),d(zk,{dispatch:h,progressing:o,onProgressionChange:s,children:a})]})}function Vk({disabled:e,key:t,variants:n}){const{client:r,router:a}=ie(),i=a.currentUrl.value;if(e)return;const o=new URLSearchParams(i.search).get(t);if(o&&n.includes(o))return o;const s=r.cookies.get(t);return s&&n.includes(s)?s:void 0}function Fk(){const{shop:e}=ie(),t=function(){const e=Vk({key:"operatziya_y",variants:[Ar.Control,Ar.Treatment]}),{client:t}=ie(),n=t.unstable_getSerialization("experiments"),r=n?.find(e=>e.clientHandle===Tr)?.variant===Ar.Treatment;return e||(r?Ar.Treatment:Ar.Control)}()===Ar.Treatment;return Boolean(e.confirmationPageEnabled)||t}const Uk=["delivery-method"],qk=new Set(Lr),jk=new Set(Nr),Hk=new Set(Rr);function $k({i18n:e,sourceType:t,addressSettings:n,billingAddressSettings:r,hasBlockingUiExtensionForFeatures:a,getSellableDeliveryMethods:i,initialNegotiationData:o,isDraftOrderCheckout:s,isPrePopulatedSourceType:l,isShippingRequired:c,proposedPaymentLines:u,reviewEnabled:d,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:h,shop:g,checkout:f,paymentMethods:y,observability:v,recordFastForward:_}){const b=(e,t)=>a(t,{excludedExtensionTargets:Yk(e.deliveryNext)})?{gatedBy:"extension"}:zr(e.paymentLines)?{gatedBy:"paypalExpress",satisfied:Jk(e.paymentLines,e.deliveryNext)&&yb(e.contactInfo,e.allViolations)}:Br(e.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:t.filter(t=>!((e,t)=>{switch(t){case"contact-information":return yb(e.contactInfo,e.allViolations);case"shipping-address":return function({shippingAddress:e,addressSettings:t,countryDetails:n,violations:r=[],isDraftOrder:a,state:i}){return!!e&&!(t.isRequired("phone",{countryCode:e?.countryCode})&&a&&(!i.contactInfo?.email||!i.shippingAddress?.phone))&&!!py({address:e,addressSettings:t,countryDetails:n})&&r.every(e=>"shipping-address"!==fb(e))}({shippingAddress:p,addressSettings:n,countryDetails:m,violations:e.allViolations,state:e,isDraftOrder:s});case"billing-address":return function(e,t,n=[]){return!!py({address:t,addressSettings:e})&&n.every(e=>"billing-address"!==fb(e))}(r,e.billingAddress,e.allViolations);case"delivery-method":return function(e,t=[]){return"filled"===e?.status&&!!e.lines.some(e=>"methods"in e&&e.methods.some(e=>"PICK_UP"===e.methodType||"PICKUP_POINT"===e.methodType))&&t.every(e=>"delivery-method"!==fb(e))}(e.deliveryNext,e.allViolations);case"payment-methods":case"localization-extension":return!1;default:return L(t)}})(e,t))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:e})=>Array.from(function*(){yield"contact-information",Or(e)||Mr(e)?yield"delivery-method":c?yield"shipping-address":yield"billing-address"}()),fastForwardThroughPage:(e,t)=>{const n=b(e,t);if("extension"===n.gatedBy)return!1;if("paypalExpress"===n.gatedBy)return!!n.satisfied&&_("information","paypal_express_and_contact_satisfied");if("googlePay"===n.gatedBy)return!1;const[r]=n.unsatisfied;return v.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:r??null,isPrePopulatedSourceType:l,allViolations:e.allViolations?.map(e=>e.code)||[]}),l&&void 0===r},blockedOnlyByShippingAddress:(e,t)=>{const r=b(e,t),a=s&&n.isRequired("phone",{countryCode:e.shippingAddress?.countryCode})&&(!e.contactInfo?.email||!e.shippingAddress?.phone);return null===r.gatedBy&&l&&!a&&1===r.unsatisfied.length&&"shipping-address"===r.unsatisfied[0]&&(e.allViolations??[]).every(e=>"shipping-address"!==fb(e))}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:Uk,fastForwardThroughPage:e=>{return!a(Uk)&&("cartNext"===t?function(e){const t=function(e){return"filled"!==e?.status?[]:Ue(e).filter(e=>"available"===e.status)}(e);return 0!==t.length&&t.every(e=>function(e){return 1===e.methods.length}(e)||function(e){if(e.methods.length<=1)return!1;const t=It(e);return!!t&&e.methods[0]?.handle!==t.handle}(e))}(e.deliveryNext)?_("shipping","cart_next_shipping_selection_determined"):(n=e.paymentLines,!!n?.lines.some(e=>"direct"===e.method.type&&Boolean(e.method.sessionId))&&_("shipping","cart_next_has_direct_payment_session")):!!function({latestNegotiation:e,initialNegotiation:t,isPrePopulatedSourceType:n}){if(!n)return!1;if("filled"!==e?.deliveryNext?.status)return!1;const r=t?.session?.negotiate.result;if("NegotiationResultAvailable"!==r?.__typename||"FilledDeliveryTerms"!==r.buyerProposal.delivery.__typename)return!1;const a=r.buyerProposal.delivery.deliveryLines.map(e=>"DeliveryStrategyReference"===e.selectedDeliveryStrategy?.__typename?e.selectedDeliveryStrategy.handle:void 0).find(e=>void 0!==e);if(void 0===a)return!1;const i=Ue(e?.deliveryNext).find(e=>"available"===e.status);return void 0!==i&&!(a!==It(i)?.handle)}({latestNegotiation:e,initialNegotiation:o,isPrePopulatedSourceType:l})&&_("shipping","initial_delivery_selection_preserved"));var n},skipOverPage:({deliveryNext:e,isShippingRequired:t})=>!t||pn(e)||Mr(e)||h||Dr(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>nb(d,u.peek(),{shop:g,checkout:f,paymentMethods:y})?["payment-methods","localization-extension"]:["payment-methods","billing-address","localization-extension"]},...d?[{id:"review",label:e.translate("review.title"),route:"/review",features:["billing-address"]}]:[]],detours:[{type:"throttle",label:e.translate("throttle.title"),route:"/throttle"}
2,{type:"processing",label:e.translate("processing.title"),route:"/processing"},{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"},{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"},{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}]}}function Yk(e){const t=new Set,n=Wk(e,"PICK_UP"),r=Wk(e,"PICKUP_POINT");return n||Gk(t,qk),r||Gk(t,jk),(n||r)&&Gk(t,Hk),t.size>0?t:void 0}function Wk(e,t){return Ue(e).some(e=>"available"===e.status&&It(e)?.methodType===t)}function Gk(e,t){t.forEach(t=>e.add(t))}function Jk(e,t){const n=Nt(e?.lines,"PAYPAL_EXPRESS");if(!n)return!1;if("filled"!==t?.status)return!1;const r=n.method.walletContent;return Boolean((r?.email??void 0)&&(r?.token??void 0))}function Kk(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}const Xk=["checkout","cartNext","draftOrder"];function Qk({children:e}){const{i18n:a,observability:i,router:o,shop:s,source:l,checkout:c}=ie(),u="shopPay"===c.identity.current.value,p=c.configuration.layout.isOnePage.value,{parts:m}=c.negotiator,h=c.negotiator.current.fields.paymentMethods?.value,g=m.paymentLines,f=Fk(),y=function(){const{i18n:e,shop:r,source:a,checkout:i,observability:o}=ie(),{buyerIdentity:s}=i.negotiator.current.fields,l=sb(),c=jc(),u=rb(),d=ab(),p=lb(),m=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]),h=n(e=>{const t=s.value?.purchasingCompany;return!(!t?.location.shippingAddress||!e)&&Boolean(c.value&&u.value&&Wn(t.location.shippingAddress,e))},[s,c,u]);return t(()=>{const t=s.value?.purchasingCompany;if(!t)return;const n=!Hn(a)&&i.isShippingRequired.value&&!l.value,o=p.value,u=()=>({id:"review",label:e.translate("review.title"),route:"/review",features:[]});return i.configuration.layout.isOnePage.value?[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...o?cb:[],...n?ub:[],...db]},...r.confirmationPageEnabled?[u()]:[]]:[...o?[{id:"information",label:e.translate("contact.title"),route:"/information",features:cb,fastForwardThroughPage:({shippingAddress:e})=>!(!h(e)||d.value)&&m("information","business_customer_pre_negotiated_address")}]:[],...n?[{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:ub,fastForwardThroughPage:({shippingAddress:e,deliveryNext:t})=>c.value?!!h(e)&&m("shipping","business_customer_pre_negotiated_address"):"unavailable"!==t?.status&&m("shipping","business_customer_no_editable_address_with_delivery"),skipOverPage:({deliveryNext:e})=>pn(e)}]:[],{id:"payment",label:e.translate("payment.title"),route:"/payment",features:db},u()]}).value}(),v=o.currentUrl.value?.search,_=function(){const{i18n:e,shop:t,source:{type:a},checkout:i,observability:o}=ie(),{extensibility:s}=i,l=Be(),c=o_(),u=Xk.includes(a),{data:d}=y_(),p=function(){const{data:e}=y_();if("NegotiationResultAvailable"!==e?.session?.negotiate.result.__typename)return;const{sellerProposal:t}=e.session.negotiate.result;return Zn({delivery:t.delivery,remoteDelivery:er(t.remote).remoteDelivery})}(),{details:m}=Mt(p?.countryCode),h="draftOrder"===a,g=i.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,f=Fk(),{parts:y}=i.negotiator,v=i.negotiator.current.fields.paymentMethods.value,_=y.paymentLines,b=i.configuration.addressSettings.nonBillingAddressSettings.value,k=Kk(i),P=i.negotiator.current.fields.isShippingRequired.value,S=n((e,{excludedExtensionTargets:t}={})=>s.ui.hasBlockingExtensionForFeatures({features:e,placementReferences:c,excludedExtensionTargets:t}),[c,s.ui]),w=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]);return r(()=>$k({i18n:e,sourceType:a,addressSettings:b,billingAddressSettings:k,hasBlockingUiExtensionForFeatures:S,getSellableDeliveryMethods:()=>l.value,initialNegotiationData:d,isDraftOrderCheckout:h,isPrePopulatedSourceType:u,isShippingRequired:P,proposedPaymentLines:_,reviewEnabled:f,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:g,shop:t,checkout:i,paymentMethods:v,observability:o,recordFastForward:w}),[b,k,S,l.value,d,h,u,P,_,f,p,m,g,a,e,t,i,v,o,w])}(),b=function({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":Hn(n)?"orderEdit":r?"onePage":"threePage"}({businessCustomerJourneyPath:y,isShopPay:u,source:l,isOnePageCheckout:p}),k=r(()=>{switch(b){case"businessCustomer":return i.leaveErrorBreadcrumb("Using business customer journey plan"),function({i18n:e,greenPath:t}){return{greenPath:t,detours:[...eb(e,{beforeStock:[G_(e)]}),Q_(e)]}}({i18n:a,greenPath:y});case"shopPay":return i.leaveErrorBreadcrumb("Using shop pay journey plan"),function({i18n:e,shopName:t,currentUrlSearch:n}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",queryParams:n,features:({isShippingRequired:e})=>[e?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[Z_(e),$_(e,"redirectToCart"),Y_(e),W_(e),J_(e),K_(e,t),X_(e),Q_(e)]}}({i18n:a,shopName:s.name,currentUrlSearch:v});case"orderEdit":return i.leaveErrorBreadcrumb("Using order edit checkout journey plan"),function({i18n:e,isOnePageCheckout:t,reviewEnabled:n}){return{greenPath:[t?{id:"onePage",label:e.translate("general.page_title"),route:"/",features:["payment-methods","billing-address"]}:{id:"payment",label:e.translate("payment.title"),route:"/payment",features:["payment-methods","billing-address"]},...n?[tb(e)]:[]],detours:[...eb(e,{afterStock:[]}),Q_(e)]}}({i18n:a,isOnePageCheckout:p,reviewEnabled:f});case"onePage":return function({i18n:e,reviewEnabled:t,paymentMethods:n,proposedPaymentLines:r,shop:a,checkout:i}){return{greenPath:[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:({isShippingRequired:e})=>{const o=["contact-information","delivery-method","payment-methods","localization-extension"];return e?o.push("shipping-address"):nb(t,r.peek(),{shop:a,checkout:i,paymentMethods:n})||o.push("billing-address"),o}},...t?[tb(e)]:[]],detours:[...eb(e),Q_(e)]}}({i18n:a,reviewEnabled:f,paymentMethods:h,proposedPaymentLines:g,
2shop:s,checkout:c});case"threePage":return _}},[y,c,v,a,p,b,i,h,g,f,s,_]);return d(Bk,{plan:k,children:e})}function Zk(){const{data:e}=y_(),{currentPage:t}=ac().value,{checkout:{negotiator:n}}=ie(),{deliveryMethodsAddressErrors:r}=n.context,[i,o]=s(!0),{setAddressError:l}=Py(r),c=Ly(n.parts.shippingAddress.fields.countryCode.value);return a(()=>{if(!e)return;if(!i||"/information"!==t?.route&&"/"!==t?.route)return void(t&&o(!1));const{current:r}=n,{allViolations:a,paymentLines:s}=r.value;if(Boolean(Vr(s?.lines))&&a?.length){const e=["billing"].flatMap(e=>Array.from(c(e,a)));for(const[t,n]of e)l(t,n)}o(!1)},[void 0!==t,e,n]),null}function eP({scrollbarGutter:e,children:t}){const n=Wm(),r=n.customProperties.value,a=n.darkModeCustomProperties.value,i=r?.color?.schemes?.scheme1?.base?.background,o=a?.color?.schemes?.scheme1?.base?.background,s=[i&&`html, body { background-color: ${i}; }`,o&&`@media (prefers-color-scheme: dark) { html, body { background-color: ${o}; } }`,e&&`html { scrollbar-gutter: ${e}; }`].filter(Boolean).join("\n");return d(y,{children:[d("style",{children:s}),d("div",{className:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133",children:t})]})}var tP="y3r6mh0";const nP=(rP=e=>Se({colorScheme:e}),be.reduce((e,t)=>({...e,[t]:rP(t)}),{}));var rP;const{surfaceBorder:aP,surfaceControlBorder:iP,...oP}=ye.color.default,sP=E(function({children:e,scoped:t}){const n=Wm(),a=c(),i=n.customProperties.value,o=n.darkModeCustomProperties.value,s=r(()=>{const e=`#CustomProperties-${function(e){if("undefined"!=typeof CSS)return CSS.escape(e);const t=String(e),n=t.length;let r=-1,a="";const i=t.charCodeAt(0);if(1===n&&45===i)return`\\${t}`;for(;++r<n;){const e=t.charCodeAt(r);a+=0!==e?e>=1&&e<=31||127===e||0===r&&e>=48&&e<=57||1===r&&e>=48&&e<=57&&45===i?`\\${e.toString(16)} `:e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?t.charAt(r):`\\${t.charAt(r)}`:"�"}return a}(a)}`,n=i?dP(i):null,r=o?dP(o):null,s=uP(lP(i?.color)),l=uP(lP(o?.color)),c=n&&Object.keys(n).length>0,u=r&&Object.keys(r).length>0;if(!(c||u||s||l))return"";const d=`${c?`${e} {${b(n)}}`:""}${s}`,p=`${u?`${e} {${b(r)}}`:""}${l}`,m=`\n      ${d}\n      ${p?`@media (prefers-color-scheme: dark) { ${p} }`:""}\n    `;return t?`@scope { ${m} }`:m},[i,o,a,t]);return d("div",{id:`CustomProperties-${a}`,children:[d("style",{children:s}),e]})});function lP(e){if(e&&"object"==typeof e&&"schemes"in e)return e.schemes}function cP(e,t){return Object.entries(e).reduce((e,[n,r])=>{const a=t[n];if(null==a)return e;const i="object"==typeof r&&null!=r&&!Array.isArray(r),o="object"==typeof a&&null!=a&&!Array.isArray(a);return i&&o?{...e,...cP(r,a)}:i?e:null!=r?{...e,[a]:r}:e},{})}function uP(e){if(!e||"object"!=typeof e)return"";let t="";for(const n of be){const r=e[n];if(!r||"object"!=typeof r)continue;const{surfaceBorderContinuation:a,...i}=r,o=cP(i,oP),s=nP[n].trim().split(/\s+/).join(".");Object.keys(o).length>0&&(t+=`.${s} {${b(o)}}`),"string"==typeof a&&(t+=`.${s}.${tP}.${tP} {${b({[ye.color.default.surfaceBorder]:a,[ye.color.default.surfaceControlBorder]:a})}}`)}return t}function dP(e){return cP(function(e){const t=e.color;if(!t||"object"!=typeof t||Array.isArray(t))return e;const{schemes:n,...r}=t;return{...e,color:r}}(e),ye)}function pP({children:e}){const{typographyPrimary:t,typographySecondary:n}=Gm();return a(()=>{const e=[t,n].map(e=>[{fonts:e.fonts,source:e.sourceBase,weight:e.weightBase},{fonts:e.fonts,source:e.sourceBold,weight:e.weightBold}]).reduce((e,t)=>e.concat(t),[]).filter(e=>void 0!==e.fonts&&void 0!==e.source).map(({fonts:e,source:t,weight:n})=>new FontFace(e,t,{weight:n}));!async function(){await Promise.all(e).then(e=>{e.forEach(e=>{document.fonts.add(e)})})}()},[t,n]),d(y,{children:e})}function mP({children:e,condition:t}){return d(t?pP:y,{children:e})}function hP({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:a}=h(bu);return d(Te.Provider,{value:t,children:d(Fr,{children:d(mP,{condition:Boolean(n),children:a?d(sP,{scoped:r,children:e}):e})})})}function gP({children:e}){const{checkout:t,source:n,router:r}=ie(),a=r.currentUrl.value,i="simulated"===n.type,o=fr(a.search),s=t.configuration.branding.shell,l=t.configuration.branding.theme,c=Dt()||i||o;return d(hP,{theme:l,shouldLoadFonts:c,children:d(_v,{shell:s,children:d(fP,{children:e})})})}function fP({children:e}){const{canvas:t}=kv();return d(eP,{scrollbarGutter:t?.scrollbarGutter,children:e})}function yP(){const{embed:e}=ie(),n=h(Ou)?.isModalOpen,r=t(()=>Boolean(n?.value||e?.presentation?.active.value));return a(()=>{let t=!1;return r.subscribe(n=>{n!==t&&(t=n,e?.client?.dialogChange(n?"open":"close"))})},[r,e]),null}function vP(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function _P(e){const t="local"===e.type?void 0:e.publicIdentifier,n="persisted"===e.type?e.targetPublicIdentifier:void 0,r="local"===e.type?void 0:e.registrationId;return{appId:e.appId,appApiKey:e.appApiKey,apiVersion:e.apiVersion,appName:e.appName,extensionId:e.extensionId,extensionPoint:e.extensionPoint.target,id:vP(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function bP(e){const t=String(PP(e));return e.stack??t??e.message??""}function kP(e){const t=PP(e);return t?`${t.name}: ${t.message}`:e.message}function PP(e){if(function(e){return"object"==typeof e.cause&&null!=e.cause}(e)&&"stack"in e.cause)return e.cause}var SP=(e=>(e.CheckoutError="CHECKOUT_ERROR",e.ContactError="CONTACT_ERROR",e.DeliveryError="DELIVERY_ERROR",e.DiscountError="DISCOUNT_ERROR",e.InputInvalid="INPUT_INVALID",e.InputRequired="INPUT_REQUIRED",e.InventoryError="INVENTORY_ERROR",e.MerchandiseError="MERCHANDISE_E
2RROR",e.PaymentError="PAYMENT_ERROR",e))(SP||{}),wP=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(wP||{});const CP={[Ur.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[Ur.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[Ur.ExtensionCustomerPrivacyGraphqlError]:{eventName:"extension-customer-privacy-graphql-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-graphql-error"},[Ur.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[Ur.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[Ur.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[Ur.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[Ur.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[Ur.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[Ur.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[Ur.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[Ur.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[Ur.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[Ur.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}},EP=({children:e})=>{if("undefined"==typeof window)return d(y,{children:e});const{observability:t,userEvents:n,checkout:r}=ie(),i=Bg(),o=Vg(),s=r.configuration.layout.isOnePage.value;return a(()=>{const e=(e,t)=>{if(e.name in Ur&&t?.extension){const{extension:n}=t,{trace:r,message:a}=function(e){return{message:kP(e),trace:bP(e)}}(e);if(!ot(e.name))return;const i={apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appName:n.appName,appVersion:n.version,code:wP.ExtensionUsageError,errorName:e.name,extensionId:n.extensionId,extensionName:n.name,extensionType:n.type,message:a,placementReference:n.placementReference,extensionTarget:n.extensionPoint,registrationId:n.registrationId,trace:r,type:"uiExtensionError"};o("uiExtensionError",{...i,timestamp:new Date})}},r=(e,t,r)=>{if(e.name in CP&&t?.extension){const{extension:a}=t,{eventName:o,eventType:l,errorReason:c}=CP[e.name],{userToken:u,shopId:d,sessionToken:p,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,pageLoadId:b}=i;n.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:{userToken:u,shopId:d,sessionToken:p,pageLoadId:b,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,extensionId:vP(a),extensionPoint:a.extensionPoint,extensionPlacementReference:a.placementReference,extensionInstanceId:a.extensionInstanceId,activatedExtensionIds:r?.extensions?.active,eventType:l,eventName:o,errorMessage:e.message,sourceDesign:s?"c1_redesign":"c1_legacy",errorReason:c,silencedViolation:!1,errorOrigin:"client",errorType:"extension",checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,extensionPublicIdentifier:a.publicIdentifier,extensionTargetPublicIdentifier:a.targetPublicIdentifier}})}};return t.addOnError(r),t.addOnError(e),()=>{t.removeOnError(r),t.removeOnError(e)}},[t,n,i,s,o]),d(y,{children:e})};function xP(){const e=Sf(),t=i(new Set);return a(()=>()=>{for(const e of t.current)cancelAnimationFrame(e.handle),clearTimeout(e.timeout),e.resolve();t.current.clear()},[]),oc(n=>{if("error"===n.type||"invalid"===n.type)return new Promise(n=>{const r=()=>{if(!a.settled){a.settled=!0,cancelAnimationFrame(a.handle),clearTimeout(a.timeout);try{e()}finally{t.current.delete(a),n()}}},a={handle:requestAnimationFrame(r),resolve:n,settled:!1,timeout:setTimeout(r,100)};t.current.add(a)})}),null}function IP(){const{checkout:{identity:e,negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:a}}=gn();return t(()=>"applePay"===e.current.value&&Boolean(r.value?.purchasingCompany)&&a.value)}function AP(){const{checkout:{wallets:e},embed:t}=ie(),r=function(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t,email:r,phone:a,shippingAddress:i,billingAddress:o,billingAddressOption:s,paymentLines:l,tipLines:c,discountLines:u,interfaceFlow:d,externalDeliveryIds:p,cartMetafields:m,attributes:h}=e.parts,g=function(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.buyerIdentity;return n(()=>{const e=t.value?.customerProfile;if(e)return e.email},[t])}(),f=ck(),y=Iv();return n((e,n=!1)=>
2{if(d.value=void 0,p.value=void 0,e)r.value=e.email,a.value=e.phone,i.value=e.shippingAddress,o.value=e.billingAddress,e.billingAddressOption&&(s.value=e.billingAddressOption),l.value=e.paymentLines,c.value=e.tipLines,u.value=e.discountLines,m.value=e.cartMetafields;else{const e=g()??"",t=f("shipping"),s=f("billing");r.value=e,a.value="",n||(i.value=t??Yl(i.value)),o.value=s??Yl(o.value);const l=h.value;h.value=l?l.filter(e=>e.key!==jr):l}y.value||n||Lh(t,void 0)},[h,s,o,m,t,u,r,p,f,g,d,y,l,a,i,c])}(),a=qr(),i=IP();return n(({shouldResetCustomerInfo:n=!1,shouldRemovePaymentLine:o=!0,isConstrainedAddress:s=!1}={})=>{const l=n&&t?.isFlagshipPartner?t.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),i.value||e.setEscalatedWallet(null),n&&r(l,s),o&&!l&&a()},[t,r,a,e,i])}function TP({onClick:e,shouldResetCustomerInfo:r,shouldRemovePaymentLine:a,skipRedirect:i}={}){const{negotiate:o,progress:s}=ic(),l=AP(),{dispatch:c}=Sh()??{},{client:u,observability:d,persistence:p,router:m,checkout:{identity:{current:h},negotiator:g},i18n:f}=ie(),{buyerIdentity:y}=g.current.fields,{value:v}=t(()=>function({i18n:e,buyerIdentity:t}){return Boolean(t.value?.customerProfile)?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}({i18n:f,buyerIdentity:y})),{currentDetour:_}=ac().value,b=u.unstable_getSerialization("forcedRedesignWallet"),k=function(e){try{const t=new URL(e.href);return t.searchParams.delete(Sn),t.searchParams.append(Bv,"1"),t.toString()}catch{return}}(m.currentUrl.value),P=m.currentUrl.value.searchParams.has(Bv),S=b&&k&&!P&&!i;return{label:v,onClick:n(async t=>{if(d.counter({name:"checkout_return_to_guest_checkout",value:1,attributes:{identity:h.value,redirect:Boolean(S)}}),S)return p?.clearAll(),e?.(),t?.(),void window.location.replace(k);var n;c?.("addressReset"),(n=m.currentUrl.peek()).searchParams.has(Sn)&&(n.searchParams.delete(Sn),history.replaceState(null,"",n.href)),e?.(),l({shouldResetCustomerInfo:r,shouldRemovePaymentLine:a}),c?.("reset"),_&&s("checkout-as-guest-action"),t?.(),await o({silenceViolations:["non-stock"]})},[_,c,k,h,o,e,p,s,l,S,d,m,r,a])}}function LP(){return function(){const{router:e}=ie(),t=e.currentUrl.value,{onClick:n}=TP({shouldResetCustomerInfo:!0});a(()=>{t.searchParams.has(Bv)&&(n?.(),function(e){e.searchParams.has(Bv)&&(e.searchParams.delete(Bv),history.replaceState(null,"",e.href))}(t))},[])}(),null}const NP="wallet_deceleration";function RP(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=gn(),{clearForcedCheckoutLayout:r}=Sv(xn),{checkout:a,router:i}=ie();return TP({onClick:n(async()=>{var n;e.value=void 0,t.value=void 0,r({wallet:"GOOGLE_PAY"}),"true"===(n=i.currentUrl.value).searchParams.get(NP)&&(n.searchParams.delete(NP),history.replaceState(null,"",n.href)),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value)},[e,t,a,r,i]),shouldResetCustomerInfo:!0,skipRedirect:!0})}function MP({shouldResetCustomerInfo:e}){const t=AP();return n(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const DP="google_pay_legacy_token_bounce";function OP(){return function(){const{checkout:e,embed:t,observability:n,shop:r}=ie(),{inMemoryGooglePayParts:{paymentSheetError:i}}=gn(),{onClick:o}=RP();a(()=>{r.hasFlagEnabled(Hr)&&(t||"GOOGLE_PAY"===e.wallets.escalatedWallet.value&&(e.latestReceipt.value||$r({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:DP,value:1}),n.log(DP,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),o?.(()=>{i.value={type:"recovery_notice"}}))))},[])}(),null}const zP=re("NavigationBlockerContext");class BP extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}function VP({children:e}){const t=i(new Set),a=m(!1),{observability:o}=ie(),s=n(e=>{setTimeout(()=>{t.current.has(e)&&o.error(new BP(`The block associated with the key: ${e} has been blocking for over 30 seconds now. Please check to see you are properly cleaning this up.`))},3e4)},[o]),l=n((e,n)=>{const r=n??"_global",i=t.current;e?(i.add(r),s(r)):i.delete(r),a.value=i.size>0},[a,s]),c=r(()=>({blocking:a,setBlocking:l}),[a,l]);return d(zP.Provider,{value:c,children:e})}const FP=f({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),UP=()=>h(FP);function qP(){const{registerPayNowButtonElement:e}=UP(),t=i(null);return n(n=>{t.current?.(),t.current=n?e(n):null},[e])}function jP({children:e}){const t=i(new Set),[a,o]=s(null),[l,c]=s(0),u=n(e=>(t.current.add(e),o(e),()=>{t.current.delete(e),o(n=>n===e?t.current.values().next().value??null:n)}),[]),p=n(e=>{c(t=>Math.max(0,t+(e?1:-1)))},[]),m=l>0,h=r(()=>({registerPayNowButtonElement:u,payNowButtonElement:a,setPayNowButtonSectionMounted:p,payNowButtonSectionMounted:m}),[u,a,p,m]);return d(FP.Provider,{value:h,children:e})}function HP(){return b_(ie())}function $P(){const{embed:e}=ie(),t=$h(),n=t?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return"DISABLED"===n||"FORWARD_TO_CLIENT"===n||"DISABLED"===r||"FORWARD_TO_CLIENT"===r}function YP(){const{mobileCheckoutSdk:e}=ie(),t=e.config.version,n=e.config.schema;return Boolean(t)||Boolean(n)}function WP({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function GP(e){const t={totalAmount:{any:!0},paymentLines:[],billingAddress:null};
2return{...e,buyerIdentity:{...e.buyerIdentity,email:"",phone:"",customer:{presentmentCurrency:e.buyerIdentity?.customer?.presentmentCurrency,countryCode:e.buyerIdentity?.customer?.countryCode},marketingConsent:[]},delivery:{deliveryLines:[],noDeliveryRequired:[]},discounts:{lines:(n=e.discounts?.lines??[],n.filter(e=>e.allocationSet.allocatedForTotal?.targets.some(e=>!e.deliveryLineTarget)||e.allocationSet.allocated?.allocations.some(e=>!e.target.deliveryLineTarget)))},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(e=>({...e,payment:t}))}}};var n}var JP=(e=>(e.SignUp="sign_up_page",e.Payment="payment_page",e.Login="shop_pay_login_page",e.PaymentErrorState="payment_page_error_state",e.PaymentErrorModalGeneric="payment_page_error_modal_generic",e.PaymentErrorModalSignInFailed="payment_page_error_modal_sign_in_failed",e.PaymentErrorModalContinueWithShopPay="payment_page_error_modal_continue_with_shop_pay",e))(JP||{});class KP extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function XP(e="payment_page",{markPrefilledGuestArrival:t=!1}={}){const{client:a,i18n:i,observability:o,userEvents:s,source:l,checkout:c,shop:u,persistence:d,shop:{hasStorefront:p},url:m,shopPay:h,embed:g,router:f}=ie(),y=f.currentUrl.value,{checkoutAsGuestUrl:v,profilePreviewToken:_,checkoutProfileContext:b,redirectSource:k}=h.config,P="simulated"===l.type,S=h.user.isAuthenticatedUser,w=u.hasFlagEnabled(Wr),C=c.negotiator.throttleState.peek().token,E=c.checkpointToken.value,x=c.configuration.renderContextToken.token.value,I=ik({mode:"copy-if-missing",include:{shopClientUuid:!0}}),A=WP({isFlagshipPartner:g?.isFlagshipPartner,embedderProposalSnapshotEmail:g?.embedderProposalSnapshot.value?.email,proposedEmail:c.proposal.proposed.email.value}),T=r(()=>{if(P)return"";if(!v)return p?m.storefront():"";const e=new URL(v);e.searchParams.set(Gr,"true"),Jr(e),t&&S.value&&Kr(l.type)&&w&&Xr(e,aa),E&&e.searchParams.set(Qr,E),C&&e.searchParams.set(xb,C),_&&b&&(e.searchParams.set(Zr,_),e.searchParams.set(ea,b)),fr(y.search)&&e.searchParams.set(ta,"shop_web"),S.value?e.searchParams.set(na,"true"):e.searchParams.delete(na),x?e.searchParams.set("rctx",x):e.searchParams.delete("rctx");const n=new URLSearchParams(a.initialRequest.url.search);return function(e,t){const n=t.get("_mcs");n&&Yr(n)?e.set("_cs",n):e.delete("_cs")}(e.searchParams,n),I(e.searchParams,n),A&&!e.searchParams.get("checkout[email]")&&e.searchParams.set("checkout[email]",A),e.href},[P,v,E,a.initialRequest.url.search,_,b,y.search,S.value,C,p,m,x,I,A,t,l.type,w]);let L=i.translate("unauthenticated_modals.generic.cta");(HP()||g?.isCheckoutKit())&&(L=i.translate("checkout_sdk.use_another_payment_method"));const N=n(()=>(P||(S.value&&d?.clearAll(),o.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:k}}),s.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...ra(l,c,u),origin:e}},{exportImmediately:!0})),null),[P,S,d,o,s,l,c,u,e,k]),R=n(e=>{if(c.unstable_setRedirectingExternally(!0),N(),!T)return c.unstable_setRedirectingExternally(!1),void o.error(new KP("redirectToGuestCheckout called without a guest checkout URL"));if(!e)return void window.location.assign(T);const t=new URL(T);!function(e,t){t&&(e.set(ia,t.paymentMethod),t.paymentMethodIdentifier?e.set(oa,t.paymentMethodIdentifier):e.delete(oa))}(t.searchParams,e),window.location.assign(t.href)},[c,N,T,o]);return r(()=>({label:L,href:T,onClick:N,redirectToGuestCheckout:R}),[L,T,N,R])}function QP(e){const{negotiate:t}=ic();return n(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:GP,negotiationStage:"negotiation",onComplete:t=>e(n,t)}),[t,e])}function ZP({clearPii:e}){const{embed:t,checkout:r,userEvents:a,source:i,shop:o}=ie(),s=r.negotiator.parts.shippingAddress.value,{href:l,redirectToGuestCheckout:c}=XP("payment_page",{markPrefilledGuestArrival:!e}),u=WP({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:r.proposal.proposed.email.value}),d=QP(c),p=function(e,t){const{negotiate:r}=ic();return n(n=>r({silenceViolations:["all"],force:!0,customizeNegotiation:e=>{const n=GP(e);return{...n,buyerIdentity:{...n.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(n)}),[r,t,e])}(c,u??""),m=r.proposal.negotiated.fields.availableDeliveryAddresses.value,h=Boolean(m?.length&&m.some(e=>sa(s,e.address)));return n(t=>
2{if(r.unstable_setRedirectingExternally(!0),!e||h)return!e&&l&&a.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(i,r,o),action:"payment_step_redirect"}},{exportImmediately:!0}),void c(t);u?p(t).catch(()=>{r.unstable_setRedirectingExternally(!1)}):d(t).catch(()=>{r.unstable_setRedirectingExternally(!1)})},[r,e,l,a,i,o,h,c,u,d,p])}const eS=[3890849,3850711,5198245];function tS(e){return!!e&&eS.includes(e)}function nS(){const{observability:e}=ie(),t=n(t=>{if("undefined"==typeof window||!window.ReactNativeWebView||"function"!=typeof window.ReactNativeWebView.postMessage)return;const n=JSON.stringify(t);try{window.ReactNativeWebView.postMessage(n)}catch(r){e.log("shop_app_messenger_post_message_failed","Failed to post message to ReactNativeWebView",{error:r})}},[e]);return r(()=>({notify:t}),[t])}function rS({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:s,shopPay:l,shop:c}=ie(),u=t.rememberMe.shouldSetRememberMeCookies.value,p="simulated"===r.type,{href:m}=XP(),h=Qv().value,g=nS(),f=i(!1),v="shopPay"===t.identity.current.value,_=o.unstable_getSerialization("apiClientId"),b=o.unstable_getSerialization("shopPayConfig"),k=tS(_),S=!0===b.shop_app_referral_shop_pay_eligible&&"shop_pay_disabled"===h&&c.hasFlagEnabled(la),w=!0===b.shop_pay_sdk_without_shop_pay_eligible,C=w&&"shop_pay_disabled"===h,E=!(p||void 0===h||k||t.configuration.isUniversalCheckoutFinalizer||S||C),x=v&&E,I=v&&!p&&!x&&!0===b.has_remember_me_session&&""!==l.user.shopAccountUuid.value,A=i(!1),T=i(!1);return P(()=>{const e=t.latestReceipt.value;if(null!=e)switch(e.status){case"processed":g.notify({checkout_completed:!0});break;case"action_required":"complete_payment_challenge"===e.action.type?g.notify({checkout_error:"threeds_required"}):g.notify({checkout_error:"generic_error"});break;case"failed":"payment"===e.failure.type||"discount"===e.failure.type?g.notify({checkout_in_progress:!1}):g.notify({checkout_error:"generic_error"})}}),a(()=>{!f.current&&u&&(t.rememberMe.setRememberMeCookies(),f.current=!0)},[u,t.rememberMe]),function({enabled:e,observability:t,shopServerUrl:n}){const r=i(!1);a(()=>{e&&!r.current&&(r.current=!0,fetch(function(e){return new URL("/pay/session",e).href}(n),{method:"GET",credentials:"include",keepalive:!0}).then(e=>{e.ok||t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{status:e.status})}).catch(e=>{t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{errorMessage:e instanceof Error?e.message:String(e)})}))},[e,t,n])}({enabled:I,observability:n,shopServerUrl:s.services.shopServer.url}),a(()=>{x&&!A.current&&(A.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:h,sdkEligible:w}),"deferred_payment"!==h&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(m))},[m,n,w,h,x]),a(()=>{v&&!p&&C&&!T.current&&(T.current=!0,n.log("shop_pay_kept_without_merchant_shop_pay","Keeping checkout in Shop Pay at a merchant with Shop Pay off",{shopPayUnavailableReason:h}),n.counter({name:"shop_pay_kept_without_merchant_shop_pay",value:1,attributes:{reason:"shop_pay_sdk"}}))},[C,v,p,n,h]),x?null:d(y,{children:e})}function aS(){const{client:e}=ie(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===ca)?.variant,r=Object.values(ua).find(e=>e===n)??ua.Control;return{variant:r,showPaymentTiles:r===ua.VariantA||r===ua.VariantC,useRedesignedChoiceList:r===ua.VariantB||r===ua.VariantC,showSingleCreditCard:r!==ua.Control}}function iS(){const{source:e}=ie(),{useRedesignedChoiceList:t}=aS();return t&&"shopPayExternal"!==e.type?"redesigned":"base"}class oS extends Error{constructor(){super(...arguments),this.name="TranslationError"}}const sS=()=>{const{url:e}=ie();return r(()=>[e.cart(),e.storefront()],[e])};function lS(){const{router:e,shop:n}=ie(),r=Jg(),{cartLink:{visibility:a}}=kv(),i=ac(),o=cS(),s=T("hidden"===a);return t(()=>{const{currentDetour:t}=i.value,a="thankYou"===t?.type;return n.hasStorefront&&!r.value&&!a&&!fr(e.currentUrl.value.search)&&Boolean(o.value)&&!s.value})}function cS(){const{source:e,url:n,checkout:{negotiator:r}}=ie(),a="simulated"===e.type,i=r.current.fields.buyerIdentity;return t(()=>{if(a)return new URL(n.cart());let t;return e.cartReturnUrl&&(t=new URL(e.cartReturnUrl)),Boolean(i.value?.customerProfile)&&t&&t.searchParams.append("logged_in","true"),t})}function uS(e){return e.currentUrlMatches("/thank-you")}const dS=_(function({href:e,target:t="auto",children:n,...r},a){const{i18n:i,router:o,url:s,source:l,checkout:c,embed:u,observability:p}=ie(),m=cS(),h=function(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=ie(),a=r?.map(e=>`https://${e}
2`)??[],i=[t.shopServer.url,...a];if(n.domain){const e=`https://${n.domain}`;i.push(e)}const o=e.unstable_getSerialization("loginUrl");return o&&i.push(`https://${new URL(o).host}`),i}(),g=new URL(s.storefront()).origin,f="simulated"===l.type,y=c.configuration.isWindowOpenDelegationEnabled,v=sS();if(c.configuration.isUniversalCheckoutFinalizer&&uS(o))return d("a",{...r,ref:a,"aria-disabled":"true",children:n});let _="_blank"===t,b="_blank"===t,k=zl(e,{cart:Vl(m.value),checkout:Bl()});const P=function(e,t,n,r){let a;try{a=new URL(e,t.currentUrl.value.origin)}catch{return 3}const i=a.protocol.replace(":","");return pS.has(i)?F(a,t.prefix)||!e.startsWith("//")&&!e.startsWith(a.protocol)?0:function(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}(a,t,n,r)?1:2:mS.has(i)?1:3}(k,o,g,h),S=["/information","/shipping","/review","/payment","/thank-you","/cart","/","","/orders","/profile","/settings"],w=/^\/orders\/.*/;switch(P){case 2:b=!0,_=!0;break;case 1:b=!0;break;case 3:b=!0,k="#";break;case 0:!f||S.includes(Fl(k))||w.test(k)||(k="#");break;default:L(P)}const C=_?"_blank":void 0,E=_?"noopener noreferrer":void 0,x=Cu({external:_,native:b});return b?d("a",{...r,href:k,target:C,rel:E,ref:a,"aria-describedby":x,onClick:e=>{if(y&&(1===P||2===P))return e.preventDefault(),u?.client?.windowOpenRequest(k).catch(e=>{p.log("window_open_delegation_error","Window open delegation failed in Link component",{url:k,error:e instanceof Error?e.message:String(e)})}),void r.onClick?.(e);if(f){if(e.preventDefault(),v.includes(k)){const e=new URL(o.currentUrl.value);return e.searchParams.set("ce_redirect",k),void o.navigate(e)}const t=i.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:k});confirm(t)&&open(k)}r.onClick?.(e)},children:n}):d(V,{...r,router:o,href:k,target:C,rel:E,ref:a,"aria-describedby":x,children:n})});dS.displayName="Link";const pS=new Set(["http","https"]),mS=new Set([...pS,"mailto","tel","sms"]);function hS({children:e}){const{geolocation:t}=hy(),{i18n:a,embed:i,checkout:o,observability:s,shop:l}=ie(),c=da({embedder:i?.embedder}),u=vf(),p=o.configuration.layout.isOnePage.value,m="redesigned"===iS(),h=n(e=>a.numberFormatter().format(e),[a]),{symbol:g,prefixed:f}=U(a.currency,a),y=r(()=>function(e){const t=new Map([["closeNotification",()=>e.translate("general.close_notice_label")],["expandNotification",()=>e.translate("general.expand_notice_label")],["closeModal",()=>e.translate("general.close_modal_label")],["processing",()=>e.translate("general.processing")],["loading",()=>e.translate("general.loading")],["submit",()=>e.translate("general.submit")],["increase",(t={})=>e.translate("general.stepper.increase",t)],["decrease",(t={})=>e.translate("general.stepper.decrease",t)],["minimumReached",(t={})=>e.translate("general.stepper.minimum_reached",t)],["maximumReached",(t={})=>e.translate("general.stepper.maximum_reached",t)],["january",()=>e.translate("general.dates.months.january")],["february",()=>e.translate("general.dates.months.february")],["march",()=>e.translate("general.dates.months.march")],["april",()=>e.translate("general.dates.months.april")],["may",()=>e.translate("general.dates.months.may")],["june",()=>e.translate("general.dates.months.june")],["july",()=>e.translate("general.dates.months.july")],["august",()=>e.translate("general.dates.months.august")],["september",()=>e.translate("general.dates.months.september")],["october",()=>e.translate("general.dates.months.october")],["november",()=>e.translate("general.dates.months.november")],["december",()=>e.translate("general.dates.months.december")],["monday",()=>e.translate("general.dates.weekdays.monday")],["tuesday",()=>e.translate("general.dates.weekdays.tuesday")],["wednesday",()=>e.translate("general.dates.weekdays.wednesday")],["thursday",()=>e.translate("general.dates.weekdays.thursday")],["friday",()=>e.translate("general.dates.weekdays.friday")],["saturday",()=>e.translate("general.dates.weekdays.saturday")],["sunday",()=>e.translate("general.dates.weekdays.sunday")],["mondayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.monday")],["tuesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.tuesday")],["wednesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.wednesday")],["thursdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.thursday")],["fridayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.friday")],["saturdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.saturday")],["sundayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.sunday")],["showNextMonth",(t={})=>e.translate("general.datepicker.show_next_month",t)],["showPreviousMonth",(t={})=>e.translate("general.datepicker.show_previous_month",t)],["rangeStart",()=>e.translate("general.datepicker.range_start")],["inRange",()=>e.translate("general.datepicker.in_range")],["rangeEnd",()=>e.translate("general.datepicker.range_end")],["autocompleteOptionsAvailable",({count:t=0}={})=>0===t?e.translate("general.autocomplete_zero_item"):1===t?e.translate("general.autocomplete_single_item"):e.translate("general.autocomplete_multi_item",{number:t})],["qrCode",()=>e.translate("general.qr_code")],["removeChip",()=>e.translate("general.remove_chip")],["removeItem",(t={})=>e.translate("general.remove_item",t)],["removeTag",()=>e.translate("general.remove_tag")],["mapClusterTitle",({count:t=0}={})=>{const n="number"==typeof t?(r=t,e.numberFormatter().format(r)):t;var r;return 1===t?e.translate("general.map.cluster_title.one",{number:n}):e.translate("general.map.cluster_title.other",{number:n})}],["externalNewWindow",()=>e.translate("general.forwarding_indicator.external_and_new_window")],["newWindow",()=>e.translate("general.forwarding_indicator.new_window")],["external",()=>e.translate("general.forwarding_indicator.external")],["expandSheet",()=>e.translate("general.sheet.expand")],["dropzoneDraggedOver",()=>e.translate("general.dropzone.dragged_over")],["dropzoneInvalidFileType",()=>e.translate("general.dropzone.invalid_file_type")],["addFile",()=>e.translate("general.dropzone.add_file")],["reviewItemHeaderChangeValue",()=>e.translate("review.item_header.change_value")],["reviewItemHeaderSection",()=>e.translate("review.item_header.section")],["reviewItemHeaderValue",()=>e.translate("review.item_header.value")],["moneyLinesHeaderItem",()=>e.translate("order_summary.cost_table_item_column_header")],["moneyLinesHeaderValue",()=>e.translate("order_summary.cost_table_value_column_header")],["clipboardCopied",()=>e.translate("clipboard.copied")],["clipboardFailedToCopy",()=>
2e.translate("clipboard.failed_to_copy")],["productThumbnailQuantityLabel",()=>e.translate("order_summary.product_image_quantity_label")]]);return(e,n)=>{const r=t.get(e)?.(n);if(null==r)throw new oS(`Missing UI library translation: ${e}`);return r}}(a),[a]),v=r(()=>({code:a.currency,symbol:g,symbolPrefixed:f}),[f,g,a.currency]),_=r(()=>i?{embedder:i.embedder,interstitialBrandingEnabled:c}:void 0,[i,c]),b=r(()=>({countryCode:t.country.code}),[t.country.code]),k=r(()=>({direction:a.localeDirection,languageCode:a.locale}),[a.locale,a.localeDirection]),P=A_(),S=r(()=>({...P,close:()=>P.emit("closeAnnouncement")}),[P]);return d(nd,{currency:v,embed:_,formatNumber:h,geolocation:b,linkComponent:dS,locale:k,onePage:p,editor:u,redesignedChoiceLists:m,animatedTextFieldLabels:l.hasFlagEnabled(pa),translate:y,announcementEmitter:S,logger:s,children:e})}function gS(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const fS="$.payments",yS="$.cart.buyerIdentity",vS="$.cart.deliveryGroups[0].deliveryAddress",_S="$.cart.localizedField",bS="$.cart.billingAddress";function kS(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=vn("allViolations"),a=t(()=>r.value?[]:n.value?n.value.filter(e=>"UnprocessableTermViolation"===e.__typename&&ma.has(e.code)).map(e=>({message:e.localizedMessage||e.nonLocalizedMessage,target:e.target})):[]);return t(()=>{const t=[...e.validationErrors.value,...a.value].filter(gS()),n=t.filter(({target:e})=>e?.startsWith(vS)&&Boolean(e.replace(`${vS}.`,""))),r=t.filter(({target:e})=>e?.startsWith(yS)&&Boolean(e.replace(`${yS}.`,""))),i=t.filter(({target:e})=>e?.startsWith(fS)&&Boolean(e.replace(`${fS}.`,""))),o=t.filter(({target:e})=>e?.startsWith(_S)&&Boolean(e.replace(`${_S}.`,""))),s=t.filter(({target:e})=>e?.startsWith(bS)&&Boolean(e.replace(`${bS}.`,""))),l=t.filter(({target:e})=>"$.cart.poNumber"===e),c=t.filter(e=>![...r,...n,...i,...o,...s,...l].includes(e));return{contactErrors:r,deliveryAddressErrors:n,paymentErrors:i,localizedFieldErrors:o,billingAddressErrors:s,poNumberErrors:l,globalErrors:c}})}function PS(e){return e.flatMap(e=>{const t=e.target?.split(".").pop();return t?[{error:e,field:t}]:[]})}function SS({targets:e,addressField:t,firstAdditionalAddressFields:n}){const r=e.find(({field:e})=>e===t);if(r)return r.error;const a=e.find(({field:e})=>"zip"===e?"postalCode"===t:"provinceCode"===e?"zoneCode"===t:("address1"===e||"address2"===e)&&zt[e].includes(t));return a?void 0===("address1"===a.field||"address2"===a.field?a.field:void 0)||n.includes(t)?a.error:{...a.error,message:" "}:void 0}function wS({children:e}){const{checkout:t}=ie(),{validation:o,negotiator:s}=t,{deliveryMethodsAddressErrors:l}=s.context,{billingAddressErrors:c,poNumberError:u}=o,{emailInputError:p,phoneInputError:m}=o.contactErrors,{contactErrors:h,deliveryAddressErrors:g,billingAddressErrors:f,poNumberErrors:v}=kS().value,{shippingAddress:_,billingAddress:b}=s.parts,k=_.fields.countryCode.value,P=b.fields.countryCode.value,S=Ty(k),w=Ty(P,Kk(t)),C=function(){const e=i(new Set),{userEvents:t,shop:{id:r,sameBillingAndShippingAddress:a},source:{checkoutSessionIdentifier:o},checkout:{negotiator:s}}=ie(),{value:l}=s.current.fields.shippingAddress,{value:c}=s.current.fields.billingAddress,{value:u}=s.current.fields.localizationExtensions;return n(({errors:n,reasons:i})=>{if(l&&Dy(l)){const s=`shipping:${Oy(l)}`;e.current.has(s)||n?.some(e=>Yt.has(e.code))||i?.includes(Wt.InvalidAddress)||(zy(l.countryCode??"unknown",My(l),"shipping_address",r,o,a,t),e.current.add(s))}if(c&&Dy(c)){const s=`billing:${Oy(c)}`;e.current.has(s)||n?.some(e=>Gt.has(e.code))||i?.includes(Wt.InvalidAddress)||(zy(c.countryCode??"unknown",My(c),"billing_address",r,o,a,t),e.current.add(s))}if(u&&u?.length>0){const{cacheKey:i,keysOnly:s}=function(e){const t=e.filter(e=>e.value&&"string"==typeof e.value&&""!==e.value.trim());return{cacheKey:t.map(e=>`${e.key}:${Kt(e.value.trim())}`).join("|"),keysOnly:t.map(e=>e.key)}}(u);if(s.length>0){const u=`localization:${i}`;e.current.has(u)||n?.some(e=>Jt.has(e.code))||(zy(l?.countryCode??c?.countryCode??"unknown",s,"localized_id",r,o,a,t),e.current.add(u))}}},[l,c,u,r,o,a,t])}(),E=r(()=>({}),[]),x=n((e,t,n)=>{const r=e.value,a="string"==typeof r&&E[t]===r;!n||r&&!a?!n&&a&&(e.value=void 0,delete E[t]):(e.value=n.message,E[t]=n.message)},[E]);return a(()=>{x(m,"phone",h.find(({target:e})=>"phone"===e?.split(".")?.pop())),x(p,"email",h.find(({target:e})=>"email"===e?.split(".")?.pop()))},[h,p,x,m]),a(()=>{const e=PS(g);Object.entries(l).forEach(([t,n])=>{if(!dy(t))return;const r=SS({targets:e,addressField:t,firstAdditionalAddressFields:S});x(n,t,r)})},[g,l,S,x]),a(()=>{const e=PS(f);
2Object.entries(c).forEach(([t,n])=>{if(!dy(t))return;const r=SS({targets:e,addressField:t,firstAdditionalAddressFields:w});x(n,`billing_${t}`,r)})},[c,f,w,x]),oc(e=>{"success"===e.type||"error"===e.type?C({errors:e.errors}):"invalid"===e.type&&C({reasons:e.reasons})}),a(()=>{x(u,"poNumber",v[0])},[x,u,v]),d(y,{children:e})}const CS=w({load:()=>dl(()=>import("./d08a6c7d.CEvBs_8L.js"),__vite__mapDeps([63,2,1,3,4,5,64,65,8,66,24,67,68,10,69,70,71,9,72,73,74,7,11])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:function(e){const{sessionLoadFailed:t}=gn().inMemoryApplePayParts,{observability:n}=ie();a(()=>{e&&(t.value=!0)},[e,n,t])}});function ES(){const e=function(){const e=Tt();return t(()=>!!e.value&&void 0!==window.ApplePaySession)}(),{availableWallets:n}=gn(),r=T(n.some(({name:e})=>"APPLE_PAY"===e)),a=i(!1),o=t(()=>(!a.current&&e.value&&r.value&&(a.current=!0),a.current));return d(x,{when:o,children:d(CS,{})})}function xS(){const{checkout:e}=ie();return!e.configuration.showPayButton}function IS({enabled:e,onTimeout:t,timeout:n=6e4}){const r=i(null),o=oe(t);a(()=>
2{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,o,n])}var AS={Heading:"n8k95w1 n8k95w0 _1fragemws",textAlignVariant:{start:"n8k95wb n8k95w8 _1fragem126",center:"n8k95wc n8k95w9 _1fragem124",end:"n8k95wd n8k95wa _1fragem125"},displayVariant:{inline:"n8k95wf n8k95we _1fragem69",block:"n8k95wg"},levelVariant:{1:"n8k95w2",2:"n8k95w3",3:"n8k95w4",4:"n8k95w5",5:"n8k95w6",6:"n8k95w7"},visuallyHidden:"n8k95wh _1fragem121"};function TS({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:s,visibility:l,tabIndex:c,display:u="block"}){const p=vu(),m=r??p??0,h=p?`h${p}`:"h1",g="hidden"===l?AS.visuallyHidden:v(AS.Heading,o&&AS.textAlignVariant[o],m?AS.levelVariant[m]:void 0,u&&AS.displayVariant[u]),f=i(null);return a(()=>{s&&f.current?.focus({preventScroll:!0})},[s]),d(h,{id:e,ref:f,tabIndex:s?-1:c,className:g,role:"heading"===n?void 0:n,children:t})}function LS({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=ry(),i=m(!1);a(()=>{r(),i.value=!0},[i,r]);const o=d("div",{className:"MQqMI",role:"dialog","aria-modal":!0,"aria-label":t,children:[d("div",{className:"Jue6i"}),d("div",{className:"kpec9",children:e})]});return d(y,{children:[n&&!i.value?d("div",{"aria-hidden":"true",children:o}):null,d(nu,{children:d(ey,{children:o})})]})}function NS({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=ie(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return d(LS,{dialogLabel:r,renderInlineUntilMounted:e,children:d(Qf,{gap:"large-400",alignItems:"center",children:[d(Df,{children:d(Bf,{size:"large"})}),d(TS,{level:2,textAlign:"center",children:r})]})})}function RS({onTransitionComplete:e,useConsentCopy:t=!1}){return d(MS,{onTransitionComplete:e,useConsentCopy:t})}function MS({onTransitionComplete:e,useConsentCopy:t}){const{checkout:r,i18n:o}=ie(),s=xS(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=UP(),u=Boolean(l||s&&c),p=i(!1);u&&(p.current=!0);const m=r.configuration.layout.isOnePage,h=m.value,g=p.current,f=i(null),y=i(!1),v=i(!1),_=n(()=>{m.value&&(y.current||(y.current=!0,$u({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}),r.wallets.setIsDecelerating(!1),e()))},[o,m,e,r.wallets]);return IS({enabled:!0,onTimeout:()=>{v.current=!0,_()},timeout:1e4}),a(()=>{if(null===f.current&&(f.current=Date.now()),v.current)return void _();if(!g)return;const e=Date.now()-f.current,t=Math.max(0,3e3-e);if(0===t)return void _();const n=setTimeout(()=>{_()},t);return()=>clearTimeout(n)},[_,h,g]),d(NS,{renderInlineUntilMounted:!0,useConsentCopy:t})}function DS(e){const{shop:n,checkout:{configuration:r,identity:a}}=ie(),i="shopPay"===a.current.value,o=n.hasFlagEnabled(fn);return t(()=>ha({supportsOnePage:ga({isOnePage:r.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:o,asPaymentMethod:e.value}),isShopPayActive:i}))}const OS=["address2","company","phone"];function zS({addressErrors:e}){if(1!==e.size)return;const[t]=e.keys();var n;return void 0!==t?(n=t,OS.includes(n)?t:void 0):void 0}function BS({missingAddressField:e,violations:t}){return"company"===e&&t.some(({code:e})=>"DELIVERY_COMPANY_REQUIRED"===e)}function VS({addressErrors:e,violations:t}){const n=zS({addressErrors:e});if(!BS({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function FS({paymentLines:e,paymentMethods:t}){const n=t?.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name);if(!n)return{status:"not_connected"};const r=Nt(e,"PAYPAL_EXPRESS");if(r&&fa(r)){const{walletContent:e}=r.method;return{status:"connected",email:e?.email??"",token:e?.token??""}}return{status:"not_connected"}}function US({code:e}){return Gn.has(e)||Ca.has(e)||Ea.has(e)||xa.has(e)||ma.has(e)||Ia.has(e)||Aa===e}function qS({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=gn();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function jS(){const{isInPayPalContextSignal:e}=gn(),{i18n:n}=ie(),r=qS({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:a}}=gn();return t(()=>{if(e.value)return"error"===r.value.status?n.translate("wallets.errors.unavailable.description",{walletName:n.translate("brand.paypal")}):"error"===a.value.status?n.translate("wallets.errors.generic",{walletName:n.translate("brand.paypal")}):void 0})}const HS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:t}=e.parts;return n(()=>{const e=t.value;t.value=Cn(e,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}}
2)},[t])};function $S(){const e=Be(),{checkout:n,shop:r}=ie(),a=n.configuration.layout.isOnePage.value,i=r.hasFlagEnabled(_a),o=n.extensibility.ui.hasAtRiskPlacement;return t(()=>{if(a)return!1;if(i&&!o.value)return!1;const t=e.value.enabledDeliveryMethods.includes("PICK_UP");return!n.isShippingRequired.value||!t})}function YS(e){return Boolean(e.value?.method.walletContent?.isVenmo)}const WS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>Nt(n.value,"PAYPAL_EXPRESS"))},GS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Nt(n.value,"PAYPAL_EXPRESS");return Boolean(e&&fa(e))})},JS=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=gn(),{progressing:n}=ic(),r=XS();return t(()=>Boolean(r.value&&("loading"===e.value.status||n.value)))},KS=()=>{const e=XS(),n=ya(),r=va(),a=kt();return t(()=>!(!r.value&&(n.value||a.value&&a.value.amount<=0)||!e.value))},XS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Nt(n.value,"PAYPAL_EXPRESS");return Boolean(e&&!fa(e))})},QS=new Map,ZS=new Map,ew=new Map;class tw extends ul{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function nw({children:e}){const{checkout:i,observability:o,router:l,i18n:c,shop:u,source:p}=ie(),h=l.currentUrl.value,g=i.configuration.layout.isOnePage.value,f=u.hasFlagEnabled(fn),{forceOnePageCheckoutLayout:y}=Sv(fn),v=m(h.searchParams.has(yn)&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:_}=i.negotiator.parts,b=La(p),k=Xg(Ct.PayPal,{scope:b}),S=Xg(Ct.GooglePay,{scope:b}),w=Xg(Ct.AmazonPay,{scope:b}),C=Xg(Ct.ApplePay,{scope:b}),E=function(e){const{checkout:{negotiator:n}}=ie(),r=n.parts.paymentLines;return t(()=>{const t=e.lastClicked.value,n=Nt(r.value,"PAYPAL_EXPRESS");return Boolean(n)||"PAYPAL_EXPRESS"===t})}(i.wallets),x=m(void 0),I=yh({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),A=yh({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:FS({paymentLines:i.proposal.proposed.paymentLines.peek(),paymentMethods:i.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),L=yh({buttonStatus:{status:"not_rendered"}}),N=yh({buttonStatus:{status:"not_rendered"}}),R=hv(),M=_n(),D=yh({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:v.value&&$l({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g})&&Na({isApplePaySubscriptionReviewLayoutSupported:g||u.hasFlagEnabled(fn),hasSubscriptionReviewQueryParam:v.value,isABTestActive:u.hasFlagEnabled(un),variant:R,isCaliforniaBillingOrShippingAddress:M.value})?"storefront_redirect":void 0,prefetchPaymentSession:void 0,initialDeliveryIdentifier:void 0,isLoadingPaymentSheet:!1,sessionLoadFailed:!1,requirePhoneOnNextAttempt:!1,requireBillingPhoneOnNextAttempt:!1,expiresAt:void 0,preCompletionHandler:void 0}),O=m(void 0),z=yh({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},buyWithPrimeButtonStatus:{status:"not_rendered"},buyerDetailsContentLoaded:!1,hasPaymentSheetError:!1,addressError:void 0,buyerDetails:{loading:!1,error:!1,details:void 0},serializedAmazonParams:null}),B=m(!1),V=m(void 0),{queryParam:F}=Ov({applePayPaymentSheetError:D.paymentSheetError,applePaySubscriptionReviewTransition:D.subscriptionReviewTransition}),U=DS(D.asPaymentMethod).value,q=i.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");!function(e){const{checkout:{negotiator:t}}=ie(),{parts:n}=t,{paymentMethods:r}=t.current.fields;P(()=>{if("connected"===e.peek().status)return;const t=FS({paymentLines:n.paymentLines.value,paymentMethods:r.value});"connected"===t.status&&(e.value=t)})}(A.accountStatus),function(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:i},checkout:{negotiator:o}}=ie(),s=o.current.fields.paymentMethods,l=Boolean(n?.isFlagshipPartner)&&!En(n?.embedder),c=s.value?.find(e=>"wallet"===e.type&&"SHOP_PAY"===e.name),u=c?.placements?.includes("ACCELERATE
2D_CHECKOUT"),d=u?c?.eligibilityToken:void 0,p=t.services.shopServer.url,m=e.buttonStatus;a(()=>{if(!l)return void(m.value={status:"rendered"});if(!d)return void(m.value={status:"not_eligible"});const e=`${p}|${i||d}`,t=QS.get(e);if(t)return void(m.value=t);const n=ew.get(p)??0;if(Date.now()<n)return void(m.value={status:"error"});let a=!1,o=ZS.get(e);return o||(o=async function(){try{const e=await fetch(`${p}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:d})});if(!e.ok)return 429===e.status&&ew.set(p,Date.now()+6e4),r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:`http_${e.status}`}}),{status:{status:"error"},definitive:!1};let t;try{t=await e.json()}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"not_eligible",reason:"malformed_payload_fail_closed"}}),{status:{status:"not_eligible"},definitive:!1}}const n=!0===t.eligible||!1===t.eligible,a=!1!==t.eligible&&n?{status:"rendered"}:{status:"not_eligible"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:a.status,...!n&&{reason:"malformed_payload_fail_closed"}}}),{status:a,definitive:n}}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:"network_error"}}),{status:{status:"error"},definitive:!1}}}().then(({status:t,definitive:n})=>(n&&QS.set(e,t),ZS.delete(e),t)),ZS.set(e,o)),o.then(e=>{a||(m.value=e)}).catch(()=>{}),()=>{a=!0}},[l,d,i,p,m,r])}(N),function(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=ie(),i=n.escalatedWallet.value;a(()=>{if(t.email.value)return;const n=e.fields.paymentLines.value?.lines??[];let a;switch(i){case wn.AmazonPay:case wn.BuyWithPrime:a=function(e,t){const n=Ta(e,t);if(!n)return;const r=n.method.walletParams;return r?.email}(n,i);break;case"PAYPAL_EXPRESS":case"VENMO":a=function(e){const t=Nt(e,"PAYPAL_EXPRESS");return t&&t.method.walletContent?t.method.walletContent.email:void 0}(n);break;default:return}a?(t.email.value=a,r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow and recovered it",{escalatedWallet:i,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:i,paymentLines:n,status:"failure"})},[])}();const j=Gv(N),H=e_({inMemoryGooglePayParts:I,inMemoryPayPalParts:A,inMemoryVenmoParts:L,inMemoryApplePayParts:D,inMemoryAmazonPayParts:z,didIncrementUnusablePartialAddressMetric:B}),$=r(()=>H?.filter(({placements:e,name:t})=>("APPLE_PAY"!==t&&"GOOGLE_PAY"!==t||"localization_extension_field_error"!==F)&&!("APPLE_PAY"===t&&q&&!U)&&Wv(t,e,j)),[H,F,q,U,j]),Y=T($);a(()=>{$?.length&&performance.mark(Ra)},[]);const W=$?.map(e=>e.name)||[],G=W.join(",");a(()=>{new Set(W).size!==W.length&&o.error(new tw("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(W.filter((e,t)=>W.indexOf(e)!==t))],allWalletNames:W}}))},[G,o]);const J=$?.length||0,K=void 0!==i.wallets.activeSession.value?.wallet&&"APPLE_PAY"!==i.wallets.activeSession.value.wallet&&Boolean(i.wallets.isDeceleratingSignal?.value),X=D.subscriptionReviewTransition.value,Q=t(()=>Ma({checkout:i})),Z=Q.value&&Da(R),ee=function({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:a,isABTestActive:i}){return!e&&(!!(t||n&&r)||"storefront_redirect"===a&&(n||!i))}({asPaymentMethod:D.asPaymentMethod.value,useConsentCopy:Z,isCaliforniaBillingOrShippingAddress:M.value,hasSubscription:Q.value,transition:X,isABTestActive:u.hasFlagEnabled(un)}),te=void 0!==X&&!K&&ee&&$l({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g}),ne=i.wallets.hasActiveApplePaySubscriptionReview.value&&ee&&!M.value&&void 0===X;a(()=>{ee||(i.wallets.setHasActiveApplePaySubscriptionReview(!1),void 0!==X&&(D.subscriptionReviewTransition.value=void 0,K||i.wallets.setIsDecelerating(!1)))},[X,i.wallets,D.subscriptionReviewTransition,K,ee]),a(()=>{"storefront_redirect"===X&&te&&!g&&y({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[X,y,g,te]);const re=u.hasFlagEnabled(xn)&&!g&&h.searchParams.has(Oa);a(()=>{re&&(i.unstable_forceCheckoutLayoutToOnePage(),wv(o,{wallet:"GOOG
2LE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),$u({content:c.translate("wallets.errors.subscription_review_required"),role:"status"}))},[i,c,o,re]);const ae=n(()=>{v.value=!1,D.subscriptionReviewTransition.value=void 0},[v,D.subscriptionReviewTransition]);!function(e){const{observability:t,router:n}=ie(),r=n.currentUrl.value,[a,i]=s(r.normalizedPath);r.normalizedPath!==a&&(i(r.normalizedPath),e.forEach(({walletName:e,...n})=>{("signal"in n?[n.signal]:n.signals).forEach(n=>{"error"===n.peek().status&&(t.counter({name:"wallet_button_status_reset",value:1,attributes:{walletName:e}}),n.value={status:"not_rendered"})})}))}([{walletName:"applepay",signal:D.buttonStatus},{walletName:"amazonpay",signal:z.buttonStatus},{walletName:"buy_with_prime",signal:z.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:I.buttonStatus},{walletName:"paypal",signals:[A.acceleratedCheckoutButtonStatus,A.payWithPayPalButtonStatus]}]),P(()=>{const e=_.value,t=i.wallets.activeSession.value;"APPLE_PAY"===t?.wallet&&o.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:e?.countryCode,isPostalCodePadded:kn(e?.postalCode,e?.countryCode),asPaymentMethod:t.asPaymentMethod})});const oe=r(()=>({availableWallets:H,walletUsedForSubmissionSignal:x,persistedPayPalSignal:k,inMemoryPayPalParts:A,inMemoryVenmoParts:L,persistedGooglePaySignal:S,inMemoryGooglePayParts:I,inMemoryApplePayParts:D,applePaySessionHandler:O,persistedApplePaySignal:C,persistedAmazonSignal:w,inMemoryAmazonPayParts:z,inMemoryShopPayParts:N,didIncrementUnusablePartialAddressMetric:B,acceleratedWalletPaymentMethods:Y,isInPayPalContextSignal:E,buttonCount:J,receiptErrorSignal:V}),[H,k,S,C,w,Y,J,L,x,I,A,D,O,z,N,V,E,B]);return d(za.Provider,{value:oe,children:[te&&d(RS,{onTransitionComplete:ae,useConsentCopy:Z}),d("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:Se({screenReaders:"only"}),children:ne?c.translate("wallets.errors.subscription_review_required"):""}),e]})}const rw=E(function({children:e,AlternativeProposal:t}){const{embed:r}=ie(),a=n(e=>r?.client?.showToast(e)??!1,[r]);return d(jP,{children:d(VP,{children:d(aw,{AlternativeProposal:t,children:[d(mh,{handleToast:a,children:e}),d(tu,{})]})})})});function aw({children:e,AlternativeProposal:t}){const{shop:n,checkout:a}=ie(),i=a.unstable_graphqlDataRequestInfo?.httpRequestInfo,o=r(()=>{const{country:e,zone:t,coordinates:r}=i?.geolocation??{};return i?{geolocation:{default:e??void 0,country:e??n.country,zone:t??void 0,coordinates:r?{longitude:r.longitude,latitude:r.latitude}:void 0},shop:{}}:void 0},[i,n]),s="undefined"==typeof window?null:d(y,{children:[d(xP,{}),d(uv,{}),d(Zk,{}),d(LP,{}),d(OP,{})]}),l=t??v_;return d(my.Provider,{value:o,children:d(I_,{children:d(hS,{children:d(N_,{children:d(f_,{children:d(l,{children:d(gP,{children:d(nw,{children:d(Qk,{children:d(wS,{children:d(Cf,{children:d(H_,{children:d(Zh,{children:d(w_,{children:d(Og,{children:d(EP,{children:d(c_,{children:d(z_,{children:d(d_,{children:d(rS,{children:[d(ly,{}),d(iw,{}),d(yP,{}),d(ES,{}),e,s]})})})})})})})})})})})})})})})})})})})})}function iw(){const e=i(!1),t=ie(),{embed:n,webMcp:r}=t,a=ae(rc),o=t.checkout.negotiator,{resetAddressErrors:s}=Py(o.context.deliveryMethodsAddressErrors),l=oe({journeyProgression:a,negotiator:o,clearShippingAddressErrors:s});if(!e.current){e.current=!0;const a={get completing(){return l.current.journeyProgression.completing},get progressing(){return l.current.journeyProgression.progressing},detour:(...e)=>l.current.journeyProgression.detour(...e),progress:(...e)=>l.current.journeyProgression.progress(...e),prefetch:()=>l.current.journeyProgression.prefetch(),negotiate:e=>l.current.journeyProgression.negotiate(e)},i=()=>l.current.negotiator.waitForPendingNegotiations();n?.unstable_providePreactContext({journey:a,waitForPendingNegotiations:i,waitForSkeletonRemoved:()=>ml(),negotiationContext:o.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>C(()=>dl(()=>import("./7724832f.Y9EtgguL.js"),__vite__mapDeps([75,1,2,3,4,5,76,61,45,46,7,8,9,10,11]))).then(({createPickupLocalityServices:e})=>e(t)),journey:a,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:i})}return null}const ow=w({displayName:"DevTools",load:()=>dl(()=>import("./bad03769.IWe9-g46.js"),__vite__mapDeps([77,2,1,3,4,5,62,7,8,9,10,11,78])),suspense:!0}),sw=w({displayName:"EditorBridge",suspense:!1,load:()=>dl(()=>import("./abd080c1.DmSv4ttW.js"),__vite__mapDeps([79,1,2,3,4,5,11,7,8,9,10]))}),lw=w({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>dl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.CddL1Ehx.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([80,2,1,3,4,5,39,40,7,8,9,10,11])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))}),cw=w({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>dl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.CddL1Ehx.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([80,2,1,3,4,5,39,40,7,8,9,10,11])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});function uw({children:e}){return d(y,{children:e})}function dw({children:e}){const t=r(()=>new URL(window.location.href),[]),{client:n,source:i}=ie(),o=n.unstable_getSerialization("shopPayConfig");return a(()=>{o&&async function(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:a}=n,i={},o=Ba(e.searchParams);if(a&&!o||"simulated"===t.type||null===t.checkoutSessionIdentifier||!e.searchParams.has(Gr)||(i.disable_automatic_redirect=t.checkoutSessionIdentifier),r&&"false"===e.searchParams.get("auto_redirect")&&(i.block_universal_redirect=!0),Object.keys(i).length>0){const t={...i,checkout_version:"c1",edge_redirect:"true"===e.searchParams.get("edge_redirect")};fetch("/shopify_pay/accelerated_checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),credentials:"include"})}}(t,i,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,i,o]),d(y,{children:e})}function pw({children:e}){const t="undefined"==typeof window;return d(t?uw:dw,{children:e})}function mw({children:e,context:t,...n}){const r="undefined"==typeof window,a=Tt();return d(Fa.Provider,{value:t,children:d(yf,{target:"cart",children:d(pw,{children:d(q,{router:t.router,children:d(rw,{...n,children:d(Va,{children:[d(hf,{children:e}),d(bf,{}),!r&&d(gf,{}),d(x,{when:a,children:[d(cw,{}),d(lw,{})]}),d(hw,{}),Dt()&&d(sw,{})]})})})})})})}function hw(){const e=Tt();return vf(),d(x,{when:()=>e.value&&!1,children:d(ow,{})})}
2function gw(e){return[e].flat(99).filter(Boolean).length>0}var fw={Divider:"mg7oix2 mg7oix0 _1fragemws mg7oix1",alignmentVariant:{start:"mg7oixc mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema",center:"mg7oixd mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema",end:"mg7oixe mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema"},borderWidthVariant:{base:"mg7oixf",large:"mg7oixg","large-100":"mg7oixh","large-200":"mg7oixi"},styleVariant:{base:"mg7oix3",dashed:"mg7oix4",dotted:"mg7oix5"},contentAlignmentVariant:{start:"mg7oixj",center:"mg7oixk",end:"mg7oixl"},directionVariant:{inline:"mg7oix8 mg7oix6 _1fragemzf",block:"mg7oix9 mg7oix7 _1fragem2s"}};function yw({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:a="separator",alignment:i="center",children:o}){const s=gw(o);return d("div",{role:s?void 0:a,className:v(fw.Divider,fw.directionVariant[r],s&&fw.alignmentVariant[i],fw.borderWidthVariant[n],fw.styleVariant[t]),id:e,children:s&&d("div",{className:v(fw.contentAlignmentVariant[i]),children:[o,"separator"===a&&d("span",{role:"separator"})]})})}function vw({children:e,condition:t}){return d(t?"picture":y,{children:e})}const _w=new Map(qa({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function bw(e,t){var n;if(!e&&t&&Ua(t))return Object.entries((n=t,Ua(n)?{base:[{source:n.default}],...n.conditionals.reduce((e,t)=>{const n=void 0===t.conditions.viewportInlineSize?"base":t.conditions.viewportInlineSize.min,r=void 0===t.conditions.resolution?[{source:t.value}]:[{source:t.value,resolution:t.conditions.resolution}],a=n in e?e[n]??[]:[];return{...e,[n]:[...a,...r]}},{})}:{base:[{source:n}]})).sort(([e],[t])=>{const n=ne[e],r=ne[t];return null!=n&&null!=r?r-n:0}).map(([e,t])=>{const n=_w.get(e);if(void 0!==n&&Array.isArray(t)){const e=t.map(({source:e,resolution:t})=>[e,t&&`${t}x`].join(" ").trim()).join(", ");return j("source",{key:n,media:n,srcSet:e})}}).filter(Boolean)}function kw(e){if(e)return Ua(e)?"string"==typeof e.default?e.default:void 0:e}var Pw={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},Sw={BadgeWrapper:"_1m6j2n3v _1m6j2n3u _1fragemwi",Badge:"_1m6j2n3x _1m6j2n3w _1fragemfp _1fragemgj _1fragemi7 _1fragemhd _1fragemsw _1fragemr3 _1fragem64 _1fragem19 _1fragembj _1fragemyz",Overlay:"_1m6j2n314 _1m6j2n313 _1fragemwi _1fragem64 _1fragem19 _1fragembj",Placeholder:"_1m6j2n3p _1m6j2n3o _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem64 _1fragem19 _1fragembj",ProductThumbnail:"_1m6j2n33 _1m6j2n32 _1fragemws",ProductThumbnailImage:"_1m6j2n3n _1m6j2n3m _1fragemzf _1fragem4q _1fragem5u",depthVariant:{0:"_1m6j2n3d",1:"_1m6j2n3e _1m6j2n3c",2:"_1m6j2n3f _1m6j2n3c",legacy:"_1m6j2n3g _1m6j2n3c"},borderColorVariant:{base:"_1m6j2n38",custom:"_1m6j2n39"},borderRadiusVariant:{base:"_1m6j2n3a",small:"_1m6j2n3b"},borderVariant:{none:"_1m6j2n3s _1m6j2n3q _1fragemeg _1fragemdw _1fragemf0 _1fragemdc",full:"_1m6j2n3t _1m6j2n3r _1fragemk5 _1fragemjl _1fragemkp _1fragemj1"},boxShadowMargin:"_1m6j2n312",productThumbnailSizeVariant:{"large-200":"_1m6j2n3h",large:"_1m6j2n3i",base:"_1m6j2n3j",small:"_1m6j2n3k","small-200":"_1m6j2n3l"},thumbnailBackgroundVariant:{base:"_1m6j2n36 _1m6j2n34 _1fragem133",subdued:"_1m6j2n37 _1m6j2n35 _1fragem13d"},badgeSizeVariant:{base:"_1m6j2n3y",small:"_1m6j2n3z"},badgeToneVariant:{auto:"_1m6j2n310",accent:"_1m6j2n311"},visuallyHidden:"_1m6j2n315 _1fragem121"};function ww({alt:e="",depth:t,size:n,sizes:r,source:a,src:i,srcSet:o,totalItems:s,overlay:l}){const{merchandiseThumbnail:{background:c="subdued",border:u="full",fit:p="contain",borderWidth:m,borderColor:h="base",shadow:g,badge:{background:f}={}}={}}=Gm(),y=Cw(n),_=f&&"base"!==f?"accent":"auto",b=bw(i,function(e){return Iw(e)?e:void 0}(a)),k=g??"extraSmall",P=function(e){switch(e){case"none":return"none";case"base":return"base";case"large":case"large100":return"large";case"large200":return"large-200";default:return}}(m)??Ew(y),{className:S}=Hm({boxShadow:k}),{className:w}=Hm({objectFit:p,borderWidth:P});
2return d("div",{className:v(Sw.ProductThumbnail,Sw.thumbnailBackgroundVariant[c],Sw.productThumbnailSizeVariant[y],S,"none"!==k&&Sw.boxShadowMargin,null!=t&&Sw.depthVariant[t],Sw.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||Iw(a)?d(vw,{condition:Boolean(b),children:[b,d("img",{src:i??kw(a),srcSet:o,sizes:r,alt:e,loading:"eager",className:v(Sw.ProductThumbnailImage,Sw.borderVariant[u],Sw.borderColorVariant[h],w)})]}):d("div",{className:v(Sw.Placeholder,Sw.borderVariant[u],Sw.borderColorVariant[h],w),children:d(oh,{type:"image",size:xw(y)})}),void 0!==l&&d("div",{className:v(Sw.Overlay,Sw.borderVariant[u],Sw.borderColorVariant[h]),children:d("strong",{children:l})}),void 0===s?null:d(Tw,{size:y,tone:_,children:s})]})}function Cw(e){if("string"!=typeof e)return"base";const t=e.replace("-100","");return t in Pw?t:"base"}function Ew(e){return e.startsWith("small")?"base":"large"}function xw(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function Iw(e){return"string"==typeof e||Ua(e)}function Aw(e){const{boxSize:t}=Pw[Cw(e)];return{blockSize:t,inlineSize:t}}function Tw({children:e,size:t,tone:n}){const r=Qu(),a="accent"===n?n:"auto",{className:i}=Hm({borderWidth:Ew(t)});return d("div",{className:Sw.BadgeWrapper,children:d("div",{className:v(Sw.Badge,Sw.badgeSizeVariant[t.startsWith("small")?"small":"base"],Sw.badgeToneVariant[a],i),children:[d("span",{className:Sw.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const Lw=function(e){let t=0,r=!0;const o=new Set;return function(){const[l,c]=s(()=>{if(0===t)return 0;const n=performance.now()-t;return n<e?e-n:0}),[u,d]=s(!0),p=i(),[m,h]=s(!1),g=n(()=>{for(const e of o)e(!1)},[]),f=n(()=>{for(const e of o)e(!0)},[]),y=n(()=>{g(),h(!0)},[g]);a(()=>{m&&f()},[m,f]);const v=n(e=>{o.add(d);const n=e.timeStamp-t;c(n)},[]),_=n(n=>{t=n.timeStamp,o.add(d),r&&(r=!1,p.current=setTimeout(y,e))},[y]);return a(()=>(o.add(d),()=>{o.delete(d),p.current&&clearTimeout(p.current)}),[]),{animationEnabled:u,delay:l,onAnimationStart:v,onAnimationIteration:_}}}(4e3);var Nw="var(--_1sg44lm0)",Rw="var(--_1sg44lm1)",Mw="var(--_1sg44lm2)";function Dw({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:i,id:o,delay:l=!0}){const c="inline"===e?"span":"div",{className:u,style:p}=Hm({blockSize:r,inlineSize:n},{transforms:{inlineSize:e=>pd(e,{fitContent:!0,auto:!0})}}),[m,h]=s(l);a(()=>{const e=setTimeout(()=>h(!1),100);return()=>{clearTimeout(e)}},[]);const{animationEnabled:g,delay:f,onAnimationStart:y,onAnimationIteration:_}=Lw();return d(c,{className:v("_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r","inline"===e&&"_1sg44lm7",m&&"_1sg44lm8",g&&"_1sg44lm6",u),style:{...b({[Mw]:t?.toString()??"",[Nw]:`${f}ms`,[Rw]:"4000ms"}),...p},"aria-hidden":"true",onAnimationStart:y,onAnimationIteration:_,id:o,children:d(c,{className:v("_1sg44lma _1sg44lm9 _1fragemvo",u),style:p,children:i})})}const Ow=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function zw({children:e,delay:t,inlineSize:n,id:r,...a}){return d(qf,{...a,children:d(Dw,{delay:t,inlineSize:Ow.get(n??"small"),id:r,children:e})})}function Bw({width:e}){const{header:{logo:t}}=kv(),{shop:n}=ie(),{width:r,height:a}=function(e,t,n){const r=n??1;let a,i;return e?(a=e,i=e/r):t&&(a=t,i=t/r),void 0!==n&&void 0!==a&&void 0!==i&&i>300&&(a*=300/i,i=300),{width:a,height:i}}(t?.maxWidth,e,t?.aspectRatio);return d("img",{alt:t?.altText||n.name,className:"gP50U",src:t?.image,width:r,height:a})}const Vw=f(void 0);function Fw({children:e,style:t,insetsRows:n}){const{rendered:a,rowsInset:i}=h(Vw)??{},o=r(()=>({pending:t,pendingInsetsRows:n,rendered:a,rowsInset:i}),[t,n,a,i]);return d(Vw.Provider,{value:o,children:e})}function Uw({children:e,rowsInset:t}){const{pending:n}=h(Vw)??{},a=r(()=>({pending:void 0,rendered:n,rowsInset:t}),[n,t]);return d(Vw.Provider,{value:a,children:e})}function qw(){return h(Vw)??{}}function jw(){return h(a_)}function Hw({currentDetour:e}){return"thankYou"===e?.type?"ORDER_STATUS1":"INFORMATION1"}function $w(e,t,n,r,a){return null==e?()=>!1:Wa(Ol(e.features,t),n,r,a)}const Yw=f([]),Ww=f({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),Gw=f(null);function Jw(e,t,...[n]){const{checkout:{extensibility:a}}=ie(),i=function(){const{deactivatedExtensionIds:e}=Zw(),{currentPage:t,currentDetour:n}=ac().value,{source:a,checkout:{negotiator:i}}=ie(),o=jw(),s=i.current.peek();return r(()=>function({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:a,sourceType:i}){const o=e&&Ul(e,t),s=e&&new Set([...Dn,...Rn]),l=r&&ql(r),c=r&&function(e){const t=s_.get(e.type)??[];return new Set(t)}(r),u="thankYou"===r?.type,d=l??o??new Set,p=c??s??new Set;return t=>{const{id:o,extensionPoint:s,placementReference:l}=t;if(n.has(o))return!1;if(!Ha(t,{sourceType:i,isThankYou:u}))return!1;const c=$a(s.target);if(null==c)return!1;
2if((e||r)&&!d.has(c))return!1;if(Ya(c)){if(!l)return!1;if(!a.supported.has(l))return!1;if((e||r)&&!p.has(l))return!1}return!0}}({page:t,negotiatedState:s,deactivatedExtensionIds:e,detour:n,placementReferences:o,sourceType:a.type}),[n,t,e,s,o,a.type])}(),o=h(Gw),s=jw();return r(()=>{const r=Ya(t)&&n?{target:t,placements:s,placementReference:n}:{target:t};return e.filter(e=>null===o||o.has(it(e.extensionPoint.target))).filter(e=>a.ui.unstable_isTargetMatch(e,r)).filter(i)},[i,o,e,t,n,s,a])}function Kw(e,...[t]){const{checkout:{extensibility:n},shop:a}=ie(),o=a.hasFlagEnabled(Ga),s=jw(),l=i([]),c=h(Yw),u=Jw([...n.ui.search().value,...c],e,t),d=r(()=>{if(o)return n.customFields.search(Ya(e)&&t?{target:e,placements:s,placementReference:t}:{target:e})},[n,o,e,t,s]),p=d?.value,m=r(()=>(p??[]).map(e=>Ja("customField",e)),[p]),g=r(()=>Ka([...u.map(e=>Ja("uiExtension",e)),...m]),[u,m]);return n.ui.enabled.value?g.length>0?g:l.current:m.length>0?m:l.current}function Xw(e,t){const r=tC();return n(n=>{if(!e.length)return Promise.resolve(void 0);const a=r.get(e[0],t);return Promise.resolve(a.run(n))},[r,e,t])}function Qw(e,t){const{checkout:{extensibility:n}}=ie(),a=i([]),o=Jw([...t,...h(Yw)],e),s=r(()=>o.map(e=>Ja("uiExtension",e)),[o]);return n.ui.required.value&&!n.ui.enabled.value?a.current:s}function Zw(){return h(Ww)}const eC=f({get:()=>{},findAll:()=>[],blockingExtensions:k(()=>[])});function tC(){return h(eC)}function nC({visibleTargets:e,children:t}){const n=r(()=>new Set(e),[e]);return d(Gw.Provider,{value:n,children:t})}function rC(e){return Array.from(e.labels||[]).map(e=>e.textContent).join("")}function aC(e){return e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type)?e.checked.toString():e.value}function iC(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement){try{if(e.target.closest("*:-webkit-autofill")===e.target)return"native"}catch{}if(!e.isTrusted)return e.target?.id?.startsWith("autofill_")?"honeypot":"other"}}const oC={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},sC=Object.keys(oC),lC=f(null);function cC(){const e=h(lC);return n(t=>n=>{if(n&&e)if(n instanceof HTMLAnchorElement||n instanceof HTMLButtonElement)e.set(n,t);else if(n instanceof Element){const r=n.querySelector("button, a");e.set(r??n,t)}},[e])}function uC({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const n=Vg(),a=i(null),o=r(()=>new WeakMap,[]),s=i(null);function l(t){const r=t.target.closest("a, button, input, select");if(!r)return;if(s.current===r)return;s.current=r;const{element:a,shouldCaptureEvent:i}=dC(r,e,o);i&&n("dom_input_focused",{element:a,timestamp:new Date})}return Ug(a,e=>l({target:e})),d(lC.Provider,{value:o,children:d("div",{ref:a,onFocusCapture:l,onBlurCapture:function(t){const r=t.target.closest("a, button, input, select");if(!r)return;s.current===r&&(s.current=null);const{element:a,shouldCaptureEvent:i}=dC(r,e,o);i&&n("dom_input_blurred",{element:a,timestamp:new Date})},onClickCapture:function(t){const r=t.target;if(!(r instanceof Element))return;const a=r.closest("a, button"),i=r.closest("input, select"),s=a??i;if(!(s||r instanceof HTMLElement))return;const{element:l,shouldCaptureEvent:c}=dC(s??r,e,o);c&&n("dom_clicked",{element:l,...oC,...st(t.nativeEvent,sC),timestamp:new Date})},onChangeCapture:function(t){const r=t.target?.closest("a, button, input, select");if(!r)return;const{element:a,shouldCaptureEvent:i}=dC(r,e,o);i&&n("dom_input_changed",{element:a,timestamp:new Date})},children:t})})}function dC(e,t,n){const r=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement;let a=null;a=r?e.type:null;let i=`${t}_`,o=null,s=null;r&&"href"in e&&(s=e.href);let l=!0;if(e instanceof HTMLInputElement&&"radio"===e.type)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=e.id.slice(e.id.lastIndexOf("-")+1).toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=aC(e);else{const t=pC(e,n);t?i+=t:l=!1}return i=i.replace(/-/g,"_"),{element:{id:i,tagName:e.tagName,type:a,value:o,...s&&{href:s},name:null},shouldCaptureEvent:l}}function pC(e,t){if(null!==e&&null!==t)return t.has(e)?t.get(e):pC(e.parentElement,t)}function mC({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const{checkout:{identity:n},router:r,shopPay:a}=ie(),o=r.currentUrl.value,{currentFocus:s}=ac().value,l=Vg(),c=nf(),u=qg(),p=i(null),m=i(new WeakMap),h=at(o,{isShopPayActive:"shopPay"===n.current.value,shopPay:a});function g(t,{recoveredAutofocus:n=!1}={}){const r=s.peek();s.value=e,!n&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement)&&m.current.set(t.target,aC(t.target)),!n&&t.target instanceof HTMLInputElement&&"email"!==t.target.name&&u(h),r!==e&&(l("sectionInteraction",{section:e,timestamp:new Date}),c({type:"section_interaction",section:e}))}
2return Ug(p,e=>g({target:e},{recoveredAutofocus:!0})),d("div",{ref:p,onFocusCapture:g,onBlurCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const n=m.current.get(t.target),r=aC(t.target);m.current.delete(t.target),u(h),n!==r&&function(t){const{name:n,tagName:r,type:a}=t,i=rC(t);l("change",{element:{...i&&{label:i},...n&&{name:n},tagName:r,type:a,value:aC(t)},section:e,timestamp:new Date})}(t.target)}},onClickCapture:function(t){if(!(t.target instanceof Element))return;const n=t.target.closest("a, button"),r=t.target.closest("input, select");if((n??r)&&n){const{tagName:t,textContent:r,id:a}=n,i=(r??"").trim(),o=n.dataset.eventName||i||a;u(h),l("click",{element:{tagName:t,textContent:o??void 0},section:e,timestamp:new Date})}},onKeyUpCapture:function(e){e.target instanceof HTMLInputElement&&u(h)},onChangeCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const{id:n,name:r,tagName:a,type:i}=t.target;let o=rC(t.target);0===o.length&&(o=n);const s=iC(t);s&&l("autofill",{source:s,element:{...o&&{label:o},...r&&{name:r},tagName:a,type:i,value:aC(t.target)},timestamp:new Date,section:e})}},children:t})}function hC(e,t){const n=ie().checkout.configuration.layout.isOnePage.value,r=Kw("Checkout::Dynamic::Render","ORDER_SUMMARY1"),a=Kw("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=Kw("Checkout::Dynamic::Render","ORDER_SUMMARY3"),o=Kw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),s=Kw("Checkout::CartLines::RenderAfter"),l=Kw("Checkout::CartLineDetails::RenderAfter"),c=Kw("Checkout::Reductions::RenderBefore"),u=Kw("Checkout::Reductions::RenderAfter");return n?"bottom"===e?t?.hideMerchandiseLines?[...i]:[...r,...a,...i,...l,...s]:[...l]:[...r,...a,...i,...o,...l,...s,...c,...u]}const gC="checkout-main",fC="checkout-main-header",yC="checkout-pay-button",vC="checkout-review-heading",_C=re("OrderSummaryContext");function bC(){return ae(_C)}const kC=({children:e})=>{const t=m(!1),a=n(e=>{t.value=e},[t]),i=r(()=>({open:t,setOpen:a}),[t,a]);return d(_C.Provider,{value:i,children:e})};function PC(){const{checkout:e,router:n}=ie();return t(()=>e.thankYouEntrance.isRevealing.value&&n.currentUrlMatches("/thank-you"))}const SC={Shell:"cm5pp","Config-Footer-positionInline":"FeQiM","Config-Footer-positionEnd":"BwmDa","Shell-layoutAside":"g9PS6","Config-Main-inlineSizeFill":"_46J2H","Config-OrderSummary-inlineSizeFill":"XlQtV","Config-Header-positionStart":"U3Rye","Config-Header-positionInline":"_5ZebG","Config-Header-positionInlineSecondary":"PqnoL","Header-divided":"d5pfT","Shell-variantOnePageCheckout":"oYrwu",MainContent:"gdtca",MainContentPrimary:"djSdi",Footer:"NGRNe","Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:"_1Eo4p",Announcement:"_5gERx","Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:"mpQwN",AnnouncementContent:"gYnYi","Announcement-expanded":"yJIUK",AnnouncementActionButtons:"uB1DX",AnnouncementExpandCollapseButton:"Lhk39",AnnouncementCloseButton:"GxFSO",AnnouncementOverlay:"eqp7i","Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:"EAjaz","Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:"i8Dpn","Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-exiting":"aLUb3","Header-thankYouCovered":"Gm2ml","Header-hasBackgroundImage":"zKcpW",BuyerJourney:"lX75M",BuyerJourneyContent:"_0DLUq","BuyerJourney-containerContent":"hKv1l",Disclosure:"nMPKH",DisclosureButton:"WtpiW",DisclosureDetails:"ks0CH",DisclosureDetailsContent:"GRdxR","Disclosure-divided":"iYA3J",Content:"Sxi8I","Content-containerContent":"vzM2m",Main:"_9F1Rf","Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:"i4DWM",OrderSummaryContent:"_4QenE","OrderSummary-inlineSizeFill":"LEmIb",FooterContent:"QiTI2","Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},wC="announcement_box",CC="announcement_content";function EC({children:e,onClose:t,onAfterCollapse:r,onAfterExpand:o,onExpand:l,onCollapse:c,open:u=!1,expanded:p=!1}){const{i18n:m}=ie(),[h,g]=s(!1),f=i(null),y=i(null),_=Ad(p,"base"),b=Ad(u,"base");a(()=>
2{if("undefined"==typeof window||!window.ResizeObserver||!window.MutationObserver)return;const e=y.current;if(!e)return;const t=()=>{p||"exited"!==_||g(e.scrollHeight>e.clientHeight)};t();const n=Za(t,200),r=new ResizeObserver(n);r.observe(e);const a=new MutationObserver(n);return a.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{r.disconnect(),a.disconnect()}},[e,p,u,_]);const k=n(()=>{p?c?.():l?.()},[p,c,l]);a(()=>{"entered"===_?o?.():"exited"===_&&r?.()},[o,r,_]);const P=IC(),{environment:{isCheckoutEditor:S},announcement:{colorScheme:w}}=kv(),C=P[0],E=S?C?.publicIdentifier:void 0,x=S&&P.length>0;return gw(e)?d("section",{id:wC,className:v(SC.Announcement,u&&SC["Announcement-opened"],h&&SC["Announcement-hasOverflow"],p&&SC["Announcement-expanded"],SC[H("Announcement-expandedTransition",_)],SC[H("Announcement-openTransition",b)],x&&SC["Announcement-hasActiveInspector"]),ref:f,children:d("div",{className:v(SC.AnnouncementContainer,Se({colorLayer:"base",colorScheme:w,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!p&&d("button",{className:SC.AnnouncementOverlay,onClick:e=>{e.preventDefault(),e.stopPropagation(),l?.()},"aria-label":m.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":CC,type:"button"}),d("div",{className:SC.AnnouncementActionButtons,children:[d("button",{id:"announcement_action_expand_collapse_buttons",className:SC.AnnouncementExpandCollapseButton,onClick:k,"aria-label":p?m.translate("thank_you.announcement.collapse"):m.translate("thank_you.announcement.expand"),"aria-expanded":p,"aria-controls":CC,type:"button",children:d(oh,{type:p?"chevron-up":"chevron-down",size:"base"})}),d("button",{className:SC.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":wC,"aria-expanded":u,"aria-label":m.translate("thank_you.announcement.close"),type:"button",children:d(oh,{type:"x",size:"base"})})]}),d("div",{id:CC,className:SC.AnnouncementContent,ref:y,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function xC(){}function IC(){const{environment:{hasTYPAnnouncementExtensions:e}}=kv(),t=function(e){return void 0!==e?()=>[]:()=>{const e=Kw("purchase.thank-you.announcement.render");return ei(e,"uiExtension").map(ti)}}(e);return t()}const AC={ThankYouInterstitialShell:"szW4X",ThankYouInterstitialOverlay:"sMSRq",ThankYouInterstitialHeader:"_3Ebqn",ThankYouEntranceDisclosure:"F6Nrx",ThankYouEntranceOrderSummary:"j1xD4",ThankYouEntranceFooter:"RDtb7",ThankYouEntrance:"ZXaI9",ThankYouEntranceStatus:"sEWAT",ThankYouEntranceHeading:"DTABr",ThankYouEntranceCards:"kBVzA",ThankYouEntranceActions:"qgQOk",ThankYouEntranceBeat:"SBffw"},TC={none:"0",...ye.spacing},LC={base:"solid",dashed:"dashed",dotted:"dotted"},NC="disclosure_details";function RC({banner:e,announcement:t,header:r,buyerJourney:i,disclosure:o,disclosureOrderSummary:l,footer:c,main:u,orderSummary:p,blockSize:m,minMobileViewportSize:h=!1,disclosureId:g=NC,isDisclosureInteractive:f=!0,mainContentId:y=gC}){const _=kv(),{checkout:{configuration:b,checkoutExit:k},embed:P,router:S}=ie(),w=b.visibility.showAside,C=Boolean(P?.isFlagshipPartner),E=yr(P?.embedder),x=E&&b.isUniversalCheckoutFinalizer&&"/thank-you"===S.currentUrl.value.normalizedPath,I=Kw("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,A=E&&I,T=C&&!1===_.header.divided,L=_.header.position??"inline",N=ZC(),R=PC(),{open:M,expanded:D,onAfterCollapse:O,onAfterExpand:z,onClose:B,onExpand:V,onCollapse:F}=function(){const e=kv(),t=bv(),r=A_(),i=function(){const{environment:{hasTYPAnnouncementExtensions:e}}=kv();return function(e){return void 0!==e?()=>xC:()=>{const e=IC(),t=Vg();if(0===e.length)return xC;const n=e[0];return e=>t?.("extensionUiInteraction",{interaction:e,section:"extension",timestamp:new Date,extension:n,componentType:"Announcement",componentInstanceId:n.id})}}(e)()}(),[o,l]=s(!1),[c,u]=s(!1),d=n(({source:e}={})=>{const{announcement:n}=t.configuration;"dismissed"!==n.visibility&&"hidden"!==n.visibility&&(i("host"===e?"announcementDismissedFromHost":"announcementDismissedFromExtension"),r.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))},[t,r,i]),p=n(()=>{r.emit("announcementAfterCollapsed")},[r]),m=n(()=>{r.emit("announcementAfterExpanded")},[r]),h=n(()=>
2{l(!0),i("announcementExpanded"),r.emit("announcementExpanded")},[i,r]),g=n(()=>{l(!1),i("announcementCollapsed"),r.emit("announcementCollapsed")},[i,r]);return a(()=>(r.on("closeAnnouncement",d),()=>{r.off("closeAnnouncement",d)}),[d,r]),a(()=>{if("visible"!==e.announcement.visibility)return void u(!1);const t=setTimeout(()=>{u(!0)},1e3);return()=>clearTimeout(t)},[e.announcement.visibility]),{open:c,expanded:o,onAfterCollapse:p,onAfterExpand:m,onClose:d,onExpand:h,onCollapse:g}}(),U=l?d(Fw,{style:_.orderSummary.section,children:l}):void 0;return d("div",{className:v(SC.Shell,AC.ThankYouInterstitialShell,k.isExiting.value&&SC["Shell-exiting"],w&&SC["Shell-layoutAside"],"fill"===_.main.inlineSize&&SC["Config-Main-inlineSizeFill"],"fill"===_.orderSummary.inlineSize&&SC["Config-OrderSummary-inlineSizeFill"],SC[H("Config-Header-position",L)],_.footer.position&&SC[H("Config-Footer-position",_.footer.position)],_.environment.isOnePageCheckout&&SC["Shell-variantOnePageCheckout"],E&&SC["Shell-embeddedUc"],x&&SC["Shell-embeddedUcMainPadding"],A&&SC["Shell-embeddedUcHasOrderSummary4Extensions"],m&&SC[H("Shell-blockSize",m)],h&&SC["Shell-minMobileViewportSize"],gw(t)&&SC["Shell-hasAnnouncement"],M&&SC["Shell-announcementOpen"]),style:{...HC("content",_.content),...YC("content",_.content),...WC("main",_.main),...GC("main",_.main),...WC("order-summary",_.orderSummary),...GC("order-summary",_.orderSummary),...JC("order-summary",_.orderSummary),...WC("header",_.header),...JC("header",{backgroundImage:_.header.banner?.image}),...GC("header",_.header),...T?eE:{},...WC("footer",_.footer),...GC("footer",_.footer),...KC("footer",_.footer),...WC("buyer-journey",_.buyerJourney),...GC("buyer-journey",_.buyerJourney),...WC("announcement",_.announcement)},children:[d(MC,{}),e?d("div",{className:SC.Banner,children:e}):null,t?d(EC,{open:M,expanded:D,onAfterExpand:z,onAfterCollapse:O,onClose:B,onExpand:V,onCollapse:F,children:t}):null,d(DC,{position:"start",children:[r,"header"===_.buyerJourney.position&&d(OC,{children:i})]}),d(zC,{id:g,isInteractive:f,details:U,children:o}),d(BC,{children:[d(FC,{children:[d(DC,{position:"inline",children:[r,"header"===_.buyerJourney.position&&d(OC,{children:i})]}),d(VC,{children:["inline"===_.buyerJourney.position&&d(OC,{children:i}),d(Fw,{style:_.main.section,children:d("main",{className:v(SC.MainContentPrimary,N&&"F3Ebx"),id:y,children:u})}),"inline"===_.footer.position&&d(qC,{children:c})]})]}),d(UC,{children:[d(DC,{position:"inlineSecondary",children:[r,"header"===_.buyerJourney.position&&d(OC,{children:i})]}),d(VC,{children:d(Fw,{style:_.orderSummary.section,children:d("aside",{className:v(SC.OrderSummaryContentPrimary,N&&"OcTba",R.value&&AC.ThankYouEntranceOrderSummary),children:d(mC,{section:"summary",children:d(uC,{section:"summary",children:p})})})})})]})]}),"end"===_.footer.position&&d(qC,{children:c})]})}function MC(){const{checkout:e}=ie(),{main:{colorScheme:t="scheme1",background:n}={}}=kv();return e.checkoutExit.isExiting.value?d("div",{className:v("Vytfl",Se({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===n?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function DC({children:e,position:n}){const{header:{position:r="inline",container:a="fill",colorScheme:i,banner:o,background:s,divided:l}={}}=kv(),c=n??r,u=function(){const{checkout:e,client:n,router:r}=ie(),a=Gh(),i=vf(),o=Fl(n.initialRequest.url.pathname).endsWith("/thank-you"),s=a&&!i&&!o;return t(()=>s&&"settled"!==e.thankYouEntrance.phase.value&&r.currentUrlMatches("/thank-you"))}(),p=ZC();if(!gw(e))return null;const m=l??"start"===c;return d("header",{className:v(SC.Header,AC.ThankYouInterstitialHeader,SC[H("Header-position",c)],SC[H("Header-container",a)],m&&SC["Header-divided"],o?.image&&SC["Header-hasBackgroundImage"],u.value&&SC["Header-thankYouCovered"],p&&"inlineSecondary"===c&&"LRXpG","start"===c&&Se({backgroundColor:"subdued"===s?"subdued":"baseSpecified",colorLayer:"base",colorScheme:i})),"data-inspector-id":"header",children:d("div",{className:SC.HeaderContent,children:d(_u,{children:d(mC,{section:"header",children:d(uC,{section:"header",children:e})})})})})}function OC({children:e}
2){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=kv();return gw(e)&&"hidden"!==r?d("div",{className:v(SC.BuyerJourney,SC[H("BuyerJourney-position",t)],SC[H("BuyerJourney-container",n)]),children:d("div",{className:SC.BuyerJourneyContent,children:e})}):null}function zC({children:e,details:n,id:r=NC,isInteractive:o}){const{header:{divided:l},orderSummary:{background:c,backgroundImage:u,colorScheme:p}={},main:{colorScheme:m="scheme1"},environment:{isCheckoutEditor:h},disclosure:{visibility:g}}=kv(),f=Tt(),y=PC(),{checkout:_}=ie(),b=l??!0,k=function(){const{environment:{hasOrderSummaryExtensions:e}}=kv(),t=function(e){return void 0!==e?()=>e:()=>hC("top").length>0}(e);return t()}(),{expanded:P,narrowedToInformationStep:S}=function(){const{environment:{shouldExpandOrderSummary:e}}=kv(),n=function(e,n){return void 0!==n?()=>({expanded:n,narrowedToInformationStep:!1}):()=>{const n=function(){const e=T(hC("top"));return t(()=>e.value.some(e=>{if("customField"===e.kind)return ti(e).required.value;const t=ti(e),n=t.behaviors.value;return n.blockProgress&&t.capabilities.blockProgress||n.alwaysReveal}))}(),r=function(){const{orderSummary:{defaultState:e}={}}=kv(),{checkout:{configuration:{layout:{isOnePage:t}}}}=ie();return!t.value&&"EXPANDED"===e}(),a=function(){const e=ac();return t(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!n&&t)return"information"===t.id})}();return e&&r&&!n.value&&void 0!==a.value?{expanded:a.value,narrowedToInformationStep:!0}:{expanded:n.value||r,narrowedToInformationStep:!1}}}(function(){const{client:e}=ie(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===Xa)?.variant;return Object.values(Qa).find(e=>e===n)}()===Qa.Treatment,e);return n()}(),{open:w,setOpen:C}=bC(),E=w.value||k&&h,[x,I]=s(),A=i(!1);a(()=>{I(A.current&&!P?"none":void 0),C(P)},[P,C]),a(()=>{A.current=S}),a(()=>{E&&C(!0)},[E,k,C]);const L=QC();if(!gw(e)||_.checkoutExit.isExiting.value||"hidden"===g||"hidden-only-checkout"===g&&!L)return null;const N=u?{backgroundImage:`url(${JSON.stringify(u)})`}:void 0,R=!o||w.value,M=Boolean(n)&&(f.value||R);return d("aside",{className:v(SC.Disclosure,b&&SC["Disclosure-divided"],Se({colorLayer:"base",colorScheme:m,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:d(mC,{section:"top_summary",children:d(uC,{section:"top_summary",children:[o?d(Km,{className:v(SC.DisclosureButton,y.value&&AC.ThankYouEntranceDisclosure),background:"transparent",onClick:()=>{I(void 0),C(!w.peek())},"aria-controls":r,"aria-expanded":R,inlineSize:"100%","data-event-name":R?"order_summary_hide":"order_summary_show",children:e}):d("div",{className:v(SC.DisclosureButton,y.value&&AC.ThankYouEntranceDisclosure),children:e}),M&&d(Ld,{open:R,id:r,duration:x,children:d("div",{className:v(SC.DisclosureDetails,y.value&&AC.ThankYouEntranceDisclosure,Se({colorLayer:"base",colorScheme:p,backgroundColor:"subdued"===c?"subdued":"baseSpecified"})),style:N,children:d("div",{className:SC.DisclosureDetailsContent,children:d(_u,{children:d(XC,{children:n})})})})})]})})})}function BC({children:e}){const{content:{container:t="fill"}={}}=kv();return gw(e)?d("div",{className:v(SC.Content,SC[H("Content-container",t)]),children:e}):null}function VC({children:e}){const{checkout:t}=ie();return t.checkoutExit.isExiting.value?null:d(y,{children:e})}function FC({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:a,backgroundImage:i}={},content:{divider:{visibility:o}={}}}=kv(),{client:s}=ie(),l=s.unstable_getSerialization("shop").enabledFlags.includes(ni),c=r(()=>({current:t}),[t]);if(!gw(e))return null;const u=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(SC.Main,"fill"===n&&SC["Main-inlineSizeFill"],("visible"===o||!l&&void 0===o)&&SC["Main-divided"],Se({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),style:u,children:d("div",{className:SC.MainContent,children:d(Gp.Provider,{value:c,children:d(_u,{children:e})})})})}function UC({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:a,backgroundImage:i}={}}=kv(),o=r(()=>({current:t}),[t]),s=ZC();if(!gw(e))return null;const l=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(SC.OrderSummary,"fill"===n&&SC["OrderSummary-inlineSizeFill"],s&&"LCUka",Se({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===a?"subdued":"baseSpecified"}
2)),style:l,"data-inspector-id":"orderSummary",children:d("div",{className:SC.OrderSummaryContent,children:d(Gp.Provider,{value:o,children:d(_u,{children:e})})})})}function qC({children:e}){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:a,divided:i}={}}=kv(),{checkout:o}=ie(),s=ZC(),l=PC();if(o.checkoutExit.isExiting.value||!gw(e))return null;const c=i??"end"===t;return d("footer",{className:v(SC.Footer,SC[H("Footer-position",t)],SC[H("Footer-container",n)],c&&SC["Footer-divided"],s&&"qdIKq","end"===t&&Se({colorLayer:"base",colorScheme:r,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:d("div",{className:v(SC.FooterContent,l.value&&AC.ThankYouEntranceFooter),children:d(_u,{children:d(uC,{section:"footer",children:e})})})})}function jC(e){return t=>t?e[t]:void 0}function HC(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:jC(LC)(t)}}const $C={none:"0px",...ye.borderWidth};function YC(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:jC($C)(t)}}function WC(e,{inlineSize:t}={}){return isNaN(Number(t))||0===Number(t)?"main"!==e&&"order-summary"!==e&&"fill"===t?{[`--config-${e}-inline-size`]:"100%"}:void 0:{[`--config-${e}-inline-size`]:ke(Number(t))}}function GC(e,{padding:t}={}){if(Array.isArray(t)){const n=2===t.length?[t[0],t[1],t[0],t[1]]:t;return{[`--config-${e}-padding-block-start`]:jC(TC)(n[0]),[`--config-${e}-padding-inline-end`]:jC(TC)(n[1]),[`--config-${e}-padding-block-end`]:jC(TC)(n[2]),[`--config-${e}-padding-inline-start`]:jC(TC)(n[3]),[`--config-${e}-padding`]:`var(--config-${e}-padding-block-start) var(--config-${e}-padding-inline-end) var(--config-${e}-padding-block-end) var(--config-${e}-padding-inline-start)`}}return t&&{[`--config-${e}-padding-block-start`]:jC(TC)(t),[`--config-${e}-padding-inline-end`]:jC(TC)(t),[`--config-${e}-padding-block-end`]:jC(TC)(t),[`--config-${e}-padding-inline-start`]:jC(TC)(t),[`--config-${e}-padding`]:jC(TC)(t)}}function JC(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function KC(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:jC(TC)(t)}}function XC({children:e}){const{environment:{isOnePageCheckout:t}}=kv(),n=QC();return t&&!n?d(nC,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):d(y,{children:e})}function QC(){const{environment:{hasDetour:e}}=kv(),t=function(e){return void 0!==e?()=>e:()=>{const{currentDetour:e}=ac().value;return Boolean(e)}}(e);return t()}function ZC(){const e=Gh(),t=QC();return e&&!t}const eE={"--x-shell-header-padding":`${jC(TC)("large100")} ${jC(TC)("large200")} ${jC(TC)("none")} ${jC(TC)("large200")}`,"--x-shell-main-padding-block-start":`var(--config-main-padding-block-start, ${jC(TC)("large100")})`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${jC(TC)("large100")}) var(--config-main-padding-inline-end, ${jC(TC)("large200")}) var(--config-main-padding-block-end, ${jC(TC)("large200")}) var(--config-main-padding-inline-start, ${jC(TC)("large200")})`},tE={small:"10ch",base:"20ch",large:"30ch",full:"100%"},nE=$c("wallet-transition-disclosure-"),rE=$c("wallet-transition-main-content-");function aE({layer:e="foreground"}={}){const{embed:t,i18n:n}=ie(),r=!t,a=Yc(void 0,nE),i=Yc(void 0,rE),o=d("div",{className:"A5qhV "+("background"===e?"_4KRKW":""),role:"status","aria-label":n.translate("general.loading"),style:b({[ye.global.borderRadius]:"12px"}),children:d(kC,{children:d(RC,{mainContentId:i,disclosureId:a,isDisclosureInteractive:!1,header:r?d(iE,{}):void 0,disclosure:d(uE,{}),main:d(cE,{}),orderSummary:d(dE,{})})})});return d(nu,{children:o})}function iE(){const{header:{alignment:e="start",logo:t}={}}=kv(),{shop:n}=ie(),r=t?.image?d(Bw,{width:t.maxWidth}):d(TS,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});
2return d(eh,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function oE({inlineSize:e="base",size:t="small"}){return d(zw,{size:t,inlineSize:e})}function sE(){return d(qf,{type:"small",children:d(Dw,{inlineSize:tE.full})})}function lE(){return d(Qf,{rowGap:"base",children:[d(oE,{size:"large",inlineSize:"small"}),d(Qf,{rowGap:"small-300",children:[d(sE,{}),d(sE,{})]})]})}function cE(){return d(Qf,{rowGap:"large-200",children:[d(lE,{}),d(yw,{}),d(lE,{}),d(yw,{}),d(lE,{})]})}function uE(){return d(Qf,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[d(oE,{inlineSize:"base"}),d(oE,{size:"large",inlineSize:"small"})]})}function dE(){const{i18n:e}=ie(),{merchandiseThumbnail:t,global:n}=Gm(),r=t.cornerRadius??n.cornerRadius??"base",a="fullyRounded"===r?"large":r,i=`${Aw("base").inlineSize}px`;return d(Qf,{rowGap:"large-200",children:[d(qf,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),d(eh,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(Df,{borderRadius:a,overflow:"hidden",children:d(Dw,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),d(Qf,{rowGap:"small-500",children:[d(oE,{inlineSize:"base"}),d(oE,{inlineSize:"small"})]}),d(oE,{inlineSize:"small"})]}),d(pE,{})]})}function pE(){return d(Qf,{rowGap:"small-100",children:[[0,1,2].map(e=>d(Qf,{direction:"inline",justifyContent:"space-between",children:[d(oE,{inlineSize:"small"}),d(oE,{inlineSize:"small"})]},e)),d(Qf,{direction:"inline",justifyContent:"space-between",children:[d(oE,{size:"large",inlineSize:"small"}),d(oE,{size:"large",inlineSize:"small"})]})]})}function mE(){const{shop:e,checkout:n,observability:r}=ie(),o=function(){const{checkout:{wallets:e}}=ie(),n=function(){const{shop:e,checkout:n}=ie(),r=e.hasFlagEnabled(fn),{inMemoryApplePayParts:{subscriptionReviewTransition:a}}=gn();return t(()=>void 0!==a.value&&$l({applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:n.configuration.layout.isOnePage.value}))}();return t(()=>{const t=void 0!==e.activeSession.value?.wallet&&"APPLE_PAY"!==e.activeSession.value.wallet&&Boolean(e.isDeceleratingSignal?.value);return n.value&&!t})}().value,s=Boolean(n.wallets.isDeceleratingSignal?.value),l=n.isCheckoutLayoutForcedToOnePage.value,c=xS(),{payNowButtonElement:u,payNowButtonSectionMounted:p}=UP(),m=Boolean(u||c&&p),h=e.hasFlagEnabled(ba),g=n.wallets.escalatedWallet.value,f=h?s&&m&&null!==g:s&&m;a(()=>{f&&n.wallets.setIsDecelerating(!1)},[f,n.wallets]);const y=i(!1);return a(()=>{if(!l)return void(y.current=!1);if(!m||y.current)return;y.current=!0;const e={wallet:g};r.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:e}),r.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",e)},[g,l,m,r]),o||!s?null:d(aE,{})}const hE=w({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>C(()=>dl(()=>import("./9d12dea3.Cj135aEl.js"),__vite__mapDeps([81,2,1,3,4,5,82,23,24,25,83,61,11,62,45,46,44,47,28,29,84,85,86,87,88,8,89,90,91,92,93,94,95,96,97,31,32,98,99,100,101,102,7,9,10])))}),gE=w({suspenseName:"information",displayName:"Information",load:()=>C(()=>dl(()=>import("./17324a0b.C0LkGR88.js"),__vite__mapDeps([103,2,61,83,1,3,4,5,11,62,45,46,44,24,47,28,29,23,25,84,85,104,105,106,107,108,109,43,110,87,111,112,113,114,115,64,70,116,48,117,118,119,96,120,121,122,9,123,124,125,126,127,128,129,130,102,7,8,10])))}),fE=w({displayName:"NoAddressLocation",load:()=>C(()=>dl(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.AbCmBanQ.js"));return{noAddressLocationPages:e}},__vite__mapDeps([131,2,132,133,134,125,126,127,1,3,4,5,128,114,7,8,9,10,11,135])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),yE=w({displayName:"NoAddressLocationFullDetour",load:()=>C(()=>dl(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.AbCmBanQ.js"));return{noAddressLocationPages:e}},__vite__mapDeps([131,2,132,133,134,125,126,127,1,3,4,5,128,114,7,8,9,10,11,135])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),vE=w({displayName:"NotFound",load:()=>dl(()=>import("./60d61386.Cc3Ws_OM.js"),__vite__mapDeps([136,2,1,3,4,5,74,7,8,9,10,11]))}
2),_E=w({displayName:"OffsitePaymentFailed",load:()=>dl(()=>import("./656fad11.CRAx1U8r.js"),__vite__mapDeps([137,2,133,134,138,139,127,1,3,4,5,128,114,7,8,9,10,11]))}),bE=w({suspenseName:"one-page",displayName:"OnePage",load:()=>dl(()=>import("./f8706cb6.BKYQh9AK.js").then(e=>e.o),__vite__mapDeps([140,3,2,4,1,5,105,61,106,107,108,109,43,24,110,83,11,62,45,46,44,47,28,29,23,25,84,85,87,111,112,113,114,115,64,70,116,48,117,118,119,96,120,121,122,9,123,124,141,35,36,142,8,143,74,73,144,145,146,31,32,97,98,147,10,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,86,88,89,90,91,92,93,169,170,171,172,173,174,175,176,177,178,179,180,181]))}),kE=w({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>C(()=>dl(()=>import("./9e3968a8.BHTTykCl.js"),__vite__mapDeps([182,2,1,3,4,5,104,97,24,84,31,32,98,141,35,36,113,114,142,8,11,143,74,106,107,73,144,99,86,87,88,89,90,91,92,93,100,183,152,153,154,184,64,65,6,185,186,187,41,42,54,112,115,188,189,150,190,191,111,192,94,95,157,158,159,96,62,193,120,121,163,7,9,10,194,101])))});class PE extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}
2class SE extends Error{constructor(e,t){super(e,t),this.name="CardFieldsLoadError",this.diagnostics=t?.diagnostics}}class wE extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class CE extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class EE extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class xE extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class IE extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class AE extends Error{constructor(e,t){super(e),this.name="CardFieldsFetchFailureError",void 0!==t&&(this.httpStatus=t)}toString(){const e=super.toString();return void 0===this.httpStatus?e:`${e} (HTTP Status: ${this.httpStatus})`}}const TE=class extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};TE.hostedFieldsName="CardFieldsError";let LE=TE;function NE({source:e,integrity:t},n=!0){const r=Date.now();function a(){return new Promise((n,r)=>{if(window.CardFields)return n();const a=document.createElement("script");a.async=!0,a.src=e,a.onload=()=>{if(window.CardFields)return n();setTimeout(()=>{if(!window.CardFields)return r(new xE);n()},0)},t&&(a.integrity=t),a.crossOrigin="anonymous",a.onerror=t=>{let n;n=t instanceof Event?new CE(`Event type: ${t.type}. ${RE(e)}`):new CE("string"==typeof t?`String error: ${t}. ${RE(e)}`:`unknown error type. ${RE(e)}`),document.head.removeChild(a),r(n)};try{document.head.appendChild(a)}catch(i){r(new EE("Failed to append child.",{cause:i}))}})}return(n?C(a):a()).catch(n=>{let a;try{const i="undefined"!=typeof performance&&"function"==typeof performance.getEntriesByName?performance.getEntriesByName(e,"resource"):[],o=i[i.length-1],s="undefined"==typeof navigator?void 0:navigator.connection;a=Object.fromEntries(Object.entries({errorCause:n instanceof Error?n.name.slice(0,128)||"Error":typeof n,underlyingCauseName:n instanceof Error&&n.cause instanceof Error?n.cause.name.slice(0,128)||"Error":void 0,elapsedMs:Date.now()-r,sdkIntegrity:t?.slice(0,512),networkType:s?.type,networkDownlink:s?.downlink,networkRtt:s?.rtt,networkSaveData:s?.saveData,documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,resourceDurationMs:o?.duration,resourceTransferSize:o?.transferSize,resourceStatus:o?.responseStatus||void 0}).filter(([,e])=>void 0!==e))}catch{a=void 0}throw new SE(`Failed to load CardFields SDK. ${RE(e)}`,{cause:n,diagnostics:a})})}function RE(e){return`Script src: ${e} . Internet connection boolean: ${"undefined"==typeof navigator?"navigator not available":navigator.onLine}`}function ME(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DE,OE;const zE=ME(OE?DE:(OE=1,DE={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}));function BE(){const{environment:e}=ie(),t=e.services.hostedFields.url;return t===zE.SDK_URL?{source:t,integrity:zE.SDK_INTEGRITY}:{source:t}}const VE=w({suspenseName:"payment",displayName:"Payment",load:()=>C(()=>dl(()=>import("./74122478.DXDbusDr.js"),__vite__mapDeps([195,2,145,3,4,1,5,146,31,32,97,24,84,98,118,23,25,119,147,10,148,149,150,151,152,153,154,155,156,196,197,110,83,61,11,62,45,46,44,47,28,29,85,198,157,158,159,111,199,130,168,200,96,162,201,202,67,203,179,82,104,117,125,126,204,184,113,114,142,64,65,6,185,186,127,128,205,129,206,191,207,178,176,208,7,8,9]))),usePrefetch(){const e=function(){const e=BE();return n(()=>{NE(e)},[e])}();return n(()=>{e()},[e])}}),FE=w({displayName:"PostPurchase",load:()=>dl(()=>import("./896e8dde.qXiojVif.js"),__vite__mapDeps([209,2,1,3,4,5,114,179,210,211,46,15,9,127,128,129,28,29,17,56,59,60,7,8,10,11,212]))}),UE=w({displayName:"Processing",load:()=>C(()=>dl(()=>import("./090b00f0.By_QqD8y.js"),__vite__mapDeps([213,2,138,139,1,3,4,5,129,114,178,143,6,7,8,9,10,11,214])))}),qE=w({suspenseName:"review",displayName:"Review",load:()=>C(()=>dl(()=>import("./b120ac11.DXuBKhvp.js"),__vite__mapDeps([215,2,1,3,4,5,104,117,125,126,204,184,113,114,142,64,65,6,185,186,96,62,127,128,205,129,7,8,9,10,11])))}),jE=w({suspenseName:"shipping",displayName:"Shipping",load:()=>C(()=>dl(()=>import("./289b89e4.box3e9XI.js"),__vite__mapDeps([216,2,120,121,169,23,24,3,4,1,5,25,118,84,119,123,170,171,88,8,89,90,172,61,44,45,46,47,173,174,175,176,177,125,126,127,128,205,129,114,87,7,9,10,11])))}),HE=w({displayName:"ShopPayLoginLoader",load:()=>dl(()=>import("./9011490c.CPGqN9hS.js"),__vite__mapDeps([217,2,1,3,4,5,218,160,151,157,158,159,219,108,109,106,107,89,74,193,120,121,41,42,163,7,8,9,10,11,194,114,220]))}),$E=w({displayName:"StockProblems",load:()=>C(()=>dl(()=>import("./0cd5b134.COsAZd_K.js"),__vite__mapDeps([221,2,132,133,134,125,126,127,1,3,4,5,128,222,129,114,223,7,8,9,10,11])))}),YE=w({displayName:"StockProblemsModal",load:()=>C(()=>dl(()=>import("./a9ba8e86.BHbi6jR5.js"),__vite__mapDeps([224,2,1,3,4,5,223,222,129,114,180,7,8,9,10,11])))});function WE(e){return function(t){const{observability:n}=ie();a(()=>{t&&(hl(t)||gl(t)?n.log("lazy_load_failure",`[LazyLoad] ${e} failed to load`,{component:e,failure:"lazy_load",error:String(t)}):n.error(t,{metadata:{lazyLoad:{component:e,failure:"lazy_load"}}}))},[t,n])}}
2const GE=WE("ThankYou"),JE=w({suspenseName:"thank-you",displayName:"ThankYou",useError:function(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=ie(),a=uc(),o=a?.id,s=a?.orderStatusPageUrl,c=t.unstable_getSerialization("sessionToken"),u=i(!1);GE(e),l(()=>{if(!e||u.current)return;function t(e,t,r){t&&(u.current=!0),n.log("thank_you_recovery","[LazyLoad] ThankYou recovery",{outcome:e,waitedMs:r},{exportImmediately:!0,requiresKeepalive:!0}),t&&location.replace(t)}const a=new URLSearchParams(location.search).get("prevent_order_redirect");if(null!==a&&"false"!==a)return void t("prevented");if(s)return void t("redirect",s);if(!o)return void t("not_processed");let i=!1;const l=Date.now();return(async()=>{for(;Date.now()-l<1e4;){if(await B(sr),i)return;let e;try{const{data:t}=await r.staticQuery(Fb,{cache:!1,variables:{receiptId:o,sessionToken:c}});"ProcessedReceipt"===t?.receipt?.__typename&&(e=t.receipt.orderStatusPageUrl)}catch{}if(i)return;if(e)return t("polled",e,Date.now()-l)}t("timed_out")})(),()=>{i=!0}},[r,e,n,s,o,c])},load:()=>C(()=>dl(()=>import("./909cc5d6.YVAuXVSA.js"),__vite__mapDeps([225,2,1,3,4,5,202,38,125,126,96,62,127,128,129,114,91,89,88,8,90,171,31,32,21,22,84,158,116,115,48,106,107,44,45,46,24,47,226,197,52,97,98,94,95,227,228,229,230,132,133,134,185,28,29,111,231,232,233,170,188,189,9,120,121,163,7,10,11,234])),{maxAttempts:1})}),KE=w({displayName:"Throttle",load:()=>C(()=>dl(()=>import("./01f1d1bd.BNXejKS_.js"),__vite__mapDeps([235,2,1,3,4,5,96,62,128,114,72,8,7,9,10,11,236])))}),XE="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",QE="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",ZE="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",ex="224px",tx="72px",nx=72,rx="415px",ax="700px",ix="100dvi",ox="93dvb",sx=new Set(["Chat","s-chat"]);var lx={Paragraph:"_1tx8jg70 _1fragemws",lineClamp:"_1tx8jg72",lineClampCount:"var(--_1tx8jg71)",accessibilityVisibilityVariant:{exclusive:"_1tx8jg71p _1tx8jg71o _1fragem121"},textAlignVariant:{start:"_1tx8jg77 _1tx8jg73 _1fragem126",center:"_1tx8jg78 _1tx8jg74 _1fragem124",end:"_1tx8jg79 _1tx8jg75 _1fragem125",justify:"_1tx8jg7a _1tx8jg76 _1fragem127"},textWrapVariant:{pretty:"_1tx8jg7b"},sizeVariant:{extraSmall:"_1tx8jg7j _1tx8jg7c _1fragemys",small:"_1tx8jg7k _1tx8jg7d _1fragemyt",base:"_1tx8jg7l _1tx8jg7e _1fragemyu",medium:"_1tx8jg7m _1tx8jg7f _1fragemyv",large:"_1tx8jg7n _1tx8jg7g _1fragemyw",extraLarge:"_1tx8jg7o _1tx8jg7h _1fragemyx",extraExtraLarge:"_1tx8jg7p _1tx8jg7i _1fragemyy"},kerningVariant:{base:"_1tx8jg7q",large100:"_1tx8jg7r",large200:"_1tx8jg7s"},letterCaseVariant:{uppercase:"_1tx8jg7t",lowercase:"_1tx8jg7u",capitalize:"_1tx8jg7v",none:"_1tx8jg7w"},fontsVariant:{primary:"_1tx8jg7z _1tx8jg7x _1fragemyg",secondary:"_1tx8jg710 _1tx8jg7y _1fragemyh"},decorationVariant:{none:"_1tx8jg713 _1tx8jg711 _1fragem128",underline:"_1tx8jg714 _1tx8jg712 _1fragem129"},colorVariant:{base:"_1tx8jg71k",subdued:"_1tx8jg71l"},toneVariant:{auto:"_1tx8jg71c",neutral:"_1tx8jg71d",info:"_1tx8jg71e _1tx8jg715 _1tx8jg716 _1fragemxt",success:"_1tx8jg71f _1tx8jg715 _1tx8jg717 _1fragemxu",warning:"_1tx8jg71g _1tx8jg715 _1tx8jg718 _1fragemxv",critical:"_1tx8jg71h _1tx8jg715 _1tx8jg719 _1fragemxr",custom:"_1tx8jg71i _1tx8jg715 _1tx8jg71a _1fragemxs",accent:"_1tx8jg71j _1tx8jg71b _1fragemxq"},typeVariant:{paragraph:"_1tx8jg71m",small:"_1tx8jg71n _1tx8jg7k _1tx8jg7d _1fragemyt"}};function cx({accessibilityVisibility:e,children:t,color:n="base",size:r,id:a,textAlign:i,textWrap:o,translate:s,kerning:l,letterCase:c,fonts:u,decoration:p,type:m="paragraph",tone:h="auto",dir:g,lang:f,lineClamp:y}){const _=null!=y&&Number.isFinite(y)&&y>=1?Math.floor(y):void 0,k=null==_?void 0:b({[lx.lineClampCount]:String(_)}),P=(!0===s?"yes":void 0)??(!1===s?"no":void 0),S="exclusive"===e?lx.accessibilityVisibilityVariant[e]:v(lx.Paragraph,"small"!==m&&r&&lx.sizeVariant[r],h&&lx.toneVariant[h],n&&("auto"===h||"neutral"===h)&&lx.colorVariant[n],i&&"auto"!==i&&lx.textAlignVariant[i],o&&"wrap"!==o&&lx.textWrapVariant[o
2],l&&lx.kerningVariant[l],c&&lx.letterCaseVariant[c],u&&lx.fontsVariant[u],p&&lx.decorationVariant[p],null!=_&&lx.lineClamp,lx.typeVariant[m],{notranslate:!1===s});return d(Ed.Provider,{value:!0,children:d("p",{"aria-hidden":"hidden"===e||void 0,className:S,id:a,translate:P,dir:g,lang:f,style:k,children:t})})}function ux({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:a}){const i=!e&&!t,o=Boolean(n)||Boolean(r);return i||o||a}function dx(e){const t=e?.filter(({quantity:e})=>e>0)??[];return t.length>0&&t.every(({requiresShipping:e})=>!e)}function px({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const mx=re("VaultedSectionsContext");function hx(){const e=h(mx);return t(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function gx(){const e=hx();return t(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function fx(){const e=hx(),{checkout:n,embed:r,source:a}=ie(),{validation:{contactErrors:{emailInputError:o,phoneInputError:s}}}=n,{current:l}=n.identity,{hasViolations:c}=Qy(ai),u=kv(),d=Gm(),p=T(u.main.section),m=T(d.vaulted),h=T(c),g=i(!1);return t(()=>{const t=ii(p.value),i=ii(m.value),{contact:c,delivery:u,payment:d}=e.value,f=oi({isContactVaulted:c,configuration:n.configuration,identity:n.identity,embed:r}),y=(()=>{if("sdkCartHints"!==l.value)return g.current=!1,f;if(!f)return g.current=!1,!1;const e=n.proposal.negotiated.fields.merchandiseLines.value?.lines;return px({isFlagshipPartner:r?.isFlagshipPartner??!1,hasError:ux({email:n.proposal.proposed.email.value,phone:n.proposal.proposed.phone.value,emailInputError:o.value,phoneInputError:s.value,hasViolations:h.value}),hasOnlyDigitalItems:dx(e)})?g.current:(g.current=!0,!0)})(),v=!Hn(a)&&si({checkout:n}),_=u&&n.isShippingRequired.value;return!!(y||_||d||v)&&(t||i)})}function yx(){const{embed:e,shop:t,checkout:n,router:r,i18n:a}=ie(),i=e?.interstitialPartnerDisplayName,{plan:o}=ac().value,c=r.currentUrl.value.normalizedPath,u=da({embedder:e?.embedder}),p=hx(),{delegatedPaymentInstrument:h}=n.negotiator.context,g=m(!1);l(()=>{g.value=Boolean(h.peek())},[h,g]);const[f]=s(()=>{const e=n.proposal.proposed;return{contact:Boolean(e.email.peek()||e.phone.peek()),delivery:(t=e.shippingAddress.peek(),Object.entries(t).some(([e,t])=>"countryCode"!==e&&"zoneCode"!==e&&dy(e)&&null!=t&&("string"!=typeof t||t.trim().length>0)))};var t});if(!function(e,t){return!!e.greenPath.some(({route:e})=>e===t)||e.detours.some(({type:e,route:n})=>("stockProblems"===e||"noAddressLocation"===e)&&n===t)}(o,c))return null;if(!u)return null;if("sdkCartHints"!==n.identity.current.value)return null;if(!i)return null;const y=p.value.contact&&f.contact,v=p.value.delivery&&f.delivery,_=p.value.payment&&g.value;return y||v||_?d(eh,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[d(oh,{type:"info"}),d(cx,{textWrap:"pretty",children:a.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]}):null}const vx=w({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>dl(()=>import("./28ac86c0.CtlCuSTM.js").then(e=>e.A),__vite__mapDeps([18,2,1,3,4,5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,17,38,39,40,9,41,42,43,44,45,46,47,48,49,50]))});function _x(){const e=Kw("purchase.thank-you.announcement.render");return r(()=>{const t=ei(e,"uiExtension");return t.length>0?[t[0]]:[]},[e])}const bx=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,kx=/Version\/(\d+)[\d.]*.*Safari/,Px=/Chrome\/|Edg(?:e|iOS|A)?\//,Sx=/FBAN|FB_IAB|FBAV|Instagram/;function wx(){return Sx.test(navigator.userAgent)}const Cx=0,Ex=1,xx=2,Ix=4,Ax=5,Tx=new Map([["legacy",0],["block",1],["inline",2],["grid",3],["list",4],["grid-compact",5]]);function Lx(e,t){return Tx.get(e)===t}function Nx(e){const t=Tx.get(e);return 3===t||5===t}function Rx(e){return"string"==typeof e&&Tx.has(e)}const Mx=f(null);function Dx(){return h(Mx)}Mx.displayName="ChoiceListContext";const Ox=f(null);function zx(){return h(Ox)||{}}function Bx(){return zx().redesigned??!1}Ox.displayName="ChoiceListStyleContext";const Vx=f(void 0);function Fx(e){return Lx(e,1)||Lx(e,5)}function Ux(e){const t=h(Gu)?.redesignedChoiceLists??!1,n=h(Vx);return t&&"base"!==n&&Fx(e)?"redesigned":"base"}Vx.displayName="ChoiceListPresentationOverrideContext";var qx={Actions:"u2pextc u2pextb _1fragem82 _1fragem9v _1fragemtq _1fragemrx _1fragem6t _1fragempu",ActionsScrollShadow:"u2pext1n",actionLayoutVariant:{inline:"u2pextf u2pextd _1fragemx8 _1fragembu",stacked:"u2pextg u2pexte _1fragemxc _1fragemcd"},hasBlockSize:"u2pextt",Content:"u2pext13 u2pext12 _1fragemyn",contentPaddingVariant:{base:"u2pext1p u2pext1o _1fragemtq _1fragemrx",none:"u2pext1q"},CloseButton:"u2pext1l u2pext1k _1fragempa _1fragemr3 _1fragemnh _1fragemsw _1fragemwn _1fragem10x _1fragem5u _1fragem133 _1fragem12k _1fragem12p _1fragem12e _1fragem130",Footer:"u2pextm _1fragemyo",Header:"u2pext1a u2pext19 _1fragem64 _1fragembe _1fragem19",HeaderContent:"u2pext1h _1fragemyn _1fragemvo",headerContentPaddingVariant:{base:"u2pext1i",none:"u2pext1j"},headerPaddingVariant:{base:"u2pext1e u2pext1b _1fragemtq _1fragemrx",large:"u2pext1f u2pext1c _1fragemtq _1fragemrx",extraLarge:"u2pext1g u2pext1d _1fragemtq _1fragemrx"},IFrame:"u2pext15 u2pext14 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem5u",iframePaddingVariant:{base:"u2pext17 u2pext16 _1fragemtq _1fragemrx _1fragempu",none:"u2pext18"},Modal:"u2pexto u2pextn _1fragemup _1fragemv4 _1fragem64 _1fragem73 _1fragemzf _1fragem5p _1fragemve _1fragemxx _1fragemy5 _1fragem133 _1fragem12n _1fragem12d _1fragem12q",modalTopRadiusVariant:{rounded:"u2pextp",square:"u2pextq"},modalMobileMarginVariant:{base:"u2pextr",none:"u2pexts"},Overlay:"u2pext8 u2pext7 _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwn _1fragem64 _1fragem1j _1fragem132 _1fragem11k _1fragem12l _1fragem12q _1fragem12f",overlayPaddingVariant:{base:"u2pext9",none:"u2pexta"},ScrollBox:"u2pextv u2pextu _1fragem6t _1fragemuk _1fragemv4",scrollBoxActionsVariant:{withActions:"u2pextw",noActions:"u2pextx"},scrollBoxPaddingVariant:{gap:"u2pextz u2pexty _1fragem8c _1fragema5",none:"u2pext10",blockStart:"u2pext11"},secondaryActionLayoutVariant:{inline:"u2pextk u2pexti _1fragemx8",stacked:"u2pextl u2pextj _1fragemxc"},SecondaryActions:"u2pexth _1fragem82 _1fragem9v _1fragem6t _1fragemyn",transitionVariant:{entered:"u2pext1",exit:"u2pext2",exiting:"u2pext3",enter:"u2pext4",entering:"u2pext5",exited:"u2pext6"},MobileSafari26BarTop:"u2pext1t u2pext1s u2pext1r _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",MobileSafari26BarBottom:"u2pext1u u2pext1s u2pext1r _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",ModalContentCrossFadeTarget:"u2pext0",overlayMobileSafari26:"u2pext1v"};const jx=$c("Modal");function Hx(e){const t=Yc(e.id,jx),n=Vu("modal");if(n){const{active:r,setActive:a}=n;
2n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",()=>{a(!0)});const i=()=>{a(!1),"function"==typeof e.onHide&&e.onHide()},{children:o}=e;return d(Yx,{...e,id:t,onHide:i,open:r,children:gw(o)&&d(Tu,{children:o})})}return d(Yx,{...e,id:t})}const $x={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960},Yx=jp(Mp(function({blocking:e,size:t="base",blockSize:r,open:o=!1,heading:l,source:c,iframeRef:u,onIframeLoad:p,iframeId:m,allow:g,accessibilityLabel:f,padding:_="base",primaryAction:b,secondaryActions:k,actionLayout:P="inline",footer:S,children:w,id:C,onAfterShow:E,onShow:x,closeButton:I="visible",dataTestIdForScrollableContent:A,...T}){const L=i(null),N=i(null),R=i(!1),M=h(Ou)?.openModalCount;a(()=>{if(o&&M)return M.value+=1,()=>{M.value=Math.max(0,M.value-1)}},[o,M]),o&&N.current!==o&&"function"==typeof x&&x(),N.current=o;const{modal:{margin:D}}=Gm(),O=null!=D&&"none"!==D,z="hidden"===I,{onHide:B,onAfterHide:V}=e?{}:T,[F,U]=s(),q=!r&&function(e){if(!e||"undefined"==typeof window)return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}(c),j=r??(q||-1===F||"max"===t?"100%":void 0),H=function(e){return e.endsWith("px")}(t)?t:`${$x[t]}px`,{className:$,style:Y,styleElement:W}=Hm({blockSize:j,maxInlineSize:`@media (inline-size >= extraSmall) ${H}, none`}),G=Ad(o,"slow"),[J,K]=s("");a(()=>{K(qx.transitionVariant[G])},[G]);const{isLocked:X,lock:Q,unlock:Z}=ry();a(()=>{o&&!X&&Q(),!o&&X&&Z()},[X,Q,o,Z]),a(()=>{if("exited"===G&&(U(void 0),R.current&&("function"==typeof V&&V(),R.current=!1)),"entered"===G){if(C&&function(){const e=navigator.userAgent;if(Px.test(e))return!1;const t=e.match(kx);return!!t&&26===parseInt(t[1],10)}()){const e=document.getElementById(C),t=document.activeElement,n=t instanceof HTMLElement&&!0===e?.contains(t)&&t.matches('input, textarea, select, [contenteditable="true"]');e&&!n&&e.focus()}"function"==typeof E&&E()}},[G,E,V,C]),a(()=>{o||(R.current=!0)},[o]),a(()=>{const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||e||!o||!L.current?.contains(document.activeElement)&&document.getElementById(Wc)?.contains(document.activeElement)||"function"==typeof B&&B()};return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}},[e,o,B]);const ee=n(e=>{if(!r&&!q){const t=e.target;if(t?.contentWindow)try{U(t.contentWindow.document.body.scrollHeight)}catch{U(-1)}}p?.()},[r,p,q]),te=n(e=>{e.target===e.currentTarget&&"function"==typeof B&&B()},[B]);if("exited"===G)return null;const ne=l&&!f?Hp(C):void 0,re=Boolean(b||k),ae=function(){const e=navigator.userAgent.match(bx);return!!e&&"26"===e[1]}();return d(nu,{children:d(Vx.Provider,{value:void 0,children:[W,d("div",{ref:L,className:v(qx.Overlay,J,qx.overlayPaddingVariant[r?"none":"base"],ae&&qx.overlayMobileSafari26),onMouseDown:te,children:d(ey,{children:d("div",{id:C,className:v(qx.Modal,qx.modalTopRadiusVariant["100%"===Tp(r)?"square":"rounded"],qx.modalMobileMarginVariant[O?"base":"none"],J,$,j&&qx.hasBlockSize),role:"dialog","aria-modal":!0,style:Y,"aria-label":f,"aria-labelledby":ne,children:[c?d(y,{children:d(_u,{level:2,children:[d(Wx,{id:C,hideCloseButton:z||e,onHide:B,heading:l}),d(Xx,{source:c,iframeRef:u,iframeId:m,allow:g,accessibilityLabel:f,heading:l,iframeHeight:F,blockSize:r,handleIFrameLoad:ee,padding:_})]})}):d("div",{className:v(qx.ScrollBox,o&&qx.ModalContentCrossFadeTarget,qx.scrollBoxPaddingVariant["base"===_?l?"gap":"blockStart":"none"],qx.scrollBoxActionsVariant[re||S?"withActions":"noActions"]),"data-testid":A,children:[d(_u,{level:2,children:[d(Wx,{id:C,hideCloseButton:z||e,onHide:B,padding:_,heading:l}),d(Kx,{padding:_,children:w})]}),re&&d("div",{className:qx.ActionsScrollShadow})]}),S&&d("div",{className:qx.Footer,children:d(wd.Provider,{value:!1,children:d(Tu,{children:S})})}),re&&d(Gx,{primaryAction:b,secondaryActions:k,actionLayout:P})]})})}),ae&&d(y,{children:[d("div",{className:v(qx.MobileSafari26BarTop,J)}),d("div",{className:v(qx.MobileSafari26BarBottom,J)})]})]})})},{overlayType:"modal"}));function Wx({hideCloseButton:e,id:t,onHide:n,padding:r,heading:a}){const i="string"==typeof a?d(TS,{level:1,children:a}):a;return!i&&e?null:d("div",{className:v(qx.Header,qx.headerPaddingVariant[i?"base":"base"===r?"large":"extraLarge"]),children:[i&&d("div",{id:Hp(t),className:v(qx.HeaderContent,qx.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&d(Jx,{onHide:n})]})}function Gx({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return d(Tu,{children:d("div",{className:v(qx.Actions,qx.actionLayoutVariant[n]),children:[("inline"===n||gw(t))&&d("div",{className:v(qx.SecondaryActions,qx.secondaryActionLayoutVariant[n]),children:t}),e]})})}function Jx({onHide:e}){const t=Qu();return d("button",{type:"button",className:qx.CloseButton,onClick:()=>{"function"==typeof e&&e()},"aria-label":t("closeModal")||"Close",children:d(oh,{type:"x",size:"base"})})}function Kx({children:e,padding:t="base"}){return gw(e)&&d("div",{className:v(qx.Content,qx.contentPaddingVariant[t]),children:d(wd.Provider,{value:!1,children:d(Uw,{children:e})})})}function Xx({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:a,heading:i,iframeHeight:o,handleIFrameLoad:s,padding:l="base"}){const c=r;return d("iframe",{src:e,title:a??("string"==typeof i?i:void 0),name:n,className:v(qx.IFrame,qx.iframePaddingVariant[l]),ref:t,onLoad:s,id:n,...o&&o>0&&{style:{height:o}},...c?{allow:c}:void 0})}function Qx({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:a,handleSubmit:i,handleCancel:o}){const s=Boolean(n),l=Boolean(t);return d(eh,{gridTemplateColumns:s&&l?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[s&&d(Yf,{variant:"secondary",inlineSize:"fill",onClick:o,children:n}),l&&d(Yf,{variant:"primary",inlineSize:"fill",disabled:a,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const Zx=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];var eI=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(eI||{});const tI=re("DeliveryMethodsContext"),nI=f(void 0);function rI(){return ae(tI)}function aI(){return h(nI)}function iI(e){const n=h(tI),r=Zx.includes(e);return t(()=>r&&(n?.initialReconciliationPending.value??!1))}function oI(e){return e/ci}function sI(){const{i18n:e}=ie();return n(t=>{if("number"==typeof t){const n=Math.ceil(oI(t));return n<1?null:e.translate("shipping.estimated_delivery_date",{count:n})}const{lower:n,upper:r}=t;if(void 0===n||void 0===r)return null;const a=Math.ceil(oI(n)),i=Math.ceil(oI(r));return i<1?null:a<1||a>i?e.translate("shipping.estimated_delivery_date",{count:i}):e.translate("shipping.estimated_delivery_date_range",{minimum:a,maximum:i})},[e])}function lI(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext,r=Be();return t(()=>{const e=n.value;return!(!e||"unavailable"===e.status||r.value.enabledDeliveryMethods.length>1)&&e.lines.every(e=>"not_required"===e.status||"available"===e.status&&e.methods.length<2)})}function cI(){const{checkout:{negotiator:e}}=ie(),{deliveryNext:n,allViolations:r}=e.current.fields,a=vn("deliveryNext");return t(()=>{const e=n.value,t=a.value,i=r.value;if(t)return{value:null,loading:t};const o=i?.some(({code:e})=>ui.has(e));return{value:"unavailable"===e?.status&&(e.hasNoDeliveryMethods||o||!1),loading:!1}})}function uI(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=vn("deliveryNext");return t(()=>{const e=r.value;return e?{value:null,loading:e}:{value:n.value?.some(({code:e})=>di.has(e))??!1,loading:!1}})}function dI(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:n}=e.parts;return t(()=>{const e=n.value;return e.length>0&&e.every(e=>{const t=e.value?.deliveryMethodTypes;return 1===t?.length&&"PICK_UP"===t[0]})})}function pI(e){return(e??[]).filter(e=>e.requiresShipping).reduce((e,t)=>
2e+(t.quantity??0),0)}function mI(){const e=li();return t(()=>{const t=e.value;if(!t)return{};const n={};for(const e of t){if("available"!==e.status)continue;const t=It(e);if(!t)continue;const{methodType:r}=t,a=pI(e.targetMerchandiseLines);n[r]=(n[r]??0)+a}return n})}function hI(){const{checkout:e,i18n:t}=ie(),n=rI(),r=e.crossBorderConfirmState.value,a=Boolean(r&&!r.onCancel),i=gh(),o=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return d(Hx,{id:"cross-border-consolidation-modal",open:Boolean(r),heading:a?t.translate("split_delivery.cross_border.modal.country_changed_heading"):t.translate("split_delivery.cross_border.modal.heading"),onHide:r?.onCancel,closeButton:a?"hidden":"visible",primaryAction:d(Qx,{handleSubmit:o,handleCancel:r?.onCancel,submitText:a?t.translate("general.continue_button_label"):t.translate("split_delivery.cross_border.modal.change_country"),cancelText:a?void 0:t.translate("address_management.address_form.cancel")}),children:d(qf,{children:t.translate("split_delivery.cross_border.modal.content")})})}function gI(e,t){const n=[],r=e.includes("LOCAL");return(e.includes("SHIPPING")||r)&&n.push(r?["SHIPPING","LOCAL"]:["SHIPPING"]),e.includes("PICK_UP")&&n.push(["PICK_UP"]),e.includes("PICKUP_POINT")&&!t&&n.push(["PICKUP_POINT"]),n}function fI(e){let t=!1,n=!1;for(const r of e){const e=r.includes("SHIPPING");for(const a of r)if("NONE"!==a)if("SHIPPING"!==a)if("PICK_UP"!==a){if("LOCAL"!==a||!e)return!1}else n=!0;else t=!0}return t&&n}function yI(e){return(e.value.targetMerchandiseLines??[]).some(e=>e.requiresShipping)}function vI(){const{shop:e,checkout:{negotiator:n}}=ie(),{deliveryNext:r}=n.current.fields,a=ac();return t(()=>function({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const a=fI(Ue(e).filter(e=>"available"===e.status).map(e=>e.methods.map(({methodType:e})=>e)));return t?a:!!Boolean(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)&&function(e){const t=e.filter(yI);return fI(e.map(e=>e.value.deliveryMethodTypes))&&t.some(e=>e.value.deliveryMethodTypes.includes("SHIPPING"))&&t.some(e=>e.value.deliveryMethodTypes.includes("PICK_UP"))}(n)}({deliveryNext:r.value,isThankYouPage:gv(a.value.currentDetour),proposedDeliveryLines:n.parts.deliveryLines.value,splitShipPickupUiEnabled:e.shipPickupInOneOrderEnabled}))}function _I(e){const t=i(e);return a(()=>{t.current=e},[e]),t}function bI(){return(()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n,negotiator:r},source:i}=ie(),o="shopPay"===n.current.value,s=r.current.fields.buyerIdentity.value?.customerProfile,{negotiating:l,methods:c}=rI(),u=pi();a(()=>{!l.value&&c.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:i.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(le(t),10),numberLocationsFound:u.value?.methods.length,userId:s?.id?parseInt(le(s.id),10):void 0,checkoutSurface:o?"shop_pay":"guest_checkout"}})},[s?.id,l.value,o,u.value?.methods.length,e,c.value,i.checkoutSessionIdentifier,t])})(),(()=>{const e=i(),{userEvents:t,shop:{id:n},checkout:{identity:r,negotiator:o},source:s}=ie(),l="shopPay"===r.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=pi(),d=u.value?.selectedDeliveryMethodHandle,p=u.value?.methods;a(()=>{const{locationId:r,selectedLocationRank:a}=((e,t)=>{const n=t=>t.handle===e,r=t?.findIndex(n),a=t?.find(n)?.originLocation?.id;return{locationId:a,selectedLocationRank:r}})(d,p);r&&d!==e.current&&(e.current=d,t.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(le(n),10),locationId:le(r),selectedLocationRank:a,userId:c?.id?parseInt(le(c.id),10):void 0,numberLocationsFound:p?.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}))},[c?.id,l,p,t,d,s.checkoutSessionIdentifier,n])})(),(()=>{const e=Vg(),n=vI(),r=ac(),a=t(()=>n.value&&!gv(r.value.currentDetour));P(()=>{a.value&&o(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})})(),null}function kI(e,t){const n=e.find(hi),r=t.find(hi);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}const PI=["phone","company","address2"];function SI(){const{checkout:e,shop:t}=ie(),{locationAddress:r,shippingAddress:a}=e.negotiator.parts,o=t.hasFlagEnabled(gi),s=i(r.peek()),l=i(!1);return{syncLocationAddressFromShipping:n((t,n)=>{if(o)return;if("entering"!==kI(t,n).direction)return;if(l.current)return;const i=s.current;if(i&&!function(e,t){return e?.countryCode===t.countryCode&&e?.zoneCode===t.zoneCode&&e?.postalCode===t.postalCode&&e?.city===t.city&&e?.coordinates?.latitude===t.coordinates?.latitude&&e?.coordinates?.longitude===t.coordinates?.longitude}(r.value,i))return void(l.current=!0);const c=a.value;if(!c?.countryCode)return;const{isRequired:u}=e.configuration.addressSettings.nonBillingAddressSettings.value,d=function(e){if(e.coordinates)return!0;const{address1:t,city:n,firstName:r,lastName:a}=e;return!!(t&&n&&r&&a)&&PI.every(t=>e[t]||!(e=>u(e,{countryCode:c.countryCode,useMerchantSettings:!0}))(t))}(c)?c:{};r.value=fi(d,c.countryCode,c.zoneCode),s.current=r.value},[e,o,r,a])}}function wI(e){const t=e.filter(e=>"SHIPPING"===e||"LOCAL"===e);return t.length>0?t:1===e.length&&"PICK_UP"===e[0]?["PICK_UP"]:1===e.length&&"PICKUP_POINT"===e[0]?["PICKUP_POINT"]:void 0}function CI({children:e}){const s=i(void 0),{i18n:l,checkout:c,observability:u,shop:p,router:h,webMcp:g}=ie(),f=p.hasFlagEnabled(yi),y=m(!1),v=m(!1),_=Sh(),{negotiate:b}=ic(),{loading:k}=c.negotiator,S="shopPay"===c.identity.current.value,w=Be(),C=i(new Set),E=i(),{correctShippingAddress:I}=function(){const{shopPay:e,checkout:t}=ie(),{shippingAddress:r}=t.negotiator.parts,a=mi(),i="shopPay"===t.identity.current.value,o=n(()=>
2{if(!a.value||t.negotiator.current.fields.mustSelectProvidedAddress.value)return;const n=e.session.selectedShippingAddress.value;if(!n?.address)return;const i=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),o=e.user.phoneNumber.value;r.value={...n?.address,phone:i&&!n?.address.phone?o:n?.address.phone}},[a,t.configuration.addressSettings.nonBillingAddressSettings,t.negotiator.current.fields.mustSelectProvidedAddress,r,e.user.phoneNumber,e.session.selectedShippingAddress]);return{correctShippingAddress:n(e=>{i&&e.includes("SHIPPING")&&o()},[o,i])}}(),{syncLocationAddressFromShipping:L}=SI(),{preservePickupSelectionAcrossToggles:N}=function(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t}=e.parts,r=i({}),a=n((e,n)=>{const a=kI(e,n);if("leaving"!==a.direction)return"entering"===a.direction?r.current[a.pickupType]:void 0;r.current[a.pickupType]=function(e){return e.reduce((e,t)=>{const{type:n,deliveryMethodTypes:r,deliveryMethodHandle:a}=t.value;return r.some(hi)?{...e,[n]:a}:e},{})}(t.value)},[t]);return{preservePickupSelectionAcrossToggles:a}}(),{billingAddressOption:R,deliveryLines:M,discountLines:D,merchandiseLines:O,shippingAddress:z,locationAddress:B}=c.negotiator.parts,V=vI(),{deliveryNext:F,shippingAddress:U}=c.negotiator.current.fields,q=F.peek(),j=m(vi(z.peek())||vi(U.peek())||null!=q&&"unavailable"!==q.status),H=ab();P(()=>{(vi(U.value)||"filled"===F.value?.status||"partial"===F.value?.status)&&(j.value=!0)});const $=h.currentUrlMatches("/stock-problems"),[Y]=Mh("ONE_TIME_PURCHASE"),W=T(Y),[G,J]=Vh(),K=function(){const{checkout:{negotiator:e}}=ie(),{parts:t}=e;return n(e=>{t.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodHandle:e}})},[t.deliveryLines])}(),X=!f,Q=T(G),Z=t(()=>ut(F.value)||_i(M.value)||V.value),ee=t(()=>Z.value?Q.value:W.value),te=r(()=>{if(Z.peek())return;if(1!==(e=w.peek().enabledDeliveryMethods??[]).length||"PICK_UP"!==e[0])return;var e;const[t]=ee.peek();return"PICK_UP"!==t?{activeMethod:t,targetMethod:"PICK_UP"}:void 0},[Z,ee,w]),ne=m(null!=te),re=t(()=>{if(c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return ee.value;if(!Z.value){const e=EI(w.value.enabledDeliveryMethods??[]),t="unavailable"===F.value?.status&&!j.value,[n]=ee.value;return te&&ne.value&&!v.value?[te.targetMethod]:t&&!v.value&&e&&"PICKUP_POINT"!==n?["SHIPPING"]:n?["LOCAL"===n?"SHIPPING":n]:[]}const e=ee.value.filter(e=>"LOCAL"!==e);return!e.includes("SHIPPING")&&ee.value.includes("LOCAL")&&e.push("SHIPPING"),e}),ae=n((e,t)=>{if(H.value)return;const n=EI(e),r=EI(t);t.some(hi)&&!r&&(!S&&n&&null==s.current&&(s.current=R.value),R.value="custom"),!r||n||S||(p.requireMatchingShippingAndBilling?R.value="shipping":null==s.current?R.value=p.sameBillingAndShippingAddress?"shipping":"custom":R.value=s.current,s.current=void 0)},[p,S,H,R]),oe=i(re.peek());P(()=>{const e=oe.current,t=re.value;oe.current=t,e!==t&&o(()=>ae(e,t))});const se=n((e,t,n)=>{ae(t,e),oe.current=e,I(e),n?B.value=n:L(t,e);const r=n?void 0:N(t,e),a=wI(e);A(()=>{p.shipPickupInOneOrderEnabled&&bi(M),J(e),p.shipPickupInOneOrderEnabled&&a&&ki({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:a}),K(void 0),r&&Lh(M,r),Pi(D),ne.value=!1})},[ae,I,B,L,N,p.shipPickupInOneOrderEnabled,M,J,O,K,D,ne]),le=n((e,t=re.value,n)=>{const r=S||H.value||t.includes("SHIPPING")||!e.includes("SHIPPING")?["deliveryNext"]:[],a=Fe(r);return se(e,t),y.value=!0,_?.dispatch?.("deliveryMethodChanged"),b({silenceViolations:a,onComplete:e=>{const t=k.value.has("deliveryNext");if("stale"===e.status&&t){const e=k.subscribe(t=>{t.has("deliveryNext")||(A(()=>{y.value=!1,n?.()}),e())})}else A(()=>{y.value=!1,n?.()})}})},[re,S,H,se,y,_,b,k]),ce=t(()=>c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),ue=t(()=>Ma({checkout:c})),de=t(()=>gI(w.value.enabledDeliveryMethods??[],ue.value));a(()=>g?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>de.value,getSelectedMethodTypes:()=>re.value,markBuyerSelection:()=>{v.value=!0,ne.value=!1},applyMethodChange:se,reconcileSameMethod(e){const t=wI(e);p.shipPickupInOneOrderEnabled&&t&&ki({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:t})&&Pi(D)}}),[g,de,re,v,ne,se,M,O,p.shipPickupInOneOrderEnabled,D]);const pe=t(()=>{const e=xI(de.value,l,p,X);return ce.value?e.filter(e=>re.value.includes(e.id)):e}),me=t(()=>{if(ce.value)return pe.value;const e=C.current,t=gI([...w.value.enabledDeliveryMethods??[],...e],ue.value),n=t.length>de.value.length?xI(t,l,p,X):pe.value;return n.length>
21&&n.forEach(t=>e.add(t.id)),n}),he=r(()=>function({isStockProblems:e,shippingRequired:t,deliveryMethodOptions:n,mustSelectProvidedShippingRate:r,isSplitShipAndPickup:a,initialPickupOnlySelection:i,deliveryNext:o,currentSelectedMethods:s}){if(e)return;if(!t)return;const[l]=n;if(l&&!r&&!a){if(i?.activeMethod){const{activeMethod:e,targetMethod:t}=i;return{nextMethods:[t],previousMethods:["LOCAL"===e?"SHIPPING":e],loadingFields:Zx}}if("filled"!==o?.status)return{nextMethods:[...n.find(e=>JSON.stringify(e)===JSON.stringify(s))??l],loadingFields:Zx}}}({isStockProblems:$,shippingRequired:Si(c.proposal),deliveryMethodOptions:me.value.map(({value:e})=>e),mustSelectProvidedShippingRate:ce.value,isSplitShipAndPickup:V.value,initialPickupOnlySelection:te,deliveryNext:F.value,currentSelectedMethods:re.value}),[]),ge=m(null!=he);P(()=>{const e=pe.value,t=me.value;if(e===t||t.length<=1)return void(E.current=void 0);const n=JSON.stringify([t.map(({id:e})=>e),e.map(({id:e})=>e)]);E.current!==n&&(E.current=n,u.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:t.length,currentOptionCount:e.length}))}),a(()=>{he&&!v.value?le(he.nextMethods,he.previousMethods,()=>{ge.value=!1})?.catch(e=>{A(()=>{y.value=!1,ge.value=!1}),u.error(e)}):ge.value=!1},[]);const fe=_I(n(e=>{const t=me.value.find(t=>t.id===e[0]);t&&(v.value=!0,le(t.value))},[me,le,v])),ye=t(()=>me.value.length<=1),ve=t(()=>{if(!ye.value)return{options:me,selected:re,select:e=>{fe.current(e)},variant:X?"next":"default"}}),_e=r(()=>({negotiating:y,initialReconciliationPending:ge,methods:re,setSelectedMethodTypes:le}),[y,ge,re,le]);return d(tI.Provider,{value:_e,children:[d(bI,{}),d(x,{when:V,children:d(hI,{})}),d(nI.Provider,{value:ve.value,children:e})]})}function EI(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function xI(e,t,n,r){const a=[],i="object"==typeof n.translations.delivery_options?n.translations.delivery_options:void 0,o=e.some(([e])=>"PICKUP_POINT"===e),s=e.find(([e])=>"SHIPPING"===e);if(s){const e=Boolean(i?.ship_to_address),n=!o||r&&!e?t.translate("delivery_options.ship"):t.translate("delivery_options.ship_to_address");a.push({id:"SHIPPING",value:s,label:n,icon:r?eI.PackageDelivery:eI.Truck})}const l=e.find(([e])=>"PICK_UP"===e);if(l){const e=Boolean(i?.pick_up),n=Boolean(i?.pick_up_from_store),s=o?n:e,c=o?t.translate("delivery_options.pick_up_from_store"):t.translate("delivery_options.pick_up"),u=o?t.translate("delivery_options.pickup_store"):t.translate("delivery_options.pickup");a.push({id:"PICK_UP",value:l,label:r&&!s?u:c,icon:r&&!o?eI.Location:eI.Store})}const c=e.find(([e])=>"PICKUP_POINT"===e);if(c){const e=Boolean(i?.pickup_point_method_definition),n=r&&!e?t.translate("delivery_options.pickup_point"):t.translate("delivery_options.pickup_point_method_definition");a.push({id:"PICKUP_POINT",value:c,label:n,icon:eI.Location})}return a}function II(){const{i18n:e}=ie();return n((t,n={})=>{const r=new Date(t),a=new Date(Date.now()).getFullYear(),i=n.month??"long",o=r.getFullYear()>a?"numeric":void 0;return e.formatDate(r,{month:i,day:"numeric",year:o})},[e])}function AI(){const{shop:{captureAtFulfillmentEnabled:e},checkout:{negotiator:n}}=ie(),{buyerIdentity:r,paymentFlexibilityPaymentTermsTemplate:a}=n.current.fields;return t(()=>"FULFILLMENT"===a.value?.type&&!0===e&&!r.value?.purchasingCompany)}const TI=e=>"target"in e&&"$.availableRedeemables.redeemable"===e.target;function LI(e,t){if(!e||!t)return!1;if(e.redemptionSource!==t.redemptionSource)return!1;if("CUSTOM"===e.redemptionSource)return function(e,t){return!(!e||!t)&&(e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&function(e,t){return!(!e||!t)&&(e.length===t.length&&e.every(e=>t.some(t=>e.key===t.key&&e.value===t.value)))}(e?.redemptionAttributes,t?.redemptionAttributes))}(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function NI(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function RI(e){return e?`•••• ${e}`:""}
2class MI extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function DI(){const e=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods;return t(()=>{const e=n.value?.flatMap(e=>"redeemable"===e.type&&"CUSTOM"===e.redemptionSource?[e]:[]);if(void 0!==e&&0!==e.length){if(e.length>1)throw new MI("There can only be a single custom redeemable payment method per redeemable type.\nGift card is currently the only supported redeemable type");return e[0]}})}(),[a,i]=s([]),o=wi("CUSTOM"),l=r(()=>o.value.filter(e=>{const t=a.some(t=>LI(t,e.method)),n=!e.cost||0===e.cost.amount;return!t&&!n&&Boolean(e.method.redemptionContent)}),[o.value,a]),{checkout:{negotiator:c}}=ie(),{negotiate:u}=ic(),d=Boolean(e.value),p=n(e=>{const t=t=>"redeemable"!==t.type||"CUSTOM"!==t.redemptionSource||!LI(e,t),n=c.parts.paymentLines.value;c.parts.paymentLines.value=n.filter(e=>t(e.method));const r=c.parts.availableRedeemables.value;c.parts.availableRedeemables.value=r?.filter(e=>t(e.paymentMethod))},[c]),m=n((e,t)=>{const n=function(e,t){if(!t)return null;if(t.amount<=0)return null;return{method:e.paymentMethod,cost:{amount:BI,currencyCode:t.currencyCode}}}(e,t);if(n){const e=c.parts.paymentLines.value;return c.parts.paymentLines.value=[...e,...n?[n]:[]],new Promise(e=>{u({silenceViolations:Fe(["paymentLines"]),onComplete:t=>{"error"===t.status&&t.violations.some(Ci)&&p(n.method),e(t)}})})}return Promise.resolve(null)},[u,c,p]),h=n(e=>{const t=c.parts.paymentLines.value.length;return p(e),i(t=>[...t,e]),t>c.parts.paymentLines.value.length?new Promise(t=>{u({silenceViolations:Fe(["paymentLines"]),onComplete:n=>{i(t=>t.filter(t=>!LI(t,e))),t(n)}})}):Promise.resolve()},[u,c,p]),g=n(()=>{const e=c.parts.paymentLines.value,t=e.length;return c.parts.paymentLines.value=e.filter(e=>{const{method:t}=e;return!("redeemable"===t.type&&"CUSTOM"===t.redemptionSource)}),t>c.parts.paymentLines.value.length?new Promise(e=>{u({silenceViolations:Fe(["paymentLines"]),onComplete:t=>{e(t)}})}):Promise.resolve()},[u,c]);return{canApplyGiftCards:d,paymentMethod:e.value,paymentLines:l,submit:m,remove:h,removeAll:g}}function OI(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentLines;return t(()=>n.value?.lines.filter(e=>"giftCard"===e.method.type)??[])}function zI(){const e=wi("STORE_CREDIT"),{paymentLines:n}=DI(),r=OI();return t(()=>{const t=Boolean(e.value.length),a=Boolean(n.length),i=Boolean(r.value.length);return t||a||i})}const BI=0;function VI(){const e=Ei(),n=ac(),r=ct(),a=AI(),i=II(),o=zI(),{shop:s,checkout:l,embed:c,i18n:u,source:d,shopPay:p}=ie(),{orderSummary:m}=kv(),h=s?.name,g=m.totalLabel,f=yr(c?.embedder),y=xi(p.app.config);return t(()=>{const{currentPage:t,plan:s,currentDetour:c}=n.value,p=l.negotiator.current.fields.deferredTotal.value,m=l.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate.value,v="COMPACT"===l.configuration.orderSummary?.layoutStyle;let _;_="TOTAL"===g?u.translate("order_summary.total_label"):f?u.translate("universal.iframes.subtotal_label"):"ORDER_TOTAL"===g?u.translate("order_summary.order_total_label"):v&&h&&!y?u.translate("order_summary.pay_merchant_label",{merchant_name:h}):u.translate("order_summary.total_label");const b=f?_:u.translate("order_summary.total_due_label"),k="thankYou"===c?.type,P=p&&p.amount.amount>0;if(e.value&&k)return u.translate("order_summary.deferred_payment_info.paid_today_next");if(Hn(d))return u.translate("order_summary.total_due_label");if(r.value)return u.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft");if(P)return u.translate("order_summary.payment_terms_totals.due_today_next");if(m){if(a.value)return o.value?b:_;if(m?.dueDate){const e=i(m.dueDate,{month:"short"});return u.translate("order_summary.deferred_total_due_date_label_next",{date:e})}return"FULFILLMENT"===m?.type?u.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):"RECEIPT"===m?.type?u.translate("order_summary.total_due_later_label"):u.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return k?o.value?u.translate("order_summary.total_paid_label"):u.translate("order_summary.partial_total_label"):pb(t,s.greenPath[s.greenPath.length-1])?o.value?b:_:o.value?b:u.translate("order_summary.partial_total_label")})}function FI({children:e,id:t,title:n}){return d("abbr",{className:"_1qifbzv1 _1qifbzv0 _1fragem128",id:t,title:n,children:e})}function UI(){const e=Ii(),n=Ai(),{i18n:r,checkout:{negotiator:a}}=ie(),{deferredTotal:i}=a.current.fields,o=Ti(),s=T(Pv()),l=zI(),c=T(kv()),u=Tt(),p=t(()=>{const t=o.value,a=e.value;if(!t||!a)return;const d=r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),p=t.amount<a.amount&&!n.value&&!i.value&&!l.value;return{amountDue:t,paymentDueFormatted:d,priceBeforeReductionsFormatted:r.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"}),showCurrencyCode:"base"===c.value.disclosure.style&&s.value&&(!u.value||!d.includes(t.currencyCode)),showSubtotalBeforeReductions:p,totalAmountDueAccessiblityLabel:p?r.translate("order_summary.price_after_discount_aria_text"):r.translate("order_summary.total_price_label")}});return d(x,{when:p,children:({amountDue:e,paymentDueFormatted:t,priceBeforeReductionsFormatted:n,showCurrencyCode:a,showSubtotalBeforeReductions:i,totalAmountDueAccessiblityLabel:o})=>
2d(Qf,{alignItems:"end",children:[i?d(y,{children:[d(qf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.total_price_label")}),d(qf,{size:"small",color:"subdued",type:"redundant",translate:!1,children:n})]}):null,d(qf,{accessibilityVisibility:"exclusive",children:o}),d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:[a&&d(FI,{children:d(qf,{type:"small",color:"subdued",translate:!1,children:e.currencyCode})}),d(cx,{color:"base",size:"large",translate:!1,children:d(qf,{type:"strong",children:t})})]})]})})}const qI={"StackedThumbnails-fan":"DiYxd","StackedThumbnails-fan-legacy":"XEYoy","StackedThumbnail-fan":"P6qdf","StackedThumbnail-fan-legacy":"jZNeD","StackedThumbnails-inline":"raPom","StackedThumbnail-inline":"jpkdO","StackedThumbnails-inline-discrete":"md55H"};function jI({variant:e="fan",merchandise:t,size:n,max:r=2,useImageAltTexts:a=!0,useTitleAsAltTextFallback:i=!1,useResponsiveImageSources:o=!1,sortByPrice:s=!1,showQuantityBadges:l=!0}){const c="inline-discrete"===e,u=c&&t.length>r?t.length-r+1:0,p=(s?[...t].sort((e,t)=>HI(t)-HI(e)):t).slice(0,r),m=Aw(n);return d("div",{className:qI[`StackedThumbnails-${e}`],style:{"--total":p.length,"--thumbnail-inline-size":ke(m.inlineSize)},children:p.map((t,r)=>{const s=i&&"title"in t?t.title:"",m=u>0&&r===p.length-1,h=l&&c&&!m&&t.quantity>1?t.quantity:void 0;return d("div",{className:qI[`StackedThumbnail-${e}`],style:{"--index":r},children:d(ww,{src:o&&t.image?t.image.one:t.image?.url,srcSet:o&&t.image?`${t.image.one} 1x, ${t.image.two} 2x, ${t.image.four} 4x`:void 0,size:n,depth:$I(r,e),alt:a?t.image?.altText||s:"",totalItems:h,overlay:m?`+${u}`:void 0})},"stableId"in t?t.stableId:`${r}${t.title}`)})})}function HI(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function $I(e,t){return"fan"===t?Math.max(0,Math.min(e,2)):"fan-legacy"===t&&e>0?"legacy":void 0}const YI="ik40Z";function WI(){const{disclosure:{style:e}}=kv(),{open:n}=bC(),{i18n:r,checkout:a,source:i}=ie(),o=VI(),s="base"===e,l=t(()=>!n.value),c=a.proposal.facts.merchandiseLines??[],{value:u}=a.negotiator.current.fields.merchandiseLines,p=Hn(i)?c:u?.lines||[],m=d(oh,{type:n.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return d(Qf,s?{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:YI,children:[d(x,{when:n,fallback:d(Qf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d("span",{className:Se({screenReaders:"only"}),children:r.translate("order_summary.title")}),d(jI,{variant:"inline",size:"small-200",max:3,merchandise:p,useImageAltTexts:!1}),d(qf,{size:"large",fonts:"secondary",type:"strong",children:o})]}),children:d(qf,{color:"subdued",children:r.translate("order_summary.title")})}),d(Qf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d(x,{when:l,children:d(UI,{})}),m]})]}:{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:YI,children:[d(Qf,{direction:"inline",alignItems:"center",gap:"small-200",className:"Tupv7",children:[r.translate("order_summary.title"),m]}),d(UI,{})]})}function GI(){const{checkout:e,embed:n,router:r}=ie();return t(()=>!(!n?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer)&&"/thank-you"===r.currentUrl.value.normalizedPath)}function JI(){const e=GI();return d(x,{when:e,children:d("div",{className:"KwVFv"})})}var KI={PillHint:"_53iem87 _53iem86 _1fragem82 _1fragem9v _1fragempk _1fragemnr _1fragemtg _1fragemrn _1fragem19 _1fragem64 _1fragem11z _1fragem12w",PillHintWrapper:"_53iem8j _1fragempz _1fragemo6 _1fragemtb _1fragemri _1fragem64 _1fragem4q _1fragemzf _1fragem73 _1fragembt",directionVariant:{block:"_53iem8b _53iem88 _1fragem2d",inline:"_53iem8c _53iem89 _1fragem2n",both:"_53iem8d _53iem8a _1fragem2n",none:"_53iem8e"},transitionVariant:{enter:"_53iem80",entering:"_53iem81",entered:"_53iem82",exit:"_53iem83",exiting:"_53iem84",exited:"_53iem85"},iconVariant:{block:"_53iem8f",inline:"_53iem8g",both:"_53iem8h",none:"_53iem8i"}};const XI=({position:e,scrollDirection:t,variant:n})=>{const a=n.content,i=m("none");t&&(t.block&&t.inline?i.value="both":t.block?i.value="block":t.inline&&(i.value="inl
2ine"));const o=r(()=>{const t="start"===e?.scrolledTo.block,n="start"===e?.scrolledTo.inline;return"both"===i.value?t&&n:t||n},[e,i.value]),s=Ad(o??!1,o?"base":"fast");return d("div",{className:KI.PillHintWrapper,children:d("div",{className:v(KI.PillHint,KI.directionVariant[i.value],KI.transitionVariant[s]),children:[a,d(oh,{size:"small",type:"block"===i.value?"arrow-down":"arrow-right",className:KI.iconVariant[i.value]})]})})};var QI={ShadowHint:"eqnwop7 eqnwop6 _1fragemwi _1fragem11k",positionVariant:{inlineStart:"eqnwop8",inlineEnd:"eqnwop9",blockStart:"eqnwopa",blockEnd:"eqnwopb"},transitionVariant:{enter:"eqnwop0",entering:"eqnwop1",entered:"eqnwop2",exit:"eqnwop3",exiting:"eqnwop4",exited:"eqnwop5"}};const ZI=({position:e,scrollDirection:t})=>{const n=Ad((t?.block&&"start"!==e?.scrolledTo.block)??!1,"base"),r=Ad((t?.block&&"end"!==e?.scrolledTo.block)??!1,"base"),a=Ad((t?.inline&&"start"!==e?.scrolledTo.inline)??!1,"base"),i=Ad((t?.inline&&"end"!==e?.scrolledTo.inline)??!1,"base");return d(y,{children:[{name:"blockStart",transition:n},{name:"blockEnd",transition:r},{name:"inlineStart",transition:a},{name:"inlineEnd",transition:i}].map(({name:e,transition:t})=>d("div",{className:v(QI.ShadowHint,QI.positionVariant[e],QI.transitionVariant[t])},e))})},eA=new class{constructor(){this.dimensions=S(null),this.container=null,this.resizeObserver=null,this.initialized=!1}getDimensionsSignal(){return this.initialize(),this.dimensions}cleanup(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null),this.initialized=!1,this.dimensions.value=null}initialize(){if(this.initialized)return;if("undefined"==typeof window||"undefined"==typeof document)return;if(!window.ResizeObserver)return;this.initialized=!0,this.container=document.createElement("div"),this.container.style.cssText="\n      position: fixed;\n      top: -9999px;\n      left: -9999px;\n      visibility: hidden;\n      pointer-events: none;\n    ",this.container.innerHTML='\n      <div class="scrollbar-inline-tester" style="width: 100px; height: 100px; overflow-y: scroll;">\n        <div style="height: 200px;"></div>\n      </div>\n      <div class="scrollbar-block-tester" style="width: 100px; height: 100px; overflow-x: scroll;">\n        <div style="width: 200px;"></div>\n      </div>\n    ',document.body.appendChild(this.container);const e=this.container.querySelector(".scrollbar-inline-tester"),t=this.container.querySelector(".scrollbar-block-tester"),n=()=>{this.dimensions.value={inline:e.offsetWidth-e.clientWidth,block:t.offsetHeight-t.clientHeight}};n(),this.resizeObserver=new ResizeObserver(n),this.resizeObserver.observe(t),this.resizeObserver.observe(e)}},tA=(e,t)=>e?"start":t?"end":null;var nA="_1b9t7ypn _1b9t7ypj _1fragemel",rA="_1b9t7ypo _1b9t7ypk _1fragemf5",aA="_1b9t7ypp _1b9t7ypl _1fragemdh",iA="_1b9t7ypq _1b9t7ypm _1frageme1",oA="_1b9t7yp8",sA="_1b9t7yp9";const lA=Jm(zd(function({accessibilityActiveDescendant:e,accessibilityLabel:a,accessibilityRole:o="generic",accessibilityVisibility:s="visible",background:c="transparent",backgroundHoverAndFocus:u,bleed:p="none",blockSize:h="auto",border:g="none",borderColor:f,borderRadius:_="none",borderStyle:b,borderWidth:k,children:P,className:S,display:w="auto",hint:C={type:"shadow"},id:E,inlineSize:x="auto",maxBlockSize:I="none",maxInlineSize:A="none",minBlockSize:T="0",minInlineSize:L="0",onScroll:N,onScrollable:R,onScrolledToEdge:M,overflow:D="auto",padding:O="none",paddingBlock:z,paddingBlockEnd:B,paddingBlockStart:V,paddingInline:F,paddingInlineEnd:U,paddingInlineStart:q,scrollbarWidth:j="auto",scrollTo:H}){const{Element:$,role:Y}=Zm(o),{className:W,style:G,styleElement:J}=Hm({backgroundColor:c,backgroundColorHoverAndFocus:u,blockSize:h,...Ne({border:g,borderColor:f,borderStyle:b,borderWidth:k}
2),borderRadius:_,display:w,inlineSize:x,maxBlockSize:I,maxInlineSize:A,minBlockSize:T,minInlineSize:L},{transforms:{display:bd}}),{className:K,style:X,styleElement:Q}=Hm({overflow:D,padding:O,paddingBlock:z,paddingInline:F,paddingBlockEnd:B,paddingBlockStart:V,paddingInlineEnd:U,paddingInlineStart:q}),Z=i(null),[ee,te=ee]=D.trim().split(/\s+/),ne=r(()=>({inline:"auto"===te,block:"auto"===ee}),[te,ee]),{scrollPosition:re,scrollDirection:ae,scrollbarVisible:ie,scrollbarDimensions:oe}=((e,a,i,o,s,c)=>{const u=m(null),d=m(null),p=t(()=>{const e=eA.getDimensionsSignal().value;return e&&d.value?i?{inline:d.value.block?e.inline:0,block:d.value.inline?e.block:0}:{inline:0,block:0}:null}),h=t(()=>p.value?{inline:p.value.inline>0,block:p.value.block>0}:null),g=r(()=>$p(()=>{const t=e.current;if(!t)return;const n=u.value,r=d.value;var i,l;d.value=((e,t)=>{const n=e.scrollWidth>e.clientWidth,r=e.scrollHeight>e.clientHeight;return{inline:n&&t.inline,block:r&&t.block}})(t,a),u.value=((e,t)=>{const n=0===e.scrollLeft,r=0===e.scrollTop,a=Math.abs(e.scrollLeft),i=Math.abs(a+e.clientWidth-e.scrollWidth)<1,o=Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<1;return{position:{inline:a,block:e.scrollTop},scrolledTo:{inline:t.inline?tA(n,i):null,block:t.block?tA(r,o):null}}})(t,d.value),"function"==typeof o&&o(u.value),s&&"function"==typeof s&&(i=r,l=d.value,i?.inline!==l.inline||i?.block!==l.block)&&s(d.value),c&&"function"==typeof c&&((e,t)=>{if(!e)return!1;const n=e.scrolledTo.inline!==t.scrolledTo.inline&&null!==t.scrolledTo.inline,r=e.scrolledTo.block!==t.scrolledTo.block&&null!==t.scrolledTo.block;return n||r})(n,u.value)&&c(u.value)},50),[a,o,s,c,d,u,e]),f=n(()=>{g()},[g]);return l(()=>{const t=e.current;if(!t||!("onscroll"in t))return;let n;f(),t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("load",f,!0),t.addEventListener("transitionend",f),t.addEventListener("animationend",f);const r=new Set,a=()=>{if(!n)return;const e=new Set(t.children);for(const t of r)e.has(t)||(n.unobserve(t),r.delete(t));for(const t of e)r.has(t)||(n.observe(t),r.add(t))};window.ResizeObserver?(n=new ResizeObserver(f),n.observe(t),a()):window.addEventListener("resize",f);const i=window.MutationObserver?new window.MutationObserver(()=>{a(),f()}):void 0;return i?.observe(t,{attributes:!n,characterData:!0,childList:!0,subtree:!0}),()=>{n?.disconnect(),i?.disconnect(),t.removeEventListener("scroll",f),window.removeEventListener("resize",f),t.removeEventListener("load",f,!0),t.removeEventListener("transitionend",f),t.removeEventListener("animationend",f)}},[e,f]),{scrollPosition:u.value,scrollDirection:d.value,scrollbarDimensions:p.value,scrollbarVisible:h.value}})(Z,ne,"auto"===j,N,R,M),se="listbox"===o||ae?.inline||ae?.block,le=v(ae?.block&&"start"!==re?.scrolledTo.block&&nA,ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&rA,ae?.inline&&"start"!==re?.scrolledTo.inline&&aA,ae?.inline&&"end"!==re?.scrolledTo.inline&&!ie?.inline&&iA),ce=v("none"!==p&&ae?.block&&"start"!==re?.scrolledTo.block&&oA,"none"!==p&&ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&sA);return l(()=>{if(!H||!Z.current)return;const e="smooth",t=Z.current;if(H instanceof HTMLElement)return void H.scrollIntoView({behavior:e,block:"start",inline:"start"});const n="rtl"===document.dir,r={block:H.block??0,inline:(H.inline??0)*(n?-1:1)};t.scrollTo({behavior:e,top:r.block,left:r.inline})},[H]),d(y,{children:[J,Q,d("div",{"aria-hidden":"hidden"===s||void 0,className:v("_1b9t7yp2 _1b9t7yp1 _1fragemup _1fragemv4 _1fragemws _1fragem64",W,"exclusive"===s&&"_1b9t7yph _1fragem121","product-thumbnails"===p&&"_1b9t7ypa","product-thumbnails-with-badge"===p&&"_1b9t7ypd",ce),style:G,children:[d($,{id:E,role:Y,"aria-activedescendant":e,"aria-label":a,className:v("_1b9t7yp0","none"===j&&"_1b9t7ypi",K,S,"product-thumbnails"===p&&"_1b9t7ypc _1b9t7ypb","product-thumbnails-with-badge"===p&&"_1b9t7ype _1b9t7ypb"),tabIndex:se?0:void 0,style:X,ref:Z,children:P}),d("div",{className:v("_1b9t7ypg _1b9t7ypf _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem11z _1fragem12w",le),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:oe?.inline,marginBlockEnd:oe?.block},children:["pill"===C?.type&&d(XI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j}),"shadow"===C?.type&&d(ZI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j})]})]})]})}));var cA="go06b0";const uA=/<table[\s>]/i;function dA(e){if("undefined"==typeof DOMParser||!uA.test(e))return null;const{body:t}=(new DOMParser).parseFromString(e,"text/html");return t.querySelector("table")?pA(t.childNodes,!1):null}function pA(e,t){const n=[];for(const[r,a]of Array.from(e).entries()){if(a.nodeType===Node.TEXT_NODE){n.push(a.textContent);continue}if(a.nodeType!==Node.ELEMENT_NODE)continue;const e=a,i=e.tagName.toLowerCase(),o={key:r};for(const t of Array.from(e.attributes))o[t.name]=t.value;const s=e.childNodes.length?pA(e.childNodes,t||"table"===i):void 0,l=j(i,o,s);"table"!==i||t?n.push(l):n.push(d(lA,{overflow:"hidden auto",className:"go06b1",children:l},r))}return n}function mA({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const a=xd()?"span":"div",i=e?.__html,o=r(()=>"all"===t&&null!=i?dA(i):null,[t,i]);return"string"==typeof n?d(y,{children:n.split("\n").map((e,t)=>d(y,{children:[t>0&&d("br",{}),e]},`content-${t}}`))}):d(a,o?{className:cA,children:o}:{dangerouslySetInnerHTML:e,className:cA,children:n})}const hA=f(null);function gA(e){return`error-for-${e}`}hA.displayName="SelectContext";function fA({children:e,controlID:t,type:n}){return"warning"===n?d(eh,{id:t?gA(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[d("div",{className:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t",children:d(oh,{type:"info"})}),d(qf,{children:e})]}):d("div",{className:"ksaxnz0 _1fragemxr",id:t?gA(t):void 0,children:e})}function yA(e,t=" "){return e.filter(e=>null!=e&&!1!==e&&""!==e&&0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e&&"object"!=typeof e).join(t)}function vA({children:e}){return d("span",{className:v("rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"),children:e})}var _A={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},transitionVariant:{base:"xpgeoa7 xpgeoa5 _1fragem12e _1fragem12t",animated:"xpgeoa8 xpgeoa6 _1fragem12d _1fragem12q"},Text:"xpgeoa9",visuallyHidden:"xpgeoaa _1fragem121"};function bA({htmlFor:e,label:t,variant:n,className:r}){const a=Ku();return d("label",{id:`${e}-label`,htmlFor:e,className:v(_A.positionVariant[n],"inside"===n&&_A.transitionVariant[a?"animated":"base"],r),children:d("span",{className:_A.Text,children:d(vA,{children:t})})})}const kA={FormLayout:"fjTgn",FormLayoutGroup:"fa7nz",SpacingSmall100:"RV2tT",SpacingBase:"wOVuC",FormLayoutConnected:"_9Mesh",Connectable:"_2g0rh",NotConnectable:"tgYPK",HasErrorOrWarning:"iKgeO"};var PA={Accessory:"_7ozb2u1r _7ozb2u1q _1fragemws _1fragem2d _1fragemyb",accessoryPositionEnd:"_7ozb2u1t",accessoryPositionStart:"_7ozb2u1s",ActualInput:"_7ozb2ur",animatedLabel:"_7ozb2uu",Field:"_7ozb2uq _7ozb2up _1fragemws _1fragemzf _1fragem11y _1fragem12u _1fragem12b",fieldInsetEnd:"_7ozb2u3",fieldInsetStart:"_7ozb2u2",fieldLabelInside:"_7ozb2u10 _7ozb2uz _1fragem12j",fieldLabelInsideTransitionVariant:{base:"_7ozb2ux _7ozb2uv _1fragem12e _1fragem12t",animated:"_7ozb2uy _7ozb2uw _1fragem12d _1fragem12q"},fieldLetterCaseVariant:{uppercase:"_7ozb2u1v"},fieldMultiline:"_7ozb2u18",fieldPrefixed:"_7ozb2u14 _7ozb2u13 _1fragem12o",fieldPrefixSpacing:{small:"_7ozb2u15",base
2:"_7ozb2u16"},fieldTypeVariant:{number:"_7ozb2u19",tel:"_7ozb2u1a",text:"_7ozb2u1b",email:"_7ozb2u1c",url:"_7ozb2u1d",password:"_7ozb2u1e"},FieldWrapper:"_7ozb2un",fieldWrapperMultiline:"_7ozb2uo",floatingLabelOnContent:"_7ozb2us",floatingLabelOnFocus:"_7ozb2ut",Icon:"_7ozb2u1i _7ozb2u1h _1fragemws _1fragem2d",iconPositionVariant:{start:"_7ozb2u1j",end:"_7ozb2u1k"},MultilineClone:"_7ozb2u1g _7ozb2u1f _1fragem6y",Prefix:"_7ozb2u1m _7ozb2u1l _1fragemws _1fragem2d",prefixInside:"_7ozb2u1n",segmentVariant:{start:"_7ozb2u0",end:"_7ozb2u1"},setFieldLabelIsNotVisible:"_7ozb2u17",Suffix:"_7ozb2u1p _7ozb2u1o _1fragemws _1fragem2d",TextField:"_7ozb2ub _7ozb2ua _1fragemyl _1fragemws _1fragem6t _1fragem133 _1fragemye _1fragem12j _1fragem12d _1fragem12q",textFieldBorderVariant:{none:"_7ozb2uk",full:"_7ozb2ul",blockEnd:"_7ozb2um"},textFieldColorLayerVariant:{control:"_7ozb2ue _7ozb2uc _1fragemy6",controlInvalid:"_7ozb2uf _7ozb2ud _1fragemy7"},textFieldDisabled:"_7ozb2uh _7ozb2ug _1fragemyc _1fragem11z _1fragem11v",textFieldError:"_7ozb2u8",textFieldFocused:"_7ozb2u9",textFieldReadOnly:"_7ozb2uj _7ozb2ui _1fragem11w",withTypography:"_7ozb2u1u",Wrapper:"_7ozb2u5 _7ozb2u4 _1fragem7s _1fragem9l _1fragemws _1fragem6t",wrapperLabelInside:"_7ozb2u7 _7ozb2u6 _1fragemy6",wrapperVarsSetter:{labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},inert:"_7ozb2u1w _1fragemz0"};const SA=$c("TextField"),wA={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},CA=_(function({accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControls:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f="on",autoCorrect:_,autoFocus:b,controlledValue:k,defaultValue:P,disabled:S,error:w,icon:C,id:E,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T="visible",labelPosition:L,labelWhenEmpty:N,letterCase:R,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:V,onChange:F,onFocus:U,onInput:q,onInputCommit:j,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G="base",readOnly:J,required:K,role:X,rows:Q,segment:Z,step:ee,suffix:te,type:ne="text",value:re},ae){const{control:{border:ie,labelPosition:oe="inside"},textField:{border:se}}=Gm(),le=Ku(),ce=se||ie||"full",ue=L??oe,de=Cd(),pe=null==re?void 0:re,me=null==k?void 0:k,he=Yc(E,SA),ge=e?`${he}-description`:void 0,fe=ge?d(qf,{accessibilityVisibility:"exclusive",id:ge,children:e}):null,[ye,ve]=s(!1),[_e,be]=function(e){const t=function(e){if(null!=e){if("object"==typeof e&&"value"in e){if(null==e.value)return;return String(e.value)}return String(e)}}(e),[n,r]=s(t),a=i(t),o=i(e);let l=n;return a.current!==t&&(a.current=t,r(t),l=t),"object"==typeof e&&o.current!==e&&r(t),o.current=e,[l,r]}(me??pe),ke=n(e=>{q?.(e),be(e)},[q,be]),Pe=function(e,t){if("boolean"!=typeof e)return void 0!==e&&Boolean(e)?d(fA,{controlID:t,type:"warning"===IA(e)?"warning":void 0,children:e&&"object"==typeof e&&"value"in e?e?.value:e}):null}(w,he),Se=Boolean(w)&&"warning"!==IA(w),we=v(PA.TextField,PA.textFieldColorLayerVariant[Se?"controlInvalid":"control"],PA.textFieldBorderVariant[ce],(S||de)&&PA.textFieldDisabled,de&&PA.inert,J&&PA.textFieldReadOnly,ye&&PA.textFieldFocused,Se&&PA.textFieldError,Z&&PA.segmentVariant[Z]),Ce=A&&"visible"===T;let Ee=PA.floatingLabelOnContent;"outside"===ue?Ee=_A.floating:W&&(Ee=PA.floatingLabelOnFocus);const xe="outside"!==ue&&!Q&&"full"===ce,Ie=xe&&Boolean(w);return d(y,{children:d("div",{className:v(PA.Wrapper,PA.wrapperVarsSetter["outside"===ue?"labelOutside":"labelInside"],"inside"===ue&&PA.textFieldColorLayerVariant[w?"controlInvalid":"control"],"inside"===ue&&PA.wrapperLabelInside,Ce&&Ee,xe?kA.Connectable:kA.NotConnectable,Ie&&kA.HasErrorOrWarning,le&&PA.animatedLabel),children:[Ce&&"outside"===ue&&d(bA,{variant:"outside",htmlFor:he,label:A}),A&&"exclusive"===T&&d("label",{id:`${he}-label`,htmlFor:he,className:_A.visuallyHidden,children:A}),d("div",{className:we,children:[fe,Ce&&"inside"===ue&&d(bA,{variant:"inside",htmlFor:he,label:A}),d(xA,{accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControl
2s:l,ariaDescribedBy:ge,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f,autoCorrect:_,autoFocus:b,controlledValue:k,defaultValue:P,disabled:S,error:w,icon:C,id:he,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T,labelPosition:ue,labelWhenEmpty:N,letterCase:R,localValue:_e,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:()=>{ve(!1),V?.()},onChange:F,onFocus:()=>{ve(!0),U?.()},onInput:ke,onInputCommit:j,onKeyDown:H??function(e){void 0===Q&&F&&"Enter"===e.key&&F(e.currentTarget.value)},onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,ref:ae,required:K,role:X,rows:Q,step:ee,suffix:te,type:ne,value:re})]}),Pe]})})}),EA=CA,xA=_(function({accessoryEnd:e,accessoryStart:t,ariaActiveDescendant:r,ariaAutocomplete:o,ariaControls:s,ariaDescribedBy:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f,autoCorrect:_,autoFocus:b,disabled:k,labelWhenEmpty:P,error:S,icon:w,id:C,disablePasswordManagers:E,inputMode:x,label:I,labelAccessibilityVisibility:A,labelPosition:T,letterCase:L,localValue:N,max:R,maxLength:M,min:D,minLength:O,name:z,onBlur:B,onChange:V,onFocus:F,onInput:U,onInputCommit:q,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,required:K,role:X,rows:Q,step:Z,suffix:ee,type:te,value:ne},re){const ae=Ef({active:Boolean(S)&&Boolean("warning"!==IA(S))}),ie=i(),oe=n(e=>{"function"==typeof re?re(e):re&&(re.current=e),ie.current=e,ae.current=e,e&&(N?e.value!==N:e.value!==(ne??""))&&e.dispatchEvent(new Event("input"))},[re,ae]),se=kf(),le=Sd(),ce=Cd();a(()=>{b&&!ce&&ie.current?.focus()},[b,ce]);const{control:{labelPosition:ue="inside"}}=Gm(),de=T??ue,pe=Ku(),me="object"==typeof w?w.source:w,he="object"==typeof w?w.position??"start":"start",ge=""!==me&&me&&d("div",{className:v(PA.Icon,PA.iconPositionVariant[he]),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:d(oh,{type:me})}),fe=I&&"visible"===A,ye="email"===te||f?.split(/\s+/).includes("email"),ve=Boolean(ye)||"tel"===te||"number"===te,_e=(!te||"text"===te)&&Boolean(N);let be;be=ve?"ltr":_e?"auto":void 0;const ke=W&&d("div",{id:`${C}-prefix`,className:v(PA.Prefix,PA.withTypography,fe&&"inside"===de&&PA.prefixInside),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:W}),Pe=v(PA.Field,"inside"===de&&PA.fieldLabelInside,"inside"===de&&PA.fieldLabelInsideTransitionVariant[pe?"animated":"base"],Boolean(W)&&PA.fieldPrefixed,Boolean(G)&&PA.fieldPrefixSpacing[G],Boolean(!fe)&&PA.setFieldLabelIsNotVisible,Boolean(W||t||ge&&"start"===he)&&PA.fieldInsetStart,Boolean(ee||e||ge&&"end"===he)&&PA.fieldInsetEnd,Boolean(Q)&&PA.fieldMultiline,L&&PA.fieldLetterCaseVariant[L],te&&PA.fieldTypeVariant[te],PA.withTypography),Se=l||S?yA([l,S&&gA(C)]):void 0,we=x??("number"===te?"decimal":void 0),Ce=W?` ${C}-prefix`:"",Ee=ee?` ${C}-suffix`:"",xe=P??I;let Ie;"outside"===de?Ie=Y:pe&&fe?Ie=W?xe:" ":pe||"visible"!==A||(Ie=xe);const Ae=j(Q?"textarea":"input",{...E?wA:void 0,id:C,min:D,max:R,step:Z,maxLength:M,minLength:O,name:z,placeholder:Ie,className:v(Pe,PA.ActualInput),required:K,type:Q?void 0:te,disabled:k,readOnly:J,inputMode:we,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":s,"aria-owns":h,"aria-describedby":Se,"aria-expanded":c,"aria-hidden":!!ce||void 0,"aria-invalid":Boolean(S)&&"warning"!==IA(S)?"true":void 0,"aria-label":p,"aria-live":m,"aria-required":K,"aria-labelledby":I?`${C}-label${Ce}${Ee}`:void 0,"aria-haspopup":u,onBlur:({currentTarget:{value:e}})=>{se.current&&(e!==(ne||"")&&V?.(e),B?.())},onChange(e){const{currentTarget:{value:t}}=e,n=e.nativeEvent??e,{isTrusted:r}=n,a="inputType"in n?n.inputType:void 0;"insertCompositionText"!==a&&"deleteCompositionText"!==a&&q?.(t),r&&a||V?.(t),U?.(t)},onFocus:()=>{F?.()},onKeyDown:H,onWheel:$,ref:oe,role:X,rows:Q,value:N??"",autoComplete:f,autoFocus:b&&!ce,form:le?.nested?le.id:void 0,tabIndex:ce?-1:void 0,autoCorrect:_,autoCapitalize:g,dir:be}),Te=!0===Boolean(Q)&&d("div",{"aria-hidden":"true",className:v(PA.MultilineClone,Pe),dir:be,children:[N," "]}),Le=v(PA.FieldWrapper,Boolean(Q)&&PA.fieldWrapperMultiline),Ne=Q?d("div",{className:Le,children:[Ae,Te]}):Ae,Re=ee&&d("div",{id:`${C}-suffix`,className:v(PA.Suffix,PA.withTypography),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:ee}),Me=t&&d("div",{className:v(PA.Accessory,PA.accessoryPositionStart),children:t}),De=e&&d("div",{className:v(PA.Accessory,PA.accessoryPositionEnd),children:e});return d(y,{children:[ge,ke,Ne,Me,Re,De]})});function IA(e){if(e&&"object"==typeof e&&"type"in e)return e.type}var AA={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},TA={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const LA={Wrapper:"RD23h",SelectWrapper:"VZudx","Label-positionInside":"QCxaD",LabelText:"XDBWz","Label-isFloating":"A9HkF",Select:"ZHJU6","Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:"_87H7J","Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:"VXrUd","Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},NA=$c("Select");function RA({children:e,id:t,name:a,label:i,value:o="",disabled:l,readOnly:c,required:u,error:p,autocomplete:m="on",placeholder:h,onChange:g,onBlur:f,onF
2ocus:_}){const b=Sd(),{control:{border:k,labelPosition:P="inside"},select:{border:S}}=Gm(),w=Cd(),C=Ef({active:Boolean(p)&&Boolean("warning"!==IA(p))}),E=Yc(t,NA),x=S||k||"full",I=void 0!==p&&Boolean(p)&&d(fA,{controlID:E,type:"warning"===IA(p)?"warning":void 0,children:p&&"object"==typeof p&&"value"in p?p?.value:p}),A=Boolean(p)&&"warning"!==IA(p),T=v(LA.Select,TA.Select,A&&LA.hasError,(l||w)&&LA["Select-isDisabled"],w&&TA.inert,c&&LA["Select-isReadOnly"],LA[H("Select-border",x)]),[L,N]=s(0),R=Boolean(L),M=Boolean(h&&h!==i)||R,D=""!==o||M,O=d("label",{className:v(LA.Label,LA[H("Label-position",P)],D&&LA["Label-isFloating"]),htmlFor:E,children:d("span",{className:v(LA.LabelText),children:d(vA,{children:i})})}),z=n(()=>{N(e=>e+1)},[]),B=n(()=>{N(e=>e-1)},[]),V=r(()=>({readOnly:c,registerEmptyValueOption:z,unregisterEmptyValueOption:B}),[c,z,B]),F=d("div",{children:["outside"===P?O:null,d("div",{className:v(LA.SelectWrapper,TA.selectColorLayerVariant[A?"controlInvalid":"control"]),children:["inside"===P&&O,d(hA.Provider,{value:V,children:d("select",{name:a,id:E,disabled:l,onChange:e=>{const t=e.target.value;g?.(t)},required:u,value:o,className:T,"aria-describedby":p?gA(E):void 0,"aria-invalid":p&&"warning"!==IA(p)?"true":void 0,"aria-hidden":!!w||void 0,autoComplete:m,tabIndex:w?-1:void 0,ref:C,onBlur:()=>{f?.()},onFocus:()=>{_?.()},form:b?.nested?b.id:void 0,children:[h&&(U=o,""===U||null==U||h!==i)&&d("option",{value:"",hidden:h===i,disabled:!0,children:h===i?d(y,{children:" "}):h}),e]})}),d("div",{className:v(LA.Selector),children:d(oh,{type:"chevronDown",size:"small-200"})})]})]});var U;const q="outside"!==P&&"full"===x,j=q&&Boolean(p);return d(y,{children:d("div",{className:v(LA.Wrapper,"inside"===P&&TA.selectColorLayerVariant[A?"controlInvalid":"control"],AA["outside"===P?"labelOutside":"labelInside"],q?kA.Connectable:kA.NotConnectable,j&&kA.HasErrorOrWarning),children:[F,I]})})}function MA({children:e,id:t,value:n,disabled:r,alternateValues:a,accessibilityLabel:i}){const o=h(hA),{registerEmptyValueOption:s,unregisterEmptyValueOption:c}=o??{},u=""===n;return l(()=>{if(u&&s&&c)return s(),()=>{c()}},[u,s,c]),o?d("option",{id:t,value:n,disabled:r||o.readOnly,...a?.length&&{"data-alternate-values":JSON.stringify(a)},"aria-label":i,children:e}):(console.warn(`Unable to render Option (id: ${t}). Please verify it is a child of a Select.`),null)}var DA={PressButton:"_1n78kje1 _1n78kje0 _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragempf _1fragemr8 _1fragemnm _1fragemt1 _1fragem1y _1fragemws _1fragemyd _1fragem126 _1fragem128 _1fragem12n _1fragem12d _1fragem12p _1fragem6o _1fragemcn _1fragem11y _1fragem12u _1fragem12v",loading:"_1n78kje2 _1fragemyb _1fragem11z",disabled:"_1n78kje3 _1fragemyb _1fragem11z _1fragem11v",pressed:"_1n78kje4",inert:"_1n78kje5 _1fragemz0",inlineSizeVariant:{fill:"_1n78kje8 _1n78kje6 _1fragemzf _1fragem124 _1fragembj",fitContent:"_1n78kje9 _1n78kje7 _1fragemzg _1fragem124"},Content:"_1n78kjeh _1n78kjeg _1fragem11z _1fragem12j _1fragem12d _1fragem12q",LoadingContent:"_1n78kjej _1n78kjei _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",transitionVariant:{entered:"_1n78kjea",exit:"_1n78kjeb",exiting:"_1n78kjec",enter:"_1n78kjed",entering:"_1n78kjee",exited:"_1n78kjef"}};const OA=_(function({accessibilityLabel:e,id:t,children:n,inlineSize:r="auto",lang:a,loading:i,disabled:o=!1,pressed:s=!1,onClick:l,onBlur:c,onFocus:u},p){const m=Dp(p),h=Cd(),g="auto"===r?"fit-content":r,f=Qu(),y=Ad(i??!1,{enter:"slow"}),_=d("span",{className:v(DA.LoadingContent),dir:"auto",children:d(Bf,{accessibilityLabel:f("processing")})}),b=gw(n)&&d("span",{className:v(DA.Content),"aria-hidden":i||void 0,children:n});return d(Ed.Provider,{value:!0,children:d("button",{type:"button",id:t,"aria-pressed":s,"aria-busy":i,"aria-label":i?void 0:e,"aria-live":i?"polite":"off","aria-hidden":!!h||void 0,lang:a,onClick:e=>{e?.preventDefault(),l?.(!s)},onBlur:c,onFocus:u,className:v(DA.PressButton,DA.inlineSizeVariant[Pe(g)],s&&DA.pressed,(o||h)&&DA.disabled,h&&DA.inert,i&&[DA.loading,DA.transitionVariant[y]]),disabled:o||i,tabIndex:h?-1:void 0,ref:m,children:[b,i&&_]})})}),zA={small:"35%",base:"50%",large:"65%",fill:"100%"};function BA({content:e,delay:t,id:n,lastLineSize:a,lines:i=1,size:o}){const s=r(()=>function(){const e=Object.keys(zA);return e[Math.floor(Math.random()*e.length)]}(),[]);return d(cx,{id:n,size:o,textAlign:"justify",children:e?d(Dw,{delay:t,children:e}):Array.from({length:i},(e,n)=>
2d(Dw,{delay:t,inlineSize:zA[n===i-1?a??(1===i?"fill":s):"fill"]},n))})}const VA=new Set(["http:","https:"]);function FA({children:e}){const t=function(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:r}=ie(),a=n(e=>{const n=e.target?.closest?.("a");if(!n)return;const a=n.href;let i;try{i=new URL(a).protocol}catch{return}if(!VA.has(i))return;const o=n.getAttribute("href");o?.startsWith("#")||t?.client?.windowOpenRequest&&(e.preventDefault(),t.client.windowOpenRequest(a).catch(e=>{r.log("window_open_delegation_error","Window open delegation failed in delegated HTML content",{url:a,error:e instanceof Error?e.message:String(e)})}))},[t,r]);if(e)return a}();return t?d("div",{onClick:t,children:e}):d(y,{children:e})}const UA={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},qA={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},jA=p_(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:a,policies:i})=>{const o=Li(i),s=k(()=>Object.values(o));function l(e){return Array.from(o[e]?.policies.values()??[])}function c(){return o[a.shopId]?.policies.get(a.handle)??i[0]??a}const u=S(!1),d=S(!1),p=S(c()),m=k(()=>l(p.value.shopId)),h=k(()=>p.value.shopId),g=k(()=>p.value.sessionToken??""),f=k(()=>n.id===h.value),y=e.query(UA,{variables:()=>({handle:p.value.handle}),skip:()=>!f.value||!u.value}),v=e.query(qA,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>f.value||!u.value}),_=k(()=>
2{if(f.value)return y.data.value?.shop?.merchantPolicies[0]?.body;const e=v.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[];return e.find(e=>e.handle===p.value.handle)?.body}),b=k(()=>f.value?y.error.value:v.error.value),P=k(()=>f.value?y.loading.value:v.loading.value),w=fl(P.value,(e,t)=>e&&!t&&u.peek()&&d.peek()&&"undefined"!=typeof document&&null!==document.querySelector(yl),["modal-content-cross-fade"]);return O(()=>{w.value=P.value}),O(()=>{b.value&&t.error(b.value)}),{error:b,loading:w,policyBody:_,selectedPolicy:k(()=>p.value),selectedShopPolicies:m,shops:s,show(){d.value=!1,p.value=c(),r&&(r.value="footerContent"),u.value=!0},afterShow(){d.value=!0},hide(){d.value=!1,u.value=!1,r&&(r.value="none")},selectShop(e){const t=p.peek(),n=l(e),r=n.find(e=>e.handle===t.handle)??n[0]??t;r!==t&&cl(()=>{p.value=r},["modal-content-cross-fade"])},selectPolicyHandle(e){const t=p.peek(),n=m.value.find(t=>t.handle===e)??m.value[0]??t;n!==t&&cl(()=>{p.value=n},["modal-content-cross-fade"])}}});function HA({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:a,embed:i,checkout:{negotiator:o}}=ie(),{checkoutProtocolModalEventSignal:s}=o.context,{localPolicies:l,localPoliciesWithContent:c,remotePolicies:u}=Ni(),p=r.hasFlagEnabled(Ri),m=u.length>0?[...l,...u]:c,h=p&&m.some(({shopId:e,handle:n})=>e===t.shopId&&n===t.handle)?m:[t],g=p?n.translate("shop_policies.terms_and_policies"):t.name,f=a.variant.isStandard()||i?.isCheckoutKit(),y=p?"@media (inline-size >= extraSmall) 600px, 90%":f?"100%":void 0,{error:v,loading:_,policyBody:b,selectedPolicy:k,selectedShopPolicies:P,shops:S,show:w,afterShow:C,hide:E,selectShop:I,selectPolicyHandle:A}=Vn(jA,{checkoutProtocolModalEventSignal:s,defaultPolicy:t,policies:h}),T=S.value.length>1||S.value.some(e=>e.policies.size>1),L=()=>d(FA,{children:d(mA,{dangerouslySetInnerHTML:{__html:b.value??""},scrollableContent:"all"})}),N=d(x,{when:()=>!v.value,fallback:n.translate("bad_request.title"),children:d(x,{when:()=>!_.value,fallback:d(Qf,{"aria-busy":!0,gap:"base",children:[d(BA,{delay:!1,lines:3,lastLineSize:"small"}),d(BA,{delay:!1,lines:3,lastLineSize:"large"}),d(BA,{delay:!1,lines:3,lastLineSize:"small"}),d(BA,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>T||k.value.shopId!==r.id?d(x,{when:()=>b.value,fallback:d(qf,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:k.value.name,shop_name:k.value.shopName})}),children:L}):L()})});return d(Hx,{id:e,onShow:w,onAfterShow:C,onHide:E,heading:g,blockSize:y,children:[d(Df,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:_.value?n.translate("general.loading"):null}),T?d(Qf,{gap:"base",children:[d(x,{when:()=>S.value.length>1,children:d(Qf,{direction:"inline",gap:"base",children:S.value.map(e=>d(OA,{pressed:k.value.shopId===e.shopId,onClick:()=>I(e.shopId),children:d(Qf,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:d(qf,{children:e.shopName})})},e.shopId))})}),d(x,{when:()=>P.value.length>1,children:d(RA,{value:k.value.handle,label:n.translate("shop_policies.policy_label"),onChange:A,name:"policy",children:P.value.map(e=>d(MA,{value:e.handle,children:e.name},e.handle))})}),N]}):N]})}function $A(e){return!!(e&&"liability"in e&&e.liability)&&("MARKETPLACE"===e.liability||"MERCHANT"===e.liability)}function YA({liability:e}){const{i18n:t,shop:n}=ie(),{footer:{alignment:r}={}}=kv();switch(e){case"MARKETPLACE":return d(cx,{size:"small",color:"subdued",textAlign:r,children:t.translate("tax.attribution.orders_sold_by_shop_marketplace")});case"MERCHANT":return d(cx,{size:"small",color:"subdued",textAlign:r,children:t.translate("tax.attribution.orders_sold_by_shop_name",{shop_name:n.name})});default:return null}}var WA={Checkbox:"_1mmswk94 _1mmswk93 _1fragemws _1fragemyo",Details:"_1mmswk9s",Error:"_1mmswk9l",Icon:"_1mmswk9n _1mmswk9m _1fragem11z _1fragem11k _1fragemwi _1fragem12d _1fragem12t _1fragem12j",Input:"_1mmswk98 _1mmswk97 _1fragemzq _1fragemzo _1fragemzs _1fragemzm _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragemyk _1fragem133 _1fragem5u _1fragemzf _1fragem4q _1fragem12j _1fragem12d _1fragem12q",Label:"_1mmswk9g _1mmswk9f _1fragem5u _1fragemvo _1fragemtb",Wrapper:"_1mmswk96 _1mmswk95 _1fragemws _1fragem64",colorLayerControl:"_1mmswk99 _1fragemy6",inputStateVariant:{default:"_1mmswk9d _1mmswk9b _1fragemyd",disabled:"_1mmswk9e _1mmswk9c _1fragem11v _1fragem11z _1fragemyb"},inputError:"_1mmswk9a",labelAndDetailsStateVariant:{default:"_1mmswk9j _1mmswk9h _1fragemyd",disabled:"_1mmswk9k _1mmswk9i _1fragem11v _1fragemyb"},accessibilityVisibilityVariant:{visible:"_1mmswk9p",exclusive:"_1mmswk9q _1mmswk9o _1fragem121"},inert:"_1mmswk9r _1fragemz0"};const GA=$c("Checkbox"),JA=fm(_(function({accessibilityLabel:e,disabled:t,error:n,id:r,label:a,name:i,details:o,...s},l){const c=Yc(r,GA),u=Cd(),p="string"==typeof n&&Boolean(n.trim())&&d("div",{className:WA.Error,children:d(fA,{controlID:c,children:n})}),m=v(WA.Label,WA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&WA.inert),h=("string"==typeof a||gw(a))&&d("label",{htmlFor:c,className:m,children:a}),g="string"==typeof o||gw(o),f=g?`${c}-details`:void 0,y=v(WA.Details,WA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&WA.inert),_=g&&d("div",{id:f,className:y,children:o});return d("div",{children:[d("div",{className:WA.Wrapper,children:[d(KA,{id:c,name:i,error:Boolean(n),accessibilityLabel:e,disabled:t,ref:l,ariaDescribedBy:f,...s}),h]}),_,p]})}),{commands:{clipboard:!1,overlay:!1}}),KA=_(function({accessibilityLabel:e,checked:t,colorLayer:n,disabled:r,error:a=!1,id:i,name:o,onChange:s,required:l,value:c,accessibilityVisibility:u,ariaDescribedBy:p,command:m,commandFor:h,...g},f){const y=Cd(),_=Op(f,Ef({active:a})),b="inherit"!==n,k=v(WA.Input,a&&WA.inputError,WA.inputStateVariant[r||y?"disabled":"default"],y&&WA.inert);return d("div",{className:v(WA.Checkbox,b&&WA.colorLayerControl,u&&WA.accessibilityVisibilityVariant[u]),children:[d("input",{type:"checkbox",id:i,name:o,checked:t,value:c,disabled:r,onChange:({currentTarget:e})=>{"function"==typeof s&&s(e.checked)}
2,className:k,"aria-describedby":[p,a&&gA(i)].filter(Boolean).join(" ")||void 0,"aria-label":e||void 0,"aria-hidden":!!y||void 0,"aria-invalid":a||void 0,tabIndex:y?-1:void 0,ref:_,required:l,...g}),d("div",{className:WA.Icon,children:d(oh,{type:"check",size:"small-200"})})]})}),XA="gid://shopify/App/580111";function QA(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function ZA(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return null!=n&&null!=r&&QA({namespace:n,key:r},t)}function eT(e,t){return e?.find(e=>QA(e,t))?.value}function tT(e,t){for(let n=e.length-1;n>=0;n--)if(ZA(e[n],t))return n;return-1}function nT({key:e,label:t,required:a},{type:s,validate:l=()=>{}}){const{checkout:{proposal:c},i18n:u}=ie(),d=ic(),p=Di(e),m=Oi(),h=function({namespace:e,key:t,type:n}){const{checkout:{proposal:a}}=ie(),i=a.proposed.cartMetafields,o=a.negotiated.fields.cartMetafields;return r(()=>{const r={namespace:e,key:t,type:n};return new Mi(k(()=>function(e,t){const n=e[tT(e,t)];if(n)return n.delete?"":n.update?.value}(i.value,r)??eT(o.value,r)??""),e=>{i.value=function(e,t,n){const{namespace:r,key:a,type:i}=t,o=""===n.trim()?{delete:{appId:XA,namespace:r,key:a}}:{update:{appId:XA,namespace:r,key:a,type:i,value:n}},s=tT(e,t);return-1===s?[...e,o]:e.map((e,t)=>t===s?o:e)}(i.peek(),r,e)})},[t,e,o,i,n])}({...p,type:s}),g=i(),{handleViolations:f}=function(e,t){const{checkout:{negotiator:r}}=ie(),{customFields:a}=r.current.fields,{lastJourneyProgression:i}=r,s=n(n=>{const r=function(e,t,n){const r=t?.findIndex(e=>e.key===n)??-1;if(-1===r)return;const a=`$.customFields[${r}]`;return e.find(e=>"UnprocessableTermViolation"===e.__typename&&e.code.startsWith("CUSTOM_FIELD")&&e.target===a)}(n,a.value,e);r&&!t.value&&(t.value=r.localizedMessage||r.nonLocalizedMessage)},[a,t,e]);return P(()=>{const e=i.value;"error"===e.type&&"negotiation"!==e.negotiationStage&&o(()=>s(e.violations))}),{handleViolations:n(e=>{"error"===e.status&&s(e.violations)},[s])}}(e,m);zi(h,m,l,Wt.InvalidCustomFieldValue);const y=a.value;return{value:h,error:m,fieldProps:{label:y?t.value:u.translate("custom_field.label",{label:t.value}),name:e,required:y},negotiate:()=>{const e=h.peek();e!==(g.current??eT(c.negotiated.fields.cartMetafields.peek(),p)??"")&&!m.peek()&&(g.current=e,d.negotiate({fieldsToResolve:["cartMetafields","customFields"],silenceViolations:[...nr],onComplete:f}))}}}function rT({field:{description:e,heading:t,key:n},children:r}){const a=e.value;return d(Qf,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?d(TS,{children:t}):null,a?d(qf,{color:"subdued",children:a}):null,r]})}function aT({field:e}){const t=function({required:e,requiredErrorMessage:t}){const{i18n:r}=ie();return n(n=>{if(e.value&&"true"!==n)return t.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required")},[r,e,t])}(e),{value:r,error:a,fieldProps:i,negotiate:o}=nT(e,{type:"boolean",validate:t}),s="string"==typeof a.value?a.value:void 0;return d(rT,{field:e,children:d(JA,{label:e.label.value,name:i.name,required:i.required,
2checked:"true"===r.value,error:s,onChange:e=>{const n=String(e);r.value=n,a.value=t(n),o()}})})}function iT({field:e}){const{i18n:t}=ie(),r=function({choices:e,required:t,requiredErrorMessage:r}){const{i18n:a}=ie();return n(n=>{if(""===n.trim()){if(!t.value)return;return r.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}if(!e?.some(e=>e.value===n))return a.translate("field_errors.custom_field.cart_metafield_invalid_choice")},[e,a,t,r])}(e),{value:a,error:i,fieldProps:o,negotiate:s}=nT(e,{type:"single_line_text_field",validate:r});return d(rT,{field:e,children:d(RA,{label:o.label,name:o.name,required:o.required,value:a.value,error:"string"==typeof i.value?i.value:void 0,onChange:e=>{a.value=e,i.value=r(e),s()},children:[d(MA,{value:"",disabled:o.required,children:t.translate("custom_field.choice_placeholder")}),e.choices?.map(({label:e,value:t})=>d(MA,{value:t,children:e},t))]})})}const oT=w({displayName:"AsyncDateField",suspense:!1,load:()=>C(()=>dl(async()=>{const{DateField:e}=await(import("./b538640d.DMi6wBw8.js"));return{DateField:e}},__vite__mapDeps([237,2,26,27,3,4,1,5,28,29,30,7,8,9,10,11])).then(({DateField:e})=>e)),useError:WE("DateField"),renderLoading:({field:e})=>d(sT,{field:e})});function sT({field:e}){const{value:t,fieldProps:n}=nT(e,{type:"date"});return d(rT,{field:e,children:d(EA,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:d(oh,{type:"calendar"})})})}const lT=_(function({autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:a,id:i,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:p,onChange:m,onFocus:h,onInput:g,placeholder:f,readOnly:y,required:v,rows:_=2,value:b},k){return d(CA,{autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:a,id:i,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:p,onChange:m,onFocus:h,onInput:g,placeholder:f,readOnly:y,ref:k,required:v,rows:_>0?_:1,value:b})});function cT(e,t){const{value:n,error:r,fieldProps:a,negotiate:i}=nT(e,t),o=Bi(n,r,t.validate);return{validatedInput:o,fieldProps:a,persist:()=>{o.onBlur(),i()}}}function uT({field:e}){const t="MULTILINE_TEXT"===e.type,r=function({required:e,requiredErrorMessage:t,validations:r}){const{i18n:a}=ie(),{minLength:i,maxLength:o}=r;return n(n=>{if(""===n.trim()){if(!e.value)return;return t.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}const r=[...n].length;return null!=i&&r<i?a.translate("field_errors.custom_field.cart_metafield_value_too_short"):null!=o&&r>o?a.translate("field_errors.custom_field.cart_metafield_value_too_long"):void 0},[a,o,i,e,t])}(e),{validatedInput:a,fieldProps:i,persist:o}=cT(e,{type:t?"multi_line_text_field":"single_line_text_field",validate:r});return d(rT,{field:e,children:d(t?lT:EA,{...a,label:i.label,name:i.name,required:i.required,onBlur:o})})}function dT({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return d(uT,{field:e});case"DATE":return d(oT,{field:e});case"CHOICE":return d(iT,{field:e});case"BOOLEAN":return d(aT,{field:e});default:return null}}const pT=w({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>Ya(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>dl(()=>import("./49758c58.BZmxmRcY.js"),__vite__mapDeps([238,2,1,3,4,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,9,41,42,43,44,45,46,47,48,49,50,67,16,8,15,51,52,7,10,11,239]))}),mT="OyeF5",hT="XYPMc",gT=e=>d(Df,{children:e}),fT=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:a})=>{const i=e&&n?d(Qf,{gap:e,children:t}):d(y,{children:t});return r||a?d("div",{className:v({[mT]:r,[hT]:a}),style:{...r&&{"--extensions-margin-block-start":ye.spacing[r]},...a&&{"--extensions-margin-block-end":ye.spacing[a]}},children:i}):d(y,{children:i})};function yT({customizations:e,gap:t,options:n,transformComponents:r,render:a=gT,marginBlockStart:i,marginBlockEnd:o}){return 0===e.length?null:d(fT,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:o,children:e.map(e=>"uiExtension"===e.kind?d(pT,{options:n,extension:e.extension,transformComponents:r,render:a},e.extension.id):d(dT,{field:e.field},e.field.key))})}const vT=e=>d("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[d("path",{d:"M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#fff"}}),d("path",{d:"M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7m-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#06f"}}),d("path",{d:"M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8s-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0s-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2
2-.6 0-.8s.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0",style:{fill:"#fff"}}),d("path",{d:"M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8s.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0",style:{fill:"#06f"}})]});function _T(){const{shopPay:e,i18n:t}=ie(),{footer:{content:{typography:n}={}}={}}=kv(),r=e.user.isAuthenticatedUser.value?"https://privacy.shopify.com/ads-sharing/opt-out/new":"https://privacy.shopify.com",a=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:d("span",{className:"mMltV"}),privacy_link_logo:d(vT,{"aria-hidden":"true",focusable:"false",className:"HTJIw"})}),i=d(Kf,{href:r,target:"_blank",display:"block",children:a});return n?d(qf,{size:n.size,color:n.color,type:"bold"===n.weight?"strong":void 0,children:i}):i}const bT=w({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>dl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.CddL1Ehx.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([80,2,1,3,4,5,39,40,7,8,9,10,11])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function kT(){const e=Tt(),{checkout:{identity:n},consentManager:r}=ie();return t(()=>e.value&&"shopPay"!==n.current.value&&r.shouldShowBanner.value)}const PT=$c("DelegatedLinkModal");function ST(e){const t=Array.isArray(e)?e:[e],n=new Map;return t.map(e=>{if("string"!=typeof e&&"number"!=typeof e)return e;const t=String(e),r=(n.get(t)??0)+1;return n.set(t,r),d(qf,{color:"subdued",children:e},`${t}-${r}`)})}function wT(){const{embed:e,i18n:t,checkout:{configuration:n,proposal:r},shop:a}=ie(),{name:i}=a,o=cC(),{currentDetour:s}=ac().value,l=kT(),{footer:{alignment:c,content:{visibility:u,typography:p}={}}={}}=kv(),{localPolicies:m,localPoliciesWithContent:h}=Ni(),g=a.hasFlagEnabled(Ri),f="microsoft"===e?.embedder,v="amazon"===e?.embedder,_="google"===e?.embedder;let b=p;f?b={...p,size:"extraSmall",color:"subdued",weight:"bold"}:_&&(b={...p,size:"small"});const k=m.find(e=>"privacy-policy"===e.handle),P=k.url,S=P?d(Kf,{href:P,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:i}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):d(y,{children:[d(Kf,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:i}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),d(HA,{id:"google-privacy-policy-modal",defaultPolicy:{...k,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),w=d(Kf,{href:"https://payments.google.com/payments/apis-secure/u/0/get_legal_document?ldo=0&ldt=privacynotice",target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.payments_privacy_notice_accessibility_label"),children:t.translate("user_consent.google_embedded_checkout.payments_privacy_notice")}),C=d(Kf,{href:"https://support.google.com/gemini/answer/16730149",target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.learn_more_accessibility_label"),children:t.translate("user_consent.google_embedded_checkout.learn_more")}),E=d(cx,{type:"small",textAlign:c,children:ST(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:i,privacy_policy_link:S,payments_privacy_notice_link:w,learn_more_link:C}))}),I=d(cx,{size:"extraSmall",color:"subdued",textAlign:c,children:d(qf,{type:"strong",children:["Your purchase from ",i," is subject to the"," ",d(CT,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",d(CT,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",i," to complete your order."]})}),A=0===h.length?d(Qf,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:c,children:[d(qf,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:i})}
2),d(Qf,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[d(x,{when:l,children:d(Df,{accessibilityRole:"list-item",children:d(bT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(Df,{accessibilityRole:"list-item",children:d(_T,{})})})]})]}):d(Qf,{direction:"inline",justifyContent:c,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(g?h.slice(0,1):h).map(e=>{const{handle:n,name:r}=e,a=g?t.translate("shop_policies.terms_and_policies"):r,i=g?"terms-and-policies-footer-policy-modal":`${n}-footer-policy-modal`,s=d(HA,{id:i,defaultPolicy:e}),l=d(Yf,{variant:"plain",commandFor:i,ref:o(n),children:a});return d(Df,{accessibilityRole:"list-item",children:[b?d(qf,{size:b.size,color:b.color,type:"bold"===b.weight?"strong":void 0,children:l}):l,s]},n)}),d(x,{when:l,children:d(Df,{accessibilityRole:"list-item",children:d(bT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(Df,{accessibilityRole:"list-item",children:d(_T,{})})})]});let T="purchase.checkout.footer.render-after";"thankYou"===s?.type&&(T="purchase.thank-you.footer.render-after");const L=Kw(T),N="hidden"!==u&&!v,R=r.negotiated.fields.taxes.value,M=$A(R);return d(Qf,{gap:"large-100",children:[f&&I,_&&E,N&&A,d(yT,{customizations:L,gap:"base"}),M&&d(YA,{liability:R.liability})]})}function CT({href:e,heading:t,children:n,...r}){const{checkout:a}=ie(),i=Yc(void 0,PT);return a.configuration.isWindowOpenDelegationEnabled?d(Kf,{href:e,...r,children:n}):d(y,{children:[d(Kf,{commandFor:i,...r,children:n}),d(Hx,{id:i,source:e,heading:t})]})}function ET(){const{i18n:e,shop:t}=ie(),n=`${t.name} ${e.translate("general.page_title")}`;return d("h1",{className:Se({screenReaders:"only"}),children:n})}function xT(){const{client:e,i18n:t,checkout:{negotiator:r}}=ie(),{checkoutProtocolModalEventSignal:i}=r.context,o=n(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),{hasViolations:s}=Qy(Kn);return a(()=>()=>{i.value="none"},[i]),s?d(Hx,{id:"lost-permissions-modal",heading:t.translate("b2b_errors.lost_permissions_title"),size:"large",accessibilityLabel:t.translate("b2b_errors.lost_permissions_title"),blocking:!0,open:!0,onShow:()=>{i.value="b2bPermissions"},children:d(Qf,{gap:"base",children:[d(qf,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),d(Qf,{direction:"inline",gap:"base",justifyContent:"end",children:d(Yf,{variant:"primary",onClick:o,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function IT({source:e,title:t,onIframeLoad:n}){const[r,i]=s(),[o,l]=s(!1);return a(()=>{e?(i(e),l(!0)):l(!1)},[e]),r?d(Hx,{source:r,open:o,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function AT({source:e,logMessage:t,telemetryContext:r,logKey:o=e??void 0}){const{observability:s}=ie(),l=i();return a(()=>{e||(l.current=void 0)},[e]),n(n=>{e&&r&&(n&&n!==e||l.current!==o&&(l.current=o,s.log("action_required_modal_iframe_loaded",t,{...r,hasModalUrl:!0,..."pre_payment_buyer_action_required"!==r.actionType&&{sourceHostCategory:Xb(e)}})))},[o,t,s,e,r])}function TT(){const{i18n:e}=ie(),n=function(){const{checkout:e,shopPay:n,observability:r}=ie(),a=i(),o=t(()=>{if(Vi(n)&&n.threeDSModalUrl.value){const e=n.threeDSModalUrl.value;return{source:e,logKey:JSON.stringify(["spe",e]),logMessage:"[ActionRequiredModalManager] SPE 3DS action required via threeDSModalUrl",telemetryPayload:{modalSourceType:"spe_three_ds_modal_url",sourceHostCategory:Xb(e),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const t=e.latestReceipt.value;if(t&&qy(t)){const e=t.action;if(Hy(e))return{source:e.offsiteRedirect?void 0:e.url,logKey:JSON.stringify(["receipt",t.id,e.offsiteRedirect,e.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:Xb(e.url),offsiteRedirect:e.offsiteRedirect,actionType:e.type,hasModalUrl:!e.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:e.offsiteRedirect,actionType:e.type}}}if("action_required"===t?.status&&"pre_payment_buyer_action_required"===t.action.type){const{action:e}=t;return{source:e.url,logKey:JSON.stringify(["receipt",t.id,e.type]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",actionType:e.type,hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",actionType:e.type}}}});return P(()=>{const e=o.value;e?a.current!==e.logKey&&(a.current=e.logKey,r.log("action_required_modal_manager_action_required",e.logMessage,e.telemetryPayload)):a.current=void 0}),o.value}(),r=AT({source:n?.source,logKey:n?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:n?.iframeLoadTelemetryContext});return d(IT,{source:n?.source,title:e.translate("processing.action_required"),onIframeLoad:r})}function LT(e,t){return e.has(t)}function NT(e,t){if(!e||!t)return null;const n=t.find(e=>"customOnsite"===e.method.type)?.method;return n&&e.find(e=>"customOnsite"===e.type&&e.paymentMethodIdentifier===n.paymentMethodIdentifier&&e?.uiExtension?.approvalScopes&&LT(e.uiExtension.approvalScopes,jl.PaymentSessionModal))||null}wT.displayName="FooterContent",CT.displayName="DelegatedLink";const RT=w({id:()=>
2"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>dl(()=>import("./7fd9930c.D-t88s3f.js"),__vite__mapDeps([240,2,19,3,4,1,5,20,7,8,9,10,11,241])))});function MT({modalPaymentMethodConfig:e,onModalRender:n}){const{checkout:r,observability:a}=ie(),o=i(),s=m(void 0),l=t(()=>{const e=r.latestReceipt.value;return e&&jy(e)&&$y(e.action)?e:void 0});P(()=>{const t=l.value;if(!t||!$y(t.action))return void(o.current=void 0);const n=Boolean(e.value),r=JSON.stringify([t.id,t.action.challengeType,t.action.challengeData,n]);o.current!==r&&(o.current=r,a.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:t.action.challengeType,hasModalPaymentMethodConfig:n}))}),P(()=>{const e=l.value;if(!e||!$y(e.action))return void(s.value=void 0);const t=function(e){return JSON.stringify([e.id,e.action.type,$y(e.action)?e.action.challengeType:void 0,$y(e.action)?e.action.challengeData:void 0])}(e),n=null==e.timeout?.millisecondsRemaining?void 0:Date.now()+e.timeout.millisecondsRemaining,r=s.peek();r?.key!==t?s.value={key:t,expiresAt:n}:null!=n&&(s.value={key:t,expiresAt:Math.min(r.expiresAt??n,n)})});const c=t(()=>{const t=l.value,n=e.value;if(t&&$y(t.action))return n?{type:t.action.challengeType,data:t.action.challengeData,config:n,expiresAt:s.value?.expiresAt}:null});return d(x,{when:c,children:e=>d(RT,{challengeType:e.type,challengeData:e.data,receipt:r.latestReceipt.value,paymentMethod:e.config,onModalRender:n,challengeExpiresAt:e.expiresAt})})}function DT(){const e=ya(),{checkout:n}=ie(),r=n.negotiator.current.fields.deferredTotal;return t(()=>{if(!e.value)return!0;const t=r.value?.amount.amount;return Boolean(Ma({checkout:n})||t)})}function OT({isModalRendered:e,modalPaymentMethodConfig:n}){const{i18n:r,checkout:a}=ie(),i=function(){const{i18n:e,shopPay:n,checkout:{negotiator:r}}=ie(),{managedByMarketsPro:a}=r.current.fields,i=DT();return t(()=>{if(!i.value)return;if(!Fi({managedByMarketsPro:a.value}))return;const t=n.session.selectedPaymentMethod.value;return t&&Ui(t)?e.translate("processing.redirecting_title"):void 0})}();return t(()=>{if(i.value)return i.value;const t=a.latestReceipt.value;return t?qy(t)?r.translate("processing.redirecting_notice"):jy(t)?!e.value&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):r.translate("processing.wait.short"):!e.value&&n.value?.name&&qi(n.value)&&"processing"===t.status&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):"processing_remote_checkouts"===t.status||"processed"===t.status&&t.completedRemoteCheckouts?.length?r.translate("processing.remote_shops_payments_processing"):r.translate("processing.wait.short"):r.translate("processing.wait.short")})}const zT=w({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])},load:()=>C(()=>dl(()=>import("./39bf6084.sOhh1FwI.js"),__vite__mapDeps([242,2,1,3,4,5,243,228,46,64,7,8,9,10,11,244])))});function BT(){const{checkout:e}=ie(),{paymentLines:n}=e.negotiator.parts,r=e.negotiator.current.fields.paymentMethods,a=t(()=>NT(r.value,n.value)),i=m(!1),o=OT({isModalRendered:i,modalPaymentMethodConfig:a}),s=Ub();return P(()=>{if(e.latestReceipt.value)return $u({content:o.value,role:"alert"})}),d(y,{children:[d(x,{when:s,fallback:d(TT,{}),children:d(zT,{})}),d(MT,{modalPaymentMethodConfig:a,onModalRender:()=>{i.value=!0}})]})}function VT(){const{i18n:e,url:t,source:n,shop:a,checkout:i,shopPay:o}=ie(),s="shopPay"===i.identity.current.value,{plan:l,currentPage:c}=ac().value,u=ya(),d="cartNext"===n.type||"simulated"===n.type,p=i.negotiator,m=i.negotiator.parts.paymentLines.value,h=p.current.peek(),g=i.configuration.layout.isOnePage.value,f=ji(),y=Hi("SHOP_CASH"),v=ct(),_=cS(),{value:b}=i.negotiator.current.fields.managedByMarketsPro,k=Fi({managedByMarketsPro:b}),{value:P}=i.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,S=Ei(),w=pn(h.deliveryNext),C=Mr(h.deliveryNext),E=r(()=>m.some(({method:{type:e}})=>"paymentOnDelivery"===e),[m]),x=r(()=>m.some(({method:{type:e}})=>"customManualPayment"===e||"manualPayment"===e),[m]),I=r(()=>a.vaultForPaymentLater&&$i(m),[a.vaultForPaymentLater,m]),A=Boolean(P)&&!S.value,T=AI();return r(()=>{let t=[];t=d&&_.value?[{id:"cart",route:_.value.toString()}]:[];const n=[...t,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let r=c?n.findIndex(e=>e.id===c.id):void 0;(null==r||r<0)&&(r=void 0);const a=p.current.peek(),i=null==r?void 0:n.slice(r+1).find(e=>null==e.skipOverPage||!e.skipOverPage(a)),h=null==r?void 0:n.slice(0,r).reverse().find(e=>null==e.skipOverPage||!e.skipOverPage(a));return{nextPage:{id:i?.id,label:function(t){if(o.isSimulated)return e.translate("general.pay_now_button_label");switch(t){case"shipping":return e.translate("general.continue_to_shipping_method");case"payment":return e.translate("general.continue_to_payment_method");case"review":return e.translate("general.continue_to_review");case"thankYou":return v.value?e.translate("general.submit_for_review_button_label"):I?e.translate("payment.vault_for_payment_later.pay_button_label"):A&&!T.value?e.translate("general.confirm_order_button_label"):u.value||E||x||f.value||g&&y.value?e.translate("general.complete_purchase_button_label"):k&&!s&&Yi(m)?e.translate("general.continue_to_payment_method"):e.translate("general.pay_now_button_label");default:return e.translate("general.continue_button_label")}}(s?"thankYou":i?.id),notice:function(t){switch(t){case"review":return e.translate("processing.y
2ou_will_not_be_charged");case"thankYou":return v.value?e.translate("general.submit_for_review_notice_label"):void 0;default:return}}(s?"thankYou":i?.id)},previousPage:{label:function(t){switch(t){case"cart":return e.translate("general.back_to_cart");case"information":return e.translate("general.back_to_contact_information");case"shipping":return e.translate("general.back_to_shipping_method");case"payment":return e.translate("general.back_to_payment_method");case"buyWithPrime":return e.translate("wallets.return_to_store");default:return e.translate("general.back_button_label")}}(h?.id),route:h?.route}}},[t,p,e,u.value,c,l.greenPath,d,m,w,C,E,x,I,g,f.value,y.value,T.value])}function FT(){const e=ac();return t(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:e})=>"review"===e)})}function UT(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Boolean(Nt(n.value,"SHOP_PAY")),t=Boolean(Nt(n.value,"SHOPIFY_INSTALLMENTS"));return Wi(n.value)&&!e&&!t})}function qT(){const{i18n:e}=ie();return d(ay,{children:d(Qf,{gap:"large-400",alignItems:"center",children:[d(Df,{children:d(Bf,{size:"large",appearance:"monochrome"})}),d(cx,{children:e.translate("general.processing")})]})})}function jT(){const{progressing:e}=ic(),{i18n:n,embed:r,checkout:{negotiator:a}}=ie(),i=function(){const e=FT(),n=T(VT().nextPage.id),r=Rf(),{checkout:{offsitePopupController:a}}=ie();return t(()=>!(!r.value||a.isOpen.value||e.value&&"thankYou"!==n.value))}(),o=function(){const e=UT(),n=ac(),r=T(VT().nextPage.id),{checkout:a}=ie(),i=a.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:o},walletUsedForSubmissionSignal:s}=gn(),l=a.negotiator.parts.paymentLines;return t(()=>{if(!e.value)return!1;if(a.wallets.activeSession.value)return!1;const t=l.value;if(Nt(t,"PAYPAL_EXPRESS"))return!1;const c=Nt(t,"APPLE_PAY");return c?!o.value&&"APPLE_PAY"===s.value&&!!Gi(c)&&(i.value?"APPLE_PAY"!==a.wallets.escalatedWallet.value:"information"===n.value.currentPage?.id):i.value?!Wl({paymentLines:t,walletUsedForSubmission:s.value}):"GOOGLE_PAY"===s.value?"information"===n.value.currentPage?.id:"thankYou"===r.value})}(),s=a.parts.paymentLines,l=t(()=>"google"===r?.embedder&&Boolean(Nt(s.value,"GOOGLE_PAY"))),c=t(()=>e.value&&(o.value||i.value)&&!l.value);return P(()=>{if(c.value)return $u({content:n.translate("general.processing")})}),d(x,{when:c,children:d(qT,{})})}function HT(e){return function(t){return Object.fromEntries(Array.from(e).map(e=>[e,t[e]]))}}function $T(e){return function(t){return Object.fromEntries(Object.keys(t).filter(t=>!e.has(t)).map(e=>[e,t[e]]))}}function YT(){const{i18n:e,embed:t}=ie();return t?.isEmbeddedCheckout()?null:d("a",{href:`#${gC}`,className:"_9sntZ",children:e.translate("general.skip_to_content")})}function WT(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:r},negotiator:s}}=ie(),l=cS(),{checkoutProtocolModalEventSignal:c}=s.context,{lastJourneyProgression:u}=s,p=i(!1);P(()=>{if(!yr(e?.embedder))return;const t=u.value;"failed"!==t.type||"tooManyRequests"!==t.reason||p.current||(p.current=!0,o(()=>rr(e,"too_many_requests")))});const m=n(()=>{l.value&&window.location.assign(l.value.toString())},[l]);a(()=>()=>{c.value="none"},[c]);const h="failed"===u.value.type&&"tooManyRequests"===u.value.reason,g=r&&l.value;return h?d(Hx,{id:"too-many-requests-modal",heading:t.translate("too_many_requests.title"),size:"large",accessibilityLabel:t.translate("too_many_requests.title"),blocking:!0,open:!0,onShow:()=>{c.value="tooManyRequests"},children:d(Qf,{gap:"base",children:[d(qf,{children:g?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),g&&d(y,{children:[d(Df,{display:"@media (inline-size >= small) none, block",children:d(Yf,{variant:"primary",inlineSize:"fill",onClick:m,children:t.translate("too_many_requests.return_to_cart")})}),d(eh,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:d(Yf,{variant:"primary",onClick:m,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function GT(){const e=kt(),{i18n:n}=ie(),r=t(()=>e.value?n.translate("order_summary.total_updated_label_with_price",{totalPrice:n.formatCurrency(e.value.amount,{currency:e.value.currencyCode,form:"name"})}):null),a=i(r.peek());return P(()=>{const e=r.value,t=a.current;if(a.current=e,e&&e!==t)return $u({content:e})}),null}var JT={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function KT({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:a}){const i=Hc(),o=Qu(),s=e||o("processing");return i&&null==a?d(cx,{children:s}):d("progress",{id:t,className:v(JT.Progress,JT.toneVariant[r]),value:a,max:n,"aria-label":s})}function XT({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:i=!0}){const{i18n:o}=ie();a(()=>
2{if(e&&t)return $u({content:o.translate("general.processing")})},[e,t,o]);const s=e&&i;return d(Df,{children:[d(Df,{inert:e,opacity:e&&"spinner"===r?70:void 0,children:n}),d("div",{className:Se({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:s?1:0},"aria-hidden":!s,children:["progressbar"===r&&d("div",{className:Se({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:d(KT,{accessibilityLabel:o.translate("general.processing")})}),"spinner"===r&&d(Df,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:d(Bf,{size:"large",accessibilityLabel:o.translate("general.processing")})})]})]})}function QT({children:e}){return d(Ji.Provider,{value:ZT,children:e})}const ZT=(e,t,n,r,a)=>({onInput:t=>{!function(e,t,r){(t.value||e)&&(r.value=!0,n(void 0))}(t,e,r)},onChange:t=>function(e,t){(t.value||e)&&(t.value=e)}(t,e),clearError:()=>n(void 0),onBlur:()=>function(e,t,n,r,a){const i=e.value;t.peek()&&function(e,t,n,r,a){if(!t)return;const i=n.value,s=o(()=>r.value);if(s&&e&&e===i)return;const l=t(e),c=l?{message:String(l?.message??l),origin:"client",type:"inline-validation"}:void 0;(function(e,t){return!t||!Ki(e)||e.message!==t.message})(s,c)&&a(c)}(i,a,e,n,r)}(e,r,t,n,a),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});var eL={autoBorderVariant:{none:"apn1wdr",extraSmall:"apn1wds",small:"apn1wdt",base:"apn1wdu",large:"apn1wdv",extraLarge:"apn1wdw"},autoBorderWidthVariant:{none:"apn1wdk",base:"apn1wdl",large100:"apn1wdm",large200:"apn1wdn"},colorSchemeVariant:{scheme1:"apn1wd8 apn1wd0 _1fragemxx",scheme2:"apn1wd9 apn1wd1 _1fragemxy",scheme3:"apn1wda apn1wd2 _1fragemxz",scheme4:"apn1wdb apn1wd3 _1fragemy0",scheme5:"apn1wdc apn1wd4 _1fragemy1",scheme6:"apn1wdd apn1wd5 _1fragemy2",scheme7:"apn1wde apn1wd6 _1fragemy3",scheme8:"apn1wdf apn1wd7 _1fragemy4"},continuesColorScheme:"y3r6mh0",layerlessSurfaceBorderReset:"apn1wdi apn1wdh",liftedControlSurface:"apn1wdq",liftedSurface:"apn1wdp",surfaceBorderInherited:"apn1wdg",surfaceBorderReset:"apn1wdh"};const tL=f(void 0);function nL({accessibilityLabel:e,accessibilityRole:t="section",accessibilityLabelledBy:n,background:a,border:i,borderRadius:o,borderStyle:s,borderWidth:l,children:c,className:u,colorLayer:p,colorScheme:m,containerName:g,display:f,heading:y,id:_,maxBlockSize:b,maxInlineSize:k,minBlockSize:P,minInlineSize:S,overflow:w,padding:C}){const E=h(tL),x="section"===t?(E?.level??0)+1:E?.level??0,I=r(()=>({level:x}),[x]),A=ja(qw().pending??{}),{pending:T,pendingInsetsRows:L,rowsInset:N}=qw(),R=N||!0===L&&aL(A.padding),M=y?d(oL,{headingLevel:x,heading:y,children:c}):c,D=A.background??a,O=A.colorScheme??m,z="subdued200"===D,B="auto"===T?.border&&z,V="control"===p?"base":"baseSpecified",F=("base"===D?V:D)??(O?V:void 0),{current:U}=Jp();return d(Uw,{rowsInset:R,children:d(iL,{colorScheme:O,children:d(tL.Provider,{value:I,children:d(Df,{accessibilityLabel:e,accessibilityRole:"presentation"===t?void 0:t,"aria-labelledby":n,background:F,border:i,borderRadius:A.borderRadius??o,borderStyle:A.borderStyle??s,borderWidth:A.borderWidth??l,boxShadow:B?void 0:A.boxShadow,containerName:g,className:v(O&&eL.colorSchemeVariant[O],B&&eL.autoBorderVariant[A.boxShadow??"none"],B&&eL.autoBorderWidthVariant[T?.borderWidth??"base"],z?eL["control"===p?"liftedControlSurface":"liftedSurface"]:rL(F,O,U,p),u),colorLayer:p||(O?"base":void 0),display:f,id:_,maxBlockSize:b,maxInlineSize:k,minBlockSize:P,minInlineSize:S,overflow:w,padding:A.padding??C,children:x>1&&"section"===t?d(_u,{children:M}):M})})})})}function rL(e,t,n,r){if(!t){if(null==e||"transparent"===e||"baseSpecified"===e&&Xi.some(e=>e===n))return;return r?eL.surfaceBorderReset:eL.layerlessSurfaceBorderReset}if(t===n)return"transparent"===e?eL.surfaceBorderInherited:"baseSpecified"===e?eL.continuesColorScheme:void 0}function aL(e){return null!=e&&(Array.isArray(e)?e.some(aL):"object"==typeof e?Object.values(e).some(aL):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some(e=>
2""!==e&&"none"!==e))}function iL({children:e,colorScheme:t}){const n=Jp(),{current:a}=n,i=r(()=>t&&t!==a?{parent:a,current:t}:n,[t,a,n]);return d(Gp.Provider,{value:i,children:e})}function oL({headingLevel:e,heading:t,children:n}){let r;return 1===e?r="small":2===e?r="small-300":3===e&&(r="small-500"),e<4?d(Qf,{gap:r,children:[d(TS,{children:t}),d("div",{children:n})]}):d(y,{children:[d(TS,{children:t}),n]})}function sL(e){const{inlineSize:t}=Aw(e),r=oe(t+2),a=m(2),o=i(null);return{ref:n(e=>{if(o.current?.disconnect(),o.current=null,!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(([t])=>{if(!t)return;const n=t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width;if(0===n)return;const i=e.firstElementChild;if(!i)return;const o=parseFloat(getComputedStyle(i).columnGap)||0,s=Math.floor((n+o)/(r.current+o));a.value=Math.min(3,Math.max(1,s))});t.observe(e),o.current=t},[a,r]),max:a}}tL.displayName="SectionContext";const lL=e=>e.lineAllocations.map((t,n)=>cL(e,n)),cL=(e,t)=>{const{lineAllocations:n,...r}=e,a=n[t];if(!a)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:uL(e.lineComponents,t),lineAllocation:a}},uL=(e,t)=>e.map(({lineAllocations:e,...n})=>{const r=e[t]??e[0];if(!r)throw new TypeError("Missing line allocation for merchandise line component");return{...n,lineAllocation:r}});function dL(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function pL(e){return e.stableId}const mL=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function hL(e,t){const n=gL(t);if(null!=n)return e[n]}function gL(e){const t=mL.exec(e);if(null==t?.[1])return;const n=parseInt(t[1],10);return isNaN(n)?void 0:n}function fL(e,t,n){const r=new Set;for(const a of t){if(!n(a)||!("target"in a))continue;const t=hL(e,a.target);t?.stableId&&r.add(t.stableId)}return r}function yL(e,t=[]){return fL(e,t,e=>Ky([e])||Xy([e]))}function vL(e,t=[]){for(const n of t)if(n.targetMerchandiseLines?.some(({stableId:t})=>e.includes(t))&&"available"===n.status){const e=n.methods.find(({handle:e})=>e===n.selectedDeliveryMethodHandle);if(e?.title)return e.title;continue}return null}function _L(e,t,n,r){const a=function(e,t){return[...new Set([...e.map(pL),...t.map(pL)])].map(n=>({proposed:e.find(e=>e.stableId===n),negotiated:t.find(e=>e.stableId===n)}))}(e,t);if(r)return kL(a.filter(r));const i=yL(e,n??[]),o=function(e,t=[]){return fL(e,t,e=>"MERCHANDISE_OUT_OF_STOCK"===e.code)}(e,n??[]);return kL(a.filter(e=>{if(function(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}(e))return!0;const t=(e.negotiated||e.proposed)?.stableId;return i.has(t)||o.has(t)}))}function bL(e,t,n){const r=e.filter(e=>function(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}(e)&&n.includes(e.code)).map(e=>hL(t?.lines,e.target)).filter(e=>void 0!==e);return 0===r.length?null:Array.from(new Map(r.map(e=>[e.stableId,e])).values())}function kL(e){return e.flatMap(e=>Qi(e.proposed)||null==e.proposed?[e]:e.negotiated?[{proposed:void 0,negotiated:e.negotiated}]:[])}function PL(){const{checkout:{configuration:e,negotiator:t}}=ie(),n=e.layout.isOnePage.value,{value:a}=t.current.fields.merchandiseLines,{value:i}=t.current.fields.allViolations,{currentDetour:o}=ac().value,{value:l}=t.current.fields.legacyRepresentProductsAsFees,c=t.parts.merchandiseLines.value,[u]=s(c),d=o?.type,p=a?.lines;return r(()=>{const e=e=>l?function(e){return e.filter(e=>!1===e.legacyFee)}(e):e,t="thankYou"===d?[]:e("stockProblems"===d?u:c),r=e(p??[]);return function(e,t,n,r){const a=yL(t,r),i=n.filter(({quantity:e,stableId:t})=>e>0&&!a.has(t)),o=_L(t,n,r).map(({proposed:e,negotiated:t})=>t??e),s=void 0===i||0===i.length&&o.length>0;return function(e,t,n,r){return e.flatMap(e=>{const a=t.find(({stableId:t})=>t===e.stableId),i=n&&a?a.lineAllocations:e.lineAllocations;return lL({...e,lineAllocations:i}).map(t=>function({lineAllocation:e,...t},n,r){return{key:`${t.stableId}-${e.stableId}`,stableId:t.stableId,id:e.stableId,image:t.image,title:t.title,subtitle:t.subtitle,components:t.lineComponents.map(SL),parentRelationship:t.parentRelationship,quantity:e.quantity,properties:t.properties,options:t.options,disclosures:n.disclosures,productId:n.productId,itemPrice:n.itemPrice,compareAtPrice:n.compareAtPrice,unitPrice:e.unitPrice,totalAmountBeforeReductions:e.checkoutPriceBeforeReductions,totalAmountAfterLineDiscounts:e.totalAmountAfterLineDiscounts,deferredAmount:t.deferredAmount,totalPrice:e.totalAmountBeforeReductions,sellingPlan:t.sellingPlan??null,recurringTotal:r?t.recurringTotal:null,lineDiscounts:e.allocations.filter(wL).map(t=>CL(t,e.stableId))}}(t,e,r))})}(s?o:i,t,s,e)}(n,t,r,i??[])},[u,d,n,l,p,c,i])}const SL=e=>({properties:e.properties,quantity:e.lineAllocation.quantity,stableId:e.lineAllocation.stableId,totalAmountBeforeReductions:e.lineAllocation.checkoutPriceBeforeReductions,merchandise:{deferredAmount:e.deferredAmount,digest:e.digest,disclosures:e.disclosures,giftCard:e.giftCard,image:e.image,options:e.options,itemPrice:e.itemPrice,productType:e.productType,productId:e.productId,vendor:e.vend
2or,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),wL=e=>xl(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel,CL=(e,t)=>({id:`allocation-${t}-${Zi(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function EL(){const{checkout:e}=ie(),t=e.configuration.layout.isOnePage.value,n=(e.proposal.facts.merchandiseLines??[]).filter(e=>(e?.quantity??-1)>0).map((e,t)=>({key:`${t}${e.title}`,title:e.title,properties:e.properties,image:IL(e.image)??void 0,totalAmountAfterLineDiscounts:e.priceAfterDiscounts,totalAmountBeforeReductions:e.price,quantity:e.quantity,subtitle:e.variantTitle,lineDiscounts:e.appliedDiscounts.filter(xL).map(e=>AL(e,t)),parentTitle:e.parentTitle,components:[],unitPrice:null,totalPrice:e.priceAfterDiscounts})),r=PL();return[...t?r.filter(e=>e.quantity>0):r,...n]}const xL=e=>"LINE"===e.presentationLevel,IL=e=>e?{...e,altText:e.altText||""}:null,AL=(e,t)=>({id:`allocation-${t}-${Zi(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function TL(){const e=T(EL()),{shop:{id:n},checkout:{negotiator:r}}=ie(),a=r.current.fields.remoteMerchandiseDetails;return t(()=>{const t=a.value?.stableIdToShopId??new Map,r=t.values(),i=new Map([[n,[]]]);for(const e of r)i.set(e,[]);const o="PurchaseOrderMerchandiseTerms"===a?.value?.mergedBuyerProposalMerchandise?.__typename&&a.value.mergedBuyerProposalMerchandise.merchandiseLines?a.value.mergedBuyerProposalMerchandise.merchandiseLines.map(e=>"PurchaseOrderMerchandiseLine"===e.__typename&&"ProductVariantSnapshot"===e.merchandise.__typename?{key:e.stableId,stableId:e.stableId,id:e.merchandise.variantId??null,image:ro(e.merchandise.image),title:e.merchandise.productTitle,subtitle:e.merchandise.title??null,quantity:e.quantity.items,properties:no(e.merchandise.properties),options:e.merchandise.options??[],itemPrice:to(e.merchandise.price),totalAmountBeforeReductions:to(e.merchandise.price),totalAmountAfterLineDiscounts:to(e.merchandise.price),totalPrice:to(e.merchandise.price),deferredAmount:e.merchandise.deferredAmount?to(e.merchandise.deferredAmount):void 0,sellingPlan:eo(e.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0).filter(e=>Boolean(e)):[];for(const a of[...e.value,...o]){if(!a.stableId){i.get(n)?.push(a);continue}const e=t.get(a.stableId);e?i.get(e)?.push({...a,hideRuntimeExtensions:!0}):i.get(n)?.push(a)}return i})}var LL={ResourceItem:"_6zbcq51k _6zbcq51j _1fragem64 _1fragem4q _1fragemws",ResourceItemContent:"_6zbcq52d _6zbcq52c _1fragem64 _1fragem73",ResourceListHeader:"_6zbcq51h _6zbcq51g _1fragem64 _1fragem19 _1fragemzf _1fragema5",ResourceItemLineContainer:"_6zbcq520 _6zbcq51z _1fragem64 _1fragem73",ResourceItemLine:"_6zbcq523 _6zbcq522 _1fragemzp _1fragemzn _1fragemzr _1fragemzl _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragem6y",ResourceItemLineVertical:"_6zbcq525 _6zbcq524 _1fragem4q _1fragemwi",ResourceItemLineCurved:"_6zbcq527 _6zbcq526 _1fragemws",ResourceListRowGroup:"_6zbcq56 _6zbcq55 _1fragem64 _1fragem73",ResourceList:"_6zbcq58 _6zbcq57 _1fragem64 _1fragem73",resourceListHeaderBlockPaddingVariant:{none:"_6zbcq51c",base:"_6zbcq51d _6zbcq51b _1fragemo1"},resourceListHeaderHidden:"_6zbcq51f _6zbcq51e _1fragem121",borderVariant:{none:"_6zbcq518",inner:"_6zbcq519",outer:"_6zbcq51a"},primary:"_6zbcq51i _1fragemyn",resourceItemBlockPaddingVariant:{none:"_6zbcq51n",base:"_6zbcq51o"},resourceItemContentHidden:"_6zbcq52a",resourceItemContentNoWrap:"_6zbcq52b _1fragem12y",resourceItemContentAlignSelf:{auto:"_6zbcq51q",baseline:"_6zbcq51r _6zbcq51p _1fragem28"},resourceItemContentInlineAlignment:{start:"_6zbcq51w _6zbcq51t _1fragemc8",center:"_6zbcq51x _6zbcq51u _1fragembj",end:"_6zbcq51y _6zbcq51v _1fragembt"},resourceItemContentPrimary:"_6zbcq529 _6zbcq528 _1fragemyn",groupedResourceItem:"_6zbcq51s",resourceItemSpacingVariant:{small300:"_6zbcq51l",base:"_6zbcq51m"},rowGroupSpacingVariant:{none:"_6zbcq5k",small500:"_6zbcq5l _6zbcq59 _1fragem7n",small400:"_6zbcq5m _6zbcq5a _1fragem7s",small300:"_6zbcq5n _6zbcq5b _1fragem7x",small200:"_6zbcq5o _6zbcq5c _1fragem82",small100:"_6zbcq5p _6zbcq5d _1fragem87",base:"_6zbcq5q _6zbcq5e _1fragem8c",large100:"_6zbcq5r _6zbcq5f _1fragem8h",large200:"_6zbcq5s _6zbcq5g _1fragem8m",large300:"_6zbcq5t _6zbcq5h _1fragem8r",large400:"_6zbcq5u _6zbcq5i _1fragem8w",large500:"_6zbcq5v _6zbcq5j _1fragem91"},rowSpacingVariant:{none:"_6zbcq5w",small500:"_6zbcq5x",small400:"_6zbcq5y",small300:"_6zbcq5z",small200:"_6zbcq510",small100:"_6zbcq511",base:"_6zbcq512",large100:"_6zbcq513",large200:"_6zbcq514",large300:"_6zbcq515",large400:"_6zbcq516",large500:"_6zbcq517"},visuallyHidden:"_6zbcq52e _1fragem121",visibleLine:"_6zbcq521",lineOffsetVar:"var(--_6zbcq54)"};const NL=$c("ResourceList");function RL({children:e,title:t,titleHidden:n,spacing:a="base",border:i="none"}){const o=Yc(void 0,NL),s=v(LL.ResourceList,a&&LL.rowGroupSpacingVariant[a],i&&LL.borderVariant[i]),l=t?d(TS,{id:o,children:t}):null,c=r(()=>({spacing:a}),[a]);return d(y,{children:[t&&n?d("div",{className:LL.visuallyHidden,children:l}):l,d(_u,{children:d("div",{role:"table","aria-labelledby":o,className:s,children:d(OL.Provider,{value:c,children:e})})})]})}function ML({children:e,hidden:t,blockPadding:n}){const r=v(LL.ResourceListHeader,n&&!t&&LL.resourceListHeaderBlockPaddingVariant[n]);return d("div",{role:"rowgroup",className:v(LL.ResourceListRowGroup,t&&LL.resourceListHeaderHidden),children:d("div",{role:"row",className:r,children:e})})}function DL({children:e,primary:t,hidden:n}){return d("div",{role:"columnheader",className:v(t?LL.primary:void 0,n&&LL.visuallyHidden),children:e})}const OL=f(void 0);function zL({children:e}){return e?d("div",{role:"rowgroup",className:LL.ResourceListRowGroup,children:e}):null}const BL=f(void 0);function VL({spacing:e,children:t,showLines:n=!0}){const a=r(()=>({spacing:e}),[e]),i=r(()=>({showLines:n}),[n]);return d(OL.Provider,{value:a,children:d(BL.Provider,{value:i,children:t})})}function FL({lineOffset:e=0}){const t=h(BL);
2return d("div",{"aria-hidden":!0,className:LL.ResourceItemLineContainer,style:b({[LL.lineOffsetVar]:ke(e)}),children:[d("div",{className:v(LL.ResourceItemLine,LL.ResourceItemLineVertical,t?.showLines&&LL.visibleLine)}),d("div",{className:v(LL.ResourceItemLine,LL.ResourceItemLineCurved,t?.showLines&&LL.visibleLine)})]})}function UL({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:a,minBlockSize:i,noWrap:o}){const{lineItems:s}=Gm(),l=t??s?.inlineAlignment??"center",{className:c,style:u}=Hm({minBlockSize:i}),p=v(LL.ResourceItemContent,LL.resourceItemContentInlineAlignment[l],e&&LL.resourceItemContentAlignSelf[e],r&&LL.resourceItemContentPrimary,a&&LL.resourceItemContentHidden,o&&LL.resourceItemContentNoWrap,c);return d("div",{role:"cell",className:p,style:u,children:a?d("div",{className:LL.visuallyHidden,children:n}):n})}function qL({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:a}){const i=h(OL),o=h(BL);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const s=v(LL.ResourceItem,t&&LL.resourceItemBlockPaddingVariant[t],i?.spacing&&LL.rowSpacingVariant[i.spacing],n&&LL.resourceItemSpacingVariant[n],o&&LL.groupedResourceItem,a);return d("div",{role:"row",className:s,children:[d(FL,{lineOffset:r}),e]})}var jL={Badge:"_99ss3s1 _99ss3s0 _1fragem19 _1fragembj _1fragemzg _1fragemyz",displayVariant:{blockFlex:"_99ss3s6 _99ss3s2 _1fragem64",inlineFlex:"_99ss3s7 _99ss3s3 _1fragem6j",blockGrid:"_99ss3s8 _99ss3s4 _1fragem6t",inlineGrid:"_99ss3s9 _99ss3s5 _1fragem6o"},toneColorVariant:{critical:{base:"_99ss3se",subdued:"_99ss3sf"},warning:{base:"_99ss3sg",subdued:"_99ss3sh"},success:{base:"_99ss3si",subdued:"_99ss3sj"},neutral:{base:"_99ss3sl",subdued:"_99ss3sm _99ss3sk _1fragem13d"},accent:{base:"_99ss3sn",subdued:"_99ss3so"}},sizeVariant:{base:"_99ss3sc _99ss3sa _1fragemt1 _1fragemr8",small100:"_99ss3sd _99ss3sb _1fragemsw _1fragemr3"},borderRadiusVariant:{none:"_99ss3su _99ss3sp _1fragemfk _1fragemge _1fragemi2 _1fragemh8",base:"_99ss3sv _99ss3sq _1fragemfu _1fragemgo _1fragemic _1fragemhi",small:"_99ss3sw _99ss3sr _1fragemfp _1fragemgj _1fragemi7 _1fragemhd",large:"_99ss3sx _99ss3ss _1fragemfz _1fragemgt _1fragemih _1fragemhn",fullyRounded:"_99ss3sy _99ss3st _1fragemg4 _1fragemgy _1fragemim _1fragemhs"},iconVariant:"_99ss3sz _1fragem7s _1fragem9l _1fragemx7",visuallyHidden:"_99ss3s10 _1fragem121"};function HL({accessibilityLabel:e,accessibilityVisibility:t,children:n,color:r="base",borderRadius:a="fullyRounded",display:i="block",icon:o,iconPosition:s="start",id:l,size:c="base",tone
2:u="auto",visibility:p}){const m=o?d(oh,{size:c,type:o,tone:$L(u)}):null,h=d(y,{children:["start"===s?m:null,d("span",{children:n}),"end"===s?m:null]});return d("div",{id:l,className:v(jL.Badge,jL.displayVariant[o?`${i}Grid`:`${i}Flex`],jL.toneColorVariant["auto"===u?"neutral":u][r],jL.sizeVariant[YL(c)],jL.borderRadiusVariant[a],o&&jL.iconVariant,"hidden"===p&&jL.visuallyHidden),"aria-hidden":"hidden"===t||void 0,children:e?d(y,{children:[d("span",{className:jL.visuallyHidden,children:e}),h]}):h})}function $L(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function YL(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function WL(e,t){for(const n of t){const t=n.lineAllocations.findIndex(t=>t.stableId===e),r=n.lineAllocations[t];if(t>=0&&r)return{lineAllocation:r,parent:n,index:t}}return null}function GL({stableId:e,merchandiseLines:t}){if(!e)return null;const n=WL(e,t);if(!n)return null;const{parent:r,index:a}=n;return cL(r,a)}function JL(){const{i18n:e}=ie();function t(t){return e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})}return function({fixedPrice:n,recurringPrice:r,fixedPriceCount:a,interval:i,intervalCount:o}){const s=(()=>{switch(i){case"year":return e.translate("subscriptions.recurring_total_intervals.year",{count:o});case"month":return e.translate("subscriptions.recurring_total_intervals.month",{count:o});case"week":return e.translate("subscriptions.recurring_total_intervals.week",{count:o});case"day":return e.translate("subscriptions.recurring_total_intervals.day",{count:o});default:return""}})();return n&&a?function(t,n,r,a){return`${e.translate("subscriptions.recurring_totals_with_policies.first_cycles",{count:r,total_price:n})}${e.translate("subscriptions.recurring_totals_with_policies.following_cycles",{total_price:t,interval:a})}`}(t(r),t(n),a,s):e.translate("subscriptions.recurring_totals",{total_price:t(r),interval:s})}}function KL(){const e=JL();return function(t){return t?t.map(e):void 0}}function XL({available:e,name:t,value:n}){const r=`${t}: ${n}`;return"string"==typeof n&&0===n.lastIndexOf("https://cdn.shopify.com",0)?d(Kf,{href:n,children:d(QL,{condition:e,children:d(qf,{size:"small",color:"subdued",children:t})})}):d(QL,{condition:e,children:d(qf,{size:"small",color:"subdued",children:r})})}function QL({condition:e,children:t}){return!1===e?d(qf,{type:"redundant",children:t}):t}function ZL({properties:e,available:t}){const n=e.flatMap(({name:e,visible:n,value:r,sourceType:a})=>n&&"MerchandisePropertyValueJson"!==a&&""!==r&&null!==r?[d(Df,{accessibilityRole:"list-item",children:d(XL,{available:t,name:e,value:r})},e)]:[]);return n.length>0?d(Qf,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}function eN({id:e,deferredAmount:n,options:a,properties:i,recurringTotal:o,sellingPlan:s,subtitle:l,title:c,titleSize:u,totalPrice:p,children:m,titleAccessory:h,blockLayoutContent:g,remoteShopName:f,hasFailed:y,hideRuntimeExtensions:v}){const{lineItems:{optionsColor:_="subdued",optionsFormat:b="inline",optionsSeparator:k="comma",optionsTypography:P={},titleTypography:S={}}}=Gm(),w=r(()=>e&&!v?{stableId:e}:null,[e,v]),C=u??"small",E=P.size??"small",{i18n:x,checkout:{negotiator:I}}=ie(),A=a&&a.length>0,T="middot"===k?" · ":", ",L=JL(),{value:N}=I.current.fields.merchandiseLines,R=ac(),M=Kw(t(()=>"thankYou"===R.value.currentDetour?.type?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter").value),D=function({stableId:e,merchandiseLines:t}){const n=GL({stableId:e,merchandiseLines:t});return!n?.variantId}({stableId:e,merchandiseLines:N?.lines??[]})?[]:M,O={size:E,color:_},z={size:E,color:_};return d(Df,{className:"dDm6x",children:[f||y?d(Qf,{direction:"inline",gap:"small-300",children:[f?d(qf,{size:"small",color:"subdued",children:f}):null,y?d(HL,{icon:"alert-circle",tone:"critical",children:x.translate("order_summary.unconfirmed_label")}):null]}):null,d(cx,{size:C,children:[d(tN,{condition:"bold"===S.weight,children:c}),h]}),d(Qf,{children:[g,"inline"===b&&l?d(cx,{...z,children:l}):null,"inlineDescriptionList"===b&&A?d(cx,{...z,children:a?.map(({name:e,value:t})=>`${e}: ${t}`).join(T)}):null,"descriptionList"===b&&A?d(Df,{accessibilityRole:"unordered-list",children:a?.map(({name:e,value:t})=>d(Df,{accessibilityRole:"list-item",children:d(qf,{...O,children:`${e}: ${t}`})},e))}
2):null,s?.name?d(cx,{...z,children:s.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?d(cx,{...z,children:L(o)}):null,i&&d(ZL,{properties:i}),m,w?d(yT,{customizations:D,options:w}):null]})]})}function tN({condition:e,children:t}){return e?d(qf,{type:"strong",children:t}):t}function nN(e,t){if(t)return e?.embedder?{default:t.two,one:t.two,two:t.four,four:t.four}:{default:t.one,one:t.one,two:t.two,four:t.four}}const rN=w({displayName:"ProductDisclosuresDetails",load:()=>C(()=>dl(()=>import("./7d468a18.BG7RHEao.js"),__vite__mapDeps([245,2,1,3,4,5,7,8,9,10,11]))),suspense:!1});var aN={Image:"_1h3po427 _1h3po426 _1fragem5u _1fragemvo",Wrapper:"_1h3po421",aspectRatio:"_1h3po425 _1h3po424 _1fragemws _1fragemzf",aspectRatioVar:"var(--_1h3po420)",inlineSizeVariant:{fill:"_1h3po429",auto:"_1h3po42a"},skeleton:"_1h3po42c",vars:{animationDelay:"var(--_1h3po422)",animationDuration:"var(--_1h3po423)"},hidden:"_1h3po428"};const iN=Jm(function({source:e,src:t,srcSet:n,sizes:r,alt:i="",objectFit:o="contain",loading:l="eager",aspectRatio:c="1/1",accessibilityRole:u="img",border:p="none",borderRadius:m="none",borderStyle:h,borderWidth:g,className:f,id:y,inlineSize:_="fill",onError:k,onLoad:P}){const S=["presentation","none"].includes(u),{className:w}=Hm({...Ne({border:p,borderStyle:h,borderWidth:g}),borderRadius:m,objectFit:o}),C=bw(t,e),E=!(t||e||n),x=t??kw(e)??n??"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",[I,A]=s(E);a(()=>{if(!E)return void A(!1);const e=setTimeout(()=>A(!1),100);return()=>{clearTimeout(e)}},[E]);const{animationEnabled:T,delay:L,onAnimationStart:N,onAnimationIteration:R}=Lw(),M=k?{onError:e=>k(e.nativeEvent)}:{},D=P?{onLoad:e=>P(e.nativeEvent)}:{};return d(oN,{condition:S,children:d(sN,{condition:"auto"!==_,aspectRatio:c,children:d(vw,{condition:Boolean(C),children:[C,d("img",{...M,...D,src:x,srcSet:n,sizes:r,className:v(aN.Image,aN.inlineSizeVariant[_],E&&T&&aN.skeleton,E&&I&&aN.hidden,w,f),style:{...b({[aN.vars.animationDelay]:`${L}ms`,[aN.vars.animationDuration]:"4000ms"})},onAnimationStart:N,onAnimationIteration:R,loading:l,id:y,role:S?u:void 0,alt:S?"":i,"aria-hidden":E?"true":void 0})]})})})});function oN({children:e,condition:t}){return t?d(Df,{accessibilityVisibility:"hidden",children:e}):d(y,{children:e})}function sN({children:e,condition:t,aspectRatio:n}){const r=function(e){if("number"==typeof e)return e;if(null==e||"string"!=typeof e||"auto"===e)return;if(e.includes("/")){const t=0,[n,r]=e.split("/").map(e=>{const t=Number(e);return isNaN(t)||""===e.trim()?void 0:t});if(void 0!==n&&n>t&&void 0!==r&&r>t)return n/r}const t=Number(e);return isNaN(t)?void 0:t}(n);return t&&void 0!==r?d("div",{className:v(aN.Wrapper,aN.aspectRatio),style:b({[aN.aspectRatioVar]:`${r}`}),children:e}):d(y,{children:e})}const lN={small:16,large:24};function cN({disclosure:e,size:t}){const n=e.symbol;if(n){const e=`${lN[t]}px`,r="small"===t?"":n.altText??"";return d(Df,{inlineSize:e,blockSize:e,children:d(iN,{src:n.one,srcSet:`${n.one} 1x, ${n.two} 2x, ${n.four} 4x`,alt:r,accessibilityRole:"small"===t?"presentation":"img",aspectRatio:"1/1",objectFit:"contain"})})}return d(oh,{type:"info",size:"small"===t?"small":"large-100",tone:"auto"})}const uN=$c("product-disclosure-modal-"),dN=$c("product-disclosure-tooltip-");function pN({disclosures:e,title:n}){const{checkout:{negotiator:r}}=ie(),a=iI("deliveryNext");return t(()=>!a.value&&(0===r.initialUnresolvedFields.value.size||"fetch_failed"===r.pendingFieldsNegotiation.value?.status)).value&&e?.length?d(mN,{disclosures:e,title:n}):null}function mN({disclosures:e,title:t}){const{i18n:n}=ie(),r=Yc(void 0,uN),a=Yc(void 0,dN),i=rN.usePrefetch(),o=()=>{i()},s=n.translate("order_summary.product_disclosures.title"),l=n.translate("tooltip.accessibility_label_context",{context:t});return d(y,{children:[d(Kf,{commandFor:r,interestFor:a,accessibilityLabel:l,onFocus:o,onMouseEnter:o,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:d(oh,{type:"alert-triangle",size:"small"})}),d(um,{id:a,children:hN(e)}),d(Hx,{id:r,heading:s,children:d(rN,{disclosures:e})})]})}function hN(e){return d(Df,{inlineAlignment:"start",children:d(Qf,{gap:"small-200",children:e.map(e=>d(eh,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[d(eh,{blockSize:"1lh",placeItems:"center",children:d(cN,{disclosure:e,size:"small"})}),d(cx,{textAlign:"start",children:e.title})]},e.id))})})}function gN({amount:e}){const{i18n:t}=ie();if(e.amount<=0)return null;const n=t.formatCurrency(-e.amount,{currency:e.currencyCode,form:"short"}),r=t.translate("order_summary.compare_at_sale",{sale_amount:n});return d(cx,{type:"small",color:"subdued",children:r})}const fN=f(null);var yN="_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u";function vN({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:a}=h(fN)??{};return e?void 0!==r?d("button",{id:t,className:yN,onClick:n,"aria-controls":a,"aria-expanded":r,type:"button",children:[e,d(oh,{size:"small-200",type:r?"chevron-up":"chevron-down",className:"_1mwdekd3 _1mwdekd2 _1fragem6e"})]}):d("p",{id:t,className:yN,children:e}):null}const _N=$c("Details"),bN=function(e){const t=_(function(t,r){const{open:i,defaultOpen:o=!1,onToggle:l,id:c}=t,{upsertInteraction:u,deleteInteraction:p}=jd(),[m,h]=s(o),g=i??m,f=n(()=>{const e=g?"open":"closed",t=g?"closed":"open";void 0===i&&h(!g),l?.(e,t)},[g,l,i]),y=n(()=>{g&&(void 0===i&&h(!1),l?.("open","closed"))},[g,l,i]),v=n(()=>{g||(void 0===i&&h(!0),l?.("closed","open"))},[g,l,i]);return a(()=>()=>{c&&p(c)},[c]),a(()=>{c&&u({id:c,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:y,show:v,toggle:f,visible:g})},[c,g,y,v,f,u]),d(e,c&&void 0===i?{...t,open:m,onToggle:f,ref:r}:{...t,ref:r})});return t.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,t}(function({open:e,defaultOpen:t=!1,onToggle:a,onAfterToggle:o,id:l,summary:c,content:u,toggleTransition:p="auto"}){const m=void 0!==e,[h,g]=s(t),f=m?e:h,y=`${Yc(l,_N)}-content`,v=i(),_=n(e=>{e?.preventDefault();const t=e=>{"function"==typeof a&&a(e?"open":"closed",e?"closed":"open")};m?t(f):g(e=>(t(e),!e))},[m,f,a]);(!u||Array.isArray(u)&&u.length<1)&&console.warn("Details: content is required for toggle functionality");const b="string"==typeof c?d(vN,{children:c}):c,k=r(()=>({isOpen:f,onToggle:_,contentId:y}),[y,_,f]);return d(fN.Provider,{value:k,children:d("div",{id:l,children:[b,d(Ld,{id:y,open:f,duration:"auto"===p?"base":"none",onTransition:e=>{const t="entering"===v.current&&"entered"===e,n="exiting"===v.current&&"exited"===e;(t||n)&&"function"==typeof o&&o(t?"closed":"open",t?"open":"closed"),v.current=e},children:u})]})})});function kN({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignSelf:r="auto",background:a="transparent",backgroundHoverAndFocus:i,blockSize:o="auto",border:s="none",borderColor:l,borderRadius:c="none",borderStyle:u,borderWidth:p,children:m,display:h="auto",gridColumn:g="auto",gridRow:f="auto",id:_,inlineSize:b="auto",maxBlockSize:k="none",maxInlineSize:P="none",minBlockSize:S="0",minInlineSize:w="0",overflow:C="visible",padding:E="none",paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:N}){const R=xd(),{Element:M,role:D}=Zm(t,{defaultElement:R?"span":"div"}),{className:O,style:z,styleElement:B}=Hm({alignSelf:r,backgroundColor:a,backgroundColorHoverAndFocus:i,blockSize:o,...Ne({border:s,borderColor:l,borderStyle:u,borderWidth:p}),borderRadius:c,display:h,gridColumn:g,gridRow:f,inlineSize:b,maxBlockSize:k,maxInlineSize:P,minBlockSize:S,minInlineSize:w,padding:E,paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:N},{transforms:{display:vd}});return d(y,{children:[B,d(M,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("exclusive"===n&&"_1r0jjrp1 _1fragem121","hidden"===C&&"_1r0jjrp0 _1fragemup _1fragemv4",O),id:_,role:D,style:z,children:m})]})}const PN={auto:"block",inline:"inlineBlock",block:"block"},SN=e=>"auto"===e?"auto":e in _m?_m[e]:void 0,wN=e=>PN[e];function CN({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:a,style:i}=Hm({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:SN,display:wN,inlineSize:SN}});return d("div",{className:v(a),id:r,style:i})}function EN({components:e,id:t}){const a=e.some(({merchandise:e})=>e.disclosures?.length),[i,o]=s(e.length<=10||a),l=n(()=>{o(e=>!e)},[]),{i18n:c,embed:u}=ie(),{lineItems:{optionsColor:p="subdued"}}=Gm(),m={size:"small",color:p},h=Kw("Checkout::CartLineDetails::RenderLineComponents"),g=r(()=>e.reduce((e,{quantity:t})=>e+t,0),[e]),f=r(()=>t?{stableId:t}:null,[t]);if(0===e.length)return null;if(f&&h.length>0){const t=e.filter(({merchandise:e})=>e.disclosures?.length);return d(Qf,{gap:"base",overflow:"hidden",children:[d(yT,{customizations:h,options:f}),t.map(({stableId:e,merchandise:t})=>d(qf,{size:"small",children:[t.title," ",d(pN,{disclosures:t.disclosures,title:t.title})]},e))]})}const v=i?c.translate("order_summary.collapse_component_information",{count:g}):c.translate("order_summary.expand_component_information",{count:g});return d(y,{children:[d(bN,{open:i,onToggle:l,summary:d(vN,{children:d(qf,{color:"subdued",size:"small",children:v})}),content:d(Df,{paddingBlockStart:"small-400",children:d(Qf,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map(({stableId:e,merchandise:{title:t,subtitle:n,image:r,sellingPlan:a,disclosures:i},quantity:o,properties:s})=>{const l=c.translate("order_summary.component_quantity_title",{quantity:o,product_title:t}),p=nN(u,r);return d(eh,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[d(kN,{alignSelf:"start",children:d(ww,{size:"small",src:p?.one,srcSet:p?`${p.one} 1x, ${p.two} 2x, ${p.four} 4x`:void 0,alt:r?.altText})}),d(kN,{alignSelf:"center",children:d(Qf,{children:[d(qf,i?.length?{size:"small",children:[l," ",d(pN,{disclosures:i,title:t})]}:{size:"small",children:l}),n&&d(qf,{...m,children:n}),a&&d(qf,{...m,children:a.name}),s&&d(ZL,{properties:s})]})})]},e)})})})}),d(CN,{blockSize:"small-400"})]})}function xN({parentTitle:e}){const{i18n:t}=ie(),{lineItems:{optionsColor:n}}=Gm(),r={type:"small",color:n??"subdued"},a=t.translate("order_summary.group_title_label",{group_title:e});return d(cx,{...r,children:a})}function IN(e){return!0===e.checkoutHideZeroValueDiscountLines}function AN({discount:e,amount:t}){const{i18n:n,shop:r}=ie();if(IN(r)&&0===t.amount)return null;const a=t.amount>0?`(${n.formatCurrency(-t.amount,{currency:t.currencyCode,form:"short"})})`:null,i=("code"===e.type&&e.codeHidden?n.translate("order_summary.discount_title"):e.title).toUpperCase();return d(eh,{gridAutoFlow:"column",gridAutoColumns:"1fr",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(oh,{type:"discount",size:"small"}),d(qf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),d(cx,{type:"small",color:"subdued",children:[d(qf,{dir:"auto",children:i}),a?` ${a}`:null]})]},e.title)}function TN({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=ie(),a=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):d(qf,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return d(y,{children:[d(qf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),d(qf,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),d(qf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),d(cx,{size:n,children:a})]})}function LN({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:a,hasFailed:i,size:o}){const{i18n:s}=ie(),{lineItems:{priceTypography:l={}}}=Gm();let c;if(i?c="redundant":"bold"===l.weight&&(c="strong"),n&&e.amount<n.amount)return d(TN,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:o});if(e.amount>t.amount&&"LINE"===r)return d(TN,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:o});const u=0===e.amount&&!a,p=t;return d(qf,{translate:u,letterCase:u?"uppercase":void 0,type:c,tone:i?"critical":void 0,size:o,children:u?s.translate("order_summary.free_total_label"):s.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"})})}function NN({unitPrice:e}){const t=function(e){const{i18n:t}=ie(),r=function(){const{i18n:e}=ie();return n(t=>{switch(t){case"MG":return e.translate("units.milligram");case"G":return e.translate("units.gram");case"KG":return e.translate("units.kilogram");case"ML":return e.translate("units.milliliter");case"CL":return e.translate("units.centiliter");case"L":return e.translate("units.liter");case"M3":return e.translate("units.cubic_meter");case"MM":return e.translate("units.millimeter");case"CM":return e.translate("units.centimeter");case"M":return e.translate("units.meter");case"M2":return e.translate("units.square_meter");case"OZ":return e.translate("units.ounce");case"LB":return e.translate("units.pound");case"FLOZ":return e.translate("units.fluid_ounce");case"PT":return e.translate("units.pint");case"QT":return e.translate("units.quart");case"GAL":return e.translate("units.gallon");case"IN":return e.translate("units.inch");case"FT":return e.translate("units.foot");case"YD":return e.translate("units.yard");case"FT2":return e.translate("units.square_foot");case"ITEM":return e.translate("units.item");default:return t}},[e])}();if(null===e)return"";const{referenceValue:a,referenceUnit:i}=e.measurement,o=r(i),s=a.toString(),l=t.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if("ITEM"===i){if(1===a)return t.translate("order_summary.unit_price.per_item.single",{price:l});if(a>1)return t.translate("order_summary.unit_price.per_item",{price:l,count:a})}else{if(1===a)return t.translate("order_summary.unit_price.per_unit.single",{price:l,unit:o});if(a>1)return t.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:o,count:s})}return""}(e);return null===e?null:d(cx,{type:"small",color:"subdued",children:t})}function RN({unitPrice:e,itemPrice:t,quantity:n}){const{i18n:r,checkout:{negotiator:a}}=ie(),i=a.current.fields.buyerIdentity.value?.purchasingCompany,o=Boolean(i)&&!e&&n>1&&t;return e?d(NN,{unitPrice:e}):o?d(y,{children:d(cx,{type:"small",color:"subdued",children:[d(qf,{accessibilityVisibility:"hidden",children:r.translate("order_summary.price_per_item.label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),d(qf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_per_item.accessibility_label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const MN={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function DN(e="base"){return MN[e]}function ON(e){const t=e.parentRelationship;return d(t?VL:y,{spacing:"small100",children:d(zN,{...e})})}function zN({id:e,quantity:t,itemPrice:n,compareAtPrice:a,unitPrice:i,lineDiscounts:o,deferredAmount:s,totalPrice:l,sellingPlan:c,options:u,recurringTotal:p,title:m,subtitle:h,image:g,properties:f,disclosures:v,isHsaEligible:_,totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:k,components:P,hasReturnability:S,parentTitle:w,parentRelationship:C,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,hidePrice
2:A,className:T}){const{shop:L,i18n:N,embed:R}=ie(),M=nN(R,g),{lineItems:{quantityVisibility:D="visible",priceLayout:O="inline",priceTypography:z={},titleTypography:B={}},merchandiseThumbnail:{size:V}={}}=Gm(),F=L.hasFlagEnabled(ao),U=null!==C,q=F&&a?{amount:a.amount*t,currencyCode:a.currencyCode}:null,j=r(()=>{if(F&&a&&n){const e=(a.amount-n.amount)*t;return e>0?{amount:e,currencyCode:a.currencyCode}:null}return null},[F,a,n,t]),H=z.size,$=U?"small":DN(V),Y=B.size??"base",{blockSize:W}=Aw($),G="hidden"===D||1===t&&"visibleWhenMultiple"===D?void 0:t,J=A?null:d(LN,{totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:k,compareAtTotal:q,presentationLevel:o.length||j?.amount?"LINE":"CART",hasDeferredAmount:Boolean(s?.amount),hasFailed:x,size:H});return d(qL,{className:T,lineOffset:C?0:W/2,children:[d(UL,{inlineAlignment:"start",children:d(ww,{size:$,src:M?.one,srcSet:M?`${M.one} 1x, ${M.two} 2x, ${M.four} 4x`:void 0,alt:g?.altText,totalItems:G})}),d(UL,{primary:!0,alignSelf:"baseline",minBlockSize:`${W}px`,children:d(eN,{id:e,title:m,titleSize:Y,subtitle:h,properties:f,sellingPlan:c,options:u,recurringTotal:p,totalPrice:l,deferredAmount:s,titleAccessory:v?.length?d(y,{children:[" ",d(pN,{disclosures:v,title:m})]}):void 0,blockLayoutContent:"block"===O?J:void 0,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,children:[_?d(qf,{size:"small",color:"subdued",children:N.translate("payment.shop_pay_hsa.eligible_product")}):null,S?d(qf,{size:"small",color:"subdued",children:N.translate("amazon_pay.prime_returnability")}):null,d(RN,{unitPrice:i,itemPrice:n,quantity:t}),j?.amount?d(gN,{amount:j}):null,o.length>0||P.length>0?d(y,{children:[o.map(e=>d(AN,{discount:e.discount,amount:e.amount},e.id)),d(EN,{components:P,id:e})]}):null,P.length<1&&w?d(xN,{parentTitle:w}):null]})}),d(UL,{hidden:!0,children:d(qf,{children:t})}),"inline"===O?d(UL,{alignSelf:"baseline",children:d(Df,{className:"VnYYd",inlineAlignment:"end",children:J})}):null]})}function BN(e){switch(e){case"PICK_UP":return"kAxbv";case"SHIPPING":return"KKoGf";default:return}}function VN(e){return e!==Me.Country&&e!==Me.CountryProvince}function FN({deliveryMethod:e,localDelivery:t,subscriptionDelivery:n}){const{title:r,carrierName:a}=e;return t||n||(!a||r.toLowerCase().includes(a.replace(/[^\w\s]/,"").toLowerCase())?r:`${a} ${r}`)}function UN(e,t,n,r,a){const i=pv(n??[],e?.handle);let o,s,l,c,u=function(e,t,n,r){return t?"unavailable"===n||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}(e?.displayCheckoutRedesign,t,a,i);return r||(o=i?.minDeliveryDateTime||e?.minDeliveryDateTime,s=i?.maxDeliveryDateTime||e?.maxDeliveryDateTime,l=function(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}(i,e?.deliveryPromisePresentmentTitle),c=i?.brandedPromise||e?.brandedPromise,i?.minDeliveryDateTime&&i?.maxDeliveryDateTime&&t&&!c&&(u=!0)),{showEstimatedDeliveryLabel:u,asyncShopPromiseEnabled:t,deliveryExpectationDateTime:i?.minDeliveryDateTime&&i?.maxDeliveryDateTime,estimatedDeliveryLabelTitle:l,minDeliveryDate:o,maxDeliveryDate:s,brandedPromise:c}}function qN(e){const t=[],n=[];return e.forEach(e=>{"SUBSCRIPTION"===e.type?t.push(e):n.push(e)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function jN(e,t,n){const r=pv(t,e.handle);let a;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(a=r),{deliveryExpectation:a,shopPromise:r?.brandedPromise}}function HN(e){return e.reduce((e,{quantity:t})=>e+t,0)}function $N(e){return Object.values(e.reduce((e,t)=>{const{id:n,stableId:r,quantity:a}=t,i=n||r;return i?(e[i]?e[i].quantity+=a:e[i]={...t},e):e},{}))}function YN(e){if(!e)return[];const t=e.reduce((e,t)=>{const n=t?.flatRateGroupId??vl(),r=e[n];if(r){const e=r.targetMerchandiseLines.map(e=>e.digest);t.targetMerchandiseLines.filter(t=>!e.includes(t.digest)).forEach(e=>r.targetMerchandiseLines.push(e))}else e[n]=t;return e},{});return Object.values(t)}function WN(e,t){const n=i(null),r=i(new Set),a=new Set(e),o=n.current,s=null==t?null:new Set(t);if(null!=o){for(const e of a)o.has(e)||null!=s&&!s.has(e)||r.current.add(e);for(const e of r.current)a.has(e)||r.current.delete(e)}return n.current=a,r.current}const GN={position:"end",source:"magnify"};function JN({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:a,deliveryGroup:i}){const[o,l]=s(""),{i18n:c,checkout:u}=ie(),p=new Set(oo(u.proposal.negotiated.fields.paymentMethods.value)),m=void 0===t?n.map(e=>e.key):n.slice(0,t).map(e=>e.key),h=WN(n.map(e=>e.key),m),g=BN(i),{value:f}=li(),{value:v}=u.negotiator.current.fields.deliveryExpectations,_=r(()=>function({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=function(e){const t={};
2return e?.deliveryExpectationLines?.forEach(e=>{e.deliveryStrategyHandle&&(t[e.deliveryStrategyHandle]=e)}),t}(t);return e.forEach(e=>{if("available"!==e.status)return;const t=e.methods.find(t=>t.handle===e.selectedDeliveryMethodHandle);if(!t)return;const{brandedPromise:a,handle:i}=t;if(!a)return;if(a.handle!==io)return;const o=r[i],s=o?.returnability??!1;e.targetMerchandiseLines?.forEach(e=>n[e.stableId]={brandedPromise:a,hasReturnability:s})}),n}({deliveryLines:f,deliveryExpectations:v}),[f,v]),b=r(()=>{const e=o.toLowerCase().split(" ").filter(Boolean);return n.filter(t=>e.every(e=>t.title.toLowerCase().includes(e)||t.subtitle?.toLowerCase().includes(e)))},[o,n]),k=r(()=>b?.reduce((e,t)=>e+t.quantity,0),[b]),P=n.length;return d(y,{children:[e&&d(y,{children:[d(EA,{autoFocus:!0,icon:GN,controlledValue:o,onInput:e=>l(e),label:c.translate("order_summary.more_items_modal.search_item")}),d(CN,{blockSize:"large-300"})]}),e&&o&&d(y,{children:[d(Qf,{direction:"inline",justifyContent:"space-between",children:[d(qf,{color:"subdued",children:c.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:k,totalNumber:a||P||0})}),d(Kf,{onClick:()=>l(""),children:c.translate("order_summary.more_items_modal.clear_search")})]}),d(CN,{blockSize:"large-300"})]}),e&&0===b.length?d(Qf,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[d(Df,{inlineSize:"56px",children:d(oh,{size:"fill",type:"alert-circle"})}),d(cx,{textAlign:"center",children:c.translate("order_summary.more_items_modal.empty_results",{searchText:o})})]}):d(RL,{title:c.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[d(ML,{hidden:!0,children:[d(DL,{hidden:!0,children:c.translate("order_summary.product_image_label")}),d(DL,{hidden:!0,children:c.translate("order_summary.description_label")}),d(DL,{hidden:!0,children:c.translate("order_summary.quantity_label")}),d(DL,{hidden:!0,children:c.translate("order_summary.price_label")})]}),d(zL,{children:b.map(({key:e,...n},r)=>{if(void 0!==t&&r>=t)return null;const a=e.substring(0,e.lastIndexOf("-"));return d(ON,{...n,isHsaEligible:Boolean(n.productId&&p.has(n.productId)),..._[a]??{},className:h.has(e)?g:void 0},e)})})]})]})}function KN({merchandiseLines:e,modalId:t="merchandise-lines-modal",totalLineQuantities:n,deliveryGroup:r}){const{i18n:a}=ie(),i=e.length,o=i>16?12:16;return d(y,{children:[d(JN,{maxItems:o,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>o&&d(Qf,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[d(Yf,{inlineAlignment:"center",commandFor:t,children:a.translate("order_summary.view_all_items",{count:n||i||0})}),d(Hx,{id:t,heading:a.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:d(JN,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function XN({merchandiseLinesByDeliveryType:e}){const{i18n:n}=ie(),r=t(()=>{const t=new Set;return Array.from(e.value.entries()).map(([e,n])=>({group:e,merchandiseLines:n.map(e=>{const n=t.has(e.key);return t.add(e.key),n?{...e,hidePrice:n}:e}),totalLineQuantities:n.reduce((e,t)=>e+t.quantity,0)}))}),a=e=>{switch(e){case"PICK_UP":return n.translate("delivery_options.pickup");case"SHIPPING":return n.translate("delivery_options.ship");case"NOT_REQUIRED":return n.translate("delivery_options.digital_product")}},i=e=>{switch(e){case"PICK_UP":return"merchandise-lines-modal-pick-up";case"SHIPPING":return"merchandise-lines-modal-shipping";case"NOT_REQUIRED":return"merchandise-lines-modal-not-required"}};return d(Qf,{gap:"large-200",children:d($,{each:r,getKey:e=>e.group,children:({group:e,merchandiseLines:t,totalLineQuantities:n})=>d(Qf,{gap:"base",children:[d(TS,{level:2,children:a(e)}),d(KN,{merchandiseLines:t,modalId:i(e),totalLineQuantities:n,deliveryGroup:e})]})})})}function QN({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:i,name:o,remoteShopsConfigMap:s},observability:l}=ie(),c=new Map,u=e.get(i)??[],p=u.length>0;p&&c.set(n.translate("order_summary.from_shop_heading",{shop_name:o}),{lines:u,includeTotalLineQuantities:!0});const m=r(()=>Array.from(e.entries()).filter(([,e])=>e.length>0).filter(([e])=>e!==i),[e,i]),h=m.filter(([e])=>!s?.get(e)?.name).map(([e])=>e),g=h.length>0,f=h.join(",");a(()=>{0!==h.length&&l.error(new eR("Missing remote shop names",{metadata:{shopIdsWithMissingNames:h}}))},[f,l]);const[y,...v]=m,_=y&&0===v.length?s?.get(y[0])?.name:void 0,b=!_,k=r(()=>m.flatMap(([e,t])=>t.map(t=>({...t,...b?{remoteShopName:s?.get(e)?.name}:{}}))),[m,b,s]);if(0===k.length)l.error(new ZN);else{const e=g||p?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),t=_?n.translate("order_summary.from_shop_heading",{shop_name:_}):e;c.set(t,{lines:k,includeTotalLineQuantities:!1})}return d(Qf,{gap:"large-200",children:Array.from(c.entries()).map(([e,{lines:n,includeTotalLineQuantities:r}])=>d(Qf,{gap:"base",children:[d(TS,{level:2,children:e}),d(KN,{merchandiseLines:n,totalLineQuantities:r?t:void 0})]},e))})}class ZN extends ul{constructor(){super("MerchandiseLinesWithRemote should not be used if there aren't any remote merchandise lines"),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}class eR extends ul{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const tR=["PICK_UP","SHIPPING","NOT_REQUIRED"];function nR(e){if(e.length)return e.includes("PICK_UP")?"PICK_UP":e.includes("SHIPPING")||e.includes("LOCAL")?"SHIPPING":e.every(e=>"NONE"===e)?"NOT_REQUIRED":void 0}function rR(e){return nR(e.deliveryMethodTypes)}function aR(e){if("not_required"===e.status)return"NOT_REQUIRED";const t=e.methods.find(({handle:t})=>t===e.selectedDeliveryMethodHandle);return nR(t?[t.methodType]:e.methods.map(({methodType:e})=>e))}function iR(e,t){const n=e.lineAllocations[t];if(n)return{properties:e.properties,quantity:n.quantity,stableId:n.stableId,totalAmountBeforeReductions:n.checkoutPriceBeforeReductions,merchandise:e}}const oR="PP6CV",sR=$c("CollapsibleLineItems"),lR=e=>d(nL,{children:e}),cR=E(function(){const e=T(EL()),n=TL(),{i18n:r,shop:{id:a}}=ie(),i=ac(),{lineItems:{priority:o="base",blockPadding:s,quantityVisibility:l="visible",sectionLayout:c="fixed"},merchandiseThumbnail:{shadow:u}={}}=Gm(),p=Boolean(s),m="hidden"!==l,h=e.value.some(e=>e.quantity>1);let g;m&&("visible"===l||h)?g="product-thumbnails-with-badge":"none"===u&&"high"===o?g=void 0:null!=u&&"extraSmall"!==u||(g="product-thumbnails");const f=t(()=>"thankYou"===i.value.currentDetour?.type?{dynamicRender:"Checkout::ThankYou::Dynamic::Render",cartLinesRenderAfter:"Checkout::ThankYou::CartLines::RenderAfter"}:{dynamicRender:"Checkout::Dynamic::Render",cartLinesRenderAfter:"Checkout::CartLines::RenderAfter"}).value,y=Kw(f.dynamicRender,"ORDER_SUMMARY1"),v=Kw(f.dynamicRender,"ORDER_SUMMARY2"),_=Kw(f.cartLinesRenderAfter),b=t(()=>Array.from(n.value.values()).reduce((e,t)=>
2e+t.reduce((e,t)=>e+t.quantity,0),0)),k=t(()=>Array.from(n.value.entries()).some(([e,t])=>e!==a&&t.length>0)),P=t(()=>e.value.length>0||k.value),S=function(){const e=vI(),n=ac(),r=T(EL()),{checkout:{negotiator:a}}=ie(),{deliveryNext:i,merchandiseLines:o}=a.current.fields,{deliveryLines:s,merchandiseLines:l}=a.parts;return t(()=>{const t=r.value,a=new Map;if(0===t.length)return a;if(!e.value)return a;const c=function(...e){const t=new Map;for(const n of e)for(const e of n??[])for(const n of e.lineComponents){if(t.has(n.stableId))continue;const r=new Map;e.lineAllocations.forEach((e,t)=>{const a=iR(n,t);a&&r.set(e.stableId,a)}),r.size>0&&t.set(n.stableId,{parentStableId:e.stableId,componentsByParentAllocationStableId:r})}return t}(o.value?.lines,l.value),u=new Map;for(const e of t){if(!e.stableId)return a;const t=u.get(e.stableId);t?t.push(e):u.set(e.stableId,[e])}const d=new Map,p=new Set,m=(e,t,n)=>{const r=d.get(e)??new Map;if(!n)return r.set(t.key,t),d.set(e,r),void p.add(t.key);const a=r.get(t.key)?.components??[];r.set(t.key,{...t,components:a.some(({stableId:e})=>e===n.stableId)?a:[...a,n]}),d.set(e,r),p.add(t.key)},h=[],g=new Map,f=(e,t)=>{const n=t.requiresShipping?e:"NOT_REQUIRED";if(!n)return!1;const r=c.get(t.stableId),a=r?.parentStableId??t.stableId;if(!r){const e=g.get(a)??new Set;e.add(n),g.set(a,e)}return h.push({bundleComponent:r,group:n,parentStableId:a}),!0};if(s.value.flatMap(e=>e.value.targetMerchandiseLines??[]).some(e=>{const t=c.get(e.stableId)?.parentStableId??e.stableId;return u.has(t)})&&!gv(n.value.currentDetour))for(const e of s.value){const t=rR(e.value);for(const n of e.value.targetMerchandiseLines??[])if(!f(t,n))return a}else if("unavailable"!==i.value?.status)for(const e of i.value?.lines??[]){const t=aR(e);for(const n of e.targetMerchandiseLines??[])if(!f(t,n))return a}if(Array.from(g.values()).some(e=>e.size>1))return a;const y=({bundleComponent:e,group:t,parentStableId:n})=>{const r=u.get(n);if(!r)return!0;for(const a of r){if(!e){m(t,a);continue}if(!a.id)return!1;const n=e.componentsByParentAllocationStableId.get(a.id);if(!n)return!1;m(t,a,n)}return!0};for(const e of h)if(!y(e))return a;if(t.some(({key:e})=>!p.has(e)))return a;const v=new Map;for(const e of tR){const t=d.get(e);t?.size&&v.set(e,Array.from(t.values()))}return v})}(),w=t(()=>!k.value&&S.value.size>1),C="collapsible"===c&&!k.value&&e.value.length>1,E=d(lA,{bleed:g,overflow:"auto hidden",maxBlockSize:"@media (inline-size >= medium) 40vh, none",padding:p?"none":"none none small-500 none",hint:{type:"pill",content:r.translate("order_summary.scroll_order_summary")},accessibilityRole:"section",accessibilityLabel:r.translate("order_summary.shopping_cart_label"),children:d(x,{when:k,fallback:d(x,{when:w,fallback:d(KN,{merchandiseLines:e.value,totalLineQuantities:b.value}),children:d(XN,{merchandiseLinesByDeliveryType:S})}),children:d(QN,{merchandiseLinesByShop:n.value,totalLineQuantities:b.value})})});return d(x,{when:P,children:d(Qf,{gap:"large-200",children:[d(yT,{customizations:y,render:lR}),d(nL,{children:C?d(uR,{merchandiseLines:e.value,showQuantityBadges:m,children:E}):E}),d(yT,{customizations:_,render:lR}),d(yT,{customizations:v,gap:"large-200",render:lR})]})})});function uR({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=m(!0),{i18n:a}=ie(),{size:i}
2=Gm().merchandiseThumbnail??{},o=DN(i),s=a.translate("order_summary.number_items",{count:t.reduce((e,t)=>e+t.quantity,0)}),l=Yc(void 0,sR),{blockSize:c}=Aw(o),u=function(e){return e.map(e=>({stableId:e.stableId??e.key,image:e.image,quantity:e.quantity,totalPrice:e.totalPrice}))}(t),p=()=>d(qf,{children:s}),h=e=>d(eh,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[d(Df,{minInlineSize:"0",overflow:"hidden",children:e}),d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:[p(),d(oh,{type:"chevron-down",size:"small-100"})]})]}),g=()=>d(Qf,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[p(),d(oh,{type:"chevron-up",size:"small-100"})]});return d(Df,{position:"relative",minBlockSize:`${c}px`,children:[d(Ld,{id:`${l}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:d(Qf,{gap:"base",children:[d("div",{"aria-hidden":"true",children:g()}),d("div",{id:l,children:e})]})}),d(Ld,{id:`${l}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:d("div",{"aria-hidden":"true",children:h(d(dR,{thumbnailMerchandise:u,thumbnailSize:o,showQuantityBadges:n}))})}),d("div",{className:"tndLB",children:[d("div",{"aria-hidden":"true",className:"anPJT",children:[d(Ld,{id:`${l}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:g()}),d(Ld,{id:`${l}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:h(d("div",{className:oR,children:d(jI,{variant:"inline-discrete",merchandise:u.slice(0,1),size:o,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),d("div",{className:"vv9lW",children:d(Km,{accessibilityLabel:s,"aria-controls":l,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:()=>{r.value=!r.value}})})]})]})}function dR({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:a}=sL(t);return d("div",{ref:r,className:oR,children:d(jI,{variant:"inline-discrete",merchandise:e,size:t,max:a.value,useImageAltTexts:!1,showQuantityBadges:n})})}function pR(){const e=i();return a(()=>()=>{const t=e.current;t&&_l.containers.delete(t)},[]),t=>{t&&(e.current&&_l.containers.delete(e.current),_l.containers.add(t),e.current=t)}}const mR=f({spacing:"auto"});function hR({spacing:e,children:t}){const n=r(()=>({spacing:e}),[e]);return d(mR.Provider,{value:n,children:t})}function gR(){return h(mR)}var fR={colorVariant:{base:"nfgb6p5",subdued:"nfgb6p6"},groupSpacingVariant:{auto:"nfgb6p9","small-200":"nfgb6pa","small-300":"nfgb6pb","small-400":"nfgb6pc","small-500":"nfgb6pd"},spacingVariant:{auto:"nfgb6p7",none:"nfgb6p8"},visuallyHidden:"nfgb6p4 _1fragem121",MoneyLines:"nfgb6p3 nfgb6p2 _1fragem6t"},yR={Content:"_1qy6ue68",contentColSpan:"_1qy6ue69",Header:"_1qy6ue67",MoneyLine:"_1qy6ue60",itemSizeVariant:{inherit:"_1qy6ue65",auto:"_1qy6ue66"},layoutVariant:{inherit:"_1qy6ue63 _1qy6ue61 _1fragem7x _1fragem9q _1fragem6t",stackable:"_1qy6ue64 _1qy6ue62 _1fragem64 _1fragem7s _1fragema5 _1fragem7d"}};function vR(e){return"children"in e&&gw(e.children)}function _R(e){const{spacing:t}=gR(),{moneyLines:{color:n="base"}}=Gm(),{itemSize:r="inherit",layout:a="inherit",color:i}=e,o=i??n,s=v(yR.MoneyLine,r&&yR.itemSizeVariant[r],t&&fR.groupSpacingVariant[t],a&&yR.layoutVariant[a]);return d("div",{className:s,role:"row",children:vR(e)?e.children:d(y,{children:[d(bR,{children:d(qf,{color:e.labelColor,children:e.label})}),d(kR,{loading:e.loading,children:e.loading?d(zw,{size:e.size,emphasis:"strong"===e.type?"bold":void 0,children:e.value}):d(qf,{type:e.type,size:e.size,translate:!1,color:o,children:e.value})})]})})}function bR({children:e}){return d("div",{className:yR.Header,role:"rowheader",children:e})}function kR({children:e,loading:t,colSpan:n}){return d("div",{className:n?yR.contentColSpan:yR.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const PR=$c("MoneyLine-Heading"),SR=_(function(e,t){const{children:n,title:r,titleHidden:a=!0,spacing:i="auto"}=e,o=Yc(void 0,PR),s=Qu(),{moneyLines:{color:l="base"}}
2=Gm(),c=d(TS,{id:o,children:r});return d(y,{children:[a?d("div",{className:fR.visuallyHidden,children:c}):c,d("div",{role:"table","aria-labelledby":o,children:[d("div",{role:"rowgroup",className:fR.visuallyHidden,children:d("div",{role:"row",children:[d("div",{role:"columnheader",children:s("moneyLinesHeaderItem")}),d("div",{role:"columnheader",children:s("moneyLinesHeaderValue")})]})}),d("div",{role:"rowgroup",className:v(fR.MoneyLines,fR.colorVariant[l],fR.spacingVariant[i]),ref:t,children:n})]})]})});function wR({children:e}){return"function"==typeof e?e():e}function CR({children:e}){let t,n;return Y.forEach(e,e=>{var r;W(e)&&(t||void 0===e.props.condition?n||e.type!==wR||(n=e):("function"==typeof(r=e.props.condition)?r():r)&&(t=e))}),t??n??null}function ER({condition:e,children:t,skeletonContent:n,...r}){return d(y,{children:[d(zw,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),d(qf,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}CR.When=function({children:e}){return"function"==typeof e?e():e},CR.Fallback=wR;const xR=$c("TaxesTooltip");function IR({label:e,subdueText:t}){const{i18n:n,source:r}=ie(),a=Yc(void 0,xR);return d(y,{children:[d(qf,{color:t?"subdued":void 0,children:e}),d(oh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),d(um,{id:a,children:"paymentCollection"===r.type?n.translate("order_summary.estimated_taxes_finalization_tooltip_content_short"):n.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}function AR({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:a=!1,subdueText:i}){const{i18n:o}=ie(),s=i?"subdued":void 0;return d(_R,{color:s,children:[d(bR,{children:d(CR,{children:[d(CR.When,{condition:Boolean(r),children:d(qf,{color:s,children:r})}),d(CR.When,{condition:Boolean(a),children:d(qf,{color:s,children:o.translate("order_summary.taxes_label")})}),d(CR.Fallback,{children:d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:d(IR,{label:o.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),d(kR,{children:d(Qf,{direction:"inline",gap:"small-200",children:[t?d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(IR,{subdueText:i,label:o.translate("order_summary.estimated_taxes_label_short")}),d(qf,{color:s,children:"•"})]}):null,d(ER,{condition:n,color:s,children:n?"$0.00":o.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const TR={marginTop:"0"};function LR({id:e,title:t,subdueTitle:n,tooltipText:r,children:a,item:i,hideHeaderItemWhenOpen:o=!1,defaultOpen:s=!1}){const{i18n:l}=ie(),c=m(s);return d(y,{children:[d(_R,{children:[d(bR,{children:d(Qf,{direction:"inline",gap:"small-200",alignItems:"center",children:[d(Km,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.value},children:d(eh,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-200",alignItems:"center",alignContent:"center",justifyContent:"start",justifyItems:"start",children:[d(cx,{color:n?"subdued":void 0,textAlign:"start",children:t}),d(oh,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?d(Km,{accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t}),overlay:d(um,{children:r}),children:d(oh,{type:"question-circle",size:"small"})}):null]})}),!i||o&&c.value?null:i]}),d("div",{style:TR,children:d(Ld,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:a})})]})}function NR(){const{checkout:e}
2=ie(),n=e.negotiator.current.fields.taxes,r=so();return t(()=>{const t=e.proposal.facts.tax,a=n.value,i=t||("available_total_included"===a?.status?a.totalIncludedInTarget:null);return{localTotalTaxIncluded:i,totalTaxIncluded:r.value??i}})}function RR(){const{i18n:e}=ie(),n=NR();return t(()=>{const{totalTaxIncluded:t}=n.value;return null===t?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function MR({label:e}){return d(hR,{spacing:"small-500",children:d(_R,{children:[d(bR,{children:d(cx,{color:"subdued",children:d(mA,{children:e})})}),d(kR,{})]})})}function DR({taxesIncluded:e,variant:n,shopId:r}){const{i18n:a}=ie(),i=lo(),{localTotalTaxIncluded:o,totalTaxIncluded:s}=NR().value,l=RR(),c=co(o),u=t(()=>[...c.value.entries()]),p=t(()=>i.value&&u.value.length>1);if(r){const e=c.value.get(r);if(!e||0===e.totalTax.amount||"available_total"===e.status)return null;const t=a.translate("order_summary.vat_label_html",{amount:a.formatCurrency(e.totalTax.amount,{currency:e.totalTax.currencyCode,form:"short"})});return d(MR,{label:t})}return e&&null!==s&&null!==l.value&&0!==s.amount?"card"===n?d(Df,{children:d(cx,{color:"subdued",children:d(mA,{children:l})})}):d(x,{when:p,fallback:d(MR,{label:l.value}),children:d(LR,{id:"included-tax-money-line",title:l.value,children:d(hR,{spacing:"small-400",children:d($,{each:u,getKey:([e])=>e,children:([,e])=>d(AR,{totalTax:e.totalTax,taxesLabel:e.shopName,showMoneyLineTaxesTooltip:"available_total"===e.status,subdueText:!0})})})})}):null}function OR({title:e,value:t,color:r,labelColor:a}){const i=function(){const{i18n:e}=ie();return n(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}();return d(_R,{label:e,value:i(t),color:r,labelColor:a})}function zR({variant:e,shopId:n}){const{checkout:r}=ie(),{value:a}=r.negotiator.current.fields.deferredTotal,i=ct(),o=uo(),s=t(()=>o.value||Boolean(r.proposal.facts.taxesIncluded)),{value:l}=r.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,c=a&&a.amount.amount>0,u=Ei(),p=zI(),m=t(()=>Boolean(u.value&&!p.value)),h=function(e,t){const{i18n:n}=ie(),r=II();if(e){const t=r(e,{month:"short"});return n.translate("order_summary.deferred_total_due_date_label_next",{date:t})}return t?n.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):n.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}(a?.dueAt||(l?.dueDate?new Date(l.dueDate):null),"FULFILLMENT"===l?.type);return!c||i.value?null:d(y,{children:["card"===e?d(Df,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(OR,{title:h,value:a.amount,color:"subdued",labelColor:"subdued"})}):d(hR,{spacing:"small-300",children:d(OR,{title:h,value:a.amount})}),"card"!==e&&d(x,{when:m,children:()=>d(DR,{taxesIncluded:s.value,shopId:n})})]})}const BR=$c("ShippingTooltip");function VR({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=ie(),a=Yc(void 0,BR),i="shipping-policy",o=t.translate("shop_policies.shipping_policy"),{localPolicies:s}=Ni(),l=r.some(e=>e.handle===i),c=e??(l?s.find(e=>e.handle===i):void 0);if(!c)return null;const u=t.translate("tooltip.accessibility_label_context",{context:o});return yr(n?.embedder)?c.url?d(Km,{accessibilityLabel:u,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(c.url),children:d(oh,{type:"question-circle",size:"small"})}):null:d(y,{children:[d(Km,{accessibilityLabel:u,commandFor:a,children:d(oh,{type:"question-circle",size:"small"})}),d(HA,{id:a,defaultPolicy:c})]})}function FR(e){return"SUBSCRIPTION"===e?"subscription":"oneTimePurchase"}function UR(e,t){const n=t?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,type:(r=e.methodType,"LOCAL"===r?"local":"shipping"),carrier:{name:e.carrierName||void 0},cost:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},costAfterDiscounts:{amount:e.costAfterDiscounts.amount,currencyCode:e.costAfterDiscounts.currencyCode},deliveryEstimate:jR(e),code:e.code||"",metafields:n||[]};var r}function qR(e,t){const n=t?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,code:e.code||"",type:"pickup",location:{address:{address1:e.pickupLocation?.address.address1,address2:e.pickupLocation?.address.address2,city:e.pickupLocation?.address.city,countryCode:e.pickupLocation?.address.countryCode,phone:e.pickupLocation?.address.phone,zip:e.pickupLocation?.address.postalCode,provinceCode:e.pickupLocation?.address.zoneCode,...KR(e.pickupLocation?.address)}},metafields:n||[]}}function jR(e){return{timeInTransit:HR(e.estimatedTimeInTransit)}}function HR(e){if(e)return"number"==typeof e?{lower:e,upper:e}:{lower:e.lower,upper:e.upper}}function $R({line:e,extensionContext:t,observability:n,proposedSelectedDeliveryMethodHandles:r,lines:a}){if("available"===e.status){const i=function(e,t,n){return e.map(e=>{switch(e.methodType){case"SHIPPING":case"LOCAL":return UR(e,n);case"PICK_UP":return function(e,t,n){const r=function({pickupLocation:e,methodType:t},n){if("PickupInStoreLocation"===e?.type){const{address:t}=e;return{name:e?.name,address:{name:t.name,firstName:t.firstName,lastName:t.lastName,company:t.company,address1:t.address1,address2:t.address2,city:t.city,zip:t.postalCode,countryCode:t.countryCode,provinceCode:t.zoneCode,phone:t.phone,...KR(t)}}}const r=`Invalid pickupLocation type ${e?.type} for ${t} delivery method`;n?.error(new QR(r))}(e,t);if(null==r)return;const a=n?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,code:e.code||"",type:"pickup",location:r,metafields:a||[]}}
2(e,t,n);case"PICKUP_POINT":return function(e,t,n){const r=function({pickupLocation:e,methodType:t},n){if("PickupPointLocation"===e?.type){const{name:t,address:n,handle:r}=e;return{name:t,handle:r,address:{name:n.name,firstName:n.firstName,lastName:n.lastName,company:n.company,address1:n.address1,address2:n.address2,city:n.city,zip:n.postalCode,countryCode:n.countryCode,provinceCode:n.zoneCode,phone:n.phone,...KR(n)}}}const r=`Invalid pickupLocation type ${e?.type} for ${t} delivery method`;n?.error(new QR(r))}(e,t);if(null==r)return;const a=n?.filterMetafieldsByExtensionId(e.metafields);return{handle:e.handle,title:e.title||void 0,description:e.description||void 0,code:e.code||"",type:"pickupPoint",cost:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},costAfterDiscounts:{amount:e.costAfterDiscounts.amount,currencyCode:e.costAfterDiscounts.currencyCode},carrier:{name:GR(e),code:JR(e)},location:r,metafields:a||[]}}(e,t,n);case"RETAIL":case"NONE":return;default:{const n=`Unknown delivery method type: ${e.methodType}`;return void t?.error(new QR(n),{metadata:{deliveryMethod:{type:e.methodType,handle:e.handle}}})}}}).filter(e=>null!=e)}(e.methods,n,t);return{targetedCartLines:YR(e.targetMerchandiseLines??[],a),deliveryOptions:i,selectedDeliveryOption:WR(e,i,r),groupType:FR(e.type),isDeliveryRequired:!0,id:XR(e.id)}}return{targetedCartLines:YR(e.targetMerchandiseLines,a),deliveryOptions:[],selectedDeliveryOption:void 0,groupType:FR(e.type),isDeliveryRequired:!1,id:XR(e.id)}}function YR(e,t){return t?t.filter(t=>e.some(e=>e.stableId===t.stableId)).flatMap(({lineAllocations:e})=>e.map(e=>({id:`gid://shopify/CartLine/${e.stableId}`}))):[]}function WR(e,t,n){if(0===t.length)return;const r=e.methods.map(e=>e.handle),a=n.find(e=>e&&r.includes(e))||e.selectedDeliveryMethodHandle;return a?{handle:a}:void 0}function GR({pickupLocation:e}){if("PickupPointLocation"===e?.type)return e.carrierName}function JR({pickupLocation:e}){if("PickupPointLocation"===e?.type)return e.carrierCode}function KR(e){const t=e?.coordinates;return null==t?.latitude||null==t.longitude?{}:{latitude:t.latitude,longitude:t.longitude}}function XR(e){if(e)return jn("DeliveryGroup",le(e))}class QR extends Error{constructor(e){super(e),this.name="DeliveryError"}}function ZR(e){return e.reduce((e,{total:t})=>e+(t?.amount||0),0)}function eM({checkout:e}){return e.proposal.facts.requiresShipping??!0}function tM({size:e,strong:t=!0}){const{i18n:n}=ie(),r=t?"strong":void 0;return d(y,{children:[d(qf,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),d(qf,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function nM({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:a,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:o,getLinePrice:s,getPriceLetterCase:l}){const{i18n:c,shop:u}=ie(),p=u.hasFlagEnabled(mo),m=e.length>0,h=e[0]?.currencyCode,g=e[0]?.type,{priceBeforeDiscounts:f,priceAfterDiscounts:y}=i??u.marketDrivenShippingEnabled?Il(e,o):Al(e),v=m&&f&&f>y&&!p,_=s(y,g),b=d(ER,{condition:t,color:n,type:"bold"===r?"strong":void 0,translate:!1,letterCase:l(y,g),children:_});return t?b:a?d(tM,{strong:!1}):v?d(Qf,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[d(qf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.original_price")}),d(qf,{size:"base",color:"subdued",type:"redundant",translate:!1,children:c.formatCurrency(f,{currency:h})}),d(qf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const rM=({getLinePrice:e,getPriceLetterCase:n,label:a,moneyLines:i,finalMoneyLines:o,forceSubduedStyle:s,discountLines:l,shippingTooltip:c,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})=>{const h=ac(),g=t(()=>"information"===h.value.currentPage?.id),{shop:f,checkout:v,i18n:_}=ie(),b=!f.hasFlagEnabled(mo),{value:k}=v.negotiator.current.fields.deliveryNext,P=Tt(),S=vn("deliveryNext").value,w=iI("deliveryNext").value||!!P.value&&S,C=v.proposal.facts.delivery??[],E=function(e){const{checkout:t}=ie(),n=t.proposal.facts.delivery??[],r=new Set(e);return n.flatMap(({deliveryGroups:e,lines:t})=>r.size>0&&e?.length?e.filter(({methodType:e})=>r.has(e)).flatMap(({deliveryLines:e})=>e):t).flatMap(({appliedDiscounts:e})=>e).filter(e=>e.amountDiscounted?.amount&&e.amountDiscounted?.amount>0)}([...new Set(o.flatMap(({methodType:e})=>void 0===e?[]:[e]))]),x=v.configuration.layout.isOnePage.value,I=r(()=>!i.length&&!C.length||w,[]),A=Boolean("unavailable"===k?.status)||w||s,T=l?.filter(e=>Tl(e))??[],L=E.length?[...new Set(E.map(e=>e.label))]:[...new Set(T.map(e=>El(e)&&"code"===e.discount.type&&e.discount.codeHidden?_.translate("order_summary.discount_title"):e.title))],N=b?L.map(e=>d(eh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(oh,{type:"discount",size:"small"}),d(vA,{children:d(qf,{color:"subdued",children:e.toUpperCase()})})]},e)):[],R=A||s,M=(g.value||x)&&c,D=s?"subdued":void 0;return d(y,{children:[d(_R,{itemSize:I?"auto":void 0,color:D,children:[d(bR,{children:d(Qf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(qf,{color:D,children:a}),M]})}),d(kR,{loading:w,children:d(nM,{getLinePrice:e,getPriceLetterCase:n,appearance:R?"subdued":void 0,moneyLines:o,deliveryLoading:w,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})})]}),N.length>0&&d(hR,{spacing:"small-400",children:d(_R,{children:d(bR,{children:N})})})]})},aM=({shopId:e,forceSubduedStyle:n})=>{const{checkout:r,i18n:a,shop:{id:o,marketDrivenShippingEnabled:s,remoteShopsConfigMap:l},source:c}=ie(),u=r.negotiator.current.fields.deliveryNext.value,p=Tt(),m=vn("deliveryNext"),h=iI("deliveryNext"),g=h.value||!!p.value&&m.value,f=r.configuration.layout.isOnePage.value,v=r.proposal.facts.delivery,_=Be(),b=Dr(_.value.enabledDeliveryMethods),k=aI(),P=k?.selected.value??[],S=P.length>0,w=ho(P).length>0,C=P.includes("PICK_UP"),E=Boolean(e),{visibility:x}
2=r.configuration,I=r.negotiator.current.fields.discountLines.value,A=sb(),T=function(){const{checkout:e}=ie(),t=e.proposal.facts.delivery??[],n=function(){const{checkout:e}=ie(),t=e.proposal.facts.delivery??[];return ZR(t)-t.flatMap(e=>e.lines.flatMap(e=>e.appliedDiscounts)).reduce((e,{amountDiscounted:t})=>(t?.amount||0)+e,0)}(),r=ZR(t),a=t.flatMap(({deliveryGroups:e})=>e??[]);return a.length>0?a.map(({groupType:e,methodType:t,total:n,deliveryLines:r})=>{const a=r.flatMap(({appliedDiscounts:e})=>e).reduce((e,{amountDiscounted:t})=>e+(t?.amount??0),0);return{type:e,methodType:t,cost:n.amount-a,costBeforeDiscounts:n.amount,currencyCode:n.currencyCode}}):null==t[0]?.total?null:[{type:"ONE_TIME_PURCHASE",cost:n,costBeforeDiscounts:r,currencyCode:t[0]?.total?.currencyCode}]}(),L=go(e),{allMoneyLines:N,moneyLinesForShop:R}=L.value,M=lo(),D=ac(),O="review"!==D.value.currentPage?.id&&(!g||M.value),z=a.translate("order_summary.pickup_label"),B=a.translate("order_summary.shipping_label"),V=i(b?z:B),F=t(()=>{const e=Dr(_.value.enabledDeliveryMethods)?z:B;if(!(h.value||p.value&&m.value)){const t=L.value.moneyLinesForShop,n=Hn(c)?v?.[0]?.pickupAddress:t.length>0&&t.every(e=>"PICK_UP"===e.methodType);V.current=n?z:e}return V.current}).value,U=Boolean(u&&"filled"===u.status&&u.lines.some(({status:e})=>"not_required"!==e)),q=!g&&!U&&!r.isShippingRequired.value,j=T||R,H=j.filter(function(e){return void 0!==e.methodType}),$=H.filter(e=>"PICK_UP"!==e.methodType),Y=H.filter(e=>"PICK_UP"===e.methodType),W=0===j.length||H.length>0,G=!E&&!Hn(c)&&S&&W,J=G&&C&&!w,K=G&&w,X=J?z:B,Q=t(()=>Boolean(Hn(c)&&eM({checkout:r})&&ib({checkout:r,source:c})?.lines.length));if(A.value)return null;if(!(x.showShippingLines.value&&!Hn(c)||Q.value))return null;if(q)return null;if(E&&0===j.length)return null;if(E){const t=j.some(e=>le(e));return d(rM,{getLinePrice:de,getPriceLetterCase:ue,label:F,forceSubduedStyle:n,moneyLines:R,finalMoneyLines:j,discountLines:e===o?I?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:t,getRateGroupMaxKey:ce})}if(M.value&&j.length>1){const e=j.some(e=>le(e)),t=function(e){const t=new Map;for(const n of e){const e=n.shopId??o,r=t.get(e);r?r.lines.push(n):t.set(e,{shopName:n.shopName??F,lines:[n]})}return[...t.values()]}(j);return d(LR,{id:"shipping-money-line",title:F,hideHeaderItemWhenOpen:!0,item:d(kR,{loading:g,children:d(nM,{getLinePrice:de,getPriceLetterCase:ue,moneyLines:j,deliveryLoading:g,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce})}),children:d(hR,{spacing:"small-400",children:t.map(({shopName:t,lines:n})=>{const r=n.find(e=>e.shippingPolicy)?.shippingPolicy,a=n.some(e=>(e.shopId??o)===o&&e.hasLocalDiscountApplied);return d(rM,{getLinePrice:de,getPriceLetterCase:ue,label:t,forceSubduedStyle:!0,moneyLines:N,finalMoneyLines:n,discountLines:a?I?.lines:void 0,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce,shippingTooltip:O&&r?d(VR,{defaultPolicy:r}):void 0},n[0]?.shopId??t)})})})}if($.length>0&&Y.length>0)return oe({});if(G&&w&&C)return oe({shippingGetLinePrice:$.length>0?de:pe,shippingGetPriceLetterCase:$.length>0?ue:me,pickupGetLinePrice:he,pickupGetPriceLetterCase:ge});let Z=N,ee=j,te=de,ne=ue,re=F,ae=O?d(VR,{defaultPolicy:null}):void 0;return J?(Z=Y,ee=Y,te=he,ne=ge,re=X,ae=void 0):K&&(Z=$,ee=$,re=X,0===$.length&&(te=pe,ne=me)),d(rM,{getLinePrice:te,getPriceLetterCase:ne,label:re,forceSubduedStyle:n,moneyLines:Z,finalMoneyLines:ee,discountLines:I?.lines,shippingTooltip:ae});function oe({shippingGetLinePrice:e=de,shippingGetPriceLetterCase:t=ue,pickupGetLinePrice:r=de,pickupGetPriceLetterCase:a=ue}){const{shippingDiscountLines:i,pickupDiscountLines:o}=Ll(u,I?.lines);return d(y,{children:[d(rM,{getLinePrice:e,getPriceLetterCase:t,label:B,forceSubduedStyle:n,moneyLines:$,finalMoneyLines:$,discountLines:i,shippingTooltip:O?d(VR,{defaultPolicy:null}):void 0}),d(rM,{getLinePrice:r,getPriceLetterCase:a,label:z,forceSubduedStyle:n,moneyLines:Y,finalMoneyLines:Y,discountLines:o,shippingTooltip:void 0})]})}function se(e){return e.every(e=>"SUBSCRIPTION"===e.type)}function le(e){const t=e.shopId??o;if(t===o)return s;const n=l?.get(t);return n?n.marketDrivenShippingEnabled:Boolean(e.amountCombinabilityToken)}function ce(e){const t=e.amountCombinabilityToken??void 0;if(t&&le(e))return`${e.shopId??o}:${t}`}function ue(e,t){return b?"uppercase":g||void 0===e||!N.length&&!v?.length||0!==e?"none":"SUBSCRIPTION"!==t||se(N)?"uppercase":"none"}function de(e,t){if(g)return"$0.00";if(void 0!==e&&(N.length||v?.length)){const n="SUBSCRIPTION"!==t||se(N)?a.translate("order_summary.free_shipping_total_label"):a.translate("shipping.subscription_delivery_description.shipping_price_included");if(0===e)return n;const r=Hn(c)?v?.[0]?.total?.currencyCode:function(e){const[t]=e;if(!t)throw new QR("Formatting a shipping price requires a shipping money line");return t.currencyCode}(N);return a.formatCurrency(e,{currency:r,form:"short"})}return b?a.translate("order_summary.free_shipping_total_label"):f?a.translate("order_summary.enter_shipping_address"):a.translate("order_summary.shipping_default_value")}function pe(){return de(void 0)}function me(){return ue(void 0)}function he(e,t){return Y.length||v?.length?de(e,t):g?"$0.00":a.translate("order_summary.free_shipping_total_label")}function ge(e,t){return Y.length||v?.length||g?ue(e,t):"uppercase"}},iM=$c("ReductionTooltip");function oM({type:e}){const{i18n:t,shop:{name:n}}=ie(),r=Yc(void 0,iM),a="giftCard"===e?t.translate("order_summary.gift_cards_apply_to_local_shop",{shop_name:n}):t.translate("order_summary.order_discounts_apply_to_local_shop",{shop_name:n});return d(y,{children:[d(oh,{type:"question-circle",size:"small",interestFor:r}),d(um,{id:r,children:d(qf,{children:a})})]})}function sM({line:e,title:t,amount:n}){const{i18n:r,source:a,shop:i}=ie(),o=Hn(a)&&n,s=IN(i);if(e&&!El(e)||e&&"CART"!==e.discount.presentationLevel||e&&0===e.amount?.amount&&s)return null;if(e&&(Tl(e)||0===e.allocations.length))return null;let l=e?.title;return e&&"custom"===e.discount.type&&""===e.title&&(l=r.translate("order_summary.custom_discount")),e&&"code"===e.discount.type&&e.discount.codeHidden&&(l=r.translate("order_summary.discount_title")),d(_R,{children:[d(bR,{children:d(eh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(oh,{type:"discount",size:"small"}),d(vA,{children:d(qf,{color:"subdued",children:e?l?.toUpperCase():t?.toUpperCase()})})]})}),d(kR,{children:d(qf,{translate:!1,children:o?(c=n,r.formatCurrency(-c.amount,{currency:c.currencyCode,form:"short",spacedMinusSign:!0})):e&&lM({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]});var c}function lM({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(e=>"DELIVERYLINE"===e.target.type)||0===e.allocations.length)return t;if(El(e)){const t=e.amount?.amount,r=e.amount?.currencyCode;if(t&&r)return n.formatCurrency(-t,{currency:r,form:"short",spacedMinusSign:!0})}}const cM=({disableTooltip:e=!1})=>{const{i18n:n,checkout:r,source:a,shop:i}
2=ie(),o=r.negotiator.current.fields.discountLines,s=r.proposal.facts.orderDiscounts??[],l=Hn(a)&&s,c=IN(i),u=lo(),p=t(()=>{return e=o.value?.lines,t=c,e?.filter(e=>El(e)&&fo(e)&&!(t&&0===e.amount?.amount))??[];var e,t}),m=t(()=>!e&&u.value),h=t(()=>p.value.length>0),g=t(()=>n.translate("order_summary.discount_order_stacking",{count:p.value.length}));return d(y,{children:[d(x,{when:h,children:()=>d(_R,{children:d(bR,{children:d(eh,{gridAutoFlow:"column",gridTemplateColumns:m.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(qf,{children:g}),d(x,{when:m,children:d(oM,{type:"discount"})})]})})})}),d(hR,{spacing:"small-500",children:[d($,{each:p,getKey:e=>e.title,children:e=>d(sM,{line:e})}),l&&s.map(e=>d(sM,{title:e.label,amount:e.amount},e.label))]})]})};function uM(e,t){return e||("available_total"===t?.status?t.totalDuty:null)}const dM=$c("DutyMoneyLineTooltip");function pM({shopId:e}){const{i18n:t,checkout:n,shop:r}=ie(),{value:a}=n.negotiator.current.fields.landedCostDetails,i=vn("landedCostDetails").value,o=vn("duties").value,s=n.proposal.facts.duty,{value:l}=n.negotiator.current.fields.duties,c=Yc(void 0,dM);if(e&&e!==r.id)return null;const u=uM(s,l),p=a?.incoterm===Nl.Ddu&&a.reason===Rl.ErrorOccured,m=(o||i)&&!s&&!p,h=u||p,g=p?"subdued":void 0,f=d(Qf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(qf,{children:t.translate("order_summary.duties_label")}),p&&!m&&d(y,{children:[d(oh,{type:"question-circle",interestFor:c,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),d(um,{id:c,children:t.translate("order_summary.error_duties_tooltip")})]})]}),v=p?t.translate("order_summary.may_be_charged_on_delivery"):u&&t.formatCurrency(u.amount,{currency:u.currencyCode,form:"short"});return d(y,{children:h&&d(_R,{color:g,children:[d(bR,{children:f}),d(kR,{children:d(Qf,{direction:"inline",gap:"small-200",children:d(ER,{condition:m,children:m?"$0.00":v})})})]})})}function mM({data:e,loading:t,totalTax:n}){const{i18n:r,shop:a}=ie(),i=hM(),o=a.hasFlagEnabled(yo)&&e.length>2,s=e.map(({description:e,amount:n},r)=>d(AR,{loading:t,totalTax:n,taxesLabel:i({description:e}),subdueText:o},`${e}-${r}`));return o?d(LR,{id:"tax-breakdown-money-line",title:r.translate("order_summary.taxes_label"),defaultOpen:!0,hideHeaderItemWhenOpen:!0,item:n?d(kR,{loading:t,children:d(ER,{condition:t,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}):void 0,children:d(hR,{spacing:"small-400",children:s})}):d(hR,{spacing:"small-400",children:s})}const hM=()=>{const{i18n:e}=ie();return({description:t})=>{switch(t){case"HST":return e.translate("order_summary.tax_line.hst");case"GST":return e.translate("order_summary.tax_line.gst");case"PST":return e.translate("order_summary.tax_line.pst");case"RST":return e.translate("order_summary.tax_line.rst");case"QST":return e.translate("order_summary.tax_line.qst");case"VPT":return e.translate("order_summary.tax_line.vpt");default:return t}}};function gM({shopId:e}){const{i18n:n,checkout:r,shop:a}=ie(),{hasNegotiatedOnce:i}=r.negotiator,o=vn("taxes"),s=iI("taxes"),l=vn("landedCostDetails"),c=vn("remoteTaxDetails"),u=lo(),p=xk(),m=function(){const{checkout:e}=ie(),n=vn("taxes"),{taxes:r}=e.negotiator.current.fields;return t(()=>{const t=e.proposal.facts.taxBreakdown;if(t?.length)return{data:t.map(({title:e,amount:t})=>({description:e,amount:t})),loading:!1};if(!r.value||"available_total"!==r.value.status)return null;const{taxBreakdown:a}=r.value;return a?.length?{data:a,loading:n.value}:null})}(),h=t(()=>{if(r.proposal.facts.tax)return r.proposal.facts.tax;const e=r.negotiator.current.fields.taxes.value;return"available_total"===e?.status?e.totalTax:null}),g=t(()=>Boolean(r.negotiator.current.fields.landedCostDetails.value)),f=t(()=>{const e=r.negotiator.current.fields.taxes.value;return void 0!==e&&"pending"!==e.status}),y=t(()=>!r.proposal.facts.tax&&(!!s.value||!f.value&&(o.value||!i.value))),v=t(()=>(y.value||o.value||l.value||c.value)&&!r.proposal.facts.tax),_=t(()=>{const e=h.value;return e&&e.amount>0?e:y.value?{amount:0,currencyCode:a.currencyCode}:void 0}),b=co(h.value),k=t(()=>[...b.value.entries()]),P=so(),S=t(()=>P.value??h.value),w=t(()=>u.value&&k.value.length>1);if(e){const t=b.value.get(e);return t&&0!==t.totalTax.amount&&"available_total_included"!==t.status?d(AR,{loading:v.value,totalTax:t.totalTax,hasLandedCostDetails:e===a.id&&g.value}):null}if(p?.applied&&S.value)return d(AR,{totalTax:S.value});if(!(S.value&&0!==S.value.amount||y.value))return null;if(w.value&&S.value){const e=g.value?n.translate("order_summary.taxes_label"):n.translate("order_summary.estimated_taxes_label"),t=g.value?void 0:n.translate("order_summary.estimated_taxes_finalization_tooltip_content");return d(LR,{id:"tax-money-line",title:e,tooltipText:t,item:d(kR,{loading:v.value,children:d(ER,{condition:v.value,children:v.value?"$0.00":n.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:d(hR,{spacing:"small-400",children:d($,{each:k,getKey:([e])=>e,children:([,e])=>d(AR,{loading:v.value,totalTax:e.totalTax,taxesLabel:e.shopName,subdueText:!0})})})})}return d(x,{when:m,fallback:d(x,{when:_,children:e=>d(AR,{loading:v.value,totalTax:e,taxesLabel:y.value?n.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:g.value})}),children:e=>d(mM,{data:e.data,loading:e.loading||v.value,totalTax:h.value})})}const fM=$c("CombinedDutiesAndTaxesTooltip"),yM=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=ie(),a=Yc(void 0,fM);if(t&&t!==r.id)return null;const i=e.value;return d(_R,{children:[d(bR,{children:d(Qf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(qf,{children:n.translate("order_summary.duties_and_taxes_label")}),d(oh,{type:"question-circle",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),d(um,{id:a,children:n.translate("order_summary.error_duties_tooltip")})]})}),d(kR,{children:d(ER,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},vM=({shopId:e})=>{const{checkout:n}=ie(),r=Boolean(n.proposal.facts.taxesIncluded),a=Boolean(n.proposal.facts.dutiesIncluded),i=uo(),o=vo(),s=n.negotiator.current.fields.landedCostDetails,l=vn("landedCostDetails"),c=iI("landedCostDetails"),u=n.negotiator.current.fields.optionalDuties,p=v
2n("optionalDuties"),m=t(()=>Boolean(u.value?.refuseDutiesPermitted)&&Boolean(u.value?.buyerRefusesDuties)&&s.value?.incoterm===Nl.Ddu),h=t(()=>c.value||p.value||l.value),g=t(()=>!(o.value||a)),f=t(()=>Boolean(e)||!(i.value||r));return d(x,{when:m,fallback:d(y,{children:[d(x,{when:g,children:d(pM,{shopId:e})}),d(x,{when:f,children:d(gM,{shopId:e})})]}),children:d(yM,{loading:h,shopId:e})})};function _M({line:e,disableTooltip:t=!1}){const{i18n:n}=ie(),{value:r}=lo(),a=!t&&r,i=_o(e.method).toUpperCase();return d(_R,{itemSize:"auto",children:[d(bR,{children:d(Qf,{direction:"inline",gap:"small-400 small-300",children:[d(qf,{children:n.translate("order_summary.gift_card_label")}),d(Qf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(oh,{type:"gift-card"}),d(qf,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),d(qf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),a&&d(oM,{type:"giftCard"})]})]})}),d(kR,{children:d(qf,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function bM({disableTooltip:e=!1}){const n=OI(),r=lo(),{shop:a,i18n:i}=ie(),o=a.hasFlagEnabled(bo),s=t(()=>!e&&r.value),l=t(()=>r.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=t(()=>({total:n.value.reduce((e,t)=>e+(t.cost?.amount||0),0),currencyCode:n.value[0]?.cost?.currencyCode}));if(0===n.value.length)return null;if(o){const{total:e,currencyCode:t}=c.value;return d(_R,{children:[d(bR,{children:d(eh,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(qf,{children:i.translate("order_summary.gift_card_label")}),d(x,{when:s,children:d(oM,{type:"giftCard"})})]})}),d(kR,{children:d(qf,{children:i.formatCurrency(-e,{currency:t,form:"short",spacedMinusSign:!0})})})]})}return d($,{each:n,getKey:e=>ko(e.method),children:t=>d(_M,{line:t,disableTooltip:e})})}function kM(e){return"children"in e&&gw(e.children)}function PM(e){const{spacing:t}=gR(),n=v("_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19",t&&fR.groupSpacingVariant[t]);return d(y,{children:d("div",{className:n,role:"row",children:kM(e)?e.children:d(y,{children:[d(SM,{children:d(qf,{type:"strong",size:"large",children:e.label})}),d(wM,{children:d(Qf,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[d(FI,{children:d(qf,{size:"small",color:"subdued",children:e.prefix})}),d(qf,{type:"strong",size:"large",children:e.value})]})})]})})})}function SM({children:e}){return d("div",{className:"_1x41w3p2",role:"rowheader",children:e})}function wM({children:e,accessibilityColumnIndex:t}){return d("div",{className:"_1x41w3p3",role:"cell","aria-colindex":t,children:e})}const CM={Wrapper:"_3KD7m",Char:"kxIMD",Price:"_3XbdQ","Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"};let EM=0;function xM({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:r}}=kv(),s=Hc(),l=i(o(()=>t.value)),c=m([{id:EM++,formatted:o(()=>e.value)}]),u=Tt(),p="base"===r;a(()=>{const n=l.current,r=t.value.currencyCode===n.currencyCode&&t.value.amount<n.amount;c.value=r?[...c.value,{id:EM++,formatted:e.value}]:[{id:EM++,formatted:e.value}],l.current=t.value},[t.value.amount,t.value.currencyCode,e.value]);const h=n(e=>{c.value=c.value.filter(t=>t.id!==e)},[c]);return p?d("span",{className:CM.Wrapper,style:{"--delay":(s?0:30)+"ms"},children:d(x,{when:u,fallback:e,children:()=>c.value.map((e,t)=>d(IM,{formatted:e.formatted,current:t===c.value.length-1,onDisappear:h,snapshotId:e.id,animated:c.value.length>1},e.id))})}):d(y,{children:e})}function IM({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:i}){const o=Hc(),s=Ad(t,"fast",n),l=e.split("");return a(()=>{let t;return"exited"===s&&(o?r(i):t=setTimeout(()=>r(i),30*e.length)),()=>{clearTimeout(t)}},[s,o,e,r,i]),d("span",{className:v(CM.Price,n&&CM[`Price-${s}`]),"aria-label":t?e:void 0,"aria-hidden":t?void 0:"true",style:{"--total":l.length},children:l.map((e,t)=>d("span",{className:CM.Char,style:{"--index":t},children:e},t))})}function AM(e){const{checkout:{negotiator:n}}=ie(),{initialUnresolvedFields:r}=n;return t(()=>function(e,t){return t.some(t=>e.has(t))}(r.value,e))}const TM=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function LM({alignItems:e="baseline",freeLabel:n,outOfStockLabel:r,paymentDue:a,showCurrencyBadge:i,hideCurrencyCode:o,size:s}){const{i18n:l,embed:c,checkout:{negotiator:u}}=ie(),p=Pv(),{orderSummary:h}=kv(),g=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields;return t(()=>Gy(n.value??[]))}(),f=Tt(),y=vn("deliveryNext"),v=vn("taxes"),_=vn("duties"),b=vn("landedCostDetails"),k=vn("remoteTaxDetails"),S=t(()=>void 0!==u.current.fields.deliveryNext.value||void 0!==u.current.fields.taxes.value||void 0!==u.current.fields.duties.value||void 0!==u.current.fields.landedCostDetails.value||void 0!==u.current.fields.remoteTaxDetails.value),w=AM(TM),C=m(w.peek()),E=m(!w.peek()&&S.peek());P(()=>{!w.value&&S.value&&(E.value=!0)});const I=t(()=>y.value||v.value||_.value||b.value||k.value),A=t(()=>(!c||!yr(c.embedder))&&(c?!S.value||I.value:C.peek()&&!E.value)),T=!o&&p,L=t(()=>r&&g.value?r:n&&0===a.value.amount?n:l.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})),N=n?"uppercase":void 0,R=h.totalDueTypography;let M,D;R?(M="bold"===R.weight?"strong":"generic",D=R.size??"base"):(M="strong",D="large");const O=d(qf,{size:i?"extraSmall":"small",color:"subdued",translate:!1,children:a.value.currencyCode}),z=t(()=>T&&L.value!==r&&L.value!==n&&(!f.value||!G(a.value.currencyCode,L.value)));
2return d(Qf,{alignItems:e,gap:"small-300",direction:"inline",children:[d(x,{when:z,children:d(FI,{children:i?d(HL,{color:"subdued",size:"small",children:O}):O})}),d(ER,{condition:A.value,type:M,size:s??D,translate:!1,letterCase:N,skeletonContent:L.value,children:E.value?d(xM,{formatted:L,money:a}):null})]})}const NM=1e8;function RM(e,t){const n=e/t*100,r=Math.round(n*NM)/NM;return Math.ceil(r)/100}function MM(e){return e?.installmentPlans?.some(e=>"MSI"===e.type)??!1}function DM(e,t){return e.map(e=>"direct"===e.method.type||e.method.type===pe.CreditCard?{...e,method:{...e.method,creditCardInstallments:t}}:"wallet"===e.method.type&&"SHOP_PAY"===e.method.name&&e.method.walletContent?{...e,method:{...e.method,walletContent:{...e.method.walletContent,creditCardInstallments:t}}}:e)}function OM(e){return e.map(e=>"direct"===e.method.type||e.method.type===pe.CreditCard?{...e,method:{...e.method,creditCardInstallments:void 0}}:e)}function zM(){const e=Ti(),n=VI(),{i18n:r,checkout:{negotiator:a}}=ie(),{installmentMonthsSignal:i}=a.context,o=a.current.fields.paymentMethods,s=t(()=>o.value?.some(e=>"direct"===e.type&&!e.alternative&&MM(e))??!1);return{amount:t(()=>{const t=i.value,n=e.value;return s.value&&Boolean(t)&&n&&t?{...n,amount:RM(n.amount,t)}:n}),label:t(()=>{const t=i.value;return s.value&&Boolean(t)&&Boolean(e.value)?r.translate("order_summary.installment_due_today_label"):n.value}),isInstallment:t(()=>s.value&&Boolean(i.value))}}function BM(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=Ei(),a=AI(),i=ct();return t(()=>{if(r.value||a.value)return!1;const e=Boolean(n.value),t=i.value;return e||t})}function VM({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=Gm();return d(PM,{children:[d(SM,{children:d(qf,{type:"strong",size:r?.size??"large",children:e})}),d(wM,{children:d(LM,{paymentDue:t,hideCurrencyCode:n})})]})}function FM({variant:e,showLoadingPlaceholder:n}){const r=Ti(),{i18n:a,shop:o}=ie(),s=VI(),l=t(()=>!r.value),c=t(()=>r.value?a.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0),u=i({amount:0,currencyCode:o.currencyCode}),p=t(()=>{const e=r.value;return null!=e&&(u.current=e),u.current});return l.value&&!n?null:"card"===e?d(Df,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(eh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(qf,{color:"subdued",children:s}),d(qf,{color:"subdued",children:c})]})}):d(hR,{spacing:"small-500",children:d(VM,{label:s,amount:p,hideCurrencyCode:l.value})})}function UM({children:e}){return d(hR,{spacing:"small-500",children:d(_R,{children:[d(bR,{children:d(cx,{color:"subdued",children:d(mA,{children:e})})}),d(kR,{})]})})}function qM(){return d(Df,{children:[d(CN,{blockSize:"small-200"}),d(yw,{accessibilityRole:"presentation"}),d(CN,{blockSize:"small-200"})]})}function jM(){const{shop:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,a=Ti(),i=e.hasFlagEnabled(Po);return t(()=>{if(i)return;const e=r.value,t="BG"===e?.countryCode&&"EUR"===e?.presentmentCurrency,n=a.value;return!t||!n||n.amount<=0?void 0:Number((1.95583*n.amount).toFixed(2))})}function HM({bgnAmount:e}){const{i18n:t}=ie();return d(_R,{children:d(kR,{children:d(qf,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const $M=["taxes","duties"];function YM({shopId:e}){const n=Ti(),r=So(),a=t(()=>e?r.value.get(e):n.value),{checkout:o,embed:s,i18n:l,shop:c}=ie(),u=AM($M),p=vn("deliveryNext"),m=vn("taxes"),h=vn("duties"),g=vn("landedCostDetails"),f=vn("remoteTaxDetails"),{visibility:v}=o.configuration,{moneySummary:{labelColor:_="base",labelTypography:b},moneyLines:{divided:k}}=Gm(),P=o.proposal.facts.previouslyPaidTotal,S=Ei(),w=zI(),C=(()=>{const{shopPay:e,checkout:t}=ie();if(Jg().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value})(),{value:E}=kt(),I=E?.currencyCode,A=BM(),T=c.hasFlagEnabled(wo),L=Boolean(o.proposal.facts.taxesIncluded),N=Boolean(o.proposal.facts.dutiesIncluded),R=uo().value||L,M=vo().value||N,{value:D}=o.negotiator.current.fields.landedCostDetails,O=xk(),z=o.proposal.facts.landedCostDetails,{amount:B,label:V,isInstallment:F}=zM(),U="COMPACT"===o.configuration.orderSummary?.layoutStyle,q=RR(),j=jM(),H=t(()=>e&&e!==c.id?l.translate("order_summary.total_label"):V.value),$=t(()=>!a.value),Y=t(()=>(!s||!yr(s.embedder))&&u.value),W=i(a.peek()),G=t(()=>{const e=a.value;return null!=e&&(W.current=e),W.current}),J=t(()=>G.value??{amount:0,currencyCode:c.currencyCode}),K=i(B.peek()),X=t(()=>{const e=B.value;return null!=e&&(K.current=e),K.current??J.value}),Q=t(()=>F.value?a.value:void 0),Z=null!=G.value&&(p.value||m.value||h.value||g.value||f.value);if(($.value||!B.value)&&!Y.value&&!Z)return null;const ee=(v.showSubtotal.value||P)&&k?d(qM,{}
2):null,te=!S.value&&!w.value,ne=O?.applied&&R&&q.value?d(UM,{children:q.value}):te?d(DR,{taxesIncluded:R,shopId:e}):null;if(e)return d(y,{children:[d(VM,{label:H,amount:J,hideCurrencyCode:$.value}),ne]});if(U){const e="base"===b?.weight?"generic":"strong";return d(y,{children:[ee,d(PM,{children:[d(SM,{children:d(Qf,{children:d(x,{when:q,fallback:d(qf,{type:e,color:_,size:b?.size??"large",children:V.value}),children:d(y,{children:[d(qf,{type:e,color:_,size:b?.size,children:V.value}),ne]})})})}),d(wM,{children:d(LM,{paymentDue:X,hideCurrencyCode:$.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const re=[D,z].some(e=>e?.incoterm===Nl.Ddp),ae=M&&re?d(y,{children:[d(CN,{blockSize:"small-400"}),d(yw,{accessibilityRole:"presentation"}),d(CN,{blockSize:"small-400"}),d(cx,{type:"small",color:"subdued",children:d(mA,{children:l.translate("order_summary.duties_included_label")})})]}):null,oe=T?d(FM,{showLoadingPlaceholder:Y.value||Z}):d(hR,{spacing:"small-500",children:d(VM,{label:H,amount:J,hideCurrencyCode:$.value})}),se=l.translate("order_summary.payment_terms_totals.due_today_next");return d(y,{children:[ee,d(x,{when:A,children:d(PM,{children:[d(SM,{children:d(qf,{children:se})}),d(wM,{children:d(Qf,{direction:"inline",gap:"small-200",alignItems:"baseline",children:d(ER,{condition:$.value,size:"medium",translate:!1,children:l.formatCurrency(0,{currency:J.value.currencyCode,form:"short"})})})})]})}),d(x,{when:Q,children:e=>d(_R,{label:l.translate("order_summary.total_label"),value:l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})}),d(x,{when:A,fallback:d(VM,{label:H,amount:X,hideCurrencyCode:$.value}),children:oe}),ne,void 0!==C&&I?d(PM,{children:d(wM,{accessibilityColumnIndex:2,children:d(qf,{size:"small",translate:!1,children:l.translate("payment.pay_in_installments_split_pay_short",{amount:l.formatCurrency(C,{currency:I,form:"short"})})})})}):null,null!=j.value&&d(HM,{bgnAmount:j.value}),ae]})}const WM=$c("PriceBreakdownItemTooltip");function GM({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:a}=ie(),i=Yc(void 0,WM),o="strong",s="base";return d(_R,{layout:r,children:[d(bR,{children:d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(qf,{color:s,type:o,children:e}),t?d(y,{children:[d(oh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:a.translate("tooltip.accessibility_label_context",{context:e})}),d(um,{id:i,children:t})]}):null]})}),d(kR,{children:d(qf,{color:s,type:o,children:n})})]})}const JM=$c("RecurringTotalsTooltip"),KM=$c("RecurringTotalsLabel");function XM({cardStyle:e}){const{i18n:t,checkout:{negotiator:n}}=ie(),{value:r}=n.current.fields.recurringTotals,a=JL(),i=Yc(void 0,JM),o=Yc(void 0,KM);if(!r?.length)return null;const s=t.translate("order_summary.recurring_subtotal_label"),[l]=r;if(e){const e=1===r.length;return d(Df,{accessibilityRole:e?"group":void 0,"aria-labelledby":e?o:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:e&&l?d(eh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(qf,{id:o,color:"base",type:"strong",children:s}),d(qf,{color:"base",type:"strong",children:a(l)})]}),d(oh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:s})}),d(um,{id:i,children:t.translate("order_summary.recurring_total_tooltip")})]}):d(qf,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})})}return d(y,{children:[d(yw,{accessibilityRole:"presentation"},"recurringTotalsDivider"),1===r.length&&l?d(hR,{spacing:"small-300",children:d(GM,{title:s,tooltipText:t.translate("order_summary.recurring_total_tooltip"),itemText:a(l),layout:"stackable"})}):d(qf,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})]})}function QM({line:e}){const{i18n:t}=ie();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,a=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=NI(e.method.redemptionContent);return d(_R,{children:[d(bR,{children:d(Qf,{direction:"inline",gap:"base",children:[d(qf,{children:t.translate("order_summary.gift_card_label")}),d(Qf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(oh,{type:"gift-card"}),d(qf,{accessibilityVisibility:"hidden",children:RI(i)}),d(qf,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),d(kR,{children:d(qf,{type:"strong",children:a})})]})}function ZM({line:e}){const{checkout:t,i18n:n}=ie(),r=t.proposal.negotiated.fields.shopPromotion.value,a="filled"===r?.status?new Map(r.promotions.map(({promotionId:e,type:t})=>[e,t])):void 0;return e.method.redemptionContent?.details?.map(e=>{const{amount:t,currencyCode:r}=e.destinationAmount,i=n.formatCurrency(-parseFloat(t),{currency:r,form:"short",spacedMinusSign:!0}),o={SHOP_DISCOUNT_OFFER:n.translate("order_summary.exclusive_deal"),SHOP_CASH_BALANCE:n.translate("order_summary.shop_cash_title"),SHOP_PROMOTION:n.translate("order_summary.shop_promotion")},s=e.promotionType??(null==e.redemptionId?void 0:a?.get(e.redemptionId)),l="SHOP_PROMOTION"===e.redemptionType&&"DOORBUSTER"===s?n.translate("order_summary.flash_deal"):o[e.redemptionType];return l?d(_R,{type:"strong",label:l,value:i},e.redemptionId):null})}function eD({line:e}){const{i18n:t}=ie();if(!e.cost)return null;const n=t.translate("payment.store_credit.label"),r=t.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0});return d(_R,{type:"strong",label:n,value:r})}function tD({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return d(ZM,{line:e});case"STORE_CREDIT":return d(eD,{line:e});case"CUSTOM":{const t=e;return d(QM,{line:t},t.method.redemptionContent?.redemptionAttributes[0]?.value)}default:return null}}function nD(){const e=wi("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=DI(),n=[...e.value,...t];return 0===n.length?null:d(y,{children:n.map(e=>d(tD,{line:e},function(e){if("CUSTOM"===e.method.redemptionSource){const t=e,n=t.method.redemptionContent?.redemptionAttributes[0]?.value||"";return e.method.redemptionSource+n}return e.method.redemptionSource}(e)))})}function rD(e){const{shop:{id:n},checkout:r}=ie(),a=r.negotiator.current.fields.merchandiseLines,i=r.proposal.facts.merchandiseLines??[],{value:o}=r.negotiator.current.fields.legacyRepresentProductsAsFees,s=t(()=>Co(a.value?.lines??[],r.negotiator.current.fields.remoteMerchandiseDetails.value)),l=Eo(),c=e?e!==n?{lines:s.value.get(e),factLines:void 0}:{lines:l.value,factLines:i}:{lines:a.value?.lines,factLines:i},u=function(e,t){return t?e?.reduce((e,t)=>
2t.legacyFee?e:e+t.quantity,0):e?.reduce((e,t)=>e+t.quantity,0)}(c?.lines,o),d=c?.lines?.filter(({quantity:e})=>e>0),p=c?.factLines?.reduce((e,t)=>e+t.quantity,0);return{totalLineQuantities:u,totalLineQuantitiesFact:p,merchandiseLinesWithCount:d?.length||0}}function aD({shopId:e}){const{subtotalLabel:n,subtotalValue:r,subtotalOriginalValue:a}=function(e){const{checkout:n,i18n:r}=ie(),a=function(e){const{shop:{id:n},checkout:{negotiator:r}}=ie(),{remoteTotalDetails:a,legacyRepresentProductsAsFees:i,legacySubtotalBeforeTaxesShippingAndFees:o,subtotal:s}=r.current.fields,l=Et();return t(()=>{const t=i.value?o.value:l.value;return e?n===e?s.value:a.value?.perShopRemoteTotals.get(e)?.subtotal:t})}(e),i=function(e){const{embed:t,i18n:n}=ie(),{totalLineQuantities:r,merchandiseLinesWithCount:a}=rD(e);return yr(t?.embedder)?n.translate("order_summary.number_items",{count:r??0}):a>1&&r?n.translate("order_summary.subtotal_label_with_quantity",{count:r}):n.translate("order_summary.subtotal_label")}(e);return t(()=>{const e=a.value?r.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"}):void 0,t=n.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in n.latestReceipt.value&&n.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,o=t?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):void 0;return{subtotalLabel:i,subtotalValue:e,subtotalOriginalValue:o}})}(e).value;return r?d(_R,{children:[d(bR,{children:d(qf,{children:n})}),d(kR,{children:a?d(Qf,{direction:"inline",gap:"small-300",children:[d(qf,{tone:"critical",type:"redundant",translate:!1,children:a}),d(qf,{translate:!1,children:r})]}):d(qf,{translate:!1,children:r})})]}):null}function iD(){const{i18n:e,checkout:n,source:r}=ie(),a=n.negotiator.current.fields.tipLines,i=n.proposal.facts.tip,o=t(()=>{const e=a.value?.[0]?.amount,t=Hn(r)?i:e;return t&&t.amount>0?t:void 0});return d(x,{when:o,children:t=>d(_R,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function oD({variant:e}){const n=function(){const e=xo(),{shop:n,embed:r}=ie(),a=n.hasFlagEnabled(Io);return t(()=>{const t=Boolean(r?.embedder)&&!yr(r?.embedder);return!Boolean(a||!e.value||0===e.value.amount||t)})}(),r=xo();return n.value&&r.value?d(sD,{variant:e,totalSavings:r.value}):null}function sD({variant:e,totalSavings:n}){const{i18n:r,embed:a,checkout:{negotiator:i}}=ie(),{deferredTotal:o}=i.current.fields,s=yr(a?.embedder)?r.translate("universal.iframes.savings_label").toUpperCase():r.translate("order_summary.total_savings").toUpperCase(),l=r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),c=d(qf,{type:"strong",translate:!1,children:l}),u=t(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return"card"===e?d(Df,{children:d(Qf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Qf,{direction:"inline",alignItems:"center",gap:"small-500",children:[d(oh,{type:"savings",size:"small",color:"base"}),d(qf,{color:"subdued",children:r.translate("order_summary.total_savings")})]}),d(qf,{color:"subdued",translate:!1,children:l})]})}):d(hR,{spacing:u.value,children:d(PM,{children:[d(SM,{children:d(Qf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(oh,{type:"savings",size:"base",color:"strong"}),d(qf,{type:"strong",children:s}),c]})}),d(wM,{})]})})}function lD(){const{i18n:e,checkout:{negotiator:n}}=ie(),{alternativePaymentCurrency:r}=n.current.fields,a=vn("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:i}=n.context,o=t(()=>{const t=r.value,n=a.value;if(t||n&&i.value)return{loading:n,text:t&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(t.totalWithoutGiftCards.amount,{currency:t.totalWithoutGiftCards.currencyCode,form:"explicit"})})}});return d(x,{when:o,children:({loading:e,text:t})=>d(_R,{children:d(kR,{children:d(ER,{condition:e,size:"small",color:"subdued",children:e?"$0.00":t})})})})}function cD(){const{moneyLines:{divided:e}}=Gm(),{checkout:{negotiator:n}}=ie(),{legacyRepresentProductsAsFees:r,legacyMerchandiseLinesAsFees:a}=n.current.fields,i=t(()=>r.value&&a.value?a.value.lines:[]);return d($,{each:i,getKey:e=>e.title,children:t=>d(y,{children:[e&&d(qM,{}),d(uD,{...t})]})})}function uD({title:e,description:t,total:n}){const{i18n:r}=ie(),a=t?d(Qf,{direction:"inline",alignItems:"center",gap:"small-400",children:d(qf,{children:[e,d("span",{style:{position:"absolute"},children:d(Km,{padding:"small-500 none none small-500",overlay:d(um,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:d(oh,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):d(qf,{children:e});return d(_R,{label:e,children:[d(bR,{children:a}),d(kR,{children:d(qf,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function dD({content:e}){return function(e){const t=i(!1);P(()=>{const n=e.value;if(t.current){if(n)return $u({content:n})}else t.current=!0})}(e),d(x,{when:e,children:e=>d(y,{children:pD(e).map(({id:e,line:t})=>d(_R,{layout:"stackable",children:[d(Df,{inlineSize:"100%",children:d(bR,{children:d(cx,{type:"small",color:"subdued",textAlign:"end",children:t})})}),d(kR,{})]},e))})})}function pD(e){const t=new Map;
2return e.split("\n").filter(Boolean).map(e=>{const n=t.get(e)??0;return t.set(e,n+1),{id:`${e}:${n}`,line:e}})}function mD(){const{moneyLines:{divided:e}}=Gm(),{i18n:t,checkout:n,shop:r}=ie(),{value:a}=kt(),{value:i}=n.negotiator.current.fields.deferredTotal,o=n.proposal.facts.previouslyPaidTotal,s=n.proposal.facts.updatedTotal,l=n.proposal.facts.waivedTotal,c=(n.proposal.facts.merchandiseLines??[]).some(e=>e.quantityChange&&e.quantityChange.delta),u=Boolean(s&&a&&c),p=i&&i.amount.amount>0,m=o&&Number(o.amount)>0,h=r.hasFlagEnabled(Ao)&&l&&Number(l.amount)>0,g=(u||o||h)&&e;return g||u||m||h||p&&a?d(y,{children:[g&&d(qM,{}),p&&a&&d(_R,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})}),u&&s&&d(_R,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(s.amount),{currency:s.currencyCode,form:"short"})}),m?d(_R,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(o.amount),{currency:o.currencyCode,form:"short"})}):null,h&&l?d(_R,{type:"strong",label:t.translate("order_summary.waived_label"),value:t.formatCurrency(-Number(l.amount),{currency:l.currencyCode,form:"short"})}):null]}):null}function hD(){const{moneyLines:{divided:e}}=Gm(),t=function(){const{i18n:e,checkout:t}=ie(),n=t.proposal.facts.returnFees,r=Number(n?.aggregatedReturnShippingFees?.amount)>0,a=Number(n?.aggregatedRestockingFees?.amount)>0;return r||a?{shippingFee:r?{label:e.translate("order_summary.return_shipping_fee_label"),value:e.formatCurrency(Number(n?.aggregatedReturnShippingFees?.amount),{currency:n?.aggregatedReturnShippingFees?.currencyCode,form:"short"})}:null,restockingFee:a?{label:e.translate("order_summary.return_restocking_fee_label"),value:e.formatCurrency(Number(n?.aggregatedRestockingFees?.amount),{currency:n?.aggregatedRestockingFees?.currencyCode,form:"short"})}:null}:null}();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return d(y,{children:[n&&d(y,{children:[e&&d(qM,{}),d(_R,{type:"strong",label:n.label,value:n.value})]}),r&&d(_R,{type:"strong",label:r.label,value:r.value})]})}function gD(){const{i18n:e,checkout:t,embed:n}=ie(),{value:r}=To(),a=zI(),i=OI(),o=Boolean(t.proposal.facts.taxesIncluded),s=uo().value||o;if(!a.value||!r)return null;const l=d(DR,{taxesIncluded:s});return yr(n?.embedder)&&i.value.length>0?l:d(y,{children:[d(_R,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l]})}const fD=E(function(){const{checkout:e,i18n:n,embed:r}=ie(),{visibility:a}=e.configuration,{orderSummary:i}=kv(),o=e.configuration.orderSummary?.headerPosition??i.headerPosition,s=i.isCollapsible??!1,l=!1===i.isCollapsible,{currentDetour:c}=ac().value,u="thankYou"===c?.type,p=pR(),m=e.proposal.negotiated.fields.additionalMoneyLines.value,h=e.proposal.negotiated.fields.lpmDisclosure,g=vn("lpmDisclosure"),f=t(()=>g.value?void 0:h.value),y=t(()=>{const t=e.latestReceipt.value;return"processed"===t?.status?t.lpmDisclosure:void 0});return d(nL,{children:[d(SR,{ref:p,title:n.translate("order_summary.cost_table_title"),children:[d(x,{when:a.showSubtotal,children:[d(aD,{}),d(cM,{}),d(aM,{}),d(cD,{}),d(hD,{}),d(vM,{}),d(iD,{}),d(gD,{}),d(nD,{})]}),d(mD,{}),d(bM,{}),m?.map(e=>d(_R,{label:e.label,value:n.formatCurrency(e.amount.amount,{currency:e.amount.currencyCode,form:"short"})},e.id)),"BOTTOM"===o&&s?d(CN,{blockSize:"small-500"}):d(YM,{}),!u&&d(x,{when:()=>!f.value,children:d(lD,{})}),d(dD,u?{content:y}:{content:f}),d(zR,{}),!yr(r?.embedder)&&d(oD,{}),!l&&d(XM,{})]}),l&&d(x,{when:()=>e.negotiator.current.fields.recurringTotals.value,children:d(Df,{paddingBlockStart:"small-300",children:d(XM,{cardStyle:!0})})})]})});var yD="km09ry0 _1fragem5z";const vD=$c("Form");function _D({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:a=!1,id:i,contentsClassName:o}){const s=Qu(),l=Yc(void 0,vD),c=i??l,u=null!=Sd(),p=r(()=>({id:c,nested:u}),[c,u]);let m=null;n&&(m=d(Df,{accessibilityVisibility:"exclusive",children:d(bD,{disabled:a,form:p,children:"string"==typeof n?n:s("submit")})}));const h=t=>{t.preventDefault(),t.stopPropagation(),a||"function"==typeof e&&e()},g=d("div",{className:v("km09ry1 _1fragemws",o),children:t});return u?d(y,{children:[d(Pd.Provider,{value:p,children:[g,m]}),d(nu,{children:d("form",{action:"",method:"POST",noValidate:!0,className:yD,id:c,onSubmit:h})})]}):d("form",{action:"",method:"POST",noValidate:!0,className:yD,id:c,onSubmit:h,children:d(Pd.Provider,{value:p,children:[g,m]})})}function bD({form:e,children:t,disabled:n}){return d("button",{type:"submit",disabled:n,tabIndex:-1,"aria-hidden":!0,form:e.nested?e.id:void 0,children:t})}const kD=["extraSmall","small","medium","large"];function PD({above:e,below:t,children:n}){const r=xd()?"span":"div",{hiddenOnExtraSmall:a,hiddenOnSmall:i,hiddenOnMedium:o,hiddenOnLarge:s}=function(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?kD.indexOf(e)+1:0,r=t?kD.indexOf(t)-1:kD.length-1,a=kD.slice(n,r+1);return{hiddenOnExtraSmall:a.indexOf("extraSmall")>=0,hiddenOnSmall:a.indexOf("small")>=0,hiddenOnMedium:a.indexOf("medium")>=0,hiddenOnLarge:a.indexOf("large")>=0}}(e,t),l=v("_123qrzt0 _1fragem5z",a&&"_123qrzt1",i&&"_123qrzt2",o&&"_123qrzt3",s&&"_123qrzt4");return d(r,{className:l,children:n})}function SD({targetSelector:e,label:t,icon:r}){const a=n(()=>{const t=document.querySelector(e);t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}))},[e]);return d(Df,{display:"@media (inline-size >= medium) auto, none",children:d(Yf,{variant:"secondary",size:"small",onClick:a,className:Se({screenReaders:"untilFocus"}),children:d(Qf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(oh,{type:r,size:"small-100"}),d(qf,{children:t})]})})})}const wD=({violations:e,noticeType:t,noticeTitle:n,noticeHeader:r,noticeFooter:a})=>({code:t,tone:"critical",localizedTitle:n,localizedMessage:d(y,{children:[r,d("ul",{style:{listStyle:"inside"},children:e.map(e=>d("li",{children:e.localizedMessageHtml?d("span",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
2):e.localizedMessage||e.nonLocalizedMessage},e.code))}),a]})}),CD=()=>{const{i18n:e,shop:n,checkout:{negotiator:r}}=ie(),a=jc(),i=vn("shippingAddress"),{allViolations:o}=r.current.fields,s=ac(),{shippingAddress:l}=r.parts;return t(()=>{const t=l.peek();if(a.value&&"information"===s.value.currentPage?.id&&Wn(t,{...Lo,countryCode:t?.countryCode}))return null;const r=o.value?.filter(e=>Gn.has(e.code))||[];return 0===r.length||!a.value||i.value?null:wD({violations:r,noticeType:mv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:mv.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.editable_shipping_address_violations_message_title"),noticeFooter:e.translate("notice_banner.editable_shipping_address_violations_message_footer",{emailLink:d(Kf,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var ED={Banner:"sdr03s1 sdr03s0 _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragempz _1fragemrs _1fragemo6 _1fragemtl _1fragemws _1fragem6t",Button:"sdr03sb sdr03sa _1fragem64 _1fragem19 _1fragembj _1fragem12u",Content:"sdr03sc",ControlCollapsible:"sdr03sf sdr03se _1fragem28",ControlDismiss:"sdr03sg",Icon:"sdr03s9",Heading:"sdr03sd",toneVariant:{critical:"sdr03s3",info:"sdr03s4",success:"sdr03s5",warning:"sdr03s6"},colorVariant:{base:"sdr03s7",subdued:"sdr03s8"},withHeading:"sdr03s2"};const xD=$c("Banner"),ID=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function AD({autoFocus:e,focusable:t,children:n,collapsible:r,dismissible:o,iconHidden:l,color:c="base",id:u,tone:p="auto",heading:m,hidden:h=!1,onDismiss:g,onAfterHide:f}){const _="auto"===p?"info":p,b=Qu(),[k,P]=s(h),[S,w]=s(!0),C=i(),E=Yc(void 0,xD),x=Ef({active:"critical"===_}),I=i(k),A=Cd(),T=Hc(),L=i(T);L.current=T,a(()=>{if(!e)return;const t=C.current;if(!t)return;const n=()=>{t.focus({preventScroll:!0}),""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)"),t.scrollIntoView?.({behavior:L.current?"auto":"smooth"})};if(t.getBoundingClientRect().height>0)return void n();if("undefined"==typeof ResizeObserver){const e=setTimeout(n,300);return()=>clearTimeout(e)}const r=new ResizeObserver(()=>{0!==t.getBoundingClientRect().height&&(r.disconnect(),n())});return r.observe(t),()=>r.disconnect()},[e]),a(()=>{!I.current&&k&&f?.(),I.current=k},[k,f]),a(()=>{P(h)},[h]);const N=v(ED.Banner,_&&ED.toneVariant[_],m&&ED.withHeading,ED.colorVariant[c]),R=Boolean(r&&m),M=!R||R&&!S,D=o&&d("button",{type:"button",className:ED.Button,onClick:()=>{"function"==typeof g&&g(),P(!0)},"aria-label":b("closeNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(oh,{type:"x",size:"small"})}),O=d("button",{type:"button",className:ED.Button,onClick:()=>w(e=>!e),"aria-expanded":!S,"aria-controls":`${E}-collapsible-area`,"aria-label":b("expandNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(oh,{size:"small",type:S?"chevron-down":"chevron-up"})});return k?null:d("div",{className:N,role:"critical"===_?"alert":"status",...(e||t)&&{tabIndex:-1},ref:function(e){C.current=e,x.current=e},id:u,children:[!l&&d("div",{className:ED.Icon,children:d(oh,{type:ID.get(_),size:"fill"})}),m&&d("div",{className:ED.Heading,children:d(TS,{level:3,children:m})}),R&&d("div",{className:ED.ControlCollapsible,children:O}),gw(n)&&d("div",{className:ED.Content,children:d(Eu.Provider,{value:"Banner",children:d(_u,{children:R?d(Ld,{open:M,id:`${E}-collapsible-area`,children:[m&&d(CN,{blockSize:"small-200"}),n]}):d(y,{children:[m&&d(CN,{blockSize:"small-200"}),n]})})})}),D&&d("div",{className:ED.ControlDismiss,children:D})]})}const TD=["cart","cart.billingAddress.address1","cart.billingAddress.address2","cart.billingAddress.city","cart.billingAddress.company","cart.billingAddress.countryCode","cart.billingAddress.district","cart.billingAddress.firstName","cart.billingAddress.lastName","cart.billingAddress.line2","cart.billingAddress.neighborhood","cart.billingAddress.phone","cart.billingAddress.provinceCode","cart.billingAddress.streetName","cart.billingAddress.streetNumber","cart.billingAddress.subdistrict","cart.billingAddress.zip","cart.buyerIdentity","cart.buyerIdentity.email","cart.buyerIdentity.phone","cart.deliveryGroups[0].deliveryAddress","cart.deliveryGroups[0].deliveryAddress.address","cart.deliveryGroups[0].deliveryAddress.address1","cart.deliveryGroups[0].deliveryAddress.address2","cart.deliveryGroups[0].deliveryAddress.city","cart.deliveryGroups[0].deliveryAddress.company","cart.deliveryGroups[0].deliveryAddress.countryCode","cart.deliveryGroups[0].deliveryAddress.district","cart.deliveryGroups[0].deliveryAddress.firstName","cart.deliveryGroups[0].deliveryAddress.lastName","cart.deliveryGroups[0].deliveryAddress.line2","cart.deliveryGroups[0].deliveryAddress.neighborhood","cart.deliveryGroups[0].deliveryAddress.phone","cart.deliveryGroups[0].deliveryAddress.provinceCode","cart.deliveryGroups[0].deliveryAddress.streetName","cart.deliveryGroups[0].deliveryAddress.streetNumber","cart.deliveryGroups[0].deliveryAddress.subdistrict","cart.deliveryGroups[0].deliveryAddress.zip","cart.discountCode","cart.paymentLines[0]","cart.paymentLines[0].billingAddress","cart.paymentLines[0].billingAddress.address1","cart.paymentLines[0].billingAddress.address2","cart.paymentLines[0].billingAddress.city","cart.paymentLines[0].billingAddress.company","cart.paymentLines[0].billingAddress.countryCode","cart.paymentLines[0].billingAddress.district","cart.paymentLines[0].billingAddress.firstName","cart.paymentLines[0].billingAddress.lastName","cart.paymentLines[0].billingAddress.line2","cart.paymentLines[0].billingAddress.neighborhood","cart.paymentLines[0].billingAddress.phone","cart.paymentLines[0].billingAddress.provinceCode","cart.paymentLines[0].billingAddress.streetName","cart.paymentLines[0].billingAddress.streetNumber","cart.paymentLines[0].billingAddress.subdistrict","cart.paymentLines[0].billingAddress.zip","cart.paymentLines[0].card","cart.paymentLines[0].card.expiry","cart.paymentLines[0].card.issueDate","cart.paymentLines[0].card.issueNumber","cart.paymentLines[0].card.name","cart.paymentLines[0].card.number","cart.paymentLines[0].card.verificationValue","cart.poNumber","order.deliveryUpdates","order.deliveryUpdates.email"].map(e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)}),LD=()=>{const e=ae(ff),{observability:t}=ie();return n(n=>{const r=function(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}(n),a=r?`${e}.${r}`:e;return i=a,TD.some(e=>e.test(i))?a:(t.error(new ND(`Invalid target (${e}) and field (${r}
2) combination`)),"cart");var i},[e,t])},ND=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},RD=new Set([SP.InputInvalid,SP.InputRequired]);function MD(e){return!RD.has(e)}function DD(e,t){return!!e&&e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message}function OD(e){const{message:t,errorType:n,errorValue:r,children:o}=e,s=LD()(),l=jg(),c=i(null),u=i(),p=i(!0),m=oe(l),h=e=>{m.current({...e,timestamp:new Date})},g=No(e=>{p.current&&DD(u.current,e)&&MD(e.errorType)&&h(e)},250);return a(()=>{const e=n||function(e){switch(e){case"cart.buyerIdentity":return SP.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return SP.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return SP.PaymentError;case"cart.discountCode":return SP.DiscountError;default:return SP.CheckoutError}}(s),a=t??c.current?.textContent??"",i={target:s,errorType:e,value:r||null,message:a};DD(u.current,i)||(u.current=i,MD(e)?g(i):h(i))}),a(()=>()=>{p.current=!1},[]),d("div",{ref:c,children:o})}function zD(e){const{errorType:t,errorValue:n,children:r,...a}=e;return d(AD,{...a,children:d(OD,{errorType:t,errorValue:n,children:r})})}function BD({notice:e,iconHidden:t=!1,errorType:n}){const r=e.localizedMessageHtml||e.localizedMessage||e.nonLocalizedMessage;if(!r)return null;const a=e.tone??"info",i={key:e.code,tone:a,onDismiss:e.onDismiss,dismissible:Boolean(e.onDismiss),heading:e.localizedTitle,collapsible:e.collapsible,iconHidden:t},o="string"==typeof e.localizedMessageHtml?d("div",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
2):r;return["critical","warning"].includes(a)?d(zD,{...i,errorType:n??SP.CheckoutError,children:o}):d(AD,{...i,children:o})}function VD(){const e=CD().value;return e?d(BD,{notice:e,errorType:SP.DeliveryError}):null}function FD(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.allViolations,r=t(()=>(n.value?.filter(e=>Ro(e.code))??[]).filter((e,t,n)=>t===n.findIndex(t=>t.code===e.code))),a=t(()=>r.value.length>0);return d(x,{when:a,children:d(Qf,{gap:"base",children:d($,{each:r,getKey:e=>e.code,children:({localizedMessage:e,nonLocalizedMessage:t})=>d(zD,{errorType:SP.PaymentError,tone:"critical",children:e||t})})})})}function UD(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields;return t(()=>{const e=n.value?.filter(e=>fk.has(e.code))||[];return{violations:e,hasViolations:e.length>0}})}const qD=()=>{const{violations:e,hasViolations:t}=UD().value;return t?d(Qf,{gap:"base",children:e.map(({code:e,localizedMessage:t,nonLocalizedMessage:n})=>d(zD,{errorType:SP.DiscountError,tone:"warning",children:t||n},e))}):null};function jD(){const{router:e,checkout:{identity:n,negotiator:r}}=ie(),o=r.current.fields.allViolations,s=m(null),{shippingAddress:l}=r.parts,c=T(Mt(l.value.countryCode)),u=t(()=>Jy(o.value??[])),d=t(()=>function(e=[]){const t=e.filter(({code:e})=>Mo.has(e)),[n]=t;if(1===t.length&&"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===n?.code)return n}(o.value));a(()=>e.beforeNavigate(()=>{s.value=null}),[s,e]);const p=i(n.current.value);return P(()=>{const e=n.current.value;e!==p.current&&void 0!==p.current&&(s.value=null),p.current=e}),P(()=>{const e=d.value;e&&e!==s.peek()&&(s.value=e)}),t(()=>{const e=d.value??s.value,t=e?{...e,tone:"info"}:void 0;let n;return u.value||c.value.loading||(n=o.value?.find(e=>"MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY"===e.code)),{banner:t,toast:n}})}function HD(){const e=jD(),t=gh(),n=i(null),r=No(e=>{if(!e)return;const r=e.localizedMessage;if(r===n.current?.message)return;n.current?.hide();const a=t?.(r);a&&(n.current={...a,message:r})},250);return P(()=>{const t=e.value.toast;t&&o(()=>{r(t)})}),null}function $D(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=ie(),a=e.app.config,i=Boolean(t?.isCheckoutKit()||t&&"shopPay"!==r.current.value)||n.enabled||xi(a);return{isAppLayout:i,isWebLayout:!i}}
2class YD extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function WD(e){const{checkout:{negotiator:n}}=ie(),r=n.parts.paymentLines;return t(()=>function(e,t){const[n]=cn(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}(r.value,e))}function GD(){const{i18n:e}=ie(),{href:t,onClick:n}=XP();return d(Kf,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const JD=new Map([["AMOUNT_TOO_SMALL","amount_too_small"],["AUTHENTICATION_ERROR","three_d_secure_failed"],["AUTHENTICATION_REQUIRED","generic_error"],["AUTHORIZATION_ERROR","processing_error"],["CALL_ISSUER","call_issuer"],["CANCELED_PAYPAL_BILLING_AGREEMENT","processing_error"],["CANCELLED_PAYMENT","cancelled_payment"],["CARD_DECLINED","card_declined"],["EXPIRED_BUYER_ACTION","expired_buyer_action"],["EXPIRED_CARD","expired_card"],["FUNDING_ERROR","processing_error"],["INCORRECT_ADDRESS","cannot_verify"],["INCORRECT_CVC","cannot_verify"],["INCORRECT_NUMBER","cannot_verify"],["INCORRECT_PIN","cannot_verify"],["INCORRECT_ZIP","cannot_verify"],["INSUFFICIENT_FUNDS","insufficient_funds"],["INVALID_CURRENCY","processing_error"],["INVALID_CVC","invalid_cvc"],["INVALID_EXPIRY_DATE","invalid_expiry_date"],["INVALID_ITEM_TOTAL","processing_error"],["INVALID_NUMBER","invalid_number"],["INVALID_PAYMENT_METHOD","cannot_verify"],["INVALID_SHIPPING_ADDRESS","invalid_shipping_address"],["INVALID_TOKEN","processing_error"],["INVOICE_ALREADY_PAID","processing_error"],["MISSING_SHIPPING_ADDRESS","missing_shipping_address"],["NAME_MISMATCH","name_mismatch"],["PAYMENT_ABOVE_THRESHOLD","payment_above_threshold"],["PAYMENT_METHOD_EXPIRED","payment_method_expired"],["PICK_UP_CARD","pick_up_card"],["PUBLIC_PAYMENT_ERROR","generic_error"],["RISKY","risky"],["SHOP_PAY_DECLINED","processing_error_checkout_as_guest"],["SUCCESSFUL_OFFSITE_WITH_GIFT_CARD_ERROR","successful_offsite_with_gift_card_error"],["TEST_MODE_LIVE_CARD","test_mode_live_card"],["THIRD_PARTY_INTERNAL_ERROR","processing_error"],["TOKEN_EXPIRED","processing_error"],["TRANSIENT_ERROR","transient_error"],["UNILATERAL_AUTH_ERROR","processing_error"],["UNPROCESSABLE_TRANSACTION","processing_error"],["CAPTCHA_REQUIRED","captcha_required"],["DECISION_RULE_BLOCK","generic_error"],["CVV_ATTEMPTS_EXCEEDED","cvv_attempts_exceeded"],["CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE","custom_redeemable_no_longer_available"]]),KD=["SHOP_PAY_DECLINED"];function XD(e){const{i18n:t}=ie();let n="generic_error";return e&&(n=JD.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&KD.includes(e.code)&&{checkout_as_guest_link:d(GD,{})}})}const QD=["AMOUNT_TOO_SMALL"];function ZD(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:WD(wn.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:WD(wn.AmazonPay).value}].filter(({checkoutSessionId:e})=>Boolean(e)),{i18n:n,observability:r}=ie(),{error:a,hasError:i}=rv(Do),o=a&&QD.includes(a),s=XD(o?{type:"payment",code:a}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=gn(),u=t(()=>{const e=c.value;return e.status===Yv.Available?e.sdk:void 0});if(!i||!e)return null;const{isBuyWithPrime:p,checkoutSessionId:m}=e;return d(x,{when:u,children:e=>d(zD,{tone:"critical",errorType:SP.PaymentError,children:d(cx,{children:o?s:d(y,{children:[n.translate("amazon_pay.error_page.payment_decline.message"),d(Kf,{onClick:()=>{try{p?e.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:m,isDeclined:!0}}):e.Pay.changePaymentMethod({amazonCheckoutSessionId:m,isDeclined:i})}catch(t){l.value=!0,r.error(new YD(`Error on changing buyer payment method. Details: ${t}`,{cause:t}))}},children:n.translate("amazon_pay.error_page.payment_decline.link")})]})})})})}const eO=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[Pa,"info"]]),tO=()=>{const e=m(!1),n=m(!1),r=yv(),{checkout:{negotiator:a}}=ie(),i=a.current.fields.allViolations,o=t(()=>i.value?.some(e=>Oo.has(e.code))??!1);return P(()=>{o.value&&(n.value=!0),!o.value&&e.value&&(e.value=!1,n.value=!1)}),t(()=>{const t=n.value&&!e.value,a=r.value;return t&&a?{code:mv.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}:null})};function nO(){!function(){const{checkout:{negotiator:e}}=ie(),{shippingAddress:t}=e.parts,{inMemoryGooglePayParts:{paymentSheetError:n},inMemoryPayPalParts:{paymentSheetError:r}}=gn();a(()=>{let e=!0;return t.fields.countryCode.subscribe(()=>{e?e=!1:(n.value?.type===Pa&&(n.value=void 0),r.value?.type===Sa&&(r.value=void 0))})},[t,n,r])}();const e=function(){const{i18n:e}=ie(),{paymentSheetError:n}=gn().inMemoryApplePayParts,r=e.translate("wallets.errors.generic",{walletName:e.translate("brand.apple_pay")}),a={unhandled_completion_status:e.translate("payment_errors.generic_error"),exceptional_completion_status:r,exceptional_negotiation_status:r,session_terminated:r,failed_to_create_session:r,shipping_options_changed:e.translate("wallets.errors.outdated.shipping_method"),unusable_partial_address:e.translate("wallets.errors.terminal",{walletName:e.translate("brand.apple_pay")}),new_tax_must_be_accepted:e.translate("payment_errors.order_total_changed"),payment_cancelled_while_processing:void 0,ineligible_discount:e.translate("wallets.errors.discount_code"),payment_terms_changed:e.translate("wallets.errors.outdated.payment_terms"),captcha_required:void 0,recovery_notice:e.translate("wallets.recovery_notice")};return t(()=>{const e=n.value?.type,t=n.value?.tone;if(e&&a[e])return{code:mv.PaymentSheetViolations,tone:t??"critical",localizedMessage:a[e],nonLocalizedMessage:a[e]}})}(),i=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),{shippingAddress:r}=n.parts,{inMemoryGooglePayParts:{paymentSheetError:a}}=gn(),i=T(Mt(r.value.countryCode));return t(()=>{const t=a.value?.type,n=(()=>
2{if("invalid_config"===t||"config_missing_required_fields"===t)return e.translate("wallets.errors.generic",{walletName:e.translate("brand.google_pay")});if("unusable_partial_address"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if("unexpected_terminal_error"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(t===Pa){const t=i.value.details?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_country",{walletName:e.translate("brand.google_pay"),countryName:t}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.google_pay")})}return"recovery_notice"===t?e.translate("wallets.recovery_notice"):void 0})(),r=t?eO.get(t):"critical";if(n)return{code:mv.PaymentSheetViolations,tone:r,localizedMessage:n,nonLocalizedMessage:n,onDismiss:"info"===r?()=>a.value=void 0:void 0}})}(),o=T(function(){const{shop:e,i18n:t,checkout:{configuration:n,negotiator:a}}=ie(),{shippingAddress:i,paymentLines:o}=a.parts,s=i.value,{value:l}=a.current.fields.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:c}}=gn(),{details:u,loading:d}=Mt(s.countryCode),{value:p}=a.current.fields.allViolations,m=Ly(s.countryCode),h=e.hasFlagEnabled(ba),g=r(()=>ka({paymentLines:o.value,isOnePage:n.layout.isOnePage.value})?p?.filter(US)??[]:[],[p,o,n.layout.isOnePage.value]),f=r(()=>h&&function({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);return 1===n.length&&BS({missingAddressField:zS({addressErrors:t("shipping",n)}),violations:n})}({violations:g,getAddressErrorsFromViolations:m}),[g,m,h])?void 0:g[0],y=c.value?.type===Pa,v=c.value?.type===Sa,_=r(()=>{const e=wa(l,"PAYPAL_EXPRESS");if(y&&!e){const e=d?s.countryCode:u?.name;return e?t.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{walletName:t.translate("brand.paypal"),countryName:e}):t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")})}},[u?.name,d,l,y,s.countryCode,t]);if(v){const e=t.translate("shipping_errors.unavailable_address_country");return{code:mv.PaymentSheetViolations,tone:"critical",localizedMessage:e,nonLocalizedMessage:e,onDismiss:()=>{c.value=void 0}}}return _?{code:mv.PaymentSheetViolations,tone:"info",localizedMessage:_,nonLocalizedMessage:_,onDismiss:()=>{c.value=void 0}}:f?{code:mv.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}:void 0}()),s=function(){const{receiptErrorSignal:e}=gn();return t(()=>{const t=e.value;if(t)return{code:mv.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}(),l=jS(),c=qS({isPayWithPayPalButton:!1}),u=Cv(),d=T(function(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=gn(),{i18n:r,checkout:a,shop:i}=ie(),o=i.hasFlagEnabled(fn),s=a.configuration.layout.isOnePage.value,l=$l({applePayThreePageVaultedReviewEnabled:o,isOnePageCheckout:s}),{queryParam:c,errorMessage:u,errorTitle:d,tone:p,shouldSuppressNotice:m}=Ov({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:l}),h=n(()=>({code:mv.PaymentSheetViolations,tone:"warning",localizedMessage:r.translate("wallets.errors.subscription_review_required")}),[r]);if(c&&!m)return c===yn?h():{code:mv.PaymentSheetViolations,localizedTitle:d,tone:p,localizedMessage:u}}()),p=tO();return t(()=>{const t="error"===c.value.status,n=Boolean(p.value),r=u.value||s.value||d.value||e.value||i.value||(n?null:o.value)||(t?null:l.value);if(r)return"string"==typeof r?{code:mv.PaymentSheetViolations,localizedMessage:r,nonLocalizedMessage:r,tone:"critical"}:r})}const rO=new Set([...new Set(["CART_METAFIELD_GENERIC_ERROR"]),...new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"])]),aO=["noAddressLocation","stockProblems","thankYou"],iO=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),oO=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),sO=[...Gn,...zo,...Bo,...fk,...Vo,...iO,...oO,...Fo,...Uo,...qo,...jo,...Ho,...hk,...$o,...ma,...Yo,...Kn,...nn,...ai,...Oo,...Wo,...rO,"DELIVERY_WRONG_NUMBER_OF_DELIVERY_LINES","DELIVERY_DELIVERY_LINE_DETAIL_CHANGED","DELIVERY_ONLY_EMPTY_TERMS_ACCEPTED","DELIVERY_LOCAL_PICKUP_DELIVERY_LINE_DETAIL_CHANGED","DELIVERY_SELECTED_PICKUP_OPTION_NO_LONGER_AVAILABLE","LOCALIZATION_EXTENSION_FIELD_ERROR","MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY","MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY","MERCHANDISE_EXPECTED_PRICE_MISMATCH","MERCHANDISE_ONLY_EMPTY_TERMS_ACCEPTED","TAX_NEW_TAX_MUST_BE_ACCEPTED","TAX_TAX_INCLUSIVITY_MISMATCH","TIP_NOT_ACCEPTED_BY_SHOP","DISCOUNTS_CUSTOM_DISCOUNT_NOT_HONOURED","PAYMENTS_PAYMENT_FLEXIBILITY_TERMS_ID_MISMATCH","PAYMENTS_PAYPAL_OVER_CAPTURE_DETECTED","WAITING_PENDING_TERMS","ALTERNATIVE_PAYMENT_CURRENCY_UNACCEPTABLE_INPUT_ERROR","ALTERNATIVE_PAYMENT_CURRENCY_INPUT_PROVIDED_BUT_NOT_APPLICABLE_ERROR","REQUIRED_ARTIFACTS_UNAVAILABLE","NON_NEGOTIABLE_TERMS_MISSING_NON_NEGOTIABLE_TERMS","DISCOUNTS_DISCOUNT_TITLE_TOO_LONG"];function lO({children:e,id:t}){return d("li",{id:t,className:"_1585eob1 _1585eob0 _1fragemws _1fragemzh",children:e})}var cO={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function uO({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:a}){const{className:i}=Hm({gap:e}),o=v(cO.UnorderedList,t&&cO.listStyleVariant[t],i);return d("div",{className:cO.Wrapper,children:d("ul",{className:o,role:"none"===t?"list":void 0,"aria-label":n,id:a,children:r})})}function dO(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.buyerIdentity,r=jc(),{shippingAddress:a}=e.parts;return t(()=>{const e=n.value?.purchasingCompany,t=!!e?.location.shippingAddress&&Wn(a.value,e.location.shippingAddress);return r.value&&!t})}function pO(){const{i18n:e,shop:n,checkout:r}=ie(),{allViolations:a,paymentLines:i,paymentMethods:o}=r.negotiator.current.fields,s=jc(),l=r.configuration.layout.isOnePage.value,c=ac();return t(()=>{const{currentPage:t}=c.value,r=o.value?.some(e=>"deferred"===e.type)&&i.value?.lines?.some(e=>"deferred"===e.method.type);if(!(l&&r||!l&&!s.value||"payment"===t?.id))return null;const u=a.value?.filter(e=>Ro(e.code))||[];return 0===u.length?null:{violations:u,noticeType:mv.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:mv.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function mO(){const{client:e,router:t}=ie(),n=e.unstable_getSerialization("amazonQueryParams"),a=gn().inMemoryAmazonPayParts.serializedAmazonParams,i=a.value,{searchParams:o}=t.currentUrl.value;return r(()=>{const e=function(){if(o&&"function"==typeof o.entries){const e=o.entries();if(e&&"function"==typeof e[Symbol.iterator])return Object.fromEntries(e)}return{}}();let t=i;null===i&&n&&(a.value=n,t=n);const r={...t,...e};return Object.fromEntries(Go.map(e=>[e,r[e]]))},[o,i,n,a])}function hO(){const{router:e}=ie();return{searchParams:mO(),isThankYouPage:e.currentUrlMatches("/thank-you")}}function gO(){const{checkout:{negotiator:e}}=ie(),{paymentMethods:n}=e.current.fields,{paymentLines:r}=e.parts,{searchParams:a,isThankYouPage:o}=hO(),s=T(a),l=T(o),c=i(!1),u=i(!1);return t(()=>
2{const e=s.value,t=r.value,a=n.value,i=e.wallet===wn.BuyWithPrime&&!e.amazon_cancelled,[o]=cn(t,[wn.BuyWithPrime]),d=Boolean(o);return i&&(c.current=!0),d&&(u.current=!0),!u.current||d||i||(c.current=!1,u.current=!1),Jo({paymentLines:t,paymentMethods:a,urlParams:{wallet:c.current?wn.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:l.value})})}function fO(){const{checkout:e}=ie(),{paymentLines:n}=e.negotiator.parts,r="shopPay"===e.identity.current.value;return t(()=>Ko({paymentLines:n.value,isOnePage:e.configuration.layout.isOnePage.value,isShopPayActive:r}))}function yO(){const e=function(){const{i18n:e,url:n,checkout:{negotiator:r}}=ie(),a=r.current.fields.allViolations;return t(()=>{const t=a.value?.filter(e=>Fo.has(e.code))??[];if(!t.length)return null;const r=d(y,{children:e.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:d(Kf,{tone:"monochrome",href:n.cart(),children:e.translate("notice_banner.return_to_cart_link_text")})})}),[i]=t;return 1===t.length&&i?{code:i.code,localizedTitle:i.localizedMessage||i.nonLocalizedMessage,localizedMessage:r,collapsible:!1,tone:"critical"}:{code:mv.MerchandiseQuantityRulesNotMet,localizedTitle:e.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:r,collapsible:!1,tone:"critical"}})}(),a=nO(),o=function(){const{checkout:e,i18n:t}=ie(),{configuration:n}=e,a=e.latestReceipt.value,{lastJourneyProgression:i}=e.negotiator,o=n.layout.isOnePage.value,s=gO(),l=r(()=>"failed"===a?.status&&"payment"===a.failure?.type&&"PRE_CHARGE_ERROR"===a?.failure.code&&"success"!==i.value.type,[i.value,a])&&(o||s.value),{inMemoryAmazonPayParts:{buyerDetails:c}}=gn(),u=l||c.value.error,d=r(()=>l?mv.PaymentsViolations:mv.OtherViolations,[l]);return u?{code:d,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}(),l=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.merchandiseLines;return t(()=>r.value?.sellingPlanMismatch?{code:mv.SellingPlanDigest,localizedMessage:e.translate("notice_banner.subscription_changed"),status:"warning"}:void 0)}(),c=jD().value.banner,u=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),{taxes:r,merchandiseLines:a}=n.current.fields,o=i("unset"),s=i(),l=ac();return t(()=>{const t=r.value,n=a.value?.priceMismatch,i="information"===l.value.currentPage?.id,c="pending"===t?.status?void 0:t?.status;return"unset"===o.current&&c&&(o.current=c),n&&"unset"!==o.current&&c&&o.current!==c?(s.current={code:mv.TaxExemption,localizedMessage:e.translate("change_country.cart_updated_based_on_country")},o.current=c):n&&!i||(s.current=void 0),s.current})}(),p=function(){const{checkout:{negotiator:e,configuration:n}}=ie(),a=e.current.fields.buyerIdentity.value?.purchasingCompany,i=!n.layout.isOnePage.value,o=function(){const{i18n:e,shop:n,checkout:{negotiator:r}}=ie(),a=r.current.fields.allViolations;return t(()=>0===(a.value?.filter(e=>ai.has(e.code))||[]).length?null:{code:mv.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:d(Kf,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}().value,l=function(){const{i18n:e,router:t}=ie(),n=t.currentUrl.value,[a,i]=s(void 0),o="true"===n.searchParams.get("company_location_changed");return r(()=>!0!==a&&o?(i(!1),{code:mv.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>i(!0)}):null,[a,e,o])}(),c=function(){const{i18n:e,shop:t,checkout:n}=ie(),[r,a]=s(!1),i=sb(),o=jc(),l=n.configuration.layout.isOnePage.value;return r||!i.value||o.value||l||!n.isShippingRequired.value?null:{code:mv.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:d(mA,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:d(Kf,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>a(!0)}}(),u=function(){const{i18n:e,shop:n,checkout:r}=ie(),a=jc(),i=dO(),o=kS(),s=r.configuration.layout.isOnePage;return t(()=>{const{deliveryAddressErrors:t}=o.value,[r]=t;if(s.value||i.value||!r)return null;const l=a.value?d(qf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):d(qf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:d(Kf,{href:`mailto:${n.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),c=1===t.length;return{code:mv.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:c?r.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:c?l:d(y,{children:[d(uO,{children:t.map(e=>d(lO,{children:d(qf,{children:e.messageNode??e.message})},`${e.target}${e.message}`))}),l]})}})}().value,p=(()=>{const e=m(!1),{checkout:{negotiator:n}}=ie(),{allViolations:r}=n.current.fields;return t(()=>{const t=r.value?.filter(e=>iO.has(e.code))||[],n=t.length>0?t[0]:null;return e.value||!n?null:{code:mv.TipsViolations,localizedMessage:n.localizedMessage||n.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})})().value,h=CD().value,g=(()=>{const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.allViolations;return t(()=>0===(r.value?.filter(e=>oO.has(e.code))||[]).length?null:{code:mv.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})})().value,f=pO().value,v=function(){const{i18n:e,shop:n,checkout:r}=ie(),{allViolations:a}=r.negotiator.current.fields,i=jc(),{paymentLines:o}=r.negotiator.parts;return t(()=>{if(Boolean(Nt(o.value,"APPLE_PAY"))&&!r.isShippingRequired.value)return null;if(i.value)return null;const t=a.value?.filter(e=>Gn.has(e.code))||[];return 0===t.length?null:{violations:t,noticeType:mv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:mv.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}().value,_=function(){const{i18n:e,shop:n,observability:r,checkout:{negotiator:a}}=ie(),{buyerIdentity:i,allViolations:o}=a.current.fields;return t(()=>{if(!i.value?.purchasingCompany)return null;const t=(o.value||[]).filter(e=>!sO.includes(e.code));for(const e of t)r.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:e.code}});return 0===t.length?null:{violations:t,noticeType:mv.OtherViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:mv.OtherViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}().value,{currentDetour:b}=ac().value,k=b?.type&&aO.includes(b.type),{shippingAddress:P}=e.parts;if(!a||k)return[];const S=P.peek(),w=a?.location.shippingAddress||{},C=Wn(S,w);return[...f?[wD(f)]:[],...v?[wD(v)]:[],..._?[wD(_)]:[],...o?[o]:[],...l?[l]:[],...c?[c]:[],...u?[u]:[],...p?[p]:[],...h&&i&&C?[h]:[],...g&&i?[g]:[]]}(),h=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:a}=e.current.fields,{lastJourneyProgression:i}=e,o=function(){const{client:e,i18n:t}=ie(),a=e.unstable_getSerialization("logoutUrl")||"",i=r(()=>function(e,t){return{PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID:e.translate("wallets.errors.terminal",{walletName:e.translate("brand.paypal")}),PROPOSAL_SESSION_IDENTIFIER_NOT_UNIQUE:e.translate("session_errors.session_not_unique"),PROPOSAL_SESSION_ALREADY_FINISHED:e.translate("session_errors.session_already_finished"),DISCOUNTS_CURRENTLY_INACTIVE:e.translate("discount_errors.generic_error"),DISCOUNTS_NO_ENTITLED_LINE_ITEMS:e.translate("discount_errors.generic_error"),DISCOUNTS_USAG
2E_LIMIT_REACHED:e.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_NOT_ELIGIBLE:e.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED:e.translate("discount_errors.generic_error"),BUYER_IDENTITY_COMPANY_PURCHASE_PERMISSION_REQUIRED:e.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(Kf,{href:t,children:e.translate("b2b_errors.log_out_link_text")})}),BUYER_IDENTITY_LOST_ACCESS_TO_COMPANY:e.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(Kf,{href:t,children:e.translate("b2b_errors.log_out_link_text")})}),ARTIFACT_DISSATISFACTION:e.translate("artifact_errors.artifact_dissatisfaction_without_violation"),BUYER_IDENTITY_PRESENTMENT_CURRENCY_DOES_NOT_MATCH:e.translate("general.errors.buyer_identity.buyer_identity_presentment_currency_does_not_match"),[ns]:e.translate("remote.errors.currency_mismatch_removal")}}(t,a),[t,a]);return n((e,t)=>{const n=i[e.code];return{...e,localizedMessageHtml:n??e.localizedMessageHtml,localizedMessage:n??e.localizedMessage,tone:t}},[i])}(),s=fO();return t(()=>{const t=e.current.fields.paymentLines?.value?.lines,n=Boolean(Nt(t,"APPLE_PAY")),r=("success"===i.value.type||"error"===i.value.type)&&"completion"===i.value.negotiationStage,l=[],c=[];for(const e of a.value||[])"ConfirmChangeViolation"!==e.__typename&&"UnprocessableTermViolation"!==e.__typename&&"RemoveTermViolation"!==e.__typename&&"ArtifactDissatisfactionViolation"!==e.__typename||(Xo.has(e.code)&&l.push(o(e,"info")),Qo.has(e.code)&&c.push(o(e,"warning")),Zo.has(e.code)&&r&&l.push(o(e,"critical")),es.has(e.code)&&l.push(o(e,"critical")),n&&!s.value&&ts.has(e.code)&&l.push(o(e,"critical")));const u=l.length>=1?l.map(e=>e.priority??0).reduce((e,t)=>e>t?e:t):0,d=l.length>=1?l.filter(e=>(e.priority??0)>=u):l;return c.concat(d)})}().value,g=function(){const{source:e,checkout:{negotiator:n}}=ie(),{paymentLines:r,buyerIdentity:a}=n.current.fields,i=pO(),o="draftOrder"===e.type;return t(()=>o&&!a.value?.purchasingCompany&&r.value?.lines?.some(e=>"deferred"===e.method.type)?i.value:null)}(),f=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.allViolations,a=ac(),i=m(void 0);return oc(e=>{"complete"!==e.type&&"invalid"!==e.type&&"failed"!==e.type&&(i.value=e.negotiationStage)}),t(()=>{const t=r.value?.filter(({code:e})=>"DELIVERY_DELIVERY_LINE_DETAIL_CHANGED"===e),[n]=t??[];if(!n)return;const o="payment"===a.value.currentPage?.id;return"completion"===i.value||"negotiation"===i.value&&o?{...n,tone:"critical",localizedMessage:e.translate("payment.shipping_rate_updated"),localizedMessageHtml:e.translate("payment.shipping_rate_updated"),priority:1}:void 0})}(),{checkout:{configuration:v,negotiator:_}}=ie(),b=v.layout.isOnePage.value,{allViolations:k}=_.current.fields,P=t(()=>Jy(k.value??[])),S=tO();return[...h,...g.value?[wD(g.value)]:[],...u.value?[u.value]:[],...l.value?[l.value]:[],...e.value?[e.value]:[],...a.value?[a.value]:[],...o?[o]:[],...p,...c&&!P.value?[c]:[],...S.value?[S.value]:[],...f.value&&!b?[f.value]:[]].filter(rs("localizedMessage"))}function vO(e,t){const n=e.peek()||{};Object.entries(t).some(([e,t])=>n[e]!==t)&&(e.value={...n,...t})}function _O(){const e=WD(wn.AmazonPay),t=WD(wn.BuyWithPrime),{hasError:r}=rv(Do),{checkout:a}=ie(),i=a.latestReceipt.value,o=i?.id,{persistedAmazonSignal:s}=gn();return{hasError:Boolean(r&&(e.value||t.value))&&o!==s.value?.receiptIdForPaymentDecline,clearError:n(()=>vO(s,{receiptIdForPaymentDecline:o}),[s,o])}}function bO(){const{checkout:e}=ie(),t=e.latestReceipt.value,{persistedApplePaySignal:i,inMemoryApplePayParts:{paymentSheetError:o}}=gn(),s=m(!1),l=m(!1),c=i.value,u=fO(),d=n(()=>{s.value=!0,l.value=!1},[s,l]),p=s.value,h=l.value;oc(e=>{if("error"===e.type&&"completion"===e.negotiationStage){const t=e.violations.some(e=>"PAYMENTS_APPLE_PAY_SESSION_EXPIRED"===e.code);l.value=t}});const g=r(()=>!(!u.value||!h&&(!t||p||"failed"!==t.status||"payment"!==t.failure.type||c?.receiptIdForPaymentFailure!==t.id)),[t,u.value,c,p,h]);return a(()=>{g&&(o.value=void 0)},[g,o]),{hasError:g,clearError:d}}function kO(e,t,n,r){if("failed"!==e?.status)return!1;const a="draftOrder"===n&&"payment"===e.failure.type&&!0!==e.failure.hasOffsitePaymentMethod&&r===e.id;return t===e.id||a}function PO(){const[e,t]=Kg(Ct.LastSeenErrorReceiptId),n=Tt(),{checkout:r,client:i,source:o}=ie(),l=r.latestReceipt.value,c=i.unstable_getSerialization("receipt")?.latestReceipt,u="FailedReceipt"===c?.__typename?c.id:void 0,[d,p]=s(()=>!n.peek()||kO(l,e,o.type,u));return a(()=>{const n=kO(l,e,o.type,u);p(n),"failed"===l?.status&&e!==l.id&&t(l.id),"failed"!==l?.status&&t(void 0)},[l?.id,l?.status]),d}function SO(e){return e.some(({code:e})=>_k.has(e))}function wO(e,t){if(!e)return null;const n="code"in t?t.code:void 0,r="ids"in t?t.ids:void 0,a=e.filter(e=>n?!EO(e,n):!r||!r.includes(e.id));return a.length>0?a:null}const CO=(e,t)=>
2e.toUpperCase()===t.toUpperCase(),EO=({discountLine:e},t)=>Boolean(t&&CO(e.discount.title,t));function xO({inputRef:e,headingId:t,monorailSection:l}={}){const{checkout:c,i18n:u,userEvents:d,shop:p,shopPay:h,source:g}=ie(),{discountCodeWarningSignal:f,reductionsErrorsSignal:y,reductionsValueSignal:v,derivedErrorMessageSignal:_,refreshNegotiationSignal:b,currentDiscountCodeAttemptSignal:k}=c.negotiator.context,{negotiate:S}=ic(),w=m(v.peek()),[C,E]=s(v.peek().length>0),x=f.value,{discountLines:I,paymentLines:A,reduction:T}=c.negotiator.parts,L=c.negotiator,N=is(p),R="shopPay"===c.identity.current.value,M=I.value,[D,O]=s([]),z=function(){const{i18n:e,checkout:{negotiator:t}}=ie(),{voidedGiftCardsSignal:a}=t.context,i=a.peek(),o=r(()=>new Set([...hk,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"]),[]),s=r(()=>({REDUCTION_GIFT_CARD_ALREADY_APPLIED:()=>e.translate("field_errors.gift_card_already_applied"),PAYMENTS_GIFT_CARD_DISABLED:()=>e.translate("field_errors.gift_card_invalid",{last_four_characters:(i[0]??"").slice(-4).toUpperCase()})}),[i,e]);return n(e=>e.reduce((e,t)=>o.has(t.code)?(e.push(s[t.code]()),e):e,[]),[s,o])}(),B=Sf(),{currentPage:V}=ac().value,F=vn("discountLines").value,U=i(0),[q,j]=s(!1),H=r(()=>M?.reduce((e,t)=>(t.message&&!D.includes(t.discount.title)&&e.push({id:vl(),discountCode:t.discount.title,message:t.message??"",discountLine:t,tone:"info"}),e),[]),[M,D]);a(()=>{F&&(U.current+=1)},[F,U]),a(()=>{F||j(!1)},[F]),a(()=>{ee(q&&F)},[x,F,U,q]);const $=i(V?.id);a(()=>{$.current!==V?.id&&($.current=V?.id,y.value=[])},[V?.id]);const Y=n(e=>{const t=f.value??[];f.value=wO(t,{ids:e}),B()},[B,f]),W=n(e=>{const t=H.filter(({id:t})=>e.includes(t)).map(({discountCode:e})=>e);O(e=>[...e,...t]),B()},[H,B]),G=n(e=>{v.value=e,e&&(w.value=e)},[v,w]),J=n(({clearWarnings:e=!0,preserveValue:t=!1}={})=>{t||(G(""),E(!1),k.value=null),e&&(f.value=null)},[k,f,G]),K=n(()=>{t&&document.getElementById(t)?.focus()},[t]),X=n(e=>{G(e?.trim()),y.value.length>0&&(y.value=[])},[G,y]),Q=n(()=>{y.value.length>0&&(y.value=[])},[y]),[Z,ee]=s(!1),te=n((e,t)=>{const n=[],r=[],a=f.value??[],i=k.value;for(const o of e){const e=sl===o.code;switch(o.type){case"InputValidationError":case"UnprocessableTermViolation":if(gk.has(o.code)){n.push(o);break}"negotiation"!==t&&hk.has(o.code)&&n.push(o);break;case"RemoveTermViolation":case"ConfirmChangeViolation":{const a="ConfirmChangeViolation"===o.type,s=Ml(o.targetEntity),l=Boolean(i&&s&&CO(s.title,i));if(ll.has(o.code)&&"completion"!==t&&!l)break;if(gk.has(o.code)){n.push(o);break}if("discountCodeTrigger"!==s?.discount.type||!al.has(o.code))break;const c=vk.has(o.code),u={message:o.localizedMessage??o.nonLocalizedMessage,messageHtml:o.localizedMessageHtml,discountLine:s,tone:c?"info":"warning",discountCode:s.discount.title,id:vl(),errorCode:o.code,isConfirmChangeViolation:a};if(e){r.push(u);break}i&&!l||r.push(u);break}}}return y.value=n.slice(-1),i||r.unshift(...a.filter(e=>e.errorCode===sl)),f.value=r.length>0?r:null,{hasWarnings:r.length>0,hasPreserveInputErrors:e.some(e=>gk.has(e.code))}},[k,f,y]),ne=n(async()=>{await S({silenceViolations:[...nr],onComplete:e=>{c.unstable_overwriteLatestReceipt(void 0),b.value=!1,"success"!==e.status&&"error"!==e.status||te(e.errors)}})},[te,S,c,b]);P(()=>{const e=c.latestReceipt.value;!b.peek()&&e&&Vy(e)&&"discount"===e.failure?.type&&(b.value=!0,o(()=>{ne()}))}),oc(n(e=>{"errors"in e&&te(e.errors,e.negotiationStage)},[te])),P(()=>{const e=L.lastJourneyProgression.value;"error"===e.type&&"completion"===e.negotiationStage&&o(()=>te(e.errors,"completion"))}),os(({parts:e,reason:t})=>{const n=f.peek()??[],r=k.peek(),a=r&&n.every(e=>!EO(e,r));if(0===n.length)return{behavior:"allow"};if("completion"===t||a)return f.value=null,{behavior:"allow"};if("progression"!==t&&"negotiation"!==t)return{behavior:"allow"};const i=e.discountLines.peek(),o=((e,t,n)=>{const r=t.reduce((t,r)=>{if(r.errorCode===sl||((e,t)=>t.some(t=>("discountCodeTrigger"===t.discount.type||"code"===t.discount.type)&&EO(e,t.discount.title)))(r,e))return t;const a=EO(r,n);return!n||a?t.set(r.discountCode.toUpperCase(),r):t},new Map);return[...r.values()]})(i,n,r);return o.length>0&&(e.discountLines.value=[...i,...o.map(({discountLine:e})=>e)]),{behavior:"allow"}}
2);const re=n(e=>(e||A.value).filter(e=>"giftCard"===e.method.type&&"code"in e.method).map(e=>e.method.code),[A]),ae=n(()=>I.value.filter(e=>"code"===e.discount.type).map(e=>e.discount.title),[I]),oe=n(async()=>{j(!0);const t=v.value,n=JSON.parse(JSON.stringify(A.value));k.value=t,e?.current?.blur(),K();const r=ae(),a=new Set(I.value.filter(e=>"code"===e.discount.type&&e.discount.codeHidden).map(e=>e.discount.title));await S({silenceViolations:Fe(["deliveryNext"]),fieldsToResolve:[...mk],loading:["deliveryNext","discountLines"],customizeNegotiation:e=>({...e,reduction:{code:t}}),onComplete:e=>{if("success"===e.status||"error"===e.status){const{hasWarnings:i,hasPreserveInputErrors:o}=te(e.errors);J({clearWarnings:!i,preserveValue:o});const s=SO(e.errors);if(s&&e.errors.some(e=>vk.has(e.code))){const e=ae(),n=r.filter(t=>!e.includes(t)),[i]=n;void 0!==i&&(1===n.length&&a.has(i)?($u({content:u.translate("order_summary.discount_has_been_removed")}),$u({content:u.translate("order_summary.discount_code_applied_with_code",{code:t})})):$u({content:n.length>1?u.translate("order_summary.discount_code_replaced_multiple",{code:t}):u.translate("order_summary.discount_code_replaced",{old_code:i,code:t})}))}const m=e.negotiated.paymentLines?.lines||[],h=re(n),f=re(m),y=h.reduce((e,t)=>(e[t]=!0,e),{}),v=f.some(e=>void 0===y[e]),_=n.reduce((e,t)=>("giftCard"===t.method.type&&null!=t.cost&&t.cost.amount>0&&(e[ko(t.method)]=!0),e),{}),b=N&&m.some(e=>"giftCard"===e.method.type&&null!=e.cost&&e.cost.amount>0&&void 0===_[ko(e.method)]);if(!s){if(N&&(v||b)){const e=A.peek();A.value=[...e.filter(e=>!ss(e)),...m.filter(ss)]}const{runningTotal:r,merchandiseLines:a}=e.negotiated,i=r&&r.amount<=0;Boolean(!i||ls(a?.lines))||n.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===wn.BuyWithPrime)||function(e,t){const n=as(t);e.value=n}(A,N&&(v||b)?m:n);const o=u.translate("order_summary.discount_code_applied_with_code",{code:t});$u({content:v||b?u.translate("order_summary.gift_card_applied"):o}),G(""),E(!1)}const k=e.errors.find(e=>_k.has(e.code)),P=()=>{if(!s)return v?"gift_card":"discount_code"};d.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(le(p.id),10),checkoutToken:g.checkoutSessionIdentifier??"checkout_identifier_undefined",event:s?"apply_reduction_failure":"apply_reduction_success",reductionType:P(),errorMessage:k?.nonLocalizedMessage,page:"checkout",section:l}}),R&&(s?d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:"add_discount_failure"}}):d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:v?"add_gift_card":"add_discount_success"}}))}},force:!0}),B()},[J,k,B,K,re,te,e,R,S,I,A,G,u,v,d,g,c,p,N,l,ae]),se=n(async e=>{const t=I.value,n=ae(),r=t.some(t=>"code"===t.discount.type&&t.discount.title===e&&t.discount.codeHidden);if(1===t.length&&K(),Vi(h)){const t=h.discountCodes.value.filter(t=>t!==e);h.updateDiscountCodes(t)}I.value=t.filter(t=>"code"!==t.discount.type||t.discount.title!==e),f.value=wO(f.value,{code:e}),O(t=>t.filter(t=>t!==e));const a=T.value;a?.code===e&&(T.value=void 0),R&&d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:"remove_discount"}}),await S({silenceViolations:Fe(["deliveryNext"]),fieldsToResolve:[...mk],loading:["discountLines","deliveryNext"],force:!0,onComplete:t=>{"success"!==t.status&&"error"!==t.status||te(t.errors),$u({content:r?u.translate("order_summary.discount_has_been_removed"):u.translate("order_summary.discount_code_removed",{code:e}),role:"status"});const a=ae().filter(e=>!n.includes(e)),[i]=a;void 0!==i&&$u({content:I.value.some(e=>"code"===e.discount.type&&e.discount.title===i&&e.discount.codeHidden)?u.translate("order_summary.discount_has_been_applied"):u.translate("order_summary.discount_code_applied_with_code",{code:i}),role:"status"})}}),B()},[h,I,T,R,S,B,K,d,g,c,p,te,f,ae,u]),ce=n(async e=>{const t=A.value;A.value=t.filter(t=>"giftCard"!==t.method.type||!("code"in t.method)||t.method.code!==e),1===A.value.length&&K(),R&&d.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(g,c,p),action:"remove_gift_card"}}),await S({silenceViolations:Fe(["paymentLines"])}),B()},[A,R,S,B,d,g,c,p,K]),ue=v.value,de=y.value,pe=r(()=>({value:ue,valueSignal:w,onChange:X,onInput:Q,error:cs(de),errorSignal:_}),[_,w,X,Q,de,ue]),me=r(()=>z(de),[z,de]);return{loading:Z,handleSubmit:oe,handleNegotiationErrors:te,dirty:C,setDirty:E,removeDiscount:se,getGiftCards:re,removeGiftCard:ce,reductionCodeField:pe,discountCodeWarning:x,discountMessages:H,removeDiscountCodeWarnings:Y,removeDiscountCodeMessage:W,giftCardBannerErrors:me}}function IO(){const{negotiate:e}=ic(),{inMemoryApplePayParts:{asPaymentMethod:t}}=gn(),{checkout:{wallets:r,negotiator:a}}=ie(),{email:i,phone:o,billingAddress:s,paymentLines:l}=a.parts,{value:c}=a.current.fields.buyerIdentity,u=Boolean("CustomerProfile"===c?.customerProfile?.__typename),d=c?.purchasingCompany,p=Iv(),m=ck(),h=us({availableDeliveryAddresses:a.current.fields.availableDeliveryAddresses?.value,mustSelectProvidedAddress:a.current.fields.mustSelectProvidedAddress?.value}),g=n(()=>{const e={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},n=t.value;return r.activeSession.value?{...e}:u?{...e,shouldRemoveWalletContent:n,shouldResetBuyerInfo:!n,shouldRemoveBillingAddress:!0}:n?{...e,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{...e,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...e,shouldResetBuyerInfo:!0}},[r,u,t,p,d]),f=AP(),y=IP();return n(async({shouldPersist:n=!0}={})=>{const{shouldResetBuyerInfo:a,shouldRemoveWalletContent:c,shouldRemoveBillingAddress:u,forceClearLocalPickupFields:d}=g();c&&(l.value=Cn(l.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||f({shouldResetCustomerInfo:a,shouldRemovePaymentLine:!t.value,isConstrainedAddress:h}),d&&(i.value="",o.value=""),u&&(s.value=m("billing")??Yl(s.value)),n&&!r.activeSession.value&&await e({silenceViolations:["non-stock"]})},[f,r,l,i,o,s,e,g,t,y,m,h])}function AO({shouldPersist:e}
2){const t=IO(),{walletUsedForSubmissionSignal:r,persistedApplePaySignal:a,inMemoryApplePayParts:{paymentSheetError:i,subscriptionReviewTransition:o}}=gn();return n(()=>{i.value=void 0,o.value=void 0,r.value=void 0,a.value={},t({shouldPersist:e})},[i,o,r,a,t,e])}function TO(){const e=AO({shouldPersist:!1}),{clearError:t,hasError:r}=bO(),{checkout:a,router:i}=ie(),{clearForcedCheckoutLayout:o}=Sv(fn);return TP({onClick:n(()=>{e(),o({wallet:"APPLE_PAY"}),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value),r&&t()},[e,a,o,i,t,r]),shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function LO(){const{i18n:e}=ie(),{onClick:t}=TO(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:d(Kf,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return d(zD,{errorType:SP.PaymentError,tone:"critical",children:d(Qf,{alignItems:"start",gap:"small-500",children:d(cx,{children:n})})})}function NO(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:n}}=gn(),r=vn("shippingAddress");return t(()=>n.value&&!e.value.loading&&!r.value)}function RO(e){const t=NO(),{violations:n}=Zy(e),r=n.value;if(0===r.size||!t.value)return null;const a=new Set;for(const i of r)a.add(i.localizedMessage??i.nonLocalizedMessage);return Array.from(a)}function MO({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=ie(),n=RO(new Set([...ds].filter(t=>e.every(e=>!t.startsWith(e))))),r=RO(new Set([...Gn,...Ho].filter(t=>e.every(e=>!t.startsWith(e)))));return n?{errors:[t.translate("shipping_errors.shipping_method_not_available_generic.one")],type:"no delivery strategy"}:r?{errors:r,type:"invalid address"}:{errors:null,type:null}}function DO(){return MO({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function OO(){const{i18n:e}=ie(),t=DO();return t?.length?d(zD,{tone:"critical",errorType:SP.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),d(uO,{children:t.map(e=>d(lO,{children:d(qf,{children:e})},e))})]},"amazon-pay-errors"):null}function zO(){const e=gO(),n=T(DO()),{persistedAmazonSignal:r,inMemoryAmazonPayParts:{hasPaymentSheetError:a}}=gn();return t(()=>{const t=r.value;return t?.primeError||e.value?t?.primeError?"terminal error":a.value?"payment sheet error":n.value?.length?"amazon pay error messages":null:null})}function BO(){const e=zO();return e.value?d(VO,{errorMessagesType:e.value}):null}function VO({errorMessagesType:e}){const{i18n:t,checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,{value:i}=n.negotiator.current.fields.paymentLines,{persistedAmazonSignal:o}=gn();return function(e="unknown"){const{observability:t}=ie();a(()=>{t.counter({name:"WalletsPlatform_buy_with_prime_prime_unavailable_detour_count",value:1,attributes:{reason:e}}),t.log("use_mark_prime_not_available_shown",`Buy with Prime is not available because ${e}`,{cause:e,severity:"warning"})},[])}(),a(()=>{const e=i?.lines.filter(e=>!("walletsPlatformPaymentMethod"===e.method.type&&e.method.name===wn.BuyWithPrime));e?.length&&vO(o,{primeError:void 0})},[i,o]),"payment sheet error"===e||"terminal error"===e?d(zD,{errorType:SP.PaymentError,tone:"critical",children:t.translate("wallets.errors.generic",{walletName:t.translate("brand.buy_with_prime")})},"amazon-pay-errors"):"amazon pay error messages"===e?r?null:d(OO,{}):null}function FO({errors:e,errorType:t}){return d(y,{children:e.map(e=>d(zD,{tone:"critical",errorType:t,children:e.messageNode??e.message},`${e.target}${e.message}`))})}function UO(e){if(e.startsWith("DISCOUNTS")||"ReductionViolations"===e)return SP.DiscountError;switch(e){case"NOTE_LENGTH_EXCEEDS_MAXIMUM":case"PROPOSAL_LINE_ITEM_LIMIT_REACHED":case"MERCHANDISE_LINE_LIMIT_REACHED":case"MERCHANDISE_QUANTITY_RULES_INCREMENT_NOT_MET":case"MERCHANDISE_QUANTITY_RULES_MINIMUM_NOT_MET":case"MERCHANDISE_QUANTITY_RULES_MAXIMUM_EXCEEDED":case"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY":case"MerchandiseQuantityRulesNotMet":return SP.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return SP.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUA
2L_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return SP.PaymentError;default:return SP.CheckoutError}}function qO(){const e=yO();return e.length>0?e.map(e=>d(BD,{notice:e,errorType:UO(e.code)},e.code)):null}function jO(){const{globalErrors:e}=kS().value;return e.length>0?d(FO,{errors:e,errorType:SP.CheckoutError}):null}function HO(){const{merchandiseLineTransformerErrors:e}=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=vn("allViolations");return t(()=>{const e=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return r.value||!n.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...n.value.reduce((t,n)=>("UnprocessableTermViolation"===n.__typename&&e.includes(n.code)&&t.push({message:n.localizedMessage||n.nonLocalizedMessage,target:n.target}),t),[])].filter(gS())}})}().value;return e.length>0?d(FO,{errors:e,errorType:SP.MerchandiseError}):null}function $O(){const{contactErrors:e}=kS().value,t=hx();return 0===e.length?null:t.value.contact?d(FO,{errors:e,errorType:SP.ContactError}):null}function YO(){const e=zO();return Boolean(e.value)?d(BO,{}):null}function WO(){const{hasError:e}=_O(),t=PO();return e&&!t?d(ZD,{}):null}function GO(){const{hasError:e}=bO();return e?d(LO,{}):null}function JO(){const{giftCardBannerErrors:e}=xO(),{checkout:{configuration:t,negotiator:n}}=ie(),r=t.layout.isOnePage.value,{value:a=[]}=n.current.fields.allViolations,i=r?void 0:e?.[0],o=a.find(e=>"PAYMENTS_GIFT_CARDS_UNAVAILABLE"===e.code);return o?d(zD,{errorType:SP.DiscountError,tone:"critical",children:o.localizedMessage}):i?d(zD,{errorType:SP.DiscountError,tone:"critical",children:i}):null}const KO=()=>{const{isAppLayout:e}=$D(),{embed:t,checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:a="base"}}=Gm(),i=[qO(),jO(),HO(),$O(),YO(),WO(),JO(),GO()].filter(Boolean);if(0===i.length)return null;const o=e?"none large-200 base large-200":r?"none none base none":"none",s=Boolean(t?.isFlagshipPartner)&&"high"===a;return d(Qf,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${s?"none none small-100 none":"none"}, ${o}`,children:i})},XO=E(function({section:e="top"}){return{toast:d(HD,{}),top:d(KO,{}),reductions:d(qD,{}),delivery:d(VD,{}),payment:d(FD,{})}[e]});function QO({sectionId:e,children:t}){const{source:n}=ie(),o="simulated"===n.type,{sectionRef:s}=function(e){const{source:t,checkout:{negotiator:n}}=ie(),o="simulated"===t.type,s=i(null),{allRenderedSections:l,getRenderedSection:c}
2=n.context,u=c({sectionId:e}),d=u.value;return a(()=>{if(o&&s?.current){if(!d.rendered&&s?.current){u.value={rendered:!0};const t=l.value;l.value={...t,[e]:!0}}return()=>{if(d.rendered){u.value={rendered:!1};const t={...l.value};e in t&&delete t[e],l.value=t}}}},[o,s,d,e,u,l]),r(()=>({sectionRef:s}),[s])}(e);return d(y,o?{children:[d("div",{ref:s,style:{display:"none"}}),t]}:{children:t})}const ZO={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function ez({children:e}){const{formStatus:t}=function(){const{negotiate:e}=ic(),{handleNegotiationErrors:t,discountCodeWarning:r}=xO(),{shop:i,source:o,checkout:l,userEvents:c,shopPay:u}=ie(),{discountLines:d,reduction:p}=l.negotiator.parts,m=u.user.wallet.value,h=function(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=ie();return n(async n=>{const{data:r,error:a}=await e.mutate(ZO,{variables:{code:n,shopifyDomain:t}});if(a||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:i}=r;return i.userErrors.length>0?{status:"failed",errors:i.userErrors}:{status:"success"}},[e,t])}(),[g,f]=s(!1),[y,v]=s(""),_=u.user.shopAccountUuid,b=n((e,t)=>
2{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...ra(o,l,i),action:e,shopAccountUuid:t,shopPermanentDomain:i.myshopifyDomain,discountCode:y}})},[c,o,l,i,y]),k=n(async e=>{"success"===(await h(y)).status&&b("invalidated - discount had been deleted",e)},[h,b,y]),[P,S]=s(()=>d.value.length?"open":"closed"),w=n(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=new Set([...gk,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",sl]);return e.some(e=>t.includes(e.type)&&n.has(e.code))},[]),C=n(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return e.some(e=>t.includes(e.type)&&n.includes(e.code))},[]);return a(()=>{v(m.latestDiscount?.code??""),y&&S("negotiating_app_discount")},[y,m]),a(()=>{0===d.value.length&&S(e=>"negotiating_app_discount"===e?e:r?"open":"closed")},[r,d.value.length]),a(()=>{const n=y;if(!g&&"negotiating_app_discount"===P&&n){f(!0),p.value={code:n};const a=_.value;e({onComplete:async e=>{if(f(!1),"success"===e.status||"error"===e.status){const i=e.negotiated.discountLines?.lines.some(e=>e.discount.title.toLowerCase()===n?.toLowerCase());y&&(t(e.errors),i?b("applied",a):w(e.errors)?k(a):C(e.errors)&&b("failed to apply - invalid cart",a),p.value=void 0),S(i||r?"open":"closed")}},force:!0})}},[g,t,r,e,y,P,w,b,C,k,c,p,_.value]),{discountLines:d.value,formStatus:P,setFormStatus:S,walletDiscountCode:y}}();return"negotiating_app_discount"===t?d(Df,{inlineAlignment:"center",children:d(Bf,{})}):d(y,{children:e})}function tz({children:e,state:t,errors:n}){const r=LD(),o=jg(),s=i([]);return a(()=>{const e=s.current;return Object.entries(n).forEach(([n,a])=>{e.push(a.subscribe(e=>{if(!e)return;const a=r(n),i=t[n]?.value??"",s=i?SP.InputInvalid:SP.InputRequired,l="string"==typeof(c=e)||"number"==typeof c?c.toString():Ki(c)?c.message:ps(c)?c.textValue:"";var c;o({target:a,errorType:s,value:i,message:l,timestamp:new Date})}))}),()=>{e.forEach(e=>e()),s.current=[]}},[]),e}function nz(){const{source:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.canUpdateDiscountCodes;return t(()=>(r.value??!0)&&!Hn(e))}function rz(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=ct(),a=e.current.fields.paymentMethods;return t(()=>(!e.current.fields.buyerIdentity.value?.purchasingCompany||!n.value&&!r.value)&&a.value?.some(e=>"giftCard"===e.type))}const az="_1MTFx";function iz({messages:e}){const t=e=>{return d(mA,{children:e.messageHtml?(t=e.messageHtml,null==t?null:d("span",{dangerouslySetInnerHTML:{__html:t}})):e.message});var t},[n]=e;return 1===e.length&&n?d("div",{className:az,children:t(n)}):d(uO,{children:e.map(e=>d(lO,{children:d("div",{className:az,children:t(e)})},e.id))})}const oz=E(function({removeBanner:e,messages:t,grouped:a=!1}){const{i18n:i}=ie(),o=r(()=>function(e,t){return t?[...e.reduce((e,t)=>{const n=e.get(t.tone)??{tone:t.tone,linkedMessages:[]};return n.linkedMessages.push({...t}),e.set(t.tone,n)},new Map).values()]:e.map(e=>({tone:e.tone,linkedMessages:[e]}))}(t,a),[t,a]),s=n((e,t)=>{const n=e.filter(({isConfirmChangeViolation:e})=>e).length;return n===e.length?i.translate("payment.discount_codes_modified_summary",{count:t}):n>0?i.translate("payment.discount_codes_removed_or_modified_summary",{count:t}):i.translate("payment.discount_codes_removed_summary",{count:t})},[i]);return 0===t.length?null:d(yf,{target:"cart.discountCode",children:o.map(({tone:t,linkedMessages:n})=>{if(0===n.length)return null;const r=["critical","warning"].includes(t),a=n.map(({id:e})=>e),i=[...[...n.reduce((e,t)=>e.set(t.discountCode.toLocaleUpperCase(),t),new Map).values()].reduce((e,t)=>e.set(t.message.toLocaleUpperCase(),t),new Map).values()],o=n.reduce((e,t)=>(e.add(t.discountCode.toLocaleUpperCase()),e),new Set).size,l=i.length>1,c={iconHidden:!0,onDismiss:()=>e(a),dismissible:!0,tone:t,collapsible:l,heading:l?s(i,o):void 0};return r?d(zD,{...c,errorType:SP.DiscountError,children:d(iz,{messages:i})},a[0]):d(AD,{...c,children:d(iz,{messages:i})},a[0])})})});function sz({accessibilityLabel:e,children:t,graphic:n,id:r}){const a=gw(t);return d("div",{className:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",id:r,children:[d(Qf,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&d("span",{className:a?"_14brw2":void 0,children:d(oh,{type:n})}),a&&d("span",{className:"_14brw3",children:d(qf,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:d(vA,{children:t})})})]}),e&&d(qf,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var lz="_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",cz="_14gomm27 _14gomm26 _1fragem6y",uz="_14gomm25 _14gomm24 _1fragemyk";const dz=ym(_(function({accessibilityLabel:e,children:t,disabled:n=!1,graphic:r,hidden:o=!1,href:s,id:l,removable:c=!1,removeTrackingEvent:u,onAfterHide:p,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,onRemove:_,"aria-describedby":b},k){const P=Cd(),S=Qu(),w=i(o);a(()=>{!w.current&&o&&p?.(),w.current=o},[o,p]);const C=v("_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",{[lz]:n||P,[cz]:o}),E=e?S("removeItem",{label:e}):S("removeChip");return d("div",{id:l,className:C,role:"group",children:[d(pz,{"aria-describedby":b,disabled:n,href:s,inert:P,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,ref:k,removable:c,children:d(sz,{accessibilityLabel:e,graphic:r,children:t})}),c&&d("button",{"aria-hidden":!!P||void 0,"aria-label":E,className:v("_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd",uz),"data-event-name":u,disabled:n,tabIndex:P?-1:void 0,type:"button",onClick:()=>n||P||"function"!=typeof _?void 0:_(),children:d(oh,{type:"x",size:"small"})})]})})),pz=_(function({children:e,disabled:t,href:n,inert:r,removable:a,onClick:i,onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c,"aria-describedby":u},p){const m=Dp(p),h=t??r??!1,g=h?void 0:n,f=()=>h||"function"!=typeof i?void 0:i(),y={onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c};return g||i||!a?g?d(Ym,{"aria-describedby":u,className:v(uz,"_14gomm29 _14gomm28 _1fragem128"),href:g,onClick:f,ref:m,...y,children:e}):d("button",{"aria-describedby":u,"aria-hidden":!!r||void 0,className:uz,disabled:t,onClick:f,ref:m,tabIndex:r?-1:void 0,type:"button",...y,children:e}):d("div",{className:uz,ref:m,children:e})});function mz({reductionTags:e,headingId:t}){const{i18n:n}=ie(),r=nz(),a=pR(),{removeDiscount:i,removeGiftCard:o}=xO({headingId:t});if(0===e.length)return null;const s=e.reduce((e,{hideLabel:t})=>e+(t?1:0),0);let l=0;return d(Qf,{direction:"inline",gap:"small-300",accessibilityRole:"unordered-list",accessibilityLabel:n.translate("order_summary.gift_card_and_discount_label"),ref:a,children:e.map((e,t)=>{e.hideLabel&&(l+=1);const a=e.hideLabel?n.translate("order_summary.discount_title"):e.code,c="giftCard"===e.originType?n.translate("order_summary.gift_card_masked",{last_characters:e.code.slice(-4)}):a;let u=c;"giftCard"===e.originType?u=n.translate("order_summary.gift_card_ending",{last_characters:e.code.slice(-4)}):e.hideLabel&&s>1&&(u=n.translate("order_summary.discount_title_with_position",{position:l}));const p="giftCard"===e.originType?"giftFill":"discount",m="giftCard"===e.originType?"remove_gift_card":"remove_discount_code",h="discountCode"!==e.originType||r.value?()=>{"discountCode"===e.originType?i(e.code):o(e.code)}:void 0,g="automatic"===e.originType?`automatic-discount-tooltip-${t}`:void 0;return d(Df,{accessibilityRole:"list-item",className:"ZWcPq",children:[d(dz,{accessibilityLabel:u,graphic:p,id:`tag-${t}`,interestFor:g,removable:!g,onRemove:h,removeTrackingEvent:m,children:c.toUpperCase()}),g&&d(um,{id:g,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${e.originType}-${e.code}`)})})}function hz({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return d(Cf,{children:d(yf,{target:"cart",children:d(yz,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}
2const gz=$c("ReductionsInput"),fz=$c("ReductionsHeading");function yz({headerLevel:e,monorailSection:i,autoFocus:o,autoScroll:s}){const{i18n:l,shopPay:c,shop:{discountCodesEnabled:u,giftCardsEnabled:p},checkout:h}=ie(),g="shopPay"===h.identity.current.value,f=h.negotiator,v=h.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:_,discountTagsDisplay:b,automaticTagsDisplay:k,position:P,spacing:S}}=kv(),w=Tt(),C=Ql({base:!0,medium:!1}),E=!w.value||(C??!1),x=m(!1),I=n(()=>{x.value=!x.value},[x]),A=nz(),T=cC(),{control:{labelPosition:L="inside"}}=Gm(),{reductions:{labelPosition:N=L}}=kv(),{discountLines:R,paymentLines:M}=h.negotiator.parts,D=R.value,O=M.value.reduce((e,t)=>("giftCard"===t.method.type&&"code"in t.method&&e.push({originType:"giftCard",code:t.method.code}),e),[]),z=Vi(c)&&c.discountCodes.value.length?c.discountCodes.value:null,B=z?[...new Set(z)].map(e=>{const t=D.find(t=>"code"===t.discount.type&&t.title===e),n="code"===t?.discount.type&&Boolean(t.discount.codeHidden);return{originType:"discountCode",code:e,...n?{hideLabel:!0}:{}}}):[...D.reduce((e,{discount:t,title:n})=>("code"!==t.type||e.has(n)||e.set(n,{originType:"discountCode",code:n,...t.codeHidden?{hideLabel:!0}:{}}),e),new Map).values()],V=D.reduce((e,{discount:{type:t},title:n})=>("automatic"!==t&&"custom"!==t||e.push({originType:"automatic",code:n}),e),[]),F=[..."hidden"===k?[]:V,...A.value?B:[],...O];0===F.length&&(x.value=!1);const U="always_visible"===b||"base"===b&&F.length>0&&(!E||x.value);let q=!1;"error"===f.lastJourneyProgression.value.type&&"completion"===f.lastJourneyProgression.value.negotiationStage&&(q=SO(f.lastJourneyProgression.value.errors));const j=Yc(void 0,gz),H=Yc(void 0,fz),$=Ef({active:q});a(()=>{s&&$.current&&$.current.scrollIntoView({behavior:"smooth"})},[s,$]);const{currentDetour:Y,currentPage:W}=ac().value,G=Kw("Checkout::Reductions::RenderBefore"),J=Kw("Checkout::Reductions::RenderAfter"),K=u&&A.value,X=rz(),Q=p&&X.value,{loading:Z,reductionCodeField:ee,dirty:te,setDirty:ne,handleSubmit:re,discountCodeWarning:ae,discountMessages:oe,removeDiscountCodeWarnings:se,removeDiscountCodeMessage:le}=xO({inputRef:$,headingId:H,monorailSection:i});a(()=>{const[e]=ae??[];if(e){const t=e.message.trim();if(!t)return;return $u({content:t,role:"status"})}},[ae]);const{label:ce,title:ue,placeholder:de}=function(){const{i18n:e,shop:{discountCodesEnabled:n}}=ie(),r=nz(),a=rz();return t(()=>{const t=n&&r.value;return a.value&&t?{label:e.translate("order_summary.gift_card_and_discount_label"),placeholder:e.translate("order_summary.gift_card_and_discount_placeholder"),title:e.translate("order_summary.gift_card_and_discount_title")}:a.value?{label:e.translate("order_summary.gift_card_label"),placeholder:e.translate("order_summary.gift_card_placeholder"),title:e.translate("order_summary.gift_card_title")}:t?{label:e.translate("order_summary.discount_label"),placeholder:e.translate("order_summary.discount_placeholder"),title:e.translate("order_summary.discount_title")}:{label:"",placeholder:"",title:""}})}().value,pe=r(()=>({state:{discountCode:ee.valueSignal},errors:{discountCode:ee.errorSignal}}),[ee]);if(Y&&"shopPayLogin"!==Y.type)return null;const me=ae?d(oz,{messages:ae,removeBanner:se,grouped:!0}):null,he=oe&&oe.length?d(oz,{removeBanner:le,messages:oe}):null,ge="base"===_,fe=null!=e&&"base"===P&&"outside"===N&&ue===ce,ye=!ge&&"outside"===N&&!fe,ve="base"===b&&E&&F.length>0?d(Df,{colorLayer:"control",className:"OuqRS",children:d(Km,{className:"U9F9G",onClick:I,accessibilityLabel:l.translate("order_summary.discount_code_applied_count",{count:F.length}),"data-event-name":x.value?"discount_tags_hide":"discount_tags_show",border:"base",children:d(Qf,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[d(oh,{type:"discount",tone:"monochrome"}),d("strong",{children:F.length})]})})}):null,_e=ge?d(Yf,{variant:"primary",type:"submit",loading:Z,disabled:!te,accessibilityLabel:l.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:T("apply_discount"),children:l.translate("order_summary.apply_discount_button_label")}):void 0;let be=ee.error;ge||(be=!!ee.error||void 0);const ke=d(CA,{ref:$,id:j,name:"reductions",label:ce,placeholder:de,...ee,error:be,onInput:e=>ne(e.length>0),autoFocus:o,accessoryStart:ve,accessoryEnd:_e,labelPosition:ye?void 0:N,labelAccessibilityVisibility:ye||fe?"exclusive":void 0}),Pe=d(Df,{children:[d(Qf,{gap:"base",children:[d(_D,{onSubmit:re,children:ge?ke:d(y,{children:[ye&&d(y,{children:[d(bA,{variant:"outside",htmlFor:j,label:ce}),d(CN,{blockSize:"small-400"})]}),d(Qf,{gap:"small-300",children:[d(eh,{gap:ms(["small400",S??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[ke,d(Yf,{variant:"primary",type:"submit",loading:Z,disabled:!te,accessibilityLabel:l.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:T("apply_discount"),children:v?l.translate("order_summary.apply_discount_button_label"):d(y,{children:[d(PD,{below:"medium",children:l.translate("order_summary.apply_discount_button_label")}),d(PD,{above:"small",children:d(oh,{type:"arrow-right"})})]})})]}),ee.error?d(fA,{controlID:j,children:ee.error}):null]})]})}),me,he]}),d(Ld,{id:"reduction-tags",open:U,duration:"fast",children:d(Df,{paddingBlockStart:F.length>0?"base":void 0,children:d(mz,{reductionTags:F,headingId:H})})})]});return d(y,{children:[d(Ld,{id:"gift-card-field",open:Q||K,duration:"fast",children:d(nL,{children:[d(TS,{id:H,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:ue}),e&&d(CN,{blockSize:"base"}),d(Qf,{gap:"base",children:[d(yT,{customizations:G}),d(QO,{sectionId:"reductions",children:g&&v?d(ez,{children:Pe}):d(tz,{...pe,children:Pe})}),d(yT,{customizations:J}),h.configuration.showPayButton&&K&&(v||"payment"===W?.id)&&d(SD,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:l.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!Q&&!K&&d(XO,{section:"reductions"})]})}const vz={};function _z(e){const t=function(e){return vz[e]||(vz[e]=function(){const e=S(null),t=new Set,n=S(),r=S(!1),a=S();let i=[];function o(){for(const e of i)e.disconnect();if(e.value&&a.value&&null!=a.value.floatingElementBlockSize&&"undefined"!=typeof IntersectionObserver){i=[new IntersectionObserver(([e])=>{n.value=e.isIntersecting},{threshold:[0,1],rootMargin:`0px 0px -${a.value.blockEndOffset??0}px 0px`}),new IntersectionObserver(([e])=>{r.value=1===e.intersectionRatio||e.boundingClientRect.bottom<e.rootBounds?.bottom},{threshold:[0,1],rootMargin:`999999px 0px -${(a.value.blockEndOffset??0)+(a.value.floatingElementBlockSize??0)}px 0px`})];for(const t of i)t.observe(e.value)}}const s=e.subscribe(o),l=a.subscribe(o),c=k(()=>Boolean(e.value&&a.value&&null!=n.value)),u=k(()=>{const e=Boolean(n.value),t=r.value,i=a.value?.floatingElementHiddenBelowTrigger;return i?e||t:e&&!t});return{triggerVisible:n,triggerAboveFloatingElement:r,triggerNode:e,triggerNodes:t,config:a,ready:c,floatingElementHidden:u,subscriptions:0,dispose(){s(),l();for(const e of i)e.disconnect();i=[],t.clear()}}}()),vz[e]}(e);return a(()=>(t.subscriptions++,()=>{t.subscriptions--,0===t.subscriptions&&function(e){vz[e]?.dispose(),delete vz[e]}(e)}),[t,e]),t}function bz(e){const t=_z(e),r=i(null),a=n(e=>{const n=r.current;n&&n!==e&&t.triggerNodes.delete(n),e&&t.triggerNodes.add(e),r.current=e,t.triggerNode.value===n&&n!==e?t.triggerNode.value=e??t.triggerNodes.values().next().value??null:e&&null===t.triggerNode.value&&(t.triggerNode.value=e)},[t]);return{floatingElementHidden:t.floatingElementHidden,ready:t.ready,config:t.config,triggerNode:t.triggerNode,setTriggerNode:a}}function kz(e){return e.every(({quantity:e})=>0===e)}const Pz=e=>d(nL,{children:e});function Sz({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,monorailSection:a="order_summary",hideReductions:i=!1,reductionsFieldAutoFocus:o=!1,reductionsFieldAutoScroll:s=!1}){const{ready:l}=bz("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:p,visibility:m,layout:h}}}=ie(),g=m.showReductions&&!i,f=h.isOnePage.value,{currentDetour:v}=ac().value,_="thankYou"===v?.type,b=Kw(r(()=>_?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",[_]),"ORDER_SUMMARY3"),k=Kw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),P=Ql({base
2:!0,medium:!1}),S=Tt(),w=f&&(!S.value||P),C=TL(),E=u.proposal.facts.merchandiseLines??[];if(f&&!p){const e=[];for(const t of C.value.values())e.push(...t);if(e.push(...E),kz(e))return d(cx,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return d(e?y:nL,{...!e&&{containerName:"s-shell-section"},children:[d(Qf,{gap:"large-200",children:[!n&&d(TS,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&d(cR,{}),g&&d(hz,{monorailSection:a,autoFocus:o,autoScroll:s}),!_&&d(yT,{customizations:b,gap:"large-200",render:Pz}),d(fD,{}),(!w||_)&&d(yT,{customizations:_?b:k,gap:"large-200",render:Pz})]}),d(x,{when:l,children:d(Df,{minBlockSize:"@media (inline-size >= medium) 72px, 0"})})]})}function wz(e){return d(Sz,"disclosure"===e?{monorailSection:"top_order_summary"}:{})}function Cz({children:e}){return Tt().value?d(y,{children:e}):null}const Ez=()=>dl(()=>import("./1d52cad1.C0MQgmv6.js"),__vite__mapDeps([246,2,1,3,4,5,7,8,9,10,11])),xz=w({displayName:"EngineOrderSummaryRegion",suspenseName:({slot:e})=>`engine-order-summary-${e}`,useError:WE("EngineOrderSummaryRegion"),renderError:(e,{slot:t})=>d(Cz,{children:wz(t)}),load:()=>C(Ez)});function Iz({slot:e}){const{checkout:{configuration:{layout:t}}}=ie(),n=t.trees.value;if(void 0===n)return wz(e);const r=Az(n.checkout.pages,e);return r?d(xz,{slot:e,root:r}):wz(e)}function Az(e,t){if(!e)return;const[n,r]="disclosure"===t?["order-summary","disclosure"]:["aside","aside-primary"];for(const a of e){if(a.type===n&&a.slot===r)return a;const e=Az(a.children,t);if(e)return e}}function Tz(){const e=ie();return t(()=>__(e))}function Lz(){const{checkout:e}=ie();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function Nz(){const{mobileCheckoutSdk:e,embed:n}=ie(),r=Tz(),a=Lz(),i=ac();return t(()=>!(r.value||e.enabled||n?.isCheckoutKit())||(e.enabled&&e.variant.isStandard()||n?.isCheckoutKit()?"thankYou"===i.value.currentDetour?.type:Boolean(a?.disclosureEnabled)))}function Rz(){const{embed:e,checkout:t}=ie(),n=Boolean(e?.platformCategory&&"WEB"!==e.platformCategory),r="WEB"===e?.platformCategory&&t.configuration.payButton.stickyPayButtonEnabledInWeb,a=n&&t.configuration.payButton.stickyPayButtonEnabledInMobile;return r||a}function Mz(){const{checkout:e,embed:n,shopPay:r}=ie(),{progressing:a}=ic(),i=ac(),{submitting:o}=e.negotiator;return t(()=>{if(n?.isFlagshipPartner&&o.value)return!0;if(e.isRedirectingExternally.value)return!0;if(e.checkoutExit.isExiting.value)return!0;const{currentPage:t,plan:s}=i.value,l=t&&s.greenPath[s.greenPath.length-1]?.id===t.id;let c=a.value||r.session.isButtonProgressing.value;return void 0!==t&&(c=c&&Boolean(l)),c})}function Dz(e={}){const[t,r]=s(null),[a,o]=s(null),l=i(null);return{entry:t,observer:a,ref:n(t=>{if(l.current?.disconnect(),l.current=null,!window.IntersectionObserver||!t)return r(null),void o(null);const n=new IntersectionObserver(e=>{r(e[0]??null)},e);n.observe(t),l.current=n,o(n)},[e.root,e.rootMargin,e.threshold])}}function Oz(){const e=Rf(),{checkout:n,embed:r}=ie(),i=UT(),{payNowButtonElement:o}=UP(),s=yr(r?.embedder),{entry:l,ref:c}=Dz({threshold:.5});a(()=>(c(o??null),()=>c(null)),[o,c]);const u=T(l?.isIntersecting);return t(()=>Boolean(!s&&(n.isRedirectingExternally.value||!e.value&&!n.wallets.activeSession.value&&!i.value&&!u.value)))}function zz(e){return"available"===e.status&&e.methods.some(({methodType:e})=>"SHIPPING"===e||"LOCAL"===e)}function Bz(){const e=li();return t(()=>{const t=e.value?.filter(zz);return{shippableDeliveryLines:t?.length?t:void 0}})}function Vz(e){return!!e&&("unavailable"===e.status||"partial"===e.status||"filled"===e.status&&!e.lines.some(zz))}function Fz({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!Vz(e))return!1;const a=VN(r)?n??t:t;return vi(a)}const Uz={initial:{addressInvalid:"empty",addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting"},empty:{addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting",reset:"loading"},resetting:{reset:"initial"},loading:{addressComplete:"loading",addressInvalid:"empty",negotiationResolved:"negotiated",countryChanged:"resetting",addressReplaced:"loading"},negotiated:{addressComplete:"loading",addressInvalid:"loading",addressReplaced:"loading",countryChanged:"resetting",addressReset:"resetting",deliveryMethodChanged:"initial"}};const qz=["phone","company","firstName","lastName"];function jz(e,t,n){const r=new Map;for(const[a,i]of t)if("coordinates"!==a&&"name"!==a&&"oneTimeUse"!==a&&"handle"!==a&&e.includes(a)){if(qz.includes(a)&&(!n[a]||0===n[a]?.length))continue;r.set(a,i)}return r}const Hz=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const e=r.peek();ps(e)&&"error"===e.type&&t.set(n,e.textValue)}return t};function $z({children:e}){const o=wh(),{observability:s,embed:l,events:c,checkout:{negotiator:u}}=ie(),{current:p,parts:h}=u,{deliveryMethodsAddressErrors:g,deliveryMethodTimingSignal:f,deliveryMethodDeltaSignal:y}=u.context,v=r(()=>{const e=p.fields.deliveryNext.peek();return function(e,t){return De((e,n)=>{const r=Uz[e.status][n];if(r)return{status:r};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:e.status,action:n})},{status:e})}("filled"===e?.status?"negotiated":"initial",s)},[p.fields.deliveryNext,s]),_=n(e=>{v.value=e},[v]),b=i(!1);
2l?.isFlagshipPartner&&!b.current&&(b.current=!0,c.addEventListener("embed:address-replace",()=>{_("addressReplaced")}));const S=i(!1);S.current||(S.current=!0,c.addEventListener("wallet:address-replace",()=>{_("addressReplaced")})),function(e,t){const{observability:n,checkout:{wallets:o,negotiator:s},checkout:l,shop:{shippingCountries:c}}=ie(),{deliveryMethodsAddressErrors:u,deliveryMethodTimingSignal:d}=s.context,{shippingAddress:p}=s.parts,h=l.configuration.isAddressDelegationEnabled,g=p.fields.countryCode.value,f=wy(g,c),{loading:y}=Mt(g),{negotiate:v}=ic(),{setAddressError:_}=Py(u),b=r(()=>hs(),[]),{resetAddressSuggestions:P}=Sy(b,u),S=Ly(g),w=function(e){const t=m();return vh(e,({action:e})=>{t.value=e}),t}(e),C=Ih(),E=r(()=>k(()=>function(e){switch(e){case Me.Country:return["countryCode"];case Me.CountryProvince:return["countryCode","zoneCode"];case Me.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case Me.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case Me.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}(C({countryCode:p.fields.countryCode.value,zoneCode:p.fields.zoneCode.value}))),[C,p.fields.countryCode,p.fields.zoneCode]),x=i();a(()=>{y||(x.current?.(),x.current=void 0)},[y]);const I=No(()=>{const e=p.peek();if(y)return void(x.current=()=>I());const n=f(e),r=jz(E.peek(),n,e);"addressReplaced"!==w.peek()&&(0===r.size?t("addressComplete"):t("addressInvalid"))},150);xh(p,()=>{t("countryChanged"),p.fields.postalCode.value=void 0,p.fields.zoneCode.value=void 0,p.fields.city.value=void 0,p.fields.address1.value=void 0,p.fields.address2.value=void 0,t("reset")});const A=r(()=>k(()=>E.value.filter(e=>"countryCode"!==e).map(e=>{const t=p.fields[e].value;if(t)return"postalCode"===e?t.replace(/[^a-z0-9]/gi,"").toLowerCase():t.toLowerCase()}).join("_")),[p.fields,E]);a(()=>{let t=!1;const n=e.value.status;return"initial"!==n&&"empty"!==n||I(),A.subscribe(()=>{if(t){if(o.activeSession.value||"addressReplaced"===w.value||"resetting"===e.value.status)return;I()}t=!0})},[o,I,e,w,p,A]),vh(e,({previousState:r,action:a,nextState:i})=>{if(n.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:r.status,action:a,nextState:i.status}),"initial"===i.status&&I(),"loading"===i.status&&0===d.peek()&&(d.value=Date.now()),"reset"===a){const e=p.peek();for(const t of Object.keys(e))"phone"===t&&Ht(e.phone)||_(t,void 0);P()}const o=gs(e);if("addressComplete"===a||"reset"===a||"addressReplaced"===a||"addressInvalid"===a&&("negotiated"===r.status||h)){if(h){const e=p.peek(),n=f(e);if(n.size>0){for(const[e,t]of n)void 0===u[e].peek()&&_(e,{message:t,origin:"client",type:"inline-validation"});return t("addressInvalid"),void t("negotiationResolved")}for(const[t,r]of Object.entries(u)){const e=r.peek();e&&"object"==typeof e&&"client"===e.origin&&"inline-validation"===e.type&&_(t,void 0)}}n.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),v({silenceViolations:["all"],fieldsToResolve:["deliveryNext"],onComplete(r){const i=o!==gs(e);if(n.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:r.status,stale:i}),!i)if("stale"!==r.status&&"invalid"!==r.status){if("reset"!==a&&r&&("success"===r.status||"error"===r.status)&&"violations"in r){const e="filled"===r.negotiated.deliveryNext?.status;if("addressReplaced"!==a){const n=Hz(u);if(jz(E.peek(),n,p.peek()).size>0)return t(e?"negotiationResolved":"addressInvalid")}const n=S("shipping_address",r.violations),i="addressReplaced"===a?n:jz(E.peek(),n,p.peek());for(const[t,r]of i)void 0===u[t].peek()&&_(t,r);e||0===i.size?t("negotiationResolved"):t("addressInvalid")}}else t("negotiationResolved")}}).catch(()=>t("negotiationResolved"))}})}(v,_);const w=Ih(),C=t(()=>{const e=v.value.status;if("resetting"===e)return{status:"empty"};if("loading"===e)return{status:e};const t=p.fields.deliveryNext.value,n=Vz(t),r="filled"===t?.status&&!n,a=h.shippingAddress.fields.countryCode.value,i=h.shippingAddress.fields.zoneCode.value,o=w({countryCode:a,zoneCode:i}),s=VN(o),l=s?h.shippingAddress.peek():h.shippingAddress.value,c=n&&("initial"===e||"empty"===e&&!s&&0===Hz(g).size);return"negotiated"===e||r||c?t?n?{status:Fz({deliveryNext:t,proposedAddress:l,negotiatedAddress:p.fields.shippingAddress.peek(),reloadStrategy:o})?"error":"empty"}:"filled"===t.status&&r?{status:"filled",deliveryLines:t.lines}:{status:"error"}:{status:"empty"}:{status:e}}),E=m(C.peek());!function(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=ie(),r=i(!1);P(()=>{const a=e.value;if("undefined"==typeof PerformanceMeasure||"undefined"==typeof PerformanceMark)return;let i;r.current&&("loading"===a.status?i=function(){const e=performance.now();return()=>{const r=performance.now()-e;n.histogram({name:"shipping_methods_loading_duration",value:r,attributes:{async_shop_promise:t}})}}():i&&(i(),i=void 0)),r.current=!0})}(C);const x=i();a(()=>()=>{x.current&&clearTimeout(x.current)},[]),P(()=>{const e=C.value;if(x.current&&(clearTimeout(x.current),x.current=void 0),"loading"===e.status&&(x.current=setTimeout(()=>{const e=p.fields.deliveryNext.peek(),t="filled"===e?.status&&!Vz(e);s.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:e?.status??"unknown",hasShippingMethods:t}})},3e4)),"filled"===e.status){const t=e.deliveryLines,n=t.flatMap(e=>"available"===e.status?e.methods:[]).find(e=>"SHIPPING"===e.methodType&&e.deliveryPromiseProviderApiClientId)?.deliveryPromiseProviderApiClientId,r=f.peek();if(n&&r>0){const e=le(n),t=Date.now()-r;o(t,Number(e)),0===y.peek()&&(y.value=t)}}const t="empty"===e.status&&"negotiated"===v.peek().status&&Vz(p.fields.deliveryNext.peek());("error"===e.status||"filled"===e.status||t)&&(f.value=0)});const I=r(()=>({uiStateSignal:C,initialUiStateSignal:E,dispatch:_}),[_,C,E]);return d(Ph.Provider,{value:I,children:e})}function Yz({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&"/thank-you"===n&&!yr(e)}var Wz=(e=>(e.Unavailable="unavailable",e.UnpurchasableB2B="unpurchasableB2B",e.Unpurchasable="unpurchasable",e.OutOfStock="stockProblem",e.QuantityChange="quantityChange",e.PriceChange="priceChange",e.Unshippable="unshippable",e.Unfulfillable="unfulfillable",e.Unknown="unknown",e))(Wz||{});const Gz={[Wz.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[Wz.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[Wz.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[Wz.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[Wz.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[Wz.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[Wz.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[Wz.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[Wz.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function Jz(e){return Gz[e].isAddressProblem}function Kz(e){return Gz[e].isUnpurchasable}function Xz(){const{negotiate:e}=ic(),{observability:t,checkout:{negotiator:r}}=ie(),a=r.parts.merchandiseLines,i=r.current.fields.merchandiseLines,o=n(e=>{const t=a.value;a.value=t.filter(({stableId:t})=>!e.includes(t))},[a]);return n(async n=>{const r=new Map((i.value?.lines??[]).map(e=>[e.stableId,e])),a=n.reduce((e,{problem:t,line:n}
2)=>{if(Jz(t.type))return e;const a=r.get(n.stableId);return(!a||0===a.quantity||Kz(t.type))&&e.push(n.stableId),e},[]);try{a.length>0&&(o(a),await e({}))}catch(s){t.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:s,unavailableMerchandiseIds:a})}},[i,o,e,t])}function Qz(e){const t=function(e){return e.some(e=>on.has(e.code))}(e),n=function(e){return e.some(e=>sn.has(e.code))}(e),r=function(e){return e.some(e=>ln.has(e.code))}(e),a=Ky(e),i=Xy(e),o=Gy(e),s=function(e){return e.some(e=>en.has(e.code))}(e),l=[t,n,r,a].filter(Boolean).length>1;return o||l?s?Wz.QuantityChange:Wz.OutOfStock:t?Wz.Unavailable:n?Wz.UnpurchasableB2B:r?Wz.Unpurchasable:a?Wz.Unshippable:i?Wz.Unfulfillable:s?Wz.QuantityChange:Wz.Unknown}function Zz(e){return e.quantity>0}function eB(e){return Kz(e)?e:Wz.OutOfStock}function tB(){const{checkout:e}=ie(),{value:t=[]}=e.negotiator.current.fields.allViolations,{value:n}=e.negotiator.current.fields.merchandiseLines,a=vn("merchandiseLines").value,i=e.negotiator.parts.merchandiseLines.value,o=r(()=>n?.lines??[],[n]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=s(()=>Qz(t)),[u]=s(i),d=r(()=>yL(u,t),[u,t]),p=r(()=>_L(u,o,t).map(e=>function(e,t,n){const{proposed:r,negotiated:a}=e,i=function(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:Wz.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}(r,a),o=function(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:Wz.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}(r,a),s=function(e,t,n){if(!n&&t)return{type:eB(e)}}(t,r,a),l=r??a;return n.has(l.stableId)?{line:l,problem:{type:t===Wz.Unfulfillable?Wz.Unfulfillable:Wz.Unshippable}}:0===a?.quantity?{line:l,problem:{type:eB(t)}}:o?{line:l,problem:o}:i?{line:l,problem:i}:s?{line:l,problem:s}:{line:l,problem:{type:Wz.OutOfStock}}}(e,c,d)),[u,o,t,c,d]),m=o.filter(({stableId:e})=>!d.has(e)).some(Zz)&&l,h=!m,g=u.some(e=>{const t=o.find(({stableId:t})=>t===e.stableId);return!t||0===t.quantity||d.has(e.stableId)});return{type:c,lineItems:p,loading:a,cartEmpty:h,hasLineItemsLeftInCart:m,hasUnavailableMerchandise:g,unshippableMerchandiseIds:d}}function nB({width:e}){const{header:{logo:t}}=kv(),{embed:n,i18n:r,shop:a,shopPay:i,source:o,url:s,router:l}=ie(),c=vf(),u=cC(),{isAppLayout:p}=$D(),m=sS(),{brandSettings:h}=a,{lineItems:g}=tB(),f=Xz();if(i.visibility.showShopPayBrandedLogo||fr(l.currentUrl.value.search))return d("img",{src:"/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",height:30,width:72,alt:""});let y=d("span",{className:"pJt3c",children:d(_u,{level:1,children:d(TS,{level:1,accessibilityRole:"presentation",display:"inline",children:a.name})})});n?.isFlagshipPartner?y=d(Qf,{direction:"inline",gap:"small-200",alignItems:"center",children:[h?.squareLogo?.url&&d(iN,{alt:h.squareLogo.altText||a.name,src:h.squareLogo.url,className:"yfbTW",borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=d(Bw,{width:e}));const v="simulated"!==o.type&&!Hn(o)&&!p&&!n;if(!a.hasStorefront||!v&&!c)return y;const _=a.previewReturnUrl?a.previewReturnUrl:void 0,b=a.partnerStorefrontUrl&&!c?a.partnerStorefrontUrl:void 0,k=_??t?.link??b??o.headerLogoUrl??s.storefront(),P=r.translate("editor.navigation.store_logo_accessibility_label"),S=d("span",{ref:u("logo"),children:d(Kf,{href:k,tone:"monochrome",textDecoration:"none",onClick:async()=>{c?m.includes(k)&&l.navigate(e=>{const t=new URL(e);return t.searchParams.set("ce_redirect",k),t}):g.length>0&&await f(g)},display:"block",children:[y,d(qf,{accessibilityVisibility:"exclusive",children:P})]})});return t?.image&&t?.maxWidth?d(Df,{maxInlineSize:`${t.maxWidth}px`,children:S}):S}const rB=w({displayName:"AccountAvatar",suspense:!1,load:()=>C(()=>dl(()=>import("./7b11cac4.CDdE7eq7.js"),__vite__mapDeps([247,2,248,3,4,1,5,249,7,8,9,10,11,250]))),useError:WE("AccountAvatar")}),aB={borderRadius:{small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},color:bs,transitionDuration:{base:fs(0,200,1.5,"ms")},transitionTimingFunction:{easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},fontFamily:vs,fontSize:ys,letterSpacing:_s,lineHeight:ks};function iB(){const e=Wm(),{router:t,userEvents:n,shop:r,source:a,checkout:i,i18n:o}=ie(),s=Vg(),l="simulated"===a.type,c=cC(),{header:{cartLink:{contentType:u="icon",image:p}={}}}=kv(),m=cS(),h="/shoppay_login"===t.currentUrl.value.normalizedPath,g=o.translate("general.cart");let f;if("text"===u)f=g;else if("image"===u&&p?.src){const t=1.7142857142857142*Ps(e.customProperties.value.fontSize?.base??aB.fontSize.base);f=d("img",{src:p.src,alt:g,height:t,className:v(Se({display:"block"}))})}else f=d(oh,{type:"bag",size:"large"});return d("span",{ref:c("cart"),children:d(Kf,{href:m.value?.toString(),id:"cart-link",onClick:()=>
2{if("shopPay"!==i.identity.current.value)s("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0});else{if(l||h)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ra(a,i,r),action:"return_to_cart"}})}},accessibilityLabel:"icon"===u?g:void 0,display:"block",children:f})})}function oB({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const a=n&&!r?d(Df,{blockSize:"0px",children:d(Df,{transform:"translate(0px, -50%)",children:n})}):n,i={start:{columns:a?"minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:d(y,{children:[t,a]})},center:{columns:a?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:d(y,{children:[a&&d("div",{style:{visibility:"hidden"},children:a}),d(Df,{inlineAlignment:"center",children:t}),a]})},end:{columns:a?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:d(y,{children:[a,d(Df,{inlineAlignment:"end",children:t})]})}};return d(eh,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function sB(){const{checkout:e,router:t}=ie(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:a,maxWidth:i}={}}}=kv(),o=lS(),s=uk(),{currentDetour:l}=ac().value,c=e.configuration.visibility.showHeader&&!(e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===l?.type);let u="purchase.checkout.header.render-after";"thankYou"===l?.type&&(u="purchase.thank-you.header.render-after");const p=Kw(u),m="hidden"!==a||fr(n.search),h=m?d(nB,{width:i}):d("div",{});let g;return o.value?g=d(iB,{}):s.value&&(g=d(rB,{})),d(Qf,{gap:"large-100",children:[(null!=g||m)&&c&&d(oB,{alignment:r,logo:h,endAccessory:g,endAccessoryAffectsBlockSize:o.value||!m}),d(yT,{customizations:p,gap:"base"})]})}const lB=w({displayName:"ShopPayCheckout",load:()=>C(()=>dl(()=>import("./461aedcc.Oy7jhdu2.js"),__vite__mapDeps([251,2,1,3,4,5,150,166,167,190,8,108,109,74,147,10,148,149,218,160,151,146,64,7,9,11,252])).then(e=>e.ShopPayCheckout))});function cB({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:a}}=ie();return Ss({isShopPay:"shopPay"===n.current.value,isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?d(lB,{simulated:a,children:e}):d(y,{children:e})}function uB({children:e}){const{checkout:t}=ie(),n=Mz(),r=Oz(),a=t.checkoutExit.isExiting.value,i=GI(),o=d(cB,{children:[d(jT,{}),d(BT,{}),d(XT,{active:n.value,announceProcessing:!a,showLoadingIndicator:!a&&r.value,loadingIndicatorVariant:"progressbar",children:d(dB,{routeContentInert:!!i.value||void 0,children:e})}),d(JI,{})]});return d(kC,{children:d(QT,{children:d($z,{children:d(CI,{children:o})})})})}function dB({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:a}={}},cartLink:{visibility:i}}=kv(),{checkout:o,mobileCheckoutSdk:s,shopPay:l,source:c,embed:u,router:p}=ie(),m=p.currentUrl.value,h=fr(m.search),g=Rz(),f=o.configuration.showFooter,{rollup:{inlinePadding:v}}=Gm(),{currentDetour:_}=ac().value,b=Nz().value,k=Wh()&&b&&Yz({embedder:u?.embedder,isThankYouDetour:"thankYou"===_?.type,normalizedPath:m.normalizedPath});let P="purchase.checkout.header.render-after",S="purchase.checkout.footer.render-after",w="purchase.checkout.chat.render";"thankYou"===_?.type&&(P="purchase.thank-you.header.render-after",S="purchase.thank-you.footer.render-after",w="purchase.thank-you.chat.render");const C=Kw(P),E=Kw(S),x=Kw(w),I=_x(),A=hx(),T=gx(),{isAppLayout:L}=$D(),N=L&&"google"===u?.embedder&&da({embedder:u.embedder})&&T.value&&null==_,R=Tt(),M="shopPayExternal"===c.type,D=!o.configuration.visibility.showHeader,O=o.configuration.isUniversalCheckoutFinalizer&&"thankYou"===_?.type,z=(()=>{if(M)return l.visibility.showOnePageShellHeader;if(O)return C.length>0&&R.value;if(u?.isFlagshipPartner&&!yr(u.embedder)&&"shopApp"!==u.embedder)return!1;if((D||"hidden"===n&&!h&&"hidden"===i)&&!s.enabled&&!u?.isCheckoutKit()&&(0===C.length||!R.value))return!1;if(L){if(!s.enabled||s.variant.isStandard())return!1;if(u?.isCheckoutKit())return!1}return!0})(),B=sB,V=o.negotiator.current.fields.buyerIdentity.value?.customerProfile,F=null==V||"CustomerProfile"!==V.__typename,U="thankYou"===_?.type||F&&!A.value.payment&&!A.value.delivery,q=r(()=>s.enabled?s.variant.isStandard():u?!!u.isCheckoutKit()||!g&&(f||E.length>0):("hidden"!==a||E.length>0&&R.value)&&!L&&!h,[u,g,f,s,a,E.length,L,h,R.value]),j="shopPayLogin"!==_?.type&&U&&b&&!u?.isFlagshipPartner,H=l.visibility.shouldForceOnePageShellContentAsAppLayout,$=d(y,{children:[d(ET,{}),d(Df,{className:N?"ghhXm":void 0,inert:t,children:e})]}),Y=(()=>
2{if(q)return d(wT,{});if(!_&&u?.isFlagshipPartner&&g)return;const e=o.proposal.negotiated.fields.taxes.value;return $A(e)?yr(u?.embedder)?d(Df,{paddingInline:ms(v)??"base",paddingBlockEnd:"large",children:d(YA,{liability:e.liability})}):d(YA,{liability:e.liability}):void 0})();return d(y,{children:[d(YT,{}),d(RC,{banner:d(yx,{}),announcement:"thankYou"===_?.type&&I.length>0?d(vx,{}):void 0,header:z?d(B,{}):void 0,disclosure:j&&!k?d(WI,{}):void 0,disclosureOrderSummary:k?void 0:d(Iz,{slot:"disclosure"}),main:$,orderSummary:d(Iz,{slot:"aside"}),footer:Y,blockSize:(()=>{if(L||H)return"appLayout"})(),minMobileViewportSize:N}),d(xT,{}),d(WT,{}),d(GT,{}),d(yT,{customizations:x,transformComponents:pB,render:e=>d(Df,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}const pB=HT(sx);function mB(){const{router:e}=ie(),t=gn().inMemoryAmazonPayParts.serializedAmazonParams;return n(n=>{const{keep:r,only:a}=n??{},i=e.currentUrl.value.href,o=new URL(i);Go.filter(e=>r?!r.includes(e):!a||a.includes(e)).forEach(e=>{o.searchParams.delete(e)}),Cs(t,e=>o.searchParams.get(e)),i!==o.href&&e.navigate(o.href,{replace:!0})},[e,t])}function hB(){return"true"===mO()[Es]}const gB=w({load:()=>dl(()=>import("./56bd1136.GDoWqLz1.js"),__vite__mapDeps([253,2,1,3,4,5,243,228,46,254,255,108,109,256,160,233,74,146,257,7,8,9,10,11,258])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>d(fB,{}),useError:function(e){const{checkout:{wallets:t,negotiator:n}}=ie(),{buyerDetails:r,buttonStatus:i,sdkStatus:o}=gn().inMemoryAmazonPayParts,{paymentLines:s}=n.parts,l=mB(),c=AP();a(()=>{if(!e)return;i.value={status:"error"},o.value={status:Yv.Error},r.value={loading:!1,error:!0,details:void 0},l();const n=t.escalatedWallet.value,a=n===wn.AmazonPay||n===wn.BuyWithPrime,u=s.value.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&(e.method.name===wn.AmazonPay||e.method.name===wn.BuyWithPrime));a?(c({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):u&&(s.value=s.value.filter(e=>"walletsPlatformPaymentMethod"!==e.method.type||e.method.name!==wn.AmazonPay&&e.method.name!==wn.BuyWithPrime))},[e,r,i,l,s,c,o,t])}});function fB(){const{buyerDetailsContentLoaded:e}=gn().inMemoryAmazonPayParts;return a(()=>{e.value=!1},[e]),null}function yB(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.paymentMethods,{attributes:n,externalDeliveryIds:r,paymentLines:a}=e.parts,i=hB(),o=Tt();return d(x,{when:()=>o.value&&function(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:a}){const i=[wn.AmazonPay,wn.BuyWithPrime].some(t=>Boolean(ws(e,t))),o=t.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===wn.BuyWithPrime),s=n?.some(({key:e,value:t})=>e===jr&&t===wn.BuyWithPrime);return Boolean(i||o||r||s||a)}(t.value,a.value,{attributes:n.value,externalDeliveryIds:r.value,hasAmazonCancelledParam:i}),children:d(gB,{})})}function vB(){const{i18n:e}=ie(),n=ac(),r=t(()=>n.value.currentDetour?.label??n.value.currentPage?.label??e.translate("general.page_title"));return d("h1",{className:Se({screenReaders:"only"}),children:r})}function _B({title:e,cost:t}){return d(y,{children:[e,"·",t]})}function bB({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=ie();return d(qL,{blockPadding:"base",children:[d(UL,{primary:!0,children:[d(qf,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map(({title:e,lineAmount:t})=>d(Qf,{direction:"inline",gap:"small-400",alignItems:"center",children:d(_B,{title:d(qf,{size:"small",children:e}),cost:d(qf,{size:"small",type:"strong",children:n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})},e))]}),d(UL,{inlineAlignment:"center",children:d(cx,{type:"small",textAlign:"end",children:d(qf,{type:"strong",children:e})})})]})}const kB="TeeUi",PB=$c("TaxRecalculationLineTooltip");function SB({taxRecalculation:e}){const{i18n:t}=ie(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=Yc(void 0,PB),a=Yc(void 0,PB),i=e.beforeLines,o=e.afterLines;return 0===i.length&&0===o.length?null:d(qL,{blockPadding:"base",children:[d(UL,{primary:!0,children:[d(qf,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),d(cx,{type:"small",children:[d("span",{className:kB,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",d(wB,{lines:i,tooltipId:r,percentFormatter:n,i18n:t})," ",d("span",{"aria-hidden":"true",children:"→"})]})," ",d("span",{className:kB,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",d(wB,{lines:o,tooltipId:a,percentFormatter:n,i18n:t})]})]})]}),d(UL,{inlineAlignment:"center",children:d(cx,{type:"small",textAlign:"end",children:d(qf,{type:"strong",children:d("span",{className:"DQ7YO",children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function wB({lines:e,tooltipId:t,percentFormatter:n,i18n:r}){if(0===e.length)return d(y,{children:r.translate("payment.order_edit_banner_no_taxes_label")});const[a]=e;if(1===e.length&&a)return d(y,{children:CB(a,n)});const i=e.map(e=>CB(e,n)).join(" + "),o=e.filter(e=>null!=e.rate);if(0===o.length)return d(y,{children:i});const s=o.reduce((e,t)=>
2e+(t.rate??0),0);return d(y,{children:[d(Km,{interestFor:t,className:"_8A9rc",children:n.format(s)}),d(um,{id:t,children:i})]})}function CB(e,t){return null==e.rate?e.title:`${e.title} ${t.format(e.rate)}`}function EB(){const{i18n:e,checkout:n}=ie(),r=At(),a=n.proposal.facts.orderNumber,[i]=n.proposal.facts.delivery??[],o=t(()=>i?.lines.filter(e=>"ADDED"===e.deliveryChange)??[]),s=t(()=>i?.lines.filter(e=>"REMOVED"===e.deliveryChange)??[]),l=t(()=>(n.proposal.facts.merchandiseLines??[]).filter(e=>e.quantityChange&&e.quantityChange.delta)),c=t(()=>{const e=n.proposal.facts.taxRecalculation;return e&&(e.beforeLines.length>0||e.afterLines.length>0)?e:void 0}),u=t(()=>l.value.length>0||o.value.length>0||s.value.length>0||Boolean(c.value)),p=t(()=>{if(r.value&&u.value)return{formattedAmountOwed:e.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"})}}),m=t(()=>o.value.length>0?o.value:void 0),h=t(()=>s.value.length>0?s.value:void 0);return d(x,{when:p,children:({formattedAmountOwed:t})=>d(AD,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:t}),collapsible:!0,children:[d(qf,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:a?`#${a}`:""})}),d(CN,{blockSize:"base"}),d(yw,{}),d(RL,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[d(ML,{hidden:!0,children:[d(DL,{hidden:!0,children:e.translate("order_summary.product_image_label")}),d(DL,{hidden:!0,children:e.translate("order_summary.description_label")}),d(DL,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),d(zL,{children:[d($,{each:l,getKey:({title:e,variantTitle:t})=>`${e}${t?`-${t}`:""}`,children:({quantity:e,quantityChange:t,image:n,title:r,variantTitle:a})=>d(qL,{blockPadding:"base",children:[d(UL,{inlineAlignment:"start",children:d(ww,{alt:n?.altText??"",size:"base",src:n?.url})}),d(UL,{primary:!0,children:[d(qf,{size:"base",type:"strong",children:r}),a?d(qf,{color:"subdued",size:"small",children:a}):null]}),t&&t.delta&&t.type?d(UL,{inlineAlignment:"center",children:d(xB,{remainingQuantity:e,delta:t.delta,type:t.type})}):null]})}),d(x,{when:m,children:t=>d(bB,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),d(x,{when:h,children:t=>d(bB,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),d(x,{when:c,children:e=>d(SB,{taxRecalculation:e})})]})]})]})})}function xB({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=ie();if(0===t)return null;const a=0===e,i=e+t;let o;switch(n){case"INCREMENTED":o=r.translate("payment.order_edit_banner_items_added",{count:t});break;case"DECREMENTED":o=r.translate("payment.order_edit_banner_items_removed.with_quantities",{quantity:i,delta:t});break;case"REMOVED":o=r.translate("payment.order_edit_banner_items_removed.in_full");break;case"RETURNED":o=a?r.translate("payment.order_edit_banner_items_returned.in_full",{quantity:i}):r.translate("payment.order_edit_banner_items_returned.with_quantities",{quantity:i,delta:t});break;case"RETURN_LINE_ITEM_REMOVED":o=a?r.translate("payment.order_edit_banner_items_return_line_item_removed.in_full"):r.translate("payment.order_edit_banner_items_return_line_item_removed.with_quantities",{delta:t});break;default:return null}return d(cx,{type:"small",textAlign:"end",children:d(qf,{type:"strong",children:o.toUpperCase()})})}const IB={current:void 0};function AB({active:e,breadcrumbs:t}){const{i18n:n}=ie(),r=cC(),{buyerJourney:{alignment:a}={}}=kv();return d(mC,{section:"breadcrumbs",children:d(uC,{section:"breadcrumbs",children:d(Df,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:a,children:d(Qf,{direction:"inline",gap:"small-200",accessibilityRole:"ordered-list",children:t.map(({id:n,to:a,disabled:i,content:o},s)=>{const l=t.length!==s+1,c=e===n,u=d(qf,c||i?{color:c?void 0:"subdued",type:c?"strong":void 0,size:"small",children:o}:{size:"small",ref:r(n),children:d(Kf,{href:a,textDecoration:"none",children:o})});return d(Qf,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:c?"step":void 0,children:[u,l&&d(oh,{type:"chevron-right",size:"small-200"})]},n)})})})})})}function TB(){return ae(zP)}function LB(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Nt(n.value,"APPLE_PAY");return!!e&&Gi(e)})}function NB(){const{checkout:e,observability:t}=ie(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:s,inMemoryApplePayParts:{asPaymentMethod:l,paymentSheetError:c}}=gn(),u=_I(xs()),d=_I(IO()),p=LB(),{paymentLines:m}
2=e.negotiator.parts,h=Nt(m.value,"GOOGLE_PAY"),g=Boolean(h&&Is(h)),f=_I(MP({shouldResetCustomerInfo:!1})),y=i(new Set),v=XD("failed"===r?.status&&"payment"===r.failure.type&&n?r?.failure:void 0);a(()=>{if("processing"===r?.status||"polling_for_order"===r?.status)return;const e=o.value,n=p.value&&"APPLE_PAY"!==e,a=g&&"GOOGLE_PAY"!==e,i=!e&&!n&&!a;if(r){if(y.current.has(r.id))return;t.leaveErrorBreadcrumb("[useHandleReceiptErrorForWallets] Adding to handled receipt ids",{receiptId:r.id,isNonWalletSubmission:i}),y.current.add(r.id)}if(i)return;const m="APPLE_PAY"===e||n,h="GOOGLE_PAY"===e||a;m&&"payment_cancelled_while_processing"===c.value?.type&&(c.value=void 0),"failed"===r?.status?(m&&d.current(),a&&f.current(),"payment"===r.failure.type&&(e||n||a)&&!l.value&&(t.log("useHandleReceiptErrorForWallets_selecting_first_available_payment_method","selecting first available payment method",{walletUsedForSubmission:e,applePaySFRPaymentFailure:n,googlePaySFRPaymentFailure:a}),u.current()),(m&&!l.value||h)&&(s.value=v),"GOOGLE_PAY"===e&&(o.value=void 0)):s.value=void 0},[t,r,s,o,l,c,d,f,v,u,p.value,g]),a(()=>function(){s.value=void 0},[s])}function RB(){const{checkout:e,router:t}=ie(),n=t.currentUrl.value,{header:{alignment:r="start",logo:a}}=kv(),i=uk(),{currentDetour:o}=ac().value;let s="purchase.checkout.header.render-after";"thankYou"===o?.type&&(s="purchase.thank-you.header.render-after");const l=Kw(s),c=e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===o?.type,u=!c&&("hidden"!==a?.visibility||fr(n.search)),p=!c&&i.value,m=u||p;let h;return p?h=d(oB,{alignment:r,logo:u?d(nB,{width:a?.maxWidth}):d("div",{}),endAccessory:d(rB,{}),endAccessoryAffectsBlockSize:!u}):u&&(h=d(Df,{inlineAlignment:r,children:d(nB,{width:a?.maxWidth})})),d(y,{children:[h,l.length>0&&d(y,{children:[m&&d(CN,{blockSize:"@media (inline-size >= medium) base, large-400"}),d(yT,{customizations:l,gap:"base"})]})]})}function MB({children:e}){return d(kC,{children:d(QT,{children:[d(DB,{}),d(BT,{}),d(jT,{}),d(OB,{children:d(zB,{children:e})})]})})}function DB(){return function(){const{router:e}=ie(),{plan:t}=ac().value;a(()=>e.beforeNavigate((e,n)=>{const r=t.greenPath.find(t=>t.route===e.normalizedPath),a=t.greenPath.find(e=>n.pathname.endsWith(e.route));if(!r||!a)return{};if(!cc.includes(r.id)||!cc.includes(a.id))return{};const i=t.greenPath.indexOf(r),o=t.greenPath.indexOf(a);return cl(()=>{},o>i?["page-slide-end"]:["page-slide-start"]),{}}),[e,t.greenPath])}(),NB(),null}function OB({children:e}){const{checkout:t}=ie(),n=Mz(),r=Oz(),a=t.checkoutExit.isExiting.value;return d(XT,{active:n.value,announceProcessing:!a,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!a&&r.value,children:e})}function zB({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=kv(),{checkout:a,embed:i,router:o}=ie(),{currentDetour:s}=ac().value,l=Wh()&&Yz({embedder:i?.embedder,isThankYouDetour:"thankYou"===s?.type,normalizedPath:o.currentUrl.value.normalizedPath});let c="purchase.checkout.header.render-after",u="purchase.checkout.footer.render-after",p="purchase.checkout.chat.render";"thankYou"===s?.type&&(c="purchase.thank-you.header.render-after",u="purchase.thank-you.footer.render-after",p="purchase.thank-you.chat.render");const m=Kw(c),h=Kw(u),g=Kw(p),f=_x(),v=a.configuration.isUniversalCheckoutFinalizer&&"thankYou"===s?.type,_=m.length>0||!v&&"hidden"!==t,b=RB,k="hidden"!==n||h.length>0,P=function(e){return e.currentUrlMatches("/stock-problems")}(o),S=o.currentUrlMatches("/no-address-location"),w=uS(o),C=o.currentUrlMatches("/shoppay"),E=gO(),{activeBreadcrumb:x,breadcrumbs:I}=function(){const{i18n:e,router:t,checkout:{negotiator:n}}=ie(),{currentPage:a,plan:{greenPath:i}}=ac().value,o=cS(),s=lS(),l=n.current.value,c=t.currentUrl.value.normalizedPath,u=r(()=>i.filter(e=>!e.skipOverPage||!e.skipOverPage(l)),[i,l]),d=u.find(e=>e.route===c)??a,p=r(()=>{const t=u.findIndex(e=>e.id===d?.id);return[...o.value&&s.value?[{id:"cart",to:o.value.toString(),content:e.translate("general.cart"),disabled:!1}]:[],...u.map((e,n)=>({id:e.id,to:e.route,content:e.label,disabled:!!d&&n>t}))]},[o.value,s.value,e,u,d]),m=d?.id;return IB.current={ids:p.map(({id:e})=>e).join(","),activeId:m,showCartLink:s.value,hasCartUrl:Boolean(o.value)},{breadcrumbs:p,activeBreadcrumb:m}}(),A=P||S||w||C||I.length<2||E.value,T=d(BB,{children:e}),L=(()=>
2{if(k)return d(wT,{});const e=a.proposal.negotiated.fields.taxes.value;return $A(e)?d(YA,{liability:e.liability}):void 0})();return d(y,{children:[d(YT,{}),d(RC,{banner:d(yx,{}),announcement:"thankYou"===s?.type&&f.length>0?d(vx,{}):void 0,header:_?d(b,{}):void 0,disclosure:l?void 0:d(WI,{}),disclosureOrderSummary:l?void 0:d(Sz,{monorailSection:"top_order_summary"}),main:T,orderSummary:d(Sz,{}),footer:L,buyerJourney:A?void 0:d(AB,{active:x,breadcrumbs:I})}),d(xT,{}),d(WT,{}),d(GT,{}),d(yT,{customizations:g,transformComponents:UB,render:e=>d(Df,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}function BB({children:e}){const{checkout:t}=ie(),{blocking:n}=TB(),r=Mz();return d(y,{children:[d(vB,{}),d(XT,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[d(yB,{}),d(Qf,{gap:"base",children:[d(XO,{section:"toast"}),d(XO,{section:"top"}),d(EB,{}),d(FB,{children:e})]})]})]})}function VB({condition:e,children:t}){return e?d(nL,{accessibilityRole:"presentation",children:t}):d(y,{children:t})}function FB({children:e}){const{checkout:t,router:n,shop:a}=ie(),{pending:i}=qw(),o=n.currentUrlMatches("/shipping"),s=n.currentUrlMatches("/payment"),l=n.currentUrlMatches("/review"),c="/review"===n.currentUrl.value.normalizedPath,u=o||s||l,p=c&&a.hasFlagEnabled(As),{value:m}=t.negotiator.current.fields.deliveryNext,h=t.proposal.facts.delivery??[],g=pn(m)||h.length>0&&h.every(e=>null!==e.pickupAddress),{value:f}=At(),v=vn("total").value,{value:_}=t.negotiator.current.fields.paymentLines,b=vn("paymentLines").value,k=r(()=>!!l&&(v||b||(f?.amount?f.amount>0:_?.lines&&_.lines.some(e=>e.cost?.amount))),[l,f,_,v,b]);return d(Fw,{style:p?void 0:i,children:d(VB,{condition:u,children:d(y,{children:[u&&d(y,{children:[d(hE,{showAddress:!g,showPayment:k}),d(CN,{blockSize:"large-400"})]}),d(Df,{children:e})]})})})}const UB=HT(sx);function qB(){const{checkout:e}=ie(),{billingAddressOption:t,shippingAddress:n}=e.negotiator.parts;P(()=>{e.isShippingRequired.value&&!n.value.oneTimeUse||(t.value="custom")})}function jB(){const{shop:e,source:t,checkout:n}=ie(),{billingAddressOption:r,paymentLines:i}=n.negotiator.parts,o=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:s}=n.negotiator.current.fields.deliveryNext,l=vn("deliveryNext").value;a(()=>{const a=i.value[0],c=s;if(l||!c||"filled"!==c.status||!a)return;const u=pn(c),d=Mr(c);if(u||d)return;const p=!u&&n.isShippingRequired.value;Ts({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:a?.method.type,isShippingRequired:p,isOrderSession:Hn(t),isB2B:Boolean(o),isPickupPointDeliveryMethod:d})&&"shipping"!==r.value&&(r.value="shipping")},[i.value,s,l,n.isShippingRequired,e.requireMatchingShippingAndBilling,t,o,r])}function HB(){const{source:e,checkout:n}=ie(),{buyerIdentity:r,deliveryNext:a}=n.negotiator.current.fields,i=ab(),o=Iv(),s=function(){const{checkout:e}=ie();return t(()=>po(e.proposal))}(),{deliveryLines:l,shippingAddress:c}=n.negotiator.parts;return t(()=>{const t=r.value?.purchasingCompany;return(o.value||ib({checkout:n,source:e})?.pickupAddress)&&!i.value||Mr(a.value)||l.value.flatMap(e=>e.value.deliveryMethodTypes).includes("PICKUP_POINT")||!Hn(e)&&!n.isShippingRequired.value&&!t||Hn(e)&&!s.value||t&&!n.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function $B(){const{checkout:e,source:n}=ie(),{billingAddressOption:r,billingAddress:a}=e.negotiator.parts;return t(()=>{const t=e.negotiator.current.fields.paymentLines.value,i=e.negotiator.current.fields.shippingAddress.value,[o]=e.proposal.facts.delivery??[],s=o?.deliveryAddress??void 0,l=e.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,c=t?.lines?.find(e=>e.method.type===pe.CreditCard);return c?c.method.billingAddress:"billing"===r.value&&l?.location.billingAddress?l.location.billingAddress:"shipping"===r.value&&l?.location.shippingAddress?l.location.shippingAddress:"shipping"===r.value?Hn(n)?s:i:a.value})}function YB(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.paymentLines?.value?.lines,{hasViolations:n,violations:r}=Qy(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),a=Boolean(Nt(t,"APPLE_PAY"));if(n&&!a)return r.values().next().value.localizedMessage}function WB(){const{shop:e,source:n,checkout:r}=ie(),a=Iv(),{paymentLines:i}=r.negotiator.parts,{buyerIdentity:o}=r.negotiator.current.fields,s=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext;return t(()=>Mr(n.value))}();return t(()=>{const t=!a.value&&r.isShippingRequired.value,l=i.value[0];return Ts({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:l?.method.type,isShippingRequired:t,isOrderSession:Hn(n),isB2B:Boolean(o.value?.purchasingCompany),isPickupPointDeliveryMethod:s.value})})}function GB(e){const n=e,r=function(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,a=e?.countryCode&&fy.includes(e.countryCode),i=T(yy(e,a?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"}));return t(()=>{if(r.value?.purchasingCompany)return i.value})}(n),a=yy(n,n?.countryCode&&fy.includes(n.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"});return r.value??a}function JB(){const{checkout:e}=ie(),{shippingAddress:n}=e.negotiator.parts;return t(()=>(e.proposal.facts.delivery??[])[0]?.deliveryAddress??n.value)}function KB(){const{negotiate:e}=ic(),{checkout:{wallets:t,negotiator:r}}=ie(),{billingAddress:o,billingAddressOption:s}=r.parts,l=i(void 0),c=n(()=>{e({silenceViolations:Fe(["billingAddress"])})},[e]),u="custom"===s.value?o.fields.countryCode.value:void 0;return a(()=>{!t.activeSession.value&&"custom"===s.value&&u&&u!==l.current&&(l.current=u,c())},[s.value,u,c,t.activeSession.value]),c}const XB="b2b",QB="not_b2b";function ZB(){const{checkout:{negotiator:e}}=ie(),{paymentMethods:t}=e.current.fields;return tV(t)}function eV(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return tV(t(()=>n.value.map(e=>e.method)))}function tV(e){const{client:n,checkout:{identity:r,negotiator:a},shop:i,shopPay:o,source:s}
2=ie(),l=Xv(),c=DT(),u=i.hasFlagEnabled(Ls),d=ji(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:p,paymentMethods:m}=a.current.fields;return t(()=>{if(!c.value)return!1;if("shopPay"===r.current.value)return!1;if(d.value)return!1;const t=e.value??[];if(p.value?.purchasingCompany){const e=m.value?.some(e=>"direct"===e.type&&"shopify_payments"===e.name),r=t.some(t=>"direct"===t.type&&(e||i.storeVaultEnabled)),a=t.some(e=>function(e,t){if("bank"!==e.type)return!1;if("supportsVaulting"in e)return e.supportsVaulting;const n=nV(e,t);return!!n?.supportsVaulting&&(!(!("selectedToken"in e)||!e.selectedToken)&&"SHOPIFY_PUBLIC_TOKEN"!==e.selectedType)}(e,m.value??[]));return function(e,t){return"cartNext"===e.type||"simulated"===e.type||"b2b"===t.unstable_getSerialization("invoiceLoginType")&&gb(e)}(s,n)&&(r||a)}return i.storeVaultEnabled&&function({paymentMethods:e,paypalVaultingEnabled:t,negotiatedPaymentMethods:n,isShopPayAvailableForSellerOfRecord:r,shopPayDismissed:a,buyerIdentity:i}){const o=!a&&!i.value?.customerProfile&&r.value;if(!t&&o)return!1;const s=n.value??[],l=e.map(e=>nV(e,s)).filter(e=>void 0!==e);return!(!t||!l.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name&&e.supportsVaulting))||!o&&l.some(e=>"direct"===e.type&&e.supportsVaulting)}({paymentMethods:t,paypalVaultingEnabled:u,negotiatedPaymentMethods:m,buyerIdentity:p,isShopPayAvailableForSellerOfRecord:l,shopPayDismissed:o.userIdentified.value})})}function nV(e,t){return"direct"===e.type?t.find(t=>"direct"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier):"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name?t.find(t=>"wallet"===t.type&&"PAYPAL_EXPRESS"===t.name&&(!e.walletContent||t.paymentMethodIdentifier===e.walletContent.paymentMethodIdentifier)):"bank"===e.type?t.find(t=>"bank"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier):void 0}function rV({fullyCoveredByGiftCard:e,fullyCoveredByRedeemablesAndGiftCards:t,paymentRequired:n,identity:r,isOrderSession:a,isPickupSelected:i,isShippingRequired:o,vaultedDelivery:s,isPointOfSaleLayout:l,purchasingCompany:c,paymentLines:u,billingAddressOption:d,paymentMethods:p,orderEditHasPickupAddress:m,isForceBillingAddressFormEnabled:h}){const g=!i&&o,f=u[0],y="direct"===f?.method.type,v="wallet"===f?.method.type&&"APPLE_PAY"===f?.method.name&&!c,_="wallet"===f?.method.type&&"PAYPAL_EXPRESS"===f?.method.name&&Rs(p)&&!h,b=Ms({lines:u,paymentMethods:p,purchasingCompany:c,isBillingAddressForced:h})||!g,k="CREDIT_CARD_ON_FILE"===f?.method.type,P=Ds(p).length>0&&k;if(n&&(!b||v||_||P))return"hidden";if(c&&n&&!t)return function(e){if(!e)return!1;const t=Boolean(Nt([e],"PAYPAL_EXPRESS")),n=Boolean(Nt([e],"APPLE_PAY")),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(pe)];return t||n||!r.includes(e.method.type)}(f)?"afterPayment":"inContext";if(l)return"afterPayment";if("shopPay"===r&&s)return"inContext";const S="wallet"===f?.method.type||"walletsPlatformPaymentMethod"===f?.method.type;return!n||e||t?g&&!S&&"shipping"===d?"hidden":"afterPayment":a?m?"afterPayment":o&&y?"inContext":"afterPayment":g&&y?"inContext":"afterPayment"}function aV(){const e=Ns(),n=ji(),r=DT(),{source:a,checkout:i,shop:o}=ie(),s=Iv(),l=hx(),c=Jg(),{buyerIdentity:u,paymentMethods:d}=i.negotiator.current.fields,{paymentLines:p,billingAddressOption:m}=i.negotiator.parts;return t(()=>rV({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:n.value,paymentRequired:r.value,identity:i.identity.current.value,isOrderSession:Hn(a),isPickupSelected:s.value,isShippingRequired:i.isShippingRequired.value,vaultedDelivery:l.value.delivery,isPointOfSaleLayout:c.value,purchasingCompany:Boolean(u.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:m.value,paymentMethods:d.value,orderEditHasPickupAddress:Boolean(ib({checkout:i,source:a})?.pickupAddress),isForceBillingAddressFormEnabled:!Gl({shop:o,checkout:i,paymentMethods:d.value})}))}function iV({children:e}){const{checkout:n,embed:r,shop:a,shopPay:o,source:s}=ie(),{billingAddress:l,billingAddressOption:c,email:u,paymentLines:p,phone:m,shippingAddress:h}=n.negotiator.parts,{buyerIdentity:g,shippingAddress:f}=n.negotiator.current.fields,y=r?.isFlagshipPartner,v=Os(),_=rb(),b=jc(),k=i(!1),P=i(!1),S=Zy(Ca),w=ev(Ca),C=tv(Ca),E=ZB(),x=DT(),I=Ns(),A=ji(),L=Iv(),N=Jg(),R=WB(),{shippingCountries:M}=a,D=ct(),O=f.value,z=wy(O?.countryCode,M),B=T(z),V=i(),F=zs(),U=t(()=>Gl({shop:a,checkout:n,paymentMethods:n.negotiator.current.fields.paymentMethods.value})),q=t(()=>{const e=n.identity.current.value,t=B.value,r=_.value;if(!k.current){const e=S.violations.value;k.current=e.size>0&&!Bs(e)}if(P.current||(P.current=w.violations.value.size>0||null!==n.wallets.escalatedWallet.value&&C.violations.value.size>0),"sdkCartHints"===e&&"sdkCartHints"===V.current?.identitySource)return V.current.sections;function i(e){return"CustomerProfile"===e?.__typename}const d=e=>!n.isShippingRequired.value&&Boolean(l.value)&&!l.value?.[e]?.trim();function T(){switch(e){case Vs:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return o.user.isAuthenticatedUser.value;case"sdkCartHints":return!!y||u.value.length>0||m.value.length>0;case"customerAccount":return!(i(g.value?.customerProfile)&&!g.value.customerProfile.email)&&u.value.length>0;default:return u.value.length>0}}const M={contact:T(),delivery:function(){const a=f.value,s=h.value,l=n.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(e){case Vs:return l.length>0;case"customerAccount":{const e=g.value;return l.length>0||!(null==e||!i(e?.customerProfile)||(u=e?.customerProfile,0===u.shippingAddresses.length)||function(e){const[n]=e.shippingAddresses;return 1===e.shippingAddresses.length&&null!=n&&t(n.address,"shipping").size>0}(e?.customerProfile)||function(e,t,r){return!(function(e,t,n){return!e&&t&&n.shippingAddresses.length>0}(t,r,e)||!t&&!r||function(e){if(i(e)){const e=n.addressManager.shipping.value;return Boolean(e.selectedAddress.value)}return!1}(e))}(e.customerProfile,a,s))}case"shopPay":return o.user.addresses.value.length>0||l.length>0;case"sdkCartHints":return!!n.configuration.isAddressDelegationEnabled||T()&&null!=(c=a)&&0===t(c,"shipping").size;case"businessCustomer":return!(b.value&&!r);default:return!0}var c,u}(),payment:function(){const t=Boolean(n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate.value);switch(e){case Vs:return!1;case"shopPay":{const e=o.user.paymentMethods.value;return x.value||n.isShippingRequired.value?!o.enableCardVaulting||e.some(js):o.user.addresses.value.length>0}case"sdkCartHints":return n.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const r=g.value?.customerProfile;
2if(Hn(s)||!qs(r))return!1;const i=t||D.value;return!!Fs({identitySource:e,isOrderSession:Hn(s),storeVaultEnabled:a.storeVaultEnabled,customerProfile:r,hasCustomerStoredPaymentMethod:Us({availablePaymentMethods:n.negotiator.current.fields.paymentMethods.value??[],paymentMethodHistory:n.negotiator.current.fields.paymentMethodHistory?.value??[]})})||(Boolean(Ds(n.negotiator.current.fields.paymentMethods.value).length)||i&&!E.value)}case"customerAccount":{if(Fs({identitySource:e,isOrderSession:Hn(s),storeVaultEnabled:a.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:Us({availablePaymentMethods:n.negotiator.current.fields.paymentMethods.value??[],paymentMethodHistory:n.negotiator.current.fields.paymentMethodHistory?.value??[]})}))return!0;const[r]=F.value,i=1===F.value.length&&"deferred"===r?.type;return Boolean(t&&i)}default:return v.value.length>0||p.value.length>0}}(),billing:function(){switch(e){case"shopPay":{const e=o.session.selectedPaymentMethod.value,t=Fi({managedByMarketsPro:n.negotiator.current.fields.managedByMarketsPro.value})&&"IDEAL"===e?.paymentMethod,r="CUSTOM_ONSITE"===e?.paymentMethod,a=!o.user.hasCreditCards.value,i=p.value.some(e=>"direct"===e.method.type);if(a&&i)return!1;const s=d("phone"),l=d("firstName");return!x.value||l||s||t||r}case"amazonPay":case"buyWithPrime":return k.current;case"applePay":case"googlePay":return P.current;case"payPal":return!U.value||P.current;case"customerAccount":case"businessCustomer":return!Hn(s)&&function(e){const t=rV(e),n="beforePayment"===t||"afterPayment"===t,r=e.paymentLines[0]?.method.type,a=r===pe.CreditCard||r===pe.PayPal;return n&&!e.billingMustMatchShipping&&!a}({fullyCoveredByGiftCard:I.value,fullyCoveredByRedeemablesAndGiftCards:A.value,paymentRequired:x.value,identity:e,isOrderSession:Hn(s),isPickupSelected:L.value,isShippingRequired:n.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:N.value,purchasingCompany:Boolean(g.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:c.value,paymentMethods:n.negotiator.current.fields.paymentMethods.value,orderEditHasPickupAddress:Boolean(ib({checkout:n,source:s})?.pickupAddress),isForceBillingAddressFormEnabled:!U.value,billingMustMatchShipping:R.value});default:return!1}}()},O=V.current,z=O?.identitySource===e&&function(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}(O.sections,M);return z?O.sections:(V.current={identitySource:e,sections:M},V.current.sections)}),j=a.hasFlagEnabled(Hs)?n.vaultedSections.signal:q;return d(mx.Provider,{value:j,children:[d(yB,{}),e]})}const oV=E(function(){const{checkout:{configuration:{layout:e}},router:t}=ie();!function(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:i},url:o}=ie(),s="shopPay"===r.current.value,l=parseInt(le(e.id),10);a(()=>{i&&async function(){const e=new URL(o.privateAccessToken(s,l));e.searchParams.set("id",i),e.searchParams.set("checkout_type","c1");const r=ri({serializations:{get:e=>t.unstable_getSerialization(e)},isShopApp:n.isShopServerOrigin});r?.uniqueToken&&e.searchParams.set("_y",r.uniqueToken),r?.visitToken&&e.searchParams.set("_s",r.visitToken);try{await fetch(e)}catch{}}()},[i,l,s,o,t,n])}();const n=e.isOnePage.value,i=r(()=>[{match:"/processing",render:()=>d(y,{children:[d(UE,{}),d(JE.Preload,{})]})},{match:"/throttle",render:()=>n?d(KE,{}):d(y,{children:[d(KE,{}),d(gE.Preload,{})]})},{match:"/post-purchase",render:()=>d(FE,{}),renderPrefetch:()=>d(FE.Prefetch,{})},{render:({children:e})=>d(y,{children:[d(mE,{}),d(iV,{children:d(n?uB:MB,{children:e})})]}),children:[{match:"/thank-you",render:()=>d(JE,{}),renderPrefetch:()=>d(JE.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>d(_E,{}),renderPrefetch:()=>d(_E.Prefetch,{})},...n?[{match:"/shoppay_login",render:()=>d(HE,{})},{match:"/review",render:()=>d(kE,{}),renderPrefetch:()=>d(kE.Prefetch,{})},{match:"/no-address-location",render:()=>d(yE,{})},{render:({children:e})=>d(y,{children:[d(bE,{children:e}),d(JE.Preload,{})]}),children:[{match:"/stock-problems",render:()=>d(YE,{})}]}]:[{match:"/information",render:()=>d(y,{children:[d(gE,{}),d(hE.Preload,{})]}),renderPrefetch:()=>d(gE.Prefetch,{})},{match:"/shipping",render:()=>d(jE,{}),renderPrefetch:()=>d(jE.Prefetch,{})},{match:"/payment",render:()=>d(y,{children:[d(VE,{}),d(JE.Preload,{})]}),renderPrefetch:()=>d(VE.Prefetch,{})},{match:"/review",render:()=>d(y,{children:[d(qE,{}),d(JE.Preload,{})]}),renderPrefetch:()=>d(qE.Prefetch,{})},{match:"/stock-problems",render:()=>d($E,{})},{match:"/no-address-location",render:()=>d(fE,{})},{render:()=>d(vE,{})}]]}],[n]);return J(t,i)});class sV extends g{componentDidCatch(e){this.props.terminalErrorHandler.notify(e,{inErrorBoundary:!0})}render(){return this.props.children||null}}function lV(e){const t=[];
2return e.__k?(e.__k.forEach(e=>{e&&"function"==typeof e.type?t.push(...lV(e)):e&&"string"==typeof e.type&&t.push(e)}),t):t}function cV(e,t){const{props:n}=e,r=function(e){return e.type===y?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}(e);let a="";for(const o in n)if(n.hasOwnProperty(o)&&"children"!==o){let e=n[o];"function"==typeof e&&(e=`function ${e.displayName||e.name}() {}`),e=Object(e)!==e||e.toString?String(e):Object.prototype.toString.call(e),a+=` ${o}=${JSON.stringify(e)}`}const i=n.children;return`<${r}${a}${t||i&&Array.isArray(i)&&i.length?`>${t||".."}</${r}>`:" />"}`}function*uV(e,t){let n=e,r=0;for(;n&&r<50;)yield n,n=t(n),r+=1}const dV=/\(.+\)/;function pV(e,t=10){let n=null;const r=[];for(const a of uV(e.__??null,e=>e.__??null)){const e="function"==typeof a.type&&a.type!==y;if(e&&!n&&(n=a),r.length<t)if(e){const{displayName:e}=a.type;e&&!dV.test(e)&&r.push(e)}else"string"==typeof a.type&&r.push(a.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
2const mV=/^[a-zA-Z][\w-]{0,63}$/;function hV(e){return mV.test(e)?/\d{4,}/.test(e)||e.split(/[_-]/).some(e=>e.length>=8&&/[a-zA-Z]/.test(e)&&/\d/.test(e))?null:e:null}const gV="https://redacted.invalid";function fV(e){let t;try{t=new URL(e,gV)}catch{return null}return"null"===t.origin?t.protocol.replace(/:$/,""):t.origin===gV?null:t.origin}function yV(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const a of uV(n,e=>e.parentElement)){const e=a.getAttribute("id"),n=a.getAttribute("data-testid"),i=null==e?null:hV(e),o=null==n?null:hV(n),s=a.getAttribute("role");if((i||o||s)&&r.push(`${a.localName}${i?`#${i}`:""}${o?`[${o}]`:""}${s?`(${s})`:""}`),r.length>=t)break}return r}const vV=new Set(["type","className","id","role","name","data-testid","data-alternate-values","alternateValues","direction","gap","alignItems","justifyContent","inlineSize","padding","borderRadius","borderWidth","display","condition","gridAutoFlow","gridTemplateColumns","gridTemplateRows","size","color","letterCase","translate","variant","loading","wallet","shopPayEmphasis","hideWallets"]);function _V(e){return vV.has(e)||e.startsWith("aria-")}function bV(e){const t={};for(const n in e.props)if(Object.prototype.hasOwnProperty.call(e.props,n)){const r=e.props[n];"href"===n&&"string"==typeof r?t[n]=fV(r)??"[redacted]":_V(n)?t[n]="id"===n&&"string"==typeof r||"data-testid"===n&&"string"==typeof r?hV(r)??"[redacted]":r:t[n]="[redacted]"}return{...e,props:t}}function kV(e){if("function"!=typeof e)return null;const t=e;return t.displayName||t.name||null}function PV(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}const SV=["id","name","type","role","href","action"],wV=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),CV=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function EV(e,{parent:t,observability:n,debugMode:r,deployStage:a,userAgent:i,serverUserAgent:o,apiClientId:s,page:l,mismatchContext:c}){!function(e){if(!e)return;const t=K.diffed,n=[];K.diffed=e=>{const r=e.__k&&e.__k.some(e=>e&&(!e.type||"string"==typeof e.type)),a=lV(e);if(!n.includes(e.type)&&r&&a&&a.filter(e=>e&&!e.type).length>1){const t=[];for(const r of a)r&&!r.type?t.push(`"${r.props}"`):r&&"string"==typeof r.type&&(t.length>1&&(n.push(e.type),console.warn(`Detected adjacent text-nodes ${t.join(", ")}.\nThis doesn't need to be actioned on but could lead to causes of hydration mismatches.\nText-nodes located in\n${cV(e.__,cV(e))}`)),t.length=0)}t?.(e)}}(r),$s.current=!0;const u=function(){const e=new WeakSet;return{register(t,n){const r=n instanceof Element?n:null,a=n?.parentElement??null;let i=!1;for(let o=r??a;o;o=o.parentElement)if(e.has(o)){i=!0;break}if(!i)for(let o=t;o;o=o.__)if(e.has(o)){i=!0;break}r&&e.add(r),a&&e.add(a),e.add(t);for(let o=t.__;o;o=o.__)if("string"==typeof o.type){e.add(o);break}return i}}}(),d=K.__m;K.__m=(e,t)=>{if("string"==typeof e.type){const d=e.type,m=(e=!1)=>t.map(t=>{if(t instanceof Text)return`Text: ${e?"[redacted]":t.data}`;if(t instanceof Element){const n=t.getAttribute("id");let r=n;return null!=n&&e&&(r=hV(n)??"[redacted]"),`<${t.localName}${null==r?"":` id=${r}`} class=${t.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:h,breadcrumb:g}=pV(e),f=t.find(Boolean)??e.__e??null,y=yV(f??e.__?.__e??null);if(r){console.group("🚱 Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${d}\n${cV(e)}`),h&&"function"==typeof h.type&&console.log(`The closest function parent is ${cV(h)}`),g.length&&console.log(`Component path: ${g.join(" < ")}`),y.length&&console.log(`DOM ancestry: ${y.join(" < ")}`);const t=m();t.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${t.join(", ")}`):console.log("There were no available DOM nodes, this could be due to a prior mismatch."),console.log("ℹ️ Learn about hydration mismatches: https://videobin.shopify.io/v/gvR4rL"),console.groupEnd()}const v=m(!0),_=h&&"function"==typeof h.type?cV(bV(h)):void 0,b=null!=o&&o!==i,k=function({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:a}){if(n)return!1;if(null!=e&&CV.has(e))return!1;if(null!=r&&r!==a)return!1;if(Ys(a))return!1;if(a.match(/musical_ly|BytedanceWebview/))return!1;if(a.split(" ").includes("Playwright-checkout-e2e-tests/local"))return!1;if(a.includes("HeadlessChrome"))return!1;const i=Element.prototype.matches;return"function"!=typeof i||t.every(e=>!(e instanceof Element&&i.call(e,wV)))}({apiClientId:s,excessDomChildren:t,hasPriorMismatch:u.register(e,f),serverUserAgent:o,userAgent:i}),P=PV(p),S=l();n.log("hydration_mismatch",`Hydration mismatch for <${d}>`,{...c?.(),domType:d,mismatchedVNode:cV(bV(e)),closestFunctionParent:_,vNodePath:g.length?g.join(" < "):void 0,domPath:y.length?y.join(" < "):void 0,availableNodeTypes:v||void 0,hasDomNodes:v.length>0,isHydrating:$s.current,hasInProgressBoundaries:p.length>0,suspendedAtCapture:P.length?P.join(","):void 0,isActionable:k,isUADivergent:b,page:S}
2),k&&"tophat"!==a&&n.counter({name:"hydration_mismatch",value:1,attributes:{page:S}})}d&&d(e,t)};const p=[],m=function({observability:e,debugMode:t,inProgressBoundaries:n}){const r=[],a=new WeakMap;let i=!1;const o=K.diffed;return K.diffed=e=>{if("string"==typeof e.type&&$s.current&&e.props&&e.__e instanceof Element){const t=e.props;for(const i of SV){const o=t[i];if("string"!=typeof o)continue;if(e.__e.getAttribute(i)===o)continue;let s=a.get(e.__e);if(s?.has(i))continue;s||(s=new Set,a.set(e.__e,s)),s.add(i);const l=PV(n),{closestFunctionParent:c,breadcrumb:u}=pV(e),d=c?kV(c.type):null,p=yV(e.__e);r.push({attr:i,tag:e.type,reactValue:o,domElement:e.__e,suspendedAtCapture:l,closestFunctionParent:d,vNodePath:u,domPath:p})}}o?.(e)},{flushAndTeardown:()=>{if(K.diffed=o,!i){i=!0;for(const{attr:n,tag:a,reactValue:i,domElement:o,suspendedAtCapture:s,closestFunctionParent:l,vNodePath:c,domPath:u}of r){if(!o.isConnected)continue;const r=o.getAttribute(n);if(r===i)continue;const d=s.length>0;t&&console.warn(`🏷️ Attr mismatch on <${a} ${n}>: Preact="${i}" vs DOM="${r}" [suspended=${s.join(",")||"none"}, parent=${l??"unknown"}, domPath=${u.join(" < ")||"unknown"}]`),e.log("attr_mismatch",`Preact ${n} !== DOM ${n} at hydration`,{attr:n,tag:a,reactValue:vV.has(n)?i:"[redacted]",domValue:vV.has(n)?r:"[redacted]",suspendedAtCapture:d?s.join(","):void 0,closestFunctionParent:l??void 0,vNodePath:c.length?c.join(" < "):void 0,domPath:u.length?u.join(" < "):void 0}),e.counter({name:"attr_mismatch",value:1,attributes:{attr:n,tag:a,hadSuspendingBoundaries:d,closestFunctionParent:l??"unknown"}})}r.length=0}}}}({observability:n,debugMode:r,inProgressBoundaries:p}),{teardown:h}=((e,t,n,r)=>{const a=e=>`${kV(e.type)??""}${e.__b}`;let i=0,o=!1;const s=K.__e;K.__e=(e,n,r)=>{if("function"==typeof n.type&&e&&"function"==typeof e.then&&Boolean(32&n.__u)){const r={name:kV(n.type)??"anonymous",key:a(n)};t.push(r,r),i+=1;let s=!1;o=e,l=()=>{s||(s=!0,i-=1)},Promise.resolve(o).then(l).catch(l)}var o,l;s(e,n,r)};const l=K.diffed;K.diffed=n=>{if("function"==typeof n.type){const r=a(n),i=t.findIndex(e=>e.key===r);if(-1!==i){if(e){const e=lV(n);n.__k&&0===e.length?console.warn(`Suspended VNode ${cV(n)} returned no DOM-children, this causes hydration mismatches.`):n.__k&&e.length>1&&console.warn(`Suspended VNode ${cV(n)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(i,1)}}l?.(n)};const c=K.__c;K.__c=(e,n)=>{!o&&i<=0&&0===t.length&&u(),c?.(e,n)};const u=()=>{o||(o=!0,K.diffed=l,K.__e=s,K.__c=c,$s.current=!1,r?.())};return{teardown:u}})(r,p,0,m.flushAndTeardown);X(e,t),0===p.length&&h()}const xV="shop-pay-login-iframe",IV="100%",AV="publickey-credentials-get *",TV=9e4;async function LV(e){if(!document.body?.classList.contains("Loading"))return void kl(document);const t=document.querySelector(".LoadingShell"),n=function(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for("Shopify.checkout.partnerInterstitialMinimumVisibleDuration"))}(t);if((n||e)&&(n&&await n,e&&(await e.fill(),Pl(),t?.remove()),!document.body?.classList.contains("Loading")))return void kl(document);const r=t?.isConnected?new Promise(e=>{const n=()=>{clearTimeout(r),t.removeEventListener("transitionend",n),t.remove(),e()},r=setTimeout(n,1e3);t.addEventListener("transitionend",n)}):Promise.resolve();document.body.classList.remove("Loading"),performance.mark("checkout:visible",{detail:{devtools:{dataType:"marker",color:"primary-dark",tooltipText:"The critical elements of checkout are visible to the buyer"}}}),await r,kl(document)}function NV(e){Z(e),e.childNodes.forEach(e=>{e.remove()})}class RV extends ul{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class MV extends ul{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const DV=new Set(["https://europesnus.nl","https://europesnus.de","https://europesnus.fr","https://europesnus.se","https://suomi-nikotiinipussit.fi","https://www.suomi-nikotiinipussit.fi","https://www.lankeleisi.se","https://fr.stance.eu.com","https://holysmile.de"]),OV=/^[^.]+\.checkout\.my\.shop\.dev$/i;function zV({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const a=function({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[UE];case"/throttle":return[KE];case"/thank-you":return[JE];case"/shoppay_login":return[HE]}if(t||e)return[bE];switch(n){case"/shipping":return[jE,hE];case"/payment":return[VE,hE];case"/review":return[qE,hE];case"/stock-problems":return[$E];default:return[gE]}}({isOnePage:e,isShopPay:t,path:n});return Ss({isOnePage:e,isShopPay:t,path:n})&&a.push(lB),r.required.value&&a.push(l_,{load:r.ensureEngineLoaded}),a}function BV(e){const t=e.querySelector("nav ol");if(!t)return;const n=Array.from(t.children);return{count:n.length,activeIndex:n.findIndex(e=>"step"===e.getAttribute("aria-current"))}}const VV=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:BV,criticalAsyncComponents:zV,hydrateApp:async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{client:a,terminalErrorHandler:i}=t,s="shopPay"===t.checkout.identity.current.value,l=t.checkout.thankYouEntrance.progress;l?wl(l,{currentUrl:t.router.currentUrl,latestReceipt:t.checkout.latestReceipt}):Cl()&&Pl();const c=function({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const a={stage:"armed"};return setTimeout(()=>{if(bl(document))return;const t=e.unstable_legacyNavigationPerformance,i={shopPaySdkCheckout:n,stage:a.stage,pen
2dingLoaderCount:t.loaderCount},o=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:TV,...i}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:TV,...i,loaderPreviouslyRegistered:t.loaderPreviouslyRegistered,appHasContent:Boolean(e.rootElement?.childElementCount),loginFramePresent:Boolean(document.getElementById(xV)),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(o)},{exportImmediately:!0}),ml().then(()=>{const e=Math.round(performance.now()-o);r.counter({name:"shop_pay_skeleton_recovered_after_stuck",value:1,exportImmediately:!0,attributes:i}),r.histogram({name:"shop_pay_skeleton_recovery_duration",value:e,attributes:i}),r.log("shop_pay_skeleton_recovered_after_stuck","Shop Pay checkout recovered after its skeleton was reported stuck",{...i,recoveryDurationMs:e},{exportImmediately:!0})}).catch(()=>{})},TV),a}({client:a,isShopPayActive:s,isShopPaySdkCheckout:Gs(t.shopPay),observability:t.observability});await async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{events:a,client:i,router:o}=t;o.prefix instanceof RegExp&&function({pathnamePrefix:e,allowedOrigins:t,client:n,isShopPayActive:r}){const{protocol:a,href:i,host:o,pathname:s,origin:l}=n.initialRequest.url;if("https:"!==a)throw new MV(`Running on an insecure protocol: ${i}`);if(!OV.test(o)&&!r){if(!function(e,t,n){return n.some(n=>{if(t===n)return!0;const r=n.replace(/^https:\/\//,"");return!!t.endsWith(`.${r}`)||t===`https://www.${r}`||!!r.includes("/")&&e.startsWith(n)})||DV.has(t)}(i,l,t))throw new RV(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(s))throw new RV(`Running on an unexpected pathname: ${i}. Expected pathname to match: /${e.source}/`)}}({pathnamePrefix:o.prefix,allowedOrigins:i.unstable_getSerialization("shop").origins,client:i,isShopPayActive:"shopPay"===t.checkout.identity.current.value}),Object.defineProperty(window,Symbol.for("Shopify.checkout"),{value:{context:t},writable:!0,configurable:!0,enumerable:!1}),await async function(t,{loadFrom:n,onQuerySettled:r}){const a=Zs(t);if(!a?.requireBusinessCriticalOnly)return;const i=e(ee,a),o=t.checkout.configuration.getProfile({...a,requireBusinessCriticalOnly:!1});try{let e="serialized-cache"===n?await Kl(t.graphql.coreGraphql,a):void 0;if("serialized-cache"===n&&!e)return Xl(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:!1}),void s("missing_cached_profile");const r=await el(()=>{},{trigger:"initialization",profileRequest:a,graphql:t.graphql.coreGraphql,configuration:t.checkout.configuration,extensibility:t.checkout.extensibility,observability:t.observability,userEvents:t.userEvents,telemetryContext:{source:t.source,shop:t.shop,sessionToken:t.client.unstable_getSerialization("sessionToken")??"",current:t.checkout.proposal.negotiated}});r?.(),e??=await Kl(t.graphql.coreGraphql,a),Xl(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:Boolean(e)}),e||s("query_failure")}catch(l){if(t.graphql.coreGraphql.cache.delete(i),Jl(t.observability,l),o){s("preparation_failure");try{t.checkout.extensibility.ui.replace({activatedExtensions:o.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){Jl(t.observability,c)}try{t.checkout.configuration.update({profile:o,requireBusinessCriticalOnly:!1})}catch(c){Jl(t.observability,c)}}}finally{r?.(i)}function s(e){"simulated"!==t.source.type&&t.observability.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:"initialization",reason:e}})}}(t,{loadFrom:i.initialRequest.isServerRendered?"serialized-cache":"network"});const s=new Js(t,{bootStartTime:n,bootPhaseTimings:r});s.waitUntil(async function(e){const{checkout:t,router:n}=e,r=zV({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:"shopPay"===t.identity.current.value,path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),a=S_(e);a&&r.push(a),await Promise.all(r.map(e=>e.load()))}(t)),a.dispatchEvent(s),await s.allResolved(),a.dispatchEvent(new Ks(s))}(t,{bootStartTime:n,bootPhaseTimings:r}),c&&(c.stage="context_ready");const u=performance.now(),p=d(sV,{terminalErrorHandler:i,children:d(mw,{context:t,children:d(oV,{})})});a.initialRequest.isServerRendered&&t.router.shouldHydrateServerRenderedRoute()?function(e,t,n){const r="shopPay"===n.checkout.identity.current.value,a=BV(t);EV(e,{parent:t,observability:n.observability,debugMode:n.environment.debug.preact,deployStage:n.environment.deployStage,userAgent:n.client.userAgent,serverUserAgent:n.client.unstable_getSerialization("serverUserAgent"),apiClientId:n.client.unstable_getSerialization("apiClientId"),page:()=>at(window.location.href,{isShopPayActive:r,shopPay:n.shopPay}),mismatchContext:()=>{const e=o(()=>{const e=n.checkout.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.checkout.configuration.visibility.showHeader,shellHeaderLogoVisibility:e.header.logo?.visibility,shellHeaderCartLinkVisibility:e.cartLink.visibility,shellHeaderIsShopOnWeb:fr(n.router.currentUrl.value.search),shellHeaderPrefersDarkMode:n.client.prefersDarkMode.value}}),t=o(()=>({cartLinkShopHasStorefront:n.shop.hasStorefront,cartLinkSourceType:n.source.type,cartLinkHasCartReturnUrl:Boolean(n.source.cartReturnUrl)})),r=IB.current,i=r&&{breadcrumbIds:r.ids,breadcrumbActiveId:r.activeId,breadcrumbShowCartLink:r.showCartLink,breadcrumbHasCartUrl:r.hasCartUrl};return{serverCrumbCount:a?.count,serverActiveCrumbIndex:a?.activeIndex,...e,...t,...i}}})}(p,a.rootElement,t):function(e,t){NV(t),Q(e,t)}(p,a.rootElement),c&&(c.stage="rendered"),function({client:e,isShopPayActive:t,progress:n,watch:r}){const a=t||Boolean(n),i=new AbortController;if(!a)return void LV();r&&(r.stage="skeleton_wait");const o=()=>{let t;r&&(r.stage="subscribed"),t=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",()=>{r&&(r.stage="loading_finished"),LV(n),t?.()})},s=e.unstable_legacyNavigationPerformance.on("event",e=>{e.type===Ws&&(i.abort(),o())}),l=e.unstable_legacyNavigationPerformance.on("navigation",()=>{i.abort(),o()});i.signal.addEventListener("abort",()=>{s(),l()})}({client:t.client,isShopPayActive:s,progress:l,watch:c}),async function(e,{hydrateStartTime:t}){const{events:n}=e,r=new Xs(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new Qs(r))}(t,{hydrateStartTime:u})},renderTerminalError:function({rootElement:e,terminalErrorPageElement:t}){return n=>async function(e,t){NV(e),Sl(t)||await LV()}(e,t)}},Symbol.toStringTag,{value:"Module"}));
2export{kh as $,$u as A,Yf as B,Vy as C,HA as D,vy as E,rT as F,zw as G,TS as H,mA as I,O_ as J,Gm as K,Kf as L,Hx as M,kA as N,R_ as O,u_ as P,L_ as Q,eV as R,Qf as S,CA as T,yT as U,Lz as V,Xv as W,Hc as X,aB as Y,Sv as Z,wv as _,cC as a,gw as a$,PD as a0,oh as a1,gv as a2,YN as a3,Bx as a4,qS as a5,jS as a6,WS as a7,YS as a8,zD as a9,zL as aA,RL as aB,$N as aC,HL as aD,lm as aE,p_ as aF,Mu as aG,Km as aH,Sh as aI,gL as aJ,tB as aK,vL as aL,Yv as aM,AM as aN,dk as aO,rg as aP,jd as aQ,Qu as aR,FR as aS,jI as aT,Ld as aU,HN as aV,HB as aW,JB as aX,KB as aY,qB as aZ,Lu as a_,SP as aa,eh as ab,fm as ac,Cd as ad,Op as ae,mC as af,uC as ag,fD as ah,_D as ai,yw as aj,HS as ak,lc as al,Wm as am,bv as an,_u as ao,cN as ap,Uh as aq,qN as ar,Wz as as,UL as at,Dw as au,qL as av,ww as aw,eN as ax,ML as ay,DL as az,Df as b,iv as b$,Tu as b0,jp as b1,Mp as b2,Hm as b3,Ud as b4,Qc as b5,Xc as b6,Zc as b7,Nf as b8,Tf as b9,sI as bA,_h as bB,Kg as bC,rv as bD,fO as bE,Ef as bF,fA as bG,DM as bH,MA as bI,RA as bJ,wy as bK,Jg as bL,FN as bM,tM as bN,Aw as bO,vA as bP,$D as bQ,nS as bR,Jz as bS,Xz as bT,OD as bU,jc as bV,pv as bW,BM as bX,Qy as bY,AD as bZ,YB as b_,Lf as ba,If as bb,Yp as bc,Kp as bd,Uw as be,Gu as bf,Ad as bg,wd as bh,nu as bi,Hp as bj,lA as bk,Eu as bl,Sz as bm,kz as bn,nx as bo,hz as bp,cR as bq,Qw as br,Vb as bs,U_ as bt,F_ as bu,jw as bv,Hw as bw,oc as bx,ik as by,xb as bz,Bf as c,NT as c$,ov as c0,sv as c1,XD as c2,PO as c3,Zy as c4,LB as c5,jy as c6,Bz as c7,wh as c8,Ih as c9,zh as cA,hy as cB,Mh as cC,vI as cD,Bh as cE,UN as cF,tz as cG,yy as cH,lT as cI,uO as cJ,lO as cK,JA as cL,kT as cM,vf as cN,Jp as cO,wx as cP,iN as cQ,Mb as cR,Db as cS,Ob as cT,zb as cU,rk as cV,OT as cW,Ub as cX,zT as cY,TT as cZ,MT as c_,Fz as ca,nf as cb,fC as cc,VE as cd,DT as ce,hc as cf,gc as cg,Sf as ch,Cf as ci,Ah as cj,$g as ck,BA as cl,FA as cm,jA as cn,hv as co,Hd as cp,gh as cq,WL as cr,_L as cs,yL as ct,lv as cu,XS as cv,KS as cw,FT as cx,Rv as cy,Oh as cz,CN as d,Mx as d$,Hh as d0,YP as d1,yO as d2,yf as d3,pk as d4,nB as d5,ZL as d6,qy as d7,Hy as d8,Sd as d9,bd as dA,vd as dB,Dp as dC,Fp as dD,Bp as dE,Ym as dF,Ed as dG,tc as dH,fc as dI,pg as dJ,kS as dK,EA as dL,Zv as dM,jh as dN,Tz as dO,aV as dP,Iv as dQ,hx as dR,ib as dS,jB as dT,zx as dU,Vx as dV,Gp as dW,Ox as dX,Ux as dY,gA as dZ,Lx as d_,td as da,ed as db,DI as dc,gO as dd,WD as de,qv as df,OO as dg,NO as dh,DO as di,dz as dj,xk as dk,cI as dl,uI as dm,Ph as dn,nz as dp,WB as dq,QO as dr,SD as ds,vm as dt,md as du,Vd as dv,hm as dw,dm as dx,Od as dy,qp as dz,AC as e,FO as e$,Rx as e0,Cx as e1,Ix as e2,Ex as e3,Ax as e4,Dx as e5,Fx as e6,xx as e7,Nx as e8,KA as e9,vC as eA,zI as eB,LM as eC,jM as eD,HM as eE,II as eF,XM as eG,FM as eH,zR as eI,zM as eJ,UD as eK,sL as eL,rD as eM,DR as eN,y_ as eO,$P as eP,dc as eQ,pc as eR,rf as eS,Iy as eT,EB as eU,AI as eV,Gg as eW,IS as eX,WE as eY,Py as eZ,ab as e_,hC as ea,bC as eb,Bg as ec,tC as ed,Zw as ee,_P as ef,Xw as eg,bN as eh,$h as ei,fS as ej,xS as ek,ZB as el,Ly as em,AT as en,ZP as eo,IT as ep,lb as eq,fv as er,eM as es,dO as et,fy as eu,lI as ev,$B as ew,GB as ex,mI as ey,sb as ez,cx as f,Ww as f$,rb as f0,aI as f1,rI as f2,xh as f3,jE as f4,lS as f5,sk as f6,CI as f7,eg as f8,sg as f9,dv as fA,MO as fB,Fv as fC,hO as fD,Dc as fE,dI as fF,jv as fG,Vv as fH,$v as fI,xv as fJ,Tv as fK,AP as fL,Tb as fM,iy as fN,sy as fO,tS as fP,yh as fQ,uM as fR,Qz as fS,qh as fT,Qv as fU,vP as fV,kg as fW,yg as fX,q_ as fY,Yw as fZ,eC as f_,ky as fa,qw as fb,Yg as fc,pT as fd,dT as fe,XP as ff,HP as fg,gx as fh,Ck as fi,Xg as fj,ME as fk,JP as fl,IV as fm,xV as fn,AV as fo,ak as fp,zv as fq,oy as fr,vO as fs,mO as ft,Uv as fu,_O as fv,TB as fw,og as fx,mB as fy,hB as fz,_I as g,mk as g$,nc as g0,A_ as g1,sc as g2,$w as g3,M_ as g4,D_ as g5,sS as g6,IN as g7,pb as g8,Ok as g9,um as gA,iC as gB,VS as gC,bh as gD,Kk as gE,Av as gF,KL as gG,IO as gH,Hv as gI,AO as gJ,OI as gK,MM as gL,OM as gM,$T as gN,TI as gO,RI as gP,NE as gQ,PE as gR,wE as gS,SE as gT,IE as gU,AE as gV,LE as gW,BE as gX,rO as gY,Ig as gZ,fh as g_,Lh as ga,Lv as gb,Ev as gc,Th as gd,th as ge,yC as gf,Dz as gg,wT as gh,GS as gi,Rz as gj,$A as gk,xM as gl,Cv as gm,DS as gn,r_ as go,fg as gp,mx as gq,Fw as gr,pR as gs,UP as gt,BD as gu,yk as gv,Sy as gw,Hg as gx,yA as gy,xy as gz,LT as h,ux as h$,lL as h0,$R as h1,qR as h2,GL as h3,cL as h4,LI as h5,UR as h6,Fb as h7,Kb as h8,Jb as h9,gb as hA,Xb as hB,NI as hC,RM as hD,Wy as hE,Wh as hF,_R as hG,bR as hH,kR as hI,cM as hJ,iD as hK,nD as hL,bM as hM,oD as hN,SR as hO,QR as hP,PL as hQ,GI as hR,ry as hS,ey as hT,UI as hU,Nz as hV,Yz as hW,YD as hX,MP as hY,By as hZ,TP as h_,Vk as ha,lk as hb,$S as hc,n_ as hd,by as he,Fh as hf,bL as hg,of as hh,pI as hi,Su as hj,Qx as hk,WN as hl,BN as hm,Ik as hn,aS as ho,iS as hp,XO as hq,qg as hr,bA as hs,_A as ht,AA as hu,jg as hv,Ey as hw,Fy as hx,XB as hy,QB as hz,nL as i,px as i0,dx as i1,QP as i2,TO as i3,RP as i4,RO as i5,tv as i6,zS as i7,Jy as i8,ob as i9,Bd as iA,Rd as iB,zd as iC,kN as iD,Zu as iE,KT as iF,FI as iG,qu as iH,sz as iI,Ip as iJ,Xu as iK,OA as iL,Sp as iM,vN as iN,QE as iO,XE as iP,ZE as iQ,ox as i
2R,ix as iS,ax as iT,rx as iU,tx as iV,ex as iW,_x as iX,VV as iY,Vh as ia,jN as ib,zz as ic,ev as id,fx as ie,dL as ig,Wb as ih,Rh as ii,NB as ij,nh as ik,Ay as il,Mv as im,JS as io,xf as ip,aD as iq,aM as ir,vM as is,YM as it,Id as iu,GD as iv,vu as iw,Ju as ix,Au as iy,Vu as iz,qf as j,ac as k,kv as l,Vg as m,cT as n,Kw as o,Ql as p,bz as q,Yc as r,$c as s,Dh as t,TL as u,ic as v,uc as w,VT as x,Gh as y,qP as z};

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.