PageSourceSearch

https://www.canvastry.com/cdn/shopifycloud/checkout-web/assets/c1/7d9fe557.UK6T-HR_.js

js canvastry.com collected 2026-10-09 01:50:38 UTC 4,380 bytes, 1 lines download raw bytes

1import{p as e,L as a,o as t,z as o,h as r,u as n,U as i,y as s,I as l,t as c,g as u,V as d,k as p,m as v,w as h}from"./2c1ab0fe.Bf8FS-kA.js";import{H as m}from"./f8eac2fc.BK5OhxQ0.js";import{bC as b,v as f,bD as g,bE as y,bF as k,S as _,a9 as C,aa as S,au as j,i as L,bG as w}from"./164ad2e3.D0nOfU9-.js";import{I as E,bb as B,b2 as V,ag as q,c as x,bc as O,_ as D,bd as R,b4 as z,b5 as I}from"./4b4bc88f.DcJe9bVW.js";import{P}from"./01973ac7.D9PAWMXi.js";import"./d0bb51ec.CL_3Kdjr.js";import"./app.C_ntWzAC.js";import"./f67abd2c.CMIDVCe_.js";import"./60a453ce.0K3_0kXS.js";import"./e12db40c.B4InVJ1F.js";import"./9dba8418.CZTcH8_l.js";import"./58314944.Dze0G8W1.js";import"./c6c0cbda.BXj5YQC9.js";function J(e,a){return"failed"===e?.status&&a===e.id}function T(){const{i18n:e}=x(),{progressing:a}=f(),{hasError:t,error:i}=g(O),s=function(){const[e,a]=b(V.LastSeenCaptchaRequestedErrorReceiptId),t=q(),{checkout:n}=x(),i=n.latestReceipt.value,[s,l]=o(()=>!t.peek()||J(i,e));return r(()=>{const t=J(i,e);l(t),"failed"===i?.status&&e!==i.id&&a(i.id),"failed"!==i?.status&&a(void 0)},[i?.id,i?.status]),s}();return a.value?null:t&&i&&!s?n(P,{identifier:"CaptchaRequiredBanner",tone:"critical",children:e.translate("payment_errors.captcha_required_without_payment_information")}):null}let U=!1;const G=i(e=>{const{appContext:{i18n:t,observability:o},captchaSignal:r,errorSignal:n,lastJourneyProgression:i,negotiate:u,onViolation:d}=e,p=s(a(()=>r.value?.sitekey)),v=s(U),h=s(a(()=>Boolean(r.value?.token))),m=l(()=>Boolean(n.value)),b=Date.now(),f=U,g=t.translate("captcha.errors.not_solved");c(()=>{const e=r.value;e?e.sitekey&&(p.value=e.sitekey):p.value=void 0}),c(()=>{const e=i.value,a="error"===e.type?e.violations.map(e=>e.code):[],t=r.value;t&&t.violationCode&&a.includes(t.violationCode)?(d?.(),n.value=g):t?.token&&(n.value=void 0)});const y=l(()=>Boolean(p.value));return{errorSignal:n,hasError:m,hasSiteKey:y,isLoaded:v,sitekey:p,solvedOnLoad:h,handleVerify(e){const a=r.value;a&&(r.value={...a,token:e,violationCode:void 0},u({silenceViolations:D(["captcha"]),skipStateUpdates:!0}))},handleLoad(){f||o.histogram({name:"captcha_load_time",value:Date.now()-b,attributes:{provider:r.value?.provider,success:!0}}),U=!0,v.value=!0},handleError(e){f||o.histogram({name:"captcha_load_time",value:Date.now()-b,attributes:{provider:r.peek()?.provider,success:!1,error:String(e)}})},validate(e){if(e)return e.token?void 0:g}}});function K(){const o=x(),{client:r,i18n:i}=o,s="fast"!==r.unstable_getSerialization("workerVersion"),l=y(),c=R(),{lastJourneyProgression:b}=o.checkout.negotiator,{captcha:g}=o.checkout.negotiator.parts,{negotiate:V}=f(),q=u(null),{onOpen:O,onClose:D}=function({embed:o},r){const n=E(o?.embedder),i=t(!1);return function({embed:t},o){e(()=>{if(!o.value||!E(t?.embedder))return;const e=a(()=>t?.presentation?.acquire());return()=>a(()=>e?.())})}({embed:o},i),e(()=>{r.value?n&&a(()=>B(o,"captcha")):i.value=!1}),{onOpen:()=>{i.value=n&&Boolean(r.value)},onClose:()=>{i.value=!1}}}(o,g),P=d(()=>new G({appContext:o,captchaSignal:g,errorSignal:c,lastJourneyProgression:b,negotiate:V,onViolation:()=>{D(),q.current?.resetCaptcha()}}));z(g,c,P.validate,I.InvalidCaptcha);const J=u(null),U=k({active:P.hasError.value});e(()=>{g.value&&P.isLoaded.value&&J.current&&(U.current=J.current.querySelector("iframe"))});const K=p(()=>P.isLoaded.value?void 0:"none"),A=p(()=>P.hasError.value?v("MTtRU"):void 0);return n(h,{when:()=>{const e=P.solvedOnLoad.value&&!g.value?.sitekey;return Boolean("hcaptcha"===g.value?.provider&&!e&&Boolean(P.sitekey.value))},children:n(_,{gap:"large-100",children:[n(h,{when:()=>l.value&&P.isLoaded.value&&P.hasSiteKey.value,children:n(C,{tone:"critical",errorType:S.CheckoutError,children:i.translate("payment_errors.captcha_required_without_payment_information")})}),n(h,{when:()=>!P.isLoaded.value,children:n(j,{delay:s,contentDisplay:"block",inlineSize:"302px",blockSize:"83px"})}),n(L,{accessibilityLabel:i.translate("captcha.title"),display:K.value,children:n(_,{gap:"small-400",children:[n(T,{}),n("div",{className:A.value,ref:J,children:n(m,{sitekey:P.sitekey.value,onVerify:e=>{D(),P.handleVerify(e)},languageOverride:i.locale,ref:q,onLoad:P.handleLoad,onError:e=>{D(),P.handleError(e)},onOpen:O,onClose:D,onChalExpired:D})}),n(h,{when:P.errorSignal,children:e=>n(w,{children:e?.message??e})})]})})]})})}export{K as default};

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.