Files
kapp/4431.js
T
2026-05-12 16:58:11 -03:00

839 lines
49 KiB
JavaScript

(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[4431],{
/***/ 34431:
/*!*********************************************************!*\
!*** ./src/app/identity-check/identity-check.module.ts ***!
\*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "IdentityCheckPageModule": () => (/* binding */ IdentityCheckPageModule)
/* 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 _shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared-module/shared-module.module */ 69270);
/* harmony import */ var _identity_check_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity-check.page */ 94421);
/* harmony import */ var _shared_components_forgot_password_modal_forgot_password_modal_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/components/forgot-password-modal/forgot-password-modal.component */ 38124);
/* 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__);
const routes = [
{
path: '',
component: _identity_check_page__WEBPACK_IMPORTED_MODULE_2__.IdentityCheckPage
}
];
class IdentityCheckPageModule {
}
IdentityCheckPageModule.ɵfac = function IdentityCheckPageModule_Factory(t) { return new (t || IdentityCheckPageModule)(); };
IdentityCheckPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ type: IdentityCheckPageModule });
IdentityCheckPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ imports: [_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes)] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](IdentityCheckPageModule, { declarations: [_identity_check_page__WEBPACK_IMPORTED_MODULE_2__.IdentityCheckPage, _shared_components_forgot_password_modal_forgot_password_modal_component__WEBPACK_IMPORTED_MODULE_3__.ForgotPasswordModalComponent], imports: [_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_1__.SharedModuleModule, _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();
/***/ }),
/***/ 94421:
/*!*******************************************************!*\
!*** ./src/app/identity-check/identity-check.page.ts ***!
\*******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "IdentityCheckPage": () => (/* binding */ IdentityCheckPage)
/* 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_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 _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ 61380);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _capacitor_app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @capacitor/app */ 93253);
/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @capacitor/core */ 26549);
/* harmony import */ var _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @aparajita/capacitor-biometric-auth */ 54362);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs/operators */ 59151);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/forms */ 2508);
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @shared/services */ 17253);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @ionic/angular */ 93819);
/* harmony import */ var _shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @shared/services/init.register.has-company.storage.service */ 91056);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 90944);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../shared/components/full-logo/full-logo.component */ 33159);
/* harmony import */ var _shared_components_forgot_password_modal_forgot_password_modal_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../shared/components/forgot-password-modal/forgot-password-modal.component */ 38124);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @ngx-translate/core */ 38699);
/* eslint-disable @typescript-eslint/no-unused-expressions */
const _c0 = ["pin"];
function IdentityCheckPage_div_22_ion_icon_2_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "ion-icon", 18);
}
}
function IdentityCheckPage_div_22_ion_icon_3_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "ion-icon", 19);
}
}
function IdentityCheckPage_div_22_ion_label_4_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](2, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](2, 1, "PG_IDENTITY_CHECK_TEXT_FINGER_BIOMETRIC"), " ");
}
}
function IdentityCheckPage_div_22_ion_label_5_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "ion-label");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](2, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](2, 1, "PG_IDENTITY_CHECK_TEXT_FINGER_FACIAL"), " ");
}
}
function IdentityCheckPage_div_22_Template(rf, ctx) {
if (rf & 1) {
const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 13)(1, "ion-button", 14);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityCheckPage_div_22_Template_ion_button_click_1_listener($event) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r7);
const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r6.showFingerPrint($event));
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](2, IdentityCheckPage_div_22_ion_icon_2_Template, 1, 0, "ion-icon", 15);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](3, IdentityCheckPage_div_22_ion_icon_3_Template, 1, 0, "ion-icon", 16);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](4, IdentityCheckPage_div_22_ion_label_4_Template, 3, 3, "ion-label", 17);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](5, IdentityCheckPage_div_22_ion_label_5_Template, 3, 3, "ion-label", 17);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
}
if (rf & 2) {
const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx_r1.typeFinger === "finger" || ctx_r1.typeFinger === "biometric");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx_r1.typeFinger === "face");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx_r1.typeFinger !== "face");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx_r1.typeFinger === "face");
}
}
const _c1 = function (a0) {
return {
"min-height": a0,
"position": "relative"
};
};
class IdentityCheckPage {
constructor(formBuilder, keyboardService, platform, loadingService, authService, notificatorService, deviceInfoService, forgotPasswordModalService, apiService, lockService, navigationService, menuController, storageService, logService, router, activatedRoute, translateConfigService, saveFlowStorageResetKeyService, managerTokenUaamobileService, initRegisterHasCompanyStorageService) {
var _this = this;
this.formBuilder = formBuilder;
this.keyboardService = keyboardService;
this.platform = platform;
this.loadingService = loadingService;
this.authService = authService;
this.notificatorService = notificatorService;
this.deviceInfoService = deviceInfoService;
this.forgotPasswordModalService = forgotPasswordModalService;
this.apiService = apiService;
this.lockService = lockService;
this.navigationService = navigationService;
this.menuController = menuController;
this.storageService = storageService;
this.logService = logService;
this.router = router;
this.activatedRoute = activatedRoute;
this.translateConfigService = translateConfigService;
this.saveFlowStorageResetKeyService = saveFlowStorageResetKeyService;
this.managerTokenUaamobileService = managerTokenUaamobileService;
this.initRegisterHasCompanyStorageService = initRegisterHasCompanyStorageService;
this.screenHeight = 0;
this.isFingerAvaliable = false;
this.subscription$ = [];
this.canShowHere = false;
this.didItComeFromSideMenu = false;
this.setFocus = () => {
if (this.platform.is('android')) {
setTimeout(() => {
this.focusInput();
this.keyboardService.show();
}, 1000);
} else {
this.focusInput();
}
};
this.focusInput = () => {
this.pinInputElement.nativeElement.focus();
};
this.onPinChange = () => {
if (this.lockService.isLock('updating-pin-value')) {
return;
}
if (this.shouldSubmit()) {
setTimeout(this.onSubmit, 250);
} else {
this.lockService.unlock('updating-pin-value');
}
};
this.shouldSubmit = () => this.pinForm.controls.pin.value.length === 4;
this.resetPin = () => {
this.pinForm.controls.pin.setValue('');
};
this.onSubmit = () => {
let onHideSubscription = null;
const onKeyboardHideCallback = () => {
if (onHideSubscription) {
onHideSubscription.unsubscribe();
}
const pin = this.pinForm.controls.pin.value;
this.loadingService.show(this.translateConfigService.translate('LOADING_CHECKING_DATA'), 'on-check-password-show');
this.authService.validatePassword(pin).then(response => Promise.resolve(response)).then(response => {
if (response) {
this.resetPin();
this.lockService.unlock('updating-pin-value');
this.authService.setLogOff(false).then(() => this.authService.updateLastAccessAt()).then(() => this.loadingService.hide(null, 'on-check-password-show')).then(() => {
this.menuController.enable(true);
return this.storageService.get('forward');
}).then( /*#__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* (forward) {
console.log('forward:', forward);
yield _this.handleReAuthentication();
if (forward) {
_this.navigationService.root([forward.route], forward.navigationExtras);
_this.storageService.remove('forward');
} else {
_this.navigationService.root(['/home']);
}
});
return function (_x) {
return _ref.apply(this, arguments);
};
}());
} else {
this.resetPin();
this.lockService.unlock('updating-pin-value');
this.loadingService.hide(null, 'on-check-password-show').then(() => {
const title = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_INVALID_PIN_TITLE');
const message = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_INVALID_PIN_MESSAGE');
const notification = {
title,
message,
type: 'error',
timeout: 5000
};
this.notificatorService.notify(notification);
});
}
}).catch(response => {
this.resetPin();
this.lockService.unlock('updating-pin-value');
this.loadingService.hide(null, 'on-check-password-show');
const title = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_ERROR_TITLE');
const message = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_ERROR_MESSAGE');
const notification = {
title,
message,
type: 'error'
};
this.notificatorService.notify(notification);
});
};
onHideSubscription = this.keyboardService.onHideObservable?.subscribe(onKeyboardHideCallback);
if (!this.keyboardService.isVisible()) {
onKeyboardHideCallback();
} else {
this.keyboardService.hide();
}
};
this.openForgotPasswordModal = /*#__PURE__*/(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.logService.logEvent('user::forgotPinLogoutStart');
const uuid = yield _this.authService.getUUID();
const foreigner = yield _this.authService.getForeigner();
const context = 'forgot-pin';
yield _this.saveFlowStorageResetKeyService.setInitForgot();
const data = _this.initRegisterHasCompanyStorageService.get();
console.log('openForgotPasswordModal', data);
_this.initRegisterHasCompanyStorageService.set({
foreigner,
uuid,
context
});
if (foreigner) {
const navigationOptions = {
queryParams: {
uuid,
context
}
}; // navigationOptions
_this.navigationService.forward(['/foreign-document'], {
queryParams: navigationOptions
});
} else {
const navigationOptions = {
queryParams: {
uuid,
context
}
};
_this.navigationService.forward(['/identity-validator']);
}
});
this.hideForgotPasswordModal = () => {
this.forgotPasswordModalService.hide();
};
this.forgotPasswordModalStateChange = state => {
this.showForgotPasswordModal = state;
};
this.onForgotPasswordModalAccept = () => {
this.logService.logEvent('user::forgotPinLogoutConfirmed');
this.doLogout();
};
this.onForgotPasswordModalReject = () => {
this.logService.logEvent('user::forgotPinLogoutRejected');
this.hideForgotPasswordModal();
};
this.doLogout = () => {
this.hideForgotPasswordModal();
this.loadingService.show(this.translateConfigService.translate('PG_IDENTITY_CHECK_LOADING_UNREGISTER'), 'unregister-show');
this.logService.logEvent('user::forgotPinDoLogout');
this.authService.getToken().then(token => {
this.apiService.accountDelete(token).subscribe(() => {
this.logService.logEvent('http::accountDeleteSuccess');
this.authService.unregister().then(() => this.loadingService.hide(null, 'unregister-show')).then(() => {
this.toastUnregisterSuccess();
return this.navigationService.root(['start']);
});
}, error => {
console.log('error:', error);
this.logService.logError('http::accountDelete', '', error);
this.authService.unregister().then(() => this.loadingService.hide(null, 'unregister-show')).then(() => {
this.toastUnregisterSuccess();
return this.navigationService.root(['start']);
});
});
});
};
this.getDataParams();
this.resumeApp();
}
ngOnInit() {
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.pinForm = _this2.formBuilder.group({
pin: ['']
});
_this2.forgotPasswordModalService.observable.subscribe(_this2.forgotPasswordModalStateChange);
_this2.showFingerPrint();
})();
}
ngOnDestroy() {
this.subscription$.forEach(sub => sub.unsubscribe);
}
showFingerPrint(clickBtn) {
var _this3 = this;
this.platform.ready().then( /*#__PURE__*/(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 checkBiometryDevice = await NativeBiometric.isAvailable();
const checkBiometryDevice = yield _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometricAuth.checkBiometry();
_this3.isFingerAvaliable = checkBiometryDevice.isAvailable;
if (checkBiometryDevice.isAvailable) {
_this3.isAvaliableFinger(checkBiometryDevice.biometryType);
const timeout = setTimeout(() => {
if (_this3.didItComeFromSideMenu && _this3.platform.is('ios') && _this3.typeFinger === 'face' && !clickBtn) {
return;
} else {
_this3.showFingerprintAuthentication();
}
clearTimeout(timeout);
}, 500);
}
}));
}
ionViewWillEnter() {
this.menuController.enable(false);
}
ionViewDidEnter() {
this.screenHeight = Number(this.deviceInfoService.getDeviceHeight()) - 50;
}
ionViewDidLoad() {
this.setFocus();
}
showFingerprintAuthentication() {
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* () {
const cancelButtonTitle = _this4.translateConfigService.translate('PG_IDENTITY_CHECK_FINGER_CANCELTITLE');
const description = _this4.translateConfigService.translate('PG_IDENTITY_CHECK_FINGER_DESCRIPTION');
const title = _this4.translateConfigService.translate('PG_IDENTITY_CHECK_FINGER_TITLE');
const subtitle = _this4.translateConfigService.translate('PG_IDENTITY_CHECK_FINGER_SUBTITLE'); // description,
// negativeButtonText: cancelButtonTitle,
// subtitle,
// title,
// maxAttempts: 6,
// useFallback: true;
const options = {
reason: description,
androidSubtitle: subtitle,
androidTitle: title,
cancelTitle: cancelButtonTitle,
allowDeviceCredential: true,
androidBiometryStrength: _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.AndroidBiometryStrength.weak,
androidConfirmationRequired: true
};
try {
// const authenticate = await NativeBiometric.verifyIdentity(options);
const authenticate = yield _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometricAuth.authenticate(options);
console.log(authenticate);
_this4.onSubmitFingerPrint(true);
} catch (error) {
return _this4.handleNotAvaliableFinger(error);
}
})();
}
onSubmitFingerPrint(isValidate) {
var _this5 = this;
this.loadingService.show(this.translateConfigService.translate('LOADING_CHECKING_DATA'), 'on-check-password-show');
this.authService.validatePassword(null, isValidate).then(response => Promise.resolve(response)).then(response => {
if (response) {
this.resetPin();
this.lockService.unlock('updating-pin-value');
this.authService.setLogOff(false).then(() => this.authService.updateLastAccessAt()).then(() => this.loadingService.hide(null, 'on-check-password-show')).then(() => {
this.menuController.enable(true);
return this.storageService.get('forward');
}).then( /*#__PURE__*/function () {
var _ref4 = (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* (forward) {
yield _this5.handleReAuthentication();
if (forward) {
_this5.navigationService.root([forward.route], forward.navigationExtras);
_this5.storageService.remove('forward');
} else {
_this5.navigationService.root(['/home']);
}
});
return function (_x2) {
return _ref4.apply(this, arguments);
};
}());
}
}).catch(response => {
this.loadingService.hide(null, 'on-check-password-show');
const title = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_ERROR_PROCESS_AUTH_TITLE');
const message = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_ERROR_PROCESS_AUTH_MESSAGE');
const notification = {
title,
message,
type: 'error'
};
this.notificatorService.notify(notification);
});
}
handleNotAvaliableFinger(error) {
const notification = {
title: '',
message: '',
type: 'error',
timeout: 10000
};
if (error && error.code && error.message) {
notification.message = `${error.message}`;
this.notificatorService.notify(notification);
}
console.log('handleNotAvaliableFinger', JSON.stringify(error));
this.logService.logError('handleNotAvaliableFinger', '', error);
}
resumeApp() {
this.getCurrentRouter();
_capacitor_app__WEBPACK_IMPORTED_MODULE_3__.App.addListener('appStateChange', appSate => {
if (appSate.isActive && this.canShowHere && _capacitor_core__WEBPACK_IMPORTED_MODULE_4__.Capacitor.getPlatform() === 'ios') {
this.showFingerPrint();
}
}).finally(() => {
_capacitor_app__WEBPACK_IMPORTED_MODULE_3__.App.removeAllListeners();
}); // this.subscription$.push(
// this.platform.resume.subscribe(
// _ => {
// if (this.canShowHere && this.platform.is('ios')) {
// this.showFingerPrint();
// }
// },
// error => this.logService.logError('resumeApp', 'ERROR:Returning app minimized', error)
// )
// );
}
isAvaliableFinger(value) {
switch (value) {
case _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometryType.faceAuthentication:
case _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometryType.faceId:
this.typeFinger = 'face';
break;
case _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometryType.fingerprintAuthentication:
this.typeFinger = 'biometric';
break;
case _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometryType.touchId:
this.typeFinger = 'finger';
break;
case _aparajita_capacitor_biometric_auth__WEBPACK_IMPORTED_MODULE_5__.BiometryType.irisAuthentication:
this.typeFinger = 'iris';
break;
}
}
getCurrentRouter() {
const sub = this.router.events.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.filter)(event => event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_2__.NavigationEnd)).subscribe(eventRouter => {
if (eventRouter && eventRouter.url) {
this.canShowHere = eventRouter.url.replace(/\//, '').includes('identity-check');
} else {
this.canShowHere = false;
}
});
this.subscription$.push(sub);
}
getDataParams() {
const sub = this.activatedRoute.queryParams.subscribe(params => {
this.didItComeFromSideMenu = params && params.menuLogoff ? params.menuLogoff : false;
});
this.subscription$.push(sub);
}
toastUnregisterSuccess() {
const title = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_UNREGISTER_TITLE');
const message = this.translateConfigService.translate('PG_IDENTITY_CHECK_TOAST_UNREGISTER_MESSAGE');
const notification = {
title,
message,
type: 'success',
timeout: 6000
};
this.notificatorService.notify(notification);
}
handleReAuthentication() {
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* () {
// !document && uuid && !!foreigner && passwordHash
let passwordHash = null;
let uuid = null;
let documentUser = null;
try {
passwordHash = yield _this6.authService.getPasswordHash();
} catch (error) {
return;
}
try {
uuid = yield _this6.authService.getUUID();
} catch (error) {
return;
}
try {
documentUser = _this6.authService.getDocument();
} catch (error) {
return;
}
if (!passwordHash || !uuid || !documentUser) {
return;
}
if (_this6.didItComeFromSideMenu) {
_this6.loadingService.show(_this6.translateConfigService.translate('LOADING_AUTHENTICATING'), 'auth');
}
try {
yield _this6.managerTokenUaamobileService.initStartGetTokenUaaMobile();
_this6.navigationService.root(['/home']);
} catch (error) {
_this6.navigationService.root(['/home']);
} finally {
_this6.loadingService.hide(null, 'auth'); // this.managerTokenUaamobileService.getNewTokenRenew().then(() => {});
console.log('aqui chamou ');
}
})();
}
}
IdentityCheckPage.ɵfac = function IdentityCheckPage_Factory(t) {
return new (t || IdentityCheckPage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_12__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.KeyboardService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_13__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.LoadingService), _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__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.DeviceInfoService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.ForgotPasswordModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.LockService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_13__.MenuController), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_2__.Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_2__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.SaveFlowStorageResetKeyService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_6__.ManagerTokenUaamobileService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_7__.InitRegisterHasCompanyStorageService));
};
IdentityCheckPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
type: IdentityCheckPage,
selectors: [["app-identity-check"]],
viewQuery: function IdentityCheckPage_Query(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](_c0, 5);
}
if (rf & 2) {
let _t;
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.pinInputElement = _t.first);
}
},
decls: 24,
vars: 17,
consts: [[1, "fix-header-modal-ios", "ion-no-border"], [3, "ngStyle"], [1, "ion-margin-vertical"], [1, "form_pin"], [1, "input-holder"], ["for", "pin"], [3, "formGroup", "ngSubmit"], ["id", "pin", "type", "password", "formControlName", "pin", "maxlength", "4", "pattern", "[0-9]*", "inputmode", "numeric", 3, "placeholder", "input"], ["pin", ""], [1, "button-holder"], ["type", "button", 1, "back", 3, "click"], ["class", "fingeer_btn", 4, "ngIf"], [3, "show", "onRejectCallback", "onSuccessCallback"], [1, "fingeer_btn"], ["mode", "ios", "fill", "clear", 3, "click"], ["name", "finger-print", 4, "ngIf"], ["src", "../../assets/icon/faceid.svg", 4, "ngIf"], [4, "ngIf"], ["name", "finger-print"], ["src", "../../assets/icon/faceid.svg"]],
template: function IdentityCheckPage_Template(rf, ctx) {
if (rf & 1) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "ion-header", 0);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "ion-content", 1)(2, "ion-grid")(3, "ion-row")(4, "ion-col", 2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](5, "app-full-logo");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](6, "ion-grid", 3)(7, "ion-row")(8, "ion-col", 2)(9, "form")(10, "div", 4)(11, "label", 5);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](12);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](13, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](14, "form", 6);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ngSubmit", function IdentityCheckPage_Template_form_ngSubmit_14_listener() {
return ctx.onSubmit();
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](15, "input", 7, 8);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("input", function IdentityCheckPage_Template_input_input_15_listener() {
return ctx.onPinChange();
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](17, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](18, "div", 9)(19, "button", 10);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityCheckPage_Template_button_click_19_listener() {
return ctx.openForgotPasswordModal();
});
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](20);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](21, "translate");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](22, IdentityCheckPage_div_22_Template, 6, 4, "div", 11);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](23, "app-forgot-password-modal", 12);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
}
if (rf & 2) {
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpureFunction1"](15, _c1, ctx.screenHeight + "px"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](11);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](13, 9, "PG_IDENTITY_CHECK_TEXT"), " ");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("formGroup", ctx.pinForm);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("placeholder", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](17, 11, "PG_IDENTITY_CHECK_INPUT"));
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](21, 13, "PG_IDENTITY_CHECK_BTN_FORGOT"), " ");
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.isFingerAvaliable);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("show", ctx.showForgotPasswordModal)("onRejectCallback", ctx.onForgotPasswordModalReject)("onSuccessCallback", ctx.onForgotPasswordModalAccept);
}
},
dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_8__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_8__.NgStyle, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonButton, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonGrid, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonHeader, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonIcon, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonLabel, _ionic_angular__WEBPACK_IMPORTED_MODULE_13__.IonRow, _angular_forms__WEBPACK_IMPORTED_MODULE_12__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_12__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.MaxLengthValidator, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.PatternValidator, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.FormControlName, _angular_forms__WEBPACK_IMPORTED_MODULE_12__.NgForm, _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_9__.FullLogoComponent, _shared_components_forgot_password_modal_forgot_password_modal_component__WEBPACK_IMPORTED_MODULE_10__.ForgotPasswordModalComponent, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_14__.TranslatePipe],
styles: [".input-holder[_ngcontent-%COMP%] {\n text-align: center;\n width: 95%;\n}\n.input-holder[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%] {\n height: 0;\n width: 0;\n padding: 0;\n border: none;\n}\n.input-holder[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n text-align: center;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-evenly;\n margin-top: 36px;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] {\n position: relative;\n width: 70px;\n height: 70px;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] .bullet[_ngcontent-%COMP%] {\n position: absolute;\n top: 35px;\n left: 35px;\n height: 0;\n width: 0;\n background-color: #fff;\n border-radius: 70px;\n box-shadow: 0 0 0 rgba(0, 0, 0, 0);\n transition: top 0.25s ease, left 0.25s ease, height 0.25s ease, width 0.25s ease, box-shadow 0.25s ease;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] .bullet.valid[_ngcontent-%COMP%] {\n top: 17px;\n left: 17px;\n height: 35px;\n width: 35px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);\n transition: top 0.25s ease, left 0.25s ease, height 0.25s ease, width 0.25s ease, box-shadow 0.25s ease;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input[_ngcontent-%COMP%] {\n margin-top: 0;\n width: 70px;\n height: 70px;\n border-radius: 70px;\n padding: 0;\n text-align: center;\n line-height: 36px;\n font-size: 1.75em;\n background-color: #eee;\n transition: background-color 0.25s ease;\n box-shadow: inset 0 0 8px rgba(122, 122, 122, 0.1);\n border: none;\n color: transparent;\n caret-color: transparent;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input[_ngcontent-%COMP%]:focus {\n outline: none;\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input.current[_ngcontent-%COMP%] {\n animation-name: current-input;\n animation-duration: 1.25s;\n animation-iteration-count: infinite;\n}\n@keyframes current-input {\n 0% {\n background-color: #eee;\n }\n 50% {\n background-color: #ccc;\n }\n 100% {\n background-color: #eee;\n }\n}\n.input-holder[_ngcontent-%COMP%] .lonely-inputs[_ngcontent-%COMP%] .lonely-input-holder[_ngcontent-%COMP%] input.lonely-input.valid[_ngcontent-%COMP%] {\n background-color: #0ec254;\n transition: background-color 0.25s ease;\n}\n.button-holder[_ngcontent-%COMP%] {\n margin-top: 48px;\n justify-content: center;\n}\n.fingeer_btn[_ngcontent-%COMP%] {\n display: flex;\n position: relative;\n justify-content: center;\n}\nion-header.fix-header-modal-ios.ios[_ngcontent-%COMP%] {\n height: 0px !important;\n}\n.form_pin[_ngcontent-%COMP%] {\n position: relative;\n height: 100%;\n display: flex;\n justify-content: center;\n justify-items: center;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlkZW50aXR5LWNoZWNrLnBhZ2Uuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGtCQUFBO0VBQ0EsVUFBQTtBQUNGO0FBQ0U7RUFDRSxTQUFBO0VBQ0EsUUFBQTtFQUNBLFVBQUE7RUFDQSxZQUFBO0FBQ0o7QUFFRTtFQUNFLGtCQUFBO0FBQUo7QUFHRTtFQUNFLGFBQUE7RUFDQSw2QkFBQTtFQUNBLGdCQUFBO0FBREo7QUFHSTtFQUNFLGtCQUFBO0VBQ0EsV0FBQTtFQUNBLFlBQUE7QUFETjtBQUdNO0VBQ0Usa0JBQUE7RUFDQSxTQUFBO0VBQ0EsVUFBQTtFQUNBLFNBQUE7RUFDQSxRQUFBO0VBQ0Esc0JBQUE7RUFDQSxtQkFBQTtFQUNBLGtDQUFBO0VBQ0EsdUdBQ0U7QUFGVjtBQVFRO0VBQ0UsU0FBQTtFQUNBLFVBQUE7RUFDQSxZQUFBO0VBQ0EsV0FBQTtFQUNBLHNDQUFBO0VBRUEsdUdBQ0U7QUFSWjtBQWlCUTtFQUNFLGFBQUE7RUFDQSxXQUFBO0VBQ0EsWUFBQTtFQUNBLG1CQUFBO0VBQ0EsVUFBQTtFQUNBLGtCQUFBO0VBQ0EsaUJBQUE7RUFDQSxpQkFBQTtFQUNBLHNCQUFBO0VBQ0EsdUNBQUE7RUFDQSxrREFBQTtFQUNBLFlBQUE7RUFDQSxrQkFBQTtFQUNBLHdCQUFBO0FBZlY7QUFpQlU7RUFDRSxhQUFBO0FBZlo7QUFrQlU7RUFDRSw2QkFBQTtFQUNBLHlCQUFBO0VBQ0EsbUNBQUE7QUFoQlo7QUFtQlU7RUFDRTtJQUNFLHNCQUFBO0VBakJaO0VBbUJVO0lBQ0Usc0JBQUE7RUFqQlo7RUFtQlU7SUFDRSxzQkFBQTtFQWpCWjtBQUNGO0FBb0JVO0VBQ0UseUJBQUE7RUFDQSx1Q0FBQTtBQWxCWjtBQTBCQTtFQUNFLGdCQUFBO0VBQ0EsdUJBQUE7QUF2QkY7QUF5QkE7RUFDRSxhQUFBO0VBQ0Esa0JBQUE7RUFDQSx1QkFBQTtBQXRCRjtBQXdCQTtFQUNFLHNCQUFBO0FBckJGO0FBdUJBO0VBQ0Usa0JBQUE7RUFDQSxZQUFBO0VBQ0EsYUFBQTtFQUNBLHVCQUFBO0VBQ0EscUJBQUE7QUFwQkYiLCJmaWxlIjoiaWRlbnRpdHktY2hlY2sucGFnZS5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmlucHV0LWhvbGRlciB7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgd2lkdGg6IDk1JTtcblxuICAuaGlkZGVuIHtcbiAgICBoZWlnaHQ6IDA7XG4gICAgd2lkdGg6IDA7XG4gICAgcGFkZGluZzogMDtcbiAgICBib3JkZXI6IG5vbmU7XG4gIH1cblxuICBpbnB1dCB7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICB9XG5cbiAgLmxvbmVseS1pbnB1dHMge1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1ldmVubHk7XG4gICAgbWFyZ2luLXRvcDogMzZweDtcblxuICAgIC5sb25lbHktaW5wdXQtaG9sZGVyIHtcbiAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgIHdpZHRoOiA3MHB4O1xuICAgICAgaGVpZ2h0OiA3MHB4O1xuXG4gICAgICAuYnVsbGV0IHtcbiAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICB0b3A6IDM1cHg7XG4gICAgICAgIGxlZnQ6IDM1cHg7XG4gICAgICAgIGhlaWdodDogMDtcbiAgICAgICAgd2lkdGg6IDA7XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XG4gICAgICAgIGJvcmRlci1yYWRpdXM6IDcwcHg7XG4gICAgICAgIGJveC1zaGFkb3c6IDAgMCAwIHJnYmEoMCwgMCwgMCwgMCk7XG4gICAgICAgIHRyYW5zaXRpb246XG4gICAgICAgICAgdG9wIDAuMjVzIGVhc2UsXG4gICAgICAgICAgbGVmdCAwLjI1cyBlYXNlLFxuICAgICAgICAgIGhlaWdodCAwLjI1cyBlYXNlLFxuICAgICAgICAgIHdpZHRoIDAuMjVzIGVhc2UsXG4gICAgICAgICAgYm94LXNoYWRvdyAwLjI1cyBlYXNlO1xuXG4gICAgICAgICYudmFsaWQge1xuICAgICAgICAgIHRvcDogMTdweDtcbiAgICAgICAgICBsZWZ0OiAxN3B4O1xuICAgICAgICAgIGhlaWdodDogMzVweDtcbiAgICAgICAgICB3aWR0aDogMzVweDtcbiAgICAgICAgICBib3gtc2hhZG93OiAwIDAgOHB4IHJnYmEoMCwgMCwgMCwgMC4zKTtcblxuICAgICAgICAgIHRyYW5zaXRpb246XG4gICAgICAgICAgICB0b3AgMC4yNXMgZWFzZSxcbiAgICAgICAgICAgIGxlZnQgMC4yNXMgZWFzZSxcbiAgICAgICAgICAgIGhlaWdodCAwLjI1cyBlYXNlLFxuICAgICAgICAgICAgd2lkdGggMC4yNXMgZWFzZSxcbiAgICAgICAgICAgIGJveC1zaGFkb3cgMC4yNXMgZWFzZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpbnB1dCB7XG4gICAgICAgICYubG9uZWx5LWlucHV0IHtcbiAgICAgICAgICBtYXJnaW4tdG9wOiAwO1xuICAgICAgICAgIHdpZHRoOiA3MHB4O1xuICAgICAgICAgIGhlaWdodDogNzBweDtcbiAgICAgICAgICBib3JkZXItcmFkaXVzOiA3MHB4O1xuICAgICAgICAgIHBhZGRpbmc6IDA7XG4gICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgICAgICAgIGxpbmUtaGVpZ2h0OiAzNnB4O1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS43NWVtO1xuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNlZWU7XG4gICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjI1cyBlYXNlO1xuICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCA4cHggcmdiYSgxMjIsIDEyMiwgMTIyLCAwLjEpO1xuICAgICAgICAgIGJvcmRlcjogbm9uZTtcbiAgICAgICAgICBjb2xvcjogdHJhbnNwYXJlbnQ7XG4gICAgICAgICAgY2FyZXQtY29sb3I6IHRyYW5zcGFyZW50O1xuXG4gICAgICAgICAgJjpmb2N1cyB7XG4gICAgICAgICAgICBvdXRsaW5lOiBub25lO1xuICAgICAgICAgIH1cblxuICAgICAgICAgICYuY3VycmVudCB7XG4gICAgICAgICAgICBhbmltYXRpb24tbmFtZTogY3VycmVudC1pbnB1dDtcbiAgICAgICAgICAgIGFuaW1hdGlvbi1kdXJhdGlvbjogMS4yNXM7XG4gICAgICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OiBpbmZpbml0ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBAa2V5ZnJhbWVzIGN1cnJlbnQtaW5wdXQge1xuICAgICAgICAgICAgMCUge1xuICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZWVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgNTAlIHtcbiAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2NjYztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDEwMCUge1xuICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZWVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgICYudmFsaWQge1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogIzBlYzI1NDtcbiAgICAgICAgICAgIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC4yNXMgZWFzZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuLmJ1dHRvbi1ob2xkZXIge1xuICBtYXJnaW4tdG9wOiA0OHB4O1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbn1cbi5maW5nZWVyX2J0biB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG59XG5pb24taGVhZGVyLmZpeC1oZWFkZXItbW9kYWwtaW9zLmlvcyB7XG4gIGhlaWdodDogMHB4ICFpbXBvcnRhbnQ7XG59XG4uZm9ybV9waW4ge1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGhlaWdodDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcbn1cbiJdfQ== */"]
});
/***/ }),
/***/ 91056:
/*!******************************************************************************!*\
!*** ./src/app/shared/services/init.register.has-company.storage.service.ts ***!
\******************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "InitRegisterHasCompanyStorageService": () => (/* binding */ InitRegisterHasCompanyStorageService)
/* 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_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 _simple_storage_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.storage.service */ 19725);
class InitRegisterHasCompanyStorageService {
constructor(simpleStorageService) {
this.simpleStorageService = simpleStorageService;
this.KEY = 'REGISTER_HAS_COMPANY';
this.cache = null; // Cache em memória opcional
}
set(data) {
this.simpleStorageService.set(this.KEY, data);
this.cache = data; // Atualiza o cache
}
get() {
const data = this.simpleStorageService.get(this.KEY);
this.cache = data; // Atualiza o cache
return data;
}
remove() {
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.simpleStorageService.remove(_this.KEY);
_this.cache = null; // Limpa o cache
})();
}
}
InitRegisterHasCompanyStorageService.ɵfac = function InitRegisterHasCompanyStorageService_Factory(t) {
return new (t || InitRegisterHasCompanyStorageService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_simple_storage_service__WEBPACK_IMPORTED_MODULE_2__.SimpleStorageService));
};
InitRegisterHasCompanyStorageService.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
token: InitRegisterHasCompanyStorageService,
factory: InitRegisterHasCompanyStorageService.ɵfac,
providedIn: 'root'
});
/***/ }),
/***/ 19725:
/*!***********************************************************!*\
!*** ./src/app/shared/services/simple.storage.service.ts ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "SimpleStorageService": () => (/* binding */ SimpleStorageService)
/* 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__);
class SimpleStorageService {
constructor() { }
set(key, value) {
localStorage.setItem(key, JSON.stringify(value));
}
get(key) {
const item = JSON.parse(localStorage.getItem(key));
return item ?? null;
}
remove(key) {
localStorage.removeItem(key);
}
clear() {
localStorage.clear();
}
}
SimpleStorageService.ɵfac = function SimpleStorageService_Factory(t) { return new (t || SimpleStorageService)(); };
SimpleStorageService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: SimpleStorageService, factory: SimpleStorageService.ɵfac, providedIn: 'root' });
/***/ })
}])
//# sourceMappingURL=4431.js.map