(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[5735],{

/***/ 89118:
/*!*******************************************************************!*\
  !*** ./src/app/modules/wc/shared/components/components.module.ts ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "ComponentsModuleWc": () => (/* binding */ ComponentsModuleWc)
/* harmony export */ });
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! . */ 1789);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_2__);



const components = [___WEBPACK_IMPORTED_MODULE_1__.LoadingSpinnerComponent];
const modules = [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_0__.SharedModuleModule];
const pipes = [];
class ComponentsModuleWc {
}
ComponentsModuleWc.ɵfac = function ComponentsModuleWc_Factory(t) { return new (t || ComponentsModuleWc)(); };
ComponentsModuleWc.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineNgModule"]({ type: ComponentsModuleWc });
ComponentsModuleWc.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjector"]({ imports: [modules] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵsetNgModuleScope"](ComponentsModuleWc, { declarations: [___WEBPACK_IMPORTED_MODULE_1__.LoadingSpinnerComponent], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_0__.SharedModuleModule], exports: [___WEBPACK_IMPORTED_MODULE_1__.LoadingSpinnerComponent] }); })();


/***/ }),

/***/ 1789:
/*!*******************************************************!*\
  !*** ./src/app/modules/wc/shared/components/index.ts ***!
  \*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LoadingSpinnerComponent": () => (/* reexport safe */ _loading_spinner_loading_spinner_component__WEBPACK_IMPORTED_MODULE_0__.LoadingSpinnerComponent)
/* harmony export */ });
/* harmony import */ var _loading_spinner_loading_spinner_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loading-spinner/loading-spinner.component */ 19704);



/***/ }),

/***/ 19704:
/*!*******************************************************************************************!*\
  !*** ./src/app/modules/wc/shared/components/loading-spinner/loading-spinner.component.ts ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "LoadingSpinnerComponent": () => (/* binding */ LoadingSpinnerComponent)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @ionic/angular */ 93819);



function LoadingSpinnerComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 4);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](1, "ion-img", 5);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} }
class LoadingSpinnerComponent {
    constructor() {
        this.showLogo = true;
    }
    ngOnInit() { }
}
LoadingSpinnerComponent.ɵfac = function LoadingSpinnerComponent_Factory(t) { return new (t || LoadingSpinnerComponent)(); };
LoadingSpinnerComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: LoadingSpinnerComponent, selectors: [["app-loading-spinner"]], inputs: { showLogo: "showLogo" }, decls: 4, vars: 1, consts: [[1, "content_loading"], ["class", "content_loading__logo", 4, "ngIf"], [1, "content_loading__spinner"], ["color", "primary", "name", "crescent"], [1, "content_loading__logo"], ["src", "./assets/svg/logo_start_wc.svg"]], template: function LoadingSpinnerComponent_Template(rf, ctx) { if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, LoadingSpinnerComponent_div_1_Template, 2, 0, "div", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](3, "ion-spinner", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()();
    } if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.showLogo);
    } }, dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.NgIf, _ionic_angular__WEBPACK_IMPORTED_MODULE_2__.IonImg, _ionic_angular__WEBPACK_IMPORTED_MODULE_2__.IonSpinner], styles: [".content_loading[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  height: 100%;\n  background-color: #fff;\n  overflow: hidden;\n  flex-direction: column;\n}\n.content_loading__logo[_ngcontent-%COMP%] {\n  width: 600px;\n  height: auto;\n  animation: zoomIn 1.2s ease forwards;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n.content_loading__logo[_ngcontent-%COMP%]   ion-img[_ngcontent-%COMP%] {\n  width: 200px;\n  height: 200px;\n}\n.content_loading__spinner[_ngcontent-%COMP%] {\n  animation: fadeIn 700ms ease 1.2s forwards;\n  opacity: 0;\n  font-size: 3.4em;\n}\n@keyframes zoomIn {\n  0% {\n    transform: scale(5);\n    opacity: 0;\n  }\n  50% {\n    opacity: 1;\n  }\n  100% {\n    transform: scale(1);\n    opacity: 1;\n  }\n}\n@keyframes fadeIn {\n  0% {\n    opacity: 0;\n  }\n  100% {\n    opacity: 1;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvYWRpbmctc3Bpbm5lci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGFBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0EsWUFBQTtFQUNBLHNCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxzQkFBQTtBQUNGO0FBQ0U7RUFDRSxZQUFBO0VBQ0EsWUFBQTtFQUNBLG9DQUFBO0VBQ0EsYUFBQTtFQUNBLHVCQUFBO0VBQ0EsbUJBQUE7QUFDSjtBQUFJO0VBQ0UsWUFBQTtFQUNBLGFBQUE7QUFFTjtBQUVFO0VBQ0UsMENBQUE7RUFDQSxVQUFBO0VBQ0EsZ0JBQUE7QUFBSjtBQUlBO0VBQ0U7SUFDRSxtQkFBQTtJQUNBLFVBQUE7RUFERjtFQUlBO0lBQ0UsVUFBQTtFQUZGO0VBS0E7SUFDRSxtQkFBQTtJQUNBLFVBQUE7RUFIRjtBQUNGO0FBTUE7RUFDRTtJQUNFLFVBQUE7RUFKRjtFQU9BO0lBQ0UsVUFBQTtFQUxGO0FBQ0YiLCJmaWxlIjoibG9hZGluZy1zcGlubmVyLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbnRlbnRfbG9hZGluZyB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBoZWlnaHQ6IDEwMCU7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XG4gIG92ZXJmbG93OiBoaWRkZW47XG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG5cbiAgJl9fbG9nbyB7XG4gICAgd2lkdGg6IDYwMHB4O1xuICAgIGhlaWdodDogYXV0bztcbiAgICBhbmltYXRpb246IHpvb21JbiAxLjJzIGVhc2UgZm9yd2FyZHM7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGlvbi1pbWcge1xuICAgICAgd2lkdGg6IDIwMHB4O1xuICAgICAgaGVpZ2h0OiAyMDBweDtcbiAgICB9XG4gIH1cblxuICAmX19zcGlubmVyIHtcbiAgICBhbmltYXRpb246IGZhZGVJbiA3MDBtcyBlYXNlIDEuMnMgZm9yd2FyZHM7XG4gICAgb3BhY2l0eTogMDtcbiAgICBmb250LXNpemU6IDMuNGVtO1xuICB9XG59XG5cbkBrZXlmcmFtZXMgem9vbUluIHtcbiAgMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoNSk7XG4gICAgb3BhY2l0eTogMDtcbiAgfVxuXG4gIDUwJSB7XG4gICAgb3BhY2l0eTogMTtcbiAgfVxuXG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XG4gICAgb3BhY2l0eTogMTtcbiAgfVxufVxuXG5Aa2V5ZnJhbWVzIGZhZGVJbiB7XG4gIDAlIHtcbiAgICBvcGFjaXR5OiAwO1xuICB9XG5cbiAgMTAwJSB7XG4gICAgb3BhY2l0eTogMTtcbiAgfVxufVxuIl19 */"] });


/***/ }),

/***/ 81294:
/*!**********************************************************!*\
  !*** ./src/app/modules/wc/start/start-routing.module.ts ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "StartPageRoutingModule": () => (/* binding */ StartPageRoutingModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _start_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./start.page */ 27805);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_2__);




const routes = [
    {
        path: '',
        component: _start_page__WEBPACK_IMPORTED_MODULE_1__.StartPage
    }
];
class StartPageRoutingModule {
}
StartPageRoutingModule.ɵfac = function StartPageRoutingModule_Factory(t) { return new (t || StartPageRoutingModule)(); };
StartPageRoutingModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineNgModule"]({ type: StartPageRoutingModule });
StartPageRoutingModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjector"]({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes), _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵsetNgModuleScope"](StartPageRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();


/***/ }),

/***/ 5735:
/*!**************************************************!*\
  !*** ./src/app/modules/wc/start/start.module.ts ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "StartPageModule": () => (/* binding */ StartPageModule)
/* harmony export */ });
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
/* harmony import */ var _shared_components_components_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/components/components.module */ 89118);
/* harmony import */ var _start_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./start-routing.module */ 81294);
/* harmony import */ var _start_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./start.page */ 27805);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_4__);





class StartPageModule {
}
StartPageModule.ɵfac = function StartPageModule_Factory(t) { return new (t || StartPageModule)(); };
StartPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ type: StartPageModule });
StartPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_0__.SharedModuleModule, _shared_components_components_module__WEBPACK_IMPORTED_MODULE_1__.ComponentsModuleWc, _start_routing_module__WEBPACK_IMPORTED_MODULE_2__.StartPageRoutingModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](StartPageModule, { declarations: [_start_page__WEBPACK_IMPORTED_MODULE_3__.StartPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_0__.SharedModuleModule, _shared_components_components_module__WEBPACK_IMPORTED_MODULE_1__.ComponentsModuleWc, _start_routing_module__WEBPACK_IMPORTED_MODULE_2__.StartPageRoutingModule] }); })();


