1import{u as e,g as n,o as t,_ as i,m as a,S as s,p as r,s as o,k as c,N as l,w as d,z as u,h as m,q as h,H as p}from"./2c1ab0fe.Bywc2Brn.js";import{f5 as f,f6 as b,f7 as v,b as g,dH as y,d6 as _,dm as j,R as k,V as w,o as C,S,U as A,i as x,dn as P,dp as z,d0 as M,L as R,B as T,j as L,a9 as E,aD as I,ab as D,A as O,d as N,b9 as B,b7 as F,b8 as U,f as V,cK as $,f8 as H,eg as J,f9 as G,bK as K,s as W,p as Y,dJ as q,fa as Q,k as X,an as Z,ec as ee,af as ne,ag as te,H as ie,a0 as ae,q as se}from"./164ad2e3.CZ86Jn5i.js";import{c as re,n as oe,J as ce,eu as le,ar as de,af as ue,bl as me,aa as he,ad as pe,ab as fe}from"./9dba8418.ogFVeXB5.js";import{C as be}from"./b3389d5c.I3fNsvCk.js";import{u as ve,S as ge,P as ye,L as _e,R as je}from"./73a9b0a0.B1bfYOVR.js";import{M as ke}from"./0b8657b8.IYwAcXyW.js";import{P as we}from"./fc21c11a.BsvZ91uW.js";import{u as Ce,e as Se,G as Ae,T as xe}from"./f3fe2775.CHppPYrI.js";import{a as Pe,H as ze}from"./0e9ee714.DmfOTS-o.js";import{a as Me,W as Re,P as Te}from"./c10167e6.CSnsiKJv.js";import{f as Le,g as Ee,h as Ie,L as De,j as Oe,k as Ne,l as Be,m as Fe,n as Ue,U as Ve,V as $e,P as He}from"./f8706cb6.mPiOoqgF.js";import{y as Je,z as Ge,E as Ke,u as We,a as Ye,b as qe,g as Qe,V as Xe,e as Ze}from"./86720dbb.uEJkn5aN.js";import{a as en}from"./01973ac7.Cify3x0P.js";import{a as nn,b as tn}from"./app.DWJ9FfA1.js";import{a as an,b as sn}from"./bf513f9c.wW-N-9yS.js";import{P as rn}from"./e3e348f2.Krefqpnj.js";import{b as on,c as cn,S as ln}from"./dfca5da5.BykJKV0N.js";import{S as dn}from"./79974aab.DreO813u.js";import{S as un}from"./39921a74.BtGvlOAG.js";import{O as mn}from"./7a8217fd.D7XvILAP.js";import{MobileOrderSummary as hn}from"./d2e6a587.XfGPDmyq.js";import{u as pn}from"./e129c76e.BHHTPlyT.js";import{v as fn}from"./dffdfb34.CdA0NMZv.js";import{a as bn}from"./24773686.BN3rGjti.js";import"./d0bb51ec.DFDQ8Mc_.js";import"./f67abd2c.LtwWKIr5.js";import"./60a453ce.CcyvSWbx.js";import"./e12db40c.B9ahJFAB.js";import"./81e109b1.DOkM2TK2.js";import"./0e67bd3b.BMmt4RQK.js";import"./74835653.CVh949GJ.js";import"./3ca8ef7e.C60WvJE8.js";import"./2495faa4.apuslPn9.js";import"./a9fa9fda.BVLUAUfd.js";import"./ca3e798e.Dc9DtEXz.js";import"./47b970b2.Dz-jBj6A.js";import"./22345fd4.gEtcWjYq.js";import"./064f6ac1.CarL-NVS.js";import"./efa0389a.DH9Ee_M-.js";import"./4b1c22b7.Ds2WGmWm.js";import"./e0989459.CHR4Ec0O.js";import"./cdfd59e6.C7QcriyT.js";import"./e477f96c.C3oRcbz8.js";import"./1ed8f5e3.CzhdrJHY.js";import"./7ee73f43.B9eYh3QJ.js";import"./cb5cf153.DqAeiWvs.js";import"./cb38e5c2.BfOFT2qH.js";import"./1f5e7811.BSn0CeW0.js";import"./0c0ad074.DpK7XKAh.js";import"./ccdf3592.DDsFqWmj.js";import"./2bac2c53.BWpgDRdR.js";import"./87bfafec.CxwEzGHg.js";import"./434e3b0a.B1BBnK_d.js";import"./55098bf1.BfKJQGMW.js";import"./ac5a19ff.BZSGZdnW.js";import"./598fef4e.DSAd8e9l.js";import"./e77f7fe0.Bb-t4Dg5.js";import"./a422df8c.B9kUsb7g.js";import"./cc6ff67d.b-RPC7-m.js";import"./08a3b809.amBLe9xd.js";import"./d25d1b95.BebpfFB8.js";import"./e39bc11c.BD41VQ04.js";import"./cf29e63b.B0ZvKJTY.js";import"./71b60e0a.DfPLdYsH.js";import"./ec391382.DNiaG7XB.js";import"./58314944.jAbgQ7x6.js";import"./b9c0319a.Bdfa0_Zv.js";import"./65f3d4da.Bb3QiqCm.js";import"./f1968089.CXll6zGd.js";import"./17e57de1.B_nQLFIZ.js";import"./a25deb9a.DoQth6Ve.js";import"./945a08d6.2aVG8xpL.js";import"./7bc8057b.Dqf7vuj_.js";import"./2b89a178.BqCt8Ycn.js";import"./b684bff6.rsXToKYt.js";import"./17425706.Dglbz84O.js";import"./6fb6f9d8.aZwr-amY.js";import"./1444e6bd.nTYcj6dN.js";import"./ed9f2238.Bp09ppK6.js";import"./78ab3dd0.bWleYB9t.js";import"./910cd6e2.DGTOobnp.js";import"./347b440c.Drqv7G4C.js";import"./9ce08e25.B1j_T_wC.js";import"./181d38d3.SlPAvY4z.js";import"./792bb671.B3OvVnSg.js";import"./dae24aab.DshQXsWO.js";import"./d6447d9e.CtKH1LYl.js";import"./f49d4216.j73Ti3Uf.js";import"./f51e663e.G3kBqFIi.js";import"./21cc90a2.DHzOO82q.js";import"./64de7b49.ChWquPX6.js";import"./8e79be58.6QYgGZuO.js";import"./90e26f5f.DBQ68JUp.js";import"./31cc568e.95lmLO5k.js";import"./2fdb3dd3.DjsPYeNf.js";import"./ca5e9c49.GLwCPRLK.js";
1import"./f3e117aa.2SdjXTsf.js";import"./1d34c07e.h4dJAaCz.js";import"./7b0c98ea.B7Ow199P.js";import"./f692f62f.RtrT6cYJ.js";import"./9babe369.D342A3FZ.js";import"./71ae3d5c.D0Y3V6pk.js";import"./8599b02a.BwMQ3GGP.js";import"./d4ea2faa.C6NHarPW.js";import"./fe885b80.DJG6xNOh.js";import"./f78726c8.RYZ2G7_W.js";import"./d22d2b80.C1CVQuhE.js";function vn(){const n=f();return Le({ineligibilityReasonLabel:n}),e(Me,{ineligibilityReason:n})}function gn({selectorShowsTiles:s,children:r}){const{checkout:{negotiator:o}}=re(),{buyerHasActedSignal:c}=o.context,l=Je(),d=n(null),u=n(null),m=n(!1),h=oe(s.value&&c.value),p=t(null);i(()=>{const e=u.current;if(!e||"undefined"==typeof MutationObserver)return;const n=new MutationObserver(n=>{if(!e.hasChildNodes())return m.current=!1,void(p.value=null);n.some(e=>e.addedNodes.length>0)&&h.current&&nn()&&(m.current=!0,p.value={from:tn(),withMotion:l.loaded})});return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[p,h,l]),i(()=>{if(m.current){m.current=!1;for(const e of[d.current,u.current])for(const n of e?.getAnimations?.()??[])n.cancel(),n.play()}});const f=null!==p.value&&p.value.withMotion;return e("div",{ref:d,className:a("x4UOe",f&&"SGLj7",f&&Ke),children:e("div",{ref:u,className:a("_2hShs",f&&Ge[p.value?.from??"end"]),children:r})})}const yn=n=>e(g,{children:n});function _n({customizations:n,selectorShowsTiles:t}){return 0===n.length?null:e(s,{children:n.map(n=>"uiExtension"===n.kind?e(gn,{selectorShowsTiles:t,children:e(b,{extension:n.extension,render:yn})},n.extension.id):e(v,{field:n.field},n.field.key))})}const jn=l(function(){const{checkout:n,i18n:i,source:a,shop:l}=re(),{acceptTipPayments:u,discountCodesEnabled:m}=l,h=ve(),p=j(),f=m&&p.value;Ce(),function(){const{checkout:{negotiator:e}}=re(),{payment:n,directPaymentFieldsFilled:t}=e.context,{paymentLines:i,directPaymentErrors:a}=e.parts,s=Ee();r(()=>{const e=s.value||(r=a,Object.keys(r).filter(e=>"paymentMethodIdentifier"!==e).some(e=>null!=r[e].value));var r,o,c;n.value=(o=i.value,c=t.value,o.some(e=>"direct"!==e.method.type||Boolean(e.method.sessionId)||c)&&!e)})}();const b=y(),v=function(){const{checkout:e}=re(),{displayedPaymentMethods:n}=We({experienceType:"list"}),t=o(Ye(n)),i=y(),a=_(),s=qe(),r=an();return c(()=>{const n=null!==Qe(e.identity,r.value)||s.value.freeOrder||s.value.giftCard||s.value.storeCredit||s.value.redeemables,o=!a.value&&("inContext"===i.value||"afterPayment"===i.value);return e.configuration.visibility.showStoreCreditRedemption.value&&!n&&"singlePaymentMethodCreditCard"===t.value.mode&&o})}(),g=c(()=>n.configuration.visibility.showStoreCreditRedemption.value&&!v.value),R=k().value,T=w(),L=c(()=>function({identity:e}){switch(e.current.value){case"guest":case"customerAccount":case"shopPay":return!0;default:return!1}}({identity:n.identity})),E=T?.tippingPaymentAllowed??!0,I=!ce(a)&&u&&E&&n.configuration.visibility.showTips,D=c(()=>n.installments.isSupported.value),O=Pe(),N=Ie({showTips:I,billingFormPosition:b.value}),B=C("purchase.checkout.payment-method-list.render-before"),F=C("purchase.checkout.payment-method-list.render-after"),U=t(!1);return e(M,{target:"cart.paymentLines[0]",children:e(S,{accessibilityRole:"group",accessibilityLabelledBy:"payment",gap:"base",children:[e(kn,{}),e(A,{customizations:B}),e(en,{}),e(De,{}),e(d,{when:g,children:e(Se,{})}),e(d,{when:D,children:e(vn,{})}),e(x,{children:e(S,{gap:"large-300",children:[e(Re,{dynamicPaymentExtensions:N.shift()||[],children:[e(Te,{selectorShowsTiles:U,renderVaultingAgreementInline:!1,afterPaymentSelector:e(d,{when:O,children:e(ze,{})})}),e(d,{when:h,children:e(ge,{})}),e(_n,{customizations:F,selectorShowsTiles:U}),e(_n,{customizations:N.shift()||[],selectorShowsTiles:U}),e(d,{when:L,children:e(Ae,{})})]}),e(d,{when:v,children:e(Se,{})}),R&&e(Xe,{}),e(d,{when:n.configuration.visibility.showPurchaseOrderNumberField,children:e(Ze,{showHeading:!1})}),I&&e(s,{children:[e(P,{sectionId:"tips",children:e(xe,{})}),e(A,{customizations:N.shift()||[]})]}),e(A,{customizations:N.flat()}),f&&e(z,{targetSelector:'input[name="reductions"]',icon:"discount",label:i.translate("order_summary.discount_discovery.add_code")})]})})]})})});function kn(){const{router:n}=re(),t="payment",i=c(()=>Oe(n,t));return e(ye,{headingId:t,autoFocus:i.value})}function wn({href:n,children:t,onClick:i}){return e(R,{tone:"monochrome",href:n,onClick:i,children:t})}function Cn({onClick:n}){const{i18n:t}=re();return e(wn,{href:"https://www.shopify.com/legal/cookies",onClick:n,children:t.translate("user_consent.policy")})}function Sn({onClick:n}){const{i18n:t}=re();return e(wn,{href:"https://help.shop.app/en/shop/shopping/ads-personalization",onClick:n,children:t.translate("user_consent.detailed_view.learn_about_ads")})}function An({title:n,description:t,checked:i,onChange:a,disabled:s,badgeLabel:r}){const o=e(L,{children:t});return e(S,{gap:"small-200",children:[e(S,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(L,{type:"strong",children:n}),r?e(I,{color:"subdued",children:r}):null]}),e(D,{gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gap:"base",alignItems:"start",children:[o,e(un,{checked:i,onChange:a,disabled:s,accessibilityLabel:n})]})]})}function xn({open:n,onClose:t,onConsentSaved:i}){const{consentManager:a,i18n:s,shopPay:r}=re(),o=r.user.shopAccountUuid,c=o.value,l=a.trackingConsentSelection?.value,d=void 0!==l,[p,f]=u(!1),[b,v]=u(!1),[y,_]=u(!1),[j,k]=u(null),[w,C]=u(!1);m(()=>{if(!n)return;const e=a.trackingConsentSelection?.peek();f(e?.analytics??!1),v(e?.marketing??!1),_(!1),k(null),C(!1)},[a,c,n]),m(()=>{n&&!y&&l&&(f(l.analytics),v(l.marketing))},[y,n,l]);const A=h(async()=>
1{if(w||!d)return;const e=o.value;C(!0),k(null);const n=await a.setTrackingConsent({analytics:p,marketing:b});r.user.shopAccountUuid.value===e&&(n.success?(i?.(),t()):k(s.translate("user_consent.error_saving_consent")),C(!1))},[p,a,s,d,w,b,i,t,r,o]),x=s.translate("user_consent.detailed_view.description",{cookie_policy_href:e(Cn,{})}),P=e(g,{inlineSize:"@media (inline-size >= small) auto, 100%",children:e(T,{variant:"primary",onClick:A,inlineSize:"fill",loading:w||!d,disabled:w||!d,children:e(g,{minInlineSize:"100px",inlineAlignment:"center",children:e(L,{children:s.translate("user_consent.detailed_view.save")})})})});return e(mn,{heading:s.translate("user_consent.title"),accessibilityLabel:s.translate("user_consent.manage"),open:n,onHide:t,primaryAction:P,children:e(S,{gap:"base",children:[e(S,{gap:"small-200",children:[j&&e(E,{tone:"critical",children:j}),e(L,{children:x})]}),e(S,{gap:"base",children:[e(An,{title:s.translate("user_consent.detailed_view.necessary"),description:s.translate("user_consent.detailed_view.necessary_description"),checked:!0,disabled:!0,badgeLabel:s.translate("user_consent.detailed_view.required")}),e(An,{title:s.translate("user_consent.detailed_view.analytics"),description:s.translate("user_consent.detailed_view.analytics_description"),checked:p,onChange:e=>{f(e),_(!0)},disabled:w||!d}),e(An,{title:s.translate("user_consent.detailed_view.advertising"),description:s.translate("user_consent.detailed_view.advertising_description",{learn_about_ads_href:e(Sn,{})}),checked:b,onChange:e=>{v(e),_(!0)},disabled:w||!d})]})]})})}function Pn(){const{consentManager:a,i18n:r,mobileCheckoutSdk:o,observability:c,shopPay:l}=re(),p=l.user.shopAccountUuid,[f,b]=u(!1),[v,y]=u(null),[_,j]=u(p.value),k=t(!1),w=n(void 0);m(()=>{_!==p.value&&(j(p.value),k.value=!1,y(null))},[k,_,p.value]);const C=h(()=>{y(null),b(!0)},[]),A=h(()=>{b(!1)},[]),x=h(()=>{k.value=!0},[k]),P=h(async()=>{const e=p.value;y(null);const n=await a.acceptAll();l.user.shopAccountUuid.value===e&&(n.success?x():y(r.translate("user_consent.error_saving_consent")))},[x,r,l,p,a]),z=h(async()=>{const e=p.value;y(null);const n=await a.rejectAll();l.user.shopAccountUuid.value===e&&(n.success?x():y(r.translate("user_consent.error_saving_consent")))},[x,r,l,p,a]),M=x,R=_===p.value,T=R&&(a.shouldShowBanner.value||k.value),L=function(e,t){const a=n(null),s=n(e),r=n(!1),o=n(null);if(s.current&&!e&&"undefined"!=typeof document){const e=a.current,n=document.activeElement,t=e&&n instanceof HTMLElement&&e.contains(n),i=e&&B(e);r.current=Boolean(t),o.current=t&&i?F(i):null}return s.current=e,i(()=>{if(!r.current||!t)return;r.current=!1;const n=e?a.current&&U(a.current):o.current;o.current=null,n?.isConnected&&document.activeElement===document.body&&n.focus({preventScroll:!0})},[t,e]),a}(T,R),I=n(T);m(()=>{const e=!I.current&&T;if(I.current=T,e)return O({content:r.translate("user_consent.title")})},[r,T]),m(()=>{R&&w.current!==p.value&&(w.current=p.value,c.counter({name:"inline_user_consent_shown",value:1,attributes:{shown:T}}))},[R,T,p.value,c]);const D=e(S,{gap:"small-300",children:[v&&e(E,{tone:"critical",children:v}),e(d,{when:k,fallback:e(zn,{onAcceptAll:P,onManageCookiesClick:C,onRejectAll:z}),children:e(Mn,{onManageCookiesClick:C})})]}),V=e(xn,{open:f,onClose:A,onConsentSaved:M});if(!T)return null;const $=e(g,{ref:L,background:"subdued",borderRadius:"large",padding:"base",children:e(S,{gap:"base",accessibilityRole:"group",accessibilityLabel:r.translate("user_consent.title"),children:D})}),H=o.variant.isPartner();return e(s,{children:[!H&&e(g,{display:"@media (inline-size >= small) none, auto",children:e(N,{blockSize:"base"})}),$,V]})}function zn({onManageCookiesClick:n,onAcceptAll:t,onRejectAll:i}){const{i18n:a}=re(),[s,r]=u(null),o=null!==s,c=h(async()=>{o||(r("accept"),await t(),r(null))},[o,t]),l=h(async()=>{o||(r("reject"),await i(),r(null))},[o,i]);return e(S,{gap:"base",children:[e(L,{type:"strong",children:a.translate("user_consent.accelerated_view.title")}),e(V,{children:e(L,{children:a.translate("user_consent.accelerated_view.description",{cookie_policy_href:e(Cn,{})})})}),e(S,{direction:"inline",gap:"small-200",children:[e(T,{inlineAlignment:"center",onClick:c,size:"small",variant:"secondary",loading:"accept"===s,disabled:o,children:a.translate("user_consent.accelerated_view.accept_all")}),e(T,{inlineAlignment:"center",onClick:l,size:"small",variant:"secondary",loading:"reject"===s,disabled:o,children:a.translate("user_consent.accelerated_view.reject_all")}),e(T,{inlineAlignment:"center",onClick:n,size:"small",variant:"plain",textDecoration:"none",disabled:o,accessibilityLabel:a.translate("user_consent.manage"),children:a.translate("user_consent.accelerated_view.manage")})]})]})}function Mn({onManageCookiesClick:n}){const{i18n:t}=re();return e(g,{autoFocus:!0,children:e(L,{children:t.translate("user_consent.accelerated_view.consent_collected",{manage_cookies_href:e(Rn,{onManageCookiesClick:n})})})})}function Rn({onManageCookiesClick:n}){const{i18n:t}=re();return e(wn,{onClick:n,children:t.translate("user_consent.manage")})}wn.displayName="CookiesLink";const Tn=e=>(e=>"ShopCashCheckoutCashbackIncentive"===e.__typename)(e)&&e.expectedAmount.amount>0,Ln=e=>(e=>"ShopCashCheckoutFlatAmountCashbackIncentive"===e.__typename)(e)&&e.minimumOrderValueSatisfied,En="https://cdn.shopify.com/shop-assets/static_uploads/shop-cash/",In=`${En}checkout_banner_coin_light.png`,Dn=`${En}checkout_banner_coin_light_2x.png`,On=`${En}checkout_banner_coin_light_4x.png`,Nn=`${En}checkout_banner_coin_dark.png`,Bn=`${En}checkout_banner_coin_dark_2x.png`,Fn=`${En}checkout_banner_coin_dark_4x.png`,Un=({expectedAmount:n,incentives:t,i18n:i,darkMode:s,incentivePresentation:r})=>{const o=null!=n&&0!==n.amount,c=o?i.formatCurrency(n.amount,{currency:n.currencyCode}):"",l=o?(({i18n:e,incentives:n,formattedTotalAmount:t})=>
1{if(!n||0===n.length)return;const i=n.find(Tn),a=n.find(Ln),s=i?.displayName;if(i&&s&&a){const n=e.formatCurrency(i.expectedAmount.amount,{currency:i.expectedAmount.currencyCode}),r=e.formatCurrency(a.cashbackAmount.amount,{currency:a.cashbackAmount.currencyCode});return{title:e.translate("shop_cash.rewards_banner_title",{formattedAmount:t}),description:e.translate("shop_cash.reward_banner_description_combined_rewards",{promotionAmount:n,promotionDisplayName:s,offerAmount:r})}}if(i&&s&&!a){const n=e.formatCurrency(i.expectedAmount.amount,{currency:i.expectedAmount.currencyCode}),t=i.remainingRewardLimit?.amount===i.expectedAmount.amount;return{title:e.translate("shop_cash.reward_banner_title_with_promotion_attribution",{formattedAmount:n,promotionDisplayName:s}),description:t?e.translate("shop_cash.reward_banner_description_max"):void 0}}})({i18n:i,incentives:t,formattedTotalAmount:c}):void 0,d=o?l?.title??i.translate("shop_cash.rewards_banner_title",{formattedAmount:c}):"",u=l?.description,m=u?`${d} ${u}`:d,h=o&&(t?.some(e=>Ln(e)||Tn(e))??!1);if(Ne(r,"cashbackBanner",h?m:void 0),!o)return null;const p=s?Nn:In,f=s?Bn:Dn,b=s?Fn:On,v=a("F7fwo",s?"iJGCf":"gXkBh");return e(S,{direction:"inline",alignItems:"center",gap:"small-300",className:v,borderRadius:"large",children:[e($,{src:p,srcSet:`${p} 1x, ${f} 2x, ${b} 4x`,aspectRatio:"auto"}),u?e(S,{direction:"block",gap:"none",className:"VnjPc",children:[e(L,{children:d}),e(L,{type:"small",children:u})]}):e(L,{children:d})]})};function Vn(){const{i18n:n}=re(),t=Be(),{isEarningCashback:i,cashback:a,incentivePresentation:s}=sn();return i&&a?e(g,{children:[e(N,{blockSize:"large-200"}),e(Un,{expectedAmount:a.expectedAmount,incentives:a.incentives,i18n:n,darkMode:t,incentivePresentation:s})]}):null}function $n(){const{embed:n,router:t}=re(),i=t.currentUrl.value,{label:a}=H(),s=J({clearPii:!0}),r=G(),{isAppLayout:o}=K(),{progressing:c}=W(),{setEditorShopPay:l}=fn(),d=h(()=>{l?l(!1):c.value||s()},[l,c,s]);return r||n?.isCheckoutKit()||!o&&!le(i.search)?e(R,{onClick:d,textDecoration:"none",children:a}):null}function Hn(){const n=function(){const e=bn(),n=h(()=>{(e=>{de()?e.bridge.iframeClosed():window.close()})(e)},[e]);return n}(),t=ue(),i=Y({base:!0,small:!1}),a=me()&&(!t.value||(i??!1)),{i18n:s,shop:{name:r},shopPay:o}=re();if(!o.visibility.showReturnToStore)return null;if(!a)return null;const c=s.translate("shop_pay_external.return_to_store",{shopName:r});return e(S,{alignItems:"center",children:[e(N,{blockSize:"base"}),e(R,{onClick:n,children:c})]})}function Jn(){const{checkout:{identity:n},source:t,shopPay:i,mobileCheckoutSdk:a}=re(),{visibility:{showCheckoutAsGuestFeature:r}}=i;if("shopPay"!==n.current.value||!r)return null;const o="shopPayExternal"===t.type?e(Hn,{}):e($n,{}),c=a.variant.isPartner();return e(s,{children:[e(N,{blockSize:"large-100"}),e(g,{inlineAlignment:"center",children:o}),c?e(N,{blockSize:"base"}):e(g,{display:"@media (inline-size >= small) auto, none",children:e(N,{blockSize:"base"})})]})}const Gn=l(function({onReady:n,includeContactInVaultedExtensions:t,showMobileOrderSummary:i,showVaultedStateMarketingDisclosureBelowPayment:a,phoneMarketingPlacement:r,isSectionCustomized:l,showVaultedStateMarketingDisclosureOnMobile:u,expressCheckoutSlot:h,showVaultedCardConsentSpacing:f}){const b=q(),v=Q(),y=he(),_=pn(),{checkout:j,embed:k,i18n:x,mobileCheckoutSdk:z,source:M,shop:R,shopPay:T}=re(),L=X(),E=j.negotiator.current.fields.managedByMarketsPro,I=o(Y({base:!0,medium:!1})),D=ue(),O=Z(),B=c(()=>O.configurationSignal.value.main.spacing),F=c(()=>{const{position:e}=O.configurationSignal.value.reductions;return T.visibility.shouldRenderFloatingShopPayButton?"none":"base"===e?"large-200":i.value&&null!=B.value?pe(B.value)??"base":"base"}),{localizationExtensions:U}=j.negotiator.parts,V=c(()=>U.value.length>0),$=c(()=>f?.value&&!V.value?"large-200":"none"),H=Kn(I),J=c(()=>a.value&&!u.value&&(!I.value||!l.value)),G=c(()=>"belowPayment"===r.value),K=w(),W=o(K?.tippingPaymentAllowed??!0),se=c(()=>b.value.payment&&R.acceptTipPayments&&W.value&&j.configuration.visibility.showTips),oe=ee(),le=z.variant.isPartner(),de=c(()=>"shopPay"===j.identity.current.value&&"shopPayExternal"!==M.type&&""!==T.user.shopAccountUuid.value&&!ce(M)),me=e(d,{when:de,children:e(Pn,{})}),ve=c(()=>"thankYou"===L.value.currentDetour?.type?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render"),ge=C(ve.value,"ORDER_SUMMARY4"),ye=c(()=>"wallets"!==h.value&&Boolean(E.value)),Ce=Fe({includeContact:t}),Se=c(()=>!I.value&&!ce(M)&&se.value),Ae=c(()=>!I.value&&v.value&&Ce.value.length>0),Pe=c(()=>Se.value||Ae.value||ye.value);m(()=>{const e=setTimeout(n,0);return()=>clearTimeout(e)},[n]);const ze=R.hasFlagEnabled(fe),Me=e(d,{when:i,children:e(hn,{})}),Re=e(S,{gap:"base",children:[e(d,{when:Se,children:e(g,{display:"@media (inline-size >= medium) auto, none",children:e(P,{sectionId:"tips",children:[e(d,{when:()=>!l.value,children:e(N,{blockSize:"large-300"})}),e(xe,{})]})})}),e(d,{when:Ae,children:e($e,{extensions:Ce})}),e(d,{when:ye,children:e(S,{gap:"base",padding:"@media (inline-size >= medium) large-400 none none none, none",children:e(ke,{textProps:{color:"subdued",size:"small"}})})})]});return e(s,{children:e(on,{min:"medium",accessibilityLabel:x.translate("payment.title"),hideDivider:!0,children:[e(d,{when:()=>!b.value.payment,children:e(s,{children:[e(ne,{section:"payment",children:e(te,{section:"payment",children:e(on,{max:"medium",accessibilityLabel:x.translate("payment.title"),children:e(jn,{})})})}),e(d,{when:j.configuration.visibility.showCashRedemption,children:e(Ue,{})}),e(Ve,{})]})}),e(d,{when:V,children:e(cn,{accessibilityLabel:x.translate("localized_fields.additional_information.title"),children:e(S,{gap:"base",padding:"@media (inline-size >= medium) large-400 none none none, none",children:[e(ie,{level:2,children:x.translate("localized_fields.additional_information.title")}),e(p,{each:U,children:(n,t)=>e(_e,{localizationExtension:n,index:t})})]})})}),e(d,{when:()=>I.value&&!ce(M)&&se.value,children:e(g,{display:"@media (inline-size >= medium) none, auto",children:[e(P,{sectionId:"tips",children:e(xe,{renderInSection:I})}),e(d,{when:()=>!k?.isFlagshipPartner,children:e(ln,{spacing:pe(B.value)})})]})}),e(d,{when:()=>I.value&&v.value&&Ce.value.length,children:e($e,{extensions:Ce,hideDivider:"whenEmpty"})}),e(ne,{section:"summary",children:e(te,{section:"summary",children:e("div",{ref:H,children:[e(dn,{target:"mobileOrderSummary",children:e(on,{max:"medium",hideDivider:!0,children:[e(d,{when:()=>!0===I.value,children:e(je,{})}),e(He,{showEmailMarketingOptIn:J,showPhoneMarketingOptIn:G,paddingBlockStart:$}),!ze&&Me,e(S,{gap:F.value,"data-testid":"onepage-pay-button-cluster",children:[ze?e(s,{children:[Me,e(d,{when:Pe,children:Re})]}):Re,e(d,{when:()=>!0!==I.value,children:e(je,{})}),e(S,{gap:"large-200",children:[e(d,{when:_,children:e(be,{})}),e(d,{when:y,children:e(rn,{placement:"above-pay-button"})}),e(we,{buttonHidden:oe}),e(d,{when:y,children:e(rn,{placement:"default"})}),e(d,{when:()=>!D.value||I.value,children:e(ae,{above:"medium",children:e(A,{customizations:ge,gap:"large-200"})})})]})]}),e(d,{when:j.configuration.visibility.showShopCashRewardsBanner,children:e(Vn,{})}),le?null:e(s,{children:[e(Jn,{}),me]})]})}),le?e(s,{children:[e(Jn,{}),me]}):null]})})})]})})});function Kn(e){const{setTriggerNode:n}=se("chat"),i=t(null);return r(()=>{n(e.value?i.value:null)}),h(e=>{i.value=e},[i])}export{Gn as default,Kn as useChatHideTriggerRef};
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.