1import{r as C,p as S,c as $}from"./validators-Dt4PswuR.js";import{d as D,r as l,ay as F,s as c,x as a,u as I,aK as T,o as V,j as o,a as i,g as b,b as e,h as y,t as P,w as g,an as v,V as j,$ as z,bl as A}from"./main-vVWkt7fP.js";import{_ as Y}from"./AppTextField.vue_vue_type_script_setup_true_lang-DqQyhdB2.js";import{u as R,a as G,b as H}from"./misc-mask-light-BPp6QYDj.js";import{a as q,V as u}from"./VRow-DwWfugfq.js";import{V as U}from"./VCard-CiQWOoun.js";import{V as N}from"./VCardText-nizojxKQ.js";import{V as L}from"./VAlert-Sq73aFtR.js";import{V as E}from"./VForm-DU7bJNUZ.js";import"./VTextField-DI4hQ5U4.js";import"./VAvatar-p1ifphmk.js";const K="/build/assets/auth-v2-reset-password-illustration-dark-CE3CHW7Q.png",Q="/build/assets/auth-v2-reset-password-illustration-light-DHNgGprY.png",ne=D({__name:"reset-password",setup(W){const k=F(),x=I(),r=l({token:k.query.token||"",email:k.query.email||"",password:"",password_confirmation:""}),d=l(!1),p=l(!1),_=l(),w=l(!1),m=l(""),f=l("");R(Q,K),R(H,G);const B=()=>{_.value?.validate().then(async({valid:t})=>{if(t){w.value=!0,m.value="";try{await z(A.resetPassword(),{body:r.value}),f.value="Your password has been reset successfully. Redirecting to login...",setTimeout(()=>{x.push({name:"auth-login"})},3e3)}catch(s){m.value=s.response?._data?.message||"Something went wrong. Please try again."}finally{w.value=!1}}})};return(t,s)=>{const h=Y,M=T("RouterLink");return V(),c(q,{"no-gutters":"",class:"auth-wrapper bg-surface"},{default:a(()=>[o(u,{cols:"12",class:"auth-card-v2 d-flex align-center justify-center"},{default:a(()=>[o(U,{flat:"","max-width":500,class:"mt-12 mt-sm-0 pa-6"},{default:a(()=>[o(N,null,{default:a(()=>[...s[4]||(s[4]=[i("h4",{class:"text-h4 mb-1"},"Reset Password ï¸ð",-1),i("p",{class:"mb-0"}," Your new password must be different from previously used passwords. ",-1)])]),_:1}),o(N,null,{default:a(()=>[e(m)?(V(),c(L,{key:0,type:"error",variant:"tonal",class:"mb-4"},{default:a(()=>[y(P(e(m)),1)]),_:1})):b("",!0),e(f)?(V(),c(L,{key:1,type:"success",variant:"tonal",class:"mb-4"},{default:a(()=>[y(P(e(f)),1)]),_:1})):b("",!0),e(f)?b("",!0):(V(),c(E,{key:2,ref_key:"refVForm",ref:_,onSubmit:g(B,["prevent"])},{default:a(()=>[o(q,null,{default:a(()=>[o(u,{cols:"12"},{default:a(()=>[o(h,{modelValue:e(r).password,"onUpdate:modelValue":s[1]||(s[1]=n=>e(r).password=n),label:"New Password",placeholder:"············",type:e(d)?"text":"password",rules:["requiredValidator"in t?t.requiredValidator:e(C),"passwordValidator"in t?t.passwordValidator:e(S)]},{"append-inner":a(()=>[i("button",{"aria-label":"View Password",class:"cursor-pointer",onClick:s[0]||(s[0]=g(n=>d.value=!e(d),["stop","prevent"]))},[o(v,{size:"20",icon:e(d)?"tabler-eye-off":"tabler-eye"},null,8,["icon"])])]),_:1},8,["modelValue","type","rules"])]),_:1}),o(u,{cols:"12"},{default:a(()=>[o(h,{modelValue:e(r).password_confirmation,"onUpdate:modelValue":s[3]||(s[3]=n=>e(r).password_confirmation=n),label:"Confirm Password",placeholder:"············",type:e(p)?"text":"password",rules:["requiredValidator"in t?t.requiredValidator:e(C),("confirmedValidator"in t?t.confirmedValidator:e($))(e(r).password_confirmation,e(r).password)]},{"append-inner":a(()=>[i("button",{"aria-label":"View Password Confirmation",class:"cursor-pointer",onClick:s[2]||(s[2]=g(n=>p.value=!e(p),["stop","prevent"]))},[o(v,{size:"20",icon:e(p)?"tabler-eye-off":"tabler-eye"},null,8,["icon"])])]),_:1},8,["modelValue","type","rules"])]),_:1}),o(u,{cols:"12"},{default:a(()=>[o(j,{block:"",type:"submit",loading:e(w)},{default:a(()=>[...s[5]||(s[5]=[y(" Set New Password ",-1)])]),_:1},8,["loading"])]),_:1}),o(u,{cols:"12"},{default:a(()=>[o(M,{class:"d-flex align-center justify-center",to:{name:"auth-login"}},{default:a(()=>[o(v,{icon:"tabler-chevron-left",size:"20",class:"me-1"}),s[6]||(s[6]=i("span",null,"Back to Login",-1))]),_:1})]),_:1})]),_:1})]),_:1},512))]),_:1})]),_:1})]),_:1})]),_:1})}}});
1export{ne 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.