/***/ }),

/***/ 27805:
/*!************************************************!*\
  !*** ./src/app/modules/wc/start/start.page.ts ***!
  \************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "StartPage": () => (/* binding */ StartPage)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
/* harmony import */ var _angular_architects_module_federation__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular-architects/module-federation */ 14109);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @capacitor/core */ 26549);
/* harmony import */ var _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @shared/interfaces/photo */ 8162);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 84481);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom/client */ 50716);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ 92218);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! rxjs */ 24383);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! rxjs */ 64139);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs/operators */ 86942);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! rxjs/operators */ 88759);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! rxjs/operators */ 59095);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! rxjs/operators */ 47418);
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @shared/services */ 17253);
/* harmony import */ var _shared_services_photo_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @shared/services/photo.service */ 37043);
/* harmony import */ var _wc_shared_services__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wc/shared/services */ 91803);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _shared_services_mfe_wc_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @shared/services/mfe-wc.service */ 2862);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_11__);
















const _c0 = ["reactContainerWc"];

function StartPage_div_3_Template(rf, ctx) {
  if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 4);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](1, "div", 5);
    _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
  }
}

class StartPage {
  constructor(logService, authService, managerTokenUaamobileService, photoService, checkinService, activatedRoute, apiService, mfeWcService, storageWcService, ngZone, walletQrCodeWcService, router, fcmService, translateService) {
    this.logService = logService;
    this.authService = authService;
    this.managerTokenUaamobileService = managerTokenUaamobileService;
    this.photoService = photoService;
    this.checkinService = checkinService;
    this.activatedRoute = activatedRoute;
    this.apiService = apiService;
    this.mfeWcService = mfeWcService;
    this.storageWcService = storageWcService;
    this.ngZone = ngZone;
    this.walletQrCodeWcService = walletQrCodeWcService;
    this.router = router;
    this.fcmService = fcmService;
    this.translateService = translateService;
    this.destroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_12__.Subject();
    this.ipMfeRemoteDevLocal = 'http://10.0.0.149:3000';
    this.isLoading = true;
    this.photoConfig = {
      contentType: 'png',
      defaultSyncState: false
    };
    this.errorLoadReactComponetRemoteEntry = false;
    this.root = null;
    this.reactComponentWc = null;
    this.loadRemoteModuleConfig = {
      exposedModule: './App',
      remoteEntry: '',
      remoteName: 'remote' // Nome do remote name

    };
    this.errorTemplate = `
  <div class="react-wrapper-error">
    <div class="title-wrapper-remote-entry">
      <h1>Ops! </h1>
      <p>Ocorreu um erro ao carregar o Web Check-in</p>
    </div>
    <div class="img-error-wrapper-remote-entry">
      <img src="./assets/svg/ops.svg" alt="Erro ao carregar Web Check-in" />
    </div>
  </div>
`;
    this.errorTemplateFullUrl = `
  <div class="react-wrapper-error">
    <div class="title-wrapper-remote-entry">
      <h1>Erro ao carregar Web Check-in</h1>
      <p>Não foi possível obter a URL base do ambiente</p>
    </div>
    <div class="img-error-wrapper-remote-entry">
      <img src="assets/svg/ops.svg" alt="Erro ao carregar Web Check-in" />
    </div>
  </div>
  `;
    console.log('StartPage', 'Inicializando StartPage');
    this.subscribeToRouteParams();
    this.currentLanguage = this.translateService.getCurrentLang() || 'en-US';
    console.log('currentLanguage', this.currentLanguage);

    if (this.currentLanguage.includes('pt')) {
      this.currentLanguage = 'pt-BR';
    } else if (this.currentLanguage.includes('en')) {
      this.currentLanguage = 'en-US';
    } else if (this.currentLanguage.includes('es')) {
      this.currentLanguage = 'es';
    }
  }

  ionViewDidEnter() {
    this.checkQrCodesForSiteLocator();
  }

  ionViewDidLeave() {
    this.ngZone.run(() => {
      console.log('🧹 Desmontando React completamente...');

      if (this.root) {
        console.log('⚠️ React sendo desmontado...');
        this.root?.unmount();
        this.root = null;
      } // Limpar o container


      if (this.reactContainerWc) {
        this.reactContainerWc.nativeElement.innerHTML = '';
      }

      this.onDestroy();
    });
  }

  ngOnDestroy() {
    this.onDestroy();
    this.storageWcService.resetCheckinData();
  }

  back() {
    this.router.navigate(['/home']);
  }

  onDestroy() {
    this.destroy$?.next();
    this.destroy$?.complete();
  }

