1import{_ as q}from"./O-5LKUmK.js";import{u as V,c as E,w as A,o as u,a as t,b as p,d as s,e as y,i as _,v as k,t as d,f as w,r as o,g as C,h as P,j as F,k as M}from"./CuQRlHyk.js";const B={class:"auth-field"},D=["disabled"],N={key:0,class:"auth-success",role:"status"},L={key:1,class:"auth-error",role:"alert"},U={class:"auth-note"},T={class:"auth-field"},j={class:"auth-field"},H=["value"],$={class:"auth-actions"},z=["disabled"],G={key:0,class:"auth-success",role:"status"},I={key:1,class:"auth-error",role:"alert"},Q={__name:"index",setup(J){const f=o(""),c=o(""),i=o(""),m=o(""),b=o("request"),h=o(!1),v=o(!1),a=o(""),l=o("");V({title:"LinkedRadar - Forgot password",headTitle:"LinkedRadar - Forgot password",canonical:"https://linkedradar.com/user/forgot"},"LinkedRadar - Forgot password");async function S(g){g.preventDefault(),a.value="",l.value="",h.value=!0;try{const r=(await C(f.value))?.data?.credential;if(!r)throw new Error("Missing reset credential. Please try again.");m.value=r,b.value="reset",c.value="",i.value="",l.value="Verification code sent. Please check your email."}catch(e){a.value=P(e,"Password reset request failed. Please try again.")}finally{h.value=!1}}async function R(g){g.preventDefault(),a.value="",l.value="";const e=String(c.value).trim(),r=String(i.value);if(!e){a.value="Please enter the verification code.";return}if(r.length<6||r.length>32){a.value="Password must be 6-32 characters.";return}v.value=!0;try{await F(m.value,e,r),i.value="",M("/user/login")}catch(n){a.value=P(n,"Password reset failed. Please try again.")}finally{v.value=!1}}function x(){b.value="request",m.value="",c.value="",i.value="",a.value="",l.value=""}return(g,e)=>{const r=q;return u(),E(r,{"form-label":"Forgot password form","shell-offset":"0px"},{default:A(()=>[t(b)==="request"?(u(),p("form",{key:0,class:"auth-forgot-form",action:"/user/forgot",method:"post",onSubmit:S},[e[4]||(e[4]=s("h1",{class:"auth-page-title"},"Forgot password",-1)),s("div",B,[e[3]||(e[3]=s("label",{class:"auth-label",for:"forgot-email"},"Email address",-1)),y(s("input",{id:"forgot-email","onUpdate:modelValue":e[0]||(e[0]=n=>_(f)?f.value=n:null),class:"auth-input",type:"email",name:"email",placeholder:"[email protected]",autocomplete:"email",inputmode:"email",required:""},null,512),[[k,t(f)]])]),s("button",{class:"auth-submit auth-submit--full",type:"submit",disabled:t(h)},d(t(h)?"Sending...":"Send verification mail"),9,D),t(l)?(u(),p("p",N,d(t(l)),1)):w("",!0),t(a)?(u(),p("p",L,d(t(a)),1)):w("",!0)],32)):(u(),p("form",{key:1,class:"auth-forgot-form",action:"/user/password/reset",method:"post",onSubmit:R},[e[7]||(e[7]=s("h1",{class:"auth-page-title"},"Reset password",-1)),s("p",U," Enter the verification code sent to "+d(t(f))+". ",1),s("div",T,[e[5]||(e[5]=s("label",{class:"auth-label",for:"forgot-verification-code"},"Verification code",-1)),y(s("input",{id:"forgot-verification-code","onUpdate:modelValue":e[1]||(e[1]=n=>_(c)?c.value=n:null),class:"auth-input",type:"text",name:"verification_code",placeholder:"Verification code",autocomplete:"one-time-code",required:""},null,512),[[k,t(c)]])]),s("div",j,[e[6]||(e[6]=s("label",{class:"auth-label",for:"forgot-new-password"},"New password",-1)),y(s("input",{id:"forgot-new-password","onUpdate:modelValue":e[2]||(e[2]=n=>_(i)?i.value=n:null),class:"auth-input",type:"password",name:"new_password",placeholder:"New password",autocomplete:"new-password",minlength:"6",maxlength:"32",required:""},null,512),[[k,t(i)]])]),s("input",{type:"hidden",name:"credential",value:t(m)},null,8,H),s("div",$,[s("button",{class:"auth-submit",type:"submit",disabled:t(v)},d(t(v)?"Resetting...":"Reset"),9,z),s("button",{class:"auth-link-button",type:"button",onClick:x}," Edit email ")]),t(l)?(u(),p("p",G,d(t(l)),1)):w("",!0),t(a)?(u(),p("p",I,d(t(a)),1)):w("",!0)],32))]),_:1})}}};export{Q as default};
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.