1import{a as Q}from"./chunk-AAJZNDYQ.js";import{a as K}from"./chunk-E52Z6WVD.js";import{g as X}from"./chunk-YAZHLPIK.js";import{a as $,b as J,c as g}from"./chunk-YV65KTXK.js";import{a as U}from"./chunk-MXZRA744.js";import{a as W}from"./chunk-DE7B3DKQ.js";import{Aa as A,Ca as z,Ga as V,Ja as R,Xa as T,Ya as q,eb as H,pa as B,ra as j,ua as O,va as L,xa as N}from"./chunk-CZ7CIVLM.js";import"./chunk-7KIPWJCO.js";import{s as G}from"./chunk-7YFVVZJ2.js";import"./chunk-W35IR56S.js";import{Ad as u,Bb as n,Cb as m,Db as p,Lb as M,Nb as P,P as C,Pc as F,Va as s,Y as b,_a as l,_b as E,bd as I,c as w,da as y,ea as c,eb as _,fb as f,ga as x,kb as S,ld as k,pb as a,xd as D}from"./chunk-UFTGOEXC.js";import"./chunk-ZT2CETVV.js";var Y=(()=>{let t=class t{constructor(e){this.http=e}forgotPassword(e){let i="/api/public/temporal-link/password-recovery/action/send",r={email:e};return this.http.post(i,r)}};t.\u0275fac=function(i){return new(i||t)(x(k))},t.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function et(o,t){if(o&1&&(n(0,"div",12)(1,"div",13),p(2,"sn-validation-block",14),m()()),o&2){let v=P();s(2),a("validationMessage",v.getValidationErrorMessage(v.emailControl))}}var Z=(()=>{let t=class t{constructor(e,i,r,d){this.messageService=e,this.forgotPasswordService=i,this.resizeService=r,this.router=d,this.isLoaderActive=!1,this.unsubscribe$=new w,this.ButtonBehavior=q}get emailControl(){return this.form.get("email")}get isEmailControlTouchedAndInvalid(){return this.emailControl.touched&&this.emailControl.invalid}ngOnInit(){this.initForm(),this.onResize()}getValidationErrorMessage(e){return e.hasError("required")||e.hasError("whitespace")?g.required:e.hasError("emailError")?g.email:""}onSubmit(){if(this.form.valid){let{email:e}=this.form.value;this.isLoaderActive=!0,this.forgotPasswordService.forgotPassword(e).pipe(C(()=>this.isLoaderActive=!1)).subscribe({next:()=>{this.messageService.showToaster("s_0","forgotPassword"),this.router.navigate(["/login"])},error:({error:i})=>{let{errorMessage:r,errorTitle:d}=i;this.messageService.showErrorFromBackend(d,r)}})}else this.form.markAllAsTouched()}onResize(){this.resizeService.onResize.pipe(b(this.unsubscribe$)).subscribe(e=>this.isMobile=e)}initForm(){this.form=new N({email:new A(null,[j.required,Q,X])})}};t.\u0275fac=function(i){return new(i||t)(l(G),l(Y),l(U),l(D))},t.\u0275cmp=_({type:t,selectors:[["forgot-password"]],standalone:!1,decls:14,vars:9,consts:[[1,"forgot-password"],[1,"forgot-password__container"],[1,"forgot-password__logo-wrapper"],[1,"forgot-password__title"],[1,"forgot-password__form",3,"ngSubmit","formGroup"],[1,"forgot-password__form--input-group"],[1,"forgot-password__form--control"],["formControlName","email","type","email","id","email","name","email","placeholder","Email",1,"input-field-alt","control"],["class","input-field-alt-bottom-container",4,"ngIf"],[1,"forgot-password__form--submit-wrapper"],[3,"text","isDisabled","isLoading","type","isFullWidth"],["text","Go Back",3,"isLink","linkUrl"],[1,"input-field-alt-bottom-container"],[1,"input-field-alt-bottom-container__validations-wrapper"],[3,"validationMessage"]],template:function(i,r){i&1&&(n(0,"section",0)(1,"div",1)(2,"div",2),p(3,"sn-logo"),m(),n(4,"h1",3),E(5," Enter your email address below to reset your password "),m(),n(6,"form",4),M("ngSubmit",function(){return r.onSubmit()}),n(7,"div",5)(8,"div",6),p(9,"input",7),S(10,et,3,1,"div",8),m()(),n(11,"div",9),p(12,"sn-button-solid-primary",10)(13,"sn-button-outlined",11),m()()()()),i&2&&(s(6),a("formGroup",r.form),s(4),a("ngIf",r.isEmailControlTouchedAndInvalid),s(2),a("text","Submit")("isDisabled",r.isLoaderActive)("isLoading",r.isLoaderActive)("type",r.ButtonBehavior.Submit)("isFullWidth",!0),s(),a("isLink",!0)("linkUrl","/login"))},dependencies:[F,z,B,O,L,V,R,$,W,K,H],styles:[".color-grey-dusty[_ngcontent-%COMP%]{color:#71717a}.color-discount[_ngcontent-%COMP%]{color:#0ea5e9!important}[_nghost-%COMP%]{flex-grow:1;display:flex;flex-direction:column}.forgot-password[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;justify-content:center}.forgot-password__container[_ngcontent-%COMP%]{flex-grow:1;background-color:#fff;border-radius:12px;padding:40px 35px;max-width:500px;box-shadow:0 5px 5px -5px #0000001a}.forgot-password__logo-wrapper[_ngcontent-%COMP%]{width:fit-content;margin:0 auto}.forgot-password__title[_ngcontent-%COMP%]{margin:20px 0 0;color:#18181b;font-size:16px;font-weight:400;text-align:center}.forgot-password__form[_ngcontent-%COMP%]{margin:40px 0 0}.forgot-password__form--input-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:15px 0}.forgot-password__form--submit-wrapper[_ngcontent-%COMP%]{margin:40px 0 0;display:flex;flex-direction:column;gap:20px}"]});let o=t;return o}
1)();var it=[{path:"",component:Z,data:{title:"Password recovery"}}],tt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=f({type:t}),t.\u0275inj=c({imports:[u.forChild(it),u]});let o=t;return o})();var Ut=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=f({type:t}),t.\u0275inj=c({imports:[I,tt,T,J]});let o=t;return o})();export{Ut as ForgotPasswordModule};
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.