1(self.webpackChunkigm_client=self.webpackChunkigm_client||[]).push([[5266],{55266:(t,e,i)=>{"use strict";i.r(e),i.d(e,{LoginSecurityModule:()=>Ue});var n=i(38583),o=i(29790),s=i(50516),r=i(97706),l=i(46268),a=i(54046),c=i(50635),u=i(59178),d=i(12630),p=i(18368),g=i(64762),h=i(28645),b=i(78641),f=i(37716),v=i(16658),m=i(84828);function x(t,e){1&t&&f.GkF(0)}function T(t,e){1&t&&f.GkF(0)}function A(t,e){if(1&t&&(f.ynx(0),f.YNc(1,x,1,0,"ng-container",4),f.YNc(2,T,1,0,"ng-container",4),f.BQk()),2&t){f.oxw();const t=f.MAs(5),e=f.MAs(7);f.xp6(1),f.Q6J("ngTemplateOutlet",t),f.xp6(1),f.Q6J("ngTemplateOutlet",e)}}function Z(t,e){1&t&&f.GkF(0)}function D(t,e){1&t&&f.GkF(0)}function y(t,e){if(1&t&&(f.TgZ(0,"div",5),f.YNc(1,Z,1,0,"ng-container",4),f.YNc(2,D,1,0,"ng-container",4),f.qZA()),2&t){f.oxw();const t=f.MAs(5),e=f.MAs(7);f.xp6(1),f.Q6J("ngTemplateOutlet",t),f.xp6(1),f.Q6J("ngTemplateOutlet",e)}}const k=function(t){return{default:t}};function q(t,e){if(1&t&&(f.TgZ(0,"a",9),f.TgZ(1,"span"),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.qZA()),2&t){const t=f.oxw().$implicit;f.Q6J("routerLink",t.url),f.xp6(2),f.Oqu(f.xi3(3,2,t.name,f.VKq(5,k,t.nameDefault||t.name)))}}function O(t,e){1&t&&(f.TgZ(0,"nz-tab"),f.YNc(1,q,4,7,"a",8),f.qZA())}function M(t,e){if(1&t&&(f.TgZ(0,"nz-tabset",6),f.ALo(1,"async"),f.ALo(2,"async"),f.YNc(3,O,2,0,"nz-tab",7),f.qZA()),2&t){const t=f.oxw();f.Q6J("nzType",f.lcZ(1,6,t.isMobileResolution$)?"line":"card")("ngClass",f.lcZ(2,8,t.isMobileResolution$)?"tab-line tab-line-equal-width":"")("nzAnimated",!1)("nzLinkRouter",!0)("nzLinkExact",!1),f.xp6(3),f.Q6J("ngForOf",t.tabList)}}function C(t,e){1&t&&f._UZ(0,"router-outlet")}class w{constructor(t){this.breadcrumbTitleService=t,this.tabList=[{name:"b2b.login.security.otp.via.sms",nameDefault:"One-Time Password via SMS",url:p.o.OTP_VIA_SMS},{name:"b2b.login.security.ifast.digital.token",nameDefault:"iFAST Digital Token",url:p.o.IFAST_DIGITAL_TOKEN}]}ngOnInit(){this.breadcrumbTitleService.updateBreadcrumbTitle("Login & Security")}}w.\u0275fac=function(t){return new(t||w)(f.Y36(v.Z))},w.\u0275cmp=f.Xpm({type:w,selectors:[["app-login-security"]],decls:8,vars:6,consts:[[4,"ngIf"],["class","pb-6",4,"ngIf"],["tabTpl",""],["contentTpl",""],[4,"ngTemplateOutlet"],[1,"pb-6"],[3,"nzType","ngClass","nzAnimated","nzLinkRouter","nzLinkExact"],[4,"ngFor","ngForOf"],["nz-tab-link","",3,"routerLink",4,"nzTabLink"],["nz-tab-link","",3,"routerLink"]],template:function(t,e){1&t&&(f.YNc(0,A,3,2,"ng-container",0),f.ALo(1,"async"),f.YNc(2,y,3,2,"div",1),f.ALo(3,"async"),f.YNc(4,M,4,10,"ng-template",null,2,f.W1O),f.YNc(6,C,1,0,"ng-template",null,3,f.W1O)),2&t&&(f.Q6J("ngIf",f.lcZ(1,2,e.isMobileResolution$)),f.xp6(2),f.Q6J("ngIf",!f.lcZ(3,4,e.isMobileResolution$)))},directives:[n.O5,n.tP,m.xH,n.mk,n.sg,m.xw,m.Fx,m.Ao,d.yS,d.lC],pipes:[n.Ov,o.X$],styles:["app-login-security .ant-tabs-top>.ant-tabs-nav{margin:0}app-login-security .ui-content .ant-card{border-top:none;border-top-left-radius:0;border-top-right-radius:0;min-height:24rem}"],encapsulation:2}),(0,g.gn)([(0,h.Ph)(b.qU.isMobileResolution)],w.prototype,"isMobileResolution$",void 0);var I=i(3679),L=i(94788),S=i(50506),_=i(26265),E=i(38536),N=i(67323),z=i(75887),U=i(16704),F=i(22278),P=i(30301),R=i(38560),J=i(51012),Q=i(71155),Y=i(83242),B=i(5054),j=i(84514),G=i(53599),V=i(2365);const H=["otpBox"],$=["totpBox"],W=function(){return{default:"One-Time Password via SMS"}};function K(t,e){1&t&&(f._UZ(0,"ui-icon",33),f.TgZ(1,"span",34),f._uU(2),f.ALo(3,"translate"),f.qZA()),2&t&&(f.xp6(2),f.Oqu(f.xi3(3,1,"b2b.login.security.otp.via.sms",f.DdM(4,W))))}const X=function(){return{default:"You can link up to"}},tt=function(){return{default:"Mobile Numbers"}},et=function(){return{default:"to receive One-Time Passwords (OTPs) via SMS for login Two-Factor Authentication (2FA)."}};function it(t,e){if(1&t&&(f.TgZ(0,"ui-alert",35),f._uU(1),f.ALo(2,"translate"),f.TgZ(3,"span",36),f._uU(4),f.ALo(5,"translate"),f.qZA(),f._uU(6),f.ALo(7,"translate"),f.qZA()),2&t){const t=f.oxw();f.xp6(1),f.hij(" ",f.xi3(2,4,"b2b.login.security.otp.limit.info.1",f.DdM(13,X))," "),f.xp6(3),f.AsE("",t.smsOtpRegisterLimit," ",f.xi3(5,7,"b2b.login.security.otp.mobile.numbers",f.DdM(14,tt)),""),f.xp6(2),f.hij(" ",f.xi3(7,10,"b2b.login.security.otp.limit.info.2",f.DdM(15,et))," ")}}function nt(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"div",39),f.TgZ(1,"div",40),f._UZ(2,"ui-icon",41),f.TgZ(3,"span",42),f._uU(4),f.qZA(),f.qZA(),f.TgZ(5,"ui-icon",43),f.NdJ("click",function(){const e=f.CHM(t).$implicit;return f.oxw(2).onEdit(e)}),f.qZA(),f.qZA()}if(2&t){const t=e.$implicit;f.xp6(4),f.Oqu(t.label)}}function ot(t,e){if(1&t&&(f.TgZ(0,"div",37),f.YNc(1,nt,6,1,"div",38),f.qZA()),2&t){const t=f.oxw();f.xp6(1),f.Q6J("ngForOf",t.registeredMobileNos)}}function st(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"ui-button",44),f.NdJ("click",function(){return f.CHM(t),f.oxw().onSetupNew()}),f.qZA()}if(2&t){const t=f.oxw();f.Q6J("nzLoading",t.loading)}}function rt(t,e){if(1&t&&(f.TgZ(0,"span",45),f._UZ(1,"ui-icon",46),f.TgZ(2,"span"),f._uU(3),f.qZA(),f.qZA()),2&t){const t=e.$implicit,i=f.oxw();
1f.xp6(1),f.Q6J("icon",i.getCountryFlag(t.nzValue)),f.xp6(2),f.Oqu(t.nzLabel)}}const lt=function(){return{default:"Please fill in your mobile number."}};function at(t,e){1&t&&(f.TgZ(0,"span"),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t&&(f.xp6(1),f.Oqu(f.xi3(2,1,"b2b.sms.otp.registration.form.mobile.error",f.DdM(4,lt))))}const ct=function(){return{default:"Invalid mobile number."}};function ut(t,e){1&t&&(f.TgZ(0,"span"),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t&&(f.xp6(1),f.Oqu(f.xi3(2,1,"b2b.sms.otp.registration.form.mobile.pattern.error",f.DdM(4,ct))))}function dt(t,e){if(1&t&&(f.YNc(0,at,3,5,"span",22),f.YNc(1,ut,3,5,"span",22)),2&t){const t=e.$implicit;f.Q6J("ngIf",null==t.errors?null:t.errors.required),f.xp6(1),f.Q6J("ngIf",null==t.errors?null:t.errors.pattern)}}const pt=function(){return{default:"Mobile number is already registered for SMS OTP. Please enter another mobile number."}};function gt(t,e){1&t&&(f.TgZ(0,"div",47),f._UZ(1,"i",48),f.TgZ(2,"span"),f._uU(3),f.ALo(4,"translate"),f.qZA(),f.qZA()),2&t&&(f.xp6(3),f.Oqu(f.xi3(4,1,"b2b.sms.otp.registration.form.mobile.duplicate.error",f.DdM(4,pt))))}const ht=function(){return{default:"Please confirm your mobile number."}};function bt(t,e){1&t&&(f.TgZ(0,"span"),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t&&(f.xp6(1),f.Oqu(f.xi3(2,1,"b2b.sms.otp.registration.form.confirm.mobile.error",f.DdM(4,ht))))}function ft(t,e){if(1&t&&f.YNc(0,bt,3,5,"span",22),2&t){const t=e.$implicit;f.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const vt=function(){return{default:"Mobile number not matched."}};function mt(t,e){1&t&&(f.TgZ(0,"div",47),f._UZ(1,"i",48),f.TgZ(2,"span"),f._uU(3),f.ALo(4,"translate"),f.qZA(),f.qZA()),2&t&&(f.xp6(3),f.Oqu(f.xi3(4,1,"b2b.sms.otp.registration.form.mobile.unmatch.error",f.DdM(4,vt))))}const xt=function(t){return{default:t}};function Tt(t,e){if(1&t&&(f.TgZ(0,"div",49),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t){const t=f.oxw();f.xp6(1),f.hij(" ",f.xi3(2,1,t.otpError.content,f.VKq(4,xt,t.otpError.contentDefault||t.otpError.content))," ")}}function At(t,e){1&t&&f.GkF(0)}const Zt=function(){return{default:"Device Name"}},Dt=function(){return{default:"Last Login"}};function yt(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"label",63),f.NdJ("click",function(){const e=f.CHM(t).$implicit;return f.oxw(2).onSelectDevice(e.deviceId)}),f.TgZ(1,"input",64),f.NdJ("change",function(){const e=f.CHM(t).$implicit;return f.oxw(2).onSelectDevice(e.deviceId)}),f.qZA(),f.TgZ(2,"div",65),f.TgZ(3,"div"),f.TgZ(4,"p",66),f._uU(5),f.ALo(6,"translate"),f.qZA(),f.TgZ(7,"p",67),f._uU(8),f.qZA(),f.qZA(),f.TgZ(9,"div"),f.TgZ(10,"p",66),f._uU(11),f.ALo(12,"translate"),f.qZA(),f.TgZ(13,"p",67),f._uU(14),f.ALo(15,"date"),f.qZA(),f.qZA(),f.qZA(),f.qZA()}if(2&t){const t=e.$implicit,i=f.oxw(2);f.xp6(1),f.Q6J("checked",i.selectedDeviceId===t.deviceId),f.xp6(4),f.Oqu(f.xi3(6,6,"b2b.login.security.dt.device.name",f.DdM(15,Zt))),f.xp6(3),f.AsE("",t.deviceName," ",t.deviceVersion?"("+t.deviceVersion+")":"",""),f.xp6(3),f.Oqu(f.xi3(12,9,"b2b.login.security.dt.last.login",f.DdM(16,Dt))),f.xp6(3),f.Oqu(f.xi3(15,12,t.lastLogin,"dd MMM yyyy hh:mm a"))}}function kt(t,e){if(1&t&&(f.TgZ(0,"div",68),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t){const t=f.oxw(2);f.xp6(1),f.hij(" ",f.xi3(2,1,t.approvalError.content,f.VKq(4,xt,t.approvalError.contentDefault||t.approvalError.content))," ")}}const qt=function(){return{default:"Generate a One-Time Password (OTP) on your Trusted Device."}};function Ot(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"a",69),f.NdJ("click",function(){return f.CHM(t),f.oxw(2).onUseTotp()}),f._uU(1),f.ALo(2,"translate"),f.qZA()}2&t&&(f.xp6(1),f.hij(" ",f.xi3(2,1,"b2b.login.security.dt.generate.otp",f.DdM(4,qt))," "))}const Mt=function(){return{default:"To safeguard your contact, please verify the six-digit code shown on your Digital Token. Your contact details will be updated upon completion of the following authentication. This code will expire in 60 seconds."}},Ct=function(){return{default:"Step 1"}},wt=function(){return{default:"Select a Trusted Device from the list below, and send an Authentication Request."}},It=function(){return{default:"Step 2"}},Lt=function(){return{default:'Open the notification from the iFAST Global Prestige and tap on "Approve"'}},St=function(){return{default:"Is your Digital Token Authentication not working?"}};function _t(t,e){if(1&t){const t=f.EpF();f.ynx(0),f.TgZ(1,"p",3),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.TgZ(4,"div",50),f.TgZ(5,"div"),f.TgZ(6,"p",51),f._uU(7),f.ALo(8,"translate"),f.qZA(),f._UZ(9,"
1img",52),f.TgZ(10,"p",53),f._uU(11),f.ALo(12,"translate"),f.qZA(),f.qZA(),f.TgZ(13,"div"),f.TgZ(14,"p",51),f._uU(15),f.ALo(16,"translate"),f.qZA(),f._UZ(17,"img",54),f.TgZ(18,"p",53),f._uU(19),f.ALo(20,"translate"),f.qZA(),f.qZA(),f.qZA(),f.TgZ(21,"div",55),f.YNc(22,yt,16,17,"label",56),f.qZA(),f.YNc(23,kt,3,6,"div",57),f.TgZ(24,"div",58),f.TgZ(25,"ui-button",59),f.NdJ("click",function(){return f.CHM(t),f.oxw().onRequestApproval()}),f.qZA(),f.qZA(),f.TgZ(26,"div",60),f.TgZ(27,"p",61),f._uU(28),f.ALo(29,"translate"),f.qZA(),f.YNc(30,Ot,3,5,"a",62),f.qZA(),f.BQk()}if(2&t){const t=f.oxw();f.xp6(2),f.hij(" ",f.xi3(3,13,"b2b.login.security.dt.auth.desc",f.DdM(31,Mt))," "),f.xp6(5),f.hij("",f.xi3(8,16,"b2b.trusted.device.general.step.one",f.DdM(32,Ct)),":"),f.xp6(2),f.Q6J("assetSource",t.IMAGE_AUTH_STEP_ONE),f.xp6(2),f.Oqu(f.xi3(12,19,"b2b.login.security.dt.auth.step1",f.DdM(33,wt))),f.xp6(4),f.hij("",f.xi3(16,22,"b2b.trusted.device.general.step.two",f.DdM(34,It)),":"),f.xp6(2),f.Q6J("assetSource",t.IMAGE_AUTH_STEP_TWO),f.xp6(2),f.Oqu(f.xi3(20,25,"b2b.login.security.dt.auth.step2",f.DdM(35,Lt))),f.xp6(3),f.Q6J("ngForOf",t.trustedDeviceList),f.xp6(1),f.Q6J("ngIf",t.approvalError),f.xp6(2),f.Q6J("nzLoading",t.loading)("nzDisabled",!t.selectedDeviceId),f.xp6(3),f.hij(" ",f.xi3(29,28,"b2b.login.security.dt.not.working",f.DdM(36,St))," "),f.xp6(2),f.Q6J("ngIf",t.totpSupported)}}const Et=function(t,e){return{default:t,countdown:e}};function Nt(t,e){if(1&t&&(f.TgZ(0,"span"),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t){const t=f.oxw(2);f.xp6(1),f.hij("",f.xi3(2,1,"b2b.trusted.device.authentication.description.2",f.WLB(4,Et,"This 2FA key will expire in "+t.approvalCountdown+" seconds.",t.approvalCountdown))," ")}}function zt(t,e){if(1&t&&(f.TgZ(0,"div",68),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t){const t=f.oxw(2);f.xp6(1),f.hij(" ",f.xi3(2,1,t.approvalError.content,f.VKq(4,xt,t.approvalError.contentDefault||t.approvalError.content))," ")}}function Ut(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"a",69),f.NdJ("click",function(){return f.CHM(t),f.oxw(2).onUseTotp()}),f._uU(1),f.ALo(2,"translate"),f.qZA()}2&t&&(f.xp6(1),f.hij(" ",f.xi3(2,1,"b2b.login.security.dt.generate.otp",f.DdM(4,qt))," "))}const Ft=function(){return{default:"Your Digital Token Code"}},Pt=function(){return{default:"Request Again"}},Rt=function(){return{default:"To safeguard your mobile number update, please verify the 6-digit code shown on your iFAST SG mobile application Digital Token."}},Jt=function(){return{default:"We will never ask you for this code if you are not signing in. Never share with anyone."}};function Qt(t,e){if(1&t){const t=f.EpF();f.ynx(0),f.TgZ(1,"p",3),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.TgZ(4,"div",70),f.TgZ(5,"ui-icon",71),f.NdJ("click",function(){return f.CHM(t),f.oxw().onBackToDeviceSelect()}),f.qZA(),f.TgZ(6,"div",72),f.TgZ(7,"div"),f.TgZ(8,"p",66),f._uU(9),f.ALo(10,"translate"),f.qZA(),f.TgZ(11,"p",67),f._uU(12),f.qZA(),f.qZA(),f.TgZ(13,"div"),f.TgZ(14,"p",66),f._uU(15),f.ALo(16,"translate"),f.qZA(),f.TgZ(17,"p",67),f._uU(18),f.ALo(19,"date"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(20,"div",73),f.TgZ(21,"p",74),f._uU(22),f.ALo(23,"translate"),f.qZA(),f.TgZ(24,"div",75),f.TgZ(25,"span",76),f._uU(26),f.qZA(),f.qZA(),f.TgZ(27,"div",77),f.TgZ(28,"a",69),f.NdJ("click",function(){return f.CHM(t),f.oxw().onRequestAgain()}),f._uU(29),f.ALo(30,"translate"),f.qZA(),f.qZA(),f.TgZ(31,"p",3),f._uU(32),f.ALo(33,"translate"),f.qZA(),f.TgZ(34,"p",78),f.YNc(35,Nt,3,7,"span",22),f._uU(36),f.ALo(37,"translate"),f.qZA(),f.qZA(),f.YNc(38,zt,3,6,"div",57),f.TgZ(39,"div",79),f.TgZ(40,"p",61),f._uU(41),f.ALo(42,"translate"),f.qZA(),f.YNc(43,Ut,3,5,"a",62),f.qZA(),f.BQk()}if(2&t){const t=f.oxw();f.xp6(2),f.hij(" ",f.xi3(3,19,"b2b.login.security.dt.auth.desc",f.DdM(46,Mt))," "),f.xp6(7),f.Oqu(f.xi3(10,22,"b2b.login.security.dt.device.name",f.DdM(47,Zt))),f.xp6(3),f.AsE("",null==t.selectedDevice?null:t.selectedDevice.deviceName," ",null!=t.selectedDevice&&t.selectedDevice.deviceVersion?"("+(null==t.selectedDevice?null:t.selectedDevice.deviceVersion)+")":"",""),f.xp6(3),f.Oqu(f.xi3(16,25,"b2b.login.security.dt.last.login",f.DdM(48,Dt))),f.xp6(3),f.Oqu(f.xi3(19,28,null==t.selectedDevice?null:t.selectedDevice.lastLogin,"dd MMM yyyy hh:mm a")),f.xp6(4),f.Oqu(f.xi3(23,31,"b2b.login.security.dt.y
1our.code",f.DdM(49,Ft))),f.xp6(4),f.Oqu(t.generatedOtp),f.xp6(2),f.ekj("text-black-3",!t.canRequestAgain)("pointer-events-none",!t.canRequestAgain),f.xp6(1),f.hij(" ",f.xi3(30,34,"b2b.login.security.dt.request.again",f.DdM(50,Pt))," "),f.xp6(3),f.hij(" ",f.xi3(33,37,"b2b.login.security.dt.verify.desc",f.DdM(51,Rt))," "),f.xp6(3),f.Q6J("ngIf",t.approvalCountdown>0),f.xp6(1),f.hij(" ",f.xi3(37,40,"b2b.login.security.dt.never.share",f.DdM(52,Jt))," "),f.xp6(2),f.Q6J("ngIf",t.approvalError),f.xp6(3),f.hij(" ",f.xi3(42,43,"b2b.login.security.dt.not.working",f.DdM(53,St))," "),f.xp6(2),f.Q6J("ngIf",t.totpSupported)}}function Yt(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"input",84,85),f.NdJ("input",function(e){const i=f.CHM(t).index;return f.oxw(2).onTotpDigitInput(i,e)})("keydown",function(e){const i=f.CHM(t).index;return f.oxw(2).onTotpDigitKeydown(i,e)}),f.qZA()}}function Bt(t,e){if(1&t&&(f.TgZ(0,"div",86),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t){const t=f.oxw(2);f.xp6(1),f.hij(" ",f.xi3(2,1,t.approvalError.content,f.VKq(4,xt,t.approvalError.contentDefault||t.approvalError.content))," ")}}const jt=function(){return{default:"Enter the 6-digit code shown on your iFAST Global Prestige Digital Token. The code rotates every 30 seconds and expires in 60 seconds."}};function Gt(t,e){if(1&t){const t=f.EpF();f.ynx(0),f.TgZ(1,"p",3),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.TgZ(4,"div",70),f.TgZ(5,"ui-icon",71),f.NdJ("click",function(){return f.CHM(t),f.oxw().onBackFromTotp()}),f.qZA(),f.TgZ(6,"div",72),f.TgZ(7,"div"),f.TgZ(8,"p",66),f._uU(9),f.ALo(10,"translate"),f.qZA(),f.TgZ(11,"p",67),f._uU(12),f.qZA(),f.qZA(),f.TgZ(13,"div"),f.TgZ(14,"p",66),f._uU(15),f.ALo(16,"translate"),f.qZA(),f.TgZ(17,"p",67),f._uU(18),f.ALo(19,"date"),f.qZA(),f.qZA(),f.qZA(),f.qZA(),f.TgZ(20,"div",80),f.TgZ(21,"p",81),f._uU(22),f.ALo(23,"translate"),f.qZA(),f.TgZ(24,"div",27),f.YNc(25,Yt,2,0,"input",28),f.qZA(),f.YNc(26,Bt,3,6,"div",31),f.TgZ(27,"div",82),f.TgZ(28,"ui-button",83),f.NdJ("click",function(){return f.CHM(t),f.oxw().onSubmitTotp()}),f.qZA(),f.qZA(),f.qZA(),f.BQk()}if(2&t){const t=f.oxw();f.xp6(2),f.hij(" ",f.xi3(3,12,"b2b.login.security.dt.totp.desc",f.DdM(27,jt))," "),f.xp6(7),f.Oqu(f.xi3(10,15,"b2b.login.security.dt.device.name",f.DdM(28,Zt))),f.xp6(3),f.AsE("",null==t.selectedDevice?null:t.selectedDevice.deviceName," ",null!=t.selectedDevice&&t.selectedDevice.deviceVersion?"("+(null==t.selectedDevice?null:t.selectedDevice.deviceVersion)+")":"",""),f.xp6(3),f.Oqu(f.xi3(16,18,"b2b.login.security.dt.last.login",f.DdM(29,Dt))),f.xp6(3),f.Oqu(f.xi3(19,21,null==t.selectedDevice?null:t.selectedDevice.lastLogin,"dd MMM yyyy hh:mm a")),f.xp6(4),f.Oqu(f.xi3(23,24,"b2b.login.security.dt.your.code",f.DdM(30,Ft))),f.xp6(3),f.Q6J("ngForOf",t.totpDigits)("ngForTrackBy",t.trackByIndex),f.xp6(1),f.Q6J("ngIf",t.approvalError),f.xp6(2),f.Q6J("nzLoading",t.loading)("nzDisabled",t.dtTotpControl.invalid)}}function Vt(t,e){if(1&t&&(f.TgZ(0,"p",87),f._uU(1),f.qZA()),2&t){const t=f.oxw();f.xp6(1),f.hij("",null==t.otpModel?null:t.otpModel.otpPrefix," -")}}function Ht(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"input",84,88),f.NdJ("input",function(e){const i=f.CHM(t).index;return f.oxw().onOtpDigitInput(i,e)})("keydown",function(e){const i=f.CHM(t).index;return f.oxw().onOtpDigitKeydown(i,e)}),f.qZA()}}const $t=function(){return{default:"You can resend in"}},Wt=function(){return{default:"seconds"}};function Kt(t,e){if(1&t&&(f.TgZ(0,"p",89),f._uU(1),f.ALo(2,"translate"),f.ALo(3,"translate"),f.qZA()),2&t){const t=f.oxw();f.xp6(1),f.lnq(" ",f.xi3(2,3,"b2b.otp.resend.in",f.DdM(9,$t))," ",t.resendSeconds," ",f.xi3(3,6,"b2b.otp.seconds",f.DdM(10,Wt))," ")}}const Xt=function(){return{default:"Resend Code"}};function te(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"div",90),f.TgZ(1,"a",69),f.NdJ("click",function(){return f.CHM(t),f.oxw().onResendOtp()}),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.qZA()}2&t&&(f.xp6(2),f.hij(" ",f.xi3(3,1,"b2b.otp.send.code",f.DdM(4,Xt))," "))}function ee(t,e){if(1&t&&(f.TgZ(0,"div",86),f._uU(1),f.ALo(2,"translate"),f.qZA()),2&t){const t=f.oxw();f.xp6(1),f.hij(" ",f.xi3(2,1,t.otpError.content,f.VKq(4,xt,t.otpError.contentDefault||t.otpError.content))," ")}}function ie(t,e){1&t&&f.GkF(0)}const ne=function(){return{default:"Note(s)"}},oe=function(){return{default:"Please ensure your mobile phone registered for SMS OTP is current and valid."}},se=function(){return{default:"Do note that the mobile number that you provide above is only registered for the SMS OTP and is separate from your existing phone number in your investment account(s)."}};function re(t,e){1&t&&(f.TgZ(0,"div",91),f.TgZ(1,"p",51),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.TgZ(4,"ol",92),f.TgZ(5,"li"),f._uU(6),f.ALo(7,"translate"),f.qZA(),f.TgZ(8,"li"),f._uU(9),f.ALo(10,"translate"),f.qZA(),f.qZA(),f.qZA()),2&t&&(f.xp6(2),f.Oqu(f.xi3(3,3,"b2b.general.notes",f.DdM(12,ne))),f.xp6(4),f.Oqu(f.xi3(7,6,"b2b.login.security.otp.note.1",f.DdM(13,oe))),f.xp6(3),f.Oqu(f.xi3(10,9,"b2b.login.security.otp.note.2",f.DdM(14,se))))}const le=function(){return{default:"To enhance your online trading security, iFAST has implemented the Two-Factor Authentication (2FA) feature whereby you are required to key in a separate One-Time Password (OTP) upon your login."}},ae=function(){return{default:"Country/Region Code"}},ce=function(){return{default:"Mobile No."}},ue=function(){return{default:"Confirm Mobile No."}},de=function(){return{default:"Digital Token Authentication"}},pe=function(){return{default:"SMS OTP Verification"}},ge=function(){return{default:"To safeguard your contact, please verify the six-digit code sent to your registered mobile number. This code will expire in 60 seconds."}},he=function(){return{default:"Enter the 6-digit codes sent to:"}};class be{constructor(t,e,i,n,o){this.fb=t,this.twoFaService=e,this.uiModal=i,this.router=n,this.route=o,this.otpDigits=["","","","","",""],this.totpDigits=["","","","","",""],this.SMS_OTP_REGISTER="REGISTER",this.SMS_OTP_UPDATE="UPDATE",this.APPROVAL_TIMEOUT_SECONDS=60,this.IMAGE_AUTH_STEP_ONE=L.z.DIGITAL_TOKEN_AUTHENTICATE,this.IMAGE_AUTH_STEP_TWO=L.z.DIGITAL_TOKEN_APPROVE,this.IMAGE_SETUP_QR=L.z.APP_QR_CODE,this.IMAGE_SETUP_LOGIN=L.z.DIGITAL_TOKEN_REGISTRATION_LOGIN_APP_IMG,this.state="list",this.loading=!1,this.registeredMobileNos=[],this.smsOtpRegisterLimit=0,this.countryOptions=[],this.countryFlagByCode={},this.defaultCountryCode="+65",this.mode="REGISTER",this.requestedOtp=!1,this.resendSeconds=0,this.sendSmsOtpCount=0,this.APPROVAL_REUSE_WINDOW_SECONDS=300,this.dtSetupModalOpen=!1,this.trustedDeviceList=[],this.totpSupported=!1,this.approvalCountdown=0,this.canRequestAgain=!1}ngOnInit(){this.buildForm(),this.loadList()}ngOnDestroy(){this.clearResendTimer(),this.stopApproval()}get canAddMore(){return 0===this.smsOtpRegisterLimit||this.registeredMobileNos.length<this.smsOtpRegisterLimit}get selectedDialCode(){var t,e;return(null===(e=null===(t=this.form)||void 0===t?void 0:t.get("countryCode"))||void 0===e?void 0:e.value)||""}getCountryFlag(t){return this.countryFlagByCode[t]||""}get otpPlaceholder(){var t;return(null===(t=this.otpModel)||void 0===t?void 0:t.otpPrefix)?`${this.otpModel.otpPrefix} -`:""}get selectedDevice(){return this.trustedDeviceList.find(t=>t.deviceId===this.selectedDeviceId)}get canReuseApproval(){return!!this.approvalToken&&void 0!==this.approvalTokenExpiresAt&&Date.now()<this.approvalTokenExpiresAt}get drawerVisible(){return"list"!==this.state}get drawerTitle(){return this.mode===this.SMS_OTP_UPDATE?"Edit Mobile Number":"Setup New Mobile Number"}
1get isDtModalOpen(){return"device-select"===this.state||"device-auth"===this.state||"device-totp"===this.state}onCloseDtModal(){this.stopApproval(),this.secretCode=void 0,this.approvalError=void 0,this.state="form"}onCloseOtpModal(){this.secretCode=void 0,this.approvalToken=void 0,this.approvalTokenExpiresAt=void 0,this.state="form"}onOtpDigitInput(t,e){const i=e.target,n=(i.value||"").replace(/\D/g,"").slice(-1);i.value=n,this.otpDigits[t]=n,n&&t<5&&this.focusOtpBox(t+1),this.syncOtpControl()}onOtpDigitKeydown(t,e){"Backspace"===e.key&&!this.otpDigits[t]&&t>0&&this.focusOtpBox(t-1)}trackByIndex(t){return t}focusOtpBox(t){var e,i;null===(i=null===(e=this.otpBoxes)||void 0===e?void 0:e.toArray()[t])||void 0===i||i.nativeElement.focus()}syncOtpControl(){const t=this.otpDigits.join("");this.otpControl.setValue(6===t.length?t:null)}resetOtpDigits(){var t,e;this.otpDigits=["","","","","",""],null===(t=this.otpBoxes)||void 0===t||t.forEach(t=>t.nativeElement.value=""),null===(e=this.otpControl)||void 0===e||e.setValue(null,{emitEvent:!1})}onTotpDigitInput(t,e){const i=e.target,n=(i.value||"").replace(/\D/g,"").slice(-1);i.value=n,this.totpDigits[t]=n,n&&t<5&&this.focusTotpBox(t+1),this.syncTotpControl()}onTotpDigitKeydown(t,e){"Backspace"===e.key&&!this.totpDigits[t]&&t>0&&this.focusTotpBox(t-1)}focusTotpBox(t){var e,i;null===(i=null===(e=this.totpBoxes)||void 0===e?void 0:e.toArray()[t])||void 0===i||i.nativeElement.focus()}syncTotpControl(){const t=this.totpDigits.join("");this.dtTotpControl.setValue(6===t.length?t:null)}resetTotpDigits(){var t,e;this.totpDigits=["","","","","",""],null===(t=this.totpBoxes)||void 0===t||t.forEach(t=>t.nativeElement.value=""),null===(e=this.dtTotpControl)||void 0===e||e.setValue(null,{emitEvent:!1})}buildForm(){this.form=this.fb.group({countryCode:[this.defaultCountryCode,I.kI.required],mobileNum:[null,[I.kI.required,I.kI.pattern(/^[0-9]{6,20}$/)]],confirmMobileNum:[null,[I.kI.required]]},{validators:t=>{var e,i,n;const o=null===(e=t.get("mobileNum"))||void 0===e?void 0:e.value,s=null===(i=t.get("confirmMobileNum"))||void 0===i?void 0:i.value,r=null===(n=t.get("countryCode"))||void 0===n?void 0:n.value,l={};return o&&s&&o!==s&&(l.mobileMismatch=!0),r&&o&&this.registeredMobileNos.some(t=>t.value===r+o)&&(l.duplicate=!0),Object.keys(l).length?l:null}}
1),this.otpControl=this.fb.control(null,[I.kI.required,I.kI.minLength(6),I.kI.maxLength(6)]),this.otpControl.valueChanges.subscribe(t=>{t&&6===t.length&&this.requestedOtp&&this.onSubmitOtp()}),this.dtTotpControl=this.fb.control(null,[I.kI.required,I.kI.minLength(6),I.kI.maxLength(6)]),this.dtTotpControl.valueChanges.subscribe(t=>{t&&6===t.length&&"device-totp"===this.state&&this.onSubmitTotp()})}loadList(){this.loading=!0,this.twoFaService.twoFaManageList().subscribe(t=>{var e,i,n,o,s;this.registeredMobileNos=null!==(e=t.registeredMobileNos)&&void 0!==e?e:[],this.smsOtpRegisterLimit=null!==(i=t.smsOtpRegisterLimit)&&void 0!==i?i:0,this.defaultCountryCode=null!==(o=null===(n=t.defaultMobileCountryCode)||void 0===n?void 0:n.code)&&void 0!==o?o:"+65",this.countryFlagByCode={},this.countryOptions=(null!==(s=t.mobileCountryCodes)&&void 0!==s?s:[]).map(t=>{var e,i;const n=null!==(e=t.desc1)&&void 0!==e?e:"";return this.countryFlagByCode[t.code]=n,{label:null!==(i=t.desc)&&void 0!==i?i:t.code,value:t.code,icon:n,iconType:"flag"}}),this.state="list",this.loading=!1},()=>this.loading=!1)}onSetupNew(){this.loading||(this.mode="REGISTER",this.existingMobileHash=void 0,this.checkDeviceThenOpenForm())}onEdit(t){this.loading||(this.mode="UPDATE",this.existingMobileHash=t.value,this.checkDeviceThenOpenForm())}promptSetupDigitalToken(){this.dtSetupModalOpen||(this.dtSetupModalOpen=!0,this.uiModal.warning({title:"b2b.login.security.dt.setup.title",titleDefault:"Setup Digital Token",content:"b2b.igm.login.security.dt.setup.desc",contentDefault:"To update your mobile number for Two-Factor Authentication (2FA), you are required to authenticate the update using your digital token. Please set up your digital token in the iGM Mobile App.",btnCancel:!0,btnCancelText:"b2b.general.close",btnCancelDefault:"Close",btnOkText:"b2b.login.security.dt.setup.guide",btnOkDefault:"View Setup Guide",onClickOk:t=>{t.close(),this.goToDigitalTokenTab()}}).afterClose.subscribe(()=>this.dtSetupModalOpen=!1))}goToDigitalTokenTab(){this.router.navigate(["../",p.o.IFAST_DIGITAL_TOKEN],{relativeTo:this.route})}checkDeviceThenOpenForm(){this.loading=!0,this.twoFaService.findSubscribedDevices().subscribe(t=>{this.loading=!1,t&&0!==t.length?(this.resetFormState(),this.state="form"):this.promptSetupDigitalToken()},()=>{this.loading=!1,this.resetFormState(),this.state="form"})}onCancelForm(){this.stopApproval(),this.secretCode=void 0,this.approvalToken=void 0,this.approvalTokenExpiresAt=void 0,this.state="list"}onNext(){this.form.invalid||this.loading?this.form.markAllAsTouched():(this.loading=!0,this.approvalError=void 0,this.twoFaService.findSubscribedDevices().subscribe(t=>{this.loading=!1,this.trustedDeviceList=null!=t?t:[],1===this.trustedDeviceList.length?(this.onSelectDevice(this.trustedDeviceList[0].deviceId),this.state="device-select"):this.trustedDeviceList.length>1?(this.selectedDeviceId=void 0,this.totpSupported=!1,this.state="device-select"):this.requestManageOtp(()=>this.state="otp")},()=>{this.loading=!1,this.requestManageOtp(()=>this.state="otp")}))}onSelectDevice(t){this.selectedDeviceId=t,this.totpSupported=!1,this.twoFaService.checkUserTotpSubscription(t).subscribe(e=>{this.selectedDeviceId===t&&(this.totpSupported=!!e)},()=>{this.selectedDeviceId===t&&(this.totpSupported=!1)})}onRequestApproval(){this.selectedDeviceId&&!this.loading&&(this.loading=!0,this.approvalError=void 0,this.canRequestAgain=!1,this.twoFaService.generateAccountUpdateSecretCode(this.selectedDeviceId,this.buildTarget()).subscribe(t=>{this.secretCode=t,this.generatedOtp=this.toDisplayCode(t),this.loading=!1,this.state="device-auth",this.startApprovalCountdown(),this.startApprovalPolling()},t=>{this.loading=!1,this.approvalError={content:null==t?void 0:t.message,contentDefault:null==t?void 0:t.messageDefault}}))}onRequestAgain(){this.canRequestAgain&&!this.loading&&(this.stopApproval(),this.secretCode=void 0,this.state="device-select")}onBackToDeviceSelect(){this.stopApproval(),this.secretCode=void 0,this.state="device-select"}onUseTotp(){this.stopApproval(),this.secretCode=void 0,this.approvalError=void 0,this.resetTotpDigits(),this.state="device-totp"}onBackFromTotp(){this.approvalError=void 0,this.state="device-select"}onSubmitTotp(){const t=this.dtTotpControl.value;if(!t||6!==t.length||this.loading)return;this.loading=!0,this.approvalError=void 0;const e=Object.assign(Object.assign({},this.buildRequestOtpInp()),{totp:t});this.twoFaService.manageTwoFaRequestOtp(e).subscribe(t=>{var e;this.otpModel=t,this.approvalToken=t.approvalToken,this.markApprovalIssued(),this.resetTotpDigits(),this.requestedOtp=!0,this.sendSmsOtpCount++,this.startResendTimer(null!==(e=t.otpExpiredDuration)&&void 0!==e?e:60),this.loading=!1,this.state="otp"},t=>{this.loading=!1,this.resetTotpDigits(),this.approvalError={content:null==t?void 0:t.message,contentDefault:null==t?void 0:t.messageDefault}})}onResendOtp(){this.resendSeconds>0||this.loading||(this.otpError=void 0,this.canReuseApproval?(this.secretCode=void 0,this.requestManageOtp(()=>this.state="otp",{approvalToken:this.approvalToken})):this.restartApprovalForResend())}restartApprovalForResend(){this.secretCode=void 0,this.approvalToken=void 0,this.approvalTokenExpiresAt=void 0,this.onNext()}onSubmitOtp(){const t=this.otpControl.value;this.otpModel&&t&&6===t.length&&!this.loading&&(this.loading=!0,this.otpError=void 0,this.twoFaService.twoFaManageAuthOtp(this.buildAuthOtpInp(),this.otpModel,t).subscribe(()=>{this.loading=!1,this.secretCode=void 0,this.approvalToken=void 0,this.approvalTokenExpiresAt=void 0;const t=this.mode===this.SMS_OTP_UPDATE;this.uiModal.success({title:t?"b2b.login.security.otp.updated.success":"b2b.login.security.otp.added.success",titleDefault:t?"Successfully Updated!":"Successfully Added!",onClickOk:t=>{t.close(),this.loadList()}})},t=>{this.loading=!1,this.resetOtpDigits(),this.approvalToken=void 0,this.approvalTokenExpiresAt=void 0,this.otpError={content:null==t?void 0:t.message,contentDefault:null==t?void 0:t.messageDefault}}))}
1startApprovalPolling(){this.clearApprovalPolling();const t=this.secretCode,e=this.buildTarget();this.approvalPollInterval=setInterval(()=>{t&&this.twoFaService.checkAccountUpdateApproval(t,e).subscribe(e=>{e&&(this.stopApproval(),this.requestManageOtp(()=>this.state="otp",{secretCode:t}))},()=>{})},5e3)}startApprovalCountdown(){this.clearApprovalCountdown(),this.approvalCountdown=this.APPROVAL_TIMEOUT_SECONDS,this.approvalCountdownInterval=setInterval(()=>{this.approvalCountdown>0&&this.approvalCountdown--,this.approvalCountdown<=0&&(this.clearApprovalPolling(),this.clearApprovalCountdown(),this.canRequestAgain=!0)},1e3)}stopApproval(){this.clearApprovalPolling(),this.clearApprovalCountdown(),this.approvalCountdown=0,this.generatedOtp=void 0}toDisplayCode(t){return(t||"").replace(/\x00/g,"").split("-")[0]}clearApprovalPolling(){this.approvalPollInterval&&(clearInterval(this.approvalPollInterval),this.approvalPollInterval=void 0)}clearApprovalCountdown(){this.approvalCountdownInterval&&(clearInterval(this.approvalCountdownInterval),this.approvalCountdownInterval=void 0)}buildTarget(){return{accountUpdateMode:this.mode,accountUpdateCountryCode:this.form.value.countryCode,accountUpdateMobileNum:this.form.value.mobileNum,accountUpdateExistingMobileNum:this.mode===this.SMS_OTP_UPDATE?this.existingMobileHash:void 0}}requestManageOtp(t,e){this.loading=!0,this.otpError=void 0,this.twoFaService.manageTwoFaRequestOtp(this.buildRequestOtpInp(e)).subscribe(i=>{var n;this.otpModel=i,this.approvalToken=i.approvalToken,(null==e?void 0:e.approvalToken)||this.markApprovalIssued(),this.secretCode=void 0,this.requestedOtp=!0,this.sendSmsOtpCount++,this.resetOtpDigits(),this.startResendTimer(null!==(n=i.otpExpiredDuration)&&void 0!==n?n:60),this.loading=!1,null==t||t()},t=>{this.loading=!1,this.secretCode=void 0,this.otpError={content:null==t?void 0:t.message,contentDefault:null==t?void 0:t.messageDefault}})}markApprovalIssued(){this.approvalTokenExpiresAt=Date.now()+1e3*this.APPROVAL_REUSE_WINDOW_SECONDS}buildBaseRegInp(){return{countryCode:this.form.value.countryCode,mobileNum:this.form.value.mobileNum,mode:this.mode,existingMobileNum:this.mode===this.SMS_OTP_UPDATE?this.existingMobileHash:void 0}}buildRequestOtpInp(t){return Object.assign(Object.assign({},this.buildBaseRegInp()),{sendSmsOtpCount:String(this.sendSmsOtpCount),secretCode:null==t?void 0:t.secretCode,approvalToken:null==t?void 0:t.approvalToken})}buildAuthOtpInp(){return Object.assign(Object.assign({},this.buildBaseRegInp()),{approvalToken:this.approvalToken})}resetFormState(){this.otpModel=void 0,this.requestedOtp=!1,this.otpError=void 0,this.approvalError=void 0,this.sendSmsOtpCount=0,this.secretCode=void 0,this.approvalToken=void 0,this.approvalTokenExpiresAt=void 0,this.trustedDeviceList=[],this.selectedDeviceId=void 0,this.totpSupported=!1,this.clearResendTimer(),this.stopApproval(),this.buildForm(),this.form.patchValue({countryCode:this.defaultCountryCode})}startResendTimer(t){this.clearResendTimer(),this.resendSeconds=t,this.resendInterval=setInterval(()=>{this.resendSeconds>0?this.resendSeconds--:this.clearResendTimer()},1e3)}clearResendTimer(){this.resendInterval&&(clearInterval(this.resendInterval),this.resendInterval=void 0)}}be.\u0275fac=function(t){return new(t||be)(f.Y36(I.qu),f.Y36(S.b),f.Y36(_.V),f.Y36(d.F0),f.Y36(d.gz))},be.\u0275cmp=f.Xpm({type:be,selectors:[["app-otp-via-sms"]],viewQuery:function(t,e){if(1&t&&(f.Gf(H,5),f.Gf($,5)),2&t){let t;f.iGM(t=f.CRH())&&(e.otpBoxes=t),f.iGM(t=f.CRH())&&(e.totpBoxes=t)}},decls:61,vars:85,consts:[[1,"block",3,"nzTitle"],["otpHeaderTpl",""],["ui-content-extra-template",""],[1,"text-sm","mb-4"],["type","info","class","block mb-4",4,"ngIf"],["class","grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",4,"ngIf"],[1,"flex","justify-end"],["nzText","b2b.login.security.otp.setup.new","nzTextDefault","Setup New Mobile Number",3,"nzLoading","click",4,"ngIf"],["buttonLeftLabel","b2b.general.cancel","buttonLeftLabelDefault","Cancel","buttonRightLabel","b2b.general.next","buttonRightLabelDefault","Next",3,"visible","drawerTitle","buttonRightLabelDisabled","nzClosable","onClickButtonLeftEmitter","onClickButtonRightEmitter","nzOnClose"],["nz-form","",3,"formGroup"],[1,"mb-2"],["formControlName","countryCode","nzShowSearch","",3,"nzPlaceHolder","nzOptions","nzCustomTemplate"],["countrySelectedTpl",""],[3,"nzErrorTip"],["numberOnly","","formControlName","mobileNum","nzClass","font-bold",3,"nzPrefix","nzPlaceHolder"],["mobileNoErrorTpl",""],["class","flex items-start bg-loss-9 text-white text-sm px-2 mb-2 -mt-2",4,"ngIf"],["numberOnly","","formControlName","confirmMobileNum","nzClass","font-bold",3,"nzPrefix","nzPlaceHolder"],["confirmMobileNoErrorTpl",""],["class","bg-loss-9 text-white text-sm px-2 mb-2",4,"ngIf"],[4,"ngTemplateOutlet"],[3,"nzVisible","nzTitle","nzFooter","nzClosable","nzWidth","nzOnCancel"],[4,"ngIf"],[1,"text-sm","mb-4","text-center"],[1,"text-center","text-sm","mb-1"],[1,"text-center","font-bold","text-lg","mb-3"],["class","text-center text-sm text-black-4 mb-2",4,"ngIf"],[1,"flex","justify-center","gap-2","mb-2"],["class","w-12 h-12 text-center text-xl border border-black-3 rounded","maxlength","1","inputmode","numeric",3,"input","keydown",4,"ngFor","ngForOf","ngForTrackBy"],["class","text-center text-sm text-black-4",4,"ngIf"],["class","text-center",4,"ngIf"],["class","text-loss text-sm text-center mt-2",4,"ngIf"],["notesTpl",""],["icon","lock","iconType","igm","iconClass","text-primary text-xl",1,"mr-2"],[1,"font-bold","whitespace-normal","mt-0.5"],["type","info",1,"block","mb-4"],[1,"font-bold"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-4","mb-4"],["class","registered-card flex items-center justify-between p-4 bg-black-1 rounded",4,"ngFor","ngForOf"],[1,"registered-card","flex","items-center","justify-between","p-4","bg-black-1","rounded"],[1,"flex","items-center","gap-2"],["icon","c-check_filled","iconClass","text-profit text-lg"],[1,"font-bold",2,"font-size","19px"],["icon","d-edit-info","iconClass","text-black-5 cursor-pointer text-lg",3,"click"],["nzText","b2b.login.security.otp.setup.new","nzTextDefault","Setup New Mobile Number",3,"nzLoading","click"],[1,"flex","items-center","gap-2","font-bold"],["
1iconType","flag",1,"text-md",3,"icon"],[1,"flex","items-start","bg-loss-9","text-white","text-sm","px-2","mb-2","-mt-2"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"mr-2","mt-0.5","flex-shrink-0"],[1,"bg-loss-9","text-white","text-sm","px-2","mb-2"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-6","text-center","mb-4"],[1,"font-bold","mb-2"],["width","150","assetImg","",1,"block","mx-auto","mb-2",3,"assetSource"],[1,"text-sm","mb-0"],["width","120","assetImg","",1,"block","mx-auto","mb-2",3,"assetSource"],[1,"border","border-black-2","rounded","mb-4"],["class","flex items-center gap-3 p-3 cursor-pointer border-b border-black-2 last:border-b-0",3,"click",4,"ngFor","ngForOf"],["class","text-loss text-sm text-center mb-2",4,"ngIf"],[1,"flex","justify-center"],["nzClass","min-w-xs","nzText","b2b.login.security.dt.request","nzTextDefault","Request",3,"nzLoading","nzDisabled","click"],[1,"text-center","text-sm","mt-3"],[1,"text-black-4","mb-1"],["class","text-primary font-bold cursor-pointer",3,"click",4,"ngIf"],[1,"flex","items-center","gap-3","p-3","cursor-pointer","border-b","border-black-2","last:border-b-0",3,"click"],["type","radio","name","trustedDevice",3,"checked","change"],[1,"flex-1","grid","grid-cols-2","gap-2"],[1,"text-xs","text-black-4","mb-0"],[1,"font-bold","mb-0"],[1,"text-loss","text-sm","text-center","mb-2"],[1,"text-primary","font-bold","cursor-pointer",3,"click"],[1,"flex","items-center","gap-3","mb-4"],["iconType","mat","icon","chevron_left","iconClass","cursor-pointer text-2xl text-black-6 hover:text-primary",3,"click"],[1,"flex-1","border","border-black-2","rounded","p-3","grid","grid-cols-2","gap-2"],[1,"text-center","mb-2"],[1,"text-lg","font-bold","mb-3"],[1,"inline-flex","items-center","justify-center","bg-black-1","rounded-full","px-8","py-3","mb-2"],[1,"text-primary","text-xl","font-bold",2,"letter-spacing","0.3em"],[1,"mb-5"],[1,"text-sm","text-black-4","mb-1"],[1,"text-center","text-sm","mt-8"],[1,"max-w-md","mx-auto"],[1,"text-center","font-bold","mb-2"],[1,"flex","justify-center","mt-3"],["nzText","b2b.general.submit","nzTextDefault","Submit",3,"nzLoading","nzDisabled","click"],["maxlength","1","inputmode","numeric",1,"w-12","h-12","text-center","text-xl","border","border-black-3","rounded",3,"input","keydown"],["totpBox",""],[1,"text-loss","text-sm","text-center","mt-2"],[1,"text-center","text-sm","text-black-4","mb-2"],["otpBox",""],[1,"text-center","text-sm","text-black-4"],[1,"text-center"],[1,"notes","bg-black-1","rounded","p-3","mt-4","text-sm"],[1,"text-xs","list-decimal","pl-5","mb-0"]],template:function(t,e){if(1&t&&(f.TgZ(0,"ui-content",0),f.ALo(1,"async"),f.YNc(2,K,4,5,"ng-template",null,1,f.W1O),f.TgZ(4,"div",2),f.TgZ(5,"p",3),f._uU(6),f.ALo(7,"translate"),f.qZA(),f.YNc(8,it,8,16,"ui-alert",4),f.YNc(9,ot,2,1,"div",5),f.TgZ(10,"div",6),f.YNc(11,st,1,1,"ui-button",7),f.qZA(),f.qZA(),f.qZA(),f.TgZ(12,"ui-right-drawer",8),f.NdJ("onClickButtonLeftEmitter",function(){return e.onCancelForm()})("onClickButtonRightEmitter",function(){return e.onNext()})("nzOnClose",function(){return e.onCancelForm()}),f.ALo(13,"translate"),f.TgZ(14,"form",9),f.TgZ(15,"nz-form-item",10),f.TgZ(16,"nz-form-control"),f.TgZ(17,"ui-select",11),f.ALo(18,"translate"),f.YNc(19,rt,4,2,"ng-template",null,12,f.W1O),f.qZA(),f.qZA(),f.qZA(),f.TgZ(21,"nz-form-item",10),f.TgZ(22,"nz-form-control",13),f._UZ(23,"ui-input",14),f.ALo(24,"translate"),f.YNc(25,dt,2,2,"ng-template",null,15,f.W1O),f.qZA(),f.qZA(),f.YNc(27,gt,5,5,"div",16),f.TgZ(28,"nz-form-item",10),f.TgZ(29,"nz-form-control",13),f._UZ(30,"ui-input",17),f.ALo(31,"translate"),f.YNc(32,ft,1,1,"ng-template",null,18,f.W1O),f.qZA(),f.qZA(),f.YNc(34,mt,5,5,"div",16),f.YNc(35,Tt,3,6,"div",19),f.qZA(),f.YNc(36,At,1,0,"ng-container",20),f.qZA(),f.TgZ(37,"ui-modal-pc-drawer-mobile",21),f.NdJ("nzOnCancel",function(){return e.onCloseDtModal()}),f.ALo(38,"translate"),f.YNc(39,_t,31,37,"ng-container",22),f.YNc(40,Qt,44,54,"ng-container",22),f.YNc(41,Gt,29,31,"ng-container",22),f.qZA(),f.TgZ(42,"ui-modal-pc-drawer-mobile",21),f.NdJ("nzOnCancel",function(){return e.onCloseOtpModal()}),f.ALo(43,"translate"),f.TgZ(44,"p",23),f._uU(45),f.ALo(46,"translate"),f.qZA(),f.TgZ(47,"p",24),f._uU(48),f.ALo(49,"translate"),f.qZA(),f.TgZ(50,"p",25),f._uU(51),f.qZA(),f.YNc(52,Vt,2,1,"p",26),f.TgZ(53,"div",27),f.YNc(54,Ht,2,0,"input",28),f.qZA(),f.YNc(55,Kt,4,11,"p",29),f.YNc(56,te,4,5,"div",30),f.YNc(57,ee,3,6,"div",31),f.YNc(58,ie,1,0,"ng-container",20),f.qZA(),f.YNc(59,re,11,15,"ng-template",null,32,f.W1O)),2&t){const t=f.MAs(3),i=f.MAs(20),n=f.MAs(26),o=f.MAs(33),s=f.MAs(60);let r,l;f.Q6J("nzTitle",f.lcZ(1,46,e.isMobileResolution$)?null:t),f.xp6(6),f.hij(" ",f.xi3(7,48,"b2b.login.security.otp.via.sms.desc",f.DdM(75,le))," "),f.xp6(2),f.Q6J("ngIf",e.smsOtpRegisterLimit>1),f.xp6(1),f.Q6J("ngIf",e.registeredMobileNos.length),f.xp6(2),f.Q6J("ngIf",e.canAddMore),f.xp6(1),f.Q6J("visible",e.drawerVisible)("drawerTitle",f.xi3(13,51,e.mode===e.SMS_OTP_UPDATE?"b2b.login.security.otp.edit.title":"b2b.login.security.otp.setup.new",f.VKq(76,xt,e.drawerTitle)))("buttonRightLabelDisabled",e.form.invali
1d)("nzClosable",!0),f.xp6(2),f.Q6J("formGroup",e.form),f.xp6(3),f.Q6J("nzPlaceHolder",f.xi3(18,54,"b2b.sms.otp.registration.form.country.region.code",f.DdM(78,ae)))("nzOptions",e.countryOptions)("nzCustomTemplate",i),f.xp6(5),f.Q6J("nzErrorTip",n),f.xp6(1),f.Q6J("nzPrefix",e.selectedDialCode)("nzPlaceHolder",f.xi3(24,57,"b2b.sms.otp.registration.form.mobile.short",f.DdM(79,ce))),f.xp6(4),f.Q6J("ngIf",(null==e.form.errors?null:e.form.errors.duplicate)&&(null==(r=e.form.get("mobileNum"))?null:r.touched)),f.xp6(2),f.Q6J("nzErrorTip",o),f.xp6(1),f.Q6J("nzPrefix",e.selectedDialCode)("nzPlaceHolder",f.xi3(31,60,"b2b.sms.otp.registration.form.confirm.mobile.short",f.DdM(80,ue))),f.xp6(4),f.Q6J("ngIf",(null==e.form.errors?null:e.form.errors.mobileMismatch)&&(null==(l=e.form.get("confirmMobileNum"))?null:l.touched)),f.xp6(1),f.Q6J("ngIf",e.otpError&&"form"===e.state),f.xp6(1),f.Q6J("ngTemplateOutlet",s),f.xp6(1),f.Q6J("nzVisible",e.isDtModalOpen)("nzTitle",f.xi3(38,63,"b2b.login.security.dt.auth.title",f.DdM(81,de)))("nzFooter",null)("nzClosable",!0)("nzWidth",660),f.xp6(2),f.Q6J("ngIf","device-select"===e.state),f.xp6(1),f.Q6J("ngIf","device-auth"===e.state),f.xp6(1),f.Q6J("ngIf","device-totp"===e.state),f.xp6(1),f.Q6J("nzVisible","otp"===e.state)("nzTitle",f.xi3(43,66,"b2b.login.security.otp.verify.title",f.DdM(82,pe)))("nzFooter",null)("nzClosable",!0)("nzWidth",660),f.xp6(3),f.hij(" ",f.xi3(46,69,"b2b.login.security.otp.verify.desc",f.DdM(83,ge))," "),f.xp6(3),f.Oqu(f.xi3(49,72,"b2b.otp.enter.code",f.DdM(84,he))),f.xp6(3),f.Oqu(null==e.otpModel?null:e.otpModel.maskUpOtpMobileNo),f.xp6(1),f.Q6J("ngIf",null==e.otpModel?null:e.otpModel.otpPrefix),f.xp6(2),f.Q6J("ngForOf",e.otpDigits)("ngForTrackBy",e.trackByIndex),f.xp6(1),f.Q6J("ngIf",e.resendSeconds>0),f.xp6(1),f.Q6J("ngIf",0===e.resendSeconds),f.xp6(1),f.Q6J("ngIf",e.otpError),f.xp6(1),f.Q6J("ngTemplateOutlet",s)}},directives:[E.U,n.O5,N.T,I._Y,I.JL,z.Lr,I.sg,U.SK,z.Nx,U.t3,z.Fd,F.c,I.JJ,I.u,P.M,R.Y,n.tP,J.s,n.sg,Q.f,Y.D,B.L,j.w,G.Ls,V.p],pipes:[n.Ov,o.X$,n.uU],encapsulation:2}),(0,g.gn)([(0,h.Ph)(b.qU.isMobileResolution)],be.prototype,"isMobileResolution$",void 0);var fe=i(20801),ve=i(79030);const me=function(){return{default:"iFAST Digital Token"}};function xe(t,e){1&t&&(f._UZ(0,"ui-icon",9),f.TgZ(1,"span",10),f._uU(2),f.ALo(3,"translate"),f.qZA()),2&t&&(f.xp6(2),f.Oqu(f.xi3(3,1,"b2b.login.security.ifast.digital.token",f.DdM(4,me))))}function Te(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"ui-button",11),f.NdJ("click",function(){return f.CHM(t),f.oxw().onActivate()}),f.qZA()}}function Ae(t,e){1&t&&f.GkF(0)}const Ze=function(){return{default:"Activate iFAST Digital Token"}};function De(t,e){if(1&t&&(f.ynx(0),f.TgZ(1,"h3",12),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.YNc(4,Ae,1,0,"ng-container",7),f.BQk()),2&t){f.oxw(2);const t=f.MAs(12);f.xp6(2),f.hij(" ",f.xi3(3,2,"b2b.login.security.dt.activate.title",f.DdM(5,Ze))," "),f.xp6(2),f.Q6J("ngTemplateOutlet",t)}}function ye(t,e){1&t&&f._UZ(0,"ui-tag",26)}const ke=function(){return{default:"Operating System"}},qe=function(){return{default:"Linked Date"}},Oe=function(){return{default:"Last Login"}};function Me(t,e){if(1&t){const t=f.EpF();f.TgZ(0,"div",16),f.TgZ(1,"div",17),f.TgZ(2,"div",18),f.TgZ(3,"h4",19),f._uU(4),f.qZA(),f.YNc(5,ye,1,0,"ui-tag",20),f.qZA(),f.TgZ(6,"ui-icon",21),f.NdJ("click",function(){const e=f.CHM(t).$implicit;return f.oxw(3).onUnlink(e)}),f.qZA(),f.qZA(),f.TgZ(7,"div",22),f.TgZ(8,"span",23),f._uU(9),f.ALo(10,"translate"),f.qZA(),f.TgZ(11,"span",24),f._uU(12),f.qZA(),f.qZA(),f.TgZ(13,"div",22),f.TgZ(14,"span",23),f._uU(15),f.ALo(16,"translate"),f.qZA(),f.TgZ(17,"span",24),f._uU(18),f.ALo(19,"date"),f.qZA(),f.qZA(),f.TgZ(20,"div",25),f.TgZ(21,"span",23),f._uU(22),f.ALo(23,"translate"),f.qZA(),f.TgZ(24,"span",24),f._uU(25),f.ALo(26,"date"),f.qZA(),f.qZA(),f.qZA()}if(2&t){const t=e.$implicit,i=f.oxw(3);f.xp6(4),f.Oqu(t.deviceName),f.xp6(1),f.Q6J("ngIf",t.isCurrentDevice),f.xp6(1),f.ekj("pointer-events-none",i.unlinkingId===t.deviceId),f.xp6(3),f.Oqu(f.xi3(10,10,"b2b.login.security.dt.os",f.DdM(25,ke))),f.xp6(3),f.Oqu(t.deviceVersion),f.xp6(3),f.Oqu(f.xi3(16,13,"b2b.login.security.dt.linked.date",f.DdM(26,qe))),f.xp6(3),f.Oqu(f.xi3(19,16,t.createDate,i.DATE_TIME_FORMAT)),f.xp6(4),f.Oqu(f.xi3(23,19,"b2b.login.security.dt.last.login",f.DdM(27,Oe))),f.xp6(3),f.Oqu(f.xi3(2
16,22,t.lastLogin,i.DATE_TIME_FORMAT))}}const Ce=function(){return{default:"Devices linked to your iFAST Login ID"}},we=function(){return{default:"You have linked the following device(s) to your iFAST Login ID."}};function Ie(t,e){if(1&t&&(f.ynx(0),f.TgZ(1,"p",12),f._uU(2),f.ALo(3,"translate"),f.qZA(),f.TgZ(4,"p",13),f._uU(5),f.ALo(6,"translate"),f.qZA(),f.TgZ(7,"div",14),f.YNc(8,Me,27,28,"div",15),f.qZA(),f.BQk()),2&t){const t=f.oxw(2);f.xp6(2),f.hij(" ",f.xi3(3,3,"b2b.login.security.dt.linked.title",f.DdM(9,Ce))," "),f.xp6(3),f.hij(" ",f.xi3(6,6,"b2b.login.security.dt.linked.desc",f.DdM(10,we))," "),f.xp6(3),f.Q6J("ngForOf",t.trustedDeviceList)}}function Le(t,e){if(1&t&&(f.ynx(0),f.YNc(1,De,5,6,"ng-container",5),f.YNc(2,Ie,9,11,"ng-container",5),f.BQk()),2&t){const t=f.oxw();f.xp6(1),f.Q6J("ngIf",!t.hasLinkedDevice),f.xp6(1),f.Q6J("ngIf",t.hasLinkedDevice)}}function Se(t,e){1&t&&f.GkF(0)}function _e(t,e){1&t&&f._UZ(0,"dt-setup-guide")}class Ee{constructor(t,e){this.twoFaService=t,this.uiModal=e,this.DATE_TIME_FORMAT="dd MMM yyyy hh:mm:ss a",this.loading=!0,this.hasLinkedDevice=!1,this.showActivate=!1,this.trustedDeviceList=[]}ngOnInit(){this.loadDevices()}ngOnDestroy(){}get showActivateScreen(){return!this.hasLinkedDevice||this.showActivate}onActivate(){this.showActivate=!0}onBackToDevices(){this.showActivate=!1}onUnlink(t){(null==t?void 0:t.deviceId)&&!this.unlinkingId&&this.uiModal.confirm({type:"warning",title:"b2b.login.security.dt.unlink.confirm.title",titleDefault:"Confirmation",content:"b2b.login.security.dt.unlink.confirm.desc",contentDefault:"If you unlink this device, the digital token on this device will be disabled. Confirm to proceed?",btnCancel:!0,btnOkText:"b2b.general.confirm",btnOkDefault:"Confirm",btnCancelText:"b2b.general.cancel",btnCancelDefault:"Cancel",onClickOk:e=>{e.close(),this.doUnlink(t)}})}doUnlink(t){this.unlinkingId=t.deviceId,this.twoFaService.unlinkTrustedDevice(t.deviceId).subscribe(()=>{this.unlinkingId=void 0,this.uiModal.success({title:"b2b.login.security.dt.unlink.success",titleDefault:"Device Unlinked Successfully",content:"b2b.login.security.dt.unlink.success.desc",contentDefault:"This device has been unlinked successfully.",onClickOk:t=>{t.close(),this.loadDevices()}})},()=>{this.unlinkingId=void 0,this.uiModal.error({title:"b2b.login.security.dt.unlink.failed",titleDefault:"Failed to unlink device. Please try again."})})}loadDevices(){this.loading=!0,this.twoFaService.findSubscribedDevices().subscribe(t=>{this.trustedDeviceList=null!=t?t:[],this.hasLinkedDevice=this.trustedDeviceList.length>0,this.showActivate=!1,this.loading=!1},()=>{this.trustedDeviceList=[],this.hasLinkedDevice=!1,this.showActivate=!1,this.loading=!1})}}Ee.\u0275fac=function(t){return new(t||Ee)(f.Y36(S.b),f.Y36(_.V))},Ee.\u0275cmp=f.Xpm({type:Ee,selectors:[["app-ifast-digital-token"]],decls:13,vars:16,consts:[[1,"block",3,"nzTitle","rightTitleContent"],["dtHeaderTpl",""],["ui-content-title-right-content",""],["nzType","default","nzClass","btn-outline","nzText","b2b.login.security.dt.activate.btn","nzTextDefault","Activate Digital Token",3,"click",4,"ngIf"],["ui-content-extra-template",""],[4,"ngIf"],[3,"nzVisible","nzTitle","nzFooter","nzClosable","nzWidth","nzOnCancel"],[4,"ngTemplateOutlet"],["activateBodyTpl",""],["icon","lock","iconType","igm","iconClass","text-primary text-xl",1,"mr-2"],[1,"font-bold","whitespace-normal","mt-0.5"],["nzType","default","nzClass","btn-outline","nzText","b2b.login.security.dt.activate.btn","nzTextDefault","Activate Digital Token",3,"click"],[1,"text-base","font-bold","mb-2"],[1,"text-sm","mb-4"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-4"],["class","p-4 bg-black-1 rounded",4,"ngFor","ngForOf"],[1,"p-4","bg-black-1","rounded"],[1,"flex","items-center","justify-between","mb-3"],[1,"flex","items-center","gap-2"],[1,"text-base","font-bold","mb-0"],["nzType","PROFIT","nzTitle","Current Device",4,"ngIf"],["icon","bin","iconClass","text-primary cursor-pointer text-lg",3,"click"],[1,"flex","justify-between","text-sm","py-1.5","border-b","border-black-2"],[1,"text-black-4"],[1,"font-bold"],[1,"flex","justify-between","text-sm","py-1.5"],["nzType","PROFIT","nzTitle","Current Device"]],template:function(t,e){if(1&t&&(f.TgZ(0,"ui-content",0),f.ALo(1,"async"),f.YNc(2,xe,4,5,"ng-template",null,1,f.W1O),f.TgZ(4,"div",2),f.YNc(5,Te,1,0,"ui-button",3),f.qZA(),f.TgZ(6,"div",4),f.YNc(7,Le,3,2,"ng-container",5),f.qZA(),f.qZA(),f.TgZ(8,"ui-modal-pc-drawer-mobile",6),f.NdJ("nzOnCancel",function(){return e.onBackToDevices()}),f.ALo(9,"translate"),f.YNc(10,Se,1,0,"ng-container",7),f.qZA(),f.YNc(11,_e,1,0,"ng-template",null,8,f.W1O)),2&t){const t=f.MAs(3),i=f.MAs(12);f.Q6J("nzTitle",f.lcZ(1,10,e.isMobileResolution$)?null:t)("rightTitleContent",e.hasLinkedDevice),f.xp6(5),f.Q6J("ngIf",e.hasLinkedDevice),f.xp6(2),f.Q6J("ngIf",!e.loading),f.xp6(1),f.Q6J("nzVisible",e.hasLinkedDevice&&e.showActivate)("nzTitle",f.xi3(9,12,"b2b.login.security.dt.activate.title",f.DdM(15,Ze)))("nzFooter",null)("nzClosable",!0)("nzWidth",1040),f.xp6(2),f.Q6J("ngTemplateOutlet",i)}},directives:[E.U,n.O5,J.s,n.tP,Q.f,B.L,n.sg,fe.v,ve.x],pipes:[n.Ov,o.X$,n.uU],styles:[".dt-step-badge{position:relative}.dt-ring{position:absolute;inset:-3px;width:calc(100% + 6px);height:calc(100% + 6px);transform:rotate(-90deg);pointer-events:none}.dt-ring-progress{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-dasharray:113.1;stroke-dashoffset:113.1;animation:dtRingProgress var(--dt-step-duration,3.2s) linear forwards}@keyframes dtRingProgress{to{stroke-dashoffset:0}}.phone-mockup{width:240px;max-width:100%}.phone-mockup,.phone-screen{position:relative}.phone-content{display:block;width:100%;height:auto}"],encapsulation:2}),(0,g.gn)([(0,h.Ph)(b.qU.isMobileResolution)],Ee.prototype,"isMobileResolution$",void 0);const Ne=[{path:"",pathMatch:"full",redirectTo:p.o.OTP_VIA_SMS},{path:"",component:w,children:[{path:p.o.OTP_VIA_SMS,component:be},{path:p.o.IFAST_DIGITAL_TOKEN,component:Ee}]}];let ze=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f.oAB({type:t}),t.\u0275inj=f.cJS({imports:[[d.Bz.forChild(Ne)],d.Bz]}),t})(),Ue=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f.oAB({type:t}),t.\u0275inj=f.cJS({imports:[[n.ez,ze,r.m,l.a,o.aw,s.l1,a.c,c.W,u.a]]}),t})()}}]);
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.