1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-amazonWalletLazy.B2F4OE22.js","esnext-vendor.DDpcaSqU.js","hydrate.BcfGVx0L.js","utilities-previous.Cnwy8G2v.js","app.DdDscdWN.js","assets/app.BuSMBobh.css","assets/previous.DjvIwnbB.css","graphql-PaymentSessionMutation.C-nDEOnn.js","shared-permissions.B59tuyWB.js","hooks-useShopPayExternalAppContext.R6pnDxYu.js","assets/helpers.BduNPqpW.css","hooks-useStableHostMethodsReferences.CidTc5Dm.js","amazon-pay-useAmazonPayPaymentLine.X7jqQiq6.js","WalletsSandbox-WalletSandbox.r7H6tjVA.js","assets/WalletSandbox.BoV0vp4z.css","negotiated-findSelectedDeliveryMethod.C8W7wTVp.js","amazon-constants.D9ZwhJsy.js","checkout-as-guest-amazon-pay.DVQDcxt_.js","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]); 2import{e as E,A as _,T as k,E as I,q as B,h as A,u as d,f as M,d as O}from"./esnext-vendor.DDpcaSqU.js";import{a$ as w,b1 as x,a5 as V,T as L,b2 as z,b3 as F,b4 as T,b5 as D,ae as N,a7 as W}from"./utilities-previous.Cnwy8G2v.js";import{q as H,ax as R,ay as U,az as G,L as K,k as q,I as Y,l as j}from"./hydrate.BcfGVx0L.js";import{_ as J}from"./app.DdDscdWN.js";import{M as $}from"./BillingAddressForm.B1Xpg2b3.js";function se({onValid:e,onInvalid:n,children:i}){const{billing:l,contact:u,payment:p,shipping:y}=w(),a=E(new Map),h=_(new WeakMap),f=k(()=>I(()=>{const t=a.value;let o=!1,s=t.size>0;for(const[c,{validator:r,previousValue:m}]of t){const g=c.value;r(g)&&(s=!1),g!==m&&(o=!0)}return{valid:s,changed:o}}),[a]),v=B(t=>{const o={billing:l,contact:u,payment:p,shipping:y};t.valid?e?.(o):n?.(o);const s=new Map;for(const[c,r]of a.value)s.set(c,{...r,previousValue:c.value});a.value=s},[a,e,n,l,u,p,y]),P=_(!1);A(()=>f.subscribe(t=>{const o=!P.current;if(t.changed||o)return P.current=!0,v(t)}),[f,v]);const S=k(()=>({registerValidator:(t,o)=>{const s=new Map(a.peek()),c=h.current.get(t);return s.set(t,{validator:o,previousValue:c}),a.value=s,()=>{const r=a.peek().get(t);r?.previousValue!==void 0&&h.current.set(t,r.previousValue);const m=new Map(a.peek());m.delete(t),a.value=m}}}),[a]);return d(x.Provider,{value:S,children:i})}function re(){const{paymentMethods:e,buyerIdentity:n}=V(),{router:i,source:{type:l},mobileCheckoutSdk:u,embed:p,checkout:y,shop:a}=L(),h=i.currentUrl,f=y.proposal.proposed.paymentLines,v=a.hasFlagEnabled(z),P=F(),S=H(),t=l==="simulated",o=u.variant.isStandard()||!!p?.isCheckoutKit();return M(()=>{const s=e.value?.some(C=>C.type==="wallet"&&C.name==="SHOP_PAY"),c=n.value?.purchasingCompany,{currentDetour:r}=S.value,m=r!=null&&["stockProblems"].includes(r.type),g=T(h.value.searchParams),b=v&&!!D(f.value);return!!(!t&&s&&!g&&!P.value&&!o&&!m&&!c&&!b)})}function Q(e,{wallet:n}={}){const{sdkStatus:i,buttonStatus:l,buyWithPrimeButtonStatus:u}=N().inMemoryAmazonPayParts,p=n===W.BuyWithPrime?u:l;A(()=>{e&&(i.value={status:R.Error},p.value={status:"error"})},[e,i,p])}const X=O({displayName:"AmazonPayButtonContent",load:()=>J(()=>import("./component-amazonWalletLazy.B2F4OE22.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])).then(e=>e.AmazonPayButtonContent),useError:Q});function ie({isSdkOnly:e=!1}){return d(X,{isSdkOnly:e})}const Z=["paymentMethods"];function le(){const e=V().paymentMethods,n=U(Z);return M(()=>n.value&&!e.value?.length)}function ue({showIcon:e=!1}){const{i18n:n,source:i}=L(),l=G(),u=i.type==="simulated";return d($,{interactive:!u,children:d(K,{href:l.value,display:"block",accessibilityLabel:n.translate("contact.change_company_location_link_label"),textDecoration:e?"none":void 0,children:d(q,{direction:"inline",alignItems:"center",gap:"small-100",children:[e&&d(Y,{type:"location"}),d(j,{children:n.translate("contact.change_location_link_label")})]})})})}export{ie as A,ue as C,se as S,le as a,Q as b,re 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.