const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["f2ade998.UGJ_ND-7.js","630ba094.L_X-5TXi.js","6ec9a0fa.rdcQt2v8.js","f025431a.BlsbPO0-.js","4509beb0.BguNH--m.js","app.BAntcNCf.js","assets/app.CGRs8DQS.css","assets/deferred-boot.Drpcgh6C.css","0f5b1987.BrdnjeT6.js","9e5d8eb8.LM7m9FaB.js","a45fed45.Dr0zbZ6C.js","c328865d.BCB1O5to.js","f1384cc2.BX1JbjgR.js","4618373b.CjXafxDy.js","486c3fda.B832TPZj.js","assets/a50c8864f4.DiwHZivn.css","17f6d6d8.CEv0kVLp.js","assets/7188aae948xccd7bc85.CW2HhXMu.css","19286c78.BbePfvbV.js","cb6adac5.Bl30j75Z.js","assets/90ea855f49.uZEuHncj.css","c7b92b97.keF148le.js","faece749.BI3CiyQ-.js","77d9e668.B6Nt2tia.js","assets/69c8bed031.BEvzDDvy.css","assets/256cc32287.B1YSPUDc.css","37c3ef79.fGNFrNWQ.js","0754daa8.CK8Pe0L-.js","8b7d6012.TWTlrVbe.js","cee09e98.C2K-WJtK.js","ce604576.DRj3vMAG.js","bbe16958.1VP-tAHR.js","c653c20e.CtpSjz9y.js","21162507.ZBi71-Xy.js","139f607b.DLDe3-j_.js","5f1fce8b.e4QsuNYD.js","85be81ee.Btrur139.js","a96979cd.DyZVsoqV.js","ecf7b7a1.Q5pvlQ5K.js","assets/ShopPayVerificationSwitch.WW3cs_z5.css","56bd1136.BecRgXgY.js","7c5b2887.DTfFtfvF.js","67e8c664.ByAbJtL3.js","ee84a27a.DRsJmi0n.js","a5379eb2.DKsqgitx.js","77821758.CIHBOvKY.js","assets/6e3faf45e1x0e0212c9.ct4xfivv.css","assets/WalletSandbox.BoV0vp4z.css","2bce9289.B_Xz6Nx_.js","1a978f84.BgZkrlSe.js","9c33421f.DpXDaAtO.js","62a11d3e.lvgUtGFI.js","1dbf806c.BIm0vljQ.js","4c290a1e.O99OwMvM.js","assets/amazonWalletLazy.D78LrA7v.css","assets/delivery-method-transitions.S-FSTp4Y.css","dce37576.BccT3lUk.js","10dab80e.F58Toczh.js","422a3b46.DIZUkrKg.js","a4583ed6.ptgi_W3T.js","58f88e89.B6V4hnk-.js","071c0ba4.B9zTdxJO.js","0be192b6.rG-iHLkS.js","83f74304.Bpuuq40R.js","7edfee1d.BSxTCqWo.js","1672350c.XhEaRJLc.js","a7ef2c81.CBBwqFGx.js","29eb03d7.B9d8bjD3.js","assets/55669b7cfcx9b58e6fb.cbVP6Hp_.css","assets/PickupPointContent.CFOyQs2m.css","7fb43285.C0mvDR8Q.js","1befea5c.DNUfNYYr.js","assets/e8404cbaefx27591707.B68J3GgF.css","b71b03d1.DywjAYcQ.js","assets/04c08e5c0e.CuRoM9zv.css","2f5db8a5.Cc2kNiF_.js","52a3e529.e69_Wh5V.js","a541bc81.Cbl-i0FD.js","b4f06cd6.CwW_AIzI.js","assets/LocalPickupLocationsModal.AAaWQUMa.css"])))=>i.map(i=>d[i]); import{Ft as e,Gt as t,Ht as n,It as a,Jt as i,Pt as r,Q as l,Qt as o,Vt as s,Wt as c,Xt as d,Z as u,Zt as p,bt as h,ct as m,en as v,ft as _,gt as y,jt as g,mt as f,nn as b,on as k,ot as I,pt as P,qt as S,yt as C,zt as E}from"./630ba094.L_X-5TXi.js";import{f as A,l as M}from"./app.BAntcNCf.js";import{$_ as L,$f as w,$p as N,$y as x,AO as T,A_ as O,Ab as D,Aw as U,Bp as B,Cn as R,Cp as V,Dp as H,Dt as z,Dw as F,Dy as j,EA as K,EE as q,Et as G,G_ as $,Gc as Y,Gg as W,HO as Q,Hd as J,Hw as X,I_ as Z,Il as ee,In as te,Ip as ne,JD as ae,JO as ie,Jg as re,Jp as le,K_ as oe,Kc as se,Kg as ce,Kw as de,LC as ue,LT as pe,Lp as he,Lv as me,Lx as ve,Mv as _e,Mx as ye,Nk as ge,OO as fe,Op as be,Oy as ke,Pc as Ie,Pv as Pe,QA as Se,Qf as Ce,Qp as Ee,Rn as Ae,Sp as Me,Sv as Le,TS as we,T_ as Ne,Tp as xe,UA as Te,Uf as Oe,VD as De,Vv as Ue,W_ as Be,Wb as Re,Wd as Ve,XT as He,X_ as ze,Xd as Fe,Xf as je,Xg as Ke,Xw as qe,Y_ as Ge,Yf as $e,Yg as Ye,Yw as We,ZA as Qe,Zp as Je,_E as Xe,__ as Ze,_d as et,_p as tt,aS as nt,af as at,ao as it,bA as rt,bT as lt,b_ as ot,bs as st,cE as ct,ck as dt,cm as ut,co as pt,dA as ht,dk as mt,dn as vt,eg as _t,ep as yt,fy as gt,gb as ft,gp as bt,hk as kt,hv as It,hw as Pt,ip as St,jO as Ct,jg as Et,jh as At,jk as Mt,jy as Lt,kl as wt,kp as Nt,lA as xt,lE as Tt,l_ as Ot,lk as Dt,ls as Ut,lv as Bt,mo as Rt,nm as Vt,oS as Ht,om as zt,oo as Ft,pE as jt,pS as Kt,po as qt,q_ as Gt,qg as $t,qw as Yt,rE as Wt,rm as Qt,sE as Jt,ss as Xt,tg as Zt,th as en,tm as tn,uS as nn,ud as an,vp as rn,w as ln,wO as on,wS as sn,wb as cn,wp as dn,wx as un,wy as pn,xD as hn,xO as mn,xs as vn,zh as _n,zl as yn}from"./6ec9a0fa.rdcQt2v8.js";import{l as gn,n as fn,o as bn,r as kn,t as In}from"./0f5b1987.BrdnjeT6.js";import{t as Pn}from"./77821758.CIHBOvKY.js";import{n as Sn}from"./9c33421f.DpXDaAtO.js";import{n as Cn}from"./486c3fda.B832TPZj.js";import{i as En,n as An,t as Mn}from"./4618373b.CjXafxDy.js";import{t as Ln}from"./17f6d6d8.CEv0kVLp.js";import{r as wn}from"./2c7267bc.DG2jhNnF.js";import{n as Nn}from"./19286c78.BbePfvbV.js";import{n as xn}from"./c7b92b97.keF148le.js";import{t as Tn}from"./37c3ef79.fGNFrNWQ.js";import{d as On,n as Dn,r as Un,s as Bn,u as Rn}from"./82d59f8f.CMkmnfJF.js";import{r as Vn}from"./651bb548.BkLScdUZ.js";import{t as Hn}from"./b71b03d1.DywjAYcQ.js";import{i as zn,n as Fn,o as jn,r as Kn,t as qn}from"./928dbd30.BIHpBIaB.js";import{t as Gn}from"./faece749.BI3CiyQ-.js";import{i as $n}from"./77d9e668.B6Nt2tia.js";import{n as Yn,t as Wn}from"./2f5db8a5.Cc2kNiF_.js";import{t as Qn}from"./c0466e46.CWfEHHSq.js";import{r as Jn,t as Xn}from"./5f07060a.Bj3LVabE.js";import{n as Zn,t as ea}from"./83f74304.Bpuuq40R.js";import{t as ta}from"./7edfee1d.BSxTCqWo.js";import{t as na}from"./ce604576.DRj3vMAG.js";import{i as aa,n as ia,r as ra,t as la}from"./b01c110b.h_AlXdR4.js";import{n as oa}from"./f00fed33.B3oCNX4A.js";import{i as sa,r as ca,t as da}from"./94493b3a.vK857dUR.js";import{n as ua,r as pa,t as ha}from"./99cd9b25.CvuiVsTL.js";import{t as ma}from"./676eb8e9.BJRgZq8A.js";import{t as va}from"./a9ee22a0.Ddm2bxTw.js";var _a={MILES:100,KILOMETERS:200};function ya(e,t){const n=t&&("MILES"===t.unit?"mi":"km"),a=t&&t.value<100?1:0;return[t&&e.numberFormatter({minimumFractionDigits:0,maximumFractionDigits:a}).format(t.value),n].join(" ").trim()}function ga(e){const{pickupLocation:t}=e;return t&&"distanceFromBuyer"in t?t.distanceFromBuyer??void 0:void 0}var fa=e=>e.every(e=>{const t=ga(e);return t?.value&&t.value>_a[t.unit]});function ba({postalCode:e,city:t,zoneCode:n}){const a=["address2","company","firstName","lastName","phone"];return e?[...a,"zoneCode","city","address1","countryCode"]:t?[...a,"zoneCode","address1","countryCode"]:n?[...a,"zoneCode"]:[...a,"address1"]}function ka(e,t){const n=e.lastIndexOf(",");if(-1===n)return e.length>t?`${e.slice(0,t)}...`:e;const a=e.slice(0,n),i=e.slice(n);return a.length>t?`${a.slice(0,t)}...${i}`:e}function Ia(){const{checkout:{negotiator:e}}=mn(),{locationAddress:t}=e.parts,n=t.value,{countryCode:a,postalCode:i,city:r}=n,l=Boolean(a&&!i&&!r),{details:o}=we(a);return{isOnlyCountryAvailable:l,fullCountryName:o?.name||void 0,formattedAddress:un(n,{hiddenFields:ba(n),multiline:!1,countryFormat:"explicit"})}}function Pa({itemCount:e,methods:t,onChangeLocationClick:n}){const{i18n:a}=mn(),{isOnlyCountryAvailable:i,formattedAddress:r}=Ia(),l=ut({methods:t});if(c(()=>{i||l("pickup_long_distance_banner_rendered")},[l,i]),i)return null;const o=(e=>e.every(e=>"MILES"===ga(e)?.unit))(t)?"MILES":"KILOMETERS",s=ya(a,{value:_a[o],unit:o}),d=C("span",{className:"oCDzB",children:r});return C(bt,{children:C(T,{children:r?a.translate("local_pickup.all_stores_far_away.title_with_item",{distance:C("span",{className:"qIyj1",children:s}),location:n?C(ce,{tone:"monochrome",onClick:function(){l("pickup_long_distance_banner_change_location_click"),n?.()},children:d}):d,count:e}):a.translate("local_pickup.all_stores_far_away.title",{distance:s})})})}function Sa({hideText:e,singleItem:t}){const{i18n:n}=mn(),a=It().value?.methods??[],i=t?1:a.length||2,r=Array.from({length:i},(e,t)=>`LocationSkeleton${(t+1).toString()}`);return C(b,{children:[e?null:C(W,{gap:"base",padding:"small-400 none base none",children:C(H,{size:"extraSmall",children:n.translate("shipping.waiting_on_pickup_location_notice")})}),C(En,{border:"none",background:"transparent",children:C(An,{name:"skeleton-loading",variant:"block",hideRadioControl:1===r.length,children:r.map(e=>C(Mn,{disabled:!0,value:e,accessibilityLabel:n.translate("general.loading"),secondaryContent:C(W,{gap:"small-400",alignItems:"end",children:[C(H,{inlineSize:"small",size:"small"}),C(H,{inlineSize:"base",size:"small"})]}),children:C(W,{gap:"small-400",children:[C(H,{inlineSize:"small",size:"small"}),C(H,{inlineSize:"base",size:"small"})]})},e))})})]})}function Ca(){const{i18n:e}=mn();return C(J,{autoFocus:!0,tone:"warning",errorType:Ve.DeliveryError,heading:e.translate("local_pickup.selected_pickup_option_no_longer_available.title"),children:C(T,{children:e.translate("local_pickup.selected_pickup_option_no_longer_available.description")})})}function Ea({heading:e,tryDifferentLocationOnClick:t}){const{i18n:n,checkout:{proposal:a}}=mn(),i=N(),l=Le(),o=r(()=>ue(l.value.enabledDeliveryMethods)),s=r(()=>o.value.length>0),d=_(t),u=r(()=>s.value||Boolean(d.value)),p=It(),h=ut({methods:p.value?.methods||[],selectedDeliveryMethodHandle:p.value?.selectedDeliveryMethodHandle});c(()=>{h("pickup_no_location_banner_rendered")},[h]);const m=C(ce,{tone:"monochrome",onClick:function(){h("pickup_no_location_banner_ship_items_click"),a.markBuyerSelectedDelivery?.(),i.setSelectedMethodTypes(o.value)},children:n.translate("local_pickup.pickup_unavailable_banner_body.ship_items")});function v(){h("pickup_no_location_banner_search_click"),t?.()}const y=t?C(ce,{tone:"monochrome",onClick:v,children:n.translate("local_pickup.pickup_unavailable_banner_body.search_elsewhere")}):n.translate("local_pickup.pickup_unavailable_banner_body.search_elsewhere"),g=t?C(ce,{tone:"monochrome",onClick:v,children:n.translate("local_pickup.pickup_unavailable_banner_body.search_elsewhere_standalone")}):n.translate("local_pickup.pickup_unavailable_banner_body.search_elsewhere_standalone");return C(J,{tone:"critical",errorType:Ve.DeliveryError,heading:e,children:C(P,{when:u,children:C($e,{children:C(P,{when:s,fallback:g,children:n.translate("local_pickup.pickup_unavailable_banner_body.ship_items_or_search_elsewhere",{ship_items:m,search_elsewhere:y})})})})})}function Aa({allLocationsFarAway:e,selectedPickupOptionNoLongerAvailable:t}){const n=cn("deliveryNext");return r(()=>e.value&&!t.value&&!n.value)}function Ma(){const{shop:e,checkout:{negotiator:t}}=mn(),n=Le(),{deliveryNext:a}=t.current.fields,i=se(),l=Yn();return r(()=>{if(!e.shipPickupInOneOrderEnabled)return!1;if(!(a.value&&"supportsSplitDeliveryMethod"in a.value&&a.value.supportsSplitDeliveryMethod))return!1;const{enabledDeliveryMethods:t,deliveryMethodsByMerchandise:r}=n.value,o=t.includes("SHIPPING"),s=t.includes("PICK_UP");if(!o||!s)return!1;if(!i.value&&l.value)return!1;const c=Object.values(r);if(c.length<2)return!1;if(c.some(e=>e.includes("SHIPPING")&&e.includes("PICK_UP")))return!0;const d=c.some(e=>e.includes("SHIPPING")&&!e.includes("PICK_UP")),u=c.some(e=>e.includes("PICK_UP")&&!e.includes("SHIPPING"));return d&&u})}function La(e){return e?.stockDetails.reduce((e,{itemCount:t})=>e+t,0)??0}function wa(e){const{checkout:t,i18n:n,shop:a}=mn(),i=Ma(),l=Yn(),o=_(e),s=t.proposal.negotiated.fields;return r(()=>{const e=s.deliveryNext.value,t=s.merchandiseLines.value,r=s.sellability.value;if(!(a.shipPickupInOneOrderEnabled&&o.value&&e&&"unavailable"!==e.status&&t&&r))return;const c=e.lines.find(e=>"available"===e.status&&e.methods.some(({handle:e,methodType:t})=>e===o.value&&"PICK_UP"===t));if(!c?.targetMerchandiseLines)return;const d=c.methods.find(({handle:e})=>e===o.value)?.availability;if(!d?.length)return;const u=new Map(t.lines.flatMap(e=>e.lineComponents.length?e.lineComponents:[e]).map(e=>[e.stableId,e])),p=new Map(d.map(({target:e,status:t})=>[e.stableId,t])),h=i.value&&!l.value,m={canShipSeparately:[],cannotShipSeparately:[]};for(const n of c.targetMerchandiseLines){if(!n.requiresShipping)continue;const e=u.get(n.stableId),t=p.get(n.stableId);if(!e||!t)return;if("UNAVAILABLE"!==t)continue;const a=r.deliveryMethodsByMerchandise[e.stableId];if(!a)return;m[h&&a.includes("SHIPPING")?"canShipSeparately":"cannotShipSeparately"].push(e)}const v=({stableId:e})=>Be(t.lines,e)?.stableId,_=new Set(m.cannotShipSeparately.map(v));return m.cannotShipSeparately=t.lines.filter(({stableId:e})=>_.has(e)),m.canShipSeparately=m.canShipSeparately.filter(e=>!_.has(v(e))),m.canShipSeparately.length||m.cannotShipSeparately.length?{stockDetails:["canShipSeparately","cannotShipSeparately"].flatMap(e=>{const t=m[e];if(!t.length)return[];const a=t.reduce((e,{quantity:t})=>e+t,0);return[{type:e,merchandiseLines:t,itemCount:a,title:"canShipSeparately"===e?n.translate("local_pickup.stock_details.ship_separately",{count:a}):n.translate("local_pickup.stock_details.remove_items",{count:a}),subtitle:n.translate("local_pickup.stock_details.out_of_stock")}]})}:void 0})}var Na=class extends Error{constructor(...e){super(...e),this.name="PickupLocationExposureError"}};function xa(e){const{checkout:t,shop:n,observability:i}=mn(),r=me(),l=K(),{methods:o,surface:s}=e,c=!1!==e.visible&&!l,d=_(v(()=>({methods:o,surface:s,visible:c}),[o,s,c])),p=t.proposal.negotiated.fields;a(()=>{const{methods:e,surface:t,visible:a=!0}=d.value,l=p.deliveryNext.value,o=p.merchandiseLines.value,s=p.sellability.value;if(!(a&&e.length&&n.shipPickupInOneOrderEnabled&&l&&"unavailable"!==l.status&&o&&s))return;const c={methods:e,surface:t,deliveryLines:l.lines.filter(Wt),merchandiseLines:o,sellability:s},h=new Date;u(()=>{try{r("partialStockPickupLocationExposure",{snapshot:c,timestamp:h})}catch(e){i.error(e instanceof Error?e:new Na(String(e)),{errorClass:"PickupLocationExposureError",severity:"warning"})}})})}function Ta({distanceLabel:e,instructions:t,unavailableItemCount:n=0}){const{i18n:a}=mn(),i=n>0;return e||t||i?C(W,{className:"KHJ3S",direction:"inline",rowGap:"small-400",columnGap:"small-200",alignItems:"center",paddingBlockStart:"small-400",children:[e&&C(W,{direction:"inline",gap:"small-400",alignItems:"center",children:[C(T,{color:"subdued",children:C(Dt,{type:"location",size:"small"})}),C(T,{fonts:"secondary",type:"small",children:e})]}),i&&C(rn,{tone:"warning",color:"subdued",children:C(Q.Provider,{value:!0,children:C(W,{direction:"inline",alignItems:"center",gap:"small-400",children:[C(Dt,{type:"alert-circle",size:"small-100"}),C(T,{children:a.translate("local_pickup.unavailable_item_count",{count:n})})]})})}),!i&&t&&C(W,{direction:"inline",gap:"small-400",alignItems:"center",children:[C(T,{color:"subdued",children:C(Dt,{type:"clock",size:"small"})}),C(T,{fonts:"secondary",type:"small",children:t})]})]}):null}function Oa(){const{checkout:e,shop:t}=mn(),{deliveryNext:n,merchandiseLines:a}=e.negotiator.current.fields,i=r(()=>{const e=He(a.value?.lines).filter(e=>Boolean(e.sellingPlan?.subscriptionDetails));return!!(n.value&&"lines"in n.value&&n.value.lines)&&n.value.lines.some(t=>"SUBSCRIPTION"===t.type&&"PICK_UP"===ct(t)?.methodType&&t.targetMerchandiseLines?.some(t=>e.some(e=>e.stableId===t.stableId)))});return r(()=>t.shipPickupInOneOrderEnabled?i.value:Re({checkout:e}))}function Da({variant:e="text"}){const{i18n:t}=mn(),n=Oa(),a=t.translate("delivery_options.subscription_pickup_information");return C(P,{when:n,children:"banner"===e?C(bt,{tone:"info",children:a}):C($e,{children:a})})}var Ua=(e,t,n,a,i={})=>{const r=e.length;return t?Ba(n,{oneItem:()=>a.translate("local_pickup.location_information_far_away_one_item",{count:r}),otherItems:()=>a.translate("local_pickup.location_information_far_away_other_items",{count:r})}):i.allLocationsFarAway?Ba(n,{oneItem:()=>a.translate("local_pickup.location_far_away_one_item",{count:r}),otherItems:()=>a.translate("local_pickup.location_far_away_other_items",{count:r})}):1===r?Ba(n,{oneItem:()=>a.translate("local_pickup.location_nearby_short_one_item",{count:r}),otherItems:()=>a.translate("local_pickup.location_nearby_short_other_items",{count:r})}):function(e,t){const n=e.map(e=>ga(e)?.value).filter(e=>void 0!==e);if(0===n.length)return!0;const a=e.find(({handle:e})=>e===t),i=a?ga(a)?.value:void 0;return void 0===i||i<=Math.min(...n)}(e,i.selectedDeliveryMethodHandle)?Ba(n,{oneItem:()=>a.translate("local_pickup.location_closest_one_item"),otherItems:()=>a.translate("local_pickup.location_closest_other_items")}):a.translate("local_pickup.location_selected")};function Ba(e,t){return 1===e?t.oneItem():t.otherItems()}function Ra({method:e,subscriptionBanner:t}){const{i18n:n}=mn(),{isOnlyCountryAvailable:a}=Ia(),i=wa(e.handle),{cost:r,pickupLocation:l}=e,{name:o,address:s,distanceFromBuyer:c}=l,d=l.instructions.trim(),u=function(e,t){return 0===e.amount?{amount:t.translate("shipping.free_rate_label"),letterCase:"uppercase"}:{amount:t.formatCurrency(e.amount,{currency:e.currencyCode}),letterCase:void 0}}(r,n),p=!a&&c?ya(n,c):void 0;return C(W,{direction:"block",gap:"small-400",children:[C(W,{children:[C(Ct,{gap:"small-400",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",alignItems:"baseline",children:[C(T,{type:"strong",children:o}),C(T,{type:"strong",letterCase:u.letterCase,children:u.amount})]}),C(Gn,{address:s,hiddenFields:["postalCode","countryCode","phone"]}),C(Ta,{distanceLabel:p,instructions:d,unavailableItemCount:La(i.value)})]}),t?C(Da,{variant:"banner"}):null]})}function Va(e){const{checkout:{negotiator:t}}=mn(),{deliveryLines:n,merchandiseLines:a,discountLines:i}=t.parts,r=Pe();return l=>{const o=e&&r?.({...e,merchandiseStableIds:l,itemOperation:"remove"});ze({deliveryLines:n,merchandiseLines:a,merchandiseStableIds:l,discountLines:i}),o?.(),t.negotiate({withResultHandling:!0,silenceViolations:gt(["deliveryNext","merchandiseLines"])})}}function Ha(){const{i18n:e}=mn();return C(bt,{tone:"info",children:e.translate("address_management.draft_order_delivery_address_reminder")})}function za({message:e}){return e?C(J,{errorType:Ve.DeliveryError,tone:"critical",children:C(W,{alignItems:"start",gap:"small-500",children:C(T,{children:e})})}):null}function Fa(){const{i18n:e,url:t,client:n,checkout:a}=mn(),i=n.unstable_getSerialization("apiClientId"),l=Rt(i),o=a.negotiator.parts.shippingAddress,s=r(()=>o.value.countryCode),{href:c,onClick:d}=et(),{details:u,loading:p}=we(s.value),h=an(_n(X)),m=p?s.value:u?.name;return C(P,{when:h,children:()=>C(za,l?{message:C(b,{children:e.translate("merchant_redirect.shop_app_not_supported",{storefront_link:C(ce,{href:t.storefront(),children:e.translate("contact.storefront_link")})})})}:{message:C(b,{children:e.translate("payment_errors.payment_method_not_supported",{country:m,checkout_as_guest_link:C(ce,{href:c,onClick:d,children:e.translate("account_management.checkout_as_guest_link")})})})})})}function ja(e){return"shopPay"===e.current.value?"shop_pay":"guest_checkout"}var Ka={surface:"SURFACE_INVENTORY_ISSUE_BANNER",reason:"REASON_INVENTORY_ISSUE"};function qa(e){requestAnimationFrame(()=>{Te({content:e,role:"status"})})}function Ga({title:e,subtitle:t}){return t?`${e} / ${t}`:e}function $a({merchandiseLines:e,bannerType:t,allowAlternativeAction:n}){const{i18n:a}=mn(),i=O(Ka),l=Va(Ka),o=Le(),s=Yn(),c="pickup"===t,u=c?"SHIPPING":"PICK_UP",p=r(()=>Array.from(new Map(e.value.map(e=>[e.stableId,e])).values())),h=r(()=>p.value.map(({stableId:e})=>e)),m=r(()=>{const e=new Map;for(const t of p.value){const n=e.get(t.digest);n?e.set(t.digest,{...n,quantity:n.quantity+t.quantity}):e.set(t.digest,t)}return Array.from(e.values())}),v=r(()=>p.value.reduce((e,{quantity:t})=>e+Math.max(1,t),0)),_=r(()=>{const{deliveryMethodsByMerchandise:e}=o.value;return p.value.filter(({stableId:t})=>e[t]?.includes(u))}),y=r(()=>_.value.map(({stableId:e})=>e)),g=r(()=>_.value.reduce((e,{quantity:t})=>e+Math.max(1,t),0)),b=r(()=>(n?.value??!0)&&!s.value&&y.value.length===h.value.length&&g.value>0),k=r(()=>p.value.map(({variantId:e})=>e)),I=function({allLinesAlternativeEligible:e,isPickupBanner:t,variantIds:n}){const{userEvents:a,shop:i,source:l,checkout:{identity:o,negotiator:s}}=mn(),{merchandiseLines:c}=s.current.fields,u=r(()=>e.value?t?"remove_or_switch_to_shipping":"remove_or_switch_to_pickup":"remove_only"),p=t?"pick-up":"shipping",h=r(()=>n.value.map(e=>{if(e)try{return parseInt(ae(e),10)}catch{return}}).filter(e=>void 0!==e));return d(e=>{const t={schemaId:"checkout_inventory_split_buyer_decision/2.0",payload:{shopId:parseInt(ae(i.id),10),checkoutToken:l.checkoutSessionIdentifier??"",productVariantIds:h.value,bannerType:u.value,buyerAction:e,deliveryMethodType:p,checkoutSurface:ja(o),sourceName:"checkout_one",checkoutProductVariantsCount:c.value?.lines.length}};a.monorailEvent(t)},[u,p,o,c,a,h,i,l])}({allLinesAlternativeEligible:b,isPickupBanner:c,variantIds:k}),S=r(()=>p.value.length>0),E=r(()=>c?a.translate("split_delivery.inventory_issue_banner.heading.cannot_be_picked_up",{count:v.value}):a.translate("split_delivery.inventory_issue_banner.heading.cannot_be_shipped",{count:v.value})),A=r(()=>b.value?a.translate("split_delivery.inventory_issue_banner.remove_item",{count:v.value}):a.translate("split_delivery.inventory_issue_banner.remove_item_only",{count:v.value})),M=r(()=>c?a.translate("split_delivery.inventory_issue_banner.ship_separately",{count:g.value}):a.translate("split_delivery.inventory_issue_banner.pick_them_up_in_store",{count:g.value})),L=r(()=>m.value.map(({title:e,subtitle:t,quantity:n})=>{const i=Ga({title:e,subtitle:t});return n>1?a.translate("split_delivery.inventory_issue_banner.merchandise_line_with_quantity",{title:i,quantity:n}):i}).join(", ")),N=()=>{const e=L.value;I("switch_delivery_method"),i({targetDeliveryMethodType:u,merchandiseStableIds:y.value}),qa(c?a.translate("split_delivery.accessibility.status.ship_separately",{items:e}):a.translate("split_delivery.accessibility.status.pickup_in_store",{items:e}))},x=C(ce,{onClick:()=>{const e=L.value;I("remove_items"),l(h.value),qa(a.translate("split_delivery.accessibility.status.remove_items",{items:e}))},children:A});return C(P,{when:S,children:()=>C(J,{tone:"critical",errorType:Ve.DeliveryError,heading:E.value,children:C(W,{gap:"small-300",children:[C(yt,{gap:"small-300",children:C(f,{each:m,getKey:({stableId:e})=>e,children:({title:e,subtitle:t,quantity:n})=>{const i=Ga({title:e,subtitle:t});return C(w,{children:n>1?a.translate("split_delivery.inventory_issue_banner.merchandise_line_with_quantity",{title:i,quantity:n}):i})}})}),C(T,{children:C(P,{when:b,fallback:x,children:()=>{const e=C(ce,{onClick:N,children:M});return c?a.translate("split_delivery.inventory_issue_banner.remove_items_or_ship",{ship_separately_link:e,remove_items_link:x}):a.translate("split_delivery.inventory_issue_banner.remove_items_or_pickup",{pickup_in_store_link:e,remove_items_link:x})}})})]})})})}function Ya({violationLines:e,deliveryMethodType:t,proposedDeliveryLines:n,proposedMerchandiseLines:a}){const i=new Set(n.filter(e=>{return n=e.value.deliveryMethodTypes,a=t,0!==n.length&&("PICK_UP"===a?n.every(e=>"SHIPPING"===e||"LOCAL"===e):n.every(e=>"PICK_UP"===e));var n,a}).flatMap(e=>e.value.targetMerchandiseLines??[]).map(e=>e.stableId)),r=a.length>0;return e.filter(e=>{const t=Be(a,e.stableId),n=t?.stableId??e.stableId;return!(i.has(e.stableId)||i.has(n)||r&&null==t)})}var Wa=["DELIVERY_NO_DELIVERY_STRATEGY_AVAILABLE_FOR_MERCHANDISE_LINE","MERCHANDISE_OUT_OF_STOCK_IN_CONTEXT"];function Qa(e){const{shop:{shipPickupInOneOrderEnabled:t},checkout:{negotiator:n}}=mn(),{allViolations:a,merchandiseLines:i,deliveryNext:l}=n.current.fields,o=Le(),s=se(),{deliveryLines:c,merchandiseLines:d}=n.parts;return r(()=>{const n=Boolean(!(!l.value||!("supportsSplitDeliveryMethod"in l.value))&&l.value.supportsSplitDeliveryMethod),r={allViolations:a.value,deliveryMethodsByMerchandise:o.value.deliveryMethodsByMerchandise,isSplitShipAndPickup:s.value,negotiatedMerchandiseLines:i.value,proposedDeliveryLines:c.value,proposedMerchandiseLines:d.value},u=t&&n;return"localPickup"===e.mode?function({canUseDeliveryMethodScopedViolations:e,state:t}){if(e){const e=Ja({deliveryMethodType:"PICK_UP",suppressUnscopedPickupViolations:t.isSplitShipAndPickup,state:t});if(e.length>0)return{merchandiseLines:e,allowAlternativeAction:!0}}return t.isSplitShipAndPickup?{merchandiseLines:[],allowAlternativeAction:!1}:(n=t.negotiatedMerchandiseLines,(n?.lines.filter(({requiresShipping:e})=>e).length??0)>1?{merchandiseLines:Ja({deliveryMethodType:"PICK_UP",suppressUnscopedPickupViolations:!1,state:t}),allowAlternativeAction:!1}:{merchandiseLines:[],allowAlternativeAction:!1});var n}({canUseDeliveryMethodScopedViolations:u,state:r}):u?function({deliveryMethodType:e,state:t}){return{merchandiseLines:Ja({deliveryMethodType:e,suppressUnscopedPickupViolations:"PICK_UP"===e&&t.isSplitShipAndPickup,state:t}),allowAlternativeAction:!0}}({deliveryMethodType:e.deliveryMethodType,state:r}):{merchandiseLines:[],allowAlternativeAction:!1}})}function Ja({deliveryMethodType:e,suppressUnscopedPickupViolations:t,state:{allViolations:n,deliveryMethodsByMerchandise:a,negotiatedMerchandiseLines:i,proposedDeliveryLines:r,proposedMerchandiseLines:l}}){const o=function(e,t,n){function a(e){const a=t[e]??[];return n.some(e=>a.includes(e))}return e.flatMap(e=>e.lineComponents.length>0?e.lineComponents.filter(e=>!a(e.stableId)):a(e.stableId)?[]:[e])}(n&&i?pt(n,i,Wa)??[]:[],a,[e]);return Ya({violationLines:t?o.filter(e=>(a[e.stableId]??[]).length>0):o,deliveryMethodType:e,proposedDeliveryLines:r,proposedMerchandiseLines:l})}function Xa(e){return"LOCAL"===e?"SHIPPING":e}function Za(){const{violations:t}=_n(Yt),{i18n:n,shop:a,checkout:l}=mn(),{shippingAddress:o}=l.negotiator.parts,s=o.fields.countryCode.value,{details:d,loading:u}=we(s),p=_(u?void 0:d?.name),h=_(u),m=_(s),v=l.negotiator.current.fields.merchandiseLines,y=Qt(),{negotiating:g,methods:f}=N(),{loading:k}=l.negotiator,I=i(y.peek()),S=i(k.peek().has("deliveryNext")),E=r(()=>{const e=k.value.has("deliveryNext"),t=S.current&&!e;return y.value?I.current=!0:t&&(I.current=!1),S.current=e,I.current}),{cartUpdated:A,setCartUpdated:M}=function(){const{checkout:{negotiator:t}}=mn(),n=e({status:"hidden"}),a=i(),l=r(()=>{const e=n.value;switch(e.status){case"hidden":return!1;case"holding":return!0;case"shown":return t.lastNegotiation.value===e.untilNegotiationAfter}});return c(()=>()=>clearTimeout(a.current),[]),{cartUpdated:l,setCartUpdated:function(){clearTimeout(a.current),n.value={status:"holding"},a.current=setTimeout(()=>{n.value={status:"shown",untilNegotiationAfter:t.lastNegotiation.peek()}},1e3)}}}(),L=e(void 0);c(()=>t.subscribe(e=>{0!==e.size&&(L.value=m.peek())}),[t,m,L]);const w=Qa({deliveryMethodType:"SHIPPING",mode:"deliveryMethodScoped"}),x=r(()=>w.value.merchandiseLines),T=r(()=>{const e=E.value,t=v.value;return e||!t||0===t.lines.length||h.value||L.value!==m.value}),O=r(()=>!T.value&&A.value),D=r(()=>!(T.value||A.value||0===t.value.size||a.shipPickupInOneOrderEnabled&&g.value&&function(e){const t=new Set(e.map(Xa));return 1===t.size?t.has("SHIPPING")||t.has("PICK_UP")||t.has("PICKUP_POINT"):2===t.size&&t.has("SHIPPING")&&t.has("PICK_UP")}(f.value))),U=r(()=>D.value&&x.value.length>0),B=r(()=>{if(!D.value||U.value)return null;const e=v.value;return e?pt(Array.from(t.value),e,Array.from(Yt)):null});return C(b,{children:[C(P,{when:O,children:C(bt,{heading:n.translate("merchandise_unavailable_in_buyer_location.cart_updated"),tone:"info"})}),C(P,{when:U,children:C($a,{bannerType:"shipping",merchandiseLines:x})}),C(P,{when:B,children:e=>C(ei,{violations:t,merchandiseWithViolations:e,countryName:p.value,onItemsRemoved:M})})]})}function ei({violations:e,merchandiseWithViolations:t,countryName:n,onItemsRemoved:a}){const{client:i,i18n:r,shop:l,source:o,observability:s,url:c,embed:d,checkout:{negotiator:u,configuration:p}}=mn(),h=u.parts.merchandiseLines,m=me(),v=Boolean(d),_=t.map(({stableId:e})=>e),y=h.value.filter(({stableId:e})=>!_.includes(e)),g=0===y.length,f=Array.from(e.value).some(({code:e})=>"MERCHANDISE_PRODUCT_NOT_PUBLISHED_IN_BUYER_LOCATION"===e)?n??r.translate("merchandise_unavailable_in_buyer_location.missing_country_fallback"):r.translate("merchandise_unavailable_in_buyer_location.indeterminate_location_fallback");let b=null;b=g&&1===t.length?r.translate("merchandise_unavailable_in_buyer_location.banner_title.all_products_one",{location_name:f}):g?r.translate("merchandise_unavailable_in_buyer_location.banner_title.all_products_other",{location_name:f}):1===t.length?r.translate("merchandise_unavailable_in_buyer_location.banner_title.some_products_one",{location_name:f}):r.translate("merchandise_unavailable_in_buyer_location.banner_title.some_products_other",{location_name:f});const k=g?null:C(yt,{children:t.map(e=>C(w,{children:e.subtitle?r.translate("merchandise_unavailable_in_buyer_location.unavailable_line_item",{product_name:e.title,variant_label:e.subtitle}):e.title},e.stableId))}),I=1===t.length?r.translate("merchandise_unavailable_in_buyer_location.remove_items_action.one"):r.translate("merchandise_unavailable_in_buyer_location.remove_items_action.other"),P=r.translate("merchandise_unavailable_in_buyer_location.empty_cart_action");const S=C(T,{children:g?!g||!v&&l.hasStorefront?r.translate("merchandise_unavailable_in_buyer_location.change_address_or_remove",{remove_action:C(ce,{onClick:function(){m("click",{element:{tagName:"a",textContent:P},section:"delivery",timestamp:new Date}),s.log("redirect_to_storefront","[UnavailableInBuyerLocationBanner] Empty cart and redirect to storefront",{allItemsUnavailable:g,redirectSuccess:l.hasStorefront}),qt({client:i,url:c,source:o,configuration:p})},children:P})}):r.translate("merchandise_unavailable_in_buyer_location.change_address_only"):r.translate("merchandise_unavailable_in_buyer_location.change_address_or_remove",{remove_action:C(ce,{onClick:function(){m("click",{element:{tagName:"a",textContent:I},section:"delivery",timestamp:new Date}),h.value=y,u.negotiate({withResultHandling:!0,onComplete:a})},children:I})})});return C(Qn,{impressionType:"unavailable_in_buyer_location",impressionFeatures:Array.from(e.value).map(({code:e})=>e),children:C(J,{heading:b,tone:"critical",children:C(W,{gap:"base",children:[k,S]})})})}function ti({selectedAddress:e,shouldAddressModalSetAsDefault:t,suppressUpdateAddressAction:n=!1}){const{checkout:{address:a,identity:i,negotiator:r},i18n:l}=mn(),o=r.parts.shippingAddress.value,{loading:s}=we(o?.countryCode),{createAddressParts:c}=r.context,u=d(e=>{c.addressModalState.value={status:"editing",address:ye(e.address,{extendedAddressMode:a.extendedAddressMode}),addressType:"shipping",addressId:e.id,setAsDefault:t?"default":"disabled"}},[a.extendedAddressMode,c.addressModalState,t]);let p;p=n?void 0:e?C(ce,{tone:"monochrome",onClick:()=>u(e),children:l.translate("shipping.address_update")}):l.translate("shipping.address_update");const h=an(_n(We)).value,m=an(_n(pe)).value,v=an(_n(U)).value,_=an(_n(X)).value,y=function({identity:e,hasMerchandiseUnavailableInBuyerLocationViolations:t,hasUnsupportedPaymentMethodViolations:n}){return"shopPay"!==e.current.value?null:t?C(Za,{}):n?C(Fa,{}):null}({identity:i,hasMerchandiseUnavailableInBuyerLocationViolations:an(_n(Yt)).value,hasUnsupportedPaymentMethodViolations:_});if(y)return y;let g=l.translate("shipping_errors.invalid_selected_address");return m&&p?g=l.translate("customer_account.incomplete_address",{update_address_link:p}):h?g=s?C(W,{children:[C(H,{inlineSize:"large"}),C(H,{inlineSize:"small"})]}):l.translate("shipping_errors.shipping_method_not_available_generic.one"):(v||Boolean(e))&&p&&(g=l.translate("shipping_errors.invalid_selected_address_with_update_link",{update_address_link:p})),C(za,{message:g})}function ni(){const{checkout:e,client:t}=mn(),n=e.addressManager.shipping.value,a=n.canCreateAddress.value||n.canUpdateAddress.value,r=n.selectedAddress.value,l=a?r:void 0,o=Boolean(l?.default),s=Boolean(r)&&!a,d=t.unstable_getSerialization("apiClientId"),u=yn(),p=i(!1),h=an(_n(We)).value,m=an(_n(qe)).value,v=Rt(d);return c(()=>{(h||m)&&v&&!p.current&&(u.notify(h?{no_delivery_strategy_available:!0}:{out_of_stock_at_origin:!0}),p.current=!0)},[h,m,v,u]),C(ti,{selectedAddress:l,shouldAddressModalSetAsDefault:o,suppressUpdateAddressAction:s})}function ai({filteredFields:e,loading:t,onAddressAutoComplete:n,showSavedAddressSelector:a=!1,availableAddresses:i,mustSelectProvidedAddress:r,children:l}){const o=sn(),{shouldGateCrossBorder:s,crossBorderGate:c}=Wn(),{checkout:d}=mn(),{deliveryMethodsAddressErrors:u}=d.negotiator.context,{shippingAddress:p}=d.negotiator.parts;return C(gn,{id:"shippingAddressForm",addressType:"shipping",address:p,countries:o,addressErrors:u,loading:t,showSavedAddressSelector:a,availableAddresses:i,mustSelectProvidedAddress:r,onAddressAutoComplete:n,onBeforeCountryChange:(e,t,n)=>{s(e)?c(t,{onCancel:n}):t()},filteredFields:e,children:l})}var ii=Qe("VatNumberFieldInfoTooltip");function ri({status:e}){const{i18n:t}=mn();return"pending"===e.type?C(re,{size:"small",accessibilityLabel:t.translate("taxes.vat_number.accessibility.status.validating")}):"resolved"===e.type&&"VALID"===e.validationStatus?C(b,{children:[C(Dt,{tone:"success",size:"small",type:"check-circle"}),C(T,{accessibilityVisibility:"exclusive",children:t.translate("taxes.vat_number.accessibility.status.valid")})]}):C(li,{})}function li(){const{i18n:e}=mn(),t=Se(void 0,ii);return C(b,{children:[C(Dt,{size:"small",type:"question-circle",interestFor:t}),C(Mt,{id:t,children:e.translate("taxes.vat_number.field.tooltip")})]})}function oi({taxId:e,applied:t,inputRef:n}){const{i18n:a}=mn(),l=function({taxId:e}){const{checkout:{negotiator:t}}=mn(),n=()=>{t.negotiate({withResultHandling:!0,identifier:Symbol.for("vat-id-validation"),force:!0}).catch(e=>{if(!(e instanceof Ft))throw e})},a=t=>{e.format.validate(t)&&n()},r=i();return r.current=()=>{null===e.validated.status&&a(e.value)},c(()=>{r.current?.()},[]),{value:e.value,status:e.status,loading:"pending"===e.status.type,onBlur:()=>{e.value===e.validated.taxId&&e.validated.status||n()},onInput:t=>{e.set(t),a(t)}}}({taxId:e}),o=function({status:e}){const{i18n:t,checkout:{negotiator:n}}=mn(),{shippingAddress:a}=n.parts,i=_(e);return r(()=>{const e=a.fields.countryCode.value?.toLowerCase(),n=i.value;return"invalid_format"===n.type&&e?{code:"invalid_format",message:t.translate("taxes.vat_number.status.invalid_format",{scope:e})}:"resolved"!==n.type?null:"INVALID"===n.validationStatus&&e?{code:"invalid_number",message:t.translate("taxes.vat_number.status.invalid_number",{scope:e})}:"SERVICE_ERROR"===n.validationStatus?{code:"service_error",message:t.translate("taxes.vat_number.status.service_error")}:"SERVICE_UNAVAILABLE"===n.validationStatus?{code:"service_unavailable",message:t.translate("taxes.vat_number.status.service_unavailable")}:null})}(l),s=r(()=>o.value&&{type:"warning",value:o.value.message}),d=e.warnings.includes("DOMESTIC_NOT_APPLICABLE");return function(e,t){const n=i(e.type),a=i(t);c(()=>{a.current=t},[t]);const r=e.type;c(()=>{const e=n.current;n.current=r,"pending"===e&&"resolved"===r&&a.current()},[r])}(l.status,()=>{if("resolved"===l.status.type&&"VALID"===l.status.validationStatus&&t)return Te({content:a.translate("taxes.vat_number.accessibility.status.applied"),role:"alert"});if(d)return Te({content:a.translate("taxes.vat_number.accessibility.status.domestic"),role:"status"});const e=o.value;if(e)switch(e.code){case"invalid_number":return Te({content:a.translate("taxes.vat_number.accessibility.status.invalid_number"),role:"alert"});case"service_error":return Te({content:a.translate("taxes.vat_number.accessibility.status.service_error"),role:"alert"});case"service_unavailable":return Te({content:a.translate("taxes.vat_number.accessibility.status.service_unavailable"),role:"alert"})}}),C(W,{direction:"block",gap:"base",children:[C("div",{"aria-busy":l.loading,children:C(on,{ref:n,name:"vatNumber",label:a.translate("taxes.vat_number.field.label"),autocomplete:"off",inputMode:"text",accessoryEnd:C(ri,{status:l.status}),error:s.value,...l})}),d&&C(bt,{tone:"info",children:a.translate("taxes.vat_number.domestic_order")})]})}function si({onClick:e,commandFor:t}){const{i18n:n,shopPay:a}=mn(),{formattedAddress:i}=Ia(),r=n.translate("local_pickup.toggle_location");return a.visibility.showPickupLocationChange.value?C($t,{variant:"plain",textDecoration:"none",inlineAlignment:"start",accessibilityLabel:i?`${r}, ${i}`:r,onClick:e,commandFor:t,children:i?C(W,{direction:"inline",gap:"small-500",alignItems:"center",children:[C(Dt,{type:"geolocation",size:"small-100"}),C(T,{children:ka(i,13)})]}):C(T,{children:r})}):null}function ci({onShowModal:e,showLocationButton:t=!0}){const{i18n:n,checkout:a}=mn(),{merchandiseLines:i}=a.negotiator.current.fields;_t({active:!0});const{fullCountryName:l,isOnlyCountryAvailable:o}=Ia(),s=ut({methods:[],selectedDeliveryMethodHandle:void 0}),c=_(l),d=r(()=>{const e=Je(i.value?.lines);return c.value?n.translate("local_pickup.pickup_unavailable_banner_title_with_country",{country:c.value,count:e}):n.translate("local_pickup.pickup_unavailable_banner_title",{count:e})});return C(W,{gap:"small",children:[t&&C(si,{onClick:()=>{e(),s(o?"checkout_pickup_geoselector_clicked_country_grain":"checkout_pickup_geoselector_clicked_other_grain")}}),C(Ea,{heading:d.value,tryDifferentLocationOnClick:()=>e(!0)})]})}var di=I({displayName:"ShopPayVerificationSwitch",load:()=>m(()=>A(()=>import("./f2ade998.UGJ_ND-7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])))});function ui({onClick:e}){const{i18n:t}=mn();return C($t,{variant:"primary",accessibilityLabel:t.translate("account_management.verification_toggle"),onClick:e,className:"gGtJc",children:C("div",{className:"rdvNk",children:C(Dt,{type:"mobile",size:"large"})})})}function pi({emailInput:e,email:t,isShopPayUnauthenticatedUser:n}){const{shopPay:r}=mn(),l=i(""),o=n?na.C1ModalShopPay:void 0,[s,u]=p(o),[h,m]=p(!1),[v,_]=p(!1),y=t.trim(),g=d((e,t)=>{t&&(l.current=t),n||_(!e),m(e)},[n,l]);return a(()=>{const e=r.session.verificationTrigger.value;e&&(g(!0),r.session.unstable_updateVerificationTrigger(null),n&&["login_link","error_modal_clear_email"].includes(e.source)&&(u(na.C1ModalShopPaySignIn),"error_modal_clear_email"===e.source&&window.dispatchEvent(new Event("shop_pay_verification_reset"))))}),c(()=>{y!==l.current&&(_(!1),m(!1))},[y,l]),c(()=>{_(!1)},[e]),{modalUrlOrigin:o,modalUpdatedOrigin:s,shopPayVerificationVisible:h,showShopPayVerificationToggle:v,showShopPayVerification:g,setModalUpdatedOrigin:u,setShowShopPayVerificationToggle:_}}var hi=Qe("EmailFieldAccessory");function mi({saved:e}){const{i18n:t}=mn(),n=Se(void 0,hi),a=t.translate("contact.field_saved_label"),[i,r]=p(!1);c(()=>{if(e)return Te({content:a,role:"status"})},[e,a]);const l=e&&!i,o={inert:l};return C("span",{className:"iWrC7",children:[C("span",{className:g(e&&"aDczq",l&&"jUk6e"),onFocus:()=>r(!0),onBlur:()=>r(!1),...o,children:C(Dt,{type:"question",interestFor:n,accessibilityLabel:t.translate("contact.field_tooltip_accessibility_label")})}),e?C("span",{className:"oMR3v","aria-hidden":!0,children:C(T,{type:"small",tone:"neutral",children:a})}):null,C(Mt,{id:n,children:t.translate("contact.field_tooltip_helper_text")})]})}function vi(e){return(e??"").trim().toLowerCase()}var _i="contact-information-text-field-container",yi=`#${_i}`;function gi({onInputTypeChange:t,onInlineEmailValidation:n,onInlinePhoneValidation:l}){const o=q(),{inMemoryPayPalParts:{accountStatus:d}}=ft(),{i18n:u,observability:h,shop:m,shopPay:_,checkout:y,source:g}=mn(),f=_.user.isUnauthenticatedUser.value,b=Bt(),k=wn(),{email:I,phone:S,smsMarketingPhone:E}=y.negotiator.parts,A=I.value,M=S.value,L=jt(m,k.value),w=L.includes("PHONE"),N=b.value||f,x=N||!w,[T,O]=p(I.peek()??""),[D,U]=p(x||""===S.peek()||""!==I.peek()&&I.peek()?"EMAIL":"PHONE"),[B,R]=p(0),V=u.translate("contact.email_or_phone_label"),H=u.translate("field_errors.email_or_phone_invalid"),z=function(t,n,a="PHONE"){const{observability:i,checkout:{validation:{contactErrors:{phoneInputError:r,emailInputError:l}},wallets:o,negotiator:s}}=mn(),{phone:c}=s.parts,d=o.activeSession.value;Zt(e=>{if("EMAIL"!==a&&"error"===e.type)for(const t of e.violations)if("UnprocessableTermViolation"===t.__typename&&F.has(t.code)&&!pn(t.target))if("BUYER_IDENTITY_EMAIL_REQUIRED"===t.code){const e=t.localizedMessage??t.nonLocalizedMessage;r.value=e}else{const e=n||(t.localizedMessage??t.nonLocalizedMessage);r.value=e,l.value=void 0}});const u=e(void 0),p=d?u:r;return nt({field:"contactInfo",valueSignal:c,errorSignal:p,validate:e=>{if("EMAIL"!==a)return i.leaveErrorBreadcrumb("[useValidatedPhoneField] Validating phone number"),t(e);i.leaveErrorBreadcrumb("[useValidatedPhoneField] Skipping phone validation - input type is EMAIL")},reason:Pt.InvalidContactMethod,shouldSkip:()=>Boolean(o.activeSession.value)}),Ht(c,p,"PHONE"===a?t:void 0)}(l,H,D),j=""===T&&!A,K="IN"===k.value&&!x&&j?"tel":"email";function G(e,t){if("EMAIL"===D&&(O(e),f&&ee(na.C1ModalShopPay)),!x)if(null!=t&&R(t),""===e)U("EMAIL"),s(()=>{S.value="",I.value="","PHONE"===D&&(E.value="")}),h?.leaveErrorBreadcrumb("[ContactInformation] Input type reset to EMAIL (both fields empty)");else{const t=fi(e);t&&"EMAIL"!==D?(h.leaveErrorBreadcrumb("[ContactInformation] Input type changed to EMAIL"),s(()=>{S.value="",I.value=e,E.value=""}),U("EMAIL")):t||"PHONE"===D||(h.leaveErrorBreadcrumb("[ContactInformation] Input type changed to PHONE"),I.value="",S.value=e,U("PHONE"))}}c(()=>{h.leaveErrorBreadcrumb("[ContactInformation] Component mounted")},[h]),c(()=>{t&&t(D)},[t,D]),c(function(){if(x)return void("EMAIL"!==D&&U("EMAIL"));const e=null!=A&&""!==A,t=null!=M&&""!==M;return e||t||"EMAIL"===D?e&&"EMAIL"!==D?(h.leaveErrorBreadcrumb("[ContactInformation] Input type synced to EMAIL from proposed contact info"),void U("EMAIL")):void(!e&&t&&"PHONE"!==D&&(h.leaveErrorBreadcrumb("[ContactInformation] Input type synced to PHONE from proposed contact info"),U("PHONE"))):(h.leaveErrorBreadcrumb("[ContactInformation] Input type reset to EMAIL from empty proposed contact info"),void U("EMAIL"))},[A,D,h,x,M]);const $=i(!0);c(function(){const e=$.current;$.current=!1,w&&!f||(e?N||""!==A||""===M||(S.value=""):"EMAIL"!==D&&(U("EMAIL"),""===A&&""!==M&&(S.value="",I.value=M)))},[L]),nn(async({reason:e,parts:t})=>"progression"!==e?{behavior:"allow"}:{behavior:"allow",perform(){const e=t.phone.peek();""!==e&&t.deliveryLines.peek().forEach(t=>{const n=t.peek();t.value={...n,deliveryMethodOptions:{...n.deliveryMethodOptions,phone:e}}})}},{checkIdentity:"contactInfo"});const Y=In(),{modalUrlOrigin:W,modalUpdatedOrigin:Q,shopPayVerificationVisible:J,showShopPayVerificationToggle:X,showShopPayVerification:Z,setModalUpdatedOrigin:ee,setShowShopPayVerificationToggle:te}=pi({emailInput:T,email:I.value,isShopPayUnauthenticatedUser:f}),ne=i(null),ae=function(t,n,a="EMAIL"){const{i18n:i,checkout:{validation:{contactErrors:{emailInputError:r,phoneInputError:l}},wallets:o,negotiator:s},observability:c}=mn(),{email:d}=s.parts,{inMemoryApplePayParts:{asPaymentMethod:u,isLoadingPaymentSheet:p},inMemoryPayPalParts:{isLoadingPaymentSheet:h}}=ft();Zt(e=>{if("PHONE"!==a)if("error"===e.type)if(!o.activeSession.value||u.value)if("negotiation"!==e.negotiationStage||p.value||h.value){c.leaveErrorBreadcrumb(`[ContactInformation] Processing ${e.violations.length} violations`);for(const n of e.violations){if("UnprocessableTermViolation"!==n.__typename||!F.has(n.code)||pn(n.target))continue;const e=t||(n.localizedMessage??n.nonLocalizedMessage);r.value=e,l.value=void 0}}else c.leaveErrorBreadcrumb("[ContactInformation] Journey listener skipped - negotiation stage without wallet validation");else c.leaveErrorBreadcrumb("[ContactInformation] Journey listener skipped - wallet active without Apple Pay");else c.leaveErrorBreadcrumb(`[ContactInformation] Journey listener skipped - event type: ${e.type}`);else c.leaveErrorBreadcrumb("[ContactInformation] Journey listener skipped - input type is PHONE")});const m=e(void 0),v=o.activeSession.value?m:r;return nt({field:"contactInfo",valueSignal:d,errorSignal:v,validate:e=>{if(n)return c.leaveErrorBreadcrumb("[ContactInformation] Using custom email validation"),n(e);c.leaveErrorBreadcrumb("[ContactInformation] Using default email validation");const t=ca(e,i.translate("field_errors.email_blank")),a=sa(e,i.translate("field_errors.email_invalid"));return t||a},reason:Pt.InvalidContactMethod,shouldSkip:()=>Boolean(o.activeSession.value)}),Ht(d,v,"EMAIL"===a?n:void 0)}(x?void 0:H,"PHONE"===D?bi:n,D),ie=r(()=>y.negotiator.current.fields.contactInfo.value?.email),le=function(t,n){const a=v(()=>vi(t),[t]),r=v(()=>vi(n),[n]),l=e(!1),o=i(""!==a&&r===a);return c(()=>{const e=""!==a&&r===a,t=e&&!o.current;if(o.current=e,!e)return void(l.value=!1);if(!t)return;l.value=!0;const n=setTimeout(()=>{l.value=!1},2e3);return()=>clearTimeout(n)},[l,a,r]),l.value}(A??"",ie.value),oe=Y.value&&X?C(ui,{onClick:()=>{Z(!0),f&&ee(na.C1ModalShopPay)}}):void 0,se=oe??(g.isAbandonedCheckoutSupported&&"EMAIL"===D?C(mi,{saved:le}):void 0),ce=Nn({countryCode:k.value??"",label:V,onInputValueChange:G,caretPosition:B,inputMode:"text",disableFormatting:!0,required:!0,...z,accessoryEnd:oe}),de=()=>!I.value&&S.value?"PHONE":"EMAIL",ue={...ce,onChange:e=>{fi(e)?G(e.trim()):ce.onChange?.(e)},onBlur:()=>{"PHONE"===de()&&ce.onBlur?.()}},pe=x?void 0:{label:V,type:"text",caretPosition:B,inputMode:"text",onChange:e=>{fi(e)?ae.onChange(e):G(e.trim())},onBlur:()=>{"EMAIL"===de()&&ae.onBlur()}},he=function({ref:e,email:t,addressType:n="shipping",contactAutocompleteType:i="email",disabled:r,label:l,onInputValueChange:o,onChange:s,onBlur:d,caretPosition:u,inputMode:p,type:h="email",required:m,accessory:v}){const{i18n:_,shopPay:y}=mn();return c(()=>{if(void 0!==u&&e.current&&t?.value&&u{"consent-tracking-api"===n.consentProvider&&"invalid"!==sa(i.value,"invalid")&&t.cookies.get("_shopify_cmp")&&n.setTrackingConsent({email:i.value})})}(),{label:l??_.translate("contact.email_label"),id:"email",name:"email",type:h,ref:e,autocomplete:dt([n,i]),disabled:r,inputMode:p,...t,onChange:s??t.onChange,onBlur:d??t.onBlur,onInput:async n=>{const a=n.trim();t.onInput(a),o?.(a,function(e){try{return e?.selectionStart}catch{}}(e.current)??0)},error:t.error,autoCapitalize:"text"===h?"off":void 0,accessoryEnd:"loading"===y.userVerification.value.status?C(re,{size:"small"}):v,required:m}}({email:ae,ref:ne,addressType:y.isShippingRequired.value?"shipping":"billing",disabled:"loading"===d.value.status,required:!0,accessory:se,contactAutocompleteType:K,...pe,onInputValueChange:G}),me="PHONE"===D?ue:he,ve=Y.value?C(P,{when:o,children:C(di,{popoverActivator:ne,popoverAnchorSelector:yi,email:T,onSetEmail:e=>{ae.onInput(e),G(e),ae.onChange(e)},open:J,showPopover:Z,showToggle:te,urlOrigin:W,updatedOrigin:Q})}):null,_e=C(Ke,{id:_i,children:C(on,{...me,id:"PHONE"===D?"phone":"email"})});return C("div",{children:[_e,ve]})}function fi(e){return/([A-Za-z]|\.|@)/.test(e)}function bi(){}function ki({showLogoutLink:e,logoutUrl:t}){const{i18n:n,shopPay:a,observability:i,source:r,checkout:{negotiator:l}}=mn(),o=l.current.fields.buyerIdentity.value,{firstName:s,lastName:d,email:u,phone:p}=o?.customerProfile??{},h=o?.purchasingCompany?.company.name,m=In(),v="simulated"===r.type,_=s||d,{phone:y}=l.parts,g=u??p,f=!h&&g?` (${g})`:"",{modalUrlOrigin:k,modalUpdatedOrigin:I,shopPayVerificationVisible:P,showShopPayVerification:S}=pi({isShopPayUnauthenticatedUser:a.user.isUnauthenticatedUser.value,email:u||""});return c(()=>{i.leaveErrorBreadcrumb(`[CustomerCard] Rendered - hasEmail: ${Boolean(u)}, hasPhone: ${Boolean(p)}`),o?.purchasingCompany||(y.value="")},[]),C(b,{children:[C(W,{direction:"inline",alignItems:"center",gap:"base",children:C(W,{gap:"small-400",children:[C(T,{children:_?`${n.translate("general.display_name",{firstName:s??"",lastName:d??""})}${f}`:f}),h?C(W,{direction:"inline",gap:"small-400",children:[C(T,{color:"subdued",type:"small",children:h}),u&&C(b,{children:[C(T,{color:"subdued",type:"small",children:"•"}),C(T,{color:"subdued",type:"small",children:u})]})]}):null,e&&!v?C(W,{direction:"inline",gap:"base",children:C(ce,{href:t,children:n.translate("customer_account.sign_out_link_label")})}):null]})}),u&&m.value&&C(di,{email:u,open:P,showPopover:S,urlOrigin:k,updatedOrigin:I})]})}function Ii(){const{i18n:e}=mn();return C(T,{color:"subdued",size:"small",accessibilityLive:"polite",children:e.translate("marketing.sms.disclaimer.description_transactional_html",{privacy_policy_modal_link:C(oa,{handle:"privacy-policy",tone:"monochrome"}),terms_of_service_modal_link:C(oa,{handle:"terms-of-service",tone:"monochrome"})})})}function Pi({hideAllOptIns:e=!1,hideContactInfoEntry:t=!1,hideCustomerCard:n=!1,showEmailMarketingOptIn:a=!0,onValidateEmailInput:i}){const{client:l,checkout:o,i18n:s,checkout:{validation:{contactErrors:{emailInputError:c,phoneInputError:u}},wallets:h},shop:m}=mn(),_=o.negotiator.current.fields.buyerIdentity,y=r(()=>Boolean(_.value?.customerProfile)),g=Et().value,f=!1===Ut()?.smsMarketingEnabled,{emailMarketing:k,contactInfoOptions:I}=m,S=l.unstable_getSerialization("logoutUrl")||"",E=aa(),A=r(()=>E.value.isContact),{showEmailMarketing:M}=o.configuration.visibility,L=m.hasFlagEnabled(De),{value:w}=r(()=>_.value?.countryCode),[N,x]=p(()=>a&&Si({emailMarketing:k,inputType:"EMAIL",hideNonEuropeMarketingOptInFlagEnabled:L,buyerCountryCode:w,customerProfile:_.peek()?.customerProfile,showEmailMarketing:M})),[T,O]=p(!1),D=wn(),{validatePhoneNumber:U}=xn(),B=d(e=>{x(a&&Si({emailMarketing:k,inputType:e,hideNonEuropeMarketingOptInFlagEnabled:L,buyerCountryCode:w,showEmailMarketing:M})),O(!1)},[k,L,w,a,M]),R=function(){const{i18n:e,shop:t,shopPay:n,checkout:{negotiator:a}}=mn(),{shippingAddress:i}=a.parts,l=Bt();return r(()=>{const a=i.fields.countryCode.value,r=(a&&t.countrySpecific[a]?.contactInfoOptions)??t.contactInfoOptions;return l.value||n.user.isUnauthenticatedUser.value||!r.includes("PHONE")?e.translate("field_errors.email_blank"):e.translate("field_errors.email_or_phone_blank")})}(),V=d(e=>{const t=ca(e,R.value),n=sa(e,s.translate("field_errors.email_invalid"));return t||n||i?.(e)},[R,i,s]),H=d(e=>{const t=ca(e,s.translate("field_errors.email_or_phone_blank"));if(t)return O(!t),t;const n=U(e,D.value??"ZZ")?void 0:s.translate("field_errors.address_phone_blank");return O(!n),n},[s,U,D]),z=me(),F=zt(),j=d(({contact:e})=>{h.activeSession.value||o.negotiator.negotiate({withResultHandling:!0,silenceViolations:["all"],fieldsToResolve:[...wt]}),e.value=!0,z("sectionComplete",{section:"contact",timestamp:new Date}),F({type:"section_complete",section:"contact"})},[h,o,z,F]),K=d(({contact:e})=>{e.value=!1},[]),{email:q,phone:G}=o.negotiator.parts,$=v(()=>({state:{phone:G,email:q},errors:{phone:u,email:c}}),[q,c,G,u]),Y=Bt(),W=m.hasFlagEnabled(hn),Q=r(()=>{const e=_.value?.customerProfile,t=W?jt(m,D.value):I,n=Y.value||!t.includes("PHONE");return!e?.email&&!e?.phone||n&&!e?.email});return C($n,{children:C(Fe,{target:"cart.buyerIdentity",children:[!n&&C(P,{when:y,children:C(ki,{showLogoutLink:g,logoutUrl:S})}),!t&&C(P,{when:Q,children:C(ee,{...$,children:C(bn,{onValid:j,onInvalid:K,children:C(gi,{onInputTypeChange:B,onInlineEmailValidation:V,onInlinePhoneValidation:H})})})}),!e&&C(b,{children:[T&&!f?C(Ii,{}):null,a&&N?C(ia,{}):null,C(P,{when:A,children:C(ra,{})})]})]})})}function Si(e){const{emailMarketing:t,inputType:n,hideNonEuropeMarketingOptInFlagEnabled:a,buyerCountryCode:i,customerProfile:r,showEmailMarketing:l}=e,o=a&&!ve(i);return l&&"OFF"!==t&&"EMAIL"===n&&!o&&!r?.acceptsEmailMarketing}ki.displayName="CustomerCard";var Ci={shop:"shop",shopPay:"shop_pay"},Ei={ShopPayButton:{shop:"The Shop Pay button showed the Shop brand.",shopPay:"The Shop Pay button showed the Shop Pay brand."},VaultedContact:{shop:"The signed-in contact header showed the Shop brand.",shopPay:"The signed-in contact header showed the Shop Pay brand."}};function Ai(e,t){const{userEvents:n}=mn(),{value:a}=n.trekkie.defaultAttributes,r=te(),l=vn(),o=i(!1);c(()=>{if(o.current||!l)return;const{uniqToken:i,shopId:s}=a??{},c=r?.trackingUnique??i;if(!c||!s)return;o.current=!0;const d=function(){const e=Date.now();return Number.isSafeInteger(e)&&e>=1e12&&e<1e13?e:void 0}(),u={schemaId:"measure_unified_telemetry_merchant_owned_pii/1.0",payload:{eventType:"experiment_exposure",handle:"e_shop_pay_brand_e2e",subjectType:"storefront_user",subjectId:c,shopId:s,assignmentSource:"exposure",assignedVariant:l,sourceApp:"checkout-web",sdkRuntime:"browser",salt:"",...void 0===d?{}:{eventTimestamp:d},context:JSON.stringify({component:t,location:"checkout",brand_shown:Ci[e],treatment_description:Ei[t][e]})}};n.monorailEvent(u)},[n,a,r,l,e,t])}function Mi(){const{i18n:e}=mn();return C(Ce,{open:!0,blocking:!0,accessibilityLabel:e.translate("wallets.payment_in_progress_title"),padding:"none",children:C(W,{gap:"large-200",padding:"large-200",children:[C(B,{level:1,children:e.translate("wallets.payment_in_progress_title")}),C(T,{children:e.translate("wallets.payment_in_progress_body")})]})})}var Li="HLgiC",wi="CadfY",Ni="dh6Bn",xi="OJyan",Ti="express-checkout-heading";function Oi({buttonCount:e,footer:t,children:n}){const{i18n:a}=mn();return C(Ke,{className:"w6E2R","data-count":e,children:[C("div",{className:"tPTN8",children:C(Cn,{id:Ti,className:"RoJLo",children:a.translate("alternative_payment_method_banner.express_checkout")})}),C("div",{className:"YhqNG",children:[C("div",{className:"A1Wkk",children:n}),t]})]})}function Di({count:e,transition:t,shopPayEmphasis:n=!1,hideWallets:a=!1}){const{client:i}=mn(),r="fast"!==i.unstable_getSerialization("workerVersion");return C("div",{className:g(Li,"kBVYM","exited"===t&&"ZjhHK",n&&wi,a&&Ni),children:[...Array(e).keys()].map(e=>C(be,{delay:r},e))})}function Ui(e,t,n){return{walletName:t,isRendered:()=>"rendered"===e.value?.status,isLoading:()=>"not_rendered"===e.value?.status&&(n?.()??!0),onTimeout:()=>{e.value={status:"error"}}}}function Bi({buttonCount:e,children:t,walletPaymentMethods:n,marketsProDisclaimer:l}){const[o,s]=p(performance.now()),[u,h]=p(!0),m=function(){const{client:e,embed:t}=mn(),n=void 0!==t&&("SWIFT"===t.platform||"REACT_NATIVE_SWIFT"===t.platform);return function({browser:e,checkoutIntegration:t,deviceFamily:n,hasMetaWebViewMarker:a,isWebKit:i,os:r}){const l="iphone"===n||"ipad"===n||"ipod"===n;return!(l&&i&&!e.hasSafariProduct&&!a||(l||"Mac OS"===r)&&null!==t)}(e.userAgentDetails)&&!n}(),y=q(),{inMemoryApplePayParts:{paymentSheetError:f}}=ft(),k=function(){const{source:e}=mn(),t=function(){const e=ft();return r(()=>Ne.some(t=>function(e,t){const n=Boolean(e.acceleratedWalletPaymentMethods.value.find(e=>e.name===t)),a=(()=>{switch(t){case"APPLE_PAY":{const{buttonStatus:t,sessionLoadFailed:n}=e.inMemoryApplePayParts;return n.value?void 0:t.value}case"PAYPAL_EXPRESS":return e.inMemoryPayPalParts.acceleratedCheckoutButtonStatus.value;case"VENMO":return e.inMemoryVenmoParts.buttonStatus.value;case"GOOGLE_PAY":return e.inMemoryGooglePayParts.buttonStatus.value;case Xe.AmazonPay:return e.inMemoryAmazonPayParts.buttonStatus.value;case Xe.BuyWithPrime:return e.inMemoryAmazonPayParts.buyWithPrimeButtonStatus.value;default:return}})();return n&&"not_rendered"===a?.status}(e,t)))}(),n="simulated"===e.type;return r(()=>!n&&t.value)}().value,I=function(){const{source:e}=mn(),t="simulated"===e.type,{inMemoryApplePayParts:{buttonStatus:n,sessionLoadFailed:a},inMemoryPayPalParts:{acceleratedCheckoutButtonStatus:i},inMemoryVenmoParts:{buttonStatus:r},inMemoryGooglePayParts:{buttonStatus:l},inMemoryAmazonPayParts:{buttonStatus:o,buyWithPrimeButtonStatus:s},inMemoryShopPayParts:{buttonStatus:c},acceleratedWalletPaymentMethods:d}=ft(),u=d.value;return v(()=>u.flatMap(e=>{switch(e.name){case"PAYPAL_EXPRESS":return Ui(i,Dn.PayPalV6);case"VENMO":return Ui(r,Dn.Venmo);case"GOOGLE_PAY":return Ui(l,Dn.GooglePay);case"SHOP_PAY":return Ui(c,Dn.ShopifyPay);case Xe.AmazonPay:return Ui(o,Xe.AmazonPay);case Xe.BuyWithPrime:return Ui(s,Xe.BuyWithPrime);case"APPLE_PAY":return Ui(n,Dn.ApplePay,()=>!t&&!a.value);default:return[]}}),[n,a,u,o,s,l,t,i,c,r])}();zn(I),function(e){const{observability:t}=mn(),n=i(performance.now()),r=v(()=>e.filter(({walletName:e})=>e!==Dn.ShopifyPay),[e]),l=i(new Set),o=_(r);a(()=>{o.value.forEach(e=>{e.isRendered()&&!l.current.has(e.walletName)&&(l.current.add(e.walletName),t.histogram({name:"wallet_express_button_ready_time",value:performance.now()-n.current,unit:"ms",attributes:{wallet_name:e.walletName,isPaymentMethodFlow:!1}}))})})}(I);const S=rt(k,"base"),[E,A]=p(!1),M=Bt(),{checkout:L,i18n:w,shop:{id:N},source:x,observability:O,userEvents:U}=mn(),B=D(),R=r(()=>y.value&&"full_express_agreement"===Kt({hasSubscription:Re({checkout:L}),isApplePayAvailable:n.value.some(({name:e})=>"APPLE_PAY"===e),variant:B})),V=Rn();On(n.value,e);const H=d((t,a)=>{const i=parseInt(ae(N),10),r=Bn({state:a,shopId:i,nascarData:{...t,walletsRenderedCount:e},paymentMethods:n.value});r&&U.monorailEvent(r)},[N,U,e,n]),z=n.value.some(e=>"SHOP_PAY"===e.name)&&m;k||E||(A(!0),s(e=>performance.now()-e)),c(()=>{E&&O.histogram({name:"wallets_container_render_time",value:o})},[E,O,o]);const F=i(!1);return c(()=>{"simulated"===x.type||"exited"!==S||F.current||(F.current=!0,performance.mark(Ae))},[x,S]),C(b,{children:[C(Oi,{buttonCount:e,footer:C(b,{children:[C("div",{className:"IEPHt",children:C(ce,{accessibilityLive:"polite",textDecoration:"none",onClick:()=>{u?(h(!1),H(V.value,Un.NascarDrawerOpen)):(h(!0),H(V.value,Un.NascarDrawerClose))},children:C("div",{className:"_4LY5i",children:[C(T,{children:u?w.translate("alternative_payment_method_banner.show_more_options"):w.translate("alternative_payment_method_banner.hide_more_options")}),C(Dt,{type:u?"chevron-down":"chevron-up",size:"small-200"})]})})}),C(P,{when:M,children:C(jn,{isForExpressCheckout:!0,showFullSubscriptionConsent:R})}),l]}),children:[C(Di,{count:Math.min(e,4),transition:S,shopPayEmphasis:z,hideWallets:u}),C("ul",{id:"express-checkout-wallets-wrapper",role:"list",className:g(Li,"_4AHGX",k&&"_9JQua",k&&E&&"UeL5i",u&&Ni,z&&wi),children:y.value&&t})]}),"payment_cancelled_while_processing"===f?.value?.type&&C(Mi,{})]})}function Ri(){const{i18n:e,checkout:t}=mn(),{divider:{borderStyle:n,borderWidth:a}}=mt(),{divider:{borderStyle:i=n,borderWidth:r=a}={},section:l,spacing:o}=en(t).main.value,s=Me(l);return C(Ke,{padding:s?`@media (inline-size >= extraSmall) ${o?dn(o):"large-200"} none, ${o?dn(o):"base"} none`:"large-100 none large-300 none",children:C(St,{borderStyle:i,borderWidth:ie(r),children:C($e,{textAlign:"center",children:C(T,{color:"subdued",children:e.translate("alternative_payment_method_banner.or")})})})})}var Vi=I({displayName:"PortableWalletsPCIButtonContent",load:()=>A(()=>import("./56bd1136.BecRgXgY.js").then(e=>e.PortableWalletsPCIButtonContent),__vite__mapDeps([40,1,4,2,3,5,6,7,41,11,12,42,43,44,45,46,47,48,49,50,51,52,53,54])),useError:kn});function Hi(e){const t=q();return C(P,{when:t,children:C(Vi,{...e})})}function zi(){const{observability:e,checkout:{wallets:t}}=mn(),n=st();Ai(n,"ShopPayButton");const a=Vn(Dn.ShopifyPay),i=Tn(At.DirectCheckoutCheckout),r=Ye(),l=Sn(Dn.ShopifyPay),{setEditorShopPay:o}=la();c(()=>{e.counter({name:"checkout_wallet_button_rendered",value:1,attributes:{wallet_name:"SHOP_PAY",status:"success"}})},[e]);const s=d(()=>{a(Un.Success),l(),t.setActiveSession({newValue:"SHOP_PAY",asPaymentMethod:!1}),t.clearActiveSession({invokingWallet:"SHOP_PAY"})},[t,l,a]),u=d(e=>{const t=o.value;if(t)return e.preventDefault(),void t(!0);s()},[s,o]),p=g("Xicuw",Pn.borderRadius,ge({focusRing:"base"}));return C("a",{id:"shop-pay-button",href:i.value,ref:r("shop_pay"),className:p,onClick:u,children:C("shop"===n?va:da,{size:"medium"})})}function Fi({method:e,triggerProgression:t}){const n=x(),a=Lt();switch(e.name){case"APPLE_PAY":return C(a?Kn:Fn,{supportedNetworks:e.supportedNetworks,color:n});case"PAYPAL_EXPRESS":return C(qn,{progressToNextPage:t});case"VENMO":return C(qn,{fundingSource:"venmo",progressToNextPage:t});case"SHOP_PAY":return C(zi,{});case"GOOGLE_PAY":return C(ha,{});case Xe.AmazonPay:return C(fn,{});case Xe.BuyWithPrime:return C(Hi,{wallet:Xe.BuyWithPrime});default:return null}}function ji(){return C(b,{children:[C(Oe,{accessibilityLabelledBy:Ti,children:C(Oi,{buttonCount:3,children:C(Di,{count:3,shopPayEmphasis:!0})})}),C(Ri,{})]})}var Ki=e=>e,qi=h(function(){const{checkout:e,i18n:t,source:n}=mn(),a="simulated"===n.type,{acceleratedWalletPaymentMethods:i,buttonCount:r}=ft(),l=at(),o=ln(),s=pa(),{setEditorShopPay:c}=la(),{button:{cornerRadius:d}={}}=en(e).expressCheckout.value,u=Ot("Checkout::Dynamic::Render","WALLETS1"),p=Ze(),h=a&&p.value&&!i.value.length;if("hidden"===o.value)return null;const m=C("li",{className:xi,children:C(Ke,{padding:"large-200",borderRadius:"base",blockAlignment:"center",inlineAlignment:"center",minInlineSize:"100%",className:"gGrs5",children:C(T,{color:"subdued",children:t.translate("payment.simulated_express_checkout")})})}),v="skeleton"===o.value?C(ji,{}):C("div",{style:{...$i(d)},children:[C(Oe,{accessibilityLabelledBy:Ti,children:C(Xt,{sectionId:"expressCheckout",children:C(R,{section:"expressCheckout",children:[C(Nt,{customizations:u,gap:"large-200",render:Ki}),u.length>0&&C(tt,{blockSize:"large-200"}),C(Bi,{buttonCount:h?1:r.value,walletPaymentMethods:i,marketsProDisclaimer:C(P,{when:()=>"expressCheckout"===s.value,children:C(W,{gap:"base",padding:"large-100 none none none",children:C(ma,{textProps:{color:"subdued",size:"small"}})})}),children:h?m:C(Gi,{paymentMethods:i.value,triggerProgression:l.value,isSimulated:a,preserveShopPay:Boolean(c.value)})})]})})}),C(Ri,{})]});return C(ea,{condition:e.configuration.layout.isOnePage,target:"expressCheckout",children:v})});function Gi({paymentMethods:e,triggerProgression:t,isSimulated:n,preserveShopPay:a}){const i=x(),r=ua();return C(b,{children:e.map(e=>{if(n&&"VENMO"===e.name)return null;const l=n&&"SHOP_PAY"===e.name&&a;return C("li",{className:xi,children:n&&!l?C(Ke,{className:"yA3dF",children:C(Ke,{className:g([Li,"BgOSj"]),inert:!0,children:C(Fi,{method:e,triggerProgression:t})})}):C(Fi,{method:e,triggerProgression:t})},`${e.name}-${i}-${r.value}`)})})}function $i(e){return e&&{"--x-express-checkout-button-border-radius":vt(kt.borderRadius)(e)}}function Yi({name:e,variant:t="content",children:n}){return l(()=>A(()=>Promise.resolve({}),__vite__mapDeps([55]))),C("div",{className:`delivery-transition-${t}`,style:{"--delivery-view-transition-name":e||void 0},children:n})}function Wi(){const{i18n:t,checkout:n}=mn(),a=n.negotiator.current.fields.buyerIdentity,i=n.negotiator.parts.rememberMe,l=n.negotiator.parts.shippingAddress,o=ot(),s=e(Boolean(a.peek()?.rememberMe)||i.peek()),c=Ut(),u=_(c?.saveShippingAddressCheckboxEnabled??!0),p=r(()=>!o.value&&u.value&&!a.value?.customerProfile&&!l.value.oneTimeUse),h=d(e=>{s.value=e,i.value=e,n.negotiator.negotiate({withResultHandling:!0,silenceViolations:["payment-session"]})},[n.negotiator,i,s]);return C(P,{when:p,children:C(le,{id:"save_shipping_information",name:"save_shipping_information",checked:s.value,onChange:h,label:t.translate("customer_account.save_my_information_label")})})}var Qi="split-delivery-merchandise-modal";function Ji(e,t){let n;for(const a of t){const t=e[a];if(!t)return[];n=n?n.filter(e=>t.includes(e)):[...t]}return n??[]}function Xi(e){return e.filter(e=>e.requiresShipping)}function Zi(e){return new Set(e.map(e=>e.digest)).size}function er(e){return function(e){return e.filter(e=>e.requiresShipping).reduce((e,t)=>e+t.quantity,0)}(e.filter(L).flatMap(e=>e.lineComponents.length>0?e.lineComponents:[e]))}function tr({targetMerchandiseLines:e,merchandiseLines:t}){const n=Y(e);return{targetMerchandiseQuantity:n,isAllItems:n===er(t)}}function nr(e){const{checkout:{negotiator:t}}=mn(),{deliveryLines:n}=t.parts,a=_(e),i=Qa({mode:"localPickup"});return r(()=>{const e=function(e,t){return"PICK_UP"===t?function(e){return Xi($(e))}(e):function(e){return Xi(oe(e))}(e)}(n.value,a.value);if("PICK_UP"!==a.value)return e;const t=new Set(i.value.merchandiseLines.map(({stableId:e})=>e));return e.filter(({stableId:e})=>!t.has(e))})}function ar(){const e=nr("PICK_UP"),t=nr("SHIPPING");return r(()=>function(e,t){return Zi(e)+Zi(t)}(e.value,t.value)>=6)}var ir=Qe("PickupUnavailableTooltip");function rr({merchandiseStableIds:e,productTitle:t}){const{i18n:n}=mn(),a=Se(void 0,ir),i=Le(),l=_(e),o=r(()=>{const e=Ji(i.value.deliveryMethodsByMerchandise,l.value);return 1===e.length&&"SHIPPING"===e[0]});return C(P,{when:o,children:C(b,{children:[C(Dt,{type:"alert-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:t})}),C(Mt,{id:a,children:n.translate("stock.unavailable_at_pickup_location_label")})]})})}var lr="split-delivery-method-menu";function or(e,t){return`${lr}-${encodeURIComponent(e)}-${t}`}function sr(e,t){if(0!==e)return t>=0?t:0}function cr({activeIndex:e,isOpen:t,menuOptionsLength:n,selectedOptionIndex:a,wasOpenRef:i}){return c(()=>t?i.current?void(void 0!==e.value&&e.value>=n&&(e.value=0===n?void 0:n-1)):(void 0===e.value&&(e.value=sr(n,a)),void(i.current=!0)):(e.value=void 0,void(i.current=!1)),[e,t,n,a,i]),c(()=>()=>{e.value=void 0,i.current=!1},[e,i]),null}function dr(e){requestAnimationFrame(()=>{Te({content:e,role:"status"})})}var ur={surface:"SURFACE_SPLIT_DELIVERY_MERCHANDISE_MENU"};function pr({merchandiseStableIds:t,onMoveMerchandise:n,onRemoveMerchandise:a,selectedDeliveryMethodType:l,productTitle:o}){const s=S(),{i18n:c}=mn(),d=Le(),u=O(ur),p=Va(ur),h=_(n??u),m=_(a??p),v=_(ht().hideOverlay),y=i(null),g=i(!1),[k]=t,I=or(k,s),E=function(e,t){return`${or(e,t)}-trigger`}(k,s),A=function(e){const t=xt(e);return"command"===t?.type&&"overlay"===t.kind&&t.active}(I),M=_(A),L=e(void 0),w=_(l),N=_(o),x=_(t),D=r(()=>{const e={SHIPPING:{labe