PageSourceSearch

https://ecualama.com/cdn/shopifycloud/checkout-web/assets/c1/909cc5d6.Do_Yq6gr.js

js ecualama.com collected 2026-10-05 21:52:48 UTC 161,886 bytes, 1 lines download raw bytes

1import{z as e,u as n,S as t,g as a,h as i,o as r,T as o,y as l,q as s,k as c,m as d,_ as u,an as h,I as p,t as m,s as _,w as y,H as g,D as f,az as b,X as v,x as k,a6 as w,aF as C,Q as S,a7 as x,a8 as T,n as L,p as I}from"./2c1ab0fe.RaLGJvq2.js";import{v as P,B as M,S as A,a0 as E,i as N,cy as R,ah as D,aa as B,bz as z,c_ as F,f as O,H as q,h as U,cF as j,gx as H,j as W,a1 as $,aq as V,G as Y,L as K,b as G,an as Q,d2 as Z,ds as J,cI as X,at as ee,cv as ne,a8 as te,cD as ae,aS as ie,aE as re,eQ as oe,hr as le,hs as se,aB as ce,a2 as de,c0 as ue,J as he,D as pe,E as me,bD as _e,ht as ye,ce as ge,ai as fe,d as be,n as ve,U as ke,hu as we,x as Ce,f4 as Se,e as xe,gj as Te,av as Le,s as Ie,hv as Pe,hw as Me,hx as Ae,hy as Ee,gs as Ne,hz as Re,hA as De,hB as Be,hC as ze,hD as Fe,t as Oe,bc as qe,M as Ue,bu as je,$ as He,eE as We,hE as $e,k as Ve,W as Ye,z as Ke,bI as Ge,c as Qe,cz as Ze,hF as Je,hG as Xe,e2 as en,ae as nn,af as tn,aJ as an,aR as rn,hH as on,eF as ln,ct as sn,bF as cn,hI as dn,hJ as un}from"./164ad2e3.bPUx3Fg0.js";import{p as hn,a as pn,a4 as mn,jm as _n,jn as yn,bf as gn,e0 as fn,ar as bn,ao as vn,aI as kn,jo as wn,v as Cn,aj as Sn,al as xn,bY as Tn,d7 as Ln,jp as In,bH as Pn,jq as Mn,d0 as An,E as En,d_ as Nn,d$ as Rn,t as Dn,jr as Bn,ch as zn,js as Fn,cz as On,an as qn,jt as Un,cu as jn,aK as Hn,dw as Wn,aJ as $n,di as Vn,J as Yn,ju as Kn,b2 as Gn,aF as Qn,e6 as Zn,dX as Jn,aq as Xn,jv as et,c2 as nt,bV as tt,jw as at,jx as it,bg as rt,a8 as ot,jy as lt,jz as st,em as ct,n as dt,jA as ut,C as ht,j as pt,ai as mt,hN as _t,iL as yt}from"./f67abd2c.BTHhdhoM.js";import{a as gt,u as ft}from"./e0989459.B9f-_Pff.js";import{E as bt}from"./137622f3.B2Oyc-UY.js";import{d as vt,c as kt,P as wt,a as Ct,b as St}from"./0a30a815.ccZD-1L7.js";import{S as xt,T as Tt}from"./79974aab.BHkkF4M9.js";import{T as Lt}from"./7e8cd205.BrnFEGan.js";import{u as It}from"./9f047e05.B541JhC9.js";import{u as Pt,S as Mt,a as At}from"./71ae3d5c.CamNwqhE.js";import{b as Et,i as Nt,s as Rt,a as Dt,c as Bt}from"./181d38d3.Ztafxyj4.js";import{d as zt,b as Ft,g as Ot}from"./64de7b49.QaUyq4Wz.js";import{P as qt}from"./598fef4e.Ct7NLKKD.js";import{P as Ut}from"./30074413.CNZgwxgr.js";import{A as jt}from"./4b1c22b7.DKftNOPJ.js";import{r as Ht}from"./dae24aab.CZ5rWyZM.js";import{S as Wt}from"./6fb6f9d8.mMYN8LPf.js";import{P as $t}from"./47b970b2.D1oAm8Vb.js";import{v as Vt,b as Yt,a as Kt}from"./1f5e7811.CGsiidGr.js";import{u as Gt}from"./22345fd4.BOPeNj8v.js";import{l as Qt,m as Zt,r as Jt,S as Xt,M as ea,R as na,n as ta,c as aa,o as ia,h as ra,a as oa,p as la,I as sa,f as ca,g as da,j as ua,k as ha,q as pa,P as ma,s as _a,C as ya,t as ga}from"./c57e39e6.D_hHy64S.js";import{g as fa,a as ba,b as va,R as ka}from"./e77f7fe0.D6YnMnfe.js";import{R as wa,a as Ca,L as Sa}from"./03fde911.Ceb7NQ1e.js";import{P as xa,M as Ta,c as La,m as Ia,t as Pa,b as Ma}from"./be176b00.C_qyTMZU.js";import{d as Aa,b as Ea,i as Na,u as Ra,E as Da,S as Ba}from"./347b440c.Ct28yEbl.js";import{i as za,b as Fa,c as Oa,d as qa}from"./0e4087ec.D2JbXdFh.js";import{e as Ua}from"./2495faa4.DD6nJl2C.js";import{r as ja}from"./9ce08e25.CMzOvpmI.js";import{C as Ha}from"./d6972375.ohq3z2B5.js";import{P as Wa}from"./064f6ac1.TjWXwVYS.js";import{I as $a}from"./17e57de1.BQ0yd3rN.js";import{I as Va}from"./55098bf1.lh4L-ucv.js";import{S as Ya,P as Ka}from"./cb38e5c2.Dby2tR8W.js";import{S as Ga}from"./9f3d9f8c.CX7kaFl1.js";import{u as Qa}from"./app.CPIYcwpp.js";import{D as Za,B as Ja}from"./8d3a12c3.oGZyrb47.js";import{S as Xa,a as ei}from"./f51e663e.BL0cGzSY.js";import{u as ni}from"./f78726c8.DrWBqMbh.js";import{S as ti}from"./1444e6bd.3dT0WTfN.js";import{a as ai}from"./0c0ad074.CafdwvoO.js";import{h as ii}from"./60a453ce.BHWO3gHr.js";import{T as ri}from"./7b0c98ea.C5VPaglw.js";import{u as oi}from"./945a08d6.DvcgDfRg.js";import{v as li}from"./2210eadb.DF0gIp_2.js";import"./d0bb51ec.BIqtCEEY.js";import"./e12db40c.CeuzD2R-.js";import"./9dba8418.DCzpk36x.js";import"./5fda1420.BxIbEH_S.js";import"./a9fa9fda.D5UMnVmk.js";import"./ca3e798e.BWruLT5k.js";import"./81e109b1.DOkM2TK2.js";import"./f36e5f3f.cFv1if-J.js";import"./4aab4b34.LTg1AGR3.js";import"./21cc90a2.DHzOO82q.js";const si={id:"0c62c3aaedf84bd307e1134828e5fcc88a47d83c453c97544a6cc8711e6444af",type:"mutation",name:"SubscribeForShippingUpdates",source:""};
1class ci extends Error{constructor(){super(...arguments),this.name="SubscribeForShippingUpdateError"}}function di(){const{checkout:e}=pn(),n=gt(),t=P(),a=t?.isRedacted??!1,i=Boolean(n?.shopAppEligible),r=Boolean(n?.shopAppQrCodeKillswitch);return!a&&i&&!r&&!e.configuration.isUniversalCheckoutFinalizer}function ui(){const e=P();if(e?.orderIdentity?.id)return Number(hn(e.orderIdentity.id))}var hi=(e=>(e[e.DisplayButton=0]="DisplayButton",e[e.DisplayForm=1]="DisplayForm",e))(hi||{});function pi({children:e,open:a,label:i,onClick:r,icon:o}){return a?n(t,{children:e}):n(A,{direction:"inline",gap:"base",children:n(M,{onClick:r,"aria-expanded":!1,children:n(A,{direction:"inline",gap:"small-200",alignItems:"center",children:[n(E,{type:o}),n(N,{children:i})]})})})}const mi=({label:e,onInputValueChange:t,error:r,value:o})=>{const l=a();return i(()=>{l.current?.focus()},[r]),n(bt,{id:"email",name:"email",label:e,ref:l,onInput:t,required:!0,error:r,value:o})},_i=({onHandleSubmit:t,isFormSubmitting:a,subscriptionErrorMessage:s})=>{const c=r(""),{i18n:d}=pn(),u=c.value,h=o(()=>l(void 0),[s]),p=h.value,[m,_]=e(!1),y=d.translate("thank_you.order_updates_submit_subscription"),g=o(()=>({state:{email:c},errors:{email:h}}),[c,h]);return i(()=>{m||(p||s)&&(h.value=p||s)},[m,p,s,h]),n(F,{target:"order.deliveryUpdates",children:n(R,{...g,children:n(D,{onSubmit:()=>{_(!1),/@/.test(u)?(h.value=void 0,t(u)):h.value=d.translate("field_errors.email_invalid")},implicitSubmit:y,children:n(A,{gap:"small-300",children:[n(B,{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:[n(mi,{label:d.translate("contact.email_label"),value:u,error:Boolean(p),onInputValueChange:e=>{h.value=void 0,_(!0),c.value=e}}),n(M,{variant:"primary",type:"submit",loading:a,children:y})]}),p?n(z,{controlID:"email",children:p}):null]})})})})},yi=()=>{const{i18n:a,checkout:{negotiator:r}}=pn(),{value:o}=r.current.fields.contactInfo,{submitSubscribeForShippingUpdate:l,status:c,error:d}=function(){const{client:n,observability:t,graphql:{coreGraphql:a}}=pn(),i=n.unstable_getSerialization("sessionToken"),[r,o]=e(),[l,s]=e("idle"),c=P(),d=c?.orderIdentity?.id;return{submitSubscribeForShippingUpdate:async function(e){if(s("loading"),o(void 0),!i||!d)return s("failed"),o("SUBSCRIPTION_FAILED"),void t.error(new ci("Missing sessionToken or orderId"));const{data:n}=await a.mutate(si,{variables:{sessionToken:i,orderId:d,email:e}});if(n){const{__typename:e}=n?.subscribeForShippingUpdates;switch(e){case"SubscribeForShippingUpdatesSuccess":return void s("subscribed");case"SubscribeForShippingUpdatesFailure":return s("failed"),void o(n?.subscribeForShippingUpdates.code);default:s("idle"),t.error(new ci("Undefined subscribeForShippingUpdates type"))}}},status:l,error:r}}(),[u,h]=e(hi.DisplayButton),[p,m]=e(!0),_=e=>{e&&l(e)},y=s(e=>{switch(e){case"SUBSCRIPTION_FAILED":return a.translate("thank_you.order_updates_subscribe_to_email_notifications_failed");case"EMAIL_ALREADY_EXISTS":return a.translate("thank_you.order_updates_subscribe_to_email_notifications_email_already_exists");case"INVALID_REQUEST_INPUT":case"INVALID_EMAIL":return a.translate("field_errors.email_invalid")}},[a])(d);i(()=>{m("subscribed"!==c)},[c,d]);const g={subTitle:a.translate("thank_you.order_status_updates_with_email"),fieldLabel:a.translate("thank_you.order_updates_subscribe_to_email_notifications")};return n(t,{children:[n(O,{children:g.subTitle}),p&&n(A,{gap:"base",padding:"base none none none",children:n(pi,{label:g.fieldLabel,open:u===hi.DisplayForm,icon:"email",onClick:()=>{o?.email?_(o.email):h(hi.DisplayForm)},children:n(_i,{onHandleSubmit:_,isFormSubmitting:"loading"===c,subscriptionErrorMessage:y})})})]})},gi=()=>{const{i18n:e,shop:t}=pn(),a=t.hasFlagEnabled(mn),i=e.translate("thank_you.order_updates_title");return n(U,{accessibilityLabel:i,colorLayer:a?void 0:"control",children:n(A,{gap:"small-200",children:[n(q,{children:i}),n(yi,{})]})})};function fi(){const{checkout:{negotiator:e}}=pn(),{deliveryNext:n}=e.current.fields,t=function(){const{checkout:{negotiator:e}}=pn(),{deliveryNext:n,deliveryExpectations:t}=e.current.fields;return c(()=>{const e=n.value,a=t.value,i="filled"===e?.status,r="filled"===a?.status,o=i&&e.lines.some(e=>"ONE_TIME_PURCHASE"===e.type&&"available"===e.status&&e.methods.some(e=>e?.brandedPromise)),l=i?new Set(e.lines.filter(e=>"available"===e.status).map(e=>"available"===e.status?e.selectedDeliveryMethodHandle:null)):null,s=r&&a.deliveryExpectationLine
1s.some(({brandedPromise:e,deliveryStrategyHandle:n})=>e&&l?.has(n)),c=o||s,d=r&&a.deliveryExpectationLines.some(({brandedPromise:e,deliveryExpectationPresentmentTitle:n})=>!e&&n?.short&&n?.long);return Boolean(c||d)})}(),a=W(),i=zt(),r=yn();return c(()=>{const e=gn(n.value),o=$(a.value.currentDetour),l=r.value.length>=fn,{oneTimePurchaseLines:s,subscriptionLines:c}=V(bn(n.value).filter(vn)),{groups:d,nonShippableCount:u}=Et(s),h="filled"===n.value?.status&&d.length+u===1;return e&&l&&!h||h&&c.length>=2||i.value||t.value&&o})}const bi=()=>{const{userEvents:e,checkout:n,shop:{myshopifyDomain:t,id:a},source:{checkoutSessionIdentifier:i="checkout_identifier_undefined"}}=pn(),r=n.configuration.layout.isOnePage.value,l=Number(hn(a)),c=r?"checkout_one_redesign":"checkout_one",d=o(()=>({checkoutToken:i,shopId:l,checkoutVersion:c,shopifyDomain:t}),[i,c,t,l]);return{track:s((n,t,a)=>{var i,r;e.monorailEvent({schemaId:n,payload:(i=a?.omit??[],r={...d,...t},0===i.length?r:Object.keys(r).reduce((e,n)=>i.includes(n)?e:{...e,[n]:r[n]},{}))})},[d,e])}};function vi(){return function(){if("undefined"!=typeof window&&window.shopAppExperimentFlags)return window.shopAppExperimentFlags.sort((e,n)=>e.name<n.name?-1:1).map(e=>{return`${e.name}=${n=e.group,{control:"c",treatment:"t"}[n]||n}:r`;var n}).join(",")}()}function ki(e){const n=kn(),t=ui(),{track:a}=bi(),i=vi();return{track:s(r=>{t&&a("order_status_page_interaction/4.0",{interactionType:e,interactionValue:r,orderId:t,pageviewToken:n.value.defaultAttributes?.microSessionId??"",sessionToken:n.value.defaultAttributes?.visitToken??"",experimentFlags:i},{omit:["shopifyDomain"]})},[i,e,a,t,n])}}function wi(){const e=P()?.paymentDetails,{track:t}=ki("follow_link"),{i18n:a,source:i,shop:{contactEmail:r},checkout:{negotiator:o}}
1=pn(),l=o.current.fields.paymentLines,s="simulated"===i.type,d=c(()=>{const n=l.value?.lines,t=(n?wn(n):void 0)?.cost;if(t)return a.formatCurrency(t.amount,{form:"short",currency:t.currencyCode});const i=Number.parseFloat(e?.paymentAmount??""),r=e?.paymentCurrency;return Number.isFinite(i)&&r?a.formatCurrency(i,{form:"short",currency:r}):0}),u=c(()=>a.translate("payment.pending_payment.multibanco.buyer_action_info",{amount_due:d.value})),h=e?.buyerActionInfo;return n(A,{gap:"base",children:n(A,{gap:"small-200",children:[n(q,{children:u}),n(A,{direction:"inline",gap:"base",children:n(Y,{children:a.translate("payment.pending_payment.multibanco.instruction_html",{contact_us:n(K,{href:s?void 0:`mailto:${r}`,onClick:s?void 0:()=>t("contact_us"),children:a.translate("thank_you.contact_us")})})})}),n(B,{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:[n(U,{children:n(A,{gap:"base",children:[n(A,{gap:"small-200",children:n(q,{children:a.translate("payment.pending_payment.multibanco.entity")})}),n(A,{gap:"small-200",children:n(N,{children:h?.entity})})]})}),n(U,{children:n(A,{gap:"base",children:[n(A,{gap:"small-200",children:n(q,{children:a.translate("payment.pending_payment.multibanco.reference")})}),n(A,{gap:"small-200",children:n(N,{children:h?.reference})})]})}),n(U,{children:n(A,{gap:"base",children:[n(A,{gap:"small-200",children:n(q,{children:a.translate("payment.pending_payment.multibanco.amount")})}),n(A,{gap:"small-200",children:n(N,{children:d})})]})})]})]})})}function Ci(){const{i18n:e,shop:t}=pn(),a=P()?.paymentDetails?.buyerActionInfo,i=t.hasFlagEnabled(mn);return"MultibancoBuyerActionInfo"!==a?.__typename?null:n(U,{accessibilityLabel:e.translate("thank_you.customer_information_title"),colorLayer:i?void 0:"control",children:n(wi,{})})}function Si(e){return Boolean(e?.label&&e?.text)}function xi(e,n){const t=e.amount;if(null!=t?.amount&&t.currencyCode)return{accessibleAmount:n.formatCurrency(t.amount,{form:"name",currency:t.currencyCode}),value:`${n.formatCurrency(t.amount,{form:"short",currency:t.currencyCode})} ${t.currencyCode}`}}function Ti(e,n){if(!e)return;const t=new Date(e);return{date:n.formatDate(t,{month:"short",day:"numeric",year:"numeric"}),time:n.formatDate(t,{hour:"numeric",minute:"2-digit"})}}function Li(e){if("expired"===e.status)return!0;if(!e.expiresAt)return!1;const n=new Date(e.expiresAt).getTime();return Number.isFinite(n)&&n<=Date.now()}const Ii={familymart:"familymart",lawson:"lawson",ministop:"ministop",seicomart:"seicomart"},Pi="Asia/Tokyo";function Mi(e){return Boolean(e?.label&&e?.text)}function Ai(e){return e.key??e.label??"konbini"}function Ei({detail:e,id:a}){const{i18n:i}=pn(),o=r(!1),l=i.translate("payment.lpm.konbini.voucher.code_copied");return n(t,{children:[n(Z,{id:a,name:a,label:e.label,value:e.text,readOnly:!0,accessoryEnd:n(M,{variant:"tertiary",size:"small",onClick:async()=>{try{await J(e.text),o.value=!0}catch{o.value=!1}},accessibilityLabel:o.value?l:i.translate("payment.lpm.konbini.voucher.copy_code",{label:e.label}),children:n(E,{type:o.value?"check":"clipboard"})})}),n("p",{role:"status","aria-live":"polite",className:Cn({screenReaders:"only"}),children:o.value?l:""})]})}function Ni({instructionSet:e,open:t,onToggle:a}){const i=Ai(e),r=e.label??i,o=(e.details??[]).filter(Mi),l=(e.steps??[]).filter(Boolean),s=`konbini-chain-${i}-instructions`;return n("div",{id:`konbini-chain-${i}`,className:d("Bedu9",t&&"RExUg"),children:[n(Ut,{accessibilityRole:"expandableControl",accessibilityLabel:r,controlId:s,expanded:t,onPress:a,className:"Xaalv",padding:"base",children:n(B,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"small-300",alignItems:"center",children:[n(qt,{type:Ii[i]??"konbini",active:!0,accessibilityVisibility:"hidden"}),n(N,{type:"strong",children:r}),n(E,{type:t?"chevronUp":"chevronDown",size:"small"})]})}),n("div",{className:"_8A0Cd",children:n(B,{id:s,gridTemplateRows:t?"minmax(0, 1fr)":"minmax(0, 0fr)",children:n("div",{className:"JIcdC",children:n(G,{inert:!t,padding:"base",paddingBlockStart:"none",children:n(A,{gap:"base",children:[n(B,{gridTemplateColumns:o.length>1?"minmax(0, 1fr) minmax(0, 1fr)":"1fr",gap:"small-400",children:o.map((e,t)=>n(Ei,{detail:e,id:`konbini-${i}-code-${t}`},e.label))}),l.length>0?n("ol",{className:"CMO8N",children:l.map(e=>n("li",{className:"Bgyek",children:n(N,{color:"subdued",size:"base",children:e})},`${i}-${e}`))}):null]})})})})})]})}function Ri({amount:e,expired:t}){const{i18n:a}=pn();return t?n(q,{level:1,children:a.translate("payment.lpm.konbini.voucher.expired_title")}):e?n(q,{level:1,children:[n(N,{accessibilityVisibility:"exclusive",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:e.accessibleAmou
1nt})}),n(N,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:e.value})})]}):null}function Di({expiryDate:e,expired:t}){const{i18n:a}=pn();if(!e)return null;const i=n(N,{color:"subdued",size:"base",type:"strong",children:e});return n(N,{color:"subdued",size:"base",children:t?a.translate("payment.lpm.konbini.voucher.expired",{date:i}):a.translate("payment.lpm.konbini.voucher.expires_at",{date:i})})}function Bi({paymentInstructions:e}){const{i18n:t}=pn(),a=(e.instructionSets??[]).filter(e=>(e.details??[]).some(Mi)),i=r(null);if(0===a.length)return null;const o=function(e,n){const t=e.amount;if(null!=t?.amount&&t.currencyCode)return{accessibleAmount:n.formatCurrency(t.amount,{form:"name",currency:t.currencyCode}),value:`${n.formatCurrency(t.amount,{form:"short",currency:t.currencyCode})} ${t.currencyCode}`}}(e,t),l=Li(e),s=function(e,n){if(!e)return;const t=new Date(e),a=n.formatDate(t,{month:"short",day:"numeric",year:"numeric",timeZone:Pi}),i=n.formatDate(t,{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:Pi});return n.translate("payment.lpm.konbini.voucher.expiry_date_time",{date:a,time:i})}(e.expiresAt,t),c=t.translate("payment.lpm.konbini.voucher.label");return n(Q,{children:n(A,{gap:"none",children:[n(G,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:l?"large":"large large none none",padding:"large-100",inlineSize:"100%",children:n(A,{gap:"base",children:[n(A,{gap:"small-300",children:[n(B,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[n(Ri,{amount:o,expired:l}),n(qt,{type:"konbini",active:!0,accessibilityVisibility:"hidden"})]}),l?null:n(N,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.choose_outlet")}),n(Di,{expiryDate:s,expired:l})]}),l?null:n("div",{className:"TNF54",role:"group","aria-label":c,children:a.map(e=>{const t=Ai(e);return n(Ni,{instructionSet:e,open:i.value===t,onToggle:()=>{i.value=i.value===t?null:t}},t)})})]})}),l?null:n(G,{className:"JuwoV",padding:"base",paddingInline:"large-100",children:n(N,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.keep_receipt")})})]})})}function zi({details:e}){const{i18n:t}=pn();return n(A,{gap:"small-500",children:e.map(e=>n(G,{borderRadius:"base",className:"Gltpp",inlineSize:"100%",children:n(N,{type:"small",color:"subdued",children:t.translate("payment.pending_payment.multibanco.labelled_code",{label:e.label,code:e.text})})},e.label))})}function Fi({step:e,expiry:t}){const{i18n:a}=pn();return e?n(A,{gap:"none",children:[n(N,{color:"subdued",size:"base",children:e}),t?n(N,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.multibanco.expires_at",{date:n(N,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function Oi({expiry:e}){const{i18n:t}=pn();return e?n(N,{color:"subdued",size:"base",children:t.translate("payment.pending_payment.multibanco.expired",{date:n(N,{color:"subdued",size:"base",type:"strong",children:e})})}):null}function qi({amount:e,expired:t}){const{i18n:a}=pn();return t?n(q,{level:1,children:a.translate("payment.pending_payment.multibanco.expired_title")}):e?n(q,{level:1,children:[n(N,{accessibilityVisibility:"exclusive",children:a.translate("payment.pending_payment.multibanco.pay",{amount:e.accessibleAmount})}),n(N,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.pending_payment.multibanco.pay",{amount:e.value})})]}):null}function Ui({paymentInstructions:e}){const{i18n:t}=pn(),a=e.instructionSets?.find(({key:e})=>"multibanco"===e);if(!a)return null;const i=function(e){return e.details?.filter(Si)??[]}(a);if(0===i.length)return null;const r=xi(e,t),o=Li(e),l=Ti(e.expiresAt,t),s=l?t.translate("payment.pending_payment.multibanco.expiry_date_time",l):void 0,c=t.translate("payment.pending_payment.multibanco.label");return n(Q,{children:n(G,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:n(A,{gap:"small-200",children:[n(B,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[n(qi,{amount:r,expired:o}),n(qt,{type:"multibanco",active:!0,accessibilityVisibility:"hidden"})]}),o?n(Oi,{expiry:s}):n(Fi,{step:a.steps?.[0],expiry:s}),n(zi,{details:i})]})})})}const ji=/Shop App\/[^/]+\/iOS\//;function Hi({passUrl:e}){const{client:t,i18n:a}=pn();return e&&function(e){const n=Sn(e);return"iOS"===n||"Mac OS"===n||ji.test(e)}(t.userAgent)?n(G,{className:"chT5l",paddingBlockStart:"large-100",children:n(B,{justifyItems:"center",children:n(K,{href:e,children:n(X,{src:"/cdn/shopifycloud/checkout-web/assets/c1/assets/add-to-apple-wallet.c2C6mOjH.svg",alt:a.translate("payment.pending_payment.apple_wallet.badge_alt"),className:"_8CGB7",inlineSize:"auto"})})})}):null}function Wi(e){return 8*Math.round(e/8)}function $i(e,n){try{const t=new URL(e);return t.searchParams.set("width",n.toString()),t.toString()}catch{return e}}function Vi(e){const n=a(null),t=a(e),i=a(null),o=a(0),l=r(e),s=r(!1);return u(()=>{o.current+=1,t.current=e,i.current=null,l.value=e,s.value=!1},[e,s,l]),u(()=>{const a=n.current;if(!e||!a)return;const r="undefined"!=typeof ResizeObserver;let c,d=!1;const u=n=>{const a=Wi(n);if(a<=0)return;const r=t.current;if(r&&function(e,n){const t=function(e){try{const n=Number(new URL(e).searchParams.get("width"));return Number.isFinite(n)&&n>0?Wi(n):void 0}catch{return}}(e);return null!=t&&Math.abs(t-n)<8}(r,a))return o.current+=1,i.current=null,s.value=!1,void(c&&(clearTimeout(c),c=void 0));if(i.current===a)return void(s.value=!0);i.current=a;const u=o.current+1;o.current=u,s.value=!0,c&&clearTimeout(c),c=setTimeout(()=>((n,a)=>{const r=$i(e,n),c=new window.Image;c.onload=()=>{d||a!==o.current||(t.current=r,i.current=null,l.value=r,s.value=!1)},c.onerror=()=>{d||a!==o.current||(i.current=null,s.value=!1)},c.src=r})(a,u),200)},h=()=>{u(a.getBoundingClientRect().width)};if(h(),!r)return window.addEventListener("resize",h),()=>{d=!0,c&&clearTimeout(c),window.removeEventListener("resize",h)};const p=new ResizeObserver(([e])=>{e&&u(e.contentRect.width)});return p.observe(a),()=>{d=!0,c&&clearTimeout(c),p.disconnect()}},[e,s,l]),{containerRef:n,imageUrl:l,isLoading:s}}function Yi({imageUrl:e,altText:t,height:a,printWidth:i=510}){const{containerRef:r,imageUrl:o,isLoading:l}=Vi(e),s=o.value||e,c=$i(e,i);return n(G,{ref:r,inlineSize:"100%",blockSize:a,children:n(G,{inlineSize:"100%",blockSize:"100%",position:"relative",children:[n("picture",{className:"TBsba",children:[n("source",{media:"print",srcSet:c}),n(X,{src:s,alt:t,className:"PITIE",inlineSize:"auto",objectFit:"contain"})]}),l.value?n("div",{"aria-hidden":"true",className:"Fmqjk",children:n(ee,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%",delay:!1})}):null]})})}function Ki({barcode:e,detail:t}){if(!e?.imageUrl)return null;const a=t?`${t.label}: ${t.text}`:"";return n(G,{inlineSize:"100%",maxInlineSize:"510px",children:n(Yi,{imageUrl:e.imageUrl,altText:e.altText||a,height:"67.5px"})})}function Gi({step:e,expiry:t}){const{i18n:a}=pn();return e?n(A,{gap:"none",children:[n(N,{color:"subdued",size:"base",children:e}),t?n(N,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.oxxo.expires_at",{date:n(N,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function Qi({detail:e}){const{i18n:t}=pn(),a=t.translate("payment.pending_payment.oxxo.reference_number");return n(G,{borderRadius:"base",className:"OVcKI",inlineSize:"100%",children:n(N,{type:"small",color:"subdued",children:[a," ",e.text]})})}function Zi({paymentInstructions:e}){const{i18n:t}=pn(),a=e.instructionSets?.find(({key:e})=>"oxxo"===e);if(!a)return null;const i=xi(e,t),r=a.details?.find(Si),o=a.steps?.[0],l=Ti(e.expiresAt,t),s=l?t.translate("payment.pending_payment.oxxo.expiry_date_time",l):void 0,c=t.translate("payment.pending_payment.oxxo.label");return n(Q,{children:n(G,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:n(A,{gap:"small-200",children:[n(B,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[i?n(q,{level:1,children:[n(N,{accessibilityVisibility:"exclusive",children:t.translate("payment.pending_payment.oxxo.pay",{amount:i.accessibleAmount})}),n(N,{accessibilityVisibility:"hidden",size:"extraLarge",children:t.translate("payment.pending_payment.oxxo.pay",{amount:i.value})})]}):null,n(qt,{type:"oxxo",active:!0,accessibilityVisibility:"hidden"})]}),n(Gi,{step:o,expiry:s}),n(A,{gap:"none",children:[n(Ki,{barcode:a.barcode,detail:r}),r?n(Qi,{detail:r}):null,n(Hi,{passUrl:a.appleWalletPassUrl})]})]})})})}function Ji({paymentInstructions:e}){switch(e.method?.toLowerCase()){case"multibanco":return n(Ui,{paymentInstructions:e});case"oxxo":return n(Zi,{paymentInstructions:e});case"konbini":return n(Bi,{paymentInstructions:e});default:return null}}function Xi(){const e=P()?.paymentDetails,t=e?.buyerActionInfo?.paymentInstructions;return t?n(Ji,{paymentInstructions:t}):null}function er(){const{i18n:e}=pn(),{track:a}=ki("follow_link");return n(t,{children:n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[n(N,{children:e.translate("completed_with_shop_pay.text",{shopPay:n(Wt,{inline:!0,color:"branded",size:"xsmall"})})}),n(K,{target:"_blank",href:"https://shop.app/pay",onClick:()=>a("learn_more_pay"),children:e.translate("completed_with_shop_pay.learn_more")})]})})}function nr(){const{i18n:e}=pn();return n(N,{size:"small",color:"subdued",children:n(Y,{children:e.translate("shop_pay_remember_me.terms_and_privacy_html",{privacy_href:n(ar,{}),terms_href:n(tr,{})})})})}function tr(){const{i18n:e}=pn();return n(t,{children:n(K,{target:"_blank",href:"https://shop.app/terms-of-service",tone:"monochrome",accessibilityLabel:e.translate("shop_pay_remember_me.new_window_disclaimer"),children:[e.translate("shop_pay_remember_me.terms_of_service"),n(E,{type:"external",size:"small",display:"inline"})]})})}function ar(){const{i18n:e}=pn();return n(t,{children:n(K,{target:"_blank",href:"https://www.shopify.com/legal/privacy/app-users",tone:"monochrome",accessibilityLabel:e.translate("shop_pay_remember_me.new_window_disclaimer"),children:[e.translate("shop_pay_remember_me.privacy_policy"),n(E,{type:"external",size:"small",display:"inline"})]})})}function ir({field:e="phone",link:a}){const{i18n:i}=pn();return n(t,{children:[n(N,{color:"subdued",children:n(Y,{children:["phone"===e?i.translate("shop_pay_remember_me.description_html"):i.translate("shop_pay_remember_me.email_description_html")," ",a]})}),n(nr,{})]})}function rr(){const{checkout:{negotiator:e}}=pn(),{shopPayArtifact:n}=e.current.fields;return c(()=>Boolean(n.value?.optIn))}class or extends Error{constructor(){super(...arguments),this.name="OptInFetchError"}}function lr(){const{track:a}=ki("follow_link"),{i18n:o,userEvents:l,source:d,checkout:u,shop:h}=pn(),{hasOptedIn:p,loading:m,errorBannerContent:_,handleSave:y,showPhoneField:g,phoneNumber:f,setPhoneNumber:b,email:v,setEmail:k,inputError:w,handleInput:C,countryCode:S}=function(){const{userEvents:n,source:t,checkout:a,shop:i,i18n:r,url:o,shop:{checkoutPublicAccessToken:l},source:{checkoutSessionIdentifier:c}}=pn(),d=rr(),{value:u}=a.negotiator.current.fields.shippingAddress,{value:h}=a.negotiator.current.fields.contactInfo,[p,m]=e(d.peek()),[_,y]=e(!1),[g,f]=e(u?.phone||h?.phone||""),[b,v]=e(h?.email??""),[k,w]=e(),[C,S]=e(),x=!h?.phone,{validatePhoneNumber:T}=Gt(),L=s(e=>{const n=Vt(e,r.translate("field_errors.email_blank")),t=Yt(e,r.translate("field_errors.email_invalid"));return n||t},[r]),I=s(()=>{k&&w(void 0)},[k]);return{hasOptedIn:p,loading:_,errorBannerContent:C,handleSave:s(async()=>{if(S(void 0),x){const e=!g.includes("+");if(!T(g,e?u?.countryCode:void 0))return void w(r.translate("field_errors.thank_you_remember_me_phone_invalid"))}else{const e=L(b);if(e)return void w(e)}n.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...xn(t,a,i),action:x?"update_phone_input":"update_email_input",phoneNumber:g,email:b,source:"thank_you_page",trigger:"manual"}});try{y(!0);const e=await fetch(o.shopPayOptin(c),{method:"POST",body:JSON.stringify({checkout:{vault_phone:g,vault_email:b,is_checkout_one:!0}}),headers:{"Content-Type":"application/json","X-Shopify-Checkout-Version":"2025-03-18",accept:"application/json",authorization:`Basic ${l}`}});if(200===e.status){const{success:n}=await e.json();return void(n?m(!0):S(r.translate("shop_pay_remember_me.errors.optin_retry")))}throw new or("Opt in request didn't succeed")}catch{w(r.translate("shop_pay_remember_me.errors.optin"))}finally{y(!1)}},[n,t,a,i,o,c,l,g,b,x,u?.countryCode,T,L,r]),showPhoneField:x,phoneNumber:g,setPhoneNumber:f,email:b,setEmail:v,inputError:k,handleInput:I,countryCode:u?.countryCode||""}}
1(),x=r(p),{value:T}=u.negotiator.current.fields.deliveryNext,{value:L}=ne(),I=!gn(T)||L?{borderWidth:"base none none none",background:"subdued",padding:"base",borderRadius:"none none base base"}:{borderWidth:"base",background:"base",padding:"base",borderRadius:"base"},P=u.negotiator.parts.shippingAddress,E=c(()=>P.value.oneTimeUse?o.translate("thank_you.opt_in_payment_only_welcome_message_html",{shopify_pay:n(Wt,{inline:!0,color:"branded",size:"xsmall"})}):o.translate("thank_you.opt_in_welcome_message_html",{shopify_pay:n(Wt,{inline:!0,color:"branded",size:"xsmall"})})),N=c(()=>P.value.oneTimeUse?o.translate("shop_pay_remember_me.payment_information_only_label"):o.translate("shop_pay_remember_me.label")),R=n(t,{children:N});i(()=>{l.monorailEvent({schemaId:"shopify_pay_user_optin_ui_impression/1.0",payload:{...xn(d,u,h),source:"thank_you_page",elementType:"remember_me_box"}})},[l,d,u,h]);const D=n(K,{target:"_blank",href:"https://shop.app/pay",onClick:()=>{a("learn_more_pay")},children:o.translate("shop_pay_remember_me.learn_more")});return n(G,{...I,children:p?n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[n(Y,{children:E}),D]}):n(A,{gap:"base",children:[_?n(te,{tone:"critical",children:_}):null,n(A,{direction:"inline",gap:"base",children:n(ae,{checked:x.value,onChange:()=>{const e=!x.value;l.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...xn(d,u,h),action:e?"click_remember_me_box":"unclick_remember_me_box",phoneNumber:f,email:v,source:"thank_you_page",trigger:"manual"}}),x.value=e},label:R})}),n(ie,{open:x.value,id:"thankYouRememberMe",children:n(A,{gap:"base",children:[n(G,{padding:"small-200 none none none",children:n(A,{gap:"small-300",children:[n(B,{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:[g?n($t,{id:"phone",disabled:m,countryCode:S,label:o.translate("shop_pay_remember_me.mobile_phone_number"),icon:"mobile",value:f,error:Boolean(w),onChange:b,onInput:C}):n(bt,{disabled:m,id:"email",name:"email",label:o.translate("shop_pay_remember_me.email_label"),value:v,error:Boolean(w),onChange:k,onInput:C,required:!1}),n(M,{variant:"primary",onClick:y,loading:m,children:o.translate("shop_pay_remember_me.save")})]}),w?n(z,{controlID:g?"phone":"email",children:w}):null]})}),n(ir,{field:g?"phone":"email",link:D})]})})]})})}const sr=5e3,cr=t=>{const{duration:a=sr,onClose:r,text:o,subText:l,actionText:s,handleAction:c,id:d,variant:u="default"}=t,[h,p]=e(!1);i(()=>{p(!0);const e=setTimeout(()=>{if(0!==a){p(!1);const e=setTimeout(()=>{r(d)},300);return()=>clearTimeout(e)}},a);return()=>clearTimeout(e)},[a,d,r]);const m=Qt("error"===u?"text-poppy-d1":"text-black");return n("div",{className:Qt("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",h?"translate-y-0":"translate-y-94","error"===u?"bg-poppy-l2":"bg-white"),"data-testid":"shop-toast-element",children:["error"!==u&&n(Zt,{className:"size-8 flex-shrink-0 text-purple-primary"}),n("div",{className:"flex flex-col overflow-hidden",children:[n("div",{className:Qt("font-sans text-body-title-small",m),children:o}),l&&n("div",{className:Qt("truncate font-sans text-caption",m),children:l})]}),s&&c&&n("button",{type:"button","aria-label":s,className:Qt("ml-auto h-8 w-fit max-w-[40%] rounded-sm100 px-3 font-sans text-button-medium","error"===u?"bg-poppy-d1 text-white":"bg-grayscale-l5 text-black"),"data-testid":"toast-action-button",onClick:c,children:s})]})},dr=()=>{const{instanceId:t}=ta(),{trackPageImpression:a}=aa(),[i,r]=e([]),{recordCounter:l}=ia(),c=s(e=>{r(n=>n.filter(n=>n.id!==e))},[]),d=s(e=>{r(n=>[...n,e])},[]),u=o(()=>({renderToast:({detail:e})=>{e.flow&&l("shop_js_toast_rendered",{attributes:{flow:e.flow,variant:e.variant||"default"}}),a({allowDuplicates:!0,analyticsTraceId:e.analyticsTraceId,flow:e.flow,page:"RENDER_TOAST"}),d(e)}}),[d,l,a]);return ra(u),h(n(la,{instanceId:t,type:"toast",variant:"default",children:n("div",{className:"fixed inset-x-0 bottom-8 z-max mx-auto flex flex-col items-center gap-3",children:i.map(e=>n(cr,{...e,onClose:c},e.id))})}),oa.body)},ur={id:"520f926255e48c24cf1b0e497a7dfa36db1b5b10f628941f45c629153aa67e5f",type:"query",name:"PendingPayEscrowReceipt",source:""},hr=re(({graphql:{coreGraphql:e}},{receiptId:n,retries:t,sessionToken:a,skip:i})=>{const r=l(1),o=l(!i.peek()),s=e.query(ur,{variables:()=>({receiptId:n.value,sessionToken:a.value}),skip:()=>i.value}),c=p(()=>
1{return e=s.data.value,n=s.error.value,Boolean("ProcessedReceipt"===e?.receipt?.__typename&&e?.receipt?.shopAppLinksAndResources?.hasPendingPayEscrow)&&!n;var e,n});let d=!0;function u(){!d||r.peek()>=t||(d=!1,setTimeout(()=>{s.loading.peek()||s.refetch(),r.value++,d=!0,r.peek()<t?u():o.value=!1},1e3))}return m(function(){c.value&&(o.value=!1,d=!1)}),m(function(){s.loading.value||o.value&&u()}),{attempts:p(()=>r.value),error:s.error,loading:p(()=>o.value),pendingPayEscrow:c}});function pr(){const e=gt();return Boolean(e?.payEscrowMayExist)}const mr=({email:e,text:t})=>{customElements.get("shop-toast-manager")||Jt(({element:e,...t})=>n(na,{element:e,featureName:"ShopToastManager",children:n(Xt,{children:n(ea,{children:n(dr,{...t})})})}),{methods:["renderToast"],name:"shop-toast-manager",props:{},shadow:"open"});const a=document.createElement("shop-toast-manager");document.body.appendChild(a),a.renderToast({flow:"thank_you_page_escrow",text:t,subText:e})};function _r(){const{i18n:e,checkout:{negotiator:t}}=pn(),a=t.current.fields.buyerIdentity.value?.purchasingCompany;return a?n(A,{gap:"small-200",children:[n(q,{children:e.translate("thank_you.company_location_section_title")}),n(A,{children:[n(O,{children:a.company.name}),n(O,{children:a.location.name})]})]}):null}function yr({lines:e}){return e.length>0?n(A,{children:e.map(e=>n(O,{children:e},e))}):null}function gr(){const{i18n:e,checkout:{negotiator:t}}=pn(),a=t.current.fields.deliveryNext,i=c(()=>Ln(a.value).find(({method:e})=>"PICK_UP"===e.methodType)?.method.pickupLocation);return n(y,{when:i,children:t=>n(A,{gap:"small-200",children:[n(q,{children:e.translate("thank_you.pick_up_in_store_marker.shipping")}),n(jt,{address:t.address,multiline:!0})]})})}class fr extends Error{constructor(){super(...arguments),this.name="PaymentMethodError"}}function br({children:e}){return n("bdi",{children:e})}function vr({label:e,fallback:a}){return e?n(br,{children:e}):n(t,{children:a})}function kr({amount:e}){return e?n(N,{children:[" · ",e]}):null}function wr({variant:e,icon:t,label:a,amount:i}){return"rollup"===e?n(ba,{icon:t,details:a,amount:i}):n(A,{direction:"inline",alignItems:"center",gap:"small-200",children:[t,n(O,{children:[a,n(kr,{amount:i})]})]})}function Cr({cost:e,method:a,variant:i="default",showAmount:r=!0}){const{shop:o,i18n:l,observability:s,checkout:{negotiator:c}}=pn(),{value:d}=c.current.fields.paymentMethods,{value:u}=c.current.fields.paymentFlexibilityPaymentTermsTemplate,h=oe(),p=P(),m=p?.paymentDetails,_=p?.paymentExtensionBrand,y=Pr({paymentDetails:m}),g=o.hasFlagEnabled(In),f=Boolean(Pn().value?.amount),b=u&&!f,v=r&&e&&!b?l.formatCurrency(e.amount,{currency:e.currencyCode,form:"explicit"}):void 0;switch(a.type){case"direct":case En.CreditCard:return n(Sr,{method:a,amount:v,variant:i,installmentInfo:e&&m?.installmentDetails?{cost:e,installmentDetails:m.installmentDetails}:null});case En.PayPal:return n(xr,{amount:v,variant:i});case"wallet":{if("PAYPAL_EXPRESS"===a.name)return n(xr,{amount:v,variant:i});if("SHOPIFY_INSTALLMENTS"===a.name)return n(Tr,{variant:i,walletContent:a.walletContent});if("SHOP_PAY"===a.name)return n(Lr,{amount:v,variant:i,paymentDetails:m,walletContent:a.walletContent,paymentExtensionBrand:_,installmentInfo:e&&m?.installmentDetails?{cost:e,installmentDetails:m.installmentDetails}:null});const t=e=>{switch(e){case"APPLE_PAY":return l.translate("brand.apple_pay");case"GOOGLE_PAY":return l.translate("brand.google_pay");default:return s.error(new fr(`Unknown wallet payment method for label: ${e}`)),null}},r=(e=>{switch(e){case"APPLE_PAY":return n(qt,{type:"apple-pay"});case"GOOGLE_PAY":return n(qt,{type:"google-pay"});default:return s.error(new fr(`Unknown wallet payment method for icon: ${e}`)),null}})(a.name),o=t(a.name);return n(wr,{variant:i,icon:r,label:"rollup"===i?Ir(m)??o:n(vr,{label:y({displayBrandLabel:!0}),fallback:o}),amount:v})}case"shopWallet":return n(Lr,{amount:v,variant:i,paymentDetails:m});case"walletsPlatformPaymentMethod":return"rollup"===i?n(wr,{variant:i,icon:n(qt,{type:a.name}),label:m?.paymentDescriptor?n(br,{children:m.paymentDescriptor}):Ir(m),amount:v}):n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"small-300",children:[n(qt,{type:a.name}),n(O,{children:[n(vr,{label:m?.paymentDescriptor??y({displayBrandLabel:!0})}),n(kr,{amount:v})]})]});case"local":{const e=d?.find(e=>"local"===e.type&&e.name===a.name),t=e?.displayName||a.name;return n(wr,{variant:i,icon:n(qt,{type:a.name}),label:t,amount:v})}case"paymentOnDelivery":return n(wr,{variant:i,icon:n(qt,{type:"cash"}),label:l.translate("payment_gateway.cash_on_delivery_label"),amount:v});case"manualPayment":case"customManualPayment":return n(wr,{variant:i,icon:n(qt,{type:"cash"}),label:a.name,amount:v});case"deferred":{if(h.value)return null;const e=l.translate("payment_gateway.deferred_payment_label"),a="FIXED"===u?.type?void 0:u;return n(A,"rollup"===i?{gap:"small-400",children:[n(wr,{variant:i,label:e,amount:v}),a?n(O,{children:a.translatedName}):null]}:{children:a?n(t,{children:[n(O,{children:a.translatedName}),n(O,{children:e})]}):n(O,{children:[e,n(kr,{amount:v})]})})}
1case"giftCard":{if(g)return null;const e=An(a).toUpperCase();return n(wr,{variant:i,icon:n(qt,{type:"gift-card"}),label:n(br,{children:l.translate("payment.masked_digits_label",{last_digits:e})}),amount:v})}case"redeemable":if("STORE_CREDIT"===a.redemptionSource)return n(wr,{variant:i,icon:n(qt,{type:"store-credit"}),label:l.translate("payment.store_credit.label"),amount:v});if("SHOP_CASH"===a.redemptionSource){const e=a.redemptionContent;return"ZERO_BALANCE_OFFER"===e?.redemptionPaymentOptionKind?null:e?.details?.length?e.details.map(e=>{if(!Mn.includes(e.redemptionType))return null;const t=r&&e.destinationAmount&&!b?l.formatCurrency(parseFloat(e.destinationAmount.amount),{currency:e.destinationAmount.currencyCode,form:"short"}):void 0;return"SHOP_CASH_BALANCE"===e.redemptionType?n(wr,{variant:i,icon:n(qt,{type:"shop-cash"}),label:l.translate("order_summary.shop_cash_title"),amount:t},e.redemptionType):null}):n(wr,{variant:i,icon:n(qt,{type:"shop-cash"}),label:l.translate("order_summary.shop_cash_title"),amount:v})}if("CUSTOM"===a.redemptionSource){const e=a.redemptionContent,t=e?le(e)?.toUpperCase():"";return n(wr,{variant:i,icon:n(qt,{type:"gift-card"}),label:n(br,{children:l.translate("payment.ends_with_label",{last_digits:t||""})}),amount:v})}return null;case"offsite":case"customOnsite":{const e=m?.paymentIcon,t=Boolean(_)||!e||["generic","usdc"].includes(e)?Er(_,l):a.name;return n(wr,{variant:i,icon:n(qt,{type:_||e||"generic"}),label:t,amount:v})}case"bank":{const t=n(qt,{type:fa(a.bankName??"")}),o=n(br,{children:l.translate("payment.masked_digits_label",{last_digits:a.lastDigits??""})});if("rollup"===i)return n(A,{gap:"small-400",children:[n(wr,{variant:i,icon:t,label:o,amount:v}),n(N,{children:a.bankName})]});const s=" · ",c=r&&e?.amount?l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"}):null;return n(A,{gap:"small-400",children:[n(N,{children:a.bankName}),n(A,{direction:"inline",alignItems:"center",gap:"small-200",children:[t,n(O,{children:[o,a.lastDigits&&c?s:null,c]})]})]})}default:return null}}function Sr({method:e,amount:t,variant:a,installmentInfo:i}){const{i18n:r,checkout:{negotiator:o}}=pn(),l=o.current.fields.buyerIdentity.value?.purchasingCompany,s=o.current.fields.paymentFlexibilityPaymentTermsTemplate,d=oe(),u=c(()=>s.value&&!d.value?s.value.translatedName:void 0),h=e.brand??"generic",p="direct"===e.type?e.creditCardLastFourDigits:e.displayLastDigits,m="MAESTRO"===h?r.translate("payment_gateway.debit_card_label"):r.translate("payment_gateway.credit_card_label"),_=Nn(h)?Rn(h):null,g="rollup"===a&&Boolean(_&&p),f=(()=>{const e=i?.installmentDetails?.count,n=i?.cost;if(!e||!n)return null;const t=se(n.amount,e);return r.translate("payment.msi_installment_plan",{amount:r.formatCurrency(t,{currency:n.currencyCode,form:"explicit"}),num_payments:e})})(),b=n(y,{when:u,children:e=>n(O,{children:e})});return n(A,{gap:"small-400",children:["rollup"===a?null:b,n(wr,{variant:a,icon:n(qt,{type:h,accessibilityVisibility:g?"hidden":void 0}),label:p?(v=p,"rollup"===a?n(va,{brandLabel:_,lastDigits:v}):n(br,{children:r.translate("payment.masked_digits_label",{last_digits:v})})):m,amount:t}),"rollup"===a?b:null,f?n(N,{color:"subdued",children:f}):null,"direct"===e.type&&e.vaultingAgreement?n(A,{direction:"inline",alignItems:"center",gap:"small-400",children:[n(E,{size:"small",type:"check"}),n(N,{color:"subdued",children:l?r.translate("payment.card_vaulted_company_location"):r.translate("payment.payment_method_saved")})]}):null]});var v}function xr({amount:e,variant:t}){const{i18n:a}=pn();return n(wr,{variant:t,icon:n(qt,{type:"paypal"}),label:a.translate("brand.paypal"),amount:e})}function Tr({variant:e,walletContent:t}){const{i18n:a}=pn(),i=gt(),r=t?.creditCardBrand,o=t?.creditCardLastFourDigits,l=r&&Nn(r)?Rn(r):null,s="rollup"===e&&Boolean(l&&o),c=r?n(qt,{type:r,accessibilityVisibility:s?"hidden":void 0}):n(Wt,{color:"branded",size:"xsmall"}),d="rollup"===e?o?n(va,{brandLabel:l,lastDigits:o}):null:n(br,{children:o&&a.translate("payment.masked_digits_label",{last_digits:o})});return n(A,{gap:"small-300",children:[n(wr,{variant:e,icon:c,label:d}),n(O,{children:a.translate("shop_pay_remember_me.installments.paid_in_installments")}),i?n(O,{children:n(K,{target:"_blank",href:i.shopInstallmentsViewSchedules,children:a.translate("shop_pay_remember_me.installments.view_schedule")})}):null]})}function Lr({amount:e,variant:t,paymentDetails:a,walletContent:i,paymentExtensionBrand:r,installmentInfo:o}){const l=Pr({paymentDetails:a}),{i18n:s,checkout:{negotiator:c}}=pn(),{value:d}=c.current.fields.managedByMarketsPro,u=Dn({managedByMarketsPro:d}),h=(()=>{const e=o?.installmentDetails?.count,n=o?.cost;if(!e||!n)return null;const t=se(n.amount,e);return s.translate("payment.msi_installment_plan",{amount:s.formatCurrency(t,{currency:n.currencyCode,form:"explicit"}),num_payments:e})})();if(r)return n(wr,{variant:t,icon:n(qt,{type:r}),label:Er(r,s),amount:e});if(a?.paymentCardBrand){const i="rollup"===t&&Boolean(Ar(a)&&a.creditCardLastFourDigits);return n(A,{gap:"small-400",children:[n(wr,{variant:t,icon:n(qt,{type:a.paymentCardBrand,accessibilityVisibility:i?"hidden":void 0}),label:"rollup"===t?Ir(a):n(vr,{label:l({displayBrandLabel:!1})}),amount:e}),h?n(N,{color:"subdued",children:h}):null]})}if(u&&"IDEAL"===i?.paymentMethod)return n(wr,{variant:t,icon:n(qt,{type:"ideal"}),label:s.translate("payment.ideal_label"),amount:e});const p=s.translate("payment_gateway.shop_pay.name");return n(A,{gap:"small-400",children:[n(wr,{variant:t,icon:n(qt,{type:"shop-pay"}),label:"rollup"===t?Ir(a)??p:n(vr,{label:l({displayBrandLabel:!0}),fallback:p}),amount:e}),h?n(N,{color:"subdued",children:h}):null]})}
1function Ir(e){const t=e?.creditCardLastFourDigits;return t?n(va,{brandLabel:Ar(e)??null,lastDigits:t}):null}function Pr({paymentDetails:e}){const{i18n:n}=pn();return s(({displayBrandLabel:t})=>{if(!e||!e.creditCardLastFourDigits)return null;const a=Ar(e),i=n.translate("payment.masked_digits_label",{last_digits:e.creditCardLastFourDigits});return a&&t?`${a} ${i}`:i},[e,n])}const Mr={AMERICAN_EXPRESS:"AMEX",CARTESBANCAIRES:"CARTES_BANCAIRES",MASTER:"MASTERCARD"};function Ar(e){const n=e?.paymentCardBrand;if(!n)return;const t=Mr[n]??n;return Nn(t)?Rn(t):void 0}function Er(e,n){switch(e){case"alipay":return n.translate("payment.alipay_label");case"bancontact":return n.translate("payment.bancontact_label");case"blik":return n.translate("payment.blik_label");case"bizum":return n.translate("payment.bizum_label");case"eps":return n.translate("payment.eps_label");case"grabpay":return n.translate("payment.grabpay_label");case"ideal":return n.translate("payment.ideal_label");case"mobilepay":return n.translate("payment.mobilepay_label");case"oxxo":return n.translate("payment.oxxo_label");case"mb":return n.translate("payment.multibanco_label");case"mbway":return n.translate("payment.mb_way_label");case"paynow":return n.translate("payment.paynow_label");case"pay_pay":return n.translate("payment.paypay_label");case"przelewy24":return n.translate("payment.przelewy24_label");case"satispay":return n.translate("payment.satispay_label");case"scalapay":return n.translate("payment.scalapay_label");case"swish":return n.translate("payment.swish_label");case"twint":return n.translate("payment.twint_label");case"usdc":return n.translate("payment.usdc_label");case"vipps":return n.translate("payment.vipps_label");case"wechatpay":return n.translate("payment.wechat_pay_label");case null:case void 0:return"";default:return e}}function Nr(){const e=P();return e?.completedRemoteCheckouts}const Rr="unknown";function Dr({variant:e}){const{i18n:a,shop:{name:i,remoteShopsConfigMap:r},checkout:{negotiator:o}}=pn(),l=o.current.fields.paymentLines,s=_(Nr()),d=c(()=>{if(!s.value?.length)return;const e=[],n=new Map([[Rr,{method:null,items:[]}]]);return l.value?.lines.forEach(e=>{const t=Br(e.method);n.set(t,{method:e.method,items:[{shopName:i,cost:e.cost,textKey:`local-${t}`}]})}),s.value.forEach(t=>{const{status:i,shopId:o}=t,l=r?.get(o)?.name||a.translate("thank_you.thank_you_from_other_store");"failed"!==i?t.remotePurchaseOrder.paymentLines?.forEach(e=>{const{cost:a,method:i}=e;if(i){const e=Br(i);n.has(e)||n.set(e,{method:i,items:[]}),n.get(e)?.items.push({shopName:l,cost:a,textKey:`${e}-${t.checkoutSessionToken}`})}else n.get(Rr)?.items.push({shopName:l,cost:a,textKey:`${Rr}-${t.checkoutSessionToken}`})}):e.push({textKey:`failed-${o}`,remoteShopName:l})}),{failedCheckouts:e,groupedPayments:Array.from(n.entries()).map(([e,{method:n,items:t}])=>({key:e,method:n,items:t}))}}),u=c(()=>d.value?.groupedPayments??[]),h=c(()=>d.value?.failedCheckouts??[]);return n(y,{when:d,children:n(A,{gap:"small-400",children:[n(g,{each:u,getKey:e=>e.key,children:({method:i,items:r})=>i?n(A,{gap:"small-400",children:[n(Cr,{cost:void 0,method:i,variant:e}),n(A,{gap:"small-400",children:r.map(({cost:e,shopName:i,textKey:r})=>n(N,{children:[i,e&&n(t,{children:[" · ",a.formatCurrency(e.amount,{currency:e.currencyCode,form:"explicit"})]})]},r))})]}):r.map(({shopName:e,textKey:t})=>n(N,{children:e},t))}),n(g,{each:h,getKey:e=>e.textKey,children:({remoteShopName:e})=>n(N,{children:[e," · ",a.translate("thank_you.payment_method_not_charged")]})})]})})}function Br(e){const n=[Bn(e)];return"brand"in e&&e.brand&&n.push(e.brand),"creditCardLastFourDigits"in e&&e.creditCardLastFourDigits&&n.push(e.creditCardLastFourDigits),"displayLastDigits"in e&&n.push(e.displayLastDigits),"code"in e&&n.push(e.code.slice(-4)),"wallet"===e.type&&e.walletContent&&("lastDigits"in e.walletContent&&e.walletContent.lastDigits&&n.push(e.walletContent.lastDigits),"creditCardLastFourDigits"in e.walletContent&&e.walletContent?.creditCardLastFourDigits&&n.push(e.walletContent.creditCardLastFourDigits)),n.join("-")}function zr(){const{i18n:e,shop:n,checkout:{negotiator:t}}=pn(),{deliveryNext:a,remoteMerchandiseDetails:i}=t.current.fields,r=n.hasFlagEnabled(zn),o=_(Nr()),l=c(()=>Boolean(o.value?.some(e=>"submitted"===e.status))),s=c(()=>{const e=a.value;return Boolean(e&&"unavailable"!==e.status)}),d=c(()=>{const e=a.value;return Boolean(e&&"unavailable"!==e.status&&Fn(e.lines))}),u=Ft(),h=fi(),p=c(()=>{const e=a.value;if(!e||"unavailable"===e.status)return[];const t=r&&e.lines.some(e=>e.targetMerchandiseLines?.some(e=>e.properties.some(e=>"_shopify_non_subscription_item"===e.name))),i=Ua(e.lines).filter(e=>!t||"SUBSCRIPTION"!==e.type);if(!n.marketDrivenShippingEnabled||!h.value)return i;const o=i.filter(e=>"SUBSCRIPTION"===e.type&&"available"===e.status),l=new Set(o);return[...i.filter(e=>!l.has(e)),...Aa(o)]}),m=c(()=>{const e=new Set(p.value.map(({type:e})=>e));return e.size>1&&e.has("SUBSCRIPTION")}),y=c(()=>p.value.filter(e=>"ONE_TIME_PURCHASE"===e.type&&"available"===e.status)),g=c(()=>{const e=i.value,t=y.value;return Ea(t,t.map(e=>({line:e,method:On(e)})),(t,a)=>ja({line:t,method:a,localShopId:n.id,marketDrivenShippingEnabled:n.marketDrivenShippingEnabled,remoteShopsConfigMap:n.remoteShopsConfigMap,remoteMerchandiseDetails:e}))}),f=c(()=>!(n.marketDrivenShippingEnabled&&Na(y.value))),b=c(()=>{const e=[],n=new Map;return qn(p.value).forEach((t,a)=>{const i=On(t);if(!i)return;const r="ONE_TIME_PURCHASE"===t.type&&"available"===t.status&&Nt({line:t,method:i}),o=t.id??`index-${a}`,l=r?Rt(i,o):void 0,s=void 0===l?void 0:n.get(l);
1if(s)return s.groupLines.push(t),void s.groupMethods.push(i);const c={key:l??`line:${o}`,deliveryLine:t,selectedDeliveryMethod:i,groupLines:[t],groupMethods:[i]};e.push(c),void 0!==l&&n.set(l,c)}),e});return{hasAvailableDelivery:s,lines:c(()=>{const t=m.value,a=l.value,r=i.value,o=g.value,s=d.value,{showShipmentBreakdown:c,selectedDeliveryMethod:h}=u.value;return b.value.map(({key:i,deliveryLine:l,selectedDeliveryMethod:d,groupLines:u,groupMethods:p})=>{const m=a?Un({deliveryLine:l,remoteMerchandiseDetails:r,remoteShopsConfigMap:n.remoteShopsConfigMap,localShopId:n.id,localShopName:n.name}).shopName:(n=>"ONE_TIME_PURCHASE"!==n.type?e.translate("shipping.shipping_method_recurring_shipments_group_title.other"):t?e.translate("shipping.shipping_method_first_shipment_group_title",{count:1}):void 0)(l),_=p.find(e=>!o.has(e)),y="ONE_TIME_PURCHASE"!==l.type,g=!s||y||"available"!==l.status||za(l)?void 0:l.availableOn,f=c&&h?.handle===d.handle?Ot(h):[],b=y?function(e){const n=de(e.map(e=>({...e,targetMerchandiseLines:[...e.targetMerchandiseLines]})));return n.some(({flatRateGroupId:e})=>e)?n:[]}(d.priceBreakdown??[]):f,v=b.length>1?b.map(({targetMerchandiseLines:e})=>e):[];return{key:i,selectedDeliveryMethod:d,priceMethod:y?d:_??Dt(d),merchandiseLines:ce(u.flatMap(e=>e.targetMerchandiseLines??[])),title:void 0===m?d.title:`${m} · ${d.title}`,hasTitlePrefix:void 0!==m,availableOn:g,packages:v}})}),showPrices:f}}function Fr(){const{checkout:e}=pn(),{billingAddress:n,buyerIdentity:t,deliveryNext:a,paymentLines:i}=e.negotiator.current.fields,r=jn(),o=fi(),l=ne(),s=ue(),d=c(()=>i.value?.lines??[]),u=c(()=>{const n=e.latestReceipt.value;return"processed"===n?.status?n:void 0}),h=c(()=>Boolean(u.value?.completedRemoteCheckouts?.length)),p=c(()=>t.value?.purchasingCompany),m=c(()=>n.value??p.value?.location.billingAddress),_=c(()=>Hn(a.value)),y=c(()=>Wn(a.value)),g=c(()=>!y.value&&!_.value),f=c(()=>!o.value),b=c(()=>Boolean(s.value.shippableDeliveryLines?.length)),v=c(()=>!o.value||l.value),k=c(()=>{const n=d.value;return Boolean(!r.value&&n.length||h.value||$n({checkout:e})&&n.length)});return{customerBillingAddress:m,hasOnlyLocalPaymentLines:c(()=>!h.value&&d.value.length>0),hasRemoteMerchandise:h,isForLocalPickup:_,isPickupPoint:y,isSplitShipAndPickup:l,paymentLines:d,processedReceipt:u,purchasingCompany:p,renderAsCard:v,shippingRequired:b,showPaymentMethod:k,showShippingMethods:f,showShippingSummary:g,showSplitShippingGroups:o}}function Or(){const{i18n:e,checkout:{negotiator:a}}=pn(),{shippingAddress:i}=a.current.fields,{customerBillingAddress:r,hasOnlyLocalPaymentLines:o,hasRemoteMerchandise:l,isForLocalPickup:s,isPickupPoint:d,isSplitShipAndPickup:u,paymentLines:h,purchasingCompany:p,shippingRequired:m,showPaymentMethod:_,showShippingSummary:g}=Fr(),{lines:f}=zr(),b=c(()=>!u.value),v=c(()=>m.value?i.value:void 0),k=c(()=>f.value.length>0&&(m.value||l.value)),w=c(()=>{const e=r.value,n=g.value||u.value?v.value:void 0;if(!(!e||n&&Vn(n,e,["phone"])))return e});return n(t,{children:[n(q,{visibility:"hidden",children:e.translate("thank_you.customer_information_title")}),n(Q,{children:n(wa,{renderAsCard:!0,children:[n(y,{when:p,children:e=>n(qr,{purchasingCompany:e})}),n(y,{when:b,children:[n(y,{when:s,children:n(Hr,{})}),n(y,{when:d,children:n(Wr,{})}),n(y,{when:g,children:[n(y,{when:v,children:t=>n(Ur,{label:e.translate("shipping.shipping_address_title"),address:t,hiddenFields:["phone"]})}),n(y,{when:k,children:n(Vr,{lines:f})})]})]}),n(y,{when:_,children:n(Yr,{hasOnlyLocalPaymentLines:o,hasRemoteMerchandise:l,paymentLines:h})}),n(y,{when:w,children:t=>n(Ur,{label:e.translate("billing.billing_address_title"),address:t})})]})})]})}function qr({purchasingCompany:e}){const{i18n:t}=pn();return n(ka,{label:t.translate("company_location.location_title"),primaryContent:n("bdi",{children:e.company.name}),secondaryContent:n("bdi",{children:e.location.name})})}function Ur({label:e,address:t,hiddenFields:a}){const{i18n:i}=pn(),r=n(jr,{address:t,hiddenFields:[...a??[],"firstName","lastName"]}),o=i.formatName(t.firstName,t.lastName,!0)||t.firstName||t.lastName;return n(ka,{label:e,primaryContent:o?n("bdi",{children:o}):r,secondaryContent:o?r:void 0})}function jr({address:e,hiddenFields:a}){const i=pe(e,{hiddenFields:a,countryFormat:"short"});return null==i?n(me,{}):n(N,{type:"address",children:i.map((e,a)=>n(t,{children:[a>0&&", ",n("bdi",{children:e})]},a))})}function Hr(){const{i18n:e,checkout:{negotiator:t}}=pn(),{deliveryNext:a}=t.current.fields,i=c(()=>Ln(a.value).find(({method:e})=>"PICK_UP"===e.methodType)?.method.pickupLocation);return n(y,{when:i,children:({address:t,name:a})=>n(ka,{label:e.translate("thank_you.pick_up_in_store_marker.shipping"),primaryContent:a?n(Sa,{pickupLocationName:a}):n(jt,{address:t,hiddenFields:["phone"]}),secondaryContent:a?n(Ca,{address:t,pickupLocationName:a}):void 0})})}function Wr(){const{checkout:{negotiator:e}}=pn(),{deliveryNext:t,shippingAddress:a}=e.current.fields,i=c(()=>{const e=Ln(t.value).find(({method:e})=>"PICKUP_POINT"===e.methodType)?.method.pickupLocation,n=a.value??e?.address;return n?{address:n,location:e}:void 0});return n(y,{when:i,children:({address:e,location:t})=>n($r,{address:e,location:t})})}function $r({address:e,location:t}){const{i18n:a}=pn(),i=n(jr,{address:e,hiddenFields:["firstName","lastName"]}),r=t?.name,o="PickupPointLocation"===t?.type&&t.carrierCode?n(xa,{pickupLocation:t}):null;return n(ka,{label:a.translate("pickup_point.title"),primaryContent:r?n("bdi",{children:r}):i,secondaryContent:r||o?n(A,{gap:"small-500",children:[r?i:null,o]}):void 0})}function Vr({lines:e}){const{i18n:t}
1=pn(),{deliveryExpectationLines:a}=Ra(),{rollup:{secondaryContent:{typography:{color:i}={}}={}}={}}=he(),r=t.translate("shipping.title"),o=c(()=>Fa(Oa(e.value)).flatMap(e=>{const n=qa(t,e);return e.items.map(e=>({line:e,availability:n}))})),[l,...s]=o.value;if(!l)return null;const d=({hasTitlePrefix:e,selectedDeliveryMethod:n,title:a})=>e?a:_e({deliveryMethod:n,localDelivery:"LOCAL"===n.methodType?t.translate("shipping.local_delivery"):void 0}),u=e=>n(Ba,{methodTitle:d(e)}),h=({line:{selectedDeliveryMethod:e},availability:t})=>{const r=i??"base",o=n(Da,{deliveryMethod:e,deliveryExpectationLine:a?.find(({deliveryStrategyHandle:n})=>n===e.handle),paragraphColor:r,hideDescription:!0});return t?n(A,{gap:"none",children:[n(O,{color:r,children:t}),o]}):o};return 0===s.length?n(ka,{label:r,primaryContent:u(l.line),secondaryContent:h(l)}):n(ka,{label:r,compactContent:n(A,{gap:"small-200",children:n(g,{each:o,getKey:({line:e})=>e.key,children:e=>n(A,{gap:"none",children:[u(e.line),h(e)]})})})})}function Yr({hasOnlyLocalPaymentLines:e,hasRemoteMerchandise:t,paymentLines:a}){const{i18n:i}=pn(),r=Pn(),o=c(()=>a.value.length>1||Boolean(r.value?.amount));return n(ka,{label:i.translate("payment.title"),primaryContent:n(A,{gap:"small-200",children:[n(y,{when:e,children:n(g,{each:a,getKey:({method:e,cost:n})=>`${Bn(e)}-${n?.amount}`,children:({method:e,cost:t})=>n(Cr,{cost:t,method:e,variant:"rollup",showAmount:o.value})})}),n(y,{when:t,children:n(Dr,{variant:"rollup"})})]})})}function Kr(){const{i18n:e,checkout:{negotiator:t}}=pn(),{shippingAddress:a,deliveryNext:i}=t.current.fields,r=c(()=>Ln(i.value).find(({method:e})=>"PICKUP_POINT"===e.methodType)?.method.pickupLocation),o=c(()=>{const e=r.value,n=a.value??e?.address;if(n)return e?.name?{...n,lastName:e.name}:n}),l=c(()=>{const e=r.value;return"PickupPointLocation"===e?.type&&e.carrierCode?e:void 0});return n(y,{when:o,children:t=>n(A,{gap:"small-200",children:[n(q,{children:e.translate("pickup_point.title")}),n(jt,{address:t,multiline:!0,hiddenFields:["firstName"]}),n(y,{when:l,children:e=>n(xa,{pickupLocation:e})})]})})}function Gr({completedRemoteCheckouts:e}){const t=fi().value,{i18n:a,shop:{name:i,remoteShopsConfigMap:r}}=pn(),o=ye(e);if(!o.length)return null;const l=o.map(e=>{const t=`${r?.get(e.shopId)?.name||a.translate("thank_you.thank_you_from_other_store")} · `;return n(O,{children:[t,e.title]},e.handle)});if(t){const e=`${i} · ${a.translate("shipping.split_shipping_multiple_shipment_label")}`;return n(A,{gap:"small-200",children:[n(N,{color:"subdued",children:a.translate("thank_you.shipping_method_title")}),e,l]})}return n(A,{gap:"small-200",children:[n(q,{children:a.translate("thank_you.shipping_method_title")}),l]})}function Qr({shippingRequired:e=!0}={}){const{i18n:t,checkout:{negotiator:a}}=pn(),i=a.current.fields.shippingAddress,r=fi();return e?n(y,{when:i,children:e=>n(A,{gap:"small-200",children:[n(y,{when:r,fallback:n(q,{children:t.translate("thank_you.shipping_address_title")}),children:n(N,{color:"subdued",children:t.translate("thank_you.shipping_address_title")})}),n(jt,{address:e,multiline:!0})]})}):null}function Zr(){const{i18n:e}=pn(),{hasAvailableDelivery:t,lines:a}=zr();return n(y,{when:t,children:n(A,{gap:"small-200",children:[n(q,{children:e.translate("thank_you.shipping_method_title")}),n(g,{each:a,getKey:({key:e})=>e,children:({title:e})=>n(O,{children:e})})]})})}function Jr({shippingRequired:e,showMethods:a}){const i=Nr();return e||i?.length?n(t,a?{children:[n(Qr,{shippingRequired:e}),n(Zr,{})]}:{children:[n(Qr,{shippingRequired:e}),i?.length?n(Gr,{completedRemoteCheckouts:i}):null]}):null}function Xr({message:e,loading:t}){return t?n(ee,{children:n(ge,{lines:1,size:"base"})}):e?n(N,{children:e}):null}function eo({message:e,loading:t,completedWithShopPay:a}){return n(A,{gap:"small-300",children:[n(fe,{}),n(be,{blockSize:"small-500"}),e||t?n(Xr,{message:e,loading:t}):null,a?n(er,{}):null]})}function no(){const{checkout:e,i18n:t,shop:a}=pn(),i=Fr(),{paymentLines:r,processedReceipt:o}=i,l=function(){const e=_(ft()),n=rr(),t=_(pr());return c(()=>Boolean((e.value||n.value)&&!t.value))}(),s=W(),d=c(()=>"thankYou"===s.value.currentDetour?.type?"Checkout::ThankYou::CustomerInformation::RenderAfter":"Checkout::CustomerInformation::RenderAfter"),u=_(ve(d.value)),h=t.translate("thank_you.customer_information_title"),p=!a.hasFlagEnabled(Yn),m=c(()=>{const e=o.value?.shopAppLinksAndResources;return e?{...e}:void 0}),g=c(()=>o.value?.isRedacted??!1),f=e.configuration.isUniversalCheckoutFinalizer,b=c(()=>{const n=e.rememberMe.response.value,t=e.rememberMe.status.value,a=Boolean(n?.data),i=r.value.some(({method:e,cost:n})=>n?.amount&&"wallet"===e.type&&["SHOP_PAY","SHOPIFY_INSTALLMENTS"].includes(e.name)),o=p?m.value?.shopPayOrder:Boolean(i),l=Boolean(o||a),s=a||"loading"===t;if(!g.value&&!f&&(l||s))return{completedWithShopPay:l,loading:"loading"===t,message:n?.data}}),v=c(()=>!g.value&&!f&&l.value),k=n(y,{when:v,children:n(lr,{})});return f?n(to,{customizations:u,rememberMe:k,sectionTitle:h,shopMessaging:b}
1):n(ao,{customizations:u,isRedacted:g,orderDetailsVisibility:i,rememberMe:k,sectionTitle:h,shopMessaging:b})}function to({customizations:e,rememberMe:a,sectionTitle:i,shopMessaging:r}){const o=c(()=>Boolean(r.value?.completedWithShopPay)),l=c(()=>{const e=r.value;return e?.message||e?.loading?e:void 0}),s=c(()=>Boolean(l.value)||e.value.length>0);return n(io,{sectionTitle:i,renderAsCard:!0,afterStack:n(t,{children:[n(y,{when:o,children:n(G,{borderWidth:"base none none none",background:"subdued",padding:"base",borderRadius:"none none base base",children:n(er,{})})}),a]}),padded:!1,children:[n(Or,{}),n(y,{when:s,children:n(A,{gap:"base",padding:"base",children:[n(y,{when:l,children:({loading:e,message:t})=>n(eo,{message:t,loading:e})}),n(so,{customizations:e})]})})]})}function ao({customizations:e,isRedacted:a,orderDetailsVisibility:i,rememberMe:r,sectionTitle:o,shopMessaging:l}){const{i18n:s,shop:d,url:u,mobileCheckoutSdk:h,source:p,embed:m,checkout:{negotiator:_}}=pn(),{buyerIdentity:f,contactInfo:b}=_.current.fields,{customerBillingAddress:v,hasOnlyLocalPaymentLines:k,hasRemoteMerchandise:w,isForLocalPickup:C,isPickupPoint:S,isSplitShipAndPickup:x,paymentLines:T,purchasingCompany:L,renderAsCard:I,shippingRequired:P,showPaymentMethod:M,showShippingMethods:E,showShippingSummary:R}=i,D=s.translate("thank_you.contact_information_title"),z=s.translate("thank_you.payment_method_title"),F=s.translate("thank_you.billing_address_title"),O=s.translate("thank_you.view_business_customer_account"),j="draftOrder"===p.type,H=h.variant.isStandard()||m?.isCheckoutKit(),W=c(()=>Boolean(f.value?.customerProfile)),$=c(()=>{const e=f.value,n=b.value;return[e?.purchasingCompany?e.customerProfile?.fullName:void 0,n?.email??n?.phone].filter(e=>Boolean(e))}),V=c(()=>!H&&!j&&d.hasStorefront&&W.value),Y=c(()=>Boolean(d.loginLinkVisible)&&(V.value||Boolean(L.value))),G=c(()=>!x.value),Q=c(()=>!x.value&&M.value||Boolean(v.value)),Z=c(()=>!a.value),J=()=>n(y,{when:M,children:n(A,{gap:"small-200",children:[n(y,{when:I,fallback:n(N,{color:"subdued",children:z}),children:n(q,{children:z})}),n(y,{when:k,children:n(A,{gap:"small-200",children:n(g,{each:T,getKey:({method:e,cost:n})=>`${Bn(e)}-${n?.amount}`,children:({method:e,cost:t})=>n(Cr,{cost:t,method:e})})})}),n(y,{when:w,children:n(Dr,{})})]})});return n(io,{sectionTitle:o,renderAsCard:I,afterStack:r,children:[n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",children:[n(q,{children:o}),n(y,{when:Y,children:n(K,{href:u.account(),children:O})})]}),n(B,{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:[n(U,{children:n(ro,{renderAsCard:I,children:[n(y,{when:Z,children:n(oo,{contactInformationLines:$,renderAsCard:I,title:D})}),n(y,{when:L,children:n(_r,{})}),n(y,{when:x,fallback:n(t,{children:[n(y,{when:C,children:n(gr,{})}),n(y,{when:S,children:n(Kr,{})}),n(y,{when:R,children:n(lo,{shippingRequired:P,showMethods:E})})]}),children:J()})]})}),n(y,{when:Q,children:n(U,{children:n(ro,{renderAsCard:I,children:[n(y,{when:G,children:J()}),n(y,{when:v,children:e=>n(A,{gap:"small-200",children:[n(y,{when:I,fallback:n(N,{color:"subdued",children:F}),children:n(q,{children:F})}),n(jt,{address:e,multiline:!0})]})})]})})})]}),n(y,{when:l,children:({completedWithShopPay:e,loading:t,message:a})=>n(eo,{message:a,loading:t,completedWithShopPay:e})}),n(so,{customizations:e})]})}function io({afterStack:e,children:t,padded:a=!0,renderAsCard:i,sectionTitle:r}){const{shop:o}=pn(),l=o.hasFlagEnabled(mn),s=Ht(i);return n(xt,{target:s?"edgeToEdgeCard":"plain",children:n(U,{accessibilityLabel:r,colorLayer:s&&!l?"control":void 0,children:[a?n(A,{gap:"base",padding:s?"base":"base none",children:t}):t,e]})})}function ro({children:e,renderAsCard:t}){return n(A,{gap:t.value?"base":"large-100",children:e})}
1function oo({contactInformationLines:e,renderAsCard:t,title:a}){return n(A,{gap:"small-200",children:[n(y,{when:t,fallback:n(N,{color:"subdued",children:a}),children:n(q,{children:a})}),n(yr,{lines:e.value})]})}function lo({shippingRequired:e,showMethods:t}){return n(Jr,{shippingRequired:e.value,showMethods:t.value})}function so({customizations:e}){return n(ke,{customizations:e.value})}function co(){const{i18n:e,shop:t,checkout:{negotiator:a}}=pn(),i=t.hasFlagEnabled(mn),r=a.current.fields.contactInfo,o=Kn(),l=c(()=>r.value?.email?e.translate("thank_you.gift_card_email_title",{count:o.value}):e.translate("thank_you.gift_card_text_title",{count:o.value})),s=c(()=>r.value?.email?e.translate("thank_you.gift_card_confirmation_by_email_typ",{count:o.value}):e.translate("thank_you.gift_card_confirmation_by_text_typ",{count:o.value}));return n(U,{accessibilityLabel:l.value,colorLayer:i?void 0:"control",children:n(A,{gap:"base",children:[n(q,{children:l}),n(O,{children:n(Y,{children:s})})]})})}const uo={MapCardColumn:"yKYyD",Map:"fdga0",MapWrapper:"pyji4",MobileHeadingCard:"_6uTjZ",MapCard:"_83SjS","Map-small":"_7BqJd","Map-base":"o4nKg","Map-large":"sM8Ik","Map-fullyRounded":"_15qOA"};function ho(e){const{map:a}=e,i="map"in e,{i18n:r,checkout:o}=pn(),l=_(P()),{buyerIdentity:s,shippingAddress:d,billingAddress:u}=o.negotiator.current.fields,h=Gn(),p=Nr(),m=p?.some(e=>"failed"===e.status),g=we(),f=Ce(),b=c(()=>!f||"settled"===o.thankYouEntrance.phase.value),v=c(()=>{const e=s.value?.purchasingCompany,n=s.value?.customerProfile,{firstName:t,lastName:a}=e&&n?{firstName:n.firstName??void 0,lastName:n.lastName??void 0}:((...e)=>{const n=e.find(e=>e?.firstName&&e?.lastName)||e.find(e=>e?.lastName);return n?{firstName:n.firstName,lastName:n.lastName}:{}})(u.value,d.value),i=l.value?.isRedacted?null:r.formatName(t,a);return i?r.translate("thank_you.page_title",{display_name:i}):r.translate("thank_you.page_title_no_name")}),k=c(()=>{const e=l.value?.orderIdentity.buyerIdentifier||null,n=Boolean(l.value?.completedRemoteCheckouts?.length);return h.value||!e||n?null:r.translate("order_summary.confirmation_number_label",{confirmation_number:`${e}`})}),w=c(()=>{const e=l.value?.purchaseOrderNumber;return e?r.translate("thank_you.purchase_order_number_title",{purchase_order_number:e}):null}),C=c(()=>Boolean(k.value)||Boolean(w.value));if(m)return null;const S=n(t,{children:[n(y,{when:C,children:()=>n(O,{color:"subdued",textAlign:g?"center":void 0,children:[n(y,{when:k,children:e=>n(t,{children:[e,n(y,{when:w,children:" • "})]})}),w]})}),n(q,{level:1,autoFocus:b.value,textAlign:g?"center":void 0,children:v})]});return g?n(xt,{target:"card",children:n(po,{hasMapSlot:i,map:a,children:S})}):n(Ha,{status:"success",children:S})}function po({hasMapSlot:e,map:t,children:a}){const{pending:i}=Se();if(!e)return n(U,{accessibilityRole:"presentation",className:xe.ThankYouEntranceHeading,colorLayer:"control",children:n(A,{gap:"small-300",children:a})});const r=Boolean(t);return n(G,{className:uo.MapCardColumn,children:n(Te,{style:r?{...i,padding:"none"}:void 0,children:n(U,{accessibilityRole:"presentation",className:d(xe.ThankYouEntranceHeading,r&&uo.MapCard),colorLayer:"control",children:[n(G,{className:r?uo.MapWrapper:void 0,children:r?n(G,{className:d(uo.Map,uo[`Map-${i?.cornerRadius??"none"}`]),overflow:"hidden",position:"relative",children:t}):null}),n(Te,{style:i,children:n(U,{accessibilityRole:"presentation",className:r?uo.MobileHeadingCard:void 0,colorLayer:"control",children:n(A,{gap:"small-300",children:a})})})]})})})}const mo=e=>e.reduce((e,n)=>e+(n.quantity??0),0);function _o({confirmedShops:e,failedShops:t}){const{i18n:a}=pn(),i=o(()=>mo(e),[e]),r=i+o(()=>mo(t),[t]);return n(q,{children:a.translate("thank_you.confirmed_items_count",{confirmed_count:i,total_count:r})})}function yo({thumbnailUrl:e,thumbnailAlt:t,primaryText:a,secondaryText:i,orderAmount:r,checkoutUrl:o,buttonText:l}){const{i18n:s}=pn(),c=r?s.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"}):void 0;return n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[n(Le,{alt:t,size:"small",src:e}),n(A,{gap:"base",children:[n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[n(A,{children:[a,i&&n(N,{color:"subdued",children:i})]}),c?n(N,{type:"strong",children:c}):null]}),o&&l&&n(G,{inlineSize:"@media (inline-size >= extraSmall) fit-content, 100%",children:n(M,{variant:"secondary",size:"small",onClick:()=>window.open(o,"_blank"),inlineSize:"fill",children:n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[n(N,{children:l}),n(E,{type:"external",size:"small"})]})})})]})]})}function go({image:e,quantity:t,title:a,subtitle:i,totalPrice:r}){const{i18n:o}=pn();return n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[n(G,{children:n(Le,{alt:e?.altText,size:"base",src:e?.url,totalItems:t})}),n(G,{blockAlignment:"center",children:n(A,{children:[n(N,{children:a}),i&&n(N,{color:"subdued",children:i})]})}),r?n(G,{blockAlignment:"center",children:n(N,{children:o.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})})}):null]})}function fo({deliveryLines:e,merchandiseItems:t}){const{i18n:a}=pn(),i=Boolean(e&&e.length>=fn);if(!(i||t&&t.length))return null;if(i){const i=[];
1return e?.forEach(e=>{if(!vn(e))return;const n=e.methods.find(n=>n.handle===e.selectedDeliveryMethodHandle);n&&i.push({line:e,selectedMethod:n})}),i.length?n(A,{gap:"large-200",children:i.map(({line:e,selectedMethod:i},r)=>n(A,{gap:"base",children:[n(A,{children:[n(A,{direction:"inline",gap:"small-400",children:[n(N,{type:"strong",children:a.translate("shipping.split_shipping_shipment_number",{number:r+1})}),n(N,{children:"·"}),n(N,{children:i.title})]}),n(N,{color:"subdued",children:i.deliveryPromisePresentmentTitle?.long})]}),e.targetMerchandiseLines?.map(e=>{const a=t?.find(n=>n.id===e.stableId);return a?n(go,{image:a.image,quantity:a.quantity,title:a.title,subtitle:a.subtitle,totalPrice:a.totalPrice},e.id):null})]},e.id||r))}):null}return n(A,{gap:"base",children:t?.map(e=>n(go,{image:e.image,quantity:e.quantity,title:e.title,subtitle:e.subtitle,totalPrice:e.totalPrice},e.id))})}const bo=Oe("ShopOrderSummaryTooltip");function vo({details:e}){const{i18n:a,shop:i}=pn(),r=e.shopId===i.id,o=Ie(void 0,bo),l=Boolean("deliveryLines"in e&&e.deliveryLines&&e.deliveryLines.length>=fn);return n(Fe,{title:a.translate("order_summary.cost_table_title"),children:[e.subtotal&&n(Pe,{children:[n(Me,{children:n(A,{direction:"inline",gap:"small-400",children:[n(N,{children:a.translate("order_summary.subtotal_label")}),e.quantity&&n(t,{children:[n(N,{children:"·"}),n(N,{children:a.translate("thank_you.thank_you_item_label",{count:e.quantity})})]})]})}),n(Ae,{children:n(N,{children:a.formatCurrency(e.subtotal.amount,{currency:e.subtotal.currencyCode,form:"short"})})})]}),r&&n(Ee,{disableTooltip:!0}),"shippingTotal"in e&&e.shippingTotal&&n(Pe,{children:[n(Me,{children:n(A,{direction:"inline",gap:"small-400",children:[n(N,{children:a.translate("order_summary.shipping_label")}),e.deliveryMethodHandle&&!l&&n(t,{children:[n(N,{children:"·"}),n(N,{children:e.deliveryMethodHandle})]})]})}),n(Ae,{children:n(N,{letterCase:0===e.shippingTotal.amount?"uppercase":void 0,children:0===e.shippingTotal.amount?a.translate("order_summary.free_shipping_total_label"):a.formatCurrency(e.shippingTotal.amount,{currency:e.shippingTotal.currencyCode,form:"short"})})})]}),"estimatedTaxes"in e&&e.estimatedTaxes&&n(Pe,{children:[n(Me,{children:n(A,{direction:"inline",gap:"small-300",alignItems:"center",children:[n(N,{children:a.translate("order_summary.estimated_taxes_label")}),n(E,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:a.translate("tooltip.accessibility_label_context",{context:a.translate("order_summary.estimated_taxes_label")})}),n(Ne,{id:o,children:a.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}),n(Ae,{children:n(N,{children:a.formatCurrency(e.estimatedTaxes.amount,{currency:e.estimatedTaxes.currencyCode,form:"short"})})})]}),r&&n(Re,{}),r&&n(De,{}),r&&n(Be,{disableTooltip:!0}),"checkoutTotal"in e&&e.checkoutTotal&&n(Pe,{children:[n(Me,{children:n(q,{level:1,children:a.translate("order_summary.total_label")})}),n(Ae,{children:n(q,{level:1,children:a.formatCurrency(e.checkoutTotal.amount,{currency:e.checkoutTotal.currencyCode,form:"short"})})})]}),r&&n(ze,{})]})}function ko({details:e,open:t,onClose:a,onAfterHide:i}){const{i18n:r}=pn();return n(Ue,{id:`order-modal-${e.shopId}`,open:t,onHide:a,onAfterHide:i,heading:e.shopName?r.translate("thank_you.thank_you_from_shop",{shop_name:e.shopName}):r.translate("thank_you.thank_you_from_other_store"),size:"base",children:n(qe,{children:n(A,{gap:"base",children:[n(U,{children:n(fo,{deliveryLines:"deliveryLines"in e?e.deliveryLines:void 0,merchandiseItems:e.merchandiseItems})}),n(fe,{}),n(U,{children:n(vo,{details:e})}),"orderConfirmationNumber"in e&&e.orderConfirmationNumber&&n(N,{color:"subdued",children:r.translate("order_summary.confirmation_number_label",{confirmation_number:e.orderConfirmationNumber})}),"trackingUrl"in e&&e.trackingUrl&&n(M,{variant:"primary",size:"base",inlineSize:"fill",onClick:e.trackingUrl?()=>window.open(e.trackingUrl,"_blank"):void 0,children:n(A,{direction:"inline",gap:"small-200",alignItems:"center",children:[n(N,{children:r.translate("thank_you.track_your_order_link_text")}),n(E,{type:"external",size:"small"})]})})]})})})}function wo(){const{checkout:{negotiator:e}}=pn(),n=e.current.fields.contactInfo;return c(()=>{const e=n.value;return{confirmWithEmail:null!=e?.email&&e?.email.length>0,confirmWithPhone:null!=e?.phone&&e?.phone.length>0}})}function Co({itemCount:e}){const{i18n:t}=pn(),{confirmWithEmail:a,confirmWithPhone:i}=wo().value,r=e>1,o=a?r?t.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):i?r?t.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):void 0;return n(te,{tone:"info",iconHidden:!0,heading:t.translate("thank_you.confirmed"),children:n(O,{children:o})})}function So({itemCount:e}){const{i18n:t}=pn();return n(te,{tone:"critical",heading:t.translate("thank_you.thank_you_unconfirmed_items_heading",{count:e}),children:n(O,{children:t.translate("thank_you.thank_you_unconfirmed_items_description",{count:e})})})}function xo({status:e,detailsList:a}){const i=r(null),o=r(!1),{shop:l,i18n:s}=pn(),c=l.hasFlagEnabled(mn),d=Boolean(Nr()?.some(e=>"failed"===e.status));if(!a.length)return null;const u="confirmed"===e,h=a.find(e=>e.shopId===i.value);return n(t,{children:[n(U,{overflow:"hidden",colorLayer:c?void 0:"control",children:n(A,{gap:"base",children:[n(To,{isConfirmed:u,hasFailedRemoteCheckouts:d,detailsList:a}),a.map((e,t)=>{const r=t===a.length-1;return n(A,{gap:"base",children:[n(yo,{primaryText:n(A,{direction:"inline",gap:"small-400",children:[n(K,{textDecoration:"none",onClick:()=>{i.value=e.shopId,o.value=!0},children:s.translate("thank_you.thank_you_item_label",{count:e.quantity??0})}),n(N,{children:je}),n(N,{children:e.shopName||s.translate("thank_you.thank_you_from_other_store")})]}),secondaryText:Lo({details:e,i18n:s}),orderAmount:e.checkoutTotal,thumbnailUrl:e.merchandiseItems?.[0]?.image?.url,thumbnailAlt:e.merchandiseItems?.[0]?.image?.altText,..."failed"===e.status?Po({details:e,i18n:s}):Io({details:e,i18n:s})}),!r&&n(He,{below:"small",children:n(fe,{direction:"inline",borderWidth:"base"})})]},e.shopId)})]})}),h&&n(ko,{open:o.value,onClose:()=>o.value=!1,onAfterHide:()=>i.value=null,details:h})]})}function To({isConfirmed:e,hasFailedRemoteCheckouts:t,detailsList:a}){if(e)return t?n(Co,{itemCount:a.length}):null;const i=a.filter(e=>"failed"===e.status).reduce((e,n)=>e+(n.quantity||0),0);return n(So,{itemCount:i})}function Lo({details:e,i18n:n}){return"failed"===e.status?n.translate("payment_errors.generic_error"):"orderConfirmationNumber"in e&&e.orderConfirmationNumber?n.translate("order_summary.confirmation_number_label",{confirmation_number:e.orderConfirmationNumber}):void 0}function Io({details:e,i18n:n}){return{buttonText:e.shopName?n.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:e.shopName}):n.translate("thank_you.checkout_on_another_store")}}function Po({details:e,i18n:n}){return{checkoutUrl:e.recoveryUrl,buttonText:e.shopName?n.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:e.shopName}):n.translate("thank_you.checkout_on_another_store")}}function Mo(e){return e?.length?e.reduce((e,n)=>e+n.quantity,0):0}function Ao(e){if(e?.length)return e.reduce((e,n)=>n.lineAmount?{amount:(e?.amount||0)+n.lineAmount.amount,currencyCode:n.lineAmount.currencyCode}:e,void 0)}function Eo(e){return e.map(({stableId:e,title:n,productTitle:t,image:a,quantity:i,price:r})=>({id:e,title:t,subtitle:n||void 0,image:a?{url:a.url,altText:a.altText||void 0}:void 0,quantity:i,totalPrice:r})).filter(e=>null!==e)}function No(){const{confirmedShops:e,failedShops:t}=function(){const e=Nr(),{shop:{name:n,id:t,brandSettings:a,remoteShopsConfigMap:i},checkout:{negotiator:r}}=pn(),{totalLineQuantities:l}=We(),s=function(){const e=P(),n=Qn(),t=Pn();return c(()=>{const a=e?.purchaseOrder.paymentDue,i=e?.checkoutTotal;return Zn({paymentDue:a,checkoutTotal:i,orderDeposit:t.value,hasFixedSellingPlan:n.value})})}(),d=P(),u=$e(),h=r.current.fields.taxes.value,{value:p}=Jn("ONE_TIME_PURCHASE"),m=Xn(p),_=yn(),y=function(){const e=yn();return c(()=>{const n=e.value.filter(vn);if(!n.length)return;const[{methods:[{costAfterDiscounts:{currencyCode:t}}]}]=n;return{amount:n.reduce((e,n)=>{const t=n.methods?.find(({handle:e})=>e===n.selectedDeliveryMethodHandle);return t?e+(t.costAfterDiscounts.amount??0):e},0),currencyCode:t}})}();return o(()=>{const r=[],o=[];if(!e?.length)return{confirmedShops:[],failedShops:[]};if(l&&l>0){const e=u.map(({stableId:e,title:n,subtitle:t,image:a,quantity:i,totalPrice:r})=>e?{id:e,title:n,subtitle:t||void 0,image:a?.url?{url:a.url,altText:a.altText||void 0}:void 0,quantity:i,totalPrice:r}:null).filter(e=>null!==e)||[],i=h&&"available_total"===h.status?h.totalTax:void 0,o={shopId:t,shopName:n,shopLogo:a?.squareLogo?.url,quantity:l,checkoutTotal:s.value,merchandiseItems:e,subtotal:d?.subtotal,estimatedTaxes:i,shippingTotal:y.value,deliveryMethodHandle:m?.title,orderConfirmationNumber:d?.orderIdentity?.buyerIdentifier||void 0,trackingUrl:d?.orderStatusPageUrl||void 0,deliveryLines:_.value,status:"confirmed"};r.push(o)}
1return e?.length&&e.forEach(e=>{if("submitted"===e.status){const{orderIdentity:{buyerIdentifier:n},orderStatusPageUrl:t,remotePurchaseOrder:{merchandiseLines:a,deliveryLines:o,checkoutTotal:l,subtotalBeforeTaxesAndShipping:s,tax:c}}=e,d={shopId:e.shopId,shopName:i?.get(e.shopId)?.name,shopLogo:i?.get(e.shopId)?.brandSettings?.squareLogo?.url,quantity:Mo(a),checkoutTotal:l,subtotal:s,estimatedTaxes:c,shippingTotal:Ao(o),merchandiseItems:Eo(a)||[],deliveryMethodHandle:o?.[0]?.title,orderConfirmationNumber:n||void 0,trackingUrl:t||void 0,status:"confirmed"};r.push(d)}if("failed"===e.status){const{recoveryUrl:n,merchandiseLines:t,checkoutTotal:a,subtotalBeforeTaxesAndShipping:r,tax:l}=e,s={shopId:e.shopId,shopName:i?.get(e.shopId)?.name,shopLogo:i?.get(e.shopId)?.brandSettings?.squareLogo?.url,quantity:Mo(t),checkoutTotal:a,subtotal:r,estimatedTaxes:l,merchandiseItems:Eo(t)||[],recoveryUrl:n,status:"failed"};o.push(s)}}),{confirmedShops:r,failedShops:o}},[e,t,n,l,s.value,d,a?.squareLogo?.url,i,u,h,m,_.value,y.value])}(),a=Boolean(t?.length),i=Boolean(e?.length);return i||a?n(A,{gap:"base",children:[a?n(_o,{confirmedShops:e,failedShops:t}):null,i?n(xo,{status:"confirmed",detailsList:e}):null,a?n(xo,{status:"failed",detailsList:t}):null]}):null}const Ro=()=>{const{i18n:e}=pn();return n(A,{padding:"base",children:n(q,{children:e.translate("thank_you.offers.title")})})},Do=(e,n=da)=>{if("https://shop.app"!==e.origin)return;if(void 0===e.data)return;if("redirect"!==e.data.type)return;const t=e.data.redirect_to;if(void 0===t)return;const a=new URL(t);"https://shop.app"==`${a.protocol}//${a.hostname}`&&(void 0!==e.data.open_in_new_tab&&!0===e.data.open_in_new_tab&&"function"==typeof n.open?n.open(t,"_blank","noopener,noreferrer"):n.location.href=t)},Bo=({shopId:e,personalizeAds:t,placement:r,checkoutToken:o,orderId:l,hideButtons:s,hideHeader:c,accentColor:d,darkMode:u})=>{const h=a(null);i(()=>{const e=setTimeout(()=>{h.current?.iframeRef?.current&&(h.current.iframeRef.current.style.height="0px")},2e3);return da.addEventListener("message",Do),da.addEventListener("message",n=>{"https://shop.app"===n.origin&&clearTimeout(e)}),()=>{da.removeEventListener("message",Do),clearTimeout(e)}},[]);const{authorizeUrl:p}=ua({avoidPayAltDomain:!0,avoidSdkSession:!0,analyticsContext:"shopCashOffers",proxy:!0,locale:void 0,flow:"shop_cash_offers",redirectType:"iframe",responseType:"code",clientId:"",shopId:e,personalizeAds:t,placement:r,checkoutToken:o,orderId:l,hideButtons:s,hideHeader:c,accentColor:d,darkMode:u});return n(ha,{proxy:!0,insideModal:!1,ref:h,src:p,scrolling:"no",variant:"default"})};function zo(e,n){if(null==e)return;const t=e.control?.background??n;return null==t||nt(t)?e.base?.background:t}function Fo(e){return void 0!==e&&e.getYiqPerceivedBrightness()>=.65}const Oo=new URL("https://shop.app"),qo=String(!0),Uo="thank_you",jo="100%",Ho=f(({shopId:e,personalizeAds:t,preview:r,orderId:o,checkoutSessionIdentifier:l,setHeight:s},c)=>{const d=String(t),u=function(){const{shop:e}=pn(),n=e.hasFlagEnabled(et),{colors:{global:t,schemes:a={}}}=he(),{main:i}=Ve(),r=a[i.colorScheme??"scheme1"],o=i.section?.colorScheme?a[i.section.colorScheme]:void 0,l=n?zo(o,t?.control)??zo(r,t?.control)??zo(a.scheme1,t?.control):zo(r),s=void 0===l?n:Fo(l),c=t?.accent;return{...s?null:{dark_mode:"true"},...void 0!==c&&s!==Fo(c)?{accent_color:c.toRgb()}:null}}(),{i18n:h,observability:p,url:m}=pn(),_=a(null),y=a(null),g=()=>{const e=_.current?.shadowRoot?.querySelector("iframe");return e??y.current},f=Boolean(o)||r;if(i(()=>{const e={type:f?"iframe":"shop-js-iframe"};p.counter({name:"shop_ads_2p_rail_render_started",value:1,attributes:e}),p.log("shop_ads_2p_rail_render_started","shop_ads_2p_rail_render_started",{...e})},[f,p]),i(()=>{const e=e=>{if(e.origin!==Oo.origin)return;const n=e?.data?.type,t=e?.data?.redirect_to;if("resize_iframe"===n){let n=e?.data?.height;const t=e?.data?.width;if("number"==typeof n&&"number"==typeof t){n=n>0?n:0,s(n);const e={type:n>0?"with_content":"without_content"};p.counter({name:"shop_ads_2p_rail_resize",value:1,attributes:e}),p.log("shop_ads_2p_rail_resize","shop_ads_2p_rail_resize",{height:n,width:t,...e});const a=g();a&&(a.style.height=`${n}px`,a.style.width=jo)}}else if(f&&"redirect"===n&&void 0!==t){const n=new URL(t);n.origin!==Oo.origin&&n.origin!==new URL(m.storefront()).origin||(void 0!==e.data.open_in_new_tab&&!0===e.data.open_in_new_tab?window.open(t,"_blank","noopener,noreferrer"):window.location.assign(t))}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}},[f,s,p,m]),b(c,()=>({iframeElement:g}),[]),f){const t=(v={shop_id:String(e),placement:Uo,hide_header:qo,personalize_ads:d,merchant_url:m.storefront(),...r?{preview:String(r)}:null,...o?{order_id:String(o)}:null,...l?{checkout_token:l}:null,...u},`${new URL("https://shop.app/offers-compact").toString()}?${new URLSearchParams(v).toString()}`.toString());return n("iframe",{ref:y,id:"offers",title:h.translate("thank_you.offers.title"),src:t,width:jo,height:"211px",scrolling:"no"})}return"undefined"==typeof window||"undefined"==typeof customElements||customElements.get("shop-cash-offers")||Jt(({element:e,...t})=>n(na,{element:e,featureName:"ShopCashOffers",children:n(Xt,{children:n(ea,{children:n(sa,{children:n(ca,{children:n(Bo,{...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"}),n("shop-cash-offers",{"shop-id":e,"personalize-ads":d,"hide-header":qo,"dark-mode":u.dark_mode,"accent-color":u.accent_color,placement:Uo,"order-id":o,"checkout-token":l,ref:_});var v});function Wo({preview:t}){const{shop:i,source:{checkoutSessionIdentifier:r},consentManager:o}=pn(),{id:l}=i,s=parseInt(hn(l),10),c=o.saleOfDataAllowed.value&&o.marketingAllowed.value,[d,u]=e(),h=i.hasFlagEnabled(mn),p=P(),m=p?.orderIdentity.id?tt(p.orderIdentity.id):void 0,_=a(null);return n(U,{colorLayer:h?void 0:"control",display:0===d?"none":"block",children:[n(Ro,{}),n(Ho,{checkoutSessionIdentifier:r,orderId:m,personalizeAds:c,shopI
1d:s,ref:_,setHeight:u,preview:t})]})}const $o=(e,n)=>{try{const t=new URL(e.replace(/\/$/,""));return Object.entries(n).forEach(([e,n])=>{t.searchParams.append(e,n)}),t.toString()}catch{return e}};function Vo(){const{shop:e,environment:n,observability:t}=pn(),i=a(new Map),r=n.services.serverShopApp.url;return s(({deepLink:n,source:a})=>{if(!e.hasFlagEnabled(at))return Promise.resolve();if(!n)return Promise.resolve();const o=i.current.get(n);if(o)return o;const l=async function(e,n,t,a){!function(e,n){e.counter({name:"deferred_deep_link_capture_attempt",value:1,attributes:{source:n}})}(n,a);const i=new AbortController,r=performance.now(),o=setTimeout(()=>i.abort(),5e3);let l="network";try{l=await async function(e,n,t){const a=new URL("/deferred-deep-links",e),i=await fetch(a,{method:"POST",credentials:"omit",keepalive:!0,headers:{"Content-Type":"application/json"},signal:t,body:JSON.stringify({deepLink:n})});if(202!==i.status)return`http_${i.status}`;try{const e=await i.json();return null!==e&&"object"==typeof e&&"accepted"in e&&!0===e.accepted?"accepted":"invalid_response"}catch(r){if(t.aborted)throw r;return"invalid_response"}}(e,t,i.signal)}catch{l=i.signal.aborted?"timeout":"network"}finally{clearTimeout(o),function(e,n,t,a){const i={source:n,success:"accepted"===t,status:t};e.histogram({name:"deferred_deep_link_capture_duration",value:a,unit:"ms",attributes:i})}(n,a,l,Math.round(performance.now()-r))}}(r,t,n,a).finally(()=>{i.current.delete(n)});return i.current.set(n,l),l},[e,r,t])}const Yo=102,Ko=e=>n("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 318 350",...e,children:n("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"})});function Go({color:e="branded",containerSize:t=32,iconSize:a=20,backgroundColor:i="white",overlay:r=!1}){const o="branded"===e?Ya.toRgb():e;return n("div",{className:d("gTxFI",r?"kfcrU":""),style:{backgroundColor:i,height:t,width:t,borderRadius:"10px"},children:n(Ko,{"aria-hidden":"true",style:{fill:o},height:a,width:a})})}const Qo="NmBBp",Zo="iIHiG",Jo=Oe("tracking-delivered-gradient-");function Xo(){return n("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[n("circle",{cx:"20",cy:"20",fill:"#000",r:"20"}),n("path",{className:"Iiyyo",d:"m12.25 20.5 5 5 10.5-12",fill:"none",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.25"})]})}function el(){const e=Ie(void 0,Jo);return n("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[n("defs",{children:n("linearGradient",{id:e,x1:"0",x2:"1",children:[n("stop",{offset:"0",stopColor:"#3ccd7f"}),n("stop",{offset:"1",stopColor:"#56bc39"})]})}),n("circle",{cx:"20",cy:"20",fill:`url(#${e})`,r:"20"}),n("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 nl({animate:e=!0}={}){return n("div",{"aria-hidden":"true",className:d("_3nOgQ",{[Qo]:e}),children:n("div",{className:"_0wOrq",children:[n("span",{className:"I6KnV"}),n("span",{className:"e1FkT"}),n("span",{className:"Ww91E"}),n("span",{className:"sCXu3",children:[n("span",{className:d(Zo,"oacnN"),children:n(Xo,{})}),n("span",{className:d(Zo,"_2i0qK")}),n("span",{className:d(Zo,"xjUvL")}),n("span",{className:d(Zo,"_8Slfk"),children:n(el,{})})]})]})})}const tl=e=>n("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 393 63",...e,children:[n("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-.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"}),n("rect",{width:24,height:12,x:334,y:28.5,stroke:"currentColor",opacity:.35,rx:3.8}),n("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}),n("rect",{width:21,height:9,x:335.5,y:30,fill:"currentColor",rx:2.5}),n("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.06
17c-.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"})]}),al=e=>n("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 175 175",...e,children:[n("path",{fill:"#5433EB",d:"M0 0h174.329v174.329H0z"}),n("path",{fill:"#fff",d:"M39.025 84.09c-5.091-1.102-7.36-1.533-7.36-3.49 0-1.84 1.536-2.756 4.606-2.756 2.7 0 4.673 1.177 6.126 3.482.11.178.335.24.52.143l5.729-2.886a.4.4 0 0 0 .164-.561c-2.378-4.111-6.77-6.361-12.553-6.361-7.6 0-12.327 3.734-12.327 9.672 0 6.306 5.749 7.9 10.847 9.001 5.098 1.102 7.373 1.532 7.373 3.489s-1.658 2.88-4.968 2.88c-3.056 0-5.324-1.396-6.695-4.105a.4.4 0 0 0-.541-.177l-5.715 2.825a.406.406 0 0 0-.178.547c2.268 4.548 6.92 7.107 13.136 7.107 7.914 0 12.697-3.674 12.697-9.796s-5.776-7.9-10.868-9.001zm30.698-12.43c-3.248 0-6.119 1.15-8.181 3.195a.202.202 0 0 1-.343-.144V61.653a.4.4 0 0 0-.404-.403h-7.168a.4.4 0 0 0-.404.403v40.528a.4.4 0 0 0 .404.404h7.168a.4.4 0 0 0 .404-.404V84.404c0-3.434 2.638-6.067 6.194-6.067s6.133 2.578 6.133 6.067v17.777a.4.4 0 0 0 .404.404h7.168a.4.4 0 0 0 .404-.404V84.404c0-7.47-4.906-12.737-11.779-12.737zm26.34-1.155c-3.892 0-7.551 1.183-10.169 2.9a.403.403 0 0 0-.13.54l3.16 5.383c.116.192.362.26.554.144a12.6 12.6 0 0 1 6.585-1.806c6.256 0 10.854 4.405 10.854 10.226 0 4.96-3.68 8.633-8.346 8.633-3.803 0-6.441-2.21-6.441-5.329 0-1.785.76-3.25 2.74-4.282a.396.396 0 0 0 .158-.56l-2.98-5.035a.4.4 0 0 0-.487-.171c-3.995 1.477-6.797 5.034-6.797 9.809 0 7.223 5.763 12.613 13.8 12.613 9.388 0 16.137-6.491 16.137-15.8 0-9.98-7.852-17.272-18.652-17.272zm39.593 1.095c-3.625 0-6.859 1.333-9.223 3.686a.2.2 0 0 1-.343-.144v-2.831a.4.4 0 0 0-.404-.404h-6.983a.4.4 0 0 0-.404.404v40.466a.4.4 0 0 0 .404.403h7.168a.4.4 0 0 0 .404-.403v-13.27c0-.178.212-.267.343-.15 2.357 2.188 5.475 3.467 9.045 3.467 8.407 0 14.965-6.792 14.965-15.616s-6.565-15.616-14.965-15.616zm-1.35 24.37c-4.783 0-8.408-3.796-8.408-8.816s3.618-8.817 8.408-8.817 8.401 3.734 8.401 8.817c0 5.082-3.563 8.817-8.408 8.817z"})]}),il="vcF4y";function rl(e,n){return new Intl.DateTimeFormat(n,{hour:"numeric",minute:"2-digit"}).formatToParts(e).filter(({type:e})=>"dayPeriod"!==e).map(({value:e})=>e).join("").trim()}function ol({animate:e=!0,title:t,body:a,time:i,now:r}={}){const{i18n:o}=pn(),l=r?rl(r,o.locale):"",s=r?function(e){const n=new Date(e),t=e.getHours(),a=t>=20?"tomorrow":"today";return t>=20||t<9?(t>=20&&n.setDate(n.getDate()+1),n.setHours(9,0,0,0)):n.setHours(n.getHours()+1,0,0,0),{day:a,time:n}}(r):void 0,c=s?rl(s.time,o.locale):"";let u="";return"today"===s?.day?u=o.translate("thank_you.qr_code.phone_banner.body_today",{time:c}):s&&(u=o.translate("thank_you.qr_code.phone_banner.body_tomorrow",{time:c})),n("div",{"aria-hidden":"true",className:d("RqWCL",{[il]:e}),children:n("div",{className:"Z7YHY",children:[n("div",{className:"U17Bl",children:[n(tl,{"aria-hidden":"true"}),n("span",{className:"XiB25",dir:"auto",children:l}),n("span",{className:"rRjrG"})]}),n("div",{className:"nm5oZ",children:[n("span",{className:"pXsW1",children:n(al,{"aria-hidden":"true",width:28,height:28})}),n("span",{className:"XAh5C",children:[n("strong",{dir:"auto",children:t??o.translate("thank_you.qr_code.phone_banner.title")}),n("span",{dir:"auto",children:a??u})]}),n("span",{className:"rjvR4",dir:"auto",children:i??o.translate("thank_you.qr_code.phone_banner.time")})]})]})})}const ll="E1A3F",sl=[it.Bar,it.Phone];function cl(e){return sl.includes(e??"")}function dl({treatment:e,isReady:t=!0,now:a}){return n("div","phone"===e?{"aria-hidden":"true",className:d("HLHdp",{[ll]:t}),children:n(ol,{animate:t,now:a})}:{"aria-hidden":"true",className:"_2gHo1",children:n(B,{accessibilityVisibility:"hidden",gridTemplateRows:t?"1fr":"0fr",overflow:"hidden",children:n(nl,{animate:t})})})}const ul="F0OjS",hl="_5eMgt",pl="WYqsK",ml="v7JCj",_l="UIp5B",yl="fBsi6",gl="JwOzi";function fl({link:e,deferredDeepLinkUrl:t,label:o,message:l,installCampaign:c,styledQrCode:u,onQrCodeInteraction:h}){const{i18n:p,observability:m}=pn(),_=Vo(),y=we(),g=r(!1),f=a(null),b=a(0),v=r(!1),k=r(!1),w=Ye(),C=!g.value,S=k.value,x=g.value&&S,T=c?.variant,L=cl(T),I=l?.title,P=l?.subtitle,E=s(()=>{h?.()},[h]),N=s(()=>{g.value=!0,null!==f.current&&(m.histogram({name:"qr_code_load_time",value:Math.round(performance.now()-f.current),unit:"ms",attributes:{page:"thank_you"}}),f.current=null)},[m,g]),R=T===it.Phone,D=function(e){const n=r(void 0);return i(()=>
1{if(!e)return;let t;const a=()=>{n.value=new Date},i=6e4-Date.now()%6e4;a();const r=window.setTimeout(()=>{a(),t=window.setInterval(a,6e4)},i);return()=>{window.clearTimeout(r),void 0!==t&&window.clearInterval(t)}},[e,n]),n.value}(R),z=s(()=>{_({deepLink:t,source:"DESKTOP"}).catch(()=>{}),k.value=!0,b.current+=1,g.value||null!==f.current||(f.current=performance.now())},[k,g,t,_]),F=s(()=>{k.value=!1,v.value=!1},[v,k]);return i(()=>{if(S&&I)return Ke({content:I})},[S,I]),i(()=>{w&&x&&(v.value=!0)},[v,w,x]),n(G,{children:n(Va,{impressionType:"download_shop_button",impressionFeatures:["desktop","qr_code"],children:n(M,{inlineSize:y?"fill":void 0,onClick:E,overlay:n(Tt,{theme:{popover:{cornerRadius:20}},children:n(Wa,{keepMounted:!0,padding:"none",positionArea:"inline-end",onHide:F,onShow:z,children:n(G,{className:d("_3ne1k",{[pl]:L,[hl]:u}),children:n(G,{padding:"none",className:d("smgwg",{[_l]:L,[ml]:R}),children:n(A,{gap:"none",className:"cnARA",children:[n(B,{gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"none",children:[n(B,{gridTemplateColumns:"1fr",children:[C?n(G,{className:"eB1Wk",children:n(ee,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%"})}):null,n(G,{className:d("Ipunz",{[ul]:x}),padding:"none",onTransitionEnd:e=>{S&&!v.value&&"filter"===e.propertyName&&(v.value=!0)},children:[u?n("img",{src:e,height:Yo,width:Yo,alt:p.translate("thank_you.qr_code.iframe_title"),"aria-hidden":C,onLoad:N}):n($a,{src:e,height:Yo,width:Yo,title:p.translate("thank_you.qr_code.iframe_title"),"aria-hidden":C,onLoad:N}),u?null:n(Go,{overlay:!0})]})]}),n(G,{children:n(B,{gridTemplateColumns:"1fr",blockSize:"100%",children:n(G,{className:"JN61f",children:n(A,{gap:"none",className:d("IATLg",{[yl]:L}),children:[n(G,{className:d({[gl]:L}),children:I?n(q,{level:3,children:I}):null}),P?n(O,{children:n(Y,{children:P})}):null]})})})})]}),L?n(dl,{isReady:v.value,treatment:T,now:D},b.current):null]})})})})}),children:o})})})}const bl="order_status_page";class vl extends Error{constructor(){super(...arguments),this.name="ShopMobileClipboardInteractionError"}}function kl({label:e,link:t,deferredDeepLinkUrl:a,onClipboardInteraction:i}){const r=gt(),o=kn(),{observability:l,mobileCheckoutSdk:s,embed:c}=pn(),d=Vo(),u=we(),h=s.variant.isStandard()||c?.isCheckoutKit();if(!r)return null;const p=r?.mobileUrlAttributionPayload,m=o.value.defaultAttributes?.visitToken;return n(G,{children:n(Va,{impressionType:"download_shop_button",impressionFeatures:["mobile"],children:n(M,{inlineSize:u?"@media (inline-size >= medium) auto, fill":void 0,onClick:async()=>{d({deepLink:a,source:"MOBILE"}).catch(()=>{});try{const t=(e=p,(n=m)?`${e},${n},${bl}`:`${e},,${bl}`);await J(t)}catch(r){r instanceof Error&&l.error(new vl(r.message,{cause:r}))}finally{i?.();const e=function(e,n){const t=new URL(e);return n&&t.searchParams.set("sid",n),h&&t.searchParams.set("open_externally","true"),t.toString()}(t,m);window.location.href=e}var e,n},children:e})})})}function wl({label:e,message:t,mobileLinkToShop:a,desktopLinkToShop:i,deferredDeepLinkUrl:r,styledQrCode:o,installCampaign:l,onClipboardInteraction:s,onQrCodeInteraction:c}){return rt()?n(kl,{label:e,deferredDeepLinkUrl:r,link:a,onClipboardInteraction:s}):n(fl,{label:e,deferredDeepLinkUrl:r,link:i,message:t,styledQrCode:o,installCampaign:l,onQrCodeInteraction:c})}const Cl="installments_order";function Sl(){const{i18n:e}=pn(),t=gt(),{track:a}=ki("shop_pay_installments_highlight_button");if(i(()=>{t&&a("shop_button_rendered")},[t,a]),!t)return null;const{shopInstallmentsMobileUrl:r,qrCodeUrl:o}=t,l={title:e.translate("installments.installments_highlight_qr_flow_modal.title"),subtitle:e.translate("installments.installments_highlight_qr_flow_modal.subtitle")},s=$o(r,{utm_content:Cl}),c=$o(o,{link_provider:"open.shop.app",utm_content:Cl});return n(wl,{label:e.translate("installments.installments_highlight_shop_button_get_reminders"),message:l,desktopLinkToShop:c,mobileLinkToShop:s,onClipboardInteraction:()=>{a("arrive")},onQrCodeInteraction:()=>{a("arrive_show_qr_code")}})}function xl(){const{i18n:e,shop:t}=pn(),a=t.hasFlagEnabled(mn),i=e.translate("installments.installments_highlight_headline");return n(U,{accessibilityLabel:i,colorLayer:a?void 0:"control",children:n(A,{gap:"large-200",children:[n(q,{children:i}),n(A,{gap:"base",children:[n(O,{children:n(Y,{children:e.translate("installments.installments_highlight_copy")})}),n(Sl,{})]})]})})}function Tl({shipmentGroups:e,title:t,subtitle:a,subtitleIcon:i,address:r,addressHeading:o,modalHeader:l}){const{shop:s}=pn(),c=s.hasFlagEnabled(mn);return n(U,{overflow:"hidden",colorLayer:c?void 0:"control",children:n(A,{gap:"base",children:[n(A,{gap:"small-200",children:[n(q,{level:2,children:t}),a&&n(A,{direction:"inline",gap:"small-400",alignItems:"center",children:[i&&n(E,{type:i}),n(N,{color:"subdued",children:a})]})]}),e.map((e,t)=>n(Ga,{merchandiseLines:e.merchandiseLines,deliveryMethod:e.deliveryMethod,deliveryMethodHandle:e.deliveryMethod.handle,modalHeader:l(t),showPrice:!1,showPriceInModal:!0,showDeliveryIcon:!1,choiceListContext:!1,isNotFirstLine:t>0,showDivider:!1,subtitle:"PickupInStoreLocation"===e.deliveryMethod.pickupLocation?.type?e.deliveryMethod.pickupLocation.instructions:void 0},e.id)),r&&n(A,{gap:"small-200",children:[n(q,{level:3,children:o}),n(jt,{address:r,multiline:!0})]})]})})}function Ll(){const e=pn(),{deliveryNext:t}="processed"===e.checkout.latestReceipt.value?.status?e.checkout.latestReceipt.value.purchaseOrder??{}:{};if(!t)return null;const a=function(e){return"filled"!==e.status?[]:e.lines.filter(vn).flatMap(e=>{const n=Xn(e);return n?[{id:e.id??Qa(),line:e,selectedMethod:n}]:[]})}(t).filter(({line:e})=>"ONE_TIME_PURCHASE"===e.type),i=function(e,{i18n:n}){const t=e.filter(({selectedMethod:e})=>"PICK_UP"===e.methodType);if(0===t.length)return;const[a]=t;return{shipmentGroups:t.map(({id:e,line:n,selectedMethod:t})=>({id:e,deliveryMethod:t,merchandiseLines:(n.targetMerchandiseLines??[]).filter(e=>e.requiresShipping)})),title:n.translate("delivery_options.pickup"),subtitle:n.translate("split_delivery.separate_pickup_email_notice"),address:a.selectedMethod.pickupLocation?.address,addressHeading:n.translate("thank_you.pick_up_in_store_marker.shipping"),modalHeader:()=>n.translate("delivery_options.pickup")}}(a,e),r=function(e,{checkout:n,i18n:t,shop:a}){const{shippingAddress:i}="processed"===n.latestReceipt.value?.status?n.latestReceipt.value.purchaseOrder:{},r=e.filter(({selectedMethod:e})=>"SHIPPING"===e.methodType);if(0===r.length)return;const o=r.map(({line:e,selectedMethod:n})=>({line:e,method:n})),l=a.marketDrivenShippingEnabled?Ea(r.map(({line:e})=>e),o):new Set,s=new Map;r.forEach((e,n)=>{const t=Rt(e.selectedMethod,e.line.id??`index-${n}`);s.has(t)||s.set(t,e)});const c=Bt(o).flatMap(({key:e,methods:n,merchandiseLines:t})=>{const a=s.get(e),i=n[0];if(!a||!i)return[];const r=n.find(e=>!l.has(e))??Dt(i);return[{id:a.id,deliveryMethod:r,merchandiseLines:t.filter(e=>e.requiresShipping)}]}),d=c.length;return{shipmentGroups:c,title:t.translate("order_summary.shipping_label"),subtitle:d>1?t.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:d}):void 0,subtitleIcon:"truck",address:i,addressHeading:t.translate("thank_you.shipping_address_title"),modalHeader:e=>1===d?t.translate("order_summary.shipping_label"):t.translate("shipping.split_shipping_merchandise_shipment_number",{number:e+1,total:d})}}(a,e);return n(A,{gap:"base",children:[i&&n(Tl,{...i}),r&&n(Tl,{...r})]})}function Il(){const{i18n:e,shop:t,checkout:{negotiator:a}}=pn(),i=t.hasFlagEnabled(mn),r=e.translate("shipping.shipping_method_title"),o=a.current.fields.deliveryNext,l=Ft(),s=zt(),d=W(),u=c(()=>{const e=o.value;if("filled"!==e?.status)return[];const n=Ua(e.lines).filter(vn);return qn(n)}),h=c(()=>u.value.filter(({type:e})=>"ONE_TIME_PURCHASE"===e)),p=c(()=>Et(h.value).groups),m=c(()=>p.value.length),_=c(()=>u.value.filter(({type:e})=>"SUBSCRIPTION"===e)),g=c(()=>_.value.length>0),f=c(()=>u.value.map(({methods:e})=>e[0]?.handle)),b=c(()=>e.translate("shipping.shipping_method_first_shipment_group_title",{count:m.value})),v=c(()=>
1g.value&&!l.value.showShipmentBreakdown&&!$(d.value.currentDetour)),k=c(()=>g.value||s.value?e.translate("shipping.split_shipping_multiple_shipment_notice"):m.value>1?e.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:m.value}):void 0),w=t.marketDrivenShippingEnabled&&Na(h.value);return n(y,{when:()=>"filled"===o.value?.status,children:()=>n(xt,{target:"plain",children:n(U,{accessibilityLabel:r,children:n(A,{gap:"base",padding:"small-300 none none none",children:[n(A,{gap:"small-400",children:[n(q,{level:2,children:r}),n(y,{when:()=>l.value.showShipmentBreakdown,fallback:n(Pl,{multipleShipmentsHeading:k}),children:n(Xa,{})})]}),n(A,{gap:"large-200",children:[n(A,{gap:"small-200",children:[n(y,{when:v,children:()=>n(q,{level:3,children:b.value})}),n(xt,{target:"edgeToEdgeCard",children:n(U,{accessibilityRole:"presentation",colorLayer:i?void 0:"control",children:n(Za,{deliveryLines:u.value,selectedDeliveryMethodHandles:f.value,choiceListContext:!1,showGroupPrices:!w,shipmentGroups:p.value})})})]}),n(ei,{subscriptionLines:_.value})]})]})})})})}function Pl({multipleShipmentsHeading:e}){return n(y,{when:e,children:e=>n(A,{direction:"inline",gap:"small-400",alignItems:"center",children:[n(E,{type:"truck"}),n(N,{color:"subdued",children:e})]})})}function Ml(e){return e.some(e=>"_shopify_buyer_membership_key"===e.key&&"buy_with_prime"===e.value)}const Al="/cdn/shopifycloud/checkout-web/assets/c1/assets/envelope.C3KgH2Yk.svg";function El({active:e,children:t,products:a,colorLayer:i}){const o=r(new Set),[l]=a.filter(({src:e})=>e&&!o.value.has(e));return n("div",{onErrorCapture:function(e){if(!(e.target instanceof HTMLImageElement))return;const n=e.target.getAttribute("src");n&&(o.value=new Set([...o.value,n]))},children:n(B,{children:[e?n(U,{accessibilityRole:"presentation",className:d("sv7SI",xe.ThankYouEntranceStatus),colorLayer:i,overflow:"hidden",children:n(G,{background:"subdued",className:"fF5mZ",overflow:"hidden",position:"absolute",children:l?n(X,{alt:"",className:"k3nMX",inlineSize:"auto",objectFit:"cover",src:l.src}):null})}):null,n(A,{alignItems:e?"center":void 0,className:"oMEEK",padding:e?"base":void 0,paddingBlockStart:e?"large-300":void 0,children:[e?n(A,{alignItems:"center",className:xe.ThankYouEntranceStatus,children:[l?n(Le,{src:l.src}):null,o.value.has(Al)?null:n(G,{className:"p3BjS",inlineSize:"95px",children:n(X,{alt:"",aspectRatio:"95/102",src:Al})})]}):null,n(G,{inlineSize:"100%",children:t})]})]})})}function Nl({coordinates:e,location:t}){const{i18n:a}=pn(),i=new URL("https://www.google.com/maps/dir/");return i.searchParams.set("api","1"),i.searchParams.set("destination",`${e.latitude},${e.longitude}`),n(K,{href:i.href,display:"block",target:"_blank",tone:"monochrome",textDecoration:"none",accessibilityLabel:a.translate("thank_you.pickup_map_marker.directions_link_accessibility_label",{location:t}),children:n(B,{alignItems:"center",columnGap:"small-400",gridTemplateColumns:"minmax(0, 1fr) auto",minBlockSize:"28px",paddingBlock:"small-400",paddingInline:"small-200",children:[n(Ge,{children:n(N,{type:"small",color:"subdued",children:a.translate("thank_you.pickup_map_marker.callout",{location:n(N,{type:"strong",children:t})})})}),n(E,{type:"external",size:"small-100"})]})})}function Rl({children:e,logoUrl:t}){const a=r(),i=t&&a.value!==t;return n(G,{position:"absolute",insetBlock:"0px 0px",insetInline:"0px 0px",className:"KtZGb",children:[n(G,{accessibilityVisibility:"hidden",background:"base",borderRadius:"large",boxShadow:"base",padding:"small-400",position:"absolute",className:"PSy3F",children:[n(B,{alignItems:"center",justifyItems:"center",blockSize:"100%",children:i?n(X,{src:t,alt:"",aspectRatio:"1",objectFit:"contain",borderRadius:"base",onError:()=>{a.value=t}},t):n(E,{type:"store",size:"large-100"})}),n("svg",{"aria-hidden":"true",focusable:"false",width:"20",height:"10",viewBox:"0 0 20 10",className:"A7zgQ",children:n("path",{d:"M0 0h20c-3 0-4 1-6 3l-2 2c-1 1-3 1-4 0L6 3C4 1 3 0 0 0Z"})})]}),n(G,{background:"base",borderRadius:"fullyRounded",boxShadow:"base",minBlockSize:"28px",position:"absolute",className:"tNSyn",children:e})]})}const Dl=v(void 0);function Bl(){return k(Dl)}const zl="_82Z1e",Fl="wpbKf",Ol="nH4ja",ql="550 / 200",Ul="2 / 1";function jl(e){const t=ot(),a=e.native||e.reveal||e.prepareReveal;return n(y,{when:t,fallback:n(ee,{contentDisplay:"block",aspectRatio:a?ql:Ul}),children:n(Hl,{...e},e.src)})}function Hl({src:e,title:t,overlayTitle:a,overlayLabel:i,overlayPosition:o="aboveMarker",overlay:l,onError:s,native:c=!1,reveal:u=!1,prepareReveal:h=u}){const p=r(),m=p.value===e,_=u&&m,y=c||u||h,g=!y||m;let f;return _?f="k3H5T":h&&!_?f="d0mBH":y&&!m&&(f="_1WW5M"),n(G,{position:"relative",onLoadCapture:function(n){n.target instanceof HTMLImageElement&&n.target.getAttribute("src")===e&&(p.value=e)},className:d("Q3L2z",{[Fl]:Boolean(l),[zl]:y}),children:[_?n(G,{accessibilityVisibility:"hidden",className:"LyLiP",position:"absolute",children:n(X,{alt:"",className:"vGAm4",inlineSize:"auto",objectFit:"cover",src:e})}):null,n(X,{src:e,alt:t??"Map",className:f,loading:"lazy",aspectRatio:y?ql:Ul,objectFit:y?void 0:"cover",onError:s?()=>s():void 0}),y&&!m?n(G,{position:"absolute",insetBlock:"0px 0px",insetInline:"0px 0px",children:n(ee,{contentDisplay:"block",aspectRatio:ql,delay:!1})}):null,g&&i?n("div",{"aria-hidden":"true",className:d("_1H07Y",{[Ol]:"center"===o}),children:n(A,{gap:"small-500",alignItems:"center",children:[a?n(N,{color:"subdued",type:"small",children:a}):null,n(N,{type:"strong",children:i})]})}):null,g?l:null]})}const Wl={ProductMapMarker:"_1hWL4","ProductMapMarker-borderColorBase":"Kv2J9","ProductMapMarker-borderColorCustom":"Wv7wJ","ProductMapMarker-badgeToneBase":"WtS0D","ProductMapMarker-badgeToneAccent":"GgkBH",ProductMapMarkerCards:"l8QVy",ProductMapMarkerPin:"pJQCE",ProductMapMarkerPinBody:"_35R1C",ProductMapMarkerPinGlyph:"_9uLa0",ProductMapMarkerLabel:"_1w8la",ProductMapMarkerLabelEnter:"xQXew",ProductMapMarkerCard:"gj4N0",ProductMapMarkerCardEnter:"VImf6",ProductMapMarkerCardPrimary:"_9CuNx",ProductMapMarkerCardShadowReveal:"O8Seo",ProductMapMarkerCheckmark:"_01CKh",ProductMapMarkerCheckmarkEnter:"KQs71",ProductMapMarkerCheckmarkSvg:"Ic4fS",ProductMapMarkerCheckmarkPath:"IMQvT",ProductMapMarkerCheckmarkPathDraw:"_7hUKC",ProductMapMarkerCards2:"QZR8x"};function $l({children:e,products:t}){const a=t.slice(0,5),{merchandiseThumbnail:{borderColor:i="base",badge:{background:r}={}}={}}=he(),o=r&&"base"!==r?"accent":"base";return n("div",{className:d(Wl.ProductMapMarker,Wl[w("ProductMapMarker-borderColor",i)],Wl[w("ProductMapMarker-badgeTone",o)]),children:[a.length>0?n("div",{"aria-hidden":"true",className:d(Wl.ProductMapMarkerCards,2===a.length&&Wl.ProductMapMarkerCards2),children:a.map((e,t)=>n("div",{className:d(Wl.ProductMapMarkerCard,0===t&&Wl.ProductMapMarkerCardPrimary),children:[n(Le,{src:e.src}),0===t&&n("span",{className:Wl.ProductMapMarkerCheckmark,children:n("svg",{"aria-hidden":"true",className:Wl.ProductMapMarkerCheckmarkSvg,focu
1sable:"false",viewBox:"0 0 75 75",children:n("path",{className:Wl.ProductMapMarkerCheckmarkPath,d:"M20 39 L32 50 L56 25",fill:"none",pathLength:"1"})})})]},e.key))}):n(Vl,{}),n(G,{background:"base",borderRadius:"fullyRounded",boxShadow:"base",className:Wl.ProductMapMarkerLabel,minBlockSize:"26px",overflow:"hidden",paddingBlockStart:"small-400",paddingInline:"small-200",children:n(B,{alignItems:"center",columnGap:"small-400",gridAutoFlow:"column",children:e})})]})}function Vl(){return n("svg",{"aria-hidden":"true",className:Wl.ProductMapMarkerPin,focusable:"false",width:"48",height:"57",viewBox:"0 0 48 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n("path",{className:Wl.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"}),n("path",{className:Wl.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"})]})}function Yl({children:e,marker:t,products:a,background:i="subdued"}){const o=r(new Set),l=a.filter(({src:e})=>e&&!o.value.has(e)),s="product"===i?l[0]?.src:void 0;return n(G,{background:"subdued",className:"QiTzJ",inlineSize:"100%",onErrorCapture:function(e){if(!(e.target instanceof HTMLImageElement))return;const n=e.target.getAttribute("src");n&&(o.value=new Set([...o.value,n]))},overflow:"hidden",position:"relative",children:[s?n(X,{alt:"",className:"BsmDF",inlineSize:"auto",objectFit:"cover",src:s}):null,t??n($l,{products:l,children:e})]})}function Kl({title:e,markerTitle:a,markerLabel:i,fallbackTitle:r=a,products:o,marker:l,overlayPosition:s,failedSources:c,...d}){const u=function(){pn();const e=Kt(),n=P();return function(e,n){return e?n?e.dark:e.light:null}(n?.mapUrl,e)}(),{checkout:h}=pn(),p=we(),m=p,_=m&&"pending"!==h.thankYouEntrance.phase.value,y=u?c.value.has(u):c.value.size>0;function g(){c.value=new Set([...c.value,u])}const f=n(t,{children:[n(N,{color:"subdued",children:r}),n(Ge,{children:n(N,{type:"strong",children:n("bdi",{children:i})})})]});return y?n(Yl,{products:o??[],background:o?"product":"subdued",marker:l,children:f}):u?n(jl,{src:u,native:p,reveal:_,prepareReveal:m,title:e,overlayTitle:o||l?void 0:a,overlayLabel:o||l?void 0:i,overlayPosition:s,overlay:l??(o?n($l,{products:o,children:f}):void 0),onError:g},u):n(Ta,{...d,title:e,onLoadFailure:g})}function Gl(){const{checkout:e,shop:n}=pn(),{acceptEmailMarketing:t,buyerIdentity:a,contactInfo:i}=e.negotiator.current.fields;return c(()=>!a.value?.purchasingCompany&&void 0!==i.value?.email&&"OFF"!==n.emailMarketing&&!t.value&&"processed"===e.latestReceipt.value?.status&&e.latestReceipt.value.eligibleForMarketingOptIn)}const Ql=/^(e_[0-9a-f]{32})_(.+?)(?:_osp)?$/;const Zl={Root:"CGD68",VisualLabel:"MPVYO",Layer:"_3MQvk",Phrase:"_8PSDP",Token:"fWnnD",IntroToken:"_1IOC2",ShopButtonAnimationCharOut:"bDnw9",FinalToken:"lK5x7",ShopButtonAnimationCharIn:"c0CTL",IconSpacer:"_4davv",ShopLogoSpacer:"_38oLJ",ShopLogoTrailingSpacer:"wXlya",Icon:"oXdcI",BellIcon:"hOZAu",ShopButtonAnimationBellRing:"_2Vr9X",BellIconAfterSwap:"kyDmS",ShopLogoToken:"ogNqn",ShopLogo:"aAfSd",StaticLabel:"kujmI",StaticShopLogoWrapper:"q19KC",AccessibleLabel:"_6rZN2",Delay0:"E1DyI",Delay1:"gRzAZ",Delay2:"EHhRv",Delay3:"KaI2p",Delay4:"taDzR",Delay5:"gvU7N",Delay6:"w7U7g",Delay7:"Cl5Kz",Delay8:"Dh152",Delay9:"TjYGl",Delay10:"EzlVD",Delay11:"JcEQU",Delay12:"HEqog",Delay13:"OaqG3",Delay14:"xHfD9",Delay15:"Qhbfd",Delay16:"_1C9SL",Delay17:"jvrs3",Delay18:"ayiZt",Delay19:"JVpja",Delay20:"y2YPD",Delay21:"t0uAF",Delay22:"rLm9q",Delay23:"PXe2R",Delay24:"_63ITw"};function Jl({intro:a,final:r,accessibleLabel:o,staticLabel:l}){const{i18n:s}=pn(),{locale:c,localeDirection:u}=s,h=e=>"rtl"===u&&C(e)?"rtl":"ltr",[p,m]=e(!1);i(()=>{m(!0)},[]);const _=(e,a)=>{const i=es(e.textBefore,c,p),r=e.icon?1:0,o=r+i.length,l=e.hasShopLogo?es(e.textAfter??"",c,p):[];
1return n("span",{className:Zl.Layer,children:n("span",{className:Zl.Phrase,dir:h(e.textBefore+(e.textAfter??"")),children:[e.icon?n(t,{children:[n("span",{className:d(Zl.Token,a,Zl.Delay0),children:e.icon}),n("span",{className:Zl.IconSpacer})]}):null,ns(i,a,r),e.hasShopLogo?n(t,{children:[n("span",{className:Zl.ShopLogoSpacer}),n("span",{className:d(Zl.Token,a,Zl.ShopLogoToken,Zl[ts(o)]),children:n(ti,{className:Zl.ShopLogo,"aria-hidden":"true"})}),l.length>0?n(t,{children:[n("span",{className:Zl.ShopLogoTrailingSpacer}),ns(l,a,o+1)]}):null]}):null]})})};return n("span",{className:Zl.Root,children:[n("span",{className:Zl.VisualLabel,"aria-hidden":"true",children:[_(a,Zl.IntroToken),_(r,Zl.FinalToken)]}),n("span",{className:Zl.StaticLabel,dir:h(o),"data-testid":"static-label","aria-hidden":"true",children:l}),n("span",{className:Zl.AccessibleLabel,children:o})]})}const Xl=/^(ar|fa|ur|he|iw|hi|th)\b/i;function es(e,n,t){const a=e.match(/\s+|\S+/gu)??[];if(!t||Xl.test(n)||"function"!=typeof Intl.Segmenter)return a;let i;try{i=new Intl.Segmenter(n,{granularity:"grapheme"})}catch{return a}return a.flatMap(e=>/^\s+$/u.test(e)?[e]:Array.from(i.segment(e),e=>e.segment))}function ns(e,t,a){return e.map((e,i)=>{const r=i+a;return n("span",{className:d(Zl.Token,t,Zl[ts(r)]),children:e.replaceAll(" "," ")},`${r}-${e}`)})}function ts(e){return`Delay${Math.min(e,24)}`}function as(){return n(A,{direction:"inline",alignItems:"center",className:Zl.StaticShopLogoWrapper,children:n(ti,{className:Zl.ShopLogo,"aria-hidden":"true"})})}function is({ringsAfterSwap:e=!1}){return n("svg",{className:d(Zl.Icon,e?Zl.BellIconAfterSwap:Zl.BellIcon),viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:n("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 rs="LOmaT",os={delivery:"delivery_order",pickup:"pickup_order"};function ls(e){const[n,t=""]=e.split("\0");return{textBefore:n,textAfter:t}}
1class ss extends Error{constructor(){super(...arguments),this.name="PickupInstallCampaignAssignmentError"}}function cs({className:e,variant:t="delivery"}={}){const{i18n:a,observability:r}=pn(),o=we(),l=P(),s=gt(),c=(y=s?.mobileUrl,function(e){if(!e)return{clientHandle:null,variant:null};let n;try{n=new URL(e).searchParams.get("utm_campaign")}catch{return{clientHandle:null,variant:null}}if(!n)return{clientHandle:null,variant:null};const t=Ql.exec(n);return t?{clientHandle:t[1],variant:t[2]}:{clientHandle:null,variant:null}}(y)),u={...ls(a.translate("app_promotions.animated_shop_button.final",{shop:"\0"})),hasShopLogo:!0},h={intro:{icon:n(is,{}),textBefore:a.translate("app_promotions.animated_shop_button.intro.value_props")},final:u,accessibleLabel:a.translate("app_promotions.animated_shop_button.final",{shop:"Shop"}),staticLabel:a.translate("app_promotions.animated_shop_button.final",{shop:n(as,{})})},p={intro:u,final:{icon:n(is,{ringsAfterSwap:!0}),...ls(a.translate("app_promotions.animated_shop_button.get_notified",{shop:"\0"})),hasShopLogo:!0},accessibleLabel:a.translate("app_promotions.animated_shop_button.get_notified",{shop:"Shop"}),staticLabel:a.translate("app_promotions.animated_shop_button.get_notified",{shop:n(as,{})})},{track:m}=ki("order_updates"),_=ai();var y;i(()=>{s&&m("shop_button_rendered")},[s,m]);const g="pickup"===t&&null!==c.clientHandle&&null!==c.variant;if(i(()=>{g&&r.error(new ss("Pickup order received an install campaign assignment"),{severity:"warning",metadata:{installCampaign:{clientHandle:c.clientHandle,variant:c.variant}}})},[g,c.clientHandle,c.variant,r]),!s)return null;const{mobileUrl:f,orderTrackingMobileUrl:b,qrCodeUrl:v,buyerHasOrderTrackingPush:k,orderTrackingPushCtaVariant:w}=s,C="pickup"!==t&&!0!==k&&"treatment"===w,S={shop:n("span",{className:"ggkpn",children:n(ti,{className:"jNjME","aria-label":"Shop"})})};let x,T;"pickup"===t?(x=a.translate("app_promotions.track_pickup_with_shop_logo",S),T={title:a.translate("thank_you.qr_code.pickup_title"),subtitle:a.translate("thank_you.qr_code.pickup_description")}):(x=!0===k?a.translate("app_promotions.order_updates_track_order_logo",S):n(Jl,C?{...p}:{...h}),T=c.variant===it.LegacyCopy||cl(c.variant)?{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 L=$o(C&&b?b:f,{utm_content:os[t]}),I=$o(function(e){const n=new URL(e);return n.pathname="/qr/u/download.svg",n.toString()}(v),{link_provider:"open.shop.app",utm_content:os[t],qr_secure_deferred:"true",qr_style:"rounded",qr_error_correction_level:"m",qr_branded_center:"true","qr_branded_center_options[padding]":"0.08"}),A=n(wl,{label:x,message:T,mobileLinkToShop:L,deferredDeepLinkUrl:b?$o(b,{utm_content:os[t]}):void 0,desktopLinkToShop:I,styledQrCode:!0,installCampaign:"pickup"===t?void 0:c,onClipboardInteraction:()=>{m("arrive")},onQrCodeInteraction:()=>{m("arrive_show_qr_code")}}),E=o?l?.orderStatusPageUrl:void 0;return n("div",{className:d("mnuHb",E?void 0:_,e,{[rs]:o}),children:E?n(B,{gridTemplateColumns:"@media (inline-size >= medium) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gap:"base",children:[n("div",{className:_,children:A}),n(M,{className:"ZHLC1",inlineSize:"fill",variant:"secondary",href:E,children:a.translate("thank_you.manage_order_label")})]}):A})}function ds(){const e=P(),n=e?.paymentDetails?.financialPendingReason;return{financialPendingReason:n,isBuyerActionRequired:"BUYER_ACTION_REQUIRED"===n,isProviderActionRequired:["NETWORK_ACTION_REQUIRED","PARTNER_ACTION_REQUIRED","SLOW_COMPLETION_CONFIRMATION","SLOW_COMPLETION_PAYMENT"].includes(n??"")}}const us=({isPickup:e}={isPickup:!1})=>{const{i18n:n}=pn(),t=wo(),a=_(ds()),i=_(e),r=n.translate("thank_you.thank_you_title_payments_app_pending_buyer_action_required"),o=n.translate("thank_you.thank_you_title_payments_app_pending_default");return c(()=>{const{confirmWithEmail:e,confirmWithPhone:n}=t.value,r=a.value;return{pendingOrderConfirmationTitle:l(r),pendingOrderConfirmationMessage:s({confirmWithEmail:e,confirmWithPhone:n,isPickup:i.value,financialPendingReason:r}),isOrderPendingStatus:Boolean(r.financialPendingReason)}});function l(e){return e.isBuyerActionRequired?r:o}function s({confirmWithEmail:e,confirmWithPhone:t,isPickup:a,financialPendingReason:i}){return i.isBuyerActionRequired?function({confirmWithEmail:e,confirmWithPhone:t,isPickup:a}){return a?function({confirmWithEmail:e,confirmWithPhone:t}){return e&&t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone_pick_up"):e?n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_pick_up"):t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone_pick_up"):n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing_pick_up")}({confirmWithEmail:e,confirmWithPhone:t}):e&&t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone"):e?n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email"):t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone"):n.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing")}({confirmWithEmail:e,confirmWithPhone:t,isPickup:a}):i.isProviderActionRequired?n.translate("thank_you.thank_you_payments_app_pending_payment_description_provider_action_required_default"):function({confirmWithEmail:e,confirmWithPhone:t,isPickup:a}){return a?function({confirmWithEmail:e,confirmWithPhone:t}){return e&&t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone_pick_up"):e?n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_pick_up"):t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone_pick_up"):n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing_pick_up")}({confirmWithEmail:e,confirmWithPhone:t}):e&&t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone"):e?n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email"):t?n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone"):n.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing")}({confirmWithEmail:e,confirmWithPhone:t,isPickup:a})}};function hs(e,{legacyRepresentProductsAsFees:n=!1,remoteMerchandiseDetails:t}={}){const a=e?.length?e.map(e=>({giftCard:e.giftCard,key:e.stableId,legacyFee:e.legacyFee,quantity:e.quantity,requiresShipping:e.requiresShipping,src:e.image?.two}
1)):function(e){const n=e?.mergedBuyerProposalMerchandise;return"PurchaseOrderMerchandiseTerms"!==n?.__typename?[]:n.merchandiseLines.map(e=>({giftCard:e.merchandise.giftCard,key:e.stableId,legacyFee:"legacyFee"in e&&!0===e.legacyFee,quantity:e.quantity.items,requiresShipping:e.merchandise.requiresShipping,src:e.merchandise.image?.two}))}(t);return a.filter(({quantity:e,legacyFee:t})=>e>0&&!(n&&t)).map(({giftCard:e,key:n,requiresShipping:t,src:a})=>({giftCard:e,key:n,requiresShipping:t,src:a}))}const ps={id:"766f1a73f6f5729d8de999514e11f6d1a0015979328b3a23a3ffe084b071b5ed",type:"mutation",name:"EmailMarketingOptIn",source:""};function ms({optInState:e}){const{i18n:t}=pn();let a,i;return"loading"===e.value?(a=n(Qe,{size:"small"}),i=t.translate("marketing.accept_marketing_checkbox_label")):"opt_in_pending"===e.value?(a=n(E,{type:"email",size:"small"}),i=t.translate("marketing.pending_accept_marketing_checkbox_label")):(a=n(E,{type:"check",size:"small"}),i=t.translate("marketing.post_accept_marketing_checkbox_label")),n(A,{direction:"inline",gap:"base",alignItems:"center",children:[a,i]})}function _s({colorLayer:e}){const{track:t}=bi(),{client:a,i18n:o,observability:l,userEvents:s,shop:{id:c,myshopifyDomain:d},source:u,checkout:h,graphql:{coreGraphql:p}}=pn(),m=r("not_opted_in"),_=kn(),g=h.negotiator.current.fields.buyerIdentity.value?.customerProfile,f=P(),b=a.unstable_getSerialization("sessionToken"),v="simulated"===u.type,k=h.configuration.layout.isOnePage.value;return i(()=>{t("thank_you_page_email_consent_page_view/4.0",{page:"thank_you",customerId:g?.id?Number(hn(g.id)):void 0,orderId:tt(f?.orderIdentity.id),sessionToken:_?.value?.defaultAttributes?.visitToken,uniqueToken:_?.value?.defaultAttributes?.uniqToken})},[g?.id,f,t,_?.value?.defaultAttributes?.uniqToken,_?.value?.defaultAttributes?.visitToken]),n(G,{borderWidth:"base none none none",background:"subdued",padding:"base",colorLayer:e,children:n(y,{when:()=>"not_opted_in"===m.value,fallback:n(ms,{optInState:m}),children:n(ae,{id:"marketing_opt_in",name:"marketing_opt_in",onChange:async function(e){if(v)return void(m.value="opted_in");if(!e)return;const n=Number(hn(c));s.monorailEvent({schemaId:"checkout_email_marketing_optin_ui_interaction/1.0",payload:{checkoutToken:u.checkoutSessionIdentifier||u.sourceId,shopId:Number.isNaN(n)?0:n,shopifyDomain:d,action:"click_email_opt_in",origin:"thank_you_page",checkoutVersion:k?"checkout_one_redesign":"checkout_one"}}),m.value="loading";const{data:t,error:a}=await p.mutate(ps,{variables:{orderId:f.orderIdentity.id,sessionInput:{sessionToken:b}}});if(a)return m.value="not_opted_in",void(a instanceof S||l.error(a));const i=t?.subscribeToMarketing.__typename;"MarketingOptInFailure"===i&&"ALREADY_SUBSCRIBED"!==t?.subscribeToMarketing.code?m.value="not_opted_in":"MarketingOptInFailure"===i&&"ALREADY_SUBSCRIBED"===t?.subscribeToMarketing.code?m.value="opted_in":"MarketingOptInSuccess"===i&&(m.value=t?.subscribeToMarketing.pending?"opt_in_pending":"opted_in")},label:o.translate("marketing.accept_marketing_checkbox_label")})})})}function ys({children:e}){return"string"!=typeof e?null:n(t,{children:e.split("\n").filter(Boolean).map(e=>n(O,{children:e},e))})}const gs=({deliveryInformation:e,paymentInstructions:a,color:i,textAlign:r})=>{const{i18n:o}=pn(),{confirmWithEmail:l,confirmWithPhone:s}=wo().value,{isOrderPendingStatus:c,pendingOrderConfirmationMessage:d}=us().value,u=ni().value,h=di(),p=gt()?.buyerHasOrderTrackingPush,m=a&&a.length>0;return n(A,{gap:"small-300",children:[m?null:n(O,{color:i,textAlign:r,children:(c?d:l&&s?u?o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.multi_store"):o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store"):l?u?o.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):h&&!0===p?o.translate("thank_you.thank_you_confirmed_with_shop_updates_description"):o.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):s?u?o.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):o.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):void 0)||o.translate("thank_you.thank_you_confirmed_order_with_missing")}),e?n(O,{color:i,textAlign:r,children:e?n(t,{children:[n(N,{type:"strong",children:o.translate("thank_you.delivery_information_label")})," ",n(Y,{children:e})]}):null}):null,m?n(A,{gap:"base",children:a.map(e=>n(ys,{children:e},e))}):null]})};function fs({shippingAddress:e,deliveryInformation:a,deliveryMethodType:i,paymentInstructions:l,isBuyWithPrime:s,legacyRepresentProductsAsFees:d,merchandiseLines:u,remoteMerchandiseDetails:h}){const{shop:p,i18n:m,checkout:_}=pn(),g=Bl(),f=p.hasFlagEnabled(mn),b=we(),{track:v}=ki("map"),k=Kt(),w=p.hasFlagEnabled(lt)?k?Pa:Ma:k?Ia:[],C=fi().value,{pendingOrderConfirmationTitle:S,isOrderPendingStatus:x}=us().value,T=Gl(),L=ni().value,I=di()&&!L,M=x?S:L?m.translate("thank_you.confirmed_orders_title"):m.translate("thank_you.thank_you_title"),E=Ze(e,{countryFormat:"explicit",hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),N=b&&p.hasFlagEnabled(st)&&"SHIPPING"===i,R=P(),D=R?.pickupMap,B="pickupPoint"===D?.location.kind?D.location:null,z="CARRIER"===D?.marker&&null!=B,F=R?.completedRemoteCheckouts?.some(e=>"submitted"===e.status&&(e.remotePurchaseOrder.deliveryLines?.length??0)>1)??!1,O=R?.isRedacted??!1,j=c(()=>!O&&T.value),H=r(new Set),W="VISIBLE"===R?.mapVisibility,$=o(()=>W?D&&B?{label:B.name,position:{lat:D.coordinates.latitude,lng:D.coordinates.longitude}}
1:e?.coordinates&&E?{label:E,position:{lat:e.coordinates.latitude,lng:e.coordinates.longitude}}:null:null,[e,E,W,B,D]),V=o(()=>N?function(e,{legacyRepresentProductsAsFees:n=!1,remoteMerchandiseDetails:t}={}){const a=hs(e,{legacyRepresentProductsAsFees:n,remoteMerchandiseDetails:t}),i=[];for(const r of a)if(r.requiresShipping&&!r.giftCard&&r.src&&(i.push({key:r.key,src:r.src}),5===i.length))break;return i}(u,{legacyRepresentProductsAsFees:d,remoteMerchandiseDetails:h}):[],[N,d,u,h]),Y=!C&&!L&&!F,K=N&&Y,Q=hs(u,{legacyRepresentProductsAsFees:d,remoteMerchandiseDetails:h}),Z=b&&Y&&!O&&!_.isShippingRequired.value&&Q.length>0&&Q.every(({requiresShipping:e})=>!e),J=B?m.translate("thank_you.pick_up_in_store_marker.shipping"):m.translate("thank_you.marker.shipping"),X=o(()=>$?[{type:"destination",title:J,headerDisabled:!0,...$}]:[],[$,J]);let ee=null;if($&&!Z){const e=z&&D&&B?n(Rl,{logoUrl:La(B),children:n(Nl,{coordinates:D.coordinates,location:B.name})}):void 0,t=B?m.translate("thank_you.pickup_map_marker.callout",{location:$.label}):m.translate("thank_you.shipping_address_map_title",{address:$.label});ee=n(Kl,{failedSources:H,title:t,markerTitle:J,markerLabel:$.label,fallbackTitle:B?J:m.translate("shipping.shipping_address_title"),products:K?V:void 0,marker:e,overlayPosition:B?"center":"aboveMarker",options:{mapOptions:{center:$.position,styles:w}},markers:X,handleClick:()=>v("click"),handleDoubleClick:()=>v("dblclick"),handleDragEnd:()=>v("dragend"),handleZoomChanged:()=>v("zoom_changed")})}const ne=null===ee?"none":"base",te=ee&&g?n(G,{ref:g,children:ee}):ee,ae=n(t,{children:[n(q,{textAlign:b?"center":void 0,children:M}),n(gs,{color:b?"subdued":void 0,deliveryInformation:a,paymentInstructions:l,textAlign:b?"center":void 0})]}),ie=I?n(cs,{variant:"delivery"}):null,re=n(t,{children:[n(A,{gap:"base",borderWidth:b?void 0:`${ne} none none none`,padding:"base",children:[b?n(A,{gap:"small-300",children:ae}):ae,ie]}),s&&!C&&n(A,{gap:"base",borderWidth:b?void 0:`${ne} none none none`,padding:"base",children:n(Ja,{})}),n(y,{when:j,children:n(_s,{colorLayer:f?void 0:"control"})})]});return b?n(t,{children:[n(El,{active:Z,colorLayer:f?void 0:"control",products:Q.flatMap(({key:e,src:n})=>n?[{key:e,src:n}]:[]),children:n(ho,{map:te})}),n(U,{accessibilityLabel:M,colorLayer:f?void 0:"control",overflow:"hidden",children:re})]}):n(U,{accessibilityLabel:M,colorLayer:f?void 0:"control",overflow:"hidden",className:xe.ThankYouEntranceStatus,children:[te,re]})}const bs=v(null);function vs({activeStep:e,children:t}){const a=x.toArray(t).map(e=>T(e)?e.props.id:void 0),i=a.join("|"),r=o(()=>({steps:a.reduce((n,t,i)=>(n[t]={active:e?e===t:0===i,completed:a.indexOf(e)>a.indexOf(t)},n),{})}),[e,i]);return n(bs.Provider,{value:r,children:n("ol",{className:"_1ojciyd1 _1ojciyd0 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem11h _1fragemzk",role:"list",children:t})})}var ks="_4xihkw2";function ws({children:e,description:a,icon:i,iconTone:r,id:o,label:l,state:s,stateHidden:c=!0}){const{steps:u}=function(){const e=k(bs);if(null===e)throw new ct("<Step />  must be used inside of an <ProgressTracker />");return e}(),h=0===Object.keys(u).indexOf(o),{[o]:{active:p,completed:m}}=u,_=d("_4xihkw1 _4xihkw0 _1fragem64",m&&ks);return n(t,{children:[!h&&n(xs,{active:p,completed:m}),n("li",{className:_,"aria-current":p,children:[n(Cs,{active:p,completed:m,type:i,tone:r}),n(Ss,{active:p,completed:m,description:a,label:l,state:s,stateHidden:c}),e]})]})}function Cs({active:e,tone:t="accent",type:a,completed:i}){const r=d("_4xihkw4",e&&"_4xihkw3",i&&ks);return n("div",{className:r,children:n(E,{type:a,tone:e||i?t:void 0})})}function Ss({active:e,completed:a,description:i,label:r,state:o,stateHidden:l}){const s=d("_4xihkw5",(e||a)&&ks);return n(t,{children:[n("div",{className:s,children:[l?n(N,{accessibilityVisibility:"exclusive",children:o}):n(O,{children:o}),n(O,{children:n(N,{type:e||a?"strong":"generic",children:r})})]}),(e||a)&&i&&n(O,{type:"small",color:"subdued",children:i})]})}function xs({active:e,completed:t}){const a=d("_4xihkw6",(e||t)&&ks);return n("li",{className:a,"aria-hidden":!0})}function Ts({activeStep:e="inReview"}){const{i18n:t,shop:a}=pn(),i=a.hasFlagEnabled(mn),r=t.formatDate(new Date,{month:"long",day:"2-digit",timeZone:a.timeZone}),o=[{id:"submitted",date:r,label:t.translate("thank_you.breadcrumbs_submitted"),state:t.translate("thank_you.breadcrumbs_submitted"),icon:"arrow-right"},{id:"inReview",date:r,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 n(U,{colorLayer:i?void 0:"control",children:[n(A,{gap:"base",padding:"base",children:n(vs,{activeStep:e,children:o.map(e=>n(ws,{description:e.date,icon:e.icon,id:e.id,label:e.label,state:e.state},e.id))})}),n(fe,{}),n(A,{gap:"base",padding:"base",children:[n(q,{children:t.translate("thank_you.thank_you_title_review")}),n(O,{children:t.translate("thank_you.thank_you_confirmed_order_with_draft")})]})]})}function Ls({paymentInstructions:e}){const{value:a}=ne(),{shop:i,i18n:o,checkout:{negotiator:l}}=pn(),s=Bl(),d=i.hasFlagEnabled(mn),u=we(),h=l.current.fields.deliveryNext,p=dt(h.value,"ONE_TIME_PURCHASE",!0),m=P(),_=m?.pickupMap,g="MERCHANT"===_?.marker,f="available"===p?.status?p.methods.find(e=>"PICK_UP"===e.methodType)?.pickupLocation:void 0,b=("inStore"===_?.location.kind?_.location:void 0)??f,{confirmWithEmail:v,confirmWithPhone:k}=wo().value,{isOrderPendingStatus:w,pendingOrderConfirmationTitle:C,pendingOrderConfirmationMessage:S}
1=us({isPickup:!0}).value,x=Kt(),T=i.hasFlagEnabled(lt),L=T?x?Pa:Ma:x?Ia:[],{track:I}=ki("map"),M=r(new Set),E=ni().value,N=di()&&!E,R=Ze(b?.address,{hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),D=w?C:o.translate("thank_you.thank_you_title"),B=m?.isRedacted??!1,z=Gl(),F=c(()=>!B&&z.value),j=o.translate("thank_you.pick_up_in_store_marker.shipping"),H=b?.name||R,W=_?.coordinates??b?.address?.coordinates;let $=null;if((u?"VISIBLE"===m?.mapVisibility&&(null!=_||"PRECISE"===b?.address?.coordinates?.accuracy):!i.hasFlagEnabled(ut)&&Boolean(W))&&W){const e=g?n(Nl,{coordinates:W,location:H??""}):null,t=g?n(Rl,{logoUrl:i.brandSettings?.squareLogo?.url,children:e}):void 0,a=o.translate("thank_you.pickup_map_marker.callout",{location:H??R});$=n(Kl,{failedSources:M,title:a,markerTitle:j,markerLabel:H,marker:t,overlayPosition:T?"center":"aboveMarker",options:{mapOptions:{styles:L}},markers:function(){const e=W;return e?[{type:"destination",title:j,position:{lat:e.latitude,lng:e.longitude},label:H,headerDisabled:!0}]:[]}(),handleDragEnd:()=>I("dragend")})}const V=$?n(G,{borderWidth:u?void 0:"none none base none",ref:s,children:$}):null,Y=n(t,{children:[n(q,{textAlign:u?"center":void 0,children:D}),n(O,{color:u?"subdued":void 0,textAlign:u?"center":void 0,children:w?S:a?v&&k?o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store"):v?o.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):k?o.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):o.translate("thank_you.thank_you_confirmed_order_with_missing"):v&&k?o.translate("thank_you.thank_you_confirmed_order_with_email_and_phone_pick_up"):v?o.translate("thank_you.thank_you_confirmed_order_with_email_pick_up"):k?o.translate("thank_you.thank_you_confirmed_order_with_phone_pick_up"):o.translate("thank_you.thank_you_confirmed_order_with_missing")})]}),K=N?n(cs,{variant:a?"delivery":"pickup"}):null,Q=n(t,{children:[n(A,{gap:"base",padding:"base",children:[u?n(A,{gap:"small-300",children:Y}):Y,e&&e.length>0&&n(A,{gap:"base",children:[n(fe,{direction:"inline"}),e.map(e=>n(ys,{children:e},e))]}),K]}),n(y,{when:F,children:n(_s,{colorLayer:d?void 0:"control"})})]});return u?n(t,{children:[n(ho,{map:V}),n(U,{accessibilityLabel:D,colorLayer:d?void 0:"control",overflow:"hidden",children:Q})]}):n(U,{accessibilityLabel:D,colorLayer:d?void 0:"control",className:xe.ThankYouEntranceStatus,children:[V,Q]})}function Is(){const e=we(),{checkout:{negotiator:a}}=pn(),{value:i}=a.current.fields.paymentLines,{value:r}=a.current.fields.shippingAddress,{value:o}=Jn("ONE_TIME_PURCHASE"),{value:l}=a.current.fields.customAttributes,{value:s}=a.current.fields.legacyRepresentProductsAsFees,{value:c}=a.current.fields.remoteMerchandiseDetails,d=Xn(o),u=Gn(),{value:h}=ne(),p=Nr()?.some(e=>"failed"===e.status);if(p)return null;if(u.value)return n(t,{children:[e?n(ho,{}):null,n(Ts,{})]});const m=i?.lines.map(({method:e,specialInstructions:n})=>"paymentOnDelivery"===e.type||"customManualPayment"===e.type||"manualPayment"===e.type?n??e.paymentInstructions:null).filter(Boolean),_="LOCAL"===d?.methodType?d.description:void 0;return h||"PICK_UP"===d?.methodType?n(Ls,{paymentInstructions:m}):n(fs,{shippingAddress:r,legacyRepresentProductsAsFees:s,merchandiseLines:a.current.fields.merchandiseLines.value?.lines,remoteMerchandiseDetails:c,paymentInstructions:m,deliveryInformation:_,deliveryMethodType:d?.methodType,isBuyWithPrime:Ml(l??[])})}const Ps="MXKBd",Ms="In8pu",As="_8DY5a",Es="NiSUe",Ns="t5tTv";function Rs({afterProgress:e=!1,appearance:t,centerOnScreen:r=!1,confirmation:o,mode:l,morphOffset:s,onDrawn:c,onRevealed:u,onSettled:h,registerMark:p,status:m}){const _=s??{x:0,y:0},y=function(e){const n=a(null);return i(()=>{const t=n.current;if(!e||!t||"undefined"==typeof IntersectionObserver)return;const a=[document.documentElement,document.body];for(const e of a)e.classList.add(As);const i=new IntersectionObserver(([e])=>{if(!e?.isIntersecting)return;const n=e.boundingClientRect.bottom-e.intersectionRect.bottom;t.style.setProperty("--offscreen-block-end",`${n}px`)},{threshold:Array.from({length:101},(e,n)=>n/100)});return i.observe(t),()=>{i.disconnect();for(const e of a)e.classList.remove(As)}},[e]),n}(r),g="running"===m,f="traveling"===l;return n("div",{ref:y,className:d("_1BgJP",xe.ThankYouInterstitialOverlay,{[Ps]:e,[Ms]:g,[Ns]:f}),role:"status","aria-hidden":"waiting-for-progress"===m||void 0,"aria-label":o,children:[n(N,{accessibilityVisibility:"exclusive",children:o}),n("div",{className:"coXlQ","aria-hidden":"true",onAnimationStart:g?u:void 0,onAnimationEnd:g&&f?h:void 0}),n("div",{className:d("Ea8kH",{[Es]:g}),ref:p,onAnimationEnd:g&&!f?e=>{e.target===e.currentTarget&&h()}:void 0,style:{"--morph-x":`${_.x}px`,"--morph-y":`${_.y}px`,"--thank-you-interstitial-disc-color":"shopPay"===t?Ya.toRgb():void 0,"--thank-you-interstitial-stroke-color":"shopPay"===t?Ka.Grayscale.White.toRgb():void 0},"aria-hidden":"true",children:n("div",{className:"HDNQw",children:n("svg",{className:"JnQXy",viewBox:"0 0 56 56",focusable:"false","aria-hidden":"true",onAnimationStart:g&&f?e=>{e.target===e.currentTarget&&c()}:void 0,children:[n("circle",{className:"BoaBN",cx:28,cy:28,r:26.5,pathLength:"1"}),n("g",{transform:"scale(0.7466666666666667)",children:n("path",{className:"_98hLo",d:"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"})})]})})})]})}const Ds="_3UsL1";function Bs({children:e}){const{i18n:o,checkout:l}=pn(),c=function(){const{checkout:e,client:n,router:t}=pn(),o=e.thankYouEntrance,l=Ce(),c=j(),d=function(){const e=Gn(),{financialPendingReason:n}=ds(),t=Nr()?.some(e=>"failed"===e.status);return!e.value&&!n&&!t}(),h=ni().value,p=Ye(),m=d&&!h,_=t.currentUrl.value.normalizedPath,y=ii(n.initialRequest.url.pathname).endsWith(_),g=a(l&&m&&!c&&!y).current,f=o.progress?.phase.value,b="loading"===f||"completing"===f,v=r(g?b?"waiting-for-progress":"waiting-for-hydration":"complete"),k=v.value,w=r("centered"),C=o.isRevealing.value,S=r(null),x=a(null),T=a(null),{lock:I,unlock:P}=Je(),M=p||!m,A=s(()=>{L(()=>{v.value="complete",o.skip()})},[o,v]),E=s(()=>{L(()=>{o.settle(),A()})},[o,A]),N=s(()=>{"running"===v.value&&o.reveal()},[o,v]);u(()=>{o.progress?.complete()}
1,[o]),i(()=>{g?M?E():("waiting-for-hydration"===v.value||"waiting-for-progress"===v.value&&!b)&&(v.value="running"):o.skip()},[o,b,E,g,M,v]),i(()=>{if(!g||"running"!==k)return;const e=window.setTimeout(E,3e3);return()=>window.clearTimeout(e)},[k,E,g]),i(()=>{if(!C)return;const e=window.setTimeout(E,2e3);return()=>{window.clearTimeout(e),E()}},[C,E]),i(()=>{if(g&&"running"===k)return window.scrollTo(0,0),I(),P},[k,I,g,P]);const R=s(()=>{const e=x.current,n=T.current;if(!e||!n)return;const t=e.getBoundingClientRect(),a=n.getBoundingClientRect();S.value={x:t.left+t.width/2-(a.left+a.width/2),y:t.top+t.height/2-(a.top+a.height/2)}},[S]),D=s(e=>{x.current=e,"waiting-for-progress"!==v.value&&"waiting-for-hydration"!==v.value||(w.value=e&&window.matchMedia("(max-width: 749px)").matches?"traveling":"centered"),R()},[R,w,v]),B=s(e=>{T.current=e,R()},[R]);return{isAfterProgress:"complete"===f,isContentHidden:"pending"===o.phase.value&&g,isEntranceRevealing:C,mode:w.value,morphOffset:S.value,onDrawn:R,onEntranceSettled:E,onRevealed:N,onSettled:A,registerMapTarget:D,registerMark:B,shouldAnimate:g,status:v.value}}(),h=(p=P(),p?.shopAppLinksAndResources.shopPayOrder?"shopPay":"merchant");var p;if(!c.shouldAnimate)return n(t,{children:e});const m="complete"===c.status?null:n(Rs,{afterProgress:c.isAfterProgress,appearance:h,centerOnScreen:l.configuration.isUniversalCheckoutFinalizer,confirmation:`${o.translate("thank_you.thank_you_title")}`,mode:c.mode,morphOffset:c.morphOffset,onDrawn:c.onDrawn,onRevealed:c.onRevealed,onSettled:c.onSettled,registerMark:c.registerMark,status:c.status});return n(Dl.Provider,{value:c.registerMapTarget,children:["running"===c.status?n(Xe,{children:n("div",{children:m})}):m,n(G,{className:d({[Ds]:c.isContentHidden,[xe.ThankYouEntrance]:c.isEntranceRevealing}),inert:c.isContentHidden,children:e}),c.isEntranceRevealing?n("span",{className:xe.ThankYouEntranceBeat,"aria-hidden":"true",onAnimationEnd:c.onEntranceSettled}):null]})}const zs=Oe("ThankYouOrderSummaryContent");function Fs(){const{checkout:e,i18n:t,source:a}=pn(),{value:i}=e.negotiator.current.fields.merchandiseLines,{open:r,setOpen:o}=en(),l=Ie(void 0,zs),s=`${l}-heading`,c=t.translate("order_summary.title"),d=ve("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY1"),u=ve("Checkout::ThankYou::CartLineDetails::RenderAfter"),h=ve("Checkout::ThankYou::CartLines::RenderAfter"),p=ve("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY2"),m=ve("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY3"),_=oi([...d,...u,...h,...p,...m]);I(()=>{o(_.value)});const y=e.proposal.facts.merchandiseLines??[],g=ht(a)?y:i?.lines||[],{totalLineQuantities:f=0,totalLineQuantitiesFact:b=0}=We(),v=t.translate("order_summary.number_items",{count:ht(a)?b:f}),k=r.value,w=e.configuration.visibility.showAside;return n(G,{display:w?"@media (inline-size >= medium) none, auto":"auto",children:n(U,{accessibilityLabelledBy:s,colorLayer:"control",padding:"base",children:[n(q,{id:s,level:2,visibility:"hidden",children:c}),n(nn,{section:"top_summary",children:n(tn,{section:"top_summary",children:n(ri,{children:[n(an,{"aria-controls":l,"aria-expanded":k,"data-event-name":k?"order_summary_hide":"order_summary_show",inlineSize:"100%",onClick:()=>{o(!r.peek())},children:n(B,{alignItems:"center",gap:"small-200",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content) minmax(auto, max-content)",children:[n(N,k?{size:"large",type:"strong",children:c}:{children:[n("span",{className:Cn({screenReaders:"only"}),children:c})," ",v]}),!k&&n(A,{direction:"inline",alignItems:"center",gap:"small-200",children:[n(rn,{variant:"fan-legacy",size:"small",merchandise:g,useImageAltTexts:!1,sortByPrice:!0}),n(on,{})]}),n(E,{type:k?"chevron-up":"chevron-down",size:"small-200"})]})}),k?n("div",{id:l,children:n(G,{paddingBlockStart:"large-200",children:n(ln,{skipWrappingSection:!0,hideAccessibilityTitle:!0})})},"thank-you-order-summary-open"):n("div",{id:l},"thank-you-order-summary-closed")]})})})]})})}const Os={};let qs=null;const Us={"aria-label":"Shop",style:{fill:Ya.toRgb(),width:44,height:17}},js=({loading:e,onSignInCompleted:t,fetchAttempts:a=1})=>{const{i18n:r,shop:o,checkout:{negotiator:l}}=pn(),s=fi().value,c=r.translate("thank_you.verify_shop_account_title"),{track:d}=ki("pay_escrow"),{value:u}=l.current.fields.contactInfo,h=!s,p=o.hasFlagEnabled(mn);return i(()=>{d(e&&a>=1?"verify_button_blurred_rendered":"verify_button_rendered")},[e,d,a]),n(xt,{target:h?"card":"plain",children:n(U,{accessibilityLabel:c,colorLayer:h&&!p?"control":void 0,children:n(A,e?{padding:h?void 0:"base none",gap:"base",children:[n(ee,{blockSize:"22px",inlineSize:"120px"}),n(ee,{blockSize:"16px",inlineSize:"100%"}),n(ee,{blockSize:"16px",inlineSize:"100%"})]}:{padding:h?void 0:"base none",gap:"large-200",children:[n(B,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",alignItems:"center",alignContent:"center",children:[n(q,{level:2,children:c}),n(ti,{...Us})]}),n(O,{color:"subdued",children:r.translate("thank_you.verify_shop_account_message")}),n(M,{id:"verify-account-button",variant:"secondary",onClick:()=>{d("verify_button_clicked"),((e,n)=>{const t=ga({...e,analyticsTraceId:(qs||(qs=li()),qs),uxMode:"windoid"});if(!t)return void console.warn?.("Failed to build authorize URL due to incorrect parameters",e);let a=null;a=((e,n,t="SignInWithShop")=>{const a=(()=>{const e=void 0===da.screenLeft?da.screenX:da.screenLeft,n=void 0===da.screenTop?da.screenY:da.screenTop;let t,a;
1t=da.innerWidth?da.innerWidth:oa.documentElement.clientWidth?oa.documentElement.clientWidth:screen.width,a=da.innerHeight?da.innerHeight:oa.documentElement.clientHeight?oa.documentElement.clientHeight:screen.height;const i=Math.max(1,t/da.screen.availWidth);return{height:554/i,left:(t-365)/2/i+e,top:(a-554)/2/i+n,width:365/i}})();Os[t]?.();const i=da.open(e,"SignInWithShop",`popup,width=${a.width},height=${a.height},top=${a.top},left=${a.left}`),r=e=>{pa({allowedOrigins:[ma,_a,ya,da.location.origin],event:e,source:i})&&n(e)},o=()=>(e=>{e?.close()})(i);n(new MessageEvent("message",{data:{type:"windoidopened"}}));const l=setInterval(()=>{i?.closed&&(n(new MessageEvent("message",{data:{type:"windoidclosed"}})),clearInterval(l))},200);return["beforeunload","unload","pagehide"].forEach(e=>{da.addEventListener(e,o,{once:!0})}),da.addEventListener("message",r),Os[t]=()=>{["beforeunload","unload","pagehide"].forEach(e=>{da.removeEventListener(e,o)}),da.removeEventListener("message",r),clearInterval(l)},i})(t,e=>{switch(e.data.type){case"completed":n.onComplete?.(e.data),a?.close();break;case"error":n.onError?.(e.data),a?.close();break;case"windoidopened":n.onWindoidOpen?.()}})})({loginHint:u?.email??"",codeChallenge:"test-code-challenge",codeChallengeMethod:"S256",flow:"thank_you_page_escrow",prompt:"login",proxy:!0,responseType:"code"},{onComplete:t})},children:r.translate("thank_you.verify_shop_account_cta")})]})})})};function Hs(e){return e instanceof HTMLAnchorElement&&e.hasAttribute("href")}const Ws={id:"ebcee8be9e6c7c28fbd55d8183745df83661612f69510c509fb5bd01a8b778e2",type:"query",name:"PublisherSettings",source:""},$s=re(({graphql:{coreGraphql:e}},{skip:n})=>{const t=e.query(Ws,{skip:()=>n.value});return{adsPublisherSettingsTypEnabled:p(()=>t.data.value?.shop?.adsPublisherSettingsTypEnabled??!1),draftAdsPublisherSettingsTypEnabled:p(()=>t.data.value?.shop?.draftAdsPublisherSettingsTypEnabled??!1),error:t.error,loading:t.loading}}),Vs=["CA","US"],Ys=["en","de","fr","es"];function Ks(e){return Ys.some(n=>e===n||e.startsWith(`${n}-`))}const Gs=/Shop App\/|FBAN|FBAV|FB_IAB|Instagram|musical_ly|Bytedance|TikTok|Snapchat|Line\/|MicroMessenger|Pinterest|Twitter\/|LinkedInApp|GSA\/|;\s?wv/,Qs=/Shop App\/[^/]+\/(iOS|Android)\//;function Zs(e){return Qs.exec(e)?.[1]??Sn(e)}function Js(){const{i18n:r,url:l,shop:d,source:u,checkout:h,embed:p,router:m}=pn(),{contactEmail:g,hasStorefront:f,externalDomain:b,previewReturnUrl:v}=d,{handleSetIsVerifiedShopAccount:k,status:w,isVerifiedShopAccount:C,fetchAttempts:S}=function(){const{i18n:n}=pn(),{track:t}=ki("pay_escrow"),{isVerifiedShopAccount:a,setIsVerifiedShopAccount:r,loading:o,status:l,fetchAttempts:c}=function(){const{client:n}=pn(),t=n.unstable_getSerialization("sessionToken"),a=P()?.id,i=pr(),[r,o]=e(!i),{attempts:l,loading:s,pendingPayEscrow:c}=Tn(hr,{receiptId:_(a),retries:5,sessionToken:_(t),skip:_(!i||!a||!t)}),d={status:"verified_user",isVerifiedShopAccount:r,setIsVerifiedShopAccount:o,loading:s.value,fetchAttempts:l.peek()};return i?s.value?{...d,status:"fetching_status"}:{...d,status:c.value?"split_user":"verified_user"}:d}();i(()=>{a||"verified_user"!==l||o||(t("verify_button_removed"),r(!0))},[a,l,o,t,r]);const d=s(e=>{const{email:a}=e;a&&(t("verify_action_completed"),mr({email:a,text:n.translate("thank_you.verify_shop_account_confirmation")})),r(!0)},[t,r,n]);return{status:l,isVerifiedShopAccount:a,loading:o,handleSetIsVerifiedShopAccount:d,fetchAttempts:c}}(),x=h.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,T=cn().value,{track:L}=ki("follow_link"),I="simulated"===u.type,E=Boolean(p?.isFlagshipPartner),N=P(),R=N?.paymentDetails?.buyerActionInfo,D=_t(),B=function(){const{checkout:{negotiator:e}}=pn(),n=e.current.fields.paymentLines,t=gt();return c(()=>!!n.value&&n.value.lines.some(({method:e})=>"wallet"===e.type&&"SHOPIFY_INSTALLMENTS"===e.name)&&Boolean(t?.installmentsHighlightEligible))}(),z=function(){const{checkout:{negotiator:e}}=pn(),{buyerIdentity:n,contactInfo:t}=e.current.fields,a=_n(),i=H(),r=P(),o=r?.isRedacted??!1;return c(()=>!o&&i.value&&!t?.value?.email&&!n?.value?.purchasingCompany&&!a.value)}(),F=fi(),q=ne(),{currentDetour:U}=W().value,$=dn().value,V=we(),Q=V&&$&&un({embedder:p?.embedder,isThankYouDetour:"thankYou"===U?.type,normalizedPath:m.currentUrl.value.normalizedPath}),{main:{section:Z}}=Ve(),J=function(){const{i18n:e,checkout:{negotiator:n}}=pn(),{billingAddress:t,shippingAddress:a}=n.current.fields,{geolocation:i}=sn(),r=_(j()),o=Vs.includes(i.country.code),l=c(()=>(a.value??t.value)?.countryCode??""),s=c(()=>Vs.includes(l.value)&&o),d=c(()=>!(r.value||Ks(e.locale)&&s.value)),{adsPublisherSettingsTypEnabled:u,draftAdsPublisherSettingsTypEnabled:h,loading:p}=Tn($s,{skip:d});return c(()=>d.value&&!r.value||p.value?{shouldRender:!1,preview:!1}:function({inEditor:e,adsPublisherSettingsTypEnabled:n,draftAdsPublisherSettingsTypEnabled:t,isAllowedLocale:a,isAllowedCountry:i}){return e?{preview:!0,shouldRender:t}:{preview:!1,shouldRender:n&&a&&i}}({adsPublisherSettingsTypEnabled:u.value,draftAdsPublisherSettingsTypEnabled:h.value,isAllowedLocale:Ks(e.locale),isAllowedCountry:s.value,inEditor:r.value}))}(),X=h.configuration.layout.isOnePage.value,ee=h.configuration.isUniversalCheckoutFinalizer,te=d.hasFlagEnabled(mn),ae=!te&&yt(Z);It("thank-you");const{track:ie}=function({showVerifyShopAccountButton:e}){const n=ui(),t=gt(),a=kn(),{track:i}=bi(),r=vi();return{track:()=>
1{if(!n||!t)return;const{buyerHasShopApp:o,buyerHasShopPay:l,shopPayOrder:s,orderUpdateOptions:c}=t,d=c.filter(e=>"arrive"!==e).join(",");i("order_status_page_view/4.2",{page:"thank_you",orderId:n,isShopPayOrder:s,userHasShop:o,userHasPay:l,shippingUpdateOptions:d,experimentFlags:r,pageviewToken:a.value.defaultAttributes?.microSessionId??"",sessionToken:a.value.defaultAttributes?.visitToken??"",showVerifyShopAccountButton:e},{omit:["shopifyDomain","checkoutToken"]})}}}({showVerifyShopAccountButton:"split_user"===w});Pt({stage:void 0===N?Mt.Usable:Mt.Complete,id:"ThankYou"}),At("ThankYou"),i(()=>{ie()},[ie]);const re=ve("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS1"),oe=ve("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS2"),le=ve("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS3"),{header:{logo:se}}=Ve(),ce=o(()=>!f&&b?`https://${b}`:I?l.storefront():v||(se?.link?se.link:u.headerLogoUrl?u.headerLogoUrl:f&&l.storefront()?l.storefront():void 0),[I,se?.link,u.headerLogoUrl,f,l,b,v]);!function(e,n=!0){const{router:t}=pn(),a=j();i(()=>{if(n&&e&&!a){window.history&&(window.history.replaceState(null,document.title,window.location.href),window.history.pushState(null,document.title,window.location.href));const n=()=>{document.hidden||(window.location.href=e)};return window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}}},[n,e,t,a])}(ce,f&&!T&&!ee),function(){const{checkout:e}=pn(),n=e.configuration.isUniversalCheckoutFinalizer;i(()=>{if(!n)return;const e=e=>{e.composedPath().some(Hs)&&e.preventDefault()};return document.addEventListener("click",e,!0),document.addEventListener("auxclick",e,!0),()=>{document.removeEventListener("click",e,!0),document.removeEventListener("auxclick",e,!0)}},[n])}(),function(e,n=!1){const{observability:t,checkout:{negotiator:r}}=pn(),l=pt(e),c=pt(n),d=a(0),u=a(),h=a(!1),p=a(0),m=a(null);0===d.current&&(d.current=Date.now());const{contactInfo:_,merchandiseLines:y}=r.current.fields;void 0===u.current&&(u.current=Boolean(_.peek()?.email||_.peek()?.phone||y.peek()?.lines?.length));const g=o(()=>{const e="undefined"==typeof navigator?"":navigator.userAgent;return{is_in_app_webview:(n=e,Gs.test(n)),browser_family:mt(e).name,os_family:Zs(e)};var n},[]),f=s(()=>{null!=m.current||"visible"!==document.visibilityState||c.current||null==l.current||(m.current=Date.now())},[l,c]),b=s(()=>{null!=m.current&&(p.current+=Date.now()-m.current,m.current=null)},[]),v=s(()=>p.current+(null==m.current?0:Date.now()-m.current),[]);i(()=>{f();const e=()=>{"visible"===document.visibilityState?f():b(),t.log("typ_visibility_changed","Thank You Page visibility changed",{...g,receipt_masked:c.current,visibility_state:document.visibilityState,receipt_loaded:null!=l.current,ms_since_mount:Date.now()-d.current,visible_ms_with_receipt:v()},{exportImmediately:!0})},n=e=>{b(),t.log("typ_pagehide","Thank You Page hidden",{...g,receipt_masked:c.current,persisted:e.persisted,receipt_loaded:null!=l.current,ms_since_mount:Date.now()-d.current,visible_ms_with_receipt:v()},{exportImmediately:!0})};return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",n),()=>{b(),document.removeEventListener("visibilitychange",e),window.removeEventListener("pagehide",n)}},[t,f,b,v,g,l,c]),i(()=>{h.current||null==e||(h.current=!0,f(),t.log("typ_receipt_rendered","Thank You Page rendered with order receipt",{...g,receipt_masked:c.current,order_details_at_mount:u.current,ms_to_receipt:Date.now()-d.current,visibility_state:document.visibilityState},{exportImmediately:!0,requiresKeepalive:!0}))},[t,e,c,f,g])}(N,E),function(e){const{observability:n,checkout:t}=pn(),r=a(!1);i(()=>{r.current||(r.current=!0,n.counter({name:"thank_you_page_rendered",value:1,attributes:{shopPay:"shopPay"===t.identity.current.value,checkoutDesign:t.configuration.layout.isOnePage.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState,receiptLoaded:null!=e}}))},[t,t.identity,n,e])}(N);const de=n(t,{children:[n(Lt,{children:r.translate("thank_you.title")}),n(A,{gap:"@media (inline-size >= medium) large-500, large-300",children:[!V&&n(ho,{}),n(Xs,{resetSectionStyle:te,children:[n(xt,{target:"card",children:n(vt,{grouped:!0,children:[n(ke,{customizations:re}),R&&n(Xi,{}),n(xt,{target:"edgeToEdgeCard",children:n(Is,{})}),Q&&n(Fs,{}),n(No,{}),n(y,{when:q,children:n(Ll,{})}),!ee&&J.value.shouldRender&&n(xt,{target:"edgeToEdgeCard",children:n(Wo,{preview:J.value.preview})}),n(y,{when:z,children:n(gi,{})}),!ee&&n(y,{when:B,children:n(xl,{})}),n(y,{when:D,children:n(co,{})}),R&&n(Ci,{}),n(ke,{customizations:oe}),n(y,{when:()=>F.value&&!q.value,children:n(Il,{})}),C||ee?null:n(js,{onSignInCompleted:k,loading:"fetching_status"===w,fetchAttempts:S}),n(no,{}),n(ke,{customizations:le})]})}),n(kt,{children:[!x&&!T&&h.configuration.allowRedirectToStorefront&&n(wt,{children:n(M,{variant:"primary",size:"large",inlineSize:"fill",href:ce,onClick:I?void 0:()=>L("continue_shopping"),children:r.translate("thank_you.return_to_store_link_label")})}),!ee&&n(Ct,{children:n(O,{textAlign:"center",children:n(Y,{children:r.translate("thank_you.contact_us_html",{contact_us:n(K,{href:I?void 0:`mailto:${g}`,onClick:I?void 0:()=>L("contact_us"),children:r.translate("thank_you.contact_us")})})})})})]})]})]})]});return n(Bs,{children:X?n(G,{className:"_4Qmfj",padding:"@media (inline-size >= extraSmall) small-300 none, (inline-size >= medium) none, "+(ae?"small-300 none":"none"),children:de}):de})}function Xs({children:e,resetSectionStyle:t}){const a=n(St,{children:e});return t?n(qe,{children:a}):a}export{Js 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.