var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{s(n.next(e))}catch(e){i(e)}}function c(e){try{s(n["throw"](e))}catch(e){i(e)}}function s(e){e.done?r(e.value):a(e.value).then(o,c)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return s([e,t])}}function s(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(i=o[0]&2?a["return"]:o[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;if(a=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-67f7ec52.js";import{o as oidcService,a as appConfigurationService}from"./authentication.service-905f97c2.js";import"./Option-53ef163a.js";import"./index-6869168f.js";import"./datorama-akita-d2413fd0.js";import"./scheduleArray-b9669898.js";import"./delay-d08c267f.js";import"./filter-aeb65cac.js";var OidcCallbackPage=function(){function e(e){registerInstance(this,e)}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this.callbackMode;switch(e){case"sign-in":return[3,1];case"sign-out":return[3,3];case"silent-refresh":return[3,5]}return[3,7];case 1:return[4,oidcService.signInRedirectCallbackAsync()];case 2:t.sent();this.navigateToHomePage();return[3,7];case 3:return[4,oidcService.signOutRedirectCallbackAsync()];case 4:t.sent();return[3,7];case 5:return[4,oidcService.silentRefreshCallbackAsync()];case 6:t.sent();return[3,7];case 7:return[2]}}))}))};e.prototype.render=function(){return h(Host,null)};e.prototype.navigateToHomePage=function(){this.history.replace(appConfigurationService.getAppRootUrl())};return e}();export{OidcCallbackPage as ap_ben_oidc_callback_page};