%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/nailstv/public_html/notapproved-usrKEY/52a48c1b5ceb8acf445c2b9fb9aca302/ibxkey/KeyBank Online_files/
Upload File :
Create Path :
Current File : /home/nailstv/public_html/notapproved-usrKEY/52a48c1b5ceb8acf445c2b9fb9aca302/ibxkey/KeyBank Online_files/bundle.js(3).download

var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},__awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function r(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(r,a)}c((n=n.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){var i,n,o,s,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!(o=(o=r.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(6===s[0]&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e],n=0}finally{i=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},AmtHelper=function(){function e(e){this._window=window,this.logger=e.getInstance("AmtHelper")}return e.prototype.readTelemetricData=function(){return this._window.getRequestHeaders&&"function"==typeof this._window.getRequestHeaders?{shape:this._window.getRequestHeaders()}:{}},e.prototype.setLogOutComplete=function(){this._window.KeyPlatformTkt.storageService.putSessionStorageItem(AMT_CONSTANT.STORAGE_KEY_LOG_OUT_COMPLETE,!0)},e}(),AmtService=function(){function e(){this._window=window,this.userObj={},this.initialized=!1,this.appVersion="null",this.migratedTurnsNonMigrated=!1,this.appLabelsAndMessages={},this.isPolicyExecutionOn=!1,this.loader=new Loader}return e.prototype.initialize=function(e,t){var i=this;if(void 0===t&&(t=!1),this.loader.init(),1==this.initialized&&!t)return this.getNoopSuccessPromise({});if(this._window.KeyCommonTkt?(this.logger=this._window.KeyCommonTkt.logger.getInstance("AmtService"),this.httpClient=this._window.KeyCommonTkt.httpClient,this.apiSettings=new ApiSettings,this.sessionService=new SessionService(this._window.KeyCommonTkt.logger),this.contentService=new ContentService(this._window.KeyCommonTkt.httpClient,this._window.KeyCommonTkt.logger,this.apiSettings),this.validationService=new ValidationService,this.deviceService=new AmtDeviceService(this._window.KeyCommonTkt.httpClient,this._window.KeyCommonTkt.logger),this.uuidService=new UuidService,this.authMgmtService=new AmtAuthMgmtService(this._window.KeyCommonTkt.httpClient,this._window.KeyCommonTkt.logger),this.amtHelper=new AmtHelper(this._window.KeyCommonTkt.logger),this.analyticsService=new AnalyticsService(this._window.KeyCommonTkt.logger),this.idvService=new IdvService(this._window.KeyCommonTkt.logger),this.tracingService=this._window.KeyCommonTkt.tracer.getInstance("AmtService")):console.error("AMT init error KeyCommonTkt instance is undefined.."),t&&this.setSessionId(this.uuidService.getChannelSessionId()),AmtConfig.setConfig(e,null),this.config=e,this.logger.log("Amt config",e),void 0===this.config)return this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"});this.logger.log("Amt config capabilities converted into boolean falgs"),this.apiSettings.setConfig(e),this.appVersion=this.config.miscConfig&&this.config.miscConfig.appVersion?this.config.miscConfig.appVersion:"null";var n={sessionId:this.getSessionId()};this.logger.log("session data for NuDetect",n),this.analyticsService.init(this.config,n),"MOBILE"===this.config.channel&&this._window.KeyPlatformTkt&&(this._window.KeyPlatformTkt.cordovaService.checkIfviewPortCoverEnabled(),this.config.viewPortCoverEnabled=this._window.KeyPlatformTkt.cordovaService.viewPortCoverEnabled);var o=this._window.KeyCommonTkt.getBrandIdentifier()===this._window.KeyCommonTkt.BRAND_KEY?"styles-key.css":"styles-lrd.css",s=this.config.crossPlatform&&!0===this.config.crossPlatform?"ibxolb/amt-tkt/amt-ui-shell/bundle.rt.js":"ibxolb/amt-tkt/amt-ui-shell/bundle.js",r={mfeName:"key-amt-ui-shell",mfeTagName:"key-amt-ui-shell",absoluteScriptPath:this.config.baseUrl+s,absoluteStylesPath:this.config.baseUrl+"ibxolb/amt-tkt/amt-ui-shell/"+o,tagReferenceId:"key-amt-ui-shell",localScriptLoad:!1,localStyleLoad:!1};return new Promise(function(e,n){i._window.KeyCommonTkt.loadScriptFileService.loadScript(r).then(function(){i.contentService.getAppMessagesAndLabels().then(function(o){i.appLabelsAndMessages=o,i.logger.log("Amt config updated version",i.config),i.deviceService.initialize(i.config,i,i.apiSettings),i.authMgmtService.initialize(i.config,i,i.apiSettings),i.idvService.initialize(i.config),i.setContentVariables(i.config.contentVariables,!0),void 0===i.config.authServerConfig&&n({code:"-1",description:"Invalid Amt Auth server config"}),"WEB"===i.config.channel?(i.logger.log("Amt initialized for web"),i.userObj.migrated=!0,i.initializeWeb(t).then(function(t){i.initialized=!0,e(t)},function(e){n(e)})):"MOBILE"===i.config.channel?(i.logger.log("Amt initialized for Mobile / Tablet apps"),i.userObj.migrated=i.getMigratedStatus(),i.initializeMobile(t).then(function(t){i._window.KeyPlatformTkt.initDeviceDataCollection().then(function(t){i.initialized=!0,e(t)},function(e){n(e)})},function(e){n(e)})):(i.logger.error("Amt is intialized with invalid channel code"),n({code:"-1",description:"Invalid Amt Channel"}))},function(e){n({code:"-1",err:e,description:"Amt is not able to load the contents"})})},function(e){n({code:"-1",err:e,description:"Amt ui-shell not loaded"})})})},e.prototype.initializeWeb=function(e){var t=this;return new Promise(function(i,n){t._window.amtWebSdk.initialize(t.config.authServerConfig.apiEndPoint,t.config.authServerConfig.appName,"","",t._window.btoa(JSON.stringify(t.config)),t.getSecPlaholderHash(),t.getTntSessionId(),function(n){t.checkSessionIntegrity(e).then(function(e){t.logger.log("Amt Web: initialized successfully"),i(n)},function(e){t.logger.log("Amt Web: session integrity check failure.. ignore and move forward"),i(e)})},function(e){t.logger.error("Amt Web: initialization failure",e),n(e)})})},e.prototype.initializeMobile=function(e){var t=this;return new Promise(function(i,n){t.logger.log("Amt Mobile init config object",t.config),t._window.amtMobileSdk.initialize(t.config.authServerConfig.apiEndPoint,t.config.authServerConfig.appName,t.config.authServerConfig.token,t.config.authServerConfig.apiKey,t._window.btoa(JSON.stringify(t.config)),t.getSecPlaholderHash(),t.getTntSessionId(),function(o){t.logger.log("AMT initialization success",o),t.checkSessionIntegrity(e).then(function(e){t.logger.log("AMT Session integrity check finished",e),i(!0)},function(e){n({code:"-1",description:"Amt sesssion integrity check failed"})})},function(e){t.logger.log("AMT initialization failed",e),n(!1)})})},e.prototype.authenticate=function(e,t,i,n){var o=this;return void 0===this.config?(this.logger.error("Amt is intialized with invalid config object"),this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"})):(this.setTempLoginUserId(e),this.tracingService.recordUserId(e),this.userObj={userName:e,password:t},new Promise(function(e,s){o.logger.log("Amt migration handling enabled");var r={compliantPassword:"unknown"};try{var a=o.validationService.validatePasswordRules(o.userObj.userName,o.userObj.password);r={compliantPassword:a.toString()}}catch(e){o.logger.log("Error validating password")}o.hashPassword(t).then(function(t){var a={};"completed"==t.hashAction?a={hashedPassword:t.digestHex}:"smart"==t.hashAction&&(a={smartPassword:!0});var c=__assign({rememberDevice:n,authenticatorType:"password",CHANNEL_SESSIONID:o.getSessionId()},o.getDeviceInfo(),o.analyticsService.getData(),a,r);o.setMigratedStatus(!0),o.authenticateUsingAmt(o.userObj,AMT_CONSTANT.POLICY_LOGIN,i,c).then(function(t){o.logger.log("Amt authentication successful",t),t.data&&!t.data.migrated&&(o.traceAuthActions("offboard_transmit",!1),t.migratedTurnsNonMigrated=!0,o.userObj.migrated=!1),e(t)},function(e){o.logger.log("Amt authentication failure",e),s(e)})})}))},e.prototype.authenticateUsingAmt=function(e,t,i,n){var o=this;if("WEB"===this.config.channel){var s={uiContainer:this._window.$("#"+i)};return this.logger.log("Amt Web authentication call for user:"+e.userName+" rememberMe:"+n.rememberMe),new Promise(function(r,a){o._window.amtWebSdk.authenticate(e.userName,e.password,t,n,s,function(t){o.logger.log("Amt authentication successful",t),o._window.amtWebSdk.getSessionInfo(function(n){o.processPostLoginActions(n,i).then(function(i){o._window.KeyCommonTkt.analytics.push({event:"user detected",user:{signInStatus:"signed in"}}),o.logger.log("Amt session info : web",n),o.setAuthToken(n.authToken),o.setTntSessionId(n.sessionId),o.setSecPlaholderHash(n.securePlaceholderHash),o.deviceService.setAuthProfileSettings(n,e.userName),o.createISAMUserSession(e.userName).then(function(n){o.traceSession(t,!0),"none"!=i.postLoginAction&&"failure"!=i.postLoginAction&&"sua"==i.postLoginAction&&(n.otac_code=i.otac_code),o.userObj.password="",o.userObj.userName="",e.password="",e.userName="",r(n)},function(t){o.deleteAuthToken(),o.deleteSecPlaholderHash(),o.killAmtSession(),e.password="",e.userName="",a(t)})})})},function(t){o.userObj.password="",o.userObj.userName="",e.password="",e.userName="",o.logger.log("Amt authentication failure",t),t&&o.traceAuthActions("auth_web_failure",!0,JSON.stringify(t)),a(o.buildAuthErrorObjFromAmtError(t))})})}return new Promise(function(s,r){o.logger.log("Amt mobile authentication call for user:"+e.userName+" rememberMe:"+n.rememberMe),o.loader.show(),n=__assign({},n,o.amtHelper.readTelemetricData()),o._window.amtMobileSdk.authenticate(e.userName,e.password,t,n,function(t){o.logger.log("Amt authentication successful",t),o.loader.hide(),o._window.amtMobileSdk.getSessionInfo(function(n){o.logger.log("Amt session info : mobile",n),o.processPostLoginActions(n,i).then(function(i){o.setAuthToken(n.authToken),o.setTntSessionId(n.sessionId),o.setSecPlaholderHash(n.securePlaceholderHash),o.deviceService.setAuthProfileSettings(n,e.userName),o.createISAMUserSession(e.userName).then(function(n){o.traceSession(t,!0),"none"!=i.postLoginAction&&"failure"!=i.postLoginAction&&"sua"==i.postLoginAction&&(n.otac_code=i.otac_code),t.customMessage&&(n.policyResponseStatus=t.customMessage),o.userObj.password="",e.password="",s(n)},function(t){o.userObj.password="",e.password="",o.killAmtSession(),o.traceAuthActions("tnt_isam_failure",!0,JSON.stringify(t)),o.deleteAuthToken(),o.deleteSecPlaholderHash(),r(t)})})})},function(t){o.userObj.password="",e.password="",o.logger.log("Amt authentication failure",t),o.loader.hide(),o.traceAuthActions("amt_auth_failure",!0,JSON.stringify(t)),r(o.buildAuthErrorObjFromAmtError(t))})})},e.prototype.invokeUnauthPolicy=function(e,t,i,n){var o=this,s=window.localStorage.getItem("users");if(void 0!==s&&(s=null==s||"null"==s?"[]":s,this._window.localStorage.setItem("users",s)),this.tracingService.recordUserId(e.userName),this.traceAuthActions(t,!1),"WEB"===this.config.channel){var r={uiContainer:this._window.$("#"+i)};return this.logger.log("Amt Web invokeUnauthPolicy call for user:"+e.userName+" rememberMe:"+n.rememberMe),n.CHANNEL_SESSIONID=this.getSessionId(),n=__assign({},n,this.getDeviceInfo()),new Promise(function(i,s){o._window.amtWebSdk.authenticate(e.userName,e.password,t,n,r,function(e){o.logger.log("Amt authentication successful",e),o._window.amtWebSdk.getSessionInfo(function(n){o.logger.log("Amt session info : web",n),o.traceSession(e,!!n.isMigratedForgotUser,t),n.isMigratedForgotUser?(o.setMigratedStatus(!0),o.setAuthToken(n.authToken),o.setTntSessionId(n.sessionId),o.setSecPlaholderHash(n.securePlaceholderHash),i({migrated:!0,status:"CONTINUE"})):(o.setMigratedStatus(!1),i({migrated:!1,status:"CANCEL"}))})},function(e){o.logger.log("Amt authentication failure",e),o.traceAuthActions("unauth_failure",!0,JSON.stringify(e)),s(o.buildAuthErrorObjFromAmtError(e))})})}return new Promise(function(i,s){o._window.amtMobileSdk.authenticate(e.userName,e.password,t,n,function(e){e._internalData&&e._internalData.json_data&&e._internalData.json_data.isMigrated?(o.setMigratedStatus(!0),o._window.amtMobileSdk.getSessionInfo(function(n){o.logger.log("Amt session info : mobile",n),o.traceSession(e,!0,t),o.setAuthToken(n.authToken),o.setTntSessionId(n.sessionId),o.setSecPlaholderHash(n.securePlaceholderHash),i({})})):(o.setMigratedStatus(!1),i({}))},function(e){s(o.buildAuthErrorObjFromAmtError(e))})})},e.prototype.authenticateUsingBiometric=function(e,t,i){var n=this;return this.setTempLoginUserId(e),this.tracingService.recordUserId(e),this.userObj={userName:e,password:""},new Promise(function(o,s){if("WEB"===n.config.channel){var r=__assign({rememberDevice:!0,CHANNEL_SESSIONID:n.getSessionId()},{authenticatorType:t,userId:e},n.getDeviceInfo(),n.analyticsService.getData());n.authenticateUsingAmt(n.userObj,"Login",i,r).then(function(e){n.setLoginMode(AMT_CONSTANT.LOGIN_BY_BIOMETRICID),n.setMigratedStatus(!0),n.logger.log("Amt authentication successful"),o(e)},function(e){n.logger.log("Amt authentication failure",e),s(e)})}else n._window.KeyPlatformTkt.cordovaService.checkBiometricIDSupport().then(function(){n.isUserBoundWithThisDevice(e).then(function(i){if(i){n.logger.log("Bio Login - Already bounded user");var r=__assign({rememberDevice:!0,CHANNEL_SESSIONID:n.getSessionId()},{authenticatorType:t,userId:e},n.getDeviceInfo(),n.analyticsService.getData());n.authenticateUsingAmt(n.userObj,"Login","",r).then(function(e){n.setLoginMode(AMT_CONSTANT.LOGIN_BY_BIOMETRICID),n.setMigratedStatus(!0),void 0===e.data||e.data.migrated||(n.traceAuthActions("offboard_transmit",!1),e.migratedTurnsNonMigrated=!0,n.userObj.migrated=!1),n.logger.log("Amt authentication successful"),o(e)},function(e){n.logger.log("Amt authentication failure",e),"BIOMETRIC_INVALIDATED"==e.policyResponseStatus?e.error=AMT_CONSTANT.BIOMETRIC_ID_HASH_CHANGED:"BIOMETRIC_UNREGISTED"==e.policyResponseStatus?e.error=AMT_CONSTANT.BIOMETRIC_ID_UNREGISTERED_DUE_TO_HASH_CHANGE:"BIOMETRIC_ID_BIOMETRY_LOCKOUT"==e.policyResponseStatus?e.error=AMT_CONSTANT.BIOMETRIC_ID_BIOMETRY_LOCKOUT:"BIOMETRIC_ID_USER_RETRY_LIMIT_EXCEEDED"==e.policyResponseStatus&&(e.error=AMT_CONSTANT.BIOMETRIC_ID_USER_RETRY_LIMIT_EXCEEDED),s(e)})}},function(e){s({code:"-1",description:"Amt getBoundUser check failure"})})},function(e){s({error:e,status:550,description:"biometric support detection failed"})})})},e.prototype.authenticateUsingPin=function(e,t,i){var n=this;return this.userObj={userName:e,password:""},this.setTempLoginUserId(e),this.tracingService.recordUserId(e),new Promise(function(o,s){n.isUserBoundWithThisDevice(e).then(function(r){if(r){var a=__assign({rememberDevice:!0,CHANNEL_SESSIONID:n.getSessionId()},{userId:e,authenticatorType:"pin_centralized",pin:i},n.getDeviceInfo(),n.analyticsService.getData());n.authenticateUsingAmt(n.userObj,AMT_CONSTANT.POLICY_LOGIN,t,a).then(function(e){n.logger.log("amt Pin login successfull",e),n.setLoginMode(AMT_CONSTANT.LOGIN_BY_PIN),n.setMigratedStatus(!0),void 0===e.data||e.data.migrated||(n.traceAuthActions("offboard_transmit",!1),e.migratedTurnsNonMigrated=!0,n.userObj.migrated=!1),o(e)},function(e){n.logger.log("Amt authentication failure",e),s(e)})}else{var c={userName:e,password:i};n.httpClient.post(n.apiSettings.postValidatePinUrl(),c,{deviceDataRequired:!0,appMonDataRequired:!0,appIdDataRequired:!0}).then(function(r){if(n.logger.log("mbl pin autentication",r),n.traceSession(r,!1),void 0!==r.data&&r.data.migrated){n.setLoginMode(AMT_CONSTANT.LOGIN_BY_PIN),n.setMigratedStatus(!0);var a={authType:"PIN",userName:e,userPin:i,rememberMe:!0,deviceSerialToken:n._window.KeyPlatformTkt.cordovaService.deviceSerialToken,deviceId:n._window.KeyPlatformTkt.cordovaService.mobileDeviceId,appId:n._window.KeyPlatformTkt.cordovaService.mobileAppId,CHANNEL_SESSIONID:n.getSessionId()};n.logger.log("pinResgisterPayload",a),n.authenticateUsingAmt(n.userObj,AMT_CONSTANT.POLICY_LOGIN,t,a).then(function(e){n.logger.log("Amt authentication successful"),n.traceAuthActions("onboard_transmit",!1),e.firstTimeLoginAfterMigration=!0,o(e)},function(e){e.firstTimeLoginAfterMigration=!0,n.traceAuthActions("onboard_transmit_error",!0,JSON.stringify(e)),n.logger.log("amt bind journey failed while using pin from n to y",e),s({error:e,status:e.status,description:"bind journey failed"})})}else n.logger.log("Pin login successfully"),n.setLoginMode(AMT_CONSTANT.LOGIN_BY_PIN),n.setMigratedStatus(!1),o(r)},function(e){n.logger.log("Pin login failed"),s({error:e,status:e.status,description:"pin login failed"})})}},function(e){s({code:"-1",description:"Amt getBoundUser check failure",error:e})})})},e.prototype.recoverPassword=function(e,t,i){return this.invokeUnauthPolicy(e,AMT_CONSTANT.POLICY_FORGOT_PASSWORD,t,i)},e.prototype.userSelfUnlock=function(e,t,i){return this.invokeUnauthPolicy(e,AMT_CONSTANT.POLICY_USER_SELF_UNLOCK,t,i)},e.prototype.retrieveUserId=function(e,t){return this.invokeAnonymousPolicy(AMT_CONSTANT.POLICY_RETRIEVE_USERID,e,t)},e.prototype.authenticateUsingBindId=function(e,t,i){var n=this;if(void 0===this.config)return console.error("Invalid config object, bindId can NOT complete"),this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"});if(!e||""==e)return console.error("Invalid user ID, bindId can NOT complete"),this.getNoopFailurePromise({code:"-1",description:"Need a valid user ID"});if(this.setTempLoginUserId(e),this.tracingService.recordUserId(e),this.traceAuthActions("authTypeBindid",!1),i=__assign({},i,{CHANNEL_SESSIONID:this.getSessionId(),authenticatorType:"bindid"},this.getDeviceInfo()),"WEB"===this.config.channel){""!==t&&this._window.$("#"+t);return console.log("Amt Web Login call for user:"+e+" params:"+i),new Promise(function(o,s){var r={userName:e,password:""};n.authenticateUsingAmt(r,AMT_CONSTANT.POLICY_LOGIN,t,i).then(function(e){return __awaiter(n,void 0,void 0,function(){return __generator(this,function(t){return console.log("Bind ID authentication successfull"),this.setMigratedStatus(!0),o(e),[2]})})},function(e){console.log("Bind ID authentication failed",e),s(e)})})}return this.logger.log("No implementation for BindID in mobile"),this.getNoopFailurePromise({code:"-1",description:"Invalid platform"})},e.prototype.hashPassword=function(e){var t=this;return new Promise(function(i){e&&e.length>0?t.uuidService.digestMessage(e).then(function(e){i({hashAction:"completed",digestHex:e})}):i({hashAction:"smart"})})},e.prototype.buildAuthErrorObjFromAmtError=function(e){this.logger.error("auth error",e);var t={status:-1,policyResponseStatus:"UNKNOWN",description:"UNKNOWN_ERROR",data:{}};if(e&&e._data)if(e._errorCode&&8==e._errorCode&&e._message&&e._message.includes("Attempt to start a session (authenticate) with a current")&&this.killAmtSession(),e._errorCode&&3==e._errorCode)t.status=421,t.policyResponseStatus="LOCKED",t.description="amt manipulated error for locked";else if(e._errorCode&&6==e._errorCode){var i=e._message;"WEB"!==this.config.channel&&(i=e._data.body);var n=this._window.KeyCommonTkt.utilities.checkForNonIbxResponseIfAny(i);n.isValidResponse?e._data.failure_data?(t.policyResponseStatus=e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.policyResponseStatus?e._data.failure_data.reason.data.policyResponseStatus:"",t.description=""!=t.policyResponseStatus?t.policyResponseStatus:t.description,t.status=this.getErrorStatusCode(t.policyResponseStatus)):t.description=e._message:(t.status=-200,t.policyResponseStatus="NIL",t.description="Non-IBX error response detected",t.data=n)}else if(e._errorCode&&9==e._errorCode)if(e._data.failure_data.reason&&e._data.failure_data.reason.type&&"locked"==e._data.failure_data.reason.type)t.status=421,t.policyResponseStatus="LOCKED",t.description="amt manipulated error for locked";else if(e._data.failure_data.reason&&e._data.failure_data.reason.data&&"LOCKED"==e._data.failure_data.reason.data.status)t.status=421,t.policyResponseStatus="LOCKED",t.description="amt manipulated error for locked during change password";else if(e._data.failure_data.reason&&e._data.failure_data.reason.data&&"COMPLETE_ENROLLMENT"==e._data.failure_data.reason.data.policyResponseStatus){var o=e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.jwt?e._data.failure_data.reason.data.jwt.auth_jwt:"";t.policyResponseStatus="COMPLETE_ENROLLMENT",t.description=""!=t.policyResponseStatus?t.policyResponseStatus:t.description,t.status=this.getErrorStatusCode(t.policyResponseStatus),t.data={failure_data:e._data.failure_data.reason.data,userViewType:e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.userViewType?e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.userViewType:""},this.setAuthToken(o)}else e._data.failure_data&&(t.policyResponseStatus=e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.policyResponseStatus?e._data.failure_data.reason.data.policyResponseStatus:"",t.description=""!=t.policyResponseStatus?t.policyResponseStatus:t.description,t.status=this.getErrorStatusCode(t.policyResponseStatus),t.data={failure_data:e._data.failure_data});else e._data.control_flow_external_cancellation||e._errorCode&&7==e._errorCode?(t.status=0,t.policyResponseStatus="OPERATION_CANCELLED",t.description="operation cancelled"):e._data.additional_data?e._data.additional_data.policyResponseStatus?(t.policyResponseStatus=e._data.additional_data.policyResponseStatus,t.status=this.getErrorStatusCode(t.policyResponseStatus),t.description=e._data.additional_data.error):(t.status=Number(e._data.additional_data.status?e._data.additional_data.status:-1),t.description=e._data.additional_data.error):e._data.failure_data?(t.policyResponseStatus=e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.policyResponseStatus?e._data.failure_data.reason.data.policyResponseStatus:"",t.description=""!=t.policyResponseStatus?t.policyResponseStatus:t.description,t.status=this.getErrorStatusCode(t.policyResponseStatus)):e._message&&(t.description=e._message);return"WEB"===this.config.channel&&"object"!=typeof this._window.amtWebSdk.additionalResponse&&""!==this._window.amtWebSdk.additionalResponse&&(t.status=Number(this._window.amtWebSdk.additionalResponse),this.logger.log("inside amt service condition",t.status),this._window.amtWebSdk.additionalResponse=""),t},e.prototype.getErrorStatusCode=function(e){var t=-1;switch(e){case"INACTIVE":t=425;break;case"LOCKED":t=421;break;case"FORBIDDEN":t=403;break;case"SUSPENDED":t=423;break;case"COMPLETE_ENROLLMENT":t=428;break;case"UNAUTHORIZED":t=401;break;case"INVALID_AUTHENTICATOR":t=450;break;case"PENDING":t=451;break;case"NO_STEPUP_AUTHENTICATOR":t=452}return t},e.prototype.isUserBoundWithThisDevice=function(e){var t=this,i=window.localStorage.getItem("users");return void 0!==i&&(i=null==i||"null"==i?"[]":i,window.localStorage.setItem("users",i)),void 0===this.config?(this.logger.error("Amt is intialized with invalid config object, invokePolicy can NOT complete"),this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"})):"WEB"===this.config.channel?new Promise(function(i,n){t._window.amtWebSdk.getKnownUserIds(function(n){if(t.logger.log("Amt known user check for users : in",e,n),n instanceof Array){var o=-1!=n.indexOf(e.toLowerCase());t.logger.log("user bound check result for",o),i(o?e:null)}else t.logger.log("invalid response from bound user check"),i(null)},function(e){t.logger.log("Known user check error, return null"),i(null)})}):new Promise(function(i,n){t._window.amtMobileSdk.getBoundUserIds(function(n){var o=n.users;if(t.logger.log("Amt known user check for users : in",e,o),o instanceof Array){var s=-1!=(o=o.toLocaleString().toLocaleLowerCase().split(",")).indexOf(e.toLowerCase());t.logger.log("user bound check result for",s),t.userObj.migrated=!0,i(s?e:null)}else t.logger.log("invalid response from bound user check"),t.userObj.migrated=!1,i(null)},function(e){t.userObj.migrated=!1,t.logger.log("Known user check error, ignore and resolve with null"),i(null)})})},e.prototype.initiateUserSession=function(e,t){this.logger.log("In initiateUserSession"),void 0!==this.config&&void 0!==this.config.sessionConfig||this.logger.error("No valid config or session config found"),this.sessionService.initSession(this.config,this.keepAlive.bind(this),this.onUserSessionEnd.bind(this)),this.onSessionContinueCallbackFn=e,this.onSessionEndCallbackFn=t},e.prototype.onUserSessionEnd=function(){var e=this;this._window.localStorage.setItem(AMT_CONSTANT.STORAGE_KEY_ISAUTHENTICATED,!1),this.sessionService.endSession(),this.logger.log("In session end called"),this.logout().then(function(t){e.logger.log("In logout success"),e.onSessionEndCallbackFn(t)},function(t){e.logger.error("In logout failure"),e.onSessionEndCallbackFn(t)})},e.prototype.onUserSessionContinue=function(){var e=this;this.sessionService.continueSession(),this.logger.log("In session continue called"),this.keepAlive().then(function(t){e.logger.log("In keep alive success"),e.onSessionContinueCallbackFn(t)},function(t){e.logger.error("In keep alive failure"),e.onSessionContinueCallbackFn(t)}),this.logger.log("On session continue subscribed successfully")},e.prototype.processAuthActionSua=function(e,t){var i=this;return new Promise(function(n){var o={};if("WEB"===i.config.channel){var s=window.sessionStorage.getItem("currentSession");try{s&&"string"==typeof s&&(o=JSON.parse(s))}catch(e){}}else o={user_name:i.getTempLoginUserId(),session_id:e.sessionId};var r=__assign({},o,{jwt:e.authToken,auth_action_jwt:e.authActionToken});console.log("Calling sua policy "),i.invokeAnonymousPolicy("SUA",t,r).then(function(e){console.log("***** ERROR post login action resulted in success ",e),n({postLoginAction:"failed"})},function(e){console.log("post login action success ",e),n(e)})})},e.prototype.processPostLoginActions=function(e,t){if(e&&e.postLoginActions){var i=void 0,n=e.postLoginActions;if(n&&Array.isArray(n)&&(i=n.find(function(e){return e.toLowerCase().startsWith("sua")})),i)return this.processAuthActionSua(e,t)}return new Promise(function(e){e({postLoginAction:"none"})})},e.prototype.createISAMUserSession=function(e){var t=this;return this.logger.log("Creating user session through ISAM channel started"),new Promise(function(i,n){t.httpClient.post(t.apiSettings.getIsamUserSessionUrl(),{userName:e}).then(function(e){t.logger.log("ISAM Session susccessfully created"),t.sessionService.storeSessionStartTime(),i(e)},function(e){t.logger.error("ISAM Session creation failure"),n(e)})})},e.prototype.updateISAMStepUpChallenge=function(e){var t=this;return this.logger.log("Update ISAM StepUpChallenge update started."),new Promise(function(i,n){t.httpClient.post(t.apiSettings.getIsamUpdateStepUpChallengeUrl(e),{}).then(function(e){t.logger.log("ISAM stepup challenge susccessfully updated"),i(e)},function(e){t.logger.error("ISAM stepup challenge update failure",e),n(e)})})},e.prototype.keepSessionAlive=function(){this.logger.log("Keep alive session rquest placed"),this.config&&this.config.sessionConfig&&this.sessionService.isSessionMonitorStarted()?(this.logger.log("Keep alive session request success."),this.sessionService.initiateKeepAlive()):this.logger.log("Keep alive session request failure because no monitoring enabled.")},e.prototype.keepAlive=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:if(void 0===this.config)return this.logger.error("Amt is intialized with invalid config object, logout can NOT complete"),[2,this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"})];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,this.keepIsamSessionAlive()];case 2:return e.sent(),[4,this.keepAmtSessionAlive()];case 3:return e.sent(),[3,5];case 4:return e.sent(),this.logger.error("session kill/clear failed"),[3,5];case 5:return[2]}})})},e.prototype.keepIsamSessionAlive=function(){var e=this;return new Promise(function(t,i){e.httpClient.get(e.apiSettings.getKeepAliveUrl()).then(function(e){t(e)},function(e){i(e)})})},e.prototype.keepAmtSessionAlive=function(){console.log("after keep alive"),this.invokePolicy("KeepAlive","",{}).then(function(e){console.log("after keep alive success",e)},function(e){console.log("after keep alive failed",e)})},e.prototype.getDeviceInfo=function(){if(void 0!==this.deviceInfo)return this.logger.log("deviceInfo is available. returning the existing device info"),this.deviceInfo;if(this.logger.log("deviceInfo is not available. so fetching new device info"),this.deviceInfo={},"WEB"===this.config.channel){this.deviceInfo.appVersion=this.appVersion,this.logger.log("getting browser device information");var e=this.deviceService.getBrowserData();this.deviceInfo.userAgentFamily=e.userAgentFamily,this.deviceInfo.userAgentBrowserEngine=e.userAgentWebEngine,this.deviceInfo.webSessionBrowserTimeZone=e.timeZone}else{this.deviceInfo.appVersion=this._window._appVersion;var t=this._window.KeyPlatformTkt.deviceService.getDeviceData("JSON"),i={mobileMalwareList:t.malware||null,rootdjailbrknHdrs:t.rootHiders||null,isFaceDWNflag:t.faceDown||!1};this.deviceInfo=__assign({},this.deviceInfo,i),this.logger.log("getting mobile device information")}return this.logger.log("device information fetched - ",this.deviceInfo),this.deviceInfo},e.prototype.cancelAmtOperation=function(e){var t=this;return new Promise(function(e){t._window.amtWebSdk.checkAndCancelRunningFlowIfAny(!0,function(t){e(!0)})})},e.prototype.invokePolicy=function(e,t,i){var n=this;if(void 0===i&&(i={}),void 0===this.config)return this.logger.error("Amt is intialized with invalid config object, invokePolicy can NOT complete"),this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"});if(i=__assign({},i,this.getDeviceInfo(),{migrated:this.userObj.migrated},this.amtHelper.readTelemetricData()),"WEB"===this.config.channel){var o={uiContainer:""!==t?this._window.$("#"+t):""};return this.logger.log("Amt Web policyInvoke call for user:"+e+" params:"+i),new Promise(function(t,s){n._window.amtWebSdk.checkAndCancelRunningFlowIfAny(n.isPolicyExecutionOn,function(r){n.isPolicyExecutionOn=!0,n._window.amtWebSdk.cancelButtonOnAuthList(i.showCancelButtonOnAuthList),n._window.amtWebSdk.invokePolicy(e,i,o,function(i){n._window.amtWebSdk.cancelButtonOnAuthList(!1),n._window.amtWebSdk.getSessionInfo(function(o){n.logger.log("Amt session info after policy execution : web",o),n.setAuthToken(o.authToken),n.setTntSessionId(o.sessionId),n.setSecPlaholderHash(o.securePlaceholderHash),n.deviceService.updateAuthProfile(o,e),n.isPolicyExecutionOn=!1,t(i)})},function(e){n.stepUpCancelErrorCase=e&&"Cancel during authenticator selection."==e._message?"UserCanceled":"",n._window.amtWebSdk.cancelButtonOnAuthList(!1),n.isPolicyExecutionOn=!1,s(n.buildAuthErrorObjFromAmtError(e))})})})}return new Promise(function(t,o){n.logger.log("Amt Mobile policyInvoke call for user:"+e+" params:"+i),n._window.amtMobileSdk.checkAndCancelRunningFlowIfAny(n.isPolicyExecutionOn,function(s){n.isPolicyExecutionOn=!0,n.loader.show(),n._window.amtMobileSdk.invokePolicy(e,i,function(e){n.loader.hide(),n._window.amtMobileSdk.getSessionInfo(function(i){n.logger.log("Amt session info after policy execution: mobile",i),n.setAuthToken(i.authToken),n.setTntSessionId(i.sessionId),n.setSecPlaholderHash(i.securePlaceholderHash),n.isPolicyExecutionOn=!1,t(e)})},function(e){n.loader.hide(),n.isPolicyExecutionOn=!1,o(n.buildAuthErrorObjFromAmtError(e))})})})},e.prototype.invokeAnonymousPolicy=function(e,t,i){var n=this;if(void 0===i&&(i={}),void 0===this.config)return this.logger.error("Amt is intialized with invalid config object, invokePolicy can NOT complete"),this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"});if(this.traceAuthActions(AMT_CONSTANT.POLICY_RETRIEVE_USERID,!1),i.CHANNEL_SESSIONID=this.getSessionId(),i=__assign({},i,this.getDeviceInfo()),"WEB"===this.config.channel){var o={uiContainer:""!==t?this._window.$("#"+t):""};return this.logger.log("Amt Web policyInvoke call for user:"+e+" params:"+i),new Promise(function(t,s){n._window.amtWebSdk.invokeAnonymousPolicy(e,i,o,function(e){e.status="CONTINUE",t(e)},function(e){var t=n.buildAuthErrorObjFromAmtError(e);e._errorCode&&9==e._errorCode&&(e._data.failure_data.reason&&e._data.failure_data.reason.type&&"locked"==e._data.failure_data.reason.type&&(t.status=423),e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.otac_code&&"assertion_rejected"==e._data.failure_data.reason.type&&(t.status=424,t.postLoginAction="sua",t.otac_code=e._data.failure_data.reason.data.otac_code)),s(t)})})}return new Promise(function(t,o){n.logger.log("Amt Mobile policyInvoke call for user:"+e+" params:"+i),n._window.amtMobileSdk.invokeAnonymousPolicy(e,i,function(e){t(e)},function(e){if(e._data.failure_data.reason&&e._data.failure_data.reason.data&&e._data.failure_data.reason.data.otac_code&&"assertion_rejected"==e._data.failure_data.reason.type){var t={status:424,postLoginAction:"sua",otac_code:e._data.failure_data.reason.data.otac_code};o(t)}else o(n.buildAuthErrorObjFromAmtError(e))})})},e.prototype.stepUp=function(e){var t=this;if(void 0===this.config||void 0===e)return this.logger.error("Amt is intialized with invalid config object or step-up object, Stepup can NOT complete"),this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config or Stepup config"});if(this.logger.log("config",this.config),this.logger.log("stepUpConfig",e),this.isMigratedUser()){this.logger.log("Amt step up is called for migrated user",e.policyName);var i=__assign({},e.addInfo,this.getDeviceInfo());return new Promise(function(n,o){t.invokePolicy(e.policyName,e.container,i).then(function(e){t.updateISAMStepUpChallenge(t.getAuthToken()).then(function(e){n(e)},function(e){o(t.getCustomStepUpError(e.status))})},function(i){0!=i.status?-200==i.status?o({code:-200,data:i.data,description:i.description,message:"Cannot proceed due to security reason"}):o(t.getCustomStepUpError(i.status)):(t.logger.log("Amt step up error : do nothing requested"),t.logger.log("Amt step up is cancelled by the user or system for migrated user",e.policyName),"WEB"!=t.config.channel?o(t.getCustomStepUpError(i.status)):"UserCanceled"==t.stepUpCancelErrorCase?(t.logger.log("UserCanceled"),o(t.getCustomStepUpError(i.status))):t.logger.log("user did navigate to other page with out canceling the policy"))})})}return this.logger.log("Amt step up is called for non-migrated user",e.operationName),new Promise(function(i,n){var o=t._window.$("#"+e.container);o.empty(),t.stepUpResolveFn=i,t.stepUpRejectFn=n,t._window.amtUiContainer=o,t._window.sendMessageToHandler(JSON.stringify({session:"STEP_UP",message:{amtConfig:t._window.btoa(JSON.stringify(t.config)),stepUpConfig:t._window.btoa(JSON.stringify(e))},channel:t.config.channel}))})},e.prototype.onStepUpSuccess=function(e){this._window.amtUiContainer.empty(),this.stepUpResolveFn(e)},e.prototype.onStepUpFailure=function(e){this._window.amtUiContainer.empty(),this.stepUpRejectFn(e)},e.prototype.getCustomStepUpError=function(e){this.logger.log(e);var t=this.config.labelsAndMessages.systemLoadErr,i=AMT_CONSTANT.STEPUP_UNKNOWN_ERROR;switch(e){case 401:t=this.config.labelsAndMessages.lockoutTextErr,i=AMT_CONSTANT.STEUP_AUTH_FAILURE;break;case 423:case 421:t=this.config.labelsAndMessages.systemLoadErr,i=AMT_CONSTANT.STEPUP_LOCKED;break;case AMT_CONSTANT.STEPUP_ABORTED:t=this.config.labelsAndMessages.systemLoadErr,i=AMT_CONSTANT.STEPUP_ABORT;break;case AMT_CONSTANT.STEPUP_INIT_FAILURE:t=this.config.labelsAndMessages.systemLoadErr,i=AMT_CONSTANT.STEPUP_INIT_FAILURE;break;case AMT_CONSTANT.STEPUP_STATUS_DO_NOTHING:e=AMT_CONSTANT.STEPUP_ABORT,t="",i="";break;default:t=this.config.labelsAndMessages.systemLoadErr,i=AMT_CONSTANT.STEPUP_UNKNOWN_ERROR}return{code:e,description:i,message:t}},e.prototype.removeBoundUser=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return"WEB"===this.config.channel?(this.logger.log("Nothing to be done for web removeBoundUser"),[2,this.getNoopSuccessPromise({code:"0",description:"success"})]):(this.logger.log("Amt Mobile removeBounded user called"),[2,this._window.amtMobileSdk.removeBoundUser(e)])})})},e.prototype.resetMobile=function(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(t){return"WEB"===this.config.channel?(this.logger.log("Nothing to be done for web clearAllData"),[2,this.getNoopSuccessPromise({code:"0",description:"success"})]):(this.logger.log("Amt Mobile reset"),[2,new Promise(function(t,i){e._window.amtMobileSdk.resetMobile(function(i){e.logger.log("Amt Mobile Clear Data succeeded"),t("")},function(i){e.logger.log("Amt Mobile Clear Data succeeded Failed"),t("")})})])})})},e.prototype.sessionLogout=function(e){var t=this;return new Promise(function(i){t.logout().then(function(n){t.sessionService.clearSessionAndLogout(e).then(function(e){i("Success")})})})},e.prototype.logout=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:if(this.resetLoginMode(),void 0===this.config)return this.logger.error("Amt is intialized with invalid config object, logout can NOT complete"),[2,this.getNoopFailurePromise({code:"-1",description:"Invalid Amt config"})];this.sessionService.endSession(),"MOBILE"===this.config.channel&&(this.deleteAuthToken(),this.deleteSecPlaholderHash(),this.amtHelper.setLogOutComplete()),e.label=1;case 1:return e.trys.push([1,4,,5]),this.logger.error("Amt being logged out "),this.logger.error("Transmit + ISAM logout "),[4,this.killIsamSession()];case 2:return e.sent(),[4,this.killAmtSession()];case 3:return e.sent(),this.amtHelper.setLogOutComplete(),[3,5];case 4:return e.sent(),this.logger.error("session kill/clear and log out is failed"),[3,5];case 5:return[2]}})})},e.prototype.killIsamSession=function(){var e=this;return new Promise(function(t,i){e.httpClient.get(e.apiSettings.getKillIsamSessionUrl()).then(function(e){t(e)},function(e){t(e)})})},e.prototype.killAmtSession=function(){var e=this;return this.setMigratedStatus(!1),this.clearSessionData(),"WEB"===this.config.channel?this._window.amtWebSdk.logout():(this.logger.log("Amt Mobile Logout called"),new Promise(function(t,i){e._window.amtMobileSdk.logout(function(i){e.logger.log("Amt Mobile Logout succeeded"),t("")},function(i){e.logger.log("Amt Mobile Logout failed.. no worries.. move forward"),t("")})}))},e.prototype.clearSessionData=function(){this._window.sessionStorage.clear()},e.prototype.setContentVariables=function(e,t){var i=this;if(void 0===t&&(t=!1),this.logger.log("Content variables request to update"),this.config.labelsAndMessages=this.contentService.getUpdatedMessagesAndLabels(e),!t)return"WEB"===this.config.channel?(this.logger.log("Amt Web content variale update for web"),new Promise(function(e,t){i._window.amtWebSdk.updateConfig(i._window.btoa(JSON.stringify(i.config)),function(e){},function(e){})})):new Promise(function(e,t){i.logger.log("Amt Web content variale update for Mobile"),i._window.amtMobileSdk.updateConfig(i._window.btoa(JSON.stringify(i.config)),function(e){},function(e){})})},e.prototype.checkSessionIntegrity=function(e){var t=this;return void 0===e&&(e=!1),e?(this.logger.log("Amtservice endSession for hard initilize: wipe out if any previous session data"),this.initialized=!1,this.logger.log("Migration flags have been reset"),this.sessionService.isSessionMonitorStarted()&&this.sessionService.endSessionMonitoring(),this.logger.log("Session monitoring and subscribers unregistered"),this.deleteAuthToken(),this.deleteSecPlaholderHash(),this.logger.log("Auth tokens erased"),new Promise(function(e,i){t.clearAllData().then(function(i){t.logger.log("In amt sessin clear success"),e("")},function(i){t.logger.log("In amt sessin clear failure",i),e("")})})):this.getNoopSuccessPromise({})},e.prototype.setBehavioralData=function(e){this.analyticsService.setData(e)},e.prototype.stopBehavioralData=function(){this.analyticsService.stopBehaviouralMonitoring()},e.prototype.setMigratedStatus=function(e){this.userObj.migrated=e,this._window.localStorage.setItem(AMT_CONSTANT.STORAGE_KEY_MIGRATION_STATUS,e)},e.prototype.getMigratedStatus=function(){return this._window.localStorage.getItem(AMT_CONSTANT.STORAGE_KEY_MIGRATION_STATUS)},e.prototype.deleteMigrationStatus=function(){this._window.localStorage.removeItem(AMT_CONSTANT.STORAGE_KEY_MIGRATION_STATUS)},e.prototype.isMigratedUser=function(){return"true"==this.getMigratedStatus()},e.prototype.getAuthProfile=function(){return this.deviceService.getAuthProfile()},e.prototype.setLoginMode=function(e){this._window.sessionStorage.setItem(AMT_CONSTANT.STORAGE_KEY_LOGIN_MODE,e)},e.prototype.resetLoginMode=function(){this._window.sessionStorage.removeItem(AMT_CONSTANT.STORAGE_KEY_LOGIN_MODE)},e.prototype.setTempLoginUserId=function(e){this._window.sessionStorage.setItem(AMT_CONSTANT.STORAGE_KEY_TEMP_LOGIN_USERID,e)},e.prototype.getTempLoginUserId=function(){return this._window.sessionStorage.getItem(AMT_CONSTANT.STORAGE_KEY_TEMP_LOGIN_USERID)},e.prototype.setAuthToken=function(e){this._window.localStorage.setItem(AMT_CONSTANT.STORAGE_KEY_AUTH_TOKEN,e)},e.prototype.getAuthToken=function(){return this._window.localStorage.getItem(AMT_CONSTANT.STORAGE_KEY_AUTH_TOKEN)},e.prototype.deleteAuthToken=function(){this._window.localStorage.removeItem(AMT_CONSTANT.STORAGE_KEY_AUTH_TOKEN)},e.prototype.setSecPlaholderHash=function(e){this._window.localStorage.setItem(AMT_CONSTANT.STORAGE_KEY_PLACEHOLDER_HASH,e)},e.prototype.getSecPlaholderHash=function(){return this._window.localStorage.getItem(AMT_CONSTANT.STORAGE_KEY_PLACEHOLDER_HASH)},e.prototype.deleteSecPlaholderHash=function(){this._window.localStorage.removeItem(AMT_CONSTANT.STORAGE_KEY_PLACEHOLDER_HASH)},e.prototype.setSessionId=function(e){AmtDeviceService.createCookie(AMT_CONSTANT.STORAGE_KEY_SESSION_ID,e,.5)},e.prototype.getSessionId=function(){return AmtDeviceService.getCookie(AMT_CONSTANT.STORAGE_KEY_SESSION_ID)},e.prototype.resetSessionId=function(){AmtDeviceService.createCookie(AMT_CONSTANT.STORAGE_KEY_SESSION_ID,this.uuidService.getChannelSessionId(),.5)},e.prototype.deleteSessionId=function(){AmtDeviceService.createCookie(AMT_CONSTANT.STORAGE_KEY_SESSION_ID,"",-1)},e.prototype.setTntSessionId=function(e){AmtDeviceService.createCookie(AMT_CONSTANT.STORAGE_KEY_TNT_SESSION_ID,e,.5)},e.prototype.getTntSessionId=function(){return AmtDeviceService.getCookie(AMT_CONSTANT.STORAGE_KEY_TNT_SESSION_ID)},e.prototype.viewLogFile=function(e){var t=this;return"WEB"===this.config.channel?(this.logger.log("Nothing to be done for web viewLogFile"),this.getNoopSuccessPromise({code:"0",description:"success"})):(console.log("Amt Mobile display log file"),new Promise(function(i,n){t._window.amtMobileSdk.viewLogFile(e,function(e){i(e)},function(e){n(e)})}))},e.prototype.deleteTntSessionId=function(){AmtDeviceService.createCookie(AMT_CONSTANT.STORAGE_KEY_TNT_SESSION_ID,"",-1)},e.prototype.clearAllData=function(){var e=this;return this.deleteMigrationStatus(),this.deleteAuthToken(),this.deleteSecPlaholderHash(),"WEB"===this.config.channel?(this.logger.log("Amt Web clear all data invoked"),new Promise(function(t,i){e._window.amtWebSdk.logout(function(i){e.logger.log("All existing data deleted"),t("")},function(i){e.logger.log("All existing data deletion failured.. ignore and move forward"),t("")})})):(this.logger.log("Amt Mobile clear all data invoked"),new Promise(function(t,i){e._window.amtMobileSdk.logout(function(i){e.logger.log("All existing data deleted"),t("")},function(i){e.logger.log("All existing data deletion failured.. ignore and move forward"),t("")})}))},e.prototype.traceSession=function(e,t,i){void 0===i&&(i="");var n=!1;e.data&&e.data.acceptedBusinessTermsAndConditionsVersion&&(n=0!=e.data.acceptedBusinessTermsAndConditionsVersion);var o={channelSessionId:this.getSessionId(),isMigrated:t,isBusiness:n,policy:i};this.tracingService.recordSessionProperties(o)},e.prototype.traceAuthActions=function(e,t,i){void 0===i&&(i="unkonwn error");var n={name:e,type:"login",source:"amt"},o=this.tracingService.recordAction(n);t&&i&&this.tracingService.recordErrorString(i,"amt"),this.tracingService.recordActionEnd(o)},e.prototype.getNoopFailurePromise=function(e){return new Promise(function(t,i){i(e)})},e.prototype.getNoopSuccessPromise=function(e){return new Promise(function(t,i){t(e)})},e}(),AnalyticsService=function(){function e(e){this._window=window,this.isInitError=!1,this.behavioralAnalyticsEnabled=!1,this.ndsReady=!1,this.sessionId="invalid_session",this.placement="Login",this.placementPage="1",this.ndsReadyCallback=[],this.logger=e.getInstance("AnalyticsService")}return e.prototype.init=function(e,t){var i=this;if(this.isInitError=!1,!e||!e.behavioralAnalyticsConfig)return this.isInitError=!0,void this.logger.log("Invalid Config found.. no client js loaded");if(this.behavioralAnalyticsConfig=e.behavioralAnalyticsConfig,this.behavioralAnalyticsEnabled=e.behavioralAnalyticsEnabled,!this.behavioralAnalyticsConfig.clientId)return this.isInitError=!0,void this.logger.log("No valid client Id found in the config");if(!this.behavioralAnalyticsEnabled)return this.isInitError=!0,void this.logger.log("Behavioral analytics capability is off");0===this._window.$("input[name='nds-pmd']").length&&(this._window.$("<input>").attr({name:"nds-pmd",type:"hidden",id:"ndspmd"}).appendTo("body"),this.logger.log("nds-pmd hidden field not found.. so created one")),this.sessionId=t.sessionId;var n,o,s,r,a,c,l,d="https://nd.key.com/2.2/w/"+this.behavioralAnalyticsConfig.clientId+"/sync/js/";try{n=this._window,o=document,s="script",r=d,(l=n.ndsapi||(n.ndsapi={})).config={q:[],ready:function(e){this.q.push(e)}},a=o.createElement(s),c=o.getElementsByTagName(s)[0],a.src=r,c.parentNode.insertBefore(a,c),a.onload=function(){l.load(r)},this.nds=this._window.ndsapi,this.nds.config.ready(function(){i.nds.setSessionId(i.sessionId),i.ndsReady=!0;for(var e=0;e<i.ndsReadyCallback.length;e++)i.ndsReadyCallback.shift()()})}catch(e){this.isInitError=!0,this.ndsReady=!1}},e.prototype.requestCall=function(e){this.ndsReady?e():this.ndsReadyCallback.push(e)},e.prototype.beginBehaviouralMonitoring=function(){var e=this.sessionId,t=this.placement,i=this.placementPage;this.requestCall(function(){this.nds.setSessionId(e),this.nds.setPlacement(t),this.nds.setPlacementPage(i),this.nds.reinit(),this.nds.bindNewFields()})},e.prototype.stopBehaviouralMonitoring=function(){this.requestCall(function(){this.nds.stop()})},e.prototype.clearBehaviouralData=function(){this.requestCall(function(){this.nds.clear()})},e.prototype.getData=function(){return!this.isInitError&&this._window.ndsapi&&this._window.$("input[name='nds-pmd']").length>0?(this.logger.log("nds is ready to provide widget data"),this._window.$("input[name='nds-pmd']").val().length>0?(this.logger.log("nds is ready to provide widget data - already written"),{userAgent:this._window.navigator.userAgent,ndsData:this._window.$("input[name='nds-pmd']").val()}):(this.logger.log("nds is ready to provide widget data - failed to written"),{ndsData:"NDS_CLIENT_ERROR_NO_DATA_WRITTEN"})):(this.logger.log("nds is either not ready or init failure, returning error."),{ndsData:"NDS_CLIENT_ERROR_NO_DATA_FOUND"})},e.prototype.setData=function(e){this.clearBehaviouralData(),this.logger.log("nds set Behavioral Data",e),this.sessionId=e.sessionId,this.placement=e.placement,this.placementPage=e.placementPage,this.beginBehaviouralMonitoring()},e}(),ApiSettings=function(){function e(){this.date=Number(new Date),this._window=window}return e.prototype.setConfig=function(e){this.config=e},e.prototype.postAuthenticateCredentialsUrl=function(e){return this.config.stubsEnabled?this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/json/"+e.userName:this.config.baseUrl+"mbl/api/unauth/v1/users/login/password"},e.prototype.getKeepAliveUrl=function(){var e=this.config.baseUrl+"mbl/api/auth/v1/users/keepalive";return this.config.stubsEnabled&&(e=this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/json/keepalive"),e},e.prototype.getKillIsamSessionUrl=function(){var e=this.config.baseUrl+"pkmslogout";return this.config.stubsEnabled&&(e=this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/json/logoff"),e},e.prototype.getIsamUserSessionUrl=function(){var e=this.config.baseUrl+"mbl/api/unauth/v1/users/initialize";return this.config.stubsEnabled&&(e=this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/json/initUser"),e},e.prototype.getIsamUpdateStepUpChallengeUrl=function(e){var t=this.config.baseUrl+"mbl/api/auth/v1/users/stepup/challenge/EXTERNAL_SECOND_AUTH/auth_token";return this.config.stubsEnabled&&(t=this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/json/updateStepUp"),t},e.prototype.getMessagesUrl=function(){var e=this.config.baseUrl+this._window.KeyCommonTkt.getBrandSpecificResourcePath("content")+"amt/contents/json/appMessagesAndLabels.json";return this.config.stubsEnabled&&(e=this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/sdl/appMessagesAndLabels.json"),e},e.prototype.getSettingsUrl=function(){var e=this.config.baseUrl+this._window.KeyCommonTkt.getBrandSpecificResourcePath("content")+"amt/settings/appSettings.json";return this.config.stubsEnabled&&(e=this.config.baseUrl+"ibxolb/amt-tkt/amt-mocks/sdl/appSettings.json"),e},e.prototype.getDeviceRegisterUrl=function(){var e;return e=this.config.baseUrl+"mbl/api/auth/v1/devices/register/mobile/",this.config.stubsEnabled&&(e=this.config.baseUrl+"registerBrowserDevice"),e},e.prototype.postRegisterBiometricUrl=function(){var e=this.config.baseUrl+"mbl/api/auth/v1/devices/register/fingerprint";return this.config.stubsEnabled&&(e=this.config.baseUrl+"fingerPrint"),e},e.prototype.postValidateBiometricUrl=function(){var e=this.config.baseUrl+"mbl/api/unauth/v1/users/login/fingerprint";return this.config.stubsEnabled&&(e=this.config.baseUrl+"fingerPrint"),e},e.prototype.postRegisterPinUrl=function(){var e=this.config.baseUrl+"mbl/api/auth/v1/devices/register/pin";return this.config.stubsEnabled&&(e=this.config.baseUrl+"pin"),e},e.prototype.postValidatePinUrl=function(){var e=this.config.baseUrl+"mbl/api/unauth/v1/users/login/pin";return this.config.stubsEnabled&&(e=this.config.baseUrl+"pin"),e},e}(),AmtAuthMgmtService=function(){function e(e,t){this._window=window,this.initialized=!1,this.appVersion="null",this.httpClient=e,this.logger=t.getInstance("AmtAuthMgmtService")}return e.prototype.initialize=function(e,t,i){this.amtService=t,this.config=e,this.apiSettings=i},e.prototype.registerBindId=function(e,t,i){return void 0===t&&(t="bindid"),void 0===i&&(i="profile"),this.logger.log("Register authenticator BindID"),"WEB"===this.config.channel?this.amtService.invokePolicy("BindID_Registration",e,{authenticatorType:t,origin:i}):(this.logger.log("Nothing to be done for Mobile user"),this.getNoopFailurePromise({code:"0",description:"Channel not supported"}))},e.prototype.removeBindId=function(e){return"WEB"===this.config.channel?this.amtService.invokePolicy("BindID_Deregistration",e,{authenticatorType:"bindid"}):(this.logger.log("nothing to do for BindId in mobile"),this.getNoopFailurePromise({code:"0",description:"BindID not available for mobile channel"}))},e.prototype.getFidoDeviceId=function(){var e=(this._window.KeyDecTkt.oosGroups||[]).concat(this._window.KeyDecTkt.groups||[]);return[e.find(function(e){return e.includes("OS_")&&!e.includes("VERSION")}),e.find(function(e){return e.includes("BROWSER_")&&!e.includes("VERSON")})].join("|")},e.prototype.registerBiometric=function(e,t,i,n){return void 0===n&&(n="default"),this.logger.log("biometric type - ",t),this.amtService.invokePolicy(AMT_CONSTANT.POLICY_AUTHENTICATOR_REGISTRATION,i,{userId:e,authenticatorType:t,action:"register",ibx_web_fido2:this.getFidoDeviceId(),origin:n})},e.prototype.removeBiometric=function(e,t){return this.logger.log("Biometric - De-Register "),this.amtService.invokePolicy(AMT_CONSTANT.POLICY_AUTHENTICATOR_REMOVE_REGISTRATION,t,{authenticatorType:e})},e.prototype.registerPin=function(e,t,i,n){return this.logger.log("Pin - ",i,n),"WEB"===this.config.channel?(this.logger.log("Nothing to be done for web user"),this.getNoopFailurePromise({code:"0",description:"error"})):n?this.amtService.invokePolicy(AMT_CONSTANT.POLICY_AUTHENTICATOR_REGISTRATION,t,{userId:e,authenticatorType:AMT_CONSTANT.POLICY_PIN_CENTRALIZE,action:AMT_CONSTANT.PIN_RE_REGISTER,deviceSerialToken:this._window.KeyPlatformTkt.cordovaService.deviceSerialToken}):this.amtService.invokePolicy(AMT_CONSTANT.POLICY_AUTHENTICATOR_REGISTRATION,t,{userId:e,authenticatorType:AMT_CONSTANT.POLICY_PIN_CENTRALIZE,action:AMT_CONSTANT.PIN_REGISTER})},e.prototype.removePin=function(){return this.logger.log("Pin - De-Register "),"WEB"===this.config.channel?(this.logger.log("Nothing to be done here"),this.getNoopFailurePromise({code:"0",description:"Not defined for web channel"})):this.amtService.invokePolicy(AMT_CONSTANT.POLICY_AUTHENTICATOR_REMOVE_REGISTRATION,"",{authenticatorType:AMT_CONSTANT.POLICY_PIN_CENTRALIZE})},e.prototype.getNoopFailurePromise=function(e){return new Promise(function(t,i){i(e)})},e.prototype.getNoopSuccessPromise=function(e){return new Promise(function(t,i){t(e)})},e}(),AmtConfig=function(){function e(){}return e.setConfig=function(t,i){e.channel=t.channel,e.baseUrl=t.baseUrl,e.isCsrMode=t.isCsrMode,e.logsEnabled=t.logsEnabled,e.stubsEnabled=t.stubsEnabled,e.nextGenSecurityEnabled=t.nextGenSecurityEnabled,e.behavioralAnalyticsEnabled=t.behavioralAnalyticsEnabled,e.capabilities=t.appCapabilities?t.appCapabilities:{}},e.channel="WEB",e.isCsrMode=!1,e.capabilities={},e.contentVariables={},e.logsEnabled=!1,e.stubsEnabled=!1,e.nextGenSecurityEnabled=!1,e.behavioralAnalyticsEnabled=!1,e.defaultHttpCallTimeout=2e4,e}(),AMT_CONSTANT=function(){function e(){}return e.STORAGE_KEY_TEMP_LOGIN_USERID="_amtTuid",e.STORAGE_KEY_AUTH_TOKEN="_amtAtn",e.STORAGE_KEY_PLACEHOLDER_HASH="_amtPsh",e.STORAGE_KEY_SESSION_ID="_amtSid",e.STORAGE_KEY_TNT_SESSION_ID="_amtTid",e.STORAGE_KEY_MIGRATION_STATUS="_amtMst",e.STEPUP_AUTH_SUCCESS="stepUpAuthSuccess",e.STEPUP_INIT_FAILURE="stepUpInitFailure",e.STEPUP_AUTH_FAILURE="stepUpAuthFailure",e.STEPUP_NOT_REQUIRED="stepUpNotRequired",e.STEPUP_ABORTED="stepUpAborted",e.STEPUP_LOCKED="stepUpLocked",e.STEPUP_STATUS_LOCKED=421,e.STEPUP_STATUS_UNLOCK=406,e.STEPUP_INVALID_CODE=401,e.STEPUP_BLOCKED_CODE=321,e.STEPUP_STATUS_DO_NOTHING=0,e.OPERATION_LOGIN_BY_PASSWORD="users.login.password",e.STEPUP_UNKNOWN_ERROR="UNKNOWN_ERROR",e.STEPUP_ABORT="ABORT",e.STEUP_AUTH_FAILURE="AUTH_FAILURE",e.STORAGE_KEY_ISAUTHENTICATED="_k_iat",e.STORAGE_KEY_DEVICE_SECRET="_k_dsc",e.STORAGE_KEY_DEVICE_SERIAL_TOKEN="_k_dst",e.STORAGE_KEY_BINDID_ENABLED="_k_bie",e.STORAGE_KEY_BIOMETRIC_ENABLED="_k_ite",e.STORAGE_KEY_LOGIN_MODE="_k_mlm",e.LOGIN_BY_PASSWORD="byPassword",e.LOGIN_BY_PIN="byPin",e.LOGIN_BY_BIOMETRICID="byBiometricId",e.BIOMETRIC_ID_CANCELLED_BY_USER="Canceled by user.",e.BIOMETRIC_ID_USER_RETRY_LIMIT_EXCEEDED="Application retry limit exceeded.",e.BIOMETRIC_ID_BIOMETRY_LOCKOUT="Biometry is locked out.",e.BIOMETRIC_ID_HASH_CHANGED="Biometry Hash changed.",e.BIOMETRIC_ID_UNREGISTERED_DUE_TO_HASH_CHANGE="Biometry Unregistered due to hash change.",e.POLICY_LOGIN="Login",e.POLICY_FORGOT_PASSWORD="Forgot_Password",e.POLICY_USER_SELF_UNLOCK="UserSelfUnlock",e.POLICY_RETRIEVE_USERID="RetrieveUserId",e.POLICY_AUTHENTICATOR_REGISTRATION="AuthenticatorRegistration",e.POLICY_AUTHENTICATOR_REMOVE_REGISTRATION="AuthenticatorDeregistration",e.POLICY_PIN_CENTRALIZE="pin_centralized",e.PIN_REGISTER="register",e.PIN_RE_REGISTER="re-register",e.STORAGE_KEY_TC="_k_tc",e.STORAGE_KEY_LOG_OUT_COMPLETE="_k_loc",e.COOKIES_IGNORE_LIST=["_k_cty","_k_cst","IB2M","PIB2M","_k_ite","_k_bdi","_k_bie","_k_irm","_k_rmu","_k_abn","ipi","ib2Zip","_k_kis","_k_cty","_k_cst","_k_abt","k_abt_qv_login","k_abt_pv_login","k_abt_pr_login","backendDataInSessionFlag","kampyleUserSessionsCount","DECLINED_DATE","SUBMITTED_DATE","kampyleUserSession","kampyleSessionPageCounter","kampyleInvitePresented","kampylePageLoadedTimestamp","kampyleUserPercentile","LAST_INVITATION_VIEW","kampyle_userid","_k_bal"],e}(),ContentService=function(){function e(e,t,i){this.apiSettings=i,this._window=window,this.httpClient=e,this.logger=t.getInstance("ContentService")}return e.prototype.getAppMessagesAndLabels=function(){var e=this;return new Promise(function(t,i){void 0!==e.appMessagesAndLabels?t(e.appMessagesAndLabels):(e.logger.log("call message and labels"),e.httpClient.get(e.apiSettings.getMessagesUrl()).then(function(i){e.logger.log("server side target groups response",i),e.appMessagesAndLabels=i.data.appMessagesAndLabels,t(e.appMessagesAndLabels)}).catch(function(t){e.logger.error(t),i(t)}))})},e.prototype.getAppSettings=function(){var e=this;return new Promise(function(t,i){void 0!==e.appSettings?t(e.appSettings):(e.logger.log("call message and labels"),e.httpClient.get(e.apiSettings.getMessagesUrl()).then(function(i){e.logger.log("server side target groups response",i),e.appSettings=i.data,t(e.appSettings)}).catch(function(t){e.logger.error(t),i(t)}))})},e.prototype.getUpdatedMessagesAndLabels=function(e){var t=__assign({},this.appMessagesAndLabels);if(!e)return t;for(var i in this.logger.log("content variables found",t),t)for(var n in e)t[i]=t[i].replace(new RegExp("{"+n+"}","g"),e[n]);return t},e}(),AmtDeviceService=function(){function e(e,t){this._window=window,this.httpClient=e,this.logger=t.getInstance("AmtDeviceService")}return e.prototype.initialize=function(e,t,i){this.amtService=t,this.config=e,this.apiSettings=i},e.prototype.registerDevice=function(){var e=this;return this.logger.log("call device registration"),new Promise(function(t,i){e.httpClient.get(e.apiSettings.getDeviceRegisterUrl(),{deviceDataRequired:!0,appMonDataRequired:!0,appIdDataRequired:!0}).then(function(i){e._window.KeyPlatformTkt.storageService.put(AMT_CONSTANT.STORAGE_KEY_DEVICE_SERIAL_TOKEN,i.data.deviceSerialToken,!1),e._window.KeyPlatformTkt.cordovaService.deviceSerialToken=i.data.deviceSerialToken,t()},function(e){t()})})},e.prototype.unregisterDevice=function(){var e=AMT_CONSTANT.STORAGE_KEY_DEVICE_SECRET+","+AMT_CONSTANT.STORAGE_KEY_DEVICE_SERIAL_TOKEN;this.logger.log("to be deleted keys",e),this._window.KeyPlatformTkt.storageService.delete(e),this._window.KeyPlatformTkt.cordovaService.deviceSerialToken=""},e.prototype.registerBorwser=function(){},e.prototype.setAuthProfileSettings=function(e,t){var i=e.eligibleAuthList,n=e.registeredAuthList;if(t&&t.length>0&&i&&i.length>0){var o={uid:t,eligAuthList:i};return n&&n.length>0&&(o={uid:t,eligAuthList:i,regAuthList:n}),window.sessionStorage.setItem("profile",JSON.stringify(o)),this.enableAuthenticatorsAtLoginIfRegistered(n,t),!0}return!1},e.prototype.enableAuthenticatorsAtLoginIfRegistered=function(e,t){function i(e,t){var i=void 0;return e&&Array.isArray(e)&&(i=e.find(function(e){return e.toLowerCase().startsWith(t)})),!!i}i(e,"bindid")&&this._window.KeyPlatformTkt.storageService.setCookie(AMT_CONSTANT.STORAGE_KEY_BINDID_ENABLED,t,25,!1,!0),i(e,"fido")&&this._window.KeyPlatformTkt.storageService.setCookie(AMT_CONSTANT.STORAGE_KEY_BIOMETRIC_ENABLED,t,25,!1,!0)},e.prototype.updateAuthProfile=function(e,t){if(-1!==["BindID_Registration","BindID_Deregistration","AuthenticatorRegistration","AuthenticatorDeregistration"].indexOf(t)){var i=this.getAuthProfile().eligAuthList,n=this.getAuthProfile().uid,o=e.registeredAuthList,s={};if(o)return s={uid:n,eligAuthList:i,regAuthList:o},window.sessionStorage.setItem("profile",JSON.stringify(s)),!0}return!1},e.prototype.getAuthProfile=function(){var e=window.sessionStorage.getItem("profile");return e?JSON.parse(e):e},e.prototype.clearAuthProfile=function(){window.sessionStorage.removeItem("profile")},e.prototype.getBrowserData=function(){if(navigator){var e=navigator.appVersion,t=navigator.userAgent,i=navigator.appName,n=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10),s=void 0,r=void 0,a=void 0;-1!=(r=t.indexOf("Opera"))?(i="Opera",n=t.substring(r+6),-1!=(r=t.indexOf("Version"))&&(n=t.substring(r+8))):-1!=(r=t.indexOf("OPR"))?(i="Opera",n=t.substring(r+4)):-1!=(r=t.indexOf("Edge"))?(i="Microsoft Edge",n=t.substring(r+5)):-1!=(r=t.indexOf("MSIE"))?(i="Microsoft Internet Explorer",n=t.substring(r+5)):-1!=(r=t.indexOf("Chrome"))?(i="Chrome",n=t.substring(r+7)):-1!=(r=t.indexOf("Safari"))?(i="Safari",n=t.substring(r+7),-1!=(r=t.indexOf("Version"))&&(n=t.substring(r+8))):-1!=(r=t.indexOf("Firefox"))?(i="Firefox",n=t.substring(r+8)):-1!=t.indexOf("Trident/")?(i="Microsoft Internet Explorer",n=t.substring(t.indexOf("rv:")+3)):(s=t.lastIndexOf(" ")+1)<(r=t.lastIndexOf("/"))&&(i=t.substring(s,r),n=t.substring(r+1),i.toLowerCase()==i.toUpperCase()&&(i=navigator.appName)),-1!=(a=n.indexOf(";"))&&(n=n.substring(0,a)),-1!=(a=n.indexOf(" "))&&(n=n.substring(0,a)),-1!=(a=n.indexOf(")"))&&(n=n.substring(0,a)),o=parseInt(""+n,10),isNaN(o)&&(n=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10));var c="-",l=[{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}];for(var d in l){var u=l[d];if(u.r.test(t)){c=u.s;break}}var g=void 0;switch(/Windows/.test(c)&&(g=/Windows (.*)/.exec(c)[1],c="Windows"),c){case"Mac OS X":g=/Mac OS X (\d[\.\_\d]+)/.exec(t)[1];break;case"Android":g=/Android ([\.\_\d]+)/.exec(t)[1];break;case"iOS":g=(g=/OS (\d+)_(\d+)_?(\d+)?/.exec(e))[1]+"."+g[2]+"."+(0|g[3])}var h="";navigator.userAgent.indexOf("WebKit")>-1?h="WebKit":navigator.userAgent.indexOf("Gecko")>-1?h="Gecko":navigator.userAgent.indexOf("Trident")>-1&&(h="Trident");var p=[],f=navigator.plugins;if(f)for(var m=0;m<=f.length-1;m++)p.push(f[m].name);var S="Computer";navigator.userAgent.indexOf("Mobile")>-1&&(S="Mobile");var _=(new Date).toString().replace(/.*[(](.*)[)].*/,"$1"),v={};return v.timeZone=_,v.userAgentOS=c+" "+g,v.userAgentFamily=i,v.userAgentPlatform=navigator.platform,v.userAgentWebBrowser=i+" "+n,v.userAgentWebEngine=h,v.javascriptOperatingSystem=c,v.webPlugins=p,v.clientScreenResolution=window.innerWidth+" x "+window.innerHeight,v.webDeviceType=S,v.webLocalDateTime=new Date,v.cookieEnabled=navigator.cookieEnabled,v.browserAcceptedLanguages=navigator.languages,this.logger.log("deviceInfo - ",v),v}},e.createCookie=function(t,i,n,o){if(void 0===n&&(n=36e5),void 0===o&&(o=!0),!o||e.isCookieSupported()){var s=new Date;s.setTime(s.getTime()+24*n*60*60*1e3);var r=0!=n?"expires="+s.toUTCString():"";document.cookie=t+"="+i+"; "+r+"; path=/"}else window.sessionStorage.setItem(t,i)},e.getCookie=function(t,i){if(void 0===i&&(i=!0),i&&!e.isCookieSupported())return window.sessionStorage.getItem(t);for(var n=t+"=",o=document.cookie.split(";"),s=0;s<o.length;s++){for(var r=o[s];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(n))return r.substring(n.length,r.length)}return""},e.isCookieSupported=function(){return void 0!==e.cookieEnabled?e.cookieEnabled:(document.cookie="_k_ctest=true",e.cookieEnabled="true"==e.getCookie("_k_ctest",!1),console.log("Amt cookit support check",e.cookieEnabled),e.cookieEnabled)},e}(),IdvService=function(){function e(e){this._window=window,this.logger=e.getInstance("IdvService")}return e.prototype.initialize=function(e){this.config=e},e.prototype.authenticateUsingIdv=function(e,t,i,n){var o=this,s={uiContainer:this._window.$("#"+i)};return console.log(n),"WEB"===this.config.channel?new Promise(function(i,r){o._window.amtWebSdk.authenticateUsingIdv(e,t,n,s,function(e){o.logger.log("IDV successful",e),i(e)},function(e){o.logger.log("IDV failure",e),r(e)})}):new Promise(function(e,t){t({code:"0",description:"IDV valid only for WEB channel"})})},e}(),Loader=function(){function e(){this._window=window}return e.prototype.init=function(){this.loaderElement||(this.loaderElement=document.createElement("div"),this.loaderElement.innerHTML=this.getLoaderContent())},e.prototype.getLoaderContent=function(){return'\n        <style>\n        .cool-loader-container {\n            position: fixed;\n            left: 0;\n            right: 0;\n            margin: auto;\n            top: 40%;\n            z-index: 9999;\n            display: block\n        }\n        .cool-loader-container .spinner-large {\n            margin: 0 auto;\n            display: block;\n            -webkit-animation: 8s linear infinite svg-rotate-lg;\n            animation: 8s linear infinite svg-rotate-lg\n        }\n        .cool-loader-container .spinner-large-circle {\n            fill: transparent;\n            stroke-width: 4;\n            stroke-linecap: round;\n            stroke-dasharray: 0,144.51326207;\n            -webkit-animation: 2s linear infinite stroke-dash-lg,2s linear infinite stroke-width-lg,8s steps(4) infinite stroke-color-lg;\n            animation: 2s linear infinite stroke-dash-lg,2s linear infinite stroke-width-lg,8s steps(4) infinite stroke-color-lg\n        }\n        @-webkit-keyframes svg-rotate-lg {\n            to {\n                transform: rotate(360deg)\n            }\n        }\n        @keyframes svg-rotate-lg {\n            to {\n                transform: rotate(360deg)\n            }\n        }\n        @-webkit-keyframes stroke-width-lg {\n            0%,100% {\n                stroke-width: 0\n            }\n        \n            45%,55% {\n                stroke-width: 2\n            }\n        \n            50% {\n                stroke-width: 4\n            }\n        }\n        @keyframes stroke-width-lg {\n            0%,100% {\n                stroke-width: 0\n            }\n        \n            45%,55% {\n                stroke-width: 2\n            }\n        \n            50% {\n                stroke-width: 4\n            }\n        }\n        \n        @-webkit-keyframes stroke-dash-lg {\n            0% {\n                stroke-dasharray: 0,144.51326207;\n                stroke-dashoffset: 0\n            }\n            50% {\n                stroke-dasharray: 144.51326207,0;\n                stroke-dashoffset: 0\n            }\n            100% {\n                stroke-dasharray: 144.51326207,144.51326207;\n                stroke-dashoffset: -144.51326207\n            }\n        }\n        \n        @keyframes stroke-dash-lg {\n            0% {\n                stroke-dasharray: 0,144.51326207;\n                stroke-dashoffset: 0\n            }\n        \n            50% {\n                stroke-dasharray: 144.51326207,0;\n                stroke-dashoffset: 0\n            }\n        \n            100% {\n                stroke-dasharray: 144.51326207,144.51326207;\n                stroke-dashoffset: -144.51326207\n            }\n        }\n        \n        @-webkit-keyframes stroke-color-lg {\n            from {\n                stroke: $kds-brand-primary;\n            }\n        \n            to {\n                stroke: $kds-brand-primary;\n            }\n        }\n        \n        @keyframes stroke-color-lg {\n            from {\n                stroke: $kds-brand-primary;\n            }\n        \n            to {\n                stroke: $kds-brand-primary;\n            }\n        }\n        \n        .loading-overlay {\n            background-color: rgba(0,0,0,0);\n            z-index: 9999;\n            position: absolute;\n            left: 0;\n            top: 0;\n            width: 100%;\n            height: 100%\n            display: block\n        }\n        </style>\n        <div class="loading-overlay"></div>\t\t \t\n        <div class="cool-loader-container">\n                <svg class="spinner-large" width=56 height=56>\n                    <circle class="spinner-large-circle" cx=28 cy=28 r=25 />\n                </svg>\n        </div>\n      '},e.prototype.showLoaderInThisContainer=function(e){e&&(e.html=this.getLoaderContent())},e.prototype.hideLoaderInThisContainer=function(e){e&&(e.html="")},e.prototype.show=function(){document.getElementsByTagName("body")[0].appendChild(this.loaderElement)},e.prototype.hide=function(){var e=document.getElementsByTagName("body")[0];e.contains(this.loaderElement)&&e.removeChild(this.loaderElement)},e}(),UuidService=function(){function e(){}return e.prototype.getChannelSessionId=function(){if(void 0!==this.uuid&&""!=this.uuid)return this.uuid;for(var e=[],t=0;t<36;t++)e[t]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]="0123456789abcdef".substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",this.uuid=e.join(""),this.uuid},e.prototype.resetSessionId=function(){this.uuid=""},e.prototype.digestMessage=function(e){return __awaiter(this,void 0,void 0,function(){var t,i,n;return __generator(this,function(o){switch(o.label){case 0:return t=(new TextEncoder).encode(e),[4,crypto.subtle.digest("SHA-256",t)];case 1:return i=o.sent(),n=Array.from(new Uint8Array(i)),[2,n.map(function(e){return e.toString(16).padStart(2,"0")}).join("")]}})})},e}(),SessionService=function(){function e(e){this._window=window,this.logger=e.getInstance("sessionManager"),this.sessionCreator=new SessionCreationService(e),this.sessionCleaning=new SessionCleaningService(e)}return e.prototype.initSession=function(e,t,i){return this.sessionCreator.initSession(e,t,i)},e.prototype.continueSession=function(){return this.sessionCreator.continueSession()},e.prototype.endSession=function(){return this.sessionCleaning.killAllCookies(),this._window.KeyCommonTkt.chatService.killChat(),this.sessionCreator.endSession()},e.prototype.endSessionMonitoring=function(){this.sessionCreator.endSessionMonitoring()},e.prototype.initiateKeepAlive=function(){this.sessionCreator.initiateKeepAlive()},e.prototype.isSessionMonitorStarted=function(){return this.sessionCreator.isSessionMonitorStarted()},e.prototype.clearSessionAndLogout=function(e){return this.sessionCleaning.clearSessionData(e)},e.prototype.storeSessionStartTime=function(){this.sessionCreator.storeSessionStartTime()},e}(),Main=function(){function e(){this._window=window}return e.prototype.prep=function(){var e=this,t={initialize:function(t,i){return void 0===i&&(i=!1),e.amtService.initialize(t,i)},authenticate:function(t,i,n,o,s){return e.amtService.authenticate(t,i,n,o)},invokeUnauthPolicy:function(t,i,n,o){return e.amtService.invokeUnauthPolicy(t,i,n,o)},recoverPassword:function(t,i,n){return e.amtService.recoverPassword(t,i,n)},userSelfUnlock:function(t,i,n){return e.amtService.userSelfUnlock(t,i,n)},retrieveUserId:function(t,i){return e.amtService.retrieveUserId(t,i)},isUserBoundWithThisDevice:function(t){return e.amtService.isUserBoundWithThisDevice(t)},initiateUserSession:function(t,i){e.amtService.initiateUserSession(t,i)},onUserSessionEnd:function(){return e.amtService.onUserSessionEnd()},onUserSessionContinue:function(){return e.amtService.onUserSessionContinue()},createISAMUserSession:function(t){return e.amtService.createISAMUserSession(t)},updateISAMStepUpChallenge:function(t){return e.amtService.updateISAMStepUpChallenge(t)},keepSessionAlive:function(){return e.amtService.keepSessionAlive()},invokePolicy:function(t,i,n){return void 0===n&&(n={}),e.amtService.invokePolicy(t,i,n)},invokeAnonymousPolicy:function(t,i,n){return void 0===n&&(n={}),e.amtService.invokeAnonymousPolicy(t,i,n)},stepUp:function(t){return e.amtService.stepUp(t)},onStepUpSuccess:function(t){return e.amtService.onStepUpSuccess(t)},onStepUpFailure:function(t){return e.amtService.onStepUpFailure(t)},logout:function(){return e.amtService.logout()},setContentVariables:function(t,i){return void 0===i&&(i=!1),e.amtService.setContentVariables(t,i)},setMigratedStatus:function(t){e.amtService.setMigratedStatus(t)},getMigratedStatus:function(){return e.amtService.getMigratedStatus()},isMigratedUser:function(){return e.amtService.isMigratedUser()},getAuthToken:function(){return e.amtService.getAuthToken()},getTempLoginUserId:function(){return e.amtService.getTempLoginUserId()},getSecPlaholderHash:function(){return e.amtService.getSecPlaholderHash()},getSessionId:function(){return e.amtService.getSessionId()},resetSessionId:function(){e.amtService.resetSessionId()},authenticateUsingBiometric:function(t,i,n){return e.amtService.authenticateUsingBiometric(t,i,n)},authenticateUsingPin:function(t,i,n){return e.amtService.authenticateUsingPin(t,i,n)},authenticateUsingIdv:function(t,i,n,o){return e.amtService.idvService.authenticateUsingIdv(t,i,n,o)},authenticateUsingBindId:function(t,i,n){return e.amtService.authenticateUsingBindId(t,i,n)},resetMobile:function(){return e.amtService.resetMobile()},removeBoundUser:function(t){return e.amtService.removeBoundUser(t)},registerBindId:function(t,i,n){return void 0===i&&(i="bindid"),void 0===n&&(n="profile"),e.amtService.authMgmtService.registerBindId(t,i,n)},removeBindId:function(t){return e.amtService.authMgmtService.removeBindId(t)},getFidoDeviceId:function(){return e.amtService.authMgmtService.getFidoDeviceId()},registerBiometric:function(t,i,n,o){return void 0===o&&(o="default"),e.amtService.authMgmtService.registerBiometric(t,i,n,o)},removeBiometric:function(t,i){return e.amtService.authMgmtService.removeBiometric(t,i)},registerPin:function(t,i,n,o){return e.amtService.authMgmtService.registerPin(t,i,n,o)},removePin:function(){return e.amtService.authMgmtService.removePin()},registerDevice:function(){return e.amtService.deviceService.registerDevice()},unregisterDevice:function(){return e.amtService.deviceService.unregisterDevice()},viewLogFile:function(t){return e.amtService.viewLogFile(t)},setBehavioralData:function(t){e.amtService.setBehavioralData(t)},stopBehavioralData:function(){e.amtService.stopBehavioralData()},getAuthProfile:function(){return e.amtService.getAuthProfile()},logoutAndClearSession:function(t){return e.amtService.sessionLogout(t)},cancelAmtOperation:function(t){return e.amtService.cancelAmtOperation(t)}};this.amtService=new AmtService,this._window.KeyAmtTkt=t},e}(),_main=new Main;_main.prep();var SessionCleaningService=function(){function e(e){this._window=window,this.logger=e.getInstance("sessionCleaning")}return e.prototype.clearSessionData=function(e){var t=this;return new Promise(function(i){t._window.KeyCommonTkt.tracer.getInstance("kmb-session").recordUserLogOff();try{t.killAllCookies(),t._window.KeyCoreTkt.eraseAppCacheData(e),i("success")}catch(e){i("success")}})},e.prototype.killAllCookies=function(){for(var e=document.cookie.split(";"),t=AMT_CONSTANT.COOKIES_IGNORE_LIST,i=0;i<e.length;i++){var n=e[i].split("="),o=!1,s=void 0;for(s=0;s<t.length;s++)n[0]&&n[0].indexOf(t[s])>-1&&(o=!0);o||this.deleteCookie(n[0])}},e.prototype.deleteCookie=function(e){var t=new Date;t.setDate(t.getDate()-1);var i=";expires="+t,n=e;document.cookie=n+"="+i+"; path=/"},e}(),SessionCreationService=function(){function e(e){this._window=window,this.timeInterval=1e3,this.triggerKeepAliveCheckTimeInterval=6e5,this.sessionMonitoringInitiated=!1,this.storageKeySessionExtCount="_k_sec",this.logger=e.getInstance("ContentService")}return e.prototype.isSessionMonitorStarted=function(){return this.sessionMonitoringInitiated},e.prototype.initSession=function(e,t,i){this.logger.log("In session monitoring service initSession");try{this.keepAliveFn=t,this.endSessionFn=i,this.config={amtConfig:e,sessionConfig:e.sessionConfig},this.checkBrowserInActivityHandler=this.checkBrowserInActivityTime.bind(this),this.keepSessionAliveHandler=this.initiateKeepAlive.bind(this),this.globalEventKeepSessionAliveHandler=this.initiateKeepAliveOnGloablEvents.bind(this),this.startTrackAppInActivityTimeHandler=this.startTrackAppInActivityTime.bind(this),this.stopTrackAppInActivityTimeHandler=this.stopTrackAppInActivityTime.bind(this),this.initiateNewUserSession(),this.sessionMonitoringInitiated=!0}catch(e){this.logger.log("In session monitoring service initSession error ",e)}},e.prototype.initiateNewUserSession=function(){this.logger.log("Initializing new user session in monitoring service"),this.keepAliveRequest=!0,this.lastUserActionTime=new Date,this.initiateSystemIdleTrackerAndGlobalEvents(),this.startTimer(),this.handleKeepAlive()},e.prototype.initiateSystemIdleTrackerAndGlobalEvents=function(){this.logger.log("Ststen idle tracker initiated"),this.destroySystemIdleTrackerAndGlobalEvents(),"WEB"===this.config.amtConfig.channel&&(this._window.addEventListener("click",this.checkBrowserInActivityHandler,!0),this._window.addEventListener("touchstart",this.checkBrowserInActivityHandler,!0),this._window.addEventListener("focus",this.checkBrowserInActivityHandler,!0),this._window.addEventListener("blur",this.checkBrowserInActivityHandler,!0),this._window.addEventListener("visibilitychange",this.checkBrowserInActivityHandler,!0),document.querySelector("button").addEventListener("click",this.keepSessionAliveHandler,!0)),"MOBILE"===this.config.amtConfig.channel&&(this._window.addEventListener("touchstart",this.checkBrowserInActivityHandler,!0),this._window.addEventListener("click",this.globalEventKeepSessionAliveHandler,!0),document.addEventListener("pause",this.startTrackAppInActivityTimeHandler,!0),document.addEventListener("resume",this.stopTrackAppInActivityTimeHandler,!0))},e.prototype.checkBrowserInActivityTime=function(e){this.logger.log("User action - check browser inactivity session alive.. triggered by event:",e);var t=new Date;this.logger.log("current time",t),this.logger.log("lastUserActionTime time",this.lastUserActionTime),this.logger.log("user idle time",t-this.lastUserActionTime),t-this.lastUserActionTime>=this.config.sessionConfig.timeoutInterval&&this.endSessionFn()},e.prototype.startTrackAppInActivityTime=function(){this.logger.log("App going background sleep mode"),this.idleStageBeginTime=new Date},e.prototype.stopTrackAppInActivityTime=function(){this.logger.log("App wakes up");var e=new Date;this.logger.log("idleStageBeginTime",this.idleStageBeginTime),this.logger.log("idleStageEndTime",e),this.logger.log("total Idle time",e-this.idleStageBeginTime),this.logger.log("allowed time",this.config.sessionConfig.backgroundIdleTimeInterval),this.idleStageBeginTime&&e-this.idleStageBeginTime>=this.config.sessionConfig.backgroundIdleTimeInterval?(this.logger.log("App slept for more than 3 mins and hence log off"),this.endSessionFn()):(this.logger.log("idle time monitoring is reset because app wakes up with in allowed interval"),this.idleStageBeginTime=void 0)},e.prototype.initiateKeepAliveOnGloablEvents=function(e){e&&e.target&&("A"===e.target.nodeName||"BUTTON"===e.target.nodeName)&&this.initiateKeepAlive()},e.prototype.initiateKeepAlive=function(){this.logger.log("new keep session alive requested"),this.timeoutBannerDisplayed||(this.keepAliveRequest=!0,this.startTimer())},e.prototype.handleKeepAlive=function(){this.cancelKeepAliveCheck(),this.keepAliveCounter()},e.prototype.keepAliveCounter=function(){var e=this;this.sessionAliveCheck=setTimeout(function(){e.keepAliveFn(),console.log("keepAlive policy execution .. "),e.keepAliveCounter(),e.lastUserActionTime=new Date},this.triggerKeepAliveCheckTimeInterval)},e.prototype.storeSessionStartTime=function(){var e=Math.round(Date.now()/1e3);localStorage.setItem("_k_sst",e.toString())},e.prototype.startTimer=function(){var e=this;this.logger.log("In startTimer"),this.sessionTimer&&clearTimeout(this.sessionTimer);var t=new Date;this.lastUserActionTime=t,this.logger.log("restart the time check at ",this.lastUserActionTime),this.storeSessionStartTime(),"MOBILE"===this.config.amtConfig.channel?this.sessionTimer=setTimeout(function(){e.logger.log("mobile session timeout triggered"),e.destroySystemIdleTrackerAndGlobalEvents(),e.logger.log("Logging out final session end"),e.endSessionFn()},this.config.sessionConfig.timeoutInterval):this.sessionTimer=setTimeout(function(){var t=Number(window.localStorage.getItem(e.storageKeySessionExtCount));if(e.logger.log("session timeout triggered",t),e.destroySystemIdleTrackerAndGlobalEvents(),t===e.config.sessionConfig.sessionExtensionCount)e.logger.log("Logging out final session end"),e.endSessionFn();else if(document.hidden)e.logger.log("Tab is inactive... so logging out final session end"),e.endSessionFn();else{e.logger.log("show expiry warning becuase tab is active");var i=new Date;e.logger.log("banner init trigger time",i),e.showSessionExpiryWarning()}},this.config.sessionConfig.timeoutInterval)},e.prototype.showSessionExpiryWarning=function(){if(this.logger.log("CSR mode",this.config.amtConfig.isCsrMode),!this.config.amtConfig.isCsrMode){var e=new Date;if(this.logger.log("current time",e),this.logger.log("lastUserActionTime",this.lastUserActionTime),this.logger.log("current time lastUserActionTime",e-this.lastUserActionTime),this.logger.log("timeoutInterval",this.config.sessionConfig.timeoutInterval),e-this.lastUserActionTime>this.config.sessionConfig.timeoutInterval)return this.logger.log("Idle time exceeded.. triggering end session"),void this.endSessionFn();this.logger.log("Banner display initiated"),this.timeoutBannerDisplayed=!0,this.timeoutContainer=this._window.$("#amtSessionBanner"),this.timeoutContainer.empty(),this._window.amtUiTimeoutBannerContainer=this.timeoutContainer,this._window.sendMessageToTimeoutHandler(JSON.stringify({session:"TIMEOUT_BANNER",message:{amtConfig:this._window.btoa(JSON.stringify(this.config.amtConfig)),counter:this.config.sessionConfig.countDownInterval},channel:"WEB"}))}},e.prototype.continueSession=function(){this.logger.log("session extened"),this.timeoutBannerDisplayed=!1,this.hideSessionExpiryWarning(),this.initiateNewUserSession(),this.extendSessionTimeout()},e.prototype.endSession=function(){this.timeoutBannerDisplayed=!1,this.logger.log("end session called"),this.endSessionMonitoring()},e.prototype.hideSessionExpiryWarning=function(){if(this.config){if(this.logger.log("CSR mode",this.config.amtConfig.isCsrMode),this.config.amtConfig.isCsrMode)return;this.logger.log("hides banner called",this.timeoutContainer),this.timeoutContainer&&this.timeoutContainer.empty(),clearTimeout(this.sessionTimer)}},e.prototype.cancelKeepAliveCheck=function(){this.sessionAliveCheck&&clearInterval(this.sessionAliveCheck)},e.prototype.destroySystemIdleTrackerAndGlobalEvents=function(){this.logger.log("In remove event listener"),this.config&&this.config.amtConfig&&"WEB"===this.config.amtConfig.channel&&(this._window.removeEventListener("click",this.checkBrowserInActivityHandler,!0),this._window.removeEventListener("touchstart",this.checkBrowserInActivityHandler,!0),this._window.removeEventListener("focus",this.checkBrowserInActivityHandler,!0),this._window.removeEventListener("blur",this.checkBrowserInActivityHandler,!0),document.querySelector("button").removeEventListener("click",this.keepSessionAliveHandler,!0)),this.config&&this.config.amtConfig&&"MOBILE"===this.config.amtConfig.channel&&(this._window.removeEventListener("touchstart",this.checkBrowserInActivityHandler,!0),this._window.removeEventListener("click",this.globalEventKeepSessionAliveHandler,!0),document.removeEventListener("pause",this.startTrackAppInActivityTimeHandler,!0),document.removeEventListener("resume",this.stopTrackAppInActivityTimeHandler,!0))},e.prototype.extendSessionTimeout=function(){var e=Number(window.localStorage.getItem(this.storageKeySessionExtCount));this.logger.log("extendSessionTimeout ",e),e&&null!==e?e++:e=1,window.localStorage.setItem(this.storageKeySessionExtCount,e+""),this.startTimer()},e.prototype.endSessionMonitoring=function(){window.localStorage.removeItem(this.storageKeySessionExtCount),this.destroySystemIdleTrackerAndGlobalEvents(),this.hideSessionExpiryWarning(),this.cancelKeepAliveCheck(),this.sessionMonitoringInitiated=!1},e}(),ValidationService=function(){function e(){this.validationResult={pwd1LengthValidationLbl:!1,pwd2MinOneNumberValidationLbl:!1,pwd3MinOnLetterValidationLbl:!1,pwd4SpecialCharLbl:!1,pwd5UserAndPasswordMatchLbl:!1,pwd6ConsecutiveCharMatchLbl:!1}}return e.prototype.validatePasswordRules=function(e,t){console.log("validation methood");var i=t.length>=8,n=/^(?=.*[0-9])+/g.test(t),o=/^(?=.*[a-zA-Z])+/g.test(t),s=/^[a-zA-Z0-9!@$%^&*]+$/.test(t),r=!/\s/g.test(t),a=s&&r,c=e.toUpperCase()!==t.toUpperCase(),l=t.length>3&&!/(.)\1\1/.test(t);return this.validationResult={pwd1LengthValidationLbl:i,pwd2MinOneNumberValidationLbl:n,pwd3MinOnLetterValidationLbl:o,pwd4SpecialCharLbl:a,pwd5UserAndPasswordMatchLbl:c,pwd6ConsecutiveCharMatchLbl:l},this.isPasswordCompliant()},e.prototype.isPasswordCompliant=function(){var e=!0;for(var t in this.validationResult)if(!this.validationResult[t]){e=!1;break}return e},e.prototype.resetPasswordValidation=function(){this.validationResult={pwd1LengthValidationLbl:!1,pwd2MinOneNumberValidationLbl:!1,pwd3MinOnLetterValidationLbl:!1,pwd4SpecialCharLbl:!1,pwd5UserAndPasswordMatchLbl:!1,pwd6ConsecutiveCharMatchLbl:!1}},e}();

Zerion Mini Shell 1.0