1import{_ as b}from"./BodJxGTV.js";import{e as y,B as w,m as a,c as d,a as e,l as m,t as _,y as k,b as v,q as h,a1 as B,w as c,o as u,d as p}from"./D3mXZbvm.js";import{B as L}from"./CbyiM6aK.js";import"./D0HDmefO.js";const C={class:"min-h-screen bg-gray-50 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8"},M={class:"max-w-md w-full"},V={class:"bg-white shadow-lg rounded-xl p-6"},A={key:0,class:"mb-4 p-4 bg-green-50 border border-green-200 rounded-lg flex items-start justify-between"},N={key:1,class:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg flex items-start justify-between"},P={class:"flex items-start gap-3"},q={class:"text-sm text-red-700"},E={class:"relative"},z={class:"mt-6 text-center"},O=y({__name:"index",setup(S){const{request:f}=w(),l=a(""),s=a(null),r=a(!1),o=a(!1);async function x(){o.value=!0,r.value=!1,s.value=null;try{(await f("/api/v3/me/reset_password_request",{method:"POST",body:JSON.stringify({email:l.value})})).ok?(r.value=!0,l.value=""):s.value="User not found"}catch(n){console.error("Error:",n),s.value="An error occurred. Please try again."}finally{o.value=!1}}return(n,t)=>{const g=b;return u(),d("div",C,[e("div",M,[t[9]||(t[9]=e("div",{class:"text-center mb-8"},[e("h1",{class:"text-3xl font-bold text-gray-900"},"Password Reset"),e("p",{class:"mt-2 text-gray-600"},"Enter your email to receive a reset link")],-1)),e("div",V,[r.value?(u(),d("div",A,[t[3]||(t[3]=e("div",{class:"flex items-start gap-3"},[e("svg",{class:"h-5 w-5 text-green-500 mt-0.5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})]),e("span",{class:"text-sm text-green-700"},"Please check your email for a verification link.")],-1)),e("button",{onClick:t[0]||(t[0]=i=>r.value=!1),class:"text-green-500 hover:text-green-700 font-bold"}," â ")])):m("",!0),s.value?(u(),d("div",N,[e("div",P,[t[4]||(t[4]=e("svg",{class:"h-5 w-5 text-red-500 mt-0.5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"})],-1)),e("span",q,_(s.value),1)]),e("button",{onClick:t[1]||(t[1]=i=>s.value=null),class:"text-red-500 hover:text-red-700 font-bold"}," â ")])):m("",!0),e("form",{onSubmit:k(x,["prevent"]),class:"space-y-4"},[e("div",null,[t[6]||(t[6]=e("label",{class:"block text-sm font-medium text-gray-700 mb-1"},"Email Address",-1)),e("div",E,[t[5]||(t[5]=e("div",{class:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},[e("svg",{class:"h-5 w-5 text-gray-400",fill:"currentColor",viewBox:"0 0 16 16"},[e("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})])],-1)),h(e("input",{"onUpdate:modelValue":t[2]||(t[2]=i=>l.value=i),type:"email",placeholder:"Enter your email",required:"",class:"w-full pl-10 pr-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent outline-none transition-all"},null,512),[[B,l.value]])])]),v(L,{variant:"primary",block:"",type:"submit",loading:o.value,disabled:o.value},{default:c(()=>[...t[7]||(t[7]=[p(" Reset Password ",-1)])]),_:1},8,["loading","disabled"])],32),e("div",z,[v(g,{to:"/login",class:"text-sm text-secondary hover:underline font-medium"},{default:c(()=>[...t[8]||(t[8]=[p(" Back to Login ",-1)])]),_:1})])])])])}}});export{O 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.