var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-GooglePayButton.Cqm4Q_g-.js","app.B7V4PU1H.js","assets/app.BX64KJWO.css","assets/GooglePayButton.B2694JUX.css","component-FacebookPayButton.BEnSx_p6.js","assets/FacebookPayButton.43XAnlTw.css"])))=>i.map(i=>d[i]); import{i as E,cW as Le,bk as I,fv as U,a0 as F,K as T,e as Ie,hq as Me,b3 as R,a as t,hr as Oe,hs as we,k as j,dJ as De,a1 as Te,bf as _,Y as M,bd as O,gv as g,bc as w,a7 as B,ht as Re,$ as A,bh as P,ap as ie,hu as xe,hv as ze,hw as le,hx as ce,_ as ue,hy as de,dc as pe,hz as he,hA as Ne,cZ as Ge,hB as qe,hC as He,hD as Fe,ea as Ve,dM as W,cB as me,hE as Ue,eb as V,hF as Ye,ct as q,a2 as Pe,bO as $e,r as ye,bu as Se,hG as Ke,hH as Xe,hI as Je,hJ as Qe,hK as Y,e7 as $,bA as x,hL as Ze,hM as je,hN as et,hO as tt,U as ge,aI as be,E as z,aT as at,bl as fe,a3 as st,ei as ee,hP as nt,hQ as ot,gr as rt,hR as te,av as it,b8 as lt,hS as ct,hT as ut,aq as dt,d as L,hU as pt,ar as ht,aC as mt,D as Pt,v as yt,G as St,hV as gt,em as bt,bQ as ft,hW as Ct,hX as kt,h as vt,hY as _t,hl as At,hZ as Et,dv as Ce,aW as Wt,h_ as Bt,a_ as Lt,B as It,h$ as Mt,i0 as Ot,b9 as wt,i1 as Dt,i2 as Tt,i3 as ke,i4 as ve,b as Rt,S as ae,i5 as xt,aK as zt,i6 as Nt,z as Gt,al as qt,h8 as Ht,cI as Ft,h6 as Vt,as as Ut}from"./app.B7V4PU1H.js";import{u as Yt,a as _e,S as $t}from"./useEditorShopPayNavigation.C1ayrqmt.js";import{P as Kt}from"./VaultedPayment.B4iRxL3Z.js";function ts(){const e=E(),a=Le(),{shopPayEnabled:n}=I(),{value:s}=U(),o=F().rememberMe,r=!!s?.rememberMe||o.value,[i,l]=T(r),{negotiate:c}=Ie(),p=Me()?.saveShippingAddressCheckboxEnabled??!0,y=!!a,d=F().shippingAddress.value,m=!n&&p&&!y&&!d.oneTimeUse,b=R(f=>{l(f),o.value=f,c({})},[c,o]);return m?t(Oe,{id:"save_shipping_information",name:"save_shipping_information",checked:i,onChange:b,children:e("customer_account.save_my_information_label","Save this information for next time")}):null}const Xt=["GooglePay","PayPal","Venmo","FacebookPay"];function as({id:e}){return we({id:e,stage:({pendingComponents:a})=>Xt.some(s=>a.has(s))?j.Usable:j.Complete}),null}const H="AmazonPayButtonContainer";function Jt(){const{value:e}=De(),{value:a}=Te(),{inMemoryAmazonPayParts:n}=_(),s=M(O),o=a?.find(d=>d.type==="walletsPlatform"&&d.name===g.AmazonPay),{configurationParams:r}=o||{},i=n.sdkStatus.value,l=n.buttonStatus.value,c=i.status==="available"&&i.sdk.Pay,u=w(),p=e&&e.amount>0?e.amount.toFixed(2):void 0,y=e&&e.currencyCode;return B(()=>{const{buttonStatus:d}=n;return d.value={status:"not_rendered"},()=>{d.peek().status==="rendered"&&(d.value={status:"not_rendered"})}},[]),B(()=>{if(!o||!c||l.status==="rendered")return;const d=document.getElementById(H);if(!d)return;const m=Re(d)||0,b={...r,...p&&y&&{estimatedOrderAmount:{amount:p,currencyCode:y}},style:{buttonBorderRadius:`${m}px`}};c.renderButton(`#${H}`,b),n.buttonStatus.value={status:"rendered"}},[c,r,o,l.status,p,y,n.buttonStatus]),t("div",{ref:u("amazon_pay"),id:H,className:A(P.borderRadius,P.focusOutline,{[P.shadow]:s})})}const Qt="vT2w7",Zt="f1x20",jt="hKWGx",se={ApplePayButton:Qt,dark:Zt,light:jt};function ea({supportedNetworks:e,color:a}){const n=E(),s=ie(),o=xe(),r=w(),i=M(O),l=ze(),c=!1;return t("button",{ref:r("apple_pay"),className:A(se.ApplePayButton,se[a],P.borderRadius,P.focusOutline,{[P.shadow]:i}),lang:s,onClick:()=>l(o({asPaymentMethod:c,supportedNetworks:e}).session),type:"button","aria-label":n("brand.apple_pay","Apple Pay")})}const ta=le({load:()=>ce(()=>ue(()=>import("./component-GooglePayButton.Cqm4Q_g-.js"),__vite__mapDeps([0,1,2,3])))});function aa(){return t(de,{id:"GooglePay",children:t(ta,{})})}const sa="Xicuw",na="_1f3te",ne={Button:sa,"Button--contrast":"oHCaH",ShopPayLogoWrapper:na},oa="shop-pay-button";function ra(){const e=pe(),{id:a}=I(),n=he(),s=Yt({foregroundColor:Ye}),o=Ne(),r=Ge(),i=qe(o,r),{telemetry:{lastClickedWallet:l}}=_(),c=He(Fe.DirectCheckoutCheckout),u=w(),p=M(O),y=Ve(W.ShopifyPay),{setEditorShopPay:d}=_e(),m=R(()=>{const C=parseInt(me(a),10),v=Ue(W.ShopifyPay,V.Success,C,n);e?.record(v),y(),l.value="SHOP_PAY"},[a,e,n,l,y]),b=R(C=>{if(d){C.preventDefault(),d(!0);return}m()},[m,d]),f=A(ne.Button,{[ne["Button--contrast"]]:!s&&!i},P.borderRadius,P.focusOutline,{[P.shadow]:p});return t("a",{id:oa,href:c,ref:u("shop_pay"),className:f,"aria-label":"Shop Pay",onClick:b,children:t($t,{size:"medium"})})}const ia=le({load:()=>ce(()=>ue(()=>import("./component-FacebookPayButton.BEnSx_p6.js"),__vite__mapDeps([4,1,2,5])))});function la(){return t(de,{id:"FacebookPay",children:t(ia,{})})}const ca=e=>q("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 102 20",...e},q("path",{fill:"#333e48",d:"M75.19 1.786q-1.492 0-2.815.98v5.94q1.343 1.024 2.774 1.023 2.898 0 2.899-3.96 0-3.983-2.858-3.983m-2.962-.277A5.9 5.9 0 0 1 73.93.444a4.9 4.9 0 0 1 1.85-.362q1.009 0 1.827.383a3.76 3.76 0 0 1 1.387 1.108q.567.723.872 1.757t.305 2.332q0 1.32-.326 2.385-.326 1.066-.914 1.81a4.1 4.1 0 0 1-1.429 1.16 4.2 4.2 0 0 1-1.87.416q-1.89 0-3.256-1.256v4.983q0 .426-.42.426h-1.24q-.42 0-.42-.426V.827q0-.426.42-.426h.925q.42 0 .483.426l.105.682zm13.194 8.37a4.2 4.2 0 0 0 1.45-.277 5.5 5.5 0 0 0 1.45-.81V6.62q-.526-.127-1.104-.202a9 9 0 0 0-1.124-.075q-2.374 0-2.374 1.853 0 .81.441 1.246t1.261.437m-2.458-7.625-.158.053a.6.6 0 0 1-.179.033q-.273 0-.273-.384V1.38q0-.298.084-.415t.337-.224q.671-.299 1.66-.48.986-.18 1.974-.18 1.995 0 2.942.83.945.831.945 2.577v7.284q0 .426-.42.426h-.903q-.4 0-.463-.405l-.105-.702a5.7 5.7 0 0 1-1.67 1.022 4.9 4.9 0 0 1-1.817.362q-1.513 0-2.395-.863-.883-.862-.883-2.31 0-1.556 1.092-2.481 1.094-.927 2.942-.927 1.177 0 2.647.362V3.852q0-1.15-.504-1.619-.505-.47-1.764-.469-1.472 0-3.09.49zm14.16 10.84q-.568 1.47-1.314 2.109-.744.639-1.943.639-.672 0-1.197-.15a.6.6 0 0 1-.336-.202q-.105-.138-.105-.437V14.5q0-.405.315-.405.105 0 .315.043t.567.043q.799 0 1.24-.384.441-.383.798-1.406l.4-1.086-4.056-10.137q-.146-.361-.146-.511 0-.256.294-.256h1.26q.336 0 .463.106.125.107.251.47l2.942 8.263L99.708.976q.126-.36.252-.469.126-.106.462-.106h1.177q.294 0 .294.256 0 .15-.147.51zM40.15 15.47c-3.761 2.814-9.216 4.31-13.912 4.31-6.583 0-12.51-2.466-16.996-6.572-.352-.322-.038-.763.385-.513 4.84 2.855 10.825 4.574 17.006 4.574 4.17 0 8.753-.877 12.971-2.691.636-.273 1.17.425.547.891"}),q("path",{fill:"#333e48",d:"M41.717 13.657c-.482-.624-3.181-.296-4.394-.148-.368.044-.425-.281-.093-.517 2.153-1.533 5.682-1.09 6.092-.577.413.518-.108 4.104-2.127 5.816-.31.263-.605.122-.468-.225.455-1.15 1.471-3.724.99-4.349M37.429 2.06V.57A.365.365 0 0 1 37.8.193l6.59-.001c.21 0 .38.155.38.376v1.278c-.003.214-.18.494-.496.938L40.86 7.722c1.267-.03 2.607.163 3.757.818.26.148.33.367.35.582v1.59c0 .218-.237.472-.485.34-2.028-1.077-4.718-1.194-6.96.013-.23.124-.47-.126-.47-.345V9.209c0-.242.005-.656.246-1.024l3.953-5.75H37.81a.37.37 0 0 1-.38-.375M13.4 11.365h-2.005a.38.38 0 0 1-.358-.343L11.038.595a.38.38 0 0 1 .387-.375h1.866a.38.38 0 0 1 .365.35v1.36h.037C14.18.615 15.096 0 16.331 0c1.253 0 2.039.614 2.6 1.93C19.418.615 20.521 0 21.7 0c.842 0 1.758.351 2.32 1.141.635.878.505 2.15.505 3.27l-.002 6.58a.38.38 0 0 1-.387.374h-2.001a.38.38 0 0 1-.36-.374V5.463c0-.438.037-1.535-.056-1.952-.15-.703-.6-.9-1.179-.9-.486 0-.991.33-1.197.855-.206.527-.188 1.405-.188 1.997v5.527a.38.38 0 0 1-.386.375h-2.002a.38.38 0 0 1-.36-.374l-.001-5.528c0-1.163.186-2.874-1.235-2.874-1.44 0-1.384 1.668-1.384 2.874l-.001 5.527a.38.38 0 0 1-.387.375m37.059-9.236c-1.478 0-1.571 2.04-1.571 3.312 0 1.273-.02 3.993 1.552 3.993 1.554 0 1.628-2.194 1.628-3.532 0-.877-.038-1.93-.3-2.764-.224-.724-.673-1.01-1.31-1.01zM50.439 0c2.975 0 4.584 2.59 4.584 5.88 0 3.181-1.777 5.705-4.584 5.705-2.918 0-4.508-2.59-4.508-5.814C45.93 2.523 47.539 0 50.439 0m8.441 11.365h-1.997a.38.38 0 0 1-.36-.374L56.52.561a.38.38 0 0 1 .386-.34L58.764.22c.175.009.32.13.356.291v1.595h.038C59.72.68 60.505 0 61.89 0c.898 0 1.778.329 2.339 1.229.524.834.524 2.237.524 3.247v6.561a.38.38 0 0 1-.385.328H62.36a.38.38 0 0 1-.357-.328V5.376c0-1.141.13-2.809-1.253-2.809-.487 0-.936.33-1.16.834-.281.636-.319 1.272-.319 1.975v5.614a.386.386 0 0 1-.39.375m-24.684.075a.41.41 0 0 1-.473.047c-.665-.56-.785-.82-1.149-1.354-1.1 1.136-1.879 1.477-3.304 1.477-1.687 0-3-1.055-3-3.166 0-1.65.882-2.77 2.138-3.32 1.087-.484 2.606-.572 3.769-.704v-.264c0-.484.037-1.055-.245-1.473-.243-.374-.712-.528-1.124-.528-.765 0-1.444.397-1.611 1.22-.035.183-.167.364-.348.374l-1.943-.214c-.164-.037-.346-.17-.299-.425C27.055.721 29.183 0 31.09 0c.975 0 2.25.263 3.018 1.011.975.924.881 2.155.881 3.497v3.165c0 .952.39 1.37.757 1.882.128.185.156.405-.007.54-.409.348-1.136.988-1.537 1.35zm-2.02-4.953v-.44c-1.45 0-2.98.314-2.98 2.045 0 .88.45 1.473 1.218 1.473.562 0 1.069-.352 1.387-.923.394-.704.376-1.363.376-2.155zM7.926 11.44a.41.41 0 0 1-.473.047c-.667-.56-.786-.82-1.15-1.354C5.204 11.27 4.425 11.61 3 11.61c-1.688 0-3-1.055-3-3.166 0-1.65.88-2.77 2.137-3.32 1.087-.484 2.606-.572 3.768-.704v-.264c0-.484.038-1.055-.243-1.473-.244-.374-.713-.528-1.125-.528-.764 0-1.444.397-1.61 1.22-.036.183-.168.364-.35.374l-1.94-.214c-.165-.037-.347-.17-.3-.425C.783.721 2.911 0 4.818 0c.975 0 2.25.263 3.018 1.011.975.924.882 2.155.882 3.497v3.165c0 .952.39 1.37.756 1.882.128.185.157.405-.006.54a79 79 0 0 0-1.537 1.35zm-2.02-4.953v-.44c-1.45 0-2.982.314-2.982 2.045 0 .88.45 1.473 1.219 1.473.562 0 1.069-.352 1.387-.923.394-.704.375-1.363.375-2.155z"})),ua="dczKO",da={AmazonPayClassicButton:ua};function pa(){const{id:e,currencyCode:a,checkoutPublicAccessToken:n}=I(),s=ie(),o=E(),r=Pe(),{value:i}=U(),{value:l}=$e(),c=ye(),{paymentLines:u,discountLines:p}=F(),y=w(),{telemetry:{lastClickedWallet:d}}=_(),m=M(O),{checkoutSessionIdentifier:b,type:f}=Se(),C=async()=>{d.value="AMAZON_PAY_CLASSIC",await Ke({logger:r,checkoutSessionIdentifier:b,sourceType:f,shopId:e,shopCurrency:a,buyerCurrency:i?.presentmentCurrency,countryCode:i?.countryCode,merchandiseLines:l,hasSellingPlan:c,checkoutPublicAccessToken:n,locale:s,discountLines:p.peek(),paymentLines:u.peek()})};return t("button",{ref:y("amazon_pay_classic"),className:A(da.AmazonPayClassicButton,P.borderRadius,P.focusOutline,{[P.shadow]:m}),lang:s,onClick:C,type:"button","aria-label":o("brand.amazon_pay","Amazon Pay"),children:t(ca,{})})}const ha="wccDB",ma={PortableWalletsButton:ha};function Pa({wallet:e}){const{id:a}=I(),n=Pe(),s=Se(),{value:o}=U(),{countryCode:r,presentmentCurrency:i}=o??{},c=Xe(e)?.configurationParams,u=w(),p=M(O);return c?t("shopify-wallet-button",{ref:u(`${e}`),"wallet-config":JSON.stringify({name:e,wallet_params:c}),"access-token":"abc-123","shop-id":a,"cart-id":s.sourceId,"buyer-country":r??"US","buyer-currency":i??"USD",className:A(ma.PortableWalletsButton,P.borderRadius,P.focusOutline,{[P.shadow]:p}),"page-type":Qe}):(n.notify(new Je(`[PortableWalletsButton] Attempted to render wallet button for ${e}, but no config was found.`)),null)}const ya="o1z23",Sa="_4aXW0",ga="DUnBb",ba="kTI19",fa="JH5oc",Ca="pUo2R",ka="_5SdgT",va="RKgRy",_a="xaCBY",Aa="iRnuh",Ea="QKTth",Wa="Pnahu",Ba="OTERX",La="WTXfy",Ia="qLVAT",Ma="XHLFs",h={Header:ya,Text:Sa,Layout:ga,StackWrapper:ba,SkeletonWrapper:fa,ButtonWrapper:Ca,loading:ka,subsequentLoad:va,disableIframe:_a,Stack:Aa,SimulatedWalletStack:Ea,ShopPayEmphasis:Wa,Container:Ba,DrawerLink:La,InnerDrawerLink:Ia,DrawerHideButtons:Ma};function Oa(){const e=_(),a=Y(),n=$(),s=x();return Ze.map(r=>je({isAmazonPCIv4:a,isGooglePCIv4:n,isPayPalPCIv4:s},r)?Da(e,r):wa(e,r)).some(Boolean)}function wa(e,a){const{status:n}=e.portableWalletsSdkSignal.value,s=e.walletPaymentMethods.some(i=>i.name===a),o=oe(et(a,e)?.status),r=tt.includes(a)&&oe(n);return s&&(o||r)}function Da(e,a){const n=!!e.walletPaymentMethods.find(o=>o.name===a),s=(()=>{switch(a){case"PAYPAL_EXPRESS":return e.inMemoryPayPalParts.acceleratedCheckoutButtonStatus.peek();case"GOOGLE_PAY":return e.inMemoryGooglePayParts.buttonStatus.peek();case g.AmazonPay:case g.BuyWithPrime:return e.inMemoryAmazonPayParts.buttonStatus.peek();default:return}})();return n&&s?.status==="not_rendered"}function oe(e){return e?["idle","loading"].includes(e):!1}function Ta(){const e=E();return t(at,{open:!0,blocking:!0,accessibilityLabel:e("wallets.payment_in_progress_title","Payment in progress"),padding:"none",children:t(ge,{spacing:"loose",padding:"large200",children:[t(be,{level:1,children:e("wallets.payment_in_progress_title","Payment in progress")}),t(z,{children:e("wallets.payment_in_progress_body","Your payment is being processed. Your order will be completed soon.")})]})})}function Ra(){const e=fe(),a=st(),{walletUsedForSubmissionSignal:n,receiptErrorSignal:s}=_(),o=ee(nt()),r=ee(ot()),{inMemoryApplePayParts:{asPaymentMethod:i}}=_(),l=i.peek(),c=rt(a?.status==="failed"&&a.failure.type==="payment"&&e?a?.failure:void 0);B(()=>{if(a?.status==="processing"||a?.status==="polling_for_order")return;const u=n.peek();if(u){if(n.value=void 0,a?.status!=="failed"){s.value=void 0;return}u==="APPLE_PAY"&&r.current(),a.failure.type==="payment"&&u&&!l&&o.current(),(u==="APPLE_PAY"||u==="GOOGLE_PAY"||u==="FACEBOOK_PAY")&&(s.value=c)}},[a,s,n,l,r,c,o]),B(()=>function(){s.value=void 0},[s])}const xa="express-checkout-wallets-wrapper",za=/(iPhone|iPod|iPad|Mac OS)/i,Na=/((iPhone|iPod|iPad).*AppleWebKit(?!.*(Safari|instagram|FBAV|FB_IAB)))/i,Ga=/(ShopifyCheckoutSDK|CheckoutSheetProtocol)/i;function qa(){const{userAgent:e}=bt(),a=Na.test(e);return!(za.test(e)&&Ga.test(e)||a)}function Ha(){const{inMemoryPayPalParts:e,inMemoryVenmoParts:a,inMemoryGooglePayParts:n,inMemoryAmazonPayParts:s,walletPaymentMethods:o}=_(),r=x(),i=ft(()=>o.flatMap(l=>{switch(l.name){case"PAYPAL_EXPRESS":{const c=[{name:r?W.PayPalV6:W.PayPalV5,buttonStatusSignal:e.acceleratedCheckoutButtonStatus,sdkStatusSignal:e.sdkStatus}];return l.venmoEnabled&&c.push({name:W.Venmo,buttonStatusSignal:a.buttonStatus,sdkStatusSignal:a.buttonStatus}),c}case"GOOGLE_PAY":return{name:W.GooglePay,buttonStatusSignal:n.buttonStatus,sdkStatusSignal:n.sdkStatus};case g.AmazonPay:return{name:g.AmazonPay,buttonStatusSignal:s.buttonStatus,sdkStatusSignal:s.sdkStatus};case g.BuyWithPrime:return{name:g.BuyWithPrime,buttonStatusSignal:s.buttonStatus,sdkStatusSignal:s.sdkStatus};default:return[]}}),[o,n.buttonStatus,n.sdkStatus,s.buttonStatus,s.sdkStatus,r,e.acceleratedCheckoutButtonStatus,e.sdkStatus,a.buttonStatus]);Ct(i,kt)}function Fa({buttonCount:e,children:a,waitUntilLoaded:n=!0,walletPaymentMethods:s}){const[o,r]=T(te()),[i,l]=T(!0),c=qa(),u=it(),p=E(),{inMemoryApplePayParts:{paymentSheetError:y}}=_(),d=Oa(),m=Y(),b=$(),f=x();Ha();const C=n?d:!1,[v,N]=T(!1),k=ye(),{id:D}=I(),K=pe(),X=he(),J=lt();ct(s,e);const Q=R((S,G)=>{const We=parseInt(me(D),10),Be=ut({state:G,shopId:We,nascarData:{...S,walletsRenderedCount:e},paymentMethods:s});K?.record(Be)},[D,K,e,s]),Z=s.some(S=>S.name==="SHOP_PAY")&&c;Ra(),!C&&!v&&(N(!0),r(S=>te()-S)),B(()=>{v&&J.histogram({name:"wallets_container_render_time",value:o,attributes:{PCIv4:s.some(S=>S.name===g.AmazonPay&&m||S.name===g.BuyWithPrime&&m||S.name==="GOOGLE_PAY"&&b||S.name==="PAYPAL_EXPRESS"&&f)}})},[v,J,o,m,b,f]);const Ae=p("alternative_payment_method_banner.express_checkout","Express checkout"),Ee=dt("worker-version")!=="fast";return t(St,{children:[t(L,{className:h.Container,"data-count":e,children:[t("div",{className:A(h.Header),children:t(pt,{className:h.Text,children:Ae})}),t("div",{className:h.StackWrapper,children:[t("div",{className:h.Layout,children:[t(Va,{loading:C||!u,hideWallets:i,shopPayEmphasis:Z,children:[...Array(e).keys()].filter((S,G)=>G<=3).map(S=>t(ht,{delay:Ee},S))}),t("div",{id:xa,className:A(h.Stack,h.ButtonWrapper,{[h.loading]:C,[h.subsequentLoad]:C&&v,[h.DrawerHideButtons]:i,[h.ShopPayEmphasis]:Z}),children:u&&a})]}),t("div",{className:h.DrawerLink,children:t(mt,{accessibilityLive:"polite",textDecoration:"none",onClick:()=>{i?(l(!1),Q(X,V.NascarDrawerOpen)):(l(!0),Q(X,V.NascarDrawerClose))},children:t("div",{className:h.InnerDrawerLink,children:[t(z,{children:i?p("alternative_payment_method_banner.show_more_options","Show more options"):p("alternative_payment_method_banner.hide_more_options","Hide more options")}),t(Pt,{type:i?"chevron-down":"chevron-up",size:"small-200"})]})})}),k&&t(yt,{isForExpressCheckout:!0})]})]}),y?.value?.type==="payment_cancelled_while_processing"&&t(Ta,{})]})}function Va({children:e,loading:a=!1,hideWallets:n,shopPayEmphasis:s}){return gt(a,"base")==="exited"?null:t("div",{className:A(h.Stack,h.SkeletonWrapper,{[h.ShopPayEmphasis]:s,[h.DrawerHideButtons]:n}),children:e})}const Ua="_2SmAP",Ya="eFu6h",re={MessageWrapper:Ua,SimulatedWalletWrapper:Ya},$a=e=>e;function ss(){const e=vt("simulated"),a=E(),{inMemoryVenmoParts:{buttonStatus:n},walletPaymentMethods:s,buttonCount:o}=_(),r=_t(),i=At(),{setEditorShopPay:l}=_e(),c=Y(),u=$(),p=x(),y=Et(s,n.value),{expressCheckout:{button:{cornerRadius:d}={}}}=Ce(),m=Wt("Checkout::Dynamic::Render","WALLETS1"),b=Bt(),f=e&&b&&!s.length;if(!i)return null;const C=!e;let v=s.map(k=>t(Xa,{method:k,triggerProgression:r,isAmazonPCIv4:c,isGooglePCIv4:u,isPayPalPCIv4:p},k.name));if(y){const k=Ja({triggerProgression:r,isPayPalPCIv4:p});v=[...v,k]}const N=f?t(L,{padding:"large200",cornerRadius:"base",blockAlignment:"center",inlineAlignment:"center",minInlineSize:"fill",className:re.MessageWrapper,children:t(z,{color:"subdued",children:a("payment.simulated_express_checkout","Wallets are unavailable in the editor preview due to your region or browser")})}):v.map((k,D)=>k.key==="VENMO"?null:k.key==="SHOP_PAY"&&l?k:t(L,{className:re.SimulatedWalletWrapper,children:t(L,{className:A([h.walletButton,h.Stack,h.SimulatedWalletStack]),inert:!0,children:k})},k.key??D));return t("div",{style:{...Ka(d)},children:[t(Lt,{extensions:m,spacing:"large200",render:$a}),m.length>0&&t(It,{spacing:"large200"}),t(Fa,{buttonCount:f?1:o,waitUntilLoaded:C,walletPaymentMethods:s,children:e?N:v})]})}function Ka(e){return e&&{"--x-express-checkout-button-border-radius":Mt(Ot.borderRadius)(e)}}function Xa({method:e,triggerProgression:a,isAmazonPCIv4:n,isGooglePCIv4:s,isPayPalPCIv4:o}){const r=wt();switch(e.name){case"APPLE_PAY":return t(ea,{supportedNetworks:e.supportedNetworks,color:r});case"PAYPAL_EXPRESS":return o?t(ke,{progressToNextPage:a}):t(ve,{progressToNextPage:a});case"SHOP_PAY":return t(ra,{});case"GOOGLE_PAY":return s?t(Tt,{}):t(aa,{});case"FACEBOOK_PAY":return t(la,{});case"AMAZON_PAY_CLASSIC":return t(pa,{});case g.AmazonPay:return n?t(Dt,{}):t(Jt,{});case g.BuyWithPrime:return n?t(Kt,{wallet:g.BuyWithPrime}):t(Pa,{wallet:g.BuyWithPrime});default:return null}}function Ja({triggerProgression:e,isPayPalPCIv4:a}){return a?t(ke,{fundingSource:"venmo",buttonColor:"blue",progressToNextPage:e},"VENMO"):t(ve,{fundingSource:"venmo",buttonColor:"blue",progressToNextPage:e},"VENMO")}function ns(){const e=E(),{divider:{borderStyle:a,borderWidth:n}}=Rt(),{main:{divider:{borderStyle:s=a,borderWidth:o=n}={},section:r,spacing:i}}=Ce(),l=ae.default(["large100","none","large300","none"]),u=xt(r)?ae.default([i??"base","none"]).when({viewportInlineSize:{min:"extraSmall"}},[i??"large200","none"]):l;return t(L,{padding:u,children:t(zt,{borderStyle:s,size:Nt(o),children:t(Gt,{textAlign:"center",children:t(z,{color:"subdued",children:e("alternative_payment_method_banner.or","OR")})})})})}function os(e){const a=qt(null),{expressCheckoutHeightSignal:n,expressCheckoutFirstLoadsSignal:s}=Ht(),o=n.value,r=Ft(),i=s.value;return B(()=>{const l=a.current?.clientHeight,c=l!==void 0&&l!==o&&!i,u=e.map(p=>p.name);c&&r("expressCheckoutSetChange",{timestamp:new Date,paymentMethods:u}),s.value=!1,n.value=l||0},[o,e,r,i,s,n]),a}function rs(){const a=E()("contact.delivery_option_title","Delivery method"),n=Vt(),s=fe();return n?t(Ut,{accessibilityLabel:a,children:t(ge,{children:[s?null:t(be,{level:1,children:a}),n]})}):null}export{rs as D,ss as E,as as P,ts as S,ns as a,os as u}; }