(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[24182],{23502:(e,r,n)=>{Promise.resolve().then(n.bind(n,86301))},30509:(e,r,n)=>{"use strict";n.d(r,{HB:()=>t,JK:()=>a,XQ:()=>c,bN:()=>l,vh:()=>i});var o=n(14655);function t(e){let r=function(e){let r=window.location.origin,n=new o.O({store:window.localStorage});return{authority:e.issuer,client_id:e.clientId,redirect_uri:"".concat(r,"/login/callback"),post_logout_redirect_uri:"".concat(r,"/login"),response_type:"code",scope:"openid profile email",automaticSilentRenew:!0,silent_redirect_uri:"".concat(r,"/login/silent-refresh"),accessTokenExpiringNotificationTimeInSeconds:60,userStore:n,extraQueryParams:{company:e.companyUuid}}}(e);return new o.$5(r)}function i(e){localStorage.setItem("oidc_config",JSON.stringify(e))}function c(){let e=localStorage.getItem("oidc_config");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}function a(){localStorage.removeItem("oidc_config")}function l(e){return{sub:e.profile.sub,email:e.profile.email,name:e.profile.name,picture:e.profile.picture,accessToken:e.access_token,refreshToken:e.refresh_token,expiresAt:e.expires_at,idToken:e.id_token}}},67712:(e,r,n)=>{"use strict";n.d(r,{q:()=>a});var o=n(55036);let t={debug:0,info:1,warn:2,error:3},i=o.env.NEXT_PUBLIC_LOG_LEVEL||"warn";function c(e){return t[e]>=t[i]}let a={debug:function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];c("debug")&&console.debug("[Chorus] ".concat(e),...n)},info:function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];c("info")&&console.info("[Chorus] ".concat(e),...n)},warn:function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];c("warn")&&console.warn("[Chorus] ".concat(e),...n)},error:function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];c("error")&&console.error("[Chorus] ".concat(e),...n)}}},86301:(e,r,n)=>{"use strict";n.r(r),n.d(r,{default:()=>a});var o=n(1856),t=n(14655),i=n(30509),c=n(67712);function a(){return(0,o.useEffect)(()=>{let e=(0,i.XQ)();(e?(0,i.HB)(e):new t.$5({authority:"",client_id:"",redirect_uri:""})).signinSilentCallback().catch(e=>{c.q.error("Silent refresh callback error:",e)})},[]),null}}},e=>{e.O(0,[14655,74951,65496,77358],()=>e(e.s=23502)),_N_E=e.O()}]);