  startInitialEssentialData() {
    var _this = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this.isLoading = true;

      try {
        // Verificar se o locator está disponível
        if (!_this.locator) {
          _this.logService.logError('startInitialEssentialData', 'Locator não disponível');

          const prevCheckinData = yield _this.storageWcService.getCheckinData();
          _this.locator = prevCheckinData?.locator;

          if (!_this.locator) {
            throw new Error('Locator não disponível, impossível prosseguir');
          }
        } // Continuar com o restante do método...


        const initialData = yield _this.loadEssentialDataApp();
        const {
          refId,
          account,
          photoStorage,
          token
        } = initialData;
        debugger;
        _this.token = token;
        const tokenFcm = yield _this.getTokenFcm();
        let hasPhoto = false;
        let faceImage = null;
        let validated = false;
        let lastModifiedDate = null;
        let synchronized = false;
        let validationType = _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__.ValidationType.NONE;

        if (!photoStorage?.faceImage) {
          console.log('📸 Buscando foto remota...');
          const photoRemote = yield _this.getPhoto(refId);
          faceImage = photoRemote?.faceImageThumbnail;
          hasPhoto = photoRemote?.faceImageThumbnail !== null;
          validated = photoRemote?.validated ?? false;
          lastModifiedDate = photoRemote?.lastModifiedDate ?? null;
        } else {
          faceImage = photoStorage?.faceImage;
          hasPhoto = photoStorage?.faceImage !== null;
          validated = photoStorage?.validated ?? false;
          lastModifiedDate = photoStorage?.lastModifiedDate ?? null;
          synchronized = photoStorage?.synchronized ?? false;
          validationType = photoStorage?.validationType ?? _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__.ValidationType.NONE;
        }

        if (!initialData) {
          _this.logService.logError('startInitialEssentialData', 'Dados iniciais não carregados');

          return;
        }

        _this.initDataLoadStartEssential = initialData;
        const prevCheckinData = yield _this.storageWcService.getCheckinData();
        const walletQrCodes = yield _this.getQrCodes();

        const siteInstance = _this.findySiteInstanceByLocator(walletQrCodes, _this.locator); // Construção do objeto checkinData com verificações


        const checkinData = {
          refId: refId,
          name: account?.firstName,
          document: account?.document,
          isForeign: prevCheckinData?.isForeign ?? false,
          walletQrCodes: walletQrCodes,
          siteLocator: prevCheckinData?.siteLocator || null,
          companyName: prevCheckinData?.companyName || null,
          companyInstance: prevCheckinData?.companyInstance || null,
          printed: prevCheckinData?.printed || false,
          event: prevCheckinData?.event || null,
          rememberMe: true,
          deepLink: true,
          status: _this.initDataLoadStartEssential?.foreign ? 'APPROVED' : '',
          locator: _this.locator,
          siteInstance: siteInstance,
          qrCode: _this.qrCode || null,
          webToken: tokenFcm,
          language: _this.currentLanguage,
          photo: {
            colaborator: true,
            validated,
            hasPhoto,
            faceImage,
            lastModifiedDate,
            synchronized,
            validationType
          }
        };
        _this.checkinData = checkinData;
        console.log('checkinData', _this.checkinData);

        _this.setCheckinData(checkinData);
      } catch (error) {
        console.error('❌ Erro em startInitialEssentialData:', error);

        _this.handleErrorInitialData(error);
      } finally {
        _this.isLoading = false;
      }
    })();
  }

  subscribeToRouteParams() {
    this.activatedRoute.params.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_13__.map)(params => params?.locator), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_14__.tap)(locator => {
      const dataStateExtrasRouter = this.router.getCurrentNavigation()?.extras;
      this.dataStateExtrasRouter = dataStateExtrasRouter;
      const qrCode = this.dataStateExtrasRouter?.state?.qrCode;

      if (qrCode) {
        this.qrCode = qrCode;
      }
    }), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_15__.switchMap)(l => this.processLocator(l)), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_14__.tap)(urlData => this.handleUrlData(urlData)), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_16__.catchError)(error => {
      console.error('Erro na subscrição de rota:', error);
      return this.handleSubscriptionError(error);
    })).subscribe({
      next: result => console.log('Subscrição processada com sucesso', result),
      error: err => console.error('Erro na subscrição:', err),
      complete: () => console.log('Subscrição de rota completa')
    });
  }

  processLocator(locator) {
    if (!locator) {
      this.logService.logError('processLocator', 'Locator não encontrado');
      return (0,rxjs__WEBPACK_IMPORTED_MODULE_17__.from)(Promise.resolve({
        fullUrl: null,
        hostUrl: null,
        baseUrlContext: null
      }));
    }

    this.locator = locator; // Garantir tratamento adequado da promessa

    const fullUrlPromise = this.mfeWcService.getFullUrl(locator).then(result => {
      return result;
    }).catch(error => {
      throw error; // Relançar para ser capturado pelo catchError
    });
    return (0,rxjs__WEBPACK_IMPORTED_MODULE_17__.from)(fullUrlPromise).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_16__.catchError)(error => {
      return (0,rxjs__WEBPACK_IMPORTED_MODULE_18__.of)(error);
    }));
  }

  handleUrlData(data) {
    if (data && data?.fullUrl && data?.hostUrl && data?.baseUrlContext) {
      this.iniciarFluxoSequencial(data);
    }
  }

  iniciarFluxoSequencial(data) {
    var _this2 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this2.isLoading = true;

      if (!data?.fullUrl) {
        _this2.logService.logError('ERRO_URL', 'URL base não disponível');

        _this2.isLoading = false;
        _this2.reactContainerWc.nativeElement.innerHTML = _this2.errorTemplateFullUrl;
        _this2.isLoading = false;
        return;
      }

      try {
        _this2.storageWcService.setHostUrl(data.fullUrl); // Primeiro: Carregar dados essenciais


        const essentialData = yield _this2.loadEssentialDataApp().catch(error => {
          _this2.logService.logError('iniciarFluxoSequencial', 'Erro ao carregar dados essenciais', error);

          throw new Error(`Falha ao carregar dados essenciais: ${error.message}`);
        });

        if (!essentialData) {
          throw new Error('Dados essenciais não foram carregados corretamente');
        } // Segundo: Inicializar dados completos


        yield _this2.startInitialEssentialData().catch(error => {
          _this2.logService.logError('iniciarFluxoSequencial', 'Erro ao inicializar dados essenciais', error);

          throw new Error(`Falha ao inicializar dados essenciais: ${error.message}`);
        }); // Terceiro: Validar checkinData antes de carregar React

        if (!_this2.checkinData) {
          throw new Error('checkinData está nulo ou undefined');
        }

        if (typeof _this2.checkinData !== 'object') {
          throw new Error('checkinData não é um objeto válido');
        }

        try {
          yield _this2.loadReactComponent().catch( /*#__PURE__*/function () {
            var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (error) {
              // Se o erro for de CORS/CSRF, tentar carregar mesmo assim
              if (error.message?.includes('CORS') || error.message?.includes('csrf')) {
                /*
                 if (this.env.type === 'dev') {
                  await this.loadReactComponent();
                } else {
                  throw error;
                }
                } else {
                throw error;
                }
                */
                throw error;
              }
            });

            return function (_x) {
              return _ref.apply(this, arguments);
            };
          }());
        } catch (reactError) {
          _this2.logService.logError('ERRO_REACT', 'Erro ao carregar componente React', {
            error: reactError,
            url: data.fullUrl
          });

          _this2.isLoading = false;
          _this2.reactContainerWc.nativeElement.innerHTML = _this2.errorTemplate;
          _this2.errorLoadReactComponetRemoteEntry = true;
        } finally {
          _this2.isLoading = false;
        }
      } catch (error) {
        _this2.logService.logError('ERRO_FLUXO', 'Erro no fluxo sequencial', {
          message: error.message,
          stack: error.stack,
          phase: 'iniciarFluxoSequencial'
        });

        if (error.message.includes('checkinData')) {
          _this2.reactContainerWc.nativeElement.innerHTML = `
          <div class="react-wrapper-error">
            <div class="title-wrapper-remote-entry">
              <h1>Erro de Dados</h1>
              <p>Não foi possível carregar os dados necessários para o check-in</p>
            </div>
            <div class="img-error-wrapper-remote-entry">
              <img src="assets/svg/ops.svg" alt="Erro de dados" />
            </div>
          </div>
        `;
        } else {
          _this2.reactContainerWc.nativeElement.innerHTML = _this2.errorTemplate;
          _this2.errorLoadReactComponetRemoteEntry = true;
        }
      } finally {
        _this2.isLoading = false;
      }
    })();
  }

  handleSubscriptionError(error) {
    this.logService.logError('subscribeToRouteParams', 'Erro na subscrição principal', error);
    this.isLoading = false;
    this.reactContainerWc.nativeElement.innerHTML = this.errorTemplate;
    return (0,rxjs__WEBPACK_IMPORTED_MODULE_18__.of)(error);
  }

  handleErrorInitialData(error) {
    const errorMessage = error instanceof Error ? error.message : 'Erro desconhecido';
    this.logService.logError('startInitialEssentialData', `Erro ao carregar dados iniciais: ${errorMessage}`, error);
  }

  loadEssentialDataApp() {
    var _this3 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const promises = [_this3.managerTokenUaamobileService.initStartGetTokenUaaMobile(), _this3.getUUID(), _this3.authService.getRefId(), _this3.authService.getForeigner(), _this3.getAccount(), _this3.authService.getPhoto()];
      const [token, uuid, refId, foreign, account, photoStorage] = yield Promise.all(promises);
      return {
        token: token,
        uuid: uuid,
        refId: refId,
        foreign: foreign,
        account: account,
        photoStorage: photoStorage
      };
    })();
  }

  getAccount() {
    var _this4 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      let account = yield _this4.authService.getAccount();
      let token = null;

      try {
        token = yield _this4.managerTokenUaamobileService.initStartGetTokenUaaMobile();
      } catch (error) {
        _this4.logService.logError('http::managerTokenUaamobileService', 'from getAccount error::token ' + JSON.stringify(error.message), error);

        throw error;
      }

      try {
        if (account && account?.fullName) {
          return account;
        }

        account = yield _this4.apiService.account(token).toPromise();

        _this4.authService.setAccount(account);
      } catch (error) {
        _this4.logService.logError('http::getAccount', 'error::getAccount ' + JSON.stringify(error.message), error);

        throw error;
      }

      return account;
    })();
  }

  getUUID() {
    var _this5 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      return yield _this5.authService.getUUID();
    })();
  }
  /**
   * Salva os dados do checkin no storage
   * @param data - Dados do checkin a serem salvos
   */


  setCheckinData(data) {
    var _this6 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        // Se existe qrCodeData, salva primeiro
        if (data?.qrCodeData) {
          yield _this6.saveQrCodes(data.qrCodeData); // Limpa o qrCodeData do objeto após salvar pois estaou sanvo no storage os qrs wallets

          delete data.qrCodeData;
          data.walletQrCodes = yield _this6.getQrCodes();
        }

        yield _this6.checkinService.updateCheckinData(data);

        const newData = _this6.checkinService.getCheckinData();

        return newData;
      } catch (error) {
        _this6.logService.logError('setCheckinData', 'Erro ao salvar dados', error);

        throw error;
      }
    })();
  }

  getPhoto(refId) {
    var _this7 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const photoInStorage = yield _this7.authService.getPhoto();
      console.log('DEBUG', 'photoInStorage', photoInStorage);
      const token = yield _this7.managerTokenUaamobileService.initStartGetTokenUaaMobile();

      if (!_this7.hasValidPhotoInStorage(photoInStorage)) {
        try {
          const photoSyncColaborator = yield _this7.photoService.getPhoto(token, refId).toPromise();

          if (photoSyncColaborator?.faceImageThumbnail) {
            _this7.handleSyncSuccess(photoSyncColaborator);

            return photoSyncColaborator;
          }

          _this7.handleSyncFailure();

          return null;
        } catch (error) {
          const photoError = error;

          if (photoError.status !== 404) {
            _this7.logService.logError('handleErrorGetPhoto', 'Erro get photo http', photoError);
          }

          return null;
        }
      }

      yield _this7.updateUserPhoto(photoInStorage, refId);
      return null;
    })();
  }

  updateUserPhoto(photoInStorage, refId) {
    var _this8 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      console.log('DEBUG', 'updateUserPhoto', photoInStorage);
      const basePhotoData = {
        colaborator: true,
        refId,
        faceImageContentType: _this8.photoConfig.contentType,
        faceImage: photoInStorage?.faceImage,
        validated: photoInStorage?.validated ?? false,
        lastModifiedDate: photoInStorage?.lastModifiedDate ?? null,
        validationType: photoInStorage?.validationType ?? _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__.ValidationType.NONE
      };

      if (!photoInStorage) {
        return;
      }

      const photoData = _this8.preparePhotoData(photoInStorage, basePhotoData);

      if (photoData.faceImage) {
        yield _this8.updatePhoto(photoData);
      }
    })();
  }

  preparePhotoData(photoInStorage, baseData) {
    const faceImage = photoInStorage?.faceImage ?? '';

    if (this.hasFaceImageAndSynchronizedProperties(photoInStorage)) {
      return { ...baseData,
        faceImage: !photoInStorage.synchronized ? faceImage : ''
      };
    } else {
      return { ...baseData,
        faceImage: faceImage
      };
    }
  }

  updatePhoto(data) {
    var _this9 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        const token = yield _this9.managerTokenUaamobileService.initStartGetTokenUaaMobile();
        const updatePhoto = yield yield _this9.photoService.updatePhoto(token, data).toPromise();

        if (updatePhoto) {
          yield _this9.setPhotoStorage({
            synchronized: true,
            faceImage: data.faceImage,
            validated: data?.validated ?? updatePhoto.validated,
            lastModifiedDate: data?.lastModifiedDate ?? updatePhoto.lastModifiedDate,
            hasPhoto: data?.faceImage !== null,
            validationType: data?.validationType ?? _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__.ValidationType.NONE
          });
        }
      } catch (error) {
        _this9.logService.logError('updatePhoto', 'Erro ao atualizar foto', error);

        throw error; // Propagar o erro para tratamento adequado
      }
    })();
  }

  hasValidPhotoInStorage(photoInStorage) {
    if (!photoInStorage) {
      return false;
    }

    if (this.hasFaceImageAndSynchronizedProperties(photoInStorage)) {
      return Boolean(photoInStorage && photoInStorage.faceImage);
    }

    return true;
  }

  hasFaceImageAndSynchronizedProperties(photoInStorage) {
    return typeof photoInStorage === 'object' && photoInStorage !== null && 'faceImage' in photoInStorage && 'synchronized' in photoInStorage && 'validated' in photoInStorage && 'hasPhoto' in photoInStorage;
  }

  handleSyncFailure() {
    debugger; // Handle the case when the API call for photo retrieval fails

    const updatedPhoto = {
      faceImage: null,
      synchronized: false,
      validated: false,
      hasPhoto: false,
      lastModifiedDate: null,
      validationType: _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__.ValidationType.NONE
    };
    this.setPhotoStorage(updatedPhoto);
  }

  handleSyncSuccess(photoSyncColaborator) {
    // Process and update the photo based on the API response
    const updatedPhoto = {
      faceImage: photoSyncColaborator?.faceImageThumbnail,
      synchronized: true,
      validated: photoSyncColaborator?.validated ?? false,
      hasPhoto: photoSyncColaborator?.faceImageThumbnail !== null,
      lastModifiedDate: photoSyncColaborator?.lastModifiedDate ?? null,
      validationType: photoSyncColaborator?.validationType ?? _shared_interfaces_photo__WEBPACK_IMPORTED_MODULE_3__.ValidationType.NONE
    };
    this.setPhotoStorage(updatedPhoto);
  }

  setPhotoStorage(data) {
    var _this0 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this0.authService.clearPhoto();

      _this0.authService.setPhoto({
        faceImage: data.faceImage ?? '',
        synchronized: data.synchronized,
        validated: data.validated,
        hasPhoto: data.hasPhoto,
        lastModifiedDate: data.lastModifiedDate,
        validationType: data.validationType
      });
    })();
  }

  getQrCodes() {
    var _this1 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      return yield _this1.walletQrCodeWcService.getQRCodes();
    })();
  }

  findySiteInstanceByLocator(qrCodes, locator) {
    const siteInstance = qrCodes.find(qrCode => qrCode.locator === locator);
    return siteInstance?.siteInstance ?? null;
  } // Init React Component MFE - Web Check-in


  loadReactComponent() {
    var _this10 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (retryCount = 0, maxRetries = 3) {
      _this10.isLoading = true;

      try {
        const reactComponent = yield _this10.loadRemoteModuleWithRetry(retryCount, maxRetries);
        yield _this10.initializeReactComponent(reactComponent);
      } catch (error) {
        yield _this10.handleLoadError(error, retryCount);
        throw error;
      } finally {
        _this10.isLoading = false;
      }
    }).apply(this, arguments);
  }

  loadRemoteModuleWithRetry(retryCount, maxRetries) {
    var _this11 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const configRemote = _this11.configRemote();

      if (retryCount > 0) {
        yield _this11.delay(retryCount * 1000);
      }

      try {
        return yield (0,_angular_architects_module_federation__WEBPACK_IMPORTED_MODULE_19__.loadRemoteModule)(configRemote);
      } catch (loadError) {
        return yield _this11.handleLoadModuleError(loadError, retryCount, maxRetries, configRemote);
      }
    })();
  }

  handleLoadModuleError(loadError, retryCount, maxRetries, configRemote) {
    var _this12 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (retryCount < maxRetries) {
        return _this12.loadReactComponent(retryCount + 1, maxRetries);
      }

      if (_this12.isCorsOrConnectionError(loadError)) {
        return yield _this12.tryAlternativeUrl(configRemote);
      }

      throw loadError;
    })();
  }

  isCorsOrConnectionError(error) {
    return error.message?.includes('CORS') || error.message?.includes('csrf') || error.message?.includes('ERR_ADDRESS_UNREACHABLE');
  }

  tryAlternativeUrl(configRemote) {
    var _this13 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const altUrl = _this13.configRemote().remoteEntry;

      configRemote.remoteEntry = altUrl;
      yield _this13.delay(1500);

      try {
        return yield (0,_angular_architects_module_federation__WEBPACK_IMPORTED_MODULE_19__.loadRemoteModule)(configRemote);
      } catch (altError) {
        throw new Error(`Falha ao carregar módulo remoto após todas as tentativas: ${altError.message}`);
      }
    })();
  }

  initializeReactComponent(reactComponent) {
    var _this14 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (!reactComponent?.default) {
        throw new Error('Componente React inválido ou sem exportação default');
      }

      _this14.reactComponentWc = reactComponent;

      _this14.storageWcService.setSecurityDataConfig();

      const securityDataConfig = _this14.storageWcService.getSecurityDataConfig();

      if (!securityDataConfig) {
        throw new Error('Configuração de segurança não disponível - securityDataConfig');
      }

      yield _this14.delay(500);

      _this14.renderReactComponent();
    })();
  }

  handleLoadError(error, retryCount) {
    var _this15 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this15.logService.logError('ERRO_REACT', 'Erro ao carregar componente React', {
        message: error.message,
        stack: error.stack,
        type: error.constructor.name,
        url: _this15.storageWcService.getHostUrl(),
        retryCount
      });
    })();
  }

  delay(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
  }

  configRemote() {
    const fullUrl = this.storageWcService.getHostUrl();

    if (!fullUrl) {
      throw new Error('URL base do ambiente não disponível');
    }

    const remoteEntry = `${fullUrl}remoteEntry.js?v=${Date.now()}`; // if (this.env.type === 'dev') {
    //   remoteEntry = `${this.ipMfeRemoteDevLocal}/remoteEntry.js?v=${Date.now()}`;
    // } else {
    //   remoteEntry = `${fullUrl}remoteEntry.js?v=${Date.now()}`;
    // }

    return { ...this.loadRemoteModuleConfig,
      remoteEntry
    };
  }

  renderReactComponent() {
    try {
      this.forceUnmount();
      setTimeout(() => {
        // Verificar se o componente default existe
        const component = this.reactComponentWc?.default;

        if (!component) {
          throw new Error('Componente React não encontrado');
        } // Verificar se o container existe


        if (!this.reactContainerWc?.nativeElement) {
          throw new Error('Container React não encontrado');
        } // Criar root se não existir


        if (!this.root) {
          this.root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_5__.createRoot)(this.reactContainerWc.nativeElement);
        }

        this.root.render(react__WEBPACK_IMPORTED_MODULE_4__.createElement(component, this.getProps()));
        this.errorLoadReactComponetRemoteEntry = false;
      }, 1); // Microtask delay
    } catch (error) {
      console.log('ERRO_RENDER', 'Falha ao renderizar componente React', {
        error: error.message,
        stack: error.stack
      });
      throw error;
    }
  }

  forceUnmount() {
    if (this.root) {
      this.root.unmount();
      this.root = null;
    }
  }

  getProps() {
    const mobileAppData = this.checkinData;
    console.log('mobileAppData', mobileAppData);
    const props = {
      key: Date.now(),
      mobileAppData,
      mobileUpdate: data => {
        this.ngZone.run(() => {
          this.mobileUpdate(data);
        });
      }
    };
    return props;
  }
  /**
   * Recebe os dados atualizados do React e atualiza o estado do componente Vital para o funcionamento do MEF APP e WC
   * @param mobileUpdate - Dados atualizados do React
   */


  mobileUpdate(updatedData) {
    var _this16 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        if (!updatedData) {
          throw new Error('Dados de atualização inválidos');
        }

        const newData = yield _this16.setCheckinData(updatedData);

        if (newData) {
          _this16.checkinData.walletQrCodes = newData?.walletQrCodes ?? [];
          _this16.checkinData.siteInstance = newData?.siteInstance;
          _this16.checkinData.locatorType = newData?.locatorType ?? null;
          _this16.checkinData.siteLocator = newData?.siteLocator ?? null;
          _this16.checkinData.companyName = newData?.companyName ?? null;
          _this16.checkinData.companyInstance = newData.companyInstance ?? '';
          _this16.checkinData.event = newData?.event ?? null;
          _this16.checkinData.photo.validated = newData?.photo?.validated ?? false;
          _this16.checkinData.photo.hasPhoto = newData?.photo?.hasPhoto ?? false;
          _this16.checkinData.photo.faceImage = newData?.photo?.faceImage ?? null;
          _this16.checkinData.subcategory = newData?.subcategory ?? null;
          _this16.checkinData.hasLogisticModule = newData?.hasLogisticModule ?? false;
          const photoUpdate = {
            faceImage: newData?.photo?.faceImage ?? null,
            synchronized: false,
            validated: newData?.photo?.validated,
            validationType: newData?.photo?.validationType,
            lastModifiedDate: newData?.photo?.lastModifiedDate ?? _this16.checkinData?.photo?.lastModifiedDate
          };

          if (newData?.photo?.lastModifiedDate !== _this16.checkinData?.photo?.lastModifiedDate) {
            _this16.updateUserPhoto(photoUpdate, newData?.refId ?? _this16.checkinData?.refId);
          }

          _this16.getProps();
        }
      } catch (error) {
        _this16.logService.logError('onDataUpdate', 'Erro ao atualizar dados', error);

        throw error;
      }
    })();
  }

  checkQrCodesForSiteLocator() {
    var _this17 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      yield _this17.getQrCodes();
    })();
  }

  saveQrCodes(data) {
    var _this18 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        if (!data?.base64File) {
          _this18.logService.logError('saveQrCodes', 'Dados do QR Code inválidos');

          return;
        }

        const qrCodes = yield _this18.getQrCodes();
        qrCodes.push(data);
        yield _this18.walletQrCodeWcService.saveQRCodes(qrCodes);
      } catch (error) {
        _this18.logService.logError('saveQrCodes', 'Erro ao salvar QR Codes', error);

        throw error;
      }
    })();
  }

  getTokenFcm() {
    var _this19 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const isWeb = _capacitor_core__WEBPACK_IMPORTED_MODULE_2__.Capacitor.getPlatform() === 'web';

      try {
        if (!isWeb) {
          return yield _this19.fcmService.getTokenFcm();
        }
      } catch (error) {
        _this19.logService.logError('getTokenFcm', 'Erro ao obter token FCM', error);

        return null;
      }

      return null;
    })();
  }

}

