1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4076],{53349:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/forgot-password",function(){return t(16947)}])},16947:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSG:function(){return y},default:function(){return v}});var n=t(85893),o=t(67294),i=t(62212),s=t(82175),a=t(41664),c=t.n(a),u=t(11163),l=t(86501),d=t(67421),f=t(74231),m=t(67896),p=t(48162),h=t(47989),x=t(24073),w=t(95823);function g(){let{t:e}=(0,d.$G)(),r=(0,u.useRouter)(),[t,a]=(0,o.useState)(!1),[g,b]=(0,o.useState)("required"),[y,v]=(0,o.useState)(null),E=(0,o.useRef)(null),_=f.Ry({email:f.Z_().email(e("form:errors.email").toString()).required(e("form:errors.required").toString())}),S=async e=>{let r=await fetch("/api/verify-captcha",{method:"POST",body:JSON.stringify({token:e}),headers:{"content-type":"application/json"}}),t=await r.json();return t},N=(0,s.TA)({initialValues:{email:""},validationSchema:_,onSubmit:async n=>{if(t)return;if(!y){l.Am.error(e("auth:signup.turnstile_required").toString());return}if("success"!==g){l.Am.error(e("auth:signup.turnstile_error").toString());return}a(!0);let o=l.Am.loading(e("auth:signup.turnstile_checking").toString());try{let i=await S(y);i.success?(l.Am.loading(e("auth:forgot_password.loading").toString(),{id:o}),await w.ON.forgotPassword(n.email),l.Am.success(e("auth:forgot_password.success").toString(),{id:o}),r.push("/auth/login")):l.Am.error(i.message||e("auth:signup.turnstile_timeout_or_duplicate").toString(),{id:o}),E.current&&(E.current.reset(),v(null),b("required"))}catch(s){l.Am.error((null==s?void 0:s.message)||e("common:errors.unknown").toString(),{id:o}),E.current&&(E.current.reset(),v(null),b("required"))}finally{a(!1)}}});return(0,n.jsxs)("div",{className:"mx-auto w-full max-w-sm select-none bg-white",children:[(0,n.jsxs)("div",{className:"mb-8 flex flex-col gap-2",children:[(0,n.jsx)("p",{className:"text-2xl font-semibold",children:e("auth:forgot_password.reset_password")}),(0,n.jsx)("p",{className:"text-[#464646]",children:e("auth:forgot_password.reset_password_description")})]}),(0,n.jsxs)("form",{onSubmit:N.handleSubmit,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(x._,{htmlFor:"email",children:e("form:email")}),(0,n.jsxs)("div",{className:"mt-1",children:[(0,n.jsx)(h.I,{id:"email",name:"email",type:"email",placeholder:e("form:placeholder.email").toString(),value:N.values.email,onChange:N.handleChange,error:N.touched.email&&!!N.errors.email}),(0,n.jsx)("div",{className:"flex min-h-6 items-center",children:(0,n.jsx)(p.J,{error:N.touched.email&&N.errors.email})})]})]}),(0,n.jsx)(i.Nc,{ref:E,siteKey:"0x4AAAAAAB6tAEeDBwzsFx-S",as:"span",onSuccess:e=>{v(e),b("success")},onLoad:()=>{b("required")},onError:()=>{b("error")},onExpire:()=>{b("expired")},options:{theme:"light",size:"flexible",language:r.locale}}),(0,n.jsx)(m.z,{disabled:t||!y,type:"submit",className:"mt-4 w-full",children:e("auth:reset_password.reset_password")})]}),(0,n.jsxs)("div",{className:"flex w-full items-center py-6",children:[(0,n.jsx)("hr",{className:"flex-grow border-border"}),(0,n.jsx)("span",{className:"mx-4 text-sm text-muted-foreground",children:e("auth:or")}),(0,n.jsx)("hr",{className:"flex-grow border-border"})]}),(0,n.jsx)("p",{className:"text-center text-sm",children:(0,n.jsx)(d.cC,{i18nKey:"auth:forgot_password.back_to_login",components:{login:(0,n.jsx)(c(),{href:"/auth/login",className:"cursor-pointer font-semibold text-primary"})}})})]})}function b(){return(0,n.jsx)(g,{})}b.pageOptions={title:"forgot_password",layout:"auth"};var y=!0,v=b},62212:function(e,r,t){"use strict";t.d(r,{Nc:function(){return x}});var n,o=t(67294),i=t(85893),s=({as:e="div",...r},t)=>(0,i.jsx)(e,{...r,ref:t}),a=(0,o.forwardRef)(s),c="cf-turnstile-script",u="onloadTurnstileCallback",l=e=>!!document.getElementById(e),d=({render:e="explicit",onLoadCallbackName:r=u,scriptOptions:{nonce:t="",defer:n=!0,async:o=!0,id:i="",appendTo:s,onError:a,crossOrigin:d=""}={}})=>{let f=i||c;if(l(f))return;let m=document.createElement("script");m.id=f,m.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${r}&render=${e}`,document.querySelector(`script[src="${m.src}"]`)||(m.defer=!!n,m.async=!!o,t&&(m.nonce=t),d&&(m.crossOrigin=d),a&&(m.onerror=a,delete window[r]),("body"===s?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},f={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}},m="unloaded",p=new Promise((e,r)=>{n={resolve:e,reject:r},"ready"===m&&e(void 0)}),h=(e=u)=>("unloaded"===m&&(m="loading",window[e]=()=>{n.resolve(),m="ready",delete window[e]}),p),x=(0,o.forwardRef)((e,r)=>{let{scriptOptions:t,options:n={},siteKey:s,onWidgetLoad:p,onSuccess:x,onExpire:w,onError:g,onBeforeInteractive:b,onAfterInteractive:y,onUnsupported:v,onTimeout:E,onLoadScript:_,id:S,style:N,as:j="div",injectScript:T=!0,rerenderOnCallbackChange:k=!1,...A}=e,O=n.size,I=(0,o.useCallback)(()=>typeof O>"u"?{}:"execute"===n.execution?f.invisible:"interaction-only"===n.appearance?f.interactionOnly:f[O],[n.execution,O,n.appearance]),[C,R]=(0,o.useState)(I()),F=(0,o.useRef)(null),[q,B]=(0,o.useState)(!1),P=(0,o.useRef)(),L=(0,o.useRef)(!1),z=S||"cf-turnstile",$=(0,o.useRef)({onSuccess:x,onError:g,onExpire:w,onBeforeInteractive:b,onAfterInteractive:y,onUnsupported:v,onTimeout:E});(0,o.useEffect)(()=>{k||($.current={onSuccess:x,onError:g,onExpire:w,onBeforeInteractive:b,onAfterInteractive:y,onUnsupported:v,onTimeout:E})});let D=t?.id||c,U=function(e=c){let[r,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let r=()=>{l(e)&&t(!0)},n=new MutationObserver(r);return n.observe(document,{childList:!0,subtree:!0}),r(),()=>{n.disconnect()}},[e]),r}(D),K=t?.onLoadCallbackName||u,G=n.appearance||"always",J=(0,o.useMemo)(()=>({sitekey:s,action:n.action,cData:n.cData,theme:n.theme||"auto",language:n.language||"auto",tabindex:n.tabIndex,"response-field":n.responseField,"response-field-name":n.responseFieldName,size:function(e){if("invisible"!==e&&"interactionOnly"!==e)return e}(O),retry:n.retry||"auto","retry-interval":n.retryInterval||8e3,"refresh-expired":n.refreshExpired||"auto","refresh-timeout":n.refreshTimeout||"auto",execution:n.execution||"render",appearance:n.appearance||"always","feedback-enabled":n.feedbackEnabled||!0,callback:e=>{L.current=!0,k?x?.(e):$.current.onSuccess?.(e)}
1,"error-callback":k?g:(...e)=>$.current.onError?.(...e),"expired-callback":k?w:(...e)=>$.current.onExpire?.(...e),"before-interactive-callback":k?b:(...e)=>$.current.onBeforeInteractive?.(...e),"after-interactive-callback":k?y:(...e)=>$.current.onAfterInteractive?.(...e),"unsupported-callback":k?v:(...e)=>$.current.onUnsupported?.(...e),"timeout-callback":k?E:(...e)=>$.current.onTimeout?.(...e)}),[n.action,n.appearance,n.cData,n.execution,n.language,n.refreshExpired,n.responseField,n.responseFieldName,n.retry,n.retryInterval,n.tabIndex,n.theme,n.feedbackEnabled,n.refreshTimeout,s,O,k,k?x:null,k?g:null,k?w:null,k?b:null,k?y:null,k?v:null,k?E:null]),M=(0,o.useCallback)(()=>"u">typeof window&&!!window.turnstile,[]);return(0,o.useEffect)(function(){T&&!q&&d({onLoadCallbackName:K,scriptOptions:{...t,id:D}})},[T,q,t,D]),(0,o.useEffect)(function(){"ready"!==m&&h(K).then(()=>B(!0)).catch(console.error)},[]),(0,o.useEffect)(function(){if(!F.current||!q)return;let e=!1;return(async()=>{if(e||!F.current)return;let r=window.turnstile.render(F.current,J);P.current=r,P.current&&p?.(P.current)})(),()=>{e=!0,P.current&&(window.turnstile.remove(P.current),L.current=!1)}},[z,q,J]),(0,o.useImperativeHandle)(r,()=>{let{turnstile:e}=window;return{getResponse(){if(!e?.getResponse||!P.current||!M()){console.warn("Turnstile has not been loaded");return}return e.getResponse(P.current)},getResponsePromise:async(e=3e4,r=100)=>new Promise((t,n)=>{let o,i=async()=>{if(L.current&&window.turnstile&&P.current)try{let s=window.turnstile.getResponse(P.current);return o&&clearTimeout(o),s?t(s):n(Error("No response received"))}catch(a){return o&&clearTimeout(o),console.warn("Failed to get response",a),n(Error("Failed to get response"))}o||(o=setTimeout(()=>{o&&clearTimeout(o),n(Error("Timeout"))},e)),await new Promise(e=>setTimeout(e,r)),await i()};i()}),reset(){if(!e?.reset||!P.current||!M()){console.warn("Turnstile has not been loaded");return}"execute"===n.execution&&R(f.invisible);try{L.current=!1,e.reset(P.current)}catch(r){console.warn(`Failed to reset Turnstile widget ${P}`,r)}},remove(){if(!e?.remove||!P.current||!M()){console.warn("Turnstile has not been loaded");return}R(f.invisible),L.current=!1,e.remove(P.current),P.current=null},render(){if(!e?.render||!F.current||!M()||P.current){console.warn("Turnstile has not been loaded or container not found");return}let r=e.render(F.current,J);return P.current=r,P.current&&p?.(P.current),"execute"!==n.execution&&R(O?f[O]:{}),r},execute(){if("execute"!==n.execution){console.warn('Execution mode is not set to "execute"');return}if(!e?.execute||!F.current||!P.current||!M()){console.warn("Turnstile has not been loaded or container not found");return}e.execute(F.current,J),R(O?f[O]:{})},isExpired:()=>e?.isExpired&&P.current&&M()?e.isExpired(P.current):(console.warn("Turnstile has not been loaded"),!1)}},[P,n.execution,O,J,F,M,q,p]),(0,o.useEffect)(()=>{U&&!q&&window.turnstile&&B(!0)},[q,U]),(0,o.useEffect)(()=>{R(I())},[n.execution,O,G]),(0,o.useEffect)(()=>{U&&"function"==typeof _&&_()},[U]),(0,i.jsx)(a,{ref:F,as:j,id:z,style:{...C,...N},...A})});x.displayName="Turnstile"}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=53349)}),_N_E=e.O()}]);
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.