1import{_ as V}from"./BZt_Ri8C.js";import{_ as A}from"./DnMM_Yjt.js";import{d as F,u as B,s as M,$ as T,e as a,f as i,h as s,t as n,g as e,i as w,j as m,E as U,K as D,L as P,D as j,M as q,r as g,p as I,l as E,k as S}from"./CFxGRstO.js";import{i as L}from"./Dhu0ts9N.js";import{c as O,a as z,u as H,b as K}from"./CgWzIhW9.js";import{_ as W}from"./6HuN2jx9.js";import{_ as G}from"./CR0-Au_c.js";import"./B0kMgEDL.js";import"./BxawZQSS.js";import"./Cpj98o6Y.js";import"./B2a-ywG8.js";import"./BWBHGvIx.js";import"./-vsEa_js.js";import"./DlAUqK2U.js";const J={class:"tw-text-h4 !tw-text-yellow !tw-mb-6 tw-text-center password-form-header"},Q={class:"sign-in-block tw-mx-auto"},X={key:0,class:"tw-mb-4 tw-text-center"},Y={key:1,class:"alert alert-warning"},Z={key:2,class:"alert alert-danger"},ee={class:"tw-mb-6"},te={class:"tw-mb-4"},se={for:"email",class:"form-label"},oe={key:0,class:"error-msg invalid-feedback"},re={class:"tw-grid tw-gap-2 tw-py-2 tw-mb-4"},ae=F({__name:"PasswordRestoreForm",setup(N){const{t:l}=B(),y=M(),f=O({email:z().required(l("validation.common.information_required")).email(l("validation.email.enter_valid")).min(5).max(200)}),{handleSubmit:v,isSubmitting:_,errors:$,meta:C,setFieldError:R}=H({validationSchema:f}),{value:c,errorMessage:k}=K("email"),d=g(!1),b=g(""),u=g(""),x=v(async o=>{d.value=!1,b.value="",u.value="";const{userErrors:t}=await y.sendRestorePasswordEmail(o.email);if(!t)d.value=!0;else{const{error_code:h,error_message:p,hash:r}=t;h===T.NONACTIVATED_USER&&r?b.value=r:p&&(u.value=p)}});return(o,t)=>{const h=V,p=A;return a(),i("div",null,[s("h1",J,n(o.$t("user.password_restore_form.password_recovery_title")),1),s("div",Q,[e(d)?(a(),i("div",X,[w(h,{content:o.$t("user.password_restore_form.sent_email")},null,8,["content"])])):m("",!0),e(b)?(a(),i("div",Y,n(o.$t("user.password_restore_form.email_not_activated",{email:e(c)})),1)):m("",!0),e(u)?(a(),i("div",Z,n(e(u)),1)):m("",!0),e(d)?m("",!0):(a(),i("form",{key:3,onSubmit:t[2]||(t[2]=U((...r)=>e(x)&&e(x)(...r),["prevent"]))},[s("div",ee,[s("div",te,[s("label",se,n(o.$t("user.password_restore_form.email_label")),1),D(s("input",{"onUpdate:modelValue":t[0]||(t[0]=r=>q(c)?c.value=r:null),type:"email",name:"email",class:j(["form-control",[e($).email&&"is-invalid"]]),onFocus:t[1]||(t[1]=r=>e(R)("email",""))},null,34),[[P,e(c)]]),e(k)?(a(),i("div",oe,n(e(k)),1)):m("",!0)])]),s("div",re,[w(p,{label:o.$t("user.password_restore_form.submit_button"),class:"btn btn-md btn-primary btn-spinner ripple",type:"submit",disabled:e(_)||!e(L)(e($))&&e(C).touched,loading:e(_)},null,8,["label","disabled","loading"])])],32))])])}}}),ne=Object.assign(ae,{__name:"UserPasswordRestoreForm"}),ie={class:"tw-flex tw-gap-x-4 tw-justify-center"},le={class:"tw-mb-4"},ke=F({__name:"password-restore",setup(N){return(l,y)=>{const f=ne,v=W,_=G;return a(),I(_,null,{default:E(()=>[w(f,{class:"tw-mx-auto sign-in-block"}),s("div",ie,[s("p",le,[S(n(l.$t("user.password_restore_form.remember_password"))+" ",1),w(v,{to:"/user/sign-in"},{default:E(()=>[S(n(l.$t("user.password_restore_form.sign_in")),1)]),_:1})])])]),_:1})}}});
1export{ke 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.