PageSourceSearch

https://lateliermelanie.com/cdn/shopifycloud/checkout-web/assets/c1/Captcha.uTxdGdBM.js

js lateliermelanie.com collected 2026-09-29 10:10:29 UTC 4,356 bytes, 1 lines download raw bytes

1import{_ as D}from"./app.9pOKhaB_.js";import{d as H,r as U,e as B,o as R,G as y,k as O,h as x,u as s,b3 as M,y as _,E as P,j as w,A as L,b4 as F,f as I,g as J,i as g}from"./esnext-vendor.7EcvH7tF.js";import{H as j}from"./ShopPayCaptcha.BRfpdziH.js";import{iU as z,iV as N,f as V,bI as $,cc as K,aa as Q,k as T,W,A as G,ag as X,$ as Y,a8 as Z}from"./hydrate.CvWSYK3c.js";import{bC as ee,bD as ae,bl as te,ak as re,Q as b,cP as oe,cw as ne,ad as se,S as ie,bo as le,bp as ce}from"./utilities-previous.BNOUhCqt.js";import{c as ue}from"./PaymentErrorBanner.CWfF0M8f.js";const be=H({displayName:"Captcha",load:()=>U(()=>D(()=>Promise.resolve().then(()=>me),void 0))});function de({embed:r},i){const n=ee(r?.embedder),a=B(!1),e=z();return R(()=>{i.value?n&&y(()=>ae(r,"captcha")):a.value=!1}),R(()=>{if(!(!n||!a.value||!e))return y(()=>{e.value+=1}),()=>{y(()=>{e.value=Math.max(0,e.value-1)})}}),{onOpen:()=>{a.value=n&&!!i.value},onClose:()=>{a.value=!1}}}function A(r,i){return r?.status==="failed"&&i===r.id}function pe(){const[r,i]=N(te.LastSeenCaptchaRequestedErrorReceiptId),n=re(),{checkout:a}=b(),e=a.latestReceipt.value,[d,h]=O(()=>n.peek()?A(e,r):!0);return x(()=>{const c=A(e,r);h(c),e?.status==="failed"&&r!==e.id&&i(e.id),e?.status!=="failed"&&i(void 0)},[e?.id,e?.status]),d}function ve(){const{i18n:r}=b(),{progressing:i}=V(),{hasError:n,error:a}=$(oe),e=pe();return i.value||!n||!a||e?null:s(ue,{identifier:"CaptchaRequiredBanner",tone:"critical",children:r.translate("payment_errors.captcha_required_without_payment_information")})}let k=!1;const he=M(r=>{const{appContext:{i18n:i,observability:n},captchaSignal:a,errorSignal:e,lastJourneyProgression:d,negotiate:h,onViolation:c}=r,p=_(y(()=>a.value?.sitekey)),f=_(k),S=_(y(()=>!!a.value?.token)),u=P(()=>!!e.value),t=Date.now(),v=k,m=i.translate("captcha.errors.not_solved");w(()=>{const o=a.value;o?o.sitekey&&(p.value=o.sitekey):p.value=void 0}),w(()=>{const o=d.value,l=o.type==="error"?o.violations.map(q=>q.code):[],C=a.value;C&&C.violationCode&&l.includes(C.violationCode)?(c?.(),e.value=m):C?.token&&(e.value=void 0)});const E=P(()=>!!p.value);return{errorSignal:e,hasError:u,hasSiteKey:E,isLoaded:f,sitekey:p,solvedOnLoad:S,handleVerify(o){const l=a.value;l&&(a.value={...l,token:o,violationCode:void 0},h({include:["captcha"],skipStateUpdates:!0}))},handleLoad(){v||n.histogram({name:"captcha_load_time",value:Date.now()-t,attributes:{provider:a.value?.provider,success:!0}}),k=!0,f.value=!0},handleError(o){v||n.histogram({name:"captcha_load_time",value:Date.now()-t,attributes:{provider:a.peek()?.provider,success:!1,error:String(o)}})},validate(o){if(o&&!o.token)return m}}}),fe={Error:"MTtRU"};function ye(){const r=b(),{client:i,i18n:n}=r,a=i.unstable_getSerialization("workerVersion")!=="fast",e=K(),d=ne(),{lastJourneyProgression:h}=se(),{captcha:c}=ie(),{negotiate:p}=V(),f=L(null),{onOpen:S,onClose:u}=de(r,c),t=F(()=>new he({appContext:r,captchaSignal:c,errorSignal:d,lastJourneyProgression:h,negotiate:p,onViolation:()=>{u(),f.current?.resetCaptcha()}}));le(c,d,t.validate,ce.InvalidCaptcha);const v=L(null),m=Q({active:t.hasError.value});R(()=>{c.value&&t.isLoaded.value&&v.current&&(m.current=v.current.querySelector("iframe"))});const E=I(()=>t.isLoaded.value?void 0:"none"),o=I(()=>t.hasError.value?J(fe.Error):void 0);return s(g,{when:()=>{const l=t.solvedOnLoad.value&&!c.value?.sitekey;return!!(c.value?.provider==="hcaptcha"&&!l&&t.sitekey.value)},children:s(T,{gap:"large-100",children:[s(g,{when:()=>e.value&&t.isLoaded.value&&t.hasSiteKey.value,children:s(W,{tone:"critical",errorType:G.CheckoutError,children:n.translate("payment_errors.captcha_required_without_payment_information")})}),s(g,{when:()=>!t.isLoaded.value,children:s(X,{delay:a,contentDisplay:"block",inlineSize:"302px",blockSize:"83px"})}),s(Y,{accessibilityLabel:n.translate("captcha.title"),display:E.value,children:s(T,{gap:"small-400",children:[s(ve,{}),s("div",{className:o.value,ref:v,children:s(j,{sitekey:t.sitekey.value,onVerify:l=>{u(),t.handleVerify(l)},languageOverride:n.locale,ref:f,onLoad:t.handleLoad,onError:l=>{u(),t.handleError(l)}
1,onOpen:S,onClose:u,onChalExpired:u})}),s(g,{when:t.errorSignal,children:l=>s(Z,{children:l?.message??l})})]})})]})})}const me=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"}));export{be 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.