PageSourceSearch

https://prolon.co.uk/cdn/shopifycloud/checkout-web/assets/c1/hydrate.DbBIWEk-.js

js prolon.co.uk collected 2026-09-30 04:55:53 UTC 832,884 bytes, 43 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["Trekkie.CtdwXInC.js","esnext-vendor.7EcvH7tF.js","utilities-previous.C42MP_Mw.js","app.DklQzmA_.js","assets/app.BuSMBobh.css","assets/previous.DjvIwnbB.css","shared-negotiation-input-redeemable.Bd3YWCwY.js","shared-permissions.DaHnWepz.js","hooks-useShopPayExternalAppContext.CJygX3OQ.js","AdminPreviewBar.BqafTSoi.js","assets/AdminPreviewBar.BpHI7Zwr.css","ExtensionsInner.BAojSOWO.js","ImpressionEventCapture.CTaz86gY.js","extension-targets-rendering-extension-targets.BSgjfMTw.js","utilities-extension-execution-errors.CnsUCVLK.js","AnnouncementRuntimeExtensions.B8nUY-TG.js","QRCode.tVYXglFW.js","assets/QRCode.BZ_m5G5a.css","Pressable.Dzzcqa3E.js","assets/Pressable.D9SfDfsb.css","Checkbox.D-f3QQ5T.js","assets/Checkbox.SrYMuQu4.css","Choice.BnQD4sDK.js","utilities-publishMessage.mSFRd__c.js","assets/Choice.DV6JSDrR.css","utilities-dates.ChO2GdxN.js","Popover.BKZ7RQbD.js","assets/Popover.Bi1nHaU-.css","PaymentIcon.B7-3_jXb.js","assets/PaymentIcon.gzvCNwz_.css","NumberField.B-oy6eYJ.js","assets/NumberField.CRpcZnVJ.css","Switch.B2-NM_1a.js","assets/Switch.BS8yVgoP.css","extensions-remote-dom.Cu0UH-qn.js","EmailField.C14V4Fyv.js","TextArea.sjuFKAGq.js","Sheet.Bcul6c2H.js","assets/Sheet.CpR5hiDV.css","styles-floating-layer.module.DAWBGW8s.js","assets/floating-layer.DfWUBaTh.css","hooks-useForceShopPayUrl.DtgEOf2S.js","AddressPresenter.DCZt0CYc.js","PhoneField.DwUibqcs.js","components-RedirectionNotice.module.Bd2sET81.js","amazon-pay-useAmazonPayPaymentLine.B67X6gPb.js","assets/RedirectionNotice.B8v_QGNW.css","hooks-useSuppressShopPayModalOnLoad.TozpD3Nk.js","assets/PhoneField.uZEuHncj.css","hooks-useShowShopPayOptin.DLrhKtTG.js","assets/AnnouncementRuntimeExtensions.D2R3fBzd.css","redemption-constants.M-heiTkD.js","performance-index.mu6MOGR9.js","dist-v4.EwEgHOG0.js","adapter-host.DCv7mMBl.js","actions.CR0-Z7yc.js","business-customer-constants.BLtGZWxw.js","checkout-as-guest-amazon-pay.CHa6Hec0.js","shared-receipt-mapper-load-recovery.A6B5sA0j.js","shared-receipt-eager-mappers.BKLVBX6a.js","shared-report-graphql-error.CVvuVB9H.js","CheckoutSheetProtocolProvider.CTHXePF8.js","utils-useViolationsHandler.CPyuAyN6.js","utils-checkoutProtocolLinkInterceptor.CkJQYZFj.js","shared-receipt-merchandise-lines.DnqxWvHV.js","MobileCheckoutSdkProvider.Chqnnsi4.js","hooks-useShopPayNewSignupLoginExperiment.dSEXfkxF.js","CheckoutEditorBridge.DJpw240b.js","receipt-mappers.DouAC4gi.js","component-WalletApplePayLazy.BkvDQx81.js","hooks-useWalletsMonorailTrack.87uJFZlZ.js","wallets-deserialize-delivery-handles.B_0Ey6Oo.js","hooks-useWalletsThreePageVaultedReviewEscalation.BdAsheNd.js","shop-pay-installments-monorail.DGxC6lQT.js","hooks-payment-button.BrMwl2Ds.js","web-mcp-pickup-locality.CpoBt5Wd.js","web-mcp-runtime.B_jbHXiO.js","redemption-promotions.Dh9kbNQB.js","helpers-credit-card-disabled.C_cTHlJ5.js","helpers-derivations.DPDmCezY.js","graphql-PaymentSessionMutation.BKxH_g7d.js","context-browser.BDLMy0gn.js","PayButton-helpers.CQx5C_6A.js","helpers-setAddressErrors.Dc7hMYQi.js","addresses-is-address-empty.c1RwzK2R.js","shop-pay-normalizeBuyerDetails.BXNL4dWa.js","DevTools.ByoLfigl.js","assets/DevTools.DTK7lleS.css","EditorBridge.iVDlopyG.js","DeferredPrivacy.BXYUNmBc.js","ReviewBlock.BlPknifv.js","BillingAddressSelector.G91Nhhik.js","BillingAddressForm.DbqqYqNi.js","localization-index.DeoiIICN.js","assets/index.CrYq3At_.css","assets/BillingAddressForm.BdwN7V1K.css","Middot.DeUnb26F.js","EstimatedDeliveryContent.B0OSfbru.js","ShippingMethodRateLabel.6_DjUqL6.js","assets/EstimatedDeliveryContent.B_THySFF.css","shipping-methods-consolidated-included.DMw6JHFz.js","assets/Middot.D7Ujmshx.css","components-DeliveryReviewMethods.Cd_wEKQR.js","assets/DeliveryReviewMethods.CZ0Im8vA.css","hooks-usePickupPoints.avsHv-hM.js","PaymentLine.CRt55JLx.js","Theme-ThemeOverride.R4Pcj3x4.js","assets/PaymentLine.D3bcP-mr.css","page-Information.C7jSY47R.js","Captcha.COkBBFgl.js","ShopPayCaptcha.BoEGZmPr.js","PaymentErrorBanner.PvaCOaLw.js","hooks-useGeneralPaymentErrorMessage.Boc21OFt.js","assets/Captcha.CJQgLR0i.css","components-VatNumberValidationField.CaETE5xt.js","useShopPayButtonClassName.Dh_1kUR1.js","hooks-useShouldRevealCustomization.vFBBGO5a.js","assets/useShopPayButtonClassName.CpHF4L7Q.css","ChangeCompanyLocationLink.C1XeDCDi.js","ShopPayLogo.BlYw6vVK.js","hooks-useWalletsTimeout.DFyKCvL4.js","Page.Coo-tm2O.js","assets/Page.BYM12A8B.css","crypto-constants.BBKCG06j.js","assets/constants.Dlnp55te.css","TransitionHeight.CWQ6RrPa.js","assets/TransitionHeight.CuRoM9zv.css","AutocompleteField-hooks.CiuZ2tGY.js","PendingShipping.ymy--idK.js","assets/VatNumberValidationField.CyiectWG.css","page-lazyNoAddressLocation.Dd1Wzoge.js","OffsitePaymentFailed.DzjWrdFl.js","assets/OffsitePaymentFailed.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","OnePage.CMKEepyV.js","StickyPayButton-StickyPayButton.module.DqBZRt4O.js","assets/StickyPayButton.CPXhWoNv.css","useAddressMutationsWithNegotiation.ryiEffHM.js","hooks-use
1UpdateCheckoutAddress.C3DAjrtU.js","payment-usePaymentExemptionReason.7oBIj6G2.js","hooks-useShopPayProgressIntercepts.DqGa6PRI.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","assets/useAddressMutationsWithNegotiation.BcTJoNaV.css","Section.CfVi3mRR.js","assets/Section.CU18S7Ap.css","hooks-usePreselectSpi.DGwwiNWH.js","ShippingLines.CYq3oDba.js","ShipmentBreakdown.CPViZu4b.js","MerchandiseModal.22QlY5ZF.js","ShippingMethodSelector.CKZRAwy6.js","assets/ShippingMethodSelector.B0hio2RO.css","SubscriptionPriceBreakdown.CpEz6MIJ.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","assets/ShippingLines.LcqrKXE1.css","StockProblems-StockProblemsLineItemList.s7vU92dA.js","assets/OnePage.DxMZvmU_.css","page-OnePageReview.ujKlZL0H.js","component-MobileOrderSummary.BWlGJW3-.js","assets/MobileOrderSummary.2B5x30PG.css","PayButtonSection.S4hruACM.js","PaymentButtons.CmagKvOD.js","assets/PaymentButtons.CKE1iCma.css","assets/PayButtonSection.Bi0nhBOp.css","page-Payment.ByzDQbYX.js","RememberMeSection.Zvo2IY1_.js","components-PaymentMethodProgressionHost.DEHkO1Jd.js","assets/PaymentMethodProgressionHost.Cu93j1K1.css","assets/RememberMeSection.JBO5WNhc.css","KnownBuyerPaymentMethodSelector.nXItzJzZ.js","hooks-usePaypalRowEffects.c_7LE0TU.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","page-PostPurchase.D_qVlc77.js","PostPurchaseShouldRender.BQtbVcNE.js","extensions-rpc.BHqt_FWL.js","assets/PostPurchase.e2mo8B8q.css","page-Processing.DalNosDX.js","assets/Processing.D4vG8dn7.css","page-Review.DFVDi_i8.js","page-Shipping.SLU6t2UO.js","page-ShopPayLoginLoader.DPbVXbN0.js","models-ShopPayBuyerDetails.model.Bmfxm24J.js","assets/ShopPayLoginLoader.B1_neltu.css","page-StockProblems.CzS0HUCC.js","embed-deferred.DJppVBW7.js","stock-problems-useStockProblemsState.BX8fKOOI.js","page-StockProblemsModal.BKU5MMGm.js","page-ThankYou.B6ERrHHV.js","useAuthorizeUrl-index.DfmMGP4X.js","Map.D8IhjdcD.js","hooks-useStableHostMethodsReferences.Gbfqh2hO.js","assets/Map.cbVP6Hp_.css","ShipmentLine.BW2f9jSW.js","BuyWithPrimeOrderTrackingButton.CPnRWHNY.js","shipping-methods-grouping.BpmbHANr.js","amazon-constants.BnCZXorl.js","assets/ThankYou.Dzeixemk.css","page-Throttle.ldmDh_C-.js","assets/Throttle.CK6IAVuq.css","component-RuntimeExtension.CdnRcmwD.js","assets/RuntimeExtension.DWkDBM73.css","component-PaymentChallengeModal.CaRh1NUi.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","component-CryptoModalManager.C3mGEFjL.js","assets/CryptoModalManager.CqiWenQK.css","component-ProductDisclosuresDetails.C9yD6Tl3.js","VaultedContactAvatar.DqMG6eEA.js","assets/VaultedContactAvatar.BF3cX_zA.css","ShopPayCheckout.BgSJgTAi.js","assets/ShopPayCheckout.CDRlDVu0.css","component-amazonWalletLazy.CLANzn5p.js","WalletsSandbox-WalletSandbox.Qnxkj0SK.js","assets/WalletSandbox.BoV0vp4z.css","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]);
2import{ag as Bo,r as ut,L as GP,M as WP,f as x,q as M,T as V,A as U,h as F,G as ht,k as ie,_ as Rt,ae as mf,ai as $P,u as s,b9 as YP,e as Te,x as Se,a2 as ff,X as qe,S as G,g as Y,D as at,F as vn,E as It,o as ze,y as ce,l as Ye,d as Ge,Q as Qn,i as ye,$ as jP,n as tn,a as rn,m as cd,a1 as KP,R as JP,a4 as ud,N as XP,j as dl,a0 as QP,V as hf,ba as gf,bb as ZP,bc as eS,O as tS,bd as nS,au as Yl,W as Wt,p as Zn,Y as rS,Z as oS,be as iS,bf as sS,at as aS,bg as lS,b7 as Dt,bh as cS}from"./esnext-vendor.7EcvH7tF.js";import{kE as fr,ef as pl,ht as In,gB as us,mC as uS,d1 as Vo,O as mt,P as Ht,Q as b,aw as Ot,H as Be,mD as yf,dj as vf,j as Jr,f as yr,V as Kn,eg as _f,df as bf,aK as Pf,ad as Je,a2 as q,mE as jl,eN as vr,dd as Jn,bN as ji,dc as Sf,gI as Ef,bc as ds,bb as Ki,cp as bt,d9 as hr,d5 as dS,d4 as wo,da as dd,db as Cf,d0 as kf,mk as If,mF as pS,mG as _r,eK as Af,m2 as Wn,mH as Kl,mI as mS,dp as fS,fX as er,j8 as hS,S as se,aL as ti,aH as Jl,mJ as gS,mK as yS,mL as vS,mM as _S,aY as Mt,mN as pd,e7 as md,mO as fd,mP as hd,mQ as gd,ec as yd,eb as vd,ea as _d,e9 as bd,mR as bS,e_ as Co,lK as Xl,gs as ps,mS as Tf,mT as wf,lL as Ji,bg as Fn,bI as Lf,lF as PS,gk as SS,eD as xf,eC as Ql,j9 as Rf,ez as ES,mU as CS,eB as kS,mV as IS,eA as AS,bp as Uo,c5 as Lo,jz as TS,mW as wS,gQ as LS,c_ as xS,gl as Pd,eo as Ei,mX as RS,mY as MS,mZ as NS,m_ as DS,m$ as OS,bw as ni,kU as FS,bn as BS,bk as VS,bl as fn,n0 as Mf,eq as Nf,n as Xr,ej as Zl,ak as St,fd as US,aq as Pt,c6 as zS,ah as jt,cm as ec,bL as Df,mu as HS,G as ml,n1 as qS,E as GS,mB as WS,kn as $S,cx as fl,n2 as YS,n3 as jS,n4 as KS,n5 as JS,n6 as tc,n7 as Of,n8 as XS,n9 as QS,kW as Ff,fo as ms,hz as zo,hC as ZS,hy as eE,b5 as br,na as Sd,cz as Ed,ac as We,ll as fs,bi as He,hx as Bf,nb as tE,aO as Vf,lx as nE,fk as hl,a4 as Le,v as nc,mh as Uf,hF as rE,as as oE,hG as iE,b0 as sE,nc as aE,nd as rc,ne as zf,kI as Hf,j$ as lE,nf as cE,dr as uE,h3 as qf,ng as dE,nh as pE,x as ri,ni as mE,nj as fE,nk as hE,nl as gE,nm as yE,gf as vE,nn as _E,hZ as Gf,no as bE,np as PE,nq as Cd,nr as SE,ev as Wf,ns as EE,nt as CE,w as $f,ex as kE,ia as Yf,la as IE,nu as AE,lc as TE,lf as kd,nv as wE,le as LE,nw as xE,nx as RE,ny as ME,nz as NE,nA as DE,ik as OE,k$ as jf,l2 as Kf,l9 as FE,nB as BE,nC as Jf,nD as VE,iO as UE,aS as zE,an as HE,g as qE,ag as GE,kl as WE,b7 as nt,ix as Xf,ih as Qf,nE as oc,jr as Qr,nF as Lr,
2nG as $E,nH as YE,nI as jE,dP as zr,nJ as KE,nK as JE,nL as XE,cW as ic,ka as sc,nM as QE,q as ZE,bD as Zf,iL as eC,iN as Xi,iK as tC,bK as Fi,fL as eh,lA as th,lz as nh,fP as rh,fM as oh,lB as ih,lS as gl,de as nC,eX as Bn,bC as Ft,br as sh,cP as rC,nN as oC,kG as iC,nO as sC,eE as aC,h9 as lC,nP as cC,nQ as uC,nR as dC,nS as pC,nT as Gt,mo as mC,fh as ah,nU as fC,nV as hC,m7 as gC,f1 as lh,m6 as yC,m8 as vC,nW as _C,bs as bC,nX as PC,nY as SC,nZ as EC,n_ as Id,ax as $n,n$ as CC,jJ as kC,jK as Ad,d as IC,jI as ir,gM as ac,h6 as lc,o0 as AC,o1 as TC,y as cc,cN as uc,ae as wC,fy as LC,fz as ch,lp as xC,jP as hs,fA as uh,gG as RC,h8 as MC,C as NC,o2 as DC,gD as OC,ap as FC,o3 as BC,lM as VC,b3 as dc,hA as UC,o4 as zC,o5 as HC,o6 as qC,b1 as GC,o7 as WC,o8 as $C,o9 as gs,oa as YC,ms as jC,ob as KC,oc as JC,gr as XC,gt as ys,od as QC,iB as ZC,oe as yl,of as ek,og as dh,dW as tk,g$ as ph,dz as vl,oh as nk,eI as pc,iZ as Td,k8 as rk,cY as ok,aZ as mc,oi as ik,oj as sk,ok as ak,dt as mh,dN as lk,i as Qi,ol as ck,I as uk,j2 as dk,e as Bi,om as pk,on as mk,j6 as wd,cR as Ld,kr as fk,jO as fc,d_ as hk,d$ as gk,cZ as oi,c8 as ii,aQ as fh,aV as yk,oo as vk,cs as vs,op as hh,bF as _k,k_ as bk,cw as Pk,oq as Sk,bq as Ek,bo as Ck,f7 as kk,aR as hc,X as Ik,bM as Ak,a1 as _s,a0 as Tk,mr as wk,i9 as Lk,or as xk,A as gh,os as Rk,j3 as yh,i5 as Mk,ot as vh,az as Nk,ay as ho,aB as Dk,aC as Ok,ou as Fk,ov as Bk,B as _l,ow as Vk,ox as Uk,oy as _h,ed as Zr,oz as bh,e5 as bs,oA as zk,dk as Ph,j1 as Hk,oB as qk,gy as Gk,fU as gc,oC as Wk,oD as Sh,jd as $k,h0 as Yk,mq as jk,e4 as Kk,hr as Jk,eh as Xk,gS as Qk,ck as Zk,e3 as Eh,e2 as eI,eu as tI,ei as yc,oE as Ch,h7 as nI,ds as kh,hv as Ih,jC as rI,oF as oI,j_ as iI,oG as Ah,oH as sI,oI as aI,cV as lI,k1 as Th,oJ as cI,jM as uI,oK as wh,lo as dI,ln as pI,h4 as mI,h5 as fI,oL as hI,oM as gI,oN as yI,oO as vI,ha as _I,gE as bI,iQ as PI,cq as SI,by as xd,gC as EI,jV as CI,j4 as Lh,ai as kI,hk as II,hc as Rd,oP as AI,oQ as TI,oR as wI,oS as LI,oT as xI,oU as RI,fu as MI,oV as xh,oW as NI,oX as DI,fj as OI,hB as FI,z as BI,af as VI,lb as Rh,oY as UI,$ as Mh,fs as zI,cO as HI,c4 as Nh,oZ as qI,c7 as GI,dM as WI,kS as aa,jt as Md,ju as Nd,b6 as $I,g4 as YI,k0 as jI,lw as KI,fa as JI,lI as XI,o_ as QI,o$ as ZI,p0 as Ps,p1 as eA,p2 as tA,dO as nA,fc as rA}from"./utilities-previous.C42MP_Mw.js";import{S as bn,k as dr,_ as Ve,J as oA,w as iA,P as sA,x as Dh,O as aA,i as lA,e as cA,t as uA,y as dA,z as la,B as pA,D as ca,G as Oh,H as mA,K as fA,L as hA}from"./app.DklQzmA_.js";import{i as vc,c as gA,s as yA,b as Fh,d as vA}from"./shared-negotiation-input-redeemable.Bd3YWCwY.js";import{i as _A,h as Ho,r as bA,j as PA,k as SA,f as Bh,l as EA,m as CA,A as kA}from"./shared-permissions.DaHnWepz.js";import{d as IA,i as qo,c as bl,b as AA}from"./hooks-useShopPayExternalAppContext.CJygX3OQ.js";function Pl(e){return`${Vh(e)}:::${e.message}`}function Ss(e){return Vh(e)}function Vh(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 Uh extends bn{constructor(){super(...arguments),this.name="CheckoutProfileChangeError"}}class xo extends bn{constructor(){super(...arguments),this.name="CheckoutProfileQueryMissingData"}}class TA extends bn{constructor(){super(...arguments),this.name="CheckoutProfileQueryFetchError",this.unactionable=!0}}async function _c(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=(T,L)=>{if(g(),y&&_&&_!==y){A({status:"superseded",activeCheckoutProfileId:a.profileId.value,stage:T,error:L});return}l.debug("checkout_profile_change","[CheckoutProfileChange]: Checkout profile change not applied due to isActive returning false",{configurationRecordId:_,stage:T})};if(u?.source?.type==="simulated"){g();return}if(!p())return P("before_fetch");if(!r?.id){g();return}const v=r,{requireBusinessCriticalOnly:E}=v,k=a.profileKey.peek();if(k&&Bo(fr,k)===Bo(fr,v)){g();return}const S=_!==y,I=S?void 0:a.getProfile(v);try{let T,L;if(I)T=I;else{const D=await ut(async()=>{const{data:O,error:B}
2=await o.staticQuery(fr,{variables:v,cache:!0});if(B)throw B;if(!O)throw new xo("Checkout profile query returned no data");if(!O.checkoutProfile)throw new xo("Checkout profile query returned no checkout profile data");if(S&&!O.shop)throw new xo("Checkout profile query returned no shop data");return O},{maxAttempts:3,shouldRetry:()=>!E&&p()});T=D.checkoutProfile,L=D.shop}return p()?()=>{try{if(!p()){P("before_apply");return}const D=T.activatedExtensions,{removed:O,kept:B}=wA(i,D);g();const z=j=>j.capabilities.blockProgress&&j.behaviors.value.blockProgress,R=B.filter(z),$=O.filter(z);i.ui.replace({activatedExtensions:D},{keepAlive:!1,reason:"checkout_profile_change"}),n==="negotiation"&&(R.length>0||$.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:Dd($),updatedBlockingExtensions:Dd(R)}),t.runInterceptors({negotiationStage:"negotiation",skipEffects:!1}).then(j=>{p()&&(t.validationErrors.value=j.errors)}).catch(j=>{l.error(new Uh("Error occurred while running interceptors after checkout profile change",{cause:j}))})),a.update({profile:T,requireBusinessCriticalOnly:E,...S&&L?{themeData:L,addressSettings:{shopConfig:L}}:{}}),w()}catch(D){C(D)}}:P("after_fetch")}catch(T){if(!p())return P("fetch_failed",ua(T));if(E){n!=="initialization"&&l.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:n,reason:"query_failure"}});const L=ua(T);return l.error(L),l.leaveErrorBreadcrumb("[CheckoutProfileChange] Loading unrestricted profile after restricted query failure",{checkoutProfileId:_}),_c(g,{...t,profileRequest:{...r,requireBusinessCriticalOnly:!1}})}C(T)}function C(T){const L=ua(T);g(),l.error(L),A({status:"error",error:L})}function w(){A({status:"success"})}function A({status:T,error:L,activeCheckoutProfileId:N,stage:D}){n!=="initialization"&&(LA({observability:l,userEvents:c,...u},{startTime:m,startTimestamp:f,previousCheckoutProfileId:y,checkoutProfileId:_,activeCheckoutProfileId:N,trigger:n,status:T,stage:D,error:L}),T!=="superseded"&&l.debug("checkout_profile_change",`[CheckoutProfileChange] ${L?"Failed to update":"Updated"} checkout profile`,{trigger:n,previousCheckoutProfileId:y,checkoutProfileId:_,error:L?Ss(L):void 0}))}}function wA(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 ua(e){return e instanceof GP||e instanceof WP?new TA("Could not complete checkout profile change, could not query checkout profile",{cause:e}):new Uh("Could not complete checkout profile change",{cause:e})}function LA(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,k=pl(i),S=pl(o),I=d?Pl(d):void 0,C=d?Ss(d):void 0,w=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:w,checkoutToken:P,shopId:v,customerId:E,sessionToken:y,checkoutProfileId:k,previousCheckoutProfileId:S,frontendEventsTimeDifferenceMs:p,errors:I?[I]:void 0}}),m.histogram({name:"checkout_profile_configuration_change",value:p,attributes:{trigger:l,status:c,error:C}});const A={previousCheckoutProfileId:o,checkoutProfileId:i,...a?{activeCheckoutProfileId:a}:{},trigger:l,duration:p,status:c,...u?{stage:u}:{},error:C},T=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",T,A),m.leaveErrorBreadcrumb("[CheckoutProfileChange] Checkout profile change event recorded",{identifier:"checkout_profile_configuration_change",...A})}function Dd(e){return e.map(({id:t,name:n,appName:r,extensionPoint:{target:o}})=>({id:t,name:n,appName:r,target:o}))}function xA({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(In)||o==="GOOGLE_PAY"&&t.hasFlagEnabled(us));return{id:n,requireBusinessCriticalOnly:a}}async function RA(e,{loadFrom:t,onQuerySettled:n}){const r=xA(e);if(!r?.requireBusinessCriticalOnly)return;const o=Bo(fr,r),i=e.checkout.configuration.getProfile({...r,requireBusinessCriticalOnly:!1});try{let l=t==="serialized-cache"?await Od(e.graphql.coreGraphql,r):void 0;if(t==="serialized-cache"&&!l){Fd(e.checkout.configuration.profileKey.peek(),{...r,requireBusinessCriticalOnly:!1}),a("missing_cached_profile");return}(await _c(()=>{},{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 Od(e.graphql.coreGraphql,r),Fd(e.checkout.configuration.profileKey.peek(),{...r,requireBusinessCriticalOnly:!!l}),l||a("query_failure")}catch(l){if(e.graphql.coreGraphql.cache.delete(o),da(e.observability,l),i){a("preparation_failure");try{e.checkout.extensibility.ui.replace({activatedExtensions:i.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){da(e.observability,c)}try{e.checkout.configuration.update({profile:i,requireBusinessCriticalOnly:!1})}catch(c){da(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 da(e,t){e.error(t instanceof Error?t:new xo("Required checkout profile could not be loaded",{cause:t}))}async function Od(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 Fd(e,t){if(!e||Bo(fr,e)!==Bo(fr,t))throw new xo("Required checkout profile could not be loaded")}function Es(e){const t=uS();return MA(e,t)}function Hr(e){if(typeof e!="object"||!e)return!1;let t=!1;for(const n of Object.keys(e))if(n in Vo)t=!0;else return!1;return t}function MA(e,t){if(!t)return;if(e[t]!==void 0)return e[t];const n=Object.keys(Vo),r=n.indexOf(t);for(let o=r;o>=0;o--){const i=n[o];if(e[i]!==void 0)return e[i]}}function NA(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}function DA(e){return!!(e.analyticsProcessingAllowed||e.marketingAllowed)}const zh=mt("JourneyContext"),bc=mt("JourneyProgressionContext");function Pe(){const{journeyState:e,pageBeforeDetour:t,...n}=Ht(zh),{router:r}=b();return x(()=>{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 Nt(){const e=Ht(bc),{detour:t,progress:n,progressing:r,completing:o,prefetch:i,negotiate:a}=e,l=M(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=Ot(),n=U(e);n.current=e,F(()=>t.listen((...r)=>n.current(...r)),[t])}function Hh(e){const t=Ot(),n=U(e);n.current=e,F(()=>t.listenBeforeNegotiation((...r)=>n.current(...r)),[t])}function W7({active:e=!0}={}){const t=Ot();F(()=>{if(e)return t.block()},[t,e])}const Bd=["information","shipping","payment","review"];function OA(){const{router:e}=b(),{plan:t}=Pe().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(!Bd.includes(o.id)||!Bd.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 eo(){const e=b().checkout.latestReceipt.value;return e?.status==="processed"?e:void 0}function FA(){const e=eo(),t=Pe(),n=U(!1),r=M(()=>(n.current=!0,n),[n]);return{shouldPrevent:M(()=>
2{if(n.current)return!0;const i=t.value.currentDetour?.type==="postPurchase";return!e||!!e.redirectUrl&&!i},[e,t]),markAsEmitted:r}}function BA(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:pl(t.orderIdentity.id)}})}function VA(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 UA={thankYou:"c1_typ",postPurchase:"post_purchase"};function zA(e,t){const n=e.find(r=>r.route===t);return n?UA[n.type]??"unknown":"unknown"}function HA(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 $7(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 si(e){return e.checkoutSessionIdentifier}function qA(){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 GA({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 WA(){const{modern:e,legacy:t}=qA(),n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}function qh(e){return e||void 0}function qr(e){return e?Be(e):void 0}function $A(e){const t=e?.customerProfile;if(!t)return;const n=Be(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 YA({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,o=e.current.fields.remoteMerchandiseDetails?.value,i=r?_f(r.lines,o):void 0,a=QA(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:Pc(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 KA(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 JA(){const e=Je(),{shop:t,source:n}=b();return ht(()=>{const r=e.current.fields.buyerIdentity.value;return{cart:YA({negotiated:e,shop:t,source:n}),customer:$A(r),shop:jA({shop:t}),purchasingCompany:KA(r)}})}function XA(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function Gh(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:nT(e.targetType),title:e.title,type:XA(e),value:rT(e,t)}}function Wh(e){const t=[];return e.forEach(n=>{n.allocations.forEach(r=>{const o=r.discountDetails.discount;bf(o)&&t.push({amount:r.amount,discountApplication:Gh(o,r.amount)})})}),t}function QA(e,t){return t?t.map(n=>{const r=yr(n.variantId??void 0),o=eT(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:yr(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 ZA(e,t,n){return Sc(e,n).map(o=>{const i=qr(o.variantId),a=o.itemPrice?o.itemPrice:{amount:0,currencyCode:t};return{...{discountAllocations:Wh(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:qr(o.productId)??null,title:o.title,vendor:o.vendor,type:o.productType,untranslatedTitle:o.untranslatedTitle??null,url:o.productUrl??null},sku:qh(o.sku)??null,title:o.subtitle??null,untranslatedTitle:o.untranslatedSubtitle??null},finalLinePrice:$h(o.lineAllocations),sellingPlanAllocation:Yh(o),properties:jh(o.properties)},lineComponents:o.lineComponents.map(c=>mT(c,t))}})}function $h(e){const t=e.reduce((n,r)=>n+r.totalAmountAfterLineDiscounts.amount,0);return Pc(t,e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function eT(e){const t=e.reduce((n,r)=>n+r.totalAmountAfterLineDiscounts.amount,0);return{totalAmount:Pc(t,e[0]?.totalAmountAfterLineDiscounts.currencyCode)}}function Pc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function Yh(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function jh(e){return e.map(t=>({key:t.name,value:String(t.value)}))}function tT(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=yf(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?vf(c,({method:d})=>d.cost.amount,({method:d,line:p})=>p.type==="ONE_TIME_PURCHASE"?Pf(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 nT(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function rT(e,t){const n=e.value;return n.typename==="FixedAmountValue"?t:{percentage:n.percentage}}function oT(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:HA(a.method.type),name:c}})}),i}function iT(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 Vd(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 sT(e,t){const n=new Map;return Sc(e,t).forEach(r=>{Ud(n,r),r.lineComponents.forEach(o=>Ud(n,o))}),n}function aT(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 lT(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=yf(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?vf(p,({method:f})=>f.cost.amount,({method:f,availableDeliveryLine:h})=>h.type==="ONE_TIME_PURCHASE"?Pf(f):void 0):new Set;return p.map(({method:f,availableDeliveryLine:h},g)=>cT(f,r&&o?aT(h,r,o):void 0,m.has(g))).filter(Boolean)}function cT(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 uT(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(Jr(i)){const a=i.amount;if(!a)return o;o.push(Gh(i.discount,a))}return o},[]):[]}function dT({orderId:e,customerId:t,isFirstOrder:n}){const r={id:yr(t)??t??null,isFirstOrder:n??null};return{id:yr(e)??e??null,customer:r}}function Vi({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=qr(si(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,_=ZA(e,c,a),P={selectedDeliveryOptions:lT(e,i,a,sT(e,a),fT(e,a),u)},v=!!m&&Vd("acceptEmailMarketing",e,i,a),E=Vd("acceptSmsMarketing",e,i,a),k=a?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let S=!1;a?S=!!E:S=E&&!!k;const I=S&&k||null,C=uT(e,a),w=a?.totalSavings||e?.current?.fields?.totalSavings.value||null,A=VA(e)||a?.checkoutTotalTaxes||{amount:0,currencyCode:c},T=tT(e,c,u,a),L=i?i.shippingAddress.value:e.current.fields.shippingAddress.value??a?.purchaseOrder?.shippingAddress,N={address1:L?.address1||null,address2:L?.address2||null,city:L?.city||null,country:L?.countryCode||null,countryCode:L?.countryCode||null,firstName:L?.firstName||null,lastName:L?.lastName||null,phone:L?.phone||null,province:L?.zoneCode||null,provinceCode:L?.zoneCode||null,zip:L?.postalCode||null},D=i?i.billingAddress.value:e.current.fields.billingAddress.value??a?.purchaseOrder?.billingAddress,O={address1:D?.address1||null,address2:D?.address2||null,city:D?.city||null,country:D?.countryCode||null,countryCode:D?.countryCode||null,firstName:D?.firstName||null,lastName:D?.lastName||null,phone:D?.phone||null,province:D?.zoneCode||null,provinceCode:D?.zoneCode||null,zip:D?.postalCode||null},B=dT({orderId:n,customerId:r,isFirstOrder:o}),z=e.current.fields.customAttributes.value,R=(z?.length?z:void 0)??a?.customAttributes??[],$=oT(e,a?.paymentDetails?.paymentGateway||void 0,a),j=iT(e,l,a);return{buyerAcceptsEmailMarketing:v,buyerAcceptsSmsMarketing:S,attributes:R,billingAddress:O,token:p,currencyCode:y,discountApplications:C,discountsAmount:w,email:m,phone:f,lineItems:_,localization:j,order:B,delivery:P,shippingAddress:N,subtotalPrice:h,shippingLine:{price:T},smsMarketingPhone:I,totalTax:A,totalPrice:g,transactions:$}}function pT(e){return{...e,value:"<redacted>"}}function Sc(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?_f(r.lines,o):[]}function Ud(e,t){const n=qr(t.variantId);n!==void 0&&e.set(t.stableId,n)}function mT(e,t){const n=qr(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Wh(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:qr(e.productId)??null,title:e.title,vendor:e.vend
2or,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:qh(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:$h(e.lineAllocations),sellingPlanAllocation:Yh(e),properties:jh(e.properties)}}function fT(e,t){const n=new Map,r=new Map;return Sc(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 hT={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function gT(e){return e in hT}function Kh(e){if(!gT(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 yT(e,t){if(Kh(e))return Vi(t)}function Pn(){const e=q().buyerIdentity;return x(()=>{const t=e.value?.customerProfile;return!!(t?.__typename==="BusinessCustomerProfile"&&t?.checkoutExperienceConfiguration?.editableShippingAddress)})}function Vn(){const[e,t]=ie(!1);return Rt(()=>{t(vT())},[]),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 vT(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Xe(e){return t=>`${e}${t}`}function _T(e){return e.replace(/:/g,"")}function $e(e,t){const n=_T(mf());return e??t(n)}const to="PortalHost",Jh="data-portal-order";function Xh(e){e.setAttribute(Jh,String(performance.now()))}function Qh(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(Jh));o>n&&(n=o,t=r)}return t}function Y7(e){const t=bT(e),n=Qh(document.getElementById(to));return t.some(r=>r instanceof Node&&n?.contains(r))}function j7(e){return e?Qh(document.getElementById(to))?.contains(e)??!1:!1}function K7(e){return e?document.getElementById(to)?.contains(e)??!1:!1}function bT(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 PT=Xe("Portal");function ST(){return s("div",{id:to})}function Pr({children:e}){const[t,n]=ie(null),r=$e(void 0,PT);return F(()=>{const o=document.getElementById(to)??document.body,i=document.createElement("div");return i.setAttribute("id",r),Xh(i),o.appendChild(i),n(i),()=>{o.removeChild(i)}},[r]),t&&$P(e,t)}var ET="_1rnsrjf0 _1fragem6y";const CT="checkout-web-ui:sprite-load-error";class Zh extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash=CT}}function kT(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 eg(e,t){return new Zh(`Failed to fetch sprite "${kT(e)}": ${t}`)}function pa(e,t){if(t instanceof Zh)return t;const n=t instanceof Error?t.message:String(t);return eg(e,n)}const zd={errorClass:"SpriteLoadError",severity:"warning"};function IT(e){const t=e.indexOf("#");return t===-1?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}class AT{#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(pa(t,o),zd)});return}r.error(pa(t,n),zd)}}#r(t){const n=fetch(t).then(r=>{if(!r.ok)throw eg(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:pa(t,r)}),r});return this.#e.set(t,{status:"pending",promise:n}),n}}function tg(e,t){try{return Hd.ensureFetched(e)}catch(n){throw Hd.reportLoadFailure(e,n,t),n}}const Hd=new AT,TT=["cdn.shopify.com"];function wT(e,t){let n;try{n=new URL(e)}catch{return t}return t?!0:n.protocol==="https:"&&TT.includes(n.hostname)}const Ec=qe(null);function LT({children:e,logger:t}){const n=Te([]),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(Ec.Provider,{value:r,children:[e,s(xT,{sprites:n})]})}function xT({sprites:e}){return s("div",{className:ET,"aria-hidden":"true",children:e.value.map(({url:t,content:n})=>s("div",{"data-sprite-url":t,dangerouslySetInnerHTML:{__html:n}},t))})}function RT({iconUrl:e,allowRelativeUrl:t}){const n=Te(!1);Rt(()=>{n.value=!0},[n]);const r=Se(Ec),{spriteUrl:o,symbolId:i}=IT(e);if(!wT(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(MT,{spriteUrl:o,symbolId:i});const a=tg(o,r?.logger);return s("span",{dangerouslySetInnerHTML:{__html:a},"aria-hidden":"true"})}function MT({spriteUrl:e,symbolId:t}){const n=Se(Ec);if(!n)throw new jl("No sprite registry available");const r=tg(e,n.logger);return Rt(()=>{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 NT=class extends ff{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function DT({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return s(NT,{fallback:t,children:s(YP,{fallback:t,children:s(RT,{iconUrl:e,allowRelativeUrl:n})})})}const ng=qe(void 0);function rg(){return Se(ng)}function sn({children:e,level:t}){const n=rg(),r=t??(n??0)+1;return s(ng.Provider,{value:r,children:e})}const og=qe({colorMix:!1,customProperties:!1,flexGap:!1});function OT({children:e}){const t=BT(),n=VT(),r=UT(),o=V(()=>({colorMix:t,customProperties:n,flexGap:r}),[t,n,r]);return s(og.Provider,{value:o,children:e})}function FT(){return Se(og)}function BT(){return V(()=>typeof CSS<"u"&&CSS.supports("color","color-mix(in srgb, red 50%, white)"),[])}function VT(){return V(()=>typeof window>"u"||typeof CSS<"u"&&CSS.supports("color","var(--test)"),[])}function UT(){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 ig=qe(null);function zT({children:e}){const[t,n]=ie(new Map),r=M(c=>t.get(c),[t]),o=M(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=M(c=>{n(u=>{const d=new Map(u);return d.delete(c),d})},[]),a=M(()=>{n(new Map)},[]),l=V(()=>({getInteraction:r,upsertInteraction:o,deleteInteraction:i,clearInteractions:a}),[a,i,r,o]);return s(ig.Provider,{value:l,children:e})}const sg="forwarding-external-new-window-message",HT="forwarding-new-window-message",qT="forwarding-external-message";function ag({external:e,native:t}){if(e&&t)return sg}const Cc=qe(null),GT=()=>Se(Cc),kc=qe(void 0),WT=Xe("Overlay");function $T({activatorRef:e,children:t}){const n=U(new Map),r=$e(void 0,WT),[o,i]=ie(()=>r),[a,l]=ie(!1),[c,u]=ie({}),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(kc.Provider,{value:d,children:t})}function Ic({children:e}){return s(kc.Provider,{value:void 0,children:s(Cc.Provider,{value:null,children:e})})}function nr(){const e=Se(kc);if(e)return e}const lg=qe(void 0),cg=()=>Se(lg),X7=()=>{const e=cg();return V(()=>({closeOverlay(t){e?.close(t)}}),[e])};function YT({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(lg.Provider,{value:n,children:e})}const Cs=qe(void 0);function jT({children:e}){const t=U({sheet:!1,modal:!1}),n=Te(0),r=x(()=>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(Cs.Provider,{value:o,children:e})}function KT(){return Se(Cs)?.isModalOpen}function JT(){return Se(Cs)?.openModalCount}function ug(e){const t=Se(Cs),[n,r]=ie(!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 XT(e){const t=nr(),n=ug(e);return V(()=>{if(!n)return;const{active:r,setActive:o}=n;if(t)return{...t,setActive:o,active:r}},[t,n])}const dg=qe(void 0);function QT({announcementEmitter:e,children:t}){return s(dg.Provider,{value:e,children:t})}function Q7(){const e=Se(dg);if(!e)throw new jl("Missing AnnouncementContext Context ");return e}var qd={LiveRegion:"_14u2r6s0 _1fragem121"};const ZT=1e4;class ew{#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()},ZT);return this.#r.set(t,r),()=>{this.#t.delete(t),clearTimeout(r),this.#r.delete(t),this.#i()}}}const pg=new ew;function Lt({content:e,role:t="status"}){return pg.announce({content:e,role:t})}function tw(){const[e,t]=ie([]),n=e.filter(o=>o.role==="status"),r=e.filter(o=>o.role==="alert");return F(()=>pg.subscribe(o=>{t(o)}),[]),s(G,{children:[s("div",{role:"status",className:qd.LiveRegion,children:n.map(({content:o,role:i})=>s("span",{children:o},`${o}-${i}`))}),s("div",{role:"alert",className:qd.LiveRegion,children:r.map(({content:o,role:i})=>s("span",{children:o},`${o}-${i}`))})]})}var ma="rij0560 _1fragem121";const Ac=qe(null);function rr(){const e=Se(Ac);if(e==null)throw new vr("No app context available");return e}function nw(){return Se(Ac)?.redesignedChoiceLists??!1}function Z7(){return rr().currency}function ln(){return rr().translate}function e3(){return rr().formatNumber}function rw(){return rr().linkComponent}function t3(){return rr().geolocation}function n3(){return rr().locale}function ow(){return rr().editor??!1}function iw(){return rr().inlineIcons}function sw({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(Ac.Provider,{value:h,children:s(QT,{announcementEmitter:p,children:s(OT,{children:s(sn,{children:s(jT,{children:s(YT,{children:s(zT,{children:[s(LT,{logger:f,children:e}),s(aw,{}),s(tw,{})]})})})})})})})}function aw(){const e=ln();return s(G,{children:[s("div",{id:sg,"aria-hidden":!0,className:ma,children:e("externalNewWindow")}),s("div",{id:HT,"aria-hidden":!0,className:ma,children:e("newWindow")}),s("div",{id:qT,"aria-hidden":!0,className:ma,children:e("external")})]})}function Gd(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 Wd(e){return/^span\s+\d+$/.test(e)?e:"auto"}function lw(e){if(e==="none")return"none";if(typeof e!="string"||!e.startsWith("translate(")||!e.endsWith(")"))return fa(e);const t=e.slice(10,-1).split(",");if(t.length>2)return fa(e);const n=$d(t[0].trim()),r=t.length===2?$d(t[1].trim()):0;return n===void 0||r===void 0?fa(e):`translateX(calc(${ji(n)} * ${Jn.global.transformDirectionModifier})) translateY(${ji(r)})`}function fa(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function $d(e){return mg(e)}function mg(e){if(e==="0")return 0;const t=Sf(e);if(!(t===void 0||t.unit!=="px"&&t.unit!=="%"))return t.unit==="%"?`${t.number}%`:t.number}function Ir(e){if(e==="auto"||typeof e!="string")return"auto";const t=mg(e);return t===void 0?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):ji(t)??"auto"}function Zi(e){return Go(e,{auto:!0,fitContent:!0})}function Yd(e){return Go(e,{none:!0})}function Go(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=Sf(e),r=n&&(n.unit==="px"||n.unit==="%"||n.unit==="ch"||n.unit==="em"||n.unit==="lh"||n.unit==="vh")?ji(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(
2Boolean);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 cw(e){return`url(${JSON.stringify(e)})`}const uw={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},dw={auto:"block",inline:"inline",block:"block",none:"none"},pw={auto:"inline",inline:"inline",block:"block",none:"none"},mw={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},Tc=e=>dw[e],fw=e=>pw[e],wc=e=>uw[e],hw=e=>mw[e],Sl=qe(void 0),ai=()=>Se(Sl),ks=qe(!1);function Un(){return Se(ks)}const Gr=qe(!1);function no(){return Se(Gr)}const jd=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function nn(e,t="slow",n=!1){const[r,o]=ie(n?!1:e),[i,a]=ie(!1),l=U(n?!1:e),c=U(()=>{o(l.current),a(!1)}),u=Vn();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?jd.get(d??"none"):jd.get(p??"none"));return()=>{clearTimeout(f),clearTimeout(m)}},[d,p,e]),i?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var ha={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 hn({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:i=["height"],onTransition:a}){const l=nn(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(ha.Transition,ha.transitionDurationVariant[o],i.includes("opacity")&&ha.transitionOpacity[l]),hidden:d,children:s("div",{ref:c,children:d&&!n?null:r})})}const Lc=qe(void 0);Lc.displayName="DisclosureContext";function r3({children:e,openByDefault:t,openMap:n,onToggle:r,duration:o="slow",transition:i="revealBlock"}){const a=Te({}),l=Te(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(Lc.Provider,{value:c,children:e})}function es({layoutId:e,activatorId:t}){const n=Se(Lc);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&&vw(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 gw=Xe("DisclosureActivator");function yw(e,t){const n=e.displayName||e.name||"Component",r=at(({id:o,toggles:i,...a},l)=>{const c=$e(o,gw),u=es({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:k=>{f(),_?.(k)}},...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 xc(e){const t=at((n,r)=>{const{id:o}=n,i=es({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(hn,{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 vw(e=[]){return typeof e=="boolean"?{}:(Array.isArray(e)?e:[e]).reduce((t,n)=>({...t,[n]:!0}),{})}const fg=100;function ga(e){return e?.type==="command"&&e.kind==="clipboard"}function ya(e){return e?.type==="command"&&e.kind==="visibility"}function Rr(e){return e?.type==="command"&&e.kind==="overlay"}function Mn(e){return e?.type==="interest"}function An(){const e=Se(ig);if(e===null)throw new vr("No Interactions in context");return e}function o3(){const{getInteraction:e}=An(),t=M(r=>{const o=e(r);Rr(o)?o.open():console.warn(`No overlay found for ID "${r}".`)},[e]),n=M(r=>{const o=e(r);Rr(o)?o.close():console.warn(`No overlay found for ID "${r}".`)},[e]);return{showOverlay:t,hideOverlay:n}}let Xn="",El=[],on=0,Cn=0,pr=[],va=!1;class Wr extends Error{}function _w(e){if(va)throw Error("Cannot tokenize recursively");for(va=!0,Xn=e,El=[],on=0,Cn=0,pr=[];!Rc();)Cn=on,Pw();if(Cn=on,dn("EOF"),va=!1,pr.length)throw new Wr(pr.join(`
3`));return El}function Rc(){return on>=Xn.length}function sr(){return Xn[on++]}function dn(e){const t=Xn.substring(Cn,on).trim();El.push({type:e,text:t})}function Kd(e){!Rc()&&Xn[on]===e&&on++}function bw(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}function go(){return Rc()?bg:Xn[on]}function Pw(){const e=sr();switch(e){case Cl:break;case hg:{dn("LEFT_PAREN");break}case gg:{dn("RIGHT_PAREN");break}case"@":{for(;!Jd.has(go());)sr();const t=Xn.substring(Cn,on);t==="@media"||t==="@container"?dn("MEDIA_TYPE"):pr.push(`Invalid media type "${t}" starting at position ${Cn}.`);break}case yg:{dn("COMMA");break}case _g:{Kd("="),dn("COMPARATOR");break}case vg:{Kd("="),dn("COMPARATOR");break}case Sw:case Ew:{for(Cn++;go()!==e;)sr();dn("IDENTIFIER"),sr();break}
3default:{if(bw(e)){for(;!Jd.has(go());)sr();const t=Xn.substring(Cn,on),n=t.toLowerCase();if(n==="and"||n==="or")t!==n?pr.push(`Keyword "${t}" is not case sensitive at position ${Cn}.`):dn("OPERATOR");else if(n==="inline-size"||n==="block-size")t!==n?pr.push(`Property "${t}" is not case sensitive at position ${Cn}.`):dn("PROPERTY");else{if(go()===Cl)for(sr();!Pg.has(go());)sr();dn("IDENTIFIER")}}else pr.push(`Unexpected character "${e}" at position ${on}.`);break}}}const hg="(",gg=")",yg=",",vg="<",_g=">",bg="\0",Cl=" ",Sw="'",Ew='"',Pg=new Set([bg,hg,gg,yg,vg,_g]),Jd=new Set([...Pg,Cl]);let Is=[],li=0;function Cw(e){return Is=e,li=0,Aw()}function kw(e){for(const t of e)if(Mc(t))return Nc(),!0;return!1}function Mc(e){return Sg()?!1:Array.isArray(e)?e.includes(Nn().type):Nn().type===e}function Nc(){return Sg()||li++,Dc()}function On(e,t){if(Mc(e))return Nc();throw new Wr(`${t}
4Instead we found this word/character: "${Nn().text}"`)}function Sg(){return Is[li].type==="EOF"}function Nn(){return Is[li]}function Dc(){return Is[li-1]}const Iw="s-default";function Aw(){const e={responsiveType:On("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if(e.responsiveType==="@container"){const n=Nn().type==="IDENTIFIER"?Nc().text:Iw;e.name=n}for(e.conditionalValues.push(Xd());kw(["COMMA"])&&Nn().type==="LEFT_PAREN";)e.conditionalValues.push(Xd());if(Dc().type!=="COMMA")throw new Wr(`Expected a comma before the fallback value of "${Nn().text}"`);if(e.fallbackValue=On("IDENTIFIER","Expected a final fallback value to be defined").text,Nn().type!=="EOF")throw new Wr(`Expected the query to end, instead found "${Nn().text}"`);return e}function Xd(){return{condition:Eg(),value:On("IDENTIFIER","Expected an identifier").text}}function Eg(){On("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=Qd();let t=null;Mc("COMPARATOR")&&(t=Qd(e.operator)),On("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"}),Nn().type==="OPERATOR"){const r=On("OPERATOR","Expected an operator"),o=Eg();return{type:"compound-condition",left:n,right:o,operator:r.text}}return n}function Qd(e){const t=e?Dc():On(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=On("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new Wr("Cannot have two different comparison operators (a less-than and a greater-than) in the same condition.");const r=On(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 Oc(e){try{return Cw(_w(e))}catch(t){if(t instanceof Wr)return{state:"invalid",error:t.message};throw new Error("Unknown error",{cause:t})}}function Fc(e){return typeof e=="string"&&e.startsWith("@container")}function Bc(e){return typeof e=="string"&&e.startsWith("@media")}function Cg(e,t){if(e===t)return!0;if(Hr(e))return Object.values(e).some(r=>Cg(r,t));if(!Fc(e)&&!Bc(e))return!1;const n=Oc(e);return n.state==="invalid"?!1:n.fallbackValue===t||n.conditionalValues.some(r=>r.value===t)}function Vc(e,t){return Hr(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)])):t(e)}function kg(e){const t=e,n=at(function(o,i){const{upsertInteraction:a,deleteInteraction:l}=An(),{display:c}=o,u=c==="none",d=V(()=>Cg(c,"none"),[c]),[p,m]=ie(),[f,h]=ie(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=M(()=>m("hidden"),[]),v=M(()=>m(I=>I==="hidden"||d?"shown":void 0),[d]),E=M(()=>m(I=>(I===void 0?!u:I==="shown")?"hidden":"shown"),[u]),{id:k}=o;if(F(()=>(k&&a({id:k,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:P,show:v,toggle:E,visible:g}),()=>{k&&l(k)}
4),[k,g,P,v,E,a,l]),k&&y)return null;const S=k&&_?{...o,display:"auto"}:o;return s(t,{...S,ref:i})});return n.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function Tw(e,{overlayType:t}){const n=at(function(o,i){const{open:a}=o,{upsertInteraction:l,deleteInteraction:c}=An(),{active:u,setActive:d}=Lw(t),p=nr(),{id:m,onClose:f,onHide:h}=o,g=M(()=>{d(!1),typeof f=="function"&&f(),typeof h=="function"&&h()},[d,f,h]),y=M(()=>{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 ww(e){const t=at(function(r,o){const{open:i,defaultOpen:a=!1,onToggle:l,id:c}=r,{upsertInteraction:u,deleteInteraction:d}=An(),[p,m]=ie(a),f=i??p,h=M(()=>{const _=f?"open":"closed",P=f?"closed":"open";i===void 0&&m(!f),l?.(_,P)},[f,l,i]),g=M(()=>{f&&(i===void 0&&m(!1),l?.("open","closed"))},[f,l,i]),y=M(()=>{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 Lw(e){return xw(e)()}function xw(e){return e==="modal"||e==="sheet"?()=>{const t=ug(e),n=ie(!1);if(t)return t;const[r,o]=n;return{active:r,setActive:o}}:()=>{const[t,n]=ie(!1);return{active:t,setActive:n}}}function Rw(e){const t=at(function(r,o){const{id:i,open:a}=r,{upsertInteraction:l,deleteInteraction:c}=An(),[u,d]=ie(!1),p=U(),m=M(()=>{p.current&&(clearTimeout(p.current),p.current=void 0)},[]),f=M(({delay:g=0}={})=>{if(m(),g>0){p.current=setTimeout(()=>d(!1),g);return}d(!1)},[m]),h=M(()=>{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 $r(e){return M(t=>{typeof e=="function"?e(t):e!=null&&(e.current=t)},[e])}function Wo(e,t){const n=$r(e),r=$r(t);return M(o=>{n(o),r(o)},[n,r])}const Mw=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Nw(e,t){return Mw.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Dw=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Uc(e,t){return Dw.map(n=>({[n]:Ow(t?.[n],Fw(n,e))})).reduce((n,r)=>({...n,...r}),{})}function Ow(e,t){return function(r){const o=typeof e=="function"?e(r):void 0;return t?.(r),o}}function Fw(e,t){return function(r){t?.trigger(e,r)}}function zc(e){const t=at(({overlay:n,...r},o)=>{const i=U(null),a=Wo(o,i);return n?s($T,{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 Ig(e,{focusActivatorWhenClosing:t=!1}={}){const n=at((r,o)=>{const{id:i,onClose:a,onHide:l}=r,c=nr(),u=cg();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 Ag(e){if(e)return`${e}Title`}function Bw(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 Vw(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 Tg=(e,t)=>{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)}},wg=qe(null),Uw=16;function Lg(){const e=Se(wg);if(e===null)throw new vr("No Popper in context");return e}function zw(){const[e,t]=ie(null),n=U(null),r=M(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 Rt(()=>()=>{n.current?.disconnect()},[]),[e,r]}function Hw(e){const[t,n]=ie(null),r=Te("ltr"),o=U([]),i=U(null),a=M(()=>{e!==null&&(r.value=window.getComputedStyle(e).direction==="rtl"?"rtl":"ltr",n(e.getBoundingClientRect()))},[e,r]);return Rt(()=>{a();const l=Tg(a,Uw);i.current=l,window.addEventListener("resize",a),window.addEventListener("scroll",l);for(const u of o.current)u.removeEventListener("scroll",l);const c=e?Bw(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 As=qe({}),Hc=()=>Se(As);function qw(e){return Ef.reduce((t,n)=>({...t,[n]:e(n)}),{})}const Zd=10;function Gw({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 Ww(e,t,n,r,{offset:o=0,preventOverflow:i=!1,sameInlineSize:a=!1,direction:l="ltr",fallbackPositions:c}={}){const{position:u,alignment:d}=ep(e,t,l),p=c?.map(({position:P,alignment:v})=>ep(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 _=_a(u,d,n,r,o,a,l);if(m.x=_.x,m.y=_.y,i){if(f=ba(m,n),$w(u,f)&&p?.length){const P=Ci(f);for(const v of p){const E=_a(v.position,v.alignment,n,r,o,a,l),k=ba(E,n);if(Ci(k)===0){m.x=E.x,m.y=E.y,f=k,g=v.position,y=v.alignment;break}}if(Ci(f)>0){let v=P;for(const E of p){const k=_a(E.position,E.alignment,n,r,o,a,l),S=ba(k,n),I=Ci(S);I<v&&(v=I,m.x=k.x,m.y=k.y,f=S,g=E.position,y=E.alignment)}}}f.right&&!f.left&&(m.x+=f.right,h=-Zd),!f.right&&f.left&&(m.x=0,h=Zd)}return{offsets:m,clipping:f,spacing:h,resolvedPosition:g,resolvedAlignment:y}}function i3(e,t){if(t==="center")return e;const r=e.startsWith("block")?"Inline":"Block";return`${e}Span${r}${t==="start"?"End":"Start"}`}function $w(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 Ci(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function ep(e,t,n){if(n==="ltr")return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};
4case"inlineEnd":return{position:"inlineStart",alignment:t};default:return t==="center"?{position:e,alignment:t}:{position:e,alignment:t==="start"?"end":"start"}}}function _a(e,t,n,r,o,i,a){const l={x:0,y:0},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 ba(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 xg=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function Rg(e){return xg.test(e)}function Mg(e){const t=e.match(xg);if(!t)return null;const[,n,r,,o,i]=t;return{axis:n,edge:r,...o&&i?{spanAxis:o,spanEdge:i}:{}}}function kl(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}function Yw(e){const t=Mg(e);return t?kl({...t,edge:t.edge==="start"?"end":"start"}):e}function jw(e){const t=Yw(e),n=Kw(e);return[t,...n].join(", ")}function Kw(e){const t=Mg(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[kl({axis:n,edge:"start",...r}),kl({axis:n,edge:"end",...r})]}var yo={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 tp(e){if(Rg(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:Ki(t),alignment:n.includes("start")?"end":"start"}:{position:Ki(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function Jw(e){return e.split(",").map(t=>t.trim()).filter(t=>!!Rg(t))}function Xw({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}=Hw(e),[m,f]=zw(),h=U(null),g=M(D=>{f(D),h.current=D},[f]),[y,_]=ie(""),{current:P,parent:v}=Hc(),E=Te("absolute"),{position:k,alignment:S}=tp(a),I=V(()=>{if(l!=="none")return l??jw(a)},[l,a]),{clipping:C,offsets:w,spacing:A,resolvedPosition:T,resolvedAlignment:L}=V(()=>Ww(k,S,m,d,{direction:p,offset:o,preventOverflow:c,sameInlineSize:u,fallbackPositions:I?Jw(I).map(tp):void 0}),[p,o,k,S,m,c,d,u,I]),N=V(()=>({clipping:C,offsets:w,position:T,alignment:L,popperRect:m,referenceRect:d,spacing:A}),[C,w,T,L,m,d,A]);return Rt(()=>{const D=e&&Vw(e)?"fixed":"absolute";E.value=D;const O=D==="absolute"?window.scrollX||window.pageXOffset:0,B=D==="absolute"&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:z,y:R}=Gw({x:w.x+A+O,y:w.y+B});_((window.devicePixelRatio||1)<2?`translate(${z}px, ${R}px)`:`translate3d(${z}px, ${R}px, 0)`)},[w.x,w.y,A,e]),Rt(()=>{if(n)return;const D=h.current?.parentElement;D&&Xh(D)},[n]),s(wg.Provider,{value:N,children:s(Pr,{children:s("div",{className:Y(yo.Popper,yo.positionVariant[E.value],(v??P)&&yo.colorSchemeVariant[v??P],n&&yo.hidden),style:{...d&&{transform:y,...u&&{width:d.width},...i&&{minWidth:ds(i)}}},ref:g,id:r,"aria-hidden":n||void 0,"data-popper-hidden":n||void 0,children:v&&P?s("div",{className:yo.colorSchemeVariant[P],children:t}):t})})})}var Mr={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inline
4End:"by0ptki"},Tooltip:"by0ptk8 by0ptk7 _1fragempp _1fragemri _1fragemnw _1fragemtb _1fragem6e _1fragem11k _1fragemws _1fragemyt _1fragem124 _1fragemy5",tooltipPositionVariant:{blockStart:"by0ptk9",blockEnd:"by0ptka",inlineStart:"by0ptkb",inlineEnd:"by0ptkc"},tooltipTransitionVariant:{entered:"by0ptk0",exit:"by0ptk1",exiting:"by0ptk2",enter:"by0ptk3",entering:"by0ptk4",exited:"by0ptk5"}};const Qw="base",Zw=8;function Sn(e){const{children:t,id:n}=e,r=U(!1),o=nr(),{active:i=!1,setActive:a}=o??{},l=M(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(Il,{id:n,open:i,onMouseEnter:()=>{r.current||a?.(!0)},onMouseLeave:()=>{a?.(!1)},children:t})]})):s(Il,{...e})}const Il=Ig(Rw(function({children:t,id:n,open:r,onMouseEnter:o,onMouseLeave:i}){const{getInteraction:a}=An(),l=n?a(n):void 0,c=()=>{Mn(l)&&l.show(),o?.()},u=()=>{Mn(l)&&l.hide({delay:fg}),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=nn(!!r,{exit:Qw}),h=!!(n&&Mn(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(Xw,{activator:m,preventOverflow:!0,offset:Zw,children:s(eL,{id:h?void 0:n,transition:f,onMouseEnter:c,onMouseLeave:u,children:t})})]})}));function eL({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:o}){const{clipping:i,spacing:a,position:l}=Lg(),c=l==="blockStart"||l==="blockEnd",u=i.right||i.left,d=c&&u?vn({[Mr.arrowNudge]:`${u+a}px`}):void 0,p=Y(Mr.Tooltip,Mr.tooltipPositionVariant[l],Mr.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(tL,{})]})}function tL(){const{position:e}=Lg();return s("div",{className:Y(Mr.Arrow,Mr.arrowPositionVariant[e])})}async function nL(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 vr("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 vr("Failed to copy text to clipboard")}const rL=2500,np=Xe("CommandInvoker");function oL(e){e instanceof HTMLElement&&document.activeElement!==e&&e.focus({preventScroll:!0})}function qc(e,{commands:{clipboard:t=!0,visibility:n=!0,overlay:r=!0}={}}={}){const o=e.displayName||e.name||"Component",i=at(function({command:d,commandFor:p,onClick:m,overlay:f,...h},g){const{getInteraction:y}=An(),[_,P]=ie(!1),[v,E]=ie(""),k=ln(),S=p?y(p):void 0,I=ga(S)&&S.clipboard.text!=null?S:void 0,C=M(async()=>{m?.();const{text:T,onCopy:L,onCopyError:N}=I.clipboard;let D=!1;try{await nL(T),D=!0}catch(O){console.warn("ClipboardItem: failed to copy text to clipboard",O)}finally{if(D){const O=k("clipboardCopied");E(O),P(!0),Lt({content:O}),L?.()}else{const O=k("clipboardFailedToCopy");E(O),P(!0),Lt({content:O}),N?.()}A(),w.current=setTimeout(()=>{P(!1)},rL)}},[m,I,k]),w=U(),A=()=>{w.current&&clearTimeout(w.current)};return F(()=>()=>A(),[]),s(e,{...h,command:d,commandFor:p,onClick:I?C:m,overlay:I?s(Il,{open:_,children:v}):f,ref:g})}),a=at(function({commandFor:d,id:p,onClick:m,...f},h){const g=$e(p,np),y=es({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=at(function({command:d,commandFor:p,id:m,onClick:f,...h},g){const y=$e(m,np),{getInteraction:_,upsertInteraction:P}=An(),v=p?_(p):void 0,E=U(null),k=Wo(g,E),S=M(I=>{const C=p?_(p):void 0;if(Rr(C)){const{overlayType:w}=C;E.current&&w==="popover"&&I&&P({...C,invokerRef:E})}},[p,_,P]);if(v){let I={};if(ya(v)){const{hide:C,show:w,toggle:A,visible:T}=v;I={onClick:()=>{switch(d){case"--hide":C();break;case"--show":w();break;case"--toggle":A();break}f?.()},"aria-controls":p,"aria-expanded":T}}else if(Rr(v)){const{active:C,close:w,open:A,overlayType:T,toggle:L}=v;I={onClick:()=>{switch((d==="--show"||d==="--toggle"&&!C)&&oL(E.current),d){case"--hide":w();break;case"--show":A();break;case"--toggle":L();break}S(!C),f?.()},...(T==="modal"||T==="sheet")&&{"aria-haspopup":"dialog"},...T==="popover"&&{"aria-controls":p,"aria-expanded":C}}}return s(e,{...h,command:d,commandFor:p,id:y,...I,ref:k})}return null}),c=at(function({command:d="--auto",commandFor:p,...m},f){const{getInteraction:h}=An();if(es({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&&!Mn(y)){const{defaultCommand:_}=y,P=d==="--auto"?_:d;if(P==="--copy"&&t&&ga(y))return s(i,{...m,command:P,commandFor:p,ref:f});if((P==="--hide"||P==="--show"||P==="--toggle")&&(n&&ya(y)||r&&Rr(y)))return s(l,{...m,command:P,commandFor:p,ref:f});if(P==="--show"||P==="--hide"||P==="--toggle"||P==="--copy"){let v;ga(y)?v="clipboard":ya(y)?v="visibility":Rr(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 iL(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ci(e,{tapToggles:t=!1}={}){const n=e.displayName||e.name||"Component",r=at(function({interestFor:i,...a},l){const{onBlur:c,onClick:u,onFocus:d,onMouseEnter:p,onMouseLeave:m}=a,{getInteraction:f,upsertInteraction:h}=An(),g=i?f(i):void 0,y=U(null),_=U(),P=U(),v=M(A=>{if(P.current?.(),P.current=void 0,!(A instanceof HTMLElement))return;const T=L=>{_.current=L.pointerType};A.addEventListener("pointerenter",T),P.current=()=>{A.removeEventListener("pointerenter",T)}},[]),E=Wo(l,y),k=Wo(E,v),S=M(A=>{const T=i?f(i):void 0;Mn(T)&&h(A?{...T,invokerRef:y}:{...T,invokerRef:void 0})},[i,f,h]),I=Mn(g)&&g.active,C=M(A=>{["Escape","Esc"].includes(A.key)&&Mn(g)&&(A.preventDefault(),g.hide(),S(!1))},[g,S]);F(()=>
4{if(I)return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[I,C]);const w=M(A=>{const T=A.target;!(T instanceof Node)||y.current?.contains(T)||T instanceof Element&&T.closest('[role="tooltip"]')||Mn(g)&&(g.hide(),S(!1))},[g,S]);if(F(()=>{if(t&&I)return document.addEventListener("click",w),()=>{document.removeEventListener("click",w)}},[I,w]),Mn(g)){const A={"aria-describedby":i,onFocus:()=>{(_.current!=="touch"||iL(y.current))&&(g.show(),S(!0)),d?.()},onBlur:()=>{g.hide(),S(!1),c?.()},onMouseLeave:()=>{g.hide({delay:fg}),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:k})}return s(e,{...a,ref:l})});return r.displayName=`InterestInvokerComponent(${n})`,r}const Al=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]])),en={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"},Pa={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},Sa={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},sL={auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},Ea={auto:"auto",hidden:"hidden"},aL={base:"base",transparent:"transparent",subdued:"subdued"},Gc={alignContent:{...Pa},placeContent:{...Pa},alignItems:{...Sa},alignSelf:{...sL},placeItems:{...Sa},backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:aL,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:{...Pa},justifyItems:{...Sa},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...Ea},overflowBlock:{...Ea},overflowInline:{...Ea},padding:{...en},paddingBlock:{...en},paddingInline:{...en},paddingBlockStart:{...en},paddingBlockEnd:{...en},paddingInlineStart:{...en},paddingInlineEnd:{...en},gap:{...en},rowGap:{...en},columnGap:{...en},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},ko=4,Ng={borderRadius:{limit:ko},borderStyle:{limit:ko},borderWidth:{limit:ko},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:ko},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},Wc={backgroundImage:cw,blockSize:Zi,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:Wd,gridRow:Wd,gridTemplateColumns:Gd,gridTemplateRows:Gd,inlineSize:Zi,insetBlock:Ir,insetBlockEnd:Ir,insetBlockStart:Ir,insetInline:Ir,insetInlineEnd:Ir,insetInlineStart:Ir,maxBlockSize:Yd,maxInlineSize:Yd,minBlockSize:Go,minInlineSize:Go,transform:lw},lL=/\s+/;function Ts(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[d,p]of Object.entries(e))p===void 0||p===""||(r[d]=d in Ng?uL(p,d):p);const o=n?cL(rp(r,t)):rp(r,t),i=op(o,Wc),a=op(o,Gc),l=bt(i),{className:c,style:u}=dS(a);return{className:Y(l,c),style:u}}function cL(e){const t={};for(const[n,r]of Object.entries(e))(!(n in Al)||r!==Al[n])&&(t[n]=r);return t}function uL(e,t){const{limit:n}=Ng[t];return Vc(e,r=>{if(r===void 0||typeof r!="string")return;const o=r.trim().split(lL,n??ko);return o.length===1?o[0]:(o.length===3&&o.push(o[1]),o)})}function rp(e,t){const n={},r=(o,i)=>{const a=pL({property:o,value:i},t),l=dL(o,a);for(const[c,u]of Object.entries(l)){const d=n[c];Hr(d)&&Hr(u)?n[c]={...d,...u}:n[c]=u}};for(const o of wo)o in e&&r(o,e[o]);for(const[o,i]of Object.entries(e))wo.includes(o)||r(o,i);return n}function dL(e,t){const n=hr(e);if(!n||n.length===0)return{[e]:t};if(Hr(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]=dd(p)?p[l]:p;a[c]=u}return a}const r=dd(t),o={};for(let i=0;i<n.length;i++)o[n[i]]=r?t[i]:t;return o}function pL(e,t){if(mL(e))return hL(e.property,e.value,t);if(fL(e))return gL(e.property,e.value,t)}function mL(e){return e.property in Wc}function fL(e){return e.property in Gc}function hL(e,t,n){const r=n?.transforms?.[e]??Wc[e],o=Vc(t,a=>{if(a!==void 0)return Cf(a)?Dg(a.map(l=>r?.(l))):r?.(a)});if(!Hr(o))return o;const i=Object.entries(o).filter(([,a])=>a!==void 0&&a!=="");return i.length>0?Object.fromEntries(i):void 0}function gL(e,t,n){const r=Gc[e],o=i=>{const a=n?.transforms?.[e]?.(i);return r[a??i]};return Vc(t,i=>Cf(i)?Dg(i.map(o)):o(i))}function Dg(e){if(!Array.isArray(e)||e.length!==2)return e;const[t,n]=e;return[t,n,t,n]}function op(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const Ca=Object.keys(Vo).filter(e=>
4e!=="base"),Fr=new Set([">",">="]),ts=new Set(["<","<="]);function Og(e){return e==="inline-size"}function yL(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=Fr.has(t.operator),a=Fr.has(n.operator),l=ts.has(t.operator),c=ts.has(n.operator);return i&&c||l&&a?(i?r:o)<(l?r:o):!1}function vL(e){const t=e.left,n=e.right,r=Fr.has(t.operator),o=Fr.has(n.operator),i=ts.has(t.operator),a=ts.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 Fr.has(l.operator)?!0:(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>=' operators. Found '${l.operator}' in condition '${l.property} ${l.operator} ${l.value}'. Use '>' or '>=' instead.`),!1)}function _L(e){if(e.state==="invalid")return e;function t(o){return Og(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:yL(o)?vL(o):n(o.left)&&n(o.right):o.type==="condition"&&t(o.property)?Fr.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 bL(e,t){if(e.state==="invalid")return e;const n=t?` for property '${t}'`:"";function r(c){return Og(c)?!0:(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${c}'.`),!1)}function o(c){return Ca.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 '${Ca.join("', '")}' instead.`:`Media queries should use valid breakpoints${n}. Found '${c}'. Use one of '${Ca.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 PL=Xe("ContainerQueryStyle");function SL(e,t){const n=$e(void 0,PL),{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(!Fc(m))continue;const f=_L(Oc(m));if(f.state==="invalid")continue;l[p]=f.fallbackValue;const g=f.conditionalValues.map(y=>{const _=EL({cssClassNameSelector:n,property:p,value:y.value,config:t});return _?`${f.responsiveType}${f.responsiveType==="@container"?`${f.name?` ${f.name} `:""}`:""}${Tl(y.condition)}{${_}}`:""}).filter(Boolean).join("");c.push({property:p,cssString:g})}const{className:u,style:d}=Ts(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 EL({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:o,style:i}=Ts({[t]:n},r);if(!o)return null;const a=CL(o);return a?kL(a,e,i):null}const ka=new Map;function CL(e){if(ka.has(e))return ka.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 ka.set(e,r),r}function kL(e,t,n){const r=e.split(`
6`),o=[];for(const i of r){const a=i.match(/^([^{]+)\{([^}]+)\}/);
6if(a){const l=a[1].trim(),c=a[2].trim(),u=IL(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 IL(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 Tl(e){if(e.type==="compound-condition"){const t=Tl(e.left),n=Tl(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function AL(e,t){return V(()=>!e||Object.keys(e).length===0?{className:"",style:{}}:Ts(e,t,{filterDefaultValues:!0}),[t,e])}function TL(e,t){const{className:n,style:r}=V(()=>{const o={};if(!e)return{className:"",style:{}};for(const[i,a]of Object.entries(e)){if(!Bc(a)){o[i]=a;continue}const l=bL(Oc(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 Ts(o,t)},[t,e]);return{className:Y(n),style:r}}function Tt(e,t){const{containerQueryProps:n,mediaQueryProps:r,literalProps:o}=V(()=>{const g={},y={},_={};for(const[v,E]of Object.entries(e||{}))E!=null&&(Fc(E)?g[v]=E:Bc(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,k]of Object.entries(_)){if(kf(k))continue;const S=hr(E);if(S?.length&&ar(S[0],k))continue;const I=S?.length?S:[E];if(I.some(C=>P.has(C))){y[E]=k,delete _[E];for(const C of I)P.add(C);v=!0}}}return{containerQueryProps:g,mediaQueryProps:y,literalProps:_}},[e]),{className:i,style:a,styleElement:l}=SL(n,t),{className:c,style:u}=TL(r,t),{className:d,style:p}=AL(o,t);wL(n,r,o),LL(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=Al[e];return n!==void 0&&t===n}function wL(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(wo.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(wo.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(wo.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>0&&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 LL(e){const t=Object.keys(e).filter(n=>kf(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 xL="_1M6e9",RL={UnstyledLink:xL},ws=ci(qc(zc(at(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=rw(),v=Un(),E=typeof m=="function"?()=>m():void 0,k=typeof f=="function"?()=>f():void 0,S=typeof h=="function"?()=>h():void 0,I=a??RL.UnstyledLink,C=nr(),w=Uc(C,{onClick:E,onFocus:k,onMouseEnter:S}),A=C?.activatorAttributes,T=n||v?!0:void 0,L=T?-1:void 0;return P?s(P,{className:I,"aria-busy":t||void 0,"aria-hidden":T,"aria-label":r,"aria-live":o,href:u,id:d,lang:p,ref:_,tabIndex:L,target:g,...w,...A,...y,children:i}):s("a",{"aria-busy":t||void 0,"aria-describedby":ag({external:g==="_blank"||!1,native:!0}),"aria-label":r,"aria-live":o,"aria-hidden":T,className:I,href:u,id:d,lang:p,ref:_,rel:g==="_blank"?"noopener noreferrer":void 0,tabIndex:L,target:g==="_blank"?g:void 0,...w,...A,...y,children:i})}))));function ro(){const e=Se(If);if(e==null)throw new vr("No theme found in context");return e}function ct(){const e=ro();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,It(()=>n.value[i])),r.get(i).value}});
6t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:o}}return t.current.reactiveConfiguration}function oo(e){const t=at(function({disableGlobalBranding:r,...o},i){const{global:{cornerRadius:a}}=ct(),l=pS(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 ki={Clickable:"_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw",overflowHidden:"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",visuallyHidden:"_1s82kpb5 _1fragem121",inert:"_1s82kpb2 _1fragemz0"};const Tn=yw(oo(ci(qc(zc(at(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:k=!1,maxBlockSize:S="none",maxInlineSize:I="none",minBlockSize:C="0",minInlineSize:w="0",onBlur:A,onClick:T,onFocus:L,onPointerDown:N,onPointerEnter:D,onPointerLeave:O,onPointerUp:B,overflow:z="visible",padding:R="none",paddingBlock:$,paddingInline:j,paddingBlockEnd:ee,paddingBlockStart:ae,paddingInlineEnd:K,paddingInlineStart:Q,target:X="auto",type:H="button",...ue},re){F(()=>{y!=null&&f==null&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[f,y]);const le=Un(),de=nr(),{className:ke,style:he,styleElement:ve}=Tt({backgroundColor:r,blockSize:o,..._r({border:i,borderStyle:l,borderWidth:c}),borderRadius:a,display:g,inlineSize:v,maxBlockSize:S,maxInlineSize:I,minInlineSize:w,minBlockSize:C,padding:R,paddingBlock:$,paddingBlockEnd:ee,paddingBlockStart:ae,paddingInline:j,paddingInlineEnd:K,paddingInlineStart:Q},{transforms:{display:Tc}}),Ee=Y(ki.Clickable,n==="exclusive"&&ki.visuallyHidden,ke,z==="hidden"&&ki.overflowHidden,le&&ki.inert,d),De=ai(),Ie=$r(re),Ue=Uc(de,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{D?.()},onMouseLeave:()=>{O?.()},onMouseDown:Me=>{N&&Me.button===0&&N?.()},onMouseUp:()=>{B?.()}}),je=Nw(de,{"aria-controls":f,"aria-expanded":y}),te=k?"assertive":void 0,oe=n==="hidden"||le,we={className:Ee,id:P,lang:E,style:he,tabIndex:oe?-1:void 0,...je,...Ue,...ue};return s(G,{children:[ve,s(Gr.Provider,{value:!0,children:_&&m===void 0?s(ws,{...we,href:_,ref:Ie,ariaBusy:k,ariaHidden:oe?!0:void 0,ariaLive:te,ariaLabel:t,target:X,children:u}):s("button",{ref:Ie,type:m?"button":H,disabled:h||k,form:H==="submit"&&De?.nested?De.id:void 0,"aria-busy":k,"aria-hidden":oe?!0:void 0,"aria-live":te,"aria-label":t,...we,children:u})})]})})))))),ip="generic",Ia=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 ui(e,{defaultRole:t=ip,defaultElement:n="div"}={}){const r=Ia.get(e??t)??Ia.get(t)??Ia.get(ip);return{Element:r.element??n,role:r.role}}var Aa={Grid:"_1mrl40q0 _1fragemws",overflowHidden:"_1mrl40q1 _1fragemup _1fragemv4",visuallyHidden:"_1mrl40q2 _1fragem121"};const gt=xc(oo(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:k="none",gridTemplateRows:S="none",id:I,inlineSize:C="auto",justifyContent:w,justifyItems:A,maxBlockSize:T="none",maxInlineSize:L="none",minBlockSize:N="0",minInlineSize:D="0",overflow:O="visible",padding:B="none",paddingBlock:z,paddingBlockEnd:R,paddingBlockStart:$,paddingInline:j,paddingInlineEnd:ee,paddingInlineStart:ae,placeContent:K="normal normal",placeItems:Q="normal normal",rowGap:X,...H}){const ue=no(),{Element:re,role:le}=ui(n,{defaultElement:ue?"span":"div"}),{className:de,style:ke,styleElement:he}=Tt({gap:_,placeContent:K,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:k,gridTemplateRows:S,inlineSize:C,justifyContent:w,justifyItems:A,max
6BlockSize:T,maxInlineSize:L,minBlockSize:N,minInlineSize:D,padding:B,paddingBlock:z,paddingBlockEnd:R,paddingBlockStart:$,paddingInline:j,paddingInlineEnd:ee,paddingInlineStart:ae,rowGap:X},{transforms:{blockSize:Zi,display:hw}});return s(G,{children:[he,s(re,{"aria-hidden":r==="hidden"?!0:void 0,"aria-label":t,className:Y(Aa.Grid,r==="exclusive"&&Aa.visuallyHidden,O==="hidden"&&Aa.overflowHidden,de),id:I,role:le,style:ke,...H,children:h})]})})),ML="/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg",NL=["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 DL=1.7142857142857142,qn={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 OL=!1,FL=["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"],BL=["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 Re({interestFor:e,...t}){return e?s(UL,{...t,interestFor:e}):s(VL,{...t})}function VL({accessibilityLabel:e,...t}){const{className:n,children:r}=Fg(t);return s("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const UL=ci(at(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}=Fg(u);return s("span",{role:"img",tabIndex:n?0:void 0,id:r,ref:d,className:Y(qn.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 Fg({type:e,tone:t="auto",color:n="base",size:r="base",display:o="block",className:i}){const{icons:a}=ct(),l=iw()??OL;let c;e?c=e:(e===""||console.warn(`"${e}" is not a valid <Icon /> type`),c="empty");const u=FL.includes(c),d=BL.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(qn.Icon,qn.toneVariant[t],(t==="auto"||t==="neutral")&&qn.colorVariant[n],qn.displayVariant[o],qn.sizeVariant[p],u&&qn.mirrored,qn.fillVariant[d],i);let f=zL(c);f||(console.warn(`"${c}" is not a valid <Icon /> type`),f="empty");const h=a[f],g=h??`${ML}#${f}`,y=s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:s("use",{href:g})}),_=h!=null||l?s(DT,{iconUrl:g,fallback:y,allowRelativeUrl:h==null}):y;return{className:m,children:_}}function zL(e){const t=Ki(e);if(t in sp)return sp[t];if(NL.includes(t))return t}const sp={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 HL={Toast:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120"};const qL=5300;function GL({message:e,dismiss:t}){const n=ln();return F(()=>Lt({content:e}),[e]),F(()=>{const r=setTimeout(t,qL);return()=>clearTimeout(r)},[t]),s("span",{className:HL.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(Tn,{onClick:t,accessibilityLabel:n("closeNotification"),children:s(Re,{type:"x",size:"small",tone:"monochrome"})})]})})}var WL={Container:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z"};const Bg=qe(null);function $L({children:e,handleToast:t}){const[n,r]=ie([]),o=U(0),i=M(c=>{r(u=>u.filter(d=>d.id!==c))},[]),a=M(()=>(o.current+=1,`toast-message-${o.current}`),[]),l=V(()=>({setMessages:r,removeMessage:i,createMessageId:a,handleToast:t}),[r,i,a,t]);return s(Bg.Provider,{value:l,children:[e,n.length>
60?s(Pr,{children:s(YL,{children:n.map(({id:c,content:u})=>s(GL,{message:u,dismiss:()=>i(c)},c))})}):null]})}function YL({children:e}){const t=Vn(),n=U(null),r=U(void 0);return Rt(()=>{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:WL.Container,children:e})}function $c(){const e=Se(Bg),{setMessages:t,removeMessage:n,createMessageId:r,handleToast:o}=e??{};return M(a=>{if(!t||!n||!r)throw new vr("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 ap(e,t){if(!e)throw new TypeError(t)}function Ar(e){return V(()=>Af(e),[])}function Ls(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 s3="·",jL=150,KL=100,a3="ASAP",Vg=mt("ShippingMethodsContext");function Yc(){const e=Se(Vg);if(e!=null)return e}function JL(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 XL(){const{observability:e}=b();return M((n,r)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:n,attributes:{apiClientId:r.toString()}})},[e])}const QL=()=>Kl((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"),ZL=["streetName","streetNumber","neighborhood","line2"];function ex(e,t){const n=V(QL,[e]),r=n.value;Ls(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(()=>{if(r==="debounced"||r==="ignored"){const o=setTimeout(()=>{n.value="timeout"},KL);return()=>{clearTimeout(o)}}},[n,r]),F(()=>{let o=!1;const a=Object.keys(e.fields).filter(l=>!["countryCode",...ZL].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 Ug(){const{shop:{shippingRatesReloadStrategy:e}}=b();return M(({countryCode:t,zoneCode:n})=>{try{ap(typeof t=="string","Expected a country code");const r=e.get(t);switch(ap(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 l3(){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=fS(o,i);return{...r,[u]:l}},{})}function xs(e,t){const n=e.value;
6if(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||Be(d)===a)});l&&(l.value={...l.value,deliveryMethodHandle:o})})}function di(e,t,n){const{parts:r}=Ot(),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 c3(e){return!!di(e)?.fields}function tx(e,t){const n=di(e,t);return[n?.fields.deliveryMethodTypes.value||[],M(r=>{n&&(n.value={...n.value,deliveryMethodTypes:r})},[n])]}function u3({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:n}){const r=di(e,t,n);return[r?.fields.deliveryMethodHandle.value||void 0,M(o=>{r&&(r.value={...r.value,deliveryMethodHandle:o})},[r])]}function d3(e,t){const n=di(e,t);return V(()=>n?.fields.deliveryMethodOptions.value.phone||ce(void 0),[n])}function p3(e,t){const n=di(e,t);return V(()=>n?.fields.deliveryMethodOptions.value.instructions||ce(void 0),[n])}function m3(e,t){const n=t==="ONE_TIME_PURCHASE"?"SUBSCRIPTION":"ONE_TIME_PURCHASE",r=q().deliveryNext,o=d=>ti(r.value).filter(Jl).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}=se(),c=x(()=>zg({proposedDeliveryLines:l})),u=M(d=>{xs(l,{[n]:d})},[l,n]);return{inverseGroupType:n,inverseGroupDeliveryMethodHandle:c.value,setInverseGroupDeliveryMethodHandle:u,getInverseGroupDeliveryMethodHandle:a}}function nx(){const{parts:e}=Ot();return M(n=>{e.deliveryLines.value.forEach(r=>{r.value={...r.value,deliveryMethodHandle:n}})},[e.deliveryLines])}function Hg(){const{parts:e}=Ot(),t=mS(e.deliveryLines.peek()),n=M(r=>{e.deliveryLines.value.forEach(o=>{o.value={...o.value,deliveryMethodTypes:r}})},[e.deliveryLines]);return[t,n]}function f3(){const{parts:e}=Ot(),{negotiate:t}=Nt(),{i18n:n}=b(),r=$c(),o=er(),i=Yc();return M(({targetDeliveryMethodType:l,merchandiseStableIds:c})=>{const{orphanedMovedToShipping:u,orphanedRemovedFromCartStableIds:d}=hS({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 rx(){const{deliveryLines:e,deliveryMacros:t}=se(),{negotiate:n}=Nt(),r=zg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:!0}),o=V(()=>{if(t.value?.length)return gS(t.value,r)},[t.value,r]),i=M(async a=>{if(!a||a===o?.id)return;const l=t.value.find(({id:c})=>c===a);if(l)return xs(e,l.deliveryMethodHandles),n({include:["contactInfo","shippingAddress","merchandiseLines","deliveryNext"]})},[e,t,o,n]);return{selectedMacro:o,setSelectedMacro:i}}function jc(){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 ox=mt("CheckoutSheetProtocolContext"),ix=mt("MobileCheckoutSdkContext");function Rs(){const e=Se(ox),t=Se(ix);return e??t??null}function sx(e,t){return e==null||e==="MERCHANT"&&t==="checkout_started"}function Kc(e){const t=Rs();return sx(t?.config?.type,e)}function Ms(){const{checkout:e,shop:t}=b();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(yS)}function Ns(){const{checkout:e,shop:t}=b();return Ms()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(vS))}class Io extends bn{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}
6class ax extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let Ii=null;function lx({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(Ii)return Ii;const h=parseInt(Be(t),10),g=WA(),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 k=c[y];return k&&(v.setAttribute("integrity",k),v.setAttribute("crossorigin","anonymous")),Ii=new Promise((S,I)=>{if(v.onload=()=>{if(cx())return;if(window.webPixelsManager==null||!("init"in window.webPixelsManager)){I(new Io("WebPixelManager is not available"));return}const w=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:P,surface:a,webPixelsConfigList:n.map(A=>{const T=A.dataSharingAdjustments&&{dataSharingAdjustments:A.dataSharingAdjustments},L=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,...T,...L}}),initData:o,enabledBetaFlags:i,monorailRegion:l});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=w.publishCustomEvent,window.Shopify.analytics.initialized=!0,S(w)},v.onerror=()=>{I(new Io(`Failed to load WebPixelManager runtime from ${_}`))},document.querySelector(`script[src="${v.src}"]`))I(new Io("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(v)}catch{throw new Io("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),Ii}function cx(){return!!window.Shopify?.analytics?.initialized}const qg=mt("webPixels");function ux({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(_S),f=JA(),g=Rs()?.config?.pixelEventsMode,y=n?.configuration?.pixelMode,_=!!n?.isCheckoutKit({includeLegacyCsk:!1}),P=g==="DISABLED"||y==="DISABLED",{checkoutProtocolPresentedSignal:v}=Mt(),E=v.value,k=_&&n?.isPreload===!0&&!E,I=Ns()&&i.phase.value!=="settled"&&(d.currentUrlMatches("/thank-you")||d.currentUrlMatches("/processing")&&i.progress!=null&&i.progress.phase.value!=="cancelled"),C=r.webPixelsManager.url;r.webPixelsManager.type;const w=r.webPixelsManagerExtensions.url,A=U(),T=U(),L=U(!1),[N]=ie(()=>{const z=new Promise((R,$)=>{A.current=R,T.current=$});return z.catch(()=>{}),z}),D={[bd]:l.hasFlagEnabled(bd),[_d]:l.hasFlagEnabled(_d),[vd]:l.hasFlagEnabled(vd),[yd]:l.hasFlagEnabled(yd),[gd]:l.hasFlagEnabled(gd),[hd]:l.hasFlagEnabled(hd),[fd]:l.hasFlagEnabled(fd),[md]:l.hasFlagEnabled(md),[pd]:l.hasFlagEnabled(pd)},O=Object.entries(D).filter(([z,R])=>R).map(([z])=>z),[B]=ie({async publish(z,R,$){try{return(await N).publish(z,R,$)}catch{return!1}},async publishCustomEvent(z,R,$){try{return(await N).publishCustomEvent(z,R,$)}catch{return!1}},async publishDomEvent(z,R,$){try{return(await N).publishDomEvent(z,R,$),{type:"success"}}catch(j){return{type:"error",message:j.message}}},async subscribe(z,R,$){try{return(await N).subscribe(z,R,$)}catch{return()=>!1}},async visitor(z,R){try{return(await N).visitor(z,R),{type:"success"}}catch($){return{type:"error",message:$.message}}}});return F(()=>{const z=H=>{a.log("web_pixel_manager_init",`WebPixelsProvider init: ${H}`,{outcome:H,shopAppDomain:p},{exportImmediately:H!=="loading"})};if(l.webPixelConfigurations===null)return z("web_pixel_configurations_null");if(!l.storefrontUrl)return z("storefront_url_missing");const R=dx();if(R&&!m)return z("shop_mobile_app_context");const $=p||R;if(l.webPixelManagerVersion==="disabled")return z("wpm_version_disabled");const j=$?[]:l.webPixelConfigurations;if(P){T.current?.(new ax("Checkout SDK enabled for partner with pixels suppressed")),z("pixels_suppressed_by_config");return}if(k||L.current){k&&!L.current&&z("deferred_for_preload");return}if(I){z("deferred_for_thank_you");return}if(L.current=!0,z("loading"),typeof PerformanceMark<"u")try{window.performance.mark("wpm:start")}catch{}const ee=c.variant.isStandard(),ae=!n?.isFlagshipPartner&&!!n?.isCheckoutSheetKit,X=GA({shopAppDomain:p,isNativeShopApp:R,isCheckoutKit:_,isSdkSurface:ee||ae});try{const H=l.storefrontUrl,ue=lx({storefrontBaseUrl:H,shopId:l.id,webPixelConfigurations:j,webPixelManagerVersion:l.webPixelManagerVersion,initData:f,enabledBetaFlags:O,surface:X,sriMap:l.webPixelsManagerSriMap,managerBaseUrl:C,extensionsUrl:w,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:si(u)||u.sourceId,facebookCapiEnabled:l.facebookCapiEnabled??!1});let re=!0;ue.then(le=>{if(A.current)A.current(le);else throw T.current?.(),new Io("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined")}).catch(le=>{re=!1,a.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${le?.message}`)}).finally(()=>{a.counter({name:"web_pixel_manager_load",value:1,attributes:{status:re?"success":"failed",surface:X}})})}catch(H){T.current?.(H),a.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:X}})}},[k,I]),s(qg.Provider,{value:B,children:e})}function dx(){return!!bS(navigator.userAgent)}function Gg(){return Ht(qg)}const px=6167201,mx=12875497473,lp=new Map([[px,"hydrogen"],[mx,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);function ns(e,t,n){const r=new Set([129785,6517121,757165]),o=new Set([3890849,3850711,5198245]),i=
6580111;return lp.has(e)?lp.get(e):r.has(e)?"retail":o.has(e)?"shop_app":t===Co.CartPermalink?"permalink":e===i?"online_store":n}function Wg(){return window?.ShopifyAnalytics?.lib?.trekkie?.defaultAttributes}function $g({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,_=Kc(e),v=Rs()?.config?.type,E=parseInt(Be(g),10),k=l.unstable_getSerialization("apiClientId")??0,S=i??(l.cookies.get("_shopify_y")||void 0),I=a??(l.cookies.get("_shopify_s")||void 0);return M(()=>{const C=u.analyticsProcessingAllowed.value,w=u.marketingAllowed.value,A=!!(C||w),T={eventName:e,buyerConsentAnalyticsAllowed:C,buyerConsentMarketingAllowed:w,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:T});return}const N=r==="contact_information"?1:void 0,D=Yg(h.type),O=D?h.sourceId:void 0,B=c.configuration.profileId.value,z=fx({eventName:e,walletName:n,shopId:E,checkoutSessionIdentifier:h.checkoutSessionIdentifier,checkoutProfileId:B?parseInt(Be(B),10):void 0,trackingVisitToken:I,userToken:S,sourceId:O,sourceType:D,customerId:y?.id?parseInt(Be(y.id),10):void 0,apiClientId:k,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:r,progressionStepNumber:N,redirectSource:o,checkoutProtocolType:v,consentManager:u}),R=z.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...T,progressionStepNumber:N,"context.sourceType":h.type,"context.sourceId":h.sourceId,checkoutType:t,entryPoint:R}),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,k,t,d,o,p,m,_,v,u])}function fx({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=Wg(),E=_==="MERCHANT"?{apiName:"mobile_checkout_sdk_merchant",checkoutType:ns(d,y,"api")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:o,eventName:e,checkoutType:ns(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 Yg(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 h3(e){const n=b().checkout.configuration.layout.isOnePage.value?"one_page":"three_page";return $g({eventName:"checkout_progression",checkoutType:n,walletName:e,progressionStepName:"contact_information"})}function g3(e,t,n,r){const i=b().checkout.configuration.layout.isOnePage.value?"one_page":"three_page";return $g({eventName:"checkout_started",checkoutType:i,walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var wl=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(wl||{});class hx{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:wl.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:wl.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=Xl(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=Yg(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(Be(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:ns(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?DA(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 jg=1;
6class Kg extends Error{constructor(t){super(`Unknown event type: ${t}`),this.name="UnknownEventTypeError"}}function pi(e){return{shopId:Be(e.shopId),checkoutToken:e.checkoutSessionIdentifier?Be(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?Be(e.customerId):void 0}}function gx(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return yx(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return vx(e,t);case"UI_EXTENSION_FETCH":return _x(e,t);default:{const n=e;throw new Kg(n.type)}}}function yx(e,t){const n=ps(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:Be(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?Be(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function vx(e,t){const n=ps(e.extensionTarget);
6return{event:{...e,appId:Be(e.appId),extensionId:e.extensionId?Be(e.extensionId):void 0,extensionTarget:n},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function _x(e,t){const n=ps(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:Be(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?Be(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:pi(t),__brand:"PreparedEventRefineryPayload"}}function bx(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function Px(e,t){return{event:e,context:pi(t),__brand:"PreparedEventRefineryPayload"}}function Jc(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return gx(e,t);case"shopify.event.BuyerEvent":return bx(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":return Px(e,t);default:{const n=e;throw new Kg(n.eventTypeName)}}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class Sx{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=si(this.#t),o=parseInt(Be(n.shopId),10),i={pageUrl:n.href??window.location.href,shopId:o,checkoutToken:r?Be(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(Jc({...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:jg,context:t.context},{shopId:n.shopId,checkoutSessionIdentifier:r,customerId:n.customerId}))}}}const cp="checkout_c1_extension_skeleton_dimensions/3.4";class Ex{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:cp,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:cp,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(Be(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 Cx=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"]),Xc=new Set([...Cx,"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 kx{#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&&Xc.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=si(this.#r);this.#t.refineryEvent(Jc({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 Ix{#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=si(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:jg,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":Ax(t.error)},this.#t.refineryEvent(Jc(l,{shopId:t.context.shopId,checkoutSessionIdentifier:o,customerId:t.context.customerId}))}}function Ax(e){return e?.name&&Tf(e.name)?"APP_FAILURE":"OTHER_FAILURE"}const Tx=["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"],wx={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"},Lx=Object.values(wx),xx=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...Lx.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"],Rx=["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 Mx{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&&Xc.has(n)}}}}class Nx{constructor(){this.type="extensionInteraction"}map(t){if(t.type!==this.type)return;let n=t.interaction;xx.includes(n)||(n="unknownEvent");const r=t.error?Ss(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 Dx{constructor(){this.type="extensionLifecycle"}map(t){if(t.type!==this.type||Tx.includes(t.phase))return;const n=t.extension?.registrationId,r={step:t.phase,checkoutType:ns(t.context.apiClientId),isRemoteDom:t.extension?.apiVersion?_A(t.extension?.apiVersion):!1,isHighValueExtension:n!=null&&Xc.has(n)};if(t.error!==void 0&&(r.error=Ss(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 Ox{constructor(t){this.client=t}#e=new Map([new Mx,new Nx,new Dx].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 Ll=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(Ll||{});function Ai(e){return Fx(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(t=>t.toLowerCase()).join("_")}function Fx(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 Bx{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:Ll.InteractionAndImpression,payload:this.mapEventToMonorailSchema(t)})}transmitImmediately(t){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Ll.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?`${Ai(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?`${Ai(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:`${Ai(t.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${Ai(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?[Pl(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?[Pl(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"?Ta(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[]):{}};case"moreShippingOptions":return{...i,eventType:"more_shipping_options",eventName:t.subEvent,...Ta(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[])};case"deliveryMacroInteraction":return{...i,eventType:"delivery_macro_interaction",eventName:t.subEvent,...Ta(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 Ta(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?Be(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 Vx{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 Ux{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 zx{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=Hx(t);if(n===this.mostRecentEvent)return;if(this.mostRecentEvent=n,t.type==="shippingMethodsFilled"||t.type==="shippingMethodSelected"){const o=wa(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=wa(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=wa(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}}),qx(t))if(Gx(t))this.webPixels.publishDomEvent("clicked",{...wf(t,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const o=Wx(t.type);this.webPixels.publishDomEvent(o,{element:t.element})}}}function wa(e){return Kh({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}function Hx(e){return JSON.stringify(e,(t,n)=>t==="timestamp"||t==="webPixelCheckout"?"":n)}function qx(e){return e.type.startsWith("dom")}function Gx(e){return e.type==="dom_clicked"}function Wx(e){return e.replace("dom_","")}const Jg=mt("EventHubContext");function $x(){return Ht(Jg)}function Yx({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=Gg(),d=Kc(),p=V(()=>{const m=[new Bx(n,d),new Vx(n),new Ox(t),new Ex(t,n,d),new kx({observability:t,userEvents:n,source:i}),new Ix({userEvents:n,source:i}),new Ux(t,d),new zx({webPixels:u}),new hx({observability:t,userEvents:n,shopPay:r,isShopPayActive:c,router:a,consentManager:l}),new Sx({userEvents:n,source:i})];return new jx(m)},[t,n,r,c,u,i,d,a,l]);return s(Jg.Provider,{value:p,children:e})}class jx{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 Xg(){const{client:e,shop:t,checkout:n,i18n:r,source:o,mobileCheckoutSdk:i,router:a}=b(),{currentPage:l}=Pe().value,{pathname:c}=a.currentUrl.value,u=jc(),d=u?.trackingUnique??Ji({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration"),cookie:e.cookies.get("_shopify_y")}),p=u?.trackingVisit??Ji({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration"),cookie:e.cookies.get("_shopify_s")}),m=q(),f=m.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=Pn(),y=q().buyerIdentity.value?.purchasingCompany,{value:_}=m.paymentFlexibilityPaymentTermsTemplate,P=Fn(),{value:v}=m.deliveryNext,{selectedMacro:E}=rx(),k=Es({base:!0,small:!1}),S=n.configuration.layout.isOnePage.value,I=n.identity.current.value==="shopPay",C=navigator.connection?.effectiveType??"unknown",w=e.unstable_getSerialization("requestId"),A=l?.id,T=e.unstable_getSerialization("apiClientId")??0,L=e.unstable_getSerialization("workerVersion")??"proxy",N=e.unstable_getSerialization("serverHandling")??"proxy";let D="c1_legacy";S&&(D="c1_redesign"),I&&(D="shop_pay");const O=Lf(v),{deliveryMacros:B}=se(),z=B.value,{isServerRendered:R}=e.initialRequest,$=n.configuration.profileId.value;return V(()=>({userToken:d,trackingVisit:p,customerId:f?.id,shopId:t.id,sessionToken:h,checkoutToken:o.checkoutSessionIdentifier,checkoutProfileId:$?parseInt(Be($),10):void 0,apiClientId:T,sourceId:o.sourceId,sourceType:o.type,identityProvider:void 0,sourceDesign:D,deviceType:k?"mobile":"desktop",locale:r.locale,currency:r.currency,browser:navigator.userAgent,browserConnectionType:C,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:w,step:A,pathname:c,checkoutSdkSchemaVersion:i.config.schema||void 0,checkoutSdkVersion:i.config.version||void 0,checkoutSdkVariant:i.variant.value?.toUpperCase(),workerVersion:L,serverHandling:N,reviewPageRequired:t.confirmationPageEnabled,serverRendered:R,clientHydrated:R,...v?.status==="filled"?{selectedDeliveryMacro:O?E:void 0,deliveryMacros:O?z:[],deliveryLines:v.lines.filter(Jl)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:PS}),[d,p,f?.id,t.id,t.confirmationPageEnabled,h,o.checkoutSessionIdentifier,o.sourceId,o.type,$,T,D,k,r.locale,r.currency,C,y,P.value,g.value,_,n.isShippingRequired.value,w,A,c,i,L,N,v,O,E,z,R])}function Ln(){if(typeof window>"u")return Kx;const{shop:e,consentManager:t,source:n,i18n:r}=b(),o=$x(),i=Xg(),a=U(i),l=Je(),c=se();return a.current=i,M((u,d)=>{o.emit({type:u,context:{...a.current,href:window.location.href,consent:NA(t),webPixelCheckout:yT({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 Kx(){}function Qg(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 Jx(){const e=Ln(),{client:t}=b();return M(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 Zg(){const e=Ln(),{observability:t}=b();function n(r){e("alertDisplayed",r),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:pT(r)})}return n}function Xx(){const{checkout:e}=b(),t=e.configuration.addressSettings.nonBillingAddressSettings;return x(()=>
6{if(!t.value?.validationEnabled)return"BASIC"})}function Qx(){const{i18n:e}=b();return M((t,n)=>SS(e,t,n),[e])}function Zx(e,t,n){return e?n.size===0?!0:[...t].some(r=>!n.has(r.code)):!1}function ey(e){return e.status==="failed"}function y3(e){return e.type==="payment"}function Ti(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function Qc(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge"}function ty(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge_v2"}function ny(e){return e.type==="complete_payment_challenge"}function Nr(e){return e.type==="complete_payment_challenge_v2"}function pn(e){return{receiptId:e?.id?yr(e.id)??e.id:void 0,status:e?.status}}function v3(e=[]){return e?.flatMap(t=>t.status==="submitted"?t.remotePurchaseOrder.deliveryLines?.map(n=>({...n,shopId:t.shopId}))??[]:[])??[]}function e0(e){return e.some(t=>IS.has(t.code))}function t0(e){return e.some(t=>AS.has(t.code))}function n0(e){return e.some(t=>kS.has(t.code))}function ry(e){return e.some(({code:t})=>new Set([...xf,...Ql]).has(t))}function oy(e){return e.some(({code:t})=>Rf.has(t))}function iy(e){return e.some(t=>ES.has(t.code)&&t.__typename==="RemoveTermViolation")}function sy(e){return e.some(t=>CS.has(t.code)&&t.__typename==="RemoveTermViolation")}function r0(e){return e.some(t=>xf.has(t.code))}function mi(e){const t=eu({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function o0(e){const t=Zc(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0,clearViolations:t.clearViolations}}function Zc(e){return eu({subscribedViolations:e,onlySubscribeToProgression:!1})}function _3(e){const t=ay(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function ay(e){return eu({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function b3(e){const t=ly(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function ly(e){const{checkout:{wallets:t}}=b(),n=Zc(e);return ze(()=>{t.activeSession.value&&n.violations.value.size>0&&ht(()=>{n.clearViolations()})}),n}function eu({subscribedViolations:e,onlySubscribeToProgression:t,skipProgressionNegotiations:n}){const{observability:r,checkout:{wallets:o}}=b(),{lastJourneyProgression:i,lastNegotiation:a}=Je(),l=t?i:a,c=Te({violations:new Set}),u=x(()=>c.value.violations),d=M(()=>{c.value={violations:new Set}},[c]),p=Ye(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 cy(e){const{checkout:t,embed:n}=b(),r=t.wallets.activeSession.value,o=t.latestReceipt.value,{delegatedPaymentInstrument:i}=Mt(),[a,l]=ie(),c=U(i.peek()),u=M(()=>{l(void 0)},[]),d=M(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 up(e){if(!(e?.status!=="failed"||e.failure.type!=="hsa_qualification")&&e.failure.code!=="SURVEY_EXITED")return e.failure}function P3(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=ie(()=>t?void 0:up(n));return F(()=>{t||o(up(n))},[t,n]),{error:r,hasError:r!==void 0}}function S3(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=ie(!1);return F(()=>{t||(n?.status==="failed"&&n.failure?.type==="inventory"?o(!0):o(!1))},[t,n]),{hasError:r}}function E3(){const{checkout:e}
6=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=ie(!1);return F(()=>{t||(n?.status==="failed"&&n.failure?.type==="order"?o(!0):o(!1))},[t,n]),{hasError:r}}function i0(){const{checkout:e}=b(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=ie(null),[i,a]=ie("");return F(()=>{t||n&&ey(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 s0(){const[e,t]=ie([]),[n,r]=ie(null),{violations:o}=mi(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!==Uo.InvalidAddress)[0];c&&(i={message:c,origin:"server",type:"negotiation"})}const a=[];Array.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 a0(){const{allViolations:e}=q();return x(()=>ry(e.value??[]))}function C3(e){const{allViolations:t}=q();return x(()=>!!t.value?.some(n=>n.code===e))}function l0(){const{checkout:e}=b(),t=se(),{hasNegotiatedOnce:n}=Je(),{violations:r,hasViolations:o}=mi(Lo),i=Zx(o,r,wS),a=e.isShippingRequired.value,l=TS(t.billingAddress.value,t.shippingAddress.value),c=!!t.shippingAddress.value.firstName?.trim()&&!t.billingAddress.value.firstName?.trim(),u=a?l&&!c:!0;return{isOnlyFirstNameViolations:o&&!i&&u,hasNonFirstNameBillingViolations:i,isBillingToBeUpdated:u,hasNegotiatedOnce:n.value,billingViolations:r}}function c0({creditCards:e,availableLoanTypes:t,isOnlyFirstNameViolations:n,isBillingDependOnShipping:r,hasNegotiatedOnce:o}){const i=new Set;return e.forEach(a=>{const l=LS(t,a?.supportsInstallmentsSplitPayLoan,a?.supportsInstallmentsInterestLoan),c=t.includes("SPLIT_PAY")?a?.installmentsSplitPayLoanNotSupportedReason:a?.installmentsInterestLoanNotSupportedReason,d=!a?.billingAddress.address.firstName?.trim()&&(o?n:r);!a?.billingAddressValid&&!d?i.add("billing_address"):!l&&c&&i.add(c)}),i}function u0(){const{checkout:e,shopPay:t}=b(),n=t.user.creditCards,r=e.installments.config.value,{isOnlyFirstNameViolations:o,isBillingToBeUpdated:i,hasNegotiatedOnce:a}=l0(),l=V(()=>r?c0({creditCards:n.value,availableLoanTypes:r.availableLoanTypes,isOnlyFirstNameViolations:o,isBillingDependOnShipping:i,hasNegotiatedOnce:a}):void 0,[r,n.value,o,i,a]);return r?{supported:!0,checkoutIneligibilityCardsReasons:l}:{supported:!1}}function uy(){const{checkout:e,environment:t,observability:n}
6=b(),r=u0(),o=e.installments.isSupported.value,i=r.supported,a=e.installments.isSupportedDetails?.value.failedGate,{commitSha:l}=t;return F(()=>{o!==i&&n.log("installments_supported_mismatch","Mismatch between checkout.installments.isSupported and installments.supported",{appContext:String(o),layoutConcerns:String(i),failedGate:String(a),buildId:l})},[o,i,a,l,n]),i?r:null}function d0(){const{i18n:e,checkout:t,shopPay:n}=b(),r=Qx(),o=uy(),i=n.user.installments.isRetryable.value,{paymentMethods:a,paymentDue:l}=q(),c=x(()=>xS(a.value));if(!o||!c.value)return"";const u=c.value,d=l.value,p=!!(u.cbtEnabled&&d&&(u.minPrice.currencyCode!==d.currencyCode||u.maxPrice.currencyCode!==d.currencyCode));if(i)return e.translate("installments.installments_condition_retryable");const m=_=>{switch(_){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 _}},f=_=>{switch(_){case"amount":return p||u.cbtEnabled&&u.availableLoanTypes.length===0&&d&&d.amount>=u.minPrice.amount&&d.amount<=u.maxPrice.amount?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(u.minPrice.amount,{currency:u.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(u.maxPrice.amount,{currency:u.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(u.supportedCountries.map(m),Pd.Or)});case"currency":return p&&d&&u.supportedCurrencies.includes(d.currencyCode)?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:r(u.supportedCurrencies,Pd.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")}},h=t.installments.ineligibilityReasons.value,g=!n.user.installments.isRejected.value;if(g&&h.length===0)return"";const y=(g&&h.length>0?h:["user_rejected"]).map(f);return(u.cbtEnabled?[...new Set(y)]:y).join(" ")}function p0(){const e=q().customAttributes;return x(()=>{const t=Ei(RS,e?.value),n=Ei(MS,e?.value),r=Ei(NS,e?.value),o=Ei(DS,e?.value);return{retailTraceId:t?.value||"",deviceId:n?.value||"",locationId:r?.value||"0",userId:o?.value||"0"}})}function La(e,t){return t?.availableLoanTypes?.includes(e)??!1}function m0(e){const{retailTraceId:t,deviceId:n,userId:r,locationId:o}=p0().value,{shop:{id:i},source:{checkoutSessionIdentifier:a},checkout:l}=b(),c=OS(),{value:u}=ni(),d=l.installments.config.value,p=u?.amount?Number(u.amount):0,m=l.installments.isCheckoutEligible.value,f=d0(),h=La("SPLIT_PAY",d),g=La("INTEREST",d),y=La("ZERO_PERCENT",d),P=u?.currencyCode||"USD";return V(()=>({userId:parseInt(r,10),shopId:parseInt(Be(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 x(()=>FS(e.value))}function f0(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 h0(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 tu(e,t){const{observability:n}=b(),[r,o]=ie(()=>VS(e));U(t);let i=r;return F(()=>{const a=f0(()=>{BS(e,i)},n);return()=>{h0(a,n)}},[e,n,i]),[i,o]}function wi(e,t){const{persistence:n}=b(),r=n?.get(e,t),o=Te(r);return ze(()=>{t.disablePersistence||n?.createUpdate(e,t)(o.value)}),o}const dy=mt("AnalyticsContext");function g0({children:e}){const t=V(()=>new y0,[]);return s(dy.Provider,{value:t,children:e})}function py(){return Ht(dy)}class y0{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 my(){const e=py();return M(t=>e.emit(t),[e])}function xa(e){const t=py();F(()=>t.subscribe(e),[e,t])}function v0(){const{client:e}=b();return e.unstable_getSerialization("shopPayConfig").redirect_source}function _0(){const[e,t]=tu(fn.TrackedSourceId),{source:{sourceId:n}}=b();return F(()=>{t(n)},[n,t]),{previouslyTracked:n===e}}const fy=()=>{const{url:e}=b(),t=e.shopPayRememberMe();return!!eo()?.redirectUrl?.includes(t)};function b0(){const[e,t]=tu(fn.TrackedCompleteOrderSourceId),n=eo(),r=fy(),{source:{sourceId:o}}
6=b();return F(()=>{n&&!r&&t(o)},[o,n,r,t]),{previouslyTracked:o===e}}function P0(){const e=Pe();return x(()=>{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 S0(){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(Be(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:i?"shop_pay":"guest_checkout"}}),e.current=!0)})}function k3({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 M(p=>n.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:p,checkoutToken:i.checkoutSessionIdentifier||"",shopId:parseInt(Be(r),10),locationId:u&&Be(u),selectedLocationRank:d,userId:l?.id?parseInt(Be(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 dp=580111;function E0(){const{client:e,userEvents:t,i18n:{locale:n},shop:r,source:o,mobileCheckoutSdk:i}=b(),a=q(),l=a.buyerIdentity.value?.customerProfile,c=Kc(),u=P0(),{value:d}=Mf(),{value:p}=Nf("ONE_TIME_PURCHASE"),m=Xr(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}=Zl(),[k,S]=ie("");S0();function I(K){return K.toFixed(2)}function C(K){return parseInt(Be(K),10)}const w=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]),T=V(()=>g?.lines?.filter(K=>K.productId).map(K=>C(K.productId)),[g?.lines]),L=V(()=>g?.lines?.filter(K=>K.variantId).map(K=>C(K.variantId)),[g?.lines]),N=V(()=>g?.lines?.map(K=>{const Q=K.totalPrice.amount;return Q===void 0?"":I(Q)}),[g?.lines]),D=V(()=>g?.lines?.every(K=>K.totalPrice.currencyCode==="USD")?g?.lines?.map(K=>{const Q=K.totalPrice.amount;return Q===void 0?"":I(Q)}):void 0,[g?.lines]),O=V(()=>g?.lines?.map(K=>K.quantity),[g?.lines]),B=V(()=>O?.reduce((K,Q)=>K+Q,0),[O]),z=V(()=>O?.length,[O]),R=V(()=>y?.lines.filter(K=>K.method.type==="giftCard"&&K.cost?.amount).map(K=>I(K.cost.amount)),[y?.lines]),$=V(()=>{if(u.value!=="thank_you"&&u.value!=="post_purchase")return;const K=y?.lines.find(X=>X.method.type==="giftCard"&&X.cost?.amount)?"giftCard":void 0,Q=y?.lines.filter(X=>X.method.type!=="giftCard").map(X=>X.method.type);return Q&&Q?.length>0?Q[0]:K},[y?.lines,u.value]),j=V(()=>_?.lines.reduce((K,Q)=>{if(!Jr(Q))return K;let X=K;X||(X=[]);const H=Q.amount?.amount;return H&&X.push(I(H)),X},[]),[_]),ee=jc(),ae=M(()=>{const K=h?.status==="available_total"?h.totalTax.amount:void 0,Q=l?.id?C(l.id):void 0,X=l?.fullName||void 0,H=ee?.trackingUnique??Ji({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration"),cookie:e.cookies.get("_shopify_y")||void 0}),ue=ee?.trackingVisit??Ji({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration"),cookie:e.cookies.get("_shopify_s")||void 0});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:o.type==="cartNext"?o.sourceId:void 0,customerId:Q,trackingUnique:H,shopId:C(r.id),eventTimestampEpochMs:Date.now(),trackingVisit:ue,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:X,lineItemProductIds:T,lineItemVariantIds:L,lineItemTotalPrice:N,lineItemTotalPriceUsd:D,lineItemQuantity:O,currency:v?.presentmentCurrency||r.currencyCode,totalItemCount:B,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:A?I(A):void 0,apiClientId:dp,currentApiClientId:dp,paymentMethod:$,paymentProviderId:void 0,currentStep:u.value,checkoutToken:o.checkoutSessionIdentifier,totalShipping:w?I(w):void 0,sourceProcessor:"web_checkout",appliedGiftCards:R?.length?R:void 0,subtotalPrice:d?.amount?I(d.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:f.valueOf(),totalTax:K?I(K):void 0,appliedDiscounts:!j||j.length<1?void 0:j,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()}}},[j,h,f,d,R,o,w,E?.amount,A,u,v?.presentmentCurrency,r,B,O,N,D,L,T,l,P,z,n,$,ee,e,i]);return F(()=>{c&&(k!==u.value&&t.monorailEvent(ae()),S(u.value))},[k,u.value,t,ae,S,c]),s(G,{})}const C0=Ge({suspenseName:"trekkie",displayName:"Trekkie",load:()=>ut(()=>Ve(()=>import("./Trekkie.CtdwXInC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))});function k0(){const e=Je(),t=se(),n=Gg(),{plan:r}=Pe().value,{router:o,i18n:{locale:i},shop:{currencyCode:a,marketDrivenShippingEnabled:l},source:c}=b(),u=eo(),d=FA(),p=M(()=>{const h=Vi({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=M(()=>{const h=Vi({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=M(()=>
6{if(!u||d.shouldPrevent())return;const h=Vi({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=zA(r.detours,o.currentUrl.value.normalizedPath),E={...g&&{eventId:g},checkoutCompletedPageType:v},k=Object.keys(E).length>0?E:void 0;n.publish("checkout_completed",{checkout:h},k)}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 xa(M(h=>{h.type==="initiate_checkout"&&m()},[m])),xa(M(h=>{h.type==="add_payment_info"&&p()},[p])),xa(M(h=>{h.type==="complete_checkout"&&f()},[f])),null}const I0=["/processing","/thank-you","/error","/post-purchase"],A0=[Co.DirectCheckoutCheckout,Co.CheckoutPaymentStep,Co.ShopPayInstallmentsAsPaymentMethod,Co.ShopPayAsPaymentMethod];function T0(){jc();const e=my(),{currentPage:t,currentDetour:n}=Pe().value,{userEvents:r,source:o,router:i}=b(),a=_0(),l=b0(),{normalizedPath:c}=i.currentUrl.value,u=eo(),d=fi().value,p=m0(US.SHOP_PAY_CHECKOUT_COMPLETE),m=q().paymentLines?.value?.lines,f=v0(),h=Ln(),g=fy();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&&BA(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:!I0.includes(y),E=f?!A0.includes(f):!0;P&&v()&&E&&e({type:"initiate_checkout",url:y})},[]),s(G,{children:[s(E0,{}),s(C0,{}),s(k0,{})]})}const w0=Qn(function({children:t}){const n=St();return s(g0,{children:[t,s(ye,{when:n,children:s(T0,{})})]})});function L0(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r}}=b(),o=zS(),{billingAddress:i}=se(),a=i.value,{details:l}=jt(a.countryCode),c=Xx();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(Be(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 hy=mt("WebPixelTargetContext"),nu=({children:e,target:t})=>s(hy.Provider,{value:t,children:e});function Sr(){const{checkout:e}=b();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}function x0(){const{client:e}=b(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return t===!0&&n===!0}const R0=Ge({displayName:"AdminPreviewBar",load:()=>Ve(()=>import("./AdminPreviewBar.BqafTSoi.js"),__vite__mapDeps([9,1,2,3,4,5,6,7,8,10])),suspense:!1});function M0(){const{router:e,source:t,shop:n}=b(),r=n.configurationPreviewContext!=="no-preview",o=U(e.currentUrl.peek()).current;return N0({source:t,isThemeEditor:ec(),hasServerPreviewContext:r})?s(R0,{initialUrl:o}):null}function N0({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return e.previewScript?.name!=null||e.type!=="simulated"&&!t&&n}function gy(){const e=U(!1);return F(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Ds=qe(void 0);function yy(){const e=Se(Ds);if(!e)throw new jl("Missing FocusManager Context ");return e.focusErrors}function D0(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return t==="rtl"||t==="ltr"?t:e.dir==="rtl"?"rtl":"ltr"}function O0({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 F0(e){const t=e.ref.current;if(!t||(t.focus({preventScroll:!0}),O0(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 vy({children:e}){const t=U(new Set),n=gy(),r=(l,c,u)=>l.top===c.top?u==="ltr"?l.left<c.left:l.right>c.right:l.top<c.top,o=M(()=>{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,D0(c.current.ownerDocument)))&&(l=u)}n.current&&l&&F0(l)},[n]),i=M(l=>(t.current.add(l),()=>t.current.delete(l)),[]),a=V(()=>({requestFocus:i,focusErrors:o,numberOfErrors(){return t.current.size}}),[o,i]);return s(Ds.Provider,{value:a,children:e})}function Os({active:e}){const t=U(null),n=Se(Ds);return Rt(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function I3(){return Se(Ds)}function A3(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 pp(e,t=!0){return!t&&e.matches($o)?e:e.querySelector($o)}function B0(e,t=!0){if(!t&&e.matches($o))return e;const n=e.querySelectorAll($o);return n[n.length-1]}function T3(e){const t=[...document.querySelectorAll($o)],n=t.findIndex(r=>e===r);return n?t[n+1]:null}function Fs(){const{paymentLines:e}=se(),t=q().paymentMethods;return x(()=>{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 Df()?null:o&&"name"in o?o.name:null})}var cn={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 _e=oo(kg(xc(at(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:k,display:S="auto",id:I,inert:C,inlineAlignment:w,inlineSize:A="auto",maxBlockSize:T="none",maxInlineSize:L="none",minBlockSize:N="0",minInlineSize:D="0",opacity:O,overflow:B="visible",padding:z="none",paddingBlock:R,paddingInline:$,paddingBlockEnd:j,paddingBlockStart:ee,paddingInlineEnd:ae,paddingInlineStart:K,position:Q="relative",insetBlock:X,insetInline:H,transform:ue,translate:re,zIndex:le,...de},ke){const he=p||w,ve=M(be=>{o&&be&&be.focus({preventScroll:!0})}
19,[o]),Ee=Wo(ke,ve),{className:De,style:Ie,styleElement:J}=Tt({alignItems:w,backgroundColor:i,backgroundColorHoverAndFocus:a,backgroundImage:c,blockSize:m,..._r({border:f,borderStyle:g,borderWidth:y}),borderRadius:h,boxShadow:_,display:S,inlineSize:A,insetBlock:X,insetInline:H,justifyContent:p,maxBlockSize:T,maxInlineSize:L,minBlockSize:N,minInlineSize:D,padding:z,paddingBlock:R,paddingInline:$,paddingBlockEnd:j,paddingBlockStart:ee,paddingInlineEnd:ae,paddingInlineStart:K,position:Q,transform:ue,zIndex:le},{transforms:{display:he?wc:Tc}}),ne=no(),{Element:me,role:ge}=ui(n,{defaultElement:ne?"span":"div"}),Ae=k?vn({[cn.vars.containerNameVar]:k}):void 0;return s(V0,{condition:C,children:[J,s(me,{"aria-hidden":r==="hidden"||C?!0:void 0,"aria-label":t,className:Y(r==="exclusive"&&cn.visuallyHidden,c&&l&&cn.backgroundSizeVariant[l],c&&u&&cn.backgroundPositionVariant[u],c&&cn.backgroundRepeatVariant[d],E&&cn.colorLayerVariant[E],k&&cn.containerName,he&&cn.withAlignment,C&&cn.inert,O&&cn.opacityVariant[O],B==="hidden"&&cn.overflowHidden,De,{notranslate:re===!1},v),id:I,inert:C?" ":void 0,ref:Ee,role:ge,style:{...Ie,...Ae},tabIndex:o?-1:void 0,translate:(re===!0?"yes":void 0)??(re===!1?"no":void 0),...de,children:P})]})}))));function V0({children:e,condition:t}){return t==null?s(G,{children:e}):s(ks.Provider,{value:t,children:e})}var Ro={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 io({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const o=Vn(),i=!!(n&&o),a=U0(e),l=Y(Ro.Spinner,t&&Ro.appearanceVariant[t],Ro.sizeVariant[a]),c={"aria-label":n,"aria-hidden":n?void 0:"true"},u=a==="fill"||a==="large"?s(z0,{...c}):s(H0,{...c});return i?s(G,{children:n}):s("div",{className:l,id:r,children:u})}function U0(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}function z0(e){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:Ro.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 H0(e){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:Ro.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 En={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 q0=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"}},W=at(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=q0(y),{className:v,styleElement:E}=Tt({display:l},{transforms:{display:fw}});return s(G,{children:[E,s(P,{"aria-hidden":n==="hidden"?!0:void 0,"aria-live":t,className:n==="exclusive"?En.accessibilityVisibilityVariant[n]:Y(En.Text,i&&En.decorationVariant[i],c&&En.fontsVariant[c],d&&En.kerningVariant[d],m&&En.letterCaseVariant[m],f&&En.sizeVariant[f],g&&En.toneVariant[g],o&&(g==="auto"||g==="neutral")&&En.colorVariant[o],y&&En.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 G0(e){return at((t,n)=>{switch(GT()){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 W0="_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",$0={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:"_1m2hr9g2c _1m2hr9g2b _1fragem11z",displayVariant:{block:"_1m2hr9gm _1m2hr9gk _1fragem5u",inline:"_1m2hr9gn _1m2hr9gl _1fragem6e"},editorDisabled:"_1m2hr9g2d",forcedColorsPrimaryFill:"_1m2hr9g2e",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:"_1m2hr9g2f",end:"_1m2hr9g2g"},Spinner:"_1m2hr9g13 _1m2hr9g12 _1fragemwi _1fragem109 _1fragem113",sizeVariant:{baseSmall:"_1m2hr9g1v _1m2hr9g1u",baseBase:"_1m2hr9g1w _1m2hr9g1u",baseLarge:"_1m2hr9g1x _1m2hr9g1u",baseExtraLarge:"_1m2hr9g1y _1m2hr9g1u",smallSmall:"_1m2hr9g1z _1m2hr9g1u",smallBase:"_1m2hr9g20 _1m2hr9g1u",smallLarge:"_1m2hr9g21 _1m2hr9g1u",smallExtraLarge:"_1m2hr9g22 _1m2hr9g1u",mediumSmall:"_1m2hr9g23 _1m2hr9g1u",mediumBase:"_1m2hr9g24 _1m2hr9g1u",mediumLarge:"_1m2hr9g25 _1m2hr9g1u",mediumExtraLarge:"_1m2hr9g26 _1m2hr9g1u",largeSmall:"_1m2hr9g27 _1m2hr9g1u",largeBase:"_1m2hr9g28 _1m2hr9g1u",largeLarge:"_1m2hr9g29 _1m2hr9g1u",largeExtraLarge:"_1m2hr9g2a _1m2hr9g1u"},textDecorationVariant:{underline:"_1m2hr9g1h _1m2hr9g1g _1fragem129",none:"_1m2hr9g1i"},toneVariant:{critical:"_1m2hr9g1q",monochrome:"_1m2hr9g1r",neutral:"_1m2hr9g1s",custom:"_1m2hr9g1t"},verticalAlignVariant:{"text-bottom":"_1m2hr9go"},inMenu:"_1m2hr9g2h",inert:"_1m2hr9g2i _1fragemz0"};const Y0=ci(qc(zc(G0(at(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:k="base",textDecoration:S,target:I="auto",tone:C="auto",type:w="button",variant:A="auto",verticalAlign:T="baseline",...L},N){const D=i?void 0:u,O=Ra(y)?()=>y?.():void 0,B=Ra(_)?()=>_?.():void 0,z=Ra(P)?()=>P?.():void 0,R=$r(N),$=A==="auto"?"secondary":A,j=$==="shop-pay"||C==="auto"?"neutral":C,{className:ee,style:ae,styleElement:K}=Tt({inlineSize:m},{transforms:{inlineSize:j0}}),Q=ln(),X=Vn(),H=HS(k),{primaryButton:{border:ue="none"},secondaryButton:{border:re="full"},link:{typographyDecoration:le="underline"}}=ct(),de=ai(),ke=Un(),he=ow(),ve=!!i&&!he,Ee=$==="plain",De=$==="in-menu",Ie=!f&&ve?"full":ue,J=(()=>{switch($){case"tertiary":return"none";case"secondary":return re;default:return Ie}})(),ne=S||(j==="monochrome"?"underline":le),me=Y(W0,(f||!ve)&&!Ee&&!De&&j==="neutral"&&yt.colorLayerVariant[$],$0[De?"plain":$],H&&!Ee&&Object.entries(H).map(([oe,we])=>yt.sizeVariant[`${oe}${we.charAt(0).toUpperCase()}${we.slice(1)}`]),J&&!Ee&&yt.borderVariant[J],($==="primary"||$==="shop-pay")&&yt.forcedColorsPrimaryFill,yt.displayVariant[c],T==="text-bottom"&&yt.verticalAlignVariant[T],yt.toneVariant[j],ee,(ve||ke)&&yt.disabled,he&&i&&yt.editorDisabled,ke&&yt.inert,f&&yt.loading,yt.textDecorationVariant[Ee?ne:"none"],E&&yt.segmentVariant[E],De&&yt.inMenu,o),ge=h||Q("processing"),Ae=s("span",{className:Y(yt.Content,p&&yt.inlineAlignmentVariant[p]
19),"aria-hidden":f||void 0,children:r}),be=s("span",{className:Y(yt.LoadingContent,p&&yt.inlineAlignmentVariant[p],!X&&yt.Spinner),dir:"auto",children:[s(io,{accessibilityLabel:ge}),g==="extended"&&!X&&s("span",{className:yt.ExtendedLoadingContent,dir:"auto",children:s(W,{children:ge})})]}),Ce=nr(),Ue=Ce?.activatorAttributes,je=typeof f<"u";if(D&&l===void 0)return s(Gr.Provider,{value:!0,children:[K,s(ws,{ariaBusy:je?f:void 0,ariaLabel:f?void 0:t,ariaLive:je?"polite":n,className:me,href:D,id:d,onClick:y,onFocus:_,onMouseEnter:P,overlay:v,ref:R,style:ae,target:I,...L,children:[Ae,f&&be]})]});const te=Uc(Ce,{onClick:O,onFocus:B,onMouseEnter:z});return s(Gr.Provider,{value:!0,children:[K,s("button",{"aria-busy":je?f:void 0,"aria-hidden":ke?!0:void 0,"aria-label":f?void 0:t,"aria-live":je?"polite":n,className:me,disabled:i||f,form:w==="submit"&&de?.nested?de.id:void 0,id:d,ref:R,style:ae,type:l?"button":w,tabIndex:ke?-1:void 0,...te,...Ue,...L,children:[Ae,f&&be]})]})}))))),an=Y0;function j0(e){if(e!=="legacy-default")return e==="fill"?"100%":Zi(e==="auto"?"fit-content":e)}function Ra(e){return typeof e=="function"}var vo={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 lt({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"?vo.verticalAlignVariant[g]:void 0;return!a||r!==void 0?s(an,{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(ws,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:Y(vo.Link,vo.toneVariant[h==="auto"?"neutral":h],vo.textDecorationVariant[f||(h==="monochrome"?"underline":P)],vo.displayVariant[i],v),href:a,id:l,lang:c,onClick:u,onFocus:d,onMouseEnter:p,overlay:y,target:m,..._,children:o})}var mp={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const Z=oo(kg(at(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:k="auto",justifyContent:S="normal",maxBlockSize:I="none",maxInlineSize:C="none",minBlockSize:w="0",minInlineSize:A="0",overflow:T="visible",padding:L="none",paddingBlock:N,paddingInline:D,paddingBlockEnd:O,paddingBlockStart:B,paddingInlineEnd:z,paddingInlineStart:R,rowGap:$,...j},ee){const{className:ae,style:K,styleElement:Q}=Tt({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:k,justifyContent:S,maxBlockSize:I,maxInlineSize:C,minBlockSize:w,minInlineSize:A,padding:L,paddingBlock:N,paddingBlockEnd:O,paddingBlockStart:B,paddingInline:D,paddingInlineEnd:z,paddingInlineStart:R,rowGap:$},{transforms:{display:wc,flexDirection:re=>re==="block"?"column":"row",flexWrap:re=>re==="block"?"nowrap":"wrap"}}),X=no(),{Element:H,role:ue}=ui(r,{defaultElement:X?"span":"div"});return s(G,{children:[Q,s(H,{className:Y(mp.Stack,mp.overflowHidden[T],ae,g),role:ue,"aria-label":n,"aria-current":t,"aria-labelledby":o,style:K,id:E,...j,ref:ee,children:h})]})})));var fp={Bumper:"_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k"};function ru({children:e}){const t=U(null),n=U(null),r=U(null),o=U(document.activeElement);Rt(()=>{const a=r.current;if(a){const c=pp(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?pp(l):B0(l);c?c.focus():l.focus()}};return s(G,{children:[s("button",{className:fp.Bumper,ref:t,"aria-hidden":"true",onFocus:()=>i(!1),type:"button"}),jP(e,{tabIndex:-1,ref:r}),s("button",{className:fp.Bumper,ref:n,"aria-hidden":"true",onFocus:()=>i(!0),type:"button"})]})}const Yo="scrollbar-gutter",_y="stable";function ou(){const[e,t]=ie(!1),n=U(0),r=U(null),o=U(null),i=M(()=>
19{if(!document.body||r.current)return;const{position:l,top:c,overflow:u}=document.body.style,d=K0(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=M(()=>{if(!document.body)return;o.current!==null&&(Z0(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 K0(e){if(!J0(e))return null;const t=e.style.getPropertyValue(Yo);return e.style.setProperty(Yo,_y),t}function J0(e){return X0(e)&&!Q0(window.getComputedStyle(e).getPropertyValue(Yo))}function X0(e){return window.innerWidth>e.clientWidth}function Q0(e){return e?.split(/\s+/).includes(_y)??!1}function Z0(e,t){t?e.style.setProperty(Yo,t):e.style.removeProperty(Yo)}const eR="hYGiX",tR="yF8Vq",nR="UGCQu",Ma={background:eR,invisibleBackground:tR,content:nR};function by({children:e,isInvisible:t,onClick:n}){const{lock:r}=ou(),{i18n:o}=b();F(()=>{r()},[r]);const i=x(()=>t?.value??!1),a=s("div",{children:s(ye,{when:i,fallback:s(G,{children:[s("div",{className:Ma.background}),s("div",{className:Ma.content,children:e})]}),children:s("div",{className:Ma.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(ru,{children:a})})}function rR({isOpen:e,isInvisible:t,children:n,onClick:r}){return s(ye,{when:e,children:s(by,{isInvisible:t,onClick:r,children:n})})}function oR({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return s(rR,{isOpen:e,children:s(iR,{handleClose:n,walletName:t,handleFocus:r})})}function iR({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=b();return s(_e,{children:s(Z,{gap:"large-400",alignItems:"center",children:[s(W,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?s(lt,{tone:"monochrome",onClick:t,children:n}):n})}),s(W,{children:[s(lt,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function sR(){const{checkout:{offsitePopupController:e}}=b(),t=Fs();return s(oR,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const Py=mt("RequestContext");function iu(){return Ht(Py)}const aR=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],su=["JP"];function Bs(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:o}={}){const i=Sy(e,o);if(!i)return;const{addr:a,details:l,zoneFormat:c}=i;return ml(a,l,t,n,r,c)}function w3(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const o=Sy(e,r);if(!o)return;const{addr:i,details:a,zoneFormat:l}=o;return qS(i,a,t,n,l)}function Sy(e,t){const{i18n:n}=b(),{details:r}=jt(e?.countryCode);if(!e||!r&&e.countryCode)return;const o=r??GS(void 0,n),i=e.countryCode&&aR.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:o,zoneFormat:i}}function L3(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 x3(e){return M(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 au=e=>{const t=M((o,i)=>{e[o].value=i},[e]),n=M(()=>{tn(()=>{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=M(o=>{e[o].value=void 0},[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:n,resetAddressFieldErrors:r}},lR=(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)}),tn(()=>{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 Ey(e,t,n,r){const{i18n:o,checkout:i}=b(),{geolocation:a}=iu(),l=i.configuration.addressSettings.nonBillingAddressSettings.value,c=q().deliveryNext,{details:u}=jt(e),{getIsMobilePhoneFieldVisible:d}=cR(),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 M((P,v)=>WS(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 cR=()=>{const{checkout:{identity:e},shopPay:t}=b(),n=e.current.value==="shopPay",r=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:M(i=>n&&!r.value&&i==="shipping",[n,r])}};function R3(){const{shippingAddress:e}=se(),{i18n:t}=b();return x(()=>{const n=e.fields.firstName.value,r=e.fields.lastName.value,o=e.value.oneTimeUse;return!fl(n)||!fl(r)||o?null:t.formatName(n,r,!0)})}function uR(e){const[t,n]=ie(null),[r,o]=ie([]);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 M3(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 dR({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:o=""}=e,{details:i,loading:a}=jt(o),{i18n:l}=b();return a?hp(e,t,n,void 0,l.locale,r):hp(e,t,n,i,l.locale,r)}function pR({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 hp(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=su.includes(h),k={countryFormat:E?"explicit":"short",zoneFormat:E?"explicit":"short"};y=pR({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"]];_=ml(e,r,S,!1,k.countryFormat,k.zoneFormat).replace(/\s+/g," "),P=ml(e,r,I,!1,k.countryFormat,k.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 N3(e){const t=se(),n=`${e}Address`,r=t[n].value,{primary:o,secondary:i}=dR({address:r,nameLinePosition:"inline"});return`${o} ${i}`}function mR(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(()=>YS({countryDetails:r,format:o,addressSettings:n}),[r,o,n])}function lu(e,t){const{checkout:n}=b(),r=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:o}=jt(e);return M((i,a)=>$S({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 Yr(e){return typeof e=="string"?e.trim()!=="":e!=null}function gp(e){return Object.entries(e).filter(([n,r])=>tc(n)&&Yr(r)).map(([n])=>n)}function yp(e){return Yr(e.address1)||Yr(e.streetName)}function fR(e,t,n){if(typeof n!="string")return!1;if(t==="address1"){const r=XS({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Yr(r)&&n.trim()===r?.trim()}if(t==="address2"){const r=QS({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Yr(r)&&n.trim()===r?.trim()}return!1}function vp(e){const t=Object.fromEntries(Object.entries(e).filter(([n,r])=>tc(n)&&Yr(r)&&!fR(e,n,r)).map(([n,r])=>[n,typeof r=="string"?r.trim():r]).sort(([n],[r])=>n.localeCompare(r)));return Of(JSON.stringify(t))}function hR(e){const t=e.filter(n=>n.value&&typeof n.value=="string"&&n.value.trim()!=="");return{cacheKey:t.map(n=>`${n.key}:${Of(n.value.trim())}`).join("|"),keysOnly:t.map(n=>n.key)}}function Na(e,t,n,r,o,i,a){a.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(Be(r),10),checkoutToken:o||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function gR(){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 M(({errors:u,reasons:d})=>{if(a&&yp(a)){const p=`shipping:${vp(a)}`;e.current.has(p)||!u?.some(m=>jS.has(m.code))&&!d?.includes(Uo.InvalidAddress)&&(Na(a.countryCode??"unknown",gp(a),"shipping_address",n,o,r,t),e.current.add(p))}if(l&&yp(l)){const p=`billing:${vp(l)}`;e.current.has(p)||!u?.some(m=>KS.has(m.code))&&!d?.includes(Uo.InvalidAddress)&&(Na(l.countryCode??"unknown",gp(l),"billing_address",n,o,r,t),e.current.add(p))}if(c&&c?.length>0){const{cacheKey:p,keysOnly:m}=hR(c);if(m.length>0){const f=`localization:${p}`;e.current.has(f)||u?.some(h=>JS.has(h.code))||(Na(a?.countryCode??l?.countryCode??"unknown",m,"localized_id",n,o,r,t),e.current.add(f))}}},[a,l,c,n,o,r,t])}function D3(){const e=se().shippingAddress.value,t=!Ff(e),n=Bs(e,{hiddenFields:["phone"]});return!t&&n?n:null}function _p(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 yR(){const e=Ln(),{message:t,code:n}=i0();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}=se();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=s0();F(()=>
19{i?.forEach(({message:c,code:u,field:d,origin:p,type:m})=>{e("violationError",{error:{message:_p(c),code:u,field:d,origin:p,type:m},timestamp:new Date})})},[e,i]);const{deliveryMethodsAddressErrors:a}=Mt(),l=uR(a);return F(()=>{l?.forEach(({message:c,code:u,field:d,origin:p,type:m})=>{(c||u||d||p||m)&&e("addressError",{error:{message:_p(c),code:u,field:d,origin:p,type:m,silencedViolation:!1},timestamp:new Date})})},[e,l]),null}function vR(){const e=q().deliveryNext;return x(()=>{const t=e.value;if(!t||t.status==="unavailable")return!1;const n=t.lines.filter(Jl);if(n.length!==1)return!1;const[r]=n;return r?r.methods.some(o=>o.methodType==="LOCAL"):!1})}function O3(e){return e}function _R(e,t){const[n]=ms(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}function Cy(e,t){if(t)return e.find(n=>n.deliveryStrategyHandle===t)}var et=(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))(et||{});function ky(){const{client:e,shop:t}=b();if(!t.hasFlagEnabled(zo))return null;const n=e.unstable_getSerialization("experiments");return ZS(n)}function hi(){const{shop:e}=b(),t=e.hasFlagEnabled(eE),n=e.hasFlagEnabled(zo);return t||n}function Vs(e){return e?.type==="thankYou"||e?.type==="postPurchase"}function F3(e,t){return e.greenPath.find(n=>n.route===t)!==void 0}const Iy=()=>{const{i18n:e}=b(),t=q().paymentFlexibilityPaymentTermsTemplate,n=Fn();return x(()=>{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")})},Ay=mt("ShellContext");function bR({children:e,shell:t}){return s(Ay.Provider,{value:t,children:e})}function cu(){return Ht(Ay)}function Fe(){const e=cu(),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,It(()=>e.configurationSignal.value[o])),n.get(o).value}});t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function Ty(){const{checkout:{configuration:e}}=b(),{orderSummary:t}=Fe(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return n?n==="VISIBLE":!0}function Us(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=M(c=>{i&&(t.unstable_forceCheckoutLayoutToOnePage(),wy(n,{...c,result:"success"}))},[t,i,n]),l=M((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 wy(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 PR(){const{i18n:e}=b(),t=SR(),{availableWallets:n}=We(),r=Ye(n);return x(()=>
19{if(!(r.value.length>0||!t.value))return{code:et.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function B3(){const e=ro(),t=cu(),n=Hc();return x(()=>{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&&!Ed(d));if(c)return c.l<50?"light":"dark";const u=i.colorScheme?o.schemes?.[i.colorScheme]?.base?.background:void 0;return u&&!Ed(u)&&u.l<50?"light":"dark"}).value}function V3(){const{shop:{customerAccountRequirement:e}}=b(),t=q().buyerIdentity,{email:n}=se();return x(()=>{const r=!!(t.value?.customerProfile&&(t.value.customerProfile.email||n.value));return!(e==="REQUIRED")&&!r})}function Er(){const{shop:e}=b(),{deliveryNext:t}=q(),{deliveryLines:n}=se(),r=Pe(),o=Nf("ONE_TIME_PURCHASE");return x(()=>{if(e.shipPickupInOneOrderEnabled){if(Vs(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(Sd))}const i=Xr(o.value);return Sd(i?.methodType)})}function U3(){const{checkout:e}=b(),t=Er();return x(()=>!t.value&&e.isShippingRequired.value)}function z3(e){const t=q().paymentMethods;return x(()=>t.value?.find(n=>n.type==="wallet"&&n.name===e))}function H3(){const{client:e,shop:t,source:n,observability:r}=b(),o=e.unstable_getSerialization("sessionToken");return M(({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};IA(i,a)||r.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",d),Vf(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 SR(){const e=q().paymentMethods,t=He("paymentMethods");return x(()=>t.value||!e.value||e.value?.length===0?!1:!!e.value?.every(n=>n.type==="wallet"||n.type==="walletsPlatform"||n.type==="giftCard"))}function Ly(){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 q3(){return 1e4*Ly()}function G3(){return 45e3*Ly()}function ER(e){const t=xy(e);return x(()=>t.value!==null)}function CR(e){const t=xy(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 xy(e){const t=e.inMemoryApplePayParts.paymentSheetError,n=e.inMemoryGooglePayParts.paymentSheetError;return x(()=>t.value?.type==="unusable_partial_address"?"APPLE_PAY":n.value?.type==="unusable_partial_address"?"GOOGLE_PAY":null)}function kR(e){const{i18n:t}=b(),n=hi(),o=Iy().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:fs,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 IR(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=We(),{i18n:n,checkout:r,shop:o}
19=b(),i=hi(),a=o.hasFlagEnabled(In),l=r.configuration.layout.isOnePage.value,c=qo({applePaySubscriptionsDecelerationActive:i,applePayThreePageVaultedReviewEnabled:a,isOnePageCheckout:l}),{queryParam:u,errorMessage:d,errorTitle:p,tone:m,shouldSuppressNotice:f}=Ry({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:c}),h=M(()=>({code:et.PaymentSheetViolations,tone:"warning",localizedMessage:n.translate("wallets.errors.subscription_review_required")}),[n]);if(u&&!f)return u===fs?h():{code:et.PaymentSheetViolations,localizedTitle:p,tone:m,localizedMessage:d}}function Ry({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:r,router:o,shop:i}=b(),a=o.currentUrl.value,l=hi(),c=i.hasFlagEnabled(zo),u=Bf(),d=i.hasFlagEnabled(In),p=r.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=Us(In),{queryParam:f,errorMessage:h,errorTitle:g,tone:y}=kR(a),_=ky(),P=f===fs&&t!==void 0&&(n??qo({applePaySubscriptionsDecelerationActive:l,applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),v=P;return F(()=>{if(f){P&&t&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&tE({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 k=new URL(a);k.searchParams.delete(f),history.replaceState(null,"",k.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 W3=()=>M(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}))}},[]);`${nE.portableWallets.url}`;const jo="guest",AR="checkout_return_to_guest_checkout";function TR(e){e.searchParams.has(hl)&&(e.searchParams.delete(hl),history.replaceState(null,"",e.href))}function wR(e){e.searchParams.has(jo)&&(e.searchParams.delete(jo),history.replaceState(null,"",e.href))}function LR({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const o={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},i=e.peek();switch(t){case Le.AmazonPay:case Le.BuyWithPrime:{const[a]=ms(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=nc(i,o)}function xR(e){const t=q().paymentMethods;return x(()=>t.value?.find(n=>n.type==="walletsPlatform"&&n.name===e))}function $3(e){const t=q().paymentLines;return x(()=>t.value?.lines.find(n=>n.method.type==="walletsPlatformPaymentMethod"&&n.method.name===e))}function RR(){const{checkout:e}=b(),t=e.configuration.addressSettings.nonBillingAddressSettings;function n({addressSignal:r,buyerDetailsAddress:o}){tn(()=>{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 M(n,[t])}function Y3(){const{email:e,shippingAddress:t,billingAddress:n,billingAddressOption:r,paymentLines:o}=se(),i=RR();return M((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&&LR({paymentLineSignal:o,walletName:l,walletParams:c.walletParams,email:c.email??void 0})},[n,r,e,i,o,t])}function j3(e=["phone"]){const{shippingAddress:t}=se(),n=t.value;return{formattedAddress:Bs(n,{hiddenFields:e}),address:n}}function MR(){const e=xR(Le.BuyWithPrime);return x(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return!!n})}var NR=(e=>(e.Api="ApplePay::Exception::API",e))(NR||{}),DR=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(DR||{}),gi=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(gi||{});
19function OR({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(us);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 FR({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const r=iu().geolocation.country.code,{shop:o,observability:i,client:{userAgent:a},embed:l}=b(),c=o.hasFlagEnabled(rE)?l?.client?.embedderHostname:void 0,u=U(),d=Sr(),p=St().value,[m]=Hg(),f=m.includes("PICKUP_POINT");return V(()=>!e||t||n.sessionLoadFailed.value||!p||f?!1:qR({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 BR(e){const t=e.sdkStatus,n=e.buttonStatus;return x(()=>t.value.status!==gi.Error&&n.value.status!=="error")}function VR({inMemoryAmazonPayParts:e}){const t=vR(),n=MR(),r=e.sdkStatus,o=e.buyWithPrimeButtonStatus;return x(()=>n.value&&!t.value&&r.value.status!==gi.Error&&o.value.status!=="error")}function UR(e){const{status:t}=e;return t!=="error"&&t!=="not_eligible"}function My(e,t,n){return e==="SHOP_PAY"&&!n?!1:t?.includes("ACCELERATED_CHECKOUT")??!1}function Ny(e){const{embed:t}=b(),n=!!t?.isFlagshipPartner&&!Uf(t?.embedder),r=e.buttonStatus.value;return V(()=>!(r.status==="error"||r.status==="not_eligible"||n&&r.status==="not_rendered"),[r.status,n])}function zR(e){const t=e.buttonStatus.value.status;return M(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 HR(e){const t=e.acceleratedCheckoutButtonStatus.value,n=e.payWithPayPalButtonStatus.value;return M(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 qR({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:o,embedderHostname:i}){if(YR()){const p=r||!!i,m=jR(o);if(!p||!m)return!1}return!(!!window.ApplePaySession&&Dy(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&GR(t))||!WR(t,n)?!1:e==="CN"?$R(o):!0}function Dy(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 GR(e){return typeof ApplePaySession.supportsVersion!="function"?!1:Dy(e,"supportsVersion",()=>ApplePaySession.supportsVersion(iE))}function WR(e,t){return t.current!==void 0?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}function $R(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 YR(){return typeof window>"u"||window.self!==window.top}function jR(e){const t=oE(e);return!!(t?.name==="Safari"&&t.version&&Number(t.version)>=17)}function KR(e,t=0){const n=typeof window>"u"?0:window.innerWidth;return n<=279?2:n<=375?e||t===3?3:2:4}function Oy(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e}}=b(),{shopPayEnabledForSellerOfRecord:t}=q();return x(()=>t.value??e)}function Fy(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:t}}=b(),n=Oy(),r=sE(),{deferredTotal:o}=q(),i=t.current;return x(()=>{if(r.value&&o.value)return"deferred_payment";if(!(i.value==="shopPay"&&e))return n.value?void 0:"shop_pay_disabled"})}function JR(){const e=Fy();return x(()=>e.value===void 0)}function XR({maxWalletButtonCount:e,userAgent:t}){if(t==="")return aE;function n(r=[]){const o=r.indexOf(Le.BuyWithPrime);o===-1||o<e||(r.splice(o,1),r.splice(e-1,0,Le.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",Le.BuyWithPrime,Le.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",Le.BuyWithPrime,Le.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const r=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",Le.BuyWithPrime,Le.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",Le.BuyWithPrime,Le.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",Le.BuyWithPrime,Le.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const r=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",Le.BuyWithPrime,Le.AmazonPay,"GOOGLE_PAY","VENMO"];return n(r),r}else return t.match(/IE/)?["SHOP_PAY","PAYPAL_EXPRESS",Le.BuyWithPrime,Le.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]:["SHOP_PAY","PAYPAL_EXPRESS",Le.BuyWithPrime,Le.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}}function By(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=ER(e);CR(e);const u=c.value,d=OR({hasUnusablePartialAddress:u,inMemoryGooglePayParts:t}),p=FR({hasApplePayPaymentMethod:l,hasUnusablePartialAddress:u,inMemoryApplePayParts:o}),f=BR(r).value,g=VR({inMemoryAmazonPayParts:r}).value,_=x(()=>UR(i.buttonStatus.value)).value,P=zR(o),v=HR(n),E=JR().value,{client:{userAgent:k}}=b();return V(()=>{function I(T){const L=T.name;switch(L){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return p;case"GOOGLE_PAY":return d;case Le.BuyWithPrime:return g;case Le.AmazonPay:return f;case"SHOP_PAY":return E;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return _;default:return rn(L)}}function C(){const T=a?.filter(L=>(L.type==="wallet"||L.type==="walletsPlatform")&&I(L))??[];return QR(T)}const w=C().flatMap(T=>v(T)??[]).flatMap(T=>P(T)??[]),A=XR({maxWalletButtonCount:KR(E,w.length),userAgent:k});return w.sort((T,L)=>A.indexOf(T.name)-A.indexOf(L.name))},[a,p,d,g,f,_,P,v,E,k])}const QR=e=>e.find(n=>n.name===Le.BuyWithPrime)?e.filter(n=>n.name!==Le.AmazonPay):e;function ZR(){const e=q().paymentMethods,t=He("paymentMethods");return x(()=>t.value||!e.value||e.value?.length===0?!1:!!e.value?.some(n=>n.type==="wallet"||n.type==="walletsPlatform"))}function e1(){const{checkout:e,source:t}=b(),{didIncrementUnusablePartialAddressMetric:n,inMemoryGooglePayParts:r,inMemoryPayPalParts:o,inMemoryVenmoParts:i,inMemoryApplePayParts:a,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=We(),u=Ye(By({inMemoryGooglePayParts:r,inMemoryPayPalParts:o,inMemoryVenmoParts:i,inMemoryApplePayParts:a,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:n})),d=Ye(Ny(c)),p=x(()=>u.value?.filter(({placements:f,name:h})=>My(h,f,d.value)).length),m=ZR();return x(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||t.type==="simulated"&&!p.value&&m.value))}const Vy=qe({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function t1({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:o}){const i=new Set(Hf),a=new Set([...rc,...zf]),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 n1({children:e}){const t=uu();return s(Vy.Provider,{value:t,children:e})}function uu(){const e=e1(),{shop:{acceptTipPayments:t},checkout:n}=b(),r=n.configuration.layout.isOnePage.value,o=lE(n.identity.current.value),i=!He("isShippingRequired").value&&!n.isShippingRequired.value;return V(()=>t1({showExpressCheckout:e.value,isOnePageCheckout:r,acceptTipPayments:t,disableDeliveryExtensions:i,isVaultedWalletIdentity:o}),[t,i,o,r,e.value])}function r1(){return new Set([...Hf,...rc])}const o1=new Map([["thankYou",[...rc,...zf]]]);function i1(e){const t=o1.get(e.type)??[];return new Set(t)}const Uy=Ge({suspenseName:"extensions",id:()=>
19"ExtensionsInner",displayName:"ExtensionsInner",load:()=>Ve(()=>import("./ExtensionsInner.BAojSOWO.js"),__vite__mapDeps([11,1,7,2,3,4,5,12,13,14,15,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,6,53,54,8]))});function s1(e){const{checkout:{extensibility:{ui:t}}}=b();return s(n1,{children:s(ye,{when:t.enabled,fallback:e.children,children:s(Uy,{...e})})})}const a1=mt("PostPurchaseContext");function l1({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(a1.Provider,{value:c,children:e})}const c1={addressModalState:{status:"idle",addressType:"shipping",setAsDefault:"default"}};function zy(e){return e[0]?.localizedMessage??e[0]?.nonLocalizedMessage}function u1({enabledDeliveryMethods:e=[],delegatedPaymentInstrument:t}={}){const n=ce([]);return{inventoryRecoverySignal:ce(void 0),billing:ce(!1),contact:ce(!1),createAddressParts:Af(c1),currentDiscountCodeAttemptSignal:ce(null),delegatedPaymentInstrument:ce(t),deliveryMethodDeltaSignal:ce(0),deliveryMethodsAddressErrors:uE(),deliveryMethodTimingSignal:ce(0),derivedErrorMessageSignal:It(()=>zy(n.value)??""),directPaymentFieldsFilled:ce(!1),discountCodeWarningSignal:ce(null),installmentMonthsSignal:ce(void 0),missingMerchandiseStableIdsSignal:ce([]),msiInvalidationReasonSignal:ce(null),msiInvalidationSnapshotSignal:ce(null),msiHadInstallmentsSignal:ce(!1),editorSetShopPaySignal:ce(null),emailMarketingOptInShownSignal:ce(!1),emailMarketingConsentGrantReachedSignal:ce(!1),previousPhoneMarketingDisclosureKeySignal:ce(void 0),smsMarketingOptInShownSignal:ce(!1),shopPayMobilePhoneInputShownSignal:ce(!1),privacyBannerSettingsSignal:ce(null),extensionSkeletonBatchStateSignal:ce("idle"),extensionSkeletonBatchReleaseIdSignal:ce(0),extensionSkeletonPendingCountSignal:ce(0),payment:ce(!1),reductionsErrorsSignal:n,reductionsValueSignal:ce(""),refreshNegotiationSignal:ce(!1),rememberMePhoneErrorSignal:ce(void 0),rememberMePhoneSignal:ce(void 0),shipping:ce(!1),voidedGiftCardsSignal:ce([]),cachedMembershipViolations:ce([]),hasNegotiatedAlternativePaymentCurrencySignal:ce(!1),newCardSignal:ce(void 0),hasLoadedSignal:ce(!1),bankIdNumberSignal:ce(void 0),lastNegotiatedBinSignal:ce(void 0),bankPaymentTokenSignal:ce(void 0),checkoutProtocolModalEventSignal:ce("none"),checkoutProtocolPayButtonLoadingSignal:ce(void 0),checkoutProtocolPayButtonDisabledSignal:ce(void 0),checkoutProtocolPayButtonMountedSignal:ce(!1),checkoutProtocolPayButtonStageSignal:ce("pay"),checkoutProtocolPresentedSignal:ce(!1),allRenderedSections:ce({}),getRenderedSection:cE({defaultValue:{},initial:{}}),marketingPhoneInputError:ce(void 0),buyerHasActedSignal:ce(!1),appMetafieldsSignal:ce({}),cartLineChangeLoadingSignal:ce(!1),prequalifiedAnimatedBadgeShowCounter:ce(0),enabledDeliveryMethodsSignal:ce(e)}}function d1(e,t){return e?.countryCode||t?.countryCode}function p1(e){return e.some(t=>t.__typename==="ConfirmChangeViolation"&&t.code==="TAX_TAX_INCLUSIVITY_MISMATCH")}function K3(e){const t=e.shippingAddress.peek(),n=e.locationAddress.peek();return d1(t,n)}function Hy(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=p1(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 bp="8b9035807842a4e4dbe009f3f1478127",m1=(e,t)=>{const n=e.some(i=>i.id===bp),r=t.find(i=>i.id===bp),o=new Set(e);return!n&&r&&o.add(r),Array.from(o)};let Li;function f1(e,t){async function n(){return Li||(Li=ut(()=>Ve(()=>import("./actions.CR0-Z7yc.js"),__vite__mapDeps([55,2,1,3,4,5,56,6,57,58,59,60,7,8]))),Li)}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 qy(e){return e.filter(t=>t.__typename==="ApplyChangeViolation"&&pE.has(t.code))}function Gy(e){return e.filter(t=>t.__typename==="UnprocessableTermViolation"&&!qf.has(t.code))}function Wy(e){return e.filter(t=>t.__typename==="ConfirmChangeViolation"&&dE.has(t.code))}function $y(e){return e.filter(t=>t.__typename==="RemoveTermViolation"&&Ql.has(t.code))}function Yy(e){const t=Gy(e),n=Wy(e),r=qy(e),o=$y(e);return{unprocessableTermViolations:t,unprogressableChangeViolations:n,applyChangeViolations:r,removeTermViolations:o,hasAny:t.length>0||n.length>0||r.length>0||o.length>0}}function h1(e,t={}){return e.status!=="filled"?[]:e.memberships.filter(n=>!t.onlyApplied||n.apply).map(n=>n.handle)}
19function g1(e,t,n){return ri(e.address,t)&&n.includes(e.handle)}const y1=/^\$.merchandiseDiscount.lines\[(\d+)\]$/,v1=/^\$.memberships.memberships\[(\d+)\]$/;function _1(e){return e.filter(t=>t.__typename==="AcceptNewTermViolation")}function b1(e){return e.filter(t=>t.__typename==="InputValidationError")}function P1(e){return e.filter(t=>t.__typename==="UnresolvableTermViolation")}function J3(e,t,n,r){const o=Yy(e);return o.hasAny?(S1(o.unprocessableTermViolations,t),{hasErrors:!0,requiresRenegotiation:C1(o.applyChangeViolations,t,n,r)}):{hasErrors:!1,requiresRenegotiation:!1}}function S1(e,t){e.some(mE)||e.forEach(n=>{const{code:r,localizedMessage:o,nonLocalizedMessage:i}=n,a=o||i;I1(t);const l={message:a,origin:"server"};fE.has(r)?t.directPaymentErrors.number.value=l:hE.has(r)?t.directPaymentErrors.name.value=l:gE.has(r)?t.directPaymentErrors.expiry.value=l:yE.has(r)?t.directPaymentErrors.verificationValue.value=l:vE.has(r)?t.directPaymentErrors.general.value=l:_E(n)||Gf(n)||n.target==="$.payment"&&(t.generalPaymentError.value=a,t.generalPaymentErrorCode.value=r)})}function E1(e,t,n,r){return t.some(o=>e.code===o.violation.code&&g1(o,n,r))}function C1(e,t,n,r){let o=!1;const i=new Set;if(e.forEach(a=>{const l=y1.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(bE.has(a.code)){const c=t.shippingAddress.peek(),u=t.memberships.peek();if(!u||u.status!=="filled")return;const d=h1(u);if(!d.length||E1(a,n.cachedMembershipViolations.value,c,d))return;const m=k1(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 k1(e,t){const n=v1.exec(e);if(n&&n[1]){const r=parseInt(n[1],10),o=t.memberships[r];if(o)return o.handle}return null}function I1(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 mn(e){const t={};return e.forEach(n=>{t[n.code]=(t[n.code]||0)+1}),t}function A1({observability:e,negotiationStage:t,silenceViolations:n,violations:r,retainedViolations:o,reportedCodes:i}){const a=Object.entries(T1(PE(r),o)).filter(([l])=>!i.has(l));a.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 T1(e,t){const n=mn(t);return Object.entries(mn(e)).reduce((r,[o,i])=>{const a=i-(n[o]??0);return a>0&&(r[o]=a),r},{})}function X3(e){const t=qy(e),n=Gy(e),r=Wy(e),o=$y(e),i=_1(e),a=b1(e),l=P1(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:mn(t),blockingProgress:mn(n),informational:mn(r),removingItems:mn(o),mustAcceptTerms:mn(i),invalidInputs:mn(a),unresolvable:mn(l),other:mn(u)}}const Ui="cart";function w1(e,t){e&&e.type==="cartNext"&&t.delete(Ui)}const L1="cartNext";function x1(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 R1({client:e,url:t,source:n,configuration:r}){if(w1(n,e.cookies),r.allowRedirectToStorefront){const o=L1===n.type;window.location.assign(o?t.storefront("cart/clear"):t.storefront())}}class jy extends Error{constructor(){super(...arguments),this.name="RejectedNegotiationRequest"}}class M1{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(Cd(o)){for(const i of Object.values(o.fields))r(i);continue}o instanceof cd&&r(o)}return()=>
19{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),Cd(t)){const r=[];tn(()=>{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[SE](r);return}t instanceof cd&&!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 N1=1e4;class D1{#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,N1);try{return await t()}finally{clearTimeout(o),r()}}}const Pp=5e3,Sp=50;class O1 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 F1{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=ce(!1),this.hasNegotiatedOnce=ce(!1),this.pendingFieldsNegotiation=ce(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 O1,this.negotiationRequestSerializer=new D1,this.inFlightRunCount=0,this.outstandingRunFailures=[];const E=new Set(v);this.initialUnresolvedFields=ce(E),this.loading=ce(new Set(E)),this.isBlocked=this.blocked,this.actions=f1(this,g);const k=Wf(o),S=this.persistenceManager?.createUpdate(fn.PostPurchaseInquiryStatus,{scope:k});S&&this.parts.postPurchaseInquiryStatus.subscribe(A=>S(A));
19const I=this.persistenceManager?.createUpdate(fn.ExternalDeliveryIds,{scope:k});I&&this.parts.externalDeliveryIds.subscribe(A=>I(A));const C=this.persistenceManager?.createUpdate(fn.ShopPayArtifact,{scope:k});C&&this.parts.shopPayArtifact.subscribe(A=>C(A));const w=this.persistenceManager?.createUpdate(fn.SetShippingAddressAsDefault,{scope:k});w&&this.parts.setShippingAddressAsDefault.subscribe(A=>{A!==void 0&&w(A)})}get keepReconcilerAliveAcrossPolls(){return this.shop.hasFlagEnabled(EE)}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:Uo.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 M1(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&&x1(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 jy),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>=Sp&&!this.hasReportedExcessiveNegotiationRounds&&(this.hasReportedExcessiveNegotiationRounds=!0,this.observability.log("negotiation_rounds_excessive","Checkout has run an unusually high number of negotiation rounds",{negotiationRound:t,threshold:Sp})),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 ${Pp/1e3} seconds`,{queueSize:this.pendingNegotiationsRequests.size})},Pp);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=OE(i.violations,o.silenceViolations);A1({observability:this.observability,negotiationStage:o.negotiationStage,silenceViolations:o.silenceViolations,violations:i.violations,retainedViolations:c,reportedCodes:this.reportedSilencedViolationCodes});const u=i.status,p=Yy(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}
19this.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 D={enabledDeliveryMethods:P};t.sellability===void 0&&(D.missingSellerProposalReason="negotiated_update_sellability_missing"),xE(this.observability,"negotiator_delivery_line_fallback","[Negotiated] Falling back to enabledDeliveryMethods for delivery line construction because sellability was not available",D)}const v=t.sellability?.enabledDeliveryMethods??[],E=v.length>0?v:P,k=v.filter(D=>D!=="NONE"),S=k.length>0?k:P.filter(D=>D!=="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 C=_.deliveryLines.peek(),w=t.mustSelectProvidedShippingRate??this.current.fields.mustSelectProvidedShippingRate.value??!1,A=w&&C.length>0?C.map(D=>D.peek()):RE({negotiatedDeliveryNext:I.deliveryNext,enabledDeliveryMethods:I.enabledDeliveryMethods,buyerProposalDelivery:I.buyerProposalDelivery,negotiatedMerchandise:t?.remoteMerchandiseDetails?.stableIdToShopId?.size?t.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise:r?.merchandise,mustSelectProvidedShippingRate:w}),T=ME(I.buyerProposalDelivery);u=(I.kind==="recover"||I.deliveryNext.lines.length===0?A:NE({negotiatedDeliveryNext:I.deliveryNext,enabledDeliveryMethods:I.enabledDeliveryMethods,existingProposedDeliveryLines:C.map(D=>D.peek()),fallbackToFirstDeliveryMethod:!1,mustSelectProvidedShippingRate:w,buyerDeliveryOptionsMap:T,negotiatedMerchandiseLines:t.merchandiseLines?.lines})).map(D=>DE(D)),m=_.deliveryMacros;const N=_.deliveryMacros.peek();p=m1(I.deliveryMacros,N)}break}case"merchandiseLines":{const f=this.parts[c].peek(),h=t.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise,g=!!t?.remoteMerchandiseDetails?.stableIdToShopId?.size,y=g?h?kd(h,f):f:r?kd(r?.merchandise,f):f,_=g?h:r?.merchandise;_&&(this.context.missingMerchandiseStableIdsSignal.value=wE(_)),u=LE({proposedMerchandise:y,negotiatedMerchandiseLines:t.merchandiseLines}),d=this.parts[c];break}case"cartMetafields":{u=TE(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=AE(h,f??[])}break}case"paymentLines":{const f=t[c],h=this.parts[c].peek(),g=$f(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:Yf(_),hasFixedSellingPlan:kE(_),paymentTermsTemplateType:P}})():{};u=IE({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=CE({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));tn(()=>{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 B1(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 Ep{#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 V1({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=jf(p??void 0),h=m?.__typename==="Throttled"||m?.__typename==="NegotiationResultAvailable"?new Ep(B1(m)):new Ep({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"?Hy(m,f,Kf(g?.note)):[],_={type:"success",violations:f??[],errors:[],negotiationStage:"negotiation"},P=ce(_),v=ce(_);return P.subscribe(k=>{v.value=k}),{negotiator:new F1(n,t,t.unstable_getSerialization("sessionToken"),u,a,d,h,ce(!1),e,i,P,v,u1({enabledDeliveryMethods:l.enabledDeliveryMethods,delegatedPaymentInstrument:FE(p?.session?.checkoutPaymentMethods)}),ce([]),r,o,c,l,y),throttle:h}}function so(){return Ht(BE)}function ao(){return Ht(Jf)}function U1(){const e=ao(),{snapshot:t,subscribe:n}=V(()=>({snapshot:()=>e.current,subscribe:o=>e.subscribe(o)}),[e]),r=KP(n,t);return V(()=>({throttle:r,setThrottle:o=>e.set(o)}),[e,r])}function z1({value:e,children:t}){return s(Jf.Provider,{value:e,children:s(H1,{children:t})})}function H1({children:e}){const{graphql:{throttleGraphql:t}}=b(),{throttle:n}=U1();return t.setPollUrl("pollUrl"in n?n.pollUrl:void 0),s(G,{children:e})}const Ky=e=>t=>{if(t==null||t.status!=="processed")return;const{loading:n,initialUnresolvedFields:r,current:o}=e,i=VE(t,{isShippingRequired:o.fields.isShippingRequired.peek(),ucp:o.fields.ucp.peek()});tn(()=>{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 q1({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]=ie(),{data:h,loading:g}=so();if(m)throw m;const y=h?.session?.negotiate?.result,_=V(()=>jf(h),[h]),P=y?.__typename==="NegotiationResultAvailable",v=y?.__typename==="CheckpointDenied",E=P?y.checkpointData:void 0;Rt(()=>{E&&l.checkpointToken.peek()!==E&&l.unstable_overwriteCheckpointToken(E)},[l,E]);const k=y?.__typename==="NegotiationResultAvailable"?y.sellerProposal:void 0,S=Kf(k?.note),I=V(()=>V1({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:C,throttle:w}=I;F(()=>{(async function(){if(y&&y.__typename!=="Throttled"&&Hy(y,_,S).length!==0)try{const L=await C.negotiate({force:!0,silenceViolations:["all"],negotiationStage:"negotiation",customizeNegotiation:N=>N});switch(C.pendingFieldsNegotiation.value=L,L.status){case"success":{const N={type:"success",violations:L.violations,errors:L.errors,negotiationStage:"negotiation"};C.lastJourneyProgression.value=N,C.hasNegotiatedOnce.value=!0,await C.runListeners(N);break}case"error":{const N={type:"error",violations:L.violations,errors:L.errors,negotiationStage:"negotiation"};C.lastJourneyProgression.value=N,C.hasNegotiatedOnce.value=!0,await C.runListeners(N);break}
19case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:rn(L)}}catch(L){L instanceof Error&&f(L)}})()},[C,y,_,S,a]);const A=Ky(C);if(F(()=>{A(l.latestReceipt.value)},[]),h==null&&g)return null;if(v){const T=UE(y.redirectUrl,typeof window>"u"?t.currentUrl.value.toString():void 0);return typeof window>"u"?t.redirect(T):window.location.assign(T.href),null}return s(zE.Provider,{value:C,children:s(z1,{value:w,children:e})})}function Jy({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return!!(t&&HE.has(t))}function Xy({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 G1(e){return Jy(e)?"checkout-sheet":Xy(e)?"mobile-sdk":null}const W1=Ge({displayName:"CheckoutSheetProtocolProvider",renderError:ev,renderLoading:Qy,load:()=>ut(()=>Ve(async()=>{const{CheckoutSheetProtocolProvider:e}=await import("./CheckoutSheetProtocolProvider.CTHXePF8.js");return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([61,1,2,3,4,5,62,63,64,6,7,8])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),$1=Ge({displayName:"MobileCheckoutSdkProvider",renderError:ev,renderLoading:Qy,load:()=>ut(()=>Ve(async()=>{const{MobileCheckoutSdkProvider:e}=await import("./MobileCheckoutSdkProvider.Chqnnsi4.js");return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([65,1,2,3,4,5,62,63,64,66,6,7,8])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))});function Qy({children:e}){return s(G,{children:e})}const Y1={"checkout-sheet":W1,"mobile-sdk":$1};function Zy(e){const t=G1(e);return t?Y1[t]:null}function j1({children:e}){const t=Zy(b());return t?s(t,{children:e}):s(G,{children:e})}function ev(e){throw e}const K1=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],tv=mt("AnnouncementEmitterContext");function J1({children:e}){const t=U(new Map),n=M((l,c)=>{t.current.has(l)||t.current.set(l,new Set);const u=t.current.get(l);u.has(c)||(JP(c),u.add(c))},[t]),r=M((l,c)=>{const u=t.current.get(l);if(u)for(const d of u)d(c)},[t]),o=M((l,c)=>{const u=t.current.get(l);u?.has(c)&&(ud(c),u.delete(c))},[t]),i=M(l=>{const c=l?[l]:K1;for(const u of c){const d=t.current.get(u);if(d){for(const p of d)ud(p);d.clear()}}},[t]),a=V(()=>({on:n,emit:r,off:o,removeAllListeners:i}),[n,r,o,i]);return s(tv.Provider,{value:a,children:e})}function nv(){return Ht(tv)}const rv=qe(null),Q3=mt("PendingComponentContext");function X1({children:e}){const t=V(()=>{const n=ce(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(rv.Provider,{value:t,children:e})}function Z3(){return Se(rv)}const eY=mt("ExtensionPointContext"),tY=mt("ExtensionContext"),Q1=mt("CheckoutEditorBridgeContext");function Z1({children:e}){const t=Sr(),n=x0(),[r,o]=ie(null),i=St();return t?s(Q1.Provider,{value:r,children:[n||r?e:null,s(ye,{when:i,children:s(eM,{setContext:o})})]}):e}const eM=Ge({load:()=>Ve(()=>import("./CheckoutEditorBridge.DJpw240b.js"),__vite__mapDeps([67,1,54,34,14,2,3,4,5,68,59,64,56,6,7,8]))}),ov=qe({loading:!1}),tM="dev";function nY(){return Se(ov)}function nM(e){return!(!e?.version||parseInt(e.version,10)<3)}const Da="dev_mode";function rM(e){return{get:()=>e.get(Da),set:t=>{const n=new Date().getTime(),r=new Date(n+504*60*60*1e3);e.set(Da,t,{expiry:r})},remove:()=>{e.delete(Da)}}}function oM(){const{client:e}=b();return V(()=>rM(e.cookies),[e.cookies])}function iM({children:e}){const t=sM();return s(ov.Provider,{value:t,children:e})}function sM(){const e=oM(),{router:t,shop:n}=b(),r=!1,o=V(()=>t.currentUrl.value.searchParams.get(tM)??e.get(),[t,e]),i=o!=null&&(n.allowExtensionDevelopment||r),[a,l]=XP((c,u)=>{switch(u.type){case"fetched":{const d=nM(u.workspace)?{...u.workspace,extensions:aM(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=lM(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 aM(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 lM(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:qE("App",t)}function iv(){const{buyerIdentity:e,deliveryNext:t}=q(),{checkout:n,shop:r,i18n:o}=b(),i=x(()=>GE(e.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:a}=jt(i.value),l=Ye(a),c=r.additionalAddressFieldsEnabled;return x(()=>WE({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 lo(){const{buyerIdentity:e}=q(),t=er();return x(()=>t.value.enabledDeliveryMethods.includes("PICK_UP")&&!!e.value?.purchasingCompany)}function co({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(nt(t)&&n.length>0)return n[0]}function sv(){const e=lo(),t=q().deliveryNext,{checkout:n}=b();return x(()=>{const r=n.proposal.facts.delivery??[],o=r.length>0&&r.every(i=>i.pickupAddress!==null);return e.value&&(br(t.value)||o)})}function du(){const e=Fn(),{buyerIdentity:t,shippingAddress:n}=q(),{checkout:r,source:o}=b(),i=sv(),a=lo(),l=Pn();return x(()=>l.value||!(a.value||e.value)||i.value?!1:!Ff(co({checkout:r,source:o})?.deliveryAddress??n.value)&&!t.value?.purchasingCompany?.location.shippingAddress)}function cM(){const e=q().buyerIdentity,t=Pn(),n=lo(),{checkout:r,source:o}=b(),i=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return x(()=>{const a=e.value?.purchasingCompany,l=(i.value??!1)||!!co({checkout:r,source:o});return!!a&&(t.value||n.value&&!l)&&r.isShippingRequired.value})}const Cp=["contact-information","shipping-address"],kp=["delivery-method"],Ip=["payment-methods","billing-address","localization-extension"];function uM(){const{i18n:e,shop:t,source:n,checkout:r,observability:o}=b(),{buyerIdentity:i}=q(),a=du(),l=Pn(),c=iv(),u=lo(),d=cM(),p=M((h,g)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:h,reason:g}),!0),[o]),m=M(h=>{const g=i.value?.purchasingCompany;return!g?.location.shippingAddress||!h?!1:!!(l.value&&c.value&&ri(g.location.shippingAddress,h))},[i,l,c]);return x(()=>{if(!i.value?.purchasingCompany)return;const g=!nt(n)&&r.isShippingRequired.value&&!a.value,y=d.value,_={onePage:()=>({id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...y?Cp:[],...g?kp:[],...Ip]}),information:()=>({id:"information",label:e.translate("contact.title"),route:"/information",features:Cp,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:kp,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:Ip}),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 Ap(e){!e.parts.email.value.trim()||!e.parts.acceptEmailMarketing.value||(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}
19function gn(e,t){return e?.id===t?.id&&e?.label===t?.label&&e?.route===t?.route}function dM(){const e=Pe(),t=Je(),{checkout:n}=b(),r=n.configuration.layout.isOnePage.value;return Hh(async(o,i)=>{if(o==="completion"){Ap(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=>gn(m,l)),p=pM(c.greenPath,d,u);(l.id==="shipping"||l.id==="information"&&p?.id==="shipping")&&Ap(t)}),null}function pM(e,t,n){return e.slice(t+1).find(r=>r.skipOverPage==null||!r.skipOverPage(n))}function mM(e){return e?.type==="thankYou"}function fM({router:e,plan:t,journeyStateSignal:n}){const r=U(void 0),o=x(()=>{const l=e.currentUrl.value.normalizedPath;return t.greenPath.find(c=>c.route===l)}),i=x(()=>{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=x(()=>{const l=n.value.plan.detours.find(c=>c.route===e.currentUrl.value.normalizedPath);return mM(l)});return{pageBeforeDetour:i,completed:a}}function av(e){const t=typeof e=="string"?e:e.type;return nt(e)||t==="draftOrder"}function hM(){const{data:e}=so();return e?.session?.negotiate.result.__typename!=="NegotiationResultAvailable"?!1:e.session.negotiate.result.sellerProposal.delivery.__typename==="PendingTerms"}function gM(){const{data:e}=so(),{checkout:t}=b(),n=e?.session?.negotiate.result;let r;if(n?.__typename==="NegotiationResultAvailable"&&n.sellerProposal.delivery.__typename==="PendingTerms"){const{sellerProposal:i,buyerProposal:a}=n;r=Xf({delivery:i.delivery,buyerDelivery:a.delivery,remoteDelivery:Qf(i.remote).remoteDelivery})}const{details:o}=jt(r?.countryCode);return r==null?!1:oc({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:o})}function yM(){const{data:e}=so();if(e?.session?.negotiate.result.__typename!=="NegotiationResultAvailable")return;const{sellerProposal:t}=e.session.negotiate.result;return Xf({delivery:t.delivery,remoteDelivery:Qf(t.remote).remoteDelivery})}function vM(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}function rY(e){return e==="SUBSCRIPTION"?"subscription":"oneTimePurchase"}function xl(e){return e.length===1&&e[0]==="PICK_UP"}const Br="departure_page";function lv({violations:e,greenPath:t,negotiated:n,currentPage:r}){const o=new Set(e.map(uo)),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=uv(t,r,"payment-methods");if(bM(i)&&a)return a;const l=PM(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 bM(e){return e?.failure.type==="payment"&&e.failure.hasOffsitePaymentMethod===!0}function PM(e,t){return t?e.find(({id:n})=>n===t):void 0}function SM(){const{router:e}=b(),t=cv();return M((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 cv(){const{observability:e}=b(),{history:t,plan:n}=Pe().value,r=Je();return M(o=>EM({feature:o,greenPath:n.greenPath,history:t,negotiated:r,observability:e}),[n.greenPath,r,t,e])}function EM({feature:e,greenPath:t,history:n,negotiated:r,observability:o}){let i=uv(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 uv(e,t,n){return[...e].reverse().find(i=>(typeof i.features=="function"?i.features(t.current.peek()):i.features).includes(n))}function CM(e){return e.split("$.")[1]?.split(".").map(t=>t.replace(/\[\d+\]/g,""))??[]}function uo(e){if(!("target"in e))return;const[t,n]=CM(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 Qr.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}
19const kM=["checkout","cartNext","draftOrder"];function dv(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if(r?.type!=="wallet")return!1;const o=vc(n);return r.name==="APPLE_PAY"||r.name==="PAYPAL_EXPRESS"&&o}function IM({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 AM(){const e=IM({key:"operatziya_y",variants:[Lr.Control,Lr.Treatment]}),{client:t}=b(),r=t.unstable_getSerialization("experiments")?.find(o=>o.clientHandle===oA)?.variant===Lr.Treatment;return e||(r?Lr.Treatment:Lr.Control)}function pv(){const{shop:e}=b(),t=AM()===Lr.Treatment;return!!e.confirmationPageEnabled||t}function mv(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}const Tp=["delivery-method"],TM=new Set($E),wM=new Set(YE),LM=new Set(jE);function xM(){const{i18n:e,shop:t,source:{type:n},checkout:r,observability:o}=b(),{extensibility:i}=r,a=er(),l=uu(),c=kM.includes(n),{data:u}=so(),d=yM(),{details:p}=jt(d?.countryCode),m=n==="draftOrder",f=r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,h=pv(),{parts:g}=Ot(),y=q(),_=y.paymentMethods.value,P=g.paymentLines,v=r.configuration.addressSettings.nonBillingAddressSettings.value,E=vM(r),k=y.isShippingRequired.value,S=M((C,{excludedExtensionTargets:w}={})=>i.ui.hasBlockingExtensionForFeatures({features:C,placementReferences:l,excludedExtensionTargets:w}),[l,i.ui]),I=M((C,w)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:C,reason:w}),!0),[o]);return V(()=>RM({i18n:e,sourceType:n,addressSettings:v,billingAddressSettings:E,hasBlockingUiExtensionForFeatures:S,getSellableDeliveryMethods:()=>a.value,initialNegotiationData:u,isDraftOrderCheckout:m,isPrePopulatedSourceType:c,isShippingRequired:k,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,k,P,h,d,p,f,n,e,t,r,_,o,I])}function RM({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 rs(S.contactInfo,S.allViolations);case"shipping-address":return OM({shippingAddress:m,addressSettings:n,countryDetails:f,violations:S.allViolations,state:S,isDraftOrder:l});case"billing-address":return FM(r,S.billingAddress,S.allViolations);case"delivery-method":return BM(S.deliveryNext,S.allViolations);case"payment-methods":case"localization-extension":return!1;default:return rn(I)}},k=(S,I)=>o(I,{excludedExtensionTargets:NM(S.deliveryNext)})?{gatedBy:"extension"}:JE(S.paymentLines)?{gatedBy:"paypalExpress",satisfied:DM(S.paymentLines,S.deliveryNext)&&rs(S.contactInfo,S.allViolations)}:XE(S.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:I.filter(C=>!E(S,C))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:S})=>{function*I(){if(yield"contact-information",KE(S)||zr(S)){yield"delivery-method";return}u?yield"shipping-address":yield"billing-address"}return Array.from(I())},fastForwardThroughPage:(S,I)=>{const C=k(S,I);if(C.gatedBy==="extension")return!1;if(C.gatedBy==="paypalExpress")return C.satisfied?v("information","paypal_express_and_contact_satisfied"):!1;if(C.gatedBy==="googlePay")return!1;const[w]=C.unsatisfied;return P.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:w??null,isPrePopulatedSourceType:c,allViolations:S.allViolations?.map(A=>A.code)||[]}),c&&w===void 0},blockedOnlyByShippingAddress:(S,I)=>{const C=k(S,I),w=l&&n.isRequired("phone",{countryCode:S.shippingAddress?.countryCode})&&(!S.contactInfo?.email||!S.shippingAddress?.phone);return C.gatedBy===null&&c&&!w&&C.unsatisfied.length===1&&C.unsatisfied[0]==="shipping-address"&&(S.allViolations??[]).every(A=>uo(A)!=="shipping-address")}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:Tp,fastForwardThroughPage:S=>o(Tp)?!1:t==="cartNext"?VM(S.deliveryNext)?v("shipping","cart_next_shipping_selection_determined"):qM(S.paymentLines)?v("shipping","cart_next_has_direct_payment_session"):!1:MM({latestNegotiation:S,initialNegotiation:a,isPrePopulatedSourceType:c})?v("shipping","initial_delivery_selection_preserved"):!1,skipOverPage:({deliveryNext:S,isShippingRequired:I})=>!I||br(S)||zr(S)||h||xl(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>dv(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 MM({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=ti(e?.deliveryNext).find(c=>c.status==="available");return a===void 0?!1:!(i!==Xr(a)?.handle)}function NM(e){const t=new Set,n=wp(e,"PICK_UP"),r=wp(e,"PICKUP_POINT");return n||Oa(t,TM),r||Oa(t,wM),(n||r)&&Oa(t,LM),t.size>0?t:void 0}function wp(e,t){return ti(e).some(n=>n.status==="available"&&Xr(n)?.methodType===t)}function Oa(e,t){t.forEach(n=>e.add(n))}function DM(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 rs(e,t=[]){return!!(e?.email??e?.phone)&&t.every(n=>uo(n)!=="contact-information")}function OM({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)||!oc({address:e,addressSettings:t,countryDetails:n})?!1:r.every(a=>uo(a)!=="shipping-address")}function FM(e,t,n=[]){return oc({address:t,addressSettings:e})?n.every(r=>uo(r)!=="billing-address"):!1}function BM(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=>uo(n)!=="delivery-method")}function VM(e){const t=UM(e);return t.length===0?!1:t.every(n=>zM(n)||HM(n))}function UM(e){return e?.status!=="filled"?[]:ti(e).filter(t=>t.status==="available")}function zM(e){return e.methods.length===1}function HM(e){if(e.methods.length<=1)return!1;const t=Xr(e);return t?e.methods[0]?.handle!==t.handle:!1}function qM(e){return e?.lines.some(t=>t.method.type==="direct"&&!!t.method.sessionId)??!1}class xt extends iA{constructor(){super(...arguments),this.name="JourneyError"}}class GM extends bn{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function WM(e,t){return e?.type===t?.type&&e?.route===t?.route&&e?.label===t?.label}function $M({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 YM(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 fv(e){return ic(e)&&!e.some(t=>sc.has(t.code))}function hv(e){return e.some(t=>t.__typename==="UnprocessableTermViolation"?QE.has(t.code):!1)}function gv(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)}const jM="journey_init_contact_state",KM="negotiated_missing_contact_violation_observed";function JM({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(jM,"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(KM,"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 XM extends bn{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}const Lp=10,Fa=200;class QM{#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]>=Lp&&!this.#r){const i=new XM(`Detected potential infinite redirect: ${this.#e[o]} navigations to ${o} within ${Fa}ms`),a=n.value;r.error(i,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#e),currentUrl:t.toString(),path:o,threshold:Lp,timeframe:Fa},journeyState:{redirectTo:a.redirectTo?.route}}}),this.#r=!0,this.#e={}}this.#t=setTimeout(()=>{this.#e={},this.#t=null},Fa)}cleanup(){this.#t&&(clearTimeout(this.#t),this.#t=null)}}function ZM(){const e=U(null);
19return e.current||(e.current=new QM),F(()=>()=>{e.current?.cleanup()},[]),e.current}function eN(e){const{router:t,checkout:n,observability:r,source:o}=b(),i=ao(),a=n.proposal.facts.delivery??[],l=Je(),c=!!n.proposal.facts.requiresShipping,u=nt(o)?c:n.isShippingRequired.value,d=n.configuration.layout.isOnePage.value,p=hM(),m=gM(),f=sv(),h=ZM();JM({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}=se(),_=g.value,P=V(()=>Kl((S,I)=>nN(S,I,r,t,l),xp({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:p,buyerProposalHasDestination:m,deliveryFact:a,observability:r,negotiated:l,plan:e,postPurchaseInquiryStatus:_,proposedPaymentLines:y.value,receipt:n.latestReceipt.value,sessionType:o.type,shippingRequired:u,throttle:i.current,url:t.currentUrl.value})),[]),v=M(S=>{P.value=S},[P]),E=U(d);E.current!==d&&(E.current=d,v({type:"reinitialize",state:xp({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:p,buyerProposalHasDestination:m,deliveryFact:a,observability:r,negotiated:l,plan:e,postPurchaseInquiryStatus:_,proposedPaymentLines:y.value,receipt:n.latestReceipt.value,sessionType:o.type,shippingRequired:u,throttle:i.current,url:t.currentUrl.value})}));const k=U(t.currentUrl.value);return k.current=t.currentUrl.value,F(()=>t.currentUrl.subscribe(S=>{k.current!==S&&(k.current=S,v({type:"clearRedirect"}),h.detectInfiniteRedirect(S,P,r))}),[t,v,h,P,r]),F(()=>t.block(S=>{const I=t.currentUrl.value,C=YM(I,S);return C&&r.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:I.pathname,search:I.search},requested:{path:S.pathname,search:S.search}}),C}),[t,r]),[P,v]}function xp({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:o,negotiated:i,plan:a,postPurchaseInquiryStatus:l,proposedPaymentLines:c,receipt:u,sessionType:d,shippingRequired:p,throttle:m,url:f}){const h=i.current.peek(),g=a.greenPath.findIndex(H=>{if(H.skipOverPage?.(h))return!1;const ue=Ho(H.features,h);return H.fastForwardThroughPage?!H.fastForwardThroughPage(h,ue):!0}),y=a.greenPath[g],_=[];o.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:g,firstPage:String(y?.id),plan:JSON.stringify(a.greenPath)}),a.greenPath.slice(0,g).forEach(H=>{if(H.id==="information"){const ue=rs(h?.contactInfo,i.current.fields.allViolations.peek()??[]);o.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:ue,contactInfo:JSON.stringify(h?.contactInfo),violations:i.current.fields.allViolations.peek()??[]}),_.push({id:H.id,skipped:!1,complete:ue})}else _.push({id:H.id,skipped:!1,complete:!0})}),_.push({id:y.id,skipped:!1,complete:!1});const v=a.greenPath.findIndex(H=>H.route!==f.normalizedPath?!1:H.skipOverPage?!H.skipOverPage(h):!0),E=c?.some(H=>H.method.type==="direct"&&H.method.sessionId),S=i.current.fields.runningTotal.peek()?.amount===0||E,I=a.greenPath[v]?.id==="review"&&!S,C=I?v-1:v,w=!!a.greenPath[C]?.skipOverPage?.(h);if(t&&n&&!w&&C>g&&y?.blockedOnlyByShippingAddress?.(h,Ho(y.features,h))){for(let H=g;H<C;H++){const ue=_[H];_[H]=ue?{...ue,complete:!0}:{id:a.greenPath[H].id,skipped:!0,complete:!0}}_[C]={id:a.greenPath[C].id,skipped:!1,complete:!1},o.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:d,firstPageIndex:g,currentPageFromUrlIndex:v,advanceTo:C,clamped:I})}const A=_.find(H=>!H.complete&&!H.skipped),T=a.greenPath.findIndex(H=>A?.id===H.id),L=a.greenPath[T],N=a.greenPath[v],D=$M({plan:a,isSimulated:d==="simulated",currentPageFromUrlIndex:v,currentPageFromHistoryIndex:T,canLoadReview:S}),O=a.detours.find(H=>"route"in H&&H.route===f.normalizedPath),B=fv(i.current.fields.allViolations.peek()??[]),z=i.current.fields.shippingAddress.peek(),R=r.length>0&&r[0].deliveryAddress?r[0].deliveryAddress:z,j=h?.buyerIdentity?.customerProfile?.__typename==="BusinessCustomerProfile"&&!e&&ZE(R)&&av(d)&&p,ee=new URLSearchParams(f.search),ae=O?.type==="processing"&&ee.get("post_purchase")==="true",Q=(O?.type==="postPurchase"||ae)&&l==="success"&&u?.status==="processed"&&u.orderCreationStatus.status==="created",X=(O?.type==="shopPayLogin"?a.detours.find(H=>H.type==="shopPayLogin"):void 0)??(O?.type==="offsitePaymentFailed"?a.detours.find(H=>H.type==="offsitePaymentFailed"):void 0)??(Q?a.detours.find(H=>H.type==="postPurchase"):void 0)??(m.status==="queued"?a.detours.find(H=>H.type==="throttle"):void 0)??(B?a.detours.find(H=>H.type==="stockProblems"):void 0)??(j?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(_.map(H=>H&&{id:H.id,complete:H.complete,skipped:H.skipped})),normalizedUrlPath:f.normalizedPath,currentPageFromHistory:String(L?.id),currentPage:String(D?.id),expectedDetourFromState:X?.route,receipt:JSON.stringify(u)}),X==null&&D==null)throw new xt("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return X?{plan:a,history:_,redirectTo:WM(O,X)?void 0:X}:{plan:a,history:_,redirectTo:gn(N,D)?void 0:D}}function tN(e,t,n,r){const o=t.greenPath.findIndex(i=>gn(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=rs(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 nN(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 xt("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const m=d.greenPath.findIndex(g=>gn(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 xt(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const f=d.greenPath.findIndex(g=>gn(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 xt(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...a,redirectTo:d.greenPath[0]};const f=o?tN(m,d,o.current.peek(),n):m,h=!gn(m,f);o&&h&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:m.id,redirectedToPage:f.id});const g=d.greenPath.findIndex(y=>gn(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:rn(t)}}function rN({plan:e}){const{router:t,observability:n}=b();return M(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 xt("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 Rp(e){return e.status==="complete"||e.status==="inactive"}function Mp(e){return e?.status==="failed"||e?.status==="processed"}function oN(e,t,n){const r=ao(),{checkout:o,client:i,shop:a,source:l,observability:c,url:u,router:d}=b(),p=Ot(),m=o.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return M(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(Rp(r.current)){y();return}const _=r.subscribe(P=>{Rp(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 xt("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:rn(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}),R1({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 xt("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:rn(y)}}});n(!1);break}case"processing":{n(!0),c.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(y=>{if(Mp(o.latestReceipt.value)){y();return}const _=dl(()=>{Mp(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 xt("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 xt(`Can't progress out of a ${f.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:rn(f)}},[c,n,e,r,t,d,p.parts.merchandiseLines,m,i,u,l,a.hasStorefront,o])}function iN(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;tn(()=>{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 sN=1500,aN=450,oY=64,iY=14;function lN(e){return sN*e+aN}function cN(e){const t=document.createElement("a");t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}function yv(e){return e.method.type==="customOnsite"&&e.method.paymentBrands?.length===1&&e.method.paymentBrands.includes("usdc")}function vv(e){return e.type==="customOnsite"&&e.paymentBrands?.length===1&&e.paymentBrands.includes("usdc")}function uN(e){return e.method.type==="customOnsite"&&(e.method.paymentBrands??[]).some(t=>t.toLowerCase()==="wechatpay")}function dN(e){return e.type==="customOnsite"&&(e.paymentBrands??[]).some(t=>t.toLowerCase()==="wechatpay")}function pN(){const e=q().paymentMethods,t=se().paymentLines;return x(()=>{const n=t.value.at(0);return n?uN(n)||mN(n,e.value):!1})}function mN(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=>dN(o)&&o.paymentMethodIdentifier===n)}const _v={id:"a2a1d4e763e587abf6b17bb3b16c93cedd9799ee63a9f4664a4564d7ee76c64a",type:"query",name:"PollForReceipt",source:""};function pu(){const e=q().paymentMethods,t=se().paymentLines;return x(()=>{const n=t.value.at(0);return n?yv(n)||fN(n,e.value):!1})}function fN(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=>vv(o)&&o.paymentMethodIdentifier===n)}const hN=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function gN(e){const t=location.hostname;return hN.includes(t)}const Ba=3e3,yN=3e4,bv=1e4,Va={TIMEOUT:12e4,ATTEMPTS:120},Np="hsa_survey_completed";function sY(e){if(!e)return"";try{return new URL(Pv(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const Pv=e=>{const t="https://";return e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(n,r,o)=>r?n:`${t}${o}`)},Ua="3ds_completed",vN=6e5;function Ko(e){if(!e)return"none";try{const t=new URL(Pv(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")?"
19stripe_subdomain":"other"}catch{return"invalid"}}function _N(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge"&&e.action.offsiteRedirect}function bN(){const e=QP({maxAttempts:Va.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=pu();return F(()=>()=>{u.current=void 0},[]),M(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",pn(y));let _=!0,P,v=0,E=!1,k=Date.now(),S,I=!1,C=!1,w=!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=Fi+Date.now();break}}async function A(T){return new Promise(L=>{if(!(n.configuration.isUniversalCheckoutFinalizer&&T.action.type==="complete_payment_challenge"&&T.action.offsiteRedirect===!1&&!d.value)&&!I&&(I=!0,Zf(i,`action_required_receipt - ${T.action.type}`)),T.action.type==="complete_payment_challenge"){if(d.value)return L(Date.now()+Ba);if(T.action.offsiteRedirect)return L(void 0)}else if(T.action.type==="pre_payment_buyer_action_required"){if(w)return L(Date.now()+Ba);const $=Date.now(),j={...pn(T),actionType:T.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},ee=({data:ae})=>{ae?.type===Np&&(window.removeEventListener("message",ee),w=!0,v=0,k=Date.now(),o.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...j,dataType:Np,elapsedTimeMs:Date.now()-$}),L(Date.now()))};o.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",j),window.addEventListener("message",ee);return}else if(T.action.type==="complete_payment_challenge_v2"){const $=T.timeout?.millisecondsRemaining;return E&&$===0&&(v=0,k=Date.now()),E=!!$,L(E?Date.now()+Ba:Date.now()+eC)}const D=Date.now(),O=T.action.type==="complete_payment_challenge"?T.action:void 0,B={...pn(T),actionType:T.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:O?.offsiteRedirect,sourceHostCategory:Ko(O?.url),surface:"checkout-web"},z=({data:$,origin:j})=>{if($.type===Ua){if(clearTimeout(R),window.removeEventListener("message",z),!g()||!Ti(n.latestReceipt.value,T)){L(void 0);return}v=0,k=Date.now();const ee=Date.now()-D;o.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:Ua}),o.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...B,dataType:Ua,elapsedTimeMs:ee,originHostCategory:Ko(j)}),L(Date.now())}},R=setTimeout(()=>{if(window.removeEventListener("message",z),!g()||!Ti(n.latestReceipt.value,T)){L(void 0);return}n.unstable_overwriteLatestReceipt({status:"failed",id:T.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),r&&Xi(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",pn(T)),o.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...B,elapsedTimeMs:Date.now()-D}),L(void 0)},T.timeout?.millisecondsRemaining??vN);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",B),window.addEventListener("message",z)})}for(;S!=null;){await hf(S-Date.now());const T=Date.now()-k;if(++v,!E&&v>Va.ATTEMPTS&&T>Va.TIMEOUT&&(_=!1,o.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...pn(y),pollAttempts:v}),o.counter({name:"receipt_polling_timeout",value:1}),o.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...pn(n.latestReceipt.value),timePolling:T,pollAttempts:v})),!g())break;const{data:L,error:N}=await l.staticQuery(_v,{cache:!1,variables:{receiptId:n.latestReceipt.value?.id,sessionToken:c}});if(N||L==null||L.receipt.__typename==="ReceiptNotFound"){if(!g())break;S=Date.now()+(e.next().value||60*1e3);continue}if(!g())break;const D=P?Date.now()-P:0,O=gN()?yN:bv,B=P?D>=O:!1;let z;if(!C)try{z=await tC()}catch(Q){if(!g())break;C=!0,o.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(Q),receiptType:L.receipt.__typename})}if(C){if(L.receipt.__typename==="ProcessingReceipt"||L.receipt.__typename==="WaitingReceipt"){e.reset(),S=Date.now()+L.receipt.pollDelay;continue}if(L.receipt.__typename!=="ProcessedReceipt")break;if(e.reset(),L.receipt.redirectUrl){window.location.replace(L.receipt.redirectUrl);break}if(L.receipt.orderStatusPageUrl){window.location.replace(L.receipt.orderStatusPageUrl);break}S=Fi+Date.now();continue}if(!g()||!z)break;e.reset();const R=z(L.receipt,{pollingTimeoutReached:B});n.latestReceipt.value?.status==="polling_for_order"&&R?.status==="processed"&&(B?o.counter({name:"PostPurchase_order_polling_timeout",value:1}):o.histogram({name:"PostPurchase_order_polling_duration",value:D}));const j=!(!d.value&&_N(R)||Ti(R,y)),ee=pn(y),ae=pn(R),K={receiptId:ae.receiptId,status:ae.status,prevReceiptId:ee.receiptId,prevReceiptStatus:ee.status};if(j?(o.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",K),n.unstable_overwriteLatestReceipt(R)):Ti(R,y)&&o.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",K),!g())break;if(p?.(R),R.status==="processing"||R.status==="processing_remote_checkouts")S=R.pollAt;else if(R.status==="action_required")S=await A(R);else if(R.status==="polling_for_order")S=Fi+Date.now(),P||(P=S);else{r&&Xi(r,a);break}if(!g())break}},[n,r,l,c,o,e,i,d,a])}function PN(){const e=pu();return M((t,n)=>{e.value||Qc(t)&&ny(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}function Dp(e){if(typeof e>"u")return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const SN=["failed","processed"];function Sv(){const{currentPage:e,currentDetour:t,history:n}=Pe().value,{observability:r,checkout:{offsitePopupController:o},mobileCheckoutSdk:i,embed:a}=b(),l=U(),c=bN(),u=PN(),d=pN(),p=i.variant.isStandard()||!!a?.isCheckoutKit(),m=M(()=>{document.hidden||(document.removeEventListener("visibilitychange",m),r.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:Dp(l.current)},{exportImmediately:!0}),c(h=>{u(h,()=>{document.addEventListener("visibilitychange",m)})}))},[u,c,r]),f=M(()=>{c(h=>{SN.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:Dp(g),providerUrl:g},{exportImmediately:!0}),o.isOpen.value){o.redirect(g);return}d.value?cN(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 EN(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}function CN(){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 kN(e,t){const n=e.get("embed"),r=e.get(nh),o=e.get(eh),i=e.get(th),a=e.get(rh),l=e.get(ih),c=e.get(oh),u=e.get("shopify_essential"),d=e.get(gl),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 Ev({mode:e="set",include:t={}}={}){const{shopClientUuid:n=!1,shopId:r=!1}=t,o=b().embed?.shopClientUuid,i=CN();return M((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:_}=kN(l,o),P=a.has("embed")||a.has("ec_version");(e==="set"||!P)&&(c&&a.set("embed",c),d&&(a.set(eh,d),p&&a.set(th,p),u&&a.set(nh,u),m&&a.set(rh,m),h&&a.set(oh,h),f&&a.set(ih,f)));const E=e==="set"||!a.has("shopify_essential");g&&E&&a.set("shopify_essential",g);const k=e==="set"||!a.has(gl);if(y&&k&&a.set(gl,y),n){const S=e==="set"||!a.has("shop_client_uuid");_&&S&&a.set("shop_client_uuid",_)}},[o,n,r,e,i])}function IN({redirectProgressEnabled:e=!1}={}){const t=U(!1),{checkout:n,client:r,observability:o}=b(),i=Ev({mode:"copy-if-missing"});return M(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 AN({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=cv(),k=Sr(),S=nC(),I=Sv(),C=_?.id,w=Je(),A=l.checkout.configuration.layout.isOnePage,T=Ns()&&!Bn(g.currentUrl.value.search),L=ao().current.token,N=Pe(),D=Vn(),O=IN({redirectProgressEnabled:v&&!y.isUniversalCheckoutFinalizer&&T&&!t&&!D});F(()=>{P||I()},[C]);const B=M((R,$)=>{setTimeout(()=>{$()},lN(R))},[]);return M(R=>{if(!R||k)return;m.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",pn(R));const $=a.value;if(R.status==="processed"&&R.waitingForPostPurchaseDone&&$!=="done")return;const j=Ky(w),ee=(Q,X)=>Q&&Q>0?B(Q,X):X();function ae(Q,X){const H=()=>{g.navigate(Q,{replace:!0,state:{...g.currentUrl.value.state,redirectingToThankYou:!0}})};T&&!t?(X?.(),dr(H,["checkout-exit"],{replace:!0,interrupt:!0})):dr(()=>{X?.(),H()}),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 K(Q){const X=()=>O(Q);if(!T||t||D){X();return}dr(()=>{c.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),X()}switch(R.status){case"abandoned":r(!1),d&&Xi(d,p),S();break;case"failed":{r(!1),d&&Xi(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:R.id}),m.counter({name:"refresh_processing_step",value:1}),Q.searchParams.delete("reload_receipt"),window.location.replace(Q.toString());break}if(R.failure.type==="inventory"){if(e.detours.find(re=>re.type==="stockProblems")==null)throw new xt("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const ue=w.lastNegotiation.value;o({force:!0,onComplete(re){switch(re.status){case"success":{const le=w.lastJourneyProgression.value,de=w.lastNegotiation.value;if(c.latestReceipt.value?.id!==R.id||de!==ue&&de.type==="error"||(le.type==="failed"||le.type==="error")&&le.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 ke=E("payment-methods");tn(()=>{w.context.inventoryRecoverySignal.value={receiptId:R.id},iN(w.parts)}),n({type:"error",page:ke}),g.navigate({pathname:ke.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:rn(re)}}});break}else R.failure.type==="payment"&&(rC.has(R.failure.code)?o({include:["captcha"],skipStateUpdates:!0}):(R.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 X=_M({departurePageId:g.currentUrl.value.searchParams.get(Br),greenPath:e.greenPath,history:N.value.history,observability:m,negotiated:i,receipt:R});n({type:"error",page:X}),g.navigate(X.route,{replace:!0});break}case"processed":{m.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:R.redirectUrl,receiptId:R.id});const Q=e.detours.find(re=>re.type==="postPurchase"),X=!!Q&&!!R.postPurchasePageRequested&&R.postPurchaseVaultingStatus==="ready"&&$==="success",H=!u?.isFlagshipPartner&&X;if(u?.isFlagshipPartner&&X&&t?.type!=="thankYou"&&m.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:R.id}),H&&t?.type!=="thankYou"){if(m.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:R.id,postPurchasePageUrl:R.postPurchasePageUrl,postPurchasePageRequested:R.postPurchasePageRequested,postPurchaseVaultingStatus:R.postPurchaseVaultingStatus}),shopAppDomain:v}),v&&R.postPurchasePageUrl)window.location.replace(R.postPurchasePageUrl);else{const re=Q;g.currentUrl.value.searchParams.delete("post_purchase");const le=`${re.route}${g.currentUrl.value.search}`;j(R),g.navigate(le,{replace:!0})}break}if(u?.client?.complete(),!y.isUniversalCheckoutFinalizer&&Ft(u?.embedder))break;if(!y.isUniversalCheckoutFinalizer&&R.redirectUrl){const re=R.redirectUrl;R.skipToThankYouPage?(m.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:R.id,redirectUrl:re,postPurchasePageRequested:R.postPurchasePageRequested,postPurchasePageUrl:R.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:re});const le=new URL(re);return L&&le.searchParams.set(sh,L),ee(R?.completedRemoteCheckouts?.length,()=>K(le.toString()))}const ue=e.detours.find(re=>re.type==="thankYou");if(ue?.route){const re="prevent_order_redirect",le=new URLSearchParams(g.currentUrl.value.search);let de=le.has(re)&&le.get(re)!=="false"?`${ue.route}?${re}=true`:ue.route;h.variant.recovery&&(de=EN(de,R.id));const ke=()=>{if(m.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:ue.route}),R.skipToThankYouPage){m.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:R.id,redirectUrl:R.redirectUrl,postPurchasePageRequested:R.postPurchasePageRequested,postPurchasePageUrl:R.postPurchasePageUrl})}),n({type:"skipRemainingPages"});const Ee=f.cookies.get(Ui);Ee&&p.sourceId===Ee.split("%3F")[0]&&f.cookies.delete(Ui)}else f.cookies.delete(Ui),n({type:"complete"});j(R)},he=Ee=>{m.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:de}),ee(R?.completedRemoteCheckouts?.length,()=>ae(de,Ee))},ve=y.deferredProfileChangeId;if(ve||y.profileKey.peek()?.requireBusinessCriticalOnly){y.update({deferredProfileChangeId:void 0});const Ee=ve??y.profileId.peek();_c(ke,{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:w.source,shop:w.shop,sessionToken:w.sessionToken,current:w.current}}).then(he).catch(()=>{})}else ke(),he()}else throw new xt("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(R.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(R),routerCurrentUrl:g.currentUrl.value.toString()});break}e.detours.find(H=>H.type==="processing")?.route&&r(!0);break}case"processing_remote_checkouts":{if(t?.type==="processing")break;const X=e.detours.find(H=>H.type==="processing");if(!X?.route)break;dr(()=>{const H=g.currentUrl.value.search;g.navigate(H?{pathname:X.route,search:H}:X.route,{replace:!0})});break}default:rn(R)}},[f,u?.client,u?.embedder,u?.isFlagshipPartner,h,S,t,c,n,k,A,T,v,N,E,l,y,o,i,w,r,d,e.detours,e.greenPath,D,a,L,O,g,p,m,B])}function aY(){const e=q().buyerIdentity,{client:t,shop:n,embed:r,mobileCheckoutSdk:o}=b();return x(()=>!!n.loginLinkVisible&&n.hasStorefront&&!!t.unstable_getSerialization("loginUrl")&&n.customerAccountRequirement==="OPTIONAL"&&!o.enabled&&!r&&!e.value?.customerProfile)}function lY(){const e=q().buyerIdentity,{shop:t,checkout:{identity:n,configuration:r},mobileCheckoutSdk:o,source:i}=b(),a=n.current.value==="shopPay";return x(()=>{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 Cv(){const e=q().buyerIdentity;return M(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 TN(){const e=q().buyerIdentity;return M(()=>{const t=e.value?.customerProfile;if(t)return t.email},[e])}function kv(){const{embed:e,mobileCheckoutSdk:t,shop:n,source:r}=b(),o=Pe(),i=q().buyerIdentity,a=Ms(),l=t.variant.isStandard()||e?.isCheckoutKit(),c=!!n.remoteShopsConfigMap?.size;return x(()=>{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 Iv(e=!1){const{i18n:t,router:n,shop:r}=b(),{buyerIdentity:o}=q();return x(()=>{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 Av(){const e=U(!0);return Rt(()=>()=>{e.current=!1},[]),e}const Jo="DISCOUNTS_DISCOUNT_CODE_NOT_HONOURED",Tv=new Set(["DISCOUNTS_ALLOCATIONS_MISMATCH","DISCOUNTS_ADDITIONAL_REQUESTED_DISCOUNT_CODE_DISCARDED"]),wv=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,...Tv]),zs=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),Mo=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"]),mu=new Set([...wv,...Mo]),cY=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),Rl=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),Lv=new Set([...Rl,...mu]);function xv(){const{paymentLines:e}=se(),{voidedGiftCardsSignal:t}=Mt(),n=M((r,o)=>{if(o.length<r.length)return[];const i=[];return o.forEach(a=>{a.method.type==="giftCard"&&!r.some(l=>l.method.type==="giftCard"&&a.method.code===l.method.code)&&i.push(a.method.code)}),i},[]);return M(({violations:r,remotePaymentLines:o})=>{if(r.some(i=>zs.has(i.code))){const i=n(o,e.value);t.value=i,e.value=o}},[n,e,t])}const wN=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function Rv(e,t){const n=Ho(e.features,t),r=new Set(["merchandiseLines"]);for(const o of n){const i=wN.get(o)??[];for(const a of i)r.add(a)}return r}function*LN(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=oC(n??[],o);for(const[a,l]of r.entries())i(iC(l))||(yield`${sC}[${a}]`)}function xN({violation:e,currentPageId:t,isOnePageCheckout:n}){return n||t==="payment"?!0:!(aC.has(e.code)||lC.has(e.code)||Ql.has(e.code))}function Mv({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(r=>xN({violation:r,currentPageId:t,isOnePageCheckout:n}))}function Nv(){const{observability:e}=b();return M(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}class RN extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function MN(e,t){const{client:n,router:r,checkout:o,shop:i,observability:a,url:l}=b(),c=Je(),{plan:u,currentPage:d,currentDetour:p}=Pe().value,m=Ot(),f=n.unstable_legacyNavigationPerformance,h=Iv(!0),g=xv(),y=Av(),_=o.configuration.layout.isOnePage,P=uu(),{inMemoryApplePayParts:{asPaymentMethod:v}}=We(),E=Nv();return M(async({onComplete:k,include:S,prefetch:I=!1,negotiationStage:C,...w})=>{const A=d,T=C??"negotiation";T==="progression"&&!I&&t(!0),a.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:T}),T==="progression"&&await m.runBeforeNegotiationListeners(T,{prefetch:I});const L=(()=>{if(S)return S;if(A==null)return;const B=new Set,z=u.greenPath.findIndex($=>gn($,A)),R=c.current.value;for(const $ of u.greenPath.slice(0,z+1)){const j=Rv($,R);for(const ee of j)B.add(ee)}return[...B]})(),N=A?Ho(A.features,c.current.value):void 0,{silenceViolations:D=[]}=w,O=LN(L,{customFields:c.current.value.customFields??[],placementReferences:P},N);try{const B=await m.negotiate({...w,silenceViolations:[...new Set([...D,...O])],skipStateUpdates:I,negotiationStage:T});if(a.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:B.status,negotiationStage:T,violations:"violations"in B?mn(B.violations):void 0}),y.current){if(I)return;try{const z=B.status==="success"||B.status==="error";if(z&&ic(B.violations)){const R=u.detours.find($=>$.type==="stockProblems");if(R==null)throw new xt("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMat
19chingDetourNegotiate"});E(),r.navigate(R.route);return}if(z&&hv(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&&gv(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 R={type:"success",violations:B.violations,errors:B.errors,negotiationStage:T};m.lastJourneyProgression.value=R,m.hasNegotiatedOnce.value=!0,await m.runListeners(R);break}case"alreadyCompleted":{o.unstable_overwriteLatestReceipt(B.receipt);break}case"error":{f?.cancelNavigation();const R={type:"error",violations:B.violations,errors:B.errors,negotiationStage:T};m.lastNegotiation.value=R,m.hasNegotiatedOnce.value=!0,(T==="progression"||w.runListenersOnError)&&(m.lastJourneyProgression.value=R,await m.runListeners(R)),A&&Mv({violations:B.violations,currentPageId:A.id,isOnePageCheckout:_.value})&&e({type:"error",page:A});break}case"throttled":{const R=u.detours.find($=>$.type==="throttle");if(R?.route)r.navigate(R.route);else throw new xt("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:T});break;default:rn(B)}T==="progression"&&t(!1)}finally{k?.(B);const z=v.value&&o.wallets.activeSession.value;if(B.status!=="success"&&"violations"in B&&A&&!z){const R=lv({currentPage:A,greenPath:u.greenPath,negotiated:B.negotiated,violations:B.violations});R&&r.navigate(R.route)}}}}catch(B){if(B instanceof jy)return;const R=B instanceof Error?B:new RN;if(R)throw R}},[v,o,d,h,e,_,y,c,t,f,P,u.detours,u.greenPath,m,g,r,i?.storefrontUrl,E,l,a,p])}const Dv='GraphQL execution failed with errors: [ "Internal error. Looks like something went wrong on our end.',NN=["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:",Dv,gf],DN=["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 Ov(e){return e.replace(/\s+/g," ")}const ON=e=>{if(e==="")return!0;const t=Ov(e);return NN.some(n=>t.startsWith(n))},FN=e=>{if(e==="")return"unknown";const t=Ov(e);return t.startsWith(gf)?DN.some(n=>t.endsWith(n))?e:"unknown":t.startsWith(Dv)?"Internal server error":e},BN=()=>{const{source:{checkoutSessionIdentifier:e}}=b(),{email:t}=se();return x(()=>`guest-${e}-${t.value.replace(/[^a-zA-Z0-9]/g,"")}`)},VN="true";function UN(){const e=BN(),t=M(()=>{try{return!!sessionStorage.getItem(e.value)}catch{return!1}},[e]),n=M(()=>{try{sessionStorage.setItem(e.value,VN)}catch{}},[e]);return{isDismissedGuestModal:t,setDismissedGuestModal:n}}function zN(){const e=Ot(),t=Av(),{setGuestDismissedModalKey:n}=HN();return M(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 HN(){const{setDismissedGuestModal:e}=UN(),{shopPay:t}=b();return{setGuestDismissedModalKey:M(()=>{t.userIdentified.value&&e()},[e,t.userIdentified])}}function qN(e){const{taxExemptions:t}=se(),n=Ye(e);return x(()=>t.value.find(r=>r.handle===n.value))}function GN(e){const{taxExemptions:t}=se();return M(n=>{const r=t.value.filter(o=>o.handle!==e);t.value=[...r,{handle:e,details:n}]},[e,t])}const Op="EU_REVERSE_CHARGE_EXEMPTION_RULE";function Hs(){const e=q().taxExemptions,t=qN(Op).value,n=GN(Op),r=He("taxExemptions").value,o=He("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=>cC(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=>uC(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 uY(){const{userEvents:e}=b(),t=Fv();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function WN(){const{userEvents:e}=b(),t=Fv(),n=Hs();Hh(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 Fv(){const{client:e,shop:t,source:n}=b(),r=e.unstable_getSerialization("requestId"),o=q().buyerIdentity.value?.customerProfile,{shippingAddress:i,billingAddress:a,email:l}=se(),c=Hs();return{build:({eventType:d,vatId:p})=>({schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:d,shopId:Number(Be(t.id)),customerId:JN(o),checkoutToken:n.
19checkoutSessionIdentifier,requestId:r,vatId:p,vatIdValidationStatus:$N({taxId:c?.taxId,eventType:d}),applied:c?.applied,email:l.value,userAgent:YN(navigator),...jN(i.value),...KN(a.value)}})}}function $N({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 YN(e){return typeof e>"u"?void 0:e.userAgent}function jN(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 KN(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 JN(e){if(!e)return;const t=Number(Be(e.id));return isNaN(t)?void 0:t}const za=1;function XN(e,t){const{checkout:n,shop:r,observability:o,url:i,router:a}=b(),l=zN(),{plan:c}
19=Pe().value,u=Ot(),d=Je(),p=SM(),m=Iv(!0),f=xv();return WN(),M(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=za;const k=async()=>{let S=!1;await d.waitForPendingNegotiations({setProgressing:t});const I=E<za;await u.runBeforeNegotiationListeners("completion",I?{retry:!0}:void 0),await l({...v,submitting:u.submitting,setProgressing:t,onValidationSuccess:()=>{v.onValidationSuccess?.(),t(!0)},async onComplete(C){if(C.status==="stale"&&C.phase==="interceptors"&&E>0){E-=1,S=!0,t(!0),o.log("submit_for_completion_stale_retried","Stale completion retried automatically");return}switch(C.status==="stale"&&E<za&&o.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await y?.(C),C.status){case"success":{n.unstable_overwriteLatestReceipt(C.receipt);const w={type:"complete"};u.lastJourneyProgression.value=w,await u.runListeners(w);break}case"alreadyCompleted":{n.unstable_overwriteLatestReceipt(C.receipt);break}case"throttled":{const w=c.detours.find(A=>A.type==="throttle");if(w?.route)a.navigate(w.route);else throw new xt("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(C.status)}),e({type:"error",page:h}),hv(C.violations))return window.location.replace(i.login(window.location.href));if(gv(C.violations,r.storefrontUrl,m.value,a.currentUrl.value,o),ic(C.violations)){a.currentUrl.peek().searchParams.delete(Br);const T=c.detours.find(L=>L.type==="stockProblems");if(T==null)throw new xt("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});a.navigate(T.route);break}f({violations:C.violations,remotePaymentLines:C.negotiated?.paymentLines?.lines??[]});const w={type:"error",violations:C.violations,errors:C.errors,negotiationStage:"completion"};if(u.lastJourneyProgression.value=w,await u.runListeners(w),P)break;const A=lv({violations:C.violations,greenPath:c.greenPath,negotiated:C.negotiated,currentPage:h});A&&(a.currentUrl.peek().searchParams.delete(Br),a.navigate(A.route));break}case"invalid":{t(!1),await u.runListeners({type:"invalid",reasons:C.reasons});break}case"fetch_failed":case"failed":{const w={type:"failed",reason:C.reason,negotiationStage:"completion",fetchFailed:C.status==="fetch_failed"};if(C.status==="fetch_failed")if(ON(C.reason)||!C.isActionable)o.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:C.reason}),o.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:FN(C.reason)}});else{const A=C.reason;o.error(new GM(A,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${A}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.lastJourneyProgression.value=w,await u.runListeners(w),e({type:"error",page:h}),a.currentUrl.peek().searchParams.delete(Br),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(C.status)}),e({type:"error",page:h})}(C.status!=="success"||C.receipt.status!=="processing")&&t(!1)}}),S&&await k()};await k()},[t,u,d,l,r,e,n,c.detours,c.greenPath,a,f,i,m,p,o])}function QN(e,t,n){const{router:r,observability:o,checkout:i}=b(),{plan:a}=Pe().value,l=Je(),c=i.configuration.layout.isOnePage,u=M((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 xt("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"})},[a.greenPath,t,r]);return M(async(d,p)=>{n(!0);const m=a.greenPath.findIndex(g=>gn(g,d)),f=l.current.value,h=Rv(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":{Mv({violations:g.violations,currentPageId:a.greenPath[m].id,isOnePageCheckout:c.value})||u(g,m);break}
19case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:rn(g)}}})}finally{n(!1)}},[n,a.greenPath,l,e,u,c,o])}function ZN({negotiate:e}){return M(()=>{e({prefetch:!0,negotiationStage:"progression"})},[e])}function eD(e){const t=Wg();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 tD(){const e=Sv(),t=Fs(),n=ro(),{paymentLines:r}=se(),o=Je(),{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=yv(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=>vv(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:Df()}});const f=yr(u);if(f){const h=parseInt(f,10);if(!isNaN(h)){const g=eD(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 nD({journey:e,exitDetour:t,pageComplete:n,pageNegotiate:r}){const{client:o,observability:i,router:a}=b(),l=Te(0),c=x(()=>l.value>0),u=o.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:d,handleClosingPopup:p}=tD(),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:M(async(v,E,k)=>{const S=async R=>{try{await E?.(R)}finally{R.status!=="success"&&y.current()}},I={...k,onProgressBlocked:()=>{try{k?.onProgressBlocked?.()}finally{y.current()}},onValidationSuccess:()=>{try{k?.onValidationSuccess?.()}finally{g.current()}}},{plan:C,currentPage:w,currentDetour:A}=e.value,T=m.current;if(i.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:v,skipToCompletion:I?.skipToCompletion,greenPath:C.greenPath.map(R=>R.route),detours:C.detours.map(R=>R.route),currentPageRoute:w?.route,currentDetourRoute:A?.route}),!I?.skipToCompletion&&A&&w){const R=C.detours.find(j=>j.type==="thankYou"),$=A.type==="processing"?R:w;return u?.start({target:$?.route}),i.leaveErrorBreadcrumb(`[Journey] Exiting "${A.route}" detour, moving to "${$?.route}"`,{currentDetourRoute:A.route,exitDetourTargetRoute:$?.route,targetPageRoute:w.route}),T(A,w,S)}if(w==null){i.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),I?.onProgressBlocked?.();return}const L=gn(w,C.greenPath[C.greenPath.length-1])||I?.skipToCompletion,N=C.greenPath.findIndex(({id:R})=>R===w.id),D=C.detours.find(R=>R.type==="processing"),O=L?D:C.greenPath[N+1];u?.start({target:O?.route});const B=_.current.currentUrl.peek(),z=C.greenPath.find(R=>R.route===B.normalizedPath)??w;if(L?B.searchParams.set(Br,z.id):B.searchParams.delete(Br),i.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:I?.skipToCompletion,greenPath:C.greenPath.map(R=>R.route),isLastPage:L,currentPageRoute:w.route,currentDetourRoute:A?.route,nextPageRoute:O?.route}),!L)return h.current(w,S);l.value+=1;try{await f.current(w,A,S,I)}finally{l.value-=1}},[m,e,f,h,l,u,i,y,g]),completing:c}}function rD({children:e,dispatch:t,progressing:n,onProgressionChange:r}){const o=Pe(),{plan:i,currentPage:a,currentDetour:l}=o.value,{observability:c,checkout:u,router:d}=b(),p=ao(),{postPurchaseInquiryStatus:m}=se(),f=MN(t,r),h=Je(),g=QN(f,t,r),y=XN(t,r),_=oN(f,t,r),P=AN({plan:i,currentDetour:l,dispatch:t,onProgressionChange:r,negotiate:f,negotiated:h,proposedPostPurchaseInquiryStatus:m});F(()=>{const A=T=>{if(T.status!=="queued")return;const L=i.detours.find(N=>N.type==="throttle");if(L?.route)d.navigate(L.route);else if(a)throw new xt(`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",pn(A)),ht(()=>P(A))});const v=U(m.peek());ze(()=>{const A=l?.type==="thankYou"||l?.type==="postPurchase",T=m.value,L=v.current;if(A&&T!==L){v.current=T;const D=u.latestReceipt.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...pn(D),previousStatus:L}),ht(()=>P(D))}});const{progress:E,completing:k}=nD({journey:o,exitDetour:_,pageComplete:y,pageNegotiate:g}),S=rN({plan:i}),I=ZN({negotiate:f}),C=Nv();F(()=>h.pendingFieldsNegotiation.subscribe(A=>{if(A?.status!=="success"&&A?.status!=="error"||o.peek().currentDetour)return;const T=h.current.fields.allViolations.peek()??[];fv(T)&&(C(),S("stockProblems",{routerOptions:{replace:!0}}))}),[h,o,S,C]);const w=V(()=>({detour:S,progress:E,negotiate:f,progressing:n,completing:k,prefetch:I}),[S,E,n,k,f,I]);return s(bc.Provider,{value:w,children:e})}function oD({plan:e,children:t}){const n=Te(!1),r=M(h=>{n.value=h},[n]),{observability:o,router:i}=b(),a=i.currentUrl.value,[l,c]=eN(e);Ls(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=Te(),{pageBeforeDetour:p,completed:m}=fM({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(zh.Provider,{value:f,children:[s(dM,{}),s(rD,{dispatch:c,progressing:n,onProgressionChange:r,children:t})]})}function Bv(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.t
19itle"),route:"/processing"}}function Uv(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function iD(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function zv(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function sD(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function Hv(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function qs(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function aD(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function fu(e,{beforeStock:t=[],afterStock:n=[Hv(e)]}={}){return[Bv(e),Vv(e),Uv(e),...t,zv(e),...n]}function lD({i18n:e,greenPath:t}){return{greenPath:t,detours:[...fu(e,{beforeStock:[iD(e)]}),qs(e)]}}function cD({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"):dv(t,r.peek(),{shop:o,checkout:i,paymentMethods:n})||l.push("billing-address"),l}},...t?[mv(e)]:[]],detours:[...fu(e),qs(e)]}}function uD({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?[mv(e)]:[]],detours:[...fu(e,{afterStock:[]}),qs(e)]}}function dD({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":nt(n)?"orderEdit":r?"onePage":"threePage"}function pD({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:[aD(e),Bv(e,"redirectToCart"),Vv(e),Uv(e),zv(e),sD(e,t),Hv(e),qs(e)]}}function mD({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}=Ot(),d=q().paymentMethods?.value,p=u.paymentLines,m=pv(),f=uM(),h=r.currentUrl.value?.search,g=xM(),y=dD({businessCustomerJourneyPath:f,isShopPay:l,source:i,isOnePageCheckout:c}),_=V(()=>{switch(y){case"businessCustomer":return n.leaveErrorBreadcrumb("Using business customer journey plan"),lD({i18n:t,greenPath:f});case"shopPay":return n.leaveErrorBreadcrumb("Using shop pay journey plan"),pD({i18n:t,shopName:o.name,currentUrlSearch:h});case"orderEdit":return n.leaveErrorBreadcrumb("Using order edit checkout journey plan"),uD({i18n:t,isOnePageCheckout:c,reviewEnabled:m});case"onePage":return cD({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(oD,{plan:_,children:e})}function fD(){const{data:e}=so(),{currentPage:t}=Pe().value,n=Je(),r=se(),{deliveryMethodsAddressErrors:o}=Mt(),[i,a]=ie(!0),{setAddressError:l}=au(o),c=r.shippingAddress.fields.countryCode.value,u=lu(c);return F(()=>{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(!!dC(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 hD={Canvas:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133"};function gD({scrollbarGutter:e,children:t}){const n=ro(),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}; }
19`].filter(Boolean).join(`
20`);return s(G,{children:[s("style",{children:l}),s("div",{className:hD.Canvas,children:t})]})}function yD(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 vD=qw(e=>bt({colorScheme:e})),_D=Qn(function({children:t,scoped:n}){const r=ro(),o=mf(),i=r.customProperties.value,a=r.darkModeCustomProperties.value,l=V(()=>{const u=`#CustomProperties-${yD(o)}`,d=i?Vp(i):null,p=a?Vp(a):null,m=Bp(Fp(i?.color)),f=Bp(Fp(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} {${vn(d)}}`:""}${m}`,_=`${g?`${u} {${vn(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 bD(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 Fp(e){if(!(!e||typeof e!="object"||!("schemes"in e)))return e.schemes}function hu(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,...hu(o,i)}:a?n:o!=null?{...n,[i]:o}:n},{})}function Bp(e){if(!e||typeof e!="object")return"";const t=Jn.color.default;let n="";for(const r of Ef){const o=e[r];if(!o||typeof o!="object")continue;const i=hu(o,t);if(Object.keys(i).length===0)continue;const a=vD[r].trim().split(/\s+/).join(".");n+=`.${a} {${vn(i)}}`}return n}function Vp(e){return hu(bD(e),Jn)}function PD({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 SD({children:e,condition:t}){return t?s(PD,{children:e}):s(G,{children:e})}function ED({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:o}=FT();return s(If.Provider,{value:t,children:s(pC,{children:s(SD,{condition:!!n,children:o?s(_D,{scoped:r,children:e}):e})})})}function CD({children:e}){const{checkout:t,source:n,router:r}=b(),o=r.currentUrl.value,i=n.type==="simulated",a=Bn(o.search),l=t.configuration.branding.shell,c=t.configuration.branding.theme,u=ec()||i||a;return s(ED,{theme:c,shouldLoadFonts:u,children:s(bR,{shell:l,children:s(kD,{children:e})})})}function kD({children:e}){const{canvas:t}=Fe();return s(gD,{scrollbarGutter:t?.scrollbarGutter,children:e})}function ID(){const{embed:e}=b(),t=KT();return F(()=>{if(!t)return;let n=!1;return t.subscribe(r=>{r!==n&&(n=r,e?.client?.dialogChange(r?"open":"close"))})},[t,e]),null}function qv(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function dY(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:qv(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function AD(e){return{message:LD(e),trace:wD(e)}}function TD(e){return typeof e.cause=="object"&&e.cause!=null}function wD(e){const t=String(Gv(e));return e.stack??t??e.message??""}function LD(e){const t=Gv(e);return t?`${t.name}: ${t.message}`:e.message}function Gv(e){if(TD(e)&&"stack"in e.cause)return e.cause}var st=(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))(st||{}),Wv=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(Wv||{});const $v={[Gt.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[Gt.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[Gt.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[Gt.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[Gt.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[Gt.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[Gt.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[Gt.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[Gt.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[Gt.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[Gt.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[Gt.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[Gt.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}};function xD(e){return e in $v}function RD(e){return e in Gt}const MD=({children:e})=>{if(typeof window>"u")return s(G,{children:e});const{observability:t,userEvents:n,checkout:r}=b(),o=Xg(),i=Ln(),a=r.configuration.layout.isOnePage.value;return F(()=>{const l=(u,d)=>{if(RD(u.name)&&d?.extension){const{extension:p}=d,{trace:m,message:f}=AD(u);if(!Tf(u.name))return;const h={apiVersion:p.apiVersion,appId:p.appId,appApiKey:p.appApiKey,appName:p.appName,appVersion:p.version,code:Wv.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(xD(u.name)&&d?.extension){const{extension:m}=d,{eventName:f,eventType:h,errorReason:g}=$v[u.name],{userToken:y,shopId:_,sessionToken:P,checkoutToken:v,apiClientId:E,sourceId:k,sourceType:S,checkoutSdkVariant:I,checkoutSdkVersion:C,checkoutSdkSchemaVersion:w,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:k,sourceType:S,extensionId:qv(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:C,checkoutSdkSchemaVersion:w,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})}
23,ND=100;function DD(){const e=yy(),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=()=>{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,ND)};t.current.add(i)})}),null}function OD({i18n:e,buyerIdentity:t}){return!!t.value?.customerProfile?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}function Yv(){const{checkout:{identity:e}}=b(),t=q().buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:n}}=We();return x(()=>e.current.value==="applePay"&&!!t.value?.purchasingCompany&&n.value)}function Gs(){const{checkout:{wallets:e},embed:t}=b(),n=FD(),r=mC(),o=Yv();return M(({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 FD(){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}=se(),f=TN(),h=Cv(),g=Er();return M((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??bl(r.value)),o.value=E??bl(o.value);const k=m.value;m.value=k&&k.filter(S=>S.key!==ah)}!g.value&&!_&&xs(e,void 0)},[m,i,o,p,e,c,t,d,h,f,u,g,a,n,r,l])}function Ws({onClick:e,shouldResetCustomerInfo:t,shouldRemovePaymentLine:n,skipRedirect:r}={}){const{negotiate:o,progress:i}=Nt(),a=Gs(),{dispatch:l}=Yc()??{},{client:c,observability:u,persistence:d,router:p,checkout:{identity:{current:m}},i18n:f}=b(),{buyerIdentity:h}=q(),{value:g}=x(()=>OD({i18n:f,buyerIdentity:h})),{currentDetour:y}=Pe().value,_=c.unstable_getSerialization("forcedRedesignWallet"),P=BD(p.currentUrl.value),v=p.currentUrl.value.searchParams.has(jo),E=_&&P&&!v&&!r,k=M(async S=>{if(u.counter({name:AR,value:1,attributes:{identity:m.value,redirect:!!E}}),E){d?.clearAll(),e?.(),S?.(),window.location.replace(P);return}l?.("addressReset"),TR(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:k}}function BD(e){try{const t=new URL(e.href);return t.searchParams.delete(hl),t.searchParams.append(jo,"1"),t.toString()}catch{return}}function VD(){const{router:e}=b(),t=e.currentUrl.value,{onClick:n}=Ws({shouldResetCustomerInfo:!0});F(()=>{t.searchParams.has(jo)&&(n?.(),wR(t))},[])}function UD(){return VD(),null}const Up="wallet_deceleration";function zD(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=We(),{clearForcedCheckoutLayout:n}=Us(us),{checkout:r,router:o}=b(),i=M(async()=>{e.value=void 0,t.value=void 0,n({wallet:"GOOGLE_PAY"}),HD(o.currentUrl.value),r.unstable_evaluateSupportsSplitShipping(o.currentUrl.value)},[e,t,r,n,o]);return Ws({onClick:i,shouldResetCustomerInfo:!0,skipRedirect:!0})}function HD(e){e.searchParams.get(Up)==="true"&&(e.searchParams.delete(Up),history.replaceState(null,"",e.href))}function qD({shouldResetCustomerInfo:e}){const t=Gs();return M(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const zp="google_pay_legacy_token_bounce";function GD(){const{checkout:e,embed:t,observability:n,shop:r}=b(),{inMemoryGooglePayParts:{paymentSheetError:o}}=We(),{onClick:i}=zD();F(()=>{r.hasFlagEnabled(fC)&&(t||e.wallets.escalatedWallet.value==="GOOGLE_PAY"&&(e.latestReceipt.value||hC({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:zp,value:1}
23),n.log(zp,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),i?.(()=>{o.value={type:"recovery_notice"}}))))},[])}function WD(){return GD(),null}const jv=mt("NavigationBlockerContext");class $D extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}const YD=1e3,Hp=30;function jD({children:e}){const t=U(new Set),n=Te(!1),{observability:r}=b(),o=M(l=>{setTimeout(()=>{t.current.has(l)&&r.error(new $D(`The block associated with the key: ${l} has been blocking for over ${Hp} seconds now. Please check to see you are properly cleaning this up.`))},Hp*YD)},[r]),i=M((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(jv.Provider,{value:a,children:e})}const Kv=qe({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),$s=()=>Se(Kv);function pY(){const{registerPayNowButtonElement:e}=$s(),t=U(null);return M(n=>{t.current?.(),t.current=n?e(n):null},[e])}function KD({children:e}){const t=U(new Set),[n,r]=ie(null),[o,i]=ie(0),a=M(d=>(t.current.add(d),r(d),()=>{t.current.delete(d),r(p=>p===d?t.current.values().next().value??null:p)}),[]),l=M(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(Kv.Provider,{value:u,children:e})}function JD(){return Xy(b())}function mY(){const{embed:e}=b(),n=Rs()?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return n==="DISABLED"||n==="FORWARD_TO_CLIENT"||r==="DISABLED"||r==="FORWARD_TO_CLIENT"}function fY(){const{mobileCheckoutSdk:e}=b(),t=e.config.version,n=e.config.schema;return!!t||!!n}function XD(e){return e.filter(t=>t.allocationSet.allocatedForTotal?.targets.some(n=>!n.deliveryLineTarget)||t.allocationSet.allocated?.allocations.some(n=>!n.target.deliveryLineTarget))}function Jv({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function Xv(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:XD(e.discounts?.lines??[])},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(n=>({...n,payment:t}))}}}}var QD=(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))(QD||{});function ZD(e,t){t&&(e.set(kC,t.paymentMethod),t.paymentMethodIdentifier?e.set(Ad,t.paymentMethodIdentifier):e.delete(Ad))}class eO extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function gu(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",k=m.user.isAuthenticatedUser,S=c.hasFlagEnabled(gC),I=ao().current.token,C=l.checkpointToken.value,w=l.configuration.renderContextToken.token.value,A=Ev({mode:"copy-if-missing",include:{shopClientUuid:!0}}),T=Jv({isFlagshipPartner:f?.isFlagshipPartner,embedderProposalSnapshotEmail:f?.embedderProposalSnapshot.value?.email,proposedEmail:l.proposal.proposed.email.value}),L=V(()=>{if(E)return"";if(!y)return d?p.storefront():"";const R=new URL(y);R.searchParams.set(lh,"true"),yC(R),t&&k.value&&vC(a.type)&&S&&_C(R,CC),C&&R.searchParams.set(bC,C),I&&R.searchParams.set(sh,I),_&&P&&(R.searchParams.set(PC,_),R.searchParams.set(SC,P)),Bn(g.search)&&R.searchParams.set(EC,"shop_web"),k.value?R.searchParams.set(Id,"true"):R.searchParams.delete(Id),w?R.searchParams.set("rctx",w):R.searchParams.delete("rctx");const j=new URLSearchParams(g.search).get("_cs");j&&R.searchParams.set("_cs",j);const ee=new URLSearchParams(n.initialRequest.url.search);return A(R.searchParams,ee),T&&!R.searchParams.get("checkout[email]")&&R.searchParams.set("checkout[email]",T),R.href},[E,y,C,n.initialRequest.url.search,_,P,g.search,k.value,I,d,p,w,A,T,t,a.type,S]);let N=r.translate("unauthenticated_modals.generic.cta");(JD()||f?.isCheckoutKit())&&(N=r.translate("checkout_sdk.use_another_payment_method"));const O=M(()=>(E||(k.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,k,u,o,i,a,l,c,e,v]),B=M(R=>
23{if(l.unstable_setRedirectingExternally(!0),O(),!L){l.unstable_setRedirectingExternally(!1),o.error(new eO("redirectToGuestCheckout called without a guest checkout URL"));return}if(!R){window.location.assign(L);return}const $=new URL(L);ZD($.searchParams,R),window.location.assign($.href)},[l,O,L,o]);return V(()=>({label:N,href:L,onClick:O,redirectToGuestCheckout:B}),[N,L,O,B])}function tO(e){const{negotiate:t}=Nt();return M(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:Xv,negotiationStage:"negotiation",onComplete:r=>e(n,r)}),[t,e])}function nO(e,t){const{negotiate:n}=Nt();return M(r=>n({silenceViolations:["all"],force:!0,customizeNegotiation:o=>{const i=Xv(o);return{...i,buyerIdentity:{...i.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(r)}),[n,t,e])}function hY({clearPii:e}){const{embed:t,checkout:n,userEvents:r,source:o,shop:i}=b(),a=se().shippingAddress.value,{href:l,redirectToGuestCheckout:c}=gu("payment_page",{markPrefilledGuestArrival:!e}),u=Jv({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:n.proposal.proposed.email.value}),d=tO(c),p=nO(c,u??""),m=n.proposal.negotiated.fields.availableDeliveryAddresses.value,f=!!(m?.length&&m.some(h=>IC(a,h.address)));return M(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 rO=[3890849,3850711,5198245];function oO(e){return e?rO.includes(e):!1}function iO(){const{observability:e}=b(),t=M(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 sO(e){return new URL("/pay/session",e).href}function aO({enabled:e,observability:t,shopServerUrl:n}){const r=U(!1);F(()=>{!e||r.current||(r.current=!0,fetch(sO(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 lO({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}=gu(),d=Fy().value,p=iO(),m=U(!1),f=t.identity.current.value==="shopPay",h=o.unstable_getSerialization("apiClientId"),g=o.unstable_getSerialization("shopPayConfig"),y=oO(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 k=t.latestReceipt.value;if(k!=null)switch(k.status){case"processed":p.notify({checkout_completed:!0});break;case"action_required":k.action.type==="complete_payment_challenge"?p.notify({checkout_error:"threeds_required"}):p.notify({checkout_error:"generic_error"});break;case"failed":k.failure.type==="payment"||k.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]),aO({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 cO(){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 uO(){const{source:e}=b(),{useRedesignedChoiceList:t}=cO();return t&&e.type!=="shopPayExternal"?"redesigned":"base"}
23class dO extends Error{constructor(){super(...arguments),this.name="TranslationError"}}function pO(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 dO(`Missing UI library translation: ${r}`);return i}}const Qv=()=>{const{url:e}=b();return V(()=>[e.cart(),e.storefront()],[e])};function Zv(){const{router:e,shop:t}=b(),n=fi(),{cartLink:{visibility:r}}=Fe(),o=Pe(),i=po(),a=Ye(r==="hidden");return x(()=>{const{currentDetour:l}=o.value,c=l?.type==="thankYou";return t.hasStorefront&&!n.value&&!c&&!Bn(e.currentUrl.value.search)&&!!i.value&&!a.value})}function po(){const{source:e,url:t}=b(),n=e.type==="simulated",r=q().buyerIdentity;return x(()=>{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 e_(e){return e.currentUrlMatches("/thank-you")}function mO(e){return e.currentUrlMatches("/stock-problems")}const t_=at(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=po(),h=yO(),g=new URL(c.storefront()).origin,y=u.type==="simulated",_=d.configuration.isWindowOpenDelegationEnabled,P=Qv();if(d.configuration.isUniversalCheckoutFinalizer&&e_(l))return s("a",{...o,ref:i,"aria-disabled":"true",children:r});let v=n==="_blank",E=n==="_blank",k=bA(t,{cart:SA(f.value),checkout:PA()});const S=hO(k,l,g,h),I=["/information","/shipping","/review","/payment","/thank-you","/cart","/",""],C=["/orders","/profile","/settings"],w=[...I,...C],A=/^\/orders\/.*/;switch(S){case 2:{E=!0,v=!0;break}case 1:{E=!0;break}case 3:{E=!0,k="#";break}case 0:y&&!w.includes(Bh(k))&&!A.test(k)&&(k="#");break;default:rn(S)}const T=v?"_blank":void 0,L=v?"noopener noreferrer":void 0,N=ag({external:v,native:E});return E?s("a",{...o,href:k,target:T,rel:L,ref:i,"aria-describedby":N,onClick:O=>{if(_&&(S===1||S===2)){O.preventDefault(),p?.client?.windowOpenRequest(k).catch(B=>{m.log("window_open_delegation_error","Window open delegation failed in Link component",{url:k,error:B instanceof Error?B.message:String(B)})}),o.onClick?.(O);return}if(y){if(O.preventDefault(),P.includes(k)){const R=new URL(l.currentUrl.value);R.searchParams.set("ce_redirect",k),l.navigate(R);return}const B=a.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:k});confirm(B)&&open(k)}o.onClick?.(O)},children:r}):s(ZP,{...o,router:l,href:k,target:T,rel:L,ref:i,"aria-describedby":N,children:r})});t_.displayName="Link";const n_=new Set(["http","https"]),fO=new Set([...n_,"mailto","tel","sms"]);function hO(e,t,n,r){let o;try{o=new URL(e,t.currentUrl.value.origin)}catch{return 3}const i=o.protocol.replace(":","");return n_.has(i)?eS(o,t.prefix)||!e.startsWith("//")&&!e.startsWith(o.protocol)?0:gO(o,t,n,r)?1:2:fO.has(i)?1:3}function gO(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}function yO(){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 vO({children:e}){const{geolocation:t}=iu(),{i18n:n,embed:r,checkout:o,observability:i,shop:a}=b(),l=ac({embedder:r?.embedder,shop:a}),c=Sr(),u=o.configuration.layout.isOnePage.value,d=uO()==="redesigned",p=M(y=>n.numberFormatter().format(y),[n]),{symbol:m,prefixed:f}=tS(n.currency,n),h=V(()=>pO(n),[n]),g=nv();return s(sw,{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:t_,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 _O=mt("ValidationErrorsContext");function r_(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const qp="$.payments",Gp="$.cart.buyerIdentity",Wp="$.cart.deliveryGroups[0].deliveryAddress",$p="$.cart.localizedField",Yp="$.cart.billingAddress",bO="$.cart.poNumber";function Ys(){const e=Ot(),{allViolations:t}=q(),n=He("allViolations"),r=x(()=>n.value?[]:t.value?t.value.filter(o=>o.__typename==="UnprocessableTermViolation"&&lc.has(o.code)).map(o=>({message:o.localizedMessage||o.nonLocalizedMessage,target:o.target})):[]);return x(()=>{const o=[...e.validationErrors.value,...r.value].filter(r_()),i=o.filter(({target:m})=>m?.startsWith(Wp)&&!!m.replace(`${Wp}.`,"")),a=o.filter(({target:m})=>m?.startsWith(Gp)&&!!m.replace(`${Gp}.`,"")),l=o.filter(({target:m})=>m?.startsWith(qp)&&!!m.replace(`${qp}.`,"")),c=o.filter(({target:m})=>m?.startsWith($p)&&!!m.replace(`${$p}.`,"")),u=o.filter(({target:m})=>m?.startsWith(Yp)&&!!m.replace(`${Yp}.`,"")),d=o.filter(({target:m})=>m===bO),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 PO({children:e}){const{deliveryMethodsAddressErrors:t}=Mt(),{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}=Ys().value,{shippingAddress:m}=se(),f=m.fields.countryCode.value,h=mR(f),g=gR(),y=V(()=>({}),[]),_=M((v,E,k)=>{const S=v.value,I=C=>{v.value=C};!S&&k&&(I(k.message),y[E]=k.message),typeof S=="string"&&y[E]===S&&!k&&(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 k=c.find(({target:w})=>{const A=w?.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),C=h?.includes(v);I&&!C&&k&&(k={...k,message:" "}),_(E,v,k)})},[c,t,h,_]),F(()=>{Object.entries(r).forEach(([v,E])=>{const k=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}`,k)})},[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(_O.Provider,{value:P,children:e})}const SO=Ge({load:()=>Ve(()=>import("./component-WalletApplePayLazy.BkvDQx81.js"),__vite__mapDeps([69,1,2,3,4,5,70,71,42,49,56,8,72,60,73,74,6,7])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:EO});function EO(e){const{sessionLoadFailed:t}=We().inMemoryApplePayParts,{observability:n}=b();F(()=>{e&&(t.value=!0)},[e,n,t])}function CO(){const e=St();return x(()=>e.value?typeof window.ApplePaySession<"u":!1)}function kO(){const e=CO(),{availableWallets:t}=We(),n=Ye(t.some(({name:i})=>i==="APPLE_PAY")),r=U(!1),o=x(()=>(!r.current&&e.value&&n.value&&(r.current=!0),r.current));return s(ye,{when:o,children:s(SO,{})})}function o_(){const{checkout:e}=b();return!e.configuration.showPayButton}const IO=6e4;function AO({enabled:e,onTimeout:t,timeout:n=IO}){const r=U(null),o=U(t);o.current=t,F(()=>
23{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,n])}var _o={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 Yt({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:i,visibility:a,tabIndex:l,display:c="block"}){const u=rg(),d=r??u??0,p=u?`h${u}`:"h1",m=a==="hidden"?_o.visuallyHidden:Y(_o.Heading,o&&_o.textAlignVariant[o],d?_o.levelVariant[d]:void 0,c&&_o.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 TO="MQqMI",wO="Jue6i",LO="kpec9",Ha={dialog:TO,background:wO,content:LO};function xO({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=ou(),o=Te(!1);F(()=>{r(),o.value=!0},[o,r]);const i=s("div",{className:Ha.dialog,role:"dialog","aria-modal":!0,"aria-label":t,children:[s("div",{className:Ha.background}),s("div",{className:Ha.content,children:e})]});return s(G,{children:[n&&!o.value?s("div",{"aria-hidden":"true",children:i}):null,s(Pr,{children:s(ru,{children:i})})]})}function RO({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(xO,{dialogLabel:r,renderInlineUntilMounted:e,children:s(Z,{gap:"large-400",alignItems:"center",children:[s(_e,{children:s(io,{size:"large"})}),s(Yt,{level:2,textAlign:"center",children:r})]})})}const MO=3e3,NO=1e4;function DO({onTransitionComplete:e,useConsentCopy:t=!1}){return s(OO,{onTransitionComplete:e,useConsentCopy:t})}function OO({onTransitionComplete:e,useConsentCopy:t}){const{checkout:n,i18n:r}=b(),o=o_(),{payNowButtonElement:i,payNowButtonSectionMounted:a}=$s(),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=M(()=>{u.value&&(f.current||(f.current=!0,Lt({content:r.translate("wallets.errors.subscription_review_required"),role:"status"}),n.wallets.setIsDecelerating(!1),e()))},[r,u,e,n.wallets]);return AO({enabled:!0,onTimeout:()=>{h.current=!0,g()},timeout:NO}),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,MO-y);if(_===0){g();return}const P=setTimeout(()=>{g()},_);return()=>clearTimeout(P)},[g,d,p]),s(RO,{renderInlineUntilMounted:!0,useConsentCopy:t})}function FO(e){const{shop:t,checkout:{configuration:n,identity:r}}=b(),o=r.current.value==="shopPay",i=t.hasFlagEnabled(In);return x(()=>AC({supportsOnePage:TC({isOnePage:n.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:i,asPaymentMethod:e.value}),isShopPayActive:o}))}const BO=["address2","company","phone"];function i_({addressErrors:e}){if(e.size!==1)return;const[t]=e.keys();if(t!==void 0)return VO(t)?t:void 0}function s_({missingAddressField:e,violations:t}){return e==="company"&&t.some(({code:n})=>n==="DELIVERY_COMPANY_REQUIRED")}
23function gY({addressErrors:e,violations:t}){const n=i_({addressErrors:e});if(!s_({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function VO(e){return BO.includes(e)}function a_({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&&cc(r)){const{walletContent:o}=r.method;return{status:"connected",email:o?.email??"",token:o?.token??""}}return{status:"not_connected"}}function UO({code:e}){return Qr.has(e)||Lo.has(e)||MC.has(e)||NC.has(e)||lc.has(e)||DC.has(e)||OC===e}function zO({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);if(n.length!==1)return!1;const r=t("shipping",n),o=i_({addressErrors:r});return s_({missingAddressField:o,violations:n})}function l_({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=We();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function HO(){const{shop:e,i18n:t,checkout:{configuration:n}}=b(),{shippingAddress:r,paymentLines:o}=se(),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=lu(i.countryCode),f=e.hasFlagEnabled(ch),h=V(()=>xC({paymentLines:o.value,isOnePage:n.layout.isOnePage.value})?p?.filter(UO)??[]:[],[p,o,n.layout.isOnePage.value]),y=V(()=>f&&zO({violations:h,getAddressErrorsFromViolations:m}),[h,m,f])?void 0:h[0],_=c.value?.type===hs,P=c.value?.type===uh,v=V(()=>{const E=RC(l,"PAYPAL_EXPRESS");if(_&&!E){const k=d?i.countryCode:u?.name;return k?t.translate("wallets.errors.unavailable.unavailable_for_c
23ountry",{walletName:t.translate("brand.paypal"),countryName:k}):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:et.PaymentSheetViolations,tone:"critical",localizedMessage:E,nonLocalizedMessage:E,onDismiss:()=>{c.value=void 0}}}if(v)return{code:et.PaymentSheetViolations,tone:"info",localizedMessage:v,nonLocalizedMessage:v,onDismiss:()=>{c.value=void 0}};if(y)return{code:et.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}}function qO(){const{isInPayPalContextSignal:e}=We(),{i18n:t}=b(),n=l_({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:r}}=We();return x(()=>{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 yY=()=>{const{paymentLines:e}=se();return M(()=>{const t=e.value;e.value=nc(t,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}})},[e])};function vY(){const e=er(),{checkout:t,shop:n}=b(),r=t.configuration.layout.isOnePage.value,o=n.hasFlagEnabled(LC),i=t.extensibility.ui.hasAtRiskPlacement;return x(()=>{if(r||o&&!i.value)return!1;const a=e.value.enabledDeliveryMethods.includes("PICK_UP");return!t.isShippingRequired.value||!a})}function _Y(e){return!!e.value?.method.walletContent?.isVenmo}const bY=()=>{const{paymentLines:e}=se();return x(()=>Pt(e.value,"PAYPAL_EXPRESS"))},PY=()=>{const{paymentLines:e}=se();return x(()=>{const t=Pt(e.value,"PAYPAL_EXPRESS");return!!(t&&cc(t))})},SY=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=We(),{progressing:t}=Nt(),n=c_();return x(()=>!!(n.value&&(e.value.status==="loading"||t.value)))},EY=()=>{const e=c_(),t=uc(),n=wC(),r=ni();return x(()=>!n.value&&(t.value||r.value&&r.value.amount<=0)?!1:!!e.value)},c_=()=>{const{paymentLines:e}=se();return x(()=>{const t=Pt(e.value,"PAYPAL_EXPRESS");return!!(t&&!cc(t))})};function GO(e){const{parts:t}=Je(),{paymentMethods:n}=q();ze(()=>{if(e.peek().status==="connected")return;const r=a_({paymentLines:t.paymentLines.value,paymentMethods:n.value});r.status==="connected"&&(e.value=r)})}const jp=new Map,qa=new Map,Kp=new Map,WO=6e4;function $O(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:o}}=b(),i=q().paymentMethods,a=!!n?.isFlagshipPartner&&!Uf(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=jp.get(f);if(h){p.value=h;return}const g=Kp.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&&Kp.set(d,Date.now()+WO),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 k=E.eligible===!0||E.eligible===!1,I=E.eligible===!1||!k?{status:"not_eligible"}:{status:"rendered"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:I.status,...!k&&{reason:"malformed_payload_fail_closed"}}}),{status:I,definitive:k}}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=qa.get(f);return P||(P=_().then(({status:v,definitive:E})=>(E&&jp.set(f,v),qa.delete(f),v)),qa.set(f,P)),P.then(v=>{y||(p.value=v)}).catch(()=>{}),()=>{y=!0}},[a,u,o,d,p,r])}function YO(e){const t=se().paymentLines;return x(()=>{const n=e.lastClicked.value;return!!Pt(t.value,"PAYPAL_EXPRESS")||n==="PAYPAL_EXPRESS"})}function jO(){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 Le.AmazonPay:case Le.BuyWithPrime:a=KO(i,o);break;case"PAYPAL_EXPRESS":case"VENMO":a=JO(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 KO(e,t){const n=FC(e,t);return n?n.method.walletParams?.email:void 0}function JO(e){const t=Pt(e,"PAYPAL_EXPRESS");if(!(!t||!t.method.walletContent))return t.method.walletContent.email}function XO(e){const{observability:t,router:n}=b(),r=n.currentUrl.value,[o,i]=ie(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 QO extends bn{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function ZO({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 eF({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(In),d=hi(),{forceOnePageCheckoutLayout:p}=Us(In),m=Te(l.searchParams.has(fs)&&!t.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:f}=se(),h=Wf(a),g=wi(fn.PayPal,{scope:h}),y=wi(fn.GooglePay,{scope:h}),_=wi(fn.AmazonPay,{scope:h}),P=wi(fn.ApplePay,{scope:h}),v=YO(t.wallets),E=Te(void 0),k=Ar({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),S=Ar({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:a_({paymentLines:t.proposal.proposed.paymentLines.peek(),paymentMethods:t.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),I=Ar({buttonStatus:{status:"not_rendered"}}),C=Ar({buttonStatus:{status:"not_rendered"}}),w=ky(),A=Bf(),T=Ar({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:m.value&&qo({applePaySubscriptionsDecelerationActive:d,applePayThreePageVaultedReviewEnabled:u,isOnePageCheckout:c})&&BC({isApplePaySubscriptionsDecelerationActive:d,isApplePaySubscriptionReviewLayoutSupported:c||i.hasFlagEnabled(In),hasSubscriptionReviewQueryParam:m.value,isABTestActive:i.hasFlagEnabled(zo),variant:w,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}),L=Te(void 0),N=Ar({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}),D=Te(!1),O=Te(void 0),{queryParam:B}=Ry({applePayPaymentSheetError:T.paymentSheetError,applePaySubscriptionReviewTransition:T.subscriptionReviewTransition}),z=FO(T.asPaymentMethod).value,R=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");GO(S.accountStatus),$O(C),jO();const $=Ny(C),j=By({inMemoryGooglePayParts:k,inMemoryPayPalParts:S,inMemoryVenmoParts:I,inMemoryApplePayParts:T,inMemoryAmazonPayParts:N,didIncrementUnusablePartialAddressMetric:D}),ee=V(()=>
23j?.filter(({placements:J,name:ne})=>(ne==="APPLE_PAY"||ne==="GOOGLE_PAY")&&B==="localization_extension_field_error"||ne==="APPLE_PAY"&&R&&!z?!1:My(ne,J,$)),[j,B,R,z,$]),ae=Ye(ee);F(()=>{ee?.length&&performance.mark(VC)},[]);const K=ee?.map(J=>J.name)||[],Q=K.join(",");F(()=>{new Set(K).size!==K.length&&n.error(new QO("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(K.filter((ne,me)=>K.indexOf(ne)!==me))],allWalletNames:K}}))},[Q,n]);const X=ee?.length||0,H=t.wallets.activeSession.value?.wallet!==void 0&&t.wallets.activeSession.value.wallet!=="APPLE_PAY"&&!!t.wallets.isDeceleratingSignal?.value,ue=T.subscriptionReviewTransition.value,re=x(()=>dc({checkout:t})),le=re.value&&UC(w),de=ZO({asPaymentMethod:T.asPaymentMethod.value,useConsentCopy:le,isCaliforniaBillingOrShippingAddress:A.value,hasSubscription:re.value,transition:ue,isABTestActive:i.hasFlagEnabled(zo)}),ke=ue!==void 0&&!H&&de&&qo({applePaySubscriptionsDecelerationActive:d,applePayThreePageVaultedReviewEnabled:u,isOnePageCheckout:c}),he=t.wallets.hasActiveApplePaySubscriptionReview.value&&de&&!A.value&&ue===void 0;F(()=>{de||(t.wallets.setHasActiveApplePaySubscriptionReview(!1),ue!==void 0&&(T.subscriptionReviewTransition.value=void 0,H||t.wallets.setIsDecelerating(!1)))},[ue,t.wallets,T.subscriptionReviewTransition,H,de]),F(()=>{ue!=="storefront_redirect"||!ke||c||p({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[ue,p,c,ke]);const Ee=i.hasFlagEnabled(us)&&!c&&l.searchParams.has(zC);F(()=>{Ee&&(t.unstable_forceCheckoutLayoutToOnePage(),wy(n,{wallet:"GOOGLE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),Lt({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}))},[t,o,n,Ee]);const De=M(()=>{m.value=!1,T.subscriptionReviewTransition.value=void 0},[m,T.subscriptionReviewTransition]);XO([{walletName:"applepay",signal:T.buttonStatus},{walletName:"amazonpay",signal:N.buttonStatus},{walletName:"buy_with_prime",signal:N.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:k.buttonStatus},{walletName:"paypal",signals:[S.acceleratedCheckoutButtonStatus,S.payWithPayPalButtonStatus]}]),ze(()=>{const J=f.value,ne=t.wallets.activeSession.value;ne?.wallet==="APPLE_PAY"&&n.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:J?.countryCode,isPostalCodePadded:Vf(J?.postalCode,J?.countryCode),asPaymentMethod:ne.asPaymentMethod})});const Ie=V(()=>({availableWallets:j,walletUsedForSubmissionSignal:E,persistedPayPalSignal:g,inMemoryPayPalParts:S,inMemoryVenmoParts:I,persistedGooglePaySignal:y,inMemoryGooglePayParts:k,inMemoryApplePayParts:T,applePaySessionHandler:L,persistedApplePaySignal:P,persistedAmazonSignal:_,inMemoryAmazonPayParts:N,inMemoryShopPayParts:C,didIncrementUnusablePartialAddressMetric:D,acceleratedWalletPaymentMethods:ae,isInPayPalContextSignal:v,buttonCount:X,receiptErrorSignal:O}),[j,g,y,P,_,ae,X,I,E,k,S,T,L,N,C,O,v,D]);return s(HC.Provider,{value:Ie,children:[ke&&s(DO,{onTransitionComplete:De,useConsentCopy:le}),s("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:bt({screenReaders:"only"}),children:he?o.translate("wallets.errors.subscription_review_required"):""}),e]})}const tF=Qn(function({children:t,AlternativeProposal:n}){const{embed:r}=b(),o=M(i=>r?.client?.showToast(i)??!1,[r]);return s(KD,{children:s(jD,{children:s(nF,{AlternativeProposal:n,children:[s($L,{handleToast:o,children:t}),s(ST,{})]})})})});function nF({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(DD,{}),s(yR,{}),s(fD,{}),s(UD,{}),s(WD,{})]}),l=t??q1;return s(Py.Provider,{value:i,children:s(J1,{children:s(vO,{children:s(X1,{children:s(qC,{children:s(l,{children:s(CD,{children:s(eF,{children:s(mD,{children:s(PO,{children:s(vy,{children:s(iM,{children:s(ux,{children:s(j1,{children:s(Yx,{children:s(MD,{children:s(s1,{children:s(Z1,{children:s(l1,{children:s(lO,{children:[s(sR,{}),s(rF,{}),s(ID,{}),s(kO,{}),e,a]})})})})})})})})})})})})})})})})})})})})}function rF(){const e=U(!1),t=b(),{embed:n,webMcp:r}=t,o=Ht(bc),i=Je(),{resetAddressErrors:a}=au(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:()=>Dh(),negotiationContext:i.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>ut(()=>Ve(()=>import("./web-mcp-pickup-locality.CpoBt5Wd.js"),__vite__mapDeps([75,2,1,3,4,5,76,6,77,78,79,80,81,82,83,84,51,58,59,60,85,66,44,45,46,7,8]))).then(({createPickupLocalityServices:d})=>d(t)),journey:c,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:u})}return null}const oF=Ge({displayName:"DevTools",load:()=>Ve(()=>import("./DevTools.ByoLfigl.js"),__vite__mapDeps([86,1,2,3,4,5,6,7,8,87])),suspense:!0}),iF=Ge({displayName:"EditorBridge",suspense:!1,load:()=>Ve(()=>import("./EditorBridge.iVDlopyG.js"),__vite__mapDeps([88,2,1,3,4,5,6,7,8]))});function sF(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}function aF(e){const{observability:t}=b();F(()=>{e&&sF(t,e)},[e,t])}const lF=Ge({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:aF,load:()=>ut(()=>Ve(async()=>{const{deferredPrivacyComponents:e}=await import("./DeferredPrivacy.BXYUNmBc.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([89,1,2,3,4,5,20,21,37,38,6,7,8])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))});function cF(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}function uF(e){const{observability:t}=b();F(()=>{e&&cF(t,e)},[e,t])}const dF=Ge({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:uF,load:()=>ut(()=>Ve(async()=>{const{deferredPrivacyComponents:e}=await import("./DeferredPrivacy.BXYUNmBc.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([89,1,2,3,4,5,20,21,37,38,6,7,8])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});async function pF(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:o}=n,i={},a=GC(e.searchParams);if((!o||a)&&t.type!=="simulated"&&t.checkoutSessionIdentifier!==null&&e.searchParams.has(lh)&&(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 mF({children:e}){return s(G,{children:e})}function fF({children:e}){const t=V(()=>new URL(window.location.href),[]),{client:n,source:r}=b(),o=n.unstable_getSerialization("shopPayConfig");return F(()=>{o&&pF(t,r,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,r,o]),s(G,{children:e})}function hF({children:e}){return typeof window>"u"?s(mF,{children:e}):s(fF,{children:e})}function gF({children:e,context:t,...n}){const r=typeof window>"u",o=St();return s($C.Provider,{value:t,children:s(nu,{target:"cart",children:s(hF,{children:s(nS,{router:t.router,children:s(tF,{...n,children:s(WC,{children:[s(w0,{children:e}),s(M0,{}),!r&&s(L0,{}),s(ye,{when:o,children:[s(dF,{}),s(lF,{})]}),s(yF,{}),ec()&&s(iF,{})]})})})})})})}function yF(){const e=St();return Sr(),s(ye,{when:()=>e.value&&!1,children:s(oF,{})})}function vF(){const{shop:e,checkout:t}=b(),n=hi(),r=e.hasFlagEnabled(In),{inMemoryApplePayParts:{subscriptionReviewTransition:o}}=We();return x(()=>o.value!==void 0&&qo({applePaySubscriptionsDecelerationActive:n,applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:t.configuration.layout.isOnePage.value}))}function _F(){const{checkout:{wallets:e}}=b(),t=vF();return x(()=>{const n=e.activeSession.value?.wallet!==void 0&&e.activeSession.value.wallet!=="APPLE_PAY"&&!!e.isDeceleratingSignal?.value;return t.value&&!n})}
23function Et(e){return[e].flat(99).filter(Boolean).length>0}var Tr={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=Et(a);return s("div",{role:l?void 0:o,className:Y(Tr.Divider,Tr.directionVariant[r],l&&Tr.alignmentVariant[i],Tr.borderWidthVariant[n],Tr.styleVariant[t]),id:e,children:l&&s("div",{className:Y(Tr.contentAlignmentVariant[i]),children:[a,o==="separator"&&s("span",{role:"separator"})]})})}function u_({children:e,condition:t}){return t?s("picture",{children:e}):s(G,{children:e})}const bF=new Map(YC({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function PF(e){return gs(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 d_(e,t){if(!(e||!t||!gs(t)))return Object.entries(PF(t)).sort(([n],[r])=>{const o=Vo[n],i=Vo[r];return o!=null&&i!=null?i-o:0}).map(([n,r])=>{const o=bF.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 Yl("source",{key:o,media:o,srcSet:i})}}).filter(Boolean)}function p_(e){if(e)return gs(e)?typeof e.default=="string"?e.default:void 0:e}var m_={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},SF=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 js({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=f_(n),_=!g||g==="base"?"auto":"accent",P=d_(i,kF(o)),v=h??"extraSmall",E=CF(m)??h_(y),{className:k}=Tt({boxShadow:v}),{className:S}=Tt({objectFit:p,borderWidth:E});return s("div",{className:Y(vt.ProductThumbnail,vt.thumbnailBackgroundVariant[u],vt.productThumbnailSizeVariant[y],k,v!=="none"&&vt.boxShadowMargin,t!=null&&vt.depthVariant[t],vt.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||g_(o)?s(u_,{condition:!!P,children:[P,s("img",{src:i??p_(o),srcSet:a,sizes:r,alt:e,loading:"eager",className:Y(vt.ProductThumbn
23ailImage,vt.borderVariant[d],vt.borderColorVariant[f],S)})]}):s("div",{className:Y(vt.Placeholder,vt.borderVariant[d],vt.borderColorVariant[f],S),children:s(Re,{type:"image",size:EF(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(IF,{size:y,tone:_,children:l})]})}function f_(e){if(typeof e!="string")return"base";const t=e.replace("-100","");return t in m_?t:"base"}function h_(e){return e.startsWith("small")?"base":"large"}function EF(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function CF(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 g_(e){return typeof e=="string"||gs(e)}function kF(e){return g_(e)?e:void 0}function yi(e){const{boxSize:t}=m_[f_(e)];return{blockSize:t,inlineSize:t}}function IF({children:e,size:t,tone:n}){const r=ln(),o=n==="accent"?n:"auto",{className:i}=Tt({borderWidth:h_(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 AF(e){let t=0,n=!0;const r=new Set;return function(){const[i,a]=ie(()=>{if(t===0)return 0;const P=performance.now()-t;return P<e?e-P:0}),[l,c]=ie(!0),u=U(),[d,p]=ie(!1),m=M(()=>{for(const _ of r)_(!1)},[]),f=M(()=>{for(const _ of r)_(!0)},[]),h=M(()=>{m(),p(!0)},[m]);F(()=>{d&&f()},[d,f]);const g=M(_=>{r.add(c);const P=_.timeStamp-t;a(P)},[]),y=M(_=>{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 yu=4e3,y_=AF(yu);var zn={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 TF=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}=Tt({blockSize:r,inlineSize:jC(n,y=>{if(y===void 0){if(!Et(o))return"100%";if(e==="block")return"fitContent"}return y})},{transforms:{inlineSize:y=>Go(y,{fitContent:!0,auto:!0})}}),[d,p]=ie(a);F(()=>{const y=setTimeout(()=>p(!1),TF);return()=>{clearTimeout(y)}},[]);const{animationEnabled:m,delay:f,onAnimationStart:h,onAnimationIteration:g}=y_();return s(l,{className:Y(zn.Skeleton,e==="inline"&&zn.inline,d&&zn.hidden,m&&zn.animation,c),style:{...vn({[zn.vars.aspectRatio]:t?.toString()??"",[zn.vars.animationDelay]:`${f}ms`,[zn.vars.animationDuration]:`${yu}ms`}),...u},"aria-hidden":"true",onAnimationStart:h,onAnimationIteration:g,id:i,children:s(l,{className:Y(zn.Wrapper,c),style:u,children:o})})}const wF=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function vu({children:e,delay:t,inlineSize:n,id:r,...o}){return s(W,{...o,children:s(Xo,{delay:t,inlineSize:wF.get(n??"small"),id:r,children:e})})}const LF=1,Ga=300;function xF(e,t,n){const r=n??LF;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>Ga&&(o*=Ga/i,i=Ga),{width:o,height:i}}const RF="gP50U",MF={Logo:RF};function v_({width:e}){const{header:{logo:t}}=Fe(),{shop:n}=b(),{width:r,height:o}=xF(t?.maxWidth,e,t?.aspectRatio);return s("img",{alt:t?.altText||n.name,className:MF.Logo,src:t?.image,width:r,height:o})}const Qo=qe(void 0);function zi({children:e,style:t}){const{rendered:n}=Se(Qo)??{},r=V(()=>({pending:t,rendered:n}),[t,n]);return s(Qo.Provider,{value:r,children:e})}function __({children:e}){const{pending:t}=Se(Qo)??{},n=V(()=>({pending:void 0,rendered:t}),[t]);return s(Qo.Provider,{value:n,children:e})}function _u(){return Se(Qo)??{}}function NF(){return KC(_u().pending??{})}const DF="INFORMATION1",OF="ORDER_STATUS1";function bu(){return Se(Vy)}function CY({currentDetour:e}){return e?.type==="thankYou"?OF:DF}function FF({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:o,sourceType:i}){const a=e&&EA(e,t),l=e&&r1(),c=r&&CA(r),u=r&&i1(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)||ys(P)&&(!_||!o.supported.has(_)||(e||r)&&!m.has(_)))}}function kY(e,t,n,r,o){return e==null?()=>!1:QC(Ho(e.features,t),n,r,o)}const b_=qe([]),BF=qe({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),P_=qe(null);function VF(){const{deactivatedExtensionIds:e}=UF(),{currentPage:t,currentDetour:n}=Pe().value,{source:r}=b(),o=bu(),i=Je();return FF({page:t,negotiatedState:i.current.peek(),deactivatedExtensionIds:e,detour:n,placementReferences:o,sourceType:r.type})}function S_(e,t,...[n]){const{checkout:{extensibility:r}}=b(),o=VF(),i=Se(P_),a=bu();return V(()=>{const l=ys(t)&&n?{target:t,placements:a,placementReference:n}:{target:t};return e.filter(c=>i===null||i.has(ps(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}
23=b(),o=r.hasFlagEnabled(ZC),i=bu(),a=U([]),l=Se(b_),c=n.ui.search().value,u=S_([...c,...l],e,t),p=V(()=>{if(o)return n.customFields.search(ys(e)&&t?{target:e,placements:i,placementReference:t}:{target:e})},[n,o,e,t,i])?.value,m=V(()=>(p??[]).map(h=>yl("customField",h)),[p]),f=V(()=>ek([...u.map(h=>yl("uiExtension",h)),...m]),[u,m]);return n.ui.enabled.value?f.length>0?f:a.current:m.length>0?m:a.current}function IY(e,t){const n=HF();return M(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 AY(e,t){const{checkout:{extensibility:n}}=b(),r=U([]),o=Se(b_),i=S_([...t,...o],e),a=V(()=>i.map(l=>yl("uiExtension",l)),[i]);return n.ui.required.value&&!n.ui.enabled.value?r.current:a}function UF(){return Se(BF)}const zF=qe({get:()=>{},findAll:()=>[],blockingExtensions:It(()=>[])});function HF(){return Se(zF)}function qF({visibleTargets:e,children:t}){const n=V(()=>new Set(e),[e]);return s(P_.Provider,{value:n,children:t})}function Jp(e){return Array.from(e.labels||[]).map(t=>t.textContent).join("")}function Gn(e){return e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")?e.checked.toString():e.value}function GF(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 E_={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},WF=Object.keys(E_),C_=qe(null);function mo(){const e=Se(C_);return M(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 vi({section:e,children:t}){if(typeof window>"u")return s("div",{children:t});const n=Ln(),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}=xi(p,e,o);f&&n("dom_input_focused",{element:m,timestamp:new Date})}Qg(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}=xi(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}=xi(h??p,e,o);y&&n("dom_clicked",{element:g,...E_,...wf(d.nativeEvent,WF),timestamp:new Date})}function u(d){const p=d.target?.closest("a, button, input, select");if(!p)return;const{element:m,shouldCaptureEvent:f}=xi(p,e,o);f&&n("dom_input_changed",{element:m,timestamp:new Date})}return s(C_.Provider,{value:o,children:s("div",{ref:r,onFocusCapture:a,onBlurCapture:l,onClickCapture:c,onChangeCapture:u,children:t})})}function xi(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=Gn(e);else{const u=k_(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 k_(e,t){if(!(e===null||t===null))return t.has(e)?t.get(e):k_(e.parentElement,t)}const $F=new Set(["firstName","lastName","company","address1","address2","city","countryCode","zoneCode","province","zone","postalCode","phone","streetNumber","streetName","neighborhood","line2","district","subdistrict"]);function YF(e){const{key:t}=e;return typeof t!="string"?!1:t.length===1||t==="Backspace"||t==="Delete"}function jF(e){const t=e.closest("#shippingAddressForm, #billingAddressForm, #shopPayAddressForm");if(t?.id==="shippingAddressForm")return"shipping";if(t?.id==="billingAddressForm")return"billing";if(t?.id==="shopPayAddressForm")return"shipping"}function KF(e){return jF(e)}function JF(e){return e.closest("#shippingAddressForm, #billingAddressForm, #shopPayAddressForm")?.querySelector('select[name="countryCode"], input[name="countryCode"], input[name="country"]')?.value||void 0}function XF(e){return!e.id.startsWith("autofill_")&&$F.has(e.name)}function Ks({section:e,children:t}){if(typeof window>"u")return s("div",{children:t});const{checkout:{address:{autofill:n},identity:r},observability:o,userEvents:i,router:a,shop:{id:l},shopPay:c,source:u}=b(),d=a.currentUrl.value,{currentFocus:p}=Pe().value,m=Ln(),f=my(),h=Jx(),g=U(null),y=U(new WeakMap),_=U(new WeakMap),P=Xl(d,{isS
23hopPayActive:r.current.value==="shopPay",shopPay:c});function v(L){const{name:N,tagName:D,type:O}=L,B=Jp(L);m("change",{element:{...B&&{label:B},...N&&{name:N},tagName:D,type:O,value:Gn(L)},section:e,timestamp:new Date})}function E(L,{recoveredAutofocus:N=!1}={}){const D=p.peek();p.value=e,!N&&(L.target instanceof HTMLInputElement||L.target instanceof HTMLSelectElement)&&y.current.set(L.target,Gn(L.target)),!N&&L.target instanceof HTMLInputElement&&L.target.name!=="email"&&h(P),D!==e&&(m("sectionInteraction",{section:e,timestamp:new Date}),f({type:"section_interaction",section:e}))}Qg(g,L=>E({target:L},{recoveredAutofocus:!0}));function k(L){if(L.target instanceof HTMLInputElement||L.target instanceof HTMLSelectElement){const N=y.current.get(L.target),D=Gn(L.target);y.current.delete(L.target),h(P),N!==D&&v(L.target)}}function S(L){if(!(L.target instanceof Element))return;const N=L.target.closest("a, button"),D=L.target.closest("input, select");if((N??D)&&N){const{tagName:B,textContent:z,id:R}=N,$=(z??"").trim(),j=N.dataset.eventName||$||R;h(P),m("click",{element:{tagName:B,textContent:j??void 0},section:e,timestamp:new Date})}}function I(L){L.target instanceof HTMLInputElement&&_.current.set(L.target,Gn(L.target))}function C(L){if(L.target instanceof HTMLInputElement){h(P);const N=_.current.get(L.target);_.current.delete(L.target),N!==void 0&&N!==Gn(L.target)&&YF(L)&&w(L.target)}}function w(L){if(!XF(L))return;const N=KF(L);if(!N||!n.hasDetected(N)||n.hasEmittedUserEditedAfterAutofill(N))return;const D=yr(l),O=D?Number.parseInt(D,10):void 0;if(O===void 0||Number.isNaN(O)){o.log("autofill_shop_id_parse_failed","Skipped user-edited-after-autofill because shop gid could not be parsed",{shopGid:l,addressType:N});return}i.monorailEvent({schemaId:"checkout_autofill_user_edited_after_autofill/1.0",payload:{shopId:O,checkoutToken:u.checkoutSessionIdentifier||"",country:n.detectedCountryCode(N)??JF(L)??"",addressType:N}}),n.markUserEditedAfterAutofillEmitted(N)}function A(L){const N=y.current.get(L);N!==void 0&&N!==Gn(L)&&w(L)}function T(L){if(L.target instanceof HTMLInputElement||L.target instanceof HTMLSelectElement){const{id:N,name:D,tagName:O,type:B}=L.target;let z=Jp(L.target);z.length===0&&(z=N);const R=GF(L);R&&m("autofill",{source:R,element:{...z&&{label:z},...D&&{name:D},tagName:O,type:B,value:Gn(L.target)},timestamp:new Date,section:e}),L.target instanceof HTMLSelectElement&&R!=="native"&&A(L.target)}}return s("div",{ref:g,onFocusCapture:E,onBlurCapture:k,onClickCapture:S,onKeyDownCapture:I,onKeyUpCapture:C,onChangeCapture:T,children:t})}function QF(){const{client:e}=b(),n=e.unstable_getSerialization("experiments")?.find(r=>r.clientHandle===aA)?.variant;return Object.values(dh).find(r=>r===n)}function I_(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 A_="checkout-main",TY="checkout-main-header",wY="checkout-pay-button",LY="checkout-review-heading",T_=mt("OrderSummaryContext");function w_(){return Ht(T_)}const Pu=({children:e})=>{const t=Te(!1),n=M(o=>{t.value=o},[t]),r=V(()=>({open:t,setOpen:n}),[t,n]);return s(T_.Provider,{value:r,children:e})},xY=()=>{const{checkout:e}=b(),t=e.configuration.visibility.showAside,n=St(),r=Es({base:!0,medium:!1}),o=Ye(t),i=Ye(r);return x(()=>!(o.value&&!i.value&&n.value))};function Su(){const{checkout:e,router:t}=b();return x(()=>e.thankYouEntrance.isRevealing.value&&t.currentUrlMatches("/thank-you"))}function ZF(){const{checkout:e,client:t,router:n}=b(),r=Ns(),o=Sr(),i=Bh(t.initialRequest.url.pathname).endsWith("/thank-you"),a=r&&!o&&!i;return x(()=>a&&e.thankYouEntrance.phase.value!=="settled"&&n.currentUrlMatches("/thank-you"))}const eB="cm5pp",tB="gdtca",nB="djSdi",rB="NGRNe",oB="_1Eo4p",iB="_5gERx",sB="mpQwN",aB="gYnYi",lB="uB1DX",cB="Lhk39",uB="GxFSO",dB="eqp7i",pB="EAjaz",mB="i8Dpn",fB="lX75M",hB="_0DLUq",gB="nMPKH",yB="WtpiW",vB="ks0CH",_B="GRdxR",bB="Sxi8I",PB="_9F1Rf",SB="i4DWM",EB="_4QenE",CB="QiTI2",fe={Shell:eB,"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:tB,MainContentPrimary:nB,Footer:rB,"Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:oB,Announcement:iB,"Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:sB,AnnouncementContent:aB,"Announcement-expanded":"yJIUK",AnnouncementActionButtons:lB,AnnouncementExpandCollapseButton:cB,AnnouncementCloseButton:uB,AnnouncementOverlay:dB,"Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:pB,"Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:mB,"Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-exiting":"aLUb3","Header-thankYouCovered":"Gm2ml","Header-hasBackgroun
23dImage":"zKcpW",BuyerJourney:fB,BuyerJourneyContent:hB,"BuyerJourney-containerContent":"hKv1l",Disclosure:gB,DisclosureButton:yB,DisclosureDetails:vB,DisclosureDetailsContent:_B,"Disclosure-divided":"iYA3J",Content:bB,"Content-containerContent":"vzM2m",Main:PB,"Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:SB,OrderSummaryContent:EB,"OrderSummary-inlineSizeFill":"LEmIb",FooterContent:CB,"Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},kB=1e3,Xp="announcement_box",Wa="announcement_content",IB="announcement_action_expand_collapse_buttons";function AB({children:e,onClose:t,onAfterCollapse:n,onAfterExpand:r,onExpand:o,onCollapse:i,open:a=!1,expanded:l=!1}){const{i18n:c}=b(),[u,d]=ie(!1),p=U(null),m=U(null),f=nn(l,"base"),h=nn(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 C=tk(I,200),w=new ResizeObserver(C);w.observe(S);const A=new MutationObserver(C);return A.observe(S,{childList:!0,subtree:!0,characterData:!0}),()=>{w.disconnect(),A.disconnect()}},[e,l,a,f]);const g=M(()=>{l?i?.():o?.()},[l,i,o]);F(()=>{f==="entered"?r?.():f==="exited"&&n?.()},[r,n,f]);const y=L_(),{environment:{isCheckoutEditor:_},announcement:{colorScheme:P}}=Fe(),v=y[0],E=_?v?.publicIdentifier:void 0,k=_&&y.length>0;return Et(e)?s("section",{id:Xp,className:Y(fe.Announcement,a&&fe["Announcement-opened"],u&&fe["Announcement-hasOverflow"],l&&fe["Announcement-expanded"],fe[Wt("Announcement-expandedTransition",f)],fe[Wt("Announcement-openTransition",h)],k&&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":Wa,type:"button"}),s("div",{className:fe.AnnouncementActionButtons,children:[s("button",{id:IB,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":Wa,type:"button",children:s(Re,{type:l?"chevron-up":"chevron-down",size:"base"})}),s("button",{className:fe.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":Xp,"aria-expanded":a,"aria-label":c.translate("thank_you.announcement.close"),type:"button",children:s(Re,{type:"x",size:"base"})})]}),s("div",{id:Wa,className:fe.AnnouncementContent,ref:m,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function TB(){const e=Fe(),t=cu(),n=nv(),r=LB(),[o,i]=ie(!1),[a,l]=ie(!1),c=M(({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=M(()=>{n.emit("announcementAfterCollapsed")},[n]),d=M(()=>{n.emit("announcementAfterExpanded")},[n]),p=M(()=>{i(!0),r("announcementExpanded"),n.emit("announcementExpanded")},[r,n]),m=M(()=>{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)},kB);return()=>clearTimeout(f)},[e.announcement.visibility]),{open:a,expanded:o,onAfterCollapse:u,onAfterExpand:d,onClose:c,onExpand:p,onCollapse:m}}function Qp(){}function L_(){const{environment:{hasTYPAnnouncementExtensions:e}}=Fe();return wB(e)()}function wB(e){return e!==void 0?()=>[]:()=>{const n=it("purchase.thank-you.announcement.render");return ph(n,"uiExtension").map(vl)}}function LB(){const{environment:{hasTYPAnnouncementExtensions:e}}=Fe();return xB(e)()}function xB(e){return e!==void 0?()=>Qp:()=>{const t=L_(),n=Ln();if(t.length===0)return Qp;const r=t[0];return o=>n?.("extensionUiInteraction",{interaction:o,section:"extension",timestamp:new Date,extension:r,componentType:"Announcement",componentInstanceId:r.id})}}const RB="Vytfl",MB="F3Ebx",NB="qdIKq",DB="OcTba",OB="LCUka",FB="LRXpG",Kr={CheckoutExitBackdrop:RB,CheckoutExitContent:MB,CheckoutExitFooter:NB,CheckoutExitOrderSummary:DB,CheckoutExitOrderSummaryBackgroun
23d:OB,CheckoutExitHeader:FB},BB="szW4X",VB="sMSRq",UB="_3Ebqn",zB="F6Nrx",HB="j1xD4",qB="RDtb7",GB="ZXaI9",WB="sEWAT",$B="DTABr",YB="kBVzA",jB="qgQOk",KB="SBffw",gr={ThankYouInterstitialShell:BB,ThankYouInterstitialOverlay:VB,ThankYouInterstitialHeader:UB,ThankYouEntranceDisclosure:zB,ThankYouEntranceOrderSummary:HB,ThankYouEntranceFooter:qB,ThankYouEntrance:GB,ThankYouEntranceStatus:WB,ThankYouEntranceHeading:$B,ThankYouEntranceCards:YB,ThankYouEntranceActions:jB,ThankYouEntranceBeat:KB},At={none:"0",...Jn.spacing},JB={base:"solid",dashed:"dashed",dotted:"dotted"},x_="disclosure_details";function Eu({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=x_,isDisclosureInteractive:m=!0,mainContentId:f=A_}){const h=Fe(),{checkout:{configuration:g,checkoutExit:y},embed:_,router:P}=b(),v=g.visibility.showAside,E=!!_?.isFlagshipPartner,k=Ft(_?.embedder),S=k&&g.isUniversalCheckoutFinalizer&&P.currentUrl.value.normalizedPath==="/thank-you",I=it("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,C=k&&I,w=E&&h.header.divided===!1,A=h.header.position??"inline",T=Js(),L=Su(),{open:N,expanded:D,onAfterCollapse:O,onAfterExpand:B,onClose:z,onExpand:R,onCollapse:$}=TB(),j=i?s(zi,{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[Wt("Config-Header-position",A)],h.footer.position&&fe[Wt("Config-Footer-position",h.footer.position)],h.environment.isOnePageCheckout&&fe["Shell-variantOnePageCheckout"],k&&fe["Shell-embeddedUc"],S&&fe["Shell-embeddedUcMainPadding"],C&&fe["Shell-embeddedUcHasOrderSummary4Extensions"],u&&fe[Wt("Shell-blockSize",u)],d&&fe["Shell-minMobileViewportSize"],Et(t)&&fe["Shell-hasAnnouncement"],N&&fe["Shell-announcementOpen"]),style:{...nV("content",h.content),...oV("content",h.content),...wr("main",h.main),...bo("main",h.main),...wr("order-summary",h.orderSummary),...bo("order-summary",h.orderSummary),...tm("order-summary",h.orderSummary),...wr("header",h.header),...tm("header",{backgroundImage:h.header.banner?.image}),...bo("header",h.header),...w?hV:{},...wr("footer",h.footer),...bo("footer",h.footer),...iV("footer",h.footer),...wr("buyer-journey",h.buyerJourney),...bo("buyer-journey",h.buyerJourney),...wr("announcement",h.announcement)},children:[s(XB,{}),e?s("div",{className:fe.Banner,children:e}):null,t?s(AB,{open:N,expanded:D,onAfterExpand:B,onAfterCollapse:O,onClose:z,onExpand:R,onCollapse:$,children:t}):null,s($a,{position:"start",children:[n,h.buyerJourney.position==="header"&&s(Ri,{children:r})]}),s(QB,{id:p,isInteractive:m,details:j,children:o}),s(ZB,{children:[s(eV,{children:[s($a,{position:"inline",children:[n,h.buyerJourney.position==="header"&&s(Ri,{children:r})]}),s(Zp,{children:[h.buyerJourney.position==="inline"&&s(Ri,{children:r}),s(zi,{style:h.main.section,children:s("main",{className:Y(fe.MainContentPrimary,T&&Kr.CheckoutExitContent),id:f,children:l})}),h.footer.position==="inline"&&s(em,{children:a})]})]}),s(tV,{children:[s($a,{position:"inlineSecondary",children:[n,h.buyerJourney.position==="header"&&s(Ri,{children:r})]}),s(Zp,{children:s(zi,{style:h.orderSummary.section,children:s("aside",{className:Y(fe.OrderSummaryContentPrimary,T&&Kr.CheckoutExitOrderSummary,L.value&&gr.ThankYouEntranceOrderSummary),children:s(Ks,{section:"summary",children:s(vi,{section:"summary",children:c})})})})})]})]}),h.footer.position==="end"&&s(em,{children:a})]})}function XB(){const{checkout:e}=b(),{main:{colorScheme:t="scheme1",background:n}={}}=Fe();return e.checkoutExit.isExiting.value?s("div",{className:Y(Kr.CheckoutExitBackdrop,bt({colorLayer:"base",colorScheme:t,backgroundColor:n==="subdued"?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function $a({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=ZF(),d=Js();if(!Et(e))return null;const p=l??c==="start";return s("header",{className:Y(fe.Header,gr.ThankYouInterstitialHeader,fe[Wt("Header-position",c)],fe[Wt("Header-container",r)],p&&fe["Header-divided"],i?.image&&fe["Header-hasBackgroun
23dImage"],u.value&&fe["Header-thankYouCovered"],d&&c==="inlineSecondary"&&Kr.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(sn,{children:s(Ks,{section:"header",children:s(vi,{section:"header",children:e})})})})})}function Ri({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=Fe();return!Et(e)||r==="hidden"?null:s("div",{className:Y(fe.BuyerJourney,fe[Wt("BuyerJourney-position",t)],fe[Wt("BuyerJourney-container",n)]),children:s("div",{className:fe.BuyerJourneyContent,children:e})})}function QB({children:e,details:t,id:n=x_,isInteractive:r}){const{content:{divider:{visibility:o="visible"}={}},orderSummary:{background:i,backgroundImage:a,colorScheme:l}={},main:{colorScheme:c="scheme1"},environment:{isCheckoutEditor:u},disclosure:{visibility:d}}=Fe(),p=St(),m=Su(),{checkout:f}=b(),h=aV(),{expanded:g,narrowedToInformationStep:y}=cV(),{open:_,setOpen:P}=w_(),v=_.value||h&&u,[E,k]=ie(),S=U(!1);F(()=>{k(S.current&&!g?"none":void 0),P(g)},[g,P]),F(()=>{S.current=y}),F(()=>{v&&P(!0)},[v,h,P]);const I=()=>{k(void 0),P(!_.peek())},C=Cu();if(!Et(e)||f.checkoutExit.isExiting.value||d==="hidden"||d==="hidden-only-checkout"&&!C)return null;const w=a?{backgroundImage:`url(${JSON.stringify(a)})`}:void 0,A=r?_.value:!0,T=!!t&&(p.value||A);return s("aside",{className:Y(fe.Disclosure,o==="visible"&&fe["Disclosure-divided"],bt({colorLayer:"base",colorScheme:c,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:s(Ks,{section:"top_summary",children:s(vi,{section:"top_summary",children:[r?s(Tn,{className:Y(fe.DisclosureButton,m.value&&gr.ThankYouEntranceDisclosure),background:"transparent",onClick:I,"aria-controls":n,"aria-expanded":A,inlineSize:"100%","data-event-name":A?"order_summary_hide":"order_summary_show",children:e}):s("div",{className:Y(fe.DisclosureButton,m.value&&gr.ThankYouEntranceDisclosure),children:e}),T&&s(hn,{open:A,id:n,duration:E,children:s("div",{className:Y(fe.DisclosureDetails,m.value&&gr.ThankYouEntranceDisclosure,bt({colorLayer:"base",colorScheme:l,backgroundColor:i==="subdued"?"subdued":"baseSpecified"})),style:w,children:s("div",{className:fe.DisclosureDetailsContent,children:s(sn,{children:s(sV,{children:t})})})})})]})})})}function ZB({children:e}){const{content:{container:t="fill"}={}}=Fe();return Et(e)?s("div",{className:Y(fe.Content,fe[Wt("Content-container",t)]),children:e}):null}function Zp({children:e}){const{checkout:t}=b();return t.checkoutExit.isExiting.value?null:s(G,{children:e})}function eV({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:r,backgroundImage:o}={},content:{divider:{visibility:i="visible"}={}}}=Fe(),a=V(()=>({current:t}),[t]);if(!Et(e))return null;const l=o?{backgroundImage:`url(${JSON.stringify(o)})`}:void 0;return s("div",{className:Y(fe.Main,n==="fill"&&fe["Main-inlineSizeFill"],i==="visible"&&fe["Main-divided"],bt({colorLayer:"base",colorScheme:t,backgroundColor:r==="subdued"?"subdued":"baseSpecified"})),style:l,children:s("div",{className:fe.MainContent,children:s(As.Provider,{value:a,children:s(sn,{children:e})})})})}function tV({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:r,backgroundImage:o}={}}=Fe(),i=V(()=>({current:t}),[t]),a=Js();if(!Et(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&&Kr.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(As.Provider,{value:i,children:s(sn,{children:e})})})})}function em({children:e}
23){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:o,divided:i}={}}=Fe(),{checkout:a}=b(),l=Js(),c=Su();if(a.checkoutExit.isExiting.value||!Et(e))return null;const d=i??t==="end";return s("footer",{className:Y(fe.Footer,fe[Wt("Footer-position",t)],fe[Wt("Footer-container",n)],d&&fe["Footer-divided"],l&&Kr.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(sn,{children:s(vi,{section:"footer",children:e})})})})}function _t(e){return t=>t?e[t]:void 0}function nV(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:_t(JB)(t)}}const rV={none:"0px",...Jn.borderWidth};function oV(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:_t(rV)(t)}}function wr(e,{inlineSize:t}={}){if(!isNaN(Number(t))&&Number(t)!==0)return{[`--config-${e}-inline-size`]:ds(Number(t))};if(!(e==="main"||e==="order-summary")&&t==="fill")return{[`--config-${e}-inline-size`]:"100%"}}function bo(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(At)(n[0]),[`--config-${e}-padding-inline-end`]:_t(At)(n[1]),[`--config-${e}-padding-block-end`]:_t(At)(n[2]),[`--config-${e}-padding-inline-start`]:_t(At)(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(At)(t),[`--config-${e}-padding-inline-end`]:_t(At)(t),[`--config-${e}-padding-block-end`]:_t(At)(t),[`--config-${e}-padding-inline-start`]:_t(At)(t),[`--config-${e}-padding`]:_t(At)(t)}}function tm(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function iV(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:_t(At)(t)}}function sV({children:e}){const{environment:{isOnePageCheckout:t}}=Fe(),n=Cu();return t&&!n?s(qF,{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 aV(){const{environment:{hasOrderSummaryExtensions:e}}=Fe();return lV(e)()}function lV(e){return e!==void 0?()=>e:()=>I_("top").length>0}function cV(){const{environment:{shouldExpandOrderSummary:e}}=Fe(),t=QF()===dh.Treatment;return uV(t,e)()}function uV(e,t){return t!==void 0?()=>({expanded:t,narrowedToInformationStep:!1}):()=>{const n=dV(),r=pV(),o=mV();return e&&r&&!n.value&&o.value!==void 0?{expanded:o.value,narrowedToInformationStep:!0}:{expanded:n.value||r,narrowedToInformationStep:!1}}}function dV(){const e=Ye(I_("top"));return x(()=>e.value.some(t=>{if(t.kind==="customField")return vl(t).required.value;const n=vl(t),r=n.behaviors.value;return r.blockProgress&&n.capabilities.blockProgress||r.alwaysReveal}))}function pV(){const{orderSummary:{defaultState:e}={}}=Fe(),{checkout:{configuration:{layout:{isOnePage:t}}}}=b();return!t.value&&e==="EXPANDED"}function mV(){const e=Pe();return x(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!(n||!t))return t.id==="information"})}function Cu(){const{environment:{hasDetour:e}}=Fe();return fV(e)()}function fV(e){return e!==void 0?()=>e:()=>{const{currentDetour:t}=Pe().value;return!!t}}function Js(){const e=Ns(),t=Cu();return e&&!t}const hV={"--x-shell-header-padding":`${_t(At)("large100")} ${_t(At)("large200")} ${_t(At)("none")} ${_t(At)("large200")}`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${_t(At)("large100")}) var(--config-main-padding-inline-end, ${_t(At)("large200")}) var(--config-main-padding-block-end, ${_t(At)("large200")}) var(--config-main-padding-inline-start, ${_t(At)("large200")})`},gV={small:"10ch",base:"20ch",large:"30ch",full:"100%"},yV={base:"12px"},vV="Shopify.checkout.partnerInterstitialMinimumVisibleDuration";function _V(e){return gV[e]}const bV="A5qhV",PV="_4KRKW",nm={overlay:bV,backgroundOverlay:PV},SV=Xe("wallet-transition-disclosure-"),EV=Xe("wallet-transition-main-content-");function CV({layer:e="foreground"}={}){const{embed:t,i18n:n}=b(),r=!t,o=$e(void 0,SV),i=$e(void 0,EV),a=s("div",{className:`${nm.overlay} ${e==="background"?nm.backgroundOverlay:""}`,role:"status","aria-label":n.translate("general.loading"),style:vn({[Jn.global.borderRadius]:yV.base}),children:s(Pu,{children:s(Eu,{mainContentId:i,disclosureId:o,isDisclosureInteractive:!1,header:r?s(kV,{}):void 0,disclosure:s(AV,{}),main:s(IV,{}),orderSummary:s(TV,{})})})});return s(Pr,{children:a})}function kV(){const{header:{alignment:e="start",logo:t}={}}=Fe(),{shop:n}=b(),r=t?.image?s(v_,{width:t.maxWidth}):s(Yt,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});
23return s(gt,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function kn({inlineSize:e="base",size:t="small"}){return s(vu,{size:t,inlineSize:e})}function rm(){return s(W,{type:"small",children:s(Xo,{inlineSize:_V("full")})})}function Ya(){return s(Z,{rowGap:"base",children:[s(kn,{size:"large",inlineSize:"small"}),s(Z,{rowGap:"small-300",children:[s(rm,{}),s(rm,{})]})]})}function IV(){return s(Z,{rowGap:"large-200",children:[s(Ya,{}),s(jr,{}),s(Ya,{}),s(jr,{}),s(Ya,{})]})}function AV(){return s(Z,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[s(kn,{inlineSize:"base"}),s(kn,{size:"large",inlineSize:"small"})]})}function TV(){const{i18n:e}=b(),{merchandiseThumbnail:t,global:n}=ct(),r=t.cornerRadius??n.cornerRadius??"base",o=r==="fullyRounded"?"large":r,i=`${yi("base").inlineSize}px`;return s(Z,{rowGap:"large-200",children:[s(W,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),s(gt,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[s(_e,{borderRadius:o,overflow:"hidden",children:s(Xo,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),s(Z,{rowGap:"small-500",children:[s(kn,{inlineSize:"base"}),s(kn,{inlineSize:"small"})]}),s(kn,{inlineSize:"small"})]}),s(wV,{})]})}function wV(){return s(Z,{rowGap:"small-100",children:[[0,1,2].map(e=>s(Z,{direction:"inline",justifyContent:"space-between",children:[s(kn,{inlineSize:"small"}),s(kn,{inlineSize:"small"})]},e)),s(Z,{direction:"inline",justifyContent:"space-between",children:[s(kn,{size:"large",inlineSize:"small"}),s(kn,{size:"large",inlineSize:"small"})]})]})}function LV(){const{shop:e,checkout:t,observability:n}=b(),r=_F().value,o=!!t.wallets.isDeceleratingSignal?.value,i=t.isCheckoutLayoutForcedToOnePage.value,a=o_(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=$s(),u=!!(l||a&&c),d=e.hasFlagEnabled(ch),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(CV,{})}const No=Ge({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>ut(()=>Ve(()=>import("./ReviewBlock.BlPknifv.js"),__vite__mapDeps([90,1,2,3,4,5,91,22,23,20,21,24,92,93,94,6,44,45,46,43,47,48,26,27,56,42,95,96,97,98,99,100,101,102,103,104,105,28,29,106,107,7,8])))});function xV(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:o},url:i}=b(),a=r.current.value==="shopPay",l=parseInt(Be(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({shop:e,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,e,t,n])}const Hi=Ge({suspenseName:"information",displayName:"Information",load:()=>ut(()=>Ve(()=>import("./page-Information.C7jSY47R.js"),__vite__mapDeps([108,1,93,94,92,2,3,4,5,6,44,45,46,43,47,48,26,27,56,42,22,23,20,21,24,95,109,110,111,112,113,114,115,84,49,116,117,41,118,12,119,120,121,122,70,123,124,73,104,125,126,127,7,128,129,8])))}),RV=Ge({displayName:"NoAddressLocation",load:()=>ut(()=>Ve(async()=>{const{noAddressLocationPages:e}=await import("./page-lazyNoAddressLocation.Dd1Wzoge.js");return{noAddressLocationPages:e}},__vite__mapDeps([130,1,131,2,3,4,5,121,122,132,6,7,8,133])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),MV=Ge({displayName:"NoAddressLocationFullDetour",load:()=>ut(()=>Ve(async()=>{const{noAddressLocationPages:e}=await import("./page-lazyNoAddressLocation.Dd1Wzoge.js");return{noAddressLocationPages:e}},__vite__mapDeps([130,1,131,2,3,4,5,121,122,132,6,7,8,133])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),NV=Ge({displayName:"NotFound",load:()=>Ve(()=>Promise.resolve().then(()=>M7),void 0)}
23),om=Ge({displayName:"OffsitePaymentFailed",load:()=>Ve(()=>import("./OffsitePaymentFailed.DzjWrdFl.js").then(e=>e.O),__vite__mapDeps([131,1,2,3,4,5,121,122,132]))}),R_=Ge({suspenseName:"one-page",displayName:"OnePage",load:()=>Ve(()=>import("./OnePage.CMKEepyV.js").then(e=>e.p),__vite__mapDeps([134,3,1,4,2,5,114,93,94,115,84,49,42,116,117,41,118,92,6,44,45,46,43,47,48,26,27,56,22,23,20,21,24,95,12,119,120,121,122,70,123,124,73,104,125,126,127,7,128,129,135,32,33,82,80,78,74,8,136,137,28,29,105,106,107,138,79,139,51,85,77,140,141,83,142,143,144,111,112,145,57,96,97,98,99,100,101,146,147,148,149,36,150,151,152,153,154,66,155]))}),im=Ge({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>ut(()=>Ve(()=>import("./page-OnePageReview.ujKlZL0H.js"),__vite__mapDeps([156,1,2,3,4,5,109,110,111,112,113,157,125,126,116,39,40,6,7,8,158,105,23,93,94,28,29,106,107,135,32,33,120,121,122,84,82,80,78,115,49,42,117,74,136,102,96,97,98,99,100,101,103,159,140,141,160,70,161,62,119,57,139,51,12,162,143,144,104,47])))});class RY extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class DV extends Error{constructor(t,n){super(t,n),this.name="CardFieldsLoadError",this.diagnostics=n?.diagnostics}}class MY extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class ja extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class OV extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}
23class FV extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class NY extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class DY 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 ld=class ld extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};ld.hostedFieldsName="CardFieldsError";let sm=ld;function BV({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 FV);i()},0)},t&&(l.integrity=t),l.crossOrigin="anonymous",l.onerror=c=>{let u;c instanceof Event?u=new ja(`Event type: ${c.type}. ${Mi(e)}`):typeof c=="string"?u=new ja(`String error: ${c}. ${Mi(e)}`):u=new ja(`unknown error type. ${Mi(e)}`),document.head.removeChild(l),a(u)};try{document.head.appendChild(l)}catch(c){a(new OV("Failed to append child.",{cause:c}))}})}return(n?ut(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 DV(`Failed to load CardFields SDK. ${Mi(e)}`,{cause:i,diagnostics:a})})}function Mi(e){const t=typeof navigator>"u"?"navigator not available":navigator.onLine;return`Script src: ${e} . Internet connection boolean: ${t}`}function VV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ka,am;function UV(){return am||(am=1,Ka={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}),Ka}var zV=UV();const lm=VV(zV);function HV(){const{environment:e}=b(),t=e.services.hostedFields.url;return t===lm.SDK_URL?{source:t,integrity:lm.SDK_INTEGRITY}:{source:t}}function qV(){const e=HV();return()=>{BV(e)}}const Ml=Ge({suspenseName:"payment",displayName:"Payment",load:()=>ut(()=>Ve(()=>import("./page-Payment.ByzDQbYX.js"),__vite__mapDeps([163,1,137,3,4,2,5,45,28,29,105,23,93,94,106,107,123,22,20,21,24,124,138,8,79,80,139,51,85,77,140,78,141,83,26,27,142,164,118,92,6,44,46,43,47,48,56,42,95,165,143,144,12,82,112,166,49,167,91,109,110,111,113,121,122,160,120,70,161,168,169,170,7]))),usePrefetch(){const e=qV();return M(()=>{e()},[e])}}),cm=Ge({displayName:"PostPurchase",load:()=>Ve(()=>import("./page-PostPurchase.D_qVlc77.js"),__vite__mapDeps([171,1,2,3,4,5,121,122,44,45,46,172,173,52,7,12,26,27,14,68,59,64,6,8,174]))}),M_=Ge({displayName:"Processing",load:()=>ut(()=>Ve(()=>import("./page-Processing.DalNosDX.js"),__vite__mapDeps([175,1,2,3,4,5,121,122,6,7,8,176])))}),Nl=Ge({suspenseName:"review",displayName:"Review",load:()=>ut(()=>Ve(()=>import("./page-Review.DFVDi_i8.js"),__vite__mapDeps([177,1,2,3,4,5,109,110,111,112,113,121,122,160,120,82,80,70,161,104,6,7,8])))}),Dl=Ge({suspenseName:"shipping",displayName:"Shipping",load:()=>ut(()=>Ve(()=>import("./page-Shipping.SLU6t2UO.js"),__vite__mapDeps([178,1,125,126,146,22,23,2,3,4,5,20,21,24,123,93,94,124,128,147,148,97,98,99,149,36,43,44,45,46,47,48,150,151,152,153,121,122,6,7,8])))}),N_=Ge({displayName:"ShopPayLoginLoader",load:()=>Ve(()=>import("./page-ShopPayLoginLoader.DPbVXbN0.js"),__vite__mapDeps([179,1,2,3,4,5,180,66,85,77,157,125,126,116,39,40,6,7,8,158,143,144,23,98,121,122,181]))}),D_=Ge({displayName:"StockProblems",load:()=>ut(()=>Ve(()=>import("./page-StockProblems.CzS0HUCC.js"),__vite__mapDeps([182,1,131,2,3,4,5,121,122,132,183,184,6,7,8])))}),GV=Ge({displayName:"StockProblemsModal",load:()=>ut(()=>Ve(()=>import("./page-StockProblemsModal.BKU5MMGm.js"),__vite__mapDeps([185,1,2,3,4,5,184,183,121,122,154,6,7,8])))});function O_(e){return function(n){const{observability:r}=b();F(()=>
23{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 WV=O_("ThankYou");function $V(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=b(),o=eo(),i=o?.id,a=o?.orderStatusPageUrl,l=t.unstable_getSerialization("sessionToken"),c=U(!1);WV(e),Rt(()=>{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<bv;){if(await hf(Fi),p)return;let f;try{const{data:h}=await r.staticQuery(_v,{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=Ge({suspenseName:"thank-you",displayName:"ThankYou",useError:$V,load:()=>ut(()=>Ve(()=>import("./page-ThankYou.B6ERrHHV.js"),__vite__mapDeps([186,1,2,3,4,5,49,42,35,121,122,104,100,97,98,99,148,28,29,18,19,20,21,43,44,45,46,47,48,115,84,116,117,187,53,106,188,189,190,131,132,26,27,12,191,192,193,194,147,7,125,126,6,8,195])),{maxAttempts:1})}),Ol=Ge({displayName:"Throttle",load:()=>ut(()=>Ve(()=>import("./page-Throttle.ldmDh_C-.js"),__vite__mapDeps([196,1,104,2,3,4,5,121,122,60,6,7,8,197])))});var qt={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 Ke({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:vn({[qt.lineClampCount]:String(_)}),v=(l===!0?"yes":void 0)??(l===!1?"no":void 0),E=e==="exclusive"?qt.accessibilityVisibilityVariant[e]:Y(qt.Paragraph,m!=="small"&&r&&qt.sizeVariant[r],f&&qt.toneVariant[f],n&&(f==="auto"||f==="neutral")&&qt.colorVariant[n],i&&i!=="auto"&&qt.textAlignVariant[i],a&&a!=="wrap"&&qt.textWrapVariant[a],c&&qt.kerningVariant[c],u&&qt.letterCaseVariant[u],d&&qt.fontsVariant[d],p&&qt.decorationVariant[p],_!=null&&qt.lineClamp,qt.typeVariant[m],{notranslate:l===!1});return s(Gr.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})})}
23function YV({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:o}){return!e&&!t||(!!n||!!r)||o}function jV(e){const t=e?.filter(({quantity:n})=>n>0)??[];return t.length>0&&t.every(({requiresShipping:n})=>!n)}function KV({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const F_=mt("VaultedSectionsContext");function fo(){const e=Se(F_);return x(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function JV(){const e=fo();return x(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function OY(){const e=fo(),{checkout:t,embed:n,shop:r,source:o}=b(),{validation:{contactErrors:{emailInputError:i,phoneInputError:a}}}=t,{current:l}=t.identity,{hasViolations:c}=mi(pc),u=Fe(),d=ct(),p=Ye(u.main.section),m=Ye(d.vaulted),f=Ye(c),h=U(!1);return x(()=>{const g=Td(p.value),y=Td(m.value),{contact:_,delivery:P,payment:v}=e.value,E=rk({isContactVaulted:_,configuration:t.configuration,identity:t.identity,embed:n,shop:r}),k=(()=>{if(l.value!=="sdkCartHints")return h.current=!1,E;if(!E)return h.current=!1,!1;const w=t.proposal.negotiated.fields.merchandiseLines.value?.lines;return KV({isFlagshipPartner:n?.isFlagshipPartner??!1,hasError:YV({email:t.proposal.proposed.email.value,phone:t.proposal.proposed.phone.value,emailInputError:i.value,phoneInputError:a.value,hasViolations:f.value}),hasOnlyDigitalItems:jV(w)})?h.current:(h.current=!0,!0)})(),S=!nt(o)&&ok({checkout:t}),I=P&&t.isShippingRequired.value;return k||I||v||S?g||y:!1})}function XV(e){return Object.entries(e).some(([t,n])=>{const r=t;return r!=="countryCode"&&r!=="zoneCode"&&tc(r)&&n!=null&&(typeof n!="string"||n.trim().length>0)})}function QV(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 B_(){const{embed:e,shop:t,checkout:n,router:r,i18n:o}=b(),i=e?.interstitialPartnerDisplayName,{plan:a}=Pe().value,l=r.currentUrl.value.normalizedPath,c=ac({embedder:e?.embedder,shop:t}),u=fo(),{delegatedPaymentInstrument:d}=Mt(),p=Te(!1);Rt(()=>{p.value=!!d.peek()},[d,p]);const[m]=ie(()=>{const y=n.proposal.proposed;return{contact:!!(y.email.peek()||y.phone.peek()),delivery:XV(y.shippingAddress.peek())}});if(!QV(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(Re,{type:"info"}),s(Ke,{textWrap:"pretty",children:o.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]})}const V_=Ge({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>Ve(()=>import("./AnnouncementRuntimeExtensions.B8nUY-TG.js").then(e=>e.A),__vite__mapDeps([15,1,2,3,4,5,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,14,35,36,37,38,7,39,40,41,42,43,44,45,46,47,48,49,50]))});function U_(){const t=it("purchase.thank-you.announcement.render");return V(()=>{const n=ph(t,"uiExtension");return n.length>0?[n[0]]:[]},[t])}const ZV=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,eU=/Version\/(\d+)[\d.]*.*Safari/,tU=/Chrome\/|Edg(?:e|iOS|A)?\//,nU=/FBAN|FB_IAB|FBAV|Instagram/;function rU(e){const t=navigator.userAgent.match(ZV);return t?t[1]===e:!1}function oU(e){const t=navigator.userAgent;if(tU.test(t))return!1;const n=t.match(eU);return n?parseInt(n[1],10)===e:!1}function FY(){return nU.test(navigator.userAgent)}const iU=0,z_=1,sU=2,H_=3,aU=4,ku=5,Iu=new Map([["legacy",iU],["block",z_],["inline",sU],["grid",H_],["list",aU],["grid-compact",ku]]);function um(e,t){return Iu.get(e)===t}function BY(e){const t=Iu.get(e);return t===H_||t===ku}function VY(e){return typeof e=="string"&&Iu.has(e)}const q_=qe(null);q_.displayName="ChoiceListContext";function UY(){return Se(q_)}const G_=qe(null);G_.displayName="ChoiceListStyleContext";function lU(){return Se(G_)||{}}function zY(){return lU().redesigned??!1}const Au=qe(void 0);Au.displayName="ChoiceListPresentationOverrideContext";function cU(){return Se(Au)}function uU(e){return um(e,z_)||um(e,ku)}function HY(e){const t=nw(),n=cU();return t&&n!=="base"&&uU(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 dm=-1;function dU(e){if(!e||typeof window>"u")return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}const pU=Xe("Modal");function wn(e){const t=$e(e.id,pU),n=XT("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(pm,{...e,id:t,onHide:i,open:r,children:Et(a)&&s(Ic,{children:a})})}return s(pm,{...e,id:t})}const mU={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960};function fU(e){return e.endsWith("px")}const pm=Ig(Tw(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:k="visible",dataTestIdForScrollableContent:S,...I}){const C=U(null),w=U(null),A=U(!1),T=JT();F(()=>{if(!(!o||!T))return T.value+=1,()=>{T.value=Math.max(0,T.value-1)}},[o,T]),o&&w.current!==o&&typeof E=="function"&&E(),w.current=o;const{modal:{margin:L}}=ct(),N=L!=null&&L!=="none",D=k==="hidden",{onHide:O,onAfterHide:B}=t?{}:I,[z,R]=ie(),$=!r&&dU(a),j=r??($||z===dm||n==="max"?"100%":void 0),ee=fU(n)?n:`${mU[n]}px`,{className:ae,style:K,styleElement:Q}=Tt({blockSize:j,maxInlineSize:`@media (inline-size >= extraSmall) ${ee}, none`}),X=nn(o,"slow"),[H,ue]=ie("");F(()=>{ue(ot.transitionVariant[X])},[X]);const{isLocked:re,lock:le,unlock:de}=ou();F(()=>{o&&!re&&le(),!o&&re&&de()},[re,le,o,de]),F(()=>{if(X==="exited"&&(R(void 0),A.current&&(typeof B=="function"&&B(),A.current=!1)),X==="entered"){if(P&&oU(26)){const Ie=document.getElementById(P),J=document.activeElement,ne=J instanceof HTMLElement&&Ie?.contains(J)===!0&&J.matches('input, textarea, select, [contenteditable="true"]');Ie&&!ne&&Ie.focus()}typeof v=="function"&&v()}},[X,v,B,P]),F(()=>{o||(A.current=!0)},[o]),F(()=>{const Ie=J=>{(J.key==="Escape"||J.key==="Esc")&&!t&&o&&(C.current?.contains(document.activeElement)||!document.getElementById(to)?.contains(document.activeElement))&&typeof O=="function"&&O()};return document.addEventListener("keydown",Ie,!1),()=>{document.removeEventListener("keydown",Ie,!1)}},[t,o,O]);const ke=M(Ie=>{if(!r&&!$){const J=Ie.target;if(J?.contentWindow)try{R(J.contentWindow.document.body.scrollHeight)}catch{R(dm)}}c?.()},[r,c,$]),he=M(Ie=>{Ie.target===Ie.currentTarget&&typeof O=="function"&&O()},[O]);if(X==="exited")return null;const ve=i&&!p?Ag(P):void 0,Ee=!!(f||h),De=rU("26");return s(Pr,{children:s(Au.Provider,{value:void 0,children:[Q,s("div",{ref:C,className:Y(ot.Overlay,H,ot.overlayPaddingVariant[r==="100%"?"none":"base"],De&&ot.overlayMobileSafari26),onMouseDown:he,children:s(ru,{children:s("div",{id:P,className:Y(ot.Modal,ot.modalTopRadiusVariant[r==="100%"?"square":"rounded"],ot.modalMobileMarginVariant[N?"base":"none"],H,ae,j&&ot.hasBlockSize),role:"dialog","aria-modal":!0,style:K,"aria-label":p,"aria-labelledby":ve,children:[a?s(G,{children:s(sn,{level:2,children:[s(mm,{id:P,hideCloseButton:D||t,onHide:O,heading:i}),s(vU,{source:a,iframeRef:l,iframeId:u,allow:d,accessibilityLabel:p,heading:i,iframeHeight:z,blockSize:r,handleIFrameLoad:ke,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(sn,{level:2,children:[s(mm,{id:P,hideCloseButton:D||t,onHide:O,padding:m,heading:i}),s(yU,{padding:m,children:_})]}),Ee&&s("div",{className:ot.ActionsScrollShadow})]}),y&&s("div",{className:ot.Footer,children:s(ks.Provider,{value:!1,children:s(Ic,{children:y})})}),Ee&&s(hU,{primaryAction:f,secondaryActions:h,actionLayout:g})]})})}),De&&s(G,{children:[s("div",{className:Y(ot.MobileSafari26BarTop,H)}),s("div",{className:Y(ot.MobileSafari26BarBottom,H)})]})]})})},{overlayType:"modal"}));function mm({hideCloseButton:e,id:t,onHide:n,padding:r,heading:o}){const i=typeof o=="string"?s(Yt,{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:Ag(t),className:Y(ot.HeaderContent,ot.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&s(gU,{onHide:n})]})}function hU({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return s(Ic,{children:s("div",{className:Y(ot.Actions,ot.actionLayoutVariant[n]),children:[(n==="inline"||Et(t))&&s("div",{className:Y(ot.SecondaryActions,ot.secondaryActionLayoutVariant[n]),children:t}),e]})})}function gU({onHide:e}){const t=ln();return s("button",{type:"button",className:ot.CloseButton,onClick:()=>{typeof e=="function"&&e()},"aria-label":t("closeModal")||"Close",children:s(Re,{type:"x",size:"base"})})}function yU({children:e,padding:t="base"}){return Et(e)&&s("div",{className:Y(ot.Content,ot.contentPaddingVariant[t]),children:s(ks.Provider,{value:!1,children:s(__,{children:e})})})}function vU({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 _U({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(an,{variant:"secondary",inlineSize:"fill",onClick:a,children:n}),c&&s(an,{variant:"primary",inlineSize:"fill",disabled:o,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const Fl=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];function bU({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:Fl}}return a?.status==="filled"?void 0:{nextMethods:[...n.find(d=>JSON.stringify(d)===JSON.stringify(l))??c],loadingFields:Fl}}var xr=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(xr||{});const Tu=mt("DeliveryMethodsContext"),W_=qe(void 0);function $_(){return Ht(Tu)}function PU(){return Se(W_)}function _i(e){const t=Se(Tu),n=Fl.includes(e);return x(()=>n&&(t?.initialReconciliationPending.value??!1))}function Ja(e){return e/ik}function qY(){const{i18n:e}=b();return M(t=>{if(typeof t=="number"){const a=Math.ceil(Ja(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(Ja(n)),i=Math.ceil(Ja(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 GY(){const e=q().deliveryNext,t=er();return x(()=>{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 WY(){const{deliveryNext:e,allViolations:t}=q(),n=He("deliveryNext");return x(()=>{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 $Y(){const{allViolations:e}=q(),t=He("deliveryNext");return x(()=>{const n=t.value;return n?{value:null,loading:n}:{value:e.value?.some(({code:o})=>ak.has(o))??!1,loading:!1}})}function SU(){const e=q().deliveryNext;return x(()=>zr(e.value))}function YY(){const{deliveryLines:e}=se();return x(()=>{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 EU(e){return(e??[]).filter(t=>t.requiresShipping).reduce((t,n)=>t+(n.quantity??0),0)}function jY(){const e=mc();return x(()=>{const t=e.value;if(!t)return{};const n={};for(const r of t){if(r.status!=="available")continue;const o=Xr(r);if(!o)continue;const{methodType:i}=o,a=EU(r.targetMerchandiseLines);n[i]=(n[i]??0)+a}return n})}const CU="cross-border-consolidation-modal";function kU(){const{checkout:e,i18n:t}=b(),n=$_(),r=e.crossBorderConfirmState.value,o=!!(r&&!r.onCancel),i=$c(),a=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return s(wn,{id:CU,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(_U,{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(W,{children:t.translate("split_delivery.cross_border.modal.content")})})}function fm(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 Y_(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 IU(e){return(e.value.targetMerchandiseLines??[]).some(t=>t.requiresShipping)}function AU(e){const t=e.filter(IU);return Y_(e.map(n=>n.value.deliveryMethodTypes))&&t.some(n=>n.value.deliveryMethodTypes.includes("SHIPPING"))&&t.some(n=>n.value.deliveryMethodTypes.includes("PICK_UP"))}function TU({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const o=Y_(ti(e).filter(a=>a.status==="available").map(a=>a.methods.map(({methodType:l})=>l)));return t?o:!(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)?!1:AU(n)}function wu(){const{deliveryNext:e}=q(),t=se(),{shop:n}
23=b(),r=Pe();return x(()=>TU({deliveryNext:e.value,isThankYouPage:Vs(r.value.currentDetour),proposedDeliveryLines:t.deliveryLines.value,splitShipPickupUiEnabled:n.shipPickupInOneOrderEnabled}))}function qi(e){const t=U(e);return F(()=>{t.current=e},[e]),t}const wU=()=>{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}=$_(),c=mh();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(Be(t),10),numberLocationsFound:c.value?.methods.length,userId:i?.id?parseInt(Be(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])},LU=(e,t)=>{const n=i=>i.handle===e,r=t?.findIndex(n);return{locationId:t?.find(n)?.originLocation?.id,selectedLocationRank:r}},xU=(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=mh(),d=u.value?.selectedDeliveryMethodHandle,p=u.value?.methods;F(()=>{const{locationId:m,selectedLocationRank:f}=LU(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(Be(o),10),locationId:Be(m),selectedLocationRank:f,userId:c?.id?parseInt(Be(c.id),10):void 0,numberLocationsFound:p?.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}))},[c?.id,l,p,r,d,a.checkoutSessionIdentifier,o])},RU=()=>{const e=Ln(),t=wu(),n=Pe(),r=x(()=>t.value&&!Vs(n.value.currentDetour));ze(()=>{r.value&&ht(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})};function MU(){return wU(),xU(),RU(),null}function NU(){const{shippingAddress:e}=se(),{shopPay:t,checkout:n}=b(),r=q(),o=lk(),i=n.identity.current.value==="shopPay",a=M(()=>{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:M(c=>{if(!i)return;c.includes("SHIPPING")&&a()},[a,i])}}function j_(e,t){const n=e.find(Qi),r=t.find(Qi);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}function DU(e){return e.reduce((t,n)=>{const{type:r,deliveryMethodTypes:o,deliveryMethodHandle:i}=n.value;return o.some(Qi)?{...t,[r]:i}:t},{})}function OU(){const{deliveryLines:e}=se(),t=U({});return{preservePickupSelectionAcrossToggles:M((r,o)=>{const i=j_(r,o);if(i.direction==="leaving"){t.current[i.pickupType]=DU(e.value);return}if(i.direction==="entering")return t.current[i.pickupType]},[e])}}function FU(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 BU=["phone","company","address2"];function VU(e,t){if(e.coordinates)return!0;const{address1:n,city:r,firstName:o,lastName:i}=e;return n&&r&&o&&i?BU.every(a=>e[a]||!t(a)):!1}function UU(){const{locationAddress:e,shippingAddress:t}=se(),{checkout:n,shop:r}=b(),o=r.hasFlagEnabled(ck),i=U(e.peek()),a=U(!1);return{syncLocationAddressFromShipping:M((c,u)=>{if(o||j_(c,u).direction!=="entering"||a.current)return;const d=i.current;if(d&&!FU(e.value,d)){a.current=!0;return}const p=t.value;if(!p?.countryCode)return;const{isRequired:m}=n.configuration.addressSettings.nonBillingAddressSettings.value,h=VU(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 hm(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 zU({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=Te(!1),d=Te(!1),p=Yc(),{negotiate:m}=Nt(),{loading:f}=Je(),h=r.identity.current.value==="shopPay",g=er(),y=U(new Set),_=U(),{correctShippingAddress:P}=NU(),{syncLocationAddressFromShipping:v}=UU(),{preservePickupSelectionAcrossToggles:E}=OU(),{billingAddressOption:k,deliveryLines:S,discountLines:I,merchandiseLines:C,shippingAddress:w,locationAddress:A}=se(),T=wu(),{deliveryNext:L,shippingAddress:N}=q(),D=L.peek(),O=Te(Bi(w.peek())||Bi(N.peek())||D!=null&&D.status!=="unavailable"),B=lo();ze(()=>{(Bi(N.value)||L.value?.status==="filled"||L.value?.status==="partial")&&(O.value=!0)});const z=a.currentUrlMatches("/stock-problems"),[R]=tx("ONE_TIME_PURCHASE"),$=Ye(R),[j,ee]=Hg(),ae=nx(),K=!c,Q=Ye(j),X=x(()=>Lf(L.value)||pk(S.value)||T.value),H=x(()=>X.value?Q.value:$.value),ue=V(()=>
23{if(X.peek())return;const te=g.peek().enabledDeliveryMethods??[];if(!HU(te))return;const[oe]=H.peek();if(oe!=="PICK_UP")return{activeMethod:oe,targetMethod:"PICK_UP"}},[X,H,g]),re=Te(ue!=null),le=x(()=>{if(r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return H.value;if(!X.value){const oe=g.value.enabledDeliveryMethods??[],we=Xa(oe),Me=L.value?.status==="unavailable"&&!O.value,[Qe]=H.value;return ue&&re.value&&!d.value?[ue.targetMethod]:Me&&!d.value&&we&&Qe!=="PICKUP_POINT"?["SHIPPING"]:Qe?[Qe==="LOCAL"?"SHIPPING":Qe]:[]}const te=H.value.filter(oe=>oe!=="LOCAL");return!te.includes("SHIPPING")&&H.value.includes("LOCAL")&&te.push("SHIPPING"),te}),de=M((te,oe)=>{if(B.value)return;const we=Xa(te),Me=Xa(oe);oe.some(Qi)&&!Me&&(!h&&we&&t.current==null&&(t.current=k.value),k.value="custom"),Me&&!we&&!h&&(i.requireMatchingShippingAndBilling?k.value="shipping":t.current==null?k.value=i.sameBillingAndShippingAddress?"shipping":"custom":k.value=t.current,t.current=void 0)},[i,h,B,k]),ke=U(le.peek());ze(()=>{const te=ke.current,oe=le.value;ke.current=oe,te!==oe&&ht(()=>de(te,oe))});const he=M((te,oe,we)=>{de(oe,te),ke.current=te,P(te),we?A.value=we:v(oe,te);const Me=we?void 0:E(oe,te),Qe=hm(te);tn(()=>{i.shipPickupInOneOrderEnabled&&mk(S),ee(te),i.shipPickupInOneOrderEnabled&&Qe&&wd({deliveryLines:S,merchandiseLines:C.value,deliveryMethodTypes:Qe}),ae(void 0),Me&&xs(S,Me),Ld(I),re.value=!1})},[de,P,A,v,E,i.shipPickupInOneOrderEnabled,S,ee,C,ae,I,re]),ve=M((te,oe=le.value,we)=>{const Me=!h&&!B.value&&!oe.includes("SHIPPING")&&te.includes("SHIPPING")?[]:["deliveryNext"];return he(te,oe),u.value=!0,p?.dispatch?.("deliveryMethodChanged"),m({include:Me,onComplete:Qe=>{const Bt=f.value.has("deliveryNext");if(Qe.status==="stale"&&Bt){const kt=f.subscribe(Kt=>{Kt.has("deliveryNext")||(tn(()=>{u.value=!1,we?.()}),kt())})}else tn(()=>{u.value=!1,we?.()})}})},[le,h,B,he,u,p,m,f]),Ee=x(()=>r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),De=x(()=>dc({checkout:r})),Ie=x(()=>fm(g.value.enabledDeliveryMethods??[],De.value));F(()=>l?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>Ie.value,getSelectedMethodTypes:()=>le.value,markBuyerSelection:()=>{d.value=!0,re.value=!1},applyMethodChange:he,reconcileSameMethod(te){const oe=hm(te);i.shipPickupInOneOrderEnabled&&oe&&wd({deliveryLines:S,merchandiseLines:C.value,deliveryMethodTypes:oe})&&Ld(I)}}),[l,Ie,le,d,re,he,S,C,i.shipPickupInOneOrderEnabled,I]);const J=x(()=>{const te=gm(Ie.value,n,i,K);return Ee.value?te.filter(oe=>le.value.includes(oe.id)):te}),ne=x(()=>{if(Ee.value)return J.value;const te=y.current,oe=fm([...g.value.enabledDeliveryMethods??[],...te],De.value),we=oe.length>Ie.value.length?gm(oe,n,i,K):J.value;return we.length>1&&we.forEach(Me=>te.add(Me.id)),we}),me=V(()=>bU({isStockProblems:z,shippingRequired:fk(r.proposal),deliveryMethodOptions:ne.value.map(({value:te})=>te),mustSelectProvidedShippingRate:Ee.value,isSplitShipAndPickup:T.value,initialPickupOnlySelection:ue,deliveryNext:L.value,currentSelectedMethods:le.value}),[]),ge=Te(me!=null);ze(()=>{const te=J.value,oe=ne.value;if(te===oe||oe.length<=1){_.current=void 0;return}const we=JSON.stringify([oe.map(({id:Me})=>Me),te.map(({id:Me})=>Me)]);_.current!==we&&(_.current=we,o.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:oe.length,currentOptionCount:te.length}))}),F(()=>{if(!me||d.value){ge.value=!1;return}ve(me.nextMethods,me.previousMethods,()=>{ge.value=!1})?.catch(te=>{tn(()=>{u.value=!1,ge.value=!1}),o.error(te)})},[]);const Ae=M(te=>{const oe=ne.value.find(we=>we.id===te[0]);oe&&(d.value=!0,ve(oe.value))},[ne,ve,d]),be=qi(Ae),Ce=x(()=>ne.value.length<=1),Ue=x(()=>{if(!Ce.value)return{options:ne,selected:le,select:te=>{be.current(te)},variant:K?"next":"default"}}),je=V(()=>({negotiating:u,initialReconciliationPending:ge,methods:le,setSelectedMethodTypes:ve}),[u,ge,le,ve]);return s(Tu.Provider,{value:je,children:[s(MU,{}),s(ye,{when:T,children:s(kU,{})}),s(W_.Provider,{value:Ue.value,children:e})]})}function Xa(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function HU(e){return e.length===1&&e[0]==="PICK_UP"}function gm(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?xr.PackageDelivery:xr.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?xr.Location:xr.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:xr.Location})}return o}var qU={Abbreviation:"_1qifbzv1 _1qifbzv0 _1fragem128"};function Lu({children:e,id:t,title:n}){return s("abbr",{className:qU.Abbreviation,id:t,title:n,children:e})}const GU="$.availableRedeemables.redeemable",KY=e=>"target"in e?e.target===GU:!1;function Qa(e,t){if(!e||!t||e.redemptionSource!==t.redemptionSource)return!1;if(e.redemptionSource==="CUSTOM")return WU(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function WU(e,t){return!e||!t?!1:e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&$U(e?.redemptionAttributes,t?.redemptionAttributes)}function $U(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 YU(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function jU(e){return e?`•••• ${e}`:""}class KU extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function JU(){const e=q().paymentMethods;return x(()=>{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 KU(`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 K_(){const e=JU(),[t,n]=ie([]),r=fc("CUSTOM"),o=V(()=>r.value.filter(m=>{const f=t.some(g=>Qa(g,m.method)),h=!m.cost||m.cost.amount===0;return f||h?!1:!!m.method.redemptionContent}),[r.value,t]),i=Ot(),{negotiate:a}=Nt(),l=!!e.value,c=M(m=>{const f=y=>y.type==="redeemable"&&y.redemptionSource==="CUSTOM"?!Qa(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=M((m,f)=>{const h=QU(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(Gf)&&c(h.method),y(_)}})})}else return Promise.resolve(null)},[a,i,c]),d=M(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(_=>!Qa(_,m))),h(g)}})}):Promise.resolve()},[a,i,c]),p=M(()=>{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 xu(){const e=q().paymentLines;return x(()=>e.value?.lines.filter(t=>t.method.type==="giftCard")??[])}function bi(){const e=fc("STORE_CREDIT"),{paymentLines:t}=K_(),n=xu();return x(()=>{const r=!!e.value.length,o=!!t.length,i=!!n.value.length;return r||o||i})}const XU=0;function QU(e,t){return!t||t.amount<=0?null:{method:e.paymentMethod,cost:{amount:XU,currencyCode:t.currencyCode}}}function ym(){const e=hk(),t=gk(),n=q(),r=oi(),o=n.deferredTotal,{i18n:i}=b(),a=Ye(Ty()),l=bi(),c=Ye(Fe()),u=St(),d=x(()=>{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(ye,{when:d,children:({amountDue:p,paymentDueFormatted:m,priceBeforeReductionsFormatted:f,showCurrencyCode:h,showSubtotalBeforeReductions:g,totalAmountDueAccessiblityLabel:y})=>s(Z,{alignItems:"end",children:[g?s(G,{children:[s(W,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.total_price_label")}),s(W,{size:"small",color:"subdued",type:"redundant",translate:!1,children:f})]}
24):null,s(W,{accessibilityVisibility:"exclusive",children:y}),s(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:[h&&s(Lu,{children:s(W,{type:"small",color:"subdued",translate:!1,children:p.currencyCode})}),s(Ke,{color:"base",size:"large",translate:!1,children:s(W,{type:"strong",children:m})})]})]})})}function J_(){const{i18n:e}=b();return M((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 Ru(){const{shop:{captureAtFulfillmentEnabled:e}}=b(),t=q(),n=t.buyerIdentity,r=t.paymentFlexibilityPaymentTermsTemplate;return x(()=>r.value?.type==="FULFILLMENT"&&e===!0&&!n.value?.purchasingCompany)}function Mu(){const e=ii(),t=Pe(),n=Fn(),r=q(),o=Ru(),i=J_(),a=bi(),{shop:l,checkout:c,embed:u,i18n:d,source:p,shopPay:m}=b(),{orderSummary:f}=Fe(),h=l?.name,g=f.totalLabel,y=Ft(u?.embedder),_=fh(m.app.config);return x(()=>{const{currentPage:P,plan:v,currentDetour:E}=t.value,k=r.deferredTotal.value,S=r.paymentFlexibilityPaymentTermsTemplate.value,I=c.configuration.orderSummary?.layoutStyle==="COMPACT";let C;g==="TOTAL"?C=d.translate("order_summary.total_label"):y?C=d.translate("universal.iframes.subtotal_label"):g==="ORDER_TOTAL"?C=d.translate("order_summary.order_total_label"):I&&h&&!_?C=d.translate("order_summary.pay_merchant_label",{merchant_name:h}):C=d.translate("order_summary.total_label");const w=y?C:d.translate("order_summary.total_due_label"),A=E?.type==="thankYou",T=k&&k.amount.amount>0;if(e.value&&A)return d.translate("order_summary.deferred_payment_info.paid_today_next");if(nt(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(T)return d.translate("order_summary.payment_terms_totals.due_today_next");if(S){if(o.value)return a.value?w:C;if(S?.dueDate){const L=i(S.dueDate,{month:"short"});return d.translate("order_summary.deferred_total_due_date_label_next",{date:L})}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"):gn(P,v.greenPath[v.greenPath.length-1])?a.value?w:C:a.value?w:d.translate("order_summary.partial_total_label")})}const vm={"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 Nu({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)=>_m(g)-_m(h)):t).slice(0,r),f=yi(n);return s("div",{className:vm[`StackedThumbnails-${e}`],style:{"--total":m.length,"--thumbnail-inline-size":ds(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:vm[`StackedThumbnail-${e}`],style:{"--index":g},children:s(js,{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:ZU(g,e),alt:o?h.image?.altText||y:"",totalItems:P,overlay:_?`+${d}`:void 0})},"stableId"in h?h.stableId:`${g}${h.title}`)})})}function _m(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function ZU(e,t){if(t==="fan")return Math.max(0,Math.min(e,2));if(t==="fan-legacy"&&e>0)return"legacy"}const ez="ik40Z",tz="Tupv7",Za={Content:ez,LegacyLabel:tz};function X_(){const{disclosure:{style:e}}=Fe(),{open:t}=w_(),{i18n:n,checkout:r,source:o}=b(),i=Mu(),a=e==="base",l=x(()=>!t.value),c=r.proposal.facts.merchandiseLines??[],{value:u}=q().merchandiseLines,d=nt(o)?c:u?.lines||[],p=s(Re,{type:t.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return a?s(Z,{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:Za.Content,children:[s(ye,{when:t,fallback:s(Z,{direction:"inline",alignItems:"center",gap:"small-200",children:[s("span",{className:bt({screenReaders:"only"}),children:n.translate("order_summary.title")}),s(Nu,{variant:"inline",size:"small-200",max:3,merchandise:d,useImageAltTexts:!1}),s(W,{size:"large",fonts:"secondary",type:"strong",children:i})]}),children:s(W,{color:"subdued",children:n.translate("order_summary.title")})}),s(Z,{direction:"inline",alignItems:"center",gap:"small-200",children:[s(ye,{when:l,children:s(ym,{})}),p]})]}):s(Z,{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:Za.Content,children:[s(Z,{direction:"inline",alignItems:"center",gap:"small-200",className:Za.LegacyLabel,children:[n.translate("order_summary.title"),p]}),s(ym,{})]})}function Q_(){const{checkout:e,embed:t,router:n}=b();return x(()=>
24!t?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer?!1:n.currentUrl.value.normalizedPath==="/thank-you")}const nz="KwVFv",rz={FlagshipPartnerMask:nz};function oz(){const e=Q_();return s(ye,{when:e,children:s("div",{className:rz.FlagshipPartnerMask})})}var Po={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 iz=({position:e,scrollDirection:t,variant:n})=>{const r=n.content,o=Te("none");t&&(t.block&&t.inline?o.value="both":t.block?o.value="block":t.inline&&(o.value="inline"));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=nn(i??!1,i?"base":"fast");return s("div",{className:Po.PillHintWrapper,children:s("div",{className:Y(Po.PillHint,Po.directionVariant[o.value],Po.transitionVariant[a]),children:[r,s(Re,{size:"small",type:o.value==="block"?"arrow-down":"arrow-right",className:Po.iconVariant[o.value]})]})})};var el={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 sz=({position:e,scrollDirection:t})=>{const n=nn((t?.block&&e?.scrolledTo.block!=="start")??!1,"base"),r=nn((t?.block&&e?.scrolledTo.block!=="end")??!1,"base"),o=nn((t?.inline&&e?.scrolledTo.inline!=="start")??!1,"base"),i=nn((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(el.ShadowHint,el.positionVariant[l],el.transitionVariant[c])},l))})};class az{constructor(){this.dimensions=ce(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 lz=new az,cz=1/20*1e3,uz=(e,t,n,r,o,i)=>{const a=Te(null),l=Te(null),c=x(()=>{const m=lz.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=x(()=>c.value?{inline:c.value.inline>0,block:c.value.block>0}:null),d=V(()=>Tg(()=>{const m=e.current;if(!m)return;const f=a.value,h=l.value;l.value=fz(m,t),a.value=mz(m,l.value),typeof r=="function"&&r(a.value),o&&typeof o=="function"&&dz(h,l.value)&&o(l.value),i&&typeof i=="function"&&pz(f,a.value)&&i(a.value)},cz),[t,r,o,i,l,a,e]),p=M(()=>{d()},[d]);return Rt(()=>{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}},dz=(e,t)=>
37e?.inline!==t.inline||e?.block!==t.block,pz=(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},bm=(e,t)=>e?"start":t?"end":null,mz=(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?bm(n,i):null,block:t.block?bm(r,a):null}}},fz=(e,t)=>{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 Z_=oo(xc(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:k="none",minBlockSize:S="0",minInlineSize:I="0",onScroll:C,onScrollable:w,onScrolledToEdge:A,overflow:T="auto",padding:L="none",paddingBlock:N,paddingBlockEnd:D,paddingBlockStart:O,paddingInline:B,paddingInlineEnd:z,paddingInlineStart:R,scrollbarWidth:$="auto",scrollTo:j}){const{Element:ee,role:ae}=ui(r),{className:K,style:Q,styleElement:X}=Tt({backgroundColor:i,backgroundColorHoverAndFocus:a,blockSize:c,..._r({border:u,borderColor:d,borderStyle:m,borderWidth:f}),borderRadius:p,display:y,inlineSize:v,maxBlockSize:E,maxInlineSize:k,minBlockSize:S,minInlineSize:I},{transforms:{display:wc}}),{className:H,style:ue,styleElement:re}=Tt({overflow:T,padding:L,paddingBlock:N,paddingInline:B,paddingBlockEnd:D,paddingBlockStart:O,paddingInlineEnd:z,paddingInlineStart:R}),le=U(null),[de,ke=de]=T.trim().split(/\s+/),he=V(()=>({inline:ke==="auto",block:de==="auto"}),[ke,de]),{scrollPosition:ve,scrollDirection:Ee,scrollbarVisible:De,scrollbarDimensions:Ie}=uz(le,he,$==="auto",C,w,A),J=Y(Ee?.block&&ve?.scrolledTo.block!=="start"&&Ut.borderVariant.blockStart,Ee?.block&&ve?.scrolledTo.block!=="end"&&!De?.block&&Ut.borderVariant.blockEnd,Ee?.inline&&ve?.scrolledTo.inline!=="start"&&Ut.borderVariant.inlineStart,Ee?.inline&&ve?.scrolledTo.inline!=="end"&&!De?.inline&&Ut.borderVariant.inlineEnd),ne=Y(l!=="none"&&Ee?.block&&ve?.scrolledTo.block!=="start"&&Ut.clipVariant.blockStart,l!=="none"&&Ee?.block&&ve?.scrolledTo.block!=="end"&&!De?.block&&Ut.clipVariant.blockEnd);return Rt(()=>{if(!j||!le.current)return;const me="smooth",ge=le.current;if(j instanceof HTMLElement){j.scrollIntoView({behavior:me,block:"start",inline:"start"});return}const Ae=document.dir==="rtl",be={block:j.block??0,inline:(j.inline??0)*(Ae?-1:1)};ge.scrollTo({behavior:me,top:be.block,left:be.inline})},[j]),s(G,{children:[X,re,s("div",{"aria-hidden":o==="hidden"?!0:void 0,className:Y(Ut.ScrollBox,K,o==="exclusive"&&Ut.visuallyHidden,l==="product-thumbnails"&&Ut.bleedProductThumbnailsScrollBox,l==="product-thumbnails-with-badge"&&Ut.bleedProductThumbnailsWithBadgeScrollBox,ne),style:Q,children:[s(ee,{id:P,role:ae,"aria-activedescendant":t,"aria-label":n,className:Y(Ut.ContentWrapper,$==="none"&&Ut.scrollbarWidthNone,H,g,l==="product-thumbnails"&&Ut.bleedProductThumbn
37ailsContentWrapper,l==="product-thumbnails-with-badge"&&Ut.bleedProductThumbnailsWithBadgeContentWrapper),tabIndex:0,style:ue,ref:le,children:h}),s("div",{className:Y(Ut.ScrollViewportOverlay,J),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:Ie?.inline,marginBlockEnd:Ie?.block},children:[_?.type==="pill"&&s(iz,{variant:_,scrollDirection:Ee,position:ve,scrollbarVisible:$==="auto"}),_?.type==="shadow"&&s(sz,{variant:_,scrollDirection:Ee,position:ve,scrollbarVisible:$==="auto"})]})]})]})}));var Bl={FormattedText:"go06b0",ScrollableTable:"go06b1"};const hz=/<table[\s>]/i;function gz(e){if(typeof DOMParser>"u"||!hz.test(e))return null;const{body:t}=new DOMParser().parseFromString(e,"text/html");return t.querySelector("table")?eb(t.childNodes,!1):null}function eb(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?eb(i.childNodes,t||a==="table"):void 0,u=Yl(a,l,c);a==="table"&&!t?n.push(s(Z_,{overflow:"hidden auto",className:Bl.ScrollableTable,children:u},r)):n.push(u)}return n}function Cr({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const o=no()?"span":"div",i=e?.__html,a=V(()=>t==="all"&&i!=null?gz(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:Bl.FormattedText,children:a}):s(o,{dangerouslySetInnerHTML:e,className:Bl.FormattedText,children:n})}const Du=qe(null);Du.displayName="SelectContext";function yz(){return Se(Du)}function os(e){return`error-for-${e}`}var Pm={InlineError:"ksaxnz0 _1fragemxr",Icon:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t"};function Ou({children:e,controlID:t,type:n}){return n==="warning"?s(gt,{id:t?os(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[s("div",{className:Pm.Icon,children:s(Re,{type:"info"})}),s(W,{children:e})]}):s("div",{className:Pm.InlineError,id:t?os(t):void 0,children:e})}function vz(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 _z={Truncate:"rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"};function Pi({children:e}){return s("span",{className:Y(_z.Truncate),children:e})}var is={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12e _1fragem12t _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},Text:"xpgeoa5",visuallyHidden:"xpgeoa6 _1fragem121"};function Vl({htmlFor:e,label:t,variant:n,className:r}){return s("label",{id:`${e}-label`,htmlFor:e,className:Y(is.positionVariant[n],r),children:s("span",{className:is.Text,children:s(Pi,{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 bz=Xe("TextField"),Pz={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},tb=at(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:k,disablePasswordManagers:S,inputMode:I,label:C,labelAccessibilityVisibility:w="visible",labelPosition:A,labelWhenEmpty:T,letterCase:L,max:N,maxLength:D,min:O,minLength:B,name:z,onBlur:R,onChange:$,onFocus:j,onInput:ee,onInputCommit:ae,onKeyDown:K,onWheel:Q,placeholder:X,prefix:H,prefixSpacing:ue="base",readOnly:re,required:le,role:de,rows:ke,segment:he,step:ve,suffix:Ee,type:De="text",value:Ie},J){const{control:{border:ne,labelPosition:me="inside"},textField:{border:ge}}=ct(),Ae=ge||ne||"full",be=A??me,Ce=Un(),Ue=Ie??void 0,je=y??void 0,te=$e(k,bz),oe=t?`${te}
38-description`:void 0,we=oe?s(W,{accessibilityVisibility:"exclusive",id:oe,children:t}):null,[Me,Qe]=ie(!1),[Bt,kt]=Ez(je??Ue),Kt=M(Qt=>{ee?.(Qt),kt(Qt)},[ee,kt]);function Ne(Qt){ke!==void 0||!$||Qt.key==="Enter"&&$(Qt.currentTarget.value)}const pe=Cz(v,te),xe=!!v&&Yn(v)!=="warning",rt=Y(Oe.TextField,Oe.textFieldColorLayerVariant[xe?"controlInvalid":"control"],Oe.textFieldBorderVariant[Ae],(P||Ce)&&Oe.textFieldDisabled,Ce&&Oe.inert,re&&Oe.textFieldReadOnly,Me&&Oe.textFieldFocused,xe&&Oe.textFieldError,he&&Oe.segmentVariant[he]),ft=C&&w==="visible";let pt=Oe.floatingLabelOnContent;be==="outside"?pt=is.floating:H&&(pt=Oe.floatingLabelOnFocus);const Jt=be!=="outside"&&!ke&&Ae==="full";return s(G,{children:s("div",{className:Y(Oe.Wrapper,Oe.wrapperVarsSetter[be==="outside"?"labelOutside":"labelInside"],be==="inside"&&Oe.textFieldColorLayerVariant[v?"controlInvalid":"control"],be==="inside"&&Oe.wrapperLabelInside,ft&&pt),"data-form-layout-connectable":Jt?"true":"false",children:[ft&&be==="outside"&&s(Vl,{variant:"outside",htmlFor:te,label:C}),C&&w==="exclusive"&&s("label",{id:`${te}-label`,htmlFor:te,className:is.visuallyHidden,children:C}),s("div",{className:rt,children:[we,ft&&be==="inside"&&s(Vl,{variant:"inside",htmlFor:te,label:C}),s(Sz,{accessibilityDescription:t,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:o,ariaAutocomplete:i,ariaControls:a,ariaDescribedBy:oe,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:te,disablePasswordManagers:S,inputMode:I,label:C,labelAccessibilityVisibility:w,labelPosition:be,labelWhenEmpty:T,letterCase:L,localValue:Bt,max:N,maxLength:D,min:O,minLength:B,name:z,onBlur:()=>{Qe(!1),R?.()},onChange:$,onFocus:()=>{Qe(!0),j?.()},onInput:Kt,onInputCommit:ae,onKeyDown:K??Ne,onWheel:Q,placeholder:X,prefix:H,prefixSpacing:ue,readOnly:re,ref:J,required:le,role:de,rows:ke,step:ve,suffix:Ee,type:De,value:Ie})]}),pe]})})}),nb=tb,Sz=at(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:k,inputMode:S,label:I,labelAccessibilityVisibility:C,labelPosition:w,letterCase:A,localValue:T,max:L,maxLength:N,min:D,minLength:O,name:B,onBlur:z,onChange:R,onFocus:$,onInput:j,onInputCommit:ee,onKeyDown:ae,onWheel:K,placeholder:Q,prefix:X,prefixSpacing:H,readOnly:ue,required:re,role:le,rows:de,step:ke,suffix:he,type:ve,value:Ee},De){const Ie=Os({active:!!P&&Yn(P)!=="warning"}),J=U(),ne=M(Vt=>{typeof De=="function"?De(Vt):De&&(De.current=Vt),J.current=Vt,Ie.current=Vt,Vt&&(T?Vt.value!==T:Vt.value!==(Ee??""))&&Vt.dispatchEvent(new Event("input"))},[De,Ie]),me=gy(),ge=ai(),Ae=Un();F(()=>{g&&!Ae&&J.current?.focus()},[g,Ae]);const{control:{labelPosition:be="inside"}}=ct(),Ce=w??be,Ue=typeof v=="object"?v.source:v,je=typeof v=="object"?v.position??"start":"start",te=Ue!==""&&Ue&&s("div",{className:Y(Oe.Icon,Oe.iconPositionVariant[je]),"aria-hidden":"true",onClick:()=>J.current?.focus(),children:s(Re,{type:Ue})}),oe=I&&C==="visible",Me=!!(ve==="email"||f?.split(/\s+/).includes("email"))||ve==="tel"||ve==="number",Bt=(!ve||ve==="text")&&!!T;let kt;Me?kt="ltr":Bt?kt="auto":kt=void 0;const Kt=X&&s("div",{id:`${E}-prefix`,className:Y(Oe.Prefix,Oe.withTypography,oe&&Ce==="inside"&&Oe.prefixInside),"aria-hidden":"true",onClick:()=>J.current?.focus(),children:X}),Ne=Y(Oe.Field,Ce==="inside"&&Oe.fieldLabelInside,!!X&&Oe.fieldPrefixed,!!H&&Oe.fieldPrefixSpacing[H],!oe&&Oe.setFieldLabelIsNotVisible,!!(X||n||te&&je==="start")&&Oe.fieldInsetStart,!!(he||t||te&&je==="end")&&Oe.fieldInsetEnd,!!de&&Oe.fieldMultiline,A&&Oe.fieldLetterCaseVariant[A],ve&&Oe.fieldTypeVariant[ve],Oe.withTypography),pe=a||P?vz([a,P&&os(E)]):void 0,xe=S??(ve==="number"?"decimal":void 0),rt=X?` ${E}-prefix`:"",ft=he?` ${E}-suffix`:"";let pt;Ce==="outside"?pt=Q:C==="visible"&&(pt=_??I);const Jt=Yl(de?"textarea":"input",{...k?Pz:void 0,id:E,min:D,max:L,step:ke,maxLength:N,minLength:O,name:B,placeholder:pt,className:Y(Ne,Oe.ActualInput),required:re,type:de?void 0:ve,disabled:y,readOnly:ue,inputMode:xe,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":i,"aria-owns":p,"aria-describedby":pe,"aria-expanded":l,"aria-hidden":Ae?!0:void 0,"aria-invalid":P&&Yn(P)!=="warning"?"true":void 0,"aria-label":u,"aria-live":d,"aria-required":re,"aria-labelledby":I?`${E}-label${rt}${ft}`:void 0,"aria-haspopup":c,onBlur:({currentTarget:{value:Vt}})=>{if(!me.current)return;Vt!==(Ee||"")&&R?.(Vt),z?.()},onChange(Vt){const{currentTarget:{value:Si}}=Vt,ia=Vt.nativeEvent??Vt,{isTrusted:qP}=ia,sa="inputType"in ia?ia.inputType:void 0;sa!=="insertCompositionText"&&sa!=="deleteCompositionText"&&ee?.(Si),(!qP||!sa)&&R?.(Si),j?.(Si)},onFocus:()=>{$?.()},onKeyDown:ae,onWheel:K,ref:ne,role:le,rows:de,value:T??"",autoComplete:f,autoF
38ocus:g&&!Ae,form:ge?.nested?ge.id:void 0,tabIndex:Ae?-1:void 0,autoCorrect:h,autoCapitalize:m,dir:kt}),Qt=!!de&&s("div",{"aria-hidden":"true",className:Y(Oe.MultilineClone,Ne),dir:kt,children:[T," "]}),BP=Y(Oe.FieldWrapper,!!de&&Oe.fieldWrapperMultiline),VP=de?s("div",{className:BP,children:[Jt,Qt]}):Jt,UP=he&&s("div",{id:`${E}-suffix`,className:Y(Oe.Suffix,Oe.withTypography),"aria-hidden":"true",onClick:()=>J.current?.focus(),children:he}),zP=n&&s("div",{className:Y(Oe.Accessory,Oe.accessoryPositionStart),children:n}),HP=t&&s("div",{className:Y(Oe.Accessory,Oe.accessoryPositionEnd),children:t});return s(G,{children:[te,Kt,VP,zP,UP,HP]})});function Ez(e){const t=kz(e),[n,r]=ie(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 Cz(e,t){if(typeof e!="boolean")return e!==void 0&&e?s(Ou,{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 kz(e){if(e!=null)return typeof e=="object"&&"value"in e?e.value==null?void 0:String(e.value):String(e)}var Iz={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},Ni={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const Az="RD23h",Tz="VZudx",wz="XDBWz",Lz="ZHJU6",xz="_87H7J",Rz="VXrUd",Zt={Wrapper:Az,SelectWrapper:Tz,"Label-positionInside":"QCxaD",LabelText:wz,"Label-isFloating":"A9HkF",Select:Lz,"Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:xz,"Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:Rz,"Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},Ao="",Mz=Xe("Select");function Nz({children:e,id:t,name:n,label:r,value:o=Ao,disabled:i,readOnly:a,required:l,error:c,autocomplete:u="on",placeholder:d,onChange:p,onBlur:m,onFocus:f}){const h=ai(),{control:{border:g,labelPosition:y="inside"},select:{border:_}}=ct(),P=Un(),v=Os({active:!!c&&Yn(c)!=="warning"}),E=$e(t,Mz),k=_||g||"full",S=c!==void 0&&!!c&&s(Ou,{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",C=Y(Zt.Select,Ni.Select,I&&Zt.hasError,(i||P)&&Zt["Select-isDisabled"],P&&Ni.inert,a&&Zt["Select-isReadOnly"],Zt[Wt("Select-border",k)]),w=ae=>{const K=ae.target.value;p?.(K)},[A,T]=ie(0),D=o!==Ao||(!!(d&&d!==r)||!!A),O=s("label",{className:Y(Zt.Label,Zt[Wt("Label-position",y)],D&&Zt["Label-isFloating"]),htmlFor:E,children:s("span",{className:Y(Zt.LabelText),children:s(Pi,{children:r})})}),B=M(()=>{T(ae=>ae+1)},[]),z=M(()=>{T(ae=>ae-1)},[]),R=V(()=>({readOnly:a,registerEmptyValueOption:B,unregisterEmptyValueOption:z}),[a,B,z]),$=s("div",{children:[y==="outside"?O:null,s("div",{className:Y(Zt.SelectWrapper,Ni.selectColorLayerVariant[I?"controlInvalid":"control"]),children:[y==="inside"&&O,s(Du.Provider,{value:R,children:s("select",{name:n,id:E,disabled:i,onChange:w,required:l,value:o,className:C,"aria-describedby":c?os(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&&(j(o)||d!==r)&&s("option",{value:Ao,hidden:d===r,disabled:!0,children:d===r?s(G,{children:" "}):d}),e]})}),s("div",{className:Y(Zt.Selector),children:s(Re,{type:"chevronDown",size:"small-200"})})]})]});function j(ae){return ae===Ao||ae===void 0||ae===null}const ee=y!=="outside"&&k==="full";return s(G,{children:s("div",{className:Y(Zt.Wrapper,y==="inside"&&Ni.selectColorLayerVariant[I?"controlInvalid":"control"],Iz[y==="outside"?"labelOutside":"labelInside"]),"data-form-layout-connectable":ee?"true":"false",children:[$,S]})})}function Dz({children:e,id:t,value:n,disabled:r,alternateValues:o,accessibilityLabel:i}){const a=yz(),{registerEmptyValueOption:l,unregisterEmptyValueOption:c}=a??{},u=n===Ao;return Rt(()=>{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 xn={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 Oz=at(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=$r(m),h=Un(),g=o==="auto"?"fit-content":o,y=ln(),_=nn(a??!1,{enter:"slow"}),P=k=>{k?.preventDefault(),u?.(!c)},v=s("span",{className:Y(xn.LoadingContent),dir:"auto",children:s(io,{accessibilityLabel:y("processing")})}),E=Et(r)&&s("span",{className:Y(xn.Content),"aria-hidden":a||void 0,children:r});return s(Gr.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(xn.PressButton,xn.inlineSizeVariant[Ki(g)],c&&xn.pressed,(l||h)&&xn.disabled,h&&xn.inert,a&&[xn.loading,xn.transitionVariant[_]]),disabled:l||a,tabIndex:h?-1:void 0,ref:f,children:[E,a&&v]})})}),rb={small:"35%",base:"50%",large:"65%",fill:"100%"};function Di({content:e,delay:t,id:n,lastLineSize:r,lines:o=1,size:i}){const a=V(()=>Fz(),[]);return s(Ke,{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:rb[u]},c)})})}function Fz(){const e=Object.keys(rb);return e[Math.floor(Math.random()*e.length)]}const Bz=new Set(["http:","https:"]);function Vz(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:n}=b(),r=M(o=>{const i=o.target?.closest?.("a");if(!i)return;const a=i.href;let l;try{l=new URL(a).protocol}catch{return}!Bz.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 Uz({children:e}){const t=Vz();return t?s("div",{onClick:t,children:e}):s(G,{children:e})}const zz={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},Hz={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},qz=yk(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:o,policies:i})=>{const a=vk(i),l=It(()=>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=ce(!1),p=ce(!1),m=ce(u()),f=It(()=>c(m.value.shopId)),h=It(()=>m.value.shopId),g=It(()=>m.value.sessionToken??""),y=It(()=>n.id===h.value),_=e.query(zz,{variables:()=>({handle:m.value.handle}),skip:()=>!y.value||!d.value}),P=e.query(Hz,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>y.value||!d.value}),v=It(()=>y.value?_.data.value?.shop?.merchantPolicies[0]?.body:(P.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[]).find(C=>C.handle===m.value.handle)?.body),E=It(()=>y.value?_.error.value:P.error.value),k=It(()=>y.value?_.loading.value:P.loading.value),S=uA(k.value,(I,C)=>I&&!C&&d.peek()&&p.peek()&&typeof document<"u"&&document.querySelector(dA)!==null,["modal-content-cross-fade"]);return dl(()=>{S.value=k.value}),dl(()=>{E.value&&t.error(E.value)}),{error:E,loading:S,policyBody:v,selectedPolicy:It(()=>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 C=m.peek(),w=c(I),A=w.find(T=>T.handle===C.handle)??w[0]??C;A!==C&&dr(()=>{m.value=A}
38,["modal-content-cross-fade"])},selectPolicyHandle(I){const C=m.peek(),w=f.value.find(A=>A.handle===I)??f.value[0]??C;w!==C&&dr(()=>{m.value=w},["modal-content-cross-fade"])}}});function ss({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:o,embed:i}=b(),{checkoutProtocolModalEventSignal:a}=Mt(),{localPolicies:l,localPoliciesWithContent:c,remotePolicies:u}=vs(),d=r.hasFlagEnabled(hh),p=u.length>0?[...l,...u]:c,m=d&&p.some(({shopId:O,handle:B})=>O===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:k,shops:S,show:I,afterShow:C,hide:w,selectShop:A,selectPolicyHandle:T}=_k(qz,{checkoutProtocolModalEventSignal:a,defaultPolicy:t,policies:m}),L=S.value.length>1||S.value.some(O=>O.policies.size>1),N=()=>s(Uz,{children:s(Cr,{dangerouslySetInnerHTML:{__html:v.value??""},scrollableContent:"all"})}),D=s(ye,{when:()=>!_.value,fallback:n.translate("bad_request.title"),children:s(ye,{when:()=>!P.value,fallback:s(Z,{"aria-busy":!0,gap:"base",children:[s(Di,{delay:!1,lines:3,lastLineSize:"small"}),s(Di,{delay:!1,lines:3,lastLineSize:"large"}),s(Di,{delay:!1,lines:3,lastLineSize:"small"}),s(Di,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>L||E.value.shopId!==r.id?s(ye,{when:()=>v.value,fallback:s(W,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:E.value.name,shop_name:E.value.shopName})}),children:N}):N()})});return s(wn,{id:e,onShow:I,onAfterShow:C,onHide:w,heading:f,blockSize:y,children:[s(_e,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:P.value?n.translate("general.loading"):null}),L?s(Z,{gap:"base",children:[s(ye,{when:()=>S.value.length>1,children:s(Z,{direction:"inline",gap:"base",children:S.value.map(O=>s(Oz,{pressed:E.value.shopId===O.shopId,onClick:()=>A(O.shopId),children:s(Z,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:s(W,{children:O.shopName})})},O.shopId))})}),s(ye,{when:()=>k.value.length>1,children:s(Nz,{value:E.value.handle,label:n.translate("shop_policies.policy_label"),onChange:T,name:"policy",children:k.value.map(O=>s(Dz,{value:O.handle,children:O.name},O.handle))})}),D]}):D]})}const Sm="gid://shopify/App/580111";function ob(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function Gz(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return n==null||r==null?!1:ob({namespace:n,key:r},t)}function Wz(e,t){return e?.find(n=>ob(n,t))?.value}function ib(e,t){for(let n=e.length-1;n>=0;n--)if(Gz(e[n],t))return n;return-1}function $z(e,t){const n=e[ib(e,t)];if(n)return n.delete?"":n.update?.value}function Yz(e,t,n){const{namespace:r,key:o,type:i}=t,a=n.trim()===""?{delete:{appId:Sm,namespace:r,key:o}}:{update:{appId:Sm,namespace:r,key:o,type:i,value:n}},l=ib(e,t);return l===-1?[...e,a]:e.map((c,u)=>u===l?a:c)}function jz({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(It(()=>$z(o.value,a)??Wz(i.value,a)??""),l=>{o.value=Yz(o.peek(),a,l)})},[t,e,i,o,n])}function Kz(e,t){const{current:n,lastJourneyProgression:r}=Je(),{customFields:o}=n.fields,i=M(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:M(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 Xz({required:e,requiredErrorMessage:t,validations:n}){const{i18n:r}=b(),{minLength:o,maxLength:i}=n;return M(a=>{if(a.trim()==="")return e.value?t.value?.trim()||r.translate("field_errors.address_generic_blank"):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 Qz({field:e}){const{description:t,heading:n,key:r,label:o,required:i}=e,{i18n:a}=b(),{negotiate:l}=Nt(),c=Pk(),u=jz({...Sk(r),type:"single_line_text_field"}),d=t.value,p=i.value,m=Xz(e),f=Ek(u,c,m),{handleViolations:h}=Kz(r,c);Ck(u,c,m,Uo.InvalidCustomFieldValue);const g=()=>{f.onBlur(),!c.peek()&&l({fieldsToResolve:["cartMetafields","customFields"],include:[],onComplete:h})},y=p?o.value:a.translate("custom_field.label",{label:o.value});return s(Z,{gap:"small-100",children:[n.value?s(Yt,{children:n}):null,d?s(W,{accessibilityVisibility:"hidden",color:"subdued",children:d}
38):null,s(nb,{...f,accessibilityDescription:d??void 0,label:y,name:r,onBlur:g,required:p})]})}function Zz({field:e}){return e.type==="TEXT"?s(Qz,{field:e}):s(e2,{field:e})}function e2({field:e}){const{key:t,heading:n,label:r,description:o,type:i,required:a,target:l}=e;return s(_e,{border:"base",borderRadius:"base",padding:"base",children:s(Z,{gap:"small-100",children:[s(W,{type:"strong",children:"Custom field placeholder"}),n.value?s(W,{children:n}):null,s(W,{children:a.value?`${r.value} *`:r.value}),o.value?s(W,{color:"subdued",children:o}):null,s(W,{color:"subdued",type:"small",children:[t," · ",i]}),s(W,{color:"subdued",type:"small",children:l.placementReference?`${l.target} · ${l.placementReference}`:l.target})]})})}const t2=Ge({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>ys(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>Ve(()=>import("./component-RuntimeExtension.CdnRcmwD.js"),__vite__mapDeps([198,1,2,3,4,5,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,7,39,40,41,42,43,44,45,46,47,48,49,50,13,51,52,6,53,8,199]))}),Em={"UiCustomizations-marginBlockStart":"OyeF5","UiCustomizations-marginBlockEnd":"XYPMc"},n2=e=>s(_e,{children:e}),r2=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:o})=>{const i=e&&n?s(Z,{gap:e,children:t}):s(G,{children:t});return r||o?s("div",{className:Y({[Em["UiCustomizations-marginBlockStart"]]:r,[Em["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 $t({customizations:e,gap:t,options:n,transformComponents:r,render:o=n2,marginBlockStart:i,marginBlockEnd:a}){return e.length===0?null:s(r2,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:a,children:e.map(l=>l.kind==="uiExtension"?s(t2,{options:n,extension:l.extension,transformComponents:r,render:o},l.extension.id):s(Zz,{field:l.field},l.field.key))})}const o2=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-.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"}})]}),i2="mMltV",s2="HTJIw",Cm={DataSharingOptOutLinkGap:i2,DataSharingOptOutLinkIcon:s2},a2="https://privacy.shopify.com",l2="https://privacy.shopify.com/ads-sharing/opt-out/new";function km(){const{shopPay:e,i18n:t}=b(),{footer:{content:{typography:n}={}}={}}=Fe(),r=e.user.isAuthenticatedUser.value?l2:a2,o=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:s("span",{className:Cm.DataSharingOptOutLinkGap}),privacy_link_logo:s(o2,{"aria-hidden":"true",focusable:"false",className:Cm.DataSharingOptOutLinkIcon})}),i=s(lt,{href:r,target:"_blank",display:"block",children:o});return n?s(W,{size:n.size,color:n.color,type:n.weight==="bold"?"strong":void 0,children:i}):i}function c2(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}function u2(e){const{observability:t}=b();F(()=>{e&&c2(t,e)},[e,t])}const Im=Ge({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:u2,load:()=>ut(()=>Ve(async()=>{const{deferredPrivacyComponents:e}=await import("./DeferredPrivacy.BXYUNmBc.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([89,1,2,3,4,5,20,21,37,38,6,7,8])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function d2(){const e=St(),{checkout:{identity:t},consentManager:n}=b();return x(()=>e.value&&t.current.value!=="shopPay"&&n.shouldShowBanner.value)}const p2=Xe("DelegatedLinkModal");function m2(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(W,{color:"subdued",children:r},`${o}-${i}`)})}function Fu(){const{embed:e,i18n:t,checkout:{configuration:n},shop:r}=b(),{name:o}=r,i=mo(),{currentDetour:a}=Pe().value,l=d2(),{footer:{alignment:c,content:{visibility:u,typography:d}={}}={}}=Fe(),{localPolicies:p,localPoliciesWithContent:m}=vs(),f=r.hasFlagEnabled(hh),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(O=>O.handle==="privacy-policy"),v=P.url,E=v?s(lt,{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(lt,{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(ss,{id:"google-privacy-policy-modal",defaultPolicy:{...P,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),k=s(lt,{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(lt,{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(Ke,{type:"small",textAlign:c,children:m2(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:o,privacy_policy_link:E,payments_privacy_notice_link:k,learn_more_link:S}))}),A=s(Ke,{size:"extraSmall",color:"subdued",textAlign:c,children:s(W,{type:"strong",children:["Your purchase from ",o," is subject to the"," ",s(Ul,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",s(Ul,{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."]})}),T=m.length===0?s(Z,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:c,children:[s(W,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:o})}),s(Z,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[s(ye,{when:l,children:s(_e,{accessibilityRole:"list-item",children:s(Im,{})})}),s(ye,{when:n.visibility.showDataSharingOptOut,children:s(_e,{accessibilityRole:"list-item",children:s(km,{})})})]})]}):s(Z,{direction:"inline",justifyContent:c,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(f?m.slice(0,1):m).map(O=>{const{handle:B,name:z}=O,R=f?t.translate("shop_policies.terms_and_policies"):z,$=f?"terms-and-policies-footer-policy-modal":`${B}
38-footer-policy-modal`,j=s(ss,{id:$,defaultPolicy:O}),ee=s(an,{variant:"plain",commandFor:$,ref:i(B),children:R});return s(_e,{accessibilityRole:"list-item",children:[_?s(W,{size:_.size,color:_.color,type:_.weight==="bold"?"strong":void 0,children:ee}):ee,j]},B)}),s(ye,{when:l,children:s(_e,{accessibilityRole:"list-item",children:s(Im,{})})}),s(ye,{when:n.visibility.showDataSharingOptOut,children:s(_e,{accessibilityRole:"list-item",children:s(km,{})})})]});let L="purchase.checkout.footer.render-after";a?.type==="thankYou"&&(L="purchase.thank-you.footer.render-after");const N=it(L);return s(Z,{gap:"large-100",children:[h&&A,y&&I,u!=="hidden"&&!g&&T,s($t,{customizations:N,gap:"base"})]})}function Ul({href:e,heading:t,children:n,...r}){const{checkout:o}=b(),i=$e(void 0,p2);return o.configuration.isWindowOpenDelegationEnabled?s(lt,{href:e,...r,children:n}):s(G,{children:[s(lt,{commandFor:i,...r,children:n}),s(wn,{id:i,source:e,heading:t})]})}Fu.displayName="FooterContent";Ul.displayName="DelegatedLink";function f2(){const{i18n:e,shop:t}=b(),n=`${t.name} ${e.translate("general.page_title")}`;return s("h1",{className:bt({screenReaders:"only"}),children:n})}function sb(){const{client:e,i18n:t}=b(),{checkoutProtocolModalEventSignal:n}=Mt(),r=M(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),{hasViolations:o}=mi(sc);return F(()=>()=>{n.value="none"},[n]),o?s(wn,{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(Z,{gap:"base",children:[s(W,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),s(Z,{direction:"inline",gap:"base",justifyContent:"end",children:s(an,{variant:"primary",onClick:r,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function h2({source:e,title:t,onIframeLoad:n}){const[r,o]=ie(),[i,a]=ie(!1);return F(()=>{e?(o(e),a(!0)):a(!1)},[e]),r?s(wn,{source:r,open:i,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function g2({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]),M(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 y2(){const{checkout:e,shopPay:t,observability:n}=b(),r=U(),o=x(()=>{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&&Qc(i)){const a=i.action;if(ny(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 v2(){const{i18n:e}=b(),t=y2(),n=g2({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(h2,{source:t?.source,title:e.translate("processing.action_required"),onIframeLoad:n})}function _2(e,t){return e.has(t)}function b2(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&&_2(o.uiExtension.approvalScopes,kA.PaymentSessionModal))||null}function P2(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}function S2(e){const{observability:t}=b();F(()=>{e&&P2(t,e)},[e,t])}const E2=Ge({id:()=>
38"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:S2,load:()=>ut(()=>Ve(()=>import("./component-PaymentChallengeModal.CaRh1NUi.js"),__vite__mapDeps([200,1,16,3,4,2,5,17,6,7,8,201])))});function C2(e){return JSON.stringify([e.id,e.action.type,Nr(e.action)?e.action.challengeType:void 0,Nr(e.action)?e.action.challengeData:void 0])}function k2({modalPaymentMethodConfig:e,onModalRender:t}){const{checkout:n,observability:r}=b(),o=U(),i=Te(void 0),a=x(()=>{const c=n.latestReceipt.value;return c&&ty(c)&&Nr(c.action)?c:void 0});ze(()=>{const c=a.value;if(!c||!Nr(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||!Nr(c.action)){i.value=void 0;return}const u=C2(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=x(()=>{const c=a.value,u=e.value;if(!(!c||!Nr(c.action)))return u?{type:c.action.challengeType,data:c.action.challengeData,config:u,expiresAt:i.value?.expiresAt}:null});return s(ye,{when:l,children:c=>s(E2,{challengeType:c.type,challengeData:c.data,receipt:n.latestReceipt.value,paymentMethod:c.config,onModalRender:t,challengeExpiresAt:c.expiresAt})})}function Xs(){const e=uc(),{checkout:t}=b(),n=q().deferredTotal;return x(()=>{if(!e.value)return!0;const r=n.value?.amount.amount;return!!(dc({checkout:t})||r)})}function I2(){const{i18n:e,shopPay:t}=b(),{managedByMarketsPro:n}=q(),r=Xs();return x(()=>{if(!r.value||!hc({managedByMarketsPro:n.value}))return;const i=t.session.selectedPaymentMethod.value;if(!(!i||!Ik(i)))return e.translate("processing.redirecting_title")})}function A2({isModalRendered:e,modalPaymentMethodConfig:t}){const{i18n:n,checkout:r}=b(),o=I2();return x(()=>{if(o.value)return o.value;const i=r.latestReceipt.value;return i?Qc(i)?n.translate("processing.redirecting_notice"):ty(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 T2(e){const{observability:t}=b();F(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])}const w2=Ge({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:T2,load:()=>ut(()=>Ve(()=>import("./component-CryptoModalManager.C3mGEFjL.js"),__vite__mapDeps([202,1,2,3,4,5,189,45,70,6,7,8,203])))});function ab(){const{checkout:e}=b(),{paymentLines:t}=se(),n=q().paymentMethods,r=x(()=>b2(n.value,t.value)),o=Te(!1),i=A2({isModalRendered:o,modalPaymentMethodConfig:r}),a=pu();return ze(()=>{if(e.latestReceipt.value)return Lt({content:i.value,role:"alert"})}),s(G,{children:[s(ye,{when:a,fallback:s(v2,{}),children:s(w2,{})}),s(k2,{modalPaymentMethodConfig:r,onModalRender:()=>{o.value=!0}})]})}function lb(){const{i18n:e,url:t,source:n,shop:r,checkout:o,shopPay:i}=b(),a=o.identity.current.value==="shopPay",{plan:l,currentPage:c}=Pe().value,u=uc(),d=n.type==="cartNext"||n.type==="simulated",p=Je(),m=se().paymentLines.value,f=p.current.peek(),h=o.configuration.layout.isOnePage.value,g=_s(),y=Tk("SHOP_CASH"),_=Fn(),P=po(),v=q(),{value:E}=v.managedByMarketsPro,k=hc({managedByMarketsPro:E}),{value:S}=v.paymentFlexibilityPaymentTermsTemplate,I=ii(),C=br(f.deliveryNext),w=zr(f.deliveryNext),A=V(()=>m.some(({method:{type:O}})=>O==="paymentOnDelivery"),[m]),T=V(()=>m.some(({method:{type:O}})=>O==="customManualPayment"||O==="manualPayment"),[m]),L=V(()=>r.vaultForPaymentLater&&wk(m),[r.vaultForPaymentLater,m]),N=!!S&&!I.value,D=Ru();return V(()=>{let O=[];d&&P.value?O=[{id:"cart",route:P.value.toString()}]:O=[];const B=[...O,...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 R=p.current.peek(),$=z==null?void 0:B.slice(z+1).find(Q=>Q.skipOverPage==null||!Q.skipOverPage(R)),j=z==null?void 0:B.slice(0,z).reverse().find(Q=>Q.skipOverPage==null||!Q.skipOverPage(R));function ee(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"):L?e.translate("payment.vault_for_payment_later.pay_button_label"):N&&!D.value?e.translate("general.confirm_order_button_label"):u.value||A||T||g.value||h&&y.value?e.translate("general.complete_purchase_button_label"):k&&!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 ae(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 K(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:$?.id,label:ee(a?"thankYou":$?.id),notice:ae(a?"thankYou":$?.id)},previousPage:{label:K(j?.id),route:j?.route}}},[t,p,e,u.value,c,l.greenPath,d,m,C,w,A,T,L,h,g.value,y.value,D.value])}function L2(){const e=Pe();return x(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:n})=>n==="review")})}function cb(){const{paymentLines:e}=se();return x(()=>{const t=!!Pt(e.value,"SHOP_PAY"),n=!!Pt(e.value,"SHOPIFY_INSTALLMENTS");return xk(e.value)&&!t&&!n})}function x2(){const{i18n:e}=b();return s(by,{children:s(Z,{gap:"large-400",alignItems:"center",children:[s(_e,{children:s(io,{size:"large",appearance:"monochrome"})}),s(Ke,{children:e.translate("general.processing")})]})})}function R2(){const e=L2(),t=Ye(lb().nextPage.id),n=Fs(),{checkout:{offsitePopupController:r}}=b();return x(()=>!n.value||r.isOpen.value?!1:e.value?t.value==="thankYou":!0)}function M2(){const e=cb(),t=Pe(),n=Ye(lb().nextPage.id),{checkout:r}=b(),o=r.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:i},walletUsedForSubmissionSignal:a}=We(),l=se().paymentLines;return x(()=>{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"||!gh(d)?!1:o.value?r.wallets.escalatedWallet.value!=="APPLE_PAY":t.value.currentPage?.id==="information":o.value?!AA({paymentLines:c,walletUsedForSubmission:a.value}):a.value==="GOOGLE_PAY"?t.value.currentPage?.id==="information":n.value==="thankYou"})}function ub(){const{progressing:e}=Nt(),{i18n:t,embed:n}=b(),r=R2(),o=M2(),i=se().paymentLines,a=x(()=>n?.embedder==="google"&&!!Pt(i.value,"GOOGLE_PAY")),l=x(()=>e.value&&(o.value||r.value)&&!a.value);return ze(()=>{if(l.value)return Lt({content:t.translate("general.processing")})}),s(ye,{when:l,children:s(x2,{})})}function db(e){return function(n){return Object.fromEntries(Array.from(e).map(r=>[r,n[r]]))}}function JY(e){return function(n){return Object.fromEntries(Object.keys(n).filter(r=>!e.has(r)).map(r=>[r,n[r]]))}}const N2="_9sntZ",D2={SkipToContentLink:N2};function pb(){const{i18n:e,embed:t}=b();return t?.isEmbeddedCheckout()?null:s("a",{href:`#${A_}`,className:D2.SkipToContentLink,children:e.translate("general.skip_to_content")})}function mb(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:n}}}=b(),r=po(),{checkoutProtocolModalEventSignal:o}=Mt(),{lastJourneyProgression:i}=Je(),a=U(!1);ze(()=>{if(!Ft(e?.embedder))return;const d=i.value;d.type!=="failed"||d.reason!=="tooManyRequests"||a.current||(a.current=!0,ht(()=>Zf(e,"too_many_requests")))});const l=M(()=>{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(wn,{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(Z,{gap:"base",children:[s(W,{children:u?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),u&&s(G,{children:[s(_e,{display:"@media (inline-size >= small) none, block",children:s(an,{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(an,{variant:"primary",onClick:l,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function fb(){const e=ni(),{i18n:t}=b(),n=x(()=>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 Lt({content:o})}),null}var Am={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function O2({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:o}){const i=Vn(),a=ln(),l=e||a("processing");return i&&o==null?s(Ke,{children:l}):s("progress",{id:t,className:Y(Am.Progress,Am.toneVariant[r]),value:o,max:n,"aria-label":l})}function Bu({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:o=!0}){const{i18n:i}=b();F(()=>
38{if(!(!e||!t))return Lt({content:i.translate("general.processing")})},[e,t,i]);const a=e&&o;return s(_e,{children:[s(_e,{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(O2,{accessibilityLabel:i.translate("general.processing")})}),r==="spinner"&&s(_e,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:s(io,{size:"large",accessibilityLabel:i.translate("general.processing")})})]})]})}function hb({children:e}){return s(Rk.Provider,{value:F2,children:e})}const F2=(e,t,n,r,o)=>({onInput:i=>{V2(i,e,r,()=>{n(void 0)})},onChange:i=>U2(i,e),clearError:()=>n(void 0),onBlur:()=>z2(e,r,t,n,o),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});function B2(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;H2(a,c)&&o(c)}function V2(e,t,n,r){!t.value&&!e||(n.value=!0,r())}function U2(e,t){!t.value&&!e||(t.value=e)}function z2(e,t,n,r,o){const i=e.value;t.peek()&&B2(i,o,e,n,r)}function H2(e,t){return t?!yh(e)||e.message!==t.message:!0}var tl={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 Vu=qe(void 0);Vu.displayName="SectionContext";function q2(){return Se(Vu)}function kr({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:k}){const S=q2(),I=t==="section"?(S?.level??0)+1:S?.level??0,C=V(()=>({level:I}),[I]),w=NF(),{pending:A}=_u(),T=h?s(W2,{headingLevel:I,heading:h,children:c}):c,L=w.background??r,N=w.colorScheme??p,D=A?.border==="auto"&&L==="subdued200",O=d==="control"?"base":"baseSpecified";return s(__,{children:s(G2,{colorScheme:N,children:s(Vu.Provider,{value:C,children:s(_e,{accessibilityLabel:e,accessibilityRole:t==="presentation"?void 0:t,"aria-labelledby":n,background:(L==="base"?O:L)??(N?O:void 0),border:o,borderRadius:w.borderRadius??i,borderStyle:w.borderStyle??a,borderWidth:w.borderWidth??l,boxShadow:D?void 0:w.boxShadow,containerName:m,className:Y(N&&tl.colorSchemeVariant[N],D&&tl.autoBorderVariant[w.boxShadow??"none"],D&&tl.autoBorderWidthVariant[A?.borderWidth??"base"],u),colorLayer:d||(N?"base":void 0),display:f,id:g,maxBlockSize:y,maxInlineSize:_,minBlockSize:P,minInlineSize:v,overflow:E,padding:w.padding??k,children:I>1&&t==="section"?s(sn,{children:T}):T})})})})}function G2({children:e,colorScheme:t}){const n=Hc(),{current:r}=n,o=V(()=>t&&t!==r?{parent:r,current:t}:n,[t,r,n]);return s(As.Provider,{value:o,children:e})}function W2({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(Z,{gap:r,children:[s(Yt,{children:t}),s("div",{children:n})]}):s(G,{children:[s(Yt,{children:t}),n]})}const $2=e=>e.lineAllocations.map((t,n)=>gb(e,n)),gb=(e,t)=>{const{lineAllocations:n,...r}=e,o=n[t];if(!o)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:Y2(e.lineComponents,t),lineAllocation:o}},Y2=(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 XY(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function j2(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}function Tm(e){return e.stableId}const K2=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function yb(e,t){const n=J2(t);if(n!=null)return e[n]}function J2(e){const t=K2.exec(e);if(t?.[1]==null)return;const n=parseInt(t[1],10);if(!isNaN(n))return n}function vb(e,t,n){const r=new Set;for(const o of t){if(!n(o)||!("target"in o))continue;const i=yb(e,o.target);i?.stableId&&r.add(i.stableId)}return r}function X2(e,t=[]){return vb(e,t,n=>n.code==="MERCHANDISE_OUT_OF_STOCK")}function Uu(e,t=[]){return vb(e,t,n=>iy([n])||sy([n]))}function QY(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 Q2(e,t){return[...new Set([...e.map(Tm),...t.map(Tm)])].map(r=>({proposed:e.find(o=>o.stableId===r),negotiated:t.find(o=>o.stableId===r)}))}function _b(e,t,n,r){const o=Q2(e,t);if(r)return wm(o.filter(r));const i=Uu(e,n??[]),a=X2(e,n??[]),l=c=>{if(j2(c))return!0;const u=(c.negotiated||c.proposed)?.stableId;return i.has(u)||a.has(u)};return wm(o.filter(l))}function ZY(e,t,n){const r=e.filter(i=>Z2(i)&&n.includes(i.code)).map(i=>yb(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 Z2(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}function wm(e){return e.flatMap(t=>Mk(t.proposed)?[t]:t.proposed==null?[t]:t.negotiated?[{proposed:void 0,negotiated:t.negotiated}]:[])}function eH(){const e=b().checkout.configuration.layout.isOnePage.value,t=q(),{value:n}=t.merchandiseLines,{value:r}=t.allViolations,{currentDetour:o}=Pe().value,{value:i}=t.legacyRepresentProductsAsFees,a=se().merchandiseLines.value,[l]=ie(a),c=o?.type==="stockProblems"?l:a,u=n?.lines??[],d=f=>i?aH(f):f,p=o?.type==="thankYou"?[]:d(c),m=d(u);return tH(e,p,m,r??[])}function tH(e,t,n,r){const o=Uu(t,r),i=n.filter(({quantity:u,stableId:d})=>u>0&&!o.has(d)),a=_b(t,n,r).map(({proposed:u,negotiated:d})=>d??u),l=i===void 0||i.length===0&&a.length>0;return nH(l?a:i,t,l,e)}function nH(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 $2({...o,lineAllocations:a}).map(c=>rH(c,o,r))})}function rH({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(oH),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(iH).map(o=>sH(o,e.stableId))}}const oH=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}}),iH=e=>bf(e.discountDetails.discount)&&e.discountDetails.discount.presentationLevel==="LINE",sH=(e,t)=>({id:`allocation-${t}-${vh(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function aH(e){return e.filter(t=>t.legacyFee===!1)}function zu(){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:cH(a.image)??void 0,totalAmountAfterLineDiscounts:a.priceAfterDiscounts,totalAmountBeforeReductions:a.price,quantity:a.quantity,subtitle:a.variantTitle,lineDiscounts:a.appliedDiscounts.filter(lH).map(c=>uH(c,l)),parentTitle:a.parentTitle,components:[],unitPrice:null,totalPrice:a.priceAfterDiscounts})),o=eH();return[...t?o.filter(a=>a.quantity>0):o,...r]}const lH=e=>e.presentationLevel==="LINE",cH=e=>e?{...e,altText:e.altText||""}:null,uH=(e,t)=>({id:`allocation-${t}-${vh(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function Qs(){const e=Ye(zu()),t=q().remoteMerchandiseDetails,{shop:{id:n}}=b();return x(()=>{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:ho(l.merchandise.price),totalAmountBeforeReductions:ho(l.merchandise.price),totalAmountAfterLineDiscounts:ho(l.merchandise.price),totalPrice:ho(l.merchandise.price),deferredAmount:l.merchandise.deferredAmount?ho(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})}const dH=2,pH=3;function mH(e){const{inlineSize:t}=yi(e),n=t+2*SF,r=U(n);r.current=n;const o=Te(dH),i=U(null);return{ref:M(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;const m=parseFloat(getComputedStyle(p).columnGap)||0,f=Math.floor((d+m)/(r.current+m));o.value=Math.min(pH,Math.max(1,f))});c.observe(l),i.current=c},[o]),max:o}}var Ze={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 fH=Xe("ResourceList");function bb({children:e,title:t,titleHidden:n,spacing:r="base",border:o="none"}){const i=$e(void 0,fH),a=Y(Ze.ResourceList,r&&Ze.rowGroupSpacingVariant[r],o&&Ze.borderVariant[o
38]),l=t?s(Yt,{id:i,children:t}):null,c=V(()=>({spacing:r}),[r]);return s(G,{children:[t&&n?s("div",{className:Ze.visuallyHidden,children:l}):l,s(sn,{children:s("div",{role:"table","aria-labelledby":i,className:a,children:s(Hu.Provider,{value:c,children:e})})})]})}function Pb({children:e,hidden:t,blockPadding:n}){const r=Y(Ze.ResourceListHeader,n&&!t&&Ze.resourceListHeaderBlockPaddingVariant[n]);return s("div",{role:"rowgroup",className:Y(Ze.ResourceListRowGroup,t&&Ze.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?Ze.primary:void 0,n&&Ze.visuallyHidden),children:e})}const Hu=qe(void 0);function Sb({children:e}){return e?s("div",{role:"rowgroup",className:Ze.ResourceListRowGroup,children:e}):null}const qu=qe(void 0);function hH({spacing:e,children:t,showLines:n=!0}){const r=V(()=>({spacing:e}),[e]),o=V(()=>({showLines:n}),[n]);return s(Hu.Provider,{value:r,children:s(qu.Provider,{value:o,children:t})})}function gH({lineOffset:e=0}){const t=Se(qu);return s("div",{"aria-hidden":!0,className:Ze.ResourceItemLineContainer,style:vn({[Ze.lineOffsetVar]:ds(e)}),children:[s("div",{className:Y(Ze.ResourceItemLine,Ze.ResourceItemLineVertical,t?.showLines&&Ze.visibleLine)}),s("div",{className:Y(Ze.ResourceItemLine,Ze.ResourceItemLineCurved,t?.showLines&&Ze.visibleLine)})]})}function yn({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}=Tt({minBlockSize:i}),p=Y(Ze.ResourceItemContent,Ze.resourceItemContentInlineAlignment[c],e&&Ze.resourceItemContentAlignSelf[e],r&&Ze.resourceItemContentPrimary,o&&Ze.resourceItemContentHidden,a&&Ze.resourceItemContentNoWrap,u);return s("div",{role:"cell",className:p,style:d,children:o?s("div",{className:Ze.visuallyHidden,children:n}):n})}function Zs({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:o}){const i=Se(Hu),a=Se(qu);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const l=Y(Ze.ResourceItem,t&&Ze.resourceItemBlockPaddingVariant[t],i?.spacing&&Ze.rowSpacingVariant[i.spacing],n&&Ze.resourceItemSpacingVariant[n],a&&Ze.groupedResourceItem,o);return s("div",{role:"row",className:l,children:[s(gH,{lineOffset:r}),e]})}const Lm=Ge({displayName:"ProductDisclosuresDetails",load:()=>ut(()=>Ve(()=>import("./component-ProductDisclosuresDetails.C9yD6Tl3.js"),__vite__mapDeps([204,1,2,3,4,5,6,7,8]))),suspense:!1});function yH(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 Rn={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 vH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",_H=100,Eb=oo(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}=Tt({..._r({border:d,borderStyle:m,borderWidth:f}),borderRadius:p,objectFit:a}),E=d_(n,t),S=!(n||t||r),I=n??p_(t)??r??vH,[C,w]=ie(S);F(()=>{if(!S){w(!1);return}const O=setTimeout(()=>w(!1),_H);return()=>{clearTimeout(O)}},[S]);const{animationEnabled:A,delay:T,onAnimationStart:L,onAnimationIteration:N}=y_();return s(bH,{condition:P,children:s(PH,{condition:y!=="auto",aspectRatio:c,children:s(u_,{condition:!!E,children:[E,s("img",{..._?{onError:O=>_(O.nativeEvent)}:{}
38,src:I,srcSet:r,sizes:o,className:Y(Rn.Image,Rn.inlineSizeVariant[y],S&&A&&Rn.skeleton,S&&C&&Rn.hidden,v,h),style:{...vn({[Rn.vars.animationDelay]:`${T}ms`,[Rn.vars.animationDuration]:`${yu}ms`})},onAnimationStart:L,onAnimationIteration:N,loading:l,id:g,role:P?u:void 0,alt:P?"":i,"aria-hidden":S?"true":void 0})]})})})});function bH({children:e,condition:t}){return t?s(_e,{accessibilityVisibility:"hidden",children:e}):s(G,{children:e})}function PH({children:e,condition:t,aspectRatio:n}){const r=yH(n);return t&&r!==void 0?s("div",{className:Y(Rn.Wrapper,Rn.aspectRatio),style:vn({[Rn.aspectRatioVar]:`${r}`}),children:e}):s(G,{children:e})}const SH={small:16,large:24};function EH({disclosure:e,size:t}){const n=e.symbol;if(n){const r=`${SH[t]}px`,o=t==="small"?"":n.altText??"";return s(_e,{inlineSize:r,blockSize:r,children:s(Eb,{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(Re,{type:"info",size:t==="small"?"small":"large-100",tone:"auto"})}const CH=Xe("product-disclosure-modal-"),kH=Xe("product-disclosure-tooltip-");function zl({disclosures:e,title:t}){const{shop:n}=b(),r=n.hasFlagEnabled(Fk),o=Je(),i=_i("deliveryNext"),a=x(()=>!i.value&&(o.initialUnresolvedFields.value.size===0||o.pendingFieldsNegotiation.value?.status==="fetch_failed"));return r&&!a.value||!e?.length?null:s(IH,{disclosures:e,title:t})}function IH({disclosures:e,title:t}){const{i18n:n}=b(),r=$e(void 0,CH),o=$e(void 0,kH),i=Lm.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(lt,{commandFor:r,interestFor:o,accessibilityLabel:c,onFocus:a,onMouseEnter:a,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:s(Re,{type:"alert-triangle",size:"small"})}),s(Sn,{id:o,children:AH(e)}),s(wn,{id:r,heading:l,children:s(Lm,{disclosures:e})})]})}function AH(e){return s(_e,{inlineAlignment:"start",children:s(Z,{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(EH,{disclosure:t,size:"small"})}),s(Ke,{textAlign:"start",children:t.title})]},t.id))})})}function Cb(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}}var Hn={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 kb({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(Re,{size:u,type:a,tone:TH(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(Hn.Badge,Hn.displayVariant[h],Hn.toneColorVariant[d==="auto"?"neutral":d][r],Hn.sizeVariant[wH(u)],Hn.borderRadiusVariant[o],a&&Hn.iconVariant,p==="hidden"&&Hn.visuallyHidden),"aria-hidden":t==="hidden"?!0:void 0,children:e?s(G,{children:[s("span",{className:Hn.visuallyHidden,children:e}),f]}):f})}function TH(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function wH(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function LH(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 xH({stableId:e,merchandiseLines:t}){if(!e)return null;const n=LH(e,t);if(!n)return null;const{parent:r,index:o}=n;return gb(r,o)}function RH({stableId:e,merchandiseLines:t}){return!xH({stableId:e,merchandiseLines:t})?.variantId}function Gu(){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}
38){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 ej(){const e=Gu();function t(n){return n?n.map(e):void 0}return t}function MH({available:e,name:t,value:n}){const r=`${t}: ${n}`;return typeof n=="string"&&n.lastIndexOf("https://cdn.shopify.com",0)===0?s(lt,{href:n,children:s(xm,{condition:e,children:s(W,{size:"small",color:"subdued",children:t})})}):s(xm,{condition:e,children:s(W,{size:"small",color:"subdued",children:r})})}function xm({condition:e,children:t}){return e===!1?s(W,{type:"redundant",children:t}):t}function Ib({properties:e,available:t}){const n=e.flatMap(({name:r,visible:o,value:i,sourceType:a})=>o&&a!=="MerchandisePropertyValueJson"&&i!==""&&i!==null?[s(_e,{accessibilityRole:"list-item",children:s(MH,{available:t,name:r,value:i})},r)]:[]);return n.length>0?s(Z,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}const NH="dDm6x",DH={wordBreak:NH};function OH({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(),k=V(()=>e&&!g?{stableId:e}:null,[e,g]),S=c??"small",I=v.size??"small",{i18n:C}=b(),w=n&&n.length>0,A=P==="middot"?" · ":", ",T=Gu(),{value:L}=q().merchandiseLines,N=Pe(),D=x(()=>N.value.currentDetour?.type==="thankYou"?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter"),O=it(D.value),B=RH({stableId:e,merchandiseLines:L?.lines??[]})?[]:O,z={size:I,color:y},R={size:I,color:y},$=f||h;return s(_e,{className:DH.wordBreak,children:[$?s(Z,{direction:"inline",gap:"small-300",children:[f?s(W,{size:"small",color:"subdued",children:f}):null,h?s(kb,{icon:"alert-circle",tone:"critical",children:C.translate("order_summary.unconfirmed_label")}):null]}):null,s(Ke,{size:S,children:[s(FH,{condition:E.weight==="bold",children:l}),p]}),s(Z,{children:[m,_==="inline"&&a?s(Ke,{...R,children:a}):null,_==="inlineDescriptionList"&&w?s(Ke,{...R,children:n?.map(({name:j,value:ee})=>`${j}: ${ee}`).join(A)}):null,_==="descriptionList"&&w?s(_e,{accessibilityRole:"unordered-list",children:n?.map(({name:j,value:ee})=>{const ae=`${j}: ${ee}`;return s(_e,{accessibilityRole:"list-item",children:s(W,{...z,children:ae})},j)})}):null,i?.name?s(Ke,{...R,children:i.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?s(Ke,{...R,children:T(o)}):null,r&&s(Ib,{properties:r}),d,k?s($t,{customizations:B,options:k}):null]})]})}function FH({condition:e,children:t}){return e?s(W,{type:"strong",children:t}):t}function BH({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(Ke,{type:"small",color:"subdued",children:r})}const Ab=qe(null);function VH(){return Se(Ab)}var nl={Summary:"_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u",Icon:"_1mwdekd3 _1mwdekd2 _1fragem6e"};function Tb({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:o}=VH()??{},i=r!==void 0;return e?i?s("button",{id:t,className:nl.Summary,onClick:n,"aria-controls":o,"aria-expanded":r,type:"button",children:[e,s(Re,{size:"small-200",type:r?"chevron-up":"chevron-down",className:nl.Icon})]}):s("p",{id:t,className:nl.Summary,children:e}):null}const UH=Xe("Details"),zH=ww(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]=ie(n),m=u?t:d,f=`${$e(i,UH)}
38-content`,h=U(),g=M(v=>{v?.preventDefault();const E=k=>{typeof r=="function"&&r(k?"open":"closed",k?"closed":"open")};u?E(m):p(k=>(E(k),!k))},[u,m,r]),y=v=>{const E=h.current==="entering"&&v==="entered",k=h.current==="exiting"&&v==="exited";(E||k)&&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");const _=typeof a=="string"?s(Tb,{children:a}):a,P=V(()=>({isOpen:m,onToggle:g,contentId:f}),[f,g,m]);return s(Ab.Provider,{value:P,children:s("div",{id:i,children:[_,s(hn,{id:f,open:m,duration:c==="auto"?"base":"none",onTransition:y,children:l})]})})});var Rm={overflowHidden:"_1r0jjrp0 _1fragemup _1fragemv4",visuallyHidden:"_1r0jjrp1 _1fragem121"};function Mm({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:k="0",overflow:S="visible",padding:I="none",paddingBlock:C,paddingBlockEnd:w,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:N}){const D=no(),{Element:O,role:B}=ui(t,{defaultElement:D?"span":"div"}),{className:z,style:R,styleElement:$}=Tt({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:k,padding:I,paddingBlock:C,paddingBlockEnd:w,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:N},{transforms:{display:Tc}});return s(G,{children:[$,s(O,{"aria-hidden":n==="hidden"?!0:void 0,"aria-label":e,className:Y(n==="exclusive"&&Rm.visuallyHidden,S==="hidden"&&Rm.overflowHidden,z),id:y,role:B,style:R,children:m})]})}const HH={auto:"block",inline:"inlineBlock",block:"block"},Nm=e=>e==="auto"?"auto":e in en?en[e]:void 0,qH=e=>HH[e];function zt({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:o,style:i}=Tt({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:Nm,display:qH,inlineSize:Nm}});return s("div",{className:Y(o),id:r,style:i})}function GH({components:e,id:t}){const n=e.some(({merchandise:h})=>h.disclosures?.length),[r,o]=ie(e.length<=10||n),i=M(()=>{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(Z,{gap:"base",overflow:"hidden",children:[s($t,{customizations:d,options:m}),h.map(({stableId:g,merchandise:y})=>s(W,{size:"small",children:[y.title," ",s(zl,{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(zH,{open:r,onToggle:i,summary:s(Tb,{children:s(W,{color:"subdued",size:"small",children:f})}),content:s(_e,{paddingBlockStart:"small-400",children:s(Z,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map(({stableId:h,merchandise:{title:g,subtitle:y,image:_,sellingPlan:P,disclosures:v},quantity:E,properties:k})=>{const S=a.translate("order_summary.component_quantity_title",{quantity:E,product_title:g}),I=Cb(l,_);return s(gt,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[s(Mm,{alignSelf:"start",children:s(js,{size:"small",src:I?.one,srcSet:I?`${I.one} 1x, ${I.two} 2x, ${I.four} 4x`:void 0,alt:_?.altText})}),s(Mm,{alignSelf:"center",children:s(Z,{children:[v?.length?s(W,{size:"small",children:[S," ",s(zl,{disclosures:v,title:g})]}):s(W,{size:"small",children:S}),y&&s(W,{...u,children:y}),P&&s(W,{...u,children:P.name}),k&&s(Ib,{properties:k})]})})]},h)})})})}),s(zt,{blockSize:"small-400"})]})}function WH({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(Ke,{...r,children:o})}function Wu(e){return e.checkoutHideZeroValueDiscountLines===!0}function $H({discount:e,amount:t}){const{i18n:n,shop:r}=b();if(Wu(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(Re,{type:"discount",size:"small"}),s(W,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),s(Ke,{type:"small",color:"subdued",children:[s(W,{dir:"auto",children:a}),i?` ${i}`:null]})]},e.title)}function Dm({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=b(),o=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):s(W,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return s(G,{children:[s(W,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),s(W,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),s(W,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),s(Ke,{size:n,children:o})]})}function YH({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(Dm,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:a});if(e.amount>
38t.amount&&r==="LINE")return s(Dm,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:a});const d=e.amount===0&&!o,p=d?"uppercase":void 0,m=t;return s(W,{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 jH(){const{i18n:e}=b();return M(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 KH(e){const{i18n:t}=b(),n=jH();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 JH({unitPrice:e}){const t=KH(e);return e===null?null:s(Ke,{type:"small",color:"subdued",children:t})}function XH({unitPrice:e,itemPrice:t,quantity:n}){const o=!!q().buyerIdentity.value?.purchasingCompany&&!e&&n>1&&t,{i18n:i}=b();return e?s(JH,{unitPrice:e}):o?s(G,{children:s(Ke,{type:"small",color:"subdued",children:[s(W,{accessibilityVisibility:"hidden",children:i.translate("order_summary.price_per_item.label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),s(W,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.price_per_item.accessibility_label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const QH="Byb5s",ZH={Line:QH},eq={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function wb(e="base"){return eq[e]}function tq(e){const n=e.parentRelationship?hH:G;return s(n,{spacing:"small100",children:s(nq,{...e})})}function nq({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:k,parentRelationship:S,remoteShopName:I,hasFailed:C,hideRuntimeExtensions:w,hidePrice:A,className:T}){const{shop:L,i18n:N,embed:D}=b(),O=Cb(D,f),{lineItems:{quantityVisibility:B="visible",priceLayout:z="inline",priceTypography:R={},titleTypography:$={}},merchandiseThumbnail:{size:j}={}}=ct(),ee=L.hasFlagEnabled(Bk),ae=S!==null,K=ee&&r?{amount:r.amount*t,currencyCode:r.currencyCode}:null,Q=V(()=>{if(ee&&r&&n){const he=(r.amount-n.amount)*t;return he>0?{amount:he,currencyCode:r.currencyCode}:null}return null},[ee,r,n,t]),X=R.size,H=ae?"small":wb(j),ue=$.size??"base",{blockSize:re}=yi(H),de=B==="hidden"||t===1&&B==="visibleWhenMultiple"?void 0:t,ke=A?null:s(YH,{totalAmountBeforeReductions:_,totalAmountAfterLineDiscounts:P,compareAtTotal:K,presentationLevel:i.length||Q?.amount?"LINE":"CART",hasDeferredAmount:!!a?.amount,hasFailed:C,size:X});return s(Zs,{className:T,lineOffset:S?0:re/2,children:[s(yn,{inlineAlignment:"start",children:s(js,{size:H,src:O?.one,srcSet:O?`${O.one} 1x, ${O.two} 2x, ${O.four} 4x`:void 0,alt:f?.altText,totalItems:de})}),s(yn,{primary:!0,alignSelf:"baseline",minBlockSize:`${re}px`,children:s(OH,{id:e,title:p,titleSize:ue,subtitle:m,properties:h,sellingPlan:c,options:u,recurringTotal:d,totalPrice:l,deferredAmount:a,titleAccessory:g?.length?s(G,{children:[" ",s(zl,{disclosures:g,title:p})]}):void 0,blockLayoutContent:z==="block"?ke:void 0,remoteShopName:I,hasFailed:C,hideRuntimeExtensions:w,children:[y?s(W,{size:"small",color:"subdued",children:N.translate("payment.shop_pay_hsa.eligible_product")}):null,E?s(W,{size:"small",color:"subdued",children:N.translate("amazon_pay.prime_returnability")}
38):null,s(XH,{unitPrice:o,itemPrice:n,quantity:t}),Q?.amount?s(BH,{amount:Q}):null,i.length>0||v.length>0?s(G,{children:[i.map(he=>s($H,{discount:he.discount,amount:he.amount},he.id)),s(GH,{components:v,id:e})]}):null,v.length<1&&k?s(WH,{parentTitle:k}):null]})}),s(yn,{hidden:!0,children:s(W,{children:t})}),z==="inline"?s(yn,{alignSelf:"baseline",children:s(_e,{className:ZH.Line,inlineAlignment:"end",children:ke})}):null]})}const rq="KKoGf",oq="kAxbv",Om={SettleDown:rq,SettleUp:oq};function iq(e){switch(e){case"PICK_UP":return Om.SettleUp;case"SHIPPING":return Om.SettleDown;default:return}}function Lb(e){return e!==Wn.Country&&e!==Wn.CountryProvince}function sq(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 aq(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}function lq(e,t,n,r){return t?n==="unavailable"||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}function tj({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 nj(e,t,n,r,o){const i=Cy(n??[],e?.handle);let a=lq(e?.displayCheckoutRedesign,t,o,i),l,c,u,d;r||(l=i?.minDeliveryDateTime||e?.minDeliveryDateTime,c=i?.maxDeliveryDateTime||e?.maxDeliveryDateTime,u=aq(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 rj(e){const t=[],n=[];return e.forEach(r=>{r.type==="SUBSCRIPTION"?t.push(r):n.push(r)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function oj(e,t,n){const r=Cy(t,e.handle);let o;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(o=r),{deliveryExpectation:o,shopPromise:r?.brandedPromise}}function ij(e){return e.reduce((t,{quantity:n})=>t+n,0)}function sj(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 cq(e){const t={};return e?.deliveryExpectationLines?.forEach(n=>{n.deliveryStrategyHandle&&(t[n.deliveryStrategyHandle]=n)}),t}function uq({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=cq(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!==Vk)return;const u=r[l]?.returnability??!1;o.targetMerchandiseLines?.forEach(d=>n[d.stableId]={brandedPromise:a,hasReturnability:u})}),n}function aj(e){if(!e)return[];const t=e.reduce((n,r)=>{const o=r?.flatRateGroupId??_l(),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 dq(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 pq={position:"end",source:"magnify"};function Fm({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:r,deliveryGroup:o}){const[i,a]=ie(""),{i18n:l,checkout:c}=b(),u=new Set(Uk(c.proposal.negotiated.fields.paymentMethods.value)),d=t===void 0?n.map(v=>v.key):n.slice(0,t).map(v=>v.key),p=dq(n.map(v=>v.key),d),m=iq(o),{value:f}=mc(),{value:h}=q().deliveryExpectations,g=V(()=>uq({deliveryLines:f,deliveryExpectations:h}),[f,h]),y=V(()=>
38{const v=i.toLowerCase().split(" ").filter(Boolean);return n.filter(E=>v.every(k=>E.title.toLowerCase().includes(k)||E.subtitle?.toLowerCase().includes(k)))},[i,n]),_=V(()=>y?.reduce((v,E)=>v+E.quantity,0),[y]),P=n.length;return s(G,{children:[e&&s(G,{children:[s(nb,{autoFocus:!0,icon:pq,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(Z,{direction:"inline",justifyContent:"space-between",children:[s(W,{color:"subdued",children:l.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:_,totalNumber:r||P||0})}),s(lt,{onClick:()=>a(""),children:l.translate("order_summary.more_items_modal.clear_search")})]}),s(zt,{blockSize:"large-300"})]}),e&&y.length===0?s(Z,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[s(_e,{inlineSize:"56px",children:s(Re,{size:"fill",type:"alert-circle"})}),s(Ke,{textAlign:"center",children:l.translate("order_summary.more_items_modal.empty_results",{searchText:i})})]}):s(bb,{title:l.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[s(Pb,{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(Sb,{children:y.map(({key:v,...E},k)=>{if(t!==void 0&&k>=t)return null;const S=v.substring(0,v.lastIndexOf("-"));return s(tq,{...E,isHsaEligible:!!(E.productId&&u.has(E.productId)),...g[S]??{},className:p.has(v)?m:void 0},v)})})]})]})}const mq=12,Bm=16,fq="merchandise-lines-modal";function $u({merchandiseLines:e,modalId:t=fq,totalLineQuantities:n,deliveryGroup:r}){const{i18n:o}=b(),i=e.length,a=i>Bm?mq:Bm;return s(G,{children:[s(Fm,{maxItems:a,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>a&&s(Z,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[s(an,{inlineAlignment:"center",commandFor:t,children:o.translate("order_summary.view_all_items",{count:n||i||0})}),s(wn,{id:t,heading:o.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:s(Fm,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function hq({merchandiseLinesByDeliveryType:e}){const{i18n:t}=b(),n=x(()=>{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(Z,{gap:"large-200",children:s(Zn,{each:n,getKey:i=>i.group,children:({group:i,merchandiseLines:a,totalLineQuantities:l})=>s(Z,{gap:"base",children:[s(Yt,{level:2,children:r(i)}),s($u,{merchandiseLines:a,modalId:o(i),totalLineQuantities:l,deliveryGroup:i})]})})})}function gq({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 vq("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 yq);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(Z,{gap:"large-200",children:Array.from(l.entries()).map(([y,{lines:_,includeTotalLineQuantities:P}
38])=>s(Z,{gap:"base",children:[s(Yt,{level:2,children:y}),s($u,{merchandiseLines:_,totalLineQuantities:P?t:void 0})]},y))})}class yq extends bn{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 vq extends bn{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const _q=["PICK_UP","SHIPPING","NOT_REQUIRED"];function xb(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 bq(e){return xb(e.deliveryMethodTypes)}function Pq(e){if(e.status==="not_required")return"NOT_REQUIRED";const t=e.methods.find(({handle:n})=>n===e.selectedDeliveryMethodHandle);return xb(t?[t.methodType]:e.methods.map(({methodType:n})=>n))}function Sq(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 Eq(...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=Sq(o,l);c&&i.set(a.stableId,c)}),i.size>0&&t.set(o.stableId,{parentStableId:r.stableId,componentsByParentAllocationStableId:i})}return t}function Cq(){const e=wu(),t=Pe(),n=Ye(zu()),r=se(),o=r.deliveryLines,i=r.merchandiseLines,{deliveryNext:a,merchandiseLines:l}=q();return x(()=>{const c=n.value,u=new Map;if(c.length===0||!e.value)return u;const d=Eq(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,C)=>{const w=m.get(S)??new Map;if(!C){w.set(I.key,I),m.set(S,w),f.add(I.key);return}const A=w.get(I.key)?.components??[];w.set(I.key,{...I,components:A.some(({stableId:T})=>T===C.stableId)?A:[...A,C]}),m.set(S,w),f.add(I.key)},g=[],y=new Map,_=(S,I)=>{const C=I.requiresShipping?S:"NOT_REQUIRED";if(!C)return!1;const w=d.get(I.stableId),A=w?.parentStableId??I.stableId;if(!w){const T=y.get(A)??new Set;T.add(C),y.set(A,T)}return g.push({bundleComponent:w,group:C,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)})&&!Vs(t.value.currentDetour))for(const S of o.value){const I=bq(S.value);for(const C of S.value.targetMerchandiseLines??[])if(!_(I,C))return u}else if(a.value?.status!=="unavailable")for(const S of a.value?.lines??[]){const I=Pq(S);for(const C of S.targetMerchandiseLines??[])if(!_(I,C))return u}if(Array.from(y.values()).some(S=>S.size>1))return u;const E=({bundleComponent:S,group:I,parentStableId:C})=>{const w=p.get(C);if(!w)return!0;for(const A of w){if(!S){h(I,A);continue}if(!A.id)return!1;const T=S.componentsByParentAllocationStableId.get(A.id);if(!T)return!1;h(I,A,T)}return!0};for(const S of g)if(!E(S))return u;if(c.some(({key:S})=>!f.has(S)))return u;const k=new Map;for(const S of _q){const I=m.get(S);I?.size&&k.set(S,Array.from(I.values()))}return k})}const kq="aFPS3",Iq="vlAqA",Aq="mLkrk",Tq="bLzIf",To={CollapsibleLineItemsToggleOverlay:kq,CollapsibleLineItemsToggleSizer:Iq,CollapsibleLineItemsToggleButton:Aq,CollapsedLineItemThumbnails:Tq},wq=Xe("CollapsibleLineItems"),rl=e=>s(kr,{children:e}),Lq=Qn(function(){const t=Ye(zu()),n=Qs(),{i18n:r,shop:{id:o}}=b(),i=Pe(),{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(T=>T.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=x(()=>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=x(()=>Array.from(n.value.values()).reduce((T,L)=>T+L.reduce((N,D)=>N+D.quantity,0),0)),k=x(()=>Array.from(n.value.entries()).some(([T,L])=>T!==o&&L.length>0)),S=x(()=>t.value.length>0||k.value),I=Cq(),C=x(()=>!k.value&&I.value.size>1),w=u==="collapsible"&&!k.value&&t.value.length>1,A=s(Z_,{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(ye,{when:k,fallback:s(ye,{when:C,fallback:s($u,{merchandiseLines:t.value,totalLineQuantities:E.value}),children:s(hq,{merchandiseLinesByDeliveryType:I})}),children:s(gq,{merchandiseLinesByShop:n.value,totalLineQuantities:E.value})})});return s(ye,{when:S,children:s(Z,{gap:"large-200",children:[s($t,{customizations:_,render:rl}),s(kr,{children:w?s(xq,{merchandiseLines:t.value,showQuantityBadges:m,children:A}):A}),s($t,{customizations:v,render:rl}),s($t,{customizations:P,gap:"large-200",render:rl})]})})});function xq({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=Te(!0),{i18n:o}=b(),{size:i}=ct().merchandiseThumbnail??{},a=wb(i),l=o.translate("order_summary.number_items",{count:t.reduce((g,y)=>g+y.quantity,0)}),c=$e(void 0,wq),{blockSize:u}=yi(a),d=Mq(t),p=()=>{r.value=!r.value},m=()=>s(W,{children:l}),f=g=>s(gt,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[s(_e,{minInlineSize:"0",overflow:"hidden",children:g}),s(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:[m(),s(Re,{type:"chevron-down",size:"small-100"})]})]}),h=()=>s(Z,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[m(),s(Re,{type:"chevron-up",size:"small-100"})]});return s(_e,{position:"relative",minBlockSize:`${u}px`,children:[s(hn,{id:`${c}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:s(Z,{gap:"base",children:[s("div",{"aria-hidden":"true",children:h()}),s("div",{id:c,children:e})]})}),s(hn,{id:`${c}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:s("div",{"aria-hidden":"true",children:f(s(Rq,{thumbnailMerchandise:d,thumbnailSize:a,showQuantityBadges:n}))})}),s("div",{className:To.CollapsibleLineItemsToggleOverlay,children:[s("div",{"aria-hidden":"true",className:To.CollapsibleLineItemsToggleSizer,children:[s(hn,{id:`${c}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:h()}),s(hn,{id:`${c}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:f(s("div",{className:To.CollapsedLineItemThumbnails,children:s(Nu,{variant:"inline-discrete",merchandise:d.slice(0,1),size:a,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),s("div",{className:To.CollapsibleLineItemsToggleButton,children:s(Tn,{accessibilityLabel:l,"aria-controls":c,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:p})})]})]})}function Rq({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:o}=mH(t);return s("div",{ref:r,className:To.CollapsedLineItemThumbnails,children:s(Nu,{variant:"inline-discrete",merchandise:e,size:t,max:o.value,useImageAltTexts:!1,showQuantityBadges:n})})}function Mq(e){return e.map(t=>({stableId:t.stableId??t.key,image:t.image,quantity:t.quantity,totalPrice:t.totalPrice}))}function Rb(){const e=U();return F(()=>()=>{const t=e.current;t&&la.containers.delete(t)},[]),t=>{t&&(e.current&&la.containers.delete(e.current),la.containers.add(t),e.current=t)}}const Mb=qe({spacing:"auto"});function Xt({spacing:e,children:t}){const n=V(()=>({spacing:e}),[e]);return s(Mb.Provider,{value:n,children:t})}function Nb(){return Se(Mb)}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"},Vr={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 Nq(e){return"children"in e&&Et(e.children)}function tt(e){const{spacing:t}=Nb(),{moneyLines:{color:n="base"}}=ct(),{itemSize:r="inherit",layout:o="inherit",color:i}=e,a=i??n,l=Y(Vr.MoneyLine,r&&Vr.itemSizeVariant[r],t&&ur.groupSpacingVariant[t],o&&Vr.layoutVariant[o
38]);return s("div",{className:l,role:"row",children:Nq(e)?e.children:s(G,{children:[s(wt,{children:s(W,{color:e.labelColor,children:e.label})}),s(Ct,{loading:e.loading,children:e.loading?s(vu,{size:e.size,emphasis:e.type==="strong"?"bold":void 0,children:e.value}):s(W,{type:e.type,size:e.size,translate:!1,color:a,children:e.value})})]})})}function wt({children:e}){return s("div",{className:Vr.Header,role:"rowheader",children:e})}function Ct({children:e,loading:t,colSpan:n}){return s("div",{className:n?Vr.contentColSpan:Vr.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const Dq=Xe("MoneyLine-Heading"),Oq=at(function(t,n){const{children:r,title:o,titleHidden:i=!0,spacing:a="auto"}=t,l=$e(void 0,Dq),c=ln(),{moneyLines:{color:u="base"}}=ct(),d=s(Yt,{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 or({condition:e,children:t,skeletonContent:n,...r}){return s(G,{children:[s(vu,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),s(W,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}function Fq(){const{i18n:e}=b(),n=q().alternativePaymentCurrency,r=He("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:o}=Mt(),i=x(()=>{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(ye,{when:i,children:({loading:a,text:l})=>s(tt,{children:s(Ct,{children:s(or,{condition:a,size:"small",color:"subdued",children:a?"$0.00":l})})})})}function Bq({children:e}){return typeof e=="function"?e():e}function Db({children:e}){return typeof e=="function"?e():e}function Vq(e){return e.props.condition!==void 0}function Uq(e){return typeof e=="function"?e():e}function Dr({children:e}){let t,n;return rS.forEach(e,r=>{oS(r)&&(!t&&Vq(r)?Uq(r.props.condition)&&(t=r):!n&&r.type===Db&&(n=r))}),t??n??null}Dr.When=Bq;Dr.Fallback=Db;const zq=Xe("TaxesTooltip");function Vm({label:e,subdueText:t}){const{i18n:n,source:r}=b(),o=$e(void 0,zq);return s(G,{children:[s(W,{color:t?"subdued":void 0,children:e}),s(Re,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),s(Sn,{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 Hq="•";function Or({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(tt,{color:l,children:[s(wt,{children:s(Dr,{children:[s(Dr.When,{condition:!!r,children:s(W,{color:l,children:r})}),s(Dr.When,{condition:!!o,children:s(W,{color:l,children:a.translate("order_summary.taxes_label")})}),s(Dr.Fallback,{children:s(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:s(Vm,{label:a.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),s(Ct,{children:s(Z,{direction:"inline",gap:"small-200",children:[t?s(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(Vm,{subdueText:i,label:a.translate("order_summary.estimated_taxes_label_short")}),s(W,{color:l,children:Hq})]}
38):null,s(or,{condition:n,color:l,children:n?"$0.00":a.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const qq={marginTop:"0"};function Yu({id:e,title:t,subdueTitle:n,tooltipText:r,children:o,item:i,hideHeaderItemWhenOpen:a=!1}){const{i18n:l}=b(),c=Te(!1);return s(G,{children:[s(tt,{children:[s(wt,{children:s(Z,{direction:"inline",gap:"small-200",alignItems:"center",children:[s(Tn,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.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(Ke,{color:n?"subdued":void 0,textAlign:"start",children:t}),s(Re,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?s(Tn,{accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t}),overlay:s(Sn,{children:r}),children:s(Re,{type:"question-circle",size:"small"})}):null]})}),i&&!(a&&c.value)?i:null]}),s("div",{style:qq,children:s(hn,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:o})})]})}function Ob(){const{checkout:e}=b(),t=q().taxes,n=_h();return x(()=>{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 Fb(){const{i18n:e}=b(),t=Ob();return x(()=>{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 Um({label:e}){return s(Xt,{spacing:"small-500",children:s(tt,{children:[s(wt,{children:s(Ke,{color:"subdued",children:s(Cr,{children:e})})}),s(Ct,{})]})})}function ju({taxesIncluded:e,variant:t,shopId:n}){const{i18n:r}=b(),o=Zr(),{localTotalTaxIncluded:i,totalTaxIncluded:a}=Ob().value,l=Fb(),c=bh(i),u=x(()=>[...c.value.entries()]),d=x(()=>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(Um,{label:m})}return!e||a===null||l.value===null||a.amount===0?null:t==="card"?s(_e,{children:s(Ke,{color:"subdued",children:s(Cr,{children:l})})}):s(ye,{when:d,fallback:s(Um,{label:l.value}),children:s(Yu,{id:"included-tax-money-line",title:l.value,children:s(Xt,{spacing:"small-400",children:s(Zn,{each:u,getKey:([p])=>p,children:([,p])=>s(Or,{totalTax:p.totalTax,taxesLabel:p.shopName,showMoneyLineTaxesTooltip:p.status==="available_total",subdueText:!0})})})})})}function Gq(){const{i18n:e}=b();return M(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}function zm({title:e,value:t,color:n,labelColor:r}){const o=Gq();return s(tt,{label:e,value:o(t),color:n,labelColor:r})}function Wq(e,t){const{i18n:n}=b(),r=J_();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 $q({variant:e=void 0,shopId:t}){const n=q(),{value:r}=n.deferredTotal,o=Fn(),{checkout:i}=b(),a=bs(),l=x(()=>a.value||!!i.proposal.facts.taxesIncluded),{value:c}=n.paymentFlexibilityPaymentTermsTemplate,u=r&&r.amount.amount>0,d=ii(),p=bi(),m=x(()=>!!(d.value&&!p.value)),f=r?.dueAt||(c?.dueDate?new Date(c.dueDate):null),h=c?.type==="FULFILLMENT",g=Wq(f,h);return!u||o.value?null:s(G,{children:[e==="card"?s(_e,{background:"subdued",padding:"small-300",borderRadius:"small",children:s(zm,{title:g,value:r.amount,color:"subdued",labelColor:"subdued"})}):s(Xt,{spacing:"small-300",children:s(zm,{title:g,value:r.amount})}),e!=="card"&&s(ye,{when:m,children:()=>s(ju,{taxesIncluded:l.value,shopId:t})})]})}const Yq=Xe("ShippingTooltip");function ol({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=b(),o=$e(void 0,Yq),i="shipping-policy",a=t.translate("shop_policies.shipping_policy"),{localPolicies:l}=vs(),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 Ft(n?.embedder)?u.url?s(Tn,{accessibilityLabel:d,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(u.url),children:s(Re,{type:"question-circle",size:"small"})}):null:s(G,{children:[s(Tn,{accessibilityLabel:d,commandFor:o,children:s(Re,{type:"question-circle",size:"small"})}),s(ss,{id:o,defaultPolicy:u})]})}function Bb(e){return e.reduce((t,{total:n}
38)=>t+(n?.amount||0),0)}function jq(){const{checkout:e}=b(),t=e.proposal.facts.delivery??[],n=Bb(t),r=t.flatMap(o=>o.lines.flatMap(i=>i.appliedDiscounts)).reduce((o,{amountDiscounted:i})=>(i?.amount||0)+o,0);return n-r}function Kq(){const{checkout:e}=b(),t=e.proposal.facts.delivery??[],n=jq(),r=Bb(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 Jq(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 Xq(){const{checkout:e}=b();return x(()=>zk(e.proposal))}function Qq({checkout:e}){return e.proposal.facts.requiresShipping??!0}function Zq({size:e,strong:t=!0}){const{i18n:n}=b(),r=t?"strong":void 0;return s(G,{children:[s(W,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),s(W,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function Vb({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(Ph),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(or,{condition:t,color:n,type:r==="bold"?"strong":void 0,translate:!1,letterCase:c(y,h),children:P});return t?v:o?s(Zq,{strong:!1}):_?s(Z,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[s(W,{accessibilityVisibility:"exclusive",children:u.translate("order_summary.original_price")}),s(W,{size:"base",color:"subdued",type:"redundant",translate:!1,children:u.formatCurrency(g,{currency:f})}),s(W,{accessibilityVisibility:"exclusive",children:u.translate("order_summary.price_after_discount_aria_text")}),v]}):v}const So=({getLinePrice:e,getPriceLetterCase:t,label:n,moneyLines:r,finalMoneyLines:o,forceSubduedStyle:i,discountLines:a,shippingTooltip:l,included:c,shouldConsolidateRateGroupMax:u,getRateGroupMaxKey:d})=>{const p=Pe(),m=x(()=>p.value.currentPage?.id==="information"),{shop:f,checkout:h,i18n:g}=b(),y=!f.hasFlagEnabled(Ph),{value:_}=q().deliveryNext,P=St(),v=He("deliveryNext").value,k=_i("deliveryNext").value||(P.value?v:!1),S=h.proposal.facts.delivery??[],I=[...new Set(o.flatMap(({methodType:R})=>R===void 0?[]:[R]))],C=Jq(I),w=h.configuration.layout.isOnePage.value,A=V(()=>!r.length&&!S.length||k,[]),T=_?.status==="unavailable"||k||i,L=a?.filter(R=>Fh(R))??[],N=C.length?[...new Set(C.map(R=>R.label))]:[...new Set(L.map(R=>Jr(R)&&R.discount.type==="code"&&R.discount.codeHidden?g.translate("order_summary.discount_title"):R.title))],D=y?N.map(R=>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(Re,{type:"discount",size:"small"}),s(Pi,{children:s(W,{color:"subdued",children:R.toUpperCase()})})]},R)):[],O=T||i,B=(m.value||w)&&l,z=i?"subdued":void 0;return s(G,{children:[s(tt,{itemSize:A?"auto":void 0,color:z,children:[s(wt,{children:s(Z,{direction:"inline",gap:"small-400",alignItems:"center",children:[s(W,{color:z,children:n}),B]})}),s(Ct,{loading:k,children:s(Vb,{getLinePrice:e,getPriceLetterCase:t,appearance:O?"subdued":void 0,moneyLines:o,deliveryLoading:k,included:c,shouldConsolidateRateGroupMax:u,getRateGroupMaxKey:d})})]}),D.length>0&&s(Xt,{spacing:"small-400",children:s(tt,{children:s(wt,{children:D})})})]})},eG=({shopId:e,forceSubduedStyle:t})=>{const n=q(),r=n.deliveryNext.value,o=St(),i=He("deliveryNext"),a=_i("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(),_=xl(y.value.enabledDeliveryMethods),v=PU()?.selected.value??[],E=v.length>0,k=Hk(v).length>0,S=v.includes("PICK_UP"),I=!!e,{visibility:C}=c.configuration,w=n.discountLines.value,A=du(),T=Kq(),L=qk(e),{allMoneyLines:N,moneyLinesForShop:D}=L.value,O=Zr(),z=Pe().value.currentPage?.id!=="review"&&(!l||O.value),R=u.translate("order_summary.pickup_label"),$=u.translate("order_summary.shipping_label"),ee=U(_?R:$),K=x(()=>{const pe=xl(y.value.enabledDeliveryMethods)?R:$;if(!(a.value||(o.value?i.value:!1))){const rt=L.value.moneyLinesForShop,ft=nt(f)?g?.[0]?.pickupAddress:rt.length>0&&rt.every(pt=>pt.methodType==="PICK_UP");ee.current=ft?R:pe}return ee.current}).value,Q=!!(r&&r.status==="filled"&&r.lines.some(({status:pe})=>pe!=="not_required")),X=!l&&!Q&&!c.isShippingRequired.value,H=T||D,ue=H.filter(je),re=ue.filter(pe=>pe.methodType!=="PICK_UP"),le=ue.filter(pe=>pe.methodType==="PICK_UP"),de=H.length===0||ue.length>0,ke=!I&&!nt(f)&&E&&de,he=ke&&S&&!k,ve=ke&&k,Ee=he?R:$,De=x(()=>!!(nt(f)&&Qq({checkout:c})&&co({checkout:c,source:f})?.lines.length));if(A.value||!(C.showShippingLines.value&&!nt(f)||De.value)||X||I&&H.length===0)return null;if(I){const pe=H.some(xe=>te(xe));return s(So,{getLinePrice:Qe,getPriceLetterCase:Me,label:K,forceSubduedStyle:t,moneyLines:D,finalMoneyLines:H,discountLines:e===d?w?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:pe,getRateGroupMaxKey:we})}if(O.value&&H.length>1){const pe=H.some(rt=>te(rt)),xe=oe(H);return s(Yu,{id:"shipping-money-line",title:K,hideHeaderItemWhenOpen:!0,item:s(Ct,{loading:l,children:s(Vb,{getLinePrice:Qe,getPriceLetterCase:Me,moneyLines:H,deliveryLoading:l,shouldConsolidateRateGroupMax:pe,getRateGroupMaxKey:we})}),children:s(Xt,{spacing:"small-400",children:xe.map(({shopName:rt,lines:ft})=>{const pt=ft.find(Qt=>Qt.shippingPolicy)?.shippingPolicy,Jt=ft.some(Qt=>(Qt.shopId??d)===d&&Qt.hasLocalDiscountApplied);return s(So,{getLinePrice:Qe,getPriceLetterCase:Me,label:rt,forceSubduedStyle:!0,moneyLines:N,finalMoneyLines:ft,discountLines:Jt?w?.lines:void 0,shouldConsolidateRateGroupMax:pe,getRateGroupMaxKey:we,shippingTooltip:z&&pt?s(ol,{defaultPolicy:pt}):void 0},ft[0]?.shopId??rt)})})})}if(re.length>0&&le.length>0)return Ce({});if(ke&&k&&S)return Ce({shippingGetLinePrice:re.length>0?Qe:Bt,shippingGetPriceLetterCase:re.length>0?Me:kt,pickupGetLinePrice:Kt,pickupGetPriceLetterCase:Ne});let J=N,ne=H,me=Qe,ge=Me,Ae=K,be=z?s(ol,{defaultPolicy:null}):void 0;return he?(J=le,ne=le,me=Kt,ge=Ne,Ae=Ee,be=void 0):ve&&(J=re,ne=re,Ae=Ee,re.length===0&&(me=Bt,ge=kt)),s(So,{getLinePrice:me,getPriceLetterCase:ge,label:Ae,forceSubduedStyle:t,moneyLines:J,finalMoneyLines:ne,discountLines:w?.lines,shippingTooltip:be});function Ce({shippingGetLinePrice:pe=Qe,shippingGetPriceLetterCase:xe=Me,pickupGetLinePrice:rt=Qe,pickupGetPriceLetterCase:ft=Me}){const{shippingDiscountLines:pt,pickupDiscountLines:Jt}=vA(r,w?.lines);return s(G,{children:[s(So,{getLinePrice:pe,getPriceLetterCase:xe,label:$,forceSubduedStyle:t,moneyLines:re,finalMoneyLines:re,discountLines:pt,shippingTooltip:z?s(ol,{defaultPolicy:null}):void 0}),s(So,{getLinePrice:rt,getPriceLetterCase:ft,label:R,forceSubduedStyle:t,moneyLines:le,finalMoneyLines:le,discountLines:Jt,shippingTooltip:void 0})]})}function Ue(pe){return pe.every(xe=>xe.type==="SUBSCRIPTION")}function je(pe){return pe.methodType!==void 0}function te(pe){const xe=pe.shopId??d;if(xe===d)return p;const rt=m?.get(xe);return rt?rt.marketDrivenShippingEnabled:!!pe.amountCombinabilityToken}function oe(pe){const xe=new Map;
38for(const rt of pe){const ft=rt.shopId??d,pt=xe.get(ft);pt?pt.lines.push(rt):xe.set(ft,{shopName:rt.shopName??K,lines:[rt]})}return[...xe.values()]}function we(pe){const xe=pe.amountCombinabilityToken??void 0;if(!(!xe||!te(pe)))return`${pe.shopId??d}:${xe}`}function Me(pe,xe){return _?"uppercase":l||pe===void 0||!N.length&&!g?.length||pe!==0||xe==="SUBSCRIPTION"&&!Ue(N)?"none":"uppercase"}function Qe(pe,xe){if(l)return"$0.00";if(pe!==void 0&&(N.length||g?.length)){const ft=xe==="SUBSCRIPTION"&&!Ue(N)?u.translate("shipping.subscription_delivery_description.shipping_price_included"):u.translate("order_summary.free_shipping_total_label");if(pe===0)return ft;const pt=nt(f)?g?.[0]?.total?.currencyCode:N[0].currencyCode;return u.formatCurrency(pe,{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 Qe(void 0)}function kt(){return Me(void 0)}function Kt(pe,xe){return!le.length&&!g?.length?l?"$0.00":u.translate("order_summary.free_shipping_total_label"):Qe(pe,xe)}function Ne(pe,xe){return!le.length&&!g?.length&&!l?"uppercase":Me(pe,xe)}},tG=Xe("ReductionTooltip");function Ku({type:e}){const{i18n:t,shop:{name:n}}=b(),r=$e(void 0,tG),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(Re,{type:"question-circle",size:"small",interestFor:r}),s(Sn,{id:r,children:s(W,{children:o})})]})}function Hm({line:e,title:t,amount:n}){const{i18n:r,source:o,shop:i}=b(),a=nt(o)&&n,l=Wu(i);if(e&&!Jr(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?Fh(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(tt,{children:[s(wt,{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(Re,{type:"discount",size:"small"}),s(Pi,{children:s(W,{color:"subdued",children:e?d?.toUpperCase():t?.toUpperCase()})})]})}),s(Ct,{children:s(W,{translate:!1,children:a?c(n):e&&nG({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]})}function nG({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(o=>o.target.type==="DELIVERYLINE")||e.allocations.length===0)return t;if(Jr(e)){const o=e.amount?.amount,i=e.amount?.currencyCode;if(o&&i)return n.formatCurrency(-o,{currency:i,form:"short",spacedMinusSign:!0})}}const rG=(e,t)=>e?.filter(n=>Jr(n)&&Gk(n)&&!(t&&n.amount?.amount===0))??[],oG=({disableTooltip:e=!1})=>{const{i18n:t,checkout:n,source:r,shop:o}=b(),a=q().discountLines,l=n.proposal.facts.orderDiscounts??[],c=nt(r)&&l,u=Wu(o),d=Zr(),p=x(()=>rG(a.value?.lines,u)),m=x(()=>!e&&d.value),f=x(()=>p.value.length>0),h=x(()=>t.translate("order_summary.discount_order_stacking",{count:p.value.length}));return s(G,{children:[s(ye,{when:f,children:()=>s(tt,{children:s(wt,{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(W,{children:h}),s(ye,{when:m,children:s(Ku,{type:"discount"})})]})})})}),s(Xt,{spacing:"small-500",children:[s(Zn,{each:p,getKey:g=>g.title,children:g=>s(Hm,{line:g})}),c&&l.map(g=>s(Hm,{title:g.label,amount:g.amount},g.label))]})]})};function iG(e,t){return e||(t?.status==="available_total"?t.totalDuty:null)}const sG=Xe("DutyMoneyLineTooltip");function aG({shopId:e}){const{i18n:t,checkout:n,shop:r}=b(),o=q(),{value:i}=o.landedCostDetails,a=He("landedCostDetails").value,l=He("duties").value,c=n.proposal.facts.duty,{value:u}=o.duties,d=$e(void 0,sG);if(e&&e!==r.id)return null;const p=iG(c,u),m=i?.incoterm===gc.Ddu&&i.reason===Wk.ErrorOccured,f=(l||a)&&!c&&!m,h=p||m,g=m?"subdued":void 0,y=s(Z,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(W,{children:t.translate("order_summary.duties_label")}),m&&!f&&s(G,{children:[s(Re,{type:"question-circle",interestFor:d,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),s(Sn,{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(tt,{color:g,children:[s(wt,{children:y}),s(Ct,{children:s(Z,{direction:"inline",gap:"small-200",children:s(or,{condition:f,children:f?"$0.00":_})})})]})})}function lG(){const{checkout:e}=b(),t=He("taxes"),{taxes:n}=q();return x(()=>{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})}function cG({data:e,loading:t}){const n=uG();return s(Xt,{spacing:"small-400",children:e.map(({description:r,amount:o},i)=>s(Or,{loading:t,totalTax:o,taxesLabel:n({description:r})},`${r}-${i}`))})}const uG=()=>{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 dG({shopId:e}){const{i18n:t,checkout:n,shop:r}=b(),o=q(),{hasNegotiatedOnce:i}
38=Je(),a=He("taxes"),l=_i("taxes"),c=He("landedCostDetails"),u=He("remoteTaxDetails"),d=Zr(),p=Hs(),m=lG(),f=x(()=>{if(n.proposal.facts.tax)return n.proposal.facts.tax;const C=o.taxes.value;return C?.status==="available_total"?C.totalTax:null}),h=x(()=>!!o.landedCostDetails.value),g=x(()=>{const C=o.taxes.value;return C!==void 0&&C.status!=="pending"}),y=x(()=>n.proposal.facts.tax?!1:l.value?!0:g.value?!1:a.value||!i.value),_=x(()=>(y.value||a.value||c.value||u.value)&&!n.proposal.facts.tax),P=x(()=>{const C=f.value;return C&&C.amount>0?C:y.value?{amount:0,currencyCode:r.currencyCode}:void 0}),v=bh(f.value),E=x(()=>[...v.value.entries()]),k=_h(),S=x(()=>k.value??f.value),I=x(()=>d.value&&E.value.length>1);if(e){const C=v.value.get(e);return!C||C.totalTax.amount===0||C.status==="available_total_included"?null:s(Or,{loading:_.value,totalTax:C.totalTax,hasLandedCostDetails:e===r.id&&h.value})}if(p?.applied&&S.value)return s(Or,{totalTax:S.value});if((!S.value||S.value.amount===0)&&!y.value)return null;if(I.value&&S.value){const C=h.value?t.translate("order_summary.taxes_label"):t.translate("order_summary.estimated_taxes_label"),w=h.value?void 0:t.translate("order_summary.estimated_taxes_finalization_tooltip_content");return s(Yu,{id:"tax-money-line",title:C,tooltipText:w,item:s(Ct,{loading:_.value,children:s(or,{condition:_.value,children:_.value?"$0.00":t.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:s(Xt,{spacing:"small-400",children:s(Zn,{each:E,getKey:([A])=>A,children:([,A])=>s(Or,{loading:_.value,totalTax:A.totalTax,taxesLabel:A.shopName,subdueText:!0})})})})}return s(ye,{when:m,fallback:s(ye,{when:P,children:C=>s(Or,{loading:_.value,totalTax:C,taxesLabel:y.value?t.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:h.value})}),children:C=>s(cG,{data:C.data,loading:C.loading||_.value})})}const pG=Xe("CombinedDutiesAndTaxesTooltip"),mG=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=b(),o=$e(void 0,pG);if(t&&t!==r.id)return null;const i=e.value;return s(tt,{children:[s(wt,{children:s(Z,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(W,{children:n.translate("order_summary.duties_and_taxes_label")}),s(Re,{type:"question-circle",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),s(Sn,{id:o,children:n.translate("order_summary.error_duties_tooltip")})]})}),s(Ct,{children:s(or,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},fG=({shopId:e})=>{const{checkout:t}=b(),n=q(),r=!!t.proposal.facts.taxesIncluded,o=!!t.proposal.facts.dutiesIncluded,i=bs(),a=Sh(),l=n.landedCostDetails,c=He("landedCostDetails"),u=_i("landedCostDetails"),d=n.optionalDuties,p=He("optionalDuties"),m=x(()=>!!d.value?.refuseDutiesPermitted&&!!d.value?.buyerRefusesDuties&&l.value?.incoterm===gc.Ddu),f=x(()=>u.value||p.value||c.value),h=x(()=>!(a.value||o)),g=x(()=>!!e||!(i.value||r));return s(ye,{when:m,fallback:s(G,{children:[s(ye,{when:h,children:s(aG,{shopId:e})}),s(ye,{when:g,children:s(dG,{shopId:e})})]}),children:s(mG,{loading:f,shopId:e})})};function hG({line:e,disableTooltip:t=!1}){const{i18n:n}=b(),{value:r}=Zr(),o=!t&&r,i=e.method.code.slice(-4).toUpperCase();return s(tt,{itemSize:"auto",children:[s(wt,{children:s(Z,{direction:"inline",gap:"small-400 small-300",children:[s(W,{children:n.translate("order_summary.gift_card_label")}),s(Z,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Re,{type:"gift-card"}),s(W,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),s(W,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),o&&s(Ku,{type:"giftCard"})]})]})}),s(Ct,{children:s(W,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function gG({disableTooltip:e=!1}){const t=xu(),n=Zr(),{shop:r,i18n:o}=b(),i=r.hasFlagEnabled($k),a=x(()=>!e&&n.value),l=x(()=>n.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=x(()=>({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(tt,{children:[s(wt,{children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(W,{children:o.translate("order_summary.gift_card_label")}),s(ye,{when:a,children:s(Ku,{type:"giftCard"})})]})}),s(Ct,{children:s(W,{children:o.formatCurrency(-u,{currency:d,form:"short",spacedMinusSign:!0})})})]})}return s(Zn,{each:t,getKey:u=>u.method.code,children:u=>s(hG,{line:u,disableTooltip:e})})}function ea(){return s(_e,{children:[s(zt,{blockSize:"small-200"}),s(jr,{accessibilityRole:"presentation"}),s(zt,{blockSize:"small-200"})]})}function yG(){const{moneyLines:{divided:e}}=ct(),t=q(),n=t.legacyRepresentProductsAsFees,r=t.legacyMerchandiseLinesAsFees,o=x(()=>!n.value||!r.value?[]:r.value.lines);return s(Zn,{each:o,getKey:i=>i.title,children:i=>s(G,{children:[e&&s(ea,{}),s(vG,{...i})]})})}function vG({title:e,description:t,total:n}){const{i18n:r}=b(),o=t?s(Z,{direction:"inline",alignItems:"center",gap:"small-400",children:s(W,{children:[e,s("span",{style:{position:"absolute"},children:s(Tn,{padding:"small-500 none none small-500",overlay:s(Sn,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:s(Re,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):s(W,{children:e});return s(tt,{label:e,children:[s(wt,{children:o}),s(Ct,{children:s(W,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function _G(e){const t=U(!1);ze(()=>{const n=e.value;if(!t.current){t.current=!0;return}if(n)return Lt({content:n})})}function qm({content:e}){return _G(e),s(ye,{when:e,children:t=>s(G,{children:bG(t).map(({id:n,line:r})=>s(tt,{layout:"stackable",children:[s(_e,{inlineSize:"100%",children:s(wt,{children:s(Ke,{type:"small",color:"subdued",textAlign:"end",children:r})})}),s(Ct,{})]},n))})})}function bG(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 PG(){const{moneyLines:{divided:e}}=ct(),{i18n:t,checkout:n}=b(),{value:r}=ni(),{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(ea,{}),u&&r&&s(tt,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),c&&a&&s(tt,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(a.amount),{currency:a.currencyCode,form:"short"})}),d?s(tt,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(i.amount),{currency:i.currencyCode,form:"short"})}):null]})}var Ju={Content:"_1x41w3p3",Header:"_1x41w3p2",MoneySummary:"_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19"};function SG(e){return"children"in e&&Et(e.children)}function Do(e){const{spacing:t}=Nb(),n=Y(Ju.MoneySummary,t&&ur.groupSpacingVariant[t]);return s(G,{children:s("div",{className:n,role:"row",children:SG(e)?e.children:s(G,{children:[s(Zo,{children:s(W,{type:"strong",size:"large",children:e.label})}),s(Ur,{children:s(Z,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[s(Lu,{children:s(W,{size:"small",color:"subdued",children:e.prefix})}),s(W,{type:"strong",size:"large",children:e.value})]})})]})})})}function Zo({children:e}){return s("div",{className:Ju.Header,role:"rowheader",children:e})}function Ur({children:e,accessibilityColumnIndex:t}){return s("div",{className:Ju.Content,role:"cell","aria-colindex":t,children:e})}function EG(e,t){return t.some(n=>e.has(n))}function Ub(e){const{initialUnresolvedFields:t}=Je();return x(()=>EG(t.value,e))}function CG(){const e=q().paymentFlexibilityPaymentTermsTemplate,t=ii(),n=Ru(),r=Fn();return x(()=>{if(t.value||n.value)return!1;const o=!!e.value,i=r.value;return o||i})}const kG="_3KD7m",IG="kxIMD",AG="_3XbdQ",Gi={Wrapper:kG,Char:IG,Price:AG,"Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"},zb=30;let il=0;function TG({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:n}}=Fe(),r=Vn(),o=U(ht(()=>t.value)),i=Te([{id:il++,formatted:ht(()=>e.value)}]),a=St(),l=n==="base";F(()=>{const u=o.current;t.value.currencyCode===u.currencyCode&&t.value.amount<u.amount?i.value=[...i.value,{id:il++,formatted:e.value}]:i.value=[{id:il++,formatted:e.value}],o.current=t.value},[t.value.amount,t.value.currencyCode,e.value]);const c=M(u=>{i.value=i.value.filter(d=>d.id!==u)},[i]);return l?s("span",{className:Gi.Wrapper,style:{"--delay":`${r?0:zb}ms`},children:s(ye,{when:a,fallback:e,children:()=>i.value.map((u,d)=>s(wG,{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 wG({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:o}){const i=Vn(),a=nn(t,"fast",n),l=e.split("");return F(()=>{let c;return a==="exited"&&(i?r(o):c=setTimeout(()=>r(o),e.length*zb)),()=>{clearTimeout(c)}},[a,i,e,r,o]),s("span",{className:Y(Gi.Price,n&&Gi[`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:Gi.Char,style:{"--index":u},children:c},u))})}const LG=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function Hb({alignItems:e="baseline",freeLabel:t,outOfStockLabel:n,paymentDue:r,showCurrencyBadge:o,hideCurrencyCode:i,size:a}){const{i18n:l,embed:c}=b(),u=Ty(),{orderSummary:d}=Fe(),p=a0(),m=St(),f=He("deliveryNext"),h=He("taxes"),g=He("duties"),y=He("landedCostDetails"),_=He("remoteTaxDetails"),P=q(),v=x(()=>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=Ub(LG),k=Te(E.peek()),S=Te(!E.peek()&&v.peek());ze(()=>{!E.value&&v.value&&(S.value=!0)});const I=x(()=>f.value||h.value||g.value||y.value||_.value),C=x(()=>c&&Ft(c.embedder)?!1:c?!v.value||I.value:k.peek()&&!S.value),w=!i&&u,A=x(()=>n&&p.value?n:t&&r.value.amount===0?t:l.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"})),T=t?"uppercase":void 0,L=d.totalDueTypography;let N,D;L?(N=L.weight==="bold"?"strong":"generic",D=L.size??"base"):(N="strong",D="large");const O=s(W,{size:o?"extraSmall":"small",color:"subdued",translate:!1,children:r.value.currencyCode}),B=x(()=>w&&A.value!==n&&A.value!==t&&(!m.value||!iS(r.value.currencyCode,A.value)));
39return s(Z,{alignItems:e,gap:"small-300",direction:"inline",children:[s(ye,{when:B,children:s(Lu,{children:o?s(kb,{color:"subdued",size:"small",children:O}):O})}),s(or,{condition:C.value,type:N,size:a??D,translate:!1,letterCase:T,skeletonContent:A.value,children:S.value?s(TG,{formatted:A,money:r}):null})]})}function Wi({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=ct();return s(Do,{children:[s(Zo,{children:s(W,{type:"strong",size:r?.size??"large",children:e})}),s(Ur,{children:s(Hb,{paymentDue:t,hideCurrencyCode:n})})]})}function xG({variant:e,showLoadingPlaceholder:t}){const n=oi(),{i18n:r,shop:o}=b(),i=Mu(),a=x(()=>!n.value),l=x(()=>n.value?r.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"}):void 0),c=U({amount:0,currencyCode:o.currencyCode}),u=x(()=>{const d=n.value;return d!=null&&(c.current=d),c.current});return a.value&&!t?null:e==="card"?s(_e,{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(W,{color:"subdued",children:i}),s(W,{color:"subdued",children:l})]})}):s(Xt,{spacing:"small-500",children:s(Wi,{label:i,amount:u,hideCurrencyCode:a.value})})}function RG({children:e}){return s(Xt,{spacing:"small-500",children:s(tt,{children:[s(wt,{children:s(Ke,{color:"subdued",children:s(Cr,{children:e})})}),s(Ct,{})]})})}const MG=1.95583;function NG(){const{shop:e}=b(),t=q().buyerIdentity,n=oi(),r=e.hasFlagEnabled(Yk);return x(()=>{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*MG).toFixed(2))})}function DG({bgnAmount:e}){const{i18n:t}=b();return s(tt,{children:s(Ct,{children:s(W,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const Gm=1e8;function OG(e,t){const n=e/t*100,r=Math.round(n*Gm)/Gm;return Math.ceil(r)/100}function FG(e){return e?.installmentPlans?.some(t=>t.type==="MSI")??!1}function lj(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 cj(e){return e.map(t=>t.method.type==="direct"||t.method.type===Kn.CreditCard?{...t,method:{...t.method,creditCardInstallments:void 0}}:t)}function BG(){const e=oi(),t=Mu(),{installmentMonthsSignal:n}=Mt(),{i18n:r}=b(),o=q().paymentMethods,i=x(()=>o.value?.some(u=>u.type==="direct"&&!u.alternative&&FG(u))??!1),a=x(()=>{const u=n.value,d=e.value;return!(i.value&&!!u)||!d||!u?d:{...d,amount:OG(d.amount,u)}}),l=x(()=>{const u=n.value;return i.value&&!!u&&!!e.value?r.translate("order_summary.installment_due_today_label"):t.value}),c=x(()=>i.value&&!!n.value);return{amount:a,label:l,isInstallment:c}}const VG=["taxes","duties"],UG=()=>{const{shopPay:e,checkout:t}=b(),n=fi(),r=uy();if(n.value&&r&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value};function zG({shopId:e}){const t=oi(),n=jk(),r=x(()=>e?n.value.get(e):t.value),{checkout:o,embed:i,i18n:a,shop:l}=b(),c=Ub(VG),u=He("deliveryNext"),d=He("taxes"),p=He("duties"),m=He("landedCostDetails"),f=He("remoteTaxDetails"),{visibility:h}=o.configuration,{moneySummary:{labelColor:g="base",labelTypography:y},moneyLines:{divided:_}}=ct(),P=o.proposal.facts.previouslyPaidTotal,v=ii(),E=bi(),k=UG(),{value:S}=ni(),I=S?.currencyCode,C=CG(),w=l.hasFlagEnabled(Kk),A=!!o.proposal.facts.taxesIncluded,T=!!o.proposal.facts.dutiesIncluded,L=bs().value||A,N=Sh().value||T,{value:D}=q().landedCostDetails,O=Hs(),B=o.proposal.facts.landedCostDetails,{amount:z,label:R,isInstallment:$}=BG(),j=o.configuration.orderSummary?.layoutStyle==="COMPACT",ee=Fb(),ae=NG(),K=x(()=>e&&e!==l.id?a.translate("order_summary.total_label"):R.value),Q=x(()=>!r.value),X=x(()=>i&&Ft(i.embedder)?!1:c.value),H=U(r.peek()),ue=x(()=>{const ge=r.value;return ge!=null&&(H.current=ge),H.current}),re=x(()=>ue.value??{amount:0,currencyCode:l.currencyCode}),le=U(z.peek()),de=x(()=>{const ge=z.value;return ge!=null&&(le.current=ge),le.current??re.value}),ke=x(()=>$.value?r.value:void 0),he=ue.value!=null&&(u.value||d.value||p.value||m.value||f.value);if((Q.value||!z.value)&&!X.value&&!he)return null;const ve=(h.showSubtotal.value||P)&&_?s(ea,{}):null,Ee=!v.value&&!E.value,De=O?.applied&&L&&ee.value?s(RG,{children:ee.value}):Ee?s(ju,{taxesIncluded:L,shopId:e}):null;if(e)return s(G,{children:[s(Wi,{label:K,amount:re,hideCurrencyCode:Q.value}),De]});if(j){const ge=y?.weight==="base"?"generic":"strong";
39return s(G,{children:[ve,s(Do,{children:[s(Zo,{children:s(Z,{children:s(ye,{when:ee,fallback:s(W,{type:ge,color:g,size:y?.size??"large",children:R.value}),children:s(G,{children:[s(W,{type:ge,color:g,size:y?.size,children:R.value}),De]})})})}),s(Ur,{children:s(Hb,{paymentDue:de,hideCurrencyCode:Q.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const Ie=[D,B].some(ge=>ge?.incoterm===gc.Ddp),J=N&&Ie?s(G,{children:[s(zt,{blockSize:"small-400"}),s(jr,{accessibilityRole:"presentation"}),s(zt,{blockSize:"small-400"}),s(Ke,{type:"small",color:"subdued",children:s(Cr,{children:a.translate("order_summary.duties_included_label")})})]}):null,ne=w?s(xG,{showLoadingPlaceholder:X.value||he}):s(Xt,{spacing:"small-500",children:s(Wi,{label:K,amount:re,hideCurrencyCode:Q.value})}),me=a.translate("order_summary.payment_terms_totals.due_today_next");return s(G,{children:[ve,s(ye,{when:C,children:s(Do,{children:[s(Zo,{children:s(W,{children:me})}),s(Ur,{children:s(Z,{direction:"inline",gap:"small-200",alignItems:"baseline",children:s(or,{condition:Q.value,size:"medium",translate:!1,children:a.formatCurrency(0,{currency:re.value.currencyCode,form:"short"})})})})]})}),s(ye,{when:ke,children:ge=>s(tt,{label:a.translate("order_summary.total_label"),value:a.formatCurrency(ge.amount,{currency:ge.currencyCode,form:"short"})})}),s(ye,{when:C,fallback:s(Wi,{label:K,amount:de,hideCurrencyCode:Q.value}),children:ne}),De,k!==void 0&&I?s(Do,{children:s(Ur,{accessibilityColumnIndex:2,children:s(W,{size:"small",translate:!1,children:a.translate("payment.pay_in_installments_split_pay_short",{amount:a.formatCurrency(k,{currency:I,form:"short"})})})})}):null,ae.value!=null&&s(DG,{bgnAmount:ae.value}),J]})}const HG=Xe("PriceBreakdownItemTooltip");function qG({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:o}=b(),i=$e(void 0,HG),a="strong",l="base";return s(tt,{layout:r,children:[s(wt,{children:s(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(W,{color:l,type:a,children:e}),t?s(G,{children:[s(Re,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:o.translate("tooltip.accessibility_label_context",{context:e})}),s(Sn,{id:i,children:t})]}):null]})}),s(Ct,{children:s(W,{color:l,type:a,children:n})})]})}const GG=Xe("RecurringTotalsTooltip"),WG=Xe("RecurringTotalsLabel");function Wm({cardStyle:e}){const{value:t}=q().recurringTotals,{i18n:n}=b(),r=Gu(),o=$e(void 0,GG),i=$e(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(_e,{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(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(W,{id:i,color:"base",type:"strong",children:a}),s(W,{color:"base",type:"strong",children:r(t[0])})]}),s(Re,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:a})}),s(Sn,{id:o,children:n.translate("order_summary.recurring_total_tooltip")})]}):s(W,{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(Xt,{spacing:"small-300",children:s(qG,{title:a,tooltipText:n.translate("order_summary.recurring_total_tooltip"),itemText:r(t[0]),layout:"stackable"})}):s(W,{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=YU(e.method.redemptionContent);return s(tt,{children:[s(wt,{children:s(Z,{direction:"inline",gap:"base",children:[s(W,{children:t.translate("order_summary.gift_card_label")}),s(Z,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Re,{type:"gift-card"}),s(W,{accessibilityVisibility:"hidden",children:jU(i)}),s(W,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),s(Ct,{children:s(W,{type:"strong",children:o})})]})}function YG({line:e}){const{checkout:t,i18n:n,shop:r}=b(),o=r.hasFlagEnabled(Jk),i=o?t.proposal.negotiated.fields.shopPromotion.value:void 0,a=i?.status==="filled"?new Map(i.promotions.map(({promotionId:l,type:c})=>[l,c])):void 0;return e.method.redemptionContent?.details?.map(l=>{const{amount:c,currencyCode:u}=l.destinationAmount,d=n.formatCurrency(-parseFloat(c),{currency:u,form:"short",spacedMinusSign:!0}),p={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")},m=l.promotionType??(l.redemptionId==null?void 0:a?.get(l.redemptionId)),h=o&&l.redemptionType==="SHOP_PROMOTION"&&m==="DOORBUSTER"?n.translate("order_summary.flash_deal"):p[l.redemptionType];return h?s(tt,{type:"strong",label:h,value:d},l.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(tt,{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}
39function XG(){const e=fc("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=K_(),n=[...e.value,...t];return n.length===0?null:s(G,{children:n.map(r=>s(KG,{line:r},JG(r)))})}function QG(){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 ZG(){const{moneyLines:{divided:e}}=ct(),t=QG();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return s(G,{children:[n&&s(G,{children:[e&&s(ea,{}),s(tt,{type:"strong",label:n.label,value:n.value})]}),r&&s(tt,{type:"strong",label:r.label,value:r.value})]})}function e4(e){const{shop:{id:t}}=b(),n=q(),r=n.remoteTotalDetails,o=Mf(),i=n.legacyRepresentProductsAsFees,a=n.legacySubtotalBeforeTaxesShippingAndFees,l=n.subtotal;return x(()=>{const c=i.value?a.value:o.value;return e?t===e?l.value:r.value?.perShopRemoteTotals.get(e)?.subtotal:c})}function t4(){const{allViolations:e}=q(),t=He("allViolations");return x(()=>{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(r_())}})}function n4(e){const t=q(),n=t.merchandiseLines,{shop:{id:r},checkout:o}=b(),i=o.proposal.facts.merchandiseLines??[],{value:a}=t.legacyRepresentProductsAsFees,l=x(()=>Xk(n.value?.lines??[],t.remoteMerchandiseDetails.value)),c=Qk(),u=e?e!==r?{lines:l.value.get(e),factLines:void 0}:{lines:c.value,factLines:i}:{lines:n.value?.lines,factLines:i},d=r4(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 r4(e,t){return t?e?.reduce((n,r)=>r.legacyFee?n:n+r.quantity,0):e?.reduce((n,r)=>n+r.quantity,0)}function o4(e){const{embed:t,i18n:n}=b(),{totalLineQuantities:r,merchandiseLinesWithCount:o}=n4(e);return Ft(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 i4(e){const{checkout:t,i18n:n}=b(),r=e4(e),o=o4(e);return x(()=>{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 s4({shopId:e}){const{subtotalLabel:t,subtotalValue:n,subtotalOriginalValue:r}=i4(e).value;return n?s(tt,{children:[s(wt,{children:s(W,{children:t})}),s(Ct,{children:r?s(Z,{direction:"inline",gap:"small-300",children:[s(W,{tone:"critical",type:"redundant",translate:!1,children:r}),s(W,{translate:!1,children:n})]}):s(W,{translate:!1,children:n})})]}):null}function a4(){const{i18n:e,checkout:t,source:n}=b(),r=q().tipLines,o=t.proposal.facts.tip,i=x(()=>{const a=r.value?.[0]?.amount,l=nt(n)?o:a;return l&&l.amount>0?l:void 0});return s(ye,{when:i,children:a=>s(tt,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})})})}function l4(){const{i18n:e,checkout:t,embed:n}=b(),{value:r}=Zk(),o=bi(),i=xu(),a=!!t.proposal.facts.taxesIncluded,l=bs().value||a;if(!o.value||!r)return null;const c=s(ju,{taxesIncluded:l});return Ft(n?.embedder)&&i.value.length>0?c:s(G,{children:[s(tt,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),c]})}function c4(){const e=Eh(),{shop:t,embed:n}=b(),r=t.hasFlagEnabled(eI);return x(()=>{const o=!!n?.embedder&&!Ft(n?.embedder);return!!!(r||!e.value||e.value.amount===0||o)})}function u4({variant:e}){const t=c4(),n=Eh();return!t.value||!n.value?null:s(d4,{variant:e,totalSavings:n.value})}function d4({variant:e,totalSavings:t}){const{i18n:n,embed:r}=b(),{deferredTotal:o}=q(),i=Ft(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(W,{type:"strong",translate:!1,children:a}),c=x(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return e==="card"?s(_e,{children:s(Z,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Z,{direction:"inline",alignItems:"center",gap:"small-500",children:[s(Re,{type:"savings",size:"small",color:"base"}),s(W,{color:"subdued",children:n.translate("order_summary.total_savings")})]}),s(W,{color:"subdued",translate:!1,children:a})]})}):s(Xt,{spacing:c.value,children:s(Do,{children:[s(Zo,{children:s(Z,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(Re,{type:"savings",size:"base",color:"strong"}),s(W,{type:"strong",children:i}),l]})}),s(Ur,{})]})})}const p4=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}=Pe().value,p=d?.type==="thankYou",m=Rb(),f=t.proposal.negotiated.fields.additionalMoneyLines.value,h=t.proposal.negotiated.fields.lpmDisclosure,g=He("lpmDisclosure"),y=x(()=>g.value?void 0:h.value),_=x(()=>{const P=t.latestReceipt.value;return P?.status==="processed"?P.lpmDisclosure:void 0});return s(kr,{children:[s(Oq,{ref:m,title:n.translate("order_summary.cost_table_title"),children:[s(ye,{when:o.showSubtotal,children:[s(s4,{}),s(oG,{}),s(eG,{}),s(yG,{}),s(ZG,{}),s(fG,{}),s(a4,{}),s(l4,{}),s(XG,{})]}),s(PG,{}),s(gG,{}),f?.map(P=>s(tt,{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(ye,{when:()=>!y.value,children:s(Fq,{})}),p?s(qm,{content:_}):s(qm,{content:y}),s($q,{}),!Ft(r?.embedder)&&s(u4,{}),!c&&s(Wm,{})]}),c&&s(ye,{when:()=>u.recurringTotals.value,children:s(_e,{paddingBlockStart:"small-300",children:s(Wm,{cardStyle:!0})})})]})});var sl={Form:"km09ry0 _1fragem5z",Contents:"km09ry1 _1fragemws"};const m4=Xe("Form");function f4({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:r=!1,id:o,contentsClassName:i}){const a=ln(),l=$e(void 0,m4),c=o??l,u=ai()!=null,d=V(()=>({id:c,nested:u}),[c,u]);let p=null;n&&(p=s(_e,{accessibilityVisibility:"exclusive",children:s(h4,{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(sl.Contents,i),children:t});return u?s(G,{children:[s(Sl.Provider,{value:d,children:[f,p]}),s(Pr,{children:s("form",{action:"",method:"POST",noValidate:!0,className:sl.Form,i
39d:c,onSubmit:m})})]}):s("form",{action:"",method:"POST",noValidate:!0,className:sl.Form,id:c,onSubmit:m,children:s(Sl.Provider,{value:d,children:[f,p]})})}function h4({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 Eo={Hidden:"_123qrzt0 _1fragem5z",hiddenOnExtraSmall:"_123qrzt1",hiddenOnSmall:"_123qrzt2",hiddenOnMedium:"_123qrzt3",hiddenOnLarge:"_123qrzt4"};const Oi=["extraSmall","small","medium","large"];function $m({above:e,below:t,children:n}){const o=no()?"span":"div",{hiddenOnExtraSmall:i,hiddenOnSmall:a,hiddenOnMedium:l,hiddenOnLarge:c}=g4(e,t),u=Y(Eo.Hidden,i&&Eo.hiddenOnExtraSmall,a&&Eo.hiddenOnSmall,l&&Eo.hiddenOnMedium,c&&Eo.hiddenOnLarge);return s(o,{className:u,children:n})}function g4(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?Oi.indexOf(e)+1:0,r=t?Oi.indexOf(t)-1:Oi.length-1,o=Oi.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 y4({targetSelector:e,label:t,icon:n}){const r=M(()=>{const o=document.querySelector(e);o&&(o.focus(),o.scrollIntoView({behavior:"smooth"}))},[e]);return s(_e,{display:"@media (inline-size >= medium) auto, none",children:s(an,{variant:"secondary",size:"small",onClick:r,className:bt({screenReaders:"untilFocus"}),children:s(Z,{direction:"inline",gap:"small-400",alignItems:"center",children:[s(Re,{type:n,size:"small-100"}),s(W,{children:t})]})})})}const Oo=({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]})}),qb=()=>{const{i18n:e,shop:t}=b(),n=Pn(),r=He("shippingAddress"),{allViolations:o}=q(),i=Pe(),{shippingAddress:a}=se();return x(()=>{const l=a.peek();if(n.value&&i.value.currentPage?.id==="information"&&ri(l,{...tI,countryCode:l?.countryCode}))return null;const c=o.value?.filter(u=>Qr.has(u.code))||[];return c.length===0||!n.value||r.value?null:Oo({violations:c,noticeType:et.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:et.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(lt,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var un={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 v4=Xe("Banner"),_4=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function ta({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=ln(),[g,y]=ie(d),[_,P]=ie(!0),v=U(),E=$e(void 0,v4),k=Os({active:f==="critical"}),S=U(g);function I(B){v.current=B,k.current=B}const C=Un(),w=Vn(),A=U(w);A.current=w,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 $=setTimeout(z,300);return()=>clearTimeout($)}const R=new ResizeObserver(()=>{B.getBoundingClientRect().height!==0&&(R.disconnect(),z())});return R.observe(B),()=>R.disconnect()},[e]),F(()=>{!S.current&&g&&m?.(),S.current=g},[g,m]),F(()=>{y(d)},[d]);const T=Y(un.Banner,f&&un.toneVariant[f],u&&un.withHeading,un.colorVariant[a]),L=!!(r&&u),N=!L||L&&!_,D=o&&s("button",{type:"button",className:un.Button,onClick:()=>{typeof p=="function"&&p(),y(!0)},"aria-label":h("closeNotification"),"aria-hidden":C?!0:void 0,tabIndex:C?-1:void 0,children:s(Re,{type:"x",size:"small"})}),O=s("button",{type:"button",className:un.Button,onClick:()=>P(B=>!B),"aria-expanded":!_,"aria-controls":`${E}-collapsible-area`,"aria-label":h("expandNotification"),"aria-hidden":C?!0:void 0,tabIndex:C?-1:void 0,children:s(Re,{size:"small",type:_?"chevron-down":"chevron-up"})});return g?null:s("div",{className:T,role:f==="critical"?"alert":"status",...(e||t)&&{tabIndex:-1},ref:I,id:l,children:[!i&&s("div",{className:un.Icon,children:s(Re,{type:_4.get(f),size:"fill"})}),u&&s("div",{className:un.Heading,children:s(Yt,{level:3,children:u})}),L&&s("div",{className:un.ControlCollapsible,children:O}),Et(n)&&s("div",{className:un.Content,children:s(Cc.Provider,{value:"Banner",children:s(sn,{children:L?s(hn,{open:N,id:`${E}-collapsible-area`,children:[u&&s(zt,{blockSize:"small-200"}),n]}):s(G,{children:[u&&s(zt,{blockSize:"small-200"}),n]})})})}),D&&s("div",{className:un.ControlDismiss,children:D})]})}const b4=Rx.map(e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)});function P4(e){return b4.some(t=>t.test(e))}function S4(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}const Gb=()=>{const e=Ht(hy),{observability:t}=b();return M(n=>{const r=S4(n),o=r?`${e}.${r}`:e;return P4(o)?o:(t.error(new E4(`Invalid target (${e}) and field (${r}
39) combination`)),"cart")},[e,t])},E4=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},C4=250,k4=new Set([st.InputInvalid,st.InputRequired]);function I4(e){switch(e){case"cart.buyerIdentity":return st.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return st.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return st.PaymentError;case"cart.discountCode":return st.DiscountError;default:return st.CheckoutError}}function Ym(e){return!k4.has(e)}function jm(e,t){return e?e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message:!1}function A4(e){const{message:t,errorType:n,errorValue:r,children:o}=e,a=Gb()(),l=Zg(),c=U(l),u=U(null),d=U(),p=U(!0);c.current=l;const m=h=>{c.current({...h,timestamp:new Date})},f=yc(h=>{!p.current||!jm(d.current,h)||!Ym(h.errorType)||m(h)},C4);return F(()=>{const h=n||I4(a),g=t??u.current?.textContent??"",y={target:a,errorType:h,value:r||null,message:g};if(!jm(d.current,y)){if(d.current=y,!Ym(h)){m(y);return}f(y)}}),F(()=>()=>{p.current=!1},[]),s("div",{ref:u,children:o})}function _n(e){const{errorType:t,errorValue:n,children:r,...o}=e;return s(ta,{...o,children:s(A4,{errorType:t,errorValue:n,children:r})})}function Wb({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(_n,{...i,errorType:n??st.CheckoutError,children:a}):s(ta,{...i,children:a})}function T4(){const e=qb().value;return e?s(Wb,{notice:e,errorType:st.DeliveryError}):null}function w4(){const e=q().allViolations,t=x(()=>(e.value?.filter(o=>Ch(o.code))??[]).filter((o,i,a)=>i===a.findIndex(l=>l.code===o.code))),n=x(()=>t.value.length>0);return s(ye,{when:n,children:s(Z,{gap:"base",children:s(Zn,{each:t,getKey:r=>r.code,children:({localizedMessage:r,nonLocalizedMessage:o})=>s(_n,{errorType:st.PaymentError,tone:"critical",children:r||o})})})})}function L4(){const{allViolations:e}=q();return x(()=>{const t=e.value?.filter(n=>mu.has(n.code))||[];return{violations:t,hasViolations:t.length>0}})}const x4=()=>{const{violations:e,hasViolations:t}=L4().value;return t?s(Z,{gap:"base",children:e.map(({code:n,localizedMessage:r,nonLocalizedMessage:o})=>s(_n,{errorType:st.DiscountError,tone:"warning",children:r||o},n))}):null};function $b(){const e=q().allViolations,{router:t,checkout:{identity:n}}=b(),r=Te(null),{shippingAddress:o}=se(),i=Ye(jt(o.value.countryCode)),a=x(()=>oy(e.value??[])),l=x(()=>R4(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)}),x(()=>{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 R4(e=[]){const t=e.filter(({code:n})=>nI.has(n));if(t.length===1&&t[0].code==="MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY")return t[0]}function M4(){const e=$b(),t=$c(),n=U(null),r=yc(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 Xu(){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||fh(o);return{isAppLayout:a,isWebLayout:!a}}class N4 extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function as(e){const t=se().paymentLines;return x(()=>_R(t.value,e))}function D4(){const{i18n:e}=b(),{href:t,onClick:n}=gu();return s(lt,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const O4=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"],["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"]]),F4=["SHOP_PAY_DECLINED"];function Yb(e){const{i18n:t}=b();let n="generic_error";return e&&(n=O4.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&F4.includes(e.code)&&{checkout_as_guest_link:s(D4,{})}})}const B4=["AMOUNT_TOO_SMALL"];function V4(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:as(Le.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:as(Le.AmazonPay).value}].filter(({checkoutSessionId:m})=>!!m),{i18n:t,observability:n}=b(),{error:r,hasError:o}=cy(kh),i=r&&B4.includes(r),a=Yb(i?{type:"payment",code:r}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=We(),u=x(()=>{const m=c.value;return m.status===gi.Available?m.sdk:void 0});if(!o||!e)return null;const{isBuyWithPrime:d,checkoutSessionId:p}=e;return s(ye,{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 N4(`Error on changing buyer payment method. Details: ${h}`,{cause:h}))}};return s(_n,{tone:"critical",errorType:st.PaymentError,children:s(Ke,{children:i?a:s(G,{children:[t.translate("amazon_pay.error_page.payment_decline.message"),s(lt,{onClick:f,children:t.translate("amazon_pay.error_page.payment_decline.link")})]})})})}})}function U4(){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 x(()=>{const o=t.value?.type,i=t.value?.tone;if(o&&r[o])return{code:et.PaymentSheetViolations,tone:i??"critical",localizedMessage:r[o],nonLocalizedMessage:r[o]}})}
39const z4=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[hs,"info"]]);function H4(){const{i18n:e}=b(),{shippingAddress:t}=se(),{inMemoryGooglePayParts:{paymentSheetError:n}}=We(),r=Ye(jt(t.value.countryCode));return x(()=>{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===hs){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?z4.get(o):"critical";if(i)return{code:et.PaymentSheetViolations,tone:a,localizedMessage:i,nonLocalizedMessage:i,onDismiss:a==="info"?()=>n.value=void 0:void 0}})}const jb=()=>{const e=Te(!1),t=Te(!1),n=Iy(),r=q().allViolations,o=x(()=>r.value?.some(i=>Ih.has(i.code))??!1);return ze(()=>{o.value&&(t.value=!0),!o.value&&e.value&&(e.value=!1,t.value=!1)}),x(()=>{const i=t.value&&!e.value,a=n.value;return!i||!a?null:{code:et.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}})};function q4(){const{receiptErrorSignal:e}=We();return x(()=>{const t=e.value;if(t)return{code:et.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}function G4(){const{shippingAddress:e}=se(),{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===hs&&(t.value=void 0),n.value?.type===uh&&(n.value=void 0)})},[e,t,n]),null}function W4(){G4();const e=U4(),t=H4(),n=Ye(HO()),r=q4(),o=qO(),i=l_({isPayWithPayPalButton:!1}),a=PR(),l=Ye(IR()),c=jb();return x(()=>{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:et.PaymentSheetViolations,localizedMessage:p,nonLocalizedMessage:p,tone:"critical"}:p})}const $4=new Set(["CART_METAFIELD_GENERIC_ERROR"]),Y4=new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"]),j4=new Set([...$4,...Y4]),K4=["noAddressLocation","stockProblems","thankYou"],Kb=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),Jb=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),J4=[...Qr,...rI,...oI,...mu,...iI,...Kb,...Jb,...Ah,...sI,...aI,...lI,...Th,...zs,...qf,...lc,...cI,...sc,...Rf,...pc,...Ih,...uI,...j4,"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 X4(){const{i18n:e,router:t}=b(),n=t.currentUrl.value,[r,o]=ie(void 0),i=n.searchParams.get("company_location_changed")==="true";return V(()=>r===!0||!i?null:(o(!1),{code:et.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>o(!0)}),[r,e,i])}function Q4(){const{i18n:e,shop:t}=b(),n=q().allViolations;return x(()=>(n.value?.filter(o=>pc.has(o.code))||[]).length===0?null:{code:et.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:s(lt,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}var Z4={ListItem:"_1585eob1 _1585eob0 _1fragemws _1fragemzh"};function Qu({children:e,id:t}){return s("li",{id:t,className:Z4.ListItem,children:e})}var al={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function Zu({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:o}){const{className:i}=Tt({gap:e}),a=Y(al.UnorderedList,t&&al.listStyleVariant[t],i),l=t==="none"?"list":void 0;return s("div",{className:al.Wrapper,children:s("ul",{className:a,role:l,"aria-label":n,id:o,children:r})})}function eW(){const e=q().buyerIdentity,t=Pn(),{shippingAddress:n}=se();return x(()=>{const r=e.value?.purchasingCompany,o=r?.location.shippingAddress?ri(n.value,r.location.shippingAddress):!1;return t.value&&!o})}function tW(){const{i18n:e,shop:t,checkout:n}=b(),r=Pn(),o=eW(),i=Ys(),a=n.configuration.layout.isOnePage;return x(()=>{const{deliveryAddressErrors:l}=i.value;if(a.value||o.value||l.length===0)return null;const c=r.value?s(W,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):s(W,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:s(lt,{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:et.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:d?u.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:d?c:s(G,{children:[s(Zu,{children:l.map(m=>s(Qu,{children:s(W,{children:m.messageNode??m.message})},`${m.target}${m.message}`))}),c]})}})}const nW=()=>{const{i18n:e}=b(),t=q().allViolations;return x(()=>(t.value?.filter(r=>Jb.has(r.code))||[]).length===0?null:{code:et.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})};function rW(){const{i18n:e,shop:t,checkout:n}=b(),[r,o]=ie(!1),i=du(),a=Pn(),l=n.configuration.layout.isOnePage.value;return r||!i.value||a.value||l||!n.isShippingRequired.value?null:{code:et.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:s(Cr,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:s(lt,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>o(!0)}}const oW=()=>{const e=Te(!1),{allViolations:t}=q();return x(()=>{const n=t.value?.filter(o=>Kb.has(o.code))||[],r=n.length>0?n[0]:null;return e.value||!r?null:{code:et.TipsViolations,localizedMessage:r.localizedMessage||r.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})};function iW(){const{i18n:e,shop:t,checkout:n}=b(),{allViolations:r}=q(),o=Pn(),{paymentLines:i}=se();return x(()=>
39{if(!!Pt(i.value,"APPLE_PAY")&&!n.isShippingRequired.value||o.value)return null;const l=r.value?.filter(c=>Qr.has(c.code))||[];return l.length===0?null:{violations:l,noticeType:et.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:et.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 Xb(){const{i18n:e,shop:t,checkout:n}=b(),{allViolations:r,paymentLines:o,paymentMethods:i}=q(),a=Pn(),l=n.configuration.layout.isOnePage.value,c=Pe();return x(()=>{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=>Ch(f.code))||[];return m.length===0?null:{violations:m,noticeType:et.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:et.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 sW(){const{buyerIdentity:e,allViolations:t}=q(),{i18n:n,shop:r,observability:o}=b();return x(()=>{if(!e.value?.purchasingCompany)return null;const i=(t.value||[]).filter(a=>!J4.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:et.OtherViolations,noticeTitle:n.translate("notice_banner.violations_title",{violation:n.translate("notice_banner.individual_violations_title",{scope:et.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 aW(){const e=q().buyerIdentity.value?.purchasingCompany,t=!b().checkout.configuration.layout.isOnePage.value,n=Q4().value,r=X4(),o=rW(),i=tW().value,a=oW().value,l=qb().value,c=nW().value,u=Xb().value,d=iW().value,p=sW().value,{currentDetour:m}=Pe().value,f=m?.type&&K4.includes(m.type),{shippingAddress:h}=se();if(!e||f)return[];const g=h.peek(),y=e?.location.shippingAddress||{},_=ri(g,y);return[...u?[Oo(u)]:[],...d?[Oo(d)]:[],...p?[Oo(p)]:[],...n?[n]:[],...r?[r]:[],...o?[o]:[],...i?[i]:[],...a?[a]:[],...l&&t&&_?[l]:[],...c&&t?[c]:[]]}function Qb(){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(wh.map(d=>[d,u[d]]))},[i,o,n,r])}function lW(){const{router:e}=b(),t=Qb(),n=e.currentUrlMatches("/thank-you");return{searchParams:t,isThankYouPage:n}}function ed(){const{paymentMethods:e}=q(),{paymentLines:t}=se(),{searchParams:n,isThankYouPage:r}=lW(),o=Ye(n),i=Ye(r),a=U(!1),l=U(!1);return x(()=>{const c=o.value,u=t.value,d=e.value,p=c.wallet===Le.BuyWithPrime&&!c.amazon_cancelled,[m]=ms(u,[Le.BuyWithPrime]),f=!!m;return p&&(a.current=!0),f&&(l.current=!0),l.current&&!f&&!p&&(a.current=!1,l.current=!1),dI({paymentLines:u,paymentMethods:d,urlParams:{wallet:a.current?Le.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:i.value})})}function cW(){const{checkout:e,i18n:t}=b(),{configuration:n}=e,r=e.latestReceipt.value,{lastJourneyProgression:o}=Je(),i=n.layout.isOnePage.value,a=ed(),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?et.PaymentsViolations:et.OtherViolations,[c]);return d?{code:p,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}function uW(){const e=q().allViolations,{i18n:t}=b(),n=Pe(),r=Te(void 0);return tr(o=>{o.type==="complete"||o.type==="invalid"||o.type==="failed"||(r.value=o.negotiationStage)}),x(()=>{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 dW(){const{source:e}=b(),{paymentLines:t,buyerIdentity:n}=q(),r=Xb(),o=e.type==="draftOrder";return x(()=>!o||n.value?.purchasingCompany||!t.value?.lines?.some(i=>i.method.type==="deferred")?null:r.value)}function pW(){const e=q().allViolations,{i18n:t,url:n}=b();return x(()=>{const r=e.value?.filter(i=>Ah.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(lt,{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:et.MerchandiseQuantityRulesNotMet,localizedTitle:t.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:o,collapsible:!1,tone:"critical"}})}function mW(){const e=q().merchandiseLines,{i18n:t}=b();return x(()=>{if(e.value?.sellingPlanMismatch)return{code:et.SellingPlanDigest,localizedMessage:t.translate("notice_banner.subscription_changed"),status:"warning"}})}function fW(){const{taxes:e,merchandiseLines:t}=q(),{i18n:n}=b(),r=U("unset"),o=U(),i=Pe();return x(()=>{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:et.TaxExemption,localizedMessage:n.translate("change_country.cart_updated_based_on_country")},r.current=u):(!l||c)&&(o.current=void 0),o.current})}function Zb(){const{paymentLines:e}=se(),{checkout:t}=b(),n=t.identity.current.value==="shopPay";return x(()=>pI({paymentLines:e.value,isOnePage:t.configuration.layout.isOnePage.value,isShopPayActive:n}))}function hW(){const e=q(),{allViolations:t}=e,n=e.paymentLines?.value?.lines,{lastJourneyProgression:r}=Je(),o=!!Pt(n,"APPLE_PAY"),i=gW(),a=Zb(),l=x(()=>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"||(mI.has(y.code)&&h.push(i(y,"info")),fI.has(y.code)&&g.push(i(y,"warning")),hI.has(y.code)&&l.value&&h.push(i(y,"critical")),gI.has(y.code)&&h.push(i(y,"critical")),o&&!a.value&&yI.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 gW(){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(lt,{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(lt,{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"),[vI]: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 yW(){const e=pW(),t=W4(),n=cW(),r=mW(),i=$b().value.banner,a=fW(),l=aW(),c=hW(),u=dW(),d=uW(),p=b().checkout.configuration.layout.isOnePage.value,{allViolations:m}=q(),f=x(()=>oy(m.value??[])),h=jb();return[...c,...u.value?[Oo(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(_I("localizedMessage"))}function td(e,t){const n=e.peek()||{};Object.entries(t).some(([r,o])=>n[r]!==o)&&(e.value={...n,...t})}function vW(){const e=as(Le.AmazonPay),t=as(Le.BuyWithPrime),{hasError:n}=cy(kh),{checkout:r}=b(),i=r.latestReceipt.value?.id,{persistedAmazonSignal:a}=We(),l=!!(n&&(e.value||t.value))&&i!==a.value?.receiptIdForPaymentDecline,c=M(()=>td(a,{receiptIdForPaymentDecline:i}),[a,i]);return{hasError:l,clearError:c}}function eP(){const{checkout:e}=b(),t=e.latestReceipt.value,{persistedApplePaySignal:n,inMemoryApplePayParts:{paymentSheetError:r}}=We(),o=Te(!1),i=Te(!1),a=n.value,l=Zb(),c=M(()=>{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 Km(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 _W(){const[e,t]=tu(fn.LastSeenErrorReceiptId),n=St(),{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]=ie(()=>n.peek()?Km(a,e,i.type,c):!0);return F(()=>{const p=Km(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}const Jm=["discountLines","totalSavings","merchandiseLines","deliveryNext"];function tP(e){return e.some(({code:t})=>Lv.has(t))}function bW(e){return e.find(t=>Lv.has(t.code))}function PW(e,t){const n=bI(t);e.value=n}function Xm(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?!na(i,n):r?!r.includes(i.id):!0);return o.length>0?o:null}const nP=(e,t)=>
39e.toUpperCase()===t.toUpperCase(),na=({discountLine:e},t)=>!!(t&&nP(e.discount.title,t)),SW=(e,t)=>t.some(n=>(n.discount.type==="discountCodeTrigger"||n.discount.type==="code")&&na(e,n.discount.title)),EW=(e,t,n)=>[...t.reduce((o,i)=>{if(i.errorCode===Jo||SW(i,e))return o;const a=na(i,n);return!n||a?o.set(i.discountCode.toUpperCase(),i):o},new Map).values()];function rP(e){return e?.shopPay?.isExternal===!0}function CW(){const{i18n:e}=b(),{voidedGiftCardsSignal:t}=Mt(),n=t.peek(),r=V(()=>new Set([...zs,"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 M(i=>i.reduce((a,l)=>(r.has(l.code)&&a.push(o[l.code]()),a),[]),[o,r])}function ra({inputRef:e,headingId:t,monorailSection:n}={}){const{discountCodeWarningSignal:r,reductionsErrorsSignal:o,reductionsValueSignal:i,derivedErrorMessageSignal:a,refreshNegotiationSignal:l,currentDiscountCodeAttemptSignal:c}=Mt(),u=Je(),{negotiate:d}=Nt(),p=Te(i.peek()),[m,f]=ie(i.peek().length>0),{discountLines:h,paymentLines:g,reduction:y}=se(),_=r.value,{checkout:P,i18n:v,userEvents:E,shop:k,source:S}=b(),I=$f(k),C=P.identity.current.value==="shopPay",w=h.value,[A,T]=ie([]),L=CW(),N=yy(),{currentPage:D}=Pe().value,O=He("discountLines").value,B=U(0),[z,R]=ie(!1),$=V(()=>w?.reduce((J,ne)=>(ne.message&&!A.includes(ne.discount.title)&&J.push({id:_l(),discountCode:ne.discount.title,message:ne.message??"",discountLine:ne,tone:"info"}),J),[]),[w,A]);F(()=>{O&&(B.current+=1)},[O,B]),F(()=>{O||R(!1)},[O]),F(()=>{le(z&&O)},[_,O,B,z]);const j=U(D?.id);F(()=>{j.current!==D?.id&&(j.current=D?.id,o.value=[])},[D?.id]);const ee=M(J=>{const ne=r.value??[];r.value=Xm(ne,{ids:J}),N()},[N,r]),ae=M(J=>{const ne=$.filter(({id:me})=>J.includes(me)).map(({discountCode:me})=>me);T(me=>[...me,...ne]),N()},[$,N]),K=M(J=>{i.value=J,J&&(p.value=J)},[i,p]),Q=M(({clearWarnings:J=!0,preserveValue:ne=!1}={})=>{ne||(K(""),f(!1),c.value=null),J&&(r.value=null)},[c,r,K]),X=M(()=>{t&&document.getElementById(t)?.focus()},[t]),H=M(J=>{K(J?.trim()),o.value.length>0&&(o.value=[])},[K,o]),ue=M(()=>{o.value.length>0&&(o.value=[])},[o]),[re,le]=ie(!1),de=M((J,ne)=>{const me=[],ge=[],Ae=r.value??[],be=c.value;for(const Ce of J){const Ue=Jo===Ce.code;switch(Ce.type){case"InputValidationError":case"UnprocessableTermViolation":{if(Mo.has(Ce.code)){me.push(Ce);break}ne!=="negotiation"&&zs.has(Ce.code)&&me.push(Ce);break}case"RemoveTermViolation":case"ConfirmChangeViolation":{const je=Ce.type==="ConfirmChangeViolation",te=PI(Ce.targetEntity),oe=!!(be&&te&&nP(te.title,be));if(Tv.has(Ce.code)&&ne!=="completion"&&!oe)break;if(Mo.has(Ce.code)){me.push(Ce);break}if(te?.discount.type!=="discountCodeTrigger"||!wv.has(Ce.code))break;const we=Rl.has(Ce.code),Qe={message:Ce.localizedMessage??Ce.nonLocalizedMessage,messageHtml:Ce.localizedMessageHtml,discountLine:te,tone:we?"info":"warning",discountCode:te.discount.title,id:_l(),errorCode:Ce.code,isConfirmChangeViolation:je};if(Ue){ge.push(Qe);break}(!be||oe)&&ge.push(Qe);break}}}return o.value=me.slice(-1),be||ge.unshift(...Ae.filter(Ce=>Ce.errorCode===Jo)),r.value=ge.length>0?ge:null,{hasWarnings:ge.length>0,hasPreserveInputErrors:J.some(Ce=>Mo.has(Ce.code))}},[c,r,o]),ke=M(async()=>{await d({include:[],onComplete:J=>{P.unstable_overwriteLatestReceipt(void 0),l.value=!1,(J.status==="success"||J.status==="error")&&de(J.errors)}})},[de,d,P,l]);ze(()=>{const J=P.latestReceipt.value;l.peek()||!J||!ey(J)||J.failure?.type!=="discount"||(l.value=!0,ht(()=>{ke()}))}),tr(M(J=>{"errors"in J&&de(J.errors,J.negotiationStage)},[de])),ze(()=>{const J=u.lastJourneyProgression.value;J.type==="error"&&J.negotiationStage==="completion"&&ht(()=>de(J.errors,"completion"))}),SI(({parts:J,reason:ne})=>{const me=r.peek()??[],ge=c.peek(),Ae=ge&&me.every(Ue=>!na(Ue,ge));if(me.length===0)return{behavior:"allow"};if(ne==="completion"||Ae)return r.value=null,{behavior:"allow"};if(ne!=="progression"&&ne!=="negotiation")return{behavior:"allow"};const be=J.discountLines.peek(),Ce=EW(be,me,ge);return Ce.length>0&&(J.discountLines.value=[...be,...Ce.map(({discountLine:Ue})=>Ue)]),{behavior:"allow"}}
39);const he=M(J=>(J||g.value).filter(me=>me.method.type==="giftCard").map(me=>me.method.code),[g]),ve=M(()=>h.value.filter(J=>J.discount.type==="code").map(J=>J.discount.title),[h]),Ee=M(async()=>{R(!0);const J=i.value,ne=JSON.parse(JSON.stringify(g.value));c.value=J,e?.current?.blur(),X();const me=ve(),ge=new Set(h.value.filter(Ae=>Ae.discount.type==="code"&&Ae.discount.codeHidden).map(Ae=>Ae.discount.title));await d({include:["deliveryNext"],fieldsToResolve:[...Jm],loading:["deliveryNext","discountLines"],customizeNegotiation:Ae=>({...Ae,reduction:{code:J}}),onComplete:Ae=>{if(Ae.status==="success"||Ae.status==="error"){const{hasWarnings:be,hasPreserveInputErrors:Ce}=de(Ae.errors);Q({clearWarnings:!be,preserveValue:Ce});const Ue=tP(Ae.errors);if(Ue&&Ae.errors.some(pe=>Rl.has(pe.code))){const pe=ve(),xe=me.filter(rt=>!pe.includes(rt));xe.length>0&&(xe.length===1&&ge.has(xe[0])?(Lt({content:v.translate("order_summary.discount_has_been_removed")}),Lt({content:v.translate("order_summary.discount_code_applied_with_code",{code:J})})):Lt({content:xe.length>1?v.translate("order_summary.discount_code_replaced_multiple",{code:J}):v.translate("order_summary.discount_code_replaced",{old_code:xe[0],code:J})}))}const je=Ae.negotiated.paymentLines?.lines||[],te=he(ne),oe=he(je),we=te.reduce((Ne,pe)=>(Ne[pe]=!0,Ne),{}),Me=oe.some(Ne=>we[Ne]===void 0),Qe=ne.reduce((Ne,pe)=>(pe.method.type==="giftCard"&&pe.cost!=null&&pe.cost.amount>0&&(Ne[pe.method.code]=!0),Ne),{}),Bt=I&&je.some(Ne=>Ne.method.type==="giftCard"&&Ne.cost!=null&&Ne.cost.amount>0&&Qe[Ne.method.code]===void 0);if(!Ue){if(I&&(Me||Bt)){const pt=g.peek();g.value=[...pt.filter(Jt=>!xd(Jt)),...je.filter(xd)]}const{runningTotal:Ne,merchandiseLines:pe}=Ae.negotiated;!(Ne&&Ne.amount<=0)||Yf(pe?.lines)||ne.some(Jt=>Jt.method.type==="walletsPlatformPaymentMethod"&&Jt.method.name===Le.BuyWithPrime)||PW(g,I&&(Me||Bt)?je:ne);const ft=v.translate("order_summary.discount_code_applied_with_code",{code:J});Lt({content:Me||Bt?v.translate("order_summary.gift_card_applied"):ft}),K(""),f(!1)}const kt=bW(Ae.errors),Kt=()=>{if(!Ue)return Me?"gift_card":"discount_code"};E.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(Be(k.id),10),checkoutToken:S.checkoutSessionIdentifier??"checkout_identifier_undefined",event:Ue?"apply_reduction_failure":"apply_reduction_success",reductionType:Kt(),errorMessage:kt?.nonLocalizedMessage,page:"checkout",section:n}}),C&&(Ue?E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,k),action:"add_discount_failure"}}):E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,k),action:Me?"add_gift_card":"add_discount_success"}}))}},force:!0}),N()},[Q,c,N,X,he,de,e,C,d,h,g,K,v,i,E,S,P,k,I,n,ve]),De=M(async J=>{const ne=h.value,me=ve(),ge=ne.some(be=>be.discount.type==="code"&&be.discount.title===J&&be.discount.codeHidden);if(ne.length===1&&X(),rP(u)){const Ce=u.shopPay.discountCodes.value.filter(Ue=>Ue!==J);u.shopPay.updateDiscountCodes(Ce)}h.value=ne.filter(be=>be.discount.type==="code"?be.discount.title!==J:!0),r.value=Xm(r.value,{code:J}),T(be=>be.filter(Ce=>Ce!==J)),y.value?.code===J&&(y.value=void 0),C&&E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,k),action:"remove_discount"}}),await d({include:["deliveryNext"],fieldsToResolve:[...Jm],loading:["discountLines","deliveryNext"],force:!0,onComplete:be=>{(be.status==="success"||be.status==="error")&&de(be.errors),Lt({content:ge?v.translate("order_summary.discount_has_been_removed"):v.translate("order_summary.discount_code_removed",{code:J}),role:"status"});const Ue=ve().filter(je=>!me.includes(je));if(Ue.length>0){const je=h.value.some(te=>te.discount.type==="code"&&te.discount.title===Ue[0]&&te.discount.codeHidden);Lt({content:je?v.translate("order_summary.discount_has_been_applied"):v.translate("order_summary.discount_code_applied_with_code",{code:Ue[0]}),role:"status"})}}}),N()},[u,h,y,C,d,N,X,E,S,P,k,de,r,ve,v]),Ie=M(async J=>{const ne=g.value;g.value=ne.filter(me=>me.method.type==="giftCard"?me.method.code!==J:!0),g.value.length===1&&X(),C&&E.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...$n(S,P,k),action:"remove_gift_card"}}),await d({include:["paymentLines"]}),N()},[g,C,d,N,E,S,P,k,X]);return{loading:re,handleSubmit:Ee,handleNegotiationErrors:de,dirty:m,setDirty:f,removeDiscount:De,getGiftCards:he,removeGiftCard:Ie,reductionCodeField:{value:i.value,valueSignal:p,onChange:H,onInput:ue,error:zy(o.value),errorSignal:a},discountCodeWarning:_,discountMessages:$,removeDiscountCodeWarnings:ee,removeDiscountCodeMessage:ae,giftCardBannerErrors:L(o.value)}}function oP(){const{negotiate:e}=Nt(),{email:t,phone:n,billingAddress:r,paymentLines:o}=se(),{inMemoryApplePayParts:{asPaymentMethod:i}}=We(),{checkout:{wallets:a}}
39=b(),l=q(),{value:c}=l.buyerIdentity,u=c?.customerProfile?.__typename==="CustomerProfile",d=c?.purchasingCompany,p=Er(),m=Cv(),f=EI({availableDeliveryAddresses:l.availableDeliveryAddresses?.value,mustSelectProvidedAddress:l.mustSelectProvidedAddress?.value}),h=M(()=>{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=Gs(),y=Yv();return M(async({shouldPersist:_=!0}={})=>{const{shouldResetBuyerInfo:P,shouldRemoveWalletContent:v,shouldRemoveBillingAddress:E,forceClearLocalPickupFields:k}=h();v&&(o.value=nc(o.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||g({shouldResetCustomerInfo:P,shouldRemovePaymentLine:!i.value,isConstrainedAddress:f}),k&&(t.value="",n.value=""),E&&(r.value=m("billing")??bl(r.value)),_&&!a.activeSession.value&&await e({silenceViolations:["non-stock"]})},[g,a,o,t,n,r,e,h,i,y,m,f])}function kW({shouldPersist:e}){const t=oP(),{walletUsedForSubmissionSignal:n,persistedApplePaySignal:r,inMemoryApplePayParts:{paymentSheetError:o,subscriptionReviewTransition:i}}=We();return M(()=>{o.value=void 0,i.value=void 0,n.value=void 0,r.value={},t({shouldPersist:e})},[o,i,n,r,t,e])}function IW(){const e=kW({shouldPersist:!1}),{clearError:t,hasError:n}=eP(),{checkout:r,router:o}=b(),{clearForcedCheckoutLayout:i}=Us(In),a=M(()=>{e(),i({wallet:"APPLE_PAY"}),r.unstable_evaluateSupportsSplitShipping(o.currentUrl.value),n&&t()},[e,r,i,o,t,n]);return Ws({onClick:a,shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function AW(){const{i18n:e}=b(),{onClick:t}=IW(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:s(lt,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return s(_n,{errorType:st.PaymentError,tone:"critical",children:s(Z,{alignItems:"start",gap:"small-500",children:s(Ke,{children:n})})})}function TW(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:t}}=We(),n=He("shippingAddress");return x(()=>t.value&&!e.value.loading&&!n.value)}function Qm(e){const t=TW(),{hasViolations:n,violations:r}=o0(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 wW({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=b(),n=Qm(new Set([...CI].filter(o=>e.every(i=>!o.startsWith(i))))),r=Qm(new Set([...Qr,...Th].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 iP(){return wW({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function LW(){const{i18n:e}=b(),t=iP();return t?.length?s(_n,{tone:"critical",errorType:st.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),s(Zu,{children:t.map(n=>s(Qu,{children:s(W,{children:n})},n))})]},"amazon-pay-errors"):null}function xW(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 sP(){const e=ed(),t=Ye(iP()),{persistedAmazonSignal:n,inMemoryAmazonPayParts:{hasPaymentSheetError:r}}=We();return x(()=>{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 RW(){const e=sP();return e.value?s(MW,{errorMessagesType:e.value}):null}function MW({errorMessagesType:e}){const{i18n:t,checkout:n}=b(),r=n.configuration.layout.isOnePage.value,{value:o}=q().paymentLines,{persistedAmazonSignal:i}=We();return xW(),F(()=>{o?.lines.filter(l=>!(l.method.type==="walletsPlatformPaymentMethod"&&l.method.name===Le.BuyWithPrime))?.length&&td(i,{primeError:void 0})},[o,i]),e==="payment sheet error"||e==="terminal error"?s(_n,{errorType:st.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(LW,{}):NW()}function NW(e){return null}
39function nd({errors:e,errorType:t}){return s(G,{children:e.map(n=>s(_n,{tone:"critical",errorType:t,children:n.messageNode??n.message},`${n.target}${n.message}`))})}function DW(e){if(e.startsWith("DISCOUNTS")||e==="ReductionViolations")return st.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 st.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return st.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUAL_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return st.PaymentError;default:return st.CheckoutError}}function OW(){const e=yW();return e.length>0?e.map(t=>s(Wb,{notice:t,errorType:DW(t.code)},t.code)):null}function FW(){const{globalErrors:e}=Ys().value;return e.length>0?s(nd,{errors:e,errorType:st.CheckoutError}):null}function BW(){const{merchandiseLineTransformerErrors:e}=t4().value;return e.length>0?s(nd,{errors:e,errorType:st.MerchandiseError}):null}function VW(){const{contactErrors:e}=Ys().value,t=fo();return e.length===0?null:t.value.contact?s(nd,{errors:e,errorType:st.ContactError}):null}function UW(){return!!sP().value?s(RW,{}):null}function zW(){const{hasError:e}=vW(),t=_W();return e&&!t?s(V4,{}):null}function HW(){const{hasError:e}=eP();return e?s(AW,{}):null}function qW(){const{giftCardBannerErrors:e}=ra(),{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(_n,{errorType:st.DiscountError,tone:"critical",children:o.localizedMessage}):r?s(_n,{errorType:st.DiscountError,tone:"critical",children:r}):null}const GW=()=>{const{isAppLayout:e}=Xu(),{embed:t,checkout:n}=b(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:o="base"}}=ct(),i=[OW(),FW(),BW(),VW(),UW(),zW(),qW(),HW()].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(Z,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${d}, ${c}`,children:i})},Hl=Qn(function({section:t="top"}){return{toast:s(M4,{}),top:s(GW,{}),reductions:s(x4,{}),delivery:s(T4,{}),payment:s(w4,{})}[t]});function WW(e){const{source:t}=b(),n=t.type==="simulated",r=U(null),{allRenderedSections:o,getRenderedSection:i}=Mt(),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 $W({sectionId:e,children:t}){const{source:n}=b(),r=n.type==="simulated",{sectionRef:o}=WW(e);return r?s(G,{children:[s("div",{ref:o,style:{display:"none"}}),t]}):s(G,{children:t})}const YW={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function jW(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=b();return M(async n=>{const{data:r,error:o}=await e.mutate(YW,{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 KW(){const{negotiate:e}=Nt(),{handleNegotiationErrors:t,discountCodeWarning:n}=ra(),{discountLines:r,reduction:o}=se(),{shop:i,source:a,checkout:l,userEvents:c,shopPay:u}=b(),d=u.user.wallet.value,p=jW(),[m,f]=ie(!1),[h,g]=ie(""),y=u.user.shopAccountUuid,_=M((I,C)=>
39{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...$n(a,l,i),action:I,shopAccountUuid:C,shopPermanentDomain:i.myshopifyDomain,discountCode:h}})},[c,a,l,i,h]),P=M(async I=>{(await p(h)).status==="success"&&_("invalidated - discount had been deleted",I)},[p,_,h]),[v,E]=ie(()=>r.value.length?"open":"closed"),k=M(I=>{const C=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],w=new Set([...Mo,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",Jo]);return I.some(A=>C.includes(A.type)&&w.has(A.code))},[]),S=M(I=>{const C=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],w=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return I.some(A=>C.includes(A.type)&&w.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 C=y.value;e({onComplete:async w=>{if(f(!1),w.status==="success"||w.status==="error"){const A=w.negotiated.discountLines?.lines.some(T=>T.discount.title.toLowerCase()===I?.toLowerCase());h&&(t(w.errors),A?_("applied",C):k(w.errors)?P(C):S(w.errors)&&_("failed to apply - invalid cart",C),o.value=void 0),E(A||n?"open":"closed")}},force:!0})}},[m,t,n,e,h,v,k,_,S,P,c,o,y.value]),{discountLines:r.value,formStatus:v,setFormStatus:E,walletDiscountCode:h}}function JW({children:e}){const{formStatus:t}=KW();return t==="negotiating_app_discount"?s(_e,{inlineAlignment:"center",children:s(io,{})}):s(G,{children:e})}const XW=e=>typeof e=="string"||typeof e=="number"?e.toString():yh(e)?e.message:Lh(e)?e.textValue:"";function QW({children:e,state:t,errors:n}){const r=Gb(),o=Zg(),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?st.InputInvalid:st.InputRequired,f=XW(u);o({target:d,errorType:m,value:p,message:f,timestamp:new Date})}))}),()=>{a.forEach(l=>l()),i.current=[]}},[]),e}function rd(){const{source:e}=b(),t=q().canUpdateDiscountCodes;return x(()=>(t.value??!0)&&!nt(e))}function aP(){const e=q(),t=e.paymentFlexibilityPaymentTermsTemplate,n=Fn(),r=e.paymentMethods;return x(()=>e.buyerIdentity.value?.purchasingCompany&&(t.value||n.value)?!1:r.value?.some(o=>o.type==="giftCard"))}function ZW(){const{i18n:e,shop:{discountCodesEnabled:t}}=b(),n=rd(),r=aP();return x(()=>{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 e$="_1MTFx",Zm={bannerMessage:e$};function ef({messages:e}){const t=r=>r==null?null:s("span",{dangerouslySetInnerHTML:{__html:r}}),n=r=>s(Cr,{children:r.messageHtml?t(r.messageHtml):r.message});return e.length===1?s("div",{className:Zm.bannerMessage,children:n(e[0])}):s(Zu,{children:e.map(r=>s(Qu,{children:s("div",{className:Zm.bannerMessage,children:n(r)})},r.id))})}function t$(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 n$(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 r$(e){return e.reduce((n,r)=>(n.add(r.discountCode.toLocaleUpperCase()),n),new Set).size}const tf=Qn(function({removeBanner:t,messages:n,grouped:r=!1}){const{i18n:o}=b(),i=V(()=>t$(n,r),[n,r]),a=M((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(nu,{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=n$(c),m=r$(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(_n,{...h,errorType:st.DiscountError,children:s(ef,{messages:p})},d[0]):s(ta,{...h,children:s(ef,{messages:p})},d[0])})})});var ll={Chip:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",Icon:"_14brw2",Label:"_14brw3"};function o$({accessibilityLabel:e,children:t,graphic:n,id:r}){const o=Et(t);return s("div",{className:ll.Chip,id:r,children:[s(Z,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&s("span",{className:o?ll.Icon:void 0,children:s(Re,{type:n})}),o&&s("span",{className:ll.Label,children:s(W,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:s(Pi,{children:t})})})]}),e&&s(W,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var Dn={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 i$=ci(at(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=Un(),E=ln(),k=U(i);F(()=>{!k.current&&i&&d?.(),k.current=i},[i,d]);const S=Y(Dn.ClickableChip,{[Dn.disabled]:r||v,[Dn.hidden]:i}),I=t?E("removeItem",{label:t}):E("removeChip");return s("div",{id:l,className:S,role:"group",children:[s(s$,{"aria-describedby":_,disabled:r,href:a,inert:v,onClick:p,onMouseEnter:m,onMouseLeave:f,onFocus:h,onBlur:g,ref:P,removable:c,children:s(o$,{accessibilityLabel:t,graphic:o,children:n})}),c&&s("button",{"aria-hidden":v?!0:void 0,"aria-label":I,className:Y(Dn.RemoveButton,Dn.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(Re,{type:"x",size:"small"})})]})})),s$=at(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=$r(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:Dn.outlineStyles,ref:f,children:t}):g?s(ws,{"aria-describedby":p,className:Y(Dn.outlineStyles,Dn.linkStyles),href:g,onClick:y,ref:f,..._,children:t}):s("button",{"aria-describedby":p,"aria-hidden":o?!0:void 0,className:Dn.outlineStyles,disabled:n,onClick:y,ref:f,tabIndex:o?-1:void 0,type:"button",..._,children:t})}),a$="ZWcPq",l$={TagContainer:a$};function c$({reductionTags:e,headingId:t}){const{i18n:n}=b(),r=rd(),o=Rb(),{removeDiscount:i,removeGiftCard:a}=ra({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(Z,{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(_e,{accessibilityRole:"list-item",className:l$.TagContainer,children:[s(i$,{accessibilityLabel:h,graphic:g,id:`tag-${p}`,interestFor:v,removable:!v,onRemove:_,removeTrackingEvent:y,children:f.toUpperCase()}),v&&s(Sn,{id:v,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${d.originType}-${d.code}`)})})}const u$="OuqRS",d$="U9F9G",nf={TagListButtonContainer:u$,TagListExpandButton:d$};function p$({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return s(vy,{children:s(nu,{target:"cart",children:s(h$,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}
39const m$=Xe("ReductionsInput"),f$=Xe("ReductionsHeading");function h$({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=Je(),d=l.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:p,discountTagsDisplay:m,automaticTagsDisplay:f,position:h,spacing:g}}=Fe(),y=St(),_=Es({base:!0,medium:!1}),P=y.value?_??!1:!0,v=Te(!1),E=M(()=>{v.value=!v.value},[v]),k=rd(),S=mo(),{control:{labelPosition:I="inside"}}=ct(),{reductions:{labelPosition:C=I}}=Fe(),{discountLines:w,paymentLines:A}=se(),T=w.value,N=A.value.reduce((Ne,pe)=>(pe.method.type==="giftCard"&&Ne.push({originType:"giftCard",code:pe.method.code}),Ne),[]),D=rP(u)&&u.shopPay.discountCodes.value.length?u.shopPay.discountCodes.value:null,O=D?[...new Set(D)].map(Ne=>{const pe=T.find(rt=>rt.discount.type==="code"&&rt.title===Ne),xe=pe?.discount.type==="code"&&!!pe.discount.codeHidden;return{originType:"discountCode",code:Ne,...xe?{hideLabel:!0}:{}}}):[...T.reduce((Ne,{discount:pe,title:xe})=>(pe.type==="code"&&!Ne.has(xe)&&Ne.set(xe,{originType:"discountCode",code:xe,...pe.codeHidden?{hideLabel:!0}:{}}),Ne),new Map).values()],B=T.reduce((Ne,{discount:{type:pe},title:xe})=>((pe==="automatic"||pe==="custom")&&Ne.push({originType:"automatic",code:xe}),Ne),[]),z=k.value?O:[],R=[...f==="hidden"?[]:B,...z,...N];R.length===0&&(v.value=!1);const $=m==="always_visible"||m==="base"&&R.length>0&&(!P||v.value);let j=!1;u.lastJourneyProgression.value.type==="error"&&u.lastJourneyProgression.value.negotiationStage==="completion"&&(j=tP(u.lastJourneyProgression.value.errors));const ee=$e(void 0,m$),ae=$e(void 0,f$),K=Os({active:j});F(()=>{r&&K.current&&K.current.scrollIntoView({behavior:"smooth"})},[r,K]);const{currentDetour:Q,currentPage:X}=Pe().value,H=it("Checkout::Reductions::RenderBefore"),ue=it("Checkout::Reductions::RenderAfter"),re=i&&k.value,le=aP(),de=a&&le.value,{loading:ke,reductionCodeField:he,dirty:ve,setDirty:Ee,handleSubmit:De,discountCodeWarning:Ie,discountMessages:J,removeDiscountCodeWarnings:ne,removeDiscountCodeMessage:me}=ra({inputRef:K,headingId:ae,monorailSection:t});F(()=>{if(Ie&&Ie.length>0){const Ne=Ie[0].message.trim();return Ne?Lt({content:Ne,role:"status"}):void 0}},[Ie]);const{label:ge,title:Ae,placeholder:be}=ZW().value,Ce=V(()=>({state:{discountCode:he.valueSignal},errors:{discountCode:he.errorSignal}}),[he]);if(Q&&Q.type!=="shopPayLogin")return null;const Ue=Ie?s(tf,{messages:Ie,removeBanner:ne,grouped:!0}):null,je=J&&J.length?s(tf,{removeBanner:me,messages:J}):null,te=p==="base",oe=e!=null&&h==="base"&&C==="outside"&&Ae===ge,we=!te&&C==="outside"&&!oe,Me=m==="base"&&P&&R.length>0?s(_e,{colorLayer:"control",className:nf.TagListButtonContainer,children:s(Tn,{className:nf.TagListExpandButton,onClick:E,accessibilityLabel:o.translate("order_summary.discount_code_applied_count",{count:R.length}),"data-event-name":v.value?"discount_tags_hide":"discount_tags_show",border:"base",children:s(Z,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[s(Re,{type:"discount",tone:"monochrome"}),s("strong",{children:R.length})]})})}):null,Qe=te?s(an,{variant:"primary",type:"submit",loading:ke,disabled:!ve,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=he.error;te||(Bt=he.error?!0:void 0);const kt=s(tb,{ref:K,id:ee,name:"reductions",label:ge,placeholder:be,...he,error:Bt,onInput:Ne=>Ee(Ne.length>0),autoFocus:n,accessoryStart:Me,accessoryEnd:Qe,labelPosition:we?void 0:C,labelAccessibilityVisibility:we||oe?"exclusive":void 0}),Kt=s(_e,{children:[s(Z,{gap:"base",children:[s(f4,{onSubmit:De,children:te?kt:s(G,{children:[we&&s(G,{children:[s(Vl,{variant:"outside",htmlFor:ee,label:ge}),s(zt,{blockSize:"small-400"})]}),s(Z,{gap:"small-300",children:[s(gt,{gap:kI(["small400",g??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[kt,s(an,{variant:"primary",type:"submit",loading:ke,disabled:!ve,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($m,{below:"medium",children:o.translate("order_summary.apply_discount_button_label")}),s($m,{above:"small",children:s(Re,{type:"arrow-right"})})]})})]}),he.error?s(Ou,{controlID:ee,children:he.error}):null]})]})}),Ue,je]}),s(hn,{id:"reduction-tags",open:$,duration:"fast",children:s(_e,{paddingBlockStart:R.length>0?"base":void 0,children:s(c$,{reductionTags:R,headingId:ae})})})]});return s(G,{children:[s(hn,{id:"gift-card-field",open:de||re,duration:"fast",children:s(kr,{children:[s(Yt,{id:ae,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:Ae}),e&&s(zt,{blockSize:"base"}),s(Z,{gap:"base",children:[s($t,{customizations:H}),s($W,{sectionId:"reductions",children:c&&d?s(JW,{children:Kt}):s(QW,{...Ce,children:Kt})}),s($t,{customizations:ue}),l.configuration.showPayButton&&re&&(d||X?.id==="payment")&&s(y4,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:o.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!de&&!re&&s(Hl,{section:"reductions"})]})}const uj="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",dj="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",pj="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",mj="224px",fj="72px",od=72,hj="415px",gj="700px",yj="100dvi",vj="93dvb",lP=new Set(["Chat","s-chat"]),Fo={};function g$(){const e=ce(null),t=new Set,n=ce(),r=ce(!1),o=ce();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=It(()=>!!(e.value&&o.value&&n.value!=null)),d=It(()=>{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 y$(e){return Fo[e]||(Fo[e]=g$()),Fo[e]}function v$(e){Fo[e]?.dispose(),delete Fo[e]}function _$(e){const t=y$(e);return F(()=>(t.subscriptions++,()=>{t.subscriptions--,t.subscriptions===0&&v$(e)}),[t,e]),t}function b$(e){const t=_$(e),n=U(null),r=M(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 P$(e){return e.every(({quantity:t})=>t===0)}const rf=e=>s(kr,{children:e});
39function ls({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}=b$("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:d,visibility:p,layout:m}}}=b(),f=p.showReductions&&!o,h=m.isOnePage.value,{currentDetour:g}=Pe().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=Es({base:!0,medium:!1}),k=St(),S=h&&(k.value?E:!0),I=Qs(),C=u.proposal.facts.merchandiseLines??[];if(h&&!d){const A=[];for(const T of I.value.values())A.push(...T);if(A.push(...C),P$(A))return s(Ke,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return s(e?G:kr,{...!e&&{containerName:"s-shell-section"},children:[s(Z,{gap:"large-200",children:[!n&&s(Yt,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&s(Lq,{}),f&&s(p$,{monorailSection:r,autoFocus:i,autoScroll:a}),!y&&s($t,{customizations:P,gap:"large-200",render:rf}),s(p4,{}),(!S||y)&&s($t,{customizations:y?P:v,gap:"large-200",render:rf})]}),s(ye,{when:l,children:s(_e,{minBlockSize:`@media (inline-size >= medium) ${od}px, 0`})})]})}function S$(){const e=b();return x(()=>Jy(e))}function E$(){const{checkout:e}=b();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function C$(){const{mobileCheckoutSdk:e,embed:t}=b(),n=S$(),r=E$(),o=Pe();return x(()=>!n.value&&!e.enabled&&!t?.isCheckoutKit()?!0:e.enabled&&e.variant.isStandard()||t?.isCheckoutKit()?o.value.currentDetour?.type==="thankYou":!!r?.disclosureEnabled)}function k$(){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 id(){const{checkout:e,embed:t,shopPay:n}=b(),{progressing:r}=Nt(),o=Pe(),{submitting:i}=Ot();return x(()=>{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 I$(e={}){const[t,n]=ie(null),[r,o]=ie(null),i=U(null),a=M(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 cP(){const e=Fs(),{checkout:t,embed:n}=b(),r=cb(),{payNowButtonElement:o}=$s(),i=Ft(n?.embedder),{entry:a,ref:l}=I$({threshold:.5});F(()=>(l(o??null),()=>l(null)),[o,l]);const c=Ye(a?.isIntersecting);return x(()=>!!(!i&&(t.isRedirectingExternally.value||!e.value&&!t.wallets.activeSession.value&&!r.value&&!c.value)))}function uP(e){return e.status==="available"&&e.methods.some(({methodType:t})=>t==="SHIPPING"||t==="LOCAL")}function _j(){const e=mc();return x(()=>{const t=e.value?.filter(uP);return{shippableDeliveryLines:t?.length?t:void 0}})}function $i(e){return e?e.status==="unavailable"||e.status==="partial"||e.status==="filled"&&!e.lines.some(uP):!1}function A$({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!$i(e))return!1;const o=Lb(r)?n??t:t;return Bi(o)}const T$={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 w$(e,t){return Kl((n,r)=>{const o=T$[n.status][r];if(o)return{status:o};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:n.status,action:r})},{status:e})}function L$(e,t){const{deliveryMethodsAddressErrors:n,deliveryMethodTimingSignal:r}=Mt(),{parts:o}=Je(),{shippingAddress:i}=o,{observability:a,checkout:{wallets:l},checkout:c,shop:{shippingCountries:u}}=b(),d=c.configuration.isAddressDelegationEnabled,p=i.fields.countryCode.value,m=Ey(p,u),{loading:f}=jt(p),{negotiate:h}=Nt(),{setAddressError:g}=au(n),y=V(()=>II(),[]),{resetAddressSuggestions:_}=lR(y,n),P=lu(p),v=x$(e),E=Ug(),k=V(()=>It(()=>{const w=E({countryCode:i.fields.countryCode.value,zoneCode:i.fields.zoneCode.value});return sq(w)}),[E,i.fields.countryCode,i.fields.zoneCode]),S=U();F(()=>{f||(S.current?.(),S.current=void 0)},[f]);const I=yc(()=>{const w=i.peek();if(f){S.current=()=>I();return}const A=m(w),T=k.peek(),L=cl(T,A,w);v.peek()!=="addressReplaced"&&(L.size===0?t("addressComplete"):t("addressInvalid"))},jL);ex(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 C=V(()=>It(()=>k.value.filter(A=>A!=="countryCode").map(A=>{const T=i.fields[A].value;if(T)return A==="postalCode"?T.replace(/[^a-z0-9]/gi,"").toLowerCase():T.toLowerCase()}).join("_")),[i.fields,k]);F(()=>{let w=!1;const A=e.value.status;return(A==="initial"||A==="empty")&&I(),C.subscribe(()=>{if(w){if(l.activeSession.value||v.value==="addressReplaced"||e.value.status==="resetting")return;I()}w=!0})},[l,I,e,v,i,C]),Ls(e,({previousState:w,action:A,nextState:T})=>
39{if(a.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:w.status,action:A,nextState:T.status}),T.status==="initial"&&I(),T.status==="loading"&&r.peek()===0&&(r.value=Date.now()),A==="reset"){const N=i.peek();for(const D of Object.keys(N))D==="phone"&&fl(N.phone)||g(D,void 0);_()}const L=Rd(e);if(A==="addressComplete"||A==="reset"||A==="addressReplaced"||A==="addressInvalid"&&(w.status==="negotiated"||d)){if(d){const N=i.peek(),D=m(N);if(D.size>0){for(const[O,B]of D)n[O].peek()===void 0&&g(O,{message:B,origin:"client",type:"inline-validation"});t("addressInvalid"),t("negotiationResolved");return}else for(const[O,B]of Object.entries(n)){const z=B.peek();z&&typeof z=="object"&&z.origin==="client"&&z.type==="inline-validation"&&g(O,void 0)}}a.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),h({silenceViolations:["all"],include:[],fieldsToResolve:["deliveryNext"],onComplete(N){const D=L!==Rd(e);if(a.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:N.status,stale:D}),!D){if(N.status==="stale"||N.status==="invalid"){t("negotiationResolved");return}if(!(A==="reset"||!N)&&(N.status==="success"||N.status==="error")&&"violations"in N){const O=N.negotiated.deliveryNext?.status==="filled";if(A!=="addressReplaced"){const R=dP(n);if(cl(k.peek(),R,i.peek()).size>0)return t(O?"negotiationResolved":"addressInvalid")}const B=P("shipping_address",N.violations),z=A==="addressReplaced"?B:cl(k.peek(),B,i.peek());for(const[R,$]of z)n[R].peek()===void 0&&g(R,$);O||z.size===0?t("negotiationResolved"):t("addressInvalid")}}}}).catch(()=>t("negotiationResolved"))}})}function x$(e){const t=Te();return Ls(e,({action:n})=>{t.value=n}),t}const R$=["phone","company","firstName","lastName"];function cl(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(R$.includes(o)&&(!n[o]||n[o]?.length===0))continue;r.set(o,i)}return r}const dP=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const o=r.peek();Lh(o)&&o.type==="error"&&t.set(n,o.textValue)}return t};function M$({children:e}){const{current:t,parts:n}=Je(),{deliveryMethodsAddressErrors:r,deliveryMethodTimingSignal:o,deliveryMethodDeltaSignal:i}=Mt(),a=XL(),{observability:l,embed:c,events:u}=b(),d=V(()=>{const E=t.fields.deliveryNext.peek()?.status==="filled"?"negotiated":"initial";return w$(E,l)},[t.fields.deliveryNext,l]),p=M(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")})),L$(d,p);const h=Ug(),g=x(()=>{const v=d.value.status;if(v==="resetting")return{status:"empty"};if(v==="loading")return{status:v};const E=t.fields.deliveryNext.value,k=$i(E),S=E?.status==="filled"&&!k,I=n.shippingAddress.fields.countryCode.value,C=n.shippingAddress.fields.zoneCode.value,w=h({countryCode:I,zoneCode:C}),A=Lb(w),T=A?n.shippingAddress.peek():n.shippingAddress.value,L=k&&(v==="initial"||v==="empty"&&!A&&dP(r).size===0);return v!=="negotiated"&&!S&&!L?{status:v}:E?k?{status:A$({deliveryNext:E,proposedAddress:T,negotiatedAddress:t.fields.shippingAddress.peek(),reloadStrategy:w})?"error":"empty"}:E.status==="filled"&&S?{status:"filled",deliveryLines:E.lines}:{status:"error"}:{status:"empty"}}),y=Te(g.peek());JL(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 k=t.fields.deliveryNext.peek(),S=k?.status==="filled"&&!$i(k);l.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:k?.status??"unknown",hasShippingMethods:S}})},3e4)),v.status==="filled"){const S=v.deliveryLines.flatMap(C=>C.status==="available"?C.methods:[]).find(C=>C.methodType==="SHIPPING"&&C.deliveryPromiseProviderApiClientId)?.deliveryPromiseProviderApiClientId,I=o.peek();if(S&&I>0){const C=Be(S),A=Date.now()-I;a(A,Number(C)),i.peek()===0&&(i.value=A)}}const E=v.status==="empty"&&d.peek().status==="negotiated"&&$i(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(Vg.Provider,{value:P,children:e})}function pP({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&n==="/thank-you"&&!Ft(e)}var dt=(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))(dt||{});const mP={[dt.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[dt.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[dt.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[dt.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[dt.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[dt.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[dt.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[dt.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[dt.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function N$(e){return mP[e].isAddressProblem}function fP(e){return mP[e].isUnpurchasable}function D$(){const{negotiate:e}=Nt(),t=se().merchandiseLines,n=q().merchandiseLines,{observability:r}=b(),o=M(i=>{const a=t.value;t.value=a.filter(({stableId:l})=>!i.includes(l))},[t]);return M(async i=>{const a=new Map((n.value?.lines??[]).map(c=>[c.stableId,c])),l=i.reduce((c,{problem:u,line:d})=>{if(N$(u.type))return c;const p=a.get(d.stableId);return(!p||p.quantity===0||fP(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 O$(e){const t=n0(e),n=e0(e),r=t0(e),o=iy(e),i=sy(e),a=ry(e),l=r0(e),c=[t,n,r,o].filter(
39Boolean).length>1;return a||c?l?dt.QuantityChange:dt.OutOfStock:t?dt.Unavailable:n?dt.UnpurchasableB2B:r?dt.Unpurchasable:o?dt.Unshippable:i?dt.Unfulfillable:l?dt.QuantityChange:dt.Unknown}function F$(e){return e.quantity>0}function B$(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:dt.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}function hP(e){return fP(e)?e:dt.OutOfStock}function V$(e,t,n){if(!n&&t)return{type:hP(e)}}function U$(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:dt.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}function z$(e,t,n){const{proposed:r,negotiated:o}=e,i=B$(r,o),a=U$(r,o),l=V$(t,r,o),c=r??o;return n.has(c.stableId)?{line:c,problem:{type:t===dt.Unfulfillable?dt.Unfulfillable:dt.Unshippable}}:o?.quantity===0?{line:c,problem:{type:hP(t)}}:a?{line:c,problem:a}:i?{line:c,problem:i}:l?{line:c,problem:l}:{line:c,problem:{type:dt.OutOfStock}}}function H$(){const{checkout:e}=b(),t=q(),{value:n=[]}=t.allViolations,{value:r}=t.merchandiseLines,o=He("merchandiseLines").value,i=se().merchandiseLines.value,a=V(()=>r?.lines??[],[r]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=ie(()=>O$(n)),[u]=ie(i),d=V(()=>Uu(u,n),[u,n]),p=V(()=>_b(u,a,n).map(g=>z$(g,c,d)),[u,a,n,c,d]),m=a.filter(({stableId:g})=>!d.has(g)).some(F$)&&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 q$="/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",G$="pJt3c",W$="yfbTW",of={ShopName:G$,SquareLogo:W$};function ql({width:e}){const{header:{logo:t}}=Fe(),{embed:n,i18n:r,shop:o,shopPay:i,source:a,url:l,router:c}=b(),u=Sr(),d=mo(),{isAppLayout:p}=Xu(),m=Qv(),{brandSettings:f}=o,{lineItems:h}=H$(),g=D$();if(i.visibility.showShopPayBrandedLogo||Bn(c.currentUrl.value.search))return s("img",{src:q$,height:30,width:72,alt:""});let y=s("span",{className:of.ShopName,children:s(sn,{level:1,children:s(Yt,{level:1,accessibilityRole:"presentation",display:"inline",children:o.name})})});n?.isFlagshipPartner?y=s(Z,{direction:"inline",gap:"small-200",alignItems:"center",children:[f?.squareLogo?.url&&s(Eb,{alt:f.squareLogo.altText||o.name,src:f.squareLogo.url,className:of.SquareLogo,borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=s(v_,{width:e}));const _=a.type!=="simulated"&&!nt(a)&&!p&&!n;if(!(o.hasStorefront&&(_||u)))return y;const E=(o.previewReturnUrl?o.previewReturnUrl:void 0)??t?.link??a.headerLogoUrl??l.storefront(),k=r.translate("editor.navigation.store_logo_accessibility_label"),S=()=>{m.includes(E)&&c.navigate(C=>{const w=new URL(C);return w.searchParams.set("ce_redirect",E),w})},I=s("span",{ref:d("logo"),children:s(lt,{href:E,tone:"monochrome",textDecoration:"none",onClick:async()=>{u?S():h.length>0&&await g(h)},display:"block",children:[y,s(W,{accessibilityVisibility:"exclusive",children:k})]})});return t?.image&&t?.maxWidth?s(_e,{maxInlineSize:`${t.maxWidth}px`,children:I}):I}const gP=Ge({displayName:"AccountAvatar",suspense:!1,load:()=>ut(()=>Ve(()=>import("./VaultedContactAvatar.DqMG6eEA.js").then(e=>e.A),__vite__mapDeps([205,1,2,3,4,5,206]))),useError:O_("AccountAvatar")}),$$={small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},Y$=200,j$=1.5,K$={base:AI(0,Y$,j$,"ms")},J$={easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},X$={borderRadius:$$,color:xI,transitionDuration:K$,transitionTimingFunction:J$,fontFamily:wI,fontSize:TI,letterSpacing:LI,lineHeight:RI};function Q$(){const e=ro(),{router:t,userEvents:n,shop:r,source:o,checkout:i,i18n:a}=b(),l=Ln(),c=o.type==="simulated",u=mo(),{header:{cartLink:{contentType:d="icon",image:p}={}}}=Fe(),m=po(),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 _=MI(e.customProperties.value.fontSize?.base??X$.fontSize.base),P=DL*_;y=s("img",{src:p.src,alt:g,height:P,className:Y(bt({display:"block"}))})}else y=s(Re,{type:"bag",size:"large"});return s("span",{ref:u("cart"),children:s(lt,{href:m.value?.toString(),id:"cart-link",onClick:h,accessibilityLabel:d==="icon"?g:void 0,display:"block",children:y})})}function yP({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const o=n&&!r?s(_e,{blockSize:"0px",children:s(_e,{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(_e,{inlineAlignment:"center",children:t}),o]})},end:{columns:o?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:s(G,{children:[o,s(_e,{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 Z$(){const{checkout:e,router:t}=b(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:o,maxWidth:i}={}}}=Fe(),a=Zv(),l=kv(),{currentDetour:c}=Pe().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"||Bn(n.search),f=m?s(ql,{width:i}):s("div",{});let h;return a.value?h=s(Q$,{}):l.value&&(h=s(gP,{})),s(Z,{gap:"large-100",children:[(h!=null||m)&&u&&s(yP,{alignment:r,logo:f,endAccessory:h,endAccessoryAffectsBlockSize:a.value||!m}),s($t,{customizations:p,gap:"base"})]})}const vP=Ge({displayName:"ShopPayCheckout",load:()=>ut(()=>Ve(()=>import("./ShopPayCheckout.BgSJgTAi.js"),__vite__mapDeps([207,1,2,3,4,5,139,51,145,77,73,138,8,79,80,180,66,85,70,6,7,208])).then(e=>e.ShopPayCheckout))});function e9({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:o}}=b();return xh({isShopPay:n.current.value==="shopPay",isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?s(vP,{simulated:o,children:e}):s(G,{children:e})}const t9="ghhXm",n9={OnePageRouteContent:t9};function r9({children:e}){const{checkout:t}=b(),n=id(),r=cP(),o=t.checkoutExit.isExiting.value,i=Q_(),a=s(e9,{children:[s(ub,{}),s(ab,{}),s(Bu,{active:n.value,announceProcessing:!o,showLoadingIndicator:!o&&r.value,loadingIndicatorVariant:"progressbar",children:s(o9,{routeC
39ontentInert:i.value?!0:void 0,children:e})}),s(oz,{})]});return s(Pu,{children:s(hb,{children:s(M$,{children:s(zU,{children:a})})})})}function o9({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=Bn(m.search),h=k$(),g=i.configuration.showFooter,{currentDetour:y}=Pe().value,_=C$().value,v=Ms()&&_&&pP({embedder:d?.embedder,isThankYouDetour:y?.type==="thankYou",normalizedPath:m.normalizedPath});let E="purchase.checkout.header.render-after",k="purchase.checkout.footer.render-after",S="purchase.checkout.chat.render";y?.type==="thankYou"&&(E="purchase.thank-you.header.render-after",k="purchase.thank-you.footer.render-after",S="purchase.thank-you.chat.render");const I=it(E),C=it(k),w=it(S),A=U_(),T=fo(),L=JV(),{isAppLayout:N}=Xu(),D=N&&d?.embedder==="google"&&ac({embedder:d.embedder,shop:l})&&L.value&&y==null,O=St(),B=u.type==="shopPayExternal",z=!i.configuration.visibility.showHeader,R=i.configuration.isUniversalCheckoutFinalizer&&y?.type==="thankYou",$=B?c.visibility.showOnePageShellHeader:R?I.length>0&&O.value:!(d?.isFlagshipPartner&&!Ft(d.embedder)&&d.embedder!=="shopApp"||(z||n==="hidden"&&!f&&o==="hidden")&&!a.enabled&&!d?.isCheckoutKit()&&(I.length===0||!O.value)||N&&(!a.enabled||a.variant.isStandard()||d?.isCheckoutKit())),j=Z$,ee=q().buyerIdentity.value?.customerProfile,ae=ee==null||ee.__typename!=="CustomerProfile",K=y?.type==="thankYou"||ae&&!T.value.payment&&!T.value.delivery,Q=V(()=>a.enabled?a.variant.isStandard():d?d.isCheckoutKit()?!0:!h&&(g||C.length>0):(r!=="hidden"||C.length>0&&O.value)&&!N&&!f,[d,h,g,a,r,C.length,N,f,O.value]),X=y?.type!=="shopPayLogin"&&K&&_&&!d?.isFlagshipPartner,H=c.visibility.shouldForceOnePageShellContentAsAppLayout,ue=()=>{if(N||H)return"appLayout"},re=s(G,{children:[s(f2,{}),s(_e,{className:D?n9.OnePageRouteContent:void 0,inert:t,children:e})]});return s(G,{children:[s(pb,{}),s(Eu,{banner:s(B_,{}),announcement:y?.type==="thankYou"&&A.length>0?s(V_,{}):void 0,header:$?s(j,{}):void 0,disclosure:X&&!v?s(X_,{}):void 0,disclosureOrderSummary:v?void 0:s(ls,{monorailSection:"top_order_summary"}),main:re,orderSummary:s(ls,{}),footer:Q?s(Fu,{}):void 0,blockSize:ue(),minMobileViewportSize:D}),s(sb,{}),s(mb,{}),s(fb,{}),s($t,{customizations:w,transformComponents:i9,render:le=>s(_e,{minBlockSize:`@media (inline-size >= medium) 0, ${od}px`,children:le})})]})}const i9=db(lP);function s9(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:o}){const i=[Le.AmazonPay,Le.BuyWithPrime].some(c=>!!NI(e,c)),a=t.some(c=>c.method.type==="walletsPlatformPaymentMethod"&&c.method.name===Le.BuyWithPrime),l=n?.some(({key:c,value:u})=>c===ah&&u===Le.BuyWithPrime);return!!(i||a||r||l||o)}function a9(){const{router:e}=b(),t=We().inMemoryAmazonPayParts.serializedAmazonParams;return M(n=>{const{keep:r,only:o}=n??{},i=e.currentUrl.value.href,a=new URL(i);wh.filter(l=>r?!r.includes(l):o?o.includes(l):!0).forEach(l=>{a.searchParams.delete(l)}),DI(t,l=>a.searchParams.get(l)),i!==a.href&&e.navigate(a.href,{replace:!0})},[e,t])}function l9(){return Qb()[OI]==="true"}const c9=Ge({load:()=>Ve(()=>import("./component-amazonWalletLazy.CLANzn5p.js"),__vite__mapDeps([209,1,2,3,4,5,189,45,210,211,194,57,6,7,8,212])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>s(d9,{}),useError:u9});function u9(e){const{wallets:t}=b().checkout,{buyerDetails:n,buttonStatus:r,sdkStatus:o}=We().inMemoryAmazonPayParts,{paymentLines:i}=se(),a=a9(),l=Gs();F(()=>{if(!e)return;r.value={status:"error"},o.value={status:gi.Error},n.value={loading:!1,error:!0,details:void 0},a();const c=t.escalatedWallet.value,u=c===Le.AmazonPay||c===Le.BuyWithPrime,d=i.value.some(p=>p.method.type==="walletsPlatformPaymentMethod"&&(p.method.name===Le.AmazonPay||p.method.name===Le.BuyWithPrime));u?(l({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):d&&(i.value=i.value.filter(p=>p.method.type!=="walletsPlatformPaymentMethod"||p.method.name!==Le.AmazonPay&&p.method.name!==Le.BuyWithPrime))},[e,n,r,a,i,l,o,t])}function d9(){const{buyerDetailsContentLoaded:e}=We().inMemoryAmazonPayParts;return F(()=>{e.value=!1},[e]),null}function _P(){const e=q().paymentMethods,{attributes:t,externalDeliveryIds:n,paymentLines:r}=se(),o=l9(),i=St();return s(ye,{when:()=>i.value&&s9(e.value,r.value,{attributes:t.value,externalDeliveryIds:n.value,hasAmazonCancelledParam:o}),children:s(c9,{})})}function p9(){const{i18n:e}=b(),t=Pe(),n=x(()=>t.value.currentDetour?.label??t.value.currentPage?.label??e.translate("general.page_title"));return s("h1",{className:bt({screenReaders:"only"}),children:n})}function m9({title:e,cost:t}){return s(G,{children:[e,"·",t]})}function sf({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=b();return s(Zs,{blockPadding:"base",children:[s(yn,{primary:!0,children:[s(W,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map(({title:r,lineAmount:o})=>s(Z,{direction:"inline",gap:"small-400",alignItems:"center",children:s(m9,{title:s(W,{size:"small",children:r}),cost:s(W,{size:"small",type:"strong",children:n.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})})})},r))]}),s(yn,{inlineAlignment:"center",children:s(Ke,{type:"small",textAlign:"end",children:s(W,{type:"strong",children:e})})})]})}const f9="_8A9rc",h9="TeeUi",g9="DQ7YO",Yi={TooltipInvoker:f9,TaxSegment:h9,UpdatedLabel:g9},af=Xe("TaxRecalculationLineTooltip"),y9="→";function v9({taxRecalculation:e}){const{i18n:t}=b(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=$e(void 0,af),o=$e(void 0,af),i=e.beforeLines,a=e.afterLines;return i.length===0&&a.length===0?null:s(Zs,{blockPadding:"base",children:[s(yn,{primary:!0,children:[s(W,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),s(Ke,{type:"small",children:[s("span",{className:Yi.TaxSegment,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",s(lf,{lines:i,tooltipId:r,percentFormatter:n,i18n:t})," ",s("span",{"aria-hidden":"true",children:y9})]})," ",s("span",{className:Yi.TaxSegment,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",s(lf,{lines:a,tooltipId:o,percentFormatter:n,i18n:t})]})]})]}),s(yn,{inlineAlignment:"center",children:s(Ke,{type:"small",textAlign:"end",children:s(W,{type:"strong",children:s("span",{className:Yi.UpdatedLabel,children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function lf({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:cf(e[0],n)});const o=e.map(l=>cf(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(Tn,{interestFor:t,className:Yi.TooltipInvoker,children:n.format(a)}),s(Sn,{id:t,children:o})]})}
39function cf(e,t){return e.rate==null?e.title:`${e.title} ${t.format(e.rate)}`}function _9(){const{i18n:e,checkout:t}=b(),n=Zl(),r=t.proposal.facts.orderNumber,o=t.proposal.facts.delivery??[],i=x(()=>o.length>0?o[0].lines.filter(f=>f.deliveryChange==="ADDED"):[]),a=x(()=>o.length>0?o[0].lines.filter(f=>f.deliveryChange==="REMOVED"):[]),l=x(()=>(t.proposal.facts.merchandiseLines??[]).filter(f=>f.quantityChange&&f.quantityChange.delta)),c=x(()=>{const f=t.proposal.facts.taxRecalculation;return f&&(f.beforeLines.length>0||f.afterLines.length>0)?f:void 0}),u=x(()=>l.value.length>0||i.value.length>0||a.value.length>0||!!c.value),d=x(()=>{if(!(!n.value||!u.value))return{formattedAmountOwed:e.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"})}}),p=x(()=>i.value.length>0?i.value:void 0),m=x(()=>a.value.length>0?a.value:void 0);return s(ye,{when:d,children:({formattedAmountOwed:f})=>s(ta,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:f}),collapsible:!0,children:[s(W,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:r?`#${r}`:""})}),s(zt,{blockSize:"base"}),s(jr,{}),s(bb,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[s(Pb,{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(Sb,{children:[s(Zn,{each:l,getKey:({title:h,variantTitle:g})=>`${h}${g?`-${g}`:""}`,children:({quantity:h,quantityChange:g,image:y,title:_,variantTitle:P})=>s(Zs,{blockPadding:"base",children:[s(yn,{inlineAlignment:"start",children:s(js,{alt:y?.altText??"",size:"base",src:y?.url})}),s(yn,{primary:!0,children:[s(W,{size:"base",type:"strong",children:_}),P?s(W,{color:"subdued",size:"small",children:P}):null]}),g&&g.delta&&g.type?s(yn,{inlineAlignment:"center",children:s(b9,{remainingQuantity:h,delta:g.delta,type:g.type})}):null]})}),s(ye,{when:p,children:h=>s(sf,{deliveryLines:h,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),s(ye,{when:m,children:h=>s(sf,{deliveryLines:h,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),s(ye,{when:c,children:h=>s(v9,{taxRecalculation:h})})]})]})]})})}function b9({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(Ke,{type:"small",textAlign:"end",children:s(W,{type:"strong",children:a.toUpperCase()})})}const bP={current:void 0};function P9({active:e,breadcrumbs:t}){const{i18n:n}=b(),r=mo(),{buyerJourney:{alignment:o}={}}=Fe();return s(Ks,{section:"breadcrumbs",children:s(vi,{section:"breadcrumbs",children:s(_e,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:o,children:s(Z,{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(W,{size:"small",ref:r(i),children:s(lt,{href:a,textDecoration:"none",children:c})}):s(W,{color:p?void 0:"subdued",type:p?"strong":void 0,size:"small",children:c});return s(Z,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:p?"step":void 0,children:[f,d&&s(Re,{type:"chevron-right",size:"small-200"})]},i)})})})})})}function S9(){const{i18n:e,router:t}=b(),n=Je(),{currentPage:r,plan:{greenPath:o}}=Pe().value,i=po(),a=Zv(),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 bP.current={ids:p.map(({id:f})=>f).join(","),activeId:m,showCartLink:a.value,hasCartUrl:!!i.value},{breadcrumbs:p,activeBreadcrumb:m}}function E9(){return Ht(jv)}function C9(){const{paymentLines:e}=se();return x(()=>{const t=Pt(e.value,"APPLE_PAY");return t?gh(t):!1})}function k9(){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=qi(FI()),u=qi(oP()),d=C9(),{paymentLines:p}=se(),m=Pt(p.value,"GOOGLE_PAY"),f=!!(m&&BI(m)),h=qi(qD({shouldResetCustomerInfo:!1})),g=U(new Set),y=Yb(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 k=_==="APPLE_PAY"||P,S=_==="GOOGLE_PAY"||v;if(k&&l.value?.type==="payment_cancelled_while_processing"&&(l.value=void 0),r?.status!=="failed"){i.value=void 0;return}k&&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()),(k&&!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 I9(){const{checkout:e,router:t}=b(),n=t.currentUrl.value,{header:{alignment:r="start",logo:o}}=Fe(),i=kv(),{currentDetour:a}=Pe().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"||Bn(n.search)),p=!u&&i.value,m=d||p;let f;return p?f=s(yP,{alignment:r,logo:d?s(ql,{width:o?.maxWidth}):s("div",{}),endAccessory:s(gP,{}),endAccessoryAffectsBlockSize:!d}):d&&(f=s(_e,{inlineAlignment:r,children:s(ql,{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($t,{customizations:c,gap:"base"})]})]})}function A9({children:e}){return s(Pu,{children:s(hb,{children:[s(T9,{}),s(ab,{}),s(ub,{}),s(w9,{children:s(L9,{children:e})})]})})}function T9(){return OA(),k9(),null}function w9({children:e}){const{checkout:t}=b(),n=id(),r=cP(),o=t.checkoutExit.isExiting.value;return s(Bu,{active:n.value,announceProcessing:!o,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!o&&r.value,children:e})}function L9({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=Fe(),{checkout:r,embed:o,router:i}=b(),{currentDetour:a}=Pe().value,c=Ms()&&pP({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=U_(),y=r.configuration.isUniversalCheckoutFinalizer&&a?.type==="thankYou",_=m.length>0||!y&&t!=="hidden",P=I9,v=n!=="hidden"||f.length>0,E=mO(i),k=i.currentUrlMatches("/no-address-location"),S=e_(i),I=i.currentUrlMatches("/shoppay"),C=ed(),{activeBreadcrumb:w,breadcrumbs:A}=S9(),T=E||k||S||I||A.length<2||C.value,L=s(x9,{children:e});return s(G,{children:[s(pb,{}),s(Eu,{banner:s(B_,{}),announcement:a?.type==="thankYou"&&g.length>0?s(V_,{}):void 0,header:_?s(P,{}):void 0,disclosure:c?void 0:s(X_,{}),disclosureOrderSummary:c?void 0:s(ls,{monorailSection:"top_order_summary"}),main:L,orderSummary:s(ls,{}),footer:v?s(Fu,{}):void 0,buyerJourney:T?void 0:s(P9,{active:w,breadcrumbs:A})}),s(sb,{}),s(mb,{}),s(fb,{}),s($t,{customizations:h,transformComponents:N9,render:N=>s(_e,{minBlockSize:`@media (inline-size >= medium) 0, ${od}px`,children:N})})]})}function x9({children:e}){const{checkout:t}=b(),{blocking:n}=E9(),r=id();return s(G,{children:[s(p9,{}),s(Bu,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[s(_P,{}),s(Z,{gap:"base",children:[s(Hl,{section:"toast"}),s(Hl,{section:"top"}),s(_9,{}),s(M9,{children:e})]})]})]})}function R9({condition:e,children:t}){return e?s(kr,{accessibilityRole:"presentation",children:t}):s(G,{children:t})}function M9({children:e}){const{checkout:t,router:n,shop:r}=b(),{pending:o}=_u(),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(VI),p=q(),{value:m}=p.deliveryNext,f=t.proposal.facts.delivery??[],h=br(m)||f.length>0&&f.every(k=>k.pickupAddress!==null),{value:g}=Zl(),y=He("total").value,{value:_}=p.paymentLines,P=He("paymentLines").value,v=V(()=>l?y||P||(g?.amount?g.amount>0:_?.lines&&_.lines.some(k=>k.cost?.amount)):!1,[l,g,_,y,P]);return s(zi,{style:d?void 0:o,children:s(R9,{condition:u,children:s(G,{children:[u&&s(G,{children:[s(No,{showAddress:!h,showPayment:v}),s(zt,{blockSize:"large-400"})]}),s(_e,{children:e})]})})})}const N9=db(lP);function D9(e){const t=q().buyerIdentity,r=e?.countryCode&&su.includes(e.countryCode)?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"},o=Ye(Bs(e,r));return x(()=>
39{if(t.value?.purchasingCompany)return o.value})}function bj(){const{billingAddressOption:e,shippingAddress:t}=se(),{checkout:n}=b();ze(()=>{(!n.isShippingRequired.value||t.value.oneTimeUse)&&(e.value="custom")})}function Pj(){const{billingAddressOption:e,paymentLines:t}=se(),{shop:n,source:r,checkout:o}=b(),i=q().buyerIdentity.value?.purchasingCompany,a=q(),{value:l}=a.deliveryNext,c=He("deliveryNext").value;F(()=>{const u=t.value[0],d=l;if(c||!d||d.status!=="filled"||!u)return;const p=br(d),m=zr(d);if(p||m)return;const f=!p&&o.isShippingRequired.value;Rh({shopRequireMatchingShippingAndBilling:!!n.requireMatchingShippingAndBilling,selectedPaymentMethodType:u?.method.type,isShippingRequired:f,isOrderSession:nt(r),isB2B:!!i,isPickupPointDeliveryMethod:m})&&e.value!=="shipping"&&(e.value="shipping")},[t.value,l,c,o.isShippingRequired,n.requireMatchingShippingAndBilling,r,i,e])}function Sj(){const{source:e,checkout:t}=b(),{buyerIdentity:n,deliveryNext:r}=q(),o=lo(),i=Er(),a=Xq(),{deliveryLines:l,shippingAddress:c}=se();return x(()=>{const u=n.value?.purchasingCompany;return(i.value||co({checkout:t,source:e})?.pickupAddress)&&!o.value||zr(r.value)||l.value.flatMap(p=>p.value.deliveryMethodTypes).includes("PICKUP_POINT")||!nt(e)&&!t.isShippingRequired.value&&!u||nt(e)&&!a.value||u&&!t.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function Ej(){const{billingAddressOption:e,billingAddress:t}=se(),n=q(),{checkout:r,source:o}=b();return x(()=>{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"?nt(o)?c:a:t.value})}function Cj(){const t=q().paymentLines?.value?.lines,{hasViolations:n,violations:r}=mi(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),o=!!Pt(t,"APPLE_PAY");if(!(!n||o))return r.values().next().value.localizedMessage}function O9(){const{shop:e,source:t,checkout:n}=b(),r=Er(),{paymentLines:o}=se(),{buyerIdentity:i}=q(),a=SU();return x(()=>{const l=!r.value&&n.isShippingRequired.value,u=o.value[0];return Rh({shopRequireMatchingShippingAndBilling:!!e.requireMatchingShippingAndBilling,selectedPaymentMethodType:u?.method.type,isShippingRequired:l,isOrderSession:nt(t),isB2B:!!i.value?.purchasingCompany,isPickupPointDeliveryMethod:a.value})})}function kj(e){const t=e,n=D9(t),o=t?.countryCode&&su.includes(t.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"},i=Bs(t,o);return n.value??i}function Ij(){const{shippingAddress:e}=se(),{checkout:t}=b();return x(()=>(t.proposal.facts.delivery??[])[0]?.deliveryAddress??e.value)}function Aj(){const{negotiate:e}=Nt(),{billingAddress:t,billingAddressOption:n}=se(),{checkout:{wallets:r}}=b(),o=U(void 0),i=M(()=>{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 F9="b2b",Tj="not_b2b";function B9(){const{paymentMethods:e}=q();return PP(e)}function wj(){const{paymentLines:e}=se(),t=x(()=>e.value.map(n=>n.method));return PP(t)}function PP(e){const{client:t,checkout:{identity:n},shop:r,shopPay:o,source:i}=b(),a=Oy(),l=Xs(),c=r.hasFlagEnabled(UI),u=_s(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:d,paymentMethods:p}=q();return x(()=>{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=>z9(y,p.value??[]));return V9(i,t)&&(h||g)}return r.storeVaultEnabled&&U9({paymentMethods:m,paypalVaultingEnabled:c,negotiatedPaymentMethods:p,buyerIdentity:d,isShopPayAvailableForSellerOfRecord:a,shopPayDismissed:o.userIdentified.value})})}function V9(e,t){return e.type==="cartNext"||e.type==="simulated"||t.unstable_getSerialization("invoiceLoginType")===F9&&av(e)}function U9({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=>SP(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 SP(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 z9(e,t){return e.type!=="bank"?!1:"supportsVaulting"in e?e.supportsVaulting:!SP(e,t)?.supportsVaulting||!("selectedToken"in e)||!e.selectedToken?!1:e.selectedType!=="SHOPIFY_PUBLIC_TOKEN"}function H9(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 EP({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"&&zI(m)&&!h,I=HI({lines:d,paymentMethods:m,purchasingCompany:u,isBillingAddressForced:h})||!g,C=y?.method.type==="CREDIT_CARD_ON_FILE",w=Nh(m).length>0&&C;if(n&&(!I||v||S||w))return"hidden";if(u&&n&&!t)return H9(y)?"afterPayment":"inContext";if(c)return"afterPayment";if(r==="shopPay"&&l)return"inContext";const T=y?.method.type==="wallet"||y?.method.type==="walletsPlatformPaymentMethod";return!n||e||t?g&&!T&&p==="shipping"?"hidden":"afterPayment":o?f?"afterPayment":a&&_?"inContext":"afterPayment":g&&_?"inContext":"afterPayment"}function q9(e){const t=EP(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 Lj(){const e=Mh(),t=_s(),n=Xs(),{source:r,checkout:o,shop:i}=b(),a=Er(),l=fo(),c=fi(),{buyerIdentity:u,paymentMethods:d}=q(),{paymentLines:p,billingAddressOption:m}=se();return x(()=>EP({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:t.value,paymentRequired:n.value,identity:o.identity.current.value,isOrderSession:nt(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:!!co({checkout:o,source:r})?.pickupAddress,isForceBillingAddressFormEnabled:!vc({shop:i,checkout:o,paymentMethods:d.value})}))}function G9(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}function W9({children:e}){const{current:{fields:{buyerIdentity:t,shippingAddress:n}}}=Je(),{billingAddress:r,billingAddressOption:o,email:i,paymentLines:a,phone:l,shippingAddress:c}=se(),{checkout:u,embed:d,shop:p,shopPay:m,source:f}=b(),h=d?.isFlagshipPartner,g=q(),y=qI(),_=iv(),P=Pn(),v=U(!1),E=U(!1),k=Zc(Lo),S=ay(Lo),I=ly(Lo),C=B9(),w=Xs(),A=
39Mh(),T=_s(),L=Er(),N=fi(),D=O9(),{shippingCountries:O}=p,B=Fn(),z=n.value,R=Ey(z?.countryCode,O),$=Ye(R),j=U(),ee=GI(),ae=x(()=>vc({shop:p,checkout:u,paymentMethods:g.paymentMethods.value})),K=x(()=>{const H=u.identity.current.value,ue=$.value,re=_.value;if(!v.current){const ne=k.violations.value;v.current=ne.size>0&&!WI(ne)}if(E.current||(E.current=S.violations.value.size>0||u.wallets.escalatedWallet.value!==null&&I.violations.value.size>0),H==="sdkCartHints"&&j.current?.identitySource==="sdkCartHints")return j.current.sections;function le(ne){return ne?.__typename==="CustomerProfile"}function de(){function ne(oe){return oe.shippingAddresses.length===0}function me(oe){return oe.shippingAddresses.length===1&&ue(oe.shippingAddresses[0].address,"shipping").size>0}function ge(oe){return le(oe)?!!u.addressManager.shipping.value.selectedAddress.value:!1}function Ae(oe){return oe!=null&&ue(oe,"shipping").size===0}function be(oe,we,Me){return!oe&&we&&Me.shippingAddresses.length>0}function Ce(oe,we,Me){return be(we,Me,oe)||!we&&!Me?!1:!ge(oe)}const Ue=n.value,je=c.value,te=u.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(H){case aa:return te.length>0;case"customerAccount":{const oe=t.value;return te.length>0?!0:!(oe==null||!le(oe?.customerProfile)||ne(oe?.customerProfile)||me(oe?.customerProfile)||Ce(oe.customerProfile,Ue,je))}case"shopPay":return m.user.addresses.value.length>0||te.length>0;case"sdkCartHints":return u.configuration.isAddressDelegationEnabled?!0:Ee()&&Ae(Ue);case"businessCustomer":return!(P.value&&!re);default:return!0}}function ke(){const ne=!!g.paymentFlexibilityPaymentTermsTemplate.value;switch(H){case aa:return!1;case"shopPay":{const me=m.user.paymentMethods.value;return!w.value&&!u.isShippingRequired.value?m.user.addresses.value.length>0:m.enableCardVaulting?me.some(YI):!0}case"sdkCartHints":return u.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const me=t.value?.customerProfile;if(nt(f)||!$I(me))return!1;const ge=ne||B.value;return Md({identitySource:H,isOrderSession:nt(f),storeVaultEnabled:p.storeVaultEnabled,customerProfile:me,hasCustomerStoredPaymentMethod:Nd({availablePaymentMethods:g.paymentMethods.value??[],paymentMethodHistory:g.paymentMethodHistory?.value??[]})})?!0:!!Nh(g.paymentMethods.value).length||ge&&!C.value}case"customerAccount":{if(Md({identitySource:H,isOrderSession:nt(f),storeVaultEnabled:p.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:Nd({availablePaymentMethods:g.paymentMethods.value??[],paymentMethodHistory:g.paymentMethodHistory?.value??[]})}))return!0;const me=ee.value.length===1&&ee.value[0].type==="deferred";return!!(ne&&me)}default:return y.value.length>0?!0:a.value.length>0}}const he=ne=>!u.isShippingRequired.value&&!!r.value&&!r.value?.[ne]?.trim();function ve(){switch(H){case"shopPay":{const ne=m.session.selectedPaymentMethod.value,ge=hc({managedByMarketsPro:g.managedByMarketsPro.value})&&ne?.paymentMethod==="IDEAL",Ae=ne?.paymentMethod==="CUSTOM_ONSITE",be=!m.user.hasCreditCards.value,Ce=a.value.some(te=>te.method.type==="direct");if(be&&Ce)return!1;const Ue=he("phone"),je=he("firstName");return!w.value||je||Ue||ge||Ae}case"amazonPay":case"buyWithPrime":return v.current;case"applePay":case"googlePay":return E.current;case"payPal":return ae.value?E.current:!0;case"customerAccount":case"businessCustomer":return nt(f)?!1:q9({fullyCoveredByGiftCard:A.value,fullyCoveredByRedeemablesAndGiftCards:T.value,paymentRequired:w.value,identity:H,isOrderSession:nt(f),isPickupSelected:L.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:!!co({checkout:u,source:f})?.pickupAddress,isForceBillingAddressFormEnabled:!ae.value,billingMustMatchShipping:D.value});default:return!1}}function Ee(){switch(H){case aa: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 le(t.value?.customerProfile)&&!t.value.customerProfile.email?!1:i.value.length>0;default:return i.value.length>0}}const De={contact:Ee(),delivery:de(),payment:ke(),billing:ve()},Ie=j.current;return Ie?.identitySource===H&&G9(Ie.sections,De)?Ie.sections:(j.current={identitySource:H,sections:De},j.current.sections)}),X=p.hasFlagEnabled(jI)?u.vaultedSections.signal:K;return s(F_.Provider,{value:X,children:[s(_P,{}),e]})}const $9=Qn(function(){const{checkout:{configuration:{layout:t}},router:n}=b();xV();const r=t.isOnePage.value,o=V(()=>[{match:"/processing",render:()=>s(G,{children:[s(M_,{}),s(lr.Preload,{})]})},{match:"/throttle",render:()=>r?s(Ol,{}):s(G,{children:[s(Ol,{}),s(Hi.Preload,{})]})},{match:"/post-purchase",render:()=>s(cm,{}),renderPrefetch:()=>s(cm.Prefetch,{})},{render:({children:i})=>s(G,{children:[s(LV,{}),s(W9,{children:r?s(r9,{children:i}):s(A9,{children:i})})]}),children:[{match:"/thank-you",render:()=>s(lr,{}),renderPrefetch:()=>s(lr.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>s(om,{}),renderPrefetch:()=>s(om.Prefetch,{})},...r?[{match:"/shoppay_login",render:()=>s(N_,{})},{match:"/review",render:()=>s(im,{}),renderPrefetch:()=>s(im.Prefetch,{})},{match:"/no-address-location",render:()=>s(MV,{})},{render:({children:i})=>s(G,{children:[s(R_,{children:i}),s(lr.Preload,{})]}),children:[{match:"/stock-problems",render:()=>s(GV,{})}]}]:[{match:"/information",render:()=>s(G,{children:[s(Hi,{}),s(No.Preload,{})]}),renderPrefetch:()=>s(Hi.Prefetch,{})},{match:"/shipping",render:()=>s(Dl,{}),renderPrefetch:()=>s(Dl.Prefetch,{})},{match:"/payment",render:()=>s(G,{children:[s(Ml,{}),s(lr.Preload,{})]}),renderPrefetch:()=>s(Ml.Prefetch,{})},{match:"/review",render:()=>s(G,{children:[s(Nl,{}),s(lr.Preload,{})]}),renderPrefetch:()=>s(Nl.Prefetch,{})},{match:"/stock-problems",render:()=>s(D_,{})},{match:"/no-address-location",render:()=>s(RV,{})},{render:()=>s(NV,{})}]]}],[r]);return sS(n,o)}),Y9=32;function sd(e){const t=[];
39return e.__k&&e.__k.forEach(n=>{n&&typeof n.type=="function"?t.push(...sd(n)):n&&typeof n.type=="string"&&t.push(n)}),t}function j9(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=j9(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 K9=50;function*CP(e,t){let n=e,r=0;for(;n&&r<K9;)yield n,n=t(n),r+=1}const J9=/\(.+\)/;function kP(e,t=10){let n=null;const r=[];for(const o of CP(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&&!J9.test(a)&&r.push(a)}else typeof o.type=="string"&&r.push(o.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
39const X9=/^[a-zA-Z][\w-]{0,63}$/;function ei(e){return!X9.test(e)||/\d{4,}/.test(e)||e.split(/[_-]/).some(n=>n.length>=8&&/[a-zA-Z]/.test(n)&&/\d/.test(n))?null:e}const uf="https://redacted.invalid";function Q9(e){let t;try{t=new URL(e,uf)}catch{return null}return t.origin==="null"?t.protocol.replace(/:$/,""):t.origin===uf?null:t.origin}function IP(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const o of CP(n,i=>i.parentElement)){const i=o.getAttribute("id"),a=o.getAttribute("data-testid"),l=i==null?null:ei(i),c=a==null?null:ei(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}class Z9 extends ff{componentDidCatch(t){this.props.terminalErrorHandler.notify(t,{inErrorBoundary:!0})}render(){return this.props.children||null}}const e7="shop-pay-login-iframe",xj="100%",Rj="publickey-credentials-get *",ul=9e4,t7=1e3;async function Gl(e){if(!document.body?.classList.contains("Loading")){ca(document);return}const t=document.querySelector(".LoadingShell"),n=n7(t);if((n||e)&&(n&&await n,e&&(await e.fill(),Oh(),t?.remove()),!document.body?.classList.contains("Loading"))){ca(document);return}const r=t?.isConnected?new Promise(o=>{const i=()=>{clearTimeout(a),t.removeEventListener("transitionend",i),t.remove(),o()},a=setTimeout(i,t7);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,ca(document)}function n7(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for(vV))}function r7({client:e,isShopPayActive:t,progress:n,watch:r}){const o=t||!!n,i=new AbortController;if(!o){Gl();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"),Gl(n),u?.()})},l=e.unstable_legacyNavigationPerformance.on("event",u=>{u.type===KI&&(i.abort(),a())}),c=e.unstable_legacyNavigationPerformance.on("navigation",()=>{i.abort(),a()});i.signal.addEventListener("abort",()=>{l(),c()})}function o7({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
39dingLoaderCount:i.loaderCount},l=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:ul,...a}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:ul,...a,loaderPreviouslyRegistered:i.loaderPreviouslyRegistered,appHasContent:!!e.rootElement?.childElementCount,loginFramePresent:!!document.getElementById(e7),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(l)},{exportImmediately:!0}),Dh().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(()=>{})},ul),o}function AP(e){lS(e),e.childNodes.forEach(t=>{t.remove()})}function i7(e,t){AP(t),aS(e,t)}
39async function s7(e,t,n){AP(e),mA(t)||await Gl()}class df extends bn{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class a7 extends bn{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const l7=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"]),c7=/^[^.]+\.checkout\.my\.shop\.dev$/i;function u7({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 a7(`Running on an insecure protocol: ${i}`);if(!(c7.test(a)||r)){if(!d7(i,c,t))throw new df(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(l))throw new df(`Running on an unexpected pathname: ${i}. Expected pathname to match: /${e.source}/`)}}function d7(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})||l7.has(t)}const Wl=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 p7(e){return Wl.has(e)||e.startsWith("aria-")}function pf(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]=Q9(r)??"[redacted]":p7(n)?n==="id"&&typeof r=="string"||n==="data-testid"&&typeof r=="string"?t[n]=ei(r)??"[redacted]":t[n]=r:t[n]="[redacted]"}return{...e,props:t}}function m7({rootElement:e,terminalErrorPageElement:t}){return n=>s7(e,t)}async function f7(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()&&Oh();const l=o7({client:r,isShopPayActive:i,isShopPaySdkCheckout:JI(e.shopPay),observability:e.observability});await h7(e,{bootStartTime:t,bootPhaseTimings:n}),l&&(l.stage="context_ready");const c=performance.now(),u=s(Z9,{terminalErrorHandler:o,children:s(gF,{context:e,children:s($9,{})})});r.initialRequest.isServerRendered&&e.router.shouldHydrateServerRenderedRoute()?(Ps.current=!0,wP(e),C7(u,r.rootElement,e)):i7(u,r.rootElement),l&&(l.stage="rendered"),r7({client:e.client,isShopPayActive:i,progress:a,watch:l}),g7(e,{hydrateStartTime:c})}async function h7(e,{bootStartTime:t,bootPhaseTimings:n}){const{events:r,client:o,router:i}=e;i.prefix instanceof RegExp&&u7({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 RA(e,{loadFrom:o.initialRequest.isServerRendered?"serialized-cache":"network"});const a=new QI(e,{bootStartTime:t,bootPhaseTimings:n});a.waitUntil(v7(e)),r.dispatchEvent(a),await a.allResolved(),r.dispatchEvent(new ZI(a))}async function g7(e,{hydrateStartTime:t}){const{events:n}=e,r=new eA(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new tA(r))}function TP({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const o=y7({isOnePage:e,isShopPay:t,path:n});return xh({isOnePage:e,isShopPay:t,path:n})&&o.push(vP),r.required.value&&o.push(Uy,{load:r.ensureEngineLoaded}),o}function y7({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[M_];case"/throttle":return[Ol];case"/thank-you":return[lr];case"/shoppay_login":return[N_]}if(t||e)return[R_];switch(n){case"/shipping":return[Dl,No];case"/payment":return[Ml,No];case"/review":return[Nl,No];case"/stock-problems":return[D_];default:return[Hi]}}async function v7(e){const{checkout:t,router:n}=e,r=TP({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:t.identity.current.value==="shopPay",path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),o=Zy(e);o&&r.push(o),await Promise.all(r.map(i=>i.load()))}function wP({environment:e}){if(!e.debug.preact)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=sd(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 $l(e){if(typeof e!="function")return null;const t=e;return t.displayName||t.name||null}function ad(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}
42function _7(e,t){Promise.resolve(e).then(t).catch(t)}const LP=(e,t,n,r)=>{const o=p=>`${$l(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&Y9){const h={name:$l(m.type)??"anonymous",key:o(m)};t.push(h,h),i+=1;let g=!1;_7(p,()=>{g||(g=!0,i-=1,n?.(m))})}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=sd(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,Ps.current=!1,r?.())};return{teardown:d}},b7=["id","name","type","role","href","action"];function P7({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"&&Ps.current&&l.props&&l.__e instanceof Element){const c=l.props;for(const u of b7){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=ad(n),{closestFunctionParent:h,breadcrumb:g}=kP(l),y=h?$l(h.type):null,_=IP(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:Wl.has(l)?u:"[redacted]",domValue:Wl.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 S7=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),E7=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function xP({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:o}){if(n||e!=null&&E7.has(e)||r!=null&&r!==o||XI(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,S7))}function RP(){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 MP(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")}}function C7(e,t,{checkout:n,client:r,environment:o,router:i,shop:a,shopPay:l,source:c,observability:u}){const d=n.identity.current.value==="shopPay",p=o.debug.preact,m=MP(t),f=RP(),h=Dt.__m;Dt.__m=(P,v)=>{if(typeof P.type=="string"){const E=P.type,k=(ae=!1)=>v.map(K=>{if(K instanceof Text)return`Text: ${ae?"[redacted]":K.data}`;if(K instanceof Element){const Q=K.getAttribute("id");let X=Q;return Q!=null&&ae&&(X=ei(Q)??"[redacted]"),`<${K.localName}${X==null?"":` id=${X}`} class=${K.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:S,breadcrumb:I}=kP(P),C=v.find(Boolean)??P.__e??null,w=C??P.__?.__e??null,A=IP(w);if(p){console.group("🚱 Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${E}
43${jn(P)}`),S&&typeof S.type=="function"&&console.log(`The closest function parent is ${jn(S)}`),I.length&&console.log(`Component path: ${I.join(" < ")}`),A.length&&console.log(`DOM ancestry: ${A.join(" < ")}`);const ae=k();ae.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${ae.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 T=Xl(window.location.href,{isShopPayActive:d,shopPay:l}),L=ht(()=>{const ae=n.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.configuration.visibility.showHeader,shellHeaderLogoVisibility:ae.header.logo?.visibility,shellHeaderCartLinkVisibility:ae.cartLink.visibility,shellHeaderIsShopOnWeb:Bn(i.currentUrl.value.search),shellHeaderPrefersDarkMode:r.prefersDarkMode.value}}),N=ht(()=>({cartLinkShopHasStorefront:a.hasStorefront,cartLinkSourceType:c.type,cartLinkHasCartReturnUrl:!!c.cartReturnUrl})),D=bP.current,O=D&&{breadcrumbIds:D.ids,breadcrumbActiveId:D.activeId,breadcrumbShowCartLink:D.showCartLink,breadcrumbHasCartUrl:D.hasCartUrl},B=k(!0),z=S&&typeof S.type=="function"?jn(pf(S)):void 0,R=r.unstable_getSerialization("serverUserAgent"),$=R!=null&&R!==r.userAgent,j=xP({apiClientId:r.unstable_getSerialization("apiClientId"),excessDomChildren:v,hasPriorMismatch:f.register(P,C),serverUserAgent:R,userAgent:r.userAgent}),ee=ad(g);u.log("hydration_mismatch",`Hydration mismatch for <${E}>`,{domType:E,mismatchedVNode:jn(pf(P)),closestFunctionParent:z,vNodePath:I.length?I.join(" < "):void 0,domPath:A.length?A.join(" < "):void 0,availableNodeTypes:B||void 0,hasDomNodes:B.length>0,isHydrating:Ps.current,hasInProgressBoundaries:g.length>0,suspendedAtCapture:ee.length?ee.join(","):void 0,isActionable:j,isUADivergent:$,serverCrumbCount:m?.count,serverActiveCrumbIndex:m?.activeIndex,page:T,...L,...N,...O}),j&&o.deployStage!=="tophat"&&u.counter({name:"hydration_mismatch",value:1,attributes:{page:T}})}h&&h(P,v)};const g=[],y=P7({observability:u,debugMode:p,inProgressBoundaries:g}),{teardown:_}=LP(p,g,void 0,y.flushAndTeardown);cS(e,t),g.length===0&&_()}const Mj=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:MP,collectSuspendedBoundaryNames:ad,createPriorMismatchTracker:RP,criticalAsyncComponents:TP,hydrateApp:f7,initHydrationDebugging:wP,isActionableHydrationMismatch:xP,renderTerminalError:m7,trackSuspendingHydrations:LP},Symbol.toStringTag,{value:"Module"}));function Nj(){const{shop:{id:e}}=b(),t=Qs();return x(()=>!!t.value.get(e)?.length)}function Dj({isShippingRequired:e,isPickupSelected:t,shippingCountryCode:n,billingCountryCode:r}){return!e||t?r||n:n||r}function Oj(e,t){const n=t?e.countrySpecific[t]?.phoneMarketingDisclosure:void 0;return n===void 0?e.phoneMarketingDisclosure:n}const oa=new Map;function k7(e){oa.set(e,performance.now())}function NP(e){return oa.has(e)}function DP(e){const t=oa.get(e);if(t===void 0)return 0;const n=performance.now()-t;return OP(e),n}function I7(e,t){return NP(e)?t(DP(e)):null}function OP(e){return oa.delete(e)}const Fj={start:k7,exists:NP,end:DP,endAndRun:I7,remove:OP},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",A7=Xe("legal-link-modal");function zj({handle:e,tone:t}){const{embed:n,i18n:r,shop:{merchantPolicies:o}}
43=b(),i=r.translate("shop_policies",{scope:e.replace(/-/g,"_")}),{localPolicies:a}=vs(),l=o.some(u=>u.handle===e)?a.find(u=>u.handle===e):void 0,c=$e(void 0,A7);return l?.url&&Ft(n?.embedder)?s(lt,{tone:t,"aria-haspopup":"dialog",onClick:()=>{n?.client?.windowOpenRequest(l.url)},children:i}):l?s(G,{children:[s(lt,{commandFor:c,tone:t,children:i}),s(ss,{id:c,defaultPolicy:l})]}):s(G,{children:i})}function Hj(){const e=q().buyerIdentity,{shop:t,source:n}=b();return x(()=>!!(t.customerAccountLocationsUrl&&n.type!=="draftOrder"&&!nt(n)&&nA(e.value?.purchasingCompany)))}function qj(e){return e.some(t=>t.deliveryPredictionEligible)}function Gj({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 T7=(e=>(e.C1InlineModal="c1_inline_modal",e.C1Modal="c1_modal",e.C1ModalShopPay="c1_modal_shop_pay",e.C1ModalShopPaySignIn="c1_modal_shop_pay_sign_in",e.PaymentRequest="payment_request",e))(T7||{}),w7=(e=>(e.LoginLink="login_link",e.ErrorBannerConfirm="error_banner_confirm",e.ErrorModalClearEmail="error_modal_clear_email",e.ErrorModalContinue="error_modal_continue",e))(w7||{});const L7=Xe("MarketsProTermsModal"),x7=Xe("MarketsProPrivacyModal");function Wj({textProps:e}){const{i18n:t,shop:{name:n}}=b(),r=q(),o=$e(void 0,L7),i=$e(void 0,x7),l=r.managedMarketsPaymentProcessor?.value==="shopify_payments"?"https://content.global-e.com/shopper-terms-v2":"https://content.global-e.com/shopper-terms",c={markets_pro_terms:s(G,{children:[s(lt,{textDecoration:"none",commandFor:o,children:t.translate("payment.markets_pro_disclaimer_terms_and_conditions")}),s(wn,{id:o,source:l,heading:t.translate("payment.markets_pro_disclaimer_terms_and_conditions_title")})]}),privacy_policy:s(G,{children:[s(lt,{textDecoration:"none",commandFor:i,children:t.translate("payment.markets_pro_disclaimer_privacy_policy")}),s(wn,{id:i,source:"https://content.global-e.com/privacy-policy",heading:t.translate("payment.markets_pro_disclaimer_privacy_policy_title")})]}),shop_name:n};return s(W,{...e,children:t.translate("payment.markets_pro_disclaimer_label",c)})}function $j(e,{pageWasPainted:t=!0}={}){const{observability:n}=b();F(()=>{t&&n.log("page_rendered",`"${e}" page was rendered.`)},[n,e,t])}function R7(){const{currentPage:e}=Pe().value,{router:t,observability:n,shopPay:r}=b(),{search:o,pathname:i}=t.currentUrl.value,a=i.includes("/shoppay"),{replaceShopPayInHistory:l}=rA(),c=e&&!a;return F(()=>{a&&(n.error(new FP('Attempted to render "/shoppay" route in 3 page layout, which is not supported')),n.counter({name:"shop_pay_route_not_found",value:1}),l(r.config.checkoutAsGuestUrl))},[a,n,l,r.config.checkoutAsGuestUrl]),c&&t.redirect({pathname:e.route,search:o}),null}class FP extends Error{constructor(t){super(t),this.name="RouteNotFoundError"}}const M7=Object.freeze(Object.defineProperty({__proto__:null,RouteNotFoundError:FP,default:R7},Symbol.toStringTag,{value:"Module"}));function Yj(){const e=se().paymentLines;return x(()=>{const[t]=ms(e.value,[Le.BuyWithPrime]);return t})}function jj(){const e=b().checkout.latestReceipt.value?.id,{persistedAmazonSignal:t}=We(),n=M(()=>{td(t,{receiptIdForAupError:e,receiptIdForPaymentDecline:e})},[t,e]);return Ws({shouldResetCustomerInfo:!0,onClick:n})}function Kj(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 Jj extends Error{constructor(){super(...arguments),this.name="PaymentMethodDoNotMatchError"}}var N7=(e=>(e.ShopPayProgressIntercept="ShopPay::Exception::ShopPayProgressIntercept",e))(N7||{}),D7=(e=>(e.Online="online",e.RetailPos="retail_pos",e))(D7||{}),O7=(e=>(e.Dismissed="dismissed",e.Pending="pending",e.Verified="verified",e))(O7||{}),F7=(e=>(e.Generic="generic",e.SignInFailed="sign_in_failed",e.ContinueWithShopPay="continue_with_shop_pay",e))(F7||{});function B7(e){return{value:e.amount.toString(),currency:e.currencyCode.toUpperCase()}}function Xj(e){if(!(e?.amount==null||!Number.isFinite(e.amount)||!e.currencyCode))return B7({amount:e.amount,currencyCode:e.currencyCode})}let cs=null;function Qj(e){cs=e}function Zj(){cs=null}async function e8(e){if(!cs)return{cvvSessionIds:[],isValid:!0};try{const t=await cs(e);
43return t.isValid&&(t.cvvSessionIds.length!==e||t.cvvSessionIds.some(n=>!n))?{cvvSessionIds:[],isValid:!1}:t}catch{return{cvvSessionIds:[],isValid:!1}}}function t8(){const e=Qs();return x(()=>Array.from(e.value.values()).filter(n=>n.length>0).length>1)}function n8(e){const t=mo(),n=e.href?"span":G,{pixelId:r,...o}=e;return s(n,{ref:o.href?t(r):void 0,children:s(an,{...o,ref:o.href?void 0:t(r)})})}function r8({endpoint:e,invokingWallet:t}){const n=Te(!1),{checkout:{wallets:r}}=b(),o=M(()=>{n.value&&(n.value=!1,r.clearActiveSession({invokingWallet:t}),e?.value?.call.closePopupWindows())},[n,e,t,r]);return V(()=>({isScrimOpen:n,closePopupWindowsAndScrim:o}),[n,o])}const o8=e=>{if(!e)return null;const t=e.querySelector("iframe");if(!t)return null;const n=getComputedStyle(t).borderRadius;return n?.includes("px")?parseInt(n,10):null};export{kr as $,st as A,_e as B,$e as C,a3 as D,Un as E,Wo as F,Uj as G,$m as H,Re as I,Xe as J,lb as K,lt as L,$j as M,Ks as N,vi as O,Ke as P,p4 as Q,Wj as R,io as S,tb as T,$t as U,f4 as V,_n as W,n8 as X,yY as Y,W7 as Z,Fe as _,Lt as a,Gj as a$,jr as a0,Es as a1,ro as a2,cu as a3,mo as a4,Cr as a5,sn as a6,EH as a7,Ou as a8,Et as a9,Nu as aA,hn as aB,ij as aC,Sj as aD,Ij as aE,Aj as aF,bj as aG,nr as aH,Ic as aI,Ig as aJ,Tw as aK,Tt as aL,Rr as aM,j7 as aN,Y7 as aO,K7 as aP,T3 as aQ,pp as aR,B0 as aS,A3 as aT,Xw as aU,wg as aV,i3 as aW,__ as aX,Ac as aY,zj as aZ,qY as a_,Os as aa,os as ab,rx as ac,rj as ad,dt as ae,yn as af,Xo as ag,vu as ah,Zs as ai,js as aj,OH as ak,Pb as al,mr as am,Sb as an,bb as ao,sj as ap,J2 as aq,H$ as ar,QY as as,gi as at,Ub as au,Iv as av,An as aw,ln as ax,rY as ay,Tn as az,zt as b,vy as b$,qj as b0,s3 as b1,nn as b2,ks as b3,Pr as b4,Ag as b5,Z_ as b6,Cc as b7,AY as b8,vv as b9,qp as bA,D4 as bB,Pn as bC,Cy as bD,ty as bE,mi as bF,ta as bG,Cj as bH,cy as bI,P3 as bJ,S3 as bK,E3 as bL,Yb as bM,_W as bN,o0 as bO,C9 as bP,HA as bQ,$7 as bR,_j as bS,XL as bT,Ug as bU,A$ as bV,Ln as bW,my as bX,TY as bY,Ml as bZ,yy as b_,E$ as ba,nY as bb,tM as bc,bu as bd,CY as be,d1 as bf,tr as bg,ao as bh,Ev as bi,tj as bj,lj as bk,Dz as bl,Nz as bm,Ey as bn,fi as bo,Zq as bp,yi as bq,Pi as br,Xu as bs,iO as bt,N$ as bu,D$ as bv,A4 as bw,wn as bx,jd as by,B3 as bz,Xs as c,wj as c$,l3 as c0,Qx as c1,Di as c2,Uz as c3,qz as c4,ky as c5,o3 as c6,$c as c7,Uu as c8,_b as c9,sN as cA,aN as c
43B,oY as cC,iY as cD,Sv as cE,A2 as cF,pu as cG,w2 as cH,v2 as cI,k2 as cJ,b2 as cK,Jj as cL,ix as cM,fY as cN,yW as cO,nu as cP,Av as cQ,U1 as cR,ql as cS,Ib as cT,Qc as cU,ny as cV,Ys as cW,nb as cX,JR as cY,O9 as cZ,rd as c_,Q3 as ca,C3 as cb,Zb as cc,c_ as cd,EY as ce,L2 as cf,ss as cg,q3 as ch,d3 as ci,p3 as cj,iu as ck,tx as cl,wu as cm,u3 as cn,m3 as co,nj as cp,QW as cq,Bs as cr,Zu as cs,Qu as ct,d2 as cu,Sr as cv,Hc as cw,FY as cx,Eb as cy,Nj as cz,fo as d,zH as d$,$W as d0,y4 as d1,p$ as d2,LH as d3,Lj as d4,Er as d5,co as d6,Pj as d7,Al as d8,cw as d9,UY as dA,uU as dB,sU as dC,BY as dD,ox as dE,S$ as dF,I_ as dG,w_ as dH,Xg as dI,HF as dJ,UF as dK,dY as dL,K_ as dM,Hj as dN,ed as dO,as as dP,j3 as dQ,LW as dR,TW as dS,iP as dT,i$ as dU,Hs as dV,WY as dW,$Y as dX,Vg as dY,_2 as dZ,IY as d_,ga as da,nL as db,Il as dc,yw as dd,zc as de,wc as df,Tc as dg,ai as dh,$r as di,Uc as dj,Nw as dk,ws as dl,Gr as dm,lU as dn,Au as dp,As as dq,G_ as dr,HY as ds,um as dt,q_ as du,VY as dv,iU as dw,aU as dx,z_ as dy,ku as dz,CG as e,d0 as e$,Rs as e0,uy as e1,F7 as e2,N7 as e3,o_ as e4,B9 as e5,lu as e6,g2 as e7,hY as e8,h2 as e9,ls as eA,ju as eB,so as eC,eo as eD,mY as eE,FA as eF,VA as eG,xa as eH,dR as eI,_9 as eJ,m0 as eK,T7 as eL,AO as eM,D7 as eN,au as eO,lo as eP,iv as eQ,PU as eR,$_ as eS,ex as eT,Dl as eU,Zv as eV,aY as eW,zU as eX,Gg as eY,g3 as eZ,x3 as e_,cM as ea,F3 as eb,Qq as ec,eW as ed,su as ee,GY as ef,Ej as eg,kj as eh,jY as ei,du as ej,LY as ek,Ru as el,bi as em,b$ as en,Hb as eo,NG as ep,DG as eq,J_ as er,Wm as es,xG as et,$q as eu,BG as ev,L4 as ew,mH as ex,n4 as ey,xY as ez,Nt as f,VF as f$,t2 as f0,Zz as f1,kb as f2,gu as f3,JD as f4,JV as f5,UN as f6,wi as f7,O7 as f8,VV as f9,MR as fA,xR as fB,Fj as fC,DR as fD,V3 as fE,z3 as fF,Gs as fG,SM as fH,Yc as fI,qi as fJ,rR as fK,iR as fL,B7 as fM,oO as fN,Ar as fO,Jc as fP,O_ as fQ,u0 as fR,iG as fS,O$ as fT,jc as fU,w7 as fV,Ns as fW,Zj as fX,Qj as fY,l0 as fZ,qv as f_,QD as fa,xj as fb,e7 as fc,Rj as fd,CN as fe,r8 as ff,W3 as fg,o8 as fh,oR as fi,jj as fj,td as fk,Qb as fl,Y3 as fm,vW as fn,E9 as fo,h3 as fp,a9 as fq,l9 as fr,O3 as fs,Yj as ft,Kj as fu,wW as fv,$3 as fw,lW as fx,Vi as fy,YY as fz,Us as g,RY as g$,Lx as g0,Xc as g1,nM as g2,b_ as g3,zF as g4,BF as g5,zh as g6,X7 as g7,nv as g8,si as g9,Rb as gA,$s as gB,Wb as gC,cY as gD,lR as gE,Xx as gF,Vj as gG,Bj as gH,vz as gI,M3 as gJ,Sn as gK,GF as gL,gY as gM,jL as gN,vM as gO,U3 as gP,ej as gQ,oP as gR,NR as gS,kW as gT,xu as gU,FG as gV,cj as gW,JY as gX,KY as gY,jU as gZ,BV as g_,Hh as ga,kY as gb,eY as gc,tY as gd,Qv as ge,Wu as gf,xs as gg,H3 as gh,zg as gi,NL as gj,w1 as gk,wY as gl,I$ as gm,Fu as gn,PY as go,k$ as gp,TG as gq,PR as gr,e8 as gs,Xj as gt,pY as gu,FO as gv,e1 as gw,Cx as gx,F_ as gy,zi as gz,wy as h,gG as h$,MY as h0,DV as h1,NY as h2,DY as h3,sm as h4,HV as h5,K3 as h6,Dj as h7,Oj as h8,h1 as h9,Ua as hA,IM as hB,lY as hC,vY as hD,ZR as hE,Oy as hF,ZY as hG,k3 as hH,f3 as hI,EU as hJ,zT as hK,_U as hL,dq as hM,iq as hN,L3 as hO,uY as hP,YU as hQ,OG as hR,v3 as hS,Ms as hT,gr as hU,tt as hV,wt as hW,Ct as hX,oG as hY,a4 as hZ,XG as h_,g1 as ha,p1 as hb,wv as hc,Hy as hd,J3 as he,B1 as hf,x1 as hg,A1 as hh,X3 as hi,xA as hj,_c as hk,Gy as hl,Wy as hm,ON as hn,FN as ho,R1 as hp,j4 as hq,Ai as hr,ap as hs,Jm as ht,$2 as hu,xH as hv,gb as hw,Qa as hx,_v as hy,vN as hz,Vn as i,I3 as i$,u4 as i0,Oq as i1,eH as i2,t8 as i3,ou as i4,ru as i5,ym as i6,C$ as i7,pP as i8,N3 as i9,jV as iA,tO as iB,IW as iC,zD as iD,Qm as iE,b3 as iF,i_ as iG,oy as iH,sv as iI,Hg as iJ,oj as iK,uP as iL,_3 as iM,_u as iN,OY as iO,XY as iP,sY as iQ,c3 as iR,k9 as iS,Lq as iT,JT as iU,tu as iV,w3 as iW,Wg as iX,Z3 as iY,G3 as iZ,SY as i_,cO as ia,uO as ib,Hl as ic,Jx as id,Vl as ie,is as ig,Iz as ih,Zg as ii,R3 as ij,ey as ik,y3 as il,F9 as im,Tj as io,nd as ip,av as iq,Ko as ir,N4 as is,Zc as it,qD as iu,D3 as iv,Zx as iw,Ws as ix,YV as iy,KV as iz,an as j,s4 as j0,eG as j1,fG as j2,zG as j3,rr as j4,$T as j5,XT as j6,vw as j7,r3 as j8,xc as j9,rg as jA,Mj as jB,n3 as ja,t3 as jb,Mm as jc,e3 as jd,O2 as je,Lu as jf,Q7 as jg,o$ as jh,Fc as ji,Z7 as jj,Oz as jk,Iw as 
43jl,Tb as jm,dj as jn,uj as jo,pj as jp,od as jq,vj as jr,yj as js,gj as jt,hj as ju,fj as jv,mj as jw,U_ as jx,a1 as jy,Q1 as jz,Z as k,W as l,Yt as m,Pe as n,Vs as o,it as p,aj as q,zY as r,l_ as s,X$ as t,ct as u,qO as v,bY as w,_Y as x,gt as y,qc 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.