1import{_ as B}from"./BasePassword.vue.Ci2q2pQv.js";import{F as H}from"./vee-validate.Dw4L4HVN.js";import{d as T,u as A,B as L,J as N,E as V,G as b,a as $,c as D,e as l,t as m,k as o,h as d,w as u,A as p,o as i,g as h,f,i as F,s as R,p as q}from"./entry.lLzgxQwF.js";import I from"./index.D8fLDkWx.js";import{t as M}from"./vee-validate-zod.1BdpjG6S.js";import{b as O}from"./breadcrumb.DA1y6C57.js";import"./BaseLabel.vue.j288bYSC.js";import"./index.CIPUq9O0.js";import"./index.D5C8mPoM.js";import"./index.DBSuAEM3.js";import"./index.B6B87RiT.js";import"./index.OUzLJM5a.js";import"./index.oFcjbbzx.js";const j={class:"flex justify-center p-4 m-4"},E={class:"p-6 w-full lg:w-6/12"},W={class:"text-center mb-8"},G={class:"text-3xl font-bold text-black"},le=T({__name:"[resetPasswordHash]",setup(J){const g=p(null),{t:e,localeRoute:v}=A(),k=L(),x=N(),y=O(),r=p(),t=p();y.setBreadcrumbs(e("breadcrumbs.reset"));const C=M(V({password:b({error:e("errors.requiredField")}).min(1,e("errors.required")).min(6,e("errors.minLength",{minLength:6})),passwordConfirmation:b({error:e("errors.requiredField")}).min(1,e("errors.required")).min(6,e("errors.minLength",{minLength:6}))}).refine(s=>s.password===s.passwordConfirmation,{message:e("errors.passwordsDoNotMatch"),path:["passwordConfirmation"]})),S=async s=>{r.value=null,t.value=null;const{password:_}=s,a=String(k.params.resetPasswordHash),{data:c,error:n}=await q.POST("/api/auth/reset-password",{body:{password:_,resetPasswordHash:a}});if(n){if(n.error==="INVALID_PASSWORD_HASH"){r.value=e("errors.INVALID_PASSWORD_HASH");return}r.value=e("errors.generic");return}t.value=e("success.resetPassword"),setTimeout(()=>{x.push(v("/login"))},3e3)};return $({title:`${e("reset.title")} | ${e("meta.suffix")}`}),(s,_)=>{const a=I,c=B,n=R,w=H;return i(),D("div",j,[l("div",E,[l("div",W,[l("div",G,m(s.$t("reset.title")),1)]),o(t)?(i(),d(a,{key:0,class:"col-span-12",closable:!1,severity:"success"},{default:u(()=>[h(m(o(t)),1)]),_:1})):(i(),d(w,{key:1,class:"flex flex-col gap-4","validation-schema":o(C),ref_key:"form",ref:g},{default:u(({handleSubmit:P,values:z,errors:K})=>[f(c,{feedback:!0,label:"field.password",name:"password"}),f(c,{feedback:!1,label:"field.passwordConfirmation",name:"passwordConfirmation"}),o(r)?(i(),d(a,{key:0,closable:!1,severity:"error"},{default:u(()=>[h(m(o(r)),1)]),_:1})):F("",!0),f(n,{class:"mt-4",severity:"success",label:s.$t("buttons.newPassword"),onClick:Q=>P(S)},null,8,["label","onClick"])]),_:1},8,["validation-schema"]))])])}}});export{le 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.