1import{b as g}from"./chunk-INKEK7LK.js";import{a as d}from"./chunk-MLQT2HSG.js";import{b as u,c as m,e as f,f as p}from"./chunk-26FORJ3B.js";import{g as h}from"./chunk-NCEQPEJE.js";import"@angular/core";import*as a from"@angular/core";import"@angular/core";import*as o from"@angular/core";import*as S from"@angular/material/dialog";import*as v from"@angular/router";var y=(()=>{class e{constructor(t,i,r,c){this._searchService=t,this._config=i,this._dialog=r,this._router=c}resolve(){return this.resetSearchList("",!1)}logOff(){this._config.logOff(),this.resetSearchList("/home")}sessionTimeOut(){this._dialog.closeAll();let t={title:"Error",message:"Session Ended! Please log back in to continue what you were doing."},i=this._dialog.open(u,{data:t});this.logOff()}resetSearchList(t="",i=!0){this._searchService.refreshSearchList();let r=this._router.url;i&&(t!==""&&(r=t),this._router.navigate([r]))}static{this.\u0275fac=function(i){return new(i||e)(o.\u0275\u0275inject(g),o.\u0275\u0275inject(p),o.\u0275\u0275inject(S.MatDialog),o.\u0275\u0275inject(v.Router))}}static{this.\u0275prov=o.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var P=(()=>{class e{constructor(t,i,r,c){this._httpHelper=t,this._sessionService=i,this._utilityService=r,this._googleAnalyticsService=c,this.loginBaseUrl="auth/"}emailLogin(t){let i={email:t.email,accessCode:"",password:t.password,resetKey:"",isCtm:!0};return this._httpHelper.httpHelper("POST",this.loginBaseUrl+"loginEmail",null,i,!0).then(r=>h(this,null,function*(){switch(r.statusNumber){case 1002:case 1008:return"Username / Password combination is invalid";case 1010:return"Username has been locked, try resetting your password.";case 0:let s=w(r);if(this._utilityService.createCookie({currentUser:s}),!this.setCredentials())return;window.location.href="/ctm/profile",this._googleAnalyticsService.trackStudent(s);return;default:let n=r.status;return n.substring(n.indexOf(":")+1,n.length+1)}}))}emailRegistration(t){let i={email:t.email,password:t.password,recaptchaResponse:t.recaptchaResponse,isCtm:!0};return new Promise((r,c)=>this._httpHelper.httpHelper("POST",this.loginBaseUrl+"register",null,i,!0).then(s=>h(this,null,function*(){let n=s.statusNumber,l=w(s);switch(n){case 0:if(this._utilityService.createCookie({currentUser:l}),!this.setCredentials())return;window.location.href="/ctm/profile";break;case 1:this.setCredentials();break;default:}r(l.accessCode?l:s)})).catch(s=>{c(s)}))}passwordResetRequest(t){let i={email:t.email};return this._httpHelper.httpHelper("POST",this.loginBaseUrl+"passwordResetRequest",null,i,!0)}setCredentials(){return this._sessionService.resetSearchList(),this._utilityService.getCookie()!==null}static{this.\u0275fac=function(i){return new(i||e)(a.\u0275\u0275inject(d),a.\u0275\u0275inject(y),a.\u0275\u0275inject(f),a.\u0275\u0275inject(m))}}static{this.\u0275prov=a.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function w(e){return{userId:e.userId,accessCode:e.accessCode,email:e.email,role:e.role,schoolCode:e?.schoolCode,schoolName:e?.schoolName,city:e?.city,state:e?.state,zipCode:e?.zip,mepsId:e?.mepsId,mepsName:e?.mepsName,isRegistered:!0}}export{y as a,P as b};
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.