StartPage.ɵfac = function StartPage_Factory(t) {
  return new (t || StartPage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.ManagerTokenUaamobileService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_photo_service__WEBPACK_IMPORTED_MODULE_7__.PhotoService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_wc_shared_services__WEBPACK_IMPORTED_MODULE_8__.CheckinService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_9__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_mfe_wc_service__WEBPACK_IMPORTED_MODULE_10__.MfeWcService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_wc_shared_services__WEBPACK_IMPORTED_MODULE_8__.StorageWcService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_wc_shared_services__WEBPACK_IMPORTED_MODULE_8__.WalletQrCodeWcService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_9__.Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.FcmService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.TranslateConfigService));
};

StartPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
  type: StartPage,
  selectors: [["app-start"]],
  viewQuery: function StartPage_Query(rf, ctx) {
    if (rf & 1) {
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](_c0, 7);
    }

    if (rf & 2) {
      let _t;

      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.reactContainerWc = _t.first);
    }
  },
  decls: 4,
  vars: 6,
  consts: [[1, "start-page-wrapper", 2, "height", "100%", "position", "relative"], [1, "container-wrapper-remote-entry", 2, "height", "100%", "overflow", "auto", "position", "relative"], ["reactContainerWc", ""], ["class", "loading-container", 4, "ngIf"], [1, "loading-container"], [1, "spinner-border", "text-primary"]],
  template: function StartPage_Template(rf, ctx) {
    if (rf & 1) {
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 0);
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](1, "div", 1, 2);
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](3, StartPage_div_3_Template, 2, 0, "div", 3);
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
    }

    if (rf & 2) {
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵclassProp"]("container-loading", ctx.isLoading)("container-error", ctx.errorLoadReactComponetRemoteEntry);
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("data-state", ctx.isLoading ? "loading" : ctx.errorLoadReactComponetRemoteEntry ? "error" : "ready");
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
      _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.isLoading);
    }
  },
  dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_11__.NgIf],
  styles: [".container-wrapper-remote-entry .react-wrapper-error {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  height: 100vh;\n  justify-content: center;\n  padding: 1em;\n  text-align: center;\n}\n.container-wrapper-remote-entry .react-wrapper-error .title-wrapper-remote-entry h1 {\n  font-size: 2.3rem !important;\n  color: #333 !important;\n  font-weight: 600;\n}\n.container-wrapper-remote-entry .react-wrapper-error .title-wrapper-remote-entry p {\n  font-size: 1.1rem !important;\n  color: #333 !important;\n  line-height: 1.5;\n}\n.container-wrapper-remote-entry .react-wrapper-error .img-error-wrapper-remote-entry {\n  width: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n.container-wrapper-remote-entry .react-wrapper-error .img-error-wrapper-remote-entry img {\n  width: 65vw;\n}\n.bottom-start-wc {\n  position: absolute;\n  bottom: 1em;\n  margin: 10px;\n  width: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  z-index: 1000;\n}\n.loading-container {\n  position: absolute;\n  overflow: visible;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n  z-index: 1000;\n}\n.start-page-wrapper {\n  height: 100%;\n  position: relative;\n  overflow: hidden;\n}\n.container-wrapper-remote-entry {\n  transition: opacity 0.3s ease;\n}\n.container-wrapper-remote-entry.container-loading {\n  opacity: 0.3;\n  pointer-events: none;\n}\n.container-wrapper-remote-entry.container-error {\n  opacity: 0.1;\n  pointer-events: none;\n}\n.loading-overlay {\n  -webkit-backdrop-filter: blur(2px);\n          backdrop-filter: blur(2px);\n}\n.loading-overlay app-loading-spinner {\n  transform: scale(1.2);\n}\n.error-overlay {\n  -webkit-backdrop-filter: blur(1px);\n          backdrop-filter: blur(1px);\n}\n.error-overlay .error-content {\n  background: white;\n  border-radius: 12px;\n  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);\n  max-width: 300px;\n  animation: slideIn 0.3s ease-out;\n}\n.spinner-border.text-primary {\n  color: var(--ion-color-primary) !important;\n}\n@keyframes slideIn {\n  from {\n    opacity: 0;\n    transform: translateY(-20px);\n  }\n  to {\n    opacity: 1;\n    transform: translateY(0);\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0YXJ0LnBhZ2Uuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLGFBQUE7RUFDQSxzQkFBQTtFQUNBLG1CQUFBO0VBQ0EsYUFBQTtFQUNBLHVCQUFBO0VBQ0EsWUFBQTtFQUNBLGtCQUFBO0FBQUo7QUFHTTtFQUNFLDRCQUFBO0VBQ0Esc0JBQUE7RUFDQSxnQkFBQTtBQURSO0FBSU07RUFDRSw0QkFBQTtFQUNBLHNCQUFBO0VBQ0EsZ0JBQUE7QUFGUjtBQU1JO0VBQ0UsV0FBQTtFQUNBLGFBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0FBSk47QUFLTTtFQUNFLFdBQUE7QUFIUjtBQVFBO0VBQ0Usa0JBQUE7RUFDQSxXQUFBO0VBQ0EsWUFBQTtFQUNBLFdBQUE7RUFDQSxhQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtFQUNBLGFBQUE7QUFMRjtBQVFBO0VBQ0Usa0JBQUE7RUFDQSxpQkFBQTtFQUNBLFFBQUE7RUFDQSxTQUFBO0VBQ0EsZ0NBQUE7RUFDQSxhQUFBO0FBTEY7QUFTQTtFQUNFLFlBQUE7RUFDQSxrQkFBQTtFQUNBLGdCQUFBO0FBTkY7QUFTQTtFQUNFLDZCQUFBO0FBTkY7QUFRRTtFQUNFLFlBQUE7RUFDQSxvQkFBQTtBQU5KO0FBU0U7RUFDRSxZQUFBO0VBQ0Esb0JBQUE7QUFQSjtBQVdBO0VBQ0Usa0NBQUE7VUFBQSwwQkFBQTtBQVJGO0FBVUU7RUFDRSxxQkFBQTtBQVJKO0FBWUE7RUFDRSxrQ0FBQTtVQUFBLDBCQUFBO0FBVEY7QUFXRTtFQUNFLGlCQUFBO0VBQ0EsbUJBQUE7RUFDQSx5Q0FBQTtFQUNBLGdCQUFBO0VBQ0EsZ0NBQUE7QUFUSjtBQVlBO0VBQ0UsMENBQUE7QUFURjtBQVlBO0VBQ0U7SUFDRSxVQUFBO0lBQ0EsNEJBQUE7RUFURjtFQVdBO0lBQ0UsVUFBQTtJQUNBLHdCQUFBO0VBVEY7QUFDRiIsImZpbGUiOiJzdGFydC5wYWdlLnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY29udGFpbmVyLXdyYXBwZXItcmVtb3RlLWVudHJ5IHtcbiAgLnJlYWN0LXdyYXBwZXItZXJyb3Ige1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGhlaWdodDogMTAwdmg7XG4gICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgcGFkZGluZzogMWVtO1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcblxuICAgIC50aXRsZS13cmFwcGVyLXJlbW90ZS1lbnRyeSB7XG4gICAgICBoMSB7XG4gICAgICAgIGZvbnQtc2l6ZTogMi4zcmVtICFpbXBvcnRhbnQ7XG4gICAgICAgIGNvbG9yOiAjMzMzICFpbXBvcnRhbnQ7XG4gICAgICAgIGZvbnQtd2VpZ2h0OiA2MDA7XG4gICAgICB9XG5cbiAgICAgIHAge1xuICAgICAgICBmb250LXNpemU6IDEuMXJlbSAhaW1wb3J0YW50O1xuICAgICAgICBjb2xvcjogIzMzMyAhaW1wb3J0YW50O1xuICAgICAgICBsaW5lLWhlaWdodDogMS41O1xuICAgICAgfVxuICAgIH1cblxuICAgIC5pbWctZXJyb3Itd3JhcHBlci1yZW1vdGUtZW50cnkge1xuICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgaW1nIHtcbiAgICAgICAgd2lkdGg6IDY1dnc7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4uYm90dG9tLXN0YXJ0LXdjIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBib3R0b206IDFlbTtcbiAgbWFyZ2luOiAxMHB4O1xuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIHotaW5kZXg6IDEwMDA7XG59XG5cbi5sb2FkaW5nLWNvbnRhaW5lciB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgb3ZlcmZsb3c6IHZpc2libGU7XG4gIHRvcDogNTAlO1xuICBsZWZ0OiA1MCU7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIC01MCUpO1xuICB6LWluZGV4OiAxMDAwO1xufVxuXG4vLyDinIUgTk9WT1MgRVNUSUxPUzogUGFyYSBtZWxob3IgVVhcbi5zdGFydC1wYWdlLXdyYXBwZXIge1xuICBoZWlnaHQ6IDEwMCU7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbn1cblxuLmNvbnRhaW5lci13cmFwcGVyLXJlbW90ZS1lbnRyeSB7XG4gIHRyYW5zaXRpb246IG9wYWNpdHkgMC4zcyBlYXNlO1xuXG4gICYuY29udGFpbmVyLWxvYWRpbmcge1xuICAgIG9wYWNpdHk6IDAuMzsgLy8gRGVpeGEgbGV2ZW1lbnRlIHRyYW5zcGFyZW50ZSBkdXJhbnRlIGxvYWRpbmdcbiAgICBwb2ludGVyLWV2ZW50czogbm9uZTsgLy8gRGVzYWJpbGl0YSBpbnRlcmHDp8O1ZXNcbiAgfVxuXG4gICYuY29udGFpbmVyLWVycm9yIHtcbiAgICBvcGFjaXR5OiAwLjE7IC8vIFF1YXNlIGludmlzw612ZWwgcXVhbmRvIGjDoSBlcnJvXG4gICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gIH1cbn1cblxuLmxvYWRpbmctb3ZlcmxheSB7XG4gIGJhY2tkcm9wLWZpbHRlcjogYmx1cigycHgpOyAvLyBFZmVpdG8gYmx1ciBubyBmdW5kb1xuXG4gIGFwcC1sb2FkaW5nLXNwaW5uZXIge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMS4yKTsgLy8gU3Bpbm5lciB1bSBwb3VjbyBtYWlvclxuICB9XG59XG5cbi5lcnJvci1vdmVybGF5IHtcbiAgYmFja2Ryb3AtZmlsdGVyOiBibHVyKDFweCk7XG5cbiAgLmVycm9yLWNvbnRlbnQge1xuICAgIGJhY2tncm91bmQ6IHdoaXRlO1xuICAgIGJvcmRlci1yYWRpdXM6IDEycHg7XG4gICAgYm94LXNoYWRvdzogMCA0cHggMjBweCByZ2JhKDAsIDAsIDAsIDAuMSk7XG4gICAgbWF4LXdpZHRoOiAzMDBweDtcbiAgICBhbmltYXRpb246IHNsaWRlSW4gMC4zcyBlYXNlLW91dDtcbiAgfVxufVxuLnNwaW5uZXItYm9yZGVyLnRleHQtcHJpbWFyeSB7XG4gIGNvbG9yOiB2YXIoLS1pb24tY29sb3ItcHJpbWFyeSkgIWltcG9ydGFudDtcbn1cblxuQGtleWZyYW1lcyBzbGlkZUluIHtcbiAgZnJvbSB7XG4gICAgb3BhY2l0eTogMDtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoLTIwcHgpO1xuICB9XG4gIHRvIHtcbiAgICBvcGFjaXR5OiAxO1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgwKTtcbiAgfVxufVxuIl19 */"],
  encapsulation: 2
});

