1(window.webpackJsonp=window.webpackJsonp||[]).push([[63,76,81,101,115],{"0HzO":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return t.FUND="Funds",t.BOND="Bonds",t.INSURANCE="Insurance",t.STOCK="Stocks",t.ETF="ETFs",t.BOND_CALCULATOR="Bond Calculator",t.BOND_RETURN_CALCULATOR="Bond Return Calculator",t.FUND_SWITCHING_CALCULATOR="Fund Switching Calculator",t.STOCK_CALCULATOR="Stock Calculator",t.ETF_CALCULATOR="ETF Calculator",t.RSP_CALCULATOR="RSP Calculator",t}({})},"3hac":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("j+kT"),c=n("6h7t"),o=n("MV2b");let s=(()=>{class t{}return t.ROUTE_HOLDINGS_NEXT=Object(i.a)(c.o.APP,c.o.HOLDINGS),t.ROUTE_INCOME_TREND=Object(i.a)(c.o.APP,c.o.HOLDINGS,c.o.INCOME_TREND),t.ROUTE_PERFORMANCE=Object(i.a)(c.o.APP,c.o.HOLDINGS,c.o.PERFORMANCE),t.ROUTE_CASH_SOLUTION=Object(i.a)(c.o.APP,c.o.CASH_SOLUTION),t.ROUTE_MY_RSP=Object(i.a)(c.o.APP,c.o.RSP,c.o.RSP_LIST),t.ROUTE_TRANSACTION_RECORD=Object(i.a)(c.o.APP,c.o.TRANSACTION_RECORD),t.GROUP_DEFAULT={label:"Default",value:""},t.GROUP_PRODUCT={label:"Product",value:"product"},t.GROUP_CURRENCY={label:"Currency",value:"currency"},t.GROUP_INCOME_TYPE={label:"Income Type",value:"incomeType"},t.PRODUCT_ALL_TAB={label:"All",value:"all"},t.PRODUCT_BOND_TAB={label:"Bond",value:"bonds"},t.PRODUCT_FUND_TAB={label:"Unit Trust",value:"funds"},t.PRODUCT_STOCK_TAB={label:"Stock",value:"stocks"},t.PRODUCT_ETF_TAB={label:"ETF",value:"etfs"},t.PRODUCT_DPMS_TAB={label:"Managed Portfolio",value:"dpms"},t.PRODUCT_INSURANCE_TAB={label:"Insurance",value:"insurance"},t.HOLDING_OVERVIEW_TAB={label:"OVERVIEW",value:"overview"},t.HOLDING_HOLDINGS_TAB={label:"Holdings",value:"holdings",route:t.ROUTE_HOLDINGS_NEXT},t.HOLDING_INVESTMENTS_TAB={label:"Investments",value:"investments"},t.HOLDING_ALLOCATION_TAB={label:"Allocation",value:"allocations"},t.HOLDING_ANALYTICS_TAB={label:"ANALYTICS",value:"analytics"},t.INCOME_TREND_TAB={label:"Income Trends",value:"incomeTrends",route:t.ROUTE_INCOME_TREND},t.PERFORMANCE_TAB={label:"Performance",value:"performance",route:t.ROUTE_PERFORMANCE},t.CASH_SOLUTION_TAB={label:"Cash Solutions",value:"cashSolution",route:t.ROUTE_CASH_SOLUTION},t.ALLOCATION_PRODUCTS_TAB={label:"Product",value:"products"},t.ALLOCATION_ASSETS_TAB={label:"Asset Class",value:"assets"},t.ALLOCATION_GEOGRAPHICAL_TAB={label:"Geographical",value:"geographical"},t.ALLOCATION_SECTORS_TAB={label:"Sector",value:"sectors"},t.ALLOCATION_PAYMENT_METHODS_TAB={label:"Payment Method",value:"paymentMethods"},t.ALLOCATION_EXCHANGES_TAB={label:"Exchange",value:"Exchanges"},t.ALLOCATION_BOND_TYPES_TAB={label:"Bond Type",value:"bondTypes"},t.ALLOCATION_CURRENCY_TAB={label:"Currency",value:"currency"},t.STOCK_ETF_SECTOR_NAME_MAP={FinancialService:"Financial Service",Healthcare:"Healthcare",CommunicationServices:"Communication Services",ConsumerCyclical:"Consumer Cyclical",BasicMaterials:"Basic Materials",Technology:"Technology",RealEstate:"Real Estate",Industrials:"Industrials",ConsumerDefensive:"Consumer Defensive",Energy:"Energy",Utilities:"Utilities",Other:"Other"},t.PRODUCT_TYPE_COLOUR_MAP={Stocks:"#1C85FC",ETFs:"#52C6C2",Bond:"#FFD200","Unit Trust":"#BD2E26","Managed Portfolio":"#7269CC","Cash Solution":"#BDBDBD"},t.PRODUCT_KEY_SEQUENCE_MAP={"Unit Trust":0,Stocks:1,ETFs:2,Bond:3,"Managed Portfolio":4,"Cash Solution":5},t.FINANCIAL_SERVICE="Financial Service",t.HEALTHCARE="Healthcare",t.COMMUNICATION_SERVICES="Communication Services",t.CONSUMER_CYCLICAL="Consumer Cyclical",t.BASIC_MATERIALS="Basic Materials",t.TECHNOLOGY="Technology",t.REAL_ESTATE="Real Estate",t.INDUSTRIALS="Industrials",t.CONSUMER_DEFENSIVE="Consumer Defensive",t.ENERGY="Energy",t.UTILITIES="Utilities",t.OTHER="Other",t.FUND_PAYMENT_NAME_MAP={cheque:"Cash"},t.BOND_SECTOR_NAME_MAP={PEQT:"Private Equity",QSOV:"Quasi-Sovereign",COND:"Consumer Discretionary",INFO:"Information Technology",GOVT:"Government",INDS:"Industrials",TELS:"Telecommunication Services",HECA:"Health Care",ENRG:"Energy",MATS:"Materials",FINS:"Financials",UTIL:"Utilities",CONS:"Consumer Staples"},t.BOND_TYPE_NAME_MAP={SOV:"Sovereign",QSOV:"Quasi-Sovereign",HYCORP:"High Yield Corporate",ABS:"Asset-Backed Securities",CORP:"Corporate"},t.ALLOCATION_ALL_PRODUCT_TITLES={currentValue:"Product Allocation Current Value",profitLossValue:"Product Allocation Profit Value Exclude Ai",profitLossPercentage:"Product Allocation Profit Percentage Value Exclude Ai"},t.ALLOCATION_ALL_ASSET_TITLES={currentValue:"Product Asset Allocation Current Value",profitLossValue:"Product Asset Allocation Profit Value Exclude Ai",profitLossPercentage:"Product Asset Allocation Profit Percentage Value Exclude Ai"},t.ALLOCATION_ALL_SECTOR_TITLES={currentValue:"Sector Allocation Current Value",profitLossValue:"Sector Allocation Profit Value Exclude Ai",profitLossPercentage:"Sector Allocation Profit Percentage Value Exclude Ai"},t.ALLOCATION_ALL_GEO_TITLES={currentValue:"Geographical Allocation Current Value",profitLossValue:"Geographical Allocation Profit Value Exclude Ai",profitLossPercentage:"Geographical Allocation Profit Percentage Value Exclude Ai"},t.ALLOCATION_ALL_CURRENCY_TITLES={currentValue:"Currency Allocation Current Value",profitLossValue:"Currency Allocation Profit Value Exclude Ai",profitLossPercentage:"Currency Allocation Profit Percentage Value Exclude Ai"},t.ALLOCATION_BOND_TYPE_TITLES={currentValue:"Bond Type Allocation Current Value",profitLossValue:"Bond Type Allocation Exclude Ai Profit Value",profitLossPercentage:"Bond Type Allocation Exclude Ai Profit Percentage Value"},t.ALLOCATION_BOND_SECTOR_TITLES={currentValue:"Bond Sector Allocation Current Value",profitLossValue:"Bond Sector Allocation Exclude Ai Profit Value",profitLossPercentage:"Bond Sector Allocation Exclude Ai Profit Percentage Value"},t.ALLOCATION_BOND_CURRENCY_TITLES={currentValue:"Currency Allocation Current Value",profitLossValue:"Currency Allocation Profit Value",profitLossPercentage:"Currency Allocation Profit Percentage Value"},t.ALLOCATION_UT_GEO_TITLES={currentValue:"Geographical Allocation Current Value",profitLossValue:"Geographical Allocation Profit Value",profitLossPercentage:"Geographical Allocation Profit Percentage Value"},t.ALLOCATION_UT_SECTOR_TITLES={currentValue:"Unit Trust Sector Allocation Current Value",profitLossValue:"Unit Trust Sector Allocation Profit Value",profitLossPercentage:"Unit Trust Sector Allocation Profit Percentage Value"},t.ALLOCATION_UT_ASSET_TITLES={currentValue:"Product Asset Allocation Current Value",profitLossValue:"Product Asset Allocation Profit Value",profitLossPercentage:"Product Asset Allocation Profit Percentage Value"},t.ALLOCATION_UT_PAYMENT_TITLES={currentValue:"Pay Method Allocation Current Value",profitLossValue:"Pay Method Allocation Profit Value",profitLossPercentage:"Pay Method Allocation Profit Percentage Value"},t.ALLOCATION_UT_CURRENCY_TITLES={currentValue:"Currency Allocation Current Value",profitLossValue:"Currency Allocation Profit Value",profitLossPercentage:"Currency Allocation Profit Percentage Value"},t.STOCKS_AND_ETFS="Stocks and ETFs",t.ACCOUNT_TYPES=["P","WP","J","WJ","C","WC"],t.WAC_NUMBER_TYPE="WAC",t.PROFIT_LOSS_NUMBER_TYPE="P&L",t.COST_NUMBER_TYPE="QTY",t.QTY_NUMBER_TYPE="COST",t.PRICE_NUMBER_TYPE="PRICE",t.Y="Y",t.N="N",t.MYR="MYR",t.CMF2="CMF2",t.CASH="CASH",t.EPF="EPF",t.PRS="PRS",t.PRS_GOV="PRS_GOV",t.CASH_FUND_TYPE="CF",t.ACCOUNT_A="Account A",t.ACCOUNT_B="Account B",t.ALL="all",t.REFNO_INDEX=3,t.CASH_ACCOUNT="Cash Account",t.AUTO_SWEEP="Auto-Sweep",t.IFAST_PAY="iFAST Pay",t.FUNDS="funds",t.STOCKS="stocks",t.DPMS="dpms",t.BONDS="bonds",t.ETFS="etfs",t.INSURANCE="insurance",t.CPON="cpon",t.API_CPON="CPON",t.RSP_FUNDS="rsp",t.STOCK_AND_ETF="stockAndEtf",t.PRODUCT_CURRENCY="productCurrency",t.MYR_CURRENCY="myrCurrency",t.ALLOCATION="allocation",t.PROFIT_LOSS="profitLoss",t.RED_COLOR="#EA1437",t.BLUE_COLOR="#004BAD",t.GREEN_COLOR="#009933",t.PURPLE_COLOR="#BF31EA",t.LINE_PROFIT_GREEN_COLOR="#009933",t.LINE_LOSS_RED_COLOR="#EA1437",t.CASH_ACCOUNT_COLOR="#BDBDBD",t.AUTO_SWEEP_COLOR="#CCA800",t.PRODUCT_STOCKS_COLOR="#1C85FC",t.PRODUCT_ETFS_COLOR="#52C6C2",t.PRODUCT_BONDS_COLOR="#FFD200",t.PRODUCT_FUNDS_COLOR="#BD2E26",t.PRODUCT_DPMS_COLOR="#7269CC",t.PERFORMANCE_OPT="performance",t.TOTAL_PNL_OPT="total pl",t.ONE_MONTH_PERIOD="1m",t.THREE_MONTH_PERIOD="3m",t.SIX_MONTH_PERIOD="6m",t.ONE_YEAR_PERIOD="1y",t.THREE_YEAR_PERIOD="3y",t.FIVE_YEAR_PERIOD="5y",t.TEN_YEAR_PERIOD="10y",t.YTD_PERIOD="ytd",t.MAX_PERIOD="max",t.ONE_DAY_PERIOD="1d",t.ONE_WEEK_PERIOD="1w",t.PERIOD_TO_DATE_RANGE_MAP={[t.ONE_MONTH_PERIOD]:[o.a.ONE_MONTH_AGO,o.a.TODAY],[t.THREE_MONTH_PERIOD]:[o.a.THREE_MONTHS_AGO,o.a.TODAY],[t.SIX_MONTH_PERIOD]:[o.a.SIX_MONTHS_AGO,o.a.TODAY],[t.ONE_YEAR_PERIOD]:[o.a.ONE_YEAR_AGO,o.a.TODAY],[t.THREE_YEAR_PERIOD]:[o.a.THREE_YEARS_AGO,o.a.TODAY],[t.FIVE_YEAR_PERIOD]:[o.a.FIVE_YEARS_AGO,o.a.TODAY],[t.TEN_YEAR_PERIOD]:[o.a.TEN_YEARS_AGO,o.a.TODAY]},t.YEAR="year",t.CURRENCY="currency",t.INCOME_TYPE="incomeType",t.MONTHLY="monthly",t.ANNUALLY="annually",t.INCOME_DISTRIBUTION="incomeDistribution",t.DIVIDEND="dividend",t.COUPON="coupon",t.PAYOUT="payout",t.INCOME_TYPE_LIST=["incomeDistribution","dividend","coupon","payout"],t.INCOME_TYPE_LIST_VALUE=[{value:"all",label:"All"},{value:"incomeDistribution",label:"Fund Income Distributions"},{value:"coupon",label:"Bond Coupons"},{value:"dividend",label:"Stock / ETF Dividends"},{value:"payout",label:"Managed Portfolio Payout"}],t.PL="P/L",t.TOTAL_PL="Total P/L",t.TRANSACTION_TYPE=Object.assign(Object.assign({},c.q.ORDER_TYPE),{BUY:{value:"Buy",label:"Buy"},SELL:{value:"Sell",label:"Sell"},RSP:{value:"RSP",label:"RSP"}}),t.ACTION_BUTTONS={INVEST:"INVEST",PAY:"PAY",PAY_GROUP:"PAY_GROUP",CANCEL:"CANCEL",MODIFY:"MODIFY",COOLING:"COOLING",RSP:"RSP",VIEW:"VIEW",DOWNLOAD:"DOWNLOAD",DOWNLOAD_ALL:"DOWNLOAD_ALL"},t.DEFAULT_DATE_NUMBER=-631179e6,t.TRANSACTIONS="transactions",t.HOLDINGS="holdings",t.DPMS_DETAIL_TABLE_OPTIONS=[{label:"Transactions",value:"transactions",active:!0},{label:"Holdings",value:"holdings",active:!1}],t.ORDERS="orders",t.HISTORY="history",t.TRANSACTION_TABS=[{label:"Orders",value:"orders",active:!0},{label:"History",value:"history",active:!1}],t.NO_ACTION_STATUS=["2","3","4","7","8","9","C","X"],t.BLANK="-",t.TBC="TBC",t.TBC_FULL="To be confirmed",t.TRANSACTION_STATUSES={PENDING:"pending",RECEIVED:"received",FILLED:"filled"},t})()},"6n6N":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}
1)),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return r}));var i=n("fXoL"),c=n("3hac");function o(t){return t instanceof i.Y?t:null}function s(t,e,n){return t.sort((t,i)=>{const c=t[e],o=i[e],s=null==c,a=null==o;return s&&!a?1:!s&&a?-1:s&&a?0:n?c.localeCompare(o):o.localeCompare(c)})}function a(t,e,n){return[...t].sort((t,i)=>{const c=t[e],o=i[e],s=null==c,a=null==o;return s&&a?0:s?1:a?-1:n?c-o:o-c})}const r=t=>{switch(t){case c.a.COUPON:return"Coupon Payout";case c.a.DIVIDEND:return"Dividend Payout";case c.a.INCOME_DISTRIBUTION:return"Income Distribution";case c.a.PAYOUT:return"Managed Portfolio Payout";default:return t||""}}},"8BBg":function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n("vcRD");var i=n("nJia"),c=n("B+r4"),o=n("FwiY"),s=n("ofXK"),a=n("of88"),r=n("NMKc"),l=n("fXoL");let d=(()=>{class t{}return t.\u0275mod=l.jc({type:t}),t.\u0275inj=l.ic({factory:function(e){return new(e||t)},providers:[],imports:[[i.b,c.b,s.c,o.c,a.a,r.a]]}),t})()},K87L:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n("ofXK"),c=n("FwiY"),o=n("JA5x"),s=n("B+r4"),a=n("OzZK"),r=n("eWI0"),l=n("fXoL");const d=[r.Zb,r.rc];let u=(()=>{class t{constructor(t){this.b2cIconService=t,this.b2cIconService.registerIcons([...d])}}return t.\u0275mod=l.jc({type:t}),t.\u0275inj=l.ic({factory:function(e){return new(e||t)(l.vc(r.n))},imports:[[i.c,c.c,o.e,s.b,a.c,r.o]]}),t})()},Lcc6:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("tk/3"),c=n("xeZY"),o=n("6h7t"),s=n("YD64"),a=n("z6cu"),r=n("vkgz"),l=n("JIr8"),d=n("fXoL"),u=n("31Y2"),p=n("T9l/");let h=(()=>{class t{constructor(t,e,n){this.http=t,this.paramService=e,this.sentryService=n,this.BASE_URL=c.a.STOCKS+c.a.PROTECTED}reportOrderFailure(t,e,n){this.sentryService.captureError(t,{exchange:null==e?void 0:e.exchange,stockCode:null==e?void 0:e.stockCode,orderSide:null==e?void 0:e.orderSide,quantity:null==e?void 0:e.quantity,price:null==e?void 0:e.price,paymentMode:null==e?void 0:e.paymentMode,timeInForce:null==e?void 0:e.timeInForce,orderType:null==e?void 0:e.orderType,refno:null==e?void 0:e.refno,errorMessage:n},{[s.a.TAG_ERROR_CATEGORY]:s.a.CATEGORY_STOCK_TRADE})}checkCashBalance(t,e=o.q.KLSE,n="MYR"){e===o.q.BURSA&&(e=o.q.KLSE);const i=this.paramService.buildHttpParams({refno:t,exchange:e,stockCurrency:n});return this.http.post(this.BASE_URL+c.a.CHECK_CASH_BALANCE,{},{params:i})}getEquivalentAmount(t,e=o.q.KLSE,n="MYR"){e===o.q.BURSA&&(e=o.q.KLSE);const i=this.paramService.buildHttpParams({refno:t,exchange:e,stockCurrency:n});return this.http.post(this.BASE_URL+c.a.GET_EQUIVALENT_AMOUNT,{},{params:i})}calculateReleaseFundForAutoSweep(t,e,n="N"){const i=this.paramService.buildHttpParams({refno:t,orderId:e,retrieveLatestPp:n});return this.http.post(this.BASE_URL+c.a.AUTO_SWEEP_RELEASE_AMOUNT,{},{params:i})}getStockUnsettledTrades(t,e="MYR"){const n=this.paramService.buildHttpParams({refno:t,currency:e});return this.http.post(this.BASE_URL+c.a.STOCK_UNSETTLED_TRADES,{},{params:n})}getStockAutoSweepUnsettledTrades(t,e="MYR"){const n=this.paramService.buildHttpParams({refno:t,currency:e});return this.http.post(this.BASE_URL+c.a.AS_UNSETTLED_TRADES,{},{params:n})}getMarketStatus(t,e){const n=this.paramService.buildHttpParams({exchange:t,orderType:e});return this.http.post(this.BASE_URL+c.a.STOCK_MARKET_STATUS,{},{params:n})}getMarketHour(t){const e=this.paramService.buildHttpParams({exchange:t});return this.http.post(c.a.STOCKS+c.a.STOCK_MARKET_HOUR,{},{params:e})}getStockWhitelistedAccount(t,e,n){const i=this.paramService.buildHttpParams({refno:t,exchange:e,orderType:n});return this.http.post(this.BASE_URL+c.a.STOCK_WHITELIST_ACCT,{},{params:i})}precheckSubmitOrder(t){const e=this.paramService.buildHttpParams(Object.assign({},t));return this.http.post(this.BASE_URL+c.a.PRE_CHECK_SUBMIT_NEW_ORDER,{},{params:e}).pipe(Object(r.a)(e=>{e&&e.status===o.a.RESPONSE_FAILED&&this.reportOrderFailure("Stock Precheck Failed",t,e.errorMessage)}),Object(l.a)(e=>(e instanceof i.e&&this.reportOrderFailure("Stock Precheck HTTP Error",t,e.message),Object(a.a)(e))))}submitOrder(t){const e=this.paramService.buildHttpParams(Object.assign({},t));return this.http.post(this.BASE_URL+c.a.SUBMIT_NEW_ORDER,{},{params:e}).pipe(Object(r.a)(e=>{e&&e.status===o.a.RESPONSE_FAILED&&this.reportOrderFailure("Stock Order Failed",t,e.errorMessage)}),Object(l.a)(e=>(e instanceof i.e&&this.reportOrderFailure("Stock Order HTTP Error",t,e.message),Object(a.a)(e))))}precheckAmendOrder(t){const e=this.paramService.buildHttpParams(Object.assign({},t));return this.http.post(this.BASE_URL+c.a.PRE_CHECK_AMEND_ORDER,{},{params:e}).pipe(Object(r.a)(e=>{e&&e.status===o.a.RESPONSE_FAILED&&this.reportOrderFailure("Stock Precheck Failed",t,e.errorMessage)}),Object(l.a)(e=>(e instanceof i.e&&this.reportOrderFailure("Stock Precheck HTTP Error",t,e.message),Object(a.a)(e))))}amendOrder(t){const e=this.paramService.buildHttpParams(Object.assign({},t));return this.http.post(this.BASE_URL+c.a.AMEND_ORDER,{},{params:e}).pipe(Object(r.a)(e=>{e&&e.status===o.a.RESPONSE_FAILED&&this.reportOrderFailure("Stock Order Failed",t,e.errorMessage)}),Object(l.a)(e=>(e instanceof i.e&&this.reportOrderFailure("Stock Order HTTP Error",t,e.message),Object(a.a)(e))))}precheckCancelOrder(t){const e=this.paramService.buildHttpParams(Object.assign({},t));return this.http.post(this.BASE_URL+c.a.PRE_CHECK_CANCEL_ORDER,{},{params:e}).pipe(Object(r.a)(e=>{e&&e.status===o.a.RESPONSE_FAILED&&this.reportOrderFailure("Stock Precheck Failed",t,e.errorMessage)}),Object(l.a)(e=>(e instanceof i.e&&this.reportOrderFailure("Stock Precheck HTTP Error",t,e.message),Object(a.a)(e))))}cancelOrder(t){const e=this.paramService.buildHttpParams(Object.assign({},t));return this.http.post(this.BASE_URL+c.a.CANCEL_ORDER,{},{params:e}).pipe(Object(r.a)(e=>{e&&e.status===o.a.RESPONSE_FAILED&&this.reportOrderFailure("Stock Order Failed",t,e.errorMessage)}),Object(l.a)(e=>(e instanceof i.e&&this.reportOrderFailure("Stock Order HTTP Error",t,e.message),Object(a.a)(e))))}findRspEtfAvailableList(t){const e=this.paramService.buildHttpParams({paramRef
1no:t});return this.http.post(this.BASE_URL+c.a.STOCK_RSP_AVAILABLE_LIST+c.a.READ,{},{params:e})}getEtfBuyRspDataDetails(t,e,n){const i=this.paramService.buildHttpParams({paramRefno:t,stockCode:e,exchange:n});return this.http.post(this.BASE_URL+c.a.RSP+c.a.BUY_DETAILS+c.a.READ,{},{params:i})}confirmRspEtfOrderWithCredential(t,e,n){const i=this.paramService.buildHttpParams(Object.assign({refno:t},n));return this.http.post(this.BASE_URL+c.a.RSP+c.a.BUY+c.a.CREATE,e,{params:i})}validateBuy(t){const e=this.paramService.buildHttpParams({refno:t});return this.http.post(this.BASE_URL+c.a.BUY+c.a.CART+c.a.VALIDATE,{},{params:e})}readRspAutoSweepAb(t,e){const n=this.paramService.buildHttpParams({refno:t,autoSweepCurrency:e});return this.http.post(this.BASE_URL+c.a.RSP+c.a.AUTO_SWEEP+c.a.AB+c.a.READ,{},{params:n})}}return t.\u0275fac=function(e){return new(e||t)(d.vc(i.c),d.vc(u.a),d.vc(p.a))},t.\u0275prov=d.hc({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"Rx/o":function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("mrSG"),c=n("k+8e"),o=n("AcyG"),s=n("gFZo"),a=n("fXoL"),r=n("ofXK");const l=function(t,e){return{width:t,height:e}},d=function(t){return{"font-size":t}};function u(t,e){if(1&t&&(a.rc(0,"div",2),a.mc(1,"img",3),a.rc(2,"span",4),a.qd(3),a.qc(),a.qc()),2&t){const t=a.Dc();a.Ub(1),a.Mc("src",t.imagePath+"shariah-icon.svg",a.gd)("alt","FSMOne MYR Auto-Sweep")("ngStyle",a.Tc(5,l,t.imgSize,t.imgSize)),a.Ub(1),a.Mc("ngStyle",a.Sc(8,d,t.labelTextSize)),a.Ub(1),a.rd("SHARIAH")}}function p(t,e){if(1&t&&(a.rc(0,"div"),a.mc(1,"img",3),a.qc()),2&t){const t=a.Dc();a.Ub(1),a.Mc("src",t.imagePath+"shariah-icon.svg",a.gd)("alt","FSMOne MYR Auto-Sweep")("ngStyle",a.Tc(3,l,t.imgSize,t.imgSize))}}let h=(()=>{class t{constructor(){this.displayType="label",this.imgSize="12px",this.labelTextSize="11px",this.AUTO_SWEEP_CONSTANT=c.a,this.imagePath="assets/images/landing/auto-sweep/"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.fc({type:t,selectors:[["app-uic-auto-sweep-shariah-label-icon"]],inputs:{displayType:"displayType",imgSize:"imgSize",labelTextSize:"labelTextSize"},decls:2,vars:2,consts:[["class","shariah-box",4,"ngIf"],[4,"ngIf"],[1,"shariah-box"],[3,"src","alt","ngStyle"],[3,"ngStyle"]],template:function(t,e){1&t&&(a.od(0,u,4,10,"div",0),a.od(1,p,2,6,"div",1)),2&t&&(a.Mc("ngIf","label"===e.displayType),a.Ub(1),a.Mc("ngIf","icon"===e.displayType))},directives:[r.t,r.w],styles:[".shariah-box[_ngcontent-%COMP%]{display:flex;padding:2px 4px;justify-content:center;align-items:center;gap:4px;border-radius:4px;border:1px solid #636363;background:#fff}"]}),Object(i.c)([Object(o.e)(s.a.isMobile)],t.prototype,"isMobile$",void 0),t})()},"XN+R":function(t,e,n){"use strict";n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return d}));var i=n("mrSG"),c=n("6h7t"),o=n("AcyG");let s=(()=>{class t{constructor(t){this.payload=t}}return t.type="[Etf Selector] Store filter",t})(),a=(()=>{class t{constructor(){}}return t.type="[Etf Selector] Reset filter",t})();var r=n("fXoL");const l={filterModel:{},etfTypeList:[],etfAMGList:[],etfCurrencyList:[],etfUnderlyingIndexList:[],etfAreaList:[],etfMainSectorList:[],etfSpecSectorList:[],etfExchangeList:[],riskRatingList:[],assetClassFilterAllChecked:!1,sectorFilterAllChecked:!1,managersFilterAllChecked:!1,currencyFilterAllChecked:!1,riskRatingFilterAllChecked:!1,exchangeFilterAllChecked:!1,typeFilterAllChecked:!1,areaFilterAllChecked:!1,underlyingFilterAllChecked:!1};let d=(()=>{let t=class{static getEtfSelectorFilterModel(t){return t.filterModel}static getEtfSelectorFilter(t){return t}storeEtfSelectorFilter({patchState:t},e){t(e.payload)}resetEtfSelectorFilter({patchState:t},e){t(l)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.hc({token:t,factory:t.\u0275fac}),Object(i.c)([Object(o.a)(s)],t.prototype,"storeEtfSelectorFilter",null),Object(i.c)([Object(o.a)(a)],t.prototype,"resetEtfSelectorFilter",null),Object(i.c)([Object(o.f)()],t,"getEtfSelectorFilterModel",null),Object(i.c)([Object(o.f)()],t,"getEtfSelectorFilter",null),t=Object(i.c)([Object(o.g)({n
1ame:c.p.ETF_SELECTOR,defaults:l})],t),t})()},YUW4:function(t,e,n){"use strict";n.r(e),n.d(e,"RspModule",(function(){return yy}));var i=n("NMKc"),c=n("oyxB"),o=n("Nqz0"),s=n("ZyQt"),a=n("0nng"),r=n("QlLE"),l=n("AcyG"),d=n("mrSG"),u=n("gFZo"),p=n("cp0P"),h=n("G/fY"),f=n("vkgz"),m=n("lJxs"),b=n("Kj3r"),g=n("+NfP"),y=n("iEbP"),M=n("6h7t"),v=n("LyJN"),C=n("2VHv"),T=n("H8v0"),S=n("j+kT"),D=n("P+IN"),z=n("fXoL"),q=n("tyNb"),E=n("Q3HA"),A=n("6l6k"),P=n("ofXK"),R=n("drXJ"),w=n("JA5x"),F=n("SpOC");const I=function(t){return["./",t]},U=function(t){return{refno:t}},O=function(t,e){return{"text-theme":t,"font-weight-bold":e}};function x(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-tab"),z.rc(1,"a",5),z.zc("click",(function(){z.dd(t);const n=e.$implicit;return z.Dc(2).onTabChange(null==n?null:n.refno)})),z.Ec(2,"async"),z.Ec(3,"async"),z.qd(4),z.qc(),z.qc()}if(2&t){const t=e.$implicit,n=z.Dc(2);z.Ub(1),z.Wb(z.Fc(2,6,n.mobile$)?"text-black-5 text-sm":"text-black-5"),z.Mc("routerLink",z.Sc(10,I,n.link))("queryParams",z.Sc(12,U,null==t?null:t.refno))("ngClass",z.Tc(14,O,n.refno===t.refno,z.Fc(3,8,n.mobile$)&&n.refno===t.refno)),z.Ub(3),z.sd(" ",null==t.accountTypeDisplay?null:t.accountTypeDisplay.substring(t.accountTypeDisplay.indexOf(" - ")+3)," ")}}function L(t,e){if(1&t&&(z.rc(0,"nz-tabset",4),z.od(1,x,5,17,"nz-tab",3),z.qc()),2&t){const t=z.Dc();z.Mc("nzTabBarGutter",0),z.Ub(1),z.Mc("ngForOf",t.accounts)}}const k=function(t,e){return{active:t,"":e}};function N(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",6),z.zc("click",(function(){z.dd(t);const n=e.$implicit;return z.Dc().onTabTypeClick(null==n?null:n.value)})),z.qd(2),z.qc(),z.oc()}if(2&t){const t=e.$implicit;z.Ub(1),z.Mc("routerLink",z.Sc(4,I,t.value))("ngClass",z.Tc(6,k,t.active,!t.active))("routerLinkActive","active"),z.Ub(1),z.rd(t.label)}}const _=function(t){return{"pt-3":t}};let B=(()=>{class t{constructor(t,e){this.router=t,this.store=e,this.accounts=[],this.link=M.o.RSP_LIST}ngOnInit(){this.refno&&this.store.dispatch(new y.N(this.refno))}onTabTypeClick(t){this.link=t,this.router.navigate([M.o.APP,M.o.RSP,t],{queryParams:{refno:this.refno}}),this.store.dispatch(new y.N(this.refno))}onTabChange(t){this.refno=t,this.router.navigate([M.o.APP,M.o.RSP,this.link],{queryParams:{refno:this.refno}}),this.store.dispatch(new y.N(this.refno))}}return t.\u0275fac=function(e){return new(e||t)(z.lc(q.e),z.lc(l.i))},t.\u0275cmp=z.fc({type:t,selectors:[["header-details"]],inputs:{accounts:"accounts",refno:"refno",menu:"menu"},features:[z.Tb([C.a])],decls:6,vars:9,consts:[["class","bg-white no-gutters","nzLinkRouter","",3,"nzTabBarGutter",4,"ngIf"],[1,"bg-white",3,"ngClass"],[3,"nzSize","nzClass"],[4,"ngFor","ngForOf"],["nzLinkRouter","",1,"bg-white","no-gutters",3,"nzTabBarGutter"],["nz-tab-link","","queryParamsHandling","merge",3,"routerLink","queryParams","ngClass","click"],[1,"rank-tab",3,"routerLink","ngClass","routerLinkActive","click"]],template:function(t,e){1&t&&(z.pc(0),z.od(1,L,2,2,"nz-tabset",0),z.rc(2,"div",1),z.rc(3,"rank-tab-style",2),z.Ec(4,"async"),z.od(5,N,3,9,"ng-container",3),z.qc(),z.qc(),z.oc()),2&t&&(z.Ub(1),z.Mc("ngIf",e.accounts.length>1),z.Ub(1),z.Mc("ngClass",z.Sc(7,_,e.accounts.length<2)),z.Ub(1),z.Mc("nzSize","small")("nzClass",z.Fc(4,5,e.mobile$)?"px-3":"px-0"),z.Ub(2),z.Mc("ngForOf",e.menu))},directives:[P.t,P.q,F.a,P.s,c.f,c.b,c.e,q.h,q.f,q.g],pipes:[P.b],styles:[".account-update-menu[_ngcontent-%COMP%] .account-update-menu-title[_ngcontent-%COMP%]{text-decoration:none}.account-update-menu[_ngcontent-%COMP%] .ant-menu-item[_ngcontent-%COMP%]{line-height:54px;height:54px}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"mobile$",void 0),t})();var V=n("B+r4"),Y=n("OzZK"),H=n("1Z1e");function j(t,e){1&t&&(z.rc(0,"p",9),z.qd(1,"Home / Regular Savings Plan"),z.qc())}function $(t,e){if(1&t){const t=z.sc();z.rc(0,"button",15),z.zc("click",(function(){return z.dd(t),z.Dc(3).viewScheduleSellRecord()})),z.qd(1,"View ETFs Scheduled Sell Transaction"),z.qc()}2&t&&z.Mc("title","View ETFs Scheduled Sell Transaction")}const G=function(t){return[t]};function W(t,e){if(1&t){const t=z.sc();z.rc(0,"div",10),z.rc(1,"div",11),z.rc(2,"h6",12),z.qd(3,"Regular Savings Plan"),z.qc(),z.qc(),z.rc(4,"div",11),z.od(5,$,2,1,"button",13),z.rc(6,"button",14),z.zc("click",(function(){return z.dd(t),z.Dc(2).applyNewRsp()})),z.qd(7,"Apply New RSP"),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);z.Ub(5),z.Mc("ngIf",t.viewScheduledSellBtnVisible),z.Ub(1),z.Mc("title","Apply New RSP")("routerLink",z.Sc(3,G,"./"+(null==t.RouteConstant?null:t.RouteConstant.CREATE_RSP)))}}const X=function(t){return{"container mb-5":t}};function K(t,e){if(1&t&&(z.rc(0,"app-web-scaffold"),z.pc(1),z.rc(2,"div",3),z.Ec(3,"async"),z.rc(4,"nz-card"),z.od(5,j,2,0,"p",4),z.Ec(6,"async"),z.od(7,W,8,5,"div",5),z.Ec(8,"async"),z.rc(9,"div",6),z.mc(10,"header-details",7),z.nc(11,8),z.qc(),z.qc(),z.qc(),z.oc(),z.qc()),2&t){const t=z.Dc(),e=z.ad(5);z.Ub(2),z.Mc("ngClass",z.Sc(13,X,!z.Fc(3,7,t.mobile$))),z.Ub(3),z.Mc("ngIf",!z.Fc(6,9,t.mobile$)),z.Ub(2),z.Mc("ngIf",!z.Fc(8,11,t.mobile$)),z.Ub(3),z.Mc("accounts",t.accounts)("refno",t.refno)("menu",t.menu),z.Ub(1),z.Mc("ngTemplateOutlet",e)}}function J(t,e){1&t&&z.nc(0)}function Z(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.rc(1,"div"),z.od(2,J,1,0,"ng-container",16),z.qc(),z.qc()),2&t){z.Dc();const t=z.ad(5);z.Ub(2),z.Mc("ngTemplateOutlet",t)}}function Q(t,e){1&t&&z.nc(0)}function tt(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,Q,1,0,"ng-container",16),z.qc()),2&t){z.Dc();const t=z.ad(7);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function et(t,e){1&t&&z.mc(0,"router-outlet")}let nt=(()=>{class t{constructor(t,e,n,i,c,o,s){this.router=t,this.activatedRoute=e,this.cdRef=n,this.store=i,this.subHandlingService=c,this.scheduledSellRestService=o,this.accountService=s,this.RouteConstant=M.o,this.accounts=[],this.viewScheduledSellBtnVisible=!1,this.menu=[{label:"Regular Savings Plan (RSP)",value:M.o.RSP_LIST,active:!0},{label:"DDA / FPX Record",value:M.o.DDA_FPX_LIST,active:!1}]}ngOnInit(){this.checkIsViewScheduledSellBtnVisible(),this.link||(this.link=M.o.RSP_LIST);const t=this.store.selectSnapshot(T.a.getAccounts),e=[D.a.ACCOUNT_TYPE_PERSONAL,D.a.ACCOUNT_TYPE_JOINT,D.a.ACCOUNT_TYPE_CORPORATE];this.accounts=Object(g.a)(t),this.accounts=this.accounts.sort((function(t,n){return e.indexOf(t.accountType)>e.indexOf(n.accountType)?1:-1})),this.subscribeParam()}subscribeParam(){var t,e;this.subHandlingService.subscribe(null===(e=null===(t=this.activatedRoute)||void 0===t?void 0:t.queryParams)||void 0===e?void 0:e.pipe(Object(m.a)(t=>t.refno),Object(f.a)(t=>{var e,n,i,c,o;if(t)this.refno=t;else{const t=null===(e=this.accounts.find(t=>t.accountType===D.a.ACCOUNT_TYPE_PERSONAL))||void 0===e?void 0:e.refno;this.refno=t||this.accounts[0].refno}this.cdRef.markForCheck(),""===(null===(o=null===(c=null===(i=null===(n=this.activatedRoute)||void 0===n?void 0:n.snapshot)||void 0===i?void 0:i.firstChild)||void 0===c?void 0:c.routeConfig)||void 0===o?void 0:o.path)?this.router.navigate([Object(S.a)(M.o.APP,M.o.RSP,this.link)],{queryParams:{refno:this.refno}}):this.menu.forEach(t=>{var e,n,i,c;t.active=t.value===(null===(c=null===(i=null===(n=null===(e=this.activatedRoute)||void 0===e?void 0:e.snapshot)||void 0===n?void 0:n.firstChild)||void 0===i?void 0:i.routeConfig)||void 0===c?void 0:c.path)})})))}applyNewRsp(){this.router.navigate([M.o.APP,M.o.RSP,M.o.CREATE_RSP])}viewScheduleSellRecord(){this.router.navigate([M.o.APP,M.o.TRANSACTION_RECORD,M.o.PENDING],{queryParams:{refno:this.refno,from:M.q.RSP}})}checkIsViewScheduledSellBtnVisible(){this.scheduledSellRestService.checkIsScheduledSellAllow(this.accountService.getTradableAccountRefno,M.q.ETF_PRODUCT_TYPE).subscribe(t=>{this.viewScheduledSellBtnVisible=t.data})}}
1return t.\u0275fac=function(e){return new(e||t)(z.lc(q.e),z.lc(q.a),z.lc(z.j),z.lc(l.i),z.lc(C.a),z.lc(E.a),z.lc(A.a))},t.\u0275cmp=z.fc({type:t,selectors:[["ng-component"]],features:[z.Tb([C.a])],decls:8,vars:6,consts:[[4,"ngIf"],["webTabTemplate",""],["routerTemplate",""],[3,"ngClass"],["class","text-xs",4,"ngIf"],["nz-row","","nzType","flex","nzJustify","space-between","nzAlign","middle",4,"ngIf"],[1,"mt-2"],[3,"accounts","refno","menu"],[3,"ngTemplateOutlet"],[1,"text-xs"],["nz-row","","nzType","flex","nzJustify","space-between","nzAlign","middle"],["nz-col",""],[1,"text-lg","font-weight-bold","mb-0"],["nz-button","","nzSize","small","nzType","outline","class","mr-2",3,"title","click",4,"ngIf"],["nz-button","","nzSize","small","nzType","primary",1,"text-sm",3,"title","routerLink","click"],["nz-button","","nzSize","small","nzType","outline",1,"mr-2",3,"title","click"],[4,"ngTemplateOutlet"]],template:function(t,e){1&t&&(z.od(0,K,12,15,"app-web-scaffold",0),z.Ec(1,"async"),z.od(2,Z,3,1,"app-mobile-scaffold",0),z.Ec(3,"async"),z.od(4,tt,2,1,"ng-template",null,1,z.pd),z.od(6,et,1,0,"ng-template",null,2,z.pd)),2&t&&(z.Mc("ngIf",!z.Fc(1,2,e.mobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(3,4,e.mobile$)))},directives:[P.t,R.a,P.q,w.a,B,P.A,V.c,V.a,Y.a,q.f,H.a,q.j],pipes:[P.b],styles:[".tab[_ngcontent-%COMP%]{-moz-user-select:none;user-select:none;color:#000;background-color:#ededed}.active[_ngcontent-%COMP%]{background-color:#bd2e26;color:#fff}.account-update-menu[_ngcontent-%COMP%] .account-update-menu-title[_ngcontent-%COMP%]{text-decoration:none}.account-update-menu[_ngcontent-%COMP%] .ant-menu-item[_ngcontent-%COMP%]{line-height:54px;height:54px}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"mobile$",void 0),t})();var it=function(t){return t.UT="ut",t.DPMS="dpms",t.TRUST_ACCOUNT="trustAccount",t.ETF="etf",t}({}),ct=n("LW8c"),ot=n("Gj66"),st=n("3Pt+"),at=n("ildK"),rt=n("Zk2z"),lt=n("JZDV"),dt=n("Yk7X"),ut=n("1HOV"),pt=n("9WYH"),ht=n("jm/Y"),ft=n("Aip+"),mt=n("FwiY"),bt=n("TiNC"),gt=n("xI//"),yt=n("dEAy"),Mt=n("rMZv"),vt=n("t7Fq"),Ct=function(t){return t.APPLY="01",t.MAINTAIN="02",t.TERMINATE="03",t}({}),Tt=n("tqmv"),St=n("bNXi");let Dt=(()=>{class t{constructor(){this.fpxMessageFormObject={fpxBuyerAccNo:[""],fpxBuyerBankBranch:[""],fpxBuyerBankId:[""],fpxBuyerEmail:[""],fpxBuyerIban:[""],fpxBuyerId:[""],fpxBuyerName:[""],fpxBuyerPhoneNumber:[""],fpxCheckSum:[""],fpxMakerName:[""],fpxMsgToken:[""],fpxMsgType:[""],fpxPaymentUrl:[""],fpxProductDesc:[""],fpxSellerBankCode:[""],fpxSellerExId:[""],fpxSellerExOrderNo:[""],fpxSellerId:[""],fpxSellerOrderNo:[""],fpxSellerTxnTime:[""],fpxTxnAmount:[""],fpxTxnCurrency:[""],fpxVersion:[""]},this.fpxEmandateMessageFormObject={fpxNric:[""],fpxIdType:[""],fpxAppType:[""],fpxBuyerPhoneNumber:[""],fpxBuyerMaxFreq:[""],fpxBuyerFreqMode:[""],fpxEffectiveDate:[""],fpxExpiryDate:[""]}}get fpxFormObject(){return this.fpxMessageFormObject}get fpxEMandateFormObject(){return Object.assign({},this.fpxMessageFormObject)}submit(t,e){t&&t.fpxPaymentUrl&&t.fpxPaymentUrl.trim().length>0&&(e.action=t.fpxPaymentUrl,e.submit())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=z.hc({token:t,factory:t.\u0275fac}),t})();const zt=["emandateForm"];let qt=(()=>{class t{constructor(t,e){this.fb=t,this.fpxFormService=e}ngOnChanges(t){if(t.fpxData&&this.fpxData&&this.form){const t=this.fpxData;try{this.form.setValue(Object.assign({},t),{emitEvent:!1})}catch(e){this.form.patchValue(Object.assign({},t),{emitEvent:!1})}this.fpxData&&(console.log("on submit",this.fpxData),this.fpxFormService.submit(this.fpxData,this.emandateForm.nativeElement))}}ngOnInit(){this.form=this.fb.group(Object.assign({},this.fpxFormService.fpxEMandateFormObject))}}return t.\u0275fac=function(e){return new(e||t)(z.lc(st.g),z.lc(Dt))},t.\u0275cmp=z.fc({type:t,selectors:[["fpx-emandate-form"]],viewQuery:function(t,e){var n;1&t&&z.yd(zt,!0),2&t&&z.Zc(n=z.Ac())&&(e.emandateForm=n.first)},inputs:{fpxData:"fpxData"},features:[z.Tb([Dt]),z.Sb],decls:23,vars:1,consts:[["method","post",1,"d-none",3,"formGroup"],["emandateForm",""],["type","hidden","name","fpx_msgType","id","fpx_msgType","formControlName","fpx
1MsgType"],["type","hidden","name","fpx_msgToken","id","fpx_msgToken","formControlName","fpxMsgToken"],["type","hidden","name","fpx_sellerExId","id","fpx_sellerExId","formControlName","fpxSellerExId"],["type","hidden","name","fpx_sellerExOrderNo","id","fpx_sellerExOrderNo","formControlName","fpxSellerExOrderNo"],["type","hidden","name","fpx_sellerTxnTime","id","fpx_sellerTxnTime","formControlName","fpxSellerTxnTime"],["type","hidden","name","fpx_sellerOrderNo","id","fpx_sellerOrderNo","formControlName","fpxSellerOrderNo"],["type","hidden","name","fpx_sellerBankCode","id","fpx_sellerBankCode","formControlName","fpxSellerBankCode"],["type","hidden","name","fpx_txnCurrency","id","fpx_txnCurrency","formControlName","fpxTxnCurrency"],["type","hidden","name","fpx_txnAmount","id","fpx_txnAmount","formControlName","fpxTxnAmount"],["type","hidden","name","fpx_buyerEmail","id","fpx_buyerEmail","formControlName","fpxBuyerEmail"],["type","hidden","name","fpx_checkSum","id","fpx_checkSum","formControlName","fpxCheckSum"],["type","hidden","name","fpx_buyerName","id","fpx_buyerName","formControlName","fpxBuyerName"],["type","hidden","name","fpx_buyerBankId","id","fpx_buyerBankId","formControlName","fpxBuyerBankId"],["type","hidden","name","fpx_buyerBankBranch","id","fpx_buyerBankBranch","formControlName","fpxBuyerBankBranch"],["type","hidden","name","fpx_buyerAccNo","id","fpx_buyerAccNo","formControlName","fpxBuyerAccNo"],["type","hidden","name","fpx_buyerId","id","fpx_buyerId","formControlName","fpxBuyerId"],["type","hidden","name","fpx_makerName","id","fpx_makerName","formControlName","fpxMakerName"],["type","hidden","name","fpx_buyerIban","id","fpx_buyerIban","formControlName","fpxBuyerIban"],["type","hidden","name","fpx_productDesc","id","fpx_productDesc","formControlName","fpxProductDesc"],["type","hidden","name","fpx_version","id","fpx_version","formControlName","fpxVersion"],["type","hidden","name","fpx_sellerId","id","fpx_sellerId","formControlName","fpxSellerId"]],template:function(t,e){1&t&&(z.rc(0,"form",0,1),z.mc(2,"input",2),z.mc(3,"input",3),z.mc(4,"input",4),z.mc(5,"input",5),z.mc(6,"input",6),z.mc(7,"input",7),z.mc(8,"input",8),z.mc(9,"input",9),z.mc(10,"input",10),z.mc(11,"input",11),z.mc(12,"input",12),z.mc(13,"input",13),z.mc(14,"input",14),z.mc(15,"input",15),z.mc(16,"input",16),z.mc(17,"input",17),z.mc(18,"input",18),z.mc(19,"input",19),z.mc(20,"input",20),z.mc(21,"input",21),z.mc(22,"input",22),z.qc()),2&t&&z.Mc("formGroup",e.form)},directives:[st.J,st.u,st.l,st.c,st.t,st.j],encapsulation:2,changeDetection:0}),t})();var Et=n("ocnv"),At=n("6oRW"),Pt=n("T0I8");function Rt(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function wt(t,e){1&t&&(z.pc(0),z.qd(1," Amount must be positive. "),z.oc())}function Ft(t,e){1&t&&(z.pc(0),z.qd(1," Amount only accept 2 decimal place. "),z.oc())}const It=function(t){return{"border-bottom":t}};function Ut(t,e){if(1&t&&(z.rc(0,"nz-col",22),z.Ec(1,"async"),z.Ec(2,"async"),z.mc(3,"b2b-statistic",23),z.Ec(4,"async"),z.qc()),2&t){const t=z.Dc(3);z.Mc("nzSpan",z.Fc(1,5,t.isMobile$)?24:12)("ngClass",z.Sc(11,It,z.Fc(2,7,t.isMobile$))),z.Ub(3),z.Mc("title",t.ddaDetailsModel.ddaType+" payment reference no")("horizontal",z.Fc(4,9,t.isMobile$))("value",t.ddaDetailsModel.emandateNoCurrent)}}function Ot(t,e){1&t&&(z.rc(0,"div",19),z.qd(1," Invalid Email Format "),z.qc())}function xt(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"nz-row"),z.rc(2,"nz-col",16),z.rc(3,"ui-input-group",17),z.mc(4,"input",18),z.qc(),z.rc(5,"div",19),z.od(6,Rt,2,0,"ng-container",15),z.od(7,wt,2,0,"ng-container",15),z.od(8,Ft,2,0,"ng-container",15),z.qc(),z.qc(),z.qc(),z.rc(9,"nz-row"),z.rc(10,"p",20),z.qd(11,"Maximum Amount to debit should be equal or higher than the total amount of all RSP monthly contribution which you intend to apply."),z.qc(),z.qc(),z.rc(12,"div",21),z.rc(13,"nz-row"),z.rc(14,"nz-col",22),z.Ec(15,"async"),z.Ec(16,"async"),z.mc(17,"b2b-statistic",23),z.Ec(18,"async"),z.qc(),z.od(19,Ut,5,13,"nz-col",24),z.qc(),z.rc(20,"nz-row"),z.rc(21,"nz-col",22),z.Ec(22,"async"),z.Ec(23,"async"),z.mc(24,"b2b-statistic",23),z.Ec(25,"async"),z.qc(),z.rc(26,"nz-col",22),z.Ec(27,"async"),z.Ec(28,"async"),z.mc(29,"b2b-statistic",23),z.Ec(30,"async"),z.qc(),z.qc(),z.qc(),z.rc(31,"div",25),z.qd(32,"Payer Information"),z.qc(),z.rc(33,"div",26),z.rc(34,"div",27),z.rc(35,"ui-input-group",28),z.mc(36,"input",29),z.qc(),z.qc(),z.rc(37,"div",27),z.rc(38,"ui-input-group",30),z.mc(39,"input",29),z.qc(),z.qc(),z.rc(40,"div",31),z.rc(41,"ui-input-group",32),z.mc(42,"input",33),z.od(43,Ot,2,0,"div",34),z.qc(),z.rc(44,"span",35),z.qd(45,"Enter email address here to receive FPX transaction status"),z.qc(),z.qc(),z.qc(),z.rc(46,"div",31),z.rc(47,"p",36),z.qd(48," I fully understand and agree to the "),z.rc(49,"a",37),z.qd(50,"Terms & Conditions"),z.qc(),z.qd(51," of Direct Debit services. I acknowledge that upon successful completion of the online application, processing fee of "),z.rc(52,"span",38),z.qd(53,"MYR 1.00"),z.qc(),z.qd(54," will be deducted from my selected bank account. However, FSMOne will refund the "),z.rc(55,"span",38),z.qd(56,"MYR 1.00"),z.qc(),z.qd(57," into the selected bank account. If you have any enquiries, please contact FSMOne "),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(2);var n=null;const e=(null==(n=t.ddaForm.get("emailAddress"))?null:n.dirty)&&(null==(n=t.ddaForm.get("emailAddress"))?null:n.hasError("email"));
1z.Ub(3),z.Mc("nzLabelPlaceholder","Maximum Amount to Debit (per month)"),z.Ub(1),z.Mc("readonly",t.terminateMode)("disabled",t.terminateMode),z.Ub(2),z.Mc("ngIf",(null==t.maxDdaAmount?null:t.maxDdaAmount.dirty)&&(null==t.maxDdaAmount?null:t.maxDdaAmount.hasError("required"))),z.Ub(1),z.Mc("ngIf",(null==t.maxDdaAmount?null:t.maxDdaAmount.dirty)&&(null==t.maxDdaAmount?null:t.maxDdaAmount.hasError("min"))),z.Ub(1),z.Mc("ngIf",(null==t.maxDdaAmount?null:t.maxDdaAmount.dirty)&&(null==t.maxDdaAmount?null:t.maxDdaAmount.hasError("pattern"))),z.Ub(6),z.Mc("nzSpan",z.Fc(15,29,t.isMobile$)?24:12)("ngClass",z.Sc(47,It,z.Fc(16,31,t.isMobile$))),z.Ub(3),z.Mc("title","Total monthly contribution")("horizontal",z.Fc(18,33,t.isMobile$))("value","MYR "+t.ddaDetailsModel.usedAmount),z.Ub(2),z.Mc("ngIf","e-Mandate"===t.ddaDetailsModel.ddaType),z.Ub(2),z.Mc("nzSpan",z.Fc(22,35,t.isMobile$)?24:12)("ngClass",z.Sc(49,It,z.Fc(23,37,t.isMobile$))),z.Ub(3),z.Mc("title",t.ddaDetailsModel.ddaType+" bank account no")("horizontal",z.Fc(25,39,t.isMobile$))("value",t.ddaDetailsModel.bankAccNo),z.Ub(2),z.Mc("nzSpan",z.Fc(27,41,t.isMobile$)?24:12)("ngClass",z.Sc(51,It,z.Fc(28,43,t.isMobile$))),z.Ub(3),z.Mc("title","Selected bank")("horizontal",z.Fc(30,45,t.isMobile$))("value",t.ddaDetailsModel.bankName),z.Ub(7),z.Mc("value",t.ddaDetailsModel.nric)("disabled",!0)("readonly",!0),z.Ub(3),z.Mc("value",t.ddaDetailsModel.telHp)("disabled",!0)("readonly",!0),z.Ub(4),z.Mc("ngIf",e)}}function Lt(t,e){if(1&t&&(z.rc(0,"form",14),z.od(1,xt,58,53,"div",15),z.qc()),2&t){const t=z.Dc();z.Mc("formGroup",t.ddaForm),z.Ub(1),z.Mc("ngIf",t.ddaDetailsModel)}}function kt(t,e){if(1&t){const t=z.sc();z.rc(0,"button",39),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.handleEmandate(e.mode)})),z.qd(1),z.qc()}if(2&t){const t=z.Dc();z.Mc("nzLoading",t.isLoading),z.Ub(1),z.sd(" Update ",t.ddaDetailsModel.ddaType," ")}}function Nt(t,e){if(1&t){const t=z.sc();z.rc(0,"button",39),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.handleEmandate(e.mode)})),z.qd(1),z.qc()}if(2&t){const t=z.Dc();z.Mc("nzLoading",t.isLoading),z.Ub(1),z.sd(" Terminate ",t.ddaDetailsModel.ddaType," ")}}function _t(t,e){if(1&t){const t=z.sc();z.rc(0,"button",40),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.handleEmandate(e.mode)})),z.qd(1),z.qc()}if(2&t){const t=z.Dc();z.Mc("nzLoading",t.isLoading),z.Ub(1),z.sd(" Update ",t.ddaDetailsModel.ddaType," ")}}function Bt(t,e){if(1&t){const t=z.sc();z.rc(0,"button",40),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.handleEmandate(e.mode)})),z.qd(1),z.qc()}if(2&t){const t=z.Dc();z.Mc("nzLoading",t.isLoading),z.Ub(1),z.sd(" Terminate ",t.ddaDetailsModel.ddaType," ")}}let Vt=(()=>{class t{constructor(t,e,n,i,c){this.subHandlingService=t,this.paymentRestService=e,this.nzNotificationService=n,this.fb=i,this.cdRef=c,this.close=new z.s,this.isLoading=!1,this.terminateMode=!1,this.fpxEmandateData=null}ngOnChanges(t){this.terminateMode="terminate"===this.mode,this.title=this.ddaDetailsModel?this.ddaDetailsModel.ddaType+("edit"===this.mode?" Maintenance":" Termination"):"",this.initializeDdaForm()}ngOnInit(){console.log("ddaDetailsModel",this.ddaDetailsModel),this.initializeDdaForm()}handleEmandate(t){this.updateFormValidity(),"VALID"===this.ddaForm.status&&this.subHandlingService.once(this.paymentRestService.amendEmandate(this.ddaDetailsModel.refno,this.ddaDetailsModel.ddaId,{fpxAppType:"edit"===t?Ct.MAINTAIN:Ct.TERMINATE,fpxTxnAmount:this.maxDdaAmount.value,fpxBuyerEmail:this.emailAddress}).pipe(Object(f.a)(t=>{t.status===M.a.RESPONSE_SUCCESS?(this.fpxEmandateData=t.data,this.cdRef.markForCheck()):this.nzNotificationService.error("Error",t.errorMessage)})))}updateFormValidity(t){if(t)this.ddaForm.controls[t].markAsDirty(),this.ddaForm.controls[t].updateValueAndValidity();else{if(this.ddaForm.controls)for(const t in this.ddaForm.controls)this.ddaForm.controls[t].markAsDirty(),this.ddaForm.controls[t].updateValueAndValidity();this.ddaForm.updateValueAndValidity()}}initializeDdaForm(){this.ddaForm||(this.ddaForm=this.fb.group({maxLimit:[this.ddaDetailsModel?this.ddaDetailsModel.amount:"",[st.H.required,st.H.min(.01),st.H.pattern(/^[0-9]+(\.[0-9]{1,2})?$/)]],emailAddress:["",[st.H.email]]})),this.ddaDetailsModel&&this.maxDdaAmount.setValue(this.ddaDetailsModel.maxDdaAmount)}closeDdaDetails(){this.close.emit()}get maxDdaAmount(){var t;return null===(t=this.ddaForm)||void 0===t?void 0:t.get("maxLimit")}get emailAddress(){const t=this.ddaForm.get("emailAddress");return this.isEmailValid(t)?t.value.trim:null}isEmailValid(t){return t.valid&&t.value&&t.value.length>0}}return t.\u0275fac=function(e){return new(e||t)(z.lc(C.a),z.lc(Tt.a),z.lc(St.b),z.lc(st.g),z.lc(z.j))},t.\u0275cmp=z.fc({type:t,selectors:[["edit-terminate-dda-details"]],inputs:{ddaDetailsModel:"ddaDetailsModel",mode:"mode"},outputs:{close:"close"},features:[z.Tb([C.a]),z.Sb],decls:28,vars:11,consts:[["nz-row","",1,"mb-2"],["nz-col","","nzSpan","24",1,"text-lg","font-weight-bold"],["nz-col","","nzSpan","24",1,"text-sm"],["nzSpan","24",1,"text-base","font-weight-bold"],[1,"mb-1"],["nz-form","",3,"formGroup",4,"ngIf"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle"],["nz-col","","nzLg","6","nzMd","6","nzXs","24",1,"p-1"],["nz-button","","nzType","outline",1,"w-100",3,"click"],["nz-col","","nzLg","9","nzMd","12","nzXs","24",1,"p-1"],["class","w-100","nz-button","","nzType","primary",3,"nzLoading","click",4,"ngIf"],["nz-button","","nzBlock","","nzType","outline",1,"my-2",3,"click"],["class","my-2","nz-button","","nzBlock","","nzType","primary",3,"nzLoading","click",4,"ngIf"],[3,"fpxData"],["nz-form","",3,"formGroup"],[4,"ngIf"],["nzXs","24","nzLg","12"],["nzSize","small","nzSuffix","MYR",3,"nzLabelPlaceholder"],["ui-input","","type","number","formControlName","maxLimit",3,"readonly","disabled"],[1,"text-danger","text-left"],[1,"text-xs","text-black-6"],[1,"bg-black-2","p-3"],[3,"nzSpan","ngClass"],[3,"title","horizontal","value"],[3,"nzSpan","ngClass",4,"ngIf"],["nz-row","",1,"text-base","font-weight-bold","pt-3","pb-1"],["nz-row","","nzType","flex"],["nz-col","","nzLg","12","nzXs","24",1,"p-1"],["nzLabelPlaceholder","NRIC/Passport"],["ui-input","",1,"w-100",3,"value","disabled","readonly"],["nzLabelPlaceholder","Mobile Number"],["nz-col","","nzSpan","24",1,"p-1"],["nzLabelPlaceholder","Email Address (Optional)"],["ui-input","","formControlName","emailAddress","type","email",1,"w-100"],["class","text-danger text-left",4,"ngIf"],[1,"text-black-6","text-xs"],[1,"text-left","text-sm"],["target","_blank","href","/download/Direct_Debit_TnC.pdf"],[1,"font-weight-bold"],["nz-button","","nzType","primary",1,"w-100",3,"nzLoading","click"],["nz-button","","nzBlock","","nzType","primary",1,"my-2",3,"nzLoading","click"]],template:function(t,e){1&t&&(z.rc(0,"div",0),z.rc(1,"div",1),z.qd(2),z.qc(),z.rc(3,"div",2),z.qd(4," You must have Internet Banking Account in order to make transaction using FPX. Please ensure that your browser's pop up blocker has been disabled to avoid any interruption during making transaction."),z.rc(5,"p"),z.qd(6,"Do not close browser / refresh page until you have receive response."),z.qc(),z.qc(),z.qc(),z.rc(7,"div"),z.rc(8,"div",3),z.rc(9,"p",4),z.qd(10,"DDA Information"),z.qc(),z.qc(),z.od(11,Lt,2,2,"form",5),z.qc(),z.rc(12,"app-web-scaffold"),z.rc(13,"div",6),z.Ec(14,"async"),z.rc(15,"div",7),z.rc(16,"button",8),z.zc("click",(function(){return e.closeDdaDetails()})),z.qd(17,"Cancel"),z.qc(),z.qc(),z.rc(18,"div",9),z.od(19,kt,2,2,"button",10),z.od(20,Nt,2,2,"button",10),z.qc(),z.qc(),z.qc(),z.rc(21,"app-mobile-scaffold"),z.rc(22,"b2c-floating-bar"),z.rc(23,"button",11),z.zc("click",(function(){return e.closeDdaDetails()})),z.qd(24,"Cancel"),z.qc(),z.od(25,_t,2,2,"button",12),z.od(26,Bt,2,2,"button",12),z.qc(),z.qc(),z.mc(27,"fpx-emandate-form",13)),2&t&&(z.Ub(2),z.rd(e.title),z.Ub(9),z.Mc("ngIf",e.ddaForm),z.Ub(2),z.Wb("pl-3 mt-3"+(z.Fc(14,9,e.isMobile$)?" fixed-bottom shadow-sm":"")),z.Ub(6),z.Mc("ngIf","edit"===e.mode),z.
1Ub(1),z.Mc("ngIf","terminate"===e.mode),z.Ub(5),z.Mc("ngIf","edit"===e.mode),z.Ub(1),z.Mc("ngIf","terminate"===e.mode),z.Ub(1),z.Mc("fpxData",e.fpxEmandateData))},directives:[V.c,V.a,P.t,R.a,Y.a,H.a,pt.a,qt,st.J,st.u,Et.b,st.l,At.c,st.z,st.c,At.b,st.t,st.j,P.q,Pt.c],pipes:[P.b],encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})(),Yt=(()=>{class t{}return t.PAYMENT_METHOD_TRUST_ACCOUNT="TRUST",t.PAYMENT_METHOD_SALARY_ACCT="salary account",t.PAYMENT_METHOD_CMF="cheque",t.PAYMENT_METHOD_FPX="FPX",t.PAYMENT_METHOD_DDA="DDA",t.PAYMENT_METHOD_GO_PAYZ="GoPayz",t.PAYMENT_METHOD_AUTO_SWEEP="Auto-Sweep",t.CASH_ACCOUNT="Cash Account",t.FREQUENCY_LIST=[{label:"Monthly",value:"monthly"},{label:"Weekly",value:"weekly"},{label:"Bi-Weekly",value:"bi-weekly"}],t})();var Ht=n("PpG7"),jt=n("nJia");function $t(t,e){if(1&t){const t=z.sc();z.rc(0,"app-web-scaffold"),z.rc(1,"nz-modal",4),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc().closeBankApplication()})),z.nc(2,5),z.qc(),z.qc()}if(2&t){const t=z.Dc(),e=z.ad(5);z.Ub(1),z.Mc("nzVisible",t.visible)("nzWidth",600)("nzFooter",null),z.Ub(1),z.Mc("ngTemplateOutlet",e)}}function Gt(t,e){if(1&t){const t=z.sc();z.rc(0,"div",10),z.rc(1,"b2c-app-bar-2",11),z.zc("back",(function(){return z.dd(t),z.Dc(3).closeBankApplication()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Order Cart"))}const Wt=function(t){return{"py-3 px-2 mb-6":t}};function Xt(t,e){if(1&t){const t=z.sc();z.pc(0),z.od(1,Gt,2,1,"div",6),z.rc(2,"div",7),z.Ec(3,"async"),z.nc(4,5),z.qc(),z.rc(5,"b2c-floating-bar"),z.rc(6,"button",8),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeBankApplication()})),z.qd(7,"Cancel"),z.qc(),z.rc(8,"button",9),z.zc("click",(function(){return z.dd(t),z.Dc(2).handleEmandate()})),z.qd(9,"Agree & Continue To Bank Site"),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2),e=z.ad(5);z.Ub(1),z.Mc("ngIf",t.showMobileAppBar),z.Ub(1),z.Mc("ngClass",z.Sc(7,Wt,z.Fc(3,5,t.isMobile$))),z.Ub(2),z.Mc("ngTemplateOutlet",e),z.Ub(4),z.Mc("nzLoading",t.isLoading)("disabled",t.isLoading)}}function Kt(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Xt,10,9,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.visible)}}function Jt(t,e){if(1&t&&z.mc(0,"ui-option",42),2&t){const t=e.$implicit;z.Mc("nzLabel",t.bankName)("nzValue",t)}}function Zt(t,e){1&t&&(z.rc(0,"div",43),z.qd(1," Please make sure this field is not blank. "),z.qc())}function Qt(t,e){1&t&&(z.rc(0,"div",43),z.qd(1," Invalid Email Format "),z.qc())}function te(t,e){if(1&t&&(z.rc(0,"form",21),z.rc(1,"div",12),z.rc(2,"div",22),z.qd(3,"Enter DDA Information"),z.qc(),z.rc(4,"div",23),z.rc(5,"div",24),z.rc(6,"ui-select",25),z.od(7,Jt,1,2,"ui-option",26),z.qc(),z.od(8,Zt,2,0,"div",27),z.qc(),z.qc(),z.rc(9,"div",28),z.qd(10,"Payer Information"),z.qc(),z.rc(11,"div",29),z.rc(12,"div",30),z.rc(13,"ui-input-group",31),z.mc(14,"input",32),z.qc(),z.qc(),z.rc(15,"div",30),z.rc(16,"ui-input-group",33),z.mc(17,"input",34),z.qc(),z.qc(),z.qc(),z.rc(18,"div",29),z.rc(19,"div",35),z.rc(20,"ui-input-group",36),z.mc(21,"input",37),z.od(22,Qt,2,0,"div",27),z.qc(),z.rc(23,"span",38),z.qd(24,"Enter email address here to receive FPX transaction status"),z.qc(),z.qc(),z.qc(),z.rc(25,"div",29),z.rc(26,"div",35),z.rc(27,"div",39),z.qd(28," I fully understand and agree to the "),z.rc(29,"a",40),z.qd(30,"Terms & Conditions"),z.qc(),z.qd(31," of Direct Debit services. I acknowledge that upon successful completion of the online application, processing fee of "),z.rc(32,"span",41),z.qd(33,"MYR 1.00"),z.qc(),z.qd(34," will be deducted from my selected bank account. However, FSMOne will refund the "),z.rc(35,"span",41),z.qd(36,"MYR 1.00"),z.qc(),z.qd(37," into the selected bank account. If you have any enquiries, please contact FSMOne "),z.qc(),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(2);var n=null;
1const e=(null==(n=t.bankDetailsForm.get("bankCode"))?null:n.dirty)&&(null==(n=t.bankDetailsForm.get("bankCode"))?null:n.hasError("required"));var i=null;const c=(null==(i=t.bankDetailsForm.get("emailAddress"))?null:i.dirty)&&(null==(i=t.bankDetailsForm.get("emailAddress"))?null:i.hasError("email"));z.Mc("formGroup",t.bankDetailsForm),z.Ub(7),z.Mc("ngForOf",t.bankList),z.Ub(1),z.Mc("ngIf",e),z.Ub(6),z.Mc("disabled",!0)("readonly",!0),z.Ub(3),z.Mc("disabled",!0)("readonly",!0),z.Ub(5),z.Mc("ngIf",c)}}function ee(t,e){if(1&t){const t=z.sc();z.rc(0,"div",12),z.rc(1,"div",13),z.qd(2,"New e-Mandate Application"),z.qc(),z.rc(3,"div",14),z.qd(4,"You must have internet Banking Account in order to make transaction using FPX"),z.qc(),z.qc(),z.od(5,te,38,8,"form",15),z.pc(6),z.rc(7,"app-web-scaffold"),z.rc(8,"div",16),z.rc(9,"div",17),z.rc(10,"button",18),z.zc("click",(function(){return z.dd(t),z.Dc().closeBankApplication()})),z.qd(11,"Cancel"),z.qc(),z.qc(),z.rc(12,"div",19),z.rc(13,"button",20),z.zc("click",(function(){return z.dd(t),z.Dc().handleEmandate()})),z.qd(14," Agree & Continue To Bank Site "),z.qc(),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc();z.Ub(5),z.Mc("ngIf",t.bankDetailsForm),z.Ub(3),z.Wb("mt-2 pl-3 py-3"),z.Ub(5),z.Mc("nzLoading",t.isLoading)("disabled",t.isLoading)}}const ne=function(t){return{"mb-3":t}},ie=function(t){return{"mr-2":t}};function ce(t,e){if(1&t&&(z.pc(0),z.rc(1,"a",44),z.Ec(2,"async"),z.mc(3,"img",45),z.Ec(4,"async"),z.qc(),z.oc()),2&t){const t=e.link,n=e.name,i=e.svg,c=z.Dc();z.Ub(1),z.Mc("href",t,z.gd)("ngClass",z.Sc(10,ne,!z.Fc(2,6,c.isMobile$)))("nzTooltipTitle",n),z.Ub(2),z.Oc("src","assets/images/factsheet/",i,".svg",z.gd),z.Mc("alt",n+" for documents")("ngClass",z.Sc(12,ie,!z.Fc(4,8,c.isMobile$)))}}let oe=(()=>{class t{constructor(t,e,n,i,c,o,s){this.fb=t,this.paymentRestService=e,this.rspRestService=n,this.nzNotificationService=i,this.cdRef=c,this.store=o,this.subHandlingService=s,this.showMobileAppBar=!0,this.visibleChange=new z.s,this.bankDetail=new z.s,this.isLoading=!1,this.fpxEmandateData=null,this.rspConstants=Yt}ngOnChanges(t){this.initializeBankDetailsForm(),this.loadDdaRspData()}ngOnInit(){this.initializeBankDetailsForm(),this.loadDdaRspData()}initializeBankDetailsForm(){const t=this.store.selectSnapshot(T.a.getPrimaryAccount);if(console.log("acct",t),this.acctDetails=t,this.bankDetailsForm||(this.bankDetailsForm=this.fb.group({bankCode:["",[st.H.required]],nric:[t.nric],telNo:[t.contactNo],emailAddress:["",[st.H.email]]})),this.bankList){if(this.fpxBankId){const t=this.bankList.find(t=>t.fpxBankId===this.fpxBankId);this.bankDetailsForm.get("bankCode").patchValue(t)}}else this.rspRestService.getEmandateBankList().subscribe(t=>{if(console.log(t),t.status===M.a.RESPONSE_SUCCESS&&(this.bankList=Object(g.a)(t.data),this.fpxBankId)){const t=this.bankList.find(t=>t.fpxBankId===this.fpxBankId);this.bankDetailsForm.get("bankCode").patchValue(t)}})}updateFormValidity(t){if(t)this.bankDetailsForm.controls[t].markAsDirty(),this.bankDetailsForm.controls[t].updateValueAndValidity();else{if(this.bankDetailsForm.controls)for(const t in this.bankDetailsForm.controls)this.bankDetailsForm.controls[t].markAsDirty(),this.bankDetailsForm.controls[t].updateValueAndValidity();this.bankDetailsForm.updateValueAndValidity()}}closeBankApplication(){this.visible=!1,this.visibleChange.emit()}handleEmandate(){if(this.updateFormValidity(),"VALID"!==this.bankDetailsForm.status)return;this.isLoading=!0;const t={bankLimit:this.maxDdaAmt?this.fpxBankId===this.bankDetailsForm.get("bankCode").value.fpxBankId?0:this.checkIsPendingEmandate():3e4,paymentId:"new",paymentMethod:this.rspConstants.PAYMENT_METHOD_FPX,bankCode:this.bankDetailsForm.get("bankCode").value.bankCode,emailAddress:this.emailAddress,fpxBankId:this.bankDetailsForm.get("bankCode").value.fpxBankId};this.subHandlingService.once(this.rspRestService.createDdaFpxEmandate(this.refno,t).pipe(Object(f.a)(t=>{if(t.status!==M.a.RESPONSE_SUCCESS)return this.nzNotificationService.error("Error",t.errorMessage),void(this.isLoading=!1);this.fpxEmandateData=t.data,this.cdRef.markForCheck(),this.bankDetail.emit(this.bankDetail
1sForm.get("bankCode").value.bankCode),this.isLoading=!1})))}isEmailValid(t){return t.valid&&t.value&&t.value.length>0}get emailAddress(){const t=this.bankDetailsForm.get("emailAddress");return this.isEmailValid(t)?t.value.trim:null}loadDdaRspData(){var t;this.rspRestService.getDdaFpxList(null!==(t=this.refno)&&void 0!==t?t:this.acctDetails.refno).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS&&(this.ddaTableInfoModelList=t.data)})}checkIsPendingEmandate(){let t=!1;return this.ddaTableInfoModelList.forEach(e=>{e.emandateBuyerBankId===this.bankDetailsForm.get("bankCode").value.fpxBankId&&(t=!0)}),t?0:3e4}}return t.\u0275fac=function(e){return new(e||t)(z.lc(st.g),z.lc(Tt.a),z.lc(ht.a),z.lc(St.b),z.lc(z.j),z.lc(l.i),z.lc(C.a))},t.\u0275cmp=z.fc({type:t,selectors:[["new-emandate"]],inputs:{refno:"refno",bankList:"bankList",visible:"visible",maxDdaAmt:"maxDdaAmt",showMobileAppBar:"showMobileAppBar",fpxBankId:"fpxBankId"},outputs:{visibleChange:"visibleChange",bankDetail:"bankDetail"},features:[z.Tb([C.a]),z.Sb],decls:9,vars:7,consts:[[4,"ngIf"],["bankApplicationTemplate",""],["docTemplate",""],[3,"fpxData"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzWidth","nzFooter","nzOnCancel"],[3,"ngTemplateOutlet"],["class","border-bottom",4,"ngIf"],[1,"bg-white",3,"ngClass"],["nz-button","","nzType","outline",1,"mt-2","mb-1","w-100",3,"click"],["nz-button","","nzType","primary",1,"mt-1","mb-2","w-100",3,"nzLoading","disabled","click"],[1,"border-bottom"],[3,"title","back"],["nz-row","","nzJustify","left","nzAlign","middle"],["nz-col","","nzSpan","24",1,"text-lg","font-weight-bold","mb-2","px-1"],["nz-col","","nzSpan","24",1,"text-base","px-1"],["nz-form","","class","mt-3",3,"formGroup",4,"ngIf"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle"],["nz-col","","nzLg","6","nzMd","6","nzXs","0",1,"px-1"],["nz-button","","nzType","outline",1,"w-100",3,"click"],["nz-col","","nzLg","14","nzMd","12","nzXs","24",1,"px-1"],["nz-button","","nzType","primary",1,"w-100",3,"nzLoading","disabled","click"],["nz-form","",1,"mt-3",3,"formGroup"],["nz-row","",1,"text-base","font-weight-bold","mb-2","px-1"],["nz-row",""],["nz-col","","nzLg","24","nzXs","24",1,"p-1"],["nzLabelPlaceholder","Select Bank","nzPlaceHolder","Select Bank","formControlName","bankCode",1,"w-100"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["class","text-danger text-left",4,"ngIf"],["nz-row","",1,"text-base","font-weight-bold","pt-2","pb-1","px-2"],["nz-row","","nzType","flex",1,"p-1"],["nz-col","","nzLg","12","nzXs","24",1,"p-1"],["nzLabelPlaceholder","NRIC/Passport"],["ui-input","","formControlName","nric",1,"w-100",3,"disabled","readonly"],["nzLabelPlaceholder","Mobile Number"],["ui-input","","formControlName","telNo",1,"w-100",3,"disabled","readonly"],["nz-col","","nzSpan","24",1,"p-1"],["nzLabelPlaceholder","Email Address (Optional)"],["ui-input","","formControlName","emailAddress",1,"w-100"],[1,"text-black-6","text-xs"],[1,"text-left","text-sm"],["target","_blank","href","/download/Direct_Debit_TnC.pdf"],[1,"font-weight-bold"],[3,"nzLabel","nzValue"],[1,"text-danger","text-left"],["rel","noopener noreferrer","target","_blank","nzTooltipPlacement","top","nz-tooltip","",1,"pointer",3,"href","ngClass","nzTooltipTitle"],[3,"alt","ngClass","src"]],template:function(t,e){1&t&&(z.od(0,$t,3,4,"app-web-scaffold",0),z.Ec(1,"async"),z.od(2,Kt,2,1,"app-mobile-scaffold",0),z.Ec(3,"async"),z.od(4,ee,15,5,"ng-template",null,1,z.pd),z.od(6,ce,5,14,"ng-template",null,2,z.pd),z.mc(8,"fpx-emandate-form",3)),2&t&&(z.Mc("ngIf",!z.Fc(1,3,e.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(3,5,e.isMobile$)),z.Ub(6),z.Mc("fpxData",e.fpxEmandateData))},directives:[P.t,qt,R.a,yt.a,P.A,H.a,P.q,pt.a,Y.a,ut.a,V.c,V.a,st.J,st.u,Et.b,st.l,Ht.d,st.t,st.j,P.s,At.c,st.c,At.b,Ht.a,jt.e],pipes:[P.b],encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();function se(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"b2c-app-bar",2),z.zc("back",(function(){return z.dd(t),z.Dc(2).closeDdaDetails()})),z.qc(),z.oc()}2&t&&(z.Ub(1),z.Mc("title","Regular Savings Plan"))}function ae(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,se,2,1,"ng-container",0),z.Ec(2,"async"),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",z.Fc(2,1,t.isMobile$))}}function re(t,e){if(1&t&&(z.rc(0,"div",16),z.rc(1,"nz-col",17),z.mc(2,"b2c-rsp",18),z.qc(),z.qc()),2&t){const t=z.Dc(2);z.Ub(2),z.Mc("type","grid")("bankName",null==t.ddaDetailsModel?null:t.ddaDetailsModel.bankName)("bankAccount",null==t.ddaDetailsModel?null:t.ddaDetailsModel.bankAccNo)("currency","MYR")("usedAmount",null==t.ddaDetailsModel?null:t.ddaDetailsModel.usedAmount)("totalAmount",null==t.ddaDetailsModel?null:t.ddaDetailsModel.maxDdaAmount)}}function le(t,e){if(1&t&&(z.rc(0,"nz-tag",22),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.rspStatus))}}function de(t,e){if(1&t&&(z.rc(0,"nz-tag",23),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.rspStatus))}}function ue(t,e){if(1&t&&(z.rc(0,"tr"),z.rc(1,"td",19),z.rc(2,"nz-row"),z.qd(3),z.qc(),z.qc(),z.rc(4,"td",19),z.rc(5,"nz-row"),z.qd(6),z.qc(),z.qc(),z.rc(7,"td",19),z.rc(8,"nz-row"),z.qd(9),z.Ec(10,"number"),z.qc(),z.qc(),z.rc(11,"td",19),z.od(12,le,3,4,"nz-tag",20),z.od(13,de,3,4,"nz-tag",21),z.qc(),z.qc()),2&t){const t=e.$implicit;z.Ub(3),z.rd("DPMS"===t.product?"MP":t.product),z.Ub(3),z.rd(t.fundName),z.Ub(3),z.sd("MYR ",z.Gc(10,5,t.rspAmount,"1.2-2"),""),z.Ub(3),z.Mc("ngIf","active"!==t.rspStatus),z.Ub(1),z.Mc("ngIf","active"===t.rspStatus)}}const pe=function(){return{x:"100%"}};function he(t,e){if(1&t){const t=z.sc();z.rc(0,"app-web-scaffold"),z.rc(1,"nz-modal",3),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc().closeDdaDetails()})),z.rc(2,"h3",4),z.qd(3,"DDA / FPX Information"),z.qc(),z.od(4,re,3,6,"div",5),z.rc(5,"p",6),z.qd(6),z.qc(),z.rc(7,"div"),z.rc(8,"nz-table",7,8),z.rc(10,"thead",9),z.zc("nzSortChange",(function(e){return z.dd(t),z.Dc().sort(e)})),z.rc(11,"tr"),z.rc(12,"th",10),z.qd(13,"Product Type"),z.qc(),z.rc(14,"th",11),z.qd(15,"Product Name"),z.qc(),z.rc(16,"th",12),z.qd(17,"RSP Amount"),z.qc(),z.rc(18,"th",12),z.qd(19,"Status"),z.qc(),z.qc(),z.qc(),z.rc(20,"tbody"),z.od(21,ue,14,8,"tr",13),z.qc(),z.qc(),z.rc(22,"div",14),z.rc(23,"button",15),z.zc("click",(function(){return z.dd(t),z.Dc().closeDdaDetails()})),z.qd(24,"Done"),z.qc(),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.ad(9),e=z.Dc();z.Ub(1),z.Mc("nzVisible",e.visible)("nzWidth",600)("nzFooter",null)("nzWrapClassName","vertical-center-modal"),z.Ub(3),z.Mc("ngIf",e.ddaDetailsModel),z.Ub(2),z.sd("Product under ",null==e.ddaDetailsModel?null:e.ddaDetailsModel.title,""),z.Ub(2),z.Mc("nzData",e.ddaDetailsModel.iamRspModelList)("nzLoading",e.isLoading)("nzScroll",z.Rc(16,pe))("nzFrontPagination",!1)("nzShowPagination",!1),z.Ub(4),z.Mc("nzSortKey","productType"),z.Ub(2),z.Mc("nzSortKey","productName"),z.Ub(2),z.Mc("nzSortKey","rspAmount"),z.Ub(2),z.Mc("nzSortKey","status"),z.Ub(3),z.Mc("ngForOf",t.data)}}const fe=function(t){return{"pt-3":t}};function me(t,e){if(1&t&&(z.rc(0,"div",30),z.Ec(1,"async"),z.mc(2,"b2c-rsp",18),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Sc(9,fe,z.Fc(1,7,t.isMobile$))),z.Ub(2),z.Mc("type","grid")("bankName",null==t.ddaDetailsModel?null:t.ddaDetailsModel.bankName)("bankAccount",null==t.ddaDetailsModel?null:t.ddaDetailsModel.bankAccNo)("currency","MYR")("usedAmount",null==t.ddaDetailsModel?null:t.ddaDetailsModel.usedAmount)("totalAmount",null==t.ddaDetailsModel?null:t.ddaDetailsModel.maxDdaAmount)}}function be(t,e){if(1&t&&(z.rc(0,"div",31),z.rc(1,"h4",32),z.qd(2),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Ub(2),z.sd(" Product under ",null==t.ddaDetailsModel?null:t.ddaDetailsModel.ddaType," ")}}function ge(t,e){if(1&t&&(z.rc(0,"nz-tag",42),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.rspStatus))}}function ye(t,e){if(1&t&&(z.rc(0,"nz-tag",43),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.rspStatus))}}function Me(t,e){if(1&t&&(z.rc(0,"nz-card",35),z.rc(1,"div",36),z.od(2,ge,3,4,"nz-tag",37),z.od(3,ye,3,4,"nz-tag",38),z.qc(),z.rc(4,"nz-row"),z.rc(5,"nz-col",39),z.rc(6,"h4",40),z.qd(7),z.Ec(8,"titlecase"),z.qc(),z.qc(),z.qc(),z.rc(9,"nz-row"),z.rc(10,"nz-col",41),z.rc(11,"h6"),z.qd(12,"Amount"),z.qc(),z.qc(),z.rc(13,"nz-col",41),z.rc(14,"h6"),z.qd(15,"Product Type"),z.qc(),z.qc(),z.qc(),z.rc(16,"nz-row"),z.rc(17,"nz-col",41),z.rc(18,"h6",40),z.qd(19),z.Ec(20,"number"),z.qc(),z.qc(),z.rc(21,"nz-col",41),z.rc(22,"h6",40),z.qd(23),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=e.$implicit;z.Ub(2),z.Mc("ngIf","active"!==t.rspStatus),z.Ub(1),z.Mc("ngIf","active"===t.rspStatus),z.Ub(4),z.rd(z.Fc(8,9,null==t?null:t.fundName)),z.Ub(3),z.Mc("nzSpan",12),z.Ub(3),z.Mc("nzSpan",12),z.Ub(4),z.Mc("nzSpan",12),z.Ub(2),z.sd("MYR ",z.Gc(20,11,null==t?null:t.rspAmount,"1.2-2"),""),z.Ub(2),z.Mc("nzSpan",12),z.Ub(2),z.rd("DPMS"===(null==t?null:t.product)?"MP":null==t?null:t.product)}}function ve(t,e){if(1&t&&(z.rc(0,"div",33),z.od(1,Me,24,14,"nz-card",34),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("ngForOf",t.ddaDetailsModel.iamRspModelList)}}function Ce(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-row",46),z.zc("click",(function(){return z.dd(t),z.Dc(4).viewEditTerminateMode("edit")})),z.rc(1,"nz-col"),z.mc(2,"img",47),z.qc(),z.rc(3,"nz-col",48),z.qd(4),z.qc(),z.qc()}if(2&t){const t=z.Dc(4);z.Ub(4),z.sd("Edit ",null==t.ddaDetailsModel?null:t.ddaDetailsModel.ddaType,"")}}function Te(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-row",46),z.zc("click",(function(){return z.dd(t),z.Dc(4).viewEditTerminateMode("terminate")})),z.rc(1,"nz-col"),z.mc(2,"img",49),z.qc(),z.rc(3,"nz-col",48),z.qd(4),z.qc(),z.qc()}if(2&t){const t=z.Dc(4);z.Ub(4),z.sd("Terminate ",null==t.ddaDetailsModel?null:t.ddaDetailsModel.ddaType,"")}}function Se(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-row",46),z.zc("click",(function(){return z.dd(t),z.Dc(4).viewApplyEmandate()})),z.rc(1,"nz-col"),z.mc(2,"img",50),z.qc(),z.rc(3,"nz-col",51),z.qd(4),z.qc(),z.qc()}if(2&t){const t=z.Dc(4);z.Ub(4),z.sd("Apply ",null==t.ddaDetailsModel?null:t.ddaDetailsModel.ddaType,"")}}function De(t,e){if(1&t&&(z.rc(0,"div",44),z.rc(1,"nz-row"),z.rc(2,"h4",40),z.qd(3,"Actions"),z.qc(),z.qc(),z.od(4,Ce,5,1,"nz-row",45),z.od(5,Te,5,1,"nz-row",45),z.od(6,Se,5,1,"nz-row",45),z.qc()),2&t){const t=z.Dc(3);z.Ub(4),z.Mc("ngIf",t.ddaDetailsModel.emandateEdit||"e-Mandate"!=t.ddaDetailsModel.ddaType),z.
1Ub(1),z.Mc("ngIf",t.ddaDetailsModel.emandateTerminate||"e-Mandate"!=t.ddaDetailsModel.ddaType),z.Ub(1),z.Mc("ngIf",t.ddaDetailsModel.emandateApply)}}function ze(t,e){if(1&t&&(z.rc(0,"div",25),z.od(1,me,3,11,"div",26),z.od(2,be,3,1,"div",27),z.od(3,ve,2,1,"div",28),z.od(4,De,7,3,"div",29),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",t.ddaDetailsModel),z.Ub(1),z.Mc("ngIf",t.ddaDetailsModel.iamRspModelList.length>0),z.Ub(1),z.Mc("ngIf",t.ddaDetailsModel.iamRspModelList.length>0),z.Ub(1),z.Mc("ngIf",t.ddaDetailsModel.emandateEdit||t.ddaDetailsModel.emandateTerminate||t.ddaDetailsModel.emandateApply||"e-Mandate"!=t.ddaDetailsModel.ddaType)}}function qe(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,ze,5,4,"div",24),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.visible)}}function Ee(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-mobile-drawer",52),z.zc("showChange",(function(e){return z.dd(t),z.Dc().visibleEditTerminateMode=e})),z.rc(1,"edit-terminate-dda-details",53),z.zc("close",(function(){z.dd(t);const e=z.Dc();return e.visibleEditTerminateMode=!e.visibleEditTerminateMode})),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Mc("show",t.visibleEditTerminateMode)("hideButtons",!0),z.Ub(1),z.Mc("ddaDetailsModel",t.ddaDetailsModel)("mode",t.mode)}}function Ae(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-mobile-drawer",52),z.zc("showChange",(function(e){return z.dd(t),z.Dc().visibleApply=e})),z.rc(1,"new-emandate",54),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc().visibleApply=e}))("visibleChange",(function(){return z.dd(t),z.Dc().closeApplyEmandate()})),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Mc("show",t.visibleApply)("hideButtons",!0),z.Ub(1),z.Mc("refno",t.ddaDetailsModel.refno)("visible",t.visibleApply)("maxDdaAmt",null==t.ddaDetailsModel?null:t.ddaDetailsModel.maxDdaAmount)("showMobileAppBar",!1)("fpxBankId",null==t.ddaDetailsModel?null:t.ddaDetailsModel.emandateBuyerBankId)}}let Pe=(()=>{class t{constructor(){this.visibleChange=new z.s,this.isLoading=!1,this.ddaTableInfoModelList=[],this.visibleEditTerminateMode=!1,this.visibleApply=!1}ngOnChanges(t){console.log("ddaDetailsModel",this.ddaDetailsModel)}ngOnInit(){console.log("ddaDetailsModel",this.ddaDetailsModel),console.log("isMobile$",this.isMobile$),console.log("visible",this.visible)}closeDdaDetails(){this.visible=!1,this.visibleChange.emit()}sort(t){this.ddaTableInfoModelList=Object(bt.c)(t,this.ddaTableInfoModelList)}viewEditTerminateMode(t){this.mode=t,this.visibleEditTerminateMode=!0}closeViewEditTerminate(){this.visibleEditTerminateMode=!1}viewApplyEmandate(){this.visibleApply=!0}closeApplyEmandate(){this.visibleApply=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=z.fc({type:t,selectors:[["dda-details"]],inputs:{ddaDetailsModel:"ddaDetailsModel",visible:"visible"},outputs:{visibleChange:"visibleChange"},features:[z.Sb],decls:7,vars:9,consts:[[4,"ngIf"],[3,"show","hideButtons","showChange",4,"ngIf"],[3,"title","back"],[3,"nzVisible","nzWidth","nzFooter","nzWrapClassName","nzOnCancel"],[1,"mb-4"],["nz-row","",4,"ngIf"],[1,"font-weight-bold","mt-3","mb-2"],["nzSize","small",3,"nzData","nzLoading","nzScroll","nzFrontPagination","nzShowPagination"],["ddaFpxTable",""],["nzSingleSort","",3,"nzSortChange"],["nzLeft","0px","nzShowSort","",1,"text-xs",2,"min-width","100px",3,"nzSortKey"],["nzLeft","90px","nzShowSort","",1,"text-xs",2,"min-width","200px",3,"nzSortKey"],["nzShowSort","",1,"text-xs",2,"min-width","90px",3,"nzSortKey"],[4,"ngFor","ngForOf"],[1,"text-right","mt-5"],["nz-button","","nzType","primary",3,"click"],["nz-row",""],["nzSpan","12"],[3,"type","bankName","bankAccount","currency","usedAmount","totalAmount"],[1,"text-xs"],["class","border tag-pending-processing m-0",3,"nzColor",4,"ngIf"],["class","border tag-received m-0",3,"nzColor",4,"ngIf"],[1,"border","tag-pending-processing","m-0",3,"nzColor"],[1,"border","tag-received","m-0",3,"nzColor"],["class","bg-white",4,"ngIf"],[1,"bg-white"],["nz-row","","class","px-2",3,"ngClass",4,"ngIf"],["class","px-2 mt-4",4,"ngIf"],["class","px-2 pb-2",4,"ngIf"],["class","px-2 py-3",4,"ngIf"],["nz-row","",1,"px-2",3,"ngClass"],[1,"px-2","mt-4"],[1,"mb-0"],[1,"px-2","pb-2"],["class","mt-3 p-2",4,"ngFor","ngForOf"],[1,"mt-3","p-2"],[1,"py-2"],["class","border tag-pending-processing m-0 mr-2",3,"nzColor",4,"ngIf"],["class","border tag-received m-0 mr-2",3,"nzColor",4,"ngIf"],[1,"text-left"],[1,"font-weight-bold"],[1,"text-left",3,"nzSpan"],[1,"border","tag-pending-processing","m-0","mr-2",3,"nzColor"],[1,"border","tag-received","m-0","mr-2",3,"nzColor"],[1,"px-2","py-3"],["class","py-1",3,"click",4,"ngIf"],[1,"py-1",3,"click"],["nzSpan","24","nzTheme","outline","src","assets/images/transaction/edit.svg"],[1,"text-left","font-weight-normal"],["nzSpan","24","nzTheme","outline","src","assets/images/transaction/terminate.svg"],["nzSpan","24","nzTheme","outline","src","assets/images/transaction/transaction-history.svg"],[1,"text-left","font-weight-normal","pl-1"],[3,"show","hideButtons","showChange"],[3,"ddaDetailsModel","mode","close"],[3,"refno","visible","maxDdaAmt","showMobileAppBar","fpxBankId","visibleChange"]],template:function(t,e){1&t&&(z.od(0,ae,3,3,"app-mobile-scaffold",0),z.od(1,he,25,
117,"app-web-scaffold",0),z.Ec(2,"async"),z.od(3,qe,2,1,"app-mobile-scaffold",0),z.Ec(4,"async"),z.od(5,Ee,2,4,"b2c-mobile-drawer",1),z.od(6,Ae,2,7,"b2c-mobile-drawer",1)),2&t&&(z.Mc("ngIf",e.visible),z.Ub(1),z.Mc("ngIf",!z.Fc(2,5,e.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(4,7,e.isMobile$)),z.Ub(2),z.Mc("ngIf",e.visibleEditTerminateMode),z.Ub(1),z.Mc("ngIf",e.visibleApply))},directives:[P.t,H.a,gt.a,R.a,yt.a,Mt.a,Mt.f,Mt.g,Mt.e,Mt.c,P.s,Y.a,V.c,V.a,ft.a,Mt.d,s.a,P.q,w.a,vt.a,Vt,oe],pipes:[P.b,P.g,P.G],encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();function Re(t,e){1&t&&z.mc(0,"div")}function we(t,e){if(1&t){const t=z.sc();z.rc(0,"a",12),z.zc("click",(function(){return z.dd(t),z.Dc(3).expendEmandateList()})),z.od(1,Re,1,0,"div",13),z.qc()}if(2&t){z.Dc(3);const t=z.ad(6);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Fe(t,e){1&t&&z.mc(0,"div")}function Ie(t,e){if(1&t){const t=z.sc();z.rc(0,"a",12),z.zc("click",(function(){return z.dd(t),z.Dc(3).expendEmandateList()})),z.od(1,Fe,1,0,"div",13),z.qc()}if(2&t){z.Dc(3);const t=z.ad(8);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Ue(t,e){if(1&t&&(z.rc(0,"div",7),z.rc(1,"div",8),z.rc(2,"p",9),z.qd(3,"My e-Mandate"),z.qc(),z.qc(),z.rc(4,"div",10),z.rc(5,"span"),z.od(6,we,2,1,"a",11),z.qc(),z.rc(7,"span"),z.od(8,Ie,2,1,"a",11),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("nzSpan",22),z.Ub(3),z.Mc("nzSpan",2),z.Ub(2),z.Mc("ngIf",!t.expendAllEmandate),z.Ub(2),z.Mc("ngIf",t.expendAllEmandate)}}const Oe=function(t){return{"mt-2":t}};function xe(t,e){if(1&t){const t=z.sc();z.rc(0,"div",15),z.rc(1,"b2c-rsp",16),z.zc("buttonEvent",(function(){z.dd(t);const n=e.$implicit;return z.Dc(3).onViewDetails(n)})),z.qc(),z.qc()}if(2&t){const t=e.$implicit,n=e.index,i=z.Dc(3);z.Mc("ngClass",z.Sc(8,Oe,0!==n)),z.Ub(1),z.Mc("type",i.displayType)("buttonName","View Details")("bankName",t.bankName)("bankAccount",t.bankAccNo)("currency","MYR")("usedAmount",t.usedAmount)("totalAmount",t.maxDdaAmount)}}function Le(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,xe,2,10,"div",14),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngForOf",t.ddaList)}}function ke(t,e){if(1&t&&(z.rc(0,"div",4),z.od(1,Ue,9,4,"div",5),z.od(2,Le,2,1,"div",6),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.showCollape),z.Ub(1),z.Mc("ngIf",t.expendAllEmandate)}}function Ne(t,e){1&t&&(z.rc(0,"div",4),z.rc(1,"p",17),z.qd(2,"No Existing e-Mandate"),z.qc(),z.qc())}function _e(t,e){1&t&&z.mc(0,"i",18)}function Be(t,e){1&t&&z.mc(0,"i",19)}function Ve(t,e){if(1&t){const t=z.sc();z.rc(0,"dda-details",22),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).ddaDetailsVisible=e})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("ddaDetailsModel",t.selectedDda)("visible",t.ddaDetailsVisible)}}const Ye=function(){return{}},He=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function je(t,e){if(1&t&&(z.rc(0,"div",20),z.Ec(1,"async"),z.od(2,Ve,1,2,"dda-details",21),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,Ye):z.Rc(5,He)),z.Ub(2),z.Mc("ngIf",t.selectedDda)}}let $e=(()=>{class t{constructor(t,e,n){this.subHandlingService=t,this.transactionRestService=e,this.rspRestService=n,this.showCollape=!0,this.expendAllEmandate=!1,this.isLoading=!1,this.ddaList=[],this.ddaDetailsVisible=!1}ngOnChanges(t){this.getEmandateList()}ngOnInit(){this.getEmandateList()}getEmandateList(){this.isLoading=!0,this.subHandlingService.once(this.rspRestService.getDdaFpxList(this.refno).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(t.data&&(this.ddaList=t.data,this.ddaList=this.ddaList.filter(t=>"Y"===t.isEmandate)),this.isLoading=!1)})))}onViewDetails(t){this.selectedDda=t,this.ddaDetailsVisible=!0}expendEmandateList(){this.expendAllEmandate=!this.expendAllEmandate}}return t.\u0275fac=function(e){return new(e||t)(z.lc(C.a),z.lc(lt.a),z.lc(ht.a))},t.\u0275cmp=z.fc({type:t,selectors:[["emandate-list"]],inputs:{showCollape:"showCollape",expendAllEmandate:"expendAllEmandate",refno:"refno",displayType:"displayType"},features:[z.Tb([C.a]),z.Sb],decls:10,vars:9,consts:[["nz-row","",4,"ngIf"],["plusCircleIcon",""],["minusCircleIcon",""],[3,"ngStyle",4,"ngIf"],["nz-row",""],["nz-row","","nzJustify","space-between","nzAlign","middle",4,"ngIf"],[4,"ngIf"],["nz-row","","nzJustify","space-between","nzAlign","middle"],["nz-col","",3,"nzSpan"],[1,"font-weight-bold","mb-2"],["nz-col","",1,"text-right",3,"nzSpan"],[3,"click",4,"ngIf"],[3,"click"],[4,"ngTemplateOutlet"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"type","buttonName","bankName","bankAccount","currency","usedAmount","totalAmount","buttonEvent"],[1,"p-2"],["nz-icon","","nzType","plus-circle","nzTheme","fill",1,"text-info","px-2"],["nz-icon","","nzType","minus-circle","nzTheme","fill",1,"text-info","px-2"],[3,"ngStyle"],[3,"ddaDetailsModel","visible","visibleChange",4,"ngIf"],[3,"ddaDetailsModel","visible","visibleChange"]],template:function(t,e){1&t&&(z.od(0,ke,3,2,"div",0),z.Ec(1,"async"),z.Ec(2,"async"),z.od(3,Ne,3,0,"div",0),z.Ec(4,"async"),z.od(5,_e,1,0,"ng-template",null,1,z.pd),z.od(7,Be,1,0,"ng-template",null,2,z.pd),z.od(9,je,3,6,"div",3)),2&t&&(z.Mc("ngIf",e.ddaList.length>0&&(!z.Fc(1,3,e.isMobile$)||!e.ddaDetailsVisible&&z.Fc(2,5,e.isMobile$))),z.Ub(3),z.Mc("ngIf",0===e.ddaList.length&&z.Fc(4,7,e.isMobile$)),z.Ub(6),z.Mc("ngIf",e.ddaDetailsVisible))},directives:[P.t,V.c,V.a,P.A,P.s,P.q,ft.a,mt.b,P.w,Pe],pipes:[P.b],encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();var Ge=n("W1dw"),We=n("EY2u"),Xe=n("nYR2"),Ke=n("eIep"),Je=n("j0Y6"),Ze=n("dWXg"),Qe=n("45Og"),tn=n("AytR"),en=n("RC/j"),nn=n("Lcc6"),cn=n("k4d9"),on=n("HMML"),sn=n("bz11"),an=n("7hlL"),rn=n("FP3H");function ln(t,e){if(1&t){const t=z.sc();z.rc(0,"div",15),z.rc(1,"b2c-app-bar-2",16),z.zc("back",(function(){return z.dd(t),z.Dc(2).backToMainRspPage()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Regular Savings Plan"))}function dn(t,e){if(1&t){const t=z.sc();z.rc(0,"div",15),z.rc(1,"b2c-app-bar-2",16),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","My e-Mandate"))}function un(t,e){if(1&t){const t=z.sc();z.rc(0,"div",15),z.rc(1,"b2c-app-bar-2",16),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeViewCart()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Preview Cart"))}function pn(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,ln,2,1,"div",14),z.od(2,dn,2,1,"div",14),z.od(3,un,2,1,"div",14),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showAddEtfDetailsModal&&!t.showViewCart),z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",t.showViewCart&&!t.showEditPage)}}function hn(t,e){if(1&t&&(z.rc(0,"div",18),z.mc(1,"emandate-list",19),z.Ec(2,"async"),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("showCollape",!z.Fc(2,4,t.isMobile$))("expendAllEmandate",t.showEmandatePage)("refno",t.refno)("displayType","grid")}}function fn(t,e){if(1&t&&(z.pc(0),z.od(1,hn,3,6,"div",17),z.oc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",t.refno)}}const mn=function(t){return{"mb-3":t}};function bn(t,e){if(1&t&&(z.pc(0),z.rc(1,"div",20),z.Ec(2,"async"),z.rc(3,"div",21),z.mc(4,"investment-account-selector",22),z.qc(),z.qc(),z.oc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngClass",z.Sc(4,mn,z.Fc(2,2,t.isMobile$))),z.Ub(3),z.Mc("isRspEtf",!0)}}function gn(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,fn,2,1,"ng-container",0),z.od(2,bn,5,6,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showAddEtfDetailsModal&&!t.showEditPage)}}function yn(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-stocks-opt-in-cds-acc",24),z.zc("onCreateCdsAccount",(function(e){return z.dd(t),z.Dc(3).createCdsAccount(e)})),z.qc(),z.oc()}if(2&t){const t=z.Dc(3);z.Ub(1),z.Mc("hasApprovedThirdPartyRelation",t.hasApprovedThirdPartyRelation)("openCdsAccount",t.openCdsAccount)("isPendingLinkCds",t.isPendingLinkCds)("isBumiPutraFieldRequired",t.isBumiPutraFieldRequired)}}const Mn=function(){return{height:"500px"}};function vn(t,e){if(1&t&&(z.pc(0),z.rc(1,"nz-row",25),z.rc(2,"nz-row",26),z.rc(3,"nz-col",27),z.mc(4,"img",28),z.qc(),z.rc(5,"nz-col",29),z.rc(6,"h4"),z.qd(7,"We have received your CDS account application. "),z.mc(8,"br"),z.qd(9,"An email will send to notify you once the CDS account is activated. "),z.qc(),z.qc(),z.qc(),z.qc(),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("ngStyle",z.Rc(4,Mn)),z.Ub(2),z.Mc("nzSpan",24),z.Ub(1),z.Mc("src",t.STOCKS_IMAGE_PATH+t.WAITING_ICON_IMAGE,z.gd),z.Ub(1),z.Mc("nzSpan",24)}}function Cn(t,e){1&t&&(z.pc(0),z.mc(1,"app-stock-payment-reminder-modal",30),z.oc()),2&t&&(z.Ub(1),z.Mc("modalVisible",!1))}function Tn(t,e){if(1&t&&(z.rc(0,"nz-row"),z.od(1,yn,2,4,"ng-container",0),z.od(2,vn,10,5,"ng-container",0),z.od(3,Cn,2,1,"ng-container",0),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",!t.isCdsAvailable&&!t.isCdsProcessing&&!t.isCdsPending&&!t.hasPendingCompleteCdsPayment&&!t.hasPendingProcessCdsAccountOpening||t.isPendingLinkCds),z.Ub(1),z.Mc("ngIf",t.isCdsProcessing||t.hasPendingCompleteCdsPayment||t.hasPendingProcessCdsAccountOpening),z.Ub(1),z.Mc("ngIf",t.isCdsPending&&!t.hasPendingCompleteCdsPayment&&!t.hasPendingProcessCdsAccountOpening)}}function Sn(t,e){1&t&&z.mc(0,"nz-tab",40),2&t&&z.Mc("nzTitle",e.$implicit)}function Dn(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-tabset",38),z.zc("nzSelectedIndexChange",(function(e){return z.dd(t),z.Dc(4).chgSelectedTab(e)})),z.od(1,Sn,1,1,"nz-tab",39),z.qc()}if(2&t){const t=z.Dc(4);z.Mc("nzSelectedIndex",t.selectedIndex),z.Ub(1),z.Mc("ngForOf",t.tabList)}}function zn(t,e){1&t&&z.mc(0,"app-funds-rsp-list",41),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function qn(t,e){1&t&&z.mc(0,"app-etf-rsp-list",42),2&t&&z.Mc("isTabSetItem",!0)}function En(t,e){1&t&&z.mc(0,"app-dpms-rsp-list",41),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function An(t,e){1&t&&z.mc(0,"app-cash-acct-rsp-list",41),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function Pn(t,e){if(1&t&&z.mc(0,"nz-option",56),2&t){const t=e.$implicit;z.Mc("nzLabel",t.label)("nzValue",t.value)}}function Rn(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-auto-option",57),z.zc("click",(function(){z.dd(t);const n=e.$implicit,i=z.Dc(5);return i.isInsideCart(n.stockCode,n.exchange)?"":i.onEtfSelected(n)})),z.rc(1,"div",58),z.mc(2,"app-stock-exchange-tag",59),z.rc(3,"div",60),z.qd(4),z.qc(),z.qc(),z.rc(5,"div"),z.qd(6),z.qc(),z.qc()}if(2&t){const t=e.$implicit;
1z.Mc("nzValue",t.etfName),z.Ub(2),z.Mc("exchange",t.exchange),z.Ub(2),z.sd(" ",t.tradingName," "),z.Ub(2),z.td("",t.stockCode," | ",t.etfName,"")}}function wn(t,e){1&t&&(z.rc(0,"nz-auto-option",61),z.mc(1,"em",62),z.qd(2," Loading ETFs... "),z.qc())}function Fn(t,e){1&t&&z.mc(0,"i",63)}function In(t,e){if(1&t){const t=z.sc();z.rc(0,"i",64),z.zc("click",(function(){return z.dd(t),z.Dc(5).onClearInput()})),z.qc()}}function Un(t,e){if(1&t){const t=z.sc();z.rc(0,"product-info",68),z.zc("selectedEtf",(function(e){return z.dd(t),z.Dc(6).onEtfSelected(e)}))("factsheetRedirectionForEtf",(function(e){return z.dd(t),z.Dc(6).redirectToFactsheetPage(e)})),z.Ec(1,"number"),z.Ec(2,"async"),z.Ec(3,"async"),z.qc()}if(2&t){const t=e.$implicit,n=z.Dc(6);z.Mc("productCode",t.stockCode)("productName",t.etfName)("subProductName",t.stockCode)("exchange",t.exchange)("isEtf",!0)("title1","Min. RSP Amt.")("title2","Dividend Paying")("desc1","MYR "+z.Gc(1,14,t.minSubAmtInMyr,"0.2-2"))("desc2",t.dividendPaying)("clickWholeBar",z.Fc(2,17,n.isMobile$))("showAddToCart",!z.Fc(3,19,n.isMobile$))("addedToCart",n.isInsideCart(t.stockCode,t.exchange))("focusList",t.focusList)("gotActiveRsp",t.gotActiveRsp)}}function On(t,e){1&t&&(z.rc(0,"div"),z.mc(1,"nz-empty",69),z.qc())}const xn=function(t,e){return{"mb-3":t,"infinite-container pt-2":e}},Ln=function(t,e){return{"mt-3 text-xs":t,"text-sm":e}},kn=function(t,e){return{"text-xs":t,"text-sm pb-6":e}};function Nn(t,e){if(1&t&&(z.pc(0),z.rc(1,"div",65),z.Ec(2,"async"),z.od(3,Un,4,21,"product-info",66),z.qc(),z.od(4,On,2,0,"div",0),z.rc(5,"div",20),z.Ec(6,"async"),z.Ec(7,"async"),z.qd(8,"For "),z.rc(9,"b"),z.qd(10,"ETF RSP Sell Orders for Odd Lot"),z.qc(),z.qd(11," / Fractional Shares: Please submit your instructions before the "),z.rc(12,"b"),z.qd(13,"15th"),z.qc(),z.qd(14," of every month. "),z.qc(),z.rc(15,"div",67),z.Ec(16,"async"),z.Ec(17,"async"),z.qd(18,"Note: You can submit your ETF RSP Sell Orders for board lots together with your odd lot or fractional units before the "),z.rc(19,"b"),z.qd(20,"15th"),z.qc(),z.qd(21," of every month; alternatively, you can choose to sell your ETF board lot units through Live Trading at any time."),z.qc(),z.oc()),2&t){const t=z.Dc(5);z.Ub(1),z.Mc("ngClass",z.Tc(15,xn,z.Fc(2,5,t.isMobile$),(null==t.rspEtfDisplayList?null:t.rspEtfDisplayList.length)>=7)),z.Ub(2),z.Mc("ngForOf",t.rspEtfDisplayList),z.Ub(1),z.Mc("ngIf",0===(null==t.rspEtfDisplayList?null:t.rspEtfDisplayList.length)),z.Ub(1),z.Mc("ngClass",z.Tc(18,Ln,!z.Fc(6,7,t.isMobile$),z.Fc(7,9,t.isMobile$))),z.Ub(10),z.Mc("ngClass",z.Tc(21,kn,!z.Fc(16,11,t.isMobile$),z.Fc(17,13,t.isMobile$)))}}const _n=function(t){return{"px-2":t}};function Bn(t,e){if(1&t){const t=z.sc();z.rc(0,"div",20),z.Ec(1,"async"),z.rc(2,"div",43),z.rc(3,"div",44),z.rc(4,"nz-select",45),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(4).selectedEtfFilter=e}))("ngModelChange",(function(e){return z.dd(t),z.Dc(4).onChangeCategoryFilterOption(e)})),z.od(5,Pn,1,2,"nz-option",46),z.qc(),z.qc(),z.rc(6,"div",47),z.rc(7,"nz-input-group",48),z.rc(8,"input",49),z.zc("input",(function(e){return z.dd(t),z.Dc(4).onSearchEtfName(e.target.value)})),z.qc(),z.qc(),z.rc(9,"nz-autocomplete",50,51),z.od(11,Rn,7,5,"nz-auto-option",52),z.od(12,wn,3,0,"nz-auto-option",53),z.qc(),z.od(13,Fn,1,0,"ng-template",null,54,z.pd),z.od(15,In,1,0,"ng-template",null,55,z.pd),z.qc(),z.qc(),z.mc(17,"nz-skeleton",1),z.od(18,Nn,22,24,"ng-container",0),z.qc()}if(2&t){const t=z.ad(10),e=z.ad(14),n=z.ad(16),i=z.Dc(4),c=z.ad(24);z.Mc("ngClass",z.Sc(18,_n,z.Fc(1,16,i.isMobile$))),z.Ub(4),z.Mc("nzDropdownMatchSelectWidth",!1)("ngModel",i.selectedEtfFilter)("nzLoading",i.isLoadingList)("nzSuffixIcon",c),z.Ub(1),z.Mc("ngForOf",i.etfFilterOption),z.Ub(2),z.Mc("nzSuffix",n)("nzPrefix",e),z.Ub(1),z.Mc("placeholder","Search all ETFs")("formControl",i.keyword)("nzAutocomplete",t),z.Ub(1),z.Mc("nzBackfill",!0),z.Ub(2),z.Mc("ngForOf",i.rspEtfSuggestionList),z.Ub(1),z.Mc("ngIf",i.isLoadingList||i.loadingSuggestion),z.Ub(5),z.Mc("nzLoading",i.isLoadingList),z.Ub(1),z.Mc("ngIf",!i.isLoadingList)}}const Vn=function(t){return{"bg-white shadow w-100 py-2":t}};function Yn(t,e){if(1&t&&(z.rc(0,"div",32),z.Ec(1,"async"),z.Ec(2,"async"),z.od(3,Dn,2,2,"nz-tabset",33),z.Ec(4,"async"),z.rc(5,"div",34),z.od(6,zn,1,2,"app-funds-rsp-list",35),z.od(7,qn,1,1,"app-etf-rsp-list",36),z.od(8,En,1,2,"app-dpms-rsp-list",35),z.od(9,An,1,2,"app-cash-acct-rsp-list",35),z.qc(),z.od(10,Bn,19,20,"div",37),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Sc(15,Vn,z.Fc(1,9,t.isMobile$)))("hidden",z.Fc(2,11,t.isMobile$)&&t.showAddEtfDetailsModal),z.Ub(3),z.Mc("ngIf",z.Fc(4,13,t.isMobile$)&&!t.noShowTabSet),z.Ub(2),z.Mc("ngSwitch",t.selectedIndex),z.Ub(1),z.Mc("ngSwitchCase",0),z.Ub(1),z.Mc("nSwitchDefault",1),z.Ub(1),z.Mc("ngSwitchCase",2),z.Ub(1),z.Mc("ngSwitchCase",3),z.Ub(1),z.Mc("ngIf",1==t.selectedIndex)}}function Hn(t,e){if(1&t&&(z.pc(0),z.od(1,Yn,11,17,"div",31),z.oc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showViewCart)}}function jn(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,Tn,4,3,"nz-row",0),z.mc(2,"app-cds-account-opening-success-modal",23),z.od(3,Hn,2,1,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!t.isCdsAcctLoading),z.Ub(1),z.Mc("isFromAccountOpening",!1)("isCashAccountPayment",t.isCashAccountPayment)("isVisible",t.isCdsAccountOpeningSuccessModalVisible)("content",t.cdsAccountOpeningSuccessModalContent),z.Ub(1),z.Mc("ngIf",t.isCdsAvailable&&!t.isPendingLinkCds)}}function $n(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-etf-details",72),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showAddEtfDetailsModal=e}))("oriBuyDataStamped",(function(){return z.dd(t),z.Dc(2).buyInfo=null})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("stockCode",t.selectedStockCode)("exchange",t.selectedExchange)("selectedEtf",t.selectedEtf)("visible",t.showAddEtfDetailsModal)("oriBuyData",t.buyInfo)}}const Gn=function(){return{}},Wn=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function Xn(t,e){if(1&t&&(z.rc(0,"div",70),z.Ec(1,"async"),z.od(2,$n,1,6,"rsp-etf-details",71),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,Gn):z.Rc(5,Wn)),z.Ub(2),z.Mc("ngIf",t.selectedExchange&&t.selectedStockCode)}}function Kn(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"div",73),z.zc("click",(function(){return z.dd(t),z.Dc().changeViewCart()})),z.rc(2,"div",74),z.rc(3,"div",75),z.qd(4,"View Cart"),z.qc(),z.rc(5,"div",76),z.rc(6,"nz-row",77),z.rc(7,"nz-col"),z.mc(8,"i",78),z.qc(),z.rc(9,"div",79),z.rc(10,"p",80),z.qd(11),z.qc(),z.qc(),z.rc(12,"nz-col",81),z.qd(13," Item "),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Ub(11),z.rd(t.cartList.length)}}function Jn(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-order-cart",82),z.zc("editVisibleChange",(function(e){return z.dd(t),z.Dc().showEditPage=e})),z.qc()}if(2&t){const t=z.Dc();z.Mc("productType",t.iProductEnum.ETF)("refno",t.refno)("editVisible",t.showEditPage)}}function Zn(t,e){if(1&t&&z.mc(0,"img",83),2&t){const t=z.Dc();z.Mc("src",t.transactionImgPath+"filterIcon.svg",z.gd)("alt","filter icon")}}let Qn=(()=>{class t{constructor(t,e,n,i,c,o,s,a,r,l,d,u,p,f,m,b,g,y){this.store=t,this.stockTransactionRestService=e,this.subHandlingService=n,this.cdRef=i,this.route=c,this.router=o,this.accountService=s,this.cdsAccountRestService=a,this.accountRestService=r,this.nzNotification=l,this.paymentRestService=d,this.transactionService=u,this.standardDatePipe=p,this.datePipe=f,this.decimalPipe=m,this.stockInvestmentObjectiveRestService=b,this.fpxRestService=g,this.modal=y,this.isTabSetItem=!1,this.noShowTabSet=!1,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.STOCKS_IMAGE_PATH=M.g.STOCKS_IMG_PATH,this.WAITING_ICON_IMAGE="waiting-icon.svg",this.NOTIFICATION_TITLE_ERROR="Error",this.FPX_SUCCESS_CODE="00",this.isLoading=!1,this.iProductEnum=ct.b,this.tabList=[],this.selectedIndex=1,this.etfFilterList=h.a.RSP_ETF_FILTER_CATEGORY,this.etfFilterOption=[],this.selectedEtfFilter="RSP List",this.rspEtfList=[],this.rspEtfDisplayList=[],this.rspEtf
1SuggestionList=[],this.showAddEtfDetailsModal=!1,this.cartList=[],this.showViewCart=!1,this.showEmandatePage=!1,this.loadingSuggestion=!1,this.productList=["UT"],this.keywordPage=0,this.routeInitialize=!0,this.showEditPage=!1,this.isCdsProcessing=!1,this.isCdsAvailable=!1,this.isPendingLinkCds=!1,this.isCdsPending=!1,this.hasPendingCompleteCdsPayment=!1,this.hasPendingProcessCdsAccountOpening=!1,this.hasApprovedThirdPartyRelation=!1,this.isCdsAcctLoading=!1,this.showCdsLinkModalSuccess=!1,this.fpxInfo={},this.cdsAccountOpeningSuccessModalContent=[],this.isCashAccountPayment=!1,this.isCdsAccountOpeningSuccessModalVisible=!1,this.showRspExistModal=!1,this.isLoadingList=!1,this.showRspEtf=!1,this.w8BenChecked=!1,this.visibleFepAgreement=!1,this.isSkipCdsFee=!1,this.subscribeViewOrderCart(),this.subscribeRefnoChange()}ngOnInit(){this.accountRestService.checkIsSkipCdsFee().subscribe(t=>{this.isSkipCdsFee=t.data,console.log("is skip cds fee: ",this.isSkipCdsFee)}),this.store.dispatch(new y.U(ct.b.ETF)),this.store.dispatch(new y.N(this.accountService.getTradableAccountRefno)),this.form=new st.k({keyword:new st.h("")}),this.subscribeKeyword(),this.subHandlingService.once(this.route.queryParams.pipe(Object(f.a)(t=>{(null==t?void 0:t.poNumber)&&this.getFpxInfo(t.poNumber)}))),tn.a.rspEtfEnabled&&(this.showRspEtf=tn.a.rspEtfEnabled)}ngAfterViewInit(){this.tabList=["Unit Trust","ETFs","Managed Portfolio","Cash Account"]}onChangeCategoryFilterOption(t){this.selectedEtfFilter=t,this.getRspEtfList(this.selectedEtfFilter)}getRspEtfList(t){this.isLoadingList=!0,this.subHandlingService.once(this.stockTransactionRestService.findRspEtfAvailableList(this.refno).pipe(Object(f.a)(e=>{if(e){this.rspEtfMap=e.data,this.etfFilterOption=[{label:"RSP List",value:"RSP List"},{label:"Current Holdings",value:"Current Holdings"}];for(let n of Object.values(this.etfFilterList)){if("RSP List"!==n.value&&"Current Holdings"!==n.value){const t=e.data[n.value];t&&t.length>0&&this.etfFilterOption.push({label:n.value,value:n.value})}t===n.value&&(this.rspEtfList=e.data[n.value])}this.rspEtfList.sort((t,e)=>t.etfName>e.etfName?1:e.etfName>t.etfName?-1:0),this.rspEtfDisplayList=Object(g.a)(this.rspEtfList),this.rspEtfSuggestionList=Object(g.a)(this.rspEtfList),this.initRouteParam(),this.isLoading=!1,this.isLoadingList=!1}})))}subscribeRefnoChange(){this.subHandlingService.subscribe(this.refno$.pipe(Object(f.a)(t=>{this.refno=t,this.cdRef.markForCheck(),this.selectedEtfFilter="RSP List",this.getCdsAccountDetailsAndRspEtfList(),this.getAccountDetails(),this.subscribeViewOrderCart()})))}getCdsAccountDetailsAndRspEtfList(){const t=this.accountService.getTradableAccountRefno;this.getW8BenDetails(),this.isLoading=!0,this.isCdsAcctLoading=!0,t?this.subHandlingService.once(this.cdsAccountRestService.getCdsAccount(t).pipe(Object(f.a)(t=>{t.status===M.a.RESPONSE_SUCCESS&&(t.data.cdsAccountBean&&(this.isCdsAvailable=!0),t.data.hasProcessingCdsAccountOpening&&(this.isCdsProcessing=!0),t.data.hasPendingProcessCdsAccountOpening&&(this.hasPendingProcessCdsAccountOpening=!0),t.data.pendingCdsPayment&&(this.isCdsPending=!0),t.data.hasPendingCompleteCdsPayment&&(this.hasPendingCompleteCdsPayment=!0),t.data.pendingLinkCds&&(this.isPendingLinkCds=t.data.pendingLinkCds))}),Object(Xe.a)(()=>{this.isCdsAvailable&&!this.isPendingLinkCds?this.getRspEtfList(this.selectedEtfFilter):this.isCdsAvailable||this.isCdsProcessing?this.isLoading=!1:this.checkApprovedThirdPartyRelationAllowed(),this.isCdsAcctLoading=!1}))):(this.isLoading=!1,this.isCdsAcctLoading=!1)}search(t){if(console.log("search start"),this.loadingSuggestion=!0,this.rspEtfList)if(t&&""!==t){const e=Object(ot.b)(this.rspEtfList,t,"etfName"),n=Object(ot.b)(this.rspEtfList,t,"exchange"),i=Object(ot.b)(this.rspEtfList,t,"stockCode"),c=Object(ot.b)(this.rspEtfList,t,"tradingName");this.rspEtfSuggestionList=[...e,...n,...i,...c],this.rspEtfSuggestionList=this.rspEtfSuggestionList.filter((t,e,n)=>n.findIndex(e=>["exchange","stockCode"].every(n=>e[n]===t[n]))===e)}else this.rspEtfSuggestionList=Object(g.a)(this.rspEtfList);this.loadingSuggestion=!1}clearSearchText(){this.search(null)}onEtfSelected(t){var e;if(this.selectedEtfData=null,t)if(this.checkW8BenForm(t))if(this.checkFepAgreemeent(t)){const n=this.rspEtfDisplayList.filter(e=>e.exchange===t.exchange&&e.stockCode===t.stockCode);n.length>0&&((null===(e=n[0])||void 0===e?void 0:e.gotActiveRsp)?(this.showRspExistModal=!0,this.selectedEtfName=n[0].etfN
1ame):(this.selectedExchange=t.exchange,this.selectedStockCode=t.stockCode,this.selectedEtf=n[0],this.showAddEtfDetailsModal=!0,this.selectedEtfName=n[0].etfName))}else this.visibleFepAgreement=!0,this.selectedEtfData=t;else this.showW8BenFormErrorModel()}isInsideCart(t,e){return this.cartList.filter(n=>n.buyInfoModel.sedolNumber===t&&n.buyInfoModel.exchange===e).length>0}subscribeViewOrderCart(){this.orderCartList$=this.store.select(v.f.getCartListByProduct).pipe(Object(m.a)(t=>t(this.refno,it.ETF))),this.subHandlingService.subscribe(this.orderCartList$.pipe(Object(f.a)(t=>{this.cartList=t,this.cdRef.markForCheck()})))}initRouteParam(){this.routeInitialize&&this.route.queryParams.subscribe(t=>{if(console.log("param",t),t.stockCode&&t.exchange)if(this.isInsideCart(t.stockCode,t.exchange)){let t=this.modal.error({nzTitle:"Error",nzContent:"Already added to cart",nzOkText:null});setTimeout(()=>t.destroy(),2500)}else this.onEtfSelected({stockCode:t.stockCode,exchange:t.exchange});this.routeInitialize=!1})}changeDisplayEmandate(){this.showViewCart=!1,this.showEmandatePage=!this.showEmandatePage}changeViewCart(){this.showEmandatePage=!1,this.showViewCart=!this.showViewCart}backToMainRspPage(){this.router.navigate([M.o.APP,M.o.RSP])}onSearchEtfName(t){this.keyword.patchValue(t)}subscribeKeyword(){this.subHandlingService.subscribe(this.keyword.valueChanges.pipe(Object(b.a)(500),Object(f.a)(t=>{t?this.search(t):this.rspEtfSuggestionList=this.rspEtfDisplayList})))}onClearInput(){this.keyword.patchValue(null)}showEditChange(t){console.log(" showEditChange event",t),console.log("this.showEditPage",this.showEditPage)}get keyword(){var t;return null===(t=this.form)||void 0===t?void 0:t.get("keyword")}getAccountDetails(){this.isLoadingAccDetails=!0,this.accountService.getTradableAccountRefno?this.subHandlingService.once(this.accountRestService.getDetails(this.accountService.getTradableAccountRefno).pipe(Object(f.a)(t=>{var e,n;this.isLoadingAccDetails=!1,(null==t?void 0:t.status)===M.a.RESPONSE_SUCCESS&&((null===(n=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.iamAccountBean)||void 0===n?void 0:n.bumiputraFlag)||(this.isBumiPutraFieldRequired=!0))}))):this.isLoadingAccDetails=!1}checkApprovedThirdPartyRelationAllowed(){this.subHandlingService.once(this.cdsAccountRestService.hasApprovedThirdPartyRelation(this.accountService.getTradableAccountRefno).pipe(Object(f.a)(t=>{this.hasApprovedThirdPartyRelation=t.data}),Object(Xe.a)(()=>{this.isLoading=!1})))}createCdsAccount(t){this.isCdsAcctLoading=!0;const e=this.accountService.getTradableAccountRefno,n=this.cdsAccountRestService.createCdsAccount(e,{mode:t.mode},t.bumiPutraFlag,t.relatedToIfastStaffFlag,this.isSkipCdsFee),i=this.stockInvestmentObjectiveRestService.createInvestmentObjective(e,t.stockInvestmentObjective.investmentObjective,t.stockInvestmentObjective.riskTolerance,t.stockInvestmentObjective.yearExperienceOpt);this.subHandlingService.once(Object(p.a)([n,i]).pipe(Object(f.a)(t=>{t[1].status!==M.a.RESPONSE_SUCCESS&&this.nzNotification.error(this.NOTIFICATION_TITLE_ERROR,"Unable to insert stock investment objective.")}),Object(Ke.a)(n=>{if(n[0].status===M.a.RESPONSE_SUCCESS&&n[0].data){if(t.mode===Je.b.FPX&&t.fpxReqestData)return this.isSkipCdsFee?(this.router.navigate([this.router.url],{}),We.a):(t.fpxReqestData.fpxSellerOrderNo=n[0].data,this.paymentRestService.preSubmit(e,!0,t.fpxReqestData));t.mode===Je.b.TRUST?(this.formatAndShowCdsAccountOpeningSuccessModal(n[0].data,t.mode),this.getCdsAccountDetailsAndRspEtfList()):t.mode===Je.b.LINK&&(this.showCdsLinkModalSuccess=!0)}else this.nzNotification.error("Error","High risk country"===n[0].errorCode||"not.allow.to.open.cds.account"===n[0].errorCode?'We are sorry that we are unable to process your CDS account application. Please contact our customer service at 03
1-21490567 or write to us at <a href="mailto:[email protected]">[email protected]</a> for assistance. ':"Unable to create CDS Account."),t.mode===Je.b.TRUST&&this.getCdsAccountDetailsAndRspEtfList();return We.a}),Object(f.a)(t=>{this.isSkipCdsFee||M.a.RESPONSE_SUCCESS===(null==t?void 0:t.status)&&(this.fpxPaymentDetails=Object(g.a)(t.data),this.transactionService.setLastVisitedUrl(this.router.url))}),Object(Xe.a)(()=>{this.isCdsAcctLoading=!1})))}formatAndShowCdsAccountOpeningSuccessModal(t,e){this.cdsAccountOpeningSuccessModalContent.push({label:"Account No",value:e===Je.b.FPX?this.fpxInfo.buyerRefno:this.accountService.getTradableAccountRefno});let n=new Date;e===Je.b.FPX?(this.cdsAccountOpeningSuccessModalContent.push({label:"Bank Name",value:this.fpxInfo.buyerBankName},{label:"FPX Transaction ID",value:t},{label:"Purchase Order No",value:this.fpxInfo.purchaseOrderNo}),n=this.fpxInfo.txDateTime):(this.isCashAccountPayment=!0,this.cdsAccountOpeningSuccessModalContent.push({label:"Transaction ID",value:t})),this.cdsAccountOpeningSuccessModalContent.push({label:"Transaction Amount",value:h.a.PAYMENT_CURRENCY_MYR+this.decimalPipe.transform(Ze.a.CDS_FEE,"1.2-2")},{label:"Transaction Date & Time",value:this.standardDatePipe.transform(n)+" "+this.datePipe.transform(n,"mediumTime")}),this.isCdsAccountOpeningSuccessModalVisible=!0}closeRspExistModal(){this.showRspExistModal=!this.showRspExistModal}getFpxInfo(t){this.subHandlingService.once(this.fpxRestService.getFpxInfo(t).pipe(Object(f.a)(t=>{var e;t.status===M.a.RESPONSE_SUCCESS&&(null===(e=t.data)||void 0===e?void 0:e.debitStatusCode)===this.FPX_SUCCESS_CODE&&(this.fpxInfo=t.data,this.formatAndShowCdsAccountOpeningSuccessModal(this.fpxInfo.fpxTransactionId,Je.b.FPX))})))}getW8BenDetails(){this.accountRestService.getStockW8BenFormDetails(this.accountService.getTradableAccountRefno).subscribe(t=>{var e,n;t.status===M.a.RESPONSE_SUCCESS&&(this.w8BenStatus=null===(e=t.data)||void 0===e?void 0:e.w8Status,this.w8ExpiryDate=null===(n=t.data)||void 0===n?void 0:n.w8ExpiryDate)})}checkW8BenForm(t){return t.exchange!==M.q.NASDAQ&&t.exchange!==M.q.AMEX&&t.exchange!==M.q.NYSE&&t.exchange!==M.q.BATS||this.w8BenStatus===en.a.APPROVED&&this.w8ExpiryDate>new Date}showW8BenFormErrorModel(){this.w8BenChecked||(this.w8BenChecked=!0,this.w8BenModalRef=this.w8BenStatus===en.a.PENDING?this.modal.warning({nzTitle:"W-8BEN Form",nzContent:"We are currently processing your W-8Ben form to verify your non-US tax status. Note that this manual processing will be longer, all W-8Ben forms will be subjected to review and approve by FSMOne.",nzOkText:"Ok",nzMaskClosable:!0,nzOnCancel:()=>{this.w8BenChecked=!1,this.w8BenModalRef.close()},nzOnOk:()=>{this.w8BenChecked=!1,this.w8BenModalRef.close()}}):this.store.selectSnapshot(T.a.getPrimaryDisplay).accountType===D.a.ACCOUNT_TYPE_CORPORATE?this.modal.warning({nzTitle:"W-8BEN-E Form",nzVisible:this.w8BenChecked,nzContent:"For corporate accounts, you are required to submit a copy of the W-8BEN-E Form.",nzOkText:"Ok",nzMaskClosable:!0,nzOnCancel:()=>{this.w8BenChecked=!1,this.w8BenModalRef.close()},nzOnOk:()=>{this.w8BenChecked=!1,this.w8BenModalRef.close()}}):this.modal.warning({nzTitle:"W-8BEN Form",nzContent:"Please submit your W-8Ben Form to verify your non-US tax status.",nzOkText:"Redirect",nzMaskClosable:!0,nzOnCancel:()=>{this.w8BenChecked=!1,this.w8BenModalRef.close()},nzOnOk:()=>{this.w8BenChecked=!1,this.w8BenModalRef.close(),this.router.navigate([M.o.APP,M.o.ACCOUNT_UPDATE,M.o.W8_BEN_FORM])}}))}checkFepAgreemeent(t){return!M.q.FOREIGN_EXCHANGES.includes(t.exchange)||this.store.selectSnapshot(T.a.isFepFlag)}handleFepAgreementVisible(t){this.visibleFepAgreement=t,!this.visibleFepAgreement&&this.checkFepAgreemeent(this.selectedEtfData)&&this.onEtfSelected(this.selectedEtfData)}redirectToFactsheetPage(t){let e=t.stockCode,n=t.exchange;if(e&&n){const t=Object(rt.f)(ct.b.ETF,e,"",name,n);Object(at.a)(t.route,t.params)}}chgSelectedTab(t){this.selectedIndex=t,console.log("SELECTED INDEX: ",this.selectedIndex)}viewRspClick(){this.router.navigate([M.o.APP,M.o.RSP,M.o.RSP_LIST],{queryParams:{refno:this.refno}})}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(nn.a),z.lc(C.a),z.lc(z.j),z.lc(q.a),z.lc(q.e),z.l
1c(A.a),z.lc(cn.a),z.lc(on.a),z.lc(St.b),z.lc(Tt.a),z.lc(sn.a),z.lc(Qe.a),z.lc(P.f),z.lc(P.g),z.lc(an.a),z.lc(rn.a),z.lc(yt.e))},t.\u0275cmp=z.fc({type:t,selectors:[["app-etf-rsp-list"]],inputs:{isTabSetItem:"isTabSetItem",noShowTabSet:"noShowTabSet"},features:[z.Tb([C.a,Qe.a,P.f,P.g])],decls:28,vars:19,consts:[[4,"ngIf"],[3,"nzLoading"],[3,"ngStyle",4,"ngIf"],[3,"productType","refno","editVisible","editVisibleChange",4,"ngIf"],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzWidth","nzFooter","nzOnCancel"],["nz-modal-title","","nzSpan","18",1,"mt-3","text-left","font-weight-bold"],["nzSpan","18",1,"mt-3","mb-4"],[1,"button-row"],["nz-button","","nzType","outline",3,"click"],["nz-button","","nzType","primary",2,"width","220px",3,"click"],["prefixIconFilter",""],[3,"showModal","isTradingPage"],[3,"fpxPaymentDetails"],[3,"visibleFepAgreement","changeVisibleFepAgreement"],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[3,"title","back"],["nz-row","","class","px-2 py-3 bg-white",4,"ngIf"],["nz-row","",1,"px-2","py-3","bg-white"],[3,"showCollape","expendAllEmandate","refno","displayType"],[3,"ngClass"],["nz-row",""],[3,"isRspEtf"],[3,"isFromAccountOpening","isCashAccountPayment","isVisible","content"],[3,"hasApprovedThirdPartyRelation","openCdsAccount","isCdsAccountOpeningLoading","isPendingLinkCds","isBumiPutraFieldRequired","onCreateCdsAccount"],["nzType","flex","nzAlign","middle",3,"ngStyle"],[1,"w-100"],[1,"text-center","mb-3",3,"nzSpan"],["alt","cds-account-processing",3,"src"],[1,"text-center",3,"nzSpan"],[3,"modalVisible"],[3,"ngClass","hidden",4,"ngIf"],[3,"ngClass","hidden"],[3,"nzSelectedIndex","nzSelectedIndexChange",4,"ngIf"],[3,"ngSwitch"],[3,"isTabSetItem","noShowTabSet",4,"ngSwitchCase"],[3,"isTabSetItem",4,"nSwitchDefault"],[3,"ngClass",4,"ngIf"],[3,"nzSelectedIndex","nzSelectedIndexChange"],[3,"nzTitle",4,"ngFor","ngForOf"],[3,"nzTitle"],[3,"isTabSetItem","noShowTabSet"],[3,"isTabSetItem"],["nz-row","","nzGutter","16"],["nz-col","","nzLg","6","nzMd","6","nzXs","24",1,"py-1"],["nzPlaceHolder","Please select",1,"w-100",3,"nzDropdownMatchSelectWidth","ngModel","nzLoading","nzSuffixIcon","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["nzLg","18","nzMd","18","nzXs","24","nz-col","",1,"py-1"],[3,"nzSuffix","nzPrefix"],["nz-input","",3,"placeholder","formControl","nzAutocomplete","input"],[3,"nzBackfill"],["auto",""],[3,"nzValue","click",4,"ngFor","ngForOf"],["nzDisabled","","nzCustomContent","",4,"ngIf"],["prefixIconSearch",""],["suffixIconClear",""],[3,"nzLabel","nzValue"],[3,"nzValue","click"],[1,"d-flex"],[3,"exchange"],[1,"px-1","font-weight-bold"],["nzDisabled","","nzCustomContent",""],["nz-icon","","nzType","loading",1,"loading-icon"],["nz-icon","","nzType","search"],["nz-icon","","nz-tooltip","","nzTheme","fill","nzType","close-circle",1,"ant-input-clear-icon",3,"click"],[1,"pt-2",3,"ngClass"],[3,"productCode","productName","subProductName","exchange","isEtf","title1","title2","desc1","desc2","clickWholeBar","showAddToCart","addedToCart","focusList","gotActiveRsp","selectedEtf","factsheetRedirectionForEtf",4,"ngFor","ngForOf"],[1,"mt-2",3,"ngClass"],[3,"productCode","productName","subProductName","exchange","isEtf","title1","title2","desc1","desc2","clickWholeBar","showAddToCart","addedToCart","focusList","gotActiveRsp","selectedEtf","factsheetRedirectionForEtf"],[1,"mb-3"],[3,"ngStyle"],[3,"refno","stockCode","exchange","selectedEtf","visible","oriBuyData","visibleChange","oriBuyDataStamped",4,"ngIf"],[3,"refno","stockCode","exchange","selectedEtf","visible","oriBuyData","visibleChange","oriBuyDataStamped"],[1,"bg-primary","pointer","py-2","px-3","w-100","rounded",3,"click"],["nz-row","","nzType","flex","nzAlign","middle",1,"text-white"],["nz-col","","nzSpan","12",1,"text-left","font-weight-bold"],["nz-col","","nzSpan","12",1,"position-relative","text-right"],["nzType","flex","nzJustify","end","nzAlign","middle",1,"text-right"],["nz-icon","","nzType","shopping-cart","nzTheme","outline",1,"cart-icon","pt-1","h-100"],["nz-col","",1,"item-count-container","d-inline-flex","rounded-circle","bg-white"],[1,"text-primary","font-weight-bold","m-auto"],["nz-col","",1,"px-1"],[3,"productType","refno","editVisible","editVisibleChange"],[1,"img-fluid",3,"src","alt"]],template:function(t,e){1&t&&(z.od(0,pn,4,3,"app-mobile-scaffold",0),z.od(1,gn,3,2,"app-mobile-scaffold",0),z.mc(2,"nz-skeleton",1),z.od(3,jn,4,6,"div",0),z.od(4,Xn,3,6,"div",2),z.Ec(5,"async"),z.Ec(6,"async"),z.rc(7,"app-mobile-scaffold"),z.od(8,Kn,14,1,"b2c-floating-bar",0),z.od(9,Jn,1,3,"rsp-order-cart",3),z.rc(10,"nz-modal",4),z.zc("nzOnCancel",(function(){return e.closeRspExistModal()})),z.rc(11,"h2",5),z.qd(12,"RSP Already Exists"),z.qc(),z.rc(13,"nz-row",6),z.qd(14,"You already have an existing active RSP for "),z.rc(15,"b"),z.qd(16),z.qc(),z.qd(17,". You may edit from the RSP list."),z.qc(),z.rc(18,"div",7),z.rc(19,"button",8),z.zc("click",(function(){return e.closeRspExistModal()})),z.qd(20," CLOSE "),z.qc(),z.rc(21,"button",9),z.zc("click",(function(){return e.viewRspClick()})),z.qd(22," VIEW RSP "),z.qc(),z.qc(),z.qc(),z.qc(),z.od(23,Zn,1,2,"ng-template",null,10,z.pd),z.mc(25,"app-stocks-cds-link-success-modal",11),z.mc(26,"fpx-submit-form",12),z.rc(27,"app-fep-agreement-modal",13),z.zc("changeVisibleFepAgreement",(function(t){return e.handleFepAgreementVisible(t)})),z.qc()),2&t&&(z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("nzLoading",e.isLoading||e.isCdsAcctLoading||e.isLoadingAccDetails),z.Ub(1),z.Mc("ngIf",!e.isLoading&&!e.isCdsAcctLoading&&!e.isLoadingAccDetails&&e.showRspEtf),z.Ub(1),z.Mc("ngIf",e.selectedExchange&&e.selectedStockCode&&(!z.Fc(5,15,e.isMobile$)||z.Fc(6,17,e.isMobile$)&&e.showAddEtfDetailsModal)),z.Ub(4),z.Mc("ngIf",(null==e.cartList?null:e.cartList.length)>0&&!e.showAddEtfDetailsModal&&!e.showViewCart),z.Ub(1),z.Mc("ngIf",e.showViewCart),z.Ub(1),z.Mc("nzVisible",e.showRspExistModal)("nzWidth",600)("nzFooter",null),z.Ub(6),z.rd(e.selectedEtfName),z.Ub(9),z.Mc("showModal",e.showCdsLinkModalSuccess)("isTradingPage",!1),z.Ub(1),z.Mc("fpxPaymentDetails",e.fpxPaymentDetails),z.Ub(1),z.Mc("visibleFepAgreement",e.visibleFepAgreement))},styles:[".infinite-container[_ngcontent-%COMP%]{max-height:600px;overflow-y:auto;overflow-x:hidden}.button-row[_ngcontent-%COMP%]{text-align:center;display:flex;justify-content:center;gap:15px}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(y.X.getSelectedRefno)],t.prototype,"refno$",void 0),t})();var ti=n("EZek");function ei(t,e){if(1&t){const t=z.sc();z.rc(0,"div",5),z.rc(1,"b2c-app-bar-2",6),z.zc("back",(function(){return z.dd(t),z.Dc(2).backToMainRspPage()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Regular Savings Plan"))}function ni(t,e){if(1&t){const t=z.sc();z.rc(0,"div",5),z.rc(1,"b2c-app-bar-2",6),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","My e-Mandate"))}function ii(t,e){if(1&t){const t=z.sc();z.rc(0,"div",5),z.rc(1,"b2c-app-bar-2",6),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeViewCart()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Preview Cart"))}function ci(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,ei,2,1,"div",4),z.od(2,ni,2,1,"div",4),z.od(3,ii,2,1,"div",4),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showAddDpmsDetailsModal&&!t.showViewCart),z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",t.showViewCart&&!t.showEditPage)}}function oi(t,e){if(1&t&&(z.rc(0,"div",8),z.mc(1,"emandate-list",9),z.Ec(2,"async"),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("showCollape",!z.Fc(2,4,t.isMobile$))("expendAllEmandate",t.showEmandatePage)("refno",t.refno)("displayType","grid")}}function si(t,e){if(1&t&&(z.pc(0),z.od(1,oi,3,6,"div",7),z.oc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",t.refno)}}function ai(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",10),z.rc(2,"div",11),z.mc(3,"investment-account-selector"),z.qc(),z.rc(4,"div",12),z.rc(5,"a",13),z.zc("click",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qd(6,"View My e-Mandate"),z.qc(),z.qc(),z.qc(),z.oc()}}function ri(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,si,2,1,"ng-container",0),z.od(2,ai,7,0,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showAddDpmsDetailsModal&&!t.showEditPage)}}function li(t,e){1&t&&z.mc(0,"nz-tab",23),2&t&&z.Mc("nzTitle",e.$implicit)}function di(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-tabset",21),z.zc("nzSelectedIndexChange",(function(e){return z.dd(t),z.Dc(2).chgSelectedTab(e)})),z.od(1,li,1,1,"nz-tab",22),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("nzSelectedIndex",t.selectedIndex),z.Ub(1),z.Mc("ngForOf",t.tabList)}}function ui(t,e){1&t&&z.mc(0,"app-funds-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function pi(t,e){1&t&&z.mc(0,"app-etf-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function hi(t,e){1&t&&z.mc(0,"app-dpms-rsp-list",25),2&t&&z.Mc("isTabSetItem",!0)}function fi(t,e){1&t&&z.mc(0,"app-cash-acct-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function mi(t,e){1&t&&z.mc(0,"i",31)}function bi(t,e){if(1&t){const t=z.sc();z.rc(0,"i",32),z.zc("click",(function(){return z.dd(t),z.Dc(3).clearSearchText()})),z.qc()}}function gi(t,e){if(1&t){const t=z.sc();z.rc(0,"div",11),z.rc(1,"div",26),z.rc(2,"nz-input-group",27),z.rc(3,"input",28),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(2).searchValue=e}))("ngModelChange",(function(){return z.dd(t),z.Dc(2).search()})),z.qc(),z.qc(),z.od(4,mi,1,0,"ng-template",null,29,z.pd),z.od(6,bi,1,0,"ng-template",null,30,z.pd),z.qc(),z.qc()}if(2&t){const t=z.ad(5),e=z.ad(7),n=z.Dc(2);z.Ub(2),z.Mc("nzPrefix",t)("nzSuffix",e),z.Ub(1),z.Mc("ngModel",n.searchValue)}}function yi(t,e){if(1&t){const t=z.sc();z.rc(0,"product-info",37),z.zc("selectedProductCode",(function(e){return z.dd(t),z.Dc(3).onProductSelected(e)})),z.Ec(1,"currencyFormat"),z.Ec(2,"async"),z.Ec(3,"async"),z.qc()}if(2&t){const t=e.$implicit,n=z.Dc(3);
1z.Mc("productCode",t.dpmsPortfolioId)("productName",t.dpmsPortfolioName)("specialLogoType",n.prepareSpecialList(t))("title1","Min. RSP Amt.")("title2","Portfolio Currency")("desc1",z.Gc(1,10,t.minRspAmt,t.currencyCode))("desc2",t.currencyCode)("clickWholeBar",z.Fc(2,13,n.isMobile$))("showAddToCart",!z.Fc(3,15,n.isMobile$))("addedToCart",n.isInsideCart(t.dpmsPortfolioId))}}function Mi(t,e){if(1&t){const t=z.sc();z.rc(0,"div"),z.rc(1,"p",38),z.qd(2,"*RSP is only available to investors who have made their first investment. "),z.rc(3,"span",39),z.rc(4,"a",40),z.zc("click",(function(){return z.dd(t),z.Dc(3).redirectToBuyDpms()})),z.qd(5,"Invest Now"),z.qc(),z.qc(),z.qc(),z.qc()}}const vi=function(t,e){return{"pt-2":t,"infinite-container pt-2":e}};function Ci(t,e){if(1&t&&(z.rc(0,"div",33),z.pc(1),z.rc(2,"nz-skeleton",34),z.rc(3,"div",35),z.Ec(4,"async"),z.od(5,yi,4,17,"product-info",36),z.qc(),z.od(6,Mi,6,0,"div",0),z.qc(),z.oc(),z.qc()),2&t){const t=z.Dc(2);z.Ub(2),z.Mc("nzLoading",t.isLoading),z.Ub(1),z.Mc("ngClass",z.Tc(6,vi,z.Fc(4,4,t.isMobile$),(null==t.dpmsDisplayList?null:t.dpmsDisplayList.length)>=7)),z.Ub(2),z.Mc("ngForOf",t.dpmsDisplayList),z.Ub(1),z.Mc("ngIf",0===(null==t.dpmsDisplayList?null:t.dpmsDisplayList.length))}}const Ti=function(t){return{"bg-white shadow w-100 py-2":t}};function Si(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"div",14),z.Ec(2,"async"),z.Ec(3,"async"),z.od(4,di,2,2,"nz-tabset",15),z.Ec(5,"async"),z.rc(6,"div",16),z.od(7,ui,1,2,"app-funds-rsp-list",17),z.od(8,pi,1,2,"app-etf-rsp-list",17),z.od(9,hi,1,1,"app-dpms-rsp-list",18),z.od(10,fi,1,2,"app-cash-acct-rsp-list",17),z.qc(),z.od(11,gi,8,3,"div",19),z.od(12,Ci,7,9,"div",20),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngClass",z.Sc(16,Ti,z.Fc(2,10,t.isMobile$)))("hidden",z.Fc(3,12,t.isMobile$)&&t.showAddDpmsDetailsModal),z.Ub(3),z.Mc("ngIf",z.Fc(5,14,t.isMobile$)&&!t.noShowTabSet),z.Ub(2),z.Mc("ngSwitch",t.selectedIndex),z.Ub(1),z.Mc("ngSwitchCase",0),z.Ub(1),z.Mc("ngSwitchCase",1),z.Ub(1),z.Mc("nSwitchDefault",2),z.Ub(1),z.Mc("ngSwitchCase",3),z.Ub(1),z.Mc("ngIf",2==t.selectedIndex),z.Ub(1),z.Mc("ngIf",2==t.selectedIndex)}}function Di(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-dpms-details",43),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showAddDpmsDetailsModal=e}))("oriBuyDataStamped",(function(){return z.dd(t),z.Dc(2).buyInfo=null})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("portfolioId",t.selectedPortfolioId)("visible",t.showAddDpmsDetailsModal)("oriBuyData",t.buyInfo)}}const zi=function(){return{}},qi=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function Ei(t,e){if(1&t&&(z.rc(0,"div",41),z.Ec(1,"async"),z.od(2,Di,1,4,"rsp-dpms-details",42),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,zi):z.Rc(5,qi)),z.Ub(2),z.Mc("ngIf",t.selectedPortfolioId&&t.showAddDpmsDetailsModal)}}function Ai(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"div",44),z.zc("click",(function(){return z.dd(t),z.Dc().changeViewCart()})),z.rc(2,"div",45),z.rc(3,"div",46),z.qd(4,"View Cart"),z.qc(),z.rc(5,"div",47),z.rc(6,"nz-row",48),z.rc(7,"nz-col"),z.mc(8,"i",49),z.qc(),z.rc(9,"div",50),z.rc(10,"p",51),z.qd(11),z.qc(),z.qc(),z.rc(12,"nz-col",52),z.qd(13," Item "),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Ub(11),z.rd(t.cartList.length)}}function Pi(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-order-cart",53),z.zc("editVisibleChange",(function(e){return z.dd(t),z.Dc().showEditPage=e})),z.qc()}if(2&t){const t=z.Dc();z.Mc("productType",t.iProductEnum.DPMS)("refno",t.refno)("editVisible",t.showEditPage)}}function Ri(t,e){if(1&t&&z.mc(0,"img",54),2&t){const t=z.Dc();z.Mc("src",t.transactionImgPath+"filterIcon.svg",z.gd)("alt","filter icon")}}let wi=(()=>{class t{constructor(t,e,n,i,c,o){this.store=t,this.transactionDpmsRestService=e,this.subHandlingService=n,this.cdRef=i,this.route=c,this.router=o,this.isTabSetItem=!1,this.noShowTabSet=!1,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.tabList=[],this.selectedIndex=2,this.isLoading=!1,this.iProductEnum=ct.b,this.dpmsList=[],this.dpmsDisplayList=[],this.showAddDpmsDetailsModal=!1,this.cartList=[],this.showViewCart=!1,this.showEmandatePage=!1,this.showEditPage=!1,this.routeInitialize=!0,this.subscribeRefnoChange(),this.subscribeViewOrderCart()}ngOnInit(){this.store.dispatch(new y.U(ct.b.DPMS))}ngAfterViewInit(){this.tabList=["Unit Trust","ETFs","Managed Portfolio","Cash Account"]}getDpmsBuyList(){this.isLoading=!0,this.subHandlingService.once(this.transactionDpmsRestService.getDpmsRspList(this.refno).pipe(Object(f.a)(t=>{t&&(this.dpmsList=t.data.sort((t,e)=>t.dpmsPortfolioName>e.dpmsPortfolioName?1:e.dpmsPortfolioName>t.dpmsPortfolioName?-1:0)),this.search(),this.initRouteParam(),this.isLoading=!1})))}subscribeRefnoChange(){this.subHandlingService.subscribe(this.refno$.pipe(Object(f.a)(t=>{this.refno=t,this.cdRef.markForCheck(),this.getDpmsBuyList(),this.subscribeViewOrderCart()})))}subscribeViewOrderCart(){this.orderCartList$=this.store.select(v.f.getCartListByProduct).pipe(Object(m.a)(t=>
1t(this.refno,it.DPMS))),this.subHandlingService.subscribe(this.orderCartList$.pipe(Object(f.a)(t=>{this.cartList=t,this.cdRef.markForCheck()})))}search(){this.dpmsList&&(this.dpmsDisplayList=this.searchValue?Object(ot.b)(this.dpmsList,this.searchValue,"dpmsPortfolioName"):Object(g.a)(this.dpmsList))}clearSearchText(){this.searchValue="",this.search()}onProductSelected(t){this.dpmsDisplayList.filter(e=>e.dpmsPortfolioId===t).length>0&&(this.selectedPortfolioId=t,this.showAddDpmsDetailsModal=!0)}isInsideCart(t){return this.cartList.filter(e=>e.buyInfoModel.sedolNumber===t).length>0}initRouteParam(){this.routeInitialize&&this.route.queryParams.subscribe(t=>{console.log("param",t),t.refno&&(this.refno=t.refno,this.store.dispatch(new y.N(this.refno))),t.productId&&this.onProductSelected(t.productId),(t.amount||t.paymentMethod)&&(this.buyInfo={paymentMethod:t.paymentMethod,amount:t.amount,bankCode:t.bankCode}),this.routeInitialize=!1})}redirectToBuyDpms(){this.router.navigate([M.o.APP,M.o.TRADE,M.o.DPMS,M.o.BUY])}changeDisplayEmandate(){this.showViewCart=!1,this.showEmandatePage=!this.showEmandatePage}changeViewCart(){this.showEmandatePage=!1,this.showViewCart=!this.showViewCart}backToMainRspPage(){this.router.navigate([M.o.APP,M.o.RSP])}chgSelectedTab(t){this.selectedIndex=t,console.log("SELECTED INDEX: ",this.selectedIndex)}prepareSpecialList(t){return{rebalancingFlag:t.rebalancingFlag}}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(ti.a),z.lc(C.a),z.lc(z.j),z.lc(q.a),z.lc(q.e))},t.\u0275cmp=z.fc({type:t,selectors:[["app-dpms-rsp-list"]],inputs:{isTabSetItem:"isTabSetItem",noShowTabSet:"noShowTabSet"},decls:9,vars:6,consts:[[4,"ngIf"],[3,"ngStyle",4,"ngIf"],[3,"productType","refno","editVisible","editVisibleChange",4,"ngIf"],["prefixIconFilter",""],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[3,"title","back"],["nz-row","","class","py-1",4,"ngIf"],["nz-row","",1,"py-1"],[1,"w-100","m-3",3,"showCollape","expendAllEmandate","refno","displayType"],[1,"mb-3","shadow"],["nz-row",""],["nz-row","",1,"pb-3","px-2","text-right","bg-white"],[1,"text-base","font-weight-bold","mb-3",3,"click"],[3,"ngClass","hidden"],[3,"nzSelectedIndex","nzSelectedIndexChange",4,"ngIf"],[3,"ngSwitch"],[3,"isTabSetItem","noShowTabSet",4,"ngSwitchCase"],[3,"isTabSetItem",4,"nSwitchDefault"],["nz-row","",4,"ngIf"],["class","",4,"ngIf"],[3,"nzSelectedIndex","nzSelectedIndexChange"],[3,"nzTitle",4,"ngFor","ngForOf"],[3,"nzTitle"],[3,"isTabSetItem","noShowTabSet"],[3,"isTabSetItem"],["nzSpan","24","nz-col",""],[1,"w-100",3,"nzPrefix","nzSuffix"],["type","text","nz-input","","placeholder","Search",3,"ngModel","ngModelChange"],["prefixIconSearch",""],["suffixIconClose",""],["nz-icon","","nzType","search"],["nz-icon","","nzType","close","nzTheme","outline",3,"click"],[1,""],[3,"nzLoading"],[3,"ngClass"],[3,"productCode","productName","specialLogoType","title1","title2","desc1","desc2","clickWholeBar","showAddToCart","addedToCart","selectedProductCode",4,"ngFor","ngForOf"],[3,"productCode","productName","specialLogoType","title1","title2","desc1","desc2","clickWholeBar","showAddToCart","addedToCart","selectedProductCode"],[1,"py-2"],[1,"font-weight-bold"],[3,"click"],[3,"ngStyle"],[3,"refno","portfolioId","visible","oriBuyData","visibleChange","oriBuyDataStamped",4,"ngIf"],[3,"refno","portfolioId","visible","oriBuyData","visibleChange","oriBuyDataStamped"],[1,"bg-primary","pointer","py-2","px-3","w-100","rounded",3,"click"],["nz-row","","nzType","flex","nzAlign","middle",1,"text-white"],["nz-col","","nzSpan","12",1,"text-left","font-weight-bold"],["nz-col","","nzSpan","12",1,"position-relative","text-right"],["nzType","flex","nzJustify","end","nzAlign","middle",1,"text-right"],["nz-icon","","nzType","shopping-cart","nzTheme","outline",1,"cart-icon","pt-1","h-100"],["nz-col","",1,"item-count-container","d-inline-flex","rounded-circle","bg-white"],[1,"text-primary","font-weight-bold","m-auto"],["nz-col","",1,"px-1"],[3,"productType","refno","editVisible","editVisibleChange"],[1,"img-fluid",3,"src","alt"]],template:function(t,e){1&t&&(z.od(0,ci,4,3,"app-mobile-scaffold",0),z.od(1,ri,3,2,"app-mobile-scaffold",0),z.od(2,Si,13,18,"div",0),z.od(3,Ei,3,6,"div",1),z.rc(4,"app-mobile-scaffold"),z.od(5,Ai,14,1,"b2c-floating-bar",0),z.od(6,Pi,1,3,"rsp-order-cart",2),z.qc(),z.od(7,Ri,1,2,"ng-template",null,3,z.pd)),2&t&&(z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!e.showEmandatePage&&!e.showViewCart),z.Ub(1),z.Mc("ngIf",e.selectedPortfolioId&&e.showAddDpmsDetailsModal),z.Ub(2),z.Mc("ngIf",(null==e.cartList?null:e.cartList.length)>0&&!e.showAddDpmsDetailsModal&&!e.showViewCart),z.Ub(1),z.Mc("ngIf",e.showViewCart))},encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(y.X.getSelectedRefno)],t.prototype,"refno$",void 0),t})();var Fi=n("URyx"),Ii=n("iel7");function Ui(t,e){if(1&t){const t=z.sc();z.rc(0,"div",7),z.rc(1,"b2c-app-bar-2",8),z.zc("back",(function(){return z.dd(t),z.Dc(2).backToMainRspPage()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Regular Savings Plan"))}function Oi(t,e){if(1&t){const t=z.sc();z.rc(0,"div",7),z.rc(1,"b2c-app-bar-2",8),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","My e-Mandate"))}function xi(t,e){if(1&t){const t=z.sc();z.rc(0,"div",7),z.rc(1,"b2c-app-bar-2",8),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeViewCart()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Preview Cart"))}function Li(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Ui,2,1,"div",6),z.od(2,Oi,2,1,"div",6),z.od(3,xi,2,1,"div",6),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.newDdaModelVisible&&!t.showViewCart),z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",t.showViewCart)}}function ki(t,e){if(1&t&&(z.rc(0,"div",10),z.mc(1,"emandate-list",11),z.Ec(2,"async"),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("showCollape",!z.Fc(2,4,t.isMobile$))("expendAllEmandate",t.showEmandatePage)("refno",t.refno)("displayType","grid")}}function Ni(t,e){if(1&t&&(z.pc(0),z.od(1,ki,3,6,"div",9),z.oc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",t.refno)}}const _i=function(t){return{"mb-3":t}};function Bi(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",12),z.Ec(2,"async"),z.rc(3,"div",13),z.mc(4,"investment-account-selector"),z.qc(),z.rc(5,"div",14),z.rc(6,"a",15),z.zc("click",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qd(7,"View My e-Mandate"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngClass",z.Sc(3,_i,z.Fc(2,1,t.isMobile$)))}}function Vi(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Ni,2,1,"ng-container",0),z.od(2,Bi,8,5,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.newDdaModelVisible)}}function Yi(t,e){1&t&&z.mc(0,"nz-tab",23),2&t&&z.Mc("nzTitle",e.$implicit)}function Hi(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-tabset",21),z.zc("nzSelectedIndexChange",(function(e){return z.dd(t),z.Dc(2).chgSelectedTab(e)})),z.od(1,Yi,1,1,"nz-tab",22),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("nzSelectedIndex",t.selectedIndex),z.Ub(1),z.Mc("ngForOf",t.tabList)}}function ji(t,e){1&t&&z.mc(0,"app-funds-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function $i(t,e){1&t&&z.mc(0,"app-etf-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function Gi(t,e){1&t&&z.mc(0,"app-dpms-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function Wi(t,e){if(1&t&&z.mc(0,"nz-option",46),2&t){const t=e.$implicit;z.Mc("nzLabel",t.accountTypeDisplay)("nzValue",t.refno)}}function Xi(t,e){1&t&&(z.rc(0,"div",38),z.qd(1," Please choose an account. "),z.qc())}function Ki(t,e){if(1&t&&z.mc(0,"nz-option",46),2&t){const t=e.$implicit;z.Mc("nzLabel",t.currency)("nzValue",t.currency)}}function Ji(t,e){1&t&&(z.rc(0,"div",38),z.qd(1," Please choose a currency. "),z.qc())}function Zi(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function Qi(t,e){1&t&&(z.pc(0),z.qd(1," Minimum amount is 100 "),z.oc())}function tc(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(5);
1z.Ub(1),z.sd(" Amount accept up to ",t.rspAmountDecimalPlaces," d.p. ")}}function ec(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(5);z.Ub(1),z.sd(" The available amount is ",null==t.selectedBank?null:t.selectedBank.availableAmount," ")}}function nc(t,e){if(1&t&&z.mc(0,"nz-option",46),2&t){const t=e.$implicit;z.Mc("nzLabel",t.label)("nzValue",t.value)}}function ic(t,e){1&t&&(z.rc(0,"div",38),z.qd(1," Please choose a frequency. "),z.qc())}function cc(t,e){if(1&t&&z.mc(0,"nz-option",47),2&t){const t=e.$implicit;z.Mc("nzValue",t.value)("nzLabel",t.label)}}function oc(t,e){1&t&&(z.rc(0,"div",38),z.qd(1," Please make sure this field is not blank. "),z.qc())}function sc(t,e){1&t&&(z.rc(0,"div",38),z.qd(1," Fpx Bank List not available "),z.qc())}function ac(t,e){1&t&&(z.rc(0,"div",55),z.qd(1,"Looks like you do not have a FPX e-Mandate Account"),z.qc())}function rc(t,e){1&t&&(z.rc(0,"div",38),z.qd(1," Please choose at least one bank to complete your RSP application "),z.qc())}function lc(t,e){if(1&t){const t=z.sc();z.rc(0,"div",48),z.rc(1,"div",49),z.qd(2,"Select Your e-Mandate"),z.qc(),z.od(3,ac,2,0,"div",50),z.rc(4,"div",51),z.rc(5,"a",52),z.zc("click",(function(){return z.dd(t),z.Dc(5).onApplyNewDda()})),z.qd(6,"Apply New e-Mandate"),z.qc(),z.qc(),z.rc(7,"div",53),z.rc(8,"b2c-rsp",54),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(5).onSelectedBank(e)})),z.qc(),z.qc(),z.od(9,rc,2,0,"div",34),z.qc()}if(2&t){const t=z.Dc(5);var n=null;const e=(null==(n=t.validateCashAccountForm.get("bank"))?null:n.dirty)&&(null==(n=t.validateCashAccountForm.get("bank"))?null:n.hasError("required"));z.Ub(3),z.Mc("ngIf",0===t.rspConvertedBankList.length),z.Ub(1),z.Mc("nzSpan",0===t.rspConvertedBankList.length?24:""),z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString()),z.Ub(1),z.Mc("ngIf",e)}}function dc(t,e){if(1&t&&(z.rc(0,"div",56),z.mc(1,"i",57),z.qd(2),z.qc()),2&t){const t=z.Dc(5);var n=null;z.Ub(2),z.sd(" ",null==(n=t.validateCashAccountForm.get("refno"))?null:n.getError("invalidBuy")," ")}}function uc(t,e){if(1&t){const t=z.sc();z.rc(0,"form",28),z.rc(1,"nz-row",29),z.rc(2,"nz-col",30),z.Ec(3,"async"),z.rc(4,"p",31),z.qd(5,"Account "),z.qc(),z.qc(),z.rc(6,"nz-col",30),z.Ec(7,"async"),z.rc(8,"nz-form-item",31),z.rc(9,"nz-form-control"),z.rc(10,"nz-select",32),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(4).acctRefnoChange(e)})),z.Ec(11,"async"),z.od(12,Wi,1,2,"nz-option",33),z.Ec(13,"async"),z.qc(),z.od(14,Xi,2,0,"div",34),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(15,"nz-row",35),z.rc(16,"nz-col",30),z.Ec(17,"async"),z.rc(18,"p",31),z.qd(19,"Currency"),z.qc(),z.qc(),z.rc(20,"nz-col",30),z.Ec(21,"async"),z.rc(22,"nz-form-item",31),z.rc(23,"nz-form-control"),z.rc(24,"nz-select",36),z.od(25,Ki,1,2,"nz-option",33),z.qc(),z.od(26,Ji,2,0,"div",34),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(27,"nz-row",35),z.rc(28,"nz-col",30),z.Ec(29,"async"),z.rc(30,"p",31),z.qd(31,"RSP Amount"),z.qc(),z.qc(),z.rc(32,"nz-col",30),z.Ec(33,"async"),z.rc(34,"nz-form-item",31),z.rc(35,"nz-form-control"),z.rc(36,"ui-input-group"),z.mc(37,"input",37),z.qc(),z.rc(38,"div",38),z.od(39,Zi,2,0,"ng-container",0),z.od(40,Qi,2,0,"ng-container",0),z.od(41,tc,2,1,"ng-container",0),z.od(42,ec,2,1,"ng-container",0),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(43,"nz-row",35),z.rc(44,"nz-col",30),z.Ec(45,"async"),z.rc(46,"p",31),z.qd(47,"Frequency"),z.qc(),z.qc(),z.rc(48,"nz-col",30),z.Ec(49,"async"),z.rc(50,"nz-form-item",31),z.rc(51,"nz-form-control"),z.rc(52,"nz-select",39),z.od(53,nc,1,2,"nz-option",33),z.qc(),z.od(54,ic,2,0,"div",34),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(55,"nz-row",35),z.rc(56,"nz-col",30),z.Ec(57,"async"),z.rc(58,"p",31),z.qd(59,"Payment Method"),z.qc(),z.qc(),z.rc(60,"nz-col",30),z.Ec(61,"async"),z.rc(62,"nz-form-item",31),z.rc(63,"nz-form-control"),z.rc(64,"nz-select",40),z.od(65,cc,1,2,"nz-option",41),z.qc(),z.od(66,oc,2,0,"div",34),z.od(67,sc,2,0,"div",34),z.qc(),z.qc(),z.qc(),z.qc(),z.od(68,lc,10,6,"div",42),z.rc(69,"app-web-scaffold"),z.od(70,dc,3,1,"div",43),z.rc(71,"div",44),z.rc(72,"button",45),z.zc("click",(function(){return z.dd(t),z.Dc(4).submitTransaction()})),z.qd(73,"Apply"),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(4),e=z.ad(8);var n;const p=(null==(n=z.Fc(11,38,t.acctList$))?null:n.length)<=1;var i=null;const h=(null==(i=t.validateCashAccountForm.get("refno"))?null:i.dirty)&&(null==(i=t.validateCashAccountForm.get("refno"))?null:i.hasError("required"));var c=null;const f=(null==(c=t.validateCashAccountForm.get("trustId"))?null:c.dirty)&&(null==(c=t.validateCashAccountForm.get("trustId"))?null:c.hasError("required"));var o=null;const m=(null==(o=t.validateCashAccountForm.get("investmentAmount"))?null:o.dirty)&&(null==(o=t.validateCashAccountForm.get("investmentAmount"))?null:o.hasError("required"));var s=null;const b=(null==(s=t.validateCashAccountForm.get("investmentAmount"))?null:s.dirty)&&(null==(s=t.validateCashAccountForm.get("investmentAmount"))?null:s.hasError("min"));var a=null;const g=(null==(a=t.validateCashAccountForm.get("investmentAmount"))?null:a.dirty)&&(null==(a=t.validateCashAccountForm.get("investmentAmount"))?null:a.hasError("pattern"));var r=null;const y=(null==(r=t.validateCashAccountForm.get("investmentAmount"))?null:r.dirty)&&(null==(r=t.validateCashAccountForm.get("investmentAmount"))?null:r.hasError("max"));var l=null;const M=(null==(l=t.validateCashAccountForm.get("frequency"))?null:l.dirty)&&(null==(l=t.validateCashAccountForm.get("frequency"))?null:l.hasError("required"));var d=null;const v=(null==(d=t.validateCashAccountForm.get("paymentMethod"))?null:d.dirty)&&(null==(d=t.validateCashAccountForm.get("paymentMethod"))?null:d.hasError("required"));var u=null;const C=null==(u=t.validateCashAccountForm.get("refno"))?null:u.hasError("invalidBuy");z.Mc("formGroup",t.validateCashAccountForm),z.Ub(2),z.Mc("nzSpan",z.Fc(3,34,t.isMobile$)?24:9),z.Ub(4),z.Mc("nzSpan",z.Fc(7,36,t.isMobile$)?24:15),z.Ub(4),z.Mc("nzDropdownMatchSelectWidth",!1)("nzDisabled",p),z.Ub(2),z.Mc("ngForOf",z.Fc(13,40,t.acctList$)),z.Ub(2),z.Mc("ngIf",h),z.Ub(2),z.Mc("nzSpan",z.Fc(17,42,t.isMobile$)?24:9),z.Ub(4),z.Mc("nzSpan",z.Fc(21,44,t.isMobile$)?24:15),z.Ub(4),z.Mc("nzDropdownMatchSelectWidth",!1)("nzCustomTemplate",e),z.Ub(1),z.Mc("ngForOf",t.trustIdList),z.Ub(1),z.Mc("ngIf",f),z.Ub(2),z.Mc("nzSpan",z.Fc(29,46,t.isMobile$)?24:9),z.Ub(4),z.Mc("nzSpan",z.Fc(33,48,t.isMobile$)?24:15),z.Ub(7),z.Mc("ngIf",m),z.Ub(1),z.Mc("ngIf",b),z.Ub(1),z.Mc("ngIf",g),z.Ub(1),z.Mc("ngIf",y),z.Ub(2),z.Mc("nzSpan",z.Fc(45,50,t.isMobile$)?24:9),z.Ub(4),z.Mc("nzSpan",z.Fc(49,52,t.isMobile$)?24:15),z.Ub(4),z.Mc("nzDropdownMatchSelectWidth",!1),z.Ub(1),z.Mc("ngForOf",t.rspConstants.FREQUENCY_LIST),z.Ub(1),z.Mc("ngIf",M),z.Ub(2),z.Mc("nzSpan",z.Fc(57,54,t.isMobile$)?24:9),z.Ub(4),z.Mc("nzSpan",z.Fc(61,56,t.isMobile$)?24:15),z.Ub(5),z.Mc("ngForOf",t.paymentMethodList),z.Ub(1),z.Mc("ngIf",v),z.Ub(1),z.Mc("ngIf",!t.fpxAvailable),z.Ub(1),z.Mc("ngIf",t.fpxAvailable&&t.paymentMethod===t.rspConstants.PAYMENT_METHOD_FPX),z.Ub(2),z.Mc("ngIf",C),z.Ub(2),z.Mc("nzType","primary")("nzLoading",t.isLoading||t.isSubmitLoading)("disabled",(null==t.validateCashAccountForm?null:t.validateCashAccountForm.dirty)&&"VALID"!==(null==t.validateCashAccountForm?null:t.validateCashAccountForm.status))}}const pc=function(t){return{"text-base":t}};function hc(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"h4",25),z.qd(2,"Recurring Cash Account Top Up Plan"),z.qc(),z.rc(3,"div",26),z.Ec(4,"async"),z.qd(5,"Recurring Cash Account Top Up is like a Standing Instruction, it allows you to pre-set your Cash Account Top Up amount and frequency according to your preferences. Currently only available for MYR Cash Account."),z.qc(),z.od(6,uc,74,58,"form",27),z.qc()),2&t){const t=z.Dc(3);z.Ub(3),z.Mc("ngClass",z.Sc(4,pc,z.Fc(4,2,t.isMobile$))),z.Ub(3),z.Mc("ngIf",t.validateCashAccountForm)}}const fc=function(t){return{"px-2":t}};function mc(t,e){if(1&t&&(z.rc(0,"div",12),z.Ec(1,"async"),z.od(2,hc,7,6,"div",0),z.qc()),2&t){const t=z.Dc(2);z.Mc("ngClass",z.Sc(4,fc,z.Fc(1,2,t.isMobile$))),z.Ub(2),z.Mc("ngIf",3===t.selectedIndex)}}const bc=function(t){return{"bg-white shadow w-100 py-2":t}};function gc(t,e){if(1&t&&(z.rc(0,"div",12),z.Ec(1,"async"),z.od(2,Hi,2,2,"nz-tabset",16),z.Ec(3,"async"),z.rc(4,"div",17),z.od(5,ji,1,2,"app-funds-rsp-list",18),z.od(6,$i,1,2,"app-etf-rsp-list",18),z.od(7,Gi,1,2,"app-dpms-rsp-list",18),z.qc(),z.rc(8,"nz-skeleton",19),z.od(9,mc,3,6,"div",20),z.qc(),z.qc()),2&t){const t=z.Dc(),e=z.ad(10);z.Mc("ngClass",z.Sc(13,bc,z.Fc(1,9,t.isMobile$))),z.Ub(2),z.Mc("ngIf",z.Fc(3,11,t.isMobile$)&&!t.noShowTabSet),z.Ub(2),z.Mc("ngSwitch",t.selectedIndex),z.Ub(1),z.Mc("ngSwitchCase",0),z.Ub(1),z.Mc("ngSwitchCase",1),z.Ub(1),z.Mc("ngSwitchCase",2),z.Ub(1),z.Mc("nzLoading",t.isLoading),z.Ub(1),z.Mc("ngIf",!(null!=t.rspTrustAcctDetails&&t.rspTrustAcctDetails.rspId))("ngIfElse",e)}}function yc(t,e){if(1&t&&(z.rc(0,"div",56),z.mc(1,"i",57),z.qd(2),z.qc()),2&t){const t=z.Dc(3);var n=null;z.Ub(2),z.sd(" ",null==(n=t.validateCashAccountForm.get("refno"))?null:n.getError("invalidBuy")," ")}}function Mc(t,e){if(1&t){const t=z.sc();z.rc(0,"div",60),z.od(1,yc,3,1,"div",43),z.rc(2,"button",61),z.zc("click",(function(){return z.dd(t),z.Dc(2).submitTransaction()})),z.qd(3,"Apply"),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);var n=null;const e=null==(n=t.validateCashAccountForm.get("refno"))?null:n.hasError("invalidBuy");z.Ub(1),z.Mc("ngIf",e),z.Ub(1),z.Mc("nzType","primary")("nzLoading",t.isLoading||t.isSubmitLoading)("disabled",(null==t.validateCashAccountForm?null:t.validateCashAccountForm.dirty)&&"VALID"!==(null==t.validateCashAccountForm?null:t.validateCashAccountForm.status))}}function vc(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-order-cart",62),z.zc("editBtnClicked",(function(){return z.dd(t),z.Dc(2).backToEdit()})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("productType","trustAccount")("refno",t.refno)}}function Cc(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Mc,4,4,"div",58),z.od(2,vc,1,2,"rsp-order-cart",59),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!(null!=t.rspTrustAcctDetails&&t.rspTrustAcctDetails.rspId)),z.Ub(1),z.Mc("ngIf",t.showViewCart)}}const Tc=function(){return{}},Sc=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function Dc(t,e){if(1&t){const t=z.sc();z.rc(0,"div",63),z.Ec(1,"async"),z.rc(2,"new-emandate",64),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc().newDdaModelVisible=e}))("visibleChange",(function(){return z.dd(t),z.Dc().onCloseApplyNewDda()}))("bankDetail",(function(e){return z.dd(t),z.Dc().onCreateBank(e)})),z.qc(),z.qc()}if(2&t){const t=z.Dc();
1z.Mc("ngStyle",z.Fc(1,4,t.isMobile$)?z.Rc(6,Tc):z.Rc(7,Sc)),z.Ub(2),z.Mc("refno",t.formRefno)("visible",t.newDdaModelVisible)("bankList",t.newBankList)}}function zc(t,e){if(1&t&&(z.rc(0,"span"),z.qd(1),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.sd("[",null==t.selectedTrustId?null:t.selectedTrustId.trustId,"]")}}function qc(t,e){if(1&t&&(z.mc(0,"b2c-country-flag",65),z.qd(1," MYR "),z.od(2,zc,2,1,"span",0)),2&t){const t=z.Dc();z.Mc("isLink",!1)("showName",!1),z.Ub(2),z.Mc("ngIf",null==t.selectedTrustId?null:t.selectedTrustId.trustId)}}function Ec(t,e){if(1&t&&(z.rc(0,"nz-tag",81),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2);z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus))}}function Ac(t,e){if(1&t&&(z.rc(0,"nz-tag",82),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2);z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.rspTrustAcctDetails.rspStatus))}}function Pc(t,e){if(1&t&&(z.rc(0,"nz-tag",83),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2);z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.rspTrustAcctDetails.rspStatus))}}function Rc(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",84),z.rc(1,"a",85),z.zc("click",(function(){return z.dd(t),z.Dc(2).onClickEdit()})),z.qd(2,"Edit RSP"),z.qc(),z.qc()}}const wc=function(t){return{"px-3":t}};function Fc(t,e){if(1&t&&(z.rc(0,"div",66),z.Ec(1,"async"),z.rc(2,"div",67),z.rc(3,"nz-row",68),z.rc(4,"nz-col",69),z.mc(5,"b2c-country-flag",65),z.rc(6,"span",70),z.qd(7),z.qc(),z.qc(),z.rc(8,"nz-col"),z.rc(9,"div",71),z.od(10,Ec,3,4,"nz-tag",72),z.od(11,Ac,3,4,"nz-tag",73),z.od(12,Pc,3,4,"nz-tag",74),z.qc(),z.qc(),z.qc(),z.rc(13,"div",75),z.qd(14),z.Ec(15,"titlecase"),z.Ec(16,"currencyFormat"),z.qc(),z.rc(17,"div",76),z.qd(18),z.qc(),z.rc(19,"div",77),z.rc(20,"nz-row",78),z.rc(21,"nz-col",79),z.qd(22),z.qc(),z.od(23,Rc,3,0,"nz-col",80),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc();z.Mc("ngClass",z.Sc(22,wc,z.Fc(1,15,t.isMobile$))),z.Ub(5),z.Mc("isLink",!1)("showName",!1),z.Ub(2),z.td("",(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.currencyCode)||t.transactionConstant.PAYMENT_CURRENCY_MYR," ",null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.fundName,""),z.Ub(3),z.Mc("ngIf","active"!==(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus)&&"terminated"!==(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus)),z.Ub(1),z.Mc("ngIf","active"===(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus)),z.Ub(1),z.Mc("ngIf","terminated"===(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus)),z.Ub(2),z.td(" ","bi-weekly"===(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.subscriptionFreq)?"Bi-Weekly":z.Fc(15,17,null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.subscriptionFreq)," RSP : ",z.Gc(16,19,null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspAmount,(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.currencyCode)||t.transactionConstant.PAYMENT_CURRENCY_MYR)," "),z.Ub(4),z.ud(" ",null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.paymentMethod," ","Y"===(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.isEmandate)?"e-Mandate":""," | ",null!=(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.bankAccountName)?null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.bankAccountName:"-"," "),z.Ub(4),z.sd(" Next RSP Date: ",null!=t.rspTrustAcctDetails&&t.rspTrustAcctDetails.nextRspDateDisplay?null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.nextRspDateDisplay:"N.A"," "),z.Ub(1),z.Mc("ngIf","terminated"!==(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus)&&"terminate-pending"!==(null==t.rspTrustAcctDetails?null:t.rspTrustAcctDetails.rspStatus))}}let Ic=(()=>{class t{constructor(t,e,n,i,c,o,s,a,r,l,d,u){this.store=t,this.transactionRestService=e,this.subHandlingService=n,this.cdRef=i,this.route=c,this.router=o,this.fb=s,this.renderer=a,this.nzNotificationService=r,this.transactionService=l,this.passportExpiryNotificationService=d,this.currencyFormatService=u,this.isTabSetItem=!1,this.noShowTabSet=!1,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.tabList=[],this.isLoading=!1,this.cartList=[],this.showViewCart=!1,this.showEmandatePage=!1,this.routeInitialize=!0,this.investmentCurrencyList=["MYR"],this.paymentMethodList=[],this.existingBankList=[],this.rspConvertedBankList=[],this.newBankList=[],this.rspConstants=Yt,this.transactionConstant=h.a,this.newDdaModelVisible=!1,this.selectedBank=null,this.trustIdList=[],this.importantNoteVisible=!1,this.isSubmitLoading=!1,this.productType="trustAccount",this.gotChanges=!1,this.isMobile=!1,this.fpxAvailable=!1,this.passportNoticeVisible=!1,this.subscribeRefnoChange(),this.subscribeMobileViewChange()}ngOnInit(){this.store.dispatch(new v.d({refno:this.refno,orderStatus:h.a.ORDER_PLACED})),this.resetFormBuy(),this.initRouteParam()}ngAfterViewInit(){this.tabList=["Unit Trust","ETFs","Managed Portfolio","Cash Account"],this.selectedIndex=3,setTimeout(()=>{const t=document.getElementsByClassName("ant-tabs-nav-animated");console.log(t),t.length>0&&(t[0].style.transform="translate3d(-250px, 0px, 0px)")},50)}subscribeRefnoChange(){this.subHandlingService.subscribe(this.refno$.pipe(Object(f.a)(t=>{this.refno=t,this.cdRef.markForCheck(),this.resetFormBuy(),this.showViewCart=!1,this.showEmandatePage=!1,this.getTrustAcctDetails(!1)})))}subscribeMobileViewChange(){this.subHandlingService.subscribe(this.isMobile$.pipe(Object(f.a)(t=>{this.isMobile=t})))}subscribeViewOrderCart(){this.orderCartList$=this.store.select(v.f.getCartListByProduct).pipe(Object(m.a)(t=>
1t(this.refno,this.productType))),this.subHandlingService.once(this.orderCartList$.pipe(Object(f.a)(t=>{t&&(this.cartList=t,this.cartList.forEach(t=>{this.buyInfo={amount:t.buyInfoModel.amount,bankCode:t.buyInfoModel.bankCode}}),this.cdRef.markForCheck(),this.gotChanges=!0)})))}initRouteParam(){this.routeInitialize&&this.route.queryParams.subscribe(t=>{t.refno&&(this.refno=t.refno,this.store.dispatch(new y.N(this.refno))),t.amount&&t.bankCode&&(this.buyInfo={amount:t.amount,bankCode:t.bankCode},this.gotChanges=!0),t.edit&&this.subscribeViewOrderCart(),this.routeInitialize=!1}),this.getTrustAcctDetails(!0)}changeDisplayEmandate(){this.showViewCart=!1,this.showEmandatePage=!this.showEmandatePage}changeViewCart(){this.showEmandatePage=!1,this.showViewCart=!this.showViewCart}backToMainRspPage(){this.router.navigate([M.o.APP,M.o.RSP])}patchDataToForm(){this.validateCashAccountForm.get("investmentAmount").patchValue(this.buyInfo.amount),this.onSelectedBank(this.buyInfo.bankCode.toString())}resetFormBuy(){const t=h.a.PAYMENT_CURRENCY_MYR;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(t),this.validateCashAccountForm=this.fb.group({investmentAmount:[100,[st.H.required,st.H.min(100),st.H.pattern(this.currencyFormatService.getInputPattern(t))]],paymentMethod:[{value:"FPX",disabled:!0},[st.H.required]],frequency:[{value:"monthly",disabled:!0},[st.H.required]],refno:[this.refno,[st.H.required]],currency:[{value:"MYR",disabled:!0},[st.H.required]],bank:[null,[st.H.required]]})}initializeRspDetails(t){return this.transactionRestService.getFundRspDetails("TRUST",this.formRefno?this.formRefno:this.refno).pipe(Object(f.a)(e=>{var n,i,c,o;if(e&&e.status===M.a.RESPONSE_SUCCESS&&(this.rspDetails=e.data,this.rspDetails)){this.investmentCurrencyList=this.rspDetails.currList,this.resetPaymentMethodList();const e=this.rspDetails.paymentMethod.FPX;e&&(this.existingBankList=e.existingList?e.existingList:[],this.rspConvertedBankList=this.existingBankList.map(t=>{var e;return{bankName:t.bankName,bankAccount:t.bankAcctNo,bankCode:null===(e=t.bankCode)||void 0===e?void 0:e.toString(),currency:"MYR",usedAmount:t.usedAmount.toString(),totalAmount:t.maxDdaAmount.toString()}}),this.newBankList=e.bankListModel?e.bankListModel:[]),this.selectedTrustId=null,(null===(i=null===(n=this.rspDetails)||void 0===n?void 0:n.paymentMethod)||void 0===i?void 0:i.trustIds)&&(null===(o=null===(c=this.rspDetails)||void 0===c?void 0:c.paymentMethod)||void 0===o?void 0:o.trustIds.length)>0?(this.trustIdList=this.rspDetails.paymentMethod.trustIds,this.selectedTrustId=this.trustIdList.find(t=>"MYR"===t.currency)):this.trustIdList.push({currency:"MYR"}),this.gotChanges&&t&&this.patchDataToForm()}}))}resetPaymentMethodList(){const t=this.rspDetails.paymentMethod.paymentList;this.paymentMethodList=[],this.fpxAvailable=!1,t&&t.forEach(t=>{t===this.rspConstants.PAYMENT_METHOD_FPX&&(this.fpxAvailable=!0,this.paymentMethodList.push({label:"FPX (e-Mandate)",value:t}))})}get paymentMethod(){return this.validateCashAccountForm.get("paymentMethod").value}get formRefno(){var t;return null===(t=this.validateCashAccountForm)||void 0===t?void 0:t.get("refno").value}acctRefnoChange(t){this.isLoading=!0,this.refno!==this.formRefno&&this.store.dispatch(new y.N(this.formRefno)),this.resetFormBuy()}onApplyNewDda(){let t=this.passportExpiryNotificationService.isPersonalAccountPassportExpired();const e=this.formRefno;let n=!1;e&&(n=this.passportExpiryNotificationService.checkPassportExpiredByAccount(e)),t||n?this.passportNoticeVisible=!0:this.newDdaModelVisible=!0}onCloseApplyNewDda(){this.newDdaModelVisible=!1}onCreateBank(t){const e=this.router.url.split("?");this.store.dispatch(new T.p(!0)),this.transactionService.setLastVisitedUrl(e[0]+"?refno="+this.formRefno+"&amount="+this.validateCashAccountForm.get("investmentAmount").value+"&bankCode="+t)}updateRspAmountMaxLimit(){var t,e;const n=(null===(e=null===(t=this.validateCashAccountForm)||void 0===t?void 0:t.get("currency"))||void 0===e?void 0:e.value)||h.a.PAYMENT_CURRENCY_MYR;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(n),this.selectedBank?this.validateCashAccountForm.get("investmentAmount").setValidators([st.H.min(100),st.H.max(this.selectedBank.availableAmou
1nt),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(n))]):this.validateCashAccountForm.get("investmentAmount").setValidators([st.H.min(100),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(n))]),this.validateCashAccountForm.get("investmentAmount").updateValueAndValidity()}onSelectedBank(t){const e=this.existingBankList.filter(e=>e.bankCode.toString()===(null==t?void 0:t.toString()));e.length>0&&(this.selectedBank=e[0],this.validateCashAccountForm.get("bank").patchValue(this.selectedBank),this.updateFormValidity("bank")),this.updateRspAmountMaxLimit()}updateFormValidity(t){if(t)this.validateCashAccountForm.controls[t].markAsDirty(),this.validateCashAccountForm.controls[t].updateValueAndValidity();else{if(this.validateCashAccountForm.controls)for(const t in this.validateCashAccountForm.controls)this.validateCashAccountForm.controls[t].markAsDirty(),this.validateCashAccountForm.controls[t].updateValueAndValidity();this.validateCashAccountForm.updateValueAndValidity()}}addToCart(){var t;let e;this.isSubmitLoading=!0,this.store.dispatch(new v.c("TRUST")),this.selectedBank?(e="Y"===this.selectedBank.isEmandate?"e-Mandate "+this.selectedBank.bankName:this.paymentMethod+" "+this.selectedBank.bankName,this.cartInfo={refno:this.formRefno,productType:"trustAccount",productName:"Cash Account",orderStatus:h.a.ADDED_TO_CART,displayTitle:e,buyInfoModel:{amount:this.validateCashAccountForm.get("investmentAmount").value,bankCode:this.selectedBank?this.selectedBank.bankCode:null,bankLimit:this.selectedBank?this.selectedBank.maxDdaAmount:null,bankAcctNo:null,bankAcctName:null,fpxBankId:null,paymentId:null===(t=this.selectedBank)||void 0===t?void 0:t.ddaId,currency:this.validateCashAccountForm.get("currency").value,investmentType:"rsp",paymentMethod:this.paymentMethod,paymentMode:this.paymentMethod,sedolNumber:"TRUST",salesCharge:0,subscriptionFreq:this.validateCashAccountForm.get("frequency").value,frequencyDisplay:this.rspConstants.FREQUENCY_LIST.find(t=>t.value===this.validateCashAccountForm.get("frequency").value).label}},this.subHandlingService.once(this.transactionRestService.validateRSPBuy(this.formRefno).pipe(Object(f.a)(t=>{t.status!==M.a.RESPONSE_FAILED?(this.store.dispatch(new v.a(this.cartInfo)),this.isSubmitLoading=!1,this.isMobile?this.changeViewCart():this.router.navigate([M.o.APP,M.o.RSP,M.o.CHECK_OUT],{queryParams:{productType:"trustAccount"}})):this.validateCashAccountForm.get("refno").setErrors({invalidBuy:t.errorMessage})})))):this.nzNotificationService.error("Error","Please choose a bank.")}submitTransaction(){let t=this.passportExpiryNotificationService.isPersonalAccountPassportExpired();const e=this.formRefno;let n=!1;e&&(n=this.passportExpiryNotificationService.checkPassportExpiredByAccount(e)),t||n?this.passportNoticeVisible=!0:(this.updateFormValidity(),"VALID"===this.validateCashAccountForm.status&&(this.refno!==this.formRefno&&this.store.dispatch(new y.N(this.formRefno)),this.addToCart()))}backToEdit(){this.showViewCart=!1}getTrustAcctDetails(t){this.isLoading=!0,Object(p.a)([this.initializeRspDetails(t),this.getTrustAcctRspDetails()]).pipe(Object(f.a)(()=>{this.isLoading=!1})).subscribe()}getTrustAcctRspDetails(){return this.transactionRestService.getTrustAcctRspDetails(this.formRefno?this.formRefno:this.refno).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.rspTrustAcctDetails=t.data)}))}onClickEdit(){this.router.navigate([M.o.APP,M.o.RSP,M.o.RSP_LIST],{queryParams:{refno:this.rspTrustAcctDetails.refno,rspId:this.rspTrustAcctDetails.rspId}})}chgSelectedTab(t){this.selectedIndex=t,console.log("SELECTED INDEX: ",this.selectedIndex)}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(lt.a),z.lc(C.a),z.lc(z.j),z.lc(q.a),z.lc(q.e),z.lc(st.g),z.lc(z.Q),z.lc(St.b),z.lc(sn.a),z.lc(Fi.a),z.lc(Ii.a))},t.\u0275cmp=z.fc({type:t,selectors:[["app-cash-acct-rsp-list"]],inputs:{isTabSetItem:"isTabSetItem",noShowTabSet:"noShowTabSet"},features:[z.Tb([C.a])],decls:12,vars:12,consts:[[4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ngStyle",4,"ngIf"],["trustAcctTemplate",""],["trustAcctRspDetails",""],[3,"modalVisible","isPopUp","footerFunc","onOkEmit","onUpdateEmit"],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[3,"title","back"],["nz-row","","class","px-2 py-3 bg-white",4,"ngIf"],["nz-row","",1,"px-2","py-3","bg-white"],[3,"showCollape","expendAllEmandate","refno","displayType"],[3,"ngClass"],["nz-row",""],["nz-row","",1,"px-2","pb-3","text-right","bg-white"],[1,"text-base","font-weight-bold","py-1","mb-3",3,"click"],[3,"nzSelectedIndex","nzSelectedIndexChange",4,"ngIf"],[3,"ngSwitch"],[3,"isTabSetItem","noShowTabSet",4,"ngSwitchCase"],[3,"nzLoading"],[3,"ngClass",4,"ngIf","ngIfElse"],[3,"nzSelectedIndex","nzSelectedIndexChange"],[3,"nzTitle",4,"ngFor","ngForOf"],[3,"nzTitle"],[3,"isTabSetItem","noShowTabSet"],[1,"mt-1","mb-2"],[1,"mb-2",3,"ngClass"],["nz-form","","class","text-base",3,"formGroup",4,"ngIf"],["nz-form","",1,"text-base",3,"formGroup"],["nzType","flex","nzAlign","middle",1,"py-3"],[3,"nzSpan"],[1,"mb-0"],["formControlName","refno",1,"w-100",3,"nzDropdownMatchSelectWidth","nzDisabled","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["class","text-danger text-left",4,"ngIf"],["nzType","flex","nzAlign","middle",1,"pb-3"],["formControlName","currency",1,"w-100",3,"nzDropdownMatchSelectWidth","nzCustomTemplate"],["type","number","ui-input","","formControlName","investmentAmount"],[1,"text-danger","text-left"],["formControlName","frequency",1,"w-100",3,"nzDropdownMatchSelectWidth"],["formControlName","paymentMethod",1,"w-100"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between","class","mt-3",4,"ngIf"],["nz-col","","nzSpan","24","class","text-warning text-sm",4,"ngIf"],[1,"pt-3","text-right"],["nz-button","",3,"nzType","nzLoading","disabled","click"],[3,"nzLabel","nzValue"],[3,"nzValue","nzLabel"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between",1,"mt-3"],["nz-col","",1,"text-base","font-weight-bold"],["nz-col","","nzSpan","24","class","text-black-5 text-base text-center pt-3 pb-2",4,"ngIf"],["nz-col","",1,"text-base","font-weight-bold","text-center",3,"nzSpan"],[3,"click"],["nz-row","",1,"w-100","my-3","infinite-container"],[3,"type","listContent","radioValue","radioEvent"],["nz-col","","nzSpan","24",1,"text-black-5","text-base","text-center","pt-3","pb-2"],["nz-col","","nzSpan","24",1,"text-warning","text-sm"],["nz-icon","","nzType","info-circle","nzTheme","fill"],["class","fixed-bottom bg-white w-100 p-3","style","z-index:1031",4,"ngIf"],[3,"productType","refno","editBtnClicked",4,"ngIf"],[1,"fixed-bottom","bg-white","w-100","p-3",2,"z-index","1031"],["nz-button","","nzBlock","",1,"font-weight-bold",3,"nzType","nzLoading","disabled","click"],[3,"productType","refno","editBtnClicked"],[3,"ngStyle"],[3,"refno","visible","bankList","visibleChange","bankDetail"],["country","Malaysia",1,"d-inline-block","px-1",3,"isLink","
1showName"],[1,"col-lg-6",3,"ngClass"],[1,"p-2","px-2","border","rounded","bg-white"],[1,"py-3"],["nzSpan","19",1,"text-left"],[1,"font-weight-bold"],["nzSpan","5",1,"text-right"],["class","border tag-pending-processing m-0",3,"nzColor",4,"ngIf"],["class","border tag-received m-0",3,"nzColor",4,"ngIf"],["class","border tag-terminated m-0",3,"nzColor",4,"ngIf"],[1,"font-weight-bold","text-sm","mb-4"],[1,"text-xs","mb-2"],[1,"pb-3"],["nzAlign","middle","nzType","flex"],["nzSpan","18",1,"text-xs"],["nzSpan","6","class","text-right text-sm",4,"ngIf"],[1,"border","tag-pending-processing","m-0",3,"nzColor"],[1,"border","tag-received","m-0",3,"nzColor"],[1,"border","tag-terminated","m-0",3,"nzColor"],["nzSpan","6",1,"text-right","text-sm"],[1,"font-weight-bold",3,"click"]],template:function(t,e){1&t&&(z.od(0,Li,4,3,"app-mobile-scaffold",0),z.od(1,Vi,3,2,"app-mobile-scaffold",0),z.od(2,gc,10,15,"div",1),z.Ec(3,"async"),z.Ec(4,"async"),z.od(5,Cc,3,2,"app-mobile-scaffold",0),z.od(6,Dc,3,8,"div",2),z.od(7,qc,3,3,"ng-template",null,3,z.pd),z.od(9,Fc,24,24,"ng-template",null,4,z.pd),z.rc(11,"passport-expiry-notification",5),z.zc("onOkEmit",(function(){return e.passportNoticeVisible=!1}))("onUpdateEmit",(function(){return e.passportNoticeVisible=!1})),z.qc()),2&t&&(z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!z.Fc(3,8,e.isMobile$)||z.Fc(4,10,e.isMobile$)&&!e.newDdaModelVisible&&!e.showEmandatePage&&!e.showViewCart),z.Ub(3),z.Mc("ngIf",3===e.selectedIndex),z.Ub(1),z.Mc("ngIf",e.newDdaModelVisible),z.Ub(5),z.Mc("modalVisible",e.passportNoticeVisible)("isPopUp",!1)("footerFunc",!0))},styles:[".infinite-container[_ngcontent-%COMP%]{max-height:600px;overflow-y:auto;overflow-x:hidden}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(y.X.getSelectedRefno)],t.prototype,"refno$",void 0),Object(d.c)([Object(l.e)(T.a.getAccounts)],t.prototype,"acctList$",void 0),t})();var Uc=n("zAKX"),Oc=n("PTRe"),xc=n("Jioy"),Lc=n("8fFf"),kc=n("OtHt"),Nc=n("81tN");function _c(t,e){if(1&t&&(z.rc(0,"div",11),z.mc(1,"img",12),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("src",t.transactionImgPath+"rebalancing-icon.svg",z.gd)}}function Bc(t,e){if(1&t&&(z.rc(0,"div",11),z.mc(1,"img",13),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("src",t.transactionImgPath+"epf-approved-fund.svg",z.gd)}}function Vc(t,e){if(1&t&&(z.rc(0,"div",11),z.mc(1,"img",14),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("src",t.transactionImgPath+"recommended-fund.svg",z.gd)}}function Yc(t,e){if(1&t&&(z.rc(0,"div",11),z.mc(1,"img",15),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("src",t.transactionImgPath+"islamic-fund.svg",z.gd)}}function Hc(t,e){if(1&t&&(z.rc(0,"div",11),z.mc(1,"img",16),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("src",t.transactionImgPath+"wholesale-fund.svg",z.gd)}}function jc(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",6),z.rc(2,"span",7),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.onClickProductName(e.productCode)})),z.mc(3,"span",8),z.od(4,_c,2,1,"div",9),z.od(5,Bc,2,1,"div",9),z.od(6,Vc,2,1,"div",9),z.od(7,Yc,2,1,"div",9),z.od(8,Hc,2,1,"div",9),z.qc(),z.qc(),z.rc(9,"div",10),z.mc(10,"span",8),z.qc(),z.oc()}if(2&t){const t=z.Dc();z.Ub(3),z.Mc("innerHTML",t.productName,z.ed),z.Ub(1),z.Mc("ngIf","Y"===(null==t.specialLogoType?null:t.specialLogoType.rebalancingFlag)),z.Ub(1),z.Mc("ngIf","Y"===(null==t.specialLogoType?null:t.specialLogoType.epfApproved)),z.Ub(1),z.Mc("ngIf","Y"===(null==t.specialLogoType?null:t.specialLogoType.recommendedFund)),z.Ub(1),z.Mc("ngIf","Y"===(null==t.specialLogoType?null:t.specialLogoType.syariahEpf)),z.Ub(1),z.Mc("ngIf","restricted"===(null==t.specialLogoType?null:t.specialLogoType.fundType)),z.Ub(2),z.Mc("innerHTML",t.subProductName,z.ed)}}function $c(t,e){if(1&t&&z.mc(0,"img",24),2&t){const t=z.Dc(2);z.Mc("src",t.FOCUS_LIST_ICON,z.gd)}}const Gc=function(t){return{"pb-2":t}};function Wc(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",17),z.Ec(2,"async"),z.rc(3,"div",18),z.zc("click",(function(){z.dd(t);const e=z.Dc();
1return e.onClickProductName(e.productCode,e.exchange)})),z.rc(4,"div",19),z.rc(5,"div",20),z.mc(6,"span",8),z.mc(7,"br"),z.rc(8,"div",21),z.mc(9,"app-stock-exchange-tag",22),z.mc(10,"span",8),z.qc(),z.qc(),z.od(11,$c,1,1,"img",23),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc();z.Ub(1),z.Mc("ngClass",z.Sc(7,Gc,z.Fc(2,5,t.isMobile$))),z.Ub(5),z.Mc("innerHTML",t.productName,z.ed),z.Ub(3),z.Mc("exchange",t.exchange),z.Ub(1),z.Mc("innerHTML",t.subProductName,z.ed),z.Ub(1),z.Mc("ngIf","Y"===t.focusList)}}function Xc(t,e){if(1&t&&(z.rc(0,"div",25),z.rc(1,"div",26),z.qd(2),z.qc(),z.rc(3,"div",6),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(2),z.rd(t.title1),z.Ub(2),z.rd(t.desc1)}}function Kc(t,e){if(1&t&&(z.rc(0,"div",25),z.rc(1,"div",26),z.qd(2),z.qc(),z.rc(3,"div",6),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(2),z.rd(t.title2),z.Ub(2),z.rd(t.desc2)}}function Jc(t,e){if(1&t&&(z.rc(0,"div",25),z.rc(1,"div",26),z.qd(2),z.qc(),z.rc(3,"div",6),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(2),z.rd(t.title3),z.Ub(2),z.rd(t.desc3)}}function Zc(t,e){if(1&t&&(z.rc(0,"div",25),z.rc(1,"div",26),z.qd(2),z.qc(),z.rc(3,"div",6),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(2),z.rd(t.title4),z.Ub(2),z.rd(t.desc4)}}function Qc(t,e){if(1&t){const t=z.sc();z.rc(0,"div",27),z.rc(1,"button",28),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.onClickBtnAction(e.productCode,e.exchange)})),z.qd(2),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Ub(2),z.rd(t.btmLabel)}}function to(t,e){1&t&&z.mc(0,"i",33)}function eo(t,e){if(1&t){const t=z.sc();z.rc(0,"i",34),z.zc("click",(function(){z.dd(t);const e=z.Dc(2);return e.onClickBtnAction(e.productCode,e.exchange)})),z.qc()}}function no(t,e){1&t&&z.mc(0,"i",35)}function io(t,e){if(1&t&&(z.rc(0,"div",29),z.od(1,to,1,0,"i",30),z.od(2,eo,1,0,"i",31),z.od(3,no,1,0,"i",32),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.addedToCart&&!t.gotActiveRsp),z.Ub(1),z.Mc("ngIf",!t.addedToCart&&!t.gotActiveRsp),z.Ub(1),z.Mc("ngIf",t.gotActiveRsp)}}let co=(()=>{class t{constructor(){this.showBtn=!1,this.showAddToCart=!1,this.addedToCart=!1,this.btmLabel="Buy",this.isEtf=!1,this.gotActiveRsp=!1,this.selectedProductCode=new z.s,this.selectedEtf=new z.s,this.factsheetRedirectionForEtf=new z.s,this.factsheetRedirection=new z.s,this.sizeProductName=24,this.titleSize=4,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.FOCUS_LIST_ICON=M.g.ETFS_FOCUS_LIST+"etf-focus-list-icon.svg"}ngOnChanges(t){this.sizeProductName=24-(this.title1?4:0)-(this.title2?4:0)-(this.title3?4:0)-(this.title4?4:0)-(this.showBtn?4:0)-(this.showAddToCart?2:0),this.sizeProductName<4&&(this.sizeProductName=4)}ngOnInit(){}onClickBtnAction(t,e){this.isEtf?this.selectedEtf.emit({stockCode:t,exchange:e}):this.selectedProductCode.emit(t)}onClickProductName(t,e){this.isEtf?this.factsheetRedirectionForEtf.emit({stockCode:t,exchange:e}):this.factsheetRedirection.emit(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=z.fc({type:t,selectors:[["product-info"]],inputs:{productName:"productName",subProductName:"subProductName",specialLogoType:"specialLogoType",title1:"title1",title2:"title2",title3:"title3",title4:"title4",desc1:"desc1",desc2:"desc2",desc3:"desc3",desc4:"desc4",productCode:"productCode",showBtn:"showBtn",showAddToCart:"showAddToCart",addedToCart:"addedToCart",btmLabel:"btmLabel",clickWholeBar:"clickWholeBar",isEtf:"isEtf",exchange:"exchange",focusList:"focusList",gotActiveRsp:"gotActiveRsp"},outputs:{selectedProductCode:"selectedProductCode",selectedEtf:"selectedEtf",factsheetRedirectionForEtf:"factsheetRedirectionForEtf",factsheetRedirection:"factsheetRedirection"},features:[z.Sb],decls:10,vars:9,consts:[["nz-row","","nzType","flex","nzGutter","20","nzJustify","space-between","nzAlign","middle",1,"my-2","product-background","p-3","mx-0",3,"click"],["nz-col","","nzXs","24",3,"nzLg"],[4,"ngIf"],["nz-col","","nzLg","4",4,"ngIf"],["nz-col","","nzLg","4","class","text-right",4,"ngIf"],["nz-col","","nzLg","2","class","text-right",4,"ngIf"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-sm","font-weight-bold"],[1,"fund-logo-container","product-factsheet-link",3,"click"],[3,"innerHTML"],["class","fund-logo d-inline-block mx-1",4,"ngIf"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-xs"],[1,"fund-logo","d-inline-block","mx-1"],["alt","rebalancing icon",1,"h-100",3,"src"],["alt","epf approved fund icon",1,"h-100",3,"src"],["alt","recommended fund icon",1,"h-100",3,"src"],["alt","islamic fund icon",1,"h-100",3,"src"],["alt","wholesale fund icon",1,"h-100",3,"src"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-sm","font-weight-bold",3,"ngClass"],[1,"flex-grow-1","fund-logo-container","product-factsheet-link",3,"click"],[1,"d-flex"],[1,"text-sm"],[1,"mt-1"],[3,"exchange"],["nzTooltipTitle","ETF Focus","nzTooltipPlacement","top","nz-tooltip","","alt","focus-list","class","px-1",3,"src",4,"ngIf"],["nzTooltipTitle","ETF Focus","nzTooltipPlacement","top","nz-tooltip","","alt","focus-list",1,"px-1",3,"src"],["nz-col","","nzLg","4"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-sm"],["nz-col","","nzLg","4",1,"text-right"],["nz-button","","nzType","outline","nzSize","small",1,"ant-btn","ant-btn-outline",3,"click"],["nz-col","","nzLg","2",1,"text-right"],["nz-icon","","nzType","plus-circle","nzTheme","fill","class","pointer pt-1 text-lg text-info","nz-tooltip","Added To Cart",4,"ngIf"],["nz-icon","","nzType","plus-circle","nzTheme","fill","class","pointer pt-1 text-lg text-black-4","nz-tooltip","Add To Cart",3,"click",4,"ngIf"],["nz-icon","","nzType","plus-circle","nzTheme","fill","class","pointer pt-1 text-lg text-black-4","nz-tooltip","You already have existing active RSP. You may amend from RSP list",4,"ngIf"],["nz-icon","","nzType","plus-circle","nzTheme","fill","nz-tooltip","Added To Cart",1,"pointer","pt-1","text-lg","text-info"],["nz-icon","","nzType","plus-circle","nzTheme","fill","nz-tooltip","Add To Cart",1,"pointer","pt-1","text-lg","text-black-4",3,"click"],["nz-icon","","nzType","plus-circle","nzTheme","fill","nz-tooltip","You already have existing active RSP. You may amend from RSP list",1,"pointer","pt-1","text-lg","text-black-4"]],template:function(t,e){1&t&&(z.rc(0,"div",0),z.zc("click",(function(){return!e.addedToCart&&e.clickWholeBar?e.onClickBtnAction(e.productC
1ode,e.exchange):""})),z.rc(1,"div",1),z.od(2,jc,11,7,"ng-container",2),z.od(3,Wc,12,9,"ng-container",2),z.qc(),z.od(4,Xc,5,2,"div",3),z.od(5,Kc,5,2,"div",3),z.od(6,Jc,5,2,"div",3),z.od(7,Zc,5,2,"div",3),z.od(8,Qc,3,1,"div",4),z.od(9,io,4,3,"div",5),z.qc()),2&t&&(z.Ub(1),z.Mc("nzLg",e.sizeProductName),z.Ub(1),z.Mc("ngIf",!e.isEtf),z.Ub(1),z.Mc("ngIf",e.isEtf),z.Ub(1),z.Mc("ngIf",e.title1),z.Ub(1),z.Mc("ngIf",e.title2),z.Ub(1),z.Mc("ngIf",e.title3),z.Ub(1),z.Mc("ngIf",e.title4),z.Ub(1),z.Mc("ngIf",e.showBtn),z.Ub(1),z.Mc("ngIf",e.showAddToCart))},directives:[V.c,V.a,P.t,P.q,Nc.a,jt.e,Y.a,mt.b],pipes:[P.b],styles:[".product-background[_ngcontent-%COMP%]{background-color:#f5f8f9}.product-factsheet-link[_ngcontent-%COMP%]{cursor:pointer}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();var oo=n("IzEk"),so=n("YYIx"),ao=n("bMUq"),ro=n("k+8e"),lo=n("1W/n"),uo=n("UYE6"),po=n("yPVp"),ho=n("5zlO"),fo=n("j2hF"),mo=n("/spw");function bo(t,e){if(1&t){const t=z.sc();z.rc(0,"app-web-scaffold"),z.rc(1,"nz-modal",12),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc().closeRspDetails()})),z.mc(2,"nz-skeleton",13),z.nc(3,14),z.qc(),z.qc()}if(2&t){const t=z.Dc(),e=z.ad(5);z.Ub(1),z.Mc("nzVisible",t.visible)("nzClosable",!0)("nzTitle",null)("nzWidth",600)("nzFooter",null)("nzWrapClassName","custom-scrollable-modal"),z.Ub(1),z.Mc("nzLoading",t.isLoadingInitial),z.Ub(1),z.Mc("ngTemplateOutlet",e)}}function go(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",16),z.rc(2,"b2c-app-bar-2",17),z.zc("back",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qc(),z.qc(),z.nc(3,14),z.oc()}if(2&t){z.Dc(2);const t=z.ad(5);z.Ub(2),z.Mc("title","Order Cart"),z.Ub(1),z.Mc("ngTemplateOutlet",t)}}const yo=function(){return{rows:5}};function Mo(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.mc(1,"nz-skeleton",15),z.od(2,go,4,2,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("nzLoading",t.isLoadingInitial)("nzParagraph",z.Rc(3,yo)),z.Ub(1),z.Mc("ngIf",t.visible)}}function vo(t,e){1&t&&z.mc(0,"i",34),2&t&&z.Mc("nzOverlayClassName","")}function Co(t,e){1&t&&z.mc(0,"i",35),2&t&&z.Mc("nzOverlayClassName","")}function To(t,e){1&t&&z.nc(0)}function So(t,e){if(1&t&&(z.rc(0,"div",23),z.rc(1,"div",36),z.rc(2,"div",37),z.qd(3,"Documents"),z.qc(),z.rc(4,"div",38),z.od(5,To,1,0,"ng-container",39),z.qc(),z.qc(),z.qc()),2&t){z.Dc(2);const t=z.ad(8);z.Ub(5),z.Mc("ngTemplateOutlet",t)}}function Do(t,e){1&t&&z.nc(0)}function zo(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,Do,1,0,"ng-container",39),z.qc()),2&t){z.Dc(2);const t=z.ad(10);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function qo(t,e){if(1&t&&z.mc(0,"ui-option",65),2&t){const t=e.$implicit;z.Mc("nzLabel",t.accountTypeDisplay)("nzValue",t.refno)}}function Eo(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," Please choose an account. "),z.qc())}function Ao(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," You do not have the fund in your holdings. "),z.qc())}function Po(t,e){if(1&t&&z.mc(0,"ui-option",65),2&t){const t=e.$implicit;z.Mc("nzLabel",t)("nzValue",t)}}function Ro(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," Please make sure this field is not blank. "),z.qc())}function wo(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function Fo(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" Amount must be greater than ",null==t.selectedFund?null:t.selectedFund.minRspNum," ")}}function Io(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" Amount accept up to ",t.rspAmountDecimalPlaces," decimal place. ")}}function Uo(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" The available amount is ",null==t.selectedBank?null:t.selectedBank.availableAmount," ")}}function Oo(t,e){if(1&t&&z.mc(0,"ui-option",66),2&t){const t=e.$implicit;z.Mc("nzValue",t.value)("nzLabel",t.label)}}function xo(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," Please make sure this field is not blank. "),z.qc())}function Lo(t,e){if(1&t&&z.mc(0,"ui-option",66),2&t){const t=e.$implicit;z.Mc("nzValue",t.value)("nzLabel",t.label)}}function ko(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," Please make sure this field is not blank. "),z.qc())}function No(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"We are processing the RSP transaction today. Any Applications, Termination or change in RSP Amount request will not able to process currently. Please submit your request on next business day."),z.qc())}function _o(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"RSP Applications, Termination or change in RSP Amount instructions are not accepted from 0000 hrs to 0600 hrs on every 26th calendar day of each month, please try again later."),z.qc())}function Bo(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"We are processing the RSP transactions today. Any applications, terminations or changes to the RSP amount cannot be accepted at this time. Please submit your request on the next day."),z.qc())}function Vo(t,e){if(1&t&&(z.rc(0,"div",67),z.Ec(1,"async"),z.rc(2,"nz-row",68),z.rc(3,"nz-col",69),z.mc(4,"i",70),z.qc(),z.rc(5,"nz-col",71),z.od(6,No,2,0,"span",0),z.od(7,_o,2,0,"span",0),z.od(8,Bo,2,0,"span",0),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Fc(1,4,t.isMobile$)?"mb-2":"mt-2"),z.Ub(6),z.Mc("ngIf","weekly"===t.frequency||"bi-weekly"===t.frequency),z.Ub(1),z.Mc("ngIf","monthly"===t.frequency&&t.paymentMethod===t.rspConstants.PAYMENT_METHOD_SALARY_ACCT),z.Ub(1),z.Mc("ngIf","monthly"===t.frequency&&t.paymentMethod!==t.rspConstants.PAYMENT_METHOD_SALARY_ACCT)}}function Yo(t,e){if(1&t&&(z.rc(0,"div",51),z.Ec(1,"async"),z.rc(2,"ui-input-group",72),z.mc(3,"input",73),z.qc(),z.qc()),2&t){const t=z.Dc(3);
1z.Mc("ngClass",z.Fc(1,1,t.isMobile$)?"":"mt-2")}}const Ho=function(){return["/app/rsp/create-rsp/cash-acct-rsp"]};function jo(t,e){if(1&t&&(z.rc(0,"div",74),z.Ec(1,"async"),z.rc(2,"nz-row",68),z.rc(3,"nz-col",69),z.mc(4,"i",75),z.qc(),z.rc(5,"nz-col",71),z.rc(6,"span"),z.qd(7,"You can now automate "),z.rc(8,"a",76),z.qd(9,"MYR Cash Account top-up with RSP"),z.qc(),z.qd(10,"; no more missed deductions!"),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Fc(1,2,t.isMobile$)?"mb-2":"mt-2"),z.Ub(8),z.Mc("routerLink",z.Rc(4,Ho))}}function $o(t,e){1&t&&(z.rc(0,"div",84),z.qd(1,"Looks like you do not have a FPX e-Mandate Account"),z.qc())}function Go(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," Please choose at least one bank to complete your RSP application "),z.qc())}function Wo(t,e){if(1&t){const t=z.sc();z.rc(0,"div",77),z.rc(1,"div",78),z.qd(2,"Select Your e-Mandate"),z.qc(),z.od(3,$o,2,0,"div",79),z.rc(4,"div",80),z.rc(5,"a",81),z.zc("click",(function(){return z.dd(t),z.Dc(3).onApplyNewDda()})),z.qd(6,"Apply New e-Mandate"),z.qc(),z.qc(),z.rc(7,"div",82),z.rc(8,"b2c-rsp",83),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(3).onSelectedBank(e)})),z.qc(),z.qc(),z.od(9,Go,2,0,"div",47),z.qc()}if(2&t){const t=z.Dc(3);var n=null;const e=(null==(n=t.rspBuyForm.get("bank"))?null:n.dirty)&&(null==(n=t.rspBuyForm.get("bank"))?null:n.hasError("required"));z.Ub(3),z.Mc("ngIf",0===t.rspConvertedBankList.length),z.Ub(1),z.Mc("nzSpan",0===t.rspConvertedBankList.length?24:""),z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString()),z.Ub(1),z.Mc("ngIf",e)}}function Xo(t,e){1&t&&(z.rc(0,"div",56),z.qd(1," Please choose at least one bank to complete your RSP application "),z.qc())}function Ko(t,e){if(1&t){const t=z.sc();z.rc(0,"div",77),z.rc(1,"div",78),z.qd(2,"Select Your DDA"),z.qc(),z.rc(3,"div",82),z.rc(4,"b2c-rsp",83),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(3).onSelectedBank(e)})),z.qc(),z.qc(),z.od(5,Xo,2,0,"div",47),z.qc()}if(2&t){const t=z.Dc(3);var n=null;const e=(null==(n=t.rspBuyForm.get("bank"))?null:n.dirty)&&(null==(n=t.rspBuyForm.get("bank"))?null:n.hasError("required"));z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString()),z.Ub(1),z.Mc("ngIf",e)}}function Jo(t,e){if(1&t){const t=z.sc();z.rc(0,"form",40),z.rc(1,"div",41),z.rc(2,"div",42),z.qd(3,"Select Investment Account"),z.qc(),z.rc(4,"div",43),z.rc(5,"div",44),z.rc(6,"ui-select",45),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).acctRefnoChange()})),z.Ec(7,"async"),z.od(8,qo,1,2,"ui-option",46),z.Ec(9,"async"),z.qc(),z.od(10,Eo,2,0,"div",47),z.od(11,Ao,2,0,"div",47),z.qc(),z.qc(),z.qc(),z.rc(12,"div"),z.rc(13,"p",48),z.qd(14,"Enter RSP Details"),z.qc(),z.rc(15,"div",49),z.rc(16,"div",50),z.rc(17,"div",51),z.Ec(18,"async"),z.rc(19,"ui-select",52),z.od(20,Po,1,2,"ui-option",46),z.qc(),z.od(21,Ro,2,0,"div",47),z.qc(),z.qc(),z.rc(22,"div",53),z.rc(23,"ui-input-group",54),z.mc(24,"input",55),z.qc(),z.rc(25,"div",56),z.od(26,wo,2,0,"ng-container",0),z.od(27,Fo,2,1,"ng-container",0),z.od(28,Io,2,1,"ng-container",0),z.od(29,Uo,2,1,"ng-container",0),z.qc(),z.qc(),z.qc(),z.rc(30,"div",43),z.rc(31,"div",57),z.rc(32,"div",51),z.Ec(33,"async"),z.rc(34,"ui-select",58),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(2).selectedPaymentMethod=e}))("ngModelChange",(function(e){z.dd(t);const n=z.Dc(2);var i;return n.onChangePaymentMethod(e,null!=(i=n.rspBuyForm.get("bank"))&&null!=i.value&&i.value.bankCode?n.rspBuyForm.get("bank").value.bankCode:"new")})),z.od(35,Oo,1,2,"ui-option",59),z.qc(),z.od(36,xo,2,0,"div",47),z.qc(),z.qc(),z.rc(37,"div",57),z.rc(38,"div",51),z.Ec(39,"async"),z.rc(40,"ui-select",60),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).onChangeFrequency()})),z.od(41,Lo,1,2,"ui-option",59),z.qc(),z.od(42,ko,2,0,"div",47),z.qc(),z.qc(),z.qc(),z.od(43,Vo,9,6,"div",61),z.od(44,Yo,4,3,"div",62),z.od(45,jo,11,5,"div",63),z.od(46,Wo,10,6,"div",64),z.od(47,Ko,6,4,"div",64),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);var n;const e=(null==(n=z.Fc(7,26,t.acctList$))?null:n.length)<=1;var i=null;const p=(null==(i=t.rspBuyForm.get("refno"))?null:i.dirty)&&(null==(i=t.rspBuyForm.get("refno"))?null:i.hasError("required"));var c=null;const h=(null==(c=t.rspBuyForm.get("refno"))?null:c.dirty)&&(null==(c=t.rspBuyForm.get("refno"))?null:c.hasError("acctValidator"));var o=null;const f=(null==(o=t.rspBuyForm.get("investmentCurrency"))?null:o.dirty)&&(null==(o=t.rspBuyForm.get("investmentCurrency"))?null:o.hasError("required"));var s=null;const m=(null==(s=t.rspBuyForm.get("investmentAmount"))?null:s.dirty)&&(null==(s=t.rspBuyForm.get("investmentAmount"))?null:s.hasError("required"));var a=null;const b=(null==(a=t.rspBuyForm.get("investmentAmount"))?null:a.dirty)&&(null==(a=t.rspBuyForm.get("investmentAmount"))?null:a.hasError("min"));var r=null;const g=(null==(r=t.rspBuyForm.get("investmentAmount"))?null:r.dirty)&&(null==(r=t.rspBuyForm.get("investmentAmount"))?null:r.hasError("pattern"));var l=null;const y=(null==(l=t.rspBuyForm.get("investmentAmount"))?null:l.dirty)&&(null==(l=t.rspBuyForm.get("investmentAmount"))?null:l.hasError("max"));var d=null;const M=(null==(d=t.rspBuyForm.get("paymentMethod"))?null:d.dirty)&&(null==(d=t.rspBuyForm.get("paymentMethod"))?null:d.hasError("required"));var u=null;const v=(null==(u=t.rspBuyForm.get("frequency"))?null:u.dirty)&&(null==(u=t.rspBuyForm.get("frequency"))?null:u.hasError("required"));z.Mc("formGroup",t.rspBuyForm),z.Ub(6),z.Mc("nzDropdownMatchSelectWidth",!1)("nzDisabled",e),z.Ub(2),z.Mc("ngForOf",z.Fc(9,28,t.acctList$)),z.Ub(2),z.Mc("ngIf",p),z.Ub(1),z.Mc("ngIf",h),z.Ub(6),z.Mc("ngClass",z.Fc(18,30,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzDisabled",(null==t.investmentCurrencyList?null:t.investmentCurrencyList.length)<=1),z.Ub(1),z.Mc("ngForOf",t.investmentCurrencyList),z.Ub(1),z.Mc("ngIf",f),z.Ub(5),z.Mc("ngIf",m),z.Ub(1),z.Mc("ngIf",b),z.Ub(1),z.Mc("ngIf",g),z.Ub(1),z.Mc("ngIf",y),z.Ub(3),z.Mc("ngClass",z.Fc(33,32,t.isMobile$)?"mb-2":"mr-2"),z.Ub(2),z.Mc("ngModel",t.selectedPaymentMethod),z.Ub(1),z.Mc("ngForOf",t.paymentMethodList),z.Ub(1),z.Mc("ngIf",M),z.Ub(2),z.Mc("ngClass",z.Fc(39,34,t.isMobile$)?"mb-2":""),z.Ub(3),z.Mc("ngForOf",t.rspConstants.FREQUENCY_LIST),z.Ub(1),z.Mc("ngIf",v),z.Ub(1),z.Mc("ngIf",t.freezePeriodError),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_CMF||t.paymentMethod===t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT),z.Ub(1),z.Mc("ngIf",t.showTopUpStatement&&t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT===t.selectedPaymentMethod),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_FPX),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_DDA)}}function Zo(t,e){if(1&t&&(z.rc(0,"div",91),z.mc(1,"i",92),z.qd(2),z.qc()),2&t){const t=z.Dc(3);z.Ub(2),z.sd(" ",t.rspBuyForm.getError("invalidBuy")," ")}}function Qo(t,e){if(1&t&&(z.rc(0,"div",91),z.mc(1,"i",92),z.qd(2),z.qc()),2&t){const t=z.Dc(3);z.Ub(2),z.sd(" ",t.rspBuyForm.getError("invalidBuy")," ")}}function ts(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-web-scaffold"),z.rc(2,"div",85),z.od(3,Zo,3,1,"div",86),z.rc(4,"button",87),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qd(5,"Cancel"),z.qc(),z.rc(6,"button",88),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(7,"Add To Cart"),z.qc(),z.qc(),z.qc(),z.rc(8,"app-mobile-scaffold"),z.rc(9,"b2c-floating-bar"),z.od(10,Qo,3,1,"div",86),z.rc(11,"button",89),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qd(12,"Cancel"),z.qc(),z.rc(13,"button",90),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(14,"Add To Cart"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);z.Ub(3),z.Mc("ngIf",null==t.rspBuyForm?null:t.rspBuyForm.hasError("invalidBuy")),z.Ub(3),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError),z.Ub(4),z.Mc("ngIf",null==t.rspBuyForm?null:t.rspBuyForm.hasError("invalidBuy")),z.Ub(3),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError)}}function es(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-web-scaffold"),z.rc(2,"div",85),z.rc(3,"button",87),z.zc("click",(function(){return z.dd(t),z.Dc(2).removeRspCart()})),z.qd(4,"Remove"),z.qc(),z.rc(5,"button",88),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(6,"Update To Cart"),z.qc(),z.qc(),z.qc(),z.rc(7,"app-mobile-scaffold"),z.rc(8,"b2c-floating-bar"),z.rc(9,"button",93),z.zc("click",(function(){return z.dd(t),z.Dc(2).removeRspCart()})),z.qd(10,"Remove"),z.qc(),z.rc(11,"button",90),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(12,"Update To Cart"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);z.Ub(5),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError),z.Ub(6),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError)}}const ns=function(t){return{"shadow py-3 px-2 mb-6":t}},is=function(t){return{"pt-3":t}},cs=function(t){return{"border-bottom":t}};function os(t,e){if(1&t){const t=z.sc();z.rc(0,"div",18),z.Ec(1,"async"),z.rc(2,"h3",19),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.redirectToFactsheetPage(e.selectedFund.sedolnumber,null==e.selectedFund?null:e.selectedFund.fundName)})),z.qd(3),z.qc(),z.rc(4,"div",20),z.Ec(5,"async"),z.rc(6,"div",21),z.rc(7,"div",22),z.rc(8,"div",23),z.rc(9,"div",24),z.Ec(10,"async"),z.rc(11,"div",25),z.qd(12," RSP Sales Charge "),z.od(13,vo,1,1,"i",26),z.qc(),z.rc(14,"div",27),z.Ec(15,"async"),z.qd(16),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(17,"div",28),z.rc(18,"div",23),z.rc(19,"div",24),z.Ec(20,"async"),z.rc(21,"div",25),z.qd(22," Platform Fee "),z.od(23,Co,1,1,"i",29),z.qc(),z.rc(24,"div",27),z.Ec(25,"async"),z.qd(26),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(27,"div",30),z.od(28,So,6,1,"div",31),z.Ec(29,"async"),z.od(30,zo,2,1,"div",0),z.Ec(31,"async"),z.qc(),z.qc(),z.qc(),z.rc(32,"div",32),z.od(33,Jo,48,36,"form",33),z.qc(),z.od(34,ts,15,6,"ng-container",0),z.od(35,es,13,4,"ng-container",0),z.qc()}if(2&t){const t=z.Dc();z.Mc("ngClass",z.Sc(34,ns,z.Fc(1,18,t.isMobile$))),z.Ub(3),z.rd(t.selectedFund.fundName),z.Ub(1),z.Mc("ngClass",z.Sc(36,is,!z.Fc(5,20,t.isMobile$))),z.Ub(5),z.Mc("ngClass",z.Sc(38,cs,z.Fc(10,22,t.isMobile$))),z.Ub(4),z.Mc("ngIf",t.systemSstRate>0),z.Ub(1),z.Wb("text-base font-weight-bold "+(z.Fc(15,24,t.isMobile$)?"text-right":"")),z.Ub(2),z.sd("",null==t.selectedFund?null:t.selectedFund.rspSalesCharge,"% "),z.Ub(3),z.Mc("ngClass",z.Sc(40,cs,z.Fc(20,26,t.isMobile$))),z.Ub(4),z.Mc("ngIf",t.systemSstRate>0),z.Ub(1),z.Wb("text-base font-weight-bold "+(z.Fc(25,28,t.isMobile$)?"text-right":"")),z.Ub(2),z.sd("",null==t.selectedFund?null:t.selectedFund.platformFeeRate,"% "),z.Ub(2),z.Mc("ngIf",!z.Fc(29,30,t.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(31,32,t.isMobile$)),z.Ub(3),z.Mc("ngIf",t.rspBuyForm),z.Ub(1),z.Mc("ngIf","add"===t.detailsType),z.
1Ub(1),z.Mc("ngIf","edit"===t.detailsType)}}function ss(t,e){1&t&&z.nc(0)}function as(t,e){1&t&&z.nc(0)}function rs(t,e){1&t&&z.nc(0)}function ls(t,e){if(1&t&&(z.od(0,ss,1,0,"ng-container",39),z.od(1,as,1,0,"ng-container",39),z.od(2,rs,1,0,"ng-container",39)),2&t){z.Dc();const t=z.ad(12),e=z.ad(14),n=z.ad(16);z.Mc("ngTemplateOutlet",t),z.Ub(1),z.Mc("ngTemplateOutlet",e),z.Ub(1),z.Mc("ngTemplateOutlet",n)}}function ds(t,e){1&t&&z.nc(0)}function us(t,e){1&t&&z.nc(0)}function ps(t,e){1&t&&z.nc(0)}function hs(t,e){if(1&t&&(z.rc(0,"div",23),z.rc(1,"div",24),z.Ec(2,"async"),z.rc(3,"div",37),z.qd(4,"Prospectus"),z.qc(),z.rc(5,"div",94),z.od(6,ds,1,0,"ng-container",39),z.qc(),z.qc(),z.qc(),z.rc(7,"div",23),z.rc(8,"div",24),z.Ec(9,"async"),z.rc(10,"div",37),z.qd(11,"Product Highlights Sheet"),z.qc(),z.rc(12,"div",94),z.od(13,us,1,0,"ng-container",39),z.qc(),z.qc(),z.qc(),z.rc(14,"div",23),z.rc(15,"div",36),z.rc(16,"div",37),z.qd(17,"Factsheet"),z.qc(),z.rc(18,"div",94),z.od(19,ps,1,0,"ng-container",39),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(),e=z.ad(12),n=z.ad(14),i=z.ad(16);z.Ub(1),z.Mc("ngClass",z.Sc(9,cs,z.Fc(2,5,t.isMobile$))),z.Ub(5),z.Mc("ngTemplateOutlet",e),z.Ub(2),z.Mc("ngClass",z.Sc(11,cs,z.Fc(9,7,t.isMobile$))),z.Ub(5),z.Mc("ngTemplateOutlet",n),z.Ub(6),z.Mc("ngTemplateOutlet",i)}}function fs(t,e){1&t&&z.nc(0)}const ms=function(t){return{name:"Prospectus",svg:"prospectus",link:t}};function bs(t,e){if(1&t&&z.od(0,fs,1,0,"ng-container",95),2&t){const t=z.Dc(),e=z.ad(18);z.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",z.Sc(2,ms,null==t.selectedFund?null:t.selectedFund.prospectusPath))}}function gs(t,e){1&t&&z.nc(0)}const ys=function(t){return{name:"Product Highlights Sheet",svg:"phs",link:t}};function Ms(t,e){if(1&t&&z.od(0,gs,1,0,"ng-container",95),2&t){const t=z.Dc(),e=z.ad(18);z.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",z.Sc(2,ys,null==t.selectedFund?null:t.selectedFund.performancePath))}}function vs(t,e){1&t&&z.nc(0)}const Cs=function(t){return{name:"Factsheet",svg:"factsheet",link:t}};function Ts(t,e){if(1&t&&z.od(0,vs,1,0,"ng-container",95),2&t){const t=z.Dc(),e=z.ad(18);z.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",z.Sc(2,Cs,null==t.selectedFund?null:t.selectedFund.factsheetPath))}}const Ss=function(t){return{"mb-3":t}},Ds=function(t){return{"mr-2":t}};function zs(t,e){if(1&t&&(z.pc(0),z.rc(1,"a",96),z.Ec(2,"async"),z.mc(3,"img",97),z.Ec(4,"async"),z.qc(),z.oc()),2&t){const t=e.link,n=e.name,i=e.svg,c=z.Dc();z.Ub(1),z.Mc("href",t,z.gd)("ngClass",z.Sc(10,Ss,!z.Fc(2,6,c.isMobile$)))("nzTooltipTitle",n),z.Ub(2),z.Oc("src","assets/images/factsheet/",i,".svg",z.gd),z.Mc("alt",n+" for documents")("ngClass",z.Sc(12,Ds,!z.Fc(4,8,c.isMobile$)))}}let qs=(()=>{class t{constructor(t,e,n,i,c,o,s,a,r,l,d,u,p){this.store=t,this.fb=e,this.subHandlingService=n,this.transactionRestService=i,this.nzNotificationService=c,this.fundRestService=o,this.transactionService=s,this.siDeclarationService=a,this.router=r,this.passportExpiryNotificationService=l,this.mdfRestService=d,this.utilityRestService=u,this.currencyFormatService=p,this.visibleChange=new z.s,this.detailsType="add",this.oriBuyDataStamped=new z.s,this.removeSelectedRsp=new z.s,this.rspConstants=Yt,this.investmentCurrencyList=["MYR"],this.paymentMethodList=[],this.existingBankList=[],this.rspConvertedBankList=[],this.newBankList=[],this.isLoading=!1,this.isLoadingInitial=!1,this.selectedBank=null,this.newDdaModelVisible=!1,this.acctValidity=!0,this.freezePeriodError=!1,this.selectedPaymentMethod="",this.investAmount="100",this.showTopUpStatement=!1,this.fepBreached=!1,this.passportNoticeVisible=!1,this.systemSstRate=0}ngOnChanges(t){Object(p.a)([this.getFundBuyDetailsInfo(),this.initializeRspDetails(),this.getRspFreezePeriod()]).pipe(Object(f.a)(()=>{this.getActiveRSPCashAccount(),this.initializeRspBuyForm(t),this.resetPaymentMethodList()})).subscribe()}ngOnInit(){this.getSystemSstRate(),Object(p.a)([this.getFundBuyDetailsInfo(),this.initializeRspDetails(),this.getRspFreezePeriod()]).pipe(Object(f.a)(()=>
1{this.getActiveRSPCashAccount(),this.initializeRspBuyForm(),this.resetPaymentMethodList()})).subscribe()}getSystemSstRate(){this.utilityRestService.getSstRate().pipe(Object(oo.a)(1)).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS?this.systemSstRate=t.data:console.error("[getSystemSstRate] error retrieving system sst rate")})}initializeRspBuyForm(t){var e,n,i,c,o,s;console.log("this.selectedFund",this.selectedFund),console.log("changes",t),this.freezePeriodError=!1,"add"===this.detailsType?(this.rspBuyForm?t&&((null===(e=t.sedolnumber)||void 0===e?void 0:e.previousValue)||(null===(n=t.refno)||void 0===n?void 0:n.previousValue))&&this.resetFormBuy():this.resetFormBuy(),this.oriBuyData&&(this.oriBuyData.amount&&this.rspBuyForm.get("investmentAmount").patchValue(this.oriBuyData.amount),this.oriBuyData.paymentMethod&&(this.rspBuyForm.get("paymentMethod").patchValue(this.oriBuyData.paymentMethod),this.onChangePaymentMethod(this.oriBuyData.paymentMethod,null===(i=this.oriBuyData.bankCode)||void 0===i?void 0:i.toString())),this.oriBuyDataStamped.emit())):"edit"===this.detailsType&&(this.oriBuyData&&!this.rspBuyForm?(this.rspBuyForm=this.fb.group({investmentAmount:[this.oriBuyData.amount,[st.H.required,st.H.min(this.selectedFund.minRspNum)]],investmentCurrency:[this.oriBuyData.currency,[st.H.required]],paymentMethod:[this.oriBuyData.paymentMethod,[st.H.required]],frequency:[this.oriBuyData.subscriptionFreq,[st.H.required]],refno:[this.refno,[st.H.required]],bank:[null],nextRspDate:[{value:null,disabled:!0}]},{validator:this.validateExtra()}),this.onChangePaymentMethod(this.oriBuyData.paymentMethod,null===(c=this.oriBuyData.bankCode)||void 0===c?void 0:c.toString())):t&&((null===(o=t.sedolnumber)||void 0===o?void 0:o.previousValue)||(null===(s=t.refno)||void 0===s?void 0:s.previousValue))&&this.resetFormBuy()),this.checkRspFeezePeriod(),this.checkAiFlag()}resetFormBuy(){var t;const e=null===(t=this.selectedFund)||void 0===t?void 0:t.fundCurrencyCode;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(e),this.rspBuyForm=this.fb.group({investmentAmount:[this.selectedFund.minRspNum,[st.H.required,st.H.min(this.selectedFund.minRspNum),st.H.pattern(this.currencyFormatService.getInputPattern(e))]],investmentCurrency:[this.selectedFund.fundCurrencyCode,[st.H.required]],paymentMethod:["",[st.H.required]],refno:[this.refno,[st.H.required]],bank:[null],frequency:[{value:"monthly",disabled:!0},[st.H.required]],nextRspDate:[{value:null,disabled:!0}]},{validator:this.validateExtra()})}initializeRspDetails(){return this.isLoading=!0,this.transactionRestService.getFundRspDetails(this.sedolnumber,this.formRefno?this.formRefno:this.refno).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(console.log("response.data",t.data),this.rspDetails=t.data,this.rspDetails&&(this.investmentCurrencyList=this.rspDetails.currList),this.isLoading=!1)}))}validateExtra(){return t=>{const e=t.controls.refno;e.errors&&!e.errors.acctValidator||e.setErrors(this.acctValidity?null:{acctValidator:!0})}}resetPaymentMethodList(){var t,e,n,i,c,o;const s=this.rspDetails.paymentMethod.paymentListWithParkingFacilityFund;this.paymentMethodList=[],s&&s.forEach(t=>{if(-1!=t.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT)){const e=t.split("|");this.paymentMethodList.push({label:"Cash Account ("+this.currencyFormatService.formatCurrency(+e[1],h.a.PAYMENT_CURRENCY_MYR)+")",value:t})}else if(-1!=t.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)){const e=t.split("|");this.paymentMethodList.push({label:e[2]+" ("+this.currencyFormatService.formatCurrency(+e[3],h.a.PAYMENT_CURRENCY_MYR)+")",value:this.rspConstants.PAYMENT_METHOD_CMF+"|"+e[1]})}else if(t===this.rspConstants.PAYMENT_METHOD_FPX)this.paymentMethodList.push({label:"FPX (e-Mandate)",value:t});else if(t===this.rspConstants.PAYMENT_METHOD_DDA)this.paymentMethodList.push({label:"DDA",value:t});else if(t===this.rspConstants.PAYMENT_METHOD_SALARY_ACCT)this.paymentMethodList.push({label:"Salary Account",value:t});else if(t===this.rspConstants.PAYMENT_METHOD_GO_PAYZ)this.paymentMethodList.push({label:"GoPayz",value:t});else if(this.isAutoSweepEnabled(t)){const e=null==t?void 0:t.split("|"),n=e[0];let i="";const c=parseFloat(e[2]);i=!isNaN(c)&&c>0?`(${this.currencyFormatService.formatCurrency(c,n)})`:"",this.paymentMethodList.push({label:`${n} ${e[1]} ${i}`,value:`${n}|${e[1]}`})}});const a=(null===(t=this.oriBuyData)||void 0===t?void 0:t.paymentMethod)?null===(e=this.oriBuyData)||void 0===e?void 0:e.paymentMethod:this.paymentMethod,r=this.paymentMethodList.find(t=>{var e;return null===(e=t.value)||void 0===e?void 0:e.includes(a)});if(r?"edit"===this.detailsType?this.rspBuyForm.get("paymentMethod").patchValue(r.value,{emitEvent:!1}):this.rspBuyForm.get("paymentMethod").patchValue(r.value):"edit"===this.detailsType?this.rspBuyForm.get("paymentMethod").patchValue(null===(n=this.paymentMethodList[0])||void 0===n?void 0:n.value,{emitEvent:!1}):this.rspBuyForm.get("paymentMethod").patchValue(null===(i=this.paymentMethodList[0])||void 0===i?void 0:i.value),null===(c=this.oriBuyData)||void 0===c?void 0:c.frequencyDisplay){const t=null===(o=this.oriBuyData.frequencyDisplay.split(";"))||void 0===o?void 0:o[0];if(t){const e=this.rspConstants.FREQUENCY_LIST.find(e=>e.label===t);e&&this.rspBuyForm.get("frequency").patchValue(e.value)}}console.log("this.paymentMethod",this.paymentMethod)}onChangePaymentMethod(t,e){var n;const i=t,c=null===(n=null==i?void 0:i.split("|"))||void 0===n?void 0:n[0];i!==this.rspConstants.PAYMENT_METHOD_FPX&&i!==this.rspConstants.PAYMENT_METHOD_DDA&&(e="new"),e&&"new"===(null==e?void 0:e.toString())&&
1(this.selectedBank=null,this.rspBuyForm.get("bank").patchValue(null)),this.resetValidityBank(),c&&-1!=i.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)&&ro.a.AUTO_SWEEP_CURRENCY.includes(c)&&this.rspBuyForm.get("investmentCurrency").setValue(c);const o=this.rspDetails.paymentMethod[i];o&&(this.existingBankList=o.existingList?o.existingList:[],this.rspConvertedBankList=this.existingBankList.map(t=>{var e;return{bankName:t.bankName,bankAccount:t.bankAcctNo,bankCode:null===(e=t.bankCode)||void 0===e?void 0:e.toString(),currency:"MYR",usedAmount:t.usedAmount.toString(),totalAmount:t.maxDdaAmount.toString()}}),this.newBankList=o.bankListModel?o.bankListModel:[]),e&&this.onSelectedBank(e),this.updateRspAmountMaxLimit(),this.updateFrequencyField()}resetValidityBank(){this.paymentMethod===this.rspConstants.PAYMENT_METHOD_FPX||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_DDA?this.rspBuyForm.get("bank").setValidators([st.H.required]):this.rspBuyForm.get("bank").setValidators([]),this.rspBuyForm.get("bank").markAsDirty(),this.rspBuyForm.get("bank").updateValueAndValidity()}onSelectedBank(t){const e=this.existingBankList.filter(e=>e.bankCode.toString()===(null==t?void 0:t.toString()));e.length>0&&(this.selectedBank=e[0],this.rspBuyForm.get("bank").patchValue(this.selectedBank),this.updateFormValidity("bank")),this.updateRspAmountMaxLimit()}updateRspAmountMaxLimit(){var t;const e=null===(t=this.selectedFund)||void 0===t?void 0:t.fundCurrencyCode;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(e),this.selectedBank?this.rspBuyForm.get("investmentAmount").setValidators([st.H.min(this.selectedFund.minRspNum),st.H.max(this.selectedBank.availableAmount),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(e))]):this.rspBuyForm.get("investmentAmount").setValidators([st.H.min(this.selectedFund.minRspNum),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(e))]),this.rspBuyForm.get("investmentAmount").updateValueAndValidity()}onChangeFrequency(){this.updateNextRspDateField(),this.checkRspFeezePeriod()}updateNextRspDateField(){this.paymentMethod&&(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT))||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)?"monthly"===this.frequency?this.rspBuyForm.get("nextRspDate").patchValue(this.rspDetails.monthlyNextRspDate):this.rspBuyForm.get("nextRspDate").patchValue(this.rspDetails.weeklyNextRspDate):this.rspBuyForm.get("nextRspDate").patchValue(null)}updateFrequencyField(){this.paymentMethod&&(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT))||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)?(this.rspBuyForm.get("frequency").enable(),"add"===this.detailsType&&this.rspBuyForm.get("frequency").patchValue("weekly")):(this.rspBuyForm.get("frequency").patchValue("monthly"),this.rspBuyForm.get("frequency").disable()),this.updateNextRspDateField(),this.checkRspFeezePeriod()}closeRspDetails(){this.visible=!1,this.visibleChange.emit()}onApplyNewDda(){let t=this.passportExpiryNotificationService.isPersonalAccountPassportExpired();const e=this.formRefno;let n=!1;e&&(n=this.passportExpiryNotificationService.checkPassportExpiredByAccount(e)),t||n?this.passportNoticeVisible=!0:(this.newDdaModelVisible=!0,this.visible=!1)}onCloseApplyNewDda(){this.newDdaModelVisible=!1,this.visible=!0}updateFormValidity(t){if(t)this.rspBuyForm.controls[t].markAsDirty(),this.rspBuyForm.controls[t].updateValueAndValidity();else{if(this.rspBuyForm.controls)for(const t in this.rspBuyForm.controls)this.rspBuyForm.controls[t].markAsDirty(),this.rspBuyForm.controls[t].updateValueAndValidity();this.rspBuyForm.updateValueAndValidity()}}addToCart(){var t;let e=this.passportExpiryNotificationService.isPersonalAccountPassportExpired();const n=this.formRefno;let i=!1;if(n&&(i=this.passportExpiryNotificationService.checkPassportExpiredByAccount(n)),e||i)return void(this.passportNoticeVisible=!0);if(this.updateFormValidity(),console.log("addToCart - rspBuyForm",this.rspBuyForm),"VALID"!==this.rspBuyForm.status)return void console.log("got masuk retrun o");this.refno!==this.formRefno&&this.store.dispatch(new y.N(this.formRefno));const c=this.paymentMethodList.filter(t=>this.paymentMethod===t.value);let o,s=c?c[0].label:"",a=this.paymentMethod,r="";if(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)){const t=this.paymentMethod.split("|");r=t[1],a=t[0]}if(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT)&&(a=this.paymentMethod.split("|")[0]),-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)&&(a=this.paymentMethod.split("|")[1]),console.log("displayPaymentMethod",s),s&&(this.paymentMethod===this.rspConstants.PAYMENT_METHOD_FPX||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_DDA)){if(!this.selectedBank)return void this.nzNotificationService.error("Error","Please choose a bank.");
1s="Y"===this.selectedBank.isEmandate?"e-Mandate "+this.selectedBank.bankName:this.paymentMethod+" "+this.selectedBank.bankName}o={refno:this.formRefno,productType:so.a.UNIT_TRUST,productName:this.selectedFund.fundName,orderStatus:h.a.ADDED_TO_CART,displayTitle:s,buyInfoModel:{amount:this.rspBuyForm.get("investmentAmount").value,bankCode:this.selectedBank?this.selectedBank.bankCode:null,bankLimit:this.selectedBank?this.selectedBank.maxDdaAmount:null,bankAcctNo:null,bankAcctName:null,fpxBankId:null,paymentId:null===(t=this.selectedBank)||void 0===t?void 0:t.ddaId,currency:this.rspBuyForm.get("investmentCurrency").value,investmentType:"rsp",paymentMethod:a,paymentMode:a,sedolNumber:this.selectedFund.sedolnumber,salesCharge:Object(ao.Gb)(this.selectedFund.rspSalesCharge),cashFundSedol:r,rspProductType:"UT",subscriptionFreq:this.frequency,frequencyDisplay:this.rspConstants.FREQUENCY_LIST.find(t=>t.value===this.frequency).label.concat(this.rspBuyForm.get("nextRspDate").value?"; "+this.rspBuyForm.get("nextRspDate").value:"")}};const l=this.formRefno;this.isLoading=!0,this.subHandlingService.once(this.transactionRestService.validateRSPBuy(l,o.buyInfoModel).pipe(Object(f.a)(t=>{if(this.isLoading=!1,t.status===M.a.RESPONSE_FAILED)return t.errorMessage.includes("foreign.exchange.policy.breached")?void(this.fepBreached=!0):(this.rspBuyForm.setErrors({invalidBuy:t.errorMessage}),void console.log("This is res.errorMessage: "+t.errorMessage));"edit"===this.detailsType&&this.removeSelectedRsp.emit(this.selectedFund.sedolnumber),this.store.dispatch(new v.a(o)),this.closeRspDetails()})))}onCreateBank(t){const e=this.router.url.split("?");this.store.dispatch(new T.p(!0)),this.transactionService.setLastVisitedUrl(e[0]+"?refno="+this.formRefno+"&productId="+this.sedolnumber+"&amount="+this.rspBuyForm.get("investmentAmount").value+"&paymentMethod="+this.paymentMethod+"&bankCode="+t)}getFundBuyDetailsInfo(){return this.isLoadingInitial=!0,this.fundRestService.getFundBuyDetailInfo(this.formRefno?this.formRefno:this.refno,this.sedolnumber).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.selectedFund=t.data,this.isLoadingInitial=!1)}))}acctRefnoChange(){this.isLoading=!0,this.getActiveRSPCashAccount(this.formRefno),this.subHandlingService.once(this.transactionRestService.getFundsBuyList(h.a.RSP_FUNDS,"",this.formRefno).pipe(Object(f.a)(t=>{if(t.data){let e=t.data;e=e.filter(t=>"Y"===t.rspenabled),e.find(t=>t.sedolnumber===this.sedolnumber)?(this.acctValidity=!0,Object(p.a)([this.getFundBuyDetailsInfo(),this.initializeRspDetails()]).pipe(Object(f.a)(()=>{this.resetPaymentMethodList()})).subscribe()):this.acctValidity=!1,this.isLoading=!1}else this.acctValidity=!1;this.updateFormValidity("refno")}))),this.checkAiFlag()}checkAiFlag(){if(console.log("this.selectedFund.fundType :",this.selectedFund.fundType),"restricted"===this.selectedFund.fundType){const t=this.siDeclarationService.hasDeclared();console.log("hasDeclared :",t),t||(this.showAiNotice=!0,this.showAddFundDetailsModal=!1)}console.log("showAiNotice :",this.showAiNotice)}removeRspCart(){this.closeRspDetails(),this.removeSelectedRsp.emit(this.selectedFund.sedolnumber)}get paymentMethod(){var t,e,n,i,c,o,s,a;return(null===(n=null===(e=null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("paymentMethod"))||void 0===e?void 0:e.value)||void 0===n?void 0:n.value)?null===(o=null===(c=null===(i=this.rspBuyForm)||void 0===i?void 0:i.get("paymentMethod"))||void 0===c?void 0:c.value)||void 0===o?void 0:o.value:null===(a=null===(s=this.rspBuyForm)||void 0===s?void 0:s.get("paymentMethod"))||void 0===a?void 0:a.value}get formRefno(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("refno").value}get frequency(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("frequency").value}getRspFreezePeriod(){return this.transactionRestService.getRspFreezePeriod().pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.freezePeriodMap=t.data)}))}checkRspFeezePeriod(){this.freezePeriodError=!1,this.paymentMethod&&("monthly"===this.frequency?this.paymentMethod===this.rspConstants.PAYMENT_METHOD_SALARY_ACCT?this.freezePeriodMap.salaryAccountFreezePeriod&&(this.freezePeriodError=!0):this.freezePeriodMap.monthlyFreezePeriod&&(this.freezePeriodError=!0):this.freezePeriodMap.weeklyFreezePeriod&&(this.freezePeriodError=!0))}onChangeInvestAmount(t){this.investAmount=t.value}getActiveRSPCashAccount(t){let e=[],n=[],i=0;this.transactionRestService.findRspTransaction(null!=t?t:this.refno,null).subscribe(t=>
1{if(t.status===M.a.RESPONSE_SUCCESS){n=t.data.result;const c=Object.keys(n);for(const t of c){const i=n[t];i&&i.forEach(t=>{t&&e.push(t)})}e.forEach(t=>{"Cash Account"===t.fundName&&"active"===t.fundStatus&&i++}),this.showTopUpStatement=!(i>=1)}})}redirectToFactsheetPage(t,e){t&&Object(at.a)(["/"+M.o.FUNDS,M.o.TOOLS,M.o.FACTSHEET,Object(rt.e)(e)],{fund:t})}handleAiAccept(t){this.showAiNotice=!1,this.showAddFundDetailsModal=!0}handleAiDecline(){this.showAiNotice=!1,this.closeRspDetails()}isAutoSweepEnabled(t){const e=null==t?void 0:t.includes(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP),n=this.selectedFund.fundCurrencyCode===h.a.PAYMENT_CURRENCY_MYR&&(null==t?void 0:t.includes(h.a.PAYMENT_CURRENCY_MYR)),i=ro.a.AUTO_SWEEP_CURRENCY.includes(this.selectedFund.fundCurrencyCode);return e&&n&&i}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(st.g),z.lc(C.a),z.lc(lt.a),z.lc(St.b),z.lc(dt.a),z.lc(sn.a),z.lc(lo.a),z.lc(q.e),z.lc(Fi.a),z.lc(uo.a),z.lc(po.a),z.lc(Ii.a))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-fund-details"]],inputs:{sedolnumber:"sedolnumber",refno:"refno",visible:"visible",detailsType:"detailsType",oriBuyData:"oriBuyData",showAddFundDetailsModal:"showAddFundDetailsModal"},outputs:{visibleChange:"visibleChange",oriBuyDataStamped:"oriBuyDataStamped",removeSelectedRsp:"removeSelectedRsp"},features:[z.Tb([C.a]),z.Sb],decls:22,vars:17,consts:[[4,"ngIf"],["preViewAddToCart",""],[3,"refno","visible","bankList","visibleChange","bankDetail"],["documents",""],["documentsMobileViewTemplate",""],["prospectusDocument",""],["highlightSheetDocument",""],["factSheetDocument",""],["docTemplate",""],[3,"check","show","stayOnCurrentPage","onAccepted","onDecline"],[3,"showModal","refno","showModalChange"],[3,"modalVisible","isPopUp","footerFunc","onOkEmit","onUpdateEmit"],[3,"nzVisible","nzClosable","nzTitle","nzWidth","nzFooter","nzWrapClassName","nzOnCancel"],[3,"nzLoading"],[3,"ngTemplateOutlet"],[3,"nzLoading","nzParagraph"],[1,"border-bottom"],[3,"title","back"],[1,"bg-white",3,"ngClass"],[1,"header-line","pr-4","mb-4","pointer",3,"click"],[1,"bg-black-2","p-2","mb-4",3,"ngClass"],["nz-row","","nzType","flex","nzJustify","left","nzAlign","top",1,"bg-lighter"],["nz-col","","nzLg","8","nzXs","24"],[1,"p-1"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","left","nzAlign","middle",3,"ngClass"],["nz-col","","nzLg","24","nzXs","16",1,"d-flex","align-item-center","gap-2px","text-sm","text-black-8"],["class","d-flex align-item-center pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the RSP Sales Charge","nzType","info-circle",3,"nzOverlayClassName",4,"ngIf"],["nz-col","","nzLg","24","nzXs","8"],["nz-col","","nzLg","10","nzXs","24"],["class","d-flex align-item-center pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the Platform Fee","nzType","info-circle",3,"nzOverlayClassName",4,"ngIf"],["nz-col","","nzLg","6","nzXs","24"],["class","p-1",4,"ngIf"],[1,"bg-white"],["nz-form","",3,"formGroup",4,"ngIf"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the RSP Sales Charge","nzType","info-circle",1,"d-flex","align-item-center","pointer",3,"nzOverlayClassName"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the Platform Fee","nzType","info-circle",1,"d-flex","align-item-center","pointer",3,"nzOverlayClassName"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","left","nzAlign","middle"],["nz-col","","nzLg","24","nzXs","16",1,"text-sm","text-black-8"],["nz-col","","nzLg","24","nzXs","8",1,"text-base","font-weight-bold"],[4,"ngTemplateOutlet"],["nz-form","",3,"formGroup"],["nz-row","","nzJustify","left","nzAlign","middle",1,"mb-4"],["nz-row","",1,"text-base","font-weight-bold","mb-2"],["nz-row","","nzType","flex"],["nz-col","","nzLg","24","nzXs","24",1,"text-base"],["formControlName","refno","nzLabelPlaceholder","Investment Account","nzPlaceHolder","Investment Account",1,"w-100",3,"nzDropdownMatchSelectWidth","nzDisabled","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["class","text-danger text-left",4,"ngIf"],[1,"font-weight-bold","mb-2","text-base"],["nz-row",""],["nz-col","","nzLg","12","nzXs","24"],[3,"ngClass"],["nzLabelPlaceholder","Investment Currency","nzPlaceHolder","Investment Currency","formControlName","investmentCurrency",1,"w-100",3,"nzDisabled"],["nz-col","","nzLg","12","nzMd","24","nzXs","24",1,"mb-2"],["nzLabelPlaceholder","RSP Amount"],["ui-input","","formControlName","investmentAmount","type","number",1,"w-100"],[1,"text-danger","text-left"],["nz-col","","nzLg","12","nzXs","24",1,"text-base"],["nzLabelPlaceholder","Payment Method","nzPlaceHolder","Payment Method","formControlName","paymentMethod",1,"w-100",3,"ngModel","ngModelChange"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["nzLabelPlaceholder","Frequency","nzPlaceHolder","Frequency","formControlName","frequency",1,"w-100",3,"ngModelChange"],["class","text-danger text-left text-sm my-1",3,"ngClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],["class","text-black text-left text-sm my-1",3,"ngClass",4,"ngIf"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between","class","mt-3",4,"ngIf"],[3,"nzLabel","nzValue"],[3,"nzValue","nzLabel"],[1,"text-danger","text-left","text-sm","my-1",3,"ngClass"],["nzType","flex"],["nzSpan","1"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","mr-2"],["nzSpan","23"],["nzLabelPlaceholder","Next RSP Date"],["ui-input","","formControlName","nextRspDate",1,"w-100"],[1,"text-black","text-left","text-sm","my-1",3,"ngClass"],["nz-icon","","nzType","exclamation-circle",1,"mr-2","text-info"],[1,"font-weight-bold",3,"routerLink"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between",1,"mt-3"],["nz-col","",1,"text-base","font-weight-bold"],["nz-col","","nzSpan","24","class","text-black-5 text-base text-center pt-3 pb-2",4,"ngIf"],["nz-col","",1,"text-base","font-weight-bold","text-center",3,"nzSpan"],[3,"click"],["nz-row","",1,"w-100","my-3","infinite-container"],[3,"type","listContent","radioValue","radioEvent"],["nz-col","","nzSpan","24",1,"text-black-5","text-base","text-center","pt-3","pb-2"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle",1,"d-flex","w-100","justify-content-end"],["nz-col","","nzSpan","24","class","text-warning text-sm py-2",4,"ngIf"],["nz-button","","nzType","outline",1,"mr-3","mt-4",3,"click"],["nz-button","","nzType","primary",1,"mt-4",3,"nzLoading","disabled","click"],["nz-button","","nzBlock","","nzType","outline",1,"mb-2",3,"click"],["nz-button","","nzBlock","","nzType","primary",3,"nzLoading","disabled","click"],["nz-col","","nzSpan","24",1,"text-warning","text-sm","py-2"],["nz-icon","","nzType","info-circle","nzTheme","fill"],["nzBlock","","nz-button","","nzType","outline",1,"mb-2",3,"click"],["nz-col","","nzLg","24","nzXs","8",1,"text-right"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["rel","noopener noreferrer","target","_blank","nzTooltipPlacement","top","nz-tooltip","",1,"pointer",3,"href","ngClass","nzTooltipTitle"],[3,"alt","ngClass","src"]],template:function(t,e){1&t&&(z.od(0,bo,4,8,"app-web-scaffold",0),z.Ec(1,"async"),z.od(2,Mo,3,4,"app-mobile-scaffold",0),z.Ec(3,"async"),z.od(4,os,36,42,"ng-template",null,1,z.pd),z.rc(6,"new-emandate",2),z.zc("visibleChange",(function(t){return e.newDdaModelVisible=t}))("visibleChange",(function(){return e.onCloseApplyNewDda()}))("bankDetail",(function(t){return e.onCreateBank(t)})),z.qc(),z.od(7,ls,3,3,"ng-template",null,3,z.pd),z.od(9,hs,20,13,"ng-template",null,4,z.pd),z.od(11,bs,1,4,"ng-template",null,5,z.pd),z.od(13,Ms,1,4,"ng-template",null,6,z.pd),z.od(15,Ts,1,4,"ng-template",null,7,z.pd),z.od(17,zs,5,14,"ng-template",null,8,z.pd),z.rc(19,"shared-si-declaration-revamp-modal",9),z.zc("onAccepted",(function(t){return e.handleAiAccept(t)}
1))("onDecline",(function(){return e.handleAiDecline()})),z.qc(),z.rc(20,"fep-breached-modal",10),z.zc("showModalChange",(function(t){return e.fepBreached=t})),z.qc(),z.rc(21,"passport-expiry-notification",11),z.zc("onOkEmit",(function(){return e.passportNoticeVisible=!1}))("onUpdateEmit",(function(){return e.passportNoticeVisible=!1})),z.qc()),2&t&&(z.Mc("ngIf",!z.Fc(1,13,e.isMobile$)&&e.selectedFund),z.Ub(2),z.Mc("ngIf",e.selectedFund&&z.Fc(3,15,e.isMobile$)),z.Ub(4),z.Mc("refno",e.formRefno)("visible",e.newDdaModelVisible)("bankList",e.newBankList),z.Ub(13),z.Mc("check",!0)("show",e.showAiNotice)("stayOnCurrentPage",!0),z.Ub(1),z.Mc("showModal",e.fepBreached)("refno",e.refno),z.Ub(1),z.Mc("modalVisible",e.passportNoticeVisible)("isPopUp",!1)("footerFunc",!0))},directives:[P.t,oe,ho.a,fo.a,mo.a,R.a,yt.a,kc.a,P.A,H.a,ut.a,P.q,V.c,V.a,mt.b,jt.e,st.J,st.u,Et.b,st.l,Ht.d,st.t,st.j,P.s,At.c,st.c,st.z,At.b,Ht.a,q.h,ft.a,Y.a,pt.a],pipes:[P.b],styles:[".product-background[_ngcontent-%COMP%]{background-color:#f5f8f9}.ui-select-hack[_ngcontent-%COMP%]{position:relative;top:-1px}.infinite-container[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;overflow-x:hidden} li.ant-select-dropdown-menu-item{white-space:unset;text-overflow:clip} .custom-scrollable-modal{display:flex!important;align-items:center;justify-content:center;padding:24px} .custom-scrollable-modal .ant-modal{top:0!important;margin:0 auto} .custom-scrollable-modal .ant-modal-body{max-height:70vh;overflow-y:auto}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(T.a.getAccounts)],t.prototype,"acctList$",void 0),t})();var Es=n("3O+M"),As=n("3WOW");function Ps(t,e){if(1&t){const t=z.sc();z.rc(0,"app-web-scaffold"),z.rc(1,"nz-modal",5),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc().closeRspDetails()})),z.mc(2,"nz-skeleton",6),z.nc(3,7),z.qc(),z.qc()}if(2&t){const t=z.Dc(),e=z.ad(5);z.Ub(1),z.Mc("nzVisible",t.visible)("nzWrapClassName","custom-scrollable-modal")("nzWidth",600)("nzFooter",null),z.Ub(1),z.Mc("nzLoading",t.isLoadingInitial),z.Ub(1),z.Mc("ngTemplateOutlet",e)}}function Rs(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",8),z.rc(2,"b2c-app-bar-2",9),z.zc("back",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qc(),z.qc(),z.mc(3,"nz-skeleton",6),z.nc(4,7),z.oc()}if(2&t){const t=z.Dc(2),e=z.ad(5);z.Ub(2),z.Mc("title","Order Cart"),z.Ub(1),z.Mc("nzLoading",t.isLoadingInitial),z.Ub(1),z.Mc("ngTemplateOutlet",e)}}function ws(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Rs,5,3,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.visible)}}function Fs(t,e){1&t&&z.mc(0,"i",25),2&t&&z.Mc("nzOverlayClassName","")}function Is(t,e){1&t&&z.mc(0,"i",26)}function Us(t,e){if(1&t&&z.mc(0,"ui-option",51),2&t){const t=e.$implicit;z.Mc("nzLabel",t.accountTypeDisplay)("nzValue",t.refno)}}function Os(t,e){1&t&&(z.rc(0,"div",52),z.qd(1," Please choose an account. "),z.qc())}function xs(t,e){1&t&&(z.rc(0,"div",52),z.qd(1," You do not have this portfolio in your holdings. "),z.qc())}function Ls(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function ks(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(5);z.Ub(1),z.sd(" Amount must be greater than ",null==t.selectedPortfolio?null:t.selectedPortfolio.minRspAmt," ")}}function Ns(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(5);z.Ub(1),z.sd(" Amount accept up to ",t.rspAmountDecimalPlaces," d.p. ")}}function _s(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(5);z.Ub(1),z.sd(" The available amount is ",null==t.selectedBank?null:t.selectedBank.availableAmount," ")}}function Bs(t,e){1&t&&(z.pc(0),z.qd(1," The Minimum Incremental Amount is MYR 100 "),z.oc())}function Vs(t,e){if(1&t&&(z.pc(0),z.mc(1,"i",54),z.od(2,Ls,2,0,"ng-container",0),z.od(3,ks,2,1,"ng-container",0),z.od(4,Ns,2,1,"ng-container",0),z.od(5,_s,2,1,"ng-container",0),z.od(6,Bs,2,0,"ng-container",0),z.oc()),2&t){const t=e.ngIf;z.Ub(2),z.Mc("ngIf",null==t?null:t.required),z.Ub(1),z.Mc("ngIf",null==t?null:t.min),z.Ub(1),z.Mc("ngIf",null==t?null:t.pattern),z.Ub(1),z.Mc("ngIf",null==t?null:t.max),z.Ub(1),z.Mc("ngIf",null==t?null:t.subAmtValidator)}}function Ys(t,e){if(1&t&&(z.rc(0,"div",53),z.od(1,Vs,7,5,"ng-container",0),z.qc()),2&t){var n;const t=null==(n=z.Dc(3).rspBuyForm.get("investmentAmount"))?null:n.errors;z.Ub(1),z.Mc("ngIf",t)}}function Hs(t,e){if(1&t&&z.mc(0,"ui-option",55),2&t){const t=e.$implicit;z.Mc("nzValue",t.value)("nzLabel",t.label)}}function js(t,e){1&t&&(z.rc(0,"div",52),z.mc(1,"i",56),z.qd(2," Please make sure this field is not blank. "),z.qc())}function $s(t,e){if(1&t&&z.mc(0,"ui-option",55),2&t){const t=e.$implicit;z.Mc("nzValue",t.value)("nzLabel",t.label)}}function Gs(t,e){1&t&&(z.rc(0,"div",52),z.qd(1," Please make sure this field is not blank. "),z.qc())}function Ws(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"We are processing the RSP transaction today. Any Applications, Termination or change in RSP Amount request will not able to process currently. Please submit your request on next business day."),z.qc())}function Xs(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"RSP Applications, Termination or change in RSP Amount instructions are not accepted from 0000 hrs to 0600 hrs on every 26th calendar day of each month, please try again later."),z.qc())}function Ks(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"We are processing the RSP transactions today. Any applications, terminations or changes to the RSP amount cannot be accepted at this time. Please submit your request on the next day."),z.qc())}function Js(t,e){if(1&t&&(z.rc(0,"div",57),z.Ec(1,"async"),z.rc(2,"nz-row",58),z.rc(3,"nz-col",59),z.mc(4,"i",60),z.qc(),z.rc(5,"nz-col",61),z.od(6,Ws,2,0,"span",0),z.od(7,Xs,2,0,"span",0),z.od(8,Ks,2,0,"span",0),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Fc(1,4,t.isMobile$)?"mb-2":"mt-2"),z.Ub(6),z.Mc("ngIf","weekly"===t.frequency||"bi-weekly"===t.frequency),z.Ub(1),z.Mc("ngIf","monthly"===t.frequency&&t.paymentMethod===t.rspConstants.PAYMENT_METHOD_SALARY_ACCT),z.Ub(1),z.Mc("ngIf","monthly"===t.frequency&&t.paymentMethod!==t.rspConstants.PAYMENT_METHOD_SALARY_ACCT)}}function Zs(t,e){if(1&t&&(z.rc(0,"div",62),z.Ec(1,"async"),z.rc(2,"ui-input-group",63),z.mc(3,"input",64),z.qc(),z.qc()),2&t){const t=z.Dc(3);
1z.Mc("ngClass",z.Fc(1,1,t.isMobile$)?"":"mt-2")}}function Qs(t,e){1&t&&(z.rc(0,"div",72),z.qd(1,"Looks like you do not have a FPX e-Mandate Account"),z.qc())}function ta(t,e){if(1&t){const t=z.sc();z.rc(0,"div",65),z.rc(1,"div",66),z.qd(2,"Select Your e-Mandate"),z.qc(),z.od(3,Qs,2,0,"div",67),z.rc(4,"div",68),z.rc(5,"a",69),z.zc("click",(function(){return z.dd(t),z.Dc(3).onApplyNewDda()})),z.qd(6,"Apply New e-Mandate"),z.qc(),z.qc(),z.rc(7,"div",70),z.rc(8,"b2c-rsp",71),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(3).onSelectedBank(e)})),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Ub(3),z.Mc("ngIf",0===t.existingBankList.length),z.Ub(1),z.Mc("nzSpan",0===t.rspConvertedBankList.length?24:""),z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString())}}function ea(t,e){if(1&t){const t=z.sc();z.rc(0,"div",73),z.rc(1,"div",66),z.qd(2,"Select Your DDA"),z.qc(),z.rc(3,"div",70),z.rc(4,"b2c-rsp",71),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(3).onSelectedBank(e)})),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString())}}function na(t,e){if(1&t){const t=z.sc();z.rc(0,"form",27),z.rc(1,"div",28),z.rc(2,"div",29),z.qd(3,"Select Investment Account"),z.qc(),z.rc(4,"div",30),z.rc(5,"div",31),z.rc(6,"ui-select",32),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).acctRefnoChange()})),z.Ec(7,"async"),z.od(8,Us,1,2,"ui-option",33),z.Ec(9,"async"),z.qc(),z.od(10,Os,2,0,"div",34),z.od(11,xs,2,0,"div",34),z.qc(),z.qc(),z.qc(),z.rc(12,"div",35),z.rc(13,"div",36),z.qd(14,"Enter RSP Details"),z.qc(),z.rc(15,"div",37),z.rc(16,"ui-input-group",38),z.mc(17,"input",39),z.qc(),z.od(18,Ys,2,1,"div",40),z.qc(),z.rc(19,"div",41),z.rc(20,"div",42),z.rc(21,"div",10),z.Ec(22,"async"),z.rc(23,"ui-select",43),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(2).onChangePaymentMethod(e)}))("ngModelChange",(function(e){return z.dd(t),z.Dc(2).selectedPaymentMethod=e})),z.od(24,Hs,1,2,"ui-option",44),z.qc(),z.od(25,js,3,0,"div",34),z.qc(),z.qc(),z.rc(26,"div",45),z.rc(27,"div"),z.rc(28,"ui-select",46),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).onChangeFrequency()})),z.od(29,$s,1,2,"ui-option",44),z.qc(),z.od(30,Gs,2,0,"div",34),z.qc(),z.qc(),z.qc(),z.od(31,Js,9,6,"div",47),z.od(32,Zs,4,3,"div",48),z.od(33,ta,9,5,"div",49),z.od(34,ea,5,3,"div",50),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);var n;const e=(null==(n=z.Fc(7,16,t.acctList$))?null:n.length)<=1;var i=null;const r=(null==(i=t.rspBuyForm.get("refno"))?null:i.dirty)&&(null==(i=t.rspBuyForm.get("refno"))?null:i.hasError("required"));var c=null;const l=(null==(c=t.rspBuyForm.get("refno"))?null:c.dirty)&&(null==(c=t.rspBuyForm.get("refno"))?null:c.hasError("acctValidator"));var o=null;const d=(null==(o=t.rspBuyForm.get("investmentAmount"))?null:o.dirty)&&(null==(o=t.rspBuyForm.get("investmentAmount"))?null:o.errors);var s=null;const u=(null==(s=t.rspBuyForm.get("paymentMethod"))?null:s.dirty)&&(null==(s=t.rspBuyForm.get("paymentMethod"))?null:s.hasError("required"));var a=null;const p=(null==(a=t.rspBuyForm.get("frequency"))?null:a.dirty)&&(null==(a=t.rspBuyForm.get("frequency"))?null:a.hasError("required"));z.Mc("formGroup",t.rspBuyForm),z.Ub(6),z.Mc("nzDisabled",e),z.Ub(2),z.Mc("ngForOf",z.Fc(9,18,t.acctList$)),z.Ub(2),z.Mc("ngIf",r),z.Ub(1),z.Mc("ngIf",l),z.Ub(7),z.Mc("ngIf",d),z.Ub(3),z.Mc("ngClass",z.Fc(22,20,t.isMobile$)?"mb-2":"mr-2"),z.Ub(2),z.Mc("ngModel",t.selectedPaymentMethod),z.Ub(1),z.Mc("ngForOf",t.paymentMethodList),z.Ub(1),z.Mc("ngIf",u),z.Ub(4),z.Mc("ngForOf",t.rspConstants.FREQUENCY_LIST),z.Ub(1),z.Mc("ngIf",p),z.Ub(1),z.Mc("ngIf",t.freezePeriodError),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_CMF||t.paymentMethod===t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_FPX),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_DDA)}}const ia=function(){return["/app/rsp/create-rsp/cash-acct-rsp"]};function ca(t,e){if(1&t&&(z.rc(0,"div",74),z.Ec(1,"async"),z.rc(2,"nz-row",58),z.rc(3,"nz-col",59),z.mc(4,"i",75),z.qc(),z.rc(5,"nz-col",61),z.rc(6,"span"),z.qd(7,"You can now automate "),z.rc(8,"a",76),z.qd(9,"MYR Cash Account top-up with RSP"),z.qc(),z.qd(10,"; no more missed deductions!"),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(2);z.Mc("ngClass",z.Fc(1,2,t.isMobile$)?"mb-2":null),z.Ub(8),z.Mc("routerLink",z.Rc(4,ia))}}function oa(t,e){if(1&t&&(z.rc(0,"div",83),z.mc(1,"i",84),z.qd(2),z.qc()),2&t){const t=z.Dc(3);var n=null;z.Ub(2),z.sd(" ",null==(n=t.rspBuyForm.get("refno"))?null:n.getError("invalidBuy")," ")}}function sa(t,e){if(1&t&&(z.rc(0,"div",83),z.mc(1,"i",84),z.qd(2),z.qc()),2&t){const t=z.Dc(3);var n=null;z.Ub(2),z.sd(" ",null==(n=t.rspBuyForm.get("refno"))?null:n.getError("invalidBuy")," ")}}function aa(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-web-scaffold"),z.od(2,oa,3,1,"div",77),z.rc(3,"div",78),z.rc(4,"button",79),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeRspDetails()}
1)),z.qd(5,"Cancel"),z.qc(),z.rc(6,"button",80),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(7,"Add To Cart"),z.qc(),z.qc(),z.qc(),z.rc(8,"app-mobile-scaffold"),z.rc(9,"b2c-floating-bar"),z.od(10,sa,3,1,"div",77),z.rc(11,"button",81),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qd(12,"Cancel"),z.qc(),z.rc(13,"button",82),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(14,"Add To Cart"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);var n=null;const e=null==(n=t.rspBuyForm.get("refno"))?null:n.hasError("invalidBuy");var i=null;const c=null==(i=t.rspBuyForm.get("refno"))?null:i.hasError("invalidBuy");z.Ub(2),z.Mc("ngIf",e),z.Ub(4),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError),z.Ub(4),z.Mc("ngIf",c),z.Ub(3),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError)}}function ra(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-web-scaffold"),z.rc(2,"div",78),z.rc(3,"button",85),z.zc("click",(function(){return z.dd(t),z.Dc(2).removeRspCart()})),z.qd(4,"Remove"),z.qc(),z.rc(5,"button",80),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(6,"Update To Cart"),z.qc(),z.qc(),z.qc(),z.rc(7,"app-mobile-scaffold"),z.rc(8,"b2c-floating-bar"),z.rc(9,"button",81),z.zc("click",(function(){return z.dd(t),z.Dc(2).removeRspCart()})),z.qd(10,"Remove"),z.qc(),z.rc(11,"button",86),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(12,"Update To Cart"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);z.Ub(5),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError),z.Ub(6),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError)}}const la=function(t){return{"border-bottom":t}};function da(t,e){if(1&t&&(z.rc(0,"div",10),z.Ec(1,"async"),z.rc(2,"div",11),z.rc(3,"h3",12),z.qd(4),z.qc(),z.qc(),z.rc(5,"div",13),z.rc(6,"div",14),z.rc(7,"div",15),z.rc(8,"div",16),z.Ec(9,"async"),z.rc(10,"div",17),z.qd(11," Subscription Fee "),z.od(12,Fs,1,1,"i",18),z.qc(),z.rc(13,"div",19),z.Ec(14,"async"),z.qd(15),z.qc(),z.qc(),z.qc(),z.rc(16,"div",15),z.rc(17,"div",20),z.rc(18,"div",17),z.qd(19," Portfolio Management Fee* "),z.od(20,Is,1,0,"i",21),z.qc(),z.rc(21,"div",19),z.Ec(22,"async"),z.qd(23),z.qc(),z.qc(),z.qc(),z.qc(),z.od(24,na,35,22,"form",22),z.od(25,ca,11,5,"div",23),z.rc(26,"div",10),z.Ec(27,"async"),z.mc(28,"related-info-collapse",24),z.qc(),z.qc(),z.qc(),z.od(29,aa,15,6,"ng-container",0),z.od(30,ra,13,4,"ng-container",0)),2&t){const t=z.Dc();z.Mc("ngClass",z.Fc(1,18,t.isMobile$)?"px-2 py-3 bg-white":"mb-4"),z.Ub(4),z.rd(t.selectedPortfolio.dpmsPortfolioName),z.Ub(4),z.Mc("ngClass",z.Sc(28,la,z.Fc(9,20,t.isMobile$))),z.Ub(4),z.Mc("ngIf",t.systemSstRate>0),z.Ub(1),z.Wb("text-base font-weight-bold "+(z.Fc(14,22,t.isMobile$)?"text-right":"")),z.Ub(2),z.sd("",null==t.selectedPortfolio?null:t.selectedPortfolio.rspSalesCharge,"% "),z.Ub(5),z.Mc("ngIf",t.systemSstRate>0),z.Ub(1),z.Wb("text-base font-weight-bold "+(z.Fc(22,24,t.isMobile$)?"text-right":"")),z.Ub(2),z.sd("",null==t.selectedPortfolio?null:t.selectedPortfolio.platformFeeRate,"% p.a"),z.Ub(1),z.Mc("ngIf",t.rspBuyForm),z.Ub(1),z.Mc("ngIf",t.showTopUpStatement&&t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT===t.selectedPaymentMethod),z.Ub(1),z.Mc("ngClass",z.Fc(27,26,t.isMobile$)?"bg-white pb-3 px-2":"mb-2"),z.Ub(2),z.Mc("riskAppetite",t.selectedPortfolio.riskLevel)("isCashPortfolio",null==t.selectedPortfolio?null:t.selectedPortfolio.isCashPortfolio),z.Ub(1),z.Mc("ngIf","add"===t.detailsType),z.Ub(1),z.Mc("ngIf","edit"===t.detailsType)}}let ua=(()=>{class t{constructor(t,e,n,i,c,o,s,a,r,l,d){this.store=t,this.fb=e,this.subHandlingService=n,this.transactionDpmsRestService=i,this.nzNotificationService=c,this.transactionService=o,this.router=s,this.transactionRestService=a,this.passportExpiryNotificationService=r,this.utilityRestService=l,this.currencyFormatService=d,this.visibleChange=new z.s,this.detailsType="add",this.oriBuyDataStamped=new z.s,this.removeSelectedRsp=new z.s,this.rspConstants=Yt,this.transactionConstant=h.a,this.investmentCurrencyList=["MYR"],this.paymentMethodList=[],this.existingBankList=[],this.rspConvertedBankList=[],this.newBankList=[],this.isLoading=!1,this.isLoadingInitial=!1,this.selectedBank=null,this.newDdaModelVisible=!1,this.acctValidity=!0,this.freezePeriodError=!1,this.selectedPaymentMethod="",this.showTopUpStatement=!1,this.fepBreached=!1,this.passportNoticeVisible=!1,this.systemSstRate=0}ngOnChanges(t){Object(p.a)([this.getDpmsBuyDetailsInfo(),this.initializeRspDetails(),this.getNextRspDate(),this.getRspFreezePeriod()]).pipe(Object(f.a)(()=>
1{this.getActiveRSPCashAccount(),this.initializeRspBuyForm(t),this.resetPaymentMethodList()})).subscribe()}ngOnInit(){this.getSystemSstRate(),Object(p.a)([this.getDpmsBuyDetailsInfo(),this.initializeRspDetails(),this.getRspFreezePeriod()]).pipe(Object(f.a)(()=>{this.getActiveRSPCashAccount(),this.initializeRspBuyForm(),this.resetPaymentMethodList()})).subscribe()}getSystemSstRate(){this.utilityRestService.getSstRate().pipe(Object(oo.a)(1)).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS?this.systemSstRate=t.data:console.error("[getSystemSstRate] error retrieving system sst rate")})}initializeRspBuyForm(t){var e,n,i,c,o,s;"add"===this.detailsType?(this.rspBuyForm?t&&((null===(e=t.sedolnumber)||void 0===e?void 0:e.previousValue)||(null===(n=t.refno)||void 0===n?void 0:n.previousValue))&&this.resetFormBuy():this.resetFormBuy(),console.log("oriBuyData",this.oriBuyData),this.oriBuyData&&(this.oriBuyData.amount&&this.rspBuyForm.get("investmentAmount").patchValue(this.oriBuyData.amount),this.oriBuyData.paymentMethod&&(this.rspBuyForm.get("paymentMethod").patchValue(this.oriBuyData.paymentMethod),this.onChangePaymentMethod(this.oriBuyData.paymentMethod,null===(i=this.oriBuyData.bankCode)||void 0===i?void 0:i.toString())),this.oriBuyDataStamped.emit())):"edit"===this.detailsType&&(this.oriBuyData&&!this.rspBuyForm?(this.rspBuyForm=this.fb.group({investmentAmount:[this.oriBuyData.amount,[st.H.required,st.H.min(this.selectedPortfolio.minRspAmt)]],investmentCurrency:[this.oriBuyData.currency,[st.H.required]],paymentMethod:[this.oriBuyData.paymentMethod,[st.H.required]],refno:[this.refno,[st.H.required]],bank:[null],frequency:[this.oriBuyData.subscriptionFreq,[st.H.required]],nextRspDate:[{value:null,disabled:!0}]},{validator:this.validateExtra()}),this.onChangePaymentMethod(this.oriBuyData.paymentMethod,null===(c=this.oriBuyData.bankCode)||void 0===c?void 0:c.toString())):t&&((null===(o=t.sedolnumber)||void 0===o?void 0:o.previousValue)||(null===(s=t.refno)||void 0===s?void 0:s.previousValue))&&this.resetFormBuy())}validateExtra(){return t=>{const e=t.controls.investmentAmount;if(e.errors&&!e.errors.subAmtValidator)return;e.setErrors(e.value%this.selectedPortfolio.minRspAmt!=0?{subAmtValidator:!0}:null);const n=t.controls.refno;n.errors&&!n.errors.acctValidator||n.setErrors(this.acctValidity?null:{acctValidator:!0})}}resetFormBuy(){var t;const e=null===(t=this.selectedPortfolio)||void 0===t?void 0:t.currencyCode;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(e),this.rspBuyForm=this.fb.group({investmentAmount:[this.selectedPortfolio.minRspAmt,[st.H.required,st.H.min(this.selectedPortfolio.minRspAmt),st.H.pattern(this.currencyFormatService.getInputPattern(e))]],investmentCurrency:[this.selectedPortfolio.currencyCode,[st.H.required]],paymentMethod:["",[st.H.required]],refno:[this.refno,[st.H.required]],bank:[null],frequency:[{value:"monthly",disabled:!0},[st.H.required]],nextRspDate:[{value:null,disabled:!0}]},{validator:this.validateExtra()})}resetValidityBank(){this.paymentMethod===this.rspConstants.PAYMENT_METHOD_FPX||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_DDA?this.rspBuyForm.get("bank").setValidators([st.H.required]):this.rspBuyForm.get("bank").setValidators([]),this.rspBuyForm.get("bank").markAsDirty(),this.rspBuyForm.get("bank").updateValueAndValidity()}initializeRspDetails(){return this.isLoading=!0,this.transactionDpmsRestService.getDpmsRspDetails(this.formRefno?this.formRefno:this.refno,this.portfolioId).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(console.log("response.data",t.data),this.rspDetails=t.data,this.rspDetails&&(this.investmentCurrencyList=this.rspDetails.currList),this.isLoading=!1)}))}getNextRspDate(){return this.transactionDpmsRestService.getDpmsRspNextDate().pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.nextRspDateMap=t.data)}))}getDpmsBuyDetailsInfo(){return this.isLoadingInitial=!0,this.transactionDpmsRestService.getDpmsBuyDetails(this.portfolioId,this.formRefno?this.formRefno:this.refno).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.selectedPortfolio=t.data,this.isLoadingInitial=!1)}))}resetPaymentMethodList(){var t,e,n,i,c,o;const s=this.rspDetails.paymentListWithParkingFacilityFund;
1this.paymentMethodList=[],s&&s.forEach(t=>{if(-1!=t.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT)){const e=t.split("|");this.paymentMethodList.push({label:"Cash Account ("+this.currencyFormatService.formatCurrency(+e[1],h.a.PAYMENT_CURRENCY_MYR)+")",value:t})}else if(-1!=t.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)){const e=t.split("|");this.paymentMethodList.push({label:e[2]+" ("+this.currencyFormatService.formatCurrency(+e[3],h.a.PAYMENT_CURRENCY_MYR)+")",value:this.rspConstants.PAYMENT_METHOD_CMF+"|"+e[1]})}else if(t===this.rspConstants.PAYMENT_METHOD_FPX)this.paymentMethodList.push({label:"FPX (e-Mandate)",value:t});else if(t===this.rspConstants.PAYMENT_METHOD_DDA)this.paymentMethodList.push({label:"DDA",value:t});else if(t===this.rspConstants.PAYMENT_METHOD_SALARY_ACCT)this.paymentMethodList.push({label:"Salary Account",value:t});else if(this.isAutoSweepEnabled(t)){const e=null==t?void 0:t.split("|"),n=e[0];let i="";const c=parseFloat(e[2]);i=!isNaN(c)&&c>0?`(${this.currencyFormatService.formatCurrency(c,n)})`:"",this.paymentMethodList.push({label:`${n} ${e[1]} ${i}`,value:`${n}|${e[1]}`})}});const a=(null===(t=this.oriBuyData)||void 0===t?void 0:t.paymentMethod)?null===(e=this.oriBuyData)||void 0===e?void 0:e.paymentMethod:this.paymentMethod,r=this.paymentMethodList.find(t=>{var e;return null===(e=t.value)||void 0===e?void 0:e.includes(a)});if(r?"edit"===this.detailsType?this.rspBuyForm.get("paymentMethod").patchValue(r.value,{emitEvent:!1}):this.rspBuyForm.get("paymentMethod").patchValue(r.value):"edit"===this.detailsType?this.rspBuyForm.get("paymentMethod").patchValue(null===(n=this.paymentMethodList[0])||void 0===n?void 0:n.value,{emitEvent:!1}):this.rspBuyForm.get("paymentMethod").patchValue(null===(i=this.paymentMethodList[0])||void 0===i?void 0:i.value),null===(c=this.oriBuyData)||void 0===c?void 0:c.frequencyDisplay){const t=null===(o=this.oriBuyData.frequencyDisplay.split(";"))||void 0===o?void 0:o[0];if(t){const e=this.rspConstants.FREQUENCY_LIST.find(e=>e.label===t);e&&this.rspBuyForm.get("frequency").patchValue(e.value)}}console.log("this.paymentMethod",this.paymentMethod)}onChangePaymentMethod(t,e){var n;const i=t,c=null===(n=null==i?void 0:i.split("|"))||void 0===n?void 0:n[0];i!==this.rspConstants.PAYMENT_METHOD_FPX&&i!==this.rspConstants.PAYMENT_METHOD_DDA&&(e="new"),e&&"new"===(null==e?void 0:e.toString())&&(this.selectedBank=null,this.rspBuyForm.get("bank").patchValue(null)),this.resetValidityBank(),c&&-1!=i.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)&&ro.a.AUTO_SWEEP_CURRENCY.includes(c)&&this.rspBuyForm.get("investmentCurrency").setValue(c);const o=this.rspDetails[i];o&&(this.existingBankList=o.existingList?o.existingList:[],this.rspConvertedBankList=this.existingBankList.map(t=>{var e;return{bankName:t.bankName,bankAccount:t.bankAcctNo,bankCode:null===(e=t.bankCode)||void 0===e?void 0:e.toString(),currency:"MYR",usedAmount:t.usedAmount.toString(),totalAmount:t.maxDdaAmount.toString()}}),console.log("onchange existingBankList :",this.existingBankList),this.newBankList=o.bankListModel?o.bankListModel:[]),e&&this.onSelectedBank(e),this.updateRspAmountMaxLimit(),this.updateFrequencyField()}onSelectedBank(t){console.log("onSelectedBank",t);const e=this.existingBankList.filter(e=>{var n;return(null===(n=e.bankCode)||void 0===n?void 0:n.toString())===(null==t?void 0:t.toString())});e.length>0&&(this.selectedBank=e[0],this.rspBuyForm.get("bank").patchValue(this.selectedBank),this.updateFormValidity("bank")),this.updateRspAmountMaxLimit()}updateRspAmountMaxLimit(){var t;const e=null===(t=this.selectedPortfolio)||void 0===t?void 0:t.currencyCode;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(e),this.selectedBank?this.rspBuyForm.get("investmentAmount").setValidators([st.H.min(this.selectedPortfolio.minRspAmt),st.H.max(this.selectedBank.availableAmount),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(e))]):this.rspBuyForm.get("investmentAmount").setValidators([st.H.min(this.selectedPortfolio.minRspAmt),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(e))]),this.rspBuyForm.get("investmentAmount").updateV
1alueAndValidity()}closeRspDetails(){this.visible=!1,this.visibleChange.emit()}onApplyNewDda(){let t=this.passportExpiryNotificationService.isPersonalAccountPassportExpired(),e=!1;const n=this.formRefno;n&&(e=this.passportExpiryNotificationService.checkPassportExpiredByAccount(n)),t||e?this.passportNoticeVisible=!0:(this.newDdaModelVisible=!0,this.visible=!1)}onCloseApplyNewDda(){this.newDdaModelVisible=!1,this.visible=!0}onCreateBank(t){this.store.dispatch(new T.p(!0));const e=this.router.url.split("?");this.transactionService.setLastVisitedUrl(e[0]+"?refno="+this.formRefno+"&productId="+this.portfolioId+"&amount="+this.rspBuyForm.get("investmentAmount").value+"&paymentMethod="+this.paymentMethod+"&bankCode="+t)}updateFormValidity(t){if(t)this.rspBuyForm.controls[t].markAsDirty(),this.rspBuyForm.controls[t].updateValueAndValidity();else{if(this.rspBuyForm.controls)for(const t in this.rspBuyForm.controls)this.rspBuyForm.controls[t].markAsDirty(),this.rspBuyForm.controls[t].updateValueAndValidity();this.rspBuyForm.updateValueAndValidity()}}addToCart(){var t;let e=this.passportExpiryNotificationService.isPersonalAccountPassportExpired(),n=!1;const i=this.formRefno;if(i&&(n=this.passportExpiryNotificationService.checkPassportExpiredByAccount(i)),e||n)return void(this.passportNoticeVisible=!0);if(this.updateFormValidity(),"VALID"!==this.rspBuyForm.status)return;this.refno!==this.formRefno&&this.store.dispatch(new y.N(this.formRefno));const c=this.paymentMethodList.filter(t=>this.paymentMethod===t.value);let o,s=c?c[0].label:"",a="",r=this.paymentMethod;if(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)){const t=this.paymentMethod.split("|");a=t[1],r=t[0]}if(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT)&&(r=this.paymentMethod.split("|")[0]),-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)&&(r=this.paymentMethod.split("|")[1]),s&&(this.paymentMethod===this.rspConstants.PAYMENT_METHOD_FPX||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_DDA)){if(!this.selectedBank)return void this.nzNotificationService.error("Error","Please choose a bank.");s="Y"===this.selectedBank.isEmandate?"e-Mandate "+this.selectedBank.bankName:this.paymentMethod+" "+this.selectedBank.bankName}console.log("this.selectedBank",this.selectedBank),o={refno:this.formRefno,productType:so.a.DPMS,productName:this.selectedPortfolio.dpmsPortfolioName,displayTitle:s,buyInfoModel:{amount:this.rspBuyForm.get("investmentAmount").value,bankCode:this.selectedBank?this.selectedBank.bankCode:null,bankLimit:this.selectedBank?this.selectedBank.maxDdaAmount:null,bankAcctNo:null,bankAcctName:null,fpxBankId:null,paymentId:null===(t=this.selectedBank)||void 0===t?void 0:t.ddaId,currency:"MYR",investmentType:"rsp",paymentMethod:r,paymentMode:r,sedolNumber:this.selectedPortfolio.dpmsPortfolioId,salesCharge:this.selectedPortfolio.rspSalesCharge,subscriptionFreq:this.frequency,cashFundSedol:a,rspProductType:"DPMS",frequencyDisplay:this.rspConstants.FREQUENCY_LIST.find(t=>t.value===this.frequency).label.concat(this.rspBuyForm.get("nextRspDate").value?"; "+this.rspBuyForm.get("nextRspDate").value:"")}};const l=this.formRefno;this.isLoading=!0,this.subHandlingService.once(this.transactionRestService.validateRSPBuy(l,o.buyInfoModel).pipe(Object(f.a)(t=>{if(this.isLoading=!1,t.status===M.a.RESPONSE_FAILED)return t.errorMessage.includes("foreign.exchange.policy.breached")?void(this.fepBreached=!0):void this.rspBuyForm.get("refno").setErrors({invalidBuy:t.errorMessage});"edit"===this.detailsType&&this.removeSelectedRsp.emit(this.selectedPortfolio.dpmsPortfolioId),this.store.dispatch(new v.a(o)),this.closeRspDetails()})))}removeRspCart(){this.closeRspDetails(),this.removeSelectedRsp.emit(this.selectedPortfolio.dpmsPortfolioId)}acctRefnoChange(){this.isLoading=!0,this.getActiveRSPCashAccount(this.formRefno),this.subHandlingService.once(this.transactionDpmsRestService.getDpmsRspList(this.formRefno).pipe(Object(f.a)(t=>{t.data?(t.data.find(t=>t.dpmsPortfolioId===this.portfolioId)?(this.acctValidity=!0,Object(p.a)([this.getDpmsBuyDetailsInfo(),this.initializeRspDetails()]).pipe(Object(f.a)(()=>{this.resetPaymentMethodList()})).subscribe()):this.acctValidity=!1,this.isLoading=!1):this.acctValidity=!1,this.updateFormValidity("refno")})))}get paymentMethod(){var t,e,n,i,c,o,s,a;return(null===(n=null===(e=null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("paymentMethod"))||void 0===e?void 0:e.value)||void 0===n?void 0:n.value)?null===(o=null===(c=null===(i=this.rspBuyForm)||void 0===i?void 0:i.get("paymentMethod"))||void 0===c?void 0:c.value)||void 0===o?void 0:o.value:null===(a=null===(s=this.rspBuyForm)||void 0===s?void 0:s.get("paymentMethod"))||void 0===a?void 0:a.value}get formRefno(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("refno").value}get frequency(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("frequency").value}updateFrequencyField(){this.paymentMethod&&(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT))||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)?(this.rspBuyForm.get("frequency").enable(),"add"===this.detailsType&&this.rspBuyForm.get("frequency").patchValue("weekly")):(this.rspBuyForm.get("frequency").patchValue("monthly"),this.rspBuyForm.get("frequency").disable()),this.updateNextRspDateField(),this.checkRspFeezePeriod()}updateNextRspDateField(){console.log(this.nextRspDateMap),this.paymentMethod&&(-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_CMF)||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT))||-1!=this.paymentMethod.indexOf(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)?"monthly"===this.frequency?this.rspBuyForm.get("nextRspDate").patchValue(this.nextRspDateMap.monthly):this.rspBuyForm.get("nextRspDate").patchValue(this.nextRspDateMap.weekly):this.rspBuyForm.get("nextRspDate").patchValue(null)}onChangeFrequency(){this.updateNextRspDateField(),this.checkRspFeezePeriod()}getRspFreezePeriod(){return this.transactionRestService.getRspFreezePeriod().pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.freezePeriodMap=t.data)}))}checkRspFeezePeriod(){this.freezePeriodError=!1,this.paymentMethod&&("monthly"===this.frequency?this.paymentMethod===this.rspConstants.PAYMENT_METHOD_SALARY_ACCT?this.freezePeriodMap.salaryAccountFreezePeriod&&(this.freezePeriodError=!0):this.freezePeriodMap.monthlyFreezePeriod&&(this.freezePeriodError=!0):this.freezePeriodMap.weeklyFreezePeriod&&(this.freezePeriodError=!0))}getActiveRSPCashAccount(t){let e=[],n=[],i=0;this.transactionRestService.findRspTransaction(null!=t?t:this.refno,null).subscribe(t=>
1{if(t.status===M.a.RESPONSE_SUCCESS){n=t.data.result;const c=Object.keys(n);for(const t of c){const i=n[t];i&&i.forEach(t=>{t&&e.push(t)})}e.forEach(t=>{"Cash Account"===t.fundName&&"active"===t.fundStatus&&i++}),this.showTopUpStatement=!(i>=1)}})}isAutoSweepEnabled(t){const e=null==t?void 0:t.includes(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP),n=this.selectedPortfolio.currencyCode===h.a.PAYMENT_CURRENCY_MYR&&(null==t?void 0:t.includes(h.a.PAYMENT_CURRENCY_MYR)),i=ro.a.AUTO_SWEEP_CURRENCY.includes(this.selectedPortfolio.currencyCode);return e&&n&&i}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(st.g),z.lc(C.a),z.lc(ti.a),z.lc(St.b),z.lc(sn.a),z.lc(q.e),z.lc(lt.a),z.lc(Fi.a),z.lc(po.a),z.lc(Ii.a))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-dpms-details"]],inputs:{portfolioId:"portfolioId",refno:"refno",visible:"visible",detailsType:"detailsType",oriBuyData:"oriBuyData"},outputs:{visibleChange:"visibleChange",oriBuyDataStamped:"oriBuyDataStamped",removeSelectedRsp:"removeSelectedRsp"},features:[z.Tb([C.a]),z.Sb],decls:9,vars:14,consts:[[4,"ngIf"],["preViewAddToCart",""],[3,"refno","visible","bankList","visibleChange","bankDetail"],[3,"showModal","refno","showModalChange"],[3,"modalVisible","isPopUp","footerFunc","onOkEmit","onUpdateEmit"],[3,"nzVisible","nzWrapClassName","nzWidth","nzFooter","nzOnCancel"],[3,"nzLoading"],[3,"ngTemplateOutlet"],[1,"border-bottom"],[3,"title","back"],[3,"ngClass"],["nz-row","","nzType","flex","nzJustify","left","nzAlign","middle"],["nz-col","","nzSpan","24"],[1,"infinite-container-model","px-1"],["nz-row","","nzType","flex","nzJustify","left","nzAlign","top",1,"bg-black-2","p-2","mb-4"],["nz-col","","nzLg","12","nzXs","24",1,"p-1"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","left","nzAlign","middle",3,"ngClass"],["nz-col","","nzLg","24","nzXs","16",1,"d-flex","align-item-center","gap-2px","text-sm","text-black-8"],["class","d-flex align-item-center pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the Subscription Fee","nzType","info-circle",3,"nzOverlayClassName",4,"ngIf"],["nz-col","","nzLg","24","nzXs","8"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","left","nzAlign","middle"],["class","d-flex align-item-center pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the Portfolio Management Fee","nzType","info-circle",3,"nzOverlayClassName",4,"ngIf"],["nz-form","",3,"formGroup",4,"ngIf"],["class","text-black text-left text-sm mb-4",3,"ngClass",4,"ngIf"],[3,"riskAppetite","isCashPortfolio"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the Subscription Fee","nzType","info-circle",1,"d-flex","align-item-center","pointer",3,"nzOverlayClassName"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzTooltipTitle","8% SST, applicable to the Portfolio Management Fee","nzType","info-circle",1,"d-flex","align-item-center","pointer",3,"nzOverlayClassName"],["nz-form","",3,"formGroup"],["nz-row","","nzJustify","left","nzAlign","middle",1,"mb-4"],["nz-row","",1,"text-base","font-weight-bold","mb-2"],["nz-row","","nzType","flex"],["nz-col","","nzLg","24","nzXs","24",1,"text-base"],["nzLabelPlaceholder","Investment Account","nzPlaceHolder","Investment Account","formControlName","refno",1,"w-100",3,"nzDisabled","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["class","text-danger text-left",4,"ngIf"],["nz-row","","nzJustify","left","nzAlign","middle"],["nz-row","",1,"text-base","font-weight-bold","mb-1"],[1,"mb-2"],["nzLabelPlaceholder","RSP Amount","nzSuffix","MYR"],["ui-input","","step","100","formControlName","investmentAmount","ui-input","","type","number",1,"w-100"],["class","text-danger text-left text-sm",4,"ngIf"],["nz-row","",1,"mb-2"],["nz-col","","nzLg","12","nzXs","24"],["nzLabelPlaceholder","Payment Method","nzPlaceHolder","Payment Method","formControlName","paymentMethod",1,"w-100",3,"ngModel","ngModelChange"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["nz-col","","nzLg","12","nzXs","24",1,"text-base"],["nzLabelPlaceholder","Frequency","nzPlaceHolder","Frequency","formControlName","frequency",1,"w-100",3,"ngModelChange"],["class","text-danger text-left text-sm my-1",3,"ngClass",4,"ngIf"],["class","pb-3",3,"ngClass",4,"ngIf"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between","class","mt-3",4,"ngIf"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between",4,"ngIf"],[3,"nzLabel","nzValue"],[1,"text-danger","text-left"],[1,"text-danger","text-left","text-sm"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"mr-1"],[3,"nzValue","nzLabel"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill"],[1,"text-danger","text-left","text-sm","my-1",3,"ngClass"],["nzType","flex"],["nzSpan","1"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","mr-2"],["nzSpan","23"],[1,"pb-3",3,"ngClass"],["nzLabelPlaceholder","Next RSP Date"],["ui-input","","formControlName","nextRspDate",1,"w-100"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between",1,"mt-3"],["nz-col","",1,"text-base","font-weight-bold"],["nz-col","","nzSpan","24","class","text-black-5 text-base text-center pt-3 pb-2",4,"ngIf"],["nz-col","",1,"text-base","font-weight-bold","text-center",3,"nzSpan"],[3,"click"],["nz-row","",1,"w-100","my-3","infinite-container"],[3,"type","listContent","radioValue","radioEvent"],["nz-col","","nzSpan","24",1,"text-black-5","text-base","text-center","pt-3","pb-2"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between"],[1,"text-black","text-left","text-sm","mb-4",3,"ngClass"],["nz-icon","","nzType","exclamation-circle",1,"mr-2","text-info"],[1,"font-weight-bold",3,"routerLink"],["nz-col","","nzSpan","24","class","text-warning text-sm pt-3",4,"ngIf"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle",1,"d-flex","w-100","justify-content-end"],["nz-button","","nzType","outline",1,"mx-2","mt-4",3,"click"],["nz-button","","nzType","primary",1,"mt-4",3,"nzLoading","disabled","click"],["nzBlock","","nz-button","","nzType","outline",1,"mb-2",3,"click"],["nz-button","","nzType","primary","nzBlock","",3,"nzLoading","disabled","click"],["nz-col","","nzSpan","24",1,"text-warning","text-sm","pt-3"],["nz-icon","","nzType","info-circle","nzTheme","fill"],["nz-button","","nzType","outline",1,"mr-3","mt-4",3,"click"],["nz-button","","nzBlock","","nzType","primary",3,"nzLoading","disabled","click"]],template:function(t,e){1&t&&(z.od(0,Ps,4,6,"app-web-scaffold",0),z.Ec(1,"async"),z.od(2,ws,2,1,"app-mobile-scaffold",0),z.Ec(3,"async"),z.od(4,da,31,30,"ng-template",null,1,z.pd),z.rc(6,"new-emandate",2),z.zc("visibleChange",(function(t){return e.newDdaModelVisible=t}))("visibleChange",(function(){return e.onCloseApplyNewDda()}))("bankDetail",(function(t){return e.onCreateBank(t)})),z.qc(),z.rc(7,"fep-breached-modal",3),z.zc("showModalChange",(function(t){return e.fepBreached=t})),z.qc(),z.rc(8,"passport-expiry-notification",4),z.zc("onOkEmit",(function(){return e.passportNoticeVisible=!1}))("onUpdateEmit",(function(){return e.passportNoticeVisible=!1})),z.qc()),2&t&&(z.Mc("ngIf",!z.Fc(1,10,e.isMobile$)&&e.selectedPortfolio),z.Ub(2),z.Mc("ngIf",e.selectedPortfolio&&z.Fc(3,12,e.isMobile$)),z.Ub(4),z.Mc("refno",e.formRefno)("visible",e.newDdaModelVisible)("bankList",e.newBankList),z.Ub(1),z.Mc("showModal",e.fepBreached)("refno",e.refno),z.Ub(1),z.Mc("modalVisible",e.passportNoticeVisible)("isPopUp",!1)("footerFunc",!0))},directives:[P.t,oe,fo.a,mo.a,R.a,yt.a,kc.a,P.A,H.a,ut.a,P.q,V.c,V.a,As.a,mt.b,jt.e,st.J,st.u,Et.b,st.l,Ht.d,st.t,st.j,P.s,At.c,st.c,st.z,At.b,Ht.a,ft.a,q.h,Y.a,pt.a],pipes:[P.b],styles:[".product-background[_ngcontent-%COMP%]{background-color:#f5f8f9}.infinite-container[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;overflow-x:hidden} .custom-scrollable-modal{display:flex!important;align-items:center;justify-content:center;padding:24px} .custom-scrollable-modal .ant-modal{top:0!important;margin:0 auto} .custom-scrollable-modal .ant-modal-body{max-height:70vh;overflow-y:auto}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(T.a.getAccounts)],t.prototype,"acctList$",void 0),t})();var pa=n("Jxbx");function ha(t,e){1&t&&(z.rc(0,"div",7),z.rc(1,"h3"),z.qd(2,"Others Fees"),z.qc(),z.rc(3,"div",8),z.rc(4,"b"),z.qd(5,"Stamp Duty"),z.qc(),z.qc(),z.rc(6,"div",9),z.rc(7,"b"),z.qd(8,"MYR 1.00"),z.qc(),z.qd(9," for every "),z.rc(10,"b"),z.qd(11,"MYR 1,000.00"),z.qc(),z.qd(12," contract value, maximum "),z.rc(13,"b"),z.qd(14,"MYR 200.00"),z.qc(),z.qc(),z.qc())}function fa(t,e){1&t&&(z.rc(0,"div",7),z.rc(1,"h3"),z.qd(2,"Others Fees"),z.qc(),z.rc(3,"div",10),z.rc(4,"div"),z.rc(5,"b"),z.qd(6,"Stamp Duty"),z.qc(),z.qc(),z.rc(7,"div",9),z.rc(8,"b"),z.qd(9,"MYR 1.00"),z.qc(),z.qd(10," for every "),z.rc(11,"b"),z.qd(12,"MYR 1,000.00"),z.qc(),z.qd(13," contract value, maximum "),z.rc(14,"b"),z.qd(15,"MYR 200.00"),z.qc(),z.qc(),z.qc(),z.rc(16,"div",11),z.rc(17,"div"),z.rc(18,"b"),z.qd(19,"Exchange Settlement Fee"),z.mc(20,"br"),z.rc(21,"span",12),z.qd(22,"(inclusive of CCASS Fee, Trading Tariff and Exchange-related Fee)"),z.qc(),z.qc(),z.qc(),z.rc(23,"div",9),z.qd(24,"0.0042%"),z.qc(),z.qc(),z.rc(25,"div",11),z.rc(26,"div"),z.rc(27,"b"),z.qd(28,"SFC Transaction Levy"),z.qc(),z.qc(),z.rc(29,"div",9),z.qd(30,"0.0027%"),z.qc(),z.qc(),z.rc(31,"div",13),z.rc(32,"div"),z.rc(33,"b"),z.qd(34,"Trading Fee (HKEX)"),z.qc(),z.qc(),z.rc(35,"div",9),z.qd(36,"0.00565%"),z.qc(),z.qc(),z.qc())}let ma=(()=>{class t{constructor(t){this.router=t,this.closeModal=new z.s,this.stampDutyCatA=["Local/Foreign Shares","Local/Foreign Preferential Shares","Loan Stocks","Local/Foreign A shares","Exchange Traded Bonds"],this.stampDutyCatB=["Local/Foreign Rights","Foreign ETF","Warrants","REIT/Trust and Closed Ended Fund"]}ngOnInit(){this.selectedExchangeCountry=this.getFeeTemplate()}ngOnChanges(t){this.selectedExchangeCountry=this.getFeeTemplate()}closeFeeDetails(){this.closeModal.emit()}viewMore(){this.router.navigate([M.o.PRICING,M.o.ETFS])}getFeeTemplate(){switch(this.exchange){case M.q.LSE:case M.q.BURSA:return"uk";case M.q.HKEX:return"hk";case M.q.NYSE:case M.q.AMEX:case M.q.BATS:case M.q.NASDAQ:return"uk"}}}return t.\u0275fac=function(e){return new(e||t)(z.lc(q.e))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-etf-fee-details"]],inputs:{visible:"visible",exchange:"exchange"},outputs:{closeModal:"closeModal"},features:[z.Sb],decls:11,vars:4,consts:[["nzWrapClassName","vertical-center-modal",3,"nz
1Visible","nzWidth","nzFooter","nzOnCancel"],[3,"ngTemplateOutlet"],[1,"text-right"],["nz-button","","nzType","outline",1,"mr-2",3,"click"],["nz-button","","nzType","primary",3,"click"],["ukFeeTemplate",""],["hkFeeTemplate",""],[1,"p-4"],[1,"mt-3"],[1,"mt-1"],[1,"mt-3","pb-3","fee-info-field-container"],[1,"pb-3","pt-3","fee-info-field-container"],[1,"text-sm"],[1,"pb-3","pt-3"]],template:function(t,e){if(1&t&&(z.rc(0,"nz-modal",0),z.zc("nzOnCancel",(function(){return e.closeFeeDetails()})),z.nc(1,1),z.rc(2,"div",2),z.rc(3,"button",3),z.zc("click",(function(){return e.viewMore()})),z.qd(4,"View More"),z.qc(),z.rc(5,"button",4),z.zc("click",(function(){return e.closeFeeDetails()})),z.qd(6," Understand "),z.qc(),z.qc(),z.qc(),z.od(7,ha,15,0,"ng-template",null,5,z.pd),z.od(9,fa,37,0,"ng-template",null,6,z.pd)),2&t){const t=z.ad(8),n=z.ad(10);z.Mc("nzVisible",e.visible)("nzWidth",600)("nzFooter",null),z.Ub(1),z.Mc("ngTemplateOutlet","uk"===e.selectedExchangeCountry?t:n)}},directives:[yt.a,P.A,Y.a],styles:[".fee-info-field-container[_ngcontent-%COMP%]{border-bottom:2px dashed #d3d3d3!important}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();var ba=n("TaO5");function ga(t,e){if(1&t){const t=z.sc();z.rc(0,"app-web-scaffold"),z.rc(1,"nz-modal",5),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc().closeRspDetails()})),z.nc(2,6),z.qc(),z.qc()}if(2&t){const t=z.Dc(),e=z.ad(5);z.Ub(1),z.Mc("nzVisible",t.visible)("nzClosable",!0)("nzTitle",null)("nzWidth",600)("nzFooter",null),z.Ub(1),z.Mc("ngTemplateOutlet",e)}}function ya(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",7),z.rc(2,"b2c-app-bar-2",8),z.zc("back",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qc(),z.qc(),z.nc(3,6),z.oc()}if(2&t){z.Dc(2);const t=z.ad(5);z.Ub(2),z.Mc("title","Order Cart"),z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Ma(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,ya,4,2,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.visible)}}function va(t,e){if(1&t&&z.mc(0,"ui-option",47),2&t){const t=e.$implicit;z.Mc("nzLabel",t.accountTypeDisplay)("nzValue",t.refno)}}function Ca(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," Please choose an account. "),z.qc())}function Ta(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," You do not have the fund in your holdings. "),z.qc())}function Sa(t,e){if(1&t&&z.mc(0,"ui-option",48),2&t){const t=e.$implicit;z.Mc("nzValue",t)("nzLabel",t.label)}}function Da(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," Please make sure this field is not blank. "),z.qc())}function za(t,e){if(1&t&&z.mc(0,"ui-option",47),2&t){const t=e.$implicit;z.Mc("nzLabel",t)("nzValue",t)}}function qa(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," Please make sure this field is not blank. "),z.qc())}function Ea(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function Aa(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(4);z.Ub(1),z.sd(" Amount must be greater than ",null==t.selectedEtf?null:t.selectedEtf.minSubAmtInMyr,". ")}}function Pa(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(4);z.Ub(1),z.sd(" Amount must be greater than ",null==t.selectedEtf?null:t.selectedEtf.minSubAmtInUsd,". ")}}function Ra(t,e){if(1&t&&(z.pc(0),z.od(1,Aa,2,1,"ng-container",0),z.od(2,Pa,2,1,"ng-container",0),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("ngIf",t.selectedPaymentMethod.value===t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT||t.selectedPaymentMethod.value===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&t.investmentCurrency===t.transactionConstant.PAYMENT_CURRENCY_MYR),z.Ub(1),z.Mc("ngIf",t.selectedPaymentMethod.value===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&t.investmentCurrency===t.transactionConstant.PAYMENT_CURRENCY_USD)}}function wa(t,e){1&t&&(z.pc(0),z.qd(1," Amount accept up to 2 d.p. "),z.oc())}function Fa(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" The available amount is ",null==t.selectedBank?null:t.selectedBank.availableAmount,". ")}}function Ia(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"Time"),z.qc())}function Ua(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"Times"),z.qc())}function Oa(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," Please make sure to select at least one date. "),z.qc())}function xa(t,e){if(1&t&&(z.rc(0,"div",27),z.rc(1,"div",28),z.Ec(2,"async"),z.rc(3,"ui-input-group",49),z.mc(4,"input",50),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("ngClass",z.Fc(2,1,t.isMobile$)?"mb-2":"mr-2 mb-2")}}function La(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"We are processing the RSP transaction today. Any Applications, Termination or change in RSP Amount request will not able to process currently. Please submit your request on next business day."),z.qc())}function ka(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"RSP Applications, Termination or change in RSP Amount instructions are not accepted from 0000 hrs to 0600 hrs on every 26th calendar day of each month, please try again later."),z.qc())}function Na(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"RSP Applications, Termination or change in RSP Amount instructions are not accepted from 0000 hrs to 0600 hrs on every 15th calendar day of each month, please try again later."),z.qc())}function _a(t,e){if(1&t&&(z.rc(0,"div",51),z.Ec(1,"async"),z.rc(2,"nz-row",52),z.rc(3,"nz-col",53),z.mc(4,"i",54),z.qc(),z.rc(5,"nz-col",55),z.od(6,La,2,0,"span",0),z.od(7,ka,2,0,"span",0),z.od(8,Na,2,0,"span",0),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Fc(1,4,t.isMobile$)?"mb-2":"mt-2"),z.Ub(6),z.Mc("ngIf","weekly"===t.frequency||"bi-weekly"===t.frequency||"self-select"===t.frequency),z.Ub(1),z.Mc("ngIf","monthly"===t.frequency&&t.paymentMethod===t.rspConstants.PAYMENT_METHOD_SALARY_ACCT),z.Ub(1),z.Mc("ngIf","monthly"===t.frequency&&t.paymentMethod!==t.rspConstants.PAYMENT_METHOD_SALARY_ACCT)}}const Ba=function(){return["/app/rsp/create-rsp/cash-acct-rsp"]};function Va(t,e){if(1&t&&(z.rc(0,"div",56),z.Ec(1,"async"),z.rc(2,"nz-row",52),z.rc(3,"nz-col",53),z.mc(4,"i",57),z.qc(),z.rc(5,"nz-col",55),z.rc(6,"span"),z.qd(7,"You can now automate "),z.rc(8,"a",58),z.qd(9,"MYR Cash Account top-up with RSP"),z.qc(),z.qd(10,"; no more missed deductions!"),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Fc(1,2,t.isMobile$)?"mb-2":"mt-2"),z.Ub(8),z.Mc("routerLink",z.Rc(4,Ba))}}function Ya(t,e){1&t&&(z.rc(0,"div",65),z.qd(1,"Looks like you do not have a FPX e-Mandate Account"),z.qc())}function Ha(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," Please choose at least one bank to complete your RSP application "),z.qc())}function ja(t,e){if(1&t){const t=z.sc();z.rc(0,"div",59),z.rc(1,"div",60),z.qd(2,"Select Your e-Mandate"),z.qc(),z.od(3,Ya,2,0,"div",61),z.rc(4,"div",62),z.rc(5,"a",21),z.zc("click",(function(){return z.dd(t),z.Dc(3).onApplyNewDda()})),z.qd(6,"Apply New e-Mandate"),z.qc(),z.qc(),z.rc(7,"div",63),z.rc(8,"b2c-rsp",64),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(3).onSelectedBank(e)})),z.qc(),z.qc(),z.od(9,Ha,2,0,"div",31),z.qc()}if(2&t){const t=z.Dc(3);var n=null;const e=(null==(n=t.rspBuyForm.get("bank"))?null:n.dirty)&&(null==(n=t.rspBuyForm.get("bank"))?null:n.hasError("required"));z.Ub(3),z.Mc("ngIf",0===t.rspConvertedBankList.length),z.Ub(1),z.Mc("nzSpan",0===t.rspConvertedBankList.length?24:""),z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString()),z.Ub(1),z.Mc("ngIf",e)}}function $a(t,e){1&t&&(z.rc(0,"div",37),z.qd(1," Please choose at least one bank to complete your RSP application "),z.qc())}function Ga(t,e){if(1&t){const t=z.sc();z.rc(0,"div",59),z.rc(1,"div",60),z.qd(2,"Select Your DDA"),z.qc(),z.rc(3,"div",63),z.rc(4,"b2c-rsp",64),z.zc("radioEvent",(function(e){return z.dd(t),z.Dc(3).onSelectedBank(e)})),z.qc(),z.qc(),z.od(5,$a,2,0,"div",31),z.qc()}if(2&t){const t=z.Dc(3);var n=null;const e=(null==(n=t.rspBuyForm.get("bank"))?null:n.dirty)&&(null==(n=t.rspBuyForm.get("bank"))?null:n.hasError("required"));z.Ub(4),z.Mc("type","list")("listContent",t.rspConvertedBankList)("radioValue",null==t.selectedBank||null==t.selectedBank.bankCode?null:t.selectedBank.bankCode.toString()),z.Ub(1),z.Mc("ngIf",e)}}const Wa=function(){return{padding:"9px",height:"50px"}};function Xa(t,e){if(1&t){const t=z.sc();z.rc(0,"form",25),z.rc(1,"div",26),z.rc(2,"div",27),z.rc(3,"div",28),z.Ec(4,"async"),z.rc(5,"ui-select",29),z.od(6,va,1,2,"ui-option",30),z.Ec(7,"async"),z.qc(),z.od(8,Ca,2,0,"div",31),z.od(9,Ta,2,0,"div",31),z.qc(),z.qc(),z.rc(10,"div",27),z.rc(11,"div",28),z.Ec(12,"async"),z.rc(13,"ui-select",32),z.zc("ngModelChange",(function(e){z.dd(t);const n=z.Dc(2);var i;return n.onChangePaymentMethod(!1,e,null!=(i=n.rspBuyForm.get("bank"))&&null!=i.value&&i.value.bankCode?n.rspBuyForm.get("bank").value.bankCode:"new")})),z.od(14,Sa,1,2,"ui-option",33),z.qc(),z.od(15,Da,2,0,"div",31),z.qc(),z.qc(),z.rc(16,"div",27),z.rc(17,"div",28),z.Ec(18,"async"),z.rc(19,"ui-select",34),z.od(20,za,1,2,"ui-option",30),z.qc(),z.od(21,qa,2,0,"div",31),z.qc(),z.qc(),z.rc(22,"div",27),z.rc(23,"div",28),z.Ec(24,"async"),z.rc(25,"ui-input-group",35),z.mc(26,"input",36),z.qc(),z.rc(27,"div",37),z.od(28,Ea,2,0,"ng-container",0),z.od(29,Ra,3,2,"ng-container",0),z.od(30,wa,2,0,"ng-container",0),z.od(31,Fa,2,1,"ng-container",0),z.qc(),z.qc(),z.qc(),z.rc(32,"div",27),z.rc(33,"div",28),z.Ec(34,"async"),z.rc(35,"nz-card",38),z.rc(36,"div",39),z.rc(37,"div",40),z.qd(38,"Select RSP Date"),z.qc(),z.rc(39,"div",41),z.qd(40),z.od(41,Ia,2,0,"span",0),z.od(42,Ua,2,0,"span",0),z.qc(),z.qc(),z.rc(43,"nz-checkbox-group",42),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).frequencySelectedCount()}
1)),z.qc(),z.qc(),z.od(44,Oa,2,0,"div",31),z.qc(),z.qc(),z.od(45,xa,5,3,"div",43),z.qc(),z.rc(46,"div"),z.od(47,_a,9,6,"div",44),z.od(48,Va,11,5,"div",45),z.od(49,ja,10,6,"div",46),z.od(50,Ga,6,4,"div",46),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);var n=null;const e=(null==(n=t.rspBuyForm.get("refno"))?null:n.dirty)&&(null==(n=t.rspBuyForm.get("refno"))?null:n.hasError("required"));var i=null;const d=(null==(i=t.rspBuyForm.get("refno"))?null:i.dirty)&&(null==(i=t.rspBuyForm.get("refno"))?null:i.hasError("acctValidator"));var c=null;const u=(null==(c=t.rspBuyForm.get("paymentMethod"))?null:c.dirty)&&(null==(c=t.rspBuyForm.get("paymentMethod"))?null:c.hasError("required"));var o=null;const p=(null==(o=t.rspBuyForm.get("investmentCurrency"))?null:o.dirty)&&(null==(o=t.rspBuyForm.get("investmentCurrency"))?null:o.hasError("required"));var s=null;const h=(null==(s=t.rspBuyForm.get("investmentAmount"))?null:s.dirty)&&(null==(s=t.rspBuyForm.get("investmentAmount"))?null:s.hasError("required"));var a=null;const f=(null==(a=t.rspBuyForm.get("investmentAmount"))?null:a.dirty)&&(null==(a=t.rspBuyForm.get("investmentAmount"))?null:a.hasError("min"));var r=null;const m=(null==(r=t.rspBuyForm.get("investmentAmount"))?null:r.dirty)&&(null==(r=t.rspBuyForm.get("investmentAmount"))?null:r.hasError("pattern"));var l=null;const b=(null==(l=t.rspBuyForm.get("investmentAmount"))?null:l.dirty)&&(null==(l=t.rspBuyForm.get("investmentAmount"))?null:l.hasError("max"));z.Mc("formGroup",t.rspBuyForm),z.Ub(3),z.Mc("ngClass",z.Fc(4,31,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzDropdownMatchSelectWidth",!1)("nzDisabled",!0),z.Ub(1),z.Mc("ngForOf",z.Fc(7,33,t.acctList$)),z.Ub(2),z.Mc("ngIf",e),z.Ub(1),z.Mc("ngIf",d),z.Ub(2),z.Mc("ngClass",z.Fc(12,35,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzDisabled",(null==t.paymentMethodList?null:t.paymentMethodList.length)<=1),z.Ub(1),z.Mc("ngForOf",t.paymentMethodList),z.Ub(1),z.Mc("ngIf",u),z.Ub(2),z.Mc("ngClass",z.Fc(18,37,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzDisabled",!0),z.Ub(1),z.Mc("ngForOf",t.investmentCurrencyList),z.Ub(1),z.Mc("ngIf",p),z.Ub(2),z.Mc("ngClass",z.Fc(24,39,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(5),z.Mc("ngIf",h),z.Ub(1),z.Mc("ngIf",f),z.Ub(1),z.Mc("ngIf",m),z.Ub(1),z.Mc("ngIf",b),z.Ub(2),z.Mc("ngClass",z.Fc(34,41,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzBodyStyle",z.Rc(43,Wa)),z.Ub(5),z.sd(" ",t.totalDates," "),z.Ub(1),z.Mc("ngIf",t.totalDates<2),z.Ub(1),z.Mc("ngIf",t.totalDates>=2),z.Ub(2),z.Mc("ngIf",(null==t.rspFrequency?null:t.rspFrequency.dirty)&&(null==t.rspFrequency?null:t.rspFrequency.hasError("required"))),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT||t.paymentMethod===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP),z.Ub(2),z.Mc("ngIf",t.freezePeriodError),z.Ub(1),z.Mc("ngIf",t.showTopUpStatement&&t.paymentMethod!==t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_FPX),z.Ub(1),z.Mc("ngIf",t.paymentMethod===t.rspConstants.PAYMENT_METHOD_DDA)}}function Ka(t,e){if(1&t&&(z.rc(0,"div",72),z.mc(1,"i",73),z.qd(2),z.qc()),2&t){const t=z.Dc(3);var n=null;z.Ub(2),z.sd(" ",null==t.rspBuyForm||null==(n=t.rspBuyForm.get("investmentAmount"))?null:n.getError("invalidBuy")," ")}}function Ja(t,e){if(1&t&&(z.rc(0,"div",72),z.mc(1,"i",73),z.qd(2),z.qc()),2&t){const t=z.Dc(3);var n=null;z.Ub(2),z.sd(" ",null==t.rspBuyForm||null==(n=t.rspBuyForm.get("investmentAmount"))?null:n.getError("invalidBuy")," ")}}function Za(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-web-scaffold"),z.od(2,Ka,3,1,"div",66),z.rc(3,"div",67),z.rc(4,"button",68),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qd(5,"Cancel"),z.qc(),z.rc(6,"button",69),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(7,"Add To Cart"),z.qc(),z.qc(),z.qc(),z.rc(8,"app-mobile-scaffold"),z.rc(9,"b2c-floating-bar"),z.od(10,Ja,3,1,"div",66),z.rc(11,"button",70),z.zc("click",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qd(12,"Cancel"),z.qc(),z.rc(13,"button",71),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(14,"Add To Cart"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);var n=null;const e=null==t.rspBuyForm||null==(n=t.rspBuyForm.get("investmentAmount"))?null:n.hasError("invalidBuy");var i=null;const c=null==t.rspBuyForm||null==(i=t.rspBuyForm.get("investmentAmount"))?null:i.hasError("invalidBuy");z.Ub(2),z.Mc("ngIf",e),z.Ub(4),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError),z.Ub(4),z.Mc("ngIf",c),z.Ub(3),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError)}}function Qa(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"app-web-scaffold"),z.rc(2,"div",67),z.rc(3,"button",68),z.zc("click",(function(){return z.dd(t),z.Dc(2).removeRspCart()})),z.qd(4,"Remove"),z.qc(),z.rc(5,"button",69),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(6,"Update To Cart"),z.qc(),z.qc(),z.qc(),z.rc(7,"app-mobile-scaffold"),z.rc(8,"b2c-floating-bar"),z.rc(9,"button",74),z.zc("click",(function(){return z.dd(t),z.Dc(2).removeRspCart()})),z.qd(10,"Remove"),z.qc(),z.rc(11,"button",71),z.zc("click",(function(){return z.dd(t),z.Dc(2).addToCart()})),z.qd(12,"Update To Cart"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);z.Ub(5),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError),z.Ub(6),z.Mc("nzLoading",t.isLoading)("disabled",(null==t.rspBuyForm?null:t.rspBuyForm.dirty)&&"VALID"!==(null==t.rspBuyForm?null:t.rspBuyForm.status)||t.freezePeriodError)}}const tr=function(t){return{"shadow py-3 px-2 mb-6":t}},er=function(t){return{"pt-3":t}},nr=function(t){return{"border-bottom":t}};function ir(t,e){if(1&t){const t=z.sc();z.rc(0,"div",9),z.Ec(1,"async"),z.rc(2,"h3",10),z.zc("click",(function(){z.dd(t);const e=z.Dc();return e.redirectToFactsheetPage(e.selectedEtf)})),z.qd(3),z.qc(),z.rc(4,"div",11),z.mc(5,"app-stock-exchange-tag",12),z.rc(6,"span",13),z.qd(7),z.qc(),z.qc(),z.rc(8,"div",14),z.Ec(9,"async"),z.rc(10,"div",15),z.rc(11,"div",16),z.rc(12,"div",17),z.rc(13,"div",18),z.Ec(14,"async"),z.rc(15,"div",19),z.qd(16,"Min. RSP Amount"),z.qc(),z.rc(17,"div",20),z.Ec(18,"async"),z.qd(19),z.Ec(20,"number"),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(21,"div",16),z.rc(22,"div",17),z.rc(23,"div",18),z.Ec(24,"async"),z.rc(25,"div",19),z.qd(26,"RSP Processing Fee"),z.qc(),z.rc(27,"div",20),z.Ec(28,"async"),z.qd(29),z.Ec(30,"number"),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(31,"div",16),z.rc(32,"div",17),z.rc(33,"div",18),z.Ec(34,"async"),z.rc(35,"div",19),z.qd(36,"Others Fee"),z.qc(),z.rc(37,"div",20),z.Ec(38,"async"),z.rc(39,"a",21),z.zc("click",(function(){return z.dd(t),z.Dc().showOtherFeeDetails()})),z.qd(40,"View Details"),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(41,"div",22),z.od(42,Xa,51,44,"form",23),z.qc(),z.od(43,Za,15,6,"ng-container",0),z.od(44,Qa,13,4,"ng-container",0),z.rc(45,"rsp-etf-fee-details",24),z.zc("closeModal",(function(){return z.dd(t),z.Dc().closeOtherFeeDetails()})),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Mc("ngClass",z.Sc(46,tr,z.Fc(1,24,t.isMobile$))),z.Ub(3),z.rd(t.selectedEtf.etfName),z.Ub(2),z.Mc("exch
1ange",t.selectedEtf.exchange),z.Ub(2),z.rd(t.selectedEtf.stockCode),z.Ub(1),z.Mc("ngClass",z.Sc(48,er,!z.Fc(9,26,t.isMobile$))),z.Ub(5),z.Mc("ngClass",z.Sc(50,nr,z.Fc(14,28,t.isMobile$))),z.Ub(4),z.Wb("text-base font-weight-bold "+(z.Fc(18,30,t.isMobile$)?"text-right":"")),z.Ub(2),z.td(" ",t.investmentCurrency," ",z.Gc(20,32,(null==t||null==t.selectedPaymentMethod?null:t.selectedPaymentMethod.value)===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&t.investmentCurrency===t.transactionConstant.PAYMENT_CURRENCY_USD?null==t.selectedEtf?null:t.selectedEtf.minSubAmtInUsd:null==t.selectedEtf?null:t.selectedEtf.minSubAmtInMyr,".2-2")," "),z.Ub(4),z.Mc("ngClass",z.Sc(52,nr,z.Fc(24,35,t.isMobile$))),z.Ub(4),z.Wb("text-base font-weight-bold "+(z.Fc(28,37,t.isMobile$)?"text-right":"")),z.Ub(2),z.ud("",null==t.selectedEtf?null:t.selectedEtf.processingFeeRate,"% or Min ",null==t.selectedEtf?null:t.selectedEtf.currency," ",z.Gc(30,39,null==t.selectedEtf?null:t.selectedEtf.feeMin,".2-2"),""),z.Ub(4),z.Mc("ngClass",z.Sc(54,nr,z.Fc(34,42,t.isMobile$))),z.Ub(4),z.Wb("text-base font-weight-bold "+(z.Fc(38,44,t.isMobile$)?"text-right":"")),z.Ub(5),z.Mc("ngIf",t.rspBuyForm&&!t.isLoading),z.Ub(1),z.Mc("ngIf","add"===t.detailsType),z.Ub(1),z.Mc("ngIf","edit"===t.detailsType),z.Ub(1),z.Mc("visible",t.otherFeeVisible)("exchange",t.exchange)}}const cr=function(){return{}},or=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function sr(t,e){if(1&t){const t=z.sc();z.rc(0,"div",75),z.Ec(1,"async"),z.rc(2,"new-emandate",76),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc().newDdaModelVisible=e}))("visibleChange",(function(){return z.dd(t),z.Dc().onCloseApplyNewDda()}))("bankDetail",(function(e){return z.dd(t),z.Dc().onCreateBank(e)})),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,4,t.isMobile$)?z.Rc(6,cr):z.Rc(7,or)),z.Ub(2),z.Mc("refno",t.formRefno)("visible",t.newDdaModelVisible)("bankList",t.newBankList)}}let ar=(()=>{class t{constructor(t,e,n,i,c,o,s,a){this.store=t,this.fb=e,this.subHandlingService=n,this.stockTransactionRestService=i,this.transactionRestService=c,this.nzNotificationService=o,this.stockHoldingRestService=s,this.passportExpiryNotificationService=a,this.visibleChange=new z.s,this.detailsType="add",this.oriBuyDataStamped=new z.s,this.removeSelectedRsp=new z.s,this.otherFeeVisible=!1,this.showRspAs=!1,this.passportNoticeVisible=!1,this.rspConstants=Yt,this.transactionConstant=h.a,this.investmentCurrencyList=["MYR"],this.paymentMethodList=[],this.existingBankList=[],this.rspConvertedBankList=[],this.newBankList=[],this.isLoading=!1,this.isLoadingInitial=!1,this.selectedBank=null,this.newDdaModelVisible=!1,this.acctValidity=!0,this.rspStockFrequency=[],this.freezePeriodError=!1,this.showTopUpStatement=!1,this.totalDates=0,this.fepBreached=!1}ngOnChanges(t){Object(p.a)([this.initializeRspDetails(),this.getRspFreezePeriod()]).pipe(Object(f.a)(()=>{this.getActiveRSPCashAccount(),this.initializeRspBuyForm(t),this.resetPaymentMethodList()}),Object(Xe.a)(()=>{this.isLoading=!1})).subscribe()}ngOnInit(){this.showRspAs$.subscribe(t=>this.showRspAs=t),Object(p.a)([this.initializeRspDetails(),this.getRspFreezePeriod()]).pipe(Object(f.a)(()=>{this.getActiveRSPCashAccount(),this.initializeRspBuyForm(),this.resetPaymentMethodList()}),Object(Xe.a)(()=>{this.isLoading=!1})).subscribe()}initializeRspBuyForm(t){var e,n,i,c,o,s,a,r,l,d,u,p;if("add"===this.detailsType)this.rspBuyForm?t&&((null===(e=t.stockCode)||void 0===e?void 0:e.previousValue)||(null===(n=t.exchange)||void 0===n?void 0:n.previousValue)||(null===(i=t.refno)||void 0===i?void 0:i.previousValue))&&this.resetFormBuy():this.resetFormBuy(),this.oriBuyData&&(this.oriBuyData.amount&&this.rspBuyForm.get("investmentAmount").patchValue(this.oriBuyData.amount),this.oriBuyData.paymentMethod&&(this.rspBuyForm.get("paymentMethod").patchValue(this.oriBuyData.paymentMethod),this.onChangePaymentMethod(!1,this.oriBuyData.paymentMethod,null===(c=this.oriBuyData.bankCode)||void 0===c?void 0:c.toString())),this.oriBuyDataStamped.emit());else if("edit"===this.detailsType)if(this.oriBuyData){this.oriBuyData.rspStockFrequencyChk&&(this.rspStockFrequency=[],this.oriBuyData.rspStockFrequencyChk.forEach(t=>{this.rspStockFrequency.push({label:t.label,value:t.value,checked:t.checked})})),this.rspBuyForm=this.fb.group({investmentAmount:[this.oriBuyData.amount,[st.H.required,st.H.min(this.selectedEtf.minSubAmtInMyr)]],investmentCurrency:[this.oriBuyData.currency,[st.H.required]],paymentMethod:[this.oriBuyData.paymentMethod,[st.H.required]],rspFrequency:[this.rspStockFrequency,[st.H.required]],frequency:[this.oriBuyData.subscriptionFreq],refno:[this.refno,[st.H.required]],bank:[null],nextRspDate:[{value:null,disabled:!0}]},{validator:this.validateExtra()});let t=(null===(o=this.oriBuyData.paymentMethod)||void 0===o?void 0:o.toString())===this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT?this.rspConstants.CASH_ACCOUNT:null===(s=this.oriBuyData.paymentMethod)||void 0===s?void 0:s.toString();const e={label:(null===(a=this.oriBuyData.currency)||void 0===a?void 0:a.toString())+" "+t,value:null===(r=this.oriBuyData.paymentMethod)||void 0===r?void 0:r.toString()};this.onChangePaymentMethod(!0,e,null===(l=this.oriBuyData.bankCode)||void 0===l?void 0:l.toString())}else t&&((null===(d=t.stockCode)||void 0===d?void 0:d.previousValue)||(null===(u=t.exchange)||void 0===u?void 0:u.previousValue)||(null===(p=t.refno)||void 0===p?void 0:p.previousValue))&&this.resetFormBuy()}resetFormBuy(){this.rspBuyForm=this.fb.group({investmentAmount:[this.selectedEtf.minSubAmtInMyr,[st.H.required,st.H.min(this.selectedEtf.minSubAmtInMyr),st.H.pattern(/^-?(\d+(\.\d{0,2})?|\.?\d{1,2})$/)]],investmentCurrency:["MYR",[st.H.required]],paymentMethod:["",[st.H.required]],refno:[this.refno,[st.H.required]],bank:[null],rspFrequency:[this.rspStockFrequency,[st.H.required]],frequency:[{value:this.getDefaultFreq(),disabled:!0}],nextRspDate:[{value:null,disabled:!0}]},{validator:this.validateExtra()})}initializeRspDetails(){return this.isLoading=!0,this.stockTransactionRestService.getEtfBuyRspDataDetail
1s(this.formRefno?this.formRefno:this.refno,this.stockCode,this.exchange).pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.rspDetails=t.data,this.rspDetails&&(this.investmentCurrencyList=this.rspDetails.currList,this.rspDetails.frequencyList&&(this.rspStockFrequency=[],this.rspDetails.frequencyList.forEach(t=>{this.rspStockFrequency.push({label:null==t?void 0:t.targetDisplay,value:null==t?void 0:t.targetDate,checked:!1})})),this.rspEstNextDate=this.rspDetails.nextRspDate))}))}validateExtra(){return t=>{const e=t.controls.refno;e.errors&&!e.errors.acctValidator||e.setErrors(this.acctValidity?null:{acctValidator:!0})}}resetPaymentMethodList(){console.log("payment method function usd");const t=this.rspDetails.paymentMethod.paymentListWithBalance;this.paymentMethodList=[],t&&t.forEach(t=>{if(-1!=t.indexOf(this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT)&&"edit"!==this.detailsType){const e=t.split("|");this.paymentMethodList.push({label:"Cash Account (MYR "+Object(P.L)(+e[1],M.a.LOCALE_EN,"1.2-2")+")",value:e[0]})}if(this.isAutoSweepEnabled(t)&&"edit"!==this.detailsType){const e=t.split("|"),n=e[0];let i="";const c=parseFloat(e[2]);i=!isNaN(c)&&c>0?`(${n} ${Object(P.L)(c,M.a.LOCALE_EN,"1.2-2")})`:"",this.investmentCurrencyList.push(n),this.paymentMethodList.push({label:`${n} ${e[1]} ${i}`,value:e[1]})}else if(this.isAutoSweepEnabled(t)&&"edit"===this.detailsType){const e=t.split("|"),n=e[0];let i="";const c=parseFloat(e[2]);i=!isNaN(c)&&c>0?`(${n} ${Object(P.L)(c,M.a.LOCALE_EN,"1.2-2")})`:"",this.paymentMethodList.push({label:this.selectedPaymentMethod.label+i,value:this.selectedPaymentMethod.value}),this.paymentMethodList=this.paymentMethodList.filter((t,e,n)=>e===n.findIndex(e=>e.label===t.label));const o=this.selectedPaymentMethod.label.split(" ")[0];this.investmentCurrencyList.push(o)}else t===this.rspConstants.PAYMENT_METHOD_CMF?this.paymentMethodList.push({label:"Cash Management Fund 2 - CMF 2 ",value:t}):t===this.rspConstants.PAYMENT_METHOD_FPX?this.paymentMethodList.push({label:"FPX (e-Mandate)",value:t}):t===this.rspConstants.PAYMENT_METHOD_DDA?this.paymentMethodList.push({label:"DDA",value:t}):t===this.rspConstants.PAYMENT_METHOD_SALARY_ACCT?this.paymentMethodList.push({label:"Salary Account",value:t}):t===this.rspConstants.PAYMENT_METHOD_GO_PAYZ&&this.paymentMethodList.push({label:"GoPayz",value:t})});const e=this.paymentMethodList.find(t=>t.value===this.paymentMethod);e?this.rspBuyForm.get("paymentMethod").patchValue(e):(this.rspBuyForm.get("paymentMethod").patchValue(this.paymentMethodList[0]),this.onChangePaymentMethod(!1,this.paymentMethod,null))}isAutoSweepEnabled(t){var e;const n=null==t?void 0:t.includes(this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP),i=null==t?void 0:t.includes(this.transactionConstant.PAYMENT_CURRENCY_MYR),c=(null===(e=this.selectedEtf)||void 0===e?void 0:e.tradingCurrency)===this.transactionConstant.PAYMENT_CURRENCY_USD&&(null==t?void 0:t.includes(this.transactionConstant.PAYMENT_CURRENCY_USD));return n&&this.showRspAs&&(c||i)}onChangePaymentMethod(t,e,n){this.selectedPaymentMethod=e;const i=e.label.split(" ")[0];(e=e.value)!==this.rspConstants.PAYMENT_METHOD_FPX&&e!==this.rspConstants.PAYMENT_METHOD_DDA&&(n="new"),n&&"new"===(null==n?void 0:n.toString())&&(this.selectedBank=null,this.rspBuyForm.get("bank").patchValue(null)),this.resetValidityBank(),e===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&i===this.transactionConstant.PAYMENT_CURRENCY_USD?this.rspBuyForm.get("investmentCurrency").setValue(this.transactionConstant.PAYMENT_CURRENCY_USD):this.rspBuyForm.get("investmentCurrency").setValue(this.transactionConstant.PAYMENT_CURRENCY_MYR);const c=this.rspDetails.paymentMethod[e];c&&(this.existingBankList=c.existingList?c.existingList:[],this.rspConvertedBankList=this.existingBankList.map(t=>{var e;return{bankName:t.bankName,bankAccount:t.bankAcctNo,bankCode:null===(e=t.bankCode)||void 0===e?void 0:e.toString(),currency:"MYR",usedAmount:t.usedAmount.toString(),totalAmount:t.maxDdaAmount.toString()}}),this.newBankList=c.bankListModel?c.bankListModel:[]),n&&this.onSelectedBank(n),this.updateRspAmount(t),this.updateRspAmountMaxLimit(),this.updateFrequencyField()}resetValidityBank(){this.paymentMethod===this.rspConstants.PAYMENT_METHOD_FPX||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_DDA?this.rspBuyForm.get("bank").setValidators([st.H.required]):this.rspBuyForm.get("bank").setValidators([]),this.rspBuyForm.get("bank").markAsDirty(),this.rspBuyForm.get("bank").updateV
1alueAndValidity()}onSelectedBank(t){const e=this.existingBankList.filter(e=>e.bankCode.toString()===(null==t?void 0:t.toString()));e.length>0&&(this.selectedBank=e[0],this.rspBuyForm.get("bank").patchValue(this.selectedBank),this.updateFormValidity("bank")),this.updateRspAmountMaxLimit()}updateRspAmountMaxLimit(){var t;if(this.selectedBank)this.rspBuyForm.get("investmentAmount").setValidators([st.H.min(this.selectedEtf.minSubAmtInMyr),st.H.max(this.selectedBank.availableAmount),st.H.required,st.H.pattern(/^-?(\d+(\.\d{0,2})?|\.?\d{1,2})$/)]);else{let e;e=(null===(t=this.selectedPaymentMethod)||void 0===t?void 0:t.value)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&this.investmentCurrency===this.transactionConstant.PAYMENT_CURRENCY_USD?this.selectedEtf.minSubAmtInUsd:this.selectedEtf.minSubAmtInMyr,this.rspBuyForm.get("investmentAmount").setValidators([st.H.min(e),st.H.required,st.H.pattern(/^-?(\d+(\.\d{0,2})?|\.?\d{1,2})$/)])}this.rspBuyForm.get("investmentAmount").updateValueAndValidity()}updateRspAmount(t){var e;let n;n=(null===(e=this.selectedPaymentMethod)||void 0===e?void 0:e.value)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&this.investmentCurrency===this.transactionConstant.PAYMENT_CURRENCY_USD?this.selectedEtf.minSubAmtInUsd:this.selectedEtf.minSubAmtInMyr,t||this.rspBuyForm.get("investmentAmount").setValue(n),this.rspBuyForm.get("investmentAmount").updateValueAndValidity()}onChangeFrequency(){this.updateNextRspDateField(),this.checkRspFeezePeriod()}updateNextRspDateField(){this.paymentMethod===this.rspConstants.PAYMENT_METHOD_CMF||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT||this.paymentMethod===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?this.getEstRspNextDateBySelction():this.rspBuyForm.get("nextRspDate").patchValue(null)}updateFrequencyField(){this.updateNextRspDateField(),this.checkRspFeezePeriod()}closeRspDetails(){this.visible=!1,this.visibleChange.emit()}onApplyNewDda(){let t=this.passportExpiryNotificationService.isPersonalAccountPassportExpired();const e=this.formRefno;let n=!1;e&&(n=this.passportExpiryNotificationService.checkPassportExpiredByAccount(e)),t||n?this.passportNoticeVisible=!0:(this.newDdaModelVisible=!0,this.visible=!1)}onCloseApplyNewDda(){this.newDdaModelVisible=!1,this.visible=!0}updateFormValidity(t){if(t)this.rspBuyForm.controls[t].markAsDirty(),this.rspBuyForm.controls[t].updateValueAndValidity();else{if(this.rspBuyForm.controls)for(const t in this.rspBuyForm.controls)this.rspBuyForm.controls[t].markAsDirty(),this.rspBuyForm.controls[t].updateValueAndValidity();this.frequencySelected()||(this.rspFrequency.markAsDirty(),this.rspFrequency.setErrors({required:!0})),this.rspBuyForm.updateValueAndValidity()}}addToCart(){var t,e,n,i,c;let o=this.passportExpiryNotificationService.isPersonalAccountPassportExpired();const s=this.formRefno;let a=!1;if(s&&(a=this.passportExpiryNotificationService.checkPassportExpiredByAccount(s)),o||a)return void(this.passportNoticeVisible=!0);if(this.updateFormValidity(),"VALID"!==this.rspBuyForm.status)return;this.refno!==this.formRefno&&this.store.dispatch(new y.N(this.formRefno));const r=this.paymentMethodList.filter(t=>this.selectedPaymentMethod.label===t.label);let l,d=r?null===(t=r[0])||void 0===t?void 0:t.label:"";if(d&&(this.selectedPaymentMethod.value===this.rspConstants.PAYMENT_METHOD_FPX||this.selectedPaymentMethod.value===this.rspConstants.PAYMENT_METHOD_DDA)){if(!this.selectedBank)return void this.nzNotificationService.error("Error","Please choose a bank.");d="Y"===this.selectedBank.isEmandate?"e-Mandate "+this.selectedBank.bankName:this.selectedPaymentMethod+" "+this.selectedBank.bankName}let u=this.frequencySelected(),p=this.frequencySelectedCount()+" times";this.frequencySelectedCount()<2&&(p=this.frequencySelectedCount()+" time");let m=this.frequencySelectedDisplay();l={refno:this.formRefno,productType:so.a.ETF,productName:this.selectedEtf.etfName,orderStatus:h.a.ADDED_TO_CART,displayTitle:d,buyInfoModel:{amount:this.rspBuyForm.get("investmentAmount").value,bankCode:this.selectedBank?this.selectedBank.bankCode:null,bankLimit:this.selectedBank?this.selectedBank.maxDdaAmount:null,bankAcctNo:null,bankAcctName:null,fpxBankId:null,paymentId:null===(e=this.selectedBank)||void 0===e?void 0:e.ddaId,currency:this.rspBuyForm.get("investmentCurrency").value,investmentType:"rsp",paymentMethod:this.selectedPaymentMethod.value,paymentMode:this.selectedPaymentMethod.value,sedolNumber:this.selectedEtf.stockCode,exchange:this.selectedEtf.exchange,salesCharge:Object(ao.Gb)(this.selectedEtf.processingFeeRate),salesChargeDesc:(null===(n=this.selectedEtf)||void 0===n?void 0:n.processingFeeRate)+"% or Min "+(null===(i=this.selectedEtf)||void 0===i?void 0:i.currency)+" "+(null===(c=this.selectedEtf)||void 0===c?void 0:c.feeMin),rspProductType:"ETF",subscriptionFreq:this.frequency,rspStockFrequency:u,rspStockFrequencyChk:this.rspFrequency.value,rspStockFrequencyDisplay:m,frequencyDisplay:p,rspEtfData:this.selectedEtf}};const b=this.formRefno;this.isLoading=!0,this.subHandlingService.once(this.transactionRestService.validateRSPBuy(b,l.buyInfoModel).pipe(Object(f.a)(t=>{if(this.isLoading=!1,t.status===M.a.RESPONSE_FAILED)return t.errorMessage.includes("foreign.exch
1ange.policy.breached")?void(this.fepBreached=!0):void this.rspBuyForm.get("investmentAmount").setErrors({invalidBuy:t.errorMessage});"edit"===this.detailsType&&this.removeSelectedRsp.emit({stockCode:this.selectedEtf.stockCode,exchange:this.selectedEtf.exchange}),this.store.dispatch(new v.a(l)),this.closeRspDetails()})))}onCreateBank(t){}removeRspCart(){this.closeRspDetails(),this.removeSelectedRsp.emit({stockCode:this.selectedEtf.stockCode,exchange:this.selectedEtf.exchange})}get paymentMethod(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("paymentMethod").value}get investmentCurrency(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("investmentCurrency").value}get formRefno(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("refno").value}get frequency(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("frequency").value}get rspFrequency(){var t;return null===(t=this.rspBuyForm)||void 0===t?void 0:t.get("rspFrequency")}getDefaultFreq(){return"self-select"}getRspFreezePeriod(){return this.transactionRestService.getRspFreezePeriod().pipe(Object(f.a)(t=>{t&&t.status===M.a.RESPONSE_SUCCESS&&(this.freezePeriodMap=t.data)}))}frequencySelected(){let t="";return this.rspFrequency.value.map(e=>{e.checked&&(t+=e.value+",")}),t&&t.length>1&&(t=t.substring(0,t.length-1)),t}frequencySelectedDisplay(){let t="";return this.rspFrequency.value.map(e=>{e.checked&&(t+=t?` ${e.label},`:e.label+",")}),t&&t.length>3&&(t=t.substring(0,t.length-1)),t}frequencySelectedCount(){let t=0;return this.rspFrequency.value.map(e=>{e.checked&&(t+=1)}),this.totalDates=t,this.getEstRspNextDateBySelction(),t}getEstRspNextDateBySelction(){var t;let e=this.frequencySelected();console.log("special target console",e);const n=["1","8","15","22"],i=n.map(Number).sort((t,e)=>t-e),c=(new Date).getDate(),o=(new Date).getMonth();let s=!1;e||(e=(null===(t=i.find(t=>c<t))||void 0===t?void 0:t.toString())||i[0].toString(),console.log("return target date",e),s=!0);const a=this.paymentMethod===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP:null,r=t=>this.rspBuyForm.get("nextRspDate").patchValue(t);let l=0;const d=t=>{const i=Object(g.a)(t),c=this.parseCustomDate(t),s=c.getDate(),a=c.getMonth();if(1===s&&a!==o+1||1!==s&&a!==o){const t=(n.indexOf(e)+1)%n.length;e=n[t],l++,l>=n.length?(console.log("All targets tried, patching the first response."),r(i)):u()}else r(t)},u=()=>{this.transactionRestService.getRspNextEstGenDate(e,a).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS&&(null==t?void 0:t.data)&&(s?d(t.data):r(t.data))})};u()}checkRspFeezePeriod(){this.freezePeriodError=!1}showOtherFeeDetails(){this.otherFeeVisible=!0}closeOtherFeeDetails(){this.otherFeeVisible=!1}getActiveRSPCashAccount(t){let e=[],n=[],i=0;this.transactionRestService.findRspTransaction(null!=t?t:this.refno,null).subscribe(t=>{if(t.status===M.a.RESPONSE_SUCCESS){n=t.data.result;const c=Object.keys(n);for(const t of c){const i=n[t];i&&i.forEach(t=>{t&&e.push(t)})}e.forEach(t=>{"Cash Account"===t.fundName&&"active"===t.fundStatus&&i++}),this.showTopUpStatement=!(i>=1)}})}redirectToFactsheetPage(t){let e=t.stockCode,n=t.exchange;if(e&&n){const t=Object(rt.f)(ct.b.ETF,e,"",name,n);Object(at.a)(t.route,t.params)}}parseCustomDate(t){const e={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};try{const n=t.split(" ");if(3!==n.length)return console.log("Invalid date format. Expected format: dd MMM yyyy"),null;const i=parseInt(n[0],10),c=parseInt(n[2],10);if(isNaN(i)||isNaN(c))return console.log("Invalid day or year. They must be numbers."),null;const o=e[n[1]];if(!o)return console.log("Invalid month. Must be one of Jan, Feb, Mar, etc."),null;if(i<1||i>31)return console.log("Invalid day. Must be between 1 and 31."),null;const s=new Date(c,o,i);return s&&s.getDate()===i?s:(console.log("Invalid date or the day does not match the input day."),null)}catch(n){return console.log("Error parsing date: "+n.message),null}}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(st.g),z.lc(C.a),z.lc(nn.a),z.lc(lt.a),z.lc(St.b),z.lc(pa.a),z.lc(Fi.a))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-etf-details"]],inputs:{stockCode:"stockCode",exchange:"exchange",selectedEtf:"selectedEtf",refno:"refno",visible:"visible",detailsType:"detailsType",oriBuyData:"oriBuyData"},outputs:{visibleChange:"visibleChange",oriBuyDataStamped:"oriBuyDataStamped",removeSelectedRsp:"removeSelectedRsp"},features:[z.Tb([C.a]),z.Sb],decls:9,vars:12,consts:[[4,"ngIf"],["preViewAddToCart",""],[3,"ngStyle",4,"ngIf"],[3,"showModal","refno","showModalChange"],[3,"modalVisible","isPopUp","footerFunc","onOkEmit","onUpdateEmit"],["nzWrapClassName","vertical-center-modal",3,"nz
1Visible","nzClosable","nzTitle","nzWidth","nzFooter","nzOnCancel"],[3,"ngTemplateOutlet"],[1,"border-bottom"],[3,"title","back"],[1,"bg-white",3,"ngClass"],[1,"header-line","pr-4","mb-2","pointer",3,"click"],[1,"mb-3"],[3,"exchange"],[1,"ml-2"],[1,"bg-black-2","p-2","mb-4",3,"ngClass"],["nz-row","","nzType","flex","nzJustify","left","nzAlign","top",1,"bg-lighter"],["nz-col","","nzLg","8","nzXs","24"],[1,"p-1"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","left","nzAlign","middle",3,"ngClass"],["nz-col","","nzLg","24","nzXs","16",1,"text-sm","text-black-8"],["nz-col","","nzLg","24","nzXs","8"],[3,"click"],[1,"bg-white"],["nz-form","",3,"formGroup",4,"ngIf"],[3,"visible","exchange","closeModal"],["nz-form","",3,"formGroup"],["nz-row","","nzJustify","left","nzAlign","middle",1,"mb-4"],["nz-row","","nzType","flex"],["nz-col","","nzLg","24","nzXs","24",1,"text-base",3,"ngClass"],["formControlName","refno","nzLabelPlaceholder","Investment Account","nzPlaceHolder","Investment Account",1,"w-100",3,"nzDropdownMatchSelectWidth","nzDisabled"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["class","text-danger text-left",4,"ngIf"],["nzLabelPlaceholder","Payment Method","nzPlaceHolder","Payment Method","formControlName","paymentMethod",1,"w-100",3,"nzDisabled","ngModelChange"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["nzLabelPlaceholder","Investment Currency","nzPlaceHolder","Investment Currency","formControlName","investmentCurrency",1,"w-100",3,"nzDisabled"],["nzLabelPlaceholder","RSP Amount"],["ui-input","","formControlName","investmentAmount","type","number",1,"w-100"],[1,"text-danger","text-left"],[1,"rounded","mb-0","h-100",3,"nzBodyStyle"],[1,"topRow"],[1,"top-left-corner",2,"font-size","11px"],[1,"top-right-corner","font-weight-semibold","label-type-round","bg-blue"],["formControlName","rspFrequency",3,"ngModelChange"],["nz-row","","nzType","flex",4,"ngIf"],["class","text-danger text-left text-sm my-1",3,"ngClass",4,"ngIf"],["class","text-black text-left text-sm my-1",3,"ngClass",4,"ngIf"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between","class","mt-3",4,"ngIf"],[3,"nzLabel","nzValue"],[3,"nzValue","nzLabel"],["nzLabelPlaceholder","Next RSP Date"],["ui-input","","formControlName","nextRspDate",1,"w-100"],[1,"text-danger","text-left","text-sm","my-1",3,"ngClass"],["nzType","flex"],["nzSpan","1"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","mr-2"],["nzSpan","23"],[1,"text-black","text-left","text-sm","my-1",3,"ngClass"],["nz-icon","","nzType","exclamation-circle",1,"mr-2","text-info"],[1,"font-weight-bold",3,"routerLink"],["nz-row","","nzType","flex","nzAlign","middle","nzJustify","space-between",1,"mt-3"],["nz-col","",1,"text-base","font-weight-bold"],["nz-col","","nzSpan","24","class","text-black-5 text-base text-center pt-3 pb-2",4,"ngIf"],["nz-col","",1,"text-base","font-weight-bold","text-center",3,"nzSpan"],["nz-row","",1,"w-100","my-3","infinite-container"],[3,"type","listContent","radioValue","radioEvent"],["nz-col","","nzSpan","24",1,"text-black-5","text-base","text-center","pt-3","pb-2"],["nz-col","","nzSpan","24","class","text-warning text-sm py-2",4,"ngIf"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle",1,"d-flex","w-100","justify-content-end"],["nz-button","","nzType","outline",1,"mr-3","mt-4",3,"click"],["nz-button","","nzType","primary",1,"mt-4",3,"nzLoading","disabled","click"],["nz-button","","nzBlock","","nzType","outline",1,"mb-2",3,"click"],["nz-button","","nzBlock","","nzType","primary",3,"nzLoading","disabled","click"],["nz-col","","nzSpan","24",1,"text-warning","text-sm","py-2"],["nz-icon","","nzType","info-circle","nzTheme","fill"],["nzBlock","","nz-button","","nzType","outline",1,"mb-2",3,"click"],[3,"ngStyle"],[3,"refno","visible","bankList","visibleChange","bankDetail"]],template:function(t,e){1&t&&(z.od(0,ga,3,6,"app-web-scaffold",0),z.Ec(1,"async"),z.od(2,Ma,2,1,"app-mobile-scaffold",0),z.Ec(3,"async"),z.od(4,ir,46,56,"ng-template",null,1,z.pd),z.od(6,sr,3,8,"div",2),z.rc(7,"fep-breached-modal",3),z.zc("showModalChange",(function(t){return e.fepBreached=t})),z.qc(),z.rc(8,"passport-expiry-notification",4),z.zc("onOkEmit",(function(){return e.passportNoticeVisible=!1}))("onUpdateEmit",(function(){return e.passportNoticeVisible=!1})),z.qc()),2&t&&(z.Mc("ngIf",!z.Fc(1,8,e.isMobile$)&&e.selectedEtf),z.
1Ub(2),z.Mc("ngIf",e.selectedEtf&&z.Fc(3,10,e.isMobile$)),z.Ub(4),z.Mc("ngIf",e.newDdaModelVisible),z.Ub(1),z.Mc("showModal",e.fepBreached)("refno",e.refno),z.Ub(1),z.Mc("modalVisible",e.passportNoticeVisible)("isPopUp",!1)("footerFunc",!0))},directives:[P.t,fo.a,mo.a,R.a,yt.a,P.A,H.a,ut.a,P.q,Nc.a,V.c,V.a,ma,st.J,st.u,Et.b,st.l,Ht.d,st.t,st.j,P.s,At.c,st.c,st.z,At.b,w.a,ba.b,Ht.a,mt.b,q.h,ft.a,Y.a,pt.a,P.w,oe],pipes:[P.b,P.g],styles:[".product-background[_ngcontent-%COMP%]{background-color:#f5f8f9}.ui-select-hack[_ngcontent-%COMP%]{position:relative;top:-1px}.infinite-container[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto;overflow-x:hidden}.topRow[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:15px}.top-right-corner[_ngcontent-%COMP%]{top:0;float:right}.top-left-corner[_ngcontent-%COMP%]{float:left;top:0}.bg-blue[_ngcontent-%COMP%]{background-color:#0073cf}.label-type-round[_ngcontent-%COMP%]{border-radius:10px;border:0;padding:0 7px;color:#fff;font-size:11px;display:inline-block}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(T.a.getAccounts)],t.prototype,"acctList$",void 0),Object(d.c)([Object(l.e)(T.a.getShowRspAs)],t.prototype,"showRspAs$",void 0),t})();function rr(t,e){1&t&&z.mc(0,"i",17),2&t&&z.Mc("nzTooltipTitle","8% SST, applicable to the Sales Charge")}function lr(t,e){if(1&t&&(z.rc(0,"div",10),z.rc(1,"div",15),z.qd(2," Sales Charge "),z.od(3,rr,1,1,"i",16),z.qc(),z.rc(4,"div",12),z.qd(5),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit,e=z.Dc(2);z.Ub(3),z.Mc("ngIf",e.systemSstRate>0),z.Ub(2),z.sd(" ",t.buyInfoModel.salesCharge," % ")}}function dr(t,e){if(1&t&&(z.rc(0,"div",10),z.rc(1,"div",11),z.qd(2," Fees "),z.qc(),z.rc(3,"div",12),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit;z.Ub(4),z.sd(" ",t.buyInfoModel.salesChargeDesc," ")}}function ur(t,e){if(1&t&&(z.rc(0,"div",10),z.rc(1,"div",11),z.qd(2," Frequency "),z.qc(),z.rc(3,"div",12),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit;z.Ub(4),z.sd(" ",t.buyInfoModel.frequencyDisplay," ")}}function pr(t,e){if(1&t&&(z.rc(0,"div",10),z.rc(1,"div",11),z.qd(2," Selected Date "),z.qc(),z.rc(3,"div",12),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit;z.Ub(4),z.sd(" ",t.buyInfoModel.rspStockFrequencyDisplay," ")}}function hr(t,e){if(1&t&&(z.rc(0,"div",18),z.mc(1,"app-stock-exchange-tag",19),z.qd(2),z.qc()),2&t){const t=z.Dc().$implicit;
1z.Ub(1),z.Mc("exchange",t.buyInfoModel.exchange),z.Ub(1),z.sd(" ",t.buyInfoModel.sedolNumber,"")}}const fr=function(t){return{"mb-2":t}};function mr(t,e){if(1&t){const t=z.sc();z.rc(0,"div",7),z.rc(1,"div",8),z.rc(2,"b2c-order-cart",9),z.zc("editOrder",(function(){z.dd(t);const n=e.$implicit;return z.Dc(2).onEditOrderClick(n)})),z.pc(3),z.rc(4,"div",10),z.rc(5,"div",11),z.qd(6," RSP Amount "),z.qc(),z.rc(7,"div",12),z.qd(8),z.Ec(9,"number"),z.qc(),z.qc(),z.od(10,lr,6,2,"div",13),z.od(11,dr,5,1,"div",13),z.rc(12,"div",10),z.rc(13,"div",11),z.qd(14," Payment Method "),z.qc(),z.rc(15,"div",12),z.qd(16),z.qc(),z.qc(),z.od(17,ur,5,1,"div",13),z.od(18,pr,5,1,"div",13),z.oc(),z.qc(),z.qc(),z.od(19,hr,3,2,"ng-template",null,14,z.pd),z.qc()}if(2&t){const t=e.$implicit,n=e.index,i=z.ad(20),c=z.Dc(2);z.Ub(1),z.Mc("ngClass",z.Sc(14,fr,n!==c.cartDisplayList.length-1)),z.Ub(1),z.Mc("orderCartType","pending")("paymentTitle",t.productName)("isEditOrder",!0)("isShowContent",!0)("paymentSubtitleContentTemplate",t.productType===c.rsptabEnum.ETF?i:null),z.Ub(6),z.sd(" ",t.buyInfoModel.currency+" "+z.Fc(9,12,t.buyInfoModel.amount)," "),z.Ub(2),z.Mc("ngIf",t.productType!==c.rsptabEnum.ETF),z.Ub(1),z.Mc("ngIf",t.productType===c.rsptabEnum.ETF),z.Ub(5),z.sd(" ",t.displayTitle," "),z.Ub(1),z.Mc("ngIf",t.buyInfoModel.frequencyDisplay),z.Ub(1),z.Mc("ngIf",t.buyInfoModel.rspStockFrequencyDisplay)}}function br(t,e){if(1&t){const t=z.sc();z.rc(0,"div"),z.Ec(1,"async"),z.rc(2,"div"),z.rc(3,"p",2),z.qd(4,"Order Cart Details"),z.qc(),z.qc(),z.od(5,mr,21,16,"div",3),z.rc(6,"app-web-scaffold"),z.rc(7,"div",4),z.rc(8,"button",5),z.zc("click",(function(){return z.dd(t),z.Dc().proceedCheckOut()})),z.qd(9," Proceed To Check Out "),z.qc(),z.qc(),z.qc(),z.rc(10,"app-mobile-scaffold"),z.rc(11,"b2c-floating-bar"),z.rc(12,"button",6),z.zc("click",(function(){return z.dd(t),z.Dc().proceedCheckOut()})),z.qd(13," Proceed To Check Out "),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Wb(z.Fc(1,3,t.isMobile$)?"bg-white py-3 px-2":""),z.Ub(5),z.Mc("ngForOf",t.cartDisplayList)}}function gr(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-fund-details",22),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showEditFundDetailsModal=e}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).visibleChange(e)}))("removeSelectedRsp",(function(e){return z.dd(t),z.Dc(2).removeRspCart(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("sedolnumber",t.selectedEditCart.buyInfoModel.sedolNumber)("visible",t.showEditFundDetailsModal)("oriBuyData",t.selectedEditCart.buyInfoModel)}}const yr=function(){return{}},Mr=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function vr(t,e){if(1&t&&(z.rc(0,"div",20),z.Ec(1,"async"),z.od(2,gr,1,4,"rsp-fund-details",21),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,yr):z.Rc(5,Mr)),z.Ub(2),z.Mc("ngIf",t.selectedEditCart&&t.showEditFundDetailsModal)}}function Cr(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-dpms-details",24),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showEditDpmsDetailsModal=e}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).visibleChange(e)}))("removeSelectedRsp",(function(e){return z.dd(t),z.Dc(2).removeRspCart(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("portfolioId",t.selectedEditCart.buyInfoModel.sedolNumber)("visible",t.showEditDpmsDetailsModal)("oriBuyData",t.selectedEditCart.buyInfoModel)}}function Tr(t,e){if(1&t&&(z.rc(0,"div",20),z.Ec(1,"async"),z.od(2,Cr,1,4,"rsp-dpms-details",23),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,yr):z.Rc(5,Mr)),z.Ub(2),z.Mc("ngIf",t.selectedEditCart&&t.showEditDpmsDetailsModal)}}function Sr(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-etf-details",26),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showEditEtfDetailsModal=e}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).visibleChange(e)}))("removeSelectedRsp",(function(e){return z.dd(t),z.Dc(2).removeRspEtfCart(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("stockCode",t.selectedEditCart.buyInfoModel.sedolNumber)("exchange",t.selectedEditCart.buyInfoModel.exchange)("selectedEtf",t.selectedEditCart.buyInfoModel.rspEtfData)("visible",t.showEditEtfDetailsModal)("oriBuyData",t.selectedEditCart.buyInfoModel)}}function Dr(t,e){if(1&t&&(z.rc(0,"div",20),z.Ec(1,"async"),z.od(2,Sr,1,6,"rsp-etf-details",25),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,yr):z.Rc(5,Mr)),z.Ub(2),z.Mc("ngIf",t.selectedEditCart&&t.showEditEtfDetailsModal)}}let zr=(()=>{class t{constructor(t,e,n,i,c,o){this.store=t,this.subHandlingService=e,this.cdRef=n,this.router=i,this.nzNotificationService=c,this.utilityRestService=o,this.editVisibleChange=new z.s,this.editBtn=new z.s,this.editBtnClicked=new z.s,this.rsptabEnum=it,this.cartList=[],this.cartDisplayList=[],this.rspConstants=Yt,this.showEditFundDetailsModal=!1,this.showEditDpmsDetailsModal=!1,this.showEditEtfDetailsModal=!1,this.systemSstRate=0,this.subscribeViewOrderCart()}ngOnChanges(t){console.log("changes",t),this.onChangeInputValue()}
1ngOnInit(){this.getSystemSstRate()}getSystemSstRate(){this.utilityRestService.getSstRate().pipe(Object(oo.a)(1)).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS?this.systemSstRate=t.data:console.error("[getSystemSstRate] error retrieving system sst rate")})}subscribeViewOrderCart(){this.subHandlingService.subscribe(this.orderCartList$.pipe(Object(f.a)(t=>{this.cartList=t,this.onChangeInputValue(),this.cdRef.markForCheck(),console.log("this.cartList",this.cartList)})))}onChangeInputValue(){this.productType&&(this.cartDisplayList=this.cartList.filter(t=>t.productType===this.productType)),this.refno&&(this.cartDisplayList=this.cartDisplayList.filter(t=>t.refno===this.refno))}onEditOrderClick(t){this.editBtn.emit(t),console.log("cart",t),this.selectedEditCart=t,t.productType===it.UT?(this.showEditFundDetailsModal=!0,this.visibleChange(!0)):t.productType===it.DPMS?(this.showEditDpmsDetailsModal=!0,this.visibleChange(!0)):this.selectedEditCart.productType===it.TRUST_ACCOUNT?this.editBtnClicked.emit():t.productType===it.ETF&&(this.showEditEtfDetailsModal=!0,this.visibleChange(!0))}removeRspCart(t){console.log("productId",t),this.store.dispatch(new v.c(t))}removeRspEtfCart(t){console.log("productId",t),this.store.dispatch(new v.e(t.stockCode,t.exchange))}proceedCheckOut(){this.validateOrderCart()||this.router.navigate([M.o.APP,M.o.RSP,M.o.CHECK_OUT],{queryParams:{productType:this.productType}})}validateOrderCart(){let t=[];this.cartList.forEach(e=>{const n=t.find(t=>t.displayTitle===e.displayTitle);n?(n.totalAmount=Number(n.totalAmount)+Number(e.buyInfoModel.amount),n.paymentCartList.push(e)):t.push({paymentMethod:e.buyInfoModel.paymentMethod,totalAmount:e.buyInfoModel.amount,displayTitle:e.displayTitle,currencyCode:e.buyInfoModel.currency,paymentCartList:[e],orderCartType:e.orderCartType,availableLimit:e.buyInfoModel.bankLimit})});let e=!1;if(t.length>0){const n=[this.rspConstants.PAYMENT_METHOD_FPX,this.rspConstants.PAYMENT_METHOD_DDA];t.filter(t=>n.includes(t.paymentMethod)),t.forEach(t=>{t.availableLimit&&t.availableLimit<t.totalAmount&&(this.nzNotificationService.error("Error","Available limit for "+t.displayTitle+" is "+t.availableLimit),e=!0)})}else this.nzNotificationService.error("Cart Empty","The cart is empty");return e}visibleChange(t){this.editVisible=t,this.editVisibleChange.emit(this.editVisible)}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(C.a),z.lc(z.j),z.lc(q.e),z.lc(St.b),z.lc(po.a))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-order-cart"]],inputs:{productType:"productType",refno:"refno",editVisible:"editVisible"},outputs:{editVisibleChange:"editVisibleChange",editBtn:"editBtn",editBtnClicked:"editBtnClicked"},features:[z.Tb([C.a]),z.Sb],decls:5,vars:6,consts:[[3,"class",4,"ngIf"],[3,"ngStyle",4,"ngIf"],[1,"font-weight-bold","mb-2"],["nz-row","",4,"ngFor","ngForOf"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle",1,"mb-2","mt-3"],["nz-button","","nzSize","default","nzType","primary",1,"font-weight-bold","w-100",3,"click"],["nz-button","","nzType","primary",1,"font-weight-bold","w-100",3,"click"],["nz-row",""],[3,"ngClass"],[3,"orderCartType","paymentTitle","isEditOrder","isShowContent","paymentSubtitleContentTemplate","editOrder"],[1,"row","py-1","text-sm"],[1,"col","text-left"],[1,"col","text-right","font-weight-bold"],["class","row py-1 text-sm",4,"ngIf"],["exchangeAndStockCodeTemplate",""],[1,"col","text-left","d-flex","align-item-center","gap-2px"],["class","d-flex align-item-center pointer","nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",3,"nzOverlayClassName","nzTooltipTitle",4,"ngIf"],["nz-icon","","nz-tooltip","","nzTheme","outline","nzTooltipPlacement","top","nzType","info-circle",1,"d-flex","align-item-center","pointer",3,"nzOverlayClassName","nzTooltipTitle"],[1,"mt-1","text-xs"],[3,"exchange"],[3,"ngStyle"],["detailsType","edit",3,"refno","sedolnumber","visible","oriBuyData","visibleChange","removeSelectedRsp",4,"ngIf"],["detailsType","edit",3,"refno","sedolnumber","visible","oriBuyData","visibleChange","removeSelectedRsp"],["detailsType","edit",3,"refno","portfolioId","visible","oriBuyData","visibleChange","removeSelectedRsp",4,"ngIf"],["detailsType","edit",3,"refno","portfolioId","visible","oriBuyData","visibleChange","removeSelectedRsp"],["detailsType","edit",3,"refno","stockCode","exchange","selectedEtf","visible","oriBuyData","visibleChange","removeSelectedRsp",4,"ngIf"],["detailsType","edit",3,"refno","stockCode","exchange","selectedEtf","visible","oriBuyData","visibleChange","removeSelectedRsp"]],template:function(t,e){1&t&&(z.od(0,br,14,5,"div",0),z.Ec(1,"async"),z.od(2,vr,3,6,"div",1),z.od(3,Tr,3,6,"div",1),z.od(4,Dr,3,6,"div",1)),2&t&&(z.Mc("ngIf",e.cartDisplayList.length>0&&(!z.Fc(1,4,e.isMobile$)||!e.showEditFundDetailsModal&&!e.showEditDpmsDetailsModal&&!e.showEditEtfDetailsModal)),z.Ub(2),z.Mc("ngIf",e.selectedEditCart&&e.showEditFundDetailsModal),z.Ub(1),z.Mc("ngIf",e.selectedEditCart&&e.showEditDpmsDetailsModal),z.Ub(1),z.Mc("ngIf",e.selectedEditCart&&e.showEditEtfDetailsModal))},directives:[P.t,P.s,R.a,V.c,Y.a,H.a,pt.a,P.q,Es.a,mt.b,jt.e,Nc.a,P.w,qs,ua,ar],pipes:[P.b,P.g],encapsulation:2}),Object(d.c)([Object(l.e)(v.f.getCartList)],t.prototype,"orderCartList$",void 0),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();var qr=n("h76Y");function Er(t,e){if(1&t){const t=z.sc();z.rc(0,"div",6),z.rc(1,"b2c-app-bar-2",7),z.zc("back",(function(){return z.dd(t),z.Dc(2).backToMainRspPage()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Regular Savings Plan"))}function Ar(t,e){if(1&t){const t=z.sc();z.rc(0,"div",6),z.rc(1,"b2c-app-bar-2",7),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","My e-Mandate"))}function Pr(t,e){if(1&t){const t=z.sc();z.rc(0,"div",6),z.rc(1,"b2c-app-bar-2",7),z.zc("back",(function(){return z.dd(t),z.Dc(2).changeViewCart()})),z.qc(),z.qc()}2&t&&(z.Ub(1),z.Mc("title","Preview Cart"))}function Rr(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Er,2,1,"div",5),z.od(2,Ar,2,1,"div",5),z.od(3,Pr,2,1,"div",5),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showAddFundDetailsModal&&!t.showViewCart),z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",t.showViewCart&&!t.showEditPage)}}function wr(t,e){if(1&t&&(z.rc(0,"div",9),z.mc(1,"emandate-list",10),z.Ec(2,"async"),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("showCollape",!z.Fc(2,4,t.isMobile$))("expendAllEmandate",t.showEmandatePage)("refno",t.refno)("displayType","grid")}}function Fr(t,e){if(1&t&&(z.pc(0),z.od(1,wr,3,6,"div",8),z.oc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",t.refno)}}const Ir=function(t){return{"mb-3":t}};function Ur(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",11),z.Ec(2,"async"),z.rc(3,"div",12),z.mc(4,"investment-account-selector"),z.qc(),z.rc(5,"div",13),z.rc(6,"a",14),z.zc("click",(function(){return z.dd(t),z.Dc(2).changeDisplayEmandate()})),z.qd(7,"View My e-Mandate"),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngClass",z.Sc(3,Ir,z.Fc(2,1,t.isMobile$)))}}function Or(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,Fr,2,1,"ng-container",0),z.od(2,Ur,8,5,"ng-container",0),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.showEmandatePage),z.Ub(1),z.Mc("ngIf",!t.showEmandatePage&&!t.showAddFundDetailsModal&&!t.showEditPage)}}function xr(t,e){1&t&&z.mc(0,"nz-tab",23),2&t&&z.Mc("nzTitle",e.$implicit)}function Lr(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-tabset",21),z.zc("nzSelectedIndexChange",(function(e){return z.dd(t),z.Dc(2).chgSelectedTab(e)})),z.od(1,xr,1,1,"nz-tab",22),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("nzSelectedIndex",t.selectedIndex),z.Ub(1),z.Mc("ngForOf",t.tabList)}}function kr(t,e){1&t&&z.mc(0,"app-funds-rsp-list",24),2&t&&z.Mc("isTabSetItem",!0)}function Nr(t,e){1&t&&z.mc(0,"app-etf-rsp-list",25),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function _r(t,e){1&t&&z.mc(0,"app-dpms-rsp-list",25),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function Br(t,e){1&t&&z.mc(0,"app-cash-acct-rsp-list",25),2&t&&z.Mc("isTabSetItem",!0)("noShowTabSet",!0)}function Vr(t,e){if(1&t&&z.mc(0,"nz-option",43),2&t){const t=e.$implicit;z.Mc("nzLabel",t.label)("nzValue",t.value)}}function Yr(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-auto-option",44),z.zc("click",(function(){z.dd(t);const n=e.$implicit,i=z.Dc(3);return i.isInsideCart(n.sedolnumber)?"":i.onFundSelected(n.sedolnumber)})),z.qd(1),z.qc()}if(2&t){const t=e.$implicit;z.Mc("nzValue",t.fundName),z.Ub(1),z.sd(" ",t.fundName," ")}}function Hr(t,e){1&t&&(z.rc(0,"nz-auto-option",45),z.mc(1,"em",46),z.qd(2," Loading Funds... "),z.qc())}function jr(t,e){1&t&&z.mc(0,"i",47)}function $r(t,e){if(1&t){const t=z.sc();z.rc(0,"i",48),z.zc("click",(function(){return z.dd(t),z.Dc(3).onClearInput()})),z.qc()}}function Gr(t,e){if(1&t){const t=z.sc();z.rc(0,"product-info",49),z.zc("selectedProductCode",(function(e){return z.dd(t),z.Dc(3).onFundSelected(e)}))("factsheetRedirection",(function(n){z.dd(t);const i=e.$implicit;return z.Dc(3).redirectToFactsheetPage(n,null==i?null:i.fundName)})),z.Ec(1,"currencyFormat"),z.Ec(2,"async"),z.Ec(3,"async"),z.qc()}if(2&t){const t=e.$implicit,n=z.Dc(3);
1z.Mc("productCode",t.sedolnumber)("productName",t.fundName)("specialLogoType",n.prepareSpecialList(t))("title1","Min. RSP Amt.")("title2","Risk Rating")("desc1",z.Gc(1,10,t.minRspNum,t.fundCurrencyCode))("desc2",t.fsmRiskRating)("clickWholeBar",z.Fc(2,13,n.isMobile$))("showAddToCart",!z.Fc(3,15,n.isMobile$))("addedToCart",n.isInsideCart(t.sedolnumber))}}function Wr(t,e){if(1&t){const t=z.sc();z.rc(0,"div"),z.rc(1,"p",50),z.qd(2,"RSP can only be applied once you meet the initial investment EXCEPT for fund under RSP Special List. Funds under RSP Special List can be applied without need to fulfill the initial investment. "),z.rc(3,"span",51),z.rc(4,"a",52),z.zc("click",(function(){return z.dd(t),z.Dc(3).redirectToBuyUt()})),z.qd(5,"Invest Now"),z.qc(),z.qc(),z.qc(),z.qc()}}const Xr=function(t){return{"px-2":t}},Kr=function(t,e){return{"mb-6 pb-6":t,"infinite-container pt-2":e}};function Jr(t,e){if(1&t){const t=z.sc();z.rc(0,"div",11),z.Ec(1,"async"),z.rc(2,"div",26),z.rc(3,"div",27),z.rc(4,"nz-select",28),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(2).selectedFundFilter=e}))("ngModelChange",(function(e){return z.dd(t),z.Dc(2).onChangeFundFilterOption(e)})),z.od(5,Vr,1,2,"nz-option",29),z.qc(),z.qc(),z.rc(6,"div",30),z.rc(7,"nz-input-group",31),z.rc(8,"input",32),z.zc("input",(function(e){return z.dd(t),z.Dc(2).onSearchFundName(e.target.value)})),z.qc(),z.qc(),z.rc(9,"nz-autocomplete",33,34),z.od(11,Yr,2,2,"nz-auto-option",35),z.rc(12,"nz-auto-option"),z.rc(13,"div",36),z.zc("visibilityChange",(function(){return z.dd(t),z.Dc(2).loadMore()})),z.qc(),z.qc(),z.od(14,Hr,3,0,"nz-auto-option",37),z.qc(),z.od(15,jr,1,0,"ng-template",null,38,z.pd),z.od(17,$r,1,0,"ng-template",null,39,z.pd),z.qc(),z.qc(),z.pc(19),z.rc(20,"nz-skeleton",40),z.rc(21,"div",41),z.Ec(22,"async"),z.od(23,Gr,4,17,"product-info",42),z.qc(),z.od(24,Wr,6,0,"div",0),z.qc(),z.oc(),z.qc()}if(2&t){const t=z.ad(10),e=z.ad(16),n=z.ad(18),i=z.Dc(2),c=z.ad(8);z.Mc("ngClass",z.Sc(22,Xr,z.Fc(1,18,i.isMobile$))),z.Ub(4),z.Mc("ngModel",i.selectedFundFilter)("nzLoading",i.isLoading)("nzSuffixIcon",c),z.Ub(1),z.Mc("ngForOf",i.fundFilterOption),z.Ub(2),z.Mc("nzSuffix",n)("nzPrefix",e),z.Ub(1),z.Mc("placeholder","Search all funds")("formControl",i.keyword)("nzAutocomplete",t),z.Ub(1),z.Mc("nzBackfill",!0),z.Ub(2),z.Mc("ngForOf",i.fundSuggestionList),z.Ub(2),z.Mc("intersectionDebounce",0),z.Ub(1),z.Mc("ngIf",i.isLoading||i.loadingSuggestion),z.Ub(6),z.Mc("nzLoading",i.isLoading),z.Ub(1),z.Mc("ngClass",z.Tc(24,Kr,z.Fc(22,20,i.isMobile$),(null==i.fundDisplayList?null:i.fundDisplayList.length)>=7)),z.Ub(2),z.Mc("ngForOf",i.fundDisplayList),z.Ub(1),z.Mc("ngIf",0===(null==i.fundDisplayList?null:i.fundDisplayList.length))}}const Zr=function(t){return{"bg-white shadow w-100 py-2":t}};function Qr(t,e){if(1&t&&(z.rc(0,"div",15),z.Ec(1,"async"),z.Ec(2,"async"),z.od(3,Lr,2,2,"nz-tabset",16),z.Ec(4,"async"),z.rc(5,"div",17),z.od(6,kr,1,1,"app-funds-rsp-list",18),z.od(7,Nr,1,2,"app-etf-rsp-list",19),z.od(8,_r,1,2,"app-dpms-rsp-list",19),z.od(9,Br,1,2,"app-cash-acct-rsp-list",19),z.qc(),z.od(10,Jr,25,27,"div",20),z.qc()),2&t){const t=z.Dc();z.Mc("ngClass",z.Sc(15,Zr,z.Fc(1,9,t.isMobile$)))("hidden",z.Fc(2,11,t.isMobile$)&&t.showAddFundDetailsModal),z.Ub(3),z.Mc("ngIf",z.Fc(4,13,t.isMobile$)&&!t.noShowTabSet),z.Ub(2),z.Mc("ngSwitch",t.selectedIndex),z.Ub(1),z.Mc("nSwitchDefault",0),z.Ub(1),z.Mc("ngSwitchCase",1),z.Ub(1),z.Mc("ngSwitchCase",2),z.Ub(1),z.Mc("ngSwitchCase",3),z.Ub(1),z.Mc("ngIf",0==t.selectedIndex)}}function tl(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-fund-details",55),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showAddFundDetailsModal=e}))("oriBuyDataStamped",(function(){return z.dd(t),z.Dc(2).buyInfo=null})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("sedolnumber",t.selectedSedol)("visible",t.showAddFundDetailsModal)("oriBuyData",t.buyInfo)}}const el=function(){return{}},nl=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function il(t,e){if(1&t&&(z.rc(0,"div",53),z.Ec(1,"async"),z.od(2,tl,1,4,"rsp-fund-details",54),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,el):z.Rc(5,nl)),z.Ub(2),z.Mc("ngIf",t.selectedSedol)}}function cl(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"div",56),z.zc("click",(function(){return z.dd(t),z.Dc().changeViewCart()})),z.rc(2,"div",57),z.rc(3,"div",58),z.qd(4,"View Cart"),z.qc(),z.rc(5,"div",59),z.rc(6,"nz-row",60),z.rc(7,"nz-col"),z.mc(8,"i",61),z.qc(),z.rc(9,"div",62),z.rc(10,"p",63),z.qd(11),z.qc(),z.qc(),z.rc(12,"nz-col",64),z.qd(13," Item "),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc();z.Ub(11),z.rd(t.cartList.length)}}function ol(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-order-cart",65),z.zc("editVisibleChange",(function(e){return z.dd(t),z.Dc().showEditPage=e})),z.qc()}if(2&t){const t=z.Dc();z.Mc("productType",t.iProductEnum.UNIT_TRUST)("refno",t.refno)("editVisible",t.showEditPage)}}function sl(t,e){if(1&t&&z.mc(0,"img",66),2&t){const t=z.Dc();z.Mc("src",t.transactionImgPath+"filterIcon.svg",z.gd)("alt","filter icon")}}let al=(()=>{class t{constructor(t,e,n,i,c,o,s){this.store=t,this.transactionRestService=e,this.subHandlingService=n,this.fundRestService=i,this.cdRef=c,this.route=o,this.router=s,this.isTabSetItem=!1,this.noShowTabSet=!1,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.tabList=[],this.selectedIndex=0,this.isLoading=!1,this.iProductEnum=ct.b,this.fundFilterOption=h.a.RSP_UT_FILTER_CATEGORY,this.selectedFundFilter=h.a.RSP_FUNDS,this.allAvailableRspfundList=[],this.fundList=[],this.fundDisplayList=[],this.fundSuggestionList=[],this.selectedFund={},this.isPrsFund=!1,this.showAddFundDetailsModal=!1,this.cartList=[],this.showViewCart=!1,this.showEmandatePage=!1,this.loadingSuggestion=!1,this.productList=["UT"],this.keywordPage=0,this.routeInitialize=!0,this.showEditPage=!1,this.subscribeViewOrderCart(),this.subscribeRefnoChange()}ngOnInit(){this.store.dispatch(new y.U(ct.b.UNIT_TRUST)),this.form=new st.k({keyword:new st.h("")}),this.subscribeKeyword()}ngAfterViewInit(){this.tabList=["Unit Trust","ETFs","Managed Portfolio","Cash Account"]}onChangeFundFilterOption(t){this.selectedFundFilter=t,this.getFundsBuyList(this.selectedFundFilter)}getFundsBuyList(t){this.isLoading=!0;let e=[];const n=this.transactionRestService.getFundsBuyList(t,"",this.refno).pipe(Object(f.a)(t=>{t&&(e=t.data.sort((t,e)=>t.fundName>e.fundName?1:e.fundName>t.fundName?-1:0))}));Object(p.a)([this.getAllRspFundsList(),n]).pipe(Object(f.a)(()=>{this.filterRspList(e),this.initRouteParam()})).subscribe()}filterRspList(t){this.isLoading=!0,this.fundList=t?this.allAvailableRspfundList.filter(e=>t.find(t=>t.sedolnumber===e.sedolnumber)):Object(g.a)(this.allAvailableRspfundList),this.search(),this.isLoading=!1}getAllRspFundsList(){return this.isLoading=!0,this.transactionRestService.getFundsBuyList(h.a.RSP_FUNDS,"",this.refno).pipe(Object(f.a)(t=>{t.data&&(this.allAvailableRspfundList=t.data,this.allAvailableRspfundList=this.allAvailableRspfundList.filter(t=>"Y"===t.rspenabled),this.allAvailableRspfundList=this.allAvailableRspfundList.sort((t,e)=>t.fundName>e.fundName?1:e.fundName>t.fundName?-1:0))}))}subscribeRefnoChange(){this.subHandlingService.subscribe(this.refno$.pipe(Object(f.a)(t=>{this.refno=t,this.cdRef.markForCheck(),this.selectedFundFilter=h.a.RSP_FUNDS,this.getFundsBuyList(this.selectedFundFilter),this.subscribeViewOrderCart()})))}search(){console.log("search start"),this.fundList&&(this.fundDisplayList=this.searchValue?Ob
1ject(ot.b)(this.fundList,this.searchValue,"fundName"):Object(g.a)(this.fundList),this.fundSuggestionList=Object(g.a)(this.fundDisplayList))}clearSearchText(){this.searchValue="",this.search()}onFundSelected(t){this.fundDisplayList.filter(e=>e.sedolnumber===t).length>0&&(this.selectedSedol=t,this.showAddFundDetailsModal=!0)}isInsideCart(t){return this.cartList.filter(e=>e.buyInfoModel.sedolNumber===t).length>0}subscribeViewOrderCart(){this.orderCartList$=this.store.select(v.f.getCartListByProduct).pipe(Object(m.a)(t=>t(this.refno,it.UT))),this.subHandlingService.subscribe(this.orderCartList$.pipe(Object(f.a)(t=>{this.cartList=t,this.cdRef.markForCheck()})))}initRouteParam(){this.routeInitialize&&this.route.queryParams.subscribe(t=>{console.log("param",t),t.refno&&(this.refno=t.refno,this.store.dispatch(new y.N(this.refno))),t.productId&&this.onFundSelected(t.productId),(t.amount||t.paymentMethod)&&(this.buyInfo={paymentMethod:t.paymentMethod,amount:t.amount,bankCode:t.bankCode}),t.sedolnumber&&this.onFundSelected(t.sedolnumber),this.routeInitialize=!1})}prepareSpecialList(t){return{epfApproved:t.cpfapproved,recommendedFund:t.recommendedFund,syariahEpf:t.syariahFlag,fundType:t.fundType}}changeDisplayEmandate(){this.showViewCart=!1,this.showEmandatePage=!this.showEmandatePage}changeViewCart(){this.showEmandatePage=!1,this.showViewCart=!this.showViewCart}backToMainRspPage(){this.router.navigate([M.o.APP,M.o.RSP])}redirectToBuyUt(){this.router.navigate([M.o.APP,M.o.TRADE,M.o.FUNDS,M.o.BUY])}onSearchFundName(t){console.log("value",t),this.keyword.patchValue(t)}loadMore(){console.log("loadmore"),console.log("this.keyword.value",this.keyword.value),console.log("this.loadingSuggestion",this.loadingSuggestion),console.log("this.isLoading",this.isLoading),!this.keyword.value||this.loadingSuggestion||this.isLoading||(this.keywordPage+=1,this.searchProductsByKeyword(this.keyword.value))}subscribeKeyword(){this.subHandlingService.subscribe(this.keyword.valueChanges.pipe(Object(b.a)(500),Object(f.a)(t=>{if(t&&!this.fundDisplayList.find(e=>e.sedolnumber===t))return this.fundSuggestionList=[],this.keywordPage=0,void this.searchProductsByKeyword(t);this.fundSuggestionList=this.fundDisplayList})))}searchProductsByKeyword(t){this.loadingSuggestion=!0,this.subHandlingService.once(this.transactionRestService.searchProductsByKeyword(this.productList,t,this.keywordPage,20,!0,this.refno).pipe(Object(f.a)(t=>{if(console.log("response",t),this.loadingSuggestion=!1,t.status!==M.a.RESPONSE_SUCCESS)return;const e=t.data.map(t=>this.mapFundInfo(t)),n=e.filter(t=>this.fundDisplayList.find(e=>t.sedolnumber===e.sedolnumber));this.fundSuggestionList=[...this.fundSuggestionList,...n],console.log("this.fundSuggestionList",this.fundSuggestionList),this.fundSuggestionList.length<10&&e.length>0&&this.loadMore()})))}mapFundInfo(t){return{sedolnumber:t.productCode,fundName:t.productName}}onClearInput(){this.keyword.patchValue(null)}showEditChange(t){console.log(" showEditChange event",t),console.log("this.showEditPage",this.showEditPage)}get keyword(){var t;return null===(t=this.form)||void 0===t?void 0:t.get("keyword")}redirectToFactsheetPage(t,e){t&&Object(at.a)(["/"+M.o.FUNDS,M.o.TOOLS,M.o.FACTSHEET,Object(rt.e)(e)],{fund:t})}chgSelectedTab(t){this.selectedIndex=t,console.log("SELECTED INDEX: ",this.selectedIndex)}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(lt.a),z.lc(C.a),z.lc(dt.a),z.lc(z.j),z.lc(q.a),z.lc(q.e))},t.\u0275cmp=z.fc({type:t,selectors:[["app-funds-rsp-list"]],inputs:{isTabSetItem:"isTabSetItem",noShowTabSet:"noShowTabSet"},decls:9,vars:6,consts:[[4,"ngIf"],[3,"ngClass","hidden",4,"ngIf"],[3,"ngStyle",4,"ngIf"],[3,"productType","refno","editVisible","editVisibleChange",4,"ngIf"],["prefixIconFilter",""],["class","border-bottom",4,"ngIf"],[1,"border-bottom"],[3,"title","back"],["nz-row","","class","px-2 py-3 bg-white",4,"ngIf"],["nz-row","",1,"px-2","py-3","bg-white"],[3,"showCollape","expendAllEmandate","refno","displayType"],[3,"ngClass"],["nz-row",""],["nz-row","",1,"px-2","pb-3","text-right","bg-white"],[1,"text-base","font-weight-bold","py-1","mb-3",3,"click"],[3,"ngClass","hidden"],[3,"nzSelectedIndex","nzSelectedIndexChange",4,"ngIf"],[3,"ngSwitch"],[3,"isTabSetItem",4,"nSwitchDefault"],[3,"isTabSetItem","noShowTabSet",4,"ngSwitchCase"],[3,"ngClass",4,"ngIf"],[3,"nzSelectedIndex","nzSelectedIndexChange"],[3,"nzTitle",4,"ngFor","ngForOf"],[3,"nzTitle"],[3,"isTabSetItem"],[3,"isTabSetItem","noShowTabSet"],["nz-row","","nzGutter","16"],["nz-col","","nzLg","6","nzMd","6","nzXs","24",1,"py-1"],["nzPlaceHolder","Please select",1,"w-100",3,"ngModel","nzLoading","nzSuffixIcon","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["nzLg","18","nzMd","18","nzXs","24","nz-col","",1,"py-1"],[3,"nzSuffix","nzPrefix"],["nz-input","",3,"placeholder","formControl","nzAutocomplete","
1input"],[3,"nzBackfill"],["auto",""],[3,"nzValue","click",4,"ngFor","ngForOf"],["intersectionObserver","",3,"intersectionDebounce","visibilityChange"],["nzDisabled","","nzCustomContent","",4,"ngIf"],["prefixIconSearch",""],["suffixIconClear",""],[3,"nzLoading"],[1,"pt-2",3,"ngClass"],[3,"productCode","productName","specialLogoType","title1","title2","desc1","desc2","clickWholeBar","showAddToCart","addedToCart","selectedProductCode","factsheetRedirection",4,"ngFor","ngForOf"],[3,"nzLabel","nzValue"],[3,"nzValue","click"],["nzDisabled","","nzCustomContent",""],["nz-icon","","nzType","loading",1,"loading-icon"],["nz-icon","","nzType","search"],["nz-icon","","nz-tooltip","","nzTheme","fill","nzType","close-circle",1,"ant-input-clear-icon",3,"click"],[3,"productCode","productName","specialLogoType","title1","title2","desc1","desc2","clickWholeBar","showAddToCart","addedToCart","selectedProductCode","factsheetRedirection"],[1,"py-2"],[1,"font-weight-bold"],[3,"click"],[3,"ngStyle"],[3,"refno","sedolnumber","visible","oriBuyData","visibleChange","oriBuyDataStamped",4,"ngIf"],[3,"refno","sedolnumber","visible","oriBuyData","visibleChange","oriBuyDataStamped"],[1,"bg-primary","pointer","py-2","px-3","w-100","rounded",3,"click"],["nz-row","","nzType","flex","nzAlign","middle",1,"text-white"],["nz-col","","nzSpan","12",1,"text-left","font-weight-bold"],["nz-col","","nzSpan","12",1,"position-relative","text-right"],["nzType","flex","nzJustify","end","nzAlign","middle",1,"text-right"],["nz-icon","","nzType","shopping-cart","nzTheme","outline",1,"cart-icon","pt-1","h-100"],["nz-col","",1,"item-count-container","d-inline-flex","rounded-circle","bg-white"],[1,"text-primary","font-weight-bold","m-auto"],["nz-col","",1,"px-1"],[3,"productType","refno","editVisible","editVisibleChange"],[1,"img-fluid",3,"src","alt"]],template:function(t,e){1&t&&(z.od(0,Rr,4,3,"app-mobile-scaffold",0),z.od(1,Or,3,2,"app-mobile-scaffold",0),z.od(2,Qr,11,17,"div",1),z.od(3,il,3,6,"div",2),z.rc(4,"app-mobile-scaffold"),z.od(5,cl,14,1,"b2c-floating-bar",0),z.od(6,ol,1,3,"rsp-order-cart",3),z.qc(),z.od(7,sl,1,2,"ng-template",null,4,z.pd)),2&t&&(z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!e.isTabSetItem),z.Ub(1),z.Mc("ngIf",!e.showEmandatePage&&!e.showViewCart),z.Ub(1),z.Mc("ngIf",e.showAddFundDetailsModal),z.Ub(2),z.Mc("ngIf",(null==e.cartList?null:e.cartList.length)>0&&!e.showAddFundDetailsModal&&!e.showViewCart),z.Ub(1),z.Mc("ngIf",e.showViewCart))},directives:[P.t,H.a,ut.a,V.c,$e,P.q,Ge.a,P.x,P.y,c.f,P.s,c.b,t,Qn,wi,Ic,V.a,Uc.d,st.t,st.w,Oc.c,st.c,xc.e,Oc.b,st.i,xc.a,xc.d,Lc.a,kc.a,Uc.a,mt.b,jt.e,co,P.w,qs,pt.a,zr],pipes:[P.b,qr.a],styles:[".infinite-container[_ngcontent-%COMP%]{max-height:600px;overflow-y:auto;overflow-x:hidden}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(y.X.getSelectedRefno)],t.prototype,"refno$",void 0),Object(d.c)([Object(l.e)(T.a.getAccounts)],t.prototype,"acctList$",void 0),t})();var rl=n("C2Y/"),ll=n("ScDb"),dl=n("YX/J");let ul=(()=>{class t{constructor(){this.visibleChange=new z.s}closeDdaMaintenance(){this.visible=!1,this.visibleChange.emit()}downloadForm(){let t="CIMB_update_limit_form.pdf";"1116"===this.bankCode.toString()&&(t="Maybank_DDA_form.pdf"),window.open("buysell/forms/"+t,"_blank")}ngOnChanges(t){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=z.fc({type:t,selectors:[["dda-maintenance"]],inputs:{ddaType:"ddaType",bankCode:"bankCode",visible:"visible"},outputs:{visibleChange:"visibleChange"},features:[z.Tb([]),z.Sb],decls:14,vars:7,consts:[[3,"nzVisible","nzWrapClassName","nzWidth","nzFooter","nzOnCancel"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","left","nzAlign","middle"],["nz-col","","nzSpan","24",1,"text-lg","font-weight-bold","py-1"],["nz-col","","nzSpan","24",1,"text-sm","py-2"],[1,"text-base"],["nz-row","","nzType","flex","nzGutter","20","nzJustify","end","nzAlign","middle",1,"pt-3","mt-4","text-right"],["nz-col","","nzLg","6","nzMd","6","nzXs","0",1,"px-1"],["nz-button","","nzType","outline",1,"w-100",3,"click"],["nz-col","","nzLg","9","nzMd","9","nzXs","24",1,"px-1"],["nz-button","","nzType","primary",1,"w-100",3,"click"]],template:function(t,e){1&t&&(z.rc(0,"nz-modal",0),z.zc("nzOnCancel",(function(){return e.closeDdaMaintenance()})),z.rc(1,"div",1),z.rc(2,"div",2),z.qd(3),z.qc(),z.rc(4,"div",3),z.rc(5,"span",4),z.qd(6),z.qc(),z.qc(),z.qc(),z.rc(7,"div",5),z.rc(8,"div",6),z.rc(9,"button",7),z.zc("click",(function(){return e.closeDdaMaintenance()})),z.qd(10,"Cancel"),z.qc(),z.qc(),z.rc(11,"div",8),z.rc(12,"button",9),z.zc("click",(function(){return e.downloadForm()})),z.qd(13,"Download Form"),z.qc(),z.qc(),z.qc(),z.qc()),2&t&&(z.Mc("nzVisible",e.visible)("nzWrapClassName","vertical-center-modal")("nzWidth",600)("nzFooter",null),z.Ub(3),z.sd("",e.ddaType," Maintenance"),z.Ub(3),z.td("Please submit a copy of ",e.ddaType," form to edit / terminate the ",e.ddaType," application."))},directives:[yt.a,V.c,V.a,Y.a],encapsulation:2}),t})();function pl(t,e){if(1&t&&(z.rc(0,"div",21),z.mc(1,"i",22),z.rc(2,"span",23),z.qd(3,"You have "),z.rc(4,"span",24),z.qd(5),z.qc(),z.qd(6," pending for your application."),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Ub(5),z.sd("",t.pendingRecord," e-Mandate")}}function hl(t,e){if(1&t){const t=z.sc();z.rc(0,"label",30),z.zc("ngModelChange",(function(n){return z.dd(t),e.$implicit.active=n})),z.qd(1),z.qc()}if(2&t){const t=e.$implicit;z.Mc("ngModel",t.active)("nzValue",t.value),z.Ub(1),z.sd(" ",t.label," ")}}function fl(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",25),z.rc(1,"ui-select",26),z.rc(2,"ui-option",27),z.rc(3,"nz-checkbox-wrapper",28),z.zc("nzOnChange",(function(e){return z.dd(t),z.Dc(3).filterResult(e)})),z.od(4,hl,2,3,"label",29),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(3),e=z.ad(6);z.Ub(1),z.Mc("nzSuffixIcon",e)("nzPlaceHolder","All Status \u2022 "+t.filterList.statusList.length),z.Ub(3),z.Mc("ngForOf",t.statusOptions)}}function ml(t,e){if(1&t&&(z.rc(0,"nz-tag",49),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.ddaStatus))}}function bl(t,e){if(1&t&&(z.rc(0,"nz-tag",50),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.ddaStatus))}}function gl(t,e){if(1&t&&z.mc(0,"nz-option",51),2&t){const t=e.$implicit;z.Mc("nzLabel",t.label)("nzValue",t.value)}}const yl=function(t){return{"border-none":t}};function Ml(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"tr"),z.rc(2,"td",40),z.rc(3,"nz-row"),z.qd(4),z.qc(),z.qc(),z.rc(5,"td",41),z.rc(6,"nz-row"),z.qd(7),z.qc(),z.qc(),z.rc(8,"td",42),z.rc(9,"nz-row"),z.qd(10),z.qc(),z.qc(),z.rc(11,"td",42),z.rc(12,"nz-row"),z.qd(13),z.Ec(14,"number"),z.qc(),z.qc(),z.rc(15,"td",42),z.rc(16,"nz-row"),z.qd(17),z.Ec(18,"number"),z.qc(),z.qc(),z.rc(19,"td",42),z.rc(20,"nz-row"),z.qd(21
1),z.Ec(22,"number"),z.qc(),z.qc(),z.rc(23,"td",42),z.rc(24,"nz-row"),z.qd(25),z.Ec(26,"sdate"),z.qc(),z.qc(),z.rc(27,"td",43),z.rc(28,"nz-row"),z.qd(29),z.qc(),z.qc(),z.rc(30,"td",42),z.od(31,ml,3,4,"nz-tag",44),z.od(32,bl,3,4,"nz-tag",45),z.qc(),z.rc(33,"td",46),z.rc(34,"nz-select",47),z.zc("ngModelChange",(function(n){return z.dd(t),e.$implicit.actionValue=n}))("ngModelChange",(function(n){z.dd(t);const i=e.$implicit;return z.Dc(4).openDdaModel(n,i)})),z.od(35,gl,1,2,"nz-option",48),z.qc(),z.qc(),z.qc(),z.oc()}if(2&t){const t=e.$implicit,n=e.last,i=z.Dc(4);z.Ub(2),z.Mc("ngClass",z.Sc(34,yl,!n)),z.Ub(2),z.rd(t.ddaType),z.Ub(1),z.Mc("ngClass",z.Sc(36,yl,!n)),z.Ub(2),z.rd(t.bankName),z.Ub(1),z.Mc("ngClass",z.Sc(38,yl,!n)),z.Ub(2),z.rd(t.bankAccNo),z.Ub(1),z.Mc("ngClass",z.Sc(40,yl,!n)),z.Ub(2),z.sd("MYR ",z.Gc(14,23,t.maxDdaAmount,"1.2-2"),""),z.Ub(2),z.Mc("ngClass",z.Sc(42,yl,!n)),z.Ub(2),z.sd("MYR ",z.Gc(18,26,t.usedAmount,"1.2-2"),""),z.Ub(2),z.Mc("ngClass",z.Sc(44,yl,!n)),z.Ub(2),z.sd("MYR ",z.Gc(22,29,t.availableAmount,"1.2-2"),""),z.Ub(2),z.Mc("ngClass",z.Sc(46,yl,!n)),z.Ub(2),z.rd(t.pendingDate===i.DEFAULT_DATE_NUMBER?"N.A.":z.Fc(26,32,null==t?null:t.pendingDate)),z.Ub(2),z.Mc("ngClass",z.Sc(48,yl,!n)),z.Ub(2),z.rd(t.totalProducts),z.Ub(1),z.Mc("ngClass",z.Sc(50,yl,!n)),z.Ub(1),z.Mc("ngIf","Active"!=t.ddaStatus&&"terminated"!=t.ddaStatus),z.Ub(1),z.Mc("ngIf","Active"===t.ddaStatus),z.Ub(1),z.Mc("ngClass",z.Sc(52,yl,!n)),z.Ub(1),z.Mc("ngModel",t.actionValue)("nzPlaceHolder","Go To"),z.Ub(1),z.Mc("ngForOf",t.actionOption)}}function vl(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr",52),z.rc(2,"td",53),z.qd(3,"Total"),z.qc(),z.mc(4,"td",54),z.rc(5,"td",55),z.rc(6,"span",56),z.qd(7),z.Ec(8,"number"),z.qc(),z.qc(),z.rc(9,"td",55),z.rc(10,"span",56),z.qd(11),z.Ec(12,"number"),z.qc(),z.qc(),z.rc(13,"td",55),z.rc(14,"span",56),z.qd(15),z.Ec(16,"number"),z.qc(),z.qc(),z.mc(17,"td",57),z.qc(),z.oc()),2&t){const t=z.Dc(4);z.Ub(7),z.sd(" MYR ",z.Gc(8,3,t.totalMaxAmount,"1.2-2"),""),z.Ub(4),z.sd(" MYR ",z.Gc(12,6,t.totalUsedAmount,"1.2-2"),""),z.Ub(4),z.sd(" MYR ",z.Gc(16,9,t.totalAvailableAmount,"1.2-2"),"")}}const Cl=function(){return{x:"100%"}};function Tl(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-table",31,32),z.rc(2,"thead",33),z.zc("nzSortChange",(function(e){return z.dd(t),z.Dc(3).sort(e)})),z.rc(3,"tr"),z.rc(4,"th",34),z.qd(5,"Type"),z.qc(),z.rc(6,"th",35),z.qd(7,"Bank Name"),z.qc(),z.rc(8,"th",36),z.qd(9,"Account No"),z.qc(),z.rc(10,"th",37),z.qd(11,"Maximum Amt."),z.qc(),z.rc(12,"th",37),z.qd(13,"Used Amt."),z.qc(),z.rc(14,"th",37),z.qd(15,"Available Amt."),z.qc(),z.rc(16,"th",37),z.qd(17,"Create Date"),z.qc(),z.rc(18,"th",37),z.qd(19,"Funds/MP"),z.qc(),z.rc(20,"th",37),z.qd(21,"Status"),z.qc(),z.rc(22,"th",38),z.qd(23,"Action"),z.qc(),z.qc(),z.qc(),z.rc(24,"tbody"),z.od(25,Ml,36,54,"ng-container",39),z.od(26,vl,18,12,"ng-container",10),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Mc("nzData",t.ddaTableInfoModelList)("nzLoading",t.isLoading)("nzScroll",t.ddaTableInfoModelList.length>0?z.Rc(16,Cl):"")("nzFrontPagination",!1)("nzShowPagination",!1),z.Ub(4),z.Mc("nzSortKey","ddaType"),z.Ub(2),z.Mc("nzSortKey","bankName"),z.Ub(2),z.Mc("nzSortKey","bankAccNo"),z.Ub(2),z.Mc("nzSortKey","maxDdaAmount"),z.Ub(2),z.Mc("nzSortKey","usedAmount"),z.Ub(2),z.Mc("nzSortKey","availableAmount"),z.Ub(2),z.Mc("nzSortKey","pendingDate"),z.Ub(2),z.Mc("nzSortKey","totalProduct"),z.Ub(2),z.Mc("nzSortKey","ddaStatus"),z.Ub(5),z.Mc("ngForOf",t.ddaTableInfoModelList),z.Ub(1),z.Mc("ngIf",t.ddaTableInfoModelList.length>0)}}function Sl(t,e){if(1&t){const t=z.sc();z.rc(0,"app-web-scaffold"),z.od(1,pl,7,1,"div",12),z.rc(2,"nz-row",13),z.rc(3,"nz-col",14),z.rc(4,"nz-input-group",15),z.rc(5,"input",16),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(2).searchField(e)}))("ngModelChange",(function(e){return z.dd(t),z.Dc(2).searchText=e})),z.qc(),z.qc(),z.qc(),z.od(6,fl,5,3,"nz-col",17),z.Ec(7,"async"),z.qc(),z.od(8,Tl,27,17,"nz-table",18),z.rc(9,"nz-modal",19),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc(2).closeDdaDetails()})),z.nc(10,20),z.qc(),z.qc()}if(2&t){const t=z.Dc(2),e=z.ad(4),n=z.ad(8),i=z.ad(2),c=z.ad(10);z.Ub(1),z.Mc("ngIf",t.pendingRecord>0),z.Ub(3),z.Mc("nzPrefix",e)("nzSuffix",n),z.Ub(1),z.Mc("ngModel",t.searchText),z.Ub(1),z.Mc("ngIf",!z.Fc(7,11,t.isMobile$)),z.Ub(2),z.Mc("ngIf",t.ddaTableInfoModelList)("ngIfElse",i),z.Ub(1),z.Mc("nzVisible",t.editMode||t.terminateMode)("nzWidth",709)("nzFooter",null),z.Ub(1),z.Mc("ngTemplateOutlet",c)}}function Dl(t,e){if(1&t&&(z.rc(0,"nz-tag",73),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.ddaStatus))}}function zl(t,e){if(1&t&&(z.rc(0,"nz-tag",74),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.ddaStatus))}}const ql=function(t){return{"mt-3":t}};function El(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-card",67),z.zc("click",(function(){z.dd(t);const n=e.$implicit;return z.Dc(3).openDdaModel("view",n)}
1)),z.rc(1,"div",56),z.od(2,Dl,3,4,"nz-tag",68),z.od(3,zl,3,4,"nz-tag",69),z.rc(4,"nz-tag",70),z.qd(5),z.qc(),z.qc(),z.rc(6,"nz-row"),z.rc(7,"nz-col",71),z.rc(8,"h4",24),z.qd(9),z.qc(),z.qc(),z.qc(),z.rc(10,"nz-row"),z.rc(11,"nz-col",71),z.rc(12,"h4",24),z.qd(13),z.qc(),z.qc(),z.qc(),z.rc(14,"nz-row"),z.rc(15,"nz-col",72),z.rc(16,"h6"),z.qd(17,"Maximum Amt"),z.qc(),z.qc(),z.rc(18,"nz-col",72),z.rc(19,"h6"),z.qd(20,"Used Amt"),z.qc(),z.qc(),z.rc(21,"nz-col",72),z.rc(22,"h6"),z.qd(23,"Available Amt"),z.qc(),z.qc(),z.qc(),z.rc(24,"nz-row"),z.rc(25,"nz-col",72),z.rc(26,"h6",24),z.qd(27),z.Ec(28,"number"),z.qc(),z.qc(),z.rc(29,"nz-col",72),z.rc(30,"h6",24),z.qd(31),z.Ec(32,"number"),z.qc(),z.qc(),z.rc(33,"nz-col",72),z.rc(34,"h6",24),z.qd(35),z.Ec(36,"number"),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=e.$implicit;z.Mc("ngClass",z.Sc(25,ql,0!==e.index)),z.Ub(2),z.Mc("ngIf","Active"!=t.ddaStatus),z.Ub(1),z.Mc("ngIf","Active"===t.ddaStatus),z.Ub(1),z.Mc("nzColor","#000000"),z.Ub(1),z.rd(t.ddaType),z.Ub(4),z.rd(t.bankName),z.Ub(4),z.rd(t.bankAccNo),z.Ub(2),z.Mc("nzSpan",8),z.Ub(3),z.Mc("nzSpan",8),z.Ub(3),z.Mc("nzSpan",8),z.Ub(4),z.Mc("nzSpan",8),z.Ub(2),z.sd("MYR ",z.Gc(28,16,t.maxDdaAmount,"1.2-2"),""),z.Ub(2),z.Mc("nzSpan",8),z.Ub(2),z.sd("MYR ",z.Gc(32,19,t.usedAmount,"1.2-2"),""),z.Ub(2),z.Mc("nzSpan",8),z.Ub(2),z.sd("MYR ",z.Gc(36,22,t.availableAmount,"1.2-2"),"")}}function Al(t,e){if(1&t&&(z.rc(0,"div"),z.mc(1,"header-details",58),z.rc(2,"div",59),z.rc(3,"nz-row",60),z.rc(4,"nz-col",61),z.rc(5,"h5"),z.qd(6,"Total Available Amount"),z.qc(),z.qc(),z.rc(7,"nz-col",62),z.rc(8,"h4",63),z.qd(9),z.Ec(10,"number"),z.qc(),z.qc(),z.qc(),z.rc(11,"nz-row"),z.rc(12,"nz-col",61),z.rc(13,"h5",64),z.qd(14,"Total Used Amount"),z.qc(),z.qc(),z.rc(15,"nz-col",62),z.rc(16,"h4",63),z.qd(17),z.Ec(18,"number"),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(19,"div",65),z.od(20,El,37,27,"nz-card",66),z.qc(),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("accounts",t.accounts)("refno",t.refno)("menu",t.menu),z.Ub(8),z.sd("MYR ",z.Gc(10,6,t.totalAvailableAmount,"1.2-2"),""),z.Ub(8),z.sd("MYR ",z.Gc(18,9,t.totalUsedAmount,"1.2-2"),""),z.Ub(3),z.Mc("ngForOf",t.ddaTableInfoModelList)}}function Pl(t,e){1&t&&z.qd(0," \xa9 2020. All Rights Reserved. iFAST Capital Sdn. Bhd. Reg. No.200701024957\n")}function Rl(t,e){if(1&t&&(z.pc(0),z.od(1,Sl,11,13,"app-web-scaffold",10),z.Ec(2,"async"),z.rc(3,"app-mobile-scaffold"),z.rc(4,"app-hide-from-mobile-app"),z.mc(5,"app-menu-sidebar"),z.qc(),z.od(6,Al,21,12,"div",10),z.qc(),z.od(7,Pl,1,0,"ng-template",null,11,z.pd),z.oc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!z.Fc(2,2,t.isMobile$)),z.Ub(5),z.Mc("ngIf",!t.viewMode)}}function wl(t,e){if(1&t&&(z.rc(0,"div",75),z.mc(1,"nz-skeleton",76),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("nzLoading",t.isLoading)("nzActive",!0)}}function Fl(t,e){1&t&&z.mc(0,"em",77)}function Il(t,e){if(1&t&&z.mc(0,"img",78),2&t){const t=z.Dc();z.Mc("alt","filter icon")("src",t.transactionImgPath+"filterIcon.svg",z.gd)}}function Ul(t,e){if(1&t){const t=z.sc();z.rc(0,"i",79),z.zc("click",(function(){return z.dd(t),z.Dc().clearSearchField()})),z.qc()}}function Ol(t,e){if(1&t){const t=z.sc();z.rc(0,"edit-terminate-dda-details",80),z.zc("close",(function(){return z.dd(t),z.Dc().closeDdaDetails()})),z.qc()}if(2&t){const t=z.Dc();z.Mc("ddaDetailsModel",t.ddaDetailsModel)("mode",t.editMode?"edit":t.terminateMode?"terminate":"")}}function xl(t,e){if(1&t){const t=z.sc();z.rc(0,"dda-details",81),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc().viewMode=e}))("visibleChange",(function(){return z.dd(t),z.Dc().closeDdaDetails()})),z.qc()}if(2&t){const t=z.Dc();z.Mc("ddaDetailsModel",t.ddaDetailsModel)("visible",t.viewMode)}}function Ll(t,e){if(1&t){const t=z.sc();z.rc(0,"dda-maintenance",82),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc().ddaOfflineMode=e}))("visibleChange",(function(){return z.dd(t),z.Dc().resetActionValueToNull()})),z.qc()}if(2&t){const t=z.Dc();z.Mc("visible",t.ddaOfflineMode)("ddaType",null==t.ddaDetailsModel?null:t.ddaDetailsModel.ddaType)("bankCode",null==t.ddaDetailsModel?null:t.ddaDetailsModel.bankCode)}}function kl(t,e){if(1&t){const t=z.sc();z.rc(0,"new-emandate",83),z.zc("visibleChange",(function(){return z.dd(t),z.Dc().closeDdaDetails()})),z.qc()}if(2&t){const t=z.Dc();z.Mc("refno",t.refno)("visible",t.applyMode)("maxDdaAmt",null==t.ddaDetailsModel?null:t.ddaDetailsModel.maxDdaAmount)("fpxBankId",null==t.ddaDetailsModel?null:t.ddaDetailsModel.emandateBuyerBankId)}}let Nl=(()=>{class t{constructor(t,e,n,i,c,o,s,a,r){this.store=t,this.subHandlingService=e,this.activatedRoute=n,this.paymentRestService=i,this.nzNotificationService=c,this.cdRef=o,this.fb=s,this.rspRestService=a,this.router=r,this.bankDetail=new z.s,this.headerSiteMap=rl.a,this.othersSiteMap=rl.b,this.country={title:"Malaysia",icon:"malaysiaIcon"},this.facebookUrl="www.facebook.com/fsmonemalaysia/",this.youtubeUrl="www.youtube.com/user/Fundsupermartdotcom",this.instragramUrl="www.instagram.com/fsmone_my/?igshid=YmMyMTA2M2Y=",this.telegramUrl="t.me/Fsmone_my",this.twitterUrl="https://x.com/FSMOne_my?s=20",this.accounts=[],this.statusOptions=[{label:"Active",value:"Active"},{label:"Pending",value:"pending"},{label:"Processing",value:"processing"}],this.ddaAction=[{label:"View DDA",value:"view"},{label:"Edit / Terminate DDA ",value:"edit"}],this.fpxAction=[{label:"View FPX",value:"view"},{label:"Edit / Terminate FPX ",value:"edit"}],this.menu=[{label:"Regular Savings Plan (RSP)",value:M.o.RSP_LIST,active:!1},{label:"DDA / FPX Record",value:M.o.DDA_FPX_LIST,active:!0}],this.isLoading=!1,this.filterList={statusList:[]}
1,this.totalUsedAmount=0,this.totalAvailableAmount=0,this.totalMaxAmount=0,this.viewMode=!1,this.editMode=!1,this.terminateMode=!1,this.applyMode=!1,this.ddaOfflineMode=!1,this.pendingRecord=0,this.visibleChange=new z.s,this.DEFAULT_DATE_NUMBER=-631179e6,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.fpxEmandateData=null,this.bankList=[]}ngOnInit(){const t=this.store.selectSnapshot(T.a.getAccounts),e=[D.a.ACCOUNT_TYPE_PERSONAL,D.a.ACCOUNT_TYPE_JOINT,D.a.ACCOUNT_TYPE_CORPORATE];this.accounts=Object(g.a)(t),this.accounts=this.accounts.sort((function(t,n){return e.indexOf(t.accountType)>e.indexOf(n.accountType)?1:-1})),this.subHandlingService.subscribe(this.activatedRoute.queryParams.pipe(Object(f.a)(t=>{this.refno=t.refno,this.loadDdaRspData()})))}loadDdaRspData(){this.rspRestService.getDdaFpxList(this.refno).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS&&(this.ddaTableInfoModelList=t.data,this.ddaTableInfoModelListTemp=this.ddaTableInfoModelList,this.calculateTotalAmount(),this.setDataIntoActionDropDown(),console.log("dda list",this.ddaTableInfoModelList))})}searchField(t){this.statusOptions.forEach(t=>{t.active=!1}),this.ddaTableInfoModelList=this.ddaTableInfoModelListTemp.filter(e=>-1!==e.bankName.toLowerCase().indexOf(t.toLowerCase())||-1!==e.ddaType.toLowerCase().indexOf(t.toLowerCase())||-1!==e.ddaStatus.toLowerCase().indexOf(t.toLowerCase())),this.calculateTotalAmount()}filterResult(t){var e,n;console.log(t),this.searchText="",this.filterList.statusList=[],this.filterList.statusList=t,this.ddaTableInfoModelList=Object(g.a)(this.ddaTableInfoModelListTemp),(null===(n=null===(e=this.filterList)||void 0===e?void 0:e.statusList)||void 0===n?void 0:n.length)>0&&(this.ddaTableInfoModelList=this.ddaTableInfoModelList.filter(t=>this.filterList.statusList.includes(t.ddaStatus)),this.calculateTotalAmount())}calculateTotalAmount(){this.totalAvailableAmount=0,this.totalMaxAmount=0,this.totalUsedAmount=0,this.pendingRecord=0,this.ddaTableInfoModelList.forEach(t=>{this.totalAvailableAmount+=t.availableAmount,this.totalMaxAmount+=t.maxDdaAmount,this.totalUsedAmount+=t.usedAmount,"pen
1ding"===t.ddaStatus&&(this.pendingRecord+=1)})}sort(t){this.ddaTableInfoModelList=Object(bt.c)(t,this.ddaTableInfoModelList)}clearSearchField(){this.searchText="",this.ddaTableInfoModelList=this.ddaTableInfoModelListTemp}setDataIntoActionDropDown(){this.ddaTableInfoModelList&&this.ddaTableInfoModelList.forEach(t=>{t.actionOption=[],"e-Mandate"===t.ddaType?(t.actionOption.push({label:"View e-Mandate",value:"view"}),t.emandateApply&&"received"!==t.ddaStatus&&t.actionOption.push({label:"Apply e-Mandate",value:"apply"}),t.emandateEdit&&t.actionOption.push({label:"Edit e-Mandate",value:"edit"}),t.emandateTerminate&&t.actionOption.push({label:"Terminate e-Mandate",value:"terminate"})):"DDA"===t.ddaType?t.actionOption=this.ddaAction:"FPX"===t.ddaType&&(t.actionOption=this.fpxAction)})}openDdaModel(t,e){this.selectedDda=e,console.log(t),"view"===t?this.viewMode=!0:"edit"===t?"Y"===e.isEmandate?(this.editMode=!0,this.ddaForm||(this.ddaForm=this.fb.group({maxLimit:[e?e.amount:"",[st.H.required,st.H.min(.01),st.H.pattern(/^[0-9]+(\.[0-9]{1,2})?$/)]],emailAddress:["",[st.H.email]]}))):this.ddaOfflineMode=!0:"terminate"===t?"Y"===e.isEmandate?(this.terminateMode=!0,this.ddaForm||(this.ddaForm=this.fb.group({emailAddress:["",[st.H.email]]}))):this.ddaOfflineMode=!0:"apply"===t&&"Y"===e.isEmandate&&(this.applyMode=!0);const n=this.ddaTableInfoModelList.filter(t=>t.ddaId===e.ddaId);n.length>0&&(this.ddaDetailsModel=n[0]),this.ddaDetailsModel=e,this.title=e.ddaType,this.ddaId=e.ddaId,this.nric=e.nric,this.telhp=e.telHp,this.ddaForm&&this.maxDdaAmount.setValue(e.maxDdaAmount)}closeDdaDetails(){this.viewMode=!1,this.editMode=!1,this.applyMode=!1,this.terminateMode=!1,this.visibleChange.emit(),this.resetActionValueToNull()}resetActionValueToNull(){this.ddaTableInfoModelList.map(t=>t.actionValue=null)}get maxDdaAmount(){var t;return null===(t=this.ddaForm)||void 0===t?void 0:t.get("maxLimit")}get emailAddress(){const t=this.ddaForm.get("emailAddress");return this.isEmailValid(t)?t.value.trim:null}isEmailValid(t){return t.valid&&t.value&&t.value.length>0}headerNavigate(t){if(!t)return;if(null==t?void 0:t.runOutsideAngular)return void Object(at.a)(null==t?void 0:t.url);let e=[];e=Array.isArray(null==t?void 0:t.url)?[...null==t?void 0:t.url]:[null==t?void 0:t.url];const n=e[0].split("?");let i=n[0],c={};if(n.length>1){const t=n[1].split("&");for(let e of t){const t=e.split("=");c[t[0]]=t[1]}}Object.keys(c).length>0?this.router.navigate([i],{queryParams:c}):this.router.navigate([i])}searchProduct(){this.router.navigate([M.o.SEARCH])}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(C.a),z.lc(q.a),z.lc(Tt.a),z.lc(St.b),z.lc(z.j),z.lc(st.g),z.lc(ht.a),z.lc(q.e))},t.\u0275cmp=z.fc({type:t,selectors:[["ng-component"]],outputs:{bankDetail:"bankDetail"},decls:15,vars:6,consts:[[4,"ngIf","ngIfElse"],["loadingTemplate",""],["prefixIconSearch",""],["prefixIconFilter",""],["prefixIconClose",""],["editDdaDetails",""],[3,"ddaDetailsModel","visible","visibleChange",4,"ngIf"],[3,"visible","ddaType","bankCode","visibleChange",4,"ngIf"],[3,"fpxData"],[3,"refno","visible","maxDdaAmt","fpxBankId","visibleChange",4,"ngIf"],[4,"ngIf"],["copyrightTemplate",""],["class","d-flex align-items-center px-2 py-2 mb-2","style","background-color: #FEECE1",4,"ngIf"],[1,"pt-2"],["nzLg","6","nzXs","18",1,"pr-3"],[1,"w-100",3,"nzPrefix","nzSuffix"],["nz-input","","placeholder","Search","type","text",3,"ngModel","ngModelChange"],["nzSpan","4",4,"ngIf"],["class","mt-4",3,"nzData","nzLoading","nzScroll","nzFrontPagination","nzShowPagination",4,"ngIf","ngIfElse"],[3,"nzVisible","nzWidth","nzFooter","nzOnCancel"],[3,"ngTemplateOutlet"],[1,"d-flex","align-items-center","px-2","py-2","mb-2",2,"background-color","#FEECE1"],["nz-icon","","nzTheme","fill","nzType","exclamation-circle",1,"text-danger","text-md","ml-2","mt-1"],[1,"text-base","py-1","pl-3"],[1,"font-weight-bold"],["nzSpan","4"],[1,"w-100",3,"nzSuffixIcon","nzPlaceHolder"],["nzCustomContent",""],[3,"nzOnChange"],["class","p-2 d-block m-0 option-container","nz-checkbox","",3,"ngModel","nzValue","ngModelChange",4,"ngFor","ngForOf"],["nz-checkbox","",1,"p-2","d-block","m-0","option-container",3,"ngModel","nzValue","ngModelChange"],[1,"mt-4",3,"nzData","nzLoading","nzScroll","nzFrontPagination","nzShowPagination"],["ddaFpxTable",""],["nzSingleSort","",3,"nzSortChange"],["nzLeft","0px","nzShowSort","",2,"min-width","100px",3,"nzSortKey"],["nzLeft","90px","nzShowSort","",2,"min-width","200px",3,"nzSortKey"],["nzShowSort","",3,"nzSortKey"],["nzShowSort","",2,"min-width","90px",3,"nzSortKey"],["nzWidth","175px",1,"text-left"],[4,"ngFor","ngForOf"],["nzLeft","0px",3,"ngClass"],["nzLeft","90px",3,"ngClass"],[3,"ngClass"],[1,"text-right",3,"ngClass"],["class","border tag-pending-processing m-0",3,"nzColor",4,"ngIf"],["class","border tag-received m-0",3,"nzColor",4,"ngIf"],["nzWidth","175px",1,"text-left",3,"ngClass"],["nzSize","small",1,"w-100","text-base",3,"ngModel","nzPlaceHolder","ngModelChange"],["class","text-wrap",3,"nzLabel","nzValue",4,"ngFor","ngForOf"],[1,"border","tag-pending-processing","m-0",3,"nzColor"],[1,"border","tag-received","m-0",3,"nzColor"],[1,"text-wrap",3,"nzLabel","nzValue"],[1,"row-total"],["nzLeft","0px",1,"text-left","font-weight-bold"],["colspan","2"],[1,"text-left","font-weight-bold","total-amount"],[1,"py-2"],["colspan","4"],[3,"accounts","refno","menu"],[1,"px-3","pb-3","bg-white","mb-3"],[1,"mb-2"],["nzSpan","12"],["nzSpan","12",1,"text-right"],[1,"font-weight-bold","m-0"],[1,"m-0","mb-1"],[1,"px-2","py-3","bg-white"],["class","p-2 border rounded bg-white",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"p-2","border","rounded","bg-white",3,"ngClass","click"],["class","border tag-pending-processing m-0 mr-2",3,"nzColor",4,"ngIf"],["class","border tag-received m-0 mr-2",3,"nzColor",4,"ngIf"],[1,"border","tag-dda-type","m-0",3,"nzColor"],[1,"text-left"],[1,"text-left",3,"nzSpan"],[1,"border","tag-pending-processing","m-0","mr-2",3,"nzColor"],[1,"border","tag-received","m-0","mr-2",3,"nzColor"],[1,"container"],[3,"nzLoading","nzActive"],["nz-icon","","nzType","search",1,"text-md"],[1,"img-fluid",3,"alt","src"],["nz-icon","","nzTheme","outline","nzType","close",1,"pointer",3,"click"],[3,"ddaDetailsModel","mode","close"],[3,"ddaDetailsModel","visible","visibleChange"],[3,"visible","ddaType","bankCode","visibleChange"],[3,"refno","visible","maxDdaAmt","fpxBankId","visibleChange"]],template:function(t,e){if(1&t&&(z.od(0,Rl,9,4,"ng-container",0),z.od(1,wl,2,2,"ng-template",null,1,z.pd),z.od(3,Fl,1,0,"ng-template",null,2,z.pd),z.od(5,Il,1,2,"ng-template",null,3,z.pd),z.od(7,Ul,1,0,"ng-template",null,4,z.pd),z.od(9,Ol,1,2,"ng-template",null,5,z.pd),z.od(11,xl,1,2,"dda-details",6),z.od(12,Ll,1,3,"dda-maintenance",7),z.mc(13,"fpx-emandate-form",8),z.od(14,kl,1,4,"new-emandate",9)),2&t){const t=z.ad(2);z.Mc("ngIf",!e.isLoading)("ngIfElse",t),z.Ub(11),z.Mc("ngIf",e.ddaDetailsModel),z.Ub(1),z.Mc("ngIf",e.ddaDetailsModel),z.Ub(1),z.Mc("fpxData",e.fpxEmandateData),z.Ub(1),z.Mc("ngIf",e.applyMode)}},directives:[P.t,qt,H.a,ll.a,dl.a,R.a,V.c,V.a,Oc.c,st.c,Oc.b,st.t,st.w,yt.a,P.A,mt.b,Ht.d,Ht.a,ba.d,P.s,ba.a,Mt.a,Mt.f,Mt.g,Mt.e,Mt.c,Mt.d,P.q,Uc.d,s.a,Uc.a,B,w.a,kc.a,Vt,Pe,ul,oe],pipes:[P.b,P.g,Qe.a,P.G],styles:[""]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();function _l(t,e){1&t&&z.nc(0)}function Bl(t,e){1&t&&z.nc(0)}const Vl=function(t){return[t]},Yl=function(t,e){return{title:"ETFs",link:t,rspTab:e}};function Hl(t,e){if(1&t&&(z.pc(0),z.od(1,Bl,1,0,"ng-container",8),z.oc()),2&t){const t=z.Dc(),e=z.ad(30);
1z.Ub(1),z.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",z.Tc(4,Yl,z.Sc(2,Vl,"./"+(null==t.RouteConstant?null:t.RouteConstant.RSP_ETF_LIST)),t.rspTab.ETF))}}function jl(t,e){1&t&&z.nc(0)}function $l(t,e){1&t&&z.nc(0)}function Gl(t,e){if(1&t&&z.nc(0,18),2&t){z.Dc();const t=z.ad(32);z.Mc("ngTemplateOutlet",t)}}function Wl(t,e){if(1&t&&(z.rc(0,"div",13),z.mc(1,"emandate-list",19),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("refno",t.refno)("displayType","grid")}}function Xl(t,e){if(1&t&&(z.rc(0,"div",13),z.mc(1,"rsp-order-cart",20),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("productType",t.selectedRspTab)("refno",t.refno)}}function Kl(t,e){1&t&&z.nc(0)}function Jl(t,e){if(1&t&&(z.pc(0),z.rc(1,"div"),z.od(2,Kl,1,0,"ng-container",21),z.qc(),z.oc()),2&t){z.Dc();const t=z.ad(32);z.Ub(2),z.Mc("ngTemplateOutlet",t)}}function Zl(t,e){if(1&t){const t=z.sc();z.rc(0,"a",22),z.zc("click",(function(){z.dd(t);const n=e.rspTab;return z.Dc().onTabClick(n)})),z.qd(1),z.qc()}if(2&t){const t=e.title,n=e.link;z.Mc("title",t)("routerLink",n),z.Ub(1),z.sd(" ",t," ")}}function Ql(t,e){1&t&&z.mc(0,"router-outlet")}const td=function(t,e){return{title:"Unit Trusts",link:t,rspTab:e}},ed=function(t,e){return{title:"Managed Portfolio",link:t,rspTab:e}},nd=function(t,e){return{title:"Cash Account",link:t,rspTab:e}};let id=(()=>{class t{constructor(t,e,n,i,c){this.store=t,this.subHandlingService=e,this.cdRef=n,this.router=i,this.activatedRoute=c,this.rspTab=it,this.RouteConstant=M.o,this.showEmandatePage=!1,this.showRspEtf=!1}ngOnInit(){this.subscribeRefnoChange(),this.subscribeTradeProductChange(),this.store.dispatch(new v.d({refno:this.refno,orderStatus:h.a.ORDER_PLACED})),console.log("this.activatedRoute",this.activatedRoute),tn.a.rspEtfEnabled&&(this.showRspEtf=tn.a.rspEtfEnabled)}ngOnChanges(t){console.log("this.activatedRoute",this.activatedRoute)}onTabClick(t){this.selectedRspTab=t,console.log("this.selectedRspTab",this.selectedRspTab)}backToMainRspPage(){this.router.navigate([M.o.APP,M.o.RSP])}subscribeRefnoChange(){this.subHandlingService.subscribe(this.refno$.pipe(Object(f.a)(t=>{this.refno=t,this.cdRef.markForCheck()})))}subscribeTradeProductChange(){this.subHandlingService.subscribe(this.tradeProduct$.pipe(Object(f.a)(t=>{console.log("value",t),this.selectedRspTab=t,this.cdRef.markForCheck()})))}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(C.a),z.lc(z.j),z.lc(q.e),z.lc(q.a))},t.\u0275cmp=z.fc({type:t,selectors:[["ng-component"]],features:[z.Sb],decls:33,vars:31,consts:[[1,"bg-black-2","pb-4"],[1,"container","mb-4"],["nzType","flex","nzGutter","20","nzAlign","top","nzJustify","start"],["nzSpan","18"],[1,"text-xs"],[1,"mb-4"],["nz-icon","","nzType","arrow-left","nzTheme","outline",1,"text-lg","mr-2","pointer",3,"click"],[1,"no-gutters","mb-3","border-bottom","pb-2"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[1,"mb-3","mt-2"],[3,"ngTemplateOutlet",4,"ngIf"],["nz-col","","nzSpan","6",1,"order-cart","align-self-stretch"],["nz-row",""],[3,"isRspEtf"],["nz-row","",4,"ngIf"],["webTabTemplate",""],["routerTemplate",""],[3,"ngTemplateOutlet"],[1,"w-100","m-3",3,"refno","displayType"],[3,"productType","refno"],[4,"ngTemplateOutlet"],["role","navigation","routerLinkActive","active font-weight-bold text-theme",1,"tab","text-black-5","py-2","px-4","mr-4",3,"title","routerLink","click"]],template:function(t,e){if(1&t&&(z.rc(0,"app-web-scaffold"),z.pc(1),z.rc(2,"div",0),z.rc(3,"div",1),z.rc(4,"nz-row",2),z.rc(5,"nz-col",3),z.rc(6,"nz-card"),z.rc(7,"div"),z.rc(8,"p",4),z.qd(9,"Home / Regular Savings Plan"),z.qc(),z.rc(10,"h3",5),z.rc(11,"i",6),z.zc("click",(function(){return e.backToMainRspPage()})),z.qc(),z.qd(12,"Apply Regular Savings Plan "),z.qc(),z.qc(),z.rc(13,"div",7),z.od(14,_l,1,0,"ng-container",8),z.od(15,Hl,2,7,"ng-container",9),z.od(16,jl,1,0,"ng-container",8),z.od(17,$l,1,0,"ng-container",8),z.qc(),z.rc(18,"div",10),z.od(19,Gl,1,1,"ng-container",11),z.Ec(20,"async"),z.qc(),z.qc(),z.qc(),z.rc(21,"div",12),z.rc(22,"div",13),z.mc(23,"investment-account-selector",14),z.qc(),z.od(24,Wl,2,2,"div",15),z.od(25,Xl,2,2,"div",15),z.qc(),z.qc(),z.qc(),z.qc(),z.oc(),z.qc(),z.rc(26,"app-mobile-scaffold"),z.od(27,Jl,3,1,"ng-container",9),z.Ec(28,"async"),z.qc(),z.od(29,Zl,2,3,"ng-template",null,16,z.pd),z.od(31,Ql,1,0,"ng-template",null,17,z.pd)),2&t){const t=z.ad(30);
1z.Ub(14),z.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",z.Tc(18,td,z.Sc(16,Vl,"./"+(null==e.RouteConstant?null:e.RouteConstant.RSP_FUND_LIST)),e.rspTab.UT)),z.Ub(1),z.Mc("ngIf",e.showRspEtf),z.Ub(1),z.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",z.Tc(23,ed,z.Sc(21,Vl,"./"+(null==e.RouteConstant?null:e.RouteConstant.RSP_DPMS_LIST)),e.rspTab.DPMS)),z.Ub(1),z.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",z.Tc(28,nd,z.Sc(26,Vl,"./"+(null==e.RouteConstant?null:e.RouteConstant.CASH_ACCT_RSP)),e.rspTab.TRUST_ACCOUNT)),z.Ub(2),z.Mc("ngIf",!z.Fc(20,12,e.isMobile$)),z.Ub(4),z.Mc("isRspEtf",e.selectedRspTab===e.rspTab.ETF),z.Ub(1),z.Mc("ngIf",e.refno&&e.selectedRspTab!==e.rspTab.ETF),z.Ub(1),z.Mc("ngIf",e.refno),z.Ub(2),z.Mc("ngIf",z.Fc(28,14,e.isMobile$))}},directives:[R.a,V.c,V.a,w.a,mt.b,P.A,P.t,Ge.a,H.a,$e,zr,q.h,q.g,q.j],pipes:[P.b],styles:[".active[_ngcontent-%COMP%]{border-bottom:2px solid #bd2e26}.tab[_ngcontent-%COMP%]{-moz-user-select:none;user-select:none}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(y.X.getSelectedRefno)],t.prototype,"refno$",void 0),Object(d.c)([Object(l.e)(y.X.getTradeProduct)],t.prototype,"tradeProduct$",void 0),t})();var cd=n("bOdf"),od=n("Acs3"),sd=n("nY4S"),ad=n("aLIQ"),rd=n("xeZY"),ld=n("8M/t"),dd=n("XRmg"),ud=n("2tP9"),pd=n("cEyi"),hd=n("UhF/"),fd=n("5+07"),md=n("2jM0"),bd=n("u52B");function gd(t,e){if(1&t&&(z.rc(0,"div",44),z.mc(1,"app-stock-exchange-tag",45),z.qd(2),z.qc()),2&t){const t=z.Dc().$implicit;
1z.Ub(1),z.Mc("exchange",t.buyInfoModel.exchange),z.Ub(1),z.sd(" ",t.buyInfoModel.sedolNumber,"")}}function yd(t,e){if(1&t&&(z.rc(0,"div",39),z.rc(1,"div",40),z.qd(2,"Sales Charge"),z.qc(),z.rc(3,"div",41),z.qd(4),z.Ec(5,"number"),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit;z.Ub(4),z.sd("",z.Gc(5,1,t.buyInfoModel.salesCharge,"0.2-2")," %")}}function Md(t,e){if(1&t&&(z.rc(0,"div",39),z.rc(1,"div",40),z.qd(2,"Selected Date"),z.qc(),z.rc(3,"div",41),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit;z.Ub(4),z.rd(t.buyInfoModel.rspStockFrequencyDisplay)}}function vd(t,e){if(1&t){const t=z.sc();z.rc(0,"div",46),z.rc(1,"i",47),z.zc("click",(function(){z.dd(t);const e=z.Dc().$implicit;return z.Dc(2).onEditCart(e)})),z.qc(),z.qc()}}function Cd(t,e){if(1&t&&(z.rc(0,"div",35),z.rc(1,"div",36),z.rc(2,"div",37),z.qd(3),z.qc(),z.od(4,gd,3,2,"div",38),z.qc(),z.rc(5,"div",39),z.rc(6,"div",40),z.qd(7,"RSP Amount"),z.qc(),z.rc(8,"div",41),z.qd(9),z.Ec(10,"currencyFormat"),z.qc(),z.qc(),z.od(11,yd,6,4,"div",42),z.od(12,Md,5,1,"div",42),z.rc(13,"div",39),z.rc(14,"div",40),z.qd(15,"Frequency"),z.qc(),z.rc(16,"div",41),z.qd(17),z.qc(),z.qc(),z.od(18,vd,2,0,"div",43),z.qc()),2&t){const t=e.$implicit,n=z.Dc(2);z.Ub(1),z.Mc("nzLg","trustAccount"===n.productType||"etf"===n.productType&&t.buyInfoModel.rspStockFrequencyDisplay?"7":"12"),z.Ub(2),z.rd(t.productName),z.Ub(1),z.Mc("ngIf",n.productType===n.productTypeEnum.ETF),z.Ub(5),z.rd(z.Gc(10,8,t.buyInfoModel.amount,t.buyInfoModel.currency)),z.Ub(2),z.Mc("ngIf","trustAccount"===n.productType),z.Ub(1),z.Mc("ngIf","etf"===n.productType&&t.buyInfoModel.rspStockFrequencyDisplay),z.Ub(5),z.rd(t.buyInfoModel.frequencyDisplay),z.Ub(1),z.Mc("ngIf",t.orderCartType!==n.orderCartConstant.ORDER_RECEIVED)}}function Td(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"div",31),z.rc(2,"div",32),z.rc(3,"div",33),z.qd(4),z.qc(),z.qc(),z.od(5,Cd,19,11,"div",34),z.qc(),z.qc()),2&t){const t=e.$implicit;z.Ub(4),z.rd(t.displayTitle),z.Ub(1),z.Mc("ngForOf",t.paymentCartList)}}function Sd(t,e){if(1&t&&(z.rc(0,"div"),z.nc(1,48),z.qc()),2&t){z.Dc();const t=z.ad(50);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Dd(t,e){if(1&t){const t=z.sc();z.rc(0,"div"),z.rc(1,"b2c-order-cart",49),z.zc("payNow",(function(){z.dd(t);const n=e.$implicit;return z.Dc(2).payNowClick(n)})),z.pc(2),z.rc(3,"div",50),z.rc(4,"div",51),z.qd(5," Total RSP Amt "),z.qc(),z.rc(6,"div",52),z.qd(7),z.Ec(8,"currencyFormat"),z.qc(),z.qc(),z.oc(),z.qc(),z.qc()}if(2&t){const t=e.$implicit;z.Ub(1),z.Mc("orderCartType",t.orderCartType)("paymentTitle",t.displayTitle)("isShowContent",!0),z.Ub(6),z.sd(" ",z.Gc(8,4,t.totalAmount,t.currencyCode)," ")}}function zd(t,e){if(1&t&&(z.pc(0),z.rc(1,"div",15),z.qd(2,"Total RSP Investment"),z.qc(),z.od(3,Dd,9,7,"div",10),z.oc()),2&t){const t=z.Dc();z.Ub(1),z.Wb("font-weight-bold mb-2"),z.Ub(2),z.Mc("ngForOf",t.totalInvestmentAmountByPaymentMethod)}}function qd(t,e){1&t&&z.nc(0)}function Ed(t,e){if(1&t&&(z.pc(0),z.od(1,qd,1,0,"ng-container",55),z.oc()),2&t){z.Dc(2);const t=z.ad(39);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Ad(t,e){1&t&&z.nc(0)}function Pd(t,e){if(1&t&&(z.pc(0),z.od(1,Ad,1,0,"ng-container",55),z.oc()),2&t){z.Dc(2);const t=z.ad(41);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Rd(t,e){1&t&&z.nc(0)}function wd(t,e){if(1&t&&(z.pc(0),z.od(1,Rd,1,0,"ng-container",55),z.oc()),2&t){z.Dc(2);const t=z.ad(43);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function Fd(t,e){if(1&t&&(z.rc(0,"div",15),z.Ec(1,"async"),z.pc(2,53),z.od(3,Ed,2,1,"ng-container",54),z.od(4,Pd,2,1,"ng-container",54),z.od(5,wd,2,1,"ng-container",54),z.oc(),z.qc()),2&t){const t=z.Dc();z.Wb(z.Fc(1,6,t.isMobile$)?"bg-white pb-3 px-2":"p-3"),z.Ub(2),z.Mc("ngSwitch",t.productType),z.Ub(1),z.Mc("ngSwitchCase",t.productTypeEnum.UNIT_TRUST),z.Ub(1),z.Mc("ngSwitchCase",t.productTypeEnum.DPMS),z.Ub(1),z.Mc("ngSwitchCase",t.productTypeEnum.ETF)}}function Id(t,e){if(1&t){const t=z.sc();z.rc(0,"button",56),z.zc("click",(function(){return z.dd(t),z.Dc().submitTransaction()})),z.qd(1,"Submit Transaction "),z.qc()}if(2&t){const t=z.Dc();z.Mc("nzLoading",t.approving)}}function Ud(t,e){if(1&t){const t=z.sc();z.rc(0,"button",57),z.zc("click",(function(){return z.dd(t),z.Dc().viewRspClick()})),z.qd(1,"View RSP"),z.qc()}}function Od(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"button",58),z.zc("click",(function(){return z.dd(t),z.Dc().submitTransaction()})),z.qd(2,"Submit Transaction "),z.qc(),z.qc()}if(2&t){const t=z.Dc();
1z.Ub(1),z.Mc("nzLoading",t.approving)}}function xd(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"button",59),z.zc("click",(function(){return z.dd(t),z.Dc().viewRspClick()})),z.qd(2,"View RSP"),z.qc(),z.qc()}}function Ld(t,e){if(1&t){const t=z.sc();z.rc(0,"div",60),z.qd(1,"By clicking \u201cSubmit Transaction \u201d button, your confirm your trades and agreed to the "),z.rc(2,"a",61),z.zc("click",(function(){return z.dd(t),z.Dc().fireTncModal()})),z.qd(3,"terms and conditions"),z.qc(),z.qd(4," on FSMOne."),z.qc()}}function kd(t,e){1&t&&(z.rc(0,"div",62),z.rc(1,"p",63),z.qd(2," I/we have received, read and understood and agreed the relevant Mandate, "),z.rc(3,"b"),z.rc(4,"a",64),z.qd(5," Risk Disclosure Statement "),z.qc(),z.qd(6,", "),z.rc(7,"a",64),z.qd(8," Loan Financing Risk Disclosure Statement "),z.qc(),z.qd(9,", "),z.rc(10,"a",64),z.qd(11," Investment Account Terms and Conditions "),z.qc(),z.qd(12,", "),z.rc(13,"a",65),z.qd(14," Managed Portfolios Terms and Conditions "),z.qc(),z.qc(),z.qd(15," and hereby authorize iFAST with the discretionary authority (including but not limited to the frequency, scope and methodology of rebalancing) to execute transactions on my/our behalf for the purpose of managing my/our investment under the selected portfolio(s). "),z.qc(),z.rc(16,"p",63),z.qd(17," All investment involves risk and I/we are solely responsible for the decision made on the investment. In acting upon my/our investment instructions, I/we fully understand the consequences of my/our investment choice, and hereby irrevocably indemnify FSM from and against all losses, damages, costs and expenses whatsoever legal or otherwise, which I may sustain, suffer or incur as a result of the performance of any investment(s) and/or currency conversion connected with any transaction(s) for the account. "),z.qc(),z.rc(18,"p",63),z.qd(19," I/we agree that you may transfer and disclose any information relating to me and my/our account, which is necessary for carrying out these services and/or for compliance, to relevant entities and regulators. "),z.qc(),z.rc(20,"p",63),z.qd(21," I/we declare that I/we am/are the ultimate Beneficial Owner of this account and that no person other than myself/ourselves have or will have any interest in, influence or control over this account, whatsoever. "),z.qc(),z.rc(22,"p",63),z.qd(23," I/we declare that I/we am/are not a U.S person and in the event of a change in my/our status that I/we become a U.S person, I shall notify FSM of the change. "),z.qc(),z.rc(24,"p",63),z.qd(25," I/we am/are aware that FSM (iFAST) has appointed Malayan Banking Berhad (Reg No 787435-M) as the custodian for FSM Managed Portfolio. "),z.qc(),z.rc(26,"p",63),z.qd(27," I/we am/are aware that I/we may receive reports, statements or any other documents in relation to the portfolio investment from Malayan Banking Berhad by mail, courier, fax transmission or by such other means as the Custodian may designate from time to time. "),z.qc(),z.rc(28,"p",63),z.qd(29," Corporate account transactions (if applicable): By submitting the transactions, the above declarations would have deemed to be made by the authorized signatories on behalf of the entity/body/business. "),z.qc(),z.qc()),2&t&&(z.Ub(4),z.Mc("href","/download/B2C_DPMS_Risk_Disclosure_Statement.pdf",z.gd),z.Ub(3),z.Mc("href","/download/B2C_DPMS_Loan_Risk_Disclosure_Statement.pdf",z.gd),z.Ub(3),z.Mc("href","/download/B2C_Investment_Terms_And_Conditions.pdf",z.gd),z.Ub(3),z.Mc("href","/download/B2C_Managed_Portfolios_Terms_And_Conditions.pdf",z.gd))}function Nd(t,e){1&t&&(z.rc(0,"div",62),z.rc(1,"p",63),z.qd(2," I have placed the above order(s) without any investment advice from FSMOne.com. I also acknowledge and understand that it is my responsibility to ensure the suitability of the product selected and I will not be able to rely on section 27 of the FAA to file a civil claim in the event that I have suffered a loss. I wish to proceed with my choice of investment product without advice and hereby instruct FSMOne.com, on my behalf, to submit the above transactions. "),z.qc(),z.rc(3,"p",63),z.qd(4," By instructing FSMOne.com to apply for any investment(s) on my behalf, I am prepared to accept the risk of the investment(s) going up and down. I hereby irrevocably hold FSMOne.com harmless (or \u201cindemnify FSMOne.com\u201d) from and against all losses, damages, costs and expenses whatsoever legal or otherwise, which I may sustain, suffer or incur as a result of the performance of any investment(s) and currency conversion connected with any transaction for the Account. I confirm that I have received, read, understood and agreed to be bound by this Application Form, the relevant Investment Account Terms and Conditions, Fee Schedule, fund prospectuses, product highlight sheets, offering documents, the Important Notes for Transacting of Unit Trust, Important Notes for Transacting of Bonds, Important Notes for Regular Savings Plan, where applicable. "),z.qc(),z.rc(5,"p",63),z.qd(6," I declare that I am not an undischarged bankrupt, have not committed any act of bankruptcy within the past 12 months and no bankruptcy order has been made against me or is pending against me during that period. "),z.qc(),z.rc(7,"p",63),z.qd(8," Corporate account transactions: By submitting the transactions, the above declarations would have deemed to be made by the authorised signatories on behalf of the entity/body/business. "),z.qc(),z.rc(9,"p",63),z.qd(10," For Securities purchased or subscribed through iFAST, the Securities must be sold through iFAST otherwise additional transfer fees may be incurred by the Customer (if applicable). All Securities purchased or subscribed through iFAST will be held in the name of the Custodian hence the Securities are not registered in the Customer's name. "),z.qc(),z.qc())}const _d=function(){return{}},Bd=function(){return{position:"fixed",top:"0",left:"0",width:"100%","z-index":"1050","padding-top":"80px"}};function Vd(t,e){if(1&t){const t=z.sc();z.pc(0),z.rc(1,"div",66),z.Ec(2,"async"),z.rc(3,"shared-approve-action",67),z.zc("emitCancel",(function(){return z.dd(t),z.Dc().onHandleCancel()}))("onApprove",(function(e){return z.dd(t),z.Dc().onClickApprove(e)}))("on2FaMethodChecked",(function(){return z.dd(t),z.Dc().on2FaMethodChecked()})),z.qc(),z.qc(),z.oc()}if(2&t){const t=z.Dc();z.Ub(1),z.Mc("ngStyle",z.Fc(2,5,t.isMobile$)?z.Rc(7,_d):z.Rc(8,Bd)),z.Ub(2),z.Mc("refno",t.refno)("requestKey",t.APPROVE_TRADE_REQUEST_KEY)("actionKey",t.RSP_APL_ACTION_KEY)("width",600)}}function Yd(t,e){1&t&&z.nc(0)}function Hd(t,e){if(1&t&&(z.pc(0),z.rc(1,"div",68),z.od(2,Yd,1,0,"ng-container",55),z.qc(),z.oc()),2&t){z.Dc();const t=z.ad(50);z.Ub(2),z.Mc("ngTemplateOutlet",t)}}
1function jd(t,e){1&t&&z.mc(0,"router-outlet")}function $d(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-fund-details",70),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showEditFundDetailsModal=e}))("removeSelectedRsp",(function(e){return z.dd(t),z.Dc(2).removeRspCart(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("sedolnumber",t.selectedEditCart.buyInfoModel.sedolNumber)("visible",t.showEditFundDetailsModal)("oriBuyData",t.selectedEditCart.buyInfoModel)}}function Gd(t,e){if(1&t&&(z.rc(0,"div",66),z.Ec(1,"async"),z.od(2,$d,1,4,"rsp-fund-details",69),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,_d):z.Rc(5,Bd)),z.Ub(2),z.Mc("ngIf",t.selectedEditCart&&t.showEditFundDetailsModal)}}function Wd(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-dpms-details",72),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showEditDpmsDetailsModal=e}))("removeSelectedRsp",(function(e){return z.dd(t),z.Dc(2).removeRspCart(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("portfolioId",t.selectedEditCart.buyInfoModel.sedolNumber)("visible",t.showEditDpmsDetailsModal)("oriBuyData",t.selectedEditCart.buyInfoModel)}}function Xd(t,e){if(1&t&&(z.rc(0,"div",66),z.Ec(1,"async"),z.od(2,Wd,1,4,"rsp-dpms-details",71),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,_d):z.Rc(5,Bd)),z.Ub(2),z.Mc("ngIf",t.selectedEditCart&&t.showEditDpmsDetailsModal)}}function Kd(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-etf-details",74),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc(2).showEditEtfDetailsModal=e}))("removeSelectedRsp",(function(e){return z.dd(t),z.Dc(2).removeRspEtfCart(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("refno",t.refno)("stockCode",t.selectedEditCart.buyInfoModel.sedolNumber)("exchange",t.selectedEditCart.buyInfoModel.exchange)("selectedEtf",t.selectedEditCart.buyInfoModel.rspEtfData)("visible",t.showEditEtfDetailsModal)("oriBuyData",t.selectedEditCart.buyInfoModel)}}function Jd(t,e){if(1&t&&(z.rc(0,"div",66),z.Ec(1,"async"),z.od(2,Kd,1,6,"rsp-etf-details",73),z.qc()),2&t){const t=z.Dc();z.Mc("ngStyle",z.Fc(1,2,t.isMobile$)?z.Rc(4,_d):z.Rc(5,Bd)),z.Ub(2),z.Mc("ngIf",t.selectedEditCart&&t.showEditEtfDetailsModal)}}const Zd=function(t,e){return{"container mt-5":t,"w-100 mb-6 pb-6":e}};let Qd=(()=>{class t{constructor(t,e,n,i,c,o,s,a,r,l){this.store=t,this.subHandlingService=e,this.cdRef=n,this.router=i,this.transactionRestService=c,this.transactionDpmsRestService=o,this.nzNotificationService=s,this.twoFaService=a,this.route=r,this.stockTransactionRestService=l,this.productTypeEnum=so.a,this.orderCartConstant=ad.a,this.cartList=[],this.totalInvestmentAmountByPaymentMethod=[],this.importantNoteVisible=!1,this.orderSuccess=!1,this.showReferralChannelPaymentModal=!1,this.showPaymentResultModal=!1,this.paymentResultModalSuccess=!1,this.paymentDetails=[],this.showEditFundDetailsModal=!1,this.showEditDpmsDetailsModal=!1,this.showEditEtfDetailsModal=!1,this.fepBreached=!1,this.FPXSelected=0,this.showTnc=!1,this.approving=!1,this.isSubmitLoading=!1,this.APPROVE_TRADE_REQUEST_KEY=ld.a.APPROVE_TRADE,this.RSP_APL_ACTION_KEY=od.a.RSP_APL,this.subscribeRefnoChange(),this.subscribeViewOrderCart()}ngOnChanges(t){this.initializeRoute()}ngOnInit(){this.store.dispatch(new dd.b),this.initializeRoute(),this.store.selectSnapshot(T.a.getPrimaryAccount),this.subHandlingService.subscribe(this.route.queryParams.pipe(Object(f.a)(t=>{if(t.channel){switch(t.channel){case M.n.CHANNEL_ID_GOPAYZ:const t=ad.a.PENDING;this.paymentResultModalTitle="GoPayz - MYR",this.paymentResultModalMessage="We regret to inform that GoPayz is no longer in service.",this.paymentResultModalDescription="Please use another payment method.<br>Thank You.",this.paymentResultModalSuccess=!1,this.paymentResultModalPrimaryLabel="Done",this.updateOrderCartType(h.a.GOPAYZ,t)}this.showPaymentResultModal=!0}})))}backToRspOrderPage(){let t=M.o.RSP_FUND_LIST;this.productType===this.productTypeEnum.DPMS?t=M.o.RSP_DPMS_LIST:this.productType===it.TRUST_ACCOUNT?t=M.o.CASH_ACCT_RSP:this.productType===it.ETF&&(t=M.o.RSP_ETF_LIST),this.router.navigate([M.o.APP,M.o.RSP,M.o.CREATE_RSP,t])}subscribeRefnoChange(){this.subHandlingService.subscribe(this.refno$.pipe(Object(f.a)(t=>{this.refno=t,this.productType===it.TRUST_ACCOUNT&&this.backToRspOrderPage(),this.getAccountDetails(),this.cdRef.markForCheck(),this.refreshTradeProductList()})))}subscribeViewOrderCart(){console.log("subscribeViewOrderCart",this.refno,this.productType),this.orderCartList$=this.store.select(v.f.getCartListByProduct).pipe(Object(m.a)(t=>
1t(this.refno,this.productType))),this.subHandlingService.subscribe(this.orderCartList$.pipe(Object(f.a)(t=>{this.cartList=t,this.refreshTradeProductList(),this.cdRef.markForCheck(),console.log("cartList",this.cartList)})))}refreshTradeProductList(){this.totalInvestmentAmountByPaymentMethod=[],console.log("this.cartList",this.cartList),this.cartList.forEach(t=>{console.log("this.totalInvestmentAmountByPaymentMethod",this.totalInvestmentAmountByPaymentMethod);const e=this.totalInvestmentAmountByPaymentMethod.find(e=>e.displayTitle===t.displayTitle);e?(e.totalAmount=Number(e.totalAmount)+Number(t.buyInfoModel.amount),e.paymentCartList.push(t)):this.totalInvestmentAmountByPaymentMethod.push({paymentMethod:t.buyInfoModel.paymentMethod,totalAmount:t.buyInfoModel.amount,displayTitle:t.displayTitle,currencyCode:t.buyInfoModel.currency,paymentCartList:[t],orderCartType:t.orderCartType,availableLimit:t.buyInfoModel.bankLimit})})}getAccountDetails(){this.authenticatedDisplay$=this.store.select(T.a.getAccounts),this.authenticatedDisplay$.subscribe(t=>{const e=t.filter(t=>t.refno===this.refno);e.length>0&&(this.selectedAcct=Object(g.a)(e[0]))})}onEditCart(t){console.log("cart",t),this.selectedEditCart=t,this.selectedEditCart.productType===so.a.UNIT_TRUST?this.showEditFundDetailsModal=!0:this.selectedEditCart.productType===so.a.DPMS?this.showEditDpmsDetailsModal=!0:this.selectedEditCart.productType===it.TRUST_ACCOUNT?this.router.navigate([M.o.APP,M.o.RSP,M.o.CREATE_RSP,M.o.CASH_ACCT_RSP],{queryParams:{edit:!0}}):this.selectedEditCart.productType===so.a.ETF&&(this.showEditEtfDetailsModal=!0)}submitTransaction(){this.totalInvestmentAmountByPaymentMethod.forEach(t=>{"FPX"===t.paymentMethod&&(this.FPXSelected=this.FPXSelected+1)}),this.FPXSelected>0?(this.FPXSelected=0,this.importantNoteVisible=!0):(this.FPXSelected=0,this.check2FaMethod())}check2FaMethod(){this.approving=!0}on2FaMethodChecked(){this.importantNoteVisible=!1}onClickApprove(t){const e=[],n={refno:this.refno,dpmsBuyModel:[]},i=[];this.cartList.forEach(t=>{if(t.productType===so.a.UNIT_TRUST||t.productType===it.TRUST_ACCOUNT)e.push(t.buyInfoModel);else if(t.productType===so.a.DPMS){const e=Object.assign(Object.assign({},t.buyInfoModel),{dpmsPortfolioId:t.buyInfoModel.sedolNumber});n.dpmsBuyModel.push(e),console.log("dpmsTransactionModel",n)}else if(t.productType===so.a.ETF){const e=Object.assign(Object.assign({},t.buyInfoModel),{stockCode:t.buyInfoModel.sedolNumber,etfName:t.productName});i.push(e)}}),this.productType===so.a.UNIT_TRUST?this.submitUtTransaction(t,e):this.productType===so.a.DPMS?this.submitDpmsTransaction(t,n):this.productType===it.TRUST_ACCOUNT?this.submitCashAcctRspTransaction(t,e):this.productType===it.ETF&&this.submitEtfTransaction(t,i)}submitUtTransaction(t,e){this.subHandlingService.once(t.pipe(Object(cd.a)(t=>this.transactionRestService.confirmOrderBuyWithCredential(this.refno,e,t).pipe(this.twoFaService.intercept())),Object(f.a)(t=>{this.isSubmitLoading=!1,t.status===M.a.RESPONSE_SUCCESS?(this.nzNotificationService.success("Success","Order Placed."),this.store.dispatch(new v.h({refno:this.refno,orderStatus:h.a.ORDER_PLACED})),this.totalInvestmentAmountByPaymentMethod.forEach(e=>{var n,i,c;const o=e.paymentMethod;let s=ad.a.ORDER_RECEIVED;if(o===h.a.GOPAYZ){const e=null===(c=null===(i=null===(n=t.data)||void 0===n?void 0:n.summary)||void 0===i?void 0:i.rspList)||void 0===c?void 0:c.filter((t,e)=>t.paymentMethod===h.a.GOPAYZ&&"pending"===t.rspStatus);Array.isArray(e)&&e.length>0&&(s=ad.a.PAYMENT)}this.updateOrderCartType(o,s)}),this.orderSuccess=!0,this.refreshTradeProductList()):t.errorMessage.includes("foreign.exchange.policy.breached")?this.fepBreached=!0:(this.fepBreached=!1,this.nzNotificationService.error("Failed",t.errorMessage)),this.onHandleCancel()}),Object(Ke.a)(()=>this.store.dispatch(new dd.e(!1,!0)))))}onHandleRspOrderResponse(t,e=!0){t.status===M.a.RESPONSE_SUCCESS?(this.nzNotificationService.success("Success","Order Placed."),this.store.dispatch(new v.h({refno:this.refno,orderStatus:h.a.ORDER_PLACED}
1)),this.totalInvestmentAmountByPaymentMethod.forEach(t=>{this.updateOrderCartType(t.paymentMethod,ad.a.ORDER_RECEIVED)}),this.orderSuccess=!0,this.refreshTradeProductList()):t.errorMessage.includes("foreign.exchange.policy.breached")&&e?this.fepBreached=!0:(this.fepBreached=!1,this.nzNotificationService.error("Failed",t.errorMessage)),this.onHandleCancel()}submitDpmsTransaction(t,e){this.subHandlingService.once(t.pipe(Object(cd.a)(t=>this.transactionDpmsRestService.confirmOrderRspWithCredential(this.refno,e,t).pipe(this.twoFaService.intercept())),Object(f.a)(t=>{this.onHandleRspOrderResponse(t)}),Object(Ke.a)(()=>this.store.dispatch(new dd.e(!1,!0)))))}submitCashAcctRspTransaction(t,e){this.subHandlingService.once(t.pipe(Object(cd.a)(t=>this.transactionRestService.confirmRspTrustAcctWithCredential(this.refno,e,t).pipe(this.twoFaService.intercept())),Object(f.a)(t=>{this.onHandleRspOrderResponse(t,!1)}),Object(Ke.a)(()=>this.store.dispatch(new dd.e(!1,!0)))))}submitEtfTransaction(t,e){this.subHandlingService.once(t.pipe(Object(cd.a)(t=>this.stockTransactionRestService.confirmRspEtfOrderWithCredential(this.refno,e,t).pipe(this.twoFaService.intercept())),Object(f.a)(t=>{this.onHandleRspOrderResponse(t)}),Object(Ke.a)(()=>this.store.dispatch(new dd.e(!1,!0)))))}onHandleCancel(){this.approving=!1}initializeRoute(){console.log("initializeRoute"),this.route.queryParams.subscribe(t=>{this.productType=t.productType,console.log("this.productType",this.productType),this.subscribeViewOrderCart()})}viewRspClick(){this.router.navigate([M.o.APP,M.o.RSP,M.o.RSP_LIST],{queryParams:{refno:this.refno}})}onCloseReferralChannelPaymentModal(){this.showReferralChannelPaymentModal=!1}payNowClick(t){t.paymentMethod===h.a.GOPAYZ&&(this.modalTitle=`${h.a.GOPAYZ} - ${t.currencyCode}`,this.modalCurrency=t.currencyCode,this.modalPaymentAmount=t.totalAmount,this.showReferralChannelPaymentModal=!0)}onPayNowWithGoPayz(){this.referralChannelAction=Object(g.a)({refno:this.refno,token:this.store.selectSnapshot(T.a.getToken),callbackUrl:this.router.url.split("?")[0],actionUrl:`${tn.a.apiUrl}${rd.a.TRANSACTION+rd.a.GOPAYZ+rd.a.SUBSCRIPTION+rd.a.SEND}`})}updateOrderCartType(t,e){this.store.dispatch(new v.g({refno:this.refno,paymentMethod:t,orderCartType:e}))}onEditOrderClick(t){console.log("cart",t),this.selectedEditCart=t,t.productType===it.UT&&(this.showEditFundDetailsModal=!0,console.log("",this.selectedEditCart,this.showEditFundDetailsModal))}removeRspCart(t){console.log("productId",t),this.store.dispatch(new v.c(t)),console.log("remove",t)}removeRspEtfCart(t){console.log("productId",t),this.store.dispatch(new v.e(t.stockCode,t.exchange)),console.log("remove",t)}fireTncModal(){this.showTnc=!0}onCloseBuyTncModal(){this.showTnc=!1}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(C.a),z.lc(z.j),z.lc(q.e),z.lc(lt.a),z.lc(ti.a),z.lc(St.b),z.lc(sd.a),z.lc(q.a),z.lc(nn.a))},t.\u0275cmp=z.fc({type:t,selectors:[["ng-component"]],features:[z.Tb([C.a,sd.a]),z.Sb],decls:59,vars:57,consts:[[1,"border-bottom"],[3,"title","back"],[1,"bg-lighter","mb-6"],[3,"ngClass"],["nzType","flex",3,"nzGutter"],["nz-col","",3,"nzSpan"],[1,"h-100"],[1,"text-xs"],["nz-icon","","nzTheme","outline","nzType","arrow-left",1,"pointer","pr-2",3,"click"],[1,"infinite-container","mt-2"],[4,"ngFor","ngForOf"],[4,"ngIf"],["nz-col","","nzLg","6","nzXs","24",1,"order-cart","align-self-stretch"],["nz-row","",1,"mb-3"],[3,"isRspEtf"],["nz-row",""],["nz-row","",3,"class",4,"ngIf"],["nz-row","",1,"px-1"],["class","font-weight-bold mb-2 mt-4 w-100","nz-button","","nzType","primary",3,"nzLoading","click",4,"ngIf"],["class","font-weight-bold my-2 w-100","nz-button","","nzType","primary",3,"click",4,"ngIf"],["utTncTemplate",""],["dpmsTncTemplate",""],["etfTncTemplate",""],[3,"importantNoteVisible","isBtnLoading","importantNoteVisibleChange","confirmBtn"],["routerTemplate",""],["investmentType","RSP Investment","primaryLabel","Apply Now","channelName","gopayz",3,"visible","refno","title","currencyCode","totalAmount","handleCancel","handlePrimaryClick"],[3,"referralChannelAction"],[3,"visible","paymentDetails","title","message","description","success","primaryLabel","handlePrimaryClick"],[3,"ngStyle",4,"ngIf"],[3,"isModalVisible","onCloseModal"],[3,"showModal","refno","showModalChange"],[1,"my-2","mr-2","product-background","p-3"],["nz-row","","nzType","flex","nzGutter","20","nzAlign","middle",1,"text-left"],["nz-col","","nzSpan","24",1,"font-weight-bold","text-theme"],["nz-row","","nzType","flex","nzJustify","space-between","nzGutter","20","nzAlign","middle","class","py-1",4,"ngFor","ngForOf"],["nz-row","","nzType","flex","nzJustify","space-between","nzGutter","20","nzAlign","middle",1,"py-1"],["nz-col","",3,"nzLg"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-sm","font-weight-bold"],["nz-row","","nzAlign","middle","nzJustify","center","class","mt-1 text-xs font-weight-bold",4,"ngIf"],["nz-col","","nzLg","5"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-sm"],["nz-row","","nzAlign","middle","nzJustify","center",1,"text-base","font-weight-bold"],["nz-col","","nzLg","5",4,"ngIf"],["nz-col","","nzLg","2",4,"ngIf"],["nz-row","","nzAlign","middle","nzJustify","center",1,"mt-1","text-xs","font-weight-bold"],[3,"exchange"],["nz-col","","nzLg","2"],["nz-icon","","nzType","edit","nzTheme","outline",1,"pointer",3,"click"],[3,"ngTemplateOutlet"],["payButtonLabel","Apply Now",3,"orderCartType","paymentTitle","isShowContent","payNow"],[1,"row","py-1","text-sm"],[1,"col","text-left"],[1,"col","text-right","font-weight-bold"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngTemplateOutlet"],["nz-button","","nzType","primary",1,"font-weight-bold","mb-2","mt-4","w-100",3,"nzLoading","click"],["nz-button","","nzType","primary",1,"font-weight-bold","my-2","w-100",3,"click"],["nz-button","","nzBlock","","nzType","primary",1,"font-weight-bold",3,"nzLoading","click"],["nz-button","","nzBlock","","nzType","primary",1,"font-weight-bold",3,"click"],["nz-row","",1,"text-sm"],[3,"click"],[1,"overflow-auto","mb-3",2,"height","250px"],[1,"text-sm"],["target","_blank",1,"text-link",3,"href"],["target","_blank",1,"text-link","ng-scope",3,"href"],[3,"ngStyle"],[3,"refno","requestKey","actionKey","width","emitCancel","onApprove","on2FaMethodChecked"],[1,"bg-lighter","py-6"],["detailsType","edit",3,"refno","sedolnumber","visible","oriBuyData","visibleChange","removeSelectedRsp",4,"ngIf"],["detailsType","edit",3,"refno","sedolnumber","visible","oriBuyData","visibleChange","removeSelectedRsp"],["detailsType","edit",3,"refno","portfolioId","visible","oriBuyData","visibleChange","removeSelectedRsp",4,"ngIf"],["detailsType","edit",3,"refno","portfolioId","visible","oriBuyData","visibleChange","removeSelectedRsp"],["detailsType","edit",3,"refno","stockCode","exchange","selectedEtf","visible","oriBuyData","visibleChange","removeSelectedRsp",4,"ngIf"],["detailsType","edit",3,"refno","stockCode","exchange","selectedEtf","visible","oriBuyData","visibleChange","removeSelectedRsp"]],template:function(t,e){1&t&&(z.rc(0,"app-mobile-scaffold"),z.rc(1,"div",0),z.rc(2,"b2c-app-bar-2",1),z.zc("back",(function(){return e.backToRspOrderPage()})),z.qc(),z.qc(),z.qc(),z.pc(3),z.rc(4,"div",2),z.rc(5,"div",3),z.Ec(6,"async"),z.Ec(7,"async"),z.rc(8,"nz-row",4),z.Ec(9,"async"),z.rc(10,"div",5),z.Ec(11,"async"),z.rc(12,"nz-card",6),z.rc(13,"p",7),z.qd(14,"Home / RSP / Check Out"),z.qc(),z.rc(15,"h3"),z.rc(16,"i",8),z.zc("click",(function(){return e.backToRspOrderPage()})),z.qc(),z.qd(17," Check Out"),z.qc(),z.rc(18,"h4"),z.qd(19),z.qc(),z.rc(20,"div",9),z.od(21,Td,6,2,"div",10),z.qc(),z.od(22,Sd,2,1,"div",11),z.Ec(23,"async"),z.qc(),z.qc(),z.rc(24,"div",12),z.rc(25,"div",13),z.mc(26,"investment-account-selector",14),z.qc(),z.rc(27,"div",15),z.Ec(28,"async"),z.od(29,zd,4,3,"ng-container",11),z.qc(),z.od(30,Fd,6,8,"div",16),z.rc(31,"div",17),z.rc(32,"app-web-scaffold"),z.od(33,Id,2,1,"button",18),z.od(34,Ud,2,0,"button",19),z.qc(),z.rc(35,"app-mobile-scaffold"),z.od(36,Od,3,1,"b2c-floating-bar",11),z.od(37,xd,3,0,"b2c-floating-bar",11),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.oc(),z.od(38,Ld,5,0,"ng-template",null,20,z.pd),z.od(4
10,kd,30,4,"ng-template",null,21,z.pd),z.od(42,Nd,11,0,"ng-template",null,22,z.pd),z.rc(44,"fsm-important-note",23),z.zc("importantNoteVisibleChange",(function(t){return e.importantNoteVisible=t}))("confirmBtn",(function(){return e.check2FaMethod()})),z.qc(),z.od(45,Vd,4,9,"ng-container",11),z.rc(46,"app-mobile-scaffold"),z.od(47,Hd,3,1,"ng-container",11),z.Ec(48,"async"),z.qc(),z.od(49,jd,1,0,"ng-template",null,24,z.pd),z.rc(51,"app-referral-channel-payment-modal",25),z.zc("handleCancel",(function(){return e.onCloseReferralChannelPaymentModal()}))("handlePrimaryClick",(function(){return e.onPayNowWithGoPayz()})),z.qc(),z.mc(52,"app-referral-channel-submit-form",26),z.rc(53,"app-payment-result-modal",27),z.zc("handlePrimaryClick",(function(t){return null==e.paymentResultHandlePrimaryClick?null:e.paymentResultHandlePrimaryClick.call(t)})),z.qc(),z.od(54,Gd,3,6,"div",28),z.od(55,Xd,3,6,"div",28),z.od(56,Jd,3,6,"div",28),z.rc(57,"buy-tnc-modal",29),z.zc("onCloseModal",(function(){return e.onCloseBuyTncModal()})),z.qc(),z.rc(58,"fep-breached-modal",30),z.zc("showModalChange",(function(t){return e.fepBreached=t})),z.qc()),2&t&&(z.Ub(2),z.Mc("title","Check Out"),z.Ub(3),z.Mc("ngClass",z.Tc(54,Zd,!z.Fc(6,40,e.isMobile$),z.Fc(7,42,e.isMobile$))),z.Ub(3),z.Mc("nzGutter",z.Fc(9,44,e.isMobile$)?0:16),z.Ub(2),z.Mc("nzSpan",z.Fc(11,46,e.isMobile$)?0:18),z.Ub(9),z.td("Investment Account - ",e.refno," ",null==e.selectedAcct?null:e.selectedAcct.nricName,""),z.Ub(2),z.Mc("ngForOf",e.totalInvestmentAmountByPaymentMethod),z.Ub(1),z.Mc("ngIf",!z.Fc(23,48,e.isMobile$)),z.Ub(4),z.Mc("isRspEtf",e.productType===e.productTypeEnum.ETF),z.Ub(1),z.Wb(z.Fc(28,50,e.isMobile$)?"bg-white py-3 px-2":""),z.Ub(2),z.Mc("ngIf",e.totalInvestmentAmountByPaymentMethod.length>0),z.Ub(1),z.Mc("ngIf",!e.orderSuccess),z.Ub(3),z.Mc("ngIf",!e.orderSuccess),z.Ub(1),z.Mc("ngIf",e.orderSuccess),z.Ub(2),z.Mc("ngIf",!e.orderSuccess),z.Ub(1),z.Mc("ngIf",e.orderSuccess),z.Ub(7),z.Mc("importantNoteVisible",e.importantNoteVisible)("isBtnLoading",e.approving),z.Ub(1),z.Mc("ngIf",e.approving),z.Ub(2),z.Mc("ngIf",z.Fc(48,52,e.isMobile$)),z.Ub(4),z.Mc("visible",e.showReferralChannelPaymentModal)("refno",e.refno)("title",e.modalTitle)("currencyCode",e.modalCurrency)("totalAmount",e.modalPaymentAmount),z.Ub(1),z.Mc("referralChannelAction",e.referralChannelAction),z.Ub(1),z.Mc("visible",e.showPaymentResultModal)("paymentDetails",e.paymentDetails)("title",e.paymentResultModalTitle)("message",e.paymentResultModalMessage)("description",e.paymentResultModalDescription)("success",e.paymentResultModalSuccess)("primaryLabel",e.paymentResultModalPrimaryLabel),z.Ub(1),z.Mc("ngIf",e.selectedEditCart&&e.showEditFundDetailsModal),z.Ub(1),z.Mc("ngIf",e.selectedEditCart&&e.showEditDpmsDetailsModal),z.Ub(1),z.Mc("ngIf",e.selectedEditCart&&e.showEditEtfDetailsModal),z.Ub(1),z.Mc("isModalVisible",e.showTnc),z.Ub(1),z.Mc("showModal",e.fepBreached)("refno",e.refno))},directives:[H.a,ut.a,P.q,V.c,V.a,w.a,mt.b,P.s,P.t,Ge.a,R.a,ud.a,pd.a,hd.a,fd.a,md.a,fo.a,Nc.a,P.A,Es.a,P.x,P.y,Y.a,pt.a,P.w,bd.a,q.j,qs,ua,ar],pipes:[P.b,qr.a,P.g],styles:[".product-background[_ngcontent-%COMP%]{background-color:#f5f8f9}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(y.X.getSelectedRefno)],t.prototype,"refno$",void 0),t})();var tu=n("5CBK"),eu=n("7b0G"),nu=n("XN+R"),iu=n("AaRd"),cu=n("niWF"),ou=n("xzdC"),su=n("GRnb"),au=n("2i05"),ru=n("MV2b");function lu(t,e){if(1&t&&(z.rc(0,"div",13),z.mc(1,"app-stock-exchange-tag",14),z.qd(2),z.qc()),2&t){const t=z.Dc(3);
1z.Ub(1),z.Mc("exchange",null==t.rspDetailsModel?null:t.rspDetailsModel.exchange),z.Ub(1),z.sd(" ",t.rspDetails.sedolnumber,"")}}function du(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"h4"),z.qd(2),z.qc(),z.rc(3,"div"),z.mc(4,"b2c-rsp",15),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Ub(2),z.sd("My ",t.rspDetailsModel.title,""),z.Ub(2),z.Mc("type","grid")("bankName",null==t.rspDetails.iamRspModel?null:t.rspDetails.iamRspModel.bankAccountName)("bankAccount",null==t.rspDetails.iamRspModel?null:t.rspDetails.iamRspModel.bankAccountNo)("currency","MYR")("usedAmount",t.totalUsedAmount)("totalAmount",null==t.rspDetails.iamRspModel?null:t.rspDetails.iamRspModel.maxDdaAmount)}}function uu(t,e){if(1&t&&(z.rc(0,"div"),z.nc(1,16),z.qc()),2&t){z.Dc(3);const t=z.ad(2);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function pu(t,e){if(1&t&&(z.rc(0,"div"),z.nc(1,16),z.qc()),2&t){z.Dc(3);const t=z.ad(4);z.Ub(1),z.Mc("ngTemplateOutlet",t)}}function hu(t,e){if(1&t){const t=z.sc();z.rc(0,"div",17),z.Ec(1,"async"),z.rc(2,"div",18),z.rc(3,"button",19),z.zc("click",(function(){return z.dd(t),z.Dc(3).closeRspDetails()})),z.qd(4,"Cancel"),z.qc(),z.qc(),z.rc(5,"div",18),z.rc(6,"button",20),z.zc("click",(function(){z.dd(t);const e=z.Dc(3);return e.handleRspAmendment("edit",e.rspDetails)})),z.qd(7,"Update"),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Wb(z.Fc(1,4,t.isMobile$)?" fixed-bottom":""),z.Ub(6),z.Mc("nzLoading",t.isLoading)("disabled",t.checkButtonDisable())}}function fu(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"button",21),z.zc("click",(function(){return z.dd(t),z.Dc(3).closeRspDetails()})),z.qd(2,"Cancel"),z.qc(),z.rc(3,"button",22),z.zc("click",(function(){z.dd(t);const e=z.Dc(3);return e.handleRspAmendment("edit",e.rspDetails)})),z.qd(4,"Update"),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Ub(3),z.Mc("disabled",t.checkButtonDisable())}}function mu(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"div"),z.rc(2,"h3",5),z.qd(3),z.qc(),z.od(4,lu,3,2,"div",6),z.rc(5,"p",7),z.qd(6),z.Ec(7,"titlecase"),z.qc(),z.qc(),z.od(8,du,5,7,"div",3),z.rc(9,"div",8),z.rc(10,"h4",9),z.qd(11,"RSP Information"),z.qc(),z.rc(12,"p",10),z.qd(13),z.qc(),z.rc(14,"div",11),z.od(15,uu,2,1,"div",3),z.od(16,pu,2,1,"div",3),z.qc(),z.qc(),z.od(17,hu,8,6,"div",12),z.Ec(18,"async"),z.od(19,fu,5,1,"b2c-floating-bar",3),z.Ec(20,"async"),z.qc()),2&t){const t=z.Dc(2);z.Ub(3),z.rd(t.rspDetails.fundName),z.Ub(1),z.Mc("ngIf","ETF"===(null==t.rspDetailsModel?null:t.rspDetailsModel.productType)),z.Ub(2),z.td("References: ",t.rspDetails.orderNo," - ",z.Fc(7,10,t.rspDetails.fundStatus)," RSP"),z.Ub(2),z.Mc("ngIf",t.showDdaBanner),z.Ub(5),z.sd("If you would like to change your ",t.rspFreqDisplay,' RSP amount, please change the RSP amount accordingly and then click on the "Update" button.'),z.Ub(2),z.Mc("ngIf",(null==t.rspDetailsModel?null:t.rspDetailsModel.productType)!==t.IProductEnum.ETF_UPPER_CASE),z.Ub(1),z.Mc("ngIf",(null==t.rspDetailsModel?null:t.rspDetailsModel.productType)===t.IProductEnum.ETF_UPPER_CASE),z.Ub(1),z.Mc("ngIf",!z.Fc(18,12,t.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(20,14,t.isMobile$))}}function bu(t,e){if(1&t&&(z.rc(0,"div",4),z.od(1,mu,21,16,"div",3),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.rspDetails)}}function gu(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function yu(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" Minimum amount is ",null==t.rspDetails?null:t.rspDetails.minRspNum,". ")}}function Mu(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" Amount only accept ",t.rspAmountDecimalPlaces," decimal place. ")}}function vu(t,e){1&t&&(z.pc(0),z.qd(1," The Minimum Incremental Amount is MYR 100 "),z.oc())}function Cu(t,e){if(1&t&&z.mc(0,"ui-option",35),2&t){const t=e.$implicit;z.Mc("nzValue",t.value)("nzLabel",t.label)}}function Tu(t,e){1&t&&(z.rc(0,"div",29),z.qd(1," Please make sure this field is not blank. "),z.qc())}function Su(t,e){if(1&t&&(z.rc(0,"div",26),z.Ec(1,"async"),z.rc(2,"ui-input-group",36),z.mc(3,"input",37),z.qc(),z.qc()),2&t){const t=z.Dc(3);
1z.Mc("ngClass",z.Fc(1,1,t.isMobile$)?"":"mt-2")}}function Du(t,e){if(1&t){const t=z.sc();z.rc(0,"form",24),z.rc(1,"nz-row"),z.rc(2,"nz-col",25),z.rc(3,"div",26),z.Ec(4,"async"),z.rc(5,"ui-input-group",27),z.mc(6,"input",28),z.qc(),z.rc(7,"div",29),z.od(8,gu,2,0,"ng-container",3),z.od(9,yu,2,1,"ng-container",3),z.od(10,Mu,2,1,"ng-container",3),z.od(11,vu,2,0,"ng-container",3),z.qc(),z.qc(),z.qc(),z.rc(12,"div",30),z.rc(13,"div",26),z.Ec(14,"async"),z.rc(15,"ui-select",31),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).onChangeFrequency()})),z.od(16,Cu,1,2,"ui-option",32),z.qc(),z.od(17,Tu,2,0,"div",33),z.qc(),z.qc(),z.qc(),z.od(18,Su,4,3,"div",34),z.qc()}if(2&t){const t=z.Dc(2);var n=null;const e=(null==(n=t.rspForm.get("frequency"))?null:n.dirty)&&(null==(n=t.rspForm.get("frequency"))?null:n.hasError("required"));z.Mc("formGroup",t.rspForm),z.Ub(3),z.Mc("ngClass",z.Fc(4,11,t.isMobile$)?"mb-2":"mr-2"),z.Ub(2),z.Mc("nzLabelPlaceholder",t.rspFreqDisplay+" RSP"),z.Ub(3),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("required"))),z.Ub(1),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("min"))),z.Ub(1),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("pattern"))),z.Ub(1),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("subAmtValidator"))),z.Ub(2),z.Mc("ngClass",z.Fc(14,13,t.isMobile$)?"mb-2":""),z.Ub(3),z.Mc("ngForOf",t.rspConstants.FREQUENCY_LIST),z.Ub(1),z.Mc("ngIf",e),z.Ub(1),z.Mc("ngIf",(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_CMF||(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT)}}function zu(t,e){if(1&t&&z.od(0,Du,19,15,"form",23),2&t){const t=z.Dc();z.Mc("ngIf",t.rspForm)}}function qu(t,e){1&t&&(z.pc(0),z.qd(1," Please make sure this field is not blank. "),z.oc())}function Eu(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" Minimum amount is ",t.minRspAmount,". ")}}function Au(t,e){if(1&t&&(z.pc(0),z.qd(1),z.oc()),2&t){const t=z.Dc(3);z.Ub(1),z.sd(" Amount only accept ",t.rspAmountDecimalPlaces," decimal place. ")}}function Pu(t,e){1&t&&(z.pc(0),z.qd(1," The Minimum Incremental Amount is MYR 100. "),z.oc())}function Ru(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"Time"),z.qc())}function wu(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"Times"),z.qc())}function Fu(t,e){1&t&&(z.rc(0,"div",29),z.qd(1," Please make sure to select at least one date. "),z.qc())}function Iu(t,e){if(1&t&&(z.rc(0,"div",26),z.Ec(1,"async"),z.rc(2,"ui-input-group",36),z.mc(3,"input",37),z.qc(),z.qc()),2&t){const t=z.Dc(3);z.Mc("ngClass",z.Fc(1,1,t.isMobile$)?"":"mt-2")}}const Uu=function(){return{padding:"9px",height:"50px"}};function Ou(t,e){if(1&t){const t=z.sc();z.rc(0,"form",24),z.rc(1,"nz-row",38),z.rc(2,"div",39),z.Ec(3,"async"),z.rc(4,"ui-input-group",40),z.mc(5,"input",28),z.qc(),z.rc(6,"div",29),z.od(7,qu,2,0,"ng-container",3),z.od(8,Eu,2,1,"ng-container",3),z.od(9,Au,2,1,"ng-container",3),z.od(10,Pu,2,0,"ng-container",3),z.qc(),z.qc(),z.qc(),z.rc(11,"nz-row",38),z.rc(12,"div",39),z.Ec(13,"async"),z.rc(14,"nz-card",41),z.rc(15,"div",42),z.rc(16,"div",43),z.qd(17,"Select RSP Date"),z.qc(),z.rc(18,"div",44),z.qd(19),z.od(20,Ru,2,0,"span",3),z.od(21,wu,2,0,"span",3),z.qc(),z.qc(),z.rc(22,"nz-checkbox-group",45),z.zc("ngModelChange",(function(){return z.dd(t),z.Dc(2).updateTotalRecord()})),z.qc(),z.qc(),z.od(23,Fu,2,0,"div",33),z.qc(),z.qc(),z.od(24,Iu,4,3,"div",34),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("formGroup",t.rspForm),z.Ub(2),z.Mc("ngClass",z.Fc(3,15,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzLabelPlaceholder","RSP Amount")("nzSuffix",(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?null==t.rspDetails?null:t.rspDetails.autoSweepCurrency:"MYR"),z.Ub(3),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("required"))),z.Ub(1),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("min"))),z.Ub(1),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("pattern"))),z.Ub(1),z.Mc("ngIf",(null==t.rspAmount?null:t.rspAmount.dirty)&&(null==t.rspAmount?null:t.rspAmount.hasError("subAmtValidator"))),z.Ub(2),z.Mc("ngClass",z.Fc(13,17,t.isMobile$)?"mb-2":"mr-2 mb-2"),z.Ub(2),z.Mc("nzBodyStyle",z.Rc(19,Uu)),z.Ub(5),z.sd(" ",t.totalDates," "),z.Ub(1),z.Mc("ngIf",t.totalDates<2),z.Ub(1),z.Mc("ngIf",t.totalDates>=2),z.Ub(2),z.Mc("ngIf",(null==t.rspFrequency?null:t.rspFrequency.dirty)&&(null==t.rspFrequency?null:t.rspFrequency.hasError("required"))),z.Ub(1),z.Mc("ngIf",(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_CMF||(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT||(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)}}function xu(t,e){if(1&t&&z.od(0,Ou,25,20,"form",23),2&t){const t=z.Dc();z.Mc("ngIf",t.rspForm)}}function Lu(t,e){1&t&&(z.pc(0),z.qd(1," in the next cycle and will not impact the current processing order."),z.oc())}function ku(t,e){1&t&&z.qd(0,".")}function Nu(t,e){if(1&t){const t=z.sc();z.rc(0,"div",52),z.Ec(1,"async"),z.rc(2,"div",18),z.rc(3,"button",19),z.zc("click",(function(){return z.dd(t),z.Dc(3).closeRspDetails()})),z.qd(4,"Maybe Later"),z.qc(),z.qc(),z.rc(5,"div",18),z.rc(6,"button",53),z.zc("click",(function(){z.dd(t);const e=z.Dc(3);
1return e.handleRspAmendment("terminate",e.rspDetails)})),z.qd(7,"Confirm"),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Wb("mt-5 "+(z.Fc(1,3,t.isMobile$)?" fixed-bottom":"")),z.Ub(6),z.Mc("nzLoading",t.isLoading||t.isTerminationNoteLoading)}}function _u(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-floating-bar"),z.rc(1,"button",21),z.zc("click",(function(){return z.dd(t),z.Dc(3).closeRspDetails()})),z.qd(2,"Maybe Later"),z.qc(),z.rc(3,"button",54),z.zc("click",(function(){z.dd(t);const e=z.Dc(3);return e.handleRspAmendment("terminate",e.rspDetails)})),z.qd(4,"Confirm"),z.qc(),z.qc()}if(2&t){const t=z.Dc(3);z.Ub(3),z.Mc("nzLoading",t.isLoading||t.isTerminationNoteLoading)}}function Bu(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"div"),z.rc(2,"nz-row",46),z.rc(3,"nz-col",47),z.rc(4,"h3"),z.mc(5,"i",48),z.qd(6,"Confirm to proceed?"),z.qc(),z.qc(),z.rc(7,"nz-col"),z.rc(8,"span"),z.qd(9),z.od(10,Lu,2,0,"ng-container",49),z.od(11,ku,1,0,"ng-template",null,50,z.pd),z.qc(),z.qc(),z.qc(),z.qc(),z.od(13,Nu,8,5,"div",51),z.Ec(14,"async"),z.od(15,_u,5,1,"b2c-floating-bar",3),z.Ec(16,"async"),z.qc()),2&t){const t=z.ad(12),e=z.Dc(2);z.Ub(9),z.sd("This action will terminate your RSP for ",e.rspDetails.fundName,""),z.Ub(1),z.Mc("ngIf",e.showUsdAsTerminationNote&&(null==e.rspDetails?null:e.rspDetails.paymentMethod)===e.rspConstants.PAYMENT_METHOD_AUTO_SWEEP)("ngIfElse",t),z.Ub(3),z.Mc("ngIf",!z.Fc(14,5,e.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(16,7,e.isMobile$))}}function Vu(t,e){if(1&t&&(z.rc(0,"div"),z.rc(1,"div",4),z.od(2,Bu,17,9,"div",3),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(2),z.Mc("ngIf",t.rspDetails)}}let Yu=(()=>{class t{constructor(t,e,n,i,c,o,s,a){this.subHandlingService=t,this.nzNotificationService=e,this.cdRef=n,this.activatedRoute=i,this.transactionService=c,this.fb=o,this.datePipe=s,this.currencyFormatService=a,this.visibleChange=new z.s,this.refresh=new z.s,this.showFepModal=new z.s,this.IProductEnum=ct.b,this.RouteConstant=M.o,this.rspTerminationList=[],this.rspConstants=Yt,this.transactionConstant=h.a,this.rspStockFrequency=[],this.rspFreqDisplay="Monthly",this.totalDates=0,this.showUsdAsTerminationNote=!1,this.isTerminationNoteLoading=!1}ngOnChanges(t){var e,n;this.rspForm||(this.rspForm=this.fb.group({rspAmount:[this.rspDetails?this.rspDetails.amount:"",[st.H.required,st.H.min(.01),st.H.pattern(/^[0-9]+(\.[0-9]{1,2})?$/)]],frequency:[{value:this.rspDetails?this.rspDetails.subscriptionFreq:"",disabled:!(!this.rspDetails||![this.rspConstants.PAYMENT_METHOD_CMF,this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT,this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP].includes(this.rspDetails.paymentMethod))},[st.H.required]],rspFrequency:[this.rspStockFrequency],nextRspDate:[{value:this.rspDetails?this.rspDetails.nextRspDateDisplay:null,disabled:!0}]},{validator:this.validateExtra()})),this.rspDetails=this.rspDetailsModel,console.log("this.rspDetails",this.rspDetails),this.rspForm&&(this.rspAmount.setValue(null===(e=this.rspDetails)||void 0===e?void 0:e.amount),this.updateRspAmountMinLimit(),this.setNextRspDateAndFrequency()),"ETF"===(null===(n=this.rspDetailsModel)||void 0===n?void 0:n.productType)?(this.getRspFrequency(),this.getEtfRspTerminationWordForUsdAs()):this.setRspFrequency()}ngOnInit(){var t;this.getNextRspDate(),this.subHandlingService.subscribe(this.activatedRoute.queryParams.pipe(Object(f.a)(t=>{this.refno=t.refno}))),"ETF"===(null===(t=this.rspDetailsModel)||void 0===t?void 0:t.productType)&&(this.getRspFrequency(),this.getEtfRspTerminationWordForUsdAs())}get rspAmount(){var t;return null===(t=this.rspForm)||void 0===t?void 0:t.get("rspAmount")}get rspFrequency(){var t;return null===(t=this.rspForm)||void 0===t?void 0:t.get("rspFrequency")}closeRspDetails(){this.visible=!1,this.visibleChange.emit()}frequencySelected(){let t="";return this.rspFrequency.value.map(e=>{e.checked&&(t+=e.value+",")}),t&&t.length>1&&(t=t.substring(0,t.length-1)),t}checkButtonDisable(){var t,e,n,i,c,o,s,a;return"ETF"===(null===(t=this.rspDetailsModel)||void 0===t?void 0:t.productType)?(null===(e=this.rspDetails)||void 0===e?void 0:e.datesSelected)===this.frequencySelected()&&(null===(n=this.rspDetails)||void 0===n?void 0:n.amount)===(null===(i=this.rspAmount)||void 0===i?void 0:i.value):(null===(c=this.rspDetails)||void 0===c?void 0:c.subscriptionFreq)===(null===(o=this.frequency)||void 0===o?void 0:o.value)&&(null===(s=this.rspDetails)||void 0===s?void 0:s.amount)===(null===(a=this.rspAmount)||void 0===a?void 0:a.value)}handleRspAmendment(t,e){var n;for(const i in this.rspForm.controls)this.rspForm.controls[i].markAsDirty();"ETF"===(null===(n=this.rspDetailsModel)||void 0===n?void 0:n.productType)&&(this.frequencySelected()||(this.rspFrequency.markAsDirty(),this.rspFrequency.setErrors({required:!0}))),this.rspForm.updateValueAndValidity(),"VALID"===this.rspForm.status&&(this.isLoading=!0,"edit"===t?this.subHandlingService.subscribe(this.transactionService.updateRspDetails(this.refno,e.orderNo,this.mapIamRspModelData(this.rspDetails,this.rspAmount.value,this.frequency.value)).pipe(Object(f.a)(t=>{if(t.status!==M.a.RESPONSE_SUCCESS)return t.errorMessage.includes("foreign.exch
1ange.policy.breached")?(this.isLoading=!1,void this.showFepModal.emit(!0)):(this.nzNotificationService.error("Error",t.errorMessage),this.closeRspDetails(),void(this.isLoading=!1));this.nzNotificationService.success("Success",t.data),this.refresh.emit(),this.closeRspDetails(),this.isLoading=!1}))):"terminate"===t&&(this.rspTerminationList.push(this.mapFundVoidTransactionModelData(e)),this.subHandlingService.subscribe(this.transactionService.terminateRspTransaction(this.rspTerminationList,this.refno).pipe(Object(f.a)(t=>{if(t.status!==M.a.RESPONSE_SUCCESS)return this.nzNotificationService.error("Error",t.errorMessage),this.closeRspDetails(),void(this.isLoading=!1);this.nzNotificationService.success("Success","We have received your request termination of RSP"),this.refresh.emit(),this.closeRspDetails(),this.isLoading=!1})))))}mapFundVoidTransactionModelData(t){return{amount:null==t?void 0:t.amount,contractNo:null==t?void 0:t.contractNo,fundName:null==t?void 0:t.fundName,paymentMethod:null==t?void 0:t.paymentMethod}}get frequency(){var t;return null===(t=this.rspForm)||void 0===t?void 0:t.get("frequency")}onChangeFrequency(){this.rspDetails.subscriptionFreq===this.frequency.value?this.rspForm.get("nextRspDate").patchValue(this.rspDetails.nextRspDateDisplay):"monthly"===this.frequency.value?this.rspForm.get("nextRspDate").patchValue(this.nextRspDateMap.monthly):this.rspForm.get("nextRspDate").patchValue(this.nextRspDateMap.weekly),this.setRspFrequency()}mapIamRspModelData(t,e,n){return{frequencyChange:t.subscriptionFreq!==n?n:"",rspStockFrequency:this.frequencySelected(),amountChange:t.amount!==e?e:null}}setNextRspDateAndFrequency(){this.rspForm.get("nextRspDate").patchValue(this.rspDetails.nextRspDateDisplay),this.frequency.setValue(this.rspDetails.subscriptionFreq),[this.rspConstants.PAYMENT_METHOD_CMF,this.rspConstants.PAYMENT_METHOD_TRUST_ACCOUNT,this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP].includes(this.rspDetails.paymentMethod)?this.rspForm.get("frequency").enable():this.rspForm.get("frequency").disable()}getNextRspDate(){this.transactionService.getRspNextDate().subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS&&(this.nextRspDateMap=t.data)})}getEstRspNextDateBySelction(){var t,e;if("ETF"===(null===(t=this.rspDetailsModel)||void 0===t?void 0:t.productType)){let t=this.frequencySelected();if(t){let n=null;(null===(e=this.rspDetails)||void 0===e?void 0:e.paymentMethod)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&(n=this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP),this.transactionService.getRspNextEstGenDate(t,n).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS&&this.rspForm.get("nextRspDate").patchValue(t.data)})}}}getEtfRspTerminationWordForUsdAs(){var t,e,n,i,c,o,s,a,r,l,d;if(this.showUsdAsTerminationNote=!1,"ETF"===(null===(t=this.rspDetailsModel)||void 0===t?void 0:t.productType)&&"terminate"===this.actionType&&(null===(e=this.rspDetails)||void 0===e?void 0:e.paymentMethod)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP){this.isTerminationNoteLoading=!0;let t=null,e=null;(null===(n=this.rspDetails)||void 0===n?void 0:n.firstRspDate)&&(t=new Date(null===(i=this.rspDetails)||void 0===i?void 0:i.firstRspDate),e=this.datePipe.transform(t,ru.a.DATE_FORMAT)),(null===(c=this.rspDetails)||void 0===c?void 0:c.datesArr)&&(null===(s=null===(o=this.rspDetails)||void 0===o?void 0:o.datesArr)||void 0===s?void 0:s.length)>0&&(null===(a=this.rspDetails)||void 0===a?void 0:a.datesSelected)&&(null===(l=null===(r=this.rspDetails)||void 0===r?void 0:r.datesSelected)||void 0===l?void 0:l.length)>0&&e&&this.transactionService.getRspAsTerminationNote(null===(d=this.rspDetails)||void 0===d?void 0:d.datesSelected,e).subscribe(t=>{(null==t?void 0:t.status)===M.a.RESPONSE_SUCCESS&&(null==t?void 0:t.data)&&(this.showUsdAsTerminationNote=null==t?void 0:t.data),this.isTerminationNoteLoading=!1},t=>{this.isTerminationNoteLoading=!1},()=>{this.isTerminationNoteLoading=!1}),this.isTerminationNoteLoading=!1}}getRspFrequency(){this.transactionService.getRspStockFrequency().subscribe(t=>{var e,n,i;if(t.status===M.a.RESPONSE_SUCCESS){this.rspStockFrequency=[];let c=[];(null===(e=this.rspDetailsModel)||void 0===e?void 0:e.datesSelected)&&(c=null===(n=this.rspDetailsModel)||void 0===n?void 0:n.datesSelected.split(",")),t.data.forEach(t=>{let e=null==t?void 0:t.targetDisplay,n=null==t?void 0:t.targetDate,i=!1;if(c&&c.length>0){let e=(null==t?void 0:t.targetDate)+"";
1c.forEach(t=>{t===e&&(i=!0)})}this.rspStockFrequency.push({label:e,value:n,checked:i})}),this.rspFrequency&&(this.rspFrequency.setValue(this.rspStockFrequency),this.totalDates=null===(i=this.rspDetailsModel)||void 0===i?void 0:i.totalDates)}})}updateRspAmountMinLimit(){var t,e,n,i;const c=(null===(t=this.rspDetails)||void 0===t?void 0:t.paymentMethod)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?null===(e=this.rspDetails)||void 0===e?void 0:e.autoSweepCurrency:this.transactionConstant.PAYMENT_CURRENCY_MYR;this.rspAmountDecimalPlaces=this.currencyFormatService.getDecimalPlaces(c),this.minRspAmount=(null===(n=this.rspDetails)||void 0===n?void 0:n.paymentMethod)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&(null===(i=this.rspDetails)||void 0===i?void 0:i.autoSweepCurrency)===this.transactionConstant.PAYMENT_CURRENCY_USD?this.rspDetails.minRspUsdNum:this.rspDetails.minRspNum,this.rspForm.get("rspAmount").setValidators([st.H.min(this.minRspAmount),st.H.required,st.H.pattern(this.currencyFormatService.getInputPattern(c))]),this.rspForm.get("rspAmount").updateValueAndValidity()}updateTotalRecord(){let t=0;this.rspFrequency.value.map(e=>{e.checked&&(t+=1)}),this.totalDates=t,this.getEstRspNextDateBySelction()}validateExtra(){return t=>{var e,n,i;const c=t.controls.rspAmount;c.errors&&!c.errors.subAmtValidator||((null===(e=this.rspDetailsModel)||void 0===e?void 0:e.productType)&&"DPMS"===(null===(n=this.rspDetailsModel)||void 0===n?void 0:n.productType)&&c.value%(null===(i=this.rspDetailsModel)||void 0===i?void 0:i.minRspNum)!=0?c.setErrors({subAmtValidator:!0}):c.setErrors(null))}}setRspFrequency(){const t=this.rspConstants.FREQUENCY_LIST.find(t=>t.value===this.frequency.value);this.rspFreqDisplay=t.label}}return t.\u0275fac=function(e){return new(e||t)(z.lc(C.a),z.lc(St.b),z.lc(z.j),z.lc(q.a),z.lc(lt.a),z.lc(st.g),z.lc(P.f),z.lc(Ii.a))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-form"]],inputs:{rspDetailsModel:"rspDetailsModel",showDdaBanner:"showDdaBanner",totalUsedAmount:"totalUsedAmount",isLoading:"isLoading",visible:"visible",actionType:"actionType"},outputs:{visibleChange:"visibleChange",refresh:"refresh",showFepModal:"showFepModal"},features:[z.Sb],decls:6,vars:2,consts:[["nz-row","","nzType","flex","nzJustify","left","nzAlign","middle",4,"ngIf"],["normalEditLayout",""],["etfEditLayout",""],[4,"ngIf"],["nz-row","","nzType","flex","nzJustify","left","nzAlign","middle"],[1,"pr-3","mb-0"],["class","mt-1 text-sm",4,"ngIf"],[1,"mb-2","mt-2","text-black-6"],[1,"my-4"],[1,"mb-0"],[1,"text-black-6","text-sm","mb-2","mt-1"],[1,""],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle",3,"class",4,"ngIf"],[1,"mt-1","text-sm"],[3,"exchange"],[3,"type","bankName","bankAccount","currency","usedAmount","totalAmount"],[3,"ngTemplateOutlet"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","middle"],["nz-col",""],["nz-button","","nzType","outline",1,"mx-2",3,"click"],["nz-button","","nzType","primary",3,"nzLoading","disabled","click"],["nz-button","","nzBlock","","nzType","outline",1,"my-1",3,"click"],["nz-button","","nzBlock","","nzType","primary",1,"my-1",3,"disabled","click"],["nz-form","",3,"formGroup",4,"ngIf"],["nz-form","",3,"formGroup"],["nzXs","24","nzLg","12"],[3,"ngClass"],["nzSize","small","nzSuffix","MYR",3,"nzLabelPlaceholder"],["ui-input","","type","number","formControlName","rspAmount",1,"w-100"],[1,"text-danger","text-left"],["nz-col","","nzLg","12","nzXs","24"],["nzLabelPlaceholder","Frequency","nzPlaceHolder","Frequency","formControlName","frequency",1,"w-100",3,"ngModelChange"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["class","text-danger text-left",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"nzValue","nzLabel"],["nzLabelPlaceholder","Next RSP Date"],["ui-input","","formControlName","nextRspDate",1,"w-100"],["nzType","flex"],["nz-col","","nzLg","24","nzXs","24",1,"text-base",3,"ngClass"],["nzSize","small",3,"nzLabelPlaceholder","nzSuffix"],[1,"rounded","mb-0","h-100",3,"nzBodyStyle"],[1,"topRow"],[1,"top-left-corner",2,"font-size","11px"],[1,"top-right-corner","font-weight-semibold","label-type-round","bg-blue"],["formControlName","rspFrequency",3,"ngModelChange"],["nzType","flex","nzAlign","middle"],["nzXl","24","nzSm","24","nzXs","24"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-danger","mr-2"],[4,"ngIf","ngIfElse"],["fullStopTpl",""],["nz-row","","nzType","flex","nzJustify","end","nzAlign","right",3,"class",4,"ngIf"],["nz-row","","nzType","flex","nzJustify","end","nzAlign","right"],["nz-button","","nzType","primary",1,"",3,"nzLoading","click"],["nz-button","","nzBlock","","nzType","primary",1,"my-1",3,"nzLoading","click"]],template:function(t,e){1&t&&(z.od(0,bu,2,1,"div",0),z.od(1,zu,1,1,"ng-template",null,1,z.pd),z.od(3,xu,1,1,"ng-template",null,2,z.pd),z.od(5,Vu,3,1,"div",3)),2&t&&(z.Mc("ngIf",e.visible&&"edit"===e.actionType),z.
1Ub(5),z.Mc("ngIf",e.visible&&"terminate"===e.actionType))},directives:[P.t,V.c,Nc.a,ft.a,P.A,V.a,Y.a,pt.a,st.J,st.u,Et.b,st.l,P.q,At.c,st.z,st.c,At.b,st.t,st.j,Ht.d,P.s,Ht.a,w.a,ba.b,mt.b],pipes:[P.G,P.b],styles:[".topRow[_ngcontent-%COMP%]{display:flex;justify-content:space-between;height:15px}.top-right-corner[_ngcontent-%COMP%]{top:0;float:right}.top-left-corner[_ngcontent-%COMP%]{float:left;top:0}.bg-blue[_ngcontent-%COMP%]{background-color:#0073cf}.label-type-round[_ngcontent-%COMP%]{border-radius:10px;border:0;padding:0 7px;color:#fff;font-size:11px;display:inline-block}"]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();function Hu(t,e){if(1&t&&(z.rc(0,"nz-tag",19),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(4);z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.rspDetails.fundStatus))}}function ju(t,e){if(1&t&&(z.rc(0,"nz-tag",20),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(4);z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.rspDetails.fundStatus))}}function $u(t,e){if(1&t&&(z.rc(0,"nz-tag",21),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(4);z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.rspDetails.fundStatus))}}function Gu(t,e){if(1&t&&(z.rc(0,"div",22),z.mc(1,"app-stock-exchange-tag",23),z.qd(2),z.qc()),2&t){const t=z.Dc(4);
1z.Ub(1),z.Mc("exchange",null==t.rspDetailsModel?null:t.rspDetailsModel.exchange),z.Ub(1),z.sd(" ",t.rspDetails.sedolnumber,"")}}const Wu=function(t,e){return{border:t,"background-color":e,color:"#FFF"}};function Xu(t,e){if(1&t&&(z.rc(0,"div",11),z.rc(1,"div",12),z.rc(2,"nz-tag",13),z.qd(3),z.qc(),z.od(4,Hu,3,4,"nz-tag",14),z.od(5,ju,3,4,"nz-tag",15),z.od(6,$u,3,4,"nz-tag",16),z.qc(),z.rc(7,"div",17),z.qd(8),z.qc(),z.od(9,Gu,3,2,"div",18),z.qc()),2&t){const t=z.Dc(3);z.Ub(2),z.Mc("nzColor",null==t.rspDetails?null:t.rspDetails.productColour)("ngStyle",z.Tc(8,Wu,"1px solid "+(null==t.rspDetails?null:t.rspDetails.productColour)+" !important","rgb("+(null==t.rspDetails?null:t.rspDetails.productColour)+", 0.1) !important")),z.Ub(1),z.rd(t.getProductName(t.rspDetails)),z.Ub(1),z.Mc("ngIf","active"!=t.rspDetails.fundStatus&&"terminated"!=t.rspDetails.fundStatus),z.Ub(1),z.Mc("ngIf","active"===t.rspDetails.fundStatus),z.Ub(1),z.Mc("ngIf","terminated"===t.rspDetails.fundStatus),z.Ub(2),z.rd(t.rspDetails.fundName),z.Ub(1),z.Mc("ngIf","ETF"===(null==t.rspDetailsModel?null:t.rspDetailsModel.productType))}}function Ku(t,e){if(1&t&&(z.rc(0,"nz-tag",25),z.qd(1),z.qc()),2&t){const t=e.$implicit,n=z.Dc(4);z.Ub(1),z.rd(n.getDatesDisplay(t))}}function Ju(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,Ku,2,1,"nz-tag",24),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("ngForOf",null==t.rspDetails?null:t.rspDetails.datesArr)}}function Zu(t,e){1&t&&(z.rc(0,"span"),z.qd(1,"-"),z.qc())}function Qu(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-row"),z.rc(1,"nz-col",27),z.rc(2,"button",28),z.zc("click",(function(){z.dd(t);const e=z.Dc(4);return e.openModal("edit",e.rspDetails)})),z.qd(3,"Edit RSP"),z.qc(),z.qc(),z.qc()}}function tp(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",30),z.rc(1,"button",31),z.zc("click",(function(){z.dd(t);const e=z.Dc(5);return e.openModal("terminate",e.rspDetails)})),z.qd(2,"Terminate RSP"),z.qc(),z.qc()}}function ep(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",30),z.rc(1,"button",32),z.zc("click",(function(){z.dd(t);const e=z.Dc(5);return e.openModal("sell",e.rspDetails)})),z.qd(2,"Sell"),z.qc(),z.qc()}}function np(t,e){if(1&t&&(z.rc(0,"nz-row"),z.od(1,tp,3,0,"nz-col",29),z.od(2,ep,3,0,"nz-col",29),z.qc()),2&t){const t=z.Dc(4);z.Ub(1),z.Mc("ngIf",t.checkDisplayByMode("terminate",null==t.rspDetails?null:t.rspDetails.actionOption)),z.Ub(1),z.Mc("ngIf",t.checkDisplayByMode("sell",null==t.rspDetails?null:t.rspDetails.actionOption))}}function ip(t,e){if(1&t&&(z.rc(0,"div",26),z.od(1,Qu,4,0,"nz-row",0),z.od(2,np,3,2,"nz-row",0),z.qc()),2&t){const t=z.Dc(3);z.Ub(1),z.Mc("ngIf",t.checkDisplayByMode("edit",null==t.rspDetails?null:t.rspDetails.actionOption)),z.Ub(1),z.Mc("ngIf",t.checkDisplayByMode("terminate",null==t.rspDetails?null:t.rspDetails.actionOption)||t.checkDisplayByMode("sell",null==t.rspDetails?null:t.rspDetails.actionOption))}}function cp(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-row",35),z.zc("click",(function(){z.dd(t);const n=e.$implicit,i=z.Dc(4);return i.openModal(n.value,i.rspDetails)})),z.rc(1,"nz-col"),z.mc(2,"img",36),z.qc(),z.rc(3,"nz-col",37),z.qd(4),z.qc(),z.qc()}if(2&t){const t=e.$implicit;z.Ub(2),z.Mc("src","assets/images/transaction/"+t.value+".svg",z.gd),z.Ub(2),z.rd(t.label)}}function op(t,e){if(1&t&&(z.rc(0,"div",26),z.rc(1,"nz-row"),z.rc(2,"h4",33),z.qd(3,"Actions"),z.qc(),z.qc(),z.od(4,cp,5,2,"nz-row",34),z.qc()),2&t){const t=z.Dc(3);z.Ub(4),z.Mc("ngForOf",t.rspDetails.actionOption)}}function sp(t,e){if(1&t&&(z.rc(0,"div",4),z.od(1,Xu,10,11,"div",5),z.rc(2,"div",6),z.rc(3,"nz-row",7),z.rc(4,"nz-col",8),z.qd(5,"Next RSP Date"),z.qc(),z.rc(6,"nz-col",9),z.qd(7),z.Ec(8,"sdate"),z.qc(),z.qc(),z.rc(9,"nz-row",7),z.rc(10,"nz-col",8),z.qd(11,"Selected RSP Date"),z.qc(),z.rc(12,"nz-col",9),z.od(13,Ju,2,1,"div",0),z.od(14,Zu,2,0,"span",0),z.qc(),z.qc(),z.rc(15,"nz-row",7),z.rc(16,"nz-col",8),z.qd(17,"RSP Start Date"),z.qc(),z.rc(18,"nz-col",9),z.qd(19),z.Ec(20,"sdate"),z.qc(),z.qc(),z.rc(21,"nz-row",7),z.rc(22,"nz-col",8),z.qd(23,"Payment Method"),z.qc(),z.rc(24,"nz-col",9),z.qd(25),z.qc(),z.qc(),z.rc(26,"nz-row",7),z.rc(27,"nz-col",8),z.qd(28,"RSP Amount"),z.qc(),z.rc(29,"nz-col",9),z.qd(30),z.Ec(31,"currencyFormat"),z.qc(),z.qc(),z.rc(32,"nz-row",7),z.rc(33,"nz-col",8),z.qd(34,"Frequency"),z.qc(),z.rc(35,"nz-col",9),z.qd(36),z.qc(),z.qc(),z.rc(37,"nz-row",7),z.rc(38,"nz-col",8),z.qd(39,"Bank Name"),z.qc(),z.rc(40,"nz-col",9),z.qd(41),z.qc(),z.qc(),z.qc(),z.od(42,ip,3,2,"div",10),z.od(43,op,5,1,"div",10),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.Mc("ngIf",t.rspDetails),z.Ub(3),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.rd(null!=t.rspDetails&&t.rspDetails.nextRspDate?z.Fc(8,26,null==t.rspDetails?null:t.rspDetails.nextRspDate):"N.A"),z.
1Ub(3),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.Mc("ngIf",(null==t.rspDetails?null:t.rspDetails.datesArr)&&(null==t.rspDetails||null==t.rspDetails.datesArr?null:t.rspDetails.datesArr.length)>0),z.Ub(1),z.Mc("ngIf",!(null!=t.rspDetails&&t.rspDetails.datesArr&&(null==t.rspDetails||null==t.rspDetails.datesArr?null:t.rspDetails.datesArr.length)>0)),z.Ub(2),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.rd(t.rspDetails.transDate===t.DEFAULT_DATE_NUMBER?"N.A.":z.Fc(20,28,null==t.rspDetails?null:t.rspDetails.transDate)),z.Ub(3),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.td("",t.rspDetails.paymentMethodDisplay," ","Y"===(null==t.rspDetails.iamRspModel?null:t.rspDetails.iamRspModel.isEmandate)?"e-Mandate":"",""),z.Ub(2),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.rd(z.Gc(31,30,t.rspDetails.amount,(null==t.rspDetails?null:t.rspDetails.paymentMethod)===t.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?null==t.rspDetails?null:t.rspDetails.autoSweepCurrency:t.transactionConstant.PAYMENT_CURRENCY_MYR)),z.Ub(3),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.rd(t.rspDetails.frequencyDisplay),z.Ub(2),z.Mc("nzSpan",12),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.rd(null!=(null==t.rspDetails||null==t.rspDetails.iamRspModel?null:t.rspDetails.iamRspModel.bankAccountName)?null==t.rspDetails?null:t.rspDetails.iamRspModel.bankAccountName:"-"),z.Ub(1),z.Mc("ngIf",(null==t.rspDetails?null:t.rspDetails.productType)===t.IProductEnum.ETF_UPPER_CASE&&"terminated"!==t.rspDetails.fundStatus&&"terminate-pending"!==t.rspDetails.fundStatus),z.Ub(1),z.Mc("ngIf",(null==t.rspDetails?null:t.rspDetails.productType)!==t.IProductEnum.ETF_UPPER_CASE&&"terminated"!==t.rspDetails.fundStatus&&"terminate-pending"!==t.rspDetails.fundStatus)}}function ap(t,e){if(1&t&&(z.pc(0),z.od(1,sp,44,33,"div",3),z.oc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",t.visible)}}function rp(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-form",40),z.zc("refresh",(function(){return z.dd(t),z.Dc(2).refreshRspList()}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).editMode=e}))("showFepModal",(function(e){return z.dd(t),z.Dc(2).showFepModal(e)})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("rspDetailsModel",t.rspDetails)("showDdaBanner",t.showDdaBanner)("totalUsedAmount",t.totalUsedAmount)("isLoading",t.isLoading)("actionType","edit")("visible",t.editMode)}}function lp(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-mobile-drawer",38),z.zc("showChange",(function(e){return z.dd(t),z.Dc().editMode=e})),z.od(1,rp,1,6,"rsp-form",39),z.qc()}if(2&t){const t=z.Dc();z.Mc("show",t.editMode)("height",580)("hideButtons",!0),z.Ub(1),z.Mc("ngIf",t.rspDetailsModel)}}function dp(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-form",42),z.zc("refresh",(function(){return z.dd(t),z.Dc(2).refreshRspList()}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).terminateMode=e})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("rspDetailsModel",t.rspDetails)("showDdaBanner",t.showDdaBanner)("totalUsedAmount",t.totalUsedAmount)("isLoading",t.isLoading)("actionType","terminate")("visible",t.terminateMode)}}function up(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-mobile-drawer",38),z.zc("showChange",(function(e){return z.dd(t),z.Dc().terminateMode=e}))("showChange",(function(){return z.dd(t),z.Dc().closeRspDetails()})),z.od(1,dp,1,6,"rsp-form",41),z.qc()}if(2&t){const t=z.Dc();z.Mc("show",t.terminateMode)("height",280)("hideButtons",!0),z.Ub(1),z.Mc("ngIf",t.rspDetailsModel)}}let pp=(()=>{class t{constructor(t,e,n){this.fb=t,this.subHandlingService=e,this.activatedRoute=n,this.visibleChange=new z.s,this.refresh=new z.s,this.onActionClick=new z.s,this.editModalOpen=!1,this.isLoading=!1,this.DEFAULT_DATE_NUMBER=-631179e6,this.rspCountUsedAmountList=[],this.editMode=!1,this.terminateMode=!1,this.showDdaBanner=!1,this.totalUsedAmount=0,this.fepBreached=!1,this.IProductEnum=ct.b,this.rspConstants=Yt,this.transactionConstant=h.a}ngOnChanges(t){this.rspDetails=this.rspDetailsModel,this.editModalOpen&&this.openModal("edit",this.rspDetails)}ngOnInit(){this.rspDetails=this.rspDetailsModel,this.subHandlingService.subscribe(this.activatedRoute.queryParams.pipe(Object(f.a)(t=>{this.refno=t.refno}))),this.editModalOpen&&this.openModal("edit",this.rspDetails)}
1closeRspDetails(){this.visible=!1,this.visibleChange.emit()}openModal(t,e){var n;if("edit"===t?(this.editMode=!0,this.rspForm||(this.rspForm=this.fb.group({rspAmount:[this.rspDetails?this.rspDetails.amount:"",[st.H.required,st.H.min(.01),st.H.pattern(/^[0-9]+(\.[0-9]{1,2})?$/)]]}))):"terminate"===t?this.terminateMode=!0:null===(n=this.onActionClick)||void 0===n||n.emit({action:t,rspInfo:e}),this.rspCountUsedAmountList=this.rspTableInfoList.filter(t=>t.ddaId===e.ddaId),this.showDdaBanner=!1,e.paymentMethod===Yt.PAYMENT_METHOD_DDA||e.paymentMethod===Yt.PAYMENT_METHOD_FPX){this.showDdaBanner=!0;let t=0;this.rspCountUsedAmountList.forEach(e=>{"terminated"!==e.fundStatus&&(t+=e.amount)}),this.totalUsedAmount=t}}get rspAmount(){var t;return null===(t=this.rspForm)||void 0===t?void 0:t.get("rspAmount")}refreshRspList(){this.editModalOpen=!1,this.closeRspDetails(),this.refresh.emit()}getProductName(t){let e="Funds";return"TRUST"===(null==t?void 0:t.sedolnumber)?e="CA":"DPMS"===(null==t?void 0:t.productType)?e="MP":"ETF"===(null==t?void 0:t.productType)&&(e="ETF"),e}getDatesDisplay(t){let e="";switch(t){case"1":e="1st";break;case"8":e="8th";break;case"15":e="15th";break;case"22":e="22nd";break;default:e=t}return e}checkDisplayByMode(t,e){let n=!1;return e&&e.length>0&&e.forEach(e=>{e.value===t&&(n=!0)}),n}showFepModal(t){this.isMobile$.subscribe(e=>{e&&(this.fepBreached=t)})}}return t.\u0275fac=function(e){return new(e||t)(z.lc(st.g),z.lc(C.a),z.lc(q.a))},t.\u0275cmp=z.fc({type:t,selectors:[["rsp-details"]],inputs:{rspDetailsModel:"rspDetailsModel",visible:"visible",editModalOpen:"editModalOpen",rspTableInfoList:"rspTableInfoList"},outputs:{visibleChange:"visibleChange",refresh:"refresh",onActionClick:"onActionClick"},features:[z.Sb],decls:8,vars:11,consts:[[4,"ngIf"],[3,"show","height","hideButtons","showChange",4,"ngIf"],[3,"showModal","refno","showModalChange"],["class","px-2 py-2 bg-white",4,"ngIf"],[1,"px-2","py-2","bg-white"],["class","pb-2",4,"ngIf"],[1,"p-2"],[1,"py-1","border-bottom"],[1,"text-sm","text-black-8",3,"nzSpan"],[1,"font-weight-bold","text-right","text-base",3,"nzSpan"],["class","py-3",4,"ngIf"],[1,"pb-2"],[1,"py-2"],[1,"border","m-0","mr-1",3,"nzColor","ngStyle"],["class","border tag-pending-processing m-0",3,"nzColor",4,"ngIf"],["class","border tag-received m-0",3,"nzColor",4,"ngIf"],["class","border tag-terminated m-0",3,"nzColor",4,"ngIf"],[1,"text-left","font-weight-bold"],["class","mt-1 text-sm",4,"ngIf"],[1,"border","tag-pending-processing","m-0",3,"nzColor"],[1,"border","tag-received","m-0",3,"nzColor"],[1,"border","tag-terminated","m-0",3,"nzColor"],[1,"mt-1","text-sm"],[3,"exchange"],["class","border tag-terminated m-0 mr-1",4,"ngFor","ngForOf"],[1,"border","tag-terminated","m-0","mr-1"],[1,"py-3"],["nzSpan","24"],["nz-button","","nzType","primary",1,"mt-4","w-100",3,"click"],["nzSpan","12",4,"ngIf"],["nzSpan","12"],["nz-button","",1,"mt-4",2,"width","98%",3,"click"],["nz-button","","nzType","danger",1,"mt-4",2,"width","98%",3,"click"],[1,"font-weight-bold"],["class","py-1",3,"click",4,"ngFor","ngForOf"],[1,"py-1",3,"click"],["nzSpan","24","nzTheme","outline",3,"src"],[1,"text-left","font-weight-normal"],[3,"show","height","hideButtons","showChange"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange","showFepModal",4,"ngIf"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange","showFepModal"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange",4,"ngIf"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange"]],template:function(t,e){1&t&&(z.rc(0,"app-mobile-scaffold"),z.od(1,ap,2,1,"ng-container",0),z.Ec(2,"async"),z.od(3,lp,2,4,"b2c-mobile-drawer",1),z.Ec(4,"async"),z.od(5,up,2,4,"b2c-mobile-drawer",1),z.Ec(6,"async"),z.qc(),z.rc(7,"fep-breached-modal",2),z.zc("showModalChange",(function(t){return e.fepBreached=t})),z.qc()),2&t&&(z.Ub(1),z.Mc("ngIf",z.Fc(2,5,e.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(4,7,e.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(6,9,e.isMobile$)),z.Ub(2),z.Mc("showModal",e.fepBreached)("refno",e.refno))},directives:[H.a,P.t,fo.a,V.c,V.a,s.a,P.w,Nc.a,P.s,Y.a,vt.a,Yu],pipes:[P.b,Qe.a,qr.a,P.G],encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();var hp=n("eWI0");function fp(t,e){if(1&t){const t=z.sc();z.rc(0,"label",43),z.zc("ngModelChange",(function(n){return z.dd(t),e.$implicit.active=n})),z.qd(1),z.qc()}if(2&t){const t=e.$implicit;z.Mc("ngModel",t.active)("nzValue",t.value),z.Ub(1),z.sd(" ",t.label," ")}}function mp(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",38),z.rc(1,"ui-select",39),z.rc(2,"ui-option",40),z.rc(3,"nz-checkbox-wrapper",41),z.zc("nzOnChange",(function(e){return z.dd(t),z.Dc(4).filterResult(e,"status")})),z.od(4,fp,2,3,"label",42),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(4),e=z.ad(14);z.Ub(1),z.Mc("nzSuffixIcon",e)("nzDropdownMatchSelectWidth",!1)("nzPlaceHolder","All Status \u2022 "+t.filterList.statusList.length),z.Ub(3),z.Mc("ngForOf",t.statusOptions)}}function bp(t,e){if(1&t){const t=z.sc();z.rc(0,"label",43),z.zc("ngModelChange",(function(n){return z.dd(t),e.$implicit.active=n})),z.qd(1),z.qc()}if(2&t){const t=e.$implicit;z.Mc("ngModel",t.active)("nzValue",t.value),z.Ub(1),z.sd(" ",t.label," ")}}function gp(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",44),z.rc(1,"ui-select",45),z.rc(2,"ui-option",40),z.rc(3,"nz-checkbox-wrapper",41),z.zc("nzOnChange",(function(e){return z.dd(t),z.Dc(4).filterResult(e,"paymentMethod")})),z.od(4,bp,2,3,"label",42),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(4),e=z.ad(14);z.Ub(1),z.Mc("nzSuffixIcon",e)("nzPlaceHolder","Payment Method \u2022 "+t.filterList.paymentMethodList.length),z.Ub(3),z.Mc("ngForOf",t.paymentMethod)}}function yp(t,e){if(1&t){const t=z.sc();z.rc(0,"label",43),z.zc("ngModelChange",(function(n){return z.dd(t),e.$implicit.active=n})),z.qd(1),z.qc()}if(2&t){const t=e.$implicit;z.Mc("ngModel",t.active)("nzValue",t.value),z.Ub(1),z.sd(" ",t.label," ")}}function Mp(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-col",38),z.rc(1,"ui-select",45),z.rc(2,"ui-option",40),z.rc(3,"nz-checkbox-wrapper",41),z.zc("nzOnChange",(function(e){return z.dd(t),z.Dc(4).filterResult(e,"productType")})),z.od(4,yp,2,3,"label",42),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(4),e=z.ad(14);z.Ub(1),z.Mc("nzSuffixIcon",e)("nzPlaceHolder","Product Type \u2022 "+t.filterList.productTypeList.length),z.Ub(3),z.Mc("ngForOf",t.productType)}}function vp(t,e){1&t&&z.nc(0)}const Cp=function(){return{currency:"MYR"}};function Tp(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr"),z.rc(2,"td",55),z.od(3,vp,1,0,"ng-container",17),z.qc(),z.qc(),z.oc()),2&t){z.Dc(5);const t=z.ad(36);
1z.Ub(3),z.Mc("ngTemplateOutlet",t)("ngTemplateOutletContext",z.Rc(2,Cp))}}function Sp(t,e){if(1&t&&(z.rc(0,"nz-tag",65),z.qd(1),z.qc()),2&t){const t=e.$implicit,n=z.Dc(8);z.Ub(1),z.rd(n.getDatesDisplay(t))}}function Dp(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,Sp,2,1,"nz-tag",64),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Ub(1),z.Mc("ngForOf",null==t?null:t.datesArr)}}function zp(t,e){1&t&&(z.rc(0,"div"),z.qd(1," -"),z.qc())}function qp(t,e){if(1&t&&(z.rc(0,"nz-tag",66),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function Ep(t,e){if(1&t&&(z.rc(0,"nz-tag",67),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function Ap(t,e){if(1&t&&(z.rc(0,"nz-tag",68),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Ub(1),z.rd(z.Fc(2,1,t.fundStatus))}}function Pp(t,e){1&t&&z.mc(0,"div")}const Rp=function(t){return{"border-none":t}},wp=function(t){return{color:t}},Fp=function(t){return{data:t}};function Ip(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr"),z.rc(2,"td",56),z.rc(3,"nz-row"),z.rc(4,"span",57),z.qd(5,"\u25a0"),z.qc(),z.qd(6),z.qc(),z.qc(),z.rc(7,"td",58),z.rc(8,"nz-row"),z.qd(9),z.qc(),z.qc(),z.rc(10,"td",59),z.rc(11,"nz-row"),z.qd(12),z.Ec(13,"sdate"),z.qc(),z.qc(),z.rc(14,"td",59),z.rc(15,"nz-row"),z.qd(16),z.qc(),z.qc(),z.rc(17,"td",59),z.rc(18,"nz-row"),z.qd(19),z.Ec(20,"currencyFormat"),z.qc(),z.qc(),z.rc(21,"td",59),z.rc(22,"nz-row"),z.qd(23),z.Ec(24,"sdate"),z.qc(),z.qc(),z.rc(25,"td",59),z.rc(26,"nz-row"),z.qd(27),z.qc(),z.qc(),z.rc(28,"td",59),z.rc(29,"nz-row"),z.qd(30),z.qc(),z.qc(),z.rc(31,"td",59),z.rc(32,"nz-row"),z.od(33,Dp,2,1,"div",23),z.od(34,zp,2,0,"div",23),z.qc(),z.qc(),z.rc(35,"td",59),z.od(36,qp,3,4,"nz-tag",60),z.od(37,Ep,3,4,"nz-tag",61),z.od(38,Ap,3,3,"nz-tag",62),z.qc(),z.rc(39,"td",63),z.od(40,Pp,1,0,"div",17),z.qc(),z.qc(),z.oc()),2&t){const t=z.Dc(),e=t.last,n=t.$implicit,i=z.Dc(5),c=z.ad(2);z.Ub(2),z.Mc("ngClass",z.Sc(35,Rp,!e)),z.Ub(2),z.Mc("ngStyle",z.Sc(37,wp,null==n?null:n.productColour)),z.Ub(2),z.rd("TRUST"===(null==n?null:n.sedolnumber)?"CA":"DPMS"===(null==n?null:n.productType)?"MP":"ETF"===(null==n?null:n.productType)?"ETF":"Funds"),z.Ub(1),z.Mc("ngClass",z.Sc(39,Rp,!e)),z.Ub(2),z.rd(n.fundName),z.Ub(1),z.Mc("ngClass",z.Sc(41,Rp,!e)),z.Ub(2),z.rd(n.transDate===i.DEFAULT_DATE_NUMBER?"N.A.":z.Fc(13,28,null==n?null:n.transDate)),z.Ub(2),z.Mc("ngClass",z.Sc(43,Rp,!e)),z.Ub(2),z.td("",n.paymentMethodDisplay," ","Y"===(null==n.iamRspModel?null:n.iamRspModel.isEmandate)?"e-Mandate":"",""),z.Ub(1),z.Mc("ngClass",z.Sc(45,Rp,!e)),z.Ub(2),z.rd(z.Gc(20,30,n.amount,(null==n?null:n.paymentMethod)===i.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?null==n?null:n.autoSweepCurrency:i.transactionConstant.PAYMENT_CURRENCY_MYR)),z.Ub(2),z.Mc("ngClass",z.Sc(47,Rp,!e)),z.Ub(2),z.rd(null!=n&&n.nextRspDate?z.Fc(24,33,null==n?null:n.nextRspDate):"N.A"),z.Ub(2),z.Mc("ngClass",z.Sc(49,Rp,!e)),z.Ub(2),z.rd(null!=(null==n.iamRspModel?null:n.iamRspModel.bankAccountName)?n.iamRspModel.bankAccountName:"-"),z.Ub(1),z.Mc("ngClass",z.Sc(51,Rp,!e)),z.Ub(2),z.rd(n.frequencyDisplay),z.Ub(1),z.Mc("ngClass",z.Sc(53,Rp,!e)),z.Ub(2),z.Mc("ngIf",(null==n?null:n.datesArr)&&(null==n||null==n.datesArr?null:n.datesArr.length)>0),z.Ub(1),z.Mc("ngIf",!(null!=n&&n.datesArr&&(null==n||null==n.datesArr?null:n.datesArr.length)>0)),z.Ub(1),z.Mc("ngClass",z.Sc(55,Rp,!e)),z.Ub(1),z.Mc("ngIf","active"!=n.fundStatus&&"terminated"!=n.fundStatus),z.Ub(1),z.Mc("ngIf","active"===n.fundStatus),z.Ub(1),z.Mc("ngIf","terminated"===n.fundStatus),z.Ub(1),z.Mc("ngClass",z.Sc(57,Rp,!e)),z.Ub(1),z.Mc("ngTemplateOutlet",c)("ngTemplateOutletContext",z.Sc(59,Fp,n))}}function Up(t,e){if(1&t&&(z.pc(0),z.od(1,Ip,41,61,"ng-container",23),z.oc()),2&t){const t=e.$implicit,n=z.Dc(5);z.Ub(1),z.Mc("ngIf",(null==t?null:t.paymentMethod)!==n.rspConstants.PAYMENT_METHOD_AUTO_SWEEP||"MYR"===(null==t?null:t.autoSweepCurrency))}}function Op(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr",69),z.rc(2,"td",70),z.qd(3,"Total"),z.qc(),z.mc(4,"td",71),z.rc(5,"td",72),z.rc(6,"span",73),z.qd(7),z.Ec(8,"currencyFormat"),z.qc(),z.qc(),z.mc(9,"td",74),z.qc(),z.oc()),2&t){const t=z.Dc(5);z.Ub(7),z.rd(z.Gc(8,1,t.totalRspAmountInMyr,t.transactionConstant.PAYMENT_CURRENCY_MYR))}}function xp(t,e){1&t&&z.nc(0)}function Lp(t,e){if(1&t&&(z.rc(0,"nz-tag",65),z.qd(1),z.qc()),2&t){const t=e.$implicit,n=z.Dc(10);z.Ub(1),z.rd(n.getDatesDisplay(t))}}function kp(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,Lp,2,1,"nz-tag",64),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Ub(1),z.Mc("ngForOf",null==t?null:t.datesArr)}}function Np(t,e){1&t&&(z.rc(0,"div"),z.qd(1," -"),z.qc())}function _p(t,e){if(1&t&&(z.rc(0,"nz-tag",66),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function Bp(t,e){if(1&t&&(z.rc(0,"nz-tag",67),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function Vp(t,e){if(1&t&&(z.rc(0,"nz-tag",68),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc(2).$implicit;z.Ub(1),z.rd(z.Fc(2,1,t.fundStatus))}}function Yp(t,e){1&t&&z.mc(0,"div")}function Hp(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr"),z.rc(2,"td",56),z.rc(3,"nz-row"),z.rc(4,"span",57),z.qd(5,"\u25a0"),z.qc(),z.qd(6),z.qc(),z.qc(),z.rc(7,"td",58),z.rc(8,"nz-row"),z.qd(9),z.qc(),z.qc(),z.rc(10,"td",59),z.rc(11,"nz-row"),z.qd(12),z.Ec(13,"sdate"),z.qc(),z.qc(),z.rc(14,"td",59),z.rc(15,"nz-row"),z.qd(16),z.qc(),z.qc(),z.rc(17,"td",59),z.rc(18,"nz-row"),z.qd(19),z.Ec(20,"currencyFormat"),z.qc(),z.qc(),z.rc(21,"td",59),z.rc(22,"nz-row"),z.qd(23),z.Ec(24,"sdate"),z.qc(),z.qc(),z.rc(25,"td",59),z.rc(26,"nz-row"),z.qd(27),z.qc(),z.qc(),z.rc(28,"td",59),z.rc(29,"nz-row"),z.qd(30),z.qc(),z.qc(),z.rc(31,"td",59),z.rc(32,"nz-row"),z.od(33,kp,2,1,"div",23),z.od(34,Np,2,0,"div",23),z.qc(),z.qc(),z.rc(35,"td",59),z.od(36,_p,3,4,"nz-tag",60),z.od(37,Bp,3,4,"nz-tag",61),z.od(38,Vp,3,3,"nz-tag",62),z.qc(),z.rc(39,"td",63),z.od(40,Yp,1,0,"div",17),z.qc(),z.qc(),z.oc()),2&t){const t=z.Dc(),e=t.last,n=t.$implicit,i=z.Dc(7),c=z.ad(2);z.Ub(2),z.Mc("ngClass",z.Sc(35,Rp,!e)),z.Ub(2),z.Mc("ngStyle",z.Sc(37,wp,null==n?null:n.productC
1olour)),z.Ub(2),z.rd("TRUST"===(null==n?null:n.sedolnumber)?"CA":"DPMS"===(null==n?null:n.productType)?"MP":"ETF"===(null==n?null:n.productType)?"ETF":"Funds"),z.Ub(1),z.Mc("ngClass",z.Sc(39,Rp,!e)),z.Ub(2),z.rd(n.fundName),z.Ub(1),z.Mc("ngClass",z.Sc(41,Rp,!e)),z.Ub(2),z.rd(n.transDate===i.DEFAULT_DATE_NUMBER?"N.A.":z.Fc(13,28,null==n?null:n.transDate)),z.Ub(2),z.Mc("ngClass",z.Sc(43,Rp,!e)),z.Ub(2),z.td("",n.paymentMethodDisplay," ","Y"===(null==n.iamRspModel?null:n.iamRspModel.isEmandate)?"e-Mandate":"",""),z.Ub(1),z.Mc("ngClass",z.Sc(45,Rp,!e)),z.Ub(2),z.rd(z.Gc(20,30,n.amount,(null==n?null:n.paymentMethod)===i.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?null==n?null:n.autoSweepCurrency:i.transactionConstant.PAYMENT_CURRENCY_MYR)),z.Ub(2),z.Mc("ngClass",z.Sc(47,Rp,!e)),z.Ub(2),z.rd(null!=n&&n.nextRspDate?z.Fc(24,33,null==n?null:n.nextRspDate):"N.A"),z.Ub(2),z.Mc("ngClass",z.Sc(49,Rp,!e)),z.Ub(2),z.rd(null!=(null==n.iamRspModel?null:n.iamRspModel.bankAccountName)?n.iamRspModel.bankAccountName:"-"),z.Ub(1),z.Mc("ngClass",z.Sc(51,Rp,!e)),z.Ub(2),z.rd(n.frequencyDisplay),z.Ub(1),z.Mc("ngClass",z.Sc(53,Rp,!e)),z.Ub(2),z.Mc("ngIf",(null==n?null:n.datesArr)&&(null==n||null==n.datesArr?null:n.datesArr.length)>0),z.Ub(1),z.Mc("ngIf",!(null!=n&&n.datesArr&&(null==n||null==n.datesArr?null:n.datesArr.length)>0)),z.Ub(1),z.Mc("ngClass",z.Sc(55,Rp,!e)),z.Ub(1),z.Mc("ngIf","active"!=n.fundStatus&&"terminated"!=n.fundStatus),z.Ub(1),z.Mc("ngIf","active"===n.fundStatus),z.Ub(1),z.Mc("ngIf","terminated"===n.fundStatus),z.Ub(1),z.Mc("ngClass",z.Sc(57,Rp,!e)),z.Ub(1),z.Mc("ngTemplateOutlet",c)("ngTemplateOutletContext",z.Sc(59,Fp,n))}}function jp(t,e){if(1&t&&(z.pc(0),z.od(1,Hp,41,61,"ng-container",23),z.oc()),2&t){const t=e.$implicit,n=z.Dc().$implicit,i=z.Dc(6);z.Ub(1),z.Mc("ngIf",(null==t?null:t.paymentMethod)===i.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&(null==t?null:t.autoSweepCurrency)===n&&"MYR"!==(null==t?null:t.autoSweepCurrency))}}function $p(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr",69),z.rc(2,"td",70),z.qd(3,"Total"),z.qc(),z.mc(4,"td",71),z.rc(5,"td",72),z.rc(6,"span",73),z.qd(7),z.Ec(8,"currencyFormat"),z.qc(),z.qc(),z.mc(9,"td",74),z.qc(),z.oc()),2&t){const t=z.Dc().$implicit,e=z.Dc(6);z.Ub(7),z.rd(z.Gc(8,1,e.autoSweepCurrencyTotalAmountMap.get(t),t))}}const Gp=function(t){return{currency:t}};function Wp(t,e){if(1&t&&(z.pc(0),z.rc(1,"tr"),z.rc(2,"td",55),z.od(3,xp,1,0,"ng-container",17),z.qc(),z.qc(),z.od(4,jp,2,1,"ng-container",54),z.od(5,$p,10,4,"ng-container",23),z.oc()),2&t){const t=e.$implicit,n=z.Dc(6),i=z.ad(36);z.Ub(3),z.Mc("ngTemplateOutlet",i)("ngTemplateOutletContext",z.Sc(4,Gp,t)),z.Ub(1),z.Mc("ngForOf",n.rspTableInfoList),z.Ub(1),z.Mc("ngIf",n.autoSweepCurrencyTotalAmountMap.get(t)>0)}}function Xp(t,e){if(1&t&&(z.pc(0),z.od(1,Wp,6,6,"ng-container",54),z.oc()),2&t){const t=z.Dc(5);z.Ub(1),z.Mc("ngForOf",t.autoSweepCurrencyList)}}const Kp=function(){return{x:"100%"}};function Jp(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-table",46,47),z.rc(2,"thead",48),z.zc("nzSortChange",(function(e){return z.dd(t),z.Dc(4).sort(e)})),z.rc(3,"tr"),z.rc(4,"th",49),z.qd(5,"Product Type"),z.qc(),z.rc(6,"th",50),z.qd(7,"Product Name"),z.qc(),z.rc(8,"th",51),z.qd(9,"RSP Start Date"),z.qc(),z.rc(10,"th",52),z.qd(11,"Payment Method"),z.qc(),z.rc(12,"th",52),z.qd(13,"RSP Amount"),z.qc(),z.rc(14,"th",52),z.qd(15,"Next RSP Date"),z.qc(),z.rc(16,"th",52),z.qd(17,"Bank Name"),z.qc(),z.rc(18,"th",52),z.qd(19,"Frequency"),z.qc(),z.rc(20,"th"),z.qd(21,"Selected RSP Date"),z.qc(),z.rc(22,"th",52),z.qd(23,"Status"),z.qc(),z.rc(24,"th",53),z.qd(25,"Action"),z.qc(),z.qc(),z.qc(),z.rc(26,"tbody"),z.od(27,Tp,4,3,"ng-container",23),z.Ec(28,"async"),z.od(29,Up,2,1,"ng-container",54),z.od(30,Op,10,4,"ng-container",23),z.od(31,Xp,2,1,"ng-container",23),z.Ec(32,"async"),z.qc(),z.qc()}if(2&t){const t=z.Dc(4);z.Mc("nzData",t.rspTableInfoList)("nzLoading",t.isLoading)("nzScroll",t.rspTableInfoList.length>0?z.Rc(22,Kp):"")("nzFrontPagination",!1)("nzShowPagination",!1),z.Ub(4),z.Mc("nzSortKey","productType"),z.Ub(2),z.Mc("nzSortKey","fundName"),z.Ub(2),z.Mc("nzSortKey","transDate"),z.
1Ub(2),z.Mc("nzSortKey","paymentMethodDisplay"),z.Ub(2),z.Mc("nzSortKey","amount"),z.Ub(2),z.Mc("nzSortKey","nextRspDate"),z.Ub(2),z.Mc("nzSortKey","bankAccountName"),z.Ub(2),z.Mc("nzSortKey","frequencyDisplay"),z.Ub(4),z.Mc("nzSortKey","fundStatus"),z.Ub(5),z.Mc("ngIf",t.showMyrSubheader&&z.Fc(28,18,t.showRspAs$)),z.Ub(2),z.Mc("ngForOf",t.rspTableInfoList),z.Ub(1),z.Mc("ngIf",t.totalRspAmountInMyr>0),z.Ub(1),z.Mc("ngIf",z.Fc(32,20,t.showRspAs$))}}function Zp(t,e){if(1&t){const t=z.sc();z.rc(0,"div"),z.rc(1,"nz-row",24),z.rc(2,"nz-col",25),z.rc(3,"nz-input-group",26),z.rc(4,"input",27),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(3).searchField(e)}))("ngModelChange",(function(e){return z.dd(t),z.Dc(3).searchText=e})),z.qc(),z.qc(),z.qc(),z.od(5,mp,5,4,"nz-col",28),z.Ec(6,"async"),z.od(7,gp,5,3,"nz-col",29),z.Ec(8,"async"),z.od(9,Mp,5,3,"nz-col",28),z.Ec(10,"async"),z.qc(),z.od(11,Jp,33,23,"nz-table",30),z.rc(12,"div"),z.rc(13,"h4",31),z.qd(14,"Important Notes"),z.qc(),z.rc(15,"nz-row",32),z.rc(16,"nz-col",33),z.rc(17,"div"),z.rc(18,"ol",34),z.rc(19,"li"),z.qd(20,"To prevent the possibility of failed trades, for FPX e-Mandate, bank will deduct payment from your bank account "),z.rc(21,"strong"),z.qd(22,"4 business days before 15th of every month"),z.qc(),z.qd(23," or "),z.rc(24,"strong"),z.qd(25,"next business day if the 15th is a non-business day"),z.qc(),z.qd(26,"."),z.qc(),z.rc(27,"li"),z.qd(28,"To accommodate deduction and transaction processes, "),z.rc(29,"strong"),z.qd(30,"request for change of amount or termination"),z.qc(),z.qd(31," under FPX e-Mandate received between "),z.rc(32,"strong"),z.qd(33,"8th to 18th of the month will only take effect on the following month"),z.qc(),z.qd(34,"."),z.qc(),z.rc(35,"li"),z.qd(36,"For "),z.rc(37,"strong"),z.qd(38,"weekly and bi-weekly RSP"),z.qc(),z.qd(39," application, you are advised to "),z.rc(40,"strong"),z.qd(41,"top up Cash Account/Cash Management Fund 2 at least 3 business days before the transaction day"),z.qc(),z.qd(42,". Payment should reach FSMOne before the "),z.rc(43,"strong"),z.qd(44,"cut off time at 3pm"),z.qc(),z.qd(45,"."),z.qc(),z.rc(46,"li"),z.qd(47,"Change of amount and termination request for "),z.rc(48,"strong"),z.qd(49,"weekly and bi-weekly"),z.qc(),z.qd(50," need to perform "),z.rc(51,"strong"),z.qd(52,"at least 1 business day before the transaction date"),z.qc(),z.qd(53,"."),z.qc(),z.rc(54,"li"),z.qd(55,"RSP application will be terminated after "),z.rc(56,"strong"),z.qd(57,"3 consecutive unsuccessful deductions"),z.qc(),z.qd(58,". You will need to reapply RSP online if you wish to continue the monthly subscription."),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(59,"nz-modal",35),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc(3).closeRspDetails()})),z.nc(60,36),z.qc(),z.rc(61,"nz-modal",35),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc(3).closeRspDetails()})),z.nc(62,36),z.qc(),z.rc(63,"fep-breached-modal",37),z.zc("showModalChange",(function(e){return z.dd(t),z.Dc(3).fepBreached=e})),z.qc(),z.qc()}if(2&t){const t=z.Dc(3),e=z.ad(12),n=z.ad(16),i=z.ad(10),c=z.ad(4),o=z.ad(6);z.Ub(3),z.Mc("nzPrefix",e)("nzSuffix",n),z.Ub(1),z.Mc("ngModel",t.searchText),z.Ub(1),z.Mc("ngIf",!z.Fc(6,21,t.isMobile$)),z.Ub(2),z.Mc("ngIf",!z.Fc(8,23,t.isMobile$)),z.Ub(2),z.Mc("ngIf",!z.Fc(10,25,t.isMobile$)),z.Ub(2),z.Mc("ngIf",t.rspTableInfoList)("ngIfElse",i),z.Ub(5),z.Mc("nzSpan",24),z.Ub(43),z.Mc("nzVisible",t.editMode)("nzWrapClassName","vertical-center-modal")("nzWidth",600)("nzFooter",null),z.Ub(1),z.Mc("ngTemplateOutlet",c),z.Ub(1),z.Mc("nzVisible",t.terminateMode)("nzWrapClassName","vertical-center-modal")("nzWidth",600)("nzFooter",null),z.Ub(1),z.Mc("ngTemplateOutlet",o),z.Ub(1),z.Mc("showModal",t.fepBreached)("refno",t.refno)}}function Qp(t,e){if(1&t&&(z.rc(0,"app-web-scaffold"),z.od(1,Zp,64,27,"div",0),z.qc()),2&t){const t=z.Dc(2),e=z.ad(8);z.Ub(1),z.Mc("ngIf",(null==t.rspTableInfoListTemp?null:t.rspTableInfoListTemp.length)>0)("ngIfElse",e)}}function th(t,e){if(1&t&&(z.pc(0),z.rc(1,"nz-row"),z.rc(2,"nz-col",77),z.rc(3,"h5",78),z.qd(4),z.qc(),z.qc(),z.rc(5,"nz-col",79),z.rc(6,"h4",80),z.qd(7),z.Ec(8,"currencyFormat"),z.qc(),z.qc(),z.qc(),z.oc()),2&t){const t=e.$implicit,n=z.Dc(4);z.Ub(4),z.sd("Total RSP Amount (",t,")"),z.Ub(3),z.rd(z.Gc(8,2,n.autoSweepCurrencyTotalAmountMap.get(t),t))}}function eh(t,e){if(1&t){const t=z.sc();z.rc(0,"label",43),z.zc("ngModelChange",(function(n){return z.dd(t),e.$implicit.active=n})),z.qd(1),z.qc()}if(2&t){const t=e.$implicit;z.Mc("ngModel",t.active)("nzValue",t.value),z.Ub(1),z.sd(" ",t.label," ")}}function nh(t,e){if(1&t&&(z.rc(0,"nz-tag",66),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#FFF3E8"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function ih(t,e){if(1&t&&(z.rc(0,"nz-tag",67),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function ch(t,e){if(1&t&&(z.rc(0,"nz-tag",99),z.qd(1),z.Ec(2,"titlecase"),z.qc()),2&t){const t=z.Dc().$implicit;z.Mc("nzColor","#EEFFED"),z.Ub(1),z.rd(z.Fc(2,2,t.fundStatus))}}function oh(t,e){if(1&t&&(z.rc(0,"nz-col",100),z.mc(1,"app-stock-exchange-tag",101),z.rc(2,"span",102),z.qd(3),z.qc(),z.qc()),2&t){const t=z.Dc().$implicit;
1z.Mc("nzSpan",24),z.Ub(1),z.Mc("exchange",null==t?null:t.exchange),z.Ub(2),z.rd(null==t?null:t.sedolnumber)}}function sh(t,e){if(1&t&&(z.rc(0,"nz-tag",65),z.qd(1),z.qc()),2&t){const t=e.$implicit,n=z.Dc(6);z.Ub(1),z.rd(n.getDatesDisplay(t))}}function ah(t,e){if(1&t&&(z.rc(0,"div"),z.od(1,sh,2,1,"nz-tag",64),z.qc()),2&t){const t=z.Dc().$implicit;z.Ub(1),z.Mc("ngForOf",null==t?null:t.datesArr)}}function rh(t,e){1&t&&(z.rc(0,"h6",92),z.qd(1,"-"),z.qc())}const lh=function(t){return{"mt-3":t}},dh=function(t,e){return{border:t,"background-color":e,color:"#FFF"}};function uh(t,e){if(1&t){const t=z.sc();z.rc(0,"div",88),z.zc("click",(function(){z.dd(t);const n=e.$implicit;return z.Dc(4).openDdaModel("view",n)})),z.rc(1,"div",73),z.rc(2,"nz-tag",89),z.qd(3),z.qc(),z.od(4,nh,3,4,"nz-tag",60),z.od(5,ih,3,4,"nz-tag",61),z.od(6,ch,3,4,"nz-tag",90),z.qc(),z.rc(7,"nz-row"),z.rc(8,"nz-col",91),z.rc(9,"h4",92),z.qd(10),z.qc(),z.qc(),z.od(11,oh,4,3,"nz-col",93),z.qc(),z.rc(12,"nz-row",94),z.rc(13,"nz-col",91),z.rc(14,"h6"),z.qd(15,"Next RSP Date"),z.qc(),z.qc(),z.rc(16,"nz-col",91),z.rc(17,"h6"),z.qd(18,"Selected RSP Date"),z.qc(),z.qc(),z.qc(),z.rc(19,"nz-row"),z.rc(20,"nz-col",91),z.rc(21,"h6",92),z.qd(22),z.Ec(23,"sdate"),z.qc(),z.qc(),z.rc(24,"nz-col",91),z.od(25,ah,2,1,"div",23),z.od(26,rh,2,0,"h6",95),z.qc(),z.qc(),z.rc(27,"nz-row",96),z.rc(28,"nz-col",91),z.rc(29,"h6"),z.qd(30,"AMOUNT"),z.qc(),z.qc(),z.rc(31,"nz-col",91),z.rc(32,"h6"),z.qd(33,"PYT. METHOD"),z.qc(),z.qc(),z.rc(34,"nz-col",91),z.rc(35,"h6"),z.qd(36,"FREQUENCY"),z.qc(),z.qc(),z.qc(),z.rc(37,"nz-row",97),z.rc(38,"nz-col",91),z.rc(39,"h6",92),z.qd(40),z.Ec(41,"currencyFormat"),z.qc(),z.qc(),z.rc(42,"nz-col",91),z.rc(43,"h6",92),z.qd(44),z.qc(),z.qc(),z.rc(45,"nz-col",91),z.rc(46,"h6",92),z.qd(47),z.qc(),z.qc(),z.qc(),z.rc(48,"div",98),z.rc(49,"nz-row"),z.rc(50,"nz-col",33),z.rc(51,"span"),z.qd(52,"RSP Start Date :"),z.qc(),z.rc(53,"span"),z.qd(54),z.Ec(55,"sdate"),z.qc(),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=e.$implicit,n=e.index,i=z.Dc(4);z.Mc("ngClass",z.Sc(36,lh,0!==n)),z.Ub(2),z.Mc("nzColor",null==t?null:t.productColour)("ngStyle",z.Tc(38,dh,"1px solid "+(null==t?null:t.productColour)+" !important","rgb("+(null==t?null:t.productColour)+", 0.1) !important")),z.Ub(1),z.rd(i.getProductName(t)),z.Ub(1),z.Mc("ngIf","active"!=t.fundStatus&&"terminated"!=t.fundStatus),z.Ub(1),z.Mc("ngIf","active"===t.fundStatus),z.Ub(1),z.Mc("ngIf","terminated"===t.fundStatus),z.Ub(2),z.Mc("nzSpan",24),z.Ub(2),z.rd(t.fundName),z.Ub(1),z.Mc("ngIf","ETF"===(null==t?null:t.productType)),z.Ub(2),z.Mc("nzSpan",12),z.Ub(3),z.Mc("nzSpan",12),z.Ub(4),z.Mc("nzSpan",12),z.Ub(2),z.rd(null!=t&&t.nextRspDate?z.Fc(23,29,null==t?null:t.nextRspDate):"N.A"),z.Ub(2),z.Mc("nzSpan",12),z.Ub(1),z.Mc("ngIf",(null==t?null:t.datesArr)&&(null==t||null==t.datesArr?null:t.datesArr.length)>0),z.Ub(1),z.Mc("ngIf",!(null!=t&&t.datesArr&&(null==t||null==t.datesArr?null:t.datesArr.length)>0)),z.Ub(2),z.Mc("nzSpan",7),z.Ub(3),z.Mc("nzSpan",11),z.Ub(3),z.Mc("nzSpan",6),z.Ub(4),z.Mc("nzSpan",7),z.Ub(2),z.rd(z.Gc(41,31,t.amount,(null==t?null:t.paymentMethod)===i.rspConstants.PAYMENT_METHOD_AUTO_SWEEP?null==t?null:t.autoSweepCurrency:i.transactionConstant.PAYMENT_CURRENCY_MYR)),z.Ub(2),z.Mc("nzSpan",11),z.Ub(2),z.td("",t.paymentMethodDisplay," ","Y"===(null==t.iamRspModel?null:t.iamRspModel.isEmandate)?"e-Mandate":"",""),z.Ub(1),z.Mc("nzSpan",6),z.Ub(2),z.rd(t.frequencyDisplay),z.Ub(3),z.Mc("nzSpan",12),z.Ub(4),z.rd(t.transDate===i.DEFAULT_DATE_NUMBER?"N.A.":z.Fc(55,34,null==t?null:t.transDate))}}function ph(t,e){if(1&t){const t=z.sc();z.rc(0,"button",103),z.zc("click",(function(){return z.dd(t),z.Dc(4).viewScheduleSellRecord()})),z.qd(1,"View ETFs Scheduled Sell Transaction"),z.qc()}2&t&&z.Mc("title","View ETFs Scheduled Sell Transaction")}function hh(t,e){if(1&t){const t=z.sc();z.rc(0,"div"),z.mc(1,"header-details",75),z.rc(2,"div",76),z.rc(3,"nz-row"),z.rc(4,"nz-col",77),z.rc(5,"h5",78),z.qd(6,"Total RSP Amount (MYR)"),z.qc(),z.qc(),z.rc(7,"nz-col",79),z.rc(8,"h4",80),z.qd(9),z.Ec(10,"currencyFormat"),z.qc(),z.qc(),z.qc(),z.od(11,th,9,5,"ng-container",54),z.qc(),z.rc(12,"div",81),z.rc(13,"div",82),z.rc(14,"nz-row",83),z.rc(15,"nz-col"),z.rc(16,"nz-input-group",26),z.rc(17,"input",27),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc(3).searchField(e)}))("ngModelChange",(function(e){return z.dd(t),z.Dc(3).searchText=e})),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(18,"nz-row",83),z.rc(19,"nz-col"),z.rc(20,"nz-select",45),z.rc(21,"nz-option",40),z.rc(22,"nz-checkbox-wrapper",41),z.zc("nzOnChange",(function(e){return z.dd(t),z.Dc(3).filterResult(e,"status")})),z.od(23,eh,2,3,"label",42),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.qc(),z.rc(24,"div"),z.od(25,uh,56,41,"div",84),z.qc(),z.qc(),z.rc(26,"div",85),z.od(27,ph,2,1,"button",86),z.rc(28,"button",87),z.zc("click",(function(){return z.dd(t),z.Dc(3).applyNewRsp()})),z.qd(29,"Apply New RSP"),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(3),e=z.ad(12),n=z.ad(16),i=z.ad(14);z.Ub(1),z.Mc("accounts",t.accounts)("refno",t.refno)("menu",t.menu),z.Ub(8),z.rd(z.Gc(10,14,t.totalRspAmountInMyr,t.transactionConstant.PAYMENT_CURRENCY_MYR)),z.Ub(2),z.Mc("ngForOf",t.autoSweepCurrencyList),z.Ub(5),z.Mc("nzPrefix",e)("nzSuffix",n),z.Ub(1),z.Mc("ngModel",t.searchText),z.Ub(3),z.Mc("nzSuffixIcon",i)("nzPlaceHolder","All Status \u2022 "+t.filterList.statusList.length),z.Ub(3),z.Mc("ngForOf",t.statusOptions),z.Ub(2),z.Mc("ngForOf",t.rspTableInfoList),z.Ub(2),z.Mc("ngIf",t.viewScheduledSellBtnVisible),z.Ub(1),z.Mc("title","Apply New RSP")}}function fh(t,e){if(1&t&&(z.rc(0,"app-mobile-scaffold"),z.mc(1,"app-menu-sidebar"),z.od(2,hh,30,17,"div",23),z.qc()),2&t){const t=z.Dc(2);z.Ub(2),z.Mc("ngIf",!t.viewMode)}}function mh(t,e){if(1&t&&(z.pc(0),z.od(1,Qp,2,2,"app-web-scaffold",23),z.Ec(2,"async"),z.od(3,fh,3,1,"app-mobile-scaffold",23),z.Ec(4,"async"),z.oc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("ngIf",!z.Fc(2,2,t.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(4,4,t.isMobile$))}}function bh(t,e){if(1&t&&z.mc(0,"nz-option",107),2&t){const t=e.$implicit;z.Mc("nzLabel",t.label)("nzValue",t.value)}}function gh(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-select",105),z.zc("ngModelChange",(function(e){return z.dd(t),z.Dc().data.actionValue=e}))("ngModelChange",(function(e){z.dd(t);const n=z.Dc().data;return z.Dc().onActionChange(e,n)})),z.od(1,bh,1,2,"nz-option",106),z.qc()}if(2&t){const t=z.Dc().data;z.Mc("nzDropdownMatchSelectWidth",!1)("ngModel",t.actionValue),z.Ub(1),z.Mc("ngForOf",t.actionOption)}}function yh(t,e){if(1&t&&z.od(0,gh,2,3,"nz-select",104),2&t){const t=e.data;z.Mc("ngIf","terminated"!==t.fundStatus&&"terminate-pending"!==t.fundStatus)}}function Mh(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-form",109),z.zc("refresh",(function(){return z.dd(t),z.Dc(2).loadRspList()}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).editMode=e}))("visibleChange",(function(){return z.dd(t),z.Dc(2).closeRspDetails()}))("showFepModal",(function(e){return z.dd(t),z.Dc(2).showFepModal(e)})),z.qc()}if(2&t){const t=z.Dc(2);
1z.Mc("rspDetailsModel",t.rspDetailsModel[0])("showDdaBanner",t.showDdaBanner)("totalUsedAmount",t.totalUsedAmount)("isLoading",t.isLoading)("actionType","edit")("visible",t.editMode)}}function vh(t,e){if(1&t&&z.od(0,Mh,1,6,"rsp-form",108),2&t){const t=z.Dc();z.Mc("ngIf",t.rspDetailsModel&&t.rspDetailsModel.length>0)}}function Ch(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-form",111),z.zc("refresh",(function(){return z.dd(t),z.Dc(2).loadRspList()}))("visibleChange",(function(e){return z.dd(t),z.Dc(2).terminateMode=e}))("visibleChange",(function(){return z.dd(t),z.Dc(2).closeRspDetails()})),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("rspDetailsModel",t.rspDetailsModel[0])("showDdaBanner",t.showDdaBanner)("totalUsedAmount",t.totalUsedAmount)("isLoading",t.isLoading)("actionType","terminate")("visible",t.terminateMode)}}function Th(t,e){if(1&t&&z.od(0,Ch,1,6,"rsp-form",110),2&t){const t=z.Dc();z.Mc("ngIf",t.rspDetailsModel&&t.rspDetailsModel.length>0)}}const Sh=function(t){return[t]};function Dh(t,e){if(1&t){const t=z.sc();z.rc(0,"div",113),z.rc(1,"div",114),z.mc(2,"img",115),z.rc(3,"div",116),z.qd(4,"Nothing in RSP"),z.qc(),z.rc(5,"div",82),z.qd(6,"A RSP is a monthly subscription plan that enables you to invest a small fixed "),z.mc(7,"br"),z.qd(8," sum of money into a particular investment product on a regular basis."),z.qc(),z.rc(9,"div",117),z.rc(10,"button",118),z.zc("click",(function(){return z.dd(t),z.Dc(2).applyNewRsp()})),z.qd(11,"Apply New RSP"),z.qc(),z.qc(),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);z.Ub(2),z.Mc("src",t.transactionImgPath+"emptyCart.svg",z.gd),z.Ub(8),z.Mc("title","Apply New RSP")("routerLink",z.Sc(3,Sh,"./"+(null==t.RouteConstant?null:t.RouteConstant.CREATE_RSP)))}}function zh(t,e){if(1&t&&z.od(0,Dh,12,5,"div",112),2&t){const t=z.Dc();z.Mc("ngIf",!t.isLoading)}}function qh(t,e){if(1&t&&(z.rc(0,"div",119),z.mc(1,"nz-skeleton",120),z.qc()),2&t){const t=z.Dc();z.Ub(1),z.Mc("nzLoading",t.isLoading)("nzActive",!0)}}function Eh(t,e){1&t&&z.mc(0,"em",121)}function Ah(t,e){if(1&t&&z.mc(0,"img",122),2&t){const t=z.Dc();z.Mc("alt","filter icon")("src",t.transactionImgPath+"filterIcon.svg",z.gd)}}function Ph(t,e){if(1&t){const t=z.sc();z.rc(0,"i",123),z.zc("click",(function(){return z.dd(t),z.Dc().clearSearchField()})),z.qc()}}function Rh(t,e){if(1&t){const t=z.sc();z.rc(0,"rsp-details",124),z.zc("visibleChange",(function(e){return z.dd(t),z.Dc().viewMode=e}))("refresh",(function(){return z.dd(t),z.Dc().loadRspList()}))("onActionClick",(function(e){return z.dd(t),z.Dc().onActionClick(e)})),z.qc()}if(2&t){const t=z.Dc();z.Mc("rspDetailsModel",t.rspDetailsModel[0])("visible",t.viewMode)("editModalOpen",t.openEditModal)("rspTableInfoList",t.rspTableInfoList)}}function wh(t,e){1&t&&z.nc(0)}function Fh(t,e){1&t&&z.nc(0)}const Ih=function(t,e,n,i){return["../../../",t,e,n,i]},Uh=function(t){return{path:"etf-icon",name:"ETFs",url:t}};function Oh(t,e){if(1&t&&(z.rc(0,"div",16),z.od(1,Fh,1,0,"ng-container",17),z.qc()),2&t){const t=z.Dc(),e=z.ad(33);z.Ub(1),z.Mc("ngTemplateOutlet",e)("ngTemplateOutletContext",z.Sc(7,Uh,z.Vc(2,Ih,null==t.RouteConstant?null:t.RouteConstant.APP,null==t.RouteConstant?null:t.RouteConstant.RSP,null==t.RouteConstant?null:t.RouteConstant.CREATE_RSP,null==t.RouteConstant?null:t.RouteConstant.RSP_ETF_LIST)))}}function xh(t,e){1&t&&z.nc(0)}function Lh(t,e){1&t&&z.nc(0)}function kh(t,e){if(1&t&&(z.rc(0,"a",125),z.rc(1,"nz-row",126),z.rc(2,"nz-col",127),z.mc(3,"img",128),z.qc(),z.rc(4,"nz-col",129),z.rc(5,"span",130),z.qd(6),z.qc(),z.qc(),z.qc(),z.qc()),2&t){const t=e.path,n=e.name,i=e.url,c=z.Dc();z.Mc("routerLink",i),z.Ub(3),z.Mc("src",c.transactionSelectorImgPath+t+".svg",z.gd)("alt",n)("title",n),z.Ub(3),z.rd(n)}}function Nh(t,e){if(1&t&&z.mc(0,"b2c-ui-icon",133),2&t){const t=z.Dc().currency,e=z.Dc();z.Mc("name",e.getIconNameForCurrency(t))}}function _h(t,e){if(1&t&&(z.rc(0,"div",131),z.od(1,Nh,1,1,"b2c-ui-icon",132),z.rc(2,"span",34),z.qd(3),z.qc(),z.qc()),2&t){const t=e.currency,n=z.Dc();z.Ub(1),z.Mc("ngIf","no-icon"!==n.getIconNameForCurrency(t)),z.Ub(2),z.rd(t)}}const Bh=function(t){return{path:"ut-icon",name:"Unit Trust",url:t}},Vh=function(t){return{path:"mp-icon",name:"Managed Portfolio",url:t}},Yh=function(t){return{path:"cash-account-icon",name:"Cash Account",url:t}};let Hh=(()=>{class t extends tu.a{constructor(t,e,n,i,c,o,s,a,r,l,d,u,p,f){super(d,t,p,u),this.store=t,this.subHandlingService=e,this.activatedRoute=n,this.cdRef=i,this.transactionService=c,this.rspRestService=o,this.fb=s,this.nzNotification=a,this.router=r,this.stocksInfoRestService=l,this.liveFeedService=d,this.lightstreamerService=u,this.accountService=p,this.cashSolutionService=f,this.statusOptions=[{label:"Active",value:"active",active:!0},{label:"Pending",value:"pending",active:!0},{label:"Received",value:"received",active:!0},{label:"Processing",value:"processing",active:!0},{label:"Terminated",value:"terminated"},{label:"Active-Pending",value:"active-pending",active:!0},{label:"Terminate-Pending",value:"terminate-pending",active:!0}],this.paymentMethod=[{label:"FPX",value:Yt.PAYMENT_METHOD_FPX},{label:"CMF2",value:Yt.PAYMENT_METHOD_CMF},{label:"Cash Account",value:Yt.PAYMENT_METHOD_TRUST_ACCOUNT},{label:"Salary Account",value:Yt.PAYMENT_METHOD_SALARY_ACCT},{label:Yt.PAYMENT_METHOD_GO_PAYZ,value:Yt.PAYMENT_METHOD_GO_PAYZ},{label:Yt.PAYMENT_METHOD_AUTO_SWEEP,value:Yt.PAYMENT_METHOD_AUTO_SWEEP}],this.productType=[{label:"Funds",value:"funds"},{label:"Managed Portfolio",value:"dpms"},{label:"Cash Account",value:"trustAccount"}],this.actionOption=[{label:"Edit RSP",value:"edit"},{label:"Terminate RSP",value:"terminate"}
1],this.productColour=[{label:"funds",value:"#B72E39"},{label:"dpms",value:"#005071"},{label:"trustAccount",value:"#000000"},{label:"etf",value:"#61C1C5"}],this.menu=[{label:"Regular Savings Plan (RSP)",value:M.o.RSP_LIST,active:!0},{label:"DDA / FPX Record",value:M.o.DDA_FPX_LIST,active:!1}],this.rspTableInfoList=[],this.isLoading=!1,this.totalRspAmountInMyr=0,this.autoSweepCurrencyList=[],this.totalUsedAmount=0,this.filterList={statusList:["active","pending","received","processing","active-pending","terminate-pending"],paymentMethodList:[],productTypeList:[]},this.showReferralChannelPaymentModal=!1,this.showPaymentResultModal=!1,this.paymentResultModalSuccess=!1,this.paymentDetails=[],this.rspDetailsModel=[],this.rspCountUsedAmountList=[],this.editMode=!1,this.terminateMode=!1,this.showDdaBanner=!1,this.visibleChange=new z.s,this.isReadMoreDisclaimer=!0,this.viewMode=!1,this.refresh=!1,this.accounts=[],this.link=M.o.RSP_LIST,this.viewRspMenu=!1,this.openEditModal=!1,this.isMobileDisplay=!1,this.transactionModalVisible=!1,this.etfTickerNoMap=new Map,this.viewScheduledSellBtnVisible=!1,this.showRspEtf=!1,this.isCalculator=!1,this.DEFAULT_DATE_NUMBER=-631179e6,this.transactionImgPath=M.g.TRANSACTION_IMG_PATH,this.RouteConstant=M.o,this.transactionSelectorImgPath=M.g.TRANSACTION_SELECTOR_IMG_PATH,this.headerSiteMap=rl.a,this.othersSiteMap=rl.b,this.country={title:"Malaysia",icon:"malaysiaIcon"},this.facebookUrl="www.facebook.com/fsmonemalaysia/",this.youtubeUrl="www.youtube.com/user/Fundsupermartdotcom",this.instragramUrl="www.instagram.com/fsmone_my/?igshid=YmMyMTA2M2Y=",this.telegramUrl="t.me/Fsmone_my",this.twitterUrl="https://x.com/FSMOne_my?s=20",this.fepBreached=!1,this.rspConstants=Yt,this.transactionConstant=h.a,this.autoSweepCurrencyTotalAmountMap=new Map,this.showMyrSubheader=!1,this.showRspAs=!1}ngOnInit(){this.showRspAs$.subscribe(t=>this.showRspAs=t),this.cdsAccount=this.accountService.cdsAccount;const t=this.store.selectSnapshot(T.a.getAccounts),e=[D.a.ACCOUNT_TYPE_PERSONAL,D.a.ACCOUNT_TYPE_JOINT,D.a.ACCOUNT_TYPE_CORPORATE];this.accounts=Object(g.a)(t),this.accounts=this.accounts.sort((function(t,n){return e.indexOf(t.accountType)>e.indexOf(n.accountType)?1:-1})),this.isMobile$.subscribe(t=>{this.isMobileDisplay=t}),this.subHandlingService.subscribe(this.activatedRoute.queryParams.pipe(Object(f.a)(t=>{var e;if(this.refno=t.refno,!this.refno){const t=null===(e=this.accounts.find(t=>t.accountType===D.a.ACCOUNT_TYPE_PERSONAL))||void 0===e?void 0:e.refno;this.refno=t||this.accounts[0].refno}if(this.cdRef.markForCheck(),this.router.navigate([Object(S.a)(M.o.APP,M.o.RSP,this.link)],{queryParams:{refno:this.refno}}),t.rspId&&(this.rspId=t.rspId),this.loadRspList(),t.channel){switch(t.channel){case M.n.CHANNEL_ID_GOPAYZ:this.paymentResultModalTitle="GoPayz - MYR",this.paymentResultModalMessage="We regret to inform that GoPayz is no longer in service.",this.paymentResultModalDescription="Please use another payment method.<br>Thank You.",this.paymentResultModalSuccess=!1,this.paymentResultModalPrimaryLabel="Done"}this.showPaymentResultModal=!0}}))),!0===tn.a.rspEtfEnabled&&(this.productType=[{label:"Funds",value:"funds"},{label:"ETFs",value:"etf"},{label:"MP",value:"dpms"},{label:"Cash Account",value:"trustAccount"}],this.showRspEtf=tn.a.rspEtfEnabled)}loadRspList(){this.isLoading=!0,this.rspTableInfoList=[],this.transactionService.findRspTransaction(this.refno,null).subscribe(t=>{if(t.status===M.a.RESPONSE_SUCCESS){const e=Object.values(t.data.result||{}).filter(Array.isArray).map(t=>t.filter(Boolean)).reduce((t,e)=>t.concat(e),[]);this.rspTableInfoList=e,this.rspTableInfoList.forEach(t=>{t.actionOption=this.actionOption,t.productType===M.q.ETF_SECURITY_TYPE&&(this.setEtfTickerNo(t),this.viewScheduledSellBtnVisible=!0,t.actionOption=[...t.actionOption,{label:"Sell",value:"sell"}]);const e=t.paymentMethod;if(t.paymentMethodDisplay=jh(e),e===Yt.PAYMENT_METHOD_DDA&&this.paymentMethod.push({label:"Direct Debit (GIRO)",value:Yt.PAYMENT_METHOD_DDA}),t.productTypeDisplay="DPMS"===(null==t?void 0:t.productType)?"dpms":"ETF"===(null==t?void 0:t.productType)?"etf":"funds","TRUST"===(null==t?void 0:t.sedolnumber)&&(t.productTypeDisplay="trustAccount"),t.pickDates="-",t.frequencyDisplay="Monthly","weekly"===t.subscriptionFreq)t.frequencyDisplay="Weekly";else if("bi-weekly"===t.subscriptionFreq)t.frequencyDisplay="Bi-Weekly";else if("self-select"===t.subscriptionFreq&&(t.frequencyDisplay=(null==t?void 0:t.totalDates)+" times per month",(null==t?void 0:t.totalDates)<2&&(t.frequencyDisplay=(null==t?void 0:t.totalDates)+" time per month"),null==t?void 0:t.datesSelected)){let e=null==t?void 0:t.datesSelected.split(",");e&&e.length>0&&(t.datesArr=e)}
1t.productColour=this.getProductTypeColor(t.productTypeDisplay),t.actionValue=null}),this.showMyrSubheader=this.isRspListContainNonAs(this.rspTableInfoList),this.autoSweepCurrencyList=this.extractAutoSweepCurrencyList(this.rspTableInfoList),this.calculateTotalAmount(),console.log("autoSweepCurrencyList",this.autoSweepCurrencyList),this.rspTableInfoListTemp=this.rspTableInfoList,this.filterResult()}if(this.isLoading=!1,this.openEditModal=!1,this.rspId){const t=this.rspTableInfoList.find(t=>t.orderNo===this.rspId);t&&(this.isMobileDisplay?(this.openEditModal=!0,this.openDdaModel("view",t)):this.openDdaModel("edit",t),this.rspId=null)}})}getDatesDisplay(t){let e="";switch(t){case"1":e="1st";break;case"8":e="8th";break;case"15":e="15th";break;case"22":e="22nd";break;default:e=t}return e}getProductName(t){let e="Funds";return"TRUST"===(null==t?void 0:t.sedolnumber)?e="CA":"DPMS"===(null==t?void 0:t.productType)?e="MP":"ETF"===(null==t?void 0:t.productType)&&(e="ETF"),e}getExchangeColor(t){let e="#FFF";return"KLSE"===(null==t?void 0:t.exchange)?e="#687ABC":"HKEX"===(null==t?void 0:t.exchange)?e="#A3B958":"NASDAQ"===(null==t?void 0:t.exchange)||"AMEX"===(null==t?void 0:t.exchange)||"NYSE"===(null==t?void 0:t.exchange)||"BATS"===(null==t?void 0:t.exchange)?e="#F48B85":"SGX"===(null==t?void 0:t.exchange)?e="#67B2DD":"SSE"!==(null==t?void 0:t.exchange)&&"SZSE"!==(null==t?void 0:t.exchange)||(e="#F87F18"),e}searchField(t){var e,n;null===t||""===t?(this.statusOptions.forEach(t=>{t.active="terminated"!==t.value}),this.filterList.statusList=["active","pending","received","processing","active-pending","terminate-pending"],this.paymentMethod.forEach(t=>{t.active=!1}),this.productType.forEach(t=>{t.active=!1}),this.rspTableInfoList=Object(g.a)(this.rspTableInfoListTemp),(null===(n=null===(e=this.filterList)||void 0===e?void 0:e.statusList)||void 0===n?void 0:n.length)>0&&(this.rspTableInfoList=this.rspTableInfoList.filter(t=>this.filterList.statusList.includes(t.fundStatus))),this.showMyrSubheader=this.isRspListContainNonAs(this.rspTableInfoList),this.autoSweepCurrencyList=this.extractAutoSweepCurrencyList(this.rspTableInfoList),this.calculateTotalAmount()):(this.statusOptions.forEach(t=>{t.active=!1}),this.paymentMethod.forEach(t=>{t.active=!1}),this.productType.forEach(t=>{t.active=!1}),this.filterList.statusList=[],this.rspTableInfoList=this.rspTableInfoListTemp.filter(e=>-1!==e.fundName.toLowerCase().indexOf(t.toLowerCase())||-1!==e.paymentMethodDisplay.toLowerCase().indexOf(t.toLowerCase())||-1!==e.productTypeDisplay.toLowerCase().indexOf(t.toLowerCase())||-1!==e.fundStatus.toLowerCase().indexOf(t.toLowerCase())||"etf"===e.productTypeDisplay&&-1!==e.sedolnumber.toLowerCase().indexOf(t.toLowerCase())),this.showMyrSubheader=this.isRspListContainNonAs(this.rspTableInfoList),this.autoSweepCurrencyList=this.extractAutoSweepCurrencyList(this.rspTableInfoList),this.calculateTotalAmount())}calculateTotalAmount(){this.totalRspAmountInMyr=0,this.autoSweepCurrencyTotalAmountMap.clear(),this.rspTableInfoList.forEach(t=>{var e,n,i;if((null==t?void 0:t.paymentMethod)===this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP&&"MYR"!==(null==t?void 0:t.autoSweepCurrency)){const c=null==t?void 0:t.autoSweepCurrency,o=null!==(e=null==t?void 0:t.amount)&&void 0!==e?e:0,s=null!==(n=null==t?void 0:t.totalDates)&&void 0!==n?n:0;if(c)if(this.autoSweepCurrencyTotalAmountMap.has(c)){const t=null!==(i=this.autoSweepCurrencyTotalAmountMap.get(c))&&void 0!==i?i:0;this.autoSweepCurrencyTotalAmountMap.set(c,t+o*s)}else this.autoSweepCurrencyTotalAmountMap.set(c,o*s)}else if(null!=(null==t?void 0:t.productType)&&"ETF"===(null==t?void 0:t.productType))for(let c=0;c<(null==t?void 0:t.totalDates);c++)this.totalRspAmountInMyr+=null==t?void 0:t.amount;else this.totalRspAmountInMyr+=null!=(null==t?void 0:t.subscriptionFreq)?"bi-weekly"===(null==t?void 0:t.subscriptionFreq)?2*(null==t?void 0:t.amount):"weekly"===(null==t?void 0:t.subscriptionFreq)?4*(null==t?void 0:t.amount):null==t?void 0:t.amount:null==t?void 0:t.amount})}filterResult(t,e){var n,i,c,o,s,a;this.rspTableInfoList=this.rspTableInfoListTemp,this.searchText="","productType"===e&&(this.filterList.productTypeList=[],this.filterList.productTypeList=t),"status"===e&&(this.filterList.statusList=[],this.filterList.statusList=t),"paymentMethod"===e&&(this.filterList.paymentMethodList=[],this.filterList.paymentMethodList=t),this.rspTableInfoList=Object(g.a)(this.rspTableInfoListTemp),(null===(i=null===(n=this.filterList)||void 0===n?void 0:n.statusList)||void 0===i?void 0:i.length)>0&&(this.rspTableInfoList=this.rspTableInfoList.filter(t=>this.filterList.statusList.includes(t.fundStatus)),this.showMyrSubheader=this.isRspListContainNonAs(this.rspTableInfoList),this.autoSweepCurrencyList=this.extractAutoSweepCurrencyList(this.rspTableInfoList),this.calculateTotalAmount()),(null===(o=null===(c=this.filterList)||void 0===c?void 0:c.paymentMethodList)||void 0===o?void 0:o.length)>0&&(this.rspTableInfoList=this.rspTableInfoList.filter(t=>this.filterList.paymentMethodList.includes(t.paymentMethod)),this.showMyrSubheader=this.isRspListContainNonAs(this.rspTableInfoList),this.autoSweepCurrencyList=this.extractAutoSweepCurrencyList(this.rspTableInfoList),this.calculateTotalAmount()),(null===(a=null===(s=this.filterList)||void 0===s?void 0:s.productTypeList)||void 0===a?void 0:a.length)>0&&(this.rspTableInfoList=this.rspTableInfoList.filter(t=>this.filterList.productTypeList.includes(t.productTypeDisplay)),this.showMyrSubheader=this.isRspListContainNonAs(this.rspTableInfoList),this.autoSweepCurrencyList=this.extractAutoSweepCurrencyList(this.rspTableInfoList),this.calculateTotalAmount()),this.rspTableInfoList=Object(bt.c)({key:"fundName",value:"ascend"},this.rspTableInfoList)}sort(t){this.rspTableInfoList=Object(bt.c)(t,this.rspTableInfoList)}clearSearchField(){var t,e;this.searchText="",this.statusOptions.forEach(t=>{t.active="terminated"!==t.value}),this.filterList.statusList=["active","pending","received","processing","active-pending","terminate-pending"],this.rspTableInfoList=Object(g.a)(this.rspTableInfoListTemp),(null===(e=null===(t=this.filterList)||void 0===t?void 0:t.statusList)||void 0===e?void 0:e.length)>0&&(this.rspTableInfoList=this.rspTableInfoList.filter(t=>this.filterList.statusList.includes(t.fundStatus)))}onActionClick(t){this.openDdaModel(t.action,t.rspInfo)}openDdaModel(t,e){if("edit"===t?this.editMode=!0:"terminate"===t?this.terminateMode=!0:"view"===t?this.viewMode=!0:"sell"===t&&this.openTransactionModal(e),"apply-gopayz"!==t&&(this.rspDetailsModel=this.rspTableInfoList.filter(t=>t.orderNo===e.orderNo),this.rspCountUsedAmountList=this.rspTableInfoList.filter(t=>t.ddaId===e.ddaId),this.rspDetailsModel.forEach(t=>{t.title=null==t?void 0:t.paymentMethodDisplay,"FPX"===(null==t?void 0:t.paymentMethodDisplay)&&"Y"===(null==t?void 0:t.isEmandate)&&(t.title="e-Mandate")}),this.showDdaBanner=!1,e.paymentMethod===Yt.PAYMENT_METHOD_DDA||e.paymentMethod===Yt.PAYMENT_METHOD_FPX)){this.showDdaBanner=!0;let t=0;
1this.rspCountUsedAmountList.forEach(e=>{"terminated"!==e.fundStatus&&(t+=e.amount)}),this.totalUsedAmount=t}}openTransactionModal(t){let e=this.etfTickerNoMap.get(t.sedolnumber+":"+t.exchange);e&&this.cdsAccount||this.router.navigate([M.o.APP,M.o.TRADE,M.o.STOCKS]),this.lsClient.getStatus()!==iu.a.CONNECTED&&this.connectLightStreamer(),this.ordPrice=0,this.symbol=e,this.transactType=Je.d.SELL,this.exchange=null==t?void 0:t.exchange,this.transactionModalVisible=!0}onActionChange(t,e){"sell"===t?this.openTransactionModal(e):this.openDdaModel(t,e)}resetActionValueToNull(){this.rspTableInfoList.map(t=>t.actionValue=null),this.rspDetailsModel.map(t=>t.actionValue=null)}onCloseReferralChannelPaymentModal(){this.showReferralChannelPaymentModal=!1}payNowClick(t){t.paymentMethod===h.a.GOPAYZ&&(this.modalTitle=`${h.a.GOPAYZ} - ${t.currencyCode}`,this.modalCurrency=t.currencyCode,this.modalPaymentAmount=t.totalAmount,this.showReferralChannelPaymentModal=!0)}onPayNowWithGoPayz(){this.referralChannelAction=Object(g.a)({refno:this.refno,token:this.store.selectSnapshot(T.a.getToken),callbackUrl:this.router.url.split("?")[0],actionUrl:`${tn.a.apiUrl}${rd.a.TRANSACTION+rd.a.GOPAYZ+rd.a.SUBSCRIPTION+rd.a.SEND}`})}closeRspDetails(){this.rspTableInfoList.map(t=>t.actionValue=null),this.rspDetailsModel.map(t=>t.actionValue=null),this.editMode=!1,this.terminateMode=!1,this.viewMode=!1,this.visibleChange.emit(),this.resetActionValueToNull(),this.openEditModal=!1}applyNewRsp(){this.isMobileDisplay?this.viewRspMenu=!0:this.router.navigate([M.o.APP,M.o.RSP,M.o.CREATE_RSP])}viewScheduleSellRecord(){this.router.navigate([M.o.APP,M.o.TRANSACTION_RECORD,M.o.PENDING],{queryParams:{refno:this.refno,from:M.q.RSP}})}changeIsReadMoreDisclaimer(){this.isReadMoreDisclaimer=!this.isReadMoreDisclaimer}getProductTypeColor(t){for(const e of this.productColour)if(t===e.label)return e.value}onCloseRspMenu(){this.viewRspMenu=!1}ngOnDestroy(){this.store.dispatch(new nu.b),this.lightstreamerService.destroyLightStreamer()}handleModalVisible(t){this.transactionModalVisible=t,this.resetActionValueToNull()}connectLightStreamer(){this.cdsAccount=this.accountService.cdsAccount,this.cdsAccount?this.initLightStreamerConnection():this.proceedtoRedirectHKEXFlag=!0}setEtfTickerNo(t){let e=t.sedolnumber+":"+t.exchange;this.etfTickerNoMap.has(e)||this.stocksInfoRestService.getTickerInfoByExchangeAndStockCode(t.exchange,t.sedolnumber).subscribe(t=>{t.status===M.a.RESPONSE_SUCCESS&&t.data&&this.etfTickerNoMap.set(e,t.data.tickerNo)})}headerNavigate(t){if(!t)return;if(null==t?void 0:t.runOutsideAngular)return void Object(at.a)(null==t?void 0:t.url);let e=[];e=Array.isArray(null==t?void 0:t.url)?[...null==t?void 0:t.url]:[null==t?void 0:t.url];const n=e[0].split("?");let i=n[0],c={};if(n.length>1){const t=n[1].split("&");for(let e of t){const t=e.split("=");c[t[0]]=t[1]}}Object.keys(c).length>0?this.router.navigate([i],{queryParams:c}):this.router.navigate([i])}searchProduct(){this.router.navigate([M.o.SEARCH])}showFepModal(t){this.isMobile$.subscribe(e=>{e||(this.fepBreached=t)})}extractAutoSweepCurrencyList(t){const e=new Set;return t.forEach(t=>{const n=null==t?void 0:t.autoSweepCurrency;n&&e.add(n)}),Array.from(e).filter(t=>"MYR"!==t)}getIconNameForCurrency(t){return this.cashSolutionService.getIconNameForCurrency(t)}isRspListContainNonAs(t){return(null==t?void 0:t.length)>0&&t.some(t=>t&&(null==t?void 0:t.paymentMethod)!==this.rspConstants.PAYMENT_METHOD_AUTO_SWEEP||"MYR"===t.autoSweepCurrency)}}return t.\u0275fac=function(e){return new(e||t)(z.lc(l.i),z.lc(C.a),z.lc(q.a),z.lc(z.j),z.lc(lt.a),z.lc(ht.a),z.lc(st.g),z.lc(St.b),z.lc(q.e),z.lc(cu.a),z.lc(ou.a),z.lc(eu.a),z.lc(A.a),z.lc(su.a))},t.\u0275cmp=z.fc({type:t,selectors:[["ng-component"]],features:[z.Tb([C.a,eu.a]),z.Rb],decls:37,vars:55,consts:[[4,"ngIf","ngIfElse"],["l","","class","w-100"],["actionOptionList",""],["editRspDetails",""],["terminateRspDetails",""],["noRecordTemplate",""],["loadingTemplate",""],["prefixIconSearch",""],["prefixIconFilter",""],["prefixIconClose",""],["investmentType","RSP Investment","primaryLabel","Apply Now","channelName","gopayz",3,"visible","refno","title","currencyCode","totalAmount","handleCancel","handlePrimaryClick"],[3,"referralChannelAction"],[3,"visible","paymentDetails","title","message","description","success","primaryLabel","handlePrimaryClick"],[3,"rsp
1DetailsModel","visible","editModalOpen","rspTableInfoList","visibleChange","refresh","onActionClick",4,"ngIf"],[3,"show","hideButtons","height","showChange"],[1,"text-md"],[1,"mt-4"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mt-4",4,"ngIf"],[1,"mt-4","pb-4"],["actionTemplate",""],[3,"isCalculator","lsClient","ordPrice","symbol","transactType","exchange","visible","isLsAlive","changeVisible"],["tableColCurrencyTpl",""],[4,"ngIf"],[1,"pt-2"],["nzLg","6","nzXs","18",1,"pr-3"],[1,"w-100",3,"nzPrefix","nzSuffix"],["nz-input","","placeholder","Search","type","text",3,"ngModel","ngModelChange"],["nzXs","6","nzLg","4","class","pr-3",4,"ngIf"],["nzXs","6","nzLg","5","class","pr-3",4,"ngIf"],["class","mt-4",3,"nzData","nzLoading","nzScroll","nzFrontPagination","nzShowPagination",4,"ngIf","ngIfElse"],[1,"mt-4","text-base"],["nzAlign","middle","nzJustify","left",1,"mb-2"],[3,"nzSpan"],[1,"text-sm"],[3,"nzVisible","nzWrapClassName","nzWidth","nzFooter","nzOnCancel"],[3,"ngTemplateOutlet"],[3,"showModal","refno","showModalChange"],["nzXs","6","nzLg","4",1,"pr-3"],[1,"w-100",3,"nzSuffixIcon","nzDropdownMatchSelectWidth","nzPlaceHolder"],["nzCustomContent",""],[3,"nzOnChange"],["class","p-2 d-block m-0 option-container","nz-checkbox","",3,"ngModel","nzValue","ngModelChange",4,"ngFor","ngForOf"],["nz-checkbox","",1,"p-2","d-block","m-0","option-container",3,"ngModel","nzValue","ngModelChange"],["nzXs","6","nzLg","5",1,"pr-3"],["nzDropdownClassName","option-container",1,"w-100",3,"nzSuffixIcon","nzPlaceHolder"],[1,"mt-4",3,"nzData","nzLoading","nzScroll","nzFrontPagination","nzShowPagination"],["rspTable",""],["nzSingleSort","",3,"nzSortChange"],["nzLeft","0px","nzShowSort","",2,"min-width","100px",3,"nzSortKey"],["nzLeft","90px","nzShowSort","",2,"min-width","200px",3,"nzSortKey"],["nzShowSort","",3,"nzSortKey"],["nzShowSort","",2,"min-width","90px",3,"nzSortKey"],["nzWidth","75px",1,"text-left"],[4,"ngFor","ngForOf"],["colspan","11",1,"subheader-blue"],["nzLeft","0px",3,"ngClass"],[1,"mr-1",3,"ngStyle"],["nzLeft","90px",3,"ngClass"],[3,"ngClass"],["class","border tag-pending-processing m-0",3,"nzColor",4,"ngIf"],["class","border tag-received m-0",3,"nzColor",4,"ngIf"],["class","border tag-terminated m-0",4,"ngIf"],[1,"text-xs","text-left",2,"min-width","130px",3,"ngClass"],["class","border tag-terminated m-0 mr-1",4,"ngFor","ngForOf"],[1,"border","tag-terminated","m-0","mr-1"],[1,"border","tag-pending-processing","m-0",3,"nzColor"],[1,"border","tag-received","m-0",3,"nzColor"],[1,"border","tag-terminated","m-0"],[1,"row-total"],["nzLeft","0px",1,"text-left","text-xs","font-weight-bold"],["colspan","3"],[1,"text-left","text-xs","font-weight-bold","total-amount"],[1,"py-2"],["colspan","6"],[3,"accounts","refno","menu"],[1,"px-3","pb-3","bg-white","mb-3"],["nzSpan","12"],[1,"m-0"],["nzSpan","12",1,"text-right"],[1,"font-weight-bold","m-0"],[1,"px-3","py-4","bg-white"],[1,"mb-4"],[1,"py-1","w-100"],["class","p-2 px-2 border rounded bg-white",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"w-100","px-3","pb-3","pt-4"],["nz-button","","nzBlock","","nzType","outline","class","my-1",3,"title","click",4,"ngIf"],["nz-button","","nzBlock","","nzType","primary",1,"my-1",3,"title","click"],[1,"p-2","px-2","border","rounded","bg-white",3,"ngClass","click"],[1,"border","m-0","mr-1",3,"nzColor","ngStyle"],["class","border tag-terminated m-0",3,"nzColor",4,"ngIf"],[1,"text-left",3,"nzSpan"],[1,"font-weight-bold"],["style","height:16px;",3,"nzSpan",4,"ngIf"],[1,"mt-3"],["class","font-weight-bold",4,"ngIf"],[1,"mt-2"],[1,"border-bottom"],[1,"py-2","text-left","text-sm"],[1,"border","tag-terminated","m-0",3,"nzColor"],[2,"height","16px",3,"nzSpan"],[1,"mr-1",3,"exchange"],[1,"font-weight-bold","m-0",2,"font-size","14px"],["nz-button","","nzBlock","","nzType","outline",1,"my-1",3,"title","click"],["class","w-100","nzShowSearch","","nzAllowClear","","nzAllowClear","","nzLabelPlaceholder","","nzPlaceHolder","Go To","nzSize","small",3,"nzDropdownMatchSelectWidth","ngModel","ngModelChange",4,"ngIf"],["nzShowSearch","","nzAllowClear","","nzAllowClear","","nzLabelPlaceholder","","nzPlaceHolder","Go To","nzSize","small",1,"w-100",3,"nzDropdownMatchSelectWidth","ngModel","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],[3,"nzLabel","nzValue"],[3,"rsp
1DetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange","showFepModal",4,"ngIf"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange","showFepModal"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange",4,"ngIf"],[3,"rspDetailsModel","showDdaBanner","totalUsedAmount","isLoading","actionType","visible","refresh","visibleChange"],["class","px-8",4,"ngIf"],[1,"px-8"],[1,"text-center","mt-3","pb-3"],[1,"img-fluid",3,"src"],[1,"text-md","font-weight-bold","py-2","mt-2"],["nz-col",""],["nz-button","","nzSize","small","nzType","primary",1,"text-sm",3,"title","routerLink","click"],[1,"container"],[3,"nzLoading","nzActive"],["nz-icon","","nzType","search",1,"text-md"],[1,"img-fluid",3,"alt","src"],["nz-icon","","nzTheme","outline","nzType","close",1,"pointer",3,"click"],[3,"rspDetailsModel","visible","editModalOpen","rspTableInfoList","visibleChange","refresh","onActionClick"],[3,"routerLink"],["nzType","flex","nzAlign","middle","nzJustify","left"],["nzSpan","4"],[1,"d-block",3,"src","alt","title"],["nzSpan","18"],[1,"py-1","text-base","text-black"],[1,"d-flex","align-items-center","text-uppercase"],["klass","mr-1 w-24px",3,"name",4,"ngIf"],["klass","mr-1 w-24px",3,"name"]],template:function(t,e){if(1&t&&(z.od(0,mh,5,6,"ng-container",0),z.od(1,yh,1,1,"ng-template",1,2,z.pd),z.od(3,vh,1,1,"ng-template",null,3,z.pd),z.od(5,Th,1,1,"ng-template",null,4,z.pd),z.od(7,zh,1,1,"ng-template",null,5,z.pd),z.od(9,qh,2,2,"ng-template",null,6,z.pd),z.od(11,Eh,1,0,"ng-template",null,7,z.pd),z.od(13,Ah,1,2,"ng-template",null,8,z.pd),z.od(15,Ph,1,0,"ng-template",null,9,z.pd),z.rc(17,"app-referral-channel-payment-modal",10),z.zc("handleCancel",(function(){return e.onCloseReferralChannelPaymentModal()}))("handlePrimaryClick",(function(){return e.onPayNowWithGoPayz()})),z.qc(),z.mc(18,"app-referral-channel-submit-form",11),z.rc(19,"app-payment-result-modal",12),z.zc("handlePrimaryClick",(function(t){return null==e.paymentResultHandlePrimaryClick?null:e.paymentResultHandlePrimaryClick.call(t)})),z.qc(),z.od(20,Rh,1,4,"rsp-details",13),z.rc(21,"app-mobile-scaffold"),z.rc(22,"b2c-mobile-drawer",14),z.zc("showChange",(function(){return e.onCloseRspMenu()})),z.rc(23,"div",15),z.qd(24,"Select the product you would like to apply for"),z.qc(),z.rc(25,"div",16),z.od(26,wh,1,0,"ng-container",17),z.qc(),z.od(27,Oh,2,9,"div",18),z.rc(28,"div",16),z.od(29,xh,1,0,"ng-container",17),z.qc(),z.rc(30,"div",19),z.od(31,Lh,1,0,"ng-container",17),z.qc(),z.qc(),z.od(32,kh,7,5,"ng-template",null,20,z.pd),z.qc(),z.rc(34,"app-stock-prehandle-transaction-modal-revamp",21),z.zc("changeVisible",(function(t){return e.handleModalVisible(t)})),z.qc(),z.od(35,_h,4,2,"ng-template",null,22,z.pd)),2&t){const t=z.ad(10),n=z.ad(33);z.Mc("ngIf",!e.isLoading)("ngIfElse",t),z.Ub(17),z.Mc("visible",e.showReferralChannelPaymentModal)("refno",e.refno)("title",e.modalTitle)("currencyCode",e.modalCurrency)("totalAmount",e.modalPaymentAmount),z.Ub(1),z.Mc("referralChannelAction",e.referralChannelAction),z.Ub(1),z.Mc("visible",e.showPaymentResultModal)("paymentDetails",e.paymentDetails)("title",e.paymentResultModalTitle)("message",e.paymentResultModalMessage)("description",e.paymentResultModalDescription)("success",e.paymentResultModalSuccess)("primaryLabel",e.paymentResultModalPrimaryLabel),z.Ub(1),z.Mc("ngIf",e.rspDetailsModel&&e.rspDetailsModel.length>0),z.Ub(2),z.Mc("show",e.viewRspMenu)("hideButtons",!0)("height",350),z.Ub(4),z.Mc("ngTemplateOutlet",n)("ngTemplateOutletContext",z.Sc(39,Bh,z.Vc(34,Ih,null==e.RouteConstant?null:e.RouteConstant.APP,null==e.RouteConstant?null:e.RouteConstant.RSP,null==e.RouteConstant?null:e.RouteConstant.CREATE_RSP,null==e.RouteConstant?null:e.RouteConstant.RSP_FUND_LIST))),z.Ub(1),z.Mc("ngIf",e.showRspEtf),z.Ub(2),z.Mc("ngTemplateOutlet",n)("ngTemplateOutletContext",z.Sc(46,Vh,z.Vc(41,Ih,null==e.RouteConstant?null:e.RouteConstant.APP,null==e.RouteConstant?null:e.RouteConstant.RSP,null==e.RouteConstant?null:e.RouteConstant.CREATE_RSP,null==e.RouteConstant?null:e.RouteConstant.RSP_DPMS_LIST))),z.Ub(2),z.Mc("ngTemplateOutlet",n)("ngTemplateOutletContext",z.Sc(53,Yh,z.Vc(48,Ih,null==e.RouteConstant?null:e.RouteConstant.APP,null==e.RouteConstant?null:e.RouteConstant.RSP,null==e.RouteConstant?null:e.RouteConstant.CREATE_RSP,null==e.RouteConstant?null:e.RouteConstant.CASH_ACCT_RSP))),z.Ub(3),z.Mc("isCalculator",e.isCalculator)("lsClient",e.lsClient)("ordPrice",e.ordPrice)("symbol",e.symbol)("transactType",e.transactType)("exchange",e.exchange)("visible",e.transactionModalVisible)("isLsAlive",e.isLivefeedAlive)}},directives:[P.t,pd.a,hd.a,fd.a,H.a,vt.a,P.A,au.a,R.a,V.c,V.a,Oc.c,st.c,Oc.b,st.t,st.w,yt.a,fo.a,Ht.d,Ht.a,ba.d,P.s,ba.a,Mt.a,Mt.f,Mt.g,Mt.e,Mt.c,Mt.d,P.q,P.w,s.a,dl.a,B,Uc.d,Uc.a,Y.a,Nc.a,Yu,q.f,kc.a,mt.b,pp,q.h,hp.m],pipes:[P.b,Qe.a,qr.a,P.G],styles:["::ng-deep .ant-select-dropdown-menu-item{background-color:transparent!important}.ant-table-tbody>tr:hover:not(.ant-table-expanded-row)>td.subheader-blue{background:#e8f2ff!important}.ant-table-tbody>tr:nth-child(2n)>td.ant-table-td-left-sticky.subheader-blue{background:#e8f2ff!important}.ant-table-tbody>tr:nth-child(odd)>td.ant-table-td-left-sticky.subheader-blue{background:#e8f2ff!important}.ant-table-tbody>tr>td.subheader-blue{background-color:#e8f2ff;font-weight:700}"],encapsulation:2}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),Object(d.c)([Object(l.e)(T.a.getShowRspAs)],t.prototype,"showRspAs$",void 0),t})();const jh=t=>{switch(t){case Yt.PAYMENT_METHOD_SALARY_ACCT:return"Salary Account";case Yt.PAYMENT_METHOD_CMF:return"Cash Management Fund";case Yt.PAYMENT_METHOD_TRUST_ACCOUNT:return"Cash Account";case Yt.PAYMENT_METHOD_DDA:return"Direct Debit (GIRO)";case Yt.PAYMENT_METHOD_GO_PAYZ:return"GoPayz";default:return t}};var $h=n("LhuC");function Gh(t,e){1&t&&z.nc(0)}function Wh(t,e){if(1&t&&(z.pc(0),z.rc(1,"div",7),z.mc(2,"img",8),z.qc(),z.rc(3,"h4",9),z.qd(4,"Your e-Mandate application has been received."),z.qc(),z.od(5,Gh,1,0,"ng-container",10),z.oc()),2&t){const t=z.Dc(2),e=z.ad(6);z.Ub(2),z.Mc("src",t.transactionImgPath+"successful.svg",z.gd),z.Ub(3),z.Mc("ngTemplateOutlet",e)}}function Xh(t,e){if(1&t&&(z.rc(0,"div",5),z.od(1,Wh,6,2,"ng-container",6),z.qc()),2&t){const t=z.Dc(),e=z.ad(4);z.Ub(1),z.Mc("ngIf",(null==t.paymentDetails?null:t.paymentDetails.debitStatusCode)===t.SUCCESS_STATUS_CODE)("ngIfElse",e)}}const Kh=function(){return{rows:10}};function Jh(t,e){1&t&&(z.rc(0,"div"),z.mc(1,"nz-skeleton",11),z.qc()),2&t&&(z.Ub(1),z.Mc("nzActive",!0)("nzParagraph",z.Rc(2,Kh)))}function Zh(t,e){if(1&t&&z.od(0,Jh,2,3,"div",6),2&t){const t=z.Dc(),e=z.ad(8);z.Mc("ngIf",t.isLoading)("ngIfElse",e)}}function Qh(t,e){1&t&&z.nc(0)}function tf(t,e){if(1&t&&(z.rc(0,"div",7),z.mc(1,"img",12),z.qc(),z.rc(2,"h6",13),z.qd(3," We regret to inform that this e-Mandate has failed to proceed. "),z.mc(4,"br"),z.qd(5," Please make other arrangements for payment. "),z.qc(),z.od(6,Qh,1,0,"ng-container",10)),2&t){const t=z.Dc(),e=z.ad(6);z.Ub(1),z.Mc("src",t.transactionImgPath+"error.svg",z.gd),z.Ub(5),z.Mc("ngTemplateOutlet",e)}}function ef(t,e){if(1&t){const t=z.sc();z.rc(0,"div",21),z.rc(1,"p",22),z.qd(2),z.qc(),z.rc(3,"button",23),z.zc("click",(function(){return z.dd(t),z.Dc(2).onDoneClick()})),z.qd(4,"If the page not responding, click here"),z.qc(),z.qc()}if(2&t){const t=z.Dc(2);z.Ub(2),z.sd("Please wait a moment, we will redirect you to RSP page to complete the application in ",t.countdown," seconds")}}function nf(t,e){if(1&t){const t=z.sc();z.rc(0,"div",24),z.rc(1,"button",25),z.zc("click",(function(){return z.dd(t),z.Dc(2).onDoneClick()})),z.qd(2,"Next"),z.qc(),z.qc()}}function cf(t,e){if(1&t&&(z.rc(0,"div",14),z.rc(1,"div",15),z.rc(2,"div",16),z.rc(3,"div",17),z.qd(4,"Account No."),z.qc(),z.rc(5,"div",18),z.qd(6),z.qc(),z.qc(),z.rc(7,"div",16),z.rc(8,"div",17),z.qd(9,"Bank Name"),z.qc(),z.rc(10,"div",18),z.qd(11),z.qc(),z.qc(),z.rc(12,"div",16),z.rc(13,"div",17),z.qd(14,"e-Mandate Payment Reference No"),z.qc(),z.rc(15,"div",18),z.qd(16),z.qc(),z.qc(),z.rc(17,"div",16),z.rc(18,"div",17),z.qd(19,"Payment Amount"),z.qc(),z.rc(20,"div",18),z.qd(21
1),z.Ec(22,"currency"),z.qc(),z.qc(),z.rc(23,"div",16),z.rc(24,"div",17),z.qd(25,"Transaction Date"),z.qc(),z.rc(26,"div",18),z.qd(27),z.Ec(28,"date"),z.qc(),z.qc(),z.od(29,ef,5,1,"div",19),z.od(30,nf,3,0,"div",20),z.qc(),z.qc()),2&t){const t=z.Dc();z.Ub(6),z.rd(null==t.paymentDetails?null:t.paymentDetails.buyerRefno),z.Ub(5),z.rd(null==t.paymentDetails?null:t.paymentDetails.buyerBankName),z.Ub(5),z.rd(null==t.paymentDetails?null:t.paymentDetails.fpxTransactionId),z.Ub(5),z.rd(z.Hc(22,7,null==t.paymentDetails?null:t.paymentDetails.transactionAmount,"MYR ","code")),z.Ub(6),z.rd(z.Gc(28,11,null==t.paymentDetails?null:t.paymentDetails.txDate,"dd MMM yyyy, hh:mm:ss a")),z.Ub(2),z.Mc("ngIf",t.isRspCreation),z.Ub(1),z.Mc("ngIf",!t.isRspCreation)}}function of(t,e){1&t&&(z.rc(0,"div",26),z.rc(1,"h6"),z.qd(2,"No Data Found!"),z.qc(),z.qc())}let sf=(()=>{class t{constructor(t,e,n,i,c,o){this.cdRef=t,this.router=e,this.paymentRestService=n,this.route=i,this.store=c,this.transactionService=o,this.fpxTransactionId=null,this.isLoading=!1,this.isRspCreation=!1,this.SUCCESS_STATUS_CODE="00",this.transactionImgPath=M.g.TRANSACTION_IMG_PATH}ngOnInit(){var t,e;this.route.queryParams.pipe(Object(f.a)(t=>{console.log("queryParams",t),t.fpxTransactionId&&(this.fpxTransactionId=t.fpxTransactionId,console.log("fpxTransactionId",this.fpxTransactionId))})).subscribe(),this.fpxTransactionId?this.getPaymentDetails():this.paymentDetails=null,!this.store.snapshot().trade.lastVisitedUrl||-1===(null===(t=this.store.snapshot().trade.lastVisitedUrl)||void 0===t?void 0:t.indexOf(M.o.RSP_FUND_LIST))&&-1===(null===(e=this.store.snapshot().trade.lastVisitedUrl)||void 0===e?void 0:e.indexOf(M.o.RSP_DPMS_LIST))||(this.isRspCreation=!0),console.log("before countdown"),this.countdownRedirection(5),console.log("after countdown")}ngOnChanges(t){this.fpxTransactionId?this.getPaymentDetails():this.paymentDetails=null}ngOnDestroy(){this.resetTimeout()}getPaymentDetails(){console.log("inside payment"),this.isLoading=!0,this.paymentRestService.findPaymentDetails(this.fpxTransactionId).subscribe(t=>{console.log(t),t&&$h.a.RESPONSE_SUCCESS===t.status&&(this.paymentDetails=t.data,this.cdRef.markForCheck(),console.log("this.paymentDetails",this.paymentDetails)),this.isLoading=!1})}onDoneClick(){var t;const e=this.store.snapshot().trade.lastVisitedUrl;this.transactionService.setLastVisitedUrl(this.router.url),this.isRspCreation?this.router.navigateByUrl(e):this.router.navigate([M.o.APP,M.o.RSP,M.o.DDA_FPX_LIST],{queryParams:{refno:null===(t=this.paymentDetails)||void 0===t?void 0:t.buyerRefno}})}countdownRedirection(t){this.countdown=t,this.interval=setInterval(()=>{this.countdown--},1e3),this.timeout=setTimeout(()=>{this.resetTimeout(),this.isRspCreation&&this.onDoneClick()},1e3*this.countdown)}resetTimeout(){this.interval&&clearInterval(this.interval),this.timeout&&clearTimeout(this.timeout)}}return t.\u0275fac=function(e){return new(e||t)(z.lc(z.j),z.lc(q.e),z.lc(Tt.a),z.lc(q.a),z.lc(l.i),z.lc(sn.a))},t.\u0275cmp=z.fc({type:t,selectors:[["ng-component"]],features:[z.Sb],decls:9,vars:2,consts:[["class","py-4",4,"ngIf","ngIfElse"],["loadingTemplate",""],["fpxFailedTemplate",""],["fpxDataTemplate",""],["noDataFound",""],[1,"py-4"],[4,"ngIf","ngIfElse"],[1,"text-center","mt-3"],["alt","transaction successful image",3,"src"],[1,"text-center","pb-2","pt-4"],[4,"ngTemplateOutlet"],[3,"nzActive","nzParagraph"],["alt","transaction error image",3,"src"],[1,"font-size-lg","text-center","mb-5"],[1,"row","mb-5","font-size-md"],[1,"col-lg-6","col-md-10","mx-auto"],[1,"row","py-3","border-bottom"],[1,"col-md-5","font-weight-bold"],[1,"col-md-7"],["class","py-3 w-100 text-center mt-4 mb-2 ",4,"ngIf"],["class","py-3 w-100 text-center",4,"ngIf"],[1,"py-3","w-100","text-center","mt-4","mb-2"],[1,"font-weight-bold","text-info"],["nz-button","","nzType","primary",1,"text-center",3,"click"],[1,"py-3","w-100","text-center"],["nz-button","","nzType","primary",1,"mt-4","mb-2","text-center",3,"click"],[1,"text-center"]],template:function(t,e){if(1&t&&(z.od(0,Xh,2,2,"div",0),z.od(1,Zh,1,2,"ng-template",null,1,z.pd),z.od(3,tf,7,2,"ng-template",null,2,z.pd),z.od(5,cf,31,14,"ng-template",null,3,z.pd),z.od(7,of,3,0,"ng-template",null,4,z.pd)),2&t){const t=z.ad(2);z.Mc("ngIf",e.paymentDetails)("ngIfElse",t)}},directives:[P.t,P.A,kc.a,Y.a],pipes:[P.d,P.f],encapsulation:2}),t})();const af=[{path:"",component:nt,children:[{path:M.o.RSP_LIST,component:Hh,data:{nav:{title:"Regular Savings Plan (RSP)"}}},{path:M.o.DDA_FPX_LIST,component:Nl,data:{nav:{title:"DDA / FPX Record"}}},{path:"",component:pp,data:{nav:{title:"Regular Savings Plan (RSP)"}}},{path:"",component:Yu,data:{nav:{title:"Regular Savings Plan (RSP)"}}},{path:"",component:Pe,data:{nav:{title:"DDA / FPX Record"}}},{path:"",component:Vt,data:{nav:{title:"DDA / FPX Record"}}},{path:M.o.EMANDATE_DONE_PAYMENT,component:sf,data:{nav:{title:"DDA / FPX Record"}}}]},{path:M.o.CREATE_RSP,component:id,children:[{path:"",pathMatch:"full",redirectTo:M.o.RSP_FUND_LIST},{path:M.o.RSP_FUND_LIST,component:al,data:{nav:{title:"Unit Trust RSP"}}},{path:M.o.RSP_DPMS_LIST,component:wi,data:{nav:{title:"Managed Portfolio RSP"}}},{path:M.o.CASH_ACCT_RSP,component:Ic,data:{nav:{title:"Cash Account RSP"}}},{path:M.o.RSP_ETF_LIST,component:Qn,data:{nav:{title:"ETFs RSP"}}}]},{path:M.o.CHECK_OUT,component:Qd,data:{nav:{title:"Check Out"}}}];let rf=(()=>{class t{}return t.\u0275mod=z.jc({type:t}),t.\u0275inj=z.ic({factory:function(e){return new(e||t)},imports:[[q.i.forChild(af)],q.i]}),t})();var lf=n("Fpuq"),df=n("sUoL"),uf=n("Vi40"),pf=n("m743"),hf=n("agyq"),ff=n("HoDC"),mf=n("Wrs7"),bf=n("04jP");let gf=(()=>{class t{}return t.\u0275mod=z.jc({type:t}),t.\u0275inj=z.ic({factory:function(e){return new(e||t)},providers:[C.a,bf.a],imports:[[i.a]]}),t})();var yf=n("D6yL"),Mf=n("rrvu"),vf=n("Usvm"),Cf=n("dCdb"),Tf=n("ztgm"),Sf=n("P2Ma"),Df=n("hnej"),zf=n("5wpl"),qf=n("GRZ8"),Ef=n("s8nw"),Af=n("Lduj"),Pf=n("6Ipm"),Rf=n("KtCy"),wf=n("6lUR"),Ff=n("9f+E"),If=n("gVlb"),Uf=n("glUe"),Of=n("PJ4w"),xf=n("8/jC"),Lf=n("udke"),kf=n("IBvL"),Nf=n("UeAZ"),_f=n("zGWC"),Bf=n("bE2y"),Vf=n("EGpF"),Yf=n("qAZ0"),Hf=n("KAwd"),jf=n("5vDB"),$f=n("0lU3"),Gf=n("Etcd"),Wf=n("4hBO"),Xf=n("7vlg"),Kf=n("ZE2D"),Jf=n("SKKP"),Zf=n("q0Us"),Qf=n("IvDN"),tm=n("z4wI"),em=n("yW9e"),nm=n("Ff2k"),im=n("jPNr"),cm=n("3/1E"),om=n("+oEP"),sm=n("W9fG"),am=n("tAs6"),rm=n("A07A"),lm=n("ncdi"),dm=n("eHCX"),um=n("D9mS"),pm=n("oWKy"),hm=n("SImc"),fm=n("52lY"),mm=n("ky+O"),bm=n("tQGG"),gm=n("qPyS"),ym=n("gWp5"),Mm=n("kkv0"),vm=n("/kkZ"),Cm=n("u1FJ"),Tm=n("kDAA"),Sm=n("N3zq"),Dm=n("9Or2"),zm=n("Q1wu"),qm=n("mV2b"),Em=n("/FSn");const Am=["firstOtpCode"];function Pm(t,e){1&t&&z.nc(0)}function Rm(t,e){if(1&t&&(z.rc(0,"span"),z.qd(1),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.rd(t.countdownOtp)}}function wm(t,e){if(1&t){const t=z.sc();z.rc(0,"button",9),z.zc("click",(function(){return z.dd(t),z.Dc(2).onSubmit()})),z.qd(1,"Submit"),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("nzLoading",t.isSubmitLoading)}}function Fm(t,e){if(1&t){const t=z.sc();z.rc(0,"nz-modal",3),z.zc("nzOnCancel",(function(){return z.dd(t),z.Dc().onHandleCancel()}))("nzVisibleChange",(function(e){return z.dd(t),z.Dc().show=e})),z.od(1,Pm,1,0,"ng-container",4),z.rc(2,"div",5),z.rc(3,"button",6),z.zc("click",(function(){return z.dd(t),z.Dc().onSendOtp()})),z.qd(4),z.od(5,Rm,2,1,"span",7),z.qc(),z.od(6,wm,2,1,"button",8),z.qc(),z.qc()}if(2&t){const t=z.Dc(),e=z.ad(6);z.Mc("nzVisible",t.show)("nzFooter",null)("nzMaskClosable",!t.isSubmitLoading)("nzWidth",t.width),z.Ub(1),z.Mc("ngTemplateOutlet",e),z.Ub(2),z.Mc("disabled",t.isDefaultBtnDisabled)("nzLoading",t.isSubmitLoading),z.Ub(1),z.sd(" ",t.defaultTxt," "),z.Ub(1),z.Mc("ngIf",t.isDefaultBtnDisabled),z.Ub(1),z.Mc("ngIf",t.prefixOtp)}}function Im(t,e){1&t&&z.nc(0)}function Um(t,e){if(1&t&&(z.rc(0,"span"),z.qd(1),z.qc()),2&t){const t=z.Dc(2);z.Ub(1),z.rd(t.countdownOtp)}}
1function Om(t,e){if(1&t){const t=z.sc();z.rc(0,"button",14),z.zc("click",(function(){return z.dd(t),z.Dc(2).onSubmit()})),z.qd(1,"Submit"),z.qc()}if(2&t){const t=z.Dc(2);z.Mc("nzLoading",t.isSubmitLoading)}}function xm(t,e){if(1&t){const t=z.sc();z.rc(0,"b2c-mobile-drawer",10),z.zc("showChange",(function(){return z.dd(t),z.Dc().onHandleCancel()}))("showChange",(function(e){return z.dd(t),z.Dc().show=e})),z.od(1,Im,1,0,"ng-container",4),z.rc(2,"div",11),z.rc(3,"button",12),z.zc("click",(function(){return z.dd(t),z.Dc().onSendOtp()})),z.qd(4),z.od(5,Um,2,1,"span",7),z.qc(),z.od(6,Om,2,1,"button",13),z.qc(),z.qc()}if(2&t){const t=z.Dc(),e=z.ad(6);z.Mc("show",t.show)("height",500)("hideButtons",!0),z.Ub(1),z.Mc("ngTemplateOutlet",e),z.Ub(2),z.Mc("disabled",t.isDefaultBtnDisabled)("nzLoading",t.isSubmitLoading),z.Ub(1),z.sd(" ",t.defaultTxt," "),z.Ub(1),z.Mc("ngIf",t.isDefaultBtnDisabled),z.Ub(1),z.Mc("ngIf",t.prefixOtp)}}function Lm(t,e){if(1&t&&(z.rc(0,"div",22),z.rc(1,"span",23),z.qd(2," Please enter below to verify your code. "),z.qc(),z.rc(3,"span",24),z.qd(4),z.qc(),z.qc()),2&t){const t=z.Dc(2);z.Ub(4),z.sd("TAC: ",t.prefixOtp,"")}}function km(t,e){1&t&&(z.rc(0,"nz-form-explain"),z.qd(1," Please make sure all the fields are entered. "),z.qc())}const Nm=function(t){return{"has-error":t}};function _m(t,e){if(1&t&&(z.rc(0,"form",25),z.rc(1,"nz-form-item",26),z.rc(2,"nz-form-control",27),z.rc(3,"div",28),z.mc(4,"input",29,30),z.mc(6,"input",31),z.mc(7,"input",31),z.mc(8,"input",31),z.mc(9,"input",31),z.mc(10,"input",31),z.qc(),z.rc(11,"div",32),z.rc(12,"span"),z.qd(13,"The TAC will be valid for 2 minutes"),z.qc(),z.qc(),z.od(14,km,2,0,"nz-form-explain",7),z.qc(),z.qc(),z.qc()),2&t){const t=z.Dc(2);z.Mc("formGroup",t.form),z.Ub(2),z.Mc("ngClass",z.Sc(9,Nm,t.invalidOtp||t.errorMsg)),z.Ub(2),z.Mc("formControl",t.firstCode),z.Ub(2),z.Mc("formControl",t.secondCode),z.Ub(1),z.Mc("formControl",t.thirdCode),z.Ub(1),z.Mc("formControl",t.fourthCode),z.Ub(1),z.Mc("formControl",t.fifthCode),z.Ub(1),z.Mc("formControl",t.sixthCode),z.Ub(4),z.Mc("ngIf",t.invalidOtp)}}function Bm(t,e){if(1&t&&(z.rc(0,"p",33),z.mc(1,"i",34),z.qd(2),z.qc()),2&t){const t=z.Dc(2);z.Ub(2),z.sd(" ",t.errorMsg," ")}}function Vm(t,e){if(1&t&&(z.rc(0,"div"),z.mc(1,"i",15),z.rc(2,"span",16),z.qd(3,"Enter TAC"),z.qc(),z.qc(),z.rc(4,"div",17),z.rc(5,"span"),z.rc(6,"p"),z.qd(7," For enhanced security, you are required to authorise the transaction by entering the Transaction-Authorisation-Code(TAC) sent to your registered mobile number. "),z.qc(),z.rc(8,"p",18),z.qd(9," Your Mobile Number for MFA-SMS TAC: "),z.rc(10,"strong"),z.qd(11),z.qc(),z.qc(),z.qc(),z.qc(),z.od(12,Lm,5,1,"div",19),z.rc(13,"div"),z.od(14,_m,15,11,"form",20),z.od(15,Bm,3,1,"p",21),z.qc()),2&t){const t=z.Dc();z.Ub(11),z.rd(t.contactNumber),z.Ub(1),z.Mc("ngIf",t.prefixOtp),z.Ub(2),z.Mc("ngIf",t.prefixOtp),z.Ub(1),z.Mc("ngIf",t.errorMsg)}}let Ym=(()=>{class t{constructor(t){this.fb=t,this.show=!1,this.contactNumber="",this.width="500",this.isSubmitLoading=!1,this.cancel=new z.s,this.submit=new z.s,this.resendOtp=new z.s,this.TXT_SEND_OTP="Send TAC",this.DEFAULT_OTP_COUNTDOWN=60,this.defaultTxt=this.TXT_SEND_OTP,this.countdownOtp=this.DEFAULT_OTP_COUNTDOWN,this.isDefaultBtnDisabled=!1}get prefixOtp(){return this._prefixOtp}set prefixOtp(t){t||this.resetCountdownTimer(),this.resetTacInputs(),this.form&&this.form.reset(),this.errorMsg="",this._prefixOtp=t}get invalidOtp(){return this.form.dirty&&this.form.hasError("otp")}get firstCode(){return this.form.get("firstCode")}get secondCode(){return this.form.get("secondCode")}get thirdCode(){return this.form.get("thirdCode")}get fourthCode(){return this.form.get("fourthCode")}get fifthCode(){return this.form.get("fifthCode")}get sixthCode(){return this.form.get("sixthCode")}onCancel(){this.cancel.emit()}ngOnInit(){this.form=this.initForm(),this.contactNumber=Object(qm.a)(null,this.contactNumber,!0)}initForm(){return this.fb.group({firstCode:[""],secondCode:[""],thirdCode:[""],fourthCode:[""],fifthCode:[""],sixthCode:[""]})}onHandleCancel(){this.cancel.emit()}
1onSubmit(){if(Object.keys(this.form.controls).forEach(t=>{this.form.get(t).value||this.form.setErrors({otp:!0})}),Object(zm.c)(this.form),this.form.invalid)return;let t="";Object.keys(this.form.controls).forEach(e=>{t+=this.form.get(e).value}),this.submit.emit(t)}onSendOtp(){this.isDefaultBtnDisabled=!0,this.defaultTxt="Resend OTP in",this.setCountdownTimer(),this.resendOtp.emit()}resetTacInputs(){this.form&&this.form.reset(),setTimeout(()=>{this.firstCodeInput&&this.firstCodeInput.nativeElement.focus()})}setCountdownTimer(){this.countdownOtp=this.DEFAULT_OTP_COUNTDOWN,this.countdownInterval=setInterval(()=>{this.countdownOtp--,this.countdownOtp<=0&&this.resetCountdownTimer()},1e3)}resetCountdownTimer(){clearInterval(this.countdownInterval),this.isDefaultBtnDisabled=!1,this.defaultTxt=this.TXT_SEND_OTP}}return t.\u0275fac=function(e){return new(e||t)(z.lc(st.g))},t.\u0275cmp=z.fc({type:t,selectors:[["transaction-tac-modal"]],viewQuery:function(t,e){var n;1&t&&z.yd(Am,!0),2&t&&z.Zc(n=z.Ac())&&(e.firstCodeInput=n.first)},inputs:{show:"show",contactNumber:"contactNumber",width:"width",errorMsg:"errorMsg",isSubmitLoading:"isSubmitLoading",prefixOtp:"prefixOtp"},outputs:{cancel:"cancel",submit:"submit",resendOtp:"resendOtp"},decls:7,vars:6,consts:[["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzMaskClosable","nzWidth","nzOnCancel","nzVisibleChange",4,"ngIf"],[3,"show","height","hideButtons","showChange",4,"ngIf"],["tacModal",""],["nzWrapClassName","vertical-center-modal",3,"nzVisible","nzFooter","nzMaskClosable","nzWidth","nzOnCancel","nzVisibleChange"],[4,"ngTemplateOutlet"],[1,"text-right"],["nz-button","","nzType","outline",3,"disabled","nzLoading","click"],[4,"ngIf"],["class","ml-2","nz-button","","nzType","primary",3,"nzLoading","click",4,"ngIf"],["nz-button","","nzType","primary",1,"ml-2",3,"nzLoading","click"],[3,"show","height","hideButtons","showChange"],[1,"fixed-bottom","bg-white","shadow","p-2","mt-3"],["nz-button","","nzType","outline",1,"w-100","my-1",3,"disabled","nzLoading","click"],["class","w-100 my-1","nz-button","","nzType","primary",3,"nzLoading","click",4,"ngIf"],["nz-button","","nzType","primary",1,"w-100","my-1",3,"nzLoading","click"],["nz-icon","","nzTheme","fill","nzType","exclamation-circle",1,"text-danger","d-inline-block","text-lg"],[1,"font-weight-bold","text-lg","ml-2"],[1,"my-3"],[1,"mb-4"],["class","text-center my-2",4,"ngIf"],["nz-form","","nzLayout","horizontal",3,"formGroup",4,"ngIf"],["class","text-danger text-center",4,"ngIf"],[1,"text-center","my-2"],[1,"d-block","mb-2"],[1,"d-block","font-weight-bold","mb-3"],["nz-form","","nzLayout","horizontal",3,"formGroup"],[1,"mr-0"],[1,"d-block","text-center",3,"ngClass"],[1,"otp-input-group","text-center"],["autofocus","","maxlength","1","moveNextByMaxLength","","nz-input","","inputmode","numeric","numberOnly","",1,"w-10","mx-1","px-1","text-center",3,"formControl"],["firstOtpCode",""],["maxlength","1","moveNextByMaxLength","","nz-input","","inputmode","numeric","numberOnly","",1,"w-10","mx-1","px-1","text-center",3,"formControl"],[1,"text-center","mt-2"],[1,"text-danger","text-center"],["nz-icon","","nzType","info-circle","nzTheme","fill"]],template:function(t,e){1&t&&(z.rc(0,"app-web-scaffold"),z.od(1,Fm,7,10,"nz-modal",0),z.Ec(2,"async"),z.qc(),z.od(3,xm,7,9,"b2c-mobile-drawer",1),z.Ec(4,"async"),z.od(5,Vm,16,4,"ng-template",null,2,z.pd)),2&t&&(z.Ub(1),z.Mc("ngIf",!z.Fc(2,2,e.isMobile$)),z.Ub(2),z.Mc("ngIf",z.Fc(4,4,e.isMobile$)))},directives:[R.a,P.t,yt.a,P.A,Y.a,vt.a,mt.b,st.J,st.u,Et.b,st.l,Et.e,Et.a,P.q,st.c,st.o,Em.a,Oc.b,gm.a,st.t,st.i,Et.c],pipes:[P.b],styles:[""]}),Object(d.c)([Object(l.e)(u.a.isMobile)],t.prototype,"isMobile$",void 0),t})();var Hm=n("dQG0"),jm=n("xrSI"),$m=n("jyh5"),Gm=n("FQWw"),Wm=n("ffUl"),Xm=n("Qw10"),Km=n("WeY1"),Jm=n("gp8a"),Zm=n("aRhN"),Qm=n("VOzt"),tb=n("99lv"),eb=n("LYtN"),nb=n("ihrV"),ib=n("3lBj"),cb=n("Y8lp"),ob=n("M+4m"),sb=n("1lTQ"),ab=n("BTs9"),rb=n("Q8cG"),lb=n("Wfee"),db=n("yNE/"),ub=n("Py9c"),pb=n("ZVAZ"),hb=n("xB20"),fb=n("F6ss"),mb=n("WCIo"),bb=n("KupA"),gb=n("L1u3"),yb=n("Mean"),Mb=n("OEtX"),vb=n("ix5O"),Cb=n("GuFl"),Tb=n("nxWG"),Sb=n("VXpv"),Db=n("Sw3D"),zb=n("Qvy4"),qb=n("LoXW"),Eb=n("X7hK"),Ab=n("E6DY"),Pb=n("+afG"),Rb=n("C0m5"),wb=n("Zl8n"),Fb=n("iJ4f"),Ib=n("xlLN"),Ub=n("HJEN"),Ob=n("+nfn"),xb=n("wc/p"),Lb=n("P7HQ"),kb=n("dbEZ"),Nb=n("UalG"),_b=n("zfHj"),Bb=n("CIl7"),Vb=n("TAZc"),Yb=n("vm/J"),Hb=n("CaJa"),jb=n("oeIT"),$b=n("kwXa"),Gb=n("5OP8"),Wb=n("TfYK"),Xb=n("4L+/"),Kb=n("WiZ8"),Jb=n("SuVu"),Zb=n("EbuA"),Qb=n("wgHo"),tg=n("F/iD"),eg=n("rOij"),ng=n("8X2B"),ig=n("Q8Sa"),cg=n("b/5o"),og=n("j8ld"),sg=n("yydM"),ag=n("4/aD"),rg=n("tOUG"),lg=n("felO"),dg=n("dMo0"),ug=n("Upbg"),pg=n("9uHM"),hg=n("JzwP"),fg=n("oWhb"),mg=n("rSnO"),bg=n("QjuO"),gg=n("dhz3"),yg=n("jSpI"),Mg=n("aP7/"),vg=n("tP4+"),Cg=n("lAKG"),Tg=n("uyr1"),Sg=n("fl3L"),Dg=n("mP9c"),zg=n("vevM"),qg=n("wzTc"),Eg=n("huJX"),Ag=n("daf/"),Pg=n("KCkE"),Rg=n("9xri"),wg=n("INA9"),Fg=n("z7AJ"),Ig=n("aU2I"),Ug=n("SS0W"),Og=n("LStC"),xg=n("a26+"),Lg=n("Bmzw"),kg=n("rcJz"),Ng=n("hCo1"),_g=n("LUwo"),Bg=n("3JPs"),Vg=n("sDks"),Yg=n("TnhN"),Hg=n("AW8i"),jg=n("azO4"),$g=n("xIeq"),Gg=n("uL2V"),Wg=n("J9tp"),Xg=n("F+OC"),Kg=n("t5vy"),Jg=n("GvI8"),Zg=n("z8gd"),Qg=n("7Y0h"),ty=n("OLi1"),ey=n("soTp"),ny=n("oX7C"),iy=n("yj0H"),cy=n("DghL"),oy=n("R/Np"),sy=n("cSGf"),ay=n("UD+I"),ry=n("TcCS"),ly=n("+9wz"),dy=n("maNI"),uy=n("TYsE"),py=n("baFZ"),hy=n("Nh4d"),fy=n("vKlF"),my=n("sXGq"),by=n("Rm4T");const gy=[hp.wb,hp.Zb,hp.rc,hp.x,hp.ib,hp.h,hp.u,hp.jc,hp.P,hp.pc,hp.tb,hp.Cb,hp.Ub,hp.E,hp.xb];let yy=(()=>{class t{constructor(t){this.b2cIconService=t,this.b2cIconService.registerIcons([...gy])}}return t.\u0275mod=z.jc({type:t}),t.\u0275inj=z.ic({factory:function(e){return new(e||t)(z.vc(hp.n))}
1,providers:[],imports:[[rf,i.a,c.h,l.d.forFeature([v.f]),lf.TransactionModule,gt.b,ut.b,ft.b,df.c,Es.b,uf.c,ff.a,mf.a,gf,o.e,s.b,a.a,Pt.b,pt.b,pf.b,r.c,yf.a,Mf.a,vf.a,Cf.a,Tf.a,hf.a,Sf.a,Df.a,hp.o,zf.a,qf.a,Ef.a]]}),t})();z.hd(wi,[q.j,q.f,q.h,q.g,q.l,Af.a,Pf.a,Rf.a,wf.a,Ff.a,H.a,R.a,If.a,Uf.a,Of.a,xf.a,Lf.a,kf.a,ll.a,Nf.a,_f.a,P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,st.J,st.y,st.I,st.c,st.z,st.C,st.a,st.F,st.G,st.B,st.t,st.u,st.E,st.p,st.o,st.A,st.b,st.d,st.i,st.l,st.j,st.m,st.f,st.w,st.x,st.v,V.a,V.c,Et.d,Et.f,Et.b,Et.e,Et.a,Et.c,Et.i,Et.h,Oc.b,Oc.c,Oc.a,Bf.b,Bf.a,Bf.c,w.a,w.b,w.d,w.c,w.f,Mt.a,Mt.e,Mt.d,Mt.f,Mt.c,Mt.g,Mt.h,Vf.a,kc.a,Yf.a,Hf.a,jf.a,Y.a,Y.b,ba.a,ba.b,ba.d,yt.a,yt.b,jt.a,jt.e,Uc.a,Uc.d,Uc.b,Uc.c,Uc.f,At.b,At.c,At.a,Ht.a,Ht.d,Ht.b,Ht.c,Ht.e,mt.b,$f.a,$f.d,$f.c,$f.f,$f.e,vt.a,xc.a,xc.d,xc.e,xc.c,r.b,r.a,Gf.a,Gf.b,s.a,pm.a,hm.a,fm.a,mm.a,bm.a,Lc.a,gm.a,ym.a,Mm.a,vm.a,Cm.a,Tm.a,Sm.a,c.b,c.c,c.f,c.i,c.d,c.g,c.a,c.e,Dm.a,As.a,co,Ge.a,Ym,md.a,Hm.a,jm.a,gt.a,ut.a,ft.a,df.b,df.a,Es.a,uf.a,uf.b,$m.a,Gm.a,Wm.a,Xm.a,Km.a,Jm.a,Zm.a,pd.a,fd.a,hd.a,ud.a,Qm.a,tb.a,eb.a,nb.a,ib.a,cb.a,ob.a,sb.a,ab.a,Em.a,qt,rb.a,rb.d,rb.f,rb.b,rb.c,o.c,o.b,o.d,o.a,o.f,Wf.a,lb.a,Xf.a,Xf.b,Kf.a,Jf.a,db.a,db.b,ub.c,ub.e,ub.f,ub.g,ub.h,ub.a,ub.b,Zf.a,Qf.c,Qf.a,pb.d,pb.c,pb.e,pb.a,pb.b,hb.a,hb.b,fb.a,tm.a,em.d,em.c,em.a,em.b,em.f,nm.a,nm.b,nm.c,mb.a,mb.d,mb.c,ao.w,im.c,im.j,im.h,im.d,im.i,im.e,im.f,im.b,im.a,cm.a,bb.a,bb.b,om.b,om.a,sm.a,gb.a,yb.a,yb.b,yb.c,yb.d,yb.f,yb.g,am.a,am.f,am.b,am.e,am.c,rm.b,rm.a,rm.d,Mb.b,Mb.a,vb.c,vb.a,lm.b,lm.a,ao.F,Cb.a,Tb.a,Tb.c,Sb.a,dm.c,dm.a,dm.b,um.a,ao.L,Pt.c,Pt.a,pt.a,pt.c,pf.a,Db.a,zb.a,qb.a,Eb.a,Ab.a,Pb.a,Rb.a,wb.a,Fb.a,Ib.a,Ub.a,Ob.a,xb.a,Lb.a,kb.a,Nb.a,_b.a,Bb.a,Vb.a,Yb.a,Hb.a,jb.a,$b.a,Gb.a,Wb.a,Xb.a,Kb.a,Jb.a,Zb.a,Qb.a,au.a,tg.a,eg.a,ng.a,ig.a,cg.a,og.a,sg.a,ag.a,rg.a,lg.a,dg.a,ug.a,pg.a,hg.a,Nc.a,fg.a,mg.a,bg.a,gg.a,yg.a,Mg.a,vg.a,Cg.a,Tg.a,Sg.a,Dg.a,zg.a,qg.a,Eg.a,Ag.a,Pg.a,Rg.a,wg.a,Fg.a,Ig.a,Ug.a,Og.a,xg.a,Lg.a,kg.a,ho.a,Ng.a,_g.a,Bg.a,dl.a,hf.d,hf.b,hf.e,hf.c,bd.a,Vg.a,Yg.a,Hg.a,jg.a,fo.a,$g.a,Gg.a,Wg.a,Xg.a,hp.m,hp.l,Kg.a,mo.a,Jg.a,Zg.a,Qg.a,ty.a,F.a,al,nt,wi,Nl,id,qs,$e,zr,Qd,ua,oe,Hh,Pe,Yu,ul,pp,Vt,sf,B,Ic,Qn,ar,ma],[P.b,P.H,P.p,P.k,P.F,P.g,P.D,P.G,P.d,P.f,P.i,P.j,P.l,Qe.a,ey.a,ny.a,iy.a,cy.a,oy.a,sy.a,ay.a,ry.a,ly.a,dy.a,uy.a,py.a,hy.a,fy.a,my.a,qr.a,by.d,hf.f]),z.hd(Ic,[q.j,q.f,q.h,q.g,q.l,Af.a,Pf.a,Rf.a,wf.a,Ff.a,H.a,R.a,If.a,Uf.a,Of.a,xf.a,Lf.a,kf.a,ll.a,Nf.a,_f.a,P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,st.J,st.y,st.I,st.c,st.z,st.C,st.a,st.F,st.G,st.B,st.t,st.u,st.E,st.p,st.o,st.A,st.b,st.d,st.i,st.l,st.j,st.m,st.f,st.w,st.x,st.v,V.a,V.c,Et.d,Et.f,Et.b,Et.e,Et.a,Et.c,Et.i,Et.h,Oc.b,Oc.c,Oc.a,Bf.b,Bf.a,Bf.c,w.a,w.b,w.d,w.c,w.f,Mt.a,Mt.e,Mt.d,Mt.f,Mt.c,Mt.g,Mt.h,Vf.a,kc.a,Yf.a,Hf.a,jf.a,Y.a,Y.b,ba.a,ba.b,ba.d,yt.a,yt.b,jt.a,jt.e,Uc.a,Uc.d,Uc.b,Uc.c,Uc.f,At.b,At.c,At.a,Ht.a,Ht.d,Ht.b,Ht.c,Ht.e,mt.b,$f.a,$f.d,$f.c,$f.f,$f.e,vt.a,xc.a,xc.d,xc.e,xc.c,r.b,r.a,Gf.a,Gf.b,s.a,pm.a,hm.a,fm.a,mm.a,bm.a,Lc.a,gm.a,ym.a,Mm.a,vm.a,Cm.a,Tm.a,Sm.a,c.b,c.c,c.f,c.i,c.d,c.g,c.a,c.e,Dm.a,As.a,co,Ge.a,Ym,md.a,Hm.a,jm.a,gt.a,ut.a,ft.a,df.b,df.a,Es.a,uf.a,uf.b,$m.a,Gm.a,Wm.a,Xm.a,Km.a,Jm.a,Zm.a,pd.a,fd.a,hd.a,ud.a,Qm.a,tb.a,eb.a,nb.a,ib.a,cb.a,ob.a,sb.a,ab.a,Em.a,qt,rb.a,rb.d,rb.f,rb.b,rb.c,o.c,o.b,o.d,o.a,o.f,Wf.a,lb.a,Xf.a,Xf.b,Kf.a,Jf.a,db.a,db.b,ub.c,ub.e,ub.f,ub.g,ub.h,ub.a,ub.b,Zf.a,Qf.c,Qf.a,pb.d,pb.c,pb.e,pb.a,pb.b,hb.a,hb.b,fb.a,tm.a,em.d,em.c,em.a,em.b,em.f,nm.a,nm.b,nm.c,mb.a,mb.d,mb.c,ao.w,im.c,im.j,im.h,im.d,im.i,im.e,im.f,im.b,im.a,cm.a,bb.a,bb.b,om.b,om.a,sm.a,gb.a,yb.a,yb.b,yb.c,yb.d,yb.f,yb.g,am.a,am.f,am.b,am.e,am.c,rm.b,rm.a,rm.d,Mb.b,Mb.a,vb.c,vb.a,lm.b,lm.a,ao.F,Cb.a,Tb.a,Tb.c,Sb.a,dm.c,dm.a,dm.b,um.a,ao.L,Pt.c,Pt.a,pt.a,pt.c,pf.a,Db.a,zb.a,qb.a,Eb.a,Ab.a,Pb.a,Rb.a,wb.a,Fb.a,Ib.a,Ub.a,Ob.a,xb.a,Lb.a,kb.a,Nb.a,_b.a,Bb.a,Vb.a,Yb.a,Hb.a,jb.a,$b.a,Gb.a,Wb.a,Xb.a,Kb.a,Jb.a,Zb.a,Qb.a,au.a,tg.a,eg.a,ng.a,ig.a,cg.a,og.a,sg.a,ag.a,rg.a,lg.a,dg.a,ug.a,pg.a,hg.a,Nc.a,fg.a,mg.a,bg.a,gg.a,yg.a,Mg.a,vg.a,Cg.a,Tg.a,Sg.a,Dg.a,zg.a,qg.a,Eg.a,Ag.a,Pg.a,Rg.a,wg.a,Fg.a,Ig.a,Ug.a,Og.a,xg.a,Lg.a,kg.a,ho.a,Ng.a,_g.a,Bg.a,dl.a,hf.d,hf.b,hf.e,hf.c,bd.a,Vg.a,Yg.a,Hg.a,jg.a,fo.a,$g.a,Gg.a,Wg.a,Xg.a,hp.m,hp.l,Kg.a,mo.a,Jg.a,Zg.a,Qg.a,ty.a,F.a,al,nt,wi,Nl,id,qs,$e,zr,Qd,ua,oe,Hh,Pe,Yu,ul,pp,Vt,sf,B,Ic,Qn,ar,ma],[P.b,P.H,P.p,P.k,P.F,P.g,P.D,P.G,P.d,P.f,P.i,P.j,P.l,Qe.a,ey.a,ny.a,iy.a,cy.a,oy.a,sy.a,ay.a,ry.a,ly.a,dy.a,uy.a,py.a,hy.a,fy.a,my.a,qr.a,by.d,hf.f]),z.hd(Qn,[q.j,q.f,q.h,q.g,q.l,Af.a,Pf.a,Rf.a,wf.a,Ff.a,H.a,R.a,If.a,Uf.a,Of.a,xf.a,Lf.a,kf.a,ll.a,Nf.a,_f.a,P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,st.J,st.y,st.I,st.c,st.z,st.C,st.a,st.F,st.G,st.B,st.t,st.u,st.E,st.p,st.o,st.A,st.b,st.d,st.i,st.l,st.j,st.m,st.f,st.w,st.x,st.v,V.a,V.c,Et.d,Et.f,Et.b,Et.e,Et.a,Et.c,Et.i,Et.h,Oc.b,Oc.c,Oc.a,Bf.b,Bf.a,Bf.c,w.a,w.b,w.d,w.c,w.f,Mt.a,Mt.e,Mt.d,Mt.f,Mt.c,Mt.g,Mt.h,Vf.a,kc.a,Yf.a,Hf.a,jf.a,Y.a,Y.b,ba.a,ba.b,ba.d,yt.a,yt.b,jt.a,jt.e,Uc.a,Uc.d,Uc.b,Uc.c,Uc.f,At.b,At.c,At.a,Ht.a,Ht.d,Ht.b,Ht.c,Ht.e,mt.b,$f.a,$f.d,$f.c,$f.f,$f.e,vt.a,xc.a,xc.d,xc.e,xc.c,r.b,r.a,Gf.a,Gf.b,s.a,pm.a,hm.a,fm.a,mm.a,bm.a,Lc.a,gm.a,ym.a,Mm.a,vm.a,Cm.a,Tm.a,Sm.a,c.b,c.c,c.f,c.i,c.d,c.g,c.a,c.e,Dm.a,As.a,co,Ge.a,Ym,md.a,Hm.a,jm.a,gt.a,ut.a,ft.a,df.b,df.a,Es.a,uf.a,uf.b,$m.a,Gm.a,Wm.a,Xm.a,Km.a,Jm.a,Zm.a,pd.a,fd.a,hd.a,ud.a,Qm.a,tb.a,eb.a,nb.a,ib.a,cb.a,ob.a,sb.a,ab.a,Em.a,qt,rb.a,rb.d,rb.f,rb.b,rb.c,o.c,o.b,o.d,o.a,o.f,Wf.a,lb.a,Xf.a,Xf.b,Kf.a,Jf.a,db.a,db.b,ub.c,ub.e,ub.f,ub.g,ub.h,ub.a,ub.b,Zf.a,Qf.c,Qf.a,pb.d,pb.c,pb.e,pb.a,pb.b,hb.a,hb.b,fb.a,tm.a,em.d,em.c,em.a,em.b,em.f,nm.a,nm.b,nm.c,mb.a,mb.d,mb.c,ao.w,im.c,im.j,im.h,im.d,im.i,im.e,im.f,im.b,im.a,cm.a,bb.a,bb.b,om.b,om.a,sm.a,gb.a,yb.a,yb.b,yb.c,yb.d,yb.f,yb.g,am.a,am.f,am.b,am.e,am.c,rm.b,rm.a,rm.d,Mb.b,Mb.a,vb.c,vb.a,lm.b,lm.a,ao.F,Cb.a,Tb.a,Tb.c,Sb.a,dm.c,dm.a,dm.b,um.a,ao.L,Pt.c,Pt.a,pt.a,pt.c,pf.a,Db.a,zb.a,qb.a,Eb.a,Ab.a,Pb.a,Rb.a,wb.a,Fb.a,Ib.a,Ub.a,Ob.a,xb.a,Lb.a,kb.a,Nb.a,_b.a,Bb.a,Vb.a,Yb.a,Hb.a,jb.a,$b.a,Gb.a,Wb.a,Xb.a,Kb.a,Jb.a,Zb.a,Qb.a,au.a,tg.a,eg.a,ng.a,ig.a,cg.a,og.a,sg.a,ag.a,rg.a,lg.a,dg.a,ug.a,pg.a,hg.a,Nc.a,fg.a,mg.a,bg.a,gg.a,yg.a,Mg.a,vg.a,Cg.a,Tg.a,Sg.a,Dg.a,zg.a,qg.a,Eg.a,Ag.a,Pg.a,Rg.a,wg.a,Fg.a,Ig.a,Ug.a,Og.a,xg.a,Lg.a,kg.a,ho.a,Ng.a,_g.a,Bg.a,dl.a,hf.d,hf.b,hf.e,hf.c,bd.a,Vg.a,Yg.a,Hg.a,jg.a,fo.a,$g.a,Gg.a,Wg.a,Xg.a,hp.m,hp.l,Kg.a,mo.a,Jg.a,Zg.a,Qg.a,ty.a,F.a,al,nt,wi,Nl,id,qs,$e,zr,Qd,ua,oe,Hh,Pe,Yu,ul,pp,Vt,sf,B,Ic,Qn,ar,ma],[P.b,P.H,P.p,P.k,P.F,P.g,P.D,P.G,P.d,P.f,P.i,P.j,P.l,Qe.a,ey.a,ny.a,iy.a,cy.a,oy.a,sy.a,ay.a,ry.a,ly.a,dy.a,uy.a,py.a,hy.a,fy.a,my.a,qr.a,by.d,hf.f])},izqA:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n("noTE");var i=n("ofXK"),c=n("tyNb"),o=n("OzZK"),s=n("FwiY"),a=n("M6vG"),r=n("fXoL");let l=(()=>{class t{}return t.\u0275mod=r.jc({type:t}),t.\u0275inj=r.ic({factory:function(e){return new(e||t)},providers:[],imports:[[i.c,c.i,o.c,s.c,a.a]]}),t})()},"jm/Y":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("xeZY"),c=n("fXoL"),o=n("tk/3"),s=n("31Y2");let a=(()=>{class t{constructor(t,e){this.http=t,this.paramService=e,this.BASE_URL=i.a.RSP,this.BASE_ETF_URL=i.a.ETF}createDdaFpxEmandate(t,e){const n=this.paramService.buildHttpParams({refno:t});return this.http.post(this.BASE_URL+i.a.PROTECTED+i.a.DDA_EMANDATE+i.a.CREATE,e,{params:n})}getDdaFpxList(t){const e=this.paramService.buildHttpParams({refno:t});return this.http.post(this.BASE_URL+i.a.PROTECTED+i.a.DDA_FPX_LIST+i.a.READ,{},{params:e})}getEmandateBankList(){return this.http.post(this.BASE_URL+i.a.PROTECTED+i.a.EMANDATE_BANK_LIST+i.a.READ,{},{})}get3YIrrReturn(t){return this.http.post(this.BASE_URL+i.a.READ_3Y_IRR_RETURN+i.a.READ,[{fundId:t}],{})}getEtfIrrReturn(t){const e=this.paramService.buildHttpParams({tickerNo:t});return this.http.post(this.BASE_URL+i.a.READ_ETF_IRR_RETURN+i.a.READ,[{}],{params:e})}getRspUtEtfList(){return this.http.get(this.BASE_URL+i.a.RSP_UT_ETF_LIST+i.a.READ,{})}simulateUtRspReturnRead(t,e,n,c){const o=this.paramService.buildHttpParams({sedolnumber:t,rspAmount:e,contributionFreq:c,period:n});return this.http.get(this.BASE_URL+i.a.SIMULATE_UT_RSP_RETURN+i.a.READ,{params:o})}simulateUtEtfReturnRead(t,e,n,c){let o="";
1c.forEach(t=>{t.checked&&(o+=t.value+",")});const s=this.paramService.buildHttpParams({tickerNo:t,rspAmt:e,startingDate:n,rspDayOfMonth:o.substring(0,o.length-1)});return this.http.post(this.BASE_ETF_URL+i.a.SIMULATE_ETF_RSP_RETURN,{},{params:s})}}return t.\u0275fac=function(e){return new(e||t)(c.vc(o.c),c.vc(s.a))},t.\u0275prov=c.hc({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},jmXi:function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n("t5pw");var i=n("ofXK"),c=n("Nqz0"),o=n("bE2y"),s=n("5vDB"),a=n("tyNb"),r=n("FwiY"),l=n("M6vG"),d=n("mn7V"),u=n("NMKc"),p=n("fXoL");let h=(()=>{class t{}return t.\u0275mod=p.jc({type:t}),t.\u0275inj=p.ic({factory:function(e){return new(e||t)},providers:[],imports:[[i.c,c.e,r.c,a.i,l.a,d.a,o.d,s.b,u.a]]}),t})()},of88:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n("+LO9");var i=n("ofXK"),c=n("nJia"),o=n("FwiY"),s=n("qAZ0"),a=n("jaXF"),r=n("fXoL");let l=(()=>{class t{}return t.\u0275mod=r.jc({type:t}),t.\u0275inj=r.ic({factory:function(e){return new(e||t)},providers:[],imports:[[i.c,c.b,o.c,s.b,a.a]]}),t})()},"pmm+":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("ofXK"),c=n("jPNr"),o=n("FwiY"),s=n("fXoL");let a=(()=>{class t{}return t.\u0275mod=s.jc({type:t}),t.\u0275inj=s.ic({factory:function(e){return new(e||t)},imports:[[i.c,c.g,o.c]]}),t})()},t5pw:function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var i=n("mrSG"),c=n("j+kT"),o=n("6h7t"),s=n("0HzO"),a=n("AcyG"),r=n("gFZo"),l=n("fXoL"),d=n("tyNb"),u=n("ofXK"),p=n("Nqz0"),h=n("Q8cG"),f=n("/ai0"),m=n("bE2y"),b=n("3Pt+"),g=n("HtrM"),y=n("5vDB");function M(t,e){1&t&&l.nc(0)}function v(t,e){if(1&t&&(l.pc(0),l.rc(1,"a",12),l.od(2,M,1,0,"ng-container",13),l.qc(),l.oc()),2&t){l.Dc(2);const t=l.ad(7),e=l.ad(11);l.Ub(1),l.Mc("nzDropdownMenu",t),l.Ub(1),l.Mc("ngTemplateOutlet",e)}}function C(t,e){1&t&&l.nc(0)}function T(t,e){if(1&t){const t=l.sc();l.pc(0),l.rc(1,"a",14),l.zc("click",(function(){return l.dd(t),l.Dc(2).isMobileSelectorVisible=!0})),l.od(2,C,1,0,"ng-container",13),l.qc(),l.oc()}if(2&t){l.Dc(2);const t=l.ad(11);l.Ub(2),l.Mc("ngTemplateOutlet",t)}}function S(t,e){if(1&t&&(l.pc(0),l.od(1,v,3,2,"ng-container",1),l.Ec(2,"async"),l.od(3,T,3,1,"ng-container",1),l.Ec(4,"async"),l.oc()),2&t){const t=l.Dc();l.Ub(1),l.Mc("ngIf",!l.Fc(2,2,t.isMobile$)),l.Ub(2),l.Mc("ngIf",l.Fc(4,4,t.isMobile$))}}function D(t,e){if(1&t&&l.mc(0,"p",15),2&t){const t=l.Dc();l.Mc("innerHTML",t.getActiveItemContent(),l.ed)}}function z(t,e){if(1&t&&(l.rc(0,"li",16),l.qd(1),l.qc()),2&t){const t=e.$implicit,n=l.Dc();l.Mc("routerLink",t.link)("queryParams",t.queryParams)("ngClass",n.activeItem===t.label?"ant-dropdown-menu-item-selected":""),l.Ub(1),l.sd(" ",t.label," ")}}function q(t,e){if(1&t&&(l.rc(0,"span",17),l.qd(1),l.qc(),l.mc(2,"uic-icon",18)),2&t){const t=l.Dc();l.Ub(1),l.sd(" ",t.activeItem,"")}}function E(t,e){1&t&&l.mc(0,"nz-divider",22)}function A(t,e){if(1&t&&(l.rc(0,"div",19),l.rc(1,"label",20),l.qd(2),l.qc(),l.od(3,E,1,0,"nz-divider",21),l.qc()),2&t){const t=e.$implicit,n=e.last;l.Mc("routerLink",t.link),l.Ub(1),l.Mc("nzValue",t.label)("routerLink",t.link),l.Ub(1),l.rd(t.label),l.Ub(1),l.Mc("ngIf",!n)}}const P=function(t){return{"five-columns":t}},R=["*"];let w=(()=>{class t{constructor(t){this.router=t,this.defaultActiveItem=s.a.FUND,this.defaultMobileActiveItem=s.a.FUND,this.itemGroup="ProductPage",this.isFiveColumnMobile=!1,this.isDropdownNeeded=!0,this.isDescriptionNeeded=!0,this.productItem=s.a,this.currentItems=[],this.isMobileSelectorVisible=!1,this.ProductPage=[{label:s.a.FUND,link:Object(c.a)(o.o.FUNDS),content:"Discover a diverse range of global unit trust funds, helping you find top opportunities in attractive markets, sectors, and asset classes to invest profitably."},{label:s.a.STOCK,link:Object(c.a)(o.o.STOCKS),content:"Discover Global Stocks from MY, US, HK, SG, China, and UK. Find Profitable Opportunities and Invest in Company Growth or Dividend Income."},{label:s.a.ETF,link:Object(c.a)(o.o.ETFS),content:"Discover a diverse range of global ETFs, with expert picks and curated collections to help you diversify, invest regularly, and grow your portfolio consistently."},{label:s.a.BOND,link:Object(c.a)(o.o.BONDS),content:"Discover a diverse range of global bonds in various currencies, with real-time trading, expert picks, and curated collections tailored to your investment goals."},{label:s.a.INSURANCE,link:Object(c.a)(o.o.INSURANCE),content:"Get protected at a lower cost with up to 30% insurance commission rebate and 0.25% sales charge discount on your future unit trust investments\u2014saving more to grow your wealth"}],this.BondTools=[{label:s.a.BOND_CALCULATOR,link:Object(c.a)(o.o.BONDS),content:"EBOnd calds dal bonds in various currencies, with real-time trading, expert picks, and curated collections tailored to your investment goals."},{label:s.a.STOCK,link:Object(c.a)(o.o.BONDS),content:"stock content."}],this.BondCalculatorTools=[{label:s.a.FUND_SWITCHING_CALCULATOR,link:Object(c.a)(o.o.FUNDS,o.o.TOOLS,o.o.SWITCHING_CALCULATOR),content:"Calculate the cost of switching funds."},{label:s.a.STOCK_CALCULATOR,link:Object(c.a)(o.o.STOCKS,o.o.TOOLS,o.o.STOCKS_CALCULATOR),content:"Calculate your costs for buying and selling stocks."},{label:s.a.ETF_CALCULATOR,link:Object(c.a)(o.o.ETFS,o.o.TOOLS,o.o.STOCKS_CALCULATOR),content:"Calculate your costs for buying and selling ETFs."},{label:s.a.RSP_CALCULATOR,link:Object(c.a)(o.o.RSP),queryParams:{fundid:"1877511"},content:"See how regular investments could have grown over time."},{label:s.a.BOND_RETURN_CALCULATOR,link:Object(c.a)(o.o.BONDS,o.o.BOND_TOOLS,o.o.BOND_CALCULATOR),content:"Calculate and know your bond returns easily before buying or selling."}],this.FundTools=[{label:s.a.STOCK,link:Object(c.a)(o.o.BONDS),content:"stock content."},{label:s.a.FUND,link:Object(c.a)(o.o.BONDS),content:"FUND content, and curated collections tailored to your investment goals."}]}ngOnInit(){this.setItemsGroup(this.itemGroup),this.activeItem=this.defaultActiveItem,this.defaultMobileActiveItem=this.defaultActiveItem}setItemsGroup(t){switch(t){case"ProductPage":this.currentItems=this.ProductPage;break;case"BondTools":this.currentItems=this.BondTools;break;
1case"FundTools":this.currentItems=this.FundTools;break;case"BondCalculatorTools":this.currentItems=this.BondCalculatorTools;break;default:this.currentItems=this.ProductPage}const e=this.currentItems.find(t=>t.label===this.defaultActiveItem);this.activeItem=e?this.defaultActiveItem:this.currentItems[0].label}getActiveItemContent(){const t=this.currentItems.find(t=>t.label===this.activeItem);return t?t.content:""}}return t.\u0275fac=function(e){return new(e||t)(l.lc(d.e))},t.\u0275cmp=l.fc({type:t,selectors:[["uic-product-button-wrapper"]],inputs:{defaultActiveItem:"defaultActiveItem",itemGroup:"itemGroup",isFiveColumnMobile:"isFiveColumnMobile",isDropdownNeeded:"isDropdownNeeded",isDescriptionNeeded:"isDescriptionNeeded"},ngContentSelectors:R,decls:18,vars:15,consts:[[1,"uic-product-button-wrapper"],[4,"ngIf"],["class"," t-xs sm:t-md",3,"innerHTML",4,"ngIf"],[1,"nav-wrapper",3,"ngClass"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","",3,"routerLink","queryParams","ngClass",4,"ngFor","ngForOf"],["selectorTpl",""],[3,"nzVisible","nzClosable","nzMaskClosable","nzFooter","isMobileFullScreen","nzOnCancel"],[1,"mb-0","t-xl","pb-12px","font-weight-bold"],[1,"black-radio","radio-right",3,"ngModel","ngModelChange"],["class","d-flex flex-column w-100",3,"routerLink",4,"ngFor","ngForOf"],["nz-dropdown","","nzOverlayClassName","product-select-dropdown",3,"nzDropdownMenu"],[4,"ngTemplateOutlet"],["nz-dropdown","",3,"click"],[1,"t-xs","sm:t-md",3,"innerHTML"],["nz-menu-item","",3,"routerLink","queryParams","ngClass"],[1,"dropdown-title","t-2xl"],["type","interface-icon/arrow-down-o",1,"dropdown-icon"],[1,"d-flex","flex-column","w-100",3,"routerLink"],["nz-radio","",1,"pt-16px","pb-16px","t-md",3,"nzValue","routerLink"],["class","my-0",4,"ngIf"],[1,"my-0"]],template:function(t,e){1&t&&(l.Lc(),l.rc(0,"div",0),l.od(1,S,5,6,"ng-container",1),l.od(2,D,1,1,"p",2),l.rc(3,"div",3),l.Ec(4,"async"),l.Kc(5),l.qc(),l.rc(6,"nz-dropdown-menu",null,4),l.rc(8,"ul",5),l.od(9,z,2,4,"li",6),l.qc(),l.qc(),l.qc(),l.od(10,q,3,1,"ng-template",null,7,l.pd),l.rc(12,"ui-modal-pc-drawer-mobile",8),l.zc("nzOnCancel",(function(){return e.isMobileSelectorVisible=!1})),l.rc(13,"p",9),l.qd(14,"Select"),l.qc(),l.rc(15,"nz-radio-group",10),l.zc("ngModelChange",(function(t){return e.defaultMobileActiveItem=t})),l.pc(16),l.od(17,A,4,5,"div",11),l.oc(),l.qc(),l.qc()),2&t&&(l.Ub(1),l.Mc("ngIf",e.isDropdownNeeded),l.Ub(1),l.Mc("ngIf",e.isDescriptionNeeded),l.Ub(1),l.Mc("ngClass",l.Sc(13,P,l.Fc(4,11,e.isMobile$)&&e.isFiveColumnMobile)),l.Ub(6),l.Mc("ngForOf",e.currentItems),l.Ub(3),l.Mc("nzVisible",e.isMobileSelectorVisible)("nzClosable",!1)("nzMaskClosable",!0)("nzFooter",null)("isMobileFullScreen",!1),l.Ub(3),l.Mc("ngModel",e.defaultMobileActiveItem),l.Ub(2),l.Mc("ngForOf",e.currentItems))},directives:[u.t,u.q,p.f,h.a,u.s,f.a,m.c,b.t,b.w,p.a,p.d,u.A,h.d,d.f,g.a,m.b,y.a],pipes:[u.b],styles:[".uic-product-button-wrapper[_ngcontent-%COMP%]{text-align:center}.uic-product-button-wrapper[_ngcontent-%COMP%] .dropdown-title[_ngcontent-%COMP%]{color:var(--black);text-align:center;font-style:normal;font-weight:600;line-height:normal;font-family:var(--font-family-display-title)}.uic-product-button-wrapper[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{margin-left:5px;vertical-align:3px}.uic-product-button-wrapper[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{padding-top:24px;padding-bottom:24px;color:var(--color-content-tertiary);text-align:center;font-style:normal;font-weight:400;font-size:14px;line-height:normal;max-width:800px;margin:0 auto}.uic-product-button-wrapper[_ngcontent-%COMP%] .ant-dropdown-menu[_ngcontent-%COMP%] .ant-dropdown-menu-item[_ngcontent-%COMP%]{color:var(--black)}.uic-product-button-wrapper[_ngcontent-%COMP%] .nav-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);justify-content:center;row-gap:24px}@media (min-width:650px){.uic-product-button-wrapper[_ngcontent-%COMP%] .nav-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:16px}}.uic-product-button-wrapper[_ngcontent-%COMP%] .nav-wrapper.five-columns[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}"]}),Object(i.c)([Object(a.e)(r.a.isMobile)],t.prototype,"isMobile$",void 0),t})()},xrSI:function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var i=n("mrSG"),c=n("fXoL"),o=n("AcyG"),s=n("gFZo"),a=n("dEAy"),r=n("ofXK"),l=n("FwiY");function d(t,e){1&t&&c.nc(0)}function u(t,e){if(1&t&&(c.pc(0),c.od(1,d,1,0,"ng-container",4),c.oc()),2&t){c.Dc();const t=c.ad(5);c.Ub(1),c.Mc("ngTemplateOutlet",t)}}function p(t,e){1&t&&c.nc(0)}function h(t,e){if(1&t&&(c.pc(0),c.od(1,p,1,0,"ng-container",4),c.oc()),2&t){c.Dc();const t=c.ad(7);c.Ub(1),c.Mc("ngTemplateOutlet",t)}}function f(t,e){if(1&t){const t=c.sc();c.rc(0,"div",5),c.mc(1,"i",6),c.qc(),c.rc(2,"h4"),c.qd(3),c.qc(),c.rc(4,"div",7),c.qd(5),c.qc(),c.rc(6,"div",8),c.rc(7,"button",9),c.zc("click",(function(){return c.dd(t),c.Dc().onClose()})),c.qd(8,"OK"),c.qc(),c.qc()}if(2&t){const t=c.Dc();c.Ub(3),c.rd(t.title),c.Ub(2),c.rd(t.body)}}function m(t,e){if(1&t){const t=c.sc();c.rc(0,"div",5),c.mc(1,"i",6),c.qc(),c.rc(2,"h4"),c.qd(3),c.qc(),c.rc(4,"div",7),c.qd(5),c.qc(),c.rc(6,"div",8),c.rc(7,"button",9),c.zc("click",(function(){return c.dd(t),c.Dc().onClose()})),c.qd(8,"OK"),c.qc(),c.qc()}if(2&t){const t=c.Dc();c.Ub(3),c.rd(t.title),c.Ub(2),c.rd(t.body)}}let b=(()=>{class t{constructor(){this.showTradeRestrictionWarning=!1,this.contactDealer=new c.s,this.tradeRestrictionModalClose=new c.s,this.title="",this.body=""}ngOnChanges(t){t.showTradeRestrictionWarning&&this.setContentsBasedOnActionType()}setContentsBasedOnActionType(){"buy"===this.actionType?(this.title="IPO Shares Allotted",this.body="Your shares have been successfully allotted and reflected in your holdings. Trading will be available once the shares are officially listed on the exchange."):"sell"===this.actionType&&(this.title="Pending CDS Transfer",this.body="Your shares are currently held in your Individual CDS account. You'll be able to trade online once they are transferred to your Nominee CDS account. In the meantime, you may contact our dealer to place a trade.")}onClose(){this.showTradeRestrictionWarning=!1,this.tradeRestrictionModalClose.emit(this.showTradeRestrictionWarning)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=c.fc({type:t,selectors:[["app-ipo-trade-restriction-modal"]],inputs:{showTradeRestrictionWarning:"showTradeRestrictionWarning",actionType:"actionType"},outputs:{contactDealer:"contactDealer",tradeRestrictionModalClose:"tradeRestrictionModalClose"},features:[c.Sb],decls:8,vars:7,consts:[["nzWrapClassName","vertical-center-modal",3,"nz
1Visible","nzFooter","nzWidth","nzVisibleChange","nzOnCancel"],[4,"ngIf"],["ipoSharesAllotted",""],["pendingCdsTranfer",""],[4,"ngTemplateOutlet"],[1,"ant-row-flex",2,"justify-content","center","margin-top","4px"],["nz-icon","","nzType","exclamation-circle","nzTheme","fill",1,"text-warning","mr-2",2,"font-size","80px"],[1,"text-14px"],[1,"justify-content-end","mt-4",2,"display","flex","flex-direction","row","gap","8px"],[1,"ant-btn-primary","mr-2","text-12px","font-weight-bold","pointer",2,"border-radius","360px","background","black",3,"click"]],template:function(t,e){1&t&&(c.rc(0,"nz-modal",0),c.zc("nzVisibleChange",(function(t){return e.showTradeRestrictionWarning=t}))("nzOnCancel",(function(){return e.onClose()})),c.Ec(1,"async"),c.od(2,u,2,1,"ng-container",1),c.od(3,h,2,1,"ng-container",1),c.qc(),c.od(4,f,9,2,"ng-template",null,2,c.pd),c.od(6,m,9,2,"ng-template",null,3,c.pd)),2&t&&(c.Mc("nzVisible",e.showTradeRestrictionWarning)("nzFooter",null)("nzWidth",c.Fc(1,5,e.isMobile$)?"345px":"550px"),c.Ub(2),c.Mc("ngIf","buy"===e.actionType),c.Ub(1),c.Mc("ngIf","sell"===e.actionType))},directives:[a.a,r.t,r.A,l.b],pipes:[r.b],encapsulation:2}),Object(i.c)([Object(o.e)(s.a.isMobile)],t.prototype,"isMobile$",void 0),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.