1"use strict";(self.webpackChunkinitiative_as_a_service=self.webpackChunkinitiative_as_a_service||[]).push([["src_app_features_authentication_authentication_module_ts"],{14402(b,f,a){a.d(f,{AuthenticationModule:()=>E});var u=a(72200),y=a(38132),T=a(10467),U=a(54843),C=a(96697),d=a(49030),P=a(85928),p=a(12429),g=a(67809),h=a(92549),I=a(19792);var t=a(73664),v=a(2615),w=a(17705),M=a(345),O=a(37918),R=a(37001);function B(n,m){1&n&&t.eu8(0)}function A(n,m){if(1&n){const e=t.RV6();t.j41(0,"a",7),t.bIt("click",function(){v.eBV(e);const o=t.XpG();return v.Njj(o.logout())}),t.EFF(1," Click here to logout "),t.k0s()}}function N(n,m){1&n&&(t.j41(0,"div",8)(1,"div",9),t.nrm(2,"div",10),t.k0s()())}const G=[{path:"",component:(()=>{class n{constructor(e,i,o,s,r,c,S,l){this.titleService=e,this.oauthService=i,this.idpService=o,this.rollbar=s,this.authenticateService=r,this.mixPanelService=c,this.userAccountService=S,this.cdr=l,this.message=null,this.displayLogoutButton=!1,this.titleService.setTitle("Authentication")}ngOnInit(){var e=this;this.oauthService.loadDiscoveryDocumentAndTryLogin().then(function(){var i=(0,T.A)(function*(o){if(!o||!e.idpService.claims)return e.message="Error, please retry or contact tech support",e.displayLogoutButton=!0,e.rollbar.handleError("Login was not successful",{claims:e.idpService.claims,accessToken:e.idpService.accessToken,idToken:e.idpService.idToken});{let s={targetUrl:"",communitySfid:null,template:null};try{e.oauthService.state&&(s=e.parseState(e.oauthService.state))}catch{}const{targetUrl:r}=s,c=sessionStorage.getItem(g.zT);e.mixPanelService.setSessionMixPanel(),e.mixPanelService.registerPeopleClaimsProperties(e.idpService.claims),e.handleDetailsPagesBackRedirection(r),e.cleanUpStorageKeys();const S=yield e.authenticateService.setUserMeInfoInStorage();try{const l=yield(0,U._)(e.userAccountService.getUsersCommunities().pipe((0,C.s)(1)));e.mixPanelService.registerPeopleCommunitiesProperties(l)}catch{}e.mixPanelService.registerPeopleUserMeProperties(S),e.mixPanelService.pageTrack(e.mixPanelService.ACTIONS.LOGIN,{}),c&&e.shouldUseUnAuthLocation(window.location.origin+r,c)?(sessionStorage.setItem(g.zT,""),window.location.replace(c)):(sessionStorage.setItem(P.X,"true"),window.location.replace(r))}});return function(o){return i.apply(this,arguments)}}()).catch(i=>{if(i&&"invalid_nonce_in_state"==i.type){if(this.rollbar.watchdog("Invalid Nonce detected",{claims:this.idpService.claims,accessToken:this.idpService.accessToken,idToken:this.idpService.idToken}),!this.oauthService.state)return this.idpService.login("",null,null);try{const{targetUrl:o,communitySfid:s,template:r}=this.parseState(this.oauthService.state);return this.idpService.login(o,s,r)}catch(o){return console.error(o),this.idpService.login("",null,null)}}if(i&&i.params&&"login_required"===i.params.error){const o=sessionStorage.getItem(p.Z.LOGIN_CUSTOM_TARGET_URL);if(sessionStorage.removeItem(p.Z.LOGIN_CUSTOM_TARGET_URL),o)return void window.location.replace(o)}this.cleanUpStorageKeys(),this.message="Error, please retry or contact tech support",this.displayLogoutButton=!0,this.cdr.detectChanges(),console.error(i),this.rollbar.handleError(i)})}shouldUseUnAuthLocation(e,i){return(0,h.iP)(e)===(0,h.iP)(i)}logout(){this.idpService.logout()}getMessage(){return this.message||"Login successful, please wait..."}parseState(e){return(n=>{const m=(n=>n.replace(/semicolon/g,"&").replace(/#/g,"&"))(n);return(n=>{const m=n.get("targetUrl"),e=n.get("template"),i=n.get("communitySfid");return n.delete("targetUrl"),n.delete("communitySfid"),n.delete("template"),{targetUrl:m+"#"+n.toString(),communitySfid:i,template:e}})(new URLSearchParams(m))})(e)}handleDetailsPagesBackRedirection(e){const i=e?.split("/")||[],o=h.if?1:2;if(i.length<o)return;const s=i[o]||"";s&&I.Zk.includes(s)&&sessionStorage.setItem(g.Ot,"true")}cleanUpStorageKeys(){sessionStorage.removeItem(p.Z.LOGIN_CUSTOM_TARGET_URL)}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(M.hE),t.rXU(O.TC),t.rXU(d.JP),t.rXU(d.Pp),t.rXU(R.V),t.rXU(d.aO),t.rXU(d.wf),t.rXU(w.gRc))}}static{this.\u0275cmp=t.VBU({type:n,selectors:[["app-idp-callback"]],standalone:!1,decls:8,vars:3,consts:[["spinner",""],[1,"idp-callback-content"],[1,"idp-callback-logo"],[4,"ngTemplateOutlet"],[1,"idp-callback-message"],[3,"innerHTML"],["style","text-decoration: underline; cursor: pointer",3,"click",4,"ngIf"],[2,"text-decoration","underline","cursor","pointer",3,"click"],[1,"loading-spinner"],[1,"loading-spinner-wrapper"],[1,"loading-spinner-icon"]],template:function(i,o){if(1&i&&(t.j41(0,"div",1)(1,"div",2),t.DNE(2,B,1,0,"ng-container",3),t.k0s(),t.j41(3,"div",4),t.nrm(4,"div",5),t.DNE(5,A,2,0,"a",6),t.k0s()(),t.DNE(6,N,3,0,"ng-template",null,0,t.C5r)),2&i){const s=t.sdS(7);t.R7$(2),t.Y8G("ngTemplateOutlet",s),t.R7$(2),t.Y8G("innerHTML",o.getMessage(),t.npT),t.R7$(),t.Y8G("ngIf",o.displayLogoutButton)}},dependencies:[u.bT,u.T3],styles:[".idp-callback-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100vh;gap:var(--space-300)}.loading-spinner[_ngcontent-%COMP%]{width:60px;height:60px;display:flex;justify-content:center;align-items:center;overflow:hidden;opacity:var(--opacity-high)}.loading-spinner-wrapper[_ngcontent-%COMP%]{min-width:40%;display:flex;justify-content:space-around}.loading-spinner-icon[_ngcontent-%COMP%]{width:.5em;height:.5em;font-size:.5em;border-radius:var(--border-radius-full);animation:_ngcontent-%COMP%_wef-spinner 1.3s linear infinite}@keyframes _ngcontent-%COMP%_wef-spinner{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}"],changeDetection:0})}}return n})()}];let E=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=v.G2t({imports:[u.MD,y.iI.forChild(G)]})}}return n})()}}]);
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.