/***/ }),

/***/ 2862:
/*!***************************************************!*\
  !*** ./src/app/shared/services/mfe-wc.service.ts ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "MfeWcService": () => (/* binding */ MfeWcService)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
/* harmony import */ var _environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @environment */ 92340);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 64139);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 88919);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ 86942);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs/operators */ 88759);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ 47418);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _bootstrapwc_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bootstrapwc.service */ 39961);
/* harmony import */ var _log_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.service */ 23753);
/* harmony import */ var _modules_wc_shared_services__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @modules/wc/shared/services */ 91803);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common/http */ 59584);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_angular_common_http__WEBPACK_IMPORTED_MODULE_6__);









class MfeWcService {
  constructor(bootstrapWcService, logService, storageWcService, http) {
    var _this = this;

    this.bootstrapWcService = bootstrapWcService;
    this.logService = logService;
    this.storageWcService = storageWcService;
    this.http = http;
    this.env = _environment__WEBPACK_IMPORTED_MODULE_1__.environment;
    this.isInitialized = false;
    this.initializationPromise = null;
    /**
     * Retorna a URL completa baseada no locator informado.
     */

    this.getFullUrl = /*#__PURE__*/function () {
      var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (locatorParam) {
        try {
          yield _this.ensureInitialized();
        } catch (error) {
          _this.logService.logError('AppMfeWcService', 'Falha na inicialização, usando valores padrão', error);

          return _this.getDefaultUrlData();
        }

        const locator = locatorParam || _this.getSafeLocatorValue();

        if (!locator) {
          _this.logService.logError('AppMfeWcService', 'Locator não disponível, usando valores padrão');

          return _this.getDefaultUrlData();
        }

        try {
          const baseUrlContext = (yield _this.getBasePlatformUrlSafely(locator)) || '/default/';

          const hostUrl = _this.getDefaultHostForEnvironment();

          const fullUrl = `${hostUrl}${baseUrlContext}`;

          _this.logService.logEvent('MfeWcService', 'FullUrl obtida', {
            fullUrl
          });

          _this.storageWcService.setHostUrl(fullUrl);

          _this.storageWcService.setAddXrsfHeader(true);

          try {
            yield _this.setCsrf(hostUrl, baseUrlContext);
          } catch (csrfError) {
            _this.logService.logError('AppMfeWcService', 'Erro em setCsrf, continuando fluxo', csrfError);
          }

          const result = {
            fullUrl,
            hostUrl,
            baseUrlContext
          };
          return result;
        } catch (error) {
          _this.logService.logError('AppMfeWcService', 'Erro em getFullUrl', error);

          return _this.getDefaultUrlData();
        }
      });

      return function (_x) {
        return _ref.apply(this, arguments);
      };
    }();
  }
  /**
   * Garante que o serviço esteja inicializado antes de ser usado.
   */


  ensureInitialized() {
    if (this.isInitialized) return Promise.resolve();

    if (!this.initializationPromise) {
      this.initializationPromise = new Promise((resolve, reject) => {
        try {
          if (!this.bootstrapWcService) {
            this.logService.logError('AppMfeWcService', 'bootstrapWcService não disponível');
            return reject(new Error('bootstrapWcService não disponível'));
          }

          this.logService.logEvent('AppMfeWcService', 'Inicialização concluída com sucesso');
          this.isInitialized = true;
          resolve();
        } catch (error) {
          this.logService.logError('AppMfeWcService', 'Erro na inicialização', error);
          reject(error);
        }
      });
    }

    return this.initializationPromise;
  }
  /**
   * Recupera o valor do locator de forma segura.
   */


  getSafeLocatorValue() {
    try {
      return this.bootstrapWcService.locator$.getValue();
    } catch (error) {
      this.logService.logError('AppMfeWcService', 'Erro ao obter locator do BehaviorSubject', error);
      return null;
    }
  }
  /**
   * Obtém a URL base da plataforma com retry e timeout.
   */


  getBasePlatformUrlSafely(locator) {
    var _this2 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      return new Promise((resolve, reject) => {
        const timeoutId = setTimeout(() => {
          _this2.logService.logError('AppMfeWcService', 'Timeout ao obter baseUrlPlatform');

          reject(new Error('Timeout ao obter baseUrlPlatform'));
        }, 10000);

        _this2.bootstrapWcService.getBasePlatformUrl(locator).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.retry)(3)).subscribe({
          next: result => {
            clearTimeout(timeoutId);
            resolve(result);
          },
          error: error => {
            clearTimeout(timeoutId);

            _this2.logService.logError('AppMfeWcService', 'Erro ao obter baseUrlPlatform', error);

            reject(error);
          }
        });
      });
    })();
  }
  /**
   * Define o CSRF no storage.
   */


  setCsrf(hostUrl, baseUrlContext) {
    var _this3 = this;

    return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      console.log('Aqui 1 csrf');

      try {
        const csrf = yield _this3.getCsrf().toPromise();

        if (csrf?.msgCode === 'CSRF_NOT_FOUND') {
          _this3.logService.logError('AppMfeWcService', 'CSRF não encontrado', {});

          return;
        }

        _this3.storageWcService.setCsrf(csrf);
      } catch (error) {
        _this3.logService.logError('AppMfeWcService', 'Erro ao obter o CSRF', error);

        throw error;
      }
    })();
  }
  /**
   * Requisição para obter CSRF.
   */


  getCsrf() {
    const url = `${_environment__WEBPACK_IMPORTED_MODULE_1__.environment.protocol}://${_environment__WEBPACK_IMPORTED_MODULE_1__.environment.url}:${_environment__WEBPACK_IMPORTED_MODULE_1__.environment.port}/api/csrf`;
    const token = this.getCsrfStorage();
    return this.http.post(`${url}`, {
      token
    }, {
      headers: {
        pragma: 'no-cache',
        'cache-control': 'no-cache'
      },
      responseType: 'text'
    }).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.map)(response => response), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_9__.tap)(csrf => console.log('TAP:: csrf:: ', csrf)), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.catchError)(error => (0,rxjs__WEBPACK_IMPORTED_MODULE_11__.of)({ ...error,
      msgCode: 'CSRF_NOT_FOUND',
      message: 'CSRF não encontrado'
    })));
  }
  /**
   * Retorna valores padrão para URL quando ocorre falha.
   */


  getDefaultUrlData() {
    const hostUrl = this.getDefaultHostForEnvironment();
    const baseUrlContext = '/default/';
    const fullUrl = `${hostUrl}${baseUrlContext}`;
    this.storageWcService.setHostUrl(fullUrl);
    this.logService.logEvent('AppMfeWcService', 'Usando FullUrl padrão após erro', {
      fullUrl
    });
    return {
      fullUrl,
      hostUrl,
      baseUrlContext
    };
  }
  /**
   * Retorna o host padrão conforme o ambiente.
   */


  getDefaultHostForEnvironment() {
    switch (this.env.type) {
      case 'prod':
        return 'https://visitante.in';

      case 'homol':
        return 'https://h.visitante.in';

      case 'dev':
        return 'https://sectotemvirtual.cloud.olimpia';
    }
  }

  getCsrfStorage() {
    return this.storageWcService.getCsrf() || '';
  }

}

