1import{d as Q,e as Y}from"./chunk-RLSWOVDT.js";import{a as g}from"./chunk-R4XOYVWN.js";import{d as J,f as K}from"./chunk-OAYWNNVQ.js";import{b as j}from"./chunk-2ULDDXAS.js";import"./chunk-GFWWV4QI.js";import"./chunk-IUQCH2H2.js";import{a as Z}from"./chunk-ZMQO674N.js";import"./chunk-OJ5SGU2G.js";import"./chunk-HBTSX4PH.js";import"./chunk-6VTALCLJ.js";import{h as $,l as B,n as W,v as U,x as k}from"./chunk-3HIJGZNS.js";import{b as q}from"./chunk-J73H6GVH.js";import{ka as z}from"./chunk-HG2KJIXI.js";import{a as X,b as V}from"./chunk-VFHZC24D.js";import{G as D,T as L,w as y}from"./chunk-DCCTWKN3.js";import"./chunk-SOAFUH3B.js";import"./chunk-OAP3SD3B.js";import"./chunk-WGGLAIRF.js";import{Fb as u,Hc as b,Ne as H,Tc as x,Vb as o,X as N,Yb as R,ad as E,cb as w,da as T,dd as F,f as P,fc as r,gc as _,hc as d,ib as s,ic as O,jb as c,jc as v,lc as C,pe as G,qc as S,ra as h,sa as f,tc as A,uc as l,yb as M,zb as I}from"./chunk-6DJ64ZIX.js";import"./chunk-6WSAPZ5B.js";import"./chunk-QBCHIEM6.js";var ie=()=>({color:"green"});function oe(t,p){if(t&1&&d(0,"div",10),t&2){let e=l(2);o("innerHTML",e.authErrorMsg.join("<br/>"),w);}}function re(t,p){if(t&1){let e=C();O(0),r(1,"div",6)(2,"h2"),S(3,2),_()(),r(4,"form",7),d(5,"ush-form-field-new-password"),u(6,oe,1,1,"div",8),r(7,"button",9),A("click",function(){h(e);let i=l();return f(i.setNewPass());}),_()(),v();}if(t&2){let e=l();s(4),o("formGroup",e.newPassForm),s(2),o("ngIf",e.authErrorMsg==null?null:e.authErrorMsg.length),s(),o("loading",e.loading)("disabled",!e.newPassForm.valid);}}function ae(t,p){t&1&&d(0,"ush-loading-indicator",11),t&2&&o("fontSize","25px")("color","white")("aligning","absolute-center");}function se(t,p){if(t&1){let e=C();r(0,"div",12),d(1,"fa-icon",13),r(2,"h2",14),S(3,3),_(),r(4,"button",15),A("click",function(){h(e);let i=l();return f(i.onContinue());}),_()();}if(t&2){let e=l();s(),R(x(3,ie)),o("icon",e.checkIcon);}}var ee=(()=>{class t{constructor(e,n,i,a,m){this.formBuilder=e,this.route=n,this.authService=i,this.uiAuthService=a,this.cd=m,this.checkIcon=z,this.destroy$=new P(),this.route.params.pipe(L()).subscribe(te=>{this.token=te.token;});}ngOnInit(){this.newPassForm=this.formBuilder.group({});}setNewPass(){this.newPassForm.valid&&(this.newPass({password:this.newPassForm.controls.newPassword.value,token:this.token}),this.newPassForm.valueChanges.pipe(N(this.destroy$)).subscribe(()=>{this.authErrorMsg=[];}));}newPass(e){this.loading=!0,this.authService.changePassword(e).subscribe(n=>{n.success?this.newPassResetSucess=!0:(this.authErrorMsg=[],this.authErrorMsg.push("Registration error: "+n.msg)),this.loading=!1,this.cd.detectChanges();},()=>{this.authErrorMsg=[],this.authErrorMsg.push("Sorry, the credentials you provided are incorrect.<br/>Please double-check your credentials and try again."),this.loading=!1,this.cd.detectChanges();});}onContinue(){this.uiAuthService.redirectToLogin({},"/");}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.unsubscribe();}static{this.ɵfac=function(n){return new(n||t)(c(U),c(y),c(q),c(Z),c(F));};}static{this.ɵcmp=M({type:t,selectors:[["ush-feature-change-password"]],standalone:!1,decls:6,vars:2,consts:()=>{let e;e="Update password";let n;n="Update your password";let i;i="Continue to login";let a;return a="Your password has been changed",[["loadingSpinner",""],["msgPageTemplate",""],n,a,[1,"form-wrapper"],[4,"ngIf","ngIfElse"],[1,"form-header",2,"display","flex"],["id","new-pass-form",1,"form-group",3,"formGroup"],["class","error-msg",3,"innerHTML",4,"ngIf"],["pButton","","label",e,1,"recover-btn",3,"click","loading","disabled"],[1,"error-msg",3,"innerHTML"],[3,"fontSize","color","aligning"],[1,"msg-page-content-wrapper"],["size","4x",3,"icon"],[1,"msg-text"],["pButton","","label",i,3,"click"]];},template:function(n,i){if(n&1&&(r(0,"div",4),u(1,re,8,4,"ng-container",5),_(),u(2,ae,1,3,"ng-template",null,0,E)(4,se,5,4,"ng-template",null,1,E)),n&2){let a=b(5);s(),o("ngIf",!i.newPassResetSucess)("ngIfElse",a);}},dependencies:[G,g,B,$,W,J,X,Q],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;min-height:calc(100vh - var(--header-height))}.form-wrapper[_ngcontent-%COMP%]{display:flex;row-gap:var(--spacing-lg, 10px);flex-direction:column;padding:var(--spacing-lg, 20px);width:100%;max-width:450px}h2[_ngcontent-%COMP%]{margin:0}.error-msg[_ngcontent-%COMP%]{display:block;margin-bottom:var(--spacing-lg)}.msg-page-content-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.msg-page-content-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:var(--spacing-lg, 20px)}"]});}}return t;})();var ce=[{path:"",component:ee}],He=(()=>{class t{static{this.ɵfac=function(n){return new(n||t)();};}static{this.ɵmod=I({type:t});}static{this.ɵinj=T({imports:[H,D.forChild(ce),g,k,K,j,V,Y]}
1);}}return t;})();export{He as AuthenticationFeatureChangePasswordModule};/**i18n:56baa791221b8bbb3094b78db02e63320fe1446ad30ff962e46d8a439f5f8c6f*/
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.