PageSourceSearch

https://my.flxnetworks.com/accountmanager-client/chunk-MYIHIC7H.js

js flxnetworks.com collected 2026-10-07 17:36:18 UTC 55,097 bytes, 1 lines download raw bytes

1import{a as y}from"./chunk-D2TYCJZR.js";import{A as Ct,B as Le,H as yt,K as Pt,L,a as he,d as Q,f as w,h as ee,i as te,l as M,n as ie,q as ne,r as oe,y as $,z as wt}from"./chunk-KIRV7JID.js";import{a as I}from"./chunk-K7DISDIA.js";import{i as H}from"./chunk-2BRZAJ5E.js";import{F as be,G as ye,O as mt,T as fe,ca as ut,da as ft,e as ae,ea as Be,f as le,fa as Pe,g as ze,ga as Y,h as lt,ha as gt,ia as ht,l as Oe,ma as B,na as _t,oa as ge,p as z,pa as vt,q as ct,r as U,s as K,sa as T,u as dt,w as S,z as pt}from"./chunk-67XZ5Q4X.js";import{a as Ee,b as Te,c as _e,e as Re,f as xt,g as bt}from"./chunk-WZITRQLL.js";import"./chunk-H2YPWG7R.js";import{$a as Ze,$b as E,Cc as X,D as re,Gc as tt,H as k,Hc as it,Mb as W,Nb as J,Rb as p,Sb as r,Tb as a,Ub as g,Vc as nt,W as me,Xa as Ae,Ya as O,aa as Ie,ba as We,bb as d,bc as v,cc as h,da as Je,ea as ue,fa as Xe,g as Ge,kd as ot,l as q,la as C,ld as rt,ma as x,mc as P,md as V,n as xe,nb as u,nc as Qe,o as R,oc as se,ra as Ye,rc as m,sc as ke,sd as st,t as F,tb as b,tc as et,ub as Ke,va as Ve,xd as at,zb as _,zc as D}from"./chunk-LZGDPDUB.js";import"./chunk-TSRGIXR5.js";function Ut(n,o){if(n&1&&(r(0,"div",11)(1,"div",12),g(2,"img",13),a(),r(3,"span",14),m(4),a()()),n&2){let s=o.$implicit;Qe("top",s.top,"%")("left",s.left,"%"),d(2),p("src",s.icon,O),d(2),ke(s.label)}}function Nt(n,o){if(n&1&&(r(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6),g(5,"img",7),r(6,"div",8),_(7,Ut,5,6,"div",9),a()()(),r(8,"div",10),g(9,"router-outlet"),a()()()()),n&2){let s=h();d(5),p("src",s.imageSources.loginBG,O),d(2),p("ngForOf",s.icons)}}function jt(n,o){n&1&&(r(0,"div",15),g(1,"router-outlet"),a())}var St=(()=>{let o=class o{constructor(){this.imageSources=I,this.isMobile=!1,this.icons=[{icon:this.imageSources.amrp,label:"Relationship Portals",top:12.1,left:41.79},{icon:this.imageSources.eventCenter,label:"Event Center",top:23.45,left:47.058},{icon:this.imageSources.intelligence,label:"Intelligence Hub",top:38,left:49.67},{icon:this.imageSources.manufacturing,label:"Manufacturer Profiles",top:52.3,left:49.67},{icon:this.imageSources.diligence,label:"Diligence Center",top:66.23,left:47.734},{icon:this.imageSources.market,label:"Solutions Marketplace",top:78.274,left:43.42}]}ngOnInit(){this.checkScreenSize()}onResize(e){this.checkScreenSize()}checkScreenSize(){window.innerWidth<1025?this.isMobile=!0:this.isMobile=!1}};o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=b({type:o,selectors:[["app-account"]],hostBindings:function(t,i){t&1&&v("resize",function(l){return i.onResize(l)},Ze)},standalone:!1,decls:2,vars:2,consts:[["class","welcome h-100",4,"ngIf"],["class","mobile-login-screens",4,"ngIf"],[1,"welcome","h-100"],[1,"account-container","h-100"],[1,"pane-container","h-100"],[1,"globe-wrapper"],[1,"globe-aspect-box"],["alt","",1,"globe-bg",3,"src"],[1,"icon-layer"],["class","floating-icon",3,"top","left",4,"ngFor","ngForOf"],[1,"right-pane","pane"],[1,"floating-icon"],[1,"icon-circle"],[3,"src"],[1,"icon-label"],[1,"mobile-login-screens"]],template:function(t,i){t&1&&_(0,Nt,10,2,"div",0)(1,jt,2,0,"div",1),t&2&&(p("ngIf",!i.isMobile),d(),p("ngIf",i.isMobile))},dependencies:[rt,V,ct],styles:['@charset "UTF-8";.account-container[_ngcontent-%COMP%]{background:#000 repeat-y;height:100%}.pane-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;justify-content:flex-end;background:#000;width:100%;overflow:hidden}.globe-wrapper[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center}.globe-aspect-box[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1802/873;max-height:100%}.globe-bg[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;display:block}.icon-layer[_ngcontent-%COMP%]{position:absolute;inset:0}.right-pane[_ngcontent-%COMP%]{overflow-y:auto;width:40%}.img-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;padding-right:160px}.img-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:58px;width:130px}@media (max-width: 1025px){.left-pane[_ngcontent-%COMP%]{display:none}#sidebar[_ngcontent-%COMP%]{width:100%}}.floating-icon[_ngcontent-%COMP%]{position:absolute;transform:translate(-50%,-50%);z-index:2}.icon-circle[_ngcontent-%COMP%]{width:94px;height:94px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#000a1eb3;border:2px solid #00cfff;transition:transform .3s ease,box-shadow .3s ease,background .3s ease;cursor:pointer}.icon-circle[_ngcontent-%COMP%]{width:clamp(45px,4.75vw,110px);height:clamp(45px,4.75vw,110px)}.icon-circle[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:clamp(20px,2vw,48px);height:clamp(20px,2vw,48px)}.icon-circle[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:48px;height:48px;object-fit:contain}.icon-circle[_ngcontent-%COMP%]:hover{transform:scale(1.08);box-shadow:0 0 8px #00cfff,0 0 16px #00cfffcc;background:#001432f2}.icon-tooltip[_ngcontent-%COMP%]{position:absolute;top:80px;left:50%;transform:translate(-50%);color:#fff;font-size:14px;opacity:0;transition:opacity .3s ease;white-space:nowrap}.floating-icon[_ngcontent-%COMP%]:hover   .icon-tooltip[_ngcontent-%COMP%]{opacity:1}.icon-label[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%);font-family:Inter,sans-serif;font-weight:600;font-size:13px;color:#fff;white-space:nowrap;opacity:0;transition:opacity .2s ease;pointer-events:none;z-index:5}.floating-icon[_ngcontent-%COMP%]:hover   .icon-label[_ngcontent-%COMP%]{opacity:1}.floating-icon[_ngcontent-%COMP%]:hover{z-index:6}']});let n=o;return n})();var de=class extends ye{};de=q([be],de);var qe=class extends ye{};qe=q([be],qe);var pe=class extends ye{};pe=q([be],pe);var ve=class extends ye{};ve=q([be],ve);var Ce=(()=>{let o=class o{constructor(e,t,i,c){this.modalRef=e,this.store=t,this.appService=i,this.tnc=c,this.images=I}ngOnInit(){}onAccept(){let e=this.appService.currentUser,t={app_id:e.appId,user_id:e.id,name:e.first_Name+" "+e.last_Name,email_Address:e.email_Address};this.store.dispatch(new y.AcceptUserTnC(new ft(t))).subscribe(()=>this.modalRef.close(!0))}};o.\u0275fac=function(t){return new(t||o)(u(Ee),u(B),u(T),u(Te))},o.\u0275cmp=b({type:o,selectors:[["app-terms-conditions"]],standalone:!1,decls:7,vars:1,consts:[["mat-dialog-title","",1,"header"],[1,"mat-typography"],[1,"content",3,"innerHtml"],[1,"justify-content-end","mr-3"],[1,"btn","btn-primary","float-right",3,"click"]],template:function(t,i){t&1&&(r(0,"h4",0),m(1,"Terms and Conditions"),a(),r(2,"mat-dialog-content",1),g(3,"div",2),a(),r(4,"mat-dialog-actions",3)(5,"button",4),v("click",function(){return i.onAccept()}),m(6,"Accept"),a()()),t&2&&(d(3),p("innerHtml",i.tnc.description,Ae))},dependencies:[Re,bt,xt],encapsulation:2});let n=o;return n})();var Ft=new Je("API_BASE_newURL"),j=(()=>{let o=class o{constructor(e,t){this.jsonParseReviver=void 0,this.http=e,this.baseUrl=t??S.apiBasenewUrl}sendAuthrequest(e,t){let i=S.AM_API_URL+`/api/Accounts/auth-request?SAMLRequest=${e}&RelayState=${t}`;i=i.replace(/[?&]$/,"");let l={body:JSON.stringify({}),observe:"response",responseType:"blob",headers:new ae({"Content-Type":"application/json",Accept:"text/plain"})};return this.http.request("post",i,l).pipe(F(f=>this.processAuthrequest(f))).pipe(re(f=>{if(f instanceof le)try{return this.processAuthrequest(f)}catch(A){return R(A)}else return R(f)}))}processAuthrequest(e){let t=e.status,i=e instanceof ze?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)for(let l of e.headers.keys())c[l]=e.headers.get(l);return t===200?Pe(i).pipe(F(l=>{let f=l===""?null:JSON.parse(l,this.jsonParseReviver);return xe(f)})):t!==200&&t!==204?Pe(i).pipe(F(l=>Be("An unexpected server error occurred.",t,l,c))):xe(null)}checkSSO(e){let t=S.SSO_AUTH;t=t.replace(/[?&]$/,"");let i={body:e,observe:"response",responseType:"blob",headers:new ae({"Content-Type":"application/json",Accept:"text/plain"})};return this.http.request("post",t,i).pipe(F(c=>this.processCheckSSO(c))).pipe(re(c=>{if(c instanceof le)try{return this.processCheckSSO(c)}catch(l){return R(l)}else return R(c)}))}processCheckSSO(e){let t=e.status,i=e instanceof ze?e.body:e.error instanceof Blob?e.error:void 0,c={};if(e.headers)for(let l of e.headers.keys())c[l]=e.headers.get(l);return t===200?Pe(i).pipe(F(l=>{let f=null,A=l===""?null:JSON.parse(l,this.jsonParseReviver);return xe(A)})):t!==200&&t!==204?Pe(i).pipe(F(l=>Be("An unexpected server error occurred.",t,l,c))):xe(null)}validatePasswordLink(e){let t=this.baseUrl+"/api/AccountManagerLogins/validate-create-password-link";t=t.replace(/[?&]$/,"");let i={body:e,observe:"response",responseType:"blob",headers:new ae({"Content-Type":"application/json",Accept:"text/plain"})};return this.http.request("post",t,i).pipe(F(c=>Y(c,de))).pipe(re(c=>{if(c instanceof le)try{return Y(c,de)}catch(l){return R(l)}else return R(c)}))}regeneratePasswordResetLink(e){let t=this.baseUrl+"/api/AccountManagerLogins/create-reset-link";t=t.replace(/[?&]$/,"");let i={body:e,observe:"response",responseType:"blob",headers:new ae({"Content-Type":"application/json",Accept:"text/plain"})};return this.http.request("post",t,i).pipe(F(c=>Y(c,de))).pipe(re(c=>{if(c instanceof le)try{return Y(c,de)}catch(l){return console.log("error in regenerate link:",l),R(l)}else return R(c)}))}passwordReset(e){let t=this.baseUrl+"/api/AccountManagerLogins/reset-password";t=t.replace(/[?&]$/,"");let c={body:JSON.stringify(e),observe:"response",responseType:"blob",headers:new ae({"Content-Type":"application/json",Accept:"text/plain"})};return this.http.request("post",t,c).pipe(F(l=>Y(l,pe))).pipe(re(l=>{if(l instanceof le)try{return Y(l,pe)}catch(f){return R(f)}else return R(l)}))}requestPasswordReset(e){let t=this.baseUrl+"/api/AccountManagerLogins/create-reset-link";t=t.replace(/[?&]$/,"");let c={body:JSON.stringify(e),observe:"response",responseType:"blob",headers:new ae({"Content-Type":"application/json",Accept:"text/plain"})};return this.http.request("post",t,c).pipe(F(l=>Y(l,pe))).pipe(re(l=>{if(l instanceof le)try{return Y(l,pe)}catch(f){return R(f)}else return R(l)}))}};o.\u0275fac=function(t){return new(t||o)(ue(lt),ue(Ft,8))}
1,o.\u0275prov=Ie({token:o,factory:o.\u0275fac});let n=o;return n})();var Mt=()=>["/account/password-forgotten"];function Vt(n,o){if(n&1){let s=E();r(0,"i",24),v("click",function(){C(s);let t=h(3);return x(t.resetEmail())}),a()}}function zt(n,o){n&1&&(r(0,"div"),m(1," * Email is required. "),a())}function Bt(n,o){n&1&&(r(0,"div"),m(1," * Please enter a valid email address. "),a())}function $t(n,o){if(n&1&&_(0,zt,2,0,"div",25)(1,Bt,2,0,"div",25),n&2){let s,e,t=h(3);p("ngIf",(s=t.form.get("emailAddress"))==null||s.errors==null?null:s.errors.required),d(),p("ngIf",(e=t.form.get("emailAddress"))==null||e.errors==null?null:e.errors.pattern)}}function Ht(n,o){n&1&&g(0,"i",33)}function Gt(n,o){n&1&&g(0,"i",34)}function Wt(n,o){if(n&1){let s=E();r(0,"div",26)(1,"label",27),m(2,"Password "),r(3,"span",12),m(4,"*"),a()(),r(5,"div",28),g(6,"input",29,0),r(8,"a",30),v("click",function(){C(s);let t=P(7),i=h(3);return x(i.onPasswordEye(t))}),_(9,Ht,1,0,"i",31)(10,Gt,1,0,"i",32),a()()()}if(n&2){let s=P(7);d(9),p("ngIf",s.type=="text"),d(),p("ngIf",s.type=="password")}}function Jt(n,o){if(n&1&&(r(0,"button",35),m(1," Login "),a()),n&2){let s=h(3);se("spinner",s.busy),p("disabled",s.form.invalid||s.busy)("disabled",s.busy)}}function Xt(n,o){if(n&1){let s=E();r(0,"button",36),v("click",function(t){return C(s),h(3).onNext(),x(t.preventDefault())}),m(1," Next "),a()}if(n&2){let s=h(3);se("spinner",s.busy),p("disabled",s.form.invalid||s.busy)("disabled",s.busy)}}function Yt(n,o){n&1&&(r(0,"a",20),m(1,"Forgot your password?"),a()),n&2&&p("routerLink",X(1,Mt))}function Zt(n,o){if(n&1&&(r(0,"div",15)(1,"div"),m(2),a()()),n&2){let s=h(3);d(2),ke(s.errorMsg)}}function Kt(n,o){if(n&1){let s=E();r(0,"div",23)(1,"div",37),g(2,"i",38),r(3,"span",39),m(4," Your password has expired. To protect your account, you'll need to reset your password before signing in. "),a(),r(5,"a",40),v("click",function(){C(s);let t=h(3);return x(t.resetPassword())}),m(6," Reset your password. "),a()()()}}function Qt(n,o){if(n&1){let s=E();r(0,"div",6),g(1,"img",7),r(2,"h3"),m(3,"Welcome Back"),a(),r(4,"div",8)(5,"p"),m(6,"Sign in to continue to your account"),a()(),r(7,"form",9),v("submit",function(){C(s);let t=h(2);return x(t.login())}),r(8,"div",10)(9,"label",11),m(10,"Email "),r(11,"span",12),m(12,"*"),a()(),r(13,"input",13),v("keyup",function(){C(s);let t=h(2);return x(t.clearErrMsg())}),a(),_(14,Vt,1,0,"i",14),r(15,"div",15),W(16,$t,2,2),a()(),_(17,Wt,11,2,"div",16),r(18,"div",17),_(19,Jt,2,4,"button",18)(20,Xt,2,4,"button",19),a()(),W(21,Yt,2,2,"a",20),r(22,"div",21)(23,"span"),m(24,"Not a member?"),a(),r(25,"a",22)(26,"b"),m(27,"JOIN FLX NETWORKS"),a()()(),W(28,Zt,3,1,"div",15),W(29,Kt,7,0,"div",23),a()}if(n&2){let s,e=h(2);d(),p("src",D(e.image.flxNewLogo),O),d(6),p("formGroup",e.form),d(7),p("ngIf",e.isPassword),d(2),J((s=e.form.get("emailAddress"))!=null&&s.invalid&&((s=e.form.get("emailAddress"))!=null&&s.dirty||(s=e.form.get("emailAddress"))!=null&&s.touched)?16:-1),d(),p("ngIf",e.isPassword),d(2),p("ngIf",e.isPassword),d(),p("ngIf",!e.isPassword),d(),J(e.isPasswordExpired?-1:21),d(7),J(e.errorMsg&&!e.isPasswordExpired?28:-1),d(),J(e.isPasswordExpired?29:-1)}}function ei(n,o){if(n&1&&(r(0,"div",3)(1,"div",4),_(2,Qt,30,11,"div",5),a()()),n&2){let s=h();d(2),p("ngIf",s.form)}}function ti(n,o){n&1&&g(0,"i",33)}function ii(n,o){n&1&&g(0,"i",34)}function ni(n,o){if(n&1&&(r(0,"div",47),g(1,"app-alert-message",48),a()),n&2){let s=h(3);d(),p("alertType","error")("message",s.errorMsg)}}function oi(n,o){if(n&1){let s=E();r(0,"div",6)(1,"h3"),m(2,"Member Login"),a(),r(3,"div",8)(4,"p")(5,"span"),m(6,"Not a member?"),a(),r(7,"a",44)(8,"b"),m(9,"JOIN FLX Networks"),a()()()(),r(10,"form",9),v("submit",function(){C(s);let t=h(2);return x(t.login())}),r(11,"div",26),g(12,"input",45),a(),r(13,"div",26)(14,"div",28),g(15,"input",29,0),r(17,"a",30),v("click",function(){C(s);let t=P(16),i=h(2);return x(i.onPasswordEye(t))}),_(18,ti,1,0,"i",31)(19,ii,1,0,"i",32),a()()(),r(20,"div",17)(21,"button",35),m(22," Login "),a()()(),r(23,"a",20),m(24,"Forgot your password?"),a(),_(25,ni,2,2,"div",46),a()}if(n&2){let s=P(16),e=h(2);d(10),p("formGroup",e.form),d(8),p("ngIf",s.type=="text"),d(),p("ngIf",s.type=="password"),d(2),se("spinner",e.busy),p("disabled",e.form.invali
1d||e.busy)("disabled",e.busy),d(2),p("routerLink",X(9,Mt)),d(2),p("ngIf",e.errorMsg)}}function ri(n,o){if(n&1&&(r(0,"div",41)(1,"div")(2,"div",42),g(3,"img",43),a(),_(4,oi,26,10,"div",5),a()()),n&2){let s=h();d(3),p("src",s.image.mobileFLXLogo,O),d(),p("ngIf",s.form)}}var $e=(()=>{let o=class o{constructor(e,t,i,c,l,f,A,De,Rt,Lt){this.formBuilder=e,this.router=t,this.route=i,this.appService=c,this.title=l,this.matDialog=f,this.store=A,this.alertService=De,this.accountAPI=Rt,this.sessionService=Lt,this.isPassword=!1,this.isPasswordExpired=!1,this.subs$={},this.dialogConfig={minHeight:L.height,maxWidth:"70vw",minWidth:L.width,disableClose:!0},this.isMobile=!1,this.image=I,this.dialogConfigPasswordChange={minHeight:L.height,maxWidth:"600px",minWidth:L.width,disableClose:!0},this.destroyRef=Xe(Ye),this.subs$.router=this.route.queryParams.subscribe(qt=>{this.params=qt})}ngOnInit(){this.title.setTitle("Accounts Manager");let e=new URL(window.location.href);this.isUrlErrorParam=e.searchParams.get("error"),this.isUrlErrorParam&&(this.errorMsg=this.isUrlErrorParam),this.form=this.formBuilder.group({emailAddress:new M(null,w.compose([w.required,w.pattern(Le.email)])),password:new M(null,w.required)}),window.innerWidth<1025?this.isMobile=!0:this.isMobile=!1,this.sessionService.clearLocal(),this.filterEmailInput()}login(){if(this.errorMsg=void 0,this.busy=!0,this.form.valid){let e=new fe(this.form.getRawValue());this.subs$.login=this.store.dispatch(new y.AuthenticateUser(e)).pipe(k(1)).subscribe(t=>{this.appService.isLoggedIn&&(this.busy=!1,this.appService.currentUser.is_TnC_Accepted?this.handleNavigation():this.openTermAndCnd())},t=>{console.log("err::",t),this.busy=!1,this.errorMsg=t?.message?t.message:"Failed to authenticate user",this.errorMsg?.includes("Expired Password")&&(this.isPasswordExpired=!0,this.errorMsg="Your password has expired. Please reset your password.")})}else this.busy=!1,this.errorMsg="Form is not complete!"}handleNavigation(){if(this.appService.currentUser.is_TnC_Accepted){let e=this.route.snapshot.queryParams;if(this.appService.getParameterByName("redirectFrom")=="profile"){let t=new URLSearchParams(window.location.search),i=t.get("redirect");t.get("appId")=="7"?window.location.replace(S.WM_URL+`advisor-dashboard/profile?redirect=${i}`):window.location.replace(S.AME_URL+`advisor-dashboard/profile?redirect=${i}`)}else e.redirectFrom=="post-detail"?window.location.replace(S.AME_URL+`posts/post-detail?post_id=${e.post_id}&page_id=${e.page_id}`):e.SAMLRequest&&e.RelayState?this.router.navigate(["/account/auth-request"],{queryParamsHandling:"merge"}):e.returnUrl?this.router.navigate([e.returnUrl]):this.params&&this.params.key&&this.params.method?this.router.navigate(["/dashboard"],{queryParams:this.params}):this.router.navigate(["/dashboard"])}}ngOnDestroy(){Object.keys(this.subs$).forEach(e=>this.subs$[e]?.unsubscribe())}onPasswordEye(e){e.type=e.type=="text"?"password":"text"}openTermAndCnd(){this.store.dispatch(new y.GetAppTnC(this.appService.currentUser.appId)).pipe(k(1)).subscribe(({account_state:e})=>{if(this.dialogConfig.data=e.tnc,this.dialogConfig.data?.id)this.matDialog.open(Ce,this.dialogConfig).afterClosed().pipe(k(1)).subscribe(t=>{t&&this.handleNavigation()});else{let t=this.appService.currentUser;t.is_TnC_Accepted=!0,this.appService.saveLoginUser(t),this.handleNavigation()}})}onNext(){if(this.form.controls.emailAddress.invalid){this.form.controls.emailAddress.markAsTouched();return}let e={email:this.form.value.emailAddress};this.accountAPI.checkSSO(e).subscribe(t=>{if(t.sso&&t.loginurl){let i=new URLSearchParams(window.location.search),c=i.get("redirect"),l=i.get("appId");if(this.appService.getParameterByName("redirectFrom")=="profile"&&c){let f=new Date;localStorage.setItem("paramsTime",Date.now().toString()),localStorage.setItem("secureParams",c),localStorage.setItem("appId",l)}window.open(t.loginurl,"_self")}else this.form.controls.emailAddress.disable(),this.isPassword=!0},t=>{console.log("err::",t),this.isPassword=!0})}filterEmailInput(){this.form.get("emailAddress")?.valueChanges.pipe(ht(this.destroyRef)).subscribe(e=>{if(e){let t=e.replace(/\s+/g,"").trim();e!==t&&this.form.get("emailAddress")?.setValue(t,{emitEvent:!1})}})}resetEmail(){this.form.controls.password.reset(),this.isPassword=!1,this.form.controls.emailAddress.enable()}resetPassword(){let e=this.form.get("emailAddress")?.value;if(!e)return;let t=window.location.href.replace(window.location.pathname,""),i=window.location.pathname.split("/"),c=t.includes("localhost")?t:t+"/"+i[1];this.accountAPI.requestPasswordReset(new ve({email:e,reset_Link:c})).subscribe(l=>{l.status=="Success"?this.router.navigate(["/account/password-reset"]):this.alertService.showErrorMessage(l&&l.data)},l=>{if(console.log("errrors:",l),l?.message?.includes("No user found"))this.alertService.showErrorMessage("No user found with email address");else if(l?.message?.includes("they may be blacklisted")){let f=l.message.replace(/(^")|("$)/g,"");f=f.toString().trim(),f=f.replace(/\n+/g," "),f=f.replace("\\u0027","");let A=f.split(".");A[2]=" The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.";let De=A.join(".");this.alertService.showErrorMessage(De)}else{let f=l.message.replace(/(^")|("$)/g,"");f=f.replace("\\u0027",""),f=f.trim(),f=f.replace(/\n+/g," "),f.includes("We could not find a user account associated with this email address")?(f="We could not find a user account associated with this email address. Please check the email address and try again.",this.alertService.showErrorMessage(f)):this.alertService.showErrorMessage(f)}})}clearErrMsg(){this.errorMsg&&(this.errorMsg="",this.router.navigate([],{relativeTo:this.route,queryParams:{},replaceUrl:!0}))}};o.\u0275fac=function(t){return new(t||o)(u($),u(U),u(z),u(T),u(Oe),u(_e),u(B),u(H),u(j),u(gt))}
1,o.\u0275cmp=b({type:o,selectors:[["app-login"]],standalone:!1,decls:2,vars:2,consts:[["password",""],["class","desktop-login-screens h-100 position-relative",4,"ngIf"],["class","d-flex justify-content-center h-100",4,"ngIf"],[1,"desktop-login-screens","h-100","position-relative"],[1,"d-flex","align-items-center","h-100","w-100"],["id","membership_form","class","login-form",4,"ngIf"],["id","membership_form",1,"login-form"],["alt","FLX",1,"img-logo",3,"src"],[1,"subheading"],[1,"loginform",3,"submit","formGroup"],[1,"form-group","email-cnt"],["for","emailAddress"],[1,"text-danger"],["type","text","id","emailAddress","name","emailAddress","placeholder","Email","formControlName","emailAddress",3,"keyup"],["class","fa fa-edit edit-icon","aria-hidden","true",3,"click",4,"ngIf"],[1,"invalid-feedback"],["class","form-group",4,"ngIf"],[1,"form-button",2,"position","relative"],["type","submit",3,"disabled","spinner",4,"ngIf"],["type","next",3,"disabled","spinner","click",4,"ngIf"],[1,"forgot-password",3,"routerLink"],[1,"join-member"],["href","https://pages.flxnetworks.com/please-select-your-membership-type"],[1,"mt-3"],["aria-hidden","true",1,"fa","fa-edit","edit-icon",3,"click"],[4,"ngIf"],[1,"form-group"],["for","password"],[1,"password"],["type","password","id","password","name","password","placeholder","Password","formControlName","password"],[3,"click"],["class","fa fa-eye-slash","aria-hidden","true",4,"ngIf"],["class","fa fa-eye","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa","fa-eye-slash"],["aria-hidden","true",1,"fa","fa-eye"],["type","submit",3,"disabled"],["type","next",3,"click","disabled"],[1,"flex-1"],[1,"fa","fa-exclamation-circle","mt-0.5","text-red"],[1,"mt-1","error-message","text-red"],[1,"reset-password","error-message","display-block",3,"click"],[1,"d-flex","justify-content-center","h-100"],[1,"flx-logo-field"],["alt","icon",3,"src"],["href","https://flxnetworks.com/become-a-member/"],["type","text","id","emailAddress","name","emailAddress","placeholder","Email","formControlName","emailAddress"],["class","alert-container",4,"ngIf"],[1,"alert-container"],[3,"alertType","message"]],template:function(t,i){t&1&&_(0,ei,3,1,"div",1)(1,ri,5,2,"div",2),t&2&&(p("ngIf",!i.isMobile),d(),p("ngIf",i.isMobile))},dependencies:[V,ie,Q,ee,te,ne,oe,yt,K],styles:['.alert-container[_ngcontent-%COMP%]{margin-top:10px}@keyframes _ngcontent-%COMP%_spinner{to{transform:rotate(360deg)}}.spinner[_ngcontent-%COMP%]:before{content:"";box-sizing:border-box;position:absolute;top:50%;left:30%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;border-radius:50%;border:3px solid #ffffff;border-top-color:#000;animation:_ngcontent-%COMP%_spinner .8s linear infinite}.password[_ngcontent-%COMP%]{position:relative}.password[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], .password[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{position:absolute;font-size:16px!important;top:14px;right:18px;width:22px;cursor:pointer;color:#fff}.password[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#1e3a5f}.password[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:hover{color:#fff}@media (max-width: 1025px){.desktop-login-screens[_ngcontent-%COMP%]{display:none}}.email-cnt[_ngcontent-%COMP%]{position:relative}.email-cnt[_ngcontent-%COMP%]   .edit-icon[_ngcontent-%COMP%]{position:absolute;top:44px;right:-34px;color:#009cde;cursor:pointer}.invalid-feedback[_ngcontent-%COMP%]{display:block;font-size:12px;color:#dc3545}.text-red[_ngcontent-%COMP%]{color:red!important}.error-message[_ngcontent-%COMP%]{font-size:13px!important;display:inline!important;line-height:initial!important}.reset-password[_ngcontent-%COMP%]{text-decoration:none;font-size:13px;display:block;color:#a0b4cc!important;cursor:pointer}.reset-password[_ngcontent-%COMP%]:hover{text-decoration:underline!important}.join-member[_ngcontent-%COMP%]{text-align:center;margin-top:16px;font-size:14px}.join-member[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-bottom:0;padding-bottom:0;color:#a0b4cc;font-family:inter}.join-member[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#2196f3!important;font-weight:700;text-decoration:none;margin-left:4px}.join-member[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:underline}']});let n=o;return n})();var si=()=>["/account/signin"];function ai(n,o){if(n&1){let s=E();r(0,"div",3),g(1,"img",4),r(2,"h3"),m(3,"Forgot your password?"),a(),r(4,"div",5)(5,"p"),m(6," No problem! Just enter your email address and we\u2019ll send you a link to reset your password. "),a()(),r(7,"form",6),v("submit",function(){C(s);let t=h();return x(t.resetPassword())}),r(8,"div",7)(9,"label",8),m(10,"Email"),a(),g(11,"input",9),a(),r(12,"div",10)(13,"button",11),m(14,"Submit"),a()()(),r(15,"a",12),m(16,"Back to login"),a()()}if(n&2){let s=h();d(),p("src",D(s.image.flxNewLogo),O),d(6),p("formGroup",s.form),d(6),p("disabled",s.form.invali
1d),d(2),p("routerLink",X(5,si))}}var It=(()=>{let o=class o{constructor(e,t,i,c){this.formBuilder=e,this.alertService=t,this.router=i,this.apiClient=c,this.image=I}ngOnInit(){let e=window.location.href.replace(window.location.pathname,""),t=window.location.pathname.split("/"),i=e.includes("localhost")?e:e+"/"+t[1],c="^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([A-Za-z]{2,6}(?:\\.[A-Za-z]{2,6})?)$";this.form=this.formBuilder.group({reset_Link:new M(i),email:new M(null,w.compose([w.required,w.pattern(c)]))})}resetPassword(){if(this.form.valid){let e=this.form.getRawValue();this.apiClient.requestPasswordReset(new ve(e)).subscribe(t=>{t.status=="Success"?this.router.navigate(["/account/password-reset"]):this.alertService.showErrorMessage(t&&t.data)},t=>{if(console.log("errrors:",t),t?.message?.includes("No user found"))this.alertService.showErrorMessage("No user found with email address");else if(t?.message?.includes("they may be blacklisted")){let i=t.message.replace(/(^")|("$)/g,"");i=i.toString().trim(),i=i.replace(/\n+/g," "),i=i.replace("\\u0027","");let c=i.split(".");c[2]=" The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.";let l=c.join(".");this.alertService.showErrorMessage(l)}else{let i=t.message.replace(/(^")|("$)/g,"");i=i.replace("\\u0027",""),i=i.trim(),i=i.replace(/\n+/g," "),i.includes("We could not find a user account associated with this email address")?(i="We could not find a user account associated with this email address. Please check the email address and try again.",this.alertService.showErrorMessage(i)):this.alertService.showErrorMessage(i)}})}}};o.\u0275fac=function(t){return new(t||o)(u($),u(H),u(U),u(j))},o.\u0275cmp=b({type:o,selectors:[["app-password-forgotten"]],standalone:!1,decls:3,vars:1,consts:[[1,"desktop-login-screens","h-100","position-relative"],[1,"d-flex","align-items-center","h-100"],["id","membership_form","class","login-form",4,"ngIf"],["id","membership_form",1,"login-form"],["alt","FLX",1,"img-logo",3,"src"],[1,"subheading"],[1,"loginform",3,"submit","formGroup"],[1,"form-group","email-cnt"],["for","email"],["type","text","id","email","name","email","placeholder","Email","formControlName","email"],[1,"form-button"],["type","submit",3,"disabled"],[1,"forgot-password",3,"routerLink"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"div",1),_(2,ai,17,6,"div",2),a()()),t&2&&(d(2),p("ngIf",i.form))},dependencies:[V,ie,Q,ee,te,ne,oe,K],styles:["@media (max-width: 1025px){.form-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:25px!important}}"]});let n=o;return n})();var li=()=>["/account/signin"],At=(()=>{let o=class o{constructor(){this.image=I}};o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=b({type:o,selectors:[["app-password-reset"]],standalone:!1,decls:15,vars:4,consts:[[1,"desktop-login-screens","h-100","position-relative"],[1,"d-flex","align-items-center","h-100","w-100"],["id","membership_form",1,"login-form"],["alt","FLX",1,"img-logo",3,"src"],["id","confirm"],[1,"subheading"],[1,"mt-2"],[1,"form-button",2,"position","relative"],["type","button",3,"routerLink"]],template:function(t,i){t&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),g(3,"img",3),r(4,"div",4)(5,"h3"),m(6,"Check your email"),a(),r(7,"div",5)(8,"p"),m(9,"Your password reset request has been received."),a(),r(10,"p",6),m(11," We've sent an email with instructions to reset your password. Please check your inbox and follow the link to create a new password. "),a()(),r(12,"div",7)(13,"button",8),m(14," Back to Login "),a()()()()()()),t&2&&(d(3),p("src",D(i.image.flxNewLogo),O),d(10),p("routerLink",X(3,li)))},dependencies:[K],styles:["a[_ngcontent-%COMP%]:hover{color:#001e44}@media (max-width: 1025px){#confirm[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#fff}#membership_form[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}.form-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:25px!important}}"]});let n=o;return n})();var ci=()=>["/account/signin"];function di(n,o){n&1&&g(0,"i",22)}function pi(n,o){n&1&&g(0,"i",23)}function mi(n,o){n&1&&(r(0,"div"),m(1," * Password is required. "),a())}function ui(n,o){if(n&1&&(r(0,"div",24),_(1,mi,2,0,"div",25),r(2,"div",26),m(3," * Must contain at least 1 number. "),a(),r(4,"div",26),m(5," * Must contain at least 1 uppercase letter. "),a(),r(6,"div",26),m(7," * Must contain at least 1 lowercase letter. "),a(),r(8,"div",26),m(9," * Must be at least 8 characters. "),a()()),n&2){let s,e=h(2);d(),p("ngIf",(s=e.form.get("password"))==null||s.errors==null?null:s.errors.required),d(),p("ngClass",e.form.controls.password.hasError("required")||e.form.controls.password.hasError("hasNumber")?"text-danger":"text-success"),d(2),p("ngClass",e.form.controls.password.hasError("required")||e.form.controls.password.hasError("hasCapitalCase")?"text-danger":"text-success"),d(2),p("ngClass",e.form.controls.password.hasError("required")||e.form.controls.password.hasError("hasSmallCase")?"text-danger":"text-success"),d(2),p("ngClass",e.form.controls.password.hasError("required")||e.form.controls.password.hasError("minlength")?"text-danger":"text-success")}}function fi(n,o){n&1&&g(0,"i",22)}function gi(n,o){n&1&&g(0,"i",23)}function hi(n,o){n&1&&(r(0,"div"),m(1," * Confirm Password is required. "),a())}function _i(n,o){if(n&1&&(r(0,"div",24),_(1,hi,2,0,"div",25),a()),n&2){let s,e=h(2);d(),p("ngIf",(s=e.form.get("confirmPassword"))==null||s.errors==null?null:s.errors.required)}}function vi(n,o){n&1&&(r(0,"div",24),m(1," * Passwords do not match. "),a())}function wi(n,o){if(n&1){let s=E();r(0,"h3"),m(1,"Reset your password"),a(),r(2,"div",7)(3,"p"),m(4,"Create a new password to access your account."),a()(),r(5,"form",8),v("submit",function(){C(s);let t=h();return x(t.changePassword())}),r(6,"div",9)(7,"label",10),m(8,"New Password "),r(9,"span",11),m(10,"*"),a()(),r(11,"div",12),g(12,"input",13,0),r(14,"a",14),v("click",function(){C(s);let t=P(13),i=h();return x(i.onPasswordEye(t))}),_(15,di,1,0,"i",15)(16,pi,1,0,"i",16),a()(),_(17,ui,10,5,"div",17),a(),r(18,"div",9)(19,"label",18),m(20,"Confirm Password "),r(21,"span",11),m(22,"*"),a()(),r(23,"div",12),g(24,"input",19,1),r(26,"a",14),v("click",function(){C(s);let t=P(25),i=h();return x(i.onPasswordEye(t))}),_(27,fi,1,0,"i",15)(28,gi,1,0,"i",16),a()(),_(29,_i,2,1,"div",17)(30,vi,2,0,"div",17),a(),r(31,"div",20)(32,"button",21),m(33," Change Password "),a()()()}if(n&2){let s,e,t,i=P(13),c=P(25),l=h();d(5),p("formGroup",l.form),d(10),p("ngIf",i.type=="text"),d(),p("ngIf",i.type=="password"),d(),p("ngIf",((s=l.form.get("password"))==null?null:s.invalid)&&(((s=l.form.get("password"))==null?null:s.dirty)||((s=l.form.get("password"))==null?null:s.touched))),d(10),p("ngIf",c.type=="text"),d(),p("ngIf",c.type=="password"),d(),p("ngIf",((e=l.form.get("confirmPassword"))==null?null:e.invalid)&&
1(((e=l.form.get("confirmPassword"))==null?null:e.dirty)||((e=l.form.get("confirmPassword"))==null?null:e.touched))),d(),p("ngIf",!((t=l.form.get("confirmPassword"))!=null&&t.invalid)&&((t=l.form.get("password"))==null?null:t.value)!=((t=l.form.get("confirmPassword"))==null?null:t.value)),d(2),p("disabled",l.form.invalid)}}function Ci(n,o){n&1&&(r(0,"div",28),m(1," A new password setup link has been sent to your registered email. "),a(),r(2,"a",29),m(3," Back to Login "),a()),n&2&&(d(2),p("routerLink",X(1,ci)))}function xi(n,o){if(n&1){let s=E();r(0,"button",30),v("click",function(){C(s);let t=h(2);return x(t.regenerateLink())}),m(1," Regenerate Link "),a()}}function bi(n,o){if(n&1&&(r(0,"div",6)(1,"h3"),m(2,"Link Expired"),a(),r(3,"p",7),m(4," Your password setup link is expired or invalid. "),a(),W(5,Ci,4,2)(6,xi,2,0,"button",27),a()),n&2){let s=h();d(5),J(s.regenerateSuccess()?5:6)}}var kt=(()=>{let o=class o{constructor(e,t,i,c,l,f){this.formBuilder=e,this.cdr=t,this.route=i,this.alertService=c,this.apiClient=l,this.router=f,this.image=I,this.isLinkExpired=Ve(!1),this.regenerateSuccess=Ve(!1)}ngOnInit(){this.key=this.route.snapshot.queryParamMap.get("key"),this.validatePasswordLink()}validatePasswordLink(){this.key&&this.apiClient.validatePasswordLink({key:this.key}).pipe(k(1)).subscribe(e=>{e.status==="Success"?(this.setupForm(),this.cdr.detectChanges()):(this.alertService.showErrorMessage(e.data||"Invalid password reset link"),this.isLinkExpired.set(!0))})}regenerateLink(){this.key&&this.apiClient.regeneratePasswordResetLink({key:this.key}).pipe(k(1)).subscribe(e=>{e.status==="Success"?this.regenerateSuccess.set(!0):this.alertService.showErrorMessage(e.data||"Failed to regenerate password reset link")},e=>{this.alertService.showErrorMessage(e?.message.replaceAll('"',"")||"Failed to regenerate password reset link")})}setupForm(){this.form=this.formBuilder.group({key:new M(this.key),password:new M(null,w.compose([w.required,this.patternValidator(/\d/,{hasNumber:!0}),this.patternValidator(/[A-Z]/,{hasCapitalCase:!0}),this.patternValidator(/[a-z]/,{hasSmallCase:!0}),w.minLength(8)])),confirmPassword:new M(null,[w.required])},{validators:e=>this.form&&this.form.dirty&&!(e.get("password")?.value===e.get("confirmPassword")?.value)?{mismatch:"Confirm password must be same as password"}:null})}patternValidator(e,t){return i=>i.value?e.test(i.value)?null:t:null}changePassword(){if(this.form.valid){let e=this.form.getRawValue();this.apiClient.passwordReset(new qe(e)).pipe(k(1)).subscribe(t=>{t.status=="Success"?(this.alertService.showSuccessMessage("Password Reset successfully"),this.router.navigate(["/account/signin"])):this.alertService.showErrorMessage(t&&t.data)},t=>{console.error("Password reset error:",t);let i=t?.message&&t.message.replaceAll(/"/g,"")||"Failed to reset password. Please try again.";this.alertService.showErrorMessage(i)})}}onPasswordEye(e){e.type=e.type=="text"?"password":"text"}};o.\u0275fac=function(t){return new(t||o)(u($),u(nt),u(z),u(H),u(j),u(U))},o.\u0275cmp=b({type:o,selectors:[["app-request-password-change"]],standalone:!1,decls:6,vars:4,consts:[["password",""],["confirmPassword",""],[1,"desktop-login-screens","h-100","position-relative"],[1,"d-flex","align-items-center","h-100","w-100"],["id","membership_form",1,"login-form"],["alt","FLX",1,"img-logo",3,"src"],[1,"text-left","w-100"],[1,"subheading"],[1,"loginform",3,"submit","formGroup"],[1,"form-group"],["for","password"],[1,"text-danger"],[1,"password"],["type","password","id","password","name","password","placeholder","New Password","formControlName","password"],[3,"click"],["class","fa fa-eye-slash",4,"ngIf"],["class","fa fa-eye",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","confirmPassword"],["type","password","id","confirmPassword","name","confirmPassword","placeholder","Confirm Password","formControlName","confirmPassword"],[1,"form-button",2,"position","relative"],["type","submit",3,"disabled"],[1,"fa","fa-eye-slash"],[1,"fa","fa-eye"],[1,"invalid-feedback"],[4,"ngIf"],[3,"ngClass"],[1,"btn","btn-primary","mt-2"],[1,"mt-3","text-success"],[1,"btn","btn-primary","mt-2",3,"routerLink"],[1,"btn","btn-primary","mt-2",3,"click"]],template:function(t,i){t&1&&(r(0,"div",2)(1,"div",3)(2,"div",4),g(3,"img",5),W(4,wi,34,9),W(5,bi,7,1,"div",6),a()()()),t&2&&(d(3),p("src",D(i.image.flxNewLogo),O),d(),J(i.form&&!i.isLinkExpired()?4:-1),d(),J(i.isLinkExpired()?5:-1))},dependencies:[ot,V,ie,Q,ee,te,ne,oe,K],styles:['.alert-container[_ngcontent-%COMP%]{margin-top:10px}@keyframes _ngcontent-%COMP%_spinner{to{transform:rotate(360deg)}}.spinner[_ngcontent-%COMP%]:before{content:"";box-sizing:border-box;position:absolute;top:50%;left:30%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;border-radius:50%;border:3px solid #ffffff;border-top-color:#000;animation:_ngcontent-%COMP%_spinner .8s linear infinite}.password[_ngcontent-%COMP%]{position:relative}.password[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], .password[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{position:absolute;font-size:16px!important;top:14px;right:18px;width:22px;
1cursor:pointer;color:#fff}.password[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#1e3a5f}.password[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:hover{color:#fff}@media (max-width: 1025px){.desktop-login-screens[_ngcontent-%COMP%]{display:none}}.invalid-feedback[_ngcontent-%COMP%]{display:block;font-size:12px;color:#dc3545}.subheading[_ngcontent-%COMP%]{color:#fff}'],changeDetection:0});let n=o;return n})();var G,Z=(G=class{constructor(o,s){this.apiClient=o,this.appService=s}authenticateUser(o,s){return this.apiClient.login(s.model).pipe(me(e=>{o.setState(he(t=>{this.appService.saveLoginUser(e)}))}))}GetTheme(o,s){let e=this.appService.currentUser?.roleId||0;return this.apiClient.getThemes(e).pipe(me(t=>{o.setState(he(i=>{i.theme=t}))}))}getAppTnC(o,s){return this.apiClient.getAppTnC(s.appId).pipe(me(e=>{o.setState(he(t=>{t.tnc=e}))}))}acceptUserTnc(o,s){return this.apiClient.acceptUserTnc(s.tnc).pipe(me(e=>{o.setState(he(t=>{let i=this.appService.currentUser;i.is_TnC_Accepted=!0,this.appService.saveLoginUser(i)}))}))}firstTimeResetPassword(o,s){return this.apiClient.firstTimeResetPassword(s.password).pipe(me(e=>{o.setState(he(t=>{let i=this.appService.currentUser;i.is_First_Time_Login=!1,this.appService.saveLoginUser(i)}))}))}},G.\u0275fac=function(s){return new(s||G)(ue(mt),ue(T))},G.\u0275prov=Ie({token:G,factory:G.\u0275fac}),G);q([ge(y.AuthenticateUser)],Z.prototype,"authenticateUser",null);q([ge(y.GetTheme)],Z.prototype,"GetTheme",null);q([ge(y.GetAppTnC)],Z.prototype,"getAppTnC",null);q([ge(y.AcceptUserTnC)],Z.prototype,"acceptUserTnc",null);q([ge(y.FirstTimeResetPassword)],Z.prototype,"firstTimeResetPassword",null);Z=q([vt({name:"account_state",defaults:{}})],Z);function yi(n,o){n&1&&g(0,"i",20)}function Pi(n,o){n&1&&g(0,"i",21)}function Si(n,o){n&1&&g(0,"i",20)}function Mi(n,o){n&1&&g(0,"i",21)}var He=(()=>{let o=class o{constructor(e,t,i,c,l,f){this.modalRef=e,this.formBuilder=t,this.store=i,this.appService=c,this.alertService=l,this.tnc=f,this.images=I}ngOnInit(){this.setupForm()}onPasswordEye(e){e.type=e.type=="text"?"password":"text"}patternValidator(e,t){return i=>i.value?e.test(i.value)?null:t:null}setupForm(){this.form=this.formBuilder.group({password:new M(null,w.compose([w.required,this.patternValidator(/\d/,{hasNumber:!0}),this.patternValidator(/[A-Z]/,{hasCapitalCase:!0}),this.patternValidator(/[a-z]/,{hasSmallCase:!0}),w.minLength(8)])),confirmPassword:new M(null,[w.required])},{validators:e=>this.form&&this.form.dirty&&!(e.get("password")?.value===e.get("confirmPassword")?.value)?{mismatch:"Confirm password must be same as password"}:null})}changePassword(){let t={email:this.appService.currentUser.email_Address,password:this.form.getRawValue().password};this.store.dispatch(new y.FirstTimeResetPassword(new ut(t))).subscribe(()=>this.modalRef.close(t),i=>{this.alertService.showErrorMessage(i.message)})}};o.\u0275fac=function(t){return new(t||o)(u(Ee),u($),u(B),u(T),u(H),u(Te))},o.\u0275cmp=b({type:o,selectors:[["app-password-change"]],standalone:!1,decls:36,vars:11,consts:[["password",""],["confirmPassword",""],[1,"mat-dialog-container"],["mat-dialog-title","",1,"header"],[3,"formGroup"],[1,"member-formfield"],[1,"mb-3","field"],["for","password",1,"form-label"],[1,"text-danger"],[1,"password"],["type","password","id","password","name","password","placeholder","Password","formControlName","password",1,"form-control",3,"blur"],[3,"click"],["class","fa fa-eye-slash","aria-hidden","true",4,"ngIf"],["class","fa fa-eye","aria-hidden","true",4,"ngIf"],[1,"validation-container"],[1,"validation-text"],["for","confirmPassword",1,"form-label"],["type","password","id","confirmPassword","name","confirmPassword","placeholder","Confirm Password","formControlName","confirmPassword",1,"form-control",3,"blur"],[1,"form-button"],["type","submit",1,"btn","btn-primary","ml-2","float-right",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-eye-slash"],["aria-hidden","true",1,"fa","fa-eye"]],template:function(t,i){if(t&1){let c=E();r(0,"div",2)(1,"h4",3),m(2,"Change Password"),a(),r(3,"form",4)(4,"div",5)(5,"div",6)(6,"label",7),m(7,"Password "),r(8,"span",8),m(9,"*"),a()(),r(10,"div",9)(11,"input",10,0),v("blur",function(){C(c);let f=P(12);return x(f.type="password")}),a(),r(13,"a",11),v("click",function(){C(c);let f=P(12);return x(i.onPasswordEye(f))}),_(14,yi,1,0,"i",12)(15,Pi,1,0,"i",13),a()(),r(16,"div",14)(17,"label",15),m(18," * Password must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, and one number. "),a()()(),r(19,"div",6)(20,"label",16),m(21,"Confirm Password "),r(22,"span",8),m(23,"*"),a()(),r(24,"div",9)(25,"input",17,1),v("blur",function(){C(c);let f=P(26);return x(f.type="password")}),a(),r(27,"a",11),v("click",function(){C(c);let f=P(26);return x(i.onPasswordEye(f))}),_(28,Si,1,0,"i",12)(29,Mi,1,0,"i",13),a()(),r(30,"div",14)(31,"label",15),m(32," * Confirm Password must be same as password. "),a()()(),r(33,"div",18)(34,"button",19),v("click",function(){return C(c),x(i.changePassword())}),m(35),a()()()()()}
1if(t&2){let c,l,f=P(12),A=P(26);d(3),p("formGroup",i.form),d(11),p("ngIf",f.type=="text"),d(),p("ngIf",f.type=="password"),d(2),se("visible",((c=i.form.get("password"))==null?null:c.invalid)&&(((c=i.form.get("password"))==null?null:c.dirty)||((c=i.form.get("password"))==null?null:c.touched))),d(11),p("ngIf",A.type=="text"),d(),p("ngIf",A.type=="password"),d(2),se("visible",((l=i.form.get("confirmPassword"))==null?null:l.invalid)&&(((l=i.form.get("confirmPassword"))==null?null:l.dirty)||((l=i.form.get("confirmPassword"))==null?null:l.touched))||((l=i.form.get("password"))==null?null:l.value)!=((l=i.form.get("confirmPassword"))==null?null:l.value)),d(3),p("disabled",i.form.invalid),d(),et(" ","Save"," ")}},dependencies:[V,ie,Q,ee,te,ne,oe,Re],styles:[".form-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:auto}.form-button[_ngcontent-%COMP%]{text-align:right}.form-label[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.password[_ngcontent-%COMP%]{position:relative}.password[_ngcontent-%COMP%]   img[_ngcontent-%COMP%], .password[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{position:absolute;top:21px;right:18px;width:22px;cursor:pointer}.password[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::-ms-reveal, .password[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::-ms-clear{display:none}.validation-container[_ngcontent-%COMP%]{min-height:20px}.validation-text[_ngcontent-%COMP%]{font-size:12px;color:#dc3545;display:block;opacity:0;transition:opacity .2s ease}.validation-text.visible[_ngcontent-%COMP%]{opacity:1}.text-danger[_ngcontent-%COMP%]{padding-bottom:10px}@media only screen and (max-width: 500px){.text-danger[_ngcontent-%COMP%]{font-size:10px;margin:0;padding:0;display:block}}h5.card-title[_ngcontent-%COMP%]{font-size:20px;font-weight:600;margin-bottom:0;margin-top:10px}.member-formfield[_ngcontent-%COMP%]   label[_ngcontent-%COMP%] + button.btn[_ngcontent-%COMP%]{display:block}.mat-dialog-container[_ngcontent-%COMP%]{padding:14px 24px 24px}.header[_ngcontent-%COMP%]{padding-left:0}"]});let n=o;return n})();var Ot=(()=>{let o=class o{constructor(e,t,i,c,l,f,A){this.formBuilder=e,this.router=t,this.route=i,this.appService=c,this.title=l,this.matDialog=f,this.store=A,this.subs$={},this.dialogConfig={minHeight:L.height,maxWidth:"70vw",minWidth:L.width,disableClose:!0},this.Images=I,this.dialogConfigPasswordChange={minHeight:L.height,maxWidth:"600px",minWidth:L.width,disableClose:!0}}ngOnInit(){this.title.setTitle("Accounts Manager"),this.form=this.formBuilder.group({emailAddress:new M(null,w.compose([w.required,w.pattern(Le.email)])),password:new M(null,w.required)}),this.guestForm=this.formBuilder.group({userId:new M(null,w.required)})}login(){if(this.errorMsg=void 0,this.busy=!0,this.form.valid){let e=new fe(this.form.getRawValue());this.subs$.login=this.store.dispatch(new y.AuthenticateUser(e)).subscribe(t=>{this.appService.isLoggedIn&&(this.busy=!1,this.appService.currentUser.is_TnC_Accepted?this.appService.currentUser.is_First_Time_Login?this.matDialog.open(He,this.dialogConfigPasswordChange).afterClosed().subscribe(i=>{i&&this.handleNavigation()}):this.handleNavigation():this.openTermAndCnd())},t=>{this.busy=!1,this.errorMsg=t.message?t.message:"Failed to authenticate user"})}else this.busy=!1,this.errorMsg="Form is not complete!"}handleNavigation(){if(this.appService.currentUser.is_TnC_Accepted){let e=this.route.snapshot.queryParams;e.redirectFrom=="profile"?window.location.replace(S.AME_URL+`advisor-dashboard/profile?redirectFrom=profile&userId=${e.userId}`):e.redirectFrom=="post-detail"?window.location.replace(S.AME_URL+`posts/post-detail?post_id=${e.post_id}&page_id=${e.page_id}`):this.router.navigate(["/dashboard"])}}ngOnDestroy(){Object.keys(this.subs$).forEach(e=>this.subs$[e]?.unsubscribe())}onPasswordEye(e){e.type=e.type=="text"?"password":"text"}openTermAndCnd(){this.store.dispatch(new y.GetAppTnC(this.appService.currentUser.appId)).subscribe(({account_state:e})=>{if(this.dialogConfig.data=e.tnc,this.dialogConfig.data?.id)this.matDialog.open(Ce,this.dialogConfig).afterClosed().subscribe(t=>{t&&(this.appService.currentUser.is_First_Time_Login?this.matDialog.open(He,this.dialogConfigPasswordChange).afterClosed().subscribe(i=>{i&&this.handleNavigation()}):this.handleNavigation())});else{let t=this.appService.currentUser;t.is_TnC_Accepted=!0,this.appService.saveLoginUser(t),this.handleNavigation()}})}};o.\u0275fac=function(t){return new(t||o)(u($),u(U),u(z),u(T),u(Oe),u(_e),u(B))},o.\u0275cmp=b({type:o,selectors:[["app-approval-notification"]],standalone:!1,decls:11,vars:2,consts:[[1,"approved-header"],["alt","logo",3,"src"],[1,"approvd-section","d-flex","align-items-center","justify-content-center","h-100"],[1,"pls-title"],[1,"loader1"]],template:function(t,i){t&1&&(r(0,"div",0),g(1,"img",1),a(),r(2,"div",2)(3,"div",3),m(4," Please wait "),r(5,"div",4),g(6,"span")(7,"span")(8,"span")(9,"span")(10,"span"),a()()()),t&2&&(d(),p("src",D(i.Images.flxNewLogo),O))},styles:[".approved-header[_ngcontent-%COMP%]{background-color:#00053e;text-align:center;padding:10px}.approved-header[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100px}.approvd-section[_ngcontent-%COMP%]{background-color:#f2f2f2}.approvd-section[_ngcontent-%COMP%]   .pls-title[_ngcontent-%COMP%]{color:#212529;font-size:19px;display:flex;align-items:center}.approvd-section[_ngcontent-%COMP%]   .your-email[_ngcontent-%COMP%]{box-shadow:0 0 5px #cbcbcb;background:#fff;max-width:400px;width:100%;text-align:center;border-radius:6px;padding:50px 20px}.approvd-section[_ngcontent-%COMP%]   .your-email[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{margin-bottom:15px;
1display:block}.approvd-section[_ngcontent-%COMP%]   .your-email[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:80px;margin:auto}.approvd-section[_ngcontent-%COMP%]   .your-email[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:28px;color:#000;font-weight:700}.approvd-section[_ngcontent-%COMP%]   .your-email[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}.loader1[_ngcontent-%COMP%]{display:inline-block;font-size:0px;padding:0;margin-left:4px}.loader1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{vertical-align:middle;border-radius:100%;display:inline-block;width:10px;height:10px;margin:3px 2px;-webkit-animation:_ngcontent-%COMP%_loader1 .8s linear infinite alternate;animation:_ngcontent-%COMP%_loader1 .8s linear infinite alternate}.loader1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(1){-webkit-animation-delay:-1s;animation-delay:-1s;background:#21252999}.loader1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(2){-webkit-animation-delay:-.8s;animation-delay:-.8s;background:#212529cc}.loader1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(3){-webkit-animation-delay:-.26666s;animation-delay:-.26666s;background:#212529}.loader1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(4){-webkit-animation-delay:-.8s;animation-delay:-.8s;background:#212529cc}.loader1[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:nth-child(5){-webkit-animation-delay:-1s;animation-delay:-1s;background:#21252966}@keyframes _ngcontent-%COMP%_loader1{0%{transform:scale(0)}to{transform:scale(1)}}@-webkit-keyframes _ngcontent-%COMP%_loader1{0%{-webkit-transform:scale(0,0)}to{-webkit-transform:scale(1,1)}}"]});let n=o;return n})();var Ii=["https://qa2.hhwdev.com","https://qa3.hhwdev.com","https://staging3.hhwdev.com","https://preprod1.hhwdev.com"],Et=(()=>{let o=class o{constructor(e,t,i,c){this.actRoute=e,this.apiService=t,this.appService=i,this.router=c,this.htmlContent=new Ge,this.token=""}ngOnInit(){let e=this.actRoute.snapshot.queryParams;e.RelayState&&e.SAMLRequest&&(this.appService.isLoggedIn?(this.token=this.appService.currentUser.token||"",this.authRequestParams={RelayState:encodeURIComponent(encodeURIComponent(e.RelayState)),SAMLRequest:encodeURIComponent(encodeURIComponent(e.SAMLRequest))},this.sendAuthrequest()):window.self!==window.top?this.requestCredsFromParent(e):this.router.navigate(["/account/signin"],{queryParamsHandling:"merge"}))}requestCredsFromParent(e){console.log("[Auth] Inside iframe, requesting creds from parent"),window.parent.postMessage({type:"REQUEST_AUTH_DATA"},"*");let t=c=>{Ii.includes(c.origin)&&c.data.type==="AUTH_DATA"&&(console.log("[Auth] Received auth data from parent iframe"),this.token=pt(c.data.accessToken),this.authRequestParams={RelayState:encodeURIComponent(encodeURIComponent(e.RelayState)),SAMLRequest:encodeURIComponent(encodeURIComponent(e.SAMLRequest))},this.sendAuthrequest(),window.removeEventListener("message",t),clearTimeout(i))};window.addEventListener("message",t);let i=setTimeout(()=>{console.warn("[Auth] No creds received from parent, redirecting to login"),this.router.navigate(["/account/signin"],{queryParamsHandling:"merge"})},5e3)}sendAuthrequest(){this.apiService.sendAuthrequest(this.authRequestParams.SAMLRequest,this.authRequestParams.RelayState).pipe(k(1)).subscribe(e=>{let t=S.AM_API_URL+`/api/Accounts/auth-response?ssotoken=${e.jwt}&flxtoken=${this.token}`;window.open(t,"_self")})}};o.\u0275fac=function(t){return new(t||o)(u(z),u(j),u(T),u(U))},o.\u0275cmp=b({type:o,selectors:[["app-auth-request"]],standalone:!1,decls:2,vars:3,consts:[[3,"innerHTML"]],template:function(t,i){t&1&&(g(0,"div",0),tt(1,"async")),t&2&&p("innerHTML",it(1,1,i.htmlContent),Ae)},dependencies:[st],encapsulation:2,changeDetection:0});let n=o;return n})();var Tt=(()=>{let o=class o{constructor(e,t,i,c,l,f,A){this.actRoute=e,this.apiService=t,this.appService=i,this.router=c,this.store=l,this.alertService=f,this.matDialog=A,this.dialogConfig={minHeight:L.height,maxWidth:"70vw",minWidth:L.width,disableClose:!0}}ngOnInit(){let e=this.actRoute.snapshot.queryParams,t=localStorage.getItem("appId");if(e.token){let i=this.getRedirectParams();i&&this.router.navigate([],{relativeTo:this.actRoute,queryParams:{redirect:i,appId:t},queryParamsHandling:"merge"}),localStorage.removeItem("appId"),this.sendAuthrequest(e.token)}else this.router.navigate(["/account/signin"],{queryParamsHandling:"merge"})}getRedirectParams(){let e=localStorage.getItem("paramsTime"),t=localStorage.getItem("secureParams");if(e&&t){let i=Date.now();if(localStorage.removeItem("paramsTime"),localStorage.removeItem("secureParams"),i-parseInt(e)<24e4)return t}return""}sendAuthrequest(e){this.appService.showBootLoader();let t=new fe({ssoToken:e});this.store.dispatch(new y.AuthenticateUser(t)).pipe(k(1)).subscribe(i=>{this.appService.hideBootLoader(),this.appService.isLoggedIn&&(this.appService.currentUser.is_TnC_Accepted?this.handleNavigation():this.openTermAndCnd())},i=>{if(console.log("ERRR LOGIN",i),this.appService.hideBootLoader(),i?.message?.includes('"No user with email address'))this.alertService.showErrorMessage("No user found with email address");else{let c=i?.message.replaceAll('"',"");this.alertService.showErrorMessage(c||"An unexpected server error occurred.")}this.router.navigate(["/account/signin"],{queryParamsHandling:"merge"})})}openTermAndCnd(){this.store.dispatch(new y.GetAppTnC(this.appService.currentUser.appId)).pipe(k(1)).subscribe(({account_state:e})=>
1{if(this.dialogConfig.data=e.tnc,this.dialogConfig.data?.id)this.matDialog.open(Ce,this.dialogConfig).afterClosed().pipe(k(1)).subscribe(t=>{t&&this.handleNavigation()});else{let t=this.appService.currentUser;t.is_TnC_Accepted=!0,this.appService.saveLoginUser(t),this.handleNavigation()}})}handleNavigation(){if(this.appService.currentUser?.is_TnC_Accepted){let e=this.actRoute.snapshot.queryParams;if(this.appService.getParameterByName("redirectFrom")=="profile"){let t=new URLSearchParams(window.location.search),i=t.get("redirect");t.get("appId")=="7"?window.location.replace(S.WM_URL+`advisor-dashboard/profile?redirect=${i}`):window.location.replace(S.AME_URL+`advisor-dashboard/profile?redirect=${i}`)}else e.redirectFrom=="post-detail"?window.location.replace(S.AME_URL+`posts/post-detail?post_id=${e.post_id}&page_id=${e.page_id}`):this.router.navigate(["/dashboard"])}else this.openTermAndCnd()}};o.\u0275fac=function(t){return new(t||o)(u(z),u(j),u(T),u(U),u(B),u(H),u(_e))},o.\u0275cmp=b({type:o,selectors:[["app-sso-request"]],standalone:!1,decls:0,vars:0,template:function(t,i){},encapsulation:2,changeDetection:0});let n=o;return n})();var Ai=[{path:"",component:St,children:[{path:"",component:$e},{path:"signin",component:$e},{path:"password-forgotten",component:It},{path:"password-reset",component:At},{path:"password-change",component:kt}]},{path:"email-change-approval",component:Ot},{path:"auth-request",component:Et},{path:"sso-auth",component:Tt}],qo=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)}
1,o.\u0275mod=Ke({type:o}),o.\u0275inj=We({providers:[j],imports:[at,wt,Ct,Pt,_t.forFeature([Z]),dt.forChild(Ai)]});let n=o;return n})();export{qo as AccountModule};

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.