PageSourceSearch

https://museumstore.hmns.org/cdn/shopifycloud/checkout-web/assets/c1/164ad2e3.DgUUtBtV.js

js hmns.org collected 2026-10-01 10:26:25 UTC 825,467 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["b887ec56.DMmbSuA-.js","2c1ab0fe.D_oO1jU7.js","4c290a1e.D9lE9kmU.js","app.bDJ3v-8C.js","assets/app.BuSMBobh.css","assets/previous.BpuyvRSB.css","65f3d4da.8ZfwXSRH.js","60a453ce.BIyixFcg.js","0a7dffce.BMM606kb.js","bb728e1c.BObJOhlA.js","a6e11e56.vyg_OJT2.js","assets/AdminPreviewBar.BpHI7Zwr.css","33682ee7.lVRoaHTe.js","55098bf1.CrP8QF43.js","c610ba76.Dv8DzU1W.js","66338e00.DAXMdGUl.js","28ac86c0.TMlNB_Hy.js","3e6029dd.Bhk_IN06.js","assets/QRCode.BZ_m5G5a.css","30074413.DzLcP4ok.js","assets/Pressable.D9SfDfsb.css","efa0389a.-R9eik6_.js","assets/Choice.B7lVAtpz.css","9f57d2aa.KWHVJaex.js","8574876b.DRpdCYKn.js","064f6ac1.CT1iFQsV.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.DSM2KxPW.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.DflCtq5Y.js","assets/NumberField.CRpcZnVJ.css","39921a74.bStpjMMs.js","assets/Switch.BS8yVgoP.css","27f09e31.D80YTEU6.js","137622f3.BM8r7uzT.js","54bf0ebb.QN2M7_gK.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.Oin1LrS4.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.Dk6unqUy.js","53bbdad9.Bipg1_Lt.js","47b970b2.Bspt4mBz.js","3ca8ef7e.DT3qvctx.js","ac5a19ff.CrIDx928.js","assets/FormLayout.CrYq3At_.css","29034f35.BY8rOPhQ.js","assets/PhoneField.uZEuHncj.css","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","cadec7c0.nE7SeHjK.js","9c384ce8.DwKM6HkH.js","0b8657b8.CBFRF2sQ.js","2210eadb.DF0gIp_2.js","fd38863f.yQuOHFYV.js","2b0dcdd4.DqqBcFf2.js","cb8fcd45.gqoNFKgG.js","f78726c8.K7FaLIh2.js","assets/useHasOrdersFromMultipleShops.B_iZlQze.css","aea3fb03.BGfdKdPP.js","acc74f72.CxyRLT4l.js","2255f8fa.DZJKRP_r.js","b8733b27.CelQ77Wt.js","bff2ff9b.DxpvVf7S.js","0fb2c600.CeTvQAdG.js","7ee73f43.CQB45vvk.js","2a0f03e4.DAzS5F0B.js","05a2a9c8.DmM9tTSM.js","dd9b68fc.B-yn6Zfs.js","adeb5fdb.Bl-M2ErE.js","8498e76b.CeD2ihdU.js","d08a6c7d.DBqPW5IX.js","ed9f2238.C-XxbQrN.js","13b13169.ClpNblxR.js","bea9843a.Ccz9HjeB.js","ec391382.Cpl2aZVN.js","865e4eaf.9zS1cNRw.js","6f1b819b.Bha_HLC8.js","8599b02a.yKiXuwTF.js","08a3b809.CkE7TqUZ.js","e477f96c.dvrL9dgG.js","6a2fc6d6.F1jyoAIB.js","ccdf3592.Jq-5VsnW.js","cf29e63b.CnWxVFH5.js","5587f402.B4N8qnlk.js","e39bc11c.BNw-kv3c.js","bad03769.YINpw55-.js","assets/DevTools.DTK7lleS.css","abd080c1.DDQDOiKg.js","2acfb1ce.Bgnzh68x.js","9d12dea3.BhgVUmlV.js","b9c0319a.Bj2lNtZE.js","74835653.9kmD7491.js","assets/BillingAddressForm.BdwN7V1K.css","910cd6e2.IzGgJ-IA.js","f1968089.4OkuMKtQ.js","347b440c.oWH9qB5Z.js","d5d34b3b.HJgnljYP.js","assets/EstimatedDeliveryContent.B_THySFF.css","181d38d3.Bsy-Yqp4.js","31cc568e.CsDC1k63.js","assets/index.CIy8uDiZ.css","assets/Middot.D7Ujmshx.css","60575ca1.B_YWwvX-.js","assets/DeliveryReviewMethods.Q_59OWoX.css","79974aab.B4rWj4Zf.js","6720fa5f.gZhcGybT.js","assets/Rollup.DKll7CHa.css","e77f7fe0.B5ukwIHt.js","assets/PaymentLine.BGhbZYQP.css","17324a0b.BBvNDaeo.js","a535174a.D9-hmEEh.js","5fd968f2.DTvmd-mL.js","01973ac7.BVhNP6nv.js","58314944.QVtJf4c2.js","assets/Captcha.CJQgLR0i.css","dffdfb34.BmCoupl3.js","0c0ad074.C7YXa-mF.js","945a08d6.DUn1GrN-.js","assets/useShopPayButtonClassName.CpHF4L7Q.css","0e67bd3b.DkCvQkdq.js","cb5cf153.Cf9Ss23E.js","e3e348f2.sbssU431.js","ca5e9c49.BL-l7mUG.js","a422df8c.CGT3eUwi.js","assets/EmptyState.BEvzDDvy.css","7b0c98ea.0CGJF8wQ.js","assets/TransitionHeight.CuRoM9zv.css","d22d2b80.22VthIi0.js","f49d4216.DMwWemXC.js","assets/VatNumberValidationField.CyiectWG.css","a25deb9a.XIOr6b3K.js","assets/useShopPayNewSignupLoginExperiment.BYM12A8B.css","f692f62f.D8N74P4K.js","assets/RedirectionNotice.B8v_QGNW.css","4421b714.CxWSGEaV.js","611e718a.CfTWiRtv.js","assets/OffsitePaymentFailed.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","f8706cb6.DMygWC1h.js","0e9ee714.DqBmP7tY.js","assets/StickyPayButton.CPXhWoNv.css","f3fe2775.91jcUSQ2.js","cc6ff67d.SUHuL0DO.js","87bfafec.DaEgHDYY.js","assets/hasViolationsIgnoringCodes.BcTJoNaV.css","dfca5da5.H1thSL3M.js","assets/Section.CU18S7Ap.css","7a8217fd.BlWFPiiA.js","assets/useShopPayProgressIntercepts.xO_7ctnq.css","2b89a178.DO17bNRV.js","b684bff6.Dv62TgX4.js","d6447d9e.wAHKQJgC.js","f51e663e.C08Dmcez.js","64de7b49.Dffug7P1.js","8e79be58.CObm0ydZ.js","assets/ShippingMethodSelector.B0hio2RO.css","90e26f5f.DVFq2b8a.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","assets/ShippingLines.LcqrKXE1.css","f3e117aa.CTtG4OvO.js","assets/OnePage.DxMZvmU_.css","9e3968a8.ymgtlbQP.js","fc21c11a.Oq7eYqe8.js","4ea44c06.D08Q9XyC.js","assets/PaymentButtons.CKE1iCma.css","assets/PayButtonSection.Bi0nhBOp.css","d2e6a587.DdUzoAUU.js","assets/MobileOrderSummary.DjDhVpQB.css","74122478.FqQIunJ9.js","73a9b0a0.D8Gs2o-g.js","86720dbb.lSLFpGJE.js","7114e006.B60DstSA.js","assets/MissingFields.BbxB_6wt.css","assets/PaymentMethodProgressionHost.BIxPaYCu.css","e0989459.44TRzqx7.js","assets/RememberMeSection.JBO5WNhc.css","dfc03c53.CSYqcfoO.js","50130ded.D7fAevzP.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","896e8dde.D1RtPQSa.js","7743efb2.BnGbb2ef.js","24fcbaf6.CptX_RFD.js","assets/PostPurchase.e2mo8B8q.css","090b00f0.TldgxRpC.js","assets/Processing.D4vG8dn7.css","b120ac11.BUngaIRg.js","289b89e4.yHOmILbn.js","9011490c.B3MH6cCJ.js","8c0eaf27.CL21dRLp.js","assets/ShopPayLoginLoader.B1_neltu.css","0cd5b134.CMZlizdg.js","5c5c2e96.baUTlEFa.js","f5a7bb50.C28TwZsi.js","a9ba8e86.BbmIPmvI.js","909cc5d6.CMMZ7qo-.js","c57e39e6.CFJyqk5V.js","be176b00.BPFeyNW7.js","3a819064.CWC3Yoc0.js","assets/Map.cbVP6Hp_.css","9f3d9f8c.Dodv5uQy.js","8d3a12c3.D9VLFw3s.js","0e4087ec.BrZIBLQj.js","4aab4b34.D7JoYOky.js","assets/ThankYou.imAu3qxr.css","01f1d1bd.CHyJ2c0Z.js","assets/Throttle.CK6IAVuq.css","49758c58.Dszaue9Y.js","assets/RuntimeExtension.DWkDBM73.css","7fd9930c.By5ensm3.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","39bf6084.C9T54J8f.js","assets/CryptoModalManager.CqiWenQK.css","23bd7c1a.CjFR6Gpg.js","7a21cd4e.CUt3EoT6.js","assets/VaultedContactAvatar.BF3cX_zA.css","461aedcc.B_CI1IaO.js","assets/ShopPayCheckout.CDRlDVu0.css","56bd1136.CIMEyGpu.js","8536083a.BCEdV5WN.js","assets/WalletSandbox.BoV0vp4z.css","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]);
2import{ag as e,r as t,L as n,M as r,f as i,q as a,T as o,A as s,h as l,G as c,k as u,_ as d,af as p,ai as m,u as h,b8 as g,e as f,x as y,a2 as v,X as _,S as b,g as P,D as k,F as S,E as w,o as C,y as E,d as x,Q as I,i as A,$ as T,n as N,l as L,a as R,m as M,a1 as D,R as O,a4 as z,N as B,j as V,a0 as F,V as U,b9 as q,ba as j,bb as H,O as $,bc as Y,au as W,W as G,p as J,Y as K,Z as Q,bd as X,be as Z,b6 as ee,bf as te,at as ne,bg as re}from"./2c1ab0fe.D_oO1jU7.js";import{kD as ie,e1 as ae,hq as oe,gC as se,mG as le,cZ as ce,af as ue,aM as de,O as pe,aq as me,G as he,mH as ge,dd as fe,f as ye,V as ve,e2 as _e,aD as be,a7 as Pe,P as ke,mI as Se,eC as we,da as Ce,cz as Ee,d8 as xe,gJ as Ie,b5 as Ae,b4 as Te,N as Ne,d5 as Le,d1 as Re,d0 as Me,d6 as De,d7 as Oe,cY as ze,mJ as Be,mK as Ve,mL as Fe,ez as Ue,m5 as qe,mM as je,mN as He,di as $e,fV as Ye,jb as We,Q as Ge,aE as Je,aB as Ke,mO as Qe,jJ as Xe,mP as Ze,mQ as et,aT as tt,mR as nt,dV as rt,mS as it,mT as at,mU as ot,d_ as st,dZ as lt,dY as ct,dX as ut,mV as dt,eP as pt,lJ as mt,gt as ht,mW as gt,mX as ft,lK as yt,ba as vt,bz as _t,lE as bt,gk as Pt,cW as kt,gl as St,eb as wt,mY as Ct,mZ as Et,m_ as xt,m$ as It,n0 as At,bp as Tt,kT as Nt,bg as Lt,bd as Rt,be as Mt,n1 as Dt,ed as Ot,n as zt,e5 as Bt,ae as Vt,fb as Ft,X as Ut,bZ as qt,ab as jt,cc as Ht,bC as $t,gP as Yt,gN as Wt,E as Gt,n2 as Jt,D as Kt,mB as Qt,km as Xt,cp as Zt,n3 as en,n4 as tn,bi as nn,n5 as rn,n6 as an,n7 as on,n8 as sn,n9 as ln,kU as cn,es as un,er as dn,j0 as pn,eo as mn,na as hn,eq as g
2n,nb as fn,ep as yn,fm as vn,hw as _n,hz as bn,hv as Pn,a_ as kn,nc as Sn,cr as wn,a6 as Cn,lk as En,bb as xn,hu as In,nd as An,aH as Tn,lw as Nn,fi as Ln,_ as Rn,u as Mn,mk as Dn,hC as On,am as zn,hD as Bn,aX as Vn,ne as Fn,nf as Un,ng as qn,kH as jn,j_ as Hn,nh as $n,cE as Yn,hh as Wn,ni as Gn,nj as Jn,w as Kn,nk as Qn,nl as Xn,nm as Zn,nn as er,no as tr,gf as nr,np as rr,hX as ir,nq as ar,nr as or,ns as sr,nt as lr,ei as cr,nu as ur,nv as dr,v as pr,em as mr,i8 as hr,l8 as gr,nw as fr,la as yr,ld as vr,nx as _r,lc as br,ny as Pr,nz as kr,nA as Sr,nB as wr,nC as Cr,ii as Er,kZ as xr,l0 as Ir,l7 as Ar,nD as Tr,nE as Nr,nF as Lr,iM as Rr,aN as Mr,ai as Dr,g as Or,aa as zr,kk as Br,b0 as Vr,ek as Fr,iv as Ur,ie as qr,cS as jr,k9 as Hr,nG as $r,o as Yr,by as Wr,iJ as Gr,iL as Jr,iI as Kr,bB as Qr,fK as Xr,lz as Zr,ly as ei,fO as ti,fL as ni,lA as ri,lU as ii,d9 as ai,eM as oi,bx as si,bk as li,cL as ci,nH as ui,kF as di,nI as pi,et as mi,hn as hi,nJ as gi,nK as fi,nL as yi,nM as vi,nN as _i,nO as bi,dD as Pi,nP as ki,nQ as Si,nR as wi,nS as Ci,nT as Ei,nU as xi,nV as Ii,nW as Ai,ff as Ti,nX as Ni,nY as Li,ma as Ri,eS as Mi,m9 as Di,mb as Oi,nZ as zi,bl as Bi,n_ as Vi,n$ as Fi,o0 as Ui,o1 as qi,ar as ji,o2 as Hi,jt as $i,ju as Yi,d as Wi,js as Gi,h0 as Ji,hk as Ki,o3 as Qi,o4 as Xi,x as Zi,cD as ea,a8 as ta,fx as na,fy as ra,lo as ia,jP as aa,fz as oa,gH as sa,bY as la,hm as ca,C as ua,o5 as da,gE as pa,ak as ma,o6 as ha,lL as ga,aZ as fa,hx as ya,o7 as va,o8 as _a,o9 as ba,W as Pa,oa as ka,ob as Sa,oc as wa,od as Ca,j9 as Ea,oe as xa,gs as Ia,gu as Aa,of as Ta,iz as Na,og as La,oh as Ra,oi as Ma,dK as Da,hd as Oa,dn as za,oj as Ba,ex as Va,iX as Fa,k7 as Ua,cT as qa,aU as ja,ok as Ha,ol as $a,om as Ya,cG as Wa,dB as Ga,i as Ja,on as Ka,H as Qa,j5 as Xa,e as Za,oo as eo,op as to,j8 as no,cN as ro,kq as io,jO as ao,b$ as oo,aJ as so,dM as lo,dN as co,cV as uo,aQ as po,oq as mo,ck as ho,or as go,ce as fo,kY as yo,os as vo,co as _o,bh as bo,bj as Po,f3 as ko,aK as So,bL as wo,bD as Co,bJ as Eo,jf as xo,mr as Io,i7 as Ao,ot as To,z as No,ou as Lo,e$ as Ro,i3 as Mo,ov as Do,at as Oo,as as zo,av as Bo,aw as Vo,ow as Fo,A as Uo,ox as qo,oy as jo,oz as Ho,d$ as $o,oA as Yo,dT as Wo,oB as Go,de as Jo,j4 as Ko,oC as Qo,gz as Xo,oD as Zo,ci as es,jz as ts,jB as ns,he as rs,mq as is,dS as as,e3 as os,h4 as ss,dR as ls,dQ as cs,ca as us,eh as ds,e4 as ps,oE as ms,hl as hs,cF as gs,hs as fs,jm as ys,oF as vs,jZ as _s,oG as bs,oH as Ps,oI as ks,cR as Ss,k0 as ws,oJ as Cs,jM as Es,oK as xs,ln as Is,lm as As,hi as Ts,hj as Ns,oL as Ls,oM as Rs,oN as Ms,oO as Ds,ho as Os,gF as zs,cg as Bs,br as Vs,gD as Fs,j1 as Us,j6 as qs,ac as js,gV as Hs,gO as $s,oP as Ys,oQ as Ws,oR as Gs,oS as Js,oT as Ks,oU as Qs,eX as Xs,oV as Zs,oW as el,oX as tl,fh as nl,hy as rl,y as il,a9 as al,l9 as ol,oY as sl,je as ll,fq as cl,cK as ul,T as dl,oZ as pl,b_ as ml,dA as hl,kR as gl,jh as fl,ji as yl,a$ as vl,g2 as _l,j$ as bl,o_ as Pl,lH as kl,lv as Sl,f6 as wl,o$ as Cl,p0 as El,p1 as xl,p2 as Il,kz as Al,fX as Tl,fj as Nl,p3 as Ll}from"./4c290a1e.D9lE9kmU.js";import{S as Rl,h as Ml,_ as Dl,o as Ol,J as zl,P as Bl,w as Vl,O as Fl,i as Ul,e as ql,t as jl,q as Hl,v as $l,r as Yl,u as Wl,x as Gl,y as Jl,z as Kl,B as Ql}from"./app.bDJ3v-8C.js";import{i as Xl,d as Zl,a as ec,c as tc,s as nc,f as rc,j as ic,I as ac,k as oc,e as sc}from"./65f3d4da.8ZfwXSRH.js";import{i as lc,h as cc,r as uc,j as dc,k as pc,f as mc,l as hc,m as gc,A as fc}from"./60a453ce.BIyixFcg.js";import{d as yc,i as vc,c as _c,b as bc}from"./0a7dffce.BMM606kb.js";import{d as Pc}from"./bb728e1c.BObJOhlA.js";function kc(e){return`${wc(e)}:::${e.message}`}function Sc(e){return wc(e)}function wc(e){return e.cause&&"object"==typeof e.cause&&"code"in e.cause?`${e.name}::${e.cause.code}`:e.cause&&"object"==typeof e.cause&&"name"in e.cause?`${e.name}::${e.cause.name}`:e.name}class Cc extends Rl{constructor(){super(...arguments),this.name="CheckoutProfileChangeError"}}class Ec extends Rl{constructor(){super(...arguments),this.name="CheckoutProfileQueryMissingData"}}class xc extends Rl{constructor(){super(...arguments),this.name="CheckoutProfileQueryFetchError",this.unactionable=!0}}async function Ic(n,r){const{trigger:i,profileRequest:a,graphql:o,extensibility:s,configuration:l,observability:c,userEvents:u,telemetryContext:d,isActive:p}=r,m=p??(()=>!0),h=performance.now(),g=Date.now(),f={hasFinalized:!1},y=()=>{f.hasFinalized||(f.hasFinalized=!0,n())},v=l.profileId.value,_=a?.id,b=(e,t)=>{y(),v&&_&&_!==v?x({status:"superseded",activeCheckoutProfileId:l.profileId.value,stage:e,error:t}):c.debug("checkout_profile_change","[CheckoutProfileChange]: Checkout profile change not applied due to isActive returning false",{configurationRecordId:_,stage:e})};if("simulated"===d?.source?.type)return void y();if(!m())return b("before_fetch");if(!a?.id)return void y();const P=a,{requireBusinessCriticalOnly:k}=P,S=l.profileKey.peek();if(S&&e(ie,S)===e(ie,P))return void y();const w=_!==v,C=w?void 0:l.getProfile(P);try{let e,n;if(C)e=C;else{const r=await t((async()=>{const{data:e,error:t}=await o.staticQuery(ie,{variables:P,cache:!0});if(t)throw t;if(!e)throw new Ec("Checkout profile query returned no data");if(!e.checkoutProfile)throw new Ec("Checkout profile query returned no checkout profile data");if(w&&!e.shop)throw new Ec("Checkout profile query returned no shop data");return e}),{maxAttempts:3,shouldRetry:()=>!k&&m()});e=r.checkoutProfile,n=r.shop}if(!m())return b("after_fetch");const a=()=>{try{if(!m())return void b("before_apply");const t=e.activatedExtensions,{removed:a,kept:o}=function(e,t){const n=e.ui.search().peek().filter((e=>"persisted"===e.type)),r=new Set(t.flatMap((e=>e.targets.map((e=>e.publicIdentifier))))),i=n.filter((e=>!r.has(e.targetPublicIdentifier)));i.length>0&&e.ui.remove(i.map((e=>e.targetPublicIdentifier)),{keepAlive:!1,reason:"checkout_profile_change"});return{removed:i,kept:e.ui.search().peek().filter((e=>"persisted"===e.type))}}(s,t);y();const u=e=>e.capabilities.blockProgress&&e.behaviors.value.blockProgress,d=o.filter(u),p=a.filter(u);s.ui.replace({activatedExtensions:t},{keepAlive:!1,reason:"checkout_profile_change"}),"negotiation"===i&&(d.length>0||p.length>0)&&(c.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:Tc(p),updatedBlockingExtensions:Tc(d)}),r.runInterceptors({negotiationStage:"negotiation",skipEffects:!1}).then((e=>{m()&&(r.validationErrors.value=e.errors)})).catch((e=>{c.error(new Cc("Error occurred while running interceptors after checkout profile change",{cause:e}))}))),l.update({profile:e,requireBusinessCriticalOnly:k,...w&&n?{themeData:n,addressSettings:{shopConfig:n}}:{}}),x({status:"success"})}catch(t){E(t)}};return a}
2catch(I){if(!m())return b("fetch_failed",Ac(I));if(k){"initialization"!==i&&c.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:i,reason:"query_failure"}});const e=Ac(I);return c.error(e),c.leaveErrorBreadcrumb("[CheckoutProfileChange] Loading unrestricted profile after restricted query failure",{checkoutProfileId:_}),Ic(y,{...r,profileRequest:{...a,requireBusinessCriticalOnly:!1}})}E(I)}function E(e){const t=Ac(e);y(),c.error(t),x({status:"error",error:t})}function x({status:e,error:t,activeCheckoutProfileId:n,stage:r}){"initialization"!==i&&(function(e,t){const{startTime:n,startTimestamp:r,previousCheckoutProfileId:i,checkoutProfileId:a,activeCheckoutProfileId:o,trigger:s,status:l,stage:c,error:u}=t,d=Math.round(performance.now()-n),{observability:p,userEvents:m,source:h,shop:g,sessionToken:f,current:y}=e,v=h.checkoutSessionIdentifier??"",_=g.id,b=y.fields.buyerIdentity.peek()?.customerProfile?.id,P=ae(a),k=ae(i),S=u?kc(u):void 0,w=u?Sc(u):void 0,C=Intl.DateTimeFormat().resolvedOptions().timeZone;"superseded"!==l&&m.monorailEvent({schemaId:"checkout_c1_profile_configuration_change_events/1.0",payload:{eventName:"checkout_profile_configuration_change",eventType:a===i?"business_critical_filter":"checkout_profile_markets_interaction",frontendEventTimestampEpochMs:r,frontendEventTimeZone:C,checkoutToken:v,shopId:_,customerId:b,sessionToken:f,checkoutProfileId:P,previousCheckoutProfileId:k,frontendEventsTimeDifferenceMs:d,errors:S?[S]:void 0}}),p.histogram({name:"checkout_profile_configuration_change",value:d,attributes:{trigger:s,status:l,error:w}});const E={previousCheckoutProfileId:i,checkoutProfileId:a,...o?{activeCheckoutProfileId:o}:{},trigger:s,duration:d,status:l,...c?{stage:c}:{},error:w},x="superseded"===l?`Checkout profile change to ${a} superseded; active profile is ${o??"none"}`:`Checkout profile changed from ${i} to ${a}`;p.log("checkout_profile_configuration_change",x,E),p.leaveErrorBreadcrumb("[CheckoutProfileChange] Checkout profile change event recorded",{identifier:"checkout_profile_configuration_change",...E})}({observability:c,userEvents:u,...d},{startTime:h,startTimestamp:g,previousCheckoutProfileId:v,checkoutProfileId:_,activeCheckoutProfileId:n,trigger:i,status:e,stage:r,error:t}),"superseded"!==e&&c.debug("checkout_profile_change",`[CheckoutProfileChange] ${t?"Failed to update":"Updated"} checkout profile`,{trigger:i,previousCheckoutProfileId:v,checkoutProfileId:_,error:t?Sc(t):void 0}))}}function Ac(e){return e instanceof n||e instanceof r?new xc("Could not complete checkout profile change, could not query checkout profile",{cause:e}):new Cc("Could not complete checkout profile change",{cause:e})}function Tc(e){return e.map((({id:e,name:t,appName:n,extensionPoint:{target:r}})=>({id:e,name:t,appName:n,target:r})))}function Nc({checkout:e,shop:t,profileId:n=e.configuration.profileId.peek()}){if(!n)return;const r=e.latestReceipt.peek(),i=e.wallets.escalatedWallet.peek();return{id:n,requireBusinessCriticalOnly:"three-page"===e.configuration.layout.baseName&&(!r||"failed"===r.status||"abandoned"===r.status)&&("APPLE_PAY"===i&&t.hasFlagEnabled(oe)||"GOOGLE_PAY"===i&&t.hasFlagEnabled(se))}}function Lc(e,t){e.error(t instanceof Error?t:new Ec("Required checkout profile could not be loaded",{cause:t}))}async function Rc(e,t){const{data:n}=await e.staticQuery(ie,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function Mc(t,n){if(!t||e(ie,t)!==e(ie,n))throw new Ec("Required checkout profile could not be loaded")}function Dc(e){return function(e,t){if(!t)return;if(void 0!==e[t])return e[t];const n=Object.keys(ce);for(let r=n.indexOf(t);r>=0;r--){const t=n[r];if(void 0!==e[t])return e[t]}}(e,le())}function Oc(e){if("object"!=typeof e||!e)return!1;let t=!1;for(const n of Object.keys(e)){if(!(n in ce))return!1;t=!0}return t}function zc(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}const Bc=ue("JourneyContext"),Vc=ue("JourneyProgressionContext");function Fc(){const{journeyState:e,pageBeforeDetour:t,...n}=de(Bc),{router:r}=pe();return i((()=>{const i=r.currentUrl.value.normalizedPath,{plan:a,history:o,redirectTo:s}=e.value,l=a.detours.find((e=>e.route===i)),c=a.greenPath.find((e=>e.route===i)),u=t.value;return{...n,plan:a,currentPage:c??u,currentDetour:l,history:o,redirectTo:s,journeyState:e}}))}function Uc(){const e=de(Vc),{detour:t,progress:n,progressing:r,completing:i,prefetch:s,negotiate:l}=e,c=a((e=>l({identifier:Symbol("journeyNegotiation"),...e})),[l]);return o((()=>({detour:t,progress:n,progressing:r,completing:i,prefetch:s,negotiate:c})),[t,n,r,i,s,c])}function qc(e){const t=me(),n=s(e);n.current=e,l((()=>t.listen(((...e)=>n.current(...e)))),[t])}function jc(e){const t=me(),n=s(e);n.current=e,l((()=>t.listenBeforeNegotiation(((...e)=>n.current(...e)))),[t])}function Hc({active:e=!0}={}){const t=me();l((()=>
2{if(e)return t.block()}),[t,e])}const $c=["information","shipping","payment","review"];function Yc(){const e=pe().checkout.latestReceipt.value;return"processed"===e?.status?e:void 0}function Wc(){const e=Yc(),t=Fc(),n=s(!1),r=a((()=>(n.current=!0,n)),[n]);return{shouldPrevent:a((()=>{if(n.current)return!0;const r="postPurchase"===t.value.currentDetour?.type;return!e||Boolean(e.redirectUrl)&&!r}),[e,t]),markAsEmitted:r}}function Gc(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 Jc={thankYou:"c1_typ",postPurchase:"post_purchase"};function Kc(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 Qc(e,t,n){const r=[e.split(/(?=[A-Z])/).join("-")];return n?r.push(n):r.push(t?t.replace("_","-"):""),r.filter((e=>Boolean(e))).join("-").toLocaleLowerCase()}function Xc(e){return e.checkoutSessionIdentifier}function Zc(e){return e||void 0}function eu(e){return e?he(e):void 0}function tu(e){const t=e?.customerProfile;if(!t)return;const n=he(t.id),r=t.email??null,i=t.firstName??null,a=t.lastName??null,o=t.phone??null;return{id:n,email:r,firstName:i,lastName:a,ordersCount:t.ordersCount??null,phone:o}}function nu({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,i=e.current.fields.remoteMerchandiseDetails?.value,a=r?_e(r.lines,i):void 0,o=function(e,t){return t?t.map((t=>{const n=ye(t.variantId??void 0),r={totalAmount:cu((i=t.lineAllocations).reduce(((e,t)=>e+t.totalAmountAfterLineDiscounts.amount),0),i[0]?.totalAmountAfterLineDiscounts.currencyCode)};var i;const a=t.itemPrice?t.itemPrice:{amount:0,currencyCode:e};return{cost:r,merchandise:{id:n??null,image:{src:t.image?.url??null},price:a,product:{id:ye(t.productId??void 0)??null,title:t.title,untranslatedTitle:t.untranslatedTitle??null,url:t.productUrl??null,vendor:t.vendor,type:t.productType},sku:t.sku??null,title:t.subtitle??null,untranslatedTitle:t.untranslatedSubtitle??null},quantity:t.quantity}})):[]}(t.currencyCode,a),s=e.current.fields.customAttributes.value??[],l=["cartNext","abandonedCart"].includes(n.type)?n.sourceId:null;let c=0,u=0,d=t.currencyCode;return(a?.flatMap((e=>e.lineAllocations))||[]).forEach((e=>{u+=e.totalAmountAfterDiscounts.amount,c+=e.quantity,d=e.totalAmountAfterDiscounts.currencyCode})),{id:l,cost:{totalAmount:cu(u,d)},lines:o,totalQuantity:c,attributes:s}}function ru({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function iu(e){const t=e?.purchasingCompany;if(t)return{company:{id:t.company.id,externalId:t.company.externalId??null,name:t.company.name},location:{id:t.location.id,externalId:t.location.externalId??null,name:t.location.name}}}function au(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function ou(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:pu(e.targetType),title:e.title,type:au(e),value:mu(e,t)}}function su(e){const t=[];return e.forEach((e=>{e.allocations.forEach((e=>{const n=e.discountDetails.discount;Zl(n)&&t.push({amount:e.amount,discountApplication:ou(n,e.amount)})}))})),t}function lu(e){return cu(e.reduce(((e,t)=>e+t.totalAmountAfterLineDiscounts.amount),0),e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function cu(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function uu(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function du(e){return e.map((e=>({key:e.name,value:String(e.value)})))}function pu(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function mu(e,t){const n=e.value;return"FixedAmountValue"===n.typename?t:{percentage:n.percentage}}function hu(e,t,n,r){const i=!0===r?.[e],a=n?.[e]&&!0===n[e].value,o=!0===t.current.fields[e]?.value;return i||a||o||!1}function gu(e,t){const n=new Map;return _u(e,t).forEach((e=>
2{bu(n,e),e.lineComponents.forEach((e=>bu(n,e)))})),n}function fu(e,t,n,r,i,a=!1){const o=n?.purchaseOrder?.deliveryNext||e.current.fields.deliveryNext.value;if("filled"!==o?.status)return[];const s=e.current.fields.remoteMerchandiseDetails?.value??n?.remoteMerchandiseDetails,l=ge(o.lines,s),c=(t?.deliveryLines?.value??[]).map((e=>e.fields.deliveryMethodHandle?.value)).filter(Boolean),u=l.filter((e=>"available"===e.status)).map((e=>e)).flatMap((e=>n?e.methods.map((t=>({method:t,availableDeliveryLine:e}))):c.length>0?e.methods.filter((e=>c.includes(e.handle))).map((t=>({method:t,availableDeliveryLine:e}))):[])),d=a?fe(u,(({method:e})=>e.cost.amount),(({method:e,availableDeliveryLine:t})=>"ONE_TIME_PURCHASE"===t.type?be(e):void 0)):new Set;return u.map((({method:e,availableDeliveryLine:t},n)=>function(e,t,n){let r,i=e.cost,a=n?{...e.costAfterDiscounts,amount:0}:e.costAfterDiscounts;switch(e.methodType){case"PICK_UP":r="pickup",i=null,a=null;break;case"PICKUP_POINT":r="pickupPoint";break;case"SHIPPING":r="shipping";break;case"LOCAL":r="local";break;default:return}return{cost:i,costAfterDiscounts:a,description:e.description||null,handle:e.handle,title:e.title||null,type:r,...void 0===t?{}:{targetLineItems:t}}}(e,r&&i?function(e,t,{componentStableIdsByParent:n,parentStableIdByComponent:r}){const{targetMerchandiseLines:i}=e;if(!i)return;const a=new Set(i.map((e=>e.stableId))),o=[],s=new Set;return i.forEach((e=>{const i=r.get(e.stableId);if(void 0===i){const n=t.get(e.stableId);return void(void 0!==n&&o.push(n))}const l=(n.get(i)??[]).every((e=>a.has(e))),c=t.get(i);if(l&&void 0!==c)return void(s.has(i)||(o.push(c),s.add(i)));const u=t.get(e.stableId);void 0!==u&&o.push(u)})),o}(t,r,i):void 0,d.has(n)))).filter(Boolean)}function yu({negotiated:e,source:t,orderId:n,customerId:r,isFirstOrder:i,proposedParts:a,receipt:o,locale:s,shopCurrencyCode:l,marketDrivenShippingEnabled:c=!1}){const u=e.current.fields.contactInfo.value,d=eu(Xc(t))??null,p=a?a.email.value:u?.email||o?.purchaseOrder?.email||null,m=a?a.phone.value:u?.phone||o?.purchaseOrder?.phone||null,h=e.current.fields.subtotalAfterMerchandiseDiscounts.value??o?.subtotalAfterMerchandiseDiscounts??null,g=e.current.fields.runningTotal.value??o?.checkoutTotal??null,f=g?.currencyCode??l??null,y=function(e,t,n){return _u(e,n).map((e=>{const n=eu(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:su(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:eu(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:Zc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:lu(e.lineAllocations),sellingPlanAllocation:uu(e),properties:du(e.properties),lineComponents:e.lineComponents.map((e=>function(e,t){const n=eu(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:su(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:eu(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:Zc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:lu(e.lineAllocations),sellingPlanAllocation:uu(e),properties:du(e.properties)}}(e,t)))}}))}(e,l,o),v={selectedDeliveryOptions:fu(e,a,o,gu(e,o),Pu(e,o),c)},_=Boolean(p)&&hu("acceptEmailMarketing",e,a,o),b=hu("acceptSmsMarketing",e,a,o),P=o?.smsMarketingPhone||a?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let k=!1;k=o?Boolean(b):b&&Boolean(P);const S=k&&P||null,w=function(e,t){const n=e.current.fields.discountLines.value,r=(n?.lines?.length?n:void 0)??t?.discountLines;return r?.lines?.length?r.lines.reduce(((e,t)=>{if(Xl(t)){const n=t.amount;if(!n)return e;e.push(ou(t.discount,n))}return e}),[]):[]}(e,o),C=o?.totalSavings||e?.current?.fields?.totalSavings.value||null,E=Gc(e)||o?.checkoutTotalTaxes||{amount:0,currencyCode:l},x=function(e,t,n,r){let i={amount:0,currencyCode:t};const a=e.current.fields.deliveryNext.value??r?.purchaseOrder?.deliveryNext;if("filled"===a?.status){const t=e.current.fields.remoteMerchandiseDetails?.value??r?.remoteMerchandiseDetails,o=ge(a.lines,t),s=[];o.forEach((e=>{if("available"===e.status){const t=e.selectedDeliveryMethodHandle;if(t){const n=e.methods.filter((e=>e.handle===t&&void 0!==e.costAfterDiscounts));s.push(...n.map((t=>({line:e,method:t}))))}}}));const l=n?fe(s,(({method:e})=>e.cost.amount),(({method:e,line:t})=>"ONE_TIME_PURCHASE"===t.type?be(e):void 0)):new Set;i=s.reduce(((e,{method:t},n)=>l.has(n)?e:{amount:e.amount+t.costAfterDiscounts.amount,currencyCode:t.costAfterDiscounts.currencyCode}),i)}return i}(e,l,c,o),I=a?a.shippingAddress.value:e.current.fields.shippingAddress.value??o?.purchaseOrder?.shippingAddress,A={address1:I?.address1||null,address2:I?.address2||null,city:I?.city||null,country:I?.countryCode||null,countryCode:I?.countryCode||null,firstName:I?.firstName||null,lastName:I?.lastName||null,phone:I?.phone||null,province:I?.zoneCode||null,provinceCode:I?.zoneCode||null,zip:I?.postalCode||null},T=a?a.billingAddress.value:e.current.fields.billingAddress.value??o?.purchaseOrder?.billingAddress,N={address1:T?.address1||null,address2:T?.address2||null,city:T?.city||null,country:T?.countryCode||null,countryCode:T?.countryCode||null,firstName:T?.firstName||null,lastName:T?.lastName||null,phone:T?.phone||null,province:T?.zoneCode||null,provinceCode:T?.zoneCode||null,zip:T?.postalCode||null},L=function({orderId:e,customerId:t,isFirstOrder:n}){const r={id:ye(t)??t??null,isFirstOrder:n??null};return{id:ye(e)??e??null,customer:r}}({orderId:n,customerId:r,isFirstOrder:i}),R=e.current.fields.customAttributes.value,M=(R?.length?R:void 0)??o?.customAttributes??[],D=function(e,t,n){const r=e.current.fields.paymentLines.value?.lines,i=(r?.length?r:void 0)??n?.purchaseOrder?.paymentLines,a=[];return i?.forEach((e=>{if(!e.cost)return;let n=t||"",r="";switch(e.method.type){case"direct":case ve.CreditCard:r=e.method.brand||"";break;case"deferred":r=e.method.displayName||"";break;case"redeemable":n="",r=e.method.redemptionSource;break;case"giftCard":n="gift_card",r="";break;case ve.PayPal:case"bank":case"noop":case"paymentOnDelivery":case"other":case"shopWallet":r="";break;default:r=e.method.name}a.push({amount:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},gateway:n,paymentMethod:{type:Kc(e.method.type),name:r}})})),a}(e,o?.paymentDetails?.paymentGateway||void 0,o),O=function(e,t,n){const r=e.current.fields.buyerIdentity.value??n?.buyerIdentity;return{country:{isoCode:r?.countryCode??null},language:{isoCode:t}
2,market:{id:r?.market?.id??null,handle:r?.market?.handle??null}}}(e,s,o);return{buyerAcceptsEmailMarketing:_,buyerAcceptsSmsMarketing:k,attributes:M,billingAddress:N,token:d,currencyCode:f,discountApplications:w,discountsAmount:C,email:p,phone:m,lineItems:y,localization:O,order:L,delivery:v,shippingAddress:A,subtotalPrice:h,shippingLine:{price:x},smsMarketingPhone:S,totalTax:E,totalPrice:g,transactions:D}}function vu(e){return{...e,value:"<redacted>"}}function _u(e,t){const n=e.current.fields.merchandiseLines.value,r=(n?.lines?.length?n:void 0)??t?.purchaseOrder?.merchandiseLines,i=e.current.fields.remoteMerchandiseDetails?.value??t?.remoteMerchandiseDetails;return r?.lines?.length?_e(r.lines,i):[]}function bu(e,t){const n=eu(t.variantId);void 0!==n&&e.set(t.stableId,n)}function Pu(e,t){const n=new Map,r=new Map;return _u(e,t).forEach((e=>{0!==e.lineComponents.length&&(n.set(e.stableId,e.lineComponents.map((e=>e.stableId))),e.lineComponents.forEach((t=>{r.set(t.stableId,e.stableId)})))})),{componentStableIdsByParent:n,parentStableIdByComponent:r}}const ku={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function Su(e){if(!(e.type in ku))return!1;switch(e.type){case"sectionComplete":return"contact"===e.section||"deliveryAddress"===e.section;case"pageSubmit":return"shipping"===e.step;case"shippingMethodsFilled":case"shippingMethodSelected":return"onePage"===e.step}}function wu(e,t){if(Su(e))return yu(t)}function Cu(){const e=ke().buyerIdentity;return i((()=>{const t=e.value?.customerProfile;return Boolean("BusinessCustomerProfile"===t?.__typename&&t?.checkoutExperienceConfiguration?.editableShippingAddress)}))}function Eu(){const[e,t]=u(!1);return d((()=>{t("undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}),[]),l((()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(e.matches)};return e.addListener(n),()=>{e.removeListener(n)}}),[]),e}function xu(e){return t=>`${e}${t}`}function Iu(e,t){const n=p().replace(/:/g,"");return e??t(n)}const Au="PortalHost",Tu="data-portal-order";function Nu(e){e.setAttribute(Tu,String(performance.now()))}function Lu(e){let t=null,n=-1;for(let r=e?.firstElementChild??null;r;r=r.nextElementSibling){if("true"===r.firstElementChild?.getAttribute("data-popper-hidden"))continue;const e=Number(r.getAttribute(Tu));e>n&&(n=e,t=r)}return t}function Ru(e){const t=function(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n!==document&&(t.push(n),n=n.parentNode,n););return t.push(document),t}(e),n=Lu(document.getElementById(Au));return t.some((e=>e instanceof Node&&n?.contains(e)))}function Mu(e){if(!e)return!1;const t=Lu(document.getElementById(Au));return t?.contains(e)??!1}function Du(e){if(!e)return!1;const t=document.getElementById(Au);return t?.contains(e)??!1}const Ou=xu("Portal");function zu(){return h("div",{id:Au})}function Bu({children:e}){const[t,n]=u(null),r=Iu(void 0,Ou);return l((()=>{const e=document.getElementById(Au)??document.body,t=document.createElement("div");return t.setAttribute("id",r),Nu(t),e.appendChild(t),n(t),()=>{e.removeChild(t)}}),[r]),t&&m(e,t)}class Vu extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash="checkout-web-ui:sprite-load-error"}}function Fu(e,t){return new Vu(`Failed to fetch sprite "${function(e){try{const t=new URL(e);return t.username="",t.password="",t.search="",t.hash="",t.toString()}catch{return e.split("#")[0].split("?")[0]}}(e)}": ${t}`)}function Uu(e,t){return t instanceof Vu?t:Fu(e,t instanceof Error?t.message:String(t))}const qu={errorClass:"SpriteLoadError",severity:"warning"};function ju(e,t){try{return Hu.ensureFetched(e)}catch(n){throw Hu.reportLoadFailure(e,n,t),n}}const Hu=new class{#e=new Map;#t=new Set;ensureFetched(e){const t=this.#e.get(e);if("resolved"===t?.status)return t.content;if("rejected"===t?.status)throw t.error;if("pending"===t?.status)throw t.promise;throw this.#n(e)}reportLoadFailure(e,t,n){null==n||this.#t.has(e)||(this.#t.add(e),t instanceof Promise?t.catch((t=>{n.error(Uu(e,t),qu)})):n.error(Uu(e,t),qu))}#n(e){const t=fetch(e).then((t=>{if(!t.ok)throw Fu(e,`HTTP ${t.status}`);return t.text()})).then((t=>(this.#e.set(e,{status:"resolved",content:t}),t))).catch((t=>{throw this.#e.set(e,{status:"rejected",error:Uu(e,t)}),t}));return this.#e.set(e,{status:"pending",promise:t}),t}},$u=["cdn.shopify.com"],Yu=_(null);function Wu({children:e,logger:t}){const n=f([]),r=o((()=>{const e=new Set;return{logger:t,sprites:n,embed(t,r){e.has(t)||(e.add(t),n.value=[{url:t,content:r},...n.peek()])}}}),[t,n]);return h(Yu.Provider,{value:r,children:[e,h(Gu,{sprites:n})]})}function Gu({sprites:e}
2){return h("div",{className:"_1rnsrjf0 _1fragem6y","aria-hidden":"true",children:e.value.map((({url:e,content:t})=>h("div",{"data-sprite-url":e,dangerouslySetInnerHTML:{__html:t}},e)))})}function Ju({iconUrl:e,allowRelativeUrl:t}){const n=f(!1);d((()=>{n.value=!0}),[n]);const r=y(Yu),{spriteUrl:i,symbolId:a}=function(e){const t=e.indexOf("#");return-1===t?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}(e);if(!function(e,t){let n;try{n=new URL(e)}catch{return t}return!!t||"https:"===n.protocol&&$u.includes(n.hostname)}(i,t))return console.warn(`[SpriteLoader] Blocked icon load from untrusted URL: ${i}`),null;if(!n.value)return h("span",{"aria-hidden":"true",children:h("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true"})});if(a)return h(Ku,{spriteUrl:i,symbolId:a});const o=ju(i,r?.logger);return h("span",{dangerouslySetInnerHTML:{__html:o},"aria-hidden":"true"})}function Ku({spriteUrl:e,symbolId:t}){const n=y(Yu);if(!n)throw new Se("No sprite registry available");const r=ju(e,n.logger);return d((()=>{n.embed(e,r)}),[n,e,r]),h("span",{"aria-hidden":"true",children:h("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:h("use",{href:`#${t}`})})})}let Qu=class extends v{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function Xu({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return h(Qu,{fallback:t,children:h(g,{fallback:t,children:h(Ju,{iconUrl:e,allowRelativeUrl:n})})})}const Zu=_(void 0);function ed(){return y(Zu)}function td({children:e,level:t}){const n=ed(),r=t??(n??0)+1;return h(Zu.Provider,{value:r,children:e})}const nd=_({colorMix:!1,customProperties:!1,flexGap:!1});function rd({children:e}){const t=o((()=>"undefined"!=typeof CSS&&CSS.supports("color","color-mix(in srgb, red 50%, white)")),[]),n=o((()=>"undefined"==typeof window||"undefined"!=typeof CSS&&CSS.supports("color","var(--test)")),[]),r=o((()=>
2{if("undefined"==typeof window)return!0;if(!document.body)return!0;const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=1===e.scrollHeight;return e.parentNode?.removeChild(e),t}),[]),i=o((()=>({colorMix:t,customProperties:n,flexGap:r})),[t,n,r]);return h(nd.Provider,{value:i,children:e})}const id=_(null);function ad({children:e}){const[t,n]=u(new Map),r=a((e=>t.get(e)),[t]),i=a((e=>{n((t=>{const n=t.get(e.id);if(n&&!Object.keys(e).some((t=>n[t]!==e[t])))return t;const r=new Map(t);return r.set(e.id,{...n,...e}),r}))}),[]),s=a((e=>{n((t=>{const n=new Map(t);return n.delete(e),n}))}),[]),l=a((()=>{n(new Map)}),[]),c=o((()=>({getInteraction:r,upsertInteraction:i,deleteInteraction:s,clearInteractions:l})),[l,s,r,i]);return h(id.Provider,{value:c,children:e})}const od="forwarding-external-new-window-message";function sd({external:e,native:t}){if(e&&t)return od}const ld=_(null),cd=_(void 0),ud=xu("Overlay");function dd({activatorRef:e,children:t}){const n=s(new Map),r=Iu(void 0,ud),[i,a]=u((()=>r)),[l,c]=u(!1),[d,p]=u({}),m=o((()=>({activatorRef:e,overlayId:i,setOverlayId:a,attach(e,t){n.current?.set(e,t)},trigger(e,t){n.current?.get(e)?.(t)},active:l,setActive:c,activatorAttributes:d,setActivatorAttributes(e){Object.keys(e).every((t=>d[t]===e[t]))||p((t=>({...t,...e})))}})),[e,i,n,l,d]);return h(cd.Provider,{value:m,children:t})}function pd({children:e}){return h(cd.Provider,{value:void 0,children:h(ld.Provider,{value:null,children:e})})}function md(){const e=y(cd);if(e)return e}const hd=_(void 0),gd=()=>y(hd),fd=()=>{const e=gd();return o((()=>({closeOverlay(t){e?.close(t)}})),[e])};function yd({children:e}){const t=s(new Map),n=o((()=>({register(e,n){t.current.set(e,n)},unregister(e){t.current.delete(e)},close(e){t.current.get(e)?.close()}})),[t]);return h(hd.Provider,{value:n,children:e})}const vd=_(void 0);function _d({children:e}){const t=s({sheet:!1,modal:!1}),n=f(0),r=i((()=>n.value>0)),a=o((()=>({isLocked:e=>t.current[e],lock(e){t.current[e]=!0},unlock(e){t.current[e]=!1},openModalCount:n,isModalOpen:r})),[n,r]);return h(vd.Provider,{value:a,children:e})}function bd(e){const t=y(vd),[n,r]=u(!1);return l((()=>()=>{t&&n&&t.unlock(e)}),[t,n,e]),o((()=>{if(!t)return;const{lock:i,unlock:a,isLocked:o}=t;return{setActive(t){r((r=>("function"==typeof t?t(r):t)?o(e)&&!n?(console.warn(`Multiple <${"modal"===e?"Modal":"Sheet"} /> components cannot be rendered at the same time`),r):o(e)?r:(i(e),!0):(n&&a(e),!1)))},active:n}}),[t,n,e])}function Pd(e){const t=md(),n=bd(e);return o((()=>{if(!n)return;const{active:e,setActive:r}=n;return t?{...t,setActive:r,active:e}:void 0}),[t,n])}const kd=_(void 0);function Sd({announcementEmitter:e,children:t}){return h(kd.Provider,{value:e,children:t})}function wd(){const e=y(kd);if(!e)throw new Se("Missing AnnouncementContext Context ");return e}var Cd="_14u2r6s0 _1fragem121";const Ed=new class{#r=new Set;#i=new Set;#a=new Map;subscribe(e){return this.#r.add(e),()=>{this.#r.delete(e),0===this.#r.size&&this.#o()}}#s(){this.#r.forEach((e=>e(Array.from(this.#i))))}#o(){this.#i.clear(),this.#a.forEach((e=>{clearTimeout(e)}))}announce(e){const t=Array.from(this.#i).find((t=>t.content===e.content&&t.role===e.role));if(t){const e=this.#a.get(t);e&&clearTimeout(e),this.#a.delete(t),this.#i.delete(t)}this.#i.add(e),this.#s();const n=setTimeout((()=>{this.#a.delete(e),this.#i.delete(e),this.#s()}),1e4);return this.#a.set(e,n),()=>{this.#i.delete(e),clearTimeout(n),this.#a.delete(e),this.#s()}}};function xd({content:e,role:t="status"}){return Ed.announce({content:e,role:t})}function Id(){const[e,t]=u([]),n=e.filter((e=>"status"===e.role)),r=e.filter((e=>"alert"===e.role));return l((()=>Ed.subscribe((e=>{t(e)}))),[]),h(b,{children:[h("div",{role:"status",className:Cd,children:n.map((({content:e,role:t})=>h("span",{children:e},`${e}-${t}`)))}),h("div",{role:"alert",className:Cd,children:r.map((({content:e,role:t})=>h("span",{children:e},`${e}-${t}`)))})]})}var Ad="rij0560 _1fragem121";const Td=_(null);function Nd(){const e=y(Td);if(null==e)throw new we("No app context available");return e}function Ld(){return Nd().currency}function Rd(){return Nd().translate}function Md(){return Nd().formatNumber}function Dd(){return Nd().geolocation}function Od(){return Nd().locale}function zd({children:e,currency:t,embed:n,linkComponent:r,geolocation:i,locale:a,onePage:s,editor:l,redesignedChoiceLists:c,translate:u,formatNumber:d,announcementEmitter:p,inlineIcons:m,logger:g}){const f=o((()=>({currency:t,embed:n,formatNumber:d,geolocation:i,linkComponent:r,locale:a,onePage:s,editor:l,redesignedChoiceLists:c,translate:u,inlineIcons:m,logger:g})),[t,n,u,d,r,i,a,s,l,c,m,g]);return h(Td.Provider,{value:f,children:h(Sd,{announcementEmitter:p,children:h(rd,{children:h(td,{children:h(_d,{children:h(yd,{children:h(ad,{children:[h(Wu,{logger:g,children:e}),h(Bd,{}),h(Id,{})]})})})})})})})}function Bd(){const e=Rd();
2return h(b,{children:[h("div",{id:od,"aria-hidden":!0,className:Ad,children:e("externalNewWindow")}),h("div",{id:"forwarding-new-window-message","aria-hidden":!0,className:Ad,children:e("newWindow")}),h("div",{id:"forwarding-external-message","aria-hidden":!0,className:Ad,children:e("external")})]})}function Vd(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 Fd(e){return/^span\s+\d+$/.test(e)?e:"auto"}function Ud(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function qd(e){return jd(e)}function jd(e){if("0"===e)return 0;const t=xe(e);return void 0===t||"px"!==t.unit&&"%"!==t.unit?void 0:"%"===t.unit?`${t.number}%`:t.number}function Hd(e){if("auto"===e||"string"!=typeof e)return"auto";const t=jd(e);return void 0===t?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):Ee(t)??"auto"}function $d(e){return Wd(e,{auto:!0,fitContent:!0})}function Yd(e){return Wd(e,{none:!0})}function Wd(e,t){if(t?.fitContent&&"fit-content"===e)return"fitContent";if(t&&e in t&&t[e])return e;if("0"===e)return"0";const n=xe(e),r=!n||"px"!==n.unit&&"%"!==n.unit&&"ch"!==n.unit&&"em"!==n.unit&&"lh"!==n.unit&&"vh"!==n.unit?void 0:Ee(e);if(void 0===r){const n=[t?.auto?"'auto'":void 0,t?.none?"'none'":void 0,t?.fitContent?"'fit-content'":void 0].filter(Boolean);console.warn(`Invalid size value '${String(e)}'. Expected a px, %, ch, em, lh or vh size${n.length>0?`, or ${n.join(", ")}`:""}.`)}return r}function Gd(e){return`url(${JSON.stringify(e)})`}const Jd={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},Kd={auto:"block",inline:"inline",block:"block",none:"none"},Qd={auto:"inline",inline:"inline",block:"block",none:"none"},Xd={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},Zd=e=>Kd[e],ep=e=>Qd[e],tp=e=>Jd[e],np=e=>Xd[e],rp=_(void 0),ip=()=>y(rp),ap=_(!1);function op(){return y(ap)}const sp=_(!1);function lp(){return y(sp)}const cp=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function up(e,t="slow",n=!1){const[r,i]=u(!n&&e),[a,o]=u(!1),c=s(!n&&e),d=s((()=>{i(c.current),o(!1)})),p=Eu();let m="string"==typeof t?t:t.enter,h="string"==typeof t?t:t.exit;return p&&(m="none",h="none"),l((()=>{let t;e!==c.current&&(t=setTimeout((()=>{o(!0)}),0)),c.current=e;const n=setTimeout(d.current,e?cp.get(m??"none"):cp.get(h??"none"));return()=>{clearTimeout(n),clearTimeout(t)}}),[m,h,e]),a?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var dp={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 pp({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:i="slow",properties:a=["height"],onTransition:o}){const c=up(t,i),u=s(null);l((()=>{o?.(c)}),[c,o]);const d=new Map([["enter",()=>({height:0})],["entering",()=>({height:u?.current?.clientHeight})],["entered",()=>({height:"auto",overflow:"visible"})],["exit",()=>({height:u?.current?.clientHeight})],["exiting",()=>({height:0})],["exited",()=>({height:0})]]),p="exited"===c;return h("div",{id:e,style:{...a.includes("height")&&d.get(c)()},className:P(dp.Transition,dp.transitionDurationVariant[i],a.includes("opacity")&&dp.transitionOpacity[c]),hidden:p,children:h("div",{ref:u,children:p&&!n?null:r})})}const mp=_(void 0);function hp({children:e,openByDefault:t,openMap:n,onToggle:r,duration:i="slow",transition:a="revealBlock"}){const s=f({}),l=f(new Set),c=o((()=>({openMap:n,onToggle:r,duration:i,transition:a,openByDefault:t,activatorIdMap:s,togglableLayoutIds:l})),[n,r,i,a,t,s,l]);return h(mp.Provider,{value:c,children:e})}function gp({layoutId:e,activatorId:t}){const n=y(mp);if(l((()=>{if(n&&e&&t){const{activatorIdMap:r}=n;r.value[e]||(r.value={...r.value,[e]:t})}}),[n,e,t]),n&&e){const{openMap:t,onToggle:r,duration:i,transition:a,openByDefault:o,activatorIdMap:s,togglableLayoutIds:l}=n,c=`${e}-transition`,u=l.value.has(e),d=(t[e]??o)||!u;return{activatorAttributes:{"aria-controls":"revealBlock"===a?c:e,"aria-expanded":d},layoutAttributes:{"aria-labelledby":s.value[e],role:"region"},toggle:()=>{r?.({...o&&_p(Array.from(l.value)),...t,[e]:!(t[e]??o)})},setToggleable:()=>{if(!l.value.has(e)){const t=new Set(l.value);t.add(e),l.value=t}},open:d,duration:i,transition:a,transitionId:c,isToggleable:u}}}mp.displayName="DisclosureContext";const fp=xu("DisclosureActivator");function yp(e,t){const n=e.displayName||e.name||"Component",r=k((({id:r,toggles:i,...a},o)=>{const s=Iu(r,fp),l=gp({layoutId:i,activatorId:s});if(l){const{setToggleable:n,activatorAttributes:r,open:i,toggle:c}=l;n();const{toggleEvent:u="onPress",setAriaExpanded:d=!0}=t||{},{onPress:p,onChange:m}=a,{"aria-expanded":g,...f}=r,y={..."onPress"===u?{onPress:()=>{c(),p?.()}}:{onChange:e=>{c(),m?.(e)}},...d?r:f};return h(e,{id:s,..."onChange"===u&&{value:i},...a,...y,ref:o})}return 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.`),h(e,{id:r,...a,ref:o})}));return r.displayName=`DisclosureActivator(${n})`,r}function vp(e){const t=k(((t,n)=>{const{id:r}=t,i=gp({layoutId:r});if(i){const{open:r,duration:a,transition:o,isToggleable:s,transitionId:l,layoutAttributes:c}=i,u=h(e,{...t,...c,ref:n});return"revealBlock"===o&&s?h(pp,{open:r,id:l,duration:a,children:u}):r?u:null}return h(e,{...t,ref:n})}));return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function _p(e=[]){return"boolean"==typeof e?{}:(Array.isArray(e)?e:[e]).reduce(((e,t)=>({...e,[t]:!0})),{})}function bp(e){return"command"===e?.type&&"clipboard"===e.kind}function Pp(e){return"command"===e?.type&&"visibility"===e.kind}function kp(e){return"command"===e?.type&&"overlay"===e.kind}function Sp(e){return"interest"===e?.type}function wp(){const e=y(id);if(null===e)throw new we("No Interactions in context");return e}function Cp(){const{getInteraction:e}=wp();return{showOverlay:a((t=>{const n=e(t);kp(n)?n.open():console.warn(`No overlay found for ID "${t}".`)}),[e]),hideOverlay:a((t=>{const n=e(t);kp(n)?n.close():console.warn(`No overlay found for ID "${t}".`)}),[e])}}let Ep="",xp=[],Ip=0,Ap=0,Tp=[],Np=!1;class Lp extends Error{}function Rp(){return Ip>=Ep.length}function Mp(){return Ep[Ip++]}function Dp(e){const t=Ep.substring(Ap,Ip).trim();xp.push({type:e,text:t})}function Op(){return Rp()?jp:Ep[Ip]}function zp(){const e=Mp();switch(e){case Hp:break;case Bp:Dp("LEFT_PAREN");break;case Vp:Dp("RIGHT_PAREN");break;case"@":{for(;!Gp.has(Op());)Mp();const e=Ep.substring(Ap,Ip);"@media"===e||"@container"===e?Dp("MEDIA_TYPE"):Tp.push(`Invalid media type "${e}" starting at position ${Ap}.`);break}case Fp:Dp("COMMA");break;case qp:case Up:t="=",Rp()||Ep[Ip]!==t||Ip++,Dp("COMPARATOR");break;case $p:case Yp:for(Ap++;Op()!==e;)Mp();Dp("IDENTIFIER"),Mp();break;default:if(function(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}(e)){for(;!Gp.has(Op());)Mp();const e=Ep.substring(Ap,Ip),t=e.toLowerCase();if("and"===t||"or"===t)e!==t?Tp.push(`Keyword "${e}" is not case sensitive at position ${Ap}.`):Dp("OPERATOR");else if("inline-size"===t||"block-size"===t)e!==t?Tp.push(`Property "${e}" is not case sensitive at position ${Ap}.`):Dp("PROPERTY");else{if(Op()===Hp)for(Mp();!Wp.has(Op());)Mp();Dp("IDENTIFIER")}}else Tp.push(`Unexpected character "${e}" at position ${Ip}.`)}var t}const Bp="(",Vp=")",Fp=",",Up="<",qp=">",jp="\0",Hp=" ",$p="'",Yp='"',Wp=new Set([jp,Bp,Vp,Fp,Up,qp]),Gp=new Set([...Wp,Hp]);let Jp=[],Kp=0;function Qp(e){for(const t of e)if(Xp(t))return Zp(),!0;return!1}function Xp(e){return!tm()&&(Array.isArray(e)?e.includes(nm().type):nm().type===e)}function Zp(){return tm()||Kp++,rm()}function em(e,t){if(Xp(e))return Zp();throw new Lp(`${t}\nInstead we found this word/character: "${nm().text}"`)}function tm(){return"EOF"===Jp[Kp].type}function nm(){return Jp[Kp]}function rm(){return Jp[Kp-1]}const im="s-default";function am(){return{condition:om(),value:em("IDENTIFIER","Expected an identifier").text}}function om(){em("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=sm();let t=null;Xp("COMPARATOR")&&(t=sm(e.operator)),em("RIGHT_PAREN",'Expected a condition to end with a right parenthesis ")"');let n=e;if(t&&(n={type:"compound-condition",left:e,right:t,operator:"and"}),"OPERATOR"===nm().type){const e=em("OPERATOR","Expected an operator");return{type:"compound-condition",left:n,right:om(),operator:e.text}}return n}function sm(e){const t=e?rm():em(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=em("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new Lp("Cannot have two different c
2omparison operators (a less-than and a greater-than) in the same condition.");const r=em("IDENTIFIER"===t.type?"PROPERTY":"IDENTIFIER",`Expected a ${"IDENTIFIER"===t.type?'property (like "inline-size")':'identifier (like "500px")'} to compare against.`);let i=n.text;return"IDENTIFIER"===t.type&&(i="<"===i?">":"<="===i?">=":">"===i?"<":"<="),{type:"condition",property:"PROPERTY"===t.type?t.text:r.text,operator:i,value:"PROPERTY"===t.type?r.text:t.text}}function lm(e){try{return t=function(e){if(Np)throw Error("Cannot tokenize recursively");for(Np=!0,Ep=e,xp=[],Ip=0,Ap=0,Tp=[];!Rp();)Ap=Ip,zp();if(Ap=Ip,Dp("EOF"),Np=!1,Tp.length)throw new Lp(Tp.join("\n"));return xp}(e),Jp=t,Kp=0,function(){const e={responsiveType:em("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if("@container"===e.responsiveType){const t="IDENTIFIER"===nm().type?Zp().text:im;e.name=t}for(e.conditionalValues.push(am());Qp(["COMMA"])&&"LEFT_PAREN"===nm().type;)e.conditionalValues.push(am());if("COMMA"!==rm().type)throw new Lp(`Expected a comma before the fallback value of "${nm().text}"`);
2if(e.fallbackValue=em("IDENTIFIER","Expected a final fallback value to be defined").text,"EOF"!==nm().type)throw new Lp(`Expected the query to end, instead found "${nm().text}"`);return e}()}catch(n){if(n instanceof Lp)return{state:"invalid",error:n.message};throw new Error("Unknown error",{cause:n})}var t}function cm(e){return"string"==typeof e&&e.startsWith("@container")}function um(e){return"string"==typeof e&&e.startsWith("@media")}function dm(e){if(Oc(e))return e.base;if(!cm(e)&&!um(e))return e;const t=lm(e);return"invalid"===t.state?void 0:t.fallbackValue}function pm(e,t){if(e===t)return!0;if(Oc(e))return Object.values(e).some((e=>pm(e,t)));if(!cm(e)&&!um(e))return!1;const n=lm(e);return"invalid"!==n.state&&(n.fallbackValue===t||n.conditionalValues.some((e=>e.value===t)))}function mm(e,t){return Oc(e)?Object.fromEntries(Object.entries(e).map((([e,n])=>[e,t(n)]))):t(e)}function hm(e){const t=e,n=k((function(e,n){const{upsertInteraction:r,deleteInteraction:i}=wp(),{display:s}=e,c="none"===s,d=o((()=>pm(s,"none")),[s]),[p,m]=u(),[g,f]=u(d);d!==g&&(f(d),"shown"===p&&m(void 0));const y=void 0===p?!c:"shown"===p,v="hidden"===p,_="shown"===p&&d,b=a((()=>m("hidden")),[]),P=a((()=>m((e=>"hidden"===e||d?"shown":void 0))),[d]),k=a((()=>m((e=>(void 0===e?c:"shown"!==e)?"shown":"hidden"))),[c]),{id:S}=e;if(l((()=>(S&&r({id:S,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:b,show:P,toggle:k,visible:y}),()=>{S&&i(S)})),[S,y,b,P,k,r,i]),S&&v)return null;const w=S&&_?{...e,display:"auto"}:e;return h(t,{...w,ref:n})}));return n.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function gm(e,{overlayType:t}){const n=k((function(n,r){const{open:i}=n,{upsertInteraction:o,deleteInteraction:s}=wp(),{active:c,setActive:d}=function(e){const t=function(e){return"modal"===e||"sheet"===e?()=>{const t=bd(e),n=u(!1);if(t)return t;const[r,i]=n;return{active:r,setActive:i}}:()=>{const[e,t]=u(!1);return{active:e,setActive:t}}}(e);return t()}(t),p=md(),{id:m,onClose:g,onHide:f}=n,y=a((()=>{d(!1),"function"==typeof g&&g(),"function"==typeof f&&f()}),[d,g,f]),v=a((()=>{d(!0)}),[d]);if(l((()=>()=>{m&&s(m)}),[m]),l((()=>{m&&o({id:m,type:"command",kind:"overlay",overlayType:t,defaultCommand:"--toggle",close:y,open:v,toggle:()=>{c?y():v()},active:c})}),[c,y,s,m,v,o]),m&&!p&&void 0===i){const t={setActive:d,open:c,onClose:y,onHide:y};return h(e,{...n,...t,ref:r})}return h(e,{...n,ref:r})}));return n.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function fm(e){return a((t=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}),[e])}function ym(e,t){const n=fm(e),r=fm(t);return a((e=>{n(e),r(e)}),[n,r])}const vm=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function _m(e,t){return vm.reduce(((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]})),{})}const bm=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Pm(e,t){return bm.map((n=>{return{[n]:(r=t?.[n],i=km(n,e),function(e){const t="function"==typeof r?r(e):void 0;return i?.(e),t})};var r,i})).reduce(((e,t)=>({...e,...t})),{})}function km(e,t){return function(n){t?.trigger(e,n)}}function Sm(e){const t=k((({overlay:t,...n},r)=>{const i=s(null),a=ym(r,i);return t?h(dd,{activatorRef:i,children:[h(e,{...n,ref:a}),t]}):h(e,{...n,ref:r})}));return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function wm(e,{focusActivatorWhenClosing:t=!1}={}){const n=k(((n,r)=>{const{id:i,onClose:a,onHide:o}=n,s=md(),c=gd();return l((()=>(i&&c?.register(i,{close(){a?.(),o?.(),s?.setActive(!1),t&&s?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{i&&c?.unregister(i)})),[i,a,o,c,s]),h(e,{...n,ref:r,id:i??s?.overlayId})}));return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function Cm(e){if(e)return`${e}Title`}const Em=(e,t)=>{let n=0,r=null;return function(...i){const a=Date.now();r&&(clearTimeout(r),r=null),a-n>=t&&(e.apply(this,i),n=a),r=setTimeout((()=>{e.apply(this,i),n=Date.now(),r=null}),t)}},xm=_(null);function Im(){const e=y(xm);if(null===e)throw new we("No Popper in context");return e}const Am=_({}),Tm=()=>y(Am);function Nm(e,t){if("center"===t)return e;const n=e.startsWith("block");return`${e}Span${n?"Inline":"Block"}${"start"===t?"End":"Start"}`}function Lm(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function Rm(e,t,n){if("ltr"===n)return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};
2case"inlineEnd":return{position:"inlineStart",alignment:t};default:return"center"===t?{position:e,alignment:t}:{position:e,alignment:"start"===t?"end":"start"}}}function Mm(e,t,n,r,i,a,o){const s={x:0,y:0},l="rtl"===o?r.right-n.width:r.left,c=a?l:r.left+r.width/2-n.width/2,u=r.top+r.height/2-n.height/2;switch(e){case"inlineStart":s.x=r.left-n.width-i,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"inlineEnd":s.x=r.right+i,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"blockStart":s.y=r.top-n.height-i,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width);break;case"blockEnd":s.y=r.bottom+i,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width)}return s}function Dm(e,t){const n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,i=e.x+t.width,a=e.y+t.height;let o={left:0,right:0,top:0,bottom:0};return i>n&&(o={...o,right:n-i}),e.x<0&&(o={...o,left:-e.x}),a>r&&(o={...o,bottom:a-r}),e.y<0&&(o={...o,top:-e.y}),o}const Om=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function zm(e){return Om.test(e)}function Bm(e){const t=e.match(Om);if(!t)return null;const[,n,r,,i,a]=t;return{axis:n,edge:r,...i&&a?{spanAxis:i,spanEdge:a}:{}}}function Vm(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}var Fm={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 Um(e){if(zm(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:Te(t),alignment:n.includes("start")?"end":"start"}:{position:Te(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function qm(e){return e.split(",").map((e=>e.trim())).filter((e=>!!zm(e)))}function jm({activator:e,children:t,hidden:n,id:r,offset:i,minInlineSize:l,positionArea:c="block-start",positionTryFallbacks:p,preventOverflow:m,sameInlineSize:g}){const{rect:y,direction:v}=function(e){const[t,n]=u(null),r=f("ltr"),i=s([]),o=s(null),l=a((()=>{null!==e&&(r.value="rtl"===window.getComputedStyle(e).direction?"rtl":"ltr",n(e.getBoundingClientRect()))}),[e,r]);return d((()=>{l();const t=Em(l,16);o.current=t,window.addEventListener("resize",l),window.addEventListener("scroll",t);for(const e of i.current)e.removeEventListener("scroll",t);const n=e?function(e){const t=[];let n=e.parentElement;for(;n;){const{overflow:e,overflowX:r,overflowY:i}=getComputedStyle(n);(/(auto|scroll|overlay)/.test(e)||/(auto|scroll|overlay)/.test(r)||/(auto|scroll|overlay)/.test(i))&&t.push(n),n=n.parentElement}return t}(e):[];i.current=n;for(const e of n)e.addEventListener("scroll",t);return()=>{window.removeEventListener("resize",l),window.removeEventListener("scroll",t);for(const e of n)e.removeEventListener("scroll",t);i.current=[],o.current=null}}),[e,l]),{rect:t,direction:r.value}}(e),[_,b]=function(){const[e,t]=u(null),n=s(null),r=a((e=>{if(n.current?.disconnect(),n.current=null,null!==e&&(t(e.getBoundingClientRect()),"undefined"!=typeof ResizeObserver)){const r=new ResizeObserver((()=>{t(e.getBoundingClientRect())}));r.observe(e),n.current=r}}),[]);return d((()=>()=>{n.current?.disconnect()}),[]),[e,r]}(),k=s(null),S=a((e=>{b(e),k.current=e}),[b]),[w,C]=u(""),{current:E,parent:x}=Tm(),I=f("absolute"),{position:A,alignment:T}=Um(c),N=o((()=>{if("none"!==p)return p??function(e){const t=function(e){const t=Bm(e);return t?Vm({...t,edge:"start"===t.edge?"end":"start"}):e}(e),n=function(e){const t=Bm(e);if(!t)return[];const n="block"===t.axis?"inline":"block",r=t.spanAxis&&t.spanEdge?{spanAxis:"inline"===t.spanAxis?"block":"inline",spanEdge:t.spanEdge}:{};return[Vm({axis:n,edge:"start",...r}),Vm({axis:n,edge:"end",...r})]}(e);return[t,...n].join(", ")}(c)}),[p,c]),{clipping:L,offsets:R,spacing:M,resolvedPosition:D,resolvedAlignment:O}=o((()=>function(e,t,n,r,{offset:i=0,preventOverflow:a=!1,sameInlineSize:o=!1,direction:s="ltr",fallbackPositions:l}={}){const{position:c,alignment:u}=Rm(e,t,s),d=l?.map((({position:e,alignment:t})=>Rm(e,t,s))),p={x:0,y:0};let m={left:0,right:0,top:0,bottom:0},h=0,g=c,f=u;if(!n||!r)return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f};const y=Mm(c,u,n,r,i,o,s);if(p.x=y.x,p.y=y.y,a){if(m=Dm(p,n),function(e,t){const n=0!==t.top||0!==t.bottom,r=0!==t.left||0!==t.right;return"blockStart"===e||"blockEnd"===e?n:n||r}(c,m)&&d?.length){const e=Lm(m);for(const t of d){const e=Mm(t.position,t.alignment,n,r,i,o,s),a=Dm(e,n);if(0===Lm(a)){p.x=e.x,p.y=e.y,m=a,g=t.position,f=t.alignment;break}}if(Lm(m)>0){let t=e;for(const e of d){const a=Mm(e.position,e.alignment,n,r,i,o,s),l=Dm(a,n),c=Lm(l);c<t&&(t=c,p.x=a.x,p.y=a.y,m=l,g=e.position,f=e.alignment)}}}m.right&&!m.left&&(p.x+=m.right,h=-10),!m.right&&m.left&&(p.x=0,h=10)}return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f}}(A,T,_,y,{direction:v,offset:i,preventOverflow:m,sameInlineSize:g,fallbackPositions:N?qm(N).map(Um):void 0})),[v,i,A,T,_,m,y,g,N]),z=o((()=>({clipping:L,offsets:R,position:D,alignment:O,popperRect:_,referenceRect:y,spacing:M})),[L,R,D,O,_,y,M]);return d((()=>{const t=e&&function(e){let t=e.parentElement;for(;t&&t!==document.body;){const{position:e}=getComputedStyle(t);if("fixed"===e||"sticky"===e)return!0;t=t.parentElement}return!1}(e)?"fixed":"absolute";I.value=t;const n="absolute"===t?window.scrollX||window.pageXOffset:0,r="absolute"===t&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:i,y:a}=function({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}({x:R.x+M+n,y:R.y+r});C((window.devicePixelRatio||1)<2?`translate(${i}px, ${a}px)`:`translate3d(${i}px, ${a}
2px, 0)`)}),[R.x,R.y,M,e]),d((()=>{if(n)return;const e=k.current?.parentElement;e&&Nu(e)}),[n]),h(xm.Provider,{value:z,children:h(Bu,{children:h("div",{className:P(Fm.Popper,Fm.positionVariant[I.value],(x??E)&&Fm.colorSchemeVariant[x??E],n&&Fm.hidden),style:{...y&&{transform:w,...g&&{width:y.width},...l&&{minWidth:Ae(l)}}},ref:S,id:r,"aria-hidden":n||void 0,"data-popper-hidden":n||void 0,children:x&&E?h("div",{className:Fm.colorSchemeVariant[E],children:t}):t})})})}var Hm={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inlineEnd:"by0ptki"},Tooltip:"by0ptk8 by0ptk7 _1fragempp _1fragemri _1fragemnw _1fragemtb _1fragem6e _1fragem11k _1fragemws _1fragemyt _1fragem124 _1fragemy5",tooltipPositionVariant:{blockStart:"by0ptk9",blockEnd:"by0ptka",inlineStart:"by0ptkb",inlineEnd:"by0ptkc"},tooltipTransitionVariant:{entered:"by0ptk0",exit:"by0ptk1",exiting:"by0ptk2",enter:"by0ptk3",entering:"by0ptk4",exited:"by0ptk5"}};function $m(e){const{children:t,id:n}=e,r=s(!1),i=md(),{active:o=!1,setActive:c}=i??{},u=a((e=>{["Escape","Esc"].includes(e.key)&&o&&(e.preventDefault(),c?.(!1))}),[o,c]);return l((()=>{if(i&&o)return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}}),[i,o,u]),i?(i?.attach("onMouseEnter",(()=>{r.current||c?.(!0)})),i?.attach("onMouseLeave",(()=>{c?.(!1)})),i?.attach("onTouchStart",(()=>{r.current=!0})),i?.attach("onClick",(()=>{c?.(!o)})),h(b,{children:[o&&h("div",{role:"tooltip",className:Ne({screenReaders:"only"}),children:t}),h(Ym,{id:n,open:o,onMouseEnter:()=>{r.current||c?.(!0)},onMouseLeave:()=>{c?.(!1)},children:t})]})):h(Ym,{...e})}const Ym=wm(function(e){const t=k((function(t,n){const{id:r,open:i}=t,{upsertInteraction:o,deleteInteraction:c}=wp(),[d,p]=u(!1),m=s(),g=a((()=>{m.current&&(clearTimeout(m.current),m.current=void 0)}),[]),f=a((({delay:e=0}={})=>{g(),e>0?m.current=setTimeout((()=>p(!1)),e):p(!1)}),[g]),y=a((()=>{g(),p(!0)}),[g]);return l((()=>()=>{g(),r&&c(r)}),[r]),l((()=>{r&&o({id:r,type:"interest",hide:f,show:y,active:d})}),[d,f,r,y,o]),h(e,r&&void 0===i?{...t,open:d,ref:n}:{...t,ref:n})}));return t.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,t}((function({children:e,id:t,open:n,onMouseEnter:r,onMouseLeave:i}){const{getInteraction:a}=wp(),o=t?a(t):void 0,s=md(),{active:l=!1}=s??{};s?.setActivatorAttributes({"aria-controls":l?t:void 0,"aria-expanded":l});const c=o?.invokerRef?.current||s?.activatorRef.current||null,u=up(Boolean(n),{exit:"base"}),d=Boolean(t&&Sp(o)&&!s),p=d?h("div",{id:t,role:"tooltip","aria-hidden":"true",className:Ne({screenReaders:"only"}),children:e}):null;return h(b,{children:[p,"exited"!==u&&h(jm,{activator:c,preventOverflow:!0,offset:8,children:h(Wm,{id:d?void 0:t,transition:u,onMouseEnter:()=>{Sp(o)&&o.show(),r?.()},onMouseLeave:()=>{Sp(o)&&o.hide({delay:100}),i?.()},children:e})})]})})));function Wm({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:i}){const{clipping:a,spacing:o,position:s}=Im(),l="blockStart"===s||"blockEnd"===s,c=a.right||a.left,u=l&&c?S({[Hm.arrowNudge]:`${c+o}px`}):void 0,d=P(Hm.Tooltip,Hm.tooltipPositionVariant[s],Hm.tooltipTransitionVariant[i]);return h("div",{id:t,role:"tooltip","aria-hidden":void 0===t||void 0,onMouseEnter:n,onMouseLeave:r,className:d,style:u,children:[e,h(Gm,{})]})}function Gm(){const{position:e}=Im();return h("div",{className:P(Hm.Arrow,Hm.arrowPositionVariant[e])})}async function Jm(e){if(navigator.clipboard?.writeText)try{return void(await navigator.clipboard.writeText(e))}catch(r){console.warn("navigator.clipboard API failed, trying fallback method",r)}if(void 0===document.execCommand)throw new we("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 we("Failed to copy text to clipboard")}const Km=xu("CommandInvoker");function Qm(e,{commands:{clipboard:t=!0,visibility:n=!0,overlay:r=!0}={}}={}){const i=e.displayName||e.name||"Component",o=k((function({command:t,commandFor:n,onClick:r,overlay:i,...o},c){const{getInteraction:d}=wp(),[p,m]=u(!1),[g,f]=u(""),y=Rd(),v=n?d(n):void 0,_=bp(v)&&null!=v.clipboard.text?v:void 0,b=a((async()=>{r?.();const{text:e,onCopy:t,onCopyError:n}=_.clipboard;let i=!1;try{await Jm(e),i=!0}catch(a){console.warn("ClipboardItem: failed to copy text to clipboard",a)}finally{if(i){const e=y("clipboardCopied");f(e),m(!0),xd({content:e}),t?.()}else{const e=y("clipboardFailedToCopy");f(e),m(!0),xd({content:e}),n?.()}k(),P.current=setTimeout((()=>{m(!1)}),2500)}}),[r,_,y]),P=s(),k=()=>{P.current&&clearTimeout(P.current)};return l((()=>()=>k()),[]),h(e,{...o,command:t,commandFor:n,onClick:_?b:r,overlay:_?h(Ym,{open:p,children:g}):i,ref:c})})),c=k((function({commandFor:t,id:n,onClick:r,...a},o){const s=Iu(n,Km),l=gp({layoutId:t,activatorId:s});if(l){const{setToggleable:t,activatorAttributes:n,toggle:i}=l;t();const c={onClick:()=>{i(),r?.()},...n};return h(e,{...a,id:s,...c,ref:o})}return t&&console.warn(`${i} sets "command" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`),h(e,{...a,id:n,ref:o})})),d=k((function({command:t,commandFor:n,id:r,onClick:i,...o},l){const c=Iu(r,Km),{getInteraction:u,upsertInteraction:d}
2=wp(),p=n?u(n):void 0,m=s(null),g=ym(l,m),f=a((e=>{const t=n?u(n):void 0;if(kp(t)){const{overlayType:n}=t;m.current&&"popover"===n&&e&&d({...t,invokerRef:m})}}),[n,u,d]);if(p){let r={};if(Pp(p)){const{hide:e,show:a,toggle:o,visible:s}=p;r={onClick:()=>{switch(t){case"--hide":e();break;case"--show":a();break;case"--toggle":o()}i?.()},"aria-controls":n,"aria-expanded":s}}else if(kp(p)){const{active:e,close:a,open:o,overlayType:s,toggle:l}=p;r={onClick:()=>{var n;switch(("--show"===t||"--toggle"===t&&!e)&&(n=m.current)instanceof HTMLElement&&document.activeElement!==n&&n.focus({preventScroll:!0}),t){case"--hide":a();break;case"--show":o();break;case"--toggle":l()}f(!e),i?.()},...("modal"===s||"sheet"===s)&&{"aria-haspopup":"dialog"},..."popover"===s&&{"aria-controls":n,"aria-expanded":e}}}return h(e,{...o,command:t,commandFor:n,id:c,...r,ref:g})}return null})),p=k((function({command:a="--auto",commandFor:s,...l},u){const{getInteraction:p}=wp();if(gp({layoutId:s})&&("--hide"===a||"--show"===a||"--toggle"===a))return h(c,{...l,command:a,commandFor:s,ref:u});const m=s?p(s):void 0;if(m&&!Sp(m)){const{defaultCommand:e}=m,c="--auto"===a?e:a;if("--copy"===c&&t&&bp(m))return h(o,{...l,command:c,commandFor:s,ref:u});if(("--hide"===c||"--show"===c||"--toggle"===c)&&(n&&Pp(m)||r&&kp(m)))return h(d,{...l,command:c,commandFor:s,ref:u});if("--show"===c||"--hide"===c||"--toggle"===c||"--copy"===c){let e;bp(m)?e="clipboard":Pp(m)?e="visibility":kp(m)&&(e="overlay"),console.warn(`Command "${a}" targets "${s}" but ${i} does not support ${e} commands.`)}else console.warn(`Unknown command "${a}" for ${i}`)}return h(e,{...l,command:a,commandFor:s,ref:u})}));return p.displayName=`CommandInvokerComponent(${i})`,p}function Xm(e,{tapToggles:t=!1}={}){const n=e.displayName||e.name||"Component",r=k((function({interestFor:n,...r},i){const{onBlur:o,onClick:c,onFocus:u,onMouseEnter:d,onMouseLeave:p}=r,{getInteraction:m,upsertInteraction:g}=wp(),f=n?m(n):void 0,y=s(null),v=s(),_=s(),b=a((e=>{if(_.current?.(),_.current=void 0,!(e instanceof HTMLElement))return;const t=e=>{v.current=e.pointerType};e.addEventListener("pointerenter",t),_.current=()=>{e.removeEventListener("pointerenter",t)}}),[]),P=ym(i,y),k=ym(P,b),S=a((e=>{const t=n?m(n):void 0;Sp(t)&&g(e?{...t,invokerRef:y}:{...t,invokerRef:void 0})}),[n,m,g]),w=Sp(f)&&f.active,C=a((e=>{["Escape","Esc"].includes(e.key)&&Sp(f)&&(e.preventDefault(),f.hide(),S(!1))}),[f,S]);l((()=>{if(w)return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}}),[w,C]);const E=a((e=>{const t=e.target;t instanceof Node&&!y.current?.contains(t)&&(t instanceof Element&&t.closest('[role="tooltip"]')||Sp(f)&&(f.hide(),S(!1)))}),[f,S]);if(l((()=>{if(t&&w)return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}}),[w,E]),Sp(f)){const i={"aria-describedby":n,onFocus:()=>{("touch"!==v.current||function(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}(y.current))&&(f.show(),S(!0)),u?.()},onBlur:()=>{f.hide(),S(!1),o?.()},onMouseLeave:()=>{f.hide({delay:100}),S(!1),p?.()},onMouseEnter:()=>{"touch"!==v.current&&(f.show(),S(!0)),d?.()},...t&&{onClick:()=>{"touch"===v.current&&(f.active?(f.hide(),S(!1)):(f.show(),S(!0))),c?.()}}};return h(e,{...r,...i,ref:k})}return h(e,{...r,ref:i})}));return r.displayName=`InterestInvokerComponent(${n})`,r}const Zm=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])=>Le(e)?.map((e=>[e,t]))??[[e,t]]))),eh={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"},th={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},nh={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},rh={auto:"auto",hidden:"hidden"},ih={alignContent:{...th},placeContent:{...th},alignItems:{...nh},alignSelf:{auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},placeItems:{...nh}
2,backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:{base:"base",transparent:"transparent",subdued:"subdued"},borderRadius:{none:"none","small-100":"small",small:"small",base:"base",large:"large","large-100":"large",max:"max",fullyRounded:"fullyRounded"},borderWidth:{none:"none",base:"base",large:"large100","large-100":"large100","large-200":"large200"},borderStyle:{none:"none",dotted:"dotted",dashed:"dashed",solid:"base",auto:"base"},borderColor:{base:"base"},display:{inline:"inline",block:"block",flex:"flex",inlineBlock:"inlineBlock",inlineFlex:"inlineFlex",grid:"grid",inlineGrid:"inlineGrid",none:"none"},flexDirection:{column:"column",row:"row"},flexWrap:{wrap:"wrap",nowrap:"nowrap"},gridAutoFlow:{row:"row",column:"column"},justifyContent:{...th},justifyItems:{...nh},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...rh},overflowBlock:{...rh},overflowInline:{...rh},padding:{...eh},paddingBlock:{...eh},paddingInline:{...eh},paddingBlockStart:{...eh},paddingBlockEnd:{...eh},paddingInlineStart:{...eh},paddingInlineEnd:{...eh},gap:{...eh},rowGap:{...eh},columnGap:{...eh},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},ah={borderRadius:{limit:4},borderStyle:{limit:4},borderWidth:{limit:4},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:4},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},oh={backgroundImage:Gd,blockSize:$d,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:Fd,gridRow:Fd,gridTemplateColumns:Vd,gridTemplateRows:Vd,inlineSize:$d,insetBlock:Hd,insetBlockEnd:Hd,insetBlockStart:Hd,insetInline:Hd,insetInlineEnd:Hd,insetInlineStart:Hd,maxBlockSize:Yd,maxInlineSize:Yd,minBlockSize:Wd,minInlineSize:Wd,transform:function(e){if("none"===e)return"none";if("string"!=typeof e||!e.startsWith("translate(")||!e.endsWith(")"))return Ud(e);const t=e.slice(10,-1).split(",");if(t.length>2)return Ud(e);const n=qd(t[0].trim()),r=2===t.length?qd(t[1].trim()):0;return void 0===n||void 0===r?Ud(e):`translateX(calc(${Ee(n)} * ${Ce.global.transformDirectionModifier})) translateY(${Ee(r)})`}},sh=/\s+/;function lh(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[u,d]of Object.entries(e)){if(void 0===d||""===d)continue;const e=u in ah?ch(d,u):d;void 0!==e&&(r[u]=e)}const i=n?function(e){const t={};for(const[n,r]of Object.entries(e))n in Zm&&r===Zm[n]||(t[n]=r);return t}(uh(r,t)):uh(r,t),a=mh(i,oh),o=mh(i,ih),s=Ne(a),{className:l,style:c}=Re(o);return{className:P(s,l),style:c}}function ch(e,t){const{limit:n}=ah[t];return mm(e,(e=>{if(void 0===e||"string"!=typeof e)return;const t=e.trim().split(sh,n??4);return 1===t.length?t[0]:(3===t.length&&t.push(t[1]),t)}))}function uh(e,t){const n={},r=(e,r)=>{const i=function(e,t){return function(e){return e.property in oh}(e)?function(e,t,n){const r=n?.transforms?.[e]??oh[e];return mm(t,(e=>{if(void 0!==e)return Oe(e)?ph(e.map((e=>r?.(e)))):r?.(e)}))}(e.property,e.value,t):function(e){return e.property in ih}(e)?function(e,t,n){const r=ih[e],i=t=>{const i=n?.transforms?.[e]?.(t);return r[i??t]};return mm(t,(e=>Oe(e)?ph(e.map(i)):i(e)))}(e.property,e.value,t):void 0}({property:e,value:r},t),a=function(e,t){const n=Le(e);if(!n||0===n.length)return{[e]:t};if(Oc(t)){const e=Object.entries(t),r={};for(let t=0;t<n.length;t++){const i=n[t],a={};for(const[n,r]of e)a[n]=De(r)?r[t]:r;
2r[i]=a}return r}const r=De(t),i={};for(let a=0;a<n.length;a++)i[n[a]]=r?t[a]:t;return i}(e,i);for(const[t,o]of Object.entries(a)){const e=dh(o);if(void 0===e)continue;const r=n[t];if(Oc(e)&&void 0!==r){const i=Oc(r)?r:{base:r};n[t]={...i,...e}}else n[t]=e}};for(const i of Me)i in e&&r(i,e[i]);for(const[i,a]of Object.entries(e))Me.includes(i)||r(i,a);return n}function dh(e){if(!Oc(e))return e;const t=Object.entries(e).filter((([,e])=>void 0!==e&&""!==e));return t.length>0?Object.fromEntries(t):void 0}function ph(e){if(!Array.isArray(e)||2!==e.length)return e;const[t,n]=e;return[t,n,t,n]}function mh(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const hh=Object.keys(ce).filter((e=>"base"!==e)),gh=new Set([">",">="]),fh=new Set(["<","<="]);function yh(e){return"inline-size"===e}function vh(e){if("invalid"===e.state)return e;function t(e){return!!yh(e)||(console.warn(`Container queries should be based on the inline dimensions of the container. Use 'inline-size' instead of '${e}'.`),!1)}function n(e){return"compound-condition"===e.type?!("condition"===e.left.type&&!t(e.left.property)||"condition"===e.right.type&&!t(e.right.property))&&(function(e){if("and"!==e.operator)return!1;if("condition"!==e.left.type||"condition"!==e.right.type)return!1;if(e.left.property!==e.right.property)return!1;const t=e.left,n=e.right,r=parseFloat(t.value),i=parseFloat(n.value),a=gh.has(t.operator),o=gh.has(n.operator),s=fh.has(t.operator),l=fh.has(n.operator);return!!(a&&l||s&&o)&&(a?r:i)<(s?r:i)}(e)?function(e){const t=e.left,n=e.right,r=gh.has(t.operator),i=gh.has(n.operator),a=fh.has(t.operator),o=fh.has(n.operator);let s;if(r&&o)s=t;else{if(!a||!i)return console.warn("Invalid range query structure. Expected one lower bound and one upper bound."),!1;s=n}return!!gh.has(s.operator)||(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>=' operators. Found '${s.operator}' in condition '${s.property} ${s.operator} ${s.value}'. Use '>' or '>=' instead.`),!1)}(e):n(e.left)&&n(e.right)):!("condition"!==e.type||!t(e.property)||!gh.has(e.operator)&&(console.warn(`Mobile-first approach requires '>' or '>=' operators. Found '${e.operator}' in condition '${e.property} ${e.operator} ${e.value}'. Use '>' or '>=' instead.`),1))}return e.conditionalValues.every((e=>n(e.condition)))?e:{state:"invalid",error:"Expected a mobile-first responsive query, instead found one that does not follow mobile-first principles."}}function _h(e,t){if("invalid"===e.state)return e;const n=t?` for property '${t}'`:"";function r(e){return"compound-condition"===e.type?r(e.left)&&r(e.right):"condition"===e.type&&!(!yh(o=e.property)&&(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${o}'.`),1)||(a=e.value,!hh.includes(a)&&("base"===a?console.warn(`Media queries should use valid breakpoints${n}. Found 'base' (use 'base' only as fallback, minimum condition is 'extraSmall'). Use one of '${hh.join("', '")}' instead.`):console.warn(`Media queries should use valid breakpoints${n}. Found '${a}'. Use one of '${hh.join("', '")}' instead.`),1))||(t=e.operator,i=e.value,">="!==t&&(console.warn(`Media queries should use '>=' operator${n}. Found '${t}' (expected '>=' for breakpoint '${i}').`),1)));var t,i,a,o}return e.conditionalValues.every((e=>r(e.condition)))?e:{state:"invalid",error:"Expected a valid media query with breakpoint conditions, instead found invalid property, breakpoints, or operators."}}const bh=xu("ContainerQueryStyle");function Ph({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:i,style:a}=lh({[t]:n},r);if(!i)return null;const o=function(e){if(kh.has(e))return kh.get(e)||null;if("undefined"==typeof document)return null;const t=e.split(" ").filter(Boolean);if(0===t.length)return null;const n=[];for(const i of Array.from(document.styleSheets))try{const e=i.cssRules||i.rules;for(const r of Array.from(e))if(r instanceof CSSStyleRule)for(const e of t)new RegExp(`\\.${e}(?![\\w-])`).test(r.selectorText)&&n.push(r.cssText)}catch{continue}const r=n.length>0?n.join("\n"):null;return kh.set(e,r),r}(i);if(!o)return null;const s=function(e,t,n){const r=e.split("\n"),i=[];for(const a of r){const e=a.match(/^([^{]+)\{([^}]+)\}/);if(e){const r=e[1].trim(),a=Sh(e[2].trim(),n);if(r.includes("[dir=")){const e=r.match(/\[dir="[^"]+"\]/)?.[0];e&&r.match(/\.([^\s[\]]+)/)&&i.push(`${e} .${t}{${a}}`)}else i.push(`.${t}{${a}}`)}}return i.join("")}(o,e,a);return s}const kh=new Map;function Sh(e,t){return e.replace(/var\(--[^)]+\)/g,(e=>{const n=e.match(/var\(([^)]+)\)/)?.[1];return n&&t[n]?t[n]:e}))}function wh(e){if("compound-condition"===e.type){const t=wh(e.left),n=wh(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function Ch(e,t){const{containerQueryProps:n,mediaQueryProps:r,literalProps:i}=o((()=>{const t={},n={},r={};
2for(const[a,o]of Object.entries(e||{}))null!=o&&(cm(o)?t[a]=o:um(o)?n[a]=o:r[a]=o);const i=new Set(Object.keys(n).flatMap((e=>Le(e)??[e])));for(let e=i.size>0;e;){e=!1;for(const[t,a]of Object.entries(r)){if(ze(a))continue;const o=Le(t);if(o?.length&&Eh(o[0],a))continue;const s=o?.length?o:[t];if(s.some((e=>i.has(e)))){n[t]=a,delete r[t];for(const e of s)i.add(e);e=!0}}}return{containerQueryProps:t,mediaQueryProps:n,literalProps:r}}),[e]),{className:a,style:s,styleElement:l}=function(e,t){const n=Iu(void 0,bh),{containerQueryCssStrings:r,fallbackClassName:i,fallbackStyle:a}=o((()=>{const r={},i=[];if(!e)return{fallbackClassName:"",fallbackStyle:{},containerQueryCssStrings:i};for(const[s,l]of Object.entries(e)){if(!cm(l))continue;const e=vh(lm(l));if("invalid"===e.state)continue;r[s]=e.fallbackValue;const a=e.conditionalValues.map((r=>{const i=Ph({cssClassNameSelector:n,property:s,value:r.value,config:t});return i?`${e.responsiveType}${"@container"===e.responsiveType&&e.name?` ${e.name} `:""}${wh(r.condition)}{${i}}`:""})).filter(Boolean).join("");i.push({property:s,cssString:a})}const{className:a,style:o}=lh(r,t);return{containerQueryCssStrings:i,fallbackClassName:a,fallbackStyle:o}}),[t,e,n]),s=r.length>0?h("style",{children:r.map((({cssString:e})=>e)).join("")},n):null;return{className:P(n,i),style:a,styleElement:s}}(n,t),{className:c,style:u}=function(e,t){const{className:n,style:r}=o((()=>{const n={};if(!e)return{className:"",style:{}};for(const[t,r]of Object.entries(e)){if(!um(r)){n[t]=r;continue}const e=_h(lm(r),t);if("invalid"===e.state)continue;const i={base:e.fallbackValue};for(const t of e.conditionalValues){const e=t.condition;"condition"===e.type&&(i[e.value]=t.value)}n[t]=i}return lh(n,t)}),[t,e]);return{className:P(n),style:r}}(r,t),{className:d,style:p}=function(e,t){return o((()=>e&&0!==Object.keys(e).length?lh(e,t,{filterDefaultValues:!0}):{className:"",style:{}}),[t,e])}(i,t);!function(e,t,n){const r=new Set,i=new Set,a=new Set,o=new Set;if(0===Object.keys(e).length&&0===Object.keys(t).length&&0===Object.keys(n).length)return;for(const[c,u]of Object.entries(e))if(Me.includes(c)){const e=Le(c)??[];if(e.length>0&&Eh(e[0],u))continue;for(const t of e)r.add(t)}else{if(Eh(c,u))continue;r.add(c)}for(const[c,u]of Object.entries(t))if(Me.includes(c)){const e=Le(c)??[];if(e.length>0&&Eh(e[0],u))continue;for(const t of e)i.add(t)}else{if(Eh(c,u))continue;i.add(c)}for(const[c,u]of Object.entries(n))if(Me.includes(c)){const e=Le(c)??[];if(e.length>0&&Eh(e[0],u))continue;for(const t of e)a.add(t),o.add(t)}else{if(Eh(c,u))continue;a.add(c)}const s=new Set,l=n=>o.has(n)&&(n in t||n in e);for(const c of r)if(i.has(c)||a.has(c)){if(l(c))continue;s.add(c)}for(const c of i)if(a.has(c)){if(l(c))continue;s.add(c)}s.size>0&&console.warn(`ResponsiveStyle: style property conflicts detected - ${Array.from(s).join(", ")}. These style properties are being set by multiple styling methods (container query, media query, or conditional). Consider avoiding mixing different responsive value types for the same properties.`)}(n,r,i),function(e){const t=Object.keys(e).filter((t=>ze(e[t])));t.length>0&&console.warn(`ResponsiveStyle: conditional values are no longer resolved - ${t.join(", ")}. Convert them to an \`@media\` string or a per-breakpoint object at the component boundary.`)}(i);const m=Object.keys(n).length>0,g=Object.keys(r).length>0;return{className:P(m?a:void 0,g?c:void 0,d),style:{...s,...u,...p},styleElement:l}}function Eh(e,t){const n=Zm[e];return void 0!==n&&t===n}const xh=Xm(Qm(Sm(k((function({ariaBusy:e,ariaHidden:t,ariaLabel:n,ariaLive:r,children:i,className:a,commandFor:o,command:s,href:l,id:c,lang:u,onClick:d,onFocus:p,onMouseEnter:m,target:g,...f},y){const v=Nd().linkComponent,_=op(),b="function"==typeof d?()=>d():void 0,P="function"==typeof p?()=>p():void 0,k="function"==typeof m?()=>m():void 0,S=a??"_1M6e9",w=md(),C=Pm(w,{onClick:b,onFocus:P,onMouseEnter:k}),E=w?.activatorAttributes,x=!(!t&&!_)||void 0,I=x?-1:void 0;return v?h(v,{className:S,"aria-busy":e||void 0,"aria-hidden":x,"aria-label":n,"aria-live":r,href:l,id:c,lang:u,ref:y,tabIndex:I,target:g,...C,...E,...f,children:i}):h("a",{"aria-busy":e||void 0,"aria-describedby":sd({external:"_blank"===g||!1,native:!0}),"aria-label":n,"aria-live":r,"aria-hidden":x,className:S,href:l,id:c,lang:u,ref:y,rel:"_blank"===g?"noopener noreferrer":void 0,tabIndex:I,target:"_blank"===g?g:void 0,...C,...E,...f,children:i})})))));function Ih(){const e=y(Be);if(null==e)throw new we("No theme found in context");return e}function Ah(){const e=Ih();if("undefined"==typeof window)return e.configuration;const t=s();if(null!=t.current&&t.current.theme!==e&&(t.current=void 0),null==t.current){const n=e.configurationSignal,r=new Map,i={};for(const t of Object.keys(e.configuration))Object.defineProperty(i,t,{enumerable:!0,get:()=>(r.has(t)||r.set(t,w((()=>n.value[t]))),r.get(t).value)});
2t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:i}}return t.current.reactiveConfiguration}function Th(e){const t=k((function({disableGlobalBranding:t,...n},r){const{global:{cornerRadius:i}}=Ah(),a=Ve(i),o=t?n:{...n,borderRadius:a??n.borderRadius};return h(e,{...o,ref:r})}));return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}const Nh=yp(Th(Xm(Qm(Sm(k((function({accessibilityLabel:e,accessibilityVisibility:t="visible",background:n="transparent",blockSize:r="auto",border:i="none",borderRadius:a="none",borderStyle:o,borderWidth:s,children:c,className:u,command:d,commandFor:p,controlId:m,disabled:g=!1,display:f="auto",expanded:y,href:v,id:_,inlineSize:k="auto",lang:S,loading:w=!1,maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",onBlur:A,onClick:T,onFocus:N,onPointerDown:L,onPointerEnter:R,onPointerLeave:M,onPointerUp:D,overflow:O="visible",padding:z="none",paddingBlock:B,paddingInline:V,paddingBlockEnd:F,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,target:H="auto",type:$="button",...Y},W){l((()=>{null!=y&&null==m&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')}),[m,y]);const G=op(),J=md(),{className:K,style:Q,styleElement:X}=Ch({backgroundColor:n,blockSize:r,...Fe({border:i,borderStyle:o,borderWidth:s}),borderRadius:a,display:f,inlineSize:k,maxBlockSize:C,maxInlineSize:E,minInlineSize:I,minBlockSize:x,padding:z,paddingBlock:B,paddingBlockEnd:F,paddingBlockStart:U,paddingInline:V,paddingInlineEnd:q,paddingInlineStart:j},{transforms:{display:Zd}}),Z=P("_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw","exclusive"===t&&"_1s82kpb5 _1fragem121",K,"hidden"===O&&"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",G&&"_1s82kpb2 _1fragemz0",u),ee=ip(),te=fm(W),ne=Pm(J,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{N?.()},onMouseEnter:()=>{R?.()},onMouseLeave:()=>{M?.()},onMouseDown:e=>{L&&0===e.button&&L?.()},onMouseUp:()=>{D?.()}}),re=w?"assertive":void 0,ie="hidden"===t||G,ae={className:Z,id:_,lang:S,style:Q,tabIndex:ie?-1:void 0,..._m(J,{"aria-controls":m,"aria-expanded":y}),...ne,...Y};return h(b,{children:[X,h(sp.Provider,{value:!0,children:v&&void 0===p?h(xh,{...ae,href:v,ref:te,ariaBusy:w,ariaHidden:!!ie||void 0,ariaLive:re,ariaLabel:e,target:H,children:c}):h("button",{ref:te,type:p?"button":$,disabled:g||w,form:"submit"===$&&ee?.nested?ee.id:void 0,"aria-busy":w,"aria-hidden":!!ie||void 0,"aria-live":re,"aria-label":e,...ae,children:c})})]})}))))))),Lh="generic",Rh=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 Mh(e,{defaultRole:t=Lh,defaultElement:n="div"}={}){const r=Rh.get(e??t)??Rh.get(t)??Rh.get(Lh);return{Element:r.element??n,role:r.role}}const Dh=vp(Th((function({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignContent:r,alignItems:i,background:a="transparent",backgroundHoverAndFocus:o,blockSize:s="auto",border:l="none",borderColor:c,borderRadius:u="none",borderStyle:d,borderWidth:p,children:m,columnGap:g,display:f="auto",gap:y="none",gridAutoColumns:v,gridAutoFlow:_,gridAutoRows:k,gridTemplateColumns:S="none",gridTemplateRows:w="none",id:C,inlineSize:E="auto",justifyContent:x,justifyItems:I,maxBlockSize:A="none",maxInlineSize:T="none",minBlockSize:N="0",minInlineSize:L="0",overflow:R="visible",padding:M="none",paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,placeContent:U="normal normal",placeItems:q="normal normal",rowGap:j,...H}){const $=lp(),{Element:Y,role:W}=Mh(t,{defaultElement:$?"span":"div"}),{className:G,style:J,styleElement:K}=Ch({gap:y,placeContent:U,placeItems:q,alignContent:r,alignItems:i,backgroundColor:a,backgroundColorHoverAndFocus:o,blockSize:s,...Fe({border:l,borderStyle:d,borderWidth:p}),borderRadius:u,columnGap:g,display:f,gridAutoColumns:v,gridAutoFlow:_,gridAutoRows:k,gridTemplateColumns:S,gridTemplateRows:w,inlineSize:E,justifyContent:x,justifyItems:I,maxBlockSize:A,maxInlineSize:T,minBlockSize:N,minInlineSize:L,padding:M,paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,rowGap:j},{transforms:{blockSize:$d,display:np}});return h(b,{children:[K,h(Y,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:P("_1mrl40q0 _1fragemws","exclusive"===n&&"_1mrl40q2 _1fragem121","hidden"===R&&"_
21mrl40q1 _1fragemup _1fragemv4",G),id:C,role:W,style:J,...H,children:m})]})}))),Oh=["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 zh=1,Bh={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 Vh=["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"],Fh=["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 Uh({interestFor:e,...t}){return e?h(jh,{...t,interestFor:e}):h(qh,{...t})}function qh({accessibilityLabel:e,...t}){const{className:n,children:r}=Hh(t);return h("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const jh=Xm(k((function({accessibilityLabel:e,"aria-describedby":t,id:n,onBlur:r,onClick:i,onFocus:a,onMouseEnter:o,onMouseLeave:s,...l},c){const{className:u,children:d}=Hh(l);return h("span",{role:"img",tabIndex:t?0:void 0,id:n,ref:c,className:P(Bh.InterestActivator,u),"aria-label":e,"aria-labelledby":e?void 0:t,"aria-describedby":e?t:void 0,onBlur:r,onClick:i,onFocus:a,onMouseEnter:o,onMouseLeave:s,children:d})})),{tapToggles:!0});function Hh({type:e,tone:t="auto",color:n="base",size:r="base",display:i="block",className:a}){const{icons:o}=Ah(),s=Nd().inlineIcons??!1;let l;e?l=e:(""===e||console.warn(`"${e}" is not a valid <Icon /> type`),l="empty");const c=Vh.includes(l),u=Fh.includes(l)?"fill":"outline";let d;switch(r){case"small":d="small-100";break;case"large":d="large-100";break;default:d=r}const p=P(Bh.Icon,Bh.toneVariant[t],("auto"===t||"neutral"===t)&&Bh.colorVariant[n],Bh.displayVariant[i],Bh.sizeVariant[d],c&&Bh.mirrored,Bh.fillVariant[u],a);let m=function(e){const t=Te(e);return t in $h?$h[t]:Oh.includes(t)?t:void 0}(l);m||(console.warn(`"${l}" is not a valid <Icon /> type`),m="empty");const g=o[m],f=g??`/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg#${m}`,y=h("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:h("use",{href:f})});return{className:p,children:null!=g||s?h(Xu,{iconUrl:f,fallback:y,allowRelativeUrl:null==g}):y}}const $h={checkmark:"check",close:"x",critical:"alertCircle",error:"xCircle",errorFill:"xCircleFilled",gift:"giftCard",giftFill:"giftCard",hamburger:"menu",hollowCircle:"circle",horizontalDots:"menuHorizontal",infoFill:"infoFilled",list:"listBulleted",magnify:"search",marker:"location",orderBox:"order",pen:"edit",question:"questionCircle",questionFill:"questionCircleFilled",starFill:"starFilled",success:"checkCircle",verticalDots:"menuVertical",warning:"alertTriangle",warningFill:"alertTriangleFilled"};function Yh({message:e,dismiss:t}){const n=Rd();return l((()=>xd({content:e})),[e]),l((()=>{const e=setTimeout(t,5300);return()=>clearTimeout(e)}),[t]),h("span",{className:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120",children:h(Dh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"base",children:[h("span",{children:e}),h(Nh,{onClick:t,accessibilityLabel:n("closeNotification"),children:h(Uh,{type:"x",size:"small",tone:"monochrome"})})]})})}const Wh=_(null);function Gh({children:e,handleToast:t}){const[n,r]=u([]),i=s(0),l=a((e=>{r((t=>t.filter((t=>
2t.id!==e))))}),[]),c=a((()=>(i.current+=1,`toast-message-${i.current}`)),[]),d=o((()=>({setMessages:r,removeMessage:l,createMessageId:c,handleToast:t})),[r,l,c,t]);return h(Wh.Provider,{value:d,children:[e,n.length>0?h(Bu,{children:h(Jh,{children:n.map((({id:e,content:t})=>h(Yh,{message:t,dismiss:()=>l(e)},e)))})}):null]})}function Jh({children:e}){const t=Eu(),n=s(null),r=s(void 0);return d((()=>{const e=n.current;if(!e)return;const i=e.offsetHeight,a=i-(r.current??i);r.current=i,t||!e.animate||a<=0||e.animate([{transform:`translateY(${a}px)`},{transform:"translateY(0)"}],{duration:150,easing:"ease-out"})})),h("div",{ref:n,className:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z",children:e})}function Kh(){const e=y(Wh),{setMessages:t,removeMessage:n,createMessageId:r,handleToast:i}=e??{};return a((e=>{if(!t||!n||!r)throw new we("useToast must be used within Toaster context provider");if("string"!=typeof e||"string"==typeof e&&""===e.trim())return{hide:()=>{}};if(i?.(e))return{hide:()=>{}};const a=r();return t((t=>[...t,{id:a,content:e}])),{hide:()=>n(a)}}),[t,n,r,i])}function Qh(e,t){if(!e)throw new TypeError(t)}function Xh(e){return o((()=>Ue(e)),[])}function Zh(e,t){const n=s(t);n.current=t;const r=s();r.current||(r.current=e.listen(n.current)),l((()=>()=>r.current?.()),[e,n])}const eg="·",tg=150,ng="ASAP",rg=ue("ShippingMethodsContext");function ig(){const e=y(rg);if(null!=e)return e}function ag(){const{observability:e}=pe();return a(((t,n)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:t,attributes:{apiClientId:n.toString()}})}),[e])}const og=()=>je(((e,t)=>{switch(e){case"ignored":if("timeout"===t)return"idle";break;case"idle":if("countryChange"===t)return"debounced";if("otherAddressFieldChange"===t)return"ignored";break;case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}}),"idle"),sg=["streetName","streetNumber","neighborhood","line2"];function lg(e,t){const n=o(og,[e]),r=n.value;Zh(n,(({previousState:e,action:n})=>{"debounced"===e&&"timeout"===n&&t()})),l((()=>{let t=!1;return e.fields.countryCode.subscribe((()=>{t&&(n.value="countryChange"),t=!0}))}),[e.fields.countryCode,n]),l((()=>{if("debounced"===r||"ignored"===r){const e=setTimeout((()=>{n.value="timeout"}),100);return()=>{clearTimeout(e)}}}),[n,r]),l((()=>{let t=!1;const r=Object.keys(e.fields).filter((e=>!["countryCode",...sg].includes(e))).map((r=>e.fields[r].subscribe((e=>{e&&t&&(n.value="otherAddressFieldChange")}))));return t=!0,()=>{r.forEach((e=>e()))}}),[e.fields,n])}function cg(){const{shop:{shippingRatesReloadStrategy:e}}=pe();return a((({countryCode:t,zoneCode:n})=>{try{Qh("string"==typeof t,"Expected a country code");const r=e.get(t);switch(Qh(null!=r,`Could not find a strategy for ${t}`),r.type){case"regional":{const e=Math.max(...r.regions.values());return null==n?e:r.regions.get(n)??e}case"national":return r.strategy}}catch{const t=e.get("ZZ");return"national"===t?.type?t.strategy:qe.Anything}}),[e])}function ug(){const{i18n:e}=pe(),t=new Map;return t.set("year",(t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.year",{count:t}))),t.set("month",(t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.month",{count:t}))),t.set("week",(t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.week",{count:t}))),t.set("day",(t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.day",{count:t}))),(e,n)=>{const r=t.get(e);return r?.(n)||""}}function dg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:t=!1}){return e.value.map((e=>e.value)).reduce(((e,{type:n,id:r,deliveryMethodTypes:i,deliveryMethodHandle:a})=>{const o=["SHIPPING","LOCAL"];if(t&&("ONE_TIME_PURCHASE"!==n||0===i.length||!i.some((e=>o.includes(e)))))return e;const s=$e(n,r);return{...e,[s]:a}}),{})}function pg(e,t){const n=e.value;
2void 0!==t?Object.entries(t).forEach((([e,t])=>{const[r,i]=e.split("-"),a=n.find((e=>{const{type:t,id:n}=e.value;return!(t!==r||i&&n&&he(n)!==i)}));a&&(a.value={...a.value,deliveryMethodHandle:t})})):n.forEach((e=>{e.value={...e.value,deliveryMethodHandle:void 0}}))}function mg(e,t,n){const{parts:r}=me(),i=r.deliveryLines.value;function a(e){return!n||e.deliveryMethodTypes.includes(n)}return i.find((n=>{const r=n.peek(),i=r.deliveryMethodTypes.length>0;return r.type===e&&i&&(!t||r.id===t)&&a(r)}))||i.find((e=>a(e.peek())))}function hg(e){const t=mg(e);return Boolean(t?.fields)}function gg(e,t){const n=mg(e,t);return[n?.fields.deliveryMethodTypes.value||[],a((e=>{n&&(n.value={...n.value,deliveryMethodTypes:e})}),[n])]}function fg({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:n}){const r=mg(e,t,n);return[r?.fields.deliveryMethodHandle.value||void 0,a((e=>{r&&(r.value={...r.value,deliveryMethodHandle:e})}),[r])]}function yg(e,t){const n=mg(e,t);return o((()=>n?.fields.deliveryMethodOptions.value.phone||E(void 0)),[n])}function vg(e,t){const n=mg(e,t);return o((()=>n?.fields.deliveryMethodOptions.value.instructions||E(void 0)),[n])}function _g(e,t){const n="ONE_TIME_PURCHASE"===t?"SUBSCRIPTION":"ONE_TIME_PURCHASE",r=ke().deliveryNext,o=e=>Je(r.value).filter(Ke).find((t=>t.type===e)),{deliveryLines:s}=Ge(),l=i((()=>dg({proposedDeliveryLines:s}))),c=a((e=>{pg(s,{[n]:e})}),[s,n]);return{inverseGroupType:n,inverseGroupDeliveryMethodHandle:l.value,setInverseGroupDeliveryMethodHandle:c,getInverseGroupDeliveryMethodHandle:t=>{const r=e.find((e=>e.handle===t));if(!r)return;if("PICK_UP"===r.methodType){const e=o(n),t=e?.methods.find((e=>"PICK_UP"===e.methodType&&r.title===e.title));return t?.handle}const i=((e,t)=>{const n=o(e),r=n?.methods.find((e=>e.methodType===t));if(r)return r})(n,r.methodType);return i?.handle}}}function bg(){const{parts:e}=me();return[He(e.deliveryLines.peek()),a((t=>{e.deliveryLines.value.forEach((e=>{e.value={...e.value,deliveryMethodTypes:t}}))}),[e.deliveryLines])]}function Pg(){const{parts:e}=me(),{negotiate:t}=Uc(),{i18n:n}=pe(),r=Kh(),i=Ye(),o=ig();return a((({targetDeliveryMethodType:a,merchandiseStableIds:s})=>{const{orphanedMovedToShipping:l,orphanedRemovedFromCartStableIds:c}=We({deliveryLines:e.deliveryLines,merchandiseLines:e.merchandiseLines,targetDeliveryMethodType:a,merchandiseStableIds:s,sellableDeliveryMethodsByStableId:i.value.deliveryMethodsByMerchandise,discountLines:e.discountLines});c.length>0?r(n.translate("stock.removed_from_cart_notice")):l&&r(n.translate("split_delivery.items_moved_to_shipping_toast")),o?.dispatch?.("deliveryMethodChanged"),t({include:["deliveryNext","merchandiseLines"]})}),[e.deliveryLines,e.merchandiseLines,i,e.discountLines,o,t,r,n])}function kg(){const{deliveryLines:e,deliveryMacros:t}=Ge(),{negotiate:n}=Uc(),r=dg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:!0}),i=o((()=>{if(t.value?.length)return Qe(t.value,r)}),[t.value,r]),s=a((async r=>{if(!r||r===i?.id)return;const a=t.value.find((({id:e})=>e===r));return a?(pg(e,a.deliveryMethodHandles),n({include:["contactInfo","shippingAddress","merchandiseLines","deliveryNext"]})):void 0}),[e,t,i,n]);return{selectedMacro:i,setSelectedMacro:s}}function Sg(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=pe(),n="shopPay"===e.current.value,r=t.unique,i=t.visit;return o((()=>{if(n)return"undefined"!=typeof window&&window.ShopPay&&(window.ShopPay.trackingUnique=r,window.ShopPay.trackingVisit=i),{trackingUnique:r,trackingVisit:i}}),[r,i,n])}const wg=ue("CheckoutSheetProtocolContext"),Cg=ue("MobileCheckoutSdkContext");function Eg(){const e=y(wg),t=y(Cg);return null!=e?e:null!=t?t:null}function xg(e){const t=Eg();return function(e,t){return null==e||"MERCHANT"===e&&"checkout_started"===t}(t?.config?.type,e)}function Ig(){const{checkout:e,shop:t}=pe();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(Xe)}function Ag(){const{checkout:e,shop:t}=pe();return Ig()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(Ze))}class Tg extends Rl{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}
2class Ng extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let Lg=null;const Rg=ue("webPixels");function Mg({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:i,thankYouEntrance:a},observability:o,shop:d,mobileCheckoutSdk:p,source:m,router:g}=pe(),f="shopPay"===i.current.value,y=d.hasFlagEnabled(et),v=function(){const e=Pe(),{shop:t,source:n}=pe();return c((()=>{const r=e.current.fields.buyerIdentity.value;return{cart:nu({negotiated:e,shop:t,source:n}),customer:tu(r),shop:ru({shop:t}),purchasingCompany:iu(r)}}))}(),_=Eg(),b=_?.config?.pixelEventsMode,P=n?.configuration?.pixelMode,k=Boolean(n?.isCheckoutKit({includeLegacyCsk:!1})),S="DISABLED"===b||"DISABLED"===P,{checkoutProtocolPresentedSignal:w}=tt(),C=w.value,E=k&&!0===n?.isPreload&&!C,x=Ag()&&"settled"!==a.phase.value&&(g.currentUrlMatches("/thank-you")||g.currentUrlMatches("/processing")&&null!=a.progress&&"cancelled"!==a.progress.phase.value),I=r.webPixelsManager.url;r.webPixelsManager.type;const A=r.webPixelsManagerExtensions.url,T=s(),N=s(),L=s(!1),[R]=u((()=>{const e=new Promise(((e,t)=>{T.current=e,N.current=t}));return e.catch((()=>{})),e})),M={[ut]:d.hasFlagEnabled(ut),[ct]:d.hasFlagEnabled(ct),[lt]:d.hasFlagEnabled(lt),[st]:d.hasFlagEnabled(st),[ot]:d.hasFlagEnabled(ot),[at]:d.hasFlagEnabled(at),[it]:d.hasFlagEnabled(it),[rt]:d.hasFlagEnabled(rt),[nt]:d.hasFlagEnabled(nt)},D=Object.entries(M).filter((([e,t])=>t)).map((([e])=>e)),[O]=u({async publish(e,t,n){try{return(await R).publish(e,t,n)}catch{return!1}},async publishCustomEvent(e,t,n){try{return(await R).publishCustomEvent(e,t,n)}catch{return!1}},async publishDomEvent(e,t,n){try{return(await R).publishDomEvent(e,t,n),{type:"success"}}catch(r){return{type:"error",message:r.message}}},async subscribe(e,t,n){try{return(await R).subscribe(e,t,n)}catch{return()=>!1}},async visitor(e,t){try{return(await R).visitor(e,t),{type:"success"}}catch(n){return{type:"error",message:n.message}}}});return l((()=>{const e=e=>{o.log("web_pixel_manager_init",`WebPixelsProvider init: ${e}`,{outcome:e,shopAppDomain:f},{exportImmediately:"loading"!==e})};if(null===d.webPixelConfigurations)return e("web_pixel_configurations_null");if(!d.storefrontUrl)return e("storefront_url_missing");const r=Boolean(dt(navigator.userAgent));if(r&&!y)return e("shop_mobile_app_context");const i=f||r;if("disabled"===d.webPixelManagerVersion)return e("wpm_version_disabled");const a=i?[]:d.webPixelConfigurations;if(S)return N.current?.(new Ng("Checkout SDK enabled for partner with pixels suppressed")),void e("pixels_suppressed_by_config");if(E||L.current)return void(E&&!L.current&&e("deferred_for_preload"));if(x)return void e("deferred_for_thank_you");if(L.current=!0,e("loading"),"undefined"!=typeof PerformanceMark)try{window.performance.mark("wpm:start")}catch{}const s=p.variant.isStandard(),l=!n?.isFlagshipPartner&&Boolean(n?.isCheckoutSheetKit),c=function({shopAppDomain:e,isNativeShopApp:t,isCheckoutKit:n,isSdkSurface:r}){let i=n?"checkout-kit":"checkout-one";return r&&(i+="-sdk"),t?i+="-native-shop-app":e&&(i+="-shop-app"),i}({shopAppDomain:f,isNativeShopApp:r,isCheckoutKit:k,isSdkSurface:s||l});try{const e=function({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:i,enabledBetaFlags:a=[],surface:o,monorailRegion:s,sriMap:l,managerBaseUrl:c,extensionsUrl:u,apiClientId:d,checkoutToken:p,facebookCapiEnabled:m=!1}){if(Lg)return Lg;const h=parseInt(he(t),10),g=function(){const{modern:e,legacy:t}={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/},n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}(),f="modern"===g?"modern":"legacy",y=`${c}/b${r}${f.substring(0,1)}.js`,v=`${u}/cdn/shopifycloud/web-pixels-manager`,_=document.createElement("script");_.setAttribute("async","true"),_.setAttribute("src",y);const b={shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,browserTarget:g,surface:o,enabledBetaFlags:JSON.stringify(a),hashVersion:r,publish:"all",...null!=d&&{apiClientId:String(d)},...p&&{checkoutToken:p},...i.customer?.id&&{customerId:i.customer.id},facebookCapiEnabled:String(m)};b.trekkieShim="true";for(const k in b)if(Object.prototype.hasOwnProperty.call(b,k))try{_.dataset[k]=String(b[k])}catch{}const P=l[f];return P&&(_.setAttribute("integrity",P),_.setAttribute("crossorigin","anonymous")),Lg=new Promise(((t,r)=>{if(_.onload=()=>
2{if(Boolean(window.Shopify?.analytics?.initialized))return;if(null==window.webPixelsManager||!("init"in window.webPixelsManager))return void r(new Tg("WebPixelManager is not available"));const l=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,surface:o,webPixelsConfigList:n.map((e=>{const t=e.dataSharingAdjustments&&{dataSharingAdjustments:e.dataSharingAdjustments},n=e.integrityHash&&{integrityHash:e.integrityHash};return{configuration:e.configuration,eventPayloadVersion:e.eventPayloadVersion,id:e.idTmp,runtimeContext:e.runtimeContext,scriptVersion:e.scriptVersion,type:e.type,apiClientId:e.apiClientId,privacyPurposes:e.purposes,name:e.name,capabilities:e.capabilities||[],enabledFlags:e.enabledFlags||[],dataSharingState:e.dataSharingState,...t,...n}})),initData:i,enabledBetaFlags:a,monorailRegion:s});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=l.publishCustomEvent,window.Shopify.analytics.initialized=!0,t(l)},_.onerror=()=>{r(new Tg(`Failed to load WebPixelManager runtime from ${y}`))},document.querySelector(`script[src="${_.src}"]`))r(new Tg("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(_)}catch{throw new Tg("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}})),Lg}({storefrontBaseUrl:d.storefrontUrl,shopId:d.id,webPixelConfigurations:a,webPixelManagerVersion:d.webPixelManagerVersion,initData:v,enabledBetaFlags:D,surface:c,sriMap:d.webPixelsManagerSriMap,managerBaseUrl:I,extensionsUrl:A,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:Xc(m)||m.sourceId,facebookCapiEnabled:d.facebookCapiEnabled??!1});let n=!0;e.then((e=>{if(!T.current)throw N.current?.(),new Tg("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined");T.current(e)})).catch((e=>{n=!1,o.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${e?.message}`)})).finally((()=>{o.counter({name:"web_pixel_manager_load",value:1,attributes:{status:n?"success":"failed",surface:c}})}))}catch(u){N.current?.(u),o.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:c}})}}),[E,x]),h(Rg.Provider,{value:O,children:e})}function Dg(){return de(Rg)}const Og=new Map([[6167201,"hydrogen"],[12875497473,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);function zg(e,t,n){const r=new Set([129785,6517121,757165]),i=new Set([3890849,3850711,5198245]);return Og.has(e)?Og.get(e):r.has(e)?"retail":i.has(e)?"shop_app":t===pt.CartPermalink?"permalink":580111===e?"online_store":n}function Bg(){const e=window,t=e?.ShopifyAnalytics?.lib;return t?.trekkie?.defaultAttributes}function Vg({eventName:e,checkoutType:t,walletName:n,progressionStepName:r,redirectSource:i,trackingUnique:o,trackingVisit:s}){const{client:l,checkout:c,consentManager:u,i18n:d,observability:p,userEvents:m,shop:h,source:g}=pe(),{id:f}=h,y=ke().buyerIdentity.value?.customerProfile,v=xg(e),_=Eg(),b=_?.config?.type,P=parseInt(he(f),10),k=l.unstable_getSerialization("apiClientId")??0,S=o??(l.cookies.get("_shopify_y")||void 0),w=s??(l.cookies.get("_shopify_s")||void 0);return a((()=>{const a=u.analyticsProcessingAllowed.value,o=u.marketingAllowed.value,s=Boolean(a||o),l={eventName:e,buyerConsentAnalyticsAllowed:a,buyerConsentMarketingAllowed:o,progressionStepName:r,userToken:S,walletName:n};if(!("checkout_started"===e&&"ShopifyPay"===n||s)||!v)return p.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:e,application:"checkout-web"}}),void p.log("checkout_lifecycle_events_not_emitting_event","checkout_lifecycle_events.not_emitting_event",{logPayload:l});const h="contact_information"===r?1:void 0,f=Fg(g.type),_=f?g.sourceId:void 0,C=c.configuration.profileId.value,E=function({eventName:e,walletName:t,shopId:n,checkoutSessionIdentifier:r="default",checkoutProfileId:i,trackingVisitToken:a,userToken:o,sourceId:s,sourceType:l,customerId:c,apiClientId:u=0,checkoutType:d,currency:p,locale:m,progressionStepName:h,progressionStepNumber:g,redirectSource:f,checkoutProtocolType:y,consentManager:v}){const _=Bg(),b="MERCHANT"===y?{apiName:"mobile_checkout_sdk_merchant",checkoutType:zg(u,f,"api")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:i,eventName:e,checkoutType:zg(u,f),checkoutExperience:t?"wallet":"web",entryPoint:"checkout",checkoutPlatform:"checkout_one",checkoutVersion:[d],walletName:t,apiClientId:u||0,currency:p||_?.currency,shopId:n,customerId:c,sourceId:s,sourceType:l,userToken:o||_?.uniqToken,deprecatedVisitToken:a||_?.visitToken,referrer:_?.referer,userAgent:navigator.userAgent,contentLanguage:m,eventTime:(new Date).toISOString(),progressionStepName:h,progressionStepNumber:g,buyerConsentAnalyticsAllowed:v.analyticsProcessingAllowed.value,buyerConsentSaleOfDataAllowed:v.saleOfDataAllowed.value,buyerConsentMarketingAllowed:v.marketingAllowed.value,...b}}}
2({eventName:e,walletName:n,shopId:P,checkoutSessionIdentifier:g.checkoutSessionIdentifier,checkoutProfileId:C?parseInt(he(C),10):void 0,trackingVisitToken:w,userToken:S,sourceId:_,sourceType:f,customerId:y?.id?parseInt(he(y.id),10):void 0,apiClientId:k,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:r,progressionStepNumber:h,redirectSource:i,checkoutProtocolType:b,consentManager:u}),x=E.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...l,progressionStepNumber:h,"context.sourceType":g.type,"context.sourceId":g.sourceId,checkoutType:t,entryPoint:x}),m.monorailEvent(E),p.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:e,checkoutType:g.type,isWallet:n?"true":"false",...n?{walletName:n}:{}}})}),[e,r,S,n,P,g,c.configuration.profileId,w,y?.id,k,t,d,i,p,m,v,b,u])}function Fg(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 Ug(e){return Vg({eventName:"checkout_progression",checkoutType:pe().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,progressionStepName:"contact_information"})}function qg(e,t,n,r){return Vg({eventName:"checkout_started",checkoutType:pe().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var jg=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(jg||{});class Hg{constructor({observability:e,userEvents:t,shopPay:n,isShopPayActive:r,router:i,consentManager:a,shouldEmitEvent:o=!0,context:s,target:l}){this.acceptableEventType=new Set(["pageViewed","sectionComplete","shippingMethodsFilled","sectionInteraction","dom_clicked"]),this.#l=!0,this.#c=e,this.#u=t,this.#d=n,this.#p=r,this.#m=i,this.#h=a,this.#l=o,this.#g=s,this.#f=l}#c;#u;#d;#p;#m;#h;#l;#g;#f;willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:jg.Lifecycle,payload:t}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}transmitImmediately(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:jg.Lifecycle,payload:t},{exportImmediately:!0}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}#_(e){const{context:t,type:n}=e;this.#g=t,this.#f=mt(this.#b(t),{isShopPayActive:this.#p,shopPay:this.#d});const r=this.#P(e.timestamp);if(!r)return null;if(this.#k()){if("pageViewed"===n){if(this.#S()){const[e,t]=this.#w("contact");return{...r,progressionStepName:e,progressionStepNumber:t}}if(this.#C()){const[e,t]=this.#w("review");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("shippingMethodsFilled"===n){const[e,t]=this.#w("shipping");return{...r,progressionStepName:e,progressionStepNumber:t,...this.#E()}}if("sectionInteraction"===n&&"payment"===e.section){const[e,t]=this.#w("payment");return{...r,progressionStepName:e,progressionStepNumber:t}}
2if("dom_clicked"===n){if("summary_pay_button"===e.element.id){if(this.#g.reviewPageRequired){const[e,t]=this.#w("review_order_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}{const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("review_pay_button"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}if(this.#x()){if("pageViewed"===n&&this.#I()){const[e,t]=this.#w(this.#g.step);return{...r,progressionStepName:e,progressionStepNumber:t,..."shipping"===e?this.#E():{}}}if("dom_clicked"===n){if("payment_go_to_next_step"===e.element.id){const[e,t]=this.#w(this.#g.reviewPageRequired?"review_order_clicked":"pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}if("review_go_to_next_step"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}return null}#b(e){const t=this.#m.currentUrl.value;return e.pathname?new URL(e.pathname,t):t}#P(e){if(!this.#g)return null;const t=Fg(this.#g.sourceType),n=t?this.#g.sourceId:void 0;return{userToken:this.#g.userToken,apiClientId:this.#g.apiClientId,sourceId:n,sourceType:t,currency:this.#g.currency,shopId:parseInt(he(this.#g.shopId),10),checkoutChainToken:this.#g.checkoutToken,checkoutProfileId:this.#g.checkoutProfileId,checkoutExperience:"web",checkoutPlatform:"checkout_one",eventName:"checkout_progression",deprecatedVisitToken:this.#g.trackingVisit,requestId:this.#g.requestId,checkoutVersion:[this.#k()?"one_page":"three_page",this.#g.workerVersion,this.#g.serverHandling],checkoutType:zg(this.#g.apiClientId),entryPoint:void 0,eventTime:e.toISOString(),buyerConsentAnalyticsAllowed:this.#A(),buyerConsentSaleOfDataAllowed:this.#T(),buyerConsentMarketingAllowed:this.#N()}}#y(e){const t=e.context.consent;return t?(n=t,Boolean(n.analyticsProcessingAllowed||n.marketingAllowed)):Boolean(this.#A()||this.#N());var n}#A(){return this.#h.analyticsProcessingAllowed.value}#T(){return this.#h.saleOfDataAllowed.value}#N(){return this.#h.marketingAllowed.value}#w(e){const{shippingRequired:t,reviewPageRequired:n}=this.#g||{};let r=2;t&&(r=3);let i=r+1;n&&(i=r+3);const a=r+1;switch(e){case"information":case"contact":case"deliveryAddress":return["contact_information",1];case"shipping":case"delivery":return["shipping",2];case"payment":return["payment",r];case"pay_now_clicked":return["pay_now_clicked",i];case"review_order_clicked":return["review_order_clicked",a];case"review":return["review",t?5:4];default:return[void 0,void 0]}}#k(){return"c1_redesign"===this.#g?.sourceDesign}#x(){return"c1_legacy"===this.#g?.sourceDesign}#C(){return this.#f&&/review/.test(this.#f)}#I(){return["information","shipping","payment","review"].some((e=>this.#f&&new RegExp(e).test(this.#f)))}#S(){return this.#f&&/information/.test(this.#f)}#E(){return this.#g?{shippingMacroCostLocal:String(this.#g.selectedDeliveryMacro?.cost?.amount),shippingMacroList:this.#g.deliveryMacros?.map((({id:e})=>e)),numDeliveryLines:[this.#g.deliveryLines?.filter((({type:e})=>"ONE_TIME_PURCHASE"===e)).length||0,this.#g.deliveryLines?.filter((({type:e})=>"SUBSCRIPTION"===e)).length||0],shippingMacroSelected:this.#g?.selectedDeliveryMacro?.id}:{}}#v(e,t){const n={buyerConsentAnalyticsAllowed:this.#A(),buyerConsentMarketingAllowed:this.#N()};e&&t?this.#c.log("buyer_progression_events_adapter_event_transmitted","Emitting checkout lifecycle event",{...n,progressionStepName:t.progressionStepName,progressionStepNumber:t.progressionStepNumber,userToken:t.userToken,"context.sourceType":this.#g?.sourceType,"context.sourceId":this.#g?.sourceId,"context.apiClientId":this.#g?.apiClientId}):this.#c.log("buyer_progression_events_adapter_event_not_transmitted","Not emitting checkout lifecycle event",n)}}class $g extends Error{constructor(e){super(`Unknown event type: ${e}`),this.name="UnknownEventTypeError"}}function Yg(e){return{shopId:he(e.shopId),checkoutToken:e.checkoutSessionIdentifier?he(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?he(e.customerId):void 0}}function Wg(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return function(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return function(e,t){const n=ht(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:he(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?he(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:Yg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return function(e,t){const n=ht(e.extensionTarget);
2return{event:{...e,appId:he(e.appId),extensionId:e.extensionId?he(e.extensionId):void 0,extensionTarget:n},context:Yg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_FETCH":return function(e,t){const n=ht(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:he(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?he(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:Yg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new $g(e.type)}}(e,t);case"shopify.event.BuyerEvent":return function(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:Yg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":return function(e,t){return{event:e,context:Yg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new $g(e.eventTypeName)}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class Gg{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError"]),this.#u=e.userEvents,this.#L=e.source}#u;#L;willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){const{context:t}=e,n=Xc(this.#L),r=parseInt(he(t.shopId),10),i={pageUrl:t.href??window.location.href,shopId:r,checkoutToken:n?he(n):"",eventName:e.type,userToken:t.userToken};if("alertDisplayed"===e.type){const{target:t,value:n,errorType:r,message:a}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...i,errorTarget:t,errorValue:n??void 0,errorType:r,errorMessage:a}})}if("uiExtensionError"===e.type){const{apiVersion:r,appId:a,appName:o,appVersion:s,extensionName:l,placementReference:c,extensionTarget:u,trace:d,code:p,message:m}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...i,extensionApiVersion:r,extensionAppId:a,extensionAppName:o??"",extensionAppVersion:s,extensionName:l,extensionPlacementReference:c??"",errorTarget:u,errorTrace:d??"",errorType:p,errorMessage:m}}),"local"!==e.extensionType&&this.#u.refineryEvent(Wg({...void 0===e.placementReference?{extensionTarget:e.extensionTarget,placementReference:void 0}:{extensionTarget:e.extensionTarget,placementReference:e.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_ERROR",apiVersion:e.apiVersion,appId:e.appId,appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId,registrationId:e.registrationId,message:e.message,schemaVersion:1,context:e.context},{shopId:t.shopId,checkoutSessionIdentifier:n,customerId:t.customerId}))}}}const Jg="checkout_c1_extension_skeleton_dimensions/3.4";class Kg{constructor(e,t,n=!0){this.client=e,this.userEvents=t,this.shouldEmitEvent=n}transmit(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:Jg,payload:this.mapEventToMonorailSchema(e)}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}willAccept(e){return"extensionDimension"===e.type}transmitImmediately(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:Jg,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}mapEventToMonorailSchema(e){const{context:t,extension:n}=e;return{userToken:t.userToken,customerId:t.customerId,shopId:parseInt(he(t.shopId),10),sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,extensionInstanceId:e.extensionInstanceId,step:e.page,pageLoadId:t.pageLoadId,extensionId:n.extensionId,extensionApiClientId:n.appId,extensionRegistrationId:n.registrationId,extensionType:n.type,extensionPoint:n.extensionPoint.target,extensionPlacementReference:n.placementReference,extensionWidth:e.width,extensionHeight:e.height,viewportWidth:e.viewportWidth,viewportHe
2ight:e.viewportHeight,extensionPositionX:e.positionX,extensionPositionY:e.positionY,publicIdentifier:e.targetPublicIdentifier||e.publicIdentifier,targetPublicIdentifier:e.targetPublicIdentifier,skeletonHeight:e.skeletonHeight,countryCode:e.countryCode,configurationRecordId:t.checkoutProfileId}}}const Qg=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"]),Xg=new Set([...Qg,"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 Zg{#c;#u;#L;constructor(e){this.#c=e.observability,this.#u=e.userEvents,this.#L=e.source}willAccept(e){return"extensionFetchCall"===e.type}transmit(e){if(!this.willAccept(e))return;const t=e,n=this.#R(t.httpStatus),r="registrationId"in t.extension?t.extension.registrationId:void 0,i=null!=r&&Xg.has(r),a={destination:t.destination,isHighValueExtension:i,...n&&{http_status_bucket:n},...t.errorType&&{error_type:t.errorType}},o=t.duration??0;if(this.#c.histogram({name:"extension_fetch_call_duration",value:o,unit:"ms",attributes:a}),i&&"type"in t.extension&&"registrationId"in t.extension&&("persisted"===t.extension.type||"global"===t.extension.type)&&this.#c.log("extension_fetch_call_duration","Extension fetch call duration",{value:o,unit:"ms",appId:t.extension.appId,extensionRegistrationId:t.extension.registrationId,...a}),"local"!==t.extension.type&&"storefront"!==t.destination){const e=Xc(this.#L);this.#u.refineryEvent(Wg({eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_FETCH",apiVersion:t.extension.apiVersion,appId:t.extension.appId,appApiKey:t.extension.appApiKey,appVersion:t.extension.version,extensionId:t.extension.extensionId,registrationId:t.extension.registrationId,extensionTarget:t.extension.extensionPoint.target,placementReference:t.extension.placementReference,durationMs:t.duration,httpStatus:t.httpStatus,httpMethod:t.httpMethod,requestUrl:t.requestUrl,context:t.context},{shopId:t.context.shopId,checkoutSessionIdentifier:e,customerId:t.context.customerId}))}}transmitImmediately(e){this.transmit(e)}#R(e){if(void 0!==e)return String(100*Math.floor(e/100))}}class ef{#L;#u;constructor(e){this.#L=e.source,this.#u=e.userEvents}willAccept(e){if("extensionLifecycle"!==e.type)return!1;const{extension:t,phase:n}=e;return("mountStart"===n||"mountSuccess"===n||"mountError"===n)&&null!=t}transmit(e){if(!this.willAccept(e))return;const{extension:t,mountId:n}=e,r=Xc(this.#L),i={...void 0===t.placementReference?{extensionTarget:t.extensionPoint.target,placementReference:void 0}:{extensionTarget:t.extensionPoint.target,placementReference:t.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",apiVersion:t.apiVersion,appId:t.appId,appApiKey:t.appApiKey,appVersion:t.version,extensionId:t.extensionId,mou
2ntId:n,registrationId:t.registrationId,schemaVersion:1,context:e.context};let a;var o;a="mountStart"===e.phase?{...i,type:"UI_EXTENSION_MOUNT_START"}:{...i,type:"UI_EXTENSION_MOUNT_END",durationMs:e.duration??0,...e.error?.name&&{failureErrorName:e.error.name},mountOutcome:"mountSuccess"===e.phase?"SUCCESS":(o=e.error,o?.name&&gt(o.name)?"APP_FAILURE":"OTHER_FAILURE")},this.#u.refineryEvent(Wg(a,{shopId:e.context.shopId,checkoutSessionIdentifier:r,customerId:e.context.customerId}))}}const tf=["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"],nf=Object.values({updateAttribute:"updateAttribute",removeAttribute:"removeAttribute",addCartLine:"addCartLine",updateCartLine:"updateCartLine",removeCartLine:"removeCartLine",addDiscountCode:"addDiscountCode",removeDiscountCode:"removeDiscountCode",addGiftCard:"addGiftCard",removeGiftCard:"removeGiftCard",updateMetafield:"updateMetafield",removeMetafield:"removeMetafield",updateCartMetafield:"updateCartMetafield",removeCartMetafield:"removeCartMetafield",updateNote:"updateNote",removeNote:"removeNote",updateShippingAddress:"updateShippingAddress",updatePaymentMethodAttributes:"updatePaymentMethodAttributes",redeemableAddChange:"redeemableAddChange",changeVisitorConsent:"changeVisitorConsent"}),rf=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...nf.flatMap((e=>[`${e}Start`,`${e}Success`,`${e}Error`])),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"];class af{constructor(){this.type="extensionBuyerJourneyBlock"}map(e){if(e.type!==this.type)return;const t=e.extension.registrationId;return{type:"counter",name:"extension_buyer_journey_block_event",value:1,attributes:{isHighValueExtension:null!=t&&Xg.has(t)}}}}class of{constructor(){this.type="extensionInteraction"}map(e){if(e.type!==this.type)return;let t=e.interaction;rf.includes(t)||(t="unknownEvent");const n=e.error?Sc(e.error):void 0;return null==e.duration?{type:"counter",name:"extension_interaction_count_event",value:1,attributes:{event_name:t,validation_error:n}}:{type:"histogram",name:"extension_interaction_distribution_event",value:e.duration,attributes:{event_name:t,validation_error:n}}}}class sf{constructor(){this.type="extensionLifecycle"}map(e){if(e.type!==this.type)return;if(tf.includes(e.phase))return;const t=e.extension?.registrationId,n={step:e.phase,checkoutType:zg(e.context.apiClientId),isRemoteDom:!!e.extension?.apiVersion&&lc(e.extension?.apiVersion),isHighValueExtension:null!=t&&Xg.has(t)};return void 0!==e.error&&(n.error=Sc(e.error)),null==e.duration?{type:"counter",name:"extension_lifecycle_count_event",value:1,attributes:n}:null!=e.duration?{type:"histogram",name:"extension_lifecycle_distribution_event",value:e.duration,attributes:n}:void 0}}class lf{constructor(e){this.client=e}#M=new Map([new af,new of,new sf].map((e=>[e.type,e])));willAccept(e){return this.#M.has(e.type)}transmit(e){const t=this.#D(e);if(!t)return;const{name:n,value:r,attributes:i,unit:a,type:o}=t;switch(o){case"histogram":this.client.histogram({name:n,value:r,attributes:i,unit:a});break;case"gauge":this.client.gauge({name:n,value:r,attributes:i,unit:a});break;case"counter":this.client.counter({name:n,value:r,attributes:i,unit:a})}}transmitImmediately(e){this.transmit(e)}#D(e){const t=this.#M.get(e.type);return t?.map(e)}}var cf=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(cf||{});function uf(e){return function(e){return e.replace(/([a-z])([A-Z]+)/g,((e,t,n
2)=>`${t} ${n}`)).replace(/([A-Z])([A-Z]+)([^a-zA-Z0-9]*)$/,((e,t,n,r)=>t+n.toLowerCase()+r)).replace(/([A-Z]+)([A-Z][a-z])/g,((e,t,n)=>`${t.toLowerCase()} ${n}`))}(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map((e=>e.toLowerCase())).join("_")}class df{constructor(e,t=!0){this.client=e,this.shouldEmitEvent=t,this.acceptableEventType=new Set(["extensionLifecycle","extensionInteraction","extensionUiInteraction","extensionBuyerJourneyBlock","extensionFetchCall","click","change","inventoryPriceChange","autofill","impression","moreShippingOptions","deliveryMacroInteraction","splitShipAndPickupIntent"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:cf.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:cf.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}commonExtensionEventFields(e){return null===e.extension?{}:{extensionId:e.extension.extensionId,extensionApiClientId:e.extension.appId,extensionRegistrationId:e.extension.registrationId,extensionPublicIdentifier:e.extension.publicIdentifier,extensionTargetPublicIdentifier:e.extension.targetPublicIdentifier,extensionType:e.extension.type,extensionPoint:e.extension.extensionPoint.target,extensionPlacementReference:e.extension.placementReference,section:e.section}}mapEventToMonorailSchema(e){const{context:t,timestamp:n,type:r}=e,i={frontendEventTimestampEpochMs:n.getTime(),userToken:t.userToken,customerId:t.customerId,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,checkoutProfileId:t.checkoutProfileId,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,identityProvider:t.identityProvider,sourceDesign:t.sourceDesign,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,frontendEventTimeZone:t.frontendEventTimeZone,companyContactId:t.companyContactId,companyLocationId:t.companyLocationId,checkoutToDraft:t.checkoutToDraft,editableShippingAddress:t.editableShippingAddress,payNowOnly:t.payNowOnly,clientIp:t.clientIp,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion,serverRendered:t.serverRendered,clientHydrated:t.clientHydrated,pageLoadId:t.pageLoadId};switch(r){case"change":{const t="tel"===e.element.type||"email"===e.element.name?"contact":e.element.name;return{...i,eventName:(t?`${uf(t)}_`:"")+"field_value_changed",eventType:`${e.element.type?`${e.element.type}_`:""}${e.element.tagName.toLowerCase()}_change`,fieldValue:e.element.value,labelValue:e.element.label,section:e.section}}case"click":return{...i,eventName:(e.element.textContent?`${uf(e.element.textContent)}_`:"")+"clicked",eventType:`${e.element.tagName.toLowerCase()}_click`,labelValue:e.element.label,section:e.section,identityProvider:e.identityProvider};case"autofill":return{...i,eventName:`${uf(e.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${uf(e.source)}_autofill`,section:e.section};case"extensionLifecycle":{const t=e=>{switch(e){case"mountError":return"extension_mount_failed";case"mountStart":return"extension_mount_started";case"mountSuccess":return"extension_mount_ended";case"sandboxIframeLoadEnd":return"extension_sandbox_iframe_load_ended";case"postPurchaseIframeLoadEnd":return"extension_post_purchase_iframe_load_ended";case"sandboxJsFetchEnd":return"extension_sandbox_js_fetch_ended";case"sandboxJsFetchPostPurchaseEnd":return"extension_sandbox_js_fetch_post_purchase_ended";case"sandboxJsFetch2023_04End":return"extension_sandbox_js_fetch_2023_04_ended";case"sandboxJsFetch2025_07End":return"extension_sandbox_js_fetch_2025_07_ended";case"sandboxPolyfillFetchEnd":return"extension_sandbox_polyfill_fetch_ended";case"sandboxJsEvalEnd":return"extension_sandbox_js_eval_ended";case"sandboxJsEval2025_07End":return"extension_sandbox_js_eval_2025_07_ended";case"sandboxJsEval2023_04End":return"extension_sandbox_js_eval_2023_04_ended";case"partnerJsFetchEnd":return"extension_partner_js_fetch_ended";case"partnerJsEvalEnd":return"extension_partner_js_eval_ended";case"partnerJsExecEnd":return"extension_partner_js_exec_ended";case"apiObjectEnd":return"extension_api_object_ended";case"apiRead":return"extension_api_read";case"appMetafieldsLoadEnd":return"extension_app_metafields_load_ended";case"jsLoadingEnd":return"extension_js_loading_ended";case"executionEnd":return"extension_execution_ended";case"skeletonEnd":return"extension_skeleton_ended";case"visible":return"extension_visible";case"buyerUsable":return"extension_buyer_usable";case"waitTimeAfterExecution":return"extension_wait_time_after_execution";case"checkoutProfileChangeDestroy":return"extension_destroyed_by_checkout_profile_change";case"timeToFirstMeaningfulCheckoutInteraction":return"extension_time_to_first_meaningful_checkout_interaction";case"timeToSettleEnd":return"extension_time_to_settle_ended";default:return`extension_${e}`}};return{...i,...void 0!==e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...void 0!==e.eventValue&&{eventValue:e.eventValue.toString()},...void 0!==e.apiPropertyName&&{eventValue:e.apiPropertyName},...this.commonExtensionEventFields(e),eventName:t(e.phase),eventType:"extension_lifecycle",step:e.page,extensionInstanceId:e.instanceId,...e.mountId&&{mountId:e.mountId},...void 0!==e.ttsCompletionReason&&{extensionTtsCompletionReason:e.ttsCompletionReason}
2,...void 0!==e.ttsRenderObserved&&{extensionTtsRenderObserved:e.ttsRenderObserved},...void 0!==e.ttsRequestCount&&{extensionTtsRequestCount:e.ttsRequestCount},initialLoad:e.initialPageLoad,transferredBundleSize:e.transferredBundleSize,bundleSize:e.bundleSize,validationErrors:e.error?[kc(e.error)]:[]}}case"extensionFetchCall":return{...i,...this.commonExtensionEventFields(e),eventName:e.errorType?"extension_network_call_errored":"extension_network_call_ended",eventType:"extension_lifecycle",frontendEventsTimeDifferenceMs:Math.round(e.duration),fetchDestination:e.origin,fetchHttpStatus:e.httpStatus,fetchErrorType:e.errorType};case"extensionBuyerJourneyBlock":return{...i,...this.commonExtensionEventFields(e),eventName:"extension_buyer_journey_blocked",eventType:"extension_buyer_journey_block_progress",eventValue:e.reason,validationErrors:e.validationErrors.map((e=>JSON.stringify(e)))};case"extensionInteraction":{const t=e=>{switch(e){case"updateNoteStart":return"note_update_started";case"updateNoteSuccess":return"note_update_succeeded";case"updateNoteError":return"note_update_errored";case"removeNoteStart":return"note_remove_started";case"removeNoteSuccess":return"note_remove_succeeded";case"removeNoteError":return"note_remove_errored";case"updateMetafieldStart":return"metafield_update_started";case"updateMetafieldSuccess":return"metafield_update_succeeded";case"updateMetafieldError":return"metafield_update_errored";case"removeMetafieldStart":return"metafield_remove_started";case"removeMetafieldSuccess":return"metafield_remove_succeeded";case"removeMetafieldError":return"metafield_remove_errored";case"updateCartMetafieldStart":return"cart_metafield_update_started";case"updateCartMetafieldSuccess":return"cart_metafield_update_succeeded";case"updateCartMetafieldError":return"cart_metafield_update_errored";case"removeCartMetafieldStart":return"cart_metafield_remove_started";case"removeCartMetafieldSuccess":return"cart_metafield_remove_succeeded";case"removeCartMetafieldError":return"cart_metafield_remove_errored";case"updateAttributeStart":return"attribute_update_started";case"updateAttributeSuccess":return"attribute_update_succeeded";case"updateAttributeError":return"attribute_update_errored";case"removeAttributeStart":return"attribute_remove_started";case"removeAttributeSuccess":return"attribute_remove_succeeded";case"removeAttributeError":return"attribute_remove_errored";case"addCartLineStart":return"cart_line_add_started";case"removeCartLineStart":return"cart_line_remove_started";case"updateCartLineStart":return"cart_line_update_started";case"addCartLineSuccess":return"cart_line_add_succeeded";case"addCartLineError":return"cart_line_add_errored";case"removeCartLineSuccess":return"cart_line_remove_succeeded";case"removeCartLineError":return"cart_line_remove_errored";case"updateCartLineError":return"cart_line_update_errored";case"updateCartLineSuccess":return"cart_line_update_succeeded";case"addDiscountCodeStart":return"discount_code_add_started";case"addDiscountCodeSuccess":return"discount_code_add_succeeded";case"addDiscountCodeError":return"discount_code_add_errored";case"removeDiscountCodeStart":return"discount_code_remove_started";case"removeDiscountCodeSuccess":return"discount_code_remove_succeeded";case"removeDiscountCodeError":return"discount_code_remove_errored";case"addGiftCardStart":return"gift_card_add_started";case"removeGiftCardStart":return"gift_card_remove_started";case"addGiftCardSuccess":return"gift_card_add_succeeded";case"removeGiftCardSuccess":return"gift_card_remove_succeeded";case"addGiftCardError":return"gift_card_add_errored";case"removeGiftCardError":return"gift_card_remove_errored";case"getSessionToken":return"session_token_retrieved";case"getSessionTokenError":return"session_token_retrieval_errored";case"getSessionTokenCached":return"cached_session_token_retrieved";case"storefrontApiTokenRefresh":return"storefront_api_token_refreshed";case"storefrontApiQueryStart":return"storefront_api_query_started";case"storefrontApiQueryError":return"storefront_api_query_errored";case"storefrontApiQuerySuccess":return"storefront_api_query_succeeded";case"storefrontResponseParseError":return"storefront_response_parse_errored";case"updateShippingAddressStart":return"shipping_address_update_started";case"updateShippingAddressSuccess":return"shipping_address_update_succeeded";case"updateShippingAddressError":return"shipping_address_update_errored";case"buyerJourneyInterceptor":return"buyer_journey_intercept_ran";case"redeemableAddChangeStart":return"redeemable_add_started";case"redeemableAddChangeSuccess":return"redeemable_add_succeeded";case"redeemableAddChangeError":return"redeemable_add_errored";case"updatePaymentMethodAttributesStart":return"payment_method_attributes_change_started";case"updatePaymentMethodAttributesSuccess":return"payment_method_attributes_change_succeeded";case"updatePaymentMethodAttributesError":return"payment_method_attributes_change_errored";case"changeVisitorConsentStart":return"visitor_consent_change_started";case"changeVisitorConsentSuccess":return"visitor_consent_change_succeeded";case"changeVisitorConsentError":return"visitor_consent_change_errored";case"marketDriverChangeShippingAddressCountryCode":return"market_driver_change_shipping_address_country_code";default:return"unknown_event"}};return{...i,...e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...this.commonExtensionEventFields(e),eventName:`extension_${t(e.interaction)}
2`,eventType:"extension_interaction",validationErrors:e.error?[kc(e.error)]:[],extensionInstanceId:e.extensionInstanceId,initialLoad:e.initialLoad,...e.eventId&&{eventValue:e.eventId},...void 0!==e.throttleCounter&&{throttleCounter:e.throttleCounter}}}case"extensionUiInteraction":{const t=e=>{switch(e){case"modalOpen":return"modal_opened";case"modalClose":return"modal_closed";case"modalRender":return"modal_rendered";case"mapRender":return"map_rendered";case"sheetOpen":return"sheet_opened";case"sheetClose":return"sheet_closed";case"sheetRender":return"sheet_rendered";case"announcementExpanded":return"announcement_expanded";case"announcementCollapsed":return"announcement_collapsed";case"announcementDismissedFromHost":return"announcement_dismissed_from_host";case"announcementDismissedFromExtension":return"announcement_dismissed_from_extension"}},n=e=>{switch(e){case"modalOpen":case"modalClose":case"sheetOpen":case"sheetClose":case"announcementExpanded":case"announcementCollapsed":case"announcementDismissedFromHost":case"announcementDismissedFromExtension":return"component_buyer_interaction";case"modalRender":case"sheetRender":case"mapRender":return"component_lifecycle"}};return{...i,componentType:e.componentType,componentInstanceId:e.componentInstanceId,...this.commonExtensionEventFields(e),eventName:t(e.interaction),eventType:n(e.interaction)}}case"impression":return{...i,eventType:"impression",eventName:`${e.impressionType}_impression`,eventValue:e.eventValue,impressionFeatures:e.impressionFeatures,section:e.section,identityProvider:e.identityProvider,..."delivery_macros"===e.impressionType?pf(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[]):{}};case"moreShippingOptions":return{...i,eventType:"more_shipping_options",eventName:e.subEvent,...pf(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"deliveryMacroInteraction":return{...i,eventType:"delivery_macro_interaction",eventName:e.subEvent,...pf(t.selectedDeliveryMacro,t.deliveryMacros||[],t.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 pf(e,t,n){return{shippingNumSplits:n?.length,splitShippingDeliveryGroups:JSON.stringify(n.map((e=>({id:e.id,numItems:e.targetMerchandiseLines?.length??0,productItemIds:e.targetMerchandiseLines?.map((e=>e.id?he(e.id):""))??[],deliveryMethods:e.methods.map((e=>({title:e.title,handle:e.handle,cost:e.cost.amount,deliveryEstimate:e.deliveryPromisePresentmentTitle?.long})))})))),splitShippingMacros:JSON.stringify(t.map((t=>({selected:e?.id===t.id,handle:t.id,cost:t.cost.amount,title:t.title,methods:Object.entries(t.deliveryMethodHandles).map((([e,t])=>({deliveryGroup:e,deliveryMethod:t})))}))))}}class mf{constructor(e){this.client=e,this.acceptableEventType=new Set(["receiptError","paymentError","violationError","addressError"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}mapEventToMonorailSchema(e){const{context:t,type:n}=e,r={userToken:t.userToken,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,sourceDesign:t.sourceDesign,requestId:t.requestId,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion};switch(n){case"receiptError":return{...r,errorMessage:e.error.message||"",eventName:"receipt_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"addressError":return{...r,errorMessage:e.error.message||"",eventName:"address_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"paymentError":return{...r,errorMessage:e.error.message||"",eventName:"payment_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"violationError":return{...r,errorMessage:e.error.message||"",eventName:"validation_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""}}return{...r,errorMessage:"Unknown error",eventName:"error",eventType:"interaction_error",errorReason:"",silencedViolation:!1,errorOrigin:"unknown",errorType:"unknown"}}}class hf{constructor(e,t=!0){this.observability=e,this.shouldEmitEvent=t,this.acceptedTypes=new Set(["click"])}willAccept(e){return this.acceptedTypes.has(e.type)}transmit(e){if(!this.shouldEmitEvent)return;const t=this.createDescriptiveLogName(e),{context:n,...r}=e;this.observability.log("telemetry_events_adapter_event_transmitted",t,r)}createDescriptiveLogName(e){const{section:t,type:n,element:r}=e;return[t,n,r.tagName.toLowerCase()].join("_")}}class gf{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError","pageViewed","sectionComplete","shippingMethodSelected","shippingMethodsFilled","sectionInteraction","pageSubmit","dom_
2clicked","dom_input_focused","dom_input_blurred","dom_input_changed"]),this.webPixels=e.webPixels}willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){"pageViewed"===e.type&&this.webPixels.publish("page_viewed",{});const t=function(e){return JSON.stringify(e,((e,t)=>"timestamp"===e||"webPixelCheckout"===e?"":t))}(e);if(t!==this.mostRecentEvent){if(this.mostRecentEvent=t,"shippingMethodsFilled"===e.type||"shippingMethodSelected"===e.type){const t=ff(e),n=(t?.delivery?.selectedDeliveryOptions??[]).some((e=>"shipping"===e.type));t&&n&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("sectionComplete"===e.type){const t=ff(e);if(t)switch(e.section){case"contact":this.webPixels.publish("checkout_contact_info_submitted",{checkout:t});break;case"deliveryAddress":this.webPixels.publish("checkout_address_info_submitted",{checkout:t})}}if("pageSubmit"===e.type){const t=ff(e);t&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("alertDisplayed"===e.type&&this.webPixels.publish("alert_displayed",{alert:{target:e.target,value:e.value,type:e.errorType,message:e.message}}),"uiExtensionError"===e.type&&this.webPixels.publish("ui_extension_errored",{error:{apiVersion:e.apiVersion,appId:e.appId,appName:e.appName??"",appVersion:e.appVersion,extensionName:e.extensionName,message:e.message,placementReference:e.placementReference??null,extensionTarget:e.extensionTarget,trace:e.trace??"",type:e.code}}),function(e){return e.type.startsWith("dom")}(e))if(function(e){return"dom_clicked"===e.type}(e))this.webPixels.publishDomEvent("clicked",{...ft(e,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const t=e.type.replace("dom_","");this.webPixels.publishDomEvent(t,{element:e.element})}}}}function ff(e){return Su({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}const yf=ue("EventHubContext");function vf({children:e}){const{observability:t,userEvents:n,shopPay:r,checkout:{identity:i},source:a,router:s,consentManager:l}=pe(),c="shopPay"===i.current.value,u=Dg(),d=xg(),p=o((()=>{const e=[new df(n,d),new mf(n),new lf(t),new Kg(t,n,d),new Zg({observability:t,userEvents:n,source:a}),new ef({userEvents:n,source:a}),new hf(t,d),new gf({webPixels:u}),new Hg({observability:t,userEvents:n,shopPay:r,isShopPayActive:c,router:s,consentManager:l}),new Gg({userEvents:n,source:a})];return new _f(e)}),[t,n,r,c,u,a,d,s,l]);return h(yf.Provider,{value:p,children:e})}class _f{constructor(e){this.clients=e}emit(e){this.transmit(e)}transmit(e){this.clients.forEach((t=>{t.willAccept(e)&&(e.transmitImmediately&&t.transmitImmediately?t.transmitImmediately(e):t.transmit(e))}))}}function bf(){const{client:e,shop:t,checkout:n,i18n:r,source:i,mobileCheckoutSdk:a,router:s}=pe(),{currentPage:l}=Fc().value,{pathname:c}=s.currentUrl.value,u=Sg(),d=u?.trackingUnique??yt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??yt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=ke(),h=m.buyerIdentity.value?.customerProfile,g=e.unstable_getSerialization("sessionToken"),f=Cu(),y=ke().buyerIdentity.value?.purchasingCompany,{value:v}=m.paymentFlexibilityPaymentTermsTemplate,_=vt(),{value:b}=m.deliveryNext,{selectedMacro:P}=kg(),k=Dc({base:!0,small:!1}),S=n.configuration.layout.isOnePage.value,w="shopPay"===n.identity.current.value,C=navigator.connection?.effectiveType??"unknown",E=e.unstable_getSerialization("requestId"),x=l?.id,I=e.unstable_getSerialization("apiClientId")??0,A=e.unstable_getSerialization("workerVersion")??"proxy",T=e.unstable_getSerialization("serverHandling")??"proxy";let N="c1_legacy";S&&(N="c1_redesign"),w&&(N="shop_pay");const L=_t(b),{deliveryMacros:R}=Ge(),M=R.value,{isServerRendered:D}=e.initialRequest,O=n.configuration.profileId.value;return o((()=>({userToken:d,trackingVisit:p,customerId:h?.id,shopId:t.id,sessionToken:g,checkoutToken:i.checkoutSessionIdentifier,checkoutProfileId:O?parseInt(he(O),
210):void 0,apiClientId:I,sourceId:i.sourceId,sourceType:i.type,identityProvider:void 0,sourceDesign:N,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?h?.id:void 0,companyLocationId:y?.location.id,companyId:y?.company.id,checkoutToDraft:_.value,editableShippingAddress:f.value,payNowOnly:!v&&!_.value,shippingRequired:n.isShippingRequired.value,requestId:E,step:x,pathname:c,checkoutSdkSchemaVersion:a.config.schema||void 0,checkoutSdkVersion:a.config.version||void 0,checkoutSdkVariant:a.variant.value?.toUpperCase(),workerVersion:A,serverHandling:T,reviewPageRequired:t.confirmationPageEnabled,serverRendered:D,clientHydrated:D,..."filled"===b?.status?{selectedDeliveryMacro:L?P:void 0,deliveryMacros:L?M:[],deliveryLines:b.lines.filter(Ke)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:bt})),[d,p,h?.id,t.id,t.confirmationPageEnabled,g,i.checkoutSessionIdentifier,i.sourceId,i.type,O,I,N,k,r.locale,r.currency,C,y,_.value,f.value,v,n.isShippingRequired.value,E,x,c,a,A,T,b,L,P,M,D])}function Pf(){if("undefined"==typeof window)return kf;const{shop:e,consentManager:t,source:n,i18n:r}=pe(),i=de(yf),o=bf(),l=s(o),c=Pe(),u=Ge();return l.current=o,a(((a,o)=>{i.emit({type:a,context:{...l.current,href:window.location.href,consent:zc(t),webPixelCheckout:wu({type:a,step:l.current.step,section:o.section},{negotiated:c,proposedParts:u,source:n,locale:r.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...o})}),[i,l,e,t,c,u,n,r])}function kf(){}function Sf(e,t){const{router:n}=pe();l((()=>{if(""!==n.currentUrl.peek().hash)return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)}),[])}function wf(){const e=Pf(),{client:t}=pe();return a((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 Cf(){const e=Pf(),{observability:t}=pe();return function(n){e("alertDisplayed",n),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:vu(n)})}}function Ef(){const{checkout:e}=pe(),t=e.configuration.addressSettings.nonBillingAddressSettings;return i((()=>{const e=t.value?.validationEnabled;if(!e)return"BASIC"}))}function xf(){const{i18n:e}=pe();return a(((t,n)=>Pt(e,t,n)),[e])}function If(){const{i18n:e,checkout:t,shopPay:n}=pe(),r=xf(),a=n.user.installments.isRetryable.value,{paymentMethods:o,paymentDue:s}=ke(),l=i((()=>kt(o.value)));if(!t.installments.isSupported.value||!l.value)return"";const c=l.value,u=s.value,d=Boolean(c.cbtEnabled&&u&&(c.minPrice.currencyCode!==u.currencyCode||c.maxPrice.currencyCode!==u.currencyCode));if(a)return e.translate("installments.installments_condition_retryable");const p=t=>{switch(t){case"US":return e.translate("installments.installments_country_adjective.US");case"CA":return e.translate("installments.installments_country_adjective.CA");case"GB":return e.translate("installments.installments_country_adjective.GB");default:return t}},m=t.installments.ineligibilityReasons.value,h=!n.user.installments.isRejected.value;if(h&&0===m.length)return"";const g=(h&&m.length>0?m:["user_rejected"]).map((t=>{switch(t){case"amount":return d||c.cbtEnabled&&0===c.availableLoanTypes.length&&u&&u.amount>=c.minPrice.amount&&u.amount<=c.maxPrice.amount?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(c.minPrice.amount,{currency:c.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(c.maxPrice.amount,{currency:c.maxPrice.currencyCode,form:"short"})});case"billing_address":return e.translate("installments.installments_condition_billing_address");case"billing_shipping_country_mismatch":return e.translate("installments.installments_condition_billing_shipping_country_mismatch");case"shipping_address":return e.translate("installments.installments_condition_shipping_address",{listOfCountryCodes:r(c.supportedCountries.map(p),St.Or)});case"currency":return d&&u&&c.supportedCurrencies.includes(u.currencyCode)?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:r(c.supportedCurrencies,St.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")}}
2));return(c.cbtEnabled?[...new Set(g)]:g).join(" ")}function Af(e,t){return t?.availableLoanTypes?.includes(e)??!1}function Tf(e){const{retailTraceId:t,deviceId:n,userId:r,locationId:a}=function(){const e=ke().customAttributes;return i((()=>{const t=wt(Ct,e?.value),n=wt(Et,e?.value),r=wt(xt,e?.value),i=wt(It,e?.value);return{retailTraceId:t?.value||"",deviceId:n?.value||"",locationId:r?.value||"0",userId:i?.value||"0"}}))}().value,{shop:{id:s},source:{checkoutSessionIdentifier:l},checkout:c}=pe(),u=At(),{value:d}=Tt(),p=c.installments.config.value,m=d?.amount?Number(d.amount):0,h=c.installments.isCheckoutEligible.value,g=If(),f=Af("SPLIT_PAY",p),y=Af("INTEREST",p),v=Af("ZERO_PERCENT",p),_=d?.currencyCode,b=_||"USD";return o((()=>({userId:parseInt(r,10),shopId:parseInt(he(s),10),locationId:parseInt(a,10),posCheckoutToken:t,stage:e||"",totalOrderValue:m||0,cartItemsCount:u.value||0,installmentsEligible:h||!1,posDeviceId:n,currency:b,shopPayCheckoutToken:l,ineligibilityReason:g,splitPayEligible:f,interestBearingEligible:y,zeroPercentEligible:v})),[e,t,n,r,a,m,h,s,u.value,b,l,g,f,y,v])}function Nf(){const e=ke().customAttributes;return i((()=>Nt(e.value)))}function Lf(e){const{observability:t}=pe(),[n,r]=u((()=>Rt(e)));return l((()=>{const r=function(e,t){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):(t?.leaveErrorBreadcrumb("[usePersistedState] requestIdleCallback was not available, used setTimeout fallback"),window.setTimeout(e,0))}((()=>{Lt(e,n)}),t);return()=>{!function(e,t){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):"number"==typeof e&&(window.clearTimeout(e),t?.leaveErrorBreadcrumb("[usePersistedState] cancelIdleCallback was not available during cleanup, used clearTimeout fallback"))}(r,t)}}),[e,t,n]),[n,r]}function Rf(e,t){const{persistence:n}=pe(),r=n?.get(e,t),i=f(r);return C((()=>{n?.createUpdate(e,t)(i.value)})),i}const Mf=ue("AnalyticsContext");function Df({children:e}){const t=o((()=>new zf),[]);return h(Mf.Provider,{value:t,children:e})}function Of(){return de(Mf)}class zf{constructor(){this.eventHistory=[],this.listeners=new Set}emit(e){this.eventHistory.push(e);for(const t of this.listeners)t(e)}subscribe(e){this.listeners.add(e);for(const t of this.eventHistory)e(t);return()=>{this.listeners.delete(e)}}}function Bf(){const e=Of();return a((t=>e.emit(t)),[e])}function Vf(e){const t=Of();l((()=>t.subscribe(e)),[e,t])}const Ff=()=>{const{url:e}=pe(),t=e.shopPayRememberMe(),n=Yc(),r=n?.redirectUrl?.includes(t);return Boolean(r)};function Uf({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:n,shop:{id:r},checkout:{identity:i},source:o}=pe(),s="shopPay"===i.current.value,l=ke().buyerIdentity.value?.customerProfile,c=t=>t.handle===e,u=t.find(c)?.originLocation?.id,d=t.findIndex(c);return a((e=>n.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:e,checkoutToken:o.checkoutSessionIdentifier||"",shopId:parseInt(he(r),10),locationId:u&&he(u),selectedLocationRank:d,userId:l?.id?parseInt(he(l.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:s?"shop_pay":"guest_checkout"}})),[l?.id,s,u,t.length,n,d,r,o.checkoutSessionIdentifier])}const qf=580111;function jf(){const{client:e,userEvents:t,i18n:{locale:n},shop:r,source:c,mobileCheckoutSdk:d}=pe(),p=ke(),m=p.buyerIdentity.value?.customerProfile,g=xg(),f=function(){const e=Fc();return i((()=>{const t=e.value.currentPage?.id||e.value.currentDetour?.type;switch(t){case"information":return"contact_information";case"shipping":return"shipping_method";case"payment":return"payment_method";case"review":return"review";case"thankYou":return"thank_you";case"stockProblems":return"stock_problems";case"postPurchase":return"post_purchase";default:return t}}))}(),{value:y}=Dt(),{value:v}=Ot("ONE_TIME_PURCHASE"),_=zt(v),P=Boolean(_)&&0===_?.costAfterDiscounts.amount,{value:k}=p.taxes,{value:S}=p.merchandiseLines,{value:w}=p.paymentLines,{value:E}=p.discountLines,{value:x}=p.contactInfo,{value:I}=p.buyerIdentity,{value:A}=Bt(),[T,N]=u("");function L(e){return e.toFixed(2)}function R(e){return parseInt(he(e),10)}!function(){const e=s(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:i}}=pe(),a="shopPay"===i.current.value,o=Ye();C((()=>{o.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(he(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:a?"shop_pay":"guest_checkout"}}),e.current=!0)}))}();const M=o((()=>P?void 0:_?.costAfterDiscounts?.amount||_?.cost.amount),[P,_?.costAfterDiscounts?.amount,_?.cost?.amount]),D=o((()=>"USD"===A?.currencyCode?A.amount:void 0),[A?.amount,A?.currencyCode]),O=o((()=>S?.lines?.filter((e=>e.productId)).map((e=>R(e.productId)))),[S?.lines]),z=o((()=>S?.lines?.filter((e=>e.variantId)).map((e=>R(e.variantId)))),[S?.lines]),B=o((()=>S?.lines?.map((e=>{const t=e.totalPrice.amount;return void 0===t?"":L(t)}))),[S?.lines]),V=o((()=>S?.lines?.every((e=>"USD"===e.totalPrice.currencyCode))?S?.lines?.map((e=>{const t=e.totalPrice.amount;return void 0===t?"":L(t)})):void 0),[S?.lines]),F=o((()=>S?.lines?.map((e=>e.quantity))),[S?.lines]),U=o((()=>F?.reduce(((e,t)=>e+t),0)),[F]),q=o((()=>F?.length),[F]),j=o((()=>w?.lines.filter((e=>"giftCard"===e.method.type&&e.cost?.amount)).map((e=>L(e.cost.amount)))),[w?.lines]),H=o((()=>
2{if("thank_you"!==f.value&&"post_purchase"!==f.value)return;const e=w?.lines.find((e=>"giftCard"===e.method.type&&e.cost?.amount))?"giftCard":void 0,t=w?.lines.filter((e=>"giftCard"!==e.method.type)).map((e=>e.method.type));return t&&t?.length>0?t[0]:e}),[w?.lines,f.value]),$=o((()=>E?.lines.reduce(((e,t)=>{if(!Xl(t))return e;let n=e;n||(n=[]);const r=t.amount?.amount;return r&&n.push(L(r)),n}),[])),[E]),Y=Sg(),W=a((()=>{const t="available_total"===k?.status?k.totalTax.amount:void 0,i=m?.id?R(m.id):void 0,a=m?.fullName||void 0,o=Y?.trackingUnique??yt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),s=Y?.trackingVisit??yt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:"cartNext"===c.type?c.sourceId:void 0,customerId:i,trackingUnique:o,shopId:R(r.id),eventTimestampEpochMs:Date.now(),trackingVisit:s,userAgent:navigator.userAgent,landingPage:e.cookies.get("_landing_page")||void 0,customerEmail:m?.email||x?.email,contentLanguage:n,actionName:"query",remoteIp:void 0,totalPrice:A?.amount?L(A?.amount):void 0,customerName:a,lineItemProductIds:O,lineItemVariantIds:z,lineItemTotalPrice:B,lineItemTotalPriceUsd:V,lineItemQuantity:F,currency:I?.presentmentCurrency||r.currencyCode,totalItemCount:U,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:D?L(D):void 0,apiClientId:qf,currentApiClientId:qf,paymentMethod:H,paymentProviderId:void 0,currentStep:f.value,checkoutToken:c.checkoutSessionIdentifier,totalShipping:M?L(M):void 0,sourceProcessor:"web_checkout",appliedGiftCards:j?.length?j:void 0,subtotalPrice:y?.amount?L(y.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:P.valueOf(),totalTax:t?L(t):void 0,appliedDiscounts:!$||$.length<1?void 0:$,orderId:void 0,distinctItemCount:q,javascriptEnabled:!0,checkoutPlatform:"checkout_one",checkoutSdkVersion:d.config.version||void 0,checkoutSdkSchemaVersion:d.config.schema||void 0,checkoutSdkVariant:d.variant.value?.toUpperCase()}}}),[$,k,P,y,j,c,M,A?.amount,D,f,I?.presentmentCurrency,r,U,F,B,V,z,O,m,x,q,n,H,Y,e,d]);return l((()=>{g&&(T!==f.value&&t.monorailEvent(W()),N(f.value))}),[T,f.value,t,W,N,g]),h(b,{})}const Hf=x({suspenseName:"trekkie",displayName:"Trekkie",load:()=>t((()=>Dl((()=>import("./b887ec56.DMmbSuA-.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))))});function $f(){const e=Pe(),t=Ge(),n=Dg(),{plan:r}=Fc().value,{router:i,i18n:{locale:o},shop:{currencyCode:s,marketDrivenShippingEnabled:l},source:c}=pe(),u=Yc(),d=Wc(),p=a((()=>{const r=yu({negotiated:e,source:c,proposedParts:t,locale:o,shopCurrencyCode:s,marketDrivenShippingEnabled:l});requestAnimationFrame((()=>{n.publish("payment_info_submitted",{checkout:r})}))}),[e,c,n,t,o,s,l]),m=a((()=>{const r=yu({negotiated:e,source:c,proposedParts:t,locale:o,shopCurrencyCode:s,marketDrivenShippingEnabled:l});n.publish("checkout_started",{checkout:r})}),[e,c,n,t,o,s,l]),h=a((()=>{if(!u)return;if(d.shouldPrevent())return;const t=yu({negotiated:e,receipt:u,source:c,orderId:u.orderIdentity.id,customerId:u.customerId||void 0,isFirstOrder:u.isFirstOrder,locale:o,shopCurrencyCode:s,marketDrivenShippingEnabled:l});d.markAsEmitted();const a=u.analytics?.checkoutCompletedEventId;let p=!1;function m(){if(p)return;p=!0,window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",h);const e=function(e,t){const n=e.find((e=>e.route===t));return n?Jc[n.type]??"unknown":"unknown"}(r.detours,i.currentUrl.value.normalizedPath),o={...a&&{eventId:a},checkoutCompletedPageType:e},s=Object.keys(o).length>0?o:void 0;n.publish("checkout_completed",{checkout:t},s)}function h(){"hidden"===document.visibilityState&&m()}window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",h),"hidden"===document.visibilityState?m():requestAnimationFrame(m)}),[u,e,c,n,i,r.detours,o,s,l,d]);return Vf(a((e=>{"initiate_checkout"===e.type&&m()}),[m])),Vf(a((e=>{"add_payment_info"===e.type&&p()}),[p])),Vf(a((e=>{"complete_checkout"===e.type&&h()}),[h])),null}const Yf=["/processing","/thank-you","/error","/post-purchase"],Wf=[pt.DirectCheckoutCheckout,pt.CheckoutPaymentStep,pt.ShopPayInstallmentsAsPaymentMethod,pt.ShopPayAsPaymentMethod];function Gf(){Sg();const e=Bf(),{currentPage:t,currentDetour:n}=Fc().value,{userEvents:r,source:i,router:a}=pe(),o=function(){const[e,t]=Lf(Mt.TrackedSourceId),{source:{sourceId:n}}=pe();return l((()=>{t(n)}),[n,t]),{previouslyTracked:n===e}}(),s=function(){const[e,t]=Lf(Mt.TrackedCompleteOrderSourceId),n=Yc(),r=Ff(),{source:{sourceId:i}}=pe();return l((()=>{n&&!r&&t(i)}),[i,n,r,t]),{previouslyTracked:i===e}}(),{normalizedPath:c}=a.currentUrl.value,u=Yc(),d=Nf().value,p=Tf(Ft.SHOP_PAY_CHECKOUT_COMPLETE),m=ke().paymentLines?.value?.lines,g=function(){const{client:e}=pe();return e.unstable_getSerialization("shopPayConfig").redirect_source}(),f=Pf(),y=Ff();return l((()=>{const r=n?.route??t?.route;if(r){f("pageViewed",{timestamp:new Date});const n=["/"];t&&["onePage"].includes(t.id)&&n.includes(r)?e({type:"one_page_checkout_page_view",url:r}):e({type:"page_view",url:r})}}),[t,n,f,e]),qc((n=>{"negotiationStage"in n&&"negotiation"===n.negotiationStage||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})})),l((()=>{u&&(y||s.previouslyTracked||(e({type:"complete_checkout"}),d&&function(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:ae(t.orderIdentity.id)}})}(r,u,p)))}),[e,u,y,s,d,r,p]),l((()=>
2{"cartNext"!==i.type&&"checkout"!==i.type||o.previouslyTracked||e({type:"initiate_checkout_once_per_checkout",url:c})}),[e,c,i.type,o.previouslyTracked]),l((()=>{const t=a.currentUrl.value.normalizedPath,n=Boolean(Ut(m,"GOOGLE_PAY")),r="cartNext"===i.type||"checkout"===i.type,o=!g||!Wf.includes(g);r&&(n&&"/processing"===t||!Yf.includes(t))&&o&&e({type:"initiate_checkout",url:t})}),[]),h(b,{children:[h(jf,{}),h(Hf,{}),h($f,{})]})}const Jf=I((function({children:e}){const t=Vt();return h(Df,{children:[e,h(A,{when:t,children:h(Gf,{})})]})}));function Kf(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r}}=pe(),i=qt(),{billingAddress:a}=Ge(),o=a.value,{details:s}=jt(o.countryCode),l=Ef();return qc((c=>{if("complete"===c.type&&a&&i.value.defaultAttributes){const a=i.value.defaultAttributes?.uniqToken||"",c=s?.zones?.find((e=>e.code===o.zoneCode))?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.checkoutSessionIdentifier||"",shopId:parseInt(he(t),10),uniqueToken:a,territory:s?.name||"",context:"Billing address",address1:o.address1||"",address2:o.address2||"",city:o.city||"",zone:c||"",zip:o.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:l.value}})}})),null}const Qf=ue("WebPixelTargetContext"),Xf=({children:e,target:t})=>h(Qf.Provider,{value:t,children:e});function Zf(){const{checkout:e}=pe();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}const ey=x({displayName:"AdminPreviewBar",load:()=>Dl((()=>import("./a6e11e56.vyg_OJT2.js")),__vite__mapDeps([10,1,2,3,4,5,6,7,8,9,11])),suspense:!1});function ty(){const{router:e,source:t,shop:n}=pe(),r="no-preview"!==n.configurationPreviewContext,i=s(e.currentUrl.peek()).current,a=function({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return null!=e.previewScript?.name||"simulated"!==e.type&&!t&&n}({source:t,isThemeEditor:Ht(),hasServerPreviewContext:r});return a?h(ey,{initialUrl:i}):null}function ny(){const e=s(!1);return l((()=>(e.current=!0,()=>{e.current=!1})),[]),e}const ry=_(void 0);function iy(){const e=y(ry);if(!e)throw new Se("Missing FocusManager Context ");return e.focusErrors}function ay(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return"rtl"===t||"ltr"===t?t:"rtl"===e.dir?"rtl":"ltr"}function oy({children:e}){const t=s(new Set),n=ny(),r=a((()=>{let e;for(const n of t.current){if(!n.current)continue;const t={coordinates:n.current.getBoundingClientRect(),ref:n};e&&(r=t.coordinates,i=e.coordinates,a=ay(n.current.ownerDocument),!(r.top===i.top?"ltr"===a?r.left<i.left:r.right>i.right:r.top<i.top))||(e=t)}var r,i,a;n.current&&e&&function(e){const t=e.ref.current;if(!t)return;if(t.focus({preventScroll:!0}),function({coordinates:e,ref:t}){const n=t.current?.ownerDocument.defaultView??window;return e.top>=0&&e.left>=0&&e.bottom<=n.innerHeight&&e.right<=n.innerWidth}(e))return;""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)");const n=t.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches??!1;t.scrollIntoView({behavior:n?"instant":"smooth"})}(e)}),[n]),i=a((e=>(t.current.add(e),()=>t.current.delete(e))),[]),l=o((()=>({requestFocus:i,focusErrors:r,numberOfErrors:()=>t.current.size})),[r,i]);return h(ry.Provider,{value:l,children:e})}function sy({active:e}){const t=s(null),n=y(ry);return d((()=>{if(n&&e)return n.requestFocus(t)}),[e,t,n]),t}function ly(){return y(ry)}function cy(e){return document.activeElement===e}const uy='\n  a[href],\n  area[href],\n  input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]):not([tabindex="-1"]),\n  iframe:not([tabindex="-1"]),\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls]';function dy(e,t=!0){return!t&&e.matches(uy)?e:e.querySelector(uy)}function py(e,t=!0){if(!t&&e.matches(uy))return e;const n=e.querySelectorAll(uy);return n[n.length-1]}function my(e){const t=[...document.querySelectorAll(uy)],n=t.findIndex((t=>e===t));return n?t[n+1]:null}function hy(){const{paymentLines:e}=Ge(),t=ke().paymentMethods;return i((()=>{const n=e.value.at(0);if(!n)return null;const r="walletContent"in n.method?n.method.walletContent?.paymentMethodIdentifier:"popupEnabled"in n.method?n.method.paymentMethodIdentifier:void 0,i=t.value?.find((e=>"popupEnabled"in e&&e.popupEnabled&&e.paymentMethodIdentifier===r));return $t()?null:i&&"name"in i?i.name:null}))}var gy={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 fy=Th(hm(vp(k((function({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",autoFocus:r,background:i="transparent",backgroundHoverAndFocus:o,backgroundFit:s,backgroundImage:l,backgroundPosition:c,backgroundRepeat:u="noRepeat",blockAlignment:d,blockSize:p="auto",border:m="none",borderRadius:g="none",borderStyle:f,borderWidth:y,boxShadow:v,children:_,className:b,colorLayer:k,containerName:w,display:C="auto",id:E,inert:x,inlineAlignment:I,inlineSize:A="auto",maxBlockSize:T="none",maxInlineSize:N="none",minBlockSize:L="0",minInlineSize:R="0",opacity:M,overflow:D="visible",padding:O="none",paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j="relative",insetBlock:H,insetInline:$,transform:Y,translate:W,zIndex:G,...J},K){const Q=d||I,X=ym(K,a((e=>{r&&e&&e.focus({preventScroll:!0})}),[r])),{className:Z,style:ee,styleElement:te}=Ch({alignItems:I,backgroundColor:i,backgroundColorHoverAndFocus:o,backgroundImage:l,blockSize:p,...Fe({border:m,borderStyle:f,borderWidth:y}
2),borderRadius:g,boxShadow:v,display:C,inlineSize:A,insetBlock:H,insetInline:$,justifyContent:d,maxBlockSize:T,maxInlineSize:N,minBlockSize:L,minInlineSize:R,padding:O,paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j,transform:Y,zIndex:G},{transforms:{display:Q?tp:Zd}}),ne=lp(),{Element:re,role:ie}=Mh(t,{defaultElement:ne?"span":"div"}),ae=w?S({[gy.vars.containerNameVar]:w}):void 0;return h(yy,{condition:x,children:[te,h(re,{"aria-hidden":!("hidden"!==n&&!x)||void 0,"aria-label":e,className:P("exclusive"===n&&gy.visuallyHidden,l&&s&&gy.backgroundSizeVariant[s],l&&c&&gy.backgroundPositionVariant[c],l&&gy.backgroundRepeatVariant[u],k&&gy.colorLayerVariant[k],w&&gy.containerName,Q&&gy.withAlignment,x&&gy.inert,M&&gy.opacityVariant[M],"hidden"===D&&gy.overflowHidden,Z,{notranslate:!1===W},b),id:E,inert:x?" ":void 0,ref:X,role:ie,style:{...ee,...ae},tabIndex:r?-1:void 0,translate:(!0===W?"yes":void 0)??(!1===W?"no":void 0),...J,children:_})]})})))));function yy({children:e,condition:t}){return null==t?h(b,{children:e}):h(ap.Provider,{value:t,children:e})}var vy={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 _y({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const i=Eu(),a=Boolean(n&&i),o=function(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}(e),s=P(vy.Spinner,t&&vy.appearanceVariant[t],vy.sizeVariant[o]),l=h("fill"===o||"large"===o?by:Py,{...{"aria-label":n,"aria-hidden":n?void 0:"true"}});return a?h(b,{children:n}):h("div",{className:s,id:r,children:l})}function by(e){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:vy.SVG,focusable:"false",...e,children:h("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 Py(e){return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:vy.SVG,focusable:"false",...e,children:h("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 ky={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 Sy=k((function({accessibilityLive:e,accessibilityVisibility:t,children:n,color:r="base",decoration:i,dir:a,display:o="auto",fonts:s,id:l,kerning:c,lang:u,letterCase:d,size:p,translate:m,tone:g="auto",type:f="generic"},y){const v=(e=>{switch(e){case"address":return"address";case"emphasis":return"em";case"generic":return"span";case"mark":return"mark";case"offset":return"i";case"redundant":return"s";case"strong":return"strong";case"small":return"small";default:return console.warn("Invalid Text’s `type`"),"span"}})(f),{className:_,styleElement:k}=Ch({display:o},{transforms:{display:ep}});return h(b,{children:[k,h(v,{"aria-hidden":"hidden"===t||void 0,"aria-live":e,className:"exclusive"===t?ky.accessibilityVisibilityVariant[t]:P(ky.Text,i&&ky.decorationVariant[i],s&&ky.fontsVariant[s],c&&ky.kerningVariant[c],d&&ky.letterCaseVariant[d],p&&ky.sizeVariant[p],g&&ky.toneVariant[g],r&&("auto"===g||"neutral"===g)&&ky.colorVariant[r],f&&ky.typeVariant[f],_,{notranslate:!1===m}),dir:a,id:l,lang:u,translate:(!0===m?"yes":void 0)??(!1===m?"no":void 0),ref:y,children:n})]})}));var wy,Cy={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
2iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},Ey={borderVariant:{blockEnd:"_1m2hr9g14",full:"_1m2hr9g15",none:"_1m2hr9g16"},colorLayerVariant:{primary:"_1m2hr9g1l _1m2hr9g1j _1fragemy9",secondary:"_1m2hr9g1m _1m2hr9g1k _1fragemya",tertiary:"_1m2hr9g1n",plain:"_1m2hr9g1o","shop-pay":"_1m2hr9g1p"},Content:"_1m2hr9gx _1m2hr9gw _1fragem11z _1fragem12j _1fragem12d _1fragem12q",disabled:"_1m2hr9g20 _1m2hr9g1z _1fragem11z",displayVariant:{block:"_1m2hr9gm _1m2hr9gk _1fragem5u",inline:"_1m2hr9gn _1m2hr9gl _1fragem6e"},editorDisabled:"_1m2hr9g21",forcedColorsPrimaryFill:"_1m2hr9g22",inlineAlignmentVariant:{center:"_1m2hr9gr _1m2hr9gp _1fragem64 _1fragembj _1fragem124",start:"_1m2hr9gs",end:"_1m2hr9gt _1m2hr9gq _1fragem64 _1fragembt _1fragem125"},loading:"_1m2hr9gv _1m2hr9gu _1fragem11z _1fragemyb",LoadingContent:"_1m2hr9gz _1m2hr9gy _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",ExtendedLoadingContent:"_1m2hr9g11 _1m2hr9g10 _1fragem12q _1fragem12y",segmentVariant:{start:"_1m2hr9g23",end:"_1m2hr9g24"},Spinner:"_1m2hr9g13 _1m2hr9g12 _1fragemwi _1fragem109 _1fragem113",sizeVariant:{small:"_1m2hr9g1v _1m2hr9g1u",base:"_1m2hr9g1w _1m2hr9g1u",large:"_1m2hr9g1x _1m2hr9g1u",extraLarge:"_1m2hr9g1y _1m2hr9g1u"},textDecorationVariant:{underline:"_1m2hr9g1h _1m2hr9g1g _1fragem129",none:"_1m2hr9g1i"},toneVariant:{critical:"_1m2hr9g1q",monochrome:"_1m2hr9g1r",neutral:"_1m2hr9g1s",custom:"_1m2hr9g1t"},verticalAlignVariant:{"text-bottom":"_1m2hr9go"},inMenu:"_1m2hr9g25",inert:"_1m2hr9g26 _1fragemz0"};const xy=Xm(Qm(Sm((wy=k((function({accessibilityLabel:e,accessibilityLive:t,children:n,className:r,disabled:i,command:a,commandFor:o,display:s="block",href:l,id:c,inlineAlignment:u="center",inlineSize:d="auto",loading:p,loadingLabel:m,loadingMode:g="auto",onClick:f,onFocus:y,onMouseEnter:v,overlay:_,segment:b,size:k="base",textDecoration:S,target:w="auto",tone:C="auto",type:E="button",variant:x="auto",verticalAlign:I="baseline",...A},T){const N=i?void 0:l,L=Ay(f)?()=>f?.():void 0,R=Ay(y)?()=>y?.():void 0,M=Ay(v)?()=>v?.():void 0,D=fm(T),O="auto"===x?"secondary":x,z="shop-pay"===O||"auto"===C?"neutral":C,{className:B,style:V,styleElement:F}=Ch({inlineSize:d},{transforms:{inlineSize:Iy}}),U=Rd(),q=Eu(),{primaryButton:{border:j="none"},secondaryButton:{border:H="full"},link:{typographyDecoration:$="underline"}}=Ah(),Y=ip(),W=op(),G=Nd().editor??!1,J=Boolean(i)&&!G,K="plain"===O,Q="in-menu"===O,X=!p&&J?"full":j,Z=(()=>{switch(O){case"tertiary":return"none";case"secondary":return H;default:return X}})(),ee=S||("monochrome"===z?"underline":$),te=P("_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",(p||!J)&&!K&&!Q&&"neutral"===z&&Ey.colorLayerVariant[O],Cy[Q?"plain":O],!K&&Ey.sizeVariant[k],Z&&!K&&Ey.borderVariant[Z],("primary"===O||"shop-pay"===O)&&Ey.forcedColorsPrimaryFill,Ey.displayVariant[s],"text-bottom"===I&&Ey.verticalAlignVariant[I],Ey.toneVariant[z],B,(J||W)&&Ey.disabled,G&&i&&Ey.editorDisabled,W&&Ey.inert,p&&Ey.loading,Ey.textDecorationVariant[K?ee:"none"],b&&Ey.segmentVariant[b],Q&&Ey.inMenu,r),ne=m||U("processing"),re=h("span",{className:P(Ey.Content,u&&Ey.inlineAlignmentVariant[u]),"aria-hidden":p||void 0,children:n}),ie=h("span",{className:P(Ey.LoadingContent,u&&Ey.inlineAlignmentVariant[u],!q&&Ey.Spinner),dir:"auto",children:[h(_y,{accessibilityLabel:ne}),"extended"===g&&!q&&h("span",{className:Ey.ExtendedLoadingContent,dir:"auto",children:h(Sy,{children:ne})})]}),ae=md(),oe=ae?.activatorAttributes,se=void 0!==p;if(N&&void 0===o)return h(sp.Provider,{value:!0,children:[F,h(xh,{ariaBusy:se?p:void 0,ariaLabel:p?void 0:e,ariaLive:se?"polite":t,className:te,href:N,id:c,onClick:f,onFocus:y,onMouseEnter:v,overlay:_,ref:D,style:V,target:w,...A,children:[re,p&&ie]})]});const le=Pm(ae,{onClick:L,onFocus:R,onMouseEnter:M});return h(sp.Provider,{value:!0,children:[F,h("button",{"aria-busy":se?p:void 0,"aria-hidden":!!W||void 0,"aria-label":p?void 0:e,"aria-live":se?"polite":t,className:te,disabled:i||p,form:"submit"===E&&Y?.nested?Y.id:void 0,id:c,ref:D,style:V,type:o?"button":E,tabIndex:W?-1:void 0,...le,...oe,...A,children:[re,p&&ie]})]})})),k(((e,t)=>
2{switch(y(ld)){case"Menu":{const n={...e,size:"base",tone:e.tone||"monochrome",variant:"in-menu",textDecoration:"none",inlineAlignment:"start",inlineSize:"fill"};return h("li",{children:h(wy,{...n,ref:t})})}case"Sheet":{const n={...e,size:"small"};return h(wy,{...n,ref:t})}case"Banner":{const n={...e,tone:"auto"===e.tone||void 0===e.tone&&"plain"!==e.variant?"monochrome":e.tone};return h(wy,{...n,ref:t})}default:return h(wy,{...e,ref:t})}}))))));function Iy(e){if("legacy-default"!==e)return"fill"===e?"100%":$d("auto"===e?"fit-content":e)}function Ay(e){return"function"==typeof e}var Ty={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 Ny({accessibilityLabel:e,accessibilityLive:t,command:n="--auto",commandFor:r,children:i,display:a="inline",href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:d,target:p="auto",textDecoration:m,tone:g="auto",verticalAlign:f="baseline",overlay:y,...v}){const{link:{typographyDecoration:_="underline"}}=Ah(),b="text-bottom"===f?Ty.verticalAlignVariant[f]:void 0;return o&&void 0===r?h(xh,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:P(Ty.Link,Ty.toneVariant["auto"===g?"neutral":g],Ty.textDecorationVariant[m||("monochrome"===g?"underline":_)],Ty.displayVariant[a],b),href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:d,overlay:y,target:p,...v,children:i}):h(xy,{accessibilityLabel:e,accessibilityLive:t,command:n,commandFor:r,display:a,onClick:c,onFocus:u,onMouseEnter:d,id:s,overlay:y,textDecoration:m,tone:"auto"===g?"neutral":g,variant:"plain",verticalAlign:f,...v,children:i})}var Ly={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const Ry=Th(hm(k((function({accessibilityCurrent:e,accessibilityLabel:t,accessibilityRole:n="generic",accessibilityLabelledBy:r,alignContent:i="normal",alignItems:a="normal",background:o,backgroundHoverAndFocus:s,blockSize:l="auto",border:c="none",borderRadius:u="none",borderStyle:d,borderWidth:p,children:m,className:g,columnGap:f,display:y="auto",direction:v="block",gap:_,id:k,inlineSize:S="auto",justifyContent:w="normal",maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",overflow:A="visible",padding:T="none",paddingBlock:N,paddingInline:L,paddingBlockEnd:R,paddingBlockStart:M,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z,...B},V){const{className:F,style:U,styleElement:q}=Ch({alignContent:i,alignItems:a,backgroundColor:o,backgroundColorHoverAndFocus:s,...Fe({border:c,borderStyle:d,borderWidth:p}),blockSize:l,borderRadius:u,columnGap:f,display:y,flexDirection:v,flexWrap:v,gap:_,inlineSize:S,justifyContent:w,maxBlockSize:C,maxInlineSize:E,minBlockSize:x,minInlineSize:I,padding:T,paddingBlock:N,paddingBlockEnd:R,paddingBlockStart:M,paddingInline:L,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z},{transforms:{display:tp,flexDirection:e=>"block"===e?"column":"row",flexWrap:e=>"block"===e?"nowrap":"wrap"}}),j=lp(),{Element:H,role:$}=Mh(n,{defaultElement:j?"span":"div"});return h(b,{children:[q,h(H,{className:P(Ly.Stack,Ly.overflowHidden[A],F,g),role:$,"aria-label":t,"aria-current":e,"aria-labelledby":r,style:U,id:k,...B,ref:V,children:m})]})}))));var My="_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k";function Dy({children:e}){const t=s(null),n=s(null),r=s(null),i=s(document.activeElement);d((()=>{const e=r.current;if(e){const t=dy(e);t?t.focus():e.focus()}const t=i.current;if(t)return()=>{t.focus()}}),[]);const a=e=>{const t=r.current;if(t){const n=e?dy(t):py(t);n?n.focus():t.focus()}};return h(b,{children:[h("button",{className:My,ref:t,"aria-hidden":"true",onFocus:()=>a(!1),type:"button"}),T(e,{tabIndex:-1,ref:r}),h("button",{className:My,ref:n,"aria-hidden":"true",onFocus:()=>a(!0),type:"button"})]})}const Oy="scrollbar-gutter",zy="stable";function By(){const[e,t]=u(!1),n=s(0),r=s(null),i=s(null),o=a((()=>
2{if(!document.body||r.current)return;const{position:e,top:a,overflow:o}=document.body.style,s=function(e){if(!function(e){return function(e){return window.innerWidth>e.clientWidth}(e)&&(t=window.getComputedStyle(e).getPropertyValue(Oy),!t?.split(/\s+/).includes(zy));var t}(e))return null;const t=e.style.getPropertyValue(Oy);return e.style.setProperty(Oy,zy),t}(document.documentElement);r.current={position:e,top:a,overflow:o},i.current=s,n.current=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${n.current}px`,document.body.style.overflow="hidden",t(!0)}),[]),c=a((()=>{if(!document.body)return;var e,a;null!==i.current&&(e=document.documentElement,(a=i.current)?e.style.setProperty(Oy,a):e.style.removeProperty(Oy),i.current=null);const o=r.current;r.current=null,o&&"fixed"!==o.position&&(document.body.style.position=o.position,document.body.style.top=o.top,document.body.style.overflow=o.overflow,window.scrollTo(0,n.current)),t(!1)}),[]);return l((()=>()=>{c()}),[c]),{isLocked:e,lock:o,unlock:c}}function Vy({children:e,isInvisible:t,onClick:n}){const{lock:r}=By(),{i18n:a}=pe();l((()=>{r()}),[r]);const o=i((()=>t?.value??!1)),s=h("div",{children:h(A,{when:o,fallback:h(b,{children:[h("div",{className:"hYGiX"}),h("div",{className:"UGCQu",children:e})]}),children:h("div",{className:"yF8Vq",onClick:n,role:"button",tabIndex:0,"aria-label":a.translate("wallets.scrim.cancel"),onKeyDown:e=>{"Escape"!==e.key&&"Enter"!==e.key||!n||n()},children:e})})});return h(Bu,{children:h(Dy,{children:s})})}function Fy({isOpen:e,isInvisible:t,children:n,onClick:r}){return h(A,{when:e,children:h(Vy,{isInvisible:t,onClick:r,children:n})})}function Uy({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return h(Fy,{isOpen:e,children:h(qy,{handleClose:n,walletName:t,handleFocus:r})})}function qy({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=pe();return h(fy,{children:h(Ry,{gap:"large-400",alignItems:"center",children:[h(Sy,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?h(Ny,{tone:"monochrome",onClick:t,children:n}):n})}),h(Sy,{children:[h(Ny,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function jy(){const{checkout:{offsitePopupController:e}}=pe(),t=hy();return h(Uy,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const Hy=new Set(["coordinates","name","oneTimeUse","handle"]),$y=new Set(Object.values(Yt).flat());function Yy(e){return!Hy.has(e)}function Wy({address:e,addressSettings:t,countryDetails:n}){if(!e)return!1;const{isRequired:r}=t,i=e.countryCode,a=n&&n.code===i&&!n.isFallback?n:void 0,o=a?new Set(Wt({country:a,editFormat:a.formatting.edit,addressSettings:t})):void 0;for(const s of Object.keys(e))if(Yy(s)&&!$y.has(s)&&(!o||o.has(s))&&("postalCode"===s&&a?a.postalCodeRequired:r(s,{countryCode:i}))&&(null==e[s]||0===e[s]?.length))return!1;return!0}const Gy=ue("RequestContext");function Jy(){return de(Gy)}const Ky=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],Qy=["JP"];function Xy(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:i}={}){const a=ev(e,i);if(!a)return;const{addr:o,details:s,zoneFormat:l}=a;return Gt(o,s,t,n,r,l)}function Zy(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const i=ev(e,r);if(!i)return;const{addr:a,details:o,zoneFormat:s}=i;return Jt(a,o,t,n,s)}function ev(e,t){const{i18n:n}=pe(),{details:r}=jt(e?.countryCode);if(!e)return;if(!r&&e.countryCode)return;const i=r??Kt(void 0,n),a=e.countryCode&&Ky.includes(e.countryCode)?"explicit":"short";return{addr:t??1?e:{...e,firstName:void 0,lastName:void 0},details:i,zoneFormat:a}}function tv(e){const{details:t,loading:n}=jt(e?.countryCode);if(!t||!e||n)return{countryName:void 0,zoneName:void 0,loading:n};const r=t.zones.find((t=>t.code===e.zoneCode))?.name;return{countryName:t.name,zoneName:r,loading:n}}function nv(e){return a((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 rv=e=>{const t=a(((t,n)=>{e[t].value=n}),[e]),n=a((()=>{N((()=>{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=a((t=>{e[t].value=void 0}),[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:n,resetAddressFieldErrors:r}},iv=(e,t)=>({resetAddressSuggestions:function(){Object.entries(t).forEach((([n])=>{Object.keys(e).includes(n)&&void 0!==e[n].peek()&&(t[n].value=void 0)})),N((()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.countryCode.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0}))},resetAddressFieldSuggestions:function(n){t[n].value=void 0,e[n].value=void 0}});function av(e,t,n,r){const{i18n:i,checkout:s}=pe(),{geolocation:l}=Jy(),c=s.configuration.addressSettings.nonBillingAddressSettings.value,u=ke().deliveryNext,{details:d}=jt(e),{getIsMobilePhoneFieldVisible:p}=ov(),m=s.address.extendedAddressMode.get(e),h=void 0===r?m:r,g=o((()=>d??l.country),[d,l.country]),f=o((()=>s.address.extendedAddressMode.getFormatFromCountry(g,h)),[s.address.extendedAddressMode,h,g]),y=o((()=>n??c),[n,c]),v=o((()=>t??[{value:g.code,label:g.name}]),[t,g]);return a(((e,t)=>Qt(e,t,{addressSettings:y,countryDetails:d,fallbackCountry:l.country,editFormat:f,availableCountries:v,deliveryNextValue:u.value,isMobilePhoneFieldVisible:p(t),additionalFieldsEnabled:null!==h,i18n:i})),[y,d,f,l.country,h,v,u,p,i])}const ov=()=>{const{checkout:{identity:e},shopPay:t}=pe(),n="shopPay"===e.current.value,r=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:a((e=>n&&!r.value&&"shipping"===e),[n,r])}};function sv(){const{shippingAddress:e}=Ge(),{i18n:t}=pe();return i((()=>{const n=e.fields.firstName.value,r=e.fields.lastName.value,i=e.value.oneTimeUse;return Zt(n)&&Zt(r)&&!i?t.formatName(n,r,!0):null}))}function lv(e,t,n,r){const{i18n:i}=pe();
2return function(a){if(e&&n.has(e)){if("label"===a)return i.translate("contact",{scope:r?`optional_${e}`:e});const t=`${n.get(e)}_${a}`;return i.translate("contact",{scope:r?`optional_${t}`:t})}return t}}function cv({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:i=""}=e,{details:a,loading:o}=jt(i),{i18n:s}=pe();return function(e,t,n,r,i,a=!1){const{firstName:o="",lastName:s="",address1:l="",address2:c="",city:u="",postalCode:d="",company:p="",zoneCode:m="",countryCode:h=""}=e,g=p;let f=pv([o,s]),y=pv([l,c]),v=pv([u,m??"",d,h],", ");if(r){const t=Qy.includes(h),n={countryFormat:t?"explicit":"short",zoneFormat:t?"explicit":"short"};f=function({firstName:e,lastName:t,countryDetails:n,locale:r}){const i=n?.formatting.show;if(!i)return pv([e,t]);let a="";const o=i.split("_").find((e=>e.includes("{firstName}")||e.includes("{lastName}")));if(o){let n=o.replace("{lastName}",t).replace("{firstName}",e);if(r){const e=r.toLowerCase(),t=e.startsWith("ja")||e.startsWith("zh")||e.startsWith("ko");n.includes("様")&&!e.startsWith("ja")&&(n=n.replace("様","")),a=t?n.trim().replace(/\s+/g,""):n.trim().replace(/\s\s+/g," ")}}else a=pv([e,t]);return a}({firstName:o,lastName:s,countryDetails:r,locale:i});const l=["address1","address2","firstName","lastName","company",...a?[]:["phone"]];y=Gt(e,r,["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," "),v=Gt(e,r,l,!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," ")}return n?{nameLine:f,companyLine:g,primary:n,secondary:pv([y,v])}:{nameLine:f,companyLine:g,primary:pv(["inline"===t?f:"",g,y],", "),secondary:v}}(e,t,n,o?void 0:a,s.locale,r)}
2function uv(e){const t=Ge()[`${e}Address`].value,{primary:n,secondary:r}=cv({address:t,nameLinePosition:"inline"});return`${n} ${r}`}function dv(e,t){const{checkout:n}=pe(),r=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=jt(e);return a(((e,t)=>Xt({addressType:e,violations:t,countryDetails:i,format:i?n.address.extendedAddressMode.getFormatFromCountry(i):void 0,addressSettings:r})),[i,r,n.address.extendedAddressMode])}function pv(e,t=" "){return e.filter(Boolean).join(t)}function mv(e){return"string"==typeof e?""!==e.trim():null!=e}function hv(e){return Object.entries(e).filter((([e,t])=>Yy(e)&&mv(t))).map((([e])=>e))}function gv(e){return mv(e.address1)||mv(e.streetName)}function fv(e){const t=Object.fromEntries(Object.entries(e).filter((([t,n])=>Yy(t)&&mv(n)&&!function(e,t,n){if("string"!=typeof n)return!1;if("address1"===t){const t=sn({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return mv(t)&&n.trim()===t?.trim()}if("address2"===t){const t=ln({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return mv(t)&&n.trim()===t?.trim()}return!1}(e,t,n))).map((([e,t])=>[e,"string"==typeof t?t.trim():t])).sort((([e],[t])=>e.localeCompare(t))));return on(JSON.stringify(t))}function yv(e,t,n,r,i,a,o){o.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(he(r),10),checkoutToken:i||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:a}})}function vv(){const e=Ge().shippingAddress.value,t=!cn(e),n=Xy(e,{hiddenFields:["phone"]});return!t&&n?n:null}function _v(e){return"failed"===e.status}function bv(e){return"payment"===e.type}function Pv(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function kv(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type}function Sv(e){return"action_required"===e.status&&"complete_payment_challenge_v2"===e.action.type}function wv(e){return"complete_payment_challenge"===e.type}function Cv(e){return"complete_payment_challenge_v2"===e.type}function Ev(e){return{receiptId:e?.id?ye(e.id)??e.id:void 0,status:e?.status}}function xv(e=[]){return e?.flatMap((e=>"submitted"===e.status?e.remotePurchaseOrder.deliveryLines?.map((t=>({...t,shopId:e.shopId})))??[]:[]))??[]}function Iv(e){return e.some((({code:e})=>new Set([...un,...dn]).has(e)))}function Av(e){return e.some((({code:e})=>pn.has(e)))}function Tv(e){return e.some((e=>mn.has(e.code)&&"RemoveTermViolation"===e.__typename))}function Nv(e){return e.some((e=>hn.has(e.code)&&"RemoveTermViolation"===e.__typename))}function Lv(e){const t=Vv({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function Rv(e){const t=Mv(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0,clearViolations:t.clearViolations}}function Mv(e){return Vv({subscribedViolations:e,onlySubscribeToProgression:!1})}function Dv(e){const t=Ov(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function Ov(e){return Vv({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function zv(e){const t=Bv(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function Bv(e){const{checkout:{wallets:t}}=pe(),n=Mv(e);return C((()=>{t.activeSession.value&&n.violations.value.size>0&&c((()=>{n.clearViolations()}))})),n}function Vv({subscribedViolations:e,onlySubscribeToProgression:t,skipProgressionNegotiations:n}){const{observability:r,checkout:{wallets:o}}=pe(),{lastJourneyProgression:s,lastNegotiation:c}=Pe(),u=t?s:c,d=f({violations:new Set}),p=i((()=>d.value.violations)),m=a((()=>{d.value={violations:new Set}}),[d]),h=L(e);return l((()=>u.subscribe((e=>{if(o.activeSession.value)return;if("invalid"===e.type)return void r.log("violations_subscription_invalid_result_detected","Not updating violation subscription because of invalid result",{reasons:e.reasons,beforeViolations:p.value});if("error"!==e.type&&"success"!==e.type)return;if(n&&"progression"!==e.negotiationStage&&"completion"!==e.negotiationStage)return;const t=h.value.size>0,i=e.violations.filter((e=>!t||h.value.has(e.code)));d.value={violations:new Set(i),negotiationStage:e.negotiationStage}}
2))),[h,r,o,u,n,d,p]),{snapshot:d,violations:p,clearViolations:m}}function Fv(e){const{checkout:t,embed:n}=pe(),r=t.wallets.activeSession.value,i=t.latestReceipt.value,{delegatedPaymentInstrument:o}=tt(),[c,d]=u(),p=s(o.peek()),m=a((()=>{d(void 0)}),[]),h=a((t=>{e.has(t.code)?d(t.code):d(void 0)}),[e]);return l((()=>{r||"failed"===i?.status&&"payment"===i.failure?.type&&h(i.failure)}),[r,h,i]),l((()=>{if(!n)return;const e=o.value;e!==p.current&&(p.current=e,e&&d(void 0))}),[n,o.value]),{error:c,hasError:Boolean(c),clearError:m}}function Uv(e){if("failed"===e?.status&&"hsa_qualification"===e.failure.type&&"SURVEY_EXITED"!==e.failure.code)return e.failure}function qv(){const{checkout:e}=pe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=u((()=>t?void 0:Uv(n)));return l((()=>{t||i(Uv(n))}),[t,n]),{error:r,hasError:void 0!==r}}function jv(){const{checkout:e}=pe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=u(!1);return l((()=>{t||("failed"===n?.status&&"inventory"===n.failure?.type?i(!0):i(!1))}),[t,n]),{hasError:r}}function Hv(){const{checkout:e}=pe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=u(!1);return l((()=>{t||("failed"===n?.status&&"order"===n.failure?.type?i(!0):i(!1))}),[t,n]),{hasError:r}}function $v(e){const{allViolations:t}=ke();return i((()=>Boolean(t.value?.some((t=>t.code===e)))))}function Yv(e){return e?"object"==typeof e&&"value"in e?e.value&&"string"==typeof e.value?e.value:e.textValue?e.textValue:"":"string"==typeof e?e:"":""}function Wv(){const e=Pf(),{message:t,code:n}=function(){const{checkout:e}=pe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=u(null),[a,o]=u("");return l((()=>{t||n&&_v(n)&&("payment"===n.failure.type?(i(n.failure.code??null),o("payment_receipt_error")):o(`${n.failure.type}_receipt_error`))}),[n,t]),{hasError:Boolean(a),message:a,code:r}}();l((()=>{(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:i}=Ge();C((()=>{const t=r.name.value;t&&c((()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_name_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})}))})),C((()=>{const t=r.verificationValue.value;t&&c((()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_cvv_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})}))})),C((()=>{const t=r.number.value;t&&c((()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_number_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})}))})),C((()=>{const t=r.expiry.value;t&&c((()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_expiry_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})}))})),C((()=>{const t=i.value;t&&c((()=>{e("paymentError",{error:{message:t,code:"general_payment_error"},timestamp:new Date})}))}));const a=function(){const[e,t]=u([]),[n,r]=u(null),{violations:i}=Lv(new Set);return qc((e=>{"invalid"===e.type?r(e):r(null)})),l((()=>{let e=null;if(n){const t=n.reasons.filter((e=>e!==nn.InvalidAddress))[0];t&&(e={message:t,origin:"server",type:"negotiation"})}const r=[];Array.from(i).forEach((e=>{r.push({message:e?.localizedMessage??"",code:e?.code,origin:"server",type:"negotiation"})}));const a=[...r];e&&a.push(e),t(a.filter((e=>Boolean(e))))}),[n,i]),e}();l((()=>{a?.forEach((({message:t,code:n,field:r,origin:i,type:a})=>{e("violationError",{error:{message:Yv(t),code:n,field:r,origin:i,type:a},timestamp:new Date})}))}),[e,a]);const{deliveryMethodsAddressErrors:o}=tt(),s=function(e){const[t,n]=u(null),[r,i]=u([]);return C((()=>{Object.entries(e).forEach((([e,t])=>{const r=t.value;n((t=>{let n=null===t?{}:{...t};return r?n={...n,[e]:r}:delete n[e],0===Object.keys(n).length?null:n}))}))})),l((()=>
2{if(t){const e=[];Object.keys(t).forEach((n=>{const{message:r,origin:i,type:a}=t[n];e.push({message:r,code:void 0,field:n,origin:i,type:a})})),i(e)}}),[t]),r}(o);return l((()=>{s?.forEach((({message:t,code:n,field:r,origin:i,type:a})=>{(t||n||r||i||a)&&e("addressError",{error:{message:Yv(t),code:n,field:r,origin:i,type:a,silencedViolation:!1},timestamp:new Date})}))}),[e,s]),null}function Gv(e){return e}function Jv(e,t){if(t)return e.find((e=>e.deliveryStrategyHandle===t))}var Kv=(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))(Kv||{});function Qv(){const{client:e,shop:t}=pe();if(!t.hasFlagEnabled(_n))return null;const n=e.unstable_getSerialization("experiments");return bn(n)}function Xv(){const{shop:e}=pe(),t=e.hasFlagEnabled(Pn),n=e.hasFlagEnabled(_n);return t||n}function Zv(e){return"thankYou"===e?.type||"postPurchase"===e?.type}function e_(e,t){return void 0!==e.greenPath.find((e=>e.route===t))}const t_=()=>{const{i18n:e}=pe(),t=ke().paymentFlexibilityPaymentTermsTemplate,n=vt();return i((()=>{const r=t.value;return n.value&&!r?e.translate("notice_banner.payment_method_not_available_with_review_requirement"):r?"FULFILLMENT"===r.type?e.translate("notice_banner.payment_method_not_available_with_fulfillment_terms"):"NET"===r.type?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"):void 0}))},n_=ue("ShellContext");function r_({children:e,shell:t}){return h(n_.Provider,{value:t,children:e})}function i_(){return de(n_)}function a_(){const e=i_(),t=s();if(null!=t.current&&t.current.shell!==e&&(t.current=void 0),null==t.current){const n=new Map,r={};for(const t of Object.keys(e.configuration))Object.defineProperty(r,t,{enumerable:!0,get:()=>(n.has(t)||n.set(t,w((()=>e.configurationSignal.value[t]))),n.get(t).value)});t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function o_(){const{checkout:{configuration:e}}=pe(),{orderSummary:t}=a_(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return!n||"VISIBLE"===n}function s_(e){const{checkout:t,observability:n,router:r,shop:i}=pe(),s=void 0===e||(Array.isArray(e)?e:[e]).some((e=>i.hasFlagEnabled(e))),l=a((e=>{s&&(t.unstable_forceCheckoutLayoutToOnePage(),l_(n,{...e,result:"success"}))}),[t,s,n]),c=a(((e={wallet:null})=>{if(!s)return;if(!t.isCheckoutLayoutForcedToOnePage.value)return;const i={wallet:e.wallet};n.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:i}),n.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",i),r.navigate("/information",{replace:!0}),t.unstable_clearForcedCheckoutLayout()}),[t,s,n,r]);return o((()=>({forceOnePageCheckoutLayout:l,clearForcedCheckoutLayout:c})),[c,l])}function l_(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 c_(){const{i18n:e}=pe(),t=function(){const e=ke().paymentMethods,t=xn("paymentMethods");return i((()=>!(t.value||!e.value||0===e.value?.length)&&Boolean(e.value?.every((e=>"wallet"===e.type||"walletsPlatform"===e.type||"giftCard"===e.type)))))}(),{availableWallets:n}=Cn(),r=L(n);return i((()=>{if(!(r.value.length>0)&&t.value)return{code:Kv.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}}))}
2function u_(){const e=Ih(),t=i_(),n=Tm();return i((()=>{const r=e.configurationSignal.value.colors,i=t.configurationSignal.value.main,{current:a,parent:o}=n,s=[a,o].map((e=>e?r.schemes?.[e]?.base?.background:void 0)).find((e=>e&&!wn(e)));if(s)return s.l<50?"light":"dark";const l=i.colorScheme?r.schemes?.[i.colorScheme]?.base?.background:void 0;return l&&!wn(l)&&l.l<50?"light":"dark"})).value}function d_(){const{shop:{customerAccountRequirement:e}}=pe(),t=ke().buyerIdentity,{email:n}=Ge();return i((()=>{const r=Boolean(!!t.value?.customerProfile&&(t.value.customerProfile.email||n.value));return!("REQUIRED"===e||r)}))}function p_(){const{shop:e}=pe(),{deliveryNext:t}=ke(),{deliveryLines:n}=Ge(),r=Fc(),a=Ot("ONE_TIME_PURCHASE");return i((()=>{if(e.shipPickupInOneOrderEnabled){if(Zv(r.value.currentDetour))return kn(t.value);const e=n.value.filter((e=>!e.value.deliveryMethodTypes.includes("NONE")));return e.length>0&&e.every((e=>e.value.deliveryMethodTypes.some(Sn)))}const i=zt(a.value);return Sn(i?.methodType)}))}function m_(){const{checkout:e}=pe(),t=p_();return i((()=>!t.value&&e.isShippingRequired.value))}function h_(e){const t=ke().paymentMethods;return i((()=>t.value?.find((t=>"wallet"===t.type&&t.name===e))))}function g_(){const{client:e,shop:t,source:n,observability:r}=pe(),i=e.unstable_getSerialization("sessionToken");return a((({postalCode:e,countryCode:a,city:o,zoneCode:s},l)=>{const c={wallet:l,postalCode:e,countryCode:a,city:o,zoneCode:s,shopId:t.id,sourceId:n.sourceId,sourceType:n.type,checkoutSessionIdentifier:n.checkoutSessionIdentifier,sessionToken:i};yc(e,a)||r.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",c),Tn(e,a)&&r.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",c)}),[r,t.id,n.sourceId,n.type,n.checkoutSessionIdentifier,i])}function f_(){try{const e=window.__WALLET_TIMEOUT_MULTIPLIER;if(null==e)return 1;const t=Number(e);return!Number.isFinite(t)||t<1?1:Math.min(t,10)}catch{return 1}}function y_(){return 1e4*f_()}function v_(){return 45e3*f_()}function __(e){const t=e.inMemoryApplePayParts.paymentSheetError,n=e.inMemoryGooglePayParts.paymentSheetError;return i((()=>{const e=t.value;if("unusable_partial_address"===e?.type)return"APPLE_PAY";const r=n.value;return"unusable_partial_address"===r?.type?"GOOGLE_PAY":null}))}function b_({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:r,router:i,shop:a}=pe(),s=i.currentUrl.value,c=Xv(),u=a.hasFlagEnabled(_n),d=In(),p=a.hasFlagEnabled(oe),m=r.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:h}=s_(oe),{queryParam:g,errorMessage:f,errorTitle:y,tone:v}=function(e){const{i18n:t}=pe(),n=Xv(),r=t_().value,i=[{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:r||"",tone:"info",condition:()=>Boolean(r)},{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:En,errorMessage:t.translate("wallets.errors.subscription_review_required"),tone:"warning",condition:()=>n},...["wallet_cart_not_ready","localization_extension_field_error","wallet_processing_failed"].map((e=>({queryParam:e,errorTitle:t.translate("notice_banner.generic_processing_error.title"),errorMessage:t.translate("notice_banner.generic_processing_error.body"),tone:"critical"})))];for(const a of i)if(e.searchParams.has(a.queryParam)){if(a.condition&&!a.condition())continue;return{queryParam:a.queryParam,errorMessage:a.errorMessage||"",errorTitle:a.errorTitle,tone:a.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}(s),_=Qv(),b=g===En&&void 0!==t&&(n??vc({applePaySubscriptionsDecelerationActive:c,applePayThreePageVaultedReviewEnabled:p,isOnePageCheckout:m})),P=b;return l((()=>
2{if(g){b&&t&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&An({isABTestActive:u,variant:_,isCaliforniaBillingOrShippingAddress:d.value})?(m||h({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),r.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",r.wallets.setHasActiveApplePaySubscriptionReview(!0)):b&&void 0!==t?.value&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,r.wallets.setIsDecelerating(!1));const n=new URL(s);n.searchParams.delete(g),history.replaceState(null,"",n.href)}}),[e,t,_,s,h,u,d,m,g,P,b,n,r.wallets]),o((()=>({queryParam:g,errorMessage:f,errorTitle:y,tone:v,shouldSuppressNotice:P})),[g,f,y,v,P])}const P_=()=>a((e=>{const t=e.current;if(t){const e=t.getBoundingClientRect(),n=e.left+e.width/2,r=e.top+e.height/2;t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,clientX:n,clientY:r,screenX:window.screenX+n,screenY:window.screenY+r}))}}),[]);Nn.portableWallets.url;const k_="guest";function S_(e){const t=ke().paymentMethods;return i((()=>t.value?.find((t=>"walletsPlatform"===t.type&&t.name===e))))}function w_(e){const t=ke().paymentLines;return i((()=>t.value?.lines.find((t=>"walletsPlatformPaymentMethod"===t.method.type&&t.method.name===e))))}function C_(){const{email:e,shippingAddress:t,billingAddress:n,billingAddressOption:r,paymentLines:i}=Ge(),o=function(){const{checkout:e}=pe(),t=e.configuration.addressSettings.nonBillingAddressSettings;return a((function({addressSignal:e,buyerDetailsAddress:n}){N((()=>{for(const[r,i]of Object.entries(n)){if("__typename"===r||void 0===i)continue;if("InvalidWalletPrefillingAddress"===n.__typename&&!t.value.isVisible(r))continue;const a=e.fields[r];a&&(a.value=i)}}))}),[t])}();return a(((a,s)=>{s.email&&(e.value=s.email),s.prefillingShippingAddress&&o({addressSignal:t,buyerDetailsAddress:s.prefillingShippingAddress}),s.prefillingBillingAddress&&(r.value="custom",o({addressSignal:n,buyerDetailsAddress:s.prefillingBillingAddress})),s.walletParams&&function({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const i={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},a=e.peek();switch(t){case Rn.AmazonPay:case Rn.BuyWithPrime:{const[e]=vn(a,[t]),o=n;if(!e||!e.method.walletParams){i.method.walletParams={...o,...r?{email:r}:{}};break}const s=e.method.walletParams;i.method.walletParams={...s,...o,...r?{email:r}:{}}}}e.value=Mn(a,i)}({paymentLineSignal:i,walletName:a,walletParams:s.walletParams,email:s.email??void 0})}),[n,r,e,o,i,t])}function E_(e=["phone"]){const{shippingAddress:t}=Ge(),n=t.value;return{formattedAddress:Xy(n,{hiddenFields:e}),address:n}}function x_(){const e=S_(Rn.BuyWithPrime);return i((()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return Boolean(n)}))}var I_=(e=>(e.Api="ApplePay::Exception::API",e))(I_||{}),A_=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(A_||{}),T_=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(T_||{});function N_(e,t,n){return!("SHOP_PAY"===e&&!n)&&(t?.includes("ACCELERATED_CHECKOUT")??!1)}function L_(e){const{embed:t}=pe(),n=Boolean(t?.isFlagshipPartner)&&!Dn(t?.embedder),r=e.buttonStatus.value;return o((()=>"error"!==r.status&&"not_eligible"!==r.status&&(!n||"not_rendered"!==r.status)),[r.status,n])}function R_(e,t,n){try{return n()}catch(r){if(r instanceof Error&&"InvalidAccessError"===r.name)return e.log(`apple_pay_session_${t}_error`,`Apple Pay ${t} check failed from insecure context`,{errorName:"InvalidAccessError"}),!1;throw r}}function M_(e,t=0){const n="undefined"==typeof window?0:window.innerWidth;return n<=279?2:n<=375?e||3===t?3:2:4}function D_(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e}}=pe(),{shopPayEnabledForSellerOfRecord:t}=ke();return i((()=>t.value??e))}function O_(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:t}}=pe(),n=D_(),r=Vn(),{deferredTotal:a}=ke(),o=t.current;return i((()=>r.value&&a.value?"deferred_payment":"shopPay"===o.value&&e||n.value?void 0:"shop_pay_disabled"))}function z_(){const e=O_();return i((()=>void 0===e.value))}function B_(e){const{inMemoryGooglePayParts:t,inMemoryPayPalParts:n,inMemoryAmazonPayParts:r,inMemoryApplePayParts:c,inMemoryVenmoParts:u}=e,{value:d}=ke().paymentMethods,p=d?.some((e=>"wallet"===e.type&&"APPLE_PAY"===e.name))??!1,m=function(e){const t=__(e);return i((()=>null!==t.value))}(e);
2!function(e){const t=__(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=pe();l((()=>{const e=t.value;n.value||null===e||(r.leaveErrorBreadcrumb("Hiding some wallets due to unusable partial address",{wallet:e}),r.counter({name:"wallets_unusable_partial_address",value:1,attributes:{wallet:e.toString()}}),n.value=!0)}),[t.value,r,n])}(e);const h=m.value,g=function({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:r}=pe(),{shippingCountries:i}=r,a=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company"),s=e.sdkStatus.value,l=e.buttonStatus.value,c=n.configuration.layout.isOnePage.value,u=r.hasFlagEnabled(se);return o((()=>!(a&&!c&&!u||"error"===s.status||"error"===l.status||"not_eligible"===l.status||n.isShippingRequired.value&&0===i?.length||t&&!c)),[a,l.status,s.status,n.isShippingRequired,i?.length,c,u,t])}({hasUnusablePartialAddress:h,inMemoryGooglePayParts:t}),f=function({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const r=Jy().geolocation.country.code,{shop:i,observability:a,client:{userAgent:l},embed:c}=pe(),u=i.hasFlagEnabled(On)?c?.client?.embedderHostname:void 0,d=s(),p=Zf(),m=Vt().value,[h]=bg(),g=h.includes("PICKUP_POINT");return o((()=>!!e&&!t&&!n.sessionLoadFailed.value&&!!m&&!g&&function({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:i,embedderHostname:a}){if(Boolean("undefined"==typeof window||window.self!==window.top)){const e=r||Boolean(a),t=function(e){const t=zn(e);return Boolean("Safari"===t?.name&&t.version&&Number(t.version)>=17)}(i);if(!e||!t)return!1}
2const o=Boolean(window.ApplePaySession)&&R_(t,"hasOwnProperty",(()=>ApplePaySession.hasOwnProperty("canMakePayments")))&&function(e){return"function"==typeof ApplePaySession.supportsVersion&&R_(e,"supportsVersion",(()=>ApplePaySession.supportsVersion(Bn)))}(t);if(!o)return!1;const s=function(e,t){return void 0!==t.current?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}(t,n);return!!s&&("CN"!==e||function(e){const t=e.match(/(\((iPhone|iPad); CPU (iPhone )?OS ((\d+(_?)){1,3}))/g);if(!t)return!1;const n=t[0].match(/(\d+(_?)){1,3}/);if(!n)return!1;const[r,i]=n[0].split("_").map((e=>Number(e)));return void 0!==r&&(r>11||11===r&&void 0!==i&&i>=2)}(i))}({geolocatedCountryCode:r,observability:a,slowCanMakePaymentCache:d,isCheckoutEditor:p,userAgent:l,embedderHostname:u})),[e,t,n.sessionLoadFailed.value,m,g,r,a,d,p,l,u])}({hasApplePayPaymentMethod:p,hasUnusablePartialAddress:h,inMemoryApplePayParts:c}),y=function(e){const t=e.sdkStatus,n=e.buttonStatus;return i((()=>t.value.status!==T_.Error&&"error"!==n.value.status))}(r),v=y.value,_=function({inMemoryAmazonPayParts:e}){const t=function(){const e=ke().deliveryNext;return i((()=>{const t=e.value;if(!t||"unavailable"===t.status)return!1;const n=t.lines.filter(Ke);if(1!==n.length)return!1;const[r]=n;return!!r&&r.methods.some((e=>"LOCAL"===e.methodType))}))}(),n=x_(),r=e.sdkStatus,a=e.buyWithPrimeButtonStatus;return i((()=>n.value&&!t.value&&r.value.status!==T_.Error&&"error"!==a.value.status))}({inMemoryAmazonPayParts:r}).value,b=i((()=>function(e){const{status:t}=e;return"error"!==t&&"not_eligible"!==t}(u.buttonStatus.value))).value,P=function(e){const t=e.buttonStatus.value.status;return a((e=>{if("APPLE_PAY"!==e.name||"error"!==t)return e;const n=e.placements?.filter((e=>"ACCELERATED_CHECKOUT"!==e));return n?.length?{...e,placements:n}:void 0}),[t])}(c),k=function(e){const t=e.acceleratedCheckoutButtonStatus.value,n=e.payWithPayPalButtonStatus.value;return a((e=>{if("PAYPAL_EXPRESS"!==e.name)return e;if(!e.placements||0===e.placements.length)return;const r=e.placements.filter((e=>!("ACCELERATED_CHECKOUT"===e&&"error"===t.status||"PAYMENT_METHOD"===e&&"error"===n.status)));return 0!==r.length?{...e,placements:r}:void 0}),[t.status,n.status])}(n),S=z_().value,{client:{userAgent:w}}=pe(),C=o((()=>{const e=function(){const e=d?.filter((e=>("wallet"===e.type||"walletsPlatform"===e.type)&&function(e){const t=e.name;switch(t){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return f;case"GOOGLE_PAY":return g;case Rn.BuyWithPrime:return _;case Rn.AmazonPay:return v;case"SHOP_PAY":return S;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return b;default:return R(t)}}(e)))??[];return V_(e)}().flatMap((e=>k(e)??[])).flatMap((e=>P(e)??[])),t=function({maxWalletButtonCount:e,userAgent:t}){if(""===t)return Fn;function n(t=[]){const n=t.indexOf(Rn.BuyWithPrime);-1!==n&&(n<e||(t.splice(n,1),t.splice(e-1,0,Rn.BuyWithPrime)))}if(t.match(/Apple Mail|Chromium|Crosswalk|Dragon|Electron|; MSIE xyz;|Trident 7.0|.\*rv|Pale Moon|Puffin|QQ Browser|SeaMonkey|Sogou Explorer|UC Browser|Vivaldi/i))return["SHOP_PAY","PAYPAL_EXPRESS",Rn.BuyWithPrime,Rn.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",Rn.BuyWithPrime,Rn.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",Rn.BuyWithPrime,Rn.AmazonPay,"VENMO"];return n(e),e}if(t.match(/CFNetwork|Chrome Mobile iOS|Coc Coc|Googlebot|Maxthon|Safari|Mobile Safari|Mobile Safari UI\/WKWebView|Oper Mini|Pinterest|Shopify Mobile/i)||t.match(/Safari/i)&&!t.match(/Chrome/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",Rn.BuyWithPrime,Rn.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}if(t.match(/Amazon Silk|Chrome|Chrome Mobile WebView|Chrome Mobile|Opera|Opera Mobile|Samsung Internet/i))return["SHOP_PAY","PAYPAL_EXPRESS",Rn.BuyWithPrime,Rn.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",Rn.BuyWithPrime,Rn.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}return t.match(/IE/),["SHOP_PAY","PAYPAL_EXPRESS",Rn.BuyWithPrime,Rn.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}({maxWalletButtonCount:M_(S,e.length),userAgent:w});return e.sort(((e,n)=>t.indexOf(e.name)-t.indexOf(n.name)))}),[d,f,g,_,v,b,P,k,S,w]);return C}const V_=e=>e.find((e=>e.name===Rn.BuyWithPrime))?e.filter((e=>e.name!==Rn.AmazonPay)):e;function F_(){const e=ke().paymentMethods,t=xn("paymentMethods");return i((()=>!(t.value||!e.value||0===e.value?.length)&&Boolean(e.value?.some((e=>"wallet"===e.type||"walletsPlatform"===e.type)))))}function U_(){const{checkout:e,source:t}
2=pe(),{didIncrementUnusablePartialAddressMetric:n,inMemoryGooglePayParts:r,inMemoryPayPalParts:a,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=Cn(),u=L(B_({inMemoryGooglePayParts:r,inMemoryPayPalParts:a,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:n})),d=L(L_(c)),p=i((()=>u.value?.filter((({placements:e,name:t})=>N_(t,e,d.value))).length)),m=F_();return i((()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||"simulated"===t.type&&!p.value&&m.value)))}const q_=_({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function j_({children:e}){const t=H_();return h(q_.Provider,{value:t,children:e})}function H_(){const e=U_(),{shop:{acceptTipPayments:t},checkout:n}=pe(),r=n.configuration.layout.isOnePage.value,i=Hn(n.identity.current.value),a=!xn("isShippingRequired").value&&!n.isShippingRequired.value;return o((()=>function({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:i}){const a=new Set(jn),o=new Set([...Un,...qn]),s=new Set;return e&&!i||s.add("WALLETS1"),r&&s.add("DELIVERY1"),(r||t)&&s.add("DELIVERY2"),t&&(s.add("INFORMATION3"),n||r||(s.add("PAYMENT3"),s.add("PAYMENT4")),(!n&&r||n&&!r)&&s.add("PAYMENT4")),{swappable:a,fixed:o,disabled:s,supported:new Set([...o,...a])}}({showExpressCheckout:e.value,isOnePageCheckout:r,acceptTipPayments:t,disableDeliveryExtensions:a,isVaultedWalletIdentity:i})),[t,a,i,r,e.value])}const $_=new Map([["thankYou",[...Un,...qn]]]),Y_=x({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>Dl((()=>import("./33682ee7.lVRoaHTe.js")),__vite__mapDeps([12,1,7,2,3,4,5,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,8,9]))});function W_(e){const{checkout:{extensibility:{ui:t}}}=pe();return h(j_,{children:h(A,{when:t.enabled,fallback:e.children,children:h(Y_,{...e})})})}const G_=ue("PostPurchaseContext");function J_({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:r}=pe(),i=r.currentUrl.value,a=o((()=>{const e=new URLSearchParams(i.search),t=e.get("script_url"),r=e.get("api_key")||e.get("post_purchase_dev_api_key"),a=e.get("config")??void 0;return n&&t&&r?{scriptUrl:t,apiKey:r,config:a}:void 0}),[n,i.search]),s=n&&Boolean(a),l=o((()=>{const e=new URLSearchParams(i.search),t=e.get("uuid"),r=e.get("socket_url");return n&&t&&r?{uuid:t,socketUrl:r}:void 0}),[n,i.search]),c=o((()=>{const e=`https://${i.host}/checkouts/unstable/changesets`;return{extensionAvailable:t,postPurchaseEnabled:t||s,developmentMode:s,developmentOptions:a,liveReload:l,changesetsUrl:e}}),[t,s,a,l,i.host]);return h(G_.Provider,{value:c,children:e})}const K_={addressModalState:{status:"idle",addressType:"shipping",setAsDefault:"default"}};function Q_(e){return e[0]?.localizedMessage??e[0]?.nonLocalizedMessage}function X_(e,t){return e?.countryCode||t?.countryCode}function Z_(e){return e.some((e=>"ConfirmChangeViolation"===e.__typename&&"TAX_TAX_INCLUSIVITY_MISMATCH"===e.code))}function eb(e){return X_(e.shippingAddress.peek(),e.locationAddress.peek())}function tb(e,t,n){const r="NegotiationResultAvailable"===e?.__typename&&e?.sellerProposal||"SubmitRejected"===e?.__typename&&e?.sellerProposal||void 0,i=[];null!=r&&"PendingTerms"!==r.buyerIdentity.__typename||i.push("contactInfo","shippingAddress","buyerIdentity"),null!=r&&"PendingTerms"!==r.delivery.__typename&&"PendingTerms"!==r.deliveryDiscount?.__typename&&"PENDING"!==r.remote?.consolidated.delivery.termsStatus||i.push("billingAddress","deliveryNext"),null!=r&&"PendingTerms"!==r?.deliveryExpectations?.__typename||i.push("deliveryExpectations"),null!=r&&"PendingTerms"!==r.payment.__typename&&"PENDING"!==r.remote?.consolidated.payment.termsStatus||i.push("paymentLines","paymentMethods");const a=Z_(t??[]);return(null==r||"PendingTerms"===r.merchandise.__typename||a||"PendingTerms"===r?.merchandiseDiscount?.__typename)&&i.push("merchandiseLines"),null!=r&&"PendingTerms"!==r.tax.__typename||i.push("taxes","duties"),"PendingTerms"===r?.taxExemptions?.__typename&&i.push("taxExemptions"),null!=r&&"PENDING"!==r.remote?.consolidated.taxes.termsStatus||i.push("remoteTaxDetails"),null!=r&&"PendingTerms"!==r?.deliveryDiscount?.__typename&&"PendingTerms"!==r?.merchandiseDiscount?.__typename||i.push("discountLines","totalSavings"),"PendingTerms"===r?.captcha?.__typename&&i.push("captcha"),"PendingTerms"===r?.availableRedeemables?.__typename&&i.push("availableRedeemables"),"PendingTerms"===r?.shopCashBalance?.__typename&&i.push("shopCashBalance"),"PendingTerms"===r?.shopPromotion?.__typename&&i.push("shopPromotion"),"PendingTerms"===r?.shopDiscountOffer?.__typename&&i.push("shopDiscountOffer"),null==r&&i.push("subtotal","runningTotal","total"),"FilledDiscountTerms"===r?.merchandiseDiscount?.__typename&&0===r?.merchandiseDiscount?.lines?.length&&n&&i.push("reduction"),"PendingTerms"===r?.cartCheckoutValidation?.__typename&&i.push("cartCheckoutValidation"),"PendingTerms"===r?.memberships?.__typename&&i.push("memberships"),i}const nb="8b9035807842a4e4dbe009f3f1478127",rb=(e,t)=>{const n=e.some((e=>e.id===nb)),r=t.find((e=>e.id===nb)),i=new Set(e);return!n&&r&&i.add(r),Array.from(i)};let ib;function ab(e){return e.filter((e=>"ApplyChangeViolation"===e.__typename&&Jn.has(e.code)))}function ob(e){return e.filter((e=>"UnprocessableTermViolation"===e.__typename&&!Wn.has(e.code)))}
2function sb(e){return e.filter((e=>"ConfirmChangeViolation"===e.__typename&&Gn.has(e.code)))}function lb(e){return e.filter((e=>"RemoveTermViolation"===e.__typename&&dn.has(e.code)))}function cb(e){const t=ob(e),n=sb(e),r=ab(e),i=lb(e);return{unprocessableTermViolations:t,unprogressableChangeViolations:n,applyChangeViolations:r,removeTermViolations:i,hasAny:t.length>0||n.length>0||r.length>0||i.length>0}}function ub(e,t={}){return"filled"!==e.status?[]:e.memberships.filter((e=>!t.onlyApplied||e.apply)).map((e=>e.handle))}function db(e,t,n){return Kn(e.address,t)&&n.includes(e.handle)}const pb=/^\$.merchandiseDiscount.lines\[(\d+)\]$/,mb=/^\$.memberships.memberships\[(\d+)\]$/;function hb(e,t,n,r){const i=cb(e);if(!i.hasAny)return{hasErrors:!1,requiresRenegotiation:!1};!function(e,t){e.some(Qn)||e.forEach((e=>{const{code:n,localizedMessage:r,nonLocalizedMessage:i}=e,a=r||i;!function(e){const t=e.paymentLines.peek().find((({method:e})=>"direct"===e.type));if(t){const n=t.method.paymentMethodIdentifier;e.directPaymentErrors.paymentMethodIdentifier.value=n}}(t);const o={message:a,origin:"server"};Xn.has(n)?t.directPaymentErrors.number.value=o:Zn.has(n)?t.directPaymentErrors.name.value=o:er.has(n)?t.directPaymentErrors.expiry.value=o:tr.has(n)?t.directPaymentErrors.verificationValue.value=o:nr.has(n)?t.directPaymentErrors.general.value=o:rr(e)||ir(e)||"$.payment"===e.target&&(t.generalPaymentError.value=a,t.generalPaymentErrorCode.value=n)}))}(i.unprocessableTermViolations,t);const a=function(e,t,n,r){let i=!1;const a=new Set;if(e.forEach((e=>{const o=pb.exec(e.target);if(o&&o[1]){const e=parseInt(o[1],10);e<(t.discountLines.peek()||[]).length&&(a.add(e),i=!0)}if(ar.has(e.code)){const a=t.shippingAddress.peek(),o=t.memberships.peek();if(!o||"filled"!==o.status)return;const s=ub(o);if(!s.length)return;const l=function(e,t,n,r){return t.some((t=>e.code===t.violation.code&&db(t,n,r)))}(e,n.cachedMembershipViolations.value,a,s);if(l)return;const c=function(e,t){const n=mb.exec(e);if(n&&n[1]){const e=parseInt(n[1],10),r=t.memberships[e];if(r)return r.handle}return null}(e.target,o),u=c?[c]:s;if(0===u.length)return;u.forEach((t=>{n.cachedMembershipViolations.value.push({violation:e,address:a,handle:t})})),r.counter({name:"membership_violation_renegotiation",value:1,attributes:{violation_code:e.code}}),i=!0}})),a.size>0){const e=t.discountLines.peek()||[];t.discountLines.value=e.filter(((e,t)=>!a.has(t)))}return i}(i.applyChangeViolations,t,n,r);return{hasErrors:!0,requiresRenegotiation:a}}function gb(e){const t={};return e.forEach((e=>{t[e.code]=(t[e.code]||0)+1})),t}function fb({observability:e,negotiationStage:t,silenceViolations:n,violations:r,retainedViolations:i,reportedCodes:a}){const o=Object.entries(function(e,t){const n=gb(t);return Object.entries(gb(e)).reduce(((e,[t,r])=>{const i=r-(n[t]??0);return i>0&&(e[t]=i),e}),{})}(or(r),i)).filter((([e])=>!a.has(e)));0!==o.length&&(o.forEach((([n])=>{a.add(n),e.counter({name:"negotiation_violation_silenced",value:1,attributes:{code:n,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(o)}))}function yb(e){const t=ab(e),n=ob(e),r=sb(e),i=lb(e),a=function(e){return e.filter((e=>"AcceptNewTermViolation"===e.__typename))}(e),o=function(e){return e.filter((e=>"InputValidationError"===e.__typename))}(e),s=function(e){return e.filter((e=>"UnresolvableTermViolation"===e.__typename))}(e),l=new Set([t,n,r,i,a,o,s].flatMap((e=>e.map((e=>e.code))))),c=e.filter((e=>!l.has(e.code)));return{autoResolved:gb(t),blockingProgress:gb(n),informational:gb(r),removingItems:gb(i),mustAcceptTerms:gb(a),invalidInputs:gb(o),unresolvable:gb(s),other:gb(c)}}const vb="cart";function _b(e,t){e&&"cartNext"===e.type&&t.delete(vb)}function bb(e){const t={...e,queueToken:void 0,taxes:void 0,checkpointData:void 0,scriptFingerprint:void 0,transformerFingerprintV2:void 0};return JSON.stringify(t,((e,t)=>{if("destinationChanged"!==e&&"emailChanged"!==e&&"signedHandle"!==e)return t}))}function Pb({client:e,url:t,source:n,configuration:r}){if(_b(n,e.cookies),r.allowRedirectToStorefront){const e="cartNext"===n.type;window.location.assign(e?t.storefront("cart/clear"):t.storefront())}}
2class kb extends Error{constructor(){super(...arguments),this.name="RejectedNegotiationRequest"}}class Sb{constructor(e=new Set,{suppressSelfWrites:t=!1}={}){this.changedParts=e,this.deliveryLineSnapshots=new Map,this.applyingUpdate=!1,this.suppressSelfWrites=t}subscribeToChanges(e){const t=[],n=e=>{let n=!1;const r=e.subscribe((()=>{const t=this.suppressSelfWrites&&this.applyingUpdate;n&&!t&&this.changedParts.add(e),n=!0}));t.push(r)};this.deliveryLines=e.deliveryLines,this.deliveryLines&&this.captureDeliveryLineSnapshots(this.deliveryLines);for(const r of Object.values(e))if(sr(r))for(const e of Object.values(r.fields))n(e);else r instanceof M&&n(r);return()=>{t.forEach((e=>e()))}}applyUpdate(e,t){this.applyingUpdate=!0;try{this.applyUpdateTracked(e,t)}finally{this.applyingUpdate=!1}}applyUpdateTracked(e,t){if(e===this.deliveryLines&&this.deliveryLinesChanged()&&this.changedParts.add(e),sr(e)){const n=[];return N((()=>{for(const[r,i]of Object.entries(e.fields)){if(this.changedParts.has(i))continue;const e=t[r];e&&i.peek()!==e&&(i.value=e),n.push(r)}})),void e[lr](n)}e instanceof M&&!this.changedParts.has(e)&&(e.value=t,e===this.deliveryLines&&this.captureDeliveryLineSnapshots(this.deliveryLines))}deliveryLinesChanged(){for(const[e,t]of this.deliveryLineSnapshots)if(!Object.is(t,e.value))return!0;return!1}captureDeliveryLineSnapshots(e){this.deliveryLineSnapshots.clear(),this.deliveryLineSnapshots.set(e,e.value);for(const t of e.value)this.deliveryLineSnapshots.set(t,t.value)}}class wb{#O=Promise.resolve();async run(e){const t=this.#O;let n;this.#O=new Promise((e=>{n=e})),await t;const r=setTimeout(n,1e4);try{return await e()}finally{clearTimeout(r),n()}}}class Cb extends Map{constructor(){super(...arguments),this.subscriptions=new Set}subscribe(e){return this.subscriptions.add(e),e(this),()=>this.subscriptions.delete(e)}clear(){super.clear(),this.subscriptions.forEach((e=>e(this)))}delete(e){const t=super.delete(e);return this.subscriptions.forEach((e=>e(this))),t}set(e,t){return super.set(e,t),this.subscriptions.forEach((e=>e(this))),this}}class Eb{constructor(e,n,r,i,a,o,s,l,c,u,d,p,m,h,g,f,y,v,_=[]){this.graphql=e,this.client=n,this.sessionToken=r,this.source=i,this.router=a,this.url=o,this.throttle=s,this.blocked=l,this.checkout=c,this.persistenceManager=u,this.lastJourneyProgression=d,this.lastNegotiation=p,this.context=m,this.validationErrors=h,this.observability=g,this.userEvents=f,this.shopPay=y,this.shop=v,this.submitting=E(!1),this.hasNegotiatedOnce=E(!1),this.pendingFieldsNegotiation=E(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 Cb,this.negotiationRequestSerializer=new wb,this.inFlightRunCount=0,this.outstandingRunFailures=[];const b=new Set(_);this.initialUnresolvedFields=E(b),this.loading=E(new Set(b)),this.isBlocked=this.blocked,this.actions=function(e,n){async function r(){return ib||(ib=t((()=>Dl((()=>import("./2b0dcdd4.DqqBcFf2.js")),__vite__mapDeps([54,2,1,3,4,5,55,56,57,51,6,58,59,60,61,62,7,8,9])))),ib)}return"undefined"!=typeof window&&("function"==typeof window.requestIdleCallback?window.requestIdleCallback(r):window.setTimeout(r,0)),{complete:async t=>(await r()).complete(e,n,t),getNegotiationInput:async()=>(await r()).getNegotiationInput(e),negotiate:async function*(t){const i=await r();yield*i.negotiate(e,n,t)}}}(this,g);const P=cr(i),k=this.persistenceManager?.createUpdate(Mt.PostPurchaseInquiryStatus,{scope:P});k&&this.parts.postPurchaseInquiryStatus.subscribe((e=>k(e)));const S=this.persistenceManager?.createUpdate(Mt.ExternalDeliveryIds,{scope:P});S&&this.parts.externalDeliveryIds.subscribe((e=>S(e)));const w=this.persistenceManager?.createUpdate(Mt.ShopPayArtifact,{scope:P});w&&this.parts.shopPayArtifact.subscribe((e=>w(e)));const C=this.persistenceManager?.createUpdate(Mt.SetShippingAddressAsDefault,{scope:P});C&&this.parts.setShippingAddressAsDefault.subscribe((e=>{void 0!==e&&C(e)}))}get keepReconcilerAliveAcrossPolls(){return this.shop.hasFlagEnabled(ur)}get current(){return this.checkout.proposal.negotiated}get parts(){return this.checkout.proposal.proposed}get facts(){return this.checkout.proposal.facts}alreadySubmittedInterceptor(){const e=this.checkout.latestReceipt.value;return e&&"failed"!==e.status&&"abandoned"!==e.status?{behavior:"block",reason:nn.SubmittedForCompletion}:{behavior:"allow"}}async runInterceptors({forceBlock:e=!1,negotiationStage:t,skipEffects:n=!1}){const r=[this.alreadySubmittedInterceptor.bind(this),...this.interceptors],i=await Promise.all(r.map((async e=>e({parts:this.parts,reason:t})))),a=i.filter((e=>"block"===e.behavior)),o=a.map((e=>e.reason)),s=i.flatMap((e=>e.errors??[])),l=i.flatMap((e=>e.context??[])),c=e||a.length>0?{behavior:"block",reasons:o,errors:s,context:l}:{behavior:"allow",errors:s,context:l};return n||await Promise.all(i.map((e=>e.perform?.(c)))),c}intercept(e){return this.interceptors.add(e),()=>this.interceptors.delete(e)}async runListeners(e){await Promise.all([...this.listeners].map((t=>t(e))))}listen(e){return this.listeners.add(e),()=>this.listeners.delete(e)}async runBeforeNegotiationListeners(e,t){await Promise.all([...this.beforeNegotationListeners].map((n=>void 0===t?n(e):n(e,t))))}listenBeforeNegotiation(e){return this.beforeNegotationListeners.add(e),()=>this.beforeNegotationListeners.delete(e)}block(){return 0===this.blockCount&&(this.blocked.value=!0),this.blockCount+=1,()=>{this.blockCount-=1,0===this.blockCount&&(this.blocked.value=!1)}}async complete(e){await this.waitForPendingNegotiations(e),++this.negotiationRunCount;const t=await this.actions.complete(e);
2if("rejected"===t.status||"failed"===t.status||"fetch_failed"===t.status||"tooManyRequests"===t.status){const{inventoryRecoverySignal:e}=this.context,t=e.value;t&&!t.dismissed&&(e.value={...t,dismissed:!0})}return t}async getNegotiationInput(){return this.actions.getNegotiationInput()}start(){const e=this.startNegotiationRound();let t;const n=()=>null==t?e===this.negotiationCount:t===this.negotiationRunCount;return{isActive:n,negotiating:(e=Object.keys(this.current.fields))=>{this.negotiationRunCount+=1,t=this.negotiationRunCount,this.loading.value=new Set(e);const r=this.keepReconcilerAliveAcrossPolls;this.releaseReconcilerSubscription?.();const i=new Sb(void 0,{suppressSelfWrites:r}),a=i.subscribeToChanges(this.parts);return r&&(this.releaseReconcilerSubscription=a),({updated:e,loadingFields:t=[],buyerProposal:o})=>{r||a(),n()&&this.negotiated({updated:e,loadingFields:t,buyerProposal:o,reconciler:i})}}}}serializeNegotiationRequest(e){return this.negotiationRequestSerializer.run(e)}track(e){const t=this.lastVariables;return this.lastVariables=e&&bb(e),{dirty:null==this.lastVariables||this.lastVariables!==t}}collectPendingNegotiationEventIds(e,t){const n=[];return this.pendingNegotiationsRequests.forEach(((r,i)=>{(i===e||!r.negotiationCustomized&&this.canResolvePendingNegotiation(t,r.negotiationStage))&&null!=r.eventId&&n.push(r.eventId)})),n}hasPendingThreePageWalletEscalation(){return[...this.pendingNegotiationsRequests.values()].some((e=>!0===e.threePageWalletEscalation))}negotiate(e){const t={...e,identifier:e.identifier??Symbol("negotiationRequest"),negotiationStage:e.negotiationStage??"progression"},{identifier:n}=t;if([...this.pendingNegotiationsRequests.values()].some((e=>"progression"===e.negotiationStage))){const e=t.negotiationStage;t.negotiationStage="progression",this.observability.leaveErrorBreadcrumb("[Negotiate] Negotiation stage inherited from pending progression",{originalStage:e})}const r=new Promise(((e,r)=>{const i=this.pendingNegotiationsRequests.get(n);i&&i.reject(new kb),this.pendingNegotiationsRequests.set(n,{fieldsToResolve:t.fieldsToResolve,threePageWalletEscalation:t.threePageWalletEscalation,negotiationStage:t.negotiationStage,negotiationCustomized:Boolean(t.customizeNegotiation),silenceViolations:t.silenceViolations,eventId:t.reason?.eventId,resolve:e,reject:r}),this.observability.leaveErrorBreadcrumb("[Negotiate] Negotiation request added to pending negotiations",{negotiationStage:t.negotiationStage,fieldsToResolve:t.fieldsToResolve,queueSize:this.pendingNegotiationsRequests.size})}));return this.observability.leaveErrorBreadcrumb("[Negotiate] Running negotiation",{silenceViolations:t.silenceViolations,negotiationStage:t.negotiationStage,negotiationCount:this.negotiationCount}),this.inFlightRunCount+=1,this.runNegotiation(t).catch((e=>{e instanceof Error&&(this.outstandingRunFailures.push({error:e,negotiationStage:t.negotiationStage}),this.pendingNegotiationsRequests.get(n)?.reject(e),this.pendingNegotiationsRequests.delete(n))})).finally((()=>{this.settleRun()})),r}startNegotiationRound(){this.negotiationCount+=1;const e=this.negotiationCount;return this.observability.histogram({name:"negotiation_round",value:e}),e>=50&&!this.hasReportedExcessiveNegotiationRounds&&(this.hasReportedExcessiveNegotiationRounds=!0,this.observability.log("negotiation_rounds_excessive","Checkout has run an unusually high number of negotiation rounds",{negotiationRound:e,threshold:50})),e}async waitForPendingNegotiations(e){const t=this.pendingNegotiationsRequests.size;if(0===t)return;this.observability.leaveErrorBreadcrumb("[Complete] Completion waiting for negotiation queue to clear",{queueSize:t}),e?.setProgressing?.(!0);const n=setTimeout((()=>{this.observability.log("complete_waiting_for_negotiation_queue_still_waiting","[Complete] Negotiation queue still waiting after 5 seconds",{queueSize:this.pendingNegotiationsRequests.size})}),5e3);await new Promise((e=>{this.pendingNegotiationsRequests.subscribe((t=>{0===t.size&&(clearTimeout(n),e())}))})),this.observability.leaveErrorBreadcrumb("[Complete] Negotiation queue empty - continuing with completion")}async runNegotiation(e){const{identifier:t}=e,n=(t,n,r)=>{let i=n;if("violations"in n&&t.silenceViolations!==e.silenceViolations){const r=Er(n.violations,t.silenceViolations);fb({observability:this.observability,negotiationStage:t.negotiationStage,silenceViolations:t.silenceViolations,violations:n.violations,retainedViolations:r,reportedCodes:this.reportedSilencedViolationCodes});const a=n.status,o=cb(r).hasAny?"error":"success";a!==o&&this.observability.leaveErrorBreadcrumb("[RunNegotiation] Re-filtering violations changed status for cross-resolved request",{originalStatus:a,newStatus:o,requestSilenceViolations:t.silenceViolations,currentSilenceViolations:e.silenceViolations}),i={...n,status:o}}t.resolve(i),this.pendingNegotiationsRequests.delete(r)};for await(const r of this.actions.negotiate(e))if("stale"!==r.status){if("pendingFields"in r&&0===r.pendingFields?.length){const e=this.pendingNegotiationsRequests.get(t);e&&n(e,r,t)}if("fetch_failed"===r.status&&r.networkError){const e=this.pendingNegotiationsRequests.get(t);e&&(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}),n(e,r,t))}
2else this.pendingNegotiationsRequests.forEach(((t,i)=>{const a=this.loading.peek();if("progression"===t.negotiationStage&&"invalid"===r.status)return void n(t,r,i);if(t.fieldsToResolve?.some((e=>a.has(e)))||a.has("cartCheckoutValidation")&&!e.skipStateUpdates)return void this.observability.leaveErrorBreadcrumb("[RunNegotiation] Ignoring negotiation result");const o=e.negotiationStage,s=t.negotiationStage,l=this.canResolvePendingNegotiation(o,s);this.observability.debug("negotiation_evaluated","[RunNegotiation] Evaluating negotiation",{shouldResolve:l,requestStage:s,currentStage:o}),l?(this.observability.log("negotiation_evaluated","[RunNegotiation] Resolving pending negotiation request for pending request",{requestStage:s,currentStage:o,withResultStatus:r.status}),n(t,r,i)):this.observability.leaveErrorBreadcrumb("[RunNegotiation] Not resolving pending negotiation request for pending request",{requestStage:s,currentStage:o,withResultStatus:r.status})}))}else if(null!=e.customizeNegotiation){const e=this.pendingNegotiationsRequests.get(t);e&&n(e,r,t)}}negotiated({updated:e,loadingFields:t=[],buyerProposal:n,reconciler:r}){for(const s of Object.keys(e)){let t,i,a,o=e[s];switch(s){case"contactInfo":o=e[s].email??this.parts.email.peek(),t=this.parts.email;break;case"acceptSmsMarketing":case"acceptEmailMarketing":null!=o&&(t=this.parts[s]);break;case"smsMarketingPhone":break;case"deliveryNext":{const r=e[s],l=!1===this.current.fields.isShippingRequired.peek()&&!0===e.isShippingRequired,c="unavailable"===r.status,u=c&&l&&"FilledMerchandiseTerms"===n?.merchandise.__typename;if(!c||u){const{parts:s}=this,l=this.context.enabledDeliveryMethodsSignal.peek();if(l.length&&!e.sellability?.enabledDeliveryMethods.length){const t={enabledDeliveryMethods:l};void 0===e.sellability&&(t.missingSellerProposalReason="negotiated_update_sellability_missing"),Pr(this.observability,"negotiator_delivery_line_fallback","[Negotiated] Falling back to enabledDeliveryMethods for delivery line construction because sellability was not available",t)}const u=e.sellability?.enabledDeliveryMethods??[],d=u.length>0?u:l,p=u.filter((e=>"NONE"!==e)),m=p.length>0?p:l.filter((e=>"NONE"!==e)),h=c?{kind:"recover",deliveryNext:r,enabledDeliveryMethods:m,buyerProposalDelivery:void 0,deliveryMacros:[]}:{kind:"reconcile",deliveryNext:r,enabledDeliveryMethods:d,buyerProposalDelivery:n?.delivery,deliveryMacros:r.deliveryMacros??[]};if("recover"===h.kind&&0===h.enabledDeliveryMethods.length)break;t=s.deliveryLines;const g=s.deliveryLines.peek(),f=e.mustSelectProvidedShippingRate??this.current.fields.mustSelectProvidedShippingRate.value??!1,y=f&&g.length>0?g.map((e=>e.peek())):kr({negotiatedDeliveryNext:h.deliveryNext,enabledDeliveryMethods:h.enabledDeliveryMethods,buyerProposalDelivery:h.buyerProposalDelivery,negotiatedMerchandise:e?.remoteMerchandiseDetails?.stableIdToShopId?.size?e.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise:n?.merchandise,mustSelectProvidedShippingRate:f}),v=Sr(h.buyerProposalDelivery);o=("recover"===h.kind||0===h.deliveryNext.lines.length?y:wr({negotiatedDeliveryNext:h.deliveryNext,enabledDeliveryMethods:h.enabledDeliveryMethods,existingProposedDeliveryLines:g.map((e=>e.peek())),fallbackToFirstDeliveryMethod:!1,mustSelectProvidedShippingRate:f,buyerDeliveryOptionsMap:v,negotiatedMerchandiseLines:e.merchandiseLines?.lines})).map((e=>Cr(e))),a=s.deliveryMacros;const _=s.deliveryMacros.peek();i=rb(h.deliveryMacros,_)}break}case"merchandiseLines":{const r=this.parts[s].peek(),i=e.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise,a=Boolean(e?.remoteMerchandiseDetails?.stableIdToShopId?.size),l=a?i?vr(i,r):r:n?vr(n?.merchandise,r):r,c=a?i:n?.merchandise;
2c&&(this.context.missingMerchandiseStableIdsSignal.value=_r(c)),o=br({proposedMerchandise:l,negotiatedMerchandiseLines:e.merchandiseLines}),t=this.parts[s];break}case"cartMetafields":o=yr(n?.cartMetafields),t=this.parts[s];break;case"discountLines":o=e[s].lines,t=this.parts[s];break;case"tipLines":default:t=this.parts[s];break;case"availableRedeemables":o=e[s]??[],t=this.parts[s];break;case"localizationExtensions":{const n=e[s];if(t=this.parts[s],t){const e=t.peek();o=fr(e,n??[])}break}case"paymentLines":{const n=e[s],r=this.parts[s].peek(),i=pr(this.shop),a=i?(()=>{const t=("merchandiseLines"in e?e.merchandiseLines?.lines:this.current.fields.merchandiseLines.peek()?.lines)??this.parts.merchandiseLines.peek(),n=("paymentFlexibilityPaymentTermsTemplate"in e?e.paymentFlexibilityPaymentTermsTemplate:this.current.fields.paymentFlexibilityPaymentTermsTemplate.peek())?.type;return{hasSellingPlan:hr(t),hasFixedSellingPlan:mr(t),paymentTermsTemplateType:n}})():{};o=gr({paymentLines:n.lines,proposedPaymentLines:r,availablePaymentMethods:e.paymentMethods,violations:e.allViolations,url:this.router.currentUrl.value,deferredTotal:e.deferredTotal,shouldNotSetInitialState:this.shop.paymentMethodAutoSelectionDisabled,fixSubscriptionRedeemablePaymentAmount:i,...a,isImmediateAmountReducedForRedeemables:e.isImmediateAmountReducedForRedeemables,observability:this.observability,delegatedPaymentInstrument:this.context.delegatedPaymentInstrument.peek(),bankPaymentToken:this.context.bankPaymentTokenSignal.peek()}),t=this.parts[s];break}case"billingAddress":o={...this.parts.billingAddress.peek(),...o},t=this.parts.billingAddress;break;case"remotePaymentDetails":t=this.parts[s],o=e.remotePaymentDetails;break;case"shippingAddress":{const e=this.parts.shippingAddress.peek(),n=o;o={city:"",postalCode:"",...e,...n,coordinates:e.coordinates??n?.coordinates},t=this.parts.shippingAddress;break}case"taxExemptions":{const n=e[s],r=this.parts.taxExemptions.peek();o=dr({negotiated:n,currentProposed:r}),t=this.parts.taxExemptions,"pending"===n.status&&(e.taxExemptions={...this.current.fields.taxExemptions.peek(),...n});break}}t&&r.applyUpdate(t,o),a&&r.applyUpdate(a,i)}const i=new Set(t),a=this.initialUnresolvedFields.peek();let o;for(const s of a)i.has(s)||(o??=new Set(a),o.delete(s));N((()=>{this.current.value=e,o&&(this.initialUnresolvedFields.value=o),this.loading.value=i}))}settleRun(){if(this.inFlightRunCount-=1,this.inFlightRunCount>0||0===this.outstandingRunFailures.length)return;const e=this.outstandingRunFailures;this.outstandingRunFailures=[];let t=0;e.forEach((({error:e,negotiationStage:n})=>{this.pendingNegotiationsRequests.forEach(((r,i)=>{this.canResolvePendingNegotiation(n,r.negotiationStage)&&(t+=1,r.reject(e),this.pendingNegotiationsRequests.delete(i))}))})),t>0&&(this.observability.log("negotiation_failure_swept_pending_siblings","[Negotiate] Rejected pending negotiations orphaned by a failed negotiation",{sweptSiblings:t,negotiationStages:e.map((({negotiationStage:e})=>e))}),this.observability.counter({name:"negotiation_failure_swept_pending_siblings",value:t}))}canResolvePendingNegotiation(e,t){return t===e||"progression"===e||"completion"===e}}function xb(e){return"Throttled"===e?.__typename?{status:"queued",token:e.queueToken,pollAfter:new Date(e.pollAfter).getTime(),productVariantAvailabilityV2:[],pollUrl:e.pollUrl}:{status:"inactive",token:e?.queueToken??void 0}}class Ib{#r=new Set;#z;constructor(e){this.#z=e}get current(){return this.#z}subscribe(e){return this.#r.add(e),()=>{this.#r.delete(e)}}set(e){this.#z=e,this.#r.forEach((e=>e(this.#z)))}}function Ab(){return de(Tr)}function Tb(){return de(Nr)}function Nb(){const e=Tb(),{snapshot:t,subscribe:n}=o((()=>({snapshot:()=>e.current,subscribe:t=>e.subscribe(t)})),[e]),r=D(n,t);return o((()=>({throttle:r,setThrottle:t=>e.set(t)})),[e,r])}function Lb({value:e,children:t}){return h(Nr.Provider,{value:e,children:h(Rb,{children:t})})}function Rb({children:e}){const{graphql:{throttleGraphql:t}}=pe(),{throttle:n}=Nb();return t.setPollUrl("pollUrl"in n?n.pollUrl:void 0),h(b,{children:e})}const Mb=e=>t=>{if(null==t||"processed"!==t.status)return;const{loading:n,initialUnresolvedFields:r,current:i}
2=e,a=Lr(t,{isShippingRequired:i.fields.isShippingRequired.peek(),ucp:i.fields.ucp.peek()});N((()=>{i.value=a,r.peek().size>0&&(r.value=new Set);const e=n.peek();n.value=new Set([...e].filter((e=>!(e in a))))}))};function Db({children:e}){const{router:t,client:n,shopPay:r,observability:i,userEvents:a,shop:s,checkout:c,persistence:p,url:m,source:g,graphql:{coreGraphql:f}}=pe(),[y,v]=u(),{data:_,loading:b}=Ab();if(y)throw y;const P=_?.session?.negotiate?.result,k=o((()=>xr(_)),[_]),S="NegotiationResultAvailable"===P?.__typename,C="CheckpointDenied"===P?.__typename,x=S?P.checkpointData:void 0;d((()=>{x&&c.checkpointToken.peek()!==x&&c.unstable_overwriteCheckpointToken(x)}),[c,x]);const I="NegotiationResultAvailable"===P?.__typename?P.sellerProposal:void 0,A=Ir(I?.note),T=o((()=>function({checkout:e,client:t,graphql:{coreGraphql:n},observability:r,userEvents:i,persistence:a,router:o,shop:s,shopPay:l,source:c,url:u},{negotiateFromSessionData:d}){const p=d?.session?.negotiate?.result,m=xr(d??void 0),h=new Ib("Throttled"===p?.__typename||"NegotiationResultAvailable"===p?.__typename?xb(p):{status:"loading",token:t.unstable_getSerialization("queueToken")}),g="NegotiationResultAvailable"===p?.__typename?p.sellerProposal:void 0,f="NegotiationResultAvailable"===p?.__typename||"NegotiationResultFailed"===p?.__typename||"TooManyRequests"===p?.__typename?tb(p,m,Ir(g?.note)):[],y={type:"success",violations:m??[],errors:[],negotiationStage:"negotiation"},v=E(y),_=E(y);return v.subscribe((e=>{_.value=e})),{negotiator:new Eb(n,t,t.unstable_getSerialization("sessionToken"),c,o,u,h,E(!1),e,a,v,_,function({enabledDeliveryMethods:e=[],delegatedPaymentInstrument:t}={}){const n=E([]);return{inventoryRecoverySignal:E(void 0),billing:E(!1),contact:E(!1),createAddressParts:Ue(K_),currentDiscountCodeAttemptSignal:E(null),delegatedPaymentInstrument:E(t),deliveryMethodDeltaSignal:E(0),deliveryMethodsAddressErrors:Yn(),deliveryMethodTimingSignal:E(0),derivedErrorMessageSignal:w((()=>Q_(n.value)??"")),directPaymentFieldsFilled:E(!1),discountCodeWarningSignal:E(null),installmentMonthsSignal:E(void 0),missingMerchandiseStableIdsSignal:E([]),msiInvalidationReasonSignal:E(null),msiInvalidationSnapshotSignal:E(null),msiHadInstallmentsSignal:E(!1),editorSetShopPaySignal:E(null),emailMarketingOptInShownSignal:E(!1),emailMarketingConsentGrantReachedSignal:E(!1),previousPhoneMarketingDisclosureKeySignal:E(void 0),smsMarketingOptInShownSignal:E(!1),shopPayMobilePhoneInputShownSignal:E(!1),privacyBannerSettingsSignal:E(null),extensionSkeletonBatchStateSignal:E("idle"),extensionSkeletonBatchReleaseIdSignal:E(0),extensionSkeletonPendingCountSignal:E(0),payment:E(!1),reductionsErrorsSignal:n,reductionsValueSignal:E(""),refreshNegotiationSignal:E(!1),rememberMePhoneErrorSignal:E(void 0),rememberMePhoneSignal:E(void 0),shipping:E(!1),voidedGiftCardsSignal:E([]),cachedMembershipViolations:E([]),hasNegotiatedAlternativePaymentCurrencySignal:E(!1),newCardSignal:E(void 0),hasLoadedSignal:E(!1),bankIdNumberSignal:E(void 0),lastNegotiatedBinSignal:E(void 0),bankPaymentTokenSignal:E(void 0),checkoutProtocolModalEventSignal:E("none"),checkoutProtocolPayButtonLoadingSignal:E(void 0),checkoutProtocolPayButtonDisabledSignal:E(void 0),checkoutProtocolPayButtonMountedSignal:E(!1),checkoutProtocolPayButtonStageSignal:E("pay"),checkoutProtocolPresentedSignal:E(!1),allRenderedSections:E({}),getRenderedSection:$n({defaultValue:{},initial:{}}),marketingPhoneInputError:E(void 0),buyerHasActedSignal:E(!1),appMetafieldsSignal:E({}),cartLineChangeLoadingSignal:E(!1),prequalifiedAnimatedBadgeShowCounter:E(0),enabledDeliveryMethodsSignal:E(e)}}({enabledDeliveryMethods:s.enabledDeliveryMethods,delegatedPaymentInstrument:Ar(d?.session?.checkoutPaymentMethods)}),E([]),r,i,l,s,f),throttle:h}}({checkout:c,client:n,graphql:{coreGraphql:f},observability:i,userEvents:a,persistence:p,router:t,shop:s,shopPay:r,source:g,url:m},{negotiateFromSessionData:_})),[P]),{negotiator:N,throttle:L}=T;l((()=>{!async function(){if(P&&"Throttled"!==P.__typename&&0!==tb(P,k,A).length)try{const e=await N.negotiate({force:!0,silenceViolations:["all"],negotiationStage:"negotiation",customizeNegotiation:e=>e});switch(N.pendingFieldsNegotiation.value=e,e.status){case"success":{const t={type:"success",violations:e.violations,errors:e.errors,negotiationStage:"negotiation"};N.lastJourneyProgression.value=t,N.hasNegotiatedOnce.value=!0,await N.runListeners(t);break}case"error":{const t={type:"error",violations:e.violations,errors:e.errors,negotiationStage:"negotiation"};N.lastJourneyProgression.value=t,N.hasNegotiatedOnce.value=!0,await N.runListeners(t);break}
2case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:R(e)}}catch(e){e instanceof Error&&v(e)}}()}),[N,P,k,A,s]);const M=Mb(N);if(l((()=>{M(c.latestReceipt.value)}),[]),null==_&&b)return null;if(C){const e=Rr(P.redirectUrl,"undefined"==typeof window?t.currentUrl.value.toString():void 0);return"undefined"==typeof window?t.redirect(e):window.location.assign(e.href),null}return h(Mr.Provider,{value:N,children:h(Lb,{value:L,children:e})})}function Ob({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return Boolean(t&&Dr.has(t))}function zb({checkout:e,mobileCheckoutSdk:t}){if(!e.configuration.layout.isOnePage.value)return!1;const{version:n,schema:r}=t.config;return Boolean(n&&r||t.variant.recovery)}function Bb({children:e}){return h(b,{children:e})}const Vb={"checkout-sheet":x({displayName:"CheckoutSheetProtocolProvider",renderError:qb,renderLoading:Bb,load:()=>t((()=>Dl((async()=>{const{CheckoutSheetProtocolProvider:e}=await import("./0fb2c600.CeTvQAdG.js");return{CheckoutSheetProtocolProvider:e}}),__vite__mapDeps([63,1,2,3,4,5,62,64,65,66,6,7,8,9])).then((({CheckoutSheetProtocolProvider:e})=>({default:e})))))}),"mobile-sdk":x({displayName:"MobileCheckoutSdkProvider",renderError:qb,renderLoading:Bb,load:()=>t((()=>Dl((async()=>{const{MobileCheckoutSdkProvider:e}=await import("./dd9b68fc.B-yn6Zfs.js");return{MobileCheckoutSdkProvider:e}}),__vite__mapDeps([67,1,2,3,4,5,64,65,66,6,7,8,9])).then((({MobileCheckoutSdkProvider:e})=>({default:e})))))})};function Fb(e){const t=function(e){return Ob(e)?"checkout-sheet":zb(e)?"mobile-sdk":null}(e);return t?Vb[t]:null}function Ub({children:e}){const t=Fb(pe());return h(t||b,{children:e})}function qb(e){throw e}const jb=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],Hb=ue("AnnouncementEmitterContext");function $b({children:e}){const t=s(new Map),n=a(((e,n)=>{t.current.has(e)||t.current.set(e,new Set);const r=t.current.get(e);r.has(n)||(O(n),r.add(n))}),[t]),r=a(((e,n)=>{const r=t.current.get(e);if(r)for(const t of r)t(n)}),[t]),i=a(((e,n)=>{const r=t.current.get(e);r?.has(n)&&(z(n),r.delete(n))}),[t]),l=a((e=>{const n=e?[e]:jb;for(const r of n){const e=t.current.get(r);if(e){for(const t of e)z(t);e.clear()}}}),[t]),c=o((()=>({on:n,emit:r,off:i,removeAllListeners:l})),[n,r,i,l]);return h(Hb.Provider,{value:c,children:e})}function Yb(){return de(Hb)}const Wb=_(null),Gb=ue("PendingComponentContext");function Jb({children:e}){const t=o((()=>{const e=E(new Set);return{registerComponent:t=>(e.value=new Set([...e.peek(),t]),()=>{e.value=new Set([...e.peek()].filter((e=>e!==t)))}),pendingComponentsSignal:e}}),[]);return h(Wb.Provider,{value:t,children:e})}function Kb(){return y(Wb)}const Qb=ue("ExtensionPointContext"),Xb=ue("ExtensionContext"),Zb=ue("CheckoutEditorBridgeContext");function eP({children:e}){const t=Zf(),n=function(){const{client:e}=pe(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return!0===t&&!0===n}(),[r,i]=u(null),a=Vt();return t?h(Zb.Provider,{value:r,children:[n||r?e:null,h(A,{when:a,children:h(tP,{setContext:i})})]}):e}const tP=x({load:()=>Dl((()=>import("./adeb5fdb.Bl-M2ErE.js")),__vite__mapDeps([68,1,53,34,15,2,3,4,5,69,60,66,9,6,7,8]))}),nP=_({loading:!1}),rP="dev";function iP(){return y(nP)}function aP(e){return!(!e?.version||parseInt(e.version,10)<3)}const oP="dev_mode";function sP({children:e}){const t=function(){const e=function(){const{client:e}=pe();return o((()=>{return t=e.cookies,{get:()=>t.get(oP),set:e=>{const n=(new Date).getTime(),r=new Date(n+18144e5);t.set(oP,e,{expiry:r})},remove:()=>{t.delete(oP)}};var t}),[e.cookies])}(),{router:t,shop:n}=pe(),r=o((()=>t.currentUrl.value.searchParams.get("dev")??e.get()),[t,e]),i=null!=r&&(n.allowExtensionDevelopment||!1),[a,s]=B(((e,t)=>{switch(t.type){case"fetched":{const e=aP(t.workspace)?{...t.workspace,extensions:(n=t.workspace.extensions,n.filter((e=>"checkout"===e.surface||!!Array.isArray(e.extensionPoints)&&(e.extensionPoints=e.extensionPoints.filter((e=>"object"==typeof e&&"surface"in e&&"checkout"===e?.surface))).length>0)).map((e=>({...e,extensionPoints:e.extensionPoints.map((t=>"object"==typeof t?t:{target:t,metafields:e.metafields,surface:"checkout"}))}))))}:{...t.workspace,extensions:t.workspace.extensions.map((({extensionPoint:e,...t})=>({version:null,...t,extensionPoints:e?[e]:t.extensionPoints})))};return e.appId&&(e.appId=function(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:Or("App",t)}(e.appId)),{loading:!1,workspace:e}}case"error":return{loading:!1}}var n}),{loading:i});return l((()=>
2{if(!i)return;let t=!0;return(async()=>{try{const n=await fetch(r),i=await n.json();if(!t)return;e.set(r),s({type:"fetched",workspace:i})}catch{if(!t)return;s({type:"error"})}})(),()=>{t=!1}}),[r,e,i]),a}();return h(nP.Provider,{value:t,children:e})}function lP(){const{buyerIdentity:e,deliveryNext:t}=ke(),{checkout:n,shop:r,i18n:a}=pe(),o=i((()=>zr(e.value?.purchasingCompany?.location.shippingAddress)?.countryCode)),{details:s}=jt(o.value),l=L(s),c=r.additionalAddressFieldsEnabled;return i((()=>Br({purchasingCompany:e.value?.purchasingCompany,shippingCountries:r.shippingCountries,addressSettings:n.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,editFormat:n.address.extendedAddressMode.getFormat(o.value,null),deliveryNextValue:t.value,additionalFieldsEnabled:c,i18n:a})))}function cP(){const{buyerIdentity:e}=ke(),t=Ye();return i((()=>t.value.enabledDeliveryMethods.includes("PICK_UP")&&Boolean(e.value?.purchasingCompany)))}function uP({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(Vr(t)&&n.length>0)return n[0]}function dP(){const e=cP(),t=ke().deliveryNext,{checkout:n}=pe();return i((()=>{const r=n.proposal.facts.delivery??[],i=r.length>0&&r.every((e=>null!==e.pickupAddress));return e.value&&(kn(t.value)||i)}))}function pP(){const e=vt(),{buyerIdentity:t,shippingAddress:n}=ke(),{checkout:r,source:a}=pe(),o=dP(),s=cP(),l=Cu();return i((()=>!(l.value||!s.value&&!e.value||o.value||cn(uP({checkout:r,source:a})?.deliveryAddress??n.value)||t.value?.purchasingCompany?.location.shippingAddress)))}function mP(){const e=ke().buyerIdentity,t=Cu(),n=cP(),{checkout:r,source:a}=pe(),o=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return i((()=>{const i=e.value?.purchasingCompany,s=(o.value??!1)||Boolean(uP({checkout:r,source:a}));return Boolean(i)&&(t.value||n.value&&!s)&&r.isShippingRequired.value}))}const hP=["contact-information","shipping-address"],gP=["delivery-method"],fP=["payment-methods","billing-address","localization-extension"];function yP(e,t){return e?.id===t?.id&&e?.route===t?.route}function vP(e){e.parts.email.value.trim()&&e.parts.acceptEmailMarketing.value&&(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function _P(){const e=Fc(),t=Pe(),{checkout:n}=pe(),r=n.configuration.layout.isOnePage.value;return jc((async(n,i)=>{if("completion"===n)return void vP(t);if("progression"!==n||i?.prefetch||r)return;const{currentDetour:a,currentPage:o,plan:s}=e.value;if(a||null==o)return;const l=t.current.value,c=s.greenPath.findIndex((e=>yP(e,o))),u=function(e,t,n){return e.slice(t+1).find((e=>null==e.skipOverPage||!e.skipOverPage(n)))}(s.greenPath,c,l);("shipping"===o.id||"information"===o.id&&"shipping"===u?.id)&&vP(t)})),null}class bP extends Ol{constructor(){super(...arguments),this.name="JourneyError"}}class PP extends Rl{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function kP(e){if(!("target"in e))return;const[t,n]=(r=e.target,r.split("$.")[1]?.split(".").map((e=>e.replace(/\[\d+\]/g,"")))??[]);var r;switch(t){case"payment":return"billingAddress"===n?"billing-address":"payment-methods";case"tip":return"payment-methods";case"buyerIdentity":return"contact-information";case"delivery":return Fr.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}function SP(e,t=[]){return Boolean(e?.email??e?.phone)&&t.every((e=>"contact-information"!==kP(e)))}function wP(e){return jr(e)&&!e.some((e=>Hr.has(e.code)))}function CP(e){return e.some((e=>"UnprocessableTermViolation"===e.__typename&&$r.has(e.code)))}function EP(e){const t="string"==typeof e?e:e.type;return Vr(e)||"draftOrder"===t}class xP extends Rl{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}class IP{#B={};#V=null;#F=!1;detectInfiniteRedirect(e,t,n){const r=e.pathname;if(this.#V&&clearTimeout(this.#V),this.#B[r]=(this.#B[r]||0)+1,this.#B[r]>=10&&!this.#F){const i=new xP(`Detected potential infinite redirect: ${this.#B[r]} navigations to ${r} within 200ms`),a=t.value;n.error(i,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#B),currentUrl:e.toString(),path:r,threshold:10,timeframe:200},journeyState:{redirectTo:a.redirectTo?.route}}}),this.#F=!0,this.#B={}}this.#V=setTimeout((()=>{this.#B={},this.#V=null}),200)}cleanup(){this.#V&&(clearTimeout(this.#V),this.#V=null)}}function AP(e){return"complete"===e.status||"inactive"===e.status}function TP(e){return"failed"===e?.status||"processed"===e?.status}const NP="departure_page";function LP({violations:e,greenPath:t,negotiated:n,currentPage:r}){const i=new Set(e.map(kP)),a=t.filter((e=>!e.skipOverPage||!e.skipOverPage(n))),o=a.findIndex((e=>e.id===r?.id));return(-1===o?a:a.slice(0,o)).find((e=>("function"==typeof e.features?e.features(n):e.features).some((e=>i.has(e)))))}function RP(){const{router:e}=pe(),t=MP();return a(((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 MP(){const{observability:e}=pe(),{history:t,plan:n}=Fc().value,r=Pe();return a((i=>function({feature:e,greenPath:t,history:n,negotiated:r,observability:i}){let a=DP(t,r,e);const o=n.find((e=>!e.complete&&!e.skipped)),s=t.findIndex((e=>e.id===a?.id)),l=t.findIndex((e=>o?.id===e.id));if(!a||!(s>=0&&s<=l)){const n=t[l]??t[0];i.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${n?.id}`),a=n}return a}({feature:i,greenPath:n.greenPath,history:t,negotiated:r,observability:e})),[n.greenPath,r,t,e])}function DP(e,t,n){return[...e].reverse().find((e=>("function"==typeof e.features?e.features(t.current.peek()):e.features).includes(n)))}const OP=1500,zP=450,BP=64,VP=14;function FP(e){return"customOnsite"===e.method.type&&1===e.method.paymentBrands?.length&&e.method.paymentBrands.includes("usdc")}function UP(e){return"customOnsite"===e.type&&1===e.paymentBrands?.length&&e.paymentBrands.includes("usdc")}const qP={id:"a2a1d4e763e587abf6b17bb3b16c93cedd9799ee63a9f4664a4564d7ee76c64a",type:"query",name:"PollForReceipt",source:""};function jP(){const e=ke().paymentMethods,t=Ge().paymentLines;return i((()=>{const n=t.value.at(0);return!!n&&(FP(n)||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find((e=>UP(e)&&e.paymentMethodIdentifier===n));return Boolean(r)}(n,e.value))}))}const HP=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function $P(e){const t=location.hostname;
2return HP.includes(t)}const YP=3e3,WP=15e3,GP="hsa_survey_completed";function JP(e){if(!e)return"";try{return new URL(KP(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const KP=e=>e.replace(/^(?:(.*:)?\/\/)?(.*)/i,((e,t,n)=>t?e:`https://${n}`)),QP="3ds_completed",XP=6e5;function ZP(e){if(!e)return"none";try{const t=new URL(KP(e)).hostname.toLowerCase().replace(/^www\./,"");return"hooks.stripe.com"===t?"hooks.stripe.com":"uk.affirm.com"===t?"uk.affirm.com":"sandbox.uk.affirm.com"===t?"sandbox.uk.affirm.com":"affirm.com"===t?"affirm.com":"sandbox.affirm.com"===t?"sandbox.affirm.com":t.endsWith(".affirm.com")?"affirm_subdomain":t.endsWith(".stripe.com")?"stripe_subdomain":"other"}catch{return"invalid"}}const ek=Symbol("pollRequestTimedOut");async function tk(e,t){let n;const r=new Promise((e=>{n=setTimeout((()=>e(ek)),t)}));try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function nk(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type&&e.action.offsiteRedirect}function rk(e){if(void 0===e)return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const ik=["failed","processed"];function ak(){const{currentPage:e,currentDetour:t,history:n}=Fc().value,{observability:r,checkout:{offsitePopupController:o},mobileCheckoutSdk:c,embed:u}=pe(),d=s(),p=function(){const e=F({maxAttempts:120}),{client:t,checkout:n,persistence:r,observability:i,embed:o,source:c,graphql:{coreGraphql:u}}=pe(),d=t.unstable_getSerialization("sessionToken"),p=s(),m=jP();return l((()=>()=>{p.current=void 0}),[]),a((async t=>{const a=Symbol("receipt-poll");p.current=a;const s=n.latestReceipt.value?.id,l=()=>p.current===a&&y&&!(s!==n.latestReceipt.value?.id),h=n.latestReceipt.value;if(null==h?.id||null==h)return;t?.(h),i.log("receipt_polling_detected","[Receipt Polling] Receipt polling started with initial receipt",Ev(h));let g,f,y=!0,v=0,_=!1,b=Date.now(),P=!1,k=!1,S=!1;switch(h.status){case"processing":case"processing_remote_checkouts":f=h.pollAt;break;case"action_required":f=await w(h);break;case"polling_for_order":f=Qr+Date.now()}async function w(e){return new Promise((t=>{if(n.configuration.isUniversalCheckoutFinalizer&&"complete_payment_challenge"===e.action.type&&!1===e.action.offsiteRedirect&&!m.value||P||(P=!0,Wr(o,`action_required_receipt - ${e.action.type}`)),"complete_payment_challenge"===e.action.type){if(m.value)return t(Date.now()+YP);if(e.action.offsiteRedirect)return t(void 0)}else{if("pre_payment_buyer_action_required"===e.action.type){if(S)return t(Date.now()+YP);const n=Date.now(),r={...Ev(e),actionType:e.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},a=({data:e})=>{e?.type===GP&&(window.removeEventListener("message",a),S=!0,v=0,b=Date.now(),i.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...r,dataType:GP,elapsedTimeMs:Date.now()-n}),t(Date.now()))};return i.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",r),void window.addEventListener("message",a)}if("complete_payment_challenge_v2"===e.action.type){const n=e.timeout?.millisecondsRemaining;return _&&0===n&&(v=0,b=Date.now()),_=Boolean(n),t(_?Date.now()+YP:Date.now()+Gr)}}const a=Date.now(),s="complete_payment_challenge"===e.action.type?e.action:void 0,u={...Ev(e),actionType:e.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:s?.offsiteRedirect,sourceHostCategory:ZP(s?.url),surface:"checkout-web"},d=({data:r,origin:o})=>{if(r.type===QP){if(clearTimeout(p),window.removeEventListener("message",d),!l()||!Pv(n.latestReceipt.value,e))return void t(void 0);v=0,b=Date.now();const r=Date.now()-a;i.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:QP}),i.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...u,dataType:QP,elapsedTimeMs:r,originHostCategory:ZP(o)}),t(Date.now())}},p=setTimeout((()=>{window.removeEventListener("message",d),l()&&Pv(n.latestReceipt.value,e)?(n.unstable_overwriteLatestReceipt({status:"failed",id:e.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),r&&Jr(r,c),i.counter({name:"three_d_secure_challenge_timeout",value:1}),i.log("use_receipt_polling_three_ds_challenge_timed_out","3DS challenge timed out",Ev(e)),i.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...u,elapsedTimeMs:Date.now()-a}),t(void 0)):t(void 0)}),e.timeout?.millisecondsRemaining??XP);i.log("receipt_polling_detected","[Receipt Polling] Adding event listener for 3DS challenge event"),i.log("three_ds_postmessage_listener_started","[Receipt Polling] 3DS postMessage listener started",u),window.addEventListener("message",d)}))}async function C(){const e={receiptId:n.latestReceipt.value?.id,sessionToken:d},t=await tk(u.staticQuery(qP,{cache:!1,variables:e}),WP);if(t!==ek)return t;if(E(1),!l())return;const r=u.query(qP,{cache:!1,variables:e});try{const e=await tk(Promise.resolve(r.refetch()),WP);if(e!==ek)return e}finally{r[Symbol.dispose]()}E(2)}function E(e){i.log("receipt_polling_request_timed_out","[Receipt Polling] Receipt poll request timed out",{...Ev(n.latestReceipt.value),attempt:e,timeout:WP})}for(;null!=f;){await U(f-Date.now());const a=Date.now()-b;if(++v,!_&&v>120&&a>12e4&&(y=!1,i.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...Ev(h),pollAttempts:v}),i.counter({name:"receipt_polling_timeout",value:1}),i.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...Ev(n.latestReceipt.value),timePolling:a,pollAttempts:v})),!l())break;const o=await C(),s=o?.data,u=o?.error;if(u||null==s||"ReceiptNotFound"===s.receipt.__typename){if(!l())break;f=Date.now()+(e.next().value||6e4);continue}if(!l())break;const d=g?Date.now()-g:0,p=$P()?3e4:1e4,P=!!g&&d>=p;let S;if(!k)try{S=await Kr()}
2catch(x){if(!l())break;k=!0,i.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(x),receiptType:s.receipt.__typename})}if(k){if("ProcessingReceipt"===s.receipt.__typename||"WaitingReceipt"===s.receipt.__typename){e.reset(),f=Date.now()+s.receipt.pollDelay;continue}if("ProcessedReceipt"!==s.receipt.__typename)break;if(e.reset(),s.receipt.redirectUrl){window.location.replace(s.receipt.redirectUrl);break}if(s.receipt.orderStatusPageUrl){window.location.replace(s.receipt.orderStatusPageUrl);break}f=Qr+Date.now();continue}if(!l())break;if(!S)break;e.reset();const E=S(s.receipt,{pollingTimeoutReached:P});"polling_for_order"===n.latestReceipt.value?.status&&"processed"===E?.status&&(P?i.counter({name:"PostPurchase_order_polling_timeout",value:1}):i.histogram({name:"PostPurchase_order_polling_duration",value:d}));const I=!(!m.value&&nk(E)||Pv(E,h)),A=Ev(h),T=Ev(E),N={receiptId:T.receiptId,status:T.status,prevReceiptId:A.receiptId,prevReceiptStatus:A.status};if(I?(i.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",N),n.unstable_overwriteLatestReceipt(E)):Pv(E,h)&&i.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",N),!l())break;if(t?.(E),"processing"===E.status||"processing_remote_checkouts"===E.status)f=E.pollAt;else if("action_required"===E.status)f=await w(E);else{if("polling_for_order"!==E.status){r&&Jr(r,c);break}f=Qr+Date.now(),g||(g=f)}if(!l())break}}),[n,r,u,d,i,e,o,m,c])}(),m=function(){const e=jP();return a(((t,n)=>{e.value||kv(t)&&wv(t.action)&&t.action.offsiteRedirect&&n(t.action.url)}),[e])}(),h=function(){const e=ke().paymentMethods,t=Ge().paymentLines;return i((()=>{const n=t.value.at(0);return!!n&&("customOnsite"===(r=n).method.type&&(r.method.paymentBrands??[]).some((e=>"wechatpay"===e.toLowerCase()))||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find((e=>{return"customOnsite"===(t=e).type&&(t.paymentBrands??[]).some((e=>"wechatpay"===e.toLowerCase()))&&e.paymentMethodIdentifier===n;var t}));return Boolean(r)}(n,e.value));var r}))}(),g=c.variant.isStandard()||Boolean(u?.isCheckoutKit()),f=a((()=>{document.hidden||(document.removeEventListener("visibilitychange",f),r.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:rk(d.current)},{exportImmediately:!0}),p((e=>{m(e,(()=>{document.addEventListener("visibilitychange",f)}))})))}),[m,p,r]),y=a((()=>{p((i=>{ik.includes(i.status)&&o.isOpen.value&&o.close({}),m(i,(a=>{r.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:i,currentPage:e,currentDetour:t,history:n}),r.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:rk(a),providerUrl:a},{exportImmediately:!0}),o.isOpen.value?o.redirect(a):(h.value?function(e){const t=document.createElement("a");t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}(a):window.location.assign(a),d.current=a,g&&document.addEventListener("visibilitychange",f))}))}))}),[m,h,p,g,t,e,n,f,r,o]);return l((()=>()=>document.removeEventListener("visibilitychange",f)),[]),y}function ok(){const{shop:{id:e}}=pe();return o((()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);return isNaN(n)?void 0:n}),[e])}function sk({mode:e="set",include:t={}}={}){const{shopClientUuid:n=!1,shopId:r=!1}=t,i=pe().embed?.shopClientUuid,o=ok();return a(((t,a)=>{r&&void 0!==o&&("set"===e||!t.has("shop_id"))&&t.set("shop_id",String(o));const{embedParam:s,ecAuthParam:l,ecVersionParam:c,ecColorSchemeParam:u,ecDelegateParam:d,checkoutKitBrandingParam:p,checkoutKitVersionParam:m,shopifyEssential:h,skipInterstitial:g,shopClientUuid:f}=function(e,t){return{embedParam:e.get("embed"),ecAuthParam:e.get(ei),ecVersionParam:e.get(Xr),ecColorSchemeParam:e.get(Zr),ecDelegateParam:e.get(ti),checkoutKitBrandingParam:e.get(ri),checkoutKitVersionParam:e.get(ni),shopifyEsse
2ntial:e.get("shopify_essential"),skipInterstitial:e.get(ii),shopClientUuid:e.get("shop_client_uuid")??t}}(a,i),y=t.has("embed")||t.has("ec_version");("set"===e||!y)&&(s&&t.set("embed",s),c&&(t.set(Xr,c),u&&t.set(Zr,u),l&&t.set(ei,l),d&&t.set(ti,d),m&&t.set(ni,m),p&&t.set(ri,p)));const v="set"===e||!t.has("shopify_essential");h&&v&&t.set("shopify_essential",h);const _="set"===e||!t.has(ii);if(g&&_&&t.set(ii,g),n){const n="set"===e||!t.has("shop_client_uuid");f&&n&&t.set("shop_client_uuid",f)}}),[i,n,r,e,o])}function lk(e,t,n,r,i){const a=e.some((e=>"BUYER_IDENTITY_PERSONAL_ORDER_NOT_ALLOWED"===e.code)),o=e.some((e=>"BUYER_IDENTITY_COMPANY_LOCATION_REQUIRED"===e.code));a&&t&&(i.log("redirect_to_storefront","[B2B] Buyer identity violation: personal order not allowed, redirecting to storefront",{redirectSuccess:Boolean(t)}),window.location.replace(t)),o&&window.location.replace(n??r)}function ck(){const e=ke().buyerIdentity,{client:t,shop:n,embed:r,mobileCheckoutSdk:a}=pe();return i((()=>Boolean(n.loginLinkVisible)&&n.hasStorefront&&Boolean(t.unstable_getSerialization("loginUrl"))&&"OPTIONAL"===n.customerAccountRequirement&&!a.enabled&&!r&&!e.value?.customerProfile))}function uk(){const e=ke().buyerIdentity,{shop:t,checkout:{identity:n,configuration:r},mobileCheckoutSdk:a,source:o}=pe(),s="shopPay"===n.current.value;return i((()=>{const n="OPTIONAL"===t.customerAccountRequirement,i="REQUIRED"===t.customerAccountRequirement,l="DISABLED"===t.customerAccountRequirement;return"draftOrder"!==o.type&&t.hasStorefront&&!a.variant.isPartner()&&r.allowRedirectToStorefront&&!s&&(n||i||l&&Boolean(e.value?.customerProfile))}))}function dk(){const e=ke().buyerIdentity;return a((t=>{const n=e.value?.customerProfile,r=e.value?.purchasingCompany;if(n)return"billing"===t?"CustomerProfile"===n.__typename?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0:"shipping"===t?"CustomerProfile"===n.__typename?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0:void 0}),[e])}function pk(){const{embed:e,mobileCheckoutSdk:t,shop:n,source:r}=pe(),a=Fc(),o=ke().buyerIdentity,s=Ig(),l=t.variant.isStandard()||e?.isCheckoutKit(),c=Boolean(n.remoteShopsConfigMap?.size);return i((()=>{const e=o.value,t=Boolean(n.loginLinkVisible)&&Boolean(e?.customerProfile)&&(Boolean(e?.purchasingCompany)||!l&&"draftOrder"!==r.type&&n.hasStorefront);return s&&"thankYou"===a.value.currentDetour?.type&&!c&&t}))}function mk(e=!1){const{i18n:t,router:n,shop:r}=pe(),{buyerIdentity:a}=ke();return i((()=>{const i=a.value?.purchasingCompany;if(!r.customerAccountLocationsUrl)return;const o=new URL(r.customerAccountLocationsUrl);return o.searchParams.set("return_to",n.currentUrl.value.pathname),i&&!e&&o.searchParams.set("current_location",i.location.id),o.searchParams.set("locale",t.locale),String(o)}))}function hk(){const e=s(!0);return d((()=>()=>{e.current=!1}),[]),e}const gk="DISCOUNTS_DISCOUNT_CODE_NOT_HONOURED",fk=new Set(["DISCOUNTS_ALLOCATIONS_MISMATCH","DISCOUNTS_ADDITIONAL_REQUESTED_DISCOUNT_CODE_DISCARDED"]),yk=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",gk,...fk]),vk=["discountLines","totalSavings","merchandiseLines","deliveryNext"],_k=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),bk=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"]),Pk=new Set([...yk,...bk]),kk=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),Sk=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),wk=new Set([...Sk,...Pk]);function Ck(){const{paymentLines:e}=Ge(),{voidedGiftCardsSignal:t}=tt(),n=a(((e,t)=>{if(t.length<e.length)return[];const n=[];return t.forEach((t=>{const r=t.method;"giftCard"===r.type&&"code"in r&&!e.some((e=>"giftCard"===e.method.type&&"code"in e.method&&r.code===e.method.code))&&n.push(r.code)})),n}),[]);return a((({violations:r,remotePaymentLines:i})=>{if(r.some((e=>_k.has(e.code)))){const r=n(i,e.value);t.value=r,e.value=i}}),[n,e,t])}const Ek=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function xk(e,t){const n=cc(e.features,t),r=new Set(["merchandiseLines"]);for(const i of n){const e=Ek.get(i)??[];for(const t of e)r.add(t)}return r}function Ik({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some((e=>function({violation:e,currentPageId:t,isOnePageCheckout:n}){return!!n||"payment"===t||!(mi.has(e.code)||hi.has(e.code)||dn.has(e.code))}({violation:e,currentPageId:t,isOnePageCheckout:n})))}function Ak(){const{observability:e}=pe();return a((()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")}),[e])}
2class Tk extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}const Nk='GraphQL execution failed with errors: [ "Internal error. Looks like something went wrong on our end.',Lk=["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:",Nk,q],Rk=["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 Mk(e){return e.replace(/\s+/g," ")}const Dk=e=>{if(""===e)return!0;const t=Mk(e);return Lk.some((e=>t.startsWith(e)))},Ok=e=>{if(""===e)return"unknown";const t=Mk(e);return t.startsWith(q)?Rk.some((e=>t.endsWith(e)))?e:"unknown":t.startsWith(Nk)?"Internal server error":e};function zk(){const e=(()=>{const{source:{checkoutSessionIdentifier:e}}=pe(),{email:t}=Ge();return i((()=>`guest-${e}-${t.value.replace(/[^a-zA-Z0-9]/g,"")}`))})();return{isDismissedGuestModal:a((()=>{try{return Boolean(sessionStorage.getItem(e.value))}catch{return!1}}),[e]),setDismissedGuestModal:a((()=>{try{sessionStorage.setItem(e.value,"true")}catch{}}),[e])}}const Bk="EU_REVERSE_CHARGE_EXEMPTION_RULE";function Vk(){const e=ke().taxExemptions,t=function(e){const{taxExemptions:t}=Ge(),n=L(e);return i((()=>t.value.find((e=>e.handle===n.value))))}(Bk).value,n=function(e){const{taxExemptions:t}=Ge();return a((n=>{const r=t.value.filter((t=>t.handle!==e));t.value=[...r,{handle:e,details:n}]}),[e,t])}(Bk),r=xn("taxExemptions").value,o=xn("shippingAddress").value;if("unavailable"===e.value?.status||!e.value?.available||0===e.value?.available.length)return null;const{available:s}=e.value,l=s.find((e=>gi(e.handle)));if(!l?.details)return null;const c=t?.details?.taxId??"",{registrationFormats:u,warnings:d}=l.details,p=e=>fi(e,u),m=r?{type:"pending"}:c?p(c)?c===l.details.taxId&&l.details.status?{type:"resolved",validationStatus:l.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:l.applied,taxId:{warnings:d,value:c,loading:r||o,set:e=>{n({taxId:e.toUpperCase()})},status:m,reset:()=>n({taxId:""}),validated:{status:l.details.status,taxId:l.details.taxId},format:{valid:!!c&&p(c),validate:p}}}}function Fk(){const{userEvents:e}=pe(),t=Uk();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function Uk(){const{client:e,shop:t,source:n}=pe(),r=e.unstable_getSerialization("requestId"),i=ke().buyerIdentity.value?.customerProfile,{shippingAddress:a,billingAddress:o,email:s}=Ge(),l=Vk();return{build:({eventType:e,vatId:c})=>{return{schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:e,shopId:Number(he(t.id)),customerId:$k(i),checkoutToken:n.
2checkoutSessionIdentifier,requestId:r,vatId:c,vatIdValidationStatus:qk({taxId:l?.taxId,eventType:e}),applied:l?.applied,email:s.value,userAgent:(u=navigator,void 0===u?void 0:u.userAgent),...jk(a.value),...Hk(o.value)}};var u}}}function qk({taxId:e,eventType:t}){if("NEGOTIATE"!==t&&e){if("invalid_format"===e.status.type)return"INVALID_FORMAT";if("pending"===e.status.type)return"PENDING";if(e.status.validationStatus)return String(e.status.validationStatus)}}function jk(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 Hk(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 $k(e){if(!e)return;const t=Number(he(e.id));return isNaN(t)?void 0:t}function Yk(e,t){const{checkout:n,shop:r,observability:i,url:o,router:s}=pe(),l=function(){const e=me(),t=hk(),{setGuestDismissedModalKey:n}=function(){const{setDismissedGuestModal:e}=zk(),{shopPay:t}=pe();return{setGuestDismissedModalKey:a((()=>{t.userIdentified.value&&e()}),[e,t.userIdentified])}}();return a((async({onComplete:r,submitting:i,...a})=>{n(),i.value=!0;const o=await e.complete({...a});t.current&&(i.value=!1,await(r?.(o)))}),[t,e,n])}(),{plan:c}=Fc().value,u=me(),d=Pe(),p=RP(),m=mk(!0),h=Ck();return function(){const{userEvents:e}=pe(),t=Uk(),n=Vk();jc((async(r,i)=>{if("completion"!==r)return;if(i?.retry)return;if(!n)return;const{value:a}=n.taxId,o=t.build({eventType:"PAY_NOW_CLICKED",vatId:a});e.monorailEvent(o)}))}(),a((async(a,g,f,y)=>{const{skipToCompletion:v,..._}=y??{};"processing"!==g?.type&&v&&(i.leaveErrorBreadcrumb("Journey:updateJourney: updating journey HistoryMark onSubmitForCompletion if skipToCompletion is true and detourType is not processing",{skipToCompletion:!0,detourType:g?.type}),e({type:"skipRemainingPages"}));let b=1;const P=async()=>{let y=!1;await d.waitForPendingNegotiations({setProgressing:t});const k=b<1;await u.runBeforeNegotiationListeners("completion",k?{retry:!0}:void 0),await l({..._,submitting:u.submitting,setProgressing:t,onValidationSuccess:()=>{_.onValidationSuccess?.(),t(!0)},async onComplete(l){if("stale"===l.status&&"interceptors"===l.phase&&b>0)return b-=1,y=!0,t(!0),void i.log("submit_for_completion_stale_retried","Stale completion retried automatically");switch("stale"===l.status&&b<1&&i.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await(f?.(l)),l.status){case"success":{n.unstable_overwriteLatestReceipt(l.receipt);const e={type:"complete"};u.lastJourneyProgression.value=e,await u.runListeners(e);break}case"alreadyCompleted":n.unstable_overwriteLatestReceipt(l.receipt);break;case"throttled":{const e=c.detours.find((e=>"throttle"===e.type));if(!e?.route)throw new bP("Throttled, but no detour",{groupingHash:"JourneyError::ThrottledNoDetour"});s.navigate(e.route);break}case"rejected":{if(a||i.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:a}),CP(l.violations))return window.location.replace(o.login(window.location.href));if(lk(l.violations,r.storefrontUrl,m.value,s.currentUrl.value,i),jr(l.violations)){s.currentUrl.peek().searchParams.delete(NP);const e=c.detours.find((e=>"stockProblems"===e.type));if(null==e)throw new bP("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});s.navigate(e.route);break}h({violations:l.violations,remotePaymentLines:l.negotiated?.paymentLines?.lines??[]});const t={type:"error",violations:l.violations,errors:l.errors,negotiationStage:"completion"};if(u.lastJourneyProgression.value=t,await u.runListeners(t),v)break;const n=LP({violations:l.violations,greenPath:c.greenPath,negotiated:l.negotiated,currentPage:a});n&&(s.currentUrl.peek().searchParams.delete(NP),s.navigate(n.route));break}
2case"invalid":t(!1),await u.runListeners({type:"invalid",reasons:l.reasons});break;case"fetch_failed":case"failed":{const t={type:"failed",reason:l.reason,negotiationStage:"completion",fetchFailed:"fetch_failed"===l.status};if("fetch_failed"===l.status)if(Dk(l.reason)||!l.isActionable)i.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:l.reason}),i.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:Ok(l.reason)}});else{const e=l.reason;i.error(new PP(e,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${e}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.lastJourneyProgression.value=t,await u.runListeners(t),e({type:"error",page:a}),s.currentUrl.peek().searchParams.delete(NP),p("payment-methods",{replace:void 0!==g});break}default:t(!1),a||i.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:a})}"success"===l.status&&"processing"===l.receipt.status||t(!1)}}),y&&await P()};await P()}),[t,u,d,l,r,e,n,c.detours,c.greenPath,s,h,o,m,p,i])}function Wk({children:e,dispatch:t,progressing:n,onProgressionChange:r}){const u=Fc(),{plan:d,currentPage:p,currentDetour:m}=u.value,{observability:g,checkout:y,router:v}=pe(),_=Tb(),{postPurchaseInquiryStatus:b}=Ge(),P=function(e,t){const{client:n,router:r,checkout:i,shop:o,observability:s,url:l}=pe(),c=Pe(),{plan:u,currentPage:d,currentDetour:p}=Fc().value,m=me(),h=n.unstable_legacyNavigationPerformance,g=mk(!0),f=Ck(),y=hk(),v=i.configuration.layout.isOnePage,_=H_(),{inMemoryApplePayParts:{asPaymentMethod:b}}=Cn(),P=Ak();return a((async({onComplete:n,include:a,prefetch:k=!1,negotiationStage:S,...w})=>{const C=d,E=S??"negotiation";"progression"!==E||k||t(!0),s.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:E}),"progression"===E&&await m.runBeforeNegotiationListeners(E,{prefetch:k});const x=(()=>{if(a)return a;if(null==C)return;const e=new Set,t=u.greenPath.findIndex((e=>yP(e,C))),n=c.current.value;for(const r of u.greenPath.slice(0,t+1)){const t=xk(r,n);for(const n of t)e.add(n)}return[...e]})(),I=C?cc(C.features,c.current.value):void 0,{silenceViolations:A=[]}=w,T=function*(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:i}=t,a=ui(n??[],i);for(const[o,s]of r.entries())a(di(s))||(yield`${pi}[${o}]`)}(x,{customFields:c.current.value.customFields??[],placementReferences:_},I);try{const a=await m.negotiate({...w,silenceViolations:[...new Set([...A,...T])],skipStateUpdates:k,negotiationStage:E});if(s.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:a.status,negotiationStage:E,violations:"violations"in a?gb(a.violations):void 0}),y.current){if(k)return;try{const n="success"===a.status||"error"===a.status;if(n&&jr(a.violations)){const e=u.detours.find((e=>"stockProblems"===e.type));if(null==e)throw new bP("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetourNegotiate"});return P(),void r.navigate(e.route)}if(n&&CP(a.violations))return s.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));switch(n&&lk(a.violations,o.storefrontUrl,g.value,r.currentUrl.value,s),n&&f({violations:a.violations,remotePaymentLines:a.negotiated?.paymentLines?.lines??[]}),a.status){case"success":{const e={type:"success",violations:a.violations,errors:a.errors,negotiationStage:E};m.lastJourneyProgression.value=e,m.hasNegotiatedOnce.value=!0,await m.runListeners(e);break}case"alreadyCompleted":i.unstable_overwriteLatestReceipt(a.receipt);break;case"error":{h?.cancelNavigation();const t={type:"error",violations:a.violations,errors:a.errors,negotiationStage:E};m.lastNegotiation.value=t,m.hasNegotiatedOnce.value=!0,("progression"===E||w.runListenersOnError)&&(m.lastJourneyProgression.value=t,await m.runListeners(t)),C&&Ik({violations:a.violations,currentPageId:C.id,isOnePageCheckout:v.value})&&e({type:"error",page:C});break}case"throttled":{const e=u.detours.find((e=>"throttle"===e.type));if(!e?.route)throw new bP("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});r.navigate(e.route);break}
2case"invalid":m.runListeners({type:"invalid",reasons:a.reasons}),C&&e({type:"error",page:C});break;case"denied":case"fetch_failed":C&&e({type:"error",page:C});break;case"stale":case"tooManyRequests":s.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:a.status,currentPage:C,currentDetour:p,negotiationStage:E});break;default:R(a)}"progression"===E&&t(!1)}finally{n?.(a);const e=b.value&&i.wallets.activeSession.value;if("success"!==a.status&&"violations"in a&&C&&!e){const e=LP({currentPage:C,greenPath:u.greenPath,negotiated:a.negotiated,violations:a.violations});e&&r.navigate(e.route)}}}}catch(N){if(N instanceof kb)return;const e=N instanceof Error?N:new Tk;if(e)throw e}}),[b,i,d,g,e,v,y,c,t,h,_,u.detours,u.greenPath,m,f,r,o?.storefrontUrl,P,l,s,p])}(t,r),k=Pe(),S=function(e,t,n){const{router:r,observability:i,checkout:o}=pe(),{plan:s}=Fc().value,l=Pe(),c=o.configuration.layout.isOnePage,u=a(((e,n)=>{const i=s.greenPath.slice(n+1).find((t=>null==t.skipOverPage||!t.skipOverPage(e.negotiated)));if(!i)throw new bP("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"});t({type:"progress",page:i}),r.navigate(i.route)}),[s.greenPath,t,r]);return a((async(t,r)=>{n(!0);const a=s.greenPath.findIndex((e=>yP(e,t))),o=l.current.value,d=xk(t,o);try{await e({negotiationStage:"progression",fieldsToResolve:Array.from(d),onComplete(e){switch(i.leaveErrorBreadcrumb("Negotiation completed",{status:e.status,violations:"violations"in e?e.violations.map((e=>e.code)):[]}),r?.(e),e.status){case"success":u(e,a);break;case"error":Ik({violations:e.violations,currentPageId:s.greenPath[a].id,isOnePageCheckout:c.value})||u(e,a);break;case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:R(e)}}})}finally{n(!1)}}),[n,s.greenPath,l,e,u,c,i])}(P,t,r),w=Yk(t,r),E=function(e,t,n){const r=Tb(),{checkout:i,client:o,shop:s,source:l,observability:c,url:u,router:d}=pe(),p=me(),m=i.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return a((async(a,h,g)=>{switch(a.type){case"thankYou":case"postPurchase":return void c.log("use_exit_detour_detected",`Tried to progress out of a ${a.type} detour`,{currentPage:h?.route,currentDetour:a.type});case"throttle":n(!0),await new Promise((e=>{if(AP(r.current))return void e();const t=r.subscribe((n=>{AP(n)&&(t(),e())}))})),await e({force:!0,include:[],silenceViolations:"redirectToCart"===a.behavior?["non-stock"]:["all"],negotiationStage:"progression",onComplete(e){switch(g?.(e),e.status){case"success":if(!h)throw new bP("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});{t({type:"progress",page:h});const e=`${h.route}${h.queryParams||""}`;d.navigate(e,{replace:!0})}break;case"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:e.status,currentPage:h?.route});break;default:R(e)}}}),n(!1);break;case"stockProblems":if(n(!0),0!==p.parts.merchandiseLines.value.length&&m)await e({force:!0,silenceViolations:["non-stock"],include:[],onComplete(e){switch(e.status){case"success":if(!h)throw new bP("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});t({type:"progress",page:h}),d.navigate(h.route,{replace:!0});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:e.status,currentPage:h?.route});break;default:R(e)}}});else{if(!i.configuration.allowRedirectToStorefront){c.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:s.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length});break}c.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:s.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length}),Pb({client:o,url:u,source:l,configuration:i.configuration})}n(!1);break;case"processing":n(!0),c.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise((e=>{if(TP(i.latestReceipt.value))return void e();const t=V((()=>{TP(i.latestReceipt.value)&&(t(),e())}))})),n(!1);break;case"shopPayLogin":if(n(!0),!h)throw new bP("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});{t({type:"progress",page:h});const e=`${h.route}${h.queryParams||""}`;d.navigate(e,{replace:!0})}n(!1);break;case"offsitePaymentFailed":n(!1);break;case"noAddressLocation":case"terminalError":throw new bP(`Can't progress out of a ${a.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:R(a)}}),[c,n,e,r,t,d,p.parts.merchandiseLines,m,o,u,l,s.hasStorefront,i])}(P,t,r),x=function({plan:e,currentDetour:t,dispatch:n,onProgressionChange:r,negotiate:i,negotiated:o,proposedPostPurchaseInquiryStatus:c}
2){const u=pe(),{checkout:d,embed:p,persistence:m,source:h,observability:g,client:f,mobileCheckoutSdk:y,router:v}=u,{configuration:_}=d,b=d.latestReceipt.value,{hasExternalReceiptHandling:P}=_,k="shopPay"===d.identity.current.value,S=MP(),w=Zf(),C=ai(),E=ak(),x=b?.id,I=Pe(),A=u.checkout.configuration.layout.isOnePage,T=Ag()&&!oi(v.currentUrl.value.search),L=Tb().current.token,M=Fc(),D=Eu(),O=function({redirectProgressEnabled:e=!1}={}){const t=s(!1),{checkout:n,client:r,observability:i}=pe(),o=sk({mode:"copy-if-missing"});return a((a=>{if(t.current)return void i.counter({name:"thank_you_page_already_redirected",value:1});t.current=!0;const s=new URL(a,window.location.href),l=new URLSearchParams(r.initialRequest.url.search);return o(s.searchParams,l),e&&n.checkoutExit.startRedirectProgress(),window.location.replace(s.toString())}),[o,n.checkoutExit,r.initialRequest.url.search,i,e])}({redirectProgressEnabled:k&&!_.isUniversalCheckoutFinalizer&&T&&!t&&!D});l((()=>{P||E()}),[x]);const z=a(((e,t)=>{setTimeout((()=>{t()}),function(e){return 1500*e+450}(e))}),[]);return a((a=>{if(!a||w)return;g.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",Ev(a));const s=c.value;if("processed"===a.status&&a.waitingForPostPurchaseDone&&"done"!==s)return;const l=Mb(I),b=(e,t)=>e&&e>0?z(e,t):t();switch(a.status){case"abandoned":r(!1),m&&Jr(m,h),C();break;case"failed":{r(!1),m&&Jr(m,h);const s=new URL(window.location.href);if(s.searchParams.get("completed")&&s.searchParams.get("reload_receipt")){g.log("use_handle_receipt_progression_update","[Journey] Reloading processing page after failed receipt",{receiptId:a.id}),g.counter({name:"refresh_processing_step",value:1}),s.searchParams.delete("reload_receipt"),window.location.replace(s.toString());break}if("inventory"===a.failure.type){if(null==e.detours.find((e=>"stockProblems"===e.type)))throw new bP("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const t=I.lastNegotiation.value;i({force:!0,onComplete(e){switch(e.status){case"success":{const e=I.lastJourneyProgression.value,r=I.lastNegotiation.value;if(d.latestReceipt.value?.id!==a.id||r!==t&&"error"===r.type||("failed"===e.type||"error"===e.type)&&"completion"===e.negotiationStage)break;g.leaveErrorBreadcrumb("[Journey] Performed successful negotiation with a failed receipt"),g.log("use_handle_receipt_progression_update","[Journey] Performed successful negotiation with a failed receipt");const i=S("payment-methods");N((()=>{I.context.inventoryRecoverySignal.value={receiptId:a.id},function(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;N((()=>{e.generalPaymentError.value=void 0,e.generalPaymentErrorCode.value=void 0;for(const e of Object.values(n))"server"===e.value?.origin&&(e.value=void 0)}))}(I.parts)})),n({type:"error",page:i}),v.navigate({pathname:i.route,search:v.currentUrl.value.search});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:R(e)}}});break}if("payment"===a.failure.type&&(ci.has(a.failure.code)?i({include:["captcha"],skipStateUpdates:!0}):("CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"===a.failure.code&&i({force:!0,fieldsToResolve:["shopPromotion"]}),C())),"offsitePaymentFailed"===t?.type){v.navigate(t.route,{replace:!0});break}const l=function({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:i,receipt:a}){const o=DP(t,r,"payment-methods");if(function(e){return"payment"===e?.failure.type&&!0===e.failure.hasOffsitePaymentMethod}(a)&&o)return o;const s=function(e,t){return t?e.find((({id:e})=>e===t)):void 0}(t,e);if(s)return"review"===s.id?(o||i.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no last page with payment methods found, falling back to first page "),o??t[0]):s;const l=n.find((e=>!e.complete&&!e.skipped)),c=t.findIndex((e=>l?.id===e.id));if(!o){const e=t[c]??t[0];return i.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:e?.id}),e}const u=t.findIndex((e=>e.id===o.id));if(c>=0&&u>c){const e=t[c];return i.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:o.id,fallbackPageId:e.id}),e}return o}({departurePageId:v.currentUrl.value.searchParams.get(NP),greenPath:e.greenPath,history:M.value.history,observability:g,
2negotiated:o,receipt:a});n({type:"error",page:l}),v.navigate(l.route,{replace:!0});break}case"processed":{g.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:a.redirectUrl,receiptId:a.id});const i=e.detours.find((e=>"postPurchase"===e.type)),o=Boolean(i)&&Boolean(a.postPurchasePageRequested)&&"ready"===a.postPurchaseVaultingStatus&&"success"===s,c=!p?.isFlagshipPartner&&o;if(p?.isFlagshipPartner&&o&&"thankYou"!==t?.type&&g.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:a.id}),c&&"thankYou"!==t?.type){if(g.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:a.id,postPurchasePageUrl:a.postPurchasePageUrl,postPurchasePageRequested:a.postPurchasePageRequested,postPurchaseVaultingStatus:a.postPurchaseVaultingStatus}),shopAppDomain:k}),k&&a.postPurchasePageUrl)window.location.replace(a.postPurchasePageUrl);else{const e=i;v.currentUrl.value.searchParams.delete("post_purchase");const t=`${e.route}${v.currentUrl.value.search}`;l(a),v.navigate(t,{replace:!0})}break}if(p?.client?.complete(),!_.isUniversalCheckoutFinalizer&&si(p?.embedder))break;if(!_.isUniversalCheckoutFinalizer&&a.redirectUrl){const e=a.redirectUrl;a.skipToThankYouPage?(g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:a.id,redirectUrl:e,postPurchasePageRequested:a.postPurchasePageRequested,postPurchasePageUrl:a.postPurchasePageUrl})}),n({type:"skipRemainingPages"})):n({type:"complete"}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:k,checkoutDesign:A.value?"ONE_STEP":"THREE_STEP",typType:"classic",visibility_state:document.visibilityState}}),g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with redirectUrl",{redirectUrl:e});const r=new URL(e);return L&&r.searchParams.set(li,L),b(a?.completedRemoteCheckouts?.length,(()=>{return e=r.toString(),!T||t||D||Ml((()=>{d.checkoutExit.exit()}),["checkout-exit"],{replace:!0,interrupt:!0}),void O(e);var e}))}const m=e.detours.find((e=>"thankYou"===e.type));if(!m?.route)throw new bP("On thank-you, but no matching detour!",{groupingHash:"JourneyError::OnThankYouNoMatchingDetour"});{const e="prevent_order_redirect",i=new URLSearchParams(v.currentUrl.value.search);let o=i.has(e)&&"false"!==i.get(e)?`${m.route}?${e}=true`:m.route;y.variant.recovery&&(o=function(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}(o,a.id));const s=()=>
2{if(g.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:m.route}),a.skipToThankYouPage){g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:a.id,redirectUrl:a.redirectUrl,postPurchasePageRequested:a.postPurchasePageRequested,postPurchasePageUrl:a.postPurchasePageUrl})}),n({type:"skipRemainingPages"});const e=f.cookies.get(vb);e&&h.sourceId===e.split("%3F")[0]&&f.cookies.delete(vb)}else f.cookies.delete(vb),n({type:"complete"});l(a)},c=e=>{g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:o}),b(a?.completedRemoteCheckouts?.length,(()=>function(e,n){const i=()=>{v.navigate(e,{replace:!0,state:{...v.currentUrl.value.state,redirectingToThankYou:!0}})};T&&!t?(n?.(),Ml(i,["checkout-exit"],{replace:!0,interrupt:!0})):Ml((()=>{n?.(),i()})),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:k,checkoutDesign:A.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),r(!1)}(o,e)))},d=_.deferredProfileChangeId;if(d||_.profileKey.peek()?.requireBusinessCriticalOnly){_.update({deferredProfileChangeId:void 0});const e=d??_.profileId.peek();Ic(s,{trigger:"completion",profileRequest:e?{id:e,requireBusinessCriticalOnly:!1}:void 0,graphql:u.graphql.coreGraphql,extensibility:u.checkout.extensibility,configuration:_,observability:g,userEvents:u.userEvents,telemetryContext:{source:I.source,shop:I.shop,sessionToken:I.sessionToken,current:I.current}}).then(c).catch((()=>{}))}else s(),c()}break}case"polling_for_order":case"action_required":case"processing":{if("processing"===t?.type)break;if("polling_for_order"===a.status&&"thankYou"===t?.type){g.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify(a),routerCurrentUrl:v.currentUrl.value.toString()});break}const n=e.detours.find((e=>"processing"===e.type));n?.route&&r(!0);break}case"processing_remote_checkouts":{if("processing"===t?.type)break;const n=e.detours.find((e=>"processing"===e.type));if(!n?.route)break;Ml((()=>{const e=v.currentUrl.value.search;v.navigate(e?{pathname:n.route,search:e}:n.route,{replace:!0})}));break}default:R(a)}}),[f,p?.client,p?.embedder,p?.isFlagshipPartner,y,C,t,d,n,w,A,T,k,M,S,u,_,i,o,I,r,m,e.detours,e.greenPath,D,c,L,O,v,h,g,z])}({plan:d,currentDetour:m,dispatch:t,onProgressionChange:r,negotiate:P,negotiated:k,proposedPostPurchaseInquiryStatus:b});l((()=>{const e=e=>{if("queued"!==e.status)return;const t=d.detours.find((e=>"throttle"===e.type));if(t?.route)v.navigate(t.route);else if(p)throw new bP(`Throttled, but no matching detour from ${p&&JSON.stringify(p,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return e(_.current),_.subscribe(e)}),[_,v,p,d.detours,t]),C((()=>{const e=y.latestReceipt.value;g.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",Ev(e)),c((()=>x(e)))}));const I=s(b.peek());C((()=>{const e="thankYou"===m?.type||"postPurchase"===m?.type,t=b.value,n=I.current;if(e&&t!==n){I.current=t;const e=y.latestReceipt.value;g.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...Ev(e),previousStatus:n}),c((()=>x(e)))}}));const{progress:A,completing:T}=function({journey:e,exitDetour:t,pageComplete:n,pageNegotiate:r}){const{client:l,observability:c,router:u}=pe(),d=f(0),p=i((()=>d.value>0)),m=l.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:h,handleClosingPopup:g}=function(){const e=ak(),t=hy(),n=Ih(),{paymentLines:r}=Ge(),i=Pe(),{i18n:a,observability:s,userEvents:l,checkout:{offsitePopupController:c},shop:{id:u}}=pe();return o((()=>({handleOffsitePopupOpen:()=>{const o=r.value.at(0);let d=!1;if("customOnsite"===o?.method.type)d=FP(o);else if(o&&"walletContent"in o.method&&"SHOP_PAY"===o.method.name){const e=o.method.walletContent?.paymentMethodIdentifier,t=(i.current?.fields?.paymentMethods?.value||[]).find((t=>UP(t)&&t.paymentMethodIdentifier===e));d=Boolean(t)}if(t.value){if(d){s.counter({name:"offsite_payment_popup_flow_initiated",value:1,attributes:{payment_method_name:"Crypto: USDC",is_shop_pay_wrapped:Boolean(o&&"walletContent"in o.method&&"SHOP_PAY"===o.method.name),is_mobile:$t()}});const e=ye(u);
2if(e){const t=parseInt(e,10);if(!isNaN(t)){const e=function(e){const t=Bg();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}(t);e&&l&&l.monorailEvent(e)}}}const t={width:600,height:455};c.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:t,isCryptoPayment:d,title:a.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&c.isOpen.value&&c.close({})}})),[t.value,r,s,l,i,c,n,a,e,u])}(),y=s(t);y.current=t;const v=s(n);v.current=n;const _=s(r);_.current=r;const b=s(h);b.current=h;const P=s(g);P.current=g;const k=s(u);return k.current=u,{progress:a((async(t,n,r)=>{const i=async e=>{try{await(n?.(e))}finally{"success"!==e.status&&P.current()}},a={...r,onProgressBlocked:()=>{try{r?.onProgressBlocked?.()}finally{P.current()}},onValidationSuccess:()=>{try{r?.onValidationSuccess?.()}finally{b.current()}}},{plan:o,currentPage:s,currentDetour:l}=e.value,u=y.current;if(c.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:t,skipToCompletion:a?.skipToCompletion,greenPath:o.greenPath.map((e=>e.route)),detours:o.detours.map((e=>e.route)),currentPageRoute:s?.route,currentDetourRoute:l?.route}),!a?.skipToCompletion&&l&&s){const e=o.detours.find((e=>"thankYou"===e.type)),t="processing"===l.type?e:s;return m?.start({target:t?.route}),c.leaveErrorBreadcrumb(`[Journey] Exiting "${l.route}" detour, moving to "${t?.route}"`,{currentDetourRoute:l.route,exitDetourTargetRoute:t?.route,targetPageRoute:s.route}),u(l,s,i)}if(null==s)return c.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),void a?.onProgressBlocked?.();const p=yP(s,o.greenPath[o.greenPath.length-1])||a?.skipToCompletion,h=o.greenPath.findIndex((({id:e})=>e===s.id)),g=o.detours.find((e=>"processing"===e.type)),f=p?g:o.greenPath[h+1];m?.start({target:f?.route});const S=k.current.currentUrl.peek(),w=o.greenPath.find((e=>e.route===S.normalizedPath))??s;if(p?S.searchParams.set(NP,w.id):S.searchParams.delete(NP),c.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:a?.skipToCompletion,greenPath:o.greenPath.map((e=>e.route)),isLastPage:p,currentPageRoute:s.route,currentDetourRoute:l?.route,nextPageRoute:f?.route}),!p)return _.current(s,i);d.value+=1;try{await v.current(s,l,i,a)}finally{d.value-=1}}),[y,e,v,_,d,m,c,P,b]),completing:p}}({journey:u,exitDetour:E,pageComplete:w,pageNegotiate:S}),L=function({plan:e}){const{router:t,observability:n}=pe();return a((async(r,i)=>{const a=e.detours.find((e=>e?.type===r));if(!a)throw n.leaveErrorBreadcrumb("Detour, but no matching detour",{detourType:r,detours:e.detours,currentUrl:t.currentUrl.value.href}),new bP("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const o=`${a.route}${e.greenPath[0].queryParams||""}`;t.navigate(o,i?.routerOptions)}),[e.detours,e.greenPath,t,n])}({plan:d}),M=function({negotiate:e}){return a((()=>{e({prefetch:!0,negotiationStage:"progression"})}),[e])}({negotiate:P}),D=Ak();l((()=>k.pendingFieldsNegotiation.subscribe((e=>{"success"!==e?.status&&"error"!==e?.status||u.peek().currentDetour||wP(k.current.fields.allViolations.peek()??[])&&(D(),L("stockProblems",{routerOptions:{replace:!0}}))}))),[k,u,L,D]);const O=o((()=>({detour:L,progress:A,negotiate:P,progressing:n,completing:T,prefetch:M})),[L,A,n,T,P,M]);return h(Vc.Provider,{value:O,children:e})}function Gk({plan:e,children:t}){const n=f(!1),r=a((e=>{n.value=e}),[n]),{observability:c,router:u}=pe(),d=u.currentUrl.value,[p,m]=function(e){const{router:t,checkout:n,observability:r,source:i}=pe(),c=Tb(),u=n.proposal.facts.delivery??[],d=Pe(),p=Boolean(n.proposal.facts.requiresShipping),m=Vr(i)?p:n.isShippingRequired.value,h=n.configuration.layout.isOnePage.value,g=function(){const{data:e}=Ab();return"NegotiationResultAvailable"===e?.session?.negotiate.result.__typename&&"PendingTerms"===e.session.negotiate.result.sellerProposal.delivery.__typename}(),f=function(){const{data:e}=Ab(),{checkout:t}
2=pe(),n=e?.session?.negotiate.result;let r;if("NegotiationResultAvailable"===n?.__typename&&"PendingTerms"===n.sellerProposal.delivery.__typename){const{sellerProposal:e,buyerProposal:t}=n;r=Ur({delivery:e.delivery,buyerDelivery:t.delivery,remoteDelivery:qr(e.remote).remoteDelivery})}const{details:i}=jt(r?.countryCode);return null!=r&&Wy({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:i})}(),y=dP(),v=function(){const e=s(null);return e.current||(e.current=new IP),l((()=>()=>{e.current?.cleanup()}),[]),e.current}();!function({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:i,initialPath:a,sessionType:o}){l((()=>{const s=t.current.value,l=t.parts.email.value,c=t.current.fields.allViolations.value??[];e.log("journey_init_contact_state","Initial contact-info state captured at journey initialization",{layout:i?"onePage":"threePage",planPages:n.greenPath.map((e=>e.id)).join(","),initialPath:a,sessionType:o,identity:r,customerProfileType:s?.buyerIdentity?.customerProfile?.__typename,hasNegotiatedContactEmail:Boolean(s?.contactInfo?.email),hasNegotiatedCustomerProfileEmail:Boolean(s?.buyerIdentity?.customerProfile?.email),hasProposedEmail:Boolean(l),hasMissingContactViolation:c.some((e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code))})}),[]);const c=s(!0);C((()=>{const n=t.current.fields.allViolations.value??[];c.current?c.current=!1:n.some((e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code))&&e.log("negotiated_missing_contact_violation_observed","Subsequent negotiation surfaced a missing-contact violation",{hasNegotiatedContactEmail:Boolean(t.current.fields.contactInfo.peek()?.email),hadProposedEmailFallback:Boolean(t.parts.email.peek()),customerProfileType:t.current.peek().buyerIdentity?.customerProfile?.__typename,identity:r,sessionType:o,layout:i?"onePage":"threePage"})}))}({observability:r,negotiated:d,plan:e,identity:n.identity.current.value,isOnePageLayout:h,initialPath:t.currentUrl.value.normalizedPath,sessionType:i.type});const{postPurchaseInquiryStatus:_,paymentLines:b}=Ge(),P=_.value,k=()=>function({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:i,negotiatedState:a,plan:o,postPurchaseInquiryStatus:s,proposedPaymentLines:l,receipt:c,sessionType:u,shippingRequired:d,throttle:p,url:m}){const h=o.greenPath.findIndex((e=>{if(e.skipOverPage?.(a))return!1;const t=cc(e.features,a);return!e.fastForwardThroughPage||!e.fastForwardThroughPage(a,t)})),g=o.greenPath[h],f=[];i.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:h,firstPage:String(g?.id),plan:JSON.stringify(o.greenPath)}),o.greenPath.slice(0,h).forEach((e=>{if("information"===e.id){const t=SP(a?.contactInfo,a.allViolations??[]);i.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:t,contactInfo:JSON.stringify(a?.contactInfo),violations:a.allViolations??[]}),f.push({id:e.id,skipped:!1,complete:t})}else f.push({id:e.id,skipped:!1,complete:!0})})),f.push({id:g.id,skipped:!1,complete:!1});const y=o.greenPath.findIndex((e=>!(e.route!==m.normalizedPath||e.skipOverPage&&e.skipOverPage(a)))),v=l?.some((e=>"direct"===e.method.type&&e.method.sessionId)),_=0===a.runningTotal?.amount||v,b="review"===o.greenPath[y]?.id&&!_,P=b?y-1:y,k=Boolean(o.greenPath[P]?.skipOverPage?.(a));if(t&&n&&!k&&P>h&&g?.blockedOnlyByShippingAddress?.(a,cc(g.features,a))){for(let e=h;e<P;e++){const t=f[e];f[e]=t?{...t,complete:!0}:{id:o.greenPath[e].id,skipped:!0,complete:!0}}f[P]={id:o.greenPath[P].id,skipped:!1,complete:!1},i.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:u,firstPageIndex:h,currentPageFromUrlIndex:y,advanceTo:P,clamped:b})}const S=f.find((e=>!e.complete&&!e.skipped)),w=o.greenPath.findIndex((e=>S?.id===e.id)),C=o.greenPath[w],E=o.greenPath[y],x=function({plan:e,isSimulated:t,currentPageFromUrlIndex:n,currentPageFromHistoryIndex:r,canLoadReview:i}){const a=e.greenPath[n];if(t&&a)return a;
2if(n>=0&&n<=r)return a;const o=e.greenPath[r];if("review"===o?.id&&!i){const t=e.greenPath.findIndex((e=>"review"===e.id));return e.greenPath[t-1]||e.greenPath[0]}return o}({plan:o,isSimulated:"simulated"===u,currentPageFromUrlIndex:y,currentPageFromHistoryIndex:w,canLoadReview:_}),I=o.detours.find((e=>"route"in e&&e.route===m.normalizedPath)),A=wP(a.allViolations??[]),T=a.shippingAddress,N=r.length>0&&r[0].deliveryAddress?r[0].deliveryAddress:T,L="BusinessCustomerProfile"===a?.buyerIdentity?.customerProfile?.__typename&&!e&&Yr(N)&&EP(u)&&d,R=new URLSearchParams(m.search),M="processing"===I?.type&&"true"===R.get("post_purchase"),D=("postPurchase"===I?.type||M)&&"success"===s&&"processed"===c?.status&&"created"===c.orderCreationStatus.status,O=("shopPayLogin"===I?.type?o.detours.find((e=>"shopPayLogin"===e.type)):void 0)??("offsitePaymentFailed"===I?.type?o.detours.find((e=>"offsitePaymentFailed"===e.type)):void 0)??(D?o.detours.find((e=>"postPurchase"===e.type)):void 0)??("queued"===p.status?o.detours.find((e=>"throttle"===e.type)):void 0)??(A?o.detours.find((e=>"stockProblems"===e.type)):void 0)??(L?o.detours.find((e=>"noAddressLocation"===e.type)):void 0)??("action_required"===c?.status||"processing"===c?.status||"processing_remote_checkouts"===c?.status?o.detours.find((e=>"processing"===e.type)):void 0)??("processed"===c?.status&&c.redirectUrl?o.detours.find((e=>"processing"===e.type)):void 0)??("processed"===c?.status?o.detours.find((e=>"thankYou"===e.type)):void 0)??("thankYou"===I?.type&&"simulated"===u?o.detours.find((e=>"thankYou"===e.type)):void 0);if(i.leaveErrorBreadcrumb("Journey:initializeJourney: resulting currentPage and expectedDetourFromState",{history:JSON.stringify(f.map((e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped}))),normalizedUrlPath:m.normalizedPath,currentPageFromHistory:String(C?.id),currentPage:String(x?.id),expectedDetourFromState:O?.route,receipt:JSON.stringify(c)}),null==O&&null==x)throw new bP("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return O?{plan:o,history:f,redirectTo:(z=I,B=O,z?.type===B?.type&&z?.route===B?.route?void 0:O)}:{plan:o,history:f,redirectTo:yP(E,x)?void 0:x};var z,B}({purchasingCompanyHasNegotiatedLocalPickupSelected:y.value,negotiatedDeliveryPending:g,buyerProposalHasDestination:f,deliveryFact:u,observability:r,negotiatedState:d.current.peek(),plan:e,postPurchaseInquiryStatus:P,proposedPaymentLines:b.value,receipt:n.latestReceipt.value,sessionType:i.type,shippingRequired:m,throttle:c.
2current,url:t.currentUrl.value}),S=o((()=>je(((e,n)=>function(e,t,n,r,i){n.leaveErrorBreadcrumb("Journey:updateJourney: initiated with action",{actionType:t.type});const{plan:a}=e,o=e.redirectTo?{...e,redirectTo:void 0}:e,s=r.currentUrl.value.normalizedPath,l=a.greenPath.find((e=>e.route===s)),c=a.detours.find((e=>e.route===s));switch(t.type){case"reinitialize":return t.state;case"clearRedirect":return o;case"skipRemainingPages":{const{plan:t,history:r}=e;if(!l){if("thankYou"===c?.type)return e;const t="undefined"!=typeof window&&window.location?window.location.href:"SSR: no location available";throw n.leaveErrorBreadcrumb("Skipping to completion, but no current page",{currentDetour:c,currentUrl:t}),new bP("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const i=t.greenPath.findIndex((e=>yP(e,l))),a=r.slice(0,i+1),s=a.pop();a.push({...s,complete:!0});for(let e=i+1;e<t.greenPath.length;e++){const n=a[e];a[e]=n?{...n,skipped:!0}:{id:t.greenPath[e].id,skipped:!0,complete:!1}}return n.leaveErrorBreadcrumb("Journey:updateJourney: on progress, skip to completion",{history:a.map((e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped}))),currentDetourRoute:c?.route}),{...o,history:a}}case"progress":{const{plan:r,history:i}=e,{page:a}=t;if(null==a)throw n.leaveErrorBreadcrumb("Journey:updateJourney: progress failed, no next page",{currentPage:l?.id,currentDetour:c?.type,actionType:t.type}),new bP(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const s=r.greenPath.findIndex((e=>yP(e,a))),u=i.slice(0,s);for(let e=0;e<s;e++){const t=u[e];null==t?u[e]={id:r.greenPath[e].id,skipped:!0,complete:!0}:t.complete||(u[e]={...t,complete:!0})}return u.push({id:a.id,skipped:!1,complete:!1}),n.leaveErrorBreadcrumb("Journey:updateJourney: on progress",{history:u.map((e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped}))),currentPageRoute:a.route}),{...o,history:u}}case"complete":{const{history:t}=e,r=[...t],i=r.pop();return r.push({...i,complete:!0}),n.leaveErrorBreadcrumb("Journey:updateJourney: on complete, set currentPage to undefined",{history:JSON.stringify(r.map((e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped})))}),{...o,history:r}}case"error":{const{plan:r,history:a}=e,{page:s=l}=t;if(null==s)return n.leaveErrorBreadcrumb("Journey:updateJourney: currentPage from state",{history:JSON.stringify(a.map((e=>e?.id))),currentPage:String(l?.id)}),n.error(new bP(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...o,redirectTo:r.greenPath[0]};const u=i?function(e,t,n,r){const i=t.greenPath.findIndex((t=>yP(t,e)));if(-1===i)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 a=0;a<i;a++){const i=t.greenPath[a];let o=!1;if(o="information"!==i.id||SP(n.contactInfo,n.allViolations??[]),!o)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:i.id,unsatisfiedPrerequisitePageRoute:i.route}),i}return e}(s,r,i.current.peek(),n):s,d=!yP(s,u);i&&d&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:s.id,redirectedToPage:u.id});const p=r.greenPath.findIndex((e=>yP(e,u)));return n.leaveErrorBreadcrumb("Journey:updateJourney: on error",{history:a.map((e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped}))),originalTargetPageRoute:s.route,finalTargetPageRoute:u.route,currentDetourRoute:c?.route}),{...o,history:[...a.slice(0,p),{id:u.id,skipped:!1,complete:!1}]}}default:R(t)}}(e,n,r,t,d)),k())),[]),w=a((e=>{S.value=e}),[S]),E=s(h);E.current!==h&&(E.current=h,w({type:"reinitialize",state:k()}));const x=s(t.currentUrl.value);return x.current=t.currentUrl.value,l((()=>t.currentUrl.subscribe((e=>{x.current!==e&&(x.current=e,w({type:"clearRedirect"}),v.detectInfiniteRedirect(e,S,r))}))),[t,w,v,S,r]),l((()=>t.block((e=>{const n=t.currentUrl.value,i=function(e,t){const n=new URLSearchParams(e.searchParams),r=new 
2URLSearchParams(t.searchParams);return n.sort(),r.sort(),e.pathname===t.pathname&&n.toString()===r.toString()&&JSON.stringify(e.state)===JSON.stringify(t.state)}(n,e);return i&&r.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:n.pathname,search:n.search},requested:{path:e.pathname,search:e.search}}),i}))),[t,r]),[S,w]}(e);Zh(p,(({previousState:e,action:t,nextState:n})=>{c.leaveErrorBreadcrumb("Journey state transition",{previousState:{history:e.history,redirectTo:e.redirectTo?.route},action:t,nextState:{history:n.history,redirectTo:n.redirectTo?.route},routerCurrentUrl:d.normalizedPath})}));const{redirectTo:g}=p.value,y=f(),{pageBeforeDetour:v,completed:_}=function({router:e,plan:t,journeyStateSignal:n}){const r=s(void 0),a=i((()=>{const n=e.currentUrl.value.normalizedPath;return t.greenPath.find((e=>e.route===n))}));return{pageBeforeDetour:i((()=>{const i=a.value;i&&(r.current=i);const o=r.current,s=e.currentUrl.value.normalizedPath,{history:l}=n.value,c=t.detours.find((e=>e.route===s));if(i)return i;if(c&&o)return o;if(c&&!o){const e=t.greenPath[0],n=l.find((e=>!e.complete));return t.greenPath.find((e=>e.id===n?.id))??e}})),completed:i((()=>{return t=n.value.plan.detours.find((t=>t.route===e.currentUrl.value.normalizedPath)),"thankYou"===t?.type;var t}))}}({router:u,plan:e,journeyStateSignal:p}),b=o((()=>({journeyState:p,currentFocus:y,completed:_,pageBeforeDetour:v})),[p,y,_,v]);if(null!=g){const e=d.search?{pathname:g.route,search:d.search}:g.route;return u.redirect(e),null}return h(Bc.Provider,{value:b,children:[h(_P,{}),h(Wk,{dispatch:m,progressing:n,onProgressionChange:r,children:t})]})}function Jk(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function Kk(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function Qk(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function Xk(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function Zk(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function eS(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function tS(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function nS(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function rS(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function iS(e,{beforeStock:t=[],afterStock:n=[tS(e)]}={}){return[Jk(e),Kk(e),Qk(e),...t,Zk(e),...n]}function aS(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if("wallet"!==r?.type)return!1;const i=ec(n);return"APPLE_PAY"===r.name||"PAYPAL_EXPRESS"===r.name&&i}function oS({disabled:e,key:t,variants:n}){const{client:r,router:i}=pe(),a=i.currentUrl.value;if(e)return;const o=new URLSearchParams(a.search).get(t);if(o&&n.includes(o))return o;const s=r.cookies.get(t);return s&&n.includes(s)?s:void 0}function sS(){const{shop:e}=pe(),t=function(){const e=oS({key:"operatziya_y",variants:[yi.Control,yi.Treatment]}),{client:t}=pe(),n=t.unstable_getSerialization("experiments"),r=n?.find((e=>e.clientHandle===zl))?.variant===yi.Treatment;return e||(r?yi.Treatment:yi.Control)}()===yi.Treatment;return Boolean(e.confirmationPageEnabled)||t}function lS(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function cS(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}const uS=["checkout","cartNext","draftOrder"],dS=["delivery-method"],pS=new Set(vi),mS=new Set(_i),hS=new Set(bi);function gS(){const{i18n:e,shop:t,source:{type:n},checkout:r,observability:i}=pe(),{extensibility:s}=r,l=Ye(),c=H_(),u=uS.includes(n),{data:d}=Ab(),p=function(){const{data:e}=Ab();if("NegotiationResultAvailable"!==e?.session?.negotiate.result.__typename)return;const{sellerProposal:t}=e.session.negotiate.result;return Ur({delivery:t.delivery,remoteDelivery:qr(t.remote).remoteDelivery})}(),{details:m}=jt(p?.countryCode),h="draftOrder"===n,g=r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,f=sS(),{parts:y}=me(),v=ke(),_=v.paymentMethods.value,b=y.paymentLines,P=r.configuration.addressSettings.nonBillingAddressSettings.value,k=cS(r),S=v.isShippingRequired.value,w=a(((e,{excludedExtensionTargets:t}={})=>s.ui.hasBlockingExtensionForFeatures({features:e,placementReferences:c,excludedExtensionTargets:t})),[c,s.ui]),C=a(((e,t)=>(i.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0)),[i]);return o((()=>function({i18n:e,sourceType:t,addressSettings:n,billingAddressSettings:r,hasBlockingUiExtensionForFeatures:i,getSellableDeliveryMethods:a,initialNegotiationData:o,isDraftOrderCheckout:s,isPrePopulatedSourceType:l,isShippingRequired:c,proposedPaymentLines:u,reviewEnabled:d,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:h,shop:g,checkout:f,paymentMethods:y,observability:v,recordFastForward:_}){const b=(e,t)=>i(t,{excludedExtensionTargets:fS(e.deliveryNext)})?{gatedBy:"extension"}:wi(e.paymentLines)?{gatedBy:"paypalExpress",satisfied:_S(e.paymentLines,e.deliveryNext)&&SP(e.contactInfo,e.allViolations)}:Ci(e.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:t.filter((t=>!((e,t)=>{switch(t){case"contact-information":return SP(e.contactInfo,e.allViolations);case"shipping-address":return function({shippingAddress:e,addressSettings:t,countryDetails:n,violations:r=[],isDraftOrder:i,state:a}){return!!e&&!(t.isRequired("phone",{countryCode:e?.countryCode})&&i&&(!a.contactInfo?.email||!a.shippingAddress?.phone))&&!!Wy({address:e,addressSettings:t,countryDetails:n})&&r.every((e=>"shipping-address"!==kP(e)))}({shippingAddress:p,addressSettings:n,countryDetails:m,violations:e.allViolations,state:e,isDraftOrder:s});case"billing-address":return function(e,t,n=[]){return!!Wy({address:t,addressSettings:e})&&n.every((e=>"billing-address"!==kP(e)))}(r,e.billingAddress,e.allViolations);case"delivery-method":return function(e,t=[]){return"filled"===e?.status&&!!e.lines.some((e=>"methods"in e&&e.methods.some((e=>"PICK_UP"===e.methodType||"PICKUP_POINT"===e.methodType))))&&t.every((e=>"delivery-method"!==kP(e)))}(e.deliveryNext,e.allViolations);case"payment-methods":case"localization-extension":return!1;default:return R(t)}})(e,t)))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:e})=>Array.from(function*(){yield"contact-information",Si(e)||Pi(e)?yield"delivery-method":c?yield"shipping-address":yield"billing-address"}()),fastForwardThroughPage:(e,t)=>
2{const n=b(e,t);if("extension"===n.gatedBy)return!1;if("paypalExpress"===n.gatedBy)return!!n.satisfied&&_("information","paypal_express_and_contact_satisfied");if("googlePay"===n.gatedBy)return!1;const[r]=n.unsatisfied;return v.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:r??null,isPrePopulatedSourceType:l,allViolations:e.allViolations?.map((e=>e.code))||[]}),l&&void 0===r},blockedOnlyByShippingAddress:(e,t)=>{const r=b(e,t),i=s&&n.isRequired("phone",{countryCode:e.shippingAddress?.countryCode})&&(!e.contactInfo?.email||!e.shippingAddress?.phone);return null===r.gatedBy&&l&&!i&&1===r.unsatisfied.length&&"shipping-address"===r.unsatisfied[0]&&(e.allViolations??[]).every((e=>"shipping-address"!==kP(e)))}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:dS,fastForwardThroughPage:e=>{return!i(dS)&&("cartNext"===t?function(e){const t=function(e){return"filled"!==e?.status?[]:Je(e).filter((e=>"available"===e.status))}(e);return 0!==t.length&&t.every((e=>function(e){return 1===e.methods.length}(e)||function(e){if(e.methods.length<=1)return!1;const t=zt(e);return!!t&&e.methods[0]?.handle!==t.handle}(e)))}(e.deliveryNext)?_("shipping","cart_next_shipping_selection_determined"):(n=e.paymentLines,!!n?.lines.some((e=>"direct"===e.method.type&&Boolean(e.method.sessionId)))&&_("shipping","cart_next_has_direct_payment_session")):!!function({latestNegotiation:e,initialNegotiation:t,isPrePopulatedSourceType:n}){if(!n)return!1;if("filled"!==e?.deliveryNext?.status)return!1;const r=t?.session?.negotiate.result;if("NegotiationResultAvailable"!==r?.__typename||"FilledDeliveryTerms"!==r.buyerProposal.delivery.__typename)return!1;const i=r.buyerProposal.delivery.deliveryLines.map((e=>"DeliveryStrategyReference"===e.selectedDeliveryStrategy?.__typename?e.selectedDeliveryStrategy.handle:void 0)).find((e=>void 0!==e));if(void 0===i)return!1;const a=Je(e?.deliveryNext).find((e=>"available"===e.status));return void 0!==a&&!(i!==zt(a)?.handle)}({latestNegotiation:e,initialNegotiation:o,isPrePopulatedSourceType:l})&&_("shipping","initial_delivery_selection_preserved"));var n},skipOverPage:({deliveryNext:e,isShippingRequired:t})=>!t||kn(e)||Pi(e)||h||ki(a().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>aS(d,u.peek(),{shop:g,checkout:f,paymentMethods:y})?["payment-methods","localization-extension"]:["payment-methods","billing-address","localization-extension"]},...d?[{id:"review",label:e.translate("review.title"),route:"/review",features:["billing-address"]}]:[]],detours:[{type:"throttle",label:e.translate("throttle.title"),route:"/throttle"},{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"}]}}({i18n:e,sourceType:n,addressSettings:P,billingAddressSettings:k,hasBlockingUiExtensionForFeatures:w,getSellableDeliveryMethods:()=>l.value,initialNegotiationData:d,isDraftOrderCheckout:h,isPrePopulatedSourceType:u,isShippingRequired:S,proposedPaymentLines:b,reviewEnabled:f,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:g,shop:t,checkout:r,paymentMethods:_,observability:i,recordFastForward:C})),[P,k,w,l.value,d,h,u,S,b,f,p,m,g,n,e,t,r,_,i,C])}function fS(e){const t=new Set,n=yS(e,"PICK_UP"),r=yS(e,"PICKUP_POINT");return n||vS(t,pS),r||vS(t,mS),(n||r)&&vS(t,hS),t.size>0?t:void 0}function yS(e,t){return Je(e).some((e=>"available"===e.status&&zt(e)?.methodType===t))}function vS(e,t){t.forEach((t=>e.add(t)))}function _S(e,t){const n=Ut(e?.lines,"PAYPAL_EXPRESS");if(!n)return!1;if("filled"!==t?.status)return!1;const r=n.method.walletContent;return Boolean((r?.email??void 0)&&(r?.token??void 0))}function bS({children:e}){const{i18n:t,observability:n,router:r,shop:s,source:l,checkout:c}=pe(),u="shopPay"===c.identity.current.value,d=c.configuration.layout.isOnePage.value,{parts:p}=me(),m=ke().paymentMethods?.value,g=p.paymentLines,f=sS(),y=function(){const{i18n:e,shop:t,source:n,checkout:r,observability:o}=pe(),{buyerIdentity:s}=ke(),l=pP(),c=Cu(),u=lP(),d=cP(),p=mP(),m=a(((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0)),[o]),h=a((e=>{const t=s.value?.purchasingCompany;return!(!t?.location.shippingAddress||!e)&&Boolean(c.value&&u.value&&Kn(t.location.shippingAddress,e))}),[s,c,u]);return i((()=>{const i=s.value?.purchasingCompany;if(!i)return;const a=!Vr(n)&&r.isShippingRequired.value&&!l.value,o=p.value,u=()=>({id:"review",label:e.translate("review.title"),route:"/review",features:[]});return r.configuration.layout.isOnePage.value?[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...o?hP:[],...a?gP:[],...fP]},...t.confirmationPageEnabled?[u()]:[]]:[...o?[{id:"information",label:e.translate("contact.title"),route:"/information",features:hP,fastForwardThroughPage:({shippingAddress:e})=>!(!h(e)||d.value)&&m("information","business_customer_pre_negotiated_address")}]:[],...a?[{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:gP,fastForwardThroughPage:({shippingAddress:e,deliveryNext:t})=>c.value?!!h(e)&&m("shipping","business_customer_pre_negotiated_address"):"unavailable"!==t?.status&&m("shipping","business_customer_no_editable_address_with_delivery"),skipOverPage:({deliveryNext:e})=>kn(e)}]:[],{id:"payment",label:e.translate("payment.title"),route:"/payment",features:fP},u()]})).value}(),v=r.currentUrl.value?.search,_=gS(),b=function({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":Vr(n)?"orderEdit":r?"onePage":"threePage"}({businessCustomerJourneyPath:y,isShopPay:u,source:l,isOnePageCheckout:d}),P=o((()=>{switch(b){case"businessCustomer":return n.leaveErrorBreadcrumb("Using business customer journey plan"),function({i18n:e,greenPath:t}){return{greenPath:t,detours:[...iS(e,{beforeStock:[Xk(e)]}),nS(e)]}}({i18n:t,greenPath:y});case"shopPay":return n.leaveErrorBreadcrumb("Using shop pay journey plan"),function({i18n:e,shopName:t,currentUrlSearch:n}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",queryParams:n,features:({isShippingRequired:e})=>[e?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[rS(e),Jk(e,"redirectToCart"),Kk(e),Qk(e),Zk(e),eS(e,t),tS(e),nS(e)]}}({i18n:t,shopName:s.name,currentUrlSearch:v});case"orderEdit":return n.leaveErrorBreadcrumb("Using order edit checkout journey plan"),function({i18n:e,isOnePageCheckout:t,reviewEnabled:n}){return{greenPath:[t?{id:"onePage",label:e.translate("general.page_title"),route:"/",features:["payment-methods","billing-address"]}:{id:"payment",label:e.translate("payment.title"),route:"/payment",features:["payment-methods","billing-address"]},...n?[lS(e)]:[]],detours:[...iS(e,{afterStock:[]}),nS(e)]}}({i18n:t,isOnePageCheckout:d,reviewEnabled:f});case"onePage":return function({i18n:e,reviewEnabled:t,paymentMethods:n,proposedPaymentLines:r,shop:i,checkout:a}){return{greenPath:[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:({isShippingRequired:e})=>{const o=["contact-information","delivery-method","payment-methods","localization-extension"];return e?o.push("shipping-address"):aS(t,r.peek(),{shop:i,checkout:a,paymentMethods:n})||o.push("billing-address"),o}},...t?[lS(e)]:[]],detours:[...iS(e),nS(e)]}}({i18n:t,reviewEnabled:f,paymentMethods:m,proposedPaymentLines:g,
2shop:s,checkout:c});case"threePage":return _}}),[y,c,v,t,d,b,n,m,g,f,s,_]);return h(Gk,{plan:P,children:e})}function PS(){const{data:e}=Ab(),{currentPage:t}=Fc().value,n=Pe(),r=Ge(),{deliveryMethodsAddressErrors:i}=tt(),[a,o]=u(!0),{setAddressError:s}=rv(i),c=dv(r.shippingAddress.fields.countryCode.value);return l((()=>{if(!e)return;if(!a||"/information"!==t?.route&&"/"!==t?.route)return void(t&&o(!1));const{current:r}=n,{allViolations:i,paymentLines:l}=r.value;if(Boolean(Ei(l?.lines))&&i?.length){const e=["billing"].flatMap((e=>Array.from(c(e,i))));for(const[t,n]of e)s(t,n)}o(!1)}),[void 0!==t,e,n,r]),null}function kS({scrollbarGutter:e,children:t}){const n=Ih(),r=n.customProperties.value,i=n.darkModeCustomProperties.value,a=r?.color?.schemes?.scheme1?.base?.background,o=i?.color?.schemes?.scheme1?.base?.background,s=[a&&`html, body { background-color: ${a}; }`,o&&`@media (prefers-color-scheme: dark) { html, body { background-color: ${o}; } }`,e&&`html { scrollbar-gutter: ${e}; }`].filter(Boolean).join("\n");return h(b,{children:[h("style",{children:s}),h("div",{className:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133",children:t})]})}const SS=(wS=e=>Ne({colorScheme:e}),Ie.reduce(((e,t)=>({...e,[t]:wS(t)})),{}));var wS;const CS=I((function({children:e,scoped:t}){const n=Ih(),r=p(),i=n.customProperties.value,a=n.darkModeCustomProperties.value,s=o((()=>{const e=`#CustomProperties-${function(e){if("undefined"!=typeof CSS)return CSS.escape(e);const t=String(e),n=t.length;let r=-1,i="";const a=t.charCodeAt(0);if(1===n&&45===a)return`\\${t}`;for(;++r<n;){const e=t.charCodeAt(r);i+=0!==e?e>=1&&e<=31||127===e||0===r&&e>=48&&e<=57||1===r&&e>=48&&e<=57&&45===a?`\\${e.toString(16)} `:e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?t.charAt(r):`\\${t.charAt(r)}`:"�"}return i}(r)}`,n=i?AS(i):null,o=a?AS(a):null,s=IS(ES(i?.color)),l=IS(ES(a?.color)),c=n&&Object.keys(n).length>0,u=o&&Object.keys(o).length>0;if(!(c||u||s||l))return"";const d=`${c?`${e} {${S(n)}}`:""}${s}`,p=`${u?`${e} {${S(o)}}`:""}${l}`,m=`\n      ${d}\n      ${p?`@media (prefers-color-scheme: dark) { ${p} }`:""}\n    `;return t?`@scope { ${m} }`:m}),[i,a,r,t]);return h("div",{id:`CustomProperties-${r}`,children:[h("style",{children:s}),e]})}));function ES(e){if(e&&"object"==typeof e&&"schemes"in e)return e.schemes}function xS(e,t){return Object.entries(e).reduce(((e,[n,r])=>{const i=t[n];if(null==i)return e;const a="object"==typeof r&&null!=r&&!Array.isArray(r),o="object"==typeof i&&null!=i&&!Array.isArray(i);return a&&o?{...e,...xS(r,i)}:a?e:null!=r?{...e,[i]:r}:e}),{})}function IS(e){if(!e||"object"!=typeof e)return"";const t=Ce.color.default;let n="";for(const r of Ie){const i=e[r];if(!i||"object"!=typeof i)continue;const a=xS(i,t);0!==Object.keys(a).length&&(n+=`.${SS[r].trim().split(/\s+/).join(".")} {${S(a)}}`)}return n}function AS(e){return xS(function(e){const t=e.color;if(!t||"object"!=typeof t||Array.isArray(t))return e;const{schemes:n,...r}=t;return{...e,color:r}}(e),Ce)}function TS({children:e}){const{typographyPrimary:t,typographySecondary:n}=Ah();return l((()=>{const e=[t,n].map((e=>[{fonts:e.fonts,source:e.sourceBase,weight:e.weightBase},{fonts:e.fonts,source:e.sourceBold,weight:e.weightBold}])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e.fonts&&void 0!==e.source)).map((({fonts:e,source:t,weight:n})=>new FontFace(e,t,{weight:n})));!async function(){await Promise.all(e).then((e=>{e.forEach((e=>{document.fonts.add(e)}))}))}()}),[t,n]),h(b,{children:e})}function NS({children:e,condition:t}){return h(t?TS:b,{children:e})}function LS({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:i}=y(nd);return h(Be.Provider,{value:t,children:h(xi,{children:h(NS,{condition:Boolean(n),children:i?h(CS,{scoped:r,children:e}):e})})})}function RS({children:e}){const{checkout:t,source:n,router:r}=pe(),i=r.currentUrl.value,a="simulated"===n.type,o=oi(i.search),s=t.configuration.branding.shell,l=t.configuration.branding.theme,c=Ht()||a||o;return h(LS,{theme:l,shouldLoadFonts:c,children:h(r_,{shell:s,children:h(MS,{children:e})})})}function MS({children:e}){const{canvas:t}=a_();return h(kS,{scrollbarGutter:t?.scrollbarGutter,children:e})}function DS(){const{embed:e}=pe(),t=y(vd)?.isModalOpen,n=i((()=>Boolean(t?.value||e?.presentation?.active.value)));return l((()=>{let t=!1;return n.subscribe((n=>{n!==t&&(t=n,e?.client?.dialogChange(n?"open":"close"))}))}),[n,e]),null}function OS(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function zS(e){const t="local"===e.type?void 0:e.publicIdentifier,n="persisted"===e.type?e.targetPublicIdentifier:void 0,r="local"===e.type?void 0:e.registrationId;return{appId:e.appId,appApiKey:e.appApiKey,apiVersion:e.apiVersion,appName:e.appName,extensionId:e.extensionId,extensionPoint:e.extensionPoint.target,id:OS(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function BS(e){const t=String(FS(e));return e.stack??t??e.message??""}function VS(e){const t=FS(e);return t?`${t.name}: ${t.message}`:e.message}function FS(e){if(function(e){return"object"==typeof e.cause&&null!=e.cause}(e)&&"stack"in e.cause)return e.cause}var US=(e=>(e.CheckoutError="CHECKOUT_ERROR",e.ContactError="CONTACT_ERROR",e.DeliveryError="DELIVERY_ERROR",e.DiscountError="DISCOUNT_ERROR",e.InputInvalid="INPUT_INVALID",e.InputRequired="INPUT_REQUIRED",e.InventoryError="INVENTORY_ERROR",e.MerchandiseError="MERCHANDISE_E
2RROR",e.PaymentError="PAYMENT_ERROR",e))(US||{}),qS=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(qS||{});const jS={[Ii.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[Ii.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[Ii.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[Ii.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[Ii.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[Ii.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[Ii.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[Ii.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[Ii.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[Ii.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[Ii.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[Ii.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[Ii.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}},HS=({children:e})=>{if("undefined"==typeof window)return h(b,{children:e});const{observability:t,userEvents:n,checkout:r}=pe(),i=bf(),a=Pf(),o=r.configuration.layout.isOnePage.value;return l((()=>{const e=(e,t)=>{if(e.name in Ii&&t?.extension){const{extension:n}=t,{trace:r,message:i}=function(e){return{message:VS(e),trace:BS(e)}}(e);if(!gt(e.name))return;const o={apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appName:n.appName,appVersion:n.version,code:qS.ExtensionUsageError,errorName:e.name,extensionId:n.extensionId,extensionName:n.name,extensionType:n.type,message:i,placementReference:n.placementReference,extensionTarget:n.extensionPoint,registrationId:n.registrationId,trace:r,type:"uiExtensionError"};a("uiExtensionError",{...o,timestamp:new Date})}},r=(e,t,r)=>{if(e.name in jS&&t?.extension){const{extension:a}=t,{eventName:s,eventType:l,errorReason:c}=jS[e.name],{userToken:u,shopId:d,sessionToken:p,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,pageLoadId:b}=i;n.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:{userToken:u,shopId:d,sessionToken:p,pageLoadId:b,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,extensionId:OS(a),extensionPoint:a.extensionPoint,extensionPlacementReference:a.placementReference,extensionInstanceId:a.extensionInstanceId,activatedExtensionIds:r?.extensions?.active,eventType:l,eventName:s,errorMessage:e.message,sourceDesign:o?"c1_redesign":"c1_legacy",errorReason:c,silencedViolation:!1,errorOrigin:"client",errorType:"extension",checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,extensionPublicIdentifier:a.publicIdentifier,extensionTargetPublicIdentifier:a.targetPublicIdentifier}})}};return t.addOnError(r),t.addOnError(e),()=>{t.removeOnError(r),t.removeOnError(e)}}),[t,n,i,o,a]),h(b,{children:e})};function $S(){const e=iy(),t=s(new Set);return l((()=>()=>{for(const e of t.current)cancelAnimationFrame(e.handle),clearTimeout(e.timeout),e.resolve();t.current.clear()}),[]),qc((n=>{if("error"===n.type||"invalid"===n.type)return new Promise((n=>{const r=()=>{if(!i.settled){i.settled=!0,cancelAnimationFrame(i.handle),clearTimeout(i.timeout);try{e()}finally{t.current.delete(i),n()}}},i={handle:requestAnimationFrame(r),resolve:n,settled:!1,timeout:setTimeout(r,100)};t.current.add(i)}))})),null}function YS(){const{checkout:{identity:e}}=pe(),t=ke().buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:n}}=Cn();return i((()=>"applePay"===e.current.value&&Boolean(t.value?.purchasingCompany)&&n.value))}function WS(){const{checkout:{wallets:e},embed:t}=pe(),n=function(){const{deliveryLines:e,email:t,phone:n,shippingAddress:r,billingAddress:i,billingAddressOption:o,paymentLines:s,tipLines:l,discountLines:c,interfaceFlow:u,externalDeliveryIds:d,cartMetafields:p,attributes:m}=Ge(),h=function(){const e=ke().buyerIdentity;return a((()=>{const t=e.value?.customerProfile;if(t)return t.email}),[e])}(),g=dk(),f=p_();return a(((a,y=!1)=>
2{if(u.value=void 0,d.value=void 0,a)t.value=a.email,n.value=a.phone,r.value=a.shippingAddress,i.value=a.billingAddress,a.billingAddressOption&&(o.value=a.billingAddressOption),s.value=a.paymentLines,l.value=a.tipLines,c.value=a.discountLines,p.value=a.cartMetafields;else{const e=h()??"",a=g("shipping"),o=g("billing");t.value=e,n.value="",y||(r.value=a??_c(r.value)),i.value=o??_c(i.value);const s=m.value;m.value=s?s.filter((e=>e.key!==Ti)):s}f.value||y||pg(e,void 0)}),[m,o,i,p,e,c,t,d,g,h,u,f,s,n,r,l])}(),r=Ai(),i=YS();return a((({shouldResetCustomerInfo:a=!1,shouldRemovePaymentLine:o=!0,isConstrainedAddress:s=!1}={})=>{const l=a&&t?.isFlagshipPartner?t.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),i.value||e.setEscalatedWallet(null),a&&n(l,s),o&&!l&&r()}),[t,n,r,e,i])}function GS({onClick:e,shouldResetCustomerInfo:t,shouldRemovePaymentLine:n,skipRedirect:r}={}){const{negotiate:o,progress:s}=Uc(),l=WS(),{dispatch:c}=ig()??{},{client:u,observability:d,persistence:p,router:m,checkout:{identity:{current:h}},i18n:g}=pe(),{buyerIdentity:f}=ke(),{value:y}=i((()=>function({i18n:e,buyerIdentity:t}){return Boolean(t.value?.customerProfile)?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}({i18n:g,buyerIdentity:f}))),{currentDetour:v}=Fc().value,_=u.unstable_getSerialization("forcedRedesignWallet"),b=function(e){try{const t=new URL(e.href);return t.searchParams.delete(Ln),t.searchParams.append(k_,"1"),t.toString()}catch{return}}(m.currentUrl.value),P=m.currentUrl.value.searchParams.has(k_),k=_&&b&&!P&&!r;return{label:y,onClick:a((async r=>{if(d.counter({name:"checkout_return_to_guest_checkout",value:1,attributes:{identity:h.value,redirect:Boolean(k)}}),k)return p?.clearAll(),e?.(),r?.(),void window.location.replace(b);var i;c?.("addressReset"),(i=m.currentUrl.peek()).searchParams.has(Ln)&&(i.searchParams.delete(Ln),history.replaceState(null,"",i.href)),e?.(),l({shouldResetCustomerInfo:t,shouldRemovePaymentLine:n}),c?.("reset"),v&&s("checkout-as-guest-action"),r?.(),await o({silenceViolations:["non-stock"]})}),[v,c,b,h,o,e,p,s,l,k,d,m,t,n])}}function JS(){return function(){const{router:e}=pe(),t=e.currentUrl.value,{onClick:n}=GS({shouldResetCustomerInfo:!0});l((()=>{t.searchParams.has(k_)&&(n?.(),function(e){e.searchParams.has(k_)&&(e.searchParams.delete(k_),history.replaceState(null,"",e.href))}(t))}),[])}(),null}const KS="wallet_deceleration";function QS(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=Cn(),{clearForcedCheckoutLayout:n}=s_(se),{checkout:r,router:i}=pe();return GS({onClick:a((async()=>{var a;e.value=void 0,t.value=void 0,n({wallet:"GOOGLE_PAY"}),"true"===(a=i.currentUrl.value).searchParams.get(KS)&&(a.searchParams.delete(KS),history.replaceState(null,"",a.href)),r.unstable_evaluateSupportsSplitShipping(i.currentUrl.value)}),[e,t,r,n,i]),shouldResetCustomerInfo:!0,skipRedirect:!0})}function XS({shouldResetCustomerInfo:e}){const t=WS();return a((()=>{t({shouldResetCustomerInfo:e})}),[t,e])}const ZS="google_pay_legacy_token_bounce";function ew(){return function(){const{checkout:e,embed:t,observability:n,shop:r}=pe(),{inMemoryGooglePayParts:{paymentSheetError:i}}=Cn(),{onClick:a}=QS();l((()=>{r.hasFlagEnabled(Ni)&&(t||"GOOGLE_PAY"===e.wallets.escalatedWallet.value&&(e.latestReceipt.value||Li({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:ZS,value:1}),n.log(ZS,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),a?.((()=>{i.value={type:"recovery_notice"}})))))}),[])}(),null}const tw=ue("NavigationBlockerContext");
2class nw extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}function rw({children:e}){const t=s(new Set),n=f(!1),{observability:r}=pe(),i=a((e=>{setTimeout((()=>{t.current.has(e)&&r.error(new nw(`The block associated with the key: ${e} has been blocking for over 30 seconds now. Please check to see you are properly cleaning this up.`))}),3e4)}),[r]),l=a(((e,r)=>{const a=r??"_global",o=t.current;e?(o.add(a),i(a)):o.delete(a),n.value=o.size>0}),[n,i]),c=o((()=>({blocking:n,setBlocking:l})),[n,l]);return h(tw.Provider,{value:c,children:e})}const iw=_({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),aw=()=>y(iw);function ow(){const{registerPayNowButtonElement:e}=aw(),t=s(null);return a((n=>{t.current?.(),t.current=n?e(n):null}),[e])}function sw({children:e}){const t=s(new Set),[n,r]=u(null),[i,l]=u(0),c=a((e=>(t.current.add(e),r(e),()=>{t.current.delete(e),r((n=>n===e?t.current.values().next().value??null:n))})),[]),d=a((e=>{l((t=>Math.max(0,t+(e?1:-1))))}),[]),p=i>0,m=o((()=>({registerPayNowButtonElement:c,payNowButtonElement:n,setPayNowButtonSectionMounted:d,payNowButtonSectionMounted:p})),[c,n,d,p]);return h(iw.Provider,{value:m,children:e})}function lw(){return zb(pe())}function cw(){const{embed:e}=pe(),t=Eg(),n=t?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return"DISABLED"===n||"FORWARD_TO_CLIENT"===n||"DISABLED"===r||"FORWARD_TO_CLIENT"===r}function uw(){const{mobileCheckoutSdk:e}=pe(),t=e.config.version,n=e.config.schema;return Boolean(t)||Boolean(n)}function dw({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function pw(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:(n=e.discounts?.lines??[],n.filter((e=>e.allocationSet.allocatedForTotal?.targets.some((e=>!e.deliveryLineTarget))||e.allocationSet.allocated?.allocations.some((e=>!e.target.deliveryLineTarget)))))},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map((e=>({...e,payment:t})))}}};var n}var mw=(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))(mw||{});class hw extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function gw(e="payment_page",{markPrefilledGuestArrival:t=!1}={}){const{client:n,i18n:r,observability:i,userEvents:s,source:l,checkout:c,shop:u,persistence:d,shop:{hasStorefront:p},url:m,shopPay:h,embed:g,router:f}=pe(),y=f.currentUrl.value,{checkoutAsGuestUrl:v,profilePreviewToken:_,checkoutProfileContext:b,redirectSource:P}=h.config,k="simulated"===l.type,S=h.user.isAuthenticatedUser,w=u.hasFlagEnabled(Ri),C=Tb().current.token,E=c.checkpointToken.value,x=c.configuration.renderContextToken.token.value,I=sk({mode:"copy-if-missing",include:{shopClientUuid:!0}}),A=dw({isFlagshipPartner:g?.isFlagshipPartner,embedderProposalSnapshotEmail:g?.embedderProposalSnapshot.value?.email,proposedEmail:c.proposal.proposed.email.value}),T=o((()=>{if(k)return"";if(!v)return p?m.storefront():"";const e=new URL(v);e.searchParams.set(Mi,"true"),Di(e),t&&S.value&&Oi(l.type)&&w&&zi(e,Hi),E&&e.searchParams.set(Bi,E),C&&e.searchParams.set(li,C),_&&b&&(e.searchParams.set(Vi,_),e.searchParams.set(Fi,b)),oi(y.search)&&e.searchParams.set(Ui,"shop_web"),S.value?e.searchParams.set(qi,"true"):e.searchParams.delete(qi),x?e.searchParams.set("rctx",x):e.searchParams.delete("rctx");const r=new URLSearchParams(y.search).get("_cs");r&&e.searchParams.set("_cs",r);const i=new URLSearchParams(n.initialRequest.url.search);return I(e.searchParams,i),A&&!e.searchParams.get("checkout[email]")&&e.searchParams.set("checkout[email]",A),e.href}),[k,v,E,n.initialRequest.url.search,_,b,y.search,S.value,C,p,m,x,I,A,t,l.type,w]);let N=r.translate("unauthenticated_modals.generic.cta");(lw()||g?.isCheckoutKit())&&(N=r.translate("checkout_sdk.use_another_payment_method"));const L=a((()=>(k||(S.value&&d?.clearAll(),i.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:P}}),s.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...ji(l,c,u),origin:e}},{exportImmediately:!0})),null)),[k,S,d,i,s,l,c,u,e,P]),R=a((e=>
2{if(c.unstable_setRedirectingExternally(!0),L(),!T)return c.unstable_setRedirectingExternally(!1),void i.error(new hw("redirectToGuestCheckout called without a guest checkout URL"));if(!e)return void window.location.assign(T);const t=new URL(T);!function(e,t){t&&(e.set($i,t.paymentMethod),t.paymentMethodIdentifier?e.set(Yi,t.paymentMethodIdentifier):e.delete(Yi))}(t.searchParams,e),window.location.assign(t.href)}),[c,L,T,i]);return o((()=>({label:N,href:T,onClick:L,redirectToGuestCheckout:R})),[N,T,L,R])}function fw(e){const{negotiate:t}=Uc();return a((n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:pw,negotiationStage:"negotiation",onComplete:t=>e(n,t)})),[t,e])}function yw({clearPii:e}){const{embed:t,checkout:n,userEvents:r,source:i,shop:o}=pe(),s=Ge().shippingAddress.value,{href:l,redirectToGuestCheckout:c}=gw("payment_page",{markPrefilledGuestArrival:!e}),u=dw({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:n.proposal.proposed.email.value}),d=fw(c),p=function(e,t){const{negotiate:n}=Uc();return a((r=>n({silenceViolations:["all"],force:!0,customizeNegotiation:e=>{const n=pw(e);return{...n,buyerIdentity:{...n.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(r)})),[n,t,e])}(c,u??""),m=n.proposal.negotiated.fields.availableDeliveryAddresses.value,h=Boolean(m?.length&&m.some((e=>Wi(s,e.address))));return a((t=>{if(n.unstable_setRedirectingExternally(!0),!e||h)return!e&&l&&r.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ji(i,n,o),action:"payment_step_redirect"}},{exportImmediately:!0}),void c(t);u?p(t).catch((()=>{n.unstable_setRedirectingExternally(!1)})):d(t).catch((()=>{n.unstable_setRedirectingExternally(!1)}))}),[n,e,l,r,i,o,h,c,u,d,p])}const vw=[3890849,3850711,5198245];function _w(e){return!!e&&vw.includes(e)}function bw(){const{observability:e}=pe(),t=a((t=>{if("undefined"==typeof window||!window.ReactNativeWebView||"function"!=typeof window.ReactNativeWebView.postMessage)return;const n=JSON.stringify(t);try{window.ReactNativeWebView.postMessage(n)}catch(r){e.log("shop_app_messenger_post_message_failed","Failed to post message to ReactNativeWebView",{error:r})}}),[e]);return o((()=>({notify:t})),[t])}function Pw({children:e}){const{checkout:t,observability:n,source:r,client:i,environment:a,shopPay:o}=pe(),c=t.rememberMe.shouldSetRememberMeCookies.value,u="simulated"===r.type,{href:d}=gw(),p=O_().value,m=bw(),g=s(!1),f="shopPay"===t.identity.current.value,y=i.unstable_getSerialization("apiClientId"),v=i.unstable_getSerialization("shopPayConfig"),_=_w(y),P=!u&&void 0!==p&&!_&&!t.configuration.isUniversalCheckoutFinalizer,k=f&&P,S=f&&!u&&!k&&!0===v.has_remember_me_session&&""!==o.user.shopAccountUuid.value,w=s(!1);return C((()=>{const e=t.latestReceipt.value;if(null!=e)switch(e.status){case"processed":m.notify({checkout_completed:!0});break;case"action_required":"complete_payment_challenge"===e.action.type?m.notify({checkout_error:"threeds_required"}):m.notify({checkout_error:"generic_error"});break;case"failed":"payment"===e.failure.type||"discount"===e.failure.type?m.notify({checkout_in_progress:!1}):m.notify({checkout_error:"generic_error"})}})),l((()=>{!g.current&&c&&(t.rememberMe.setRememberMeCookies(),g.current=!0)}),[c,t.rememberMe]),function({enabled:e,observability:t,shopServerUrl:n}){const r=s(!1);l((()=>{e&&!r.current&&(r.current=!0,fetch(function(e){return new URL("/pay/session",e).href}(n),{method:"GET",credentials:"include",keepalive:!0}).then((e=>{e.ok||t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{status:e.status})})).catch((e=>{t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{errorMessage:e instanceof Error?e.message:String(e)})})))}),[e,t,n])}({enabled:S,observability:n,shopServerUrl:a.services.shopServer.url}),l((()=>{k&&!w.current&&(w.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:p}),"deferred_payment"!==p&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(d))}),[d,n,p,k]),k?null:h(b,{children:e})}function kw(){const{client:e}=pe(),t=e.unstable_getSerialization("experiments"),n=t?.find((e=>e.clientHandle===Bl))?.variant,r=Object.values(Gi).find((e=>e===n))??Gi.Control;return{variant:r,showPaymentTiles:r===Gi.VariantA||r===Gi.VariantC,useRedesignedChoiceList:r===Gi.VariantB||r===Gi.VariantC,showSingleCreditCard:r!==Gi.Control}}function Sw(){const{source:e}=pe(),{useRedesignedChoiceList:t}=kw();return t&&"shopPayExternal"!==e.type?"redesigned":"base"}
2class ww extends Error{constructor(){super(...arguments),this.name="TranslationError"}}const Cw=()=>{const{url:e}=pe();return o((()=>[e.cart(),e.storefront()]),[e])};function Ew(){const{router:e,shop:t}=pe(),n=Nf(),{cartLink:{visibility:r}}=a_(),a=Fc(),o=xw(),s=L("hidden"===r);return i((()=>{const{currentDetour:r}=a.value,i="thankYou"===r?.type;return t.hasStorefront&&!n.value&&!i&&!oi(e.currentUrl.value.search)&&Boolean(o.value)&&!s.value}))}function xw(){const{source:e,url:t}=pe(),n="simulated"===e.type,r=ke().buyerIdentity;return i((()=>{if(n)return new URL(t.cart());let i;return e.cartReturnUrl&&(i=new URL(e.cartReturnUrl)),Boolean(r.value?.customerProfile)&&i&&i.searchParams.append("logged_in","true"),i}))}function Iw(e){return e.currentUrlMatches("/thank-you")}const Aw=k((function({href:e,target:t="auto",children:n,...r},i){const{i18n:a,router:o,url:s,source:l,checkout:c,embed:u,observability:d}=pe(),p=xw(),m=function(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=pe(),i=r?.map((e=>`https://${e}`))??[],a=[t.shopServer.url,...i];if(n.domain){const e=`https://${n.domain}`;a.push(e)}const o=e.unstable_getSerialization("loginUrl");return o&&a.push(`https://${new URL(o).host}`),a}(),g=new URL(s.storefront()).origin,f="simulated"===l.type,y=c.configuration.isWindowOpenDelegationEnabled,v=Cw();if(c.configuration.isUniversalCheckoutFinalizer&&Iw(o))return h("a",{...r,ref:i,"aria-disabled":"true",children:n});let _="_blank"===t,b="_blank"===t,P=uc(e,{cart:pc(p.value),checkout:dc()});const k=function(e,t,n,r){let i;try{i=new URL(e,t.currentUrl.value.origin)}catch{return 3}const a=i.protocol.replace(":","");return Tw.has(a)?H(i,t.prefix)||!e.startsWith("//")&&!e.startsWith(i.protocol)?0:function(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}(i,t,n,r)?1:2:Nw.has(a)?1:3}(P,o,g,m),S=["/information","/shipping","/review","/payment","/thank-you","/cart","/","","/orders","/profile","/settings"],w=/^\/orders\/.*/;switch(k){case 2:b=!0,_=!0;break;case 1:b=!0;break;case 3:b=!0,P="#";break;case 0:!f||S.includes(mc(P))||w.test(P)||(P="#");break;default:R(k)}const C=_?"_blank":void 0,E=_?"noopener noreferrer":void 0,x=sd({external:_,native:b});return b?h("a",{...r,href:P,target:C,rel:E,ref:i,"aria-describedby":x,onClick:e=>{if(y&&(1===k||2===k))return e.preventDefault(),u?.client?.windowOpenRequest(P).catch((e=>{d.log("window_open_delegation_error","Window open delegation failed in Link component",{url:P,error:e instanceof Error?e.message:String(e)})})),void r.onClick?.(e);if(f){if(e.preventDefault(),v.includes(P)){const e=new URL(o.currentUrl.value);return e.searchParams.set("ce_redirect",P),void o.navigate(e)}const t=a.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:P});confirm(t)&&open(P)}r.onClick?.(e)},children:n}):h(j,{...r,router:o,href:P,target:C,rel:E,ref:i,"aria-describedby":x,children:n})}));Aw.displayName="Link";const Tw=new Set(["http","https"]),Nw=new Set([...Tw,"mailto","tel","sms"]);function Lw({children:e}){const{geolocation:t}=Jy(),{i18n:n,embed:r,checkout:i,observability:s,shop:l}=pe(),c=Ji({embedder:r?.embedder,shop:l}),u=Zf(),d=i.configuration.layout.isOnePage.value,p="redesigned"===Sw(),m=a((e=>n.numberFormatter().format(e)),[n]),{symbol:g,prefixed:f}=$(n.currency,n),y=o((()=>function(e){const t=new Map([["closeNotification",()=>e.translate("general.close_notice_label")],["expandNotification",()=>e.translate("general.expand_notice_label")],["closeModal",()=>e.translate("general.close_modal_label")],["processing",()=>e.translate("general.processing")],["loading",()=>e.translate("general.loading")],["submit",()=>e.translate("general.submit")],["increase",(t={})=>e.translate("general.stepper.increase",t)],["decrease",(t={})=>e.translate("general.stepper.decrease",t)],["minimumReached",(t={})=>e.translate("general.stepper.minimum_reached",t)],["maximumReached",(t={})=>e.translate("general.stepper.maximum_reached",t)],["january",()=>e.translate("general.dates.months.january")],["february",()=>e.translate("general.dates.months.february")],["march",()=>e.translate("general.dates.months.march")],["april",()=>e.translate("general.dates.months.april")],["may",()=>e.translate("general.dates.months.may")],["june",()=>e.translate("general.dates.months.june")],["july",()=>e.translate("general.dates.months.july")],["august",()=>e.translate("general.dates.months.august")],["september",()=>e.translate("general.dates.months.september")],["october",()=>e.translate("general.dates.months.october")],["november",()=>e.translate("general.dates.months.november")],["december",()=>e.translate("general.dates.months.december")],["monday",()=>e.translate("general.dates.weekdays.monday")],["tuesday",()=>e.translate("general.dates.weekdays.tuesday")],["wednesday",()=>e.translate("general.dates.weekdays.wednesday")],["thursday",()=>e.translate("general.dates.weekdays.thursday")],["friday",()=>e.translate("general.dates.weekdays.friday")],["saturday",()=>e.translate("general.dates.weekdays.saturday")],["sunday",()=>e.translate("general.dates.weekdays.sunday")],["mondayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.monday")],["tuesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.tuesday")],["wednesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.wednesday")],["thursdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.thursday")],["fridayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.friday")],["saturdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.saturday")],["sundayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.sunday")],["showNextMonth",(t={})=>e.translate("general.datepicker.show_next_month",t)],["showPreviousMonth",(t={})=>e.translate("general.datepicker.show_previous_month",t)],["rangeStart",()=>e.translate("general.datepicker.range_start")],["inRange",()=>e.translate("general.datepicker.in_range")],["rangeEnd",()=>e.translate("general.datepicker.range_end")],["autocompleteOptionsAvailable",({count:t=0}={})=>0===t?e.translate("general.autocomplete_zero_item"):1===t?e.translate("general.autocomplete_single_item"):e.translate("general.autocomplete_multi_item",{number:t})],["qrCode",()=>e.translate("general.qr_code")],["removeChip",()=>e.translate("general.remove_chip")],["removeItem",(t={})=>e.translate("general.remove_item",t)],["removeTag",()=>e.translate("general.remove_tag")],["mapClusterTitle",({count:t=0}={})=>{const n="number"==typeof t?(r=t,e.numberFormatter().format(r)):t;var r;return 1===t?e.translate("general.map.cluster_title.one",{number:n}):e.translate("general.map.cluster_title.other",{number:n})}],["externalNewWindow",()=>e.translate("general.forwarding_indicator.external_and_new_window")],["newWindow",()=>e.translate("general.forwarding_indicator.new_window")],["external",()=>e.translate("general.forwarding_indicator.external")],["expandSheet",()=>e.translate("general.sheet.expand")],["dropzoneDraggedOver",()=>e.translate("general.dropzone.dragged_over")],["dropzoneInvalidFileType",()=>e.translate("general.dropzone.invalid_file_type")],["addFile",()=>e.translate("general.dropzone.add_file")],["reviewItemHeaderChangeValue",()=>e.translate("review.item_header.change_value")],["reviewItemHeaderSection",()=>e.translate("review.item_header.section")],["reviewItemHeaderValue",()=>e.translate("review.item_header.value")],["moneyLinesHeaderItem",()=>e.translate("order_summary.cost_table_item_column_header")],["moneyLinesHeaderValue",()=>e.translate("order_summary.cost_table_value_column_header")],["clipboardCopied",()=>e.translate("clipboard.copied")],["clipboardFailedToCopy",()=>
2e.translate("clipboard.failed_to_copy")],["productThumbnailQuantityLabel",()=>e.translate("order_summary.product_image_quantity_label")]]);return(e,n)=>{const r=t.get(e)?.(n);if(null==r)throw new ww(`Missing UI library translation: ${e}`);return r}}(n)),[n]),v=Yb();return h(zd,{currency:{code:n.currency,symbol:g,symbolPrefixed:f},embed:r?{embedder:r.embedder,interstitialBrandingEnabled:c}:void 0,formatNumber:m,geolocation:{countryCode:t.country.code},linkComponent:Aw,locale:{direction:n.localeDirection,languageCode:n.locale},onePage:d,editor:u,redesignedChoiceLists:p,translate:y,announcementEmitter:{...v,close:()=>v.emit("closeAnnouncement")},logger:s,children:e})}const Rw=ue("ValidationErrorsContext");function Mw(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const Dw="$.payments",Ow="$.cart.buyerIdentity",zw="$.cart.deliveryGroups[0].deliveryAddress",Bw="$.cart.localizedField",Vw="$.cart.billingAddress";function Fw(){const e=me(),{allViolations:t}=ke(),n=xn("allViolations"),r=i((()=>n.value?[]:t.value?t.value.filter((e=>"UnprocessableTermViolation"===e.__typename&&Ki.has(e.code))).map((e=>({message:e.localizedMessage||e.nonLocalizedMessage,target:e.target}))):[]));return i((()=>{const t=[...e.validationErrors.value,...r.value].filter(Mw()),n=t.filter((({target:e})=>e?.startsWith(zw)&&Boolean(e.replace(`${zw}.`,"")))),i=t.filter((({target:e})=>e?.startsWith(Ow)&&Boolean(e.replace(`${Ow}.`,"")))),a=t.filter((({target:e})=>e?.startsWith(Dw)&&Boolean(e.replace(`${Dw}.`,"")))),o=t.filter((({target:e})=>e?.startsWith(Bw)&&Boolean(e.replace(`${Bw}.`,"")))),s=t.filter((({target:e})=>e?.startsWith(Vw)&&Boolean(e.replace(`${Vw}.`,"")))),l=t.filter((({target:e})=>"$.cart.poNumber"===e)),c=t.filter((e=>![...i,...n,...a,...o,...s,...l].includes(e)));return{contactErrors:i,deliveryAddressErrors:n,paymentErrors:a,localizedFieldErrors:o,billingAddressErrors:s,poNumberErrors:l,globalErrors:c}}))}function Uw({children:e}){const{deliveryMethodsAddressErrors:t}=tt(),{validation:n}=pe().checkout,{billingAddressErrors:r,poNumberError:i}=n,{emailInputError:c,phoneInputError:u}=n.contactErrors,{contactErrors:d,deliveryAddressErrors:p,billingAddressErrors:m,poNumberErrors:g,globalErrors:f}=Fw().value,{shippingAddress:y}=Ge(),v=function(e){const{checkout:t}=pe(),n=t.configuration.addressSettings.nonBillingAddressSettings.value,{details:r}=jt(e),i=r?t.address.extendedAddressMode.getFormatFromCountry(r):void 0;return o((()=>en({countryDetails:r,format:i,addressSettings:n})),[r,i,n])}(y.fields.countryCode.value),_=function(){const e=s(new Set),{userEvents:t,shop:{id:n,sameBillingAndShippingAddress:r},source:{checkoutSessionIdentifier:i}}=pe(),o=ke(),{value:l}=o.shippingAddress,{value:c}=o.billingAddress,{value:u}=o.localizationExtensions;return a((({errors:a,reasons:o})=>{if(l&&gv(l)){const s=`shipping:${fv(l)}`;e.current.has(s)||a?.some((e=>tn.has(e.code)))||o?.includes(nn.InvalidAddress)||(yv(l.countryCode??"unknown",hv(l),"shipping_address",n,i,r,t),e.current.add(s))}if(c&&gv(c)){const s=`billing:${fv(c)}`;e.current.has(s)||a?.some((e=>rn.has(e.code)))||o?.includes(nn.InvalidAddress)||(yv(c.countryCode??"unknown",hv(c),"billing_address",n,i,r,t),e.current.add(s))}if(u&&u?.length>0){const{cacheKey:o,keysOnly:s}=function(e){const t=e.filter((e=>e.value&&"string"==typeof e.value&&""!==e.value.trim()));return{cacheKey:t.map((e=>`${e.key}:${on(e.value.trim())}`)).join("|"),keysOnly:t.map((e=>e.key))}}(u);if(s.length>0){const u=`localization:${o}`;e.current.has(u)||a?.some((e=>an.has(e.code)))||(yv(l?.countryCode??c?.countryCode??"unknown",s,"localized_id",n,i,r,t),e.current.add(u))}}}),[l,c,u,n,i,r,t])}(),b=o((()=>({})),[]),P=a(((e,t,n)=>{const r=e.value,i=t=>{e.value=t};!r&&n&&(i(n.message),b[t]=n.message),"string"!=typeof r||b[t]!==r||n||(i(void 0),delete b[t])}),[b]);l((()=>{P(u,"phone",d.find((({target:e})=>"phone"===e?.split(".")?.pop()))),P(c,"email",d.find((({target:e})=>"email"===e?.split(".")?.pop())))}),[d,c,P,u]),l((()=>{Object.entries(t).forEach((([e,t])=>{let n=p.find((({target:t})=>{const n=t?.split(".").pop();return!!n&&("postalCode"===e&&"zip"===n||"zoneCode"===e&&"provinceCode"===n||("streetName"===e||"streetNumber"===e)&&"address1"===n||("neighborhood"===e||"line2"===e)&&"address2"===n||n===e)}));const r=["streetName","streetNumber","line2","neighborhood"].includes(e),i=v?.includes(e);r&&!i&&n&&(n={...n,message:" "}),P(t,e,n)}
2))}),[p,t,v,P]),l((()=>{Object.entries(r).forEach((([e,t])=>{const n=m.find((({target:t})=>{const n=t?.split(".").pop();return!!n&&("postalCode"===e&&"zip"===n||"zoneCode"===e&&"provinceCode"===n||n===e)}));P(t,`billing_${e}`,n)}))}),[r,m,P]),qc((e=>{"success"===e.type||"error"===e.type?_({errors:e.errors}):"invalid"===e.type&&_({reasons:e.reasons})})),l((()=>{P(i,"poNumber",g[0])}),[P,i,g]);const k=o((()=>({globalErrors:f})),[f]);return h(Rw.Provider,{value:k,children:e})}const qw=x({load:()=>Dl((()=>import("./d08a6c7d.DBqPW5IX.js")),__vite__mapDeps([70,1,2,3,4,5,71,6,72,41,56,57,8,55,73,61,74,7,9])).then((e=>e.ApplePaySessionLoader)),renderLoading:({children:e})=>e,useError:function(e){const{sessionLoadFailed:t}=Cn().inMemoryApplePayParts,{observability:n}=pe();l((()=>{e&&(t.value=!0)}),[e,n,t])}});function jw(){const e=function(){const e=Vt();return i((()=>!!e.value&&void 0!==window.ApplePaySession))}(),{availableWallets:t}=Cn(),n=L(t.some((({name:e})=>"APPLE_PAY"===e))),r=s(!1),a=i((()=>(!r.current&&e.value&&n.value&&(r.current=!0),r.current)));return h(A,{when:a,children:h(qw,{})})}function Hw(){const{checkout:e}=pe();return!e.configuration.showPayButton}function $w({enabled:e,onTimeout:t,timeout:n=6e4}){const r=s(null),i=s(t);i.current=t,l((()=>{if(e)return r.current=setTimeout((()=>i.current(n)),n),()=>{r.current&&clearTimeout(r.current)}}),[e,n])}var Yw={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 Ww({id:e,children:t,accessibilityRole:n,level:r,textAlign:i,autoFocus:a,visibility:o,tabIndex:c,display:u="block"}){const d=ed(),p=r??d??0,m=d?`h${d}`:"h1",g="hidden"===o?Yw.visuallyHidden:P(Yw.Heading,i&&Yw.textAlignVariant[i],p?Yw.levelVariant[p]:void 0,u&&Yw.displayVariant[u]),f=s(null);return l((()=>{a&&f.current?.focus({preventScroll:!0})}),[a]),h(m,{id:e,ref:f,tabIndex:a?-1:c,className:g,role:"heading"===n?void 0:n,children:t})}function Gw({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=By(),i=f(!1);l((()=>{r(),i.value=!0}),[i,r]);const a=h("div",{className:"MQqMI",role:"dialog","aria-modal":!0,"aria-label":t,children:[h("div",{className:"Jue6i"}),h("div",{className:"kpec9",children:e})]});return h(b,{children:[n&&!i.value?h("div",{"aria-hidden":"true",children:a}):null,h(Bu,{children:h(Dy,{children:a})})]})}function Jw({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=pe(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return h(Gw,{dialogLabel:r,renderInlineUntilMounted:e,children:h(Ry,{gap:"large-400",alignItems:"center",children:[h(fy,{children:h(_y,{size:"large"})}),h(Ww,{level:2,textAlign:"center",children:r})]})})}function Kw({onTransitionComplete:e,useConsentCopy:t=!1}){return h(Qw,{onTransitionComplete:e,useConsentCopy:t})}function Qw({onTransitionComplete:e,useConsentCopy:t}){const{checkout:n,i18n:r}=pe(),i=Hw(),{payNowButtonElement:o,payNowButtonSectionMounted:c}=aw(),u=Boolean(o||i&&c),d=s(!1);u&&(d.current=!0);const p=n.configuration.layout.isOnePage,m=p.value,g=d.current,f=s(null),y=s(!1),v=s(!1),_=a((()=>{p.value&&(y.current||(y.current=!0,xd({content:r.translate("wallets.errors.subscription_review_required"),role:"status"}),n.wallets.setIsDecelerating(!1),e()))}),[r,p,e,n.wallets]);return $w({enabled:!0,onTimeout:()=>{v.current=!0,_()},timeout:1e4}),l((()=>{if(null===f.current&&(f.current=Date.now()),v.current)return void _();if(!g)return;const e=Date.now()-f.current,t=Math.max(0,3e3-e);if(0===t)return void _();const n=setTimeout((()=>{_()}),t);return()=>clearTimeout(n)}),[_,m,g]),h(Jw,{renderInlineUntilMounted:!0,useConsentCopy:t})}function Xw(e){const{shop:t,checkout:{configuration:n,identity:r}}=pe(),a="shopPay"===r.current.value,o=t.hasFlagEnabled(oe);return i((()=>Qi({supportsOnePage:Xi({isOnePage:n.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:o,asPaymentMethod:e.value}),isShopPayActive:a})))}const Zw=["address2","company","phone"];function eC({addressErrors:e}){if(1!==e.size)return;const[t]=e.keys();var n;return void 0!==t?(n=t,Zw.includes(n)?t:void 0):void 0}function tC({missingAddressField:e,violations:t}){return"company"===e&&t.some((({code:e})=>"DELIVERY_COMPANY_REQUIRED"===e))}function nC({addressErrors:e,violations:t}){const n=eC({addressErrors:e});if(!tC({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function rC({paymentLines:e,paymentMethods:t}){const n=t?.some((e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name));if(!n)return{status:"not_connected"};const r=Ut(e,"PAYPAL_EXPRESS");if(r&&Zi(r)){const{walletContent:e}=r.method;return{status:"connected",email:e?.email??"",token:e?.token??""}}return{status:"not_connected"}}function iC({code:e}){return Fr.has(e)||la.has(e)||ca.has(e)||ua.has(e)||Ki.has(e)||da.has(e)||pa===e}function aC({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=Cn();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function oC(){const{isInPayPalContextSignal:e}=Cn(),{i18n:t}=pe(),n=aC({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:r}}=Cn();return i((()=>
2{if(e.value)return"error"===n.value.status?t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")}):"error"===r.value.status?t.translate("wallets.errors.generic",{walletName:t.translate("brand.paypal")}):void 0}))}const sC=()=>{const{paymentLines:e}=Ge();return a((()=>{const t=e.value;e.value=Mn(t,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}})}),[e])};function lC(){const e=Ye(),{checkout:t,shop:n}=pe(),r=t.configuration.layout.isOnePage.value,a=n.hasFlagEnabled(na),o=t.extensibility.ui.hasAtRiskPlacement;return i((()=>{if(r)return!1;if(a&&!o.value)return!1;const n=e.value.enabledDeliveryMethods.includes("PICK_UP");return!t.isShippingRequired.value||!n}))}function cC(e){return Boolean(e.value?.method.walletContent?.isVenmo)}const uC=()=>{const{paymentLines:e}=Ge();return i((()=>Ut(e.value,"PAYPAL_EXPRESS")))},dC=()=>{const{paymentLines:e}=Ge();return i((()=>{const t=Ut(e.value,"PAYPAL_EXPRESS");return Boolean(t&&Zi(t))}))},pC=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=Cn(),{progressing:t}=Uc(),n=hC();return i((()=>Boolean(n.value&&("loading"===e.value.status||t.value))))},mC=()=>{const e=hC(),t=ea(),n=ta(),r=Tt();return i((()=>!(!n.value&&(t.value||r.value&&r.value.amount<=0)||!e.value)))},hC=()=>{const{paymentLines:e}=Ge();return i((()=>{const t=Ut(e.value,"PAYPAL_EXPRESS");return Boolean(t&&!Zi(t))}))},gC=new Map,fC=new Map,yC=new Map;class vC extends Rl{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function _C({children:e}){const{checkout:t,observability:n,router:r,i18n:s,shop:c,source:d}=pe(),p=r.currentUrl.value,m=t.configuration.layout.isOnePage.value,g=c.hasFlagEnabled(oe),y=Xv(),{forceOnePageCheckoutLayout:v}=s_(oe),_=f(p.searchParams.has(En)&&!t.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:b}=Ge(),P=cr(d),k=Rf(Mt.PayPal,{scope:P}),S=Rf(Mt.GooglePay,{scope:P}),w=Rf(Mt.AmazonPay,{scope:P}),E=Rf(Mt.ApplePay,{scope:P}
2),x=function(e){const t=Ge().paymentLines;return i((()=>{const n=e.lastClicked.value,r=Ut(t.value,"PAYPAL_EXPRESS");return Boolean(r)||"PAYPAL_EXPRESS"===n}))}(t.wallets),I=f(void 0),A=Xh({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),T=Xh({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:rC({paymentLines:t.proposal.proposed.paymentLines.peek(),paymentMethods:t.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),N=Xh({buttonStatus:{status:"not_rendered"}}),R=Xh({buttonStatus:{status:"not_rendered"}}),M=Qv(),D=In(),O=Xh({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:_.value&&vc({applePaySubscriptionsDecelerationActive:y,applePayThreePageVaultedReviewEnabled:g,isOnePageCheckout:m})&&ha({isApplePaySubscriptionsDecelerationActive:y,isApplePaySubscriptionReviewLayoutSupported:m||c.hasFlagEnabled(oe),hasSubscriptionReviewQueryParam:_.value,isABTestActive:c.hasFlagEnabled(_n),variant:M,isCaliforniaBillingOrShippingAddress:D.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}),z=f(void 0),B=Xh({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}),V=f(!1),F=f(void 0),{queryParam:U}=b_({applePayPaymentSheetError:O.paymentSheetError,applePaySubscriptionReviewTransition:O.subscriptionReviewTransition}),q=Xw(O.asPaymentMethod).value,j=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");!function(e){const{parts:t}=Pe(),{paymentMethods:n}=ke();C((()=>{if("connected"===e.peek().status)return;const r=rC({paymentLines:t.paymentLines.value,paymentMethods:n.value});"connected"===r.status&&(e.value=r)}))}(T.accountStatus),function(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:i}}=pe(),a=ke().paymentMethods,o=Boolean(n?.isFlagshipPartner)&&!Dn(n?.embedder),s=a.value?.find((e=>"wallet"===e.type&&"SHOP_PAY"===e.name)),c=s?.placements?.includes("ACCELERATED_CHECKOUT"),u=c?s?.eligibilityToken:void 0,d=t.services.shopServer.url,p=e.buttonStatus;l((()=>{if(!o)return void(p.value={status:"rendered"});if(!u)return void(p.value={status:"not_eligible"});const e=`${d}|${i||u}`,t=gC.get(e);if(t)return void(p.value=t);const n=yC.get(d)??0;if(Date.now()<n)return void(p.value={status:"error"});let a=!1,s=fC.get(e);return s||(s=async function(){try{const e=await fetch(`${d}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:u})});if(!e.ok)return 429===e.status&&yC.set(d,Date.now()+6e4),r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:`http_${e.status}`}}),{status:{status:"error"},definitive:!1};let t;try{t=await e.json()}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"not_eligible",reason:"malformed_payload_fail_closed"}}),{status:{status:"not_eligible"},definitive:!1}}const n=!0===t.eligible||!1===t.eligible,i=!1!==t.eligible&&n?{status:"rendered"}:{status:"not_eligible"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:i.status,...!n&&{reason:"malformed_payload_fail_closed"}}}),{status:i,definitive:n}}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:"network_error"}}),{status:{status:"error"},definitive:!1}}}().then((({status:t,definitive:n})=>(n&&gC.set(e,t),fC.delete(e),t))),fC.set(e,s)),s.then((e=>{a||(p.value=e)})).catch((()=>{})),()=>{a=!0}}),[o,u,i,d,p,r])}(R),function(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=pe(),i=n.escalatedWallet.value;l((()=>
2{if(t.email.value)return;const n=e.fields.paymentLines.value?.lines??[];let a;switch(i){case Rn.AmazonPay:case Rn.BuyWithPrime:a=function(e,t){const n=ma(e,t);if(!n)return;const r=n.method.walletParams;return r?.email}(n,i);break;case"PAYPAL_EXPRESS":case"VENMO":a=function(e){const t=Ut(e,"PAYPAL_EXPRESS");return t&&t.method.walletContent?t.method.walletContent.email:void 0}(n);break;default:return}a?(t.email.value=a,r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow and recovered it",{escalatedWallet:i,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:i,paymentLines:n,status:"failure"})}),[])}();const H=L_(R),$=B_({inMemoryGooglePayParts:A,inMemoryPayPalParts:T,inMemoryVenmoParts:N,inMemoryApplePayParts:O,inMemoryAmazonPayParts:B,didIncrementUnusablePartialAddressMetric:V}),Y=o((()=>$?.filter((({placements:e,name:t})=>("APPLE_PAY"!==t&&"GOOGLE_PAY"!==t||"localization_extension_field_error"!==U)&&!("APPLE_PAY"===t&&j&&!q)&&N_(t,e,H)))),[$,U,j,q,H]),W=L(Y);l((()=>{Y?.length&&performance.mark(ga)}),[]);const G=Y?.map((e=>e.name))||[],J=G.join(",");l((()=>{new Set(G).size!==G.length&&n.error(new vC("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(G.filter(((e,t)=>G.indexOf(e)!==t)))],allWalletNames:G}}))}),[J,n]);const K=Y?.length||0,Q=void 0!==t.wallets.activeSession.value?.wallet&&"APPLE_PAY"!==t.wallets.activeSession.value.wallet&&Boolean(t.wallets.isDeceleratingSignal?.value),X=O.subscriptionReviewTransition.value,Z=i((()=>fa({checkout:t}))),ee=Z.value&&ya(M),te=function({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:i,isABTestActive:a}){return!e&&(!!(t||n&&r)||"storefront_redirect"===i&&(n||!a))}({asPaymentMethod:O.asPaymentMethod.value,useConsentCopy:ee,isCaliforniaBillingOrShippingAddress:D.value,hasSubscription:Z.value,transition:X,isABTestActive:c.hasFlagEnabled(_n)}),ne=void 0!==X&&!Q&&te&&vc({applePaySubscriptionsDecelerationActive:y,applePayThreePageVaultedReviewEnabled:g,isOnePageCheckout:m}),re=t.wallets.hasActiveApplePaySubscriptionReview.value&&te&&!D.value&&void 0===X;l((()=>{te||(t.wallets.setHasActiveApplePaySubscriptionReview(!1),void 0!==X&&(O.subscriptionReviewTransition.value=void 0,Q||t.wallets.setIsDecelerating(!1)))}),[X,t.wallets,O.subscriptionReviewTransition,Q,te]),l((()=>{"storefront_redirect"===X&&ne&&!m&&v({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})}),[X,v,m,ne]);const ie=c.hasFlagEnabled(se)&&!m&&p.searchParams.has(va);l((()=>{ie&&(t.unstable_forceCheckoutLayoutToOnePage(),l_(n,{wallet:"GOOGLE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),xd({content:s.translate("wallets.errors.subscription_review_required"),role:"status"}))}),[t,s,n,ie]);const ae=a((()=>{_.value=!1,O.subscriptionReviewTransition.value=void 0}),[_,O.subscriptionReviewTransition]);!function(e){const{observability:t,router:n}=pe(),r=n.currentUrl.value,[i,a]=u(r.normalizedPath);r.normalizedPath!==i&&(a(r.normalizedPath),e.forEach((({walletName:e,...n})=>{("signal"in n?[n.signal]:n.signals).forEach((n=>{"error"===n.peek().status&&(t.counter({name:"wallet_button_status_reset",value:1,attributes:{walletName:e}}),n.value={status:"not_rendered"})}))})))}([{walletName:"applepay",signal:O.buttonStatus},{walletName:"amazonpay",signal:B.buttonStatus},{walletName:"buy_with_prime",signal:B.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:A.buttonStatus},{walletName:"paypal",signals:[T.acceleratedCheckoutButtonStatus,T.payWithPayPalButtonStatus]}]),C((()=>{const e=b.value,r=t.wallets.activeSession.value;"APPLE_PAY"===r?.wallet&&n.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:e?.countryCode,isPostalCodePadded:Tn(e?.postalCode,e?.countryCode),asPaymentMethod:r.asPaymentMethod})}));const le=o((()=>({availableWallets:$,walletUsedForSubmissionSignal:I,persistedPayPalSignal:k,inMemoryPayPalParts:T,inMemoryVenmoParts:N,persistedGooglePaySignal:S,inMemoryGooglePayParts:A,inMemoryApplePayParts:O,applePaySessionHandler:z,persistedApplePaySignal:E,persistedAmazonSignal:w,inMemoryAmazonPayParts:B,inMemoryShopPayParts:R,did
2IncrementUnusablePartialAddressMetric:V,acceleratedWalletPaymentMethods:W,isInPayPalContextSignal:x,buttonCount:K,receiptErrorSignal:F})),[$,k,S,E,w,W,K,N,I,A,T,O,z,B,R,F,x,V]);return h(_a.Provider,{value:le,children:[ne&&h(Kw,{onTransitionComplete:ae,useConsentCopy:ee}),h("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:Ne({screenReaders:"only"}),children:re?s.translate("wallets.errors.subscription_review_required"):""}),e]})}const bC=I((function({children:e,AlternativeProposal:t}){const{embed:n}=pe(),r=a((e=>n?.client?.showToast(e)??!1),[n]);return h(sw,{children:h(rw,{children:h(PC,{AlternativeProposal:t,children:[h(Gh,{handleToast:r,children:e}),h(zu,{})]})})})}));function PC({children:e,AlternativeProposal:t}){const{shop:n,checkout:r}=pe(),i=r.unstable_graphqlDataRequestInfo?.httpRequestInfo,a=o((()=>{const{country:e,zone:t,coordinates:r}=i?.geolocation??{};return i?{geolocation:{default:e??void 0,country:e??n.country,zone:t??void 0,coordinates:r?{longitude:r.longitude,latitude:r.latitude}:void 0},shop:{}}:void 0}),[i,n]),s="undefined"==typeof window?null:h(b,{children:[h($S,{}),h(Wv,{}),h(PS,{}),h(JS,{}),h(ew,{})]}),l=t??Db;return h(Gy.Provider,{value:a,children:h($b,{children:h(Lw,{children:h(Jb,{children:h(ba,{children:h(l,{children:h(RS,{children:h(_C,{children:h(bS,{children:h(Uw,{children:h(oy,{children:h(sP,{children:h(Mg,{children:h(Ub,{children:h(vf,{children:h(HS,{children:h(W_,{children:h(eP,{children:h(J_,{children:h(Pw,{children:[h(jy,{}),h(kC,{}),h(DS,{}),h(jw,{}),e,s]})})})})})})})})})})})})})})})})})})})})}function kC(){const e=s(!1),n=pe(),{embed:r,webMcp:i}=n,a=de(Vc),o=Pe(),{resetAddressErrors:l}=rv(o.context.deliveryMethodsAddressErrors),c=s({journeyProgression:a,negotiator:o,clearShippingAddressErrors:l});if(c.current={journeyProgression:a,negotiator:o,clearShippingAddressErrors:l},!e.current){e.current=!0;const a={get completing(){return c.current.journeyProgression.completing},get progressing(){return c.current.journeyProgression.progressing},detour:(...e)=>c.current.journeyProgression.detour(...e),progress:(...e)=>c.current.journeyProgression.progress(...e),prefetch:()=>c.current.journeyProgression.prefetch(),negotiate:e=>c.current.journeyProgression.negotiate(e)},s=()=>c.current.negotiator.waitForPendingNegotiations();r?.unstable_providePreactContext({journey:a,waitForPendingNegotiations:s,waitForSkeletonRemoved:()=>Vl(),negotiationContext:o.context}),i?.unstable_providePreactContext({loadPickupLocalityServices:()=>t((()=>Dl((()=>import("./865e4eaf.9zS1cNRw.js")),__vite__mapDeps([75,2,1,3,4,5,76,6,49,77,78,79,80,81,82,9,83,62,59,60,61,84,43,44,45,7,8])))).then((({createPickupLocalityServices:e})=>e(n))),journey:a,clearShippingAddressErrors:()=>c.current.clearShippingAddressErrors(),get negotiator(){return c.current.negotiator},waitForPendingNegotiations:s})}return null}const SC=x({displayName:"DevTools",load:()=>Dl((()=>import("./bad03769.YINpw55-.js")),__vite__mapDeps([85,1,2,3,4,5,9,6,7,8,86])),suspense:!0}),wC=x({displayName:"EditorBridge",suspense:!1,load:()=>Dl((()=>import("./abd080c1.DDQDOiKg.js")),__vite__mapDeps([87,2,1,3,4,5,6,7,8,9]))}),CC=x({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:function(e){const{observability:t}=pe();l((()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}(t,e)}),[e,t])},load:()=>t((()=>Dl((async()=>{const{deferredPrivacyComponents:e}=await import("./2acfb1ce.Bgnzh68x.js");return{deferredPrivacyComponents:e}}),__vite__mapDeps([88,1,2,3,4,5,36,37,6,7,8,9])).then((({deferredPrivacyComponents:e})=>e.PrivacyPreferences))))}),EC=x({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:function(e){const{observability:t}=pe();l((()=>{e&&function(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}(t,e)}),[e,t])},load:()=>t((()=>Dl((async()=>{const{deferredPrivacyComponents:e}=await import("./2acfb1ce.Bgnzh68x.js");return{deferredPrivacyComponents:e}}),__vite__mapDeps([88,1,2,3,4,5,36,37,6,7,8,9])).then((({deferredPrivacyComponents:e})=>e.PrivacySheet))))});function xC({children:e}){return h(b,{children:e})}function IC({children:e}){const t=o((()=>new URL(window.location.href)),[]),{client:n,source:r}=pe(),i=n.unstable_getSerialization("shopPayConfig");return l((()=>{i&&async function(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:i}=n,a={},o=Pa(e.searchParams);if(i&&!o||"simulated"===t.type||null===t.checkoutSessionIdentifier||!e.searchParams.has(Mi)||(a.disable_automatic_redirect=t.checkoutSessionIdentifier),r&&"false"===e.searchParams.get("auto_redirect")&&(a.block_universal_redirect=!0),Object.keys(a).length>0){const t={...a,checkout_version:"c1",edge_redirect:"true"===e.searchParams.get("edge_redirect")};fetch("/shopify_pay/accelerated_checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),credentials:"include"})}}(t,r,{universal_redirect_enabled:i.universal_redirect_enabled,universal_redirect_indicator:i.universal_redirect_indicator})}),[t,r,i]),h(b,{children:e})}function AC({children:e}){const t="undefined"==typeof window;return h(t?xC:IC,{children:e})}function TC({children:e,context:t,...n}){const r="undefined"==typeof window,i=Vt();return h(Sa.Provider,{value:t,children:h(Xf,{target:"cart",children:h(AC,{children:h(Y,{router:t.router,children:h(bC,{...n,children:h(ka,{children:[h(Jf,{children:e}),h(ty,{}),!r&&h(Kf,{}),h(A,{when:i,children:[h(EC,{}),h(CC,{})]}),h(NC,{}),Ht()&&h(wC,{})]})})})})})})}function NC(){const e=Vt();return Zf(),h(A,{when:()=>e.value&&!1,children:h(SC,{})})}
2function LC(e){return[e].flat(99).filter(Boolean).length>0}var RC={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 MC({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:i="separator",alignment:a="center",children:o}){const s=LC(o);return h("div",{role:s?void 0:i,className:P(RC.Divider,RC.directionVariant[r],s&&RC.alignmentVariant[a],RC.borderWidthVariant[n],RC.styleVariant[t]),id:e,children:s&&h("div",{className:P(RC.contentAlignmentVariant[a]),children:[o,"separator"===i&&h("span",{role:"separator"})]})})}function DC({children:e,condition:t}){return h(t?"picture":b,{children:e})}const OC=new Map(Ca({addMaxWidth:!1}).map((({breakpoint:e,query:t})=>[e,t])));function zC(e,t){var n;if(!e&&t&&wa(t))return Object.entries((n=t,wa(n)?{base:[{source:n.default}],...n.conditionals.reduce(((e,t)=>{const n=void 0===t.conditions.viewportInlineSize?"base":t.conditions.viewportInlineSize.min,r=void 0===t.conditions.resolution?[{source:t.value}]:[{source:t.value,resolution:t.conditions.resolution}],i=n in e?e[n]??[]:[];return{...e,[n]:[...i,...r]}}),{})}:{base:[{source:n}]})).sort((([e],[t])=>{const n=ce[e],r=ce[t];return null!=n&&null!=r?r-n:0})).map((([e,t])=>{const n=OC.get(e);if(void 0!==n&&Array.isArray(t)){const e=t.map((({source:e,resolution:t})=>[e,t&&`${t}x`].join(" ").trim())).join(", ");return W("source",{key:n,media:n,srcSet:e})}})).filter(Boolean)}function BC(e){if(e)return wa(e)?"string"==typeof e.default?e.default:void 0:e}var VC={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},FC={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 UC({alt:e="",depth:t,size:n,sizes:r,source:i,src:a,srcSet:o,totalItems:s,overlay:l}){const{merchandiseThumbnail:{background:c="subdued",border:u="full",fit:d="contain",borderWidth:p,borderColor:m="base",shadow:g,badge:{background:f}={}}={}}=Ah(),y=qC(n),v=f&&"base"!==f?"accent":"auto",_=zC(a,function(e){return $C(e)?e:void 0}(i)),b=g??"extraSmall",k=function(e){switch(e){case"none":return"none";case"base":return"base";case"large":case"large100":return"large";case"large200":return"large-200";default:return}}(p)??jC(y),{className:S}=Ch({boxShadow:b}),{className:w}=Ch({objectFit:d,borderWidth:k});
2return h("div",{className:P(FC.ProductThumbnail,FC.thumbnailBackgroundVariant[c],FC.productThumbnailSizeVariant[y],S,"none"!==b&&FC.boxShadowMargin,null!=t&&FC.depthVariant[t],FC.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[a||$C(i)?h(DC,{condition:Boolean(_),children:[_,h("img",{src:a??BC(i),srcSet:o,sizes:r,alt:e,loading:"eager",className:P(FC.ProductThumbnailImage,FC.borderVariant[u],FC.borderColorVariant[m],w)})]}):h("div",{className:P(FC.Placeholder,FC.borderVariant[u],FC.borderColorVariant[m],w),children:h(Uh,{type:"image",size:HC(y)})}),void 0!==l&&h("div",{className:P(FC.Overlay,FC.borderVariant[u],FC.borderColorVariant[m]),children:h("strong",{children:l})}),void 0===s?null:h(WC,{size:y,tone:v,children:s})]})}function qC(e){if("string"!=typeof e)return"base";const t=e.replace("-100","");return t in VC?t:"base"}function jC(e){return e.startsWith("small")?"base":"large"}function HC(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function $C(e){return"string"==typeof e||wa(e)}function YC(e){const{boxSize:t}=VC[qC(e)];return{blockSize:t,inlineSize:t}}function WC({children:e,size:t,tone:n}){const r=Rd(),i="accent"===n?n:"auto",{className:a}=Ch({borderWidth:jC(t)});return h("div",{className:FC.BadgeWrapper,children:h("div",{className:P(FC.Badge,FC.badgeSizeVariant[t.startsWith("small")?"small":"base"],FC.badgeToneVariant[i],a),children:[h("span",{className:FC.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const GC=function(e){let t=0,n=!0;const r=new Set;return function(){const[i,o]=u((()=>{if(0===t)return 0;const n=performance.now()-t;return n<e?e-n:0})),[c,d]=u(!0),p=s(),[m,h]=u(!1),g=a((()=>{for(const e of r)e(!1)}),[]),f=a((()=>{for(const e of r)e(!0)}),[]),y=a((()=>{g(),h(!0)}),[g]);l((()=>{m&&f()}),[m,f]);const v=a((e=>{r.add(d);const n=e.timeStamp-t;o(n)}),[]),_=a((i=>{t=i.timeStamp,r.add(d),n&&(n=!1,p.current=setTimeout(y,e))}),[y]);return l((()=>(r.add(d),()=>{r.delete(d),p.current&&clearTimeout(p.current)})),[]),{animationEnabled:c,delay:i,onAnimationStart:v,onAnimationIteration:_}}}(4e3);var JC="var(--_1sg44lm0)",KC="var(--_1sg44lm1)",QC="var(--_1sg44lm2)";function XC({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:i,id:a,delay:o=!0}){const s="inline"===e?"span":"div",{className:c,style:d}=Ch({blockSize:r,inlineSize:n},{transforms:{inlineSize:e=>Wd(e,{fitContent:!0,auto:!0})}}),[p,m]=u(o);l((()=>{const e=setTimeout((()=>m(!1)),100);return()=>{clearTimeout(e)}}),[]);const{animationEnabled:g,delay:f,onAnimationStart:y,onAnimationIteration:v}=GC();return h(s,{className:P("_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r","inline"===e&&"_1sg44lm7",p&&"_1sg44lm8",g&&"_1sg44lm6",c),style:{...S({[QC]:t?.toString()??"",[JC]:`${f}ms`,[KC]:"4000ms"}),...d},"aria-hidden":"true",onAnimationStart:y,onAnimationIteration:v,id:a,children:h(s,{className:P("_1sg44lma _1sg44lm9 _1fragemvo",c),style:d,children:i})})}const ZC=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function eE({children:e,delay:t,inlineSize:n,id:r,...i}){return h(Sy,{...i,children:h(XC,{delay:t,inlineSize:ZC.get(n??"small"),id:r,children:e})})}function tE({width:e}){const{header:{logo:t}}=a_(),{shop:n}=pe(),{width:r,height:i}=function(e,t,n){const r=n??1;let i,a;return e?(i=e,a=e/r):t&&(i=t,a=t/r),void 0!==n&&void 0!==i&&void 0!==a&&a>300&&(i*=300/a,a=300),{width:i,height:a}}(t?.maxWidth,e,t?.aspectRatio);return h("img",{alt:t?.altText||n.name,className:"gP50U",src:t?.image,width:r,height:i})}const nE=_(void 0);function rE({children:e,style:t,insetsRows:n}){const{rendered:r,rowsInset:i}=y(nE)??{},a=o((()=>({pending:t,pendingInsetsRows:n,rendered:r,rowsInset:i})),[t,n,r,i]);return h(nE.Provider,{value:a,children:e})}function iE({children:e,rowsInset:t}){const{pending:n}=y(nE)??{},r=o((()=>({pending:void 0,rendered:n,rowsInset:t})),[n,t]);return h(nE.Provider,{value:r,children:e})}function aE(){return y(nE)??{}}function oE(){return y(q_)}function sE({currentDetour:e}){return"thankYou"===e?.type?"ORDER_STATUS1":"INFORMATION1"}function lE(e,t,n,r,i){return null==e?()=>!1:Ta(cc(e.features,t),n,r,i)}const cE=_([]),uE=_({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),dE=_(null);function pE(e,t,...[n]){const{checkout:{extensibility:r}}=pe(),i=function(){const{deactivatedExtensionIds:e}=fE(),{currentPage:t,currentDetour:n}=Fc().value,{source:r}=pe(),i=oE();return function({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:i,sourceType:a}){const o=e&&hc(e,t),s=e&&new Set([...jn,...Un]),l=r&&gc(r),c=r&&function(e){const t=$_.get(e.type)??[];return new Set(t)}(r),u="thankYou"===r?.type,d=l??o??new Set,p=c??s??new Set;return t=>{const{id:o,extensionPoint:s,placementReference:l}=t;if(n.has(o))return!1;if(!xa(t,{sourceType:a,isThankYou:u}))return!1;const c=Ia(s.target);if(null==c)return!1;
2if((e||r)&&!d.has(c))return!1;if(Aa(c)){if(!l)return!1;if(!i.supported.has(l))return!1;if((e||r)&&!p.has(l))return!1}return!0}}({page:t,negotiatedState:Pe().current.peek(),deactivatedExtensionIds:e,detour:n,placementReferences:i,sourceType:r.type})}(),a=y(dE),s=oE();return o((()=>{const o=Aa(t)&&n?{target:t,placements:s,placementReference:n}:{target:t};return e.filter((e=>null===a||a.has(ht(e.extensionPoint.target)))).filter((e=>r.ui.unstable_isTargetMatch(e,o))).filter(i)}),[i,a,e,t,n,s,r])}function mE(e,...[t]){const{checkout:{extensibility:n},shop:r}=pe(),i=r.hasFlagEnabled(Na),a=oE(),l=s([]),c=y(cE),u=pE([...n.ui.search().value,...c],e,t),d=o((()=>{if(i)return n.customFields.search(Aa(e)&&t?{target:e,placements:a,placementReference:t}:{target:e})}),[n,i,e,t,a]),p=d?.value,m=o((()=>(p??[]).map((e=>La("customField",e)))),[p]),h=o((()=>Ra([...u.map((e=>La("uiExtension",e))),...m])),[u,m]);return n.ui.enabled.value?h.length>0?h:l.current:m.length>0?m:l.current}function hE(e,t){const n=vE();return a((r=>{if(!e.length)return Promise.resolve(void 0);const i=n.get(e[0],t);return Promise.resolve(i.run(r))}),[n,e,t])}function gE(e,t){const{checkout:{extensibility:n}}=pe(),r=s([]),i=pE([...t,...y(cE)],e),a=o((()=>i.map((e=>La("uiExtension",e)))),[i]);return n.ui.required.value&&!n.ui.enabled.value?r.current:a}function fE(){return y(uE)}const yE=_({get:()=>{},findAll:()=>[],blockingExtensions:w((()=>[]))});function vE(){return y(yE)}function _E({visibleTargets:e,children:t}){const n=o((()=>new Set(e)),[e]);return h(dE.Provider,{value:n,children:t})}function bE(e){return Array.from(e.labels||[]).map((e=>e.textContent)).join("")}function PE(e){return e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type)?e.checked.toString():e.value}function kE(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 SE={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},wE=Object.keys(SE),CE=_(null);function EE(){const e=y(CE);return a((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 xE({section:e,children:t}){if("undefined"==typeof window)return h("div",{children:t});const n=Pf(),r=s(null),i=o((()=>new WeakMap),[]),a=s(null);function l(t){const r=t.target.closest("a, button, input, select");if(!r)return;if(a.current===r)return;a.current=r;const{element:o,shouldCaptureEvent:s}=IE(r,e,i);s&&n("dom_input_focused",{element:o,timestamp:new Date})}return Sf(r,(e=>l({target:e}))),h(CE.Provider,{value:i,children:h("div",{ref:r,onFocusCapture:l,onBlurCapture:function(t){const r=t.target.closest("a, button, input, select");if(!r)return;a.current===r&&(a.current=null);const{element:o,shouldCaptureEvent:s}=IE(r,e,i);s&&n("dom_input_blurred",{element:o,timestamp:new Date})},onClickCapture:function(t){const r=t.target;if(!(r instanceof Element))return;const a=r.closest("a, button"),o=r.closest("input, select"),s=a??o;if(!(s||r instanceof HTMLElement))return;const{element:l,shouldCaptureEvent:c}=IE(s??r,e,i);c&&n("dom_clicked",{element:l,...SE,...ft(t.nativeEvent,wE),timestamp:new Date})},onChangeCapture:function(t){const r=t.target?.closest("a, button, input, select");if(!r)return;const{element:a,shouldCaptureEvent:o}=IE(r,e,i);o&&n("dom_input_changed",{element:a,timestamp:new Date})},children:t})})}function IE(e,t,n){const r=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement;let i=null;i=r?e.type:null;let a=`${t}_`,o=null,s=null;r&&"href"in e&&(s=e.href);let l=!0;if(e instanceof HTMLInputElement&&"radio"===e.type)a+=e.name.replace(/[A-Z]/g,((e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`)),o=e.id.split("-").slice(-1)[0].toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)a+=e.name.replace(/[A-Z]/g,((e,t)=>
2`${0===t?"":"_"}${e.toLowerCase()}`)),o=PE(e);else{const t=AE(e,n);t?a+=t:l=!1}return a=a.replace(/-/g,"_"),{element:{id:a,tagName:e.tagName,type:i,value:o,...s&&{href:s},name:null},shouldCaptureEvent:l}}function AE(e,t){if(null!==e&&null!==t)return t.has(e)?t.get(e):AE(e.parentElement,t)}function TE({section:e,children:t}){if("undefined"==typeof window)return h("div",{children:t});const{checkout:{identity:n},router:r,shopPay:i}=pe(),a=r.currentUrl.value,{currentFocus:o}=Fc().value,l=Pf(),c=Bf(),u=wf(),d=s(null),p=s(new WeakMap),m=mt(a,{isShopPayActive:"shopPay"===n.current.value,shopPay:i});function g(t,{recoveredAutofocus:n=!1}={}){const r=o.peek();o.value=e,!n&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement)&&p.current.set(t.target,PE(t.target)),!n&&t.target instanceof HTMLInputElement&&"email"!==t.target.name&&u(m),r!==e&&(l("sectionInteraction",{section:e,timestamp:new Date}),c({type:"section_interaction",section:e}))}return Sf(d,(e=>g({target:e},{recoveredAutofocus:!0}))),h("div",{ref:d,onFocusCapture:g,onBlurCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const n=p.current.get(t.target),r=PE(t.target);p.current.delete(t.target),u(m),n!==r&&function(t){const{name:n,tagName:r,type:i}=t,a=bE(t);l("change",{element:{...a&&{label:a},...n&&{name:n},tagName:r,type:i,value:PE(t)},section:e,timestamp:new Date})}(t.target)}},onClickCapture:function(t){if(!(t.target instanceof Element))return;const n=t.target.closest("a, button"),r=t.target.closest("input, select");if((n??r)&&n){const{tagName:t,textContent:r,id:i}=n,a=(r??"").trim(),o=n.dataset.eventName||a||i;u(m),l("click",{element:{tagName:t,textContent:o??void 0},section:e,timestamp:new Date})}},onKeyUpCapture:function(e){e.target instanceof HTMLInputElement&&u(m)},onChangeCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const{id:n,name:r,tagName:i,type:a}=t.target;let o=bE(t.target);0===o.length&&(o=n);const s=kE(t);s&&l("autofill",{source:s,element:{...o&&{label:o},...r&&{name:r},tagName:i,type:a,value:PE(t.target)},timestamp:new Date,section:e})}},children:t})}function NE(e,t){const n=pe().checkout.configuration.layout.isOnePage.value,r=mE("Checkout::Dynamic::Render","ORDER_SUMMARY1"),i=mE("Checkout::Dynamic::Render","ORDER_SUMMARY2"),a=mE("Checkout::Dynamic::Render","ORDER_SUMMARY3"),o=mE("Checkout::Dynamic::Render","ORDER_SUMMARY4"),s=mE("Checkout::CartLines::RenderAfter"),l=mE("Checkout::CartLineDetails::RenderAfter"),c=mE("Checkout::Reductions::RenderBefore"),u=mE("Checkout::Reductions::RenderAfter");return n?"bottom"===e?t?.hideMerchandiseLines?[...a]:[...r,...i,...a,...l,...s]:[...l]:[...r,...i,...a,...o,...l,...s,...c,...u]}const LE="checkout-main",RE="checkout-main-header",ME="checkout-pay-button",DE="checkout-review-heading",OE=ue("OrderSummaryContext");function zE(){return de(OE)}const BE=({children:e})=>{const t=f(!1),n=a((e=>{t.value=e}),[t]),r=o((()=>({open:t,setOpen:n})),[t,n]);return h(OE.Provider,{value:r,children:e})};function VE(){const{checkout:e,router:t}=pe();return i((()=>e.thankYouEntrance.isRevealing.value&&t.currentUrlMatches("/thank-you")))}const FE={Shell:"cm5pp","Config-Footer-positionInline":"FeQiM","Config-Footer-positionEnd":"BwmDa","Shell-layoutAside":"g9PS6","Config-Main-inlineSizeFill":"_46J2H","Config-OrderSummary-inlineSizeFill":"XlQtV","Config-Header-positionStart":"U3Rye","Config-Header-positionInline":"_5ZebG","Config-Header-positionInlineSecondary":"PqnoL","Header-divided":"d5pfT","Shell-variantOnePageCheckout":"oYrwu",MainContent:"gdtca",MainContentPrimary:"djSdi",Footer:"NGRNe","Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:"_1Eo4p",Announcement:"_5gERx","Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:"mpQwN",AnnouncementContent:"gYnYi","Announcement-expanded":"yJIUK",AnnouncementActionButtons:"uB1DX",AnnouncementExpandCollapseButton:"Lhk39",AnnouncementCloseButton:"GxFSO",AnnouncementOverlay:"eqp7i","Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:"EAjaz","Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:"i8Dpn","Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-exiting":"aLUb3","Header-thankYouCovered":"Gm2ml","Header-hasBackgroun
2dImage":"zKcpW",BuyerJourney:"lX75M",BuyerJourneyContent:"_0DLUq","BuyerJourney-containerContent":"hKv1l",Disclosure:"nMPKH",DisclosureButton:"WtpiW",DisclosureDetails:"ks0CH",DisclosureDetailsContent:"GRdxR","Disclosure-divided":"iYA3J",Content:"Sxi8I","Content-containerContent":"vzM2m",Main:"_9F1Rf","Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:"i4DWM",OrderSummaryContent:"_4QenE","OrderSummary-inlineSizeFill":"LEmIb",FooterContent:"QiTI2","Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},UE="announcement_box",qE="announcement_content";function jE({children:e,onClose:t,onAfterCollapse:n,onAfterExpand:r,onExpand:i,onCollapse:o,open:c=!1,expanded:d=!1}){const{i18n:p}=pe(),[m,g]=u(!1),f=s(null),y=s(null),v=up(d,"base"),_=up(c,"base");l((()=>{if("undefined"==typeof window||!window.ResizeObserver||!window.MutationObserver)return;const e=y.current;if(!e)return;const t=()=>{d||"exited"!==v||g(e.scrollHeight>e.clientHeight)};t();const n=Da(t,200),r=new ResizeObserver(n);r.observe(e);const i=new MutationObserver(n);return i.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{r.disconnect(),i.disconnect()}}),[e,d,c,v]);const b=a((()=>{d?o?.():i?.()}),[d,o,i]);l((()=>{"entered"===v?r?.():"exited"===v&&n?.()}),[r,n,v]);const k=$E(),{environment:{isCheckoutEditor:S},announcement:{colorScheme:w}}=a_(),C=k[0],E=S?C?.publicIdentifier:void 0,x=S&&k.length>0;return LC(e)?h("section",{id:UE,className:P(FE.Announcement,c&&FE["Announcement-opened"],m&&FE["Announcement-hasOverflow"],d&&FE["Announcement-expanded"],FE[G("Announcement-expandedTransition",v)],FE[G("Announcement-openTransition",_)],x&&FE["Announcement-hasActiveInspector"]),ref:f,children:h("div",{className:P(FE.AnnouncementContainer,Ne({colorLayer:"base",colorScheme:w,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!d&&h("button",{className:FE.AnnouncementOverlay,onClick:e=>{e.preventDefault(),e.stopPropagation(),i?.()},"aria-label":p.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":qE,type:"button"}),h("div",{className:FE.AnnouncementActionButtons,children:[h("button",{id:"announcement_action_expand_collapse_buttons",className:FE.AnnouncementExpandCollapseButton,onClick:b,"aria-label":d?p.translate("thank_you.announcement.collapse"):p.translate("thank_you.announcement.expand"),"aria-expanded":d,"aria-controls":qE,type:"button",children:h(Uh,{type:d?"chevron-up":"chevron-down",size:"base"})}),h("button",{className:FE.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":UE,"aria-expanded":c,"aria-label":p.translate("thank_you.announcement.close"),type:"button",children:h(Uh,{type:"x",size:"base"})})]}),h("div",{id:qE,className:FE.AnnouncementContent,ref:y,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function HE(){}function $E(){const{environment:{hasTYPAnnouncementExtensions:e}}=a_(),t=function(e){return void 0!==e?()=>[]:()=>{const e=mE("purchase.thank-you.announcement.render");return Oa(e,"uiExtension").map(za)}}(e);return t()}const YE={ThankYouInterstitialShell:"szW4X",ThankYouInterstitialOverlay:"sMSRq",ThankYouInterstitialHeader:"_3Ebqn",ThankYouEntranceDisclosure:"F6Nrx",ThankYouEntranceOrderSummary:"j1xD4",ThankYouEntranceFooter:"RDtb7",ThankYouEntrance:"ZXaI9",ThankYouEntranceStatus:"sEWAT",ThankYouEntranceHeading:"DTABr",ThankYouEntranceCards:"kBVzA",ThankYouEntranceActions:"qgQOk",ThankYouEntranceBeat:"SBffw"},WE={none:"0",...Ce.spacing},GE={base:"solid",dashed:"dashed",dotted:"dotted"},JE="disclosure_details";function KE({banner:e,announcement:t,header:n,buyerJourney:r,disclosure:i,disclosureOrderSummary:o,footer:s,main:c,orderSummary:d,blockSize:p,minMobileViewportSize:m=!1,disclosureId:g=JE,isDisclosureInteractive:f=!0,mainContentId:y=LE}){const v=a_(),{checkout:{configuration:_,checkoutExit:b},embed:k,router:S}=pe(),w=_.visibility.showAside,C=Boolean(k?.isFlagshipPartner),E=si(k?.embedder),x=E&&_.isUniversalCheckoutFinalizer&&"/thank-you"===S.currentUrl.value.normalizedPath,I=mE("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,A=E&&I,T=C&&!1===v.header.divided,N=v.header.position??"inline",L=fx(),R=VE(),{open:M,expanded:D,onAfterCollapse:O,onAfterExpand:z,onClose:B,onExpand:V,onCollapse:F}=function(){const e=a_(),t=i_(),n=Yb(),r=function(){const{environment:{hasTYPAnnouncementExtensions:e}}=a_();return function(e){return void 0!==e?()=>HE:()=>{const e=$E(),t=Pf();if(0===e.length)return HE;const n=e[0];return e=>t?.("extensionUiInteraction",{interaction:e,section:"extension",timestamp:new Date,extension:n,componentType:"Announcement",componentInstanceId:n.id})}}(e)()}(),[i,o]=u(!1),[s,c]=u(!1),d=a((({source:e}={})=>{const{announcement:i}=t.configuration;
2"dismissed"!==i.visibility&&"hidden"!==i.visibility&&(r("host"===e?"announcementDismissedFromHost":"announcementDismissedFromExtension"),n.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))}),[t,n,r]),p=a((()=>{n.emit("announcementAfterCollapsed")}),[n]),m=a((()=>{n.emit("announcementAfterExpanded")}),[n]),h=a((()=>{o(!0),r("announcementExpanded"),n.emit("announcementExpanded")}),[r,n]),g=a((()=>{o(!1),r("announcementCollapsed"),n.emit("announcementCollapsed")}),[r,n]);return l((()=>(n.on("closeAnnouncement",d),()=>{n.off("closeAnnouncement",d)})),[d,n]),l((()=>{if("visible"!==e.announcement.visibility)return void c(!1);const t=setTimeout((()=>{c(!0)}),1e3);return()=>clearTimeout(t)}),[e.announcement.visibility]),{open:s,expanded:i,onAfterCollapse:p,onAfterExpand:m,onClose:d,onExpand:h,onCollapse:g}}(),U=o?h(rE,{style:v.orderSummary.section,children:o}):void 0;return h("div",{className:P(FE.Shell,YE.ThankYouInterstitialShell,b.isExiting.value&&FE["Shell-exiting"],w&&FE["Shell-layoutAside"],"fill"===v.main.inlineSize&&FE["Config-Main-inlineSizeFill"],"fill"===v.orderSummary.inlineSize&&FE["Config-OrderSummary-inlineSizeFill"],FE[G("Config-Header-position",N)],v.footer.position&&FE[G("Config-Footer-position",v.footer.position)],v.environment.isOnePageCheckout&&FE["Shell-variantOnePageCheckout"],E&&FE["Shell-embeddedUc"],x&&FE["Shell-embeddedUcMainPadding"],A&&FE["Shell-embeddedUcHasOrderSummary4Extensions"],p&&FE[G("Shell-blockSize",p)],m&&FE["Shell-minMobileViewportSize"],LC(t)&&FE["Shell-hasAnnouncement"],M&&FE["Shell-announcementOpen"]),style:{...sx("content",v.content),...cx("content",v.content),...ux("main",v.main),...dx("main",v.main),...ux("order-summary",v.orderSummary),...dx("order-summary",v.orderSummary),...px("order-summary",v.orderSummary),...ux("header",v.header),...px("header",{backgroundImage:v.header.banner?.image}),...dx("header",v.header),...T?yx:{},...ux("footer",v.footer),...dx("footer",v.footer),...mx("footer",v.footer),...ux("buyer-journey",v.buyerJourney),...dx("buyer-journey",v.buyerJourney),...ux("announcement",v.announcement)},children:[h(QE,{}),e?h("div",{className:FE.Banner,children:e}):null,t?h(jE,{open:M,expanded:D,onAfterExpand:z,onAfterCollapse:O,onClose:B,onExpand:V,onCollapse:F,children:t}):null,h(XE,{position:"start",children:[n,"header"===v.buyerJourney.position&&h(ZE,{children:r})]}),h(ex,{id:g,isInteractive:f,details:U,children:i}),h(tx,{children:[h(rx,{children:[h(XE,{position:"inline",children:[n,"header"===v.buyerJourney.position&&h(ZE,{children:r})]}),h(nx,{children:["inline"===v.buyerJourney.position&&h(ZE,{children:r}),h(rE,{style:v.main.section,children:h("main",{className:P(FE.MainContentPrimary,L&&"F3Ebx"),id:y,children:c})}),"inline"===v.footer.position&&h(ax,{children:s})]})]}),h(ix,{children:[h(XE,{position:"inlineSecondary",children:[n,"header"===v.buyerJourney.position&&h(ZE,{children:r})]}),h(nx,{children:h(rE,{style:v.orderSummary.section,children:h("aside",{className:P(FE.OrderSummaryContentPrimary,L&&"OcTba",R.value&&YE.ThankYouEntranceOrderSummary),children:h(TE,{section:"summary",children:h(xE,{section:"summary",children:d})})})})})]})]}),"end"===v.footer.position&&h(ax,{children:s})]})}function QE(){const{checkout:e}=pe(),{main:{colorScheme:t="scheme1",background:n}={}}=a_();return e.checkoutExit.isExiting.value?h("div",{className:P("Vytfl",Ne({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===n?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function XE({children:e,position:t}){const{header:{position:n="inline",container:r="fill",colorScheme:a,banner:o,background:s,divided:l}={}}=a_(),c=t??n,u=function(){const{checkout:e,client:t,router:n}=pe(),r=Ag(),a=Zf(),o=mc(t.initialRequest.url.pathname).endsWith("/thank-you"),s=r&&!a&&!o;return i((()=>s&&"settled"!==e.thankYouEntrance.phase.value&&n.currentUrlMatches("/thank-you")))}(),d=fx();if(!LC(e))return null;const p=l??"start"===c;return h("header",{className:P(FE.Header,YE.ThankYouInterstitialHeader,FE[G("Header-position",c)],FE[G("Header-container",r)],p&&FE["Header-divided"],o?.image&&FE["Header-hasBackgroun
2dImage"],u.value&&FE["Header-thankYouCovered"],d&&"inlineSecondary"===c&&"LRXpG","start"===c&&Ne({backgroundColor:"subdued"===s?"subdued":"baseSpecified",colorLayer:"base",colorScheme:a})),"data-inspector-id":"header",children:h("div",{className:FE.HeaderContent,children:h(td,{children:h(TE,{section:"header",children:h(xE,{section:"header",children:e})})})})})}function ZE({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=a_();return LC(e)&&"hidden"!==r?h("div",{className:P(FE.BuyerJourney,FE[G("BuyerJourney-position",t)],FE[G("BuyerJourney-container",n)]),children:h("div",{className:FE.BuyerJourneyContent,children:e})}):null}function ex({children:e,details:t,id:n=JE,isInteractive:r}){const{content:{divider:{visibility:a="visible"}={}},orderSummary:{background:o,backgroundImage:c,colorScheme:d}={},main:{colorScheme:p="scheme1"},environment:{isCheckoutEditor:m},disclosure:{visibility:g}}=a_(),f=Vt(),y=VE(),{checkout:v}=pe(),_=function(){const{environment:{hasOrderSummaryExtensions:e}}=a_(),t=function(e){return void 0!==e?()=>e:()=>NE("top").length>0}(e);return t()}(),{expanded:b,narrowedToInformationStep:k}=function(){const{environment:{shouldExpandOrderSummary:e}}=a_(),t=function(e,t){return void 0!==t?()=>({expanded:t,narrowedToInformationStep:!1}):()=>{const t=function(){const e=L(NE("top"));return i((()=>e.value.some((e=>{if("customField"===e.kind)return za(e).required.value;const t=za(e),n=t.behaviors.value;return n.blockProgress&&t.capabilities.blockProgress||n.alwaysReveal}))))}(),n=function(){const{orderSummary:{defaultState:e}={}}=a_(),{checkout:{configuration:{layout:{isOnePage:t}}}}=pe();return!t.value&&"EXPANDED"===e}(),r=function(){const e=Fc();return i((()=>{const{currentPage:t,currentDetour:n}=e.value;if(!n&&t)return"information"===t.id}))}();return e&&n&&!t.value&&void 0!==r.value?{expanded:r.value,narrowedToInformationStep:!0}:{expanded:t.value||n,narrowedToInformationStep:!1}}}(function(){const{client:e}=pe(),t=e.unstable_getSerialization("experiments"),n=t?.find((e=>e.clientHandle===Fl))?.variant;return Object.values(Ma).find((e=>e===n))}()===Ma.Treatment,e);return t()}(),{open:S,setOpen:w}=zE(),C=S.value||_&&m,[E,x]=u(),I=s(!1);l((()=>{x(I.current&&!b?"none":void 0),w(b)}),[b,w]),l((()=>{I.current=k})),l((()=>{C&&w(!0)}),[C,_,w]);const A=gx();if(!LC(e)||v.checkoutExit.isExiting.value||"hidden"===g||"hidden-only-checkout"===g&&!A)return null;const T=c?{backgroundImage:`url(${JSON.stringify(c)})`}:void 0,N=!r||S.value,R=Boolean(t)&&(f.value||N);return h("aside",{className:P(FE.Disclosure,"visible"===a&&FE["Disclosure-divided"],Ne({colorLayer:"base",colorScheme:p,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:h(TE,{section:"top_summary",children:h(xE,{section:"top_summary",children:[r?h(Nh,{className:P(FE.DisclosureButton,y.value&&YE.ThankYouEntranceDisclosure),background:"transparent",onClick:()=>{x(void 0),w(!S.peek())},"aria-controls":n,"aria-expanded":N,inlineSize:"100%","data-event-name":N?"order_summary_hide":"order_summary_show",children:e}):h("div",{className:P(FE.DisclosureButton,y.value&&YE.ThankYouEntranceDisclosure),children:e}),R&&h(pp,{open:N,id:n,duration:E,children:h("div",{className:P(FE.DisclosureDetails,y.value&&YE.ThankYouEntranceDisclosure,Ne({colorLayer:"base",colorScheme:d,backgroundColor:"subdued"===o?"subdued":"baseSpecified"})),style:T,children:h("div",{className:FE.DisclosureDetailsContent,children:h(td,{children:h(hx,{children:t})})})})})]})})})}function tx({children:e}){const{content:{container:t="fill"}={}}=a_();return LC(e)?h("div",{className:P(FE.Content,FE[G("Content-container",t)]),children:e}):null}function nx({children:e}){const{checkout:t}=pe();return t.checkoutExit.isExiting.value?null:h(b,{children:e})}function rx({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:r,backgroundImage:i}={},content:{divider:{visibility:a="visible"}={}}}=a_(),s=o((()=>({current:t})),[t]);if(!LC(e))return null;const l=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return h("div",{className:P(FE.Main,"fill"===n&&FE["Main-inlineSizeFill"],"visible"===a&&FE["Main-divided"],Ne({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===r?"subdued":"baseSpecified"})),style:l,children:h("div",{className:FE.MainContent,children:h(Am.Provider,{value:s,children:h(td,{children:e})})})})}function ix({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:r,backgroundImage:i}={}}=a_(),a=o((()=>({current:t})),[t]),s=fx();if(!LC(e))return null;const l=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return h("div",{className:P(FE.OrderSummary,"fill"===n&&FE["OrderSummary-inlineSizeFill"],s&&"LCUka",Ne({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===r?"subdued":"baseSpecified"}
2)),style:l,"data-inspector-id":"orderSummary",children:h("div",{className:FE.OrderSummaryContent,children:h(Am.Provider,{value:a,children:h(td,{children:e})})})})}function ax({children:e}){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:i,divided:a}={}}=a_(),{checkout:o}=pe(),s=fx(),l=VE();if(o.checkoutExit.isExiting.value||!LC(e))return null;const c=a??"end"===t;return h("footer",{className:P(FE.Footer,FE[G("Footer-position",t)],FE[G("Footer-container",n)],c&&FE["Footer-divided"],s&&"qdIKq","end"===t&&Ne({colorLayer:"base",colorScheme:r,backgroundColor:"subdued"===i?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:h("div",{className:P(FE.FooterContent,l.value&&YE.ThankYouEntranceFooter),children:h(td,{children:h(xE,{section:"footer",children:e})})})})}function ox(e){return t=>t?e[t]:void 0}function sx(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:ox(GE)(t)}}const lx={none:"0px",...Ce.borderWidth};function cx(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:ox(lx)(t)}}function ux(e,{inlineSize:t}={}){return isNaN(Number(t))||0===Number(t)?"main"!==e&&"order-summary"!==e&&"fill"===t?{[`--config-${e}-inline-size`]:"100%"}:void 0:{[`--config-${e}-inline-size`]:Ae(Number(t))}}function dx(e,{padding:t}={}){if(Array.isArray(t)){const n=2===t.length?[t[0],t[1],t[0],t[1]]:t;return{[`--config-${e}-padding-block-start`]:ox(WE)(n[0]),[`--config-${e}-padding-inline-end`]:ox(WE)(n[1]),[`--config-${e}-padding-block-end`]:ox(WE)(n[2]),[`--config-${e}-padding-inline-start`]:ox(WE)(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`]:ox(WE)(t),[`--config-${e}-padding-inline-end`]:ox(WE)(t),[`--config-${e}-padding-block-end`]:ox(WE)(t),[`--config-${e}-padding-inline-start`]:ox(WE)(t),[`--config-${e}-padding`]:ox(WE)(t)}}function px(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function mx(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:ox(WE)(t)}}function hx({children:e}){const{environment:{isOnePageCheckout:t}}=a_(),n=gx();return t&&!n?h(_E,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):h(b,{children:e})}function gx(){const{environment:{hasDetour:e}}=a_(),t=function(e){return void 0!==e?()=>e:()=>{const{currentDetour:e}=Fc().value;return Boolean(e)}}(e);return t()}function fx(){const e=Ag(),t=gx();return e&&!t}const yx={"--x-shell-header-padding":`${ox(WE)("large100")} ${ox(WE)("large200")} ${ox(WE)("none")} ${ox(WE)("large200")}`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${ox(WE)("large100")}) var(--config-main-padding-inline-end, ${ox(WE)("large200")}) var(--config-main-padding-block-end, ${ox(WE)("large200")}) var(--config-main-padding-inline-start, ${ox(WE)("large200")})`},vx={small:"10ch",base:"20ch",large:"30ch",full:"100%"},_x=xu("wallet-transition-disclosure-"),bx=xu("wallet-transition-main-content-");function Px({layer:e="foreground"}={}){const{embed:t,i18n:n}=pe(),r=!t,i=Iu(void 0,_x),a=Iu(void 0,bx),o=h("div",{className:"A5qhV "+("background"===e?"_4KRKW":""),role:"status","aria-label":n.translate("general.loading"),style:S({[Ce.global.borderRadius]:"12px"}),children:h(BE,{children:h(KE,{mainContentId:a,disclosureId:i,isDisclosureInteractive:!1,header:r?h(kx,{}):void 0,disclosure:h(xx,{}),main:h(Ex,{}),orderSummary:h(Ix,{})})})});return h(Bu,{children:o})}function kx(){const{header:{alignment:e="start",logo:t}={}}=a_(),{shop:n}=pe(),r=t?.image?h(tE,{width:t.maxWidth}):h(Ww,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});return h(Dh,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function Sx({inlineSize:e="base",size:t="small"}){return h(eE,{size:t,inlineSize:e})}function wx(){return h(Sy,{type:"small",children:h(XC,{inlineSize:vx.full})})}function Cx(){return h(Ry,{rowGap:"base",children:[h(Sx,{size:"large",inlineSize:"small"}),h(Ry,{rowGap:"small-300",children:[h(wx,{}),h(wx,{})]})]})}function Ex(){return h(Ry,{rowGap:"large-200",children:[h(Cx,{}),h(MC,{}),h(Cx,{}),h(MC,{}),h(Cx,{})]})}function xx(){return h(Ry,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[h(Sx,{inl
2ineSize:"base"}),h(Sx,{size:"large",inlineSize:"small"})]})}function Ix(){const{i18n:e}=pe(),{merchandiseThumbnail:t,global:n}=Ah(),r=t.cornerRadius??n.cornerRadius??"base",i="fullyRounded"===r?"large":r,a=`${YC("base").inlineSize}px`;return h(Ry,{rowGap:"large-200",children:[h(Sy,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),h(Dh,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[h(fy,{borderRadius:i,overflow:"hidden",children:h(XC,{contentDisplay:"block",inlineSize:a,aspectRatio:1})}),h(Ry,{rowGap:"small-500",children:[h(Sx,{inlineSize:"base"}),h(Sx,{inlineSize:"small"})]}),h(Sx,{inlineSize:"small"})]}),h(Ax,{})]})}function Ax(){return h(Ry,{rowGap:"small-100",children:[[0,1,2].map((e=>h(Ry,{direction:"inline",justifyContent:"space-between",children:[h(Sx,{inlineSize:"small"}),h(Sx,{inlineSize:"small"})]},e))),h(Ry,{direction:"inline",justifyContent:"space-between",children:[h(Sx,{size:"large",inlineSize:"small"}),h(Sx,{size:"large",inlineSize:"small"})]})]})}function Tx(){const{shop:e,checkout:t,observability:n}=pe(),r=function(){const{checkout:{wallets:e}}=pe(),t=function(){const{shop:e,checkout:t}=pe(),n=Xv(),r=e.hasFlagEnabled(oe),{inMemoryApplePayParts:{subscriptionReviewTransition:a}}=Cn();return i((()=>void 0!==a.value&&vc({applePaySubscriptionsDecelerationActive:n,applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:t.configuration.layout.isOnePage.value})))}();return i((()=>{const n=void 0!==e.activeSession.value?.wallet&&"APPLE_PAY"!==e.activeSession.value.wallet&&Boolean(e.isDeceleratingSignal?.value);return t.value&&!n}))}().value,a=Boolean(t.wallets.isDeceleratingSignal?.value),o=t.isCheckoutLayoutForcedToOnePage.value,c=Hw(),{payNowButtonElement:u,payNowButtonSectionMounted:d}=aw(),p=Boolean(u||c&&d),m=e.hasFlagEnabled(ra),g=t.wallets.escalatedWallet.value,f=m?a&&p&&null!==g:a&&p;l((()=>{f&&t.wallets.setIsDecelerating(!1)}),[f,t.wallets]);const y=s(!1);return l((()=>{if(!o)return void(y.current=!1);if(!p||y.current)return;y.current=!0;const e={wallet:g};n.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:e}),n.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",e)}),[g,o,p,n]),r||!a?null:h(Px,{})}const Nx=x({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>t((()=>Dl((()=>import("./9d12dea3.BhgVUmlV.js")),__vite__mapDeps([89,1,2,3,4,5,90,21,22,91,43,44,45,6,42,46,47,25,26,41,92,93,94,95,96,97,98,99,77,100,101,102,103,104,105,106,107,28,29,108,7,8,9]))))}),Lx=x({suspenseName:"information",displayName:"Information",load:()=>t((()=>Dl((()=>import("./17324a0b.BBvNDaeo.js")),__vite__mapDeps([109,1,43,2,3,4,5,44,45,91,6,42,46,47,25,26,41,21,22,92,110,111,112,113,114,115,116,83,117,118,55,40,119,94,13,120,121,122,71,51,123,99,77,100,124,104,125,126,127,7,128,129,130,131,132,133,8,9]))))}),Rx=x({displayName:"NoAddressLocation",load:()=>t((()=>Dl((async()=>{const{noAddressLocationPages:e}=await import("./4421b714.CxWSGEaV.js");return{noAddressLocationPages:e}}),__vite__mapDeps([134,1,135,56,2,3,4,5,57,6,122,136,130,131,7,8,9,137])).then((({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))))}),Mx=x({displayName:"NoAddressLocationFullDetour",load:()=>t((()=>Dl((async()=>{const{noAddressLocationPages:e}=await import("./4421b714.CxWSGEaV.js");return{noAddressLocationPages:e}}),__vite__mapDeps([134,1,135,56,2,3,4,5,57,6,122,136,130,131,7,8,9,137])).then((({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))))}),Dx=x({displayName:"NotFound",load:()=>Dl((()=>import("./aea3fb03.BGfdKdPP.js").then((e=>e.N))),__vite__mapDeps([58,1,2,3,4,5]))}),Ox=x({displayName:"OffsitePaymentFailed",load:()=>Dl((()=>import("./611e718a.CfTWiRtv.js").then((e=>e.O))),__vite__mapDeps([135,1,56,2,3,4,5,57,6,122,136]))}),zx=x({suspenseName:"one-page",displayName:"OnePage",load:()=>Dl((()=>import("./f8706cb6.DMygWC1h.js").then((e=>e.p))),__vite__mapDeps([138,3,1,4,2,5,115,43,44,45,116,83,41,117,118,55,40,119,91,6,42,46,47,25,26,21,22,92,94,13,120,121,122,71,51,123,99,77,100,124,104,125,126,127,7,128,129,139,32,33,81,79,74,8,140,141,28,29,107,108,142,78,143,84,62,82,144,145,146,105,106,9,112,113,147,148,149,150,93,95,96,97,98,101,151,152,153,154,155,156,157,158,159,130,131,160]
2))}),Bx=x({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>t((()=>Dl((()=>import("./9e3968a8.ymgtlbQP.js")),__vite__mapDeps([161,1,2,3,4,5,110,111,112,113,114,105,99,77,100,106,139,32,33,121,122,83,81,79,116,41,117,118,74,8,140,102,93,94,6,95,96,97,98,101,103,162,163,56,57,71,164,38,39,64,120,62,147,148,58,143,13,165,145,146,104,166,125,126,7,9,167,46,107,28,29,108]))))});class Vx extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class Fx extends Error{constructor(e,t){super(e,t),this.name="CardFieldsLoadError",this.diagnostics=t?.diagnostics}}class Ux extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class qx extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class jx extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class Hx extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class $x extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}
2class Yx extends Error{constructor(e,t){super(e),this.name="CardFieldsFetchFailureError",void 0!==t&&(this.httpStatus=t)}toString(){const e=super.toString();return void 0===this.httpStatus?e:`${e} (HTTP Status: ${this.httpStatus})`}}const Wx=class extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};Wx.hostedFieldsName="CardFieldsError";let Gx=Wx;function Jx({source:e,integrity:n},r=!0){const i=Date.now();function a(){return new Promise(((t,r)=>{if(window.CardFields)return t();const i=document.createElement("script");i.async=!0,i.src=e,i.onload=()=>{if(window.CardFields)return t();setTimeout((()=>{if(!window.CardFields)return r(new Hx);t()}),0)},n&&(i.integrity=n),i.crossOrigin="anonymous",i.onerror=t=>{let n;n=t instanceof Event?new qx(`Event type: ${t.type}. ${Kx(e)}`):new qx("string"==typeof t?`String error: ${t}. ${Kx(e)}`:`unknown error type. ${Kx(e)}`),document.head.removeChild(i),r(n)};try{document.head.appendChild(i)}catch(a){r(new jx("Failed to append child.",{cause:a}))}}))}return(r?t(a):a()).catch((t=>{let r;try{const a="undefined"!=typeof performance&&"function"==typeof performance.getEntriesByName?performance.getEntriesByName(e,"resource"):[],o=a[a.length-1],s="undefined"==typeof navigator?void 0:navigator.connection;r=Object.fromEntries(Object.entries({errorCause:t instanceof Error?t.name.slice(0,128)||"Error":typeof t,underlyingCauseName:t instanceof Error&&t.cause instanceof Error?t.cause.name.slice(0,128)||"Error":void 0,elapsedMs:Date.now()-i,sdkIntegrity:n?.slice(0,512),networkType:s?.type,networkDownlink:s?.downlink,networkRtt:s?.rtt,networkSaveData:s?.saveData,documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,resourceDurationMs:o?.duration,resourceTransferSize:o?.transferSize,resourceStatus:o?.responseStatus||void 0}).filter((([,e])=>void 0!==e)))}catch{r=void 0}throw new Fx(`Failed to load CardFields SDK. ${Kx(e)}`,{cause:t,diagnostics:r})}))}function Kx(e){return`Script src: ${e} . Internet connection boolean: ${"undefined"==typeof navigator?"navigator not available":navigator.onLine}`}function Qx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xx,Zx;const eI=Qx(Zx?Xx:(Zx=1,Xx={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}));function tI(){const{environment:e}=pe(),t=e.services.hostedFields.url;return t===eI.SDK_URL?{source:t,integrity:eI.SDK_INTEGRITY}:{source:t}}const nI=x({suspenseName:"payment",displayName:"Payment",load:()=>t((()=>Dl((()=>import("./74122478.FqQIunJ9.js")),__vite__mapDeps([168,1,141,3,4,2,5,44,28,29,107,108,123,21,22,99,77,100,124,142,8,78,79,143,84,62,82,144,169,9,119,91,43,45,6,42,46,47,25,26,41,92,170,145,146,13,147,148,171,132,133,150,172,105,106,81,113,173,174,175,122,90,110,111,112,114,51,130,131,163,121,56,57,71,164,176,177,178,7])))),usePrefetch(){const e=function(){const e=tI();return()=>{Jx(e)}}();return a((()=>{e()}),[e])}}),rI=x({displayName:"PostPurchase",load:()=>Dl((()=>import("./896e8dde.D1RtPQSa.js")),__vite__mapDeps([179,1,2,3,4,5,122,180,181,44,50,7,6,13,25,26,15,69,60,66,8,9,182]))}),iI=x({displayName:"Processing",load:()=>t((()=>Dl((()=>import("./090b00f0.TldgxRpC.js")),__vite__mapDeps([183,1,56,2,3,4,5,57,122,6,7,8,9,184]))))}),aI=x({suspenseName:"review",displayName:"Review",load:()=>t((()=>Dl((()=>import("./b120ac11.BUngaIRg.js")),__vite__mapDeps([185,1,2,3,4,5,110,111,112,113,114,51,130,131,163,121,122,56,57,81,79,71,164,104,6,7,8,9]))))}),oI=x({suspenseName:"shipping",displayName:"Shipping",load:()=>t((()=>Dl((()=>import("./289b89e4.yHOmILbn.js")),__vite__mapDeps([186,1,125,126,151,21,3,4,2,5,22,123,99,77,100,124,128,152,44,153,95,96,97,154,43,45,42,46,47,155,156,157,158,130,131,6,122,7,8,9]))))}),sI=x({displayName:"ShopPayLoginLoader",load:()=>Dl((()=>import("./9011490c.B3MH6cCJ.js")),__vite__mapDeps([187,1,2,3,4,5,188,130,131,84,145,146,55,117,96,166,125,126,38,39,6,7,8,9,167,122,189]))}),lI=x({displayName:"StockProblems",load:()=>t((()=>Dl((()=>import("./0cd5b134.CMZlizdg.js")),__vite__mapDeps([190,1,135,56,2,3,4,5,57,6,122,136,130,131,191,192,7,8,9]))))}),cI=x({displayName:"StockProblemsModal",load:()=>t((()=>Dl((()=>import("./a9ba8e86.BbmIPmvI.js")),__vite__mapDeps([193,1,2,3,4,5,192,191,122,159,6,7,8,9]))))});function uI(e){return function(t){const{observability:n}=pe();l((()=>{t&&(Ul(t)||ql(t)?n.log("lazy_load_failure",`[LazyLoad] ${e} failed to load`,{component:e,failure:"lazy_load",error:String(t)}):n.error(t,{metadata:{lazyLoad:{component:e,failure:"lazy_load"}}}))}),[t,n])}}
2const dI=uI("ThankYou"),pI=x({suspenseName:"thank-you",displayName:"ThankYou",useError:function(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=pe(),i=Yc(),a=i?.id,o=i?.orderStatusPageUrl,l=t.unstable_getSerialization("sessionToken"),c=s(!1);dI(e),d((()=>{if(!e||c.current)return;function t(e,t,r){t&&(c.current=!0),n.log("thank_you_recovery","[LazyLoad] ThankYou recovery",{outcome:e,waitedMs:r},{exportImmediately:!0,requiresKeepalive:!0}),t&&location.replace(t)}const i=new URLSearchParams(location.search).get("prevent_order_redirect");if(null!==i&&"false"!==i)return void t("prevented");if(o)return void t("redirect",o);if(!a)return void t("not_processed");let s=!1;const u=Date.now();return(async()=>{for(;Date.now()-u<1e4;){if(await U(Qr),s)return;let e;try{const{data:t}=await r.staticQuery(qP,{cache:!1,variables:{receiptId:a,sessionToken:l}});"ProcessedReceipt"===t?.receipt?.__typename&&(e=t.receipt.orderStatusPageUrl)}catch{}if(s)return;if(e)return t("polled",e,Date.now()-u)}t("timed_out")})(),()=>{s=!0}}),[r,e,n,o,a,l])},load:()=>t((()=>Dl((()=>import("./909cc5d6.CMMZ7qo-.js")),__vite__mapDeps([194,1,2,3,4,5,174,35,130,131,104,6,122,98,95,96,97,153,28,29,19,20,41,42,43,44,45,46,47,116,83,117,118,195,9,52,107,108,196,197,198,135,56,57,136,25,26,13,199,200,201,202,152,7,125,126,8,203]))),{maxAttempts:1})}),mI=x({displayName:"Throttle",load:()=>t((()=>Dl((()=>import("./01f1d1bd.CHyJ2c0Z.js")),__vite__mapDeps([204,1,104,2,3,4,5,6,122,61,7,8,9,205]))))});var hI={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 gI({accessibilityVisibility:e,children:t,color:n="base",size:r,id:i,textAlign:a,textWrap:o,translate:s,kerning:l,letterCase:c,fonts:u,decoration:d,type:p="paragraph",tone:m="auto",dir:g,lang:f,lineClamp:y}){const v=null!=y&&Number.isFinite(y)&&y>=1?Math.floor(y):void 0,_=null==v?void 0:S({[hI.lineClampCount]:String(v)}),b=(!0===s?"yes":void 0)??(!1===s?"no":void 0),k="exclusive"===e?hI.accessibilityVisibilityVariant[e]:P(hI.Paragraph,"small"!==p&&r&&hI.sizeVariant[r],m&&hI.toneVariant[m],n&&("auto"===m||"neutral"===m)&&hI.colorVariant[n],a&&"auto"!==a&&hI.textAlignVariant[a],o&&"wrap"!==o&&hI.textWrapVariant[o],l&&hI.kerningVariant[l],c&&hI.letterCaseVariant[c],u&&hI.fontsVariant[u],d&&hI.decorationVariant[d],null!=v&&hI.lineClamp,hI.typeVariant[p],{notranslate:!1===s});return h(sp.Provider,{value:!0,children:h("p",{"aria-hidden":"hidden"===e||void 0,className:k,id:i,translate:b,dir:g,lang:f,style:_,children:t})})}function fI({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:i}){const a=!e&&!t,o=Boolean(n)||Boolean(r);return a||o||i}function yI(e){const t=e?.filter((({quantity:e})=>e>0))??[];return t.length>0&&t.every((({requiresShipping:e})=>!e))}function vI({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const _I=ue("VaultedSectionsContext");function bI(){const e=y(_I);return i((()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1}))}function PI(){const e=bI();return i((()=>e.value.contact&&e.value.delivery&&e.value.payment))}function kI(){const e=bI(),{checkout:t,embed:n,shop:r,source:a}=pe(),{validation:{contactErrors:{emailInputError:o,phoneInputError:l}}}=t,{current:c}=t.identity,{hasViolations:u}=Lv(Va),d=a_(),p=Ah(),m=L(d.main.section),h=L(p.vaulted),g=L(u),f=s(!1);return i((()=>{const i=Fa(m.value),s=Fa(h.value),{contact:u,delivery:d,payment:p}=e.value,y=Ua({isContactVaulted:u,configuration:t.configuration,identity:t.identity,embed:n,shop:r}),v=(()=>
2{if("sdkCartHints"!==c.value)return f.current=!1,y;if(!y)return f.current=!1,!1;const e=t.proposal.negotiated.fields.merchandiseLines.value?.lines;return vI({isFlagshipPartner:n?.isFlagshipPartner??!1,hasError:fI({email:t.proposal.proposed.email.value,phone:t.proposal.proposed.phone.value,emailInputError:o.value,phoneInputError:l.value,hasViolations:g.value}),hasOnlyDigitalItems:yI(e)})?f.current:(f.current=!0,!0)})(),_=!Vr(a)&&qa({checkout:t}),b=d&&t.isShippingRequired.value;return!!(v||b||p||_)&&(i||s)}))}function SI(){const{embed:e,shop:t,checkout:n,router:r,i18n:i}=pe(),a=e?.interstitialPartnerDisplayName,{plan:o}=Fc().value,s=r.currentUrl.value.normalizedPath,l=Ji({embedder:e?.embedder,shop:t}),c=bI(),{delegatedPaymentInstrument:p}=tt(),m=f(!1);d((()=>{m.value=Boolean(p.peek())}),[p,m]);const[g]=u((()=>{const e=n.proposal.proposed;return{contact:Boolean(e.email.peek()||e.phone.peek()),delivery:(t=e.shippingAddress.peek(),Object.entries(t).some((([e,t])=>"countryCode"!==e&&"zoneCode"!==e&&Yy(e)&&null!=t&&("string"!=typeof t||t.trim().length>0))))};var t}));if(!function(e,t){return!!e.greenPath.some((({route:e})=>e===t))||e.detours.some((({type:e,route:n})=>("stockProblems"===e||"noAddressLocation"===e)&&n===t))}(o,s))return null;if(!l)return null;if("sdkCartHints"!==n.identity.current.value)return null;if(!a)return null;const y=c.value.contact&&g.contact,v=c.value.delivery&&g.delivery,_=c.value.payment&&m.value;return y||v||_?h(Dh,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[h(Uh,{type:"info"}),h(gI,{textWrap:"pretty",children:i.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:a})})]}):null}const wI=x({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>Dl((()=>import("./28ac86c0.TMlNB_Hy.js").then((e=>e.A))),__vite__mapDeps([16,1,2,3,4,5,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,15,35,36,37,7,38,39,40,41,42,43,44,45,46,47,48]))});function CI(){const e=mE("purchase.thank-you.announcement.render");return o((()=>{const t=Oa(e,"uiExtension");return t.length>0?[t[0]]:[]}),[e])}const EI=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,xI=/Version\/(\d+)[\d.]*.*Safari/,II=/Chrome\/|Edg(?:e|iOS|A)?\//,AI=/FBAN|FB_IAB|FBAV|Instagram/;function TI(){return AI.test(navigator.userAgent)}const NI=0,LI=1,RI=2,MI=4,DI=5,OI=new Map([["legacy",0],["block",1],["inline",2],["grid",3],["list",4],["grid-compact",5]]);function zI(e,t){return OI.get(e)===t}function BI(e){const t=OI.get(e);return 3===t||5===t}function VI(e){return"string"==typeof e&&OI.has(e)}const FI=_(null);function UI(){return y(FI)}FI.displayName="ChoiceListContext";const qI=_(null);function jI(){return y(qI)||{}}function HI(){return jI().redesigned??!1}qI.displayName="ChoiceListStyleContext";const $I=_(void 0);function YI(e){return zI(e,1)||zI(e,5)}function WI(e){const t=y(Td)?.redesignedChoiceLists??!1,n=y($I);return t&&"base"!==n&&YI(e)?"redesigned":"base"}$I.displayName="ChoiceListPresentationOverrideContext";var GI={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 JI=xu("Modal");function KI(e){const t=Iu(e.id,JI),n=Pd("modal");if(n){const{active:r,setActive:i}=n;
2n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",(()=>{i(!0)}));const a=()=>{i(!1),"function"==typeof e.onHide&&e.onHide()},{children:o}=e;return h(XI,{...e,id:t,onHide:a,open:r,children:LC(o)&&h(pd,{children:o})})}return h(XI,{...e,id:t})}const QI={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960},XI=wm(gm((function({blocking:e,size:t="base",blockSize:n,open:r=!1,heading:i,source:o,iframeRef:c,onIframeLoad:d,iframeId:p,allow:m,accessibilityLabel:g,padding:f="base",primaryAction:v,secondaryActions:_,actionLayout:k="inline",footer:S,children:w,id:C,onAfterShow:E,onShow:x,closeButton:I="visible",dataTestIdForScrollableContent:A,...T}){const N=s(null),L=s(null),R=s(!1),M=y(vd)?.openModalCount;l((()=>{if(r&&M)return M.value+=1,()=>{M.value=Math.max(0,M.value-1)}}),[r,M]),r&&L.current!==r&&"function"==typeof x&&x(),L.current=r;const{modal:{margin:D}}=Ah(),O=null!=D&&"none"!==D,z="hidden"===I,{onHide:B,onAfterHide:V}=e?{}:T,[F,U]=u(),q=!n&&function(e){if(!e||"undefined"==typeof window)return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}(o),j=n??(q||-1===F||"max"===t?"100%":void 0),H=function(e){return e.endsWith("px")}(t)?t:`${QI[t]}px`,{className:$,style:Y,styleElement:W}=Ch({blockSize:j,maxInlineSize:`@media (inline-size >= extraSmall) ${H}, none`}),G=up(r,"slow"),[J,K]=u("");l((()=>{K(GI.transitionVariant[G])}),[G]);const{isLocked:Q,lock:X,unlock:Z}=By();l((()=>{r&&!Q&&X(),!r&&Q&&Z()}),[Q,X,r,Z]),l((()=>{if("exited"===G&&(U(void 0),R.current&&("function"==typeof V&&V(),R.current=!1)),"entered"===G){if(C&&function(){const e=navigator.userAgent;if(II.test(e))return!1;const t=e.match(xI);return!!t&&26===parseInt(t[1],10)}()){const e=document.getElementById(C),t=document.activeElement,n=t instanceof HTMLElement&&!0===e?.contains(t)&&t.matches('input, textarea, select, [contenteditable="true"]');e&&!n&&e.focus()}"function"==typeof E&&E()}}),[G,E,V,C]),l((()=>{r||(R.current=!0)}),[r]),l((()=>{const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||e||!r||!N.current?.contains(document.activeElement)&&document.getElementById(Au)?.contains(document.activeElement)||"function"==typeof B&&B()};return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}),[e,r,B]);const ee=a((e=>{if(!n&&!q){const t=e.target;if(t?.contentWindow)try{U(t.contentWindow.document.body.scrollHeight)}catch{U(-1)}}d?.()}),[n,d,q]),te=a((e=>{e.target===e.currentTarget&&"function"==typeof B&&B()}),[B]);if("exited"===G)return null;const ne=i&&!g?Cm(C):void 0,re=Boolean(v||_),ie=function(){const e=navigator.userAgent.match(EI);return!!e&&"26"===e[1]}();return h(Bu,{children:h($I.Provider,{value:void 0,children:[W,h("div",{ref:N,className:P(GI.Overlay,J,GI.overlayPaddingVariant[n?"none":"base"],ie&&GI.overlayMobileSafari26),onMouseDown:te,children:h(Dy,{children:h("div",{id:C,className:P(GI.Modal,GI.modalTopRadiusVariant["100%"===dm(n)?"square":"rounded"],GI.modalMobileMarginVariant[O?"base":"none"],J,$,j&&GI.hasBlockSize),role:"dialog","aria-modal":!0,style:Y,"aria-label":g,"aria-labelledby":ne,children:[o?h(b,{children:h(td,{level:2,children:[h(ZI,{id:C,hideCloseButton:z||e,onHide:B,heading:i}),h(rA,{source:o,iframeRef:c,iframeId:p,allow:m,accessibilityLabel:g,heading:i,iframeHeight:F,blockSize:n,handleIFrameLoad:ee,padding:f})]})}):h("div",{className:P(GI.ScrollBox,r&&GI.ModalContentCrossFadeTarget,GI.scrollBoxPaddingVariant["base"===f?i?"gap":"blockStart":"none"],GI.scrollBoxActionsVariant[re||S?"withActions":"noActions"]),"data-testid":A,children:[h(td,{level:2,children:[h(ZI,{id:C,hideCloseButton:z||e,onHide:B,padding:f,heading:i}),h(nA,{padding:f,children:w})]}),re&&h("div",{className:GI.ActionsScrollShadow})]}),S&&h("div",{className:GI.Footer,children:h(ap.Provider,{value:!1,children:h(pd,{children:S})})}),re&&h(eA,{primaryAction:v,secondaryActions:_,actionLayout:k})]})})}),ie&&h(b,{children:[h("div",{className:P(GI.MobileSafari26BarTop,J)}),h("div",{className:P(GI.MobileSafari26BarBottom,J)})]})]})})}),{overlayType:"modal"}));function ZI({hideCloseButton:e,id:t,onHide:n,padding:r,heading:i}){const a="string"==typeof i?h(Ww,{level:1,children:i}):i;return!a&&e?null:h("div",{className:P(GI.Header,GI.headerPaddingVariant[a?"base":"base"===r?"large":"extraLarge"]),children:[a&&h("div",{id:Cm(t),className:P(GI.HeaderContent,GI.headerContentPaddingVariant[e?"none":"base"]),children:a}),!e&&h(tA,{onHide:n})]})}function eA({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return h(pd,{children:h("div",{className:P(GI.Actions,GI.actionLayoutVariant[n]),children:[("inline"===n||LC(t))&&h("div",{className:P(GI.SecondaryActions,GI.secondaryActionLayoutVariant[n]),children:t}),e]})})}function tA({onHide:e}){const t=Rd();return h("button",{type:"button",className:GI.CloseButton,onClick:()=>{"function"==typeof e&&e()},"aria-label":t("closeModal")||"Close",children:h(Uh,{type:"x",size:"base"})})}function nA({children:e,padding:t="base"}){return LC(e)&&h("div",{className:P(GI.Content,GI.contentPaddingVariant[t]),children:h(ap.Provider,{value:!1,children:h(iE,{children:e})})})}function rA({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:i,heading:a,iframeHeight:o,handleIFrameLoad:s,padding:l="base"}){const c=r;return h("iframe",{src:e,title:i??("string"==typeof a?a:void 0),name:n,className:P(GI.IFrame,GI.iframePaddingVariant[l]),ref:t,onLoad:s,id:n,...o&&o>0&&{style:{height:o}},...c?{allow:c}:void 0})}function iA({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:i,handleSubmit:a,handleCancel:o}){const s=Boolean(n),l=Boolean(t);return h(Dh,{gridTemplateColumns:s&&l?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[s&&h(xy,{variant:"secondary",inlineSize:"fill",onClick:o,children:n}),l&&h(xy,{variant:"primary",inlineSize:"fill",disabled:i,loading:r,type:"submit",tone:e,onClick:a,children:t})]})}const aA=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];var oA=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(oA||{});const sA=ue("DeliveryMethodsContext"),lA=_(void 0);function cA(){return de(sA)}function uA(){return y(lA)}function dA(e){const t=y(sA),n=aA.includes(e);return i((()=>n&&(t?.initialReconciliationPending.value??!1)))}function pA(e){return e/Ha}function mA(){const{i18n:e}=pe();return a((t=>{if("number"==typeof t){const n=Math.ceil(pA(t));return n<1?null:e.translate("shipping.estimated_delivery_date",{count:n})}const{lower:n,upper:r}=t;if(void 0===n||void 0===r)return null;const i=Math.ceil(pA(n)),a=Math.ceil(pA(r));return a<1?null:i<1||i>a?e.translate("shipping.estimated_delivery_date",{count:a}):e.translate("shipping.estimated_delivery_date_range",{minimum:i,maximum:a})}),[e])}function hA(){const e=ke().deliveryNext,t=Ye();return i((()=>{const n=e.value;return!(!n||"unavailable"===n.status||t.value.enabledDeliveryMethods.length>1)&&n.lines.every((e=>"not_required"===e.status||"available"===e.status&&e.methods.length<2))}))}function gA(){const{deliveryNext:e,allViolations:t}=ke(),n=xn("deliveryNext");return i((()=>{const r=e.value,i=n.value,a=t.value;if(i)return{value:null,loading:i};const o=a?.some((({code:e})=>$a.has(e)));return{value:"unavailable"===r?.status&&(r.hasNoDeliveryMethods||o||!1),loading:!1}}))}function fA(){const{allViolations:e}=ke(),t=xn("deliveryNext");return i((()=>{const n=t.value;return n?{value:null,loading:n}:{value:e.value?.some((({code:e})=>Ya.has(e)))??!1,loading:!1}}))}function yA(){const{deliveryLines:e}=Ge();return i((()=>{const t=e.value;return t.length>0&&t.every((e=>{const t=e.value?.deliveryMethodTypes;return 1===t?.length&&"PICK_UP"===t[0]}))}))}function vA(e){return(e??[]).filter((e=>e.requiresShipping)).reduce(((e,t)=>e+(t.quantity??0)),0)}function _A(){const e=ja();return i((()=>{const t=e.value;if(!t)return{};const n={};for(const e of t){if("available"!==e.status)continue;const t=zt(e);if(!t)continue;const{methodType:r}=t,i=vA(e.targetMerchandiseLines);n[r]=(n[r]??0)+i}return n}))}function bA(){const{checkout:e,i18n:t}=pe(),n=cA(),r=e.crossBorderConfirmState.value,i=Boolean(r&&!r.onCancel),a=Kh(),o=r?()=>{r.onConfirm(n),a(t.translate("split_delivery.cross_border.banner"))}:void 0;return h(KI,{id:"cross-border-consolidation-modal",open:Boolean(r),heading:i?t.translate("split_delivery.cross_border.modal.country_changed_heading"):t.translate("split_delivery.cross_border.modal.heading"),onHide:r?.onCancel,closeButton:i?"hidden":"visible",primaryAction:h(iA,{handleSubmit:o,handleCancel:r?.onCancel,submitText:i?t.translate("general.continue_button_label"):t.translate("split_delivery.cross_border.modal.change_country"),cancelText:i?void 0:t.translate("address_management.address_form.cancel")}),children:h(Sy,{children:t.translate("split_delivery.cross_border.modal.content")})})}function PA(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 kA(e){let t=!1,n=!1;for(const r of e){const e=r.includes("SHIPPING");for(const i of r)if("NONE"!==i)if("SHIPPING"!==i)if("PICK_UP"!==i){if("LOCAL"!==i||!e)return!1}else n=!0;else t=!0}return t&&n}function SA(e){return(e.value.targetMerchandiseLines??[]).some((e=>e.requiresShipping))}function wA(){const{deliveryNext:e}=ke(),t=Ge(),{shop:n}=pe(),r=Fc();return i((()=>function({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}
2){if(!r)return!1;const i=kA(Je(e).filter((e=>"available"===e.status)).map((e=>e.methods.map((({methodType:e})=>e)))));return t?i:!!Boolean(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)&&function(e){const t=e.filter(SA);return kA(e.map((e=>e.value.deliveryMethodTypes)))&&t.some((e=>e.value.deliveryMethodTypes.includes("SHIPPING")))&&t.some((e=>e.value.deliveryMethodTypes.includes("PICK_UP")))}(n)}({deliveryNext:e.value,isThankYouPage:Zv(r.value.currentDetour),proposedDeliveryLines:t.deliveryLines.value,splitShipPickupUiEnabled:n.shipPickupInOneOrderEnabled})))}function CA(e){const t=s(e);return l((()=>{t.current=e}),[e]),t}function EA(){return(()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n},source:r}=pe(),i="shopPay"===n.current.value,a=ke().buyerIdentity.value?.customerProfile,{negotiating:o,methods:s}=cA(),c=Wa();l((()=>{!o.value&&s.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:r.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(he(t),10),numberLocationsFound:c.value?.methods.length,userId:a?.id?parseInt(he(a.id),10):void 0,checkoutSurface:i?"shop_pay":"guest_checkout"}})}),[a?.id,o.value,i,c.value?.methods.length,e,s.value,r.checkoutSessionIdentifier,t])})(),(()=>{const e=s(),{userEvents:t,shop:{id:n},checkout:{identity:r},source:i}=pe(),a="shopPay"===r.current.value,o=ke().buyerIdentity.value?.customerProfile,c=Wa(),u=c.value?.selectedDeliveryMethodHandle,d=c.value?.methods;l((()=>{const{locationId:r,selectedLocationRank:s}=((e,t)=>{const n=t=>t.handle===e,r=t?.findIndex(n),i=t?.find(n)?.originLocation?.id;return{locationId:i,selectedLocationRank:r}})(u,d);r&&u!==e.current&&(e.current=u,t.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:i.checkoutSessionIdentifier||"",shopId:parseInt(he(n),10),locationId:he(r),selectedLocationRank:s,userId:o?.id?parseInt(he(o.id),10):void 0,numberLocationsFound:d?.length||0,checkoutSurface:a?"shop_pay":"guest_checkout"}}))}),[o?.id,a,d,t,u,i.checkoutSessionIdentifier,n])})(),(()=>{const e=Pf(),t=wA(),n=Fc(),r=i((()=>t.value&&!Zv(n.value.currentDetour)));C((()=>{r.value&&c((()=>{e("splitShipAndPickupIntent",{timestamp:new Date})}))}))})(),null}function xA(e,t){const n=e.find(Ja),r=t.find(Ja);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}const IA=["phone","company","address2"];function AA(){const{locationAddress:e,shippingAddress:t}=Ge(),{checkout:n,shop:r}=pe(),i=r.hasFlagEnabled(Ka),o=s(e.peek()),l=s(!1);return{syncLocationAddressFromShipping:a(((r,a)=>{if(i)return;if("entering"!==xA(r,a).direction)return;if(l.current)return;const s=o.current;if(s&&!function(e,t){return e?.countryCode===t.countryCode&&e?.zoneCode===t.zoneCode&&e?.postalCode===t.postalCode&&e?.city===t.city&&e?.coordinates?.latitude===t.coordinates?.latitude&&e?.coordinates?.longitude===t.coordinates?.longitude}(e.value,s))return void(l.current=!0);const c=t.value;if(!c?.countryCode)return;const{isRequired:u}=n.configuration.addressSettings.nonBillingAddressSettings.value,d=function(e){if(e.coordinates)return!0;const{address1:t,city:n,firstName:r,lastName:i}=e;return!!(t&&n&&r&&i)&&IA.every((t=>e[t]||!(e=>u(e,{countryCode:c.countryCode,useMerchantSettings:!0}))(t)))}(c)?c:{};e.value=Qa(d,c.countryCode,c.zoneCode),o.current=e.value}),[n,i,e,t])}}function TA(e){const t=e.filter((e=>"SHIPPING"===e||"LOCAL"===e));return t.length>0?t:1===e.length&&"PICK_UP"===e[0]?["PICK_UP"]:1===e.length&&"PICKUP_POINT"===e[0]?["PICKUP_POINT"]:void 0}function NA({children:e}){const t=s(void 0),{i18n:n,checkout:r,observability:u,shop:d,router:p,webMcp:m}=pe(),g=d.hasFlagEnabled(Xa),y=f(!1),v=f(!1),_=ig(),{negotiate:b}=Uc(),{loading:P}=Pe(),k="shopPay"===r.identity.current.value,S=Ye(),w=s(new Set),E=s(),{correctShippingAddress:x}=function(){const{shippingAddress:e}=Ge(),{shopPay:t,checkout:n}=pe(),r=ke(),i=Ga(),o="shopPay"===n.identity.current.value,s=a((()=>{if(!i.value||r.mustSelectProvidedAddress.value)return;const a=t.session.selectedShippingAddress.value;if(!a?.address)return;const o=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),s=t.user.phoneNumber.value;e.value={...a?.address,phone:o&&!a?.address.phone?s:a?.address.phone}}),[i,n.configuration.addressSettings.nonBillingAddressSettings,r.mustSelectProvidedAddress,e,t.user.phoneNumber,t.session.selectedShippingAddress]);return{correctShippingAddress:a((e=>{o&&e.includes("SHIPPING")&&s()}),[s,o])}}(),{syncLocationAddressFromShipping:I}=AA(),{preservePickupSelectionAcrossToggles:T}=function(){const{deliveryLines:e}=Ge(),t=s({}),n=a(((n,r)=>{const i=xA(n,r);if("leaving"!==i.direction)return"entering"===i.direction?t.current[i.pickupType]:void 0;t.current[i.pickupType]=function(e){return e.reduce(((e,t)=>{const{type:n,deliveryMethodTypes:r,deliveryMethodHandle:i}=t.value;return r.some(Ja)?{...e,[n]:i}:e}),{})}(e.value)}),[e]);return{preservePickupSelectionAcrossToggles:n}}(),{billingAddressOption:R,deliveryLines:M,discountLines:D,merchandiseLines:O,shippingAddress:z,locationAddress:B}=Ge(),V=wA(),{deliveryNext:F,shippingAddress:U}=ke(),q=F.peek(),j=f(Za(z.peek())||Za(U.peek())||null!=q&&"unavailable"!==q.status),H=cP();C((()=>{(Za(U.value)||"filled"===F.value?.status||"partial"===F.value?.status)&&(j.value=!0)}));const $=p.currentUrlMatches("/stock-problems"),[Y]=gg("ONE_TIME_PURCHASE"),W=L(Y),[G,J]=bg(),K=function(){const{parts:e}=me();return a((t=>{e.deliveryLines.value.forEach((e=>{e.value={...e.value,deliveryMethodHandle:t}}))}),[e.deliveryLines])}(),Q=!g,X=L(G),Z=i((()=>_t(F.value)||eo(M.value)||V.value)),ee=i((()=>Z.value?X.value:W.value)),te=o((()=>
2{if(Z.peek())return;if(1!==(e=S.peek().enabledDeliveryMethods??[]).length||"PICK_UP"!==e[0])return;var e;const[t]=ee.peek();return"PICK_UP"!==t?{activeMethod:t,targetMethod:"PICK_UP"}:void 0}),[Z,ee,S]),ne=f(null!=te),re=i((()=>{if(r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return ee.value;if(!Z.value){const e=LA(S.value.enabledDeliveryMethods??[]),t="unavailable"===F.value?.status&&!j.value,[n]=ee.value;return te&&ne.value&&!v.value?[te.targetMethod]:t&&!v.value&&e&&"PICKUP_POINT"!==n?["SHIPPING"]:n?["LOCAL"===n?"SHIPPING":n]:[]}const e=ee.value.filter((e=>"LOCAL"!==e));return!e.includes("SHIPPING")&&ee.value.includes("LOCAL")&&e.push("SHIPPING"),e})),ie=a(((e,n)=>{if(H.value)return;const r=LA(e),i=LA(n);n.some(Ja)&&!i&&(!k&&r&&null==t.current&&(t.current=R.value),R.value="custom"),!i||r||k||(d.requireMatchingShippingAndBilling?R.value="shipping":null==t.current?R.value=d.sameBillingAndShippingAddress?"shipping":"custom":R.value=t.current,t.current=void 0)}),[d,k,H,R]),ae=s(re.peek());C((()=>{const e=ae.current,t=re.value;ae.current=t,e!==t&&c((()=>ie(e,t)))}));const oe=a(((e,t,n)=>{ie(t,e),ae.current=e,x(e),n?B.value=n:I(t,e);const r=n?void 0:T(t,e),i=TA(e);N((()=>{d.shipPickupInOneOrderEnabled&&to(M),J(e),d.shipPickupInOneOrderEnabled&&i&&no({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:i}),K(void 0),r&&pg(M,r),ro(D),ne.value=!1}))}),[ie,x,B,I,T,d.shipPickupInOneOrderEnabled,M,J,O,K,D,ne]),se=a(((e,t=re.value,n)=>{const r=k||H.value||t.includes("SHIPPING")||!e.includes("SHIPPING")?["deliveryNext"]:[];return oe(e,t),y.value=!0,_?.dispatch?.("deliveryMethodChanged"),b({include:r,onComplete:e=>{const t=P.value.has("deliveryNext");if("stale"===e.status&&t){const e=P.subscribe((t=>{t.has("deliveryNext")||(N((()=>{y.value=!1,n?.()})),e())}))}else N((()=>{y.value=!1,n?.()}))}})}),[re,k,H,oe,y,_,b,P]),le=i((()=>r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1)),ce=i((()=>fa({checkout:r}))),ue=i((()=>PA(S.value.enabledDeliveryMethods??[],ce.value)));l((()=>m?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>ue.value,getSelectedMethodTypes:()=>re.value,markBuyerSelection:()=>{v.value=!0,ne.value=!1},applyMethodChange:oe,reconcileSameMethod(e){const t=TA(e);d.shipPickupInOneOrderEnabled&&t&&no({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:t})&&ro(D)}})),[m,ue,re,v,ne,oe,M,O,d.shipPickupInOneOrderEnabled,D]);const de=i((()=>{const e=RA(ue.value,n,d,Q);return le.value?e.filter((e=>re.value.includes(e.id))):e})),he=i((()=>{if(le.value)return de.value;const e=w.current,t=PA([...S.value.enabledDeliveryMethods??[],...e],ce.value),r=t.length>ue.value.length?RA(t,n,d,Q):de.value;return r.length>1&&r.forEach((t=>e.add(t.id))),r})),ge=o((()=>function({isStockProblems:e,shippingRequired:t,deliveryMethodOptions:n,mustSelectProvidedShippingRate:r,isSplitShipAndPickup:i,initialPickupOnlySelection:a,deliveryNext:o,currentSelectedMethods:s}){if(e)return;if(!t)return;const[l]=n;if(l&&!r&&!i){if(a?.activeMethod){const{activeMethod:e,targetMethod:t}=a;return{nextMethods:[t],previousMethods:["LOCAL"===e?"SHIPPING":e],loadingFields:aA}}if("filled"!==o?.status)return{nextMethods:[...n.find((e=>JSON.stringify(e)===JSON.stringify(s)))??l],loadingFields:aA}}}({isStockProblems:$,shippingRequired:io(r.proposal),deliveryMethodOptions:he.value.map((({value:e})=>e)),mustSelectProvidedShippingRate:le.value,isSplitShipAndPickup:V.value,initialPickupOnlySelection:te,deliveryNext:F.value,currentSelectedMethods:re.value})),[]),fe=f(null!=ge);C((()=>{const e=de.value,t=he.value;if(e===t||t.length<=1)return void(E.current=void 0);const n=JSON.stringify([t.map((({id:e})=>e)),e.map((({id:e})=>e))]);E.current!==n&&(E.current=n,u.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:t.length,currentOptionCount:e.length}))})),l((()=>{ge&&!v.value?se(ge.nextMethods,ge.previousMethods,(()=>{fe.value=!1}))?.catch((e=>{N((()=>{y.value=!1,fe.value=!1})),u.error(e)})):fe.value=!1}),[]);const ye=CA(a((e=>{const t=he.value.find((t=>t.id===e[0]));t&&(v.value=!0,se(t.value))}),[he,se,v])),ve=i((()=>he.value.length<=1)),_e=i((()=>
2{if(!ve.value)return{options:he,selected:re,select:e=>{ye.current(e)},variant:Q?"next":"default"}})),be=o((()=>({negotiating:y,initialReconciliationPending:fe,methods:re,setSelectedMethodTypes:se})),[y,fe,re,se]);return h(sA.Provider,{value:be,children:[h(EA,{}),h(A,{when:V,children:h(bA,{})}),h(lA.Provider,{value:_e.value,children:e})]})}function LA(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function RA(e,t,n,r){const i=[],a="object"==typeof n.translations.delivery_options?n.translations.delivery_options:void 0,o=e.some((([e])=>"PICKUP_POINT"===e)),s=e.find((([e])=>"SHIPPING"===e));if(s){const e=Boolean(a?.ship_to_address),n=!o||r&&!e?t.translate("delivery_options.ship"):t.translate("delivery_options.ship_to_address");i.push({id:"SHIPPING",value:s,label:n,icon:r?oA.PackageDelivery:oA.Truck})}const l=e.find((([e])=>"PICK_UP"===e));if(l){const e=Boolean(a?.pick_up),n=Boolean(a?.pick_up_from_store),s=o?n:e,c=o?t.translate("delivery_options.pick_up_from_store"):t.translate("delivery_options.pick_up"),u=o?t.translate("delivery_options.pickup_store"):t.translate("delivery_options.pickup");i.push({id:"PICK_UP",value:l,label:r&&!s?u:c,icon:r&&!o?oA.Location:oA.Store})}const c=e.find((([e])=>"PICKUP_POINT"===e));if(c){const e=Boolean(a?.pickup_point_method_definition),n=r&&!e?t.translate("delivery_options.pickup_point"):t.translate("delivery_options.pickup_point_method_definition");i.push({id:"PICKUP_POINT",value:c,label:n,icon:oA.Location})}return i}function MA(){const{i18n:e}=pe();return a(((t,n={})=>{const r=new Date(t),i=new Date(Date.now()).getFullYear(),a=n.month??"long",o=r.getFullYear()>i?"numeric":void 0;return e.formatDate(r,{month:a,day:"numeric",year:o})}),[e])}function DA(){const{shop:{captureAtFulfillmentEnabled:e}}=pe(),t=ke(),n=t.buyerIdentity,r=t.paymentFlexibilityPaymentTermsTemplate;return i((()=>"FULFILLMENT"===r.value?.type&&!0===e&&!n.value?.purchasingCompany))}const OA=e=>"target"in e&&"$.availableRedeemables.redeemable"===e.target;function zA(e,t){if(!e||!t)return!1;if(e.redemptionSource!==t.redemptionSource)return!1;if("CUSTOM"===e.redemptionSource)return function(e,t){return!(!e||!t)&&(e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&function(e,t){return!(!e||!t)&&(e.length===t.length&&e.every((e=>t.some((t=>e.key===t.key&&e.value===t.value)))))}(e?.redemptionAttributes,t?.redemptionAttributes))}(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function BA(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function VA(e){return e?`•••• ${e}`:""}class FA extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function UA(){const e=function(){const e=ke().paymentMethods;return i((()=>{const t=e.value?.flatMap((e=>"redeemable"===e.type&&"CUSTOM"===e.redemptionSource?[e]:[]));if(void 0!==t&&0!==t.length){if(t.length>1)throw new FA("There can only be a single custom redeemable payment method per redeemable type.\nGift card is currently the only supported redeemable type");return t[0]}}))}(),[t,n]=u([]),r=ao("CUSTOM"),s=o((()=>r.value.filter((e=>{const n=t.some((t=>zA(t,e.method))),r=!e.cost||0===e.cost.amount;return!n&&!r&&Boolean(e.method.redemptionContent)}))),[r.value,t]),l=me(),{negotiate:c}=Uc(),d=Boolean(e.value),p=a((e=>{const t=t=>"redeemable"!==t.type||"CUSTOM"!==t.redemptionSource||!zA(e,t),n=l.parts.paymentLines.value;l.parts.paymentLines.value=n.filter((e=>t(e.method)));const r=l.parts.availableRedeemables.value;l.parts.availableRedeemables.value=r?.filter((e=>t(e.paymentMethod)))}),[l]),m=a(((e,t)=>{const n=function(e,t){if(!t)return null;if(t.amount<=0)return null;return{method:e.paymentMethod,cost:{amount:HA,currencyCode:t.currencyCode}}}(e,t);if(n){const e=l.parts.paymentLines.value;return l.parts.paymentLines.value=[...e,...n?[n]:[]],new Promise((e=>{c({include:["paymentLines"],onComplete:t=>{"error"===t.status&&t.violations.some(ir)&&p(n.method),e(t)}})}))}return Promise.resolve(null)}),[c,l,p]),h=a((e=>{const t=l.parts.paymentLines.value.length;return p(e),n((t=>[...t,e])),t>l.parts.paymentLines.value.length?new Promise((t=>{c({include:["paymentLines"],onComplete:r=>{n((t=>t.filter((t=>!zA(t,e))))),t(r)}})})):Promise.resolve()}),[c,l,p]),g=a((()=>{const e=l.parts.paymentLines.value,t=e.length;return l.parts.paymentLines.value=e.filter((e=>{const{method:t}=e;return!("redeemable"===t.type&&"CUSTOM"===t.redemptionSource)})),t>l.parts.paymentLines.value.length?new Promise((e=>{c({include:["paymentLines"],onComplete:t=>{e(t)}})})):Promise.resolve()}),[c,l]);return{canApplyGiftCards:d,paymentMethod:e.value,paymentLines:s,submit:m,remove:h,removeAll:g}}function qA(){const e=ke().paymentLines;return i((()=>e.value?.lines.filter((e=>"giftCard"===e.method.type))??[]))}function jA(){const e=ao("STORE_CREDIT"),{paymentLines:t}=UA(),n=qA();return i((()=>
2{const r=Boolean(e.value.length),i=Boolean(t.length),a=Boolean(n.value.length);return r||i||a}))}const HA=0;function $A(){const e=oo(),t=Fc(),n=vt(),r=ke(),a=DA(),o=MA(),s=jA(),{shop:l,checkout:c,embed:u,i18n:d,source:p,shopPay:m}=pe(),{orderSummary:h}=a_(),g=l?.name,f=h.totalLabel,y=si(u?.embedder),v=so(m.app.config);return i((()=>{const{currentPage:i,plan:l,currentDetour:u}=t.value,m=r.deferredTotal.value,h=r.paymentFlexibilityPaymentTermsTemplate.value,_="COMPACT"===c.configuration.orderSummary?.layoutStyle;let b;b="TOTAL"===f?d.translate("order_summary.total_label"):y?d.translate("universal.iframes.subtotal_label"):"ORDER_TOTAL"===f?d.translate("order_summary.order_total_label"):_&&g&&!v?d.translate("order_summary.pay_merchant_label",{merchant_name:g}):d.translate("order_summary.total_label");const P=y?b:d.translate("order_summary.total_due_label"),k="thankYou"===u?.type,S=m&&m.amount.amount>0;if(e.value&&k)return d.translate("order_summary.deferred_payment_info.paid_today_next");if(Vr(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(S)return d.translate("order_summary.payment_terms_totals.due_today_next");if(h){if(a.value)return s.value?P:b;if(h?.dueDate){const e=o(h.dueDate,{month:"short"});return d.translate("order_summary.deferred_total_due_date_label_next",{date:e})}return"FULFILLMENT"===h?.type?d.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):"RECEIPT"===h?.type?d.translate("order_summary.total_due_later_label"):d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return k?s.value?d.translate("order_summary.total_paid_label"):d.translate("order_summary.partial_total_label"):yP(i,l.greenPath[l.greenPath.length-1])?s.value?P:b:s.value?P:d.translate("order_summary.partial_total_label")}))}function YA({children:e,id:t,title:n}){return h("abbr",{className:"_1qifbzv1 _1qifbzv0 _1fragem128",id:t,title:n,children:e})}function WA(){const e=lo(),t=co(),n=ke(),r=uo(),a=n.deferredTotal,{i18n:o}=pe(),s=L(o_()),l=jA(),c=L(a_()),u=Vt(),d=i((()=>{const n=r.value,i=e.value;if(!n||!i)return;const d=o.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),p=n.amount<i.amount&&!t.value&&!a.value&&!l.value;return{amountDue:n,paymentDueFormatted:d,priceBeforeReductionsFormatted:o.formatCurrency(i.amount,{currency:i.currencyCode,form:"short"}),showCurrencyCode:"base"===c.value.disclosure.style&&s.value&&(!u.value||!d.includes(n.currencyCode)),showSubtotalBeforeReductions:p,totalAmountDueAccessiblityLabel:p?o.translate("order_summary.price_after_discount_aria_text"):o.translate("order_summary.total_price_label")}}));return h(A,{when:d,children:({amountDue:e,paymentDueFormatted:t,priceBeforeReductionsFormatted:n,showCurrencyCode:r,showSubtotalBeforeReductions:i,totalAmountDueAccessiblityLabel:a})=>h(Ry,{alignItems:"end",children:[i?h(b,{children:[h(Sy,{accessibilityVisibility:"exclusive",children:o.translate("order_summary.total_price_label")}),h(Sy,{size:"small",color:"subdued",type:"redundant",translate:!1,children:n})]}):null,h(Sy,{accessibilityVisibility:"exclusive",children:a}),h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:[r&&h(YA,{children:h(Sy,{type:"small",color:"subdued",translate:!1,children:e.currencyCode})}),h(gI,{color:"base",size:"large",translate:!1,children:h(Sy,{type:"strong",children:t})})]})]})})}const GA={"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 JA({variant:e="fan",merchandise:t,size:n,max:r=2,useImageAltTexts:i=!0,useTitleAsAltTextFallback:a=!1,useResponsiveImageSources:o=!1,sortByPrice:s=!1,showQuantityBadges:l=!0}){const c="inline-discrete"===e,u=c&&t.length>r?t.length-r+1:0,d=(s?[...t].sort(((e,t)=>KA(t)-KA(e))):t).slice(0,r),p=YC(n);return h("div",{className:GA[`StackedThumbnails-${e}
2`],style:{"--total":d.length,"--thumbnail-inline-size":Ae(p.inlineSize)},children:d.map(((t,r)=>{const s=a&&"title"in t?t.title:"",p=u>0&&r===d.length-1,m=l&&c&&!p&&t.quantity>1?t.quantity:void 0;return h("div",{className:GA[`StackedThumbnail-${e}`],style:{"--index":r},children:h(UC,{src:o&&t.image?t.image.one:t.image?.url,srcSet:o&&t.image?`${t.image.one} 1x, ${t.image.two} 2x, ${t.image.four} 4x`:void 0,size:n,depth:QA(r,e),alt:i?t.image?.altText||s:"",totalItems:m,overlay:p?`+${u}`:void 0})},"stableId"in t?t.stableId:`${r}${t.title}`)}))})}function KA(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function QA(e,t){return"fan"===t?Math.max(0,Math.min(e,2)):"fan-legacy"===t&&e>0?"legacy":void 0}const XA="ik40Z";function ZA(){const{disclosure:{style:e}}=a_(),{open:t}=zE(),{i18n:n,checkout:r,source:a}=pe(),o=$A(),s="base"===e,l=i((()=>!t.value)),c=r.proposal.facts.merchandiseLines??[],{value:u}=ke().merchandiseLines,d=Vr(a)?c:u?.lines||[],p=h(Uh,{type:t.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return h(Ry,s?{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:XA,children:[h(A,{when:t,fallback:h(Ry,{direction:"inline",alignItems:"center",gap:"small-200",children:[h("span",{className:Ne({screenReaders:"only"}),children:n.translate("order_summary.title")}),h(JA,{variant:"inline",size:"small-200",max:3,merchandise:d,useImageAltTexts:!1}),h(Sy,{size:"large",fonts:"secondary",type:"strong",children:o})]}),children:h(Sy,{color:"subdued",children:n.translate("order_summary.title")})}),h(Ry,{direction:"inline",alignItems:"center",gap:"small-200",children:[h(A,{when:l,children:h(WA,{})}),p]})]}:{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:XA,children:[h(Ry,{direction:"inline",alignItems:"center",gap:"small-200",className:"Tupv7",children:[n.translate("order_summary.title"),p]}),h(WA,{})]})}function eT(){const{checkout:e,embed:t,router:n}=pe();return i((()=>!(!t?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer)&&"/thank-you"===n.currentUrl.value.normalizedPath))}function tT(){const e=eT();return h(A,{when:e,children:h("div",{className:"KwVFv"})})}var nT={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 rT=({position:e,scrollDirection:t,variant:n})=>{const r=n.content,i=f("none");t&&(t.block&&t.inline?i.value="both":t.block?i.value="block":t.inline&&(i.value="inline"));const a=o((()=>{const t="start"===e?.scrolledTo.block,n="start"===e?.scrolledTo.inline;return"both"===i.value?t&&n:t||n}),[e,i.value]),s=up(a??!1,a?"base":"fast");return h("div",{className:nT.PillHintWrapper,children:h("div",{className:P(nT.PillHint,nT.directionVariant[i.value],nT.transitionVariant[s]),children:[r,h(Uh,{size:"small",type:"block"===i.value?"arrow-down":"arrow-right",className:nT.iconVariant[i.value]})]})})};var iT={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 aT=({position:e,scrollDirection:t})=>{const n=up((t?.block&&"start"!==e?.scrolledTo.block)??!1,"base"),r=up((t?.block&&"end"!==e?.scrolledTo.block)??!1,"base"),i=up((t?.inline&&"start"!==e?.scrolledTo.inline)??!1,"base"),a=up((t?.inline&&"end"!==e?.scrolledTo.inline)??!1,"base");return h(b,{children:[{name:"blockStart",transition:n},{name:"blockEnd",transition:r},{name:"inlineStart",transition:i},{name:"inlineEnd",transition:a}].map((({name:e,transition:t})=>h("div",{className:P(iT.ShadowHint,iT.positionVariant[e],iT.transitionVariant[t])},e)))})}
2,oT=new class{constructor(){this.dimensions=E(null),this.container=null,this.resizeObserver=null,this.initialized=!1}getDimensionsSignal(){return this.initialize(),this.dimensions}cleanup(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null),this.initialized=!1,this.dimensions.value=null}initialize(){if(this.initialized)return;if("undefined"==typeof window||"undefined"==typeof document)return;if(!window.ResizeObserver)return;this.initialized=!0,this.container=document.createElement("div"),this.container.style.cssText="\n      position: fixed;\n      top: -9999px;\n      left: -9999px;\n      visibility: hidden;\n      pointer-events: none;\n    ",this.container.innerHTML='\n      <div class="scrollbar-inline-tester" style="width: 100px; height: 100px; overflow-y: scroll;">\n        <div style="height: 200px;"></div>\n      </div>\n      <div class="scrollbar-block-tester" style="width: 100px; height: 100px; overflow-x: scroll;">\n        <div style="width: 200px;"></div>\n      </div>\n    ',document.body.appendChild(this.container);const e=this.container.querySelector(".scrollbar-inline-tester"),t=this.container.querySelector(".scrollbar-block-tester"),n=()=>{this.dimensions.value={inline:e.offsetWidth-e.clientWidth,block:t.offsetHeight-t.clientHeight}};n(),this.resizeObserver=new ResizeObserver(n),this.resizeObserver.observe(t),this.resizeObserver.observe(e)}},sT=(e,t)=>e?"start":t?"end":null;var lT="_1b9t7ypn _1b9t7ypj _1fragemel",cT="_1b9t7ypo _1b9t7ypk _1fragemf5",uT="_1b9t7ypp _1b9t7ypl _1fragemdh",dT="_1b9t7ypq _1b9t7ypm _1frageme1",pT="_1b9t7yp8",mT="_1b9t7yp9";const hT=Th(vp((function({accessibilityActiveDescendant:e,accessibilityLabel:t,accessibilityRole:n="generic",accessibilityVisibility:r="visible",background:l="transparent",backgroundHoverAndFocus:c,bleed:u="none",blockSize:p="auto",border:m="none",borderColor:g,borderRadius:y="none",borderStyle:v,borderWidth:_,children:k,className:S,display:w="auto",hint:C={type:"shadow"},id:E,inlineSize:x="auto",maxBlockSize:I="none",maxInlineSize:A="none",minBlockSize:T="0",minInlineSize:N="0",onScroll:L,onScrollable:R,onScrolledToEdge:M,overflow:D="auto",padding:O="none",paddingBlock:z,paddingBlockEnd:B,paddingBlockStart:V,paddingInline:F,paddingInlineEnd:U,paddingInlineStart:q,scrollbarWidth:j="auto",scrollTo:H}){const{Element:$,role:Y}=Mh(n),{className:W,style:G,styleElement:J}=Ch({backgroundColor:l,backgroundColorHoverAndFocus:c,blockSize:p,...Fe({border:m,borderColor:g,borderStyle:v,borderWidth:_}),borderRadius:y,display:w,inlineSize:x,maxBlockSize:I,maxInlineSize:A,minBlockSize:T,minInlineSize:N},{transforms:{display:tp}}),{className:K,style:Q,styleElement:X}=Ch({overflow:D,padding:O,paddingBlock:z,paddingInline:F,paddingBlockEnd:B,paddingBlockStart:V,paddingInlineEnd:U,paddingInlineStart:q}),Z=s(null),[ee,te=ee]=D.trim().split(/\s+/),ne=o((()=>({inline:"auto"===te,block:"auto"===ee})),[te,ee]),{scrollPosition:re,scrollDirection:ie,scrollbarVisible:ae,scrollbarDimensions:oe}=((e,t,n,r,s,l)=>{const c=f(null),u=f(null),p=i((()=>{const e=oT.getDimensionsSignal().value;return e&&u.value?n?{inline:u.value.block?e.inline:0,block:u.value.inline?e.block:0}:{inline:0,block:0}:null})),m=i((()=>p.value?{inline:p.value.inline>0,block:p.value.block>0}:null)),h=o((()=>Em((()=>{const n=e.current;if(!n)return;const i=c.value,a=u.value;var o,d;u.value=((e,t)=>{const n=e.scrollWidth>e.clientWidth,r=e.scrollHeight>e.clientHeight;return{inline:n&&t.inline,block:r&&t.block}})(n,t),c.value=((e,t)=>{const n=0===e.scrollLeft,r=0===e.scrollTop,i=Math.abs(e.scrollLeft),a=Math.abs(i+e.clientWidth-e.scrollWidth)<1,o=Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<1;return{position:{inline:i,block:e.scrollTop},scrolledTo:{inline:t.inline?sT(n,a):null,block:t.block?sT(r,o):null}}})(n,u.value),"function"==typeof r&&r(c.value),s&&"function"==typeof s&&(o=a,d=u.value,o?.inline!==d.inline||o?.block!==d.block)&&s(u.value),l&&"function"==typeof l&&((e,t)=>{if(!e)return!1;const n=e.scrolledTo.inline!==t.scrolledTo.inline&&null!==t.scrolledTo.inline,r=e.scrolledTo.block!==t.scrolledTo.block&&null!==t.scrolledTo.block;return n||r})(i,c.value)&&l(c.value)}),50)),[t,r,s,l,u,c,e]),g=a((()=>{h()}),[h]);return d((()=>{const t=e.current;if(!t||!("onscroll"in t))return;if(!window.ResizeObserver)return;g();const n=new ResizeObserver(g);return n.observe(e.current),t.addEventListener("scroll",g,{passive:!0}),()=>{n.disconnect(),t.removeEventListener("scroll",g)}}),[e,g]),{scrollPosition:c.value,scrollDirection:u.value,scrollbarDimensions:p.value,scrollbarVisible:m.value}})(Z,ne,"auto"===j,L,R,M),se=P(ie?.block&&"start"!==re?.scrolledTo.block&&lT,ie?.block&&"end"!==re?.scrolledTo.block&&!ae?.block&&
2cT,ie?.inline&&"start"!==re?.scrolledTo.inline&&uT,ie?.inline&&"end"!==re?.scrolledTo.inline&&!ae?.inline&&dT),le=P("none"!==u&&ie?.block&&"start"!==re?.scrolledTo.block&&pT,"none"!==u&&ie?.block&&"end"!==re?.scrolledTo.block&&!ae?.block&&mT);return d((()=>{if(!H||!Z.current)return;const e="smooth",t=Z.current;if(H instanceof HTMLElement)return void H.scrollIntoView({behavior:e,block:"start",inline:"start"});const n="rtl"===document.dir,r={block:H.block??0,inline:(H.inline??0)*(n?-1:1)};t.scrollTo({behavior:e,top:r.block,left:r.inline})}),[H]),h(b,{children:[J,X,h("div",{"aria-hidden":"hidden"===r||void 0,className:P("_1b9t7yp2 _1b9t7yp1 _1fragemup _1fragemv4 _1fragemws _1fragem64",W,"exclusive"===r&&"_1b9t7yph _1fragem121","product-thumbnails"===u&&"_1b9t7ypa","product-thumbnails-with-badge"===u&&"_1b9t7ypd",le),style:G,children:[h($,{id:E,role:Y,"aria-activedescendant":e,"aria-label":t,className:P("_1b9t7yp0","none"===j&&"_1b9t7ypi",K,S,"product-thumbnails"===u&&"_1b9t7ypc _1b9t7ypb","product-thumbnails-with-badge"===u&&"_1b9t7ype _1b9t7ypb"),tabIndex:0,style:Q,ref:Z,children:k}),h("div",{className:P("_1b9t7ypg _1b9t7ypf _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem11z _1fragem12w",se),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:oe?.inline,marginBlockEnd:oe?.block},children:["pill"===C?.type&&h(rT,{variant:C,scrollDirection:ie,position:re,scrollbarVisible:"auto"===j}),"shadow"===C?.type&&h(aT,{variant:C,scrollDirection:ie,position:re,scrollbarVisible:"auto"===j})]})]})]})})));var gT="go06b0";const fT=/<table[\s>]/i;function yT(e){if("undefined"==typeof DOMParser||!fT.test(e))return null;const{body:t}=(new DOMParser).parseFromString(e,"text/html");return t.querySelector("table")?vT(t.childNodes,!1):null}function vT(e,t){const n=[];for(const[r,i]of Array.from(e).entries()){if(i.nodeType===Node.TEXT_NODE){n.push(i.textContent);continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;const e=i,a=e.tagName.toLowerCase(),o={key:r};for(const t of Array.from(e.attributes))o[t.name]=t.value;const s=e.childNodes.length?vT(e.childNodes,t||"table"===a):void 0,l=W(a,o,s);"table"!==a||t?n.push(l):n.push(h(hT,{overflow:"hidden auto",className:"go06b1",children:l},r))}return n}function _T({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const r=lp()?"span":"div",i=e?.__html,a=o((()=>"all"===t&&null!=i?yT(i):null),[t,i]);return"string"==typeof n?h(b,{children:n.split("\n").map(((e,t)=>h(b,{children:[t>0&&h("br",{}),e]},`content-${t}}`)))}):h(r,a?{className:gT,children:a}:{dangerouslySetInnerHTML:e,className:gT,children:n})}const bT=_(null);function PT(e){return`error-for-${e}`}bT.displayName="SelectContext";function kT({children:e,controlID:t,type:n}){return"warning"===n?h(Dh,{id:t?PT(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[h("div",{className:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t",children:h(Uh,{type:"info"})}),h(Sy,{children:e})]}):h("div",{className:"ksaxnz0 _1fragemxr",id:t?PT(t):void 0,children:e})}function ST(e,t=" "){return e.filter((e=>null!=e&&!1!==e&&""!==e&&0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e&&"object"!=typeof e)).join(t)}function wT({children:e}){return h("span",{className:P("rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"),children:e})}var CT={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12e _1fragem12t _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},Text:"xpgeoa5",visuallyHidden:"xpgeoa6 _1fragem121"};function ET({htmlFor:e,label:t,variant:n,className:r}){return h("label",{id:`${e}-label`,htmlFor:e,className:P(CT.positionVariant[n],r),children:h("span",{className:CT.Text,children:h(wT,{children:t})})})}var xT={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"}
2,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 IT=xu("TextField"),AT={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},TT=k((function({accessibilityDescription:e,accessoryEnd:t,accessoryStart:n,ariaActiveDescendant:r,ariaAutocomplete:i,ariaControls:o,ariaExpanded:l,ariaHasPopup:c,ariaLabel:d,ariaLive:p,ariaOwns:m,autoCapitalize:g,autocomplete:f="on",autoCorrect:y,autoFocus:v,controlledValue:_,defaultValue:k,disabled:S,error:w,icon:C,id:E,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T="visible",labelPosition:N,labelWhenEmpty:L,letterCase:R,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:V,onChange:F,onFocus:U,onInput:q,onInputCommit:j,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G="base",readOnly:J,required:K,role:Q,rows:X,segment:Z,step:ee,suffix:te,type:ne="text",value:re},ie){const{control:{border:ae,labelPosition:oe="inside"},textField:{border:se}}=Ah(),le=se||ae||"full",ce=N??oe,ue=op(),de=null==re?void 0:re,pe=null==_?void 0:_,me=Iu(E,IT),he=e?`${me}-description`:void 0,ge=he?h(Sy,{accessibilityVisibility:"exclusive",id:he,children:e}):null,[fe,ye]=u(!1),[ve,_e]=function(e){const t=function(e){if(null!=e){if("object"==typeof e&&"value"in e){if(null==e.value)return;return String(e.value)}return String(e)}}(e),[n,r]=u(t),i=s(t),a=s(e);let o=n;return i.current!==t&&(i.current=t,r(t),o=t),"object"==typeof e&&a.current!==e&&r(t),a.current=e,[o,r]}(pe??de),be=a((e=>{q?.(e),_e(e)}),[q,_e]),Pe=function(e,t){if("boolean"!=typeof e)return void 0!==e&&Boolean(e)?h(kT,{controlID:t,type:"warning"===RT(e)?"warning":void 0,children:e&&"object"==typeof e&&"value"in e?e?.value:e}):null}(w,me),ke=Boolean(w)&&"warning"!==RT(w),Se=P(xT.TextField,xT.textFieldColorLayerVariant[ke?"controlInvalid":"control"],xT.textFieldBorderVariant[le],(S||ue)&&xT.textFieldDisabled,ue&&xT.inert,J&&xT.textFieldReadOnly,fe&&xT.textFieldFocused,ke&&xT.textFieldError,Z&&xT.segmentVariant[Z]),we=A&&"visible"===T;let Ce=xT.floatingLabelOnContent;"outside"===ce?Ce=CT.floating:W&&(Ce=xT.floatingLabelOnFocus);const Ee="outside"!==ce&&!X&&"full"===le;return h(b,{children:h("div",{className:P(xT.Wrapper,xT.wrapperVarsSetter["outside"===ce?"labelOutside":"labelInside"],"inside"===ce&&xT.textFieldColorLayerVariant[w?"controlInvalid":"control"],"inside"===ce&&xT.wrapperLabelInside,we&&Ce),"data-form-layout-connectable":Ee?"true":"false",children:[we&&"outside"===ce&&h(ET,{variant:"outside",htmlFor:me,label:A}),A&&"exclusive"===T&&h("label",{id:`${me}-label`,htmlFor:me,className:CT.visuallyHidden,children:A}),h("div",{className:Se,children:[ge,we&&"inside"===ce&&h(ET,{variant:"inside",htmlFor:me,label:A}),h(LT,{accessibilityDescription:e,accessoryEnd:t,accessoryStart:n,ariaActiveDescendant:r,ariaAutocomplete:i,ariaControls:o,ariaDescribedBy:he,ariaExpanded:l,ariaHasPopup:c,ariaLabel:d,ariaLive:p,ariaOwns:m,autoCapitalize:g,autocomplete:f,autoCorrect:y,autoFocus:v,controlledValue:_,defaultValue:k,disabled:S,error:w,icon:C,id:me,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T,labelPosition:ce,labelWhenEmpty:L,letterCase:R,localValue:ve,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:()=>{ye(!1),V?.()},onChange:F,onFocus:()=>{ye(!0),U?.()},onInput:be,onInputCommit:j,onKeyDown:H??function(e){void 0===X&&F&&"Enter"===e.key&&F(e.currentTarget.value)},onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,ref:ie,required:K,role:Q,rows:X,step:ee,suffix:te,type:ne,value:re})]}),Pe]})})})),NT=TT,LT=k((function({accessoryEnd:e,accessoryStart:t,ariaActiveDescendant:n,ariaAutocomplete:r,ariaControl
2s:i,ariaDescribedBy:o,ariaExpanded:c,ariaHasPopup:u,ariaLabel:d,ariaLive:p,ariaOwns:m,autoCapitalize:g,autocomplete:f,autoCorrect:y,autoFocus:v,disabled:_,labelWhenEmpty:k,error:S,icon:w,id:C,disablePasswordManagers:E,inputMode:x,label:I,labelAccessibilityVisibility:A,labelPosition:T,letterCase:N,localValue:L,max:R,maxLength:M,min:D,minLength:O,name:z,onBlur:B,onChange:V,onFocus:F,onInput:U,onInputCommit:q,onKeyDown:j,onWheel:H,placeholder:$,prefix:Y,prefixSpacing:G,readOnly:J,required:K,role:Q,rows:X,step:Z,suffix:ee,type:te,value:ne},re){const ie=sy({active:Boolean(S)&&Boolean("warning"!==RT(S))}),ae=s(),oe=a((e=>{"function"==typeof re?re(e):re&&(re.current=e),ae.current=e,ie.current=e,e&&(L?e.value!==L:e.value!==(ne??""))&&e.dispatchEvent(new Event("input"))}),[re,ie]),se=ny(),le=ip(),ce=op();l((()=>{v&&!ce&&ae.current?.focus()}),[v,ce]);const{control:{labelPosition:ue="inside"}}=Ah(),de=T??ue,pe="object"==typeof w?w.source:w,me="object"==typeof w?w.position??"start":"start",he=""!==pe&&pe&&h("div",{className:P(xT.Icon,xT.iconPositionVariant[me]),"aria-hidden":"true",onClick:()=>ae.current?.focus(),children:h(Uh,{type:pe})}),ge=I&&"visible"===A,fe="email"===te||f?.split(/\s+/).includes("email"),ye=Boolean(fe)||"tel"===te||"number"===te,ve=(!te||"text"===te)&&Boolean(L);let _e;_e=ye?"ltr":ve?"auto":void 0;const be=Y&&h("div",{id:`${C}-prefix`,className:P(xT.Prefix,xT.withTypography,ge&&"inside"===de&&xT.prefixInside),"aria-hidden":"true",onClick:()=>ae.current?.focus(),children:Y}),Pe=P(xT.Field,"inside"===de&&xT.fieldLabelInside,Boolean(Y)&&xT.fieldPrefixed,Boolean(G)&&xT.fieldPrefixSpacing[G],Boolean(!ge)&&xT.setFieldLabelIsNotVisible,Boolean(Y||t||he&&"start"===me)&&xT.fieldInsetStart,Boolean(ee||e||he&&"end"===me)&&xT.fieldInsetEnd,Boolean(X)&&xT.fieldMultiline,N&&xT.fieldLetterCaseVariant[N],te&&xT.fieldTypeVariant[te],xT.withTypography),ke=o||S?ST([o,S&&PT(C)]):void 0,Se=x??("number"===te?"decimal":void 0),we=Y?` ${C}-prefix`:"",Ce=ee?` ${C}-suffix`:"";let Ee;"outside"===de?Ee=$:"visible"===A&&(Ee=k??I);const xe=W(X?"textarea":"input",{...E?AT:void 0,id:C,min:D,max:R,step:Z,maxLength:M,minLength:O,name:z,placeholder:Ee,className:P(Pe,xT.ActualInput),required:K,type:X?void 0:te,disabled:_,readOnly:J,inputMode:Se,"aria-activedescendant":n,"aria-autocomplete":r,"aria-controls":i,"aria-owns":m,"aria-describedby":ke,"aria-expanded":c,"aria-hidden":!!ce||void 0,"aria-invalid":Boolean(S)&&"warning"!==RT(S)?"true":void 0,"aria-label":d,"aria-live":p,"aria-required":K,"aria-labelledby":I?`${C}-label${we}${Ce}`:void 0,"aria-haspopup":u,onBlur:({currentTarget:{value:e}})=>{se.current&&(e!==(ne||"")&&V?.(e),B?.())},onChange(e){const{currentTarget:{value:t}}=e,n=e.nativeEvent??e,{isTrusted:r}=n,i="inputType"in n?n.inputType:void 0;"insertCompositionText"!==i&&"deleteCompositionText"!==i&&q?.(t),r&&i||V?.(t),U?.(t)},onFocus:()=>{F?.()},onKeyDown:j,onWheel:H,ref:oe,role:Q,rows:X,value:L??"",autoComplete:f,autoFocus:v&&!ce,form:le?.nested?le.id:void 0,tabIndex:ce?-1:void 0,autoCorrect:y,autoCapitalize:g,dir:_e}),Ie=!0===Boolean(X)&&h("div",{"aria-hidden":"true",className:P(xT.MultilineClone,Pe),dir:_e,children:[L," "]}),Ae=P(xT.FieldWrapper,Boolean(X)&&xT.fieldWrapperMultiline),Te=X?h("div",{className:Ae,children:[xe,Ie]}):xe,Ne=ee&&h("div",{id:`${C}-suffix`,className:P(xT.Suffix,xT.withTypography),"aria-hidden":"true",onClick:()=>ae.current?.focus(),children:ee}),Le=t&&h("div",{className:P(xT.Accessory,xT.accessoryPositionStart),children:t}),Re=e&&h("div",{className:P(xT.Accessory,xT.accessoryPositionEnd),children:e});return h(b,{children:[he,be,Te,Le,Ne,Re]})}));function RT(e){if(e&&"object"==typeof e&&"type"in e)return e.type}var MT={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},DT={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const OT={Wrapper:"RD23h",SelectWrapper:"VZudx","Label-positionInside":"QCxaD",LabelText:"XDBWz","Label-isFloating":"A9HkF",Select:"ZHJU6","Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:"_87H7J","Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:"VXrUd","Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},zT=xu("Select");function BT({children:e,id:t,name:n,label:r,value:i="",disabled:s,readOnly:l,required:c,error:d,autocomplete:p="on",placeholder:m,onCh
2ange:g,onBlur:f,onFocus:y}){const v=ip(),{control:{border:_,labelPosition:k="inside"},select:{border:S}}=Ah(),w=op(),C=sy({active:Boolean(d)&&Boolean("warning"!==RT(d))}),E=Iu(t,zT),x=S||_||"full",I=void 0!==d&&Boolean(d)&&h(kT,{controlID:E,type:"warning"===RT(d)?"warning":void 0,children:d&&"object"==typeof d&&"value"in d?d?.value:d}),A=Boolean(d)&&"warning"!==RT(d),T=P(OT.Select,DT.Select,A&&OT.hasError,(s||w)&&OT["Select-isDisabled"],w&&DT.inert,l&&OT["Select-isReadOnly"],OT[G("Select-border",x)]),[N,L]=u(0),R=Boolean(N),M=Boolean(m&&m!==r)||R,D=""!==i||M,O=h("label",{className:P(OT.Label,OT[G("Label-position",k)],D&&OT["Label-isFloating"]),htmlFor:E,children:h("span",{className:P(OT.LabelText),children:h(wT,{children:r})})}),z=a((()=>{L((e=>e+1))}),[]),B=a((()=>{L((e=>e-1))}),[]),V=o((()=>({readOnly:l,registerEmptyValueOption:z,unregisterEmptyValueOption:B})),[l,z,B]),F=h("div",{children:["outside"===k?O:null,h("div",{className:P(OT.SelectWrapper,DT.selectColorLayerVariant[A?"controlInvalid":"control"]),children:["inside"===k&&O,h(bT.Provider,{value:V,children:h("select",{name:n,id:E,disabled:s,onChange:e=>{const t=e.target.value;g?.(t)},required:c,value:i,className:T,"aria-describedby":d?PT(E):void 0,"aria-invalid":d&&"warning"!==RT(d)?"true":void 0,"aria-hidden":!!w||void 0,autoComplete:p,tabIndex:w?-1:void 0,ref:C,onBlur:()=>{f?.()},onFocus:()=>{y?.()},form:v?.nested?v.id:void 0,children:[m&&(U=i,""===U||null==U||m!==r)&&h("option",{value:"",hidden:m===r,disabled:!0,children:m===r?h(b,{children:" "}):m}),e]})}),h("div",{className:P(OT.Selector),children:h(Uh,{type:"chevronDown",size:"small-200"})})]})]});var U;const q="outside"!==k&&"full"===x;return h(b,{children:h("div",{className:P(OT.Wrapper,"inside"===k&&DT.selectColorLayerVariant[A?"controlInvalid":"control"],MT["outside"===k?"labelOutside":"labelInside"]),"data-form-layout-connectable":q?"true":"false",children:[F,I]})})}function VT({children:e,id:t,value:n,disabled:r,alternateValues:i,accessibilityLabel:a}){const o=y(bT),{registerEmptyValueOption:s,unregisterEmptyValueOption:l}=o??{},c=""===n;return d((()=>{if(c&&s&&l)return s(),()=>{l()}}),[c,s,l]),o?h("option",{id:t,value:n,disabled:r||o.readOnly,...i?.length&&{"data-alternate-values":JSON.stringify(i)},"aria-label":a,children:e}):(console.warn(`Unable to render Option (id: ${t}). Please verify it is a child of a Select.`),null)}var FT={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 UT=k((function({accessibilityLabel:e,id:t,children:n,inlineSize:r="auto",lang:i,loading:a,disabled:o=!1,pressed:s=!1,onClick:l,onBlur:c,onFocus:u},d){const p=fm(d),m=op(),g="auto"===r?"fit-content":r,f=Rd(),y=up(a??!1,{enter:"slow"}),v=h("span",{className:P(FT.LoadingContent),dir:"auto",children:h(_y,{accessibilityLabel:f("processing")})}),_=LC(n)&&h("span",{className:P(FT.Content),"aria-hidden":a||void 0,children:n});return h(sp.Provider,{value:!0,children:h("button",{type:"button",id:t,"aria-pressed":s,"aria-busy":a,"aria-label":a?void 0:e,"aria-live":a?"polite":"off","aria-hidden":!!m||void 0,lang:i,onClick:e=>{e?.preventDefault(),l?.(!s)},onBlur:c,onFocus:u,className:P(FT.PressButton,FT.inlineSizeVariant[Te(g)],s&&FT.pressed,(o||m)&&FT.disabled,m&&FT.inert,a&&[FT.loading,FT.transitionVariant[y]]),disabled:o||a,tabIndex:m?-1:void 0,ref:p,children:[_,a&&v]})})})),qT={small:"35%",base:"50%",large:"65%",fill:"100%"};function jT({content:e,delay:t,id:n,lastLineSize:r,lines:i=1,size:a}){const s=o((()=>function(){const e=Object.keys(qT);return e[Math.floor(Math.random()*e.length)]}()),[]);return h(gI,{id:n,size:a,textAlign:"justify",children:e?h(XC,{delay:t,children:e}):Array.from({length:i},((e,n)=>h(XC,{delay:t,inlineSize:qT[n===i-1?r??(1===i?"fill":s):"fill"]},n)))})}const HT=new Set(["http:","https:"]);function $T({children:e}){const t=function(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:n}=pe(),r=a((e=>{const r=e.target?.closest?.("a");if(!r)return;const i=r.href;let a;try{a=new URL(i).protocol}catch{return}if(!HT.has(a))return;const o=r.getAttribute("href");o?.startsWith("#")||t?.client?.windowOpenRequest&&(e.preventDefault(),t.client.windowOpenRequest(i).catch((e=>{n.log("window_open_delegation_error","Window open delegation failed in delegated HTML content",{url:i,error:e instanceof Error?e.message:String(e)})})))}),[t,n]);if(e)return r}();return t?h("div",{onClick:t,children:e}):h(b,{children:e})}
2const YT={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},WT={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},GT=po((({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:i,policies:a})=>{const o=mo(a),s=w((()=>Object.values(o)));function l(e){return Array.from(o[e]?.policies.values()??[])}function c(){return o[i.shopId]?.policies.get(i.handle)??a[0]??i}const u=E(!1),d=E(!1),p=E(c()),m=w((()=>l(p.value.shopId))),h=w((()=>p.value.shopId)),g=w((()=>p.value.sessionToken??"")),f=w((()=>n.id===h.value)),y=e.query(YT,{variables:()=>({handle:p.value.handle}),skip:()=>!f.value||!u.value}),v=e.query(WT,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>f.value||!u.value}),_=w((()=>{if(f.value)return y.data.value?.shop?.merchantPolicies[0]?.body;const e=v.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[];return e.find((e=>e.handle===p.value.handle))?.body})),b=w((()=>f.value?y.error.value:v.error.value)),P=w((()=>f.value?y.loading.value:v.loading.value)),k=jl(P.value,((e,t)=>e&&!t&&u.peek()&&d.peek()&&"undefined"!=typeof document&&null!==document.querySelector(Hl)),["modal-content-cross-fade"]);return V((()=>{k.value=P.value})),V((()=>{b.value&&t.error(b.value)})),{error:b,loading:k,policyBody:_,selectedPolicy:w((()=>p.value)),selectedShopPolicies:m,shops:s,show(){d.value=!1,p.value=c(),r&&(r.value="footerContent"),u.value=!0},afterShow(){d.value=!0},hide(){d.value=!1,u.value=!1,r&&(r.value="none")},selectShop(e){const t=p.peek(),n=l(e),r=n.find((e=>e.handle===t.handle))??n[0]??t;r!==t&&Ml((()=>{p.value=r}),["modal-content-cross-fade"])},selectPolicyHandle(e){const t=p.peek(),n=m.value.find((t=>t.handle===e))??m.value[0]??t;n!==t&&Ml((()=>{p.value=n}),["modal-content-cross-fade"])}}}));function JT({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:i,embed:a}=pe(),{checkoutProtocolModalEventSignal:o}=tt(),{localPolicies:s,localPoliciesWithContent:l,remotePolicies:c}=ho(),u=r.hasFlagEnabled(go),d=c.length>0?[...s,...c]:l,p=u&&d.some((({shopId:e,handle:n})=>e===t.shopId&&n===t.handle))?d:[t],m=u?n.translate("shop_policies.terms_and_policies"):t.name,g=i.variant.isStandard()||a?.isCheckoutKit(),f=u?"@media (inline-size >= extraSmall) 600px, 90%":g?"100%":void 0,{error:y,loading:v,policyBody:_,selectedPolicy:b,selectedShopPolicies:P,shops:k,show:S,afterShow:w,hide:C,selectShop:E,selectPolicyHandle:x}=fo(GT,{checkoutProtocolModalEventSignal:o,defaultPolicy:t,policies:p}),I=k.value.length>1||k.value.some((e=>e.policies.size>1)),T=()=>h($T,{children:h(_T,{dangerouslySetInnerHTML:{__html:_.value??""},scrollableContent:"all"})}),N=h(A,{when:()=>!y.value,fallback:n.translate("bad_request.title"),children:h(A,{when:()=>!v.value,fallback:h(Ry,{"aria-busy":!0,gap:"base",children:[h(jT,{delay:!1,lines:3,lastLineSize:"small"}),h(jT,{delay:!1,lines:3,lastLineSize:"large"}),h(jT,{delay:!1,lines:3,lastLineSize:"small"}),h(jT,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>I||b.value.shopId!==r.id?h(A,{when:()=>_.value,fallback:h(Sy,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:b.value.name,shop_name:b.value.shopName})}),children:T}):T()})});return h(KI,{id:e,onShow:S,onAfterShow:w,onHide:C,heading:m,blockSize:f,children:[h(fy,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:v.value?n.translate("general.loading"):null}),I?h(Ry,{gap:"base",children:[h(A,{when:()=>k.value.length>1,children:h(Ry,{direction:"inline",gap:"base",children:k.value.map((e=>h(UT,{pressed:b.value.shopId===e.shopId,onClick:()=>E(e.shopId),children:h(Ry,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:h(Sy,{children:e.shopName})})},e.shopId)))})}),h(A,{when:()=>P.value.length>1,children:h(BT,{value:b.value.handle,label:n.translate("shop_policies.policy_label"),onChange:x,name:"policy",children:P.value.map((e=>h(VT,{value:e.handle,children:e.name},e.handle)))})}),N]}):N]})}var KT={Checkbox:"_1mmswk94 _1mmswk93 _1fragemws _1fragemyo",Details:"_1mmswk9s",Error:"_1mmswk9l",Icon:"_1mmswk9n _1mmswk9m _1fragem11z _1fragem11k _1fragemwi _1fragem12d _1fragem12t _1fragem12j",Input:"_1mmswk98 _1mmswk97 _1fragemzq _1fragemzo _1fragemzs _1fragemzm _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragemyk _1fragem133 _1fragem5u _1fragemzf _1fragem4q _1fragem12j _1fragem12d _1fragem12q",Label:"_1mmswk9g _1mmswk9f _1fragem5u _1fragemvo _1fragemtb",Wrapper:"_1mmswk96 _1mmswk95 _1fragemws _1fragem64",colorLayerControl:"_1mmswk99 _1fragemy6",inputStateVariant:{default:"_1mmswk9d _1mmswk9b _1fragemyd",disabled:"_1mmswk9e _1mmswk9c _1fragem11v _1fragem11z _1fragemyb"},inputError:"_1mmswk9a",labelAndDetailsStateVariant:{default:"_1mmswk9j _1mmswk9h _1fragemyd",disabled:"_1mmswk9k _1mmswk9i _1fragem11v _1fragemyb"},accessibilityVisibilityVariant:{visible:"_1mmswk9p",exclusive:"_1mmswk9q _1mmswk9o _1fragem121"},inert:"_1mmswk9r _1fragemz0"};const QT=xu("Checkbox"),XT=Qm(k((function({accessibilityLabel:e,disabled:t,error:n,id:r,label:i,name:a,details:o,...s},l){const c=Iu(r,QT),u=op(),d="string"==typeof n&&Boolean(n.trim())&&h("div",{className:KT.Error,children:h(kT,{controlID:c,children:n})}),p=P(KT.Label,KT.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&KT.inert),m=("string"==typeof i||LC(i))&&h("label",{htmlFor:c,className:p,children:i}),g="string"==typeof o||LC(o),f=g?`${c}-details`:void 0,y=P(KT.Details,KT.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&KT.inert),v=g&&h("div",{id:f,className:y,children:o});return h("div",{children:[h("div",{className:KT.Wrapper,children:[h(ZT,{id:c,name:a,error:Boolean(n),accessibilityLabel:e,disabled:t,ref:l,ariaDescribedBy:f,...s}),m]}),v,d]})})),{commands:{clipboard:!1,overlay:!1}}),ZT=k((function({accessibilityLabel:e,checked:t,colorLayer:n,disabled:r,error:i=!1,id:a,name:o,onChange:s,required:l,value:c,accessibilityVisibility:u,ariaDescribedBy:d,command:p,commandFor:m,...g},f){const y=op(),v=ym(f,sy({active:i})),_="inherit"!==n,b=P(KT.Input,i&&KT.inputError,KT.inputStateVariant[r||y?"disabled":"default"],y&&KT.inert);return h("div",{className:P(KT.Checkbox,_&&KT.colorLayerControl,u&&KT.accessibilityVisibilityVariant[u]),children:[h("input",{type:"checkbox",id:a,name:o,checked:t,value:c,disabled:r,onChange:({currentTarget:e})=>{"function"==typeof s&&s(e.checked)}
2,className:b,"aria-describedby":[d,i&&PT(a)].filter(Boolean).join(" ")||void 0,"aria-label":e||void 0,"aria-hidden":!!y||void 0,"aria-invalid":i||void 0,tabIndex:y?-1:void 0,ref:v,required:l,...g}),h("div",{className:KT.Icon,children:h(Uh,{type:"check",size:"small-200"})})]})})),eN="gid://shopify/App/580111";function tN(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function nN(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return null!=n&&null!=r&&tN({namespace:n,key:r},t)}function rN(e,t){return e?.find((e=>tN(e,t)))?.value}function iN(e,t){for(let n=e.length-1;n>=0;n--)if(nN(e[n],t))return n;return-1}function aN({key:e,label:t,required:n},{type:r,validate:i=()=>{}}){const{checkout:{proposal:l},i18n:u}=pe(),d=Uc(),p=vo(e),m=_o(),h=function({namespace:e,key:t,type:n}){const{checkout:{proposal:r}}=pe(),i=r.proposed.cartMetafields,a=r.negotiated.fields.cartMetafields;return o((()=>{const r={namespace:e,key:t,type:n};return new yo(w((()=>function(e,t){const n=e[iN(e,t)];if(n)return n.delete?"":n.update?.value}(i.value,r)??rN(a.value,r)??"")),(e=>{i.value=function(e,t,n){const{namespace:r,key:i,type:a}=t,o=""===n.trim()?{delete:{appId:eN,namespace:r,key:i}}:{update:{appId:eN,namespace:r,key:i,type:a,value:n}},s=iN(e,t);return-1===s?[...e,o]:e.map(((e,t)=>t===s?o:e))}(i.peek(),r,e)}))}),[t,e,a,i,n])}({...p,type:r}),g=s(),{handleViolations:f}=function(e,t){const{current:n,lastJourneyProgression:r}=Pe(),{customFields:i}=n.fields,o=a((n=>{const r=function(e,t,n){const r=t?.findIndex((e=>e.key===n))??-1;if(-1===r)return;const i=`$.customFields[${r}]`;return e.find((e=>"UnprocessableTermViolation"===e.__typename&&e.code.startsWith("CUSTOM_FIELD")&&e.target===i))}(n,i.value,e);r&&!t.value&&(t.value=r.localizedMessage||r.nonLocalizedMessage)}),[i,t,e]);return C((()=>{const e=r.value;"error"===e.type&&"negotiation"!==e.negotiationStage&&c((()=>o(e.violations)))})),{handleViolations:a((e=>{"error"===e.status&&o(e.violations)}),[o])}}(e,m);bo(h,m,i,nn.InvalidCustomFieldValue);const y=n.value;return{value:h,error:m,fieldProps:{label:y?t.value:u.translate("custom_field.label",{label:t.value}),name:e,required:y},negotiate:()=>{const e=h.peek();e!==(g.current??rN(l.negotiated.fields.cartMetafields.peek(),p)??"")&&!m.peek()&&(g.current=e,d.negotiate({fieldsToResolve:["cartMetafields","customFields"],include:[],onComplete:f}))}}}function oN({field:{description:e,heading:t,key:n},children:r}){const i=e.value;return h(Ry,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?h(Ww,{children:t}):null,i?h(Sy,{color:"subdued",children:i}):null,r]})}function sN({field:e}){const t=function({required:e,requiredErrorMessage:t}){const{i18n:n}=pe();return a((r=>{if(e.value&&"true"!==r)return t.value?.trim()||n.translate("field_errors.custom_field.cart_metafield_value_required")}),[n,e,t])}(e),{value:n,error:r,fieldProps:i,negotiate:o}=aN(e,{type:"boolean",validate:t}),s="string"==typeof r.value?r.value:void 0;return h(oN,{field:e,children:h(XT,{label:e.label.value,name:i.name,required:i.required,
2checked:"true"===n.value,error:s,onChange:e=>{const i=String(e);n.value=i,r.value=t(i),o()}})})}function lN({field:e}){const t=function({choices:e,required:t,requiredErrorMessage:n}){const{i18n:r}=pe();return a((i=>{if(""===i.trim()){if(!t.value)return;return n.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required")}if(!e?.some((e=>e.value===i)))return r.translate("field_errors.custom_field.cart_metafield_invalid_choice")}),[e,r,t,n])}(e),{value:n,error:r,fieldProps:i,negotiate:o}=aN(e,{type:"single_line_text_field",validate:t});return h(oN,{field:e,children:h(BT,{label:i.label,name:i.name,required:i.required,value:n.value,error:"string"==typeof r.value?r.value:void 0,placeholder:i.label,onChange:e=>{n.value=e,r.value=t(e),o()},children:e.choices?.map((({label:e,value:t})=>h(VT,{value:t,children:e},t)))})})}const cN=x({displayName:"AsyncDateField",suspense:!1,load:()=>t((()=>Dl((async()=>{const{DateField:e}=await import("./9f57d2aa.KWHVJaex.js").then((e=>e.b));return{DateField:e}}),__vite__mapDeps([23,1,24,3,4,2,5,25,26,27])).then((({DateField:e})=>e)))),useError:uI("DateField"),renderLoading:({field:e})=>h(uN,{field:e})});function uN({field:e}){const{value:t,fieldProps:n}=aN(e,{type:"date"});return h(oN,{field:e,children:h(NT,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:h(Uh,{type:"calendar"})})})}const dN=k((function({autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:i,id:a,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:d,onChange:p,onFocus:m,onInput:g,placeholder:f,readOnly:y,required:v,rows:_=2,value:b},P){return h(TT,{autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:i,id:a,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:d,onChange:p,onFocus:m,onInput:g,placeholder:f,readOnly:y,ref:P,required:v,rows:_>0?_:1,value:b})}));function pN(e,t){const{value:n,error:r,fieldProps:i,negotiate:a}=aN(e,t),o=Po(n,r,t.validate);return{validatedInput:o,fieldProps:i,persist:()=>{o.onBlur(),a()}}}function mN({field:e}){const t="MULTILINE_TEXT"===e.type,n=function({required:e,requiredErrorMessage:t,validations:n}){const{i18n:r}=pe(),{minLength:i,maxLength:o}=n;return a((n=>{if(""===n.trim()){if(!e.value)return;return t.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required")}const a=[...n].length;return null!=i&&a<i?r.translate("field_errors.custom_field.cart_metafield_value_too_short"):null!=o&&a>o?r.translate("field_errors.custom_field.cart_metafield_value_too_long"):void 0}),[r,o,i,e,t])}(e),{validatedInput:r,fieldProps:i,persist:o}=pN(e,{type:t?"multi_line_text_field":"single_line_text_field",validate:n});return h(oN,{field:e,children:h(t?dN:NT,{...r,label:i.label,name:i.name,required:i.required,onBlur:o})})}function hN({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return h(mN,{field:e});case"DATE":return h(cN,{field:e});case"CHOICE":return h(lN,{field:e});case"BOOLEAN":return h(sN,{field:e});default:return null}}const gN=x({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>Aa(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>Dl((()=>import("./49758c58.Dszaue9Y.js")),__vite__mapDeps([206,1,2,3,4,5,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,7,38,39,40,41,42,43,44,45,46,47,48,14,6,49,50,51,52,8,9,207]))}),fN="OyeF5",yN="XYPMc",vN=e=>h(fy,{children:e}),_N=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:i})=>{const a=e&&n?h(Ry,{gap:e,children:t}):h(b,{children:t});return r||i?h("div",{className:P({[fN]:r,[yN]:i}),style:{...r&&{"--extensions-margin-block-start":Ce.spacing[r]},...i&&{"--extensions-margin-block-end":Ce.spacing[i]}},children:a}):h(b,{children:a})};function bN({customizations:e,gap:t,options:n,transformComponents:r,render:i=vN,marginBlockStart:a,marginBlockEnd:o}){return 0===e.length?null:h(_N,{gap:t,condition:e.length>1,marginBlockStart:a,marginBlockEnd:o,children:e.map((e=>"uiExtension"===e.kind?h(gN,{options:n,extension:e.extension,transformComponents:r,render:i},e.extension.id):h(hN,{field:e.field},e.field.key)))})}const PN=e=>h("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[h("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"}}),h("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"}}),h("path",{d:"M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8s-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0s-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2
2-.6 0-.8s.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0",style:{fill:"#fff"}}),h("path",{d:"M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8s.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0",style:{fill:"#06f"}})]});function kN(){const{shopPay:e,i18n:t}=pe(),{footer:{content:{typography:n}={}}={}}=a_(),r=e.user.isAuthenticatedUser.value?"https://privacy.shopify.com/ads-sharing/opt-out/new":"https://privacy.shopify.com",i=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:h("span",{className:"mMltV"}),privacy_link_logo:h(PN,{"aria-hidden":"true",focusable:"false",className:"HTJIw"})}),a=h(Ny,{href:r,target:"_blank",display:"block",children:i});return n?h(Sy,{size:n.size,color:n.color,type:"bold"===n.weight?"strong":void 0,children:a}):a}const SN=x({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:function(e){const{observability:t}=pe();l((()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}(t,e)}),[e,t])},load:()=>t((()=>Dl((async()=>{const{deferredPrivacyComponents:e}=await import("./2acfb1ce.Bgnzh68x.js");return{deferredPrivacyComponents:e}}),__vite__mapDeps([88,1,2,3,4,5,36,37,6,7,8,9])).then((({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))))});function wN(){const e=Vt(),{checkout:{identity:t},consentManager:n}=pe();return i((()=>e.value&&"shopPay"!==t.current.value&&n.shouldShowBanner.value))}const CN=xu("DelegatedLinkModal");function EN(e){const t=Array.isArray(e)?e:[e],n=new Map;return t.map((e=>{if("string"!=typeof e&&"number"!=typeof e)return e;const t=String(e),r=(n.get(t)??0)+1;return n.set(t,r),h(Sy,{color:"subdued",children:e},`${t}-${r}`)}))}function xN(){const{embed:e,i18n:t,checkout:{configuration:n},shop:r}=pe(),{name:i}=r,a=EE(),{currentDetour:o}=Fc().value,s=wN(),{footer:{alignment:l,content:{visibility:c,typography:u}={}}={}}=a_(),{localPolicies:d,localPoliciesWithContent:p}=ho(),m=r.hasFlagEnabled(go),g="microsoft"===e?.embedder,f="amazon"===e?.embedder,y="google"===e?.embedder;let v=u;g?v={...u,size:"extraSmall",color:"subdued",weight:"bold"}:y&&(v={...u,size:"small"});const _=d.find((e=>"privacy-policy"===e.handle)),P=_.url,k=P?h(Ny,{href:P,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:i}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):h(b,{children:[h(Ny,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:i}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),h(JT,{id:"google-privacy-policy-modal",defaultPolicy:{..._,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),S=h(Ny,{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")}),w=h(Ny,{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")}),C=h(gI,{type:"small",textAlign:l,children:EN(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:i,privacy_policy_link:k,payments_privacy_notice_link:S,learn_more_link:w}))}),E=h(gI,{size:"extraSmall",color:"subdued",textAlign:l,children:h(Sy,{type:"strong",children:["Your purchase from ",i," is subject to the"," ",h(IN,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",h(IN,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",i," to complete your order."]})}),x=0===p.length?h(Ry,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:l,children:[h(Sy,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:i})}),h(Ry,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[h(A,{when:s,children:h(fy,{accessibilityRole:"list-item",children:h(SN,{})})}),h(A,{when:n.visibility.showDataSharingOptOut,children:h(fy,{accessibilityRole:"list-item",children:h(kN,{})})})]})]}):h(Ry,{direction:"inline",justifyContent:l,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(m?p.slice(0,1):p).map((e=>{const{handle:n,name:r}=e,i=m?t.translate("shop_policies.terms_and_policies"):r,o=m?"terms-and-policies-footer-policy-modal":`${n}-footer-policy-modal`,s=h(JT,{id:o,defaultPolicy:e}),l=h(xy,{variant:"plain",commandFor:o,ref:a(n),children:i});return h(fy,{accessibilityRole:"list-item",children:[v?h(Sy,{size:v.size,color:v.color,type:"bold"===v.weight?"strong":void 0,children:l}):l,s]},n)})),h(A,{when:s,children:h(fy,{accessibilityRole:"list-item",children:h(SN,{})})}),h(A,{when:n.visibility.showDataSharingOptOut,children:h(fy,{accessibilityRole:"list-item",children:h(kN,{})})})]});let I="purchase.checkout.footer.render-after";"thankYou"===o?.type&&(I="purchase.thank-you.footer.render-after");const T=mE(I);
2return h(Ry,{gap:"large-100",children:[g&&E,y&&C,"hidden"!==c&&!f&&x,h(bN,{customizations:T,gap:"base"})]})}function IN({href:e,heading:t,children:n,...r}){const{checkout:i}=pe(),a=Iu(void 0,CN);return i.configuration.isWindowOpenDelegationEnabled?h(Ny,{href:e,...r,children:n}):h(b,{children:[h(Ny,{commandFor:a,...r,children:n}),h(KI,{id:a,source:e,heading:t})]})}function AN(){const{i18n:e,shop:t}=pe(),n=`${t.name} ${e.translate("general.page_title")}`;return h("h1",{className:Ne({screenReaders:"only"}),children:n})}function TN(){const{client:e,i18n:t}=pe(),{checkoutProtocolModalEventSignal:n}=tt(),r=a((()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")}),[e]),{hasViolations:i}=Lv(Hr);return l((()=>()=>{n.value="none"}),[n]),i?h(KI,{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:h(Ry,{gap:"base",children:[h(Sy,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),h(Ry,{direction:"inline",gap:"base",justifyContent:"end",children:h(xy,{variant:"primary",onClick:r,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function NN({source:e,title:t,onIframeLoad:n}){const[r,i]=u(),[a,o]=u(!1);return l((()=>{e?(i(e),o(!0)):o(!1)}),[e]),r?h(KI,{source:r,open:a,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function LN({source:e,logMessage:t,telemetryContext:n,logKey:r=e??void 0}){const{observability:i}=pe(),o=s();return l((()=>{e||(o.current=void 0)}),[e]),a((a=>{e&&n&&(a&&a!==e||o.current!==r&&(o.current=r,i.log("action_required_modal_iframe_loaded",t,{...n,hasModalUrl:!0,..."pre_payment_buyer_action_required"!==n.actionType&&{sourceHostCategory:ZP(e)}})))}),[r,t,i,e,n])}function RN(){const{i18n:e}=pe(),t=function(){const{checkout:e,shopPay:t,observability:n}=pe(),r=s(),a=i((()=>{if(ko(t)&&t.threeDSModalUrl.value){const e=t.threeDSModalUrl.value;return{source:e,logKey:JSON.stringify(["spe",e]),logMessage:"[ActionRequiredModalManager] SPE 3DS action required via threeDSModalUrl",telemetryPayload:{modalSourceType:"spe_three_ds_modal_url",sourceHostCategory:ZP(e),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const n=e.latestReceipt.value;if(n&&kv(n)){const e=n.action;if(wv(e))return{source:e.offsiteRedirect?void 0:e.url,logKey:JSON.stringify(["receipt",n.id,e.offsiteRedirect,e.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:ZP(e.url),offsiteRedirect:e.offsiteRedirect,actionType:e.type,hasModalUrl:!e.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:e.offsiteRedirect,actionType:e.type}}}if("action_required"===n?.status&&"pre_payment_buyer_action_required"===n.action.type){const{action:e}=n;return{source:e.url,logKey:JSON.stringify(["receipt",n.id,e.type]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",actionType:e.type,hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",actionType:e.type}}}}));return C((()=>{const e=a.value;e?r.current!==e.logKey&&(r.current=e.logKey,n.log("action_required_modal_manager_action_required",e.logMessage,e.telemetryPayload)):r.current=void 0})),a.value}(),n=LN({source:t?.source,logKey:t?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:t?.iframeLoadTelemetryContext});return h(NN,{source:t?.source,title:e.translate("processing.action_required"),onIframeLoad:n})}function MN(e,t){return e.has(t)}function DN(e,t){if(!e||!t)return null;const n=t.find((e=>"customOnsite"===e.method.type))?.method;return n&&e.find((e=>"customOnsite"===e.type&&e.paymentMethodIdentifier===n.paymentMethodIdentifier&&e?.uiExtension?.approvalScopes&&MN(e.uiExtension.approvalScopes,fc.PaymentSessionModal)))||null}xN.displayName="FooterContent",IN.displayName="DelegatedLink";const ON=x({id:()=>
2"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:function(e){const{observability:t}=pe();l((()=>{e&&function(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}(t,e)}),[e,t])},load:()=>t((()=>Dl((()=>import("./7fd9930c.By5ensm3.js")),__vite__mapDeps([208,1,17,3,4,2,5,18,6,7,8,9,209]))))});function zN({modalPaymentMethodConfig:e,onModalRender:t}){const{checkout:n,observability:r}=pe(),a=s(),o=f(void 0),l=i((()=>{const e=n.latestReceipt.value;return e&&Sv(e)&&Cv(e.action)?e:void 0}));C((()=>{const t=l.value;if(!t||!Cv(t.action))return void(a.current=void 0);const n=Boolean(e.value),i=JSON.stringify([t.id,t.action.challengeType,t.action.challengeData,n]);a.current!==i&&(a.current=i,r.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:t.action.challengeType,challengeData:t.action.challengeData,hasModalPaymentMethodConfig:n}))})),C((()=>{const e=l.value;if(!e||!Cv(e.action))return void(o.value=void 0);const t=function(e){return JSON.stringify([e.id,e.action.type,Cv(e.action)?e.action.challengeType:void 0,Cv(e.action)?e.action.challengeData:void 0])}(e),n=null==e.timeout?.millisecondsRemaining?void 0:Date.now()+e.timeout.millisecondsRemaining,r=o.peek();r?.key!==t?o.value={key:t,expiresAt:n}:null!=n&&(o.value={key:t,expiresAt:Math.min(r.expiresAt??n,n)})}));const c=i((()=>{const t=l.value,n=e.value;if(t&&Cv(t.action))return n?{type:t.action.challengeType,data:t.action.challengeData,config:n,expiresAt:o.value?.expiresAt}:null}));return h(A,{when:c,children:e=>h(ON,{challengeType:e.type,challengeData:e.data,receipt:n.latestReceipt.value,paymentMethod:e.config,onModalRender:t,challengeExpiresAt:e.expiresAt})})}function BN(){const e=ea(),{checkout:t}=pe(),n=ke().deferredTotal;return i((()=>{if(!e.value)return!0;const r=n.value?.amount.amount;return Boolean(fa({checkout:t})||r)}))}function VN({isModalRendered:e,modalPaymentMethodConfig:t}){const{i18n:n,checkout:r}=pe(),a=function(){const{i18n:e,shopPay:t}=pe(),{managedByMarketsPro:n}=ke(),r=BN();return i((()=>{if(!r.value)return;if(!So({managedByMarketsPro:n.value}))return;const i=t.session.selectedPaymentMethod.value;return i&&wo(i)?e.translate("processing.redirecting_title"):void 0}))}();return i((()=>{if(a.value)return a.value;const i=r.latestReceipt.value;return i?kv(i)?n.translate("processing.redirecting_notice"):Sv(i)?!e.value&&t.value?n.translate("processing.modal_notice",{paymentMethod:t.value.name}):n.translate("processing.wait.short"):!e.value&&t.value?.name&&Co(t.value)&&"processing"===i.status&&t.value?n.translate("processing.modal_notice",{paymentMethod:t.value.name}):"processing_remote_checkouts"===i.status||"processed"===i.status&&i.completedRemoteCheckouts?.length?n.translate("processing.remote_shops_payments_processing"):n.translate("processing.wait.short"):n.translate("processing.wait.short")}))}const FN=x({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:function(e){const{observability:t}=pe();l((()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})}),[e,t])},load:()=>t((()=>Dl((()=>import("./39bf6084.C9T54J8f.js")),__vite__mapDeps([210,1,2,3,4,5,197,44,71,6,7,8,9,211]))))});function UN(){const{checkout:e}=pe(),{paymentLines:t}=Ge(),n=ke().paymentMethods,r=i((()=>DN(n.value,t.value))),a=f(!1),o=VN({isModalRendered:a,modalPaymentMethodConfig:r}),s=jP();return C((()=>{if(e.latestReceipt.value)return xd({content:o.value,role:"alert"})})),h(b,{children:[h(A,{when:s,fallback:h(RN,{}),children:h(FN,{})}),h(zN,{modalPaymentMethodConfig:r,onModalRender:()=>{a.value=!0}})]})}function qN(){const{i18n:e,url:t,source:n,shop:r,checkout:i,shopPay:a}=pe(),s="shopPay"===i.identity.current.value,{plan:l,currentPage:c}=Fc().value,u=ea(),d="cartNext"===n.type||"simulated"===n.type,p=Pe(),m=Ge().paymentLines.value,h=p.current.peek(),g=i.configuration.layout.isOnePage.value,f=Eo(),y=xo("SHOP_CASH"),v=vt(),_=xw(),b=ke(),{value:P}=b.managedByMarketsPro,k=So({managedByMarketsPro:P}),{value:S}=b.paymentFlexibilityPaymentTermsTemplate,w=oo(),C=kn(h.deliveryNext),E=Pi(h.deliveryNext),x=o((()=>m.some((({method:{type:e}})=>"paymentOnDelivery"===e))),[m]),I=o((()=>m.some((({method:{type:e}})=>"customManualPayment"===e||"manualPayment"===e))),[m]),A=o((()=>r.vaultForPaymentLater&&Io(m)),[r.vaultForPaymentLater,m]),T=Boolean(S)&&!w.value,N=DA();return o((()=>{let t=[];t=d&&_.value?[{id:"cart",route:_.value.toString()}]:[];const n=[...t,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let r=c?n.findIndex((e=>e.id===c.id)):void 0;(null==r||r<0)&&(r=void 0);const i=p.current.peek(),o=null==r?void 0:n.slice(r+1).find((e=>null==e.skipOverPage||!e.skipOverPage(i))),h=null==r?void 0:n.slice(0,r).reverse().find((e=>null==e.skipOverPage||!e.skipOverPage(i)));return{nextPage:{id:o?.id,label:function(t){if(a.isSimulated)return e.translate("general.pay_now_button_label");switch(t){case"shipping":return e.translate("general.continue_to_shipping_method");case"payment":return e.translate("general.continue_to_payment_method");case"review":return e.translate("general.continue_to_review");case"thankYou":return v.value?e.translate("general.submit_for_review_button_label"):A?e.translate("payment.vault_for_payment_later.pay_button_label"):T&&!N.value?e.translate("general.confirm_order_button_label"):u.value||x||I||f.value||g&&y.value?e.translate("general.complete_purchase_button_label"):k&&!s&&Ao(m)?e.translate("general.continue_to_payment_method"):e.translate("general.pay_now_button_label");default:return e.translate("general.continue_button_label")}}(s?"thankYou":o?.id),notice:function(t){switch(t){case"review":return e.translate("processing.y
2ou_will_not_be_charged");case"thankYou":return v.value?e.translate("general.submit_for_review_notice_label"):void 0;default:return}}(s?"thankYou":o?.id)},previousPage:{label:function(t){switch(t){case"cart":return e.translate("general.back_to_cart");case"information":return e.translate("general.back_to_contact_information");case"shipping":return e.translate("general.back_to_shipping_method");case"payment":return e.translate("general.back_to_payment_method");case"buyWithPrime":return e.translate("wallets.return_to_store");default:return e.translate("general.back_button_label")}}(h?.id),route:h?.route}}}),[t,p,e,u.value,c,l.greenPath,d,m,C,E,x,I,A,g,f.value,y.value,N.value])}function jN(){const e=Fc();return i((()=>{const{plan:t}=e.value;return t.greenPath.some((({id:e})=>"review"===e))}))}function HN(){const{paymentLines:e}=Ge();return i((()=>{const t=Boolean(Ut(e.value,"SHOP_PAY")),n=Boolean(Ut(e.value,"SHOPIFY_INSTALLMENTS"));return To(e.value)&&!t&&!n}))}function $N(){const{i18n:e}=pe();return h(Vy,{children:h(Ry,{gap:"large-400",alignItems:"center",children:[h(fy,{children:h(_y,{size:"large",appearance:"monochrome"})}),h(gI,{children:e.translate("general.processing")})]})})}function YN(){const{progressing:e}=Uc(),{i18n:t,embed:n}=pe(),r=function(){const e=jN(),t=L(qN().nextPage.id),n=hy(),{checkout:{offsitePopupController:r}}=pe();return i((()=>!(!n.value||r.isOpen.value||e.value&&"thankYou"!==t.value)))}(),a=function(){const e=HN(),t=Fc(),n=L(qN().nextPage.id),{checkout:r}=pe(),a=r.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:o},walletUsedForSubmissionSignal:s}=Cn(),l=Ge().paymentLines;return i((()=>{if(!e.value)return!1;if(r.wallets.activeSession.value)return!1;const i=l.value;if(Ut(i,"PAYPAL_EXPRESS"))return!1;const c=Ut(i,"APPLE_PAY");return c?!o.value&&"APPLE_PAY"===s.value&&!!No(c)&&(a.value?"APPLE_PAY"!==r.wallets.escalatedWallet.value:"information"===t.value.currentPage?.id):a.value?!bc({paymentLines:i,walletUsedForSubmission:s.value}):"GOOGLE_PAY"===s.value?"information"===t.value.currentPage?.id:"thankYou"===n.value}))}(),o=Ge().paymentLines,s=i((()=>"google"===n?.embedder&&Boolean(Ut(o.value,"GOOGLE_PAY")))),l=i((()=>e.value&&(a.value||r.value)&&!s.value));return C((()=>{if(l.value)return xd({content:t.translate("general.processing")})})),h(A,{when:l,children:h($N,{})})}function WN(e){return function(t){return Object.fromEntries(Array.from(e).map((e=>[e,t[e]])))}}function GN(e){return function(t){return Object.fromEntries(Object.keys(t).filter((t=>!e.has(t))).map((e=>[e,t[e]])))}}function JN(){const{i18n:e,embed:t}=pe();return t?.isEmbeddedCheckout()?null:h("a",{href:`#${LE}`,className:"_9sntZ",children:e.translate("general.skip_to_content")})}function KN(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:n}}}=pe(),r=xw(),{checkoutProtocolModalEventSignal:i}=tt(),{lastJourneyProgression:o}=Pe(),u=s(!1);C((()=>{if(!si(e?.embedder))return;const t=o.value;"failed"!==t.type||"tooManyRequests"!==t.reason||u.current||(u.current=!0,c((()=>Wr(e,"too_many_requests"))))}));const d=a((()=>{r.value&&window.location.assign(r.value.toString())}),[r]);l((()=>()=>{i.value="none"}),[i]);const p="failed"===o.value.type&&"tooManyRequests"===o.value.reason,m=n&&r.value;return p?h(KI,{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:()=>{i.value="tooManyRequests"},children:h(Ry,{gap:"base",children:[h(Sy,{children:m?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),m&&h(b,{children:[h(fy,{display:"@media (inline-size >= small) none, block",children:h(xy,{variant:"primary",inlineSize:"fill",onClick:d,children:t.translate("too_many_requests.return_to_cart")})}),h(Dh,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:h(xy,{variant:"primary",onClick:d,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function QN(){const e=Tt(),{i18n:t}=pe(),n=i((()=>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=s(n.peek());return C((()=>{const e=n.value,t=r.current;if(r.current=e,e&&e!==t)return xd({content:e})})),null}var XN={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function ZN({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:i}){const a=Eu(),o=Rd(),s=e||o("processing");return a&&null==i?h(gI,{children:s}):h("progress",{id:t,className:P(XN.Progress,XN.toneVariant[r]),value:i,max:n,"aria-label":s})}function eL({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:i=!0}){const{i18n:a}=pe();l((()=>
2{if(e&&t)return xd({content:a.translate("general.processing")})}),[e,t,a]);const o=e&&i;return h(fy,{children:[h(fy,{inert:e,opacity:e&&"spinner"===r?70:void 0,children:n}),h("div",{className:Ne({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:o?1:0},"aria-hidden":!o,children:["progressbar"===r&&h("div",{className:Ne({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:h(ZN,{accessibilityLabel:a.translate("general.processing")})}),"spinner"===r&&h(fy,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:h(_y,{size:"large",accessibilityLabel:a.translate("general.processing")})})]})]})}function tL({children:e}){return h(Lo.Provider,{value:nL,children:e})}const nL=(e,t,n,r,i)=>({onInput:t=>{!function(e,t,r){(t.value||e)&&(r.value=!0,n(void 0))}(t,e,r)},onChange:t=>function(e,t){(t.value||e)&&(t.value=e)}(t,e),clearError:()=>n(void 0),onBlur:()=>function(e,t,n,r,i){const a=e.value;t.peek()&&function(e,t,n,r,i){if(!t)return;const a=n.value,o=c((()=>r.value));if(o&&e&&e===a)return;const s=t(e),l=s?{message:String(s?.message??s),origin:"client",type:"inline-validation"}:void 0;(function(e,t){return!t||!Ro(e)||e.message!==t.message})(o,l)&&i(l)}(a,i,e,n,r)}(e,r,t,n,i),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});var rL={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 iL=_(void 0);function aL({accessibilityLabel:e,accessibilityRole:t="section",accessibilityLabelledBy:n,background:r,border:i,borderRadius:a,borderStyle:s,borderWidth:l,children:c,className:u,colorLayer:d,colorScheme:p,containerName:m,display:g,heading:f,id:v,maxBlockSize:_,maxInlineSize:b,minBlockSize:k,minInlineSize:S,overflow:w,padding:C}){const E=y(iL),x="section"===t?(E?.level??0)+1:E?.level??0,I=o((()=>({level:x})),[x]),A=Ea(aE().pending??{}),{pending:T,pendingInsetsRows:N,rowsInset:L}=aE(),R=L||!0===N&&oL(A.padding),M=f?h(lL,{headingLevel:x,heading:f,children:c}):c,D=A.background??r,O=A.colorScheme??p,z="auto"===T?.border&&"subdued200"===D,B="control"===d?"base":"baseSpecified";return h(iE,{rowsInset:R,children:h(sL,{colorScheme:O,children:h(iL.Provider,{value:I,children:h(fy,{accessibilityLabel:e,accessibilityRole:"presentation"===t?void 0:t,"aria-labelledby":n,background:("base"===D?B:D)??(O?B:void 0),border:i,borderRadius:A.borderRadius??a,borderStyle:A.borderStyle??s,borderWidth:A.borderWidth??l,boxShadow:z?void 0:A.boxShadow,containerName:m,className:P(O&&rL.colorSchemeVariant[O],z&&rL.autoBorderVariant[A.boxShadow??"none"],z&&rL.autoBorderWidthVariant[T?.borderWidth??"base"],u),colorLayer:d||(O?"base":void 0),display:g,id:v,maxBlockSize:_,maxInlineSize:b,minBlockSize:k,minInlineSize:S,overflow:w,padding:A.padding??C,children:x>1&&"section"===t?h(td,{children:M}):M})})})})}function oL(e){return null!=e&&(Array.isArray(e)?e.some(oL):"object"==typeof e?Object.values(e).some(oL):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some((e=>""!==e&&"none"!==e)))}function sL({children:e,colorScheme:t}){const n=Tm(),{current:r}=n,i=o((()=>t&&t!==r?{parent:r,current:t}:n),[t,r,n]);return h(Am.Provider,{value:i,children:e})}function lL({headingLevel:e,heading:t,children:n}){let r;return 1===e?r="small":2===e?r="small-300":3===e&&(r="small-500"),e<4?h(Ry,{gap:r,children:[h(Ww,{children:t}),h("div",{children:n})]}):h(b,{children:[h(Ww,{children:t}),n]})}function cL(e){const{inlineSize:t}=YC(e),n=t+2,r=s(n);r.current=n;const i=f(2),o=s(null);return{ref:a((e=>{if(o.current?.disconnect(),o.current=null,!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver((([t])=>
2{if(!t)return;const n=t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width;if(0===n)return;const a=e.firstElementChild;if(!a)return;const o=parseFloat(getComputedStyle(a).columnGap)||0,s=Math.floor((n+o)/(r.current+o));i.value=Math.min(3,Math.max(1,s))}));t.observe(e),o.current=t}),[i]),max:i}}iL.displayName="SectionContext";const uL=e=>e.lineAllocations.map(((t,n)=>dL(e,n))),dL=(e,t)=>{const{lineAllocations:n,...r}=e,i=n[t];if(!i)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:pL(e.lineComponents,t),lineAllocation:i}},pL=(e,t)=>e.map((({lineAllocations:e,...n})=>{const r=e[t]??e[0];if(!r)throw new TypeError("Missing line allocation for merchandise line component");return{...n,lineAllocation:r}}));function mL(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function hL(e){return e.stableId}const gL=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function fL(e,t){const n=yL(t);if(null!=n)return e[n]}function yL(e){const t=gL.exec(e);if(null==t?.[1])return;const n=parseInt(t[1],10);return isNaN(n)?void 0:n}function vL(e,t,n){const r=new Set;for(const i of t){if(!n(i)||!("target"in i))continue;const t=fL(e,i.target);t?.stableId&&r.add(t.stableId)}return r}function _L(e,t=[]){return vL(e,t,(e=>Tv([e])||Nv([e])))}function bL(e,t=[]){for(const n of t)if(n.targetMerchandiseLines?.some((({stableId:t})=>e.includes(t)))&&"available"===n.status){const e=n.methods.find((({handle:e})=>e===n.selectedDeliveryMethodHandle));if(e?.title)return e.title}return null}function PL(e,t,n,r){const i=function(e,t){return[...new Set([...e.map(hL),...t.map(hL)])].map((n=>({proposed:e.find((e=>e.stableId===n)),negotiated:t.find((e=>e.stableId===n))})))}(e,t);if(r)return SL(i.filter(r));const a=_L(e,n??[]),o=function(e,t=[]){return vL(e,t,(e=>"MERCHANDISE_OUT_OF_STOCK"===e.code))}(e,n??[]);return SL(i.filter((e=>{if(function(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}(e))return!0;const t=(e.negotiated||e.proposed)?.stableId;return a.has(t)||o.has(t)})))}function kL(e,t,n){const r=e.filter((e=>function(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}(e)&&n.includes(e.code))).map((e=>fL(t?.lines,e.target))).filter((e=>void 0!==e));return 0===r.length?null:Array.from(new Map(r.map((e=>[e.stableId,e]))).values())}function SL(e){return e.flatMap((e=>Mo(e.proposed)||null==e.proposed?[e]:e.negotiated?[{proposed:void 0,negotiated:e.negotiated}]:[]))}function wL(){const e=pe().checkout.configuration.layout.isOnePage.value,t=ke(),{value:n}=t.merchandiseLines,{value:r}=t.allViolations,{currentDetour:i}=Fc().value,{value:a}=t.legacyRepresentProductsAsFees,o=Ge().merchandiseLines.value,[s]=u(o),l="stockProblems"===i?.type?s:o,c=n?.lines??[],d=e=>a?function(e){return e.filter((e=>!1===e.legacyFee))}(e):e;return function(e,t,n,r){const i=_L(t,r),a=n.filter((({quantity:e,stableId:t})=>e>0&&!i.has(t))),o=PL(t,n,r).map((({proposed:e,negotiated:t})=>t??e)),s=void 0===a||0===a.length&&o.length>0;return function(e,t,n,r){return e.flatMap((e=>{const i=t.find((({stableId:t})=>t===e.stableId)),a=n&&i?i.lineAllocations:e.lineAllocations;return uL({...e,lineAllocations:a}).map((t=>function({lineAllocation:e,...t},n,r){return{key:`${t.stableId}-${e.stableId}`,stableId:t.stableId,id:e.stableId,image:t.image,title:t.title,subtitle:t.subtitle,components:t.lineComponents.map(CL),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(EL).map((t=>xL(t,e.stableId)))}}(t,e,r)))}))}(s?o:a,t,s,e)}(e,"thankYou"===i?.type?[]:d(l),d(c),r??[])}const CL=e=>({properties:e.properties,quantity:e.lineAllocation.quantity,stableId:e.lineAllocation.stableId,totalAmountBeforeReductions:e.lineAllocation.checkoutPriceBeforeReductions,merchandise:{deferredAmount:e.deferredAmount,digest:e.digest,disclosures:e.disclosures,giftCard:e.giftCard,image:e.image,options:e.options,itemPrice:e.itemPrice,productType:e.productType,productId:e.productId,vendor:e.vend
2or,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),EL=e=>Zl(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel,xL=(e,t)=>({id:`allocation-${t}-${Do(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function IL(){const{checkout:e}=pe(),t=e.configuration.layout.isOnePage.value,n=(e.proposal.facts.merchandiseLines??[]).filter((e=>(e?.quantity??-1)>0)).map(((e,t)=>({key:`${t}${e.title}`,title:e.title,properties:e.properties,image:TL(e.image)??void 0,totalAmountAfterLineDiscounts:e.priceAfterDiscounts,totalAmountBeforeReductions:e.price,quantity:e.quantity,subtitle:e.variantTitle,lineDiscounts:e.appliedDiscounts.filter(AL).map((e=>NL(e,t))),parentTitle:e.parentTitle,components:[],unitPrice:null,totalPrice:e.priceAfterDiscounts}))),r=wL();return[...t?r.filter((e=>e.quantity>0)):r,...n]}const AL=e=>"LINE"===e.presentationLevel,TL=e=>e?{...e,altText:e.altText||""}:null,NL=(e,t)=>({id:`allocation-${t}-${Do(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function LL(){const e=L(IL()),t=ke().remoteMerchandiseDetails,{shop:{id:n}}=pe();return i((()=>{const r=t.value?.stableIdToShopId??new Map,i=r.values(),a=new Map([[n,[]]]);for(const e of i)a.set(e,[]);const o="PurchaseOrderMerchandiseTerms"===t?.value?.mergedBuyerProposalMerchandise?.__typename&&t.value.mergedBuyerProposalMerchandise.merchandiseLines?t.value.mergedBuyerProposalMerchandise.merchandiseLines.map((e=>"PurchaseOrderMerchandiseLine"===e.__typename&&"ProductVariantSnapshot"===e.merchandise.__typename?{key:e.stableId,stableId:e.stableId,id:e.merchandise.variantId??null,image:Vo(e.merchandise.image),title:e.merchandise.productTitle,subtitle:e.merchandise.title??null,quantity:e.quantity.items,properties:Bo(e.merchandise.properties),options:e.merchandise.options??[],itemPrice:zo(e.merchandise.price),totalAmountBeforeReductions:zo(e.merchandise.price),totalAmountAfterLineDiscounts:zo(e.merchandise.price),totalPrice:zo(e.merchandise.price),deferredAmount:e.merchandise.deferredAmount?zo(e.merchandise.deferredAmount):void 0,sellingPlan:Oo(e.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0)).filter((e=>Boolean(e))):[];for(const t of[...e.value,...o]){if(!t.stableId){a.get(n)?.push(t);continue}const e=r.get(t.stableId);e?a.get(e)?.push({...t,hideRuntimeExtensions:!0}):a.get(n)?.push(t)}return a}))}var RL={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 ML=xu("ResourceList");function DL({children:e,title:t,titleHidden:n,spacing:r="base",border:i="none"}){const a=Iu(void 0,ML),s=P(RL.ResourceList,r&&RL.rowGroupSpacingVariant[r],i&&RL.borderVariant[i]),l=t?h(Ww,{id:a,children:t}):null,c=o((()=>({spacing:r})),[r]);return h(b,{children:[t&&n?h("div",{className:RL.visuallyHidden,children:l}):l,h(td,{children:h("div",{role:"table","aria-labelledby":a,className:s,children:h(BL.Provider,{value:c,children:e})})})]})}function OL({children:e,hidden:t,blockPadding:n}){const r=P(RL.ResourceListHeader,n&&!t&&RL.resourceListHeaderBlockPaddingVariant[n]);return h("div",{role:"rowgroup",className:P(RL.ResourceListRowGroup,t&&RL.resourceListHeaderHidden),children:h("div",{role:"row",className:r,children:e})})}function zL({children:e,primary:t,hidden:n}){return h("div",{role:"columnheader",className:P(t?RL.primary:void 0,n&&RL.visuallyHidden),children:e})}const BL=_(void 0);function VL({children:e}){return e?h("div",{role:"rowgroup",className:RL.ResourceListRowGroup,children:e}):null}const FL=_(void 0);function UL({spacing:e,children:t,showLines:n=!0}){const r=o((()=>({spacing:e})),[e]),i=o((()=>({showLines:n})),[n]);return h(BL.Provider,{value:r,children:h(FL.Provider,{value:i,children:t})})}function qL({lineOffset:e=0}){const t=y(FL);
2return h("div",{"aria-hidden":!0,className:RL.ResourceItemLineContainer,style:S({[RL.lineOffsetVar]:Ae(e)}),children:[h("div",{className:P(RL.ResourceItemLine,RL.ResourceItemLineVertical,t?.showLines&&RL.visibleLine)}),h("div",{className:P(RL.ResourceItemLine,RL.ResourceItemLineCurved,t?.showLines&&RL.visibleLine)})]})}function jL({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:i,minBlockSize:a,noWrap:o}){const{lineItems:s}=Ah(),l=t??s?.inlineAlignment??"center",{className:c,style:u}=Ch({minBlockSize:a}),d=P(RL.ResourceItemContent,RL.resourceItemContentInlineAlignment[l],e&&RL.resourceItemContentAlignSelf[e],r&&RL.resourceItemContentPrimary,i&&RL.resourceItemContentHidden,o&&RL.resourceItemContentNoWrap,c);return h("div",{role:"cell",className:d,style:u,children:i?h("div",{className:RL.visuallyHidden,children:n}):n})}function HL({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:i}){const a=y(BL),o=y(FL);a||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const s=P(RL.ResourceItem,t&&RL.resourceItemBlockPaddingVariant[t],a?.spacing&&RL.rowSpacingVariant[a.spacing],n&&RL.resourceItemSpacingVariant[n],o&&RL.groupedResourceItem,i);return h("div",{role:"row",className:s,children:[h(qL,{lineOffset:r}),e]})}var $L={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 YL({accessibilityLabel:e,accessibilityVisibility:t,children:n,color:r="base",borderRadius:i="fullyRounded",display:a="block",icon:o,iconPosition:s="start",id:l,size:c="base",tone
2:u="auto",visibility:d}){const p=o?h(Uh,{size:c,type:o,tone:WL(u)}):null,m=h(b,{children:["start"===s?p:null,h("span",{children:n}),"end"===s?p:null]});return h("div",{id:l,className:P($L.Badge,$L.displayVariant[o?`${a}Grid`:`${a}Flex`],$L.toneColorVariant["auto"===u?"neutral":u][r],$L.sizeVariant[GL(c)],$L.borderRadiusVariant[i],o&&$L.iconVariant,"hidden"===d&&$L.visuallyHidden),"aria-hidden":"hidden"===t||void 0,children:e?h(b,{children:[h("span",{className:$L.visuallyHidden,children:e}),m]}):m})}function WL(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function GL(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function JL(e,t){for(const n of t){const t=n.lineAllocations.findIndex((t=>t.stableId===e)),r=n.lineAllocations[t];if(t>=0&&r)return{lineAllocation:r,parent:n,index:t}}return null}function KL({stableId:e,merchandiseLines:t}){if(!e)return null;const n=JL(e,t);if(!n)return null;const{parent:r,index:i}=n;return dL(r,i)}function QL(){const{i18n:e}=pe();function t(t){return e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})}return function({fixedPrice:n,recurringPrice:r,fixedPriceCount:i,interval:a,intervalCount:o}){const s=(()=>{switch(a){case"year":return e.translate("subscriptions.recurring_total_intervals.year",{count:o});case"month":return e.translate("subscriptions.recurring_total_intervals.month",{count:o});case"week":return e.translate("subscriptions.recurring_total_intervals.week",{count:o});case"day":return e.translate("subscriptions.recurring_total_intervals.day",{count:o});default:return""}})();return n&&i?function(t,n,r,i){return`${e.translate("subscriptions.recurring_totals_with_policies.first_cycles",{count:r,total_price:n})}${e.translate("subscriptions.recurring_totals_with_policies.following_cycles",{total_price:t,interval:i})}`}(t(r),t(n),i,s):e.translate("subscriptions.recurring_totals",{total_price:t(r),interval:s})}}function XL(){const e=QL();return function(t){return t?t.map(e):void 0}}function ZL({available:e,name:t,value:n}){const r=`${t}: ${n}`;return"string"==typeof n&&0===n.lastIndexOf("https://cdn.shopify.com",0)?h(Ny,{href:n,children:h(eR,{condition:e,children:h(Sy,{size:"small",color:"subdued",children:t})})}):h(eR,{condition:e,children:h(Sy,{size:"small",color:"subdued",children:r})})}function eR({condition:e,children:t}){return!1===e?h(Sy,{type:"redundant",children:t}):t}function tR({properties:e,available:t}){const n=e.flatMap((({name:e,visible:n,value:r,sourceType:i})=>n&&"MerchandisePropertyValueJson"!==i&&""!==r&&null!==r?[h(fy,{accessibilityRole:"list-item",children:h(ZL,{available:t,name:e,value:r})},e)]:[]));return n.length>0?h(Ry,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}function nR({id:e,deferredAmount:t,options:n,properties:r,recurringTotal:a,sellingPlan:s,subtitle:l,title:c,titleSize:u,totalPrice:d,children:p,titleAccessory:m,blockLayoutContent:g,remoteShopName:f,hasFailed:y,hideRuntimeExtensions:v}){const{lineItems:{optionsColor:_="subdued",optionsFormat:b="inline",optionsSeparator:P="comma",optionsTypography:k={},titleTypography:S={}}}=Ah(),w=o((()=>e&&!v?{stableId:e}:null),[e,v]),C=u??"small",E=k.size??"small",{i18n:x}=pe(),I=n&&n.length>0,A="middot"===P?" · ":", ",T=QL(),{value:N}=ke().merchandiseLines,L=Fc(),R=mE(i((()=>"thankYou"===L.value.currentDetour?.type?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter")).value),M=function({stableId:e,merchandiseLines:t}){const n=KL({stableId:e,merchandiseLines:t});return!n?.variantId}({stableId:e,merchandiseLines:N?.lines??[]})?[]:R,D={size:E,color:_},O={size:E,color:_};return h(fy,{className:"dDm6x",children:[f||y?h(Ry,{direction:"inline",gap:"small-300",children:[f?h(Sy,{size:"small",color:"subdued",children:f}):null,y?h(YL,{icon:"alert-circle",tone:"critical",children:x.translate("order_summary.unconfirmed_label")}):null]}):null,h(gI,{size:C,children:[h(rR,{condition:"bold"===S.weight,children:c}),m]}),h(Ry,{children:[g,"inline"===b&&l?h(gI,{...O,children:l}):null,"inlineDescriptionList"===b&&I?h(gI,{...O,children:n?.map((({name:e,value:t})=>`${e}: ${t}`)).join(A)}):null,"descriptionList"===b&&I?h(fy,{accessibilityRole:"unordered-list",children:n?.map((({name:e,value:t})=>h(fy,{accessibilityRole:"list-item",children:h(Sy,{...D,children:`${e}: ${t}`})},e)))}
2):null,s?.name?h(gI,{...O,children:s.name}):null,a&&a.fixedPrice&&a.fixedPriceCount?h(gI,{...O,children:T(a)}):null,r&&h(tR,{properties:r}),p,w?h(bN,{customizations:M,options:w}):null]})]})}function rR({condition:e,children:t}){return e?h(Sy,{type:"strong",children:t}):t}const iR=x({displayName:"ProductDisclosuresDetails",load:()=>t((()=>Dl((()=>import("./23bd7c1a.CjFR6Gpg.js")),__vite__mapDeps([212,1,2,3,4,5,6,7,8,9])))),suspense:!1});var aR={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 oR=Th((function({source:e,src:t,srcSet:n,sizes:r,alt:i="",objectFit:a="contain",loading:o="eager",aspectRatio:s="1/1",accessibilityRole:c="img",border:d="none",borderRadius:p="none",borderStyle:m,borderWidth:g,className:f,id:y,inlineSize:v="fill",onError:_}){const b=["presentation","none"].includes(c),{className:k}=Ch({...Fe({border:d,borderStyle:m,borderWidth:g}),borderRadius:p,objectFit:a}),w=zC(t,e),C=!(t||e||n),E=t??BC(e)??n??"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",[x,I]=u(C);l((()=>{if(!C)return void I(!1);const e=setTimeout((()=>I(!1)),100);return()=>{clearTimeout(e)}}),[C]);const{animationEnabled:A,delay:T,onAnimationStart:N,onAnimationIteration:L}=GC(),R=_?{onError:e=>_(e.nativeEvent)}:{};return h(sR,{condition:b,children:h(lR,{condition:"auto"!==v,aspectRatio:s,children:h(DC,{condition:Boolean(w),children:[w,h("img",{...R,src:E,srcSet:n,sizes:r,className:P(aR.Image,aR.inlineSizeVariant[v],C&&A&&aR.skeleton,C&&x&&aR.hidden,k,f),style:{...S({[aR.vars.animationDelay]:`${T}ms`,[aR.vars.animationDuration]:"4000ms"})},onAnimationStart:N,onAnimationIteration:L,loading:o,id:y,role:b?c:void 0,alt:b?"":i,"aria-hidden":C?"true":void 0})]})})})}));function sR({children:e,condition:t}){return t?h(fy,{accessibilityVisibility:"hidden",children:e}):h(b,{children:e})}function lR({children:e,condition:t,aspectRatio:n}){const r=function(e){if("number"==typeof e)return e;if(null==e||"string"!=typeof e||"auto"===e)return;if(e.includes("/")){const t=0,[n,r]=e.split("/").map((e=>{const t=Number(e);return isNaN(t)||""===e.trim()?void 0:t}));if(void 0!==n&&n>t&&void 0!==r&&r>t)return n/r}const t=Number(e);return isNaN(t)?void 0:t}(n);return t&&void 0!==r?h("div",{className:P(aR.Wrapper,aR.aspectRatio),style:S({[aR.aspectRatioVar]:`${r}`}),children:e}):h(b,{children:e})}const cR={small:16,large:24};function uR({disclosure:e,size:t}){const n=e.symbol;if(n){const e=`${cR[t]}px`,r="small"===t?"":n.altText??"";return h(fy,{inlineSize:e,blockSize:e,children:h(oR,{src:n.one,srcSet:`${n.one} 1x, ${n.two} 2x, ${n.four} 4x`,alt:r,accessibilityRole:"small"===t?"presentation":"img",aspectRatio:"1/1",objectFit:"contain"})})}return h(Uh,{type:"info",size:"small"===t?"small":"large-100",tone:"auto"})}const dR=xu("product-disclosure-modal-"),pR=xu("product-disclosure-tooltip-");function mR({disclosures:e,title:t}){const n=Pe(),r=dA("deliveryNext");return i((()=>!r.value&&(0===n.initialUnresolvedFields.value.size||"fetch_failed"===n.pendingFieldsNegotiation.value?.status))).value&&e?.length?h(hR,{disclosures:e,title:t}):null}function hR({disclosures:e,title:t}){const{i18n:n}=pe(),r=Iu(void 0,dR),i=Iu(void 0,pR),a=iR.usePrefetch(),o=()=>{a()},s=n.translate("order_summary.product_disclosures.title"),l=n.translate("tooltip.accessibility_label_context",{context:t});return h(b,{children:[h(Ny,{commandFor:r,interestFor:i,accessibilityLabel:l,onFocus:o,onMouseEnter:o,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:h(Uh,{type:"alert-triangle",size:"small"})}),h($m,{id:i,children:gR(e)}),h(KI,{id:r,heading:s,children:h(iR,{disclosures:e})})]})}function gR(e){return h(fy,{inlineAlignment:"start",children:h(Ry,{gap:"small-200",children:e.map((e=>h(Dh,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[h(Dh,{blockSize:"1lh",placeItems:"center",children:h(uR,{disclosure:e,size:"small"})}),h(gI,{textAlign:"start",children:e.title})]},e.id)))})})}function fR(e,t){if(t)return e?.embedder?{default:t.two,one:t.two,two:t.four,four:t.four}:{default:t.one,one:t.one,two:t.two,four:t.four}}function yR({amount:e}){const{i18n:t}=pe();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 h(gI,{type:"small",color:"subdued",children:r})}const vR=_(null);var _R="_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u";function bR({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:i}=y(vR)??{};return e?void 0!==r?h("button",{id:t,className:_R,onClick:n,"aria-controls":i,"aria-expanded":r,type:"button",children:[e,h(Uh,{size:"small-200",type:r?"chevron-up":"chevron-down",className:"_1mwdekd3 _1mwdekd2 _1fragem6e"})]}):h("p",{id:t,className:_R,children:e}):null}const PR=xu("Details"),kR=function(e){const t=k((function(t,n){const{open:r,defaultOpen:i=!1,onToggle:o,id:s}=t,{upsertInteraction:c,deleteInteraction:d}=wp(),[p,m]=u(i),g=r??p,f=a((()=>{const e=g?"open":"closed",t=g?"closed":"open";void 0===r&&m(!g),o?.(e,t)}),[g,o,r]),y=a((()=>{g&&(void 0===r&&m(!1),o?.("open","closed"))}),[g,o,r]),v=a((()=>{g||(void 0===r&&m(!0),o?.("closed","open"))}),[g,o,r]);return l((()=>()=>{s&&d(s)}),[s]),l((()=>{s&&c({id:s,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:y,show:v,toggle:f,visible:g})}),[s,g,y,v,f,c]),h(e,s&&void 0===r?{...t,open:p,onToggle:f,ref:n}:{...t,ref:n})}));return t.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,t}((function({open:e,defaultOpen:t=!1,onToggle:n,onAfterToggle:r,id:i,summary:l,content:c,toggleTransition:d="auto"}){const p=void 0!==e,[m,g]=u(t),f=p?e:m,y=`${Iu(i,PR)}-content`,v=s(),_=a((e=>{e?.preventDefault();const t=e=>{"function"==typeof n&&n(e?"open":"closed",e?"closed":"open")};p?t(f):g((e=>(t(e),!e)))}),[p,f,n]);(!c||Array.isArray(c)&&c.length<1)&&console.warn("Details: content is required for toggle functionality");const b="string"==typeof l?h(bR,{children:l}):l,P=o((()=>({isOpen:f,onToggle:_,contentId:y})),[y,_,f]);return h(vR.Provider,{value:P,children:h("div",{id:i,children:[b,h(pp,{id:y,open:f,duration:"auto"===d?"base":"none",onTransition:e=>{const t="entering"===v.current&&"entered"===e,n="exiting"===v.current&&"exited"===e;(t||n)&&"function"==typeof r&&r(t?"closed":"open",t?"open":"closed"),v.current=e},children:c})]})})}));function SR({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignSelf:r="auto",background:i="transparent",backgroundHoverAndFocus:a,blockSize:o="auto",border:s="none",borderColor:l,borderRadius:c="none",borderStyle:u,borderWidth:d,children:p,display:m="auto",gridColumn:g="auto",gridRow:f="auto",id:y,inlineSize:v="auto",maxBlockSize:_="none",maxInlineSize:k="none",minBlockSize:S="0",minInlineSize:w="0",overflow:C="visible",padding:E="none",paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:N,paddingInlineStart:L}){const R=lp(),{Element:M,role:D}=Mh(t,{defaultElement:R?"span":"div"}),{className:O,style:z,styleElement:B}=Ch({alignSelf:r,backgroundColor:i,backgroundColorHoverAndFocus:a,blockSize:o,...Fe({border:s,borderColor:l,borderStyle:u,borderWidth:d}),borderRadius:c,display:m,gridColumn:g,gridRow:f,inlineSize:v,maxBlockSize:_,maxInlineSize:k,minBlockSize:S,minInlineSize:w,padding:E,paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:N,paddingInlineStart:L},{transforms:{display:Zd}});return h(b,{children:[B,h(M,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:P("exclusive"===n&&"_1r0jjrp1 _1fragem121","hidden"===C&&"_1r0jjrp0 _1fragemup _1fragemv4",O),id:y,role:D,style:z,children:p})]})}const wR={auto:"block",inline:"inlineBlock",block:"block"},CR=e=>"auto"===e?"auto":e in eh?eh[e]:void 0,ER=e=>wR[e];function xR({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:i,style:a}=Ch({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:CR,display:ER,inlineSize:CR}});return h("div",{className:P(i),id:r,style:a})}function IR({components:e,id:t}){const n=e.some((({merchandise:e})=>e.disclosures?.length)),[r,i]=u(e.length<=10||n),s=a((()=>{i((e=>!e))}),[]),{i18n:l,embed:c}=pe(),{lineItems:{optionsColor:d="subdued"}}=Ah(),p={size:"small",color:d},m=mE("Checkout::CartLineDetails::RenderLineComponents"),g=o((()=>e.reduce(((e,{quantity:t})=>e+t),0)),[e]),f=o((()=>t?{stableId:t}:null),[t]);if(0===e.length)return null;if(f&&m.length>0){const t=e.filter((({merchandise:e})=>e.disclosures?.length));return h(Ry,{gap:"base",overflow:"hidden",children:[h(bN,{customizations:m,options:f}),t.map((({stableId:e,merchandise:t})=>h(Sy,{size:"small",children:[t.title," ",h(mR,{disclosures:t.disclosures,title:t.title})]},e)))]})}const y=r?l.translate("order_summary.collapse_component_information",{count:g}):l.translate("order_summary.expand_component_information",{count:g});return h(b,{children:[h(kR,{open:r,onToggle:s,summary:h(bR,{children:h(Sy,{color:"subdued",size:"small",children:y})}),content:h(fy,{paddingBlockStart:"small-400",children:h(Ry,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map((({stableId:e,merchandise:{title:t,subtitle:n,image:r,sellingPlan:i,disclosures:a},quantity:o,properties:s})=>{const u=l.translate("order_summary.component_quantity_title",{quantity:o,product_title:t}),d=fR(c,r);return h(Dh,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[h(SR,{alignSelf:"start",children:h(UC,{size:"small",src:d?.one,srcSet:d?`${d.one} 1x, ${d.two} 2x, ${d.four} 4x`:void 0,alt:r?.altText})}),h(SR,{alignSelf:"center",children:h(Ry,{children:[h(Sy,a?.length?{size:"small",children:[u," ",h(mR,{disclosures:a,title:t})]}:{size:"small",children:u}),n&&h(Sy,{...p,children:n}),i&&h(Sy,{...p,children:i.name}),s&&h(tR,{properties:s})]})})]},e)}))})})}),h(xR,{blockSize:"small-400"})]})}function AR({parentTitle:e}){const{i18n:t}=pe(),{lineItems:{optionsColor:n}}=Ah(),r={type:"small",color:n??"subdued"},i=t.translate("order_summary.group_title_label",{group_title:e});return h(gI,{...r,children:i})}function TR(e){return!0===e.checkoutHideZeroValueDiscountLines}function NR({discount:e,amount:t}){const{i18n:n,shop:r}=pe();if(TR(r)&&0===t.amount)return null;const i=t.amount>0?`(${n.formatCurrency(-t.amount,{currency:t.currencyCode,form:"short"})})`:null,a=("code"===e.type&&e.codeHidden?n.translate("order_summary.discount_title"):e.title).toUpperCase();return h(Dh,{gridAutoFlow:"column",gridAutoColumns:"1fr",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[h(Uh,{type:"discount",size:"small"}),h(Sy,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),h(gI,{type:"small",color:"subdued",children:[h(Sy,{dir:"auto",children:a}),i?` ${i}`:null]})]},e.title)}function LR({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=pe(),i=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):h(Sy,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return h(b,{children:[h(Sy,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),h(Sy,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),h(Sy,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),h(gI,{size:n,children:i})]})}function RR({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:i,hasFailed:a,size:o}){const{i18n:s}=pe(),{lineItems:{priceTypography:l={}}}=Ah();let c;if(a?c="redundant":"bold"===l.weight&&(c="strong"),n&&e.amount<n.amount)return h(LR,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:o});if(e.amount>t.amount&&"LINE"===r)return h(LR,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:o});const u=0===e.amount&&!i,d=t;return h(Sy,{translate:u,letterCase:u?"uppercase":void 0,type:c,tone:a?"critical":void 0,size:o,children:u?s.translate("order_summary.free_total_label"):s.formatCurrency(d.amount,{currency:d.currencyCode,form:"short"})})}function MR({unitPrice:e}){const t=function(e){const{i18n:t}=pe(),n=function(){const{i18n:e}=pe();return a((t=>{switch(t){case"MG":return e.translate("units.milligram");case"G":return e.translate("units.gram");case"KG":return e.translate("units.kilogram");case"ML":return e.translate("units.milliliter");case"CL":return e.translate("units.centiliter");case"L":return e.translate("units.liter");case"M3":return e.translate("units.cubic_meter");case"MM":return e.translate("units.millimeter");case"CM":return e.translate("units.centimeter");case"M":return e.translate("units.meter");case"M2":return e.translate("units.square_meter");case"OZ":return e.translate("units.ounce");case"LB":return e.translate("units.pound");case"FLOZ":return e.translate("units.fluid_ounce");case"PT":return e.translate("units.pint");case"QT":return e.translate("units.quart");case"GAL":return e.translate("units.gallon");case"IN":return e.translate("units.inch");case"FT":return e.translate("units.foot");case"YD":return e.translate("units.yard");case"FT2":return e.translate("units.square_foot");case"ITEM":return e.translate("units.item");default:return t}}),[e])}();if(null===e)return"";const{referenceValue:r,referenceUnit:i}=e.measurement,o=n(i),s=r.toString(),l=t.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if("ITEM"===i){if(1===r)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(1===r)return t.translate("order_summary.unit_price.per_unit.single",{price:l,unit:o});if(r>1)return t.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:o,count:s})}return""}(e);return null===e?null:h(gI,{type:"small",color:"subdued",children:t})}function DR({unitPrice:e,itemPrice:t,quantity:n}){const r=ke().buyerIdentity.value?.purchasingCompany,i=Boolean(r)&&!e&&n>1&&t,{i18n:a}=pe();return e?h(MR,{unitPrice:e}):i?h(b,{children:h(gI,{type:"small",color:"subdued",children:[h(Sy,{accessibilityVisibility:"hidden",children:a.translate("order_summary.price_per_item.label",{price:a.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),h(Sy,{accessibilityVisibility:"exclusive",children:a.translate("order_summary.price_per_item.accessibility_label",{price:a.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const OR={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function zR(e="base"){return OR[e]}function BR(e){const t=e.parentRelationship;return h(t?UL:b,{spacing:"small100",children:h(VR,{...e})})}function VR({id:e,quantity:t,itemPrice:n,compareAtPrice:r,unitPrice:i,lineDiscounts:a,deferredAmount:s,totalPrice:l,sellingPlan:c,options:u,recurringTotal:d,title:p,subtitle:m,image:g,properties:f,disclosures:y,isHsaEligible:v,totalAmountBeforeReductions:_,totalAmountAfterLineDiscounts:P,components:k,hasReturnability:S,parentTitle:w,parentRelationship:C,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,hidePrice
2:A,className:T}){const{shop:N,i18n:L,embed:R}=pe(),M=fR(R,g),{lineItems:{quantityVisibility:D="visible",priceLayout:O="inline",priceTypography:z={},titleTypography:B={}},merchandiseThumbnail:{size:V}={}}=Ah(),F=N.hasFlagEnabled(Fo),U=null!==C,q=F&&r?{amount:r.amount*t,currencyCode:r.currencyCode}:null,j=o((()=>{if(F&&r&&n){const e=(r.amount-n.amount)*t;return e>0?{amount:e,currencyCode:r.currencyCode}:null}return null}),[F,r,n,t]),H=z.size,$=U?"small":zR(V),Y=B.size??"base",{blockSize:W}=YC($),G="hidden"===D||1===t&&"visibleWhenMultiple"===D?void 0:t,J=A?null:h(RR,{totalAmountBeforeReductions:_,totalAmountAfterLineDiscounts:P,compareAtTotal:q,presentationLevel:a.length||j?.amount?"LINE":"CART",hasDeferredAmount:Boolean(s?.amount),hasFailed:x,size:H});return h(HL,{className:T,lineOffset:C?0:W/2,children:[h(jL,{inlineAlignment:"start",children:h(UC,{size:$,src:M?.one,srcSet:M?`${M.one} 1x, ${M.two} 2x, ${M.four} 4x`:void 0,alt:g?.altText,totalItems:G})}),h(jL,{primary:!0,alignSelf:"baseline",minBlockSize:`${W}px`,children:h(nR,{id:e,title:p,titleSize:Y,subtitle:m,properties:f,sellingPlan:c,options:u,recurringTotal:d,totalPrice:l,deferredAmount:s,titleAccessory:y?.length?h(b,{children:[" ",h(mR,{disclosures:y,title:p})]}):void 0,blockLayoutContent:"block"===O?J:void 0,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,children:[v?h(Sy,{size:"small",color:"subdued",children:L.translate("payment.shop_pay_hsa.eligible_product")}):null,S?h(Sy,{size:"small",color:"subdued",children:L.translate("amazon_pay.prime_returnability")}):null,h(DR,{unitPrice:i,itemPrice:n,quantity:t}),j?.amount?h(yR,{amount:j}):null,a.length>0||k.length>0?h(b,{children:[a.map((e=>h(NR,{discount:e.discount,amount:e.amount},e.id))),h(IR,{components:k,id:e})]}):null,k.length<1&&w?h(AR,{parentTitle:w}):null]})}),h(jL,{hidden:!0,children:h(Sy,{children:t})}),"inline"===O?h(jL,{alignSelf:"baseline",children:h(fy,{className:"VnYYd",inlineAlignment:"end",children:J})}):null]})}function FR(e){switch(e){case"PICK_UP":return"kAxbv";case"SHIPPING":return"KKoGf";default:return}}function UR(e){return e!==qe.Country&&e!==qe.CountryProvince}function qR({deliveryMethod:e,localDelivery:t,subscriptionDelivery:n}){const{title:r,carrierName:i}=e;return t||n||(!i||r.toLowerCase().includes(i.replace(/[^\w\s]/,"").toLowerCase())?r:`${i} ${r}`)}function jR(e,t,n,r,i){const a=Jv(n??[],e?.handle);let o,s,l,c,u=function(e,t,n,r){return t?"unavailable"===n||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}(e?.displayCheckoutRedesign,t,i,a);return r||(o=a?.minDeliveryDateTime||e?.minDeliveryDateTime,s=a?.maxDeliveryDateTime||e?.maxDeliveryDateTime,l=function(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}(a,e?.deliveryPromisePresentmentTitle),c=a?.brandedPromise||e?.brandedPromise,a?.minDeliveryDateTime&&a?.maxDeliveryDateTime&&t&&!c&&(u=!0)),{showEstimatedDeliveryLabel:u,asyncShopPromiseEnabled:t,deliveryExpectationDateTime:a?.minDeliveryDateTime&&a?.maxDeliveryDateTime,estimatedDeliveryLabelTitle:l,minDeliveryDate:o,maxDeliveryDate:s,brandedPromise:c}}function HR(e){const t=[],n=[];return e.forEach((e=>{"SUBSCRIPTION"===e.type?t.push(e):n.push(e)})),{subscriptionLines:t,oneTimePurchaseLines:n}}function $R(e,t,n){const r=Jv(t,e.handle);let i;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(i=r),{deliveryExpectation:i,shopPromise:r?.brandedPromise}}function YR(e){return e.reduce(((e,{quantity:t})=>e+t),0)}function WR(e){return Object.values(e.reduce(((e,t)=>{const{id:n,stableId:r,quantity:i}=t,a=n||r;return a?(e[a]?e[a].quantity+=i:e[a]={...t},e):e}),{}))}function GR(e){if(!e)return[];const t=e.reduce(((e,t)=>{const n=t?.flatRateGroupId??Uo(),r=e[n];if(r){const e=r.targetMerchandiseLines.map((e=>e.digest));t.targetMerchandiseLines.filter((t=>!e.includes(t.digest))).forEach((e=>r.targetMerchandiseLines.push(e)))}else e[n]=t;return e}),{});return Object.values(t)}function JR(e,t){const n=s(null),r=s(new Set),i=new Set(e),a=n.current,o=null==t?null:new Set(t);if(null!=a){for(const e of i)a.has(e)||null!=o&&!o.has(e)||r.current.add(e);for(const e of r.current)i.has(e)||r.current.delete(e)}return n.current=i,r.current}const KR={position:"end",source:"magnify"};function QR({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:r,deliveryGroup:i}){const[a,s]=u(""),{i18n:l,checkout:c}=pe(),d=new Set(jo(c.proposal.negotiated.fields.paymentMethods.value)),p=void 0===t?n.map((e=>e.key)):n.slice(0,t).map((e=>e.key)),m=JR(n.map((e=>e.key)),p),g=FR(i),{value:f}=ja(),{value:y}=ke().deliveryExpectations,v=o((()=>function({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=function(e){const t={};
2return e?.deliveryExpectationLines?.forEach((e=>{e.deliveryStrategyHandle&&(t[e.deliveryStrategyHandle]=e)})),t}(t);return e.forEach((e=>{if("available"!==e.status)return;const t=e.methods.find((t=>t.handle===e.selectedDeliveryMethodHandle));if(!t)return;const{brandedPromise:i,handle:a}=t;if(!i)return;if(i.handle!==qo)return;const o=r[a],s=o?.returnability??!1;e.targetMerchandiseLines?.forEach((e=>n[e.stableId]={brandedPromise:i,hasReturnability:s}))})),n}({deliveryLines:f,deliveryExpectations:y})),[f,y]),_=o((()=>{const e=a.toLowerCase().split(" ").filter(Boolean);return n.filter((t=>e.every((e=>t.title.toLowerCase().includes(e)||t.subtitle?.toLowerCase().includes(e)))))}),[a,n]),P=o((()=>_?.reduce(((e,t)=>e+t.quantity),0)),[_]),k=n.length;return h(b,{children:[e&&h(b,{children:[h(NT,{autoFocus:!0,icon:KR,controlledValue:a,onInput:e=>s(e),label:l.translate("order_summary.more_items_modal.search_item")}),h(xR,{blockSize:"large-300"})]}),e&&a&&h(b,{children:[h(Ry,{direction:"inline",justifyContent:"space-between",children:[h(Sy,{color:"subdued",children:l.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:P,totalNumber:r||k||0})}),h(Ny,{onClick:()=>s(""),children:l.translate("order_summary.more_items_modal.clear_search")})]}),h(xR,{blockSize:"large-300"})]}),e&&0===_.length?h(Ry,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[h(fy,{inlineSize:"56px",children:h(Uh,{size:"fill",type:"alert-circle"})}),h(gI,{textAlign:"center",children:l.translate("order_summary.more_items_modal.empty_results",{searchText:a})})]}):h(DL,{title:l.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[h(OL,{hidden:!0,children:[h(zL,{hidden:!0,children:l.translate("order_summary.product_image_label")}),h(zL,{hidden:!0,children:l.translate("order_summary.description_label")}),h(zL,{hidden:!0,children:l.translate("order_summary.quantity_label")}),h(zL,{hidden:!0,children:l.translate("order_summary.price_label")})]}),h(VL,{children:_.map((({key:e,...n},r)=>{if(void 0!==t&&r>=t)return null;const i=e.substring(0,e.lastIndexOf("-"));return h(BR,{...n,isHsaEligible:Boolean(n.productId&&d.has(n.productId)),...v[i]??{},className:m.has(e)?g:void 0},e)}))})]})]})}function XR({merchandiseLines:e,modalId:t="merchandise-lines-modal",totalLineQuantities:n,deliveryGroup:r}){const{i18n:i}=pe(),a=e.length,o=a>16?12:16;return h(b,{children:[h(QR,{maxItems:o,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),a>o&&h(Ry,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[h(xy,{inlineAlignment:"center",commandFor:t,children:i.translate("order_summary.view_all_items",{count:n||a||0})}),h(KI,{id:t,heading:i.translate("order_summary.number_items",{count:n||a||0}),blockSize:"100%",children:h(QR,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function ZR({merchandiseLinesByDeliveryType:e}){const{i18n:t}=pe(),n=i((()=>{const t=new Set;return Array.from(e.value.entries()).map((([e,n])=>({group:e,merchandiseLines:n.map((e=>{const n=t.has(e.key);return t.add(e.key),n?{...e,hidePrice:n}:e})),totalLineQuantities:n.reduce(((e,t)=>e+t.quantity),0)})))})),r=e=>{switch(e){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")}},a=e=>{switch(e){case"PICK_UP":return"merchandise-lines-modal-pick-up";case"SHIPPING":return"merchandise-lines-modal-shipping";case"NOT_REQUIRED":return"merchandise-lines-modal-not-required"}};return h(Ry,{gap:"large-200",children:h(J,{each:n,getKey:e=>e.group,children:({group:e,merchandiseLines:t,totalLineQuantities:n})=>h(Ry,{gap:"base",children:[h(Ww,{level:2,children:r(e)}),h(XR,{merchandiseLines:t,modalId:a(e),totalLineQuantities:n,deliveryGroup:e})]})})})}function eM({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:r,name:i,remoteShopsConfigMap:a},observability:s}=pe(),c=new Map,u=e.get(r)??[],d=u.length>0;d&&c.set(n.translate("order_summary.from_shop_heading",{shop_name:i}),{lines:u,includeTotalLineQuantities:!0});const p=o((()=>Array.from(e.entries()).filter((([,e])=>e.length>0)).filter((([e])=>e!==r))),[e,r]),m=p.filter((([e])=>!a?.get(e)?.name)).map((([e])=>e)),g=m.length>0,f=m.join(",");l((()=>{0!==m.length&&s.error(new nM("Missing remote shop names",{metadata:{shopIdsWithMissingNames:m}}))}),[f,s]);const y=g||p.length>1,v=o((()=>p.flatMap((([e,t])=>t.map((t=>({...t,...y?{remoteShopName:a?.get(e)?.name}:{}})))))),[p,y,a]);if(0===v.length)s.error(new tM);else{const e=g||d?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),t=y?e:n.translate("order_summary.from_shop_heading",{shop_name:a.get(p[0][0]).name});c.set(t,{lines:v,includeTotalLineQuantities:!1})}return h(Ry,{gap:"large-200",children:Array.from(c.entries()).map((([e,{lines:n,includeTotalLineQuantities:r}])=>h(Ry,{gap:"base",children:[h(Ww,{level:2,children:e}),h(XR,{merchandiseLines:n,totalLineQuantities:r?t:void 0})]},e)))})}class tM extends Rl{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 nM extends Rl{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const rM=["PICK_UP","SHIPPING","NOT_REQUIRED"];function iM(e){if(e.length)return e.includes("PICK_UP")?"PICK_UP":e.includes("SHIPPING")||e.includes("LOCAL")?"SHIPPING":e.every((e=>"NONE"===e))?"NOT_REQUIRED":void 0}function aM(e){return iM(e.deliveryMethodTypes)}function oM(e){if("not_required"===e.status)return"NOT_REQUIRED";const t=e.methods.find((({handle:t})=>t===e.selectedDeliveryMethodHandle));return iM(t?[t.methodType]:e.methods.map((({methodType:e})=>e)))}function sM(e,t){const n=e.lineAllocations[t];if(n)return{properties:e.properties,quantity:n.quantity,stableId:n.stableId,totalAmountBeforeReductions:n.checkoutPriceBeforeReductions,merchandise:e}}const lM="PP6CV",cM=xu("CollapsibleLineItems"),uM=e=>h(aL,{children:e}),dM=I((function(){const e=L(IL()),t=LL(),{i18n:n,shop:{id:r}}=pe(),a=Fc(),{lineItems:{priority:o="base",blockPadding:s,quantityVisibility:l="visible",sectionLayout:c="fixed"},merchandiseThumbnail:{shadow:u}={}}=Ah(),d=Boolean(s),p="hidden"!==l,m=e.value.some((e=>e.quantity>1));let g;p&&("visible"===l||m)?g="product-thumbnails-with-badge":"none"===u&&"high"===o?g=void 0:null!=u&&"extraSmall"!==u||(g="product-thumbnails");const f=i((()=>"thankYou"===a.value.currentDetour?.type?{dynamicRender:"Checkout::ThankYou::Dynamic::Render",cartLinesRenderAfter:"Checkout::ThankYou::CartLines::RenderAfter"}:{dynamicRender:"Checkout::Dynamic::Render",cartLinesRenderAfter:"Checkout::CartLines::RenderAfter"})).value,y=mE(f.dynamicRender,"ORDER_SUMMARY1"),v=mE(f.dynamicRender,"ORDER_SUMMARY2"),_=mE(f.cartLinesRenderAfter),b=i((()=>Array.from(t.value.values()).reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.quantity),0)),0))),P=i((()=>Array.from(t.value.entries()).some((([e,t])=>e!==r&&t.length>0)))),k=i((()=>e.value.length>
20||P.value)),S=function(){const e=wA(),t=Fc(),n=L(IL()),r=Ge(),a=r.deliveryLines,o=r.merchandiseLines,{deliveryNext:s,merchandiseLines:l}=ke();return i((()=>{const r=n.value,i=new Map;if(0===r.length)return i;if(!e.value)return i;const c=function(...e){const t=new Map;for(const n of e)for(const e of n??[])for(const n of e.lineComponents){if(t.has(n.stableId))continue;const r=new Map;e.lineAllocations.forEach(((e,t)=>{const i=sM(n,t);i&&r.set(e.stableId,i)})),r.size>0&&t.set(n.stableId,{parentStableId:e.stableId,componentsByParentAllocationStableId:r})}return t}(l.value?.lines,o.value),u=new Map;for(const e of r){if(!e.stableId)return i;const t=u.get(e.stableId);t?t.push(e):u.set(e.stableId,[e])}const d=new Map,p=new Set,m=(e,t,n)=>{const r=d.get(e)??new Map;if(!n)return r.set(t.key,t),d.set(e,r),void p.add(t.key);const i=r.get(t.key)?.components??[];r.set(t.key,{...t,components:i.some((({stableId:e})=>e===n.stableId))?i:[...i,n]}),d.set(e,r),p.add(t.key)},h=[],g=new Map,f=(e,t)=>{const n=t.requiresShipping?e:"NOT_REQUIRED";if(!n)return!1;const r=c.get(t.stableId),i=r?.parentStableId??t.stableId;if(!r){const e=g.get(i)??new Set;e.add(n),g.set(i,e)}return h.push({bundleComponent:r,group:n,parentStableId:i}),!0};if(a.value.flatMap((e=>e.value.targetMerchandiseLines??[])).some((e=>{const t=c.get(e.stableId)?.parentStableId??e.stableId;return u.has(t)}))&&!Zv(t.value.currentDetour))for(const e of a.value){const t=aM(e.value);for(const n of e.value.targetMerchandiseLines??[])if(!f(t,n))return i}else if("unavailable"!==s.value?.status)for(const e of s.value?.lines??[]){const t=oM(e);for(const n of e.targetMerchandiseLines??[])if(!f(t,n))return i}if(Array.from(g.values()).some((e=>e.size>1)))return i;const y=({bundleComponent:e,group:t,parentStableId:n})=>{const r=u.get(n);if(!r)return!0;for(const i of r){if(!e){m(t,i);continue}if(!i.id)return!1;const n=e.componentsByParentAllocationStableId.get(i.id);if(!n)return!1;m(t,i,n)}return!0};for(const e of h)if(!y(e))return i;if(r.some((({key:e})=>!p.has(e))))return i;const v=new Map;for(const e of rM){const t=d.get(e);t?.size&&v.set(e,Array.from(t.values()))}return v}))}(),w=i((()=>!P.value&&S.value.size>1)),C="collapsible"===c&&!P.value&&e.value.length>1,E=h(hT,{bleed:g,overflow:"auto hidden",maxBlockSize:"@media (inline-size >= medium) 40vh, none",padding:d?"none":"none none small-500 none",hint:{type:"pill",content:n.translate("order_summary.scroll_order_summary")},accessibilityRole:"section",accessibilityLabel:n.translate("order_summary.shopping_cart_label"),children:h(A,{when:P,fallback:h(A,{when:w,fallback:h(XR,{merchandiseLines:e.value,totalLineQuantities:b.value}),children:h(ZR,{merchandiseLinesByDeliveryType:S})}),children:h(eM,{merchandiseLinesByShop:t.value,totalLineQuantities:b.value})})});return h(A,{when:k,children:h(Ry,{gap:"large-200",children:[h(bN,{customizations:y,render:uM}),h(aL,{children:C?h(pM,{merchandiseLines:e.value,showQuantityBadges:p,children:E}):E}),h(bN,{customizations:_,render:uM}),h(bN,{customizations:v,gap:"large-200",render:uM})]})})}));function pM({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=f(!0),{i18n:i}=pe(),{size:a}=Ah().merchandiseThumbnail??{},o=zR(a),s=i.translate("order_summary.number_items",{count:t.reduce(((e,t)=>e+t.quantity),0)}),l=Iu(void 0,cM),{blockSize:c}=YC(o),u=function(e){return e.map((e=>({stableId:e.stableId??e.key,image:e.image,quantity:e.quantity,totalPrice:e.totalPrice})))}(t),d=()=>h(Sy,{children:s}),p=e=>h(Dh,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[h(fy,{minInlineSize:"0",overflow:"hidden",children:e}),h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(),h(Uh,{type:"chevron-down",size:"small-100"})]})]}),m=()=>h(Ry,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[d(),h(Uh,{type:"chevron-up",size:"small-100"})]});return h(fy,{position:"relative",minBlockSize:`${c}px`,children:[h(pp,{id:`${l}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","o
2pacity"],children:h(Ry,{gap:"base",children:[h("div",{"aria-hidden":"true",children:m()}),h("div",{id:l,children:e})]})}),h(pp,{id:`${l}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:h("div",{"aria-hidden":"true",children:p(h(mM,{thumbnailMerchandise:u,thumbnailSize:o,showQuantityBadges:n}))})}),h("div",{className:"tndLB",children:[h("div",{"aria-hidden":"true",className:"anPJT",children:[h(pp,{id:`${l}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:m()}),h(pp,{id:`${l}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:p(h("div",{className:lM,children:h(JA,{variant:"inline-discrete",merchandise:u.slice(0,1),size:o,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),h("div",{className:"vv9lW",children:h(Nh,{accessibilityLabel:s,"aria-controls":l,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:()=>{r.value=!r.value}})})]})]})}function mM({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:i}=cL(t);return h("div",{ref:r,className:lM,children:h(JA,{variant:"inline-discrete",merchandise:e,size:t,max:i.value,useImageAltTexts:!1,showQuantityBadges:n})})}function hM(){const e=s();return l((()=>()=>{const t=e.current;t&&$l.containers.delete(t)}),[]),t=>{t&&(e.current&&$l.containers.delete(e.current),$l.containers.add(t),e.current=t)}}const gM=_({spacing:"auto"});function fM({spacing:e,children:t}){const n=o((()=>({spacing:e})),[e]);return h(gM.Provider,{value:n,children:t})}function yM(){return y(gM)}var vM={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"},_M={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 bM(e){return"children"in e&&LC(e.children)}function PM(e){const{spacing:t}=yM(),{moneyLines:{color:n="base"}}=Ah(),{itemSize:r="inherit",layout:i="inherit",color:a}=e,o=a??n,s=P(_M.MoneyLine,r&&_M.itemSizeVariant[r],t&&vM.groupSpacingVariant[t],i&&_M.layoutVariant[i]);return h("div",{className:s,role:"row",children:bM(e)?e.children:h(b,{children:[h(kM,{children:h(Sy,{color:e.labelColor,children:e.label})}),h(SM,{loading:e.loading,children:e.loading?h(eE,{size:e.size,emphasis:"strong"===e.type?"bold":void 0,children:e.value}):h(Sy,{type:e.type,size:e.size,translate:!1,color:o,children:e.value})})]})})}function kM({children:e}){return h("div",{className:_M.Header,role:"rowheader",children:e})}function SM({children:e,loading:t,colSpan:n}){return h("div",{className:n?_M.contentColSpan:_M.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const wM=xu("MoneyLine-Heading"),CM=k((function(e,t){const{children:n,title:r,titleHidden:i=!0,spacing:a="auto"}=e,o=Iu(void 0,wM),s=Rd(),{moneyLines:{color:l="base"}}=Ah(),c=h(Ww,{id:o,children:r});return h(b,{children:[i?h("div",{className:vM.visuallyHidden,children:c}):c,h("div",{role:"table","aria-labelledby":o,children:[h("div",{role:"rowgroup",className:vM.visuallyHidden,children:h("div",{role:"row",children:[h("div",{role:"columnheader",children:s("moneyLinesHeaderItem")}),h("div",{role:"columnheader",children:s("moneyLinesHeaderValue")})]})}),h("div",{role:"rowgroup",className:P(vM.MoneyLines,vM.colorVariant[l],vM.spacingVariant[a]),ref:t,children:n})]})]})}));function EM({condition:e,children:t,skeletonContent:n,...r}){return h(b,{children:[h(eE,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),h(Sy,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}function xM(){const{i18n:e}=pe(),t=ke().alternativePaymentCurrency,n=xn("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:r}=tt(),a=i((()=>{const i=t.value,a=n.value;if(i||a&&r.value)return{loading:a,text:i&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(i.totalWithoutGiftCards.amount,{currency:i.totalWithoutGiftCards.currencyCode,form:"explicit"})})}}));return h(A,{when:a,children:({loading:e,text:t})=>h(PM,{children:h(SM,{children:h(EM,{condition:e,size:"small",color:"subdued",children:e?"$0.00":t})})})})}function IM({children:e}){return"function"==typeof e?e():e}function AM({children:e}){let t,n;
2return K.forEach(e,(e=>{var r;Q(e)&&(t||void 0===e.props.condition?n||e.type!==IM||(n=e):("function"==typeof(r=e.props.condition)?r():r)&&(t=e))})),t??n??null}AM.When=function({children:e}){return"function"==typeof e?e():e},AM.Fallback=IM;const TM=xu("TaxesTooltip");function NM({label:e,subdueText:t}){const{i18n:n,source:r}=pe(),i=Iu(void 0,TM);return h(b,{children:[h(Sy,{color:t?"subdued":void 0,children:e}),h(Uh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),h($m,{id:i,children:"paymentCollection"===r.type?n.translate("order_summary.estimated_taxes_finalization_tooltip_content_short"):n.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}function LM({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:i=!1,subdueText:a}){const{i18n:o}=pe(),s=a?"subdued":void 0;return h(PM,{color:s,children:[h(kM,{children:h(AM,{children:[h(AM.When,{condition:Boolean(r),children:h(Sy,{color:s,children:r})}),h(AM.When,{condition:Boolean(i),children:h(Sy,{color:s,children:o.translate("order_summary.taxes_label")})}),h(AM.Fallback,{children:h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:h(NM,{label:o.translate("order_summary.estimated_taxes_label"),subdueText:a})})})]})}),h(SM,{children:h(Ry,{direction:"inline",gap:"small-200",children:[t?h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:[h(NM,{subdueText:a,label:o.translate("order_summary.estimated_taxes_label_short")}),h(Sy,{color:s,children:"•"})]}):null,h(EM,{condition:n,color:s,children:n?"$0.00":o.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const RM={marginTop:"0"};function MM({id:e,title:t,subdueTitle:n,tooltipText:r,children:i,item:a,hideHeaderItemWhenOpen:o=!1}){const{i18n:s}=pe(),l=f(!1);return h(b,{children:[h(PM,{children:[h(kM,{children:h(Ry,{direction:"inline",gap:"small-200",alignItems:"center",children:[h(Nh,{"aria-expanded":l.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{l.value=!l.value},children:h(Dh,{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:[h(gI,{color:n?"subdued":void 0,textAlign:"start",children:t}),h(Uh,{type:l.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?h(Nh,{accessibilityLabel:s.translate("tooltip.accessibility_label_context",{context:t}),overlay:h($m,{children:r}),children:h(Uh,{type:"question-circle",size:"small"})}):null]})}),!a||o&&l.value?null:a]}),h("div",{style:RM,children:h(pp,{open:l.value,id:`recurring-totals-collapsible-${e}`,children:i})})]})}function DM(){const{checkout:e}=pe(),t=ke().taxes,n=Ho();return i((()=>{const r=e.proposal.facts.tax,i=t.value,a=r||("available_total_included"===i?.status?i.totalIncludedInTarget:null);return{localTotalTaxIncluded:a,totalTaxIncluded:n.value??a}}))}function OM(){const{i18n:e}=pe(),t=DM();return i((()=>{const{totalTaxIncluded:n}=t.value;return null===n?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}))}function zM({label:e}){return h(fM,{spacing:"small-500",children:h(PM,{children:[h(kM,{children:h(gI,{color:"subdued",children:h(_T,{children:e})})}),h(SM,{})]})})}function BM({taxesIncluded:e,variant:t,shopId:n}){const{i18n:r}=pe(),a=$o(),{localTotalTaxIncluded:o,totalTaxIncluded:s}=DM().value,l=OM(),c=Yo(o),u=i((()=>[...c.value.entries()])),d=i((()=>a.value&&u.value.length>1));if(n){const e=c.value.get(n);if(!e||0===e.totalTax.amount||"available_total"===e.status)return null;const t=r.translate("order_summary.vat_label_html",{amount:r.formatCurrency(e.totalTax.amount,{currency:e.totalTax.currencyCode,form:"short"})});return h(zM,{label:t})}return e&&null!==s&&null!==l.value&&0!==s.amount?"card"===t?h(fy,{children:h(gI,{color:"subdued",children:h(_T,{children:l})})}):h(A,{when:d,fallback:h(zM,{label:l.value}),children:h(MM,{id:"included-tax-money-line",title:l.value,children:h(fM,{spacing:"small-400",children:h(J,{each:u,getKey:([e])=>e,children:([,e])=>h(LM,{totalTax:e.totalTax,taxesLabel:e.shopName,showMoneyLineTaxesTooltip:"available_total"===e.status,subdueText:!0})})})})}):null}
2function VM({title:e,value:t,color:n,labelColor:r}){const i=function(){const{i18n:e}=pe();return a((t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})),[e])}();return h(PM,{label:e,value:i(t),color:n,labelColor:r})}function FM({variant:e,shopId:t}){const n=ke(),{value:r}=n.deferredTotal,a=vt(),{checkout:o}=pe(),s=Wo(),l=i((()=>s.value||Boolean(o.proposal.facts.taxesIncluded))),{value:c}=n.paymentFlexibilityPaymentTermsTemplate,u=r&&r.amount.amount>0,d=oo(),p=jA(),m=i((()=>Boolean(d.value&&!p.value))),g=function(e,t){const{i18n:n}=pe(),r=MA();if(e){const t=r(e,{month:"short"});return n.translate("order_summary.deferred_total_due_date_label_next",{date:t})}return t?n.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):n.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}(r?.dueAt||(c?.dueDate?new Date(c.dueDate):null),"FULFILLMENT"===c?.type);return!u||a.value?null:h(b,{children:["card"===e?h(fy,{background:"subdued",padding:"small-300",borderRadius:"small",children:h(VM,{title:g,value:r.amount,color:"subdued",labelColor:"subdued"})}):h(fM,{spacing:"small-300",children:h(VM,{title:g,value:r.amount})}),"card"!==e&&h(A,{when:m,children:()=>h(BM,{taxesIncluded:l.value,shopId:t})})]})}const UM=xu("ShippingTooltip");function qM({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=pe(),i=Iu(void 0,UM),a="shipping-policy",o=t.translate("shop_policies.shipping_policy"),{localPolicies:s}=ho(),l=r.some((e=>e.handle===a)),c=e??(l?s.find((e=>e.handle===a)):void 0);if(!c)return null;const u=t.translate("tooltip.accessibility_label_context",{context:o});return si(n?.embedder)?c.url?h(Nh,{accessibilityLabel:u,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(c.url),children:h(Uh,{type:"question-circle",size:"small"})}):null:h(b,{children:[h(Nh,{accessibilityLabel:u,commandFor:i,children:h(Uh,{type:"question-circle",size:"small"})}),h(JT,{id:i,defaultPolicy:c})]})}function jM(e){return e.reduce(((e,{total:t})=>e+(t?.amount||0)),0)}function HM({checkout:e}){return e.proposal.facts.requiresShipping??!0}function $M({size:e,strong:t=!0}){const{i18n:n}=pe(),r=t?"strong":void 0;return h(b,{children:[h(Sy,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),h(Sy,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function YM({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:i,shouldConsolidateRateGroupMax:a,getRateGroupMaxKey:o,getLinePrice:s,getPriceLetterCase:l}){const{i18n:c,shop:u}=pe(),d=u.hasFlagEnabled(Jo),p=e.length>0,m=e[0]?.currencyCode,g=e[0]?.type,{priceBeforeDiscounts:f,priceAfterDiscounts:y}=a??u.marketDrivenShippingEnabled?tc(e,o):nc(e),v=p&&f&&f>y&&!d,_=s(y,g),b=h(EM,{condition:t,color:n,type:"bold"===r?"strong":void 0,translate:!1,letterCase:l(y,g),children:_});return t?b:i?h($M,{strong:!1}):v?h(Ry,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[h(Sy,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.original_price")}),h(Sy,{size:"base",color:"subdued",type:"redundant",translate:!1,children:c.formatCurrency(f,{currency:m})}),h(Sy,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const WM=({getLinePrice:e,getPriceLetterCase:t,label:n,moneyLines:r,finalMoneyLines:a,forceSubduedStyle:s,discountLines:l,shippingTooltip:c,included:u,shouldConsolidateRateGroupMax:d,getRateGroupMaxKey:p})=>{const m=Fc(),g=i((()=>"information"===m.value.currentPage?.id)),{shop:f,checkout:y,i18n:v}=pe(),_=!f.hasFlagEnabled(Jo),{value:P}=ke().deliveryNext,k=Vt(),S=xn("deliveryNext").value,w=dA("deliveryNext").value||!!k.value&&S,C=y.proposal.facts.delivery??[],E=function(e){const{checkout:t}=pe(),n=t.proposal.facts.delivery??[],r=new Set(e);return n.flatMap((({deliveryGroups:e,lines:t})=>r.size>0&&e?.length?e.filter((({methodType:e})=>r.has(e))).flatMap((({deliveryLines:e})=>e)):t)).flatMap((({appliedDiscounts:e})=>e)).filter((e=>e.amountDiscounted?.amount&&e.amountDiscounted?.amount>0))}([...new Set(a.flatMap((({methodType:e})=>void 0===e?[]:[e])))]),x=y.configuration.layout.isOnePage.value,I=o((()=>!r.length&&!C.length||w),[]),A=Boolean("unavailable"===P?.status)||w||s,T=l?.filter((e=>rc(e)))??[],N=E.length?[...new Set(E.map((e=>e.label)))]:[...new Set(T.map((e=>Xl(e)&&"code"===e.discount.type&&e.discount.codeHidden?v.translate("order_summary.discount_title"):e.title)))],L=_?N.map((e=>h(Dh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[h(Uh,{type:"discount",size:"small"}),h(wT,{children:h(Sy,{color:"subdued",children:e.toUpperCase()})})]},e))):[],R=A||s,M=(g.value||x)&&c,D=s?"subdued":void 0;return h(b,{children:[h(PM,{itemSize:I?"auto":void 0,color:D,children:[h(kM,{children:h(Ry,{direction:"inline",gap:"small-400",alignItems:"center",children:[h(Sy,{color:D,children:n}),M]})}),h(SM,{loading:w,children:h(YM,{getLinePrice:e,getPriceLetterCase:t,appearance:R?"subdued":void 0,moneyLines:a,deliveryLoading:w,included:u,shouldConsolidateRateGroupMax:d,getRateGroupMaxKey:p})})]}),L.length>0&&h(fM,{spacing:"small-400",children:h(PM,{children:h(kM,{children:L})})})]})},GM=({shopId:e,forceSubduedStyle:t})=>{const n=ke(),r=n.deliveryNext.value,a=Vt(),o=xn("deliveryNext"),l=dA("deliveryNext"),c=l.value||!!a.value&&o.value,{checkout:u,i18n:d,shop:{id:p,marketDrivenShippingEnabled:m,remoteShopsConfigMap:g},source:f}=pe(),y=u.configuration.layout.isOnePage.value,v=u.proposal.facts.delivery,_=Ye(),P=ki(_.value.enabledDeliveryMethods),k=uA(),S=k?.selected.value??[],w=S.length>0,C=Ko(S).length>0,E=S.includes("PICK_UP"),x=Boolean(e),{visibility:I}=u.configuration,A=n.discountLines.value,T=pP(),N=function(){const{checkout:e}=pe(),t=e.proposal.facts.delivery??[],n=function(){const{checkout:e}=pe(),t=e.proposal.facts.delivery??[];return jM(t)-t.flatMap((e=>e.lines.flatMap((e=>e.appliedDiscounts)))).reduce(((e,{amountDiscounted:t})=>(t?.amount||0)+e),0)}(),r=jM(t),i=t.flatMap((({deliveryGroups:e})=>e??[]));return i.length>0?i.map((({groupType:e,methodType:t,total:n,deliveryLines:r})=>{const i=r.flatMap((({appliedDiscounts:e})=>e)).reduce(((e,{amountDiscounted:t})=>e+(t?.amount??0)),0);return{type:e,methodType:t,cost:n.amount-i,costBeforeDiscounts:n.amount,currencyCode:n.currencyCode}})):null==t[0]?.total?null:[{type:"ONE_TIME_PURCHASE",cost:n,costBeforeDiscounts:r,currencyCode:t[0]?.total?.currencyCode}]}(),L=Qo(e),{allMoneyLines:R,moneyLinesForShop:M}
2=L.value,D=$o(),O=Fc(),z="review"!==O.value.currentPage?.id&&(!c||D.value),B=d.translate("order_summary.pickup_label"),V=d.translate("order_summary.shipping_label"),F=s(P?B:V),U=i((()=>{const e=ki(_.value.enabledDeliveryMethods)?B:V;if(!(l.value||a.value&&o.value)){const t=L.value.moneyLinesForShop,n=Vr(f)?v?.[0]?.pickupAddress:t.length>0&&t.every((e=>"PICK_UP"===e.methodType));F.current=n?B:e}return F.current})).value,q=Boolean(r&&"filled"===r.status&&r.lines.some((({status:e})=>"not_required"!==e))),j=!c&&!q&&!u.isShippingRequired.value,H=N||M,$=H.filter((function(e){return void 0!==e.methodType})),Y=$.filter((e=>"PICK_UP"!==e.methodType)),W=$.filter((e=>"PICK_UP"===e.methodType)),G=0===H.length||$.length>0,J=!x&&!Vr(f)&&w&&G,K=J&&E&&!C,Q=J&&C,X=K?B:V,Z=i((()=>Boolean(Vr(f)&&HM({checkout:u})&&uP({checkout:u,source:f})?.lines.length)));if(T.value)return null;if(!(I.showShippingLines.value&&!Vr(f)||Z.value))return null;if(j)return null;if(x&&0===H.length)return null;if(x){const n=H.some((e=>le(e)));return h(WM,{getLinePrice:de,getPriceLetterCase:ue,label:U,forceSubduedStyle:t,moneyLines:M,finalMoneyLines:H,discountLines:e===p?A?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:n,getRateGroupMaxKey:ce})}if(D.value&&H.length>1){const e=H.some((e=>le(e))),t=function(e){const t=new Map;for(const n of e){const e=n.shopId??p,r=t.get(e);r?r.lines.push(n):t.set(e,{shopName:n.shopName??U,lines:[n]})}return[...t.values()]}(H);return h(MM,{id:"shipping-money-line",title:U,hideHeaderItemWhenOpen:!0,item:h(SM,{loading:c,children:h(YM,{getLinePrice:de,getPriceLetterCase:ue,moneyLines:H,deliveryLoading:c,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce})}),children:h(fM,{spacing:"small-400",children:t.map((({shopName:t,lines:n})=>{const r=n.find((e=>e.shippingPolicy))?.shippingPolicy,i=n.some((e=>(e.shopId??p)===p&&e.hasLocalDiscountApplied));return h(WM,{getLinePrice:de,getPriceLetterCase:ue,label:t,forceSubduedStyle:!0,moneyLines:R,finalMoneyLines:n,discountLines:i?A?.lines:void 0,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce,shippingTooltip:z&&r?h(qM,{defaultPolicy:r}):void 0},n[0]?.shopId??t)}))})})}if(Y.length>0&&W.length>0)return oe({});if(J&&C&&E)return oe({shippingGetLinePrice:Y.length>0?de:me,shippingGetPriceLetterCase:Y.length>0?ue:he,pickupGetLinePrice:ge,pickupGetPriceLetterCase:fe});let ee=R,te=H,ne=de,re=ue,ie=U,ae=z?h(qM,{defaultPolicy:null}):void 0;return K?(ee=W,te=W,ne=ge,re=fe,ie=X,ae=void 0):Q&&(ee=Y,te=Y,ie=X,0===Y.length&&(ne=me,re=he)),h(WM,{getLinePrice:ne,getPriceLetterCase:re,label:ie,forceSubduedStyle:t,moneyLines:ee,finalMoneyLines:te,discountLines:A?.lines,shippingTooltip:ae});function oe({shippingGetLinePrice:e=de,shippingGetPriceLetterCase:n=ue,pickupGetLinePrice:i=de,pickupGetPriceLetterCase:a=ue}){const{shippingDiscountLines:o,pickupDiscountLines:s}=ic(r,A?.lines);return h(b,{children:[h(WM,{getLinePrice:e,getPriceLetterCase:n,label:V,forceSubduedStyle:t,moneyLines:Y,finalMoneyLines:Y,discountLines:o,shippingTooltip:z?h(qM,{defaultPolicy:null}):void 0}),h(WM,{getLinePrice:i,getPriceLetterCase:a,label:B,forceSubduedStyle:t,moneyLines:W,finalMoneyLines:W,discountLines:s,shippingTooltip:void 0})]})}function se(e){return e.every((e=>"SUBSCRIPTION"===e.type))}function le(e){const t=e.shopId??p;if(t===p)return m;const n=g?.get(t);return n?n.marketDrivenShippingEnabled:Boolean(e.amountCombinabilityToken)}function ce(e){const t=e.amountCombinabilityToken??void 0;if(t&&le(e))return`${e.shopId??p}:${t}`}function ue(e,t){return P?"uppercase":c||void 0===e||!R.length&&!v?.length||0!==e?"none":"SUBSCRIPTION"!==t||se(R)?"uppercase":"none"}function de(e,t){if(c)return"$0.00";if(void 0!==e&&(R.length||v?.length)){const n="SUBSCRIPTION"!==t||se(R)?d.translate("order_summary.free_shipping_total_label"):d.translate("shipping.subscription_delivery_description.shipping_price_included");if(0===e)return n;const r=Vr(f)?v?.[0]?.total?.currencyCode:R[0].currencyCode;return d.formatCurrency(e,{currency:r,form:"short"})}return P?d.translate("order_summary.free_shipping_total_label"):y?d.translate("order_summary.enter_shipping_address"):d.translate("order_summary.shipping_default_value")}function me(){return de(void 0)}function he(){return ue(void 0)}function ge(e,t){return W.length||v?.length?de(e,t):c?"$0.00":d.translate("order_summary.free_shipping_total_label")}function fe(e,t){return W.length||v?.length||c?ue(e,t):"uppercase"}},JM=xu("ReductionTooltip");function KM({type:e}){const{i18n:t,shop:{name:n}}=pe(),r=Iu(void 0,JM),i="giftCard"===e?t.translate("order_summary.gift_cards_apply_to_local_shop",{shop_name:n}):t.translate("order_summary.order_discounts_apply_to_local_shop",{shop_name:n});return h(b,{children:[h(Uh,{type:"question-circle",size:"small",interestFor:r}),h($m,{id:r,children:h(Sy,{children:i})})]})}function QM({line:e,title:t,amount:n}){const{i18n:r,source:i,shop:a}=pe(),o=Vr(i)&&n,s=TR(a);if(e&&!Xl(e)||e&&"CART"!==e.discount.presentationLevel||e&&0===e.amount?.amount&&s)return null;if(e&&(rc(e)||0===e.allocations.length))return null;let l=e?.title;return e&&"custom"===e.discount.type&&""===e.title&&(l=r.translate("order_summary.custom_discount")),e&&"code"===e.discount.type&&e.discount.codeHidden&&(l=r.translate("order_summary.discount_title")),h(PM,{children:[h(kM,{children:h(Dh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[h(Uh,{type:"discount",size:"small"}),h(wT,{children:h(Sy,{color:"subdued",children:e?l?.toUpperCase():t?.toUpperCase()})})]})}),h(SM,{children:h(Sy,{translate:!1,children:o?(c=n,r.formatCurrency(-c.amount,{currency:c.currencyCode,form:"short",spacedMinusSign:!0})):e&&XM({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]});var c}function XM({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some((e=>"DELIVERYLINE"===e.target.type))||0===e.allocations.length)return t;if(Xl(e)){const t=e.amount?.amount,r=e.amount?.currencyCode;if(t&&r)return n.formatCurrency(-t,{currency:r,form:"short",spacedMinusSign:!0})}}const ZM=({disableTooltip:e=!1})=>{const{i18n:t,checkout:n,source:r,shop:a}=pe(),o=ke().discountLines,s=n.proposal.facts.orderDiscounts??[],l=Vr(r)&&s,c=TR(a),u=$o(),d=i((()=>{return e=o.value?.lines,t=c,e?.filter((e=>Xl(e)&&Xo(e)&&!(t&&0===e.amount?.amount)))??[];var e,t})),p=i((()=>!e&&u.value)),m=i((()=>d.value.length>0)),g=i((()=>t.translate("order_summary.discount_order_stacking",{count:d.value.length})));return h(b,{children:[h(A,{when:m,children:()=>h(PM,{children:h(kM,{children:h(Dh,{gridAutoFlow:"column",gridTemplateColumns:p.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[h(Sy,{children:g}
2),h(A,{when:p,children:h(KM,{type:"discount"})})]})})})}),h(fM,{spacing:"small-500",children:[h(J,{each:d,getKey:e=>e.title,children:e=>h(QM,{line:e})}),l&&s.map((e=>h(QM,{title:e.label,amount:e.amount},e.label)))]})]})};function eD(e,t){return e||("available_total"===t?.status?t.totalDuty:null)}const tD=xu("DutyMoneyLineTooltip");function nD({shopId:e}){const{i18n:t,checkout:n,shop:r}=pe(),i=ke(),{value:a}=i.landedCostDetails,o=xn("landedCostDetails").value,s=xn("duties").value,l=n.proposal.facts.duty,{value:c}=i.duties,u=Iu(void 0,tD);if(e&&e!==r.id)return null;const d=eD(l,c),p=a?.incoterm===ac.Ddu&&a.reason===oc.ErrorOccured,m=(s||o)&&!l&&!p,g=d||p,f=p?"subdued":void 0,y=h(Ry,{direction:"inline",alignItems:"center",gap:"small-400",children:[h(Sy,{children:t.translate("order_summary.duties_label")}),p&&!m&&h(b,{children:[h(Uh,{type:"question-circle",interestFor:u,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),h($m,{id:u,children:t.translate("order_summary.error_duties_tooltip")})]})]}),v=p?t.translate("order_summary.may_be_charged_on_delivery"):d&&t.formatCurrency(d.amount,{currency:d.currencyCode,form:"short"});return h(b,{children:g&&h(PM,{color:f,children:[h(kM,{children:y}),h(SM,{children:h(Ry,{direction:"inline",gap:"small-200",children:h(EM,{condition:m,children:m?"$0.00":v})})})]})})}function rD({data:e,loading:t}){const n=iD();return h(fM,{spacing:"small-400",children:e.map((({description:e,amount:r},i)=>h(LM,{loading:t,totalTax:r,taxesLabel:n({description:e})},`${e}-${i}`)))})}const iD=()=>{const{i18n:e}=pe();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 aD({shopId:e}){const{i18n:t,checkout:n,shop:r}=pe(),a=ke(),{hasNegotiatedOnce:o}=Pe(),s=xn("taxes"),l=dA("taxes"),c=xn("landedCostDetails"),u=xn("remoteTaxDetails"),d=$o(),p=Vk(),m=function(){const{checkout:e}=pe(),t=xn("taxes"),{taxes:n}=ke();return i((()=>{const r=e.proposal.facts.taxBreakdown;if(r?.length)return{data:r.map((({title:e,amount:t})=>({description:e,amount:t}))),loading:!1};if(!n.value||"available_total"!==n.value.status)return null;const{taxBreakdown:i}=n.value;return i?.length?{data:i,loading:t.value}:null}))}(),g=i((()=>{if(n.proposal.facts.tax)return n.proposal.facts.tax;const e=a.taxes.value;return"available_total"===e?.status?e.totalTax:null})),f=i((()=>Boolean(a.landedCostDetails.value))),y=i((()=>{const e=a.taxes.value;return void 0!==e&&"pending"!==e.status})),v=i((()=>!n.proposal.facts.tax&&(!!l.value||!y.value&&(s.value||!o.value)))),_=i((()=>(v.value||s.value||c.value||u.value)&&!n.proposal.facts.tax)),b=i((()=>{const e=g.value;return e&&e.amount>0?e:v.value?{amount:0,currencyCode:r.currencyCode}:void 0})),P=Yo(g.value),k=i((()=>[...P.value.entries()])),S=Ho(),w=i((()=>S.value??g.value)),C=i((()=>d.value&&k.value.length>1));if(e){const t=P.value.get(e);return t&&0!==t.totalTax.amount&&"available_total_included"!==t.status?h(LM,{loading:_.value,totalTax:t.totalTax,hasLandedCostDetails:e===r.id&&f.value}):null}if(p?.applied&&w.value)return h(LM,{totalTax:w.value});if(!(w.value&&0!==w.value.amount||v.value))return null;if(C.value&&w.value){const e=f.value?t.translate("order_summary.taxes_label"):t.translate("order_summary.estimated_taxes_label"),n=f.value?void 0:t.translate("order_summary.estimated_taxes_finalization_tooltip_content");return h(MM,{id:"tax-money-line",title:e,tooltipText:n,item:h(SM,{loading:_.value,children:h(EM,{condition:_.value,children:_.value?"$0.00":t.formatCurrency(w.value.amount,{currency:w.value.currencyCode,form:"short"})})}),children:h(fM,{spacing:"small-400",children:h(J,{each:k,getKey:([e])=>e,children:([,e])=>h(LM,{loading:_.value,totalTax:e.totalTax,taxesLabel:e.shopName,subdueText:!0})})})})}return h(A,{when:m,fallback:h(A,{when:b,children:e=>h(LM,{loading:_.value,totalTax:e,taxesLabel:v.value?t.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:f.value})}),children:e=>h(rD,{data:e.data,loading:e.loading||_.value})})}const oD=xu("CombinedDutiesAndTaxesTooltip"),sD=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=pe(),i=Iu(void 0,oD);if(t&&t!==r.id)return null;const a=e.value;return h(PM,{children:[h(kM,{children:h(Ry,{direction:"inline",alignItems:"center",gap:"small-400",children:[h(Sy,{children:n.translate("order_summary.duties_and_taxes_label")}),h(Uh,{type:"question-circle",interestFor:i,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),h($m,{id:i,children:n.translate("order_summary.error_duties_tooltip")})]})}),h(SM,{children:h(EM,{condition:a,children:a?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},lD=({shopId:e})=>{const{checkout:t}=pe(),n=ke(),r=Boolean(t.proposal.facts.taxesIncluded),a=Boolean(t.proposal.facts.dutiesIncluded),o=Wo(),s=Zo(),l=n.landedCostDetails,c=xn("landedCostDetails"),u=dA("landedCostDetails"),d=n.optionalDuties,p=xn("optionalDuties"),m=i((()=>Boolean(d.value?.refuseDutiesPermitted)&&Boolean(d.value?.buyerRefusesDuties)&&l.value?.incoterm===ac.Ddu)),g=i((()=>u.value||p.value||c.value)),f=i((()=>!(s.value||a))),y=i((()=>Boolean(e)||!(o.value||r)));return h(A,{when:m,fallback:h(b,{children:[h(A,{when:f,children:h(nD,{shopI
2d:e})}),h(A,{when:y,children:h(aD,{shopId:e})})]}),children:h(sD,{loading:g,shopId:e})})};function cD({line:e,disableTooltip:t=!1}){const{i18n:n}=pe(),{value:r}=$o(),i=!t&&r,a=es(e.method).toUpperCase();return h(PM,{itemSize:"auto",children:[h(kM,{children:h(Ry,{direction:"inline",gap:"small-400 small-300",children:[h(Sy,{children:n.translate("order_summary.gift_card_label")}),h(Ry,{direction:"inline",alignItems:"center",gap:"small-400",children:[h(Uh,{type:"gift-card"}),h(Sy,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:a})}),h(Sy,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:a})}),i&&h(KM,{type:"giftCard"})]})]})}),h(SM,{children:h(Sy,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function uD({disableTooltip:e=!1}){const t=qA(),n=$o(),{shop:r,i18n:a}=pe(),o=r.hasFlagEnabled(ts),s=i((()=>!e&&n.value)),l=i((()=>n.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)")),c=i((()=>({total:t.value.reduce(((e,t)=>e+(t.cost?.amount||0)),0),currencyCode:t.value[0]?.cost?.currencyCode})));if(0===t.value.length)return null;if(o){const{total:e,currencyCode:t}=c.value;return h(PM,{children:[h(kM,{children:h(Dh,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[h(Sy,{children:a.translate("order_summary.gift_card_label")}),h(A,{when:s,children:h(KM,{type:"giftCard"})})]})}),h(SM,{children:h(Sy,{children:a.formatCurrency(-e,{currency:t,form:"short",spacedMinusSign:!0})})})]})}return h(J,{each:t,getKey:e=>ns(e.method),children:t=>h(cD,{line:t,disableTooltip:e})})}function dD(e){return"children"in e&&LC(e.children)}function pD(e){const{spacing:t}=yM(),n=P("_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19",t&&vM.groupSpacingVariant[t]);return h(b,{children:h("div",{className:n,role:"row",children:dD(e)?e.children:h(b,{children:[h(mD,{children:h(Sy,{type:"strong",size:"large",children:e.label})}),h(hD,{children:h(Ry,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[h(YA,{children:h(Sy,{size:"small",color:"subdued",children:e.prefix})}),h(Sy,{type:"strong",size:"large",children:e.value})]})})]})})})}function mD({children:e}){return h("div",{className:"_1x41w3p2",role:"rowheader",children:e})}function hD({children:e,accessibilityColumnIndex:t}){return h("div",{className:"_1x41w3p3",role:"cell","aria-colindex":t,children:e})}const gD={Wrapper:"_3KD7m",Char:"kxIMD",Price:"_3XbdQ","Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"};let fD=0;function yD({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:n}}=a_(),r=Eu(),i=s(c((()=>t.value))),o=f([{id:fD++,formatted:c((()=>e.value))}]),u=Vt(),d="base"===n;l((()=>{const n=i.current,r=t.value.currencyCode===n.currencyCode&&t.value.amount<n.amount;o.value=r?[...o.value,{id:fD++,formatted:e.value}]:[{id:fD++,formatted:e.value}],i.current=t.value}),[t.value.amount,t.value.currencyCode,e.value]);const p=a((e=>{o.value=o.value.filter((t=>t.id!==e))}),[o]);return d?h("span",{className:gD.Wrapper,style:{"--delay":(r?0:30)+"ms"},children:h(A,{when:u,fallback:e,children:()=>o.value.map(((e,t)=>h(vD,{formatted:e.formatted,current:t===o.value.length-1,onDisappear:p,snapshotId:e.id,animated:o.value.length>1},e.id)))})}):h(b,{children:e})}function vD({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:i}){const a=Eu(),o=up(t,"fast",n),s=e.split("");return l((()=>{let t;return"exited"===o&&(a?r(i):t=setTimeout((()=>r(i)),30*e.length)),()=>{clearTimeout(t)}}),[o,a,e,r,i]),h("span",{className:P(gD.Price,n&&gD[`Price-${o}`]),"aria-label":t?e:void 0,"aria-hidden":t?void 0:"true",style:{"--total":s.length},children:s.map(((e,t)=>h("span",{className:gD.Char,style:{"--index":t},children:e},t)))})}function _D(e){const{initialUnresolvedFields:t}=Pe();return i((()=>function(e,t){return t.some((t=>e.has(t)))}(t.value,e)))}const bD=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function PD({alignItems:e="baseline",freeLabel:t,outOfStockLabel:n,paymentDue:r,showCurrencyBadge:a,hideCurrencyCode:o,size:s}){const{i18n:l,embed:c}=pe(),u=o_(),{orderSummary:d}=a_(),p=function(){const{allViolations:e}=ke();return i((()=>Iv(e.value??[])))}
2(),m=Vt(),g=xn("deliveryNext"),y=xn("taxes"),v=xn("duties"),_=xn("landedCostDetails"),b=xn("remoteTaxDetails"),P=ke(),k=i((()=>void 0!==P.deliveryNext.value||void 0!==P.taxes.value||void 0!==P.duties.value||void 0!==P.landedCostDetails.value||void 0!==P.remoteTaxDetails.value)),S=_D(bD),w=f(S.peek()),E=f(!S.peek()&&k.peek());C((()=>{!S.value&&k.value&&(E.value=!0)}));const x=i((()=>g.value||y.value||v.value||_.value||b.value)),I=i((()=>(!c||!si(c.embedder))&&(c?!k.value||x.value:w.peek()&&!E.value))),T=!o&&u,N=i((()=>n&&p.value?n:t&&0===r.value.amount?t:l.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}))),L=t?"uppercase":void 0,R=d.totalDueTypography;let M,D;R?(M="bold"===R.weight?"strong":"generic",D=R.size??"base"):(M="strong",D="large");const O=h(Sy,{size:a?"extraSmall":"small",color:"subdued",translate:!1,children:r.value.currencyCode}),z=i((()=>T&&N.value!==n&&N.value!==t&&(!m.value||!X(r.value.currencyCode,N.value))));return h(Ry,{alignItems:e,gap:"small-300",direction:"inline",children:[h(A,{when:z,children:h(YA,{children:a?h(YL,{color:"subdued",size:"small",children:O}):O})}),h(EM,{condition:I.value,type:M,size:s??D,translate:!1,letterCase:L,skeletonContent:N.value,children:E.value?h(yD,{formatted:N,money:r}):null})]})}const kD=1e8;function SD(e,t){const n=e/t*100,r=Math.round(n*kD)/kD;return Math.ceil(r)/100}function wD(e){return e?.installmentPlans?.some((e=>"MSI"===e.type))??!1}function CD(e,t){return e.map((e=>"direct"===e.method.type||e.method.type===ve.CreditCard?{...e,method:{...e.method,creditCardInstallments:t}}:"wallet"===e.method.type&&"SHOP_PAY"===e.method.name&&e.method.walletContent?{...e,method:{...e.method,walletContent:{...e.method.walletContent,creditCardInstallments:t}}}:e))}function ED(e){return e.map((e=>"direct"===e.method.type||e.method.type===ve.CreditCard?{...e,method:{...e.method,creditCardInstallments:void 0}}:e))}function xD(){const e=uo(),t=$A(),{installmentMonthsSignal:n}=tt(),{i18n:r}=pe(),a=ke().paymentMethods,o=i((()=>a.value?.some((e=>"direct"===e.type&&!e.alternative&&wD(e)))??!1));return{amount:i((()=>{const t=n.value,r=e.value;return o.value&&Boolean(t)&&r&&t?{...r,amount:SD(r.amount,t)}:r})),label:i((()=>{const i=n.value;return o.value&&Boolean(i)&&Boolean(e.value)?r.translate("order_summary.installment_due_today_label"):t.value})),isInstallment:i((()=>o.value&&Boolean(n.value)))}}function ID(){const e=ke().paymentFlexibilityPaymentTermsTemplate,t=oo(),n=DA(),r=vt();return i((()=>{if(t.value||n.value)return!1;const i=Boolean(e.value),a=r.value;return i||a}))}function AD({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=Ah();return h(pD,{children:[h(mD,{children:h(Sy,{type:"strong",size:r?.size??"large",children:e})}),h(hD,{children:h(PD,{paymentDue:t,hideCurrencyCode:n})})]})}function TD({variant:e,showLoadingPlaceholder:t}){const n=uo(),{i18n:r,shop:a}=pe(),o=$A(),l=i((()=>!n.value)),c=i((()=>n.value?r.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"}):void 0)),u=s({amount:0,currencyCode:a.currencyCode}),d=i((()=>{const e=n.value;return null!=e&&(u.current=e),u.current}));return l.value&&!t?null:"card"===e?h(fy,{background:"subdued",padding:"small-300",borderRadius:"small",children:h(Dh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[h(Sy,{color:"subdued",children:o}),h(Sy,{color:"subdued",children:c})]})}):h(fM,{spacing:"small-500",children:h(AD,{label:o,amount:d,hideCurrencyCode:l.value})})}function ND({children:e}){return h(fM,{spacing:"small-500",children:h(PM,{children:[h(kM,{children:h(gI,{color:"subdued",children:h(_T,{children:e})})}),h(SM,{})]})})}function LD(){return h(fy,{children:[h(xR,{blockSize:"small-200"}),h(MC,{accessibilityRole:"presentation"}),h(xR,{blockSize:"small-200"})]})}function RD(){const{shop:e}=pe(),t=ke().buyerIdentity,n=uo(),r=e.hasFlagEnabled(rs);return i((()=>{if(r)return;const e=t.value,i="BG"===e?.countryCode&&"EUR"===e?.presentmentCurrency,a=n.value;return!i||!a||a.amount<=0?void 0:Number((1.95583*a.amount).toFixed(2))}))}function MD({bgnAmount:e}){const{i18n:t}=pe();return h(PM,{children:h(SM,{children:h(Sy,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const DD=["taxes","duties"];function OD({shopId:e}){const t=uo(),n=is(),r=i((()=>e?n.value.get(e):t.value)),{checkout:a,embed:o,i18n:l,shop:c}=pe(),u=_D(DD),d=xn("deliveryNext"),p=xn("taxes"),m=xn("duties"),g=xn("landedCostDetails"),f=xn("remoteTaxDetails"),{visibility:y}=a.configuration,{moneySummary:{labelColor:v="base",labelTypography:_},moneyLines:{divided:P}}=Ah(),k=a.proposal.facts.previouslyPaidTotal,S=oo(),w=jA(),C=(()=>{const{shopPay:e,checkout:t}=pe();if(Nf().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value})(),{value:E}=Tt(),x=E?.currencyCode,I=ID(),T=c.hasFlagEnabled(as),N=Boolean(a.proposal.facts.taxesIncluded),L=Boolean(a.proposal.facts.dutiesIncluded),R=Wo().value||N,M=Zo().value||L,{value:D}=ke().landedCostDetails,O=Vk(),z=a.proposal.facts.landedCostDetails,{amount:B,label:V,isInstallment:F}=xD(),U="COMPACT"===a.configuration.orderSummary?.layoutStyle,q=OM(),j=R
2D(),H=i((()=>e&&e!==c.id?l.translate("order_summary.total_label"):V.value)),$=i((()=>!r.value)),Y=i((()=>(!o||!si(o.embedder))&&u.value)),W=s(r.peek()),G=i((()=>{const e=r.value;return null!=e&&(W.current=e),W.current})),J=i((()=>G.value??{amount:0,currencyCode:c.currencyCode})),K=s(B.peek()),Q=i((()=>{const e=B.value;return null!=e&&(K.current=e),K.current??J.value})),X=i((()=>F.value?r.value:void 0)),Z=null!=G.value&&(d.value||p.value||m.value||g.value||f.value);if(($.value||!B.value)&&!Y.value&&!Z)return null;const ee=(y.showSubtotal.value||k)&&P?h(LD,{}):null,te=!S.value&&!w.value,ne=O?.applied&&R&&q.value?h(ND,{children:q.value}):te?h(BM,{taxesIncluded:R,shopId:e}):null;if(e)return h(b,{children:[h(AD,{label:H,amount:J,hideCurrencyCode:$.value}),ne]});if(U){const e="base"===_?.weight?"generic":"strong";return h(b,{children:[ee,h(pD,{children:[h(mD,{children:h(Ry,{children:h(A,{when:q,fallback:h(Sy,{type:e,color:v,size:_?.size??"large",children:V.value}),children:h(b,{children:[h(Sy,{type:e,color:v,size:_?.size,children:V.value}),ne]})})})}),h(hD,{children:h(PD,{paymentDue:Q,hideCurrencyCode:$.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const re=[D,z].some((e=>e?.incoterm===ac.Ddp)),ie=M&&re?h(b,{children:[h(xR,{blockSize:"small-400"}),h(MC,{accessibilityRole:"presentation"}),h(xR,{blockSize:"small-400"}),h(gI,{type:"small",color:"subdued",children:h(_T,{children:l.translate("order_summary.duties_included_label")})})]}):null,ae=T?h(TD,{showLoadingPlaceholder:Y.value||Z}):h(fM,{spacing:"small-500",children:h(AD,{label:H,amount:J,hideCurrencyCode:$.value})}),oe=l.translate("order_summary.payment_terms_totals.due_today_next");return h(b,{children:[ee,h(A,{when:I,children:h(pD,{children:[h(mD,{children:h(Sy,{children:oe})}),h(hD,{children:h(Ry,{direction:"inline",gap:"small-200",alignItems:"baseline",children:h(EM,{condition:$.value,size:"medium",translate:!1,children:l.formatCurrency(0,{currency:J.value.currencyCode,form:"short"})})})})]})}),h(A,{when:X,children:e=>h(PM,{label:l.translate("order_summary.total_label"),value:l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})}),h(A,{when:I,fallback:h(AD,{label:H,amount:Q,hideCurrencyCode:$.value}),children:ae}),ne,void 0!==C&&x?h(pD,{children:h(hD,{accessibilityColumnIndex:2,children:h(Sy,{size:"small",translate:!1,children:l.translate("payment.pay_in_installments_split_pay_short",{amount:l.formatCurrency(C,{currency:x,form:"short"})})})})}):null,null!=j.value&&h(MD,{bgnAmount:j.value}),ie]})}const zD=xu("PriceBreakdownItemTooltip");function BD({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:i}=pe(),a=Iu(void 0,zD),o="strong",s="base";return h(PM,{layout:r,children:[h(kM,{children:h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:[h(Sy,{color:s,type:o,children:e}),t?h(b,{children:[h(Uh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:i.translate("tooltip.accessibility_label_context",{context:e})}),h($m,{id:a,children:t})]}):null]})}),h(SM,{children:h(Sy,{color:s,type:o,children:n})})]})}const VD=xu("RecurringTotalsTooltip"),FD=xu("RecurringTotalsLabel");function UD({cardStyle:e}){const{value:t}=ke().recurringTotals,{i18n:n}=pe(),r=QL(),i=Iu(void 0,VD),a=Iu(void 0,FD);if(!t?.length)return null;const o=n.translate("order_summary.recurring_subtotal_label");if(e){const e=1===t.length;return h(fy,{accessibilityRole:e?"group":void 0,"aria-labelledby":e?a:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:e?h(Dh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:[h(Sy,{id:a,color:"base",type:"strong",children:o}),h(Sy,{color:"base",type:"strong",children:r(t[0])})]}),h(Uh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:o})}),h($m,{id:i,children:n.translate("order_summary.recurring_total_tooltip")})]}):h(Sy,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})})}return h(b,{children:[h(MC,{accessibilityRole:"presentation"},"recurringTotalsDivider"),1===t.length?h(fM,{spacing:"small-300",children:h(BD,{title:o,tooltipText:n.translate("order_summary.recurring_total_tooltip"),itemText:r(t[0]),layout:"stackable"})}):h(Sy,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})]})}function qD({line:e}){const{i18n:t}=pe();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,i=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),a=BA(e.method.redemptionContent);return h(PM,{children:[h(kM,{children:h(Ry,{direction:"inline",gap:"base",children:[h(Sy,{children:t.translate("order_summary.gift_card_label")}),h(Ry,{direction:"inline",alignItems:"center",gap:"small-400",children:[h(Uh,{type:"gift-card"}),h(Sy,{accessibilityVisibility:"hidden",children:VA(a)}),h(Sy,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:a||""})})]})]})}),h(SM,{children:h(Sy,{type:"strong",children:i})})]})}function jD({line:e}){const{checkout:t,i18n:n}=pe(),r=t.proposal.negotiated.fields.shopPromotion.value,i="filled"===r?.status?new Map(r.promotions.map((({promotionId:e,type:t})=>[e,t]))):void 0;return e.method.redemptionContent?.details?.map((e=>{const{amount:t,currencyCode:r}=e.destinationAmount,a=n.formatCurrency(-parseFloat(t),{currency:r,form:"short",spacedMinusSign:!0}),o={SHOP_DISCOUNT_OFFER:n.translate("order_summary.exclusive_deal"),SHOP_CASH_BALANCE:n.translate("order_summary.shop_cash_title"),SHOP_PROMOTION:n.translate("order_summary.shop_promotion")},s=e.promotionType??(null==e.redemptionId?void 0:i?.get(e.redemptionId)),l="SHOP_PROMOTION"===e.redemptionType&&"DOORBUSTER"===s?n.translate("order_summary.flash_deal"):o[e.redemptionType];return l?h(PM,{type:"strong",label:l,value:a},e.redemptionId):null}))}function HD({line:e}){const{i18n:t}=pe();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 h(PM,{type:"strong",label:n,value:r})}function $D({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return h(jD,{line:e});case"STORE_CREDIT":return h(HD,{line:e});case"CUSTOM":{const t=e;return h(qD,{line:t},t.method.redemptionContent?.redemptionAttributes[0].value)}default:return null}}function YD(){const e=ao("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=UA(),n=[...e.value,...t];return 0===n.length?null:h(b,{children:n.map((e=>h($D,{line:e},function(e){if("CUSTOM"===e.method.redemptionSource){const t=e,n=t.method.redemptionContent?.redemptionAttributes[0]?.value||"";return e.method.redemptionSource+n}return e.method.redemptionSource}(e))))})}function WD(e){const t=ke(),n=t.merchandiseLines,{shop:{id:r},checkout:a}=pe(),o=a.proposal.facts.merchandiseLines??[],{value:s}=t.legacyRepresentProductsAsFees,l=i((()=>os(n.value?.lines??[],t.remoteMerchandiseDetails.value))),c=ss(),u=e?e!==r?{lines:l.value.get(e),factLines:void 0}:{lines:c.value,factLines:o}:{lines:n.value?.lines,factLines:o},d=function(e,t){return t?e?.reduce(((e,t)=>t.legacyFee?e:e+t.quantity),0):e?.reduce(((e,t)=>e+t.quantity),0)}(u?.lines,s),p=u?.lines?.filter((({quantity:e})=>e>0)),m=u?.factLines?.reduce(((e,t)=>e+t.quantity),0);return{totalLineQuantities:d,totalLineQuantitiesFact:m,merchandiseLinesWithCount:p?.length||0}}function GD({shopId:e}){const{subtotalLabel:t,subtotalValue:n,subtotalOriginalValue:r}=function(e){const{checkout:t,i18n:n}=pe(),r=function(e){const{shop:{id:t}}=pe(),n=ke(),r=n.remoteTotalDetails,a=Dt(),o=n.legacyRepresentProductsAsFees,s=n.legacySubtotalBeforeTaxesShippingAndFees,l=n.subtotal;return i((()=>{const n=o.value?s.value:a.value;return e?t===e?l.value:r.value?.perShopRemoteTotals.get(e)?.subtotal:n}))}(e),a=function(e){const{embed:t,i18n:n}=pe(),{totalLineQuantities:r,merchandiseLinesWithCount:i}=WD(e);return si(t?.embedder)?n.translate("order_summary.number_items",{count:r??0}):i>1&&r?n.translate("order_summary.subtotal_label_with_quantity",{count:r}):n.translate("order_summary.subtotal_label")}(e);return i((()=>{const e=r.value?n.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0,i=t.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in t.latestReceipt.value&&t.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,o=i?n.formatCurrency(i.amount,{currency:i.currencyCode,form:"short"}):void 0;return{subtotalLabel:a,subtotalValue:e,subtotalOriginalValue:o}}))}(e).value;return n?h(PM,{children:[h(kM,{children:h(Sy,{children:t})}),h(SM,{children:r?h(Ry,{direction:"inline",gap:"small-300",children:[h(Sy,{tone:"critical",type:"redundant",translate:!1,children:r}),h(Sy,{translate:!1,children:n})]}):h(Sy,{translate:!1,children:n})})]}):null}function JD(){const{i18n:e,checkout:t,source:n}=pe(),r=ke().tipLines,a=t.proposal.facts.tip,o=i((()=>{const e=r.value?.[0]?.amount,t=Vr(n)?a:e;return t&&t.amount>0?t:void 0}));return h(A,{when:o,children:t=>h(PM,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function KD({variant:e}){const t=function(){const e=ls(),{shop:t,embed:n}=pe(),r=t.hasFlagEnabled(cs);return i((()=>{const t=Boolean(n?.embedder)&&!si(n?.embedder);return!Boolean(r||!e.value||0===e.value.amount||t)}))}(),n=ls();return t.value&&n.value?h(QD,{variant:e,totalSavings:n.value}):null}function QD({variant:e,totalSavings:t}){const{i18n:n,embed:r}=pe(),{deferredTotal:a}=ke(),o=si(r?.embedder)?n.translate("universal.iframes.savings_label").toUpperCase():n.translate("order_summary.total_savings").toUpperCase(),s=n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),l=h(Sy,{type:"strong",translate:!1,children:s}),c=i((()=>a.value&&a.value.amount.amount>0?"small-200":"small-400"));return"card"===e?h(fy,{children:h(Ry,{direction:"inline",alignItems:"center",gap:"small-400",children:[h(Ry,{direction:"inline",alignItems:"center",gap:"small-500",children:[h(Uh,{type:"savings",size:"small",color:"base"}),h(Sy,{color:"subdued",children:n.translate("order_summary.total_savings")})]}),h(Sy,{color:"subdued",translate:!1,children:s})]})}
2):h(fM,{spacing:c.value,children:h(pD,{children:[h(mD,{children:h(Ry,{direction:"inline",alignItems:"center",gap:"small-300",children:[h(Uh,{type:"savings",size:"base",color:"strong"}),h(Sy,{type:"strong",children:o}),l]})}),h(hD,{})]})})}function XD(){const{moneyLines:{divided:e}}=Ah(),t=ke(),n=t.legacyRepresentProductsAsFees,r=t.legacyMerchandiseLinesAsFees,a=i((()=>n.value&&r.value?r.value.lines:[]));return h(J,{each:a,getKey:e=>e.title,children:t=>h(b,{children:[e&&h(LD,{}),h(ZD,{...t})]})})}function ZD({title:e,description:t,total:n}){const{i18n:r}=pe(),i=t?h(Ry,{direction:"inline",alignItems:"center",gap:"small-400",children:h(Sy,{children:[e,h("span",{style:{position:"absolute"},children:h(Nh,{padding:"small-500 none none small-500",overlay:h($m,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:h(Uh,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):h(Sy,{children:e});return h(PM,{label:e,children:[h(kM,{children:i}),h(SM,{children:h(Sy,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function eO({content:e}){return function(e){const t=s(!1);C((()=>{const n=e.value;if(t.current){if(n)return xd({content:n})}else t.current=!0}))}(e),h(A,{when:e,children:e=>h(b,{children:tO(e).map((({id:e,line:t})=>h(PM,{layout:"stackable",children:[h(fy,{inlineSize:"100%",children:h(kM,{children:h(gI,{type:"small",color:"subdued",textAlign:"end",children:t})})}),h(SM,{})]},e)))})})}function tO(e){const t=new Map;return e.split("\n").filter(Boolean).map((e=>{const n=t.get(e)??0;return t.set(e,n+1),{id:`${e}:${n}`,line:e}}))}function nO(){const{moneyLines:{divided:e}}=Ah(),{i18n:t,checkout:n}=pe(),{value:r}=Tt(),{value:i}=ke().deferredTotal,a=n.proposal.facts.previouslyPaidTotal,o=n.proposal.facts.updatedTotal,s=(n.proposal.facts.merchandiseLines??[]).some((e=>e.quantityChange&&e.quantityChange.delta)),l=Boolean(o&&r&&s),c=i&&i.amount.amount>0,u=a&&Number(a.amount)>0,d=(l||a)&&e;return d||l||u||c&&r?h(b,{children:[d&&h(LD,{}),c&&r&&h(PM,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l&&o&&h(PM,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(o.amount),{currency:o.currencyCode,form:"short"})}),u?h(PM,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(a.amount),{currency:a.currencyCode,form:"short"})}):null]}):null}function rO(){const{moneyLines:{divided:e}}=Ah(),t=function(){const{i18n:e,checkout:t}=pe(),n=t.proposal.facts.returnFees,r=Number(n?.aggregatedReturnShippingFees?.amount)>0,i=Number(n?.aggregatedRestockingFees?.amount)>0;return r||i?{shippingFee:r?{label:e.translate("order_summary.return_shipping_fee_label"),value:e.formatCurrency(Number(n?.aggregatedReturnShippingFees?.amount),{currency:n?.aggregatedReturnShippingFees?.currencyCode,form:"short"})}:null,restockingFee:i?{label:e.translate("order_summary.return_restocking_fee_label"),value:e.formatCurrency(Number(n?.aggregatedRestockingFees?.amount),{currency:n?.aggregatedRestockingFees?.currencyCode,form:"short"})}:null}:null}();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return h(b,{children:[n&&h(b,{children:[e&&h(LD,{}),h(PM,{type:"strong",label:n.label,value:n.value})]}),r&&h(PM,{type:"strong",label:r.label,value:r.value})]})}function iO(){const{i18n:e,checkout:t,embed:n}=pe(),{value:r}=us(),i=jA(),a=qA(),o=Boolean(t.proposal.facts.taxesIncluded),s=Wo().value||o;if(!i.value||!r)return null;const l=h(BM,{taxesIncluded:s});return si(n?.embedder)&&a.value.length>0?l:h(b,{children:[h(PM,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l]})}const aO=I((function(){const{checkout:e,i18n:t,embed:n}=pe(),{visibility:r}=e.configuration,{orderSummary:a}=a_(),o=e.configuration.orderSummary?.headerPosition??a.headerPosition,s=a.isCollapsible??!1,l=!1===a.isCollapsible,c=ke(),{currentDetour:u}=Fc().value,d="thankYou"===u?.type,p=hM(),m=e.proposal.negotiated.fields.additionalMoneyLines.value,g=e.proposal.negotiated.fields.lpmDisclosure,f=xn("lpmDisclosure"),y=i((()=>f.value?void 0:g.value)),v=i((()=>{const t=e.latestReceipt.value;return"processed"===t?.status?t.lpmDisclosure:void 0}));return h(aL,{children:[h(CM,{ref:p,title:t.translate("order_summary.cost_table_title"),children:[h(A,{when:r.showSubtotal,children:[h(GD,{}),h(ZM,{}),h(GM,{}),h(XD,{}),h(rO,{}),h(lD,{}),h(JD,{}),h(iO,{}),h(YD,{})]}),h(nO,{}),h(uD,{}),m?.map((e=>h(PM,{label:e.label,value:t.formatCurrency(e.amount.amount,{currency:e.amount.currencyCode,form:"short"})},e.id))),"BOTTOM"===o&&s?h(xR,{blockSize:"small-500"}):h(OD,{}),!d&&h(A,{when:()=>!y.value,children:h(xM,{})}),h(eO,d?{content:v}:{content:y}),h(FM,{}),!si(n?.embedder)&&h(KD,{}),!l&&h(UD,{})]}),l&&h(A,{when:()=>c.recurringTotals.value,children:h(fy,{paddingBlockStart:"small-300",children:h(UD,{cardStyle:!0})})})]})}));var oO="km09ry0 _1fragem5z";const sO=xu("Form");function lO({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:r=!1,id:i,contentsClassName:a}){const s=Rd(),l=Iu(void 0,sO),c=i??l,u=null!=ip(),d=o((()=>({id:c,nested:u})),[c,u]);let p=null;n&&(p=h(fy,{accessibilityVisibility:"exclusive",children:h(cO,{disabled:r,form:d,children:"string"==typeof n?n:s("submit")})}));const m=t=>{t.preventDefault(),t.stopPropagation(),r||"function"==typeof e&&e()},g=h("div",{className:P("km09ry1 _1fragemws",a),children:t});return u?h(b,{children:[h(rp.Provider,{value:d,children:[g,p]}),h(Bu,{children:h("form",{action:"",method:"POST",noValidate:!0,className:oO,id:c,onSubmit:m})})]}):h("form",{action:"",method:"POST",noValidate:!0,className:oO,id:c,onSubmit:m,children:h(rp.Provider,{value:d,children:[g,p]})})}function cO({form:e,children:t,disabled:n}){return h("button",{type:"submit",disabled:n,tabIndex:-1,"aria-hidden":!0,form:e.nested?e.id:void 0,children:t})}const uO=["extraSmall","small","medium","large"];function dO({above:e,below:t,children:n}){const r=lp()?"span":"div",{hiddenOnExtraSmall:i,hiddenOnSmall:a,hiddenOnMedium:o,hiddenOnLarge:s}=function(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?uO.indexOf(e)+1:0,r=t?uO.indexOf(t)-1:uO.length-1,i=uO.slice(n,r+1);return{hiddenOnExtraSmall:i.indexOf("extraSmall")>=0,hiddenOnSmall:i.indexOf("small")>=0,hiddenOnMedium:i.indexOf("medium")>=0,hiddenOnLarge:i.indexOf("large")>=0}}(e,t),l=P("_123qrzt0 _1fragem5z",i&&"_123qrzt1",a&&"_123qrzt2",o&&"_123qrzt3",s&&"_123qrzt4");return h(r,{className:l,children:n})}function pO({targetSelector:e,label:t,icon:n}){const r=a((()=>{const t=document.querySelector(e);t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}))}),[e]);return h(fy,{display:"@media (inline-size >= medium) auto, none",children:h(xy,{variant:"secondary",size:"small",onClick:r,className:Ne({screenReaders:"untilFocus"}),children:h(Ry,{direction:"inline",gap:"small-400",alignItems:"center",children:[h(Uh,{type:n,size:"small-100"}),h(Sy,{children:t})]})})})}const mO=({violations:e,noticeType:t,noticeTitle:n,noticeHeader:r,noticeFooter:i})=>({code:t,tone:"critical",localizedTitle:n,localizedMessage:h(b,{children:[r,h("ul",{style:{listStyle:"inside"},children:e.map((e=>h("li",{children:e.localizedMessageHtml?h("span",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
2):e.localizedMessage||e.nonLocalizedMessage},e.code)))}),i]})}),hO=()=>{const{i18n:e,shop:t}=pe(),n=Cu(),r=xn("shippingAddress"),{allViolations:a}=ke(),o=Fc(),{shippingAddress:s}=Ge();return i((()=>{const i=s.peek();if(n.value&&"information"===o.value.currentPage?.id&&Kn(i,{...ds,countryCode:i?.countryCode}))return null;const l=a.value?.filter((e=>Fr.has(e.code)))||[];return 0===l.length||!n.value||r.value?null:mO({violations:l,noticeType:Kv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Kv.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.editable_shipping_address_violations_message_title"),noticeFooter:e.translate("notice_banner.editable_shipping_address_violations_message_footer",{emailLink:h(Ny,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})}))};var gO={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 fO=xu("Banner"),yO=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function vO({autoFocus:e,focusable:t,children:n,collapsible:r,dismissible:i,iconHidden:a,color:o="base",id:c,tone:d="auto",heading:p,hidden:m=!1,onDismiss:g,onAfterHide:f}
2){const y="auto"===d?"info":d,v=Rd(),[_,k]=u(m),[S,w]=u(!0),C=s(),E=Iu(void 0,fO),x=sy({active:"critical"===y}),I=s(_),A=op(),T=Eu(),N=s(T);N.current=T,l((()=>{if(!e)return;const t=C.current;if(!t)return;const n=()=>{t.focus({preventScroll:!0}),""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)"),t.scrollIntoView?.({behavior:N.current?"auto":"smooth"})};if(t.getBoundingClientRect().height>0)return void n();if("undefined"==typeof ResizeObserver){const e=setTimeout(n,300);return()=>clearTimeout(e)}const r=new ResizeObserver((()=>{0!==t.getBoundingClientRect().height&&(r.disconnect(),n())}));return r.observe(t),()=>r.disconnect()}),[e]),l((()=>{!I.current&&_&&f?.(),I.current=_}),[_,f]),l((()=>{k(m)}),[m]);const L=P(gO.Banner,y&&gO.toneVariant[y],p&&gO.withHeading,gO.colorVariant[o]),R=Boolean(r&&p),M=!R||R&&!S,D=i&&h("button",{type:"button",className:gO.Button,onClick:()=>{"function"==typeof g&&g(),k(!0)},"aria-label":v("closeNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:h(Uh,{type:"x",size:"small"})}),O=h("button",{type:"button",className:gO.Button,onClick:()=>w((e=>!e)),"aria-expanded":!S,"aria-controls":`${E}-collapsible-area`,"aria-label":v("expandNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:h(Uh,{size:"small",type:S?"chevron-down":"chevron-up"})});return _?null:h("div",{className:L,role:"critical"===y?"alert":"status",...(e||t)&&{tabIndex:-1},ref:function(e){C.current=e,x.current=e},id:c,children:[!a&&h("div",{className:gO.Icon,children:h(Uh,{type:yO.get(y),size:"fill"})}),p&&h("div",{className:gO.Heading,children:h(Ww,{level:3,children:p})}),R&&h("div",{className:gO.ControlCollapsible,children:O}),LC(n)&&h("div",{className:gO.Content,children:h(ld.Provider,{value:"Banner",children:h(td,{children:R?h(pp,{open:M,id:`${E}-collapsible-area`,children:[p&&h(xR,{blockSize:"small-200"}),n]}):h(b,{children:[p&&h(xR,{blockSize:"small-200"}),n]})})})}),D&&h("div",{className:gO.ControlDismiss,children:D})]})}const _O=["cart","cart.billingAddress.address1","cart.billingAddress.address2","cart.billingAddress.city","cart.billingAddress.company","cart.billingAddress.countryCode","cart.billingAddress.district","cart.billingAddress.firstName","cart.billingAddress.lastName","cart.billingAddress.line2","cart.billingAddress.neighborhood","cart.billingAddress.phone","cart.billingAddress.provinceCode","cart.billingAddress.streetName","cart.billingAddress.streetNumber","cart.billingAddress.subdistrict","cart.billingAddress.zip","cart.buyerIdentity","cart.buyerIdentity.email","cart.buyerIdentity.phone","cart.deliveryGroups[0].deliveryAddress","cart.deliveryGroups[0].deliveryAddress.address","cart.deliveryGroups[0].deliveryAddress.address1","cart.deliveryGroups[0].deliveryAddress.address2","cart.deliveryGroups[0].deliveryAddress.city","cart.deliveryGroups[0].deliveryAddress.company","cart.deliveryGroups[0].deliveryAddress.countryCode","cart.deliveryGroups[0].deliveryAddress.district","cart.deliveryGroups[0].deliveryAddress.firstName","cart.deliveryGroups[0].deliveryAddress.lastName","cart.deliveryGroups[0].deliveryAddress.line2","cart.deliveryGroups[0].deliveryAddress.neighborhood","cart.deliveryGroups[0].deliveryAddress.phone","cart.deliveryGroups[0].deliveryAddress.provinceCode","cart.deliveryGroups[0].deliveryAddress.streetName","cart.deliveryGroups[0].deliveryAddress.streetNumber","cart.deliveryGroups[0].deliveryAddress.subdistrict","cart.deliveryGroups[0].deliveryAddress.zip","cart.discountCode","cart.paymentLines[0]","cart.paymentLines[0].billingAddress","cart.paymentLines[0].billingAddress.address1","cart.paymentLines[0].billingAddress.address2","cart.paymentLines[0].billingAddress.city","cart.paymentLines[0].billingAddress.company","cart.paymentLines[0].billingAddress.countryCode","cart.paymentLines[0].billingAddress.district","cart.paymentLines[0].billingAddress.firstName","cart.paymentLines[0].billingAddress.lastName","cart.paymentLines[0].billingAddress.line2","cart.paymentLines[0].billingAddress.neighborhood","cart.paymentLines[0].billingAddress.phone","cart.paymentLines[0].billingAddress.provinceCode","cart.paymentLines[0].billingAddress.streetName","cart.paymentLines[0].billingAddress.streetNumber","cart.paymentLines[0].billingAddress.subdistrict","cart.paymentLines[0].billingAddress.zip","cart.paymentLines[0].card","cart.paymentLines[0].card.expiry","cart.paymentLines[0].card.issueDate","cart.paymentLines[0].card.issueNumber","cart.paymentLines[0].card.name","cart.paymentLines[0].card.number","cart.paymentLines[0].card.verificationValue","cart.poNumber","order.deliveryUpdates","order.deliveryUpdates.email"].map((e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)})),bO=()=>{const e=de(Qf),{observability:t}=pe();return a((n=>{const r=function(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}(n),i=r?`${e}.${r}`:e;return a=i,_O.some((e=>e.test(a)))?i:(t.error(new PO(`Invalid target (${e}) and field (${r}
2) combination`)),"cart");var a}),[e,t])},PO=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},kO=new Set([US.InputInvalid,US.InputRequired]);function SO(e){return!kO.has(e)}function wO(e,t){return!!e&&e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message}function CO(e){const{message:t,errorType:n,errorValue:r,children:i}=e,a=bO()(),o=Cf(),c=s(o),u=s(null),d=s(),p=s(!0);c.current=o;const m=e=>{c.current({...e,timestamp:new Date})},g=ps((e=>{p.current&&wO(d.current,e)&&SO(e.errorType)&&m(e)}),250);return l((()=>{const e=n||function(e){switch(e){case"cart.buyerIdentity":return US.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return US.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return US.PaymentError;case"cart.discountCode":return US.DiscountError;default:return US.CheckoutError}}(a),i=t??u.current?.textContent??"",o={target:a,errorType:e,value:r||null,message:i};wO(d.current,o)||(d.current=o,SO(e)?g(o):m(o))})),l((()=>()=>{p.current=!1}),[]),h("div",{ref:u,children:i})}function EO(e){const{errorType:t,errorValue:n,children:r,...i}=e;return h(vO,{...i,children:h(CO,{errorType:t,errorValue:n,children:r})})}function xO({notice:e,iconHidden:t=!1,errorType:n}){const r=e.localizedMessageHtml||e.localizedMessage||e.nonLocalizedMessage;if(!r)return null;const i=e.tone??"info",a={key:e.code,tone:i,onDismiss:e.onDismiss,dismissible:Boolean(e.onDismiss),heading:e.localizedTitle,collapsible:e.collapsible,iconHidden:t},o="string"==typeof e.localizedMessageHtml?h("div",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
2):r;return["critical","warning"].includes(i)?h(EO,{...a,errorType:n??US.CheckoutError,children:o}):h(vO,{...a,children:o})}function IO(){const e=hO().value;return e?h(xO,{notice:e,errorType:US.DeliveryError}):null}function AO(){const e=ke().allViolations,t=i((()=>(e.value?.filter((e=>ms(e.code)))??[]).filter(((e,t,n)=>t===n.findIndex((t=>t.code===e.code)))))),n=i((()=>t.value.length>0));return h(A,{when:n,children:h(Ry,{gap:"base",children:h(J,{each:t,getKey:e=>e.code,children:({localizedMessage:e,nonLocalizedMessage:t})=>h(EO,{errorType:US.PaymentError,tone:"critical",children:e||t})})})})}function TO(){const{allViolations:e}=ke();return i((()=>{const t=e.value?.filter((e=>Pk.has(e.code)))||[];return{violations:t,hasViolations:t.length>0}}))}const NO=()=>{const{violations:e,hasViolations:t}=TO().value;return t?h(Ry,{gap:"base",children:e.map((({code:e,localizedMessage:t,nonLocalizedMessage:n})=>h(EO,{errorType:US.DiscountError,tone:"warning",children:t||n},e)))}):null};function LO(){const e=ke().allViolations,{router:t,checkout:{identity:n}}=pe(),r=f(null),{shippingAddress:a}=Ge(),o=L(jt(a.value.countryCode)),c=i((()=>Av(e.value??[]))),u=i((()=>function(e=[]){const t=e.filter((({code:e})=>hs.has(e)));if(1===t.length&&"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===t[0].code)return t[0]}(e.value)));l((()=>t.beforeNavigate((()=>{r.value=null}))),[r,t]);const d=s(n.current.value);return C((()=>{const e=n.current.value;e!==d.current&&void 0!==d.current&&(r.value=null),d.current=e})),C((()=>{const e=u.value;e&&e!==r.peek()&&(r.value=e)})),i((()=>{const t=u.value??r.value,n=t?{...t,tone:"info"}:void 0;let i;return c.value||o.value.loading||(i=e.value?.find((e=>"MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY"===e.code))),{banner:n,toast:i}}))}function RO(){const e=LO(),t=Kh(),n=s(null),r=ps((e=>{if(!e)return;const r=e.localizedMessage;if(r===n.current?.message)return;n.current?.hide();const i=t?.(r);i&&(n.current={...i,message:r})}),250);return C((()=>{const t=e.value.toast;t&&c((()=>{r(t)}))})),null}function MO(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=pe(),i=e.app.config,a=Boolean(t?.isCheckoutKit()||t&&"shopPay"!==r.current.value)||n.enabled||so(i);return{isAppLayout:a,isWebLayout:!a}}class DO extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}
2function OO(e){const t=Ge().paymentLines;return i((()=>function(e,t){const[n]=vn(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}(t.value,e)))}function zO(){const{i18n:e}=pe(),{href:t,onClick:n}=gw();return h(Ny,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const BO=new Map([["AMOUNT_TOO_SMALL","amount_too_small"],["AUTHENTICATION_ERROR","three_d_secure_failed"],["AUTHENTICATION_REQUIRED","generic_error"],["AUTHORIZATION_ERROR","processing_error"],["CALL_ISSUER","call_issuer"],["CANCELED_PAYPAL_BILLING_AGREEMENT","processing_error"],["CANCELLED_PAYMENT","cancelled_payment"],["CARD_DECLINED","card_declined"],["EXPIRED_BUYER_ACTION","expired_buyer_action"],["EXPIRED_CARD","expired_card"],["FUNDING_ERROR","processing_error"],["INCORRECT_ADDRESS","cannot_verify"],["INCORRECT_CVC","cannot_verify"],["INCORRECT_NUMBER","cannot_verify"],["INCORRECT_PIN","cannot_verify"],["INCORRECT_ZIP","cannot_verify"],["INSUFFICIENT_FUNDS","insufficient_funds"],["INVALID_CURRENCY","processing_error"],["INVALID_CVC","invalid_cvc"],["INVALID_EXPIRY_DATE","invalid_expiry_date"],["INVALID_ITEM_TOTAL","processing_error"],["INVALID_NUMBER","invalid_number"],["INVALID_PAYMENT_METHOD","cannot_verify"],["INVALID_SHIPPING_ADDRESS","invalid_shipping_address"],["INVALID_TOKEN","processing_error"],["INVOICE_ALREADY_PAID","processing_error"],["MISSING_SHIPPING_ADDRESS","missing_shipping_address"],["NAME_MISMATCH","name_mismatch"],["PAYMENT_ABOVE_THRESHOLD","payment_above_threshold"],["PAYMENT_METHOD_EXPIRED","payment_method_expired"],["PICK_UP_CARD","pick_up_card"],["PUBLIC_PAYMENT_ERROR","generic_error"],["RISKY","risky"],["SHOP_PAY_DECLINED","processing_error_checkout_as_guest"],["SUCCESSFUL_OFFSITE_WITH_GIFT_CARD_ERROR","successful_offsite_with_gift_card_error"],["TEST_MODE_LIVE_CARD","test_mode_live_card"],["THIRD_PARTY_INTERNAL_ERROR","processing_error"],["TOKEN_EXPIRED","processing_error"],["TRANSIENT_ERROR","transient_error"],["UNILATERAL_AUTH_ERROR","processing_error"],["UNPROCESSABLE_TRANSACTION","processing_error"],["CAPTCHA_REQUIRED","captcha_required"],["DECISION_RULE_BLOCK","generic_error"],["CVV_ATTEMPTS_EXCEEDED","cvv_attempts_exceeded"],["CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE","custom_redeemable_no_longer_available"]]),VO=["SHOP_PAY_DECLINED"];function FO(e){const{i18n:t}=pe();let n="generic_error";return e&&(n=BO.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&VO.includes(e.code)&&{checkout_as_guest_link:h(zO,{})}})}const UO=["AMOUNT_TOO_SMALL"];function qO(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:OO(Rn.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:OO(Rn.AmazonPay).value}].filter((({checkoutSessionId:e})=>Boolean(e))),{i18n:t,observability:n}=pe(),{error:r,hasError:a}=Fv(gs),o=r&&UO.includes(r),s=FO(o?{type:"payment",code:r}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=Cn(),u=i((()=>{const e=c.value;return e.status===T_.Available?e.sdk:void 0}));if(!a||!e)return null;const{isBuyWithPrime:d,checkoutSessionId:p}=e;return h(A,{when:u,children:e=>h(EO,{tone:"critical",errorType:US.PaymentError,children:h(gI,{children:o?s:h(b,{children:[t.translate("amazon_pay.error_page.payment_decline.message"),h(Ny,{onClick:()=>{try{d?e.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:p,isDeclined:!0}}):e.Pay.changePaymentMethod({amazonCheckoutSessionId:p,isDeclined:a})}catch(t){l.value=!0,n.error(new DO(`Error on changing buyer payment method. Details: ${t}`,{cause:t}))}},children:t.translate("amazon_pay.error_page.payment_decline.link")})]})})})})}const jO=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[aa,"info"]]),HO=()=>{const e=f(!1),t=f(!1),n=t_(),r=ke().allViolations,a=i((()=>r.value?.some((e=>fs.has(e.code)))??!1));return C((()=>{a.value&&(t.value=!0),!a.value&&e.value&&(e.value=!1,t.value=!1)})),i((()=>{const r=t.value&&!e.value,i=n.value;return r&&i?{code:Kv.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:i,tone:"info",onDismiss:()=>{e.value=!0}}:null}))};function $O(){!function(){const{shippingAddress:e}=Ge(),{inMemoryGooglePayParts:{paymentSheetError:t},inMemoryPayPalParts:{paymentSheetError:n}}=Cn();l((()=>{let r=!0;return e.fields.countryCode.subscribe((()=>{r?r=!1:(t.value?.type===aa&&(t.value=void 0),n.value?.type===oa&&(n.value=void 0))}))}),[e,t,n])}();const e=function(){const{i18n:e}=pe(),{paymentSheetError:t}=Cn().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 i((()=>{const e=t.value?.type,n=t.value?.tone;if(e&&r[e])return{code:Kv.PaymentSheetViolations,tone:n??"critical",localizedMessage:r[e],nonLocalizedMessage:r[e]}}))}(),t=function(){const{i18n:e}=pe(),{shippingAddress:t}=Ge(),{inMemoryGooglePayParts:{paymentSheetError:n}}=Cn(),r=L(jt(t.value.countryCode));return i((()=>{const t=n.value?.type,i=(()=>
2{if("invalid_config"===t||"config_missing_required_fields"===t)return e.translate("wallets.errors.generic",{walletName:e.translate("brand.google_pay")});if("unusable_partial_address"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if("unexpected_terminal_error"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(t===aa){const t=r.value.details?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_country",{walletName:e.translate("brand.google_pay"),countryName:t}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.google_pay")})}return"recovery_notice"===t?e.translate("wallets.recovery_notice"):void 0})(),a=t?jO.get(t):"critical";if(i)return{code:Kv.PaymentSheetViolations,tone:a,localizedMessage:i,nonLocalizedMessage:i,onDismiss:"info"===a?()=>n.value=void 0:void 0}}))}(),n=L(function(){const{shop:e,i18n:t,checkout:{configuration:n}}=pe(),{shippingAddress:r,paymentLines:i}=Ge(),a=r.value,s=ke(),{value:l}=s.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:c}}=Cn(),{details:u,loading:d}=jt(a.countryCode),{value:p}=s.allViolations,m=dv(a.countryCode),h=e.hasFlagEnabled(ra),g=o((()=>ia({paymentLines:i.value,isOnePage:n.layout.isOnePage.value})?p?.filter(iC)??[]:[]),[p,i,n.layout.isOnePage.value]),f=o((()=>h&&function({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);return 1===n.length&&tC({missingAddressField:eC({addressErrors:t("shipping",n)}),violations:n})}({violations:g,getAddressErrorsFromViolations:m})),[g,m,h])?void 0:g[0],y=c.value?.type===aa,v=c.value?.type===oa,_=o((()=>{const e=sa(l,"PAYPAL_EXPRESS");if(y&&!e){const e=d?a.countryCode:u?.name;return e?t.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{walletName:t.translate("brand.paypal"),countryName:e}):t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")})}}),[u?.name,d,l,y,a.countryCode,t]);if(v){const e=t.translate("shipping_errors.unavailable_address_country");return{code:Kv.PaymentSheetViolations,tone:"critical",localizedMessage:e,nonLocalizedMessage:e,onDismiss:()=>{c.value=void 0}}}return _?{code:Kv.PaymentSheetViolations,tone:"info",localizedMessage:_,nonLocalizedMessage:_,onDismiss:()=>{c.value=void 0}}:f?{code:Kv.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}:void 0}()),r=function(){const{receiptErrorSignal:e}=Cn();return i((()=>{const t=e.value;if(t)return{code:Kv.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}}))}(),s=oC(),c=aC({isPayWithPayPalButton:!1}),u=c_(),d=L(function(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=Cn(),{i18n:n,checkout:r,shop:i}=pe(),o=Xv(),s=i.hasFlagEnabled(oe),l=r.configuration.layout.isOnePage.value,c=vc({applePaySubscriptionsDecelerationActive:o,applePayThreePageVaultedReviewEnabled:s,isOnePageCheckout:l}),{queryParam:u,errorMessage:d,errorTitle:p,tone:m,shouldSuppressNotice:h}=b_({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:c}),g=a((()=>({code:Kv.PaymentSheetViolations,tone:"warning",localizedMessage:n.translate("wallets.errors.subscription_review_required")})),[n]);if(u&&!h)return u===En?g():{code:Kv.PaymentSheetViolations,localizedTitle:p,tone:m,localizedMessage:d}}()),p=HO();return i((()=>{const i="error"===c.value.status,a=Boolean(p.value),o=u.value||r.value||d.value||e.value||t.value||(a?null:n.value)||(i?null:s.value);if(o)return"string"==typeof o?{code:Kv.PaymentSheetViolations,localizedMessage:o,nonLocalizedMessage:o,tone:"critical"}:o}))}const YO=new Set([...new Set(["CART_METAFIELD_GENERIC_ERROR"]),...new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"])]),WO=["noAddressLocation","stockProblems","thankYou"],GO=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),JO=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),KO=[...Fr,...ys,...vs,...Pk,..._s,...GO,...JO,...bs,...Ps,...ks,...Ss,...ws,..._k,...Wn,...Ki,...Cs,...Hr,...pn,...Va,...fs,...Es,...YO,"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 QO({children:e,id:t}){return h("li",{id:t,className:"_1585eob1 _1585eob0 _1fragemws _1fragemzh",children:e})}var XO={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function ZO({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:i}){const{className:a}=Ch({gap:e}),o=P(XO.UnorderedList,t&&XO.listStyleVariant[t],a);return h("div",{className:XO.Wrapper,children:h("ul",{className:o,role:"none"===t?"list":void 0,"aria-label":n,id:i,children:r})})}function ez(){const e=ke().buyerIdentity,t=Cu(),{shippingAddress:n}=Ge();return i((()=>{const r=e.value?.purchasingCompany,i=!!r?.location.shippingAddress&&Kn(n.value,r.location.shippingAddress);return t.value&&!i}
2))}function tz(){const{i18n:e,shop:t,checkout:n}=pe(),{allViolations:r,paymentLines:a,paymentMethods:o}=ke(),s=Cu(),l=n.configuration.layout.isOnePage.value,c=Fc();return i((()=>{const{currentPage:n}=c.value,i=o.value?.some((e=>"deferred"===e.type))&&a.value?.lines?.some((e=>"deferred"===e.method.type));if(!(l&&i||!l&&!s.value||"payment"===n?.id))return null;const u=r.value?.filter((e=>ms(e.code)))||[];return 0===u.length?null:{violations:u,noticeType:Kv.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Kv.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:h("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}}))}function nz(){const{client:e,router:t}=pe(),n=e.unstable_getSerialization("amazonQueryParams"),r=Cn().inMemoryAmazonPayParts.serializedAmazonParams,i=r.value,{searchParams:a}=t.currentUrl.value;return o((()=>{const e=function(){if(a&&"function"==typeof a.entries){const e=a.entries();if(e&&"function"==typeof e[Symbol.iterator])return Object.fromEntries(e)}return{}}();let t=i;null===i&&n&&(r.value=n,t=n);const o={...t,...e};return Object.fromEntries(xs.map((e=>[e,o[e]])))}),[a,i,n,r])}function rz(){const{router:e}=pe();return{searchParams:nz(),isThankYouPage:e.currentUrlMatches("/thank-you")}}function iz(){const{paymentMethods:e}=ke(),{paymentLines:t}=Ge(),{searchParams:n,isThankYouPage:r}=rz(),a=L(n),o=L(r),l=s(!1),c=s(!1);return i((()=>{const n=a.value,r=t.value,i=e.value,s=n.wallet===Rn.BuyWithPrime&&!n.amazon_cancelled,[u]=vn(r,[Rn.BuyWithPrime]),d=Boolean(u);return s&&(l.current=!0),d&&(c.current=!0),!c.current||d||s||(l.current=!1,c.current=!1),Is({paymentLines:r,paymentMethods:i,urlParams:{wallet:l.current?Rn.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:o.value})}))}function az(){const{paymentLines:e}=Ge(),{checkout:t}=pe(),n="shopPay"===t.identity.current.value;return i((()=>As({paymentLines:e.value,isOnePage:t.configuration.layout.isOnePage.value,isShopPayActive:n})))}function oz(){const e=function(){const e=ke().allViolations,{i18n:t,url:n}=pe();return i((()=>{const r=e.value?.filter((e=>bs.has(e.code)))??[];if(!r.length)return null;const i=h(b,{children:t.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:h(Ny,{tone:"monochrome",href:n.cart(),children:t.translate("notice_banner.return_to_cart_link_text")})})});return 1===r.length?{code:r[0].code,localizedTitle:r[0].localizedMessage||r[0].nonLocalizedMessage,localizedMessage:i,collapsible:!1,tone:"critical"}:{code:Kv.MerchandiseQuantityRulesNotMet,localizedTitle:t.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:i,collapsible:!1,tone:"critical"}}))}(),t=$O(),n=function(){const{checkout:e,i18n:t}=pe(),{configuration:n}=e,r=e.latestReceipt.value,{lastJourneyProgression:i}=Pe(),a=n.layout.isOnePage.value,s=iz(),l=o((()=>"failed"===r?.status&&"payment"===r.failure?.type&&"PRE_CHARGE_ERROR"===r?.failure.code&&"success"!==i.value.type),[i.value,r])&&(a||s.value),{inMemoryAmazonPayParts:{buyerDetails:c}}=Cn(),u=l||c.value.error,d=o((()=>l?Kv.PaymentsViolations:Kv.OtherViolations),[l]);return u?{code:d,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}(),r=function(){const e=ke().merchandiseLines,{i18n:t}=pe();return i((()=>e.value?.sellingPlanMismatch?{code:Kv.SellingPlanDigest,localizedMessage:t.translate("notice_banner.subscription_changed"),status:"warning"}:void 0))}(),a=LO().value.banner,l=function(){const{taxes:e,merchandiseLines:t}=ke(),{i18n:n}=pe(),r=s("unset"),a=s(),o=Fc();return i((()=>{const i=e.value,s=t.value?.priceMismatch,l="information"===o.value.currentPage?.id,c="pending"===i?.status?void 0:i?.status;return"unset"===r.current&&c&&(r.current=c),s&&"unset"!==r.current&&c&&r.current!==c?(a.current={code:Kv.TaxExemption,localizedMessage:n.translate("change_country.cart_updated_based_on_country")},r.current=c):s&&!l||(a.current=void 0),a.current}))}(),c=function(){const e=ke().buyerIdentity.value?.purchasingCompany,t=!pe().checkout.configuration.layout.isOnePage.value,n=function(){const{i18n:e,shop:t}=pe(),n=ke().allViolations;return i((()=>0===(n.value?.filter((e=>Va.has(e.code)))||[]).length?null:{code:Kv.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:h(Ny,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})}))}().value,r=function(){const{i18n:e,router:t}=pe(),n=t.currentUrl.value,[r,i]=u(void 0),a="true"===n.searchParams.get("company_location_changed");return o((()=>!0!==r&&a?(i(!1),{code:Kv.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>i(!0)}):null),[r,e,a])}(),a=function(){const{i18n:e,shop:t,checkout:n}=pe(),[r,i]=u(!1),a=pP(),o=Cu(),s=n.configuration.layout.isOnePage.value;return r||!a.value||o.value||s||!n.isShippingRequired.value?null:{code:Kv.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:h(_T,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:h(Ny,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>i(!0)}}(),s=function(){const{i18n:e,shop:t,checkout:n}=pe(),r=Cu(),a=ez(),o=Fw(),s=n.configuration.layout.isOnePage;return i((()=>{const{deliveryAddressErrors:n}=o.value;if(s.value||a.value||0===n.length)return null;const i=r.value?h(Sy,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):h(Sy,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:h(Ny,{href:`mailto:${t.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),[l]=n,c=1===n.length;return{code:Kv.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:c?l.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:c?i:h(b,{children:[h(ZO,{children:n.map((e=>h(QO,{children:h(Sy,{children:e.messageNode??e.message})},`${e.target}${e.message}`)))}),i]})}}))}().value,l=(()=>{const e=f(!1),{allViolations:t}=ke();return i((()=>{const n=t.value?.filter((e=>GO.has(e.code)))||[],r=n.length>0?n[0]:null;return e.value||!r?null:{code:Kv.TipsViolations,localizedMessage:r.localizedMessage||r.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}}))})().value,c=hO().value,d=(()=>{const{i18n:e}=pe(),t=ke().allViolations;return i((()=>0===(t.value?.filter((e=>JO.has(e.code)))||[]).length?null:{code:Kv.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")}))})().value,p=tz().value,m=function(){const{i18n:e,shop:t,checkout:n}=pe(),{allViolations:r}=ke(),a=Cu(),{paymentLines:o}=Ge();return i((()=>
2{if(Boolean(Ut(o.value,"APPLE_PAY"))&&!n.isShippingRequired.value)return null;if(a.value)return null;const i=r.value?.filter((e=>Fr.has(e.code)))||[];return 0===i.length?null:{violations:i,noticeType:Kv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Kv.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:h("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}}))}().value,g=function(){const{buyerIdentity:e,allViolations:t}=ke(),{i18n:n,shop:r,observability:a}=pe();return i((()=>{if(!e.value?.purchasingCompany)return null;const i=(t.value||[]).filter((e=>!KO.includes(e.code)));for(const e of i)a.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:e.code}});return 0===i.length?null:{violations:i,noticeType:Kv.OtherViolations,noticeTitle:n.translate("notice_banner.violations_title",{violation:n.translate("notice_banner.individual_violations_title",{scope:Kv.OtherViolations})}),noticeHeader:n.translate("notice_banner.all_violations_content",{emailLink:h("a",{href:`mailto:${r.contactEmail}`,children:n.translate("notice_banner.all_violations_email_link")})})}}))}().value,{currentDetour:y}=Fc().value,v=y?.type&&WO.includes(y.type),{shippingAddress:_}=Ge();if(!e||v)return[];const P=_.peek(),k=e?.location.shippingAddress||{},S=Kn(P,k);return[...p?[mO(p)]:[],...m?[mO(m)]:[],...g?[mO(g)]:[],...n?[n]:[],...r?[r]:[],...a?[a]:[],...s?[s]:[],...l?[l]:[],...c&&t&&S?[c]:[],...d&&t?[d]:[]]}(),d=function(){const e=ke(),{allViolations:t}=e,n=e.paymentLines?.value?.lines,{lastJourneyProgression:r}=Pe(),a=Boolean(Ut(n,"APPLE_PAY")),s=function(){const{client:e,i18n:t}=pe(),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:h(Ny,{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:h(Ny,{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"),[Ds]:t.translate("remote.errors.currency_mismatch_removal")};return(e,t)=>{const n=r[e.code];return{...e,localizedMessageHtml:n??e.localizedMessageHtml,localizedMessage:n??e.localizedMessage,tone:t}}}(),l=az(),c=i((()=>("success"===r.value.type||"error"===r.value.type)&&"completion"===r.value.negotiationStage)),{criticalViolations:u,warningViolations:d}=o((()=>{const e=t.value||[],n=[],r=[];for(const t of e)"ConfirmChangeViolation"!==t.__typename&&"UnprocessableTermViolation"!==t.__typename&&"RemoveTermViolation"!==t.__typename&&"ArtifactDissatisfactionViolation"!==t.__typename||(Ts.has(t.code)&&n.push(s(t,"info")),Ns.has(t.code)&&r.push(s(t,"warning")),Ls.has(t.code)&&c.value&&n.push(s(t,"critical")),Rs.has(t.code)&&n.push(s(t,"critical")),a&&!l.value&&Ms.has(t.code)&&n.push(s(t,"critical")));return{criticalViolations:n,warningViolations:r}}),[t.value,c.value,a,l.value,s]),p=o((()=>u.length>=1?u.map((e=>e.priority??0)).reduce(((e,t)=>e>t?e:t)):0),[u]),m=o((()=>u.length>=1?u.filter((e=>(e.priority??0)>=p)):u),[u,p]);return d.concat(m)}(),p=function(){const{source:e}=pe(),{paymentLines:t,buyerIdentity:n}=ke(),r=tz(),a="draftOrder"===e.type;return i((()=>a&&!n.value?.purchasingCompany&&t.value?.lines?.some((e=>"deferred"===e.method.type))?r.value:null))}(),m=function(){const e=ke().allViolations,{i18n:t}=pe(),n=Fc(),r=f(void 0);return qc((e=>{"complete"!==e.type&&"invalid"!==e.type&&"failed"!==e.type&&(r.value=e.negotiationStage)})),i((()=>{const i=e.value?.filter((({code:e})=>"DELIVERY_DELIVERY_LINE_DETAIL_CHANGED"===e));if(!i?.length)return;const a="payment"===n.value.currentPage?.id;return"completion"===r.value||"negotiation"===r.value&&a?{...i[0],tone:"critical",localizedMessage:t.translate("payment.shipping_rate_updated"),localizedMessageHtml:t.translate("payment.shipping_rate_updated"),priority:1}:void 0}))}(),g=pe().checkout.configuration.layout.isOnePage.value,{allViolations:y}=ke(),v=i((()=>Av(y.value??[]))),_=HO();return[...d,...p.value?[mO(p.value)]:[],...l.value?[l.value]:[],...r.value?[r.value]:[],...e.value?[e.value]:[],...t.value?[t.value]:[],...n?[n]:[],...c,...a&&!v.value?[a]:[],..._.value?[_.value]:[],...m.value&&!g?[m.value]:[]].filter(Os("localizedMessage"))}function sz(e,t){const n=e.peek()||{};Object.entries(t).some((([e,t])=>n[e]!==t))&&(e.value={...n,...t})}function lz(){const e=OO(Rn.AmazonPay),t=OO(Rn.BuyWithPrime),{hasError:n}
2=Fv(gs),{checkout:r}=pe(),i=r.latestReceipt.value,o=i?.id,{persistedAmazonSignal:s}=Cn();return{hasError:Boolean(n&&(e.value||t.value))&&o!==s.value?.receiptIdForPaymentDecline,clearError:a((()=>sz(s,{receiptIdForPaymentDecline:o})),[s,o])}}function cz(){const{checkout:e}=pe(),t=e.latestReceipt.value,{persistedApplePaySignal:n,inMemoryApplePayParts:{paymentSheetError:r}}=Cn(),i=f(!1),s=f(!1),c=n.value,u=az(),d=a((()=>{i.value=!0,s.value=!1}),[i,s]),p=i.value,m=s.value;qc((e=>{if("error"===e.type&&"completion"===e.negotiationStage){const t=e.violations.some((e=>"PAYMENTS_APPLE_PAY_SESSION_EXPIRED"===e.code));s.value=t}}));const h=o((()=>!(!u.value||!m&&(!t||p||"failed"!==t.status||"payment"!==t.failure.type||c?.receiptIdForPaymentFailure!==t.id))),[t,u.value,c,p,m]);return l((()=>{h&&(r.value=void 0)}),[h,r]),{hasError:h,clearError:d}}function uz(e,t,n,r){if("failed"!==e?.status)return!1;const i="draftOrder"===n&&"payment"===e.failure.type&&!0!==e.failure.hasOffsitePaymentMethod&&r===e.id;return t===e.id||i}function dz(){const[e,t]=Lf(Mt.LastSeenErrorReceiptId),n=Vt(),{checkout:r,client:i,source:a}=pe(),o=r.latestReceipt.value,s=i.unstable_getSerialization("receipt")?.latestReceipt,c="FailedReceipt"===s?.__typename?s.id:void 0,[d,p]=u((()=>!n.peek()||uz(o,e,a.type,c)));return l((()=>{const n=uz(o,e,a.type,c);p(n),"failed"===o?.status&&e!==o.id&&t(o.id),"failed"!==o?.status&&t(void 0)}),[o?.id,o?.status]),d}function pz(e){return e.some((({code:e})=>wk.has(e)))}function mz(e,t){if(!e)return null;const n="code"in t?t.code:void 0,r="ids"in t?t.ids:void 0,i=e.filter((e=>n?!gz(e,n):!r||!r.includes(e.id)));return i.length>0?i:null}const hz=(e,t)=>e.toUpperCase()===t.toUpperCase(),gz=({discountLine:e},t)=>Boolean(t&&hz(e.discount.title,t));function fz(e){return!0===e?.shopPay?.isExternal}function yz({inputRef:e,headingId:t,monorailSection:n}={}){const{discountCodeWarningSignal:r,reductionsErrorsSignal:i,reductionsValueSignal:d,derivedErrorMessageSignal:p,refreshNegotiationSignal:m,currentDiscountCodeAttemptSignal:h}=tt(),g=Pe(),{negotiate:y}=Uc(),v=f(d.peek()),[_,b]=u(d.peek().length>0),{discountLines:P,paymentLines:k,reduction:S}=Ge(),w=r.value,{checkout:E,i18n:x,userEvents:I,shop:A,source:T}=pe(),N=pr(A),L="shopPay"===E.identity.current.value,R=P.value,[M,D]=u([]),O=function(){const{i18n:e}=pe(),{voidedGiftCardsSignal:t}=tt(),n=t.peek(),r=o((()=>new Set([..._k,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"])),[]),i=o((()=>({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 a((e=>e.reduce(((e,t)=>r.has(t.code)?(e.push(i[t.code]()),e):e),[])),[i,r])}(),z=iy(),{currentPage:B}=Fc().value,V=xn("discountLines").value,F=s(0),[U,q]=u(!1),j=o((()=>R?.reduce(((e,t)=>(t.message&&!M.includes(t.discount.title)&&e.push({id:Uo(),discountCode:t.discount.title,message:t.message??"",discountLine:t,tone:"info"}),e)),[])),[R,M]);l((()=>{V&&(F.current+=1)}),[V,F]),l((()=>{V||q(!1)}),[V]),l((()=>{Z(U&&V)}),[w,V,F,U]);const H=s(B?.id);l((()=>{H.current!==B?.id&&(H.current=B?.id,i.value=[])}),[B?.id]);const $=a((e=>{const t=r.value??[];r.value=mz(t,{ids:e}),z()}),[z,r]),Y=a((e=>{const t=j.filter((({id:t})=>e.includes(t))).map((({discountCode:e})=>e));D((e=>[...e,...t])),z()}),[j,z]),W=a((e=>{d.value=e,e&&(v.value=e)}),[d,v]),G=a((({clearWarnings:e=!0,preserveValue:t=!1}={})=>{t||(W(""),b(!1),h.value=null),e&&(r.value=null)}),[h,r,W]),J=a((()=>{t&&document.getElementById(t)?.focus()}),[t]),K=a((e=>{W(e?.trim()),i.value.length>0&&(i.value=[])}),[W,i]),Q=a((()=>{i.value.length>0&&(i.value=[])}),[i]),[X,Z]=u(!1),ee=a(((e,t)=>{const n=[],a=[],o=r.value??[],s=h.value;for(const r of e){const e=gk===r.code;switch(r.type){case"InputValidationError":case"UnprocessableTermViolation":if(bk.has(r.code)){n.push(r);break}"negotiation"!==t&&_k.has(r.code)&&n.push(r);break;case"RemoveTermViolation":case"ConfirmChangeViolation":{const i="ConfirmChangeViolation"===r.type,o=sc(r.targetEntity),l=Boolean(s&&o&&hz(o.title,s));if(fk.has(r.code)&&"completion"!==t&&!l)break;if(bk.has(r.code)){n.push(r);break}if("discountCodeTrigger"!==o?.discount.type||!yk.has(r.code))break;
2const c=Sk.has(r.code),u={message:r.localizedMessage??r.nonLocalizedMessage,messageHtml:r.localizedMessageHtml,discountLine:o,tone:c?"info":"warning",discountCode:o.discount.title,id:Uo(),errorCode:r.code,isConfirmChangeViolation:i};if(e){a.push(u);break}s&&!l||a.push(u);break}}}return i.value=n.slice(-1),s||a.unshift(...o.filter((e=>e.errorCode===gk))),r.value=a.length>0?a:null,{hasWarnings:a.length>0,hasPreserveInputErrors:e.some((e=>bk.has(e.code)))}}),[h,r,i]),te=a((async()=>{await y({include:[],onComplete:e=>{E.unstable_overwriteLatestReceipt(void 0),m.value=!1,"success"!==e.status&&"error"!==e.status||ee(e.errors)}})}),[ee,y,E,m]);C((()=>{const e=E.latestReceipt.value;!m.peek()&&e&&_v(e)&&"discount"===e.failure?.type&&(m.value=!0,c((()=>{te()})))})),qc(a((e=>{"errors"in e&&ee(e.errors,e.negotiationStage)}),[ee])),C((()=>{const e=g.lastJourneyProgression.value;"error"===e.type&&"completion"===e.negotiationStage&&c((()=>ee(e.errors,"completion")))})),Bs((({parts:e,reason:t})=>{const n=r.peek()??[],i=h.peek(),a=i&&n.every((e=>!gz(e,i)));if(0===n.length)return{behavior:"allow"};if("completion"===t||a)return r.value=null,{behavior:"allow"};if("progression"!==t&&"negotiation"!==t)return{behavior:"allow"};const o=e.discountLines.peek(),s=((e,t,n)=>{const r=t.reduce(((t,r)=>{if(r.errorCode===gk||((e,t)=>t.some((t=>("discountCodeTrigger"===t.discount.type||"code"===t.discount.type)&&gz(e,t.discount.title))))(r,e))return t;const i=gz(r,n);return!n||i?t.set(r.discountCode.toUpperCase(),r):t}),new Map);return[...r.values()]})(o,n,i);return s.length>0&&(e.discountLines.value=[...o,...s.map((({discountLine:e})=>e))]),{behavior:"allow"}}));const ne=a((e=>(e||k.value).filter((e=>"giftCard"===e.method.type&&"code"in e.method)).map((e=>e.method.code))),[k]),re=a((()=>P.value.filter((e=>"code"===e.discount.type)).map((e=>e.discount.title))),[P]),ie=a((async()=>{q(!0);const t=d.value,r=JSON.parse(JSON.stringify(k.value));h.value=t,e?.current?.blur(),J();const i=re(),a=new Set(P.value.filter((e=>"code"===e.discount.type&&e.discount.codeHidden)).map((e=>e.discount.title)));await y({include:["deliveryNext"],fieldsToResolve:[...vk],loading:["deliveryNext","discountLines"],customizeNegotiation:e=>({...e,reduction:{code:t}}),onComplete:e=>{if("success"===e.status||"error"===e.status){const{hasWarnings:o,hasPreserveInputErrors:s}=ee(e.errors);G({clearWarnings:!o,preserveValue:s});const l=pz(e.errors);if(l&&e.errors.some((e=>Sk.has(e.code)))){const e=re(),n=i.filter((t=>!e.includes(t)));n.length>0&&(1===n.length&&a.has(n[0])?(xd({content:x.translate("order_summary.discount_has_been_removed")}),xd({content:x.translate("order_summary.discount_code_applied_with_code",{code:t})})):xd({content:n.length>1?x.translate("order_summary.discount_code_replaced_multiple",{code:t}):x.translate("order_summary.discount_code_replaced",{old_code:n[0],code:t})}))}const c=e.negotiated.paymentLines?.lines||[],u=ne(r),d=ne(c),p=u.reduce(((e,t)=>(e[t]=!0,e)),{}),m=d.some((e=>void 0===p[e])),h=r.reduce(((e,t)=>("giftCard"===t.method.type&&null!=t.cost&&t.cost.amount>0&&(e[ns(t.method)]=!0),e)),{}),g=N&&c.some((e=>"giftCard"===e.method.type&&null!=e.cost&&e.cost.amount>0&&void 0===h[ns(e.method)]));if(!l){if(N&&(m||g)){const e=k.peek();k.value=[...e.filter((e=>!Vs(e))),...c.filter(Vs)]}const{runningTotal:n,merchandiseLines:i}=e.negotiated,a=n&&n.amount<=0;Boolean(!a||hr(i?.lines))||r.some((e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===Rn.BuyWithPrime))||function(e,t){const n=zs(t);e.value=n}(k,N&&(m||g)?c:r);const o=x.translate("order_summary.discount_code_applied_with_code",{code:t});xd({content:m||g?x.translate("order_summary.gift_card_applied"):o}),W(""),b(!1)}const f=e.errors.find((e=>wk.has(e.code))),y=()=>{if(!l)return m?"gift_card":"discount_code"};I.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(he(A.id),10),checkoutToken:T.checkoutSessionIdentifier??"checkout_identifier_undefined",event:l?"apply_reduction_failure":"apply_reduction_success",reductionType:y(),errorMessage:f?.nonLocalizedMessage,page:"checkout",section:n}}),L&&(l?I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ji(T,E,A),action:"add_discount_failure"}}):I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ji(T,E,A),action:m?"add_gift_card":"add_discount_success"}}))}},force:!0}),z()}),[G,h,z,J,ne,ee,e,L,y,P,k,W,x,d,I,T,E,A,N,n,re]),ae=a((async e=>{const t=P.value,n=re(),i=t.some((t=>"code"===t.discount.type&&t.discount.title===e&&t.discount.codeHidden));if(1===t.length&&J(),fz(g)){const t=g.shopPay.discountCodes.value.filter((t=>t!==e));g.shopPay.updateDiscountCodes(t)}P.value=t.filter((t=>"code"!==t.discount.type||t.discount.title!==e)),r.value=mz(r.value,{code:e}),D((t=>t.filter((t=>t!==e))));const a=S.value;a?.code===e&&(S.value=void 0),L&&I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ji(T,E,A),action:"remove_discount"}}),await y({include:["deliveryNext"],fieldsToResolve:[...vk],loading:["discountLines","deliveryNext"],force:!0,onComplete:t=>{"success"!==t.status&&"error"!==t.status||ee(t.errors),xd({content:i?x.translate("order_summary.discount_has_been_removed"):x.translate("order_summary.discount_code_removed",{code:e}),role:"status"});const r=re().filter((e=>!n.includes(e)));r.length>0&&xd({content:P.value.some((e=>"code"===e.discount.type&&e.discount.title===r[0]&&e.discount.codeHidden))?x.translate("order_summary.discount_has_been_applied"):x.translate("order_summary.discount_code_applied_with_code",{code:r[0]}),role:"status"})}}),z()}),[g,P,S,L,y,z,J,I,T,E,A,ee,r,re,x]),oe=a((async e=>{const t=k.value;k.value=t.filter((t=>"giftCard"!==t.method.type||!("code"in t.method)||t.method.code!==e)),1===k.value.length&&J(),L&&I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ji(T,E,A),action:"remove_gift_card"}}),await y({include:["paymentLines"]}),z()}),[k,L,y,z,I,T,E,A,J]);return{loading:X,handleSubmit:ie,handleNegotiationErrors:ee,dirty:_,setDirty:b,removeDiscount:ae,getGiftCards:ne,removeGiftCard:oe,reductionCodeField:{value:d.value,valueSignal:v,onChange:K,onInput:Q,error:Q_(i.value),errorSignal:p},discountCodeWarning:w,discountMessages:j,removeDiscountCodeWarnings:$,removeDiscountCodeMessage:Y,giftCardBannerErrors:O(i.value)}}function vz(){const{negotiate:e}=Uc(),{email:t,phone:n,billingAddress:r,paymentLines:i}=Ge(),{inMemoryApplePayParts:{asPaymentMethod:o}}=Cn(),{checkout:{wallets:s}}=pe(),l=ke(),{value:c}=l.buyerIdentity,u=Boolean("CustomerProfile"===c?.customerProfile?.__typename),d=c?.purchasingCompany,p=p_(),m=dk(),h=Fs({availableDeliveryAddresses:l.availableDeliveryAddresses?.value,mustSelectProvidedAddress:l.mustSelectProvidedAddress?.value}),g=a((()=>{const e={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},t=o.value;return s.activeSession.value?{...e}:u?{...e,shouldRemoveWalletContent:t,shouldResetBuyerInfo:!t,shouldRemoveBillingAddress:!0}:t?{...e,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{...e,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...e,shouldResetBuyerInfo:!0}}),[s,u,o,p,d]),f=WS(),y=YS();return a((async({shouldPersist:a=!0}={})=>{const{shouldResetBuyerInfo:l,shouldRemoveWalletContent:c,shouldRemoveBillingAddress:u,forceClearLocalPickupFields:d}=g();c&&(i.value=Mn(i.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||f({shouldResetCustomerInfo:l,shouldRemovePaymentLine:!o.value,isConstrainedAddress:h}),d&&(t.value="",n.value=""),u&&(r.value=m("billing")??_c(r.value)),a&&!s.activeSession.value&&await e({silenceViolations:["non-stock"]})}),[f,s,i,t,n,r,e,g,o,y,m,h])}function _z({shouldPersist:e}){const t=vz(),{walletUsedForSubmissionSignal:n,persistedApplePaySignal:r,inMemoryApplePayParts:{paymentSheetError:i,subscriptionReviewTransition:o}}=Cn();return a((()=>{i.value=void 0,o.value=void 0,n.value=void 0,r.value={},t({shouldPersist:e})}),[i,o,n,r,t,e])}function bz(){const e=_z({shouldPersist:!1}),{clearError:t,hasError:n}=cz(),{checkout:r,router:i}=pe(),{clearForcedCheckoutLayout:o}=s_(oe);return GS({onClick:a((()=>{e(),o({wallet:"APPLE_PAY"}),r.unstable_evaluateSupportsSplitShipping(i.currentUrl.value),n&&t()}),[e,r,o,i,t,n]),shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function Pz(){const{i18n:e}=pe(),{onClick:t}=bz(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:h(Ny,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return h(EO,{errorType:US.PaymentError,tone:"critical",children:h(Ry,{alignItems:"start",ga
2p:"small-500",children:h(gI,{children:n})})})}function kz(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:t}}=Cn(),n=xn("shippingAddress");return i((()=>t.value&&!e.value.loading&&!n.value))}function Sz(e){const t=kz(),{hasViolations:n,violations:r}=Rv(e);if(!n||!t.value)return null;const i=new Set;for(const a of r)i.add(a.localizedMessage??a.nonLocalizedMessage);return Array.from(i)}function wz({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=pe(),n=Sz(new Set([...Us].filter((t=>e.every((e=>!t.startsWith(e))))))),r=Sz(new Set([...Fr,...ws].filter((t=>e.every((e=>!t.startsWith(e)))))));return n?{errors:[t.translate("shipping_errors.shipping_method_not_available_generic.one")],type:"no delivery strategy"}:r?{errors:r,type:"invalid address"}:{errors:null,type:null}}function Cz(){return wz({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function Ez(){const{i18n:e}=pe(),t=Cz();return t?.length?h(EO,{tone:"critical",errorType:US.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),h(ZO,{children:t.map((e=>h(QO,{children:h(Sy,{children:e})},e)))})]},"amazon-pay-errors"):null}function xz(){const e=iz(),t=L(Cz()),{persistedAmazonSignal:n,inMemoryAmazonPayParts:{hasPaymentSheetError:r}}=Cn();return i((()=>{const i=n.value;return i?.primeError||e.value?i?.primeError?"terminal error":r.value?"payment sheet error":t.value?.length?"amazon pay error messages":null:null}))}function Iz(){const e=xz();return e.value?h(Az,{errorMessagesType:e.value}):null}function Az({errorMessagesType:e}){const{i18n:t,checkout:n}=pe(),r=n.configuration.layout.isOnePage.value,{value:i}=ke().paymentLines,{persistedAmazonSignal:a}=Cn();return function(e="unknown"){const{observability:t}=pe();l((()=>{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"})}),[])}(),l((()=>{const e=i?.lines.filter((e=>!("walletsPlatformPaymentMethod"===e.method.type&&e.method.name===Rn.BuyWithPrime)));e?.length&&sz(a,{primeError:void 0})}),[i,a]),"payment sheet error"===e||"terminal error"===e?h(EO,{errorType:US.PaymentError,tone:"critical",children:t.translate("wallets.errors.generic",{walletName:t.translate("brand.buy_with_prime")})},"amazon-pay-errors"):"amazon pay error messages"===e?r?null:h(Ez,{}):null}function Tz({errors:e,errorType:t}){return h(b,{children:e.map((e=>h(EO,{tone:"critical",errorType:t,children:e.messageNode??e.message},`${e.target}${e.message}`)))})}function Nz(e){if(e.startsWith("DISCOUNTS")||"ReductionViolations"===e)return US.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 US.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return US.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUAL_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return US.PaymentError;default:return US.CheckoutError}}function Lz(){const e=oz();return e.length>0?e.map((e=>h(xO,{notice:e,errorType:Nz(e.code)},e.code))):null}function Rz(){const{globalErrors:e}=Fw().value;return e.length>0?h(Tz,{errors:e,errorType:US.CheckoutError}):null}function Mz(){const{merchandiseLineTransformerErrors:e}=function(){const{allViolations:e}=ke(),t=xn("allViolations");return i((()=>{const n=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return t.value||!e.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...e.value.reduce(((e,t)=>("UnprocessableTermViolation"===t.__typename&&n.includes(t.code)&&e.push({message:t.localizedMessage||t.nonLocalizedMessage,target:t.target}),e)),[])].filter(Mw())}}))}().value;return e.length>0?h(Tz,{errors:e,errorType:US.MerchandiseError}):null}function Dz(){const{contactErrors:e}=Fw().value,t=bI();return 0===e.length?null:t.value.contact?h(Tz,{errors:e,errorType:US.ContactError}):null}function Oz(){const e=xz();return Boolean(e.value)?h(Iz,{}):null}function zz(){const{hasError:e}
2=lz(),t=dz();return e&&!t?h(qO,{}):null}function Bz(){const{hasError:e}=cz();return e?h(Pz,{}):null}function Vz(){const{giftCardBannerErrors:e}=yz(),{value:t=[]}=ke().allViolations,n=pe().checkout.configuration.layout.isOnePage.value?void 0:e?.[0],r=t.find((e=>"PAYMENTS_GIFT_CARDS_UNAVAILABLE"===e.code));return r?h(EO,{errorType:US.DiscountError,tone:"critical",children:r.localizedMessage}):n?h(EO,{errorType:US.DiscountError,tone:"critical",children:n}):null}const Fz=()=>{const{isAppLayout:e}=MO(),{embed:t,checkout:n}=pe(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:i="base"}}=Ah(),a=[Lz(),Rz(),Mz(),Dz(),Oz(),zz(),Vz(),Bz()].filter(Boolean);if(0===a.length)return null;const o=e?"none large-200 base large-200":r?"none none base none":"none",s=Boolean(t?.isFlagshipPartner)&&"high"===i;return h(Ry,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${s?"none none small-100 none":"none"}, ${o}`,children:a})},Uz=I((function({section:e="top"}){return{toast:h(RO,{}),top:h(Fz,{}),reductions:h(NO,{}),delivery:h(IO,{}),payment:h(AO,{})}[e]}));function qz({sectionId:e,children:t}){const{source:n}=pe(),r="simulated"===n.type,{sectionRef:i}=function(e){const{source:t}=pe(),n="simulated"===t.type,r=s(null),{allRenderedSections:i,getRenderedSection:a}=tt(),c=a({sectionId:e}),u=c.value;return l((()=>{if(n&&r?.current){if(!u.rendered&&r?.current){c.value={rendered:!0};const t=i.value;i.value={...t,[e]:!0}}return()=>{if(u.rendered){c.value={rendered:!1};const t={...i.value};e in t&&delete t[e],i.value=t}}}}),[n,r,u,e,c,i]),o((()=>({sectionRef:r})),[r])}(e);return h(b,r?{children:[h("div",{ref:i,style:{display:"none"}}),t]}:{children:t})}const jz={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function Hz({children:e}){const{formStatus:t}=function(){const{negotiate:e}=Uc(),{handleNegotiationErrors:t,discountCodeWarning:n}=yz(),{discountLines:r,reduction:i}=Ge(),{shop:o,source:s,checkout:c,userEvents:d,shopPay:p}=pe(),m=p.user.wallet.value,h=function(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=pe();return a((async n=>{const{data:r,error:i}=await e.mutate(jz,{variables:{code:n,shopifyDomain:t}});if(i||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:a}=r;return a.userErrors.length>0?{status:"failed",errors:a.userErrors}:{status:"success"}}),[e,t])}(),[g,f]=u(!1),[y,v]=u(""),_=p.user.shopAccountUuid,b=a(((e,t)=>
2{d.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...ji(s,c,o),action:e,shopAccountUuid:t,shopPermanentDomain:o.myshopifyDomain,discountCode:y}})}),[d,s,c,o,y]),P=a((async e=>{"success"===(await h(y)).status&&b("invalidated - discount had been deleted",e)}),[h,b,y]),[k,S]=u((()=>r.value.length?"open":"closed")),w=a((e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=new Set([...bk,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",gk]);return e.some((e=>t.includes(e.type)&&n.has(e.code)))}),[]),C=a((e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return e.some((e=>t.includes(e.type)&&n.includes(e.code)))}),[]);return l((()=>{v(m.latestDiscount?.code??""),y&&S("negotiating_app_discount")}),[y,m]),l((()=>{0===r.value.length&&S((e=>"negotiating_app_discount"===e?e:n?"open":"closed"))}),[n,r.value.length]),l((()=>{const r=y;if(!g&&"negotiating_app_discount"===k&&r){f(!0),i.value={code:r};const a=_.value;e({onComplete:async e=>{if(f(!1),"success"===e.status||"error"===e.status){const o=e.negotiated.discountLines?.lines.some((e=>e.discount.title.toLowerCase()===r?.toLowerCase()));y&&(t(e.errors),o?b("applied",a):w(e.errors)?P(a):C(e.errors)&&b("failed to apply - invalid cart",a),i.value=void 0),S(o||n?"open":"closed")}},force:!0})}}),[g,t,n,e,y,k,w,b,C,P,d,i,_.value]),{discountLines:r.value,formStatus:k,setFormStatus:S,walletDiscountCode:y}}();return"negotiating_app_discount"===t?h(fy,{inlineAlignment:"center",children:h(_y,{})}):h(b,{children:e})}function $z({children:e,state:t,errors:n}){const r=bO(),i=Cf(),a=s([]);return l((()=>{const e=a.current;return Object.entries(n).forEach((([n,a])=>{e.push(a.subscribe((e=>{if(!e)return;const a=r(n),o=t[n]?.value??"",s=o?US.InputInvalid:US.InputRequired,l="string"==typeof(c=e)||"number"==typeof c?c.toString():Ro(c)?c.message:qs(c)?c.textValue:"";var c;i({target:a,errorType:s,value:o,message:l,timestamp:new Date})})))})),()=>{e.forEach((e=>e())),a.current=[]}}),[]),e}function Yz(){const{source:e}
2=pe(),t=ke().canUpdateDiscountCodes;return i((()=>(t.value??!0)&&!Vr(e)))}function Wz(){const e=ke(),t=e.paymentFlexibilityPaymentTermsTemplate,n=vt(),r=e.paymentMethods;return i((()=>(!e.buyerIdentity.value?.purchasingCompany||!t.value&&!n.value)&&r.value?.some((e=>"giftCard"===e.type))))}const Gz="_1MTFx";function Jz({messages:e}){const t=e=>{return h(_T,{children:e.messageHtml?(t=e.messageHtml,null==t?null:h("span",{dangerouslySetInnerHTML:{__html:t}})):e.message});var t};return 1===e.length?h("div",{className:Gz,children:t(e[0])}):h(ZO,{children:e.map((e=>h(QO,{children:h("div",{className:Gz,children:t(e)})},e.id)))})}const Kz=I((function({removeBanner:e,messages:t,grouped:n=!1}){const{i18n:r}=pe(),i=o((()=>function(e,t){return t?[...e.reduce(((e,t)=>{const n=e.get(t.tone)??{tone:t.tone,linkedMessages:[]};return n.linkedMessages.push({...t}),e.set(t.tone,n)}),new Map).values()]:e.map((e=>({tone:e.tone,linkedMessages:[e]})))}(t,n)),[t,n]),s=a(((e,t)=>{const n=e.filter((({isConfirmChangeViolation:e})=>e)).length;return n===e.length?r.translate("payment.discount_codes_modified_summary",{count:t}):n>0?r.translate("payment.discount_codes_removed_or_modified_summary",{count:t}):r.translate("payment.discount_codes_removed_summary",{count:t})}),[r]);return 0===t.length?null:h(Xf,{target:"cart.discountCode",children:i.map((({tone:t,linkedMessages:n})=>{if(0===n.length)return null;const r=["critical","warning"].includes(t),i=n.map((({id:e})=>e)),a=[...[...n.reduce(((e,t)=>e.set(t.discountCode.toLocaleUpperCase(),t)),new Map).values()].reduce(((e,t)=>e.set(t.message.toLocaleUpperCase(),t)),new Map).values()],o=n.reduce(((e,t)=>(e.add(t.discountCode.toLocaleUpperCase()),e)),new Set).size,l=a.length>1,c={iconHidden:!0,onDismiss:()=>e(i),dismissible:!0,tone:t,collapsible:l,heading:l?s(a,o):void 0};return r?h(EO,{...c,errorType:US.DiscountError,children:h(Jz,{messages:a})},i[0]):h(vO,{...c,children:h(Jz,{messages:a})},i[0])}))})}));function Qz({accessibilityLabel:e,children:t,graphic:n,id:r}){const i=LC(t);return h("div",{className:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",id:r,children:[h(Ry,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&h("span",{className:i?"_14brw2":void 0,children:h(Uh,{type:n})}),i&&h("span",{className:"_14brw3",children:h(Sy,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:h(wT,{children:t})})})]}),e&&h(Sy,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var Xz="_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",Zz="_14gomm27 _14gomm26 _1fragem6y",eB="_14gomm25 _14gomm24 _1fragemyk";const tB=Xm(k((function({accessibilityLabel:e,children:t,disabled:n=!1,graphic:r,hidden:i=!1,href:a,id:o,removable:c=!1,removeTrackingEvent:u,onAfterHide:d,onClick:p,onMouseEnter:m,onMouseLeave:g,onFocus:f,onBlur:y,onRemove:v,"aria-describedby":_},b){const k=op(),S=Rd(),w=s(i);l((()=>{!w.current&&i&&d?.(),w.current=i}),[i,d]);const C=P("_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",{[Xz]:n||k,[Zz]:i}),E=e?S("removeItem",{label:e}):S("removeChip");return h("div",{id:o,className:C,role:"group",children:[h(nB,{"aria-describedby":_,disabled:n,href:a,inert:k,onClick:p,onMouseEnter:m,onMouseLeave:g,onFocus:f,onBlur:y,ref:b,removable:c,children:h(Qz,{accessibilityLabel:e,graphic:r,children:t})}),c&&h("button",{"aria-hidden":!!k||void 0,"aria-label":E,className:P("_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd",eB),"data-event-name":u,disabled:n,tabIndex:k?-1:void 0,type:"button",onClick:()=>n||k||"function"!=typeof v?void 0:v(),children:h(Uh,{type:"x",size:"small"})})]})}))),nB=k((function({children:e,disabled:t,href:n,inert:r,removable:i,onClick:a,onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c,"aria-describedby":u},d){const p=fm(d),m=t??r??!1,g=m?void 0:n,f=()=>m||"function"!=typeof a?void 0:a(),y={onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c};return g||a||!i?g?h(xh,{"aria-describedby":u,className:P(eB,"_14gomm29 _14gomm28 _1fragem128"),href:g,onClick:f,ref:p,...y,children:e}):h("button",{"aria-describedby":u,"aria-hidden":!!r||void 0,className:eB,disabled:t,onClick:f,ref:p,tabIndex:r?-1:void 0,type:"button",...y,children:e}):h("div",{className:eB,ref:p,children:e})}));function rB({reductionTags:e,headingId:t}){const{i18n:n}=pe(),r=Yz(),i=hM(),{removeDiscount:a,removeGiftCard:o}=yz({headingId:t});if(0===e.length)return null;let s=0;const l=e.map((e=>e.hideLabel?(s+=1,s):0)),c=s;return h(Ry,{direction:"inline",gap:"small-300",accessibilityRole:"unordered-list",accessibilityLabel:n.translate("order_summary.gift_card_and_discount_label"),ref:i,children:e.map(((e,t)=>{const i=e.hideLabel?n.translate("order_summary.discount_title"):e.code,s="giftCard"===e.originType?n.translate("order_summary.gift_card_masked",{last_characters:e.code.slice(-4)}):i;let u=s;"giftCard"===e.originType?u=n.translate("order_summary.gift_card_ending",{last_characters:e.code.slice(-4)}):e.hideLabel&&c>1&&(u=n.translate("order_summary.discount_title_with_position",{position:l[t]}));const d="giftCard"===e.originType?"giftFill":"discount",p="giftCard"===e.originType?"remove_gift_card":"remove_discount_code",m="discountCode"!==e.originType||r.value?()=>{"discountCode"===e.originType?a(e.code):o(e.code)}:void 0,g="automatic"===e.originType?`automatic-discount-tooltip-${t}`:void 0;return h(fy,{accessibilityRole:"list-item",className:"ZWcPq",children:[h(tB,{accessibilityLabel:u,graphic:d,id:`tag-${t}`,interestFor:g,removable:!g,onRemove:m,removeTrackingEvent:p,children:s.toUpperCase()}),g&&h($m,{id:g,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${e.originType}-${e.code}`)}))})}function iB({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return h(oy,{children:h(Xf,{target:"cart",children:h(sB,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}
2const aB=xu("ReductionsInput"),oB=xu("ReductionsHeading");function sB({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){const{i18n:s,shop:{discountCodesEnabled:c,giftCardsEnabled:u},checkout:d}=pe(),p="shopPay"===d.identity.current.value,m=Pe(),g=d.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:y,discountTagsDisplay:v,automaticTagsDisplay:_,position:P,spacing:k}}=a_(),S=Vt(),w=Dc({base:!0,medium:!1}),C=!S.value||(w??!1),E=f(!1),x=a((()=>{E.value=!E.value}),[E]),I=Yz(),A=EE(),{control:{labelPosition:T="inside"}}=Ah(),{reductions:{labelPosition:N=T}}=a_(),{discountLines:L,paymentLines:R}=Ge(),M=L.value,D=R.value.reduce(((e,t)=>("giftCard"===t.method.type&&"code"in t.method&&e.push({originType:"giftCard",code:t.method.code}),e)),[]),O=fz(m)&&m.shopPay.discountCodes.value.length?m.shopPay.discountCodes.value:null,z=O?[...new Set(O)].map((e=>{const t=M.find((t=>"code"===t.discount.type&&t.title===e)),n="code"===t?.discount.type&&Boolean(t.discount.codeHidden);return{originType:"discountCode",code:e,...n?{hideLabel:!0}:{}}})):[...M.reduce(((e,{discount:t,title:n})=>("code"!==t.type||e.has(n)||e.set(n,{originType:"discountCode",code:n,...t.codeHidden?{hideLabel:!0}:{}}),e)),new Map).values()],B=M.reduce(((e,{discount:{type:t},title:n})=>("automatic"!==t&&"custom"!==t||e.push({originType:"automatic",code:n}),e)),[]),V=[..."hidden"===_?[]:B,...I.value?z:[],...D];0===V.length&&(E.value=!1);const F="always_visible"===v||"base"===v&&V.length>0&&(!C||E.value);let U=!1;"error"===m.lastJourneyProgression.value.type&&"completion"===m.lastJourneyProgression.value.negotiationStage&&(U=pz(m.lastJourneyProgression.value.errors));const q=Iu(void 0,aB),j=Iu(void 0,oB),H=sy({active:U});l((()=>{r&&H.current&&H.current.scrollIntoView({behavior:"smooth"})}),[r,H]);const{currentDetour:$,currentPage:Y}=Fc().value,W=mE("Checkout::Reductions::RenderBefore"),G=mE("Checkout::Reductions::RenderAfter"),J=c&&I.value,K=Wz(),Q=u&&K.value,{loading:X,reductionCodeField:Z,dirty:ee,setDirty:te,handleSubmit:ne,discountCodeWarning:re,discountMessages:ie,removeDiscountCodeWarnings:ae,removeDiscountCodeMessage:oe}=yz({inputRef:H,headingId:j,monorailSection:t});l((()=>{if(re&&re.length>0){const e=re[0].message.trim();if(!e)return;return xd({content:e,role:"status"})}}),[re]);const{label:se,title:le,placeholder:ce}=function(){const{i18n:e,shop:{discountCodesEnabled:t}}=pe(),n=Yz(),r=Wz();return i((()=>{const i=t&&n.value;return r.value&&i?{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")}:i?{label:e.translate("order_summary.discount_label"),placeholder:e.translate("order_summary.discount_placeholder"),title:e.translate("order_summary.discount_title")}:{label:"",placeholder:"",title:""}}))}().value,ue=o((()=>({state:{discountCode:Z.valueSignal},errors:{discountCode:Z.errorSignal}})),[Z]);if($&&"shopPayLogin"!==$.type)return null;const de=re?h(Kz,{messages:re,removeBanner:ae,grouped:!0}):null,me=ie&&ie.length?h(Kz,{removeBanner:oe,messages:ie}):null,he="base"===y,ge=null!=e&&"base"===P&&"outside"===N&&le===se,fe=!he&&"outside"===N&&!ge,ye="base"===v&&C&&V.length>0?h(fy,{colorLayer:"control",className:"OuqRS",children:h(Nh,{className:"U9F9G",onClick:x,accessibilityLabel:s.translate("order_summary.discount_code_applied_count",{count:V.length}),"data-event-name":E.value?"discount_tags_hide":"discount_tags_show",border:"base",children:h(Ry,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[h(Uh,{type:"discount",tone:"monochrome"}),h("strong",{children:V.length})]})})}):null,ve=he?h(xy,{variant:"primary",type:"submit",loading:X,disabled:!ee,accessibilityLabel:s.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:A("apply_discount"),children:s.translate("order_summary.apply_discount_button_label")}):void 0;let _e=Z.error;he||(_e=!!Z.error||void 0);const be=h(TT,{ref:H,id:q,name:"reductions",label:se,placeholder:ce,...Z,error:_e,onInput:e=>te(e.length>0),autoFocus:n,accessoryStart:ye,accessoryEnd:ve,labelPosition:fe?void 0:N,labelAccessibilityVisibility:fe||ge?"exclusive":void 0}),ke=h(fy,{children:[h(Ry,{gap:"base",children:[h(lO,{onSubmit:ne,children:he?be:h(b,{children:[fe&&h(b,{children:[h(ET,{variant:"outside",htmlFor:q,label:se}),h(xR,{blockSize:"small-400"})]}),h(Ry,{gap:"small-300",children:[h(Dh,{gap:js(["small400",k??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[be,h(xy,{variant:"primary",type:"submit",loading:X,disabled:!ee,accessibilityLabel:s.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:A("apply_discount"),children:g?s.translate("order_summary.apply_discount_button_label"):h(b,{children:[h(dO,{below:"medium",children:s.translate("order_summary.apply_discount_button_label")}),h(dO,{above:"small",children:h(Uh,{type:"arrow-right"})})]})})]}),Z.error?h(kT,{controlID:q,children:Z.error}):null]})]})}),de,me]}),h(pp,{id:"reduction-tags",open:F,duration:"fast",children:h(fy,{paddingBlockStart:V.length>0?"base":void 0,children:h(rB,{reductionTags:V,headingId:j})})})]});return h(b,{children:[h(pp,{id:"gift-card-field",open:Q||J,duration:"fast",children:h(aL,{children:[h(Ww,{id:j,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:le}),e&&h(xR,{blockSize:"base"}),h(Ry,{gap:"base",children:[h(bN,{customizations:W}),h(qz,{sectionId:"reductions",children:p&&g?h(Hz,{children:ke}):h($z,{...ue,children:ke})}),h(bN,{customizations:G}),d.configuration.showPayButton&&J&&(g||"payment"===Y?.id)&&h(pO,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:s.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!Q&&!J&&h(Uz,{section:"reductions"})]})}const lB="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",cB="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",uB="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",dB="224px",pB="72px",mB=72,hB="415px",gB="700px",fB="100dvi",yB="93dvb",vB=new Set(["Chat","s-chat"]),_B={};function bB(e){const t=function(e){return _B[e]||(_B[e]=function(){const e=E(null),t=new Set,n=E(),r=E(!1),i=E();let a=[];function o(){for(const e of a)e.disconnect();if(e.value&&i.value&&null!=i.value.floatingElementBlockSize&&"undefined"!=typeof IntersectionObserver){a=[new IntersectionObserver((([e])=>{n.value=e.isIntersecting}),{threshold:[0,1],rootMargin:`0px 0px -${i.value.blockEndOffset??0}px 0px`}),new IntersectionObserver((([e])=>{r.value=1===e.intersectionRatio||e.boundingClientRect.bottom<e.rootBounds?.bottom}),{threshold:[0,1],rootMargin:`999999px 0px -${(i.value.blockEndOffset??0)+(i.value.floatingElementBlockSize??0)}px 0px`})];for(const t of a)t.observe(e.value)}}const s=e.subscribe(o),l=i.subscribe(o),c=w((()=>Boolean(e.value&&i.value&&null!=n.value))),u=w((()=>{const e=Boolean(n.value),t=r.value,a=i.value?.floatingElementHiddenBelowTrigger;return a?e||t:e&&!t}));return{triggerVisible:n,triggerAboveFloatingElement:r,triggerNode:e,triggerNodes:t,config:i,ready:c,floatingElementHidden:u,subscriptions:0,dispose(){s(),l();for(const e of a)e.disconnect();a=[],t.clear()}}}()),_B[e]}(e);return l((()=>(t.subscriptions++,()=>{t.subscriptions--,0===t.subscriptions&&function(e){_B[e]?.dispose(),delete _B[e]}(e)})),[t,e]),t}function PB(e){const t=bB(e),n=s(null),r=a((e=>{const r=n.current;r&&r!==e&&t.triggerNodes.delete(r),e&&t.triggerNodes.add(e),n.current=e,t.triggerNode.value===r&&r!==e?t.triggerNode.value=e??t.triggerNodes.values().next().value??null:e&&null===t.triggerNode.value&&(t.triggerNode.value=e)}),[t]);return{floatingElementHidden:t.floatingElementHidden,ready:t.ready,config:t.config,triggerNode:t.triggerNode,setTriggerNode:r}}const kB=e=>h(aL,{children:e});function SB({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,monorailSection:r="order_summary",hideReductions:i=!1,reductionsFieldAutoFocus:a=!1,reductionsFieldAutoScroll:s=!1}){const{ready:l}=PB("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:d,visibility:p,layout:m}}}=pe(),g=p.showReductions&&!i,f=m.isOnePage.value,{currentDetour:y}=Fc().value,v="thankYou"===y?.type,_=mE(o((()=>v?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render"),[v]),"ORDER_SUMMARY3"),P=mE("Checkout::Dynamic::Render","ORDER_SUMMARY4"),k=Dc({base:!0,medium:!1}),S=Vt(),w=f&&(!S.value||k),C=LL(),E=u.proposal.facts.merchandiseLines??[];if(f&&!d){const e=[];for(const t of C.value.values())e.push(...t);if(e.push(...E),e.every((({quantity:e})=>0===e)))return h(gI,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return h(e?b:aL,{...!e&&{containerName:"s-shell-section"},children:[h(Ry,{gap:"large-200",children:[!n&&h(Ww,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&h(dM,{}
2),g&&h(iB,{monorailSection:r,autoFocus:a,autoScroll:s}),!v&&h(bN,{customizations:_,gap:"large-200",render:kB}),h(aO,{}),(!w||v)&&h(bN,{customizations:v?_:P,gap:"large-200",render:kB})]}),h(A,{when:l,children:h(fy,{minBlockSize:"@media (inline-size >= medium) 72px, 0"})})]})}function wB(){const e=pe();return i((()=>Ob(e)))}function CB(){const{checkout:e}=pe();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function EB(){const{mobileCheckoutSdk:e,embed:t}=pe(),n=wB(),r=CB(),a=Fc();return i((()=>!(n.value||e.enabled||t?.isCheckoutKit())||(e.enabled&&e.variant.isStandard()||t?.isCheckoutKit()?"thankYou"===a.value.currentDetour?.type:Boolean(r?.disclosureEnabled))))}function xB(){const{embed:e,checkout:t}=pe(),n=Boolean(e?.platformCategory&&"WEB"!==e.platformCategory),r="WEB"===e?.platformCategory&&t.configuration.payButton.stickyPayButtonEnabledInWeb,i=n&&t.configuration.payButton.stickyPayButtonEnabledInMobile;return r||i}function IB(){const{checkout:e,embed:t,shopPay:n}=pe(),{progressing:r}=Uc(),a=Fc(),{submitting:o}=me();return i((()=>{if(t?.isFlagshipPartner&&o.value)return!0;if(e.isRedirectingExternally.value)return!0;if(e.checkoutExit.isExiting.value)return!0;const{currentPage:i,plan:s}=a.value,l=i&&s.greenPath[s.greenPath.length-1]?.id===i.id;let c=r.value||n.session.isButtonProgressing.value;return void 0!==i&&(c=c&&Boolean(l)),c}))}function AB(e={}){const[t,n]=u(null),[r,i]=u(null),o=s(null);return{entry:t,observer:r,ref:a((t=>{if(o.current?.disconnect(),o.current=null,!window.IntersectionObserver||!t)return n(null),void i(null);const r=new IntersectionObserver((e=>{n(e[0])}),e);r.observe(t),o.current=r,i(r)}),[e.root,e.rootMargin,e.threshold])}}function TB(){const e=hy(),{checkout:t,embed:n}=pe(),r=HN(),{payNowButtonElement:a}=aw(),o=si(n?.embedder),{entry:s,ref:c}=AB({threshold:.5});l((()=>(c(a??null),()=>c(null))),[a,c]);const u=L(s?.isIntersecting);return i((()=>Boolean(!o&&(t.isRedirectingExternally.value||!e.value&&!t.wallets.activeSession.value&&!r.value&&!u.value))))}function NB(e){return"available"===e.status&&e.methods.some((({methodType:e})=>"SHIPPING"===e||"LOCAL"===e))}function LB(){const e=ja();return i((()=>{const t=e.value?.filter(NB);return{shippableDeliveryLines:t?.length?t:void 0}}))}function RB(e){return!!e&&("unavailable"===e.status||"partial"===e.status||"filled"===e.status&&!e.lines.some(NB))}function MB({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!RB(e))return!1;const i=UR(r)?n??t:t;return Za(i)}const DB={initial:{addressInvalid:"empty",addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting"},empty:{addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting",reset:"loading"},resetting:{reset:"initial"},loading:{addressComplete:"loading",addressInvalid:"empty",negotiationResolved:"negotiated",countryChanged:"resetting",addressReplaced:"loading"},negotiated:{addressComplete:"loading",addressInvalid:"loading",addressReplaced:"loading",countryChanged:"resetting",addressReset:"resetting",deliveryMethodChanged:"initial"}};const OB=["phone","company","firstName","lastName"];function zB(e,t,n){const r=new Map;for(const[i,a]of t)if("coordinates"!==i&&"name"!==i&&"oneTimeUse"!==i&&"handle"!==i&&e.includes(i)){if(OB.includes(i)&&(!n[i]||0===n[i]?.length))continue;r.set(i,a)}return r}const BB=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const e=r.peek();qs(e)&&"error"===e.type&&t.set(n,e.textValue)}return t};function VB({children:e}){const{current:t,parts:n}=Pe(),{deliveryMethodsAddressErrors:r,deliveryMethodTimingSignal:c,deliveryMethodDeltaSignal:u}=tt(),d=ag(),{observability:p,embed:m,events:g}=pe(),y=o((()=>{const e=t.fields.deliveryNext.peek();return function(e,t){return je(((e,n)=>{const r=DB[e.status][n];if(r)return{status:r};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:e.status,action:n})}),{status:e})}("filled"===e?.status?"negotiated":"initial",p)}),[t.fields.deliveryNext,p]),v=a((e=>{y.value=e}),[y]),_=s(!1);m?.isFlagshipPartner&&!_.current&&(_.current=!0,g.addEventListener("embed:address-replace",(()=>{v("addressReplaced")})));const b=s(!1);b.current||(b.current=!0,g.addEventListener("wallet:address-replace",(()=>{v("addressReplaced")}))),function(e,t){const{deliveryMethodsAddressErrors:n,deliveryMethodTimingSignal:r}=tt(),{parts:i}=Pe(),{shippingAddress:a}=i,{observability:c,checkout:{wallets:u},checkout:d,shop:{shippingCountries:p}}=pe(),m=d.configuration.isAddressDelegationEnabled,h=a.fields.countryCode.value,g=av(h,p),{loading:y}=jt(h),{negotiate:v}=Uc(),{setAddressError:_}=rv(n),b=o((()=>Hs()),[]),{resetAddressSuggestions:P}=iv(b,n),k=dv(h),S=function(e){const t=f();return Zh(e,(({action:e})=>{t.value=e})),t}(e),C=cg(),E=o((()=>w((()=>function(e){switch(e){case qe.Country:return["countryCode"];case qe.CountryProvince:return["countryCode","zoneCode"];case qe.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case qe.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case qe.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}(C({countryCode:a.fields.countryCode.value,zoneCode:a.fields.zoneCode.value}))))),[C,a.fields.countryCode,a.fields.zoneCode]),x=s();l((()=>{y||(x.current?.(),x.current=void 0)}),[y]);const I=ps((()=>{const e=a.peek();if(y)return void(x.current=()=>I());const n=g(e),r=zB(E.peek(),n,e);
2"addressReplaced"!==S.peek()&&(0===r.size?t("addressComplete"):t("addressInvalid"))}),150);lg(a,(()=>{t("countryChanged"),a.fields.postalCode.value=void 0,a.fields.zoneCode.value=void 0,a.fields.city.value=void 0,a.fields.address1.value=void 0,a.fields.address2.value=void 0,t("reset")}));const A=o((()=>w((()=>E.value.filter((e=>"countryCode"!==e)).map((e=>{const t=a.fields[e].value;if(t)return"postalCode"===e?t.replace(/[^a-z0-9]/gi,"").toLowerCase():t.toLowerCase()})).join("_")))),[a.fields,E]);l((()=>{let t=!1;const n=e.value.status;return"initial"!==n&&"empty"!==n||I(),A.subscribe((()=>{if(t){if(u.activeSession.value||"addressReplaced"===S.value||"resetting"===e.value.status)return;I()}t=!0}))}),[u,I,e,S,a,A]),Zh(e,(({previousState:i,action:o,nextState:s})=>{if(c.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:i.status,action:o,nextState:s.status}),"initial"===s.status&&I(),"loading"===s.status&&0===r.peek()&&(r.value=Date.now()),"reset"===o){const e=a.peek();for(const t of Object.keys(e))"phone"===t&&Zt(e.phone)||_(t,void 0);P()}const l=$s(e);if("addressComplete"===o||"reset"===o||"addressReplaced"===o||"addressInvalid"===o&&("negotiated"===i.status||m)){if(m){const e=a.peek(),r=g(e);if(r.size>0){for(const[e,t]of r)void 0===n[e].peek()&&_(e,{message:t,origin:"client",type:"inline-validation"});return t("addressInvalid"),void t("negotiationResolved")}for(const[t,i]of Object.entries(n)){const e=i.peek();e&&"object"==typeof e&&"client"===e.origin&&"inline-validation"===e.type&&_(t,void 0)}}c.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),v({silenceViolations:["all"],include:[],fieldsToResolve:["deliveryNext"],onComplete(r){const i=l!==$s(e);if(c.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:r.status,stale:i}),!i)if("stale"!==r.status&&"invalid"!==r.status){if("reset"!==o&&r&&("success"===r.status||"error"===r.status)&&"violations"in r){const e="filled"===r.negotiated.deliveryNext?.status;if("addressReplaced"!==o){const r=BB(n);if(zB(E.peek(),r,a.peek()).size>0)return t(e?"negotiationResolved":"addressInvalid")}const i=k("shipping_address",r.violations),s="addressReplaced"===o?i:zB(E.peek(),i,a.peek());for(const[t,r]of s)void 0===n[t].peek()&&_(t,r);e||0===s.size?t("negotiationResolved"):t("addressInvalid")}}else t("negotiationResolved")}}).catch((()=>t("negotiationResolved")))}}))}(y,v);const P=cg(),k=i((()=>{const e=y.value.status;if("resetting"===e)return{status:"empty"};if("loading"===e)return{status:e};const i=t.fields.deliveryNext.value,a=RB(i),o="filled"===i?.status&&!a,s=n.shippingAddress.fields.countryCode.value,l=n.shippingAddress.fields.zoneCode.value,c=P({countryCode:s,zoneCode:l}),u=UR(c),d=u?n.shippingAddress.peek():n.shippingAddress.value,p=a&&("initial"===e||"empty"===e&&!u&&0===BB(r).size);return"negotiated"===e||o||p?i?a?{status:MB({deliveryNext:i,proposedAddress:d,negotiatedAddress:t.fields.shippingAddress.peek(),reloadStrategy:c})?"error":"empty"}:"filled"===i.status&&o?{status:"filled",deliveryLines:i.lines}:{status:"error"}:{status:"empty"}:{status:e}})),S=f(k.peek());!function(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=pe(),r=s(!1);C((()=>{const i=e.value;if("undefined"==typeof PerformanceMeasure||"undefined"==typeof PerformanceMark)return;let a;r.current&&("loading"===i.status?a=function(){const e=performance.now();return()=>{const r=performance.now()-e;n.histogram({name:"shipping_methods_loading_duration",value:r,attributes:{async_shop_promise:t}})}}():a&&(a(),a=void 0)),r.current=!0}))}(k);const E=s();l((()=>()=>{E.current&&clearTimeout(E.current)}),[]),C((()=>{const e=k.value;if(E.current&&(clearTimeout(E.current),E.current=void 0),"loading"===e.status&&(E.current=setTimeout((()=>{const e=t.fields.deliveryNext.peek(),n="filled"===e?.status&&!RB(e);p.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:e?.status??"unknown",hasShippingMethods:n}})}),3e4)),"filled"===e.status){const t=e.deliveryLines,n=t.flatMap((e=>"available"===e.status?e.methods:[])).find((e=>"SHIPPING"===e.methodType&&e.deliveryPromiseProviderApiClientId))?.deliveryPromiseProviderApiClientId,r=c.peek();if(n&&r>0){const e=he(n),t=Date.now()-r;d(t,Number(e)),0===u.peek()&&(u.value=t)}}const n="empty"===e.status&&"negotiated"===y.peek().status&&RB(t.fields.deliveryNext.peek());("error"===e.status||"filled"===e.status||n)&&(c.value=0)}));const x=o((()=>({uiStateSignal:k,initialUiStateSignal:S,dispatch:v})),[v,k,S]);return h(rg.Provider,{value:x,children:e})}function FB({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&"/thank-you"===n&&!si(e)}var UB=(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))(UB||{});const qB={[UB.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[UB.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[UB.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[UB.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1}
2,[UB.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[UB.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[UB.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[UB.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[UB.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function jB(e){return qB[e].isAddressProblem}function HB(e){return qB[e].isUnpurchasable}function $B(){const{negotiate:e}=Uc(),t=Ge().merchandiseLines,n=ke().merchandiseLines,{observability:r}=pe(),i=a((e=>{const n=t.value;t.value=n.filter((({stableId:t})=>!e.includes(t)))}),[t]);return a((async t=>{const a=new Map((n.value?.lines??[]).map((e=>[e.stableId,e]))),o=t.reduce(((e,{problem:t,line:n})=>{if(jB(t.type))return e;const r=a.get(n.stableId);return(!r||0===r.quantity||HB(t.type))&&e.push(n.stableId),e}),[]);try{o.length>0&&(i(o),await e({}))}catch(s){r.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:s,unavailableMerchandiseIds:o})}}),[n,i,e,r])}function YB(e){const t=function(e){return e.some((e=>gn.has(e.code)))}(e),n=function(e){return e.some((e=>fn.has(e.code)))}(e),r=function(e){return e.some((e=>yn.has(e.code)))}(e),i=Tv(e),a=Nv(e),o=Iv(e),s=function(e){return e.some((e=>un.has(e.code)))}(e),l=[t,n,r,i].filter(Boolean).length>1;return o||l?s?UB.QuantityChange:UB.OutOfStock:t?UB.Unavailable:n?UB.UnpurchasableB2B:r?UB.Unpurchasable:i?UB.Unshippable:a?UB.Unfulfillable:s?UB.QuantityChange:UB.Unknown}function WB(e){return e.quantity>0}function GB(e){return HB(e)?e:UB.OutOfStock}function JB(){const{checkout:e}=pe(),t=ke(),{value:n=[]}=t.allViolations,{value:r}=t.merchandiseLines,i=xn("merchandiseLines").value,a=Ge().merchandiseLines.value,s=o((()=>r?.lines??[]),[r]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=u((()=>YB(n))),[d]=u(a),p=o((()=>_L(d,n)),[d,n]),m=o((()=>PL(d,s,n).map((e=>function(e,t,n){const{proposed:r,negotiated:i}=e,a=function(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:UB.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}(r,i),o=function(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:UB.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}(r,i),s=function(e,t,n){if(!n&&t)return{type:GB(e)}}(t,r,i),l=r??i;return n.has(l.stableId)?{line:l,problem:{type:t===UB.Unfulfillable?UB.Unfulfillable:UB.Unshippable}}:0===i?.quantity?{line:l,problem:{type:GB(t)}}:o?{line:l,problem:o}:a?{line:l,problem:a}:s?{line:l,problem:s}:{line:l,problem:{type:UB.OutOfStock}}}(e,c,p)))),[d,s,n,c,p]),h=s.filter((({stableId:e})=>!p.has(e))).some(WB)&&l,g=!h,f=d.some((e=>{const t=s.find((({stableId:t})=>t===e.stableId));return!t||0===t.quantity||p.has(e.stableId)}));return{type:c,lineItems:m,loading:i,cartEmpty:g,hasLineItemsLeftInCart:h,hasUnavailableMerchandise:f,unshippableMerchandiseIds:p}}function KB({width:e}){const{header:{logo:t}}=a_(),{embed:n,i18n:r,shop:i,shopPay:a,source:o,url:s,router:l}=pe(),c=Zf(),u=EE(),{isAppLayout:d}=MO(),p=Cw(),{brandSettings:m}=i,{lineItems:g}=JB(),f=$B();if(a.visibility.showShopPayBrandedLogo||oi(l.currentUrl.value.search))return h("img",{src:"/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",height:30,width:72,alt:""});let y=h("span",{className:"pJt3c",children:h(td,{level:1,children:h(Ww,{level:1,accessibilityRole:"presentation",display:"inline",children:i.name})})});n?.isFlagshipPartner?y=h(Ry,{direction:"inline",gap:"small-200",alignItems:"center",children:[m?.squareLogo?.url&&h(oR,{alt:m.squareLogo.altText||i.name,src:m.squareLogo.url,className:"yfbTW",borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=h(tE,{width:e}));const v="simulated"!==o.type&&!Vr(o)&&!d&&!n;if(!i.hasStorefront||!v&&!c)return y;const _=(i.previewReturnUrl?i.previewReturnUrl:void 0)??t?.link??o.headerLogoUrl??s.storefront(),b=r.translate("editor.navigation.store_logo_accessibility_label"),P=h("span",{ref:u("logo"),children:h(Ny,{href:_,tone:"monochrome",textDecoration:"none",onClick:async()=>{c?p.includes(_)&&l.navigate((e=>{const t=new URL(e);return t.searchParams.set("ce_redirect",_),t})):g.length>0&&await f(g)},display:"block",children:[y,h(Sy,{accessibilityVisibility:"exclusive",children:b})]})});return t?.image&&t?.maxWidth?h(fy,{maxInlineSize:`${t.maxWidth}px`,children:P}):P}const QB=x({displayName:"AccountAvatar",suspense:!1,load:()=>t((()=>Dl((()=>import("./7a21cd4e.CUt3EoT6.js").then((e=>e.A))),__vite__mapDeps([213,1,2,3,4,5,214])))),useError:uI("AccountAvatar")}
2),XB={borderRadius:{small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},color:Ks,transitionDuration:{base:Ys(0,200,1.5,"ms")},transitionTimingFunction:{easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},fontFamily:Gs,fontSize:Ws,letterSpacing:Js,lineHeight:Qs};function ZB(){const e=Ih(),{router:t,userEvents:n,shop:r,source:i,checkout:a,i18n:o}=pe(),s=Pf(),l="simulated"===i.type,c=EE(),{header:{cartLink:{contentType:u="icon",image:d}={}}}=a_(),p=xw(),m="/shoppay_login"===t.currentUrl.value.normalizedPath,g=o.translate("general.cart");let f;if("text"===u)f=g;else if("image"===u&&d?.src){const t=1.7142857142857142*Xs(e.customProperties.value.fontSize?.base??XB.fontSize.base);f=h("img",{src:d.src,alt:g,height:t,className:P(Ne({display:"block"}))})}else f=h(Uh,{type:"bag",size:"large"});return h("span",{ref:c("cart"),children:h(Ny,{href:p.value?.toString(),id:"cart-link",onClick:()=>{if("shopPay"!==a.identity.current.value)s("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0});else{if(l||m)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...ji(i,a,r),action:"return_to_cart"}})}},accessibilityLabel:"icon"===u?g:void 0,display:"block",children:f})})}function eV({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const i=n&&!r?h(fy,{blockSize:"0px",children:h(fy,{transform:"translate(0px, -50%)",children:n})}):n,a={start:{columns:i?"minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:h(b,{children:[t,i]})},center:{columns:i?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:h(b,{children:[i&&h("div",{style:{visibility:"hidden"},children:i}),h(fy,{inlineAlignment:"center",children:t}),i]})},end:{columns:i?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:h(b,{children:[i,h(fy,{inlineAlignment:"end",children:t})]})}};return h(Dh,{gridTemplateColumns:a[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:a[e].markup})}function tV(){const{checkout:e,router:t}=pe(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:i,maxWidth:a}={}}}=a_(),o=Ew(),s=pk(),{currentDetour:l}=Fc().value,c=e.configuration.visibility.showHeader&&!(e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===l?.type);let u="purchase.checkout.header.render-after";"thankYou"===l?.type&&(u="purchase.thank-you.header.render-after");const d=mE(u),p="hidden"!==i||oi(n.search),m=p?h(KB,{width:a}):h("div",{});let g;return o.value?g=h(ZB,{}):s.value&&(g=h(QB,{})),h(Ry,{gap:"large-100",children:[(null!=g||p)&&c&&h(eV,{alignment:r,logo:m,endAccessory:g,endAccessoryAffectsBlockSize:o.value||!p}),h(bN,{customizations:d,gap:"base"})]})}const nV=x({displayName:"ShopPayCheckout",load:()=>t((()=>Dl((()=>import("./461aedcc.B_CI1IaO.js")),__vite__mapDeps([215,1,2,3,4,5,143,149,94,6,142,8,78,79,188,130,131,84,62,71,7,9,216])).then((e=>e.ShopPayCheckout))))});function rV({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:i}}=pe();return Zs({isShopPay:"shopPay"===n.current.value,isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?h(nV,{simulated:i,children:e}):h(b,{children:e})}function iV({children:e}){const{checkout:t}=pe(),n=IB(),r=TB(),i=t.checkoutExit.isExiting.value,a=eT(),o=h(rV,{children:[h(YN,{}),h(UN,{}),h(eL,{active:n.value,announceProcessing:!i,showLoadingIndicator:!i&&r.value,loadingIndicatorVariant:"progressbar",children:h(aV,{routeContentInert:!!a.value||void 0,children:e})}),h(tT,{})]});return h(BE,{children:h(tL,{children:h(VB,{children:h(NA,{children:o})})})})}function aV({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:r}={}},cartLink:{visibility:i}}=a_(),{checkout:a,mobileCheckoutSdk:s,shop:l,shopPay:c,source:u,embed:d,router:p}=pe(),m=p.currentUrl.value,g=oi(m.search),f=xB(),y=a.configuration.showFooter,{currentDetour:v}=Fc().value,_=EB().value,P=Ig()&&_&&FB({embedder:d?.embedder,isThankYouDetour:"thankYou"===v?.type,normalizedPath:m.normalizedPath});let k="purchase.checkout.header.render-after",S="purchase.checkout.footer.render-after",w="purchase.checkout.chat.render";"thankYou"===v?.type&&(k="purchase.thank-you.header.render-after",S="purchase.thank-you.footer.render-after",w="purchase.thank-you.chat.render");const C=mE(k),E=mE(S),x=mE(w),I=CI(),A=bI(),T=PI(),{isAppLayout:N}=MO(),L=N&&"google"===d?.embedder&&Ji({embedder:d.embedder,shop:l})&&T.value&&null==v,R=Vt(),M="shopPayExternal"===u.type,D=!a.configuration.visibility.showHeader,O=a.configuration.isUniversalCheckoutFinalizer&&"thankYou"===v?.type,z=(()=>
2{if(M)return c.visibility.showOnePageShellHeader;if(O)return C.length>0&&R.value;if(d?.isFlagshipPartner&&!si(d.embedder)&&"shopApp"!==d.embedder)return!1;if((D||"hidden"===n&&!g&&"hidden"===i)&&!s.enabled&&!d?.isCheckoutKit()&&(0===C.length||!R.value))return!1;if(N){if(!s.enabled||s.variant.isStandard())return!1;if(d?.isCheckoutKit())return!1}return!0})(),B=tV,V=ke().buyerIdentity.value?.customerProfile,F=null==V||"CustomerProfile"!==V.__typename,U="thankYou"===v?.type||F&&!A.value.payment&&!A.value.delivery,q=o((()=>s.enabled?s.variant.isStandard():d?!!d.isCheckoutKit()||!f&&(y||E.length>0):("hidden"!==r||E.length>0&&R.value)&&!N&&!g),[d,f,y,s,r,E.length,N,g,R.value]),j="shopPayLogin"!==v?.type&&U&&_&&!d?.isFlagshipPartner,H=c.visibility.shouldForceOnePageShellContentAsAppLayout,$=h(b,{children:[h(AN,{}),h(fy,{className:L?"ghhXm":void 0,inert:t,children:e})]});return h(b,{children:[h(JN,{}),h(KE,{banner:h(SI,{}),announcement:"thankYou"===v?.type&&I.length>0?h(wI,{}):void 0,header:z?h(B,{}):void 0,disclosure:j&&!P?h(ZA,{}):void 0,disclosureOrderSummary:P?void 0:h(SB,{monorailSection:"top_order_summary"}),main:$,orderSummary:h(SB,{}),footer:q?h(xN,{}):void 0,blockSize:(()=>{if(N||H)return"appLayout"})(),minMobileViewportSize:L}),h(TN,{}),h(KN,{}),h(QN,{}),h(bN,{customizations:x,transformComponents:oV,render:e=>h(fy,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}const oV=WN(vB);function sV(){const{router:e}=pe(),t=Cn().inMemoryAmazonPayParts.serializedAmazonParams;return a((n=>{const{keep:r,only:i}=n??{},a=e.currentUrl.value.href,o=new URL(a);xs.filter((e=>r?!r.includes(e):!i||i.includes(e))).forEach((e=>{o.searchParams.delete(e)})),tl(t,(e=>o.searchParams.get(e))),a!==o.href&&e.navigate(o.href,{replace:!0})}),[e,t])}function lV(){return"true"===nz()[nl]}const cV=x({load:()=>Dl((()=>import("./56bd1136.CIMEyGpu.js")),__vite__mapDeps([217,1,2,3,4,5,197,44,55,218,219,202,6,7,8,9,220])).then((e=>e.AmazonBuyerDetailsContent)),renderLoading:()=>h(uV,{}),useError:function(e){const{wallets:t}=pe().checkout,{buyerDetails:n,buttonStatus:r,sdkStatus:i}=Cn().inMemoryAmazonPayParts,{paymentLines:a}=Ge(),o=sV(),s=WS();l((()=>{if(!e)return;r.value={status:"error"},i.value={status:T_.Error},n.value={loading:!1,error:!0,details:void 0},o();const l=t.escalatedWallet.value,c=l===Rn.AmazonPay||l===Rn.BuyWithPrime,u=a.value.some((e=>"walletsPlatformPaymentMethod"===e.method.type&&(e.method.name===Rn.AmazonPay||e.method.name===Rn.BuyWithPrime)));c?(s({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):u&&(a.value=a.value.filter((e=>"walletsPlatformPaymentMethod"!==e.method.type||e.method.name!==Rn.AmazonPay&&e.method.name!==Rn.BuyWithPrime)))}),[e,n,r,o,a,s,i,t])}});function uV(){const{buyerDetailsContentLoaded:e}=Cn().inMemoryAmazonPayParts;return l((()=>{e.value=!1}),[e]),null}function dV(){const e=ke().paymentMethods,{attributes:t,externalDeliveryIds:n,paymentLines:r}=Ge(),i=lV(),a=Vt();return h(A,{when:()=>a.value&&function(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:i}){const a=[Rn.AmazonPay,Rn.BuyWithPrime].some((t=>Boolean(el(e,t)))),o=t.some((e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===Rn.BuyWithPrime)),s=n?.some((({key:e,value:t})=>e===Ti&&t===Rn.BuyWithPrime));return Boolean(a||o||r||s||i)}(e.value,r.value,{attributes:t.value,externalDeliveryIds:n.value,hasAmazonCancelledParam:i}),children:h(cV,{})})}function pV(){const{i18n:e}=pe(),t=Fc(),n=i((()=>t.value.currentDetour?.label??t.value.currentPage?.label??e.translate("general.page_title")));return h("h1",{className:Ne({screenReaders:"only"}),children:n})}function mV({title:e,cost:t}){return h(b,{children:[e,"·",t]})}function hV({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=pe();return h(HL,{blockPadding:"base",children:[h(jL,{primary:!0,children:[h(Sy,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map((({title:e,lineAmount:t})=>h(Ry,{direction:"inline",gap:"small-400",alignItems:"center",children:h(mV,{title:h(Sy,{size:"small",children:e}),cost:h(Sy,{size:"small",type:"strong",children:n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})},e)))]}),h(jL,{inlineAlignment:"center",children:h(gI,{type:"small",textAlign:"end",children:h(Sy,{type:"strong",children:e})})})]})}const gV="TeeUi",fV=xu("TaxRecalculationLineTooltip");function yV({taxRecalculation:e}){const{i18n:t}=pe(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=Iu(void 0,fV),i=Iu(void 0,fV),a=e.beforeLines,o=e.afterLines;return 0===a.length&&0===o.length?null:h(HL,{blockPadding:"base",children:[h(jL,{primary:!0,children:[h(Sy,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),h(gI,{type:"small",children:[h("span",{className:gV,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",h(vV,{lines:a,tooltipId:r,percentFormatter:n,i18n:t})," ",h("span",{"aria-hidden":"true",children:"→"})]})," ",h("span",{className:gV,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",h(vV,{lines:o,tooltipId:i,percentFormatter:n,i18n:t})]})]})]}),h(jL,{inlineAlignment:"center",children:h(gI,{type:"small",textAlign:"end",children:h(Sy,{type:"strong",children:h("span",{className:"DQ7YO",children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function vV({lines:e,tooltipId:t,percentFormatter:n,i18n:r}){if(0===e.length)return h(b,{children:r.translate("payment.order_edit_banner_no_taxes_label")});if(1===e.length)return h(b,{children:_V(e[0],n)});const i=e.map((e=>_V(e,n))).join(" + "),a=e.filter((e=>null!=e.rate));if(0===a.length)return h(b,{children:i});const o=a.reduce(((e,t)=>e+(t.rate??0)),0);return h(b,{children:[h(Nh,{interestFor:t,className:"_8A9rc",children:n.format(
2o)}),h($m,{id:t,children:i})]})}function _V(e,t){return null==e.rate?e.title:`${e.title} ${t.format(e.rate)}`}function bV(){const{i18n:e,checkout:t}=pe(),n=Bt(),r=t.proposal.facts.orderNumber,a=t.proposal.facts.delivery??[],o=i((()=>a.length>0?a[0].lines.filter((e=>"ADDED"===e.deliveryChange)):[])),s=i((()=>a.length>0?a[0].lines.filter((e=>"REMOVED"===e.deliveryChange)):[])),l=i((()=>(t.proposal.facts.merchandiseLines??[]).filter((e=>e.quantityChange&&e.quantityChange.delta)))),c=i((()=>{const e=t.proposal.facts.taxRecalculation;return e&&(e.beforeLines.length>0||e.afterLines.length>0)?e:void 0})),u=i((()=>l.value.length>0||o.value.length>0||s.value.length>0||Boolean(c.value))),d=i((()=>{if(n.value&&u.value)return{formattedAmountOwed:e.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"})}})),p=i((()=>o.value.length>0?o.value:void 0)),m=i((()=>s.value.length>0?s.value:void 0));return h(A,{when:d,children:({formattedAmountOwed:t})=>h(vO,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:t}),collapsible:!0,children:[h(Sy,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:r?`#${r}`:""})}),h(xR,{blockSize:"base"}),h(MC,{}),h(DL,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[h(OL,{hidden:!0,children:[h(zL,{hidden:!0,children:e.translate("order_summary.product_image_label")}),h(zL,{hidden:!0,children:e.translate("order_summary.description_label")}),h(zL,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),h(VL,{children:[h(J,{each:l,getKey:({title:e,variantTitle:t})=>`${e}${t?`-${t}`:""}`,children:({quantity:e,quantityChange:t,image:n,title:r,variantTitle:i})=>h(HL,{blockPadding:"base",children:[h(jL,{inlineAlignment:"start",children:h(UC,{alt:n?.altText??"",size:"base",src:n?.url})}),h(jL,{primary:!0,children:[h(Sy,{size:"base",type:"strong",children:r}),i?h(Sy,{color:"subdued",size:"small",children:i}):null]}),t&&t.delta&&t.type?h(jL,{inlineAlignment:"center",children:h(PV,{remainingQuantity:e,delta:t.delta,type:t.type})}):null]})}),h(A,{when:p,children:t=>h(hV,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),h(A,{when:m,children:t=>h(hV,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),h(A,{when:c,children:e=>h(yV,{taxRecalculation:e})})]})]})]})})}function PV({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=pe();if(0===t)return null;const i=0===e,a=e+t;let o;switch(n){case"INCREMENTED":o=r.translate("payment.order_edit_banner_items_added",{count:t});break;case"DECREMENTED":o=r.translate("payment.order_edit_banner_items_removed.with_quantities",{quantity:a,delta:t});break;case"REMOVED":o=r.translate("payment.order_edit_banner_items_removed.in_full");break;case"RETURNED":o=i?r.translate("payment.order_edit_banner_items_returned.in_full",{quantity:a}):r.translate("payment.order_edit_banner_items_returned.with_quantities",{quantity:a,delta:t});break;case"RETURN_LINE_ITEM_REMOVED":o=i?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 h(gI,{type:"small",textAlign:"end",children:h(Sy,{type:"strong",children:o.toUpperCase()})})}const kV={current:void 0};function SV({active:e,breadcrumbs:t}){const{i18n:n}=pe(),r=EE(),{buyerJourney:{alignment:i}={}}=a_();return h(TE,{section:"breadcrumbs",children:h(xE,{section:"breadcrumbs",children:h(fy,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:i,children:h(Ry,{direction:"inline",gap:"small-200",accessibilityRole:"ordered-list",children:t.map((({id:n,to:i,disabled:a,content:o},s)=>{const l=t.length!==s+1,c=e===n,u=h(Sy,c||a?{color:c?void 0:"subdued",type:c?"strong":void 0,size:"small",children:o}:{size:"small",ref:r(n),children:h(Ny,{href:i,textDecoration:"none",children:o})});return h(Ry,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:c?"step":void 0,children:[u,l&&h(Uh,{type:"chevron-right",size:"small-200"})]},n)}))})})})})}function wV(){return de(tw)}function CV(){const{paymentLines:e}=Ge();return i((()=>{const t=Ut(e.value,"APPLE_PAY");return!!t&&No(t)}))}function EV(){const{checkout:e,observability:t}=pe(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:i,receiptErrorSignal:a,inMemoryApplePayParts:{asPaymentMethod:o,paymentSheetError:c}}=Cn(),u=CA(rl()),d=CA(vz()),p=CV(),{paymentLines:m}
2=Ge(),h=Ut(m.value,"GOOGLE_PAY"),g=Boolean(h&&il(h)),f=CA(XS({shouldResetCustomerInfo:!1})),y=s(new Set),v=FO("failed"===r?.status&&"payment"===r.failure.type&&n?r?.failure:void 0);l((()=>{if("processing"===r?.status||"polling_for_order"===r?.status)return;const e=i.value,n=p.value&&"APPLE_PAY"!==e,s=g&&"GOOGLE_PAY"!==e,l=!e&&!n&&!s;if(r){if(y.current.has(r.id))return;t.leaveErrorBreadcrumb("[useHandleReceiptErrorForWallets] Adding to handled receipt ids",{receiptId:r.id,isNonWalletSubmission:l}),y.current.add(r.id)}if(l)return;const m="APPLE_PAY"===e||n,h="GOOGLE_PAY"===e||s;m&&"payment_cancelled_while_processing"===c.value?.type&&(c.value=void 0),"failed"===r?.status?(m&&d.current(),s&&f.current(),"payment"===r.failure.type&&(e||n||s)&&!o.value&&(t.log("useHandleReceiptErrorForWallets_selecting_first_available_payment_method","selecting first available payment method",{walletUsedForSubmission:e,applePaySFRPaymentFailure:n,googlePaySFRPaymentFailure:s}),u.current()),(m&&!o.value||h)&&(a.value=v),"GOOGLE_PAY"===e&&(i.value=void 0)):a.value=void 0}),[t,r,a,i,o,c,d,f,v,u,p.value,g]),l((()=>function(){a.value=void 0}),[a])}function xV(){const{checkout:e,router:t}=pe(),n=t.currentUrl.value,{header:{alignment:r="start",logo:i}}=a_(),a=pk(),{currentDetour:o}=Fc().value;let s="purchase.checkout.header.render-after";"thankYou"===o?.type&&(s="purchase.thank-you.header.render-after");const l=mE(s),c=e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===o?.type,u=!c&&("hidden"!==i?.visibility||oi(n.search)),d=!c&&a.value,p=u||d;let m;return d?m=h(eV,{alignment:r,logo:u?h(KB,{width:i?.maxWidth}):h("div",{}),endAccessory:h(QB,{}),endAccessoryAffectsBlockSize:!u}):u&&(m=h(fy,{inlineAlignment:r,children:h(KB,{width:i?.maxWidth})})),h(b,{children:[m,l.length>0&&h(b,{children:[p&&h(xR,{blockSize:"@media (inline-size >= medium) base, large-400"}),h(bN,{customizations:l,gap:"base"})]})]})}function IV({children:e}){return h(BE,{children:h(tL,{children:[h(AV,{}),h(UN,{}),h(YN,{}),h(TV,{children:h(NV,{children:e})})]})})}function AV(){return function(){const{router:e}=pe(),{plan:t}=Fc().value;l((()=>e.beforeNavigate(((e,n)=>{const r=t.greenPath.find((t=>t.route===e.normalizedPath)),i=t.greenPath.find((e=>n.pathname.endsWith(e.route)));if(!r||!i)return{};if(!$c.includes(r.id)||!$c.includes(i.id))return{};const a=t.greenPath.indexOf(r),o=t.greenPath.indexOf(i);return Ml((()=>{}),o>a?["page-slide-end"]:["page-slide-start"]),{}}))),[e,t.greenPath])}(),EV(),null}function TV({children:e}){const{checkout:t}=pe(),n=IB(),r=TB(),i=t.checkoutExit.isExiting.value;return h(eL,{active:n.value,announceProcessing:!i,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!i&&r.value,children:e})}function NV({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=a_(),{checkout:r,embed:i,router:a}=pe(),{currentDetour:s}=Fc().value,l=Ig()&&FB({embedder:i?.embedder,isThankYouDetour:"thankYou"===s?.type,normalizedPath:a.currentUrl.value.normalizedPath});let c="purchase.checkout.header.render-after",u="purchase.checkout.footer.render-after",d="purchase.checkout.chat.render";"thankYou"===s?.type&&(c="purchase.thank-you.header.render-after",u="purchase.thank-you.footer.render-after",d="purchase.thank-you.chat.render");const p=mE(c),m=mE(u),g=mE(d),f=CI(),y=r.configuration.isUniversalCheckoutFinalizer&&"thankYou"===s?.type,v=p.length>0||!y&&"hidden"!==t,_=xV,P="hidden"!==n||m.length>0,k=function(e){return e.currentUrlMatches("/stock-problems")}(a),S=a.currentUrlMatches("/no-address-location"),w=Iw(a),C=a.currentUrlMatches("/shoppay"),E=iz(),{activeBreadcrumb:x,breadcrumbs:I}=function(){const{i18n:e,router:t}=pe(),n=Pe(),{currentPage:r,plan:{greenPath:i}}=Fc().value,a=xw(),s=Ew(),l=n.current.value,c=t.currentUrl.value.normalizedPath,u=o((()=>i.filter((e=>!e.skipOverPage||!e.skipOverPage(l)))),[i,l]),d=u.find((e=>e.route===c))??r,p=o((()=>{const t=u.findIndex((e=>e.id===d?.id));return[...a.value&&s.value?[{id:"cart",to:a.value.toString(),content:e.translate("general.cart"),disabled:!1}]:[],...u.map(((e,n)=>({id:e.id,to:e.route,content:e.label,disabled:!!d&&n>t})))]}),[a.value,s.value,e,u,d]),m=d?.id;return kV.current={ids:p.map((({id:e})=>e)).join(","),activeId:m,showCartLink:s.value,hasCartUrl:Boolean(a.value)},{breadcrumbs:p,activeBreadcrumb:m}}(),A=k||S||w||C||I.length<2||E.value,T=h(LV,{children:e});return h(b,{children:[h(JN,{}),h(KE,{banner:h(SI,{}),announcement:"thankYou"===s?.type&&f.length>0?h(wI,{}):void 0,header:v?h(_,{}):void 0,disclosure:l?void 0:h(ZA,{}),disclosureOrderSummary:l?void 0:h(SB,{monorailSection:"top_order_summary"}),main:T,orderSummary:h(SB,{}),footer:P?h(xN,{}):void 0,buyerJourney:A?void 0:h(SV,{active:x,breadcrumbs:I})}),h(TN,{}),h(KN,{}),h(QN,{}),h(bN,{customizations:g,transformComponents:DV,render:e=>h(fy,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}function LV({children:e}){const{checkout:t}=pe(),{blocking:n}=wV(),r=IB();return h(b,{children:[h(pV,{}),h(eL,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[h(dV,{}),h(Ry,{gap:"base",children:[h(Uz,{section:"toast"}),h(Uz,{section:"top"}),h(bV,{}),h(MV,{children:e})]})]})]})}function RV({condition:e,children:t}){return e?h(aL,{accessibilityRole:"presentation",children:t}):h(b,{children:t})}function MV({children:e}){const{checkout:t,router:n,shop:r}=pe(),{pending:i}=aE(),a=n.currentUrlMatches("/shipping"),s=n.currentUrlMatches("/payment"),l=n.currentUrlMatches("/review"),c="/review"===n.currentUrl.value.normalizedPath,u=a||s||l,d=c&&r.hasFlagEnabled(al),p=ke(),{value:m}=p.deliveryNext,g=t.proposal.facts.delivery??[],f=kn(m)||g.length>0&&g.every((e=>null!==e.pickupAddress)),{value:y}=Bt(),v=xn("total").value,{value:_}=p.paymentLines,P=xn("paymentLines").value,k=o((()=>!!l&&(v||P||(y?.amount?y.amount>0:_?.lines&&_.lines.some((e=>e.cost?.amount))))),[l,y,_,v,P]);return h(rE,{style:d?void 0:i,children:h(RV,{condition:u,children:h(b,{children:[u&&h(b,{children:[h(Nx,{showAddress:!f,showPayment:k}),h(xR,{blockSize:"large-400"})]}),h(fy,{children:e})]})})})}const DV=WN(vB);function OV(){const{billingAddressOption:e,shippingAddress:t}=Ge(),{checkout:n}=pe();C((()=>{n.isShippingRequired.value&&!t.value.oneTimeUse||(e.value="custom")}))}function zV(){const{billingAddressOption:e,paymentLines:t}=Ge(),{shop:n,source:r,checkout:i}=pe(),a=ke().buyerIdentity.value?.purchasingCompany,o=ke(),{value:s}=o.deliveryNext,c=xn("deliveryNext").value;l((()=>{const o=t.value[0],l=s;if(c||!l||"filled"!==l.status||!o)return;const u=kn(l),d=Pi(l);if(u||d)return;const p=!u&&i.isShippingRequired.value;ol({shopRequireMatchingShippingAndBilling:Boolean(n.requireMatchingShippingAndBilling),selectedPaymentMethodType:o?.method.type,isShippingRequired:p,isOrderSession:Vr(r),isB2B:Boolean(a),isPickupPointDeliveryMethod:d})&&"shipping"!==e.value&&(e.value="shipping")}),[t.value,s,c,i.isShippingRequired,n.requireMatchingShippingAndBilling,r,a,e])}function BV(){const{source:e,checkout:t}=pe(),{buyerIdentity:n,deliveryNext:r}=ke(),a=cP(),o=p_(),s=function(){const{checkout:e}=pe();return i((()=>Go(e.proposal)))}(),{deliveryLines:l,shippingAddress:c}=Ge();return i((()=>{const i=n.value?.purchasingCompany;return(o.value||uP({checkout:t,source:e})?.pickupAddress)&&!a.value||Pi(r.value)||l.value.flatMap((e=>e.value.deliveryMethodTypes)).includes("PICKUP_POINT")||!Vr(e)&&!t.isShippingRequired.value&&!i||Vr(e)&&!s.value||i&&!t.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"}))}function VV(){const{billingAddressOption:e,billingAddress:t}=Ge(),n=ke(),{checkout:r,source:a}=pe();return i((()=>{const i=n.paymentLines.value,o=n.shippingAddress.value,s=r.proposal.facts.delivery??[],l=s.length>0&&s[0].deliveryAddress?s[0].deliveryAddress:void 0,c=n.buyerIdentity.value?.purchasingCompany,u=i?.lines?.find((e=>e.method.type===ve.CreditCard));return u?u.method.billingAddress:"billing"===e.value&&c?.location.billingAddress?c.location.billingAddress:"shipping"===e.value&&c?.location.shippingAddress?c.location.shippingAddress:"shipping"===e.value?Vr(a)?l:o:t.value}))}function FV(){const e=ke(),t=e.paymentLines?.value?.lines,{hasViolations:n,violations:r}=Lv(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),i=Boolean(Ut(t,"APPLE_PAY"));if(n&&!i)return r.values().next().value.localizedMessage}function UV(){const{shop:e,source:t,checkout:n}=pe(),r=p_(),{paymentLines:a}=Ge(),{buyerIdentity:o}=ke(),s=function(){const e=ke().deliveryNext;return i((()=>Pi(e.value)))}();return i((()=>{const i=!r.value&&n.isShippingRequired.value,l=a.value[0];return ol({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:l?.method.type,isShippingRequired:i,isOrderSession:Vr(t),isB2B:Boolean(o.value?.purchasingCompany),isPickupPointDeliveryMethod:s.value})}))}function qV(e){const t=e,n=function(e){const t=ke().buyerIdentity,n=e?.countryCode&&Qy.includes(e.countryCode),r=L(Xy(e,n?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"}));return i((()=>
2{if(t.value?.purchasingCompany)return r.value}))}(t),r=Xy(t,t?.countryCode&&Qy.includes(t.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"});return n.value??r}function jV(){const{shippingAddress:e}=Ge(),{checkout:t}=pe();return i((()=>(t.proposal.facts.delivery??[])[0]?.deliveryAddress??e.value))}function HV(){const{negotiate:e}=Uc(),{billingAddress:t,billingAddressOption:n}=Ge(),{checkout:{wallets:r}}=pe(),i=s(void 0),o=a((()=>{e({include:["billingAddress"]})}),[e]),c="custom"===n.value?t.fields.countryCode.value:void 0;return l((()=>{!r.activeSession.value&&"custom"===n.value&&c&&c!==i.current&&(i.current=c,o())}),[n.value,c,o,r.activeSession.value]),o}const $V="b2b",YV="not_b2b";function WV(){const{paymentMethods:e}=ke();return JV(e)}function GV(){const{paymentLines:e}=Ge();return JV(i((()=>e.value.map((e=>e.method)))))}function JV(e){const{client:t,checkout:{identity:n},shop:r,shopPay:a,source:o}=pe(),s=D_(),l=BN(),c=r.hasFlagEnabled(sl),u=Eo(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:d,paymentMethods:p}=ke();return i((()=>{if(!l.value)return!1;if("shopPay"===n.current.value)return!1;if(u.value)return!1;const i=e.value??[];if(d.value?.purchasingCompany){const e=p.value?.some((e=>"direct"===e.type&&"shopify_payments"===e.name)),n=i.some((t=>"direct"===t.type&&(e||r.storeVaultEnabled))),a=i.some((e=>function(e,t){if("bank"!==e.type)return!1;if("supportsVaulting"in e)return e.supportsVaulting;const n=KV(e,t);return!!n?.supportsVaulting&&(!(!("selectedToken"in e)||!e.selectedToken)&&"SHOPIFY_PUBLIC_TOKEN"!==e.selectedType)}(e,p.value??[])));return function(e,t){return"cartNext"===e.type||"simulated"===e.type||"b2b"===t.unstable_getSerialization("invoiceLoginType")&&EP(e)}(o,t)&&(n||a)}return r.storeVaultEnabled&&function({paymentMethods:e,paypalVaultingEnabled:t,negotiatedPaymentMethods:n,isShopPayAvailableForSellerOfRecord:r,shopPayDismissed:i,buyerIdentity:a}){const o=!i&&!a.value?.customerProfile&&r.value;if(!t&&o)return!1;const s=n.value??[],l=e.map((e=>KV(e,s))).filter((e=>void 0!==e));return!(!t||!l.some((e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name&&e.supportsVaulting)))||!o&&l.some((e=>"direct"===e.type&&e.supportsVaulting))}({paymentMethods:i,paypalVaultingEnabled:c,negotiatedPaymentMethods:p,buyerIdentity:d,isShopPayAvailableForSellerOfRecord:s,shopPayDismissed:a.userIdentified.value})}))}function KV(e,t){return"direct"===e.type?t.find((t=>"direct"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier)):"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name?t.find((t=>"wallet"===t.type&&"PAYPAL_EXPRESS"===t.name&&(!e.walletContent||t.paymentMethodIdentifier===e.walletContent.paymentMethodIdentifier))):"bank"===e.type?t.find((t=>"bank"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier)):void 0}function QV({fullyCoveredByGiftCard:e,fullyCoveredByRedeemablesAndGiftCards:t,paymentRequired:n,identity:r,isOrderSession:i,isPickupSelected:a,isShippingRequired:o,vaultedDelivery:s,isPointOfSaleLayout:l,purchasingCompany:c,paymentLines:u,billingAddressOption:d,paymentMethods:p,orderEditHasPickupAddress:m,isForceBillingAddressFormEnabled:h}){const g=!a&&o,f=u[0],y="direct"===f?.method.type,v="wallet"===f?.method.type&&"APPLE_PAY"===f?.method.name&&!c,_="wallet"===f?.method.type&&"PAYPAL_EXPRESS"===f?.method.name&&cl(p)&&!h,b=ul({lines:u,paymentMethods:p,purchasingCompany:c,isBillingAddressForced:h})||!g,P="CREDIT_CARD_ON_FILE"===f?.method.type,k=dl(p).length>0&&P;if(n&&(!b||v||_||k))return"hidden";if(c&&n&&!t)return function(e){if(!e)return!1;const t=Boolean(Ut([e],"PAYPAL_EXPRESS")),n=Boolean(Ut([e],"APPLE_PAY")),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(ve)];return t||n||!r.includes(e.method.type)}(f)?"afterPayment":"inContext";if(l)return"afterPayment";if("shopPay"===r&&s)return"inContext";const S="wallet"===f?.method.type||"walletsPlatformPaymentMethod"===f?.method.type;return!n||e||t?g&&!S&&"shipping"===d?"hidden":"afterPayment":i?m?"afterPayment":o&&y?"inContext":"afterPayment":g&&y?"inContext":"afterPayment"}function XV(){const e=ll(),t=Eo(),n=BN(),{source:r,checkout:a,shop:o}=pe(),s=p_(),l=bI(),c=Nf(),{buyerIdentity:u,paymentMethods:d}=ke(),{paymentLines:p,billingAddressOption:m}=Ge();return i((()=>QV({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:t.value,paymentRequired:n.value,identity:a.identity.current.value,isOrderSession:Vr(r),isPickupSelected:s.value,isShippingRequired:a.isShippingRequired.value,vaultedDelivery:l.value.delivery,isPointOfSaleLayout:c.value,purchasingCompany:Boolean(u.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:m.value,paymentMethods:d.value,orderEditHasPickupAddress:Boolean(uP({checkout:a,source:r})?.pickupAddress),isForceBillingAddressFormEnabled:!ec({shop:o,checkout:a,paymentMethods:d.value})})))}function ZV({children:e}){const{current:{fields:{buyerIdentity:t,shippingAddress:n}}}=Pe(),{billingAddress:r,billingAddressOption:a,email:o,paymentLines:l,phone:c,shippingAddress:u}=Ge(),{checkout:d,embed:p,shop:m,shopPay:g,source:f}=pe(),y=p?.isFlagshipPartner,v=ke(),_=pl(),b=lP(),P=Cu(),k=s(!1),S=s(!1),w=Mv(la),C=Ov(la),E=Bv(la),x=WV(),I=BN(),A=ll(),T=Eo(),N=p_(),R=Nf(),M=UV(),{shippingCountries:D}=m,O=vt(),z=n.value,B=av(z?.countryCode,D),V=L(B),F=s(),U=ml(),q=i((()=>ec({shop:m,checkout:d,paymentMethods:v.paymentMethods.value}))),j=i((()=>{const e=d.identity.current.value,i=V.value,s=b.value;if(!k.current){const e=w.violations.value;k.current=e.size>0&&!hl(e)}if(S.current||(S.current=C.violations.value.size>0||null!==d.wallets.escalatedWallet.value&&E.violations.value.size>0),"sdkCartHints"===e&&"sdkCartHints"===F.current?.identitySource)return F.current.sections;function p(e){return"CustomerProfile"===e?.__typename}const h=e=>!d.isShippingRequired.value&&Boolean(r.value)&&!r.value?.[e]?.trim();function L(){switch(e){case gl:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return g.user.isAuthenticatedUser.value;case"sdkCartHints":return!!y||o.value.length>0||c.value.length>0;case"customerAccount":return!(p(t.value?.customerProfile)&&!t.value.customerProfile.email)&&o.value.length>0;default:return o.value.length>0}}const D={contact:L(),delivery:function(){const r=n.value,a=u.value,o=d.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(e){case gl:return o.length>0;case"customerAccount":{const e=t.value;return o.length>0||!(null==e||!p(e?.customerProfile)||(c=e?.customerProfile,0===c.shippingAddresses.length)||function(e){return 1===e.shippingAddresses.length&&i(e.shippingAddresses[0].address,"shipping").size>0}(e?.customerProfile)||function(e,t,n){return!(function(e,t,n){return!e&&t&&n.shippingAddresses.length>0}(t,n,e)||!t&&!n||function(e){if(p(e)){const e=d.addressManager.shipping.value;return Boolean(e.selectedAddress.value)}return!1}(e))}(e.customerProfile,r,a))}case"shopPay":return g.user.addresses.value.length>0||o.length>0;case"sdkCartHints":return!!d.configuration.isAddressDelegationEnabled||L()&&null!=(l=r)&&0===i(l,"shipping").size;case"businessCustomer":return!(P.value&&!s);default:return!0}var l,c}(),payment:function(){const n=Boolean(v.paymentFlexibilityPaymentTermsTemplate.value);switch(e){case gl:return!1;case"shopPay":{const e=g.user.paymentMethods.value;return I.value||d.isShippingRequired.value?!g.enableCardVaulting||e.some(_l):g.user.addresses.value.length>0}case"sdkCartHints":return d.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const r=t.value?.customerProfile;if(Vr(f)||!vl(r))return!1;const i=n||O.value;return!!fl({identitySource:e,isOrderSession:Vr(f),storeVaultEnabled:m.storeVaultEnabled,customerProfile:r,hasCustomerStoredPaymentMethod:yl({availablePaymentMethods:v.paymentMethods.value??[],paymentMethodHistory:v.paymentMethodHistory?.value??[]})}
2)||(Boolean(dl(v.paymentMethods.value).length)||i&&!x.value)}case"customerAccount":{if(fl({identitySource:e,isOrderSession:Vr(f),storeVaultEnabled:m.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:yl({availablePaymentMethods:v.paymentMethods.value??[],paymentMethodHistory:v.paymentMethodHistory?.value??[]})}))return!0;const t=1===U.value.length&&"deferred"===U.value[0].type;return Boolean(n&&t)}default:return _.value.length>0||l.value.length>0}}(),billing:function(){switch(e){case"shopPay":{const e=g.session.selectedPaymentMethod.value,t=So({managedByMarketsPro:v.managedByMarketsPro.value})&&"IDEAL"===e?.paymentMethod,n="CUSTOM_ONSITE"===e?.paymentMethod,r=!g.user.hasCreditCards.value,i=l.value.some((e=>"direct"===e.method.type));if(r&&i)return!1;const a=h("phone"),o=h("firstName");return!I.value||o||a||t||n}case"amazonPay":case"buyWithPrime":return k.current;case"applePay":case"googlePay":return S.current;case"payPal":return!q.value||S.current;case"customerAccount":case"businessCustomer":return!Vr(f)&&function(e){const t=QV(e),n="beforePayment"===t||"afterPayment"===t,r=e.paymentLines[0]?.method.type,i=r===ve.CreditCard||r===ve.PayPal;return n&&!e.billingMustMatchShipping&&!i}({fullyCoveredByGiftCard:A.value,fullyCoveredByRedeemablesAndGiftCards:T.value,paymentRequired:I.value,identity:e,isOrderSession:Vr(f),isPickupSelected:N.value,isShippingRequired:d.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:R.value,purchasingCompany:Boolean(t.value?.purchasingCompany),paymentLines:l.value,billingAddressOption:a.value,paymentMethods:v.paymentMethods.value,orderEditHasPickupAddress:Boolean(uP({checkout:d,source:f})?.pickupAddress),isForceBillingAddressFormEnabled:!q.value,billingMustMatchShipping:M.value});default:return!1}}()},z=F.current,B=z?.identitySource===e&&function(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}(z.sections,D);return B?z.sections:(F.current={identitySource:e,sections:D},F.current.sections)})),H=m.hasFlagEnabled(bl)?d.vaultedSections.signal:j;return h(_I.Provider,{value:H,children:[h(dV,{}),e]})}const eF=I((function(){const{checkout:{configuration:{layout:e}},router:t}=pe();!function(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:i},url:a}=pe(),o="shopPay"===r.current.value,s=parseInt(he(e.id),10);l((()=>{i&&async function(){const r=new URL(a.privateAccessToken(o,s));r.searchParams.set("id",i),r.searchParams.set("checkout_type","c1");const l=Ba({shop:e,serializations:{get:e=>t.unstable_getSerialization(e)},isShopApp:n.isShopServerOrigin});l?.uniqueToken&&r.searchParams.set("_y",l.uniqueToken),l?.visitToken&&r.searchParams.set("_s",l.visitToken);try{await fetch(r)}catch{}}()}),[i,s,o,a,e,t,n])}();const n=e.isOnePage.value,r=o((()=>[{match:"/processing",render:()=>h(b,{children:[h(iI,{}),h(pI.Preload,{})]})},{match:"/throttle",render:()=>n?h(mI,{}):h(b,{children:[h(mI,{}),h(Lx.Preload,{})]})},{match:"/post-purchase",render:()=>h(rI,{}),renderPrefetch:()=>h(rI.Prefetch,{})},{render:({children:e})=>h(b,{children:[h(Tx,{}),h(ZV,{children:h(n?iV:IV,{children:e})})]}),children:[{match:"/thank-you",render:()=>h(pI,{}),renderPrefetch:()=>h(pI.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>h(Ox,{}),renderPrefetch:()=>h(Ox.Prefetch,{})},...n?[{match:"/shoppay_login",render:()=>h(sI,{})},{match:"/review",render:()=>h(Bx,{}),renderPrefetch:()=>h(Bx.Prefetch,{})},{match:"/no-address-location",render:()=>h(Mx,{})},{render:({children:e})=>h(b,{children:[h(zx,{children:e}),h(pI.Preload,{})]}),children:[{match:"/stock-problems",render:()=>h(cI,{})}]}]:[{match:"/information",render:()=>h(b,{children:[h(Lx,{}),h(Nx.Preload,{})]}),renderPrefetch:()=>h(Lx.Prefetch,{})},{match:"/shipping",render:()=>h(oI,{}),renderPrefetch:()=>h(oI.Prefetch,{})},{match:"/payment",render:()=>h(b,{children:[h(nI,{}),h(pI.Preload,{})]}),renderPrefetch:()=>h(nI.Prefetch,{})},{match:"/review",render:()=>h(b,{children:[h(aI,{}),h(pI.Preload,{})]}),renderPrefetch:()=>h(aI.Prefetch,{})},{match:"/stock-problems",render:()=>h(lI,{})},{match:"/no-address-location",render:()=>h(Rx,{})},{render:()=>h(Dx,{})}]]}]),[n]);return Z(t,r)}));class tF extends v{componentDidCatch(e){this.props.terminalErrorHandler.notify(e,{inErrorBoundary:!0})}render(){return this.props.children||null}}function nF(e){const t=[];
2return e.__k?(e.__k.forEach((e=>{e&&"function"==typeof e.type?t.push(...nF(e)):e&&"string"==typeof e.type&&t.push(e)})),t):t}function rF(e,t){const{props:n}=e,r=function(e){return e.type===b?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}(e);let i="";for(const o in n)if(n.hasOwnProperty(o)&&"children"!==o){let e=n[o];"function"==typeof e&&(e=`function ${e.displayName||e.name}() {}`),e=Object(e)!==e||e.toString?String(e):Object.prototype.toString.call(e),i+=` ${o}=${JSON.stringify(e)}`}const a=n.children;return`<${r}${i}${t||a&&Array.isArray(a)&&a.length?`>${t||".."}</${r}>`:" />"}`}function*iF(e,t){let n=e,r=0;for(;n&&r<50;)yield n,n=t(n),r+=1}const aF=/\(.+\)/;function oF(e,t=10){let n=null;const r=[];for(const i of iF(e.__??null,(e=>e.__??null))){const e="function"==typeof i.type&&i.type!==b;if(e&&!n&&(n=i),r.length<t)if(e){const{displayName:e}=i.type;e&&!aF.test(e)&&r.push(e)}else"string"==typeof i.type&&r.push(i.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
2const sF=/^[a-zA-Z][\w-]{0,63}$/;function lF(e){return sF.test(e)?/\d{4,}/.test(e)||e.split(/[_-]/).some((e=>e.length>=8&&/[a-zA-Z]/.test(e)&&/\d/.test(e)))?null:e:null}const cF="https://redacted.invalid";function uF(e){let t;try{t=new URL(e,cF)}catch{return null}return"null"===t.origin?t.protocol.replace(/:$/,""):t.origin===cF?null:t.origin}function dF(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const i of iF(n,(e=>e.parentElement))){const e=i.getAttribute("id"),n=i.getAttribute("data-testid"),a=null==e?null:lF(e),o=null==n?null:lF(n),s=i.getAttribute("role");if((a||o||s)&&r.push(`${i.localName}${a?`#${a}`:""}${o?`[${o}]`:""}${s?`(${s})`:""}`),r.length>=t)break}return r}const pF=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 mF(e){return pF.has(e)||e.startsWith("aria-")}function hF(e){const t={};for(const n in e.props)if(Object.prototype.hasOwnProperty.call(e.props,n)){const r=e.props[n];"href"===n&&"string"==typeof r?t[n]=uF(r)??"[redacted]":mF(n)?t[n]="id"===n&&"string"==typeof r||"data-testid"===n&&"string"==typeof r?lF(r)??"[redacted]":r:t[n]="[redacted]"}return{...e,props:t}}function gF(e){if("function"!=typeof e)return null;const t=e;return t.displayName||t.name||null}function fF(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}const yF=["id","name","type","role","href","action"],vF=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),_F=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function bF(e,{parent:t,observability:n,debugMode:r,deployStage:i,userAgent:a,serverUserAgent:o,apiClientId:s,page:l,mismatchContext:c}){!function(e){if(!e)return;const t=ee.diffed,n=[];ee.diffed=e=>{const r=e.__k&&e.__k.some((e=>e&&(!e.type||"string"==typeof e.type))),i=nF(e);if(!n.includes(e.type)&&r&&i&&i.filter((e=>e&&!e.type)).length>1){const t=[];for(const r of i)r&&!r.type?t.push(`"${r.props}"`):r&&"string"==typeof r.type&&(t.length>1&&(n.push(e.type),console.warn(`Detected adjacent text-nodes ${t.join(", ")}.\nThis doesn't need to be actioned on but could lead to causes of hydration mismatches.\nText-nodes located in\n${rF(e.__,rF(e))}`)),t.length=0)}t?.(e)}}(r),Pl.current=!0;const u=function(){const e=new WeakSet;return{register(t,n){const r=n instanceof Element?n:null,i=n?.parentElement??null;let a=!1;for(let o=r??i;o;o=o.parentElement)if(e.has(o)){a=!0;break}if(!a)for(let o=t;o;o=o.__)if(e.has(o)){a=!0;break}r&&e.add(r),i&&e.add(i),e.add(t);for(let o=t.__;o;o=o.__)if("string"==typeof o.type){e.add(o);break}return a}}}(),d=ee.__m;ee.__m=(e,t)=>{if("string"==typeof e.type){const d=e.type,m=(e=!1)=>t.map((t=>{if(t instanceof Text)return`Text: ${e?"[redacted]":t.data}`;if(t instanceof Element){const n=t.getAttribute("id");let r=n;return null!=n&&e&&(r=lF(n)??"[redacted]"),`<${t.localName}${null==r?"":` id=${r}`} class=${t.getAttribute("class")}>`}return null})).filter(Boolean),{closestFunctionParent:h,breadcrumb:g}=oF(e),f=t.find(Boolean)??e.__e??null,y=dF(f??e.__?.__e??null);if(r){console.group("🚱 Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${d}\n${rF(e)}`),h&&"function"==typeof h.type&&console.log(`The closest function parent is ${rF(h)}`),g.length&&console.log(`Component path: ${g.join(" < ")}`),y.length&&console.log(`DOM ancestry: ${y.join(" < ")}`);const t=m();t.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${t.join(", ")}`):console.log("There were no available DOM nodes, this could be due to a prior mismatch."),console.log("ℹ️ Learn about hydration mismatches: https://videobin.shopify.io/v/gvR4rL"),console.groupEnd()}const v=m(!0),_=h&&"function"==typeof h.type?rF(hF(h)):void 0,b=null!=o&&o!==a,P=function({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:i}){if(n)return!1;if(null!=e&&_F.has(e))return!1;if(null!=r&&r!==i)return!1;if(kl(i))return!1;if(i.match(/musical_ly|BytedanceWebview/))return!1;if(i.split(" ").includes("Playwright-checkout-e2e-tests/local"))return!1;if(i.includes("HeadlessChrome"))return!1;const a=Element.prototype.matches;return"function"!=typeof a||t.every((e=>!(e instanceof Element&&a.call(e,vF))))}({apiClientId:s,excessDomChildren:t,hasPriorMismatch:u.register(e,f),serverUserAgent:o,userAgent:a}),k=fF(p),S=l();n.log("hydration_mismatch",`Hydration mismatch for <${d}>`,{...c?.(),domType:d,mismatchedVNode:rF(hF(e)),closestFunctionParent:_,vNodePath:g.length?g.join(" < "):void 0,domPath:y.length?y.join(" < "):void 0,availableNodeTypes:v||void 0,hasDomNodes:v.length>0,isHydrating:Pl.current,hasInProgressBoundaries:p.length>0,suspendedAtCapture:k.length?k.join(","):void 0,isActionable:P,isUADivergent:b,page:S}
2),P&&"tophat"!==i&&n.counter({name:"hydration_mismatch",value:1,attributes:{page:S}})}d&&d(e,t)};const p=[],m=function({observability:e,debugMode:t,inProgressBoundaries:n}){const r=[],i=new WeakMap;let a=!1;const o=ee.diffed;return ee.diffed=e=>{if("string"==typeof e.type&&Pl.current&&e.props&&e.__e instanceof Element){const t=e.props;for(const a of yF){const o=t[a];if("string"!=typeof o)continue;if(e.__e.getAttribute(a)===o)continue;let s=i.get(e.__e);if(s?.has(a))continue;s||(s=new Set,i.set(e.__e,s)),s.add(a);const l=fF(n),{closestFunctionParent:c,breadcrumb:u}=oF(e),d=c?gF(c.type):null,p=dF(e.__e);r.push({attr:a,tag:e.type,reactValue:o,domElement:e.__e,suspendedAtCapture:l,closestFunctionParent:d,vNodePath:u,domPath:p})}}o?.(e)},{flushAndTeardown:()=>{if(ee.diffed=o,!a){a=!0;for(const{attr:n,tag:i,reactValue:a,domElement:o,suspendedAtCapture:s,closestFunctionParent:l,vNodePath:c,domPath:u}of r){if(!o.isConnected)continue;const r=o.getAttribute(n);if(r===a)continue;const d=s.length>0;t&&console.warn(`🏷️ Attr mismatch on <${i} ${n}>: Preact="${a}" vs DOM="${r}" [suspended=${s.join(",")||"none"}, parent=${l??"unknown"}, domPath=${u.join(" < ")||"unknown"}]`),e.log("attr_mismatch",`Preact ${n} !== DOM ${n} at hydration`,{attr:n,tag:i,reactValue:pF.has(n)?a:"[redacted]",domValue:pF.has(n)?r:"[redacted]",suspendedAtCapture:d?s.join(","):void 0,closestFunctionParent:l??void 0,vNodePath:c.length?c.join(" < "):void 0,domPath:u.length?u.join(" < "):void 0}),e.counter({name:"attr_mismatch",value:1,attributes:{attr:n,tag:i,hadSuspendingBoundaries:d,closestFunctionParent:l??"unknown"}})}r.length=0}}}}({observability:n,debugMode:r,inProgressBoundaries:p}),{teardown:h}=((e,t,n,r)=>{const i=e=>`${gF(e.type)??""}${e.__b}`;let a=0,o=!1;const s=ee.__e;ee.__e=(e,n,r)=>{if("function"==typeof n.type&&e&&"function"==typeof e.then&&Boolean(32&n.__u)){const r={name:gF(n.type)??"anonymous",key:i(n)};t.push(r,r),a+=1;let s=!1;o=e,l=()=>{s||(s=!0,a-=1)},Promise.resolve(o).then(l).catch(l)}var o,l;s(e,n,r)};const l=ee.diffed;ee.diffed=n=>{if("function"==typeof n.type){const r=i(n),a=t.findIndex((e=>e.key===r));if(-1!==a){if(e){const e=nF(n);n.__k&&0===e.length?console.warn(`Suspended VNode ${rF(n)} returned no DOM-children, this causes hydration mismatches.`):n.__k&&e.length>1&&console.warn(`Suspended VNode ${rF(n)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(a,1)}}l?.(n)};const c=ee.__c;ee.__c=(e,n)=>{!o&&a<=0&&0===t.length&&u(),c?.(e,n)};const u=()=>{o||(o=!0,ee.diffed=l,ee.__e=s,ee.__c=c,Pl.current=!1,r?.())};return{teardown:u}})(r,p,0,m.flushAndTeardown);te(e,t),0===p.length&&h()}const PF="shop-pay-login-iframe",kF="100%",SF="publickey-credentials-get *",wF=9e4;async function CF(e){if(!document.body?.classList.contains("Loading"))return void Wl(document);const t=document.querySelector(".LoadingShell"),n=function(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for("Shopify.checkout.partnerInterstitialMinimumVisibleDuration"))}(t);if((n||e)&&(n&&await n,e&&(await e.fill(),Gl(),t?.remove()),!document.body?.classList.contains("Loading")))return void Wl(document);const r=t?.isConnected?new Promise((e=>{const n=()=>{clearTimeout(r),t.removeEventListener("transitionend",n),t.remove(),e()},r=setTimeout(n,1e3);t.addEventListener("transitionend",n)})):Promise.resolve();document.body.classList.remove("Loading"),performance.mark("checkout:visible",{detail:{devtools:{dataType:"marker",color:"primary-dark",tooltipText:"The critical elements of checkout are visible to the buyer"}}}),await r,Wl(document)}function EF(e){re(e),e.childNodes.forEach((e=>{e.remove()}))}class xF extends Rl{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class IF extends Rl{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const AF=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"]),TF=/^[^.]+\.checkout\.my\.shop\.dev$/i;function NF({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const i=function({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[iI];case"/throttle":return[mI];case"/thank-you":return[pI];case"/shoppay_login":return[sI]}if(t||e)return[zx];switch(n){case"/shipping":return[oI,Nx];case"/payment":return[nI,Nx];case"/review":return[aI,Nx];case"/stock-problems":return[lI];default:return[Lx]}}({isOnePage:e,isShopPay:t,path:n});return Zs({isOnePage:e,isShopPay:t,path:n})&&i.push(nV),r.required.value&&i.push(Y_,{load:r.ensureEngineLoaded}),i}function LF(e){const t=e.querySelector("nav ol");if(!t)return;const n=Array.from(t.children);return{count:n.length,activeIndex:n.findIndex((e=>"step"===e.getAttribute("aria-current")))}}const RF=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:LF,criticalAsyncComponents:NF,hydrateApp:async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{client:i,terminalErrorHandler:a}=t,o="shopPay"===t.checkout.identity.current.value,s=t.checkout.thankYouEntrance.progress;s?Kl(s,{currentUrl:t.router.currentUrl,latestReceipt:t.checkout.latestReceipt}):Ql()&&Gl();const l=function({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const i={stage:"armed"};return setTimeout((()=>
2{if(Yl(document))return;const t=e.unstable_legacyNavigationPerformance,a={shopPaySdkCheckout:n,stage:i.stage,pendingLoaderCount:t.loaderCount},o=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:wF,...a}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:wF,...a,loaderPreviouslyRegistered:t.loaderPreviouslyRegistered,appHasContent:Boolean(e.rootElement?.childElementCount),loginFramePresent:Boolean(document.getElementById(PF)),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(o)},{exportImmediately:!0}),Vl().then((()=>{const e=Math.round(performance.now()-o);r.counter({name:"shop_pay_skeleton_recovered_after_stuck",value:1,exportImmediately:!0,attributes:a}),r.histogram({name:"shop_pay_skeleton_recovery_duration",value:e,attributes:a}),r.log("shop_pay_skeleton_recovered_after_stuck","Shop Pay checkout recovered after its skeleton was reported stuck",{...a,recoveryDurationMs:e},{exportImmediately:!0})})).catch((()=>{}))}),wF),i}({client:i,isShopPayActive:o,isShopPaySdkCheckout:wl(t.shopPay),observability:t.observability});await async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{events:i,client:a,router:o}=t;o.prefix instanceof RegExp&&function({pathnamePrefix:e,allowedOrigins:t,client:n,isShopPayActive:r}){const{protocol:i,href:a,host:o,pathname:s,origin:l}=n.initialRequest.url;if("https:"!==i)throw new IF(`Running on an insecure protocol: ${a}`);if(!TF.test(o)&&!r){if(!function(e,t,n){return n.some((n=>{if(t===n)return!0;const r=n.replace(/^https:\/\//,"");return!!t.endsWith(`.${r}`)||t===`https://www.${r}`||!!r.includes("/")&&e.startsWith(n)}))||AF.has(t)}(a,l,t))throw new xF(`Running on an unexpected origin: ${a}. Allowed origins: ${t.join(", ")}`);if(!e.test(s))throw new xF(`Running on an unexpected pathname: ${a}. Expected pathname to match: /${e.source}/`)}}({pathnamePrefix:o.prefix,allowedOrigins:a.unstable_getSerialization("shop").origins,client:a,isShopPayActive:"shopPay"===t.checkout.identity.current.value}),Object.defineProperty(window,Symbol.for("Shopify.checkout"),{value:{context:t},writable:!0,configurable:!0,enumerable:!1}),await async function(t,{loadFrom:n,onQuerySettled:r}){const i=Nc(t);if(!i?.requireBusinessCriticalOnly)return;const a=e(ie,i),o=t.checkout.configuration.getProfile({...i,requireBusinessCriticalOnly:!1});try{let e="serialized-cache"===n?await Rc(t.graphql.coreGraphql,i):void 0;if("serialized-cache"===n&&!e)return Mc(t.checkout.configuration.profileKey.peek(),{...i,requireBusinessCriticalOnly:!1}),void s("missing_cached_profile");const r=await Ic((()=>{}),{trigger:"initialization",profileRequest:i,graphql:t.graphql.coreGraphql,configuration:t.checkout.configuration,extensibility:t.checkout.extensibility,observability:t.observability,userEvents:t.userEvents,telemetryContext:{source:t.source,shop:t.shop,sessionToken:t.client.unstable_getSerialization("sessionToken")??"",current:t.checkout.proposal.negotiated}});r?.(),e??=await Rc(t.graphql.coreGraphql,i),Mc(t.checkout.configuration.profileKey.peek(),{...i,requireBusinessCriticalOnly:Boolean(e)}),e||s("query_failure")}catch(l){if(t.graphql.coreGraphql.cache.delete(a),Lc(t.observability,l),o){s("preparation_failure");try{t.checkout.extensibility.ui.replace({activatedExtensions:o.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){Lc(t.observability,c)}try{t.checkout.configuration.update({profile:o,requireBusinessCriticalOnly:!1})}catch(c){Lc(t.observability,c)}}}finally{r?.(a)}function s(e){"simulated"!==t.source.type&&t.observability.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:"initialization",reason:e}})}}(t,{loadFrom:a.initialRequest.isServerRendered?"serialized-cache":"network"});const s=new Cl(t,{bootStartTime:n,bootPhaseTimings:r});s.waitUntil(async function(e){const{checkout:t,router:n}=e,r=NF({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:"shopPay"===t.identity.current.value,path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),i=Fb(e);i&&r.push(i),await Promise.all(r.map((e=>e.load())))}(t)),i.dispatchEvent(s),await s.allResolved(),i.dispatchEvent(new El(s))}(t,{bootStartTime:n,bootPhaseTimings:r}),l&&(l.stage="context_ready");const u=performance.now(),d=h(tF,{terminalErrorHandler:a,children:h(TC,{context:t,children:h(eF,{})})});i.initialRequest.isServerRendered&&t.router.shouldHydrateServerRenderedRoute()?function(e,t,n){const r="shopPay"===n.checkout.identity.current.value,i=LF(t);bF(e,{parent:t,observability:n.observability,debugMode:n.environment.debug.preact,deployStage:n.environment.deployStage,userAgent:n.client.userAgent,serverUserAgent:n.client.unstable_getSerialization("serverUserAgent"),apiClientId:n.client.unstable_getSerialization("apiClientId"),page:()=>mt(window.location.href,{isShopPayActive:r,shopPay:n.shopPay}),mismatchContext:()=>{const e=c((()=>{const e=n.checkout.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.checkout.configuration.visibility.showHeader,shellHeaderLogoVisibility:e.header.logo?.visibility,shellHeaderCartLinkVisibility:e.cartLink.visibility,shellHeaderIsShopOnWeb:oi(n.router.currentUrl.value.search),shellHeaderPrefersDarkMode:n.client.prefersDarkMode.value}})),t=c((()=>({cartLinkShopHasStorefront:n.shop.hasStorefront,cartLinkSourceType:n.source.type,cartLinkHasCartReturnUrl:Boolean(n.source.cartReturnUrl)}))),r=kV.current,a=r&&{breadcrumbIds:r.ids,breadcrumbActiveId:r.activeId,breadcrumbShowCartLink:r.showCartLink,breadcrumbHasCartUrl:r.hasCartUrl};return{serverCrumbCount:i?.count,serverActiveCrumbIndex:i?.activeIndex,...e,...t,...a}}})}(d,i.rootElement,t):function(e,t){EF(t),ne(e,t)}(d,i.rootElement),l&&(l.stage="rendered"),function({client:e,isShopPayActive:t,progress:n,watch:r}){const i=t||Boolean(n),a=new AbortController;if(!i)return void CF();r&&(r.stage="skeleton_wait");const o=()=>{let t;r&&(r.stage="subscribed"),t=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",(()=>{r&&(r.stage="loading_finished"),CF(n),t?.()}))},s=e.unstable_legacyNavigationPerformance.on("event",(e=>{e.type===Sl&&(a.abort(),o())})),l=e.unstable_legacyNavigationPerformance.on("navigation",(()=>{a.abort(),o()}));a.signal.addEventListener("abort",(()=>{s(),l()}))}({client:t.client,isShopPayActive:o,progress:s,watch:l}),async function(e,{hydrateStartTime:t}){const{events:n}=e,r=new xl(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new Il(r))}(t,{hydrateStartTime:u})},renderTerminalError:function({rootElement:e,terminalErrorPageElement:t}){return n=>async function(e,t){EF(e),Jl(t)||await CF()}(e,t)}},Symbol.toStringTag,{value:"Module"}));function MF(){const{shop:{id:e}}=pe(),t=LL();return i((()=>Boolean(t.value.get(e)?.length)))}function DF({accessibilityRole:e,...t}){const n=ed();return W(null==n?"h1":`h${n}`,{...t,role:"heading"===e?void 0:e})}function OF(){return y(Zb)}const zF=["AT","AU","BE","BR","CA","CH","DE","DK","ES","FR","GB","HK","IN","IT","JP","LU","NL","NO","NZ","SA","SE","US","SG"],BF=["CA","US"],VF="google";function FF({children:e,theme:t}){const n=Ih(),r=s(t),i=s();if(null==i.current){const e=new Al(n.configuration);e.replace(Pc(n.configuration,t),!1),i.current=e}return l((()=>{r.current=t,i.current?.replace(Pc(n.configurationSignal.peek(),t),!1)}),[t,n]),C((()=>{i.current.replace(Pc(n.configurationSignal.value,r.current),!1)})),h(Be.Provider,{value:i.current,children:e})}const UF=()=>{const{value:e}=ke().deliveryNext,t=Tl(e,"ONE_TIME_PURCHASE"),n="available"===t?.status?t:void 0,[r,i]=fg({type:"ONE_TIME_PURCHASE",deliveryMethodType:"PICKUP_POINT"}),{negotiate:s}=Uc(),c=o((()=>n?.methods?.filter((e=>e.pickupLocation&&"PICKUP_POINT"===e.methodType))??[]),[n]),u=o((()=>c.find((({handle:e})=>e===r))),[c,r]),d=a((({pickupPoint:e,pickupPointHandle:t})=>{const n=e??c.find((({handle:e})=>e===t));n&&(i(n.handle),s({}))}),[c,i,s]);return l((()=>{c?.length<1||c.some((e=>e.handle===r))||i(c[0].handle)}),[i,r,c]),{pickupPoints:c,selectedPickupPoint:u,setProposedPickupPoint:d}},qF=["phone","company","firstName","lastName","countryCode"];function jF(e){return e.some((e=>e.deliveryPredictionEligible))}
2function HF({selectedMethods:e,deliveryExpectationLines:t,deliveryPromiseText:n}){const r=new Map;for(const o of t){const{deliveryStrategyHandle:e}=o;e&&r.set(e,o)}const i=e.flatMap((e=>{if(!e.deliveryPredictionEligible)return[];const t=r.get(e.handle);return"shop_promise"===t?.brandedPromise?.handle?[t]:[]}))[0];if(!i)return;const a=i.brandedPromise;return a&&n?{brandedPromise:a,deliveryPromiseText:n}:void 0}var $F=(e=>(e.LoginLink="login_link",e.ErrorBannerConfirm="error_banner_confirm",e.ErrorModalClearEmail="error_modal_clear_email",e.ErrorModalContinue="error_modal_continue",e))($F||{});function YF(e,{pageWasPainted:t=!0}={}){const{observability:n}=pe();l((()=>{t&&n.log("page_rendered",`"${e}" page was rendered.`)}),[n,e,t])}function WF(){const e=Ge().paymentLines;return i((()=>{const[t]=vn(e.value,[Rn.BuyWithPrime]);return t}))}function GF(){const{clearForcedCheckoutLayout:e}=s_(Nl),{inMemoryAmazonPayParts:{serializedAmazonParams:t,buyerDetails:n}}=Cn();return GS({shouldResetCustomerInfo:!0,skipRedirect:!0,shouldRemovePaymentLine:!0,onClick:a((()=>{e({wallet:Rn.AmazonPay}),Ll(t),n.value={loading:!1,error:!1,details:void 0}}),[e,t,n])})}function JF(){const{isOnePage:e}=pe().checkout.configuration.layout,t=Ai(),n=WS();return a((()=>{e.value?n({shouldResetCustomerInfo:!0}):t()}),[e,t,n])}function KF(){const e=pe().checkout.latestReceipt.value?.id,{persistedAmazonSignal:t}=Cn();return GS({shouldResetCustomerInfo:!0,onClick:a((()=>{sz(t,{receiptIdForAupError:e,receiptIdForPaymentDecline:e})}),[t,e])})}var QF=(e=>(e.Unknown="unknown",e.Rejected="rejected",e.Errored="errored",e.InvalidTermsCount="invalid_terms_count",e.InvalidRepaymentsCount="invalid_repayments_count",e.UserUnsynchronized="user_unsynchronized",e.InvalidShippingAddress="invalid_shipping_address",e))(QF||{});function XF(e){for(const t of e)if("not_required"!==t.status)for(const e of t.methods)if(e.handle===t.selectedDeliveryMethodHandle)return e}class ZF extends Error{constructor(){super(...arguments),this.name="PaymentMethodDoNotMatchError"}}var eU=(e=>(e.ShopPayProgressIntercept="ShopPay::Exception::ShopPayProgressIntercept",e))(eU||{}),tU=(e=>(e.Online="online",e.RetailPos="retail_pos",e))(tU||{}),nU=(e=>(e.Dismissed="dismissed",e.Pending="pending",e.Verified="verified",e))(nU||{}),rU=(e=>(e.Generic="generic",e.SignInFailed="sign_in_failed",e.ContinueWithShopPay="continue_with_shop_pay",e))(rU||{});let iU=null;function aU(e){iU=e}function oU(){iU=null}async function sU(e){if(!iU)return{cvvSessionIds:[],isValid:!0};try{const t=await iU(e);return t.isValid&&(t.cvvSessionIds.length!==e||t.cvvSessionIds.some((e=>!e)))?{cvvSessionIds:[],isValid:!1}:t}catch{return{cvvSessionIds:[],isValid:!1}}}function lU(e){const t=EE(),n=e.href?"span":b,{pixelId:r,...i}=e;return h(n,{ref:i.href?t(r):void 0,children:h(xy,{...i,ref:i.href?void 0:t(r)})})}function cU(e=e=>{}){const t={},n=performance.now();return{marks:t,referenceTime:n,mark:r=>{t[r]=performance.now()-n,e({mark:r,timestamps:{...t}})}}}export{Ah as $,US as A,fy as B,Iu as C,ng as D,op as E,ym as F,VF as G,Ww as H,Uh as I,xu as J,qN as K,Ny as L,YF as M,TE as N,xE as O,gI as P,aO as Q,lO as R,_y as S,TT as T,bN as U,lU as V,EO as W,sC as X,Hc as Y,a_ as Z,aL as _,xd as a,jF as a$,MC as a0,Dc as a1,Ih as a2,i_ as a3,EE as a4,_T as a5,td as a6,uR as a7,kg as a8,HR as a9,pp as aA,YR as aB,BV as aC,jV as aD,HV as aE,OV as aF,md as aG,LC as aH,pd as aI,wm as aJ,gm as aK,Ch as aL,kp as aM,Mu as aN,Ru as aO,Du as aP,my as aQ,dy as aR,py as aS,cy as aT,jm as aU,xm as aV,Nm as aW,iE as aX,Td as aY,mA as aZ,HF as a_,UB as aa,jL as ab,XC as ac,eE as ad,HL as ae,UC as af,nR as ag,OL as ah,zL as ai,VL as aj,DL as ak,WR as al,fd as am,Nh as an,ig as ao,yL as ap,JB as aq,bL as ar,T_ as as,_D as at,mk as au,FF as av,rE as aw,wp as ax,Rd as ay,JA as az,xR as b,jT as b$,eg as b0,up as b1,ap as b2,Bu as b3,Cm as b4,hT as b5,ld as b6,gE as b7,UP as b8,iP as b9,Lv as bA,vO as bB,FV as bC,Fv as bD,qv as bE,jv as bF,Hv as bG,FO as bH,dz as bI,Rv as bJ,CV as bK,BN as bL,Kc as bM,Qc as bN,LB as bO,ag as bP,cg as bQ,MB as bR,Pf as bS,Bf as bT,RE as bU,nI as bV,iy as bW,oy as bX,kT as bY,ug as bZ,xf as b_,rP as ba,oE as bb,sE as bc,X_ as bd,qc as be,Tb as bf,sk as bg,qR as bh,CD as bi,VT as bj,BT as bk,av as bl,Nf as bm,$M as bn,YC as bo,wT as bp,MO as bq,bw as br,jB as bs,$B as bt,CO as bu,KI as bv,Cu as bw,Jv as bx,Sv as by,ID as bz,Ry as c,UV as c$,$T as c0,GT as c1,Qv as c2,Cp as c3,Kh as c4,mC as c5,DA as c6,az as c7,_L as c8,PL as c9,OP as cA,zP as cB,BP as cC,VP as cD,ak as cE,VN as cF,jP as cG,FN as cH,RN as cI,zN as cJ,DN as cK,ZF as cL,$I as cM,DF as cN,Cg as cO,uw as cP,oz as cQ,Xf as cR,hk as cS,Nb as cT,KB as cU,tR as cV,kv as cW,wv as cX,Fw as cY,NT as cZ,z_ as c_,Gb as ca,$v as cb,hC as cc,jN as cd,JT as ce,y_ as cf,yg as cg,vg as ch,Jy as ci,gg as cj,wA as ck,fg as cl,_g as cm,jR as cn,$z as co,Xy as cp,dN as cq,ZO as cr,QO as cs,XT as ct,wN as cu,Zf as cv,Tm as cw,TI as cx,oR as cy,MF as cz,GV as d,zS as d$,UA as d0,iz as d1,OO as d2,E_ as d3,Ez as d4,kz as d5,Cz as d6,tB as d7,Vk as d8,gA as d9,xh as dA,sp as dB,wg as dC,wB as dD,jI as dE,Am as dF,qI as dG,WI as dH,sy as dI,PT as dJ,zI as dK,FI as dL,VI as dM,NI as dN,MI as dO,LI as dP,DI as dQ,UI as dR,YI as dS,RI as dT,BI as dU,ZT as dV,NE as dW,zE as dX,bf as dY,vE as dZ,fE as d_,fA as da,rg as db,Yz as dc,qz as dd,pO as de,iB as df,JL as dg,XV as dh,p_ as di,bI as dj,uP as dk,zV as dl,Zm as dm,Gd as dn,bp as dp,Jm as dq,Ym as dr,yp as ds,Sm as dt,tp as du,Zd as dv,ip as dw,fm as dx,Pm as dy,_m as dz,Fc as e,ck as e$,MN as e0,hE as e1,k
2R as e2,Eg as e3,rU as e4,Dw as e5,eU as e6,Hw as e7,WV as e8,dv as e9,TO as eA,cL as eB,WD as eC,SB as eD,BM as eE,Ab as eF,cw as eG,Wc as eH,Gc as eI,Vf as eJ,GF as eK,cv as eL,bV as eM,QF as eN,Tf as eO,$w as eP,tU as eQ,uI as eR,rv as eS,cP as eT,Tz as eU,lP as eV,uA as eW,cA as eX,lg as eY,oI as eZ,Ew as e_,LN as ea,yw as eb,NN as ec,mP as ed,e_ as ee,UF as ef,HM as eg,ez as eh,Qy as ei,qF as ej,hA as ek,VV as el,qV as em,_A as en,pP as eo,DE as ep,jA as eq,PB as er,PD as es,RD as et,MD as eu,MA as ev,UD as ew,TD as ex,FM as ey,xD as ez,CB as f,$F as f$,NA as f0,Dg as f1,qg as f2,nv as f3,OF as f4,aE as f5,If as f6,gN as f7,hN as f8,YL as f9,Ug as fA,sV as fB,lV as fC,Gv as fD,WF as fE,XF as fF,wz as fG,w_ as fH,rz as fI,yu as fJ,yA as fK,x_ as fL,S_ as fM,A_ as fN,d_ as fO,h_ as fP,WS as fQ,RP as fR,CA as fS,Fy as fT,qy as fU,_w as fV,Xh as fW,Wg as fX,eD as fY,YB as fZ,Sg as f_,gw as fa,lw as fb,PI as fc,zk as fd,Rf as fe,nU as ff,cU as fg,Qx as fh,iA as fi,zh as fj,uv as fk,Uz as fl,mw as fm,kF as fn,PF as fo,SF as fp,ok as fq,P_ as fr,Uy as fs,KF as ft,sz as fu,nz as fv,JF as fw,C_ as fx,lz as fy,wV as fz,D_ as g,VA as g$,Ag as g0,oU as g1,aU as g2,OS as g3,nf as g4,Xg as g5,aP as g6,cE as g7,yE as g8,uE as g9,ME as gA,AB as gB,xN as gC,dC as gD,xB as gE,yD as gF,c_ as gG,sU as gH,ow as gI,Xw as gJ,U_ as gK,Qg as gL,_I as gM,hM as gN,aw as gO,xO as gP,kk as gQ,m_ as gR,XL as gS,vz as gT,I_ as gU,_z as gV,qA as gW,wD as gX,ED as gY,GN as gZ,OA as g_,Bc as ga,Yb as gb,Xc as gc,jc as gd,lE as ge,Qb as gf,Xb as gg,Cw as gh,TR as gi,pg as gj,g_ as gk,u_ as gl,dg as gm,Oh as gn,_b as go,iv as gp,Ef as gq,BF as gr,zF as gs,ST as gt,lv as gu,$m as gv,kE as gw,nC as gx,tg as gy,cS as gz,Uc as h,ZP as h$,Jx as h0,Vx as h1,Ux as h2,Fx as h3,$x as h4,Yx as h5,Gx as h6,tI as h7,eb as h8,ub as h9,QP as hA,oS as hB,uk as hC,lC as hD,F_ as hE,tv as hF,Pg as hG,kL as hH,Uf as hI,vA as hJ,ad as hK,JR as hL,FR as hM,Fk as hN,kw as hO,Sw as hP,wf as hQ,ET as hR,CT as hS,MT as hT,Cf as hU,sv as hV,_v as hW,bv as hX,$V as hY,YV as hZ,EP as h_,db as ha,Z_ as hb,yk as hc,tb as hd,hb as he,xb as hf,bb as hg,fb as hh,yb as hi,Nc as hj,Ic as hk,ob as hl,sb as hm,Dk as hn,Ok as ho,Pb as hp,YO as hq,uf as hr,Qh as hs,vk as ht,uL as hu,KL as hv,dL as hw,zA as hx,qP as hy,XP as hz,s_ as i,OD as i$,BA as i0,SD as i1,xv as i2,Ig as i3,YE as i4,PM as i5,kM as i6,SM as i7,ZM as i8,JD as i9,Av as iA,dP as iB,bg as iC,$R as iD,NB as iE,Dv as iF,kI as iG,mL as iH,JP as iI,hg as iJ,EV as iK,dM as iL,Kb as iM,G_ as iN,Lf as iO,Od as iP,Dd as iQ,pN as iR,oN as iS,cp as iT,Bg as iU,v_ as iV,pC as iW,ly as iX,GD as iY,GM as iZ,lD as i_,YD as ia,uD as ib,KD as ic,CM as id,wL as ie,By as ig,Dy as ih,WA as ii,EB as ij,FB as ik,DO as il,Mv as im,XS as io,vv as ip,GS as iq,fI as ir,vI as is,yI as it,fw as iu,bz as iv,QS as iw,Sz as ix,zv as iy,eC as iz,l_ as j,Nd as j0,dd as j1,Pd as j2,_p as j3,hp as j4,vp as j5,SR as j6,Md as j7,ZN as j8,YA as j9,wd as ja,Qz as jb,cm as jc,Ld as jd,UT as je,im as jf,bR as jg,cB as jh,lB as ji,uB as jj,mB as jk,yB as jl,fB as jm,gB as jn,hB as jo,pB as jp,dB as jq,CI as jr,LL as js,Zy as jt,zO as ju,RF as jv,Eu as k,xy as l,dO as m,Sy as n,Zv as o,mE as p,GR as q,HI as r,aC as s,XB as t,Yc as u,oC as v,uC as w,cC as x,Dh as y,Qm 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.