1import{a as oe}from"./chunk-S6RHC4OQ.js";import{a as W,b as X,c as h,d as re,e as ae}from"./chunk-SC77GQW6.js";import{a as ie}from"./chunk-WCQ5MRGP.js";import{a as Y,b as Z,c as se}from"./chunk-7B6IP7OH.js";import{d as b,f as G,g as H,k as j,l as z,m as J,o as K,q as Q}from"./chunk-FYPEPGSC.js";import{a as q,b as L}from"./chunk-NSR42SGR.js";import{b as $,c as ee,d as te}from"./chunk-RHTNV24R.js";import{a as S,i as F,k as A}from"./chunk-NN5RN7BI.js";import{a as R}from"./chunk-IVKBMZBT.js";import"./chunk-NY7GZANU.js";import"./chunk-4YRY4IP2.js";import{j as T}from"./chunk-ZT4Y4NFU.js";import{h as D,m as U,y as O,z as V}from"./chunk-YX6KSJVM.js";import{l as I,u as B}from"./chunk-AV36S2ZU.js";import{Ab as g,Bb as n,Ea as e,Kb as k,Mb as P,Ta as E,Tb as i,U as d,Ub as s,Xa as m,Y as C,db as r,eb as a,fb as v,na as x,nb as N,rb as M,zb as o}from"./chunk-LMB57KD4.js";import"./chunk-4CLCTAJ7.js";var _=c=>({"text-red-500 block":c});function le(c,p){c&1&&(r(0,"h1",17),o(1),i(2,"translate"),a(),r(3,"p",18),o(4),i(5,"translate"),a()),c&2&&(e(),n(" ",s(2,2,"password_recovery.description")," "),e(3),n(" ",s(5,4,"reset_password.title")," "))}var y=class c{fb=d(K);destroy=d(x);userService=d(oe);messageService=d(D);authService=d(se);router=d(T);dataService=d(R);translateService=d($);form=this.fb.group({currentPassword:["",[b.required]],newPassword:["",[b.required,h()]],repeatNewPassword:["",[b.required,h()]]},{validator:[re.MatchingPasswords]});constructor(){}ngOnInit(){let p=this.dataService.getEmail(),t=this.router.parseUrl(this.router.url).queryParams.email;!p&&!t&&this.router.navigate(["/"+S]),t&&this.dataService.setEmail(t)}getPasswordErrorMessage(p){return ae(this.form.get(p))}reset(){if(this.form.valid){let{currentPassword:p,newPassword:u,repeatNewPassword:t}=this.form.value;if(this.dataService.getToken()){let l={passwdActual:p,passwdNuevo:u};this.userService.putActualizarPassword(l).subscribe({next:()=>{this.messageService.add({severity:"success",summary:this.translateService.instant("user.status.success.summary"),detail:this.translateService.instant("user.status.success.detail")}),this.router.navigate([F+"/"+A])},error:f=>{}})}else{let l={email:this.dataService.getEmail(),passwd:u,token:p};this.authService.resetPassword(l).pipe(ie(this.destroy)).subscribe(()=>{this.router.navigate(["/"+S])})}}}static \u0275fac=function(u){return new(u||c)};static \u0275cmp=C({type:c,selectors:[["app-reset-password"]],standalone:!0,features:[k],decls:52,vars:56,consts:[[1,"container","p-external"],["id","form-title",1,"text-2xl","font-bold","text-neutral-800","mb-[0.938rem]","hidden","lg:block"],["pTemplate","header"],["aria-labelledby","form-title",1,"flex","flex-col","gap-y-3","pt-3","lg:pt-0","border-t","lg:border-t-0","border-t-solid","border-neutral-300",3,"formGroup"],[1,"form-group"],["id","currentPassword","aria-required","true","styleClass","w-full","autocomplete","off","inputStyleClass","w-full","formControlName","currentPassword","aria-describedby","currentPassword-help",3,"toggleMask","feedback"],["for","currentPassword"],["id","currentPassword-help",3,"ngClass"],["id","newPassword","aria-required","true","styleClass","w-full","autocomplete","off","inputStyleClass","w-full","formControlName","newPassword","aria-describedby","newPassword-help",3,"toggleMask","feedback"],["for","newPassword"],["id","newPassword-help",3,"ngClass"],["id","repeatNewPassword","aria-required","true","styleClass","w-full","autocomplete","off","inputStyleClass","w-full","formControlName","repeatNewPassword","aria-describedby","repeatNewPassword-help",3,"toggleMask","feedback"],["for","repeatNewPassword"],["id","repeatNewPassword-help",3,"ngClass"],[1,"text-m","font-light"],[1,"text-xs","font-light","list-disc","list-inside","pl-2"],["type","submit","styleClass","w-full",3,"onClick","label","disabled"],["id","form-title",1,"sr-only","lg:hidden"],[1,"text-m","mb-3","font-light","lg:hidden"]],template:function(u,t){if(u&1&&(r(0,"section",0)(1,"h1",1),o(2),i(3,"translate"),a(),r(4,"p-card"),E(5,le,6,6,"ng-template",2),r(6,"form",3)(7,"div",4)(8,"p-floatLabel"),v(9,"p-password",5),r(10,"label",6),o(11),i(12,"translate"),a()(),r(13,"small",7),o(14),i(15,"translate"),a()(),r(16,"div",4)(17,"p-floatLabel"),v(18,"p-password",8),r(19,"label",9),o(20),i(21,"translate"),a()(),r(22,"small",10),o(23),i(24,"translate"),a()(),r(25,"div",4)(26,"p-floatLabel"),v(27,"p-password",11),r(28,"label",12),o(29),i(30,"translate"),a()(),r(31,"small",13),o(32),i(33,"translate"),a()(),r(34,"p",14),o(35),i(36,"translate"),a(),r(37,"ul",15)(38,"li"),o(39),i(40,"translate"),a(),r(41,"li"),o(42),i(43,"translate"),a(),r(44,"li"),o(45),i(46,"translate"),a(),r(47,"li"),o(48),i(49,"translate"),a()(),r(50,"p-button",16),i(51,"translate"),N("onClick",function(){return t.reset()}),a()()()()),u&2){let l,f,w;e(2),n(" ",s(3,24,"reset_password.title")," "),e(4),m("formGroup",t.form),e(3),m("toggleMask",!1)("feedback",!1),e(2),n("",s(12,26,"reset_password.current_password"),"*"),e(2),m("ngClass",P(50,_,((l=t.form.get("currentPassword"))==null?null:l.invalid)&&
1(((l=t.form.get("currentPassword"))==null?null:l.touched)||((l=t.form.get("currentPassword"))==null?null:l.dirty)))),e(),n("",s(15,28,t.getPasswordErrorMessage("currentPassword"))," "),e(4),m("toggleMask",!0)("feedback",!1),e(2),n("",s(21,30,"reset_password.new_password"),"*"),e(2),m("ngClass",P(52,_,((f=t.form.get("newPassword"))==null?null:f.invalid)&&(((f=t.form.get("newPassword"))==null?null:f.touched)||((f=t.form.get("newPassword"))==null?null:f.dirty)))),e(),g(s(24,32,t.getPasswordErrorMessage("newPassword"))),e(4),m("toggleMask",!0)("feedback",!0),e(2),n("",s(30,34,"reset_password.repeat_new_password"),"*"),e(2),m("ngClass",P(54,_,((w=t.form.get("repeatNewPassword"))==null?null:w.invalid)&&(((w=t.form.get("repeatNewPassword"))==null?null:w.touched)||((w=t.form.get("repeatNewPassword"))==null?null:w.dirty)))),e(),g(s(33,36,t.getPasswordErrorMessage("repeatNewPassword"))),e(3),n(" ",s(36,38,"reset_password.password_features.label"),": "),e(4),n(" ",s(40,40,"reset_password.password_features.capital_letter")," "),e(3),g(s(43,42,"reset_password.password_features.number")),e(3),n(" ",s(46,44,"reset_password.password_features.special_character")," "),e(3),g(s(49,46,"reset_password.password_features.min_length")),e(2),M("label",s(51,48,"reset_password.button.label.submit")),m("disabled",t.form.invalid)}},dependencies:[Q,j,G,H,z,J,B,I,L,q,U,Z,Y,V,O,X,W,te,ee]})};export{y 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.