PageSourceSearch

https://grailwatch.com/cdn/shopifycloud/checkout-web/assets/c1/d56ce0bb.CuaAwDOI.js

js grailwatch.com collected 2026-10-07 11:38:42 UTC 7,991 bytes, 1 lines download raw bytes

1import{u as e,w as a,g as t,q as s,h as l,o as n,m as o,k as i,p as r,L as c,s as p,S as d}from"./2c1ab0fe.Bywc2Brn.js";import{c as u,c2 as m,a6 as b,c3 as v,aQ as h,z as f}from"./4b4bc88f.C26USmk8.js";import{S as y,cf as _,I as P,cg as j,ch as S,X as g,bf as w,b as A,f as k,L,j as C,B as E,aH as N,a1 as z,H as x,M as H,a as M,ci as Y,cj as q,r as B,s as I}from"./164ad2e3.DZSd7pLX.js";import{A as R}from"./d4ea2faa.DFrX4G1p.js";import{T as W}from"./7b0c98ea.wJBUDVvK.js";import{S as D,d as T}from"./e3e348f2.D2E-Dtt_.js";import{c as X}from"./31cc568e.95lmLO5k.js";import{e as F}from"./c6c0cbda.BKcpNz6B.js";import{s as J}from"./dffdfb34.DLQCxWEB.js";import"./app.DRs7v1W8.js";import"./d0bb51ec.-Od_3rgw.js";import"./f67abd2c.vvptRNe9.js";import"./60a453ce.Bo_pHupz.js";import"./e12db40c.J_ouQ898.js";import"./9dba8418.BzGnZlrB.js";import"./71ae3d5c.CT21Fulh.js";import"./3ca8ef7e.C6ifrex0.js";import"./1f5e7811.BFK0fqzB.js";import"./2fdb3dd3.BBVlyDMF.js";import"./22345fd4.9vcjBj8J.js";import"./0e67bd3b.D7tZwHwl.js";import"./74835653.B5dvKhsY.js";import"./2495faa4.D3uf12cS.js";import"./a9fa9fda.DRbzGEJQ.js";import"./ca3e798e.Dc9DtEXz.js";import"./47b970b2.DjolDw47.js";import"./064f6ac1.Bjr6-mBf.js";import"./efa0389a.D_AJL692.js";import"./4b1c22b7.BoKf5l9E.js";import"./17425706.CtaKzzog.js";import"./55098bf1.DXcUuNz_.js";import"./cb5cf153.DnU9t5IG.js";import"./cb38e5c2.BhWVCtRR.js";import"./78ab3dd0.hruEgq0z.js";import"./ed9f2238.DPytesKr.js";import"./6fb6f9d8.Dzf9eTaT.js";import"./1444e6bd.nTYcj6dN.js";import"./0b8657b8.D3afZApm.js";import"./a422df8c.1bXGQc8C.js";import"./79974aab.DaZOEwGE.js";import"./d22d2b80.B6f-Nstb.js";import"./f49d4216.CZ2qzbQ0.js";function O({body:a}){return e(j,{children:e(P,{dangerouslySetInnerHTML:{__html:a.value??""},scrollableContent:"all"})})}function V({body:t,loading:s,error:l}){const{i18n:n}=u();return e(a,{when:l,fallback:e(a,{when:s,fallback:e(O,{body:t}),children:e(y,{gap:"base",children:[e(_,{lines:2,lastLineSize:"large"}),e(_,{lines:3,lastLineSize:"small"}),e(_,{lines:2,lastLineSize:"base"}),e(_,{size:"extraLarge",lastLineSize:"large",lines:1}),e(_,{lines:7,lastLineSize:"small"}),e(_,{lines:3,lastLineSize:"base"})]})}),children:n.translate("bad_request.title")})}const Q="JtAjb",U="otCH1";function Z({id:i,canConfirm:r,onConfirm:c,onHide:p,onShow:d}){const{i18n:b,shop:v,checkout:{negotiator:h}}=u(),{checkoutProtocolModalEventSignal:f}=h.context,_=b.translate("payment.purchase_options_cancellation_policy_label"),P=v.merchantPolicies.find(({handle:e})=>e===D),j={handle:D,shopId:v.id,shopName:v.name,squareLogo:v.brandSettings?.squareLogo,name:_,url:P?.url??""},M=m(S,{defaultPolicy:j,policies:[j]}),Y=t(!1),q=s(()=>{Y.current&&"applePaySubscriptionConsent"===f.value&&(f.value="none"),Y.current=!1},[f]);l(()=>q,[q]);const B=n(!1),I=n(!1),R=t(null),F=g(),J=w(B.value,"slow"),O=B.value||I.value,Z=!B.value||I.value,G=s(e=>{R.current=e,e&&(e.dataset.inertSupported=String("inert"in e))},[]),K=b.translate("wallets.continue_with",{walletName:b.translate("brand.apple_pay")}),$=B.value?X(_):b.translate("payment.purchase_options_subscription_confirmation_title"),ee=s(()=>{M.show(),B.value=!0},[M,B]),ae=s(()=>{M.hide(),B.value=!1},[M,B]),te=s(()=>{I.value=!0,M.hide(),q(),p()},[I,M,q,p]),se=s(()=>{B.value=!1,I.value=!1,Y.current=!0,f.value="applePaySubscriptionConsent",d()},[B,I,f,d]);return e(H,{id:i,heading:e(y,{direction:"inline",alignItems:"center",gap:"base",children:[e(a,{when:B,children:e(N,{type:"button",padding:"small-400",borderRadius:"base",accessibilityLabel:b.translate("account_management.back"),onClick:ae,children:e(z,{type:"arrow-left",size:"base"})})}),e(x,{level:1,autoFocus:!0,children:$},B.value?"policy":"consent")]}),accessibilityLabel:$,onShow:se,onHide:te,actionLayout:"stacked",primaryAction:e(E,{variant:"primary",type:"button",inlineSize:"fill",disabled:!r.value,onClick:c,children:K}),children:e(A,{className:"VqsW7",children:e(W,{contentRef:R,children:e(A,{ref:G,className:"c1X76",padding:"small-200",overflow:"hidden",children:[e(a,{when:()=>F?!B.value:"entered"!==J,children:e(A,{className:o(Q,B.value&&U),"data-side":"backward","data-visible":!B.value&&(F||"exit"!==J),position:B.value?"absolute":"relative",inert:O,children:e(k,{children:e(T,{buttonLabel:K,cancellationPolicyLink:P?e(L,{tone:"monochrome",onClick:ee,children:e(C,{children:_})}):void 0})})})}),e(a,{when:()=>F?B.value:"exited"!==J,children:e(A,{className:o(Q,!B.value&&U),"data-side":"forward","data-visible":B.value&&(F||"enter"!==J),position:B.value?"relative":"absolute",inert:Z,children:e(V,{body:M.policyBody,loading:M.loading,error:M.error})})})]})})})})}const G=I("ApplePaySubscriptionConsentModal");function K({supportedNetworks:m,color:y}){const{acceleratedWalletPaymentMethods:_,applePaySessionHandler:P,inMemoryApplePayParts:{buttonStatus:j,paymentSheetError:S}}=b(),g=i(()=>{const e=P.value;return null==e?.createSession||null==e.showApplePayPaymentSheet?null:{createSession:e.createSession,openApplePayPaymentSheet:e.showApplePayPaymentSheet}}),w=t({status:"rendered"});r(()=>{const e=null!=g.value,a=j.value;e&&"not_rendered"===a.status?c(()=>{j.value=w.current}):e||a!==w.current||c(()=>{j.value={status:"not_rendered"}})}),l(()=>()=>{j.value===w.current&&(j.value={status:"not_rendered"})},[j]);const A=M(),k=t(null),{observability:L,i18n:C,checkout:E}=u(),{wallets:N}=E,z=p(Y()),x=i(()=>v({hasSubscription:h({checkout:E}),isApplePayAvailable:_.value.some(({name:e})=>
1"APPLE_PAY"===e),variant:z.value})),{showOverlay:H,hideOverlay:I}=q(),W=B(void 0,G),D=n(!1),T=s(()=>{D.value=!0,L.log("apple_pay_subscription_consent_modal_opened","Apple Pay subscription consent modal opened")},[D,L]),X=s((e="dismissed")=>{D.value&&(D.value=!1,L.log("apple_pay_subscription_consent_modal_closed","Apple Pay subscription consent modal closed",{reason:e}))},[D,L]),O=()=>{L.log("apple_pay_button_clicked_while_loading","Apple Pay button clicked while already loading the payment sheet. Ignoring click.")},V=()=>{L.error(new R("Apple Pay button clicked without a ready session handler."))},Q=e=>{const a=N.activeSession.value;if("APPLE_PAY"===a?.wallet)return void O();const t=g.value;if(t)try{t.openApplePayPaymentSheet(t.createSession({supportedNetworks:m,...e&&{subscriptionConsent:e}}).session),"explicit_modal"===e&&"APPLE_PAY"===N.activeSession.value?.wallet&&L.log("apple_pay_subscription_consent_session_started","Apple Pay session started after subscription consent")}catch(s){const e={error:s,errorName:s instanceof Error?s.name:"Unknown",errorMessage:s instanceof Error?s.message:String(s),...s instanceof Error&&s.stack&&{errorStack:s.stack}};L.leaveErrorBreadcrumb("Failed to create Apple Pay session",e),S.value={type:"failed_to_create_session"},"APPLE_PAY"===N.activeSession.value?.wallet&&N.clearActiveSession({invokingWallet:"APPLE_PAY"})}else V()},U=i(()=>"explicit_modal"===x.value),K=i(()=>D.value&&U.value&&null!=g.value&&null==N.activeSession.value);r(()=>{D.value&&(!U.value||null==g.value||null!=N.activeSession.value)&&(X("invalidated"),I(W))});const $=null!=g.value;return e(d,{children:[e("button",{ref:e=>{k.current=e,A("apple_pay")(e)},className:o(J.ApplePayButton,J[y],F.borderRadius,f({focusRing:"base"})),lang:C.locale,disabled:!$,onClick:()=>{const e=N.activeSession.value;if("APPLE_PAY"===e?.wallet)return void O();const a=x.value;if(U.value)return e?void L.log("apple_pay_subscription_consent_blocked_by_active_wallet","Apple Pay subscription consent blocked by another active wallet.",{activeWallet:e.wallet,requestedWallet:"APPLE_PAY"}):g.value?(k.current?.focus({preventScroll:!0}),void H(W)):void V();Q(a)},type:"button","aria-label":C.translate("brand.apple_pay"),"aria-haspopup":U.value?"dialog":void 0}),e(a,{when:()=>U.value||D.value,children:e(Z,{id:W,canConfirm:K,onShow:T,onHide:X,onConfirm:()=>{K.value&&(L.log("apple_pay_subscription_consent_confirmed","Apple Pay subscription consent confirmed"),X("confirmed"),I(W),Q("explicit_modal"))}})})]})}export{K as ApplePayButton};

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.