1import{a as N}from"./chunk-ZLQKSU6L.js";import{f as I,l as M,o as C}from"./chunk-ZZ4GDZDV.js";import{Ha as t,Jd as p,Je as f,Ka as l,Kc as v,La as s,Oe as h,V as r,_c as u,ad as S,ae as g,dd as c,gb as d}from"./chunk-4EYOHIBV.js";import"./chunk-NGIL7LUH.js";import"./chunk-B5XQ7TKQ.js";import"./chunk-UMUHYRWG.js";import"./chunk-4WGKOXNC.js";import"./chunk-6CGJ6UIB.js";import"./chunk-FQEZT2EZ.js";import"./chunk-RDFGVLAH.js";import"./chunk-GSPA3JH4.js";import"./chunk-5UOXAQIA.js";import"./chunk-IRNL5CBJ.js";import"./chunk-SSIY6M6Z.js";import"./chunk-ATO6E22I.js";import"./chunk-7PCKDJEZ.js";import"./chunk-B6G5Y36B.js";import"./chunk-XIPQDBNZ.js";import"./chunk-3VPKZZES.js";import"./chunk-55MUSWHY.js";import"./chunk-IHRC3SYL.js";import"./chunk-PJKO2XHO.js";import"./chunk-S6YUVJNO.js";import{k as m}from"./chunk-P2XWNIA6.js";var n=class o{constructor(e,i,y,P,R,j,w){this.router=e;this.route=i;this.ngxSmartModalService=y;this.loadingController=P;this._commonService=R;this._apiService=j;this._translationService=w}tokenId="";locale="";ngOnInit(){}ionViewWillEnter(){this._commonService.isLoggedIn=!1}ionViewDidEnter(){this.tokenId=this.route.snapshot.paramMap.get("id"),localStorage.locale?(this._commonService.locale=localStorage.locale,this.locale=localStorage.locale):(this._commonService.locale="nl",localStorage.locale=this._commonService.locale),this.inviteUser()}inviteUser(){return m(this,null,function*(){this._commonService.presentLoading();try{let e=yield this._apiService.verifyUserInviteEmail(this.tokenId);if(e.SSOUser===!0&&e.IsCurrentSession===!1){this._commonService.clearData(),this.router.navigate(["/login"],{replaceUrl:!0}),this._commonService.dismiss();return}if(e.ExistingUser){this._translationService.getLocalTranslation(localStorage.locale?localStorage.locale:this._commonService.getBrowserLanguage()),this._commonService.getLocaleUpdate(localStorage.locale?localStorage.locale:this._commonService.getBrowserLanguage());let i={body:e.LoginResponse};if(i.body.SessionRoute){this._commonService.redirectWithParams(e.body.SessionRoute,{locale:localStorage.locale,redirectUrl:sessionStorage.reloadLinkDetail,CustomerId:sessionStorage.redirectCustomerId,source:"inviteuser"});return}sessionStorage.isSSOUser=e.SSOUser?e.SSOUser:!1,this._commonService.afterLogIn(i)}else{let i={CustomerName:e.CustomerName,MinPasswordLength:e.MinPasswordLength,MinPasswordStrength:e.MinPasswordStrength};this._commonService.isLoggedIn=!1,this._commonService.userName=e.EmailAddress,this._commonService.customerName=e.CustomerName,sessionStorage.setItem("userName",e.EmailAddress),sessionStorage.setItem("CustomerDetailFromInvite",JSON.stringify(i)),sessionStorage.invitedUserFirstName=e.FirstName,sessionStorage.invitedUserLastName=e.LastName,sessionStorage.invitedUserMiddleName=e.MiddleName,sessionStorage.invitedEmailAddress=e.EmailAddress,this.router.navigate(["/profile/"+this.tokenId]),this._commonService.dismiss()}this._commonService.dismiss()}catch{this._commonService.clearData(),this.router.navigate(["/login"],{replaceUrl:!0}),this._commonService.dismiss()}})}static \u0275fac=function(i){return new(i||o)(t(S),t(u),t(I),t(f),t(C),t(M),t(N))};static \u0275cmp=l({type:o,selectors:[["app-inviteuser"]],standalone:!1,decls:1,vars:0,consts:[[1,"main-content"]],template:function(i,y){i&1&&d(0,"ion-content",0)},dependencies:[g],encapsulation:2})};var U=[{path:"",component:n}],a=class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=s({type:o});static \u0275inj=r({imports:[c.forChild(U),c]})};var L=class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=s({type:o});static \u0275inj=r({imports:[v,p,h,a]})};export{L as InviteuserPageModule};
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.