PageSourceSearch

https://www.davisinstruments.com/cdn/shopifycloud/checkout-web/assets/c1/164ad2e3.BA-GikTU.js

js davisinstruments.com collected 2026-10-02 02:44:14 UTC 831,446 bytes, 43 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["b887ec56.B2nrNlY2.js","2c1ab0fe.BqEHHmaW.js","4c290a1e.FJVsH4yi.js","app.D2gvVyTR.js","assets/app.BuSMBobh.css","assets/previous.BpuyvRSB.css","65f3d4da.BdKZt11Z.js","60a453ce.BClq-svk.js","0a7dffce.BHf0S_6c.js","bb728e1c.uhKc-SJ5.js","a6e11e56.aAO-IiW-.js","assets/AdminPreviewBar.BpHI7Zwr.css","33682ee7.BbeAYzfW.js","55098bf1.CRzNngQq.js","c610ba76.va7_mQYq.js","66338e00.DhfGM1tC.js","28ac86c0.BKH30O5g.js","3e6029dd.Y1F4c1sS.js","assets/QRCode.BZ_m5G5a.css","30074413.C20BVRXg.js","assets/Pressable.D9SfDfsb.css","efa0389a.CmzfQUTJ.js","assets/Choice.B7lVAtpz.css","9f57d2aa.-6MHOqgs.js","8574876b.ChO2GdxN.js","064f6ac1.CtJPZ5b8.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.PfG1A8vt.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.CyCci7cQ.js","assets/NumberField.CRpcZnVJ.css","39921a74.BrTHyyCQ.js","assets/Switch.BS8yVgoP.css","27f09e31.BYbsrgVE.js","137622f3.BhDNw65d.js","54bf0ebb.DAmict4J.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.CDOIq-vC.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.CC5MqUe3.js","53bbdad9.6B8LHIua.js","47b970b2.BwzlBSwQ.js","3ca8ef7e.D9Nch_50.js","ac5a19ff.BHoedVx2.js","assets/FormLayout.CrYq3At_.css","29034f35.CKhRr7lV.js","assets/PhoneField.uZEuHncj.css","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","cadec7c0.COS2v60r.js","9c384ce8.mu6MOGR9.js","0b8657b8.DAkNHzQn.js","2210eadb.EwEgHOG0.js","fd38863f.C-JznKGE.js","2b0dcdd4.fBOc3l8o.js","cb8fcd45.D99hrDC6.js","f78726c8.D1GQbjRB.js","assets/useHasOrdersFromMultipleShops.B_iZlQze.css","aea3fb03.BDHlih-c.js","acc74f72.D0lORwj1.js","2255f8fa.D0Ujb8qy.js","b8733b27.DerGGsS-.js","bff2ff9b.BZBliUVS.js","0fb2c600.DGA7MXfc.js","7ee73f43.DtdhcMpw.js","2a0f03e4.DjbA8YLC.js","05a2a9c8.Byofot7x.js","dd9b68fc.CouQG28e.js","adeb5fdb.BJ-4Mvan.js","8498e76b.C48vBUCX.js","d08a6c7d.C3l7f4gE.js","ed9f2238.ChGZ5py3.js","13b13169.JaoLU_DX.js","bea9843a.Cd2v6kJc.js","ec391382.K2o3oZbF.js","865e4eaf.CfQbwcuR.js","6f1b819b.DxcCV26i.js","6a2fc6d6.CBQKVWRG.js","ccdf3592.B7Ukng27.js","e477f96c.CCUKKy0S.js","cf29e63b.UPVrnMYo.js","5587f402.CiejVPa1.js","e39bc11c.w_dcLWzY.js","08a3b809.BqMk-s3U.js","8599b02a.DjDpxYLZ.js","bad03769.DppnRrc6.js","assets/DevTools.DTK7lleS.css","abd080c1.C757hPxu.js","2acfb1ce.CJPmB0XI.js","9d12dea3.BI8nqBiJ.js","b9c0319a.D5yZDWHr.js","74835653.BtNhMTqJ.js","assets/BillingAddressForm.BdwN7V1K.css","910cd6e2.pc74Wwrs.js","f1968089.DErP3-mp.js","347b440c.DhRFIYzk.js","d5d34b3b.D_UYHSjm.js","assets/EstimatedDeliveryContent.B_THySFF.css","181d38d3.Bx836TsC.js","31cc568e.Dti0cJak.js","assets/index.CIy8uDiZ.css","assets/Middot.D7Ujmshx.css","60575ca1.66qgWuPW.js","assets/DeliveryReviewMethods.Q_59OWoX.css","79974aab.CiLYzGHS.js","6720fa5f.CrCe0j_W.js","assets/Rollup.DKll7CHa.css","e77f7fe0.B6M5o7QB.js","assets/PaymentLine.BGhbZYQP.css","17324a0b.BkYCzpAj.js","a535174a.D8WAPvhF.js","5fd968f2.BIYX8FeS.js","01973ac7.BJK4F5Uy.js","58314944.CBBsxtpI.js","assets/Captcha.CJQgLR0i.css","dffdfb34.BGb6nQvv.js","0c0ad074.RgO7-3qK.js","945a08d6.CbBX260S.js","assets/useShopPayButtonClassName.CpHF4L7Q.css","0e67bd3b.IdsrMiz7.js","cb5cf153.Cw_O6Mr1.js","e3e348f2.CzOvkbpO.js","ca5e9c49.COugV1Xp.js","a422df8c.ggO-AlYl.js","assets/EmptyState.BEvzDDvy.css","7b0c98ea.B-oVlYQI.js","assets/TransitionHeight.CuRoM9zv.css","d22d2b80.CrBDr4H-.js","f49d4216.DkTq21k4.js","assets/VatNumberValidationField.CyiectWG.css","a25deb9a.BtBRFgl8.js","assets/useShopPayNewSignupLoginExperiment.BYM12A8B.css","f692f62f.1VqP6fD-.js","assets/RedirectionNotice.B8v_QGNW.css","4421b714.DZEE9SkD.js","611e718a.C3a2Ap3j.js","assets/OffsitePaymentFailed.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","f8706cb6.Bnci6QEq.js","0e9ee714.CUvblzuU.js","assets/StickyPayButton.CPXhWoNv.css","f3fe2775.BuWC6GWF.js","cc6ff67d.CQwyXWHD.js","87bfafec.a5jzmgqb.js","assets/hasViolationsIgnoringCodes.BcTJoNaV.css","dfca5da5.BUxySJFd.js","assets/Section.CU18S7Ap.css","7a8217fd.CAuGvD85.js","assets/useShopPayProgressIntercepts.xO_7ctnq.css","2b89a178.CeCOOCYG.js","b684bff6.BBWgog5h.js","d6447d9e.C1rIjiBE.js","f51e663e.BRJDC
1Q0a.js","64de7b49.DBBYkFfY.js","8e79be58.BAhOGoFB.js","assets/ShippingMethodSelector.B0hio2RO.css","90e26f5f.RxBZE9Nq.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","assets/ShippingLines.LcqrKXE1.css","f3e117aa.2wtgPU0T.js","assets/OnePage.DxMZvmU_.css","9e3968a8.CV7SEfoi.js","fc21c11a.BL45iHKA.js","4ea44c06.B-5F-oiB.js","assets/PaymentButtons.CKE1iCma.css","assets/PayButtonSection.Bi0nhBOp.css","d2e6a587.CdnrCcyA.js","assets/MobileOrderSummary.DjDhVpQB.css","74122478.b4VOdYwF.js","73a9b0a0.CiCbpTRv.js","86720dbb.B98R4NBr.js","7114e006.D5JaP9sc.js","assets/MissingFields.BbxB_6wt.css","assets/PaymentMethodProgressionHost.BIxPaYCu.css","e0989459.DUbIFUUJ.js","assets/RememberMeSection.JBO5WNhc.css","dfc03c53.CuQrwiah.js","50130ded.BjO4oJHb.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","896e8dde.Cjejr9LN.js","7743efb2.C6j1GI1B.js","24fcbaf6.C3yp5Xtj.js","assets/PostPurchase.e2mo8B8q.css","090b00f0.Bj-jjy3B.js","assets/Processing.D4vG8dn7.css","b120ac11.y8r8UJGo.js","289b89e4.SAzMaW-u.js","9011490c.CHh74ILx.js","8c0eaf27.C-qhuGMH.js","assets/ShopPayLoginLoader.B1_neltu.css","0cd5b134.D1V0IG75.js","5c5c2e96.BYalDDnq.js","f5a7bb50.BWRsVvpV.js","a9ba8e86.DH-C0zHu.js","909cc5d6.MwssGRYI.js","c57e39e6.CEnhcYeU.js","be176b00.CsZeI5eL.js","3a819064.Xmk2TvaB.js","assets/Map.cbVP6Hp_.css","9f3d9f8c.DZAF8CzC.js","8d3a12c3.DFi0DKL_.js","0e4087ec.B3YfeV2W.js","4aab4b34.X0-ZuVcG.js","assets/ThankYou.imAu3qxr.css","01f1d1bd.DTgG5FTN.js","assets/Throttle.CK6IAVuq.css","49758c58.k-TzyziF.js","assets/RuntimeExtension.DWkDBM73.css","7fd9930c.DYfwUEDq.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","39bf6084.B9CMoYi9.js","assets/CryptoModalManager.CqiWenQK.css","23bd7c1a.cijUtcFN.js","7a21cd4e.BAUMPiSr.js","assets/VaultedContactAvatar.BF3cX_zA.css","461aedcc.hHgoGBmD.js","assets/ShopPayCheckout.CDRlDVu0.css","56bd1136.D2dAjA3P.js","8536083a.K1vafffH.js","assets/WalletSandbox.BoV0vp4z.css","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]);
2import{ag as Vo,r as lt,L as jP,M as KP,g as w,q as R,T as V,A as U,h as F,f as ht,l as oe,_ as Mt,af as kf,ai as JP,u as s,b8 as XP,e as we,x as Pe,a2 as If,X as Ge,S as G,i as Y,D as Ke,G as _n,F as kt,p as ze,y as le,d as He,Q as Qn,k as ve,$ as QP,n as rn,m as Je,a as sn,o as Pd,a1 as ZP,R as eS,a4 as Sd,N as tS,j as _l,a0 as nS,V as Af,b9 as Tf,ba as rS,bb as oS,O as iS,bc as sS,au as fs,W as $t,s as Zn,Y as aS,Z as lS,bd as cS,be as uS,b6 as Dt,bf as dS,at as pS,bg as mS}from"./2c1ab0fe.BqEHHmaW.js";import{kD as fr,e1 as bl,hq as Tn,gC as hs,mG as fS,cU as Uo,af as mt,aM as Ht,O as b,aq as Ft,G as Ve,mH as wf,dd as Lf,f as Hr,V as Kn,e2 as xf,aD as Rf,a7 as Xe,P as q,mI as sc,eC as yr,da as Jn,cu as Zi,d3 as Mf,gJ as Nf,b5 as gs,b4 as es,N as bt,d0 as hr,cY as hS,cX as xo,d1 as Ed,d2 as Df,cT as Of,mJ as ac,mK as gS,mL as _r,ez as Ff,m5 as Wn,mM as lc,mN as yS,di as vS,fV as er,jb as _S,Q as ie,aE as ni,aB as cc,mO as bS,jJ as PS,mP as SS,mQ as ES,aT as Nt,mR as Cd,dV as kd,mS as Id,mT as Ad,mU as Td,d_ as wd,dZ as Ld,dY as xd,dX as Rd,mV as CS,eP as ko,lJ as uc,gt as ys,mW as Bf,mX as Vf,lK as ts,ba as Bn,bz as Uf,lE as kS,gk as IS,d7 as AS,gl as Md,eb as Ai,mY as TS,mZ as wS,m_ as LS,m$ as xS,n0 as RS,bp as ri,kT as MS,bg as NS,bd as DS,be as hn,n1 as zf,ed as Hf,n as Qr,e5 as dc,ae as wt,fb as OS,X as Pt,bZ as FS,ab as Jt,cc as pc,bC as qf,gP as BS,gN as VS,E as Pl,n2 as US,D as zS,mB as HS,km as qS,cp as Sl,n3 as GS,n4 as WS,bi as zo,n5 as $S,n6 as YS,n7 as Gf,n8 as jS,n9 as KS,kU as Wf,es as $f,er as mc,j0 as Yf,eo as JS,na as XS,eq as QS,nb as ZS,ep as eE,fm as vs,hw as Ho,hz as tE,hv as nE,a_ as br,nc as Nd,cr as Dd,a6 as We,lk as _s,bb as qe,hu as jf,nd as rE,aH as Kf,lw as oE,fi as El,_ as Te,u as fc,mk as Jf,hC as iE,am as sE,hD as aE,aX as lE,ne as cE,nf as hc,ng as Xf,kH as Qf,j_ as uE,nh as dE,cE as pE,hh as Zf,ni as mE,nj as fE,w as oi,nk as hE,nl as gE,nm as yE,nn as vE,no as _E,gf as bE,np as PE,hX as eh,nq as SE,nr as EE,ns as Od,nt as CE,ei as th,nu as kE,nv as IE,v as nh,em as AE,i8 as rh,l8 as TE,nw as wE,la as LE,ld as Fd,n
2x as xE,lc as RE,ny as ME,nz as NE,nA as DE,nB as OE,nC as FE,ii as BE,kZ as oh,l0 as ih,l7 as VE,nD as UE,nE as sh,nF as zE,iM as HE,aN as qE,ai as GE,g as WE,b0 as st,aa as $E,kk as YE,ek as Zr,iv as ah,ie as lh,cS as gc,k9 as yc,nG as jE,o as KE,by as ch,iJ as JE,iL as ns,iI as XE,bB as zi,fK as uh,lz as dh,ly as ph,fO as mh,fL as fh,lA as hh,lU as Cl,d9 as QE,eM as Vn,bx as qt,bk as gh,cL as ZE,nH as eC,kF as tC,nI as nC,et as rC,hn as oC,nJ as iC,nK as sC,nL as xr,nM as aC,nN as lC,nO as cC,dD as qr,nP as kl,nQ as uC,nR as dC,nS as pC,nT as mC,nU as fC,nV as Wt,nW as yh,ff as vh,nX as hC,nY as gC,ma as yC,eS as _h,m9 as vC,mb as _C,nZ as bC,bl as PC,n_ as SC,n$ as EC,o0 as CC,o1 as Bd,ar as $n,o2 as kC,jt as IC,ju as Vd,d as AC,js as ir,h0 as vc,hk as _c,o3 as TC,o4 as wC,x as bc,cD as Pc,a8 as LC,fx as xC,fy as bh,lo as RC,jP as bs,fz as Ph,gH as MC,bY as Hi,hm as NC,C as DC,o5 as OC,gE as FC,ak as BC,o6 as VC,lL as UC,aZ as Sc,hx as zC,o7 as HC,o8 as qC,o9 as GC,W as WC,oa as $C,ob as YC,oc as Ps,od as jC,j9 as KC,oe as JC,gs as XC,gu as Ss,of as QC,iz as ZC,og as Il,oh as ek,oi as Sh,dK as tk,hd as Eh,dn as Al,ky as Ch,oj as nk,ex as Ec,iX as Ud,k7 as rk,d4 as ok,aU as Cc,ok as ik,ol as sk,om as ak,cG as kh,dB as lk,i as rs,on as ck,H as uk,j5 as dk,e as qi,oo as pk,op as mk,j8 as zd,cN as Hd,kq as fk,jO as kc,b$ as ii,aJ as Ih,dM as hk,dN as gk,d6 as si,aQ as yk,oq as vk,ck as Ic,or as Ah,ce as _k,kY as bk,os as Pk,co as Sk,bh as Ek,bj as Ck,f3 as kk,aK as Ac,bL as Ik,bD as Ak,bJ as Es,jf as Tk,mr as wk,i7 as Lk,ot as xk,z as Th,ou as Rk,e$ as wh,i3 as Mk,ov as Lh,at as Nk,as as go,av as Dk,aw as Ok,ow as Fk,A as Tl,ox as Bk,oy as Vk,oz as xh,d$ as eo,oA as Rh,dT as Cs,oB as Uk,de as Mh,j4 as zk,oC as Hk,gz as qk,oD as Gk,oE as Nh,ci as Wk,jz as $k,jB as wl,he as Yk,mq as jk,dS as Kk,e3 as Jk,h4 as Xk,dR as Dh,dQ as Qk,ca as Zk,eh as eI,e4 as Tc,oF as Oh,hl as tI,cF as Fh,hs as Bh,jm as nI,oG as rI,jZ as oI,oH as Vh,oI as iI,oJ as sI,cR as aI,k0 as Uh,oK as lI,jM as cI,oL as zh,ln as uI,lm as dI,hi as pI,hj as mI,oM as fI,oN as hI,oO as gI,oP as yI,ho as vI,gF as _I,cg as bI,br as qd,gD as PI,j1 as SI,j6 as Hh,ac as EI,gV as CI,gO as Gd,oQ as kI,oR as II,oS as AI,oT as TI,oU as wI,oV as LI,eX as xI,oW as qh,oX as RI,oY as MI,fh as NI,hy as DI,y as OI,a9 as FI,l9 as Gh,oZ as BI,je as Wh,fq as VI,cK as UI,T as $h,o_ as zI,b_ as HI,dA as qI,kR as ma,jh as Wd,ji as $d,a$ as GI,g2 as WI,j$ as $I,o$ as os,lH as YI,lv as jI,f6 as KI,p0 as JI,p1 as XI,p2 as QI,p3 as ZI,kz as eA,fX as tA,fj as nA,p4 as rA}from"./4c290a1e.FJVsH4yi.js";import{S as Pn,h as dr,_ as Be,o as oA,J as iA,P as sA,w as Yh,O as aA,i as lA,e as cA,t as uA,q as dA,v as fa,r as pA,u as ha,x as jh,y as mA,z as fA,B as hA}from"./app.D2gvVyTR.js";import{i as to,d as Kh,a as wc,c as gA,s as yA,f as Jh,j as vA,I as Lc,k as _A,e as bA}from"./65f3d4da.BdKZt11Z.js";import{i as PA,h as qo,r as SA,j as EA,k as CA,f as Xh,l as kA,m as IA,A as AA}from"./60a453ce.BClq-svk.js";import{d as TA,i as Go,c as Ll,b as wA}from"./0a7dffce.BHf0S_6c.js";import{d as ga}from"./bb728e1c.uhKc-SJ5.js";function xl(e){return`${Qh(e)}:::${e.message}`}function ks(e){return Qh(e)}function Qh(e){return e.cause&&typeof e.cause=="object"&&"code"in e.cause?`${e.name}::${e.cause.code}`:e.cause&&typeof e.cause=="object"&&"name"in e.cause?`${e.name}::${e.cause.name}`:e.name}class Zh extends Pn{constructor(){super(...arguments),this.name="CheckoutProfileChangeError"}}class Ro extends Pn{constructor(){super(...arguments),this.name="CheckoutProfileQueryMissingData"}}class LA extends Pn{constructor(){super(...arguments),this.name="CheckoutProfileQueryFetchError",this.unactionable=!0}}async function xc(e,t){const{trigger:n,profileRequest:r,graphql:o,extensibility:i,configuration:a,observability:l,userEvents:c,telemetryContext:u,isActive:d}=t,p=d??(()=>!0),m=performance.now(),f=Date.now(),h={hasFinalized:!1},g=()=>{h.hasFinalized||(h.hasFinalized=!0,e())},y=a.profileId.value,_=r?.id,P=(L,M)=>{if(g(),y&&_&&_!==y){A({status:"superseded",activeCheckoutProfileId:a.profileId.value,stage:L,error:M});return}l.debug("checkout_profile_change","[CheckoutProfileChange]: Checkout profile change not applied due to isActive returning false",{configurationRecordId:_,stage:L})};if(u?.source?.type==="simulated"){g();return}if(!p())return P("before_fetch");if(!r?.id){g();return}const v=r,{requireBusinessCriticalOnly:E}=v,C=a.profileKey.peek();if(C&&Vo(fr,C)===Vo(fr,v)){g();return}const S=_!==y,I=S?void 0:a.getProfile(v);try{let L,M;if(I)L=I;else{const O=await lt(async()=>{const{data:D,error:B}
2=await o.staticQuery(fr,{variables:v,cache:!0});if(B)throw B;if(!D)throw new Ro("Checkout profile query returned no data");if(!D.checkoutProfile)throw new Ro("Checkout profile query returned no checkout profile data");if(S&&!D.shop)throw new Ro("Checkout profile query returned no shop data");return D},{maxAttempts:3,shouldRetry:()=>!E&&p()});L=O.checkoutProfile,M=O.shop}return p()?()=>{try{if(!p()){P("before_apply");return}const O=L.activatedExtensions,{removed:D,kept:B}=xA(i,O);g();const z=X=>X.capabilities.blockProgress&&X.behaviors.value.blockProgress,x=B.filter(z),W=D.filter(z);i.ui.replace({activatedExtensions:O},{keepAlive:!1,reason:"checkout_profile_change"}),n==="negotiation"&&(x.length>0||W.length>0)&&(l.leaveErrorBreadcrumb("[CheckoutProfileChange] Running negotiation interceptors",{identifier:"checkout_profile_configuration_change",reason:"Blocking UI extension removed/updated. Validation errors will be updated, but interceptor behavior (block/allow) will be ignored.",removedBlockingExtensions:Yd(W),updatedBlockingExtensions:Yd(x)}),t.runInterceptors({negotiationStage:"negotiation",skipEffects:!1}).then(X=>{p()&&(t.validationErrors.value=X.errors)}).catch(X=>{l.error(new Zh("Error occurred while running interceptors after checkout profile change",{cause:X}))})),a.update({profile:L,requireBusinessCriticalOnly:E,...S&&M?{themeData:M,addressSettings:{shopConfig:M}}:{}}),T()}catch(O){k(O)}}:P("after_fetch")}catch(L){if(!p())return P("fetch_failed",ya(L));if(E){n!=="initialization"&&l.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:n,reason:"query_failure"}});const M=ya(L);return l.error(M),l.leaveErrorBreadcrumb("[CheckoutProfileChange] Loading unrestricted profile after restricted query failure",{checkoutProfileId:_}),xc(g,{...t,profileRequest:{...r,requireBusinessCriticalOnly:!1}})}k(L)}function k(L){const M=ya(L);g(),l.error(M),A({status:"error",error:M})}function T(){A({status:"success"})}function A({status:L,error:M,activeCheckoutProfileId:N,stage:O}){n!=="initialization"&&(RA({observability:l,userEvents:c,...u},{startTime:m,startTimestamp:f,previousCheckoutProfileId:y,checkoutProfileId:_,activeCheckoutProfileId:N,trigger:n,status:L,stage:O,error:M}),L!=="superseded"&&l.debug("checkout_profile_change",`[CheckoutProfileChange] ${M?"Failed to update":"Updated"} checkout profile`,{trigger:n,previousCheckoutProfileId:y,checkoutProfileId:_,error:M?ks(M):void 0}))}}function xA(e,t){const n=e.ui.search().peek().filter(a=>a.type==="persisted"),r=new Set(t.flatMap(a=>a.targets.map(l=>l.publicIdentifier))),o=n.filter(a=>!r.has(a.targetPublicIdentifier));o.length>0&&e.ui.remove(o.map(a=>a.targetPublicIdentifier),{keepAlive:!1,reason:"checkout_profile_change"});const i=e.ui.search().peek().filter(a=>a.type==="persisted");return{removed:o,kept:i}}function ya(e){return e instanceof jP||e instanceof KP?new LA("Could not complete checkout profile change, could not query checkout profile",{cause:e}):new Zh("Could not complete checkout profile change",{cause:e})}function RA(e,t){const{startTime:n,startTimestamp:r,previousCheckoutProfileId:o,checkoutProfileId:i,activeCheckoutProfileId:a,trigger:l,status:c,stage:u,error:d}=t,p=Math.round(performance.now()-n),{observability:m,userEvents:f,source:h,shop:g,sessionToken:y,current:_}=e,P=h.checkoutSessionIdentifier??"",v=g.id,E=_.fields.buyerIdentity.peek()?.customerProfile?.id,C=bl(i),S=bl(o),I=d?xl(d):void 0,k=d?ks(d):void 0,T=Intl.DateTimeFormat().resolvedOptions().timeZone;c!=="superseded"&&f.monorailEvent({schemaId:"checkout_c1_profile_configuration_change_events/1.0",payload:{eventName:"checkout_profile_configuration_change",eventType:i===o?"business_critical_filter":"checkout_profile_markets_interaction",frontendEventTimestampEpochMs:r,frontendEventTimeZone:T,checkoutToken:P,shopId:v,customerId:E,sessionToken:y,checkoutProfileId:C,previousCheckoutProfileId:S,frontendEventsTimeDifferenceMs:p,errors:I?[I]:void 0}}),m.histogram({name:"checkout_profile_configuration_change",value:p,attributes:{trigger:l,status:c,error:k}});const A={previousCheckoutProfileId:o,checkoutProfileId:i,...a?{activeCheckoutProfileId:a}:{},trigger:l,duration:p,status:c,...u?{stage:u}:{},error:k},L=c==="superseded"?`Checkout profile change to ${i} superseded; active profile is ${a??"none"}`:`Checkout profile changed from ${o} to ${i}`;m.log("checkout_profile_configuration_change",L,A),m.leaveErrorBreadcrumb("[CheckoutProfileChange] Checkout profile change event recorded",{identifier:"checkout_profile_configuration_change",...A})}function Yd(e){return e.map(({id:t,name:n,appName:r,extensionPoint:{target:o}})=>({id:t,name:n,appName:r,target:o}))}function MA({checkout:e,shop:t,profileId:n=e.configuration.profileId.peek()}
2){if(!n)return;const r=e.latestReceipt.peek(),o=e.wallets.escalatedWallet.peek(),a=e.configuration.layout.baseName==="three-page"&&(!r||r.status==="failed"||r.status==="abandoned")&&(o==="APPLE_PAY"&&t.hasFlagEnabled(Tn)||o==="GOOGLE_PAY"&&t.hasFlagEnabled(hs));return{id:n,requireBusinessCriticalOnly:a}}async function NA(e,{loadFrom:t,onQuerySettled:n}){const r=MA(e);if(!r?.requireBusinessCriticalOnly)return;const o=Vo(fr,r),i=e.checkout.configuration.getProfile({...r,requireBusinessCriticalOnly:!1});try{let l=t==="serialized-cache"?await jd(e.graphql.coreGraphql,r):void 0;if(t==="serialized-cache"&&!l){Kd(e.checkout.configuration.profileKey.peek(),{...r,requireBusinessCriticalOnly:!1}),a("missing_cached_profile");return}(await xc(()=>{},{trigger:"initialization",profileRequest:r,graphql:e.graphql.coreGraphql,configuration:e.checkout.configuration,extensibility:e.checkout.extensibility,observability:e.observability,userEvents:e.userEvents,telemetryContext:{source:e.source,shop:e.shop,sessionToken:e.client.unstable_getSerialization("sessionToken")??"",current:e.checkout.proposal.negotiated}}))?.(),l??=await jd(e.graphql.coreGraphql,r),Kd(e.checkout.configuration.profileKey.peek(),{...r,requireBusinessCriticalOnly:!!l}),l||a("query_failure")}catch(l){if(e.graphql.coreGraphql.cache.delete(o),va(e.observability,l),i){a("preparation_failure");try{e.checkout.extensibility.ui.replace({activatedExtensions:i.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){va(e.observability,c)}try{e.checkout.configuration.update({profile:i,requireBusinessCriticalOnly:!1})}catch(c){va(e.observability,c)}}}finally{n?.(o)}function a(l){e.source.type!=="simulated"&&e.observability.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:"initialization",reason:l}})}}function va(e,t){e.error(t instanceof Error?t:new Ro("Required checkout profile could not be loaded",{cause:t}))}async function jd(e,t){const{data:n}=await e.staticQuery(fr,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function Kd(e,t){if(!e||Vo(fr,e)!==Vo(fr,t))throw new Ro("Required checkout profile could not be loaded")}function Rc(e){const t=fS();return DA(e,t)}function vr(e){if(typeof e!="object"||!e)return!1;let t=!1;for(const n of Object.keys(e))if(n in Uo)t=!0;else return!1;return t}function DA(e,t){if(!t)return;if(e[t]!==void 0)return e[t];const n=Object.keys(Uo),r=n.indexOf(t);for(let o=r;o>=0;o--){const i=n[o];if(e[i]!==void 0)return e[i]}}function OA(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}function FA(e){return!!(e.analyticsProcessingAllowed||e.marketingAllowed)}const eg=mt("JourneyContext"),Mc=mt("JourneyProgressionContext");function Se(){const{journeyState:e,pageBeforeDetour:t,...n}=Ht(eg),{router:r}=b();return w(()=>{const o=r.currentUrl.value.normalizedPath,{plan:i,history:a,redirectTo:l}=e.value,c=i.detours.find(m=>m.route===o),u=i.greenPath.find(m=>m.route===o),d=t.value;return{...n,plan:i,currentPage:u??d,currentDetour:c,history:a,redirectTo:l,journeyState:e}})}function Lt(){const e=Ht(Mc),{detour:t,progress:n,progressing:r,completing:o,prefetch:i,negotiate:a}=e,l=R(c=>a({identifier:Symbol("journeyNegotiation"),...c}),[a]);return V(()=>({detour:t,progress:n,progressing:r,completing:o,prefetch:i,negotiate:l}),[t,n,r,o,i,l])}function tr(e){const t=Ft(),n=U(e);n.current=e,F(()=>t.listen((...r)=>n.current(...r)),[t])}function tg(e){const t=Ft(),n=U(e);n.current=e,F(()=>t.listenBeforeNegotiation((...r)=>n.current(...r)),[t])}function j7({active:e=!0}={}){const t=Ft();F(()=>{if(e)return t.block()},[t,e])}const Jd=["information","shipping","payment","review"];function BA(){const{router:e}=b(),{plan:t}=Se().value;F(()=>e.beforeNavigate((n,r)=>{const o=t.greenPath.find(u=>u.route===n.normalizedPath),i=t.greenPath.find(u=>r.pathname.endsWith(u.route));if(!o||!i)return{};if(!Jd.includes(o.id)||!Jd.includes(i.id))return{};const a=t.greenPath.indexOf(o),c=t.greenPath.indexOf(i)>a?["page-slide-end"]:["page-slide-start"];return dr(()=>{},c),{}}),[e,t.greenPath])}function no(){const e=b().checkout.latestReceipt.value;return e?.status==="processed"?e:void 0}function VA(){const e=no(),t=Se(),n=U(!1),r=R(()=>(n.current=!0,n),[n]);return{shouldPrevent:R(()=>
2{if(n.current)return!0;const i=t.value.currentDetour?.type==="postPurchase";return!e||!!e.redirectUrl&&!i},[e,t]),markAsEmitted:r}}function UA(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:bl(t.orderIdentity.id)}})}function zA(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 HA={thankYou:"c1_typ",postPurchase:"post_purchase"};function qA(e,t){const n=e.find(r=>r.route===t);return n?HA[n.type]??"unknown":"unknown"}function GA(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"}function K7(e,t,n){const r=[e.split(/(?=[A-Z])/).join("-")];return n?r.push(n):r.push(t?t.replace("_","-"):""),r.filter(o=>!!o).join("-").toLocaleLowerCase()}function ai(e){return e.checkoutSessionIdentifier}function WA(){return{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+|)/}}function $A({shopAppDomain:e,isNativeShopApp:t,isCheckoutKit:n,isSdkSurface:r}){let o=n?"checkout-kit":"checkout-one";return r&&(o+="-sdk"),t?o+="-native-shop-app":e&&(o+="-shop-app"),o}function YA(){const{modern:e,legacy:t}=WA(),n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}function ng(e){return e||void 0}function Gr(e){return e?Ve(e):void 0}function jA(e){const t=e?.customerProfile;if(!t)return;const n=Ve(t.id),r=t.email??null,o=t.firstName??null,i=t.lastName??null,a=t.phone??null,l=t.ordersCount??null;return{id:n,email:r,firstName:o,lastName:i,ordersCount:l,phone:a}}function KA({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,o=e.current.fields.remoteMerchandiseDetails?.value,i=r?xf(r.lines,o):void 0,a=eT(t.currencyCode,i),l=e.current.fields.customAttributes.value??[],u=["cartNext","abandonedCart"].includes(n.type)?n.sourceId:null;let d=0,p=0,m=t.currencyCode;(i?.flatMap(g=>g.lineAllocations)||[]).forEach(g=>{p+=g.totalAmountAfterDiscounts.amount,d+=g.quantity,m=g.totalAmountAfterDiscounts.currencyCode});const h={totalAmount:Nc(p,m)};return{id:u,cost:h,lines:a,totalQuantity:d,attributes:l}}function JA({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function XA(e){const t=e?.purchasingCompany;if(t)return{company:{id:t.company.id,externalId:t.company.externalId??null,
2name:t.company.name},location:{id:t.location.id,externalId:t.location.externalId??null,name:t.location.name}}}function QA(){const e=Xe(),{shop:t,source:n}=b();return ht(()=>{const r=e.current.fields.buyerIdentity.value;return{cart:KA({negotiated:e,shop:t,source:n}),customer:jA(r),shop:JA({shop:t}),purchasingCompany:XA(r)}})}function ZA(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function rg(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:oT(e.targetType),title:e.title,type:ZA(e),value:iT(e,t)}}function og(e){const t=[];return e.forEach(n=>{n.allocations.forEach(r=>{const o=r.discountDetails.discount;Kh(o)&&t.push({amount:r.amount,discountApplication:rg(o,r.amount)})})}),t}function eT(e,t){return t?t.map(n=>{const r=Hr(n.variantId??void 0),o=nT(n.lineAllocations),i=n.itemPrice?n.itemPrice:{amount:0,currencyCode:e},a={id:r??null,image:{src:n.image?.url??null},price:i,product:{id:Hr(n.productId??void 0)??null,title:n.title,untranslatedTitle:n.untranslatedTitle??null,url:n.productUrl??null,vendor:n.vendor,type:n.productType},sku:n.sku??null,title:n.subtitle??null,untranslatedTitle:n.untranslatedSubtitle??null};return{cost:o,merchandise:a,quantity:n.quantity}}):[]}function tT(e,t,n){return Dc(e,n).map(o=>{const i=Gr(o.variantId),a=o.itemPrice?o.itemPrice:{amount:0,currencyCode:t};return{...{discountAllocations:og(o.lineAllocations),id:i??null,quantity:o.quantity,title:o.title,variant:{id:i??null,image:{src:o.image?.url??null},price:a,product:{id:Gr(o.productId)??null,title:o.title,vendor:o.vendor,type:o.productType,untranslatedTitle:o.untranslatedTitle??null,url:o.productUrl??null},sku:ng(o.sku)??null,title:o.subtitle??null,untranslatedTitle:o.untranslatedSubtitle??null},finalLinePrice:ig(o.lineAllocations),sellingPlanAllocation:sg(o),properties:ag(o.properties)},lineComponents:o.lineComponents.map(c=>hT(c,t))}})}function ig(e){const t=e.reduce((n,r)=>n+r.totalAmountAfterLineDiscounts.amount,0);return Nc(t,e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function nT(e){const t=e.reduce((n,r)=>n+r.totalAmountAfterLineDiscounts.amount,0);return{totalAmount:Nc(t,e[0]?.totalAmountAfterLineDiscounts.currencyCode)}}function Nc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function sg(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function ag(e){return e.map(t=>({key:t.name,value:String(t.value)}))}function rT(e,t,n,r){let o={amount:0,currencyCode:t};const i=e.current.fields.deliveryNext.value??r?.purchaseOrder?.deliveryNext;if(i?.status==="filled"){const a=e.current.fields.remoteMerchandiseDetails?.value??r?.remoteMerchandiseDetails,l=wf(i.lines,a),c=[];l.forEach(d=>{if(d.status==="available"){const p=d.selectedDeliveryMethodHandle;if(p){const m=d.methods.filter(f=>f.handle===p&&f.costAfterDiscounts!==void 0);c.push(...m.map(f=>({line:d,method:f})))}}});const u=n?Lf(c,({method:d})=>d.cost.amount,({method:d,line:p})=>p.type==="ONE_TIME_PURCHASE"?Rf(d):void 0):new Set;o=c.reduce((d,{method:p},m)=>u.has(m)?d:{amount:d.amount+p.costAfterDiscounts.amount,currencyCode:p.costAfterDiscounts.currencyCode},o)}return o}function oT(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function iT(e,t){const n=e.value;return n.typename==="FixedAmountValue"?t:{percentage:n.percentage}}function sT(e,t,n){const r=e.current.fields.paymentLines.value?.lines,o=(r?.length?r:void 0)??n?.purchaseOrder?.paymentLines,i=[];return o?.forEach(a=>{if(!a.cost)return;let l=t||"",c="";switch(a.method.type){case"direct":case Kn.CreditCard:c=a.method.brand||"";break;case"deferred":c=a.method.displayName||"";break;case"redeemable":l="",c=a.method.redemptionSource;break;case"giftCard":l="gift_card",c="";break;case Kn.PayPal:case"bank":case"noop":case"paymentOnDelivery":case"other":case"shopWallet":c="";break;default:c=a.method.name;break}i.push({amount:{amount:a.cost.amount,currencyCode:a.cost.currencyCode},gateway:l,paymentMethod:{type:GA(a.method.type),name:c}})}),i}function aT(e,t,n){const r=e.current.fields.buyerIdentity.value??n?.buyerIdentity;return{country:{isoCode:r?.countryCode??null},language:{isoCode:t}
2,market:{id:r?.market?.id??null,handle:r?.market?.handle??null}}}function Xd(e,t,n,r){const o=r?.[e]===!0,i=n?.[e]&&n[e].value===!0,a=t.current.fields[e]?.value===!0;return o||i||a||!1}function lT(e,t){const n=new Map;return Dc(e,t).forEach(r=>{Qd(n,r),r.lineComponents.forEach(o=>Qd(n,o))}),n}function cT(e,t,{componentStableIdsByParent:n,parentStableIdByComponent:r}){const{targetMerchandiseLines:o}=e;if(!o)return;const i=new Set(o.map(c=>c.stableId)),a=[],l=new Set;return o.forEach(c=>{const u=r.get(c.stableId);if(u===void 0){const h=t.get(c.stableId);h!==void 0&&a.push(h);return}const p=(n.get(u)??[]).every(h=>i.has(h)),m=t.get(u);if(p&&m!==void 0){l.has(u)||(a.push(m),l.add(u));return}const f=t.get(c.stableId);f!==void 0&&a.push(f)}),a}function uT(e,t,n,r,o,i=!1){const a=n?.purchaseOrder?.deliveryNext||e.current.fields.deliveryNext.value;if(a?.status!=="filled")return[];const l=e.current.fields.remoteMerchandiseDetails?.value??n?.remoteMerchandiseDetails,c=wf(a.lines,l),d=(t?.deliveryLines?.value??[]).map(f=>f.fields.deliveryMethodHandle?.value).filter(Boolean),p=c.filter(f=>f.status==="available").map(f=>f).flatMap(f=>n?f.methods.map(h=>({method:h,availableDeliveryLine:f})):d.length>0?f.methods.filter(h=>d.includes(h.handle)).map(h=>({method:h,availableDeliveryLine:f})):[]),m=i?Lf(p,({method:f})=>f.cost.amount,({method:f,availableDeliveryLine:h})=>h.type==="ONE_TIME_PURCHASE"?Rf(f):void 0):new Set;return p.map(({method:f,availableDeliveryLine:h},g)=>dT(f,r&&o?cT(h,r,o):void 0,m.has(g))).filter(Boolean)}function dT(e,t,n){let r,o=e.cost,i=n?{...e.costAfterDiscounts,amount:0}:e.costAfterDiscounts;switch(e.methodType){case"PICK_UP":r="pickup",o=null,i=null;break;case"PICKUP_POINT":r="pickupPoint";break;case"SHIPPING":r="shipping";break;case"LOCAL":r="local";break;default:return}return{cost:o,costAfterDiscounts:i,description:e.description||null,handle:e.handle,title:e.title||null,type:r,...t===void 0?{}:{targetLineItems:t}}}function pT(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((o,i)=>{if(to(i)){const a=i.amount;if(!a)return o;o.push(rg(i.discount,a))}return o},[]):[]}function mT({orderId:e,customerId:t,isFirstOrder:n}){const r={id:Hr(t)??t??null,isFirstOrder:n??null};return{id:Hr(e)??e??null,customer:r}}function Gi({negotiated:e,source:t,orderId:n,customerId:r,isFirstOrder:o,proposedParts:i,receipt:a,locale:l,shopCurrencyCode:c,marketDrivenShippingEnabled:u=!1}){const d=e.current.fields.contactInfo.value,p=Gr(ai(t))??null,m=i?i.email.value:d?.email||a?.purchaseOrder?.email||null,f=i?i.phone.value:d?.phone||a?.purchaseOrder?.phone||null,h=e.current.fields.subtotalAfterMerchandiseDiscounts.value??a?.subtotalAfterMerchandiseDiscounts??null,g=e.current.fields.runningTotal.value??a?.checkoutTotal??null,y=g?.currencyCode??c??null,_=tT(e,c,a),P={selectedDeliveryOptions:uT(e,i,a,lT(e,a),gT(e,a),u)},v=!!m&&Xd("acceptEmailMarketing",e,i,a),E=Xd("acceptSmsMarketing",e,i,a),C=a?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let S=!1;a?S=!!E:S=E&&!!C;const I=S&&C||null,k=pT(e,a),T=a?.totalSavings||e?.current?.fields?.totalSavings.value||null,A=zA(e)||a?.checkoutTotalTaxes||{amount:0,currencyCode:c},L=rT(e,c,u,a),M=i?i.shippingAddress.value:e.current.fields.shippingAddress.value??a?.purchaseOrder?.shippingAddress,N={address1:M?.address1||null,address2:M?.address2||null,city:M?.city||null,country:M?.countryCode||null,countryCode:M?.countryCode||null,firstName:M?.firstName||null,lastName:M?.lastName||null,phone:M?.phone||null,province:M?.zoneCode||null,provinceCode:M?.zoneCode||null,zip:M?.postalCode||null},O=i?i.billingAddress.value:e.current.fields.billingAddress.value??a?.purchaseOrder?.billingAddress,D={address1:O?.address1||null,address2:O?.address2||null,city:O?.city||null,country:O?.countryCode||null,countryCode:O?.countryCode||null,firstName:O?.firstName||null,lastName:O?.lastName||null,phone:O?.phone||null,province:O?.zoneCode||null,provinceCode:O?.zoneCode||null,zip:O?.postalCode||null},B=mT({orderId:n,customerId:r,isFirstOrder:o}),z=e.current.fields.customAttributes.value,x=(z?.length?z:void 0)??a?.customAttributes??[],W=sT(e,a?.paymentDetails?.paymentGateway||void 0,a),X=aT(e,l,a);return{buyerAcceptsEmailMarketing:v,buyerAcceptsSmsMarketing:S,attributes:x,billingAddress:D,token:p,currencyCode:y,discountApplications:k,discountsAmount:T,email:m,phone:f,lineItems:_,localization:X,order:B,delivery:P,shippingAddress:N,subtotalPrice:h,shippingLine:{price:L},smsMarketingPhone:I,totalTax:A,totalPrice:g,transactions:W}}function fT(e){return{...e,value:"<redacted>"}}function Dc(e,t){const n=e.current.fields.merchandiseLines.value,r=(n?.lines?.length?n:void 0)??t?.purchaseOrder?.merchandiseLines,o=e.current.fields.remoteMerchandiseDetails?.value??t?.remoteMerchandiseDetails;return r?.lines?.length?xf(r.lines,o):[]}function Qd(e,t){const n=Gr(t.variantId);n!==void 0&&e.set(t.stableId,n)}function hT(e,t){const n=Gr(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:og(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:Gr(e.productId)??null,title:e.title,vendor:e.vend
2or,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:ng(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:ig(e.lineAllocations),sellingPlanAllocation:sg(e),properties:ag(e.properties)}}function gT(e,t){const n=new Map,r=new Map;return Dc(e,t).forEach(o=>{o.lineComponents.length!==0&&(n.set(o.stableId,o.lineComponents.map(i=>i.stableId)),o.lineComponents.forEach(i=>{r.set(i.stableId,o.stableId)}))}),{componentStableIdsByParent:n,parentStableIdByComponent:r}}const yT={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function vT(e){return e in yT}function lg(e){if(!vT(e.type))return!1;switch(e.type){case"sectionComplete":return e.section==="contact"||e.section==="deliveryAddress";case"pageSubmit":return e.step==="shipping";case"shippingMethodsFilled":case"shippingMethodSelected":return e.step==="onePage"}}function _T(e,t){if(lg(e))return Gi(t)}function Sn(){const e=q().buyerIdentity;return w(()=>{const t=e.value?.customerProfile;return!!(t?.__typename==="BusinessCustomerProfile"&&t?.checkoutExperienceConfiguration?.editableShippingAddress)})}function Un(){const[e,t]=oe(!1);return Mt(()=>{t(bT())},[]),F(()=>{if(typeof window>"u")return;const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addListener(r),()=>{n.removeListener(r)}},[]),e}function bT(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function tt(e){return t=>`${e}${t}`}function PT(e){return e.replace(/:/g,"")}function Ye(e,t){const n=PT(kf());return e??t(n)}const ro="PortalHost",cg="data-portal-order";function ug(e){e.setAttribute(cg,String(performance.now()))}function dg(e){let t=null,n=-1;for(let r=e?.firstElementChild??null;r;r=r.nextElementSibling){if(r.firstElementChild?.getAttribute("data-popper-hidden")==="true")continue;const o=Number(r.getAttribute(cg));o>n&&(n=o,t=r)}return t}function J7(e){const t=ST(e),n=dg(document.getElementById(ro));return t.some(r=>r instanceof Node&&n?.contains(r))}function X7(e){return e?dg(document.getElementById(ro))?.contains(e)??!1:!1}function Q7(e){return e?document.getElementById(ro)?.contains(e)??!1:!1}function ST(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}const ET=tt("Portal");function CT(){return s("div",{id:ro})}function Pr({children:e}){const[t,n]=oe(null),r=Ye(void 0,ET);return F(()=>{const o=document.getElementById(ro)??document.body,i=document.createElement("div");return i.setAttribute("id",r),ug(i),o.appendChild(i),n(i),()=>{o.removeChild(i)}},[r]),t&&JP(e,t)}var kT="_1rnsrjf0 _1fragem6y";const IT="checkout-web-ui:sprite-load-error";class pg extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash=IT}}function AT(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]}}function mg(e,t){return new pg(`Failed to fetch sprite "${AT(e)}": ${t}`)}function _a(e,t){if(t instanceof pg)return t;const n=t instanceof Error?t.message:String(t);return mg(e,n)}const Zd={errorClass:"SpriteLoadError",severity:"warning"};function TT(e){const t=e.indexOf("#");return t===-1?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}class wT{#e=new Map;#t=new Set;ensureFetched(t){const n=this.#e.get(t);if(n?.status==="resolved")return n.content;throw n?.status==="rejected"?n.error:n?.status==="pending"?n.promise:this.#r(t)}reportLoadFailure(t,n,r){if(!(r==null||this.#t.has(t))){if(this.#t.add(t),n instanceof Promise){n.catch(o=>{r.error(_a(t,o),Zd)});return}r.error(_a(t,n),Zd)}}#r(t){const n=fetch(t).then(r=>{if(!r.ok)throw mg(t,`HTTP ${r.status}`);return r.text()}).then(r=>(this.#e.set(t,{status:"resolved",content:r}),r)).catch(r=>{throw this.#e.set(t,{status:"rejected",error:_a(t,r)}),r});return this.#e.set(t,{status:"pending",promise:n}),n}}function fg(e,t){try{return ep.ensureFetched(e)}catch(n){throw ep.reportLoadFailure(e,n,t),n}}const ep=new wT,LT=["cdn.shopify.com"];function xT(e,t){let n;try{n=new URL(e)}catch{return t}return t?!0:n.protocol==="https:"&&LT.includes(n.hostname)}const Oc=Ge(null);function RT({children:e,logger:t}){const n=we([]),r=V(()=>{const o=new Set;return{logger:t,sprites:n,embed(i,a){o.has(i)||(o.add(i),n.value=[{url:i,
2content:a},...n.peek()])}}},[t,n]);return s(Oc.Provider,{value:r,children:[e,s(MT,{sprites:n})]})}function MT({sprites:e}){return s("div",{className:kT,"aria-hidden":"true",children:e.value.map(({url:t,content:n})=>s("div",{"data-sprite-url":t,dangerouslySetInnerHTML:{__html:n}},t))})}function NT({iconUrl:e,allowRelativeUrl:t}){const n=we(!1);Mt(()=>{n.value=!0},[n]);const r=Pe(Oc),{spriteUrl:o,symbolId:i}=TT(e);if(!xT(o,t))return console.warn(`[SpriteLoader] Blocked icon load from untrusted URL: ${o}`),null;if(!n.value)return s("span",{"aria-hidden":"true",children:s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true"})});if(i)return s(DT,{spriteUrl:o,symbolId:i});const a=fg(o,r?.logger);return s("span",{dangerouslySetInnerHTML:{__html:a},"aria-hidden":"true"})}function DT({spriteUrl:e,symbolId:t}){const n=Pe(Oc);if(!n)throw new sc("No sprite registry available");const r=fg(e,n.logger);return Mt(()=>{n.embed(e,r)},[n,e,r]),s("span",{"aria-hidden":"true",children:s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:s("use",{href:`#${t}`})})})}let OT=class extends If{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function FT({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return s(OT,{fallback:t,children:s(XP,{fallback:t,children:s(NT,{iconUrl:e,allowRelativeUrl:n})})})}const hg=Ge(void 0);function Fc(){return Pe(hg)}function ln({children:e,level:t}){const n=Fc(),r=t??(n??0)+1;return s(hg.Provider,{value:r,children:e})}const gg=Ge({colorMix:!1,customProperties:!1,flexGap:!1});function BT({children:e}){const t=UT(),n=zT(),r=HT(),o=V(()=>({colorMix:t,customProperties:n,flexGap:r}),[t,n,r]);return s(gg.Provider,{value:o,children:e})}function VT(){return Pe(gg)}function UT(){return V(()=>typeof CSS<"u"&&CSS.supports("color","color-mix(in srgb, red 50%, white)"),[])}function zT(){return V(()=>typeof window>"u"||typeof CSS<"u"&&CSS.supports("color","var(--test)"),[])}function HT(){return V(()=>{if(typeof window>"u"||!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=e.scrollHeight===1;return e.parentNode?.removeChild(e),t},[])}const yg=Ge(null);function qT({children:e}){const[t,n]=oe(new Map),r=R(c=>t.get(c),[t]),o=R(c=>{n(u=>{const d=u.get(c.id);if(d&&!Object.keys(c).some(h=>d[h]!==c[h]))return u;const p=new Map(u);return p.set(c.id,{...d,...c}),p})},[]),i=R(c=>{n(u=>{const d=new Map(u);return d.delete(c),d})},[]),a=R(()=>{n(new Map)},[]),l=V(()=>({getInteraction:r,upsertInteraction:o,deleteInteraction:i,clearInteractions:a}),[a,i,r,o]);return s(yg.Provider,{value:l,children:e})}const vg="forwarding-external-new-window-message",GT="forwarding-new-window-message",WT="forwarding-external-message";function _g({external:e,native:t}){if(e&&t)return vg}const Bc=Ge(null),$T=()=>Pe(Bc),Vc=Ge(void 0),YT=tt("Overlay");function jT({activatorRef:e,children:t}){const n=U(new Map),r=Ye(void 0,YT),[o,i]=oe(()=>r),[a,l]=oe(!1),[c,u]=oe({}),d=V(()=>({activatorRef:e,overlayId:o,setOverlayId:i,attach(p,m){n.current?.set(p,m)},trigger(p,m){n.current?.get(p)?.(m)},active:a,setActive:l,activatorAttributes:c,setActivatorAttributes(p){Object.keys(p).every(f=>c[f]===p[f])||u(f=>({...f,...p}))}}),[e,o,n,a,c]);return s(Vc.Provider,{value:d,children:t})}function Uc({children:e}){return s(Vc.Provider,{value:void 0,children:s(Bc.Provider,{value:null,children:e})})}function nr(){const e=Pe(Vc);if(e)return e}const bg=Ge(void 0),Pg=()=>Pe(bg),e3=()=>{const e=Pg();return V(()=>({closeOverlay(t){e?.close(t)}}),[e])};function KT({children:e}){const t=U(new Map),n=V(()=>({register(r,o){t.current.set(r,o)},unregister(r){t.current.delete(r)},close(r){t.current.get(r)?.close()}}),[t]);return s(bg.Provider,{value:n,children:e})}const Is=Ge(void 0);function JT({children:e}){const t=U({sheet:!1,modal:!1}),n=we(0),r=w(()=>n.value>0),o=V(()=>({isLocked(i){return t.current[i]},lock(i){t.current[i]=!0},unlock(i){t.current[i]=!1},openModalCount:n,isModalOpen:r}),[n,r]);return s(Is.Provider,{value:o,children:e})}function XT(){return Pe(Is)?.isModalOpen}function QT(){return Pe(Is)?.openModalCount}function Sg(e){const t=Pe(Is),[n,r]=oe(!1);return F(()=>()=>{t&&n&&t.unlock(e)},[t,n,e]),V(()=>
2{if(!t)return;const{lock:o,unlock:i,isLocked:a}=t;return{setActive(l){r(c=>(typeof l=="function"?l(c):l)?a(e)&&!n?(console.warn(`Multiple <${e==="modal"?"Modal":"Sheet"} /> components cannot be rendered at the same time`),c):a(e)?c:(o(e),!0):(n&&i(e),!1))},active:n}},[t,n,e])}function ZT(e){const t=nr(),n=Sg(e);return V(()=>{if(!n)return;const{active:r,setActive:o}=n;if(t)return{...t,setActive:o,active:r}},[t,n])}const Eg=Ge(void 0);function ew({announcementEmitter:e,children:t}){return s(Eg.Provider,{value:e,children:t})}function t3(){const e=Pe(Eg);if(!e)throw new sc("Missing AnnouncementContext Context ");return e}var tp={LiveRegion:"_14u2r6s0 _1fragem121"};const tw=1e4;class nw{#e=new Set;#t=new Set;#r=new Map;subscribe(t){return this.#e.add(t),()=>{this.#e.delete(t),this.#e.size===0&&this.#a()}}#i(){this.#e.forEach(t=>t(Array.from(this.#t)))}#a(){this.#t.clear(),this.#r.forEach(t=>{clearTimeout(t)})}announce(t){const n=Array.from(this.#t).find(o=>o.content===t.content&&o.role===t.role);if(n){const o=this.#r.get(n);o&&clearTimeout(o),this.#r.delete(n),this.#t.delete(n)}this.#t.add(t),this.#i();const r=setTimeout(()=>{this.#r.delete(t),this.#t.delete(t),this.#i()},tw);return this.#r.set(t,r),()=>{this.#t.delete(t),clearTimeout(r),this.#r.delete(t),this.#i()}}}const Cg=new nw;function xt({content:e,role:t="status"}){return Cg.announce({content:e,role:t})}function rw(){const[e,t]=oe([]),n=e.filter(o=>o.role==="status"),r=e.filter(o=>o.role==="alert");return F(()=>Cg.subscribe(o=>{t(o)}),[]),s(G,{children:[s("div",{role:"status",className:tp.LiveRegion,children:n.map(({content:o,role:i})=>s("span",{children:o},`${o}-${i}`))}),s("div",{role:"alert",className:tp.LiveRegion,children:r.map(({content:o,role:i})=>s("span",{children:o},`${o}-${i}`))})]})}var ba="rij0560 _1fragem121";const zc=Ge(null);function rr(){const e=Pe(zc);if(e==null)throw new yr("No app context available");return e}function ow(){return Pe(zc)?.redesignedChoiceLists??!1}function n3(){return rr().currency}function un(){return rr().translate}function r3(){return rr().formatNumber}function iw(){return rr().linkComponent}function o3(){return rr().geolocation}function i3(){return rr().locale}function sw(){return rr().editor??!1}function aw(){return rr().inlineIcons}function lw({children:e,currency:t,embed:n,linkComponent:r,geolocation:o,locale:i,onePage:a,editor:l,redesignedChoiceLists:c,translate:u,formatNumber:d,announcementEmitter:p,inlineIcons:m,logger:f}){const h=V(()=>({currency:t,embed:n,formatNumber:d,geolocation:o,linkComponent:r,locale:i,onePage:a,editor:l,redesignedChoiceLists:c,translate:u,inlineIcons:m,logger:f}),[t,n,u,d,r,o,i,a,l,c,m,f]);return s(zc.Provider,{value:h,children:s(ew,{announcementEmitter:p,children:s(BT,{children:s(ln,{children:s(JT,{children:s(KT,{children:s(qT,{children:[s(RT,{logger:f,children:e}),s(cw,{}),s(rw,{})]})})})})})})})}function cw(){const e=un();return s(G,{children:[s("div",{id:vg,"aria-hidden":!0,className:ba,children:e("externalNewWindow")}),s("div",{id:GT,"aria-hidden":!0,className:ba,children:e("newWindow")}),s("div",{id:WT,"aria-hidden":!0,className:ba,children:e("external")})]})}function np(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 rp(e){return/^span\s+\d+$/.test(e)?e:"auto"}function uw(e){if(e==="none")return"none";if(typeof e!="string"||!e.startsWith("translate(")||!e.endsWith(")"))return Pa(e);const t=e.slice(10,-1).split(",");if(t.length>2)return Pa(e);const n=op(t[0].trim()),r=t.length===2?op(t[1].trim()):0;return n===void 0||r===void 0?Pa(e):`translateX(calc(${Zi(n)} * ${Jn.global.transformDirectionModifier})) translateY(${Zi(r)})`}function Pa(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function op(e){return kg(e)}function kg(e){if(e==="0")return 0;const t=Mf(e);
2if(!(t===void 0||t.unit!=="px"&&t.unit!=="%"))return t.unit==="%"?`${t.number}%`:t.number}function Ar(e){if(e==="auto"||typeof e!="string")return"auto";const t=kg(e);return t===void 0?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):Zi(t)??"auto"}function is(e){return Wo(e,{auto:!0,fitContent:!0})}function ip(e){return Wo(e,{none:!0})}function Wo(e,t){if(t?.fitContent&&e==="fit-content")return"fitContent";if(t&&e in t&&t[e])return e;if(e==="0")return"0";const n=Mf(e),r=n&&(n.unit==="px"||n.unit==="%"||n.unit==="ch"||n.unit==="em"||n.unit==="lh"||n.unit==="vh")?Zi(e):void 0;if(r===void 0){const o=[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${o.length>0?`, or ${o.join(", ")}`:""}.`)}return r}function dw(e){return`url(${JSON.stringify(e)})`}const pw={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},mw={auto:"block",inline:"inline",block:"block",none:"none"},fw={auto:"inline",inline:"inline",block:"block",none:"none"},hw={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},Hc=e=>mw[e],gw=e=>fw[e],qc=e=>pw[e],yw=e=>hw[e],Rl=Ge(void 0),li=()=>Pe(Rl),As=Ge(!1);function En(){return Pe(As)}const Wr=Ge(!1);function oo(){return Pe(Wr)}const sp=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function on(e,t="slow",n=!1){const[r,o]=oe(n?!1:e),[i,a]=oe(!1),l=U(n?!1:e),c=U(()=>{o(l.current),a(!1)}),u=Un();let d=typeof t=="string"?t:t.enter,p=typeof t=="string"?t:t.exit;return u&&(d="none",p="none"),F(()=>{let m;e!==l.current&&(m=setTimeout(()=>{a(!0)},0)),l.current=e;const f=setTimeout(c.current,e?sp.get(d??"none"):sp.get(p??"none"));return()=>{clearTimeout(f),clearTimeout(m)}},[d,p,e]),i?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var Sa={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 _94
2sxtbj _1fragem11u",exiting:"_94sxtbq _94sxtbk _1fragem11k",exited:"_94sxtbr _94sxtbl _1fragem11k"}};function gn({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:i=["height"],onTransition:a}){const l=on(t,o),c=U(null);F(()=>{a?.(l)},[l,a]);const u=new Map([["enter",()=>({height:0})],["entering",()=>({height:c?.current?.clientHeight})],["entered",()=>({height:"auto",overflow:"visible"})],["exit",()=>({height:c?.current?.clientHeight})],["exiting",()=>({height:0})],["exited",()=>({height:0})]]),d=l==="exited";return s("div",{id:e,style:{...i.includes("height")&&u.get(l)()},className:Y(Sa.Transition,Sa.transitionDurationVariant[o],i.includes("opacity")&&Sa.transitionOpacity[l]),hidden:d,children:s("div",{ref:c,children:d&&!n?null:r})})}const Gc=Ge(void 0);Gc.displayName="DisclosureContext";function s3({children:e,openByDefault:t,openMap:n,onToggle:r,duration:o="slow",transition:i="revealBlock"}){const a=we({}),l=we(new Set),c=V(()=>({openMap:n,onToggle:r,duration:o,transition:i,openByDefault:t,activatorIdMap:a,togglableLayoutIds:l}),[n,r,o,i,t,a,l]);return s(Gc.Provider,{value:c,children:e})}function ss({layoutId:e,activatorId:t}){const n=Pe(Gc);if(F(()=>{if(n&&e&&t){const{activatorIdMap:r}=n;r.value[e]||(r.value={...r.value,[e]:t})}},[n,e,t]),n&&e){const{openMap:r,onToggle:o,duration:i,transition:a,openByDefault:l,activatorIdMap:c,togglableLayoutIds:u}=n,d=`${e}-transition`,p=u.value.has(e),m=(r[e]??l)||!p;return{activatorAttributes:{"aria-controls":a==="revealBlock"?d:e,"aria-expanded":m},layoutAttributes:{"aria-labelledby":c.value[e],role:"region"},toggle:()=>{o?.({...l&&bw(Array.from(u.value)),...r,[e]:!(r[e]??l)})},setToggleable:()=>{if(!u.value.has(e)){const f=new Set(u.value);f.add(e),u.value=f}},open:m,duration:i,transition:a,transitionId:d,isToggleable:p}}}const vw=tt("DisclosureActivator");function _w(e,t){const n=e.displayName||e.name||"Component",r=Ke(({id:o,toggles:i,...a},l)=>{const c=Ye(o,vw),u=ss({layoutId:i,activatorId:c});if(u){const{setToggleable:d,activatorAttributes:p,open:m,toggle:f}=u;d();const{toggleEvent:h="onPress",setAriaExpanded:g=!0}=t||{},{onPress:y,onChange:_}=a,{"aria-expanded":P,...v}=p,E={...h==="onPress"?{onPress:()=>{f(),y?.()}}:{onChange:C=>{f(),_?.(C)}},...g?p:v};return s(e,{id:c,...h==="onChange"&&{value:m},...a,...E,ref:l})}else i&&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.`);return s(e,{id:o,...a,ref:l})});return r.displayName=`DisclosureActivator(${n})`,r}function Wc(e){const t=Ke((n,r)=>{const{id:o}=n,i=ss({layoutId:o});if(i){const{open:a,duration:l,transition:c,isToggleable:u,transitionId:d,layoutAttributes:p}=i,m=s(e,{...n,...p,ref:r});return c==="revealBlock"&&u?s(gn,{open:a,id:d,duration:l,children:m}):a?m:null}return s(e,{...n,ref:r})});return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function bw(e=[]){return typeof e=="boolean"?{}:(Array.isArray(e)?e:[e]).reduce((t,n)=>({...t,[n]:!0}),{})}const Ig=100;function Ea(e){return e?.type==="command"&&e.kind==="clipboard"}function Ca(e){return e?.type==="command"&&e.kind==="visibility"}function Mr(e){return e?.type==="command"&&e.kind==="overlay"}function Nn(e){return e?.type==="interest"}function wn(){const e=Pe(yg);if(e===null)throw new yr("No Interactions in context");return e}function a3(){const{getInteraction:e}=wn(),t=R(r=>{const o=e(r);Mr(o)?o.open():console.warn(`No overlay found for ID "${r}".`)},[e]),n=R(r=>{const o=e(r);Mr(o)?o.close():console.warn(`No overlay found for ID "${r}".`)},[e]);return{showOverlay:t,hideOverlay:n}}let Xn="",Ml=[],an=0,In=0,pr=[],ka=!1;class $r extends Error{}function Pw(e){if(ka)throw Error("Cannot tokenize recursively");for(ka=!0,Xn=e,Ml=[],an=0,In=0,pr=[];!$c();)In=an,Ew();if(In=an,mn("EOF"),ka=!1,pr.length)throw new $r(pr.join(`
3`));return Ml}function $c(){return an>=Xn.length}function sr(){return Xn[an++]}function mn(e){const t=Xn.substring(In,an).trim();Ml.push({type:e,text:t})}function ap(e){!$c()&&Xn[an]===e&&an++}function Sw(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}function yo(){return $c()?Rg:Xn[an]}function Ew(){const e=sr();switch(e){case Nl:break;case Ag:{mn("LEFT_PAREN");break}case Tg:{mn("RIGHT_PAREN");break}case"@":{for(;!lp.has(yo());)sr();const t=Xn.substring(In,an);t==="@media"||t==="@container"?mn("MEDIA_TYPE"):pr.push(`Invalid media type "${t}" starting at position ${In}.`);break}case wg:{mn("COMMA");break}case xg:{ap("="),mn("COMPARATOR");break}
3case Lg:{ap("="),mn("COMPARATOR");break}case Cw:case kw:{for(In++;yo()!==e;)sr();mn("IDENTIFIER"),sr();break}default:{if(Sw(e)){for(;!lp.has(yo());)sr();const t=Xn.substring(In,an),n=t.toLowerCase();if(n==="and"||n==="or")t!==n?pr.push(`Keyword "${t}" is not case sensitive at position ${In}.`):mn("OPERATOR");else if(n==="inline-size"||n==="block-size")t!==n?pr.push(`Property "${t}" is not case sensitive at position ${In}.`):mn("PROPERTY");else{if(yo()===Nl)for(sr();!Mg.has(yo());)sr();mn("IDENTIFIER")}}else pr.push(`Unexpected character "${e}" at position ${an}.`);break}}}const Ag="(",Tg=")",wg=",",Lg="<",xg=">",Rg="\0",Nl=" ",Cw="'",kw='"',Mg=new Set([Rg,Ag,Tg,wg,Lg,xg]),lp=new Set([...Mg,Nl]);let Ts=[],ci=0;function Iw(e){return Ts=e,ci=0,ww()}function Aw(e){for(const t of e)if(Yc(t))return jc(),!0;return!1}function Yc(e){return Ng()?!1:Array.isArray(e)?e.includes(Dn().type):Dn().type===e}function jc(){return Ng()||ci++,Kc()}function Fn(e,t){if(Yc(e))return jc();throw new $r(`${t}
4Instead we found this word/character: "${Dn().text}"`)}function Ng(){return Ts[ci].type==="EOF"}function Dn(){return Ts[ci]}function Kc(){return Ts[ci-1]}const Tw="s-default";function ww(){const e={responsiveType:Fn("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if(e.responsiveType==="@container"){const n=Dn().type==="IDENTIFIER"?jc().text:Tw;e.name=n}for(e.conditionalValues.push(cp());Aw(["COMMA"])&&Dn().type==="LEFT_PAREN";)e.conditionalValues.push(cp());if(Kc().type!=="COMMA")throw new $r(`Expected a comma before the fallback value of "${Dn().text}"`);if(e.fallbackValue=Fn("IDENTIFIER","Expected a final fallback value to be defined").text,Dn().type!=="EOF")throw new $r(`Expected the query to end, instead found "${Dn().text}"`);return e}function cp(){return{condition:Dg(),value:Fn("IDENTIFIER","Expected an identifier").text}}function Dg(){Fn("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=up();let t=null;Yc("COMPARATOR")&&(t=up(e.operator)),Fn("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"}),Dn().type==="OPERATOR"){const r=Fn("OPERATOR","Expected an operator"),o=Dg();return{type:"compound-condition",left:n,right:o,operator:r.text}}return n}function up(e){const t=e?Kc():Fn(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=Fn("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new $r("Cannot have two different comparison operators (a less-than and a greater-than) in the same condition.");const r=Fn(t.type==="IDENTIFIER"?"PROPERTY":"IDENTIFIER",`Expected a ${t.type==="IDENTIFIER"?'property (like "inline-size")':'identifier (like "500px")'} to compare against.`);let o=n.text;return t.type==="IDENTIFIER"&&(o==="<"?o=">":o==="<="?o=">=":o===">"?o="<":o="<="),{type:"condition",property:t.type==="PROPERTY"?t.text:r.text,operator:o,value:t.type==="PROPERTY"?r.text:t.text}}function ws(e){try{return Iw(Pw(e))}catch(t){if(t instanceof $r)return{state:"invalid",error:t.message};throw new Error("Unknown error",{cause:t})}}function Ls(e){return typeof e=="string"&&e.startsWith("@container")}function xs(e){return typeof e=="string"&&e.startsWith("@media")}function Lw(e){if(vr(e))return e.base;if(!Ls(e)&&!xs(e))return e;const t=ws(e);return t.state==="invalid"?void 0:t.fallbackValue}function Og(e,t){if(e===t)return!0;if(vr(e))return Object.values(e).some(r=>Og(r,t));if(!Ls(e)&&!xs(e))return!1;const n=ws(e);return n.state==="invalid"?!1:n.fallbackValue===t||n.conditionalValues.some(r=>r.value===t)}function Jc(e,t){return vr(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)])):t(e)}function Fg(e){const t=e,n=Ke(function(o,i){const{upsertInteraction:a,deleteInteraction:l}=wn(),{display:c}=o,u=c==="none",d=V(()=>Og(c,"none"),[c]),[p,m]=oe(),[f,h]=oe(d);d!==f&&(h(d),p==="shown"&&m(void 0));const g=p===void 0?!u:p==="shown",y=p==="hidden",_=p==="shown"&&d,P=R(()=>m("hidden"),[]),v=R(()=>m(I=>I==="hidden"||d?"shown":void 0),[d]),E=R(()=>m(I=>(I===void 0?!u:I==="shown")?"hidden":"shown"),[u]),{id:C}=o;if(F(()=>(C&&a({id:C,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:P,show:v,toggle:E,visible:g}),()=>{C&&l(C)}
4),[C,g,P,v,E,a,l]),C&&y)return null;const S=C&&_?{...o,display:"auto"}:o;return s(t,{...S,ref:i})});return n.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function xw(e,{overlayType:t}){const n=Ke(function(o,i){const{open:a}=o,{upsertInteraction:l,deleteInteraction:c}=wn(),{active:u,setActive:d}=Mw(t),p=nr(),{id:m,onClose:f,onHide:h}=o,g=R(()=>{d(!1),typeof f=="function"&&f(),typeof h=="function"&&h()},[d,f,h]),y=R(()=>{d(!0)},[d]);return F(()=>()=>{m&&c(m)},[m]),F(()=>{m&&l({id:m,type:"command",kind:"overlay",overlayType:t,defaultCommand:"--toggle",close:g,open:y,toggle:()=>{u?g():y()},active:u})},[u,g,c,m,y,l]),m&&!p&&a===void 0?s(e,{...o,...{setActive:d,open:u,onClose:g,onHide:g},ref:i}):s(e,{...o,ref:i})});return n.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function Rw(e){const t=Ke(function(r,o){const{open:i,defaultOpen:a=!1,onToggle:l,id:c}=r,{upsertInteraction:u,deleteInteraction:d}=wn(),[p,m]=oe(a),f=i??p,h=R(()=>{const _=f?"open":"closed",P=f?"closed":"open";i===void 0&&m(!f),l?.(_,P)},[f,l,i]),g=R(()=>{f&&(i===void 0&&m(!1),l?.("open","closed"))},[f,l,i]),y=R(()=>{f||(i===void 0&&m(!0),l?.("closed","open"))},[f,l,i]);return F(()=>()=>{c&&d(c)},[c]),F(()=>{c&&u({id:c,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:g,show:y,toggle:h,visible:f})},[c,f,g,y,h,u]),c&&i===void 0?s(e,{...r,open:p,onToggle:h,ref:o}):s(e,{...r,ref:o})});return t.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,t}function Mw(e){return Nw(e)()}function Nw(e){return e==="modal"||e==="sheet"?()=>{const t=Sg(e),n=oe(!1);if(t)return t;const[r,o]=n;return{active:r,setActive:o}}:()=>{const[t,n]=oe(!1);return{active:t,setActive:n}}}function Dw(e){const t=Ke(function(r,o){const{id:i,open:a}=r,{upsertInteraction:l,deleteInteraction:c}=wn(),[u,d]=oe(!1),p=U(),m=R(()=>{p.current&&(clearTimeout(p.current),p.current=void 0)},[]),f=R(({delay:g=0}={})=>{if(m(),g>0){p.current=setTimeout(()=>d(!1),g);return}d(!1)},[m]),h=R(()=>{m(),d(!0)},[m]);return F(()=>()=>{m(),i&&c(i)},[i]),F(()=>{i&&l({id:i,type:"interest",hide:f,show:h,active:u})},[u,f,i,h,l]),i&&a===void 0?s(e,{...r,open:u,ref:o}):s(e,{...r,ref:o})});return t.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,t}function Yr(e){return R(t=>{typeof e=="function"?e(t):e!=null&&(e.current=t)},[e])}function jr(e,t){const n=Yr(e),r=Yr(t);return R(o=>{n(o),r(o)},[n,r])}const Ow=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Fw(e,t){return Ow.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Bw=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Xc(e,t){return Bw.map(n=>({[n]:Vw(t?.[n],Uw(n,e))})).reduce((n,r)=>({...n,...r}),{})}function Vw(e,t){return function(r){const o=typeof e=="function"?e(r):void 0;return t?.(r),o}}function Uw(e,t){return function(r){t?.trigger(e,r)}}function Qc(e){const t=Ke(({overlay:n,...r},o)=>{const i=U(null),a=jr(o,i);return n?s(jT,{activatorRef:i,children:[s(e,{...r,ref:a}),n]}):s(e,{...r,ref:o})});return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function Bg(e,{focusActivatorWhenClosing:t=!1}={}){const n=Ke((r,o)=>{const{id:i,onClose:a,onHide:l}=r,c=nr(),u=Pg();return F(()=>(i&&u?.register(i,{close(){a?.(),l?.(),c?.setActive(!1),t&&c?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{i&&u?.unregister(i)}),[i,a,l,u,c]),s(e,{...r,ref:o,id:i??c?.overlayId})});return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function Vg(e){if(e)return`${e}Title`}function zw(e){const t=[];let n=e.parentElement;for(;n;){const{overflow:r,overflowX:o,overflowY:i}=getComputedStyle(n);(/(auto|scroll|overlay)/.test(r)||/(auto|scroll|overlay)/.test(o)||/(auto|scroll|overlay)/.test(i))&&t.push(n),n=n.parentElement}return t}function Hw(e){let t=e.parentElement;for(;t&&t!==document.body;){const{position:n}=getComputedStyle(t);if(n==="fixed"||n==="sticky")return!0;t=t.parentElement}return!1}const Ug=(e,t)=>
4{let n=0,r=null;return function(...o){const i=Date.now();r&&(clearTimeout(r),r=null),i-n>=t&&(e.apply(this,o),n=i),r=setTimeout(()=>{e.apply(this,o),n=Date.now(),r=null},t)}},zg=Ge(null),qw=16;function Hg(){const e=Pe(zg);if(e===null)throw new yr("No Popper in context");return e}function Gw(){const[e,t]=oe(null),n=U(null),r=R(o=>{if(n.current?.disconnect(),n.current=null,o!==null&&(t(o.getBoundingClientRect()),typeof ResizeObserver<"u")){const i=new ResizeObserver(()=>{t(o.getBoundingClientRect())});i.observe(o),n.current=i}},[]);return Mt(()=>()=>{n.current?.disconnect()},[]),[e,r]}function Ww(e){const[t,n]=oe(null),r=we("ltr"),o=U([]),i=U(null),a=R(()=>{e!==null&&(r.value=window.getComputedStyle(e).direction==="rtl"?"rtl":"ltr",n(e.getBoundingClientRect()))},[e,r]);return Mt(()=>{a();const l=Ug(a,qw);i.current=l,window.addEventListener("resize",a),window.addEventListener("scroll",l);for(const u of o.current)u.removeEventListener("scroll",l);const c=e?zw(e):[];o.current=c;for(const u of c)u.addEventListener("scroll",l);return()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",l);for(const u of c)u.removeEventListener("scroll",l);o.current=[],i.current=null}},[e,a]),{rect:t,direction:r.value}}const Rs=Ge({}),Zc=()=>Pe(Rs);function $w(e){return Nf.reduce((t,n)=>({...t,[n]:e(n)}),{})}const dp=10;function Yw({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}function jw(e,t,n,r,{offset:o=0,preventOverflow:i=!1,sameInlineSize:a=!1,direction:l="ltr",fallbackPositions:c}={}){const{position:u,alignment:d}=pp(e,t,l),p=c?.map(({position:P,alignment:v})=>pp(P,v,l)),m={x:0,y:0};let f={left:0,right:0,top:0,bottom:0},h=0,g=u,y=d;if(!n||!r)return{offsets:m,clipping:f,spacing:h,resolvedPosition:g,resolvedAlignment:y};const _=Ia(u,d,n,r,o,a,l);if(m.x=_.x,m.y=_.y,i){if(f=Aa(m,n),Kw(u,f)&&p?.length){const P=Ti(f);for(const v of p){const E=Ia(v.position,v.alignment,n,r,o,a,l),C=Aa(E,n);if(Ti(C)===0){m.x=E.x,m.y=E.y,f=C,g=v.position,y=v.alignment;break}}if(Ti(f)>0){let v=P;for(const E of p){const C=Ia(E.position,E.alignment,n,r,o,a,l),S=Aa(C,n),I=Ti(S);I<v&&(v=I,m.x=C.x,m.y=C.y,f=S,g=E.position,y=E.alignment)}}}f.right&&!f.left&&(m.x+=f.right,h=-dp),!f.right&&f.left&&(m.x=0,h=dp)}return{offsets:m,clipping:f,spacing:h,resolvedPosition:g,resolvedAlignment:y}}function l3(e,t){if(t==="center")return e;const r=e.startsWith("block")?"Inline":"Block";return`${e}Span${r}${t==="start"?"End":"Start"}`}function Kw(e,t){const n=t.top!==0||t.bottom!==0,r=t.left!==0||t.right!==0;return e==="blockStart"||e==="blockEnd"?n:n||r}function Ti(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function pp(e,t,n){if(n==="ltr")return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};case"inlineEnd":return{position:"inlineStart",alignment:t};default:return t==="center"?{position:e,alignment:t}:{position:e,alignment:t==="start"?"end":"start"}}}function Ia(e,t,n,r,o,i,a){const l={x:0,y:0}
4,c=a==="rtl"?r.right-n.width:r.left,u=i?c:r.left+r.width/2-n.width/2,d=r.top+r.height/2-n.height/2;switch(e){case"inlineStart":l.x=r.left-n.width-o,t==="center"?l.y=d:t==="start"?l.y=r.top:t==="end"&&(l.y=r.bottom-n.height);break;case"inlineEnd":l.x=r.right+o,t==="center"?l.y=d:t==="start"?l.y=r.top:t==="end"&&(l.y=r.bottom-n.height);break;case"blockStart":l.y=r.top-n.height-o,t==="center"?l.x=u:t==="start"?l.x=r.left:t==="end"&&(l.x=r.right-n.width);break;case"blockEnd":l.y=r.bottom+o,t==="center"?l.x=u:t==="start"?l.x=r.left:t==="end"&&(l.x=r.right-n.width);break}return l}function Aa(e,t){const n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=e.x+t.width,i=e.y+t.height;let a={left:0,right:0,top:0,bottom:0};return o>n&&(a={...a,right:n-o}),e.x<0&&(a={...a,left:-e.x}),i>r&&(a={...a,bottom:i-r}),e.y<0&&(a={...a,top:-e.y}),a}const qg=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function Gg(e){return qg.test(e)}function Wg(e){const t=e.match(qg);if(!t)return null;const[,n,r,,o,i]=t;return{axis:n,edge:r,...o&&i?{spanAxis:o,spanEdge:i}:{}}}function Dl(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}function Jw(e){const t=Wg(e);return t?Dl({...t,edge:t.edge==="start"?"end":"start"}):e}function Xw(e){const t=Jw(e),n=Qw(e);return[t,...n].join(", ")}function Qw(e){const t=Wg(e);if(!t)return[];const n=t.axis==="block"?"inline":"block",r=t.spanAxis&&t.spanEdge?{spanAxis:t.spanAxis==="inline"?"block":"inline",spanEdge:t.spanEdge}:{};return[Dl({axis:n,edge:"start",...r}),Dl({axis:n,edge:"end",...r})]}var vo={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 mp(e){if(Gg(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:es(t),alignment:n.includes("start")?"end":"start"}:{position:es(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function Zw(e){return e.split(",").map(t=>t.trim()).filter(t=>!!Gg(t))}function eL({activator:e,children:t,hidden:n,id:r,offset:o,minInlineSize:i,positionArea:a="block-start",positionTryFallbacks:l,preventOverflow:c,sameInlineSize:u}){const{rect:d,direction:p}=Ww(e),[m,f]=Gw(),h=U(null),g=R(O=>{f(O),h.current=O},[f]),[y,_]=oe(""),{current:P,parent:v}=Zc(),E=we("absolute"),{position:C,alignment:S}=mp(a),I=V(()=>{if(l!=="none")return l??Xw(a)},[l,a]),{clipping:k,offsets:T,spacing:A,resolvedPosition:L,resolvedAlignment:M}=V(()=>jw(C,S,m,d,{direction:p,offset:o,preventOverflow:c,sameInlineSize:u,fallbackPositions:I?Zw(I).map(mp):void 0}),[p,o,C,S,m,c,d,u,I]),N=V(()=>({clipping:k,offsets:T,position:L,alignment:M,popperRect:m,referenceRect:d,spacing:A}),[k,T,L,M,m,d,A]);return Mt(()=>{const O=e&&Hw(e)?"fixed":"absolute";E.value=O;const D=O==="absolute"?window.scrollX||window.pageXOffset:0,B=O==="absolute"&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:z,y:x}=Yw({x:T.x+A+D,y:T.y+B});_((window.devicePixelRatio||1)<2?`translate(${z}px, ${x}px)`:`translate3d(${z}px, ${x}px, 0)`)},[T.x,T.y,A,e]),Mt(()=>{if(n)return;const O=h.current?.parentElement;O&&ug(O)},[n]),s(zg.Provider,{value:N,children:s(Pr,{children:s("div",{className:Y(vo.Popper,vo.positionVariant[E.value],(v??P)&&vo.colorSchemeVariant[v??P],n&&vo.hidden),style:{...d&&{transform:y,...u&&{width:d.width},...i&&{minWidth:gs(i)}}},ref:g,id:r,"aria-hidden":n||void 0,"data-popper-hidden":n||void 0,children:v&&P?s("div",{className:vo.colorSchemeVariant[P],children:t}):t})})})}var Nr={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inlineEnd:"by0ptki"}
4,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"}};const tL="base",nL=8;function Cn(e){const{children:t,id:n}=e,r=U(!1),o=nr(),{active:i=!1,setActive:a}=o??{},l=R(c=>{["Escape","Esc"].includes(c.key)&&i&&(c.preventDefault(),a?.(!1))},[i,a]);return F(()=>{if(o&&i)return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[o,i,l]),o?(o?.attach("onMouseEnter",()=>{r.current||a?.(!0)}),o?.attach("onMouseLeave",()=>{a?.(!1)}),o?.attach("onTouchStart",()=>{r.current=!0}),o?.attach("onClick",()=>{a?.(!i)}),s(G,{children:[i&&s("div",{role:"tooltip",className:bt({screenReaders:"only"}),children:t}),s(Ol,{id:n,open:i,onMouseEnter:()=>{r.current||a?.(!0)},onMouseLeave:()=>{a?.(!1)},children:t})]})):s(Ol,{...e})}const Ol=Bg(Dw(function({children:t,id:n,open:r,onMouseEnter:o,onMouseLeave:i}){const{getInteraction:a}=wn(),l=n?a(n):void 0,c=()=>{Nn(l)&&l.show(),o?.()},u=()=>{Nn(l)&&l.hide({delay:Ig}),i?.()},d=nr(),{active:p=!1}=d??{};d?.setActivatorAttributes({"aria-controls":p?n:void 0,"aria-expanded":p});const m=l?.invokerRef?.current||d?.activatorRef.current||null,f=on(!!r,{exit:tL}),h=!!(n&&Nn(l)&&!d),g=h?s("div",{id:n,role:"tooltip","aria-hidden":"true",className:bt({screenReaders:"only"}),children:t}):null;return s(G,{children:[g,f!=="exited"&&s(eL,{activator:m,preventOverflow:!0,offset:nL,children:s(rL,{id:h?void 0:n,transition:f,onMouseEnter:c,onMouseLeave:u,children:t})})]})}));function rL({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:o}){const{clipping:i,spacing:a,position:l}=Hg(),c=l==="blockStart"||l==="blockEnd",u=i.right||i.left,d=c&&u?_n({[Nr.arrowNudge]:`${u+a}px`}):void 0,p=Y(Nr.Tooltip,Nr.tooltipPositionVariant[l],Nr.tooltipTransitionVariant[o]);return s("div",{id:t,role:"tooltip","aria-hidden":t===void 0?!0:void 0,onMouseEnter:n,onMouseLeave:r,className:p,style:d,children:[e,s(oL,{})]})}function oL(){const{position:e}=Hg();return s("div",{className:Y(Nr.Arrow,Nr.arrowPositionVariant[e])})}async function iL(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){console.warn("navigator.clipboard API failed, trying fallback method",r)}if(document.execCommand===void 0)throw new yr("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 yr("Failed to copy text to clipboard")}const sL=2500,fp=tt("CommandInvoker");function aL(e){e instanceof HTMLElement&&document.activeElement!==e&&e.focus({preventScroll:!0})}function Ms(e,{commands:{clipboard:t=!0,visibility:n=!0,overlay:r=!0}={}}={}){const o=e.displayName||e.name||"Component",i=Ke(function({command:d,commandFor:p,onClick:m,overlay:f,...h},g){const{getInteraction:y}=wn(),[_,P]=oe(!1),[v,E]=oe(""),C=un(),S=p?y(p):void 0,I=Ea(S)&&S.clipboard.text!=null?S:void 0,k=R(async()=>{m?.();const{text:L,onCopy:M,onCopyError:N}=I.clipboard;let O=!1;try{await iL(L),O=!0}catch(D){console.warn("ClipboardItem: failed to copy text to clipboard",D)}finally{if(O){const D=C("clipboardCopied");E(D),P(!0),xt({content:D}),M?.()}else{const D=C("clipboardFailedToCopy");E(D),P(!0),xt({content:D}),N?.()}A(),T.current=setTimeout(()=>{P(!1)},sL)}},[m,I,C]),T=U(),A=()=>{T.current&&clearTimeout(T.current)};return F(()=>()=>A(),[]),s(e,{...h,command:d,commandFor:p,onClick:I?k:m,overlay:I?s(Ol,{open:_,children:v}):f,ref:g})}),a=Ke(function({commandFor:d,id:p,onClick:m,...f},h){const g=Ye(p,fp),y=ss({layoutId:d,activatorId:g});if(y){const{setToggleable:_,activatorAttributes:P,toggle:v}=y;_();const E={onClick:()=>{v(),m?.()},...P};return s(e,{...f,id:g,...E,ref:h})}else d&&console.warn(`${o} sets "command" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`);return s(e,{...f,id:p,ref:h})}),l=Ke(function({command:d,commandFor:p,id:m,onClick:f,...h},g){const y=Ye(m,fp),{getInteraction:_,upsertInteraction:P}=wn(),v=p?_(p):void 0,E=U(null),C=jr(g,E),S=R(I=>{const k=p?_(p):void 0;if(Mr(k)){const{overlayType:T}=k;E.current&&T==="popover"&&I&&P({...k,invokerRef:E})}},[p,_,P]);if(v){let I={};if(Ca(v)){const{hide:k,show:T,toggle:A,visible:L}=v;I={onClick:()=>{switch(d){case"--hide":k();break;case"--show":T();break;case"--toggle":A();break}f?.()},"aria-controls":p,"aria-expanded":L}}else if(Mr(v)){const{active:k,close:T,open:A,overlayType:L,toggle:M}=v;I={onClick:()=>{switch((d==="--show"||d==="--toggle"&&!k)&&aL(E.current),d){case"--hide":T();break;case"--show":A();break;case"--toggle":M();break}S(!k),f?.()},...(L==="modal"||L==="sheet")&&{"aria-haspopup":"dialog"},...L==="popover"&&{"aria-controls":p,"aria-expanded":k}}}return s(e,{...h,command:d,commandFor:p,id:y,...I,ref:C})}return null}),c=Ke(function({command:d="--auto",commandFor:p,...m},f){const{getInteraction:h}=wn();if(ss({layoutId:p})&&(d==="--hide"||d==="--show"||d==="--toggle"))return s(a,{...m,command:d,commandFor:p,ref:f});const y=p?h(p):void 0;if(y&&!Nn(y)){const{defaultCommand:_}=y,P=d==="--auto"?_:d;if(P==="--copy"&&t&&Ea(y))return s(i,{...m,command:P,commandFor:p,ref:f});if((P==="--hide"||P==="--show"||P==="--toggle")&&(n&&Ca(y)||r&&Mr(y)))return s(l,{...m,command:P,commandFor:p,ref:f});if(P==="--show"||P==="--hide"||P==="--toggle"||P==="--copy"){let v;Ea(y)?v="clipboard":Ca(y)?v="visibility":Mr(y)&&(v="overlay"),console.warn(`Command "${d}" targets "${p}" but ${o} does not support ${v} commands.`)}else console.warn(`Unknown command "${d}" for ${o}`)}return s(e,{...m,command:d,commandFor:p,ref:f})});return c.displayName=`CommandInvokerComponent(${o})`,c}function lL(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ui(e,{tapToggles:t=!1}={}){const n=e.displayName||e.name||"Component",r=Ke(function({interestFor:i,...a},l){const{onBlur:c,onClick:u,onFocus:d,onMouseEnter:p,onMouseLeave:m}=a,{getInteraction:f,upsertInteraction:h}=wn(),g=i?f(i):void 0,y=U(null),_=U(),P=U(),v=R(A=>{if(P.current?.(),P.current=void 0,!(A instanceof HTMLElement))return;const L=M=>{_.current=M.pointerType};
4A.addEventListener("pointerenter",L),P.current=()=>{A.removeEventListener("pointerenter",L)}},[]),E=jr(l,y),C=jr(E,v),S=R(A=>{const L=i?f(i):void 0;Nn(L)&&h(A?{...L,invokerRef:y}:{...L,invokerRef:void 0})},[i,f,h]),I=Nn(g)&&g.active,k=R(A=>{["Escape","Esc"].includes(A.key)&&Nn(g)&&(A.preventDefault(),g.hide(),S(!1))},[g,S]);F(()=>{if(I)return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[I,k]);const T=R(A=>{const L=A.target;!(L instanceof Node)||y.current?.contains(L)||L instanceof Element&&L.closest('[role="tooltip"]')||Nn(g)&&(g.hide(),S(!1))},[g,S]);if(F(()=>{if(t&&I)return document.addEventListener("click",T),()=>{document.removeEventListener("click",T)}},[I,T]),Nn(g)){const A={"aria-describedby":i,onFocus:()=>{(_.current!=="touch"||lL(y.current))&&(g.show(),S(!0)),d?.()},onBlur:()=>{g.hide(),S(!1),c?.()},onMouseLeave:()=>{g.hide({delay:Ig}),S(!1),m?.()},onMouseEnter:()=>{_.current!=="touch"&&(g.show(),S(!0)),p?.()},...t&&{onClick:()=>{_.current==="touch"&&(g.active?(g.hide(),S(!1)):(g.show(),S(!0))),u?.()}}};return s(e,{...a,...A,ref:C})}return s(e,{...a,ref:l})});return r.displayName=`InterestInvokerComponent(${n})`,r}const Fl=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])=>hr(e)?.map(n=>[n,t])??[[e,t]])),tn={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"},Ta={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},wa={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},cL={auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},La={auto:"auto",hidden:"hidden"},uL={base:"base",transparent:"transparent",subdued:"subdued"},eu={alignContent:{...Ta},placeContent:{...Ta},alignItems:{...wa},alignSelf:{...cL},placeItems:{...wa},backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:uL,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:{...Ta},justifyItems:{...wa},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...La},overflowBlock:{...La},overflowInline:{...La},padding:{...tn},paddingBlock:{...tn},paddingInline:{...tn},paddingBlockStart:{...tn},paddingBlockEnd:{...tn},paddingInlineStart:{...tn},paddingInlineEnd:{...tn},gap:{...tn},rowGap:{...tn},columnGap:{...tn},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},Io=4,$g={borderRadius:{limit:Io},borderStyle:{limit:Io},borderWidth:{limit:Io},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:Io},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},tu={backgroundImage:dw,blockSize:is,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:rp,gridRow:rp,gridTemplateColumns:np,gridTemplateRows:np,inlineSize:is,insetBlock:Ar,insetBlockEnd:Ar,insetBlockStart:Ar,insetInline:Ar,insetInlineEnd:Ar,insetInlineStart:Ar,maxBlockSize:ip,maxInlineSize:ip,minBlockSize:Wo,minInlineSize:Wo,transform:uw},dL=/\s+/;function Ns(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[d,p]of Object.entries(e)){if(p===void 0||p==="")continue;const m=d in $g?mL(p,d):p;m!==void 0&&(r[d]=m)}const o=n?pL(hp(r,t)):hp(r,t),i=gp(o,tu),a=gp(o,eu),l=bt(i),{className:c,style:u}=hS(a);return{className:Y(l,c),style:u}}function pL(e){const t={};for(const[n,r]of Object.entries(e))(!(n in Fl)||r!==Fl[n])&&(t[n]=r);return t}function mL(e,t){const{limit:n}=$g[t];return Jc(e,r=>{if(r===void 0||typeof r!="string")return;const o=r.trim().split(dL,n??Io);return o.length===1?o[0]:(o.length===3&&o.push(o[1]),o)})}function hp(e,t){const n={},r=(o,i)=>{const a=gL({property:o,value:i},t),l=hL(o,a);for(const[c,u]of Object.entries(l)){const d=fL(u);if(d===void 0)continue;const p=n[c];if(vr(d)&&p!==void 0){const m=vr(p)?p:{base:p};n[c]={...m,...d}}else n[c]=d}};for(const o of xo)o in e&&r(o,e[o]);for(const[o,i]of Object.entries(e))xo.includes(o)||r(o,i);return n}function fL(e){if(!vr(e))return e;const t=Object.entries(e).filter(([,n])=>n!==void 0&&n!=="");return t.length>0?Object.fromEntries(t):void 0}function hL(e,t){const n=hr(e);if(!n||n.length===0)return{[e]:t};if(vr(t)){const i=Object.entries(t),a={};for(let l=0;l<n.length;l++){const c=n[l],u={};for(const[d,p]of i)u[d]=Ed(p)?p[l]:p;a[c]=u}return a}const r=Ed(t),o={};for(let i=0;i<n.length;i++)o[n[i]]=r?t[i]:t;return o}function gL(e,t){if(yL(e))return _L(e.property,e.value,t);if(vL(e))return bL(e.property,e.value,t)}function yL(e){return e.property in tu}function vL(e){return e.property in eu}
4function _L(e,t,n){const r=n?.transforms?.[e]??tu[e];return Jc(t,o=>{if(o!==void 0)return Df(o)?Yg(o.map(i=>r?.(i))):r?.(o)})}function bL(e,t,n){const r=eu[e],o=i=>{const a=n?.transforms?.[e]?.(i);return r[a??i]};return Jc(t,i=>Df(i)?Yg(i.map(o)):o(i))}function Yg(e){if(!Array.isArray(e)||e.length!==2)return e;const[t,n]=e;return[t,n,t,n]}function gp(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const xa=Object.keys(Uo).filter(e=>e!=="base"),Br=new Set([">",">="]),as=new Set(["<","<="]);function jg(e){return e==="inline-size"}function PL(e){if(e.operator!=="and"||e.left.type!=="condition"||e.right.type!=="condition"||e.left.property!==e.right.property)return!1;const t=e.left,n=e.right,r=parseFloat(t.value),o=parseFloat(n.value),i=Br.has(t.operator),a=Br.has(n.operator),l=as.has(t.operator),c=as.has(n.operator);return i&&c||l&&a?(i?r:o)<(l?r:o):!1}function SL(e){const t=e.left,n=e.right,r=Br.has(t.operator),o=Br.has(n.operator),i=as.has(t.operator),a=as.has(n.operator);let l;if(r&&a)l=t;else if(i&&o)l=n;else return console.warn("Invalid range query structure. Expected one lower bound and one upper bound."),!1;return Br.has(l.operator)?!0:(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>
4=' operators. Found '${l.operator}' in condition '${l.property} ${l.operator} ${l.value}'. Use '>' or '>=' instead.`),!1)}function EL(e){if(e.state==="invalid")return e;function t(o){return jg(o)?!0:(console.warn(`Container queries should be based on the inline dimensions of the container. Use 'inline-size' instead of '${o}'.`),!1)}function n(o){return o.type==="compound-condition"?o.left.type==="condition"&&!t(o.left.property)||o.right.type==="condition"&&!t(o.right.property)?!1:PL(o)?SL(o):n(o.left)&&n(o.right):o.type==="condition"&&t(o.property)?Br.has(o.operator)?!0:(console.warn(`Mobile-first approach requires '>' or '>=' operators. Found '${o.operator}' in condition '${o.property} ${o.operator} ${o.value}'. Use '>' or '>=' instead.`),!1):!1}return e.conditionalValues.every(o=>n(o.condition))?e:{state:"invalid",error:"Expected a mobile-first responsive query, instead found one that does not follow mobile-first principles."}}function CL(e,t){if(e.state==="invalid")return e;const n=t?` for property '${t}'`:"";function r(c){return jg(c)?!0:(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${c}'.`),!1)}function o(c){return xa.includes(c)?!0:(console.warn(c==="base"?`Media queries should use valid breakpoints${n}. Found 'base' (use 'base' only as fallback, minimum condition is 'extraSmall'). Use one of '${xa.join("', '")}' instead.`:`Media queries should use valid breakpoints${n}. Found '${c}'. Use one of '${xa.join("', '")}' instead.`),!1)}function i(c,u){return c!==">="?(console.warn(`Media queries should use '>=' operator${n}. Found '${c}' (expected '>=' for breakpoint '${u}').`),!1):!0}function a(c){return c.type==="compound-condition"?a(c.left)&&a(c.right):c.type==="condition"?r(c.property)&&o(c.value)&&i(c.operator,c.value):!1}return e.conditionalValues.every(c=>a(c.condition))?e:{state:"invalid",error:"Expected a valid media query with breakpoint conditions, instead found invalid property, breakpoints, or operators."}}const kL=tt("ContainerQueryStyle");function IL(e,t){const n=Ye(void 0,kL),{containerQueryCssStrings:r,fallbackClassName:o,fallbackStyle:i}=V(()=>{const l={},c=[];if(!e)return{fallbackClassName:"",fallbackStyle:{},containerQueryCssStrings:c};for(const[p,m]of Object.entries(e)){if(!Ls(m))continue;const f=EL(ws(m));if(f.state==="invalid")continue;l[p]=f.fallbackValue;const g=f.conditionalValues.map(y=>{const _=AL({cssClassNameSelector:n,property:p,value:y.value,config:t});return _?`${f.responsiveType}${f.responsiveType==="@container"?`${f.name?` ${f.name} `:""}`:""}${Bl(y.condition)}{${_}}`:""}).filter(Boolean).join("");c.push({property:p,cssString:g})}const{className:u,style:d}=Ns(l,t);return{containerQueryCssStrings:c,fallbackClassName:u,fallbackStyle:d}},[t,e,n]),a=r.length>0?s("style",{children:r.map(({cssString:l})=>l).join("")},n):null;return{className:Y(n,o),style:i,styleElement:a}}function AL({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:o,style:i}=Ns({[t]:n},r);if(!o)return null;const a=TL(o);return a?wL(a,e,i):null}const Ra=new Map;function TL(e){if(Ra.has(e))return Ra.get(e)||null;if(typeof document>"u")return null;const t=e.split(" ").filter(Boolean);if(t.length===0)return null;const n=[];for(const o of Array.from(document.styleSheets))try{const i=o.cssRules||o.rules;for(const a of Array.from(i))if(a instanceof CSSStyleRule)for(const l of t)new RegExp(`\\.${l}(?![\\w-])`).test(a.selectorText)&&n.push(a.cssText)}catch{continue}const r=n.length>0?n.join(`
5`):null;return Ra.set(e,r),r}function wL(e,t,n){const r=e.split(`
6`),o=[];for(const i of r){const a=i.match(/^([^{]+)\{([^}]+)\}/);if(a){const l=a[1].trim(),c=a[2].trim(),u=LL(c,n);if(l.includes("[dir=")){const d=l.match(/\[dir="[^"]+"\]/)?.[0];d&&l.match(/\.([^\s[\]]+)/)&&o.push(`${d} .${t}{${u}}`)}else o.push(`.${t}{${u}}`)}}return o.join("")}function LL(e,t){const n=/var\(--[^)]+\)/g;return e.replace(n,r=>{const o=r.match(/var\(([^)]+)\)/)?.[1];return o&&t[o]?t[o]:r})}function Bl(e){if(e.type==="compound-condition"){const t=Bl(e.left),n=Bl(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function xL(e,t){return V(()=>!e||Object.keys(e).length===0?{className:"",style:{}}:Ns(e,t,{filterDefaultValues:!0}),[t,e])}function RL(e,t){const{className:n,style:r}=V(()=>{const o={};if(!e)return{className:"",style:{}};for(const[i,a]of Object.entries(e)){if(!xs(a)){o[i]=a;continue}const l=CL(ws(a),i);if(l.state==="invalid")continue;const c={base:l.fallbackValue};for(const u of l.conditionalValues){const d=u.condition;d.type==="condition"&&(c[d.value]=u.value)}o[i]=c}return Ns(o,t)},[t,e]);return{className:Y(n),style:r}}function At(e,t){const{containerQueryProps:n,mediaQueryProps:r,literalProps:o}=V(()=>{const g={},y={},_={};for(const[v,E]of Object.entries(e||{}))E!=null&&(Ls(E)?g[v]=E:xs(E)?y[v]=E:_[v]=E);const P=new Set(Object.keys(y).flatMap(v=>hr(v)??[v]));for(let v=P.size>0;v;){v=!1;for(const[E,C]of Object.entries(_)){if(Of(C))continue;const S=hr(E);if(S?.length&&ar(S[0],C))continue;const I=S?.length?S:[E];if(I.some(k=>P.has(k))){y[E]=C,delete _[E];for(const k of I)P.add(k);v=!0}}}return{containerQueryProps:g,mediaQueryProps:y,literalProps:_}},[e]),{className:i,style:a,styleElement:l}=IL(n,t),{className:c,style:u}=RL(r,t),{className:d,style:p}=xL(o,t);ML(n,r,o),NL(o);const m=Object.keys(n).length>0,f=Object.keys(r).length>0;return{className:Y(m?i:void 0,f?c:void 0,d),style:{...a,...u,...p},styleElement:l}}function ar(e,t){const n=Fl[e];return n!==void 0&&t===n}function ML(e,t,n){const r=new Set,o=new Set,i=new Set,a=new Set;if(Object.keys(e).length===0&&Object.keys(t).length===0&&Object.keys(n).length===0)return;for(const[u,d]of Object.entries(e))if(xo.includes(u)){const p=hr(u)??[];if(p.length>0&&ar(p[0],d))continue;for(const m of p)r.add(m)}else{if(ar(u,d))continue;r.add(u)}for(const[u,d]of Object.entries(t))if(xo.includes(u)){const p=hr(u)??[];if(p.length>0&&ar(p[0],d))continue;for(const m of p)o.add(m)}else{if(ar(u,d))continue;o.add(u)}for(const[u,d]of Object.entries(n))if(xo.includes(u)){const p=hr(u)??[];if(p.length>0&&ar(p[0],d))continue;for(const m of p)i.add(m),a.add(m)}else{if(ar(u,d))continue;i.add(u)}const l=new Set,c=u=>a.has(u)&&(u in t||u in e);for(const u of r)if(o.has(u)||i.has(u)){if(c(u))continue;l.add(u)}for(const u of o)if(i.has(u)){if(c(u))continue;l.add(u)}l.size>
60&&console.warn(`ResponsiveStyle: style property conflicts detected - ${Array.from(l).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.`)}function NL(e){const t=Object.keys(e).filter(n=>Of(e[n]));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.`)}const DL="_1M6e9",OL={UnstyledLink:DL},Ds=ui(Ms(Qc(Ke(function({ariaBusy:t,ariaHidden:n,ariaLabel:r,ariaLive:o,children:i,className:a,commandFor:l,command:c,href:u,id:d,lang:p,onClick:m,onFocus:f,onMouseEnter:h,target:g,...y},_){const P=iw(),v=En(),E=typeof m=="function"?()=>m():void 0,C=typeof f=="function"?()=>f():void 0,S=typeof h=="function"?()=>h():void 0,I=a??OL.UnstyledLink,k=nr(),T=Xc(k,{onClick:E,onFocus:C,onMouseEnter:S}),A=k?.activatorAttributes,L=n||v?!0:void 0,M=L?-1:void 0;return P?s(P,{className:I,"aria-busy":t||void 0,"aria-hidden":L,"aria-label":r,"aria-live":o,href:u,id:d,lang:p,ref:_,tabIndex:M,target:g,...T,...A,...y,children:i}):s("a",{"aria-busy":t||void 0,"aria-describedby":_g({external:g==="_blank"||!1,native:!0}),"aria-label":r,"aria-live":o,"aria-hidden":L,className:I,href:u,id:d,lang:p,ref:_,rel:g==="_blank"?"noopener noreferrer":void 0,tabIndex:M,target:g==="_blank"?g:void 0,...T,...A,...y,children:i})}))));function Sr(){const e=Pe(ac);if(e==null)throw new yr("No theme found in context");return e}function ct(){const e=Sr();if(typeof window>"u")return e.configuration;const t=U();if(t.current!=null&&t.current.theme!==e&&(t.current=void 0),t.current==null){const n=e.configurationSignal,r=new Map,o={};for(const i of Object.keys(e.configuration))Object.defineProperty(o,i,{enumerable:!0,get(){return r.has(i)||r.set(i,kt(()=>n.value[i])),r.get(i).value}});t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:o}}return t.current.reactiveConfiguration}function io(e){const t=Ke(function({disableGlobalBranding:r,...o},i){const{global:{cornerRadius:a}}=ct(),l=gS(a),c=r?o:{...o,borderRadius:l??o.borderRadius};return s(e,{...c,ref:i})});return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}var wi={Clickable:"_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw",overflowHidden:"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",visuallyHidden:"_1s82kpb5 _1fragem121",inert:"_1s82kpb2 _1fragemz0"};const Ln=_w(io(ui(Ms(Qc(Ke(function({accessibilityLabel:t,accessibilityVisibility:n="visible",background:r="transparent",blockSize:o="auto",border:i="none",borderRadius:a="none",borderStyle:l,borderWidth:c,children:u,className:d,command:p,commandFor:m,controlId:f,disabled:h=!1,display:g="auto",expanded:y,href:_,id:P,inlineSize:v="auto",lang:E,loading:C=!1,maxBlockSize:S="none",maxInlineSize:I="none",minBlockSize:k="0",minInlineSize:T="0",onBlur:A,onClick:L,onFocus:M,onPointerDown:N,onPointerEnter:O,onPointerLeave:D,onPointerUp:B,overflow:z="visible",padding:x="none",paddingBlock:W,paddingInline:X,paddingBlockEnd:Z,paddingBlockStart:ce,paddingInlineEnd:j,paddingInlineStart:Q,target:H="auto",type:J="button",...he},ne){F(()=>{y!=null&&f==null&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[f,y]);const ae=En(),ue=nr(),{className:Ae,style:me,styleElement:ye}=At({backgroundColor:r,blockSize:o,..._r({border:i,borderStyle:l,borderWidth:c}),borderRadius:a,display:g,inlineSize:v,maxBlockSize:S,maxInlineSize:I,minInlineSize:T,minBlockSize:k,padding:x,paddingBlock:W,paddingBlockEnd:Z,paddingBlockStart:ce,paddingInline:X,paddingInlineEnd:j,paddingInlineStart:Q},{transforms:{display:Hc}}),Ee=Y(wi.Clickable,n==="exclusive"&&wi.visuallyHidden,Ae,z==="hidden"&&wi.overflowHidden,ae&&wi.inert,d),Ue=li(),Ce=Yr(ne),Ne=Xc(ue,{onClick:()=>{L?.()},onBlur:()=>{A?.()},onFocus:()=>{M?.()},onMouseEnter:()=>{O?.()},onMouseLeave:()=>{D?.()},onMouseDown:Re=>{N&&Re.button===0&&N?.()},onMouseUp:()=>{B?.()}}),nt=Fw(ue,{"aria-controls":f,"aria-expanded":y}),re=C?"assertive":void 0,se=n==="hidden"||ae,Me={className:Ee,id:P,lang:E,style:me,tabIndex:se?-1:void 0,...nt,...Ne,...he};return s(G,{children:[ye,s(Wr.Provider,{value:!0,children:_&&m===void 0?s(Ds,{...Me,href:_,ref:Ce,ariaBusy:C,ariaHidden:se?!0:void 0,ariaLive:re,ariaLabel:t,target:H,children:u}):s("button",{ref:Ce,type:m?"button":J,disabled:h||C,form:J==="submit"&&Ue?.nested?Ue.id:void 0,"aria-busy":C,"aria-hidden":se?!0:void 0,"aria-live":re,"aria-label":t,...Me,children:u})})]})})))))),yp="generic",Ma=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 di(e,{defaultRole:t=yp,defaultElement:n="div"}={}){const r=Ma.get(e??t)??Ma.get(t)??Ma.get(yp);return{Element:r.element??n,role:r.role}}var Na={Grid:"_1mrl40q0 _1fragemws",overflowHidden:"_1mrl40q1 _1fragemup _1fragemv4",visuallyHidden:"_1mrl40q2 _1fragem121"};const gt=Wc(io(function({accessibilityLabel:t,accessibilityRole:n="generic",accessibilityVisibility:r="visible",alignContent:o,alignItems:i,background:a="transparent",backgroundHoverAndFocus:l,blockSize:c="auto",border:u="none",borderColor:d,borderRadius:p="none",borderStyle:m,borderWidth:f,children:h,columnGap:g,display:y="auto",gap:_="none",gridAutoColumns:P,gridAutoFlow:v,gridAutoRows:E,gridTemplateColumns:C="none",gridTemplateRows:S="none",id:I,inlineSize:k="auto",justifyContent:T,justifyItems:A,max
6BlockSize:L="none",maxInlineSize:M="none",minBlockSize:N="0",minInlineSize:O="0",overflow:D="visible",padding:B="none",paddingBlock:z,paddingBlockEnd:x,paddingBlockStart:W,paddingInline:X,paddingInlineEnd:Z,paddingInlineStart:ce,placeContent:j="normal normal",placeItems:Q="normal normal",rowGap:H,...J}){const he=oo(),{Element:ne,role:ae}=di(n,{defaultElement:he?"span":"div"}),{className:ue,style:Ae,styleElement:me}=At({gap:_,placeContent:j,placeItems:Q,alignContent:o,alignItems:i,backgroundColor:a,backgroundColorHoverAndFocus:l,blockSize:c,..._r({border:u,borderStyle:m,borderWidth:f}),borderRadius:p,columnGap:g,display:y,gridAutoColumns:P,gridAutoFlow:v,gridAutoRows:E,gridTemplateColumns:C,gridTemplateRows:S,inlineSize:k,justifyContent:T,justifyItems:A,maxBlockSize:L,maxInlineSize:M,minBlockSize:N,minInlineSize:O,padding:B,paddingBlock:z,paddingBlockEnd:x,paddingBlockStart:W,paddingInline:X,paddingInlineEnd:Z,paddingInlineStart:ce,rowGap:H},{transforms:{blockSize:is,display:yw}});return s(G,{children:[me,s(ne,{"aria-hidden":r==="hidden"?!0:void 0,"aria-label":t,className:Y(Na.Grid,r==="exclusive"&&Na.visuallyHidden,D==="hidden"&&Na.overflowHidden,ue),id:I,role:ae,style:Ae,...J,children:h})]})})),FL="/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg",BL=["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 c3=1,VL=1.7142857142857142,Gn={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:"a8x1wui"},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 UL=!1,zL=["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"],HL=["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 Le({interestFor:e,...t}){return e?s(GL,{...t,interestFor:e}):s(qL,{...t})}function qL({accessibilityLabel:e,...t}){const{className:n,children:r}=Kg(t);return s("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const GL=ui(Ke(function({accessibilityLabel:t,"aria-describedby":n,id:r,onBlur:o,onClick:i,onFocus:a,onMouseEnter:l,onMouseLeave:c,...u},d){const{className:p,children:m}=Kg(u);return s("span",{role:"img",tabIndex:n?0:void 0,id:r,ref:d,className:Y(Gn.InterestActivator,p),"aria-label":t,"aria-labelledby":t?void 0:n,"aria-describedby":t?n:void 0,onBlur:o,onClick:i,onFocus:a,onMouseEnter:l,onMouseLeave:c,children:m})}),{tapToggles:!0});function Kg({type:e,tone:t="auto",color:n="base",size:r="base",display:o="block",className:i}){const{icons:a}=ct(),l=aw()??UL;let c;e?c=e:(e===""||console.warn(`"${e}" is not a valid <Icon /> type`),c="empty");const u=zL.includes(c),d=HL.includes(c)?"fill":"outline";let p;switch(r){case"small":p="small-100";break;case"large":p="large-100";break;default:p=r;break}const m=Y(Gn.Icon,Gn.toneVariant[t],(t==="auto"||t==="neutral")&&Gn.colorVariant[n],Gn.displayVariant[o
6],Gn.sizeVariant[p],u&&Gn.mirrored,Gn.fillVariant[d],i);let f=WL(c);f||(console.warn(`"${c}" is not a valid <Icon /> type`),f="empty");const h=a[f],g=h??`${FL}#${f}`,y=s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:s("use",{href:g})}),_=h!=null||l?s(FT,{iconUrl:g,fallback:y,allowRelativeUrl:h==null}):y;return{className:m,children:_}}function WL(e){const t=es(e);if(t in vp)return vp[t];if(BL.includes(t))return t}const vp={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"};var $L={Toast:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120"};const YL=5300;function jL({message:e,dismiss:t}){const n=un();return F(()=>xt({content:e}),[e]),F(()=>{const r=setTimeout(t,YL);return()=>clearTimeout(r)},[t]),s("span",{className:$L.Toast,children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"base",children:[s("span",{children:e}),s(Ln,{onClick:t,accessibilityLabel:n("closeNotification"),children:s(Le,{type:"x",size:"small",tone:"monochrome"})})]})})}var KL={Container:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z"};const Jg=Ge(null);function JL({children:e,handleToast:t}){const[n,r]=oe([]),o=U(0),i=R(c=>{r(u=>u.filter(d=>d.id!==c))},[]),a=R(()=>(o.current+=1,`toast-message-${o.current}`),[]),l=V(()=>({setMessages:r,removeMessage:i,createMessageId:a,handleToast:t}),[r,i,a,t]);return s(Jg.Provider,{value:l,children:[e,n.length>0?s(Pr,{children:s(XL,{children:n.map(({id:c,content:u})=>s(jL,{message:u,dismiss:()=>i(c)},c))})}):null]})}function XL({children:e}){const t=Un(),n=U(null),r=U(void 0);return Mt(()=>{const o=n.current;if(!o)return;const i=o.offsetHeight,a=i-(r.current??i);r.current=i,!(t||!o.animate||a<=0)&&o.animate([{transform:`translateY(${a}px)`},{transform:"translateY(0)"}],{duration:150,easing:"ease-out"})}),s("div",{ref:n,className:KL.Container,children:e})}function nu(){const e=Pe(Jg),{setMessages:t,removeMessage:n,createMessageId:r,handleToast:o}=e??{};return R(a=>{if(!t||!n||!r)throw new yr("useToast must be used within Toaster context provider");if(typeof a!="string"||typeof a=="string"&&a.trim()==="")return{hide:()=>{}};if(o?.(a))return{hide:()=>{}};const l=r();return t(c=>[...c,{id:l,content:a}]),{hide:()=>n(l)}},[t,n,r,o])}function _p(e,t){if(!e)throw new TypeError(t)}function Tr(e){return V(()=>Ff(e),[])}function Os(e,t){const n=U(t);n.current=t;const r=U();r.current||(r.current=e.listen(n.current)),F(()=>()=>r.current?.(),[e,n])}const u3="·",QL=150,ZL=100,d3="ASAP",Xg=mt("ShippingMethodsContext");function ru(){const e=Pe(Xg);if(e!=null)return e}function e0(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=b(),r=U(!1);ze(()=>{const o=e.value;if(typeof PerformanceMeasure>"u"||typeof PerformanceMark>"u")return;function i(){const l=performance.now();return()=>{const u=performance.now()-l;n.histogram({name:"shipping_methods_loading_duration",value:u,attributes:{async_shop_promise:t}})}}let a;r.current&&(o.status==="loading"?a=i():a&&(a(),a=void 0)),r.current=!0})}function t0(){const{observability:e}=b();return R((n,r)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:n,attributes:{apiClientId:r.toString()}})},[e])}const n0=()=>lc((e,t)=>{switch(e){case"ignored":{if(t==="timeout")return"idle";break}case"idle":{if(t==="countryChange")return"debounced";if(t==="otherAddressFieldChange")return"ignored";break}case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}},"idle"),r0=["streetName","streetNumber","neighborhood","line2"];function o0(e,t){const n=V(n0,[e]),r=n.value;Os(n,({previousState:o,action:i})=>{o==="debounced"&&i==="timeout"&&t()}),F(()=>{let o=!1;return e.fields.countryCode.subscribe(()=>{o&&(n.value="countryChange"),o=!0})},[e.fields.countryCode,n]),F(()=>
6{if(r==="debounced"||r==="ignored"){const o=setTimeout(()=>{n.value="timeout"},ZL);return()=>{clearTimeout(o)}}},[n,r]),F(()=>{let o=!1;const a=Object.keys(e.fields).filter(l=>!["countryCode",...r0].includes(l)).map(l=>e.fields[l].subscribe(c=>{c&&o&&(n.value="otherAddressFieldChange")}));return o=!0,()=>{a.forEach(l=>l())}},[e.fields,n])}function Qg(){const{shop:{shippingRatesReloadStrategy:e}}=b();return R(({countryCode:t,zoneCode:n})=>{try{_p(typeof t=="string","Expected a country code");const r=e.get(t);switch(_p(r!=null,`Could not find a strategy for ${t}`),r.type){case"regional":{const o=Math.max(...r.regions.values());return n==null?o:r.regions.get(n)??o}case"national":return r.strategy}}catch{const r=e.get("ZZ");return r?.type==="national"?r.strategy:Wn.Anything}},[e])}function p3(){const{i18n:e}=b(),t=new Map;return t.set("year",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.year",{count:n})),t.set("month",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.month",{count:n})),t.set("week",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.week",{count:n})),t.set("day",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.day",{count:n})),(n,r)=>t.get(n)?.(r)||""}function Zg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:t=!1}){return e.value.map(r=>r.value).reduce((r,{type:o,id:i,deliveryMethodTypes:a,deliveryMethodHandle:l})=>{const c=["SHIPPING","LOCAL"];if(t&&(o!=="ONE_TIME_PURCHASE"||a.length===0||!a.some(d=>c.includes(d))))return r;const u=vS(o,i);return{...r,[u]:l}},{})}function Fs(e,t){const n=e.value;if(t===void 0){n.forEach(r=>{r.value={...r.value,deliveryMethodHandle:void 0}});return}Object.entries(t).forEach(([r,o])=>{const[i,a]=r.split("-"),l=n.find(c=>{const{type:u,id:d}=c.value;return u===i&&(!a||!d||Ve(d)===a)});l&&(l.value={...l.value,deliveryMethodHandle:o})})}function pi(e,t,n){const{parts:r}=Ft(),o=r.deliveryLines.value;function i(l){return!n||l.deliveryMethodTypes.includes(n)}const a=o.find(l=>{const c=l.peek(),u=c.deliveryMethodTypes.length>0;return c.type===e&&u&&(!t||c.id===t)&&i(c)});return a||o.find(l=>{const c=l.peek();return i(c)})}function m3(e){return!!pi(e)?.fields}function i0(e,t){const n=pi(e,t);return[n?.fields.deliveryMethodTypes.value||[],R(r=>{n&&(n.value={...n.value,deliveryMethodTypes:r})},[n])]}function s0({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:n}){const r=pi(e,t,n);return[r?.fields.deliveryMethodHandle.value||void 0,R(o=>{r&&(r.value={...r.value,deliveryMethodHandle:o})},[r])]}function f3(e,t){const n=pi(e,t);return V(()=>n?.fields.deliveryMethodOptions.value.phone||le(void 0),[n])}function h3(e,t){const n=pi(e,t);return V(()=>n?.fields.deliveryMethodOptions.value.instructions||le(void 0),[n])}function g3(e,t){const n=t==="ONE_TIME_PURCHASE"?"SUBSCRIPTION":"ONE_TIME_PURCHASE",r=q().deliveryNext,o=d=>ni(r.value).filter(cc).find(m=>m.type===d),i=(d,p)=>{const f=o(d)?.methods.find(h=>h.methodType===p);if(f)return f},a=d=>{const p=e.find(f=>f.handle===d);return p?p.methodType==="PICK_UP"?o(n)?.methods.find(g=>g.methodType==="PICK_UP"&&p.title===g.title)?.handle:i(n,p.methodType)?.handle:void 0},{deliveryLines:l}=ie(),c=w(()=>Zg({proposedDeliveryLines:l})),u=R(d=>{Fs(l,{[n]:d})},[l,n]);return{inverseGroupType:n,inverseGroupDeliveryMethodHandle:c.value,setInverseGroupDeliveryMethodHandle:u,getInverseGroupDeliveryMethodHandle:a}}function a0(){const{parts:e}=Ft();return R(n=>{e.deliveryLines.value.forEach(r=>{r.value={...r.value,deliveryMethodHandle:n}})},[e.deliveryLines])}function ey(){const{parts:e}=Ft(),t=yS(e.deliveryLines.peek()),n=R(r=>{e.deliveryLines.value.forEach(o=>{o.value={...o.value,deliveryMethodTypes:r}})},[e.deliveryLines]);return[t,n]}function y3(){const{parts:e}=Ft(),{negotiate:t}=Lt(),{i18n:n}=b(),r=nu(),o=er(),i=ru();return R(({targetDeliveryMethodType:l,merchandiseStableIds:c})=>{const{orphanedMovedToShipping:u,orphanedRemovedFromCartStableIds:d}=_S({deliveryLines:e.deliveryLines,merchandiseLines:e.merchandiseLines,targetDeliveryMethodType:l,merchandiseStableIds:c,sellableDeliveryMethodsByStableId:o.value.deliveryMethodsByMerchandise,discountLines:e.discountLines});d.length>0?r(n.translate("stock.removed_from_cart_notice")):u&&r(n.translate("split_delivery.items_moved_to_shipping_toast")),i?.dispatch?.("deliveryMethodChanged"),t({include:["deliveryNext","merchandiseLines"]})},[e.deliveryLines,e.merchandiseLines,o,e.discountLines,i,t,r,n])}function l0(){const{deliveryLines:e,deliveryMacros:t}=ie(),{negotiate:n}=Lt(),r=Zg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:!0}),o=V(()=>
6{if(t.value?.length)return bS(t.value,r)},[t.value,r]),i=R(async a=>{if(!a||a===o?.id)return;const l=t.value.find(({id:c})=>c===a);if(l)return Fs(e,l.deliveryMethodHandles),n({include:["contactInfo","shippingAddress","merchandiseLines","deliveryNext"]})},[e,t,o,n]);return{selectedMacro:o,setSelectedMacro:i}}function ou(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=b(),n=e.current.value==="shopPay",r=t.unique,o=t.visit;return V(()=>{if(n)return typeof window<"u"&&window.ShopPay&&(window.ShopPay.trackingUnique=r,window.ShopPay.trackingVisit=o),{trackingUnique:r,trackingVisit:o}},[r,o,n])}const c0=mt("CheckoutSheetProtocolContext"),u0=mt("MobileCheckoutSdkContext");function Bs(){const e=Pe(c0),t=Pe(u0);return e??t??null}function d0(e,t){return e==null||e==="MERCHANT"&&t==="checkout_started"}function iu(e){const t=Bs();return d0(t?.config?.type,e)}function Vs(){const{checkout:e,shop:t}=b();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(PS)}function Us(){const{checkout:e,shop:t}=b();return Vs()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(SS))}class Ao extends Pn{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}
6class p0 extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let Li=null;function m0({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:o,enabledBetaFlags:i=[],surface:a,monorailRegion:l,sriMap:c,managerBaseUrl:u,extensionsUrl:d,apiClientId:p,checkoutToken:m,facebookCapiEnabled:f=!1}){if(Li)return Li;const h=parseInt(Ve(t),10),g=YA(),y=g==="modern"?"modern":"legacy",_=`${u}/b${r}${y.substring(0,1)}.js`,P=`${d}/cdn/shopifycloud/web-pixels-manager`,v=document.createElement("script");v.setAttribute("async","true"),v.setAttribute("src",_);const E={shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:P,browserTarget:g,surface:a,enabledBetaFlags:JSON.stringify(i),hashVersion:r,publish:"all",...p!=null&&{apiClientId:String(p)},...m&&{checkoutToken:m},...o.customer?.id&&{customerId:o.customer.id},facebookCapiEnabled:String(f)};E.trekkieShim="true";for(const S in E)if(Object.prototype.hasOwnProperty.call(E,S))try{v.dataset[S]=String(E[S])}catch{}const C=c[y];return C&&(v.setAttribute("integrity",C),v.setAttribute("crossorigin","anonymous")),Li=new Promise((S,I)=>{if(v.onload=()=>{if(f0())return;if(window.webPixelsManager==null||!("init"in window.webPixelsManager)){I(new Ao("WebPixelManager is not available"));return}const T=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:P,surface:a,webPixelsConfigList:n.map(A=>{const L=A.dataSharingAdjustments&&{dataSharingAdjustments:A.dataSharingAdjustments},M=A.integrityHash&&{integrityHash:A.integrityHash};return{configuration:A.configuration,eventPayloadVersion:A.eventPayloadVersion,id:A.idTmp,runtimeContext:A.runtimeContext,scriptVersion:A.scriptVersion,type:A.type,apiClientId:A.apiClientId,privacyPurposes:A.purposes,name:A.name,capabilities:A.capabilities||[],enabledFlags:A.enabledFlags||[],dataSharingState:A.dataSharingState,...L,...M}}),initData:o,enabledBetaFlags:i,monorailRegion:l});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=T.publishCustomEvent,window.Shopify.analytics.initialized=!0,S(T)},v.onerror=()=>{I(new Ao(`Failed to load WebPixelManager runtime from ${_}`))},document.querySelector(`script[src="${v.src}"]`))I(new Ao("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(v)}catch{throw new Ao("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),Li}function f0(){return!!window.Shopify?.analytics?.initialized}const ty=mt("webPixels");function h0({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:o,thankYouEntrance:i},observability:a,shop:l,mobileCheckoutSdk:c,source:u,router:d}=b(),p=o.current.value==="shopPay",m=l.hasFlagEnabled(ES),f=QA(),g=Bs()?.config?.pixelEventsMode,y=n?.configuration?.pixelMode,_=!!n?.isCheckoutKit({includeLegacyCsk:!1}),P=g==="DISABLED"||y==="DISABLED",{checkoutProtocolPresentedSignal:v}=Nt(),E=v.value,C=_&&n?.isPreload===!0&&!E,I=Us()&&i.phase.value!=="settled"&&(d.currentUrlMatches("/thank-you")||d.currentUrlMatches("/processing")&&i.progress!=null&&i.progress.phase.value!=="cancelled"),k=r.webPixelsManager.url;r.webPixelsManager.type;const T=r.webPixelsManagerExtensions.url,A=U(),L=U(),M=U(!1),[N]=oe(()=>{const z=new Promise((x,W)=>{A.current=x,L.current=W});return z.catch(()=>{}),z}),O={[Rd]:l.hasFlagEnabled(Rd),[xd]:l.hasFlagEnabled(xd),[Ld]:l.hasFlagEnabled(Ld),[wd]:l.hasFlagEnabled(wd),[Td]:l.hasFlagEnabled(Td),[Ad]:l.hasFlagEnabled(Ad),[Id]:l.hasFlagEnabled(Id),[kd]:l.hasFlagEnabled(kd),[Cd]:l.hasFlagEnabled(Cd)},D=Object.entries(O).filter(([z,x])=>x).map(([z])=>z),[B]=oe({async publish(z,x,W){try{return(await N).publish(z,x,W)}catch{return!1}},async publishCustomEvent(z,x,W){try{return(await N).publishCustomEvent(z,x,W)}catch{return!1}},async publishDomEvent(z,x,W){try{return(await N).publishDomEvent(z,x,W),{type:"success"}}catch(X){return{type:"error",message:X.message}}},async subscribe(z,x,W){try{return(await N).subscribe(z,x,W)}catch{return()=>!1}},async visitor(z,x){try{return(await N).visitor(z,x),{type:"success"}}catch(W){return{type:"error",message:W.message}}}});return F(()=>{const z=J=>{a.log("web_pixel_manager_init",`WebPixelsProvider init: ${J}`,{outcome:J,shopAppDomain:p},{exportImmediately:J!=="loading"})};if(l.webPixelConfigurations===null)return z("web_pixel_configurations_null");if(!l.storefrontUrl)return z("storefront_url_missing");const x=g0();if(x&&!m)return z("shop_mobile_app_context");const W=p||x;if(l.webPixelManagerVersion==="disabled")return z("wpm_version_disabled");const X=W?[]:l.webPixelConfigurations;if(P){L.current?.(new p0("Checkout SDK enabled for partner with pixels suppressed")),z("pixels_suppressed_by_config");return}if(C||M.current){C&&!M.current&&z("deferred_for_preload");return}if(I){z("deferred_for_thank_you");return}if(M.current=!0,z("loading"),typeof PerformanceMark<"u")try{window.performance.mark("wpm:start")}catch{}const Z=c.variant.isStandard(),ce=!n?.isFlagshipPartner&&!!n?.isCheckoutSheetKit,H=$A({shopAppDomain:p,isNativeShopApp:x,isCheckoutKit:_,isSdkSurface:Z||ce});try{const J=l.storefrontUrl,he=m0({storefrontBaseUrl:J,shopId:l.id,webPixelConfigurations:X,webPixelManagerVersion:l.webPixelManagerVersion,initData:f,enabledBetaFlags:D,surface:H,sriMap:l.webPixelsManagerSriMap,managerBaseUrl:k,extensionsUrl:T,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:ai(u)||u.sourceId,facebookCapiEnabled:l.facebookCapiEnabled??!1});let ne=!0;he.then(ae=>{if(A.current)A.current(ae);else throw L.current?.(),new Ao("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined")}).catch(ae=>{ne=!1,a.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${ae?.message}`)}).finally(()=>{a.counter({name:"web_pixel_manager_load",value:1,attributes:{status:ne?"success":"failed",surface:H}})})}catch(J){L.current?.(J),a.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:H}})}},[C,I]),s(ty.Provider,{value:B,children:e})}function g0(){return!!CS(navigator.userAgent)}function ny(){return Ht(ty)}const y0=6167201,v0=12875497473,bp=new Map([[y0,"hydrogen"],[v0,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);
6function ls(e,t,n){const r=new Set([129785,6517121,757165]),o=new Set([3890849,3850711,5198245]),i=580111;return bp.has(e)?bp.get(e):r.has(e)?"retail":o.has(e)?"shop_app":t===ko.CartPermalink?"permalink":e===i?"online_store":n}function ry(){return window?.ShopifyAnalytics?.lib?.trekkie?.defaultAttributes}function oy({eventName:e,checkoutType:t,walletName:n,progressionStepName:r,redirectSource:o,trackingUnique:i,trackingVisit:a}){const{client:l,checkout:c,consentManager:u,i18n:d,observability:p,userEvents:m,shop:f,source:h}=b(),{id:g}=f,y=q().buyerIdentity.value?.customerProfile,_=iu(e),v=Bs()?.config?.type,E=parseInt(Ve(g),10),C=l.unstable_getSerialization("apiClientId")??0,S=i??(l.cookies.get("_shopify_y")||void 0),I=a??(l.cookies.get("_shopify_s")||void 0);return R(()=>{const k=u.analyticsProcessingAllowed.value,T=u.marketingAllowed.value,A=!!(k||T),L={eventName:e,buyerConsentAnalyticsAllowed:k,buyerConsentMarketingAllowed:T,progressionStepName:r,userToken:S,walletName:n};if(!((e==="checkout_started"&&n==="ShopifyPay"||A)&&_)){p.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:e,application:"checkout-web"}}),p.log("checkout_lifecycle_events_not_emitting_event","checkout_lifecycle_events.not_emitting_event",{logPayload:L});return}const N=r==="contact_information"?1:void 0,O=iy(h.type),D=O?h.sourceId:void 0,B=c.configuration.profileId.value,z=_0({eventName:e,walletName:n,shopId:E,checkoutSessionIdentifier:h.checkoutSessionIdentifier,checkoutProfileId:B?parseInt(Ve(B),10):void 0,trackingVisitToken:I,userToken:S,sourceId:D,sourceType:O,customerId:y?.id?parseInt(Ve(y.id),10):void 0,apiClientId:C,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:r,progressionStepNumber:N,redirectSource:o,checkoutProtocolType:v,consentManager:u}),x=z.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...L,progressionStepNumber:N,"context.sourceType":h.type,"context.sourceId":h.sourceId,checkoutType:t,entryPoint:x}),m.monorailEvent(z),p.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:e,checkoutType:h.type,isWallet:n?"true":"false",...n?{walletName:n}:{}}})},[e,r,S,n,E,h,c.configuration.profileId,I,y?.id,C,t,d,o,p,m,_,v,u])}function _0({eventName:e,walletName:t,shopId:n,checkoutSessionIdentifier:r="default",checkoutProfileId:o,trackingVisitToken:i,userToken:a,sourceId:l,sourceType:c,customerId:u,apiClientId:d=0,checkoutType:p,currency:m,locale:f,progressionStepName:h,progressionStepNumber:g,redirectSource:y=void 0,checkoutProtocolType:_,consentManager:P}){const v=ry(),E=_==="MERCHANT"?{apiName:"mobile_checkout_sdk_merchant",checkoutType:ls(d,y,"api")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:o,eventName:e,checkoutType:ls(d,y),checkoutExperience:t?"wallet":"web",entryPoint:"checkout",checkoutPlatform:"checkout_one",checkoutVersion:[p],walletName:t,apiClientId:d||0,currency:m||v?.currency,shopId:n,customerId:u,sourceId:l,sourceType:c,userToken:a||v?.uniqToken,deprecatedVisitToken:i||v?.visitToken,referrer:v?.referer,userAgent:navigator.userAgent,contentLanguage:f,eventTime:new Date().toISOString(),progressionStepName:h,progressionStepNumber:g,buyerConsentAnalyticsAllowed:P.analyticsProcessingAllowed.value,buyerConsentSaleOfDataAllowed:P.saleOfDataAllowed.value,buyerConsentMarketingAllowed:P.marketingAllowed.value,...E}}}function iy(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 v3(e){const n=b().checkout.configuration.layout.isOnePage.value?"one_page":"three_page";return oy({eventName:"checkout_progression",checkoutType:n,walletName:e,progressionStepName:"contact_information"})}function _3(e,t,n,r){const i=b().checkout.configuration.layout.isOnePage.value?"one_page":"three_page";return oy({eventName:"checkout_started",checkoutType:i,walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var Vl=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(Vl||{});class b0{constructor({observability:t,userEvents:n,shopPay:r,isShopPayActive:o,router:i,consentManager:a,shouldEmitEvent:l=!0,context:c,target:u}){this.acceptableEventType=new Set(["pageViewed","sectionComplete","shippingMethodsFilled","sectionInteraction","dom_clicked"]),this.#c=!0,this.#e=t,this.#t=n,this.#r=r,this.#i=o,this.#a=i,this.#l=a,this.#c=l,this.#n=c,this.#s=u}#e;#t;#r;#i;#a;#l;#c;#n;#s;willAccept(t){return this.acceptableEventType.has(t.type)}transmit(t){if(!this.#c||!this.#f(t)){this.#e.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),this.#u(!1);return}const n=this.#m(t);n&&n.progressionStepName!==void 0&&n.progressionStepNumber!==void 0&&(this.#u(!0,n),this.#t.monorailEvent({schemaId:Vl.Lifecycle,payload:n}),this.#e.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:n.checkoutType,isWallet:n.walletName?"true":"false",...n.walletName?{walletName:n.walletName}:{}}}))}transmitImmediately(t){if(!this.#c||!this.#f(t)){this.#e.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),this.#u(!1);return}const n=this.#m(t);n&&n.progressionStepName!==void 0&&n.progressionStepNumber!==void 0&&(this.#u(!0,n),this.#t.monorailEvent({schemaId:Vl.Lifecycle,payload:n},{exportImmediately:!0}),this.#e.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:n.checkoutType,isWallet:n.walletName?"true":"false",...n.walletName?{walletName:n.walletName}:{}}}))}#m(t){const{context:n,type:r}=t;this.#n=n,this.#s=uc(this.#y(n),{isShopPayActive:this.#i,shopPay:this.#r});const o=this.#v(t.timestamp);if(!o)return null;
6if(this.#h()){if(r==="pageViewed"){if(this.#E()){const[i,a]=this.#o("contact");return{...o,progressionStepName:i,progressionStepNumber:a}}if(this.#P()){const[i,a]=this.#o("review");return{...o,progressionStepName:i,progressionStepNumber:a}}}if(r==="shippingMethodsFilled"){const[i,a]=this.#o("shipping");return{...o,progressionStepName:i,progressionStepNumber:a,...this.#g()}}if(r==="sectionInteraction"&&t.section==="payment"){const[i,a]=this.#o("payment");return{...o,progressionStepName:i,progressionStepNumber:a}}if(r==="dom_clicked"){if(t.element.id==="summary_pay_button")if(this.#n.reviewPageRequired){const[i,a]=this.#o("review_order_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}else{const[i,a]=this.#o("pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}if(t.element.id==="review_pay_button"){const[i,a]=this.#o("pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}}}if(this.#b()){if(r==="pageViewed"&&this.#S()){const[i,a]=this.#o(this.#n.step);return{...o,progressionStepName:i,progressionStepNumber:a,...i==="shipping"?this.#g():{}}}if(r==="dom_clicked"){if(t.element.id==="payment_go_to_next_step"){const[i,a]=this.#o(this.#n.reviewPageRequired?"review_order_clicked":"pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}if(t.element.id==="review_go_to_next_step"){const[i,a]=this.#o("pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}}}return null}#y(t){const n=this.#a.currentUrl.value;return t.pathname?new URL(t.pathname,n):n}#v(t){if(!this.#n)return null;const n=iy(this.#n.sourceType),r=n?this.#n.sourceId:void 0;return{userToken:this.#n.userToken,apiClientId:this.#n.apiClientId,sourceId:r,sourceType:n,currency:this.#n.currency,shopId:parseInt(Ve(this.#n.shopId),10),checkoutChainToken:this.#n.checkoutToken,checkoutProfileId:this.#n.checkoutProfileId,checkoutExperience:"web",checkoutPlatform:"checkout_one",eventName:"checkout_progression",deprecatedVisitToken:this.#n.trackingVisit,requestId:this.#n.requestId,checkoutVersion:[this.#h()?"one_page":"three_page",this.#n.workerVersion,this.#n.serverHandling],checkoutType:ls(this.#n.apiClientId),entryPoint:void 0,eventTime:t.toISOString(),buyerConsentAnalyticsAllowed:this.#d(),buyerConsentSaleOfDataAllowed:this.#_(),buyerConsentMarketingAllowed:this.#p()}}#f(t){const n=t.context.consent;return n?FA(n):!!(this.#d()||this.#p())}#d(){return this.#l.analyticsProcessingAllowed.value}#_(){return this.#l.saleOfDataAllowed.value}#p(){return this.#l.marketingAllowed.value}#o(t){const{shippingRequired:n,reviewPageRequired:r}=this.#n||{};let o=2;n&&(o=3);let i=o+1;r&&(i=o+3);const a=o+1;switch(t){case"information":case"contact":case"deliveryAddress":return["contact_information",1];case"shipping":case"delivery":return["shipping",2];case"payment":return["payment",o];case"pay_now_clicked":return["pay_now_clicked",i];case"review_order_clicked":return["review_order_clicked",a];case"review":return["review",n?5:4];default:return[void 0,void 0]}}#h(){return this.#n?.sourceDesign==="c1_redesign"}#b(){return this.#n?.sourceDesign==="c1_legacy"}#P(){return this.#s&&/review/.test(this.#s)}#S(){return["information","shipping","payment","review"].some(t=>this.#s&&new RegExp(t).test(this.#s))}#E(){return this.#s&&/information/.test(this.#s)}#g(){return this.#n?{shippingMacroCostLocal:String(this.#n.selectedDeliveryMacro?.cost?.amount),shippingMacroList:this.#n.deliveryMacros?.map(({id:t})=>t),numDeliveryLines:[this.#n.deliveryLines?.filter(({type:t})=>t==="ONE_TIME_PURCHASE").length||0,this.#n.deliveryLines?.filter(({type:t})=>t==="SUBSCRIPTION").length||0],shippingMacroSelected:this.#n?.selectedDeliveryMacro?.id}:{}}#u(t,n){const r={buyerConsentAnalyticsAllowed:this.#d(),buyerConsentMarketingAllowed:this.#p()};if(!t||!n){this.#e.log("buyer_progression_events_adapter_event_not_transmitted","Not emitting checkout lifecycle event",r);return}this.#e.log("buyer_progression_events_adapter_event_transmitted","Emitting checkout lifecycle event",{...r,progressionStepName:n.progressionStepName,progressionStepNumber:n.progressionStepNumber,userToken:n.userToken,"context.sourceType":this.#n?.sourceType,"context.sourceId":this.#n?.sourceId,"context.apiClientId":this.#n?.apiClientId})}}const sy=1;
6class ay extends Error{constructor(t){super(`Unknown event type: ${t}`),this.name="UnknownEventTypeError"}}function mi(e){return{shopId:Ve(e.shopId),checkoutToken:e.checkoutSessionIdentifier?Ve(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?Ve(e.customerId):void 0}}function P0(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return S0(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return E0(e,t);case"UI_EXTENSION_FETCH":return C0(e,t);default:{const n=e;throw new ay(n.type)}}}function S0(e,t){const n=ys(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:Ve(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?Ve(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:mi(t),__brand:"PreparedEventRefineryPayload"}}function E0(e,t){const n=ys(e.extensionTarget);
6return{event:{...e,appId:Ve(e.appId),extensionId:e.extensionId?Ve(e.extensionId):void 0,extensionTarget:n},context:mi(t),__brand:"PreparedEventRefineryPayload"}}function C0(e,t){const n=ys(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:Ve(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?Ve(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:mi(t),__brand:"PreparedEventRefineryPayload"}}function k0(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:mi(t),__brand:"PreparedEventRefineryPayload"}}function I0(e,t){return{event:e,context:mi(t),__brand:"PreparedEventRefineryPayload"}}function su(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return P0(e,t);case"shopify.event.BuyerEvent":return k0(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":return I0(e,t);default:{const n=e;throw new ay(n.eventTypeName)}}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class A0{constructor(t){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError"]),this.#e=t.userEvents,this.#t=t.source}#e;#t;willAccept(t){return this.acceptableEventTypes.has(t.type)}transmit(t){const{context:n}=t,r=ai(this.#t),o=parseInt(Ve(n.shopId),10),i={pageUrl:n.href??window.location.href,shopId:o,checkoutToken:r?Ve(r):"",eventName:t.type,userToken:n.userToken};if(t.type==="alertDisplayed"){const{target:a,value:l,errorType:c,message:u}=t;this.#e.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...i,errorTarget:a,errorValue:l??void 0,errorType:c,errorMessage:u}})}if(t.type==="uiExtensionError"){const{apiVersion:a,appId:l,appName:c,appVersion:u,extensionName:d,placementReference:p,extensionTarget:m,trace:f,code:h,message:g}=t;this.#e.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...i,extensionApiVersion:a,extensionAppId:l,extensionAppName:c??"",extensionAppVersion:u,extensionName:d,extensionPlacementReference:p??"",errorTarget:m,errorTrace:f??"",errorType:h,errorMessage:g}}),t.extensionType!=="local"&&this.#e.refineryEvent(su({...t.placementReference===void 0?{extensionTarget:t.extensionTarget,placementReference:void 0}:{extensionTarget:t.extensionTarget,placementReference:t.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_ERROR",apiVersion:t.apiVersion,appId:t.appId,appApiKey:t.appApiKey,appVersion:t.appVersion,code:t.code,errorName:t.errorName,extensionId:t.extensionId,registrationId:t.registrationId,message:t.message,schemaVersion:sy,context:t.context},{shopId:n.shopId,checkoutSessionIdentifier:r,customerId:n.customerId}))}}}const Pp="checkout_c1_extension_skeleton_dimensions/3.4";class T0{constructor(t,n,r=!0){this.client=t,this.userEvents=n,this.shouldEmitEvent=r}transmit(t){this.shouldEmitEvent&&t.type==="extensionDimension"&&(this.userEvents.monorailEvent({schemaId:Pp,payload:this.mapEventToMonorailSchema(t)}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:t.skeletonSize,extension_size:t.extensionSize,skeleton_size_source:t.skeletonSizeSource,skeleton_size_match:t.skeletonSizeMatch,extension_type:t.extension.type}}))}willAccept(t){return t.type==="extensionDimension"}transmitImmediately(t){this.shouldEmitEvent&&t.type==="extensionDimension"&&(this.userEvents.monorailEvent({schemaId:Pp,payload:this.mapEventToMonorailSchema(t)},{exportImmediately:!0}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:t.skeletonSize,extension_size:t.extensionSize,skeleton_size_source:t.skeletonSizeSource,skeleton_size_match:t.skeletonSizeMatch,extension_type:t.extension.type}}))}mapEventToMonorailSchema(t){const{context:n,extension:r}=t;return{userToken:n.userToken,customerId:n.customerId,shopId:parseInt(Ve(n.shopId),10),sessionToken:n.sessionToken,checkoutToken:n.
6checkoutToken,apiClientId:n.apiClientId,deviceType:n.deviceType,locale:n.locale,currency:n.currency,browser:n.browser,browserConnectionType:n.browserConnectionType,extensionInstanceId:t.extensionInstanceId,step:t.page,pageLoadId:n.pageLoadId,extensionId:r.extensionId,extensionApiClientId:r.appId,extensionRegistrationId:r.registrationId,extensionType:r.type,extensionPoint:r.extensionPoint.target,extensionPlacementReference:r.placementReference,extensionWidth:t.width,extensionHeight:t.height,viewportWidth:t.viewportWidth,viewportHeight:t.viewportHeight,extensionPositionX:t.positionX,extensionPositionY:t.positionY,publicIdentifier:t.targetPublicIdentifier||t.publicIdentifier,targetPublicIdentifier:t.targetPublicIdentifier,skeletonHeight:t.skeletonHeight,countryCode:t.countryCode,configurationRecordId:n.checkoutProfileId}}}const w0=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"]),au=new Set([...w0,"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 L0{#e;#t;#r;constructor(t){this.#e=t.observability,this.#t=t.userEvents,this.#r=t.source}willAccept(t){return t.type==="extensionFetchCall"}transmit(t){if(!this.willAccept(t))return;const n=t,r=this.#i(n.httpStatus),o="registrationId"in n.extension?n.extension.registrationId:void 0,i=o!=null&&au.has(o),a={destination:n.destination,isHighValueExtension:i,...r&&{http_status_bucket:r},...n.errorType&&{error_type:n.errorType}},l=n.duration??0,c="ms";if(this.#e.histogram({name:"extension_fetch_call_duration",value:l,unit:c,attributes:a}),i&&"type"in n.extension&&"registrationId"in n.extension&&(n.extension.type==="persisted"||n.extension.type==="global")&&this.#e.log("extension_fetch_call_duration","Extension fetch call duration",{value:l,unit:c,appI
6d:n.extension.appId,extensionRegistrationId:n.extension.registrationId,...a}),n.extension.type!=="local"&&n.destination!=="storefront"){const u=ai(this.#r);this.#t.refineryEvent(su({eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_FETCH",apiVersion:n.extension.apiVersion,appId:n.extension.appId,appApiKey:n.extension.appApiKey,appVersion:n.extension.version,extensionId:n.extension.extensionId,registrationId:n.extension.registrationId,extensionTarget:n.extension.extensionPoint.target,placementReference:n.extension.placementReference,durationMs:n.duration,httpStatus:n.httpStatus,httpMethod:n.httpMethod,requestUrl:n.requestUrl,context:n.context},{shopId:n.context.shopId,checkoutSessionIdentifier:u,customerId:n.context.customerId}))}}transmitImmediately(t){this.transmit(t)}#i(t){if(t!==void 0)return String(Math.floor(t/100)*100)}}class x0{#e;#t;constructor(t){this.#e=t.source,this.#t=t.userEvents}willAccept(t){if(t.type!=="extensionLifecycle")return!1;const{extension:n,phase:r}=t;return(r==="mountStart"||r==="mountSuccess"||r==="mountError")&&n!=null}transmit(t){if(!this.willAccept(t))return;const{extension:n,mountId:r}=t,o=ai(this.#e),a={...n.placementReference===void 0?{extensionTarget:n.extensionPoint.target,placementReference:void 0}:{extensionTarget:n.extensionPoint.target,placementReference:n.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appVersion:n.version,extensionId:n.extensionId,mountId:r,registrationId:n.registrationId,schemaVersion:sy,context:t.context};let l;t.phase==="mountStart"?l={...a,type:"UI_EXTENSION_MOUNT_START"}:l={...a,type:"UI_EXTENSION_MOUNT_END",durationMs:t.duration??0,...t.error?.name&&{failureErrorName:t.error.name},mountOutcome:t.phase==="mountSuccess"?"SUCCESS":R0(t.error)},this.#t.refineryEvent(su(l,{shopId:t.context.shopId,checkoutSessionIdentifier:o,customerId:t.context.customerId}))}}function R0(e){return e?.name&&Bf(e.name)?"APP_FAILURE":"OTHER_FAILURE"}const M0=["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"],N0={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"},D0=Object.values(N0),O0=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...D0.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"],F0=["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"];class B0{constructor(){this.type="extensionBuyerJourneyBlock"}map(t){if(t.type!==this.type)return;const n=t.extension.registrationId;
6return{type:"counter",name:"extension_buyer_journey_block_event",value:1,attributes:{isHighValueExtension:n!=null&&au.has(n)}}}}class V0{constructor(){this.type="extensionInteraction"}map(t){if(t.type!==this.type)return;let n=t.interaction;O0.includes(n)||(n="unknownEvent");const r=t.error?ks(t.error):void 0;return t.duration==null?{type:"counter",name:"extension_interaction_count_event",value:1,attributes:{event_name:n,validation_error:r}}:{type:"histogram",name:"extension_interaction_distribution_event",value:t.duration,attributes:{event_name:n,validation_error:r}}}}class U0{constructor(){this.type="extensionLifecycle"}map(t){if(t.type!==this.type||M0.includes(t.phase))return;const n=t.extension?.registrationId,r={step:t.phase,checkoutType:ls(t.context.apiClientId),isRemoteDom:t.extension?.apiVersion?PA(t.extension?.apiVersion):!1,isHighValueExtension:n!=null&&au.has(n)};if(t.error!==void 0&&(r.error=ks(t.error)),t.duration==null)return{type:"counter",name:"extension_lifecycle_count_event",value:1,attributes:r};if(t.duration!=null)return{type:"histogram",name:"extension_lifecycle_distribution_event",value:t.duration,attributes:r}}}class z0{constructor(t){this.client=t}#e=new Map([new B0,new V0,new U0].map(t=>[t.type,t]));willAccept(t){return this.#e.has(t.type)}transmit(t){const n=this.#t(t);if(!n)return;const{name:r,value:o,attributes:i,unit:a,type:l}=n;switch(l){case"histogram":this.client.histogram({name:r,value:o,attributes:i,unit:a});break;case"gauge":this.client.gauge({name:r,value:o,attributes:i,unit:a});break;case"counter":this.client.counter({name:r,value:o,attributes:i,unit:a});break}}transmitImmediately(t){this.transmit(t)}#t(t){return this.#e.get(t.type)?.map(t)}}var Ul=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(Ul||{});function xi(e){return H0(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(t=>t.toLowerCase()).join("_")}function H0(e){return e.replace(/([a-z])([A-Z]+)/g,(t,n,r)=>`${n} ${r}`).replace(/([A-Z])([A-Z]+)([^a-zA-Z0-9]*)$/,(t,n,r,o)=>n+r.toLowerCase()+o).replace(/([A-Z]+)([A-Z][a-z])/g,(t,n,r)=>`${n.toLowerCase()} ${r}`)}class q0{constructor(t,n=!0){this.client=t,this.shouldEmitEvent=n,this.acceptableEventType=new Set(["extensionLifecycle","extensionInteraction","extensionUiInteraction","extensionBuyerJourneyBlock","extensionFetchCall","click","change","inventoryPriceChange","autofill","impression","moreShippingOptions","deliveryMacroInteraction","splitShipAndPickupIntent"])}willAccept(t){return this.acceptableEventType.has(t.type)}transmit(t){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Ul.InteractionAndImpression,payload:this.mapEventToMonorailSchema(t)})}transmitImmediately(t){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Ul.InteractionAndImpression,payload:this.mapEventToMonorailSchema(t)},{exportImmediately:!0})}commonExtensionEventFields(t){return t.extension===null?{}:{extensionId:t.extension.extensionId,extensionApiClientId:t.extension.appId,extensionRegistrationId:t.extension.registrationId,extensionPublicIdentifier:t.extension.publicIdentifier,extensionTargetPublicIdentifier:t.extension.targetPublicIdentifier,extensionType:t.extension.type,extensionPoint:t.extension.extensionPoint.target,extensionPlacementReference:t.extension.placementReference,section:t.section}}mapEventToMonorailSchema(t){const{context:n,timestamp:r,type:o}=t,i={frontendEventTimestampEpochMs:r.getTime(),userToken:n.userToken,customerId:n.customerId,shopId:n.shopId,sessionToken:n.sessionToken,checkoutToken:n.
6checkoutToken,checkoutProfileId:n.checkoutProfileId,apiClientId:n.apiClientId,sourceId:n.sourceId,sourceType:n.sourceType,identityProvider:n.identityProvider,sourceDesign:n.sourceDesign,deviceType:n.deviceType,locale:n.locale,currency:n.currency,browser:n.browser,browserConnectionType:n.browserConnectionType,frontendEventTimeZone:n.frontendEventTimeZone,companyContactId:n.companyContactId,companyLocationId:n.companyLocationId,checkoutToDraft:n.checkoutToDraft,editableShippingAddress:n.editableShippingAddress,payNowOnly:n.payNowOnly,clientIp:n.clientIp,checkoutSdkVersion:n.checkoutSdkVersion,checkoutSdkVariant:n.checkoutSdkVariant,checkoutSdkSchemaVersion:n.checkoutSdkSchemaVersion,serverRendered:n.serverRendered,clientHydrated:n.clientHydrated,pageLoadId:n.pageLoadId};switch(o){case"change":{const a=t.element.type==="tel"||t.element.name==="email"?"contact":t.element.name;return{...i,eventName:`${a?`${xi(a)}_`:""}field_value_changed`,eventType:`${t.element.type?`${t.element.type}_`:""}${t.element.tagName.toLowerCase()}_change`,fieldValue:t.element.value,labelValue:t.element.label,section:t.section}}case"click":return{...i,eventName:`${t.element.textContent?`${xi(t.element.textContent)}_`:""}clicked`,eventType:`${t.element.tagName.toLowerCase()}_click`,labelValue:t.element.label,section:t.section,identityProvider:t.identityProvider};case"autofill":return{...i,eventName:`${xi(t.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${xi(t.source)}_autofill`,section:t.section};case"extensionLifecycle":{const a=l=>{switch(l){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_${l}`}};return{...i,...t.duration!==void 0&&{frontendEventsTimeDifferenceMs:Math.round(t.duration)},...t.eventValue!==void 0&&{eventValue:t.eventValue.toString()},...t.apiPropertyName!==void 0&&{eventValue:t.apiPropertyName},...this.commonExtensionEventFields(t),eventName:a(t.phase),eventType:"extension_lifecycle",step:t.page,extensionInstanceId:t.instanceId,...t.mountId&&{mountId:t.mountId},...t.ttsCompletionReason!==void 0&&{extensionTtsCompletionReason:t.ttsCompletionReason},...t.ttsRenderObserved!==void 0&&{extensionTtsRenderObserved:t.ttsRenderObserved},...t.ttsRequestCount!==void 0&&{extensionTtsRequestCount:t.ttsRequestCount},initialLoad:t.initialPageLoad,transferredBundleSize:t.transferredBundleSize,bundleSize:t.bundleSize,validationErrors:t.error?[xl(t.error)]:[]}}case"extensionFetchCall":return{...i,...this.commonExtensionEventFields(t),eventName:t.errorType?"extension_network_call_errored":"extension_network_call_ended",eventType:"extension_lifecycle",frontendEventsTimeDifferenceMs:Math.round(t.duration),fetchDestination:t.origin,fetchHttpStatus:t.httpStatus,fetchErrorType:t.errorType};case"extensionBuyerJourneyBlock":return{...i,...this.commonExtensionEventFields(t),eventName:"extension_buyer_journey_blocked",eventType:"extension_buyer_journey_block_progress",eventValue:t.reason,validationErrors:t.validationErrors.map(a=>JSON.stringify(a))};case"extensionInteraction":{const a=l=>{switch(l){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";case"unknownChangeStart":return"unknown_event";case"unknownChangeSuccess":return"unknown_event";case"unknownChangeError":return"unknown_event";default:return(u=>"unknown_event")()}};return{...i,...t.duration&&{frontendEventsTimeDifferenceMs:Math.round(t.duration)},...this.commonExtensionEventFields(t),eventName:`extension_${a(t.interaction)}
6`,eventType:"extension_interaction",validationErrors:t.error?[xl(t.error)]:[],extensionInstanceId:t.extensionInstanceId,initialLoad:t.initialLoad,...t.eventId&&{eventValue:t.eventId},...t.throttleCounter!==void 0&&{throttleCounter:t.throttleCounter}}}case"extensionUiInteraction":{const a=c=>{switch(c){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"}},l=c=>{switch(c){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{...i,componentType:t.componentType,componentInstanceId:t.componentInstanceId,...this.commonExtensionEventFields(t),eventName:a(t.interaction),eventType:l(t.interaction)}}case"impression":return{...i,eventType:"impression",eventName:`${t.impressionType}_impression`,eventValue:t.eventValue,impressionFeatures:t.impressionFeatures,section:t.section,identityProvider:t.identityProvider,...t.impressionType==="delivery_macros"?Da(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[]):{}};case"moreShippingOptions":return{...i,eventType:"more_shipping_options",eventName:t.subEvent,...Da(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[])};case"deliveryMacroInteraction":return{...i,eventType:"delivery_macro_interaction",eventName:t.subEvent,...Da(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[])};case"splitShipAndPickupIntent":return{...i,eventType:"split_ship_and_pickup",eventName:"split_ship_and_pickup_intended"};default:return{...i,eventName:"unknown_interaction_event",eventType:"interaction"}}}}function Da(e,t,n){return{shippingNumSplits:n?.length,splitShippingDeliveryGroups:JSON.stringify(n.map(r=>({id:r.id,numItems:r.targetMerchandiseLines?.length??0,productItemIds:r.targetMerchandiseLines?.map(o=>o.id?Ve(o.id):"")??[],deliveryMethods:r.methods.map(o=>({title:o.title,handle:o.handle,cost:o.cost.amount,deliveryEstimate:o.deliveryPromisePresentmentTitle?.long}))}))),splitShippingMacros:JSON.stringify(t.map(r=>({selected:e?.id===r.id,handle:r.id,cost:r.cost.amount,title:r.title,methods:Object.entries(r.deliveryMethodHandles).map(([o,i])=>({deliveryGroup:o,deliveryMethod:i}))})))}}class G0{constructor(t){this.client=t,this.acceptableEventType=new Set(["receiptError","paymentError","violationError","addressError"])}willAccept(t){return this.acceptableEventType.has(t.type)}transmit(t){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(t)})}transmitImmediately(t){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(t)},{exportImmediately:!0})}mapEventToMonorailSchema(t){const{context:n,type:r}=t,o={userToken:n.userToken,shopId:n.shopId,sessionToken:n.sessionToken,checkoutToken:n.
6checkoutToken,apiClientId:n.apiClientId,sourceId:n.sourceId,sourceType:n.sourceType,sourceDesign:n.sourceDesign,requestId:n.requestId,checkoutSdkVersion:n.checkoutSdkVersion,checkoutSdkVariant:n.checkoutSdkVariant,checkoutSdkSchemaVersion:n.checkoutSdkSchemaVersion};switch(r){case"receiptError":return{...o,errorMessage:t.error.message||"",eventName:"receipt_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:t.error.silencedViolation||!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""};case"addressError":return{...o,errorMessage:t.error.message||"",eventName:"address_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""};case"paymentError":return{...o,errorMessage:t.error.message||"",eventName:"payment_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:t.error.silencedViolation||!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""};case"violationError":return{...o,errorMessage:t.error.message||"",eventName:"validation_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:t.error.silencedViolation||!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""}}return{...o,errorMessage:"Unknown error",eventName:"error",eventType:"interaction_error",errorReason:"",silencedViolation:!1,errorOrigin:"unknown",errorType:"unknown"}}}class W0{constructor(t,n=!0){this.observability=t,this.shouldEmitEvent=n,this.acceptedTypes=new Set(["click"])}willAccept(t){return this.acceptedTypes.has(t.type)}transmit(t){if(!this.shouldEmitEvent)return;const n=this.createDescriptiveLogName(t),{context:r,...o}=t;this.observability.log("telemetry_events_adapter_event_transmitted",n,o)}createDescriptiveLogName(t){const{section:n,type:r,element:o}=t;return[n,r,o.tagName.toLowerCase()].join("_")}}class $0{constructor(t){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError","pageViewed","sectionComplete","shippingMethodSelected","shippingMethodsFilled","sectionInteraction","pageSubmit","dom_clicked","dom_input_focused","dom_input_blurred","dom_input_changed"]),this.webPixels=t.webPixels}willAccept(t){return this.acceptableEventTypes.has(t.type)}transmit(t){t.type==="pageViewed"&&this.webPixels.publish("page_viewed",{});const n=Y0(t);if(n===this.mostRecentEvent)return;if(this.mostRecentEvent=n,t.type==="shippingMethodsFilled"||t.type==="shippingMethodSelected"){const o=Oa(t),a=(o?.delivery?.selectedDeliveryOptions??[]).some(l=>l.type==="shipping");o&&a&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:o})}if(t.type==="sectionComplete"){const o=Oa(t);if(o)switch(t.section){case"contact":{this.webPixels.publish("checkout_contact_info_submitted",{checkout:o});break}case"deliveryAddress":{this.webPixels.publish("checkout_address_info_submitted",{checkout:o});break}}}if(t.type==="pageSubmit"){const o=Oa(t);o&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:o})}if(t.type==="alertDisplayed"&&this.webPixels.publish("alert_displayed",{alert:{target:t.target,value:t.value,type:t.errorType,message:t.message}}),t.type==="uiExtensionError"&&this.webPixels.publish("ui_extension_errored",{error:{apiVersion:t.apiVersion,appId:t.appId,appName:t.appName??"",appVersion:t.appVersion,extensionName:t.extensionName,message:t.message,placementReference:t.placementReference??null,extensionTarget:t.extensionTarget,trace:t.trace??"",type:t.code}}),j0(t))if(K0(t))this.webPixels.publishDomEvent("clicked",{...Vf(t,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const o=J0(t.type);this.webPixels.publishDomEvent(o,{element:t.element})}}}function Oa(e){return lg({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}function Y0(e){return JSON.stringify(e,(t,n)=>t==="timestamp"||t==="webPixelCheckout"?"":n)}function j0(e){return e.type.startsWith("dom")}function K0(e){return e.type==="dom_clicked"}function J0(e){return e.replace("dom_","")}const ly=mt("EventHubContext");function X0(){return Ht(ly)}function Q0({children:e}){const{observability:t,userEvents:n,shopPay:r,checkout:{identity:o},source:i,router:a,consentManager:l}=b(),c=o.current.value==="shopPay",u=ny(),d=iu(),p=V(()=>{const m=[new q0(n,d),new G0(n),new z0(t),new T0(t,n,d),new L0({observability:t,userEvents:n,source:i}),new x0({userEvents:n,source:i}),new W0(t,d),new $0({webPixels:u}),new b0({observability:t,userEvents:n,shopPay:r,isShopPayActive:c,router:a,consentManager:l}),new A0({userEvents:n,source:i})];return new Z0(m)},[t,n,r,c,u,i,d,a,l]);return s(ly.Provider,{value:p,children:e})}class Z0{constructor(t){this.clients=t}emit(t){this.transmit(t)}
6transmit(t){this.clients.forEach(n=>{n.willAccept(t)&&(t.transmitImmediately&&n.transmitImmediately?n.transmitImmediately(t):n.transmit(t))})}}function cy(){const{client:e,shop:t,checkout:n,i18n:r,source:o,mobileCheckoutSdk:i,router:a}=b(),{currentPage:l}=Se().value,{pathname:c}=a.currentUrl.value,u=ou(),d=u?.trackingUnique??ts({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??ts({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=q(),f=m.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=Sn(),y=q().buyerIdentity.value?.purchasingCompany,{value:_}=m.paymentFlexibilityPaymentTermsTemplate,P=Bn(),{value:v}=m.deliveryNext,{selectedMacro:E}=l0(),C=Rc({base:!0,small:!1}),S=n.configuration.layout.isOnePage.value,I=n.identity.current.value==="shopPay",k=navigator.connection?.effectiveType??"unknown",T=e.unstable_getSerialization("requestId"),A=l?.id,L=e.unstable_getSerialization("apiClientId")??0,M=e.unstable_getSerialization("workerVersion")??"proxy",N=e.unstable_getSerialization("serverHandling")??"proxy";let O="c1_legacy";S&&(O="c1_redesign"),I&&(O="shop_pay");const D=Uf(v),{deliveryMacros:B}=ie(),z=B.value,{isServerRendered:x}=e.initialRequest,W=n.configuration.profileId.value;return V(()=>({userToken:d,trackingVisit:p,customerId:f?.id,shopId:t.id,sessionToken:h,checkoutToken:o.checkoutSessionIdentifier,checkoutProfileId:W?parseInt(Ve(W),10):void 0,apiClientId:L,sourceId:o.sourceId,sourceType:o.type,identityProvider:void 0,sourceDesign:O,deviceType:C?"mobile":"desktop",locale:r.locale,currency:r.currency,browser:navigator.userAgent,browserConnectionType:k,frontendEventTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,clientIp:"0.0.0.0",userAgent:navigator.userAgent,companyContactId:y?f?.id:void 0,companyLocationId:y?.location.id,companyId:y?.company.id,checkoutToDraft:P.value,editableShippingAddress:g.value,payNowOnly:!_&&!P.value,shippingRequired:n.isShippingRequired.value,requestId:T,step:A,pathname:c,checkoutSdkSchemaVersion:i.config.schema||void 0,checkoutSdkVersion:i.config.version||void 0,checkoutSdkVariant:i.variant.value?.toUpperCase(),workerVersion:M,serverHandling:N,reviewPageRequired:t.confirmationPageEnabled,serverRendered:x,clientHydrated:x,...v?.status==="filled"?{selectedDeliveryMacro:D?E:void 0,deliveryMacros:D?z:[],deliveryLines:v.lines.filter(cc)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:kS}),[d,p,f?.id,t.id,t.confirmationPageEnabled,h,o.checkoutSessionIdentifier,o.sourceId,o.type,W,L,O,C,r.locale,r.currency,k,y,P.value,g.value,_,n.isShippingRequired.value,T,A,c,i,M,N,v,D,E,z,x])}function xn(){if(typeof window>"u")return ex;const{shop:e,consentManager:t,source:n,i18n:r}=b(),o=X0(),i=cy(),a=U(i),l=Xe(),c=ie();return a.current=i,R((u,d)=>{o.emit({type:u,context:{...a.current,href:window.location.href,consent:OA(t),webPixelCheckout:_T({type:u,step:a.current.step,section:d.section},{negotiated:l,proposedParts:c,source:n,locale:r.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...d})},[o,a,e,t,l,c,n,r])}function ex(){}function uy(e,t){const{router:n}=b();F(()=>{if(n.currentUrl.peek().hash!=="")return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function tx(){const e=xn(),{client:t}=b();return R(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 dy(){const e=xn(),{observability:t}=b();function n(r){e("alertDisplayed",r),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:fT(r)})}return n}function nx(){const{checkout:e}=b(),t=e.configuration.addressSettings.nonBillingAddressSettings;return w(()=>{if(!t.value?.validationEnabled)return"BASIC"})}function rx(){const{i18n:e}=b();return R((t,n)=>IS(e,t,n),[e])}function ox(){const{i18n:e,checkout:t,shopPay:n}=b(),r=rx(),o=n.user.installments.isRetryable.value,{paymentMethods:i,paymentDue:a}=q(),l=w(()=>AS(i.value));if(!t.installments.isSupported.value||!l.value)return"";const c=l.value,u=a.value,d=!!(c.cbtEnabled&&u&&(c.minPrice.currencyCode!==u.currencyCode||c.maxPrice.currencyCode!==u.currencyCode));if(o)return e.translate("installments.installments_condition_retryable");const p=y=>{switch(y){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 y}},m=y=>
6{switch(y){case"amount":return d||c.cbtEnabled&&c.availableLoanTypes.length===0&&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:r(c.supportedCountries.map(p),Md.Or)});case"currency":return d&&u&&c.supportedCurrencies.includes(u.currencyCode)?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:r(c.supportedCurrencies,Md.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")}},f=t.installments.ineligibilityReasons.value,h=!n.user.installments.isRejected.value;if(h&&f.length===0)return"";const g=(h&&f.length>0?f:["user_rejected"]).map(m);return(c.cbtEnabled?[...new Set(g)]:g).join(" ")}function ix(){const e=q().customAttributes;return w(()=>{const t=Ai(TS,e?.value),n=Ai(wS,e?.value),r=Ai(LS,e?.value),o=Ai(xS,e?.value);return{retailTraceId:t?.value||"",deviceId:n?.value||"",locationId:r?.value||"0",userId:o?.value||"0"}})}function Fa(e,t){return t?.availableLoanTypes?.includes(e)??!1}function sx(e){const{retailTraceId:t,deviceId:n,userId:r,locationId:o}=ix().value,{shop:{id:i},source:{checkoutSessionIdentifier:a},checkout:l}=b(),c=RS(),{value:u}=ri(),d=l.installments.config.value,p=u?.amount?Number(u.amount):0,m=l.installments.isCheckoutEligible.value,f=ox(),h=Fa("SPLIT_PAY",d),g=Fa("INTEREST",d),y=Fa("ZERO_PERCENT",d),P=u?.currencyCode||"USD";return V(()=>({userId:parseInt(r,10),shopId:parseInt(Ve(i),10),locationId:parseInt(o,10),posCheckoutToken:t,stage:e||"",totalOrderValue:p||0,cartItemsCount:c.value||0,installmentsEligible:m||!1,posDeviceId:n,currency:P,shopPayCheckoutToken:a,ineligibilityReason:f,splitPayEligible:h,interestBearingEligible:g,zeroPercentEligible:y}),[e,t,n,r,o,p,m,i,c.value,P,a,f,h,g,y])}function fi(){const e=q().customAttributes;return w(()=>MS(e.value))}function ax(e,t){return typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e):(t?.leaveErrorBreadcrumb("[usePersistedState] requestIdleCallback was not available, used setTimeout fallback"),window.setTimeout(e,0))}function lx(e,t){typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(e):typeof e=="number"&&(window.clearTimeout(e),t?.leaveErrorBreadcrumb("[usePersistedState] cancelIdleCallback was not available during cleanup, used clearTimeout fallback"))}function lu(e){const{observability:t}=b(),[n,r]=oe(()=>DS(e));return F(()=>{const o=ax(()=>{NS(e,n)},t);return()=>{lx(o,t)}},[e,t,n]),[n,r]}function Ri(e,t){const{persistence:n}=b(),r=n?.get(e,t),o=we(r);return ze(()=>{n?.createUpdate(e,t)(o.value)}),o}const py=mt("AnalyticsContext");function cx({children:e}){const t=V(()=>new ux,[]);return s(py.Provider,{value:t,children:e})}function my(){return Ht(py)}class ux{constructor(){this.eventHistory=[],this.listeners=new Set}emit(t){this.eventHistory.push(t);for(const n of this.listeners)n(t)}subscribe(t){this.listeners.add(t);for(const n of this.eventHistory)t(n);return()=>{this.listeners.delete(t)}}}function fy(){const e=my();return R(t=>e.emit(t),[e])}function Ba(e){const t=my();F(()=>t.subscribe(e),[e,t])}function dx(){const{client:e}=b();return e.unstable_getSerialization("shopPayConfig").redirect_source}function px(){const[e,t]=lu(hn.TrackedSourceId),{source:{sourceId:n}}=b();return F(()=>{t(n)},[n,t]),{previouslyTracked:n===e}}const hy=()=>{const{url:e}=b(),t=e.shopPayRememberMe();return!!no()?.redirectUrl?.includes(t)};function mx(){const[e,t]=lu(hn.TrackedCompleteOrderSourceId),n=no(),r=hy(),{source:{sourceId:o}}
6=b();return F(()=>{n&&!r&&t(o)},[o,n,r,t]),{previouslyTracked:o===e}}function fx(){const e=Se();return w(()=>{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}})}function hx(){const e=U(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:o}}=b(),i=o.current.value==="shopPay",a=er();ze(()=>{a.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(Ve(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:i?"shop_pay":"guest_checkout"}}),e.current=!0)})}function b3({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:n,shop:{id:r},checkout:{identity:o},source:i}=b(),a=o.current.value==="shopPay",l=q().buyerIdentity.value?.customerProfile,c=p=>p.handle===e,u=t.find(c)?.originLocation?.id,d=t.findIndex(c);return R(p=>n.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:p,checkoutToken:i.checkoutSessionIdentifier||"",shopId:parseInt(Ve(r),10),locationId:u&&Ve(u),selectedLocationRank:d,userId:l?.id?parseInt(Ve(l.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:a?"shop_pay":"guest_checkout"}}),[l?.id,a,u,t.length,n,d,r,i.checkoutSessionIdentifier])}const Sp=580111;function gx(){const{client:e,userEvents:t,i18n:{locale:n},shop:r,source:o,mobileCheckoutSdk:i}=b(),a=q(),l=a.buyerIdentity.value?.customerProfile,c=iu(),u=fx(),{value:d}=zf(),{value:p}=Hf("ONE_TIME_PURCHASE"),m=Qr(p),f=!!m&&m?.costAfterDiscounts.amount===0,{value:h}=a.taxes,{value:g}=a.merchandiseLines,{value:y}=a.paymentLines,{value:_}=a.discountLines,{value:P}=a.contactInfo,{value:v}=a.buyerIdentity,{value:E}=dc(),[C,S]=oe("");hx();function I(j){return j.toFixed(2)}function k(j){return parseInt(Ve(j),10)}const T=V(()=>f?void 0:m?.costAfterDiscounts?.amount||m?.cost.amount,[f,m?.costAfterDiscounts?.amount,m?.cost?.amount]),A=V(()=>E?.currencyCode==="USD"?E.amount:void 0,[E?.amount,E?.currencyCode]),L=V(()=>g?.lines?.filter(j=>j.productId).map(j=>k(j.productId)),[g?.lines]),M=V(()=>g?.lines?.filter(j=>j.variantId).map(j=>k(j.variantId)),[g?.lines]),N=V(()=>g?.lines?.map(j=>{const Q=j.totalPrice.amount;return Q===void 0?"":I(Q)}),[g?.lines]),O=V(()=>g?.lines?.every(j=>j.totalPrice.currencyCode==="USD")?g?.lines?.map(j=>{const Q=j.totalPrice.amount;return Q===void 0?"":I(Q)}):void 0,[g?.lines]),D=V(()=>g?.lines?.map(j=>j.quantity),[g?.lines]),B=V(()=>D?.reduce((j,Q)=>j+Q,0),[D]),z=V(()=>D?.length,[D]),x=V(()=>y?.lines.filter(j=>j.method.type==="giftCard"&&j.cost?.amount).map(j=>I(j.cost.amount)),[y?.lines]),W=V(()=>{if(u.value!=="thank_you"&&u.value!=="post_purchase")return;const j=y?.lines.find(H=>H.method.type==="giftCard"&&H.cost?.amount)?"giftCard":void 0,Q=y?.lines.filter(H=>H.method.type!=="giftCard").map(H=>H.method.type);return Q&&Q?.length>0?Q[0]:j},[y?.lines,u.value]),X=V(()=>_?.lines.reduce((j,Q)=>{if(!to(Q))return j;let H=j;H||(H=[]);const J=Q.amount?.amount;return J&&H.push(I(J)),H},[]),[_]),Z=ou(),ce=R(()=>{const j=h?.status==="available_total"?h.totalTax.amount:void 0,Q=l?.id?k(l.id):void 0,H=l?.fullName||void 0,J=Z?.trackingUnique??ts({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),he=Z?.trackingVisit??ts({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:o.type==="cartNext"?o.sourceId:void 0,customerId:Q,trackingUnique:J,shopId:k(r.id),eventTimestampEpochMs:Date.now(),trackingVisit:he,userAgent:navigator.userAgent,landingPage:e.cookies.get("_landing_page")||void 0,customerEmail:l?.email||P?.email,contentLanguage:n,actionName:"query",remoteIp:void 0,totalPrice:E?.amount?I(E?.amount):void 0,customerName:H,lineItemProductIds:L,lineItemVariantIds:M,lineItemTotalPrice:N,lineItemTotalPriceUsd:O,lineItemQuantity:D,currency:v?.presentmentCurrency||r.currencyCode,totalItemCount:B,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:A?I(A):void 0,apiClientId:Sp,currentApiClientId:Sp,paymentMethod:W,paymentProviderId:void 0,currentStep:u.value,checkoutToken:o.checkoutSessionIdentifier,totalShipping:T?I(T):void 0,sourceProcessor:"web_checkout",appliedGiftCards:x?.length?x:void 0,subtotalPrice:d?.amount?I(d.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:f.valueOf(),totalTax:j?I(j):void 0,appliedDiscounts:!X||X.length<1?void 0:X,orderId:void 0,distinctItemCount:z,javascriptEnabled:!0,checkoutPlatform:"checkout_one",checkoutSdkVersion:i.config.version||void 0,checkoutSdkSchemaVersion:i.config.schema||void 0,checkoutSdkVariant:i.variant.value?.toUpperCase()}}},[X,h,f,d,x,o,T,E?.amount,A,u,v?.presentmentCurrency,r,B,D,N,O,M,L,l,P,z,n,W,Z,e,i]);return F(()=>{c&&(C!==u.value&&t.monorailEvent(ce()),S(u.value))},[C,u.value,t,ce,S,c]),s(G,{})}const yx=He({suspenseName:"trekkie",displayName:"Trekkie",load:()=>lt(()=>Be(()=>import("./b887ec56.B2nrNlY2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])))});function vx(){const e=Xe(),t=ie(),n=ny(),{plan:r}=Se().value,{router:o,i18n:{locale:i},shop:{currencyCode:a,marketDrivenShippingEnabled:l},source:c}=b(),u=no(),d=VA(),p=R(()=>{const h=Gi({negotiated:e,source:c,proposedParts:t,locale:i,shopCurrencyCode:a,marketDrivenShippingEnabled:l});requestAnimationFrame(()=>{n.publish("payment_info_submitted",{checkout:h})})},[e,c,n,t,i,a,l]),m=R(()=>{const h=Gi({negotiated:e,source:c,proposedParts:t,locale:i,shopCurrencyCode:a,marketDrivenShippingEnabled:l});n.publish("checkout_started",{checkout:h})},[e,c,n,t,i,a,l]),f=R(()=>
6{if(!u||d.shouldPrevent())return;const h=Gi({negotiated:e,receipt:u,source:c,orderId:u.orderIdentity.id,customerId:u.customerId||void 0,isFirstOrder:u.isFirstOrder,locale:i,shopCurrencyCode:a,marketDrivenShippingEnabled:l});d.markAsEmitted();const g=u.analytics?.checkoutCompletedEventId;let y=!1;function _(){if(y)return;y=!0,window.removeEventListener("pagehide",_),document.removeEventListener("visibilitychange",P);const v=qA(r.detours,o.currentUrl.value.normalizedPath),E={...g&&{eventId:g},checkoutCompletedPageType:v},C=Object.keys(E).length>0?E:void 0;n.publish("checkout_completed",{checkout:h},C)}function P(){document.visibilityState==="hidden"&&_()}window.addEventListener("pagehide",_),document.addEventListener("visibilitychange",P),document.visibilityState==="hidden"?_():requestAnimationFrame(_)},[u,e,c,n,o,r.detours,i,a,l,d]);return Ba(R(h=>{h.type==="initiate_checkout"&&m()},[m])),Ba(R(h=>{h.type==="add_payment_info"&&p()},[p])),Ba(R(h=>{h.type==="complete_checkout"&&f()},[f])),null}const _x=["/processing","/thank-you","/error","/post-purchase"],bx=[ko.DirectCheckoutCheckout,ko.CheckoutPaymentStep,ko.ShopPayInstallmentsAsPaymentMethod,ko.ShopPayAsPaymentMethod];function Px(){ou();const e=fy(),{currentPage:t,currentDetour:n}=Se().value,{userEvents:r,source:o,router:i}=b(),a=px(),l=mx(),{normalizedPath:c}=i.currentUrl.value,u=no(),d=fi().value,p=sx(OS.SHOP_PAY_CHECKOUT_COMPLETE),m=q().paymentLines?.value?.lines,f=dx(),h=xn(),g=hy();return F(()=>{const y=n?.route??t?.route;if(y){h("pageViewed",{timestamp:new Date});const _=["/"];t&&["onePage"].includes(t.id)&&_.includes(y)?e({type:"one_page_checkout_page_view",url:y}):e({type:"page_view",url:y})}},[t,n,h,e]),tr(y=>{"negotiationStage"in y&&y.negotiationStage==="negotiation"||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})}),F(()=>{u&&(g||l.previouslyTracked||(e({type:"complete_checkout"}),d&&UA(r,u,p)))},[e,u,g,l,d,r,p]),F(()=>{(o.type==="cartNext"||o.type==="checkout")&&!a.previouslyTracked&&e({type:"initiate_checkout_once_per_checkout",url:c})},[e,c,o.type,a.previouslyTracked]),F(()=>{const y=i.currentUrl.value.normalizedPath,_=!!Pt(m,"GOOGLE_PAY"),P=o.type==="cartNext"||o.type==="checkout",v=()=>_&&y==="/processing"?!0:!_x.includes(y),E=f?!bx.includes(f):!0;P&&v()&&E&&e({type:"initiate_checkout",url:y})},[]),s(G,{children:[s(gx,{}),s(yx,{}),s(vx,{})]})}const Sx=Qn(function({children:t}){const n=wt();return s(cx,{children:[t,s(ve,{when:n,children:s(Px,{})})]})});function Ex(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r}}=b(),o=FS(),{billingAddress:i}=ie(),a=i.value,{details:l}=Jt(a.countryCode),c=nx();return tr(u=>{if(u.type==="complete"&&i&&o.value.defaultAttributes){const d=o.value.defaultAttributes?.uniqToken||"",p=l?.zones?.find(m=>m.code===a.zoneCode)?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.
6checkoutSessionIdentifier||"",shopId:parseInt(Ve(t),10),uniqueToken:d,territory:l?.name||"",context:"Billing address",address1:a.address1||"",address2:a.address2||"",city:a.city||"",zone:p||"",zip:a.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:c.value}})}}),null}const gy=mt("WebPixelTargetContext"),cu=({children:e,target:t})=>s(gy.Provider,{value:t,children:e});function Er(){const{checkout:e}=b();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}function Cx(){const{client:e}=b(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return t===!0&&n===!0}const kx=He({displayName:"AdminPreviewBar",load:()=>Be(()=>import("./a6e11e56.aAO-IiW-.js"),__vite__mapDeps([10,1,2,3,4,5,6,7,8,9,11])),suspense:!1});function Ix(){const{router:e,source:t,shop:n}=b(),r=n.configurationPreviewContext!=="no-preview",o=U(e.currentUrl.peek()).current;return Ax({source:t,isThemeEditor:pc(),hasServerPreviewContext:r})?s(kx,{initialUrl:o}):null}function Ax({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return e.previewScript?.name!=null||e.type!=="simulated"&&!t&&n}function yy(){const e=U(!1);return F(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const zs=Ge(void 0);function vy(){const e=Pe(zs);if(!e)throw new sc("Missing FocusManager Context ");return e.focusErrors}function Tx(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return t==="rtl"||t==="ltr"?t:e.dir==="rtl"?"rtl":"ltr"}function wx({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}function Lx(e){const t=e.ref.current;if(!t||(t.focus({preventScroll:!0}),wx(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"})}function _y({children:e}){const t=U(new Set),n=yy(),r=(l,c,u)=>l.top===c.top?u==="ltr"?l.left<c.left:l.right>c.right:l.top<c.top,o=R(()=>{let l;for(const c of t.current){if(!c.current)continue;const u={coordinates:c.current.getBoundingClientRect(),ref:c};(!l||r(u.coordinates,l.coordinates,Tx(c.current.ownerDocument)))&&(l=u)}n.current&&l&&Lx(l)},[n]),i=R(l=>(t.current.add(l),()=>t.current.delete(l)),[]),a=V(()=>({requestFocus:i,focusErrors:o,numberOfErrors(){return t.current.size}}),[o,i]);return s(zs.Provider,{value:a,children:e})}function hi({active:e}){const t=U(null),n=Pe(zs);return Mt(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function P3(){return Pe(zs)}function S3(e){return document.activeElement===e}const $o=`
7  a[href],
8  area[href],
9  input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),
10  select:not([disabled]),
11  textarea:not([disabled]),
12  button:not([disabled]):not([tabindex="-1"]),
13  iframe:not([tabindex="-1"]),
14  object,
15  embed,
16  [tabindex="0"],
17  [contenteditable],
18  audio[controls],
19  video[controls]`;function Ep(e,t=!0){return!t&&e.matches($o)?e:e.querySelector($o)}function xx(e,t=!0){if(!t&&e.matches($o))return e;const n=e.querySelectorAll($o);return n[n.length-1]}function E3(e){const t=[...document.querySelectorAll($o)],n=t.findIndex(r=>e===r);return n?t[n+1]:null}function Hs(){const{paymentLines:e}=ie(),t=q().paymentMethods;return w(()=>{const n=e.value.at(0);if(!n)return null;const r=(function(){if("walletContent"in n.method)return n.method.walletContent?.paymentMethodIdentifier;if("popupEnabled"in n.method)return n.method.paymentMethodIdentifier})(),o=t.value?.find(i=>"popupEnabled"in i&&i.popupEnabled&&i.paymentMethodIdentifier===r);return qf()?null:o&&"name"in o?o.name:null})}var dn={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 be=io(Fg(Wc(Ke(function({accessibilityLabel:t,accessibilityRole:n="generic",accessibilityVisibility:r="visible",autoFocus:o,background:i="transparent",backgroundHoverAndFocus:a,backgroundFit:l,backgroundImage:c,backgroundPosition:u,backgroundRepeat:d="noRepeat",blockAlignment:p,blockSize:m="auto",border:f="none",borderRadius:h="none",borderStyle:g,borderWidth:y,boxShadow:_,children:P,className:v,colorLayer:E,containerName:C,display:S="auto",id:I,inert:k,inlineAlignment:T,inlineSize:A="auto",maxBlockSize:L="none",maxInlineSize:M="none",minBlockSize:N="0",minInlineSize:O="0",opacity:D,overflow:B="visible",padding:z="none",paddingBlock:x,paddingInline:W,paddingBlockEnd:X,paddingBlockStart:Z,paddingInlineEnd:ce,paddingInlineStart:j,position:Q="relative",insetBlock:H,insetInline:J,transform:he,translate:ne,zIndex:ae,...ue},Ae){const me=p||T,ye=R(_e=>{o&&_e&&_e.focus({preventScroll:!0})}
19,[o]),Ee=jr(Ae,ye),{className:Ue,style:Ce,styleElement:K}=At({alignItems:T,backgroundColor:i,backgroundColorHoverAndFocus:a,backgroundImage:c,blockSize:m,..._r({border:f,borderStyle:g,borderWidth:y}),borderRadius:h,boxShadow:_,display:S,inlineSize:A,insetBlock:H,insetInline:J,justifyContent:p,maxBlockSize:L,maxInlineSize:M,minBlockSize:N,minInlineSize:O,padding:z,paddingBlock:x,paddingInline:W,paddingBlockEnd:X,paddingBlockStart:Z,paddingInlineEnd:ce,paddingInlineStart:j,position:Q,transform:he,zIndex:ae},{transforms:{display:me?qc:Hc}}),te=oo(),{Element:pe,role:ge}=di(n,{defaultElement:te?"span":"div"}),Ie=C?_n({[dn.vars.containerNameVar]:C}):void 0;return s(Rx,{condition:k,children:[K,s(pe,{"aria-hidden":r==="hidden"||k?!0:void 0,"aria-label":t,className:Y(r==="exclusive"&&dn.visuallyHidden,c&&l&&dn.backgroundSizeVariant[l],c&&u&&dn.backgroundPositionVariant[u],c&&dn.backgroundRepeatVariant[d],E&&dn.colorLayerVariant[E],C&&dn.containerName,me&&dn.withAlignment,k&&dn.inert,D&&dn.opacityVariant[D],B==="hidden"&&dn.overflowHidden,Ue,{notranslate:ne===!1},v),id:I,inert:k?" ":void 0,ref:Ee,role:ge,style:{...Ce,...Ie},tabIndex:o?-1:void 0,translate:(ne===!0?"yes":void 0)??(ne===!1?"no":void 0),...ue,children:P})]})}))));function Rx({children:e,condition:t}){return t==null?s(G,{children:e}):s(As.Provider,{value:t,children:e})}var Mo={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 so({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const o=Un(),i=!!(n&&o),a=Mx(e),l=Y(Mo.Spinner,t&&Mo.appearanceVariant[t],Mo.sizeVariant[a]),c={"aria-label":n,"aria-hidden":n?void 0:"true"},u=a==="fill"||a==="large"?s(Nx,{...c}):s(Dx,{...c});return i?s(G,{children:n}):s("div",{className:l,id:r,children:u})}function Mx(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}function Nx(e){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:Mo.SVG,focusable:"false",...e,children:s("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 Dx(e){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:Mo.SVG,focusable:"false",...e,children:s("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 kn={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"},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 Ox=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"}},$=Ke(function({accessibilityLive:t,accessibilityVisibility:n,children:r,color:o="base",decoration:i,dir:a,display:l
19="auto",fonts:c,id:u,kerning:d,lang:p,letterCase:m,size:f,translate:h,tone:g="auto",type:y="generic"},_){const P=Ox(y),{className:v,styleElement:E}=At({display:l},{transforms:{display:gw}});return s(G,{children:[E,s(P,{"aria-hidden":n==="hidden"?!0:void 0,"aria-live":t,className:n==="exclusive"?kn.accessibilityVisibilityVariant[n]:Y(kn.Text,i&&kn.decorationVariant[i],c&&kn.fontsVariant[c],d&&kn.kerningVariant[d],m&&kn.letterCaseVariant[m],f&&kn.sizeVariant[f],g&&kn.toneVariant[g],o&&(g==="auto"||g==="neutral")&&kn.colorVariant[o],y&&kn.typeVariant[y],v,{notranslate:h===!1}),dir:a,id:u,lang:p,translate:(h===!0?"yes":void 0)??(h===!1?"no":void 0),ref:_,children:r})]})});function Fx(e){return Ke((t,n)=>{switch($T()){case"Menu":{const o={...t,size:"base",tone:t.tone||"monochrome",variant:"in-menu",textDecoration:"none",inlineAlignment:"start",inlineSize:"fill"};return s("li",{children:s(e,{...o,ref:n})})}case"Sheet":{const o={...t,size:"small"};return s(e,{...o,ref:n})}case"Banner":{const o={...t,tone:t.tone==="auto"||typeof t.tone>"u"&&t.variant!=="plain"?"monochrome":t.tone};return s(e,{...o,ref:n})}default:return s(e,{...t,ref:n})}})}var Bx="_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",Vx={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
19iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},yt={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 Ux=ui(Ms(Qc(Fx(Ke(function({accessibilityLabel:t,accessibilityLive:n,children:r,className:o,disabled:i,command:a,commandFor:l,display:c="block",href:u,id:d,inlineAlignment:p="center",inlineSize:m="auto",loading:f,loadingLabel:h,loadingMode:g="auto",onClick:y,onFocus:_,onMouseEnter:P,overlay:v,segment:E,size:C="base",textDecoration:S,target:I="auto",tone:k="auto",type:T="button",variant:A="auto",verticalAlign:L="baseline",...M},N){const O=i?void 0:u,D=Va(y)?()=>y?.():void 0,B=Va(_)?()=>_?.():void 0,z=Va(P)?()=>P?.():void 0,x=Yr(N),W=A==="auto"?"secondary":A,X=W==="shop-pay"||k==="auto"?"neutral":k,{className:Z,style:ce,styleElement:j}=At({inlineSize:m},{transforms:{inlineSize:zx}}),Q=un(),H=Un(),{primaryButton:{border:J="none"},secondaryButton:{border:he="full"},link:{typographyDecoration:ne="underline"}}=ct(),ae=li(),ue=En(),Ae=sw(),me=!!i&&!Ae,ye=W==="plain",Ee=W==="in-menu",Ue=!f&&me?"full":J,Ce=(()=>{switch(W){case"tertiary":return"none";case"secondary":return he;default:return Ue}})(),K=S||(X==="monochrome"?"underline":ne),te=Y(Bx,(f||!me)&&!ye&&!Ee&&X==="neutral"&&yt.colorLayerVariant[W],Vx[Ee?"plain":W],!ye&&yt.sizeVariant[C],Ce&&!ye&&yt.borderVariant[Ce],(W==="primary"||W==="shop-pay")&&yt.forcedColorsPrimaryFill,yt.displayVariant[c],L==="text-bottom"&&yt.verticalAlignVariant[L],yt.toneVariant[X],Z,(me||ue)&&yt.disabled,Ae&&i&&yt.editorDisabled,ue&&yt.inert,f&&yt.loading,yt.textDecorationVariant[ye?K:"none"],E&&yt.segmentVariant[E],Ee&&yt.inMenu,o),pe=h||Q("processing"),ge=s("span",{className:Y(yt.Content,p&&yt.inlineAlignmentVariant[p]
19),"aria-hidden":f||void 0,children:r}),Ie=s("span",{className:Y(yt.LoadingContent,p&&yt.inlineAlignmentVariant[p],!H&&yt.Spinner),dir:"auto",children:[s(so,{accessibilityLabel:pe}),g==="extended"&&!H&&s("span",{className:yt.ExtendedLoadingContent,dir:"auto",children:s($,{children:pe})})]}),_e=nr(),ke=_e?.activatorAttributes,Ne=typeof f<"u";if(O&&l===void 0)return s(Wr.Provider,{value:!0,children:[j,s(Ds,{ariaBusy:Ne?f:void 0,ariaLabel:f?void 0:t,ariaLive:Ne?"polite":n,className:te,href:O,id:d,onClick:y,onFocus:_,onMouseEnter:P,overlay:v,ref:x,style:ce,target:I,...M,children:[ge,f&&Ie]})]});const nt=Xc(_e,{onClick:D,onFocus:B,onMouseEnter:z});return s(Wr.Provider,{value:!0,children:[j,s("button",{"aria-busy":Ne?f:void 0,"aria-hidden":ue?!0:void 0,"aria-label":f?void 0:t,"aria-live":Ne?"polite":n,className:te,disabled:i||f,form:T==="submit"&&ae?.nested?ae.id:void 0,id:d,ref:x,style:ce,type:l?"button":T,tabIndex:ue?-1:void 0,...nt,...ke,...M,children:[ge,f&&Ie]})]})}))))),cn=Ux;function zx(e){if(e!=="legacy-default")return e==="fill"?"100%":is(e==="auto"?"fit-content":e)}function Va(e){return typeof e=="function"}var _o={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 dt({accessibilityLabel:e,accessibilityLive:t,command:n="--auto",commandFor:r,children:o,display:i="inline",href:a,id:l,lang:c,onClick:u,onFocus:d,onMouseEnter:p,target:m="auto",textDecoration:f,tone:h="auto",verticalAlign:g="baseline",overlay:y,..._}){const{link:{typographyDecoration:P="underline"}}=ct(),v=g==="text-bottom"?_o.verticalAlignVariant[g]:void 0;return!a||r!==void 0?s(cn,{accessibilityLabel:e,accessibilityLive:t,command:n,commandFor:r,display:i,onClick:u,onFocus:d,onMouseEnter:p,id:l,overlay:y,textDecoration:f,tone:h==="auto"?"neutral":h,variant:"plain",verticalAlign:g,..._,children:o}):s(Ds,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:Y(_o.Link,_o.toneVariant[h==="auto"?"neutral":h],_o.textDecorationVariant[f||(h==="monochrome"?"underline":P)],_o.displayVariant[i],v),href:a,id:l,lang:c,onClick:u,onFocus:d,onMouseEnter:p,overlay:y,target:m,..._,children:o})}var Cp={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const ee=io(Fg(Ke(function({accessibilityCurrent:t,accessibilityLabel:n,accessibilityRole:r="generic",accessibilityLabelledBy:o,alignContent:i="normal",alignItems:a="normal",background:l,backgroundHoverAndFocus:c,blockSize:u="auto",border:d="none",borderRadius:p="none",borderStyle:m,borderWidth:f,children:h,className:g,columnGap:y,display:_="auto",direction:P="block",gap:v,id:E,inlineSize:C="auto",justifyContent:S="normal",maxBlockSize:I="none",maxInlineSize:k="none",minBlockSize:T="0",minInlineSize:A="0",overflow:L="visible",padding:M="none",paddingBlock:N,paddingInline:O,paddingBlockEnd:D,paddingBlockStart:B,paddingInlineEnd:z,paddingInlineStart:x,rowGap:W,...X},Z){const{className:ce,style:j,styleElement:Q}=At({alignContent:i,alignItems:a,backgroundColor:l,backgroundColorHoverAndFocus:c,..._r({border:d,borderStyle:m,borderWidth:f}),blockSize:u,borderRadius:p,columnGap:y,display:_,flexDirection:P,flexWrap:P,gap:v,inlineSize:C,justifyContent:S,maxBlockSize:I,maxInlineSize:k,minBlockSize:T,minInlineSize:A,padding:M,paddingBlock:N,paddingBlockEnd:D,paddingBlockStart:B,paddingInline:O,paddingInlineEnd:z,paddingInlineStart:x,rowGap:W},{transforms:{display:qc,flexDirection:ne=>ne==="block"?"column":"row",flexWrap:ne=>ne==="block"?"nowrap":"wrap"}}),H=oo(),{Element:J,role:he}=di(r,{defaultElement:H?"span":"div"});return s(G,{children:[Q,s(J,{className:Y(Cp.Stack,Cp.overflowHidden[L],ce,g),role:he,"aria-label":n,"aria-current":t,"aria-labelledby":o,style:j,id:E,...X,ref:Z,children:h})]})})));var kp={Bumper:"_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k"};function uu({children:e}){const t=U(null),n=U(null),r=U(null),o=U(document.activeElement);Mt(()=>{const a=r.current;if(a){const c=Ep(a);c?c.focus():a.focus()}const l=o.current;if(l)return()=>{l.focus()}},[]);const i=a=>{const l=r.current;if(l){const c=a?Ep(l):xx(l);c?c.focus():l.focus()}};return s(G,{children:[s("button",{className:kp.Bumper,ref:t,"aria-hidden":"true",onFocus:()=>i(!1),type:"button"}),QP(e,{tabIndex:-1,ref:r}),s("button",{className:kp.Bumper,ref:n,"aria-hidden":"true",onFocus:()=>i(!0),type:"button"})]})}const Yo="scrollbar-gutter",by="stable";function du(){const[e,t]=oe(!1),n=U(0),r=U(null),o=U(null),i=R(()=>
19{if(!document.body||r.current)return;const{position:l,top:c,overflow:u}=document.body.style,d=Hx(document.documentElement);r.current={position:l,top:c,overflow:u},o.current=d,n.current=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${n.current}px`,document.body.style.overflow="hidden",t(!0)},[]),a=R(()=>{if(!document.body)return;o.current!==null&&($x(document.documentElement,o.current),o.current=null);const l=r.current;r.current=null,l&&l.position!=="fixed"&&(document.body.style.position=l.position,document.body.style.top=l.top,document.body.style.overflow=l.overflow,window.scrollTo(0,n.current)),t(!1)},[]);return F(()=>()=>{a()},[a]),{isLocked:e,lock:i,unlock:a}}function Hx(e){if(!qx(e))return null;const t=e.style.getPropertyValue(Yo);return e.style.setProperty(Yo,by),t}function qx(e){return Gx(e)&&!Wx(window.getComputedStyle(e).getPropertyValue(Yo))}function Gx(e){return window.innerWidth>e.clientWidth}function Wx(e){return e?.split(/\s+/).includes(by)??!1}function $x(e,t){t?e.style.setProperty(Yo,t):e.style.removeProperty(Yo)}const Yx="hYGiX",jx="yF8Vq",Kx="UGCQu",Ua={background:Yx,invisibleBackground:jx,content:Kx};function Py({children:e,isInvisible:t,onClick:n}){const{lock:r}=du(),{i18n:o}=b();F(()=>{r()},[r]);const i=w(()=>t?.value??!1),a=s("div",{children:s(ve,{when:i,fallback:s(G,{children:[s("div",{className:Ua.background}),s("div",{className:Ua.content,children:e})]}),children:s("div",{className:Ua.invisibleBackground,onClick:n,role:"button",tabIndex:0,"aria-label":o.translate("wallets.scrim.cancel"),onKeyDown:l=>{(l.key==="Escape"||l.key==="Enter")&&n&&n()},children:e})})});return s(Pr,{children:s(uu,{children:a})})}function Jx({isOpen:e,isInvisible:t,children:n,onClick:r}){return s(ve,{when:e,children:s(Py,{isInvisible:t,onClick:r,children:n})})}function Xx({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return s(Jx,{isOpen:e,children:s(Qx,{handleClose:n,walletName:t,handleFocus:r})})}function Qx({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=b();return s(be,{children:s(ee,{gap:"large-400",alignItems:"center",children:[s($,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?s(dt,{tone:"monochrome",onClick:t,children:n}):n})}),s($,{children:[s(dt,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function Zx(){const{checkout:{offsitePopupController:e}}=b(),t=Hs();return s(Xx,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const eR=new Set(["coordinates","name","oneTimeUse","handle"]),tR=new Set(Object.values(BS).flat());function qs(e){return!eR.has(e)}function pu({address:e,addressSettings:t,countryDetails:n}){if(!e)return!1;const{isRequired:r}=t,o=e.countryCode,i=n&&n.code===o&&!n.isFallback?n:void 0,a=i?new Set(VS({country:i,editFormat:i.formatting.edit,addressSettings:t})):void 0;for(const l of Object.keys(e)){if(!qs(l)||tR.has(l)||a&&!a.has(l))continue;if((l==="postalCode"&&i?i.postalCodeRequired:r(l,{countryCode:o}))&&(e[l]==null||e[l]?.length===0))return!1}return!0}const Sy=mt("RequestContext");function mu(){return Ht(Sy)}const nR=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],fu=["JP"];function Gs(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:o}={}){const i=Ey(e,o);if(!i)return;const{addr:a,details:l,zoneFormat:c}=i;return Pl(a,l,t,n,r,c)}function C3(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const o=Ey(e,r);if(!o)return;const{addr:i,details:a,zoneFormat:l}=o;return US(i,a,t,n,l)}function Ey(e,t){const{i18n:n}=b(),{details:r}=Jt(e?.countryCode);if(!e||!r&&e.countryCode)return;const o=r??zS(void 0,n),i=e.countryCode&&nR.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:o,zoneFormat:i}}function k3(e){const{details:t,loading:n}=Jt(e?.countryCode),r={countryName:void 0,zoneName:void 0,loading:n};if(!t||!e||n)return r;const o=t.zones.find(i=>i.code===e.zoneCode)?.name;return{countryName:t.name,zoneName:o,loading:n}}function I3(e){return R(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 hu=e=>{const t=R((o,i)=>{e[o].value=i},[e]),n=R(()=>{rn(()=>{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]),r=R(o=>{e[o].value=void 0},[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:n,resetAddressFieldErrors:r}},rR=(e,t)=>{function n(o){t[o].value=void 0,e[o].value=void 0}function r(){Object.entries(t).forEach(([o])=>{Object.keys(e).includes(o)&&e[o].peek()!==void 0&&(t[o].value=void 0)}),rn(()=>{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})}return{resetAddressSuggestions:r,resetAddressFieldSuggestions:n}};function Cy(e,t,n,r){const{i18n:o,checkout:i}=b(),{geolocation:a}=mu(),l=i.configuration.addressSettings.nonBillingAddressSettings.value,c=q().deliveryNext,{details:u}=Jt(e),{getIsMobilePhoneFieldVisible:d}=oR(),p=i.address.extendedAddressMode.get(e),m=r===void 0?p:r,f=V(()=>u??a.country,[u,a.country]),h=V(()=>i.address.extendedAddressMode.getFormatFromCountry(f,m),[i.address.extendedAddressMode,m,f]),g=V(()=>n??l,[n,l]),y=V(()=>t??[{value:f.code,label:f.name}],[t,f]);return R((P,v)=>HS(P,v,{addressSettings:g,countryDetails:u,fallbackCountry:a.country,editFormat:h,availableCountries:y,deliveryNextValue:c.value,isMobilePhoneFieldVisible:d(v),additionalFieldsEnabled:m!==null,i18n:o}),[g,u,h,a.country,m,y,c,d,o])}const oR=()=>{const{checkout:{identity:e},shopPay:t}=b(),n=e.current.value==="shopPay",r=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:R(i=>n&&!r.value&&i==="shipping",[n,r])}};function A3(){const{shippingAddress:e}=ie(),{i18n:t}=b();return w(()=>{const n=e.fields.firstName.value,r=e.fields.lastName.value,o=e.value.oneTimeUse;return!Sl(n)||!Sl(r)||o?null:t.formatName(n,r,!0)})}function iR(e){const[t,n]=oe(null),[r,o]=oe([]);return ze(()=>{Object.entries(e).forEach(([i,a])=>{const l=a.value;n(c=>{let u=c===null?{}:{...c};return l?u={...u,[i]:l}:delete u[i],Object.keys(u).length===0?null:u})})}),F(()=>
19{if(t){const i=[];Object.keys(t).forEach(a=>{const{message:l,origin:c,type:u}=t[a];i.push({message:l,code:void 0,field:a,origin:c,type:u})}),o(i)}},[t]),r}function T3(e,t,n,r){const{i18n:o}=b();return function(i){if(e&&n.has(e)){if(i==="label")return o.translate("contact",{scope:r?`optional_${e}`:e});const a=`${n.get(e)}_${i}`;return o.translate("contact",{scope:r?`optional_${a}`:a})}return t}}function sR({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:o=""}=e,{details:i,loading:a}=Jt(o),{i18n:l}=b();return a?Ip(e,t,n,void 0,l.locale,r):Ip(e,t,n,i,l.locale,r)}function aR({firstName:e,lastName:t,countryDetails:n,locale:r}){const o=n?.formatting.show;if(!o)return cr([e,t]);let i="";const a=o.split("_").find(l=>l.includes("{firstName}")||l.includes("{lastName}"));if(a){let l=a.replace("{lastName}",t).replace("{firstName}",e);if(r){const c=r.toLowerCase(),u=c.startsWith("ja")||c.startsWith("zh")||c.startsWith("ko");l.includes("様")&&!c.startsWith("ja")&&(l=l.replace("様","")),u?i=l.trim().replace(/\s+/g,""):i=l.trim().replace(/\s\s+/g," ")}}else i=cr([e,t]);return i}function Ip(e,t,n,r,o,i=!1){const{firstName:a="",lastName:l="",address1:c="",address2:u="",city:d="",postalCode:p="",company:m="",zoneCode:f="",countryCode:h=""}=e,g=m;let y=cr([a,l]),_=cr([c,u]),P=cr([d,f??"",p,h],", ");if(r){const E=fu.includes(h),C={countryFormat:E?"explicit":"short",zoneFormat:E?"explicit":"short"};y=aR({firstName:a,lastName:l,countryDetails:r,locale:o});const S=["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],I=["address1","address2","firstName","lastName","company",...i?[]:["phone"]];_=Pl(e,r,S,!1,C.countryFormat,C.zoneFormat).replace(/\s+/g," "),P=Pl(e,r,I,!1,C.countryFormat,C.zoneFormat).replace(/\s+/g," ")}if(n)return{nameLine:y,companyLine:g,primary:n,secondary:cr([_,P])};const v=cr([t==="inline"?y:"",g,_],", ");return{nameLine:y,companyLine:g,primary:v,secondary:P}}function w3(e){const t=ie(),n=`${e}Address`,r=t[n].value,{primary:o,secondary:i}=sR({address:r,nameLinePosition:"inline"});return`${o} ${i}`}function lR(e){const{checkout:t}=b(),n=t.configuration.addressSettings.nonBillingAddressSettings.value,{details:r}=Jt(e),o=r?t.address.extendedAddressMode.getFormatFromCountry(r):void 0;return V(()=>GS({countryDetails:r,format:o,addressSettings:n}),[r,o,n])}function gu(e,t){const{checkout:n}=b(),r=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:o}=Jt(e);return R((i,a)=>qS({addressType:i,violations:a,countryDetails:o,format:o?n.address.extendedAddressMode.getFormatFromCountry(o):void 0,addressSettings:r}),[o,r,n.address.extendedAddressMode])}function cr(e,t=" "){return e.filter(Boolean).join(t)}function Kr(e){return typeof e=="string"?e.trim()!=="":e!=null}function Ap(e){return Object.entries(e).filter(([n,r])=>qs(n)&&Kr(r)).map(([n])=>n)}function Tp(e){return Kr(e.address1)||Kr(e.streetName)}function cR(e,t,n){if(typeof n!="string")return!1;if(t==="address1"){const r=jS({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Kr(r)&&n.trim()===r?.trim()}if(t==="address2"){const r=KS({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Kr(r)&&n.trim()===r?.trim()}return!1}function wp(e){const t=Object.fromEntries(Object.entries(e).filter(([n,r])=>qs(n)&&Kr(r)&&!cR(e,n,r)).map(([n,r])=>[n,typeof r=="string"?r.trim():r]).sort(([n],[r])=>n.localeCompare(r)));return Gf(JSON.stringify(t))}function uR(e){const t=e.filter(n=>n.value&&typeof n.value=="string"&&n.value.trim()!=="");return{cacheKey:t.map(n=>`${n.key}:${Gf(n.value.trim())}`).join("|"),keysOnly:t.map(n=>n.key)}}function za(e,t,n,r,o,i,a){a.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(Ve(r),10),checkoutToken:o||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function dR(){const e=U(new Set),{userEvents:t,shop:{id:n,sameBillingAndShippingAddress:r},source:{checkoutSessionIdentifier:o}}=b(),i=q(),{value:a}=i.shippingAddress,{value:l}=i.billingAddress,{value:c}=i.localizationExtensions;return R(({errors:u,reasons:d})=>{if(a&&Tp(a)){const p=`shipping:${wp(a)}`;e.current.has(p)||!u?.some(m=>WS.has(m.code))&&!d?.includes(zo.InvalidAddress)&&(za(a.countryCode??"unknown",Ap(a),"shipping_address",n,o,r,t),e.current.add(p))}if(l&&Tp(l)){const p=`billing:${wp(l)}`;e.current.has(p)||!u?.some(m=>$S.has(m.code))&&!d?.includes(zo.InvalidAddress)&&(za(l.countryCode??"unknown",Ap(l),"billing_address",n,o,r,t),e.current.add(p))}if(c&&c?.length>0){const{cacheKey:p,keysOnly:m}=uR(c);if(m.length>0){const f=`localization:${p}`;e.current.has(f)||u?.some(h=>YS.has(h.code))||(za(a?.countryCode??l?.countryCode??"unknown",m,"localized_id",n,o,r,t),e.current.add(f))}}},[a,l,c,n,o,r,t])}function L3(){const e=ie().shippingAddress.value,t=!Wf(e),n=Gs(e,{hiddenFields:["phone"]});return!t&&n?n:null}function ky(e){return e.status==="failed"}function x3(e){return e.type==="payment"}function Mi(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function yu(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge"}function Iy(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge_v2"}function Ay(e){return e.type==="complete_payment_challenge"}function Dr(e){return e.type==="complete_payment_challenge_v2"}function nn(e){return{receiptId:e?.id?Hr(e.id)??e.id:void 0,status:e?.
19status}}function R3(e=[]){return e?.flatMap(t=>t.status==="submitted"?t.remotePurchaseOrder.deliveryLines?.map(n=>({...n,shopId:t.shopId}))??[]:[])??[]}function pR(e){return e.some(t=>ZS.has(t.code))}function mR(e){return e.some(t=>eE.has(t.code))}function fR(e){return e.some(t=>QS.has(t.code))}function Ty(e){return e.some(({code:t})=>new Set([...$f,...mc]).has(t))}function wy(e){return e.some(({code:t})=>Yf.has(t))}function Ly(e){return e.some(t=>JS.has(t.code)&&t.__typename==="RemoveTermViolation")}function xy(e){return e.some(t=>XS.has(t.code)&&t.__typename==="RemoveTermViolation")}function hR(e){return e.some(t=>$f.has(t.code))}function Ws(e){const t=_u({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function gR(e){const t=vu(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0,clearViolations:t.clearViolations}}function vu(e){return _u({subscribedViolations:e,onlySubscribeToProgression:!1})}function M3(e){const t=Ry(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function Ry(e){return _u({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function N3(e){const t=My(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function My(e){const{checkout:{wallets:t}}=b(),n=vu(e);return ze(()=>{t.activeSession.value&&n.violations.value.size>0&&ht(()=>{n.clearViolations()})}),n}function _u({subscribedViolations:e,onlySubscribeToProgression:t,skipProgressionNegotiations:n}){const{observability:r,checkout:{wallets:o}}=b(),{lastJourneyProgression:i,lastNegotiation:a}=Xe(),l=t?i:a,c=we({violations:new Set}),u=w(()=>c.value.violations),d=R(()=>{c.value={violations:new Set}},[c]),p=Je(e);return F(()=>l.subscribe(m=>{if(o.activeSession.value)return;if(m.type==="invalid"){r.log("violations_subscription_invalid_result_detected","Not updating violation subscription because of invalid result",{reasons:m.reasons,beforeViolations:u.value});return}if(m.type!=="error"&&m.type!=="success"||n&&m.negotiationStage!=="progression"&&m.negotiationStage!=="completion")return;const f=p.value.size>0,h=m.violations.filter(g=>!f||p.value.has(g.code));c.value={violations:new Set(h),negotiationStage:m.negotiationStage}}),[p,r,o,l,n,c,u]),{snapshot:c,violations:u,clearViolations:d}}function Ny(e){const{checkout:t,embed:n}=b(),r=t.wallets.activeSession.value,o=t.latestReceipt.value,{delegatedPaymentInstrument:i}=Nt(),[a,l]=oe(),c=U(i.peek()),u=R(()=>{l(void 0)},[]),d=R(p=>{e.has(p.code)?l(p.code):l(void 0)},[e]);return F(()=>{r||o?.status==="failed"&&o.failure?.type==="payment"&&d(o.failure)},[r,d,o]),F(()=>{if(!n)return;const p=i.value;p!==c.current&&(c.current=p,p&&l(void 0))},[n,i.value]),{error:a,hasError:!!a,clearError:u}}function Lp(e){if(!(e?.status!=="failed"||e.failure.type!=="hsa_qualification")&&e.failure.code!=="SURVEY_EXITED")return e.failure}function D3(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(()=>t?void 0:Lp(n));return F(()=>{t||o(Lp(n))},[t,n]),{error:r,hasError:r!==void 0}}function O3(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(!1);return F(()=>{t||(n?.status==="failed"&&n.failure?.type==="inventory"?o(!0):o(!1))},[t,n]),{hasError:r}}function F3(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(!1);return F(()=>{t||(n?.status==="failed"&&n.failure?.type==="order"?o(!0):o(!1))},[t,n]),{hasError:r}}function yR(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(null),[i,a]=oe("");return F(()=>{t||n&&ky(n)&&(n.failure.type==="payment"?(o(n.failure.code??null),a("payment_receipt_error")):a(`${n.failure.type}_receipt_error`))},[n,t]),{hasError:!!i,message:i,code:r}}function vR(){const[e,t]=oe([]),[n,r]=oe(null),{violations:o}=Ws(new Set);return tr(i=>{i.type==="invalid"?r(i):r(null)}),F(()=>{let i=null;if(n){const c=n.reasons.filter(u=>u!==zo.InvalidAddress)[0];c&&(i={message:c,origin:"server",type:"negotiation"})}const a=[];
19Array.from(o).forEach(c=>{a.push({message:c?.localizedMessage??"",code:c?.code,origin:"server",type:"negotiation"})});const l=[...a];i&&l.push(i),t(l.filter(c=>!!c))},[n,o]),e}function _R(){const{allViolations:e}=q();return w(()=>Ty(e.value??[]))}function B3(e){const{allViolations:t}=q();return w(()=>!!t.value?.some(n=>n.code===e))}function xp(e){return e?typeof e=="object"&&"value"in e?e.value&&typeof e.value=="string"?e.value:e.textValue?e.textValue:"":typeof e=="string"?e:"":""}function bR(){const e=xn(),{message:t,code:n}=yR();F(()=>{(t||n)&&e("receiptError",{error:{message:t,code:n||"",silencedViolation:!1,origin:"server",type:"submit-violation"},timestamp:new Date})},[e,t,n]);const{directPaymentErrors:r,generalPaymentError:o}=ie();ze(()=>{const c=r.name.value;c&&ht(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_name_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),ze(()=>{const c=r.verificationValue.value;c&&ht(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_cvv_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),ze(()=>{const c=r.number.value;c&&ht(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_number_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),ze(()=>{const c=r.expiry.value;c&&ht(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_expiry_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),ze(()=>{const c=o.value;c&&ht(()=>{e("paymentError",{error:{message:c,code:"general_payment_error"},timestamp:new Date})})});const i=vR();F(()=>{i?.forEach(({message:c,code:u,field:d,origin:p,type:m})=>{e("violationError",{error:{message:xp(c),code:u,field:d,origin:p,type:m},timestamp:new Date})})},[e,i]);const{deliveryMethodsAddressErrors:a}=Nt(),l=iR(a);return F(()=>{l?.forEach(({message:c,code:u,field:d,origin:p,type:m})=>{(c||u||d||p||m)&&e("addressError",{error:{message:xp(c),code:u,field:d,origin:p,type:m,silencedViolation:!1},timestamp:new Date})})},[e,l]),null}function PR(){const e=q().deliveryNext;return w(()=>{const t=e.value;if(!t||t.status==="unavailable")return!1;const n=t.lines.filter(cc);if(n.length!==1)return!1;const[r]=n;return r?r.methods.some(o=>o.methodType==="LOCAL"):!1})}function V3(e){return e}function SR(e,t){const[n]=vs(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}function Dy(e,t){if(t)return e.find(n=>n.deliveryStrategyHandle===t)}var Ze=(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))(Ze||{});function Oy(){const{client:e,shop:t}=b();if(!t.hasFlagEnabled(Ho))return null;const n=e.unstable_getSerialization("experiments");return tE(n)}function gi(){const{shop:e}=b(),t=e.hasFlagEnabled(nE),n=e.hasFlagEnabled(Ho);return t||n}function $s(e){return e?.type==="thankYou"||e?.type==="postPurchase"}function U3(e,t){return e.greenPath.find(n=>n.route===t)!==void 0}const Fy=()=>{const{i18n:e}=b(),t=q().paymentFlexibilityPaymentTermsTemplate,n=Bn();return w(()=>{const r=t.value;if(n.value&&!r)return e.translate("notice_banner.payment_method_not_available_with_review_requirement");if(r)return r.type==="FULFILLMENT"?e.translate("notice_banner.payment_method_not_available_with_fulfillment_terms"):r.type==="NET"?e.translate("notice_banner.payment_method_not_available_with_payment_terms",{paymentTerms:r.translatedName}):e.translate("notice_banner.payment_method_not_available_with_fixed_terms")})},By=mt("ShellContext");function ER({children:e,shell:t}){return s(By.Provider,{value:t,children:e})}function bu(){return Ht(By)}function Fe(){const e=bu(),t=U();if(t.current!=null&&t.current.shell!==e&&(t.current=void 0),t.current==null){const n=new Map,r={};for(const o of Object.keys(e.configuration))Object.defineProperty(r,o,{enumerable:!0,get(){return n.has(o)||n.set(o,kt(()=>e.configurationSignal.value[o])),n.get(o).value}});
19t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function Vy(){const{checkout:{configuration:e}}=b(),{orderSummary:t}=Fe(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return n?n==="VISIBLE":!0}function yi(e){const{checkout:t,observability:n,router:r,shop:o}=b(),i=e===void 0||(Array.isArray(e)?e:[e]).some(c=>o.hasFlagEnabled(c)),a=R(c=>{i&&(t.unstable_forceCheckoutLayoutToOnePage(),Uy(n,{...c,result:"success"}))},[t,i,n]),l=R((c={wallet:null})=>{if(!i||!t.isCheckoutLayoutForcedToOnePage.value)return;const u={wallet:c.wallet};n.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:u}),n.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",u),r.navigate("/information",{replace:!0}),t.unstable_clearForcedCheckoutLayout()},[t,i,n,r]);return V(()=>({forceOnePageCheckoutLayout:a,clearForcedCheckoutLayout:l}),[l,a])}function Uy(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 CR(){const{i18n:e}=b(),t=kR(),{availableWallets:n}=We(),r=Je(n);return w(()=>{if(!(r.value.length>0||!t.value))return{code:Ze.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function z3(){const e=Sr(),t=bu(),n=Zc();return w(()=>{const o=e.configurationSignal.value.colors,i=t.configurationSignal.value.main,{current:a,parent:l}=n,c=[a,l].map(d=>d?o.schemes?.[d]?.base?.background:void 0).find(d=>d&&!Dd(d));if(c)return c.l<50?"light":"dark";const u=i.colorScheme?o.schemes?.[i.colorScheme]?.base?.background:void 0;return u&&!Dd(u)&&u.l<50?"light":"dark"}).value}function H3(){const{shop:{customerAccountRequirement:e}}=b(),t=q().buyerIdentity,{email:n}=ie();return w(()=>{const r=!!(t.value?.customerProfile&&(t.value.customerProfile.email||n.value));return!(e==="REQUIRED")&&!r})}function Cr(){const{shop:e}=b(),{deliveryNext:t}=q(),{deliveryLines:n}=ie(),r=Se(),o=Hf("ONE_TIME_PURCHASE");return w(()=>{if(e.shipPickupInOneOrderEnabled){if($s(r.value.currentDetour))return br(t.value);const a=n.value.filter(l=>!l.value.deliveryMethodTypes.includes("NONE"));return a.length>0&&a.every(l=>l.value.deliveryMethodTypes.some(Nd))}const i=Qr(o.value);return Nd(i?.methodType)})}function q3(){const{checkout:e}=b(),t=Cr();return w(()=>!t.value&&e.isShippingRequired.value)}function G3(e){const t=q().paymentMethods;return w(()=>t.value?.find(n=>n.type==="wallet"&&n.name===e))}function W3(){const{client:e,shop:t,source:n,observability:r}=b(),o=e.unstable_getSerialization("sessionToken");return R(({postalCode:i,countryCode:a,city:l,zoneCode:c},u)=>{const d={wallet:u,postalCode:i,countryCode:a,city:l,zoneCode:c,shopId:t.id,sourceId:n.sourceId,sourceType:n.type,checkoutSessionIdentifier:n.checkoutSessionIdentifier,sessionToken:o};TA(i,a)||r.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",d),Kf(i,a)&&r.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",d)},[r,t.id,n.sourceId,n.type,n.checkoutSessionIdentifier,o])}function kR(){const e=q().paymentMethods,t=qe("paymentMethods");return w(()=>t.value||!e.value||e.value?.length===0?!1:!!e.value?.every(n=>n.type==="wallet"||n.type==="walletsPlatform"||n.type==="giftCard"))}function zy(){try{const e=window.__WALLET_TIMEOUT_MULTIPLIER;if(e==null)return 1;const t=Number(e);return!Number.isFinite(t)||t<1?1:Math.min(t,10)}catch{return 1}}function $3(){return 1e4*zy()}function Y3(){return 45e3*zy()}function IR(e){const t=Hy(e);return w(()=>t.value!==null)}function AR(e){const t=Hy(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=b();F(()=>{const o=t.value;n.value||o===null||(r.leaveErrorBreadcrumb("Hiding some wallets due to unusable partial address",{wallet:o}),r.counter({name:"wallets_unusable_partial_address",value:1,attributes:{wallet:o.toString()}}),n.value=!0)},[t.value,r,n])}function Hy(e){const t=e.inMemoryApplePayParts.paymentSheetError,n=e.inMemoryGooglePayParts.paymentSheetError;return w(()=>t.value?.type==="unusable_partial_address"?"APPLE_PAY":n.value?.type==="unusable_partial_address"?"GOOGLE_PAY":null)}function TR(e){const{i18n:t}=b(),n=gi(),o=Fy().value,i=["wallet_cart_not_ready","localization_extension_field_error","wallet_processing_failed"],a=[{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:o||"",tone:"info",condition:()=>!!o},{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:_s,errorMessage:t.translate("wallets.errors.subscription_review_required"),tone:"warning",condition:()=>n},...i.map(l=>({queryParam:l,errorTitle:t.translate("notice_banner.generic_processing_error.title"),errorMessage:t.translate("notice_banner.generic_processing_error.body"),tone:"critical"}))];for(const l of a)if(e.searchParams.has(l.queryParam)){if(l.condition&&!l.condition())continue;return{queryParam:l.queryParam,errorMessage:l.errorMessage||"",errorTitle:l.errorTitle,tone:l.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}function wR(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=We(),{i18n:n,checkout:r,shop:o}
19=b(),i=gi(),a=o.hasFlagEnabled(Tn),l=r.configuration.layout.isOnePage.value,c=Go({applePaySubscriptionsDecelerationActive:i,applePayThreePageVaultedReviewEnabled:a,isOnePageCheckout:l}),{queryParam:u,errorMessage:d,errorTitle:p,tone:m,shouldSuppressNotice:f}=qy({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:c}),h=R(()=>({code:Ze.PaymentSheetViolations,tone:"warning",localizedMessage:n.translate("wallets.errors.subscription_review_required")}),[n]);if(u&&!f)return u===_s?h():{code:Ze.PaymentSheetViolations,localizedTitle:p,tone:m,localizedMessage:d}}function qy({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:r,router:o,shop:i}=b(),a=o.currentUrl.value,l=gi(),c=i.hasFlagEnabled(Ho),u=jf(),d=i.hasFlagEnabled(Tn),p=r.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=yi(Tn),{queryParam:f,errorMessage:h,errorTitle:g,tone:y}=TR(a),_=Oy(),P=f===_s&&t!==void 0&&(n??Go({applePaySubscriptionsDecelerationActive:l,applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),v=P;return F(()=>{if(f){P&&t&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&rE({isABTestActive:c,variant:_,isCaliforniaBillingOrShippingAddress:u.value})?(p||m({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),r.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",r.wallets.setHasActiveApplePaySubscriptionReview(!0)):P&&t?.value!==void 0&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,r.wallets.setIsDecelerating(!1));const C=new URL(a);C.searchParams.delete(f),history.replaceState(null,"",C.href)}},[e,t,_,a,m,c,u,p,f,v,P,n,r.wallets]),V(()=>({queryParam:f,errorMessage:h,errorTitle:g,tone:y,shouldSuppressNotice:v}),[f,h,g,y,v])}const j3=()=>R(e=>{const t=e.current;if(t){const n=t.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2;t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,clientX:r,clientY:o,screenX:window.screenX+r,screenY:window.screenY+o}))}},[]);`${oE.portableWallets.url}`;const jo="guest",LR="checkout_return_to_guest_checkout";function xR(e){e.searchParams.has(El)&&(e.searchParams.delete(El),history.replaceState(null,"",e.href))}function RR(e){e.searchParams.has(jo)&&(e.searchParams.delete(jo),history.replaceState(null,"",e.href))}function MR({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const o={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},i=e.peek();switch(t){case Te.AmazonPay:case Te.BuyWithPrime:{const[a]=vs(i,[t]),l=n;if(!a||!a.method.walletParams){o.method.walletParams={...l,...r?{email:r}:{}};break}const c=a.method.walletParams;o.method.walletParams={...c,...l,...r?{email:r}:{}}}}e.value=fc(i,o)}function NR(e){const t=q().paymentMethods;return w(()=>t.value?.find(n=>n.type==="walletsPlatform"&&n.name===e))}function K3(e){const t=q().paymentLines;return w(()=>t.value?.lines.find(n=>n.method.type==="walletsPlatformPaymentMethod"&&n.method.name===e))}function DR(){const{checkout:e}=b(),t=e.configuration.addressSettings.nonBillingAddressSettings;function n({addressSignal:r,buyerDetailsAddress:o}){rn(()=>{for(const[i,a]of Object.entries(o)){if(i==="__typename"||a===void 0||o.__typename==="InvalidWalletPrefillingAddress"&&!t.value.isVisible(i))continue;const l=r.fields[i];l&&(l.value=a)}})}return R(n,[t])}function J3(){const{email:e,shippingAddress:t,billingAddress:n,billingAddressOption:r,paymentLines:o}=ie(),i=DR();return R((l,c)=>{c.email&&(e.value=c.email),c.prefillingShippingAddress&&i({addressSignal:t,buyerDetailsAddress:c.prefillingShippingAddress}),c.prefillingBillingAddress&&(r.value="custom",i({addressSignal:n,buyerDetailsAddress:c.prefillingBillingAddress})),c.walletParams&&MR({paymentLineSignal:o,walletName:l,walletParams:c.walletParams,email:c.email??void 0})},[n,r,e,i,o,t])}function X3(e=["phone"]){const{shippingAddress:t}=ie(),n=t.value;return{formattedAddress:Gs(n,{hiddenFields:e}),address:n}}function OR(){const e=NR(Te.BuyWithPrime);return w(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return!!n})}var FR=(e=>(e.Api="ApplePay::Exception::API",e))(FR||{}),BR=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(BR||{}),vi=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(vi||{});
19function VR({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:r}=b(),{shippingCountries:o}=r,a=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company"),l=e.sdkStatus.value,c=e.buttonStatus.value,u=n.configuration.layout.isOnePage.value,d=r.hasFlagEnabled(hs);return V(()=>!(a&&!u&&!d||l.status==="error"||c.status==="error"||c.status==="not_eligible"||n.isShippingRequired.value&&o?.length===0||t&&!u),[a,c.status,l.status,n.isShippingRequired,o?.length,u,d,t])}function UR({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const r=mu().geolocation.country.code,{shop:o,observability:i,client:{userAgent:a},embed:l}=b(),c=o.hasFlagEnabled(iE)?l?.client?.embedderHostname:void 0,u=U(),d=Er(),p=wt().value,[m]=ey(),f=m.includes("PICKUP_POINT");return V(()=>!e||t||n.sessionLoadFailed.value||!p||f?!1:$R({geolocatedCountryCode:r,observability:i,slowCanMakePaymentCache:u,isCheckoutEditor:d,userAgent:a,embedderHostname:c}),[e,t,n.sessionLoadFailed.value,p,f,r,i,u,d,a,c])}function zR(e){const t=e.sdkStatus,n=e.buttonStatus;return w(()=>t.value.status!==vi.Error&&n.value.status!=="error")}function HR({inMemoryAmazonPayParts:e}){const t=PR(),n=OR(),r=e.sdkStatus,o=e.buyWithPrimeButtonStatus;return w(()=>n.value&&!t.value&&r.value.status!==vi.Error&&o.value.status!=="error")}function qR(e){const{status:t}=e;return t!=="error"&&t!=="not_eligible"}function Gy(e,t,n){return e==="SHOP_PAY"&&!n?!1:t?.includes("ACCELERATED_CHECKOUT")??!1}function Wy(e){const{embed:t}=b(),n=!!t?.isFlagshipPartner&&!Jf(t?.embedder),r=e.buttonStatus.value;return V(()=>!(r.status==="error"||r.status==="not_eligible"||n&&r.status==="not_rendered"),[r.status,n])}function GR(e){const t=e.buttonStatus.value.status;return R(n=>{if(n.name!=="APPLE_PAY"||t!=="error")return n;const r=n.placements?.filter(o=>o!=="ACCELERATED_CHECKOUT");return r?.length?{...n,placements:r}:void 0},[t])}function WR(e){const t=e.acceleratedCheckoutButtonStatus.value,n=e.payWithPayPalButtonStatus.value;return R(r=>{if(r.name!=="PAYPAL_EXPRESS")return r;if(!r.placements||r.placements.length===0)return;const o=r.placements.filter(i=>!(i==="ACCELERATED_CHECKOUT"&&t.status==="error"||i==="PAYMENT_METHOD"&&n.status==="error"));if(o.length!==0)return{...r,placements:o}},[t.status,n.status])}function $R({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:o,embedderHostname:i}){if(JR()){const p=r||!!i,m=XR(o);if(!p||!m)return!1}return!(!!window.ApplePaySession&&$y(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&YR(t))||!jR(t,n)?!1:e==="CN"?KR(o):!0}function $y(e,t,n){try{return n()}catch(r){if(r instanceof Error&&r.name==="InvalidAccessError")return e.log(`apple_pay_session_${t}_error`,`Apple Pay ${t} check failed from insecure context`,{errorName:"InvalidAccessError"}),!1;throw r}}function YR(e){return typeof ApplePaySession.supportsVersion!="function"?!1:$y(e,"supportsVersion",()=>ApplePaySession.supportsVersion(aE))}function jR(e,t){return t.current!==void 0?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}function KR(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,o]=n[0].split("_").map(i=>Number(i));return r!==void 0&&(r>11||r===11&&o!==void 0&&o>=2)}function JR(){return typeof window>"u"||window.self!==window.top}function XR(e){const t=sE(e);return!!(t?.name==="Safari"&&t.version&&Number(t.version)>=17)}function QR(e,t=0){const n=typeof window>"u"?0:window.innerWidth;return n<=279?2:n<=375?e||t===3?3:2:4}function Yy(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e}}=b(),{shopPayEnabledForSellerOfRecord:t}=q();return w(()=>t.value??e)}function jy(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:t}}=b(),n=Yy(),r=lE(),{deferredTotal:o}=q(),i=t.current;return w(()=>{if(r.value&&o.value)return"deferred_payment";if(!(i.value==="shopPay"&&e))return n.value?void 0:"shop_pay_disabled"})}function ZR(){const e=jy();return w(()=>e.value===void 0)}function e1({maxWalletButtonCount:e,userAgent:t}){if(t==="")return cE;function n(r=[]){const o=r.indexOf(Te.BuyWithPrime);o===-1||o<e||(r.splice(o,1),r.splice(e-1,0,Te.BuyWithPrime))}if(t.match(/Apple Mail|Chromium|Crosswalk|Dragon|Electron|; MSIE xyz;
19|Trident 7.0|.\*rv|Pale Moon|Puffin|QQ Browser|SeaMonkey|Sogou Explorer|UC Browser|Vivaldi/i))return["SHOP_PAY","PAYPAL_EXPRESS",Te.BuyWithPrime,Te.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",Te.BuyWithPrime,Te.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const r=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",Te.BuyWithPrime,Te.AmazonPay,"VENMO"];return n(r),r}else 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 r=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",Te.BuyWithPrime,Te.AmazonPay,"GOOGLE_PAY","VENMO"];return n(r),r}else{if(t.match(/Amazon Silk|Chrome|Chrome Mobile WebView|Chrome Mobile|Opera|Opera Mobile|Samsung Internet/i))return["SHOP_PAY","PAYPAL_EXPRESS",Te.BuyWithPrime,Te.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const r=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",Te.BuyWithPrime,Te.AmazonPay,"GOOGLE_PAY","VENMO"];return n(r),r}else return t.match(/IE/)?["SHOP_PAY","PAYPAL_EXPRESS",Te.BuyWithPrime,Te.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]:["SHOP_PAY","PAYPAL_EXPRESS",Te.BuyWithPrime,Te.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}}function Ky(e){const{inMemoryGooglePayParts:t,inMemoryPayPalParts:n,inMemoryAmazonPayParts:r,inMemoryApplePayParts:o,inMemoryVenmoParts:i}=e,{value:a}=q().paymentMethods,l=a?.some(I=>I.type==="wallet"&&I.name==="APPLE_PAY")??!1,c=IR(e);AR(e);const u=c.value,d=VR({hasUnusablePartialAddress:u,inMemoryGooglePayParts:t}),p=UR({hasApplePayPaymentMethod:l,hasUnusablePartialAddress:u,inMemoryApplePayParts:o}),f=zR(r).value,g=HR({inMemoryAmazonPayParts:r}).value,_=w(()=>qR(i.buttonStatus.value)).value,P=GR(o),v=WR(n),E=ZR().value,{client:{userAgent:C}}=b();return V(()=>{function I(L){const M=L.name;switch(M){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return p;case"GOOGLE_PAY":return d;case Te.BuyWithPrime:return g;case Te.AmazonPay:return f;case"SHOP_PAY":return E;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return _;default:return sn(M)}}function k(){const L=a?.filter(M=>(M.type==="wallet"||M.type==="walletsPlatform")&&I(M))??[];return t1(L)}const T=k().flatMap(L=>v(L)??[]).flatMap(L=>P(L)??[]),A=e1({maxWalletButtonCount:QR(E,T.length),userAgent:C});return T.sort((L,M)=>A.indexOf(L.name)-A.indexOf(M.name))},[a,p,d,g,f,_,P,v,E,C])}const t1=e=>e.find(n=>n.name===Te.BuyWithPrime)?e.filter(n=>n.name!==Te.AmazonPay):e;function n1(){const e=q().paymentMethods,t=qe("paymentMethods");return w(()=>t.value||!e.value||e.value?.length===0?!1:!!e.value?.some(n=>n.type==="wallet"||n.type==="walletsPlatform"))}function r1(){const{checkout:e,source:t}=b(),{didIncrementUnusablePartialAddressMetric:n,inMemoryGooglePayParts:r,inMemoryPayPalParts:o,inMemoryVenmoParts:i,inMemoryApplePayParts:a,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=We(),u=Je(Ky({inMemoryGooglePayParts:r,inMemoryPayPalParts:o,inMemoryVenmoParts:i,inMemoryApplePayParts:a,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:n})),d=Je(Wy(c)),p=w(()=>u.value?.filter(({placements:f,name:h})=>Gy(h,f,d.value)).length),m=n1();return w(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||t.type==="simulated"&&!p.value&&m.value))}const Jy=Ge({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function o1({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:o}){const i=new Set(Qf),a=new Set([...hc,...Xf]),l=new Set;(!e||o)&&l.add("WALLETS1"),r&&l.add("DELIVERY1"),(r||t)&&l.add("DELIVERY2"),t&&(l.add("INFORMATION3"),!n&&!r&&(l.add("PAYMENT3"),l.add("PAYMENT4")),(!n&&r||n&&!r)&&l.add("PAYMENT4"));const c=new Set([...a,...i]);return{swappable:i,fixed:a,disabled:l,supported:c}}function i1({children:e}){const t=Pu();return s(Jy.Provider,{value:t,children:e})}function Pu(){const e=r1(),{shop:{acceptTipPayments:t},checkout:n}=b(),r=n.configuration.layout.isOnePage.value,o=uE(n.identity.current.value),i=!qe("isShippingRequired").value&&!n.isShippingRequired.value;return V(()=>o1({showExpressCheckout:e.value,isOnePageCheckout:r,acceptTipPayments:t,disableDeliveryExtensions:i,isVaultedWalletIdentity:o}),[t,i,o,r,e.value])}function s1(){return new Set([...Qf,...hc])}const a1=new Map([["thankYou",[...hc,...Xf]]]);function l1(e){const t=a1.get(e.type)??[];return new Set(t)}const Xy=He({suspenseName:"extensions",id:()=>
19"ExtensionsInner",displayName:"ExtensionsInner",load:()=>Be(()=>import("./33682ee7.BbeAYzfW.js"),__vite__mapDeps([12,1,7,2,3,4,5,13,14,15,6,16,17,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,53,8,9]))});function c1(e){const{checkout:{extensibility:{ui:t}}}=b();return s(i1,{children:s(ve,{when:t.enabled,fallback:e.children,children:s(Xy,{...e})})})}const u1=mt("PostPurchaseContext");function d1({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:r}=b(),o=r.currentUrl.value,i=V(()=>{const u=new URLSearchParams(o.search),d=u.get("script_url"),p=u.get("api_key")||u.get("post_purchase_dev_api_key"),m=u.get("config")??void 0;return n&&d&&p?{scriptUrl:d,apiKey:p,config:m}:void 0},[n,o.search]),a=n&&!!i,l=V(()=>{const u=new URLSearchParams(o.search),d=u.get("uuid"),p=u.get("socket_url");return n&&d&&p?{uuid:d,socketUrl:p}:void 0},[n,o.search]),c=V(()=>{const u=`https://${o.host}/checkouts/unstable/changesets`;return{extensionAvailable:t,postPurchaseEnabled:t||a,developmentMode:a,developmentOptions:i,liveReload:l,changesetsUrl:u}},[t,a,i,l,o.host]);return s(u1.Provider,{value:c,children:e})}const p1={addressModalState:{status:"idle",addressType:"shipping",setAsDefault:"default"}};function Qy(e){return e[0]?.localizedMessage??e[0]?.nonLocalizedMessage}function m1({enabledDeliveryMethods:e=[],delegatedPaymentInstrument:t}={}){const n=le([]);return{inventoryRecoverySignal:le(void 0),billing:le(!1),contact:le(!1),createAddressParts:Ff(p1),currentDiscountCodeAttemptSignal:le(null),delegatedPaymentInstrument:le(t),deliveryMethodDeltaSignal:le(0),deliveryMethodsAddressErrors:pE(),deliveryMethodTimingSignal:le(0),derivedErrorMessageSignal:kt(()=>Qy(n.value)??""),directPaymentFieldsFilled:le(!1),discountCodeWarningSignal:le(null),installmentMonthsSignal:le(void 0),missingMerchandiseStableIdsSignal:le([]),msiInvalidationReasonSignal:le(null),msiInvalidationSnapshotSignal:le(null),msiHadInstallmentsSignal:le(!1),editorSetShopPaySignal:le(null),emailMarketingOptInShownSignal:le(!1),emailMarketingConsentGrantReachedSignal:le(!1),previousPhoneMarketingDisclosureKeySignal:le(void 0),smsMarketingOptInShownSignal:le(!1),shopPayMobilePhoneInputShownSignal:le(!1),privacyBannerSettingsSignal:le(null),extensionSkeletonBatchStateSignal:le("idle"),extensionSkeletonBatchReleaseIdSignal:le(0),extensionSkeletonPendingCountSignal:le(0),payment:le(!1),reductionsErrorsSignal:n,reductionsValueSignal:le(""),refreshNegotiationSignal:le(!1),rememberMePhoneErrorSignal:le(void 0),rememberMePhoneSignal:le(void 0),shipping:le(!1),voidedGiftCardsSignal:le([]),cachedMembershipViolations:le([]),hasNegotiatedAlternativePaymentCurrencySignal:le(!1),newCardSignal:le(void 0),hasLoadedSignal:le(!1),bankIdNumberSignal:le(void 0),lastNegotiatedBinSignal:le(void 0),bankPaymentTokenSignal:le(void 0),checkoutProtocolModalEventSignal:le("none"),checkoutProtocolPayButtonLoadingSignal:le(void 0),checkoutProtocolPayButtonDisabledSignal:le(void 0),checkoutProtocolPayButtonMountedSignal:le(!1),checkoutProtocolPayButtonStageSignal:le("pay"),checkoutProtocolPresentedSignal:le(!1),allRenderedSections:le({}),getRenderedSection:dE({defaultValue:{},initial:{}}),marketingPhoneInputError:le(void 0),buyerHasActedSignal:le(!1),appMetafieldsSignal:le({}),cartLineChangeLoadingSignal:le(!1),prequalifiedAnimatedBadgeShowCounter:le(0),enabledDeliveryMethodsSignal:le(e)}}function f1(e,t){return e?.countryCode||t?.countryCode}function h1(e){return e.some(t=>t.__typename==="ConfirmChangeViolation"&&t.code==="TAX_TAX_INCLUSIVITY_MISMATCH")}function Q3(e){const t=e.shippingAddress.peek(),n=e.locationAddress.peek();return f1(t,n)}function Zy(e,t,n){const r=e?.__typename==="NegotiationResultAvailable"&&e?.sellerProposal||e?.__typename==="SubmitRejected"&&e?.sellerProposal||void 0,o=[];(r==null||r.buyerIdentity.__typename==="PendingTerms")&&o.push("contactInfo","shippingAddress","buyerIdentity"),(r==null||r.delivery.__typename==="PendingTerms"||r.deliveryDiscount?.__typename==="PendingTerms"||r.remote?.consolidated.delivery.termsStatus==="PENDING")&&o.push("billingAddress","deliveryNext"),(r==null||r?.deliveryExpectations?.__typename==="PendingTerms")&&o.push("deliveryExpectations"),(r==null||r.payment.__typename==="PendingTerms"||r.remote?.consolidated.payment.termsStatus==="PENDING")&&o.push("paymentLines","paymentMethods");const i=h1(t??[]);return(r==null||r.merchandise.__typename==="PendingTerms"||i||r?.merchandiseDiscount?.__typename==="PendingTerms")&&o.push("merchandiseLines"),(r==null||r.tax.__typename==="PendingTerms")&&o.push("taxes","duties"),r?.taxExemptions?.__typename==="PendingTerms"&&o.push("taxExemptions"),(r==null||r.remote?.consolidated.taxes.termsStatus==="PENDING")&&o.push("remoteTaxDetails"),(r==null||r?.deliveryDiscount?.__typename==="PendingTerms"||r?.merchandiseDiscount?.__typename==="PendingTerms")&&o.push("discountLines","totalSavings"),r?.captcha?.__typename==="PendingTerms"&&o.push("captcha"),r?.availableRedeemables?.__typename==="PendingTerms"&&o.push("availableRedeemables"),r?.shopCashBalance?.__typename==="PendingTerms"&&o.push("shopCashBalance"),r?.shopPromotion?.__typename==="PendingTerms"&&o.push("shopPromotion"),r?.shopDiscountOffer?.__typename==="PendingTerms"&&o.push("shopDiscountOffer"),r==null&&o.push("subtotal","runningTotal","total"),r?.merchandiseDiscount?.__typename==="FilledDiscountTerms"&&r?.merchandiseDiscount?.lines?.length===0&&n&&o.push("reduction"),r?.cartCheckoutValidation?.__typename==="PendingTerms"&&o.push("cartCheckoutValidation"),r?.memberships?.__typename==="PendingTerms"&&o.push("memberships"),o}const Rp="8b9035807842a4e4dbe009f3f1478127",g1=(e,t)=>{const n=e.some(i=>i.id===Rp),r=t.find(i=>i.id===Rp),o=new Set(e);return!n&&r&&o.add(r),Array.from(o)};let Ni;function y1(e,t){async function n(){return Ni||(Ni=lt(()=>Be(()=>import("./2b0dcdd4.fBOc3l8o.js"),__vite__mapDeps([54,2,1,3,4,5,55,56,57,51,6,58,59,60,61,62,7,8,9]))),Ni)}return typeof window<"u"&&(typeof window.requestIdleCallback=="function"?window.requestIdleCallback(n):window.setTimeout(n,0)),{async complete(r){return(await n()).complete(e,t,r)},async getNegotiationInput(){return(await n()).getNegotiationInput(e)},negotiate:async function*(o){yield*(await n()).negotiate(e,t,o)}}}function ev(e){return e.filter(t=>t.__typename==="ApplyChangeViolation"&&fE.has(t.code))}function tv(e){return e.filter(t=>t.__typename==="UnprocessableTermViolation"&&!Zf.has(t.code))}function nv(e){return e.filter(t=>t.__typename==="ConfirmChangeViolation"&&mE.has(t.code))}function rv(e){return e.filter(t=>t.__typename==="RemoveTermViolation"&&mc.has(t.code))}function ov(e){const t=tv(e),n=nv(e),r=ev(e),o=rv(e);return{unprocessableTermViolations:t,unprogressableChangeViolations:n,applyChangeViolations:r,removeTermViolations:o,hasAny:t.length>0||n.length>0||r.length>0||o.length>0}}function v1(e,t={}){return e.status!=="filled"?[]:e.memberships.filter(n=>!t.onlyApplied||n.apply).map(n=>n.handle)}function _1(e,t,n){return oi(e.address,t)&&n.includes(e.handle)}const b1=/^\$.merchandiseDiscount.lines\[(\d+)\]$/,P1=/^\$.memberships.memberships\[(\d+)\]$/;function S1(e){return e.filter(t=>t.__typename==="AcceptNewTermViolation")}function E1(e){return e.filter(t=>t.__typename==="InputValidationError")}function C1(e){return e.filter(t=>t.__typename==="UnresolvableTermViolation")}function Z3(e,t,n,r){const o=ov(e);return o.hasAny?(k1(o.unprocessableTermViolations,t),{hasErrors:!0,requiresRenegotiation:A1(o.applyChangeViolations,t,n,r)}):{hasErrors:!1,requiresRenegotiation:!1}}function k1(e,t){e.some(hE)||e.forEach(n=>{const{code:r,localizedMessage:o,nonLocalizedMessage:i}=n,a=o||i;w1(t);const l={message:a,origin:"server"};gE.has(r)?t.directPaymentErrors.number.value=l:yE.has(r)?t.directPaymentErrors.name.value=l:vE.has(r)?t.directPaymentErrors.expiry.value=l:_E.has(r)?t.directPaymentErrors.verificationValue.value=l:bE.has(r)?t.directPaymentErrors.general.value=l:PE(n)||eh(n)||n.target==="$.payment"&&(t.generalPaymentError.value=a,t.generalPaymentErrorCode.value=r)})}function I1(e,t,n,r){return t.some(o=>e.code===o.violation.code&&_1(o,n,r))}function A1(e,t,n,r){let o=!1;const i=new Set;if(e.forEach(a=>{const l=b1.exec(a.target);if(l&&l[1]){const c=parseInt(l[1],10),u=t.discountLines.peek()||[];c<u.length&&(i.add(c),o=!0)}if(SE.has(a.code)){const c=t.shippingAddress.peek(),u=t.memberships.peek();if(!u||u.status!=="filled")return;const d=v1(u);if(!d.length||I1(a,n.cachedMembershipViolations.value,c,d))return;const m=T1(a.target,u),f=m?[m]:d;if(f.length===0)return;f.forEach(h=>{n.cachedMembershipViolations.value.push({violation:a,address:c,handle:h})}),r.counter({name:"membership_violation_renegotiation",value:1,attributes:{violation_code:a.code}}),o=!0}}),i.size>0){const a=t.discountLines.peek()||[];t.discountLines.value=a.filter((l,c)=>!i.has(c))}return o}function T1(e,t){const n=P1.exec(e);if(n&&n[1]){const r=parseInt(n[1],10),o=t.memberships[r];if(o)return o.handle}return null}function w1(e){const t=e.paymentLines.peek().find(({method:n})=>n.type==="direct");if(t){const r=t.method.paymentMethodIdentifier;e.directPaymentErrors.paymentMethodIdentifier.value=r}}function fn(e){const t={};return e.forEach(n=>{t[n.code]=(t[n.code]||0)+1}),t}function L1({observability:e,negotiationStage:t,silenceViolations:n,violations:r,retainedViolations:o,reportedCodes:i}){const a=Object.entries(x1(EE(r),o)).filter(([l])=>!i.has(l));
19a.length!==0&&(a.forEach(([l])=>{i.add(l),e.counter({name:"negotiation_violation_silenced",value:1,attributes:{code:l,negotiationStage:t}})}),e.log("negotiation_violations_silenced","[Negotiate] Violations returned by the negotiation were silenced for the UI",{negotiationStage:t,silenceViolations:n,newlySilencedViolations:Object.fromEntries(a)}))}function x1(e,t){const n=fn(t);return Object.entries(fn(e)).reduce((r,[o,i])=>{const a=i-(n[o]??0);return a>0&&(r[o]=a),r},{})}function eY(e){const t=ev(e),n=tv(e),r=nv(e),o=rv(e),i=S1(e),a=E1(e),l=C1(e),c=new Set([t,n,r,o,i,a,l].flatMap(d=>d.map(p=>p.code))),u=e.filter(d=>!c.has(d.code));return{autoResolved:fn(t),blockingProgress:fn(n),informational:fn(r),removingItems:fn(o),mustAcceptTerms:fn(i),invalidInputs:fn(a),unresolvable:fn(l),other:fn(u)}}const Wi="cart";function R1(e,t){e&&e.type==="cartNext"&&t.delete(Wi)}const M1="cartNext";function N1(e){const t={...e,queueToken:void 0,taxes:void 0,checkpointData:void 0,scriptFingerprint:void 0,transformerFingerprintV2:void 0};return JSON.stringify(t,(n,r)=>{if(!(n==="destinationChanged"||n==="emailChanged"||n==="signedHandle"))return r})}function D1({client:e,url:t,source:n,configuration:r}){if(R1(n,e.cookies),r.allowRedirectToStorefront){const o=M1===n.type;window.location.assign(o?t.storefront("cart/clear"):t.storefront())}}class iv extends Error{constructor(){super(...arguments),this.name="RejectedNegotiationRequest"}}class O1{constructor(t=new Set,{suppressSelfWrites:n=!1}={}){this.changedParts=t,this.deliveryLineSnapshots=new Map,this.applyingUpdate=!1,this.suppressSelfWrites=n}subscribeToChanges(t){const n=[],r=o=>{let i=!1;const a=o.subscribe(()=>{const l=this.suppressSelfWrites&&this.applyingUpdate;i&&!l&&this.changedParts.add(o),i=!0});n.push(a)};this.deliveryLines=t.deliveryLines,this.deliveryLines&&this.captureDeliveryLineSnapshots(this.deliveryLines);for(const o of Object.values(t)){if(Od(o)){for(const i of Object.values(o.fields))r(i);continue}o instanceof Pd&&r(o)}return()=>{n.forEach(o=>o())}}applyUpdate(t,n){this.applyingUpdate=!0;try{this.applyUpdateTracked(t,n)}finally{this.applyingUpdate=!1}}applyUpdateTracked(t,n){if(t===this.deliveryLines&&this.deliveryLinesChanged()&&this.changedParts.add(t),Od(t)){const r=[];rn(()=>{for(const[o,i]of Object.entries(t.fields)){if(this.changedParts.has(i))continue;const a=n[o];a&&i.peek()!==a&&(i.value=a),r.push(o)}}),t[CE](r);return}t instanceof Pd&&!this.changedParts.has(t)&&(t.value=n,t===this.deliveryLines&&this.captureDeliveryLineSnapshots(this.deliveryLines))}deliveryLinesChanged(){for(const[t,n]of this.deliveryLineSnapshots)if(!Object.is(n,t.value))return!0;return!1}captureDeliveryLineSnapshots(t){this.deliveryLineSnapshots.clear(),this.deliveryLineSnapshots.set(t,t.value);for(const n of t.value)this.deliveryLineSnapshots.set(n,n.value)}}const F1=1e4;class B1{#e=Promise.resolve();async run(t){const n=this.#e;let r;this.#e=new Promise(i=>{r=i}),await n;const o=setTimeout(r,F1);try{return await t()}finally{clearTimeout(o),r()}}}const Mp=5e3,Np=50;class V1 extends Map{constructor(){super(...arguments),this.subscriptions=new Set}subscribe(t){return this.subscriptions.add(t),t(this),()=>this.subscriptions.delete(t)}clear(){super.clear(),this.subscriptions.forEach(t=>t(this))}delete(t){const n=super.delete(t);return this.subscriptions.forEach(r=>r(this)),n}set(t,n){return super.set(t,n),this.subscriptions.forEach(r=>r(this)),this}}class U1{constructor(t,n,r,o,i,a,l,c,u,d,p,m,f,h,g,y,_,P,v=[]){this.graphql=t,this.client=n,this.sessionToken=r,this.source=o,this.router=i,this.url=a,this.throttle=l,this.blocked=c,this.checkout=u,this.persistenceManager=d,this.lastJourneyProgression=p,this.lastNegotiation=m,this.context=f,this.validationErrors=h,this.observability=g,this.userEvents=y,this.shopPay=_,this.shop=P,this.submitting=le(!1),this.hasNegotiatedOnce=le(!1),this.pendingFieldsNegotiation=le(void 0),this.reportedSilencedViolationCodes=new Set,this.negotiationRunCount=0,this.negotiationCount=0,this.hasReportedExcessiveNegotiationRounds=!1,this.blockCount=0,this.interceptors=new Set,this.listeners=new Set,this.beforeNegotationListeners=new Set,this.pendingNegotiationsRequests=new V1,this.negotiationRequestSerializer
19=new B1,this.inFlightRunCount=0,this.outstandingRunFailures=[];const E=new Set(v);this.initialUnresolvedFields=le(E),this.loading=le(new Set(E)),this.isBlocked=this.blocked,this.actions=y1(this,g);const C=th(o),S=this.persistenceManager?.createUpdate(hn.PostPurchaseInquiryStatus,{scope:C});S&&this.parts.postPurchaseInquiryStatus.subscribe(A=>S(A));const I=this.persistenceManager?.createUpdate(hn.ExternalDeliveryIds,{scope:C});I&&this.parts.externalDeliveryIds.subscribe(A=>I(A));const k=this.persistenceManager?.createUpdate(hn.ShopPayArtifact,{scope:C});k&&this.parts.shopPayArtifact.subscribe(A=>k(A));const T=this.persistenceManager?.createUpdate(hn.SetShippingAddressAsDefault,{scope:C});T&&this.parts.setShippingAddressAsDefault.subscribe(A=>{A!==void 0&&T(A)})}get keepReconcilerAliveAcrossPolls(){return this.shop.hasFlagEnabled(kE)}get current(){return this.checkout.proposal.negotiated}get parts(){return this.checkout.proposal.proposed}get facts(){return this.checkout.proposal.facts}alreadySubmittedInterceptor(){const t=this.checkout.latestReceipt.value;return t&&t.status!=="failed"&&t.status!=="abandoned"?{behavior:"block",reason:zo.SubmittedForCompletion}:{behavior:"allow"}}async runInterceptors({forceBlock:t=!1,negotiationStage:n,skipEffects:r=!1}){const o=[this.alreadySubmittedInterceptor.bind(this),...this.interceptors],i=await Promise.all(o.map(async p=>p({parts:this.parts,reason:n}))),a=i.filter(p=>p.behavior==="block"),l=a.map(p=>p.reason),c=i.flatMap(p=>p.errors??[]),u=i.flatMap(p=>p.context??[]),d=t||a.length>0?{behavior:"block",reasons:l,errors:c,context:u}:{behavior:"allow",errors:c,context:u};return r||await Promise.all(i.map(p=>p.perform?.(d))),d}intercept(t){return this.interceptors.add(t),()=>this.interceptors.delete(t)}async runListeners(t){await Promise.all([...this.listeners].map(n=>n(t)))}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}async runBeforeNegotiationListeners(t,n){await Promise.all([...this.beforeNegotationListeners].map(r=>n===void 0?r(t):r(t,n)))}listenBeforeNegotiation(t){return this.beforeNegotationListeners.add(t),()=>this.beforeNegotationListeners.delete(t)}block(){return this.blockCount===0&&(this.blocked.value=!0),this.blockCount+=1,()=>{this.blockCount-=1,this.blockCount===0&&(this.blocked.value=!1)}}async complete(t){await this.waitForPendingNegotiations(t),++this.negotiationRunCount;const n=await this.actions.complete(t);if(n.status==="rejected"||n.status==="failed"||n.status==="fetch_failed"||n.status==="tooManyRequests"){const{inventoryRecoverySignal:r}=this.context,o=r.value;o&&!o.dismissed&&(r.value={...o,dismissed:!0})}return n}async getNegotiationInput(){return this.actions.getNegotiationInput()}start(){const t=this.startNegotiationRound();let n;const r=()=>n==null?t===this.negotiationCount:n===this.negotiationRunCount;return{isActive:r,negotiating:(o=Object.keys(this.current.fields))=>{this.negotiationRunCount+=1,n=this.negotiationRunCount,this.loading.value=new Set(o);const i=this.keepReconcilerAliveAcrossPolls;this.releaseReconcilerSubscription?.();const a=new O1(void 0,{suppressSelfWrites:i}),l=a.subscribeToChanges(this.parts);return i&&(this.releaseReconcilerSubscription=l),({updated:c,loadingFields:u=[],buyerProposal:d})=>{i||l(),r()&&this.negotiated({updated:c,loadingFields:u,buyerProposal:d,reconciler:a})}}}}serializeNegotiationRequest(t){return this.negotiationRequestSerializer.run(t)}track(t){const n=this.lastVariables;return this.lastVariables=t&&N1(t),{dirty:this.lastVariables==null||this.lastVariables!==n}}collectPendingNegotiationEventIds(t,n){const r=[];return this.pendingNegotiationsRequests.forEach((o,i)=>{(i===t||!o.negotiationCustomized&&this.canResolvePendingNegotiation(n,o.negotiationStage))&&o.eventId!=null&&r.push(o.eventId)}),r}hasPendingThreePageWalletEscalation(){return[...this.pendingNegotiationsRequests.values()].some(t=>t.threePageWalletEscalation===!0)}negotiate(t){const n={...t,identifier:t.identifier??Symbol("negotiationRequest"),negotiationStage:t.negotiationStage??"progression"},{identifier:r}=n;if([...this.pendingNegotiationsRequests.values()].some(a=>a.negotiationStage==="progression")){const a=n.negotiationStage;n.negotiationStage="progression",this.observability.leaveErrorBreadcrumb("[Negotiate] Negotiation stage inherited from pending progression",{originalStage:a})}const i=new Promise((a,l)=>{const c=this.pendingNegotiationsRequests.get(r);c&&c.reject(new iv),this.pendingNegotiationsRequests.set(r,{fieldsToResolve:n.fieldsToResolve,threePageWalletEscalation:n.threePageWalletEscalation,negotiationStage:n.negotiationStage,negotiationCustomized:!!n.customizeNegotiation,silenceViolations:n.silenceViolations,eventId:n.reason?.eventId,resolve:a,reject:l}),this.observability.leaveErrorBreadcrumb("[Negotiate] Negotiation request added to pending negotiations",{negotiationStage:n.negotiationStage,fieldsToResolve:n.fieldsToResolve,queueSize:this.pendingNegotiationsRequests.size})});return this.observability.leaveErrorBreadcrumb("[Negotiate] Running negotiation",{silenceViolations:n.silenceViolations,negotiationStage:n.negotiationStage,negotiationCount:this.negotiationCount}),this.inFlightRunCount+=1,this.runNegotiation(n).catch(a=>{a instanceof Error&&(this.outstandingRunFailures.push({error:a,negotiationStage:n.negotiationStage}),this.pendingNegotiationsRequests.get(r)?.reject(a),this.pendingNegotiationsRequests.delete(r))}).finally(()=>{this.settleRun()}),i}startNegotiationRound(){this.negotiationCount+=1;const t=this.negotiationCount;return this.observability.histogram({name:"negotiation_round",value:t}),t>=Np&&!this.hasReportedExcessiveNegotiationRounds&&(this.hasReportedExcessiveNegotiationRounds=!0,this.observability.log("negotiation_rounds_excessive","Checkout has run an unusually high number of negotiation rounds",{negotiationRound:t,threshold:Np})),t}async waitForPendingNegotiations(t){const n=this.pendingNegotiationsRequests.size;if(n===0)return;this.observability.leaveErrorBreadcrumb("[Complete] Completion waiting for negotiation queue to clear",{queueSize:n}),t?.setProgressing?.(!0);const r=setTimeout(()=>{this.observability.log("complete_waiting_for_negotiation_queue_still_waiting",`[Complete] Negotiation queue still waiting after ${Mp/1e3} seconds`,{queueSize:this.pendingNegotiationsRequests.size})},Mp);await new Promise(o=>{this.pendingNegotiationsRequests.subscribe(i=>{i.size===0&&(clearTimeout(r),o())})}),this.observability.leaveErrorBreadcrumb("[Complete] Negotiation queue empty - continuing with completion")}async runNegotiation(t){const{identifier:n}=t,r=(o,i,a)=>{let l=i;if("violations"in i&&o.silenceViolations!==t.silenceViolations){const c=BE(i.violations,o.silenceViolations);L1({observability:this.observability,negotiationStage:o.negotiationStage,silenceViolations:o.silenceViolations,violations:i.violations,retainedViolations:c,reportedCodes:this.reportedSilencedViolationCodes});
19const u=i.status,p=ov(c).hasAny?"error":"success";u!==p&&this.observability.leaveErrorBreadcrumb("[RunNegotiation] Re-filtering violations changed status for cross-resolved request",{originalStatus:u,newStatus:p,requestSilenceViolations:o.silenceViolations,currentSilenceViolations:t.silenceViolations}),l={...i,status:p}}o.resolve(l),this.pendingNegotiationsRequests.delete(a)};for await(const o of this.actions.negotiate(t)){if(o.status==="stale"){if(t.customizeNegotiation!=null){const i=this.pendingNegotiationsRequests.get(n);i&&r(i,o,n)}continue}if("pendingFields"in o&&o.pendingFields?.length===0){const i=this.pendingNegotiationsRequests.get(n);i&&r(i,o,n)}if(o.status==="fetch_failed"&&o.networkError){const i=this.pendingNegotiationsRequests.get(n);i&&(this.observability.log("negotiation_fetch_failed_request_released","[RunNegotiation] Resolving own pending request after network failure",{queueSize:this.pendingNegotiationsRequests.size}),this.observability.counter({name:"negotiation_fetch_failed_request_released",value:1}),r(i,o,n));continue}this.pendingNegotiationsRequests.forEach((i,a)=>{const l=this.loading.peek();if(i.negotiationStage==="progression"&&o.status==="invalid"){r(i,o,a);return}if(i.fieldsToResolve?.some(m=>l.has(m))||l.has("cartCheckoutValidation")&&!t.skipStateUpdates){this.observability.leaveErrorBreadcrumb("[RunNegotiation] Ignoring negotiation result");return}const u=t.negotiationStage,d=i.negotiationStage,p=this.canResolvePendingNegotiation(u,d);this.observability.debug("negotiation_evaluated","[RunNegotiation] Evaluating negotiation",{shouldResolve:p,requestStage:d,currentStage:u}),p?(this.observability.log("negotiation_evaluated","[RunNegotiation] Resolving pending negotiation request for pending request",{requestStage:d,currentStage:u,withResultStatus:o.status}),r(i,o,a)):this.observability.leaveErrorBreadcrumb("[RunNegotiation] Not resolving pending negotiation request for pending request",{requestStage:d,currentStage:u,withResultStatus:o.status})})}}negotiated({updated:t,loadingFields:n=[],buyerProposal:r,reconciler:o}){for(const c of Object.keys(t)){let u=t[c],d,p,m;switch(c){case"contactInfo":{u=t[c].email??this.parts.email.peek(),d=this.parts.email;break}case"acceptSmsMarketing":case"acceptEmailMarketing":u!=null&&(d=this.parts[c]);break;case"smsMarketingPhone":break;case"deliveryNext":{const f=t[c],h=this.current.fields.isShippingRequired.peek()===!1&&t.isShippingRequired===!0,g=f.status==="unavailable",y=g&&h&&r?.merchandise.__typename==="FilledMerchandiseTerms";if(!g||y){const{parts:_}=this,P=this.context.enabledDeliveryMethodsSignal.peek();if(P.length&&!t.sellability?.enabledDeliveryMethods.length){const O={enabledDeliveryMethods:P};t.sellability===void 0&&(O.missingSellerProposalReason="negotiated_update_sellability_missing"),ME(this.observability,"negotiator_delivery_line_fallback","[Negotiated] Falling back to enabledDeliveryMethods for delivery line construction because sellability was not available",O)}const v=t.sellability?.enabledDeliveryMethods??[],E=v.length>0?v:P,C=v.filter(O=>O!=="NONE"),S=C.length>0?C:P.filter(O=>O!=="NONE"),I=g?{kind:"recover",deliveryNext:f,enabledDeliveryMethods:S,buyerProposalDelivery:void 0,deliveryMacros:[]}:{kind:"reconcile",deliveryNext:f,enabledDeliveryMethods:E,buyerProposalDelivery:r?.delivery,deliveryMacros:f.deliveryMacros??[]};if(I.kind==="recover"&&I.enabledDeliveryMethods.length===0)break;d=_.deliveryLines;const k=_.deliveryLines.peek(),T=t.mustSelectProvidedShippingRate??this.current.fields.mustSelectProvidedShippingRate.value??!1,A=T&&k.length>0?k.map(O=>O.peek()):NE({negotiatedDeliveryNext:I.deliveryNext,enabledDeliveryMethods:I.enabledDeliveryMethods,buyerProposalDelivery:I.buyerProposalDelivery,negotiatedMerchandise:t?.remoteMerchandiseDetails?.stableIdToShopId?.size?t.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise:r?.merchandise,mustSelectProvidedShippingRate:T}),L=DE(I.buyerProposalDelivery);u=(I.kind==="recover"||I.deliveryNext.lines.length===0?A:OE({negotiatedDeliveryNext:I.deliveryNext,enabledDeliveryMethods:I.enabledDeliveryMethods,existingProposedDeliveryLines:k.map(O=>O.peek()),fallbackToFirstDeliveryMethod:!1,mustSelectProvidedShippingRate:T,buyerDeliveryOptionsMap:L,negotiatedMerchandiseLines:t.merchandiseLines?.lines})).map(O=>FE(O)),m=_.deliveryMacros;const N=_.deliveryMacros.peek();p=g1(I.deliveryMacros,N)}break}case"merchandiseLines":{const f=this.parts[c].peek(),h=t.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise,g=!!t?.remoteMerchandiseDetails?.stableIdToShopId?.size,y=g?h?Fd(h,f):f:r?Fd(r?.merchandise,f):f,_=g?h:r?.merchandise;_&&(this.context.missingMerchandiseStableIdsSignal.value=xE(_)),u=RE({proposedMerchandise:y,negotiatedMerchandiseLines:t.merchandiseLines}),d=this.parts[c];break}case"cartMetafields":{u=LE(r?.cartMetafields),d=this.parts[c];break}case"discountLines":{u=t[c].lines,d=this.parts[c];break}case"tipLines":{d=this.parts[c];break}case"availableRedeemables":{u=t[c]??[],d=this.parts[c];break}case"localizationExtensions":{const f=t[c];if(d=this.parts[c],d){const h=d.peek();u=wE(h,f??[])}break}case"paymentLines":{const f=t[c],h=this.parts[c].peek(),g=nh(this.shop),y=g?(()=>{const _=("merchandiseLines"in t?t.merchandiseLines?.lines:this.current.fields.merchandiseLines.peek()?.lines)??this.parts.merchandiseLines.peek(),P=("paymentFlexibilityPaymentTermsTemplate"in t?t.paymentFlexibilityPaymentTermsTemplate:this.current.fields.paymentFlexibilityPaymentTermsTemplate.peek())?.type;return{hasSellingPlan:rh(_),hasFixedSellingPlan:AE(_),paymentTermsTemplateType:P}})():{};u=TE({paymentLines:f.lines,proposedPaymentLines:h,availablePaymentMethods:t.paymentMethods,violations:t.allViolations,url:this.router.currentUrl.value,deferredTotal:t.deferredTotal,shouldNotSetInitialState:this.shop.paymentMethodAutoSelectionDisabled,fixSubscriptionRedeemablePaymentAmount:g,...y,isImmediateAmountReducedForRedeemables:t.isImmediateAmountReducedForRedeemables,observability:this.observability,delegatedPaymentInstrument:this.context.delegatedPaymentInstrument.peek(),bankPaymentToken:this.context.bankPaymentTokenSignal.peek()}),d=this.parts[c];break}case"billingAddress":{u={...this.parts.billingAddress.peek(),...u},d=this.parts.billingAddress;break}case"remotePaymentDetails":{d=this.parts[c],u=t.remotePaymentDetails;break}case"shippingAddress":{const f=this.parts.shippingAddress.peek(),h=u;u={city:"",postalCode:"",...f,...h,coordinates:f.coordinates??h?.coordinates},d=this.parts.shippingAddress;break}case"taxExemptions":{const f=t[c],h=this.parts.taxExemptions.peek();u=IE({negotiated:f,currentProposed:h}),d=this.parts.taxExemptions,f.status==="pending"&&(t.taxExemptions={...this.current.fields.taxExemptions.peek(),...f});break}default:d=this.parts[c]}d&&o.applyUpdate(d,u),m&&o.applyUpdate(m,p)}const i=new Set(n),a=this.initialUnresolvedFields.peek();let l;
19for(const c of a)i.has(c)||(l??=new Set(a),l.delete(c));rn(()=>{this.current.value=t,l&&(this.initialUnresolvedFields.value=l),this.loading.value=i})}settleRun(){if(this.inFlightRunCount-=1,this.inFlightRunCount>0||this.outstandingRunFailures.length===0)return;const t=this.outstandingRunFailures;this.outstandingRunFailures=[];let n=0;t.forEach(({error:r,negotiationStage:o})=>{this.pendingNegotiationsRequests.forEach((i,a)=>{this.canResolvePendingNegotiation(o,i.negotiationStage)&&(n+=1,i.reject(r),this.pendingNegotiationsRequests.delete(a))})}),n>0&&(this.observability.log("negotiation_failure_swept_pending_siblings","[Negotiate] Rejected pending negotiations orphaned by a failed negotiation",{sweptSiblings:n,negotiationStages:t.map(({negotiationStage:r})=>r)}),this.observability.counter({name:"negotiation_failure_swept_pending_siblings",value:n}))}canResolvePendingNegotiation(t,n){return n===t||(t==="progression"||t==="completion")}}function z1(e){return e?.__typename==="Throttled"?{status:"queued",token:e.queueToken,pollAfter:new Date(e.pollAfter).getTime(),productVariantAvailabilityV2:[],pollUrl:e.pollUrl}:{status:"inactive",token:e?.queueToken??void 0}}class Dp{#e=new Set;#t;constructor(t){this.#t=t}get current(){return this.#t}subscribe(t){return this.#e.add(t),()=>{this.#e.delete(t)}}set(t){this.#t=t,this.#e.forEach(n=>n(this.#t))}}function H1({checkout:e,client:t,graphql:{coreGraphql:n},observability:r,userEvents:o,persistence:i,router:a,shop:l,shopPay:c,source:u,url:d},{negotiateFromSessionData:p}){const m=p?.session?.negotiate?.result,f=oh(p??void 0),h=m?.__typename==="Throttled"||m?.__typename==="NegotiationResultAvailable"?new Dp(z1(m)):new Dp({status:"loading",token:t.unstable_getSerialization("queueToken")}),g=m?.__typename==="NegotiationResultAvailable"?m.sellerProposal:void 0,y=m?.__typename==="NegotiationResultAvailable"||m?.__typename==="NegotiationResultFailed"||m?.__typename==="TooManyRequests"?Zy(m,f,ih(g?.note)):[],_={type:"success",violations:f??[],errors:[],negotiationStage:"negotiation"},P=le(_),v=le(_);return P.subscribe(C=>{v.value=C}),{negotiator:new U1(n,t,t.unstable_getSerialization("sessionToken"),u,a,d,h,le(!1),e,i,P,v,m1({enabledDeliveryMethods:l.enabledDeliveryMethods,delegatedPaymentInstrument:VE(p?.session?.checkoutPaymentMethods)}),le([]),r,o,c,l,y),throttle:h}}function ao(){return Ht(UE)}function lo(){return Ht(sh)}function q1(){const e=lo(),{snapshot:t,subscribe:n}=V(()=>({snapshot:()=>e.current,subscribe:o=>e.subscribe(o)}),[e]),r=ZP(n,t);return V(()=>({throttle:r,setThrottle:o=>e.set(o)}),[e,r])}function G1({value:e,children:t}){return s(sh.Provider,{value:e,children:s(W1,{children:t})})}function W1({children:e}){const{graphql:{throttleGraphql:t}}=b(),{throttle:n}=q1();return t.setPollUrl("pollUrl"in n?n.pollUrl:void 0),s(G,{children:e})}const sv=e=>t=>{if(t==null||t.status!=="processed")return;const{loading:n,initialUnresolvedFields:r,current:o}=e,i=zE(t,{isShippingRequired:o.fields.isShippingRequired.peek(),ucp:o.fields.ucp.peek()});rn(()=>{o.value=i,r.peek().size>0&&(r.value=new Set);const a=n.peek();n.value=new Set([...a].filter(l=>!(l in i)))})};function $1({children:e}){const{router:t,client:n,shopPay:r,observability:o,userEvents:i,shop:a,checkout:l,persistence:c,url:u,source:d,graphql:{coreGraphql:p}}=b(),[m,f]=oe(),{data:h,loading:g}=ao();if(m)throw m;const y=h?.session?.negotiate?.result,_=V(()=>oh(h),[h]),P=y?.__typename==="NegotiationResultAvailable",v=y?.__typename==="CheckpointDenied",E=P?y.checkpointData:void 0;Mt(()=>{E&&l.checkpointToken.peek()!==E&&l.unstable_overwriteCheckpointToken(E)},[l,E]);const C=y?.__typename==="NegotiationResultAvailable"?y.sellerProposal:void 0,S=ih(C?.note),I=V(()=>H1({checkout:l,client:n,graphql:{coreGraphql:p},observability:o,userEvents:i,persistence:c,router:t,shop:a,shopPay:r,source:d,url:u},{negotiateFromSessionData:h}),[y]),{negotiator:k,throttle:T}=I;F(()=>{(async function(){if(y&&y.__typename!=="Throttled"&&Zy(y,_,S).length!==0)try{const M=await k.negotiate({force:!0,silenceViolations:["all"],negotiationStage:"negotiation",customizeNegotiation:N=>N});switch(k.pendingFieldsNegotiation.value=M,M.status){case"success":{const N={type:"success",violations:M.violations,errors:M.errors,negotiationStage:"negotiation"};k.lastJourneyProgression.value=N,k.hasNegotiatedOnce.value=!0,await k.runListeners(N);break}case"error":{const N={type:"error",violations:M.violations,errors:M.errors,negotiationStage:"negotiation"};k.lastJourneyProgression.value=N,k.hasNegotiatedOnce.value=!0,await k.runListeners(N);break}
19case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:sn(M)}}catch(M){M instanceof Error&&f(M)}})()},[k,y,_,S,a]);const A=sv(k);if(F(()=>{A(l.latestReceipt.value)},[]),h==null&&g)return null;if(v){const L=HE(y.redirectUrl,typeof window>"u"?t.currentUrl.value.toString():void 0);return typeof window>"u"?t.redirect(L):window.location.assign(L.href),null}return s(qE.Provider,{value:k,children:s(G1,{value:T,children:e})})}function av({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return!!(t&&GE.has(t))}function lv({checkout:e,mobileCheckoutSdk:t}){if(!e.configuration.layout.isOnePage.value)return!1;const{version:n,schema:r}=t.config;return!!(n&&r||t.variant.recovery)}function Y1(e){return av(e)?"checkout-sheet":lv(e)?"mobile-sdk":null}const j1=He({displayName:"CheckoutSheetProtocolProvider",renderError:dv,renderLoading:cv,load:()=>lt(()=>Be(async()=>{const{CheckoutSheetProtocolProvider:e}=await import("./0fb2c600.DGA7MXfc.js");return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([63,1,2,3,4,5,62,64,65,66,6,7,8,9])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),K1=He({displayName:"MobileCheckoutSdkProvider",renderError:dv,renderLoading:cv,load:()=>lt(()=>Be(async()=>{const{MobileCheckoutSdkProvider:e}=await import("./dd9b68fc.CouQG28e.js");return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([67,1,2,3,4,5,64,65,66,6,7,8,9])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))});function cv({children:e}){return s(G,{children:e})}const J1={"checkout-sheet":j1,"mobile-sdk":K1};function uv(e){const t=Y1(e);return t?J1[t]:null}function X1({children:e}){const t=uv(b());return t?s(t,{children:e}):s(G,{children:e})}function dv(e){throw e}const Q1=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],pv=mt("AnnouncementEmitterContext");function Z1({children:e}){const t=U(new Map),n=R((l,c)=>{t.current.has(l)||t.current.set(l,new Set);const u=t.current.get(l);u.has(c)||(eS(c),u.add(c))},[t]),r=R((l,c)=>{const u=t.current.get(l);if(u)for(const d of u)d(c)},[t]),o=R((l,c)=>{const u=t.current.get(l);u?.has(c)&&(Sd(c),u.delete(c))},[t]),i=R(l=>{const c=l?[l]:Q1;for(const u of c){const d=t.current.get(u);if(d){for(const p of d)Sd(p);d.clear()}}},[t]),a=V(()=>({on:n,emit:r,off:o,removeAllListeners:i}),[n,r,o,i]);return s(pv.Provider,{value:a,children:e})}function mv(){return Ht(pv)}const fv=Ge(null),tY=mt("PendingComponentContext");function eM({children:e}){const t=V(()=>{const n=le(new Set);return{registerComponent:o=>(n.value=new Set([...n.peek(),o]),()=>{n.value=new Set([...n.peek()].filter(i=>i!==o))}),pendingComponentsSignal:n}},[]);return s(fv.Provider,{value:t,children:e})}function nY(){return Pe(fv)}const rY=mt("ExtensionPointContext"),oY=mt("ExtensionContext"),hv=mt("CheckoutEditorBridgeContext");function tM({children:e}){const t=Er(),n=Cx(),[r,o]=oe(null),i=wt();return t?s(hv.Provider,{value:r,children:[n||r?e:null,s(ve,{when:i,children:s(nM,{setContext:o})})]}):e}const nM=He({load:()=>Be(()=>import("./adeb5fdb.BJ-4Mvan.js"),__vite__mapDeps([68,1,53,34,15,2,3,4,5,69,60,66,9,6,7,8]))}),gv=Ge({loading:!1}),rM="dev";function iY(){return Pe(gv)}function oM(e){return!(!e?.version||parseInt(e.version,10)<3)}const Ha="dev_mode";function iM(e){return{get:()=>e.get(Ha),set:t=>{const n=new Date().getTime(),r=new Date(n+504*60*60*1e3);e.set(Ha,t,{expiry:r})},remove:()=>{e.delete(Ha)}}}function sM(){const{client:e}=b();return V(()=>iM(e.cookies),[e.cookies])}function aM({children:e}){const t=lM();return s(gv.Provider,{value:t,children:e})}function lM(){const e=sM(),{router:t,shop:n}=b(),r=!1,o=V(()=>t.currentUrl.value.searchParams.get(rM)??e.get(),[t,e]),i=o!=null&&(n.allowExtensionDevelopment||r),[a,l]=tS((c,u)=>{switch(u.type){case"fetched":{const d=oM(u.workspace)?{...u.workspace,extensions:cM(u.workspace.extensions)}:{...u.workspace,extensions:u.workspace.extensions.map(({extensionPoint:p,...m})=>({version:null,...m,extensionPoints:p?[p]:m.extensionPoints}))};return d.appId&&(d.appId=uM(d.appId)),{loading:!1,workspace:d}}case"error":return{loading:!1}}},{loading:i});return F(()=>
19{if(!i)return;let c=!0;return(async()=>{try{const d=await(await fetch(o)).json();if(!c)return;e.set(o),l({type:"fetched",workspace:d})}catch{if(!c)return;l({type:"error"})}})(),()=>{c=!1}},[o,e,i]),a}function cM(e){return e.filter(n=>n.surface==="checkout"?!0:Array.isArray(n.extensionPoints)?(n.extensionPoints=n.extensionPoints.filter(r=>typeof r=="object"&&"surface"in r&&r?.surface==="checkout")).length>0:!1).map(n=>({...n,extensionPoints:n.extensionPoints.map(r=>typeof r=="object"?r:{target:r,metafields:n.metafields,surface:"checkout"})}))}function uM(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:WE("App",t)}function yv(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function vv(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function _v(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function dM(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function bv(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function pM(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function Pv(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function Ys(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function mM(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function Su(e,{beforeStock:t=[],afterStock:n=[Pv(e)]}={}){return[yv(e),vv(e),_v(e),...t,bv(e),...n]}function fM({i18n:e,greenPath:t}){return{greenPath:t,detours:[...Su(e,{beforeStock:[dM(e)]}),Ys(e)]}}function Sv(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function Ev(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if(r?.type!=="wallet")return!1;const o=wc(n);return r.name==="APPLE_PAY"||r.name==="PAYPAL_EXPRESS"&&o}function hM({i18n:e,reviewEnabled:t,paymentMethods:n,proposedPaymentLines:r,shop:o,checkout:i}){return{greenPath:[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:({isShippingRequired:a})=>{const l=["contact-information","delivery-method","payment-methods","localization-extension"];return a?l.push("shipping-address"):Ev(t,r.peek(),{shop:o,checkout:i,paymentMethods:n})||l.push("billing-address"),l}},...t?[Sv(e)]:[]],detours:[...Su(e),Ys(e)]}}function gM({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?[Sv(e)]:[]],detours:[...Su(e,{afterStock:[]}),Ys(e)]}}function yM({i18n:e,shopName:t,currentUrlSearch:n}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",queryParams:n,features:({isShippingRequired:r})=>[r?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[mM(e),yv(e,"redirectToCart"),vv(e),_v(e),bv(e),pM(e,t),Pv(e),Ys(e)]}}function vM({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":st(n)?"orderEdit":r?"onePage":"threePage"}function Cv(){const{buyerIdentity:e,deliveryNext:t}=q(),{checkout:n,shop:r,i18n:o}=b(),i=w(()=>$E(e.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:a}=Jt(i.value),l=Je(a),c=r.additionalAddressFieldsEnabled;return w(()=>YE({purchasingCompany:e.value?.purchasingCompany,shippingCountries:r.shippingCountries,addressSettings:n.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,editFormat:n.address.extendedAddressMode.getFormat(i.value,null),deliveryNextValue:t.value,additionalFieldsEnabled:c,i18n:o}))}function co(){const{buyerIdentity:e}=q(),t=er();return w(()=>t.value.enabledDeliveryMethods.includes("PICK_UP")&&!!e.value?.purchasingCompany)}function uo({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(st(t)&&n.length>0)return n[0]}function kv(){const e=co(),t=q().deliveryNext,{checkout:n}=b();return w(()=>{const r=n.proposal.facts.delivery??[],o=r.length>0&&r.every(i=>i.pickupAddress!==null);return e.value&&(br(t.value)||o)})}function Eu(){const e=Bn(),{buyerIdentity:t,shippingAddress:n}=q(),{checkout:r,source:o}=b(),i=kv(),a=co(),l=Sn();return w(()=>l.value||!(a.value||e.value)||i.value?!1:!Wf(uo({checkout:r,source:o})?.deliveryAddress??n.value)&&!t.value?.purchasingCompany?.location.shippingAddress)}function _M(){const e=q().buyerIdentity,t=Sn(),n=co(),{checkout:r,source:o}=b(),i=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return w(()=>{const a=e.value?.purchasingCompany,l=(i.value??!1)||!!uo({checkout:r,source:o});return!!a&&(t.value||n.value&&!l)&&r.isShippingRequired.value})}const Op=["contact-information","shipping-address"],Fp=["delivery-method"],Bp=["payment-methods","billing-address","localization-extension"];function bM(){const{i18n:e,shop:t,source:n,checkout:r,observability:o}
19=b(),{buyerIdentity:i}=q(),a=Eu(),l=Sn(),c=Cv(),u=co(),d=_M(),p=R((h,g)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:h,reason:g}),!0),[o]),m=R(h=>{const g=i.value?.purchasingCompany;return!g?.location.shippingAddress||!h?!1:!!(l.value&&c.value&&oi(g.location.shippingAddress,h))},[i,l,c]);return w(()=>{if(!i.value?.purchasingCompany)return;const g=!st(n)&&r.isShippingRequired.value&&!a.value,y=d.value,_={onePage:()=>({id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...y?Op:[],...g?Fp:[],...Bp]}),information:()=>({id:"information",label:e.translate("contact.title"),route:"/information",features:Op,fastForwardThroughPage:({shippingAddress:P})=>m(P)&&!u.value?p("information","business_customer_pre_negotiated_address"):!1}),shipping:()=>({id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:Fp,fastForwardThroughPage:({shippingAddress:P,deliveryNext:v})=>l.value?m(P)?p("shipping","business_customer_pre_negotiated_address"):!1:v?.status!=="unavailable"?p("shipping","business_customer_no_editable_address_with_delivery"):!1,skipOverPage:({deliveryNext:P})=>br(P)}),payment:()=>({id:"payment",label:e.translate("payment.title"),route:"/payment",features:Bp}),review:()=>({id:"review",label:e.translate("review.title"),route:"/review",features:[]})};return r.configuration.layout.isOnePage.value?[_.onePage(),...t.confirmationPageEnabled?[_.review()]:[]]:[...y?[_.information()]:[],...g?[_.shipping()]:[],_.payment(),_.review()]}).value}function yn(e,t){return e?.id===t?.id&&e?.route===t?.route}function Vp(e){!e.parts.email.value.trim()||!e.parts.acceptEmailMarketing.value||(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function PM(){const e=Se(),t=Xe(),{checkout:n}=b(),r=n.configuration.layout.isOnePage.value;return tg(async(o,i)=>{if(o==="completion"){Vp(t);return}if(o!=="progression"||i?.prefetch||r)return;const{currentDetour:a,currentPage:l,plan:c}=e.value;if(a||l==null)return;const u=t.current.value,d=c.greenPath.findIndex(m=>yn(m,l)),p=SM(c.greenPath,d,u);(l.id==="shipping"||l.id==="information"&&p?.id==="shipping")&&Vp(t)}),null}function SM(e,t,n){return e.slice(t+1).find(r=>r.skipOverPage==null||!r.skipOverPage(n))}function EM(e){return e?.type==="thankYou"}function CM({router:e,plan:t,journeyStateSignal:n}){const r=U(void 0),o=w(()=>{const l=e.currentUrl.value.normalizedPath;return t.greenPath.find(c=>c.route===l)}),i=w(()=>{const l=o.value;l&&(r.current=l);const c=r.current,u=e.currentUrl.value.normalizedPath,{history:d}=n.value,p=t.detours.find(m=>m.route===u);if(l)return l;if(p&&c)return c;if(p&&!c){const m=t.greenPath[0],f=d.find(g=>!g.complete);return t.greenPath.find(g=>g.id===f?.id)??m}}),a=w(()=>{const l=n.value.plan.detours.find(c=>c.route===e.currentUrl.value.normalizedPath);return EM(l)});return{pageBeforeDetour:i,completed:a}}class Rt extends oA{constructor(){super(...arguments),this.name="JourneyError"}}class kM extends Pn{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function IM(e){return e.split("$.")[1]?.split(".").map(t=>t.replace(/\[\d+\]/g,""))??[]}function po(e){if(!("target"in e))return;const[t,n]=IM(e.target);switch(t){case"payment":return n==="billingAddress"?"billing-address":"payment-methods";case"tip":return"payment-methods";case"buyerIdentity":return"contact-information";case"delivery":return Zr.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}function cs(e,t=[]){return!!(e?.email??e?.phone)&&t.every(n=>po(n)!=="contact-information")}function AM(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)}function TM(){const{data:e}=ao();return e?.session?.negotiate.result.__typename!=="NegotiationResultAvailable"?!1:e.session.negotiate.result.sellerProposal.delivery.__typename==="PendingTerms"}function wM(){const{data:e}=ao(),{checkout:t}
19=b(),n=e?.session?.negotiate.result;let r;if(n?.__typename==="NegotiationResultAvailable"&&n.sellerProposal.delivery.__typename==="PendingTerms"){const{sellerProposal:i,buyerProposal:a}=n;r=ah({delivery:i.delivery,buyerDelivery:a.delivery,remoteDelivery:lh(i.remote).remoteDelivery})}const{details:o}=Jt(r?.countryCode);return r==null?!1:pu({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:o})}function LM(){const{data:e}=ao();if(e?.session?.negotiate.result.__typename!=="NegotiationResultAvailable")return;const{sellerProposal:t}=e.session.negotiate.result;return ah({delivery:t.delivery,remoteDelivery:lh(t.remote).remoteDelivery})}function xM(e,t){return e?.type===t?.type&&e?.route===t?.route}function Iv(e){return gc(e)&&!e.some(t=>yc.has(t.code))}function Av(e){return e.some(t=>t.__typename==="UnprocessableTermViolation"?jE.has(t.code):!1)}function Tv(e){const t=typeof e=="string"?e:e.type;return st(e)||t==="draftOrder"}function RM({plan:e,isSimulated:t,currentPageFromUrlIndex:n,currentPageFromHistoryIndex:r,canLoadReview:o}){const i=e.greenPath[n];if(t&&i||n>=0&&n<=r)return i;const a=e.greenPath[r];if(a?.id==="review"&&!o){const l=e.greenPath.findIndex(u=>u.id==="review"),c=e.greenPath[l-1];return c||e.greenPath[0]}return a}function MM({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:o,negotiatedState:i,plan:a,postPurchaseInquiryStatus:l,proposedPaymentLines:c,receipt:u,sessionType:d,shippingRequired:p,throttle:m,url:f}){const h=a.greenPath.findIndex(H=>{if(H.skipOverPage?.(i))return!1;const J=qo(H.features,i);return H.fastForwardThroughPage?!H.fastForwardThroughPage(i,J):!0}),g=a.greenPath[h],y=[];o.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:h,firstPage:String(g?.id),plan:JSON.stringify(a.greenPath)}),a.greenPath.slice(0,h).forEach(H=>{if(H.id==="information"){const J=cs(i?.contactInfo,i.allViolations??[]);o.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:J,contactInfo:JSON.stringify(i?.contactInfo),violations:i.allViolations??[]}),y.push({id:H.id,skipped:!1,complete:J})}else y.push({id:H.id,skipped:!1,complete:!0})}),y.push({id:g.id,skipped:!1,complete:!1});const P=a.greenPath.findIndex(H=>H.route!==f.normalizedPath?!1:H.skipOverPage?!H.skipOverPage(i):!0),v=c?.some(H=>H.method.type==="direct"&&H.method.sessionId),C=i.runningTotal?.amount===0||v,S=a.greenPath[P]?.id==="review"&&!C,I=S?P-1:P,k=!!a.greenPath[I]?.skipOverPage?.(i);if(t&&n&&!k&&I>h&&g?.blockedOnlyByShippingAddress?.(i,qo(g.features,i))){for(let H=h;H<I;H++){const J=y[H];y[H]=J?{...J,complete:!0}:{id:a.greenPath[H].id,skipped:!0,complete:!0}}y[I]={id:a.greenPath[I].id,skipped:!1,complete:!1},o.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:d,firstPageIndex:h,currentPageFromUrlIndex:P,advanceTo:I,clamped:S})}const T=y.find(H=>!H.complete&&!H.skipped),A=a.greenPath.findIndex(H=>T?.id===H.id),L=a.greenPath[A],M=a.greenPath[P],N=RM({plan:a,isSimulated:d==="simulated",currentPageFromUrlIndex:P,currentPageFromHistoryIndex:A,canLoadReview:C}),O=a.detours.find(H=>"route"in H&&H.route===f.normalizedPath),D=Iv(i.allViolations??[]),B=i.shippingAddress,z=r.length>0&&r[0].deliveryAddress?r[0].deliveryAddress:B,W=i?.buyerIdentity?.customerProfile?.__typename==="BusinessCustomerProfile"&&!e&&KE(z)&&Tv(d)&&p,X=new URLSearchParams(f.search),Z=O?.type==="processing"&&X.get("post_purchase")==="true",j=(O?.type==="postPurchase"||Z)&&l==="success"&&u?.status==="processed"&&u.orderCreationStatus.status==="created",Q=(O?.type==="shopPayLogin"?a.detours.find(H=>H.type==="shopPayLogin"):void 0)??(O?.type==="offsitePaymentFailed"?a.detours.find(H=>H.type==="offsitePaymentFailed"):void 0)??(j?a.detours.find(H=>H.type==="postPurchase"):void 0)??(m.status==="queued"?a.detours.find(H=>H.type==="throttle"):void 0)??(D?a.detours.find(H=>H.type==="stockProblems"):void 0)??(W?a.detours.find(H=>H.type==="noAddressLocation"):void 0)??(u?.status==="action_required"||u?.status==="processing"||u?.status==="processing_remote_checkouts"?a.detours.find(H=>H.type==="processing"):void 0)??(u?.status==="processed"&&u.redirectUrl?a.detours.find(H=>H.type==="processing"):void 0)??(u?.status==="processed"?a.detours.find(H=>H.type==="thankYou"):void 0)??(O?.type==="thankYou"&&d==="simulated"?a.detours.find(H=>H.type==="thankYou"):void 0);if(o.leaveErrorBreadcrumb("Journey:initializeJourney: resulting currentPage and expectedDetourFromState",{history:JSON.stringify(y.map(H=>H&&{id:H.id,complete:H.complete,skipped:H.skipped})),normalizedUrlPath:f.normalizedPath,currentPageFromHistory:String(L?.id),currentPage:String(N?.id),expectedDetourFromState:Q?.route,receipt:JSON.stringify(u)}),Q==null&&N==null)throw new Rt("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return Q?{plan:a,history:y,redirectTo:xM(O,Q)?void 0:Q}:{plan:a,history:y,redirectTo:yn(M,N)?void 0:N}}const NM="journey_init_contact_state",DM="negotiated_missing_contact_violation_observed";function OM({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:o,initialPath:i,sessionType:a}){F(()=>{const c=t.current.value,u=t.parts.email.value,d=t.current.fields.allViolations.value??[];e.log(NM,"Initial contact-info state captured at journey initialization",{layout:o?"onePage":"threePage",planPages:n.greenPath.map(p=>p.id).join(","),initialPath:i,sessionType:a,identity:r,customerProfileType:c?.buyerIdentity?.customerProfile?.__typename,hasNegotiatedContactEmail:!!c?.contactInfo?.email,hasNegotiatedCustomerProfileEmail:!!c?.buyerIdentity?.customerProfile?.email,hasProposedEmail:!!u,hasMissingContactViolation:d.some(p=>p.code==="BUYER_IDENTITY_MISSING_CONTACT_METHOD")})},[]);const l=U(!0);ze(()=>{const c=t.current.fields.allViolations.value??[];if(l.current){l.current=!1;return}c.some(d=>d.code==="BUYER_IDENTITY_MISSING_CONTACT_METHOD")&&e.log(DM,"Subsequent negotiation surfaced a missing-contact violation",{hasNegotiatedContactEmail:!!t.current.fields.contactInfo.peek()?.email,hadProposedEmailFallback:!!t.parts.email.peek(),customerProfileType:t.current.peek().buyerIdentity?.customerProfile?.__typename,identity:r,sessionType:a,layout:o?"onePage":"threePage"})})}class FM extends Pn{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}const Up=10,qa=200;class BM{#e={};#t=null;#r=!1;detectInfiniteRedirect(t,n,r){const o=t.pathname;if(this.#t&&clearTimeout(this.#t),this.#e[o]=(this.#e[o]||0)+1,this.#e[o]>=Up&&!this.#r){const i=new FM(`Detected potential infinite redirect: ${this.#e[o]} navigations to ${o} within ${qa}ms`),a=n.value;r.error(i,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#e),currentUrl:t.toString(),path:o,threshold:Up,timeframe:qa},journeyState:{redirectTo:a.redirectTo?.route}}}),this.#r=!0,this.#e={}}this.#t=setTimeout(()=>{this.#e={},this.#t=null},qa)}cleanup(){this.#t&&(clearTimeout(this.#t),this.#t=null)}}
19function VM(){const e=U(null);return e.current||(e.current=new BM),F(()=>()=>{e.current?.cleanup()},[]),e.current}function UM(e){const{router:t,checkout:n,observability:r,source:o}=b(),i=lo(),a=n.proposal.facts.delivery??[],l=Xe(),c=!!n.proposal.facts.requiresShipping,u=st(o)?c:n.isShippingRequired.value,d=n.configuration.layout.isOnePage.value,p=TM(),m=wM(),f=kv(),h=VM();OM({observability:r,negotiated:l,plan:e,identity:n.identity.current.value,isOnePageLayout:d,initialPath:t.currentUrl.value.normalizedPath,sessionType:o.type});const{postPurchaseInquiryStatus:g,paymentLines:y}=ie(),_=g.value,P=()=>MM({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:p,buyerProposalHasDestination:m,deliveryFact:a,observability:r,negotiatedState:l.current.peek(),plan:e,postPurchaseInquiryStatus:_,proposedPaymentLines:y.value,receipt:n.latestReceipt.value,sessionType:o.type,shippingRequired:u,throttle:i.current,url:t.currentUrl.value}),v=V(()=>lc((I,k)=>HM(I,k,r,t,l),P()),[]),E=R(I=>{v.value=I},[v]),C=U(d);C.current!==d&&(C.current=d,E({type:"reinitialize",state:P()}));const S=U(t.currentUrl.value);return S.current=t.currentUrl.value,F(()=>t.currentUrl.subscribe(I=>{S.current!==I&&(S.current=I,E({type:"clearRedirect"}),h.detectInfiniteRedirect(I,v,r))}),[t,E,h,v,r]),F(()=>t.block(I=>{const k=t.currentUrl.value,T=AM(k,I);return T&&r.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:k.pathname,search:k.search},requested:{path:I.pathname,search:I.search}}),T}),[t,r]),[v,E]}function zM(e,t,n,r){const o=t.greenPath.findIndex(i=>yn(i,e));if(o===-1)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: target page not found in plan",{targetPageId:e.id,targetPageRoute:e.route}),t.greenPath[0];if(!n)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: no negotiated context available",{targetPageId:e.id}),t.greenPath[0];for(let i=0;i<o;i++){const a=t.greenPath[i];let l=!1;if(a.id==="information"?l=cs(n.contactInfo,n.allViolations??[]):l=!0,!l)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:a.id,unsatisfiedPrerequisitePageRoute:a.route}),a}return e}function HM(e,t,n,r,o){n.leaveErrorBreadcrumb("Journey:updateJourney: initiated with action",{actionType:t.type});const{plan:i}=e,a=e.redirectTo?{...e,redirectTo:void 0}:e,l=r.currentUrl.value.normalizedPath,c=i.greenPath.find(d=>d.route===l),u=i.detours.find(d=>d.route===l);switch(t.type){case"reinitialize":return t.state;case"clearRedirect":return a;case"skipRemainingPages":{const{plan:d,history:p}=e;if(!c){if(u?.type==="thankYou")return e;const g=typeof window<"u"&&window.location?window.location.href:"SSR: no location available";throw n.leaveErrorBreadcrumb("Skipping to completion, but no current page",{currentDetour:u,currentUrl:g}),new Rt("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const m=d.greenPath.findIndex(g=>yn(g,c)),f=p.slice(0,m+1),h=f.pop();f.push({...h,complete:!0});for(let g=m+1;g<d.greenPath.length;g++){const y=f[g];y?f[g]={...y,skipped:!0}:f[g]={id:d.greenPath[g].id,skipped:!0,complete:!1}}return n.leaveErrorBreadcrumb("Journey:updateJourney: on progress, skip to completion",{history:f.map(g=>({id:g?.id,complete:g?.complete,skipped:g?.skipped})),currentDetourRoute:u?.route}),{...a,history:f}}case"progress":{const{plan:d,history:p}=e,{page:m}=t;if(m==null)throw n.leaveErrorBreadcrumb("Journey:updateJourney: progress failed, no next page",{currentPage:c?.id,currentDetour:u?.type,actionType:t.type}),new Rt(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const f=d.greenPath.findIndex(g=>yn(g,m)),h=p.slice(0,f);for(let g=0;g<f;g++){const y=h[g];y==null?h[g]={id:d.greenPath[g].id,skipped:!0,complete:!0}:y.complete||(h[g]={...y,complete:!0})}return h.push({id:m.id,skipped:!1,complete:!1}),n.leaveErrorBreadcrumb("Journey:updateJourney: on progress",{history:h.map(g=>({id:g?.id,complete:g?.complete,skipped:g?.skipped})),currentPageRoute:m.route}),{...a,history:h}}case"complete":{const{history:d}=e,p=[...d],m=p.pop();return p.push({...m,complete:!0}),n.leaveErrorBreadcrumb("Journey:updateJourney: on complete, set currentPage to undefined",{history:JSON.stringify(p.map(f=>f&&{id:f.id,complete:f.complete,skipped:f.skipped}))}),{...a,history:p}}case"error":{const{plan:d,history:p}=e,{page:m=c}=t;if(m==null)return n.leaveErrorBreadcrumb("Journey:updateJourney: currentPage from state",{history:JSON.stringify(p.map(y=>y?.id)),currentPage:String(c?.id)}),n.error(new Rt(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...a,redirectTo:d.greenPath[0]};const f=o?zM(m,d,o.current.peek(),n):m,h=!yn(m,f);o&&h&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:m.id,redirectedToPage:f.id});const g=d.greenPath.findIndex(y=>yn(y,f));return n.leaveErrorBreadcrumb("Journey:updateJourney: on error",{history:p.map(y=>({id:y?.id,complete:y?.complete,skipped:y?.skipped})),originalTargetPageRoute:m.route,finalTargetPageRoute:f.route,currentDetourRoute:u?.route}),{...a,history:[...p.slice(0,g),{id:f.id,skipped:!1,complete:!1}]}}default:sn(t)}}function qM({plan:e}){const{router:t,observability:n}=b();return R(async(r,o)=>{const i=e.detours.find(l=>l?.type===r);if(!i)throw n.leaveErrorBreadcrumb("Detour, but no matching detour",{detourType:r,detours:e.detours,currentUrl:t.currentUrl.value.href}),new Rt("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const a=`${i.route}${e.greenPath[0].queryParams||""}`;t.navigate(a,o?.routerOptions)},[e.detours,e.greenPath,t,n])}function zp(e){return e.status==="complete"||e.status==="inactive"}function Hp(e){return e?.status==="failed"||e?.status==="processed"}function GM(e,t,n){const r=lo(),{checkout:o,client:i,shop:a,source:l,observability:c,url:u,router:d}=b(),p=Ft(),m=o.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return R(async(f,h,g)=>{switch(f.type){case"thankYou":case"postPurchase":{c.log("use_exit_detour_detected",`Tried to progress out of a ${f.type} detour`,{currentPage:h?.route,currentDetour:f.type});return}case"throttle":{n(!0),await new Promise(y=>{if(zp(r.current)){y();return}const _=r.subscribe(P=>{zp(P)&&(_(),y())})}),await e({force:!0,include:[],silenceViolations:f.behavior==="redirectToCart"?["non-stock"]:["all"],negotiationStage:"progression",onComplete(y){switch(g?.(y),y.status){case"success":{if(h){t({type:"progress",page:h});const _=`${h.route}${h.queryParams||""}`;d.navigate(_,{replace:!0})}else throw new Rt("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});break}
19case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"alreadyCompleted":case"tooManyRequests":c.log("use_exit_detour_throttle_negotiation_non_success","Throttle negotiation completed with non-success result",{status:y.status,currentPage:h?.route});break;default:sn(y)}}}),n(!1);break}case"stockProblems":{if(n(!0),p.parts.merchandiseLines.value.length===0||!m)if(o.configuration.allowRedirectToStorefront)c.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:a.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length}),D1({client:i,url:u,source:l,configuration:o.configuration});else{c.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:a.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length});break}else await e({force:!0,silenceViolations:["non-stock"],include:[],onComplete(y){switch(y.status){case"success":{if(h)t({type:"progress",page:h}),d.navigate(h.route,{replace:!0});else throw new Rt("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":c.log("use_exit_detour_stock_problems_negotiation_non_success","[Journey] Exiting stock problems detour with non-success result",{resultStatus:y.status,currentPage:h?.route});break;default:sn(y)}}});n(!1);break}case"processing":{n(!0),c.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(y=>{if(Hp(o.latestReceipt.value)){y();return}const _=_l(()=>{Hp(o.latestReceipt.value)&&(_(),y())})}),n(!1);break}case"shopPayLogin":{if(n(!0),h){t({type:"progress",page:h});const y=`${h.route}${h.queryParams||""}`;d.navigate(y,{replace:!0})}else throw new Rt("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});n(!1);break}case"offsitePaymentFailed":{n(!1);break}case"noAddressLocation":case"terminalError":throw new Rt(`Can't progress out of a ${f.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:sn(f)}},[c,n,e,r,t,d,p.parts.merchandiseLines,m,i,u,l,a.hasStorefront,o])}function WM(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;rn(()=>{e.generalPaymentError.value=void 0,e.generalPaymentErrorCode.value=void 0;for(const r of Object.values(n))r.value?.origin==="server"&&(r.value=void 0)})}const Vr="departure_page";function wv({violations:e,greenPath:t,negotiated:n,currentPage:r}){const o=new Set(e.map(po)),i=t.filter(c=>c.skipOverPage?!c.skipOverPage(n):!0),a=i.findIndex(c=>c.id===r?.id);return(a===-1?i:i.slice(0,a)).find(c=>(typeof c.features=="function"?c.features(n):c.features).some(d=>o.has(d)))}function $M({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:o,receipt:i}){const a=xv(t,r,"payment-methods");if(YM(i)&&a)return a;const l=jM(t,e);if(l)return l.id==="review"?(a||o.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no last page with payment methods found, falling back to first page "),a??t[0]):l;const c=n.find(p=>!p.complete&&!p.skipped),u=t.findIndex(p=>c?.id===p.id);if(!a){const p=t[u]??t[0];return o.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:p?.id}),p}const d=t.findIndex(p=>p.id===a.id);if(u>=0&&d>u){const p=t[u];return o.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:a.id,fallbackPageId:p.id}),p}return a}function YM(e){return e?.failure.type==="payment"&&e.failure.hasOffsitePaymentMethod===!0}function jM(e,t){return t?e.find(({id:n})=>n===t):void 0}function KM(){const{router:e}=b(),t=Lv();return R((n,r)=>{const i={pathname:t(n).route,search:e.currentUrl.value.search};r?.replace?e.navigate(i,r):e.navigate(i)},[t,e])}function Lv(){const{observability:e}=b(),{history:t,plan:n}=Se().value,r=Xe();return R(o=>JM({feature:o,greenPath:n.greenPath,history:t,negotiated:r,observability:e}),[n.greenPath,r,t,e])}function JM({feature:e,greenPath:t,history:n,negotiated:r,observability:o}){let i=xv(t,r,e);const a=n.find(d=>!d.complete&&!d.skipped),l=t.findIndex(d=>d.id===i?.id),c=t.findIndex(d=>a?.id===d.id),u=l>=0&&l<=c;if(!i||!u){const d=t[c]??t[0];o.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${d?.id}`),i=d}return i}function xv(e,t,n){return[...e].reverse().find(i=>(typeof i.features=="function"?i.features(t.current.peek()):i.features).includes(n))}const XM=1500,QM=450,sY=64,aY=14;function ZM(e){return XM*e+QM}function eN(e){const t=document.createElement("a");
19t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}function Rv(e){return e.method.type==="customOnsite"&&e.method.paymentBrands?.length===1&&e.method.paymentBrands.includes("usdc")}function Mv(e){return e.type==="customOnsite"&&e.paymentBrands?.length===1&&e.paymentBrands.includes("usdc")}function tN(e){return e.method.type==="customOnsite"&&(e.method.paymentBrands??[]).some(t=>t.toLowerCase()==="wechatpay")}function nN(e){return e.type==="customOnsite"&&(e.paymentBrands??[]).some(t=>t.toLowerCase()==="wechatpay")}function rN(){const e=q().paymentMethods,t=ie().paymentLines;return w(()=>{const n=t.value.at(0);return n?tN(n)||oN(n,e.value):!1})}function oN(e,t){if(!t||t.length===0||!("walletContent"in e.method)||e.method.name!=="SHOP_PAY")return!1;const n=e.method.walletContent?.paymentMethodIdentifier;return!!t.find(o=>nN(o)&&o.paymentMethodIdentifier===n)}const zl={id:"658bb809ab07c0463243990c0c79fd8f2eacb112e7ea5c8f2cef6bc7b109127a",type:"query",name:"PollForReceipt",source:""};function Cu(){const e=q().paymentMethods,t=ie().paymentLines;return w(()=>{const n=t.value.at(0);return n?Rv(n)||iN(n,e.value):!1})}function iN(e,t){if(!t||t.length===0||!("walletContent"in e.method)||e.method.name!=="SHOP_PAY")return!1;const n=e.method.walletContent?.paymentMethodIdentifier;return!!t.find(o=>Mv(o)&&o.paymentMethodIdentifier===n)}const sN=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function aN(e){const t=location.hostname;return sN.includes(t)}const Ga=3e3,Wa=15e3,lN=3e4,Nv=1e4,$a={TIMEOUT:12e4,ATTEMPTS:120},qp="hsa_survey_completed";function lY(e){if(!e)return"";try{return new URL(Dv(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const Dv=e=>{const t="https://";return e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(n,r,o)=>r?n:`${t}${o}`)},Ya="3ds_completed",cN=6e5;function Ko(e){if(!e)return"none";try{const t=new URL(Dv(e)).hostname.toLowerCase().replace(/^www\./,"");return t==="hooks.stripe.com"?"hooks.stripe.com":t==="uk.affirm.com"?"uk.affirm.com":t==="sandbox.uk.affirm.com"?"sandbox.uk.affirm.com":t==="affirm.com"?"affirm.com":t==="sandbox.affirm.com"?"sandbox.affirm.com":t.endsWith(".affirm.com")?"affirm_subdomain":t.endsWith(".stripe.com")?"stripe_subdomain":"other"}catch{return"invalid"}}const Hl=Symbol("pollRequestTimedOut");async function Gp(e,t){let n;const r=new Promise(o=>{n=setTimeout(()=>o(Hl),t)});try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function uN(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge"&&e.action.offsiteRedirect}function dN(){const e=nS({maxAttempts:$a.ATTEMPTS}),{client:t,checkout:n,persistence:r,observability:o,embed:i,source:a,graphql:{coreGraphql:l}}=b(),c=t.unstable_getSerialization("sessionToken"),u=U(),d=Cu();return F(()=>()=>{u.current=void 0},[]),R(async p=>{const m=Symbol("receipt-poll");u.current=m;const f=n.latestReceipt.value?.id,h=()=>f!==n.latestReceipt.value?.id,g=()=>u.current===m&&_&&!h(),y=n.latestReceipt.value;if(y?.id==null||y==null)return;p?.(y),o.log("receipt_polling_detected","[Receipt Polling] Receipt polling started with initial receipt",nn(y));let _=!0,P,v=0,E=!1,C=Date.now(),S,I=!1,k=!1,T=!1;switch(y.status){case"processing":case"processing_remote_checkouts":{S=y.pollAt;break}case"action_required":{S=await A(y);break}case"polling_for_order":{S=zi+Date.now();break}}async function A(N){return new Promise(O=>{if(!(n.configuration.isUniversalCheckoutFinalizer&&N.action.type==="complete_payment_challenge"&&N.action.offsiteRedirect===!1&&!d.value)&&!I&&(I=!0,ch(i,`action_required_receipt - ${N.action.type}`)),N.action.type==="complete_payment_challenge"){if(d.value)return O(Date.now()+Ga);if(N.action.offsiteRedirect)return O(void 0)}else if(N.action.type==="pre_payment_buyer_action_required"){if(T)return O(Date.now()+Ga);const Z=Date.now(),ce={...nn(N),actionType:N.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},j=({data:Q})=>{Q?.type===qp&&(window.removeEventListener("message",j),T=!0,v=0,C=Date.now(),o.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...ce,dataType:qp,elapsedTimeMs:Date.now()-Z}),O(Date.now()))};o.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",ce),window.addEventListener("message",j);return}else if(N.action.type==="complete_payment_challenge_v2"){const Z=N.timeout?.millisecondsRemaining;return E&&Z===0&&(v=0,C=Date.now()),E=!!Z,O(E?Date.now()+Ga:Date.now()+JE)}const B=Date.now(),z=N.action.type==="complete_payment_challenge"?N.action:void 0,x={...nn(N),actionType:N.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:z?.offsiteRedirect,sourceHostCategory:Ko(z?.url),surface:"checkout-web"},W=({data:Z,origin:ce})=>
19{if(Z.type===Ya){if(clearTimeout(X),window.removeEventListener("message",W),!g()||!Mi(n.latestReceipt.value,N)){O(void 0);return}v=0,C=Date.now();const j=Date.now()-B;o.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:Ya}),o.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...x,dataType:Ya,elapsedTimeMs:j,originHostCategory:Ko(ce)}),O(Date.now())}},X=setTimeout(()=>{if(window.removeEventListener("message",W),!g()||!Mi(n.latestReceipt.value,N)){O(void 0);return}n.unstable_overwriteLatestReceipt({status:"failed",id:N.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),r&&ns(r,a),o.counter({name:"three_d_secure_challenge_timeout",value:1}),o.log("use_receipt_polling_three_ds_challenge_timed_out","3DS challenge timed out",nn(N)),o.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...x,elapsedTimeMs:Date.now()-B}),O(void 0)},N.timeout?.millisecondsRemaining??cN);o.log("receipt_polling_detected","[Receipt Polling] Adding event listener for 3DS challenge event"),o.log("three_ds_postmessage_listener_started","[Receipt Polling] 3DS postMessage listener started",x),window.addEventListener("message",W)})}async function L(){const N={receiptId:n.latestReceipt.value?.id,sessionToken:c}
19,O=await Gp(l.staticQuery(zl,{cache:!1,variables:N}),Wa);if(O!==Hl)return O;if(M(1),!g())return;const D=l.query(zl,{cache:!1,variables:N});try{const B=await Gp(Promise.resolve(D.refetch()),Wa);if(B!==Hl)return B}finally{D[Symbol.dispose]()}M(2)}function M(N){o.log("receipt_polling_request_timed_out","[Receipt Polling] Receipt poll request timed out",{...nn(n.latestReceipt.value),attempt:N,timeout:Wa})}for(;S!=null;){await Af(S-Date.now());const N=Date.now()-C;if(++v,!E&&v>$a.ATTEMPTS&&N>$a.TIMEOUT&&(_=!1,o.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...nn(y),pollAttempts:v}),o.counter({name:"receipt_polling_timeout",value:1}),o.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...nn(n.latestReceipt.value),timePolling:N,pollAttempts:v})),!g())break;const O=await L(),D=O?.data;if(O?.error||D==null||D.receipt.__typename==="ReceiptNotFound"){if(!g())break;S=Date.now()+(e.next().value||60*1e3);continue}if(!g())break;const z=P?Date.now()-P:0,x=aN()?lN:Nv,W=P?z>=x:!1;let X;if(!k)try{X=await XE()}catch(he){if(!g())break;k=!0,o.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(he),receiptType:D.receipt.__typename})}if(k){if(D.receipt.__typename==="ProcessingReceipt"||D.receipt.__typename==="WaitingReceipt"){e.reset(),S=Date.now()+D.receipt.pollDelay;continue}if(D.receipt.__typename!=="ProcessedReceipt")break;if(e.reset(),D.receipt.redirectUrl){window.location.replace(D.receipt.redirectUrl);break}if(D.receipt.orderStatusPageUrl){window.location.replace(D.receipt.orderStatusPageUrl);break}S=zi+Date.now();continue}if(!g()||!X)break;e.reset();const Z=X(D.receipt,{pollingTimeoutReached:W});n.latestReceipt.value?.status==="polling_for_order"&&Z?.status==="processed"&&(W?o.counter({name:"PostPurchase_order_polling_timeout",value:1}):o.histogram({name:"PostPurchase_order_polling_duration",value:z}));const j=!(!d.value&&uN(Z)||Mi(Z,y)),Q=nn(y),H=nn(Z),J={receiptId:H.receiptId,status:H.status,prevReceiptId:Q.receiptId,prevReceiptStatus:Q.status};if(j?(o.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",J),n.unstable_overwriteLatestReceipt(Z)):Mi(Z,y)&&o.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",J),!g())break;if(p?.(Z),Z.status==="processing"||Z.status==="processing_remote_checkouts")S=Z.pollAt;else if(Z.status==="action_required")S=await A(Z);else if(Z.status==="polling_for_order")S=zi+Date.now(),P||(P=S);else{r&&ns(r,a);break}if(!g())break}},[n,r,l,c,o,e,i,d,a])}function pN(){const e=Cu();return R((t,n)=>{e.value||yu(t)&&Ay(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}function Wp(e){if(typeof e>"u")return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const mN=["failed","processed"];function Ov(){const{currentPage:e,currentDetour:t,history:n}=Se().value,{observability:r,checkout:{offsitePopupController:o},mobileCheckoutSdk:i,embed:a}=b(),l=U(),c=dN(),u=pN(),d=rN(),p=i.variant.isStandard()||!!a?.isCheckoutKit(),m=R(()=>{document.hidden||(document.removeEventListener("visibilitychange",m),r.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:Wp(l.current)},{exportImmediately:!0}),c(h=>{u(h,()=>{document.addEventListener("visibilitychange",m)})}))},[u,c,r]),f=R(()=>{c(h=>{mN.includes(h.status)&&o.isOpen.value&&o.close({}),u(h,g=>{if(r.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:h,currentPage:e,currentDetour:t,history:n}),r.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:Wp(g),providerUrl:g},{exportImmediately:!0}),o.isOpen.value){o.redirect(g);return}d.value?eN(g):window.location.assign(g),l.current=g,p&&document.addEventListener("visibilitychange",m)})})},[u,d,c,p,t,e,n,m,r,o]);return F(()=>()=>document.removeEventListener("visibilitychange",m),[]),f}function fN(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}function hN(){const{shop:{id:e}}=b();return V(()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);if(!isNaN(n))return n},[e])}function gN(e,t){const n=e.get("embed"),r=e.get(ph),o=e.get(uh),i=e.get(dh),a=e.get(mh),l=e.get(hh),c=e.get(fh),u=e.get("shopify_essential"),d=e.get(Cl),p=e.get("shop_client_uuid")??t;return{embedParam:n,ecAuthParam:r,ecVersionParam:o,ecColorSchemeParam:i,ecDelegateParam:a,checkoutKitBrandingParam:l,checkoutKitVersionParam:c,shopifyEsse
19ntial:u,skipInterstitial:d,shopClientUuid:p}}function Fv({mode:e="set",include:t={}}={}){const{shopClientUuid:n=!1,shopId:r=!1}=t,o=b().embed?.shopClientUuid,i=hN();return R((a,l)=>{r&&i!==void 0&&(e==="set"||!a.has("shop_id"))&&a.set("shop_id",String(i));const{embedParam:c,ecAuthParam:u,ecVersionParam:d,ecColorSchemeParam:p,ecDelegateParam:m,checkoutKitBrandingParam:f,checkoutKitVersionParam:h,shopifyEssential:g,skipInterstitial:y,shopClientUuid:_}=gN(l,o),P=a.has("embed")||a.has("ec_version");(e==="set"||!P)&&(c&&a.set("embed",c),d&&(a.set(uh,d),p&&a.set(dh,p),u&&a.set(ph,u),m&&a.set(mh,m),h&&a.set(fh,h),f&&a.set(hh,f)));const E=e==="set"||!a.has("shopify_essential");g&&E&&a.set("shopify_essential",g);const C=e==="set"||!a.has(Cl);if(y&&C&&a.set(Cl,y),n){const S=e==="set"||!a.has("shop_client_uuid");_&&S&&a.set("shop_client_uuid",_)}},[o,n,r,e,i])}function yN({redirectProgressEnabled:e=!1}={}){const t=U(!1),{checkout:n,client:r,observability:o}=b(),i=Fv({mode:"copy-if-missing"});return R(a=>{if(t.current){o.counter({name:"thank_you_page_already_redirected",value:1});return}t.current=!0;const l=new URL(a,window.location.href),c=new URLSearchParams(r.initialRequest.url.search);return i(l.searchParams,c),e&&n.checkoutExit.startRedirectProgress(),window.location.replace(l.toString())},[i,n.checkoutExit,r.initialRequest.url.search,o,e])}function vN({plan:e,currentDetour:t,dispatch:n,onProgressionChange:r,negotiate:o,negotiated:i,proposedPostPurchaseInquiryStatus:a}){const l=b(),{checkout:c,embed:u,persistence:d,source:p,observability:m,client:f,mobileCheckoutSdk:h,router:g}=l,{configuration:y}=c,_=c.latestReceipt.value,{hasExternalReceiptHandling:P}=y,v=c.identity.current.value==="shopPay",E=Lv(),C=Er(),S=QE(),I=Ov(),k=_?.id,T=Xe(),A=l.checkout.configuration.layout.isOnePage,L=Us()&&!Vn(g.currentUrl.value.search),M=lo().current.token,N=Se(),O=Un(),D=yN({redirectProgressEnabled:v&&!y.isUniversalCheckoutFinalizer&&L&&!t&&!O});F(()=>{P||I()},[k]);const B=R((x,W)=>{setTimeout(()=>{W()},ZM(x))},[]);return R(x=>{if(!x||C)return;m.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",nn(x));const W=a.value;if(x.status==="processed"&&x.waitingForPostPurchaseDone&&W!=="done")return;const X=sv(T),Z=(Q,H)=>Q&&Q>0?B(Q,H):H();function ce(Q,H){const J=()=>{g.navigate(Q,{replace:!0,state:{...g.currentUrl.value.state,redirectingToThankYou:!0}})};L&&!t?(H?.(),dr(J,["checkout-exit"],{replace:!0,interrupt:!0})):dr(()=>{H?.(),J()}),m.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:v,checkoutDesign:A.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),r(!1)}function j(Q){const H=()=>D(Q);if(!L||t||O){H();return}dr(()=>{c.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),H()}switch(x.status){case"abandoned":r(!1),d&&ns(d,p),S();break;case"failed":{r(!1),d&&ns(d,p);const Q=new URL(window.location.href);if(Q.searchParams.get("completed")&&Q.searchParams.get("reload_receipt")){m.log("use_handle_receipt_progression_update","[Journey] Reloading processing page after failed receipt",{receiptId:x.id}),m.counter({name:"refresh_processing_step",value:1}),Q.searchParams.delete("reload_receipt"),window.location.replace(Q.toString());break}if(x.failure.type==="inventory"){if(e.detours.find(ne=>ne.type==="stockProblems")==null)throw new Rt("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const he=T.lastNegotiation.value;o({force:!0,onComplete(ne){switch(ne.status){case"success":{const ae=T.lastJourneyProgression.value,ue=T.lastNegotiation.value;if(c.latestReceipt.value?.id!==x.id||ue!==he&&ue.type==="error"||(ae.type==="failed"||ae.type==="error")&&ae.negotiationStage==="completion")break;m.leaveErrorBreadcrumb("[Journey] Performed successful negotiation with a failed receipt"),m.log("use_handle_receipt_progression_update","[Journey] Performed successful negotiation with a failed receipt");const Ae=E("payment-methods");rn(()=>{T.context.inventoryRecoverySignal.value={receiptId:x.id},WM(T.parts)}),n({type:"error",page:Ae}),g.navigate({pathname:Ae.route,search:g.currentUrl.value.search});break}
19case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:sn(ne)}}});break}else x.failure.type==="payment"&&(ZE.has(x.failure.code)?o({include:["captcha"],skipStateUpdates:!0}):(x.failure.code==="CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"&&o({force:!0,fieldsToResolve:["shopPromotion"]}),S()));if(t?.type==="offsitePaymentFailed"){g.navigate(t.route,{replace:!0});break}const H=$M({departurePageId:g.currentUrl.value.searchParams.get(Vr),greenPath:e.greenPath,history:N.value.history,observability:m,negotiated:i,receipt:x});n({type:"error",page:H}),g.navigate(H.route,{replace:!0});break}case"processed":{m.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:x.redirectUrl,receiptId:x.id});const Q=e.detours.find(ne=>ne.type==="postPurchase"),H=!!Q&&!!x.postPurchasePageRequested&&x.postPurchaseVaultingStatus==="ready"&&W==="success",J=!u?.isFlagshipPartner&&H;if(u?.isFlagshipPartner&&H&&t?.type!=="thankYou"&&m.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:x.id}),J&&t?.type!=="thankYou"){if(m.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:x.id,postPurchasePageUrl:x.postPurchasePageUrl,postPurchasePageRequested:x.postPurchasePageRequested,postPurchaseVaultingStatus:x.postPurchaseVaultingStatus}),shopAppDomain:v}),v&&x.postPurchasePageUrl)window.location.replace(x.postPurchasePageUrl);else{const ne=Q;g.currentUrl.value.searchParams.delete("post_purchase");const ae=`${ne.route}${g.currentUrl.value.search}`;X(x),g.navigate(ae,{replace:!0})}break}if(u?.client?.complete(),!y.isUniversalCheckoutFinalizer&&qt(u?.embedder))break;if(!y.isUniversalCheckoutFinalizer&&x.redirectUrl){const ne=x.redirectUrl;x.skipToThankYouPage?(m.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:x.id,redirectUrl:ne,postPurchasePageRequested:x.postPurchasePageRequested,postPurchasePageUrl:x.postPurchasePageUrl})}),n({type:"skipRemainingPages"})):n({type:"complete"}),m.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:v,checkoutDesign:A.value?"ONE_STEP":"THREE_STEP",typType:"classic",visibility_state:document.visibilityState}}),m.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with redirectUrl",{redirectUrl:ne});const ae=new URL(ne);return M&&ae.searchParams.set(gh,M),Z(x?.completedRemoteCheckouts?.length,()=>j(ae.toString()))}const he=e.detours.find(ne=>ne.type==="thankYou");if(he?.route){const ne="prevent_order_redirect",ae=new URLSearchParams(g.currentUrl.value.search);let ue=ae.has(ne)&&ae.get(ne)!=="false"?`${he.route}?${ne}=true`:he.route;h.variant.recovery&&(ue=fN(ue,x.id));const Ae=()=>{if(m.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:he.route}),x.skipToThankYouPage){m.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:x.id,redirectUrl:x.redirectUrl,postPurchasePageRequested:x.postPurchasePageRequested,postPurchasePageUrl:x.postPurchasePageUrl})}),n({type:"skipRemainingPages"});const Ee=f.cookies.get(Wi);Ee&&p.sourceId===Ee.split("%3F")[0]&&f.cookies.delete(Wi)}else f.cookies.delete(Wi),n({type:"complete"});X(x)},me=Ee=>{m.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:ue}),Z(x?.completedRemoteCheckouts?.length,()=>ce(ue,Ee))},ye=y.deferredProfileChangeId;if(ye||y.profileKey.peek()?.requireBusinessCriticalOnly){y.update({deferredProfileChangeId:void 0});const Ee=ye??y.profileId.peek();xc(Ae,{trigger:"completion",profileRequest:Ee?{id:Ee,requireBusinessCriticalOnly:!1}:void 0,graphql:l.graphql.coreGraphql,extensibility:l.checkout.extensibility,configuration:y,observability:m,userEvents:l.userEvents,telemetryContext:{source:T.source,shop:T.shop,sessionToken:T.sessionToken,current:T.current}}).then(me).catch(()=>{})}else Ae(),me()}else throw new Rt("On thank-you, but no matching detour!",{groupingHash:"JourneyError::OnThankYouNoMatchingDetour"});break}case"polling_for_order":case"action_required":case"processing":{if(t?.type==="processing")break;if(x.status==="polling_for_order"&&t?.type==="thankYou"){m.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify(x),routerCurrentUrl:g.currentUrl.value.toString()});break}e.detours.find(J=>J.type==="processing")?.route&&r(!0);break}case"processing_remote_checkouts":{if(t?.type==="processing")break;const H=e.detours.find(J=>J.type==="processing");if(!H?.route)break;dr(()=>{const J=g.currentUrl.value.search;g.navigate(J?{pathname:H.route,search:J}:H.route,{replace:!0})});break}default:sn(x)}},[f,u?.client,u?.embedder,u?.isFlagshipPartner,h,S,t,c,n,C,A,L,v,N,E,l,y,o,i,T,r,d,e.detours,e.greenPath,O,a,M,D,g,p,m,B])}function Bv(e,t,n,r,o){const i=e.some(l=>l.code==="BUYER_IDENTITY_PERSONAL_ORDER_NOT_ALLOWED"),a=e.some(l=>l.code==="BUYER_IDENTITY_COMPANY_LOCATION_REQUIRED");i&&t&&(o.log("redirect_to_storefront","[B2B] Buyer identity violation: personal order not allowed, redirecting to storefront",{redirectSuccess:!!t}),window.location.replace(t)),a&&window.location.replace(n??r)}function cY(){const e=q().buyerIdentity,{client:t,shop:n,embed:r,mobileCheckoutSdk:o}=b();return w(()=>!!n.loginLinkVisible&&n.hasStorefront&&!!t.unstable_getSerialization("loginUrl")&&n.customerAccountRequirement==="OPTIONAL"&&!o.enabled&&!r&&!e.value?.customerProfile)}function uY(){const e=q().buyerIdentity,{shop:t,checkout:{identity:n,configuration:r},mobileCheckoutSdk:o,source:i}=b(),a=n.current.value==="shopPay";return w(()=>{const l=t.customerAccountRequirement==="OPTIONAL",c=t.customerAccountRequirement==="REQUIRED",u=t.customerAccountRequirement==="DISABLED",d=()=>!!e.value?.customerProfile;return i.type!=="draftOrder"&&t.hasStorefront&&!o.variant.isPartner()&&r.allowRedirectToStorefront&&!a&&(l||c||u&&d())})}function Vv(){const e=q().buyerIdentity;return R(t=>{const n=e.value?.customerProfile,r=e.value?.purchasingCompany;if(n){if(t==="billing")return n.__typename==="CustomerProfile"?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0;if(t==="shipping")return n.__typename==="CustomerProfile"?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0}},[e])}function _N(){const e=q().buyerIdentity;return R(()=>{const t=e.value?.customerProfile;if(t)return t.email},[e])}function Uv(){const{embed:e,mobileCheckoutSdk:t,shop:n,source:r}=b(),o=Se(),i=q().buyerIdentity,a=Vs(),l=t.variant.isStandard()||e?.isCheckoutKit(),c=!!n.remoteShopsConfigMap?.size;return w(()=>{const u=i.value,d=!!n.loginLinkVisible&&!!u?.customerProfile&&(!!u?.purchasingCompany||!l&&r.type!=="draftOrder"&&n.hasStorefront);return a&&o.value.currentDetour?.type==="thankYou"&&!c&&d})}function zv(e=!1){const{i18n:t,router:n,shop:r}=b(),{buyerIdentity:o}=q();return w(()=>{const i=o.value?.purchasingCompany;if(!r.customerAccountLocationsUrl)return;const a=new URL(r.customerAccountLocationsUrl);return a.searchParams.set("return_to",n.currentUrl.value.pathname),i&&!e&&a.searchParams.set("current_location",i.location.id),a.searchParams.set("locale",t.locale),Str
19ing(a)})}function Hv(){const e=U(!0);return Mt(()=>()=>{e.current=!1},[]),e}const Jo="DISCOUNTS_DISCOUNT_CODE_NOT_HONOURED",qv=new Set(["DISCOUNTS_ALLOCATIONS_MISMATCH","DISCOUNTS_ADDITIONAL_REQUESTED_DISCOUNT_CODE_DISCARDED"]),Gv=new Set(["DISCOUNTS_NO_ENTITLED_LINE_ITEMS","DISCOUNTS_UNSUPPORTED_EXPECTATION","DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_INCOMPATIBLE_PURCHASE_TYPE","DISCOUNTS_USAGE_LIMIT_REACHED","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_SHIPPING_LINES","DISCOUNTS_CUSTOMER_NOT_ELIGIBLE","DISCOUNTS_DISCOUNT_ALREADY_APPLIED","DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED","DISCOUNTS_MAXIMUM_DISCOUNT_CODE_LIMIT_REACHED","DISCOUNTS_DISCOUNT_CODE_APPLICATION_FAILED","DISCOUNTS_CURRENTLY_INACTIVE",Jo,...qv]),$p=["discountLines","totalSavings","merchandiseLines","deliveryNext"],js=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),No=new Set(["PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_NOT_FOUND","DISCOUNTS_NOT_FOUND","REDUCTION_INVALID_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"]),ku=new Set([...Gv,...No]),dY=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),ql=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),Wv=new Set([...ql,...ku]);function $v(){const{paymentLines:e}=ie(),{voidedGiftCardsSignal:t}=Nt(),n=R((r,o)=>{if(o.length<r.length)return[];const i=[];return o.forEach(a=>{const l=a.method;l.type==="giftCard"&&"code"in l&&!r.some(c=>c.method.type==="giftCard"&&"code"in c.method&&l.code===c.method.code)&&i.push(l.code)}),i},[]);return R(({violations:r,remotePaymentLines:o})=>{if(r.some(i=>js.has(i.code))){const i=n(o,e.value);t.value=i,e.value=o}},[n,e,t])}const bN=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function Yv(e,t){const n=qo(e.features,t),r=new Set(["merchandiseLines"]);for(const o of n){const i=bN.get(o)??[];for(const a of i)r.add(a)}return r}function*PN(e=[],t,n){e.includes("deliveryNext")||(yield"delivery-method"),e.includes("paymentLines")||(yield"payment-terms-changed",yield"payment-session"),e.includes("billingAddress")||(yield"payment-address"),e.includes("captcha")||(yield"captcha"),n?.includes("localization-extension")||(yield"localization-extension");const{customFields:r,placementReferences:o}=t,i=eC(n??[],o);for(const[a,l]of r.entries())i(tC(l))||(yield`${nC}[${a}]`)}function SN({violation:e,currentPageId:t,isOnePageCheckout:n}){return n||t==="payment"?!0:!(rC.has(e.code)||oC.has(e.code)||mc.has(e.code))}function jv({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(r=>SN({violation:r,currentPageId:t,isOnePageCheckout:n}))}function Kv(){const{observability:e}=b();return R(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}class EN extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function CN(e,t){const{client:n,router:r,checkout:o,shop:i,observability:a,url:l}=b(),c=Xe(),{plan:u,currentPage:d,currentDetour:p}=Se().value,m=Ft(),f=n.unstable_legacyNavigationPerformance,h=zv(!0),g=$v(),y=Hv(),_=o.configuration.layout.isOnePage,P=Pu(),{inMemoryApplePayParts:{asPaymentMethod:v}}=We(),E=Kv();return R(async({onComplete:C,include:S,prefetch:I=!1,negotiationStage:k,...T})=>{const A=d,L=k??"negotiation";L==="progression"&&!I&&t(!0),a.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:L}),L==="progression"&&await m.runBeforeNegotiationListeners(L,{prefetch:I});const M=(()=>{if(S)return S;if(A==null)return;const B=new Set,z=u.greenPath.findIndex(W=>yn(W,A)),x=c.current.value;for(const W of u.greenPath.slice(0,z+1)){const X=Yv(W,x);for(const Z of X)B.add(Z)}return[...B]})(),N=A?qo(A.features,c.current.value):void 0,{silenceViolations:O=[]}=T,D=PN(M,{customFields:c.current.value.customFields??[],placementReferences:P},N);try{const B=await m.negotiate({...T,silenceViolations:[...new Set([...O,...D])],skipStateUpdates:I,negotiationStage:L});if(a.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:B.status,negotiationStage:L,violations:"violations"in B?fn(B.violations):void 0}),y.current){if(I)return;try{const z=B.status==="success"||B.status==="error";if(z&&gc(B.violations)){const x=u.detours.find(W=>W.type==="stockProblems");if(x==null)throw new Rt("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMat
19chingDetourNegotiate"});E(),r.navigate(x.route);return}if(z&&Av(B.violations))return a.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));switch(z&&Bv(B.violations,i.storefrontUrl,h.value,r.currentUrl.value,a),z&&g({violations:B.violations,remotePaymentLines:B.negotiated?.paymentLines?.lines??[]}),B.status){case"success":{const x={type:"success",violations:B.violations,errors:B.errors,negotiationStage:L};m.lastJourneyProgression.value=x,m.hasNegotiatedOnce.value=!0,await m.runListeners(x);break}case"alreadyCompleted":{o.unstable_overwriteLatestReceipt(B.receipt);break}case"error":{f?.cancelNavigation();const x={type:"error",violations:B.violations,errors:B.errors,negotiationStage:L};m.lastNegotiation.value=x,m.hasNegotiatedOnce.value=!0,(L==="progression"||T.runListenersOnError)&&(m.lastJourneyProgression.value=x,await m.runListeners(x)),A&&jv({violations:B.violations,currentPageId:A.id,isOnePageCheckout:_.value})&&e({type:"error",page:A});break}case"throttled":{const x=u.detours.find(W=>W.type==="throttle");if(x?.route)r.navigate(x.route);else throw new Rt("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});break}case"invalid":{m.runListeners({type:"invalid",reasons:B.reasons}),A&&e({type:"error",page:A});break}case"denied":A&&e({type:"error",page:A});break;case"fetch_failed":A&&e({type:"error",page:A});break;case"stale":case"tooManyRequests":a.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:B.status,currentPage:A,currentDetour:p,negotiationStage:L});break;default:sn(B)}L==="progression"&&t(!1)}finally{C?.(B);const z=v.value&&o.wallets.activeSession.value;if(B.status!=="success"&&"violations"in B&&A&&!z){const x=wv({currentPage:A,greenPath:u.greenPath,negotiated:B.negotiated,violations:B.violations});x&&r.navigate(x.route)}}}}catch(B){if(B instanceof iv)return;const x=B instanceof Error?B:new EN;if(x)throw x}},[v,o,d,h,e,_,y,c,t,f,P,u.detours,u.greenPath,m,g,r,i?.storefrontUrl,E,l,a,p])}const Jv='GraphQL execution failed with errors: [ "Internal error. Looks like something went wrong on our end.',kN=["Content-Length header of network response exceeds response Body.","Failed to fetch","The operation was aborted.","The network connection was lost.","GraphQL fetch failed with status:",Jv,Tf],IN=["A server with the specified hostname could not be found.","An SSL error has occurred and a secure connection to the server cannot be made.","cannot parse response","Failed to fetch","Load failed","cancelled","NetworkError when attempting to fetch resource.","The network connection was lost","The operation couldn't be completed. Protocol error","The request timed out."];function Xv(e){return e.replace(/\s+/g," ")}const AN=e=>{if(e==="")return!0;const t=Xv(e);return kN.some(n=>t.startsWith(n))},TN=e=>{if(e==="")return"unknown";const t=Xv(e);return t.startsWith(Tf)?IN.some(n=>t.endsWith(n))?e:"unknown":t.startsWith(Jv)?"Internal server error":e},wN=()=>{const{source:{checkoutSessionIdentifier:e}}=b(),{email:t}=ie();return w(()=>`guest-${e}-${t.value.replace(/[^a-zA-Z0-9]/g,"")}`)},LN="true";function xN(){const e=wN(),t=R(()=>{try{return!!sessionStorage.getItem(e.value)}catch{return!1}},[e]),n=R(()=>{try{sessionStorage.setItem(e.value,LN)}catch{}},[e]);return{isDismissedGuestModal:t,setDismissedGuestModal:n}}function RN(){const e=Ft(),t=Hv(),{setGuestDismissedModalKey:n}=MN();return R(async({onComplete:r,submitting:o,...i})=>{n(),o.value=!0;const a=await e.complete({...i});t.current&&(o.value=!1,await r?.(a))},[t,e,n])}function MN(){const{setDismissedGuestModal:e}=xN(),{shopPay:t}=b();return{setGuestDismissedModalKey:R(()=>{t.userIdentified.value&&e()},[e,t.userIdentified])}}function NN(e){const{taxExemptions:t}=ie(),n=Je(e);return w(()=>t.value.find(r=>r.handle===n.value))}function DN(e){const{taxExemptions:t}=ie();return R(n=>{const r=t.value.filter(o=>o.handle!==e);t.value=[...r,{handle:e,details:n}]},[e,t])}const Yp="EU_REVERSE_CHARGE_EXEMPTION_RULE";function Ks(){const e=q().taxExemptions,t=NN(Yp).value,n=DN(Yp),r=qe("taxExemptions").value,o=qe("shippingAddress").value;if(e.value?.status==="unavailable"||!e.value?.available||e.value?.available.length===0)return null;const{available:i}=e.value,a=i.find(f=>iC(f.handle));if(!a?.details)return null;const l=t?.details?.taxId??"",{registrationFormats:c,warnings:u}=a.details,d=f=>{n({taxId:f.toUpperCase()})},p=f=>sC(f,c),m=r?{type:"pending"}:l?p(l)?l===a.details.taxId&&a.details.status?{type:"resolved",validationStatus:a.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:a.applied,taxId:{warnings:u,value:l,loading:r||o,set:d,status:m,reset:()=>n({taxId:""}),validated:{status:a.details.status,taxId:a.details.taxId},format:{valid:l?p(l):!1,validate:p}}}}function pY(){const{userEvents:e}=b(),t=Qv();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function ON(){const{userEvents:e}=b(),t=Qv(),n=Ks();tg(async(r,o)=>{if(r!=="completion"||o?.retry||!n)return;const{value:i}=n.taxId,a=t.build({eventType:"PAY_NOW_CLICKED",vatId:i});e.monorailEvent(a)})}function Qv(){const{client:e,shop:t,source:n}=b(),r=e.unstable_getSerialization("requestId"),o=q().buyerIdentity.value?.customerProfile,{shippingAddress:i,billingAddress:a,email:l}=ie(),c=Ks();return{build:({eventType:d,vatId:p})=>({schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:d,shopId:Number(Ve(t.i
19d)),customerId:zN(o),checkoutToken:n.checkoutSessionIdentifier,requestId:r,vatId:p,vatIdValidationStatus:FN({taxId:c?.taxId,eventType:d}),applied:c?.applied,email:l.value,userAgent:BN(navigator),...VN(i.value),...UN(a.value)}})}}function FN({taxId:e,eventType:t}){if(t!=="NEGOTIATE"&&e){if(e.status.type==="invalid_format")return"INVALID_FORMAT";if(e.status.type==="pending")return"PENDING";if(e.status.validationStatus)return String(e.status.validationStatus)}}function BN(e){return typeof e>"u"?void 0:e.userAgent}function VN(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 UN(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 zN(e){if(!e)return;const t=Number(Ve(e.id));return isNaN(t)?void 0:t}const ja=1;function HN(e,t){const{checkout:n,shop:r,observability:o,url:i,router:a}=b(),l=RN(),{plan:c}=Se().value,u=Ft(),d=Xe(),p=KM(),m=zv(!0),f=$v();return ON(),R(async(h,g,y,_)=>{const{skipToCompletion:P,...v}=_??{};g?.type!=="processing"&&P&&(o.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 E=ja;const C=async()=>{let S=!1;await d.waitForPendingNegotiations({setProgressing:t});const I=E<ja;await u.runBeforeNegotiationListeners("completion",I?{retry:!0}:void 0),await l({...v,submitting:u.submitting,setProgressing:t,onValidationSuccess:()=>{v.onValidationSuccess?.(),t(!0)},async onComplete(k){if(k.status==="stale"&&k.phase==="interceptors"&&E>0){E-=1,S=!0,t(!0),o.log("submit_for_completion_stale_retried","Stale completion retried automatically");return}switch(k.status==="stale"&&E<ja&&o.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await y?.(k),k.status){case"success":{n.unstable_overwriteLatestReceipt(k.receipt);const T={type:"complete"};u.lastJourneyProgression.value=T,await u.runListeners(T);break}case"alreadyCompleted":{n.unstable_overwriteLatestReceipt(k.receipt);break}case"throttled":{const T=c.detours.find(A=>A.type==="throttle");if(T?.route)a.navigate(T.route);else throw new Rt("Throttled, but no detour",{groupingHash:"JourneyError::ThrottledNoDetour"});break}case"rejected":{if(h||o.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(k.status)}),e({type:"error",page:h}),Av(k.violations))return window.location.replace(i.login(window.location.href));if(Bv(k.violations,r.storefrontUrl,m.value,a.currentUrl.value,o),gc(k.violations)){a.currentUrl.peek().searchParams.delete(Vr);const L=c.detours.find(M=>M.type==="stockProblems");if(L==null)throw new Rt("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});a.navigate(L.route);break}f({violations:k.violations,remotePaymentLines:k.negotiated?.paymentLines?.lines??[]});const T={type:"error",violations:k.violations,errors:k.errors,negotiationStage:"completion"};if(u.lastJourneyProgression.value=T,await u.runListeners(T),P)break;const A=wv({violations:k.violations,greenPath:c.greenPath,negotiated:k.negotiated,currentPage:h});A&&(a.currentUrl.peek().searchParams.delete(Vr),a.navigate(A.route));break}case"invalid":{t(!1),await u.runListeners({type:"invalid",reasons:k.reasons});break}case"fetch_failed":case"failed":{const T={type:"failed",reason:k.reason,negotiationStage:"completion",fetchFailed:k.status==="fetch_failed"};if(k.status==="fetch_failed")if(AN(k.reason)||!k.isActionable)o.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:k.reason}),o.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:TN(k.reason)}});else{const A=k.reason;o.error(new kM(A,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${A}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.lastJourneyProgression.value=T,await u.runListeners(T),e({type:"error",page:h}),a.currentUrl.peek().searchParams.delete(Vr),p("payment-methods",{replace:g!==void 0});break}default:t(!1),h||o.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(k.status)}),e({type:"error",page:h})}(k.status!=="success"||k.receipt.status!=="processing")&&t(!1)}}),S&&await C()};await C()},[t,u,d,l,r,e,n,c.detours,c.greenPath,a,f,i,m,p,o])}
19function qN(e,t,n){const{router:r,observability:o,checkout:i}=b(),{plan:a}=Se().value,l=Xe(),c=i.configuration.layout.isOnePage,u=R((d,p)=>{const m=a.greenPath.slice(p+1).find(f=>f.skipOverPage==null||!f.skipOverPage(d.negotiated));if(m)t({type:"progress",page:m}),r.navigate(m.route);else throw new Rt("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"})},[a.greenPath,t,r]);return R(async(d,p)=>{n(!0);const m=a.greenPath.findIndex(g=>yn(g,d)),f=l.current.value,h=Yv(d,f);try{await e({negotiationStage:"progression",fieldsToResolve:Array.from(h),onComplete(g){switch(o.leaveErrorBreadcrumb("Negotiation completed",{status:g.status,violations:"violations"in g?g.violations.map(y=>y.code):[]}),p?.(g),g.status){case"success":{u(g,m);break}case"error":{jv({violations:g.violations,currentPageId:a.greenPath[m].id,isOnePageCheckout:c.value})||u(g,m);break}case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:sn(g)}}})}finally{n(!1)}},[n,a.greenPath,l,e,u,c,o])}function GN({negotiate:e}){return R(()=>{e({prefetch:!0,negotiationStage:"progression"})},[e])}function WN(e){const t=ry();return 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}function $N(){const e=Ov(),t=Hs(),n=Sr(),{paymentLines:r}=ie(),o=Xe(),{i18n:i,observability:a,userEvents:l,checkout:{offsitePopupController:c},shop:{id:u}}=b();return V(()=>({handleOffsitePopupOpen:()=>{const d=r.value.at(0);let p=!1;if(d?.method.type==="customOnsite")p=Rv(d);else if(d&&"walletContent"in d.method&&d.method.name==="SHOP_PAY"){const m=d.method.walletContent?.paymentMethodIdentifier;p=!!(o.current?.fields?.paymentMethods?.value||[]).find(g=>Mv(g)&&g.paymentMethodIdentifier===m)}if(t.value){if(p){a.counter({name:"offsite_payment_popup_flow_initiated",value:1,attributes:{payment_method_name:"Crypto: USDC",is_shop_pay_wrapped:!!(d&&"walletContent"in d.method&&d.method.name==="SHOP_PAY"),is_mobile:qf()}});const f=Hr(u);if(f){const h=parseInt(f,10);if(!isNaN(h)){const g=WN(h);g&&l&&l.monorailEvent(g)}}}const m={width:600,height:455};c.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:m,isCryptoPayment:p,title:i.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&c.isOpen.value&&c.close({})}}),[t.value,r,a,l,o,c,n,i,e,u])}function YN({journey:e,exitDetour:t,pageComplete:n,pageNegotiate:r}){const{client:o,observability:i,router:a}=b(),l=we(0),c=w(()=>l.value>0),u=o.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:d,handleClosingPopup:p}=$N(),m=U(t);m.current=t;const f=U(n);f.current=n;const h=U(r);h.current=r;const g=U(d);g.current=d;const y=U(p);y.current=p;const _=U(a);return _.current=a,{progress:R(async(v,E,C)=>{const S=async x=>{try{await E?.(x)}finally{x.status!=="success"&&y.current()}},I={...C,onProgressBlocked:()=>{try{C?.onProgressBlocked?.()}finally{y.current()}},onValidationSuccess:()=>{try{C?.onValidationSuccess?.()}finally{g.current()}}},{plan:k,currentPage:T,currentDetour:A}=e.value,L=m.current;if(i.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:v,skipToCompletion:I?.skipToCompletion,greenPath:k.greenPath.map(x=>x.route),detours:k.detours.map(x=>x.route),currentPageRoute:T?.route,currentDetourRoute:A?.route}),!I?.skipToCompletion&&A&&T){const x=k.detours.find(X=>X.type==="thankYou"),W=A.type==="processing"?x:T;return u?.start({target:W?.route}),i.leaveErrorBreadcrumb(`[Journey] Exiting "${A.route}" detour, moving to "${W?.route}"`,{currentDetourRoute:A.route,exitDetourTargetRoute:W?.route,targetPageRoute:T.route}),L(A,T,S)}if(T==null){i.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),I?.onProgressBlocked?.();return}const M=yn(T,k.greenPath[k.greenPath.length-1])||I?.skipToCompletion,N=k.greenPath.findIndex(({id:x})=>x===T.id),O=k.detours.find(x=>x.type==="processing"),D=M?O:k.greenPath[N+1];u?.start({target:D?.route});const B=_.current.currentUrl.peek(),z=k.greenPath.find(x=>x.route===B.normalizedPath)??T;if(M?B.searchParams.set(Vr,z.id):B.searchParams.delete(Vr),i.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:I?.skipToCompletion,greenPath:k.greenPath.map(x=>x.route),isLastPage:M,currentPageRoute:T.route,currentDetourRoute:A?.route,nextPageRoute:D?.route}),!M)return h.current(T,S);l.value+=1;try{await f.current(T,A,S,I)}finally{l.value-=1}},[m,e,f,h,l,u,i,y,g]),completing:c}}function jN({children:e,dispatch:t,progressing:n,onProgressionChange:r}){const o=Se(),{plan:i,currentPage:a,currentDetour:l}=o.value,{observability:c,checkout:u,router:d}=b(),p=lo(),{postPurchaseInquiryStatus:m}=ie(),f=CN(t,r),h=Xe(),g=qN(f,t,r),y=HN(t,r),_=GM(f,t,r),P=vN({plan:i,currentDetour:l,dispatch:t,onProgressionChange:r,negotiate:f,negotiated:h,proposedPostPurchaseInquiryStatus:m});F(()=>{const A=L=>{if(L.status!=="queued")return;const M=i.detours.find(N=>N.type==="throttle");if(M?.route)d.navigate(M.route);else if(a)throw new Rt(`Throttled, but no matching detour from ${a&&JSON.stringify(a,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return A(p.current),p.subscribe(A)},[p,d,a,i.detours,t]),ze(()=>{const A=u.latestReceipt.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",nn(A)),ht(()=>P(A))});const v=U(m.peek());ze(()=>{const A=l?.type==="thankYou"||l?.type==="postPurchase",L=m.value,M=v.current;if(A&&L!==M){v.current=L;const O=u.latestReceipt.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...nn(O),previousStatus:M}),ht(()=>P(O))}});const{progress:E,completing:C}=YN({journey:o,exitDetour:_,pageComplete:y,pageNegotiate:g}),S=qM({plan:i}),I=GN({negotiate:f}),k=Kv();F(()=>h.pendingFieldsNegotiation.subscribe(A=>{if(A?.status!=="success"&&A?.status!=="error"||o.peek().currentDetour)return;const L=h.current.fields.allViolations.peek()??[];Iv(L)&&(k(),S("stockProblems",{routerOptions:{replace:!0}}))}),[h,o,S,k]);const T=V(()=>({detour:S,progress:E,negotiate:f,progressing:n,completing:C,prefetch:I}),[S,E,n,C,f,I]);return s(Mc.Provider,{value:T,children:e})}function KN({plan:e,children:t}){const n=we(!1),r=R(h=>{n.value=h},[n]),{observability:o,router:i}=b(),a=i.currentUrl.value,[l,c]=UM(e);Os(l,({previousState:h,action:g,nextState:y})=>{o.leaveErrorBreadcrumb("Journey state transition",{previousState:{history:h.history,redirectTo:h.redirectTo?.route},action:g,nextState:{history:y.history,redirectTo:y.redirectTo?.route},routerCurrentUrl:a.normalizedPath})});const{redirectTo:u}=l.value,d=we(),{pageBeforeDetour:p,completed:m}=CM({router:i,plan:e,journeyStateSignal:l}),f=V(()=>({journeyState:l,currentFocus:d,completed:m,pageBeforeDetour:p}),[l,d,m,p]);if(u!=null){const h=a.search?{pathname:u.route,search:a.search}:u.route;return i.redirect(h),null}return s(eg.Provider,{value:f,children:[s(PM,{}),s(jN,{dispatch:c,progressing:n,onProgressionChange:r,children:t})]})}function JN({disabled:e,key:t,variants:n}){const{client:r,router:o}=b(),i=o.currentUrl.value;if(e)return;const l=new URLSearchParams(i.search).get(t);if(l&&n.includes(l))return l;const c=r.cookies.get(t);if(c&&n.includes(c))return c}function XN(){const e=JN({key:"operatziya_y",variants:[xr.Control,xr.Treatment]}),{client:t}=b(),r=t.unstable_getSerialization("experiments")?.find(o=>o.clientHandle===iA)?.variant===xr.Treatment;return e||(r?xr.Treatment:xr.Control)}function Zv(){const{shop:e}=b(),t=XN()===xr.Treatment;return!!e.confirmationPageEnabled||t}const jp=["delivery-method"],QN=new Set(aC),ZN=new Set(lC),eD=new Set(cC);function tD({i18n:e,sourceType:t,addressSettings:n,billingAddressSettings:r,hasBlockingUiExtensionForFeatures:o,getSellableDeliveryMethods:i,initialNegotiationData:a,isDraftOrderCheckout:l,isPrePopulatedSourceType:c,isShippingRequired:u,proposedPaymentLines:d,reviewEnabled:p,shippingAddress:m,shippingCountryDetails:f,mustSelectProvidedShippingRate:h,shop:g,checkout:y,paymentMethods:_,observability:P,recordFastForward:v}){const E=(S,I)=>{switch(I){case"contact-information":return cs(S.contactInfo,S.allViolations);case"shipping-address":return iD({shippingAddress:m,addressSettings:n,countryDetails:f,violations:S.allViolations,state:S,isDraftOrder:l});case"billing-address":return sD(r,S.billingAddress,S.allViolations);case"delivery-method":return aD(S.deliveryNext,S.allViolations);case"payment-methods":case"localization-extension":return!1;default:return sn(I)}},C=(S,I)=>o(I,{excludedExtensionTargets:rD(S.deliveryNext)})?{gatedBy:"extension"}:dC(S.paymentLines)?{gatedBy:"paypalExpress",satisfied:oD(S.paymentLines,S.deliveryNext)&&cs(S.contactInfo,S.allViolations)}:pC(S.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:I.filter(k=>!E(S,k))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:S})=>{function*I(){if(yield"contact-information",uC(S)||qr(S)){yield"delivery-method";return}u?yield"shipping-address":yield"billing-address"}return Array.from(I())},fastForwardThroughPage:(S,I)=>{const k=C(S,I);if(k.gatedBy==="extension")return!1;if(k.gatedBy==="paypalExpress")return k.satisfied?v("information","paypal_express_and_contact_satisfied"):!1;if(k.gatedBy==="googlePay")return!1;const[T]=k.unsatisfied;return P.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:T??null,isPrePopulatedSourceType:c,allViolations:S.allViolations?.map(A=>A.code)||[]}),c&&T===void 0},blockedOnlyByShippingAddress:(S,I)=>{const k=C(S,I),T=l&&n.isRequired("phone",{countryCode:S.shippingAddress?.countryCode})&&(!S.contactInfo?.email||!S.shippingAddress?.phone);return k.gatedBy===null&&c&&!T&&k.unsatisfied.length===1&&k.unsatisfied[0]==="shipping-address"&&(S.allViolations??[]).every(A=>po(A)!=="shipping-address")}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:jp,fastForwardThroughPage:S=>o(jp)?!1:t==="cartNext"?lD(S.deliveryNext)?v("shipping","cart_next_shipping_selection_determined"):pD(S.paymentLines)?v("shipping","cart_next_has_direct_payment_session"):!1:nD({latestNegotiation:S,initialNegotiation:a,isPrePopulatedSourceType:c})?v("shipping","initial_delivery_selection_preserved"):!1,skipOverPage:({deliveryNext:S,isShippingRequired:I})=>!I||br(S)||qr(S)||h||kl(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>Ev(p,d.peek(),{shop:g,checkout:y,paymentMethods:_})?["payment-methods","localization-extension"]:["payment-methods","billing-address","localization-extension"]},...p?[{id:"review",label:e.translate("review.title"),route:"/review",features:["billing-address"]}]:[]],detours:[{type:"throttle",label:e.translate("throttle.title"),route:"/throttle"}
19,{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 nD({latestNegotiation:e,initialNegotiation:t,isPrePopulatedSourceType:n}){if(!n||!(e?.deliveryNext?.status==="filled"))return!1;const o=t?.session?.negotiate.result;if(o?.__typename!=="NegotiationResultAvailable"||o.buyerProposal.delivery.__typename!=="FilledDeliveryTerms")return!1;const i=o.buyerProposal.delivery.deliveryLines.map(c=>c.selectedDeliveryStrategy?.__typename==="DeliveryStrategyReference"?c.selectedDeliveryStrategy.handle:void 0).find(c=>c!==void 0);if(i===void 0)return!1;const a=ni(e?.deliveryNext).find(c=>c.status==="available");return a===void 0?!1:!(i!==Qr(a)?.handle)}function rD(e){const t=new Set,n=Kp(e,"PICK_UP"),r=Kp(e,"PICKUP_POINT");return n||Ka(t,QN),r||Ka(t,ZN),(n||r)&&Ka(t,eD),t.size>0?t:void 0}function Kp(e,t){return ni(e).some(n=>n.status==="available"&&Qr(n)?.methodType===t)}function Ka(e,t){t.forEach(n=>e.add(n))}function oD(e,t){const n=Pt(e?.lines,"PAYPAL_EXPRESS");if(!n||t?.status!=="filled")return!1;const r=n.method.walletContent,o=r?.email??void 0,i=r?.token??void 0;return!!(o&&i)}function iD({shippingAddress:e,addressSettings:t,countryDetails:n,violations:r=[],isDraftOrder:o,state:i}){return!e||t.isRequired("phone",{countryCode:e?.countryCode})&&o&&(!i.contactInfo?.email||!i.shippingAddress?.phone)||!pu({address:e,addressSettings:t,countryDetails:n})?!1:r.every(a=>po(a)!=="shipping-address")}function sD(e,t,n=[]){return pu({address:t,addressSettings:e})?n.every(r=>po(r)!=="billing-address"):!1}function aD(e,t=[]){return e?.status!=="filled"||!e.lines.some(n=>"methods"in n&&n.methods.some(r=>r.methodType==="PICK_UP"||r.methodType==="PICKUP_POINT"))?!1:t.every(n=>po(n)!=="delivery-method")}function lD(e){const t=cD(e);return t.length===0?!1:t.every(n=>uD(n)||dD(n))}function cD(e){return e?.status!=="filled"?[]:ni(e).filter(t=>t.status==="available")}function uD(e){return e.methods.length===1}function dD(e){if(e.methods.length<=1)return!1;const t=Qr(e);return t?e.methods[0]?.handle!==t.handle:!1}function pD(e){return e?.lines.some(t=>t.method.type==="direct"&&!!t.method.sessionId)??!1}function mD(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}const fD=["checkout","cartNext","draftOrder"];function hD(){const{i18n:e,shop:t,source:{type:n},checkout:r,observability:o}=b(),{extensibility:i}=r,a=er(),l=Pu(),c=fD.includes(n),{data:u}=ao(),d=LM(),{details:p}=Jt(d?.countryCode),m=n==="draftOrder",f=r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,h=Zv(),{parts:g}=Ft(),y=q(),_=y.paymentMethods.value,P=g.paymentLines,v=r.configuration.addressSettings.nonBillingAddressSettings.value,E=mD(r),C=y.isShippingRequired.value,S=R((k,{excludedExtensionTargets:T}={})=>i.ui.hasBlockingExtensionForFeatures({features:k,placementReferences:l,excludedExtensionTargets:T}),[l,i.ui]),I=R((k,T)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:k,reason:T}),!0),[o]);return V(()=>tD({i18n:e,sourceType:n,addressSettings:v,billingAddressSettings:E,hasBlockingUiExtensionForFeatures:S,getSellableDeliveryMethods:()=>a.value,initialNegotiationData:u,isDraftOrderCheckout:m,isPrePopulatedSourceType:c,isShippingRequired:C,proposedPaymentLines:P,reviewEnabled:h,shippingAddress:d,shippingCountryDetails:p,mustSelectProvidedShippingRate:f,shop:t,checkout:r,paymentMethods:_,observability:o,recordFastForward:I}),[v,E,S,a.value,u,m,c,C,P,h,d,p,f,n,e,t,r,_,o,I])}function gD({children:e}){const{i18n:t,observability:n,router:r,shop:o,source:i,checkout:a}=b(),l=a.identity.current.value==="shopPay",c=a.configuration.layout.isOnePage.value,{parts:u}=Ft(),d=q().paymentMethods?.value,p=u.paymentLines,m=Zv(),f=bM(),h=r.currentUrl.value?.search,g=hD(),y=vM({businessCustomerJourneyPath:f,isShopPay:l,source:i,isOnePageCheckout:c}),_=V(()=>{switch(y){case"businessCustomer":return n.leaveErrorBreadcrumb("Using business customer journey plan"),fM({i18n:t,greenPath:f});case"shopPay":return n.leaveErrorBreadcrumb("Using shop pay journey plan"),yM({i18n:t,shopName:o.name,currentUrlSearch:h});case"orderEdit":return n.leaveErrorBreadcrumb("Using order edit checkout journey plan"),gM({i18n:t,isOnePageCheckout:c,reviewEnabled:m});case"onePage":return hM({i18n:t,reviewEnabled:m,paymentMethods:d,proposedPaymentLines:p,shop:o,checkout:a});case"threePage":return g}},[f,a,h,t,c,y,n,d,p,m,o,g]);return s(KN,{plan:_,children:e})}function yD(){const{data:e}=ao(),{currentPage:t}=Se().value,n=Xe(),r=ie(),{deliveryMethodsAddressErrors:o}=Nt(),[i,a]=oe(!0),{setAddressError:l}=hu(o),c=r.shippingAddress.fields.countryCode.value,u=gu(c);return F(()=>
19{if(!e)return;const d=t?.route==="/information"||t?.route==="/";if(!i||!d){t&&a(!1);return}const{current:p}=n,{allViolations:m,paymentLines:f}=p.value;if(!!mC(f?.lines)&&m?.length){const g=["billing"].flatMap(y=>Array.from(u(y,m)));for(const[y,_]of g)l(y,_)}a(!1)},[t!==void 0,e,n,r]),null}var vD={Canvas:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133"};function _D({scrollbarGutter:e,children:t}){const n=Sr(),r=n.customProperties.value,o=n.darkModeCustomProperties.value,i=r?.color?.schemes?.scheme1?.base?.background,a=o?.color?.schemes?.scheme1?.base?.background,l=[i&&`html, body { background-color: ${i}; }`,a&&`@media (prefers-color-scheme: dark) { html, body { background-color: ${a}; } }`,e&&`html { scrollbar-gutter: ${e}; }`].filter(Boolean).join(`
20`);return s(G,{children:[s("style",{children:l}),s("div",{className:vD.Canvas,children:t})]})}function bD(e){if(typeof CSS<"u")return CSS.escape(e);const t=String(e),n=t.length;let r=-1,o="";const i=t.charCodeAt(0);if(n===1&&i===45)return`\\${t}`;for(;++r<n;){const a=t.charCodeAt(r);if(a===0){o+="�";continue}if(a>=1&&a<=31||a===127||r===0&&a>=48&&a<=57||r===1&&a>=48&&a<=57&&i===45){o+=`\\${a.toString(16)} `;continue}if(a>=128||a===45||a===95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}const PD=$w(e=>bt({colorScheme:e})),SD=Qn(function({children:t,scoped:n}){const r=Sr(),o=kf(),i=r.customProperties.value,a=r.darkModeCustomProperties.value,l=V(()=>{const u=`#CustomProperties-${bD(o)}`,d=i?Qp(i):null,p=a?Qp(a):null,m=Xp(Jp(i?.color)),f=Xp(Jp(a?.color)),h=d&&Object.keys(d).length>0,g=p&&Object.keys(p).length>0;if(!h&&!g&&!m&&!f)return"";const y=`${h?`${u} {${_n(d)}}`:""}${m}`,_=`${g?`${u} {${_n(p)}}`:""}${f}`,P=_?`@media (prefers-color-scheme: dark) { ${_} }`:"",v=`
21      ${y}
22      ${P}
23    `;return n?`@scope { ${v} }`:v},[i,a,o,n]);return s("div",{id:`CustomProperties-${o}`,children:[s("style",{children:l}),t]})});function ED(e){const t=e.color;if(!t||typeof t!="object"||Array.isArray(t))return e;const{schemes:n,...r}=t;return{...e,color:r}}function Jp(e){if(!(!e||typeof e!="object"||!("schemes"in e)))return e.schemes}function Iu(e,t){return Object.entries(e).reduce((n,[r,o])=>{const i=t[r];if(i==null)return n;const a=typeof o=="object"&&o!=null&&!Array.isArray(o),l=typeof i=="object"&&i!=null&&!Array.isArray(i);return a&&l?{...n,...Iu(o,i)}:a?n:o!=null?{...n,[i]:o}:n},{})}function Xp(e){if(!e||typeof e!="object")return"";const t=Jn.color.default;let n="";for(const r of Nf){const o=e[r];if(!o||typeof o!="object")continue;const i=Iu(o,t);if(Object.keys(i).length===0)continue;const a=PD[r].trim().split(/\s+/).join(".");n+=`.${a} {${_n(i)}}`}return n}function Qp(e){return Iu(ED(e),Jn)}function CD({children:e}){const{typographyPrimary:t,typographySecondary:n}=ct();return F(()=>{const r=[t,n].map(i=>[{fonts:i.fonts,source:i.sourceBase,weight:i.weightBase},{fonts:i.fonts,source:i.sourceBold,weight:i.weightBold}]).reduce((i,a)=>i.concat(a),[]).filter(i=>i.fonts!==void 0&&i.source!==void 0).map(({fonts:i,source:a,weight:l})=>new FontFace(i,a,{weight:l}));async function o(){await Promise.all(r).then(i=>{i.forEach(a=>{document.fonts.add(a)})})}o()},[t,n]),s(G,{children:e})}function kD({children:e,condition:t}){return t?s(CD,{children:e}):s(G,{children:e})}function ID({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:o}=VT();return s(ac.Provider,{value:t,children:s(fC,{children:s(kD,{condition:!!n,children:o?s(SD,{scoped:r,children:e}):e})})})}function AD({children:e}){const{checkout:t,source:n,router:r}=b(),o=r.currentUrl.value,i=n.type==="simulated",a=Vn(o.search),l=t.configuration.branding.shell,c=t.configuration.branding.theme,u=pc()||i||a;return s(ID,{theme:c,shouldLoadFonts:u,children:s(ER,{shell:l,children:s(TD,{children:e})})})}function TD({children:e}){const{canvas:t}=Fe();return s(_D,{scrollbarGutter:t?.scrollbarGutter,children:e})}function wD(){const{embed:e}=b(),t=XT(),n=w(()=>!!(t?.value||e?.presentation?.active.value));return F(()=>{let r=!1;return n.subscribe(o=>{o!==r&&(r=o,e?.client?.dialogChange(o?"open":"close"))})},[n,e]),null}function e_(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function mY(e){const t=e.type==="local"?void 0:e.publicIdentifier,n=e.type==="persisted"?e.targetPublicIdentifier:void 0,r=e.type==="local"?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:e_(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function LD(e){return{message:MD(e),trace:RD(e)}}function xD(e){return typeof e.cause=="object"&&e.cause!=null}function RD(e){const t=String(t_(e));return e.stack??t??e.message??""}function MD(e){const t=t_(e);return t?`${t.name}: ${t.message}`:e.message}function t_(e){if(xD(e)&&"stack"in e.cause)return e.cause}var at=(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
23RROR",e.PaymentError="PAYMENT_ERROR",e))(at||{}),n_=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(n_||{});const r_={[Wt.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[Wt.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[Wt.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[Wt.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[Wt.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[Wt.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[Wt.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[Wt.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[Wt.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[Wt.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[Wt.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[Wt.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[Wt.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}};function ND(e){return e in r_}function DD(e){return e in Wt}const OD=({children:e})=>{if(typeof window>"u")return s(G,{children:e});const{observability:t,userEvents:n,checkout:r}=b(),o=cy(),i=xn(),a=r.configuration.layout.isOnePage.value;return F(()=>{const l=(u,d)=>{if(DD(u.name)&&d?.extension){const{extension:p}=d,{trace:m,message:f}=LD(u);if(!Bf(u.name))return;const h={apiVersion:p.apiVersion,appId:p.appId,appApiKey:p.appApiKey,appName:p.appName,appVersion:p.version,code:n_.ExtensionUsageError,errorName:u.name,extensionId:p.extensionId,extensionName:p.name,extensionType:p.type,message:f,placementReference:p.placementReference,extensionTarget:p.extensionPoint,registrationId:p.registrationId,trace:m,type:"uiExtensionError"};i("uiExtensionError",{...h,timestamp:new Date})}},c=(u,d,p)=>{if(ND(u.name)&&d?.extension){const{extension:m}=d,{eventName:f,eventType:h,errorReason:g}=r_[u.name],{userToken:y,shopId:_,sessionToken:P,checkoutToken:v,apiClientId:E,sourceId:C,sourceType:S,checkoutSdkVariant:I,checkoutSdkVersion:k,checkoutSdkSchemaVersion:T,pageLoadId:A}=o;n.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:{userToken:y,shopId:_,sessionToken:P,pageLoadId:A,checkoutToken:v,apiClientId:E,sourceId:C,sourceType:S,extensionId:e_(m),extensionPoint:m.extensionPoint,extensionPlacementReference:m.placementReference,extensionInstanceId:m.extensionInstanceId,activatedExtensionIds:p?.extensions?.active,eventType:h,eventName:f,errorMessage:u.message,sourceDesign:a?"c1_redesign":"c1_legacy",errorReason:g,silencedViolation:!1,errorOrigin:"client",errorType:"extension",checkoutSdkVariant:I,checkoutSdkVersion:k,checkoutSdkSchemaVersion:T,extensionPublicIdentifier:m.publicIdentifier,extensionTargetPublicIdentifier:m.targetPublicIdentifier}})}};return t.addOnError(c),t.addOnError(l),()=>{t.removeOnError(c),t.removeOnError(l)}},[t,n,o,a,i]),s(G,{children:e})},FD=100;function BD(){const e=vy(),t=U(new Set);return F(()=>()=>{for(const n of t.current)cancelAnimationFrame(n.handle),clearTimeout(n.timeout),n.resolve();t.current.clear()},[]),tr(n=>{if(n.type==="error"||n.type==="invalid")return new Promise(r=>{const o=()=>
23{if(!i.settled){i.settled=!0,cancelAnimationFrame(i.handle),clearTimeout(i.timeout);try{e()}finally{t.current.delete(i),r()}}},i={handle:requestAnimationFrame(o),resolve:r,settled:!1,timeout:setTimeout(o,FD)};t.current.add(i)})}),null}function VD({i18n:e,buyerIdentity:t}){return!!t.value?.customerProfile?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}function o_(){const{checkout:{identity:e}}=b(),t=q().buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:n}}=We();return w(()=>e.current.value==="applePay"&&!!t.value?.purchasingCompany&&n.value)}function _i(){const{checkout:{wallets:e},embed:t}=b(),n=UD(),r=yh(),o=o_();return R(({shouldResetCustomerInfo:i=!1,shouldRemovePaymentLine:a=!0,isConstrainedAddress:l=!1}={})=>{const c=i&&t?.isFlagshipPartner?t.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),o.value||e.setEscalatedWallet(null),i&&n(c,l),a&&!c&&r()},[t,n,r,e,o])}function UD(){const{deliveryLines:e,email:t,phone:n,shippingAddress:r,billingAddress:o,billingAddressOption:i,paymentLines:a,tipLines:l,discountLines:c,interfaceFlow:u,externalDeliveryIds:d,cartMetafields:p,attributes:m}=ie(),f=_N(),h=Vv(),g=Cr();return R((y,_=!1)=>{if(u.value=void 0,d.value=void 0,y)t.value=y.email,n.value=y.phone,r.value=y.shippingAddress,o.value=y.billingAddress,y.billingAddressOption&&(i.value=y.billingAddressOption),a.value=y.paymentLines,l.value=y.tipLines,c.value=y.discountLines,p.value=y.cartMetafields;else{const P=f()??"",v=h("shipping"),E=h("billing");t.value=P,n.value="",_||(r.value=v??Ll(r.value)),o.value=E??Ll(o.value);const C=m.value;m.value=C&&C.filter(S=>S.key!==vh)}!g.value&&!_&&Fs(e,void 0)},[m,i,o,p,e,c,t,d,h,f,u,g,a,n,r,l])}function bi({onClick:e,shouldResetCustomerInfo:t,shouldRemovePaymentLine:n,skipRedirect:r}={}){const{negotiate:o,progress:i}=Lt(),a=_i(),{dispatch:l}=ru()??{},{client:c,observability:u,persistence:d,router:p,checkout:{identity:{current:m}},i18n:f}=b(),{buyerIdentity:h}=q(),{value:g}=w(()=>VD({i18n:f,buyerIdentity:h})),{currentDetour:y}=Se().value,_=c.unstable_getSerialization("forcedRedesignWallet"),P=zD(p.currentUrl.value),v=p.currentUrl.value.searchParams.has(jo),E=_&&P&&!v&&!r,C=R(async S=>{if(u.counter({name:LR,value:1,attributes:{identity:m.value,redirect:!!E}}),E){d?.clearAll(),e?.(),S?.(),window.location.replace(P);return}l?.("addressReset"),xR(p.currentUrl.peek()),e?.(),a({shouldResetCustomerInfo:t,shouldRemovePaymentLine:n}),l?.("reset"),y&&i("checkout-as-guest-action"),S?.(),await o({silenceViolations:["non-stock"]})},[y,l,P,m,o,e,d,i,a,E,u,p,t,n]);return{label:g,onClick:C}}function zD(e){try{const t=new URL(e.href);return t.searchParams.delete(El),t.searchParams.append(jo,"1"),t.toString()}catch{return}}function HD(){const{router:e}=b(),t=e.currentUrl.value,{onClick:n}=bi({shouldResetCustomerInfo:!0});F(()=>{t.searchParams.has(jo)&&(n?.(),RR(t))},[])}function qD(){return HD(),null}const Zp="wallet_deceleration";function GD(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=We(),{clearForcedCheckoutLayout:n}=yi(hs),{checkout:r,router:o}=b(),i=R(async()=>{e.value=void 0,t.value=void 0,n({wallet:"GOOGLE_PAY"}),WD(o.currentUrl.value),r.unstable_evaluateSupportsSplitShipping(o.currentUrl.value)},[e,t,r,n,o]);return bi({onClick:i,shouldResetCustomerInfo:!0,skipRedirect:!0})}function WD(e){e.searchParams.get(Zp)==="true"&&(e.searchParams.delete(Zp),history.replaceState(null,"",e.href))}function $D({shouldResetCustomerInfo:e}){const t=_i();return R(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const em="google_pay_legacy_token_bounce";function YD(){const{checkout:e,embed:t,observability:n,shop:r}=b(),{inMemoryGooglePayParts:{paymentSheetError:o}}=We(),{onClick:i}=GD();F(()=>{r.hasFlagEnabled(hC)&&(t||e.wallets.escalatedWallet.value==="GOOGLE_PAY"&&(e.latestReceipt.value||gC({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:em,value:1}),n.log(em,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),i?.(()=>{o.value={type:"recovery_notice"}}))))},[])}function jD(){return YD(),null}const i_=mt("NavigationBlockerContext");
23class KD extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}const JD=1e3,tm=30;function XD({children:e}){const t=U(new Set),n=we(!1),{observability:r}=b(),o=R(l=>{setTimeout(()=>{t.current.has(l)&&r.error(new KD(`The block associated with the key: ${l} has been blocking for over ${tm} seconds now. Please check to see you are properly cleaning this up.`))},tm*JD)},[r]),i=R((l,c)=>{const u=c??"_global",d=t.current;l?(d.add(u),o(u)):d.delete(u),n.value=d.size>0},[n,o]),a=V(()=>({blocking:n,setBlocking:i}),[n,i]);return s(i_.Provider,{value:a,children:e})}const s_=Ge({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),Js=()=>Pe(s_);function fY(){const{registerPayNowButtonElement:e}=Js(),t=U(null);return R(n=>{t.current?.(),t.current=n?e(n):null},[e])}function QD({children:e}){const t=U(new Set),[n,r]=oe(null),[o,i]=oe(0),a=R(d=>(t.current.add(d),r(d),()=>{t.current.delete(d),r(p=>p===d?t.current.values().next().value??null:p)}),[]),l=R(d=>{i(p=>Math.max(0,p+(d?1:-1)))},[]),c=o>0,u=V(()=>({registerPayNowButtonElement:a,payNowButtonElement:n,setPayNowButtonSectionMounted:l,payNowButtonSectionMounted:c}),[a,n,l,c]);return s(s_.Provider,{value:u,children:e})}function ZD(){return lv(b())}function hY(){const{embed:e}=b(),n=Bs()?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return n==="DISABLED"||n==="FORWARD_TO_CLIENT"||r==="DISABLED"||r==="FORWARD_TO_CLIENT"}function gY(){const{mobileCheckoutSdk:e}=b(),t=e.config.version,n=e.config.schema;return!!t||!!n}function eO(e){return e.filter(t=>t.allocationSet.allocatedForTotal?.targets.some(n=>!n.deliveryLineTarget)||t.allocationSet.allocated?.allocations.some(n=>!n.target.deliveryLineTarget))}function a_({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function l_(e){const t={totalAmount:{any:!0},paymentLines:[],billingAddress:null};return{...e,buyerIdentity:{...e.buyerIdentity,email:"",phone:"",customer:{presentmentCurrency:e.buyerIdentity?.customer?.presentmentCurrency,countryCode:e.buyerIdentity?.customer?.countryCode},marketingConsent:[]},delivery:{deliveryLines:[],noDeliveryRequired:[]},discounts:{lines:eO(e.discounts?.lines??[])},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(n=>({...n,payment:t}))}}}}var tO=(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))(tO||{});function nO(e,t){t&&(e.set(IC,t.paymentMethod),t.paymentMethodIdentifier?e.set(Vd,t.paymentMethodIdentifier):e.delete(Vd))}class rO extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function Au(e="payment_page",{markPrefilledGuestArrival:t=!1}={}){const{client:n,i18n:r,observability:o,userEvents:i,source:a,checkout:l,shop:c,persistence:u,shop:{hasStorefront:d},url:p,shopPay:m,embed:f,router:h}=b(),g=h.currentUrl.value,{checkoutAsGuestUrl:y,profilePreviewToken:_,checkoutProfileContext:P,redirectSource:v}=m.config,E=a.type==="simulated",C=m.user.isAuthenticatedUser,S=c.hasFlagEnabled(yC),I=lo().current.token,k=l.checkpointToken.value,T=l.configuration.renderContextToken.token.value,A=Fv({mode:"copy-if-missing",include:{shopClientUuid:!0}}),L=a_({isFlagshipPartner:f?.isFlagshipPartner,embedderProposalSnapshotEmail:f?.embedderProposalSnapshot.value?.email,proposedEmail:l.proposal.proposed.email.value}),M=V(()=>{if(E)return"";if(!y)return d?p.storefront():"";const x=new URL(y);x.searchParams.set(_h,"true"),vC(x),t&&C.value&&_C(a.type)&&S&&bC(x,kC),k&&x.searchParams.set(PC,k),I&&x.searchParams.set(gh,I),_&&P&&(x.searchParams.set(SC,_),x.searchParams.set(EC,P)),Vn(g.search)&&x.searchParams.set(CC,"shop_web"),C.value?x.searchParams.set(Bd,"true"):x.searchParams.delete(Bd),T?x.searchParams.set("rctx",T):x.searchParams.delete("rctx");const X=new URLSearchParams(g.search).get("_cs");X&&x.searchParams.set("_cs",X);const Z=new URLSearchParams(n.initialRequest.url.search);return A(x.searchParams,Z),L&&!x.searchParams.get("checkout[email]")&&x.searchParams.set("checkout[email]",L),x.href},[E,y,k,n.initialRequest.url.search,_,P,g.search,C.value,I,d,p,T,A,L,t,a.type,S]);let N=r.translate("unauthenticated_modals.generic.cta");(ZD()||f?.isCheckoutKit())&&(N=r.translate("checkout_sdk.use_another_payment_method"));const D=R(()=>(E||(C.value&&u?.clearAll(),o.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:v}}),i.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...$n(a,l,c),origin:e}},{exportImmediately:!0})),null),[E,C,u,o,i,a,l,c,e,v]),B=R(x=>
23{if(l.unstable_setRedirectingExternally(!0),D(),!M){l.unstable_setRedirectingExternally(!1),o.error(new rO("redirectToGuestCheckout called without a guest checkout URL"));return}if(!x){window.location.assign(M);return}const W=new URL(M);nO(W.searchParams,x),window.location.assign(W.href)},[l,D,M,o]);return V(()=>({label:N,href:M,onClick:D,redirectToGuestCheckout:B}),[N,M,D,B])}function oO(e){const{negotiate:t}=Lt();return R(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:l_,negotiationStage:"negotiation",onComplete:r=>e(n,r)}),[t,e])}function iO(e,t){const{negotiate:n}=Lt();return R(r=>n({silenceViolations:["all"],force:!0,customizeNegotiation:o=>{const i=l_(o);return{...i,buyerIdentity:{...i.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(r)}),[n,t,e])}function yY({clearPii:e}){const{embed:t,checkout:n,userEvents:r,source:o,shop:i}=b(),a=ie().shippingAddress.value,{href:l,redirectToGuestCheckout:c}=Au("payment_page",{markPrefilledGuestArrival:!e}),u=a_({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:n.proposal.proposed.email.value}),d=oO(c),p=iO(c,u??""),m=n.proposal.negotiated.fields.availableDeliveryAddresses.value,f=!!(m?.length&&m.some(h=>AC(a,h.address)));return R(h=>{if(n.unstable_setRedirectingExternally(!0),!e||f){!e&&l&&r.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(o,n,i),action:"payment_step_redirect"}},{exportImmediately:!0}),c(h);return}if(u){p(h).catch(()=>{n.unstable_setRedirectingExternally(!1)});return}d(h).catch(()=>{n.unstable_setRedirectingExternally(!1)})},[n,e,l,r,o,i,f,c,u,d,p])}const sO=[3890849,3850711,5198245];function aO(e){return e?sO.includes(e):!1}function lO(){const{observability:e}=b(),t=R(n=>{if(typeof window>"u"||!window.ReactNativeWebView||typeof window.ReactNativeWebView.postMessage!="function")return;const r=JSON.stringify(n);try{window.ReactNativeWebView.postMessage(r)}catch(o){e.log("shop_app_messenger_post_message_failed","Failed to post message to ReactNativeWebView",{error:o})}},[e]);return V(()=>({notify:t}),[t])}function cO(e){return new URL("/pay/session",e).href}function uO({enabled:e,observability:t,shopServerUrl:n}){const r=U(!1);F(()=>{!e||r.current||(r.current=!0,fetch(cO(n),{method:"GET",credentials:"include",keepalive:!0}).then(o=>{o.ok||t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{status:o.status})}).catch(o=>{t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{errorMessage:o instanceof Error?o.message:String(o)})}))},[e,t,n])}function dO({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:i,shopPay:a}=b(),l=t.rememberMe.shouldSetRememberMeCookies.value,c=r.type==="simulated",{href:u}=Au(),d=jy().value,p=lO(),m=U(!1),f=t.identity.current.value==="shopPay",h=o.unstable_getSerialization("apiClientId"),g=o.unstable_getSerialization("shopPayConfig"),y=aO(h),_=!c&&d!==void 0&&!y&&!t.configuration.isUniversalCheckoutFinalizer,P=f&&_,v=f&&!c&&!P&&g.has_remember_me_session===!0&&a.user.shopAccountUuid.value!=="",E=U(!1);return ze(()=>{const C=t.latestReceipt.value;if(C!=null)switch(C.status){case"processed":p.notify({checkout_completed:!0});break;case"action_required":C.action.type==="complete_payment_challenge"?p.notify({checkout_error:"threeds_required"}):p.notify({checkout_error:"generic_error"});break;case"failed":C.failure.type==="payment"||C.failure.type==="discount"?p.notify({checkout_in_progress:!1}):p.notify({checkout_error:"generic_error"});break}}),F(()=>{!m.current&&l&&(t.rememberMe.setRememberMeCookies(),m.current=!0)},[l,t.rememberMe]),uO({enabled:v,observability:n,shopServerUrl:i.services.shopServer.url}),F(()=>{!P||E.current||(E.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:d}),d!=="deferred_payment"&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(u))},[u,n,d,P]),P?null:s(G,{children:e})}function pO(){const{client:e}=b(),n=e.unstable_getSerialization("experiments")?.find(l=>l.clientHandle===sA)?.variant,r=Object.values(ir).find(l=>l===n)??ir.Control,o=r===ir.VariantA||r===ir.VariantC,i=r===ir.VariantB||r===ir.VariantC,a=r!==ir.Control;return{variant:r,showPaymentTiles:o,useRedesignedChoiceList:i,showSingleCreditCard:a}}function mO(){const{source:e}=b(),{useRedesignedChoiceList:t}=pO();return t&&e.type!=="shopPayExternal"?"redesigned":"base"}
23class fO extends Error{constructor(){super(...arguments),this.name="TranslationError"}}function hO(e){const t=r=>e.numberFormatter().format(r),n=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",(r={})=>e.translate("general.stepper.increase",r)],["decrease",(r={})=>e.translate("general.stepper.decrease",r)],["minimumReached",(r={})=>e.translate("general.stepper.minimum_reached",r)],["maximumReached",(r={})=>e.translate("general.stepper.maximum_reached",r)],["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",(r={})=>e.translate("general.datepicker.show_next_month",r)],["showPreviousMonth",(r={})=>e.translate("general.datepicker.show_previous_month",r)],["rangeStart",()=>e.translate("general.datepicker.range_start")],["inRange",()=>e.translate("general.datepicker.in_range")],["rangeEnd",()=>e.translate("general.datepicker.range_end")],["autocompleteOptionsAvailable",({count:r=0}={})=>r===0?e.translate("general.autocomplete_zero_item"):r===1?e.translate("general.autocomplete_single_item"):e.translate("general.autocomplete_multi_item",{number:r})],["qrCode",()=>e.translate("general.qr_code")],["removeChip",()=>e.translate("general.remove_chip")],["removeItem",(r={})=>e.translate("general.remove_item",r)],["removeTag",()=>e.translate("general.remove_tag")],["mapClusterTitle",({count:r=0}={})=>{const o=typeof r=="number"?t(r):r;return r===1?e.translate("general.map.cluster_title.one",{number:o}):e.translate("general.map.cluster_title.other",{number:o})}],["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",()=>
23e.translate("clipboard.failed_to_copy")],["productThumbnailQuantityLabel",()=>e.translate("order_summary.product_image_quantity_label")]]);return(r,o)=>{const i=n.get(r)?.(o);if(i==null)throw new fO(`Missing UI library translation: ${r}`);return i}}const c_=()=>{const{url:e}=b();return V(()=>[e.cart(),e.storefront()],[e])};function u_(){const{router:e,shop:t}=b(),n=fi(),{cartLink:{visibility:r}}=Fe(),o=Se(),i=mo(),a=Je(r==="hidden");return w(()=>{const{currentDetour:l}=o.value,c=l?.type==="thankYou";return t.hasStorefront&&!n.value&&!c&&!Vn(e.currentUrl.value.search)&&!!i.value&&!a.value})}function mo(){const{source:e,url:t}=b(),n=e.type==="simulated",r=q().buyerIdentity;return w(()=>{if(n)return new URL(t.cart());let o;return e.cartReturnUrl&&(o=new URL(e.cartReturnUrl)),r.value?.customerProfile&&o&&o.searchParams.append("logged_in","true"),o})}function d_(e){return e.currentUrlMatches("/thank-you")}function gO(e){return e.currentUrlMatches("/stock-problems")}const p_=Ke(function({href:t,target:n="auto",children:r,...o},i){const{i18n:a,router:l,url:c,source:u,checkout:d,embed:p,observability:m}=b(),f=mo(),h=bO(),g=new URL(c.storefront()).origin,y=u.type==="simulated",_=d.configuration.isWindowOpenDelegationEnabled,P=c_();if(d.configuration.isUniversalCheckoutFinalizer&&d_(l))return s("a",{...o,ref:i,"aria-disabled":"true",children:r});let v=n==="_blank",E=n==="_blank",C=SA(t,{cart:CA(f.value),checkout:EA()});const S=vO(C,l,g,h),I=["/information","/shipping","/review","/payment","/thank-you","/cart","/",""],k=["/orders","/profile","/settings"],T=[...I,...k],A=/^\/orders\/.*/;switch(S){case 2:{E=!0,v=!0;break}case 1:{E=!0;break}case 3:{E=!0,C="#";break}case 0:y&&!T.includes(Xh(C))&&!A.test(C)&&(C="#");break;default:sn(S)}const L=v?"_blank":void 0,M=v?"noopener noreferrer":void 0,N=_g({external:v,native:E});return E?s("a",{...o,href:C,target:L,rel:M,ref:i,"aria-describedby":N,onClick:D=>{if(_&&(S===1||S===2)){D.preventDefault(),p?.client?.windowOpenRequest(C).catch(B=>{m.log("window_open_delegation_error","Window open delegation failed in Link component",{url:C,error:B instanceof Error?B.message:String(B)})}),o.onClick?.(D);return}if(y){if(D.preventDefault(),P.includes(C)){const x=new URL(l.currentUrl.value);x.searchParams.set("ce_redirect",C),l.navigate(x);return}const B=a.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:C});confirm(B)&&open(C)}o.onClick?.(D)},children:r}):s(rS,{...o,router:l,href:C,target:L,rel:M,ref:i,"aria-describedby":N,children:r})});p_.displayName="Link";const m_=new Set(["http","https"]),yO=new Set([...m_,"mailto","tel","sms"]);function vO(e,t,n,r){let o;try{o=new URL(e,t.currentUrl.value.origin)}catch{return 3}const i=o.protocol.replace(":","");return m_.has(i)?oS(o,t.prefix)||!e.startsWith("//")&&!e.startsWith(o.protocol)?0:_O(o,t,n,r)?1:2:yO.has(i)?1:3}function _O(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}function bO(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=b(),o=r?.map(l=>`https://${l}`)??[],i=[t.shopServer.url,...o];if(n.domain){const l=`https://${n.domain}`;i.push(l)}const a=e.unstable_getSerialization("loginUrl");return a&&i.push(`https://${new URL(a).host}`),i}function PO({children:e}){const{geolocation:t}=mu(),{i18n:n,embed:r,checkout:o,observability:i,shop:a}=b(),l=vc({embedder:r?.embedder,shop:a}),c=Er(),u=o.configuration.layout.isOnePage.value,d=mO()==="redesigned",p=R(y=>n.numberFormatter().format(y),[n]),{symbol:m,prefixed:f}=iS(n.currency,n),h=V(()=>hO(n),[n]),g=mv();return s(lw,{currency:{code:n.currency,symbol:m,symbolPrefixed:f},embed:r?{embedder:r.embedder,interstitialBrandingEnabled:l}:void 0,formatNumber:p,geolocation:{countryCode:t.country.code},linkComponent:p_,locale:{direction:n.localeDirection,languageCode:n.locale},onePage:u,editor:c,redesignedChoiceLists:d,translate:h,announcementEmitter:{...g,close:()=>g.emit("closeAnnouncement")},logger:i,children:e})}const SO=mt("ValidationErrorsContext");function f_(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const nm="$.payments",rm="$.cart.buyerIdentity",om="$.cart.deliveryGroups[0].deliveryAddress",im="$.cart.localizedField",sm="$.cart.billingAddress",EO="$.cart.poNumber";function Xs(){const e=Ft(),{allViolations:t}=q(),n=qe("allViolations"),r=w(()=>n.value?[]:t.value?t.value.filter(o=>o.__typename==="UnprocessableTermViolation"&&_c.has(o.code)).map(o=>({message:o.localizedMessage||o.nonLocalizedMessage,target:o.target})):[]);return w(()=>
23{const o=[...e.validationErrors.value,...r.value].filter(f_()),i=o.filter(({target:m})=>m?.startsWith(om)&&!!m.replace(`${om}.`,"")),a=o.filter(({target:m})=>m?.startsWith(rm)&&!!m.replace(`${rm}.`,"")),l=o.filter(({target:m})=>m?.startsWith(nm)&&!!m.replace(`${nm}.`,"")),c=o.filter(({target:m})=>m?.startsWith(im)&&!!m.replace(`${im}.`,"")),u=o.filter(({target:m})=>m?.startsWith(sm)&&!!m.replace(`${sm}.`,"")),d=o.filter(({target:m})=>m===EO),p=o.filter(m=>![...a,...i,...l,...c,...u,...d].includes(m));return{contactErrors:a,deliveryAddressErrors:i,paymentErrors:l,localizedFieldErrors:c,billingAddressErrors:u,poNumberErrors:d,globalErrors:p}})}function CO({children:e}){const{deliveryMethodsAddressErrors:t}=Nt(),{validation:n}=b().checkout,{billingAddressErrors:r,poNumberError:o}=n,{emailInputError:i,phoneInputError:a}=n.contactErrors,{contactErrors:l,deliveryAddressErrors:c,billingAddressErrors:u,poNumberErrors:d,globalErrors:p}=Xs().value,{shippingAddress:m}=ie(),f=m.fields.countryCode.value,h=lR(f),g=dR(),y=V(()=>({}),[]),_=R((v,E,C)=>{const S=v.value,I=k=>{v.value=k};!S&&C&&(I(C.message),y[E]=C.message),typeof S=="string"&&y[E]===S&&!C&&(I(void 0),delete y[E])},[y]);F(()=>{_(a,"phone",l.find(({target:v})=>v?.split(".")?.pop()==="phone")),_(i,"email",l.find(({target:v})=>v?.split(".")?.pop()==="email"))},[l,i,_,a]),F(()=>{Object.entries(t).forEach(([v,E])=>{let C=c.find(({target:T})=>{const A=T?.split(".").pop();return A?v==="postalCode"&&A==="zip"||v==="zoneCode"&&A==="provinceCode"||(v==="streetName"||v==="streetNumber")&&A==="address1"||(v==="neighborhood"||v==="line2")&&A==="address2"?!0:A===v:!1});const I=["streetName","streetNumber","line2","neighborhood"].includes(v),k=h?.includes(v);I&&!k&&C&&(C={...C,message:" "}),_(E,v,C)})},[c,t,h,_]),F(()=>{Object.entries(r).forEach(([v,E])=>{const C=u.find(({target:S})=>{const I=S?.split(".").pop();return I?v==="postalCode"&&I==="zip"||v==="zoneCode"&&I==="provinceCode"?!0:I===v:!1});_(E,`billing_${v}`,C)})},[r,u,_]),tr(v=>{v.type==="success"||v.type==="error"?g({errors:v.errors}):v.type==="invalid"&&g({reasons:v.reasons})}),F(()=>{_(o,"poNumber",d[0])},[_,o,d]);const P=V(()=>({globalErrors:p}),[p]);return s(SO.Provider,{value:P,children:e})}const kO=He({load:()=>Be(()=>import("./d08a6c7d.C3l7f4gE.js"),__vite__mapDeps([70,1,2,3,4,5,71,6,72,41,56,57,8,55,73,61,74,7,9])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:IO});function IO(e){const{sessionLoadFailed:t}=We().inMemoryApplePayParts,{observability:n}=b();F(()=>{e&&(t.value=!0)},[e,n,t])}function AO(){const e=wt();return w(()=>e.value?typeof window.ApplePaySession<"u":!1)}function TO(){const e=AO(),{availableWallets:t}=We(),n=Je(t.some(({name:i})=>i==="APPLE_PAY")),r=U(!1),o=w(()=>(!r.current&&e.value&&n.value&&(r.current=!0),r.current));return s(ve,{when:o,children:s(kO,{})})}function h_(){const{checkout:e}=b();return!e.configuration.showPayButton}const wO=6e4;function LO({enabled:e,onTimeout:t,timeout:n=wO}){const r=U(null),o=U(t);o.current=t,F(()=>{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,n])}var bo={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 jt({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:i,visibility:a,tabIndex:l,display:c="block"}){const u=Fc(),d=r??u??0,p=u?`h${u}`:"h1",m=a==="hidden"?bo.visuallyHidden:Y(bo.Heading,o&&bo.textAlignVariant[o],d?bo.levelVariant[d]:void 0,c&&bo.displayVariant[c]),f=U(null);return F(()=>{i&&f.current?.focus({preventScroll:!0})},[i]),s(p,{id:e,ref:f,tabIndex:i?-1:l,className:m,role:n==="heading"?void 0:n,children:t})}const xO="MQqMI",RO="Jue6i",MO="kpec9",Ja={dialog:xO,background:RO,content:MO};function NO({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=du(),o=we(!1);F(()=>{r(),o.value=!0},[o,r]);const i=s("div",{className:Ja.dialog,role:"dialog","aria-modal":!0,"aria-label":t,children:[s("div",{className:Ja.background}),s("div",{className:Ja.content,children:e})]});return s(G,{children:[n&&!o.value?s("div",{"aria-hidden":"true",children:i}
23):null,s(Pr,{children:s(uu,{children:i})})]})}function DO({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=b(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return s(NO,{dialogLabel:r,renderInlineUntilMounted:e,children:s(ee,{gap:"large-400",alignItems:"center",children:[s(be,{children:s(so,{size:"large"})}),s(jt,{level:2,textAlign:"center",children:r})]})})}const OO=3e3,FO=1e4;function BO({onTransitionComplete:e,useConsentCopy:t=!1}){return s(VO,{onTransitionComplete:e,useConsentCopy:t})}function VO({onTransitionComplete:e,useConsentCopy:t}){const{checkout:n,i18n:r}=b(),o=h_(),{payNowButtonElement:i,payNowButtonSectionMounted:a}=Js(),l=!!(i||o&&a),c=U(!1);l&&(c.current=!0);const u=n.configuration.layout.isOnePage,d=u.value,p=c.current,m=U(null),f=U(!1),h=U(!1),g=R(()=>{u.value&&(f.current||(f.current=!0,xt({content:r.translate("wallets.errors.subscription_review_required"),role:"status"}),n.wallets.setIsDecelerating(!1),e()))},[r,u,e,n.wallets]);return LO({enabled:!0,onTimeout:()=>{h.current=!0,g()},timeout:FO}),F(()=>{if(m.current===null&&(m.current=Date.now()),h.current){g();return}if(!p)return;const y=Date.now()-m.current,_=Math.max(0,OO-y);if(_===0){g();return}const P=setTimeout(()=>{g()},_);return()=>clearTimeout(P)},[g,d,p]),s(DO,{renderInlineUntilMounted:!0,useConsentCopy:t})}function UO(e){const{shop:t,checkout:{configuration:n,identity:r}}=b(),o=r.current.value==="shopPay",i=t.hasFlagEnabled(Tn);return w(()=>TC({supportsOnePage:wC({isOnePage:n.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:i,asPaymentMethod:e.value}),isShopPayActive:o}))}const zO=["address2","company","phone"];function g_({addressErrors:e}){if(e.size!==1)return;const[t]=e.keys();if(t!==void 0)return HO(t)?t:void 0}function y_({missingAddressField:e,violations:t}){return e==="company"&&t.some(({code:n})=>n==="DELIVERY_COMPANY_REQUIRED")}
23function vY({addressErrors:e,violations:t}){const n=g_({addressErrors:e});if(!y_({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function HO(e){return zO.includes(e)}function v_({paymentLines:e,paymentMethods:t}){if(!t?.some(o=>o.type==="wallet"&&o.name==="PAYPAL_EXPRESS"))return{status:"not_connected"};const r=Pt(e,"PAYPAL_EXPRESS");if(r&&bc(r)){const{walletContent:o}=r.method;return{status:"connected",email:o?.email??"",token:o?.token??""}}return{status:"not_connected"}}function qO({code:e}){return Zr.has(e)||Hi.has(e)||NC.has(e)||DC.has(e)||_c.has(e)||OC.has(e)||FC===e}function GO({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);if(n.length!==1)return!1;const r=t("shipping",n),o=g_({addressErrors:r});return y_({missingAddressField:o,violations:n})}function __({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=We();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function WO(){const{shop:e,i18n:t,checkout:{configuration:n}}=b(),{shippingAddress:r,paymentLines:o}=ie(),i=r.value,a=q(),{value:l}=a.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:c}}=We(),{details:u,loading:d}=Jt(i.countryCode),{value:p}=a.allViolations,m=gu(i.countryCode),f=e.hasFlagEnabled(bh),h=V(()=>RC({paymentLines:o.value,isOnePage:n.layout.isOnePage.value})?p?.filter(qO)??[]:[],[p,o,n.layout.isOnePage.value]),y=V(()=>f&&GO({violations:h,getAddressErrorsFromViolations:m}),[h,m,f])?void 0:h[0],_=c.value?.type===bs,P=c.value?.type===Ph,v=V(()=>{const E=MC(l,"PAYPAL_EXPRESS");if(_&&!E){const C=d?i.countryCode:u?.name;return C?t.translate("wallets.errors.unavailable.unavailable_for_c
23ountry",{walletName:t.translate("brand.paypal"),countryName:C}):t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")})}},[u?.name,d,l,_,i.countryCode,t]);if(P){const E=t.translate("shipping_errors.unavailable_address_country");return{code:Ze.PaymentSheetViolations,tone:"critical",localizedMessage:E,nonLocalizedMessage:E,onDismiss:()=>{c.value=void 0}}}if(v)return{code:Ze.PaymentSheetViolations,tone:"info",localizedMessage:v,nonLocalizedMessage:v,onDismiss:()=>{c.value=void 0}};if(y)return{code:Ze.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}}function $O(){const{isInPayPalContextSignal:e}=We(),{i18n:t}=b(),n=__({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:r}}=We();return w(()=>{if(e.value){if(n.value.status==="error")return t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")});if(r.value.status==="error")return t.translate("wallets.errors.generic",{walletName:t.translate("brand.paypal")})}})}const _Y=()=>{const{paymentLines:e}=ie();return R(()=>{const t=e.value;e.value=fc(t,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}})},[e])};function bY(){const e=er(),{checkout:t,shop:n}=b(),r=t.configuration.layout.isOnePage.value,o=n.hasFlagEnabled(xC),i=t.extensibility.ui.hasAtRiskPlacement;return w(()=>{if(r||o&&!i.value)return!1;const a=e.value.enabledDeliveryMethods.includes("PICK_UP");return!t.isShippingRequired.value||!a})}function PY(e){return!!e.value?.method.walletContent?.isVenmo}const SY=()=>{const{paymentLines:e}=ie();return w(()=>Pt(e.value,"PAYPAL_EXPRESS"))},EY=()=>{const{paymentLines:e}=ie();return w(()=>{const t=Pt(e.value,"PAYPAL_EXPRESS");return!!(t&&bc(t))})},CY=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=We(),{progressing:t}=Lt(),n=b_();return w(()=>!!(n.value&&(e.value.status==="loading"||t.value)))},kY=()=>{const e=b_(),t=Pc(),n=LC(),r=ri();return w(()=>!n.value&&(t.value||r.value&&r.value.amount<=0)?!1:!!e.value)},b_=()=>{const{paymentLines:e}=ie();return w(()=>{const t=Pt(e.value,"PAYPAL_EXPRESS");return!!(t&&!bc(t))})};function YO(e){const{parts:t}=Xe(),{paymentMethods:n}=q();ze(()=>{if(e.peek().status==="connected")return;const r=v_({paymentLines:t.paymentLines.value,paymentMethods:n.value});r.status==="connected"&&(e.value=r)})}const am=new Map,Xa=new Map,lm=new Map,jO=6e4;function KO(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:o}}=b(),i=q().paymentMethods,a=!!n?.isFlagshipPartner&&!Jf(n?.embedder),l=i.value?.find(m=>m.type==="wallet"&&m.name==="SHOP_PAY"),u=l?.placements?.includes("ACCELERATED_CHECKOUT")?l?.eligibilityToken:void 0,d=t.services.shopServer.url,p=e.buttonStatus;F(()=>{if(!a){p.value={status:"rendered"};return}if(!u){p.value={status:"not_eligible"};return}const f=`${d}|${o||u}`,h=am.get(f);if(h){p.value=h;return}const g=lm.get(d)??0;if(Date.now()<g){p.value={status:"error"};return}let y=!1;async function _(){try{const v=await fetch(`${d}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:u})});if(!v.ok)return v.status===429&&lm.set(d,Date.now()+jO),r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:`http_${v.status}`}}),{status:{status:"error"},definitive:!1};let E;try{E=await v.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 C=E.eligible===!0||E.eligible===!1,I=E.eligible===!1||!C?{status:"not_eligible"}:{status:"rendered"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:I.status,...!C&&{reason:"malformed_payload_fail_closed"}}}),{status:I,definitive:C}}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:"network_error"}}),{status:{status:"error"},definitive:!1}}}let P=Xa.get(f);return P||(P=_().then(({status:v,definitive:E})=>(E&&am.set(f,v),Xa.delete(f),v)),Xa.set(f,P)),P.then(v=>{y||(p.value=v)}).catch(()=>{}),()=>{y=!0}},[a,u,o,d,p,r])}function JO(e){const t=ie().paymentLines;return w(()=>{const n=e.lastClicked.value;return!!Pt(t.value,"PAYPAL_EXPRESS")||n==="PAYPAL_EXPRESS"})}function XO(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=b(),o=n.escalatedWallet.value;F(()=>
23{if(t.email.value)return;const i=e.fields.paymentLines.value?.lines??[];let a;switch(o){case Te.AmazonPay:case Te.BuyWithPrime:a=QO(i,o);break;case"PAYPAL_EXPRESS":case"VENMO":a=ZO(i);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:o,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:o,paymentLines:i,status:"failure"})},[])}function QO(e,t){const n=BC(e,t);return n?n.method.walletParams?.email:void 0}function ZO(e){const t=Pt(e,"PAYPAL_EXPRESS");if(!(!t||!t.method.walletContent))return t.method.walletContent.email}function eF(e){const{observability:t,router:n}=b(),r=n.currentUrl.value,[o,i]=oe(r.normalizedPath);r.normalizedPath!==o&&(i(r.normalizedPath),e.forEach(({walletName:a,...l})=>{("signal"in l?[l.signal]:l.signals).forEach(c=>{if(c.peek().status!=="error")return;t.counter({name:"wallet_button_status_reset",value:1,attributes:{walletName:a}});const d={status:"not_rendered"};c.value=d})}))}class tF extends Pn{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function nF({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:o,isABTestActive:i}){return e?!1:t||n&&r?!0:o==="storefront_redirect"&&(n||!i)}function rF({children:e}){const{checkout:t,observability:n,router:r,i18n:o,shop:i,source:a}=b(),l=r.currentUrl.value,c=t.configuration.layout.isOnePage.value,u=i.hasFlagEnabled(Tn),d=gi(),{forceOnePageCheckoutLayout:p}=yi(Tn),m=we(l.searchParams.has(_s)&&!t.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:f}=ie(),h=th(a),g=Ri(hn.PayPal,{scope:h}),y=Ri(hn.GooglePay,{scope:h}),_=Ri(hn.AmazonPay,{scope:h}),P=Ri(hn.ApplePay,{scope:h}),v=JO(t.wallets),E=we(void 0),C=Tr({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),S=Tr({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:v_({paymentLines:t.proposal.proposed.paymentLines.peek(),paymentMethods:t.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),I=Tr({buttonStatus:{status:"not_rendered"}}),k=Tr({buttonStatus:{status:"not_rendered"}}),T=Oy(),A=jf(),L=Tr({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:m.value&&Go({applePaySubscriptionsDecelerationActive:d,applePayThreePageVaultedReviewEnabled:u,isOnePageCheckout:c})&&VC({isApplePaySubscriptionsDecelerationActive:d,isApplePaySubscriptionReviewLayoutSupported:c||i.hasFlagEnabled(Tn),hasSubscriptionReviewQueryParam:m.value,isABTestActive:i.hasFlagEnabled(Ho),variant:T,isCaliforniaBillingOrShippingAddress:A.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}),M=we(void 0),N=Tr({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}),O=we(!1),D=we(void 0),{queryParam:B}=qy({applePayPaymentSheetError:L.paymentSheetError,applePaySubscriptionReviewTransition:L.subscriptionReviewTransition}),z=UO(L.asPaymentMethod).value,x=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");YO(S.accountStatus),KO(k),XO();const W=Wy(k),X=Ky({inMemoryGooglePayParts:C,inMemoryPayPalParts:S,inMemoryVenmoParts:I,inMemoryApplePayParts:L,inMemoryAmazonPayParts:N,didIncrementUnusablePartialAddressMetric:O}),Z=V(()=>X?.filter(({placements:K,name:te})=>(te==="APPLE_PAY"||te==="GOOGLE_PAY")&&B==="localization_extension_field_error"||te==="APPLE_PAY"&&x&&!z?!1:Gy(te,K,W)),[X,B,x,z,W]),ce=Je(Z);F(()=>{Z?.length&&performance.mark(UC)},[]);const j=Z?.map(K=>K.name)||[],Q=j.join(",");F(()=>{new Set(j).size!==j.length&&n.error(new tF("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(j.filter((te,pe)=>j.indexOf(te)!==pe))],allWalletNames:j}}))},[Q,n]);const H=Z?.length||0,J=t.wallets.activeSession.value?.wallet!==void 0&&t.wallets.activeSession.value.wallet!=="APPLE_PAY"&&!!t.wallets.isDeceleratingSignal?.value,he=L.subscriptionReviewTransition.value,
23ne=w(()=>Sc({checkout:t})),ae=ne.value&&zC(T),ue=nF({asPaymentMethod:L.asPaymentMethod.value,useConsentCopy:ae,isCaliforniaBillingOrShippingAddress:A.value,hasSubscription:ne.value,transition:he,isABTestActive:i.hasFlagEnabled(Ho)}),Ae=he!==void 0&&!J&&ue&&Go({applePaySubscriptionsDecelerationActive:d,applePayThreePageVaultedReviewEnabled:u,isOnePageCheckout:c}),me=t.wallets.hasActiveApplePaySubscriptionReview.value&&ue&&!A.value&&he===void 0;F(()=>{ue||(t.wallets.setHasActiveApplePaySubscriptionReview(!1),he!==void 0&&(L.subscriptionReviewTransition.value=void 0,J||t.wallets.setIsDecelerating(!1)))},[he,t.wallets,L.subscriptionReviewTransition,J,ue]),F(()=>{he!=="storefront_redirect"||!Ae||c||p({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[he,p,c,Ae]);const Ee=i.hasFlagEnabled(hs)&&!c&&l.searchParams.has(HC);F(()=>{Ee&&(t.unstable_forceCheckoutLayoutToOnePage(),Uy(n,{wallet:"GOOGLE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),xt({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}))},[t,o,n,Ee]);const Ue=R(()=>{m.value=!1,L.subscriptionReviewTransition.value=void 0},[m,L.subscriptionReviewTransition]);eF([{walletName:"applepay",signal:L.buttonStatus},{walletName:"amazonpay",signal:N.buttonStatus},{walletName:"buy_with_prime",signal:N.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:C.buttonStatus},{walletName:"paypal",signals:[S.acceleratedCheckoutButtonStatus,S.payWithPayPalButtonStatus]}]),ze(()=>{const K=f.value,te=t.wallets.activeSession.value;te?.wallet==="APPLE_PAY"&&n.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:K?.countryCode,isPostalCodePadded:Kf(K?.postalCode,K?.countryCode),asPaymentMethod:te.asPaymentMethod})});const Ce=V(()=>({availableWallets:X,walletUsedForSubmissionSignal:E,persistedPayPalSignal:g,inMemoryPayPalParts:S,inMemoryVenmoParts:I,persistedGooglePaySignal:y,inMemoryGooglePayParts:C,inMemoryApplePayParts:L,applePaySessionHandler:M,persistedApplePaySignal:P,persistedAmazonSignal:_,inMemoryAmazonPayParts:N,inMemoryShopPayParts:k,didIncrementUnusablePartialAddressMetric:O,acceleratedWalletPaymentMethods:ce,isInPayPalContextSignal:v,buttonCount:H,receiptErrorSignal:D}),[X,g,y,P,_,ce,H,I,E,C,S,L,M,N,k,D,v,O]);return s(qC.Provider,{value:Ce,children:[Ae&&s(BO,{onTransitionComplete:Ue,useConsentCopy:ae}),s("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:bt({screenReaders:"only"}),children:me?o.translate("wallets.errors.subscription_review_required"):""}),e]})}const oF=Qn(function({children:t,AlternativeProposal:n}){const{embed:r}=b(),o=R(i=>r?.client?.showToast(i)??!1,[r]);return s(QD,{children:s(XD,{children:s(iF,{AlternativeProposal:n,children:[s(JL,{handleToast:o,children:t}),s(CT,{})]})})})});function iF({children:e,AlternativeProposal:t}){const{shop:n,checkout:r}=b(),o=r.unstable_graphqlDataRequestInfo?.httpRequestInfo,i=V(()=>{const{country:c,zone:u,coordinates:d}=o?.geolocation??{};return o?{geolocation:{default:c??void 0,country:c??n.country,zone:u??void 0,coordinates:d?{longitude:d.longitude,latitude:d.latitude}:void 0},shop:{}}:void 0},[o,n]),a=typeof window>"u"?null:s(G,{children:[s(BD,{}),s(bR,{}),s(yD,{}),s(qD,{}),s(jD,{})]}),l=t??$1;return s(Sy.Provider,{value:i,children:s(Z1,{children:s(PO,{children:s(eM,{children:s(GC,{children:s(l,{children:s(AD,{children:s(rF,{children:s(gD,{children:s(CO,{children:s(_y,{children:s(aM,{children:s(h0,{children:s(X1,{children:s(Q0,{children:s(OD,{children:s(c1,{children:s(tM,{children:s(d1,{children:s(dO,{children:[s(Zx,{}),s(sF,{}),s(wD,{}),s(TO,{}),e,a]})})})})})})})})})})})})})})})})})})})})}function sF(){const e=U(!1),t=b(),{embed:n,webMcp:r}=t,o=Ht(Mc),i=Xe(),{resetAddressErrors:a}=hu(i.context.deliveryMethodsAddressErrors),l=U({journeyProgression:o,negotiator:i,clearShippingAddressErrors:a});if(l.current={journeyProgression:o,negotiator:i,clearShippingAddressErrors:a},!e.current){e.current=!0;const c={get completing(){return l.current.journeyProgression.completing},get progressing(){return l.current.journeyProgression.progressing},detour:(...d)=>l.current.journeyProgression.detour(...d),progress:(...d)=>l.current.journeyProgression.progress(...d),prefetch:()=>l.current.journeyProgression.prefetch(),negotiate:d=>l.current.journeyProgression.negotiate(d)},u=()=>l.current.negotiator.waitForPendingNegotiations();n?.unstable_providePreactContext({journey:c,waitForPendingNegotiations:u,waitForSkeletonRemoved:()=>Yh(),negotiationContext:i.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>lt(()=>Be(()=>import("./865e4eaf.CfQbwcuR.js"),__vite__mapDeps([75,2,1,3,4,5,76,6,49,77,78,79,80,9,81,62,59,60,61,82,83,84,43,44,45,7,8]))).then(({createPickupLocalityServices:d})=>d(t)),journey:c,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:u})}return null}const aF=He({displayName:"DevTools",load:()=>Be(()=>import("./bad03769.DppnRrc6.js"),__vite__mapDeps([85,1,2,3,4,5,9,6,7,8,86])),suspense:!0}),lF=He({displayName:"EditorBridge",suspense:!1,load:()=>Be(()=>import("./abd080c1.C757hPxu.js"),__vite__mapDeps([87,2,1,3,4,5,6,7,8,9]))});function cF(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}function uF(e){const{observability:t}=b();F(()=>{e&&cF(t,e)},[e,t])}const dF=He({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:uF,load:()=>lt(()=>Be(async()=>{const{deferredPrivacyComponents:e}=await import("./2acfb1ce.CJPmB0XI.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([88,1,2,3,4,5,36,37,6,7,8,9])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))});function pF(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}function mF(e){const{observability:t}=b();F(()=>{e&&pF(t,e)},[e,t])}
23const fF=He({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:mF,load:()=>lt(()=>Be(async()=>{const{deferredPrivacyComponents:e}=await import("./2acfb1ce.CJPmB0XI.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([88,1,2,3,4,5,36,37,6,7,8,9])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});async function hF(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:o}=n,i={},a=WC(e.searchParams);if((!o||a)&&t.type!=="simulated"&&t.checkoutSessionIdentifier!==null&&e.searchParams.has(_h)&&(i.disable_automatic_redirect=t.checkoutSessionIdentifier),r&&e.searchParams.get("auto_redirect")==="false"&&(i.block_universal_redirect=!0),Object.keys(i).length>0){const l={...i,checkout_version:"c1",edge_redirect:e.searchParams.get("edge_redirect")==="true"};fetch("/shopify_pay/accelerated_checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l),credentials:"include"})}}function gF({children:e}){return s(G,{children:e})}function yF({children:e}){const t=V(()=>new URL(window.location.href),[]),{client:n,source:r}=b(),o=n.unstable_getSerialization("shopPayConfig");return F(()=>{o&&hF(t,r,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,r,o]),s(G,{children:e})}function vF({children:e}){return typeof window>"u"?s(gF,{children:e}):s(yF,{children:e})}function _F({children:e,context:t,...n}){const r=typeof window>"u",o=wt();return s(YC.Provider,{value:t,children:s(cu,{target:"cart",children:s(vF,{children:s(sS,{router:t.router,children:s(oF,{...n,children:s($C,{children:[s(Sx,{children:e}),s(Ix,{}),!r&&s(Ex,{}),s(ve,{when:o,children:[s(fF,{}),s(dF,{})]}),s(bF,{}),pc()&&s(lF,{})]})})})})})})}function bF(){const e=wt();return Er(),s(ve,{when:()=>e.value&&!1,children:s(aF,{})})}function PF(){const{shop:e,checkout:t}=b(),n=gi(),r=e.hasFlagEnabled(Tn),{inMemoryApplePayParts:{subscriptionReviewTransition:o}}=We();return w(()=>o.value!==void 0&&Go({applePaySubscriptionsDecelerationActive:n,applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:t.configuration.layout.isOnePage.value}))}function SF(){const{checkout:{wallets:e}}=b(),t=PF();return w(()=>{const n=e.activeSession.value?.wallet!==void 0&&e.activeSession.value.wallet!=="APPLE_PAY"&&!!e.isDeceleratingSignal?.value;return t.value&&!n})}function St(e){return[e].flat(99).filter(Boolean).length>0}var wr={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 Jr({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:o="separator",alignment:i="center",children:a}){const l=St(a);return s("div",{role:l?void 0:o,className:Y(wr.Divider,wr.directionVariant[r],l&&wr.alignmentVariant[i],wr.borderWidthVariant[n],wr.styleVariant[t]),id:e,children:l&&s("div",{className:Y(wr.contentAlignmentVariant[i]),children:[a,o==="separator"&&s("span",{role:"separator"})]})})}function P_({children:e,condition:t}){return t?s("picture",{children:e}):s(G,{children:e})}const EF=new Map(jC({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function CF(e){return Ps(e)?{base:[{source:e.default}],...e.conditionals.reduce((t,n)=>{const r=n.conditions.viewportInlineSize===void 0?"base":n.conditions.viewportInlineSize.min,o=n.conditions.resolution===void 0?[{source:n.value}]:[{source:n.value,resolution:n.conditions.resolution}],i=r in t?t[r]??[]:[];return{...t,[r]:[...i,...o]}},{})}:{base:[{source:e}]}}function S_(e,t){if(!(e||!t||!Ps(t)))return Object.entries(CF(t)).sort(([n],[r])=>{const o=Uo[n],i=Uo[r];return o!=null&&i!=null?i-o:0}).map(([n,r])=>{const o=EF.get(n);if(o!==void 0&&Array.isArray(r)){const i=r.map(({source:a,resolution:l})=>[a,l&&`${l}x`].join(" ").trim()).join(", ");return fs("source",{key:o,media:o,srcSet:i})}}
23).filter(Boolean)}function E_(e){if(e)return Ps(e)?typeof e.default=="string"?e.default:void 0:e}var C_={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},kF=1,vt={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 Qs({alt:e="",depth:t,size:n,sizes:r,source:o,src:i,srcSet:a,totalItems:l,overlay:c}){const{merchandiseThumbnail:{background:u="subdued",border:d="full",fit:p="contain",borderWidth:m,borderColor:f="base",shadow:h,badge:{background:g}={}}={}}=ct(),y=k_(n),_=!g||g==="base"?"auto":"accent",P=S_(i,TF(o)),v=h??"extraSmall",E=AF(m)??I_(y),{className:C}=At({boxShadow:v}),{className:S}=At({objectFit:p,borderWidth:E});return s("div",{className:Y(vt.ProductThumbnail,vt.thumbnailBackgroundVariant[u],vt.productThumbnailSizeVariant[y],C,v!=="none"&&vt.boxShadowMargin,t!=null&&vt.depthVariant[t],vt.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||A_(o)?s(P_,{condition:!!P,children:[P,s("img",{src:i??E_(o),srcSet:a,sizes:r,alt:e,loading:"eager",className:Y(vt.ProductThumbnailImage,vt.borderVariant[d],vt.borderColorVariant[f],S)})]}):s("div",{className:Y(vt.Placeholder,vt.borderVariant[d],vt.borderColorVariant[f],S),children:s(Le,{type:"image",size:IF(y)})}),c!==void 0&&s("div",{className:Y(vt.Overlay,vt.borderVariant[d],vt.borderColorVariant[f]),children:s("strong",{children:c})}),l===void 0?null:s(wF,{size:y,tone:_,children:l})]})}function k_(e){if(typeof e!="string")return"base";const t=e.replace("-100","");return t in C_?t:"base"}function I_(e){return e.startsWith("small")?"base":"large"}function IF(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function AF(e){switch(e){case"none":return"none";case"base":return"base";case"large":case"large100":return"large";case"large200":return"large-200";default:return}}function A_(e){return typeof e=="string"||Ps(e)}function TF(e){return A_(e)?e:void 0}function Pi(e){const{boxSize:t}=C_[k_(e)];return{blockSize:t,inlineSize:t}}function wF({children:e,size:t,tone:n}){const r=un(),o=n==="accent"?n:"auto",{className:i}=At({borderWidth:I_(t)});return s("div",{className:vt.BadgeWrapper,children:s("div",{className:Y(vt.Badge,vt.badgeSizeVariant[t.startsWith("small")?"small":"base"],vt.badgeToneVariant[o
23],i),children:[s("span",{className:vt.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}function LF(e){let t=0,n=!0;const r=new Set;return function(){const[i,a]=oe(()=>{if(t===0)return 0;const P=performance.now()-t;return P<e?e-P:0}),[l,c]=oe(!0),u=U(),[d,p]=oe(!1),m=R(()=>{for(const _ of r)_(!1)},[]),f=R(()=>{for(const _ of r)_(!0)},[]),h=R(()=>{m(),p(!0)},[m]);F(()=>{d&&f()},[d,f]);const g=R(_=>{r.add(c);const P=_.timeStamp-t;a(P)},[]),y=R(_=>{t=_.timeStamp,r.add(c),n&&(n=!1,u.current=setTimeout(h,e))},[h]);return F(()=>(r.add(c),()=>{r.delete(c),u.current&&clearTimeout(u.current)}),[]),{animationEnabled:l,delay:i,onAnimationStart:g,onAnimationIteration:y}}}const Tu=4e3,T_=LF(Tu);var Hn={Skeleton:"_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r",Wrapper:"_1sg44lma _1sg44lm9 _1fragemvo",animation:"_1sg44lm6",inline:"_1sg44lm7",hidden:"_1sg44lm8",vars:{animationDelay:"var(--_1sg44lm0)",animationDuration:"var(--_1sg44lm1)",aspectRatio:"var(--_1sg44lm2)"}};const xF=100;function Xo({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:o,id:i,delay:a=!0}){const l=e==="inline"?"span":"div",{className:c,style:u}=At({blockSize:r,inlineSize:n},{transforms:{inlineSize:y=>Wo(y,{fitContent:!0,auto:!0})}}),[d,p]=oe(a);F(()=>{const y=setTimeout(()=>p(!1),xF);return()=>{clearTimeout(y)}},[]);const{animationEnabled:m,delay:f,onAnimationStart:h,onAnimationIteration:g}=T_();return s(l,{className:Y(Hn.Skeleton,e==="inline"&&Hn.inline,d&&Hn.hidden,m&&Hn.animation,c),style:{..._n({[Hn.vars.aspectRatio]:t?.toString()??"",[Hn.vars.animationDelay]:`${f}ms`,[Hn.vars.animationDuration]:`${Tu}ms`}),...u},"aria-hidden":"true",onAnimationStart:h,onAnimationIteration:g,id:i,children:s(l,{className:Y(Hn.Wrapper,c),style:u,children:o})})}const RF=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function wu({children:e,delay:t,inlineSize:n,id:r,...o}){return s($,{...o,children:s(Xo,{delay:t,inlineSize:RF.get(n??"small"),id:r,children:e})})}const MF=1,Qa=300;function NF(e,t,n){const r=n??MF;let o,i;return e?(o=e,i=e/r):t&&(o=t,i=t/r),n!==void 0&&o!==void 0&&i!==void 0&&i>Qa&&(o*=Qa/i,i=Qa),{width:o,height:i}}const DF="gP50U",OF={Logo:DF};function w_({width:e}){const{header:{logo:t}}=Fe(),{shop:n}=b(),{width:r,height:o}=NF(t?.maxWidth,e,t?.aspectRatio);return s("img",{alt:t?.altText||n.name,className:OF.Logo,src:t?.image,width:r,height:o})}const Qo=Ge(void 0);function $i({children:e,style:t,insetsRows:n}){const{rendered:r,rowsInset:o}=Pe(Qo)??{},i=V(()=>({pending:t,pendingInsetsRows:n,rendered:r,rowsInset:o}),[t,n,r,o]);return s(Qo.Provider,{value:i,children:e})}function L_({children:e,rowsInset:t}){const{pending:n}=Pe(Qo)??{},r=V(()=>({pending:void 0,rendered:n,rowsInset:t}),[n,t]);return s(Qo.Provider,{value:r,children:e})}function Lu(){return Pe(Qo)??{}}function FF(){return KC(Lu().pending??{})}const BF="INFORMATION1",VF="ORDER_STATUS1";function xu(){return Pe(Jy)}function IY({currentDetour:e}){return e?.type==="thankYou"?VF:BF}function UF({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:o,sourceType:i}){const a=e&&kA(e,t),l=e&&s1(),c=r&&IA(r),u=r&&l1(r),d=r?.type==="thankYou",p=c??a??new Set,m=u??l??new Set;return h=>{const{id:g,extensionPoint:y,placementReference:_}=h;if(n.has(g)||!JC(h,{sourceType:i,isThankYou:d}))return!1;const P=XC(y.target);return!(P==null||(e||r)&&!p.has(P)||Ss(P)&&(!_||!o.supported.has(_)||(e||r)&&!m.has(_)))}}function AY(e,t,n,r,o){return e==null?()=>!1:QC(qo(e.features,t),n,r,o)}const x_=Ge([]),zF=Ge({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),R_=Ge(null);function HF(){const{deactivatedExtensionIds:e}=qF(),{currentPage:t,currentDetour:n}=Se().value,{source:r}=b(),o=xu(),i=Xe();return UF({page:t,negotiatedState:i.current.peek(),deactivatedExtensionIds:e,detour:n,placementReferences:o,sourceType:r.type})}function M_(e,t,...[n]){const{checkout:{extensibility:r}}=b(),o=HF(),i=Pe(R_),a=xu();return V(()=>{const l=Ss(t)&&n?{target:t,placements:a,placementReference:n}:{target:t};return e.filter(c=>i===null||i.has(ys(c.extensionPoint.target))).filter(c=>r.ui.unstable_isTargetMatch(c,l)).filter(o)},[o,i,e,t,n,a,r])}function it(e,...[t]){const{checkout:{extensibility:n},shop:r}=b(),o=r.hasFlagEnabled(ZC),i=xu(),a=U([]),l=Pe(x_),c=n.ui.search().value,u=M_([...c,...l],e,t),p=V(()=>
23{if(o)return n.customFields.search(Ss(e)&&t?{target:e,placements:i,placementReference:t}:{target:e})},[n,o,e,t,i])?.value,m=V(()=>(p??[]).map(h=>Il("customField",h)),[p]),f=V(()=>ek([...u.map(h=>Il("uiExtension",h)),...m]),[u,m]);return n.ui.enabled.value?f.length>0?f:a.current:m.length>0?m:a.current}function TY(e,t){const n=WF();return R(r=>{if(!e.length)return Promise.resolve(void 0);const o=n.get(e[0],t);return Promise.resolve(o.run(r))},[n,e,t])}function wY(e,t){const{checkout:{extensibility:n}}=b(),r=U([]),o=Pe(x_),i=M_([...t,...o],e),a=V(()=>i.map(l=>Il("uiExtension",l)),[i]);return n.ui.required.value&&!n.ui.enabled.value?r.current:a}function qF(){return Pe(zF)}const GF=Ge({get:()=>{},findAll:()=>[],blockingExtensions:kt(()=>[])});function WF(){return Pe(GF)}function $F({visibleTargets:e,children:t}){const n=V(()=>new Set(e),[e]);return s(R_.Provider,{value:n,children:t})}function cm(e){return Array.from(e.labels||[]).map(t=>t.textContent).join("")}function To(e){return e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")?e.checked.toString():e.value}function YF(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 N_={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},jF=Object.keys(N_),D_=Ge(null);function fo(){const e=Pe(D_);return R(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 Si({section:e,children:t}){if(typeof window>"u")return s("div",{children:t});const n=xn(),r=U(null),o=V(()=>new WeakMap,[]),i=U(null);function a(d){const p=d.target.closest("a, button, input, select");if(!p||i.current===p)return;i.current=p;const{element:m,shouldCaptureEvent:f}=Di(p,e,o);f&&n("dom_input_focused",{element:m,timestamp:new Date})}uy(r,d=>a({target:d}));function l(d){const p=d.target.closest("a, button, input, select");if(!p)return;i.current===p&&(i.current=null);const{element:m,shouldCaptureEvent:f}=Di(p,e,o);f&&n("dom_input_blurred",{element:m,timestamp:new Date})}function c(d){const p=d.target;if(!(p instanceof Element))return;const m=p.closest("a, button"),f=p.closest("input, select"),h=m??f;if(!h&&!(p instanceof HTMLElement))return;const{element:g,shouldCaptureEvent:y}=Di(h??p,e,o);y&&n("dom_clicked",{element:g,...N_,...Vf(d.nativeEvent,jF),timestamp:new Date})}function u(d){const p=d.target?.closest("a, button, input, select");if(!p)return;const{element:m,shouldCaptureEvent:f}=Di(p,e,o);f&&n("dom_input_changed",{element:m,timestamp:new Date})}return s(D_.Provider,{value:o,children:s("div",{ref:r,onFocusCapture:a,onBlurCapture:l,onClickCapture:c,onChangeCapture:u,children:t})})}function Di(e,t,n){const r=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement;let o=null;o=r?e.type:null;let i=`${t}_`,a=null,l=null;r&&"href"in e&&(l=e.href);let c=!0;if(e instanceof HTMLInputElement&&e.type==="radio")i+=e.name.replace(/[A-Z]/g,(d,p)=>`${p===0?"":"_"}${d.toLowerCase()}`),a=e.id.split("-").slice(-1)[0].toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)i+=e.name.replace(/[A-Z]/g,(u,d)=>`${d===0?"":"_"}${u.toLowerCase()}`),a=To(e);else{const u=O_(e,n);u?i+=u:c=!1}return i=i.replace(/-/g,"_"),{element:{id:i,tagName:e.tagName,type:o,value:a,...l&&{href:l},name:null},shouldCaptureEvent:c}}function O_(e,t){if(!(e===null||t===null))return t.has(e)?t.get(e):O_(e.parentElement,t)}function Zs({section:e,children:t}){if(typeof window>"u")return s("div",{children:t});const{checkout:{identity:n},router:r,shopPay:o}=b(),i=r.currentUrl.value,{currentFocus:a}=Se().value,l=xn(),c=fy(),u=tx(),d=U(null),p=U(new WeakMap),m=uc(i,{isShopPayActive:n.current.value==="shopPay",shopPay:o});function f(v){const{name:E,tagName:C,type:S}=v,I=cm(v);l("change",{element:{...I&&{label:I},...E&&{name:E},tagName:C,type:S,value:To(v)},section:e,timestamp:new Date})}function h(v,{recoveredAutofocus:E=!1}={}){const C=a.peek();a.value=e,!E&&(v.target instanceof HTMLInputElement||v.target instanceof HTMLSelectElement)&&p.current.set(v.target,To(v.target)),!E&&v.target instanceof HTMLInputElement&&v.target.name!=="email"&&u(m),C!==e&&(l("sectionInteraction",{section:e,timestamp:new Date}),c({type:"section_interaction",section:e}))}uy(d,v=>h({target:v},{recoveredAutofocus:!0}));function g(v){if(v.target instanceof HTMLInputElement||v.target instanceof HTMLSelectElement){const E=p.current.get(v.target),C=To(v.target);p.current.delete(v.target),u(m),E!==C&&f(v.target)}}function y(v){if(!(v.target instanceof Element))return;const E=v.target.closest("a, button"),C=v.target.closest("input, select");if((E??C)&&E){const{tagName:I,textContent:k,id:T}=E,A=(k??"").trim(),L=E.dataset.eventName||A||T;u(m),l("click",{element:{tagName:I,textContent:L??void 0},section:e,timestamp:new Date})}}function _(v){v.target instanceof HTMLInputElement&&u(m)}function P(v){if(v.target instanceof HTMLInputElement||v.target instanceof HTMLSelectElement){const{id:E,name:C,tagName:S,type:I}=v.target;let k=cm(v.target);k.length===0&&(k=E);const T=YF(v);T&&l("autofill",{source:T,element:{...k&&{label:k},...C&&{name:C},tagName:S,type:I,value:To(v.target)},timestamp:new Date,section:e})}}return s("div",{ref:d,onFocusCapture:h,onBlurCapture:g,onClickCapture:y,onKeyUpCapture:_,onCh
23angeCapture:P,children:t})}function KF(){const{client:e}=b(),n=e.unstable_getSerialization("experiments")?.find(r=>r.clientHandle===aA)?.variant;return Object.values(Sh).find(r=>r===n)}function F_(e,t){const n=b().checkout.configuration.layout.isOnePage.value,r=it("Checkout::Dynamic::Render","ORDER_SUMMARY1"),o=it("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=it("Checkout::Dynamic::Render","ORDER_SUMMARY3"),a=it("Checkout::Dynamic::Render","ORDER_SUMMARY4"),l=it("Checkout::CartLines::RenderAfter"),c=it("Checkout::CartLineDetails::RenderAfter"),u=it("Checkout::Reductions::RenderBefore"),d=it("Checkout::Reductions::RenderAfter");return n?e==="bottom"?t?.hideMerchandiseLines?[...i]:[...r,...o,...i,...c,...l]:[...c]:[...r,...o,...i,...a,...c,...l,...u,...d]}const B_="checkout-main",LY="checkout-main-header",xY="checkout-pay-button",RY="checkout-review-heading",V_=mt("OrderSummaryContext");function U_(){return Ht(V_)}const Ru=({children:e})=>{const t=we(!1),n=R(o=>{t.value=o},[t]),r=V(()=>({open:t,setOpen:n}),[t,n]);return s(V_.Provider,{value:r,children:e})};function Mu(){const{checkout:e,router:t}=b();return w(()=>e.thankYouEntrance.isRevealing.value&&t.currentUrlMatches("/thank-you"))}function JF(){const{checkout:e,client:t,router:n}=b(),r=Us(),o=Er(),i=Xh(t.initialRequest.url.pathname).endsWith("/thank-you"),a=r&&!o&&!i;return w(()=>a&&e.thankYouEntrance.phase.value!=="settled"&&n.currentUrlMatches("/thank-you"))}const XF="cm5pp",QF="gdtca",ZF="djSdi",eB="NGRNe",tB="_1Eo4p",nB="_5gERx",rB="mpQwN",oB="gYnYi",iB="uB1DX",sB="Lhk39",aB="GxFSO",lB="eqp7i",cB="EAjaz",uB="i8Dpn",dB="lX75M",pB="_0DLUq",mB="nMPKH",fB="WtpiW",hB="ks0CH",gB="GRdxR",yB="Sxi8I",vB="_9F1Rf",_B="i4DWM",bB="_4QenE",PB="QiTI2",fe={Shell:XF,"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:QF,MainContentPrimary:ZF,Footer:eB,"Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:tB,Announcement:nB,"Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:rB,AnnouncementContent:oB,"Announcement-expanded":"yJIUK",AnnouncementActionButtons:iB,AnnouncementExpandCollapseButton:sB,AnnouncementCloseButton:aB,AnnouncementOverlay:lB,"Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:cB,"Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:uB,"Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-exiting":"aLUb3","Header-thankYouCovered":"Gm2ml","Header-hasBackgroundImage":"zKcpW",BuyerJourney:dB,BuyerJourneyContent:pB,"BuyerJourney-containerContent":"hKv1l",Disclosure:mB,DisclosureButton:fB,DisclosureDetails:hB,DisclosureDetailsContent:gB,"Disclosure-divided":"iYA3J",Content:yB,"Content-containerContent":"vzM2m",Main:vB,"Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:_B,OrderSummaryContent:bB,"OrderSummary-inlineSizeFill":"LEmIb",FooterContent:PB,"Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},SB=1e3,um="announcement_box",Za="announcement_content",EB="announcement_action_expand_collapse_buttons";function CB({children:e,onClose:t,onAfterCollapse:n,onAfterExpand:r,onExpand:o,onCollapse:i,open:a=!1,expanded:l=!1}){const{i18n:c}=b(),[u,d]=oe(!1),p=U(null),m=U(null),f=on(l,"base"),h=on(a,"base");F(()=>{if(typeof window>"u"||!window.ResizeObserver||!window.MutationObserver)return;const S=m.current;if(!S)return;const I=()=>{l||f!=="exited"||d(S.scrollHeight>S.clientHeight)};I();const k=tk(I,200),T=new ResizeObserver(k);T.observe(S);const A=new MutationObserver(k);return A.observe(S,{childList:!0,subtree:!0,characterData:!0}
23),()=>{T.disconnect(),A.disconnect()}},[e,l,a,f]);const g=R(()=>{l?i?.():o?.()},[l,i,o]);F(()=>{f==="entered"?r?.():f==="exited"&&n?.()},[r,n,f]);const y=z_(),{environment:{isCheckoutEditor:_},announcement:{colorScheme:P}}=Fe(),v=y[0],E=_?v?.publicIdentifier:void 0,C=_&&y.length>0;return St(e)?s("section",{id:um,className:Y(fe.Announcement,a&&fe["Announcement-opened"],u&&fe["Announcement-hasOverflow"],l&&fe["Announcement-expanded"],fe[$t("Announcement-expandedTransition",f)],fe[$t("Announcement-openTransition",h)],C&&fe["Announcement-hasActiveInspector"]),ref:p,children:s("div",{className:Y(fe.AnnouncementContainer,bt({colorLayer:"base",colorScheme:P,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!l&&s("button",{className:fe.AnnouncementOverlay,onClick:S=>{S.preventDefault(),S.stopPropagation(),o?.()},"aria-label":c.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":Za,type:"button"}),s("div",{className:fe.AnnouncementActionButtons,children:[s("button",{id:EB,className:fe.AnnouncementExpandCollapseButton,onClick:g,"aria-label":l?c.translate("thank_you.announcement.collapse"):c.translate("thank_you.announcement.expand"),"aria-expanded":l,"aria-controls":Za,type:"button",children:s(Le,{type:l?"chevron-up":"chevron-down",size:"base"})}),s("button",{className:fe.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":um,"aria-expanded":a,"aria-label":c.translate("thank_you.announcement.close"),type:"button",children:s(Le,{type:"x",size:"base"})})]}),s("div",{id:Za,className:fe.AnnouncementContent,ref:m,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function kB(){const e=Fe(),t=bu(),n=mv(),r=AB(),[o,i]=oe(!1),[a,l]=oe(!1),c=R(({source:f}={})=>{const{announcement:h}=t.configuration;h.visibility==="dismissed"||h.visibility==="hidden"||(r(f==="host"?"announcementDismissedFromHost":"announcementDismissedFromExtension"),n.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))},[t,n,r]),u=R(()=>{n.emit("announcementAfterCollapsed")},[n]),d=R(()=>{n.emit("announcementAfterExpanded")},[n]),p=R(()=>{i(!0),r("announcementExpanded"),n.emit("announcementExpanded")},[r,n]),m=R(()=>{i(!1),r("announcementCollapsed"),n.emit("announcementCollapsed")},[r,n]);return F(()=>(n.on("closeAnnouncement",c),()=>{n.off("closeAnnouncement",c)}),[c,n]),F(()=>{if(e.announcement.visibility!=="visible"){l(!1);return}const f=setTimeout(()=>{l(!0)},SB);return()=>clearTimeout(f)},[e.announcement.visibility]),{open:a,expanded:o,onAfterCollapse:u,onAfterExpand:d,onClose:c,onExpand:p,onCollapse:m}}function dm(){}function z_(){const{environment:{hasTYPAnnouncementExtensions:e}}=Fe();return IB(e)()}function IB(e){return e!==void 0?()=>[]:()=>{const n=it("purchase.thank-you.announcement.render");return Eh(n,"uiExtension").map(Al)}}function AB(){const{environment:{hasTYPAnnouncementExtensions:e}}=Fe();return TB(e)()}function TB(e){return e!==void 0?()=>dm:()=>{const t=z_(),n=xn();if(t.length===0)return dm;const r=t[0];return o=>n?.("extensionUiInteraction",{interaction:o,section:"extension",timestamp:new Date,extension:r,componentType:"Announcement",componentInstanceId:r.id})}}const wB="Vytfl",LB="F3Ebx",xB="qdIKq",RB="OcTba",MB="LCUka",NB="LRXpG",Xr={CheckoutExitBackdrop:wB,CheckoutExitContent:LB,CheckoutExitFooter:xB,CheckoutExitOrderSummary:RB,CheckoutExitOrderSummaryBackground:MB,CheckoutExitHeader:NB},DB="szW4X",OB="sMSRq",FB="_3Ebqn",BB="F6Nrx",VB="j1xD4",UB="RDtb7",zB="ZXaI9",HB="sEWAT",qB="DTABr",GB="kBVzA",WB="qgQOk",$B="SBffw",gr={ThankYouInterstitialShell:DB,ThankYouInterstitialOverlay:OB,ThankYouInterstitialHeader:FB,ThankYouEntranceDisclosure:BB,ThankYouEntranceOrderSummary:VB,ThankYouEntranceFooter:UB,ThankYouEntrance:zB,ThankYouEntranceStatus:HB,ThankYouEntranceHeading:qB,ThankYouEntranceCards:GB,ThankYouEntranceActions:WB,ThankYouEntranceBeat:$B},It={none:"0",...Jn.spacing},YB={base:"solid",dashed:"dashed",dotted:"dotted"},H_="disclosure_details";function Nu({banner:e,announcement:t,header:n,buyerJourney:r,disclosure:o,disclosureOrderSummary:i,footer:a,main:l,orderSummary:c,blockSize:u,minMobileViewportSize:d=!1,disclosureId:p=H_,isDisclosureInteractive:m=!0,mainContentId:f=B_}){const h=Fe(),{checkout:{configuration:g,checkoutExit:y},embed:_,router:P}=b(),v=g.visibility.showAside,E=!!_?.isFlagshipPartner,C=qt(_?.embedder),S=C&&g.isUniversalCheckoutFinalizer&&P.currentUrl.value.normalizedPath==="/thank-you",I=it("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,k=C&&I,T=E&&h.header.divided===!1,A=h.header.position??"inline",L=ea(),M=Mu(),{open:N,exp
23anded:O,onAfterCollapse:D,onAfterExpand:B,onClose:z,onExpand:x,onCollapse:W}=kB(),X=i?s($i,{style:h.orderSummary.section,children:i}):void 0;return s("div",{className:Y(fe.Shell,gr.ThankYouInterstitialShell,y.isExiting.value&&fe["Shell-exiting"],v&&fe["Shell-layoutAside"],h.main.inlineSize==="fill"&&fe["Config-Main-inlineSizeFill"],h.orderSummary.inlineSize==="fill"&&fe["Config-OrderSummary-inlineSizeFill"],fe[$t("Config-Header-position",A)],h.footer.position&&fe[$t("Config-Footer-position",h.footer.position)],h.environment.isOnePageCheckout&&fe["Shell-variantOnePageCheckout"],C&&fe["Shell-embeddedUc"],S&&fe["Shell-embeddedUcMainPadding"],k&&fe["Shell-embeddedUcHasOrderSummary4Extensions"],u&&fe[$t("Shell-blockSize",u)],d&&fe["Shell-minMobileViewportSize"],St(t)&&fe["Shell-hasAnnouncement"],N&&fe["Shell-announcementOpen"]),style:{...ZB("content",h.content),...tV("content",h.content),...Lr("main",h.main),...Po("main",h.main),...Lr("order-summary",h.orderSummary),...Po("order-summary",h.orderSummary),...fm("order-summary",h.orderSummary),...Lr("header",h.header),...fm("header",{backgroundImage:h.header.banner?.image}),...Po("header",h.header),...T?pV:{},...Lr("footer",h.footer),...Po("footer",h.footer),...nV("footer",h.footer),...Lr("buyer-journey",h.buyerJourney),...Po("buyer-journey",h.buyerJourney),...Lr("announcement",h.announcement)},children:[s(jB,{}),e?s("div",{className:fe.Banner,children:e}):null,t?s(CB,{open:N,expanded:O,onAfterExpand:B,onAfterCollapse:D,onClose:z,onExpand:x,onCollapse:W,children:t}):null,s(el,{position:"start",children:[n,h.buyerJourney.position==="header"&&s(Oi,{children:r})]}),s(KB,{id:p,isInteractive:m,details:X,children:o}),s(JB,{children:[s(XB,{children:[s(el,{position:"inline",children:[n,h.buyerJourney.position==="header"&&s(Oi,{children:r})]}),s(pm,{children:[h.buyerJourney.position==="inline"&&s(Oi,{children:r}),s($i,{style:h.main.section,children:s("main",{className:Y(fe.MainContentPrimary,L&&Xr.CheckoutExitContent),id:f,children:l})}),h.footer.position==="inline"&&s(mm,{children:a})]})]}),s(QB,{children:[s(el,{position:"inlineSecondary",children:[n,h.buyerJourney.position==="header"&&s(Oi,{children:r})]}),s(pm,{children:s($i,{style:h.orderSummary.section,children:s("aside",{className:Y(fe.OrderSummaryContentPrimary,L&&Xr.CheckoutExitOrderSummary,M.value&&gr.ThankYouEntranceOrderSummary),children:s(Zs,{section:"summary",children:s(Si,{section:"summary",children:c})})})})})]})]}),h.footer.position==="end"&&s(mm,{children:a})]})}function jB(){const{checkout:e}=b(),{main:{colorScheme:t="scheme1",background:n}={}}=Fe();return e.checkoutExit.isExiting.value?s("div",{className:Y(Xr.CheckoutExitBackdrop,bt({colorLayer:"base",colorScheme:t,backgroundColor:n==="subdued"?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function el({children:e,position:t}){const{header:{position:n="inline",container:r="fill",colorScheme:o,banner:i,background:a,divided:l}={}}=Fe(),c=t??n,u=JF(),d=ea();if(!St(e))return null;const p=l??c==="start";return s("header",{className:Y(fe.Header,gr.ThankYouInterstitialHeader,fe[$t("Header-position",c)],fe[$t("Header-container",r)],p&&fe["Header-divided"],i?.image&&fe["Header-hasBackgroundImage"],u.value&&fe["Header-thankYouCovered"],d&&c==="inlineSecondary"&&Xr.CheckoutExitHeader,c==="start"&&bt({backgroundColor:a==="subdued"?"subdued":"baseSpecified",colorLayer:"base",colorScheme:o})),"data-inspector-id":"header",children:s("div",{className:fe.HeaderContent,children:s(ln,{children:s(Zs,{section:"header",children:s(Si,{section:"header",children:e})})})})})}function Oi({children:e}
23){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=Fe();return!St(e)||r==="hidden"?null:s("div",{className:Y(fe.BuyerJourney,fe[$t("BuyerJourney-position",t)],fe[$t("BuyerJourney-container",n)]),children:s("div",{className:fe.BuyerJourneyContent,children:e})})}function KB({children:e,details:t,id:n=H_,isInteractive:r}){const{content:{divider:{visibility:o}={}},orderSummary:{background:i,backgroundImage:a,colorScheme:l}={},main:{colorScheme:c="scheme1"},environment:{isCheckoutEditor:u},disclosure:{visibility:d}}=Fe(),p=wt(),m=Mu(),{checkout:f,client:h}=b(),g=h.unstable_getSerialization("shop").enabledFlags.includes(Ch),y=o==="visible"||!g&&o===void 0,_=oV(),{expanded:P,narrowedToInformationStep:v}=sV(),{open:E,setOpen:C}=U_(),S=E.value||_&&u,[I,k]=oe(),T=U(!1);F(()=>{k(T.current&&!P?"none":void 0),C(P)},[P,C]),F(()=>{T.current=v}),F(()=>{S&&C(!0)},[S,_,C]);const A=()=>{k(void 0),C(!E.peek())},L=Du();if(!St(e)||f.checkoutExit.isExiting.value||d==="hidden"||d==="hidden-only-checkout"&&!L)return null;const M=a?{backgroundImage:`url(${JSON.stringify(a)})`}:void 0,N=r?E.value:!0,O=!!t&&(p.value||N);return s("aside",{className:Y(fe.Disclosure,y&&fe["Disclosure-divided"],bt({colorLayer:"base",colorScheme:c,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:s(Zs,{section:"top_summary",children:s(Si,{section:"top_summary",children:[r?s(Ln,{className:Y(fe.DisclosureButton,m.value&&gr.ThankYouEntranceDisclosure),background:"transparent",onClick:A,"aria-controls":n,"aria-expanded":N,inlineSize:"100%","data-event-name":N?"order_summary_hide":"order_summary_show",children:e}):s("div",{className:Y(fe.DisclosureButton,m.value&&gr.ThankYouEntranceDisclosure),children:e}),O&&s(gn,{open:N,id:n,duration:I,children:s("div",{className:Y(fe.DisclosureDetails,m.value&&gr.ThankYouEntranceDisclosure,bt({colorLayer:"base",colorScheme:l,backgroundColor:i==="subdued"?"subdued":"baseSpecified"})),style:M,children:s("div",{className:fe.DisclosureDetailsContent,children:s(ln,{children:s(rV,{children:t})})})})})]})})})}function JB({children:e}){const{content:{container:t="fill"}={}}=Fe();return St(e)?s("div",{className:Y(fe.Content,fe[$t("Content-container",t)]),children:e}):null}function pm({children:e}){const{checkout:t}=b();return t.checkoutExit.isExiting.value?null:s(G,{children:e})}function XB({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:r,backgroundImage:o}={},content:{divider:{visibility:i}={}}}=Fe(),{client:a}=b(),l=a.unstable_getSerialization("shop").enabledFlags.includes(Ch),c=V(()=>({current:t}),[t]);if(!St(e))return null;const u=o?{backgroundImage:`url(${JSON.stringify(o)})`}:void 0;return s("div",{className:Y(fe.Main,n==="fill"&&fe["Main-inlineSizeFill"],(i==="visible"||!l&&i===void 0)&&fe["Main-divided"],bt({colorLayer:"base",colorScheme:t,backgroundColor:r==="subdued"?"subdued":"baseSpecified"})),style:u,children:s("div",{className:fe.MainContent,children:s(Rs.Provider,{value:c,children:s(ln,{children:e})})})})}function QB({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:r,backgroundImage:o}={}}=Fe(),i=V(()=>({current:t}),[t]),a=ea();if(!St(e))return null;const l=o?{backgroundImage:`url(${JSON.stringify(o)})`}:void 0;return s("div",{className:Y(fe.OrderSummary,n==="fill"&&fe["OrderSummary-inlineSizeFill"],a&&Xr.CheckoutExitOrderSummaryBackground,bt({colorLayer:"base",colorScheme:t,backgroundColor:r==="subdued"?"subdued":"baseSpecified"})),style:l,"data-inspector-id":"orderSummary",children:s("div",{className:fe.OrderSummaryContent,children:s(Rs.Provider,{value:i,children:s(ln,{children:e})})})})}function mm({children:e}
23){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:o,divided:i}={}}=Fe(),{checkout:a}=b(),l=ea(),c=Mu();if(a.checkoutExit.isExiting.value||!St(e))return null;const d=i??t==="end";return s("footer",{className:Y(fe.Footer,fe[$t("Footer-position",t)],fe[$t("Footer-container",n)],d&&fe["Footer-divided"],l&&Xr.CheckoutExitFooter,t==="end"&&bt({colorLayer:"base",colorScheme:r,backgroundColor:o==="subdued"?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:s("div",{className:Y(fe.FooterContent,c.value&&gr.ThankYouEntranceFooter),children:s(ln,{children:s(Si,{section:"footer",children:e})})})})}function _t(e){return t=>t?e[t]:void 0}function ZB(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:_t(YB)(t)}}const eV={none:"0px",...Jn.borderWidth};function tV(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:_t(eV)(t)}}function Lr(e,{inlineSize:t}={}){if(!isNaN(Number(t))&&Number(t)!==0)return{[`--config-${e}-inline-size`]:gs(Number(t))};if(!(e==="main"||e==="order-summary")&&t==="fill")return{[`--config-${e}-inline-size`]:"100%"}}function Po(e,{padding:t}={}){if(Array.isArray(t)){const n=t.length===2?[t[0],t[1],t[0],t[1]]:t;return{[`--config-${e}-padding-block-start`]:_t(It)(n[0]),[`--config-${e}-padding-inline-end`]:_t(It)(n[1]),[`--config-${e}-padding-block-end`]:_t(It)(n[2]),[`--config-${e}-padding-inline-start`]:_t(It)(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`]:_t(It)(t),[`--config-${e}-padding-inline-end`]:_t(It)(t),[`--config-${e}-padding-block-end`]:_t(It)(t),[`--config-${e}-padding-inline-start`]:_t(It)(t),[`--config-${e}-padding`]:_t(It)(t)}}function fm(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function nV(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:_t(It)(t)}}function rV({children:e}){const{environment:{isOnePageCheckout:t}}=Fe(),n=Du();return t&&!n?s($F,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):s(G,{children:e})}function oV(){const{environment:{hasOrderSummaryExtensions:e}}=Fe();return iV(e)()}function iV(e){return e!==void 0?()=>e:()=>F_("top").length>0}function sV(){const{environment:{shouldExpandOrderSummary:e}}=Fe(),t=KF()===Sh.Treatment;return aV(t,e)()}function aV(e,t){return t!==void 0?()=>({expanded:t,narrowedToInformationStep:!1}):()=>{const n=lV(),r=cV(),o=uV();return e&&r&&!n.value&&o.value!==void 0?{expanded:o.value,narrowedToInformationStep:!0}:{expanded:n.value||r,narrowedToInformationStep:!1}}}function lV(){const e=Je(F_("top"));return w(()=>e.value.some(t=>{if(t.kind==="customField")return Al(t).required.value;const n=Al(t),r=n.behaviors.value;return r.blockProgress&&n.capabilities.blockProgress||r.alwaysReveal}))}function cV(){const{orderSummary:{defaultState:e}={}}=Fe(),{checkout:{configuration:{layout:{isOnePage:t}}}}=b();return!t.value&&e==="EXPANDED"}function uV(){const e=Se();return w(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!(n||!t))return t.id==="information"})}function Du(){const{environment:{hasDetour:e}}=Fe();return dV(e)()}function dV(e){return e!==void 0?()=>e:()=>{const{currentDetour:t}=Se().value;return!!t}}function ea(){const e=Us(),t=Du();return e&&!t}const pV={"--x-shell-header-padding":`${_t(It)("large100")} ${_t(It)("large200")} ${_t(It)("none")} ${_t(It)("large200")}`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${_t(It)("large100")}) var(--config-main-padding-inline-end, ${_t(It)("large200")}) var(--config-main-padding-block-end, ${_t(It)("large200")}) var(--config-main-padding-inline-start, ${_t(It)("large200")})`},mV={small:"10ch",base:"20ch",large:"30ch",full:"100%"},fV={base:"12px"},hV="Shopify.checkout.partnerInterstitialMinimumVisibleDuration";
23function gV(e){return mV[e]}const yV="A5qhV",vV="_4KRKW",hm={overlay:yV,backgroundOverlay:vV},_V=tt("wallet-transition-disclosure-"),bV=tt("wallet-transition-main-content-");function PV({layer:e="foreground"}={}){const{embed:t,i18n:n}=b(),r=!t,o=Ye(void 0,_V),i=Ye(void 0,bV),a=s("div",{className:`${hm.overlay} ${e==="background"?hm.backgroundOverlay:""}`,role:"status","aria-label":n.translate("general.loading"),style:_n({[Jn.global.borderRadius]:fV.base}),children:s(Ru,{children:s(Nu,{mainContentId:i,disclosureId:o,isDisclosureInteractive:!1,header:r?s(SV,{}):void 0,disclosure:s(CV,{}),main:s(EV,{}),orderSummary:s(kV,{})})})});return s(Pr,{children:a})}function SV(){const{header:{alignment:e="start",logo:t}={}}=Fe(),{shop:n}=b(),r=t?.image?s(w_,{width:t.maxWidth}):s(jt,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});return s(gt,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function An({inlineSize:e="base",size:t="small"}){return s(wu,{size:t,inlineSize:e})}function gm(){return s($,{type:"small",children:s(Xo,{inlineSize:gV("full")})})}function tl(){return s(ee,{rowGap:"base",children:[s(An,{size:"large",inlineSize:"small"}),s(ee,{rowGap:"small-300",children:[s(gm,{}),s(gm,{})]})]})}function EV(){return s(ee,{rowGap:"large-200",children:[s(tl,{}),s(Jr,{}),s(tl,{}),s(Jr,{}),s(tl,{})]})}function CV(){return s(ee,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[s(An,{inlineSize:"base"}),s(An,{size:"large",inlineSize:"small"})]})}function kV(){const{i18n:e}=b(),{merchandiseThumbnail:t,global:n}=ct(),r=t.cornerRadius??n.cornerRadius??"base",o=r==="fullyRounded"?"large":r,i=`${Pi("base").inlineSize}px`;return s(ee,{rowGap:"large-200",children:[s($,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),s(gt,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[s(be,{borderRadius:o,overflow:"hidden",children:s(Xo,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),s(ee,{rowGap:"small-500",children:[s(An,{inlineSize:"base"}),s(An,{inlineSize:"small"})]}),s(An,{inlineSize:"small"})]}),s(IV,{})]})}function IV(){return s(ee,{rowGap:"small-100",children:[[0,1,2].map(e=>s(ee,{direction:"inline",justifyContent:"space-between",children:[s(An,{inlineSize:"small"}),s(An,{inlineSize:"small"})]},e)),s(ee,{direction:"inline",justifyContent:"space-between",children:[s(An,{size:"large",inlineSize:"small"}),s(An,{size:"large",inlineSize:"small"})]})]})}function AV(){const{shop:e,checkout:t,observability:n}=b(),r=SF().value,o=!!t.wallets.isDeceleratingSignal?.value,i=t.isCheckoutLayoutForcedToOnePage.value,a=h_(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=Js(),u=!!(l||a&&c),d=e.hasFlagEnabled(bh),p=t.wallets.escalatedWallet.value,m=d?o&&u&&p!==null:o&&u;F(()=>{m&&t.wallets.setIsDecelerating(!1)},[m,t.wallets]);const f=U(!1);return F(()=>{if(!i){f.current=!1;return}if(!u||f.current)return;f.current=!0;const h={wallet:p};n.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:h}),n.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",h)},[p,i,u,n]),r||!o?null:s(PV,{})}const Do=He({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>lt(()=>Be(()=>import("./9d12dea3.BI8nqBiJ.js"),__vite__mapDeps([89,1,2,3,4,5,90,21,22,91,43,44,45,6,42,46,47,25,26,41,92,93,94,95,96,97,98,99,84,100,101,102,103,104,105,106,107,28,29,108,7,8,9])))});function TV(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:o},url:i}=b(),a=r.current.value==="shopPay",l=parseInt(Ve(e.id),10);F(()=>{if(!o)return;c();async function c(){const u=new URL(i.privateAccessToken(a,l));u.searchParams.set("id",o),u.searchParams.set("checkout_type","c1");const d=nk({serializations:{get:p=>t.unstable_getSerialization(p)},isShopApp:n.isShopServerOrigin});d?.uniqueToken&&u.searchParams.set("_y",d.uniqueToken),d?.visitToken&&u.searchParams.set("_s",d.visitToken);try{await fetch(u)}catch{}}},[o,l,a,i,t,n])}const Yi=He({suspenseName:"information",displayName:"Information",load:()=>lt(()=>Be(()=>import("./17324a0b.BkYCzpAj.js"),__vite__mapDeps([109,1,43,2,3,4,5,44,45,91,6,42,46,47,25,26,41,21,22,92,110,111,112,113,114,115,116,81,117,118,55,40,119,94,13,120,121,122,71,51,123,99,84,100,124,104,125,126,127,7,128,129,130,131,132,133,8,9])))}),wV=He({displayName:"NoAddressLocation",load:()=>lt(()=>Be(async()=>{const{noAddressLocationPages:e}=await import("./4421b714.DZEE9SkD.js");return{noAddressLocationPages:e}},__vite__mapDeps([134,1,135,56,2,3,4,5,57,6,122,136,130,131,7,8,9,137])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),LV=He({displayName:"NoAddressLocationFullDetour",load:()=>lt(()=>Be(async()=>{const{noAddressLocationPages:e}=await import("./4421b714.DZEE9SkD.js");return{noAddressLocationPages:e}},__vite__mapDeps([134,1,135,56,2,3,4,5,57,6,122,136,130,131,7,8,9,137])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),xV=He({displayName:"NotFound",load:()=>Be(()=>import("./aea3fb03.BDHlih-c.js").then(e=>e.N),__vite__mapDeps([58,1,2,3,4,5]))}
23),ym=He({displayName:"OffsitePaymentFailed",load:()=>Be(()=>import("./611e718a.C3a2Ap3j.js").then(e=>e.O),__vite__mapDeps([135,1,56,2,3,4,5,57,6,122,136]))}),q_=He({suspenseName:"one-page",displayName:"OnePage",load:()=>Be(()=>import("./f8706cb6.Bnci6QEq.js").then(e=>e.p),__vite__mapDeps([138,3,1,4,2,5,115,43,44,45,116,81,41,117,118,55,40,119,91,6,42,46,47,25,26,21,22,92,94,13,120,121,122,71,51,123,99,84,100,124,104,125,126,127,7,128,129,139,32,33,78,79,74,8,140,141,28,29,107,108,142,83,143,82,62,80,144,145,146,105,106,9,112,113,147,148,149,150,93,95,96,97,98,101,151,152,153,154,155,156,157,158,159,130,131,160]))}),vm=He({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>lt(()=>Be(()=>import("./9e3968a8.CV7SEfoi.js"),__vite__mapDeps([161,1,2,3,4,5,110,111,112,113,114,105,99,84,100,106,139,32,33,121,122,81,78,79,116,41,117,118,74,8,140,102,93,94,6,95,96,97,98,101,103,162,163,56,57,71,164,38,39,64,120,62,147,148,58,143,13,165,145,146,104,166,125,126,7,9,167,46,107,28,29,108])))});class MY extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class RV extends Error{constructor(t,n){super(t,n),this.name="CardFieldsLoadError",this.diagnostics=n?.diagnostics}}class NY extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class nl extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class MV extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class NV extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class DY extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class OY extends Error{constructor(t,n){super(t),this.name="CardFieldsFetchFailureError",n!==void 0&&(this.httpStatus=n)}toString(){const t=super.toString();return this.httpStatus===void 0?t:`${t} (HTTP Status: ${this.httpStatus})`}}const bd=class bd extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};bd.hostedFieldsName="CardFieldsError";let _m=bd;function DV({source:e,integrity:t},n=!0){const r=Date.now();function o(){return new Promise((i,a)=>{if(window.CardFields)return i();const l=document.createElement("script");l.async=!0,l.src=e,l.onload=()=>{if(window.CardFields)return i();setTimeout(()=>{if(!window.CardFields)return a(new NV);i()},0)},t&&(l.integrity=t),l.crossOrigin="anonymous",l.onerror=c=>{let u;c instanceof Event?u=new nl(`Event type: ${c.type}. ${Fi(e)}`):typeof c=="string"?u=new nl(`String error: ${c}. ${Fi(e)}`):u=new nl(`unknown error type. ${Fi(e)}`),document.head.removeChild(l),a(u)};try{document.head.appendChild(l)}catch(c){a(new MV("Failed to append child.",{cause:c}))}})}return(n?lt(o):o()).catch(i=>{let a;try{const l=typeof performance<"u"&&typeof performance.getEntriesByName=="function"?performance.getEntriesByName(e,"resource"):[],c=l[l.length-1],u=typeof navigator>"u"?void 0:navigator.connection;a=Object.fromEntries(Object.entries({errorCause:i instanceof Error?i.name.slice(0,128)||"Error":typeof i,underlyingCauseName:i instanceof Error&&i.cause instanceof Error?i.cause.name.slice(0,128)||"Error":void 0,elapsedMs:Date.now()-r,sdkIntegrity:t?.slice(0,512),networkType:u?.type,networkDownlink:u?.downlink,networkRtt:u?.rtt,networkSaveData:u?.saveData,documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,resourceDurationMs:c?.duration,resourceTransferSize:c?.transferSize,resourceStatus:c?.responseStatus||void 0}).filter(([,d])=>d!==void 0))}catch{a=void 0}throw new RV(`Failed to load CardFields SDK. ${Fi(e)}`,{cause:i,diagnostics:a})})}function Fi(e){const t=typeof navigator>"u"?"navigator not available":navigator.onLine;return`Script src: ${e} . Internet connection boolean: ${t}`}function OV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rl,bm;function FV(){return bm||(bm=1,rl={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}),rl}var BV=FV();const Pm=OV(BV);function VV(){const{environment:e}=b(),t=e.services.hostedFields.url;return t===Pm.SDK_URL?{source:t,integrity:Pm.SDK_INTEGRITY}:{source:t}}function UV(){const e=VV();return()=>{DV(e)}}const Gl=He({suspenseName:"payment",displayName:"Payment",load:()=>lt(()=>Be(()=>import("./74122478.b4VOdYwF.js"),__vite__mapDeps([168,1,141,3,4,2,5,44,28,29,107,108,123,21,22,99,84,100,124,142,8,83,79,143,82,62,80,144,169,9,119,91,43,45,6,42,46,47,25,26,41,92,170,145,146,13,147,148,171,132,133,150,172,105,106,78,113,173,174,175,122,90,110,
23111,112,114,51,130,131,163,121,56,57,71,164,176,177,178,7]))),usePrefetch(){const e=UV();return R(()=>{e()},[e])}}),Sm=He({displayName:"PostPurchase",load:()=>Be(()=>import("./896e8dde.Cjejr9LN.js"),__vite__mapDeps([179,1,2,3,4,5,122,180,181,44,50,7,6,13,25,26,15,69,60,66,8,9,182]))}),G_=He({displayName:"Processing",load:()=>lt(()=>Be(()=>import("./090b00f0.Bj-jjy3B.js"),__vite__mapDeps([183,1,56,2,3,4,5,57,122,6,7,8,9,184])))}),Wl=He({suspenseName:"review",displayName:"Review",load:()=>lt(()=>Be(()=>import("./b120ac11.y8r8UJGo.js"),__vite__mapDeps([185,1,2,3,4,5,110,111,112,113,114,51,130,131,163,121,122,56,57,78,79,71,164,104,6,7,8,9])))}),$l=He({suspenseName:"shipping",displayName:"Shipping",load:()=>lt(()=>Be(()=>import("./289b89e4.SAzMaW-u.js"),__vite__mapDeps([186,1,125,126,151,21,3,4,2,5,22,123,99,84,100,124,128,152,44,153,95,96,97,154,43,45,42,46,47,155,156,157,158,130,131,6,122,7,8,9])))}),W_=He({displayName:"ShopPayLoginLoader",load:()=>Be(()=>import("./9011490c.CHh74ILx.js"),__vite__mapDeps([187,1,2,3,4,5,188,130,131,82,145,146,55,117,96,166,125,126,38,39,6,7,8,9,167,122,189]))}),$_=He({displayName:"StockProblems",load:()=>lt(()=>Be(()=>import("./0cd5b134.D1V0IG75.js"),__vite__mapDeps([190,1,135,56,2,3,4,5,57,6,122,136,130,131,191,192,7,8,9])))}),zV=He({displayName:"StockProblemsModal",load:()=>lt(()=>Be(()=>import("./a9ba8e86.DH-C0zHu.js"),__vite__mapDeps([193,1,2,3,4,5,192,191,122,159,6,7,8,9])))});function Ou(e){return function(n){const{observability:r}=b();F(()=>{if(n){if(lA(n)||cA(n)){r.log("lazy_load_failure",`[LazyLoad] ${e} failed to load`,{component:e,failure:"lazy_load",error:String(n)});return}r.error(n,{metadata:{lazyLoad:{component:e,failure:"lazy_load"}}})}},[n,r])}}const HV=Ou("ThankYou");function qV(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=b(),o=no(),i=o?.id,a=o?.orderStatusPageUrl,l=t.unstable_getSerialization("sessionToken"),c=U(!1);HV(e),Mt(()=>{if(!e||c.current)return;function u(f,h,g){h&&(c.current=!0),n.log("thank_you_recovery","[LazyLoad] ThankYou recovery",{outcome:f,waitedMs:g},{exportImmediately:!0,requiresKeepalive:!0}),h&&location.replace(h)}const d=new URLSearchParams(location.search).get("prevent_order_redirect");if(d!==null&&d!=="false"){u("prevented");return}if(a){u("redirect",a);return}if(!i){u("not_processed");return}let p=!1;const m=Date.now();return(async()=>{for(;Date.now()-m<Nv;){if(await Af(zi),p)return;let f;try{const{data:h}
23=await r.staticQuery(zl,{cache:!1,variables:{receiptId:i,sessionToken:l}});h?.receipt?.__typename==="ProcessedReceipt"&&(f=h.receipt.orderStatusPageUrl)}catch{}if(p)return;if(f)return u("polled",f,Date.now()-m)}u("timed_out")})(),()=>{p=!0}},[r,e,n,a,i,l])}const lr=He({suspenseName:"thank-you",displayName:"ThankYou",useError:qV,load:()=>lt(()=>Be(()=>import("./909cc5d6.MwssGRYI.js"),__vite__mapDeps([194,1,2,3,4,5,174,35,130,131,104,6,122,98,95,96,97,153,28,29,19,20,41,42,43,44,45,46,47,116,81,117,118,195,9,52,107,108,196,197,198,135,56,57,136,25,26,13,199,200,201,202,152,7,125,126,8,203])),{maxAttempts:1})}),Yl=He({displayName:"Throttle",load:()=>lt(()=>Be(()=>import("./01f1d1bd.DTgG5FTN.js"),__vite__mapDeps([204,1,104,2,3,4,5,6,122,61,7,8,9,205])))});var Gt={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 $e({accessibilityVisibility:e,children:t,color:n="base",size:r,id:o,textAlign:i,textWrap:a,translate:l,kerning:c,letterCase:u,fonts:d,decoration:p,type:m="paragraph",tone:f="auto",dir:h,lang:g,lineClamp:y}){const _=y!=null&&Number.isFinite(y)&&y>=1?Math.floor(y):void 0,P=_==null?void 0:_n({[Gt.lineClampCount]:String(_)}),v=(l===!0?"yes":void 0)??(l===!1?"no":void 0),E=e==="exclusive"?Gt.accessibilityVisibilityVariant[e]:Y(Gt.Paragraph,m!=="small"&&r&&Gt.sizeVariant[r],f&&Gt.toneVariant[f],n&&(f==="auto"||f==="neutral")&&Gt.colorVariant[n],i&&i!=="auto"&&Gt.textAlignVariant[i],a&&a!=="wrap"&&Gt.textWrapVariant[a],c&&Gt.kerningVariant[c],u&&Gt.letterCaseVariant[u],d&&Gt.fontsVariant[d],p&&Gt.decorationVariant[p],_!=null&&Gt.lineClamp,Gt.typeVariant[m],{notranslate:l===!1});return s(Wr.Provider,{value:!0,children:s("p",{"aria-hidden":e==="hidden"?!0:void 0,className:E,id:o,translate:v,dir:h,lang:g,style:P,children:t})})}function GV({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:o}){return!e&&!t||(!!n||!!r)||o}function WV(e){const t=e?.filter(({quantity:n})=>n>0)??[];return t.length>0&&t.every(({requiresShipping:n})=>!n)}function $V({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const Y_=mt("VaultedSectionsContext");function ho(){const e=Pe(Y_);return w(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function YV(){const e=ho();return w(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function FY(){const e=ho(),{checkout:t,embed:n,shop:r,source:o}=b(),{validation:{contactErrors:{emailInputError:i,phoneInputError:a}}}=t,{current:l}=t.identity,{hasViolations:c}=Ws(Ec),u=Fe(),d=ct(),p=Je(u.main.section),m=Je(d.vaulted),f=Je(c),h=U(!1);return w(()=>{const g=Ud(p.value),y=Ud(m.value),{contact:_,delivery:P,payment:v}=e.value,E=rk({isContactVaulted:_,configuration:t.configuration,identity:t.identity,embed:n,shop:r}),C=(()=>
23{if(l.value!=="sdkCartHints")return h.current=!1,E;if(!E)return h.current=!1,!1;const T=t.proposal.negotiated.fields.merchandiseLines.value?.lines;return $V({isFlagshipPartner:n?.isFlagshipPartner??!1,hasError:GV({email:t.proposal.proposed.email.value,phone:t.proposal.proposed.phone.value,emailInputError:i.value,phoneInputError:a.value,hasViolations:f.value}),hasOnlyDigitalItems:WV(T)})?h.current:(h.current=!0,!0)})(),S=!st(o)&&ok({checkout:t}),I=P&&t.isShippingRequired.value;return C||I||v||S?g||y:!1})}function jV(e){return Object.entries(e).some(([t,n])=>{const r=t;return r!=="countryCode"&&r!=="zoneCode"&&qs(r)&&n!=null&&(typeof n!="string"||n.trim().length>0)})}function KV(e,t){return e.greenPath.some(({route:n})=>n===t)?!0:e.detours.some(({type:n,route:r})=>(n==="stockProblems"||n==="noAddressLocation")&&r===t)}function j_(){const{embed:e,shop:t,checkout:n,router:r,i18n:o}=b(),i=e?.interstitialPartnerDisplayName,{plan:a}=Se().value,l=r.currentUrl.value.normalizedPath,c=vc({embedder:e?.embedder,shop:t}),u=ho(),{delegatedPaymentInstrument:d}=Nt(),p=we(!1);Mt(()=>{p.value=!!d.peek()},[d,p]);const[m]=oe(()=>{const y=n.proposal.proposed;return{contact:!!(y.email.peek()||y.phone.peek()),delivery:jV(y.shippingAddress.peek())}});if(!KV(a,l)||!c||n.identity.current.value!=="sdkCartHints"||!i)return null;const f=u.value.contact&&m.contact,h=u.value.delivery&&m.delivery,g=u.value.payment&&p.value;return!f&&!h&&!g?null:s(gt,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[s(Le,{type:"info"}),s($e,{textWrap:"pretty",children:o.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]})}const K_=He({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>Be(()=>import("./28ac86c0.BKH30O5g.js").then(e=>e.A),__vite__mapDeps([16,1,2,3,4,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,15,35,36,37,7,38,39,40,41,42,43,44,45,46,47,48]))});function J_(){const t=it("purchase.thank-you.announcement.render");return V(()=>{const n=Eh(t,"uiExtension");return n.length>0?[n[0]]:[]},[t])}const JV=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,XV=/Version\/(\d+)[\d.]*.*Safari/,QV=/Chrome\/|Edg(?:e|iOS|A)?\//,ZV=/FBAN|FB_IAB|FBAV|Instagram/;function eU(e){const t=navigator.userAgent.match(JV);return t?t[1]===e:!1}function tU(e){const t=navigator.userAgent;if(QV.test(t))return!1;const n=t.match(XV);return n?parseInt(n[1],10)===e:!1}function BY(){return ZV.test(navigator.userAgent)}const nU=0,X_=1,rU=2,Q_=3,oU=4,Fu=5,Bu=new Map([["legacy",nU],["block",X_],["inline",rU],["grid",Q_],["list",oU],["grid-compact",Fu]]);function Em(e,t){return Bu.get(e)===t}function VY(e){const t=Bu.get(e);return t===Q_||t===Fu}function UY(e){return typeof e=="string"&&Bu.has(e)}const Z_=Ge(null);Z_.displayName="ChoiceListContext";function zY(){return Pe(Z_)}const eb=Ge(null);eb.displayName="ChoiceListStyleContext";function iU(){return Pe(eb)||{}}function HY(){return iU().redesigned??!1}const Vu=Ge(void 0);Vu.displayName="ChoiceListPresentationOverrideContext";function sU(){return Pe(Vu)}function aU(e){return Em(e,X_)||Em(e,Fu)}function qY(e){const t=ow(),n=sU();return t&&n!=="base"&&aU(e)?"redesigned":"base"}var ot={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 Cm=-1;function lU(e){if(!e||typeof window>"u")return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}const cU=tt("Modal");function or(e){const t=Ye(e.id,cU),n=ZT("modal");if(n){const{active:r,setActive:o}=n;
23n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",()=>{o(!0)});const i=()=>{o(!1),typeof e.onHide=="function"&&e.onHide()},{children:a}=e;return s(km,{...e,id:t,onHide:i,open:r,children:St(a)&&s(Uc,{children:a})})}return s(km,{...e,id:t})}const uU={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960};function dU(e){return e.endsWith("px")}const km=Bg(xw(function({blocking:t,size:n="base",blockSize:r,open:o=!1,heading:i,source:a,iframeRef:l,onIframeLoad:c,iframeId:u,allow:d,accessibilityLabel:p,padding:m="base",primaryAction:f,secondaryActions:h,actionLayout:g="inline",footer:y,children:_,id:P,onAfterShow:v,onShow:E,closeButton:C="visible",dataTestIdForScrollableContent:S,...I}){const k=U(null),T=U(null),A=U(!1),L=QT();F(()=>{if(!(!o||!L))return L.value+=1,()=>{L.value=Math.max(0,L.value-1)}},[o,L]),o&&T.current!==o&&typeof E=="function"&&E(),T.current=o;const{modal:{margin:M}}=ct(),N=M!=null&&M!=="none",O=C==="hidden",{onHide:D,onAfterHide:B}=t?{}:I,[z,x]=oe(),W=!r&&lU(a),X=r??(W||z===Cm||n==="max"?"100%":void 0),Z=dU(n)?n:`${uU[n]}px`,{className:ce,style:j,styleElement:Q}=At({blockSize:X,maxInlineSize:`@media (inline-size >= extraSmall) ${Z}, none`}),H=on(o,"slow"),[J,he]=oe("");F(()=>{he(ot.transitionVariant[H])},[H]);const{isLocked:ne,lock:ae,unlock:ue}=du();F(()=>{o&&!ne&&ae(),!o&&ne&&ue()},[ne,ae,o,ue]),F(()=>{if(H==="exited"&&(x(void 0),A.current&&(typeof B=="function"&&B(),A.current=!1)),H==="entered"){if(P&&tU(26)){const Ce=document.getElementById(P),K=document.activeElement,te=K instanceof HTMLElement&&Ce?.contains(K)===!0&&K.matches('input, textarea, select, [contenteditable="true"]');Ce&&!te&&Ce.focus()}typeof v=="function"&&v()}},[H,v,B,P]),F(()=>{o||(A.current=!0)},[o]),F(()=>{const Ce=K=>
23{(K.key==="Escape"||K.key==="Esc")&&!t&&o&&(k.current?.contains(document.activeElement)||!document.getElementById(ro)?.contains(document.activeElement))&&typeof D=="function"&&D()};return document.addEventListener("keydown",Ce,!1),()=>{document.removeEventListener("keydown",Ce,!1)}},[t,o,D]);const Ae=R(Ce=>{if(!r&&!W){const K=Ce.target;if(K?.contentWindow)try{x(K.contentWindow.document.body.scrollHeight)}catch{x(Cm)}}c?.()},[r,c,W]),me=R(Ce=>{Ce.target===Ce.currentTarget&&typeof D=="function"&&D()},[D]);if(H==="exited")return null;const ye=i&&!p?Vg(P):void 0,Ee=!!(f||h),Ue=eU("26");return s(Pr,{children:s(Vu.Provider,{value:void 0,children:[Q,s("div",{ref:k,className:Y(ot.Overlay,J,ot.overlayPaddingVariant[r?"none":"base"],Ue&&ot.overlayMobileSafari26),onMouseDown:me,children:s(uu,{children:s("div",{id:P,className:Y(ot.Modal,ot.modalTopRadiusVariant[Lw(r)==="100%"?"square":"rounded"],ot.modalMobileMarginVariant[N?"base":"none"],J,ce,X&&ot.hasBlockSize),role:"dialog","aria-modal":!0,style:j,"aria-label":p,"aria-labelledby":ye,children:[a?s(G,{children:s(ln,{level:2,children:[s(Im,{id:P,hideCloseButton:O||t,onHide:D,heading:i}),s(hU,{source:a,iframeRef:l,iframeId:u,allow:d,accessibilityLabel:p,heading:i,iframeHeight:z,blockSize:r,handleIFrameLoad:Ae,padding:m})]})}):s("div",{className:Y(ot.ScrollBox,o&&ot.ModalContentCrossFadeTarget,ot.scrollBoxPaddingVariant[m==="base"?i?"gap":"blockStart":"none"],ot.scrollBoxActionsVariant[Ee||y?"withActions":"noActions"]),"data-testid":S,children:[s(ln,{level:2,children:[s(Im,{id:P,hideCloseButton:O||t,onHide:D,padding:m,heading:i}),s(fU,{padding:m,children:_})]}),Ee&&s("div",{className:ot.ActionsScrollShadow})]}),y&&s("div",{className:ot.Footer,children:s(As.Provider,{value:!1,children:s(Uc,{children:y})})}),Ee&&s(pU,{primaryAction:f,secondaryActions:h,actionLayout:g})]})})}),Ue&&s(G,{children:[s("div",{className:Y(ot.MobileSafari26BarTop,J)}),s("div",{className:Y(ot.MobileSafari26BarBottom,J)})]})]})})},{overlayType:"modal"}));function Im({hideCloseButton:e,id:t,onHide:n,padding:r,heading:o}){const i=typeof o=="string"?s(jt,{level:1,children:o}):o;return!i&&e?null:s("div",{className:Y(ot.Header,ot.headerPaddingVariant[i?"base":r==="base"?"large":"extraLarge"]),children:[i&&s("div",{id:Vg(t),className:Y(ot.HeaderContent,ot.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&s(mU,{onHide:n})]})}function pU({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return s(Uc,{children:s("div",{className:Y(ot.Actions,ot.actionLayoutVariant[n]),children:[(n==="inline"||St(t))&&s("div",{className:Y(ot.SecondaryActions,ot.secondaryActionLayoutVariant[n]),children:t}),e]})})}function mU({onHide:e}){const t=un();return s("button",{type:"button",className:ot.CloseButton,onClick:()=>{typeof e=="function"&&e()},"aria-label":t("closeModal")||"Close",children:s(Le,{type:"x",size:"base"})})}function fU({children:e,padding:t="base"}){return St(e)&&s("div",{className:Y(ot.Content,ot.contentPaddingVariant[t]),children:s(As.Provider,{value:!1,children:s(L_,{children:e})})})}function hU({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:o,heading:i,iframeHeight:a,handleIFrameLoad:l,padding:c="base"}){const u=typeof i=="string"?i:void 0,d=r;return s("iframe",{src:e,title:o??u,name:n,className:Y(ot.IFrame,ot.iframePaddingVariant[c]),ref:t,onLoad:l,id:n,...a&&a>0&&{style:{height:a}},...d?{allow:d}:void 0})}function gU({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:o,handleSubmit:i,handleCancel:a}){const l=!!n,c=!!t;return s(gt,{gridTemplateColumns:l&&c?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[l&&s(cn,{variant:"secondary",inlineSize:"fill",onClick:a,children:n}),c&&s(cn,{variant:"primary",inlineSize:"fill",disabled:o,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const jl=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];function yU({isStockProblems:e,shippingRequired:t,deliveryMethodOptions:n,mustSelectProvidedShippingRate:r,isSplitShipAndPickup:o,initialPickupOnlySelection:i,deliveryNext:a,currentSelectedMethods:l}){if(e||!t)return;const[c]=n;
23if(!c||r||o)return;if(i?.activeMethod){const{activeMethod:d,targetMethod:p}=i;return{nextMethods:[p],previousMethods:[d==="LOCAL"?"SHIPPING":d],loadingFields:jl}}return a?.status==="filled"?void 0:{nextMethods:[...n.find(d=>JSON.stringify(d)===JSON.stringify(l))??c],loadingFields:jl}}var Rr=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(Rr||{});const Uu=mt("DeliveryMethodsContext"),tb=Ge(void 0);function nb(){return Ht(Uu)}function vU(){return Pe(tb)}function Ei(e){const t=Pe(Uu),n=jl.includes(e);return w(()=>n&&(t?.initialReconciliationPending.value??!1))}function ol(e){return e/ik}function GY(){const{i18n:e}=b();return R(t=>{if(typeof t=="number"){const a=Math.ceil(ol(t));return a<1?null:e.translate("shipping.estimated_delivery_date",{count:a})}const{lower:n,upper:r}=t;if(n===void 0||r===void 0)return null;const o=Math.ceil(ol(n)),i=Math.ceil(ol(r));return i<1?null:o<1||o>i?e.translate("shipping.estimated_delivery_date",{count:i}):e.translate("shipping.estimated_delivery_date_range",{minimum:o,maximum:i})},[e])}function WY(){const e=q().deliveryNext,t=er();return w(()=>{const n=e.value;return!n||n.status==="unavailable"||t.value.enabledDeliveryMethods.length>1?!1:n.lines.every(r=>r.status==="not_required"?!0:r.status!=="available"?!1:r.methods.length<2)})}function $Y(){const{deliveryNext:e,allViolations:t}=q(),n=qe("deliveryNext");return w(()=>{const r=e.value,o=n.value,i=t.value;if(o)return{value:null,loading:o};const a=i?.some(({code:c})=>sk.has(c));return{value:r?.status==="unavailable"&&(r.hasNoDeliveryMethods||a||!1),loading:!1}})}function YY(){const{allViolations:e}=q(),t=qe("deliveryNext");return w(()=>{const n=t.value;return n?{value:null,loading:n}:{value:e.value?.some(({code:o})=>ak.has(o))??!1,loading:!1}})}function _U(){const e=q().deliveryNext;return w(()=>qr(e.value))}function jY(){const{deliveryLines:e}=ie();return w(()=>{const t=e.value;return t.length>0&&t.every(n=>{const r=n.value?.deliveryMethodTypes;return r?.length===1&&r[0]==="PICK_UP"})})}function bU(e){return(e??[]).filter(t=>t.requiresShipping).reduce((t,n)=>t+(n.quantity??0),0)}function KY(){const e=Cc();return w(()=>{const t=e.value;if(!t)return{};const n={};for(const r of t){if(r.status!=="available")continue;const o=Qr(r);if(!o)continue;const{methodType:i}=o,a=bU(r.targetMerchandiseLines);n[i]=(n[i]??0)+a}return n})}const PU="cross-border-consolidation-modal";function SU(){const{checkout:e,i18n:t}=b(),n=nb(),r=e.crossBorderConfirmState.value,o=!!(r&&!r.onCancel),i=nu(),a=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return s(or,{id:PU,open:!!r,heading:o?t.translate("split_delivery.cross_border.modal.country_changed_heading"):t.translate("split_delivery.cross_border.modal.heading"),onHide:r?.onCancel,closeButton:o?"hidden":"visible",primaryAction:s(gU,{handleSubmit:a,handleCancel:r?.onCancel,submitText:o?t.translate("general.continue_button_label"):t.translate("split_delivery.cross_border.modal.change_country"),cancelText:o?void 0:t.translate("address_management.address_form.cancel")}),children:s($,{children:t.translate("split_delivery.cross_border.modal.content")})})}function Am(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 rb(e){let t=!1,n=!1;for(const r of e){const o=r.includes("SHIPPING");for(const i of r)if(i!=="NONE"){if(i==="SHIPPING"){t=!0;continue}if(i==="PICK_UP"){n=!0;continue}if(!(i==="LOCAL"&&o))return!1}}return t&&n}function EU(e){return(e.value.targetMerchandiseLines??[]).some(t=>t.requiresShipping)}function CU(e){const t=e.filter(EU);return rb(e.map(n=>n.value.deliveryMethodTypes))&&t.some(n=>n.value.deliveryMethodTypes.includes("SHIPPING"))&&t.some(n=>n.value.deliveryMethodTypes.includes("PICK_UP"))}function kU({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const o=rb(ni(e).filter(a=>a.status==="available").map(a=>a.methods.map(({methodType:l})=>l)));return t?o:!(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)?!1:CU(n)}function zu(){const{deliveryNext:e}=q(),t=ie(),{shop:n}=b(),r=Se();return w(()=>kU({deliveryNext:e.value,isThankYouPage:$s(r.value.currentDetour),proposedDeliveryLines:t.deliveryLines.value,splitShipPickupUiEnabled:n.shipPickupInOneOrderEnabled}))}function ji(e){const t=U(e);return F(()=>{t.current=e},[e]),t}const IU=()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n},source:r}=b(),o=n.current.value==="shopPay",i=q().buyerIdentity.value?.customerProfile,{negotiating:a,methods:l}=nb(),c=kh();F(()=>{!a.value&&l.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:r.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(Ve(t),10),numberLocationsFound:c.value?.methods.length,userId:i?.id?parseInt(Ve(i.id),10):void 0,checkoutSurface:o?"shop_pay":"guest_checkout"}})},[i?.id,a.value,o,c.value?.methods.length,e,l.value,r.checkoutSessionIdentifier,t])},AU=(e,t)=>{const n=i=>i.handle===e,r=t?.findIndex(n);return{locationId:t?.find(n)?.originLocation?.id,selectedLocationRank:r}},TU=(e,t)=>{const n=U(),{userEvents:r,shop:{id:o},checkout:{identity:i},source:a}=b(),l=i.current.value==="shopPay",c=q().buyerIdentity.value?.customerProfile,u=kh(),d=u.value?.selectedDeliveryMethodHandle,p=u.value?.methods;F(()=>{const{locationId:m,selectedLocationRank:f}=AU(d,p);m&&d!==n.current&&(n.current=d,r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:a.checkoutSessionIdentifier||"",shopId:parseInt(Ve(o),10),locationId:Ve(m),selectedLocationRank:f,userId:c?.id?parseInt(Ve(c.id),10):void 0,numberLocationsFound:p?.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}))},[c?.id,l,p,r,d,a.checkoutSessionIdentifier,o])},wU=()=>{const e=xn(),t=zu(),n=Se(),r=w(()=>t.value&&!$s(n.value.currentDetour));ze(()=>{r.value&&ht(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})};function LU(){return IU(),TU(),wU(),null}function xU(){const{shippingAddress:e}=ie(),{shopPay:t,checkout:n}=b(),r=q(),o=lk(),i=n.identity.current.value==="shopPay",a=R(()=>
23{if(!o.value||r.mustSelectProvidedAddress.value)return;const c=t.session.selectedShippingAddress.value;if(!c?.address)return;const d=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),p=t.user.phoneNumber.value;e.value={...c?.address,phone:d&&!c?.address.phone?p:c?.address.phone}},[o,n.configuration.addressSettings.nonBillingAddressSettings,r.mustSelectProvidedAddress,e,t.user.phoneNumber,t.session.selectedShippingAddress]);return{correctShippingAddress:R(c=>{if(!i)return;c.includes("SHIPPING")&&a()},[a,i])}}function ob(e,t){const n=e.find(rs),r=t.find(rs);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}function RU(e){return e.reduce((t,n)=>{const{type:r,deliveryMethodTypes:o,deliveryMethodHandle:i}=n.value;return o.some(rs)?{...t,[r]:i}:t},{})}function MU(){const{deliveryLines:e}=ie(),t=U({});return{preservePickupSelectionAcrossToggles:R((r,o)=>{const i=ob(r,o);if(i.direction==="leaving"){t.current[i.pickupType]=RU(e.value);return}if(i.direction==="entering")return t.current[i.pickupType]},[e])}}function NU(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}const DU=["phone","company","address2"];function OU(e,t){if(e.coordinates)return!0;const{address1:n,city:r,firstName:o,lastName:i}=e;return n&&r&&o&&i?DU.every(a=>e[a]||!t(a)):!1}function FU(){const{locationAddress:e,shippingAddress:t}=ie(),{checkout:n,shop:r}=b(),o=r.hasFlagEnabled(ck),i=U(e.peek()),a=U(!1);return{syncLocationAddressFromShipping:R((c,u)=>{if(o||ob(c,u).direction!=="entering"||a.current)return;const d=i.current;if(d&&!NU(e.value,d)){a.current=!0;return}const p=t.value;if(!p?.countryCode)return;const{isRequired:m}=n.configuration.addressSettings.nonBillingAddressSettings.value,h=OU(p,g=>m(g,{countryCode:p.countryCode,useMerchantSettings:!0}))?p:{};e.value=uk(h,p.countryCode,p.zoneCode),i.current=e.value},[n,o,e,t])}}function Tm(e){const t=e.filter(n=>n==="SHIPPING"||n==="LOCAL");if(t.length>0)return t;if(e.length===1&&e[0]==="PICK_UP")return["PICK_UP"];if(e.length===1&&e[0]==="PICKUP_POINT")return["PICKUP_POINT"]}function BU({children:e}){const t=U(void 0),{i18n:n,checkout:r,observability:o,shop:i,router:a,webMcp:l}=b(),c=i.hasFlagEnabled(dk),u=we(!1),d=we(!1),p=ru(),{negotiate:m}=Lt(),{loading:f}=Xe(),h=r.identity.current.value==="shopPay",g=er(),y=U(new Set),_=U(),{correctShippingAddress:P}=xU(),{syncLocationAddressFromShipping:v}=FU(),{preservePickupSelectionAcrossToggles:E}=MU(),{billingAddressOption:C,deliveryLines:S,discountLines:I,merchandiseLines:k,shippingAddress:T,locationAddress:A}=ie(),L=zu(),{deliveryNext:M,shippingAddress:N}=q(),O=M.peek(),D=we(qi(T.peek())||qi(N.peek())||O!=null&&O.status!=="unavailable"),B=co();ze(()=>{(qi(N.value)||M.value?.status==="filled"||M.value?.status==="partial")&&(D.value=!0)});const z=a.currentUrlMatches("/stock-problems"),[x]=i0("ONE_TIME_PURCHASE"),W=Je(x),[X,Z]=ey(),ce=a0(),j=!c,Q=Je(X),H=w(()=>Uf(M.value)||pk(S.value)||L.value),J=w(()=>H.value?Q.value:W.value),he=V(()=>
23{if(H.peek())return;const re=g.peek().enabledDeliveryMethods??[];if(!VU(re))return;const[se]=J.peek();if(se!=="PICK_UP")return{activeMethod:se,targetMethod:"PICK_UP"}},[H,J,g]),ne=we(he!=null),ae=w(()=>{if(r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return J.value;if(!H.value){const se=g.value.enabledDeliveryMethods??[],Me=il(se),Re=M.value?.status==="unavailable"&&!D.value,[je]=J.value;return he&&ne.value&&!d.value?[he.targetMethod]:Re&&!d.value&&Me&&je!=="PICKUP_POINT"?["SHIPPING"]:je?[je==="LOCAL"?"SHIPPING":je]:[]}const re=J.value.filter(se=>se!=="LOCAL");return!re.includes("SHIPPING")&&J.value.includes("LOCAL")&&re.push("SHIPPING"),re}),ue=R((re,se)=>{if(B.value)return;const Me=il(re),Re=il(se);se.some(rs)&&!Re&&(!h&&Me&&t.current==null&&(t.current=C.value),C.value="custom"),Re&&!Me&&!h&&(i.requireMatchingShippingAndBilling?C.value="shipping":t.current==null?C.value=i.sameBillingAndShippingAddress?"shipping":"custom":C.value=t.current,t.current=void 0)},[i,h,B,C]),Ae=U(ae.peek());ze(()=>{const re=Ae.current,se=ae.value;Ae.current=se,re!==se&&ht(()=>ue(re,se))});const me=R((re,se,Me)=>{ue(se,re),Ae.current=re,P(re),Me?A.value=Me:v(se,re);const Re=Me?void 0:E(se,re),je=Tm(re);rn(()=>{i.shipPickupInOneOrderEnabled&&mk(S),Z(re),i.shipPickupInOneOrderEnabled&&je&&zd({deliveryLines:S,merchandiseLines:k.value,deliveryMethodTypes:je}),ce(void 0),Re&&Fs(S,Re),Hd(I),ne.value=!1})},[ue,P,A,v,E,i.shipPickupInOneOrderEnabled,S,Z,k,ce,I,ne]),ye=R((re,se=ae.value,Me)=>{const Re=!h&&!B.value&&!se.includes("SHIPPING")&&re.includes("SHIPPING")?[]:["deliveryNext"];return me(re,se),u.value=!0,p?.dispatch?.("deliveryMethodChanged"),m({include:Re,onComplete:je=>{const Bt=f.value.has("deliveryNext");if(je.status==="stale"&&Bt){const Ct=f.subscribe(Xt=>{Xt.has("deliveryNext")||(rn(()=>{u.value=!1,Me?.()}),Ct())})}else rn(()=>{u.value=!1,Me?.()})}})},[ae,h,B,me,u,p,m,f]),Ee=w(()=>r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),Ue=w(()=>Sc({checkout:r})),Ce=w(()=>Am(g.value.enabledDeliveryMethods??[],Ue.value));F(()=>l?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>Ce.value,getSelectedMethodTypes:()=>ae.value,markBuyerSelection:()=>{d.value=!0,ne.value=!1},applyMethodChange:me,reconcileSameMethod(re){const se=Tm(re);i.shipPickupInOneOrderEnabled&&se&&zd({deliveryLines:S,merchandiseLines:k.value,deliveryMethodTypes:se})&&Hd(I)}}),[l,Ce,ae,d,ne,me,S,k,i.shipPickupInOneOrderEnabled,I]);const K=w(()=>{const re=wm(Ce.value,n,i,j);return Ee.value?re.filter(se=>ae.value.includes(se.id)):re}),te=w(()=>{if(Ee.value)return K.value;const re=y.current,se=Am([...g.value.enabledDeliveryMethods??[],...re],Ue.value),Me=se.length>Ce.value.length?wm(se,n,i,j):K.value;return Me.length>1&&Me.forEach(Re=>re.add(Re.id)),Me}),pe=V(()=>yU({isStockProblems:z,shippingRequired:fk(r.proposal),deliveryMethodOptions:te.value.map(({value:re})=>re),mustSelectProvidedShippingRate:Ee.value,isSplitShipAndPickup:L.value,initialPickupOnlySelection:he,deliveryNext:M.value,currentSelectedMethods:ae.value}),[]),ge=we(pe!=null);ze(()=>{const re=K.value,se=te.value;if(re===se||se.length<=1){_.current=void 0;return}const Me=JSON.stringify([se.map(({id:Re})=>Re),re.map(({id:Re})=>Re)]);_.current!==Me&&(_.current=Me,o.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:se.length,currentOptionCount:re.length}))}),F(()=>{if(!pe||d.value){ge.value=!1;return}ye(pe.nextMethods,pe.previousMethods,()=>{ge.value=!1})?.catch(re=>{rn(()=>{u.value=!1,ge.value=!1}),o.error(re)})},[]);const Ie=R(re=>{const se=te.value.find(Me=>Me.id===re[0]);se&&(d.value=!0,ye(se.value))},[te,ye,d]),_e=ji(Ie),ke=w(()=>te.value.length<=1),Ne=w(()=>{if(!ke.value)return{options:te,selected:ae,select:re=>{_e.current(re)},variant:j?"next":"default"}}),nt=V(()=>({negotiating:u,initialReconciliationPending:ge,methods:ae,setSelectedMethodTypes:ye}),[u,ge,ae,ye]);return s(Uu.Provider,{value:nt,children:[s(LU,{}),s(ve,{when:L,children:s(SU,{})}),s(tb.Provider,{value:Ne.value,children:e})]})}function il(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function VU(e){return e.length===1&&e[0]==="PICK_UP"}function wm(e,t,n,r){const o=[],i=typeof n.translations.delivery_options=="object"?n.translations.delivery_options:void 0,a=e.some(([d])=>d==="PICKUP_POINT"),l=e.find(([d])=>d==="SHIPPING");if(l){const d=!!i?.ship_to_address,p=a&&(!r||d)?t.translate("delivery_options.ship_to_address"):t.translate("delivery_options.ship");o.push({id:"SHIPPING",value:l,label:p,icon:r?Rr.PackageDelivery:Rr.Truck})}
23const c=e.find(([d])=>d==="PICK_UP");if(c){const d=!!i?.pick_up,p=!!i?.pick_up_from_store,m=a?p:d,f=a?t.translate("delivery_options.pick_up_from_store"):t.translate("delivery_options.pick_up"),h=a?t.translate("delivery_options.pickup_store"):t.translate("delivery_options.pickup");o.push({id:"PICK_UP",value:c,label:r&&!m?h:f,icon:r&&!a?Rr.Location:Rr.Store})}const u=e.find(([d])=>d==="PICKUP_POINT");if(u){const d=!!i?.pickup_point_method_definition,p=r&&!d?t.translate("delivery_options.pickup_point"):t.translate("delivery_options.pickup_point_method_definition");o.push({id:"PICKUP_POINT",value:u,label:p,icon:Rr.Location})}return o}function ib(){const{i18n:e}=b();return R((t,n={})=>{const r=new Date(t),o=new Date(Date.now()).getFullYear(),i=n.month??"long",a=r.getFullYear()>o?"numeric":void 0;return e.formatDate(r,{month:i,day:"numeric",year:a})},[e])}function Hu(){const{shop:{captureAtFulfillmentEnabled:e}}=b(),t=q(),n=t.buyerIdentity,r=t.paymentFlexibilityPaymentTermsTemplate;return w(()=>r.value?.type==="FULFILLMENT"&&e===!0&&!n.value?.purchasingCompany)}const UU="$.availableRedeemables.redeemable",JY=e=>"target"in e?e.target===UU:!1;function sl(e,t){if(!e||!t||e.redemptionSource!==t.redemptionSource)return!1;if(e.redemptionSource==="CUSTOM")return zU(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function zU(e,t){return!e||!t?!1:e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&HU(e?.redemptionAttributes,t?.redemptionAttributes)}function HU(e,t){return!e||!t||e.length!==t.length?!1:e.every(n=>t.some(r=>n.key===r.key&&n.value===r.value))}function qU(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function GU(e){return e?`•••• ${e}`:""}class WU extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function $U(){const e=q().paymentMethods;return w(()=>{const t=e.value?.flatMap(n=>n.type==="redeemable"&&n.redemptionSource==="CUSTOM"?[n]:[]);if(!(t===void 0||t.length===0)){if(t.length>1)throw new WU(`There can only be a single custom redeemable payment method per redeemable type.
24Gift card is currently the only supported redeemable type`);return t[0]}})}function sb(){const e=$U(),[t,n]=oe([]),r=kc("CUSTOM"),o=V(()=>r.value.filter(m=>{const f=t.some(g=>sl(g,m.method)),h=!m.cost||m.cost.amount===0;return f||h?!1:!!m.method.redemptionContent}),[r.value,t]),i=Ft(),{negotiate:a}=Lt(),l=!!e.value,c=R(m=>{const f=y=>y.type==="redeemable"&&y.redemptionSource==="CUSTOM"?!sl(m,y):!0,h=i.parts.paymentLines.value;i.parts.paymentLines.value=h.filter(y=>f(y.method));const g=i.parts.availableRedeemables.value;i.parts.availableRedeemables.value=g?.filter(y=>f(y.paymentMethod))},[i]),u=R((m,f)=>{const h=jU(m,f);if(h){const g=i.parts.paymentLines.value;return i.parts.paymentLines.value=[...g,...h?[h]:[]],new Promise(y=>{a({include:["paymentLines"],onComplete:_=>{_.status==="error"&&_.violations.some(eh)&&c(h.method),y(_)}})})}else return Promise.resolve(null)},[a,i,c]),d=R(m=>{const f=i.parts.paymentLines.value.length;return c(m),n(h=>[...h,m]),f>i.parts.paymentLines.value.length?new Promise(h=>{a({include:["paymentLines"],onComplete:g=>{n(y=>y.filter(_=>!sl(_,m))),h(g)}})}):Promise.resolve()},[a,i,c]),p=R(()=>{const m=i.parts.paymentLines.value,f=m.length;return i.parts.paymentLines.value=m.filter(h=>{const{method:g}=h;return!(g.type==="redeemable"&&g.redemptionSource==="CUSTOM")}),f>i.parts.paymentLines.value.length?new Promise(h=>{a({include:["paymentLines"],onComplete:g=>{h(g)}})}):Promise.resolve()},[a,i]);return{canApplyGiftCards:l,paymentMethod:e.value,paymentLines:o,submit:u,remove:d,removeAll:p}}function qu(){const e=q().paymentLines;return w(()=>e.value?.lines.filter(t=>t.method.type==="giftCard")??[])}function Ci(){const e=kc("STORE_CREDIT"),{paymentLines:t}=sb(),n=qu();return w(()=>{const r=!!e.value.length,o=!!t.length,i=!!n.value.length;return r||o||i})}const YU=0;function jU(e,t){return!t||t.amount<=0?null:{method:e.paymentMethod,cost:{amount:YU,currencyCode:t.currencyCode}}}function Gu(){const e=ii(),t=Se(),n=Bn(),r=q(),o=Hu(),i=ib(),a=Ci(),{shop:l,checkout:c,embed:u,i18n:d,source:p,shopPay:m}=b(),{orderSummary:f}=Fe(),h=l?.name,g=f.totalLabel,y=qt(u?.embedder),_=Ih(m.app.config);return w(()=>{const{currentPage:P,plan:v,currentDetour:E}=t.value,C=r.deferredTotal.value,S=r.paymentFlexibilityPaymentTermsTemplate.value,I=c.configuration.orderSummary?.layoutStyle==="COMPACT";let k;g==="TOTAL"?k=d.translate("order_summary.total_label"):y?k=d.translate("universal.iframes.subtotal_label"):g==="ORDER_TOTAL"?k=d.translate("order_summary.order_total_label"):I&&h&&!_?k=d.translate("order_summary.pay_merchant_label",{merchant_name:h}):k=d.translate("order_summary.total_label");const T=y?k:d.translate("order_summary.total_due_label"),A=E?.type==="thankYou",L=C&&C.amount.amount>0;if(e.value&&A)return d.translate("order_summary.deferred_payment_info.paid_today_next");if(st(p))return d.translate("order_summary.total_due_label");if(n.value)return d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft");if(L)return d.translate("order_summary.payment_terms_totals.due_today_next");if(S){if(o.value)return a.value?T:k;if(S?.dueDate){const M=i(S.dueDate,{month:"short"});return d.translate("order_summary.deferred_total_due_date_label_next",{date:M})}return S?.type==="FULFILLMENT"?d.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):S?.type==="RECEIPT"?d.translate("order_summary.total_due_later_label"):d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return A?a.value?d.translate("order_summary.total_paid_label"):d.translate("order_summary.partial_total_label"):yn(P,v.greenPath[v.greenPath.length-1])?a.value?T:k:a.value?T:d.translate("order_summary.partial_total_label")})}var KU={Abbreviation:"_1qifbzv1 _1qifbzv0 _1fragem128"};function Wu({children:e,id:t,title:n}){return s("abbr",{className:KU.Abbreviation,id:t,title:n,children:e})}function Lm(){const e=hk(),t=gk(),n=q(),r=si(),o=n.deferredTotal,{i18n:i}=b(),a=Je(Vy()),l=Ci(),c=Je(Fe()),u=wt(),d=w(()=>{const p=r.value,m=e.value;if(!p||!m)return;const f=i.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"}),h=p.amount<m.amount&&!t.value&&!o.value&&!l.value;return{amountDue:p,paymentDueFormatted:f,priceBeforeReductionsFormatted:i.formatCurrency(m.amount,{currency:m.currencyCode,form:"short"}),showCurrencyCode:c.value.disclosure.style==="base"&&a.value&&(!u.value||!f.includes(p.currencyCode)),showSubtotalBeforeReductions:h,totalAmountDueAccessiblityLabel:h?i.translate("order_summary.price_after_discount_aria_text"):i.translate("order_summary.total_price_label")}});return s(ve,{when:d,children:({amountDue:p,paymentDueFormatted:m,priceBeforeReductionsFormatted:f,showCurrencyCode:h,showSubtotalBeforeReductions:g,totalAmountDueAccessiblityLabel:y})=>
24s(ee,{alignItems:"end",children:[g?s(G,{children:[s($,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.total_price_label")}),s($,{size:"small",color:"subdued",type:"redundant",translate:!1,children:f})]}):null,s($,{accessibilityVisibility:"exclusive",children:y}),s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:[h&&s(Wu,{children:s($,{type:"small",color:"subdued",translate:!1,children:p.currencyCode})}),s($e,{color:"base",size:"large",translate:!1,children:s($,{type:"strong",children:m})})]})]})})}const xm={"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 $u({variant:e="fan",merchandise:t,size:n,max:r=2,useImageAltTexts:o=!0,useTitleAsAltTextFallback:i=!1,useResponsiveImageSources:a=!1,sortByPrice:l=!1,showQuantityBadges:c=!0}){const u=e==="inline-discrete",d=u&&t.length>r?t.length-r+1:0,m=(l?[...t].sort((h,g)=>Rm(g)-Rm(h)):t).slice(0,r),f=Pi(n);return s("div",{className:xm[`StackedThumbnails-${e}`],style:{"--total":m.length,"--thumbnail-inline-size":gs(f.inlineSize)},children:m.map((h,g)=>{const y=i&&"title"in h?h.title:"",_=d>0&&g===m.length-1,P=c&&u&&!_&&h.quantity>1?h.quantity:void 0;return s("div",{className:xm[`StackedThumbnail-${e}`],style:{"--index":g},children:s(Qs,{src:a&&h.image?h.image.one:h.image?.url,srcSet:a&&h.image?`${h.image.one} 1x, ${h.image.two} 2x, ${h.image.four} 4x`:void 0,size:n,depth:JU(g,e),alt:o?h.image?.altText||y:"",totalItems:P,overlay:_?`+${d}`:void 0})},"stableId"in h?h.stableId:`${g}${h.title}`)})})}function Rm(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function JU(e,t){if(t==="fan")return Math.max(0,Math.min(e,2));if(t==="fan-legacy"&&e>0)return"legacy"}const XU="ik40Z",QU="Tupv7",al={Content:XU,LegacyLabel:QU};function ab(){const{disclosure:{style:e}}=Fe(),{open:t}=U_(),{i18n:n,checkout:r,source:o}=b(),i=Gu(),a=e==="base",l=w(()=>!t.value),c=r.proposal.facts.merchandiseLines??[],{value:u}=q().merchandiseLines,d=st(o)?c:u?.lines||[],p=s(Le,{type:t.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return a?s(ee,{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:al.Content,children:[s(ve,{when:t,fallback:s(ee,{direction:"inline",alignItems:"center",gap:"small-200",children:[s("span",{className:bt({screenReaders:"only"}),children:n.translate("order_summary.title")}),s($u,{variant:"inline",size:"small-200",max:3,merchandise:d,useImageAltTexts:!1}),s($,{size:"large",fonts:"secondary",type:"strong",children:i})]}),children:s($,{color:"subdued",children:n.translate("order_summary.title")})}),s(ee,{direction:"inline",alignItems:"center",gap:"small-200",children:[s(ve,{when:l,children:s(Lm,{})}),p]})]}):s(ee,{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:al.Content,children:[s(ee,{direction:"inline",alignItems:"center",gap:"small-200",className:al.LegacyLabel,children:[n.translate("order_summary.title"),p]}),s(Lm,{})]})}function lb(){const{checkout:e,embed:t,router:n}=b();return w(()=>!t?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer?!1:n.currentUrl.value.normalizedPath==="/thank-you")}const ZU="KwVFv",ez={FlagshipPartnerMask:ZU};function tz(){const e=lb();return s(ve,{when:e,children:s("div",{className:ez.FlagshipPartnerMask})})}var So={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 nz=({position:e,scrollDirection:t,variant:n})=>{const r=n.content,o=we("none");t&&(t.block&&t.inline?o.value="both":t.block?o.value="block":t.inline&&(o.value="inl
24ine"));const i=V(()=>{const l=e?.scrolledTo.block==="start",c=e?.scrolledTo.inline==="start";return o.value==="both"?l&&c:l||c},[e,o.value]),a=on(i??!1,i?"base":"fast");return s("div",{className:So.PillHintWrapper,children:s("div",{className:Y(So.PillHint,So.directionVariant[o.value],So.transitionVariant[a]),children:[r,s(Le,{size:"small",type:o.value==="block"?"arrow-down":"arrow-right",className:So.iconVariant[o.value]})]})})};var ll={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 rz=({position:e,scrollDirection:t})=>{const n=on((t?.block&&e?.scrolledTo.block!=="start")??!1,"base"),r=on((t?.block&&e?.scrolledTo.block!=="end")??!1,"base"),o=on((t?.inline&&e?.scrolledTo.inline!=="start")??!1,"base"),i=on((t?.inline&&e?.scrolledTo.inline!=="end")??!1,"base");return s(G,{children:[{name:"blockStart",transition:n},{name:"blockEnd",transition:r},{name:"inlineStart",transition:o},{name:"inlineEnd",transition:i}].map(({name:l,transition:c})=>s("div",{className:Y(ll.ShadowHint,ll.positionVariant[l],ll.transitionVariant[c])},l))})};class oz{constructor(){this.dimensions=le(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||typeof window>"u"||typeof document>"u"||!window.ResizeObserver)return;this.initialized=!0,this.container=document.createElement("div"),this.container.style.cssText=`
25      position: fixed;
26      top: -9999px;
27      left: -9999px;
28      visibility: hidden;
29      pointer-events: none;
30    `,this.container.innerHTML=`
31      <div class="scrollbar-inline-tester" style="width: 100px; height: 100px; overflow-y: scroll;">
32        <div style="height: 200px;"></div>
33      </div>
34      <div class="scrollbar-block-tester" style="width: 100px; height: 100px; overflow-x: scroll;">
35        <div style="width: 200px;"></div>
36      </div>
37    `,document.body.appendChild(this.container);const t=this.container.querySelector(".scrollbar-inline-tester"),n=this.container.querySelector(".scrollbar-block-tester"),r=()=>{this.dimensions.value={inline:t.offsetWidth-t.clientWidth,block:n.offsetHeight-n.clientHeight}};r(),this.resizeObserver=new ResizeObserver(r),this.resizeObserver.observe(n),this.resizeObserver.observe(t)}}const iz=new oz,sz=1/20*1e3,az=(e,t,n,r,o,i)=>{const a=we(null),l=we(null),c=w(()=>{const m=iz.getDimensionsSignal().value;return!m||!l.value?null:n?{inline:l.value.block?m.inline:0,block:l.value.inline?m.block:0}:{inline:0,block:0}}),u=w(()=>c.value?{inline:c.value.inline>0,block:c.value.block>0}:null),d=V(()=>Ug(()=>{const m=e.current;if(!m)return;const f=a.value,h=l.value;l.value=dz(m,t),a.value=uz(m,l.value),typeof r=="function"&&r(a.value),o&&typeof o=="function"&&lz(h,l.value)&&o(l.value),i&&typeof i=="function"&&cz(f,a.value)&&i(a.value)},sz),[t,r,o,i,l,a,e]),p=R(()=>{d()},[d]);return Mt(()=>{const m=e.current;if(!m||!("onscroll"in m)||!window.ResizeObserver)return;p();const f=new ResizeObserver(p);return f.observe(e.current),m.addEventListener("scroll",p,{passive:!0}),()=>{f.disconnect(),m.removeEventListener("scroll",p)}},[e,p]),{scrollPosition:a.value,scrollDirection:l.value,scrollbarDimensions:c.value,scrollbarVisible:u.value}},lz=(e,t)=>e?.inline!==t.inline||e?.block!==t.block,cz=(e,t)=>{if(!e)return!1;const n=e.scrolledTo.inline!==t.scrolledTo.inline&&t.scrolledTo.inline!==null,r=e.scrolledTo.block!==t.scrolledTo.block&&t.scrolledTo.block!==null;return n||r},Mm=(e,t)=>e?"start":t?"end":null,uz=(e,t)=>{const n=e.scrollLeft===0,r=e.scrollTop===0,o=Math.abs(e.scrollLeft),i=Math.abs(o+e.clientWidth-e.scrollWidth)<1,a=Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<1;return{position:{inline:o,block:e.scrollTop},scrolledTo:{inline:t.inline?Mm(n,i):null,block:t.block?Mm(r,a):null}}},dz=(e,t)=>
37{const n=e.scrollWidth>e.clientWidth,r=e.scrollHeight>e.clientHeight;return{inline:n&&t.inline,block:r&&t.block}};var Ut={ContentWrapper:"_1b9t7yp0",scrollbarWidthNone:"_1b9t7ypi",ScrollBox:"_1b9t7yp2 _1b9t7yp1 _1fragemup _1fragemv4 _1fragemws _1fragem64",ScrollViewportOverlay:"_1b9t7ypg _1b9t7ypf _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem11z _1fragem12w",visuallyHidden:"_1b9t7yph _1fragem121",borderVariant:{blockStart:"_1b9t7ypn _1b9t7ypj _1fragemel",blockEnd:"_1b9t7ypo _1b9t7ypk _1fragemf5",inlineStart:"_1b9t7ypp _1b9t7ypl _1fragemdh",inlineEnd:"_1b9t7ypq _1b9t7ypm _1frageme1"},clipVariant:{blockStart:"_1b9t7yp8",blockEnd:"_1b9t7yp9"},bleedProductThumbnailsScrollBox:"_1b9t7ypa",bleedProductThumbnailsContentWrapper:"_1b9t7ypc _1b9t7ypb",bleedProductThumbnailsWithBadgeScrollBox:"_1b9t7ypd",bleedProductThumbnailsWithBadgeContentWrapper:"_1b9t7ype _1b9t7ypb"};const cb=io(Wc(function({accessibilityActiveDescendant:t,accessibilityLabel:n,accessibilityRole:r="generic",accessibilityVisibility:o="visible",background:i="transparent",backgroundHoverAndFocus:a,bleed:l="none",blockSize:c="auto",border:u="none",borderColor:d,borderRadius:p="none",borderStyle:m,borderWidth:f,children:h,className:g,display:y="auto",hint:_={type:"shadow"},id:P,inlineSize:v="auto",maxBlockSize:E="none",maxInlineSize:C="none",minBlockSize:S="0",minInlineSize:I="0",onScroll:k,onScrollable:T,onScrolledToEdge:A,overflow:L="auto",padding:M="none",paddingBlock:N,paddingBlockEnd:O,paddingBlockStart:D,paddingInline:B,paddingInlineEnd:z,paddingInlineStart:x,scrollbarWidth:W="auto",scrollTo:X}){const{Element:Z,role:ce}=di(r),{className:j,style:Q,styleElement:H}=At({backgroundColor:i,backgroundColorHoverAndFocus:a,blockSize:c,..._r({border:u,borderColor:d,borderStyle:m,borderWidth:f}),borderRadius:p,display:y,inlineSize:v,maxBlockSize:E,maxInlineSize:C,minBlockSize:S,minInlineSize:I},{transforms:{display:qc}}),{className:J,style:he,styleElement:ne}=At({overflow:L,padding:M,paddingBlock:N,paddingInline:B,paddingBlockEnd:O,paddingBlockStart:D,paddingInlineEnd:z,paddingInlineStart:x}),ae=U(null),[ue,Ae=ue]=L.trim().split(/\s+/),me=V(()=>({inline:Ae==="auto",block:ue==="auto"}),[Ae,ue]),{scrollPosition:ye,scrollDirection:Ee,scrollbarVisible:Ue,scrollbarDimensions:Ce}=az(ae,me,W==="auto",k,T,A),K=Y(Ee?.block&&ye?.scrolledTo.block!=="start"&&Ut.borderVariant.blockStart,Ee?.block&&ye?.scrolledTo.block!=="end"&&!Ue?.block&&Ut.borderVariant.blockEnd,Ee?.inline&&ye?.scrolledTo.inline!=="start"&&Ut.borderVariant.inlineStart,Ee?.inline&&ye?.scrolledTo.inline!=="end"&&!Ue?.inline&&Ut.borderVariant.inlineEnd),te=Y(l!=="none"&&Ee?.block&&ye?.scrolledTo.block!=="start"&&Ut.clipVariant.blockStart,l!=="none"&&Ee?.block&&ye?.scrolledTo.block!=="end"&&!Ue?.block&&Ut.clipVariant.blockEnd);return Mt(()=>{if(!X||!ae.current)return;const pe="smooth",ge=ae.current;if(X instanceof HTMLElement){X.scrollIntoView({behavior:pe,block:"start",inline:"start"});return}const Ie=document.dir==="rtl",_e={block:X.block??0,inline:(X.inline??0)*(Ie?-1:1)};ge.scrollTo({behavior:pe,top:_e.block,left:_e.inline})},[X]),s(G,{children:[H,ne,s("div",{"aria-hidden":o==="hidden"?!0:void 0,className:Y(Ut.ScrollBox,j,o==="exclusive"&&Ut.visuallyHidden,l==="product-thumbnails"&&Ut.bleedProductThumbnailsScrollBox,l==="product-thumbnails-with-badge"&&Ut.bleedProductThumbnailsWithBadgeScrollBox,te),style:Q,children:[s(Z,{id:P,role:ce,"aria-activedescendant":t,"aria-label":n,className:Y(Ut.ContentWrapper,W==="none"&&Ut.scrollbarWidthNone,J,g,l==="product-thumbnails"&&Ut.bleedProductThumbnailsContentWrapper,l==="product-thumbnails-with-badge"&&Ut.bleedProductThumbnailsWithBadgeContentWrapper),tabIndex:0,style:he,ref:ae,children:h}),s("div",{className:Y(Ut.ScrollViewportOverlay,K),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:Ce?.inline,marginBlockEnd:Ce?.block},children:[_?.type==="pill"&&s(nz,{variant:_,scrollDirection:Ee,position:ye,scrollbarVisible:W==="auto"}),_?.type==="shadow"&&s(rz,{variant:_,scrollDirection:Ee,position:ye,scrollbarVisible:W==="auto"})]})]})]})}));var Kl={FormattedText:"go06b0",ScrollableTable:"go06b1"};const pz=/<table[\s>]/i;function mz(e){if(typeof DOMParser>"u"||!pz.test(e))return null;const{body:t}=new DOMParser().parseFromString(e,"text/html");return t.querySelector("table")?ub(t.childNodes,!1):null}function ub(e,t){const n=[];for(const[r,o]of Array.from(e).entries()){if(o.nodeType===Node.TEXT_NODE){n.push(o.textContent);continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;const i=o,a=i.tagName.toLowerCase(),l={key:r};for(const d of Array.from(i.attributes))l[d.name]=d.value;const c=i.childNodes.length?ub(i.childNodes,t||a==="table"):void 0,u=fs(a,l,c);a==="table"&&!t?n.push(s(cb,{overflow:"hidden auto",className:Kl.ScrollableTable,children:u},r)):n.push(u)}return n}function kr({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const o=oo()?"span":"div",i=e?.__html,a=V(()=>t==="all"&&i!=null?mz(i):null,[t,i]);return typeof n=="string"?s(G,{children:n.split(`
38`).map((l,c)=>s(G,{children:[c>0&&s("br",{}),l]},`content-${c}}`))}):a?s(o,{className:Kl.FormattedText,children:a}):s(o,{dangerouslySetInnerHTML:e,className:Kl.FormattedText,children:n})}const Yu=Ge(null);Yu.displayName="SelectContext";function fz(){return Pe(Yu)}function Zo(e){return`error-for-${e}`}var Nm={InlineError:"ksaxnz0 _1fragemxr",Icon:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t"};function ta({children:e,controlID:t,type:n}){return n==="warning"?s(gt,{id:t?Zo(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[s("div",{className:Nm.Icon,children:s(Le,{type:"info"})}),s($,{children:e})]}):s("div",{className:Nm.InlineError,id:t?Zo(t):void 0,children:e})}function hz(e,t=" "){return e.filter(n=>n!=null&&n!==!1&&n!==""&&n!==0&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="bigint"&&typeof n!="object").join(t)}var gz={Truncate:"rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"};function ki({children:e}){return s("span",{className:Y(gz.Truncate),children:e})}var us={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12e _1fragem12t _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},Text:"xpgeoa5",visuallyHidden:"xpgeoa6 _1fragem121"};function Jl({htmlFor:e,label:t,variant:n,className:r}){return s("label",{id:`${e}-label`,htmlFor:e,className:Y(us.positionVariant[n],r),children:s("span",{className:us.Text,children:s(ki,{children:t})})})}var Oe={Accessory:"_7ozb2u1m _7ozb2u1l _1fragemws _1fragem2d _1fragemyb",accessoryPositionEnd:"_7ozb2u1o",accessoryPositionStart:"_7ozb2u1n",ActualInput:"_7ozb2ur",Field:"_7ozb2uq _7ozb2up _1fragemws _1fragemzf _1fragem11y _1fragem12u _1fragem12b",fieldInsetEnd:"_7ozb2u3",fieldInsetStart:"_7ozb2u2",fieldLabelInside:"_7ozb2uv _7ozb2uu _1fragem12j _1fragem12e _1fragem12t",fieldLetterCaseVariant:{uppercase:"_7ozb2u1q"},fieldMultiline:"_7ozb2u13",fieldPrefixed:"_7ozb2uz _7ozb2uy _1fragem12o",fieldPrefixSpacing:{small:"_7ozb2u10",base:"_7ozb2u11"},fieldTypeVariant:{number:"_7ozb2u14",tel:"_7ozb2u15",text:"_7ozb2u16",email:"_7ozb2u17",url:"_7ozb2u18",password:"_7ozb2u19"},FieldWrapper:"_7ozb2un",fieldWrapperMultiline:"_7ozb2uo",floatingLabelOnContent:"_7ozb2us",floatingLabelOnFocus:"_7ozb2ut",Icon:"_7ozb2u1d _7ozb2u1c _1fragemws _1fragem2d",iconPositionVariant:{start:"_7ozb2u1e",end:"_7ozb2u1f"},MultilineClone:"_7ozb2u1b _7ozb2u1a _1fragem6y",Prefix:"_7ozb2u1h _7ozb2u1g _1fragemws _1fragem2d",prefixInside:"_7ozb2u1i",segmentVariant:{start:"_7ozb2u0",end:"_7ozb2u1"}
38,setFieldLabelIsNotVisible:"_7ozb2u12",Suffix:"_7ozb2u1k _7ozb2u1j _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:"_7ozb2u1p",Wrapper:"_7ozb2u5 _7ozb2u4 _1fragem7s _1fragem9l _1fragemws _1fragem6t",wrapperLabelInside:"_7ozb2u7 _7ozb2u6 _1fragemy6",wrapperVarsSetter:{labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},inert:"_7ozb2u1r _1fragemz0"};const yz=tt("TextField"),vz={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},ju=Ke(function({accessibilityDescription:t,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:o,ariaAutocomplete:i,ariaControls:a,ariaExpanded:l,ariaHasPopup:c,ariaLabel:u,ariaLive:d,ariaOwns:p,autoCapitalize:m,autocomplete:f="on",autoCorrect:h,autoFocus:g,controlledValue:y,defaultValue:_,disabled:P,error:v,icon:E,id:C,disablePasswordManagers:S,inputMode:I,label:k,labelAccessibilityVisibility:T="visible",labelPosition:A,labelWhenEmpty:L,letterCase:M,max:N,maxLength:O,min:D,minLength:B,name:z,onBlur:x,onChange:W,onFocus:X,onInput:Z,onInputCommit:ce,onKeyDown:j,onWheel:Q,placeholder:H,prefix:J,prefixSpacing:he="base",readOnly:ne,required:ae,role:ue,rows:Ae,segment:me,step:ye,suffix:Ee,type:Ue="text",value:Ce},K){const{control:{border:te,labelPosition:pe="inside"},textField:{border:ge}}=ct(),Ie=ge||te||"full",_e=A??pe,ke=En(),Ne=Ce??void 0,nt=y??void 0,re=Ye(C,yz),se=t?`${re}-description`:void 0,Me=se?s($,{accessibilityVisibility:"exclusive",id:se,children:t}):null,[Re,je]=oe(!1),[Bt,Ct]=bz(nt??Ne),Xt=R(Zt=>{Z?.(Zt),Ct(Zt)},[Z,Ct]);function De(Zt){Ae!==void 0||!W||Zt.key==="Enter"&&W(Zt.currentTarget.value)}const de=Pz(v,re),xe=!!v&&Yn(v)!=="warning",rt=Y(Oe.TextField,Oe.textFieldColorLayerVariant[xe?"controlInvalid":"control"],Oe.textFieldBorderVariant[Ie],(P||ke)&&Oe.textFieldDisabled,ke&&Oe.inert,ne&&Oe.textFieldReadOnly,Re&&Oe.textFieldFocused,xe&&Oe.textFieldError,me&&Oe.segmentVariant[me]),ft
38=k&&T==="visible";let pt=Oe.floatingLabelOnContent;_e==="outside"?pt=us.floating:J&&(pt=Oe.floatingLabelOnFocus);const Qt=_e!=="outside"&&!Ae&&Ie==="full";return s(G,{children:s("div",{className:Y(Oe.Wrapper,Oe.wrapperVarsSetter[_e==="outside"?"labelOutside":"labelInside"],_e==="inside"&&Oe.textFieldColorLayerVariant[v?"controlInvalid":"control"],_e==="inside"&&Oe.wrapperLabelInside,ft&&pt),"data-form-layout-connectable":Qt?"true":"false",children:[ft&&_e==="outside"&&s(Jl,{variant:"outside",htmlFor:re,label:k}),k&&T==="exclusive"&&s("label",{id:`${re}-label`,htmlFor:re,className:us.visuallyHidden,children:k}),s("div",{className:rt,children:[Me,ft&&_e==="inside"&&s(Jl,{variant:"inside",htmlFor:re,label:k}),s(_z,{accessibilityDescription:t,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:o,ariaAutocomplete:i,ariaControls:a,ariaDescribedBy:se,ariaExpanded:l,ariaHasPopup:c,ariaLabel:u,ariaLive:d,ariaOwns:p,autoCapitalize:m,autocomplete:f,autoCorrect:h,autoFocus:g,controlledValue:y,defaultValue:_,disabled:P,error:v,icon:E,id:re,disablePasswordManagers:S,inputMode:I,label:k,labelAccessibilityVisibility:T,labelPosition:_e,labelWhenEmpty:L,letterCase:M,localValue:Bt,max:N,maxLength:O,min:D,minLength:B,name:z,onBlur:()=>{je(!1),x?.()},onChange:W,onFocus:()=>{je(!0),X?.()},onInput:Xt,onInputCommit:ce,onKeyDown:j??De,onWheel:Q,placeholder:H,prefix:J,prefixSpacing:he,readOnly:ne,ref:K,required:ae,role:ue,rows:Ae,step:ye,suffix:Ee,type:Ue,value:Ce})]}),de]})})}),Ku=ju,_z=Ke(function({accessoryEnd:t,accessoryStart:n,ariaActiveDescendant:r,ariaAutocomplete:o,ariaControls:i,ariaDescribedBy:a,ariaExpanded:l,ariaHasPopup:c,ariaLabel:u,ariaLive:d,ariaOwns:p,autoCapitalize:m,autocomplete:f,autoCorrect:h,autoFocus:g,disabled:y,labelWhenEmpty:_,error:P,icon:v,id:E,disablePasswordManagers:C,inputMode:S,label:I,labelAccessibilityVisibility:k,labelPosition:T,letterCase:A,localValue:L,max:M,maxLength:N,min:O,minLength:D,name:B,onBlur:z,onChange:x,onFocus:W,onInput:X,onInputCommit:Z,onKeyDown:ce,onWheel:j,placeholder:Q,prefix:H,prefixSpacing:J,readOnly:he,required:ne,role:ae,rows:ue,step:Ae,suffix:me,type:ye,value:Ee},Ue){const Ce=hi({active:!!P&&Yn(P)!=="warning"}),K=U(),te=R(Vt=>{typeof Ue=="function"?Ue(Vt):Ue&&(Ue.current=Vt),K.current=Vt,Ce.current=Vt,Vt&&(L?Vt.value!==L:Vt.value!==(Ee??""))&&Vt.dispatchEvent(new Event("input"))},[Ue,Ce]),pe=yy(),ge=li(),Ie=En();F(()=>{g&&!Ie&&K.current?.focus()},[g,Ie]);const{control:{labelPosition:_e="inside"}}=ct(),ke=T??_e,Ne=typeof v=="object"?v.source:v,nt=typeof v=="object"?v.position??"start":"start",re=Ne!==""&&Ne&&s("div",{className:Y(Oe.Icon,Oe.iconPositionVariant[nt]),"aria-hidden":"true",onClick:()=>K.current?.focus(),children:s(Le,{type:Ne})}),se=I&&k==="visible",Re=!!(ye==="email"||f?.split(/\s+/).includes("email"))||ye==="tel"||ye==="number",Bt=(!ye||ye==="text")&&!!L;let Ct;Re?Ct="ltr":Bt?Ct="auto":Ct=void 0;const Xt=H&&s("div",{id:`${E}-prefix`,className:Y(Oe.Prefix,Oe.withTypography,se&&ke==="inside"&&Oe.prefixInside),"aria-hidden":"true",onClick:()=>K.current?.focus(),children:H}),De=Y(Oe.Field,ke==="inside"&&Oe.fieldLabelInside,!!H&&Oe.fieldPrefixed,!!J&&Oe.fieldPrefixSpacing[J],!se&&Oe.setFieldLabelIsNotVisible,!!(H||n||re&&nt==="start")&&Oe.fieldInsetStart,!!(me||t||re&&nt==="end")&&Oe.fieldInsetEnd,!!ue&&Oe.fieldMultiline,A&&Oe.fieldLetterCaseVariant[A],ye&&Oe.fieldTypeVariant[ye],Oe.withTypography),de=a||P?hz([a,P&&Zo(E)]):void 0,xe=S??(ye==="number"?"decimal":void 0),rt=H?` ${E}-prefix`:"",ft=me?` ${E}-suffix`:"";let pt;ke==="outside"?pt=Q:k==="visible"&&(pt=_??I);const Qt=fs(ue?"textarea":"input",{...C?vz:void 0,id:E,min:O,max:M,step:Ae,maxLength:N,minLength:D,name:B,placeholder:pt,className:Y(De,Oe.ActualInput),required:ne,type:ue?void 0:ye,disabled:y,readOnly:he,inputMode:xe,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":i,"aria-owns":p,"aria-describedby":de,"aria-expanded":l,"aria-hidden":Ie?!0:void 0,"aria-invalid":P&&Yn(P)!=="warning"?"true":void 0,"aria-label":u,"aria-live":d,"aria-required":ne,"aria-labelledby":I?`${E}-label${rt}${ft}`:void 0,"aria-haspopup":c,onBlur:({currentTarget:{value:Vt}})=>{if(!pe.current)return;Vt!==(Ee||"")&&x?.(Vt),z?.()},onChange(Vt){const{currentTarget:{value:Ii}}=Vt,da=Vt.nativeEvent??Vt,{isTrusted:YP}=da,pa="inputType"in da?da.inputType:void 0;pa!=="insertCompositionText"&&pa!=="deleteCompositionText"&&Z?.(Ii),(!YP||!pa)&&x?.(Ii),X?.(Ii)},onFocus:()=>{W?.()},onKeyDown:ce,onWheel:j,ref:te,role:ae,rows:ue,value:L??"",autoComplete:f,autoF
38ocus:g&&!Ie,form:ge?.nested?ge.id:void 0,tabIndex:Ie?-1:void 0,autoCorrect:h,autoCapitalize:m,dir:Ct}),Zt=!!ue&&s("div",{"aria-hidden":"true",className:Y(Oe.MultilineClone,De),dir:Ct,children:[L," "]}),HP=Y(Oe.FieldWrapper,!!ue&&Oe.fieldWrapperMultiline),qP=ue?s("div",{className:HP,children:[Qt,Zt]}):Qt,GP=me&&s("div",{id:`${E}-suffix`,className:Y(Oe.Suffix,Oe.withTypography),"aria-hidden":"true",onClick:()=>K.current?.focus(),children:me}),WP=n&&s("div",{className:Y(Oe.Accessory,Oe.accessoryPositionStart),children:n}),$P=t&&s("div",{className:Y(Oe.Accessory,Oe.accessoryPositionEnd),children:t});return s(G,{children:[re,Xt,qP,WP,GP,$P]})});function bz(e){const t=Sz(e),[n,r]=oe(t),o=U(t),i=U(e);let a=n;return o.current!==t&&(o.current=t,r(t),a=t),typeof e=="object"&&i.current!==e&&r(t),i.current=e,[a,r]}function Pz(e,t){if(typeof e!="boolean")return e!==void 0&&e?s(ta,{controlID:t,type:Yn(e)==="warning"?"warning":void 0,children:e&&typeof e=="object"&&"value"in e?e?.value:e}):null}function Yn(e){if(e&&typeof e=="object"&&"type"in e)return e.type}function Sz(e){if(e!=null)return typeof e=="object"&&"value"in e?e.value==null?void 0:String(e.value):String(e)}var Ez={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},Bi={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const Cz="RD23h",kz="VZudx",Iz="XDBWz",Az="ZHJU6",Tz="_87H7J",wz="VXrUd",en={Wrapper:Cz,SelectWrapper:kz,"Label-positionInside":"QCxaD",LabelText:Iz,"Label-isFloating":"A9HkF",Select:Az,"Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:Tz,"Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:wz,"Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},wo="",Lz=tt("Select");function db({children:e,id:t,name:n,label:r,value:o=wo,disabled:i,readOnly:a,required:l,error:c,autocomplete:u="on",placeholder:d,onChange:p,onBlur:m,onFocus:f}){const h=li(),{control:{border:g,labelPosition:y="inside"},select:{border:_}}=ct(),P=En(),v=hi({active:!!c&&Yn(c)!=="warning"}),E=Ye(t,Lz),C=_||g||"full",S=c!==void 0&&!!c&&s(ta,{controlID:E,type:Yn(c)==="warning"?"warning":void 0,children:c&&typeof c=="object"&&"value"in c?c?.value:c}),I=!!c&&Yn(c)!=="warning",k=Y(en.Select,Bi.Select,I&&en.hasError,(i||P)&&en["Select-isDisabled"],P&&Bi.inert,a&&en["Select-isReadOnly"],en[$t("Select-border",C)]),T=ce=>{const j=ce.target.value;p?.(j)},[A,L]=oe(0),O=o!==wo||(!!(d&&d!==r)||!!A),D=s("label",{className:Y(en.Label,en[$t("Label-position",y)],O&&en["Label-isFloating"]),htmlFor:E,children:s("span",{className:Y(en.LabelText),children:s(ki,{children:r})})}),B=R(()=>{L(ce=>ce+1)},[]),z=R(()=>{L(ce=>ce-1)},[]),x=V(()=>({readOnly:a,registerEmptyValueOption:B,unregisterEmptyValueOption:z}),[a,B,z]),W=s("div",{children:[y==="outside"?D:null,s("div",{className:Y(en.SelectWrapper,Bi.selectColorLayerVariant[I?"controlInvalid":"control"]),children:[y==="inside"&&D,s(Yu.Provider,{value:x,children:s("select",{name:n,id:E,disabled:i,onChange:T,required:l,value:o,className:k,"aria-describedby":c?Zo(E):void 0,"aria-invalid":c&&Yn(c)!=="warning"?"true":void 0,"aria-hidden":P?!0:void 0,autoComplete:u,tabIndex:P?-1:void 0,ref:v,onBlur:()=>{m?.()},onFocus:()=>{f?.()},form:h?.nested?h.id:void 0,children:[d&&(X(o)||d!==r)&&s("option",{value:wo,hidden:d===r,disabled:!0,children:d===r?s(G,{children:" "}):d}),e]})}),s("div",{className:Y(en.Selector),children:s(Le,{type:"chevronDown",size:"small-200"})})]})]});function X(ce){return ce===wo||ce===void 0||ce===null}const Z=y!=="outside"&&C==="full";return s(G,{children:s("div",{className:Y(en.Wrapper,y==="inside"&&Bi.selectColorLayerVariant[I?"controlInvalid":"control"],Ez[y==="outside"?"labelOutside":"labelInside"]),"data-form-layout-connectable":Z?"true":"false",children:[W,S]})})}function pb({children:e,id:t,value:n,disabled:r,alternateValues:o,accessibilityLabel:i}){const a=fz(),{registerEmptyValueOption:l,unregisterEmptyValueOption:c}=a??{},u=n===wo;return Mt(()=>{if(u&&l&&c)return l(),()=>{c()}},[u,l,c]),a?s("option",{id:t,value:n,disabled:r||a.readOnly,...o?.length&&{"data-alternate-values":JSON.stringify(o)},"aria-label":i,children:e}):(console.warn(`Unable to render Option (id: ${t}). Please verify it is a child of a Select.`),null)}var Rn={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 xz=Ke(function({accessibilityLabel:t,id:n,children:r,inlineSize:o="auto",lang:i,loading:a,disabled:l=!1,pressed:c=!1,onClick:u,onBlur:d,onFocus:p},m){const f=Yr(m),h=En(),g=o==="auto"?"fit-content":o,y=un(),_=on(a??!1,{enter:"slow"}),P=C=>{C?.preventDefault(),u?.(!c)},v=s("span",{className:Y(Rn.LoadingContent),dir:"auto",children:s(so,{accessibilityLabel:y("processing")})}),E=St(r)&&s("span",{className:Y(Rn.Content),"aria-hidden":a||void 0,children:r});return s(Wr.Provider,{value:!0,children:s("button",{type:"button",id:n,"aria-pressed":c,"aria-busy":a,"aria-label":a?void 0:t,"aria-live":a?"polite":"off","aria-hidden":h?!0:void 0,lang:i,onClick:P,onBlur:d,onFocus:p,className:Y(Rn.PressButton,Rn.inlineSizeVariant[es(g)],c&&Rn.pressed,(l||h)&&Rn.disabled,h&&Rn.inert,a&&[Rn.loading,Rn.transitionVariant[_]]),disabled:l||a,tabIndex:h?-1:void 0,ref:f,children:[E,a&&v]})})}),mb={small:"35%",base:"50%",large:"65%",fill:"100%"};function Vi({content:e,delay:t,id:n,lastLineSize:r,lines:o=1,size:i}){const a=V(()=>Rz(),[]);return s($e,{id:n,size:i,textAlign:"justify",children:e?s(Xo,{delay:t,children:e}):Array.from({length:o},(l,c)=>
38{const u=c===o-1?r??(o===1?"fill":a):"fill";return s(Xo,{delay:t,inlineSize:mb[u]},c)})})}function Rz(){const e=Object.keys(mb);return e[Math.floor(Math.random()*e.length)]}const Mz=new Set(["http:","https:"]);function Nz(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:n}=b(),r=R(o=>{const i=o.target?.closest?.("a");if(!i)return;const a=i.href;let l;try{l=new URL(a).protocol}catch{return}!Mz.has(l)||i.getAttribute("href")?.startsWith("#")||t?.client?.windowOpenRequest&&(o.preventDefault(),t.client.windowOpenRequest(a).catch(u=>{n.log("window_open_delegation_error","Window open delegation failed in delegated HTML content",{url:a,error:u instanceof Error?u.message:String(u)})}))},[t,n]);if(e)return r}function Dz({children:e}){const t=Nz();return t?s("div",{onClick:t,children:e}):s(G,{children:e})}const Oz={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},Fz={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},Bz=yk(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:o,policies:i})=>{const a=vk(i),l=kt(()=>Object.values(a));function c(I){return Array.from(a[I]?.policies.values()??[])}function u(){return a[o.shopId]?.policies.get(o.handle)??i[0]??o}const d=le(!1),p=le(!1),m=le(u()),f=kt(()=>c(m.value.shopId)),h=kt(()=>m.value.shopId),g=kt(()=>m.value.sessionToken??""),y=kt(()=>n.id===h.value),_=e.query(Oz,{variables:()=>({handle:m.value.handle}),skip:()=>!y.value||!d.value}),P=e.query(Fz,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>y.value||!d.value}),v=kt(()=>y.value?_.data.value?.shop?.merchantPolicies[0]?.body:(P.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[]).find(k=>k.handle===m.value.handle)?.body),E=kt(()=>y.value?_.error.value:P.error.value),C=kt(()=>y.value?_.loading.value:P.loading.value),S=uA(C.value,(I,k)=>I&&!k&&d.peek()&&p.peek()&&typeof document<"u"&&document.querySelector(dA)!==null,["modal-content-cross-fade"]);return _l(()=>{S.value=C.value}),_l(()=>{E.value&&t.error(E.value)}),{error:E,loading:S,policyBody:v,selectedPolicy:kt(()=>m.value),selectedShopPolicies:f,shops:l,show(){p.value=!1,m.value=u(),r&&(r.value="footerContent"),d.value=!0},afterShow(){p.value=!0},hide(){p.value=!1,d.value=!1,r&&(r.value="none")},selectShop(I){const k=m.peek(),T=c(I),A=T.find(L=>L.handle===k.handle)??T[0]??k;A!==k&&dr(()=>{m.value=A}
38,["modal-content-cross-fade"])},selectPolicyHandle(I){const k=m.peek(),T=f.value.find(A=>A.handle===I)??f.value[0]??k;T!==k&&dr(()=>{m.value=T},["modal-content-cross-fade"])}}});function Xl({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:o,embed:i}=b(),{checkoutProtocolModalEventSignal:a}=Nt(),{localPolicies:l,localPoliciesWithContent:c,remotePolicies:u}=Ic(),d=r.hasFlagEnabled(Ah),p=u.length>0?[...l,...u]:c,m=d&&p.some(({shopId:D,handle:B})=>D===t.shopId&&B===t.handle)?p:[t],f=d?n.translate("shop_policies.terms_and_policies"):t.name,g=o.variant.isStandard()||i?.isCheckoutKit()?"100%":void 0,y=d?"@media (inline-size >= extraSmall) 600px, 90%":g,{error:_,loading:P,policyBody:v,selectedPolicy:E,selectedShopPolicies:C,shops:S,show:I,afterShow:k,hide:T,selectShop:A,selectPolicyHandle:L}=_k(Bz,{checkoutProtocolModalEventSignal:a,defaultPolicy:t,policies:m}),M=S.value.length>1||S.value.some(D=>D.policies.size>1),N=()=>s(Dz,{children:s(kr,{dangerouslySetInnerHTML:{__html:v.value??""},scrollableContent:"all"})}),O=s(ve,{when:()=>!_.value,fallback:n.translate("bad_request.title"),children:s(ve,{when:()=>!P.value,fallback:s(ee,{"aria-busy":!0,gap:"base",children:[s(Vi,{delay:!1,lines:3,lastLineSize:"small"}),s(Vi,{delay:!1,lines:3,lastLineSize:"large"}),s(Vi,{delay:!1,lines:3,lastLineSize:"small"}),s(Vi,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>M||E.value.shopId!==r.id?s(ve,{when:()=>v.value,fallback:s($,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:E.value.name,shop_name:E.value.shopName})}),children:N}):N()})});return s(or,{id:e,onShow:I,onAfterShow:k,onHide:T,heading:f,blockSize:y,children:[s(be,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:P.value?n.translate("general.loading"):null}),M?s(ee,{gap:"base",children:[s(ve,{when:()=>S.value.length>1,children:s(ee,{direction:"inline",gap:"base",children:S.value.map(D=>s(xz,{pressed:E.value.shopId===D.shopId,onClick:()=>A(D.shopId),children:s(ee,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:s($,{children:D.shopName})})},D.shopId))})}),s(ve,{when:()=>C.value.length>1,children:s(db,{value:E.value.handle,label:n.translate("shop_policies.policy_label"),onChange:L,name:"policy",children:C.value.map(D=>s(pb,{value:D.handle,children:D.name},D.handle))})}),O]}):O]})}var Ot={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 Vz=tt("Checkbox"),Uz=Ms(Ke(function({accessibilityLabel:t,disabled:n,error:r,id:o,label:i,name:a,details:l,...c},u){const d=Ye(o,Vz),p=En(),m=typeof r=="string"&&!!r.trim()&&s("div",{className:Ot.Error,children:s(ta,{controlID:d,children:r})}),f=Y(Ot.Label,Ot.labelAndDetailsStateVariant[n||p?"disabled":"default"],p&&Ot.inert),h=(typeof i=="string"||St(i))&&s("label",{htmlFor:d,className:f,children:i}),g=typeof l=="string"||St(l),y=g?`${d}-details`:void 0,_=Y(Ot.Details,Ot.labelAndDetailsStateVariant[n||p?"disabled":"default"],p&&Ot.inert),P=g&&s("div",{id:y,className:_,children:l});return s("div",{children:[s("div",{className:Ot.Wrapper,children:[s(zz,{id:d,name:a,error:!!r,accessibilityLabel:t,disabled:n,ref:u,ariaDescribedBy:y,...c}),h]}),P,m]})}),{commands:{clipboard:!1,overlay:!1}}),zz=Ke(function({accessibilityLabel:t,checked:n,colorLayer:r,disabled:o,error:i=!1,id:a,name:l,onCh
38ange:c,required:u,value:d,accessibilityVisibility:p,ariaDescribedBy:m,command:f,commandFor:h,...g},y){const _=En(),P=hi({active:i}),v=jr(y,P),E=r!=="inherit",C=Y(Ot.Input,i&&Ot.inputError,Ot.inputStateVariant[o||_?"disabled":"default"],_&&Ot.inert);return s("div",{className:Y(Ot.Checkbox,E&&Ot.colorLayerControl,p&&Ot.accessibilityVisibilityVariant[p]),children:[s("input",{type:"checkbox",id:a,name:l,checked:n,value:d,disabled:o,onChange:({currentTarget:S})=>{typeof c=="function"&&c(S.checked)},className:C,"aria-describedby":[m,i&&Zo(a)].filter(Boolean).join(" ")||void 0,"aria-label":t||void 0,"aria-hidden":_?!0:void 0,"aria-invalid":i||void 0,tabIndex:_?-1:void 0,ref:v,required:u,...g}),s("div",{className:Ot.Icon,children:s(Le,{type:"check",size:"small-200"})})]})});function Hz({required:e,requiredErrorMessage:t}){const{i18n:n}=b();return R(r=>{if(!(!e.value||r==="true"))return t.value?.trim()||n.translate("field_errors.custom_field.cart_metafield_value_required")},[n,e,t])}const Dm="gid://shopify/App/580111";function fb(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function qz(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return n==null||r==null?!1:fb({namespace:n,key:r},t)}function hb(e,t){return e?.find(n=>fb(n,t))?.value}function gb(e,t){for(let n=e.length-1;n>=0;n--)if(qz(e[n],t))return n;return-1}function Gz(e,t){const n=e[gb(e,t)];if(n)return n.delete?"":n.update?.value}function Wz(e,t,n){const{namespace:r,key:o,type:i}=t,a=n.trim()===""?{delete:{appId:Dm,namespace:r,key:o}}:{update:{appId:Dm,namespace:r,key:o,type:i,value:n}},l=gb(e,t);return l===-1?[...e,a]:e.map((c,u)=>u===l?a:c)}function $z({namespace:e,key:t,type:n}){const{checkout:{proposal:r}}=b(),o=r.proposed.cartMetafields,i=r.negotiated.fields.cartMetafields;return V(()=>{const a={namespace:e,key:t,type:n};return new bk(kt(()=>Gz(o.value,a)??hb(i.value,a)??""),l=>{o.value=Wz(o.peek(),a,l)})},[t,e,i,o,n])}function Yz(e,t){const{current:n,lastJourneyProgression:r}=Xe(),{customFields:o}=n.fields,i=R(l=>{const c=jz(l,o.value,e);!c||t.value||(t.value=c.localizedMessage||c.nonLocalizedMessage)},[o,t,e]);return ze(()=>{const l=r.value;l.type!=="error"||l.negotiationStage==="negotiation"||ht(()=>i(l.violations))}),{handleViolations:R(l=>{l.status==="error"&&i(l.violations)},[i])}}function jz(e,t,n){const r=t?.findIndex(i=>i.key===n)??-1;if(r===-1)return;const o=`$.customFields[${r}]`;return e.find(i=>i.__typename==="UnprocessableTermViolation"&&i.code.startsWith("CUSTOM_FIELD")&&i.target===o)}function na({key:e,label:t,required:n},{type:r,validate:o=()=>{}}){const{checkout:{proposal:i},i18n:a}=b(),l=Lt(),c=Pk(e),u=Sk(),d=$z({...c,type:r}),p=U(),{handleViolations:m}=Yz(e,u);Ek(d,u,o,zo.InvalidCustomFieldValue);const f=()=>{const g=d.peek();!(g!==(p.current??hb(i.negotiated.fields.cartMetafields.peek(),c)??""))||u.peek()||(p.current=g,l.negotiate({fieldsToResolve:["cartMetafields","customFields"],include:[],onComplete:m}))},h=n.value;return{value:d,error:u,fieldProps:{label:h?t.value:a.translate("custom_field.label",{label:t.value}),name:e,required:h},negotiate:f}}function ra({field:{description:e,heading:t,key:n},children:r}){const o=e.value;return s(ee,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?s(jt,{children:t}):null,o?s($,{color:"subdued",children:o}):null,r]})}function Kz({field:e}){const t=Hz(e),{value:n,error:r,fieldProps:o,negotiate:i}=na(e,{type:"boolean",validate:t}),a=c=>{const u=String(c);n.value=u,r.value=t(u),i()},l=typeof r.value=="string"?r.value:void 0;return s(ra,{field:e,children:s(Uz,{label:e.label.value,name:o.name,required:o.required,checked:n.value==="true",error:l,onChange:a})})}function Jz({choices:e,required:t,requiredErrorMessage:n}){const{i18n:r}=b();return R(o=>{if(o.trim()==="")return t.value?n.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required"):void 0;if(!e?.some(i=>i.value===o))return r.translate("field_errors.custom_field.cart_metafield_invalid_choice")},[e,r,t,n])}function Xz({field:e}){const t=Jz(e),{value:n,error:r,fieldProps:o,negotiate:i}=na(e,{type:"single_line_text_field",validate:t}),a=l=>{n.value=l,r.value=t(l),i()};return s(ra,{field:e,children:s(db,{label:o.label,name:o.name,required:o.required,value:n.value,error:typeof r.value=="string"?r.value:void 0,placeholder:o.label,onChange:a,children:e.choices?.map(({label:l,value:c})=>s(pb,{value:c,children:l},c))})})}
38const Qz=He({displayName:"AsyncDateField",suspense:!1,load:()=>lt(()=>Be(async()=>{const{DateField:e}=await import("./9f57d2aa.-6MHOqgs.js").then(t=>t.b);return{DateField:e}},__vite__mapDeps([23,1,24,3,4,2,5,25,26,27])).then(({DateField:e})=>e)),useError:Ou("DateField"),renderLoading({field:e}){return s(Zz,{field:e})}});function Zz({field:e}){const{value:t,fieldProps:n}=na(e,{type:"date"});return s(ra,{field:e,children:s(Ku,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:s(Le,{type:"calendar"})})})}const e2=Ke(function({autocomplete:t,autoFocus:n,defaultValue:r,disabled:o,error:i,id:a,label:l,labelAccessibilityVisibility:c,maxLength:u,minLength:d,name:p,onBlur:m,onChange:f,onFocus:h,onInput:g,placeholder:y,readOnly:_,required:P,rows:v=2,value:E},C){return s(ju,{autocomplete:t,autoFocus:n,defaultValue:r,disabled:o,error:i,id:a,label:l,labelAccessibilityVisibility:c,maxLength:u,minLength:d,name:p,onBlur:m,onChange:f,onFocus:h,onInput:g,placeholder:y,readOnly:_,ref:C,required:P,rows:v>0?v:1,value:E})});function t2(e,t){const{value:n,error:r,fieldProps:o,negotiate:i}=na(e,t),a=Ck(n,r,t.validate);return{validatedInput:a,fieldProps:o,persist:()=>{a.onBlur(),i()}}}function n2({required:e,requiredErrorMessage:t,validations:n}){const{i18n:r}=b(),{minLength:o,maxLength:i}=n;return R(a=>{if(a.trim()==="")return e.value?t.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required"):void 0;const l=[...a].length;if(o!=null&&l<o)return r.translate("field_errors.custom_field.cart_metafield_value_too_short");if(i!=null&&l>i)return r.translate("field_errors.custom_field.cart_metafield_value_too_long")},[r,i,o,e,t])}function r2({field:e}){const t=e.type==="MULTILINE_TEXT",n=n2(e),{validatedInput:r,fieldProps:o,persist:i}=t2(e,{type:t?"multi_line_text_field":"single_line_text_field",validate:n});return s(ra,{field:e,children:t?s(e2,{...r,label:o.label,name:o.name,required:o.required,onBlur:i}):s(Ku,{...r,label:o.label,name:o.name,required:o.required,onBlur:i})})}function o2({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return s(r2,{field:e});case"DATE":return s(Qz,{field:e});case"CHOICE":return s(Xz,{field:e});case"BOOLEAN":return s(Kz,{field:e});default:return null}}const i2=He({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>Ss(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>Be(()=>import("./49758c58.k-TzyziF.js"),__vite__mapDeps([206,1,2,3,4,5,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,7,38,39,40,41,42,43,44,45,46,47,48,14,6,49,50,51,52,8,9,207]))}),Om={"UiCustomizations-marginBlockStart":"OyeF5","UiCustomizations-marginBlockEnd":"XYPMc"},s2=e=>s(be,{children:e}),a2=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:o})=>{const i=e&&n?s(ee,{gap:e,children:t}):s(G,{children:t});return r||o?s("div",{className:Y({[Om["UiCustomizations-marginBlockStart"]]:r,[Om["UiCustomizations-marginBlockEnd"]]:o}),style:{...r&&{"--extensions-margin-block-start":Jn.spacing[r]},...o&&{"--extensions-margin-block-end":Jn.spacing[o]}},children:i}):s(G,{children:i})};function Yt({customizations:e,gap:t,options:n,transformComponents:r,render:o=s2,marginBlockStart:i,marginBlockEnd:a}){return e.length===0?null:s(a2,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:a,children:e.map(l=>l.kind==="uiExtension"?s(i2,{options:n,extension:l.extension,transformComponents:r,render:o},l.extension.id):s(o2,{field:l.field},l.field.key))})}const l2=e=>s("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[s("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"}}),s("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"}}),s("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
38-.6 0-.8s.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0",style:{fill:"#fff"}}),s("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"}})]}),c2="mMltV",u2="HTJIw",Fm={DataSharingOptOutLinkGap:c2,DataSharingOptOutLinkIcon:u2},d2="https://privacy.shopify.com",p2="https://privacy.shopify.com/ads-sharing/opt-out/new";function Bm(){const{shopPay:e,i18n:t}=b(),{footer:{content:{typography:n}={}}={}}=Fe(),r=e.user.isAuthenticatedUser.value?p2:d2,o=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:s("span",{className:Fm.DataSharingOptOutLinkGap}),privacy_link_logo:s(l2,{"aria-hidden":"true",focusable:"false",className:Fm.DataSharingOptOutLinkIcon})}),i=s(dt,{href:r,target:"_blank",display:"block",children:o});return n?s($,{size:n.size,color:n.color,type:n.weight==="bold"?"strong":void 0,children:i}):i}function m2(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}function f2(e){const{observability:t}=b();F(()=>{e&&m2(t,e)},[e,t])}const Vm=He({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:f2,load:()=>lt(()=>Be(async()=>{const{deferredPrivacyComponents:e}=await import("./2acfb1ce.CJPmB0XI.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([88,1,2,3,4,5,36,37,6,7,8,9])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function h2(){const e=wt(),{checkout:{identity:t},consentManager:n}=b();return w(()=>e.value&&t.current.value!=="shopPay"&&n.shouldShowBanner.value)}const g2=tt("DelegatedLinkModal");function y2(e){const t=Array.isArray(e)?e:[e],n=new Map;return t.map(r=>{if(typeof r!="string"&&typeof r!="number")return r;const o=String(r),i=(n.get(o)??0)+1;return n.set(o,i),s($,{color:"subdued",children:r},`${o}-${i}`)})}function Ju(){const{embed:e,i18n:t,checkout:{configuration:n},shop:r}=b(),{name:o}=r,i=fo(),{currentDetour:a}=Se().value,l=h2(),{footer:{alignment:c,content:{visibility:u,typography:d}={}}={}}=Fe(),{localPolicies:p,localPoliciesWithContent:m}=Ic(),f=r.hasFlagEnabled(Ah),h=e?.embedder==="microsoft",g=e?.embedder==="amazon",y=e?.embedder==="google";let _=d;h?_={...d,size:"extraSmall",color:"subdued",weight:"bold"}:y&&(_={...d,size:"small"});const P=p.find(D=>D.handle==="privacy-policy"),v=P.url,E=v?s(dt,{href:v,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:o}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):s(G,{children:[s(dt,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:o}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),s(Xl,{id:"google-privacy-policy-modal",defaultPolicy:{...P,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),C=s(dt,{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")}),S=s(dt,{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")}),I=s($e,{type:"small",textAlign:c,children:y2(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:o,privacy_policy_link:E,payments_privacy_notice_link:C,learn_more_link:S}))}),A=s($e,{size:"extraSmall",color:"subdued",textAlign:c,children:s($,{type:"strong",children:["Your purchase from ",o," is subject to the"," ",s(Ql,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",s(Ql,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",o," to complete your order."]})}),L=m.length===0?s(ee,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:c,children:[s($,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:o})}),s(ee,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[s(ve,{when:l,children:s(be,{accessibilityRole:"list-item",children:s(Vm,{})})}),s(ve,{when:n.visibility.showDataSharingOptOut,children:s(be,{accessibilityRole:"list-item",children:s(Bm,{})})})]})]}):s(ee,{direction:"inline",justifyContent:c,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(f?m.slice(0,1):m).map(D=>{const{handle:B,name:z}=D,x=f?t.translate("shop_policies.terms_and_policies"):z,W=f?"terms-and-policies-footer-policy-modal":`${B}
38-footer-policy-modal`,X=s(Xl,{id:W,defaultPolicy:D}),Z=s(cn,{variant:"plain",commandFor:W,ref:i(B),children:x});return s(be,{accessibilityRole:"list-item",children:[_?s($,{size:_.size,color:_.color,type:_.weight==="bold"?"strong":void 0,children:Z}):Z,X]},B)}),s(ve,{when:l,children:s(be,{accessibilityRole:"list-item",children:s(Vm,{})})}),s(ve,{when:n.visibility.showDataSharingOptOut,children:s(be,{accessibilityRole:"list-item",children:s(Bm,{})})})]});let M="purchase.checkout.footer.render-after";a?.type==="thankYou"&&(M="purchase.thank-you.footer.render-after");const N=it(M);return s(ee,{gap:"large-100",children:[h&&A,y&&I,u!=="hidden"&&!g&&L,s(Yt,{customizations:N,gap:"base"})]})}function Ql({href:e,heading:t,children:n,...r}){const{checkout:o}=b(),i=Ye(void 0,g2);return o.configuration.isWindowOpenDelegationEnabled?s(dt,{href:e,...r,children:n}):s(G,{children:[s(dt,{commandFor:i,...r,children:n}),s(or,{id:i,source:e,heading:t})]})}Ju.displayName="FooterContent";Ql.displayName="DelegatedLink";function v2(){const{i18n:e,shop:t}=b(),n=`${t.name} ${e.translate("general.page_title")}`;return s("h1",{className:bt({screenReaders:"only"}),children:n})}function yb(){const{client:e,i18n:t}=b(),{checkoutProtocolModalEventSignal:n}=Nt(),r=R(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),{hasViolations:o}=Ws(yc);return F(()=>()=>{n.value="none"},[n]),o?s(or,{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:()=>{n.value="b2bPermissions"},children:s(ee,{gap:"base",children:[s($,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),s(ee,{direction:"inline",gap:"base",justifyContent:"end",children:s(cn,{variant:"primary",onClick:r,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function _2({source:e,title:t,onIframeLoad:n}){const[r,o]=oe(),[i,a]=oe(!1);return F(()=>{e?(o(e),a(!0)):a(!1)},[e]),r?s(or,{source:r,open:i,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function b2({source:e,logMessage:t,telemetryContext:n,logKey:r=e??void 0}){const{observability:o}=b(),i=U();return F(()=>{e||(i.current=void 0)},[e]),R(a=>{!e||!n||a&&a!==e||i.current!==r&&(i.current=r,o.log("action_required_modal_iframe_loaded",t,{...n,hasModalUrl:!0,...n.actionType!=="pre_payment_buyer_action_required"&&{sourceHostCategory:Ko(e)}}))},[r,t,o,e,n])}function P2(){const{checkout:e,shopPay:t,observability:n}=b(),r=U(),o=w(()=>
38{if(kk(t)&&t.threeDSModalUrl.value){const a=t.threeDSModalUrl.value;return{source:a,logKey:JSON.stringify(["spe",a]),logMessage:"[ActionRequiredModalManager] SPE 3DS action required via threeDSModalUrl",telemetryPayload:{modalSourceType:"spe_three_ds_modal_url",sourceHostCategory:Ko(a),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const i=e.latestReceipt.value;if(i&&yu(i)){const a=i.action;if(Ay(a))return{source:a.offsiteRedirect?void 0:a.url,logKey:JSON.stringify(["receipt",i.id,a.offsiteRedirect,a.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:Ko(a.url),offsiteRedirect:a.offsiteRedirect,actionType:a.type,hasModalUrl:!a.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:a.offsiteRedirect,actionType:a.type}}}if(i?.status==="action_required"&&i.action.type==="pre_payment_buyer_action_required"){const{action:a}=i;return{source:a.url,logKey:JSON.stringify(["receipt",i.id,a.type]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",actionType:a.type,hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",actionType:a.type}}}});return ze(()=>{const i=o.value;if(!i){r.current=void 0;return}r.current!==i.logKey&&(r.current=i.logKey,n.log("action_required_modal_manager_action_required",i.logMessage,i.telemetryPayload))}),o.value}function S2(){const{i18n:e}=b(),t=P2(),n=b2({source:t?.source,logKey:t?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:t?.iframeLoadTelemetryContext});return s(_2,{source:t?.source,title:e.translate("processing.action_required"),onIframeLoad:n})}function E2(e,t){return e.has(t)}function C2(e,t){if(!e||!t)return null;const n=t.find(o=>o.method.type==="customOnsite")?.method;return n&&e.find(o=>o.type==="customOnsite"&&o.paymentMethodIdentifier===n.paymentMethodIdentifier&&o?.uiExtension?.approvalScopes&&E2(o.uiExtension.approvalScopes,AA.PaymentSessionModal))||null}function k2(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}function I2(e){const{observability:t}=b();F(()=>{e&&k2(t,e)},[e,t])}const A2=He({id:()=>
38"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:I2,load:()=>lt(()=>Be(()=>import("./7fd9930c.DYfwUEDq.js"),__vite__mapDeps([208,1,17,3,4,2,5,18,6,7,8,9,209])))});function T2(e){return JSON.stringify([e.id,e.action.type,Dr(e.action)?e.action.challengeType:void 0,Dr(e.action)?e.action.challengeData:void 0])}function w2({modalPaymentMethodConfig:e,onModalRender:t}){const{checkout:n,observability:r}=b(),o=U(),i=we(void 0),a=w(()=>{const c=n.latestReceipt.value;return c&&Iy(c)&&Dr(c.action)?c:void 0});ze(()=>{const c=a.value;if(!c||!Dr(c.action)){o.current=void 0;return}const u=!!e.value,d=JSON.stringify([c.id,c.action.challengeType,c.action.challengeData,u]);o.current!==d&&(o.current=d,r.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:c.action.challengeType,challengeData:c.action.challengeData,hasModalPaymentMethodConfig:u}))}),ze(()=>{const c=a.value;if(!c||!Dr(c.action)){i.value=void 0;return}const u=T2(c),d=c.timeout?.millisecondsRemaining==null?void 0:Date.now()+c.timeout.millisecondsRemaining,p=i.peek();p?.key!==u?i.value={key:u,expiresAt:d}:d!=null&&(i.value={key:u,expiresAt:Math.min(p.expiresAt??d,d)})});const l=w(()=>{const c=a.value,u=e.value;if(!(!c||!Dr(c.action)))return u?{type:c.action.challengeType,data:c.action.challengeData,config:u,expiresAt:i.value?.expiresAt}:null});return s(ve,{when:l,children:c=>s(A2,{challengeType:c.type,challengeData:c.data,receipt:n.latestReceipt.value,paymentMethod:c.config,onModalRender:t,challengeExpiresAt:c.expiresAt})})}function oa(){const e=Pc(),{checkout:t}=b(),n=q().deferredTotal;return w(()=>{if(!e.value)return!0;const r=n.value?.amount.amount;return!!(Sc({checkout:t})||r)})}function L2(){const{i18n:e,shopPay:t}=b(),{managedByMarketsPro:n}=q(),r=oa();return w(()=>{if(!r.value||!Ac({managedByMarketsPro:n.value}))return;const i=t.session.selectedPaymentMethod.value;if(!(!i||!Ik(i)))return e.translate("processing.redirecting_title")})}function x2({isModalRendered:e,modalPaymentMethodConfig:t}){const{i18n:n,checkout:r}=b(),o=L2();return w(()=>{if(o.value)return o.value;const i=r.latestReceipt.value;return i?yu(i)?n.translate("processing.redirecting_notice"):Iy(i)?!e.value&&t.value?n.translate("processing.modal_notice",{paymentMethod:t.value.name}):n.translate("processing.wait.short"):!e.value&&t.value?.name&&Ak(t.value)&&i.status==="processing"&&t.value?n.translate("processing.modal_notice",{paymentMethod:t.value.name}):i.status==="processing_remote_checkouts"||i.status==="processed"&&i.completedRemoteCheckouts?.length?n.translate("processing.remote_shops_payments_processing"):n.translate("processing.wait.short"):n.translate("processing.wait.short")})}function R2(e){const{observability:t}=b();F(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])}const M2=He({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:R2,load:()=>lt(()=>Be(()=>import("./39bf6084.B9CMoYi9.js"),__vite__mapDeps([210,1,2,3,4,5,197,44,71,6,7,8,9,211])))});function vb(){const{checkout:e}=b(),{paymentLines:t}=ie(),n=q().paymentMethods,r=w(()=>C2(n.value,t.value)),o=we(!1),i=x2({isModalRendered:o,modalPaymentMethodConfig:r}),a=Cu();return ze(()=>{if(e.latestReceipt.value)return xt({content:i.value,role:"alert"})}),s(G,{children:[s(ve,{when:a,fallback:s(S2,{}),children:s(M2,{})}),s(w2,{modalPaymentMethodConfig:r,onModalRender:()=>{o.value=!0}})]})}function _b(){const{i18n:e,url:t,source:n,shop:r,checkout:o,shopPay:i}=b(),a=o.identity.current.value==="shopPay",{plan:l,currentPage:c}=Se().value,u=Pc(),d=n.type==="cartNext"||n.type==="simulated",p=Xe(),m=ie().paymentLines.value,f=p.current.peek(),h=o.configuration.layout.isOnePage.value,g=Es(),y=Tk("SHOP_CASH"),_=Bn(),P=mo(),v=q(),{value:E}=v.managedByMarketsPro,C=Ac({managedByMarketsPro:E}),{value:S}=v.paymentFlexibilityPaymentTermsTemplate,I=ii(),k=br(f.deliveryNext),T=qr(f.deliveryNext),A=V(()=>m.some(({method:{type:D}})=>D==="paymentOnDelivery"),[m]),L=V(()=>m.some(({method:{type:D}})=>D==="customManualPayment"||D==="manualPayment"),[m]),M=V(()=>r.vaultForPaymentLater&&wk(m),[r.vaultForPaymentLater,m]),N=!!S&&!I.value,O=Hu();return V(()=>{let D=[];d&&P.value?D=[{id:"cart",route:P.value.toString()}]:D=[];const B=[...D,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let z=c?B.findIndex(Q=>Q.id===c.id):void 0;(z==null||z<0)&&(z=void 0);const x=p.current.peek(),W=z==null?void 0:B.slice(z+1).find(Q=>Q.skipOverPage==null||!Q.skipOverPage(x)),X=z==null?void 0:B.slice(0,z).reverse().find(Q=>Q.skipOverPage==null||!Q.skipOverPage(x));function Z(Q){if(i.isSimulated)return e.translate("general.pay_now_button_label");switch(Q){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 _.value?e.translate("general.submit_for_review_button_label"):M?e.translate("payment.vault_for_payment_later.pay_button_label"):N&&!O.value?e.translate("general.confirm_order_button_label"):u.value||A||L||g.value||h&&y.value?e.translate("general.complete_purchase_button_label"):C&&!a&&Lk(m)?e.translate("general.continue_to_payment_method"):e.translate("general.pay_now_button_label");default:return e.translate("general.continue_button_label")}}function ce(Q){switch(Q){case"review":return e.translate("processing.y
38ou_will_not_be_charged");case"thankYou":return _.value?e.translate("general.submit_for_review_notice_label"):void 0;default:return}}function j(Q){switch(Q){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")}}return{nextPage:{id:W?.id,label:Z(a?"thankYou":W?.id),notice:ce(a?"thankYou":W?.id)},previousPage:{label:j(X?.id),route:X?.route}}},[t,p,e,u.value,c,l.greenPath,d,m,k,T,A,L,M,h,g.value,y.value,O.value])}function N2(){const e=Se();return w(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:n})=>n==="review")})}function bb(){const{paymentLines:e}=ie();return w(()=>{const t=!!Pt(e.value,"SHOP_PAY"),n=!!Pt(e.value,"SHOPIFY_INSTALLMENTS");return xk(e.value)&&!t&&!n})}function D2(){const{i18n:e}=b();return s(Py,{children:s(ee,{gap:"large-400",alignItems:"center",children:[s(be,{children:s(so,{size:"large",appearance:"monochrome"})}),s($e,{children:e.translate("general.processing")})]})})}function O2(){const e=N2(),t=Je(_b().nextPage.id),n=Hs(),{checkout:{offsitePopupController:r}}=b();return w(()=>!n.value||r.isOpen.value?!1:e.value?t.value==="thankYou":!0)}function F2(){const e=bb(),t=Se(),n=Je(_b().nextPage.id),{checkout:r}=b(),o=r.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:i},walletUsedForSubmissionSignal:a}=We(),l=ie().paymentLines;return w(()=>{if(!e.value||r.wallets.activeSession.value)return!1;const c=l.value;if(Pt(c,"PAYPAL_EXPRESS"))return!1;const d=Pt(c,"APPLE_PAY");return d?i.value||a.value!=="APPLE_PAY"||!Th(d)?!1:o.value?r.wallets.escalatedWallet.value!=="APPLE_PAY":t.value.currentPage?.id==="information":o.value?!wA({paymentLines:c,walletUsedForSubmission:a.value}):a.value==="GOOGLE_PAY"?t.value.currentPage?.id==="information":n.value==="thankYou"})}function Pb(){const{progressing:e}=Lt(),{i18n:t,embed:n}=b(),r=O2(),o=F2(),i=ie().paymentLines,a=w(()=>n?.embedder==="google"&&!!Pt(i.value,"GOOGLE_PAY")),l=w(()=>e.value&&(o.value||r.value)&&!a.value);return ze(()=>{if(l.value)return xt({content:t.translate("general.processing")})}),s(ve,{when:l,children:s(D2,{})})}function Sb(e){return function(n){return Object.fromEntries(Array.from(e).map(r=>[r,n[r]]))}}function XY(e){return function(n){return Object.fromEntries(Object.keys(n).filter(r=>!e.has(r)).map(r=>[r,n[r]]))}}const B2="_9sntZ",V2={SkipToContentLink:B2};function Eb(){const{i18n:e,embed:t}=b();return t?.isEmbeddedCheckout()?null:s("a",{href:`#${B_}`,className:V2.SkipToContentLink,children:e.translate("general.skip_to_content")})}function Cb(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:n}}}=b(),r=mo(),{checkoutProtocolModalEventSignal:o}=Nt(),{lastJourneyProgression:i}=Xe(),a=U(!1);ze(()=>{if(!qt(e?.embedder))return;const d=i.value;d.type!=="failed"||d.reason!=="tooManyRequests"||a.current||(a.current=!0,ht(()=>ch(e,"too_many_requests")))});const l=R(()=>{r.value&&window.location.assign(r.value.toString())},[r]);F(()=>()=>{o.value="none"},[o]);const c=i.value.type==="failed"&&i.value.reason==="tooManyRequests",u=n&&r.value;return c?s(or,{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:()=>{o.value="tooManyRequests"},children:s(ee,{gap:"base",children:[s($,{children:u?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),u&&s(G,{children:[s(be,{display:"@media (inline-size >= small) none, block",children:s(cn,{variant:"primary",inlineSize:"fill",onClick:l,children:t.translate("too_many_requests.return_to_cart")})}),s(gt,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:s(cn,{variant:"primary",onClick:l,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function kb(){const e=ri(),{i18n:t}=b(),n=w(()=>e.value?t.translate("order_summary.total_updated_label_with_price",{totalPrice:t.formatCurrency(e.value.amount,{currency:e.value.currencyCode,form:"name"})}):null),r=U(n.peek());return ze(()=>{const o=n.value,i=r.current;if(r.current=o,!(!o||o===i))return xt({content:o})}),null}var Um={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function U2({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:o}){const i=Un(),a=un(),l=e||a("processing");return i&&o==null?s($e,{children:l}):s("progress",{id:t,className:Y(Um.Progress,Um.toneVariant[r]),value:o,max:n,"aria-label":l})}function Xu({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:o=!0}){const{i18n:i}=b();F(()=>
38{if(!(!e||!t))return xt({content:i.translate("general.processing")})},[e,t,i]);const a=e&&o;return s(be,{children:[s(be,{inert:e,opacity:e&&r==="spinner"?70:void 0,children:n}),s("div",{className:bt({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:a?1:0},"aria-hidden":!a,children:[r==="progressbar"&&s("div",{className:bt({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:s(U2,{accessibilityLabel:i.translate("general.processing")})}),r==="spinner"&&s(be,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:s(so,{size:"large",accessibilityLabel:i.translate("general.processing")})})]})]})}function Ib({children:e}){return s(Rk.Provider,{value:z2,children:e})}const z2=(e,t,n,r,o)=>({onInput:i=>{q2(i,e,r,()=>{n(void 0)})},onChange:i=>G2(i,e),clearError:()=>n(void 0),onBlur:()=>W2(e,r,t,n,o),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});function H2(e,t,n,r,o){if(!t)return;const i=n.value,a=ht(()=>r.value);if(a&&e&&e===i)return;const l=t(e),c=l?{message:String(l?.message??l),origin:"client",type:"inline-validation"}:void 0;$2(a,c)&&o(c)}function q2(e,t,n,r){!t.value&&!e||(n.value=!0,r())}function G2(e,t){!t.value&&!e||(t.value=e)}function W2(e,t,n,r,o){const i=e.value;t.peek()&&H2(i,o,e,n,r)}function $2(e,t){return t?!wh(e)||e.message!==t.message:!0}var cl={autoBorderVariant:{none:"apn1wdm",extraSmall:"apn1wdn",small:"apn1wdo",base:"apn1wdp",large:"apn1wdq",extraLarge:"apn1wdr"},autoBorderWidthVariant:{none:"apn1wdh",base:"apn1wdi",large100:"apn1wdj",large200:"apn1wdk"},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"}};const Qu=Ge(void 0);Qu.displayName="SectionContext";function Y2(){return Pe(Qu)}function Ir({accessibilityLabel:e,accessibilityRole:t="section",accessibilityLabelledBy:n,background:r,border:o,borderRadius:i,borderStyle:a,borderWidth:l,children:c,className:u,colorLayer:d,colorScheme:p,containerName:m,display:f,heading:h,id:g,maxBlockSize:y,maxInlineSize:_,minBlockSize:P,minInlineSize:v,overflow:E,padding:C}){const S=Y2(),I=t==="section"?(S?.level??0)+1:S?.level??0,k=V(()=>({level:I}),[I]),T=FF(),{pending:A,pendingInsetsRows:L,rowsInset:M}=Lu(),N=M||L===!0&&Zl(T.padding),O=h?s(K2,{headingLevel:I,heading:h,children:c}):c,D=T.background??r,B=T.colorScheme??p,z=A?.border==="auto"&&D==="subdued200",x=d==="control"?"base":"baseSpecified";return s(L_,{rowsInset:N,children:s(j2,{colorScheme:B,children:s(Qu.Provider,{value:k,children:s(be,{accessibilityLabel:e,accessibilityRole:t==="presentation"?void 0:t,"aria-labelledby":n,background:(D==="base"?x:D)??(B?x:void 0),border:o,borderRadius:T.borderRadius??i,borderStyle:T.borderStyle??a,borderWidth:T.borderWidth??l,boxShadow:z?void 0:T.boxShadow,containerName:m,className:Y(B&&cl.colorSchemeVariant[B],z&&cl.autoBorderVariant[T.boxShadow??"none"],z&&cl.autoBorderWidthVariant[A?.borderWidth??"base"],u),colorLayer:d||(B?"base":void 0),display:f,id:g,maxBlockSize:y,maxInlineSize:_,minBlockSize:P,minInlineSize:v,overflow:E,padding:T.padding??C,children:I>1&&t==="section"?s(ln,{children:O}):O})})})})}function Zl(e){return e==null?!1:Array.isArray(e)?e.some(Zl):typeof e=="object"?Object.values(e).some(Zl):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some(t=>t!==""&&t!=="none")}function j2({children:e,colorScheme:t}){const n=Zc(),{current:r}=n,o=V(()=>t&&t!==r?{parent:r,current:t}:n,[t,r,n]);return s(Rs.Provider,{value:o,children:e})}function K2({headingLevel:e,heading:t,children:n}){let r;return e===1?r="small":e===2?r="small-300":e===3&&(r="small-500"),e<4?s(ee,{gap:r,children:[s(jt,{children:t}),s("div",{children:n})]}):s(G,{children:[s(jt,{children:t}),n]})}const J2=2,X2=3;function Q2(e){const{inlineSize:t}=Pi(e),n=t+2*kF,r=U(n);r.current=n;const o=we(J2),i=U(null);return{ref:R(l=>{if(i.current?.disconnect(),i.current=null,!l||typeof ResizeObserver>"u")return;const c=new ResizeObserver(([u])=>{if(!u)return;const d=u.contentBoxSize?.[0]?.inlineSize??u.contentRect.width;if(d===0)return;const p=l.firstElementChild;if(!p)return;
38const m=parseFloat(getComputedStyle(p).columnGap)||0,f=Math.floor((d+m)/(r.current+m));o.value=Math.min(X2,Math.max(1,f))});c.observe(l),i.current=c},[o]),max:o}}const Z2=e=>e.lineAllocations.map((t,n)=>Ab(e,n)),Ab=(e,t)=>{const{lineAllocations:n,...r}=e,o=n[t];if(!o)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:eH(e.lineComponents,t),lineAllocation:o}},eH=(e,t)=>e.map(({lineAllocations:n,...r})=>{const o=n[t]??n[0];if(!o)throw new TypeError("Missing line allocation for merchandise line component");return{...r,lineAllocation:o}});function QY(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function tH(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}function zm(e){return e.stableId}const nH=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function Tb(e,t){const n=rH(t);if(n!=null)return e[n]}function rH(e){const t=nH.exec(e);if(t?.[1]==null)return;const n=parseInt(t[1],10);if(!isNaN(n))return n}function wb(e,t,n){const r=new Set;for(const o of t){if(!n(o)||!("target"in o))continue;const i=Tb(e,o.target);i?.stableId&&r.add(i.stableId)}return r}function oH(e,t=[]){return wb(e,t,n=>n.code==="MERCHANDISE_OUT_OF_STOCK")}function Zu(e,t=[]){return wb(e,t,n=>Ly([n])||xy([n]))}function ZY(e,t=[]){for(const n of t)if(n.targetMerchandiseLines?.some(({stableId:r})=>e.includes(r))&&n.status==="available"){const r=n.methods.find(({handle:o})=>o===n.selectedDeliveryMethodHandle);if(r?.title)return r.title;continue}return null}function iH(e,t){return[...new Set([...e.map(zm),...t.map(zm)])].map(r=>({proposed:e.find(o=>o.stableId===r),negotiated:t.find(o=>o.stableId===r)}))}function Lb(e,t,n,r){const o=iH(e,t);if(r)return Hm(o.filter(r));const i=Zu(e,n??[]),a=oH(e,n??[]),l=c=>{if(tH(c))return!0;const u=(c.negotiated||c.proposed)?.stableId;return i.has(u)||a.has(u)};return Hm(o.filter(l))}function ej(e,t,n){const r=e.filter(i=>sH(i)&&n.includes(i.code)).map(i=>Tb(t?.lines,i.target)).filter(i=>i!==void 0);return r.length===0?null:Array.from(new Map(r.map(i=>[i.stableId,i])).values())}function sH(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}function Hm(e){return e.flatMap(t=>Mk(t.proposed)?[t]:t.proposed==null?[t]:t.negotiated?[{proposed:void 0,negotiated:t.negotiated}]:[])}function aH(){const e=b().checkout.configuration.layout.isOnePage.value,t=q(),{value:n}=t.merchandiseLines,{value:r}=t.allViolations,{currentDetour:o}=Se().value,{value:i}=t.legacyRepresentProductsAsFees,a=ie().merchandiseLines.value,[l]=oe(a),c=o?.type==="stockProblems"?l:a,u=n?.lines??[],d=f=>i?fH(f):f,p=o?.type==="thankYou"?[]:d(c),m=d(u);return lH(e,p,m,r??[])}function lH(e,t,n,r){const o=Zu(t,r),i=n.filter(({quantity:u,stableId:d})=>u>0&&!o.has(d)),a=Lb(t,n,r).map(({proposed:u,negotiated:d})=>d??u),l=i===void 0||i.length===0&&a.length>0;return cH(l?a:i,t,l,e)}function cH(e,t,n,r){return e.flatMap(o=>{const i=t.find(({stableId:c})=>c===o.stableId),a=n&&i?i.lineAllocations:o.lineAllocations;return Z2({...o,lineAllocations:a}).map(c=>uH(c,o,r))})}function uH({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(dH),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(pH).map(o=>mH(o,e.stableId))}}const dH=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
38or,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),pH=e=>Kh(e.discountDetails.discount)&&e.discountDetails.discount.presentationLevel==="LINE",mH=(e,t)=>({id:`allocation-${t}-${Lh(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function fH(e){return e.filter(t=>t.legacyFee===!1)}function ed(){const{checkout:e}=b(),t=e.configuration.layout.isOnePage.value,r=(e.proposal.facts.merchandiseLines??[]).filter(a=>(a?.quantity??-1)>0).map((a,l)=>({key:`${l}${a.title}`,title:a.title,properties:a.properties,image:gH(a.image)??void 0,totalAmountAfterLineDiscounts:a.priceAfterDiscounts,totalAmountBeforeReductions:a.price,quantity:a.quantity,subtitle:a.variantTitle,lineDiscounts:a.appliedDiscounts.filter(hH).map(c=>yH(c,l)),parentTitle:a.parentTitle,components:[],unitPrice:null,totalPrice:a.priceAfterDiscounts})),o=aH();return[...t?o.filter(a=>a.quantity>0):o,...r]}const hH=e=>e.presentationLevel==="LINE",gH=e=>e?{...e,altText:e.altText||""}:null,yH=(e,t)=>({id:`allocation-${t}-${Lh(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function td(){const e=Je(ed()),t=q().remoteMerchandiseDetails,{shop:{id:n}}=b();return w(()=>{const r=t.value?.stableIdToShopId??new Map,o=r.values(),i=new Map([[n,[]]]);for(const l of o)i.set(l,[]);const a=t?.value?.mergedBuyerProposalMerchandise?.__typename==="PurchaseOrderMerchandiseTerms"&&t.value.mergedBuyerProposalMerchandise.merchandiseLines?t.value.mergedBuyerProposalMerchandise.merchandiseLines.map(l=>l.__typename==="PurchaseOrderMerchandiseLine"&&l.merchandise.__typename==="ProductVariantSnapshot"?{key:l.stableId,stableId:l.stableId,id:l.merchandise.variantId??null,image:Ok(l.merchandise.image),title:l.merchandise.productTitle,subtitle:l.merchandise.title??null,quantity:l.quantity.items,properties:Dk(l.merchandise.properties),options:l.merchandise.options??[],itemPrice:go(l.merchandise.price),totalAmountBeforeReductions:go(l.merchandise.price),totalAmountAfterLineDiscounts:go(l.merchandise.price),totalPrice:go(l.merchandise.price),deferredAmount:l.merchandise.deferredAmount?go(l.merchandise.deferredAmount):void 0,sellingPlan:Nk(l.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0).filter(l=>!!l):[];for(const l of[...e.value,...a]){if(!l.stableId){i.get(n)?.push(l);continue}const c=r.get(l.stableId);if(!c){i.get(n)?.push(l);continue}i.get(c)?.push({...l,hideRuntimeExtensions:!0})}return i})}var Qe={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 vH=tt("ResourceList");function xb({children:e,title:t,titleHidden:n,spacing:r="base",border:o="none"}){const i=Ye(void 0,vH),a=Y(Qe.ResourceList,r&&Qe.rowGroupSpacingVariant[r],o&&Qe.borderVariant[o
38]),l=t?s(jt,{id:i,children:t}):null,c=V(()=>({spacing:r}),[r]);return s(G,{children:[t&&n?s("div",{className:Qe.visuallyHidden,children:l}):l,s(ln,{children:s("div",{role:"table","aria-labelledby":i,className:a,children:s(nd.Provider,{value:c,children:e})})})]})}function Rb({children:e,hidden:t,blockPadding:n}){const r=Y(Qe.ResourceListHeader,n&&!t&&Qe.resourceListHeaderBlockPaddingVariant[n]);return s("div",{role:"rowgroup",className:Y(Qe.ResourceListRowGroup,t&&Qe.resourceListHeaderHidden),children:s("div",{role:"row",className:r,children:e})})}function mr({children:e,primary:t,hidden:n}){return s("div",{role:"columnheader",className:Y(t?Qe.primary:void 0,n&&Qe.visuallyHidden),children:e})}const nd=Ge(void 0);function Mb({children:e}){return e?s("div",{role:"rowgroup",className:Qe.ResourceListRowGroup,children:e}):null}const rd=Ge(void 0);function _H({spacing:e,children:t,showLines:n=!0}){const r=V(()=>({spacing:e}),[e]),o=V(()=>({showLines:n}),[n]);return s(nd.Provider,{value:r,children:s(rd.Provider,{value:o,children:t})})}function bH({lineOffset:e=0}){const t=Pe(rd);return s("div",{"aria-hidden":!0,className:Qe.ResourceItemLineContainer,style:_n({[Qe.lineOffsetVar]:gs(e)}),children:[s("div",{className:Y(Qe.ResourceItemLine,Qe.ResourceItemLineVertical,t?.showLines&&Qe.visibleLine)}),s("div",{className:Y(Qe.ResourceItemLine,Qe.ResourceItemLineCurved,t?.showLines&&Qe.visibleLine)})]})}function vn({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:o,minBlockSize:i,noWrap:a}){const{lineItems:l}=ct(),c=t??l?.inlineAlignment??"center",{className:u,style:d}=At({minBlockSize:i}),p=Y(Qe.ResourceItemContent,Qe.resourceItemContentInlineAlignment[c],e&&Qe.resourceItemContentAlignSelf[e],r&&Qe.resourceItemContentPrimary,o&&Qe.resourceItemContentHidden,a&&Qe.resourceItemContentNoWrap,u);return s("div",{role:"cell",className:p,style:d,children:o?s("div",{className:Qe.visuallyHidden,children:n}):n})}function ia({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:o}){const i=Pe(nd),a=Pe(rd);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const l=Y(Qe.ResourceItem,t&&Qe.resourceItemBlockPaddingVariant[t],i?.spacing&&Qe.rowSpacingVariant[i.spacing],n&&Qe.resourceItemSpacingVariant[n],a&&Qe.groupedResourceItem,o);return s("div",{role:"row",className:l,children:[s(bH,{lineOffset:r}),e]})}var qn={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 Nb({accessibilityLabel:e,accessibilityVisibility:t,children:n,color:r="base",borderRadius:o="fullyRounded",display:i="block",icon:a,iconPosition:l="start",id:c,size:u="base",tone:d="auto",visibility:p}){const m=a?s(Le,{size:u,type:a,tone:PH(d)}):null,f=s(G,{children:[l==="start"?m:null,s("span",{children:n}),l==="end"?m:null]}),h=a?`${i}Grid`:`${i}Flex`;return s("div",{id:c,className:Y(qn.Badge,qn.displayVariant[h],qn.toneColorVariant[d==="auto"?"neutral":d][r],qn.sizeVariant[SH(u)],qn.borderRadiusVariant[o],a&&qn.iconVariant,p==="hidden"&&qn.visuallyHidden),"aria-hidden":t==="hidden"?!0:void 0,children:e?s(G,{children:[s("span",{className:qn.visuallyHidden,children:e}),f]}):f})}function PH(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function SH(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function EH(e,t){for(const n of t){const r=n.lineAllocations.findIndex(i=>i.stableId===e),o=n.lineAllocations[r];if(r>=0&&o)return{lineAllocation:o,parent:n,index:r}}return null}function CH({stableId:e,merchandiseLines:t}){if(!e)return null;
38const n=EH(e,t);if(!n)return null;const{parent:r,index:o}=n;return Ab(r,o)}function kH({stableId:e,merchandiseLines:t}){return!CH({stableId:e,merchandiseLines:t})?.variantId}function od(){const{i18n:e}=b();function t(o){return e.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})}function n(o,i,a,l){const c=e.translate("subscriptions.recurring_totals_with_policies.first_cycles",{count:a,total_price:i}),u=e.translate("subscriptions.recurring_totals_with_policies.following_cycles",{total_price:o,interval:l});return`${c}${u}`}function r({fixedPrice:o,recurringPrice:i,fixedPriceCount:a,interval:l,intervalCount:c}){const u=(()=>{switch(l){case"year":return e.translate("subscriptions.recurring_total_intervals.year",{count:c});case"month":return e.translate("subscriptions.recurring_total_intervals.month",{count:c});case"week":return e.translate("subscriptions.recurring_total_intervals.week",{count:c});case"day":return e.translate("subscriptions.recurring_total_intervals.day",{count:c});default:return""}})();return o&&a?n(t(i),t(o),a,u):e.translate("subscriptions.recurring_totals",{total_price:t(i),interval:u})}return r}function tj(){const e=od();function t(n){return n?n.map(e):void 0}return t}function IH({available:e,name:t,value:n}){const r=`${t}: ${n}`;return typeof n=="string"&&n.lastIndexOf("https://cdn.shopify.com",0)===0?s(dt,{href:n,children:s(qm,{condition:e,children:s($,{size:"small",color:"subdued",children:t})})}):s(qm,{condition:e,children:s($,{size:"small",color:"subdued",children:r})})}function qm({condition:e,children:t}){return e===!1?s($,{type:"redundant",children:t}):t}function Db({properties:e,available:t}){const n=e.flatMap(({name:r,visible:o,value:i,sourceType:a})=>o&&a!=="MerchandisePropertyValueJson"&&i!==""&&i!==null?[s(be,{accessibilityRole:"list-item",children:s(IH,{available:t,name:r,value:i})},r)]:[]);return n.length>0?s(ee,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}const AH="dDm6x",TH={wordBreak:AH};function wH({id:e,deferredAmount:t,options:n,properties:r,recurringTotal:o,sellingPlan:i,subtitle:a,title:l,titleSize:c,totalPrice:u,children:d,titleAccessory:p,blockLayoutContent:m,remoteShopName:f,hasFailed:h,hideRuntimeExtensions:g}){const{lineItems:{optionsColor:y="subdued",optionsFormat:_="inline",optionsSeparator:P="comma",optionsTypography:v={},titleTypography:E={}}}=ct(),C=V(()=>e&&!g?{stableId:e}:null,[e,g]),S=c??"small",I=v.size??"small",{i18n:k}=b(),T=n&&n.length>0,A=P==="middot"?" · ":", ",L=od(),{value:M}=q().merchandiseLines,N=Se(),O=w(()=>N.value.currentDetour?.type==="thankYou"?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter"),D=it(O.value),B=kH({stableId:e,merchandiseLines:M?.lines??[]})?[]:D,z={size:I,color:y},x={size:I,color:y},W=f||h;return s(be,{className:TH.wordBreak,children:[W?s(ee,{direction:"inline",gap:"small-300",children:[f?s($,{size:"small",color:"subdued",children:f}):null,h?s(Nb,{icon:"alert-circle",tone:"critical",children:k.translate("order_summary.unconfirmed_label")}):null]}):null,s($e,{size:S,children:[s(LH,{condition:E.weight==="bold",children:l}),p]}),s(ee,{children:[m,_==="inline"&&a?s($e,{...x,children:a}):null,_==="inlineDescriptionList"&&T?s($e,{...x,children:n?.map(({name:X,value:Z})=>`${X}: ${Z}`).join(A)}):null,_==="descriptionList"&&T?s(be,{accessibilityRole:"unordered-list",children:n?.map(({name:X,value:Z})=>{const ce=`${X}: ${Z}`;return s(be,{accessibilityRole:"list-item",children:s($,{...z,children:ce})},X)})}):null,i?.name?s($e,{...x,children:i.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?s($e,{...x,children:L(o)}):null,r&&s(Db,{properties:r}),d,C?s(Yt,{customizations:B,options:C}):null]})]})}function LH({condition:e,children:t}){return e?s($,{type:"strong",children:t}):t}const Gm=He({displayName:"ProductDisclosuresDetails",load:()=>lt(()=>Be(()=>import("./23bd7c1a.cijUtcFN.js"),__vite__mapDeps([212,1,2,3,4,5,6,7,8,9]))),suspense:!1});function xH(e){if(typeof e=="number")return e;if(e==null||typeof e!="string"||e==="auto")return;const t="/";if(e.includes(t)){const[o,i]=e.split(t).map(c=>{const u=Number(c);return isNaN(u)||c.trim()===""?void 0:u}),a=o!==void 0&&o>0,l=i!==void 0&&i>0;if(a&&l)return o/i}const n=Number(e);return isNaN(n)?void 0:n}var Mn={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 RH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",MH=100,Ob=io(function({source:t,src:n,srcSet:r,sizes:o,alt:i="",objectFit:a="contain",loading:l="eager",aspectRatio:c="1/1",accessibilityRole:u="img",border:d="none",borderRadius:p="none",borderStyle:m,borderWidth:f,className:h,id:g,inlineSize:y="fill",onError:_}){const P=["presentation","none"].includes(u),{className:v}=At({..._r({border:d,borderStyle:m,borderWidth:f}),borderRadius:p,objectFit:a}),E=S_(n,t),S=!(n||t||r),I=n??E_(t)??r??RH,[k,T]=oe(S);F(()=>
38{if(!S){T(!1);return}const D=setTimeout(()=>T(!1),MH);return()=>{clearTimeout(D)}},[S]);const{animationEnabled:A,delay:L,onAnimationStart:M,onAnimationIteration:N}=T_();return s(NH,{condition:P,children:s(DH,{condition:y!=="auto",aspectRatio:c,children:s(P_,{condition:!!E,children:[E,s("img",{..._?{onError:D=>_(D.nativeEvent)}:{},src:I,srcSet:r,sizes:o,className:Y(Mn.Image,Mn.inlineSizeVariant[y],S&&A&&Mn.skeleton,S&&k&&Mn.hidden,v,h),style:{..._n({[Mn.vars.animationDelay]:`${L}ms`,[Mn.vars.animationDuration]:`${Tu}ms`})},onAnimationStart:M,onAnimationIteration:N,loading:l,id:g,role:P?u:void 0,alt:P?"":i,"aria-hidden":S?"true":void 0})]})})})});function NH({children:e,condition:t}){return t?s(be,{accessibilityVisibility:"hidden",children:e}):s(G,{children:e})}function DH({children:e,condition:t,aspectRatio:n}){const r=xH(n);return t&&r!==void 0?s("div",{className:Y(Mn.Wrapper,Mn.aspectRatio),style:_n({[Mn.aspectRatioVar]:`${r}`}),children:e}):s(G,{children:e})}const OH={small:16,large:24};function FH({disclosure:e,size:t}){const n=e.symbol;if(n){const r=`${OH[t]}px`,o=t==="small"?"":n.altText??"";return s(be,{inlineSize:r,blockSize:r,children:s(Ob,{src:n.one,srcSet:`${n.one} 1x, ${n.two} 2x, ${n.four} 4x`,alt:o,accessibilityRole:t==="small"?"presentation":"img",aspectRatio:"1/1",objectFit:"contain"})})}return s(Le,{type:"info",size:t==="small"?"small":"large-100",tone:"auto"})}const BH=tt("product-disclosure-modal-"),VH=tt("product-disclosure-tooltip-");function ec({disclosures:e,title:t}){const n=Xe(),r=Ei("deliveryNext");return!w(()=>!r.value&&(n.initialUnresolvedFields.value.size===0||n.pendingFieldsNegotiation.value?.status==="fetch_failed")).value||!e?.length?null:s(UH,{disclosures:e,title:t})}function UH({disclosures:e,title:t}){const{i18n:n}=b(),r=Ye(void 0,BH),o=Ye(void 0,VH),i=Gm.usePrefetch(),a=()=>{i()},l=n.translate("order_summary.product_disclosures.title"),c=n.translate("tooltip.accessibility_label_context",{context:t});return s(G,{children:[s(dt,{commandFor:r,interestFor:o,accessibilityLabel:c,onFocus:a,onMouseEnter:a,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:s(Le,{type:"alert-triangle",size:"small"})}),s(Cn,{id:o,children:zH(e)}),s(or,{id:r,heading:l,children:s(Gm,{disclosures:e})})]})}function zH(e){return s(be,{inlineAlignment:"start",children:s(ee,{gap:"small-200",children:e.map(t=>s(gt,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[s(gt,{blockSize:"1lh",placeItems:"center",children:s(FH,{disclosure:t,size:"small"})}),s($e,{textAlign:"start",children:t.title})]},t.id))})})}function Fb(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}}function HH({amount:e}){const{i18n:t}=b();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 s($e,{type:"small",color:"subdued",children:r})}const Bb=Ge(null);function qH(){return Pe(Bb)}var ul={Summary:"_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u",Icon:"_1mwdekd3 _1mwdekd2 _1fragem6e"};function Vb({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:o}=qH()??{},i=r!==void 0;return e?i?s("button",{id:t,className:ul.Summary,onClick:n,"aria-controls":o,"aria-expanded":r,type:"button",children:[e,s(Le,{size:"small-200",type:r?"chevron-up":"chevron-down",className:ul.Icon})]}):s("p",{id:t,className:ul.Summary,children:e}):null}const GH=tt("Details"),WH=Rw(function({open:t,defaultOpen:n=!1,onToggle:r,onAfterToggle:o,id:i,summary:a,content:l,toggleTransition:c="auto"}){const u=t!==void 0,[d,p]=oe(n),m=u?t:d,f=`${Ye(i,GH)}-content`,h=U(),g=R(v=>{v?.preventDefault();const E=C=>{typeof r=="function"&&r(C?"open":"closed",C?"closed":"open")};u?E(m):p(C=>(E(C),!C))},[u,m,r]),y=v=>{const E=h.current==="entering"&&v==="entered",C=h.current==="exiting"&&v==="exited";(E||C)&&typeof o=="function"&&o(E?"closed":"open",E?"open":"closed"),h.current=v};(!l||Array.isArray(l)&&l.length<1)&&console.warn("Details: content is required for toggle functionality");
38const _=typeof a=="string"?s(Vb,{children:a}):a,P=V(()=>({isOpen:m,onToggle:g,contentId:f}),[f,g,m]);return s(Bb.Provider,{value:P,children:s("div",{id:i,children:[_,s(gn,{id:f,open:m,duration:c==="auto"?"base":"none",onTransition:y,children:l})]})})});var Wm={overflowHidden:"_1r0jjrp0 _1fragemup _1fragemv4",visuallyHidden:"_1r0jjrp1 _1fragem121"};function $m({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignSelf:r="auto",background:o="transparent",backgroundHoverAndFocus:i,blockSize:a="auto",border:l="none",borderColor:c,borderRadius:u="none",borderStyle:d,borderWidth:p,children:m,display:f="auto",gridColumn:h="auto",gridRow:g="auto",id:y,inlineSize:_="auto",maxBlockSize:P="none",maxInlineSize:v="none",minBlockSize:E="0",minInlineSize:C="0",overflow:S="visible",padding:I="none",paddingBlock:k,paddingBlockEnd:T,paddingBlockStart:A,paddingInline:L,paddingInlineEnd:M,paddingInlineStart:N}){const O=oo(),{Element:D,role:B}=di(t,{defaultElement:O?"span":"div"}),{className:z,style:x,styleElement:W}=At({alignSelf:r,backgroundColor:o,backgroundColorHoverAndFocus:i,blockSize:a,..._r({border:l,borderColor:c,borderStyle:d,borderWidth:p}),borderRadius:u,display:f,gridColumn:h,gridRow:g,inlineSize:_,maxBlockSize:P,maxInlineSize:v,minBlockSize:E,minInlineSize:C,padding:I,paddingBlock:k,paddingBlockEnd:T,paddingBlockStart:A,paddingInline:L,paddingInlineEnd:M,paddingInlineStart:N},{transforms:{display:Hc}});return s(G,{children:[W,s(D,{"aria-hidden":n==="hidden"?!0:void 0,"aria-label":e,className:Y(n==="exclusive"&&Wm.visuallyHidden,S==="hidden"&&Wm.overflowHidden,z),id:y,role:B,style:x,children:m})]})}const $H={auto:"block",inline:"inlineBlock",block:"block"},Ym=e=>e==="auto"?"auto":e in tn?tn[e]:void 0,YH=e=>$H[e];function zt({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:o,style:i}=At({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:Ym,display:YH,inlineSize:Ym}});return s("div",{className:Y(o),id:r,style:i})}function jH({components:e,id:t}){const n=e.some(({merchandise:h})=>h.disclosures?.length),[r,o]=oe(e.length<=10||n),i=R(()=>{o(h=>!h)},[]),{i18n:a,embed:l}=b(),{lineItems:{optionsColor:c="subdued"}}=ct(),u={size:"small",color:c},d=it("Checkout::CartLineDetails::RenderLineComponents"),p=V(()=>e.reduce((h,{quantity:g})=>h+g,0),[e]),m=V(()=>t?{stableId:t}:null,[t]);if(e.length===0)return null;if(m&&d.length>0){const h=e.filter(({merchandise:g})=>g.disclosures?.length);return s(ee,{gap:"base",overflow:"hidden",children:[s(Yt,{customizations:d,options:m}),h.map(({stableId:g,merchandise:y})=>s($,{size:"small",children:[y.title," ",s(ec,{disclosures:y.disclosures,title:y.title})]},g))]})}const f=r?a.translate("order_summary.collapse_component_information",{count:p}):a.translate("order_summary.expand_component_information",{count:p});return s(G,{children:[s(WH,{open:r,onToggle:i,summary:s(Vb,{children:s($,{color:"subdued",size:"small",children:f})}),content:s(be,{paddingBlockStart:"small-400",children:s(ee,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map(({stableId:h,merchandise:{title:g,subtitle:y,image:_,sellingPlan:P,disclosures:v},quantity:E,properties:C})=>{const S=a.translate("order_summary.component_quantity_title",{quantity:E,product_title:g}),I=Fb(l,_);return s(gt,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[s($m,{alignSelf:"start",children:s(Qs,{size:"small",src:I?.one,srcSet:I?`${I.one} 1x, ${I.two} 2x, ${I.four} 4x`:void 0,alt:_?.altText})}),s($m,{alignSelf:"center",children:s(ee,{children:[v?.length?s($,{size:"small",children:[S," ",s(ec,{disclosures:v,title:g})]}):s($,{size:"small",children:S}),y&&s($,{...u,children:y}),P&&s($,{...u,children:P.name}),C&&s(Db,{properties:C})]})})]},h)})})})}),s(zt,{blockSize:"small-400"})]})}function KH({parentTitle:e}){const{i18n:t}=b(),{lineItems:{optionsColor:n}}=ct(),r={type:"small",color:n??"subdued"},o=t.translate("order_summary.group_title_label",{group_title:e});return s($e,{...r,children:o})}function id(e){return e.checkoutHideZeroValueDiscountLines===!0}function JH({discount:e,amount:t}){const{i18n:n,shop:r}=b();if(id(r)&&t.amount===0)return null;const i=t.amount>0?`(${n.formatCurrency(-t.amount,{currency:t.currencyCode,form:"short"})})`:null,a=(e.type==="code"&&e.codeHidden?n.translate("order_summary.discount_title"):e.title).toUpperCase();return s(gt,{gridAutoFlow:"column",gridAutoColumns:"1fr",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(Le,{type:"discount",size:"small"}),s($,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),s($e,{type:"small",color:"subdued",children:[s($,{dir:"auto",children:a}),i?` ${i}`:null]})]},e.title)}function jm({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=b(),o=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):s($,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return s(G,{children:[s($,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),s($,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),s($,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),s($e,{size:n,children:o})]})}function XH({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:o,hasFailed:i,size:a}){const{i18n:l}=b(),{lineItems:{priceTypography:c={}}}=ct();let u;if(i?u="redundant":c.weight==="bold"&&(u="strong"),n&&e.amount<n.amount)return s(jm,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:a});if(e.amount>
38t.amount&&r==="LINE")return s(jm,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:a});const d=e.amount===0&&!o,p=d?"uppercase":void 0,m=t;return s($,{translate:d,letterCase:p,type:u,tone:i?"critical":void 0,size:a,children:d?l.translate("order_summary.free_total_label"):l.formatCurrency(m.amount,{currency:m.currencyCode,form:"short"})})}function QH(){const{i18n:e}=b();return R(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])}function ZH(e){const{i18n:t}=b(),n=QH();if(e===null)return"";const{referenceValue:r,referenceUnit:o}=e.measurement,i=n(o),a=r.toString(),l=t.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if(o==="ITEM"){if(r===1)return t.translate("order_summary.unit_price.per_item.single",{price:l});if(r>1)return t.translate("order_summary.unit_price.per_item",{price:l,count:r})}else{if(r===1)return t.translate("order_summary.unit_price.per_unit.single",{price:l,unit:i});if(r>1)return t.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:i,count:a})}return""}function eq({unitPrice:e}){const t=ZH(e);return e===null?null:s($e,{type:"small",color:"subdued",children:t})}function tq({unitPrice:e,itemPrice:t,quantity:n}){const o=!!q().buyerIdentity.value?.purchasingCompany&&!e&&n>1&&t,{i18n:i}=b();return e?s(eq,{unitPrice:e}):o?s(G,{children:s($e,{type:"small",color:"subdued",children:[s($,{accessibilityVisibility:"hidden",children:i.translate("order_summary.price_per_item.label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),s($,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.price_per_item.accessibility_label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const nq="VnYYd",rq={Line:nq},oq={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function Ub(e="base"){return oq[e]}function iq(e){const n=e.parentRelationship?_H:G;return s(n,{spacing:"small100",children:s(sq,{...e})})}function sq({id:e,quantity:t,itemPrice:n,compareAtPrice:r,unitPrice:o,lineDiscounts:i,deferredAmount:a,totalPrice:l,sellingPlan:c,options:u,recurringTotal:d,title:p,subtitle:m,image:f,properties:h,disclosures:g,isHsaEligible:y,totalAmountBeforeReductions:_,totalAmountAfterLineDiscounts:P,components:v,hasReturnability:E,parentTitle:C,parentRelationship:S,remoteShopName:I,hasFailed:k,hideRuntimeExtensions:T,hidePrice:A,className:L}){const{shop:M,i18n:N,embed:O}=b(),D=Fb(O,f),{lineItems:{quantityVisibility:B="visible",priceLayout:z="inline",priceTypography:x={},titleTypography:W={}},merchandiseThumbnail:{size:X}={}}=ct(),Z=M.hasFlagEnabled(Fk),ce=S!==null,j=Z&&r?{amount:r.amount*t,currencyCode:r.currencyCode}:null,Q=V(()=>{if(Z&&r&&n){const me=(r.amount-n.amount)*t;return me>0?{amount:me,currencyCode:r.currencyCode}:null}return null},[Z,r,n,t]),H=x.size,J=ce?"small":Ub(X),he=W.size??"base",{blockSize:ne}=Pi(J),ue=B==="hidden"||t===1&&B==="visibleWhenMultiple"?void 0:t,Ae=A?null:s(XH,{totalAmountBeforeReductions:_,totalAmountAfterLineDiscounts:P,compareAtTotal:j,presentationLevel:i.length||Q?.amount?"LINE":"CART",hasDeferredAmount:!!a?.amount,hasFailed:k,size:H});return s(ia,{className:L,lineOffset:S?0:ne/2,children:[s(vn,{inlineAlignment:"start",children:s(Qs,{size:J,src:D?.one,srcSet:D?`${D.one} 1x, ${D.two} 2x, ${D.four} 4x`:void 0,alt:f?.altText,totalItems:ue})}),s(vn,{primary:!0,alignSelf:"baseline",minBlockSize:`${ne}
38px`,children:s(wH,{id:e,title:p,titleSize:he,subtitle:m,properties:h,sellingPlan:c,options:u,recurringTotal:d,totalPrice:l,deferredAmount:a,titleAccessory:g?.length?s(G,{children:[" ",s(ec,{disclosures:g,title:p})]}):void 0,blockLayoutContent:z==="block"?Ae:void 0,remoteShopName:I,hasFailed:k,hideRuntimeExtensions:T,children:[y?s($,{size:"small",color:"subdued",children:N.translate("payment.shop_pay_hsa.eligible_product")}):null,E?s($,{size:"small",color:"subdued",children:N.translate("amazon_pay.prime_returnability")}):null,s(tq,{unitPrice:o,itemPrice:n,quantity:t}),Q?.amount?s(HH,{amount:Q}):null,i.length>0||v.length>0?s(G,{children:[i.map(me=>s(JH,{discount:me.discount,amount:me.amount},me.id)),s(jH,{components:v,id:e})]}):null,v.length<1&&C?s(KH,{parentTitle:C}):null]})}),s(vn,{hidden:!0,children:s($,{children:t})}),z==="inline"?s(vn,{alignSelf:"baseline",children:s(be,{className:rq.Line,inlineAlignment:"end",children:Ae})}):null]})}const aq="KKoGf",lq="kAxbv",Km={SettleDown:aq,SettleUp:lq};function cq(e){switch(e){case"PICK_UP":return Km.SettleUp;case"SHIPPING":return Km.SettleDown;default:return}}function zb(e){return e!==Wn.Country&&e!==Wn.CountryProvince}function uq(e){switch(e){case Wn.Country:return["countryCode"];case Wn.CountryProvince:return["countryCode","zoneCode"];case Wn.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case Wn.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case Wn.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}function dq(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}function pq(e,t,n,r){return t?n==="unavailable"||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}function nj({deliveryMethod:e,localDelivery:t,subscriptionDelivery:n}){const{title:r,carrierName:o}=e;return t||n||(!o||r.toLowerCase().includes(o.replace(/[^\w\s]/,"").toLowerCase())?r:`${o} ${r}`)}function rj(e,t,n,r,o){const i=Dy(n??[],e?.handle);let a=pq(e?.displayCheckoutRedesign,t,o,i),l,c,u,d;r||(l=i?.minDeliveryDateTime||e?.minDeliveryDateTime,c=i?.maxDeliveryDateTime||e?.maxDeliveryDateTime,u=dq(i,e?.deliveryPromisePresentmentTitle),d=i?.brandedPromise||e?.brandedPromise,i?.minDeliveryDateTime&&i?.maxDeliveryDateTime&&t&&!d&&(a=!0));const p=i?.minDeliveryDateTime&&i?.maxDeliveryDateTime;return{showEstimatedDeliveryLabel:a,asyncShopPromiseEnabled:t,deliveryExpectationDateTime:p,estimatedDeliveryLabelTitle:u,minDeliveryDate:l,maxDeliveryDate:c,brandedPromise:d}}function oj(e){const t=[],n=[];return e.forEach(r=>{r.type==="SUBSCRIPTION"?t.push(r):n.push(r)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function ij(e,t,n){const r=Dy(t,e.handle);let o;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(o=r),{deliveryExpectation:o,shopPromise:r?.brandedPromise}}function sj(e){return e.reduce((t,{quantity:n})=>t+n,0)}function aj(e){return Object.values(e.reduce((t,n)=>{const{id:r,stableId:o,quantity:i}=n,a=r||o;return a&&(t[a]?t[a].quantity+=i:t[a]={...n}),t},{}))}function mq(e){const t={};return e?.deliveryExpectationLines?.forEach(n=>{n.deliveryStrategyHandle&&(t[n.deliveryStrategyHandle]=n)}),t}function fq({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=mq(t);return e.forEach(o=>{if(o.status!=="available")return;const i=o.methods.find(d=>d.handle===o.selectedDeliveryMethodHandle);if(!i)return;const{brandedPromise:a,handle:l}=i;if(!a||a.handle!==Bk)return;const u=r[l]?.returnability??!1;o.targetMerchandiseLines?.forEach(d=>n[d.stableId]={brandedPromise:a,hasReturnability:u})}),n}function lj(e){if(!e)return[];const t=e.reduce((n,r)=>{const o=r?.flatRateGroupId??Tl(),i=n[o];if(i){const a=i.targetMerchandiseLines.map(l=>l.digest);r.targetMerchandiseLines.filter(l=>!a.includes(l.digest)).forEach(l=>i.targetMerchandiseLines.push(l))}else n[o]=r;return n},{});return Object.values(t)}function hq(e,t){const n=U(null),r=U(new Set),o=new Set(e),i=n.current,a=t==null?null:new Set(t);if(i!=null){for(const l of o)!i.has(l)&&(a==null||a.has(l))&&r.current.add(l);for(const l of r.current)o.has(l)||r.current.delete(l)}return n.current=o,r.current}const gq={position:"end",source:"magnify"};function Jm({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:r,deliveryGroup:o}){const[i,a]=oe(""),{i18n:l,checkout:c}=b(),u=new Set(Vk(c.proposal.negotiated.fields.paymentMethods.value)),d=t===void 0?n.map(v=>v.key):n.slice(0,t).map(v=>
38v.key),p=hq(n.map(v=>v.key),d),m=cq(o),{value:f}=Cc(),{value:h}=q().deliveryExpectations,g=V(()=>fq({deliveryLines:f,deliveryExpectations:h}),[f,h]),y=V(()=>{const v=i.toLowerCase().split(" ").filter(Boolean);return n.filter(E=>v.every(C=>E.title.toLowerCase().includes(C)||E.subtitle?.toLowerCase().includes(C)))},[i,n]),_=V(()=>y?.reduce((v,E)=>v+E.quantity,0),[y]),P=n.length;return s(G,{children:[e&&s(G,{children:[s(Ku,{autoFocus:!0,icon:gq,controlledValue:i,onInput:v=>a(v),label:l.translate("order_summary.more_items_modal.search_item")}),s(zt,{blockSize:"large-300"})]}),e&&i&&s(G,{children:[s(ee,{direction:"inline",justifyContent:"space-between",children:[s($,{color:"subdued",children:l.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:_,totalNumber:r||P||0})}),s(dt,{onClick:()=>a(""),children:l.translate("order_summary.more_items_modal.clear_search")})]}),s(zt,{blockSize:"large-300"})]}),e&&y.length===0?s(ee,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[s(be,{inlineSize:"56px",children:s(Le,{size:"fill",type:"alert-circle"})}),s($e,{textAlign:"center",children:l.translate("order_summary.more_items_modal.empty_results",{searchText:i})})]}):s(xb,{title:l.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[s(Rb,{hidden:!0,children:[s(mr,{hidden:!0,children:l.translate("order_summary.product_image_label")}),s(mr,{hidden:!0,children:l.translate("order_summary.description_label")}),s(mr,{hidden:!0,children:l.translate("order_summary.quantity_label")}),s(mr,{hidden:!0,children:l.translate("order_summary.price_label")})]}),s(Mb,{children:y.map(({key:v,...E},C)=>{if(t!==void 0&&C>=t)return null;const S=v.substring(0,v.lastIndexOf("-"));return s(iq,{...E,isHsaEligible:!!(E.productId&&u.has(E.productId)),...g[S]??{},className:p.has(v)?m:void 0},v)})})]})]})}const yq=12,Xm=16,vq="merchandise-lines-modal";function sd({merchandiseLines:e,modalId:t=vq,totalLineQuantities:n,deliveryGroup:r}){const{i18n:o}=b(),i=e.length,a=i>Xm?yq:Xm;return s(G,{children:[s(Jm,{maxItems:a,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>a&&s(ee,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[s(cn,{inlineAlignment:"center",commandFor:t,children:o.translate("order_summary.view_all_items",{count:n||i||0})}),s(or,{id:t,heading:o.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:s(Jm,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function _q({merchandiseLinesByDeliveryType:e}){const{i18n:t}=b(),n=w(()=>{const i=new Set;return Array.from(e.value.entries()).map(([a,l])=>({group:a,merchandiseLines:l.map(c=>{const u=i.has(c.key);return i.add(c.key),u?{...c,hidePrice:u}:c}),totalLineQuantities:l.reduce((c,u)=>c+u.quantity,0)}))}),r=i=>{switch(i){case"PICK_UP":return t.translate("delivery_options.pickup");case"SHIPPING":return t.translate("delivery_options.ship");case"NOT_REQUIRED":return t.translate("delivery_options.digital_product")}},o=i=>{switch(i){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 s(ee,{gap:"large-200",children:s(Zn,{each:n,getKey:i=>i.group,children:({group:i,merchandiseLines:a,totalLineQuantities:l})=>s(ee,{gap:"base",children:[s(jt,{level:2,children:r(i)}),s(sd,{merchandiseLines:a,modalId:o(i),totalLineQuantities:l,deliveryGroup:i})]})})})}function bq({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:r,name:o,remoteShopsConfigMap:i},observability:a}=b(),l=new Map,c=e.get(r)??[],u=c.length>0;u&&l.set(n.translate("order_summary.from_shop_heading",{shop_name:o}),{lines:c,includeTotalLineQuantities:!0});const d=V(()=>Array.from(e.entries()).filter(([,y])=>y.length>0).filter(([y])=>y!==r),[e,r]),p=d.filter(([y])=>!i?.get(y)?.name).map(([y])=>y),m=p.length>0,f=p.join(",");F(()=>{p.length!==0&&a.error(new Sq("Missing remote shop names",{metadata:{shopIdsWithMissingNames:p}}))},[f,a]);const h=m||d.length>1,g=V(()=>d.flatMap(([y,_])=>_.map(P=>({...P,...h?{remoteShopName:i?.get(y)?.name}:{}}))),[d,h,i]);if(g.length===0)a.error(new Pq);else{const y=m||u?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),_=h?y:n.translate("order_summary.from_shop_heading",{shop_name:i.get(d[0][0]).name});l.set(_,{lines:g,includeTotalLineQuantities:!1})}return s(ee,{gap:"large-200",children:Array.from(l.entries()).map(([y,{lines:_,includeTotalLineQuantities:P}
38])=>s(ee,{gap:"base",children:[s(jt,{level:2,children:y}),s(sd,{merchandiseLines:_,totalLineQuantities:P?t:void 0})]},y))})}class Pq extends Pn{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 Sq extends Pn{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const Eq=["PICK_UP","SHIPPING","NOT_REQUIRED"];function Hb(e){if(e.length){if(e.includes("PICK_UP"))return"PICK_UP";if(e.includes("SHIPPING")||e.includes("LOCAL"))return"SHIPPING";if(e.every(t=>t==="NONE"))return"NOT_REQUIRED"}}function Cq(e){return Hb(e.deliveryMethodTypes)}function kq(e){if(e.status==="not_required")return"NOT_REQUIRED";const t=e.methods.find(({handle:n})=>n===e.selectedDeliveryMethodHandle);return Hb(t?[t.methodType]:e.methods.map(({methodType:n})=>n))}function Iq(e,t){const n=e.lineAllocations[t];if(n)return{properties:e.properties,quantity:n.quantity,stableId:n.stableId,totalAmountBeforeReductions:n.checkoutPriceBeforeReductions,merchandise:e}}function Aq(...e){const t=new Map;for(const n of e)for(const r of n??[])for(const o of r.lineComponents){if(t.has(o.stableId))continue;const i=new Map;r.lineAllocations.forEach((a,l)=>{const c=Iq(o,l);c&&i.set(a.stableId,c)}),i.size>0&&t.set(o.stableId,{parentStableId:r.stableId,componentsByParentAllocationStableId:i})}return t}function Tq(){const e=zu(),t=Se(),n=Je(ed()),r=ie(),o=r.deliveryLines,i=r.merchandiseLines,{deliveryNext:a,merchandiseLines:l}=q();return w(()=>{const c=n.value,u=new Map;if(c.length===0||!e.value)return u;const d=Aq(l.value?.lines,i.value),p=new Map;for(const S of c){if(!S.stableId)return u;const I=p.get(S.stableId);I?I.push(S):p.set(S.stableId,[S])}const m=new Map,f=new Set,h=(S,I,k)=>{const T=m.get(S)??new Map;if(!k){T.set(I.key,I),m.set(S,T),f.add(I.key);return}const A=T.get(I.key)?.components??[];T.set(I.key,{...I,components:A.some(({stableId:L})=>L===k.stableId)?A:[...A,k]}),m.set(S,T),f.add(I.key)},g=[],y=new Map,_=(S,I)=>{const k=I.requiresShipping?S:"NOT_REQUIRED";if(!k)return!1;const T=d.get(I.stableId),A=T?.parentStableId??I.stableId;if(!T){const L=y.get(A)??new Set;L.add(k),y.set(A,L)}return g.push({bundleComponent:T,group:k,parentStableId:A}),!0};if(o.value.flatMap(S=>S.value.targetMerchandiseLines??[]).some(S=>{const I=d.get(S.stableId)?.parentStableId??S.stableId;return p.has(I)})&&!$s(t.value.currentDetour))for(const S of o.value){const I=Cq(S.value);for(const k of S.value.targetMerchandiseLines??[])if(!_(I,k))return u}else if(a.value?.status!=="unavailable")for(const S of a.value?.lines??[]){const I=kq(S);for(const k of S.targetMerchandiseLines??[])if(!_(I,k))return u}if(Array.from(y.values()).some(S=>S.size>1))return u;const E=({bundleComponent:S,group:I,parentStableId:k})=>{const T=p.get(k);if(!T)return!0;for(const A of T){if(!S){h(I,A);continue}if(!A.id)return!1;const L=S.componentsByParentAllocationStableId.get(A.id);if(!L)return!1;h(I,A,L)}return!0};for(const S of g)if(!E(S))return u;if(c.some(({key:S})=>!f.has(S)))return u;const C=new Map;for(const S of Eq){const I=m.get(S);I?.size&&C.set(S,Array.from(I.values()))}return C})}const wq="tndLB",Lq="anPJT",xq="vv9lW",Rq="PP6CV",Lo={CollapsibleLineItemsToggleOverlay:wq,CollapsibleLineItemsToggleSizer:Lq,CollapsibleLineItemsToggleButton:xq,CollapsedLineItemThumbnails:Rq},Mq=tt("CollapsibleLineItems"),dl=e=>s(Ir,{children:e}),Nq=Qn(function(){const t=Je(ed()),n=td(),{i18n:r,shop:{id:o}}=b(),i=Se(),{lineItems:{priority:a="base",blockPadding:l,quantityVisibility:c="visible",sectionLayout:u="fixed"},merchandiseThumbnail:{shadow:d}={}}=ct(),p=!!l,m=c!=="hidden",f=t.value.some(L=>L.quantity>1),h=m&&(c==="visible"||f);let g;h?g="product-thumbnails-with-badge":d==="none"&&a==="high"?g=void 0:(d==null||d==="extraSmall")&&(g="product-thumbnails");const y=w(()=>i.value.currentDetour?.type==="thankYou"?{dynamicRender:"Checkout::ThankYou::Dynamic::Render",cartLinesRenderAfter:"Checkout::ThankYou::CartLines::RenderAfter"}:{dynamicRender:"Checkout::Dynamic::Render",cartLinesRenderAfter:"Checkout::CartLines::RenderAfter"}).value,_=it(y.dynamicRender,"ORDER_SUMMARY1"),P=it(y.dynamicRender,"ORDER_SUMMARY2"),v=it(y.cartLinesRenderAfter),E=w(()=>Array.from(n.value.values()).reduce((L,M)=>L+M.reduce((N,O)=>N+O.quantity,0),0)),C=w(()=>Array.from(n.value.entries()).some(([L,M])=>L!==o&&M.length>0)),S=w(()=>t.value.length>0||C.value),I=Tq(),k=w(()=>!C.value&&I.value.size>1),T=u==="collapsible"&&!C.value&&t.value.length>1,A=s(cb,{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")}
38,accessibilityRole:"section",accessibilityLabel:r.translate("order_summary.shopping_cart_label"),children:s(ve,{when:C,fallback:s(ve,{when:k,fallback:s(sd,{merchandiseLines:t.value,totalLineQuantities:E.value}),children:s(_q,{merchandiseLinesByDeliveryType:I})}),children:s(bq,{merchandiseLinesByShop:n.value,totalLineQuantities:E.value})})});return s(ve,{when:S,children:s(ee,{gap:"large-200",children:[s(Yt,{customizations:_,render:dl}),s(Ir,{children:T?s(Dq,{merchandiseLines:t.value,showQuantityBadges:m,children:A}):A}),s(Yt,{customizations:v,render:dl}),s(Yt,{customizations:P,gap:"large-200",render:dl})]})})});function Dq({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=we(!0),{i18n:o}=b(),{size:i}=ct().merchandiseThumbnail??{},a=Ub(i),l=o.translate("order_summary.number_items",{count:t.reduce((g,y)=>g+y.quantity,0)}),c=Ye(void 0,Mq),{blockSize:u}=Pi(a),d=Fq(t),p=()=>{r.value=!r.value},m=()=>s($,{children:l}),f=g=>s(gt,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[s(be,{minInlineSize:"0",overflow:"hidden",children:g}),s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:[m(),s(Le,{type:"chevron-down",size:"small-100"})]})]}),h=()=>s(ee,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[m(),s(Le,{type:"chevron-up",size:"small-100"})]});return s(be,{position:"relative",minBlockSize:`${u}px`,children:[s(gn,{id:`${c}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:s(ee,{gap:"base",children:[s("div",{"aria-hidden":"true",children:h()}),s("div",{id:c,children:e})]})}),s(gn,{id:`${c}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:s("div",{"aria-hidden":"true",children:f(s(Oq,{thumbnailMerchandise:d,thumbnailSize:a,showQuantityBadges:n}))})}),s("div",{className:Lo.CollapsibleLineItemsToggleOverlay,children:[s("div",{"aria-hidden":"true",className:Lo.CollapsibleLineItemsToggleSizer,children:[s(gn,{id:`${c}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:h()}),s(gn,{id:`${c}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:f(s("div",{className:Lo.CollapsedLineItemThumbnails,children:s($u,{variant:"inline-discrete",merchandise:d.slice(0,1),size:a,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),s("div",{className:Lo.CollapsibleLineItemsToggleButton,children:s(Ln,{accessibilityLabel:l,"aria-controls":c,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:p})})]})]})}function Oq({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:o}=Q2(t);return s("div",{ref:r,className:Lo.CollapsedLineItemThumbnails,children:s($u,{variant:"inline-discrete",merchandise:e,size:t,max:o.value,useImageAltTexts:!1,showQuantityBadges:n})})}function Fq(e){return e.map(t=>({stableId:t.stableId??t.key,image:t.image,quantity:t.quantity,totalPrice:t.totalPrice}))}function qb(){const e=U();return F(()=>()=>{const t=e.current;t&&fa.containers.delete(t)},[]),t=>{t&&(e.current&&fa.containers.delete(e.current),fa.containers.add(t),e.current=t)}}const Gb=Ge({spacing:"auto"});function Kt({spacing:e,children:t}){const n=V(()=>({spacing:e}),[e]);return s(Gb.Provider,{value:n,children:t})}function Wb(){return Pe(Gb)}var ur={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"},Ur={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 Bq(e){return"children"in e&&St(e.children)}function et(e){const{spacing:t}=Wb(),{moneyLines:{color:n="base"}}=ct(),{itemSize:r="inherit",layout:o="inherit",color:i}=e,a=i??n,l=Y(Ur.MoneyLine,r&&Ur.itemSizeVariant[r],t&&ur.groupSpacingVariant[t],o&&Ur.layoutVariant[o
38]);return s("div",{className:l,role:"row",children:Bq(e)?e.children:s(G,{children:[s(Tt,{children:s($,{color:e.labelColor,children:e.label})}),s(Et,{loading:e.loading,children:e.loading?s(wu,{size:e.size,emphasis:e.type==="strong"?"bold":void 0,children:e.value}):s($,{type:e.type,size:e.size,translate:!1,color:a,children:e.value})})]})})}function Tt({children:e}){return s("div",{className:Ur.Header,role:"rowheader",children:e})}function Et({children:e,loading:t,colSpan:n}){return s("div",{className:n?Ur.contentColSpan:Ur.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const Vq=tt("MoneyLine-Heading"),Uq=Ke(function(t,n){const{children:r,title:o,titleHidden:i=!0,spacing:a="auto"}=t,l=Ye(void 0,Vq),c=un(),{moneyLines:{color:u="base"}}=ct(),d=s(jt,{id:l,children:o});return s(G,{children:[i?s("div",{className:ur.visuallyHidden,children:d}):d,s("div",{role:"table","aria-labelledby":l,children:[s("div",{role:"rowgroup",className:ur.visuallyHidden,children:s("div",{role:"row",children:[s("div",{role:"columnheader",children:c("moneyLinesHeaderItem")}),s("div",{role:"columnheader",children:c("moneyLinesHeaderValue")})]})}),s("div",{role:"rowgroup",className:Y(ur.MoneyLines,ur.colorVariant[u],ur.spacingVariant[a]),ref:n,children:r})]})]})});function zn({condition:e,children:t,skeletonContent:n,...r}){return s(G,{children:[s(wu,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),s($,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}function zq(){const{i18n:e}=b(),n=q().alternativePaymentCurrency,r=qe("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:o}=Nt(),i=w(()=>{const a=n.value,l=r.value;if(!a&&(!l||!o.value))return;const c=a&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(a.totalWithoutGiftCards.amount,{currency:a.totalWithoutGiftCards.currencyCode,form:"explicit"})});return{loading:l,text:c}});return s(ve,{when:i,children:({loading:a,text:l})=>s(et,{children:s(Et,{children:s(zn,{condition:a,size:"small",color:"subdued",children:a?"$0.00":l})})})})}function Hq({children:e}){return typeof e=="function"?e():e}function $b({children:e}){return typeof e=="function"?e():e}function qq(e){return e.props.condition!==void 0}function Gq(e){return typeof e=="function"?e():e}function Or({children:e}){let t,n;return aS.forEach(e,r=>{lS(r)&&(!t&&qq(r)?Gq(r.props.condition)&&(t=r):!n&&r.type===$b&&(n=r))}),t??n??null}Or.When=Hq;Or.Fallback=$b;const Wq=tt("TaxesTooltip");function Qm({label:e,subdueText:t}){const{i18n:n,source:r}=b(),o=Ye(void 0,Wq);return s(G,{children:[s($,{color:t?"subdued":void 0,children:e}),s(Le,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),s(Cn,{id:o,children:r.type==="paymentCollection"?n.translate("order_summary.estimated_taxes_finalization_tooltip_content_short"):n.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}const $q="•";function Fr({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:o=!1,subdueText:i}){const{i18n:a}=b(),l=i?"subdued":void 0;return s(et,{color:l,children:[s(Tt,{children:s(Or,{children:[s(Or.When,{condition:!!r,children:s($,{color:l,children:r})}),s(Or.When,{condition:!!o,children:s($,{color:l,children:a.translate("order_summary.taxes_label")})}),s(Or.Fallback,{children:s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:s(Qm,{label:a.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),s(Et,{children:s(ee,{direction:"inline",gap:"small-200",children:[t?s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(Qm,{subdueText:i,label:a.translate("order_summary.estimated_taxes_label_short")}),s($,{color:l,children:$q})]}):null,s(zn,{condition:n,color:l,children:n?"$0.00":a.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const Yq={marginTop:"0"};function sa({id:e,title:t,subdueTitle:n,tooltipText:r,children:o,item:i,hideHeaderItemWhenOpen:a=!1,defaultOpen:l=!1}){const{i18n:c}=b(),u=we(l);return s(G,{children:[s(et,{children:[s(Tt,{children:s(ee,{direction:"inline",gap:"small-200",alignItems:"center",children:[s(Ln,{"aria-expanded":u.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{u.value=!u.value},children:s(gt,{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:[s($e,{color:n?"subdued":void 0,textAlign:"start",children:t}),s(Le,{type:u.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?s(Ln,{accessibilityLabel:c.translate("tooltip.accessibility_label_context",{context:t}),overlay:s(Cn,{children:r}),children:s(Le,{type:"question-circle",size:"small"})}):null]})}),i&&!(a&&u.value)?i:null]}),s("div",{style:Yq,children:s(gn,{open:u.value,id:`recurring-totals-collapsible-${e}`,children:o})})]})}function Yb(){const{checkout:e}=b(),t=q().taxes,n=xh();return w(()=>{const r=e.proposal.facts.tax,o=t.value,i=r||(o?.status==="available_total_included"?o.totalIncludedInTarget:null),a=n.value??i;return{localTotalTaxIncluded:i,totalTaxIncluded:a}})}function jb(){const{i18n:e}=b(),t=Yb();return w(()=>{const{totalTaxIncluded:n}=t.value;return n===null?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})}function Zm({label:e}){return s(Kt,{spacing:"small-500",children:s(et,{children:[s(Tt,{children:s($e,{color:"subdued",children:s(kr,{children:e})})}),s(Et,{})]})})}function ad({taxesIncluded:e,variant:t,shopId:n}){const{i18n:r}=b(),o=eo(),{localTotalTaxIncluded:i,totalTaxIncluded:a}=Yb().value,l=jb(),c=Rh(i),u=w(()=>[...c.value.entries()]),d=w(()=>o.value&&u.value.length>1);if(n){const p=c.value.get(n);if(!p||p.totalTax.amount===0||p.status==="available_total")return null;const m=r.translate("order_summary.vat_label_html",{amount:r.formatCurrency(p.totalTax.amount,{currency:p.totalTax.currencyCode,form:"short"})});return s(Zm,{label:m})}return!e||a===null||l.value===null||a.amount===0?null:t==="card"?s(be,{children:s($e,{color:"subdued",children:s(kr,{children:l})})}):s(ve,{when:d,fallback:s(Zm,{label:l.value}),children:s(sa,{id:"included-tax-money-line",title:l.value,children:s(Kt,{spacing:"small-400",children:s(Zn,{each:u,getKey:([p])=>p,children:([,p])=>s(Fr,{totalTax:p.totalTax,taxesLabel:p.shopName,showMoneyLineTaxesTooltip:p.status==="available_total",subdueText:!0})})})})})}function jq(){const{i18n:e}=b();return R(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}function ef({title:e,value:t,color:n,labelColor:r}){const o=jq();return s(et,{label:e,value:o(t),color:n,labelColor:r})}function Kq(e,t){const{i18n:n}=b(),r=ib();if(e){const o=r(e,{month:"short"});return n.translate("order_summary.deferred_total_due_date_label_next",{date:o})}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")}function Jq({variant:e=void 0,shopId:t}){const n=q(),{value:r}=n.deferredTotal,o=Bn(),{checkout:i}=b(),a=Cs(),l=w(()=>a.value||!!i.proposal.facts.taxesIncluded),{value:c}=n.paymentFlexibilityPaymentTermsTemplate,u=r&&r.amount.amount>0,d=ii(),p=Ci(),m=w(()=>!!(d.value&&!p.value)),f=r?.dueAt||(c?.dueDate?new Date(c.dueDate):null),h=c?.type==="FULFILLMENT",g=Kq(f,h);return!u||o.value?null:s(G,{children:[e==="card"?s(be,{background:"subdued",padding:"small-300",borderRadius:"small",children:s(ef,{title:g,value:r.amount,color:"subdued",labelColor:"subdued"})}):s(Kt,{spacing:"small-300",children:s(ef,{title:g,value:r.amount})}),e!=="card"&&s(ve,{when:m,children:()=>s(ad,{taxesIncluded:l.value,shopId:t})})]})}const Xq=tt("ShippingTooltip");function pl({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=b(),o=Ye(void 0,Xq),i="shipping-policy",a=t.translate("shop_policies.shipping_policy"),{localPolicies:l}=Ic(),c=r.some(p=>p.handle===i),u=e??(c?l.find(p=>p.handle===i):void 0);if(!u)return null;const d=t.translate("tooltip.accessibility_label_context",{context:a});return qt(n?.embedder)?u.url?s(Ln,{accessibilityLabel:d,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(u.url),children:s(Le,{type:"question-circle",size:"small"})}):null:s(G,{children:[s(Ln,{accessibilityLabel:d,commandFor:o,children:s(Le,{type:"question-circle",size:"small"})}),s(Xl,{id:o,defaultPolicy:u})]})}function Kb(e){return e.reduce((t,{total:n}
38)=>t+(n?.amount||0),0)}function Qq(){const{checkout:e}=b(),t=e.proposal.facts.delivery??[],n=Kb(t),r=t.flatMap(o=>o.lines.flatMap(i=>i.appliedDiscounts)).reduce((o,{amountDiscounted:i})=>(i?.amount||0)+o,0);return n-r}function Zq(){const{checkout:e}=b(),t=e.proposal.facts.delivery??[],n=Qq(),r=Kb(t),o=t.flatMap(({deliveryGroups:i})=>i??[]);return o.length>0?o.map(({groupType:i,methodType:a,total:l,deliveryLines:c})=>{const u=c.flatMap(({appliedDiscounts:d})=>d).reduce((d,{amountDiscounted:p})=>d+(p?.amount??0),0);return{type:i,methodType:a,cost:l.amount-u,costBeforeDiscounts:l.amount,currencyCode:l.currencyCode}}):t[0]?.total==null?null:[{type:"ONE_TIME_PURCHASE",cost:n,costBeforeDiscounts:r,currencyCode:t[0]?.total?.currencyCode}]}function eG(e){const{checkout:t}=b(),n=t.proposal.facts.delivery??[],r=new Set(e);return n.flatMap(({deliveryGroups:i,lines:a})=>r.size>0&&i?.length?i.filter(({methodType:l})=>r.has(l)).flatMap(({deliveryLines:l})=>l):a).flatMap(({appliedDiscounts:i})=>i).filter(i=>i.amountDiscounted?.amount&&i.amountDiscounted?.amount>0)}function tG(){const{checkout:e}=b();return w(()=>Uk(e.proposal))}function nG({checkout:e}){return e.proposal.facts.requiresShipping??!0}function rG({size:e,strong:t=!0}){const{i18n:n}=b(),r=t?"strong":void 0;return s(G,{children:[s($,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),s($,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function Jb({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:o,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:a,getLinePrice:l,getPriceLetterCase:c}){const{i18n:u,shop:d}=b(),p=d.hasFlagEnabled(Mh),m=e.length>0,f=e[0]?.currencyCode,h=e[0]?.type,{priceBeforeDiscounts:g,priceAfterDiscounts:y}=i??d.marketDrivenShippingEnabled?gA(e,a):yA(e),_=m&&g&&g>y&&!p,P=l(y,h),v=s(zn,{condition:t,color:n,type:r==="bold"?"strong":void 0,translate:!1,letterCase:c(y,h),children:P});return t?v:o?s(rG,{strong:!1}):_?s(ee,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[s($,{accessibilityVisibility:"exclusive",children:u.translate("order_summary.original_price")}),s($,{size:"base",color:"subdued",type:"redundant",translate:!1,children:u.formatCurrency(g,{currency:f})}),s($,{accessibilityVisibility:"exclusive",children:u.translate("order_summary.price_after_discount_aria_text")}),v]}):v}const Eo=({getLinePrice:e,getPriceLetterCase:t,label:n,moneyLines:r,finalMoneyLines:o,forceSubduedStyle:i,discountLines:a,shippingTooltip:l,included:c,shouldConsolidateRateGroupMax:u,getRateGroupMaxKey:d})=>{const p=Se(),m=w(()=>p.value.currentPage?.id==="information"),{shop:f,checkout:h,i18n:g}=b(),y=!f.hasFlagEnabled(Mh),{value:_}=q().deliveryNext,P=wt(),v=qe("deliveryNext").value,C=Ei("deliveryNext").value||(P.value?v:!1),S=h.proposal.facts.delivery??[],I=[...new Set(o.flatMap(({methodType:x})=>x===void 0?[]:[x]))],k=eG(I),T=h.configuration.layout.isOnePage.value,A=V(()=>!r.length&&!S.length||C,[]),L=_?.status==="unavailable"||C||i,M=a?.filter(x=>Jh(x))??[],N=k.length?[...new Set(k.map(x=>x.label))]:[...new Set(M.map(x=>to(x)&&x.discount.type==="code"&&x.discount.codeHidden?g.translate("order_summary.discount_title"):x.title))],O=y?N.map(x=>s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(Le,{type:"discount",size:"small"}),s(ki,{children:s($,{color:"subdued",children:x.toUpperCase()})})]},x)):[],D=L||i,B=(m.value||T)&&l,z=i?"subdued":void 0;return s(G,{children:[s(et,{itemSize:A?"auto":void 0,color:z,children:[s(Tt,{children:s(ee,{direction:"inline",gap:"small-400",alignItems:"center",children:[s($,{color:z,children:n}),B]})}),s(Et,{loading:C,children:s(Jb,{getLinePrice:e,getPriceLetterCase:t,appearance:D?"subdued":void 0,moneyLines:o,deliveryLoading:C,included:c,shouldConsolidateRateGroupMax:u,getRateGroupMaxKey:d})})]}),O.length>0&&s(Kt,{spacing:"small-400",children:s(et,{children:s(Tt,{children:O})})})]})},oG=({shopId:e,forceSubduedStyle:t})=>{const n=q(),r=n.deliveryNext.value,o=wt(),i=qe("deliveryNext"),a=Ei("deliveryNext"),l=a.value||(o.value?i.value:!1),{checkout:c,i18n:u,shop:{id:d,marketDrivenShippingEnabled:p,remoteShopsConfigMap:m},source:f}=b(),h=c.configuration.layout.isOnePage.value,g=c.proposal.facts.delivery,y=er(),_=kl(y.value.enabledDeliveryMethods),v=vU()?.selected.value??[],E=v.length>0,C=zk(v).length>0,S=v.includes("PICK_UP"),I=!!e,{visibility:k}=c.configuration,T=n.discountLines.value,A=Eu(),L=Zq(),M=Hk(e),{allMoneyLines:N,moneyLinesForShop:O}=M.value,D=eo(),z=Se().value.currentPage?.id!=="review"&&(!l||D.value),x=u.translate("order_summary.pickup_label"),W=u.translate("order_summary.shipping_label"),Z=U(_?x:W),j=w(()=>{const de=kl(y.value.enabledDeliveryMethods)?x:W;if(!(a.value||(o.value?i.value:!1))){const rt=M.value.moneyLinesForShop,ft=st(f)?g?.[0]?.pickupAddress:rt.length>0&&rt.every(pt=>pt.methodType==="PICK_UP");Z.current=ft?x:de}return Z.current}).value,Q=!!(r&&r.status==="filled"&&r.lines.some(({status:de})=>de!=="not_required")),H=!l&&!Q&&!c.isShippingRequired.value,J=L||O,he=J.filter(nt),ne=he.filter(de=>de.methodType!=="PICK_UP"),ae=he.filter(de=>de.methodType==="PICK_UP"),ue=J.length===0||he.length>0,Ae=!I&&!st(f)&&E&&ue,me=Ae&&S&&!C,ye=Ae&&C,Ee=me?x:W,Ue=w(()=>!!(st(f)&&nG({checkout:c})&&uo({checkout:c,source:f})?.lines.length));if(A.value||!(k.showShippingLines.value&&!st(f)||Ue.value)||H||I&&J.length===0)return null;if(I){const de=J.some(xe=>re(xe));return s(Eo,{getLinePrice:je,getPriceLetterCase:Re,label:j,forceSubduedStyle:t,moneyLines:O,finalMoneyLines:J,discountLines:e===d?T?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:de,getRateGroupMaxKey:Me})}if(D.value&&J.length>1){const de=J.some(rt=>re(rt)),xe=se(J);return s(sa,{id:"shipping-money-line",title:j,hideHeaderItemWhenOpen:!0,item:s(Et,{loading:l,children:s(Jb,{getLinePrice:je,getPriceLetterCase:Re,moneyLines:J,deliveryLoading:l,shouldConsolidateRateGroupMax:de,getRateGroupMaxKey:Me})}),children:s(Kt,{spacing:"small-400",children:xe.map(({shopName:rt,lines:ft})=>{const pt=ft.find(Zt=>Zt.shippingPolicy)?.shippingPolicy,Qt=ft.some(Zt=>(Zt.shopId??d)===d&&Zt.hasLocalDiscountApplied);return s(Eo,{getLinePrice:je,getPriceLetterCase:Re,label:rt,forceSubduedStyle:!0,moneyLines:N,finalMoneyLines:ft,discountLines:Qt?T?.lines:void 0,shouldConsolidateRateGroupMax:de,getRateGroupMaxKey:Me,shippingTooltip:z&&pt?s(pl,{defaultPolicy:pt}):void 0},ft[0]?.shopId??rt)})})})}if(ne.length>0&&ae.length>0)return ke({});if(Ae&&C&&S)return ke({shippingGetLinePrice:ne.length>0?je:Bt,shippingGetPriceLetterCase:ne.length>0?Re:Ct,pickupGetLinePrice:Xt,pickupGetPriceLetterCase:De});let K=N,te=J,pe=je,ge=Re,Ie=j,_e=z?s(pl,{defaultPolicy:null}):void 0;return me?(K=ae,te=ae,pe=Xt,ge=De,Ie=Ee,_e=void 0):ye&&(K=ne,te=ne,Ie=Ee,ne.length===0&&(pe=Bt,ge=Ct)),s(Eo,{getLinePrice:pe,getPriceLetterCase:ge,label:Ie,forceSubduedStyle:t,moneyLines:K,finalMoneyLines:te,discountLines:T?.lines,shippingTooltip:_e});function ke({shippingGetLinePrice:de=je,shippingGetPriceLetterCase:xe=Re,pickupGetLinePrice:rt=je,pickupGetPriceLetterCase:ft=Re}){const{shippingDiscountLines:pt,pickupDiscountLines:Qt}=vA(r,T?.lines);return s(G,{children:[s(Eo,{getLinePrice:de,getPriceLetterCase:xe,label:W,forceSubduedStyle:t,moneyLines:ne,finalMoneyLines:ne,discountLines:pt,shippingTooltip:z?s(pl,{defaultPolicy:null}):void 0}),s(Eo,{getLinePrice:rt,getPriceLetterCase:ft,label:x,forceSubduedStyle:t,moneyLines:ae,finalMoneyLines:ae,discountLines:Qt,shippingTooltip:void 0})]})}function Ne(de){return de.every(xe=>xe.type==="SUBSCRIPTION")}
38function nt(de){return de.methodType!==void 0}function re(de){const xe=de.shopId??d;if(xe===d)return p;const rt=m?.get(xe);return rt?rt.marketDrivenShippingEnabled:!!de.amountCombinabilityToken}function se(de){const xe=new Map;for(const rt of de){const ft=rt.shopId??d,pt=xe.get(ft);pt?pt.lines.push(rt):xe.set(ft,{shopName:rt.shopName??j,lines:[rt]})}return[...xe.values()]}function Me(de){const xe=de.amountCombinabilityToken??void 0;if(!(!xe||!re(de)))return`${de.shopId??d}:${xe}`}function Re(de,xe){return _?"uppercase":l||de===void 0||!N.length&&!g?.length||de!==0||xe==="SUBSCRIPTION"&&!Ne(N)?"none":"uppercase"}function je(de,xe){if(l)return"$0.00";if(de!==void 0&&(N.length||g?.length)){const ft=xe==="SUBSCRIPTION"&&!Ne(N)?u.translate("shipping.subscription_delivery_description.shipping_price_included"):u.translate("order_summary.free_shipping_total_label");if(de===0)return ft;const pt=st(f)?g?.[0]?.total?.currencyCode:N[0].currencyCode;return u.formatCurrency(de,{currency:pt,form:"short"})}return _?u.translate("order_summary.free_shipping_total_label"):h?u.translate("order_summary.enter_shipping_address"):u.translate("order_summary.shipping_default_value")}function Bt(){return je(void 0)}function Ct(){return Re(void 0)}function Xt(de,xe){return!ae.length&&!g?.length?l?"$0.00":u.translate("order_summary.free_shipping_total_label"):je(de,xe)}function De(de,xe){return!ae.length&&!g?.length&&!l?"uppercase":Re(de,xe)}},iG=tt("ReductionTooltip");function ld({type:e}){const{i18n:t,shop:{name:n}}=b(),r=Ye(void 0,iG),o=e==="giftCard"?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 s(G,{children:[s(Le,{type:"question-circle",size:"small",interestFor:r}),s(Cn,{id:r,children:s($,{children:o})})]})}function tf({line:e,title:t,amount:n}){const{i18n:r,source:o,shop:i}=b(),a=st(o)&&n,l=id(i);if(e&&!to(e)||e&&e.discount.presentationLevel!=="CART"||e&&e.amount?.amount===0&&l)return null;const c=p=>r.formatCurrency(-p.amount,{currency:p.currencyCode,form:"short",spacedMinusSign:!0});if(e?Jh(e)||e.allocations.length===0:!1)return null;let d=e?.title;return e&&e.discount.type==="custom"&&e.title===""&&(d=r.translate("order_summary.custom_discount")),e&&e.discount.type==="code"&&e.discount.codeHidden&&(d=r.translate("order_summary.discount_title")),s(et,{children:[s(Tt,{children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(Le,{type:"discount",size:"small"}),s(ki,{children:s($,{color:"subdued",children:e?d?.toUpperCase():t?.toUpperCase()})})]})}),s(Et,{children:s($,{translate:!1,children:a?c(n):e&&sG({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]})}function sG({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(o=>o.target.type==="DELIVERYLINE")||e.allocations.length===0)return t;if(to(e)){const o=e.amount?.amount,i=e.amount?.currencyCode;if(o&&i)return n.formatCurrency(-o,{currency:i,form:"short",spacedMinusSign:!0})}}const aG=(e,t)=>e?.filter(n=>to(n)&&qk(n)&&!(t&&n.amount?.amount===0))??[],lG=({disableTooltip:e=!1})=>{const{i18n:t,checkout:n,source:r,shop:o}=b(),a=q().discountLines,l=n.proposal.facts.orderDiscounts??[],c=st(r)&&l,u=id(o),d=eo(),p=w(()=>aG(a.value?.lines,u)),m=w(()=>!e&&d.value),f=w(()=>p.value.length>0),h=w(()=>t.translate("order_summary.discount_order_stacking",{count:p.value.length}));return s(G,{children:[s(ve,{when:f,children:()=>s(et,{children:s(Tt,{children:s(gt,{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:[s($,{children:h}),s(ve,{when:m,children:s(ld,{type:"discount"})})]})})})}),s(Kt,{spacing:"small-500",children:[s(Zn,{each:p,getKey:g=>g.title,children:g=>s(tf,{line:g})}),c&&l.map(g=>s(tf,{title:g.label,amount:g.amount},g.label))]})]})};function cG(e,t){return e||(t?.status==="available_total"?t.totalDuty:null)}const uG=tt("DutyMoneyLineTooltip");function dG({shopId:e}){const{i18n:t,checkout:n,shop:r}=b(),o=q(),{value:i}=o.landedCostDetails,a=qe("landedCostDetails").value,l=qe("duties").value,c=n.proposal.facts.duty,{value:u}=o.duties,d=Ye(void 0,uG);if(e&&e!==r.id)return null;const p=cG(c,u),m=i?.incoterm===Lc.Ddu&&i.reason===_A.ErrorOccured,f=(l||a)&&!c&&!m,h=p||m,g=m?"subdued":void 0,y=s(ee,{direction:"inline",alignItems:"center",gap:"small-400",children:[s($,{children:t.translate("order_summary.duties_label")}),m&&!f&&s(G,{children:[s(Le,{type:"question-circle",interestFor:d,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),s(Cn,{id:d,children:t.translate("order_summary.error_duties_tooltip")})]})]}),_=m?t.translate("order_summary.may_be_charged_on_delivery"):p&&t.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"});return s(G,{children:h&&s(et,{color:g,children:[s(Tt,{children:y}),s(Et,{children:s(ee,{direction:"inline",gap:"small-200",children:s(zn,{condition:f,children:f?"$0.00":_})})})]})})}function pG(){const{checkout:e}=b(),t=qe("taxes"),{taxes:n}=q();return w(()=>{const r=e.proposal.facts.taxBreakdown;if(r?.length)return{data:r.map(({title:a,amount:l})=>({description:a,amount:l})),loading:!1};if(!n.value||n.value.status!=="available_total")return null;const{taxBreakdown:o}=n.value;return o?.length?{data:o,loading:t.value}:null})}const mG=2;function fG({data:e,loading:t,totalTax:n}){const{i18n:r,shop:o}
38=b(),i=hG(),a=o.hasFlagEnabled(Gk)&&e.length>mG,l=e.map(({description:c,amount:u},d)=>s(Fr,{loading:t,totalTax:u,taxesLabel:i({description:c}),subdueText:a},`${c}-${d}`));return a?s(sa,{id:"tax-breakdown-money-line",title:r.translate("order_summary.taxes_label"),defaultOpen:!0,hideHeaderItemWhenOpen:!0,item:n?s(Et,{loading:t,children:s(zn,{condition:t,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}):void 0,children:s(Kt,{spacing:"small-400",children:l})}):s(Kt,{spacing:"small-400",children:l})}const hG=()=>{const{i18n:e}=b();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 gG({shopId:e}){const{i18n:t,checkout:n,shop:r}=b(),o=q(),{hasNegotiatedOnce:i}=Xe(),a=qe("taxes"),l=Ei("taxes"),c=qe("landedCostDetails"),u=qe("remoteTaxDetails"),d=eo(),p=Ks(),m=pG(),f=w(()=>{if(n.proposal.facts.tax)return n.proposal.facts.tax;const k=o.taxes.value;return k?.status==="available_total"?k.totalTax:null}),h=w(()=>!!o.landedCostDetails.value),g=w(()=>{const k=o.taxes.value;return k!==void 0&&k.status!=="pending"}),y=w(()=>n.proposal.facts.tax?!1:l.value?!0:g.value?!1:a.value||!i.value),_=w(()=>(y.value||a.value||c.value||u.value)&&!n.proposal.facts.tax),P=w(()=>{const k=f.value;return k&&k.amount>0?k:y.value?{amount:0,currencyCode:r.currencyCode}:void 0}),v=Rh(f.value),E=w(()=>[...v.value.entries()]),C=xh(),S=w(()=>C.value??f.value),I=w(()=>d.value&&E.value.length>1);if(e){const k=v.value.get(e);return!k||k.totalTax.amount===0||k.status==="available_total_included"?null:s(Fr,{loading:_.value,totalTax:k.totalTax,hasLandedCostDetails:e===r.id&&h.value})}if(p?.applied&&S.value)return s(Fr,{totalTax:S.value});if((!S.value||S.value.amount===0)&&!y.value)return null;if(I.value&&S.value){const k=h.value?t.translate("order_summary.taxes_label"):t.translate("order_summary.estimated_taxes_label"),T=h.value?void 0:t.translate("order_summary.estimated_taxes_finalization_tooltip_content");return s(sa,{id:"tax-money-line",title:k,tooltipText:T,item:s(Et,{loading:_.value,children:s(zn,{condition:_.value,children:_.value?"$0.00":t.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:s(Kt,{spacing:"small-400",children:s(Zn,{each:E,getKey:([A])=>A,children:([,A])=>s(Fr,{loading:_.value,totalTax:A.totalTax,taxesLabel:A.shopName,subdueText:!0})})})})}return s(ve,{when:m,fallback:s(ve,{when:P,children:k=>s(Fr,{loading:_.value,totalTax:k,taxesLabel:y.value?t.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:h.value})}),children:k=>s(fG,{data:k.data,loading:k.loading||_.value,totalTax:f.value})})}const yG=tt("CombinedDutiesAndTaxesTooltip"),vG=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=b(),o=Ye(void 0,yG);if(t&&t!==r.id)return null;const i=e.value;return s(et,{children:[s(Tt,{children:s(ee,{direction:"inline",alignItems:"center",gap:"small-400",children:[s($,{children:n.translate("order_summary.duties_and_taxes_label")}),s(Le,{type:"question-circle",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),s(Cn,{id:o,children:n.translate("order_summary.error_duties_tooltip")})]})}),s(Et,{children:s(zn,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},_G=({shopId:e})=>{const{checkout:t}=b(),n=q(),r=!!t.proposal.facts.taxesIncluded,o=!!t.proposal.facts.dutiesIncluded,i=Cs(),a=Nh(),l=n.landedCostDetails,c=qe("landedCostDetails"),u=Ei("landedCostDetails"),d=n.optionalDuties,p=qe("optionalDuties"),m=w(()=>!!d.value?.refuseDutiesPermitted&&!!d.value?.buyerRefusesDuties&&l.value?.incoterm===Lc.Ddu),f=w(()=>u.value||p.value||c.value),h=w(()=>!(a.value||o)),g=w(()=>!!e||!(i.value||r));return s(ve,{when:m,fallback:s(G,{children:[s(ve,{when:h,children:s(dG,{shopId:e})}),s(ve,{when:g,children:s(gG,{shopId:e})})]}),children:s(vG,{loading:f,shopId:e})})};function bG({line:e,disableTooltip:t=!1}){const{i18n:n}=b(),{value:r}=eo(),o=!t&&r,i=Wk(e.method).toUpperCase();return s(et,{itemSize:"auto",children:[s(Tt,{children:s(ee,{direction:"inline",gap:"small-400 small-300",children:[s($,{children:n.translate("order_summary.gift_card_label")}),s(ee,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Le,{type:"gift-card"}),s($,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),s($,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),o&&s(ld,{type:"giftCard"})]})]})}),s(Et,{children:s($,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function PG({disableTooltip:e=!1}){const t=qu(),n=eo(),{shop:r,i18n:o}=b(),i=r.hasFlagEnabled($k),a=w(()=>!e&&n.value),l=w(()=>n.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=w(()=>({total:t.value.reduce((d,p)=>d+(p.cost?.amount||0),0),currencyCode:t.value[0]?.cost?.currencyCode}));if(t.value.length===0)return null;if(i){const{total:u,currencyCode:d}=c.value;return s(et,{children:[s(Tt,{children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s($,{children:o.translate("order_summary.gift_card_label")}),s(ve,{when:a,children:s(ld,{type:"giftCard"})})]})}),s(Et,{children:s($,{children:o.formatCurrency(-u,{currency:d,form:"short",spacedMinusSign:!0})})})]})}return s(Zn,{each:t,getKey:u=>wl(u.method),children:u=>s(bG,{line:u,disableTooltip:e})})}var cd={Content:"_1x41w3p3",Header:"_1x41w3p2",MoneySummary:"_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19"};function SG(e){return"children"in e&&St(e.children)}function Oo(e){const{spacing:t}=Wb(),n=Y(cd.MoneySummary,t&&ur.groupSpacingVariant[t]);return s(G,{children:s("div",{className:n,role:"row",children:SG(e)?e.children:s(G,{children:[s(ei,{children:s($,{type:"strong",size:"large",children:e.label})}),s(zr,{children:s(ee,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[s(Wu,{children:s($,{size:"small",color:"subdued",children:e.prefix})}),s($,{type:"strong",size:"large",children:e.value})]})})]})})})}function ei({children:e}){return s("div",{className:cd.Header,role:"rowheader",children:e})}function zr({children:e,accessibilityColumnIndex:t}){return s("div",{className:cd.Content,role:"cell","aria-colindex":t,children:e})}const EG="_3KD7m",CG="kxIMD",kG="_3XbdQ",Ki={Wrapper:EG,Char:CG,Price:kG,"Price-enter"
38:"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"},Xb=30;let ml=0;function IG({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:n}}=Fe(),r=Un(),o=U(ht(()=>t.value)),i=we([{id:ml++,formatted:ht(()=>e.value)}]),a=wt(),l=n==="base";F(()=>{const u=o.current;t.value.currencyCode===u.currencyCode&&t.value.amount<u.amount?i.value=[...i.value,{id:ml++,formatted:e.value}]:i.value=[{id:ml++,formatted:e.value}],o.current=t.value},[t.value.amount,t.value.currencyCode,e.value]);const c=R(u=>{i.value=i.value.filter(d=>d.id!==u)},[i]);return l?s("span",{className:Ki.Wrapper,style:{"--delay":`${r?0:Xb}ms`},children:s(ve,{when:a,fallback:e,children:()=>i.value.map((u,d)=>s(AG,{formatted:u.formatted,current:d===i.value.length-1,onDisappear:c,snapshotId:u.id,animated:i.value.length>1},u.id))})}):s(G,{children:e})}function AG({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:o}){const i=Un(),a=on(t,"fast",n),l=e.split("");return F(()=>{let c;return a==="exited"&&(i?r(o):c=setTimeout(()=>r(o),e.length*Xb)),()=>{clearTimeout(c)}},[a,i,e,r,o]),s("span",{className:Y(Ki.Price,n&&Ki[`Price-${a}`]),"aria-label":t?e:void 0,"aria-hidden":t?void 0:"true",style:{"--total":l.length},children:l.map((c,u)=>s("span",{className:Ki.Char,style:{"--index":u},children:c},u))})}function TG(e,t){return t.some(n=>e.has(n))}function Qb(e){const{initialUnresolvedFields:t}=Xe();return w(()=>TG(t.value,e))}const wG=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function Zb({alignItems:e="baseline",freeLabel:t,outOfStockLabel:n,paymentDue:r,showCurrencyBadge:o,hideCurrencyCode:i,size:a}){const{i18n:l,embed:c}=b(),u=Vy(),{orderSummary:d}=Fe(),p=_R(),m=wt(),f=qe("deliveryNext"),h=qe("taxes"),g=qe("duties"),y=qe("landedCostDetails"),_=qe("remoteTaxDetails"),P=q(),v=w(()=>P.deliveryNext.value!==void 0||P.taxes.value!==void 0||P.duties.value!==void 0||P.landedCostDetails.value!==void 0||P.remoteTaxDetails.value!==void 0),E=Qb(wG),C=we(E.peek()),S=we(!E.peek()&&v.peek());ze(()=>{!E.value&&v.value&&(S.value=!0)});const I=w(()=>f.value||h.value||g.value||y.value||_.value),k=w(()=>c&&qt(c.embedder)?!1:c?!v.value||I.value:C.peek()&&!S.value),T=!i&&u,A=w(()=>n&&p.value?n:t&&r.value.amount===0?t:l.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"})),L=t?"uppercase":void 0,M=d.totalDueTypography;let N,O;M?(N=M.weight==="bold"?"strong":"generic",O=M.size??"base"):(N="strong",O="large");const D=s($,{size:o?"extraSmall":"small",color:"subdued",translate:!1,children:r.value.currencyCode}),B=w(()=>T&&A.value!==n&&A.value!==t&&(!m.value||!cS(r.value.currencyCode,A.value)));return s(ee,{alignItems:e,gap:"small-300",direction:"inline",children:[s(ve,{when:B,children:s(Wu,{children:o?s(Nb,{color:"subdued",size:"small",children:D}):D})}),s(zn,{condition:k.value,type:N,size:a??O,translate:!1,letterCase:L,skeletonContent:A.value,children:S.value?s(IG,{formatted:A,money:r}):null})]})}const nf=1e8;function LG(e,t){const n=e/t*100,r=Math.round(n*nf)/nf;return Math.ceil(r)/100}function xG(e){return e?.installmentPlans?.some(t=>t.type==="MSI")??!1}function cj(e,t){return e.map(n=>n.method.type==="direct"||n.method.type===Kn.CreditCard?{...n,method:{...n.method,creditCardInstallments:t}}:n.method.type==="wallet"&&n.method.name==="SHOP_PAY"&&n.method.walletContent?{...n,method:{...n.method,walletContent:{...n.method.walletContent,creditCardInstallments:t}}}:n)}function uj(e){return e.map(t=>t.method.type==="direct"||t.method.type===Kn.CreditCard?{...t,method:{...t.method,creditCardInstallments:void 0}}:t)}function RG(){const e=si(),t=Gu(),{installmentMonthsSignal:n}=Nt(),{i18n:r}=b(),o=q().paymentMethods,i=w(()=>o.value?.some(u=>u.type==="direct"&&!u.alternative&&xG(u))??!1),a=w(()=>{const u=n.value,d=e.value;return!(i.value&&!!u)||!d||!u?d:{...d,amount:LG(d.amount,u)}}),l=w(()=>{const u=n.value;return i.value&&!!u&&!!e.value?r.translate("order_summary.installment_due_today_label"):t.value}),c=w(()=>i.value&&!!n.value);return{amount:a,label:l,isInstallment:c}}function MG(){const e=q().paymentFlexibilityPaymentTermsTemplate,t=ii(),n=Hu(),r=Bn();return w(()=>
38{if(t.value||n.value)return!1;const o=!!e.value,i=r.value;return o||i})}function Ji({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=ct();return s(Oo,{children:[s(ei,{children:s($,{type:"strong",size:r?.size??"large",children:e})}),s(zr,{children:s(Zb,{paymentDue:t,hideCurrencyCode:n})})]})}function NG({variant:e,showLoadingPlaceholder:t}){const n=si(),{i18n:r,shop:o}=b(),i=Gu(),a=w(()=>!n.value),l=w(()=>n.value?r.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"}):void 0),c=U({amount:0,currencyCode:o.currencyCode}),u=w(()=>{const d=n.value;return d!=null&&(c.current=d),c.current});return a.value&&!t?null:e==="card"?s(be,{background:"subdued",padding:"small-300",borderRadius:"small",children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[s($,{color:"subdued",children:i}),s($,{color:"subdued",children:l})]})}):s(Kt,{spacing:"small-500",children:s(Ji,{label:i,amount:u,hideCurrencyCode:a.value})})}function DG({children:e}){return s(Kt,{spacing:"small-500",children:s(et,{children:[s(Tt,{children:s($e,{color:"subdued",children:s(kr,{children:e})})}),s(Et,{})]})})}function aa(){return s(be,{children:[s(zt,{blockSize:"small-200"}),s(Jr,{accessibilityRole:"presentation"}),s(zt,{blockSize:"small-200"})]})}const OG=1.95583;function FG(){const{shop:e}=b(),t=q().buyerIdentity,n=si(),r=e.hasFlagEnabled(Yk);return w(()=>{if(r)return;const o=t.value,i=o?.countryCode==="BG"&&o?.presentmentCurrency==="EUR",a=n.value;if(!(!i||!a||a.amount<=0))return Number((a.amount*OG).toFixed(2))})}function BG({bgnAmount:e}){const{i18n:t}=b();return s(et,{children:s(Et,{children:s($,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const VG=["taxes","duties"],UG=()=>{const{shopPay:e,checkout:t}=b();if(fi().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value};function zG({shopId:e}){const t=si(),n=jk(),r=w(()=>e?n.value.get(e):t.value),{checkout:o,embed:i,i18n:a,shop:l}=b(),c=Qb(VG),u=qe("deliveryNext"),d=qe("taxes"),p=qe("duties"),m=qe("landedCostDetails"),f=qe("remoteTaxDetails"),{visibility:h}=o.configuration,{moneySummary:{labelColor:g="base",labelTypography:y},moneyLines:{divided:_}}=ct(),P=o.proposal.facts.previouslyPaidTotal,v=ii(),E=Ci(),C=UG(),{value:S}=ri(),I=S?.currencyCode,k=MG(),T=l.hasFlagEnabled(Kk),A=!!o.proposal.facts.taxesIncluded,L=!!o.proposal.facts.dutiesIncluded,M=Cs().value||A,N=Nh().value||L,{value:O}=q().landedCostDetails,D=Ks(),B=o.proposal.facts.landedCostDetails,{amount:z,label:x,isInstallment:W}=RG(),X=o.configuration.orderSummary?.layoutStyle==="COMPACT",Z=jb(),ce=FG(),j=w(()=>e&&e!==l.id?a.translate("order_summary.total_label"):x.value),Q=w(()=>!r.value),H=w(()=>i&&qt(i.embedder)?!1:c.value),J=U(r.peek()),he=w(()=>{const ge=r.value;return ge!=null&&(J.current=ge),J.current}),ne=w(()=>he.value??{amount:0,currencyCode:l.currencyCode}),ae=U(z.peek()),ue=w(()=>{const ge=z.value;return ge!=null&&(ae.current=ge),ae.current??ne.value}),Ae=w(()=>W.value?r.value:void 0),me=he.value!=null&&(u.value||d.value||p.value||m.value||f.value);if((Q.value||!z.value)&&!H.value&&!me)return null;const ye=(h.showSubtotal.value||P)&&_?s(aa,{}):null,Ee=!v.value&&!E.value,Ue=D?.applied&&M&&Z.value?s(DG,{children:Z.value}):Ee?s(ad,{taxesIncluded:M,shopId:e}):null;if(e)return s(G,{children:[s(Ji,{label:j,amount:ne,hideCurrencyCode:Q.value}),Ue]});if(X){const ge=y?.weight==="base"?"generic":"strong";return s(G,{children:[ye,s(Oo,{children:[s(ei,{children:s(ee,{children:s(ve,{when:Z,fallback:s($,{type:ge,color:g,size:y?.size??"large",children:x.value}),children:s(G,{children:[s($,{type:ge,color:g,size:y?.size,children:x.value}),Ue]})})})}),s(zr,{children:s(Zb,{paymentDue:ue,hideCurrencyCode:Q.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const Ce=[O,B].some(ge=>ge?.incoterm===Lc.Ddp),K=N&&Ce?s(G,{children:[s(zt,{blockSize:"small-400"}),s(Jr,{accessibilityRole:"presentation"}),s(zt,{blockSize:"small-400"}),s($e,{type:"small",color:"subdued",children:s(kr,{children:a.translate("order_summary.duties_included_label")})})]}):null,te=T?s(NG,{showLoadingPlaceholder:H.value||me}):s(Kt,{spacing:"small-500",children:s(Ji,{label:j,amount:ne,hideCurrencyCode:Q.value})}),pe=a.translate("order_summary.payment_terms_totals.due_today_next");return s(G,{children:[ye,s(ve,{when:k,children:s(Oo,{children:[s(ei,{children:s($,{children:pe})}),s(zr,{children:s(ee,{direction:"inline",gap:"small-200",alignItems:"baseline",children:s(zn,{condition:Q.value,size:"medium",translate:!1,children:a.formatCurrency(0,{currency:ne.value.currencyCode,form:"short"})})})})]})}),s(ve,{when:Ae,children:ge=>s(et,{label:a.translate("order_summary.total_label"),value:a.formatCurrency(ge.amount,{currency:ge.currencyCode,form:"short"})})}),s(ve,{when:k,fallback:s(Ji,{label:j,amount:ue,hideCurrencyCode:Q.value}),children:te}),Ue,C!==void 0&&I?s(Oo,{children:s(zr,{accessibilityColumnIndex:2,children:s($,{size:"small",translate:!1,children:a.translate("payment.pay_in_installments_split_pay_short",{amount:a.formatCurrency(C,{currency:I,form:"short"})})})})}):null,ce.value!=null&&s(BG,{bgnAmount:ce.value}),K]})}const HG=tt("PriceBreakdownItemTooltip");function qG({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:o}=b(),i=Ye(void 0,HG),a="strong",l="base";return s(et,{layout:r,children:[s(Tt,{children:s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:[s($,{color:l,type:a,children:e}),t?s(G,{children:[s(Le,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:o.translate("tooltip.accessibility_label_context",{context:e})}),s(Cn,{id:i,children:t})]}):null]})}),s(Et,{children:s($,{color:l,type:a,children:n})})]})}const GG=tt("RecurringTotalsTooltip"),WG=tt("RecurringTotalsLabel");function rf({cardStyle:e}){const{value:t}=q().recurringTotals,{i18n:n}=b(),r=od(),o=Ye(void 0,GG),i=Ye(void 0,WG);if(!t?.length)return null;const a=n.translate("order_summary.recurring_subtotal_label");if(e){const l=t.length===1;return s(be,{accessibilityRole:l?"group":void 0,"aria-labelledby":l?i:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:l?s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:[s($,{id:i,color:"base",type:"strong",children:a}),s($,{color:"base",type:"strong",children:r(t[0])})]}),s(Le,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:a})}),s(Cn,{id:o,children:n.translate("order_summary.recurring_total_tooltip")})]}):s($,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})})}return s(G,{children:[s(Jr,{accessibilityRole:"presentation"},"recurringTotalsDivider"),t.length===1?s(Kt,{spacing:"small-300",children:s(qG,{title:a,tooltipText:n.translate("order_summary.recurring_total_tooltip"),itemText:r(t[0]),layout:"stackable"})}):s($,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})]})}function $G({line:e}){const{i18n:t}=b();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,o=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=qU(e.method.redemptionContent);return s(et,{children:[s(Tt,{children:s(ee,{direction:"inline",gap:"base",children:[s($,{children:t.translate("order_summary.gift_card_label")}),s(ee,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Le,{type:"gift-card"}),s($,{accessibilityVisibility:"hidden",children:GU(i)}),s($,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),s(Et,{children:s($,{type:"strong",children:o})})]})}function YG({line:e}){const{checkout:t,i18n:n}=b(),r=t.proposal.negotiated.fields.shopPromotion.value,o=r?.status==="filled"?new Map(r.promotions.map(({promotionId:i,type:a})=>[i,a])):void 0;return e.method.redemptionContent?.details?.map(i=>{const{amount:a,currencyCode:l}=i.destinationAmount,c=n.formatCurrency(-parseFloat(a),{currency:l,form:"short",spacedMinusSign:!0}),u={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")},d=i.promotionType??(i.redemptionId==null?void 0:o?.get(i.redemptionId)),m=i.redemptionType==="SHOP_PROMOTION"&&d==="DOORBUSTER"?n.translate("order_summary.flash_deal"):u[i.redemptionType];return m?s(et,{type:"strong",label:m,value:c},i.redemptionId):null})}function jG({line:e}){const{i18n:t}=b();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 s(et,{type:"strong",label:n,value:r})}function KG({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return s(YG,{line:e});case"STORE_CREDIT":return s(jG,{line:e});case"CUSTOM":{const t=e;return s($G,{line:t},t.method.redemptionContent?.redemptionAttributes[0].value)}default:return null}}function JG(e){if(e.method.redemptionSource==="CUSTOM"){const n=e.method.redemptionContent?.redemptionAttributes[0]?.value||"";return e.method.redemptionSource+n}return e.method.redemptionSource}
38function XG(){const e=kc("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=sb(),n=[...e.value,...t];return n.length===0?null:s(G,{children:n.map(r=>s(KG,{line:r},JG(r)))})}function QG(e){const{shop:{id:t}}=b(),n=q(),r=n.remoteTotalDetails,o=zf(),i=n.legacyRepresentProductsAsFees,a=n.legacySubtotalBeforeTaxesShippingAndFees,l=n.subtotal;return w(()=>{const c=i.value?a.value:o.value;return e?t===e?l.value:r.value?.perShopRemoteTotals.get(e)?.subtotal:c})}function ZG(e){const t=q(),n=t.merchandiseLines,{shop:{id:r},checkout:o}=b(),i=o.proposal.facts.merchandiseLines??[],{value:a}=t.legacyRepresentProductsAsFees,l=w(()=>Jk(n.value?.lines??[],t.remoteMerchandiseDetails.value)),c=Xk(),u=e?e!==r?{lines:l.value.get(e),factLines:void 0}:{lines:c.value,factLines:i}:{lines:n.value?.lines,factLines:i},d=eW(u?.lines,a),p=u?.lines?.filter(({quantity:f})=>f>0),m=u?.factLines?.reduce((f,h)=>f+h.quantity,0);return{totalLineQuantities:d,totalLineQuantitiesFact:m,merchandiseLinesWithCount:p?.length||0}}function eW(e,t){return t?e?.reduce((n,r)=>r.legacyFee?n:n+r.quantity,0):e?.reduce((n,r)=>n+r.quantity,0)}function tW(e){const{embed:t,i18n:n}=b(),{totalLineQuantities:r,merchandiseLinesWithCount:o}=ZG(e);return qt(t?.embedder)?n.translate("order_summary.number_items",{count:r??0}):o>1&&r?n.translate("order_summary.subtotal_label_with_quantity",{count:r}):n.translate("order_summary.subtotal_label")}function nW(e){const{checkout:t,i18n:n}=b(),r=QG(e),o=tW(e);return w(()=>{const i=r.value?n.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0,a=t.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in t.latestReceipt.value&&t.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,l=a?n.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"}):void 0;return{subtotalLabel:o,subtotalValue:i,subtotalOriginalValue:l}})}function rW({shopId:e}){const{subtotalLabel:t,subtotalValue:n,subtotalOriginalValue:r}=nW(e).value;return n?s(et,{children:[s(Tt,{children:s($,{children:t})}),s(Et,{children:r?s(ee,{direction:"inline",gap:"small-300",children:[s($,{tone:"critical",type:"redundant",translate:!1,children:r}),s($,{translate:!1,children:n})]}):s($,{translate:!1,children:n})})]}):null}function oW(){const{i18n:e,checkout:t,source:n}=b(),r=q().tipLines,o=t.proposal.facts.tip,i=w(()=>{const a=r.value?.[0]?.amount,l=st(n)?o:a;return l&&l.amount>0?l:void 0});return s(ve,{when:i,children:a=>s(et,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})})})}function iW(){const e=Dh(),{shop:t,embed:n}=b(),r=t.hasFlagEnabled(Qk);return w(()=>{const o=!!n?.embedder&&!qt(n?.embedder);return!!!(r||!e.value||e.value.amount===0||o)})}function sW({variant:e}){const t=iW(),n=Dh();return!t.value||!n.value?null:s(aW,{variant:e,totalSavings:n.value})}function aW({variant:e,totalSavings:t}){const{i18n:n,embed:r}=b(),{deferredTotal:o}=q(),i=qt(r?.embedder)?n.translate("universal.iframes.savings_label").toUpperCase():n.translate("order_summary.total_savings").toUpperCase(),a=n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),l=s($,{type:"strong",translate:!1,children:a}),c=w(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return e==="card"?s(be,{children:s(ee,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(ee,{direction:"inline",alignItems:"center",gap:"small-500",children:[s(Le,{type:"savings",size:"small",color:"base"}),s($,{color:"subdued",children:n.translate("order_summary.total_savings")})]}),s($,{color:"subdued",translate:!1,children:a})]})}):s(Kt,{spacing:c.value,children:s(Oo,{children:[s(ei,{children:s(ee,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(Le,{type:"savings",size:"base",color:"strong"}),s($,{type:"strong",children:i}),l]})}),s(zr,{})]})})}function lW(){const{moneyLines:{divided:e}}=ct(),t=q(),n=t.legacyRepresentProductsAsFees,r=t.legacyMerchandiseLinesAsFees,o=w(()=>!n.value||!r.value?[]:r.value.lines);return s(Zn,{each:o,getKey:i=>i.title,children:i=>s(G,{children:[e&&s(aa,{}),s(cW,{...i})]})})}function cW({title:e,description:t,total:n}){const{i18n:r}=b(),o=t?s(ee,{direction:"inline",alignItems:"center",gap:"small-400",children:s($,{children:[e,s("span",{style:{position:"absolute"},children:s(Ln,{padding:"small-500 none none small-500",overlay:s(Cn,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:s(Le,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):s($,{children:e});return s(et,{label:e,children:[s(Tt,{children:o}),s(Et,{children:s($,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function uW(e){const t=U(!1);ze(()=>{const n=e.value;if(!t.current){t.current=!0;return}if(n)return xt({content:n})})}function of({content:e}){return uW(e),s(ve,{when:e,children:t=>s(G,{children:dW(t).map(({id:n,line:r})=>s(et,{layout:"stackable",children:[s(be,{inlineSize:"100%",children:s(Tt,{children:s($e,{type:"small",color:"subdued",textAlign:"end",children:r})})}),s(Et,{})]},n))})})}function dW(e){const t=new Map;return e.split(`
39`).filter(Boolean).map(n=>{const r=t.get(n)??0;return t.set(n,r+1),{id:`${n}:${r}`,line:n}})}function pW(){const{moneyLines:{divided:e}}=ct(),{i18n:t,checkout:n}=b(),{value:r}=ri(),{value:o}=q().deferredTotal,i=n.proposal.facts.previouslyPaidTotal,a=n.proposal.facts.updatedTotal,l=(n.proposal.facts.merchandiseLines??[]).some(m=>m.quantityChange&&m.quantityChange.delta),c=!!(a&&r&&l),u=o&&o.amount.amount>0,d=i&&Number(i.amount)>0,p=(c||i)&&e;return!p&&!c&&!d&&!(u&&r)?null:s(G,{children:[p&&s(aa,{}),u&&r&&s(et,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),c&&a&&s(et,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(a.amount),{currency:a.currencyCode,form:"short"})}),d?s(et,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(i.amount),{currency:i.currencyCode,form:"short"})}):null]})}function mW(){const{i18n:e,checkout:t}=b(),n=t.proposal.facts.returnFees,r=Number(n?.aggregatedReturnShippingFees?.amount)>0,o=Number(n?.aggregatedRestockingFees?.amount)>0;if(!r&&!o)return null;const i=r?{label:e.translate("order_summary.return_shipping_fee_label"),value:e.formatCurrency(Number(n?.aggregatedReturnShippingFees?.amount),{currency:n?.aggregatedReturnShippingFees?.currencyCode,form:"short"})}:null,a=o?{label:e.translate("order_summary.return_restocking_fee_label"),value:e.formatCurrency(Number(n?.aggregatedRestockingFees?.amount),{currency:n?.aggregatedRestockingFees?.currencyCode,form:"short"})}:null;return{shippingFee:i,restockingFee:a}}function fW(){const{moneyLines:{divided:e}}=ct(),t=mW();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return s(G,{children:[n&&s(G,{children:[e&&s(aa,{}),s(et,{type:"strong",label:n.label,value:n.value})]}),r&&s(et,{type:"strong",label:r.label,value:r.value})]})}function hW(){const{i18n:e,checkout:t,embed:n}=b(),{value:r}=Zk(),o=Ci(),i=qu(),a=!!t.proposal.facts.taxesIncluded,l=Cs().value||a;if(!o.value||!r)return null;const c=s(ad,{taxesIncluded:l});return qt(n?.embedder)&&i.value.length>0?c:s(G,{children:[s(et,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),c]})}const gW=Qn(function(){const{checkout:t,i18n:n,embed:r}=b(),{visibility:o}=t.configuration,{orderSummary:i}=Fe(),a=t.configuration.orderSummary?.headerPosition??i.headerPosition,l=i.isCollapsible??!1,c=i.isCollapsible===!1,u=q(),{currentDetour:d}=Se().value,p=d?.type==="thankYou",m=qb(),f=t.proposal.negotiated.fields.additionalMoneyLines.value,h=t.proposal.negotiated.fields.lpmDisclosure,g=qe("lpmDisclosure"),y=w(()=>g.value?void 0:h.value),_=w(()=>{const P=t.latestReceipt.value;return P?.status==="processed"?P.lpmDisclosure:void 0});return s(Ir,{children:[s(Uq,{ref:m,title:n.translate("order_summary.cost_table_title"),children:[s(ve,{when:o.showSubtotal,children:[s(rW,{}),s(lG,{}),s(oG,{}),s(lW,{}),s(fW,{}),s(_G,{}),s(oW,{}),s(hW,{}),s(XG,{})]}),s(pW,{}),s(PG,{}),f?.map(P=>s(et,{label:P.label,value:n.formatCurrency(P.amount.amount,{currency:P.amount.currencyCode,form:"short"})},P.id)),a==="BOTTOM"&&l?s(zt,{blockSize:"small-500"}):s(zG,{}),!p&&s(ve,{when:()=>!y.value,children:s(zq,{})}),p?s(of,{content:_}):s(of,{content:y}),s(Jq,{}),!qt(r?.embedder)&&s(sW,{}),!c&&s(rf,{})]}),c&&s(ve,{when:()=>u.recurringTotals.value,children:s(be,{paddingBlockStart:"small-300",children:s(rf,{cardStyle:!0})})})]})});var fl={Form:"km09ry0 _1fragem5z",Contents:"km09ry1 _1fragemws"};const yW=tt("Form");function vW({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:r=!1,id:o,contentsClassName:i}){const a=un(),l=Ye(void 0,yW),c=o??l,u=li()!=null,d=V(()=>({id:c,nested:u}),[c,u]);let p=null;n&&(p=s(be,{accessibilityVisibility:"exclusive",children:s(_W,{disabled:r,form:d,children:typeof n=="string"?n:a("submit")})}));const m=h=>{h.preventDefault(),h.stopPropagation(),!r&&typeof e=="function"&&e()},f=s("div",{className:Y(fl.Contents,i),children:t});return u?s(G,{children:[s(Rl.Provider,{value:d,children:[f,p]}),s(Pr,{children:s("form",{action:"",method:"POST",noValidate:!0,className:fl.Form,id:c,onSubmit:m})})]}):s("form",{action:"",method:"POST",noValidate:!0,className:fl.Form,id:c,onSubmit:m,children:s(Rl.Provider,{value:d,children:[f,p]})})}function _W({form:e,children:t,disabled:n}){return s("button",{type:"submit",disabled:n,tabIndex:-1,"aria-hidden":!0,form:e.nested?e.id:void 0,children:t})}var Co={Hidden:"_123qrzt0 _1fragem5z",hiddenOnExtraSmall:"_123qrzt1",hiddenOnSmall:"_123qrzt2",hiddenOnMedium:"_123qrzt3",hiddenOnLarge:"_123qrzt4"};const Ui=["extraSmall","small","medium","large"];function sf({above:e,below:t,children:n}){const o=oo()?"span":"div",{hiddenOnExtraSmall:i,hiddenOnSmall:a,hiddenOnMedium:l,hiddenOnLarge:c}=bW(e,t),u=Y(Co.Hidden,i&&Co.hiddenOnExtraSmall,a&&Co.hiddenOnSmall,l&&Co.hiddenOnMedium,c&&Co.hiddenOnLarge);return s(o,{className:u,children:n})}function bW(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?Ui.indexOf(e)+1:0,r=t?Ui.indexOf(t)-1:Ui.length-1,o=Ui.slice(n,r+1),i=o.indexOf("extraSmall")>=0,a=o.indexOf("small")>=0,l=o.indexOf("medium")>=0,c=o.indexOf("large")>=0;return{hiddenOnExtraSmall:i,hiddenOnSmall:a,hiddenOnMedium:l,hiddenOnLarge:c}}function PW({targetSelector:e,label:t,icon:n}){const r=R(()=>{const o=document.querySelector(e);o&&(o.focus(),o.scrollIntoView({behavior:"smooth"}))},[e]);return s(be,{display:"@media (inline-size >= medium) auto, none",children:s(cn,{variant:"secondary",size:"small",onClick:r,className:bt({screenReaders:"untilFocus"}),children:s(ee,{direction:"inline",gap:"small-400",alignItems:"center",children:[s(Le,{type:n,size:"small-100"}),s($,{children:t})]})})})}const Fo=({violations:e,noticeType:t,noticeTitle:n,noticeHeader:r,noticeFooter:o})=>({code:t,tone:"critical",localizedTitle:n,localizedMessage:s(G,{children:[r,s("ul",{style:{listStyle:"inside"},children:e.map(i=>s("li",{children:i.localizedMessageHtml?s("span",{dangerouslySetInnerHTML:{__html:i.localizedMessageHtml}}
39):i.localizedMessage||i.nonLocalizedMessage},i.code))}),o]})}),eP=()=>{const{i18n:e,shop:t}=b(),n=Sn(),r=qe("shippingAddress"),{allViolations:o}=q(),i=Se(),{shippingAddress:a}=ie();return w(()=>{const l=a.peek();if(n.value&&i.value.currentPage?.id==="information"&&oi(l,{...eI,countryCode:l?.countryCode}))return null;const c=o.value?.filter(u=>Zr.has(u.code))||[];return c.length===0||!n.value||r.value?null:Fo({violations:c,noticeType:Ze.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ze.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.editable_shipping_address_violations_message_title"),noticeFooter:e.translate("notice_banner.editable_shipping_address_violations_message_footer",{emailLink:s(dt,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var pn={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 SW=tt("Banner"),EW=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function la({autoFocus:e,focusable:t,children:n,collapsible:r,dismissible:o,iconHidden:i,color:a="base",id:l,tone:c="auto",heading:u,hidden:d=!1,onDismiss:p,onAfterHide:m}){const f=c==="auto"?"info":c,h=un(),[g,y]=oe(d),[_,P]=oe(!0),v=U(),E=Ye(void 0,SW),C=hi({active:f==="critical"}),S=U(g);function I(B){v.current=B,C.current=B}const k=En(),T=Un(),A=U(T);A.current=T,F(()=>{if(!e)return;const B=v.current;if(!B)return;const z=()=>{B.focus({preventScroll:!0}),B.style.scrollMarginTop===""&&(B.style.scrollMarginTop="var(--x-spacing-large-500)"),B.scrollIntoView?.({behavior:A.current?"auto":"smooth"})};if(B.getBoundingClientRect().height>0){z();return}if(typeof ResizeObserver>"u"){const W=setTimeout(z,300);return()=>clearTimeout(W)}
39const x=new ResizeObserver(()=>{B.getBoundingClientRect().height!==0&&(x.disconnect(),z())});return x.observe(B),()=>x.disconnect()},[e]),F(()=>{!S.current&&g&&m?.(),S.current=g},[g,m]),F(()=>{y(d)},[d]);const L=Y(pn.Banner,f&&pn.toneVariant[f],u&&pn.withHeading,pn.colorVariant[a]),M=!!(r&&u),N=!M||M&&!_,O=o&&s("button",{type:"button",className:pn.Button,onClick:()=>{typeof p=="function"&&p(),y(!0)},"aria-label":h("closeNotification"),"aria-hidden":k?!0:void 0,tabIndex:k?-1:void 0,children:s(Le,{type:"x",size:"small"})}),D=s("button",{type:"button",className:pn.Button,onClick:()=>P(B=>!B),"aria-expanded":!_,"aria-controls":`${E}-collapsible-area`,"aria-label":h("expandNotification"),"aria-hidden":k?!0:void 0,tabIndex:k?-1:void 0,children:s(Le,{size:"small",type:_?"chevron-down":"chevron-up"})});return g?null:s("div",{className:L,role:f==="critical"?"alert":"status",...(e||t)&&{tabIndex:-1},ref:I,id:l,children:[!i&&s("div",{className:pn.Icon,children:s(Le,{type:EW.get(f),size:"fill"})}),u&&s("div",{className:pn.Heading,children:s(jt,{level:3,children:u})}),M&&s("div",{className:pn.ControlCollapsible,children:D}),St(n)&&s("div",{className:pn.Content,children:s(Bc.Provider,{value:"Banner",children:s(ln,{children:M?s(gn,{open:N,id:`${E}-collapsible-area`,children:[u&&s(zt,{blockSize:"small-200"}),n]}):s(G,{children:[u&&s(zt,{blockSize:"small-200"}),n]})})})}),O&&s("div",{className:pn.ControlDismiss,children:O})]})}const CW=F0.map(e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)});function kW(e){return CW.some(t=>t.test(e))}function IW(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}const tP=()=>{const e=Ht(gy),{observability:t}=b();return R(n=>{const r=IW(n),o=r?`${e}.${r}`:e;return kW(o)?o:(t.error(new AW(`Invalid target (${e}) and field (${r}
39) combination`)),"cart")},[e,t])},AW=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},TW=250,wW=new Set([at.InputInvalid,at.InputRequired]);function LW(e){switch(e){case"cart.buyerIdentity":return at.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return at.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return at.PaymentError;case"cart.discountCode":return at.DiscountError;default:return at.CheckoutError}}function af(e){return!wW.has(e)}function lf(e,t){return e?e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message:!1}function xW(e){const{message:t,errorType:n,errorValue:r,children:o}=e,a=tP()(),l=dy(),c=U(l),u=U(null),d=U(),p=U(!0);c.current=l;const m=h=>{c.current({...h,timestamp:new Date})},f=Tc(h=>{!p.current||!lf(d.current,h)||!af(h.errorType)||m(h)},TW);return F(()=>{const h=n||LW(a),g=t??u.current?.textContent??"",y={target:a,errorType:h,value:r||null,message:g};if(!lf(d.current,y)){if(d.current=y,!af(h)){m(y);return}f(y)}}),F(()=>()=>{p.current=!1},[]),s("div",{ref:u,children:o})}function bn(e){const{errorType:t,errorValue:n,children:r,...o}=e;return s(la,{...o,children:s(xW,{errorType:t,errorValue:n,children:r})})}function nP({notice:e,iconHidden:t=!1,errorType:n}){const r=e.localizedMessageHtml||e.localizedMessage||e.nonLocalizedMessage;if(!r)return null;const o=e.tone??"info",i={key:e.code,tone:o,onDismiss:e.onDismiss,dismissible:!!e.onDismiss,heading:e.localizedTitle,collapsible:e.collapsible,iconHidden:t},a=typeof e.localizedMessageHtml=="string"?s("div",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
39):r;return["critical","warning"].includes(o)?s(bn,{...i,errorType:n??at.CheckoutError,children:a}):s(la,{...i,children:a})}function RW(){const e=eP().value;return e?s(nP,{notice:e,errorType:at.DeliveryError}):null}function MW(){const e=q().allViolations,t=w(()=>(e.value?.filter(o=>Oh(o.code))??[]).filter((o,i,a)=>i===a.findIndex(l=>l.code===o.code))),n=w(()=>t.value.length>0);return s(ve,{when:n,children:s(ee,{gap:"base",children:s(Zn,{each:t,getKey:r=>r.code,children:({localizedMessage:r,nonLocalizedMessage:o})=>s(bn,{errorType:at.PaymentError,tone:"critical",children:r||o})})})})}function NW(){const{allViolations:e}=q();return w(()=>{const t=e.value?.filter(n=>ku.has(n.code))||[];return{violations:t,hasViolations:t.length>0}})}const DW=()=>{const{violations:e,hasViolations:t}=NW().value;return t?s(ee,{gap:"base",children:e.map(({code:n,localizedMessage:r,nonLocalizedMessage:o})=>s(bn,{errorType:at.DiscountError,tone:"warning",children:r||o},n))}):null};function rP(){const e=q().allViolations,{router:t,checkout:{identity:n}}=b(),r=we(null),{shippingAddress:o}=ie(),i=Je(Jt(o.value.countryCode)),a=w(()=>wy(e.value??[])),l=w(()=>OW(e.value));F(()=>t.beforeNavigate(()=>{r.value=null}),[r,t]);const c=U(n.current.value);return ze(()=>{const u=n.current.value;u!==c.current&&c.current!==void 0&&(r.value=null),c.current=u}),ze(()=>{const u=l.value;u&&u!==r.peek()&&(r.value=u)}),w(()=>{const u=l.value??r.value,d=u?{...u,tone:"info"}:void 0;let p;return!a.value&&!i.value.loading&&(p=e.value?.find(m=>m.code==="MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY")),{banner:d,toast:p}})}function OW(e=[]){const t=e.filter(({code:n})=>tI.has(n));if(t.length===1&&t[0].code==="MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY")return t[0]}function FW(){const e=rP(),t=nu(),n=U(null),r=Tc(o=>{if(!o)return;const i=o.localizedMessage;if(i===n.current?.message)return;n.current?.hide();const a=t?.(i);a&&(n.current={...a,message:i})},250);return ze(()=>{const o=e.value.toast;o&&ht(()=>{r(o)})}),null}function ud(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=b(),o=e.app.config,a=!!(t?.isCheckoutKit()||t&&r.current.value!=="shopPay")||n.enabled||Ih(o);return{isAppLayout:a,isWebLayout:!a}}class BW extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function ds(e){const t=ie().paymentLines;return w(()=>SR(t.value,e))}function VW(){const{i18n:e}=b(),{href:t,onClick:n}=Au();return s(dt,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const UW=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"]]),zW=["SHOP_PAY_DECLINED"];function oP(e){const{i18n:t}=b();let n="generic_error";return e&&(n=UW.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&zW.includes(e.code)&&{checkout_as_guest_link:s(VW,{})}})}const HW=["AMOUNT_TOO_SMALL"];function qW(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:ds(Te.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:ds(Te.AmazonPay).value}].filter(({checkoutSessionId:m})=>!!m),{i18n:t,observability:n}=b(),{error:r,hasError:o}=Ny(Fh),i=r&&HW.includes(r),a=oP(i?{type:"payment",code:r}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=We(),u=w(()=>{const m=c.value;return m.status===vi.Available?m.sdk:void 0});if(!o||!e)return null;const{isBuyWithPrime:d,checkoutSessionId:p}=e;return s(ve,{when:u,children:m=>{const f=()=>{try{d?m.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:p,isDeclined:!0}}):m.Pay.changePaymentMethod({amazonCheckoutSessionId:p,isDeclined:o})}catch(h){l.value=!0,n.error(new BW(`Error on changing buyer payment method. Details: ${h}`,{cause:h}))}};return s(bn,{tone:"critical",errorType:at.PaymentError,children:s($e,{children:i?a:s(G,{children:[t.translate("amazon_pay.error_page.payment_decline.message"),s(dt,{onClick:f,children:t.translate("amazon_pay.error_page.payment_decline.link")})]})})})}})}function GW(){const{i18n:e}=b(),{paymentSheetError:t}=We().inMemoryApplePayParts,n=e.translate("wallets.errors.generic",{walletName:e.translate("brand.apple_pay")}),r={unhandled_completion_status:e.translate("payment_errors.generic_error"),exceptional_completion_status:n,exceptional_negotiation_status:n,session_terminated:n,failed_to_create_session:n,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 w(()=>{const o=t.value?.type,i=t.value?.tone;if(o&&r[o])return{code:Ze.PaymentSheetViolations,tone:i??"critical",localizedMessage:r[o],nonLocalizedMessage:r[o]}})}
39const WW=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[bs,"info"]]);function $W(){const{i18n:e}=b(),{shippingAddress:t}=ie(),{inMemoryGooglePayParts:{paymentSheetError:n}}=We(),r=Je(Jt(t.value.countryCode));return w(()=>{const o=n.value?.type,i=(()=>{if(o==="invalid_config"||o==="config_missing_required_fields")return e.translate("wallets.errors.generic",{walletName:e.translate("brand.google_pay")});if(o==="unusable_partial_address")return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(o==="unexpected_terminal_error")return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(o===bs){const l=r.value.details?.name;return l?e.translate("wallets.errors.unavailable.unavailable_for_country",{walletName:e.translate("brand.google_pay"),countryName:l}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.google_pay")})}if(o==="recovery_notice")return e.translate("wallets.recovery_notice")})(),a=o?WW.get(o):"critical";if(i)return{code:Ze.PaymentSheetViolations,tone:a,localizedMessage:i,nonLocalizedMessage:i,onDismiss:a==="info"?()=>n.value=void 0:void 0}})}const iP=()=>{const e=we(!1),t=we(!1),n=Fy(),r=q().allViolations,o=w(()=>r.value?.some(i=>Bh.has(i.code))??!1);return ze(()=>{o.value&&(t.value=!0),!o.value&&e.value&&(e.value=!1,t.value=!1)}),w(()=>{const i=t.value&&!e.value,a=n.value;return!i||!a?null:{code:Ze.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}})};function YW(){const{receiptErrorSignal:e}=We();return w(()=>{const t=e.value;if(t)return{code:Ze.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}function jW(){const{shippingAddress:e}=ie(),{inMemoryGooglePayParts:{paymentSheetError:t},inMemoryPayPalParts:{paymentSheetError:n}}=We();return F(()=>{let r=!0;return e.fields.countryCode.subscribe(()=>{if(r){r=!1;return}t.value?.type===bs&&(t.value=void 0),n.value?.type===Ph&&(n.value=void 0)})},[e,t,n]),null}function KW(){jW();const e=GW(),t=$W(),n=Je(WO()),r=YW(),o=$O(),i=__({isPayWithPayPalButton:!1}),a=CR(),l=Je(wR()),c=iP();return w(()=>{const u=i.value.status==="error",d=!!c.value,p=a.value||r.value||l.value||e.value||t.value||(d?null:n.value)||(u?null:o.value);if(p)return typeof p=="string"?{code:Ze.PaymentSheetViolations,localizedMessage:p,nonLocalizedMessage:p,tone:"critical"}:p})}const JW=new Set(["CART_METAFIELD_GENERIC_ERROR"]),XW=new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"]),QW=new Set([...JW,...XW]),ZW=["noAddressLocation","stockProblems","thankYou"],sP=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),aP=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),e4=[...Zr,...nI,...rI,...ku,...oI,...sP,...aP,...Vh,...iI,...sI,...aI,...Uh,...js,...Zf,..._c,...lI,...yc,...Yf,...Ec,...Bh,...cI,...QW,"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 t4(){const{i18n:e,router:t}=b(),n=t.currentUrl.value,[r,o]=oe(void 0),i=n.searchParams.get("company_location_changed")==="true";return V(()=>r===!0||!i?null:(o(!1),{code:Ze.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>o(!0)}),[r,e,i])}function n4(){const{i18n:e,shop:t}=b(),n=q().allViolations;return w(()=>(n.value?.filter(o=>Ec.has(o.code))||[]).length===0?null:{code:Ze.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:s(dt,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}var r4={ListItem:"_1585eob1 _1585eob0 _1fragemws _1fragemzh"};function dd({children:e,id:t}){return s("li",{id:t,className:r4.ListItem,children:e})}var hl={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function pd({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:o}){const{className:i}=At({gap:e}),a=Y(hl.UnorderedList,t&&hl.listStyleVariant[t],i),l=t==="none"?"list":void 0;return s("div",{className:hl.Wrapper,children:s("ul",{className:a,role:l,"aria-label":n,id:o,children:r})})}function o4(){const e=q().buyerIdentity,t=Sn(),{shippingAddress:n}=ie();return w(()=>{const r=e.value?.purchasingCompany,o=r?.location.shippingAddress?oi(n.value,r.location.shippingAddress):!1;return t.value&&!o})}function i4(){const{i18n:e,shop:t,checkout:n}=b(),r=Sn(),o=o4(),i=Xs(),a=n.configuration.layout.isOnePage;return w(()=>{const{deliveryAddressErrors:l}=i.value;if(a.value||o.value||l.length===0)return null;const c=r.value?s($,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):s($,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:s(dt,{href:`mailto:${t.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),[u]=l,d=l.length===1;return{code:Ze.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:d?u.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:d?c:s(G,{children:[s(pd,{children:l.map(m=>s(dd,{children:s($,{children:m.messageNode??m.message})},`${m.target}${m.message}`))}),c]})}})}const s4=()=>{const{i18n:e}=b(),t=q().allViolations;return w(()=>(t.value?.filter(r=>aP.has(r.code))||[]).length===0?null:{code:Ze.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})};function a4(){const{i18n:e,shop:t,checkout:n}=b(),[r,o]=oe(!1),i=Eu(),a=Sn(),l=n.configuration.layout.isOnePage.value;return r||!i.value||a.value||l||!n.isShippingRequired.value?null:{code:Ze.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:s(kr,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:s(dt,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>o(!0)}}const l4=()=>{const e=we(!1),{allViolations:t}=q();return w(()=>{const n=t.value?.filter(o=>sP.has(o.code))||[],r=n.length>0?n[0]:null;return e.value||!r?null:{code:Ze.TipsViolations,localizedMessage:r.localizedMessage||r.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})};function c4(){const{i18n:e,shop:t,checkout:n}=b(),{allViolations:r}=q(),o=Sn(),{paymentLines:i}=ie();return w(()=>
39{if(!!Pt(i.value,"APPLE_PAY")&&!n.isShippingRequired.value||o.value)return null;const l=r.value?.filter(c=>Zr.has(c.code))||[];return l.length===0?null:{violations:l,noticeType:Ze.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ze.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:s("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function lP(){const{i18n:e,shop:t,checkout:n}=b(),{allViolations:r,paymentLines:o,paymentMethods:i}=q(),a=Sn(),l=n.configuration.layout.isOnePage.value,c=Se();return w(()=>{const{currentPage:u}=c.value,d=i.value?.some(f=>f.type==="deferred")&&o.value?.lines?.some(f=>f.method.type==="deferred");if(!(l&&d||!l&&!a.value||u?.id==="payment"))return null;const m=r.value?.filter(f=>Oh(f.code))||[];return m.length===0?null:{violations:m,noticeType:Ze.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ze.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:s("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function u4(){const{buyerIdentity:e,allViolations:t}=q(),{i18n:n,shop:r,observability:o}=b();return w(()=>{if(!e.value?.purchasingCompany)return null;const i=(t.value||[]).filter(a=>!e4.includes(a.code));for(const a of i)o.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:a.code}});return i.length===0?null:{violations:i,noticeType:Ze.OtherViolations,noticeTitle:n.translate("notice_banner.violations_title",{violation:n.translate("notice_banner.individual_violations_title",{scope:Ze.OtherViolations})}),noticeHeader:n.translate("notice_banner.all_violations_content",{emailLink:s("a",{href:`mailto:${r.contactEmail}`,children:n.translate("notice_banner.all_violations_email_link")})})}})}function d4(){const e=q().buyerIdentity.value?.purchasingCompany,t=!b().checkout.configuration.layout.isOnePage.value,n=n4().value,r=t4(),o=a4(),i=i4().value,a=l4().value,l=eP().value,c=s4().value,u=lP().value,d=c4().value,p=u4().value,{currentDetour:m}=Se().value,f=m?.type&&ZW.includes(m.type),{shippingAddress:h}=ie();if(!e||f)return[];const g=h.peek(),y=e?.location.shippingAddress||{},_=oi(g,y);return[...u?[Fo(u)]:[],...d?[Fo(d)]:[],...p?[Fo(p)]:[],...n?[n]:[],...r?[r]:[],...o?[o]:[],...i?[i]:[],...a?[a]:[],...l&&t&&_?[l]:[],...c&&t?[c]:[]]}function cP(){const{client:e,router:t}=b(),n=e.unstable_getSerialization("amazonQueryParams"),r=We().inMemoryAmazonPayParts.serializedAmazonParams,o=r.value,{searchParams:i}=t.currentUrl.value;return V(()=>{function a(){if(i&&typeof i.entries=="function"){const d=i.entries();if(d&&typeof d[Symbol.iterator]=="function")return Object.fromEntries(d)}return{}}const l=a();let c=o;o===null&&n&&(r.value=n,c=n);const u={...c,...l};return Object.fromEntries(zh.map(d=>[d,u[d]]))},[i,o,n,r])}function p4(){const{router:e}=b(),t=cP(),n=e.currentUrlMatches("/thank-you");return{searchParams:t,isThankYouPage:n}}function md(){const{paymentMethods:e}=q(),{paymentLines:t}=ie(),{searchParams:n,isThankYouPage:r}=p4(),o=Je(n),i=Je(r),a=U(!1),l=U(!1);return w(()=>{const c=o.value,u=t.value,d=e.value,p=c.wallet===Te.BuyWithPrime&&!c.amazon_cancelled,[m]=vs(u,[Te.BuyWithPrime]),f=!!m;return p&&(a.current=!0),f&&(l.current=!0),l.current&&!f&&!p&&(a.current=!1,l.current=!1),uI({paymentLines:u,paymentMethods:d,urlParams:{wallet:a.current?Te.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:i.value})})}function m4(){const{checkout:e,i18n:t}=b(),{configuration:n}=e,r=e.latestReceipt.value,{lastJourneyProgression:o}=Xe(),i=n.layout.isOnePage.value,a=md(),c=V(()=>r?.status==="failed"&&r.failure?.type==="payment"&&r?.failure.code==="PRE_CHARGE_ERROR"&&o.value.type!=="success",[o.value,r])&&(i||a.value),{inMemoryAmazonPayParts:{buyerDetails:u}}=We(),d=c||u.value.error,p=V(()=>c?Ze.PaymentsViolations:Ze.OtherViolations,[c]);return d?{code:p,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}function f4(){const e=q().allViolations,{i18n:t}=b(),n=Se(),r=we(void 0);return tr(o=>{o.type==="complete"||o.type==="invalid"||o.type==="failed"||(r.value=o.negotiationStage)}),w(()=>{const o=e.value?.filter(({code:a})=>a==="DELIVERY_DELIVERY_LINE_DETAIL_CHANGED");if(!o?.length)return;const i=n.value.currentPage?.id==="payment";if(r.value==="completion"||r.value==="negotiation"&&i)return{...o[0],tone:"critical",localizedMessage:t.translate("payment.shipping_rate_updated"),localizedMessageHtml:t.translate("payment.shipping_rate_updated"),priority:1}})}function h4(){const{source:e}=b(),{paymentLines:t,buyerIdentity:n}=q(),r=lP(),o=e.type==="draftOrder";return w(()=>!o||n.value?.purchasingCompany||!t.value?.lines?.some(i=>i.method.type==="deferred")?null:r.value)}function g4(){const e=q().allViolations,{i18n:t,url:n}=b();return w(()=>{const r=e.value?.filter(i=>Vh.has(i.code))??[];if(!r.length)return null;const o=s(G,{children:t.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:s(dt,{tone:"monochrome",href:n.cart(),children:t.translate("notice_banner.return_to_cart_link_text")})})});return r.length===1?{code:r[0].code,localizedTitle:r[0].localizedMessage||r[0].nonLocalizedMessage,localizedMessage:o,c
39ollapsible:!1,tone:"critical"}:{code:Ze.MerchandiseQuantityRulesNotMet,localizedTitle:t.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:o,collapsible:!1,tone:"critical"}})}function y4(){const e=q().merchandiseLines,{i18n:t}=b();return w(()=>{if(e.value?.sellingPlanMismatch)return{code:Ze.SellingPlanDigest,localizedMessage:t.translate("notice_banner.subscription_changed"),status:"warning"}})}function v4(){const{taxes:e,merchandiseLines:t}=q(),{i18n:n}=b(),r=U("unset"),o=U(),i=Se();return w(()=>{const a=e.value,l=t.value?.priceMismatch,c=i.value.currentPage?.id==="information",u=a?.status==="pending"?void 0:a?.status;return r.current==="unset"&&u&&(r.current=u),l&&r.current!=="unset"&&u&&r.current!==u?(o.current={code:Ze.TaxExemption,localizedMessage:n.translate("change_country.cart_updated_based_on_country")},r.current=u):(!l||c)&&(o.current=void 0),o.current})}function uP(){const{paymentLines:e}=ie(),{checkout:t}=b(),n=t.identity.current.value==="shopPay";return w(()=>dI({paymentLines:e.value,isOnePage:t.configuration.layout.isOnePage.value,isShopPayActive:n}))}function _4(){const e=q(),{allViolations:t}=e,n=e.paymentLines?.value?.lines,{lastJourneyProgression:r}=Xe(),o=!!Pt(n,"APPLE_PAY"),i=b4(),a=uP(),l=w(()=>r.value.type==="success"||r.value.type==="error"?r.value.negotiationStage==="completion":!1),{criticalViolations:c,warningViolations:u}=V(()=>{const f=t.value||[],h=[],g=[];for(const y of f)y.__typename!=="ConfirmChangeViolation"&&y.__typename!=="UnprocessableTermViolation"&&y.__typename!=="RemoveTermViolation"&&y.__typename!=="ArtifactDissatisfactionViolation"||(pI.has(y.code)&&h.push(i(y,"info")),mI.has(y.co
39de)&&g.push(i(y,"warning")),fI.has(y.code)&&l.value&&h.push(i(y,"critical")),hI.has(y.code)&&h.push(i(y,"critical")),o&&!a.value&&gI.has(y.code)&&h.push(i(y,"critical")));return{criticalViolations:h,warningViolations:g}},[t.value,l.value,o,a.value,i]),d=0,p=V(()=>c.length>=1?c.map(f=>f.priority??d).reduce((f,h)=>f>h?f:h):d,[c]),m=V(()=>c.length>=1?c.filter(f=>(f.priority??d)>=p):c,[c,p]);return u.concat(m)}function b4(){const{client:e,i18n:t}=b(),n=e.unstable_getSerialization("logoutUrl")||"",r={PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID:t.translate("wallets.errors.terminal",{walletName:t.translate("brand.paypal")}),PROPOSAL_SESSION_IDENTIFIER_NOT_UNIQUE:t.translate("session_errors.session_not_unique"),PROPOSAL_SESSION_ALREADY_FINISHED:t.translate("session_errors.session_already_finished"),DISCOUNTS_CURRENTLY_INACTIVE:t.translate("discount_errors.generic_error"),DISCOUNTS_NO_ENTITLED_LINE_ITEMS:t.translate("discount_errors.generic_error"),DISCOUNTS_USAGE_LIMIT_REACHED:t.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_NOT_ELIGIBLE:t.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED:t.translate("discount_errors.generic_error"),BUYER_IDENTITY_COMPANY_PURCHASE_PERMISSION_REQUIRED:t.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:s(dt,{href:n,children:t.translate("b2b_errors.log_out_link_text")})}),BUYER_IDENTITY_LOST_ACCESS_TO_COMPANY:t.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:s(dt,{href:n,children:t.translate("b2b_errors.log_out_link_text")})}),ARTIFACT_DISSATISFACTION:t.translate("artifact_errors.artifact_dissatisfaction_without_violation"),BUYER_IDENTITY_PRESENTMENT_CURRENCY_DOES_NOT_MATCH:t.translate("general.errors.buyer_identity.buyer_identity_presentment_currency_does_not_match"),[yI]:t.translate("remote.errors.currency_mismatch_removal")};return(o,i)=>{const a=r[o.code];return{...o,localizedMessageHtml:a??o.localizedMessageHtml,localizedMessage:a??o.localizedMessage,tone:i}}}function P4(){const e=g4(),t=KW(),n=m4(),r=y4(),i=rP().value.banner,a=v4(),l=d4(),c=_4(),u=h4(),d=f4(),p=b().checkout.configuration.layout.isOnePage.value,{allViolations:m}=q(),f=w(()=>wy(m.value??[])),h=iP();return[...c,...u.value?[Fo(u.value)]:[],...a.value?[a.value]:[],...r.value?[r.value]:[],...e.value?[e.value]:[],...t.value?[t.value]:[],...n?[n]:[],...l,...i&&!f.value?[i]:[],...h.value?[h.value]:[],...d.value&&!p?[d.value]:[]].filter(vI("localizedMessage"))}function fd(e,t){const n=e.peek()||{};Object.entries(t).some(([r,o])=>n[r]!==o)&&(e.value={...n,...t})}function S4(){const e=ds(Te.AmazonPay),t=ds(Te.BuyWithPrime),{hasError:n}=Ny(Fh),{checkout:r}=b(),i=r.latestReceipt.value?.id,{persistedAmazonSignal:a}=We(),l=!!(n&&(e.value||t.value))&&i!==a.value?.receiptIdForPaymentDecline,c=R(()=>fd(a,{receiptIdForPaymentDecline:i}),[a,i]);return{hasError:l,clearError:c}}function dP(){const{checkout:e}=b(),t=e.latestReceipt.value,{persistedApplePaySignal:n,inMemoryApplePayParts:{paymentSheetError:r}}=We(),o=we(!1),i=we(!1),a=n.value,l=uP(),c=R(()=>{o.value=!0,i.value=!1},[o,i]),u=o.value,d=i.value;tr(m=>{if(m.type==="error"&&m.negotiationStage==="completion"){const f=m.violations.some(h=>h.code==="PAYMENTS_APPLE_PAY_SESSION_EXPIRED");i.value=f}});const p=V(()=>l.value?d?!0:!t||u?!1:t.status==="failed"&&t.failure.type==="payment"&&a?.receiptIdForPaymentFailure===t.id:!1,[t,l.value,a,u,d]);return F(()=>{p&&(r.value=void 0)},[p,r]),{hasError:p,clearError:c}}function E4(){const{allViolations:e}=q(),t=qe("allViolations");return w(()=>{const n=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return t.value||!e.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...e.value.reduce((i,a)=>(a.__typename==="UnprocessableTermViolation"&&n.includes(a.code)&&i.push({message:a.localizedMessage||a.nonLocalizedMessage,target:a.target}),i),[])].filter(f_())}})}function cf(e,t,n,r){if(e?.status!=="failed")return!1;const o=n==="draftOrder"&&e.failure.type==="payment"&&e.failure.hasOffsitePaymentMethod!==!0&&r===e.id;return t===e.id||o}function C4(){const[e,t]=lu(hn.LastSeenErrorReceiptId),n=wt(),{checkout:r,client:o,source:i}=b(),a=r.latestReceipt.value,l=o.unstable_getSerialization("receipt")?.latestReceipt,c=l?.__typename==="FailedReceipt"?l.id:void 0,[u,d]=oe(()=>n.peek()?cf(a,e,i.type,c):!0);return F(()=>{const p=cf(a,e,i.type,c);d(p),a?.status==="failed"&&e!==a.id&&t(a.id),a?.status!=="failed"&&t(void 0)},[a?.id,a?.status]),u}function pP(e){return e.some(({code:t})=>Wv.has(t))}function k4(e){return e.find(t=>Wv.has(t.code))}function I4(e,t){const n=_I(t);e.value=n}function uf(e,t){if(!e)return null;const n="code"in t?t.code:void 0,r="ids"in t?t.ids:void 0,o=e.filter(i=>n?!ca(i,n):r?!r.includes(i.id):!0);return o.length>0?o:null}const mP=(e,t)=>e.toUpperCase()===t.toUpperCase(),ca=({discountLine:e},t)=>!!(t&&mP(e.discount.title,t)),A4=(e,t)=>t.some(n=>(n.discount.type==="discountCodeTrigger"||n.discount.type==="code")&&ca(e,n.discount.title)),T4=(e,t,n)=>[...t.reduce((o,i)=>{if(i.errorCode===Jo||A4(i,e))return o;const a=ca(i,n);return!n||a?o.set(i.discountCode.toUpperCase(),i):o},new Map).values()];function fP(e){return e?.shopPay?.isExternal===!0}function w4(){const{i18n:e}=b(),{voidedGiftCardsSignal:t}
39=Nt(),n=t.peek(),r=V(()=>new Set([...js,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"]),[]),o=V(()=>({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:(n[0]??"").slice(-4).toUpperCase()})}),[n,e]);return R(i=>i.reduce((a,l)=>(r.has(l.code)&&a.push(o[l.code]()),a),[]),[o,r])}function ua({inputRef:e,headingId:t,monorailSection:n}={}){const{discountCodeWarningSignal:r,reductionsErrorsSignal:o,reductionsValueSignal:i,derivedErrorMessageSignal:a,refreshNegotiationSignal:l,currentDiscountCodeAttemptSignal:c}=Nt(),u=Xe(),{negotiate:d}=Lt(),p=we(i.peek()),[m,f]=oe(i.peek().length>0),{discountLines:h,paymentLines:g,reduction:y}=ie(),_=r.value,{checkout:P,i18n:v,userEvents:E,shop:C,source:S}=b(),I=nh(C),k=P.identity.current.value==="shopPay",T=h.value,[A,L]=oe([]),M=w4(),N=vy(),{currentPage:O}=Se().value,D=qe("discountLines").value,B=U(0),[z,x]=oe(!1),W=V(()=>T?.reduce((K,te)=>(te.message&&!A.includes(te.discount.title)&&K.push({id:Tl(),discountCode:te.discount.title,message:te.message??"",discountLine:te,tone:"info"}),K),[]),[T,A]);F(()=>{D&&(B.current+=1)},[D,B]),F(()=>{D||x(!1)},[D]),F(()=>{ae(z&&D)},[_,D,B,z]);const X=U(O?.id);F(()=>{X.current!==O?.id&&(X.current=O?.id,o.value=[])},[O?.id]);const Z=R(K=>{const te=r.value??[];r.value=uf(te,{ids:K}),N()},[N,r]),ce=R(K=>{const te=W.filter(({id:pe})=>K.includes(pe)).map(({discountCode:pe})=>pe);L(pe=>[...pe,...te]),N()},[W,N]),j=R(K=>{i.value=K,K&&(p.value=K)},[i,p]),Q=R(({clearWarnings:K=!0,preserveValue:te=!1}={})=>{te||(j(""),f(!1),c.value=null),K&&(r.value=null)},[c,r,j]),H=R(()=>{t&&document.getElementById(t)?.focus()},[t]),J=R(K=>{j(K?.trim()),o.value.length>0&&(o.value=[])},[j,o]),he=R(()=>{o.value.length>0&&(o.value=[])},[o]),[ne,ae]=oe(!1),ue=R((K,te)=>{const pe=[],ge=[],Ie=r.value??[],_e=c.value;for(const ke of K){const Ne=Jo===ke.code;switch(ke.type){case"InputValidationError":case"UnprocessableTermViolation":{if(No.has(ke.code)){pe.push(ke);break}te!=="negotiation"&&js.has(ke.code)&&pe.push(ke);break}case"RemoveTermViolation":case"ConfirmChangeViolation":{const nt=ke.type==="ConfirmChangeViolation",re=bA(ke.targetEntity),se=!!(_e&&re&&mP(re.title,_e));if(qv.has(ke.code)&&te!=="completion"&&!se)break;if(No.has(ke.code)){pe.push(ke);break}if(re?.discount.type!=="discountCodeTrigger"||!Gv.has(ke.code))break;const Me=ql.has(ke.code),je={message:ke.localizedMessage??ke.nonLocalizedMessage,messageHtml:ke.localizedMessageHtml,discountLine:re,tone:Me?"info":"warning",discountCode:re.discount.title,id:Tl(),errorCode:ke.code,isConfirmChangeViolation:nt};if(Ne){ge.push(je);break}(!_e||se)&&ge.push(je);break}}}return o.value=pe.slice(-1),_e||ge.unshift(...Ie.filter(ke=>ke.errorCode===Jo)),r.value=ge.length>0?ge:null,{hasWarnings:ge.length>0,hasPreserveInputErrors:K.some(ke=>No.has(ke.code))}},[c,r,o]),Ae=R(async()=>{await d({include:[],onComplete:K=>{P.unstable_overwriteLatestReceipt(void 0),l.value=!1,(K.status==="success"||K.status==="error")&&ue(K.errors)}})},[ue,d,P,l]);ze(()=>{const K=P.latestReceipt.value;l.peek()||!K||!ky(K)||K.failure?.type!=="discount"||(l.value=!0,ht(()=>{Ae()}))}),tr(R(K=>{"errors"in K&&ue(K.errors,K.negotiationStage)},[ue])),ze(()=>{const K=u.lastJourneyProgression.value;K.type==="error"&&K.negotiationStage==="completion"&&ht(()=>ue(K.errors,"completion"))}),bI(({parts:K,reason:te})=>{const pe=r.peek()??[],ge=c.peek(),Ie=ge&&pe.every(Ne=>!ca(Ne,ge));if(pe.length===0)return{behavior:"allow"};if(te==="completion"||Ie)return r.value=null,{behavior:"allow"};if(te!=="progression"&&te!=="negotiation")return{behavior:"allow"};const _e=K.discountLines.peek(),ke=T4(_e,pe,ge);return ke.length>0&&(K.discountLines.value=[..._e,...ke.map(({discountLine:Ne})=>Ne)]),{behavior:"allow"}});const me=R(K=>(K||g.value).filter(pe=>pe.method.type==="giftCard"&&"code"in pe.method).map(pe=>pe.method.code),[g]),ye=R(()=>h.value.filter(K=>K.discount.type==="code").map(K=>K.discount.title),[h]),Ee=R(async()=>{x(!0);const K=i.value,te=JSON.parse(JSON.stringify(g.value));c.value=K,e?.current?.blur(),H();const pe=ye(),ge=new Set(h.value.filter(Ie=>Ie.discount.type==="code"&&Ie.discount.codeHidden).map(Ie=>Ie.discount.title));await d({include:["deliveryNext"],fieldsToResolve:[...$p],loading:["deliveryNext","discountLines"],customizeNegotiation:Ie=>({...Ie,reduction:{code:K}}),onComplete:Ie=>{if(Ie.status==="success"||Ie.status==="error"){const{hasWarnings:_e,hasPreserveInputErrors:ke}=ue(Ie.errors);Q({clearWarnings:!_e,preserveValue:ke});const Ne=pP(Ie.errors);if(Ne&&Ie.errors.some(de=>ql.has(de.code))){const de=ye(),xe=pe.filter(rt=>!de.includes(rt));xe.length>0&&(xe.length===1&&ge.has(xe[0])?(xt({content:v.translate("order_summary.discount_has_been_removed")}),xt({content:v.translate("order_summary.discount_code_applied_with_code",{code:K})})):xt({content:xe.length>1?v.translate("order_summary.discount_code_replaced_multiple",{code:K}):v.translate("order_summary.discount_code_replaced",{old_code:xe[0],code:K})}))}const nt=Ie.negotiated.paymentLines?.lines||[],re=me(te),se=me(nt),Me=re.reduce((De,de)=>(De[de]=!0,De),{}),Re=se.some(De=>Me[De]===void 0),je=te.reduce((De,de)=>(de.method.type==="giftCard"&&de.cost!=null&&de.cost.amount>0&&(De[wl(de.method)]=!0),De),{}),Bt=I&&nt.some(De=>De.method.type==="giftCard"&&De.cost!=null&&De.cost.amount>0&&je[wl(De.method)]===void 0);if(!Ne){if(I&&(Re||Bt)){const pt=g.peek();g.value=[...pt.filter(Qt=>!qd(Qt)),...nt.filter(qd)]}const{runningTotal:De,merchandiseLines:de}=Ie.negotiated;!(De&&De.amount<=0)||rh(de?.lines)||te.some(Qt=>Qt.method.type==="walletsPlatformPaymentMethod"&&Qt.method.name===Te.BuyWithPrime)||I4(g,I&&(Re||Bt)?nt:te);
39const ft=v.translate("order_summary.discount_code_applied_with_code",{code:K});xt({content:Re||Bt?v.translate("order_summary.gift_card_applied"):ft}),j(""),f(!1)}const Ct=k4(Ie.errors),Xt=()=>{if(!Ne)return Re?"gift_card":"discount_code"};E.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(Ve(C.id),10),checkoutToken:S.checkoutSessionIdentifier??"checkout_identifier_undefined",event:Ne?"apply_reduction_failure":"apply_reduction_success",reductionType:Xt(),errorMessage:Ct?.nonLocalizedMessage,page:"checkout",section:n}}),k&&(Ne?E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,C),action:"add_discount_failure"}}):E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,C),action:Re?"add_gift_card":"add_discount_success"}}))}},force:!0}),N()},[Q,c,N,H,me,ue,e,k,d,h,g,j,v,i,E,S,P,C,I,n,ye]),Ue=R(async K=>{const te=h.value,pe=ye(),ge=te.some(_e=>_e.discount.type==="code"&&_e.discount.title===K&&_e.discount.codeHidden);if(te.length===1&&H(),fP(u)){const ke=u.shopPay.discountCodes.value.filter(Ne=>Ne!==K);u.shopPay.updateDiscountCodes(ke)}h.value=te.filter(_e=>_e.discount.type==="code"?_e.discount.title!==K:!0),r.value=uf(r.value,{code:K}),L(_e=>_e.filter(ke=>ke!==K)),y.value?.code===K&&(y.value=void 0),k&&E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,C),action:"remove_discount"}}),await d({include:["deliveryNext"],fieldsToResolve:[...$p],loading:["discountLines","deliveryNext"],force:!0,onComplete:_e=>{(_e.status==="success"||_e.status==="error")&&ue(_e.errors),xt({content:ge?v.translate("order_summary.discount_has_been_removed"):v.translate("order_summary.discount_code_removed",{code:K}),role:"status"});const Ne=ye().filter(nt=>!pe.includes(nt));if(Ne.length>0){const nt=h.value.some(re=>re.discount.type==="code"&&re.discount.title===Ne[0]&&re.discount.codeHidden);xt({content:nt?v.translate("order_summary.discount_has_been_applied"):v.translate("order_summary.discount_code_applied_with_code",{code:Ne[0]}),role:"status"})}}}),N()},[u,h,y,k,d,N,H,E,S,P,C,ue,r,ye,v]),Ce=R(async K=>{const te=g.value;g.value=te.filter(pe=>pe.method.type==="giftCard"&&"code"in pe.method?pe.method.code!==K:!0),g.value.length===1&&H(),k&&E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,C),action:"remove_gift_card"}}),await d({include:["paymentLines"]}),N()},[g,k,d,N,E,S,P,C,H]);return{loading:ne,handleSubmit:Ee,handleNegotiationErrors:ue,dirty:m,setDirty:f,removeDiscount:Ue,getGiftCards:me,removeGiftCard:Ce,reductionCodeField:{value:i.value,valueSignal:p,onChange:J,onInput:he,error:Qy(o.value),errorSignal:a},discountCodeWarning:_,discountMessages:W,removeDiscountCodeWarnings:Z,removeDiscountCodeMessage:ce,giftCardBannerErrors:M(o.value)}}function hP(){const{negotiate:e}=Lt(),{email:t,phone:n,billingAddress:r,paymentLines:o}=ie(),{inMemoryApplePayParts:{asPaymentMethod:i}}=We(),{checkout:{wallets:a}}=b(),l=q(),{value:c}=l.buyerIdentity,u=c?.customerProfile?.__typename==="CustomerProfile",d=c?.purchasingCompany,p=Cr(),m=Vv(),f=PI({availableDeliveryAddresses:l.availableDeliveryAddresses?.value,mustSelectProvidedAddress:l.mustSelectProvidedAddress?.value}),h=R(()=>{const _={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},P=i.value;return a.activeSession.value?{..._}:u?{..._,shouldRemoveWalletContent:P,shouldResetBuyerInfo:!P,shouldRemoveBillingAddress:!0}:P?{..._,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{..._,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{..._,shouldResetBuyerInfo:!0}},[a,u,i,p,d]),g=_i(),y=o_();return R(async({shouldPersist:_=!0}={})=>{const{shouldResetBuyerInfo:P,shouldRemoveWalletContent:v,shouldRemoveBillingAddress:E,forceClearLocalPickupFields:C}=h();v&&(o.value=fc(o.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||g({shouldResetCustomerInfo:P,shouldRemovePaymentLine:!i.value,isConstrainedAddress:f}),C&&(t.value="",n.value=""),E&&(r.value=m("billing")??Ll(r.value)),_&&!a.activeSession.value&&await e({silenceViolations:["non-stock"]})},[g,a,o,t,n,r,e,h,i,y,m,f])}function L4({shouldPersist:e}){const t=hP(),{walletUsedForSubmissionSignal:n,persistedApplePaySignal:r,inMemoryApplePayParts:{paymentSheetError:o,subscriptionReviewTransition:i}}=We();return R(()=>{o.value=void 0,i.value=void 0,n.value=void 0,r.value={},t({shouldPersist:e})},[o,i,n,r,t,e])}function x4(){const e=L4({shouldPersist:!1}),{clearError:t,hasError:n}=dP(),{checkout:r,router:o}=b(),{clearForcedCheckoutLayout:i}=yi(Tn),a=R(()=>{e(),i({wallet:"APPLE_PAY"}),r.unstable_evaluateSupportsSplitShipping(o.currentUrl.value),n&&t()},[e,r,i,o,t,n]);return bi({onClick:a,shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function R4(){const{i18n:e}=b(),{onClick:t}=x4(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:s(dt,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return s(bn,{errorType:at.PaymentError,tone:"critical",children:s(ee,{al
39ignItems:"start",gap:"small-500",children:s($e,{children:n})})})}function M4(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:t}}=We(),n=qe("shippingAddress");return w(()=>t.value&&!e.value.loading&&!n.value)}function df(e){const t=M4(),{hasViolations:n,violations:r}=gR(e);if(!n||!t.value)return null;const o=new Set;for(const i of r)o.add(i.localizedMessage??i.nonLocalizedMessage);return Array.from(o)}function N4({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=b(),n=df(new Set([...SI].filter(o=>e.every(i=>!o.startsWith(i))))),r=df(new Set([...Zr,...Uh].filter(o=>e.every(i=>!o.startsWith(i)))));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 gP(){return N4({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function D4(){const{i18n:e}=b(),t=gP();return t?.length?s(bn,{tone:"critical",errorType:at.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),s(pd,{children:t.map(n=>s(dd,{children:s($,{children:n})},n))})]},"amazon-pay-errors"):null}function O4(e="unknown"){const{observability:t}=b();F(()=>{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"})},[])}function yP(){const e=md(),t=Je(gP()),{persistedAmazonSignal:n,inMemoryAmazonPayParts:{hasPaymentSheetError:r}}=We();return w(()=>{const o=n.value;return!o?.primeError&&!e.value?null:o?.primeError?"terminal error":r.value?"payment sheet error":t.value?.length?"amazon pay error messages":null})}function F4(){const e=yP();return e.value?s(B4,{errorMessagesType:e.value}):null}function B4({errorMessagesType:e}){const{i18n:t,checkout:n}=b(),r=n.configuration.layout.isOnePage.value,{value:o}=q().paymentLines,{persistedAmazonSignal:i}=We();return O4(),F(()=>{o?.lines.filter(l=>!(l.method.type==="walletsPlatformPaymentMethod"&&l.method.name===Te.BuyWithPrime))?.length&&fd(i,{primeError:void 0})},[o,i]),e==="payment sheet error"||e==="terminal error"?s(bn,{errorType:at.PaymentError,tone:"critical",children:t.translate("wallets.errors.generic",{walletName:t.translate("brand.buy_with_prime")})},"amazon-pay-errors"):e==="amazon pay error messages"?r?null:s(D4,{}):V4()}function V4(e){return null}function hd({errors:e,errorType:t}){return s(G,{children:e.map(n=>s(bn,{tone:"critical",errorType:t,children:n.messageNode??n.message},`${n.target}${n.message}`))})}function U4(e){if(e.startsWith("DISCOUNTS")||e==="ReductionViolations")return at.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 at.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return at.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUAL_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return at.PaymentError;default:return at.CheckoutError}}function z4(){const e=P4();return e.length>0?e.map(t=>s(nP,{notice:t,errorType:U4(t.code)},t.code)):null}function H4(){const{globalErrors:e}=Xs().value;return e.length>0?s(hd,{errors:e,errorType:at.CheckoutError}):null}function q4(){const{merchandiseLineTransformerErrors:e}=E4().value;return e.length>0?s(hd,{errors:e,errorType:at.MerchandiseError}):null}function G4(){const{contactErrors:e}=Xs().value,t=ho();return e.length===0?null:t.value.contact?s(hd,{errors:e,errorType:at.ContactError}):null}function W4(){return!!yP().value?s(F4,{}):null}function $4(){const{hasError:e}=S4(),t=C4();return e&&!t?s(qW,{}):null}function Y4(){const{hasError:e}=dP();return e?s(R4,{}):null}function j4(){const{giftCardBannerErrors:e}=ua(),{value:t=[]}=q().allViolations,r=b().checkout.configuration.layout.isOnePage.value?void 0:e?.[0],o=t.find(i=>i.code==="PAYMENTS_GIFT_CARDS_UNAVAILABLE");return o?s(bn,{errorType:at.DiscountError,tone:"critical",children:o.localizedMessage}):r?s(bn,{errorType:at.DiscountError,tone:"critical",children:r}):null}const K4=()=>{const{isAppLayout:e}=ud(),{embed:t,checkout:n}=b(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:o="base"}}
39=ct(),i=[z4(),H4(),q4(),G4(),W4(),$4(),j4(),Y4()].filter(Boolean);if(i.length===0)return null;const c=e?"none large-200 base large-200":r?"none none base none":"none",d=!!t?.isFlagshipPartner&&o==="high"?"none none small-100 none":"none";return s(ee,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${d}, ${c}`,children:i})},tc=Qn(function({section:t="top"}){return{toast:s(FW,{}),top:s(K4,{}),reductions:s(DW,{}),delivery:s(RW,{}),payment:s(MW,{})}[t]});function J4(e){const{source:t}=b(),n=t.type==="simulated",r=U(null),{allRenderedSections:o,getRenderedSection:i}=Nt(),a=i({sectionId:e}),l=a.value;return F(()=>{if(!(!n||!r?.current)){if(!l.rendered&&r?.current){a.value={rendered:!0};const c=o.value;o.value={...c,[e]:!0}}return()=>{if(l.rendered){a.value={rendered:!1};const u={...o.value};e in u&&delete u[e],o.value=u}}}},[n,r,l,e,a,o]),V(()=>({sectionRef:r}),[r])}function X4({sectionId:e,children:t}){const{source:n}=b(),r=n.type==="simulated",{sectionRef:o}=J4(e);return r?s(G,{children:[s("div",{ref:o,style:{display:"none"}}),t]}):s(G,{children:t})}const Q4={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function Z4(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=b();return R(async n=>{const{data:r,error:o}=await e.mutate(Q4,{variables:{code:n,shopifyDomain:t}});if(o||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:i}=r;return i.userErrors.length>0?{status:"failed",errors:i.userErrors}:{status:"success"}},[e,t])}function e$(){const{negotiate:e}=Lt(),{handleNegotiationErrors:t,discountCodeWarning:n}=ua(),{discountLines:r,reduction:o}=ie(),{shop:i,source:a,checkout:l,userEvents:c,shopPay:u}=b(),d=u.user.wallet.value,p=Z4(),[m,f]=oe(!1),[h,g]=oe(""),y=u.user.shopAccountUuid,_=R((I,k)=>
39{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...$n(a,l,i),action:I,shopAccountUuid:k,shopPermanentDomain:i.myshopifyDomain,discountCode:h}})},[c,a,l,i,h]),P=R(async I=>{(await p(h)).status==="success"&&_("invalidated - discount had been deleted",I)},[p,_,h]),[v,E]=oe(()=>r.value.length?"open":"closed"),C=R(I=>{const k=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],T=new Set([...No,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",Jo]);return I.some(A=>k.includes(A.type)&&T.has(A.code))},[]),S=R(I=>{const k=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],T=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return I.some(A=>k.includes(A.type)&&T.includes(A.code))},[]);return F(()=>{g(d.latestDiscount?.code??""),h&&E("negotiating_app_discount")},[h,d]),F(()=>{r.value.length===0&&E(I=>I==="negotiating_app_discount"?I:n?"open":"closed")},[n,r.value.length]),F(()=>{const I=h;if(!m&&v==="negotiating_app_discount"&&I){f(!0),o.value={code:I};const k=y.value;e({onComplete:async T=>{if(f(!1),T.status==="success"||T.status==="error"){const A=T.negotiated.discountLines?.lines.some(L=>L.discount.title.toLowerCase()===I?.toLowerCase());h&&(t(T.errors),A?_("applied",k):C(T.errors)?P(k):S(T.errors)&&_("failed to apply - invalid cart",k),o.value=void 0),E(A||n?"open":"closed")}},force:!0})}},[m,t,n,e,h,v,C,_,S,P,c,o,y.value]),{discountLines:r.value,formStatus:v,setFormStatus:E,walletDiscountCode:h}}function t$({children:e}){const{formStatus:t}=e$();return t==="negotiating_app_discount"?s(be,{inlineAlignment:"center",children:s(so,{})}):s(G,{children:e})}const n$=e=>typeof e=="string"||typeof e=="number"?e.toString():wh(e)?e.message:Hh(e)?e.textValue:"";function r$({children:e,state:t,errors:n}){const r=tP(),o=dy(),i=U([]);return F(()=>{const a=i.current;return Object.entries(n).forEach(([l,c])=>{a.push(c.subscribe(u=>{if(!u)return;const d=r(l),p=t[l]?.value??"",m=p?at.InputInvalid:at.InputRequired,f=n$(u);o({target:d,errorType:m,value:p,message:f,timestamp:new Date})}))}),()=>{a.forEach(l=>l()),i.current=[]}},[]),e}function gd(){const{source:e}=b(),t=q().canUpdateDiscountCodes;return w(()=>(t.value??!0)&&!st(e))}function vP(){const e=q(),t=e.paymentFlexibilityPaymentTermsTemplate,n=Bn(),r=e.paymentMethods;return w(()=>e.buyerIdentity.value?.purchasingCompany&&(t.value||n.value)?!1:r.value?.some(o=>o.type==="giftCard"))}function o$(){const{i18n:e,shop:{discountCodesEnabled:t}}=b(),n=gd(),r=vP();return w(()=>{const o=t&&n.value;return r.value&&o?{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")}:r.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")}:o?{label:e.translate("order_summary.discount_label"),placeholder:e.translate("order_summary.discount_placeholder"),title:e.translate("order_summary.discount_title")}:{label:"",placeholder:"",title:""}})}const i$="_1MTFx",pf={bannerMessage:i$};function mf({messages:e}){const t=r=>r==null?null:s("span",{dangerouslySetInnerHTML:{__html:r}}),n=r=>s(kr,{children:r.messageHtml?t(r.messageHtml):r.message});return e.length===1?s("div",{className:pf.bannerMessage,children:n(e[0])}):s(pd,{children:e.map(r=>s(dd,{children:s("div",{className:pf.bannerMessage,children:n(r)})},r.id))})}function s$(e,t){return t?[...e.reduce((r,o)=>{const i=r.get(o.tone)??{tone:o.tone,linkedMessages:[]};return i.linkedMessages.push({...o}),r.set(o.tone,i)},new Map).values()]:e.map(r=>({tone:r.tone,linkedMessages:[r]}))}function a$(e){return[...[...e.reduce((r,o)=>r.set(o.discountCode.toLocaleUpperCase(),o),new Map).values()].reduce((r,o)=>r.set(o.message.toLocaleUpperCase(),o),new Map).values()]}function l$(e){return e.reduce((n,r)=>(n.add(r.discountCode.toLocaleUpperCase()),n),new Set).size}const ff=Qn(function({removeBanner:t,messages:n,grouped:r=!1}){const{i18n:o}=b(),i=V(()=>s$(n,r),[n,r]),a=R((l,c)=>{const u=l.filter(({isConfirmChangeViolation:d})=>d).length;return u===l.length?o.translate("payment.discount_codes_modified_summary",{count:c}
39):u>0?o.translate("payment.discount_codes_removed_or_modified_summary",{count:c}):o.translate("payment.discount_codes_removed_summary",{count:c})},[o]);return n.length===0?null:s(cu,{target:"cart.discountCode",children:i.map(({tone:l,linkedMessages:c})=>{if(c.length===0)return null;const u=["critical","warning"].includes(l),d=c.map(({id:g})=>g),p=a$(c),m=l$(c),f=p.length>1,h={iconHidden:!0,onDismiss:()=>t(d),dismissible:!0,tone:l,collapsible:f,heading:f?a(p,m):void 0};return u?s(bn,{...h,errorType:at.DiscountError,children:s(mf,{messages:p})},d[0]):s(la,{...h,children:s(mf,{messages:p})},d[0])})})});var gl={Chip:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",Icon:"_14brw2",Label:"_14brw3"};function c$({accessibilityLabel:e,children:t,graphic:n,id:r}){const o=St(t);return s("div",{className:gl.Chip,id:r,children:[s(ee,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&s("span",{className:o?gl.Icon:void 0,children:s(Le,{type:n})}),o&&s("span",{className:gl.Label,children:s($,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:s(ki,{children:t})})})]}),e&&s($,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var On={ClickableChip:"_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",disabled:"_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",hidden:"_14gomm27 _14gomm26 _1fragem6y",linkStyles:"_14gomm29 _14gomm28 _1fragem128",outlineStyles:"_14gomm25 _14gomm24 _1fragemyk",RemoveButton:"_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd"};const u$=ui(Ke(function({accessibilityLabel:t,children:n,disabled:r=!1,graphic:o,hidden:i=!1,href:a,id:l,removable:c=!1,removeTrackingEvent:u,onAfterHide:d,onClick:p,onMouseEnter:m,onMouseLeave:f,onFocus:h,onBlur:g,onRemove:y,"aria-describedby":_},P){const v=En(),E=un(),C=U(i);F(()=>{!C.current&&i&&d?.(),C.current=i},[i,d]);const S=Y(On.ClickableChip,{[On.disabled]:r||v,[On.hidden]:i}),I=t?E("removeItem",{label:t}):E("removeChip");return s("div",{id:l,className:S,role:"group",children:[s(d$,{"aria-describedby":_,disabled:r,href:a,inert:v,onClick:p,onMouseEnter:m,onMouseLeave:f,onFocus:h,onBlur:g,ref:P,removable:c,children:s(c$,{accessibilityLabel:t,graphic:o,children:n})}),c&&s("button",{"aria-hidden":v?!0:void 0,"aria-label":I,className:Y(On.RemoveButton,On.outlineStyles),"data-event-name":u,disabled:r,tabIndex:v?-1:void 0,type:"button",onClick:()=>!(r||v)&&typeof y=="function"?y():void 0,children:s(Le,{type:"x",size:"small"})})]})})),d$=Ke(function({children:t,disabled:n,href:r,inert:o,removable:i,onClick:a,onMouseEnter:l,onMouseLeave:c,onFocus:u,onBlur:d,"aria-describedby":p},m){const f=Yr(m),h=n??o??!1,g=h?void 0:r,y=()=>!h&&typeof a=="function"?a():void 0,_={onMouseEnter:l,onMouseLeave:c,onFocus:u,onBlur:d};return!g&&!a&&i?s("div",{className:On.outlineStyles,ref:f,children:t}):g?s(Ds,{"aria-describedby":p,className:Y(On.outlineStyles,On.linkStyles),href:g,onClick:y,ref:f,..._,children:t}):s("button",{"aria-describedby":p,"aria-hidden":o?!0:void 0,className:On.outlineStyles,disabled:n,onClick:y,ref:f,tabIndex:o?-1:void 0,type:"button",..._,children:t})}),p$="ZWcPq",m$={TagContainer:p$};function f$({reductionTags:e,headingId:t}){const{i18n:n}=b(),r=gd(),o=qb(),{removeDiscount:i,removeGiftCard:a}=ua({headingId:t});if(e.length===0)return null;let l=0;const c=e.map(d=>d.hideLabel?(l+=1,l):0),u=l;return s(ee,{direction:"inline",gap:"small-300",accessibilityRole:"unordered-list",accessibilityLabel:n.translate("order_summary.gift_card_and_discount_label"),ref:o,children:e.map((d,p)=>{const m=d.hideLabel?n.translate("order_summary.discount_title"):d.code,f=d.originType==="giftCard"?n.translate("order_summary.gift_card_masked",{last_characters:d.code.slice(-4)}):m;let h=f;d.originType==="giftCard"?h=n.translate("order_summary.gift_card_ending",{last_characters:d.code.slice(-4)}):d.hideLabel&&u>1&&(h=n.translate("order_summary.discount_title_with_position",{position:c[p]}));const g=d.originType==="giftCard"?"giftFill":"discount",y=d.originType==="giftCard"?"remove_gift_card":"remove_discount_code",_=d.originType==="discountCode"&&!r.value?void 0:()=>{d.originType==="discountCode"?i(d.code):a(d.code)},v=d.originType==="automatic"?`automatic-discount-tooltip-${p}`:void 0;return s(be,{accessibilityRole:"list-item",className:m$.TagContainer,children:[s(u$,{accessibilityLabel:h,graphic:g,id:`tag-${p}`,interestFor:v,removable:!v,onRemove:_,removeTrackingEvent:y,children:f.toUpperCase()}),v&&s(Cn,{id:v,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${d.originType}-${d.code}`)})})}const h$="OuqRS",g$="U9F9G",hf={TagListButtonContainer:h$,TagListExpandButton:g$};function y$({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return s(_y,{children:s(cu,{target:"cart",children:s(b$,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}
39const v$=tt("ReductionsInput"),_$=tt("ReductionsHeading");function b$({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){const{i18n:o,shop:{discountCodesEnabled:i,giftCardsEnabled:a},checkout:l}=b(),c=l.identity.current.value==="shopPay",u=Xe(),d=l.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:p,discountTagsDisplay:m,automaticTagsDisplay:f,position:h,spacing:g}}=Fe(),y=wt(),_=Rc({base:!0,medium:!1}),P=y.value?_??!1:!0,v=we(!1),E=R(()=>{v.value=!v.value},[v]),C=gd(),S=fo(),{control:{labelPosition:I="inside"}}=ct(),{reductions:{labelPosition:k=I}}=Fe(),{discountLines:T,paymentLines:A}=ie(),L=T.value,N=A.value.reduce((De,de)=>(de.method.type==="giftCard"&&"code"in de.method&&De.push({originType:"giftCard",code:de.method.code}),De),[]),O=fP(u)&&u.shopPay.discountCodes.value.length?u.shopPay.discountCodes.value:null,D=O?[...new Set(O)].map(De=>{const de=L.find(rt=>rt.discount.type==="code"&&rt.title===De),xe=de?.discount.type==="code"&&!!de.discount.codeHidden;return{originType:"discountCode",code:De,...xe?{hideLabel:!0}:{}}}):[...L.reduce((De,{discount:de,title:xe})=>(de.type==="code"&&!De.has(xe)&&De.set(xe,{originType:"discountCode",code:xe,...de.codeHidden?{hideLabel:!0}:{}}),De),new Map).values()],B=L.reduce((De,{discount:{type:de},title:xe})=>((de==="automatic"||de==="custom")&&De.push({originType:"automatic",code:xe}),De),[]),z=C.value?D:[],x=[...f==="hidden"?[]:B,...z,...N];x.length===0&&(v.value=!1);const W=m==="always_visible"||m==="base"&&x.length>0&&(!P||v.value);let X=!1;u.lastJourneyProgression.value.type==="error"&&u.lastJourneyProgression.value.negotiationStage==="completion"&&(X=pP(u.lastJourneyProgression.value.errors));const Z=Ye(void 0,v$),ce=Ye(void 0,_$),j=hi({active:X});F(()=>{r&&j.current&&j.current.scrollIntoView({behavior:"smooth"})},[r,j]);const{currentDetour:Q,currentPage:H}=Se().value,J=it("Checkout::Reductions::RenderBefore"),he=it("Checkout::Reductions::RenderAfter"),ne=i&&C.value,ae=vP(),ue=a&&ae.value,{loading:Ae,reductionCodeField:me,dirty:ye,setDirty:Ee,handleSubmit:Ue,discountCodeWarning:Ce,discountMessages:K,removeDiscountCodeWarnings:te,removeDiscountCodeMessage:pe}=ua({inputRef:j,headingId:ce,monorailSection:t});F(()=>{if(Ce&&Ce.length>0){const De=Ce[0].message.trim();return De?xt({content:De,role:"status"}):void 0}},[Ce]);const{label:ge,title:Ie,placeholder:_e}=o$().value,ke=V(()=>({state:{discountCode:me.valueSignal},errors:{discountCode:me.errorSignal}}),[me]);if(Q&&Q.type!=="shopPayLogin")return null;const Ne=Ce?s(ff,{messages:Ce,removeBanner:te,grouped:!0}):null,nt=K&&K.length?s(ff,{removeBanner:pe,messages:K}):null,re=p==="base",se=e!=null&&h==="base"&&k==="outside"&&Ie===ge,Me=!re&&k==="outside"&&!se,Re=m==="base"&&P&&x.length>0?s(be,{colorLayer:"control",className:hf.TagListButtonContainer,children:s(Ln,{className:hf.TagListExpandButton,onClick:E,accessibilityLabel:o.translate("order_summary.discount_code_applied_count",{count:x.length}),"data-event-name":v.value?"discount_tags_hide":"discount_tags_show",border:"base",children:s(ee,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[s(Le,{type:"discount",tone:"monochrome"}),s("strong",{children:x.length})]})})}):null,je=re?s(cn,{variant:"primary",type:"submit",loading:Ae,disabled:!ye,accessibilityLabel:o.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:S("apply_discount"),children:o.translate("order_summary.apply_discount_button_label")}):void 0;let Bt=me.error;re||(Bt=me.error?!0:void 0);const Ct=s(ju,{ref:j,id:Z,name:"reductions",label:ge,placeholder:_e,...me,error:Bt,onInput:De=>Ee(De.length>0),autoFocus:n,accessoryStart:Re,accessoryEnd:je,labelPosition:Me?void 0:k,labelAccessibilityVisibility:Me||se?"exclusive":void 0}),Xt=s(be,{children:[s(ee,{gap:"base",children:[s(vW,{onSubmit:Ue,children:re?Ct:s(G,{children:[Me&&s(G,{children:[s(Jl,{variant:"outside",htmlFor:Z,label:ge}),s(zt,{blockSize:"small-400"})]}),s(ee,{gap:"small-300",children:[s(gt,{gap:EI(["small400",g??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[Ct,s(cn,{variant:"primary",type:"submit",loading:Ae,disabled:!ye,accessibilityLabel:o.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:S("apply_discount"),children:d?o.translate("order_summary.apply_discount_button_label"):s(G,{children:[s(sf,{below:"medium",children:o.translate("order_summary.apply_discount_button_label")}),s(sf,{above:"small",children:s(Le,{type:"arrow-right"})})]})})]}),me.error?s(ta,{controlID:Z,children:me.error}):null]})]})}),Ne,nt]}),s(gn,{id:"reduction-tags",open:W,duration:"fast",children:s(be,{paddingBlockStart:x.length>0?"base":void 0,children:s(f$,{reductionTags:x,headingId:ce})})})]});return s(G,{children:[s(gn,{id:"gift-card-field",open:ue||ne,duration:"fast",children:s(Ir,{children:[s(jt,{id:ce,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:Ie}),e&&s(zt,{blockSize:"base"}),s(ee,{gap:"base",children:[s(Yt,{customizations:J}),s(X4,{sectionId:"reductions",children:c&&d?s(t$,{children:Xt}):s(r$,{...ke,children:Xt})}),s(Yt,{customizations:he}),l.configuration.showPayButton&&ne&&(d||H?.id==="payment")&&s(PW,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:o.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!ue&&!ne&&s(tc,{section:"reductions"})]})}const dj="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",pj="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",mj="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",fj="224px",hj="72px",yd=72,gj="415px",yj="700px",vj="100dvi",_j="93dvb",_P=new Set(["Chat","s-chat"]),Bo={};function P$(){const e=le(null),t=new Set,n=le(),r=le(!1),o=le();let i=[];function a(){for(const p of i)p.disconnect();if(!(!e.value||!o.value||o.value.floatingElementBlockSize==null||typeof IntersectionObserver>"u")){i=[new IntersectionObserver(([p])=>{n.value=p.isIntersecting},{threshold:[0,1],rootMargin:`0px 0px -${o.value.blockEndOffset??0}px 0px`}),new IntersectionObserver(([p])=>{r.value=p.intersectionRatio===1||p.boundingClientRect.bottom<p.rootBounds?.bottom},{threshold:[0,1],rootMargin:`999999px 0px -${(o.value.blockEndOffset??0)+(o.value.floatingElementBlockSize??0)}px 0px`})];for(const p of i)p.observe(e.value)}}const l=e.subscribe(a),c=o.subscribe(a),u=kt(()=>!!(e.value&&o.value&&n.value!=null)),d=kt(()=>{const p=!!n.value,m=r.value;return o.value?.floatingElementHiddenBelowTrigger?p||m:p&&!m});return{triggerVisible:n,triggerAboveFloatingElement:r,triggerNode:e,triggerNodes:t,config:o,ready:u,floatingElementHidden:d,subscriptions:0,dispose(){l(),c();for(const p of i)p.disconnect();i=[],t.clear()}}}function S$(e){return Bo[e]||(Bo[e]=P$()),Bo[e]}function E$(e){Bo[e]?.dispose(),delete Bo[e]}function C$(e){const t=S$(e);return F(()=>(t.subscriptions++,()=>{t.subscriptions--,t.subscriptions===0&&E$(e)}),[t,e]),t}
39function k$(e){const t=C$(e),n=U(null),r=R(o=>{const i=n.current;i&&i!==o&&t.triggerNodes.delete(i),o&&t.triggerNodes.add(o),n.current=o,t.triggerNode.value===i&&i!==o?t.triggerNode.value=o??t.triggerNodes.values().next().value??null:o&&t.triggerNode.value===null&&(t.triggerNode.value=o)},[t]);return{floatingElementHidden:t.floatingElementHidden,ready:t.ready,config:t.config,triggerNode:t.triggerNode,setTriggerNode:r}}function I$(e){return e.every(({quantity:t})=>t===0)}const gf=e=>s(Ir,{children:e});function ps({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,monorailSection:r="order_summary",hideReductions:o=!1,reductionsFieldAutoFocus:i=!1,reductionsFieldAutoScroll:a=!1}){const{ready:l}=k$("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:d,visibility:p,layout:m}}}=b(),f=p.showReductions&&!o,h=m.isOnePage.value,{currentDetour:g}=Se().value,y=g?.type==="thankYou",_=V(()=>y?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",[y]),P=it(_,"ORDER_SUMMARY3"),v=it("Checkout::Dynamic::Render","ORDER_SUMMARY4"),E=Rc({base:!0,medium:!1}),C=wt(),S=h&&(C.value?E:!0),I=td(),k=u.proposal.facts.merchandiseLines??[];if(h&&!d){const A=[];for(const L of I.value.values())A.push(...L);if(A.push(...k),I$(A))return s($e,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return s(e?G:Ir,{...!e&&{containerName:"s-shell-section"},children:[s(ee,{gap:"large-200",children:[!n&&s(jt,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&s(Nq,{}),f&&s(y$,{monorailSection:r,autoFocus:i,autoScroll:a}),!y&&s(Yt,{customizations:P,gap:"large-200",render:gf}),s(gW,{}),(!S||y)&&s(Yt,{customizations:y?P:v,gap:"large-200",render:gf})]}),s(ve,{when:l,children:s(be,{minBlockSize:`@media (inline-size >= medium) ${yd}px, 0`})})]})}function A$(){const e=b();return w(()=>av(e))}function T$(){const{checkout:e}=b();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function w$(){const{mobileCheckoutSdk:e,embed:t}=b(),n=A$(),r=T$(),o=Se();return w(()=>!n.value&&!e.enabled&&!t?.isCheckoutKit()?!0:e.enabled&&e.variant.isStandard()||t?.isCheckoutKit()?o.value.currentDetour?.type==="thankYou":!!r?.disclosureEnabled)}function L$(){const{embed:e,checkout:t}=b(),n=!!(e?.platformCategory&&e.platformCategory!=="WEB"),r=e?.platformCategory==="WEB"&&t.configuration.payButton.stickyPayButtonEnabledInWeb,o=n&&t.configuration.payButton.stickyPayButtonEnabledInMobile;return r||o}function vd(){const{checkout:e,embed:t,shopPay:n}=b(),{progressing:r}=Lt(),o=Se(),{submitting:i}=Ft();return w(()=>{if(t?.isFlagshipPartner&&i.value||e.isRedirectingExternally.value||e.checkoutExit.isExiting.value)return!0;const{currentPage:l,plan:c}=o.value,u=l&&c.greenPath[c.greenPath.length-1]?.id===l.id;let d=r.value||n.session.isButtonProgressing.value;return l!==void 0&&(d=d&&!!u),d})}function x$(e={}){const[t,n]=oe(null),[r,o]=oe(null),i=U(null),a=R(l=>{if(i.current?.disconnect(),i.current=null,!window.IntersectionObserver||!l){n(null),o(null);return}const c=new IntersectionObserver(u=>{n(u[0])},e);c.observe(l),i.current=c,o(c)},[e.root,e.rootMargin,e.threshold]);return{entry:t,observer:r,ref:a}}function bP(){const e=Hs(),{checkout:t,embed:n}=b(),r=bb(),{payNowButtonElement:o}=Js(),i=qt(n?.embedder),{entry:a,ref:l}=x$({threshold:.5});F(()=>(l(o??null),()=>l(null)),[o,l]);const c=Je(a?.isIntersecting);return w(()=>!!(!i&&(t.isRedirectingExternally.value||!e.value&&!t.wallets.activeSession.value&&!r.value&&!c.value)))}function PP(e){return e.status==="available"&&e.methods.some(({methodType:t})=>t==="SHIPPING"||t==="LOCAL")}function bj(){const e=Cc();return w(()=>{const t=e.value?.filter(PP);return{shippableDeliveryLines:t?.length?t:void 0}})}function Xi(e){return e?e.status==="unavailable"||e.status==="partial"||e.status==="filled"&&!e.lines.some(PP):!1}function R$({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!Xi(e))return!1;const o=zb(r)?n??t:t;return qi(o)}const M$={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"}};function N$(e,t){return lc((n,r)=>{const o=M$[n.status][r];if(o)return{status:o};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:n.status,action:r})},{status:e})}function D$(e,t){const{deliveryMethodsAddressErrors:n,deliveryMethodTimingSignal:r}=Nt(),{parts:o}=Xe(),{shippingAddress:i}=o,{observability:a,checkout:{wallets:l},checkout:c,shop:{shippingCountries:u}}=b(),d=c.configuration.isAddressDelegationEnabled,p=i.fields.countryCode.value,m=Cy(p,u),{loading:f}=Jt(p),{negotiate:h}=Lt(),{setAddressError:g}=hu(n),y=V(()=>CI(),[]),{resetAddressSuggestions:_}=rR(y,n),P=gu(p),v=O$(e),E=Qg(),C=V(()=>kt(()=>{const T=E({countryCode:i.fields.countryCode.value,zoneCode:i.fields.zoneCode.value});return uq(T)}),[E,i.fields.countryCode,i.fields.zoneCode]),S=U();F(()=>{f||(S.current?.(),S.current=void 0)},[f]);const I=Tc(()=>{const T=i.peek();if(f){S.current=()=>I();return}const A=m(T),L=C.peek(),M=yl(L,A,T);v.peek()!=="addressReplaced"&&(M.size===0?t("addressComplete"):t("addressInvalid"))},QL);o0(i,()=>{t("countryChanged"),i.fields.postalCode.value=void 0,i.fields.zoneCode.value=void 0,i.fields.city.value=void 0,i.fields.address1.value=void 0,i.fields.address2.value=void 0,t("reset")});const k=V(()=>kt(()=>C.value.filter(A=>A!=="countryCode").map(A=>{const L=i.fields[A].value;if(L)return A==="postalCode"?L.replace(/[^a-z0-9]/gi,"").toLowerCase():L.toLowerCase()}).join("_")),[i.fields,C]);F(()=>{let T=!1;const A=e.value.status;return(A==="initial"||A==="empty")&&I(),k.subscribe(()=>{if(T){if(l.activeSession.value||v.value==="addressReplaced"||e.value.status==="resetting")return;I()}T=!0})},[l,I,e,v,i,k]),Os(e,({previousState:T,action:A,nextState:L})=>{if(a.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:T.status,action:A,nextState:L.status}),L.status==="initial"&&I(),L.status==="loading"&&r.peek()===0&&(r.value=Date.now()),A==="reset"){const N=i.peek();for(const O of Object.keys(N))O==="phone"&&Sl(N.phone)||g(O,void 0);_()}const M=Gd(e);if(A==="addressComplete"||A==="reset"||A==="addressReplaced"||A==="addressInvalid"&&(T.status==="negotiated"||d)){if(d){const N=i.peek(),O=m(N);if(O.size>0){for(const[D,B]of O)n[D].peek()===void 0&&g(D,{message:B,origin:"client",type:"inline-validation"});t("addressInvalid"),t("negotiationResolved");return}else for(const[D,B]of Object.entries(n)){const z=B.peek();z&&typeof z=="object"&&z.origin==="client"&&z.type==="inline-validation"&&g(D,void 0)}}
39a.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),h({silenceViolations:["all"],include:[],fieldsToResolve:["deliveryNext"],onComplete(N){const O=M!==Gd(e);if(a.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:N.status,stale:O}),!O){if(N.status==="stale"||N.status==="invalid"){t("negotiationResolved");return}if(!(A==="reset"||!N)&&(N.status==="success"||N.status==="error")&&"violations"in N){const D=N.negotiated.deliveryNext?.status==="filled";if(A!=="addressReplaced"){const x=SP(n);if(yl(C.peek(),x,i.peek()).size>0)return t(D?"negotiationResolved":"addressInvalid")}const B=P("shipping_address",N.violations),z=A==="addressReplaced"?B:yl(C.peek(),B,i.peek());for(const[x,W]of z)n[x].peek()===void 0&&g(x,W);D||z.size===0?t("negotiationResolved"):t("addressInvalid")}}}}).catch(()=>t("negotiationResolved"))}})}function O$(e){const t=we();return Os(e,({action:n})=>{t.value=n}),t}const F$=["phone","company","firstName","lastName"];function yl(e,t,n){const r=new Map;for(const[o,i]of t)if(!(o==="coordinates"||o==="name"||o==="oneTimeUse"||o==="handle")&&e.includes(o)){if(F$.includes(o)&&(!n[o]||n[o]?.length===0))continue;r.set(o,i)}return r}const SP=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const o=r.peek();Hh(o)&&o.type==="error"&&t.set(n,o.textValue)}return t};function B$({children:e}){const{current:t,parts:n}=Xe(),{deliveryMethodsAddressErrors:r,deliveryMethodTimingSignal:o,deliveryMethodDeltaSignal:i}=Nt(),a=t0(),{observability:l,embed:c,events:u}=b(),d=V(()=>{const E=t.fields.deliveryNext.peek()?.status==="filled"?"negotiated":"initial";return N$(E,l)},[t.fields.deliveryNext,l]),p=R(v=>{d.value=v},[d]),m=U(!1);c?.isFlagshipPartner&&!m.current&&(m.current=!0,u.addEventListener("embed:address-replace",()=>{p("addressReplaced")}));const f=U(!1);f.current||(f.current=!0,u.addEventListener("wallet:address-replace",()=>{p("addressReplaced")})),D$(d,p);const h=Qg(),g=w(()=>{const v=d.value.status;if(v==="resetting")return{status:"empty"};if(v==="loading")return{status:v};const E=t.fields.deliveryNext.value,C=Xi(E),S=E?.status==="filled"&&!C,I=n.shippingAddress.fields.countryCode.value,k=n.shippingAddress.fields.zoneCode.value,T=h({countryCode:I,zoneCode:k}),A=zb(T),L=A?n.shippingAddress.peek():n.shippingAddress.value,M=C&&(v==="initial"||v==="empty"&&!A&&SP(r).size===0);return v!=="negotiated"&&!S&&!M?{status:v}:E?C?{status:R$({deliveryNext:E,proposedAddress:L,negotiatedAddress:t.fields.shippingAddress.peek(),reloadStrategy:T})?"error":"empty"}:E.status==="filled"&&S?{status:"filled",deliveryLines:E.lines}:{status:"error"}:{status:"empty"}}),y=we(g.peek());e0(g);const _=U();F(()=>()=>{_.current&&clearTimeout(_.current)},[]),ze(()=>{const v=g.value;if(_.current&&(clearTimeout(_.current),_.current=void 0),v.status==="loading"&&(_.current=setTimeout(()=>{const C=t.fields.deliveryNext.peek(),S=C?.status==="filled"&&!Xi(C);l.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:C?.status??"unknown",hasShippingMethods:S}})},3e4)),v.status==="filled"){const S=v.deliveryLines.flatMap(k=>k.status==="available"?k.methods:[]).find(k=>k.methodType==="SHIPPING"&&k.deliveryPromiseProviderApiClientId)?.deliveryPromiseProviderApiClientId,I=o.peek();if(S&&I>0){const k=Ve(S),A=Date.now()-I;a(A,Number(k)),i.peek()===0&&(i.value=A)}}const E=v.status==="empty"&&d.peek().status==="negotiated"&&Xi(t.fields.deliveryNext.peek());(v.status==="error"||v.status==="filled"||E)&&(o.value=0)});const P=V(()=>({uiStateSignal:g,initialUiStateSignal:y,dispatch:p}),[p,g,y]);return s(Xg.Provider,{value:P,children:e})}function EP({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&n==="/thank-you"&&!qt(e)}var ut=(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))(ut||{});const CP={[ut.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[ut.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[ut.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[ut.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[ut.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[ut.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[ut.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[ut.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[ut.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function V$(e){return CP[e].isAddressProblem}function kP(e){return CP[e].isUnpurchasable}function U$(){const{negotiate:e}=Lt(),t=ie().merchandiseLines,n=q().merchandiseLines,{observability:r}=b(),o=R(i=>{const a=t.value;t.value=a.filter(({stableId:l})=>!i.includes(l))},[t]);return R(async i=>{const a=new Map((n.value?.lines??[]).map(c=>[c.stableId,c])),l=i.reduce((c,{problem:u,line:d})=>{if(V$(u.type))return c;const p=a.get(d.stableId);return(!p||p.quantity===0||kP(u.type))&&c.push(d.stableId),c},[]);try{l.length>0&&(o(l),await e({}))}catch(c){r.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:c,unavailableMerchandiseIds:l})}},[n,o,e,r])}function z$(e){const t=fR(e),n=pR(e),r=mR(e),o=Ly(e),i=xy(e),a=Ty(e),l=hR(e),c=[t,n,r,o].filter(
39Boolean).length>1;return a||c?l?ut.QuantityChange:ut.OutOfStock:t?ut.Unavailable:n?ut.UnpurchasableB2B:r?ut.Unpurchasable:o?ut.Unshippable:i?ut.Unfulfillable:l?ut.QuantityChange:ut.Unknown}function H$(e){return e.quantity>0}function q$(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:ut.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}function IP(e){return kP(e)?e:ut.OutOfStock}function G$(e,t,n){if(!n&&t)return{type:IP(e)}}function W$(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:ut.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}function $$(e,t,n){const{proposed:r,negotiated:o}=e,i=q$(r,o),a=W$(r,o),l=G$(t,r,o),c=r??o;return n.has(c.stableId)?{line:c,problem:{type:t===ut.Unfulfillable?ut.Unfulfillable:ut.Unshippable}}:o?.quantity===0?{line:c,problem:{type:IP(t)}}:a?{line:c,problem:a}:i?{line:c,problem:i}:l?{line:c,problem:l}:{line:c,problem:{type:ut.OutOfStock}}}function Y$(){const{checkout:e}=b(),t=q(),{value:n=[]}=t.allViolations,{value:r}=t.merchandiseLines,o=qe("merchandiseLines").value,i=ie().merchandiseLines.value,a=V(()=>r?.lines??[],[r]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=oe(()=>z$(n)),[u]=oe(i),d=V(()=>Zu(u,n),[u,n]),p=V(()=>Lb(u,a,n).map(g=>$$(g,c,d)),[u,a,n,c,d]),m=a.filter(({stableId:g})=>!d.has(g)).some(H$)&&l,f=!m,h=u.some(g=>{const y=a.find(({stableId:_})=>_===g.stableId);return!y||y.quantity===0||d.has(g.stableId)});return{type:c,lineItems:p,loading:o,cartEmpty:f,hasLineItemsLeftInCart:m,hasUnavailableMerchandise:h,unshippableMerchandiseIds:d}}const j$="/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",K$="pJt3c",J$="yfbTW",yf={ShopName:K$,SquareLogo:J$};function nc({width:e}){const{header:{logo:t}}=Fe(),{embed:n,i18n:r,shop:o,shopPay:i,source:a,url:l,router:c}=b(),u=Er(),d=fo(),{isAppLayout:p}=ud(),m=c_(),{brandSettings:f}=o,{lineItems:h}=Y$(),g=U$();if(i.visibility.showShopPayBrandedLogo||Vn(c.currentUrl.value.search))return s("img",{src:j$,height:30,width:72,alt:""});let y=s("span",{className:yf.ShopName,children:s(ln,{level:1,children:s(jt,{level:1,accessibilityRole:"presentation",display:"inline",children:o.name})})});n?.isFlagshipPartner?y=s(ee,{direction:"inline",gap:"small-200",alignItems:"center",children:[f?.squareLogo?.url&&s(Ob,{alt:f.squareLogo.altText||o.name,src:f.squareLogo.url,className:yf.SquareLogo,borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=s(w_,{width:e}));const _=a.type!=="simulated"&&!st(a)&&!p&&!n;if(!(o.hasStorefront&&(_||u)))return y;const E=(o.previewReturnUrl?o.previewReturnUrl:void 0)??t?.link??a.headerLogoUrl??l.storefront(),C=r.translate("editor.navigation.store_logo_accessibility_label"),S=()=>{m.includes(E)&&c.navigate(k=>{const T=new URL(k);return T.searchParams.set("ce_redirect",E),T})},I=s("span",{ref:d("logo"),children:s(dt,{href:E,tone:"monochrome",textDecoration:"none",onClick:async()=>{u?S():h.length>0&&await g(h)},display:"block",children:[y,s($,{accessibilityVisibility:"exclusive",children:C})]})});return t?.image&&t?.maxWidth?s(be,{maxInlineSize:`${t.maxWidth}px`,children:I}):I}const AP=He({displayName:"AccountAvatar",suspense:!1,load:()=>lt(()=>Be(()=>import("./7a21cd4e.BAUMPiSr.js").then(e=>e.A),__vite__mapDeps([213,1,2,3,4,5,214]))),useError:Ou("AccountAvatar")}),X$={small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},Q$=200,Z$=1.5,e9={base:kI(0,Q$,Z$,"ms")},t9={easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},n9={borderRadius:X$,color:wI,transitionDuration:e9,transitionTimingFunction:t9,fontFamily:AI,fontSize:II,letterSpacing:TI,lineHeight:LI};function r9(){const e=Sr(),{router:t,userEvents:n,shop:r,source:o,checkout:i,i18n:a}=b(),l=xn(),c=o.type==="simulated",u=fo(),{header:{cartLink:{contentType:d="icon",image:p}={}}}=Fe(),m=mo(),f=t.currentUrl.value.normalizedPath==="/shoppay_login",h=()=>{if(i.identity.current.value==="shopPay"){if(c||f)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(o,i,r),action:"return_to_cart"}});return}l("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0})},g=a.translate("general.cart");let y;if(d==="text")y=g;else if(d==="image"&&p?.src){const _=xI(e.customProperties.value.fontSize?.base??n9.fontSize.base),P=VL*_;y=s("img",{src:p.src,alt:g,height:P,className:Y(bt({display:"block"}))})}else y=s(Le,{type:"bag",size:"large"});return s("span",{ref:u("cart"),children:s(dt,{href:m.value?.toString(),id:"cart-link",onClick:h,accessibilityLabel:d==="icon"?g:void 0,display:"block",children:y})})}function TP({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const o=n&&!r?s(be,{blockSize:"0px",children:s(be,{transform:"translate(0px, -50%)",children:n})}):n,i={start:{columns:o?"minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:s(G,{children:[t,o]})},center:{columns:o?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:s(G,{children:[o&&s("div",{style:{visibility:"hidden"},children:o}),s(be,{inlineAlignment:"center",children:t}),o]})},end:{columns:o?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:s(G,{children:[o,s(be,{inlineAlignment:"end",children:t})]})}};return s(gt,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function o9(){const{checkout:e,router:t}=b(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:o,maxWidth:i}={}}}=Fe(),a=u_(),l=Uv(),{currentDetour:c}=Se().value,u=e.configuration.visibility.showHeader&&!(e.configuration.isUniversalCheckoutFinalizer&&c?.type==="thankYou");let d="purchase.checkout.header.render-after";c?.type==="thankYou"&&(d="purchase.thank-you.header.render-after");const p=it(d),m=o!=="hidden"||Vn(n.search),f=m?s(nc,{width:i}):s("div",{});let h;return a.value?h=s(r9,{}):l.value&&(h=s(AP,{})),s(ee,{gap:"large-100",children:[(h!=null||m)&&u&&s(TP,{alignment:r,logo:f,endAccessory:h,endAccessoryAffectsBlockSize:a.value||!m}),s(Yt,{customizations:p,gap:"base"})]})}const wP=He({displayName:"ShopPayCheckout",load:()=>lt(()=>Be(()=>import("./461aedcc.hHgoGBmD.js"),__vite__mapDeps([215,1,2,3,4,5,143,149,94,6,142,8,83,79,188,130,131,82,62,71,7,9,216])).then(e=>e.ShopPayCheckout))});function i9({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:o}}=b();return qh({isShopPay:n.current.value==="shopPay",isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?s(wP,{simulated:o,children:e}):s(G,{children:e})}const s9="ghhXm",a9={OnePageRouteContent:s9};function l9({children:e}){const{checkout:t}=b(),n=vd(),r=bP(),o=t.checkoutExit.isExiting.value,i=lb(),a=s(i9,{children:[s(Pb,{}),s(vb,{}),s(Xu,{active:n.value,announceProcessing:!o,showLoadingIndicator:!o&&r.value,loadingIndicatorVariant:"progressbar",children:s(c9,{routeC
39ontentInert:i.value?!0:void 0,children:e})}),s(tz,{})]});return s(Ru,{children:s(Ib,{children:s(B$,{children:s(BU,{children:a})})})})}function c9({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:r}={}},cartLink:{visibility:o}}=Fe(),{checkout:i,mobileCheckoutSdk:a,shop:l,shopPay:c,source:u,embed:d,router:p}=b(),m=p.currentUrl.value,f=Vn(m.search),h=L$(),g=i.configuration.showFooter,{currentDetour:y}=Se().value,_=w$().value,v=Vs()&&_&&EP({embedder:d?.embedder,isThankYouDetour:y?.type==="thankYou",normalizedPath:m.normalizedPath});let E="purchase.checkout.header.render-after",C="purchase.checkout.footer.render-after",S="purchase.checkout.chat.render";y?.type==="thankYou"&&(E="purchase.thank-you.header.render-after",C="purchase.thank-you.footer.render-after",S="purchase.thank-you.chat.render");const I=it(E),k=it(C),T=it(S),A=J_(),L=ho(),M=YV(),{isAppLayout:N}=ud(),O=N&&d?.embedder==="google"&&vc({embedder:d.embedder,shop:l})&&M.value&&y==null,D=wt(),B=u.type==="shopPayExternal",z=!i.configuration.visibility.showHeader,x=i.configuration.isUniversalCheckoutFinalizer&&y?.type==="thankYou",W=B?c.visibility.showOnePageShellHeader:x?I.length>0&&D.value:!(d?.isFlagshipPartner&&!qt(d.embedder)&&d.embedder!=="shopApp"||(z||n==="hidden"&&!f&&o==="hidden")&&!a.enabled&&!d?.isCheckoutKit()&&(I.length===0||!D.value)||N&&(!a.enabled||a.variant.isStandard()||d?.isCheckoutKit())),X=o9,Z=q().buyerIdentity.value?.customerProfile,ce=Z==null||Z.__typename!=="CustomerProfile",j=y?.type==="thankYou"||ce&&!L.value.payment&&!L.value.delivery,Q=V(()=>a.enabled?a.variant.isStandard():d?d.isCheckoutKit()?!0:!h&&(g||k.length>0):(r!=="hidden"||k.length>0&&D.value)&&!N&&!f,[d,h,g,a,r,k.length,N,f,D.value]),H=y?.type!=="shopPayLogin"&&j&&_&&!d?.isFlagshipPartner,J=c.visibility.shouldForceOnePageShellContentAsAppLayout,he=()=>{if(N||J)return"appLayout"},ne=s(G,{children:[s(v2,{}),s(be,{className:O?a9.OnePageRouteContent:void 0,inert:t,children:e})]});return s(G,{children:[s(Eb,{}),s(Nu,{banner:s(j_,{}),announcement:y?.type==="thankYou"&&A.length>0?s(K_,{}):void 0,header:W?s(X,{}):void 0,disclosure:H&&!v?s(ab,{}):void 0,disclosureOrderSummary:v?void 0:s(ps,{monorailSection:"top_order_summary"}),main:ne,orderSummary:s(ps,{}),footer:Q?s(Ju,{}):void 0,blockSize:he(),minMobileViewportSize:O}),s(yb,{}),s(Cb,{}),s(kb,{}),s(Yt,{customizations:T,transformComponents:u9,render:ae=>s(be,{minBlockSize:`@media (inline-size >= medium) 0, ${yd}px`,children:ae})})]})}const u9=Sb(_P);function d9(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:o}){const i=[Te.AmazonPay,Te.BuyWithPrime].some(c=>!!RI(e,c)),a=t.some(c=>c.method.type==="walletsPlatformPaymentMethod"&&c.method.name===Te.BuyWithPrime),l=n?.some(({key:c,value:u})=>c===vh&&u===Te.BuyWithPrime);return!!(i||a||r||l||o)}function p9(){const{router:e}=b(),t=We().inMemoryAmazonPayParts.serializedAmazonParams;return R(n=>{const{keep:r,only:o}=n??{},i=e.currentUrl.value.href,a=new URL(i);zh.filter(l=>r?!r.includes(l):o?o.includes(l):!0).forEach(l=>{a.searchParams.delete(l)}),MI(t,l=>a.searchParams.get(l)),i!==a.href&&e.navigate(a.href,{replace:!0})},[e,t])}function m9(){return cP()[NI]==="true"}const f9=He({load:()=>Be(()=>import("./56bd1136.D2dAjA3P.js"),__vite__mapDeps([217,1,2,3,4,5,197,44,55,218,219,202,6,7,8,9,220])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>s(g9,{}),useError:h9});function h9(e){const{wallets:t}=b().checkout,{buyerDetails:n,buttonStatus:r,sdkStatus:o}=We().inMemoryAmazonPayParts,{paymentLines:i}=ie(),a=p9(),l=_i();F(()=>{if(!e)return;r.value={status:"error"},o.value={status:vi.Error},n.value={loading:!1,error:!0,details:void 0},a();const c=t.escalatedWallet.value,u=c===Te.AmazonPay||c===Te.BuyWithPrime,d=i.value.some(p=>p.method.type==="walletsPlatformPaymentMethod"&&(p.method.name===Te.AmazonPay||p.method.name===Te.BuyWithPrime));u?(l({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):d&&(i.value=i.value.filter(p=>p.method.type!=="walletsPlatformPaymentMethod"||p.method.name!==Te.AmazonPay&&p.method.name!==Te.BuyWithPrime))},[e,n,r,a,i,l,o,t])}function g9(){const{buyerDetailsContentLoaded:e}=We().inMemoryAmazonPayParts;return F(()=>{e.value=!1},[e]),null}function LP(){const e=q().paymentMethods,{attributes:t,externalDeliveryIds:n,paymentLines:r}=ie(),o=m9(),i=wt();return s(ve,{when:()=>i.value&&d9(e.value,r.value,{attributes:t.value,externalDeliveryIds:n.value,hasAmazonCancelledParam:o}),children:s(f9,{})})}function y9(){const{i18n:e}=b(),t=Se(),n=w(()=>t.value.currentDetour?.label??t.value.currentPage?.label??e.translate("general.page_title"));return s("h1",{className:bt({screenReaders:"only"}),children:n})}function v9({title:e,cost:t}){return s(G,{children:[e,"·",t]})}function vf({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=b();return s(ia,{blockPadding:"base",children:[s(vn,{primary:!0,children:[s($,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map(({title:r,lineAmount:o})=>s(ee,{direction:"inline",gap:"small-400",alignItems:"center",children:s(v9,{title:s($,{size:"small",children:r}),cost:s($,{size:"small",type:"strong",children:n.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})})})},r))]}),s(vn,{inlineAlignment:"center",children:s($e,{type:"small",textAlign:"end",children:s($,{type:"strong",children:e})})})]})}const _9="_8A9rc",b9="TeeUi",P9="DQ7YO",Qi={TooltipInvoker:_9,TaxSegment:b9,UpdatedLabel:P9},_f=tt("TaxRecalculationLineTooltip"),S9="→";function E9({taxRecalculation:e}){const{i18n:t}=b(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=Ye(void 0,_f),o=Ye(void 0,_f),i=e.beforeLines,a=e.afterLines;return i.length===0&&a.length===0?null:s(ia,{blockPadding:"base",children:[s(vn,{primary:!0,children:[s($,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),s($e,{type:"small",children:[s("span",{className:Qi.TaxSegment,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",s(bf,{lines:i,tooltipId:r,percentFormatter:n,i18n:t})," ",s("span",{"aria-hidden":"true",children:S9})]})," ",s("span",{className:Qi.TaxSegment,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",s(bf,{lines:a,tooltipId:o,percentFormatter:n,i18n:t})]})]})]}),s(vn,{inlineAlignment:"center",children:s($e,{type:"small",textAlign:"end",children:s($,{type:"strong",children:s("span",{className:Qi.UpdatedLabel,children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function bf({lines:e,tooltipId:t,percentFormatter:n,i18n:r}){if(e.length===0)return s(G,{children:r.translate("payment.order_edit_banner_no_taxes_label")});if(e.length===1)return s(G,{children:Pf(e[0],n)});const o=e.map(l=>Pf(l,n)).join(" + "),i=e.filter(l=>l.rate!=null);if(i.length===0)return s(G,{children:o});const a=i.reduce((l,c)=>l+(c.rate??0),0);return s(G,{children:[s(Ln,{interestFor:t,className:Qi.TooltipInvoker,children:n.format(a)}),s(Cn,{id:t,children:o})]})}
39function Pf(e,t){return e.rate==null?e.title:`${e.title} ${t.format(e.rate)}`}function C9(){const{i18n:e,checkout:t}=b(),n=dc(),r=t.proposal.facts.orderNumber,o=t.proposal.facts.delivery??[],i=w(()=>o.length>0?o[0].lines.filter(f=>f.deliveryChange==="ADDED"):[]),a=w(()=>o.length>0?o[0].lines.filter(f=>f.deliveryChange==="REMOVED"):[]),l=w(()=>(t.proposal.facts.merchandiseLines??[]).filter(f=>f.quantityChange&&f.quantityChange.delta)),c=w(()=>{const f=t.proposal.facts.taxRecalculation;return f&&(f.beforeLines.length>0||f.afterLines.length>0)?f:void 0}),u=w(()=>l.value.length>0||i.value.length>0||a.value.length>0||!!c.value),d=w(()=>{if(!(!n.value||!u.value))return{formattedAmountOwed:e.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"})}}),p=w(()=>i.value.length>0?i.value:void 0),m=w(()=>a.value.length>0?a.value:void 0);return s(ve,{when:d,children:({formattedAmountOwed:f})=>s(la,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:f}),collapsible:!0,children:[s($,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:r?`#${r}`:""})}),s(zt,{blockSize:"base"}),s(Jr,{}),s(xb,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[s(Rb,{hidden:!0,children:[s(mr,{hidden:!0,children:e.translate("order_summary.product_image_label")}),s(mr,{hidden:!0,children:e.translate("order_summary.description_label")}),s(mr,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),s(Mb,{children:[s(Zn,{each:l,getKey:({title:h,variantTitle:g})=>`${h}${g?`-${g}`:""}`,children:({quantity:h,quantityChange:g,image:y,title:_,variantTitle:P})=>s(ia,{blockPadding:"base",children:[s(vn,{inlineAlignment:"start",children:s(Qs,{alt:y?.altText??"",size:"base",src:y?.url})}),s(vn,{primary:!0,children:[s($,{size:"base",type:"strong",children:_}),P?s($,{color:"subdued",size:"small",children:P}):null]}),g&&g.delta&&g.type?s(vn,{inlineAlignment:"center",children:s(k9,{remainingQuantity:h,delta:g.delta,type:g.type})}):null]})}),s(ve,{when:p,children:h=>s(vf,{deliveryLines:h,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),s(ve,{when:m,children:h=>s(vf,{deliveryLines:h,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),s(ve,{when:c,children:h=>s(E9,{taxRecalculation:h})})]})]})]})})}function k9({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=b();if(t===0)return null;const o=e===0,i=e+t;let a;switch(n){case"INCREMENTED":a=r.translate("payment.order_edit_banner_items_added",{count:t});break;case"DECREMENTED":a=r.translate("payment.order_edit_banner_items_removed.with_quantities",{quantity:i,delta:t});break;case"REMOVED":a=r.translate("payment.order_edit_banner_items_removed.in_full");break;case"RETURNED":a=o?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":a=o?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 s($e,{type:"small",textAlign:"end",children:s($,{type:"strong",children:a.toUpperCase()})})}const xP={current:void 0};function I9({active:e,breadcrumbs:t}){const{i18n:n}=b(),r=fo(),{buyerJourney:{alignment:o}={}}=Fe();return s(Zs,{section:"breadcrumbs",children:s(Si,{section:"breadcrumbs",children:s(be,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:o,children:s(ee,{direction:"inline",gap:"small-200",accessibilityRole:"ordered-list",children:t.map(({id:i,to:a,disabled:l,content:c},u)=>{const d=t.length!==u+1,p=e===i,f=!p&&!l?s($,{size:"small",ref:r(i),children:s(dt,{href:a,textDecoration:"none",children:c})}):s($,{color:p?void 0:"subdued",type:p?"strong":void 0,size:"small",children:c});return s(ee,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:p?"step":void 0,children:[f,d&&s(Le,{type:"chevron-right",size:"small-200"})]},i)})})})})})}function A9(){const{i18n:e,router:t}=b(),n=Xe(),{currentPage:r,plan:{greenPath:o}}=Se().value,i=mo(),a=u_(),l=n.current.value,c=t.currentUrl.value.normalizedPath,u=V(()=>o.filter(f=>f.skipOverPage?!f.skipOverPage(l):!0),[o,l]),d=u.find(f=>f.route===c)??r,p=V(()=>{const f=u.findIndex(h=>h.id===d?.id);return[...i.value&&a.value?[{id:"cart",to:i.value.toString(),content:e.translate("general.cart"),disabled:!1}]:[],...u.map((h,g)=>({id:h.id,to:h.route,content:h.label,disabled:d?g>f:!1}))]},[i.value,a.value,e,u,d]),m=d?.id;return xP.current={ids:p.map(({id:f})=>f).join(","),activeId:m,showCartLink:a.value,hasCartUrl:!!i.value},{breadcrumbs:p,activeBreadcrumb:m}}function T9(){return Ht(i_)}function w9(){const{paymentLines:e}=ie();return w(()=>{const t=Pt(e.value,"APPLE_PAY");return t?Th(t):!1})}function L9(){const{checkout:e,observability:t}=b(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:i,inMemoryApplePayParts:{asPaymentMethod:a,paymentSheetError:l}}=We(),c=ji(DI()),u=ji(hP()),d=w9(),{paymentLines:p}=ie(),m=Pt(p.value,"GOOGLE_PAY"),f=!!(m&&OI(m)),h=ji($D({shouldResetCustomerInfo:!1})),g=U(new Set),y=oP(r?.status==="failed"&&r.failure.type==="payment"&&n?r?.failure:void 0);F(()=>
39{if(r?.status==="processing"||r?.status==="polling_for_order")return;const _=o.value,P=d.value&&_!=="APPLE_PAY",v=f&&_!=="GOOGLE_PAY",E=!_&&!P&&!v;if(r){if(g.current.has(r.id))return;t.leaveErrorBreadcrumb("[useHandleReceiptErrorForWallets] Adding to handled receipt ids",{receiptId:r.id,isNonWalletSubmission:E}),g.current.add(r.id)}if(E)return;const C=_==="APPLE_PAY"||P,S=_==="GOOGLE_PAY"||v;if(C&&l.value?.type==="payment_cancelled_while_processing"&&(l.value=void 0),r?.status!=="failed"){i.value=void 0;return}C&&u.current(),v&&h.current(),r.failure.type==="payment"&&(_||P||v)&&!a.value&&(t.log("useHandleReceiptErrorForWallets_selecting_first_available_payment_method","selecting first available payment method",{walletUsedForSubmission:_,applePaySFRPaymentFailure:P,googlePaySFRPaymentFailure:v}),c.current()),(C&&!a.value||S)&&(i.value=y),_==="GOOGLE_PAY"&&(o.value=void 0)},[t,r,i,o,a,l,u,h,y,c,d.value,f]),F(()=>function(){i.value=void 0},[i])}function x9(){const{checkout:e,router:t}=b(),n=t.currentUrl.value,{header:{alignment:r="start",logo:o}}=Fe(),i=Uv(),{currentDetour:a}=Se().value;let l="purchase.checkout.header.render-after";a?.type==="thankYou"&&(l="purchase.thank-you.header.render-after");const c=it(l),u=e.configuration.isUniversalCheckoutFinalizer&&a?.type==="thankYou",d=!u&&(o?.visibility!=="hidden"||Vn(n.search)),p=!u&&i.value,m=d||p;let f;return p?f=s(TP,{alignment:r,logo:d?s(nc,{width:o?.maxWidth}):s("div",{}),endAccessory:s(AP,{}),endAccessoryAffectsBlockSize:!d}):d&&(f=s(be,{inlineAlignment:r,children:s(nc,{width:o?.maxWidth})})),s(G,{children:[f,c.length>0&&s(G,{children:[m&&s(zt,{blockSize:"@media (inline-size >= medium) base, large-400"}),s(Yt,{customizations:c,gap:"base"})]})]})}function R9({children:e}){return s(Ru,{children:s(Ib,{children:[s(M9,{}),s(vb,{}),s(Pb,{}),s(N9,{children:s(D9,{children:e})})]})})}function M9(){return BA(),L9(),null}function N9({children:e}){const{checkout:t}=b(),n=vd(),r=bP(),o=t.checkoutExit.isExiting.value;return s(Xu,{active:n.value,announceProcessing:!o,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!o&&r.value,children:e})}function D9({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=Fe(),{checkout:r,embed:o,router:i}=b(),{currentDetour:a}=Se().value,c=Vs()&&EP({embedder:o?.embedder,isThankYouDetour:a?.type==="thankYou",normalizedPath:i.currentUrl.value.normalizedPath});let u="purchase.checkout.header.render-after",d="purchase.checkout.footer.render-after",p="purchase.checkout.chat.render";a?.type==="thankYou"&&(u="purchase.thank-you.header.render-after",d="purchase.thank-you.footer.render-after",p="purchase.thank-you.chat.render");const m=it(u),f=it(d),h=it(p),g=J_(),y=r.configuration.isUniversalCheckoutFinalizer&&a?.type==="thankYou",_=m.length>0||!y&&t!=="hidden",P=x9,v=n!=="hidden"||f.length>0,E=gO(i),C=i.currentUrlMatches("/no-address-location"),S=d_(i),I=i.currentUrlMatches("/shoppay"),k=md(),{activeBreadcrumb:T,breadcrumbs:A}=A9(),L=E||C||S||I||A.length<2||k.value,M=s(O9,{children:e});return s(G,{children:[s(Eb,{}),s(Nu,{banner:s(j_,{}),announcement:a?.type==="thankYou"&&g.length>0?s(K_,{}):void 0,header:_?s(P,{}):void 0,disclosure:c?void 0:s(ab,{}),disclosureOrderSummary:c?void 0:s(ps,{monorailSection:"top_order_summary"}),main:M,orderSummary:s(ps,{}),footer:v?s(Ju,{}):void 0,buyerJourney:L?void 0:s(I9,{active:T,breadcrumbs:A})}),s(yb,{}),s(Cb,{}),s(kb,{}),s(Yt,{customizations:h,transformComponents:V9,render:N=>s(be,{minBlockSize:`@media (inline-size >= medium) 0, ${yd}px`,children:N})})]})}function O9({children:e}){const{checkout:t}=b(),{blocking:n}=T9(),r=vd();return s(G,{children:[s(y9,{}),s(Xu,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[s(LP,{}),s(ee,{gap:"base",children:[s(tc,{section:"toast"}),s(tc,{section:"top"}),s(C9,{}),s(B9,{children:e})]})]})]})}function F9({condition:e,children:t}){return e?s(Ir,{accessibilityRole:"presentation",children:t}):s(G,{children:t})}function B9({children:e}){const{checkout:t,router:n,shop:r}=b(),{pending:o}=Lu(),i=n.currentUrlMatches("/shipping"),a=n.currentUrlMatches("/payment"),l=n.currentUrlMatches("/review"),c=n.currentUrl.value.normalizedPath==="/review",u=i||a||l,d=c&&r.hasFlagEnabled(FI),p=q(),{value:m}=p.deliveryNext,f=t.proposal.facts.delivery??[],h=br(m)||f.length>0&&f.every(C=>C.pickupAddress!==null),{value:g}=dc(),y=qe("total").value,{value:_}=p.paymentLines,P=qe("paymentLines").value,v=V(()=>l?y||P||(g?.amount?g.amount>0:_?.lines&&_.lines.some(C=>C.cost?.amount)):!1,[l,g,_,y,P]);return s($i,{style:d?void 0:o,children:s(F9,{condition:u,children:s(G,{children:[u&&s(G,{children:[s(Do,{showAddress:!h,showPayment:v}),s(zt,{blockSize:"large-400"})]}),s(be,{children:e})]})})})}const V9=Sb(_P);function U9(e){const t=q().buyerIdentity,r=e?.countryCode&&fu.includes(e.countryCode)?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"},o=Je(Gs(e,r));return w(()=>
39{if(t.value?.purchasingCompany)return o.value})}function Pj(){const{billingAddressOption:e,shippingAddress:t}=ie(),{checkout:n}=b();ze(()=>{(!n.isShippingRequired.value||t.value.oneTimeUse)&&(e.value="custom")})}function Sj(){const{billingAddressOption:e,paymentLines:t}=ie(),{shop:n,source:r,checkout:o}=b(),i=q().buyerIdentity.value?.purchasingCompany,a=q(),{value:l}=a.deliveryNext,c=qe("deliveryNext").value;F(()=>{const u=t.value[0],d=l;if(c||!d||d.status!=="filled"||!u)return;const p=br(d),m=qr(d);if(p||m)return;const f=!p&&o.isShippingRequired.value;Gh({shopRequireMatchingShippingAndBilling:!!n.requireMatchingShippingAndBilling,selectedPaymentMethodType:u?.method.type,isShippingRequired:f,isOrderSession:st(r),isB2B:!!i,isPickupPointDeliveryMethod:m})&&e.value!=="shipping"&&(e.value="shipping")},[t.value,l,c,o.isShippingRequired,n.requireMatchingShippingAndBilling,r,i,e])}function Ej(){const{source:e,checkout:t}=b(),{buyerIdentity:n,deliveryNext:r}=q(),o=co(),i=Cr(),a=tG(),{deliveryLines:l,shippingAddress:c}=ie();return w(()=>{const u=n.value?.purchasingCompany;return(i.value||uo({checkout:t,source:e})?.pickupAddress)&&!o.value||qr(r.value)||l.value.flatMap(p=>p.value.deliveryMethodTypes).includes("PICKUP_POINT")||!st(e)&&!t.isShippingRequired.value&&!u||st(e)&&!a.value||u&&!t.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function Cj(){const{billingAddressOption:e,billingAddress:t}=ie(),n=q(),{checkout:r,source:o}=b();return w(()=>{const i=n.paymentLines.value,a=n.shippingAddress.value,l=r.proposal.facts.delivery??[],c=l.length>0&&l[0].deliveryAddress?l[0].deliveryAddress:void 0,u=n.buyerIdentity.value?.purchasingCompany,d=i?.lines?.find(p=>p.method.type===Kn.CreditCard);return d?d.method.billingAddress:e.value==="billing"&&u?.location.billingAddress?u.location.billingAddress:e.value==="shipping"&&u?.location.shippingAddress?u.location.shippingAddress:e.value==="shipping"?st(o)?c:a:t.value})}function kj(){const t=q().paymentLines?.value?.lines,{hasViolations:n,violations:r}=Ws(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),o=!!Pt(t,"APPLE_PAY");if(!(!n||o))return r.values().next().value.localizedMessage}function z9(){const{shop:e,source:t,checkout:n}=b(),r=Cr(),{paymentLines:o}=ie(),{buyerIdentity:i}=q(),a=_U();return w(()=>{const l=!r.value&&n.isShippingRequired.value,u=o.value[0];return Gh({shopRequireMatchingShippingAndBilling:!!e.requireMatchingShippingAndBilling,selectedPaymentMethodType:u?.method.type,isShippingRequired:l,isOrderSession:st(t),isB2B:!!i.value?.purchasingCompany,isPickupPointDeliveryMethod:a.value})})}function Ij(e){const t=e,n=U9(t),o=t?.countryCode&&fu.includes(t.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"},i=Gs(t,o);return n.value??i}function Aj(){const{shippingAddress:e}=ie(),{checkout:t}=b();return w(()=>(t.proposal.facts.delivery??[])[0]?.deliveryAddress??e.value)}function Tj(){const{negotiate:e}=Lt(),{billingAddress:t,billingAddressOption:n}=ie(),{checkout:{wallets:r}}=b(),o=U(void 0),i=R(()=>{e({include:["billingAddress"]})},[e]),a=n.value==="custom"?t.fields.countryCode.value:void 0;return F(()=>{!r.activeSession.value&&n.value==="custom"&&a&&a!==o.current&&(o.current=a,i())},[n.value,a,i,r.activeSession.value]),i}const H9="b2b",wj="not_b2b";function q9(){const{paymentMethods:e}=q();return RP(e)}function Lj(){const{paymentLines:e}=ie(),t=w(()=>e.value.map(n=>n.method));return RP(t)}function RP(e){const{client:t,checkout:{identity:n},shop:r,shopPay:o,source:i}=b(),a=Yy(),l=oa(),c=r.hasFlagEnabled(BI),u=Es(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:d,paymentMethods:p}=q();return w(()=>{if(!l.value||n.current.value==="shopPay"||u.value)return!1;const m=e.value??[];if(d.value?.purchasingCompany){const f=p.value?.some(y=>y.type==="direct"&&y.name==="shopify_payments"),h=m.some(y=>y.type==="direct"&&(f||r.storeVaultEnabled)),g=m.some(y=>$9(y,p.value??[]));return G9(i,t)&&(h||g)}return r.storeVaultEnabled&&W9({paymentMethods:m,paypalVaultingEnabled:c,negotiatedPaymentMethods:p,buyerIdentity:d,isShopPayAvailableForSellerOfRecord:a,shopPayDismissed:o.userIdentified.value})})}function G9(e,t){return e.type==="cartNext"||e.type==="simulated"||t.unstable_getSerialization("invoiceLoginType")===H9&&Tv(e)}function W9({paymentMethods:e,paypalVaultingEnabled:t,negotiatedPaymentMethods:n,isShopPayAvailableForSellerOfRecord:r,shopPayDismissed:o,buyerIdentity:i}){const a=!o&&!i.value?.customerProfile&&r.value;if(!t&&a)return!1;const l=n.value??[],c=e.map(u=>MP(u,l)).filter(u=>u!==void 0);return t&&c.some(u=>u.type==="wallet"&&u.name==="PAYPAL_EXPRESS"&&u.supportsVaulting)?!0:!a&&c.some(u=>u.type==="direct"&&u.supportsVaulting)}function MP(e,t){if(e.type==="direct")return t.find(n=>n.type==="direct"&&n.paymentMethodIdentifier===e.paymentMethodIdentifier);if(e.type==="wallet"&&e.name==="PAYPAL_EXPRESS")return t.find(n=>n.type==="wallet"&&n.name==="PAYPAL_EXPRESS"&&(!e.walletContent||n.paymentMethodIdentifier===e.walletContent.paymentMethodIdentifier));if(e.type==="bank")return t.find(n=>n.type==="bank"&&n.paymentMethodIdentifier===e.paymentMethodIdentifier)}function $9(e,t){return e.type!=="bank"?!1:"supportsVaulting"in e?e.supportsVaulting:!MP(e,t)?.supportsVaulting||!("selectedToken"in e)||!e.selectedToken?!1:e.selectedType!=="SHOPIFY_PUBLIC_TOKEN"}function Y9(e){if(!e)return!1;const t=!!Pt([e],"PAYPAL_EXPRESS"),n=!!Pt([e],"APPLE_PAY"),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(Kn)];return t||n||!r.includes(e.method.type)}function NP({fullyCoveredByGiftCard:e,fullyCoveredByRedeemablesAndGiftCards:t,paymentRequired:n,identity:r,isOrderSession:o,isPickupSelected:i,isShippingRequired:a,vaultedDelivery:l,isPointOfSaleLayout:c,purchasingCompany:u,paymentLines:d,billingAddressOption:p,paymentMethods:m,orderEditHasPickupAddress:f,isForceBillingAddressFormEnabled:h}){const g=!i&&a,y=d[0],_=y?.method.type==="direct",v=y?.method.type==="wallet"&&y?.method.name==="APPLE_PAY"&&!u,S=y?.method.type==="wallet"&&y?.method.name==="PAYPAL_EXPRESS"&&VI(m)&&!h,I=UI({lines:d,paymentMethods:m,purchasingCompany:u,isBillingAddressForced:h})||!g,k=y?.method.type==="CREDIT_CARD_ON_FILE",T=$h(m).length>0&&k;if(n&&(!I||v||S||T))return"hidden";if(u&&n&&!t)return Y9(y)?"afterPayment":"inContext";if(c)return"afterPayment";if(r==="shopPay"&&l)return"inContext";const L=y?.method.type==="wallet"||y?.method.type==="walletsPlatformPaymentMethod";return!n||e||t?g&&!L&&p==="shipping"?"hidden":"afterPayment":o?f?"afterPayment":a&&_?"inContext":"afterPayment":g&&_?"inContext":"afterPayment"}function j9(e){const t=NP(e),n=t==="beforePayment"||t==="afterPayment",r=e.paymentLines[0]?.method.type,o=r===Kn.CreditCard||r===Kn.PayPal;return n&&!e.billingMustMatchShipping&&!o}function xj(){const e=Wh(),t=Es(),n=oa(),{source:r,checkout:o,shop:i}=b(),a=Cr(),l=ho(),c=fi(),{buyerIdentity:u,paymentMethods:d}=q(),{paymentLines:p,billingAddressOption:m}=ie();return w(()=>NP({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:t.value,paymentRequired:n.value,identity:o.identity.current.value,isOrderSession:st(r),isPickupSelected:a.value,isShippingRequired:o.isShippingRequired.value,vaultedDelivery:l.value.delivery,isPointOfSaleLayout:c.value,purchasingCompany:!!u.value?.purchasingCompany,paymentLines:p.value,billingAddressOption:m.value,paymentMethods:d.value,orderEditHasPickupAddress:!!uo({checkout:o,source:r})?.pickupAddress,isForceBillingAddressFormEnabled:!wc({shop:i,checkout:o,paymentMethods:d.value})}))}function K9(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}function J9({children:e}){const{current:{fields:{buyerIdentity:t,shippingAddress:n}}}=Xe(),{billingAddress:r,billingAddressOption:o,email:i,paymentLines:a,phone:l,shippingAddress:c}=ie(),{checkout:u,embed:d,shop:p,shopPay:m,source:f}=b(),h=d?.isFlagshipPartner,g=q(),y=zI(),_=Cv(),P=Sn(),v=U(!1),E=U(!1),C=vu(Hi),S=Ry(Hi),I=My(Hi),k=q9(),T=oa(),A=Wh(),L=Es(),M=Cr(),N=fi(),O=z9(),{shippingCountries:D}=p,B=Bn(),z=n.value,x=Cy(z?.countryCode,D),W=Je(x),X=U(),Z=HI(),ce=w(()=>wc({shop:p,checkout:u,paymentMethods:g.paymentMethods.value})),j=w(()=>{const J=u.identity.current.value,he=W.value,ne=_.value;if(!v.current){const te=C.violations.value;v.current=te.size>0&&!qI(te)}if(E.current||(E.current=S.violations.value.size>0||u.wallets.escalatedWallet.value!==null&&I.violations.value.size>0),J==="sdkCartHints"&&X.current?.identitySource==="sdkCartHints")return X.current.sections;function ae(te){return te?.__typename==="CustomerProfile"}function ue(){function te(se){return se.shippingAddresses.length===0}function pe(se){return se.shippingAddresses.length===1&&he(se.shippingAddresses[0].address,"shipping").size>0}function ge(se){return ae(se)?!!u.addressManager.shipping.value.selectedAddress.value:!1}function Ie(se){return se!=null&&he(se,"shipping").size===0}function _e(se,Me,Re){return!se&&Me&&Re.shippingAddresses.length>0}function ke(se,Me,Re){return _e(Me,Re,se)||!Me&&!Re?!1:!ge(se)}
39const Ne=n.value,nt=c.value,re=u.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(J){case ma:return re.length>0;case"customerAccount":{const se=t.value;return re.length>0?!0:!(se==null||!ae(se?.customerProfile)||te(se?.customerProfile)||pe(se?.customerProfile)||ke(se.customerProfile,Ne,nt))}case"shopPay":return m.user.addresses.value.length>0||re.length>0;case"sdkCartHints":return u.configuration.isAddressDelegationEnabled?!0:Ee()&&Ie(Ne);case"businessCustomer":return!(P.value&&!ne);default:return!0}}function Ae(){const te=!!g.paymentFlexibilityPaymentTermsTemplate.value;switch(J){case ma:return!1;case"shopPay":{const pe=m.user.paymentMethods.value;return!T.value&&!u.isShippingRequired.value?m.user.addresses.value.length>0:m.enableCardVaulting?pe.some(WI):!0}case"sdkCartHints":return u.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const pe=t.value?.customerProfile;if(st(f)||!GI(pe))return!1;const ge=te||B.value;return Wd({identitySource:J,isOrderSession:st(f),storeVaultEnabled:p.storeVaultEnabled,customerProfile:pe,hasCustomerStoredPaymentMethod:$d({availablePaymentMethods:g.paymentMethods.value??[],paymentMethodHistory:g.paymentMethodHistory?.value??[]})})?!0:!!$h(g.paymentMethods.value).length||ge&&!k.value}case"customerAccount":{if(Wd({identitySource:J,isOrderSession:st(f),storeVaultEnabled:p.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:$d({availablePaymentMethods:g.paymentMethods.value??[],paymentMethodHistory:g.paymentMethodHistory?.value??[]})}))return!0;const pe=Z.value.length===1&&Z.value[0].type==="deferred";return!!(te&&pe)}default:return y.value.length>0?!0:a.value.length>0}}const me=te=>!u.isShippingRequired.value&&!!r.value&&!r.value?.[te]?.trim();function ye(){switch(J){case"shopPay":{const te=m.session.selectedPaymentMethod.value,ge=Ac({managedByMarketsPro:g.managedByMarketsPro.value})&&te?.paymentMethod==="IDEAL",Ie=te?.paymentMethod==="CUSTOM_ONSITE",_e=!m.user.hasCreditCards.value,ke=a.value.some(re=>re.method.type==="direct");if(_e&&ke)return!1;const Ne=me("phone"),nt=me("firstName");return!T.value||nt||Ne||ge||Ie}case"amazonPay":case"buyWithPrime":return v.current;case"applePay":case"googlePay":return E.current;case"payPal":return ce.value?E.current:!0;case"customerAccount":case"businessCustomer":return st(f)?!1:j9({fullyCoveredByGiftCard:A.value,fullyCoveredByRedeemablesAndGiftCards:L.value,paymentRequired:T.value,identity:J,isOrderSession:st(f),isPickupSelected:M.value,isShippingRequired:u.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:N.value,purchasingCompany:!!t.value?.purchasingCompany,paymentLines:a.value,billingAddressOption:o.value,paymentMethods:g.paymentMethods.value,orderEditHasPickupAddress:!!uo({checkout:u,source:f})?.pickupAddress,isForceBillingAddressFormEnabled:!ce.value,billingMustMatchShipping:O.value});default:return!1}}function Ee(){switch(J){case ma:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return m.user.isAuthenticatedUser.value;case"sdkCartHints":return h?!0:i.value.length>0||l.value.length>0;case"customerAccount":return ae(t.value?.customerProfile)&&!t.value.customerProfile.email?!1:i.value.length>0;default:return i.value.length>0}}const Ue={contact:Ee(),delivery:ue(),payment:Ae(),billing:ye()},Ce=X.current;return Ce?.identitySource===J&&K9(Ce.sections,Ue)?Ce.sections:(X.current={identitySource:J,sections:Ue},X.current.sections)}),H=p.hasFlagEnabled($I)?u.vaultedSections.signal:j;return s(Y_.Provider,{value:H,children:[s(LP,{}),e]})}const X9=Qn(function(){const{checkout:{configuration:{layout:t}},router:n}=b();TV();const r=t.isOnePage.value,o=V(()=>[{match:"/processing",render:()=>s(G,{children:[s(G_,{}),s(lr.Preload,{})]})},{match:"/throttle",render:()=>r?s(Yl,{}):s(G,{children:[s(Yl,{}),s(Yi.Preload,{})]})},{match:"/post-purchase",render:()=>s(Sm,{}),renderPrefetch:()=>s(Sm.Prefetch,{})},{render:({children:i})=>s(G,{children:[s(AV,{}),s(J9,{children:r?s(l9,{children:i}):s(R9,{children:i})})]}),children:[{match:"/thank-you",render:()=>s(lr,{}),renderPrefetch:()=>s(lr.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>s(ym,{}),renderPrefetch:()=>s(ym.Prefetch,{})},...r?[{match:"/shoppay_login",render:()=>s(W_,{})},{match:"/review",render:()=>s(vm,{}),renderPrefetch:()=>s(vm.Prefetch,{})},{match:"/no-address-location",render:()=>s(LV,{})},{render:({children:i})=>s(G,{children:[s(q_,{children:i}),s(lr.Preload,{})]}),children:[{match:"/stock-problems",render:()=>s(zV,{})}]}]:[{match:"/information",render:()=>s(G,{children:[s(Yi,{}),s(Do.Preload,{})]}),renderPrefetch:()=>s(Yi.Prefetch,{})},{match:"/shipping",render:()=>s($l,{}),renderPrefetch:()=>s($l.Prefetch,{})},{match:"/payment",render:()=>s(G,{children:[s(Gl,{}),s(lr.Preload,{})]}),renderPrefetch:()=>s(Gl.Prefetch,{})},{match:"/review",render:()=>s(G,{children:[s(Wl,{}),s(lr.Preload,{})]}),renderPrefetch:()=>s(Wl.Prefetch,{})},{match:"/stock-problems",render:()=>s($_,{})},{match:"/no-address-location",render:()=>s(wV,{})},{render:()=>s(xV,{})}]]}],[r]);return uS(n,o)});class Q9 extends If{componentDidCatch(t){this.props.terminalErrorHandler.notify(t,{inErrorBoundary:!0})}render(){return this.props.children||null}}const Z9=32;function _d(e){const t=[];
39return e.__k&&e.__k.forEach(n=>{n&&typeof n.type=="function"?t.push(..._d(n)):n&&typeof n.type=="string"&&t.push(n)}),t}function e7(e){return e.type===G?"Fragment":typeof e.type=="function"?e.type.displayName||e.type.name:typeof e.type=="string"?e.type:"#text"}function jn(e,t){const{props:n}=e,r=e7(e);let o="";for(const a in n)if(n.hasOwnProperty(a)&&a!=="children"){let l=n[a];typeof l=="function"&&(l=`function ${l.displayName||l.name}() {}`),l=Object(l)===l&&!l.toString?Object.prototype.toString.call(l):String(l),o+=` ${a}=${JSON.stringify(l)}`}const i=n.children;return`<${r}${o}${t||i&&Array.isArray(i)&&i.length?`>${t||".."}</${r}>`:" />"}`}const t7=50;function*DP(e,t){let n=e,r=0;for(;n&&r<t7;)yield n,n=t(n),r+=1}const n7=/\(.+\)/;function OP(e,t=10){let n=null;const r=[];for(const o of DP(e.__??null,i=>i.__??null)){const i=typeof o.type=="function"&&o.type!==G;if(i&&!n&&(n=o),r.length<t)if(i){const{displayName:a}=o.type;a&&!n7.test(a)&&r.push(a)}else typeof o.type=="string"&&r.push(o.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
39const r7=/^[a-zA-Z][\w-]{0,63}$/;function ti(e){return!r7.test(e)||/\d{4,}/.test(e)||e.split(/[_-]/).some(n=>n.length>=8&&/[a-zA-Z]/.test(n)&&/\d/.test(n))?null:e}const Sf="https://redacted.invalid";function o7(e){let t;try{t=new URL(e,Sf)}catch{return null}return t.origin==="null"?t.protocol.replace(/:$/,""):t.origin===Sf?null:t.origin}function FP(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const o of DP(n,i=>i.parentElement)){const i=o.getAttribute("id"),a=o.getAttribute("data-testid"),l=i==null?null:ti(i),c=a==null?null:ti(a),u=o.getAttribute("role");if((l||c||u)&&r.push(`${o.localName}${l?`#${l}`:""}${c?`[${c}]`:""}${u?`(${u})`:""}`),r.length>=t)break}return r}const rc=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 i7(e){return rc.has(e)||e.startsWith("aria-")}function Ef(e){const t={};for(const n in e.props)if(Object.prototype.hasOwnProperty.call(e.props,n)){const r=e.props[n];n==="href"&&typeof r=="string"?t[n]=o7(r)??"[redacted]":i7(n)?n==="id"&&typeof r=="string"||n==="data-testid"&&typeof r=="string"?t[n]=ti(r)??"[redacted]":t[n]=r:t[n]="[redacted]"}return{...e,props:t}}function s7(e){if(!e)return;const t=Dt.diffed,n=[];Dt.diffed=r=>{const o=r.__k&&r.__k.some(a=>a&&(!a.type||typeof a.type=="string")),i=_d(r);if(!n.includes(r.type)&&o&&i&&i.filter(a=>a&&!a.type).length>1){const a=[];for(const l of i)l&&!l.type?a.push(`"${l.props}"`):l&&typeof l.type=="string"&&(a.length>1&&(n.push(r.type),console.warn(`Detected adjacent text-nodes ${a.join(", ")}.
40This doesn't need to be actioned on but could lead to causes of hydration mismatches.
41Text-nodes located in
42${jn(r.__,jn(r))}`)),a.length=0)}t?.(r)}}function oc(e){if(typeof e!="function")return null;const t=e;return t.displayName||t.name||null}function BP(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}function a7(e,t){Promise.resolve(e).then(t).catch(t)}const l7=(e,t,n,r)=>{const o=p=>`${oc(p.type)??""}${p.__b}`;let i=0,a=!1;const l=Dt.__e;Dt.__e=(p,m,f)=>{if(typeof m.type=="function"&&p&&typeof p.then=="function"&&m.__u&Z9){const h={name:oc(m.type)??"anonymous",key:o(m)};t.push(h,h),i+=1;let g=!1;a7(p,()=>{g||(g=!0,i-=1)})}l(p,m,f)};const c=Dt.diffed;Dt.diffed=p=>{if(typeof p.type=="function"){const m=o(p),f=t.findIndex(h=>h.key===m);if(f!==-1){if(e){const h=_d(p);p.__k&&h.length===0?console.warn(`Suspended VNode ${jn(p)} returned no DOM-children, this causes hydration mismatches.`):p.__k&&h.length>1&&console.warn(`Suspended VNode ${jn(p)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(f,1)}}c?.(p)};const u=Dt.__c;Dt.__c=(p,m)=>{!a&&i<=0&&t.length===0&&d(),u?.(p,m)};const d=()=>{a||(a=!0,Dt.diffed=c,Dt.__e=l,Dt.__c=u,os.current=!1,r?.())};return{teardown:d}},c7=["id","name","type","role","href","action"];function u7({observability:e,debugMode:t,inProgressBoundaries:n}){const r=[],o=new WeakMap;let i=!1;const a=Dt.diffed;return Dt.diffed=l=>{if(typeof l.type=="string"&&os.current&&l.props&&l.__e instanceof Element){const c=l.props;for(const u of c7){const d=c[u];if(typeof d!="string"||l.__e.getAttribute(u)===d)continue;let m=o.get(l.__e);if(m?.has(u))continue;m||(m=new Set,o.set(l.__e,m)),m.add(u);const f=BP(n),{closestFunctionParent:h,breadcrumb:g}=OP(l),y=h?oc(h.type):null,_=FP(l.__e);r.push({attr:u,tag:l.type,reactValue:d,domElement:l.__e,suspendedAtCapture:f,closestFunctionParent:y,vNodePath:g,domPath:_})}}a?.(l)},{flushAndTeardown:()=>{if(Dt.diffed=a,!i){i=!0;for(const{attr:l,tag:c,reactValue:u,domElement:d,suspendedAtCapture:p,closestFunctionParent:m,vNodePath:f,domPath:h}of r){if(!d.isConnected)continue;const g=d.getAttribute(l);
42if(g===u)continue;const y=p.length>0;t&&console.warn(`🏷️ Attr mismatch on <${c} ${l}>: Preact="${u}" vs DOM="${g}" [suspended=${p.join(",")||"none"}, parent=${m??"unknown"}, domPath=${h.join(" < ")||"unknown"}]`),e.log("attr_mismatch",`Preact ${l} !== DOM ${l} at hydration`,{attr:l,tag:c,reactValue:rc.has(l)?u:"[redacted]",domValue:rc.has(l)?g:"[redacted]",suspendedAtCapture:y?p.join(","):void 0,closestFunctionParent:m??void 0,vNodePath:f.length?f.join(" < "):void 0,domPath:h.length?h.join(" < "):void 0}),e.counter({name:"attr_mismatch",value:1,attributes:{attr:l,tag:c,hadSuspendingBoundaries:y,closestFunctionParent:m??"unknown"}})}r.length=0}}}}const d7=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),p7=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function m7({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:o}){if(n||e!=null&&p7.has(e)||r!=null&&r!==o||YI(o)||o.match(/musical_ly|BytedanceWebview/)||o.split(" ").includes("Playwright-checkout-e2e-tests/local")||o.includes("HeadlessChrome"))return!1;const i=Element.prototype.matches;return typeof i!="function"?!0:t.every(a=>!(a instanceof Element)||!i.call(a,d7))}function f7(){const e=new WeakSet;return{register(t,n){const r=n instanceof Element?n:null,o=n?.parentElement??null;let i=!1;for(let a=r??o;a;a=a.parentElement)if(e.has(a)){i=!0;break}if(!i){for(let a=t;a;a=a.__)if(e.has(a)){i=!0;break}}r&&e.add(r),o&&e.add(o),e.add(t);for(let a=t.__;a;a=a.__)if(typeof a.type=="string"){e.add(a);break}return i}}}function h7(e,{parent:t,observability:n,debugMode:r,deployStage:o,userAgent:i,serverUserAgent:a,apiClientId:l,page:c,mismatchContext:u}){s7(r),os.current=!0;const d=f7(),p=Dt.__m;Dt.__m=(g,y)=>{if(typeof g.type=="string"){const _=g.type,P=(O=!1)=>y.map(D=>{if(D instanceof Text)return`Text: ${O?"[redacted]":D.data}`;if(D instanceof Element){const B=D.getAttribute("id");let z=B;return B!=null&&O&&(z=ti(B)??"[redacted]"),`<${D.localName}${z==null?"":` id=${z}`} class=${D.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:v,breadcrumb:E}=OP(g),C=y.find(Boolean)??g.__e??null,S=C??g.__?.__e??null,I=FP(S);if(r){console.group("🚱 Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${_}
43${jn(g)}`),v&&typeof v.type=="function"&&console.log(`The closest function parent is ${jn(v)}`),E.length&&console.log(`Component path: ${E.join(" < ")}`),I.length&&console.log(`DOM ancestry: ${I.join(" < ")}`);const O=P();O.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${O.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 k=P(!0),T=v&&typeof v.type=="function"?jn(Ef(v)):void 0,A=a!=null&&a!==i,L=m7({apiClientId:l,excessDomChildren:y,hasPriorMismatch:d.register(g,C),serverUserAgent:a,userAgent:i}),M=BP(m),N=c();n.log("hydration_mismatch",`Hydration mismatch for <${_}>`,{...u?.(),domType:_,mismatchedVNode:jn(Ef(g)),closestFunctionParent:T,vNodePath:E.length?E.join(" < "):void 0,domPath:I.length?I.join(" < "):void 0,availableNodeTypes:k||void 0,hasDomNodes:k.length>0,isHydrating:os.current,hasInProgressBoundaries:m.length>0,suspendedAtCapture:M.length?M.join(","):void 0,isActionable:L,isUADivergent:A,page:N}),L&&o!=="tophat"&&n.counter({name:"hydration_mismatch",value:1,attributes:{page:N}})}p&&p(g,y)};const m=[],f=u7({observability:n,debugMode:r,inProgressBoundaries:m}),{teardown:h}=l7(r,m,void 0,f.flushAndTeardown);dS(e,t),m.length===0&&h()}const g7="shop-pay-login-iframe",Rj="100%",Mj="publickey-credentials-get *",vl=9e4,y7=1e3;async function ic(e){if(!document.body?.classList.contains("Loading")){ha(document);return}const t=document.querySelector(".LoadingShell"),n=v7(t);
43if((n||e)&&(n&&await n,e&&(await e.fill(),jh(),t?.remove()),!document.body?.classList.contains("Loading"))){ha(document);return}const r=t?.isConnected?new Promise(o=>{const i=()=>{clearTimeout(a),t.removeEventListener("transitionend",i),t.remove(),o()},a=setTimeout(i,y7);t.addEventListener("transitionend",i)}):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,ha(document)}function v7(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for(hV))}function _7({client:e,isShopPayActive:t,progress:n,watch:r}){const o=t||!!n,i=new AbortController;if(!o){ic();return}r&&(r.stage="skeleton_wait");const a=()=>{r&&(r.stage="subscribed");let u;u=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",()=>{r&&(r.stage="loading_finished"),ic(n),u?.()})},l=e.unstable_legacyNavigationPerformance.on("event",u=>{u.type===jI&&(i.abort(),a())}),c=e.unstable_legacyNavigationPerformance.on("navigation",()=>{i.abort(),a()});i.signal.addEventListener("abort",()=>{l(),c()})}function b7({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const o={stage:"armed"};return setTimeout(()=>{if(pA(document))return;const i=e.unstable_legacyNavigationPerformance,a={shopPaySdkCheckout:n,stage:o.stage,pen
43dingLoaderCount:i.loaderCount},l=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:vl,...a}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:vl,...a,loaderPreviouslyRegistered:i.loaderPreviouslyRegistered,appHasContent:!!e.rootElement?.childElementCount,loginFramePresent:!!document.getElementById(g7),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(l)},{exportImmediately:!0}),Yh().then(()=>{const c=Math.round(performance.now()-l);r.counter({name:"shop_pay_skeleton_recovered_after_stuck",value:1,exportImmediately:!0,attributes:a}),r.histogram({name:"shop_pay_skeleton_recovery_duration",value:c,attributes:a}),r.log("shop_pay_skeleton_recovered_after_stuck","Shop Pay checkout recovered after its skeleton was reported stuck",{...a,recoveryDurationMs:c},{exportImmediately:!0})}).catch(()=>{})},vl),o}function VP(e){mS(e),e.childNodes.forEach(t=>{t.remove()})}function P7(e,t){VP(t),pS(e,t)}async function S7(e,t,n){VP(e),mA(t)||await ic()}class Cf extends Pn{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class E7 extends Pn{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const C7=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"]),k7=/^[^.]+\.checkout\.my\.shop\.dev$/i;function I7({pathnamePrefix:e,allowedOrigins:t,client:n,isShopPayActive:r}){const{protocol:o,href:i,host:a,pathname:l,origin:c}=n.initialRequest.url;if(o!=="https:")throw new E7(`Running on an insecure protocol: ${i}`);if(!(k7.test(a)||r)){if(!A7(i,c,t))throw new Cf(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(l))throw new Cf(`Running on an unexpected pathname: ${i}. Expected pathname to match: /${e.source}/`)}}function A7(e,t,n){return n.some(o=>{if(t===o)return!0;const i=o.replace(/^https:\/\//,"");return t.endsWith(`.${i}`)||t===`https://www.${i}`?!0:i.includes("/")?e.startsWith(o):!1})||C7.has(t)}function T7({rootElement:e,terminalErrorPageElement:t}){return n=>S7(e,t)}async function w7(e,{bootStartTime:t,bootPhaseTimings:n}){const{client:r,terminalErrorHandler:o}=e,i=e.checkout.identity.current.value==="shopPay",a=e.checkout.thankYouEntrance.progress;a?fA(a,{currentUrl:e.router.currentUrl,latestReceipt:e.checkout.latestReceipt}):hA()&&jh();const l=b7({client:r,isShopPayActive:i,isShopPaySdkCheckout:KI(e.shopPay),observability:e.observability});await x7(e,{bootStartTime:t,bootPhaseTimings:n}),l&&(l.stage="context_ready");const c=performance.now(),u=s(Q9,{terminalErrorHandler:o,children:s(_F,{context:e,children:s(X9,{})})});r.initialRequest.isServerRendered&&e.router.shouldHydrateServerRenderedRoute()?L7(u,r.rootElement,e):P7(u,r.rootElement),l&&(l.stage="rendered"),_7({client:e.client,isShopPayActive:i,progress:a,watch:l}),R7(e,{hydrateStartTime:c})}
43function L7(e,t,n){const r=n.checkout.identity.current.value==="shopPay",o=zP(t);h7(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:()=>uc(window.location.href,{isShopPayActive:r,shopPay:n.shopPay}),mismatchContext:()=>{const i=ht(()=>{const u=n.checkout.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.checkout.configuration.visibility.showHeader,shellHeaderLogoVisibility:u.header.logo?.visibility,shellHeaderCartLinkVisibility:u.cartLink.visibility,shellHeaderIsShopOnWeb:Vn(n.router.currentUrl.value.search),shellHeaderPrefersDarkMode:n.client.prefersDarkMode.value}}),a=ht(()=>({cartLinkShopHasStorefront:n.shop.hasStorefront,cartLinkSourceType:n.source.type,cartLinkHasCartReturnUrl:!!n.source.cartReturnUrl})),l=xP.current,c=l&&{breadcrumbIds:l.ids,breadcrumbActiveId:l.activeId,breadcrumbShowCartLink:l.showCartLink,breadcrumbHasCartUrl:l.hasCartUrl};return{serverCrumbCount:o?.count,serverActiveCrumbIndex:o?.activeIndex,...i,...a,...c}}})}async function x7(e,{bootStartTime:t,bootPhaseTimings:n}){const{events:r,client:o,router:i}=e;i.prefix instanceof RegExp&&I7({pathnamePrefix:i.prefix,allowedOrigins:o.unstable_getSerialization("shop").origins,client:o,isShopPayActive:e.checkout.identity.current.value==="shopPay"}),Object.defineProperty(window,Symbol.for("Shopify.checkout"),{value:{context:e},writable:!0,configurable:!0,enumerable:!1}),await NA(e,{loadFrom:o.initialRequest.isServerRendered?"serialized-cache":"network"});const a=new JI(e,{bootStartTime:t,bootPhaseTimings:n});a.waitUntil(N7(e)),r.dispatchEvent(a),await a.allResolved(),r.dispatchEvent(new XI(a))}async function R7(e,{hydrateStartTime:t}){const{events:n}=e,r=new QI(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new ZI(r))}function UP({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const o=M7({isOnePage:e,isShopPay:t,path:n});return qh({isOnePage:e,isShopPay:t,path:n})&&o.push(wP),r.required.value&&o.push(Xy,{load:r.ensureEngineLoaded}),o}function M7({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[G_];case"/throttle":return[Yl];case"/thank-you":return[lr];case"/shoppay_login":return[W_]}if(t||e)return[q_];switch(n){case"/shipping":return[$l,Do];case"/payment":return[Gl,Do];case"/review":return[Wl,Do];case"/stock-problems":return[$_];default:return[Yi]}}async function N7(e){const{checkout:t,router:n}=e,r=UP({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:t.identity.current.value==="shopPay",path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),o=uv(e);o&&r.push(o),await Promise.all(r.map(i=>i.load()))}function zP(e){const t=e.querySelector("nav ol");if(!t)return;const n=Array.from(t.children);return{count:n.length,activeIndex:n.findIndex(r=>r.getAttribute("aria-current")==="step")}}const Nj=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:zP,criticalAsyncComponents:UP,hydrateApp:w7,renderTerminalError:T7},Symbol.toStringTag,{value:"Module"}));function Dj(){const{shop:{id:e}}=b(),t=td();return w(()=>!!t.value.get(e)?.length)}function Oj({accessibilityRole:e,...t}){const n=Fc(),r=n==null?"h1":`h${n}`;return fs(r,{...t,role:e==="heading"?void 0:e})}function Fj(){return Pe(hv)}const Bj=["AT","AU","BE","BR","CA","CH","DE","DK","ES","FR","GB","HK","IN","IT","JP","LU","NL","NO","NZ","SA","SE","US","SG"],Vj=["CA","US"],Uj="google";function zj({children:e,theme:t}){const n=Sr(),r=U(t),o=U();if(o.current==null){const i=new eA(n.configuration);i.replace(ga(n.configuration,t),!1),o.current=i}return F(()=>{r.current=t,o.current?.replace(ga(n.configurationSignal.peek(),t),!1)},[t,n]),ze(()=>{o.current.replace(ga(n.configurationSignal.value,r.current),!1)}),s(ac.Provider,{value:o.current,children:e})}const Hj=()=>{const{value:e}=q().deliveryNext,t=tA(e,"ONE_TIME_PURCHASE"),n=t?.status==="available"?t:void 0,[r,o]=s0({type:"ONE_TIME_PURCHASE",deliveryMethodType:"PICKUP_POINT"}),{negotiate:i}=Lt(),a=V(()=>n?.methods?.filter(u=>u.pickupLocation&&u.methodType==="PICKUP_POINT")??[],[n]),l=V(()=>a.find(({handle:u})=>u===r),[a,r]),c=R(({pickupPoint:u,pickupPointHandle:d})=>{const p=u??a.find(({handle:m})=>m===d);p&&(o(p.handle),i({}))},[a,o,i]);return F(()=>
43{if(a?.length<1)return;a.some(d=>d.handle===r)||o(a[0].handle)},[o,r,a]),{pickupPoints:a,selectedPickupPoint:l,setProposedPickupPoint:c}},qj=["phone","company","firstName","lastName","countryCode"];function Gj(e){return e.some(t=>t.deliveryPredictionEligible)}function Wj({selectedMethods:e,deliveryExpectationLines:t,deliveryPromiseText:n}){const r=new Map;for(const l of t){const{deliveryStrategyHandle:c}=l;c&&r.set(c,l)}const i=e.flatMap(l=>{if(!l.deliveryPredictionEligible)return[];const c=r.get(l.handle);return c?.brandedPromise?.handle==="shop_promise"?[c]:[]})[0];if(!i)return;const a=i.brandedPromise;if(a&&n)return{brandedPromise:a,deliveryPromiseText:n}}var D7=(e=>(e.LoginLink="login_link",e.ErrorBannerConfirm="error_banner_confirm",e.ErrorModalClearEmail="error_modal_clear_email",e.ErrorModalContinue="error_modal_continue",e))(D7||{});function $j(e,{pageWasPainted:t=!0}={}){const{observability:n}=b();F(()=>{t&&n.log("page_rendered",`"${e}" page was rendered.`)},[n,e,t])}function Yj(){const e=ie().paymentLines;return w(()=>{const[t]=vs(e.value,[Te.BuyWithPrime]);return t})}function jj(){const{clearForcedCheckoutLayout:e}=yi(nA),{inMemoryAmazonPayParts:{serializedAmazonParams:t,buyerDetails:n}}=We(),r=R(()=>{e({wallet:Te.AmazonPay}),rA(t),n.value={loading:!1,error:!1,details:void 0}},[e,t,n]);return bi({shouldResetCustomerInfo:!0,skipRedirect:!0,shouldRemovePaymentLine:!0,onClick:r})}function Kj(){const{isOnePage:e}=b().checkout.configuration.layout,t=yh(),n=_i();return R(()=>{e.value?n({shouldResetCustomerInfo:!0}):t()},[e,t,n])}function Jj(){const e=b().checkout.latestReceipt.value?.id,{persistedAmazonSignal:t}=We(),n=R(()=>{fd(t,{receiptIdForAupError:e,receiptIdForPaymentDecline:e})},[t,e]);return bi({shouldResetCustomerInfo:!0,onClick:n})}var O7=(e=>(e.Unknown="unknown",e.Rejected="rejected",e.Errored="errored",e.InvalidTermsCount="invalid_terms_count",e.InvalidRepaymentsCount="invalid_repayments_count",e.UserUnsynchronized="user_unsynchronized",e.InvalidShippingAddress="invalid_shipping_address",e))(O7||{});function Xj(e){for(const t of e)if(t.status!=="not_required"){for(const n of t.methods)if(n.handle===t.selectedDeliveryMethodHandle)return n}}class Qj extends Error{constructor(){super(...arguments),this.name="PaymentMethodDoNotMatchError"}}var F7=(e=>(e.ShopPayProgressIntercept="ShopPay::Exception::ShopPayProgressIntercept",e))(F7||{}),B7=(e=>(e.Online="online",e.RetailPos="retail_pos",e))(B7||{}),V7=(e=>(e.Dismissed="dismissed",e.Pending="pending",e.Verified="verified",e))(V7||{}),U7=(e=>(e.Generic="generic",e.SignInFailed="sign_in_failed",e.ContinueWithShopPay="continue_with_shop_pay",e))(U7||{});let ms=null;function Zj(e){ms=e}function e8(){ms=null}async function t8(e){if(!ms)return{cvvSessionIds:[],isValid:!0};try{const t=await ms(e);return t.isValid&&(t.cvvSessionIds.length!==e||t.cvvSessionIds.some(n=>!n))?{cvvSessionIds:[],isValid:!1}:t}catch{return{cvvSessionIds:[],isValid:!1}}}function n8(e){const t=fo(),n=e.href?"span":G,{pixelId:r,...o}=e;return s(n,{ref:o.href?t(r):void 0,children:s(cn,{...o,ref:o.href?void 0:t(r)})})}function r8(e=t=>{}){const t={},n=performance.now();return{marks:t,referenceTime:n,mark:o=>{t[o]=performance.now()-n,e({mark:o,timestamps:{...t}})}}}export{ct as $,at as A,be as B,Ye as C,d3 as D,En as E,jr as F,Uj as G,jt as H,Le as I,tt as J,_b as K,dt as L,$j as M,Zs as N,Si as O,$e as P,gW as Q,vW as R,so as S,ju as T,Yt as U,n8 as V,bn as W,_Y as X,j7 as Y,Fe as Z,Ir as _,xt as a,Gj as a$,Jr as a0,Rc as a1,Sr as a2,bu as a3,fo as a4,kr as a5,ln as a6,FH as a7,l0 as a8,oj as a9,gn as aA,sj as aB,Ej as aC,Aj as aD,Tj as aE,Pj as aF,nr as aG,St as aH,Uc as aI,Bg as aJ,xw as aK,At as aL,Mr as aM,X7 as aN,J7 as aO,Q7 as aP,E3 as aQ,Ep as aR,xx as aS,S3 as aT,eL as aU,zg as aV,l3 as aW,L_ as aX,zc as aY,GY as aZ,Wj as a_,ut as aa,vn as ab,Xo as ac,wu as ad,ia as ae,Qs as af,wH as ag,Rb as ah,mr as ai,Mb as aj,xb as ak,aj as al,e3 as am,Ln as an,ru as ao,rH as ap,Y$ as aq,ZY as ar,vi as as,Qb as at,zv as au,zj as av,$i as aw,wn as ax,un as ay,$u as az,zt as b,Vi as b$,u3 as b0,on as b1,As as b2,Pr as b3,Vg as b4,cb as b5,Bc as b6,wY as b7,Mv as b8,iY as b9,Ws as bA,la as bB,kj as bC,Ny as bD,D3 as bE,O3 as bF,F3 as bG,oP as bH,C4 as bI,gR as bJ,w9 as bK,oa as bL,GA as bM,K7 as bN,bj as bO,t0 as bP,Qg as bQ,R$ as bR,xn as bS,fy as bT,LY as bU,Gl as bV,vy as bW,_y as bX,ta as bY,p3 as bZ,rx as b_,rM as ba,xu as bb,IY as bc,f1 as bd,tr as be,lo as bf,Fv as bg,nj as bh,cj as bi,pb as bj,db as bk,Cy as bl,fi as bm,rG as bn,Pi as bo,ki as bp,ud as bq,lO as br,V$ as bs,U$ as bt,xW as bu,or as bv,Sn as bw,Dy as bx,Iy as by,MG as bz,ee as c,z9 as c$,Dz as c0,Bz as c1,Oy as c2,a3 as c3,nu as c4,kY as c5,Hu as c6,uP as c7,Zu as c8,Lb as c9,XM as cA,QM as cB,sY as cC,aY as cD,Ov as cE,x2 as cF,Cu as cG,M2 as cH,S2 as cI,w2 as cJ,C2 as cK,Qj as cL,Vu as cM,Oj as cN,u0 as cO,gY as cP,P4 as cQ,cu as cR,Hv as cS,q1 as cT,nc as cU,Db as cV,yu as cW,Ay as cX,Xs as cY,Ku as cZ,ZR as c_,tY as ca,B3 as cb,b_ as cc,N2 as cd,Xl as ce,$3 as cf,f3 as cg,h3 as ch,mu as ci,i0 as cj,zu as ck,s0 as cl,g3 as cm,rj as cn,r$ as co,Gs as cp,e2 as cq,pd as cr,dd as cs,Uz as ct,h2 as cu,Er as cv,Zc as cw,BY as cx,Ob as cy,Dj as cz,Lj as d,mY as d$,sb as d0,md as d1,ds as d2,X3 as d3,D4 as d4,M4 as d5,gP as d6,u$ as d
437,Ks as d8,$Y as d9,uo as dA,Sj as dB,c0 as dC,A$ as dD,iU as dE,Rs as dF,eb as dG,qY as dH,hi as dI,Zo as dJ,Em as dK,Z_ as dL,UY as dM,nU as dN,oU as dO,X_ as dP,Fu as dQ,zY as dR,aU as dS,rU as dT,VY as dU,zz as dV,F_ as dW,U_ as dX,cy as dY,WF as dZ,qF as d_,YY as da,Xg as db,gd as dc,X4 as dd,PW as de,y$ as df,EH as dg,Fl as dh,dw as di,Ea as dj,iL as dk,Ol as dl,_w as dm,Qc as dn,qc as dp,Hc as dq,li as dr,Yr as ds,Xc as dt,Fw as du,Ds as dv,Wr as dw,xj as dx,Cr as dy,ho as dz,Se as e,cY as e$,E2 as e0,TY as e1,WH as e2,Bs as e3,U7 as e4,nm as e5,F7 as e6,h_ as e7,q9 as e8,gu as e9,NW as eA,Q2 as eB,ZG as eC,ps as eD,ad as eE,ao as eF,hY as eG,VA as eH,zA as eI,Ba as eJ,jj as eK,sR as eL,C9 as eM,O7 as eN,sx as eO,LO as eP,B7 as eQ,Ou as eR,hu as eS,co as eT,hd as eU,Cv as eV,vU as eW,nb as eX,o0 as eY,$l as eZ,u_ as e_,b2 as ea,yY as eb,_2 as ec,_M as ed,U3 as ee,Hj as ef,nG as eg,o4 as eh,fu as ei,qj as ej,WY as ek,Cj as el,Ij as em,KY as en,Eu as eo,RY as ep,Ci as eq,k$ as er,Zb as es,FG as et,BG as eu,ib as ev,rf as ew,NG as ex,Jq as ey,RG as ez,T$ as f,D7 as f$,BU as f0,ny as f1,_3 as f2,I3 as f3,Fj as f4,Lu as f5,ox as f6,i2 as f7,o2 as f8,Nb as f9,v3 as fA,p9 as fB,m9 as fC,V3 as fD,Yj as fE,Xj as fF,N4 as fG,K3 as fH,p4 as fI,Gi as fJ,jY as fK,OR as fL,NR as fM,BR as fN,H3 as fO,G3 as fP,_i as fQ,KM as fR,ji as fS,Jx as fT,Qx as fU,aO as fV,Tr as fW,su as fX,cG as fY,z$ as fZ,ou as f_,Au as fa,ZD as fb,YV as fc,xN as fd,Ri as fe,V7 as ff,r8 as fg,OV as fh,gU as fi,c3 as fj,w3 as fk,tc as fl,tO as fm,Rj as fn,g7 as fo,Mj as fp,hN as fq,j3 as fr,Xx as fs,Jj as ft,fd as fu,cP as fv,Kj as fw,J3 as fx,S4 as fy,T9 as fz,Yy as g,GU as g$,Us as g0,e8 as g1,Zj as g2,e_ as g3,D0 as g4,au as g5,oM as g6,x_ as g7,GF as g8,zF as g9,xY as gA,x$ as gB,Ju as gC,EY as gD,L$ as gE,IG as gF,CR as gG,t8 as gH,fY as gI,UO as gJ,r1 as gK,w0 as gL,Y_ as gM,qb as gN,Js as gO,nP as gP,dY as gQ,q3 as gR,tj as gS,hP as gT,FR as gU,L4 as gV,qu as gW,xG as gX,uj as gY,XY as gZ,JY as g_,eg as ga,mv as gb,ai as gc,tg as gd,AY as ge,rY as gf,oY as gg,c_ as gh,id as gi,Fs as gj,W3 as gk,z3 as gl,Zg as gm,BL as gn,R1 as go,rR as gp,nx as gq,Vj as gr,Bj as gs,hz as gt,T3 as gu,Cn as gv,YF as gw,vY as gx,QL as gy,mD as gz,Lt as h,Ko as h$,DV as h0,MY as h1,NY as h2,RV as h3,DY as h4,OY as h5,_m as h6,VV as h7,Q3 as h8,v1 as h9,Ya as hA,JN as hB,uY as hC,bY as hD,n1 as hE,k3 as hF,y3 as hG,ej as hH,b3 as hI,bU as hJ,qT as hK,hq as hL,cq as hM,pY as hN,pO as hO,mO as hP,tx as hQ,Jl as hR,us as hS,Ez as hT,dy as hU,A3 as hV,ky as hW,x3 as hX,H9 as hY,wj as hZ,Tv as h_,_1 as ha,h1 as hb,Gv as hc,Zy as hd,Z3 as he,z1 as hf,N1 as hg,L1 as hh,eY as hi,MA as hj,xc as hk,tv as hl,nv as hm,AN as hn,TN as ho,D1 as hp,QW as hq,xi as hr,_p as hs,$p as ht,Z2 as hu,CH as hv,Ab as hw,sl as hx,zl as hy,cN as hz,yi as i,zG as i$,qU as i0,LG as i1,R3 as i2,Vs as i3,gr as i4,et as i5,Tt as i6,Et as i7,lG as i8,oW as i9,wy as iA,kv as iB,ey as iC,ij as iD,PP as iE,M3 as iF,FY as iG,QY as iH,lY as iI,m3 as iJ,L9 as iK,Nq as iL,nY as iM,u1 as iN,lu as iO,i3 as iP,o3 as iQ,t2 as iR,ra as iS,sp as iT,ry as iU,Y3 as iV,CY as iW,P3 as iX,rW as iY,oG as iZ,_G as i_,XG as ia,PG as ib,sW as ic,Uq as id,aH as ie,du as ig,uu as ih,Lm as ii,w$ as ij,EP as ik,BW as il,vu as im,$D as io,L3 as ip,bi as iq,GV as ir,$V as is,WV as it,oO as iu,x4 as iv,GD as iw,df as ix,N3 as iy,g_ as iz,Uy as j,rr as j0,jT as j1,ZT as j2,bw as j3,s3 as j4,Wc as j5,$m as j6,r3 as j7,U2 as j8,Wu as j9,t3 as ja,c$ as jb,Ls as jc,n3 as jd,xz as je,Tw as jf,Vb as jg,pj as jh,dj as ji,mj as jj,yd as jk,_j as jl,vj as jm,yj as jn,gj as jo,hj as jp,fj as jq,J_ as jr,td as js,C3 as jt,VW as ju,Nj as jv,Un as k,cn as l,sf as m,$ as n,$s as o,it as p,lj as q,HY as r,__ as s,n9 as t,no as u,$O as v,SY as w,PY as x,gt as y,Ms 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.