MfeWcService.ɵfac = function MfeWcService_Factory(t) {
  return new (t || MfeWcService)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_bootstrapwc_service__WEBPACK_IMPORTED_MODULE_3__.BootstrapWcService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_log_service__WEBPACK_IMPORTED_MODULE_4__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_modules_wc_shared_services__WEBPACK_IMPORTED_MODULE_5__.StorageWcService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_6__.HttpClient));
};

MfeWcService.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjectable"]({
  token: MfeWcService,
  factory: MfeWcService.ɵfac,
  providedIn: 'root'
});

/***/ }),

/***/ 37043:
/*!**************************************************!*\
  !*** ./src/app/shared/services/photo.service.ts ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "PhotoService": () => (/* binding */ PhotoService)
/* harmony export */ });
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 92218);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 12378);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 45398);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ 46774);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ 59095);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 85921);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ 44661);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 45449);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _api_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./api.service */ 94761);




class PhotoService {
    constructor(apiService) {
        this.apiService = apiService;
        this.destroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_2__.Subject();
    }
    getPhoto(token, refId) {
        return this.apiService.getUserThumbnailPhoto(token, refId);
    }
    updatePhoto(token, data) {
        let subscription;
        return new rxjs__WEBPACK_IMPORTED_MODULE_3__.Observable(observer => {
            subscription = this.retryUpdatePhoto(token, data).subscribe(value => {
                observer.next(value);
                observer.complete();
            }, error => observer.error(error));
        });
    }
    retryUpdatePhoto(token, data) {
        return this.updatePhotoSendAPI(token, data).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.retryWhen)(errors => errors.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.switchMap)((error, index) => {
            console.log('Erro, Tentativa:', index);
            if (index < 2) {
                return (0,rxjs__WEBPACK_IMPORTED_MODULE_6__.timer)(0); // Tentar imediatamente 3 vezes
            }
            else {
                const randomSeconds = Math.floor(Math.random() * 10 * 60) + 60;
                const timeValue = randomSeconds >= 60 ? Math.floor(randomSeconds / 60) : randomSeconds;
                const milliseconds = randomSeconds * 1000;
                const timeUnit = randomSeconds >= 60 ? 'minuto(s)' : 'segundo(s)';
                const delayTime = milliseconds; // Delay aleatório de 1 a 10 minutos
                console.log(`Aguardando ${timeValue} ${timeUnit} (${milliseconds} milissegundos) antes de tentar novamente...`);
                return (0,rxjs__WEBPACK_IMPORTED_MODULE_6__.timer)(delayTime).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.switchMap)(() => {
                    console.log('Tentando novamente após atraso...');
                    return this.retryUpdatePhoto(token, data);
                }));
            }
        }), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.takeUntil)(this.destroy$))), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.finalize)(() => {
            this.unsubscribe();
        }));
    }
    updatePhotoSendAPI(token, data) {
        return this.apiService.updatePhoto(token, data);
    }
    unsubscribe() {
        this.destroy$.next();
        this.destroy$.complete();
    }
}
PhotoService.ɵfac = function PhotoService_Factory(t) { return new (t || PhotoService)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_api_service__WEBPACK_IMPORTED_MODULE_1__.ApiService)); };
PhotoService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: PhotoService, factory: PhotoService.ɵfac, providedIn: 'root' });


