1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c767fd7e-46f5-5185-b59b-31953e5f809c")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[973],{3652:(e,r,s)=>{"use strict";s.d(r,{A:()=>o});let o={src:"/_next/static/media/[email protected]",height:250,width:500,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAANlBMVEVqfHwpKSkpKis7PD4gIiIoKSpQU1RCREUbGxsjIyQmKCgbGxsXFxdjaWohISEWFhYzNTaIjpC0owA1AAAAD3RSTlMCL/2904X7/RP95Y1X7iGgJJMbAAAACXBIWXMAAAsSAAALEgHS3X78AAAAKElEQVQImQXBhxEAEBAAwXs+CoP+m7ULgJgA2cd+mqTeFn4WVuFRZ34K+gDSevFCqgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:4}},4268:(e,r,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset",function(){return s(5009)}])},5009:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>y});var o=s(6029),t=s(5729),a=s(2789),n=s(2203),i=s.n(n),l=s(1278),d=s(1909),c=s(6663),h=s(4567),u=s(8808),p=s(5687),A=s(8068),x=s(2446),m=s(7670),j=s(9276),g=s(3652);let w="password_reset",f=(0,h.I4)(i(),{...h.MH}),_=(0,h.I4)("a",{...h.MH}),y=()=>{var e,r,s;let n=(0,l.useRouter)(),i=(0,j.u)(null!=(r=n.query.code)?r:""),_=decodeURIComponent((0,j.u)(null!=(s=n.query.email)?s:"")),[y,C]=(0,t.useState)(!1),b=(0,t.useRef)(null),k=(0,p.QcF)(),v=k.error?(0,A.u$)(k.error,{error:"Couldn't send password reset email."}):void 0,I=(0,t.useMemo)(()=>c.Ik({password:c.Yj().min(1),code:u._U,email:c.Yj().email(),captcha_token:c.Yj().min(1),...y&&{tfa:u.TL}}).merge((0,h.D)("password")),[y]),R=(0,d.mN)({mode:"onChange",criteriaMode:"all",shouldUnregister:!0,values:{email:_,code:i,password:"",captcha_token:""},resolver:(0,a.u)(I)}),{register:S,setValue:F,setError:U,handleSubmit:K,unregister:L,formState:{isSubmitting:M,errors:N,isValid:P}}=R;(0,t.useEffect)(()=>{y||L("tfa")},[y,L]);let X=K(async e=>{try{await k.mutateAsync({...e,tfa:e.tfa})}catch(r){let e=(0,A.u$)(r);("your tfa code is invalid"===e.error||e.codes.some(e=>"tfa_incorrect"===e.type))&&C(!0),U("api_error",{type:"api",message:r.error})}finally{var r;null==(r=b.current)||r.reset()}});return!i||!_||function(e){return(null==e?void 0:e.error)==="This password reset link has expired."||(null==e?void 0:e.codes.some(e=>"token_expired"===e.type))}(v)?(0,o.jsx)(E,{email:_}):(0,o.jsx)(d.Op,{...R,children:(0,o.jsx)(x.mO,{layout:"center",children:(0,o.jsx)("form",{onSubmit:X,children:(0,o.jsx)(x.lV,{id:w,title:"Reset Your Password",titleLevel:"h1",hero:g.A,children:k.isSuccess?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:"Your password has been reset."}),(0,o.jsxs)("p",{children:["You may now log into the app."," ",(0,o.jsx)(f,{href:"/login",children:"Log In"})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:"Enter a new password."}),(0,o.jsx)(h.pd,{type:"hidden",...S("code")}),(0,o.jsx)(h.pd,{type:"hidden",...S("email")}),(0,o.jsx)(h.pd,{type:"hidden",...S("captcha_token")}),(0,o.jsx)(h.dh,{children:(0,o.jsx)(h.dh.Label,{label:"Password",children:(0,o.jsx)(h.yA,{formId:w,identifier:"password",placeholder:"************",autoFocus:!0,autoComplete:"new-password"})})}),y&&(0,o.jsx)(h.dh,{children:(0,o.jsx)(h.dh.Label,{label:"Code",children:(0,o.jsx)(h.pd,{type:"text",inputMode:"numeric",autoFocus:!0,...S("tfa",{required:!0})})})}),N.api_error?(0,o.jsx)(h.Kw,{children:null==(e=N.api_error)?void 0:e.message}):null,(0,o.jsx)(h.hK,{ref:b,siteKey:m.xx,action:h.sN.ForgotPassword,onSuccess:e=>{F("captcha_token",e,{shouldValidate:!0})}}),(0,o.jsx)(x.En,{css:{marginTop:"$xlarge"},children:(0,o.jsx)(h.$n,{wide:!0,id:"submit_reset_password",disabled:M||!P,children:"Change Password"})})]})})})})})};function E(e){let{email:r}=e;return(0,o.jsx)(x.mO,{layout:"center",children:(0,o.jsxs)(x.lV,{title:"Reset Your Password",hero:g.A,titleLevel:"h1",children:[(0,o.jsx)("p",{children:"The password reset link you followed is invalid."}),(0,o.jsxs)("p",{children:["Click"," ",(0,o.jsx)(f,{href:r?"/forgot?email=".concat(encodeURIComponent(r)):"/forgot",children:"here"})," ","to receive a new link."]}),(0,o.jsxs)("p",{children:["If you can't access your account, please"," ",(0,o.jsx)(_,{href:"https://support.parsec.app",children:"contact support"})," ","or ask for help in our"," ",(0,o.jsx)(_,{href:"/",children:"Discord Server"}),"."]})]})})}}},e=>{e.O(0,[636,593,792],()=>e(e.s=4268)),_N_E=e.O()}]); 4//# sourceMappingURL=reset-f7c8c0a13e4ad98b.js.map 5//# debugId=c767fd7e-46f5-5185-b59b-31953e5f809c
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.