(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{"WP/U":function(e,c,t){"use strict";t.r(c),t.d(c,"ResendVerificationModule",function(){return k});var i=t("ofXK"),r=t("tyNb"),s=t("3Pt+"),a=t("AytR"),n=t("IzEk"),o=t("fXoL"),l=t("jhN1"),g=t("o0su"),d=t("t34c"),u=t("NFeN");function h(e,c){1&e&&(o.dc(0,"h1",16),o.Rc(1,"Resend Verification link"),o.cc())}function m(e,c){1&e&&(o.dc(0,"span",34),o.dc(1,"i",35),o.Rc(2,"error_outline"),o.cc(),o.dc(3,"span"),o.Rc(4,"Please enter a valid email."),o.cc(),o.cc())}function p(e,c){1&e&&(o.dc(0,"span",34),o.dc(1,"i",35),o.Rc(2,"error_outline"),o.cc(),o.dc(3,"span"),o.Rc(4,"Enter your email."),o.cc(),o.cc())}function f(e,c){if(1&e&&o.Yb(0,"img",36),2&e){const e=o.oc(2);o.vc("src",e.captchaString,o.Jc)}}function b(e,c){if(1&e&&(o.dc(0,"div",37),o.Yb(1,"img",38),o.cc()),2&e){const e=o.oc(2);o.Lb(1),o.uc("src",e.commonService.selectedThemeImages+"/button-loader.svg",o.Jc)}}function v(e,c){1&e&&(o.dc(0,"span",34),o.dc(1,"i",35),o.Rc(2,"error_outline"),o.cc(),o.dc(3,"span"),o.Rc(4,"Please enter reCAPTCHA."),o.cc(),o.cc())}function x(e,c){if(1&e){const e=o.ec();o.dc(0,"main",17),o.dc(1,"form",18),o.kc("submit",function(){return o.Gc(e),o.oc().resetVerificationLink()}),o.dc(2,"div",19),o.dc(3,"div",20),o.Yb(4,"input",21),o.dc(5,"label"),o.Rc(6,"Email Address"),o.cc(),o.cc(),o.Pc(7,m,5,0,"span",22),o.Pc(8,p,5,0,"span",22),o.cc(),o.dc(9,"div",23),o.dc(10,"div",24),o.dc(11,"div",25),o.Pc(12,f,1,1,"img",26),o.Pc(13,b,2,1,"div",27),o.cc(),o.dc(14,"div",28),o.dc(15,"div",29),o.Yb(16,"input",30),o.dc(17,"label"),o.Rc(18,"Answer"),o.cc(),o.cc(),o.dc(19,"a",31),o.kc("click",function(){return o.Gc(e),o.oc().getCaptcha()}),o.dc(20,"mat-icon"),o.Rc(21,"cached"),o.cc(),o.cc(),o.cc(),o.cc(),o.Pc(22,v,5,0,"span",22),o.cc(),o.dc(23,"button",32),o.dc(24,"span",33),o.Rc(25,"Submit"),o.cc(),o.cc(),o.cc(),o.cc()}if(2&e){const e=o.oc();o.Lb(1),o.uc("formGroup",e.resendVerificationForm),o.Lb(6),o.uc("ngIf","INVALID"===e.resendVerificationForm.controls.email.status&&e.resendVerificationForm.controls.email.errors.pattern&&e.submitStatus),o.Lb(1),o.uc("ngIf","INVALID"===e.resendVerificationForm.controls.email.status&&e.resendVerificationForm.controls.email.errors.required&&e.submitStatus),o.Lb(4),o.uc("ngIf",!e.showCaptchaLoader),o.Lb(1),o.uc("ngIf",e.showCaptchaLoader),o.Lb(9),o.uc("ngIf","INVALID"===e.resendVerificationForm.controls.recaptcha.status&&e.submitStatus)}}function S(e,c){if(1&e&&(o.dc(0,"div",39),o.Rc(1),o.cc()),2&e){const e=o.oc();o.Lb(1),o.Sc(e.successMessage)}}function w(e,c){if(1&e){const e=o.ec();o.dc(0,"div",40),o.Rc(1),o.dc(2,"a",41),o.kc("click",function(){return o.Gc(e),o.oc().goToRegisterPage("register")}),o.Rc(3,"register"),o.cc(),o.Rc(4," the user."),o.cc()}if(2&e){const e=o.oc();o.Lb(1),o.Tc("",e.errorMessage," ")}}function I(e,c){if(1&e){const e=o.ec();o.bc(0),o.dc(1,"div",42),o.Rc(2," The user is already registered. Please "),o.dc(3,"a",41),o.kc("click",function(){return o.Gc(e),o.oc().manageNavigation("login")}),o.Rc(4,"log in"),o.cc(),o.Rc(5,". "),o.cc(),o.ac()}}function R(e,c){if(1&e){const e=o.ec();o.bc(0),o.dc(1,"div",40),o.Rc(2," Already have account? "),o.dc(3,"a",41),o.kc("click",function(){return o.Gc(e),o.oc().goToRegisterPage("login")}),o.Rc(4,"log in"),o.cc(),o.cc(),o.ac()}}const L=function(e){return{"background-image":e}},C=[{path:"",component:(()=>{class e{constructor(e,c,t,i,r,s,n){var o,l;this.titleService=e,this.commonService=c,this.activatedRoute=t,this.userService=i,this.interceptor=r,this.router=s,this._sanitizer=n,this.submitStatus=!1,this.role_id=a.a.LOGIN_ROLE.CUSTOMER,this.imageName="/customer_reset_password.jpg",this.showCaptcha=!0,this.captchaString="",this.captchaAnsString="0",this.showCaptchaLoader=!1,this.isShowLogin=!1,this.isShowFiled=!0,this.isInvalidCaptcha=!1,this.successMessage="",this.errorMessage="",(null===(o=this.commonService)||void 0===o?void 0:o.zoneName)?this.titleService.setTitle("Resend Verification | "+(null===(l=this.commonService)||void 0===l?void 0:l.zoneName)):this.titleService.setTitle("Resend Verification")}ngOnInit(){this.createUserFormObject(),this.getCaptcha()}ngAfterViewInit(){this.commonService.loadDefaultInputAnimation();const e=$(window).outerHeight(!0),c=$(".pre-login-footer").outerHeight(!0);$(".pre-login").css("min-height",e-c+"px")}createUserFormObject(){this.resendVerificationForm=new s.f({email:new s.c(null,[s.z.required,s.z.pattern(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)]),recaptcha:new s.c(null,s.z.required)}),this.loadRememberUser()}resetVerificationLink(){const e=this;e.submitStatus=!0,this.isInvalidCaptcha=!1,this.successMessage="",this.errorMessage="","VALID"==e.resendVerificationForm.status&&e.userService.resendVerification(this.resendVerificationForm.value).subscribe(c=>{200==c.status?(e.submitStatus=!1,this.successMessage=c.message,this.successMessage&&this.successMessage.includes(" verification link has been resent")&&(this.isShowFiled=!1)):(e.submitStatus=!1,this.errorMessage=c.message,this.isShowFiled=!1,this.isInvalidCaptcha=!1,this.errorMessage&&this.errorMessage.includes("Invalid captcha")&&(this.isInvalidCaptcha=!0,this.isShowFiled=!0,this.commonService.showToaster("error",this.errorMessage)),this.errorMessage&&this.errorMessage.includes("Registration is not completed")&&(this.errorMessage=this.errorMessage.replace("register the user.","")),this.getCaptcha(),e.resendVerificationForm.patchValue({recaptcha:null}))},e=>{this.commonService.showToaster("error","Something went wrong. Please try again.")})}loadRememberUser(){let e=localStorage.getItem(a.a.LOCAL_STORAGE.USER_CREDENTIALS);if(e){const c=this.interceptor.xyz(e);this.resendVerificationForm.patchValue({email:c.username,captcha:new s.c(null,s.z.required)})}}goToRegisterPage(e){this.router.navigate([e])}manageNavigation(e){let c=JSON.parse(localStorage.getItem(a.a.LOCAL_STORAGE.PRE_CURRNET_PAGE_URL));this.router.navigate([c?c.previousePageUrl:"login"])}getCaptcha(){this.showCaptchaLoader=!0,this.userService.getCaptcha(this.captchaAnsString).pipe(Object(n.a)(1)).subscribe(e=>{this.captchaString="data:image/jpg;base64,"+this._sanitizer.bypassSecurityTrustResourceUrl(e.data[0]).changingThisBreaksApplicationSecurity,this.captchaAnsString=e.data.sum,this.showCaptchaLoader=!1})}}return e.\u0275fac=function(c){return new(c||e)(o.Xb(l.c),o.Xb(g.b),o.Xb(r.a),o.Xb(g.l),o.Xb(g.g),o.Xb(r.d),o.Xb(l.b))},e.\u0275cmp=o.Rb({type:e,selectors:[["app-resend-verification"]],decls:17,vars:10,consts:[[1,"pre-login",3,"ngStyle"],[1,"container","pre-login-container"],[1,"row"],[1,"col-lg-5","col-md-6","col-sm-7"],[1,"shadow-card-wrapper","thumbnail"],[1,"card-header"],[1,"language-select","clearfix"],[1,"zone-logo","text-center"],["alt","Logo","title","Logo",3,"src"],["class","form-name text-center",4,"ngIf"],["class","card-main",4,"ngIf"],[1,"card-footer"],[1,"btn","btn-block","text-center"],["class","create-acc-link register-success-message",4,"ngIf"],["class","create-acc-link register-error-message",4,"ngIf"],[4,"ngIf"],[1,"form-name","text-center"],[1,"card-main"],[1,"login-form",3,"formGroup","submit"],[1,"form-group"],[1,"material_input_block"],["formControlName","email","type","email",1,"form-control","material_input"],["class","input-required",4,"ngIf"],[1,"form-group","captcha-wrapper"],[1,"captcha-row"],[1,"col-5"],["style","height: 54px;","alt","captcha",3,"src",4,"ngIf"],["class","loader-item","style","background-color: gray;",4,"ngIf"],[1,"col-7"],[1,"text-captcha","material_input_block"],["type","text","formControlName","recaptcha",1,"form-control","material_input"],["href","#","onclick","return false",3,"click"],["type","submit",1,"btn","btn-primary","full-width","btn-block","text-uppercase"],[1,"button-text"],[1,"input-required"],[1,"material-icons"],["alt","captcha",2,"height","54px",3,"src"],[1,"loader-item",2,"background-color","gray"],["alt","Loading","title","Loading",3,"src"],[1,"create-acc-link","register-success-message"],[1,"create-acc-link","register-error-message"],["href","#","onclick","return false;",3,"click"],[1,"btn","btn-block","create-acc-link","text-center","register-error-message"]],template:function(e,c){1&e&&(o.dc(0,"section",0),o.dc(1,"div",1),o.dc(2,"div",2),o.dc(3,"div",3),o.dc(4,"div",4),o.dc(5,"header",5),o.Yb(6,"div",6),o.dc(7,"div",7),o.Yb(8,"img",8),o.cc(),o.Pc(9,h,2,0,"h1",9),o.cc(),o.Pc(10,x,26,6,"main",10),o.dc(11,"footer",11),o.dc(12,"div",12),o.Pc(13,S,2,1,"div",13),o.Pc(14,w,5,1,"div",14),o.Pc(15,I,6,0,"ng-container",15),o.Pc(16,R,5,0,"ng-container",15),o.cc(),o.cc(),o.cc(),o.cc(),o.cc(),o.cc(),o.cc()),2&e&&(o.uc("ngStyle",o.zc(8,L,"url("+c.commonService.selectedThemeImages+"/bg-beam.svg), url("+c.commonService.selectedThemeImages+c.imageName+")")),o.Lb(8),o.uc("src",c.commonService.selectedThemeImages+"/zone-logo.svg",o.Jc),o.Lb(1),o.uc("ngIf",c.isShowFiled),o.Lb(1),o.uc("ngIf",c.isShowFiled),o.Lb(3),o.uc("ngIf",c.successMessage),o.Lb(1),o.uc("ngIf",c.errorMessage&&!c.errorMessage.includes("Please log in")&&!c.isInvalidCaptcha),o.Lb(1),o.uc("ngIf",c.errorMessage&&c.errorMessage.includes("Please log in")),o.Lb(1),o.uc("ngIf",""===c.successMessage&&""===c.errorMessage||c.errorMessage.includes("Invalid captcha")))},directives:[i.o,i.n,s.A,s.o,s.g,s.b,s.n,s.e,d.a,u.a],styles:[".captcha-row[_ngcontent-%COMP%]{display:flex;justify-content:center;justify-items:center}.captcha-row[_ngcontent-%COMP%] .text-captcha[_ngcontent-%COMP%]{margin:0 15px}.captcha-row[_ngcontent-%COMP%] .col-7[_ngcontent-%COMP%]{display:flex}.captcha-row[_ngcontent-%COMP%] .col-7[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{line-height:54px}.register-error-message[_ngcontent-%COMP%], .register-success-message[_ngcontent-%COMP%]{text-wrap:wrap}"]}),e})()}];let M=(()=>{class e{}return e.\u0275fac=function(c){return new(c||e)},e.\u0275mod=o.Vb({type:e}),e.\u0275inj=o.Ub({imports:[[r.f.forChild(C)],r.f]}),e})();var P=t("PCNd"),_=t("jCJ1");let k=(()=>{class e{}return e.\u0275fac=function(c){return new(c||e)},e.\u0275mod=o.Vb({type:e}),e.\u0275inj=o.Ub({providers:[{provide:_.a,useValue:{siteKey:a.a.SITE_KEY_LIST[window.location.hostname]}}],imports:[[i.c,s.h,s.w,P.a,_.b,_.c,M]]}),e})()}}]);