/***/ }),

/***/ 50716:
/*!******************************************!*\
  !*** ./node_modules/react-dom/client.js ***!
  \******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {



var m = __webpack_require__(/*! react-dom */ 97170);

if (false) {} else {
  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

  exports.createRoot = function (c, o) {
    i.usingClientEntryPoint = true;

    try {
      return m.createRoot(c, o);
    } finally {
      i.usingClientEntryPoint = false;
    }
  };

  exports.hydrateRoot = function (c, h, o) {
    i.usingClientEntryPoint = true;

    try {
      return m.hydrateRoot(c, h, o);
    } finally {
      i.usingClientEntryPoint = false;
    }
  };
}

/***/ }),

/***/ 45398:
/*!*****************************************************************!*\
  !*** ./node_modules/rxjs/_esm2015/internal/observable/timer.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "timer": () => (/* binding */ timer)
/* harmony export */ });
/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ 12378);
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduler/async */ 10328);
/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isNumeric */ 7269);
/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ 27507);




function timer(dueTime = 0, periodOrScheduler, scheduler) {
  let period = -1;

  if ((0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(periodOrScheduler)) {
    period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
  } else if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(periodOrScheduler)) {
    scheduler = periodOrScheduler;
  }

  if (!(0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(scheduler)) {
    scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__.async;
  }

  return new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(subscriber => {
    const due = (0,_util_isNumeric__WEBPACK_IMPORTED_MODULE_0__.isNumeric)(dueTime) ? dueTime : +dueTime - scheduler.now();
    return scheduler.schedule(dispatch, due, {
      index: 0,
      period,
      subscriber
    });
  });
}

function dispatch(state) {
  const {
    index,
    period,
    subscriber
  } = state;
  subscriber.next(index);

  if (subscriber.closed) {
    return;
  } else if (period === -1) {
    return subscriber.complete();
  }

  state.index = index + 1;
  this.schedule(state, period);
}

/***/ }),

