PageSourceSearch

https://pizzahut.com.hk/build/byod/v/release/custom-phhk/2026-09-14.4.1.5.4.20260916/1476.1aec6737af178d21.js

js pizzahut.com.hk collected 2026-09-24 10:01:35 UTC 105,026 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkroot=self.webpackChunkroot||[]).push([[1476],{71476:(U,T,s)=>{s.r(T),s.d(T,{EpointModule:()=>Zn});var m=s(92440),p=s(36895),f=s(89383),M=s(19132),w=s(83683),x=s(97392),h=s(59549),C=s(44144),P=s(84385),y=s(56709),d=s(47957),_=s(79420),c=s(4859),r=s(24006),l=s(3848),u=s(8277),b=s(99602),O=s(77019),H=s(89731),A=s(94888),J=s(14140),k=s(55353),N=s(80463),e=s(94650),$=s(36467),F=s(3238),Y=s(29025),Q=s(37073),S=s(61204);function W(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.login-page.email-hint")," "))}function z(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"titlecase"),e.ALo(3,"translate"),e._UZ(4,"span",22),e.ALo(5,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,2,e.lcZ(3,4,"crm.login.email"))," "),e.xp6(3),e.Q6J("innerHTML",e.lcZ(5,6,"crm.login.require"),e.oJD))}function X(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",10)(1,"mat-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"input",21),e.YNc(5,W,3,3,"mat-error",12),e.YNc(6,z,6,8,"mat-error",12),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.hij(" ",e.lcZ(3,3,"crm.login.email")," "),e.xp6(3),e.Q6J("ngIf",t.loginForm.controls.email.hasError("email")&&!t.loginForm.controls.email.hasError("required")),e.xp6(1),e.Q6J("ngIf",t.loginForm.controls.email.hasError("required"))}}function ee(n,a){if(1&n&&(e.TgZ(0,"mat-option",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.s9C("value",t.code),e.xp6(1),e.hij(" ",t.code," ")}}function te(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"span",22),e.ALo(4,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,2,"crm.login.country-code")," "),e.xp6(2),e.Q6J("innerHTML",e.lcZ(4,4,"crm.login.require"),e.oJD))}function ne(n,a){1&n&&(e.TgZ(0,"mat-error",29),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.invalid-phone-number")," "))}function oe(n,a){if(1&n&&(e.TgZ(0,"div",23)(1,"div")(2,"mat-form-field",10)(3,"mat-select",24),e.YNc(4,ee,2,2,"mat-option",25),e.qZA(),e.YNc(5,te,5,6,"mat-error",12),e.qZA()(),e.TgZ(6,"div")(7,"mat-form-field",10)(8,"mat-label"),e._uU(9),e.ALo(10,"translate"),e.qZA(),e._UZ(11,"input",26),e.qZA(),e.YNc(12,ne,3,3,"mat-error",27),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngForOf",t.context.form.countryCodes),e.xp6(1),e.Q6J("ngIf",t.loginForm.controls.countryCode.hasError("required")),e.xp6(4),e.hij("",e.lcZ(10,4,"crm.login.phone-number-input")," "),e.xp6(3),e.Q6J("ngIf",t.loginForm.controls.phone.touched&&t.loginForm.hasError("phoneInvalid"))}}function ie(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"titlecase"),e.ALo(3,"translate"),e._UZ(4,"span",22),e.ALo(5,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,2,e.lcZ(3,4,"crm.login.password"))," "),e.xp6(3),e.Q6J("innerHTML",e.lcZ(5,6,"crm.login.require"),e.oJD))}function re(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",30),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();
1return e.KtG(i.onBindCardClicked())}),e._uU(1),e.ALo(2,"translate"),e.qZA()}2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.login-page.bind-card")," "))}let ae=(()=>{class n extends A.nh{constructor(t,o,i,g){super(t),this.loginService=o,this.memberContextManager=i,this.notificationService=g,this.token="",this.loginType="email";var v=this.context.brand?.themes?.byod;this.logoUrl=v?.logo?.length>0?v.logo[0].url:this.context?.brand?.images?.logo?.url??this.context?.court?.images?.logo?.url??this.context?.group?.images?.logo?.url}ngOnInit(){this.loginType=this.context.crm?.verificationType,this.countryCode=this.context.form.countryCode,this.loginForm=new r.cw({..."email"===this.loginType&&{email:new r.NI("",[r.kI.required,r.kI.email])},..."phone"===this.loginType&&{countryCode:new r.NI(this.countryCode,[r.kI.required]),phone:new r.NI("",[r.kI.required])},password:new r.NI("",[r.kI.required])},{..."phone"===this.loginType&&{validators:N.i}})}backBtnClicked(){this.back()}onLogin(){let o,t={username:this.loginForm.get("phone"===this.loginType?"phone":"email").value,password:this.loginForm.get("password").value,type:"crm",brandId:this.context.brand?.id,groupId:this.context.group?.id,..."phone"===this.loginType&&{countryCode:this.loginForm.get("countryCode").value}};window.location.pathname&&(o=window.location.pathname),o.indexOf("(")>-1&&(o=o.split("(")[0]),this.memberContext.returnUrl=o,this.loginForm.disable(),this.dialogService.superloading(!0),this.dataService.postWithParams("/api/v1/crm/login.json",t).subscribe(g=>{this.dialogService.superloading(!1),this.loginForm.enable(),g&&g.sessionId&&this.setMember(g),this.processAfterLogin()},g=>{this.dialogService.superloading(!1),this.loginForm.enable(),401===g.status?this.dialogService.showAlert(this.t.instant("crm.login.login-page.login-failed"),this.t.instant("crm.login.login-page.login-failed-msg")):this.dialogService.showError(g,!1)})}onNewMemberClicked(){this.routingService.navigateModal(`auth/login/brand/${this.context.brandId}/register`)}onBindCardClicked(){this.routingService.navigateModal(`auth/login/brand/${this.context.brandId}/epoint/bind`)}onResetPasswordClick(){this.routingService.navigateModal(`auth/login/brand/${this.context.brandId}/reset`)}registerPushToken(){if(this.platformService.isNative()){const t=this.configService.getLocal("tempPushToken");t&&this.notificationService.registerPushToken(t).then(()=>{}).catch(o=>{})}}setMember(t){this.memberContextManager.setMemberData(t)}processAfterLogin(){this.registerPushToken(),this.analyticsService.trackLogin("email");var t=this.navParams.get("returnUrl")??this.memberContext.returnUrl;t?(this.memberContext.returnUrl=null,this.routingService.navigate(t)):this.routingService.goHome(window.location.href)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.zs3),e.Y36(J.r),e.Y36(A.VD),e.Y36($.g))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-login-page"]],features:[e.qOj],decls:33,vars:23,consts:[[1,"top-container"],["nav","",3,"back","close"],["center","","id","content",1,"content"],[1,"login-logo"],["imgName","logo",3,"content"],["id","email-login-form",1,"login-box",3,"formGroup","submit"],[1,"title"],[1,"input-wrapper"],["appearance","fill","class","input-field",4,"ngIf"],["class","country-code",4,"ngIf"],["appearance","fill",1,"input-field"],["matInput","","type","password","maxlength","30","formControlName","password","name","password","data-testid","email-password-input-field","ngDefaultControl","","autofocus","","autocomplete","current-password"],[4,"ngIf"],[1,"input-sub-link"],[3,"click"],[1,"footer"],[1,"btn-panel-container"],[1,"btn-panel"],["mat-raised-button","","type","submit","tabindex","4","form","email-login-form","data-testid","email-login-submit-button",1,"btn-login"],["mat-raised-button","","type","submit","tabindex","4","data-testid","login-register-button",1,"btn-register",3,"click"],["mat-raised-button","","type","submit","class","btn-bind-card","tabindex","4","data-testid","login-bind-card-button",3,"click",4,"ngIf"],["matInput","","type","email","maxlength","50","formControlName","email","name","email","data-testid","email-input-field","ngDefaultControl","","autofocus","","autocomplete","username"],[3,"innerHTML"],[1,"country-code"],["formControlName","countryCode","ngDefaultControl","","tabindex","1"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","tel","maxlength","30","formControlName","phone","name","phone","ngDefaultControl","","autocomplete","username","tabindex","2","data-testid","phone-input-field"],["class","phone-error",4,"ngIf"],[3,"value"],[1,"ph
1one-error"],["mat-raised-button","","type","submit","tabindex","4","data-testid","login-bind-card-button",1,"btn-bind-card",3,"click"]],template:function(t,o){1&t&&(e.TgZ(0,"app-container-layout",0),e._UZ(1,"app-sub-bar",1),e.TgZ(2,"div",2),e.ynx(3),e.TgZ(4,"div",3),e._UZ(5,"app-img",4),e.qZA(),e.TgZ(6,"form",5),e.NdJ("submit",function(){return o.onLogin()}),e.TgZ(7,"h1",6),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"div",7),e.YNc(11,X,7,5,"mat-form-field",8),e.YNc(12,oe,13,6,"div",9),e.TgZ(13,"mat-form-field",10)(14,"mat-label"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e._UZ(17,"input",11),e.YNc(18,ie,6,8,"mat-error",12),e.qZA(),e.TgZ(19,"div",13)(20,"a",14),e.NdJ("click",function(){return o.onResetPasswordClick()}),e._uU(21),e.ALo(22,"translate"),e.qZA()()()(),e.TgZ(23,"div",15)(24,"div",16)(25,"div",17)(26,"button",18),e._uU(27),e.ALo(28,"translate"),e.qZA(),e.TgZ(29,"button",19),e.NdJ("click",function(){return o.onNewMemberClicked()}),e._uU(30),e.ALo(31,"translate"),e.qZA()(),e.YNc(32,re,3,3,"button",20),e.qZA()(),e.BQk(),e.qZA()()),2&t&&(e.xp6(1),e.Q6J("back",!0)("close",!1),e.xp6(4),e.Q6J("content",o.context.brand),e.xp6(1),e.Q6J("formGroup",o.loginForm),e.xp6(2),e.Oqu(e.lcZ(9,13,"crm.login.login-page.please-login")),e.xp6(3),e.Q6J("ngIf","email"===o.loginType),e.xp6(1),e.Q6J("ngIf","phone"===o.loginType),e.xp6(3),e.hij(" ",e.lcZ(16,15,"crm.login.password-input")," "),e.xp6(3),e.Q6J("ngIf",o.loginForm.controls.password.hasError("required")),e.xp6(3),e.hij("",e.lcZ(22,17,"crm.login.forget-password-link")," "),e.xp6(6),e.hij(" ",e.lcZ(28,19,"crm.login.login-page.login")," "),e.xp6(3),e.hij(" ",e.lcZ(31,21,"crm.login.login-page.new-register")," "),e.xp6(2),e.Q6J("ngIf",o.settingManager.get("crm.epointEnableBindCard",!1)))},dependencies:[p.sg,p.O5,c.lW,h.TO,h.KE,h.hX,C.Nt,r._Y,r.Fj,r.JJ,r.JL,r.nD,r.sg,r.u,P.gD,F.ey,Y.g,Q.L,S.v,p.rS,f.X$],styles:['[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden;background:white}.top-container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden}.header[_ngcontent-%COMP%]{flex:0 0 auto;padding:0 .5rem!important;margin:0!important;background:transparent;height:4rem;min-height:4rem}.header[_ngcontent-%COMP%]   .icon-toolbar[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]   .header-title[_ngcontent-%COMP%]{font-size:1rem}.register-page[_ngcontent-%COMP%], .reset-page[_ngcontent-%COMP%]{width:100%;height:100%}.content[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;overflow:auto;position:relative;height:100%}.country-code[_ngcontent-%COMP%]{display:flex}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:5.5rem;margin-right:.5rem}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{flex:1 1 auto}.country-code[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.5rem)}.img-box[_ngcontent-%COMP%]{position:relative;overflow:hidden;background:transparent;background-size:cover;background-repeat:no-repeat;background-position:center center}.img-box[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:var(--image-ratio)}.img-box[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{object-fit:cover;object-position:center;position:absolute;inset:0;color:#fff;text-align:center;width:100%}.is-contains-channel[_ngcontent-%COMP%]   .login-logo[_ngcontent-%COMP%]{width:8rem;margin:0}.login-logo[_ngcontent-%COMP%]{width:100%;margin:1rem 0;transition:all .8s ease-in-out;display:flex;justify-content:center}.login-logo[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:12rem}.login-box[_ngcontent-%COMP%]{margin:1rem 2rem;width:calc(100% - 4rem);display:flex;flex-direction:column;flex:1}.login-box[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-align:center;padding-bottom:1rem}.login-box[_ngcontent-%COMP%]   .terms[_ngcontent-%COMP%]{font-size:.8rem}.login-box[_ngcontent-%COMP%]   .terms[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700}.input-field[_ngcontent-%COMP%] {width:100%}.input-field[_ngcontent-%COMP%]  input{caret-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-wrapper{font-size:1rem;line-height:1.2em;margin-bottom:1rem}.input-field[_ngcontent-%COMP%]  .mat-form-field-flex{background:#f6f6f6;box-shadow:0 4px 8px #0000000a;border-radius:17px}.input-field[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-label{color:#888}.input-field[_ngcontent-%COMP%]  .mat-form-field-underline{background-color:#333;display:none}.input-field[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field[_ngcontent-%COMP%]  .mat-error{color:var(--W);line-height:1.1em}.input-field[_ngcontent-%COMP%]  .mat-select-value-text, .input-field[_ngcontent-%COMP%]  .mat-select-arrow{color:#333}.input-field[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.55rem)}.input-field[_ngcontent-%COMP%]  .mat-form-field-infix{width:auto}.input-password[_ngcontent-%COMP%]{margin-bottom:3rem}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-label{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-input-element{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label .mat-form-field-required-marker{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:var(--W)}.input-sub-link[_ngcontent-%COMP%]{text-align:right;text-decoration-line:underline;text-transform:uppercase;color:#9d9d9d;font-size:.7rem}.footer[_ngcontent-%COMP%]{width:100%;background:#fff;position:relative;box-shadow:none;background:transparent;display:flex;justify-content:end}.btn-panel-container[_ngcontent-%COMP%]{width:100%;padding:1rem 2rem 2rem}.btn-panel-container[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;padding-bottom:1rem}.btn-panel-container[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]   .btn-login[_ngcontent-%COMP%]{margin-right:1rem;background:#f1f1f1;color:var(--A);box-shadow:none}.btn-panel-container[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]   .btn-register[_ngcontent-%COMP%]{background:#e41e26;color:#fff}.btn-panel-container[_ngcontent-%COMP%]   .btn-bind-card[_ngcontent-%COMP%]{color:#fff;background:#e41e26;box-shadow:none;padding:.6rem}.btn-panel-container[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:17px;width:100%;padding:.2rem;text-transform:uppercase;margin-bottom:.5rem}']}),n})();var Z=s(8137);const E=function(n){return{item:n}};function ce(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(6,E,e.lcZ(3,4,"crm.login.register-page.email"))),""))}function se(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"h1",8),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"form",9),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onReset())}),e.TgZ(5,"mat-form-field",10)(6,"mat-label"),e._uU(7),e.ALo(8,"titlecase"),e.ALo(9,"translate"),e.qZA(),e._UZ(10,"input",11),e.YNc(11,ce,4,8,"mat-error",3),e.qZA()()()}if(2&n){const t=e.oxw(2);
1e.xp6(2),e.Oqu(e.lcZ(3,4,"crm.login.reset-page.email-reset-2")),e.xp6(2),e.Q6J("formGroup",t.emailForm),e.xp6(3),e.hij(" ",e.lcZ(8,6,e.lcZ(9,8,"crm.login.email"))," "),e.xp6(4),e.Q6J("ngIf",t.emailForm.controls.email.hasError("required"))}}function le(n,a){if(1&n&&(e.TgZ(0,"mat-option",18),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.s9C("value",t.code),e.xp6(1),e.hij(" ",t.code," ")}}function me(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"span",19),e.ALo(4,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,2,"crm.login.country-code")," "),e.xp6(2),e.Q6J("innerHTML",e.lcZ(4,4,"crm.login.require"),e.oJD))}function ge(n,a){1&n&&(e.TgZ(0,"mat-error",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.invalid-phone-number")," "))}function pe(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"h1",8),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"form",12),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.onReset())}),e.TgZ(5,"div",13)(6,"div")(7,"mat-form-field",10)(8,"mat-select",14),e.YNc(9,le,2,2,"mat-option",15),e.qZA(),e.YNc(10,me,5,6,"mat-error",3),e.qZA()(),e.TgZ(11,"div")(12,"mat-form-field",10)(13,"mat-label"),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"input",16),e.qZA(),e.YNc(17,ge,3,3,"mat-error",17),e.qZA()()()()}if(2&n){const t=e.oxw(2);e.xp6(2),e.Oqu(e.lcZ(3,6,"crm.login.reset-page.phone-reset")),e.xp6(2),e.Q6J("formGroup",t.phoneForm),e.xp6(5),e.Q6J("ngForOf",t.countryCodes),e.xp6(1),e.Q6J("ngIf",t.phoneForm.controls.countryCode.hasError("required")),e.xp6(4),e.Oqu(e.lcZ(15,8,"crm.login.phone-number-input")),e.xp6(3),e.Q6J("ngIf",t.phoneForm.controls.phone.touched&&t.phoneForm.hasError("phoneInvalid"))}}function de(n,a){if(1&n&&(e.ynx(0),e.YNc(1,se,12,10,"div",6),e.YNc(2,pe,18,10,"div",6),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","email"===t.verificationType),e.xp6(1),e.Q6J("ngIf","phone"===t.verificationType)}}function _e(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.register-page.msg.code-incorrect"),""))}const fe=function(){return{width:"100%",display:"flex","justify-content":"space-between"}},ue=function(){return{width:"46px",height:"51px",background:"#f6f6f6","box-shadow":"0px 4px 8px rgba(0, 0, 0, 0.04)","border-radius":"13px",border:"0px"}},he=function(n,a){return{length:6,allowNumbersOnly:!0,containerStyles:n,inputStyles:a}},xe=function(n){return{time:n}};function Ce(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",7)(2,"h2",21),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"h1",22),e._uU(6),e.qZA(),e.TgZ(7,"form",23),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onFirstVerify())}),e._UZ(8,"ng-otp-input",24),e.YNc(9,_e,3,3,"mat-error",3),e.qZA(),e.TgZ(10,"h4",25),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"div",26)(14,"button",27),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.resendClicked())}),e._uU(15),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA()()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,8,"crm.login.reset-page.enter-code-2")),e.xp6(3),e.Oqu("email"===t.verificationType?t.email:t.phone),e.xp6(2),e.Q6J("formCtrl",t.firstOtpForm)("config",e.WLB(19,he,e.DdM(17,fe),e.DdM(18,ue))),e.xp6(1),e.Q6J("ngIf",t.firstOtpForm.hasError("codeIncorrect")),e.xp6(2),e.Oqu(e.lcZ(12,10,"crm.login.reset-page.did-not-receive")),e.xp6(3),e.Q6J("disabled",t.resendOtpTime>0),e.xp6(1),e.Oqu(t.resendOtpTime>0?e.xi3(16,12,"crm.login.register-page.resend-code",e.VKq(22,xe,t.resendOtpTime)):e.lcZ(17,15,"crm.login.register-page.resend-btn"))}}function be(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(6,E,e.lcZ(3,4,"crm.login.register-page.password"))),""))}function ve(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(6,E,e.lcZ(3,4,"crm.login.register-page.password"))),""))}function Pe(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",7)(2,"h2",28),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"form",29),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onPasswordSubmit())}),e.TgZ(6,"mat-form-field",10)(7,"mat-label"),e._uU(8),e.ALo(9,"titlecase"),e.ALo(10,"translate"),e.qZA(),e._UZ(11,"input",30),e.YNc(12,be,4,8,"mat-error",3),e.qZA(),e.TgZ(13,"mat-form-field",10)(14,"mat-label"),e._uU(15),e.ALo(16,"titlecase"),e.ALo(17,"translate"),e.qZA(),e._UZ(18,"input",31),e.YNc(19,ve,4,8,"mat-error",3),e.qZA()()(),e.BQk()}if(2&n){const t=e.oxw();
1e.xp6(3),e.Oqu(e.lcZ(4,6,"crm.login.reset-page.reset-password")),e.xp6(2),e.Q6J("formGroup",t.resetPasswordForm),e.xp6(3),e.hij(" ",e.lcZ(9,8,e.lcZ(10,10,"crm.login.password-input"))," "),e.xp6(4),e.Q6J("ngIf",t.resetPasswordForm.get("password").hasError("required")),e.xp6(3),e.hij(" ",e.lcZ(16,12,e.lcZ(17,14,"crm.login.confirm-new-password"))," "),e.xp6(4),e.Q6J("ngIf",t.resetPasswordForm.get("confirm").hasError("required"))}}function Ze(n,a){if(1&n&&(e.TgZ(0,"button",34),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw(2);e.Q6J("disabled",t.emailForm.invalid),e.xp6(1),e.hij(" ",e.lcZ(2,2,"crm.login.reset-page.submit")," ")}}function Te(n,a){if(1&n&&(e.TgZ(0,"button",35),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n){const t=e.oxw(2);e.Q6J("disabled",t.phoneForm.invalid),e.xp6(1),e.hij(" ",e.lcZ(2,2,"crm.login.reset-page.submit")," ")}}function ye(n,a){if(1&n&&(e.ynx(0),e.YNc(1,Ze,3,4,"button",32),e.YNc(2,Te,3,4,"button",33),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","email"===t.verificationType),e.xp6(1),e.Q6J("ngIf","phone"===t.verificationType)}}function Oe(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",36),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onFirstVerify())}),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("disabled",t.firstOtpForm.invalid),e.xp6(1),e.hij(" ",e.lcZ(3,2,"crm.login.reset-page.verify-now")," ")}}function we(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"button",37),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("disabled",t.resetPasswordForm.invalid),e.xp6(1),e.hij(" ",e.lcZ(3,2,"crm.login.reset-page.submit")," ")}}let Me=(()=>{class n extends A.nh{constructor(t,o){super(t),this.loginService=o,this.stage=1,this.email="",this.phone="",this.resendOtpTime=0,this.showVerification=!1,this.isOtpLoading=!1,this.cardNo="",this.verificationType="phone"}ngOnInit(){this.verificationType=this.context.crm?.verificationType,this.countryCode=this.context.form.countryCode,this.countryCodes=this.context.form.countryCodes,this.emailForm=new r.cw({email:new r.NI("",[r.kI.required,r.kI.email])}),this.phoneForm=new r.cw({countryCode:new r.NI(this.countryCode,[r.kI.required]),phone:new r.NI("",[r.kI.required])},{validators:N.i}),this.firstOtpForm=new r.NI("",[r.kI.required]),this.resetPasswordForm=new r.cw({password:new r.NI("",[r.kI.required,r.kI.minLength(8),Z.passwordFormatValidator]),confirm:new r.NI("",[r.kI.required,r.kI.minLength(8),Z.confirmPasswordFormatValidator])})}onReset(){if("email"===this.verificationType){if(this.emailForm.get("email").invalid)return;this.email=this.emailForm.get("email").value}else if("phone"===this.verificationType){if(this.phoneForm.get("phone").invalid||this.phoneForm.get("countryCode").invalid)return;this.phone=this.phoneForm.get("phone").value,this.countryCode=this.phoneForm.get("countryCode").value}this.getOtp()}onFirstVerify(){this.onVerifyOtp(this.firstOtpForm.value,t=>{this.firstOtpForm.setValue(""),this.firstOtpForm.setErrors({codeIncorrect:!0}),this.dialogService.showError(t)})}onPasswordSubmit(){if(this.resetPasswordForm.invalid)return this.emailForm.setErrors({required:!0});this.resetPassword(this.resetPasswordForm.get("password").value,this.resetPasswordForm.get("confirm").value)}resendClicked(){this.resendOtpTime>0||this.getOtp()}startResentCountdown(){this.resendOtpTime=60,this.resendTimer=setInterval(()=>{this.resendOtpTime--,this.resendOtpTime<=0&&clearInterval(this.resendTimer)},1e3)}clearCountdown(){this.resendOtpTime=-1,clearInterval(this.resendTimer)}getOtp(){this.showVerification=!0,this.isOtpLoading=!0,this.dialogService.superloading(!0),this.emailForm.disable(),this.phoneForm.disable(),this.startResentCountdown(),this.dataService.postWithParams("/api/v1/store/password.json",{action:"requestOtp",type:this.verificationType,..."email"===this.verificationType&&{email:this.email},..."phone"===this.verificationType&&{phone:this.phone},..."phone"===this.verificationType&&{countryCode:this.countryCode},crmId:this.context.crm.id}).subscribe(t=>{this.dialogService.superloading(!1),this.emailForm.enable(),this.phoneForm.enable(),1===this.stage&&(this.stage=2,this.cardNo=t.cardNo)},t=>{this.resendOtpTime=0,this.dialogService.superloading(!1),this.emailForm.enable(),this.phoneForm.enable(),this.dialogService.showError(t),this.clearCountdown(),this.showVerification=!1})}onVerifyOtp(t,o){const i=this.context.crm?.extra?.otpLength||6;this.dialogService.superloading(!0),t.length>=i?this.verifyOtp(t).subscribe({next:g=>
1{if(this.dialogService.superloading(!1),!g?.token)return this.firstOtpForm.setValue(""),void this.dialogService.showAlert(this.t.instant("crm.login.reset-page.token-fail"),this.t.instant("crm.login.reset-page.token-fail-msg"));this.token=g.token,this.stage=3},error:g=>{this.dialogService.superloading(!1),o(g)}}):this.firstOtp.updateValueAndValidity()}verifyOtp(t){return this.dataService.postWithParams("/api/v1/store/password.json",{action:"verifyByOtp",type:this.verificationType,..."email"===this.verificationType&&{email:this.email},..."phone"===this.verificationType&&{phone:this.phone},..."phone"===this.verificationType&&{countryCode:this.countryCode},crmId:this.context.crm.id,cardNo:this.cardNo,token:t})}resetPassword(t,o){return this.dialogService.superloading(!0),this.resetPasswordForm.disable(),this.resetPasswordByOtp(t,o).subscribe({next:()=>{this.dialogService.superloading(!1),this.dialogService.showAlert(this.t.instant("crm.login.reset-page.reset-success"),this.t.instant("crm.login.reset-page.reset-success-msg")),this.goLogin()},error:i=>{this.dialogService.superloading(!1),this.resetPasswordForm.get("password").setValue(""),this.resetPasswordForm.enable(),this.resetPasswordForm.get("confirm").setValue(""),this.dialogService.showError(i)}})}resetPasswordByOtp(t,o){return this.dataService.postWithParams("/api/v1/store/password.json",{action:"resetByOtp",type:this.verificationType,..."email"===this.verificationType&&{email:this.email},..."phone"===this.verificationType&&{phone:this.phone},..."phone"===this.verificationType&&{countryCode:this.countryCode},crmId:this.context.crm.id,token:this.token,password:t,confirm:o})}goLogin(){this.routingService.navigateModal(`auth/login/brand/${this.context.brandId}`)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.zs3),e.Y36(J.r))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-reset-page"]],features:[e.qOj],decls:11,vars:8,consts:[[1,"top-container"],["nav","",3,"back","close"],["center","",1,"content"],[4,"ngIf"],[1,"footer"],[1,"btn-panel"],["class","reset-box",4,"ngIf"],[1,"reset-box"],[1,"email-title"],["id","email-reset-form",3,"formGroup","submit"],["appearance","fill",1,"input-field"],["matInput","","type","email","formControlName","email","name","email","data-testid","email-input-field","ngDefaultControl","","autofocus","","autocomplete","username"],["id","phone-reset-form",3,"formGroup","submit"],[1,"country-code"],["formControlName","countryCode","ngDefaultControl","","tabindex","1"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","tel","maxlength","30","formControlName","phone","name","phone","ngDefaultControl","","autofocus","","tabindex","2"],["class","phone-error",4,"ngIf"],[3,"value"],[3,"innerHTML"],[1,"phone-error"],[1,"enter-code"],[1,"email-text"],["id","first-otp-form",1,"otp-form",3,"submit"],["name","firstOtp",3,"formCtrl","config"],[1,"did-not-receive-text"],[1,"re-send"],["mat-button","",1,"re-send-btn",3,"disabled","click"],[1,"reset-password-text"],["id","reset-password-form",3,"formGroup","submit"],["matInput","","type","password","formControlName","password","name","password","data-testid","password-input-field","ngDefaultControl","","autofocus","","autocomplete","username"],["matInput","","type","password","formControlName","confirm","name","confirm","data-testid","password-confirm-input-field","ngDefaultControl","","autofocus","","autocomplete","username"],["mat-raised-button","","type","submit","form","email-reset-form","class","submit-btn","tabindex","4","data-testid","reset-button",3,"disabled",4,"ngIf"],["mat-raised-button","","type","submit","form","phone-reset-form","class","submit-btn","tabindex","4","data-testid","reset-button",3,"disabled",4,"ngIf"],["mat-raised-button","","type","submit","form","email-reset-form","tabindex","4","data-testid","reset-button",1,"submit-btn",3,"disabled"],["mat-raised-button","","type","submit","form","phone-reset-form","tabindex","4","data-testid","reset-button",1,"submit-btn",3,"disabled"],["mat-raised-button","","type","button","tabindex","4","data-testid","reset-button",1,"submit-btn",3,"disabled","click"],["mat-raised-button","","type","submit","form","reset-password-form","tabindex","4","data-testid","reset-button",1,"submit-btn",3,"disabled"]],template:function(t,o){1&t&&(e.TgZ(0,"app-container-layout",0),e._UZ(1,"app-sub-bar",1),e.TgZ(2,"div",2),e.YNc(3,de,3,2,"ng-container",3),e.YNc(4,Ce,18,24,"ng-container",3),e.YNc(5,Pe,20,16,"ng-container",3),e.TgZ(6,"div",4)(7,"div",5),e.YNc(8,ye,3,2,"ng-container",3),e.YNc(9,Oe,4,4,"ng-container",3),e.YNc(10,we,4,4,"ng-container",3),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("back",!0)("close",!1),e.xp6(2),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",2===o.stage),e.xp6(1),e.Q6J("ngIf",3===o.stage),e.xp6(3),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",2===o.stage),e.xp6(1),e.Q6J("ngIf",3===o.stage))}
1,dependencies:[p.sg,p.O5,c.lW,h.TO,h.KE,h.hX,C.Nt,r._Y,r.Fj,r.JJ,r.JL,r.nD,r.F,r.sg,r.u,P.gD,F.ey,Q.L,S.v,m.df,p.rS,f.X$],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden;background:white}.top-container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden}.content[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;overflow:auto;position:relative;height:100%}.reset-box[_ngcontent-%COMP%]{margin:1rem 2rem;display:flex;align-items:center;flex-direction:column}.reset-box[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{width:100%}.email-title[_ngcontent-%COMP%], .reset-password-text[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.1rem;text-align:center;font-weight:400;color:#222}.enter-code[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.1rem;text-align:center}.did-not-receive-text[_ngcontent-%COMP%]{margin-top:2rem;color:#c1c1c1;text-align:center}.resend-code-text[_ngcontent-%COMP%]{color:#9c9c9c;margin-top:.5rem;text-align:center;text-decoration:underline;font-size:1rem}.email-text[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.otp-form[_ngcontent-%COMP%]{margin-top:1.5rem;width:100%;display:flex;flex-direction:column;align-items:center}.otp-form[_ngcontent-%COMP%]   .mat-error[_ngcontent-%COMP%]{text-align:center;margin-top:1.3rem}.country-code[_ngcontent-%COMP%]{display:flex;align-items:flex-start;flex-wrap:wrap;flex:1 1 auto}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:5.5rem}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){flex:1 1 8rem;width:8rem;margin:0 .5rem}.country-code[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;padding:0;background:var(--P);color:var(--PC);border-radius:.3rem;font-size:.8rem;margin-bottom:1rem}.country-code[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{background:var(--P200)}.country-code[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.5rem)}.input-field[_ngcontent-%COMP%] {width:100%}.input-field[_ngcontent-%COMP%]  input{caret-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-wrapper{font-size:1rem;line-height:1.2em;margin-bottom:.5rem}.input-field[_ngcontent-%COMP%]  .mat-form-field-flex{background:#f6f6f6;box-shadow:0 4px 8px #0000000a;border-radius:17px}.input-field[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-label{color:#888}.input-field[_ngcontent-%COMP%]  .mat-form-field-underline{background-color:#333;display:none}.input-field[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field[_ngcontent-%COMP%]  .mat-error{color:var(--W)}.input-field[_ngcontent-%COMP%]  .mat-select-value-text, .input-field[_ngcontent-%COMP%]  .mat-select-arrow{color:#333}.input-field[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.55rem)}.input-field[_ngcontent-%COMP%]  .mat-form-field-infix{width:auto}.input-password[_ngcontent-%COMP%]{margin-bottom:3rem}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-label{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-input-element{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label .mat-form-field-required-marker{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:var(--W)}.re-send-btn[_ngcontent-%COMP%]{color:#9c9c9c;margin-top:.5rem;text-align:center;text-decoration:underline;font-size:1rem;font-family:var(--CF0);line-height:1.1em}.footer[_ngcontent-%COMP%]{width:100%;background:#fff;position:relative;box-shadow:none;background:transparent;display:flex;justify-content:end}.footer[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;width:100%;padding:2rem;padding-top:0}.footer[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]   .submit-btn[_ngcontent-%COMP%]{background:var(--P);box-shadow:3px 13px 44px #c5c5c530;border-radius:17px;width:100%;color:var(--PC);margin-top:.3rem;margin-bottom:.3rem;padding:.2rem}.footer[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]   .submit-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;color:#a1a1a1;background-color:#ededed;box-shadow:3px 13px 44px #00000012}"]}),n})();var R=s(83394),j=s(34799),Ae=s(58823),V=s(573),D=s(4200),Fe=s(8268),I=s.n(Fe),K=s(65882),G=s(69745);function Ie(n,a){if(1&n&&(e.TgZ(0,"div",8),e._UZ(1,"app-img",9),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("content",t.context.brand)}}function qe(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.login-page.email-hint")," "))}function ke(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"titlecase"),e.ALo(3,"translate"),e._UZ(4,"span",17),e.ALo(5,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,2,e.lcZ(3,4,"crm.login.email"))," "),e.xp6(3),e.Q6J("innerHTML",e.lcZ(5,6,"crm.login.require"),e.oJD))}function Ne(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",13)(1,"mat-label"),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"input",14),e.YNc(5,qe,3,3,"mat-error",15),e.YNc(6,ke,6,8,"mat-error",15),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.hij(" ",e.lcZ(3,3,"crm.login.email")," "),e.xp6(3),e.Q6J("ngIf",t.checkForm.get("email").hasError("email")||t.checkForm.get("email").hasError("pattern")),e.xp6(1),e.Q6J("ngIf",t.checkForm.get("email").hasError("required"))}}function Le(n,a){if(1&n&&(e.TgZ(0,"mat-option",22),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.s9C("value",t.code),e.xp6(1),e.hij(" ",t.code," ")}}function Je(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.msg.phone-invalid")," "))}function Qe(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",18)(2,"div")(3,"mat-form-field",13)(4,"mat-select",19),e.NdJ("input",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.handlePhoneInput())}),e.YNc(5,Le,2,2,"mat-option",20),e.qZA()()(),e.TgZ(6,"div")(7,"mat-form-field",13)(8,"mat-label"),e._uU(9),e.ALo(10,"translate"),e.qZA(),e.TgZ(11,"input",21),e.NdJ("input",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.handlePhoneInput())})("blur",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.handlePhoneInput())}),e.qZA(),e.YNc(12,Je,3,3,"mat-error",5),e.qZA()()(),e.BQk()}if(2&n){const t=e.oxw(2);e.xp6(5),e.Q6J("ngForOf",t.context.form.countryCodes),e.xp6(4),e.Oqu(e.l
1cZ(10,4,"crm.login.phone-number")),e.xp6(2),e.Q6J("errorStateMatcher",t.phoneErrorMatcher),e.xp6(1),e.Q6J("ngIf",t.registrationForm.hasError("phoneInvalid"))}}function Se(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"p",23),e._UZ(1,"span",24),e.ALo(2,"translate"),e.TgZ(3,"a",25),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.displayPassiveAgreement())}),e._uU(4),e.ALo(5,"translate"),e.qZA()()}2&n&&(e.xp6(1),e.Q6J("innerText",e.lcZ(2,2,"crm.login.register-page.epoint.tnc-message")),e.xp6(3),e.Oqu(e.lcZ(5,4,"crm.login.register-page.epoint.tnc")))}function Ue(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"form",10),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onConfirmEmail())}),e.YNc(2,Ne,7,5,"mat-form-field",11),e.YNc(3,Qe,13,6,"ng-container",5),e.YNc(4,Se,6,6,"p",12),e.qZA(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.checkForm),e.xp6(1),e.Q6J("ngIf","email"===t.verificationType),e.xp6(1),e.Q6J("ngIf","phone"===t.verificationType),e.xp6(1),e.Q6J("ngIf",t.passiveAgreement.length>0)}}function Ye(n,a){if(1&n&&(e._UZ(0,"input",38),e.ALo(1,"formTranslate")),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.Q6J("formControlName",t.name)("placeholder",e.gM2(1,2,t,o.context.userLang,"example","regFields"))}}function Ee(n,a){1&n&&(e.TgZ(0,"mat-option"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.membership.edit-profile.none")))}function Re(n,a){if(1&n&&(e.TgZ(0,"mat-option",22),e._uU(1),e.ALo(2,"formTranslate"),e.qZA()),2&n){const t=a.$implicit,o=e.oxw(5);e.s9C("value",t.value),e.xp6(1),e.hij(" ",e.gM2(2,2,t,o.context.userLang,"display","regFields"),"")}}function Be(n,a){if(1&n&&(e.TgZ(0,"mat-select",39),e.YNc(1,Ee,3,3,"mat-option",5),e.YNc(2,Re,3,7,"mat-option",20),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.Q6J("formControlName",t.name),e.xp6(1),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngForOf",t.options)}}function je(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function Ve(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.not-ediable-msg")))}const L=function(n){return{item:n}};function De(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"formTranslate"),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(9,L,e.gM2(3,4,t,o.context.userLang,"title","regFields")))," ")}}function Ke(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",13)(1,"mat-label"),e._uU(2),e.ALo(3,"formTranslate"),e.qZA(),e.YNc(4,Ye,2,7,"input",36),e.YNc(5,Be,3,3,"ng-template",null,37,e.W1O),e.TgZ(7,"mat-hint"),e.YNc(8,je,3,3,"span",5),e.YNc(9,Ve,3,3,"span",5),e.qZA(),e.YNc(10,De,4,11,"mat-error",5),e.qZA()),2&n){const t=e.MAs(6),o=e.oxw().$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(e.gM2(3,6,o,i.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("ngIf",!o.options||(null==o?null:o.options.length)<=0)("ngIfElse",t),e.xp6(4),e.Q6J("ngIf",!o.required),e.xp6(1),e.Q6J("ngIf",!o.required&&!o.editable),e.xp6(1),e.Q6J("ngIf",i.registrationForm.get(o.name).hasError("required"))}}function Ge(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function He(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.not-ediable-msg")))}function $e(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"formTranslate"),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(9,L,e.gM2(3,4,t,o.context.userLang,"title","regFields")))," ")}}function We(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.msg.email-invalid")))}function ze(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"div",40)(2,"mat-form-field",13)(3,"mat-label"),e._uU(4),e.ALo(5,"formTranslate"),e.qZA(),e._UZ(6,"input",41),e.ALo(7,"formTranslate"),e.TgZ(8,"mat-hint"),e.YNc(9,Ge,3,3,"span",5),e.YNc(10,He,3,3,"span",5),e.qZA(),e.YNc(11,$e,4,11,"mat-error",5),e.YNc(12,We,3,3,"mat-error",5),e.qZA()(),e.BQk()),2&n){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(4),e.Oqu(e.gM2(5,7,t,o.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("formControlName",t.name)("placeholder",e.gM2(7,12,t,o.context.userLang,"example","regFields")),e.xp6(3),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngIf",!t.required&&!t.editable),e.xp6(1),e.Q6J("ngIf",o.registrationForm.get(t.name).hasError("required")),e.xp6(1),e.Q6J("ngIf",o.registrationForm.get(t.name).hasError("email"))}}function Xe(n,a){if(1&n&&(e.TgZ(0,"mat-option",22),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.s9C("value",t.code),e.xp6(1),e.hij(" ",t.code," ")}}function et(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.msg.phone-invalid")," "))}function tt(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",18)(2,"div")(3,"mat-form-field",13)(4,"mat-select",19),e.NdJ("input",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.handlePhoneInput())}),e.YNc(5,Xe,2,2,"mat-option",20),e.qZA()()(),e.TgZ(6,"div")(7,"mat-form-field",13)(8,"mat-label"),e._uU(9),e.ALo(10,"formTranslate"),e.qZA(),e.TgZ(11,"input",21),e.NdJ("input",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.handlePhoneInput())})("blur",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.handlePhoneInput())}),e.qZA(),e.YNc(12,et,3,3,"mat-error",5),e.qZA()()(),e.BQk()}if(2&n){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(5),e.Q6J("ngForOf",o.context.form.countryCodes),e.xp6(4),e.Oqu(e.gM2(10,4,t,o.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("errorStateMatcher",o.phoneErrorMatcher),e.xp6(1),e.Q6J("ngIf",o.registrationForm.hasError("phoneInvalid"))}}function nt(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function ot(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.l
1cZ(2,1,"crm.login.register-page.not-ediable-msg")))}function it(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"formTranslate"),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(9,L,e.gM2(3,4,t,o.context.userLang,"title","regFields")))," ")}}function rt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",42)(1,"mat-label"),e._uU(2),e.ALo(3,"formTranslate"),e.qZA(),e._UZ(4,"input",43)(5,"mat-datepicker-toggle",44),e.TgZ(6,"mat-datepicker",45,46),e.NdJ("yearSelected",function(i){e.CHM(t);const g=e.oxw().$implicit,v=e.oxw(2);return e.KtG(v.chosenYearHandler(i,g.name))})("monthSelected",function(i){e.CHM(t);const g=e.MAs(7),v=e.oxw().$implicit,B=e.oxw(2);return e.KtG(B.chosenMonthHandler(i,g,v.name))}),e.qZA(),e.TgZ(8,"mat-hint"),e.YNc(9,nt,3,3,"span",5),e.YNc(10,ot,3,3,"span",5),e.qZA(),e.YNc(11,it,4,11,"mat-error",5),e.qZA()}if(2&n){const t=e.MAs(7),o=e.oxw().$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(e.gM2(3,9,o,i.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("matDatepicker",t)("formControlName",o.name)("max",i.today)("disabled",!0),e.xp6(1),e.Q6J("for",t),e.xp6(4),e.Q6J("ngIf",!o.required),e.xp6(1),e.Q6J("ngIf",!o.required&&!o.editable),e.xp6(1),e.Q6J("ngIf",i.registrationForm.get(o.name).hasError("required"))}}function at(n,a){1&n&&(e.TgZ(0,"mat-option"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.membership.edit-profile.none")))}function ct(n,a){if(1&n&&(e.TgZ(0,"mat-option",22),e._uU(1),e.ALo(2,"formTranslate"),e.qZA()),2&n){const t=a.$implicit,o=e.oxw(5);e.s9C("value",t.code),e.xp6(1),e.Oqu(e.gM2(2,2,t,o.context.userLang,"name","regFields"))}}function st(n,a){if(1&n&&(e.TgZ(0,"mat-optgroup",48),e.ALo(1,"formTranslate"),e.YNc(2,ct,3,7,"mat-option",20),e.qZA()),2&n){const t=a.$implicit,o=e.oxw(4);e.Q6J("label",e.gM2(1,2,t,o.context.userLang,"name","regFields")),e.xp6(2),e.Q6J("ngForOf",t.subs)}}function lt(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function mt(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.not-ediable-msg")))}function gt(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",13)(1,"mat-label"),e._uU(2),e.ALo(3,"formTranslate"),e.qZA(),e.TgZ(4,"mat-select",39),e.YNc(5,at,3,3,"mat-option",5),e.YNc(6,st,3,7,"mat-optgroup",47),e.qZA(),e.TgZ(7,"mat-hint"),e.YNc(8,lt,3,3,"span",5),e.YNc(9,mt,3,3,"span",5),e.qZA()()),2&n){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(e.gM2(3,6,t,o.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("formControlName",t.name),e.xp6(1),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngForOf",o.context.form.regions),e.xp6(2),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngIf",!t.required&&!t.editable)}}function pt(n,a){if(1&n&&(e.ynx(0)(1,32),e.YNc(2,Ke,11,11,"mat-form-field",33),e.YNc(3,ze,13,17,"ng-container",34),e.YNc(4,tt,13,9,"ng-container",34),e.YNc(5,rt,12,14,"mat-form-field",35),e.YNc(6,gt,10,11,"mat-form-field",33),e.BQk()()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngSwitch",t.input),e.xp6(1),e.Q6J("ngSwitchCase","text"),e.xp6(1),e.Q6J("ngSwitchCase","email"),e.xp6(1),e.Q6J("ngSwitchCase","phone"),e.xp6(1),e.Q6J("ngSwitchCase","date"),e.xp6(1),e.Q6J("ngSwitchCase","region")}}function dt(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.register-page.msg.password-invalid"),""))}function _t(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(6,L,e.lcZ(3,4,"crm.login.register-page.confirm-password"))),""))}function ft(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.register-page.msg.confirm-password-not-same"),""))}const ut=function(n){return{brand:n}};function ht(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"form",26),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onConfirmRegister())}),e.YNc(2,pt,7,6,"ng-container",27),e.TgZ(3,"mat-form-field",28)(4,"mat-label"),e._uU(5),e.ALo(6,"translate"),e.qZA(),e._UZ(7,"input",29),e.TgZ(8,"mat-hint"),e._uU(9),e.ALo(10,"translate"),e.qZA(),e.YNc(11,dt,3,3,"mat-error",15),e.qZA(),e.TgZ(12,"mat-form-field",13)(13,"mat-label"),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"input",30),e.YNc(17,_t,4,8,"mat-error",15),e.YNc(18,ft,3,3,"mat-error",15),e.qZA(),e.TgZ(19,"mat-checkbox",31),e._uU(20),e.ALo(21,"translate"),e.qZA()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.registrationForm),e.xp6(1),e.Q6J("ngForOf",t.registerFields),e.xp6(3),e.Oqu(e.l
1cZ(6,9,"crm.login.register-page.password")),e.xp6(4),e.hij("",e.lcZ(10,11,"crm.login.register-page.password-hint")," "),e.xp6(2),e.Q6J("ngIf",t.registrationForm.controls.password.hasError("invalidPassword")),e.xp6(3),e.Oqu(e.lcZ(15,13,"crm.login.register-page.confirm-password")),e.xp6(3),e.Q6J("ngIf",t.registrationForm.controls.confirm.hasError("required")),e.xp6(1),e.Q6J("ngIf",t.registrationForm.controls.confirm.hasError("passwordNotEqual")),e.xp6(2),e.hij(" ",e.xi3(21,15,"crm.login.register-page.recieveBrandInfo",e.VKq(18,ut,(null==t.context.brand?null:t.context.brand.name)||(null==t.context.crm?null:t.context.crm.name)))," ")}}function xt(n,a){if(1&n&&(e.TgZ(0,"h1",56),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.email)}}function Ct(n,a){if(1&n&&(e.TgZ(0,"h1",56),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.phone)}}function bt(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(6,L,e.lcZ(3,4,"crm.login.register-page.verify-code"))),""))}function vt(n,a){1&n&&(e.TgZ(0,"mat-error",16),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.register-page.msg.code-incorrect"),""))}const Pt=function(){return{width:"100%",display:"flex","justify-content":"space-between"}},Zt=function(){return{width:"46px",height:"51px",background:"#f6f6f6","box-shadow":"0px 4px 8px rgba(0, 0, 0, 0.04)","border-radius":"13px",border:"0px",color:"primary"}},Tt=function(n,a){return{length:6,allowNumbersOnly:!0,containerStyles:n,inputStyles:a}},yt=function(n){return{time:n}};function Ot(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",49)(2,"h2",50),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.YNc(5,xt,2,1,"h1",51),e.YNc(6,Ct,2,1,"h1",51),e.TgZ(7,"ng-otp-input",52),e.NdJ("onInputChange",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onVerifyOtp())}),e.qZA(),e.YNc(8,bt,4,8,"mat-error",15),e.YNc(9,vt,3,3,"mat-error",15),e.TgZ(10,"h4",53),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"div",54)(14,"button",55),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.resendClicked())}),e._uU(15),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA()()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,10,"crm.login.register-page.enter-code-2")),e.xp6(2),e.Q6J("ngIf","email"===t.verificationType),e.xp6(1),e.Q6J("ngIf","phone"===t.verificationType),e.xp6(1),e.Q6J("formCtrl",t.verificationCode)("config",e.WLB(21,Tt,e.DdM(19,Pt),e.DdM(20,Zt))),e.xp6(1),e.Q6J("ngIf",t.verificationCode.touched&&t.verificationCode.hasError("required")),e.xp6(1),e.Q6J("ngIf",t.verificationCode.hasError("codeIncorrect")),e.xp6(2),e.Oqu(e.lcZ(12,12,"crm.login.register-page.did-not-receive")),e.xp6(3),e.Q6J("disabled",t.resendOtpTime>0),e.xp6(1),e.Oqu(t.resendOtpTime>0?e.xi3(16,14,"crm.login.register-page.resend-code",e.VKq(24,yt,t.resendOtpTime)):e.lcZ(17,17,"crm.login.register-page.resend-btn"))}}function wt(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",57),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onConfirmEmail())}),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()}2&n&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"crm.login.submit-form")," "))}function Mt(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",58),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.onConfirmRegister())}),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()}2&n&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"crm.login.submit-form")," "))}function Ft(n,a){if(1&n&&(e.TgZ(0,"div",7),e._UZ(1,"app-img",8),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("content",t.context.brand)}}const q=function(n){return{item:n}};function It(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.bind-card-page.msg.is-required",e.VKq(6,q,e.lcZ(3,4,"crm.login.bind-card-page.member-card-no")))," "))}function qt(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"h2",9),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"form",10),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.handleCardNoSubmit())}),e.TgZ(5,"mat-form-field",11)(6,"mat-label"),e._uU(7),e.ALo(8,"translate"),e.qZA(),e._UZ(9,"
1input",12),e.YNc(10,It,4,8,"mat-error",4),e.qZA()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(2),e.Oqu(e.lcZ(3,4,"crm.login.bind-card-page.pls-enter-card")),e.xp6(2),e.Q6J("formGroup",t.cardForm),e.xp6(3),e.Oqu(e.lcZ(8,6,"crm.login.bind-card-page.member-card-no")),e.xp6(3),e.Q6J("ngIf",t.cardForm.get("card").hasError("required"))}}function kt(n,a){if(1&n&&(e._UZ(0,"input",26),e.ALo(1,"formTranslate")),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.Q6J("formControlName",t.name)("placeholder",e.gM2(1,2,t,o.context.userLang,"example","regFields"))}}function Nt(n,a){1&n&&(e.TgZ(0,"mat-option"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.membership.edit-profile.none")))}function Lt(n,a){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.ALo(2,"formTranslate"),e.qZA()),2&n){const t=a.$implicit,o=e.oxw(5);e.s9C("value",t.value),e.xp6(1),e.hij(" ",e.gM2(2,2,t,o.context.userLang,"display","regFields"),"")}}function Jt(n,a){if(1&n&&(e.TgZ(0,"mat-select",27),e.YNc(1,Nt,3,3,"mat-option",4),e.YNc(2,Lt,3,7,"mat-option",28),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.Q6J("formControlName",t.name),e.xp6(1),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngForOf",t.options)}}function Qt(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function St(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.not-ediable-msg")))}function Ut(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"formTranslate"),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(9,q,e.gM2(3,4,t,o.context.userLang,"title","regFields")))," ")}}function Yt(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",11)(1,"mat-label"),e._uU(2),e.ALo(3,"formTranslate"),e.qZA(),e.YNc(4,kt,2,7,"input",24),e.YNc(5,Jt,3,3,"ng-template",null,25,e.W1O),e.TgZ(7,"mat-hint"),e.YNc(8,Qt,3,3,"span",4),e.YNc(9,St,3,3,"span",4),e.qZA(),e.YNc(10,Ut,4,11,"mat-error",4),e.qZA()),2&n){const t=e.MAs(6),o=e.oxw().$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(e.gM2(3,6,o,i.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("ngIf",!o.options||(null==o?null:o.options.length)<=0)("ngIfElse",t),e.xp6(4),e.Q6J("ngIf",!o.required),e.xp6(1),e.Q6J("ngIf",!o.required&&!o.editable),e.xp6(1),e.Q6J("ngIf",i.registerForm.get(o.name).hasError("required"))}}function Et(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function Rt(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.not-ediable-msg")))}function Bt(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"formTranslate"),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(9,q,e.gM2(3,4,t,o.context.userLang,"title","regFields")))," ")}}function jt(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.msg.email-invalid")))}function Vt(n,a){if(1&n&&(e.ynx(0),e.TgZ(1,"div",30)(2,"mat-form-field",11)(3,"mat-label"),e._uU(4),e.ALo(5,"formTranslate"),e.qZA(),e._UZ(6,"input",31),e.ALo(7,"formTranslate"),e.TgZ(8,"mat-hint"),e.YNc(9,Et,3,3,"span",4),e.YNc(10,Rt,3,3,"span",4),e.qZA(),e.YNc(11,Bt,4,11,"mat-error",4),e.YNc(12,jt,3,3,"mat-error",4),e.qZA()(),e.BQk()),2&n){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(4),e.Oqu(e.gM2(5,7,t,o.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("formControlName",t.name)("placeholder",e.gM2(7,12,t,o.context.userLang,"example","regFields")),e.xp6(3),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngIf",!t.required&&!t.editable),e.xp6(1),e.Q6J("ngIf",o.registerForm.get(t.name).hasError("required")),e.xp6(1),e.Q6J("ngIf",o.registerForm.get(t.name).hasError("email"))}}function Dt(n,a){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.s9C("value",t.code),e.xp6(1),e.hij(" ",t.code," ")}}function Kt(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.msg.phone-invalid")," "))}function Gt(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",32)(2,"div")(3,"mat-form-field",11)(4,"mat-select",33),e.NdJ("input",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.handlePhoneInput())}),e.YNc(5,Dt,2,2,"mat-option",28),e.qZA()()(),e.TgZ(6,"div")(7,"mat-form-field",11)(8,"mat-label"),e._uU(9),e.ALo(10,"formTranslate"),e.qZA(),e.TgZ(11,"input",34),e.NdJ("input",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.handlePhoneInput())})("blur",function(){e.CHM(t);const i=e.oxw(3);return e.KtG(i.handlePhoneInput())}),e.qZA(),e.YNc(12,Kt,3,3,"mat-error",4),e.qZA()()(),e.BQk()}if(2&n){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(5),e.Q6J("ngForOf",o.context.form.countryCodes),e.xp6(4),e.Oqu(e.gM2(10,4,t,o.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("errorStateMatcher",o.phoneErrorMatcher),e.xp6(1),e.Q6J("ngIf",o.registerForm.hasError("phoneInvalid"))}}function Ht(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function $t(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.l
1cZ(2,1,"crm.login.register-page.not-ediable-msg")))}function Wt(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"formTranslate"),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(9,q,e.gM2(3,4,t,o.context.userLang,"title","regFields")))," ")}}function zt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",35)(1,"mat-label"),e._uU(2),e.ALo(3,"formTranslate"),e.qZA(),e._UZ(4,"input",36)(5,"mat-datepicker-toggle",37),e.TgZ(6,"mat-datepicker",38,39),e.NdJ("yearSelected",function(i){e.CHM(t);const g=e.oxw().$implicit,v=e.oxw(2);return e.KtG(v.chosenYearHandler(i,g.name))})("monthSelected",function(i){e.CHM(t);const g=e.MAs(7),v=e.oxw().$implicit,B=e.oxw(2);return e.KtG(B.chosenMonthHandler(i,g,v.name))}),e.qZA(),e.TgZ(8,"mat-hint"),e.YNc(9,Ht,3,3,"span",4),e.YNc(10,$t,3,3,"span",4),e.qZA(),e.YNc(11,Wt,4,11,"mat-error",4),e.qZA()}if(2&n){const t=e.MAs(7),o=e.oxw().$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(e.gM2(3,9,o,i.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("matDatepicker",t)("formControlName",o.name)("max",i.today)("disabled",!0),e.xp6(1),e.Q6J("for",t),e.xp6(4),e.Q6J("ngIf",!o.required),e.xp6(1),e.Q6J("ngIf",!o.required&&!o.editable),e.xp6(1),e.Q6J("ngIf",i.registerForm.get(o.name).hasError("required"))}}function Xt(n,a){1&n&&(e.TgZ(0,"mat-option"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.membership.edit-profile.none")))}function en(n,a){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.ALo(2,"formTranslate"),e.qZA()),2&n){const t=a.$implicit,o=e.oxw(5);e.s9C("value",t.code),e.xp6(1),e.Oqu(e.gM2(2,2,t,o.context.userLang,"name","regFields"))}}function tn(n,a){if(1&n&&(e.TgZ(0,"mat-optgroup",41),e.ALo(1,"formTranslate"),e.YNc(2,en,3,7,"mat-option",28),e.qZA()),2&n){const t=a.$implicit,o=e.oxw(4);e.Q6J("label",e.gM2(1,2,t,o.context.userLang,"name","regFields")),e.xp6(2),e.Q6J("ngForOf",t.subs)}}function nn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij("",e.lcZ(2,1,"crm.login.register-page.optional")," "))}function on(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"crm.login.register-page.not-ediable-msg")))}function rn(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",11)(1,"mat-label"),e._uU(2),e.ALo(3,"formTranslate"),e.qZA(),e.TgZ(4,"mat-select",27),e.YNc(5,Xt,3,3,"mat-option",4),e.YNc(6,tn,3,7,"mat-optgroup",40),e.qZA(),e.TgZ(7,"mat-hint"),e.YNc(8,nn,3,3,"span",4),e.YNc(9,on,3,3,"span",4),e.qZA()()),2&n){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(2),e.Oqu(e.gM2(3,6,t,o.context.userLang,"title","regFields")),e.xp6(2),e.Q6J("formControlName",t.name),e.xp6(1),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngForOf",o.context.form.regions),e.xp6(2),e.Q6J("ngIf",!t.required),e.xp6(1),e.Q6J("ngIf",!t.required&&!t.editable)}}function an(n,a){if(1&n&&(e.ynx(0)(1,20),e.YNc(2,Yt,11,11,"mat-form-field",21),e.YNc(3,Vt,13,17,"ng-container",22),e.YNc(4,Gt,13,9,"ng-container",22),e.YNc(5,zt,12,14,"mat-form-field",23),e.YNc(6,rn,10,11,"mat-form-field",21),e.BQk()()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngSwitch",t.input),e.xp6(1),e.Q6J("ngSwitchCase","text"),e.xp6(1),e.Q6J("ngSwitchCase","email"),e.xp6(1),e.Q6J("ngSwitchCase","phone"),e.xp6(1),e.Q6J("ngSwitchCase","date"),e.xp6(1),e.Q6J("ngSwitchCase","region")}}function cn(n,a){1&n&&(e.TgZ(0,"mat-error",42),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.register-page.msg.password-invalid"),""))}function sn(n,a){1&n&&(e.TgZ(0,"mat-error",42),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.register-page.msg.is-required",e.VKq(6,q,e.lcZ(3,4,"crm.login.register-page.confirm-password"))),""))}function ln(n,a){1&n&&(e.TgZ(0,"mat-error",42),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.register-page.msg.confirm-password-not-same"),""))}const mn=function(n){return{brand:n}};function gn(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"form",13),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.handleInformationSubmit())}),e.YNc(2,an,7,6,"ng-container",14),e.TgZ(3,"mat-form-field",15)(4,"mat-label"),e._uU(5),e.ALo(6,"translate"),e.qZA(),e._UZ(7,"input",16),e.TgZ(8,"mat-hint"),e._uU(9),e.ALo(10,"translate"),e.qZA(),e.YNc(11,cn,3,3,"mat-error",17),e.qZA(),e.TgZ(12,"mat-form-field",11)(13,"mat-label"),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"input",18),e.YNc(17,sn,4,8,"mat-error",17),e.YNc(18,ln,3,3,"mat-error",17),e.qZA(),e.TgZ(19,"mat-checkbox",19),e._uU(20),e.ALo(21,"translate"),e.qZA()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("formGroup",t.registerForm),e.xp6(1),e.Q6J("ngForOf",t.registerFields),e.xp6(3),e.Oqu(e.l
1cZ(6,9,"crm.login.register-page.password")),e.xp6(4),e.hij("",e.lcZ(10,11,"crm.login.register-page.password-hint")," "),e.xp6(2),e.Q6J("ngIf",t.registerForm.controls.password.hasError("invalidPassword")),e.xp6(3),e.Oqu(e.lcZ(15,13,"crm.login.register-page.confirm-password")),e.xp6(3),e.Q6J("ngIf",t.registerForm.controls.confirm.hasError("required")),e.xp6(1),e.Q6J("ngIf",t.registerForm.controls.confirm.hasError("passwordNotEqual")),e.xp6(2),e.hij(" ",e.xi3(21,15,"crm.login.register-page.recieveBrandInfo",e.VKq(18,mn,(null==t.context.brand?null:t.context.brand.name)||(null==t.context.crm?null:t.context.crm.name)))," ")}}function pn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",48),e.NdJ("click",function(){e.CHM(t);const i=e.oxw(2);return e.KtG(i.clearCodeInput())}),e.TgZ(1,"mat-icon"),e._uU(2,"close"),e.qZA()()}}function dn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.ALo(3,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.xi3(2,1,"crm.login.bind-card-page.msg.is-required",e.VKq(6,q,e.lcZ(3,4,"crm.login.register-page.verify-code"))),""))}function _n(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&n&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"crm.login.bind-card-page.msg.code-incorrect"),""))}const fn=function(n){return{mode:n}},un=function(n){return{time:n}};function hn(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",43)(2,"h4"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"form",44),e.NdJ("submit",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.handleVerifyCodeSubmit())}),e.TgZ(6,"mat-form-field",11)(7,"mat-label"),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"input",45),e.NdJ("input",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.handleCodeInput())}),e.qZA(),e.YNc(11,pn,3,0,"button",46),e.YNc(12,dn,4,8,"mat-error",4),e.YNc(13,_n,3,3,"mat-error",4),e.qZA()(),e.TgZ(14,"button",47),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.resendOtp())}),e._uU(15),e.ALo(16,"translate"),e.ALo(17,"translate"),e.qZA()(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(3),e.hij("",e.xi3(4,8,"crm.login.bind-card-page.verification-sent",e.VKq(18,fn,"phone"===t.verificationType?t.phone:t.registerForm.get("email").value))," "),e.xp6(2),e.Q6J("formGroup",t.verifyForm),e.xp6(3),e.Oqu(e.lcZ(9,11,"crm.login.register-page.verify-code")),e.xp6(3),e.Q6J("ngIf",t.codeValue),e.xp6(1),e.Q6J("ngIf",t.verifyForm.get("code").hasError("required")),e.xp6(1),e.Q6J("ngIf",t.verifyForm.get("code").hasError("codeIncorrect")),e.xp6(1),e.Q6J("disabled",t.resendOtpTime>0),e.xp6(1),e.Oqu(t.resendOtpTime>0?e.xi3(16,13,"crm.login.bind-card-page.resend-timer",e.VKq(20,un,t.resendOtpTime)):e.lcZ(17,16,"crm.login.bind-card-page.resend-code"))}}function xn(n,a){1&n&&(e.ynx(0),e.TgZ(1,"button",49),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&n&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"crm.login.bind-card-page.verify-card")," "))}function Cn(n,a){1&n&&(e.ynx(0),e.TgZ(1,"button",50),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&n&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"crm.login.bind-card-page.continue")," "))}function bn(n,a){1&n&&(e.ynx(0),e.TgZ(1,"button",51),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&n&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"crm.login.bind-card-page.back-login")," "))}const Pn=[{path:"",component:ae,canActivate:[k.d]},{path:"reset",component:Me,canActivate:[k.d]},{path:"register",component:(()=>{class n extends A.nh{constructor(t,o,i){super(t),this.loginService=o,this.agreementService=i,this.marketingDefault=!0,this.email=null,this.phone=null,this.countryCode=null,this.passiveAgreement=[],this.activeAgreement=[],this.resendOtpTime=0,this.isOtpLoading=!1,this.token="",this.datePickerSkipDay=!1,this.prefilledFields={},this.stage=1,this.verificationType="phone",this.loginData={appleId:"",firstName:"",lastName:"",countryCode:this.context.form.countryCode,phone:"",email:"",birthDate:""},this.today=I()(),this.phoneMap=(0,V.Z)((0,D.Z)(Ae.YQ),(g,v)=>"+"+v),this.loginData={...this.loginData,...window.history.state.loginData},this.marketingDefault=this.settingManager.get("marketingDefault",!0),this.phoneErrorMatcher=new R.n("phoneInvalid"),this.prefilledFields={countryCode:this.context.form.countryCode||""}}ngOnInit(){this.verificationType=this.context.crm?.verificationType;const t="email"===this.verificationType?[r.kI.email,r.kI.pattern(/^((?!\+).)*$/)]:[];this.checkForm=new r.cw({[this.verificationType]:new r.NI(this.loginData[this.verificationType],[r.kI.required,...t]),..."phone"===this.verificationType&&{countryCode:new r.NI(this.loginData.countryCode,[r.kI.required])}},{..."phone"===this.verificationType&&{validators:N.i}}),this.registerFields=this.context?.form?.regFields||[],this.registrationForm=this.generateForm(),this.verificationCode=new r.NI("",[r.k
1I.required]),this.passiveAgreement=this.agreementService.agreementSorting("register","passive"),this.activeAgreement=this.agreementService.agreementSorting("register","active")}generateForm(){const t={},o=[];return this.registerFields.forEach(i=>{const g=[];i.required&&g.push(r.kI.required),"phone"===i.input&&"phone"===i.name?(t.phone=new r.NI(this.prefilledFields.phone||"",g),t.countryCode=new r.NI(this.prefilledFields.countryCode||"",g),o.push(N.i)):t[i.name]=new r.NI(this.prefilledFields[i.name]||"",g)}),t.password=new r.NI("",[r.kI.required,r.kI.minLength(8),Z.passwordFormatValidator]),t.confirm=new r.NI("",[r.kI.required,r.kI.minLength(8),Z.confirmPasswordFormatValidator]),o.push(j.q6),t.marketing=new r.NI(!0),new r.cw(t,{validators:o})}sendCheck(){this.dialogService.superloading(!0),this.checkForm.disable(),("phone"===this.verificationType?this.loginService.checkPhoneAccount(this.checkForm.get("countryCode").value,this.checkForm.get("phone").value):this.loginService.checkEmailAccount(this.checkForm.get("email").value)).subscribe({next:o=>{this.dialogService.superloading(!1),this.checkForm.enable(),this.email=this.checkForm.get("email")?.value,this.phone=this.checkForm.get("phone")?.value,this.countryCode=this.checkForm.get("countryCode")?.value,o?.exist?.[this.verificationType]?o?.flow.indexOf("verify")>=0?(this.stage=3,this.getOtp()):this.dialogService.showAlert("",this.t.instant("crm.login.register-page.member-exists")):(this.registerFields.find(i=>i.name===this.verificationType)&&(this.registrationForm?.get(this.verificationType).setValue(this.checkForm.get(this.verificationType).value),this.registrationForm?.get(this.verificationType).disable(),"phone"===this.verificationType&&this.registrationForm?.get("countryCode").setValue(this.checkForm.get("countryCode").value),"phone"===this.verificationType&&this.registrationForm?.get("countryCode").disable()),this.stage=2)},error:()=>{this.dialogService.superloading(!1),this.checkForm.enable(),this.stage=2}})}handlePhoneInput(){const t=this.registrationForm.get("phone").value,o=this.registrationForm.get("countryCode").value,i=(0,Z.isPhoneValid)(t,this.phoneMap[o]);if(!i)return this.registrationForm.get("phone").setErrors({phoneInvalid:!0});this.phoneValid=i}chosenYearHandler(t,o){const i=this.registrationForm.get(o).value||I()();i.year(t.year()),this.registrationForm.get(o).setValue(i)}chosenMonthHandler(t,o,i){const g=this.registrationForm.get(i).value||I()();g.month(t.month()),this.registrationForm.get(i).setValue(g),this.datePickerSkipDay&&o.close()}onConfirmEmail(){this.checkForm.invalid||(this.activeAgreement?.length>0?this.displayActiveAgreement():this.sendCheck())}onConfirmRegister(){this.registrationForm.invalid?this.clearPasswordField():this.registerAndOtp()}onVerifyOtp(){const t=this.verificationCode.value;t.length>=(this.context.crm?.extra?.otpLength||6)?(this.dialogService.superloading(!0),this.verificationCode.disable(),"email"===this.verificationType?this.loginService.verifyEmailCode(this.email,t).subscribe(i=>{this.dialogService.superloading(!1),this.verificationCode.enable(),i?(this.dialogService.showAlert("",this.t.instant("crm.login.register-page.msg.register-success")),this.goLogin()):(this.verificationCode.setValue(""),this.ngOtpInput?.setValue(""),this.verificationCode.setErrors({codeIncorrect:!0}))},i=>{this.dialogService.superloading(!1),this.verificationCode.enable(),this.verificationCode.setValue(""),this.ngOtpInput?.setValue(""),this.verificationCode.setErrors({codeIncorrect:!0})}):this.loginService.verifySmsCode(this.countryCode,this.phone,t).subscribe(i=>{this.dialogService.superloading(!1),this.verificationCode.enable(),i?(this.dialogService.showAlert("",this.t.instant("crm.login.register-page.msg.register-success")),this.goLogin()):(this.verificationCode.setValue(""),this.ngOtpInput?.setValue(""),this.verificationCode.setErrors({codeIncorrect:!0}))},i=>{this.verificationCode.enable(),this.dialogService.superloading(!1),this.verificationCode.setValue(""),this.ngOtpInput?.setValue(""),this.verificationCode.setErrors({codeIncorrect:!0})})):this.registrationForm.updateValueAndValidity()}clearPasswordField(){this.registrationForm.get("password").setValue(null),this.registrationForm.get("confirm").setValue(null)}displayActiveAgreement(){const t=this.routingService.getAuxProfile()?.id??2;this.agreementService.showListofAgreements("register",this.activeAgreement,()=>{this.sendCheck(),this.routingService.navigateCloseModalTo(t)},()=>{this.clearPasswordField(),this.routingService.navigateCloseModalTo(t)},{autoClose:!1})}displayPassiveAgreement(){this.agreementService.showAgreement(this.passiveAgreement,"register",!0,!1)}getOtp(){this.isOtpLoading=!0,this.registerAndOtp()}checkEmailClicked(){this.sendCheck()}registerAndOtp(){const t={};this.registerFields.forEach(i=>
1{"phone"===i.input&&"phone"===i.name?(t.phone=this.registrationForm.get("phone").value||this.checkForm.get("phone").value,t.countryCode=this.registrationForm.get("countryCode").value||this.checkForm.get("countryCode").value):t[i.name]="date"===i.input?this.registrationForm.get(i.name).value?this.registrationForm.get(i.name).value.format("YYYY-MM-DD"):null:this.registrationForm.get(i.name).value}),t.verify="before",t.type=this.verificationType,t.brandId=this.context.brandId,t.password=this.registrationForm.get("password").value,t.confirm=this.registrationForm.get("confirm").value,t.marketing=this.registrationForm.get("marketing").value,this.dialogService.superloading(!0),this.registrationForm.disable(),this.dataService.postWithParams("/api/v1/menu/member.json",t).subscribe({next:i=>{this.dialogService.superloading(!1),this.registrationForm.enable(),i&&(this.stage=3,this.isOtpLoading=!1,this.resetOtpTimer())},error:i=>{this.dialogService.superloading(!1),this.registrationForm.enable(),this.dialogService.showError(i)}})}resendClicked(){this.getOtp()}goLogin(){this.routingService.navigateModal(`auth/login/brand/${this.context.brandId}`)}setMember(t){this.memberContext.setMember(t),this.context.save()}resetOtpTimer(){this.resendOtpTime=30;const t=setInterval(()=>{this.resendOtpTime--,this.resendOtpTime<=0&&clearInterval(t)},1e3)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.zs3),e.Y36(J.r),e.Y36(K.f))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-register-page"]],viewQuery:function(t,o){if(1&t&&e.Gf(m.df,5),2&t){let i;e.iGM(i=e.CRH())&&(o.ngOtpInput=i.first)}},features:[e.qOj],decls:12,vars:8,consts:[[1,"top-container"],["nav","",3,"back","close"],["center","",1,"content"],["class","login-logo",4,"ngIf"],[1,"input-wrapper"],[4,"ngIf"],[1,"footer"],[1,"btn-panel"],[1,"login-logo"],["imgName","logo",3,"content"],["id","checkForm",3,"formGroup","submit"],["appearance","fill","class","input-field",4,"ngIf"],["class","terms",4,"ngIf"],["appearance","fill",1,"input-field"],["matInput","","type","email","maxlength","50","formControlName","email","name","email","data-testid","email-input-field","ngDefaultControl","","autofocus","","autocomplete","username"],["class","error-msg",4,"ngIf"],[1,"error-msg"],[3,"innerHTML"],[1,"country-code"],["formControlName","countryCode","ngDefaultControl","",3,"input"],[3,"value",4,"ngFor","ngForOf"],["matInput","","formControlName","phone","type","tel",3,"errorStateMatcher","input","blur"],[3,"value"],[1,"terms"],[3,"innerText"],[3,"click"],["id","registrationForm",3,"formGroup","submit"],[4,"ngFor","ngForOf"],["appearance","fill",1,"input-field","input-password"],["matInput","","type","password","autocomplete","new-password","formControlName","password","data-testid","input-password-field"],["matInput","","type","password","autocomplete","new-password","formControlName","confirm","data-testid","input-confirm-password-field"],["formControlName","marketing",1,"input-checkbox"],[3,"ngSwitch"],["appearance","fill","class","input-field",4,"ngSwitchCase"],[4,"ngSwitchCase"],["appearance","fill","class","birthday-select input-field",4,"ngSwitchCase"],["matInput","",3,"formControlName","placeholder",4,"ngIf","ngIfElse"],["selector",""],["matInput","",3,"formControlName","placeholder"],[3,"formControlName"],[1,"email-input"],["matInput","","type","email",3,"formControlName","placeholder"],["appearance","fill",1,"birthday-select","input-field"],["matInput","",3,"matDatepicker","formControlName","max","disabled"],["matSuffix","",3,"for"],["disabled","false","startView","multi-year","disabled","false",3,"yearSelected","monthSelected"],["bdPicker",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"stageFour"],[1,"enter-code"],["class","email-text",4,"ngIf"],["name","verificationCode",3,"formCtrl","config","onInputChange"],[1,"did-not-receive-text"],[1,"re-send"],["mat-button","",1,"re-send-btn",3,"disabled","click"],[1,"email-text"],["mat-raised-button","","type","button","tabindex","4","form","checkForm","data-testid","register-confirm-button",1,"btn-register",3,"click"],["mat-raised-button","","type","button","tabindex","4","form","registrationForm","data-testid","email-register-confirm-button",1,"btn-register",3,"click"]],template:function(t,o){1&t&&(e.TgZ(0,"app-container-layout",0),e._UZ(1,"app-sub-bar",1),e.TgZ(2,"div",2),e.YNc(3,Ie,2,1,"div",3),e.TgZ(4,"div",4),e.YNc(5,Ue,5,4,"ng-container",5),e.YNc(6,ht,22,20,"ng-container",5),e.YNc(7,Ot,18,26,"ng-container",5),e.qZA(),e.TgZ(8,"div",6)(9,"div",7),e.YNc(10,wt,4,3,"ng-container",5),e.YNc(11,Mt,4,3,"ng-container",5),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("back",!0)("close",!1),e.xp6(2),e.Q6J("ngIf",1===o.stage),e.xp6(2),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",2===o.stage),e.xp6(1),e.Q6J("ngIf",3===o.stage),e.xp6(3),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",2===o.stage))},dependencies:[p.sg,p.O5,p.RF,p.n9,c.lW,h.TO,h.KE,h.bx,h.hX,h.R9,C.Nt,r._Y,r.Fj,r.JJ,r.JL,r.nD,r.sg,r.u,P.gD,F.ey,F.Nv,y.oG,b.Mq,b.hl,b.nW,Y.g,Q.L,S.v,m.df,p.rS,G.l,f.X$],styles:['[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden;background:white}.top-container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden}.img-box[_ngcontent-%COMP%]{position:relative;overflow:hidden;background:transparent;background-size:cover;background-repeat:no-repeat;background-position:center center}.img-box[_ngcontent-%COMP%]:before{content:"";display:block;padding-top:var(--image-ratio)}.img-box[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{object-fit:cover;object-position:center;position:absolute;inset:0;color:#fff;text-align:center;width:100%}.content[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;overflow:auto;position:relative;height:100%}.is-contains-channel[_ngcontent-%COMP%]   .login-logo[_ngcontent-%COMP%]{width:8rem;margin:0}.login-logo[_ngcontent-%COMP%]{width:100%;margin:1rem 0;transition:all .8s ease-in-out;display:flex;justify-content:center}.login-logo[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:12rem}.login-box[_ngcontent-%COMP%]{margin:1rem 2rem;width:calc(100% - 4rem);display:flex;flex-direction:column;flex:1}.login-box[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{text-align:center;padding-bottom:1rem}.login-box[_ngcontent-%COMP%]   .email-text[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.5rem;text-align:center;font-weight:bolder}.login-box[_ngcontent-%COMP%]   .enter-code[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.4rem;text-align:center}.login-box[_ngcontent-%COMP%]   .did-not-receive-text[_ngcontent-%COMP%]{margin-top:2rem;color:#c1c1c1;text-align:center}
1.login-box[_ngcontent-%COMP%]   .resend-code-text[_ngcontent-%COMP%]{color:#9c9c9c;margin-top:.5rem;text-align:center;text-decoration:underline;font-size:large}.login-box[_ngcontent-%COMP%]   .terms[_ngcontent-%COMP%]{font-size:.9rem;line-height:1.3em;color:#8d8d8d}.login-box[_ngcontent-%COMP%]   .terms[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700}.input-wrapper[_ngcontent-%COMP%]{width:100%}.input-wrapper[_ngcontent-%COMP%]   form[_ngcontent-%COMP%]{margin:1rem 2rem}.terms[_ngcontent-%COMP%]{color:#8d8d8d;font-size:.9rem;line-height:1.5em;padding:0 .5rem}.input-field[_ngcontent-%COMP%] {width:100%}.input-field[_ngcontent-%COMP%]  input{caret-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-wrapper{font-size:1rem;line-height:1.2em;margin-bottom:.5rem}.input-field[_ngcontent-%COMP%]  .mat-form-field-flex{background:#f6f6f6;box-shadow:0 4px 8px #0000000a;border-radius:17px}.input-field[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-label{color:#888}.input-field[_ngcontent-%COMP%]  .mat-form-field-underline{background-color:#333;display:none}.input-field[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field[_ngcontent-%COMP%]  .mat-error{color:var(--W);line-height:1.1em}.input-field[_ngcontent-%COMP%]  .mat-select-value-text, .input-field[_ngcontent-%COMP%]  .mat-select-arrow{color:#333}.input-field[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.55rem)}.input-field[_ngcontent-%COMP%]  .mat-form-field-infix{width:auto}.input-password[_ngcontent-%COMP%]{margin-bottom:1.5rem}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-label{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-input-element{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label .mat-form-field-required-marker{color:var(--W)}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:var(--W)}.input-sub-link[_ngcontent-%COMP%]{text-align:right;text-decoration-line:underline;text-transform:uppercase;color:#9d9d9d;font-size:.7rem}.input-checkbox[_ngcontent-%COMP%] {font-family:var(--CF0);font-size:.9rem}.input-checkbox[_ngcontent-%COMP%]  .mat-checkbox-layout{white-space:initial}.input-checkbox[_ngcontent-%COMP%]  .mat-checkbox-label{line-height:1.5em;letter-spacing:.2px;color:#666}.country-code[_ngcontent-%COMP%]{display:flex;align-items:flex-start;flex-wrap:wrap}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:6rem}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){flex:1 1 8rem;width:8rem;margin:0 0 0 .5rem}.country-code[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.5rem)}.stageFour[_ngcontent-%COMP%]{margin:1rem 2rem;display:flex;align-items:center;flex-direction:column}.stageFour[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-bottom:1rem;font-size:1.1rem;text-align:center}.stageFour[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.stageFour[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-top:2rem;color:#c1c1c1;text-align:center}.stageFour[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex;justify-content:center;color:#a4a4a4}.stageFour[_ngcontent-%COMP%]   ng-otp-input[_ngcontent-%COMP%]{margin-top:1.5rem;width:100%;display:flex;flex-direction:column;align-items:center}.stageFour[_ngcontent-%COMP%]   .re-send-btn[_ngcontent-%COMP%]{color:#9c9c9c;margin-top:.5rem;text-align:center;text-decoration:underline;font-size:1rem;font-family:var(--CF0);line-height:1.1em}.stageFour[_ngcontent-%COMP%]   .error-msg[_ngcontent-%COMP%]{text-align:center;margin-top:1.3rem}.footer[_ngcontent-%COMP%]{width:100%;background:#fff;position:relative;box-shadow:none;background:transparent;display:flex;justify-content:end}.footer[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;width:100%;padding:2rem}.footer[_ngcontent-%COMP%]   .btn-login[_ngcontent-%COMP%]{margin-right:1rem;background:#ffffff;border-radius:7px;width:100%;color:var(--A);box-shadow:-4px 13px 53px #e41e263d}.footer[_ngcontent-%COMP%]   .btn-register[_ngcontent-%COMP%]{background:#e41e26;box-shadow:-4px 13px 53px #e41e263d;border-radius:14px;width:100%;color:#fff}']}),n})(),canActivate:[k.d],data:{reuse:!0}},{path:"bind",component:(()=>{class n extends A.nh{constructor(t,o){super(t),this.agreementService=o,this.stage=1,this.passiveAgreement=[],this.datePickerSkipDay=!1,this.resendOtpTime=0,this.today=I()(),this.phoneErrorMatcher=new R.n("phoneInvalid"),this.marketingDefault=this.settingManager.get("marketingDefault",!0),this.phoneErrorMatcher=new R.n("phoneInvalid"),this.prefilledFields={countryCode:this.context.form.countryCode||""}}
1ngOnInit(){this.cardForm=new r.cw({card:new r.NI("",[r.kI.required])}),this.registerFields=this.context?.form?.regFields||[],this.registerForm=this.generateForm(),this.verificationType=this.context.crm.verificationType,this.verifyForm=new r.cw({code:new r.NI("",[r.kI.required])}),this.phoneMap=(0,V.Z)((0,D.Z)(Z.countryCallingCodes),(t,o)=>"+"+o),this.passiveAgreement=this.agreementService.agreementSorting("register")}generateForm(){const t={},o=[];return this.registerFields.forEach(i=>{const g=[];i.required&&g.push(r.kI.required),"email"===i.input&&(g.push(r.kI.email),g.push(r.kI.pattern(/^((?!\+).)*$/))),"phone"===i.input&&"phone"===i.name?(t.phone=new r.NI(this.prefilledFields.phone||"",g),t.countryCode=new r.NI(this.prefilledFields.countryCode||"",g),o.push(N.i)):t[i.name]=new r.NI(this.prefilledFields[i.name]||"",g)}),t.password=new r.NI("",[r.kI.required,r.kI.minLength(8),Z.passwordFormatValidator]),t.confirm=new r.NI("",[r.kI.required,r.kI.minLength(8),Z.confirmPasswordFormatValidator]),o.push(j.q6),t.marketing=new r.NI(this.marketingDefault),new r.cw(t,{validators:o})}handleCardNoSubmit(){this.cardForm.invalid||(this.dialogService.superloading(!0),this.dataService.postWithParams("/api/v1/login/check.json",{brandId:this.context.brandId,code:this.cardForm.get("card").value}).subscribe({next:o=>{this.dialogService.superloading(!1),this.token=o.token,o.exist?.code?this.token?this.stage=2:this.dialogService.showAlert("",this.t.instant("crm.login.bind-card-page.card-binded")):this.dialogService.showAlert("",this.t.instant("crm.login.bind-card-page.card-no-exist"))},error:o=>{this.dialogService.superloading(!1),this.dialogService.showError(o)}}))}handlePhoneInput(){const t=this.registerForm.get("phone").value,o=this.registerForm.get("countryCode").value,i=(0,Z.isPhoneValid)(t,this.phoneMap[o]);if(!i)return this.registerForm.get("phone").setErrors({phoneInvalid:!0});this.phoneValid=i,this.phone=`${o} ${t}`}chosenYearHandler(t,o){const i=this.registerForm.get(o).value||I()();i.year(t.year()),this.registerForm.get(o).setValue(i)}chosenMonthHandler(t,o,i){const g=this.registerForm.get(i).value||I()();g.month(t.month()),this.registerForm.get(i).setValue(g),this.datePickerSkipDay&&o.close()}
1handleInformationSubmit(){this.registerForm.invalid||(0===this.passiveAgreement?.length?this.displayAgreement():this.sendRegisterData())}sendRegisterData(){this.resetOtpTimer();const o={};this.registerFields.forEach(i=>{"phone"===i.input&&"phone"===i.name?(o.phone=this.registerForm.get("phone").value,o.countryCode=this.registerForm.get("countryCode").value):o[i.name]="date"===i.input?this.registerForm.get(i.name).value?this.registerForm.get(i.name).value.format("YYYY-MM-DD"):null:this.registerForm.get(i.name).value}),o.password=this.registerForm.get("password").value,o.confirm=this.registerForm.get("confirm").value,o.marketing=this.registerForm.get("marketing").value,this.dialogService.superloading(!0),this.dataService.putWithParams("/api/v1/menu/member.json",{brandId:this.context.brandId,token:this.token,memberId:this.cardForm.get("card").value,...o}).subscribe({next:()=>{this.dialogService.superloading(!1),this.stage=3},error:i=>{this.dialogService.superloading(!1),this.dialogService.showError(i),this.clearCountdown()}})}handleVerifyCodeSubmit(){if(this.verifyForm.invalid)return;const t=`/api/v1/crm/${"phone"===this.verificationType?"smsverify":"emailverify"}.json`;this.dialogService.superloading(!0),this.dataService.postWithParams(t,{action:"verify",brandId:this.context.brandId,..."email"===this.verificationType&&{email:this.registerForm.get("email").value},..."phone"===this.verificationType&&{phone:this.registerForm.get("phone").value},..."phone"===this.verificationType&&{countryCode:this.registerForm.get("countryCode").value},code:this.verifyForm.get("code").value}).subscribe({next:o=>{this.dialogService.superloading(!1),o?(this.dialogService.showAlert("",this.t.instant("crm.login.bind-card-page.bind-card-success")),this.routingService.goLogin()):this.verifyForm.get("code").setErrors({codeIncorrect:!0})},error:()=>{this.dialogService.superloading(!1),this.verifyForm.get("code").setErrors({codeIncorrect:!0})}})}handleCodeInput(){this.codeValue=this.verifyForm.get("code").value,this.verifyForm.get("code").updateValueAndValidity()}clearCodeInput(){this.verifyForm.get("code").setValue(null)}displayAgreement(){this.agreementService.showListofAgreements("register",this.passiveAgreement,()=>{this.sendRegisterData()})}resendOtp(){this.dialogService.superloading(!0);const t={};let o="";"phone"===this.verificationType?(t.countryCode=this.registerForm.get("countryCode").value,t.phone=this.registerForm.get("phone").value,o="/api/v1/crm/smsverify.json?action=resend"):(o="/api/v1/crm/emailverify.json?action=resend",t.email=this.registerForm.get("email").value),t.crmId=this.context.crm.id,t.groupId=this.context.groupId,this.dataService.postWithParams(o,t).subscribe({complete:()=>{this.stage=3,this.resetOtpTimer(),this.dialogService.superloading(!1)},error:i=>{this.dialogService.showError(i)}})}resetOtpTimer(){this.resendOtpTime=60,this.resendTimer=setInterval(()=>{this.resendOtpTime--,this.resendOtpTime<=0&&clearInterval(this.resendTimer)},1e3)}clearCountdown(){this.resendOtpTime=-1,clearInterval(this.resendTimer)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(e.zs3),e.Y36(K.f))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-bind-page"]],features:[e.qOj],decls:12,vars:9,consts:[[1,"top-container"],["nav","",3,"back","close"],["center","","id","content",1,"content"],["class","login-logo",4,"ngIf"],[4,"ngIf"],[1,"footer"],[1,"btn-panel"],[1,"login-logo"],["imgName","logo",3,"content"],[1,"pls-enter-card"],["id","cardForm",1,"form-flex-col",3,"formGroup","submit"],["appearance","fill",1,"input-field"],["matInput","","autofocus","","formControlName","card","type","tel"],["id","registerForm",1,"form-flex-col",3,"formGroup","submit"],[4,"ngFor","ngForOf"],["appearance","fill",1,"input-field","input-password"],["matInput","","type","password","autocomplete","new-password","formControlName","password","data-testid","input-password-field"],["class","error-msg",4,"ngIf"],["matInput","","type","password","autocomplete","new-password","formControlName","confirm","data-testid","input-confirm-password-field"],["formControlName","marketing",1,"input-checkbox","re
1ceive-brand"],[3,"ngSwitch"],["appearance","fill","class","input-field",4,"ngSwitchCase"],[4,"ngSwitchCase"],["appearance","fill","class","birthday-select input-field",4,"ngSwitchCase"],["matInput","",3,"formControlName","placeholder",4,"ngIf","ngIfElse"],["selector",""],["matInput","",3,"formControlName","placeholder"],[3,"formControlName"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"email-input"],["matInput","","type","email",3,"formControlName","placeholder"],[1,"country-code"],["formControlName","countryCode","ngDefaultControl","",3,"input"],["matInput","","formControlName","phone","type","tel",3,"errorStateMatcher","input","blur"],["appearance","fill",1,"birthday-select","input-field"],["matInput","",3,"matDatepicker","formControlName","max","disabled"],["matSuffix","",3,"for"],["disabled","false","startView","multi-year","disabled","false",3,"yearSelected","monthSelected"],["bdPicker",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"error-msg"],[1,"bind-card-cont"],["id","verifyForm",1,"form-flex-col",3,"formGroup","submit"],["matInput","","type","text","formControlName","code",3,"input"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["mat-button","",1,"resend-btn",3,"disabled","click"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["mat-flat-button","","form","cardForm","type","submit",1,"btn-verify"],["mat-flat-button","","form","registerForm","type","submit",1,"btn-verify"],["mat-flat-button","","form","verifyForm","type","submit",1,"btn-verify"]],template:function(t,o){1&t&&(e.TgZ(0,"app-container-layout",0),e._UZ(1,"app-sub-bar",1),e.TgZ(2,"div",2),e.YNc(3,Ft,2,1,"div",3),e.YNc(4,qt,11,8,"ng-container",4),e.YNc(5,gn,22,20,"ng-container",4),e.YNc(6,hn,18,22,"ng-container",4),e.TgZ(7,"div",5)(8,"div",6),e.YNc(9,xn,4,3,"ng-container",4),e.YNc(10,Cn,4,3,"ng-container",4),e.YNc(11,bn,4,3,"ng-container",4),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("back",!0)("close",!1),e.xp6(2),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",2===o.stage),e.xp6(1),e.Q6J("ngIf",3===o.stage),e.xp6(3),e.Q6J("ngIf",1===o.stage),e.xp6(1),e.Q6J("ngIf",2===o.stage),e.xp6(1),e.Q6J("ngIf",3===o.stage))},dependencies:[p.sg,p.O5,p.RF,p.n9,x.Hw,c.lW,h.TO,h.KE,h.bx,h.hX,h.R9,C.Nt,r._Y,r.Fj,r.JJ,r.JL,r.sg,r.u,P.gD,F.ey,F.Nv,y.oG,b.Mq,b.hl,b.nW,Y.g,Q.L,S.v,G.l,f.X$],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden;background:white}.top-container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden}.content[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;overflow:auto;position:relative;height:100%;padding-bottom:2rem;background:#fff;color:var(--color-primary-contrast)}.footer[_ngcontent-%COMP%]{width:calc(100% - 4rem);background:#fff;box-shadow:none;background:transparent;display:flex;align-items:end;height:100%}.footer[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]{justify-content:end;width:100%}.footer[_ngcontent-%COMP%]   .btn-panel[_ngcontent-%COMP%]   .btn-verify[_ngcontent-%COMP%]{color:#fff;background:#e41e26;text-transform:uppercase;width:100%;padding:.6rem;border-radius:15px}.form-flex-col[_ngcontent-%COMP%]{margin:1rem 2rem;width:calc(100% - 4rem);display:flex;flex-direction:column;flex-shrink:0}.country-code[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.country-code[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:first-child{margin-right:1rem;width:30%}.country-code[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:first-child   mat-select[_ngcontent-%COMP%]  span{color:#333}.country-code[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:first-child   mat-select[_ngcontent-%COMP%]  .mat-select-arrow{color:#333}.country-code[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:first-child   mat-select[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.5rem)}.country-code[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]:nth-child(2){width:65%}.input-password[_ngcontent-%COMP%]{margin-bottom:1rem}.login-logo[_ngcontent-%COMP%]{width:100%;margin:1rem 0;transition:all .8s ease-in-out;display:flex;justify-content:center}.login-logo[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:12rem}.pls-enter-card[_ngcontent-%COMP%]{margin:0;margin-top:1.5rem;margin-bottom:.5rem}.bind-card-cont[_ngcontent-%COMP%]{padding:1rem 2rem}
1.bind-card-cont[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{text-align:left;color:#333;line-height:1.5em}.bind-card-cont[_ngcontent-%COMP%]   .form-flex-col[_ngcontent-%COMP%]{margin:1.5rem 0 0;width:100%}.bind-card-cont[_ngcontent-%COMP%]   .form-flex-col[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]  .mat-form-field-wrapper{margin-bottom:0rem}.resend-btn[_ngcontent-%COMP%]{width:100%;color:#3e3e3e;padding:.4rem;font-size:1rem;text-decoration:underline}.input-field[_ngcontent-%COMP%] {width:100%;font-family:var(--CF0)}.input-field[_ngcontent-%COMP%]  input{caret-color:#c1c1c1}.input-field[_ngcontent-%COMP%]  .mat-form-field-wrapper{margin-bottom:1rem;font-size:.9rem;line-height:1.2em;padding-bottom:.9rem}.input-field[_ngcontent-%COMP%]  .mat-form-field-flex{background:none;border-radius:5px;border:1px solid #bdbdbd}.input-field[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-label{color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-underline{background-color:#ccc;display:none}.input-field[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#ccc}.input-field[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#ccc}.input-field[_ngcontent-%COMP%]  .mat-error{color:red}.input-field[_ngcontent-%COMP%]  .mat-select-value-text, .input-field[_ngcontent-%COMP%]  .mat-select-arrow{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-label{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#fff}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#fff}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-input-element{color:red}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label{color:red}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-label .mat-form-field-required-marker{color:red}.input-field.mat-form-field.mat-form-field-invalid[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:red}mat-checkbox.receive-brand[_ngcontent-%COMP%]{height:100%;display:flex;align-items:flex-end}mat-checkbox.receive-brand[_ngcontent-%COMP%]  label{width:100%}mat-checkbox.receive-brand[_ngcontent-%COMP%]  span{white-space:pre-line;color:#333}mat-checkbox.receive-brand[_ngcontent-%COMP%]  .mat-checkbox-inner-container{margin-right:1rem;margin-top:.3rem}mat-checkbox.receive-brand.mat-checkbox-checked[_ngcontent-%COMP%]  .mat-checkbox-background{background-color:var(--P)}"]}),n})(),canActivate:[k.d]}];let Zn=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({providers:[J.r,k.d],imports:[p.ez,M.Bz.forChild(Pn),w.g0,x.Ps,c.ot,C.c,r.u5,r.UX,h.lN,C.c,P.LD,y.p9,d.Bb,A.d4,f.aw,l.Nh,b.FA,u.Yd,H.W,_.G,O.AuthModule,m.Xz]}),n})()},36467:(U,T,s)=>{s.d(T,{g:()=>w});var m=s(15861),p=s(94650),f=s(94888),M=s(45485);let w=(()=>{class x{constructor(C,P,y,d,_){this.ngZone=C,this.context=P,this.dataService=y,this.configService=d,this.platformService=_,console.log("NotificationService constructor")}register(C,P,y){}subscribeTopic(C){}subscribeGlobalTopic(C,P,y){return(0,m.Z)(function*(){})()}hasPermission(C){C(!1)}registerPushToken(C){return(0,m.Z)(function*(){})()}}return x.\u0275fac=function(C){return new(C||x)(p.LFG(p.R0b),p.LFG(f._y),p.LFG(f.Do),p.LFG(f.E4),p.LFG(M.m))},x.\u0275prov=p.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})()},83394:(U,T,s)=>{s.d(T,{n:()=>m});class m{constructor(f){this.errorCode="",this.errorCode=f}isErrorState(f,M){const w=!!(f&&f.invalid&&f.touched),x=!!(f&&f.parent&&f.parent.invalid&&f.parent.touched&&f.parent.hasError(this.errorCode));return(w||x)&&f.touched}}},92440:(U,T,s)=>{s.d(T,{Xz:()=>P,df:()=>C});var m=s(94650),p=s(24006),f=s(36895);function M(d,_){if(1&d){const c=m.EpF();m.TgZ(0,"input",3,4),m.NdJ("paste",function(l){m.CHM(c);const u=m.oxw(2);return m.KtG(u.handlePaste(l))})("keyup",function(l){const b=m.CHM(c).index,O=m.oxw(2);return m.KtG(O.onKeyUp(l,b))})("input",function(l){m.CHM(c);const u=m.oxw(2);return m.KtG(u.onInput(l))})("keydown",function(l){const b=m.CHM(c).index,O=m.oxw(2);return m.KtG(O.onKeyDown(l,b))}),m.qZA()}if(2&d){const c=_.$implicit,r=_.index,l=m.oxw(2);m.Gre("otp-input ",l.config.inputClass,""),m.Q6J("pattern",l.config.allowNumbersOnly?"\\d*":"")("type",l.inputType)("placeholder",(null==l.config?null:l.config.placeholder)||"")("ngStyle",l.config.inputStyles)("formControl",l.otpForm.controls[c])("id",l.getBoxId(r))}}function w(d,_){if(1&d&&(m.TgZ(0,"div",1),m.YNc(1,M,2,9,"input",2),m.ALo(2,"keys"),m.qZA()),2&d){const c=m.oxw();m.Gre("ng-otp-input-wrapper wrapper ",c.config.containerClass,""),m.MGl("id","c_",c.componentKey,""),m.Q6J("ngStyle",c.config.containerStyles),m.xp6(1),m.Q6J("ngForOf",m.lcZ(2,6,null==c.otpForm?null:c.otpForm.controls))}}class x{static ifTab(_){return this.ifKey(_,"Tab")}static ifDelete(_){return this.ifKey(_,"Delete;Del")}static ifBackspace(_){return this.ifKey(_,"Backspace")}static ifRightArrow(_){return this.ifKey(_,"ArrowRight;Right")}static ifLeftArrow(_){return this.ifKey(_,"ArrowLeft;Left")}static ifSpacebar(_){return this.ifKey(_,"Spacebar; ")}
1static ifKey(_,c){return c.split(";").some(l=>l===_.key)}}let h=(()=>{class d{transform(c){return Object.keys(c)}}return d.\u0275fac=function(c){return new(c||d)},d.\u0275pipe=m.Yjl({name:"keys",type:d,pure:!0}),d})(),C=(()=>{class d{constructor(c,r){this.keysPipe=c,this.document=r,this.config={length:4},this.onInputChange=new m.vpe,this.inputControls=new Array(this.config.length),this.componentKey=Math.random().toString(36).substring(2)+(new Date).getTime().toString(36)}get inputType(){return this.config?.isPasswordInput?"password":this.config?.allowNumbersOnly?"tel":"text"}ngOnInit(){this.otpForm=new p.cw({});for(let c=0;c<this.config.length;c++)this.otpForm.addControl(this.getControlName(c),new p.NI);this.otpForm.valueChanges.subscribe(c=>{this.keysPipe.transform(this.otpForm.controls).forEach(r=>{var l=this.otpForm.controls[r].value;l&&l.length>1&&(l.length>=this.config.length?this.setValue(l):this.rebuildValue())})})}ngAfterViewInit(){if(!this.config.disableAutoFocus){const c=this.document.getElementById(`c_${this.componentKey}`);if(c){const r=c.getElementsByClassName("otp-input")[0];r&&r.focus&&r.focus()}}}getControlName(c){return`ctrl_${c}`}onKeyDown(c,r){const l=this.getBoxId(r-1),u=this.getBoxId(r);return x.ifSpacebar(c)?(c.preventDefault(),!1):x.ifBackspace(c)?(c.target.value?this.clearInput(u,r):(this.clearInput(l,r-1),this.setSelected(l)),void this.rebuildValue()):void 0}onInput(c){if(this.config.allowNumbersOnly&&!this.validateNumber(this.currentVal?`${this.currentVal}${c.target.value}`:c.target.value))return c.target.value="",c.stopPropagation(),void c.preventDefault()}onKeyUp(c,r){x.ifTab(c)&&(r-=1);const l=this.getBoxId(r+1),u=this.getBoxId(r-1),b=this.getBoxId(r);return x.ifRightArrow(c)?(c.preventDefault(),void this.setSelected(l)):x.ifLeftArrow(c)?(c.preventDefault(),void this.setSelected(u)):x.ifDelete(c)?(c.target.value?this.clearInput(b,r):(this.clearInput(u,r-1),this.setSelected(u)),void this.rebuildValue()):void(!c.target.value||(this.ifValidKeyCode(c)&&this.setSelected(l),this.rebuildValue()))}validateNumber(c){return c&&/^[0-9]+$/.test(c)}getBoxId(c){return`otp_${c}_${this.componentKey}`}clearInput(c,r){let l=this.getControlName(r);this.otpForm.controls[l]?.setValue(null);const u=this.document.getElementById(c);u&&u instanceof HTMLInputElement&&(u.value=null)}setSelected(c){this.focusTo(c);const r=this.document.getElementById(c);r&&r.setSelectionRange&&setTimeout(()=>{r.setSelectionRange(0,1)},0)}ifValidKeyCode(c){const r=c.key;return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||/[a-zA-Z0-9-_]/.test(r)}focusTo(c){const r=this.document.getElementById(c);r&&r.focus()}setValue(c){if(!this.config.allowNumbersOnly||!isNaN(c)){if(this.otpForm.reset(),!c)return void this.rebuildValue();if(c=c.toString().replace(/\s/g,""),Array.from(c).forEach((l,u)=>{this.otpForm.get(this.getControlName(u))&&this.otpForm.get(this.getControlName(u)).setValue(l)}
1),!this.config.disableAutoFocus){const l=this.document.getElementById(`c_${this.componentKey}`);var r=c.length<this.config.length?c.length:this.config.length-1;let u=l.getElementsByClassName("otp-input")[r];u&&u.focus&&u.focus()}this.rebuildValue()}}rebuildValue(){let c="";this.keysPipe.transform(this.otpForm.controls).forEach(r=>{if(this.otpForm.controls[r].value){let l=this.otpForm.controls[r].value,u=l.length>1,b=!this.config.allowNumbersOnly&&this.config.letterCase&&("upper"==this.config.letterCase.toLocaleLowerCase()||"lower"==this.config.letterCase.toLocaleLowerCase());l=l[0];let O=b?"upper"==this.config.letterCase.toLocaleLowerCase()?l.toUpperCase():l.toLowerCase():l;b&&O==l?b=!1:l=O,c+=l,(u||b)&&this.otpForm.controls[r].setValue(l)}}),this.formCtrl?.setValue&&this.formCtrl.setValue(c),this.onInputChange.emit(c),this.currentVal=c}handlePaste(c){let r=c.clipboardData||window.clipboardData;if(r)var l=r.getData("Text");c.stopPropagation(),c.preventDefault(),l&&(!this.config.allowNumbersOnly||this.validateNumber(l))&&this.setValue(l)}}return d.\u0275fac=function(c){return new(c||d)(m.Y36(h),m.Y36(f.K0))},d.\u0275cmp=m.Xpm({type:d,selectors:[["ng-otp-input"]],inputs:{config:"config",formCtrl:"formCtrl"},outputs:{onInputChange:"onInputChange"},decls:1,vars:1,consts:[[3,"class","id","ngStyle",4,"ngIf"],[3,"id","ngStyle"],["autocomplete","one-time-code",3,"pattern","type","placeholder","ngStyle","class","formControl","id","paste","keyup","input","keydown",4,"ngFor","ngForOf"],["autocomplete","one-time-code",3,"pattern","type","placeholder","ngStyle","formControl","id","paste","keyup","input","keydown"],["inp",""]],template:function(c,r){1&c&&m.YNc(0,w,3,8,"div",0),2&c&&m.Q6J("ngIf",null==r.otpForm?null:r.otpForm.controls)},dependencies:[f.O5,f.PC,f.sg,p.Fj,p.c5,p.JJ,p.oH,h],styles:[".otp-input[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:4px;border:solid 1px #c5c5c5;text-align:center;font-size:32px}.ng-otp-input-wrapper[_ngcontent-%COMP%]   .otp-input[_ngcontent-%COMP%]:not(:last-child){margin-right:8px}@media screen and (max-width: 767px){.otp-input[_ngcontent-%COMP%]{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.otp-input[_ngcontent-%COMP%]{width:30px;font-size:18px;height:30px}}"]}),d})(),P=(()=>{class d{}return d.\u0275fac=function(c){return new(c||d)},d.\u0275mod=m.oAB({type:d}),d.\u0275inj=m.cJS({providers:[h],imports:[[f.ez,p.u5,p.UX]]}),d})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.