1import{q as e,I as s,t,h as a,u as o,g as n}from"./2c1ab0fe.B2yRRyAW.js";import{c as l,v as c,aA as r,hq as i,br as u,c7 as d,hr as p,hs as g,a9 as h,c2 as y,cX as m,oL as b}from"./4b4bc88f.JFrEI7LU.js";import{i as _}from"./8599b02a.C02H2K0N.js";import{aF as f,iu as k,bg as v,bQ as P,bR as w,M as I,aX as A,a7 as C,a8 as x,gc as E,ej as L,iv as M}from"./164ad2e3.-hfWY9cN.js";function S(){const{shopPay:s,checkout:t}=l(),{paymentMethods:a}=t.negotiator.current.fields,o=t.installments.paymentMethodMustSupportInterestBearingLoans;return{creditCardDisabled:e(e=>_(e,a,s.session.isInstallmentsSelected,o),[a,o,s.session.isInstallmentsSelected])}}const U={id:"fdc8128f690860079c498a10b90912e0f80562eb838162c450f12b65d69b0389",type:"query",name:"MsiCardEligibility",source:"query MsiCardEligibility($checkoutContextInput:CheckoutContextInput!){checkoutSession(checkoutContextInput:$checkoutContextInput){user{paymentMethods{...on CreditCard{id msiEligible __typename}__typename}__typename}__typename}}"},B=Object.freeze({}),R=f(({checkout:e,graphql:a,shop:o,shopPay:n,source:l})=>{const d=e.proposal.negotiated.fields,p=s(()=>d.buyerIdentity.value?.presentmentCurrency),g=s(()=>i(d.paymentMethods.value??[])),h=s(()=>"shopPay"!==e.identity.current.value||!g.value||"MXN"!==p.value),y=s(()=>n.user.paymentMethods.value.filter(u).map(e=>e.id).sort().join(",")),m=a.shopPayGraphql.query(U,{variables:{checkoutContextInput:{checkoutVersion:r({source:l}),checkoutIdentifier:l.checkoutSessionIdentifier??"unknown",shopifyDomain:o.myshopifyDomain,shopId:c(o.id)}},skip:()=>h.value});let b=y.peek(),_=p.peek();return t(function(){const e=y.value,s=p.value,t=e!==b||s!==_;b=e,_=s,t&&!h.peek()&&m.refetch({deduplicate:!0})}),{eligibilityByCardId:s(()=>{if(h.value)return B;const e=m.data.value?.checkoutSession?.user?.paymentMethods;if(!e)return B;const s={};for(const t of e)"CreditCard"===t.__typename&&(s[t.id]=t.msiEligible??!1);return s}),error:m.error,loading:m.loading}});function D(e){if("wallet"!==e?.method.type)return!1;switch(e.method.name){case"APPLE_PAY":return g(e);case"GOOGLE_PAY":return p(e);case"PAYPAL_EXPRESS":return d(e);default:return!1}}const N=k.get("base")??0;function T({children:e,open:s=!1,...t}){const n="entered"===v(s,"slow"),{isAppLayout:c}=P(),r=w(),{checkout:{negotiator:i}}=l(),{checkoutProtocolModalEventSignal:u}=i.context;return a(()=>{const e=e=>{u.value="modal_open"===e?"redesign":"none",r.notify({checkout_ui:{type:e,payload:{duration:N}}})};if(n&&c)return e("modal_open"),()=>{e("modal_close")}},[n,c,r,u]),o(I,{size:"large",open:s,...t,children:e})}function q(){const e=A(),{shopPay:s,checkout:{address:t,negotiator:a}}=l(),{value:o}=a.current.fields.paymentMethods,{billingAddress:n,billingAddressOption:c}=a.parts,r=h("shipping"===c.value?e.value:n.value,{extendedAddressMode:t.extendedAddressMode}),{eligibilityByCardId:i}=y(R),d=s.session.selectedPaymentMethod.value,p=m(o),g=!(null==d||!u(d))&&
1(i.value[d.paymentAttributes.id]??!1);return({sessionToken:e,creditCardInstallments:t,msiEligibleCard:a=g}={})=>{const n=s.session.hsaRequested.peek();return{method:{type:"wallet",name:"SHOP_PAY",walletContent:{paymentMethod:"CREDIT_CARD",sessionToken:e,billingAddress:r,paymentMethodIdentifier:b(o),...null!=t&&t>0&&{creditCardInstallments:t},...a&&{msiEligibleCard:a},...p&&{hsaRequested:n}}}}}}k.get("slow");const O="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo.BVeJpuwf.svg",V={walletLogo:"e5syv",xxxsmall:"_7NPtB",xxsmall:"XGA28",xsmall:"gKSKB",small:"DWmRr",medium:"RULId",large:"SMmkH",AmazonPayLogoVerticalAlignment:"EpCJ3",BuyWithPrimeLogoVerticalAlignment:"_705vE",ShopPayLogoVerticalAlignment:"Zxnlh"};function X({size:e="medium",wallet:s,invertColor:t=!1}){const a=C(),n=x(a);let c=E();t&&(c="light"===c?"dark":"light");const{i18n:r,observability:i}=l(),u={amazon_pay:{iconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/apay-logo.qbCmTpxR.svg",customClassName:"AmazonPayLogoVerticalAlignment",lightIconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/apay-logo-light.BOpRNbfJ.svg",altText:r.translate("brand.amazon_pay")},APPLE_PAY:{iconUrl:O,lightIconUrl:O,altText:r.translate("brand.apple_pay")},APPLE_PAY_BORDERLESS:{iconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo-borderless.BpIqGUgE.svg",lightIconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo-borderless-light.D4uI0NI6.svg",altText:r.translate("brand.apple_pay")},buy_with_prime:{iconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/bwp-logo.BRDn9X4f.svg",customClassName:"BuyWithPrimeLogoVerticalAlignment",lightIconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/bwp-logo-light.Be3NC6rq.svg",altText:r.translate("brand.buy_with_prime")},GOOGLE_PAY:{iconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/gpay-logo.BbJVlra3.svg",lightIconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/gpay-logo-light.B_DsI0cq.svg",altText:r.translate("brand.google_pay")},PAYPAL_EXPRESS:{iconUrl:n?"/cdn/shopifycloud/checkout-web/assets/c1/assets/venmo-logo.DabXQIZQ.svg":"/cdn/shopifycloud/checkout-web/assets/c1/assets/paypal-logo.Q2f7XzPy.svg",lightIconUrl:n?"/cdn/shopifycloud/checkout-web/assets/c1/assets/venmo-logo-light.Nme_SAlP.svg":"/cdn/shopifycloud/checkout-web/assets/c1/assets/paypal-logo-light.Do6ddnMD.svg",altText:n?r.translate("brand.venmo"):r.translate("brand.paypal")},SHOP_PAY:{iconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/shop-pay-logo.yJ-5VMKh.svg",customClassName:"ShopPayLogoVerticalAlignment",lightIconUrl:"/cdn/shopifycloud/checkout-web/assets/c1/assets/shop-pay-logo-light.Ts-yoc2V.svg",altText:r.translate("brand.shop_pay")}}[s];if(!u)return i.log("wallet_logo_unsupported_wallet_encountered","Unsupported wallet type in WalletLogo",{wallet:s,severity:"warning"}),null;const d="light"===c?u.lightIconUrl:u.iconUrl,p=[V.walletLogo,V[e],u.customClassName&&V[u.customClassName]].filter(Boolean).join(" ");return o("img",{src:d,className:p,alt:u.altText})}function Y(){const{i18n:e}=l(),{isWebLayout:s}=P();return({offerGuestCheckout:t=!1}={})=>t&&s?{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:o(M,{})}),target:L}:{message:e.translate("payment_errors.processing_error"),target:L}}function j(...e){const[s,t]=e,o=n(t),{shopPay:{progressInterceptor:c}}=l();o.current=t,a(()=>c.intercept(s,()=>o.current()),[c,s])}export{N as M,T as O,R as S,X as W,j as a,Y as b,q as c,D as i,S 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.