/***/ 7269:
/*!***************************************************************!*\
  !*** ./node_modules/rxjs/_esm2015/internal/util/isNumeric.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "isNumeric": () => (/* binding */ isNumeric)
/* harmony export */ });
/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isArray */ 94327);

function isNumeric(val) {
  return !(0,_isArray__WEBPACK_IMPORTED_MODULE_0__.isArray)(val) && val - parseFloat(val) + 1 >= 0;
}

/***/ }),

/***/ 14109:
/*!******************************************************************************************************************************!*\
  !*** ./node_modules/@angular-architects/module-federation-runtime/fesm2020/angular-architects-module-federation-runtime.mjs ***!
  \******************************************************************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "getManifest": () => (/* binding */ getManifest),
/* harmony export */   "loadManifest": () => (/* binding */ loadManifest),
/* harmony export */   "loadRemoteEntry": () => (/* binding */ loadRemoteEntry),
/* harmony export */   "loadRemoteModule": () => (/* binding */ loadRemoteModule),
/* harmony export */   "setManifest": () => (/* binding */ setManifest)
/* harmony export */ });
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);

let config = {};
const containerMap = {};
const remoteMap = {};
let isDefaultScopeInitialized = false;

function lookupExposedModule(_x, _x2) {
  return _lookupExposedModule.apply(this, arguments);
}

function _lookupExposedModule() {
  _lookupExposedModule = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (key, exposedModule) {
    const container = containerMap[key];
    const factory = yield container.get(exposedModule);
    const Module = factory();
    return Module;
  });
  return _lookupExposedModule.apply(this, arguments);
}

function initRemote(_x3, _x4) {
  return _initRemote.apply(this, arguments);
}

function _initRemote() {
  _initRemote = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (container, key) {
    // const container = window[key] as Container;
    // Do we still need to initialize the remote?
    if (remoteMap[key]) {
      return container;
    } // Do we still need to initialize the share scope?


    if (!isDefaultScopeInitialized) {
      yield __webpack_require__.I('default');
      isDefaultScopeInitialized = true;
    }

    yield container.init(__webpack_require__.S.default);
    remoteMap[key] = true;
    return container;
  });
  return _initRemote.apply(this, arguments);
}

function loadRemoteEntry(_x5, _x6) {
  return _loadRemoteEntry.apply(this, arguments);
}

function _loadRemoteEntry() {
  _loadRemoteEntry = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (remoteEntryOrOptions, remoteName) {
    if (typeof remoteEntryOrOptions === 'string') {
      const remoteEntry = remoteEntryOrOptions;
      return yield loadRemoteScriptEntry(remoteEntry, remoteName);
    } else if (remoteEntryOrOptions.type === 'script') {
      const options = remoteEntryOrOptions;
      return yield loadRemoteScriptEntry(options.remoteEntry, options.remoteName);
    } else if (remoteEntryOrOptions.type === 'module') {
      const options = remoteEntryOrOptions;
      yield loadRemoteModuleEntry(options.remoteEntry);
    }
  });
  return _loadRemoteEntry.apply(this, arguments);
}

function loadRemoteModuleEntry(_x7) {
  return _loadRemoteModuleEntry.apply(this, arguments);
}

function _loadRemoteModuleEntry() {
  _loadRemoteModuleEntry = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (remoteEntry) {
    if (containerMap[remoteEntry]) {
      return Promise.resolve();
    }

    return yield import(
    /* webpackIgnore:true */
    remoteEntry).then(container => {
      initRemote(container, remoteEntry);
      containerMap[remoteEntry] = container;
    });
  });
  return _loadRemoteModuleEntry.apply(this, arguments);
}

function loadRemoteScriptEntry(_x8, _x9) {
  return _loadRemoteScriptEntry.apply(this, arguments);
} // eslint-disable-next-line @typescript-eslint/no-explicit-any


function _loadRemoteScriptEntry() {
  _loadRemoteScriptEntry = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (remoteEntry, remoteName) {
    return new Promise((resolve, reject) => {
      // Is remoteEntry already loaded?
      if (containerMap[remoteName]) {
        resolve();
        return;
      }

      const script = document.createElement('script');
      script.src = remoteEntry;
      script.onerror = reject;

      script.onload = () => {
        const container = window[remoteName];
        initRemote(container, remoteName);
        containerMap[remoteName] = container;
        resolve();
      };

      document.body.appendChild(script);
    });
  });
  return _loadRemoteScriptEntry.apply(this, arguments);
}

function loadRemoteModule(_x0) {
  return _loadRemoteModule.apply(this, arguments);
}

function _loadRemoteModule() {
  _loadRemoteModule = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (options) {
    let loadRemoteEntryOptions;
    let key;
    let remoteEntry; // To support legacy API (< ng 13)

    if (!options.type) {
      options.type = 'script';
    }

    if (options.type === 'manifest') {
      const manifestEntry = config[options.remoteName];

      if (!manifestEntry) {
        throw new Error('Manifest does not contain ' + options.remoteName);
      }

      options = {
        type: manifestEntry.type,
        exposedModule: options.exposedModule,
        remoteEntry: manifestEntry.remoteEntry,
        remoteName: manifestEntry.type === 'script' ? options.remoteName : undefined
      };
      remoteEntry = manifestEntry.remoteEntry;
    } else {
      remoteEntry = options.remoteEntry;
    }

    if (options.type === 'script') {
      loadRemoteEntryOptions = {
        type: 'script',
        remoteEntry: options.remoteEntry,
        remoteName: options.remoteName
      };
      key = options.remoteName;
    } else if (options.type === 'module') {
      loadRemoteEntryOptions = {
        type: 'module',
        remoteEntry: options.remoteEntry
      };
      key = options.remoteEntry;
    }

    if (remoteEntry) {
      yield loadRemoteEntry(loadRemoteEntryOptions);
    }

    return yield lookupExposedModule(key, options.exposedModule);
  });
  return _loadRemoteModule.apply(this, arguments);
}

function setManifest(_x1) {
  return _setManifest.apply(this, arguments);
}

function _setManifest() {
  _setManifest = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (manifest, skipRemoteEntries = false) {
    config = parseConfig(manifest);

    if (!skipRemoteEntries) {
      yield loadRemoteEntries();
    }
  });
  return _setManifest.apply(this, arguments);
}

function getManifest() {
  return config;
}

function loadManifest(_x10) {
  return _loadManifest.apply(this, arguments);
}

function _loadManifest() {
  _loadManifest = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (configFile, skipRemoteEntries = false) {
    const result = yield fetch(configFile);

    if (!result.ok) {
      throw Error('could not load configFile: ' + configFile);
    }

    config = parseConfig(yield result.json());

    if (!skipRemoteEntries) {
      yield loadRemoteEntries();
    }
  });
  return _loadManifest.apply(this, arguments);
}

function parseConfig(config) {
  const result = {};

  for (let key in config) {
    const value = config[key];
    let entry;

    if (typeof value === 'string') {
      entry = {
        remoteEntry: value,
        type: 'module'
      };
    } else {
      entry = { ...value,
        type: value.type || 'module'
      };
    }

    result[key] = entry;
  }

  return result;
}

function loadRemoteEntries() {
  return _loadRemoteEntries.apply(this, arguments);
}
/**
 * Generated bundle index. Do not edit.
 */


function _loadRemoteEntries() {
  _loadRemoteEntries = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
    const promises = [];

    for (let key in config) {
      const entry = config[key];

      if (entry.type === 'module') {
        promises.push(loadRemoteEntry({
          type: 'module',
          remoteEntry: entry.remoteEntry
        }));
      } else {
        promises.push(loadRemoteEntry({
          type: 'script',
          remoteEntry: entry.remoteEntry,
          remoteName: key
        }));
      }
    }

    yield Promise.all(promises);
  });
  return _loadRemoteEntries.apply(this, arguments);
}



/***/ })

}])
//# sourceMappingURL=5735.js.map