import{jsx as e}from"react/jsx-runtime";import{Turnstile as r}from"@marsidev/react-turnstile";import{u as t}from"./context-BKnOUECq.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";const o=({delayedExecution:o,captchaContext:n,...i})=>{let{appId:s,setError:c,setToken:p,setExecuting:a,siteKey:u,ref:d}=n,{scriptNonce:x}=t();/*#__PURE__*/return e(r,{...i,ref:d,siteKey:u??"",scriptOptions:x?{nonce:x}:void 0,options:{action:s,size:"invisible",...o?{appearance:"execute",execution:"execute"}:{appearance:"always",execution:"render"}},onUnsupported:()=>{i.onUnsupported?.(),console.warn("Browser does not support Turnstile.")},onError:e=>{i.onError?.(e),c("Captcha failed"),a(!1)},onSuccess:e=>{i.onSuccess?.(e),p(e),a(!1)},onExpire:e=>{i.onExpire?.(e);try{d.current?.reset(),c(void 0),p(void 0)}catch(e){c("expired_and_failed_reset")}}})};export{o as TurnstileWrapper,o as default};
//# sourceMappingURL=TurnstileWrapper-_Y3HPJpy.mjs.map
