PageSourceSearch

https://superga.co.za/cdn/shopifycloud/checkout-web/assets/c1/page-ThankYou.BLPPKhm2.js

js superga.co.za collected 2026-09-26 20:39:33 UTC 146,641 bytes, 2 lines download raw bytes

1import{k as oe,u as e,S as O,A as j,h as F,e as ee,T as ce,y as vn,q as $,f as T,g as B,_ as zn,ai as Za,o as ze,j as Yn,l as _e,i as E,s as nn,D as Xa,av as Ja,X as Lt,x as xt,W as qn,aB as er,L as nr,Y as tr,Z as ar,n as $n,p as rr}from"./esnext-vendor.B9Da21W6.js";import{eB as W,j as de,k as _,I as re,l as k,cn as ir,N as or,G as U,a8 as Dt,cL as sr,P as w,m as A,Y as z,cs as Sn,gF as lr,n as sn,o as Nt,ad as cr,a5 as Ee,L as ye,B as D,a6 as Tn,dC as ur,d4 as Ot,cv as ln,ah as xe,cj as qe,W as Pn,az as dr,ej as Bt,hG as pr,hH as Ft,hI as hr,b$ as mr,Z as $e,b as _r,bE as yr,p as ke,U as Je,hJ as Ne,fR as Ut,hK as De,ak as In,z as wn,hL as Ke,hM as je,hN as Qe,hO as gr,gA as fr,hP as br,hQ as vr,hR as kr,hS as Cr,hT as Sr,F as En,aW as Tr,bu as Pr,a_ as Ir,H as wr,ew as Ht,hU as Er,u as zt,X as kn,i as Yt,a as Mr,bo as Rr,S as Ar,hV as cn,co as qt,hW as Lr,hX as xr,dE as Dr,K as Nr,M as Or,ax as Br,ay as Fr,hY as Ur,ey as Hr,ch as zr,bh as Yr,hZ as qr,h_ as $r}from"./hydrate.DZ4YTm7p.js";import{H as Ye,S as v,a4 as N,ah as ue,jm as Wr,jn as Mn,bG as $t,ep as Rn,b1 as Vr,aL as We,bO as un,jo as Gr,cp as Wt,ax as Vt,aB as Cn,T as Kr,aW as Gt,bB as Kt,bd as jr,dn as jt,jp as Qr,bQ as Qt,jq as Zr,V as Wn,aS as Xr,jr as Zt,cC as Jr,aK as Xt,df as ei,js as ni,cR as ti,c0 as ai,b2 as ri,dT as ii,a$ as oi,jt as si,bb as An,ju as li,bR as ci,eB as ui,ey as Jt,n as Ln,jv as di,cz as pi,el as ea,jw as tn,bH as hi,B as mi,jx as _i,am as yi,jy as gi,jz as fi,eT as bi,g1 as vi,b4 as Vn,aw as ki,ie as Ci,j9 as Si,gy as Ti}from"./addresses-is-address-empty.Bn2lNY_L.js";import{d as Me,c as Pi,S as dn}from"./hooks-useShowShopPayOptin.Br0M25ky.js";import{E as na}from"./EmailField.M5oHXAvJ.js";import{b as Ii,d as wi,c as Ei,P as Mi,a as Ri}from"./Page.jjGbeNkl.js";import{S as Re}from"./Section-SectionStyleOverride.hMiKajvE.js";import{C as Ai,u as Li,S as Gn,c as xi,T as Di}from"./stopwatch.CfKlh48v.js";import{u as Ni}from"./graphql-PaymentSessionMutation.CAXCwUvV.js";import{b as ta,i as Oi,s as aa,c as Bi,a as Fi}from"./shipping-methods-consolidated-included.BE_t6ovz.js";import{d as ra,b as Ui}from"./MerchandiseModal.BtS8T15h.js";import{P as Y}from"./PaymentIcon.CIva5Q4J.js";import{P as Hi}from"./Pressable.ZFaj0-Rx.js";import{u as zi,A as Ve}from"./AddressPresenter.BIgrto4P.js";import{C as ia}from"./Checkbox.DQyvbr9E.js";import{P as Yi}from"./PhoneField.C0TeiZrn.js";import{v as qi,a as $i,S as an,d as Wi}from"./useShopPayButtonClassName.FG1djxr9.js";import{l as Fe,m as Vi,r as oa,S as sa,M as la,R as ca,n as Gi,c as Ki,o as ji,h as Qi,a as He,p as Zi,I as Xi,f as Ji,g as X,j as eo,k as no,q as to,P as ao,s as ro,C as io,t as oo}from"./useAuthorizeUrl-index.DpCFC7uh.js";import{g as so,T as lo}from"./Theme-ThemeOverride.DZIcf8ya.js";import{P as co,M as uo,m as ua}from"./Map.DUMW_MDl.js";import{P as po}from"./Popover.BScgzCsS.js";import{I as ho}from"./hooks-useStableHostMethodsReferences.DObnt9s8.js";import{I as da}from"./shop-pay-installments-monorail.BAOukcZ1.js";import{S as pn,P as mo}from"./shared-shop-theme.DIHIQUEd.js";import{S as _o}from"./ShipmentLine.B4fZ0Ud3.js";import{b as yo,i as go}from"./EstimatedDeliveryContent.BuJLi-Ww.js";import{D as fo,B as bo}from"./BuyWithPrimeOrderTrackingButton.s5XrNJHF.js";import{S as vo,a as ko}from"./ShipmentBreakdown.Da0Xa8EW.js";import{a as xn,u as Co}from"./hooks-useShouldRevealCustomization.D_kH_Ics.js";import"./app.DbSrjjlA.js";import{e as So}from"./hooks-useReplaceShopPayInHistory.DPpLejwu.js";import{T as To}from"./TransitionHeight.CV2XV0NY.js";import{v as Po}from"./dist-v4.EwEgHOG0.js";import"./hooks-useShopPayExternalAppContext.DWwMuRnz.js";import"./components-RedirectionNotice.module.CsVdFi0g.js";import"./amazon-pay-useAmazonPayPaymentLine.Ju006AId.js";import"./hooks-useSuppressShopPayModalOnLoad.DFOLDSdS.js";import"./ShippingMethodRateLabel.DAtbOh1H.js";import"./shipping-methods-grouping.CtJrOrZZ.js";import"./amazon-constants.DrV5CHv2.js";const Io={id:"0c62c3aaedf84bd307e1134828e5fcc88a47d83c453c97544a6cc8711e6444af",type:"mutation",name:"SubscribeForShippingUpdates",source:""};
1class Kn extends Error{constructor(){super(...arguments),this.name="SubscribeForShippingUpdateError"}}function wo(){const{client:n,observability:t,graphql:{coreGraphql:a}}=v(),r=n.unstable_getSerialization("sessionToken"),[i,o]=oe(),[s,l]=oe("idle"),u=W()?.orderIdentity?.id;async function d(h){if(l("loading"),o(void 0),!r||!u){l("failed"),o("SUBSCRIPTION_FAILED"),t.error(new Kn("Missing sessionToken or orderId"));return}const{data:p}=await a.mutate(Io,{variables:{sessionToken:r,orderId:u,email:h}});if(p){const{__typename:m}=p?.subscribeForShippingUpdates;switch(m){case"SubscribeForShippingUpdatesSuccess":l("subscribed");return;case"SubscribeForShippingUpdatesFailure":l("failed"),o(p?.subscribeForShippingUpdates.code);return;default:l("idle"),t.error(new Kn("Undefined subscribeForShippingUpdates type"))}}}return{submitSubscribeForShippingUpdate:d,status:s,error:i}}function Dn(){const{checkout:n}=v(),t=Me(),r=W()?.isRedacted??!1,i=!!t?.shopAppEligible,o=!!t?.shopAppQrCodeKillswitch;return!r&&i&&!o&&!n.configuration.isUniversalCheckoutFinalizer}function pa(){const n=W();if(n?.orderIdentity?.id)return Number(Ye(n.orderIdentity.id))}var en=(n=>(n[n.DisplayButton=0]="DisplayButton",n[n.DisplayForm=1]="DisplayForm",n))(en||{});function Eo({children:n,open:t,label:a,onClick:r,icon:i}){return t?e(O,{children:n}):e(_,{direction:"inline",gap:"base",children:e(de,{onClick:r,"aria-expanded":!1,children:e(_,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(re,{type:i}),e(k,{children:a})]})})})}const Mo=({label:n,onInputValueChange:t,error:a,value:r})=>{const i=j();return F(()=>{i.current?.focus()},[a]),e(na,{id:"email",name:"email",label:n,ref:i,onInput:t,required:!0,error:a,value:r})},Ro=({onHandleSubmit:n,isFormSubmitting:t,subscriptionErrorMessage:a})=>{const r=ee(""),{i18n:i}=v(),o=r.value,s=ce(()=>vn(void 0),[a]),l=s.value,[c,u]=oe(!1),d=i.translate("thank_you.order_updates_submit_subscription"),h=ce(()=>({state:{email:r},errors:{email:s}}),[r,s]),p=()=>{if(u(!1),!/@/.test(o)){s.value=i.translate("field_errors.email_invalid");return}s.value=void 0,n(o)},m=y=>{s.value=void 0,u(!0),r.value=y};return F(()=>{c||(l||a)&&(s.value=l||a)},[c,l,a,s]),e(sr,{target:"order.deliveryUpdates",children:e(ir,{...h,children:e(or,{onSubmit:p,implicitSubmit:d,children:e(_,{gap:"small-300",children:[e(U,{gap:"small-400 small-200",gridTemplateColumns:"minmax(0, 50%) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[e(Mo,{label:i.translate("contact.email_label"),value:o,error:!!l,onInputValueChange:m}),e(de,{variant:"primary",type:"submit",loading:t,children:d})]}),l?e(Dt,{controlID:"email",children:l}):null]})})})})},Ao=()=>{const{i18n:n}=v(),{value:t}=N().contactInfo,{submitSubscribeForShippingUpdate:a,status:r,error:i}=wo(),[o,s]=oe(en.DisplayButton),[l,c]=oe(!0),u=y=>{y&&a(y)},h=$(y=>{switch(y){case"SUBSCRIPTION_FAILED":return n.translate("thank_you.order_updates_subscribe_to_email_notifications_failed");case"EMAIL_ALREADY_EXISTS":return n.translate("thank_you.order_updates_subscribe_to_email_notifications_email_already_exists");case"INVALID_REQUEST_INPUT":case"INVALID_EMAIL":return n.translate("field_errors.email_invalid")}},[n])(i);F(()=>{c(r!=="subscribed")},[r,i]);const p=()=>{t?.email?u(t.email):s(en.DisplayForm)},m={subTitle:n.translate("thank_you.order_status_updates_with_email"),fieldLabel:n.translate("thank_you.order_updates_subscribe_to_email_notifications")};return e(O,{children:[e(w,{children:m.subTitle}),l&&e(_,{gap:"base",padding:"base none none none",children:e(Eo,{label:m.fieldLabel,open:o===en.DisplayForm,icon:"email",onClick:p,children:e(Ro,{onHandleSubmit:u,isFormSubmitting:r==="loading",subscriptionErrorMessage:h})})})]})},Lo=()=>{const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ue),r=n.translate("thank_you.order_updates_title");return e(z,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(_,{gap:"small-200",children:[e(A,{children:r}),e(Ao,{})]})})};function xo(n,t=!0){const{router:a}=v(),r=Sn();F(()=>{if(t&&n&&!r){window.history&&(window.history.replaceState(null,document.title,window.location.href),window.history.pushState(null,document.title,window.location.href));const i=()=>{document.hidden||(window.location.href=n)};return window.addEventListener("popstate",i),()=>{window.removeEventListener("popstate",i)}}},[t,n,a,r])}function Do(){const n=N(),t=n.buyerIdentity,a=Wr(),r=lr(),i=n.contactInfo,s=W()?.isRedacted??!1;return T(()=>!s&&r.value&&!i?.value?.email&&!t?.value?.purchasingCompany&&!a.value)}function No(){const n=N().paymentLines,t=Me();return T(()=>(n.value?n.value.lines.some(({method:r})=>r.type==="wallet"&&r.name==="SHOPIFY_INSTALLMENTS"):!1)&&!!t?.installmentsHighlightEligible)}function Oo(){const n=N(),t=n.deliveryNext,a=n.deliveryExpectations;return T(()=>{const r=t.value,i=a.value,o=r?.status==="filled",s=i?.status==="filled",l=o&&r.lines.some(p=>p.type==="ONE_TIME_PURCHASE"&&p.status==="available"&&p.methods.some(m=>m?.brandedPromise)),c=o?new Set(r.lines.filter(p=>p.status==="available").map(p=>p.status==="available"?p.selectedDeliveryMethodHandle:null)):null,u=s&&i.deliveryExpectationLine
1s.some(({brandedPromise:p,deliveryStrategyHandle:m})=>p&&c?.has(m)),d=l||u,h=s&&i.deliveryExpectationLines.some(({brandedPromise:p,deliveryExpectationPresentmentTitle:m})=>!p&&m?.short&&m?.long);return!!(d||h)})}function Be(){const{deliveryNext:n}=N(),t=Oo(),a=sn(),r=ra(),i=Mn();return T(()=>{const o=$t(n.value),s=Nt(a.value.currentDetour),l=i.value.length>=Rn,{oneTimePurchaseLines:c,subscriptionLines:u}=cr(Vr(n.value).filter(We)),{groups:d,nonShippableCount:h}=ta(c),p=n.value?.status==="filled"&&d.length+h===1;return o&&l&&!p||p&&u.length>=2||r.value||t.value&&s})}const Bo="MultibancoBuyerActionInfo",Fo=(n,t)=>n.length===0?t:Object.keys(t).reduce((r,i)=>n.includes(i)?r:{...r,[i]:t[i]},{}),Nn=()=>{const{userEvents:n,checkout:t,shop:{myshopifyDomain:a,id:r},source:{checkoutSessionIdentifier:i="checkout_identifier_undefined"}}=v(),o=t.configuration.layout.isOnePage.value,s=Number(Ye(r)),l=o?"checkout_one_redesign":"checkout_one",c=ce(()=>({checkoutToken:i,shopId:s,checkoutVersion:l,shopifyDomain:a}),[i,l,a,s]);return{track:$((d,h,p)=>{n.monorailEvent({schemaId:d,payload:Fo(p?.omit??[],{...c,...h})})},[c,n])}};function Uo(){if(typeof window>"u"||!window.shopAppExperimentFlags)return;function n(t){const a={control:"c",treatment:"t"}[t];return a||t}return window.shopAppExperimentFlags.sort((t,a)=>t.name<a.name?-1:1).map(t=>`${t.name}=${n(t.group)}:r`).join(",")}function ha(){return Uo()}function Ce(n){const t=un(),a=pa(),{track:r}=Nn(),i=ha();return{track:$(s=>{a&&r("order_status_page_interaction/4.0",{interactionType:n,interactionValue:s,orderId:a,pageviewToken:t.value.defaultAttributes?.microSessionId??"",sessionToken:t.value.defaultAttributes?.visitToken??"",experimentFlags:i},{omit:["shopifyDomain"]})},[i,n,r,a,t])}}function Ho(){const n=N().paymentLines,t=W()?.paymentDetails,{track:a}=Ce("follow_link"),{i18n:r,source:i,shop:{contactEmail:o}}=v(),s=i.type==="simulated",l=T(()=>{const d=n.value?.lines,h=(d?Gr(d):void 0)?.cost;if(h)return r.formatCurrency(h.amount,{form:"short",currency:h.currencyCode});const p=Number.parseFloat(t?.paymentAmount??""),m=t?.paymentCurrency;return Number.isFinite(p)&&m?r.formatCurrency(p,{form:"short",currency:m}):0}),c=T(()=>r.translate("payment.pending_payment.multibanco.buyer_action_info",{amount_due:l.value})),u=t?.buyerActionInfo;return e(_,{gap:"base",children:e(_,{gap:"small-200",children:[e(A,{children:c}),e(_,{direction:"inline",gap:"base",children:e(Ee,{children:r.translate("payment.pending_payment.multibanco.instruction_html",{contact_us:e(ye,{href:s?void 0:`mailto:${o}`,onClick:s?void 0:()=>a("contact_us"),children:r.translate("thank_you.contact_us")})})})}),e(U,{gridTemplateColumns:"@media (inline-size >= small) 'repeat(3, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= small) 'repeat(3, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"small-200",children:[e(z,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(A,{children:r.translate("payment.pending_payment.multibanco.entity")})}),e(_,{gap:"small-200",children:e(k,{children:u?.entity})})]})}),e(z,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(A,{children:r.translate("payment.pending_payment.multibanco.reference")})}),e(_,{gap:"small-200",children:e(k,{children:u?.reference})})]})}),e(z,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(A,{children:r.translate("payment.pending_payment.multibanco.amount")})}),e(_,{gap:"small-200",children:e(k,{children:l})})]})})]})]})})}function zo(){const{i18n:n,shop:t}=v(),a=W()?.paymentDetails?.buyerActionInfo,r=t.hasFlagEnabled(ue);return a?.__typename!==Bo?null:e(z,{accessibilityLabel:n.translate("thank_you.customer_information_title"),colorLayer:r?void 0:"control",children:e(Ho,{})})}function ma(n){return!!(n?.label&&n?.text)}function Yo(n){return n.details?.filter(ma)??[]}function _a(n,t){const a=n.amount;if(!(a?.amount==null||!a.currencyCode))return{accessibleAmount:t.formatCurrency(a.amount,{form:"name",currency:a.currencyCode}),value:`${t.formatCurrency(a.amount,{form:"short",currency:a.currencyCode})} ${a.currencyCode}`}}function ya(n,t){if(!n)return;const a=new Date(n);return{date:t.formatDate(a,{month:"short",day:"numeric",year:"numeric"}),time:t.formatDate(a,{hour:"numeric",minute:"2-digit"})}}function ga(n){if(n.status==="expired")return!0;
1if(!n.expiresAt)return!1;const t=new Date(n.expiresAt).getTime();return Number.isFinite(t)&&t<=Date.now()}const qo="TNF54",$o="Bedu9",Wo="RExUg",Vo="CMO8N",Go="Bgyek",Ko="JuwoV",jo="_8A0Cd",Qo="JIcdC",Zo="Xaalv",Ie={Chains:qo,Chain:$o,ChainOpen:Wo,Steps:Vo,Step:Go,Chin:Ko,ChainBody:jo,ChainBodyInner:Qo,ChainHeader:Zo},Xo={familymart:"familymart",lawson:"lawson",ministop:"ministop",seicomart:"seicomart"},jn="Asia/Tokyo";function fa(n){return!!(n?.label&&n?.text)}function ba(n){return n.key??n.label??"konbini"}function Jo(n,t){const a=n.amount;if(!(a?.amount==null||!a.currencyCode))return{accessibleAmount:t.formatCurrency(a.amount,{form:"name",currency:a.currencyCode}),value:`${t.formatCurrency(a.amount,{form:"short",currency:a.currencyCode})} ${a.currencyCode}`}}function es(n,t){if(!n)return;const a=new Date(n),r=t.formatDate(a,{month:"short",day:"numeric",year:"numeric",timeZone:jn}),i=t.formatDate(a,{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:jn});return t.translate("payment.lpm.konbini.voucher.expiry_date_time",{date:r,time:i})}function ns({detail:n,id:t}){const{i18n:a}=v(),r=ee(!1),i=async()=>{try{await Ot(n.text),r.value=!0}catch{r.value=!1}},o=a.translate("payment.lpm.konbini.voucher.code_copied");return e(O,{children:[e(ur,{id:t,name:t,label:n.label,value:n.text,readOnly:!0,accessoryEnd:e(de,{variant:"tertiary",size:"small",onClick:i,accessibilityLabel:r.value?o:a.translate("payment.lpm.konbini.voucher.copy_code",{label:n.label}),children:e(re,{type:r.value?"check":"clipboard"})})}),e("p",{role:"status","aria-live":"polite",className:Wt({screenReaders:"only"}),children:r.value?o:""})]})}function ts({instructionSet:n,open:t,onToggle:a}){const r=ba(n),i=n.label??r,o=(n.details??[]).filter(fa),s=(n.steps??[]).filter(Boolean),l=`konbini-chain-${r}-instructions`;return e("div",{id:`konbini-chain-${r}`,className:B(Ie.Chain,t&&Ie.ChainOpen),children:[e(Hi,{accessibilityRole:"expandableControl",accessibilityLabel:i,controlId:l,expanded:t,onPress:a,className:Ie.ChainHeader,padding:"base",children:e(U,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"small-300",alignItems:"center",children:[e(Y,{type:Xo[r]??"konbini",active:!0,accessibilityVisibility:"hidden"}),e(k,{type:"strong",children:i}),e(re,{type:t?"chevronUp":"chevronDown",size:"small"})]})}),e("div",{className:Ie.ChainBody,children:e(U,{id:l,gridTemplateRows:t?"minmax(0, 1fr)":"minmax(0, 0fr)",children:e("div",{className:Ie.ChainBodyInner,children:e(D,{inert:!t,padding:"base",paddingBlockStart:"none",children:e(_,{gap:"base",children:[e(U,{gridTemplateColumns:o.length>1?"minmax(0, 1fr) minmax(0, 1fr)":"1fr",gap:"small-400",children:o.map((c,u)=>e(ns,{detail:c,id:`konbini-${r}-code-${u}`},c.label))}),s.length>0?e("ol",{className:Ie.Steps,children:s.map(c=>e("li",{className:Ie.Step,children:e(k,{color:"subdued",size:"base",children:c})},`${r}-${c}`))}):null]})})})})})]})}function as({amount:n,expired:t}){const{i18n:a}=v();return t?e(A,{level:1,children:a.translate("payment.lpm.konbini.voucher.expired_title")}):n?e(A,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.value})})]}):null}function rs({expiryDate:n,expired:t}){const{i18n:a}=v();if(!n)return null;const r=e(k,{color:"subdued",size:"base",type:"strong",children:n});return e(k,{color:"subdued",size:"base",children:t?a.translate("payment.lpm.konbini.voucher.expired",{date:r}):a.translate("payment.lpm.konbini.voucher.expires_at",{date:r})})}function is({paymentInstructions:n}){const{i18n:t}=v(),a=(n.instructionSets??[]).filter(c=>(c.details??[]).some(fa)),r=ee(null);if(a.length===0)return null;const i=Jo(n,t),o=ga(n),s=es(n.expiresAt,t),l=t.translate("payment.lpm.konbini.voucher.label");return e(Tn,{children:e(_,{gap:"none",children:[e(D,{accessibilityLabel:l,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:o?"large":"large large none none",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"base",children:[e(_,{gap:"small-300",children:[e(U,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(as,{amount:i,expired:o}),e(Y,{type:"konbini",active:!0,accessibilityVisibility:"hidden"})]}),o?null:e(k,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.choose_outlet")}),e(rs,{expiryDate:s,expired:o})]}),o?null:e("div",{className:Ie.Chains,role:"group","aria-label":l,children:a.map(c=>{const u=ba(c);return e(ts,{instructionSet:c,open:r.value===u,onToggle:()=>{r.value=r.value===u?null:u}},u)})})]})}),o?null:e(D,{className:Ie.Chin,padding:"base",paddingInline:"large-100",children:e(k,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.keep_receipt")})})]})})}const os="Gltpp",ss={CodeValue:os};function ls({details:n}){const{i18n:t}=v();return e(_,{gap:"small-500",children:n.map(a=>e(D,{borderRadius:"base",className:ss.CodeValue,inlineSize:"100%",children:e(k,{type:"small",color:"subdued",children:t.translate("payment.pending_payment.multibanco.labelled_code",{label:a.label,code:a.text})})},a.label))})}function cs({step:n,expiry:t}){const{i18n:a}=v();return n?e(_,{gap:"none",children:[e(k,{color:"subdued",size:"base",children:n}),t?e(k,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.multibanco.expires_at",{date:e(k,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function us({expiry:n}){const{i18n:t}=v();return n?e(k,{color:"subdued",size:"base",children:t.translate("payment.pending_payment.multibanco.expired",{date:e(k,{color:"subdued",size:"base",type:"strong",children:n})})}):null}function ds({amount:n,expired:t}){const{i18n:a}=v();return t?e(A,{level:1,children:a.translate("payment.pending_payment.multibanco.expired_title")}):n?e(A,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.value})})]}):null}function ps({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="multibanco");if(!a)return null;const r=Yo(a);if(r.length===0)return null;const i=_a(n,t),o=ga(n),s=ya(n.expiresAt,t),l=s?t.translate("payment.pending_payment.multibanco.expiry_date_time",s):void 0,c=t.translate("payment.pending_payment.multibanco.label");return e(Tn,{children:e(D,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"small-200",children:[e(U,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(ds,{amount:i,expired:o}),e(Y,{type:"multibanco",active:!0,accessibilityVisibility:"hidden"})]}),o?e(us,{expiry:l}):e(cs,{step:a.steps?.[0],expiry:l}),e(ls,{details:r})]})})})}const hs="/cdn/shopifycloud/checkout-web/assets/c1/assets/add-to-apple-wallet.c2C6mOjH.svg",ms="_8CGB7",_s="chT5l",Qn={AppleWalletBadge:ms,AppleWalletAction:_s},ys=/Shop App\/[^/]+\/iOS\//;function gs(n){const t=Vt(n);return t==="iOS"||t==="Mac OS"||ys.test(n)}function fs({passUrl:n}){const{client:t,i18n:a}=v();return!n||!gs(t.userAgent)?null:e(D,{className:Qn.AppleWalletAction,paddingBlockStart:"large-100",children:e(U,{justifyItems:"center",children:e(ye,{href:n,children:e(ln,{src:hs,alt:a.translate("payment.pending_payment.apple_wallet.badge_alt"),className:Qn.AppleWalletBadge,inlineSize:"auto"})})})})}const bs=200,vs=8,Zn=8;function va(n){return Math.round(n/Zn)*Zn}function ka(n,t){try{const a=new URL(n);return a.searchParams.set("width",t.toString()),a.toString()}catch{return n}}function ks(n){try{const t=Number(new URL(n).searchParams.get("width"));return Number.isFinite(t)&&t>0?va(t):void 0}catch{return}}function Cs(n,t){const a=ks(n);return a!=null&&Math.abs(a-t)<vs}function Ss(n){const t=j(null),a=j(n),r=j(null),i=j(0),o=ee(n),s=ee(!1);return zn(()=>{i.current+=1,a.current=n,r.current=null,o.value=n,s.value=!1},[n,s,o]),zn(()=>{const l=t.current;if(!n||!l)return;const c=typeof ResizeObserver<"u";let u,d=!1;const h=()=>{i.current+=1,r.current=null,s.value=!1,u&&(clearTimeout(u),u=void 0)},p=(f,b)=>{const C=ka(n,f),S=new window.Image;S.onload=()=>{!d&&b===i.current&&(a.current=C,r.current=null,o.value=C,s.value=!1)},S.onerror=()=>{!d&&b===i.current&&(r.current=null,s.value=!1)},S.src=C},m=f=>{const b=va(f);if(b<=0)return;const C=a.current;if(C&&Cs(C,b)){h();return}if(r.current===b){s.value=!0;return}r.current=b;const S=i.current+1;i.current=S,s.value=!0,u&&clearTimeout(u),u=setTimeout(()=>p(b,S),bs)},y=()=>{m(l.getBoundingClientRect().width)};if(y(),!c)return window.addEventListener("resize",y),()=>{d=!0,u&&clearTimeout(u),window.removeEventListener("resize",y)};const g=new ResizeObserver(([f])=>{f&&m(f.contentRect.width)});return g.observe(l),()=>{d=!0,u&&clearTimeout(u),g.disconnect()}}
1,[n,s,o]),{containerRef:t,imageUrl:o,isLoading:s}}const Ts="TBsba",Ps="PITIE",Is="Fmqjk",_n={BarcodePicture:Ts,BarcodeImage:Ps,LoadingOverlay:Is},ws=510;function Es({imageUrl:n,altText:t,height:a,printWidth:r=ws}){const{containerRef:i,imageUrl:o,isLoading:s}=Ss(n),l=o.value||n,c=ka(n,r);return e(D,{ref:i,inlineSize:"100%",blockSize:a,children:e(D,{inlineSize:"100%",blockSize:"100%",position:"relative",children:[e("picture",{className:_n.BarcodePicture,children:[e("source",{media:"print",srcSet:c}),e(ln,{src:l,alt:t,className:_n.BarcodeImage,inlineSize:"auto",objectFit:"contain"})]}),s.value?e("div",{"aria-hidden":"true",className:_n.LoadingOverlay,children:e(xe,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%",delay:!1})}):null]})})}const Ms="OVcKI",Rs={ReferenceValue:Ms},As="67.5px",Ls="510px";function xs({barcode:n,detail:t}){if(!n?.imageUrl)return null;const a=t?`${t.label}: ${t.text}`:"";return e(D,{inlineSize:"100%",maxInlineSize:Ls,children:e(Es,{imageUrl:n.imageUrl,altText:n.altText||a,height:As})})}function Ds({step:n,expiry:t}){const{i18n:a}=v();return n?e(_,{gap:"none",children:[e(k,{color:"subdued",size:"base",children:n}),t?e(k,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.oxxo.expires_at",{date:e(k,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function Ns({detail:n}){const{i18n:t}=v(),a=t.translate("payment.pending_payment.oxxo.reference_number");return e(D,{borderRadius:"base",className:Rs.ReferenceValue,inlineSize:"100%",children:e(k,{type:"small",color:"subdued",children:[a," ",n.text]})})}function Os({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="oxxo");if(!a)return null;const r=_a(n,t),i=a.details?.find(ma),o=a.steps?.[0],s=ya(n.expiresAt,t),l=s?t.translate("payment.pending_payment.oxxo.expiry_date_time",s):void 0,c=t.translate("payment.pending_payment.oxxo.label");return e(Tn,{children:e(D,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"small-200",children:[e(U,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[r?e(A,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.value})})]}):null,e(Y,{type:"oxxo",active:!0,accessibilityVisibility:"hidden"})]}),e(Ds,{step:o,expiry:l}),e(_,{gap:"none",children:[e(xs,{barcode:a.barcode,detail:i}),i?e(Ns,{detail:i}):null,e(fs,{passUrl:a.appleWalletPassUrl})]})]})})})}function Bs({paymentInstructions:n}){switch(n.method?.toLowerCase()){case"multibanco":return e(ps,{paymentInstructions:n});case"oxxo":return e(Os,{paymentInstructions:n});case"konbini":return e(is,{paymentInstructions:n});default:return null}}function Fs(){const t=W()?.paymentDetails?.buyerActionInfo?.paymentInstructions;return t?e(Bs,{paymentInstructions:t}):null}function Us(){const{i18n:n}=v();return e(k,{size:"small",color:"subdued",children:e(Ee,{children:n.translate("shop_pay_remember_me.terms_and_privacy_html",{privacy_href:e(zs,{}),terms_href:e(Hs,{})})})})}function Hs(){const{i18n:n}=v();return e(O,{children:e(ye,{target:"_blank",href:"https://shop.app/terms-of-service",tone:"monochrome",accessibilityLabel:n.translate("shop_pay_remember_me.new_window_disclaimer"),children:[n.translate("shop_pay_remember_me.terms_of_service"),e(re,{type:"external",size:"small",display:"inline"})]})})}function zs(){const{i18n:n}=v();return e(O,{children:e(ye,{target:"_blank",href:"https://www.shopify.com/legal/privacy/app-users",tone:"monochrome",accessibilityLabel:n.translate("shop_pay_remember_me.new_window_disclaimer"),children:[n.translate("shop_pay_remember_me.privacy_policy"),e(re,{type:"external",size:"small",display:"inline"})]})})}function Ys({field:n="phone",link:t}){const{i18n:a}=v();return e(O,{children:[e(k,{color:"subdued",children:e(Ee,{children:[n==="phone"?a.translate("shop_pay_remember_me.description_html"):a.translate("shop_pay_remember_me.email_description_html")," ",t]})}),e(Us,{})]})}function Ca(){const{shopPayArtifact:n}=N();return T(()=>!!n.value?.optIn)}
1class qs extends Error{constructor(){super(...arguments),this.name="OptInFetchError"}}function $s(){const{userEvents:n,source:t,checkout:a,shop:r,i18n:i,url:o,shop:{checkoutPublicAccessToken:s},source:{checkoutSessionIdentifier:l}}=v(),c=Ca(),u=N(),{value:d}=u.shippingAddress,{value:h}=u.contactInfo,[p,m]=oe(c.peek()),[y,g]=oe(!1),[f,b]=oe(d?.phone||h?.phone||""),[C,S]=oe(h?.email??""),[P,I]=oe(),[R,M]=oe(),L=!h?.phone,{validatePhoneNumber:V}=zi(),q=$(x=>{const Z=qi(x,i.translate("field_errors.email_blank")),G=$i(x,i.translate("field_errors.email_invalid"));return Z||G},[i]),Q=$(()=>{P&&I(void 0)},[P]),J=$(async()=>{if(M(void 0),L){const x=!f.includes("+");if(!V(f,x?d?.countryCode:void 0)){I(i.translate("field_errors.thank_you_remember_me_phone_invalid"));return}}else{const x=q(C);if(x){I(x);return}}n.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...Cn(t,a,r),action:L?"update_phone_input":"update_email_input",phoneNumber:f,email:C,source:"thank_you_page",trigger:"manual"}});try{g(!0);const x=await fetch(o.shopPayOptin(l),{method:"POST",body:JSON.stringify({checkout:{vault_phone:f,vault_email:C,is_checkout_one:!0}}),headers:{"Content-Type":"application/json","X-Shopify-Checkout-Version":"2025-03-18",accept:"application/json",authorization:`Basic ${s}`}});if(x.status===200){const{success:Z}=await x.json();Z?m(!0):M(i.translate("shop_pay_remember_me.errors.optin_retry"));return}throw new qs("Opt in request didn't succeed")}catch{I(i.translate("shop_pay_remember_me.errors.optin"))}finally{g(!1)}},[n,t,a,r,o,l,s,f,C,L,d?.countryCode,V,q,i]);return{hasOptedIn:p,loading:y,errorBannerContent:R,handleSave:J,showPhoneField:L,phoneNumber:f,setPhoneNumber:b,email:C,setEmail:S,inputError:P,handleInput:Q,countryCode:d?.countryCode||""}}function Ws(n){return n?{borderWidth:"base none none none",background:"subdued",padding:"base",borderRadius:"none none base base"}:{borderWidth:"base",background:"base",padding:"base",borderRadius:"base"}}function Vs(){const{track:n}=Ce("follow_link"),{i18n:t,userEvents:a,source:r,checkout:i,shop:o}=v(),{hasOptedIn:s,loading:l,errorBannerContent:c,handleSave:u,showPhoneField:d,phoneNumber:h,setPhoneNumber:p,email:m,setEmail:y,inputError:g,handleInput:f,countryCode:b}=$s(),C=ee(s),{value:S}=N().deliveryNext,{value:P}=qe(),I=$t(S),R=Ws(!I||P),M=Kr().shippingAddress,L=T(()=>M.value.oneTimeUse?t.translate("thank_you.opt_in_payment_only_welcome_message_html",{shopify_pay:e(an,{inline:!0,color:"branded",size:"xsmall"})}):t.translate("thank_you.opt_in_welcome_message_html",{shopify_pay:e(an,{inline:!0,color:"branded",size:"xsmall"})})),V=T(()=>M.value.oneTimeUse?t.translate("shop_pay_remember_me.payment_information_only_label"):t.translate("shop_pay_remember_me.label")),q=e(O,{children:V});F(()=>{a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_impression/1.0",payload:{...Cn(r,i,o),source:"thank_you_page",elementType:"remember_me_box"}})},[a,r,i,o]);const Q=()=>{const Z=!C.value;a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...Cn(r,i,o),action:Z?"click_remember_me_box":"unclick_remember_me_box",phoneNumber:h,email:m,source:"thank_you_page",trigger:"manual"}}),C.value=Z},J=e(ye,{target:"_blank",href:"https://shop.app/pay",onClick:()=>{n("learn_more_pay")},children:t.translate("shop_pay_remember_me.learn_more")});return e(D,{...R,children:s?e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(Ee,{children:L}),J]}):e(_,{gap:"base",children:[c?e(Pn,{tone:"critical",children:c}):null,e(_,{direction:"inline",gap:"base",children:e(ia,{checked:C.value,onChange:Q,label:q})}),e(dr,{open:C.value,id:"thankYouRememberMe",children:e(_,{gap:"base",children:[e(D,{padding:"small-200 none none none",children:e(_,{gap:"small-300",children:[e(U,{gap:"small-400 base",gridTemplateColumns:"minmax(auto, max-content) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[d?e(Yi,{id:"phone",disabled:l,countryCode:b,label:t.translate("shop_pay_remember_me.mobile_phone_number"),icon:"mobile",value:h,error:!!g,onChange:p,onInput:f}):e(na,{disabled:l,id:"email",name:"email",label:t.translate("shop_pay_remember_me.email_label"),value:m,error:!!g,onChange:y,onInput:f,required:!1}),e(de,{variant:"primary",onClick:u,loading:l,children:t.translate("shop_pay_remember_me.save")})]}),g?e(Dt,{controlID:d?"phone":"email",children:g}):null]})}),e(Ys,{field:d?"phone":"email",link:J})]})})]})})}const Gs=300,Ks=5e3,js=n=>{const{duration:t=Ks,onClose:a,text:r,subText:i,actionText:o,handleAction:s,id:l,variant:c="default"}=n,[u,d]=oe(!1);F(()=>{d(!0);const p=setTimeout(()=>{if(t!==0){d(!1);const m=setTimeout(()=>{a(l)},Gs);return()=>clearTimeout(m)}},t);return()=>clearTimeout(p)},[t,l,a]);const h=Fe(c==="error"?"text-poppy-d1":"text-black");return e("div",{className:Fe("z-max mx-auto flex w-85 transform items-center justify-start gap-x-3 rounded-md border-[0.5px] border-solid border-grayscale-l2l px-4 py-3 text-white shadow-lg transition-transform duration-300 ease-in-out sm_bottom-0 sm_max-w-none sm_rounded-none",u?"translate-y-0":"translate-y-94",c==="error"?"bg-poppy-l2":"bg-white"),"data-testid":"shop-toast-element",children:[c!=="error"&&e(Vi,{className:"size-8 flex-shrink-0 text-purple-primary"}),e("div",{className:"flex flex-col overflow-hidden",children:[e("div",{className:Fe("font-sans text-body-title-small",h),children:r}),i&&e("div",{className:Fe("truncate font-sans text-caption",h),children:i})]}),o&&s&&e("button",{type:"button","aria-label":o,className:Fe("ml-auto h-8 w-fit max-w-[40%] rounded-sm100 px-3 font-sans text-button-medium",c==="error"?"bg-poppy-d1 text-white":"bg-grayscale-l5 text-black"),"data-testid":"toast-action-button",onClick:s,children:o})]})},Qs=()=>{const{instanceId:n}=Gi(),{trackPageImpression:t}=Ki(),[a,r]=oe([]),{recordCounter:i}=ji(),o=$(c=>{r(u=>u.filter(d=>d.id!==c))},[]),s=$(c=>{r(u=>[...u,c])},[]),l=ce(()=>({renderToast:({detail:u})=>{u.flow&&i("shop_js_toast_rendered",{attributes:{flow:u.flow,variant:u.variant||"default"}}),t({allowDuplicates:!0,analyticsTraceId:u.analyticsTraceId,flow:u.flow,page:"RENDER_TOAST"}),s(u)}}),[s,i,t]);return Qi(l),Za(e(Zi,{instanceId:n,type:"toast",variant:"default",children:e("div",{className:"fixed inset-x-0 bottom-8 z-max mx-auto flex flex-col items-center gap-3",children:a.map(c=>e(js,{...c,onClose:o},c.id))})}),He.body)},Zs=()=>oa(({element:n,...t})=>e(ca,{element:n,featureName:"ShopToastManager",children:e(sa,{children:e(la,{children:e(Qs,{...t})})})}),{methods:["renderToast"],name:"shop-toast-manager",props:{},shadow:"open"}),Xs={id:"520f926255e48c24cf1b0e497a7dfa36db1b5b10f628941f45c629153aa67e5f",type:"query",name:"PendingPayEscrowReceipt",source:""},Js=1e3,el=Gt(({graphql:{coreGraphql:n}},{receiptId:t,retries:a,sessionToken:r,skip:i}
1)=>{const o=vn(1),s=vn(!i.peek()),l=n.query(Xs,{variables:()=>({receiptId:t.value,sessionToken:r.value}),skip:()=>i.value}),c=ze(()=>nl(l.data.value,l.error.value));let u=!0;function d(){!u||o.peek()>=a||(u=!1,setTimeout(()=>{l.loading.peek()||l.refetch(),o.value++,u=!0,o.peek()<a?d():s.value=!1},Js))}return Yn(function(){c.value&&(s.value=!1,u=!1)}),Yn(function(){l.loading.value||s.value&&d()}),{attempts:ze(()=>o.value),error:l.error,loading:ze(()=>s.value),pendingPayEscrow:c}});function nl(n,t){return!!(n?.receipt?.__typename==="ProcessedReceipt"&&n?.receipt?.shopAppLinksAndResources?.hasPendingPayEscrow)&&!t}const tl=5;function Sa(){return!!Me()?.payEscrowMayExist}function al(){const{client:n}=v(),t=n.unstable_getSerialization("sessionToken"),a=W()?.id,r=Sa(),[i,o]=oe(!r),{attempts:s,loading:l,pendingPayEscrow:c}=Kt(el,{receiptId:_e(a),retries:tl,sessionToken:_e(t),skip:_e(!r||!a||!t)}),u={status:"verified_user",isVerifiedShopAccount:i,setIsVerifiedShopAccount:o,loading:l.value,fetchAttempts:s.peek()};return r?l.value?{...u,status:"fetching_status"}:{...u,status:c.value?"split_user":"verified_user"}:u}function rl(){const{i18n:n}=v(),{track:t}=Ce("pay_escrow"),{isVerifiedShopAccount:a,setIsVerifiedShopAccount:r,loading:i,status:o,fetchAttempts:s}=al();F(()=>{!a&&o==="verified_user"&&!i&&(t("verify_button_removed"),r(!0))},[a,o,i,t,r]);const l=$(c=>{const{email:u}=c;u&&(t("verify_action_completed"),il({email:u,text:n.translate("thank_you.verify_shop_account_confirmation")})),r(!0)},[t,r,n]);return{status:o,isVerifiedShopAccount:a,loading:i,handleSetIsVerifiedShopAccount:l,fetchAttempts:s}}const il=({email:n,text:t})=>{customElements.get("shop-toast-manager")||Zs();const a=document.createElement("shop-toast-manager");document.body.appendChild(a),a.renderToast({flow:"thank_you_page_escrow",text:t,subText:n})};function ol(){const n=_e(Pi()),t=Ca(),a=_e(Sa());return T(()=>!!((n.value||t.value)&&!a.value))}const sl="z6nlw",ll={infoIcon:sl};function cl(){const t=W()?.paymentDetails,a=t?.paymentIcon==="usdc",r=t?.paymentDescriptor;return!a||!r?null:e(_,{direction:"inline",padding:"small-300",borderRadius:"small",background:"subdued",children:e(k,{color:"base",children:[r," ",e(ye,{href:jr,display:"inline",children:e(re,{className:ll.infoIcon,size:"small",type:"info",display:"inline",tone:"custom"})})]})})}function ul(){const{i18n:n}=v(),t=N().buyerIdentity.value?.purchasingCompany;return t?e(_,{gap:"small-200",children:[e(A,{children:n.translate("thank_you.company_location_section_title")}),e(_,{children:[e(w,{children:t.company.name}),e(w,{children:t.location.name})]})]}):null}function dl({lines:n}){return n.length>0?e(_,{children:n.map(t=>e(w,{children:t},t))}):null}function pl(){const{i18n:n}=v(),t=N().deliveryNext,a=T(()=>jt(t.value).find(({method:r})=>r.methodType==="PICK_UP")?.method.pickupLocation);return e(E,{when:a,children:r=>e(_,{gap:"small-200",children:[e(A,{children:n.translate("thank_you.pick_up_in_store_marker.shipping")}),e(Ve,{address:r.address,multiline:!0})]})})}class Xn extends Error{constructor(){super(...arguments),this.name="PaymentMethodError"}}const Jn=" · ";function Ta({cost:n,method:t}){const{shop:a,i18n:r,observability:i}=v(),o=N(),{value:s}=o.paymentMethods,{value:l}=o.paymentFlexibilityPaymentTermsTemplate,c=Bt(),u=W(),d=u?.paymentDetails,h=u?.paymentExtensionBrand,p=Pa({paymentDetails:d}),m=a.hasFlagEnabled(Qr),y=!!Qt().value?.amount,g=l&&!y,f=!n||g?null:e(k,{children:[Jn,r.formatCurrency(n.amount,{currency:n.currencyCode,form:"explicit"})]});switch(t.type){case"direct":case Wn.CreditCard:return e(hl,{method:t,payment:f,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});case Wn.PayPal:return e(et,{payment:f});case"wallet":{if(t.name==="PAYPAL_EXPRESS")return e(et,{payment:f});if(t.name==="SHOPIFY_INSTALLMENTS")return e(ml,{walletContent:t.walletContent});if(t.name==="SHOP_PAY")return e(nt,{payment:f,paymentDetails:d,walletContent:t.walletContent,paymentExtensionBrand:h,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});const b=S=>{switch(S){case"APPLE_PAY":return e(Y,{type:"apple-pay"});case"GOOGLE_PAY":return e(Y,{type:"google-pay"});default:return i.error(new Xn(`Unknown wallet payment method for icon: ${S}`)),null}},C=S=>{switch(S){case"APPLE_PAY":return r.translate("brand.apple_pay");case"GOOGLE_PAY":return r.translate("brand.google_pay");default:return i.error(new Xn(`Unknown wallet payment method for label: ${S}`)),null}};return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[b(t.name),e(w,{children:[p({displayBrandLabel:!0})||C(t.name),f]})]})}case"shopWallet":return e(nt,{payment:f,paymentDetails:d});case"walletsPlatformPaymentMethod":return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"small-300",children:[e(Y,{type:t.name}),e(w,{children:[d?.paymentDescriptor??p({displayBrandLabel:!0}),f]})]});case"local":{const C=s?.find(S=>S.type==="local"&&S.name===t.name)?.displayName||t.name;return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:t.name}),e(w,{children:[C,f]})]})}case"paymentOnDelivery":return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"cash"}),e(w,{children:[r.translate("payment_gateway.cash_on_delivery_label"),f]})]});case"manualPayment":case"customManualPayment":return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"cash"}),e(w,{children:[t.name,f]})]});case"deferred":return c.value?null:e(_,{children:l&&l.type!=="FIXED"?e(O,{children:[e(w,{children:l.translatedName}),e(w,{children:r.translate("payment_gateway.deferred_payment_label")})]}):e(w,{children:[r.translate("payment_gateway.deferred_payment_label"),f]})});
1case"giftCard":{if(m)return null;const b=t.code.slice(-4).toUpperCase();return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"gift-card"}),e(w,{children:[r.translate("payment.masked_digits_label",{last_digits:b}),f]})]})}case"redeemable":{if(t.redemptionSource==="STORE_CREDIT")return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"store-credit"}),e(w,{children:[r.translate("payment.store_credit.label"),f]})]});if(t.redemptionSource==="SHOP_CASH"){const b=t.redemptionContent;return b?.redemptionPaymentOptionKind==="ZERO_BALANCE_OFFER"?null:b?.details?.length?b.details.map(C=>{if(!Zr.includes(C.redemptionType))return null;const S=C.destinationAmount&&!g?e(k,{children:[Jn,r.formatCurrency(parseFloat(C.destinationAmount.amount),{currency:C.destinationAmount.currencyCode,form:"short"})]}):null;return C.redemptionType==="SHOP_CASH_BALANCE"?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),S]})]},C.redemptionType):null}):e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),f]})]})}if(t.redemptionSource==="CUSTOM"){const b=t.redemptionContent,C=b?pr(b)?.toUpperCase():"";return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"gift-card"}),e(w,{children:[r.translate("payment.ends_with_label",{last_digits:C||""}),f]})]})}return null}case"offsite":case"customOnsite":{const b=d?.paymentIcon,S=!!h||!b||["generic","usdc"].includes(b)?Ia(h,r):t.name;return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:h||b||"generic"}),e(w,{children:[S,f]})]})}case"bank":return e(_,{gap:"small-400",children:[e(k,{children:t.bankName}),e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:so(t.bankName??"")}),e(w,{children:[r.translate("payment.masked_digits_label",{last_digits:t.lastDigits??""}),t.lastDigits?" · ":null,n?.amount&&r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})]})]})]});default:return null}}function hl({method:n,payment:t,installmentInfo:a}){const{i18n:r}=v(),i=N().buyerIdentity.value?.purchasingCompany,o=N().paymentFlexibilityPaymentTermsTemplate,s=Bt(),l=T(()=>o.value&&!s.value?o.value.translatedName:void 0),c=n.brand??"generic",u=n.type==="direct"?n.creditCardLastFourDigits:n.displayLastDigits,d=c==="MAESTRO"?r.translate("payment_gateway.debit_card_label"):r.translate("payment_gateway.credit_card_label"),h=u?r.translate("payment.masked_digits_label",{last_digits:u}):d,p=(()=>{const m=a?.installmentDetails?.count,y=a?.cost;if(!m||!y)return null;const g=Ft(y.amount,m);return r.translate("payment.msi_installment_plan",{amount:r.formatCurrency(g,{currency:y.currencyCode,form:"explicit"}),num_payments:m})})();return e(_,{gap:"small-400",children:[e(E,{when:l,children:m=>e(w,{children:m})}),e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:c}),e(w,{children:[h,t]})]}),p?e(k,{color:"subdued",children:p}):null,n.type==="direct"&&n.vaultingAgreement?e(_,{direction:"inline",alignItems:"center",gap:"small-400",children:[e(re,{size:"small",type:"check"}),e(k,{color:"subdued",children:i?r.translate("payment.card_vaulted_company_location"):r.translate("payment.payment_method_saved")})]}):null]})}function et({payment:n}){const{i18n:t}=v();return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"paypal"}),e(w,{children:[t.translate("brand.paypal"),n]})]})}function ml({walletContent:n}){const{i18n:t}=v(),a=Me(),r=()=>n?.creditCardBrand?e(Y,{type:n.creditCardBrand}):e(an,{color:"branded",size:"xsmall"}),i=()=>n?.creditCardLastFourDigits&&t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits}),o=()=>a?e(w,{children:e(ye,{target:"_blank",href:a.shopInstallmentsViewSchedules,children:t.translate("shop_pay_remember_me.installments.view_schedule")})}):null;return e(_,{gap:"small-300",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[r(),e(w,{children:i()})]}),e(w,{children:t.translate("shop_pay_remember_me.installments.paid_in_installments")}),o()]})}function nt({payment:n,paymentDetails:t,walletContent:a,paymentExtensionBrand:r,installmentInfo:i}){const o=Pa({paymentDetails:t}),{i18n:s}=v(),{value:l}=N().managedByMarketsPro,c=Xr({managedByMarketsPro:l}),u=(()=>{const d=i?.installmentDetails?.count,h=i?.cost;
1if(!d||!h)return null;const p=Ft(h.amount,d);return s.translate("payment.msi_installment_plan",{amount:s.formatCurrency(p,{currency:h.currencyCode,form:"explicit"}),num_payments:d})})();return r?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:r}),e(w,{children:[Ia(r,s),n]})]}):t?.paymentCardBrand?e(_,{gap:"small-400",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:t.paymentCardBrand}),e(w,{children:[o({displayBrandLabel:!1}),n]})]}),u?e(k,{color:"subdued",children:u}):null]}):c&&a?.paymentMethod==="IDEAL"?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"ideal"}),e(w,{children:[s.translate("payment.ideal_label"),n]})]}):e(_,{gap:"small-400",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Y,{type:"shop-pay"}),e(w,{children:[o({displayBrandLabel:!0})||s.translate("payment_gateway.shop_pay.name"),n]})]}),u?e(k,{color:"subdued",children:u}):null]})}function Pa({paymentDetails:n}){const{i18n:t}=v();return $(({displayBrandLabel:a})=>{if(!n||!n.creditCardLastFourDigits)return null;const r=yl(n),i=t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits});return r&&a?`${r} ${i}`:i},[n,t])}const _l=new Map([["UNKNOWN",void 0],["AMERICAN_EXPRESS","American Express"],["BOGUS","Test Payment Gateway"],["CARTESBANCAIRES","Cartes Bancaires"],["DANKORT","Dankort"],["DINERS_CLUB","Diners Club"],["DISCOVER","Discover"],["EFTPOS_AU","EftposAu"],["ELO","Elo"],["FORBRUGSFORENINGEN","Forbrugsforeningen"],["GIROCARD","girocard"],["HYPERCARD","HyperCard"],["INTERAC","Interac"],["JCB","JCB"],["LASER","Laser"],["MAESTRO","Maestro"],["MASTER","Mastercard"],["SOLO","Solo"],["SWITCH","Switch"],["UNIONPAY","UnionPay"],["VISA","Visa"]]);function yl(n){return n?.paymentCardBrand?_l.get(n.paymentCardBrand):void 0}function Ia(n,t){switch(n){case"alipay":return t.translate("payment.alipay_label");case"bancontact":return t.translate("payment.bancontact_label");case"blik":return t.translate("payment.blik_label");case"bizum":return t.translate("payment.bizum_label");case"eps":return t.translate("payment.eps_label");case"ideal":return t.translate("payment.ideal_label");case"mobilepay":return t.translate("payment.mobilepay_label");case"oxxo":return t.translate("payment.oxxo_label");case"mb":return t.translate("payment.multibanco_label");case"mbway":return t.translate("payment.mb_way_label");case"przelewy24":return t.translate("payment.przelewy24_label");case"satispay":return t.translate("payment.satispay_label");case"scalapay":return t.translate("payment.scalapay_label");case"swish":return t.translate("payment.swish_label");case"twint":return t.translate("payment.twint_label");case"usdc":return t.translate("payment.usdc_label");case"vipps":return t.translate("payment.vipps_label");case"wechatpay":return t.translate("payment.wechat_pay_label");case null:case void 0:return"";default:return n}}function gl(){const{i18n:n}=v(),t=N(),a=t.shippingAddress,r=t.deliveryNext,i=T(()=>jt(r.value).find(({method:l})=>l.methodType==="PICKUP_POINT")?.method.pickupLocation),o=T(()=>{const l=i.value,c=a.value??l?.address;if(c)return l?.name?{...c,lastName:l.name}:c}),s=T(()=>{const l=i.value;return l?.type==="PickupPointLocation"&&l.carrierCode?l:void 0});return e(E,{when:o,children:l=>e(_,{gap:"small-200",children:[e(A,{children:n.translate("pickup_point.title")}),e(Ve,{address:l,multiline:!0,hiddenFields:["firstName"]}),e(E,{when:s,children:c=>e(co,{pickupLocation:c})})]})})}function Ae(){return W()?.completedRemoteCheckouts}const tt=" · ",yn="unknown";function fl(){const{i18n:n,shop:{name:t,remoteShopsConfigMap:a}}=v(),r=N().paymentLines,i=_e(Ae()),o=T(()=>{if(!i.value?.length)return;const c=[],u=new Map([[yn,{method:null,items:[]}]]);return r.value?.lines.forEach(d=>{const h=at(d.method);u.set(h,{method:d.method,items:[{shopName:t,cost:d.cost,textKey:`local-${h}`}]})}),i.value.forEach(d=>{const{status:h,shopId:p}=d,m=a?.get(p)?.name||n.translate("thank_you.thank_you_from_other_store");if(h==="failed"){c.push({textKey:`failed-${p}`,remoteShopName:m});return}d.remotePurchaseOrder.paymentLines?.forEach(y=>{const{cost:g,method:f}=y;if(f){const b=at(f);u.has(b)||u.set(b,{method:f,items:[]}),u.get(b)?.items.push({shopName:m,cost:g,textKey:`${b}-${d.checkoutSessionToken}`})}else u.get(yn)?.items.push({shopName:m,cost:g,textKey:`${yn}-${d.checkoutSessionToken}`})})}),{failedCheckouts:c,groupedPayments:Array.from(u.entries()).map(([d,{method:h,items:p}])=>({key:d,method:h,items:p}))}}),s=T(()=>o.value?.groupedPayments??[]),l=T(()=>o.value?.failedCheckouts??[]);return e(E,{when:o,children:e(_,{gap:"small-400",children:[e(nn,{each:s,getKey:c=>c.key,children:({method:c,items:u})=>c?e(_,{gap:"small-400",children:[e(Ta,{cost:void 0,method:c}),e(_,{gap:"small-400",children:u.map(({cost:d,shopName:h,textKey:p})=>e(k,{children:[h,d&&e(O,{children:[tt,n.formatCurrency(d.amount,{currency:d.currencyCode,form:"explicit"})]})]},p))})]}):u.map(({shopName:d,textKey:h})=>e(k,{children:d},h))}),e(nn,{each:l,getKey:c=>c.textKey,children:({remoteShopName:c})=>e(k,{children:[c,tt,n.translate("thank_you.payment_method_not_charged")]})})]})})}function at(n){const t=[Zt(n)];return"brand"in n&&n.brand&&t.push(n.brand),"creditCardLastFourDigits"in n&&n.creditCardLastFourDigits&&t.push(n.creditCardLastFourDigits),"displayLastDigits"in n&&t.pu
1sh(n.displayLastDigits),"code"in n&&t.push(n.code.slice(-4)),n.type==="wallet"&&n.walletContent&&("lastDigits"in n.walletContent&&n.walletContent.lastDigits&&t.push(n.walletContent.lastDigits),"creditCardLastFourDigits"in n.walletContent&&n.walletContent?.creditCardLastFourDigits&&t.push(n.walletContent.creditCardLastFourDigits)),t.join("-")}const rt=" · ";function bl({completedRemoteCheckouts:n}){const t=Be().value,{i18n:a,shop:{name:r,remoteShopsConfigMap:i}}=v(),o=hr(n);if(!o.length)return null;const s=o.map(l=>{const c=`${i?.get(l.shopId)?.name||a.translate("thank_you.thank_you_from_other_store")}${rt}`;return e(w,{children:[c,l.title]},l.handle)});if(t){const l=`${r}${rt}${a.translate("shipping.split_shipping_multiple_shipment_label")}`;return e(_,{gap:"small-200",children:[e(k,{color:"subdued",children:a.translate("thank_you.shipping_method_title")}),l,s]})}return e(_,{gap:"small-200",children:[e(A,{children:a.translate("thank_you.shipping_method_title")}),s]})}function it({shippingRequired:n=!0}={}){const{i18n:t}=v(),a=N().shippingAddress,r=Be();return n?e(E,{when:a,children:i=>e(_,{gap:"small-200",children:[e(E,{when:r,fallback:e(A,{children:t.translate("thank_you.shipping_address_title")}),children:e(k,{color:"subdued",children:t.translate("thank_you.shipping_address_title")})}),e(Ve,{address:i,multiline:!0})]})}):null}function vl(){const n=N(),t=n.deliveryNext,a=n.remoteMerchandiseDetails,{i18n:r,shop:i}=v(),o=i.hasFlagEnabled(Jr),s=_e(Ae()),l=T(()=>!!s.value?.some(m=>m.status==="submitted")),c=T(()=>{const m=t.value;return!!(m&&m.status!=="unavailable")}),u=T(()=>{const m=t.value;if(!m||m.status==="unavailable")return[];const y=o&&m.lines.some(g=>g.targetMerchandiseLines?.some(f=>f.properties.some(b=>b.name==="_shopify_non_subscription_item")));return m.lines.filter(g=>!y||g.type!=="SUBSCRIPTION")}),d=T(()=>{const m=new Set(u.value.map(({type:y})=>y));return m.size>1&&m.has("SUBSCRIPTION")}),h=T(()=>{const m=new Set;return Xt(u.value).flatMap((y,g)=>{const f=ei(y);if(!f)return[];if(y.type==="ONE_TIME_PURCHASE"&&y.status==="available"&&Oi({line:y,method:f})){const b=aa(f,y.id??`index-${g}`);if(m.has(b))return[];m.add(b)}return[{deliveryLine:y,selectedDeliveryMethod:f}]})}),p=(m,y)=>!d.value&&m.type==="ONE_TIME_PURCHASE"?y?.title:m.type==="ONE_TIME_PURCHASE"?`${r.translate("shipping.shipping_method_first_shipment_group_title",{count:1})} · ${y?.title}`:`${r.translate("shipping.shipping_method_recurring_shipments_group_title.other")} · ${y?.title}`;return e(E,{when:c,children:e(_,{gap:"small-200",children:[e(A,{children:r.translate("thank_you.shipping_method_title")}),e(nn,{each:h,getKey:({selectedDeliveryMethod:m})=>m.handle,children:({deliveryLine:m,selectedDeliveryMethod:y})=>{const g=p(m,y);if(l.value){const{shopName:f}=ni({deliveryLine:m,remoteMerchandiseDetails:a.value,remoteShopsConfigMap:i.remoteShopsConfigMap,localShopId:i.id,localShopName:i.name});return e(w,{children:`${f} · ${y.title}`})}return e(w,{children:g})}})]})})}function kl({shippingRequired:n,showMethods:t}){const a=Ae();return!n&&!a?.length?null:t?e(O,{children:[e(it,{shippingRequired:n}),e(vl,{})]}):e(O,{children:[e(it,{shippingRequired:n}),a?.length?e(bl,{completedRemoteCheckouts:a}):null]})}function Cl(){const{i18n:n}=v(),{track:t}=Ce("follow_link");return e(O,{children:e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(k,{children:n.translate("completed_with_shop_pay.text",{shopPay:e(an,{inline:!0,color:"branded",size:"xsmall"})})}),e(ye,{target:"_blank",href:"https://shop.app/pay",onClick:()=>t("learn_more_pay"),children:n.translate("completed_with_shop_pay.learn_more")})]})})}function Sl({message:n,loading:t}){return t?e(xe,{children:e(mr,{lines:1,size:"base"})}):n?e(k,{children:n}):null}function Tl({message:n,loading:t,completedWithShopPay:a}){return e(_,{gap:"small-300",children:[e($e,{}),e(_r,{blockSize:"small-500"}),n||t?e(Sl,{message:n,loading:t}):null,a?e(Cl,{}):null]})}function Pl(){const{checkout:n,i18n:t,shop:a,url:r,mobileCheckoutSdk:i,source:o,embed:s}=v(),{billingAddress:l,buyerIdentity:c,contactInfo:u,deliveryNext:d,paymentLines:h}=N(),p=T(()=>h.value?.lines??[]),m=ti(),y=Be(),g=qe(),f=ol(),b=yr(),C=sn(),S=ke("Checkout::CustomerInformation::RenderAfter"),P=ke("Checkout::ThankYou::CustomerInformation::RenderAfter"),I=t.translate("thank_you.customer_information_title"),R=t.translate("thank_you.contact_information_title"),M=t.translate("thank_you.payment_method_title"),L=t.translate("thank_you.billing_address_title"),V=t.translate("thank_you.view_business_customer_account"),q=o.type==="draftOrder",Q=i.variant.isStandard()||s?.isCheckoutKit(),J=!a.hasFlagEnabled(ai),x=T(()=>{const K=n.latestReceipt.value;return K?.status==="processed"?K:void 0}),Z=T(()=>{const K=x.value?.shopAppLinksAndResources;return K?{...K}:void 0}),G=T(()=>x.value?.isRedacted??!1),te=T(()=>!!x.value?.completedRemoteCheckouts?.length),pe=T(()=>c.value?.purchasingCompany),Se=T(()=>l.value??pe.value?.location.billingAddress),ne=T(()=>!!c.value?.customerProfile),Te=T(()=>{const K=c.value,me=u.value;return[K?.purchasingCompany?K.customerProfile?.fullName:void 0,me?.email??me?.phone].filter(Oe=>!!Oe)}),ge=T(()=>ri(d.value)),Pe=T(()=>ii(d.value)),Le=T(()=>!Pe.value&&!ge.value),ae=T(()=>!y.value),fe=T(()=>!!b.value.shippableDeliveryLines?.length),he=T(()=>!y.value||g.value),Ge=T(()=>!Q&&!q&&a.hasStorefront&&ne.value),mn=T(()=>!n.configuration.isUniversalCheckoutFinalizer&&!!a.loginLinkVisible&&(Ge.value||!!pe.value)),Bn=T(()=>{const K=p.value;return!!(!m.value&&K.length||te.value||oi({checkout:n})&&K.length)}),Ya=T(()=>!te.value&&p.value.length>0),qa=T(()=>!g.value),$a=T(()=>!g.value&&Bn.value||!!Se.value),Wa=T(()=>!G.value),Va=T(()=>{const K=n.rememberMe.response.value,me=n.rememberMe.status.value,Oe=!!K?.data,Ka=p.value.some(({method:Hn,cost:Qa})=>Qa?.amount&&Hn.type==="wallet"&&["SHOP_PAY","SHOPIFY_INSTALLMENTS"].includes(Hn.name)),Un=!!((J?Z.value?.shopPayOrder:!!Ka)||Oe),ja=Oe||me==="loading";if(!(G.value||n.configuration.isUniversalCheckoutFinalizer||!Un&&!ja))return{completedWithShopPay:Un,loading:me==="loading",message:K?.data}}),Ga=T(()=>!G.value&&!n.configuration.isUniversalCheckoutFinalizer&&f.value),Fn=()=>e(E,{when:Bn,children:e(_,{gap:"small-200",children:[e(E,{when:he,fallback:e(k,{color:"subdued",children:M}),children:e(A,{children:M})}),e(E,{when:Ya,children:e(_,{gap:"small-200",children:e(nn,{each:p,getKey:({method:K,cost:me})=>`${Zt(K)}-${me?.amount}`,children:({method:K,cost:me})=>e(Ta,{cost:me,method:K})})})}),e(E,{when:te,children:e(fl,{})})]})});return e(Il,{sectionTitle:I,renderAsCard:he,afterStack:e(E,{when:Ga,children:e(Vs,{})}),children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",children:[e(A,{children:I}),e(E,{when:mn,children:e(ye,{href:r.account(),children:V})})]}),e(U,{gridTemplateColumns:"@media (inline-size >= small) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= small) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"large-100",children:[e(z,{children:e(ot,{renderAsCard:he,children:[e(E,{when:Wa,children:e(wl,{contactInformationLine
1s:Te,renderAsCard:he,title:R})}),e(E,{when:pe,children:e(ul,{})}),e(E,{when:g,fallback:e(O,{children:[e(E,{when:ge,children:e(pl,{})}),e(E,{when:Pe,children:e(gl,{})}),e(E,{when:Le,children:e(El,{shippingRequired:fe,showMethods:ae})})]}),children:Fn()})]})}),e(E,{when:$a,children:e(z,{children:e(ot,{renderAsCard:he,children:[e(E,{when:qa,children:Fn()}),e(cl,{}),e(E,{when:Se,children:K=>e(_,{gap:"small-200",children:[e(E,{when:he,fallback:e(k,{color:"subdued",children:L}),children:e(A,{children:L})}),e(Ve,{address:K,multiline:!0})]})})]})})})]}),e(E,{when:Va,children:({completedWithShopPay:K,loading:me,message:Oe})=>e(Tl,{message:Oe,loading:me,completedWithShopPay:K})}),e(Ml,{journey:C,defaultExtensions:S,thankYouExtensions:P})]})}function Il({afterStack:n,children:t,renderAsCard:a,sectionTitle:r}){const{shop:i}=v(),o=i.hasFlagEnabled(ue),s=a.value;return e(Re,{target:s?"edgeToEdgeCard":"plain",children:e(z,{accessibilityLabel:r,colorLayer:s&&!o?"control":void 0,children:[e(_,{gap:"base",padding:s?"base":"base none",children:t}),n]})})}function ot({children:n,renderAsCard:t}){return e(_,{gap:t.value?"base":"large-100",children:n})}function wl({contactInformationLines:n,renderAsCard:t,title:a}){return e(_,{gap:"small-200",children:[e(E,{when:t,fallback:e(k,{color:"subdued",children:a}),children:e(A,{children:a})}),e(dl,{lines:n.value})]})}function El({shippingRequired:n,showMethods:t}){return e(kl,{shippingRequired:n.value,showMethods:t.value})}function Ml({journey:n,defaultExtensions:t,thankYouExtensions:a}){const r=n.value.currentDetour?.type==="thankYou"?a:t;return e(Je,{customizations:r})}function Rl(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ue),r=N().contactInfo,i=si(),o=T(()=>r.value?.email?n.translate("thank_you.gift_card_email_title",{count:i.value}):n.translate("thank_you.gift_card_text_title",{count:i.value})),s=T(()=>r.value?.email?n.translate("thank_you.gift_card_confirmation_by_email_typ",{count:i.value}):n.translate("thank_you.gift_card_confirmation_by_text_typ",{count:i.value}));return e(z,{accessibilityLabel:o.value,colorLayer:a?void 0:"control",children:e(_,{gap:"base",children:[e(A,{children:o}),e(w,{children:e(Ee,{children:s})})]})})}const Al=(...n)=>{const t=n.find(a=>a?.firstName&&a?.lastName)||n.find(a=>a?.lastName);return t?{firstName:t.firstName,lastName:t.lastName}:{}},Ll=" • ";function st(){const{i18n:n,checkout:t}=v(),a=_e(W()),{buyerIdentity:r,shippingAddress:i,billingAddress:o}=N(),s=An(),c=Ae()?.some(b=>b.status==="failed"),u=Ne(),d=Ut(),h=T(()=>!d||t.thankYouEntrance.phase.value==="settled"),p=T(()=>{const b=r.value?.purchasingCompany,C=r.value?.customerProfile,{firstName:S,lastName:P}=b&&C?{firstName:C.firstName??void 0,lastName:C.lastName??void 0}:Al(o.value,i.value),I=a.value?.isRedacted?null:n.formatName(S,P);return I?n.translate("thank_you.page_title",{display_name:I}):n.translate("thank_you.page_title_no_name")}),m=T(()=>{const b=a.value?.orderIdentity.buyerIdentifier||null,C=!!a.value?.completedRemoteCheckouts?.length;return!s.value&&b&&!C?n.translate("order_summary.confirmation_number_label",{confirmation_number:`${b}`}):null}),y=T(()=>{const b=a.value?.purchaseOrderNumber;return b?n.translate("thank_you.purchase_order_number_title",{purchase_order_number:b}):null}),g=T(()=>!!m.value||!!y.value);if(c)return null;const f=e(O,{children:[e(E,{when:g,children:()=>e(w,{color:"subdued",textAlign:u?"center":void 0,children:[e(E,{when:m,children:b=>e(O,{children:[b,e(E,{when:y,children:Ll})]})}),y]})}),e(A,{level:1,autoFocus:h.value,textAlign:u?"center":void 0,children:p})]});return u?e(Re,{target:"card",children:e(z,{accessibilityRole:"presentation",className:De.ThankYouEntranceHeading,colorLayer:"control",children:e(_,{gap:"small-300",children:f})})}):e(Ai,{status:"success",children:f})}const lt=n=>n.reduce((t,a)=>t+(a.quantity??0),0);function xl({confirmedShops:n,failedShops:t}){const{i18n:a}=v(),r=ce(()=>lt(n),[n]),i=ce(()=>lt(t),[t]),o=r+i;return e(A,{children:a.translate("thank_you.confirmed_items_count",{confirmed_count:r,total_count:o})})}function Dl({thumbnailUrl:n,thumbnailAlt:t,primaryText:a,secondaryText:r,orderAmount:i,checkoutUrl:o,buttonText:s}){const{i18n:l}=v(),c=i?l.formatCurrency(i.amount,{currency:i.currencyCode,form:"short"}):void 0;return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(In,{alt:t,size:"small",src:n}),e(_,{gap:"base",children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(_,{children:[a,r&&e(k,{color:"subdued",children:r})]}),c?e(k,{type:"strong",children:c}):null]}),o&&s&&e(D,{inlineSize:"@media (inline-size >= extraSmall) fit-content, 100%",children:e(de,{variant:"secondary",size:"small",onClick:()=>window.open(o,"_blank"),inlineSize:"fill",children:e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(k,{children:s}),e(re,{type:"external",size:"small"})]})})})]})]})}function ct({image:n,quantity:t,title:a,subtitle:r,totalPrice:i}){const{i18n:o}=v();return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(D,{children:e(In,{alt:n?.altText,size:"base",src:n?.url,totalItems:t})}),e(D,{blockAlignment:"center",children:e(_,{children:[e(k,{children:a}),r&&e(k,{color:"subdued",children:r})]})}),i?e(D,{blockAlignment:"center",children:e(k,{children:o.formatCurrency(i.amount,{currency:i.currencyCode,form:"short"})})}):null]})}const Nl="·";function Ol({deliveryLines:n,merchandiseItems:t}){const{i18n:a}=v(),r=!!(n&&n.length>=Rn);if(!r&&(!t||!t.length))return null;if(r){const i=[];return n?.forEach(o=>{if(!We(o))return;const s=o.methods.find(l=>l.handle===o.selectedDeliveryMethodHandle);s&&i.push({line:o,selectedMethod:s})}),i.length?e(_,{gap:"large-200",children:i.map(({line:o,selectedMethod:s},l)=>e(_,{gap:"base",children:[e(_,{children:[e(_,{direction:"inline",gap:"small-400",children:[e(k,{type:"strong",children:a.translate("shipping.split_shipping_shipment_number",{number:l+1})}),e(k,{children:Nl}),e(k,{children:s.title})]}),e(k,{color:"subdued",children:s.deliveryPromisePresentmentTitle?.long})]}),o.targetMerchandiseLines?.map(c=>{const u=t?.find(d=>d.id===c.stableId);return u?e(ct,{image:u.image,quantity:u.quantity,title:u.title,subtitle:u.subtitle,totalPrice:u.totalPrice},c.id):null})]},o.id||l))}):null}return e(_,{gap:"base",children:t?.map(i=>e(ct,{image:i.image,quantity:i.quantity,title:i.title,subtitle:i.subtitle,totalPrice:i.totalPrice},i.id))})}const ut="·",Bl=En("ShopOrderSummaryTooltip");function Fl({details:n}){const{i18n:t,shop:a}=v(),r=n.shopId===a.id,i=wn(void 0,Bl),o=!!("deliveryLines"in n&&n.deliveryLines&&n.deliveryLines.length>=Rn);return e(Sr,{title:t.translate("order_summary.cost_table_title"),children:[n.subtotal&&e(Ke,{children:[e(je,{children:e(_,{direction:"inline",gap:"small-400",children:[e(k,{children:t.translate("order_summary.subtotal_label")}),n.quantity&&e(O,{children:[e(k,{children:ut}),e(k,{children:t.translate("thank_you.thank_you_item_label",{count:n.quantity})})]})]})}),e(Qe,{children:e(k,{children:t.formatCurrency(n.subtotal.amount,{currency:n.subtotal.currencyCode,form:"short"})})})]}),r&&e(gr,{disableTooltip:!0}),"shippingTotal"in n&&n.shippingTotal&&e(Ke,{children:[e(je,{children:e(_,{direction:"inline",gap:"small-400",children:[e(k,{children:t.translate("order_summary.shipping_label")}),n.deliveryMethodHandle&&!o&&e(O,{children:[e(k,{children:ut}),e(k,{children:n.deliveryMethodHandle})]})]})}),e(Qe,{children:e(k,{letterCase:n.shippingTotal.amount===0?"uppercase":void 0,children:n.shippingTotal.amount===0?t.translate("order_summary.free_shipping_total_label"):t.formatCurrency(n.shippingTotal.amount,{currency:n.shippingTotal.currencyCode,form:"short"})})})]}),"estimatedTaxes"in n&&n.estimatedTaxes&&e(Ke,{children:[e(je,{children:e(_,{direction:"inline",gap:"small-300",alignItems:"center",children:[e(k,{children:t.translate("order_summary.estimated_taxes_label")}),e(re,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.estimated_taxes_label")})}),e(fr,{id:i,children:t.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}),e(Qe,{children:e(k,{children:t.formatCurrency(n.estimatedTaxes.amount,{currency:n.estimatedTaxes.currencyCode,form:"short"})})})]}),r&&e(br,{}),r&&e(vr,{}),r&&e(kr,{disableTooltip:!0}),"checkoutTotal"in n&&n.checkoutTotal&&e(Ke,{children:[e(je,{children:e(A,{level:1,children:t.translate("order_summary.total_label")})}),e(Qe,{children:e(A,{level:1,children:t.formatCurrency(n.checkoutTotal.amount,{currency:n.checkoutTotal.currencyCode,form:"short"})})})]}),r&&e(Cr,{})]})}function Ul({details:n,open:t,onClose:a,onAfterHide:r}){const{i18n:i}=v();return e(Pr,{id:`order-modal-${n.shopId}`,open:t,onHide:a,onAfterHide:r,heading:n.shopName?i.translate("thank_you.thank_you_from_shop",{shop_name:n.shopName}):i.translate("thank_you.thank_you_from_other_store"),size:"base",children:e(Tr,{children:e(_,{gap:"base",children:[e(z,{children:e(Ol,{deliveryLines:"deliveryLines"in n?n.deliveryLines:void 0,merchandiseItems:n.merchandiseItems})}),e($e,{}),e(z,{children:e(Fl,{details:n})}),"orderConfirmationNumber"in n&&n.orderConfirmationNumber&&e(k,{color:"subdued",children:i.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}),"trackingUrl"in n&&n.trackingUrl&&e(de,{variant:"primary",size:"base",inlineSize:"fill",onClick:n.trackingUrl?()=>window.open(n.trackingUrl,"_blank"):void 0,children:e(_,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(k,{children:i.translate("thank_you.track_your_order_link_text")}),e(re,{type:"external",size:"small"})]})})]})})})}function hn(){const n=N().contactInfo;return T(()=>{const t=n.value,a=t?.email!=null&&t?.email.length>0,r=t?.phone!=null&&t?.phone.length>0;return{confirmWithEmail:a,confirmWithPhone:r}})}function Hl({itemCount:n}){const{i18n:t}=v(),{confirmWithEmail:a,confirmWithPhone:r}=hn().value,i=n>1,o=(()=>
1{if(a)return i?t.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(r)return i?t.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")})();return e(Pn,{tone:"info",iconHidden:!0,heading:t.translate("thank_you.confirmed"),children:e(w,{children:o})})}function zl({itemCount:n}){const{i18n:t}=v();return e(Pn,{tone:"critical",heading:t.translate("thank_you.thank_you_unconfirmed_items_heading",{count:n}),children:e(w,{children:t.translate("thank_you.thank_you_unconfirmed_items_description",{count:n})})})}function dt({status:n,detailsList:t}){const a=ee(null),r=ee(!1),{shop:i,i18n:o}=v(),s=i.hasFlagEnabled(ue),l=!!Ae()?.some(p=>p.status==="failed"),c=i.hasFlagEnabled(li);if(!t.length)return null;const u=n==="confirmed",d=t[0].status==="failed"?t[0].recoveryUrl:void 0,h=t.find(p=>p.shopId===a.value);return e(O,{children:[e(z,{overflow:"hidden",colorLayer:s?void 0:"control",children:e(_,{gap:"base",children:[e(Yl,{isConfirmed:u,hasFailedRemoteCheckouts:l,detailsList:t}),t.map((p,m)=>{const y=m===t.length-1;return e(_,{gap:"base",children:[e(Dl,{primaryText:e(_,{direction:"inline",gap:"small-400",children:[e(ye,{textDecoration:"none",onClick:()=>{a.value=p.shopId,r.value=!0},children:o.translate("thank_you.thank_you_item_label",{count:p.quantity??0})}),e(k,{children:Ir}),e(k,{children:p.shopName||o.translate("thank_you.thank_you_from_other_store")})]}),secondaryText:ql({details:p,i18n:o}),orderAmount:p.checkoutTotal,thumbnailUrl:p.merchandiseItems?.[0]?.image?.url,thumbnailAlt:p.merchandiseItems?.[0]?.image?.altText,...p.status==="failed"?Wl({details:p,i18n:o,isSingleCheckoutButtonEnabled:c}):$l({details:p,i18n:o})}),!y&&e(wr,{below:"small",children:e($e,{direction:"inline",borderWidth:"base"})})]},p.shopId)}),!u&&c&&d&&e(de,{onClick:()=>window.open(d,"_blank"),inlineSize:"fill",variant:"primary",children:e(U,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(k,{children:o.translate("thank_you.checkout_again")}),e(re,{type:"external",size:"small"})]})})]})}),h&&e(Ul,{open:r.value,onClose:()=>r.value=!1,onAfterHide:()=>a.value=null,details:h})]})}function Yl({isConfirmed:n,hasFailedRemoteCheckouts:t,detailsList:a}){if(n)return t?e(Hl,{itemCount:a.length}):null;const r=a.filter(i=>i.status==="failed").reduce((i,o)=>i+(o.quantity||0),0);return e(zl,{itemCount:r})}function ql({details:n,i18n:t}){if(n.status==="failed")return t.translate("payment_errors.generic_error");if("orderConfirmationNumber"in n&&n.orderConfirmationNumber)return t.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}function $l({details:n,i18n:t}){return{buttonText:n.shopName?t.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:n.shopName}):t.translate("thank_you.checkout_on_another_store")}}function Wl({details:n,i18n:t,isSingleCheckoutButtonEnabled:a}){return a?{checkoutUrl:void 0,buttonText:void 0}:{checkoutUrl:n.recoveryUrl,buttonText:n.shopName?t.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:n.shopName}):t.translate("thank_you.checkout_on_another_store")}}function Vl(){const n=Mn();return T(()=>{const t=n.value.filter(We);if(!t.length)return;const[{methods:[{costAfterDiscounts:{currencyCode:a}}]}]=t;return{amount:t.reduce((i,o)=>{const s=o.methods?.find(({handle:l})=>l===o.selectedDeliveryMethodHandle);return s?i+(s.costAfterDiscounts.amount??0):i},0),currencyCode:a}})}function Gl(){const n=W(),t=ci(),a=Qt();return T(()=>{const r=n?.purchaseOrder.paymentDue,i=n?.checkoutTotal;return ui({paymentDue:r,checkoutTotal:i,orderDeposit:a.value,hasFixedSellingPlan:t.value})})}function pt(n){return n?.length?n.reduce((t,a)=>t+a.quantity,0):0}function Kl(n){if(n?.length)return n.reduce((t,a)=>a.lineAmount?{amount:(t?.amount||0)+a.lineAmount.amount,currencyCode:a.lineAmount.currencyCode}:t,void 0)}function jl(n){return n.map(({stableId:a,title:r,subtitle:i,image:o,quantity:s,totalPrice:l})=>a?{id:a,title:r,subtitle:i||void 0,image:o?.url?{url:o.url,altText:o.altText||void 0}:void 0,quantity:s,totalPrice:l}:null).filter(a=>a!==null)}function ht(n){return n.map(({stableId:a,title:r,productTitle:i,image:o,quantity:s,price:l})=>({id:a,title:i,subtitle:r||void 0,image:o?{url:o.url,altText:o.altText||void 0}:void 0,quantity:s,totalPrice:l})).filter(a=>a!==null)}function Ql(){const n=Ae(),{shop:{name:t,id:a,brandSettings:r,remoteShopsConfigMap:i}}=v(),{totalLineQuantities:o}=Ht(),s=Gl(),l=W(),c=Er(),d=N().taxes.value,{value:h}=Jt("ONE_TIME_PURCHASE"),p=Ln(h),m=Mn(),y=Vl();return ce(()=>{const g=[],f=[];if(!n?.length)return{confirmedShops:[],failedShops:[]};if(o&&o>0){const b=jl(c)||[],C=d&&d.status==="available_total"?d.totalTax:void 0,S={shopId:a,shopName:t,shopLogo:r?.squareLogo?.url,quantity:o,checkoutTotal:s.value,merchandiseItems:b,subtotal:l?.subtotal,estimatedTaxes:C,shippingTotal:y.value,deliveryMethodHandle:p?.title,orderConfirmationNumber:l?.orderIdentity?.buyerIdentifier||void 0,trackingUrl:l?.orderStatusPageUrl||void 0,deliveryLines:m.value,status:"confirmed"};g.push(S)}
1return n?.length&&n.forEach(b=>{if(b.status==="submitted"){const{orderIdentity:{buyerIdentifier:C},orderStatusPageUrl:S,remotePurchaseOrder:{merchandiseLines:P,deliveryLines:I,checkoutTotal:R,subtotalBeforeTaxesAndShipping:M,tax:L}}=b,V={shopId:b.shopId,shopName:i?.get(b.shopId)?.name,shopLogo:i?.get(b.shopId)?.brandSettings?.squareLogo?.url,quantity:pt(P),checkoutTotal:R,subtotal:M,estimatedTaxes:L,shippingTotal:Kl(I),merchandiseItems:ht(P)||[],deliveryMethodHandle:I?.[0]?.title,orderConfirmationNumber:C||void 0,trackingUrl:S||void 0,status:"confirmed"};g.push(V)}if(b.status==="failed"){const{recoveryUrl:C,merchandiseLines:S,checkoutTotal:P,subtotalBeforeTaxesAndShipping:I,tax:R}=b,M={shopId:b.shopId,shopName:i?.get(b.shopId)?.name,shopLogo:i?.get(b.shopId)?.brandSettings?.squareLogo?.url,quantity:pt(S),checkoutTotal:P,subtotal:I,estimatedTaxes:R,merchandiseItems:ht(S)||[],recoveryUrl:C,status:"failed"};f.push(M)}}),{confirmedShops:g,failedShops:f}},[n,a,t,o,s.value,l,r?.squareLogo?.url,i,c,d,p,m.value,y.value])}function Zl(){const{confirmedShops:n,failedShops:t}=Ql(),a=!!t?.length,r=!!n?.length;return!r&&!a?null:e(_,{gap:"base",children:[a?e(xl,{confirmedShops:n,failedShops:t}):null,r?e(dt,{status:"confirmed",detailsList:n}):null,a?e(dt,{status:"failed",detailsList:t}):null]})}const Xl=()=>{const{i18n:n}=v();return e(_,{padding:"base",children:e(A,{children:n.translate("thank_you.offers.title")})})},mt=(n,t=X)=>{if(n.origin!=="https://shop.app"||n.data===void 0||n.data.type!=="redirect")return;const a=n.data.redirect_to;if(a===void 0)return;const r=new URL(a);`${r.protocol}//${r.hostname}`=="https://shop.app"&&(n.data.open_in_new_tab!==void 0&&n.data.open_in_new_tab===!0&&typeof t.open=="function"?t.open(a,"_blank","noopener,noreferrer"):t.location.href=a)},Jl=({shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:i,hideButtons:o,hideHeader:s,accentColor:l,darkMode:c})=>{const u=j(null);F(()=>{const h=m=>{m.origin==="https://shop.app"&&clearTimeout(p)},p=setTimeout(()=>{u.current?.iframeRef?.current&&(u.current.iframeRef.current.style.height="0px")},2e3);return X.addEventListener("message",mt),X.addEventListener("message",h),()=>{X.removeEventListener("message",mt),clearTimeout(p)}},[]);const{authorizeUrl:d}=eo({avoidPayAltDomain:!0,avoidSdkSession:!0,analyticsContext:"shopCashOffers",proxy:!0,locale:void 0,flow:"shop_cash_offers",redirectType:"iframe",responseType:"code",clientId:"",shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:i,hideButtons:o,hideHeader:s,accentColor:l,darkMode:c});return e(no,{proxy:!0,insideModal:!1,ref:u,src:d,scrolling:"no",variant:"default"})},ec=()=>oa(({element:n,...t})=>e(ca,{element:n,featureName:"ShopCashOffers",children:e(sa,{children:e(la,{children:e(Xi,{children:e(Ji,{children:e(Jl,{...t})})})})})}),{name:"shop-cash-offers",props:{shopId:"number",personalizeAds:"boolean",placement:"string",orderId:"number",checkoutToken:"string",hideButtons:"boolean",hideHeader:"boolean",accentColor:"string",darkMode:"boolean"},shadow:"open"});function nc(){const{shop:n}=v(),t=n.hasFlagEnabled(di),{colors:{global:a,schemes:r={}}}=zt(),{main:i}=kn(),o=r[i.colorScheme??"scheme1"],s=i.section?.colorScheme?r[i.section.colorScheme]:void 0,l=t?Ze(s,a?.control)??Ze(o,a?.control)??Ze(r.scheme1,a?.control):Ze(o),c=l===void 0?t:_t(l),u=a?.accent,d=u!==void 0&&c!==_t(u);return{...c?null:{dark_mode:"true"},...d?{accent_color:u.toRgb()}:null}}function Ze(n,t){if(n==null)return;const a=n.control?.background??t;return a==null||pi(a)?n.base?.background:a}function _t(n){return typeof n>"u"?!1:n.getYiqPerceivedBrightness()>=.65}const yt=new URL("https://shop.app"),gt=String(!0),ft="thank_you",tc="https://shop.app/offers-compact",ac="211px",bt="100%";function rc(n,t){const a=new URL(n).toString(),r=new URLSearchParams(t).toString();return`${a}?${r}`.toString()}const ic=Xa(({shopId:n,personalizeAds:t,preview:a,orderId:r,checkoutSessionIdentifier:i,setHeight:o},s)=>{const l=String(t),c=nc(),{i18n:u,observability:d,url:h}=v(),p=j(null),m=j(null),y=()=>p.current?.shadowRoot?.querySelector("iframe")??m.current,g=!!r||a;if(F(()=>{const f={type:g?"iframe":"shop-js-iframe"};d.counter({name:"shop_ads_2p_rail_render_started",value:1,attributes:f}),d.log("shop_ads_2p_rail_render_started","shop_ads_2p_rail_render_started",{...f})},[g,d]),F(()=>{const f=b=>{if(b.origin!==yt.origin)return;const C=b?.data?.type,S=b?.data?.redirect_to;
1if(C==="resize_iframe"){let P=b?.data?.height;const I=b?.data?.width;if(typeof P=="number"&&typeof I=="number"){P=P>0?P:0,o(P);const R={type:P>0?"with_content":"without_content"};d.counter({name:"shop_ads_2p_rail_resize",value:1,attributes:R}),d.log("shop_ads_2p_rail_resize","shop_ads_2p_rail_resize",{height:P,width:I,...R});const M=y();M&&(M.style.height=`${P}px`,M.style.width=bt)}}else if(g&&C==="redirect"&&S!==void 0){const P=new URL(S);(P.origin===yt.origin||P.origin===new URL(h.storefront()).origin)&&(b.data.open_in_new_tab!==void 0&&b.data.open_in_new_tab===!0?window.open(S,"_blank","noopener,noreferrer"):window.location.assign(S))}};return window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}},[g,o,d,h]),Ja(s,()=>({iframeElement:y}),[]),g){const f=rc(tc,{shop_id:String(n),placement:ft,hide_header:gt,personalize_ads:l,merchant_url:h.storefront(),...a?{preview:String(a)}:null,...r?{order_id:String(r)}:null,...i?{checkout_token:i}:null,...c});return e("iframe",{ref:m,id:"offers",title:u.translate("thank_you.offers.title"),src:f,width:bt,height:ac,scrolling:"no"})}else return typeof window<"u"&&typeof customElements<"u"&&!customElements.get("shop-cash-offers")&&ec(),e("shop-cash-offers",{"shop-id":n,"personalize-ads":l,"hide-header":gt,"dark-mode":c.dark_mode,"accent-color":c.accent_color,placement:ft,"order-id":r,"checkout-token":i,ref:p})});function oc({preview:n}){const{shop:t,source:{checkoutSessionIdentifier:a},consentManager:r}=v(),{id:i}=t,o=parseInt(Ye(i),10),s=r.saleOfDataAllowed.value&&r.marketingAllowed.value,[l,c]=oe(),u=t.hasFlagEnabled(ue),d=W(),h=d?.orderIdentity.id?ea(d.orderIdentity.id):void 0,p=j(null);return e(z,{colorLayer:u?void 0:"control",display:l===0?"none":"block",children:[e(Xl,{}),e(ic,{checkoutSessionIdentifier:a,orderId:h,personalizeAds:s,shopId:o,ref:p,setHeight:c,preview:n})]})}const rn=(n,t)=>{try{const a=new URL(n.replace(/\/$/,""));return Object.entries(t).forEach(([r,i])=>{a.searchParams.append(r,i)}),a.toString()}catch{return n}},Xe=102,sc=32,lc=20,cc=n=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 318 350",...n,children:e("path",{d:"M9.267 33.017C37.148 13.574 77.319 0 120.113 0c114.074 0 197.039 77.132 197.039 182.787 0 98.501-
171.299 167.213-170.479 167.213C61.764 350 .848 292.972.848 216.482c0-51.855 31.182-90.1 75.205-104.994l35.641 60.274c-23.975 11.006-33.018 27.221-33.018 47.307 0 33.017 27.881 56.404 68.052 56.404 49.269 0 88.156-38.905 88.156-91.402 0-61.577-48.608-108.223-114.716-108.223a132.56 132.56 0 0 0-73.243 21.388z"})}),uc="gTxFI",dc="kfcrU",vt={Container:uc,overlay:dc},pc="white";function wa({color:n="branded",containerSize:t=sc,iconSize:a=lc,backgroundColor:r=pc,overlay:i=!1}){const o=n==="branded"?pn.toRgb():n;return e("div",{className:B(vt.Container,i?vt.overlay:""),style:{backgroundColor:r,height:t,width:t,borderRadius:"10px"},children:e(cc,{"aria-hidden":"true",style:{fill:o},height:a,width:a})})}const hc="_3nOgQ",mc="NmBBp",_c="_0wOrq",yc="I6KnV",gc="e1FkT",fc="Ww91E",bc="sCXu3",vc="iIHiG",kc="oacnN",Cc="_8Slfk",Sc="_2i0qK",Tc="xjUvL",Pc="Iiyyo",ie={Root:hc,Ready:mc,Track:_c,Fill:yc,FillDelivered:gc,Rail:fc,Marker:bc,StageIcon:vc,Confirmed:kc,Delivered:Cc,InTransit:Sc,OutForDelivery:Tc,CheckPath:Pc},Ic=En("tracking-delivered-gradient-");function wc(){return e("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[e("circle",{cx:"20",cy:"20",fill:"#000",r:"20"}),e("path",{className:ie.CheckPath,d:"m12.25 20.5 5 5 10.5-12",fill:"none",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.25"})]})}function Ec(){const n=wn(void 0,Ic);return e("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[e("defs",{children:e("linearGradient",{id:n,x1:"0",x2:"1",children:[e("stop",{offset:"0",stopColor:"#3ccd7f"}),e("stop",{offset:"1",stopColor:"#56bc39"})]})}),e("circle",{cx:"20",cy:"20",fill:`url(#${n})`,r:"20"}),e("path",{clipRule:"evenodd",d:"M12.5914 21.8064 12.5926 21.8055 12.5944 21.8042 12.6 21.8001 12.6185 21.7863C12.6341 21.7746 12.6562 21.758 12.6844 21.7365 12.7406 21.6937 12.8211 21.6316 12.9223 21.5514 13.1245 21.3909 13.4102 21.1574 13.7514 20.8594 14.4326 20.2647 15.3426 19.407 16.2553 18.3551 18.0477 16.2895 20 13.3052 20 10 20 5.58172 16.4183 2 12 2 7.58172 2 4 5.58172 4 10c0 3.3052 1.95225 6.2895 3.74471 8.3551.91273 1.0519 1.82269 1.9096 2.50389 2.5043.3412.298.6269.5315.8291.692.1012.0802.1817.1423.2379.1851.0282.0215.0503.0381.0659.0498l.0185.0138.0056.0041.0025.0018c.352.2582.8313.2585 1.1833.0004ZM11.9978 12.5A2.5 2.5 0 1 0 11.9978 7.5a2.5 2.5 0 0 0 0 5Z",fill:"white",fillRule:"evenodd",transform:"translate(8 8)"})]})}function Mc({animate:n=!0}={}){return e("div",{"aria-hidden":"true",className:B(ie.Root,{[ie.Ready]:n}),children:e("div",{className:ie.Track,children:[e("span",{className:ie.Fill}),e("span",{className:ie.FillDelivered}),e("span",{className:ie.Rail}),e("span",{className:ie.Marker,children:[e("span",{className:B(ie.StageIcon,ie.Confirmed),children:e(wc,{})}),e("span",{className:B(ie.StageIcon,ie.InTransit)}),e("span",{className:B(ie.StageIcon,ie.OutForDelivery)}),e("span",{className:B(ie.StageIcon,ie.Delivered),children:e(Ec,{})})]})]})})}const Rc=n=>e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 393 63",...n,children:[e("path",{fill:"currentColor",d:"M57.69 28.063q.963 0 1.827.357a4.1 4.1 0 0 1 1.527 1.095q.672.74 1.054 1.901.382 1.154.382 2.781v.017q0 2.016-.581 3.453-.581 1.435-1.669 2.208-1.079.763-2.581.763-1.104 0-1.992-.398a4.1 4.1 0 0 1-1.461-1.112 3.9 3.9 0 0 1-.772-1.627l-.017-.092h2.1l.034.083q.157.415.448.73.299.316.714.49.423.167.946.167.945 0 1.544-.556.605-.566.905-1.503a7.7 7.7 0 0 0 .348-2.092q.009-.124.009-.24v-.241l-.374-2q0-.681-.315-1.238a2.4 2.4 0 0 0-.855-.88 2.27 2.27 0 0 0-1.204-.323 2.3 2.3 0 0 0-1.187.315q-.54.315-.863.864a2.3 2.3 0 0 0-.324 1.212v.016q0 .697.307 1.237.307.531.838.838.532.308 1.212.308t1.22-.3.856-.83.315-1.203v-.017h.498v2.208h-.29a2.9 2.9 0 0 1-.64.88q-.422.407-1.046.656-.613.249-1.444.249-1.146 0-2.025-.515a3.73 3.73 0 0 1-1.386-1.41q-.498-.898-.498-2.026v-.017q0-1.22.564-2.166a4 4 0 0 1 1.577-1.494q1.013-.549 2.3-.548m8.559 10.666a1.3 1.3 0 0 1-.947-.373 1.28 1.28 0 0 1-.373-.93q0-.555.373-.93.382-.381.947-.382.572 0 .946.382.373.375.373.93 0 .547-.373.93-.375.373-.946.373m0-6.159a1.3 1.3 0 0 1-.947-.373 1.28 1.28 0 0 1-.373-.93q0-.555.373-.93.382
1-.381.947-.382.572 0 .946.382.373.375.373.93 0 .547-.373.93-.375.373-.946.373m9.579 7.77v-2.3h-5.86v-1.75l.946-1.619a155 155 0 0 1 1.959-3.22q.497-.798.987-1.57.498-.78.996-1.518h3.014v7.91h1.618v1.768H77.87v2.3zm-3.868-4.018h3.9v-6.25h-.124q-.365.564-.755 1.162-.382.597-.772 1.22t-.772 1.253q-.381.622-.755 1.254-.374.623-.722 1.236zm12.484 4.018v-9.87h-.15l-2.98 2.1v-2.009l3.13-2.2h2.133V40.34z"}),e("rect",{width:24,height:12,x:334,y:28.5,stroke:"currentColor",opacity:.35,rx:3.8}),e("path",{fill:"currentColor",d:"M359.5 32.781v4.076a2.21 2.21 0 0 0 1.328-2.038c0-.89-.523-1.693-1.328-2.038",opacity:.4}),e("rect",{width:21,height:9,x:335.5,y:30,fill:"currentColor",rx:2.5}),e("path",{fill:"currentColor",fillRule:"evenodd",d:"M317.771 31.104c2.487 0 4.879.922 6.681 2.576a.355.355 0 0 0 .487-.004l1.297-1.263a.34.34 0 0 0 .105-.248.34.34 0 0 0-.108-.246c-4.731-4.375-12.195-4.375-16.926 0a.35.35 0 0 0-.108.246c0 .093.037.182.105.248l1.298 1.263c.133.13.35.131.486.004 1.803-1.654 4.195-2.576 6.683-2.576m-.004 4.22c1.357 0 2.666.512 3.672 1.436a.344.344 0 0 0 .484-.006l1.287-1.32a.367.367 0 0 0-.005-.519 7.9 7.9 0 0 0-10.873 0 .367.367 0 0 0-.005.52l1.287 1.319a.34.34 0 0 0 .483.006 5.43 5.43 0 0 1 3.67-1.436m2.525 2.794a.4.4 0 0 1-.103.28l-2.177 2.455a.32.32 0 0 1-.241.113.32.32 0 0 1-.242-.113l-2.177-2.455a.4.4 0 0 1-.102-.28.4.4 0 0 1 .113-.276c1.39-1.314 3.426-1.314 4.816 0 .07.07.111.17.113.276M301.7 29.682c0-.633-.478-1.146-1.067-1.146h-1.066c-.589 0-1.067.513-1.067 1.146v9.934c0 .633.478 1.146 1.067 1.146h1.066c.589 0 1.067-.513 1.067-1.146zm-7.434 1.3h1.067c.589 0 1.066.525 1.066 1.173v7.434c0 .648-.477 1.173-1.066 1.173h-1.067c-.589 0-1.067-.525-1.067-1.173v-7.434c0-.648.478-1.174 1.067-1.174m-4.332 2.648h-1.067c-.589 0-1.066.532-1.066 1.189v4.755c0 .656.477 1.188 1.066 1.188h1.067c.589 0 1.067-.532 1.067-1.188v-4.755c0-.657-.478-1.189-1.067-1.189m-5.301 2.445h-1.066c-.589 0-1.067.525-1.067 1.172v2.344c0 .647.478 1.171 1.067 1.171h1.066c.589 0 1.067-.524 1.067-1.171v-2.344c0-.647-.478-1.172-1.067-1.172",clipRule:"evenodd"})]}),Ac="RqWCL",Lc="vcF4y",xc="Z7YHY",Dc="U17Bl",Nc="XiB25",Oc="rRjrG",Bc="nm5oZ",Fc="pXsW1",Uc="XAh5C",Hc="rjvR4",be={Phone:Ac,PhoneReady:Lc,Screen:xc,StatusBar:Dc,Clock:Nc,Island:Oc,Banner:Bc,AppIcon:Fc,Copy:Uc,Time:Hc},zc=28,Yc=17;function kt(n,t){return new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).formatToParts(n).filter(({type:a})=>a!=="dayPeriod").map(({value:a})=>a).join("").trim()}function qc(n){const t=new Date(n),a=n.getHours(),r=a>=20?"tomorrow":"today";return a>=20||a<9?(a>=20&&t.setDate(t.getDate()+1),t.setHours(9,0,0,0)):t.setHours(t.getHours()+1,0,0,0),{day:r,time:t}}function $c({animate:n=!0,title:t,body:a,time:r,now:i}={}){const{i18n:o}=v(),s=i?kt(i,o.locale):"",l=i?qc(i):void 0,c=l?kt(l.time,o.locale):"";let u="";return l?.day==="today"?u=o.translate("thank_you.qr_code.phone_banner.body_today",{time:c}):l&&(u=o.translate("thank_you.qr_code.phone_banner.body_tomorrow",{time:c})),e("div",{"aria-hidden":"true",className:B(be.Phone,{[be.PhoneReady]:n}),children:e("div",{className:be.Screen,children:[e("div",{className:be.StatusBar,children:[e(Rc,{"aria-hidden":"true"}),e("span",{className:be.Clock,dir:"auto",children:s}),e("span",{className:be.Island})]}),e("div",{className:be.Banner,children:[e("span",{className:be.AppIcon,children:e(wa,{backgroundColor:pn.toRgb(),color:"white",containerSize:zc,iconSize:Yc})}),e("span",{className:be.Copy,children:[e("strong",{dir:"auto",children:t??o.translate("thank_you.qr_code.phone_banner.title")}),e("span",{dir:"auto",children:a??u})]}),e("span",{className:be.Time,dir:"auto",children:r??o.translate("thank_you.qr_code.phone_banner.time")})]})]})})}const Wc="HLHdp",Vc="E1A3F",Gc="_2gHo1",gn={PhoneReveal:Wc,PhoneRevealReady:Vc,BarReveal:Gc};function Kc({treatment:n,isReady:t=!0,now:a}){return n==="phone"?e("div",{"aria-hidden":"true",className:B(gn.PhoneReveal,{[gn.PhoneRevealReady]:t}),children:e($c,{animate:t,now:a})}):e("div",{"aria-hidden":"true",className:gn.BarReveal,children:e(U,{accessibilityVisibility:"hidden",gridTemplateRows:t?"1fr":"0fr",overflow:"hidden",children:e(Mc,{animate:t})})})}const jc="eB1Wk",Qc="Ipunz",Zc="F0OjS",Xc="_3ne1k",Jc="_5eMgt",eu="WYqsK",nu="smgwg",tu="v7JCj",au="cnARA",ru="UIp5B",iu="IATLg",ou="JN61f",su="JwOzi",le={QrCodeSkeleton:jc,QrCode:Qc,QrCodeLoaded:Zc,Popover:Xc,Styled
1QrPopover:Jc,TrackingPopover:eu,PopoverContent:nu,PhonePopoverContent:tu,PopoverContentStack:au,TrackingPopoverContent:ru,PopoverCopy:iu,QrCodeCopy:ou,TrackingHeadline:su},lu=[tn.Bar,tn.Phone];function cu(n){return lu.includes(n??"")}function uu(n){const t=ee(void 0);return F(()=>{if(!n)return;let a;const r=()=>{t.value=new Date},i=6e4-Date.now()%6e4;r();const o=window.setTimeout(()=>{r(),a=window.setInterval(r,6e4)},i);return()=>{window.clearTimeout(o),a!==void 0&&window.clearInterval(a)}},[n,t]),t.value}function du({link:n,label:t,message:a,installCampaign:r,styledQrCode:i,onQrCodeInteraction:o}){const{i18n:s,observability:l}=v(),c=Ne(),u=ee(!1),d=j(null),h=j(0),p=ee(!1),m=ee(!1),y=Yt(),g=!u.value,f=m.value,b=u.value&&f,C=r?.variant,S=cu(C),P=S?a?.subtitle:a?.title,I=S?void 0:a?.subtitle,R=$(()=>{o?.()},[o]),M=$(()=>{u.value=!0,d.current!==null&&(l.histogram({name:"qr_code_load_time",value:Math.round(performance.now()-d.current),unit:"ms",attributes:{page:"thank_you"}}),d.current=null)},[l,u]),L=C===tn.Phone,V=uu(L),q=$(()=>{m.value=!0,h.current+=1,!u.value&&d.current===null&&(d.current=performance.now())},[m,u]),Q=$(()=>{m.value=!1,p.value=!1},[p,m]);F(()=>{if(!(!f||!P))return Mr({content:P})},[f,P]),F(()=>{y&&b&&(p.value=!0)},[p,y,b]);const J=x=>{f&&!p.value&&x.propertyName==="filter"&&(p.value=!0)};return e(D,{children:e(da,{impressionType:"download_shop_button",impressionFeatures:["desktop","qr_code"],children:e(de,{inlineSize:c?"fill":void 0,onClick:R,overlay:e(lo,{theme:{popover:{cornerRadius:20}},children:e(po,{keepMounted:!0,padding:"none",positionArea:"inline-end",onHide:Q,onShow:q,children:e(D,{className:B(le.Popover,{[le.TrackingPopover]:S,[le.StyledQrPopover]:i}),children:e(D,{padding:"none",className:B(le.PopoverContent,{[le.TrackingPopoverContent]:S,[le.PhonePopoverContent]:L}),children:e(_,{gap:"none",className:le.PopoverContentStack,children:[e(U,{gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"none",children:[e(U,{gridTemplateColumns:"1fr",children:[g?e(D,{className:le.QrCodeSkeleton,children:e(xe,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%"})}):null,e(D,{className:B(le.QrCode,{[le.QrCodeLoaded]:b}),padding:"none",onTransitionEnd:J,children:[i?e("img",{src:n,height:Xe,width:Xe,alt:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":g,onLoad:M}):e(ho,{src:n,height:Xe,width:Xe,title:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":g,onLoad:M}),i?null:e(wa,{overlay:!0})]})]}),e(D,{children:e(U,{gridTemplateColumns:"1fr",blockSize:"100%",children:e(D,{className:le.QrCodeCopy,children:e(_,{gap:"none",className:le.PopoverCopy,children:[e(D,{className:B({[le.TrackingHeadline]:S}),children:P?e(A,{level:3,children:P}):null}),I?e(w,{children:e(Ee,{children:I})}):null]})})})})]}),S?e(Kc,{isReady:p.value,treatment:C,now:V},h.current):null]})})})})}),children:t})})})}const Ct="order_status_page";class pu extends Error{constructor(){super(...arguments),this.name="ShopMobileClipboardInteractionError"}}function hu({label:n,link:t,onClipboardInteraction:a}){const r=Me(),i=un(),{observability:o,mobileCheckoutSdk:s,embed:l}=v(),c=Ne(),u=s.variant.isStandard()||l?.isCheckoutKit();if(!r)return null;const d=r?.mobileUrlAttributionPayload,h=i.value.defaultAttributes?.visitToken;return e(D,{children:e(da,{impressionType:"download_shop_button",impressionFeatures:["mobile"],children:e(de,{inlineSize:c?"@media (inline-size >= medium) auto, fill":void 0,onClick:async()=>{try{const g=y(d,h);await Ot(g)}catch(g){g instanceof Error&&o.error(new pu(g.message,{cause:g}))}finally{a?.();const g=m(t,h);window.location.href=g}},children:n})})});function m(g,f){const b=new URL(g);return f&&b.searchParams.set("sid",f),u&&b.searchParams.set("open_externally","true"),b.toString()}function y(g,f){return f?`${g},${f},${Ct}`:`${g},,${Ct}`}}function Ea({label:n,message:t,mobileLinkToShop:a,desktopLinkToShop:r,styledQrCode:i,installCampaign:o,onClipboardInteraction:s,onQrCodeInteraction:l}){return hi()?e(hu,{label:n,link:a,onClipboardInteraction:s}):e(du,{label:n,link:r,message:t,styledQrCode:i,installCampaign:o,onQrCodeInteraction:l})}const St="installments_order",mu="open.shop.app";function _u(){const{i18n:n}=v(),t=Me(),{track:a}=Ce("shop_pay_installments_highlight_button");if(F(()=>{t&&a("shop_button_rendered")},[t,a]),!t)return null;const{shopInstallmentsMobileUrl:r,qrCodeUrl:i}=t,o={title:n.translate("installments.installments_highlight_qr_flow_modal.title"),subtitle:n.translate("installments.installments_highlight_qr_flow_modal.subtitle")}
1,s=rn(r,{utm_content:St}),l=rn(i,{link_provider:mu,utm_content:St});return e(Ea,{label:n.translate("installments.installments_highlight_shop_button_get_reminders"),message:o,desktopLinkToShop:l,mobileLinkToShop:s,onClipboardInteraction:()=>{a("arrive")},onQrCodeInteraction:()=>{a("arrive_show_qr_code")}})}function yu(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ue),r=n.translate("installments.installments_highlight_headline");return e(z,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(_,{gap:"large-200",children:[e(A,{children:r}),e(_,{gap:"base",children:[e(w,{children:e(Ee,{children:n.translate("installments.installments_highlight_copy")})}),e(_u,{})]})]})})}function Tt({shipmentGroups:n,title:t,subtitle:a,subtitleIcon:r,address:i,addressHeading:o,modalHeader:s}){const{shop:l}=v(),c=l.hasFlagEnabled(ue);return e(z,{overflow:"hidden",colorLayer:c?void 0:"control",children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:[e(A,{level:2,children:t}),a&&e(_,{direction:"inline",gap:"small-400",alignItems:"center",children:[r&&e(re,{type:r}),e(k,{color:"subdued",children:a})]})]}),n.map((u,d)=>e(_o,{merchandiseLines:u.merchandiseLines,deliveryMethod:u.deliveryMethod,deliveryMethodHandle:u.deliveryMethod.handle,modalHeader:s(d),showPrice:!1,showPriceInModal:!0,showDeliveryIcon:!1,choiceListContext:!1,isNotFirstLine:d>0,showDivider:!1,subtitle:u.deliveryMethod.pickupLocation?.type==="PickupInStoreLocation"?u.deliveryMethod.pickupLocation.instructions:void 0},u.id)),i&&e(_,{gap:"small-200",children:[e(A,{level:3,children:o}),e(Ve,{address:i,multiline:!0})]})]})})}function gu(n,{i18n:t}){const a=n.filter(({selectedMethod:i})=>i.methodType==="PICK_UP");if(a.length===0)return;const[r]=a;return{shipmentGroups:a.map(({id:i,line:o,selectedMethod:s})=>({id:i,deliveryMethod:s,merchandiseLines:(o.targetMerchandiseLines??[]).filter(l=>l.requiresShipping)})),title:t.translate("delivery_options.pickup"),subtitle:t.translate("split_delivery.separate_pickup_email_notice"),address:r.selectedMethod.pickupLocation?.address,addressHeading:t.translate("thank_you.pick_up_in_store_marker.shipping"),modalHeader:()=>t.translate("delivery_options.pickup")}}function fu(n,{checkout:t,i18n:a,shop:r}){const{shippingAddress:i}=t.latestReceipt.value?.status==="processed"?t.latestReceipt.value.purchaseOrder:{},o=n.filter(({selectedMethod:h})=>h.methodType==="SHIPPING");if(o.length===0)return;const s=o.map(({line:h,selectedMethod:p})=>({line:h,method:p})),l=r.marketDrivenShippingEnabled?yo(o.map(({line:h})=>h),s):new Set,c=new Map;o.forEach((h,p)=>{const m=aa(h.selectedMethod,h.line.id??`index-${p}`);c.has(m)||c.set(m,h)});const u=Bi(s).flatMap(({key:h,methods:p,merchandiseLines:m})=>{const y=c.get(h),g=p[0];if(!y||!g)return[];const b=p.find(C=>!l.has(C))??Fi(g);return[{id:y.id,deliveryMethod:b,merchandiseLines:m.filter(C=>C.requiresShipping)}]}),d=u.length;return{shipmentGroups:u,title:a.translate("order_summary.shipping_label"),subtitle:d>1?a.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:d}):void 0,subtitleIcon:"truck",address:i,addressHeading:a.translate("thank_you.shipping_address_title"),modalHeader:h=>d===1?a.translate("order_summary.shipping_label"):a.translate("shipping.split_shipping_merchandise_shipment_number",{number:h+1,total:d})}}function bu(n){return n.status!=="filled"?[]:n.lines.filter(We).flatMap(t=>{const a=Ln(t);return a?[{id:t.id??mi(),line:t,selectedMethod:a}]:[]})}function vu(){const n=v(),{deliveryNext:t}=n.checkout.latestReceipt.value?.status==="processed"?n.checkout.latestReceipt.value.purchaseOrder??{}:{};if(!t)return null;const a=bu(t).filter(({line:o})=>o.type==="ONE_TIME_PURCHASE"),r=gu(a,n),i=fu(a,n);return e(_,{gap:"base",children:[r&&e(Tt,{...r}),i&&e(Tt,{...i})]})}function ku(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(ue),r=n.translate("shipping.shipping_method_title"),i=N().deliveryNext,o=Ui(),s=ra(),l=sn(),c=T(()=>{const S=i.value;if(S?.status!=="filled")return[];const P=_i(S.lines).filter(We);return Xt(P)}),u=T(()=>c.value.filter(({type:S})=>S==="ONE_TIME_PURCHASE")),d=T(()=>ta(u.value).groups),h=T(()=>d.value.length),p=T(()=>c.value.filter(({type:S})=>S==="SUBSCRIPTION")),m=T(()=>p.value.length>0),y=T(()=>c.value.map(({methods:S}
1)=>S[0]?.handle)),g=T(()=>n.translate("shipping.shipping_method_first_shipment_group_title",{count:h.value})),f=T(()=>m.value&&!o.value.showShipmentBreakdown&&!Nt(l.value.currentDetour)),b=T(()=>{if(m.value||s.value)return n.translate("shipping.split_shipping_multiple_shipment_notice");if(h.value>1)return n.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:h.value})}),C=t.marketDrivenShippingEnabled&&go(u.value);return e(E,{when:()=>i.value?.status==="filled",children:()=>e(Re,{target:"plain",children:e(z,{accessibilityLabel:r,children:e(_,{gap:"base",padding:"small-300 none none none",children:[e(_,{gap:"small-400",children:[e(A,{level:2,children:r}),e(E,{when:()=>o.value.showShipmentBreakdown,fallback:e(Cu,{multipleShipmentsHeading:b}),children:e(vo,{})})]}),e(_,{gap:"large-200",children:[e(_,{gap:"small-200",children:[e(E,{when:f,children:()=>e(A,{level:3,children:g.value})}),e(Re,{target:"edgeToEdgeCard",children:e(z,{accessibilityRole:"presentation",colorLayer:a?void 0:"control",children:e(fo,{deliveryLines:c.value,selectedDeliveryMethodHandles:y.value,choiceListContext:!1,showGroupPrices:!C,shipmentGroups:d.value})})})]}),e(ko,{subscriptionLines:p.value})]})]})})})})}function Cu({multipleShipmentsHeading:n}){return e(E,{when:n,children:t=>e(_,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(re,{type:"truck"}),e(k,{color:"subdued",children:t})]})})}function Su(n){return n.some(t=>t.key==="_shopify_buyer_membership_key"&&t.value==="buy_with_prime")}const Ma=Lt(void 0);function Ra(){return xt(Ma)}const Tu="Q3L2z",Pu="wpbKf",Iu="_1H07Y",fn={StaticMapContainer:Tu,StaticMapContainerWithOverlay:Pu,StaticMapOverlay:Iu};function wu({src:n,title:t,overlayTitle:a,overlayLabel:r,overlay:i,onError:o}){const s=yi();return e(E,{when:s,fallback:e(xe,{contentDisplay:"block",aspectRatio:"2 / 1"}),children:e("div",{className:B(fn.StaticMapContainer,{[fn.StaticMapContainerWithOverlay]:!!i}),children:[e(ln,{src:n,alt:t??"Map",loading:"lazy",objectFit:"cover",aspectRatio:"2/1",onError:o?()=>o():void 0}),r?e("div",{"aria-hidden":"true",className:fn.StaticMapOverlay,children:e(_,{gap:"small-500",alignItems:"center",children:[a?e(k,{color:"subdued",type:"small",children:a}):null,e(k,{type:"strong",children:r})]})}):null,i]})})}function Eu(n,t){return n?t?n.dark:n.light:null}function Mu(){v();const n=xn(),t=W();return Eu(t?.mapUrl,n)}const Ru="_1hWL4",Au="l8QVy",Lu="pJQCE",xu="_35R1C",Du="_9uLa0",Nu="_1w8la",Ou="xQXew",Bu="gj4N0",Fu="VImf6",Uu="_9CuNx",Hu="O8Seo",zu="_01CKh",Yu="KQs71",qu="Ic4fS",$u="IMQvT",Wu="_7hUKC",Vu="QZR8x",se={ProductMapMarker:Ru,"ProductMapMarker-borderColorBase":"Kv2J9","ProductMapMarker-borderColorCustom":"Wv7wJ","ProductMapMarker-badgeToneBase":"WtS0D","ProductMapMarker-badgeToneAccent":"GgkBH",ProductMapMarkerCards:Au,ProductMapMarkerPin:Lu,ProductMapMarkerPinBody:xu,ProductMapMarkerPinGlyph:Du,ProductMapMarkerLabel:Nu,ProductMapMarkerLabelEnter:Ou,ProductMapMarkerCard:Bu,ProductMapMarkerCardEnter:Fu,ProductMapMarkerCardPrimary:Uu,ProductMapMarkerCardShadowReveal:Hu,ProductMapMarkerCheckmark:zu,ProductMapMarkerCheckmarkEnter:Yu,ProductMapMarkerCheckmarkSvg:qu,ProductMapMarkerCheckmarkPath:$u,ProductMapMarkerCheckmarkPathDraw:Wu,ProductMapMarkerCards2:Vu},Aa=5;function La({children:n,products:t}){const a=t.slice(0,Aa),{merchandiseThumbnail:{borderColor:r="base",badge:{background:i}={}}={}}=zt(),o=!i||i==="base"?"base":"accent";return e("div",{className:B(se.ProductMapMarker,se[qn("ProductMapMarker-borderColor",r)],se[qn("ProductMapMarker-badgeTone",o)]),children:[a.length>0?e("div",{"aria-hidden":"true",className:B(se.ProductMapMarkerCards,a.length===2&&se.ProductMapMarkerCards2),children:a.map((s,l)=>e("div",{className:B(se.ProductMapMarkerCard,l===0&&se.ProductMapMarkerCardPrimary),children:[e(In,{src:s.src}),l===0&&e("span",{className:se.ProductMapMarkerCheckmark,children:e("svg",{"aria-hidden":"true",className:se.ProductMapMarkerCheckmarkSvg,focusable:"false",viewBox:"0 0 75 75",children:e("path",{className:se.ProductMapMarkerCheckmarkPath,d:"M20 39 L32 50 L56 25",fill:"none",pathLength:"1"})})})]},s.key))}):e(Gu,{}),e(D,{background:"base",borderRadius:"fullyRounded",boxShadow:"base",className:se.ProductMapMarkerLabel,minBlockSize:"26px",overflow:"hidden",paddingBlock:"small-400",paddingInline:"small-200",children:e(U,{alignItems:"center",columnGap:"small-400",gridAutoFlow:"column",children:n})})]})}function Gu(){return e("svg",{"aria-hidden":"true",className:se.ProductMapMarkerPin,focusable:"false",width:"48",height:"57",viewBox:"0 0 48 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{className:se.ProductMapMarkerPinBody,d:"M7.02944 7.02944C16.402 -2.34315 31.598 -2.34315 40.9706 7.02944C50.3431 16.402 50.3431 31.598 40.9706 40.9706L26.1665 55.7747C24.97 56.9712 23.03 56.9712 21.8335 55.7747L7.02944 40.9706C-2.34315 31.598 -2.34315 16.402 7.02944 7.02944Z"}),e("path",{className:se.ProductMapMarkerPinGlyph,clipRule:"evenodd",d:"M24 11.832C30.7191 11.8321 36.166 17.2794 36.1664 23.9985C36.1664 30.7179 30.7194 36.1648 24 36.1649C17.2806 36.1648 11.8335 30.7179 11.8335 23.9985C11.834 17.2795 17.2809 11.8321 24 11.832ZM29.7483 19.6037C29.2536 19.1915 28.5173 19.2586 28.1046 19.7526L22.6617 26.2832L19.8149 23.5063C19.3539 23.0565 18.6152 23.0655 18.1651 23.526C17.7154 23.9872 17.7253 24.7259 18.1864 25.1758L21.3173 28.2307C21.4104 28.3216 21.5315 28.4409 21.6469 28.536C21.7723 28.6393 21.9738 28.7869 22.2546 28.8672C22.61 28.9687 22.99 28.9485 23.3331 28.811C23.6038 28.7022 23.7903 28.5361 23.9043 28.4206C24.0094 28.314 24.1173 28.1817 24.2005 28.0818L29.8971 21.2474C30.3088 20.7526 30.2425 20.0161 29.7483 19.6037Z",fillRule:"evenodd"})]})}
1const Ku="QiTzJ",ju="BsmDF",Pt={MapFallback:Ku,BackgroundImage:ju};function Qu({children:n,products:t,background:a="subdued"}){const r=ee(new Set),i=t.filter(({src:l})=>l&&!r.value.has(l)),o=a==="product"?i[0]?.src:void 0;function s(l){if(!(l.target instanceof HTMLImageElement))return;const c=l.target.getAttribute("src");c&&(r.value=new Set([...r.value,c]))}return e(D,{background:"subdued",className:Pt.MapFallback,inlineSize:"100%",onErrorCapture:s,overflow:"hidden",position:"relative",children:[o?e(ln,{alt:"",className:Pt.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:o}):null,e(La,{products:i,children:n})]})}function xa({title:n,markerTitle:t,markerLabel:a,fallbackTitle:r=t,products:i,failedSources:o,...s}){const l=Mu(),c=l?o.value.has(l):o.value.size>0;function u(){o.value=new Set([...o.value,l])}const d=e(O,{children:[e(k,{color:"subdued",children:r}),e(Rr,{children:e(k,{type:"strong",children:a})})]});return c?e(Qu,{products:i??[],background:i?"product":"subdued",children:d}):l?e(wu,{src:l,title:n,overlayTitle:i?void 0:t,overlayLabel:i?void 0:a,overlay:i?e(La,{products:i,children:d}):void 0,onError:u},l):e(uo,{...s,title:n,onLoadFailure:u})}function Da(){const{checkout:n,shop:t}=v(),{acceptEmailMarketing:a,buyerIdentity:r,contactInfo:i}=N();return T(()=>!r.value?.purchasingCompany&&i.value?.email!==void 0&&t.emailMarketing!=="OFF"&&!a.value&&n.latestReceipt.value?.status==="processed"&&n.latestReceipt.value.eligibleForMarketingOptIn)}const Zu=/^(e_[0-9a-f]{32})_(.+?)(?:_osp)?$/;function Xu(n){if(!n)return{clientHandle:null,variant:null};let t;try{t=new URL(n).searchParams.get("utm_campaign")}catch{return{clientHandle:null,variant:null}}if(!t)return{clientHandle:null,variant:null};const a=Zu.exec(t);return a?{clientHandle:a[1],variant:a[2]}:{clientHandle:null,variant:null}}function Ju(n){return Xu(n)}const ed="CGD68",nd="MPVYO",td="_3MQvk",ad="_8PSDP",rd="fWnnD",id="_1IOC2",od="bDnw9",sd="lK5x7",ld="c0CTL",cd="_4davv",ud="_38oLJ",dd="oXdcI",pd="hOZAu",hd="_2Vr9X",md="ogNqn",_d="aAfSd",yd="kujmI",gd="q19KC",fd="_6rZN2",bd="E1DyI",vd="gRzAZ",kd="EHhRv",Cd="KaI2p",Sd="taDzR",Td="gvU7N",Pd="w7U7g",Id="Cl5Kz",wd="Dh152",Ed="TjYGl",Md="EzlVD",Rd="JcEQU",Ad="HEqog",Ld="OaqG3",xd="xHfD9",Dd="Qhbfd",Nd="_1C9SL",Od="jvrs3",Bd="ayiZt",Fd="JVpja",Ud="y2YPD",Hd="t0uAF",zd="rLm9q",Yd="PXe2R",qd="_63ITw",H={Root:ed,VisualLabel:nd,Layer:td,Phrase:ad,Token:rd,IntroToken:id,ShopButtonAnimationCharOut:od,FinalToken:sd,ShopButtonAnimationCharIn:ld,IconSpacer:cd,ShopLogoSpacer:ud,Icon:dd,BellIcon:pd,ShopButtonAnimationBellRing:hd,ShopLogoToken:md,ShopLogo:_d,StaticLabel:yd,StaticShopLogoWrapper:gd,AccessibleLabel:fd,Delay0:bd,Delay1:vd,Delay2:kd,Delay3:Cd,Delay4:Sd,Delay5:Td,Delay6:Pd,Delay7:Id,Delay8:wd,Delay9:Ed,Delay10:Md,Delay11:Rd,Delay12:Ad,Delay13:Ld,Delay14:xd,Delay15:Dd,Delay16:Nd,Delay17:Od,Delay18:Bd,Delay19:Fd,Delay20:Ud,Delay21:Hd,Delay22:zd,Delay23:Yd,Delay24:qd};function $d({icon:n,introText:t,finalPrefix:a,accessibleLabel:r,staticLabel:i}){const{i18n:o}=v(),{locale:s,localeDirection:l}=o,c=p=>l==="rtl"&&er(p)?"rtl":"ltr",[u,d]=oe(!1);F(()=>{d(!0)},[]);const h=Na(a,s,u).length;return e("span",{className:H.Root,children:[e("span",{className:H.VisualLabel,"aria-hidden":"true",children:[e("span",{className:H.Layer,children:e("span",{className:H.Phrase,dir:c(t),children:[e("span",{className:B(H.Token,H.IntroToken,H.IconToken,H.Delay0),children:n}),e("span",{className:H.IconSpacer}),It({text:t,tokenClassName:H.IntroToken,locale:s,graphemesEnabled:u,delayOffset:1})]})}),e("span",{className:H.Layer,children:e("span",{className:H.Phrase,dir:c(a),children:[It({text:a,tokenClassName:H.FinalToken,locale:s,graphemesEnabled:u}),e("span",{className:H.ShopLogoSpacer}),e("span",{className:B(H.Token,H.FinalToken,H.ShopLogoToken,H[Oa(h)]),children:e(dn,{className:H.ShopLogo,"aria-hidden":"true"})})]})})]}),e("span",{className:H.StaticLabel,dir:c(r),"data-testid":"static-label","aria-hidden":"true",children:i}),e("span",{className:H.AccessibleLabel,children:r})]})}const Wd=/^(ar|fa|ur|he|iw|hi|th)\b/i;function Na(n,t,a){const r=n.match(/\s+|\S+/gu)??[];
1if(!a||Wd.test(t)||typeof Intl.Segmenter!="function")return r;let o;try{o=new Intl.Segmenter(t,{granularity:"grapheme"})}catch{return r}return r.flatMap(s=>/^\s+$/u.test(s)?[s]:Array.from(o.segment(s),l=>l.segment))}function It({text:n,tokenClassName:t,locale:a,graphemesEnabled:r,delayOffset:i=0}){return Na(n,a,r).map((o,s)=>{const l=s+i;return e("span",{className:B(H.Token,t,H[Oa(l)]),children:o.replaceAll(" "," ")},`${l}-${o}`)})}function Oa(n){return`Delay${Math.min(n,24)}`}function Vd(){return e(_,{direction:"inline",alignItems:"center",className:H.StaticShopLogoWrapper,children:e(dn,{className:H.ShopLogo,"aria-hidden":"true"})})}function Gd(){return e("svg",{className:B(H.Icon,H.BellIcon),viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:e("path",{fill:"currentColor",d:"M8.00016 1.5C10.4655 1.50006 12.5234 3.3978 12.8439 5.90137L13.4718 10.8096C13.5286 11.2533 13.3853 11.6709 13.1173 11.9805L13.1203 12H13.1007C12.8276 12.305 12.4309 12.5 11.9836 12.5H10.8908C10.3479 13.6581 9.2848 14.4999 8.00016 14.5C6.71553 14.5 5.6524 13.6581 5.10953 12.5H4.01578C3.56841 12.4998 3.17155 12.3052 2.8986 12H2.88004L2.88199 11.9814C2.61413 11.6719 2.47168 11.2533 2.52848 10.8096L3.15641 5.90137C3.47688 3.3978 5.53483 1.50006 8.00016 1.5ZM6.25504 12.5C6.68857 13.1293 7.32689 13.5 8.00016 13.5C8.67344 13.5 9.31174 13.1293 9.74527 12.5H6.25504Z"})})}const Kd="mnuHb",jd="ZHLC1",Qd="ggkpn",Zd="jNjME",Ue={ShopOrderUpdates:Kd,"ShopOrderUpdates-redesign":"LOmaT",ManageOrderButton:jd,ShopLogoWrapper:Qd,ShopLogo:Zd},wt={delivery:"delivery_order",pickup:"pickup_order"},Xd="/qr/u/download.svg";function Jd(n){const t=new URL(n);return t.pathname=Xd,t.toString()}class ep extends Error{constructor(){super(...arguments),this.name="PickupInstallCampaignAssignmentError"}}function Ba({className:n,variant:t="delivery"}={}){const{i18n:a,observability:r,shop:i}=v(),o=Ne(),s=W(),l=Me(),c=Ju(l?.mobileUrl),u=a.translate("app_promotions.animated_shop_button.final_prefix"),d={icon:e(Gd,{}),introText:a.translate("app_promotions.animated_shop_button.intro.value_props"),finalPrefix:u,accessibleLabel:`${u}Shop`,staticLabel:e(O,{children:[u,e(Vd,{})]})},{track:h}=Ce("order_updates"),p=Wi();F(()=>{l&&h("shop_button_rendered")},[l,h]);const m=t==="pickup"&&c.clientHandle!==null&&c.variant!==null;if(F(()=>{m&&r.error(new ep("Pickup order received an install campaign assignment"),{severity:"warning",metadata:{installCampaign:{clientHandle:c.clientHandle,variant:c.variant}}})},[m,c.clientHandle,c.variant,r]),!l)return null;const{mobileUrl:y,orderTrackingMobileUrl:g,qrCodeUrl:f,buyerHasOrderTrackingPush:b,orderTrackingPushCtaVariant:C}=l,S=t!=="pickup"&&b!==!0&&C==="treatment",P={shop:e("span",{className:Ue.ShopLogoWrapper,children:e(dn,{className:Ue.ShopLogo,"aria-label":"Shop"})})};let I,R;t==="pickup"?(I=a.translate("app_promotions.track_pickup_with_shop_logo",P),R={title:a.translate("thank_you.qr_code.pickup_title"),subtitle:a.translate("thank_you.qr_code.pickup_description")}):(b===!0?I=a.translate("app_promotions.order_updates_track_order_logo",P):S?I=a.translate("app_promotions.get_notified_with_shop_logo",P):I=e($d,{...d}),R=c.variant===tn.LegacyCopy?{title:a.translate("thank_you.qr_code.legacy_shipping_title"),subtitle:a.translate("thank_you.qr_code.legacy_shipping_description")}:{title:a.translate("thank_you.qr_code.shipping_title"),subtitle:a.translate("thank_you.qr_code.shipping_description")});const M=rn(S&&g?g:y,{utm_content:wt[t]}),L=i.hasFlagEnabled(gi),V=rn(L?Jd(f):f,{link_provider:"open.shop.app",utm_content:wt[t],...L?{qr_secure_deferred:"true",qr_style:"rounded",qr_error_correction_level:"m",qr_branded_center:"true","qr_branded_center_options[padding]":"0.08"}:{}}),q=e(Ea,{label:I,message:R,mobileLinkToShop:M,desktopLinkToShop:V,styledQrCode:L,installCampaign:t==="pickup"?void 0:c,onClipboardInteraction:()=>{h("arrive")},onQrCodeInteraction:()=>{h("arrive_show_qr_code")}}),Q=o?s?.orderStatusPageUrl:void 0;return e("div",{className:B(Ue.ShopOrderUpdates,Q?void 0:p,n,{[Ue["ShopOrderUpdates-redesign"]]:o}),children:Q?e(U,{gridTemplateColumns:"@media (inline-size >= medium) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gap:"base",children:[e("div",{className:p,children:q}),e(de,{className:Ue.ManageOrderButton,inlineSize:"fill",variant:"secondary",href:Q,children:a.translate("thank_you.manage_order_label")})]}):q})}function Fa(){const t=W()?.paymentDetails?.financialPendingReason;return{financialPendingReason:t,isBuyerActionRequired:t==="BUYER_ACTION_REQUIRED",isProviderActionRequired:["NETWORK_ACTION_REQUIRED","PARTNER_ACTION_REQUIRED","SLOW_COMPLETION_CONFIRMATION","SLOW_COMPLETION_PAYMENT"].includes(t??"")}}
1const On=({isPickup:n}={isPickup:!1})=>{const{i18n:t}=v(),a=hn(),r=_e(Fa()),i=_e(n),o=t.translate("thank_you.thank_you_title_payments_app_pending_buyer_action_required"),s=t.translate("thank_you.thank_you_title_payments_app_pending_default");return T(()=>{const{confirmWithEmail:m,confirmWithPhone:y}=a.value,g=r.value;return{pendingOrderConfirmationTitle:l(g),pendingOrderConfirmationMessage:c({confirmWithEmail:m,confirmWithPhone:y,isPickup:i.value,financialPendingReason:g}),isOrderPendingStatus:!!g.financialPendingReason}});function l(m){return m.isBuyerActionRequired?o:s}function c({confirmWithEmail:m,confirmWithPhone:y,isPickup:g,financialPendingReason:f}){return f.isBuyerActionRequired?d({confirmWithEmail:m,confirmWithPhone:y,isPickup:g}):f.isProviderActionRequired?t.translate("thank_you.thank_you_payments_app_pending_payment_description_provider_action_required_default"):p({confirmWithEmail:m,confirmWithPhone:y,isPickup:g})}function u({confirmWithEmail:m,confirmWithPhone:y}){return m&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone_pick_up"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_pick_up"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone_pick_up"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing_pick_up")}function d({confirmWithEmail:m,confirmWithPhone:y,isPickup:g}){return g?u({confirmWithEmail:m,confirmWithPhone:y}):m&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing")}function h({confirmWithEmail:m,confirmWithPhone:y}){return m&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone_pick_up"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_pick_up"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone_pick_up"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing_pick_up")}function p({confirmWithEmail:m,confirmWithPhone:y,isPickup:g}){return g?h({confirmWithEmail:m,confirmWithPhone:y}):m&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone"):m?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing")}};function np(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){const r=n?.length?n.map(o=>({giftCard:o.giftCard,key:o.stableId,legacyFee:o.legacyFee,quantity:o.quantity,requiresShipping:o.requiresShipping,src:o.image?.two})):tp(a),i=[];for(const o of r)if(!(o.quantity<=0||!o.requiresShipping||o.giftCard||!o.src||t&&o.legacyFee)&&(i.push({key:o.key,src:o.src}),i.length===Aa))break;return i}function tp(n){const t=n?.mergedBuyerProposalMerchandise;return t?.__typename!=="PurchaseOrderMerchandiseTerms"?[]:t.merchandiseLines.map(a=>({giftCard:a.merchandise.giftCard,key:a.stableId,legacyFee:"legacyFee"in a&&a.legacyFee===!0,quantity:a.quantity.items,requiresShipping:a.merchandise.requiresShipping,src:a.merchandise.image?.two}))}const ap={id:"766f1a73f6f5729d8de999514e11f6d1a0015979328b3a23a3ffe084b071b5ed",type:"mutation",name:"EmailMarketingOptIn",source:""};function rp({optInState:n}){const{i18n:t}=v();let a,r;return n.value==="loading"?(a=e(Ar,{size:"small"}),r=t.translate("marketing.accept_marketing_checkbox_label")):n.value==="opt_in_pending"?(a=e(re,{type:"email",size:"small"}),r=t.translate("marketing.pending_accept_marketing_checkbox_label")):(a=e(re,{type:"check",size:"small"}),r=t.translate("marketing.post_accept_marketing_checkbox_label")),e(_,{direction:"inline",gap:"base",alignItems:"center",children:[a,r]})}function Ua({colorLayer:n}){const{track:t}=Nn(),{client:a,i18n:r,observability:i,userEvents:o,shop:{id:s,myshopifyDomain:l},source:c,checkout:u,graphql:{coreGraphql:d}}=v(),h=ee("not_opted_in"),p=un(),m=N().buyerIdentity.value?.customerProfile,y=W(),g=a.unstable_getSerialization("sessionToken"),f=c.t
1ype==="simulated",b=u.configuration.layout.isOnePage.value;F(()=>{t("thank_you_page_email_consent_page_view/4.0",{page:"thank_you",customerId:m?.id?Number(Ye(m.id)):void 0,orderId:ea(y?.orderIdentity.id),sessionToken:p?.value?.defaultAttributes?.visitToken,uniqueToken:p?.value?.defaultAttributes?.uniqToken})},[m?.id,y,t,p?.value?.defaultAttributes?.uniqToken,p?.value?.defaultAttributes?.visitToken]);async function C(S){if(f){h.value="opted_in";return}if(!S)return;const P=Number(Ye(s));o.monorailEvent({schemaId:"checkout_email_marketing_optin_ui_interaction/1.0",payload:{checkoutToken:c.checkoutSessionIdentifier||c.sourceId,shopId:Number.isNaN(P)?0:P,shopifyDomain:l,action:"click_email_opt_in",origin:"thank_you_page",checkoutVersion:b?"checkout_one_redesign":"checkout_one"}}),h.value="loading";const{data:I,error:R}=await d.mutate(ap,{variables:{orderId:y.orderIdentity.id,sessionInput:{sessionToken:g}}});if(R){h.value="not_opted_in",R instanceof nr||i.error(R);return}const M=I?.subscribeToMarketing.__typename;M==="MarketingOptInFailure"&&I?.subscribeToMarketing.code!=="ALREADY_SUBSCRIBED"?h.value="not_opted_in":M==="MarketingOptInFailure"&&I?.subscribeToMarketing.code==="ALREADY_SUBSCRIBED"?h.value="opted_in":M==="MarketingOptInSuccess"&&(h.value=I?.subscribeToMarketing.pending?"opt_in_pending":"opted_in")}return e(D,{borderWidth:"base none none none",background:"subdued",padding:"base",colorLayer:n,children:e(E,{when:()=>h.value==="not_opted_in",fallback:e(rp,{optInState:h}),children:e(ia,{id:"marketing_opt_in",name:"marketing_opt_in",onChange:C,label:r.translate("marketing.accept_marketing_checkbox_label")})})})}function Ha({children:n}){return typeof n!="string"?null:e(O,{children:n.split(`
2`).filter(Boolean).map(t=>e(w,{children:t},t))})}const ip=({deliveryInformation:n,paymentInstructions:t,color:a,textAlign:r})=>{const{i18n:i}=v(),{confirmWithEmail:o,confirmWithPhone:s}=hn().value,{isOrderPendingStatus:l,pendingOrderConfirmationMessage:c}=On().value,u=cn().value,d=Dn(),h=Me()?.buyerHasOrderTrackingPush,p=()=>{if(l)return c;if(o&&s)return u?i.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.multi_store"):i.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store");if(o)return u?i.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):d&&h===!0?i.translate("thank_you.thank_you_confirmed_with_shop_updates_description"):i.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(s)return u?i.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):i.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")},m=()=>p()||i.translate("thank_you.thank_you_confirmed_order_with_missing"),y=()=>n?e(O,{children:[e(k,{type:"strong",children:i.translate("thank_you.delivery_information_label")})," ",e(Ee,{children:n})]}):null,g=t&&t.length>0;return e(_,{gap:"small-300",children:[g?null:e(w,{color:a,textAlign:r,children:m()}),n?e(w,{color:a,textAlign:r,children:y()}):null,g?e(_,{gap:"base",children:t.map(f=>e(Ha,{children:f},f))}):null]})};function op({children:n,shippingAddress:t,deliveryInformation:a,deliveryMethodType:r,paymentInstructions:i,isBuyWithPrime:o,legacyRepresentProductsAsFees:s,merchandiseLines:l,remoteMerchandiseDetails:c}){const{shop:u,i18n:d}=v(),h=Ra(),p=u.hasFlagEnabled(ue),m=Ne(),{track:y}=Ce("map"),g=xn(),f=Be().value,{pendingOrderConfirmationTitle:b,isOrderPendingStatus:C}=On().value,S=Da(),P=cn().value,I=Dn()&&!P,R=C?b:P?d.translate("thank_you.confirmed_orders_title"):d.translate("thank_you.thank_you_title"),M=qt(t,{countryFormat:"explicit",hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),L=m&&u.hasFlagEnabled(fi)&&r==="SHIPPING",V=W(),q=V?.completedRemoteCheckouts?.some(fe=>fe.status==="submitted"&&(fe.remotePurchaseOrder.deliveryLines?.length??0)>1)??!1,Q=V?.isRedacted??!1,J=T(()=>!Q&&S.value),x=ee(new Set),Z=V?.mapVisibility==="VISIBLE",G=ce(()=>Z&&t?.coordinates&&M?{label:M,position:{lat:t.coordinates.latitude,lng:t.coordinates.longitude}}:null,[t,M,Z]),te=ce(()=>L?np(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}):[],[L,s,l,c]),pe=L&&!f&&!P&&!q,Se=ce(()=>G?[{type:"destination",title:d.translate("thank_you.marker.shipping"),headerDisabled:!0,...G}]:[],[G,d]);let ne=null;if(G){const fe=d.translate("thank_you.marker.shipping"),he=`${d.translate("thank_you.shipping_address_map_title",{address:G.label})}`;ne=e(xa,{failedSources:x,title:he,markerTitle:fe,markerLabel:G.label,fallbackTitle:d.translate("shipping.shipping_address_title"),products:pe?te:void 0,options:{mapOptions:{center:G.position,styles:g?ua:[]}},markers:Se,handleClick:()=>y("click"),handleDoubleClick:()=>y("dblclick"),handleDragEnd:()=>y("dragend"),handleZoomChanged:()=>y("zoom_changed")})}const Te=ne===null?"none":"base",ge=ne&&h?e(D,{ref:h,children:ne}):ne,Pe=e(O,{children:[e(A,{textAlign:m?"center":void 0,children:R}),e(ip,{color:m?"subdued":void 0,deliveryInformation:a,paymentInstructions:i,textAlign:m?"center":void 0})]}),Le=I?e(Ba,{variant:"delivery"}):null,ae=e(O,{children:[e(_,{gap:"base",borderWidth:m?void 0:`${Te} none none none`,padding:"base",children:[m?e(_,{gap:"small-300",children:Pe}):Pe,Le]}),o&&!f&&e(_,{gap:"base",borderWidth:m?void 0:`${Te} none none none`,padding:"base",children:e(bo,{})}),e(E,{when:J,children:e(Ua,{colorLayer:p?void 0:"control"})})]});return m?e(O,{children:[ne?e(z,{accessibilityRole:"presentation",colorLayer:p?void 0:"control",overflow:"hidden",className:De.ThankYouEntranceStatus,children:ge}):null,n,e(z,{accessibilityLabel:R,colorLayer:p?void 0:"control",overflow:"hidden",children:ae})]}):e(z,{accessibilityLabel:R,colorLayer:p?void 0:"control",overflow:"hidden",className:De.ThankYouEntranceStatus,children:[ge,ae]})}const za=Lt(null);var sp={ProgressTracker:"_1ojciyd1 _1ojciyd0 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem11h _1fragemzk"};function lp({activeStep:n,children:t}){const a=tr.toArray(t).map(o=>ar(o)?o.props.id:void 0),r=a.join("|"),i=ce(()=>({steps:a.reduce((o,s,l)=>(o[s]={active:n?n===s:l===0,completed:a.indexOf(n)>a.indexOf(s)},o),{})}),[n,r]);return e(za.Provider,{value:i,children:e("ol",{className:sp.ProgressTracker,role:"list",children:t})})}function cp(){const n=xt(za);if(n===null)throw new bi("<Step />  must be used inside of an <ProgressTracker />");return n}var we={Step:"_4xihkw1 _4xihkw0 _1fragem64",Icon:"_4xihkw4",Label:"_4xihkw5",Connector:"_4xihkw6",completed:"_4xihkw2",active:"_4xihkw3"};function up({children:n,description:t,icon:a,iconTone:r,id:i,label:o,state:s,stateHidden:l=!0}){const{steps:c}=cp(),u=Object.keys(c).indexOf(i)===0,{[i]:{active:d,completed:h}}=c,p=B(we.Step,h&&we.completed);return e(O,{children:[!u&&e(hp,{active:d,completed:h}),e("li",{className:p,"aria-current":d,children:[e(dp,{active:d,completed:h,type:a,tone:r}),e(pp,{active:d,completed:h,description:t,label:o,state:s,stateHidden:l}),n]})]})}function dp({active:n,tone:t="accent",type:a,completed:r}){const i=B(we.Icon,n&&we.active,r&&we.completed);return e("div",{className:i,children:e(re,{type:a,tone:n||r?t:void 0})})}function pp({active:n,completed:t,description:a,label:r,state:i,stateHidden:o}){const s=B(we.Label,(n||t)&&we.completed);return e(O,{children:[e("div",{className:s,children:[o?e(k,{accessibilityVisibility:"exclusive",children:i}):e(w,{children:i}),e(w,{children:e(k,{type:n||t?"strong":"generic",children:r})})]}),(n||t)&&a&&e(w,{type:"small",color:"subdued",children:a})]})}function hp({active:n,completed:t}){const a=B(we.Connector,(n||t)&&we.completed);return e("li",{className:a,"aria-hidden":!0})}function mp({activeStep:n="inReview"}){const{i18n:t,shop:a}=v(),r=a.hasFlagEnabled(ue),i=t.formatDate(new Date,{month:"long",day:"2-digit",timeZone:a.timeZone}),o=[{id:"submitted",date:i,label:t.translate("thank_you.breadcrumbs_submitted"),state:t.translate("thank_you.breadcrumbs_submitted"),icon:"arrow-right"},{id:"inReview",date:i,label:t.translate("thank_you.breadcrumbs_in_review"),state:t.translate("thank_you.breadcrumbs_in_review"),icon:"note"},{id:"confirmed",label:t.translate("thank_you.breadcrumbs_confirmed"),state:t.translate("thank_you.breadcrumbs_confirmed"),icon:"check"}];return e(z,{colorLayer:r?void 0:"control",children:[e(_,{gap:"base",padding:"base",children:e(lp,{activeStep:n,children:o.map(s=>e(up,{description:s.date,icon:s.icon,id:s.id,label:s.label,state:s.state},s.id))})}),e($e,{}),e(_,{gap:"base",padding:"base",children:[e(A,{children:t.translate("thank_you.thank_you_title_review")}),e(w,{children:t.translate("thank_you.thank_you_confirmed_order_with_draft")})]})]})}function _p({children:n,paymentInstructions:t}){const{value:a}=qe(),{shop:r,i18n:i}=v(),o=Ra(),s=r.hasFlagEnabled(ue),l=Ne(),c=N().deliveryNext,u=vi(c.value,"ONE_TIME_PURCHASE",!0),d=u?.status==="available"?u.methods.find(ae=>ae.methodType==="PICK_UP")?.pickupLocation:void 0,{confirmWithEmail:h,confirmWithPhone:p}=hn().value,{isOrderPendingStatus:m,pendingOrderConfirmationTitle:y,pendingOrderConfirmationMessage:g}=On({isPickup:!0}).value,f=xn(),{track:b}=Ce("map"),C=W(),S=ee(new Set),P=cn().value,I=Dn()&&!P,R=qt(d?.address,{hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),M=ge(),L=C?.isRedacted??!1,V=Da(),q=T(()=>!L&&V.value),Q=i.translate("thank_you.pick_up_in_store_marker.shipping"),J=d?.name||R,x=d?.address?.coordinates,Z=!l||x?.accuracy==="PRECISE",G=C?.mapVisibility==="VISIBLE"&&Z;let te=null;if(G&&x){const ae=`${i.translate("thank_you.shipping_address_map_title",{address:J??R})}`;te=e(xa,{failedSources:S,title:ae,markerTitle:Q,markerLabel:J,options:{mapOptions:{styles:f?ua:[]}},markers:Le(),handleDragEnd:()=>b("dragend")})}const pe=te?e(D,{borderWidth:l?void 0:"none none base none",ref:o,children:te}):null,Se=e(O,{children:[e(A,{textAlign:l?"center":void 0,children:M}),e(w,{color:l?"subdued":void 0,textAlign:l?"center":void 0,children:Pe()})]}),ne=I?e(Ba,{variant:a?"delivery":"pickup"}):null,Te=e(O,{children:[e(_,{gap:"base",padding:"base",children:[l?e(_,{gap:"small-300",children:Se}):Se,t&&t.length>0&&e(_,{gap:"base",children:[e($e,{direction:"inline"}),t.map(ae=>e(Ha,{children:ae},ae))]}),ne]}),e(E,{when:q,children:e(Ua,{colorLayer:s?void 0:"control"})})]});if(!l)return e(z,{accessibilityLabel:M,colorLayer:s?void 0:"control",className:De.ThankYouEntranceStatus,children:[pe,Te]});return e(O,{children:[te?e(z,{accessibilityRole:"presentation",colorLayer:s?void 0:"control",overflow:"hidden",className:De.ThankYouEntranceStatus,children:pe}):null,n,e(z,{accessibilityLabel:M,colorLayer:s?void 0:"control",overflow:"hidden",children:Te})]});function ge(){return m?y:i.translate("thank_you.thank_you_title")}function Pe(){return m?g:a?h&&p?i.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store"):h?i.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):p?i.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):i.translate("thank_you.thank_you_confirmed_order_with_missing"):h&&p?i.translate("thank_you.thank_you_confirmed_order_with_email_and_phone_pick_up"):h?i.translate("thank_you.thank_you_confirmed_order_with_email_pick_up"):p?i.translate("thank_you.thank_you_confirmed_order_with_phone_pick_up"):i.translate("thank_you.thank_you_confirmed_order_with_missing")}function Le(){const ae=d?.address?.coordinates;return ae?[{type:"destination",title:Q,position:{lat:ae.latitude,lng:ae.longitude},label:J,headerDisabled:!0}]:[]}}function yp({children:n}){const t=N(),{value:a}=t.paymentLines,{value:r}=t.shippingAddress,{value:i}=Jt("ONE_TIME_PURCHASE"),{value:o}=t.customAttributes,{value:s}=t.legacyRepresentProductsAsFees,{value:l}=t.remoteMerchandiseDetails,c=Ln(i),u=An(),{value:d}=qe();if(Ae()?.some(y=>y.status==="failed"))return null;if(u.value)return e(O,{children:[n,e(mp,{})]});const p=a?.lines.map(({method:y,specialInstructions:g})=>y.type==="paymentOnDelivery"||y.type==="customManualPayment"||y.type==="manualPayment"?g??y.paymentInstructions:null).filter(
2Boolean),m=c?.methodType==="LOCAL"?c.description:void 0;return d||c?.methodType==="PICK_UP"?e(_p,{paymentInstructions:p,children:n}):e(op,{shippingAddress:r,legacyRepresentProductsAsFees:s,merchandiseLines:t.merchandiseLines.value?.lines,remoteMerchandiseDetails:l,paymentInstructions:p,deliveryInformation:m,deliveryMethodType:c?.methodType,isBuyWithPrime:Su(o??[]),children:n})}function gp(){const n=An(),{financialPendingReason:t}=Fa(),a=Ae()?.some(r=>r.status==="failed");return!n.value&&!t&&!a}const fp=3e3,bp=2e3,vp="(max-width: 749px)";function kp(){const{checkout:n,client:t,router:a}=v(),r=Ut(),i=Sn(),o=gp(),s=cn().value,l=Yt(),c=o&&!s,u=a.currentUrl.value.normalizedPath,d=So(t.initialRequest.url.pathname).endsWith(u),h=j(r&&c&&!i&&!d).current,p=ee(h?"waiting-for-hydration":"complete"),m=p.value,y=ee("centered"),g=n.thankYouEntrance,f=g.isRevealing.value,b=ee(null),C=j(null),S=j(null),{lock:P,unlock:I}=Lr(),R=l||!c,M=$(()=>{$n(()=>{p.value="complete",g.skip()})},[g,p]),L=$(()=>{$n(()=>{g.settle(),M()})},[g,M]),V=$(()=>{p.value==="running"&&g.reveal()},[g,p]);F(()=>{if(!h){g.skip();return}if(R){L();return}p.value==="waiting-for-hydration"&&(p.value="running")},[g,L,h,R,p]),F(()=>{if(!h||m!=="running")return;const x=window.setTimeout(L,fp);return()=>window.clearTimeout(x)},[m,L,h]),F(()=>{if(!f)return;const x=window.setTimeout(L,bp);return()=>{window.clearTimeout(x),L()}},[f,L]),F(()=>{if(!(!h||m!=="running"))return window.scrollTo(0,0),P(),I},[m,P,h,I]);const q=$(()=>{const x=C.current,Z=S.current;if(!x||!Z)return;const G=x.getBoundingClientRect(),te=Z.getBoundingClientRect();b.value={x:G.left+G.width/2-(te.left+te.width/2),y:G.top+G.height/2-(te.top+te.height/2)}},[b]),Q=$(x=>{C.current=x,p.value==="waiting-for-hydration"&&(y.value=x&&window.matchMedia(vp).matches?"traveling":"centered"),q()},[q,y,p]),J=$(x=>{S.current=x,q()},[q]);return{isContentHidden:g.phase.value==="pending"&&h,isEntranceRevealing:f,mode:y.value,morphOffset:b.value,onDrawn:q,onEntranceSettled:L,onRevealed:V,onSettled:M,registerMapTarget:Q,registerMark:J,shouldAnimate:h,status:p.value}}const Cp="_1BgJP",Sp="coXlQ",Tp="Ea8kH",Pp="HDNQw",Ip="JnQXy",wp="BoaBN",Ep="_98hLo",ve={ThankYouInterstitial:Cp,"ThankYouInterstitial-running":"In8pu",ThankYouInterstitialBackdrop:Sp,ThankYouInterstitialGraphic:Tp,ThankYouInterstitialDisc:Pp,ThankYouInterstitialStroke:Ip,ThankYouInterstitialCircle:wp,ThankYouInterstitialCheckmark:Ep,"ThankYouInterstitialGraphic-running":"NiSUe","ThankYouInterstitial-traveling":"t5tTv"},on=56,Et=on/2,Mp=26.5,Rp=75,Ap=on/Rp,Lp="M 6 40.1 C 7.1 34.6 11.5 31.9 16.5 33 C 19.2 33.6 21.8 36.5 24.1 38.8 L 34.8 49.6 L 52.2 26.8";function xp({appearance:n,confirmation:t,mode:a,morphOffset:r,onDrawn:i,onRevealed:o,onSettled:s,registerMark:l,status:c}){const u=r??{x:0,y:0},d=c==="running",h=a==="traveling",p=y=>{y.target===y.currentTarget&&s()},m=y=>{y.target===y.currentTarget&&i()};return e("div",{className:B(ve.ThankYouInterstitial,{[ve["ThankYouInterstitial-running"]]:d,[ve["ThankYouInterstitial-traveling"]]:h}),role:"status","aria-label":t,children:[e(k,{accessibilityVisibility:"exclusive",children:t}),e("div",{className:ve.ThankYouInterstitialBackdrop,"aria-hidden":"true",onAnimationStart:d?o:void 0,onAnimationEnd:d&&h?s:void 0}),e("div",{className:B(ve.ThankYouInterstitialGraphic,{[ve["ThankYouInterstitialGraphic-running"]]:d}),ref:l,onAnimationEnd:d&&!h?p:void 0,style:{"--morph-x":`${u.x}px`,"--morph-y":`${u.y}px`,"--thank-you-interstitial-disc-color":n==="shopPay"?pn.toRgb():void 0,"--thank-you-interstitial-stroke-color":n==="shopPay"?mo.Grayscale.White.toRgb():void 0},"aria-hidden":"true",children:e("div",{className:ve.ThankYouInterstitialDisc,children:e("svg",{className:ve.ThankYouInterstitialStroke,viewBox:`0 0 ${on} ${on}`,focusable:"false","aria-hidden":"true",onAnimationStart:d&&h?m:void 0,children:[e("circle",{className:ve.ThankYouInterstitialCircle,cx:Et,cy:Et,r:Mp,pathLength:"1"}),e("g",{transform:`scale(${Ap})`,children:e("path",{className:ve.ThankYouInterstitialCheckmark,d:Lp})})]})})})]})}const Dp={"ThankYouContent-hidden":"_3UsL1"};function Np({children:n}){const{i18n:t}=v(),a=kp(),r=Op(W());if(!a.shouldAnimate)return e(O,{children:n});const i=a.status==="complete"?null:e(xp,{appearance:r,confirmation:`${t.translate("thank_you.thank_you_title")}`,mode:a.mode,morphOffset:a.morphOffset,onDrawn:a.onDrawn,onRevealed:a.onRevealed,onSettled:a.onSettled,registerMark:a.registerMark,status:a.status});return e(Ma.Provider,{value:a.registerMapTarget,children:[a.status==="running"?e(xr,{children:e("div",{children:i})}):i,e(D,{className:B({[Dp["ThankYouContent-hidden"]]:a.isContentHidden,[De.ThankYouEntrance]:a.isEntranceRevealing}),inert:a.isContentHidden,children:n}),a.isEntranceRevealing?e("span",{className:De.ThankYouEntranceBeat,"aria-hidden":"true",onAnimationEnd:a.onEntranceSettled}):null]})}function Op(n){return n?.shopAppLinksAndResources.shopPayOrder?"shopPay":"merchant"}const Bp=En("ThankYouOrderSummaryContent");function Fp(){const{checkout:n,i18n:t,source:a}=v(),{value:r}=N().merchandiseLines,{open:i,setOpen:o}=Dr(),s=wn(void 0,Bp),l=`${s}-heading`,c=t.translate("order_summary.title"),u=ke("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY1"),d=ke("Checkout::ThankYou::CartLineDetails::RenderAfter"),h=ke("Checkout::ThankYou::CartLines::RenderAfter"),p=ke("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY2"),m=ke("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY3"),y=Co([...u,...d,...h,...p,...m]);rr(()=>{o(y.value)});const g=n.proposal.facts.merchandiseLines??[],f=Vn(a)?g:r?.lines||[],{totalLineQuantities:b=0,totalLineQuantitiesFact:C=0}=Ht(),S=t.translate("order_summary.number_items",{count:Vn(a)?C:b}),P=i.value,I=()=>{o(!i.peek())},R=n.configuration.visibility.showAside;return e(D,{display:R?"@media (inline-size >= medium) none, auto":"auto",children:e(z,{accessibilityLabelledBy:l,colorLayer:"control",padding:"base",children:[e(A,{id:l,level:2,visibility:"hidden",children:c}),e(Nr,{section:"top_summary",children:e(Or,{section:"top_summary",children:e(To,{children:[e(Br,{"aria-controls":s,"aria-expanded":P,"data-event-name":P?"order_summary_hide":"order_summary_show",inlineSize:"100%",onClick:I,children:e(U,{alignItems:"center",gap:"small-200",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content) minmax(auto, max-content)",children:[P?e(k,{size:"large",type:"strong",children:c}):e(k,{children:[e("span",{className:Wt({screenReaders:"only"}),children:c})," ",S]}),!P&&e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(Fr,{variant:"fan-legacy",size:"small",merchandise:f,useImageAltTexts:!1,sortByPrice:!0}),e(Ur,{})]}),e(re,{type:P?"chevron-up":"chevron-down",size:"small-200"})]})}),P?e("div",{id:s,children:e(D,{paddingBlockStart:"large-200",children:e(Hr,{skipWrappingSection:!0,hideAccessibilityTitle:!0})})},"thank-you-order-summary-open"):e("div",{id:s},"thank-you-order-summary-closed")]})})})]})})}const Mt={},Up=(n,t)=>{const a=X.screenLeft===void 0?X.screenX:X.screenLeft,r=X.screenTop===void 0?X.screenY:X.screenTop;let i;X.innerWidth?i=X.innerWidth:He.documentElement.clientWidth?i=He.documentElement.clientWidth:i=screen.width;let o;X.innerHeight?o=X.innerHeight:He.documentElement.clientHeight?o=He.documentElement.clientHeight:o=screen.height;
2const s=Math.max(1,i/X.screen.availWidth),l=(i-n)/2/s+a,c=(o-t)/2/s+r;return{height:t/s,left:l,top:c,width:n/s}},Hp=n=>{n?.close()},zp=(n,t,a="SignInWithShop")=>{const r=Up(365,554);Mt[a]?.();const i=X.open(n,"SignInWithShop",`popup,width=${r.width},height=${r.height},top=${r.top},left=${r.left}`),o=c=>{to({allowedOrigins:[ao,ro,io,X.location.origin],event:c,source:i})&&t(c)},s=()=>Hp(i);t(new MessageEvent("message",{data:{type:"windoidopened"}}));const l=setInterval(()=>{i?.closed&&(t(new MessageEvent("message",{data:{type:"windoidclosed"}})),clearInterval(l))},200);return["beforeunload","unload","pagehide"].forEach(c=>{X.addEventListener(c,s,{once:!0})}),X.addEventListener("message",o),Mt[a]=()=>{["beforeunload","unload","pagehide"].forEach(c=>{X.removeEventListener(c,s)}),X.removeEventListener("message",o),clearInterval(l)},i};let bn=null;function Yp(){return bn||(bn=Po()),bn}const qp=(n,t)=>{const a=oo({...n,analyticsTraceId:Yp(),uxMode:"windoid"});if(!a){console.warn?.("Failed to build authorize URL due to incorrect parameters",n);return}let r=null;r=zp(a,o=>{switch(o.data.type){case"completed":t.onComplete?.(o.data),r?.close();break;case"error":t.onError?.(o.data),r?.close();break;case"windoidopened":t.onWindoidOpen?.();break}})},$p={"aria-label":"Shop",style:{fill:pn.toRgb(),width:44,height:17}},Wp=({loading:n,onSignInCompleted:t,fetchAttempts:a=1})=>{const{i18n:r,shop:i}=v(),o=Be().value,s=r.translate("thank_you.verify_shop_account_title"),{track:l}=Ce("pay_escrow"),{value:c}=N().contactInfo,u=!o,d=i.hasFlagEnabled(ue);F(()=>{if(n&&a>=1){l("verify_button_blurred_rendered");return}l("verify_button_rendered")},[n,l,a]);const h=()=>{l("verify_button_clicked"),qp({loginHint:c?.email??"",codeChallenge:"test-code-challenge",codeChallengeMethod:"S256",flow:"thank_you_page_escrow",prompt:"login",proxy:!0,responseType:"code"},{onComplete:t})};return e(Re,{target:u?"card":"plain",children:e(z,{accessibilityLabel:s,colorLayer:u&&!d?"control":void 0,children:n?e(_,{padding:u?void 0:"base none",gap:"base",children:[e(xe,{blockSize:"22px",inlineSize:"120px"}),e(xe,{blockSize:"16px",inlineSize:"100%"}),e(xe,{blockSize:"16px",inlineSize:"100%"})]}):e(_,{padding:u?void 0:"base none",gap:"large-200",children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",alignItems:"center",alignContent:"center",children:[e(A,{level:2,children:s}),e(dn,{...$p})]}),e(w,{color:"subdued",children:r.translate("thank_you.verify_shop_account_message")}),e(de,{id:"verify-account-button",variant:"secondary",onClick:h,children:r.translate("thank_you.verify_shop_account_cta")})]})})})};function Vp({showVerifyShopAccountButton:n}){const t=pa(),a=Me(),r=un(),{track:i}=Nn(),o=ha();return{track:()=>{if(!t||!a)return;const{buyerHasShopApp:l,buyerHasShopPay:c,shopPayOrder:u,orderUpdateOptions:d}=a,h=d.filter(p=>p!=="arrive").join(",");i("order_status_page_view/4.2",{page:"thank_you",orderId:t,isShopPayOrder:u,userHasShop:l,userHasPay:c,shippingUpdateOptions:h,experimentFlags:o,pageviewToken:r.value.defaultAttributes?.microSessionId??"",sessionToken:r.value.defaultAttributes?.visitToken??"",showVerifyShopAccountButton:n},{omit:["shopifyDomain","checkoutToken"]})}}}function Gp(){const{checkout:n}=v(),t=n.configuration.isUniversalCheckoutFinalizer;F(()=>
2{if(!t)return;const a=r=>{r.composedPath().some(Kp)&&r.preventDefault()};return document.addEventListener("click",a,!0),document.addEventListener("auxclick",a,!0),()=>{document.removeEventListener("click",a,!0),document.removeEventListener("auxclick",a,!0)}},[t])}function Kp(n){return n instanceof HTMLAnchorElement&&n.hasAttribute("href")}const jp={id:"ebcee8be9e6c7c28fbd55d8183745df83661612f69510c509fb5bd01a8b778e2",type:"query",name:"PublisherSettings",source:""},Qp=Gt(({graphql:{coreGraphql:n}},{skip:t})=>{const a=n.query(jp,{skip:()=>t.value});return{adsPublisherSettingsTypEnabled:ze(()=>a.data.value?.shop?.adsPublisherSettingsTypEnabled??!1),draftAdsPublisherSettingsTypEnabled:ze(()=>a.data.value?.shop?.draftAdsPublisherSettingsTypEnabled??!1),error:a.error,loading:a.loading}});function Zp({inEditor:n,adsPublisherSettingsTypEnabled:t,draftAdsPublisherSettingsTypEnabled:a,isAllowedLocale:r,isAllowedCountry:i}){const o=t,s=a;return n?{preview:!0,shouldRender:s}:{preview:!1,shouldRender:o&&r&&i}}const Rt=["CA","US"],Xp=["en","de","fr","es"];function Jp(){const{billingAddress:n,shippingAddress:t}=N(),{i18n:a}=v(),{geolocation:r}=zr(),i=_e(Sn()),o=Rt.includes(r.country.code),s=T(()=>(t.value??n.value)?.countryCode??""),l=T(()=>Rt.includes(s.value)&&o),c=T(()=>!i.value&&(!At(a.locale)||!l.value)),{adsPublisherSettingsTypEnabled:u,draftAdsPublisherSettingsTypEnabled:d,loading:h}=Kt(Qp,{skip:c});return T(()=>c.value&&!i.value||h.value?{shouldRender:!1,preview:!1}:Zp({adsPublisherSettingsTypEnabled:u.value,draftAdsPublisherSettingsTypEnabled:d.value,isAllowedLocale:At(a.locale),isAllowedCountry:l.value,inEditor:i.value}))}function At(n){return Xp.some(t=>n===t||n.startsWith(`${t}-`))}const eh=/Shop App\/|FBAN|FBAV|FB_IAB|Instagram|musical_ly|Bytedance|TikTok|Snapchat|Line\/|MicroMessenger|Pinterest|Twitter\/|LinkedInApp|GSA\/|;\s?wv/;function nh(n){return eh.test(n)}const th=/Shop App\/[^/]+\/(iOS|Android)\//;function ah(n){return th.exec(n)?.[1]??Vt(n)}function rh(n,t=!1){const{observability:a}=v(),r=j(n),i=j(t),o=j(0),s=j(),l=j(!1),c=j(0),u=j(null);r.current=n,i.current=t,o.current===0&&(o.current=Date.now());const{contactInfo:d,merchandiseLines:h}=N();s.current===void 0&&(s.current=!!(d.peek()?.email||d.peek()?.phone||h.peek()?.lines?.length));const p=ce(()=>{const f=typeof navigator>"u"?"":navigator.userAgent;return{is_in_app_webview:nh(f),browser_family:ki(f).name,os_family:ah(f)}},[]),m=$(()=>{u.current==null&&document.visibilityState==="visible"&&!i.current&&r.current!=null&&(u.current=Date.now())},[]),y=$(()=>{u.current!=null&&(c.current+=Date.now()-u.current,u.current=null)},[]),g=$(()=>c.current+(u.current==null?0:Date.now()-u.current),[]);F(()=>{m();const f=()=>{document.visibilityState==="visible"?m():y(),a.log("typ_visibility_changed","Thank You Page visibility changed",{...p,receipt_masked:i.current,visibility_state:document.visibilityState,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-o.current,visible_ms_with_receipt:g()},{exportImmediately:!0})},b=C=>{y(),a.log("typ_pagehide","Thank You Page hidden",{...p,receipt_masked:i.current,persisted:C.persisted,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-o.current,visible_ms_with_receipt:g()},{exportImmediately:!0})};return document.addEventListener("visibilitychange",f),window.addEventListener("pagehide",b),()=>{y(),document.removeEventListener("visibilitychange",f),window.removeEventListener("pagehide",b)}},[a,m,y,g,p]),F(()=>{l.current||n==null||(l.current=!0,m(),a.log("typ_receipt_rendered","Thank You Page rendered with order receipt",{...p,receipt_masked:i.current,order_details_at_mount:s.current,ms_to_receipt:Date.now()-o.current,visibility_state:document.visibilityState},{exportImmediately:!0,requiresKeepalive:!0}))},[a,n,m,p])}function ih(n){const{observability:t,checkout:a}=v(),r=j(!1);F(()=>{r.current||(r.current=!0,t.counter({name:"thank_you_page_rendered",value:1,attributes:{shopPay:a.identity.current.value==="shopPay",checkoutDesign:a.configuration.layout.isOnePage.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState,receiptLoaded:n!=null}}))},[a,a.identity,t,n])}const oh="_4Qmfj",sh={ThankYou:oh};function jh(){const{i18n:n,url:t,shop:a,source:r,checkout:i,embed:o,router:s,events:l}=v(),{contactEmail:c,hasStorefront:u,externalDomain:d,previewReturnUrl:h}=a,{handleSetIsVerifiedShopAccount:p,status:m,isVerifiedShopAccount:y,fetchAttempts:g}=rl(),f=N().buyerIdentity.value?.purchasingCompany,b=Yr().value,{track:C}=Ce("follow_link"),S=r.type==="simulated",P=!!o?.isFlagshipPartner,I=W(),R=I?.paymentDetails?.buyerActionInfo,M=Ci(),L=No(),V=Do(),q=Be(),Q=qe(),{currentDetour:J}=sn().value,x=qr().value,Z=Ne(),G=Z&&x&&$r({embedder:o?.embedder,isThankYouDetour:J?.type==="thankYou",normalizedPath:s.currentUrl.value.normalizedPath}),{main:{section:te}}
2=kn(),pe=Jp(),Se=i.configuration.layout.isOnePage.value,ne=i.configuration.isUniversalCheckoutFinalizer;F(()=>{ne&&l.dispatchEvent(new Ti)},[l,ne]);const Te=Si(te);Ni("thank-you");const{track:ge}=Vp({showVerifyShopAccountButton:m==="split_user"});Li({stage:I===void 0?Gn.Usable:Gn.Complete,id:"ThankYou"}),xi("ThankYou"),F(()=>{ge()},[ge]);const Pe=ke("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS1"),Le=ke("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS2"),ae=ke("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS3"),{header:{logo:fe}}=kn(),he=ce(()=>{if(!u&&d)return`https://${d}`;if(S)return t.storefront();if(h)return h;if(fe?.link)return fe.link;if(r.headerLogoUrl)return r.headerLogoUrl;if(u&&t.storefront())return t.storefront()},[S,fe?.link,r.headerLogoUrl,u,t,d,h]);xo(he,u&&!b&&!ne),Gp(),rh(I,P),ih(I);const Ge=e(O,{children:[e(Di,{children:n.translate("thank_you.title")}),e(_,{gap:"@media (inline-size >= medium) large-500, large-300",children:[!Z&&e(st,{}),e(Ii,{children:[e(Re,{target:"card",children:e(wi,{grouped:!0,children:[e(Je,{customizations:Pe}),R&&e(Fs,{}),e(Re,{target:"edgeToEdgeCard",children:e(yp,{children:Z?e(st,{}):null})}),G&&e(Fp,{}),e(Zl,{}),e(E,{when:Q,children:e(vu,{})}),!ne&&pe.value.shouldRender&&e(Re,{target:"edgeToEdgeCard",children:e(oc,{preview:pe.value.preview})}),e(E,{when:V,children:e(Lo,{})}),!ne&&e(E,{when:L,children:e(yu,{})}),e(E,{when:M,children:e(Rl,{})}),R&&e(zo,{}),e(Je,{customizations:Le}),e(E,{when:()=>q.value&&!Q.value,children:e(ku,{})}),y||ne?null:e(Wp,{onSignInCompleted:p,loading:m==="fetching_status",fetchAttempts:g}),e(Pl,{}),e(Je,{customizations:ae})]})}),e(Ei,{children:[!f&&!b&&i.configuration.allowRedirectToStorefront&&e(Mi,{children:e(de,{variant:"primary",size:"large",inlineSize:"fill",href:he,onClick:S?void 0:()=>C("continue_shopping"),children:n.translate("thank_you.return_to_store_link_label")})}),!ne&&e(Ri,{children:e(w,{textAlign:"center",children:e(Ee,{children:n.translate("thank_you.contact_us_html",{contact_us:e(ye,{href:S?void 0:`mailto:${c}`,onClick:S?void 0:()=>C("contact_us"),children:n.translate("thank_you.contact_us")})})})})})]})]})]})]}),mn=Se?e(D,{className:sh.ThankYou,padding:`@media (inline-size >= extraSmall) small-300 none, (inline-size >= medium) none, ${Te?"small-300 none":"none"}`,children:Ge}):Ge;return e(Np,{children:mn})}export{jh as default};

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.