1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["1b348813.r4HmzZUr.js","2c1ab0fe.D_oO1jU7.js","164ad2e3.DgUUtBtV.js","4c290a1e.D9lE9kmU.js","app.bDJ3v-8C.js","assets/app.BuSMBobh.css","assets/previous.BpuyvRSB.css","65f3d4da.8ZfwXSRH.js","60a453ce.BIyixFcg.js","0a7dffce.BMM606kb.js","bb728e1c.BObJOhlA.js","assets/stopwatch.Kyhz8KoT.css","4ea44c06.D08Q9XyC.js","f78726c8.K7FaLIh2.js","assets/useHasOrdersFromMultipleShops.B_iZlQze.css","ccdf3592.Jq-5VsnW.js","e477f96c.dvrL9dgG.js","ed9f2238.C-XxbQrN.js","assets/PaymentButtons.CKE1iCma.css","cb8fcd45.gqoNFKgG.js","bea9843a.Ccz9HjeB.js","ca5e9c49.BL-l7mUG.js","3a819064.CWC3Yoc0.js","ac5a19ff.CrIDx928.js","8536083a.BCEdV5WN.js","assets/WalletSandbox.BoV0vp4z.css","assets/PayPalButton.jBvXiHEe.css"])))=>i.map(i=>d[i]); 2import{_ as e}from"./app.bDJ3v-8C.js";import{e as n,u as a,T as t,d as l,r,f as o,l as s,i,S as c,A as u,o as p,G as _,h as d}from"./2c1ab0fe.D_oO1jU7.js";import{aM as m,O as h,a6 as v,Q as b,X as y,x as P,Y as f,aZ as g,ck as w,bx as E}from"./4c290a1e.D9lE9kmU.js";import{ca as S,cb as A,c7 as k,bK as N,h as x,w as C,cc as L,s as T,c5 as R,K as Y,cd as O,_ as D,B as F,P as M,n as j,a as B,a5 as I,C as X,L as K,ce as V,x as q,J as G,cf as Q}from"./164ad2e3.DgUUtBtV.js";import{a as U}from"./ca5e9c49.BL-l7mUG.js";function W({id:e,children:l}){const r=n(!1);return a(S.Provider,{value:t((()=>({id:e,completeStatusSignal:r})),[e,r]),children:[l,a($,{})]})}function $(){const e=m(S),n=e.completeStatusSignal.value;return U(e.id,!n),null}const H=l({displayName:"PayPalButtonComponent",load:()=>r((()=>e((()=>import("./1b348813.r4HmzZUr.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]))))});function J(e){const n="venmo"===e.fundingSource?"Venmo":"PayPal";return a(W,{id:n,children:a(H,{...e})})}const Z="subscription-policy";function z(){const{sessionLoadFailed:e}=v().inMemoryApplePayParts,{paymentLines:n}=b(),a=N(),t=function(){const{checkout:e}=h(),{persistedApplePaySignal:n}=v(),a=A("PAYMENTS_APPLE_PAY_SESSION_EXPIRED"),t=k();return o((()=>{if(!t.value)return!1;const l=e.latestReceipt.value,r="failed"===l?.status&&n.value?.receiptIdForPaymentFailure===l?.id;return a.value||r}))}(),{progressing:l}=x();return o((()=>!e.value&&(!!y(n.value,"APPLE_PAY")&&!l.value&&(!a.value||t.value))))}function ee(){const{embed:e,mobileCheckoutSdk:n}=h(),a=n.enabled&&n.variant.isPartner(),t=n.enabled&&n.variant.isStandard();return Boolean(e?.isEmbeddedCheckout()||a||t)}function ne(){const{paymentLines:e}=b(),n=A("PAYMENTS_PAYPAL_OVER_CAPTURE_DETECTED");return o((()=>{const a=e.value,t=y(a,"PAYPAL_EXPRESS"),l=Boolean(t&&!P(t));return n.value&&Boolean(t)&&!l}))}function ae(){const{inMemoryPayPalParts:{isApproving:e}}=v(),n=T({isPayWithPayPalButton:!0}),a=R(),t=function(){const{persistedPayPalSignal:e}=v(),n=C(),a=L(),t=ne(),l=A("PAYMENTS_PAYPAL_TOKEN_EXPIRED"),r=A("PAYMENTS_PAYPAL_CURRENCY_CHANGED");return o((()=>{const o=e.value?.newTokenRequiredDueToError;return Boolean(n.value)&&!a.value&&(o||l.value||r.value||t.value)}))}();return o((()=>"error"!==n.value.status&&!e.value&&(a.value||t.value)))}function te(){const{checkout:{identity:e,wallets:n}}=h(),a=z(),t=ae(),{nextPage:l}=Y(),r=s(l.id);return o((()=>"shopPay"!==e.current.value&&!n.escalatedWallet.value&&"review"===r.value&&(t.value||a.value)))}function le(){const{checkout:{identity:e}}=h(),n=O(),a=te();return o((()=>f(e.current.value)&&n.value&&!a.value))}function re(){const{checkout:{identity:e}}=h(),n=O(),{nextPage:a}=Y(),t=s(a.id),l=te();return o((()=>f(e.current.value)&&!l.value||n.value&&"thankYou"===t.value))}const oe=G("PurchaseOptionsAgreementModal");function se({isForExpressCheckout:e=!1,showFullSubscriptionConsent:n,placement:t,wrapInSection:l=!1}){const{checkout:r}=h(),u=s(t),p=o((()=>g({checkout:r}))),_=function(){const{nextPage:e}=Y(),n=s(e.id),a=le(),t=function(){const{checkout:e}=h(),{isOnePage:n}=e.configuration.layout,a=s(ee()),t=z(),l=te();return o((()=>n.value&&(a.value||t.value&&!l.value)))}();return o((()=>"review"!==n.value||a.value||t.value))}(),d=o((()=>"above-pay-button"===u.value?p.value&&_.value:!("default"===u.value&&p.value))),m=o((()=>"above-pay-button"===u.value&&d.value));return a(c,{children:[!e&&a(ie,{shown:m}),a(i,{when:d,children:()=>
2{if(e)return a(i,{when:()=>n?.value??!1,fallback:a(de,{}),children:a(me,{})});const t=a(F,{id:"purchase_options_agreement",padding:"none",children:a(i,{when:p,fallback:a(_e,{}),children:a(pe,{})})});return l?a(D,{children:t}):t}})]})}function ie({shown:e}){return function(e){const n=function(){const{i18n:e}=h(),{useStoreCreditForSubscriptionRenewals:n}=b(),a=ce();return o((()=>{const t={button_label:a.value,consent_text:e.translate("payment.purchase_options_subscription_consent_text"),cancellation_instructions:e.translate("payment.purchase_options_subscription_cancellation_instructions",{cancel_text:e.translate("payment.purchase_options_subscription_cancel_text"),cancellation_policy_label:e.translate("payment.purchase_options_cancellation_policy_label")})},l=e.translate("payment.purchase_options_subscription_agreement_label",t);return n.value?`${l} ${e.translate("payment.purchase_options_subscription_store_credit_agreement_label")}`:l}))}(),a=u(e.peek());p((()=>{const t=e.value;if(t!==a.current&&(a.current=t,t))return B({content:_((()=>n.value)),role:"status"})}))}(e),null}function ce(){const{i18n:e}=h(),n=R(),a=C(),t=function(){const{i18n:e}=h(),{nextPage:n}=Y(),a=s(n.label),t=le();return o((()=>t.value?e.translate("general.pay_now_button_label"):a.value))}();return o((()=>{if(!n.value)return t.value;const l=q(a)?e.translate("brand.venmo"):e.translate("brand.paypal");return e.translate("wallets.call_to_action",{walletName:l})}))}function ue({buttonLabel:e,cancellationPolicyLink:n}){const{i18n:t}=h(),{useStoreCreditForSubscriptionRenewals:l}=b(),r=function({i18n:e,cancellationPolicyLink:n}){return{consent_text:a("strong",{children:e.translate("payment.purchase_options_subscription_consent_text")}),cancellation_instructions:a(c,{children:e.translate("payment.purchase_options_subscription_cancellation_instructions",{cancel_text:a("strong",{children:e.translate("payment.purchase_options_subscription_cancel_text")}),cancellation_policy_label:n??a(he,{tone:"monochrome"})})})}}({i18n:t,cancellationPolicyLink:n}),o=void 0===e?t.translate("payment.purchase_options_subscription_agreement_label_wallets",r):t.translate("payment.purchase_options_subscription_agreement_label",{button_label:e,...r});return a(c,{children:[a(I,{children:o}),a(i,{when:l,children:[" ",t.translate("payment.purchase_options_subscription_store_credit_agreement_label")]})]})}function pe(){const e=ce();return a(F,{padding:"none","aria-live":"polite","aria-atomic":"true",children:a(M,{children:a(ue,{buttonLabel:e.value})})})}function _e(){const{i18n:e}=h();return a(j,{color:"subdued",children:e.translate("payment.purchase_options_agreement_label",{cancellation_policy_label:a(he,{})})})}function de(){const{i18n:e}=h();return a(F,{id:"purchase_options_agreement",padding:"small-100 none none none",children:a(j,{color:"subdued",type:"small",children:e.translate("payment.purchase_options_agreement_label_wallets",{cancellation_policy_label:a(he,{})})})})}function me(){return a(F,{id:"purchase_options_agreement",padding:"large-100 none none none",children:a(M,{children:a(ue,{})})})}function he({tone:e}){const{embed:n,i18n:t,shop:{merchantPolicies:l}}=h(),r=a(j,{children:t.translate("payment.purchase_options_cancellation_policy_label")}),o=X(void 0,oe),{localPolicies:s}=w(),i=l.some((e=>e.handle===Z))?s.find((e=>e.handle===Z)):void 0;return i?i.url&&E(n?.embedder)?a(K,{tone:e,"aria-haspopup":"dialog",onClick:()=>{n?.client?.windowOpenRequest(i.url)},children:r}):a(c,{children:[a(K,{tone:e,commandFor:o,children:r}),a(V,{id:o,defaultPolicy:{...i,name:t.translate("shop_policies.purchase_options_cancellation_policy")}})]}):r}function ve(e,n=Q()){const a=u(null),t=u(new Set),{observability:l}=h(),r=u(e);r.current=e,d((()=>{if(!e)return;const o=new Set(e.map((({walletName:e})=>e)));t.current.forEach((e=>{o.has(e)||t.current.delete(e)}));const s=e.some((({walletName:e})=>!t.current.has(e)));!a.current&&s&&(a.current=setTimeout((()=>{a.current=null;const e=r.current;e&&e.filter((e=>e.isLoading()&&!t.current.has(e.walletName))).forEach((e=>{t.current.add(e.walletName),l.counter({name:"wallet_button_render_timeout",value:1,attributes:{wallet:e.walletName}}),e.onTimeout()}))}),n))}),[l,e,n]),d((()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)}),[])}se.displayName="PurchaseOptionsAgreement",ue.displayName="SubscriptionAgreementContent",pe.displayName="SubscriptionAgreement",_e.displayName="DefaultAgreement",de.displayName="ExpressCheckoutAgreement",me.displayName="ExpressCheckoutSubscriptionAgreement",he.displayName="C
2ancellationPolicyLink";export{se as P,Z as S,W as a,ue as b,ae as c,te as d,ee as e,le as f,ve as g,J as h,re as i,ne as j,z 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.