PageSourceSearch

https://shop.bowshock.app/cdn/shopifycloud/checkout-web/assets/c1/Captcha.CzAUNpY9.js

js bowshock.app collected 2026-09-24 14:09:51 UTC 3,999 bytes, 1 lines download raw bytes

1import{_ as V}from"./app.CUBUOQtX.js";import{d as B,r as D,k as F,h as U,u as o,b1 as x,y as E,G as R,o as b,j as P,A as w,p as L,b2 as O,f as I,g as j,i as C}from"./esnext-vendor.BBoIVOQW.js";import{H as J}from"./ShopPayCaptcha.C5fpu37T.js";import{iw as M,f as q,bF as z,c0 as N,aa as K,k as T,W,A as $,ah as Y,Y as G,a8 as Q}from"./hydrate.Tsur0pib.js";import{bj as X,ap as Z,T as k,cY as ee,cE as ae,ah as te,W as re,bC as oe,bm as se,bn as ne}from"./addresses-is-address-empty.ZJ1ThpFy.js";import{c as ie}from"./PaymentErrorBanner.CpfGIpPc.js";const Ee=B({displayName:"Captcha",load:()=>D(()=>V(()=>Promise.resolve().then(()=>he),void 0))});function A(t,n){return t?.status==="failed"&&n===t.id}function ce(){const[t,n]=M(X.LastSeenCaptchaRequestedErrorReceiptId),i=Z(),{checkout:r}=k(),e=r.latestReceipt.value,[l,p]=F(()=>i.peek()?A(e,t):!0);return U(()=>{const c=A(e,t);p(c),e?.status==="failed"&&t!==e.id&&n(e.id),e?.status!=="failed"&&n(void 0)},[e?.id,e?.status]),l}function le(){const{i18n:t}=k(),{progressing:n}=q(),{hasError:i,error:r}=z(ee),e=ce();return n.value||!i||!r||e?null:o(ie,{identifier:"CaptchaRequiredBanner",tone:"critical",children:t.translate("payment_errors.captcha_required_without_payment_information")})}let _=!1;const ue=x(t=>{const{appContext:{i18n:n,observability:i},captchaSignal:r,errorSignal:e,lastJourneyProgression:l,negotiate:p,onViolation:c}=t,u=E(R(()=>r.value?.sitekey)),h=E(_),a=E(R(()=>!!r.value?.token)),v=b(()=>!!e.value),f=Date.now(),y=_,m=n.translate("captcha.errors.not_solved");P(()=>{const s=r.value;s?s.sitekey&&(u.value=s.sitekey):u.value=void 0}),P(()=>{const s=l.value,S=s.type==="error"?s.violations.map(H=>H.code):[],g=r.value;g&&g.violationCode&&S.includes(g.violationCode)?(c?.(),e.value=m):g?.token&&(e.value=void 0)});const d=b(()=>!!u.value);return{errorSignal:e,hasError:v,hasSiteKey:d,isLoaded:h,sitekey:u,solvedOnLoad:a,handleVerify(s){const S=r.value;S&&(r.value={...S,token:s,violationCode:void 0},p({include:["captcha"],skipStateUpdates:!0}))},handleLoad(){y||i.histogram({name:"captcha_load_time",value:Date.now()-f,attributes:{provider:r.value?.provider,success:!0}}),_=!0,h.value=!0},handleError(s){y||i.histogram({name:"captcha_load_time",value:Date.now()-f,attributes:{provider:r.peek()?.provider,success:!1,error:String(s)}})},validate(s){if(s&&!s.token)return m}}}),de={Error:"MTtRU"};function pe(){const t=k(),{client:n,i18n:i}=t,r=n.unstable_getSerialization("workerVersion")!=="fast",e=N(),l=ae(),{lastJourneyProgression:p}=te(),{captcha:c}=re(),{negotiate:u}=q(),h=w(null);L(()=>{c.value&&oe(t.embed,"captcha")});const a=O(()=>new ue({appContext:t,captchaSignal:c,errorSignal:l,lastJourneyProgression:p,negotiate:u,onViolation:()=>h.current?.resetCaptcha()}));se(c,l,a.validate,ne.InvalidCaptcha);const v=w(null),f=K({active:a.hasError.value});L(()=>{c.value&&a.isLoaded.value&&v.current&&(f.current=v.current.querySelector("iframe"))});const y=I(()=>a.isLoaded.value?void 0:"none"),m=I(()=>a.hasError.value?j(de.Error):void 0);return o(C,{when:()=>{const d=a.solvedOnLoad.value&&!c.value?.sitekey;return!!(c.value?.provider==="hcaptcha"&&!d&&a.sitekey.value)},children:o(T,{gap:"large-100",children:[o(C,{when:()=>e.value&&a.isLoaded.value&&a.hasSiteKey.value,children:o(W,{tone:"critical",errorType:$.CheckoutError,children:i.translate("payment_errors.captcha_required_without_payment_information")})}),o(C,{when:()=>!a.isLoaded.value,children:o(Y,{delay:r,contentDisplay:"block",inlineSize:"302px",blockSize:"83px"})}),o(G,{accessibilityLabel:i.translate("captcha.title"),display:y.value,children:o(T,{gap:"small-400",children:[o(le,{}),o("div",{className:m.value,ref:v,children:o(J,{sitekey:a.sitekey.value,onVerify:a.handleVerify,languageOverride:i.locale,ref:h,onLoad:a.handleLoad,onError:a.handleError})}),o(C,{when:a.errorSignal,children:d=>o(Q,{children:d?.message??d})})]})})]})})}const he=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"}));export{Ee as C};

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.