"use strict";(self.webpackChunkdps_fe=self.webpackChunkdps_fe||[]).push([[6320],{96320:(S,h,n)=>{n.r(h),n.d(h,{SsoLoginModule:()=>v});var f=n(69808),a=n(51901),c=n(69932),o=n(5e3),r=n(46221),u=n(36953),i=n(4271);let g=(()=>{class t{constructor(e,s,d,m,y){this.router=e,this.authService=s,this.configService=d,this.authState=m,this.actionRoute=y}ngOnInit(){const e=this.actionRoute.snapshot.queryParams.token;console.log(e),this.authService.ssologin(e).subscribe(s=>{if(s.isValid){if(0==s.jsonData.userTypes.length)return void this.router.navigate(["403"]);localStorage.setItem(c.BU.TOKEN,s.jsonData.value),localStorage.setItem(c.BU.USER,JSON.stringify(s.jsonData)),this.authState.dispatch(s.jsonData),this.configService.loadOtherConfig(()=>{let d="";this.actionRoute.snapshot.queryParams.returnUrl&&(d=this.actionRoute.snapshot.queryParams.returnUrl),this.router.navigate([d])})}else window.location.href=this.configService.getConfig().aiModuleUrl})}}return t.\u0275fac=function(e){return new(e||t)(o.Y36(a.F0),o.Y36(r.e),o.Y36(u._),o.Y36(i.V),o.Y36(a.gz))},t.\u0275cmp=o.Xpm({type:t,selectors:[["app-sso-login"]],decls:2,vars:0,consts:[[1,"loader-wrapper"],[1,"loader"]],template:function(e,s){1&e&&(o.TgZ(0,"div",0),o._UZ(1,"span",1),o.qZA())},styles:[".loader[_ngcontent-%COMP%]{width:48px;height:48px;border:5px solid #fff;border-bottom-color:#ff3d00;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.loader-wrapper[_ngcontent-%COMP%]{width:100%;height:100vh;text-align:center;line-height:100vh}"]}),t})(),p=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[a.Bz.forChild([{path:"",component:g}]),a.Bz]}),t})(),v=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.oAB({type:t}),t.\u0275inj=o.cJS({imports:[f.ez,p]}),t})()},46221:(S,h,n)=>{n.d(h,{e:()=>o});var f=n(69932),a=n(80833),c=n(5e3);let o=(()=>{class r extends a.b{login(i){return this.post("/login",i)}ssologin(i){return this.get("/LoginSSO",{token:i})}logout(){let g={FB_Token:localStorage.getItem(f.gT.FIREBASE_TOKEN)};return this.post("/logout",null,{},"",g)}}return r.\u0275fac=function(){let u;return function(g){return(u||(u=c.n5z(r)))(g||r)}}(),r.\u0275prov=c.Yz7({token:r,factory:r.\u0275fac,providedIn:"root"}),r})()}}]);