https://dakotawatch.com/cdn/shopifycloud/checkout-web/assets/c1/page-BelowTheFoldContent.DDlj6lfz.js
1import{u as e,A as M,e as X,_ as ne,g as te,S as R,o as Ee,l as ae,f as y,Q as xe,i as d,k as L,h as D,q as I,p as Je}from"./esnext-vendor.BDPAaZdq.js";import{f9 as Ze,fa as en,fb as nn,B as T,dk as Ie,d2 as tn,df as an,d as on,f as Me,v as oe,c as g,U as j,a3 as sn,dg as se,dh as rn,cU as cn,L as re,l as W,o as B,W as Be,fc as ln,F as un,a as dn,a_ as hn,aY as mn,aZ as pn,P as gn,cB as yn,b as H,fd as fn,ec as vn,fe as bn,bw as Cn,h as Sn,a6 as Te,dm as _n,ff as kn,e as Pn,a8 as wn,e8 as An,V as ve,X as be,H as En,n as xn,es as In}from"./hydrate.B0xlt2dG.js";import{aS as Re,Q as Le,O as S,a$ as Y,eH as Fe,eI as Mn,an as Bn,ad as Ue,bA as Tn,a7 as Rn,P as Ln,ab as Ce,a8 as Fn}from"./hooks-useReplaceShopPayInHistory.C8UL-mAH.js";import{C as Un}from"./Captcha.DnnR7xVp.js";import{u as On,S as Dn,P as Hn,L as Nn,R as Se}from"./RememberMeSection.BvcUNZhk.js";import{M as zn}from"./hooks-useShopPayNewSignupLoginExperiment.CrD2gvGR.js";import{MobileOrderSummary as Gn}from"./component-MobileOrderSummary.CzliEH0d.js";import{P as Vn}from"./PayButtonSection.BwBoy3DX.js";import{u as $n,e as _e,G as Kn,T as ie}from"./components-useVaultedMsiInstallments.Br5peiWP.js";import{a as jn,b as Wn,H as Yn}from"./StickyPayButton-StickyPayButton.module.C1AAyg_x.js";import{a as Xn,W as Qn,P as qn}from"./PaymentOptionSelector.CeDw_6xX.js";import{f as Jn,g as Zn,h as et,j as nt,L as tt,k as at,l as ot,m as st,n as it,o as rt,U as ct,V as ke,P as lt}from"./OnePage.h2sKDhjN.js";import{y as ut,z as dt,E as ht,u as mt,a as pt,b as gt,g as yt,V as ft,e as vt}from"./components-PaymentMethodProgressionHost.BmXVNMRw.js";import{P as bt}from"./PaymentErrorBanner.CHfgrXa-.js";import{c as Ct,d as St}from"./app.D1P6yWfp.js";import{a as _t,b as kt}from"./money-toShopPayMoneyInput.-nuohgDW.js";import{P as Pe}from"./hooks-useWalletsTimeout.i08rvNYN.js";import{b as J,c as Pt,S as wt}from"./Section._KuAKpGQ.js";import{S as At}from"./Section-SectionStyleOverride.CP0VFRId.js";import{S as Et}from"./Switch.BG-32C8R.js";import{O as xt}from"./hooks-useShopPayProgressIntercepts.Sxhi7oHx.js";import{u as It}from"./PaymentButtons.bhaFVFMx.js";import{v as Mt}from"./components-VatNumberValidationField.mzwVZP7U.js";import{u as Bt}from"./hooks-useShopPayExternalAppContext.DyGXtar4.js";import"./helpers-getNormalizedPaymentMethodName.B-mE5wnL.js";import"./shared-permissions.BaDWlj5_.js";import"./ShopPayCaptcha.CPpzhmEJ.js";import"./amazon-pay-useAmazonPayPaymentLine.BXwZMsYY.js";import"./ChangeCompanyLocationLink.Ci5U9F_D.js";import"./BillingAddressForm.aTSlVDrG.js";import"./FormLayout.CMVyKzjL.js";import"./PhoneField.ykPh8SPx.js";import"./hooks-useSuppressShopPayModalOnLoad.brztd70E.js";
1import"./Popover.BUTwaoOa.js";import"./AddressPresenter.B0qw2vWQ.js";import"./Choice.BIzIW4rp.js";import"./Checkbox.CiixBh9Z.js";import"./hooks-useShowShopPayOptin.DZ4Mf9YD.js";import"./TransitionHeight.M5zGQYzu.js";import"./hooks-useShouldRevealCustomization.wOAvQfO_.js";import"./hooks-useShowMobileOrderSummary.DmZ0FrVc.js";import"./styles-floating-layer.module.BOdGEzlq.js";import"./localization-index.Bo8bPuxq.js";import"./helpers-credit-card-disabled.BnSr1GsQ.js";import"./addresses-is-address-empty.Ch6V3XcM.js";import"./utils-useViolationsHandler.Dq-z56H5.js";import"./ShopPayLogo.Cut4IRi6.js";import"./useShopPayButtonClassName.nv37ytUz.js";import"./PayButton-helpers.Dg5kgVMm.js";import"./graphql-PaymentSessionMutation.BhOnX3QJ.js";import"./NotFound.DKjZape6.js";import"./ImpressionEventCapture.iMEQlBKs.js";import"./PaymentIcon.CQXs-ePm.js";import"./PaymentLine.BkPc0Zsc.js";import"./EmptyState.b83C9ddY.js";import"./hooks-useUpdateCheckoutAddress.xu8w67CI.js";import"./helpers-derivations.DLW2fhKL.js";import"./shop-pay-normalizeBuyerDetails.ThnUnxcv.js";import"./checkout-updaters-helpers.BAeH3ddd.js";import"./helpers-setAddressErrors.BA8OjimY.js";import"./hooks-payment-button.DClnUefe.js";import"./hooks-useGeneralPaymentErrorMessage.Zl8_48Ok.js";import"./BillingAddressSelector.5rPdOC_H.js";import"./shop-pay-installments-monorail.D0Myc1k_.js";import"./hooks-useStableHostMethodsReferences.DLE4q0sj.js";import"./Rollup.iQVJ47hC.js";import"./utilities-stable-ref.Dvd2X3ul.js";import"./redemption-promotions.CgqGtCd-.js";import"./hooks-usePreselectSpi.B-sbpaU9.js";import"./utilities-publishMessage.BORnEDuA.js";import"./useAddressMutationsWithNegotiation.BfzEjUy6.js";import"./cross-border-hooks.DVubeg9N.js";import"./Middot.BWQejzCr.js";import"./EstimatedDeliveryContent.C1e3pn_u.js";import"./shipping-methods-consolidated-included.DWdbzJpL.js";import"./ShippingLines.BkfCgQnP.js";import"./PendingShipping.2eopPL-C.js";import"./ShipmentBreakdown.C6RgvF4c.js";import"./MerchandiseModal.WyfeQS3f.js";import"./ShippingMethodSelector.ByEQiDBW.js";import"./TextArea.C0R8_jwI.js";import"./SubscriptionPriceBreakdown.DYrSBpqu.js";import"./hooks-useForceShopPayUrl.F3deeEs7.js";import"./hooks-usePostPurchase.BPY08f0g.js";import"./StockProblems-StockProblemsLineItemList.Cyf0iJV_.js";import"./MissingFields.DB7ri4eR.js";import"./components-RedirectionNotice.module.BGJWZ6-9.js";import"./hooks-useHasOrdersFromMultipleShops.C_XGQrjx.js";import"./hooks-useWalletsMonorailTrack.CvfUTPBc.js";import"./AutocompleteField-hooks.D2O1AcIY.js";function Tt(){const n=Ze();return Jn({ineligibilityReasonLabel:n}),e(Xn,{ineligibilityReason:n})}const Rt="x4UOe",Lt="SGLj7",Ft="_2hShs",Z={Slot:Rt,ClippingSlot:Lt,Content:Ft};function Ut({selectorShowsTiles:n,children:t}){const{buyerHasActedSignal:s}=Re(),o=ut(),i=M(null),a=M(null),r=M(!1),u=M(!1),c=X(null);u.current=n.value&&s.value,ne(()=>{const m=a.current;if(!m||typeof MutationObserver>"u")return;const h=new MutationObserver(b=>{if(!m.hasChildNodes()){r.current=!1,c.value=null;return}!b.some(v=>v.addedNodes.length>0)||!u.current||!Ct()||(r.current=!0,c.value={from:St(),withMotion:o.loaded})});return h.observe(m,{childList:!0,subtree:!0}),()=>h.disconnect()},[c,o]),ne(()=>{if(r.current){r.current=!1;for(const m of[i.current,a.current])for(const h of m?.getAnimations?.()??[])h.cancel(),h.play()}});const l=c.value!==null&&c.value.withMotion;return e("div",{ref:i,className:te(Z.Slot,l&&Z.ClippingSlot,l&&ht),children:e("div",{ref:a,className:te(Z.Content,l&&dt[c.value?.from??"end"]),children:t})})}const Ot=n=>e(T,{children:n});function we({customizations:n,selectorShowsTiles:t}){return n.length===0?null:e(R,{children:n.map(s=>s.kind==="uiExtension"?e(Ut,{selectorShowsTiles:t,children:e(en,{extension:s.extension,render:Ot})},s.extension.id):e(nn,{field:s.field},s.field.key))})}function Dt(){const{payment:n,directPaymentFieldsFilled:t}=Re(),{paymentLines:s,directPaymentErrors:o}=Le(),i=Zn();Ee(()=>{const a=i.value||Nt(o);n.value=Ht(s.value,t.value)&&!a})}function Ht(n,t){return n.some(s=>s.method.type==="direct"?!!s.method.sessionId||t:!0)}function Nt(n){return Object.keys(n).filter(t=>t!=="paymentMethodIdentifier").some(t=>n[t].value!=null)}function zt(){const{checkout:n}=S(),{displayedPaymentMethods:t}=mt({experienceType:"list"}),s=ae(pt(t)),o=Ie(),i=tn(),a=gt(),r=_t();return y(()=>{const u=yt(n.identity,r.value)!==null||a.value.freeOrder||a.value.giftCard||a.value.storeCredit||a.value.redeemables,c=!i.value&&(o.value==="inContext"||o.value==="afterPayment");return n.configuration.visibility.showStoreCreditRedemption.value&&!u&&s.value.mode==="singlePaymentMethodCreditCard"&&c})}const Gt=xe(function(){const{checkout:t,i18n:s,source:o,shop:i}=S(),{acceptTipPayments:a,discountCodesEnabled:r}=i,u=On(),c=an(),l=r&&c.value;$n(),Dt();const m=Ie(),h=zt(),b=y(()=>t.configuration.visibility.showStoreCreditRedemption.value&&!h.value),f=on().value,v=Me(),E=y(()=>$t({identity:t.identity})),_=v?.tippingPaymentAllowed??!0,k=!Y(o)&&a&&_&&t.configuration.visibility.showTips,C=jn();et();const x=y(()=>t.installments.isSupported.value&&!C),F=Wn(),w=nt({showTips:k,billingFormPosition:m.value}),A=oe("purchase.checkout.payment-method-list.render-before"),P=oe("purchase.checkout.payment-method-list.render-after"),p=X(!1);return e(cn,{target:"cart.paymentLines[0]",children:e(g,{accessibilityRole:"group",accessibilityLabelledBy:"payment",gap:"base",children:[e(Vt,{}),e(j,{customizations:A}),e(bt,{}),e(tt,{}),e(d,{when:b,children:e(_e,{})}),e(d,{when:x,children:e(Tt,{})}),e(sn,{children:e(g,{gap:"large-300",children:[e(Qn,{dynamicPaymentExtensions:w.shift()||[],children:[e(qn,{selectorShowsTiles:p,renderVaultingAgreementInline:!1,afterPaymentSelector:e(d,{when:F,children:e(Yn,{})})}),e(d,{when:u,children:e(Dn,{})}),e(we,{customizations:P,selectorShowsTiles:p}),e(we,{customizations:w.shift()||[],selectorShowsTiles:p}),e(d,{when:E,children:e(Kn,{})})]}),e(d,{when:h,children:e(_e,{})}),f&&e(ft,{}),e(d,{when:t.configuration.visibility.showPurchaseOrderNumberField,children:e(vt,{showHeading:!1})}),k&&e(R,{children:[e(se,{sectionId:"tips",children:e(ie,{})}),e(j,{customizations:w.shift()||[]})]}),e(j,{customizations:w.flat()}),l&&e(rn,{targetSelector:'input[name="reductions"]',icon:"discount",label:s.translate("order_summary.discount_discovery.add_code")})]})})]})})});function Vt(){const{router:n}=S(),t="payment",s=y(()=>at(n,t));return e(Hn,{headingId:t,autoFocus:s.value})}function $t({identity:n}){switch(n.current.value){case"guest":case"customerAccount":case"shopPay":return!0;default:return!1}}const Kt="https://www.shopify.com/legal/cookies",jt="https://help.shop.app/en/shop/shopping/ads-personalization";function Q({href:n,children:t,onClick:s}){return e(re,{tone:"monochrome",href:n,onClick:s,children:t})}Q.displayName="CookiesLink";function Oe({onClick:n}){const{i18n:t}=S();return e(Q,{href:Kt,onClick:n,children:t.translate("user_consent.policy")})}function Wt({onClick:n}){const{i18n:t}=S();return e(Q,{href:jt,onClick:n,children:t.translate("user_consent.detailed_view.learn_about_ads")})}function ee({title:n,description:t,checked:s,onChange:o,disabled:i,badgeLabel:a}){return e(g,{gap:"small-200",children:[e(g,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(B,{type:"strong",children:n}),a?e(ln,{color:"subdued",children:a}):null]}),e(un,{gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gap:"base",alignItems:"start",children:[e(B,{
1children:t}),e(Et,{checked:s,onChange:o,disabled:i,accessibilityLabel:n})]})]})}function Yt({open:n,onClose:t,onConsentSaved:s}){const{consentManager:o,i18n:i,shopPay:a}=S(),r=a.user.shopAccountUuid,u=r.value,c=o.trackingConsentSelection?.value,l=c!==void 0,[m,h]=L(!1),[b,f]=L(!1),[v,E]=L(!1),[_,k]=L(null),[C,x]=L(!1);D(()=>{if(!n)return;const P=o.trackingConsentSelection?.peek();h(P?.analytics??!1),f(P?.marketing??!1),E(!1),k(null),x(!1)},[o,u,n]),D(()=>{!n||v||!c||(h(c.analytics),f(c.marketing))},[v,n,c]);const F=I(async()=>{if(C||!l)return;const P=r.value;x(!0),k(null);const p=await o.setTrackingConsent({analytics:m,marketing:b});a.user.shopAccountUuid.value===P&&(p.success?(s?.(),t()):k(i.translate("user_consent.error_saving_consent")),x(!1))},[m,o,i,l,C,b,s,t,a,r]),w=i.translate("user_consent.detailed_view.description",{cookie_policy_href:e(Oe,{})}),A=e(T,{inlineSize:"@media (inline-size >= small) auto, 100%",children:e(W,{variant:"primary",onClick:F,inlineSize:"fill",loading:C||!l,disabled:C||!l,children:e(T,{minInlineSize:"100px",inlineAlignment:"center",children:e(B,{children:i.translate("user_consent.detailed_view.save")})})})});return e(xt,{heading:i.translate("user_consent.title"),accessibilityLabel:i.translate("user_consent.manage"),open:n,onHide:t,primaryAction:A,children:e(g,{gap:"base",children:[e(g,{gap:"small-200",children:[_&&e(Be,{tone:"critical",children:_}),e(B,{children:w})]}),e(g,{gap:"base",children:[e(ee,{title:i.translate("user_consent.detailed_view.necessary"),description:i.translate("user_consent.detailed_view.necessary_description"),checked:!0,disabled:!0,badgeLabel:i.translate("user_consent.detailed_view.required")}),e(ee,{title:i.translate("user_consent.detailed_view.analytics"),description:i.translate("user_consent.detailed_view.analytics_description"),checked:m,onChange:P=>{h(P),E(!0)},disabled:C||!l}),e(ee,{title:i.translate("user_consent.detailed_view.advertising"),description:i.translate("user_consent.detailed_view.advertising_description",{learn_about_ads_href:e(Wt,{})}),checked:b,onChange:P=>{f(P),E(!0)},disabled:C||!l})]})]})})}function Xt(){const{consentManager:n,i18n:t,observability:s,shop:o,shopPay:i}=S(),a=i.user.shopAccountUuid,[r,u]=L(!1),[c,l]=L(null),m=o.hasFlagEnabled(Fe),[h,b]=L(a.value),f=X(!1),v=M(void 0);D(()=>{h!==a.value&&(b(a.value),f.value=!1,l(null))},[f,h,a.value]);const E=I(()=>{l(null),u(!0)},[]),_=I(()=>{u(!1)},[]),k=I(()=>{f.value=!0},[f]),C=I(async()=>{const U=a.value;l(null);const O=await n.acceptAll();if(i.user.shopAccountUuid.value===U){if(!O.success){l(t.translate("user_consent.error_saving_consent"));return}k()}},[k,t,i,a,n]),x=I(async()=>{const U=a.value;l(null);const O=await n.rejectAll();if(i.user.shopAccountUuid.value===U){if(!O.success){l(t.translate("user_consent.error_saving_consent"));return}k()}},[k,t,i,a,n]),F=k,w=h===a.value,A=m&&w&&(n.shouldShowBanner.value||f.value),P=Qt(A,w),p=M(A);D(()=>{const U=!p.current&&A;if(p.current=A,!!U)return dn({content:t.translate("user_consent.title")})},[t,A]),D(()=>{!w||v.current===a.value||(v.current=a.value,s.counter({name:"inline_user_consent_shown",value:1,attributes:{shown:A}}))},[w,A,a.value,s]);const q=e(g,{gap:"small-300",children:[c&&e(Be,{tone:"critical",children:c}),e(d,{when:f,fallback:e(qt,{onAcceptAll:C,onManageCookiesClick:E,onRejectAll:x}),children:e(Jt,{onManageCookiesClick:E})})]}),V=e(Yt,{open:r,onClose:_,onConsentSaved:F});if(!A)return null;const z=e(T,{ref:P,background:"subdued",borderRadius:"large",padding:"base",children:e(g,{gap:"base",accessibilityRole:"group",accessibilityLabel:t.translate("user_consent.title"),children:q})});return e(R,{children:[z,V]})}function Qt(n,t){const s=M(null),o=M(n),i=M(!1),a=M(null);if(o.current&&!n&&typeof document<"u"){const r=s.current,u=document.activeElement,c=r&&u instanceof HTMLElement&&r.contains(u),l=r&&hn(r);i.current=!!c,a.current=c&&l?mn(l):null}return o.current=n,ne(()=>{if(!i.current||!t)return;i.current=!1;const r=n?s.current&&pn(s.current):a.current;a.current=null,r?.isConnected&&document.activeElement===document.body&&r.focus({preventScroll:!0})},[t,n]),s}function qt({onManageCookiesClick:n,onAcceptAll:t,onRejectAll:s}){const{i18n:o}=S(),[i,a]=L(null),r=i!==null,u=I(async()=>{r||(a("accept"),await t(),a(null))},[r,t]),c=I(async()=>{r||(a("reject"),await s(),a(null))},[r,s]);return e(g,{gap:"base",children:[e(B,{type:"strong",children:o.translate("user_consent.accelerated_view.title")}),e(gn,{children:e(B,{children:o.translate("user_consent.accelerated_view.description",{cookie_policy_href:e(Oe,{})})})}),e(g,{direction:"inline",gap:"small-200",children:[e(W,{inlineAlignment:"center",onClick:u,size:"small",variant:"secondary",loading:i==="accept",disabled:r,children:o.translate("user_consent.accelerated_view.accept_all")}),e(W,{inlineAlignment:"center",onClick:c,size:"small",variant:"secondary",loading:i==="reject",disabled:r,children:o.translate("user_consent.accelerated_view.reject_all")}),e(W,{inlineAlignment:"center",onClick:n,size:"small",variant:"plain",textDecoration:"none",disabled:r,accessibilityLabel:o.translate("user_consent.manage"),children:o.translate("user_consent.accelerated_view.manage")})]})]})}function Jt({onManageCookiesClick:n}){const{i18n:t}=S();return e(T,{autoFocus:!0,children:e(B,{children:t.translate("user_consent.accelerated_view.consent_collected",{manage_cookies_href:e(Zt,{onManageCookiesClick:n})})})})}function Zt({onManageCookiesClick:n}){const{i18n:t}=S();return e(Q,{onClick:n,children:t.translate("user_consent.manage")})}const ea=({i18n:n,incentives:t,formattedTotalAmount:s})=>{if(!t||t.length===0)return;const o=t.find(De),i=t.find(He),a=o?.displayName;if(o&&a&&i){const r=n.formatCurrency(o.expectedAmount.amount,{currency:o.expectedAmount.currencyCode}),u=n.formatCurrency(i.cashbackAmount.amount,{currency:i.cashbackAmount.currencyCode});return{title:n.translate("shop_cash.rewards_banner_title",{formattedAmount:s}),description:n.translate("shop_cash.reward_banner_description_combined_rewards",{promotionAmount:r,promotionDisplayName:a,offerAmount:u})}}if(o&&a&&!i){const r=n.formatCurrency(o.expectedAmount.amount,{currency:o.expectedAmount.currencyCode}),u=o.remainingRewardLimit?.amount===o.expectedAmount.amount;return{title:n.translate("shop_cash.reward_banner_title_with_promotion_attribution",{formattedAmount:r,promotionDisplayName:a}),description:u?n.translate("shop_cash.reward_banner_description_max"):void 0}}},na=n=>n.__typename==="ShopCashCheckoutCashbackIncentive",De=n=>na(n)&&n.expectedAmount.amount>0,ta=n=>n.__typename==="ShopCashCheckoutFlatAmountCashbackIncentive",He=n=>ta(n)&&n.minimumOrderValueSatisfied,aa="F7fwo",oa="VnjPc",sa="gXkBh",ia="iJGCf",K={ShopCashCashbackBanner:
1aa,ShopCashCashbackBannerText:oa,ShopCashCashbackBannerLight:sa,ShopCashCashbackBannerDark:ia},N="https://cdn.shopify.com/shop-assets/static_uploads/shop-cash/",ra=`${N}checkout_banner_coin_light.png`,ca=`${N}checkout_banner_coin_light_2x.png`,la=`${N}checkout_banner_coin_light_4x.png`,ua=`${N}checkout_banner_coin_dark.png`,da=`${N}checkout_banner_coin_dark_2x.png`,ha=`${N}checkout_banner_coin_dark_4x.png`,ma=({expectedAmount:n,incentives:t,i18n:s,darkMode:o,incentivePresentation:i})=>{const a=n!=null&&n.amount!==0,r=a?s.formatCurrency(n.amount,{currency:n.currencyCode}):"",u=a?ea({i18n:s,incentives:t,formattedTotalAmount:r}):void 0,c=a?u?.title??s.translate("shop_cash.rewards_banner_title",{formattedAmount:r}):"",l=u?.description,m=l?`${c} ${l}`:c,h=a&&(t?.some(_=>He(_)||De(_))??!1);if(ot(i,"cashbackBanner",h?m:void 0),!a)return null;const b=o?ua:ra,f=o?da:ca,v=o?ha:la,E=te(K.ShopCashCashbackBanner,o?K.ShopCashCashbackBannerDark:K.ShopCashCashbackBannerLight);return e(g,{direction:"inline",alignItems:"center",gap:"small-300",className:E,borderRadius:"large",children:[e(yn,{src:b,srcSet:`${b} 1x, ${f} 2x, ${v} 4x`,aspectRatio:"auto"}),l?e(g,{direction:"block",gap:"none",className:K.ShopCashCashbackBannerText,children:[e(B,{children:c}),e(B,{type:"small",children:l})]}):e(B,{children:c})]})};function pa(){const{i18n:n}=S(),t=st(),{isEarningCashback:s,cashback:o,incentivePresentation:i}=kt();return!s||!o?null:e(T,{children:[e(H,{blockSize:"large-200"}),e(ma,{expectedAmount:o.expectedAmount,incentives:o.incentives,i18n:n,darkMode:t,incentivePresentation:i})]})}function ga(){const{embed:n,router:t}=S(),s=t.currentUrl.value,{label:o}=fn(),i=vn({clearPii:!0}),a=bn(),{isAppLayout:r}=Cn(),{progressing:u}=Sn(),{setEditorShopPay:c}=Mt(),l=I(()=>{if(c){c(!1);return}u.value||i()},[c,u,i]);return a||n?.isCheckoutKit()||!(r||Mn(s.search))?e(re,{onClick:l,textDecoration:"none",children:o}):null}const ya=n=>Bn()?n.bridge.iframeClosed():window.close();function fa(){const n=Bt();return I(()=>{ya(n)},[n])}function va(){const n=fa(),t=Ue(),s=Te({base:!0,small:!1}),o=Tn()&&(t.value?s??!1:!0),{i18n:i,shop:{name:a},shopPay:r}=S();if(!r.visibility.showReturnToStore||!o)return null;const u=i.translate("shop_pay_external.return_to_store",{shopName:a});return e(g,{alignItems:"center",children:[e(H,{blockSize:"base"}),e(re,{onClick:n,children:u})]})}function Ae(){const{checkout:{identity:n},source:t,shopPay:s,mobileCheckoutSdk:o}=S(),{visibility:{showCheckoutAsGuestFeature:i}}=s;if(n.current.value!=="shopPay"||!i)return null;const a=t.type==="shopPayExternal"?e(va,{}):e(ga,{}),r=o.variant.isPartner();return e(R,{children:[e(H,{blockSize:"large-100"}),e(T,{inlineAlignment:"center",children:a}),r?e(H,{blockSize:"base"}):e(T,{display:"@media (inline-size >= small) auto, none",children:e(H,{blockSize:"base"})})]})}const as=xe(function({onReady:t,includeContactInVaultedExtensions:s,showMobileOrderSummary:o,showVaultedStateMarketingDisclosureBelowPayment:i,phoneMarketingPlacement:a,isSectionCustomized:r,showVaultedStateMarketingDisclosureOnMobile:u,expressCheckoutSlot:c,showVaultedCardConsentSpacing:l}){const m=_n(),h=kn(),b=Rn(),f=It(),{checkout:v,embed:E,i18n:_,mobileCheckoutSdk:k,source:C,shop:x,shopPay:F}=S(),w=Pn(),P=Ln().managedByMarketsPro,p=ae(Te({base:!0,medium:!1})),q=Ue(),V=wn(),z=y(()=>V.configurationSignal.value.main.spacing),U=y(()=>{const{position:G}=V.configurationSignal.value.reductions;return F.visibility.shouldRenderFloatingShopPayButton?"none":G==="base"?"large-200":o.value&&z.value!=null?Ce(z.value)??"base":"base"}),{localizationExtensions:O}=Le(),ce=y(()=>O.value.length>0),Ne=y(()=>l?.value&&!ce.value?"large-200":"none"),ze=ba(p),Ge=y(()=>i.value&&!u.value&&(!p.value||!r.value)),Ve=y(()=>a.value==="belowPayment"),$e=Me(),Ke=ae($e?.tippingPaymentAllowed??!0),le=y(()=>m.value.payment&&x.acceptTipPayments&&Ke.value&&v.configuration.visibility.showTips),je=An(),ue=k.variant.isPartner(),We=y(()=>x.hasFlagEnabled(Fe)&&v.identity.current.value==="shopPay"&&C.type!=="shopPayExternal"&&F.user.shopAccountUuid.value!==""&&!Y(C)),de=e(d,{when:We,children:e(Xt,{})}),Ye=y(()=>w.value.currentDetour?.type==="thankYou"?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render"),Xe=oe(Ye.value,"ORDER_SUMMARY4"),he=y(()=>c.value!=="wallets"&&!!P.value),$=it({includeContact:s}),me=y(()=>!p.value&&!Y(C)&&le.value),pe=y(()=>!p.value&&h.value&&$.value.length>0),Qe=y(()=>me.value||pe.value||he.value);D(()=>{const G=setTimeout(t,0);return()=>clearTimeout(G)},[t]);const ge=x.hasFlagEnabled(Fn),ye=e(d,{when:o,children:e(Gn,{})}),fe=e(g,{gap:"base",children:[e(d,{when:me,children:e(T,{display:"@media (inline-size >= medium) auto, none",children:e(se,{sectionId:"tips",children:[e(d,{when:()=>!r.value,children:e(H,{blockSize:"large-300"})}),e(ie,{})]})})}),e(d,{when:pe,children:e(ke,{extensions:$})}),e(d,{when:he,children:e(g,{gap:"base",padding:"@media (inline-size >= medium) large-400 none none none, none",children:e(zn,{textProps:{color:"subdued",size:"small"}})})})]});return e(R,{children:e(J,{min:"medium",accessibilityLabel:_.translate("payment.title"),hideDivider:!0,children:[e(d,{when:()=>!m.value.payment,children:e(R,{children:[e(ve,{section:"payment",children:e(be,{section:"payment",children:e(J,{max:"medium",accessibilityLabel:_.translate("payment.title"),children:e(Gt,{})})})}),e(d,{when:v.configuration.visibility.showCashRedemption,children:e(rt,{})}),e(ct,{})]})}),e(d,{when:ce,children:e(Pt,{accessibilityLabel:_.translate("localized_fields.additional_information.title"),children:e(g,{gap:"base",padding:"@media (inline-size >= medium) large-400 none none none, none",children:[e(En,{level:2,children:_.translate("localized_fields.additional_information.title")}),e(Je,{each:O,children:(G,qe)=>e(Nn,{localizationExtension:G,index:qe})})]})})}),e(d,{when:()=>p.value&&!Y(C)&&le.value,children:e(T,{display:"@media (inline-size >= medium) none, auto",children:[e(se,{sectionId:"tips",children:e(ie,{renderInSection:p})}),e(d,{when:()=>!E?.isFlagshipPartner,children:e(wt,{spacing:Ce(z.value)})})]})}),e(d,{when:()=>p.value&&h.value&&$.value.length,children:e(ke,{extensions:$,hideDivider:"whenEmpty"})}),e(ve,{section:"summary",children:e(be,{section:"summary",children:e("div",{ref:ze,children:[e(At,{target:"mobileOrderSummary",children:e(J,{max:"medium",hideDivider:!0,children:[e(d,{when:()=>p.value===!0,children:e(Se,{})}),e(lt,{showEmailMarketingOptIn:Ge,showPhoneMarketingOptIn:Ve,paddingBlockStart:Ne}),!ge&&ye,e(g,{gap:U.value,"data-testid":"onepage-pay-button-cluster",children:[ge?e(R,{children:[ye,e(d,{when:Qe,children:fe})]}):fe,e(d,{when:()=>p.value!==!0,children:e(Se,{})}),e(g,{gap:"large-200",children:[e(d,{when:f,children:e(Un,{})}),e(d,{when:b,children:e(Pe,{placement:"above-pay-button"})}),e(Vn,{buttonHidden:je}),e(d,{when:b,children:e(Pe,{placement:"default"})}),e(d,{when:()=>!q.value||p.value,children:e(xn,{above:"medium",children:e(j,{customizations:Xe,gap:"large-200"})})})]})]}),e(d,{when:v.configuration.visibility.showShopCashRewardsBanner,children:e(pa,{})}),ue?null:e(R,{children:[e(Ae,{}),de]})]})}),ue?e(R,{children:[e(Ae,{}),de]}):null]})})})]})})});function ba(n){const{setTriggerNode:t}=In("chat"),s=X(null);return Ee(()=>{t(n.value?s.value:null)}),I(o=>{s.value=o},[s])}export{as as default,ba 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.