!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("../../../../common/v1/src")):"function"==typeof def&&def.amd?def("pcs-candidate-login-v1",["vue","../../../../common/v1/src"],t):((e=e||self).phw=e.phw||{},e.phw.PcsCandidateLoginV1=t(e.Vue,e.PcsCommon))}(this,function(h,r){"use strict";h=h&&h.hasOwnProperty("default")?h.default:h,r=r&&r.hasOwnProperty("default")?r.default:r;var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function e(e,t,i,o){var s,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;0<=r;r--)(s=e[r])&&(a=(n<3?s(a):3()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,D=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$/,b="signIn",x="signUp",T="resetPassword",L="signIn",V="forgotPassword",O="candidateProfileUpdated",M="ph:candidateLoggedinEvent",F="getUserProfileData",I="fyf_container",R="ph:bot:removeProfile",_="ph:site:removeProfile",q="apply",A="ph:hash:triggerCandidatePopup",H=27,U=9,j=13,K={upperCase:{regex:/(.*[A-Z].*)/,literal:"",hasError:!1},lowerCase:{regex:/(.*[a-z].*)/,literal:"",hasError:!1},numeric:{regex:/(.*\d.*)/,literal:"",hasError:!1},passwordLength:{regex:/(.{8,})/,literal:"",hasError:!1}},N=[{key:/</g,value:"<"},{key:/>/g,value:">"},{key:/&/g,value:"&"},{key:/©/g,value:"©"},{key:/®/g,value:"®"},{key:/“/g,value:"“"},{key:/”/g,value:"”"},{key:/‘/g,value:"‘"},{key:/’/g,value:"’"},{key:/'/g,value:"'"},{key:/"/g,value:'"'},{key:/'/g,value:"'"}],B="fyfSignInHeading",$="fyfSignUpHeading",J="applySignInHeading",W="applySignUpHeading",z="savedJobsSignUpHeading",Z="savedJobsSignInHeading",G="loginEmail",Q="loginPassword",X="pcs-candidate-login-v1";function Y(){this.constructor=E}function ee(){var e=null!==p&&p.apply(this,arguments)||this;return e.flowType="",e.widgetContext={},e.elementTag=X,e.bindableModel=new P,e.commonService=r.CommonService,e.localStorage=r.LocalStorage,e.phenomAppManager=r.PhenomAppManager,e.translationFilter=r.TranslationFilter,e.candidateLoginService=new l,e.initialFlowType="",e.isPasswordVisible=!1,e.staySignIn=!0,e.profileDetails={profile:{}},e.isLoggedIn=!1,e.isDialogOpen=!1,e.signInModel={email:"",password:""},e.hasErrors=!1,e.errors=new S,e.step=L,e.isValidEmail=!1,e.isValidPassword=!1,e.isDropdownOpen=!1,e.socialProvider="",e.invalidCredentials=!1,e.resendEmail=!1,e.resetPasswordModel={rpToken:"",newPassword:""},e.pwdRegexMap=K,e.isHeadingDisabled=!1,e.cvUploaded=!1,e.tokenInvalid=!1,e.anonymousEmail="",e.showPasswordSrOnly=!1,e.passwordErrorSrOnly=!1,e.isFirstTimeUser=!0,e.userState="",e.isProfileDataAvailable=!1,e.widgetContent=void 0,e.signInHeading="",e.signUpHeading="",e.isEventRaisedForTriggerHashPopup=!1,e.ignoreMulTriggerHashPopup=!1,e.signUpSuccessSr=!1,e.signInSuccessSr=!1,e.privacyDataConsent=!1,e.privacyConsentError=!1,e.privacyConsentReqFlag=!1,e.piiConsentData={},e.piiConsentError=!1,e.piiConsentContext={},e.showConsentsForm=!1,e.submitData=!1,e.masterLiteralData={},e.isDisabled=!1,e.consentPrefill=!0,e.socialLoginContext={},e.preferredName=!1,e.subscriptions=[],e.isEmailValidationEnabled=!1,e.isVerifiedUser=!1,e.isResendFailed=!1,e.isShowValidationSuccessPopup=!1,e.isShowValidationFailurePopup=!1,e.isShowEmailValidationPopup=!1,e.privacyConsentPreCheck=!1,e.tokenExpiryTimeInMinutes=240,e.tokenExpiryTimeText="",e}return{component:(p=r.BaseComponent,i(E=ee,C=p),E.prototype=null===C?Object.create(C):(Y.prototype=C.prototype,new Y),ee.prototype.widgetViewLoaded=function(){var i=this;this.element=this.$el,this.getPiiConsentData(),this.getMasterLiteralData(),this.userState=this.phenomAppManager.getSegmentedUserState&&this.phenomAppManager.getSegmentedUserState(),this.isPrivacyDataConsentCheckBoxRequired(),0==this.commonService.getSiteSettings("consentPrefill")&&(this.consentPrefill=!1),this.preferredName=this.commonService.getSiteSettings("preferredName");var t=window.location.hash;r.EventBus.$on(A,function(e){i.ignoreMulTriggerHashPopup=!0,setTimeout(function(){i.isEventRaisedForTriggerHashPopup&&!i.isLoggedIn&&("#profilelogin"===t?i.handleDialogModal(b):"#createprofile"===t&&i.handleDialogModal(x))},150)}),this.fetchValidateJwtToken().then(function(){i.getContextBasedHeading(),i.getStateBasedHeading(),i.widgetContext=i.widgetContext||{};var e=i.widgetContext.context;i.isLoggedIn||"header"!==e||i.isEventRaisedForTriggerHashPopup||i.ignoreMulTriggerHashPopup||(i.isEventRaisedForTriggerHashPopup=!0,r.EventBus.$emit(A,{}));var t=i.phenomAppManager.getSessionParams("validationStatus");t&&"200"===t?i.isShowValidationSuccessPopup=!0:!t||"401"!==t&&"400"!==t&&"500"!==t||(i.isShowValidationFailurePopup=!0),i.openEmailValidationStatusPopup(),(i.isShowValidationSuccessPopup||i.isShowValidationFailurePopup)&&i.candidateLoginService.makeDDORequest(n.v1.ddoKeyRemoveValidationDataFromSession,{}).then(function(e){})}),this.subscribeEvents(),this.flowType=this.flowType||x,this.initialFlowType=this.flowType,this.localStorage.getItem("_li")&&(this.isFirstTimeUser=!1),document.addEventListener("mouseup",this.handleDropdownOutsideScope,!0),document.addEventListener("keyup",this.handleDropdownOutsideScope,!0),this.initialFlowType==T&&this.checkValidToken(),(this.commonService.getSiteSettings("navItems")||{}).candidateHome||this.hideContainer(),this.updateTokenExpiry()},ee.prototype.openEmailValidationStatusPopup=function(){var s=this;(this.isShowValidationSuccessPopup||this.isShowValidationFailurePopup)&&setTimeout(function(){var e=s.element.querySelector(s.isLoggedIn?".ph-a11y-after-close-focus-elem":s.isFirstTimeUser?".create-account-link":".sign-in-link"),t=s.element.querySelector(s.isShowValidationSuccessPopup?".email-val-success .btn":".email-val-failure .btn"),i=s.element.querySelector(".popup-modal-backdrop");i&&i.classList.add("active");var o=s.element.querySelector(s.isShowValidationSuccessPopup?".ph-ally-email-validation-success":".ph-ally-email-validation-failure");document.addEventListener("keyup",s.handleValidationStatusEscape),document.addEventListener("click",s.handleValidationStatusEscape),o&&r.DialogManager.openDialog(o,t,e,null,null,!0)},250)},ee.prototype.updateTokenExpiry=function(){this.tokenExpiryTimeInMinutes=parseInt(this.commonService.getSiteSettings("emailValidationTokenExpiry"))||this.tokenExpiryTimeInMinutes;var e=Math.floor(this.tokenExpiryTimeInMinutes/60),t=this.tokenExpiryTimeInMinutes%60;e&&(this.tokenExpiryTimeText+=e+(1