1import{o as l,c as b,w as c,a as t,h as d,e as x,g as f,C as v,f as u,t as m,b as w,v as h,i as _,j as S,r as n,k as C}from"./app-WAKmHpkM.js";import{_ as j}from"./AuthShell-uVPmP3Rc.js";const N={key:0,class:"text-center"},T={class:"mb-6"},V={class:"w-16 h-16 bg-gray-100 dark:bg-gray-800 rounded-full flex items-center justify-center mx-auto mb-4"},B={class:"text-gray-500 dark:text-gray-400 text-sm"},E={class:"font-medium text-black dark:text-white"},F={key:0,class:"text-sm text-red-600"},P=["disabled"],D={class:"mt-6 text-center text-sm text-gray-500 dark:text-gray-400"},q={__name:"ForgotPasswordPage",setup(M){const a=n(""),o=n(!1),r=n(""),i=n(!1),y=async()=>{r.value="",o.value=!0;try{const s=await fetch("/api/forgot-password",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({email:a.value})}),e=await s.json();if(!s.ok)throw new Error(e.error||"Failed to send reset link");i.value=!0}catch(s){r.value=s.message||"Failed to send reset link. Please try again."}finally{o.value=!1}},g=()=>{a.value="",i.value=!1,r.value=""};return(s,e)=>{const p=C("router-link");return l(),b(j,null,{default:c(()=>[e[6]||(e[6]=t("h2",{class:"text-3xl font-bold text-black dark:text-white text-center mb-4"},"Reset password",-1)),e[7]||(e[7]=t("p",{class:"text-center text-gray-500 dark:text-gray-400 mb-8"}," Enter your email address and we'll send you a link to reset your password. ",-1)),i.value?(l(),d("div",N,[t("div",T,[t("div",V,[x(f(v),{class:"w-8 h-8 text-gray-900 dark:text-white"})]),e[2]||(e[2]=t("h3",{class:"text-xl font-bold text-black dark:text-white mb-2"},"Check your email",-1)),t("p",B,[e[1]||(e[1]=u(" We've sent a password reset link to ",-1)),t("span",E,m(a.value),1)])]),t("button",{onClick:g,class:"text-gray-900 dark:text-white font-medium hover:text-gray-600 dark:hover:text-gray-300 transition-colors cursor-pointer"}," Try another email ")])):(l(),d("form",{key:1,onSubmit:S(y,["prevent"]),class:"space-y-5"},[t("div",null,[e[3]||(e[3]=t("label",{class:"block text-sm font-medium text-black dark:text-white mb-1"},"Email",-1)),w(t("input",{"onUpdate:modelValue":e[0]||(e[0]=k=>a.value=k),type:"email",required:"",class:"w-full px-4 py-3 border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white rounded-lg focus:ring-2 focus:ring-gray-900 focus:border-gray-900 outline-none transition-colors",placeholder:"[email protected]"},null,512),[[h,a.value]])]),r.value?(l(),d("p",F,m(r.value),1)):_("",!0),t("button",{disabled:o.value,type:"submit",class:"w-full py-3.5 bg-gray-900 dark:bg-white text-white dark:text-gray-900 text-base font-medium rounded-full hover:bg-gray-800 dark:hover:bg-gray-200 transition-colors disabled:opacity-60 cursor-pointer"},m(o.value?"Sending...":"Send reset link"),9,P)],32)),t("p",D,[e[5]||(e[5]=u(" Remember your password? ",-1)),x(p,{to:"/login",class:"text-gray-900 dark:text-white font-medium hover:text-gray-600 dark:hover:text-gray-300 transition-colors"},{default:c(()=>[...e[4]||(e[4]=[u(" Sign in ",-1)])]),_:1})])]),_: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.