1import{q as E,o as h,j as x,h as k,u as _,A as B}from"./esnext-vendor.BBoIVOQW.js";import{P as m,a1 as v,bC as D,bD as T,aX as V,q as N,bE as M,E as G,aY as R,w as O,x as q,y as W,am as Y,Q as z,bF as X,bG as F,bH as H,bI as K}from"./addresses-is-address-empty.PepcBFSY.js";import{bj as S,aN as Q,bd as L,be as j,bi as J,aD as Z,x as $,y as ee,bk as se,bl as I,bm as te}from"./hydrate.CpZpwHoK.js";function xe(){const{shopPay:e,checkout:t}=m(),{paymentMethods:a}=v(),r=t.installments.paymentMethodMustSupportInterestBearingLoans;return{creditCardDisabled:E(o=>{if(!o)return!1;const{expired:s,supportsInstallmentsInterestLoan:c,supportsInstallmentsSplitPayLoan:i}=o,l=D(a.value),p=o?.billingAddressValid&&o?.billingAddress.address.countryCode&&l?.supportedCountries.includes(o.billingAddress.address.countryCode)&&T(l?.availableLoanTypes,i,c);return!!(s||e.session.isInstallmentsSelected.value&&!p||r.value&&!c)},[a,r,e.session.isInstallmentsSelected])}}const oe={id:"fdc8128f690860079c498a10b90912e0f80562eb838162c450f12b65d69b0389",type:"query",name:"MsiCardEligibility",source:"query MsiCardEligibility($checkoutContextInput:CheckoutContextInput!){checkoutSession(checkoutContextInput:$checkoutContextInput){user{paymentMethods{...on CreditCard{id msiEligible __typename}__typename}__typename}__typename}}"},C=Object.freeze({}),ae=V(({checkout:e,graphql:t,shop:a,shopPay:r,source:n})=>{const o=e.proposal.negotiated.fields,s=h(()=>o.buyerIdentity.value?.presentmentCurrency),c=h(()=>N(o.paymentMethods.value??[])),i=h(()=>e.identity.current.value!=="shopPay"||!c.value||s.value!=="MXN"),l=h(()=>r.user.paymentMethods.value.filter(M).map(u=>u.id).sort().join(",")),d=t.shopPayGraphql.query(oe,{variables:{checkoutContextInput:{checkoutVersion:R({source:n}),checkoutIdentifier:n.checkoutSessionIdentifier??"unknown",shopifyDomain:a.myshopifyDomain,shopId:G(a.id)}},skip:()=>i.value});let p=l.peek(),P=s.peek();return x(function(){const g=l.value,y=s.value,U=g!==p||y!==P;p=g,P=y,!(!U||i.peek())&&d.refetch({deduplicate:!0})}),{eligibilityByCardId:h(()=>{if(i.value)return C;const u=d.data.value?.checkoutSession?.user?.paymentMethods;if(!u)return C;const g={};for(const y of u)y.__typename==="CreditCard"&&(g[y.id]=y.msiEligible??!1);return g}),error:d.error,loading:d.loading}});function Be(e){if(e?.method.type!=="wallet")return!1;switch(e.method.name){case"APPLE_PAY":return W(e);case"GOOGLE_PAY":return q(e);case"PAYPAL_EXPRESS":return O(e);default:return!1}}const w=S.get("base")??0;S.get("slow");function De({children:e,open:t=!1,...a}){const n=Q(t,"slow")==="entered",{isAppLayout:o}=L(),s=j(),{checkoutProtocolModalEventSignal:c}=Y();return k(()=>{const i=l=>{c.value=l==="modal_open"?"redesign":"none",s.notify({checkout_ui:{type:l,payload:{duration:w}}})};if(!(!n||!o))return i("modal_open"),()=>{i("modal_close")}},[n,o,s,c]),_(J,{size:"large",open:t,...a,children:e})}function Te(){const{value:e}=v().paymentMethods,{billingAddress:t,billingAddressOption:a}=z(),r=Z(),{shopPay:n,checkout:{address:o}}=m(),s=X(a.value==="shipping"?r.value:t.value,{extendedAddressMode:o.extendedAddressMode}),{eligibilityByCardId:c}=F(ae),i=n.session.selectedPaymentMethod.value,l=H(e),d=i!=null&&M(i)?c.value[i.paymentAttributes.id]??!1:!1;
1return({sessionToken:P,creditCardInstallments:b,msiEligibleCard:u=d}={})=>{const g=n.session.hsaRequested.peek();return{method:{type:"wallet",name:"SHOP_PAY",walletContent:{paymentMethod:"CREDIT_CARD",sessionToken:P,billingAddress:s,paymentMethodIdentifier:K(e),...b!=null&&b>0&&{creditCardInstallments:b},...u&&{msiEligibleCard:u},...l&&{hsaRequested:g}}}}}}const ne="/cdn/shopifycloud/checkout-web/assets/c1/assets/apay-logo-light.BOpRNbfJ.svg",le="/cdn/shopifycloud/checkout-web/assets/c1/assets/apay-logo.qbCmTpxR.svg",ie="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo-borderless-light.D4uI0NI6.svg",re="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo-borderless.BpIqGUgE.svg",A="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo.BVeJpuwf.svg",ce="/cdn/shopifycloud/checkout-web/assets/c1/assets/bwp-logo-light.Be3NC6rq.svg",de="/cdn/shopifycloud/checkout-web/assets/c1/assets/bwp-logo.BRDn9X4f.svg",ue="/cdn/shopifycloud/checkout-web/assets/c1/assets/gpay-logo-light.B_DsI0cq.svg",pe="/cdn/shopifycloud/checkout-web/assets/c1/assets/gpay-logo.BbJVlra3.svg",ge="/cdn/shopifycloud/checkout-web/assets/c1/assets/paypal-logo-light.Do6ddnMD.svg",ye="/cdn/shopifycloud/checkout-web/assets/c1/assets/paypal-logo.Q2f7XzPy.svg",he="/cdn/shopifycloud/checkout-web/assets/c1/assets/shop-pay-logo-light.Ts-yoc2V.svg",me="/cdn/shopifycloud/checkout-web/assets/c1/assets/shop-pay-logo.yJ-5VMKh.svg",Pe="/cdn/shopifycloud/checkout-web/assets/c1/assets/venmo-logo-light.Nme_SAlP.svg",be="/cdn/shopifycloud/checkout-web/assets/c1/assets/venmo-logo.DabXQIZQ.svg",fe="e5syv",_e="_7NPtB",Ie="XGA28",Ce="gKSKB",Ae="DWmRr",ke="RULId",ve="SMmkH",Me="EpCJ3",Se="_705vE",Le="Zxnlh",f={walletLogo:fe,xxxsmall:_e,xxsmall:Ie,xsmall:Ce,small:Ae,medium:ke,large:ve,AmazonPayLogoVerticalAlignment:Me,BuyWithPrimeLogoVerticalAlignment:Se,ShopPayLogoVerticalAlignment:Le};function Ve({size:e="medium",wallet:t,invertColor:a=!1}){const r=$(),n=ee(r);let o=se();a&&(o=o==="light"?"dark":"light");const{i18n:s,observability:c}=m(),i={amazon_pay:{iconUrl:le,customClassName:"AmazonPayLogoVerticalAlignment",lightIconUrl:ne,altText:s.translate("brand.amazon_pay")},APPLE_PAY:{iconUrl:A,lightIconUrl:A,altText:s.translate("brand.apple_pay")},APPLE_PAY_BORDERLESS:{iconUrl:re,lightIconUrl:ie,altText:s.translate("brand.apple_pay")},buy_with_prime:{iconUrl:de,customClassName:"BuyWithPrimeLogoVerticalAlignment",lightIconUrl:ce,altText:s.translate("brand.buy_with_prime")},GOOGLE_PAY:{iconUrl:pe,lightIconUrl:ue,altText:s.translate("brand.google_pay")},PAYPAL_EXPRESS:{iconUrl:n?be:ye,lightIconUrl:n?Pe:ge,altText:n?s.translate("brand.venmo"):s.translate("brand.paypal")},SHOP_PAY:{iconUrl:me,customClassName:"ShopPayLogoVerticalAlignment",lightIconUrl:he,altText:s.translate("brand.shop_pay")}};if(!(t in i))return c.log("wallet_logo_unsupported_wallet_encountered","Unsupported wallet type in WalletLogo",{wallet:t,severity:"warning"}),null;const l=i[t],d=o==="light"?l.lightIconUrl:l.iconUrl,p=[f.walletLogo,f[e],l.customClassName&&f[l.customClassName]].filter(Boolean).join(" ");return _("img",{src:d,className:p,alt:l.altText})}function Ne(){const{i18n:e}=m(),{isWebLayout:t}=L();return({offerGuestCheckout:a=!1}={})=>a&&t?{message:e.translate("payment_errors.processing_error_checkout_as_guest",{checkout_as_guest_link:e.translate("account_management.checkout_as_guest_link")}),messageNode:e.translate("payment_errors.processing_error_checkout_as_guest",{checkout_as_guest_link:_(te,{})}),target:I}:{message:e.translate("payment_errors.processing_error"),target:I}}function Ge(...e){const[t,a]=e,r=B(a),{shopPay:{progressInterceptor:n}}=m();r.current=a,k(()=>n.intercept(t,()=>r.current()),[n,t])}export{w as M,De as O,ae as S,Ve as W,Ge as a,Ne as b,Te as c,Be as i,xe as u};
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.