1"use strict";(self.webpackChunkcore_web=self.webpackChunkcore_web||[]).push([["default-dist_libs_ng_ui-products-listing_fesm2022_frk-ng-ui-products-listing_mjs"],{7613:(Ce,B,m)=>{m.d(B,{A:()=>Ie});var P=m(54909);var u=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const se=function q(k){return u.test(k)};var ie="\\ud800-\\udfff",oe="["+ie+"]",J="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",U="\\ud83c[\\udffb-\\udfff]",le="[^"+ie+"]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",de="[\\ud800-\\udbff][\\udc00-\\udfff]",ue="(?:"+J+"|"+U+")?",pe="[\\ufe0e\\ufe0f]?",be=pe+ue+"(?:\\u200d(?:"+[le,ce,de].join("|")+")"+pe+ue+")*",ye="(?:"+[le+J+"?",J,ce,de,oe].join("|")+")",Re=RegExp(U+"(?="+U+")|"+ye+be,"g");const we=function Fe(k){return se(k)?function xe(k){return k.match(Re)||[]}(k):function ne(k){return k.split("")}(k)};var ee=m(16325);const Ie=function ke(k){return function(O){O=(0,ee.A)(O);var $=se(O)?we(O):void 0,Q=$?$[0]:O.charAt(0),Me=$?function Y(k,O,$){var Q=k.length;return $=void 0===$?Q:$,!O&&$>=Q?k:(0,P.A)(k,O,$)}($,1).join(""):O.slice(1);return Q[k]()+Me}}("toUpperCase")},37387:(Ce,B,m)=>{m.r(B),m.d(B,{PpssComponent:()=>$a,PpssExcelDownloadService:()=>We,SelectRowCellRendererComponent:()=>Ze,SfdrProductListingComponent:()=>it,SfdrProductTypeListingComponent:()=>Ha,TableColdefService:()=>ge,TableFilterStateService:()=>V,TrendingAndTopRatedProductsComponent:()=>Ua,mapProductListToSfdrSection:()=>ot});var P=m(42733),Y=m(25044),e=m(71326),y=m(58257),I=m(93143),M=m(30831),C=m(4364),S=m(92201),N=m(39687),x=m(20358),u=m(64193),q=m(38327),se=m(64678),ne=m(61651),ve=m(83344),ie=m(77179),K=m(20383),j=m(15834),H=m(29892),Se=m(50467),Te=m(83152),oe=m(7700),J=m(76631),U=m(57836),De=m(84218),le=m(91747);const ue=function _e(s){return s!=s},xe=function Re(s,o){return!(null==s||!s.length)&&function be(s,o,t){return o==o?function pe(s,o,t){for(var r=t-1,a=s.length;++r<a;)if(s[r]===o)return r;return-1}(s,o,t):function ce(s,o,t,r){for(var a=s.length,n=t+(r?1:-1);r?n--:++n<a;)if(o(s[n],n,s))return n;return-1}(s,ue,t)}(s,o,0)>-1},Fe=function Ae(s,o,t){for(var r=-1,a=null==s?0:s.length;++r<a;)if(t(o,s[r]))return!0;return!1};var we=m(23936),ee=m(67104),ke=m(63615),Ee=m(90788);const k=ee.A&&1/(0,Ee.A)(new ee.A([,-0]))[1]==1/0?function(s){return new ee.A(s)}:ke.A,Q=function $(s,o,t){var r=-1,a=xe,n=s.length,i=!0,l=[],c=l;if(t)i=!1,a=Fe;else if(n>=200){var d=o?null:k(s);if(d)return(0,Ee.A)(d);i=!1,a=we.A,c=new le.A}else c=o?[]:l;e:for(;++r<n;){var p=s[r],g=o?o(p):p;if(p=t||0!==p?p:0,i&&g==g){for(var v=c.length;v--;)if(c[v]===g)continue e;o&&c.push(g),l.push(p)}else a(c,g,t)||(c!==l&&c.push(g),l.push(p))}return l};var Z=m(86475),ut=m(12679);const f=(0,m(41680).A)(function(s,o,t){(0,ut.A)(s,o,t)});var Xe=m(7613),He=m(53265),ht=m(69406),z=m(49703),F=m(19376),fe=m(43498),Ue=m(85518),Ct=m(90459),$e=m(30227),he=m(64759),vt=m(92720),St=m(2959);function Tt(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-sticky-footer",4),e.bIt("buttonAction",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.addSelectedToCart())}),e.k0s()}if(2&s){const t=e.XpG();e.Y8G("stickyConfig",t.stickyFooterConfig())("buttons",t.stickyFooterButtons())}}function Dt(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-email-modal",5),e.bIt("checkBoxChange",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.deleteSelectedDocuments(a))})("closeModal",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.closeModalType(a))}),e.k0s()}if(2&s){const t=e.XpG();e.Y8G("selectedDocuments",t.selectedDocuments())("docIds",t.selectedDocumentDocIds())("showDocumentNotifications",t.showDocumentNotifications())}}function _t(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-download-modal",6),e.bIt("checkBoxChange",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.deleteSelectedDocuments(a))})("closeModal",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.closeModalType(a))}),e.k0s()}if(2&s){const t=e.XpG();e.Y8G("docIds",t.selectedDocumentDocIds())("selectedDocuments",t.selectedDocuments())("showDocumentNotifications",t.showDocumentNotifications())}}function Pt(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-cart-modal",7),e.bIt("removeItemsFromCart",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.removeItemsFromCart(a))})("emptyDocsCart",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.emptyDocsCart())})("closeModal",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.closeModalType(a))}),e.k0s()}if(2&s){const t=e.XpG();e.Y8G("config",t.config())("cartDocuments",t.cartDocuments())}}const bt=["productSelector"],yt=["filterDrawer"],Rt=["filterToggle"],xt=s=>({isActive:s}),Qe=(s,o)=>o.id,At=(s,o)=>o.val;function Ft(s,o){if(1&s){const t=e.RV6();e.j41(0,"li",32)(1,"button",33),e.bIt("click",function(){const a=e.eBV(t).$implicit,n=e.XpG(2);return e.Njj(n.onProductTypeChange(a))}),e.EFF(2),e.k0s()()}if(2&s){const t=o.$implicit;e.R7$(2),e.SpI(" ",t," ")}}function wt(s,o){if(1&s&&(e.j41(0,"menu",14)(1,"ul",30)(2,"li",31),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.Z7z(5,Ft,3,1,"li",32,e.Vm6),e.k0s()()),2&s){const t=e.XpG();e.R7$(3),e.SpI(" ",e.bMT(4,1,"products.product-type-select")," "),e.R7$(2),e.Dyx(t.productTypes())}}function kt(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",39,2)(2,"label",41)(3,"button",42),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onFilterDrawerToggle("open"))}),e.nrm(4,"frk-heroicon",43),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()}2&s&&(e.R7$(5),e.SpI(" ",e.bMT(6,1,"products.ppss-filter-filters")," "))}function Et(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",40)(1,"label",44),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"frk-toggle",45),e.bIt("toggleActive",function(a){e.eBV(t);const n=e.XpG(2);return e.Njj(n.onToggleFilter("watchlist",a))}),e.k0s()()}if(2&s){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"products.ppss-view")),e.R7$(2),e.Y8G("useDarkTheme",!0)("toggleButtons",t.watchListToggles())}}function Nt(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",34),e.nrm(1,"frk-heroicon",35),e.j41(2,"label",36)(3,"span",13),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"input",37),e.nI1(7,"translate"),e.bIt("keyup",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.onSearchFilter(a))}),e.k0s()()(),e.j41(8,"div",38),e.DNE(9,kt,7,3,"div",39)(10,Et,5,5,"div",40),e.k0s()}if(2&s){const t=e.XpG();e.R7$(),e.Y8G("size",16),e.R7$(3),e.JRh(e.bMT(5,6,"products.portfolio-holdings-search-box-placeholder")),e.R7$(2),e.Y8G("value",t.selectPreText())("placeholder",e.bMT(7,8,"products.portfolio-holdings-search-box-placeholder")),e.R7$(3),e.vxM(t.selectFilters().length?9:-1),e.R7$(),e.vxM(t.showWatchlistToggle&&t.watchListToggles().length?10:-1)}}function It(s,o){1&s&&(e.j41(0,"div",18)(1,"div",34),e.nrm(2,"div",46),e.k0s(),e.j41(3,"div",47),e.nrm(4,"div",48)(5,"div",49),e.k0s()())}function Mt(s,o){if(1&s){const t=e.RV6();
1e.j41(0,"li",54),e.EFF(1),e.nI1(2,"translate"),e.j41(3,"label",55)(4,"button",56),e.bIt("click",function(){const a=e.eBV(t).$implicit,n=e.XpG(2);return e.Njj(n.onApplyFilters("select",{id:a.id,options:[a.option],action:"remove"}))}),e.nrm(5,"frk-heroicon",57),e.j41(6,"span",13),e.EFF(7),e.nI1(8,"translate"),e.k0s()()()()}if(2&s){const t=o.$implicit;e.R7$(),e.SpI(" ","SFDR"===t.id?e.bMT(2,3,"products.filter-sfdr-label-article_"+t.option):t.option," "),e.R7$(4),e.Y8G("size",20),e.R7$(2),e.JRh(e.bMT(8,5,"products.ppss-filter-remove-filter"))}}function $t(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",5)(1,"div",50)(2,"label",51)(3,"button",52),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.onClearFilters())}),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"ul",53),e.Z7z(7,Mt,9,7,"li",54,e.Vm6),e.k0s()()()}if(2&s){const t=e.XpG();e.R7$(4),e.SpI(" ",e.bMT(5,1,"products.ppss-clear-filters")," "),e.R7$(3),e.Dyx(t.selectedChips())}}function Lt(s,o){if(1&s){const t=e.RV6();e.j41(0,"li",64)(1,"div",65)(2,"label",66)(3,"input",67),e.bIt("change",function(a){const n=e.eBV(t).$implicit,i=e.XpG().$implicit,l=e.XpG();return e.Njj(l.onSelectFilter(a,i.id,n.val))}),e.k0s(),e.j41(4,"span",68),e.qSk(),e.j41(5,"svg",69),e.nrm(6,"path",70),e.k0s()(),e.joV(),e.j41(7,"span",71),e.EFF(8),e.nI1(9,"translate"),e.k0s()()()()}if(2&s){const t=o.$implicit,r=e.XpG().$implicit;e.R7$(3),e.Y8G("checked",t.isChecked),e.R7$(5),e.JRh("SFDR"===r.id?e.bMT(9,2,"products.filter-sfdr-label-article_"+t.val):t.val)}}function Gt(s,o){if(1&s){const t=e.RV6();e.j41(0,"details",58,3),e.bIt("click",function(){e.eBV(t);const a=e.sdS(1),n=e.XpG();return e.Njj(n.filterDetailsClickHandler(a))})("keydown",function(){e.eBV(t);const a=e.sdS(1),n=e.XpG();return e.Njj(n.filterDetailsClickHandler(a))}),e.j41(2,"summary",59)(3,"span",60),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"span",61),e.nrm(7,"frk-heroicon",62),e.k0s()(),e.j41(8,"menu",63)(9,"ul",30),e.Z7z(10,Lt,10,4,"li",64,At),e.k0s()()()}if(2&s){const t=o.$implicit;e.R7$(4),e.JRh(e.bMT(5,1,`products.ppss-filter-${t.id}`)),e.R7$(6),e.Dyx(t.options)}}function Ot(s,o){if(1&s&&(e.j41(0,"frk-tooltip",4),e.nI1(1,"translate"),e.nrm(2,"p",5),e.k0s()),2&s){const t=e.XpG();e.Y8G("a11yPretext",(null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.expenseRatioGross)||"")("ariaLabel",e.bMT(1,3,"common.aria-label.tooltip")),e.R7$(2),e.Y8G("innerHTML",t.tooltipContent,e.npT)}}function Wt(s,o){1&s&&(e.EFF(0),e.nI1(1,"translate")),2&s&&e.SpI(" ",e.bMT(1,1,"products.download-factsheet")," ")}function Vt(s,o){1&s&&(e.j41(0,"span",2),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"products.download-factsheet")))}function Yt(s,o){if(1&s&&(e.j41(0,"span",1),e.EFF(1),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.JRh(t.headerName)}}function Bt(s,o){1&s&&e.eu8(0)}function jt(s,o){if(1&s&&e.DNE(0,Bt,1,0,"ng-container",6),2&s){e.XpG();const t=e.sdS(8);e.Y8G("ngTemplateOutlet",t)}}function Xt(s,o){1&s&&e.eu8(0)}function Ht(s,o){if(1&s&&(e.j41(0,"a",3),e.DNE(1,Xt,1,0,"ng-container",6),e.k0s()),2&s){const t=e.XpG(),r=e.sdS(8);e.Y8G("routerLink",t.fundUrl),e.R7$(),e.Y8G("ngTemplateOutlet",r)}}function Ut(s,o){if(1&s&&e.EFF(0),2&s){const t=e.XpG(3);e.SpI(" : ",null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.maxIntialSalesCharge," ")}}function Qt(s,o){1&s&&e.EFF(0," - ")}function zt(s,o){if(1&s&&e.EFF(0),2&s){const t=e.XpG(3);e.SpI(" : ",null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.cdsc," ")}}function Kt(s,o){1&s&&e.EFF(0," - ")}function Jt(s,o){if(1&s&&(e.j41(0,"p",7),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"translate"),e.DNE(4,Ut,1,1)(5,Qt,1,0),e.EFF(6),e.nI1(7,"translate"),e.DNE(8,zt,1,1)(9,Kt,1,0),e.k0s()),2&s){const t=e.XpG(2);e.R7$(),e.Lme(" ",e.bMT(2,5,"products.sales-charges"),": ",e.bMT(3,7,"products.max-initial-charge")," "),e.R7$(3),e.vxM(null!=t.params&&null!=t.params.rowData&&null!=t.params.rowData.charges&&t.params.rowData.charges.maxIntialSalesCharge?4:5),e.R7$(2),e.SpI(" | ",e.bMT(7,9,"products.cdsc")," "),e.R7$(2),e.vxM(null!=t.params&&null!=t.params.rowData&&null!=t.params.rowData.charges&&t.params.rowData.charges.cdsc?8:9)}}function Zt(s,o){if(1&s&&(e.EFF(0),e.nI1(1,"translate")),2&s){const t=e.XpG(3);e.Lme(" | ",e.bMT(1,2,"products.sponsor-fee-net")," - ",null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.sponsorFeeNet," ")}}function qt(s,o){if(1&s&&(e.j41(0,"p",7),e.EFF(1),e.nI1(2,"translate"),e.DNE(3,Zt,2,4),e.k0s()),2&s){const t=e.XpG(2);e.R7$(),e.Lme(" ",e.bMT(2,3,"products.sponsor-fee-gross")," : ",null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.sponsorFeeGross," "),e.R7$(2),e.vxM(null!=t.params&&null!=t.params.rowData&&null!=t.params.rowData.charges&&t.params.rowData.charges.sponsorFeeNet?3:-1)}}function er(s,o){if(1&s&&(e.EFF(0),e.nI1(1,"translate")),2&s){const t=e.XpG(3);e.Lme(" | ",e.bMT(1,2,"products.expense-ratio-net")," - ",null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.expenseRatioNet," ")}}function tr(s,o){if(1&s&&(e.j41(0,"p",7),e.EFF(1),e.nI1(2,"translate"),e.DNE(3,er,2,4),e.k0s()),2&s){const t=e.XpG(2);e.R7$(),e.Lme(" ",e.bMT(2,3,"products.expense-ratio-gross")," : ",null==t.params||null==t.params.rowData||null==t.params.rowData.charges?null:t.params.rowData.charges.expenseRatioGross," "),e.R7$(2),e.vxM(null!=t.params&&null!=t.params.rowData&&null!=t.params.rowData.charges&&t.params.rowData.charges.expenseRatioNet?3:-1)}}function rr(s,o){if(1&s&&e.DNE(0,Jt,10,11,"p",7)(1,qt,4,5,"p",7)(2,tr,4,5,"p",7),2&s){let t;const r=e.XpG();e.vxM("sales-charges"===(t=r.secondarySuffixType)?0:"sponsor-fee"===t?1:"expense-ratio"===t?2:-1)}}function ar(s,o){if(1&s&&(e.j41(0,"span",8),e.nrm(1,"frk-tooltip",10),e.nI1(2,"translate"),e.k0s()),2&s){let t,r,a;const n=e.XpG(2);e.R7$(),e.Y8G("tooltipTitle",null!==(t=null==n.params||null==n.params.rowData||null==n.params.rowData.ppssAlert?null:n.params.rowData.ppssAlert.ppssTooltip)&&void 0!==t?t:"")("a11yPretext",null!==(r=null==n.params||null==n.params.rowData||null==n.params.rowData.ppssAlert?null:n.params.rowData.ppssAlert.ppssMessage)&&void 0!==r?r:"")("ariaLabel",(null!==(a=null==n.params||null==n.params.rowData||null==n.params.rowData.ppssAlert?null:n.params.rowData.ppssAlert.ppssMessage)&&void 0!==a?a:"")+" "+e.bMT(2,3,"common.aria-label.tooltip"))}}function sr(s,o){if(1&s&&(e.j41(0,"p",4)(1,"span",8),e.nrm(2,"frk-heroicon",9),e.k0s(),e.j41(3,"span",8),e.EFF(4),e.k0s(),e.DNE(5,ar,3,5,"span",8),e.k0s()),2&s){const t=e.XpG();e.R7$(2),e.Y8G("size",16),e.R7$(2),e.SpI(" ",null==t.params||null==t.params.rowData||null==t.params.rowData.ppssAlert?null:t.params.rowData.ppssAlert.ppssMessage," "),e.R7$(),e.vxM(null!=t.params&&null!=t.params.rowData&&null!=t.params.rowData.ppssAlert&&t.params.rowData.ppssAlert.ppssTooltip?5:-1)}}function nr(s,o){1&s&&(e.j41(0,"span",11),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"products.performance-favorite-products")," "))}function ir(s,o){if(1&s&&(e.j41(0,"span",11),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){let t;const r=e.XpG(2);e.R7$(),e.SpI(" ",e.bMT(2,1,"products."+(null!==(t=null==r.params||null==r.params.rowData?null:r.params.rowData.investmentBadgeLabel)&&void 0!==t?t:"investments"))," ")}}function or(s,o){if(1&s&&(e.j41(0,"div",5),e.DNE(1,nr,3,3,"span",11)(2,ir,3,3,"span",11),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.vxM(null!=t.params&&null!=t.params.rowData&&t.params.rowData.isWatchlisted?1:-1),e.R7$(),e.vxM(null!=t.params&&null!=t.params.rowData&&t.params.rowData.isInvested?2:-1)}}function lr(s,o){if(1&s&&(e.j41(0,"span",13),e.EFF(1," - "),e.j41(2,"strong"),e.EFF(3),e.k0s()()),2&s){const t=e.XpG(2);e.R7$(3),e.JRh(t.identifierValue)}}function cr(s,o){if(1&s&&(e.j41(0,"span",13),e.EFF(1," - "),e.j41(2,"strong"),e.EFF(3),e.k0s()()),2&s){const t=e.XpG(2);e.R7$(3),e.JRh(null==t.params||null==t.params.rowData?null:t.params.rowData.shareClassName)}}function dr(s,o){if(1&s&&e.EFF(0),2&s){const t=e.XpG(3);e.SpI(" (",null==t.params||null==t.params.rowData?null:t.params.rowData.shareClassName,") ")}}function ur(s,o){if(1&s&&(e.j41(0,"span",13),e.EFF(1," - "),e.j41(2,"strong"),e.EFF(3),e.k0s(),e.DNE(4,dr,1,1),e.k0s()),2&s){const t=e.XpG(2);e.R7$(3),e.JRh(t.identifierValue),e.R7$(),e.vxM(null!=t.params&&null!=t.params.rowData&&t.params.rowData.shareClassName?4:-1)}}function pr(s,o){if(1&s&&(e.j41(0,"span",12),e.EFF(1),e.DNE(2,lr,4,1,"span",13)(3,cr,4,1,"span",13)(4,ur,5,2,"span",13),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.SpI(" ",null==t.params||null==t.params.rowData?null:t.params.rowData.productName," "),e.R7$(),e.vxM("identifiers"===t.suffix&&t.identifierValue&&"-"!==t.identifierValue?2:"shareclass"===t.suffix&&null!=t.params&&null!=t.params.rowData&&t.params.rowData.shareClassName?3:"identifiers-shareclass"===t.suffix&&t.identifierValue&&"-"!==t.identifierValue?4:-1)}}function fr(s,o){if(1&s&&(e.j41(0,"span",1),e.qSk(),e.j41(1,"svg",3),e.nrm(2,"polyline",4),e.k0s()()),2&s){const t=e.XpG(2);e.R7$(2),e.BMQ("fill",t.isHollowStar()?"var(--frk-color-nc1-0, #ffffff)":"var(--frk-color-nc1-950, #000000)")("stroke","var(--frk-color-nc1-950, #000000)")("stroke-width",4)}}function hr(s,o){1&s&&(e.j41(0,"p",2),e.nrm(1,"frk-tooltip",5),e.nI1(2,"translate"),e.nI1(3,"translate"),e.k0s()),2&s&&(e.R7$(),e.Y8G("tooltipTitle",e.bMT(2,2,"products.morningstar-tooltip"))("ariaLabel",e.bMT(3,4,"common.aria-label.tooltip")))}function mr(s,o){if(1&s&&(e.j41(0,"p",2),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=e.XpG(2);e.R7$(),e.Lme(" ",t.numberOfFunds," ",e.bMT(2,2,"products.funds-in-category")," ")}}function gr(s,o){if(1&s&&(e.j41(0,"div",0),e.Z7z(1,fr,3,3,"span",1,e.Vm6),e.DNE(3,hr,4,6,"p",2),e.k0s(),e.DNE(4,mr,3,4,"p",2)),2&s){const t=e.XpG();e.AVh("justify-end",null==t.params?null:t.params.isCardView),e.R7$(),e.Dyx(t.stars()),e.R7$(2),e.vxM(t.isHollowStar()?3:-1),e.R7$(),e.vxM(t.numberOfFunds?4:-1)}}function Cr(s,o){if(1&s&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.JRh(t.emdash)}}function vr(s,o){1&s&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"products.remove-from-favourite")))}function Sr(s,o){1&s&&(e.j41(0,"span",2),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"products.remove-from-favourite")))}function Tr(s,o){if(1&s&&(e.nrm(0,"frk-heroicon",1),e.DNE(1,vr,3,3,"span")(2,Sr,3,3,"span",2)),2&s){const t=e.XpG();e.Y8G("size",16),e.R7$(),e.vxM(t.isCardView()?1:2)}}function Dr(s,o){1&s&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"products.add-to-favourite")))}function _r(s,o){1&s&&(e.j41(0,"span",2),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"products.add-to-favourite")))}function Pr(s,o){if(1&s&&(e.nrm(0,"frk-heroicon",3),e.DNE(1,Dr,3,3,"span")(2,_r,3,3,"span",2)),2&s){const t=e.XpG();e.Y8G("size",16),e.R7$(),e.vxM(t.isCardView()?1:2)}}function br(s,o){if(1&s&&(e.j41(0,"span",0),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.nrm(3,"frk-footnote",2)),2&s){const t=e.XpG(2);e.R7$(),e.SpI("",e.bMT(2,2,t.headerLabelKey)," "),e.R7$(2),e.Y8G("placement",t.placement)}}function yr(s,o){1&s&&(e.j41(0,"p",1),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"products.asOfExcept")," "))}function Rr(s,o){if(1&s&&(e.DNE(0,br,4,4),e.j41(1,"div")(2,"span",0),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,yr,3,3,"p",1),e.k0s()),2&s){const t=e.XpG();e.vxM(t.headerLabelKey&&t.placement?0:-1),e.R7$(),e.HbH(null!=t.params&&t.params.isCardView?"flex items-center gap-1":""),e.R7$(2),e.Lme("",e.bMT(4,6,"pds.PERF_AS_OF_DATE")," ",t.asOfDate,""),e.R7$(2),e.vxM(null!=t.params&&null!=t.params.cellRendererParams&&t.params.cellRendererParams.showExpectWhereNoted?5:-1)}}function xr(s,o){if(1&s&&(e.j41(0,"span",0),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.nrm(3,"frk-footnote",1)),2&s){const t=e.XpG();e.R7$(),e.SpI("",e.bMT(2,2,t.headerLabelKey)," "),e.R7$(2),e.Y8G("placement",t.placement)}}function Ar(s,o){if(1&s&&(e.j41(0,"span",0),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.Lme("",e.bMT(2,2,"pds.PERF_AS_OF_DATE")," ",t.row.performanceAsOfDate,"")}}function Fr(s,o){if(1&s&&e.nrm(0,"frk-footnote",1),2&s){const t=e.XpG();e.Y8G("placement",t.footnotePlacement)}}function wr(s,o){if(1&s&&(e.nrm(0,"frk-tooltip",2),e.nI1(1,"translate")),2&s){const t=e.XpG();e.Y8G("tooltipTitle",t.tooltipTitle)("ariaLabel",e.bMT(1,2,"common.aria-label.tooltip"))}}const kr=(s,o,t)=>({"mb-2":s,"mb-1 sm:mb-2":o,"sm:flex-row":t}),Er=(s,o)=>({"mb-4":s,"mb-0":o}),Nr=()=>[],Ir=(s,o)=>o.labelKey,Mr=(s,o)=>o.value;function $r(s,o){1&s&&(e.nrm(0,"frk-tooltip",9),e.nI1(1,"translate"),e.nI1(2,"translate")),2&s&&e.Y8G("tooltipTitle",e.bMT(1,2,"products.ppss-mf-showing-primary-share-class-tooltip"))("ariaLabel",e.bMT(2,4,"common.aria-label.tooltip"))}function Lr(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",11),e.nrm(1,"strong",27),e.nI1(2,"translate"),e.j41(3,"frk-toggle",28),e.bIt("toggleActive",function(a){e.eBV(t);const n=e.XpG();return e.Njj(n.onRatingToggle(a))}),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(),e.Y8G("innerHTML",e.bMT(2,2,"products.ppss-morningstar-ratings"),e.npT),e.R7$(2),e.Y8G("toggleButtons",t.ratingsTypeToggle())}}function Gr(s,o){if(1&s&&(e.j41(0,"option",31),e.EFF(1),e.k0s()),2&s){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(),e.SpI(" ",t.label," ")}}function Or(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",12)(1,"select",29),e.bIt("change",function(a){e.eBV(t);const n=e.XpG();
1return e.Njj(n.downloadExcel(a))}),e.j41(2,"option",30),e.EFF(3),e.k0s(),e.Z7z(4,Gr,2,2,"option",31,Mr),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(),e.Y8G("name",t.dropdownId)("id",t.dropdownId),e.R7$(),e.Y8G("selected",t.isDefaultOptionSelected()),e.R7$(),e.SpI(" ",t.defaultDropDownOption.label," "),e.R7$(),e.Dyx(t.visibleDropdownOptions())}}function Wr(s,o){1&s&&e.nrm(0,"hr",13)}function Vr(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-toggle",38),e.bIt("toggleActive",function(a){e.eBV(t);const n=e.XpG(3);return e.Njj(n.onPeriodEndToggle(a))}),e.k0s()}if(2&s){const t=e.XpG(3);e.Y8G("toggleButtons",t.togglePeriodEndButtons())}}function Yr(s,o){1&s&&(e.j41(0,"label",39),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"products.sales-charges-toggle")))}function Br(s,o){if(1&s){const t=e.RV6();e.j41(0,"div",36),e.DNE(1,Yr,3,3,"label",39),e.j41(2,"frk-toggle",40),e.bIt("toggleActive",function(a){e.eBV(t);const n=e.XpG(3);return e.Njj(n.onCalcTypeToggle(a))}),e.k0s()()}if(2&s){const t=e.XpG(3);e.R7$(),e.vxM(t.config().isSalesChargeToggleVisible?1:-1),e.R7$(),e.Y8G("toggleButtons",t.toggleCalcTypeButtons())}}function jr(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-toggle",41),e.bIt("toggleActive",function(a){e.eBV(t);const n=e.XpG(3);return e.Njj(n.onPerformanceViewToggle(a))}),e.k0s()}if(2&s){const t=e.XpG(3);e.Y8G("toggleButtons",t.togglePerformanceViewButtons())}}function Xr(s,o){if(1&s&&(e.j41(0,"div",34),e.DNE(1,Vr,1,1,"frk-toggle",35)(2,Br,3,2,"div",36)(3,jr,1,1,"frk-toggle",37),e.k0s()),2&s){const t=e.XpG().$implicit,r=e.XpG();e.R7$(),e.vxM(t.showPeriodEnd?1:-1),e.R7$(),e.vxM(t.showCalcType?2:-1),e.R7$(),e.vxM(t.showPerformanceViewToggle&&r.togglePerformanceViewButtons()&&r.togglePerformanceViewButtons().length>1?3:-1)}}function Hr(s,o){if(1&s&&(e.j41(0,"frk-tab",16),e.nI1(1,"translate"),e.j41(2,"div",32),e.nI1(3,"async"),e.j41(4,"h2",33),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.DNE(7,Xr,4,3,"div",34),e.k0s()()),2&s){const t=o.$implicit,r=e.XpG();e.Y8G("name",e.bMT(1,5,t.labelKey))("id",r.tabIdByLabelKey()[t.labelKey]),e.R7$(2),e.Y8G("ngClass",e.bMT(3,7,r.isHandheld$)?"flex-col":"flex-row"),e.R7$(3),e.SpI(" ",e.bMT(6,9,t.labelKey)," "),e.R7$(2),e.vxM(t.showPeriodEnd||t.showCalcType||t.showPerformanceViewToggle?7:-1)}}function Ur(s,o){if(1&s&&(e.nrm(0,"frk-dynamic-table",17),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"translate"),e.nI1(4,"translate")),2&s){let t;const r=e.XpG();e.Y8G("groupColDefs",r.groupColDefs())("rowData",null!==(t=r.rowData())&&void 0!==t?t:e.lJ4(17,Nr))("showPagination",!0)("isCardView",!0===e.bMT(1,9,r.isCardView$))("isMobile",!0===e.bMT(2,11,r.isHandheld$))("pageSize",25)("isStickyHeader",!0)("showMoreTxt",e.bMT(3,13,"products.ppss-show-more"))("showLessTxt",e.bMT(4,15,"products.ppss-show-less"))}}function Qr(s,o){1&s&&(e.j41(0,"p",18),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"products.fund-listing-no-search-result-message")," "))}function zr(s,o){if(1&s&&(e.j41(0,"p",19),e.EFF(1),e.j41(2,"a",42),e.EFF(3),e.k0s()()),2&s){const t=o;e.R7$(),e.SpI(" ",t.prefixText," "),e.R7$(),e.Y8G("href",t.href,e.B4B),e.R7$(),e.SpI(" ",t.linkText," ")}}function Kr(s,o){1&s&&(e.nrm(0,"frk-heroicon",0),e.j41(1,"span",1),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&s&&(e.Y8G("size",20),e.R7$(2),e.JRh(e.bMT(3,2,"products.yes")))}function Jr(s,o){if(1&s&&(e.j41(0,"span",2),e.EFF(1),e.k0s(),e.j41(2,"span",1),e.EFF(3),e.nI1(4,"translate"),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.JRh(t.emdash),e.R7$(2),e.JRh(e.bMT(4,2,"products.no"))}}function Zr(s,o){if(1&s&&(e.j41(0,"a",0),e.EFF(1),e.nI1(2,"translate"),e.j41(3,"span",1),e.EFF(4),e.k0s()()),2&s){let t;const r=e.XpG();e.Y8G("href",o,e.B4B),e.R7$(),e.SpI(" ",e.bMT(2,3,"products.view")," "),e.R7$(3),e.JRh(null==(t=r.params())||null==t.rowData?null:t.rowData.productName)}}function qr(s,o){if(1&s&&(e.j41(0,"span",2),e.EFF(1),e.k0s(),e.j41(2,"span",1),e.EFF(3),e.nI1(4,"translate"),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.JRh(t.emdash),e.R7$(2),e.JRh(e.bMT(4,2,"products.NA"))}}const ze=s=>({$implicit:s});function ea(s,o){if(1&s&&e.nrm(0,"frk-footnote",6),2&s){const t=e.XpG(2).$implicit;e.Y8G("placement",t.footnotePlacement)}}function ta(s,o){if(1&s&&(e.j41(0,"section",3)(1,"h2",5),e.EFF(2),e.DNE(3,ea,1,1,"frk-footnote",6),e.k0s(),e.eu8(4,7),e.k0s()),2&s){const t=e.XpG().$implicit;e.XpG();const r=e.sdS(6);e.R7$(2),e.SpI(" ",t.title," "),e.R7$(),e.vxM(t.footnotePlacement?3:-1),e.R7$(),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",e.eq3(4,ze,t))}}function ra(s,o){if(1&s){const t=e.RV6();e.j41(0,"frk-footnote",12),e.bIt("click",function(a){return e.eBV(t),e.Njj(a.stopPropagation())})("keydown",function(a){return e.eBV(t),e.Njj(a.stopPropagation())}),e.k0s()}if(2&s){const t=e.XpG(2).$implicit;e.Y8G("placement",t.footnotePlacement)}}function aa(s,o){if(1&s&&(e.j41(0,"details",4)(1,"summary",8)(2,"span",9),e.EFF(3),e.DNE(4,ra,1,1,"frk-footnote",6),e.k0s(),e.nrm(5,"frk-heroicon",10),e.k0s(),e.j41(6,"div",11),e.eu8(7,7),e.k0s()()),2&s){const t=e.XpG().$implicit;e.XpG();const r=e.sdS(6);e.Y8G("open",t.isOpen),e.R7$(3),e.SpI(" ",t.title," "),e.R7$(),e.vxM(t.footnotePlacement?4:-1),e.R7$(),e.Y8G("size",24),e.R7$(2),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",e.eq3(6,ze,t))}}function sa(s,o){1&s&&e.DNE(0,ta,5,6,"section",3)(1,aa,8,8,"details",4),2&s&&e.vxM(!1===o.$implicit.isAccordion?0:1)}function na(s,o){if(1&s&&(e.j41(0,"h3",14),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit;e.R7$(),e.SpI(" ",t.assetClass," ")}}function ia(s,o){if(1&s&&(e.j41(0,"section",13),e.DNE(1,na,2,1,"h3",14),e.nrm(2,"frk-dynamic-table",15),e.nI1(3,"translate"),e.nI1(4,"translate"),e.k0s()),2&s){const t=o.$implicit,r=e.XpG(2);e.R7$(),e.vxM(t.assetClass?1:-1),e.R7$(),e.Y8G("colDefs",r.colDefs())("rowData",t.rows)("isCardView",r.isCardView())("isMobile",r.isCardView())("showMoreTxt",e.bMT(3,8,"products.show-more"))("showLessTxt",e.bMT(4,10,"products.show-less"))("expandedByDefault",!0)}}function oa(s,o){1&s&&e.Z7z(0,ia,5,12,"section",13,e.Vm6),2&s&&e.Dyx(o.$implicit.grids)}function la(s,o){if(1&s&&e.nrm(0,"frk-sfdr-product-listing",0),2&s){const t=e.XpG();e.Y8G("sections",t.sections())("showAmfColumn",t.showAmfColumn())("layout",t.layout())}}const ca=(s,o)=>o.href,da=(s,o)=>o.text;function ua(s,o){if(1&s&&(e.j41(0,"a",11),e.EFF(1),e.qSk(),e.j41(2,"svg",15),e.nrm(3,"path",16),e.k0s()()),2&s){const t=o;e.Y8G("href",t.href,e.B4B),e.BMQ("aria-label",t.ariaLabel||t.text),e.R7$(),e.SpI(" ",t.text," ")}}function pa(s,o){if(1&s&&(e.j41(0,"span",17),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$index;e.R7$(),e.SpI(" ",t+1,". ")}}function fa(s,o){1&s&&e.nrm(0,"frk-heroicon",23),2&s&&(e.Y8G("size",16),e.BMQ("aria-hidden",!0))}function ha(s,o){if(1&s&&(e.j41(0,"span",20),e.Z7z(1,fa,1,2,"frk-heroicon",23,e.fX1),e.k0s()),2&s){const t=e.XpG().$implicit,r=e.XpG(2);e.BMQ("aria-label",t.rating+" out of 5 stars"),e.R7$(),e.Dyx(r.starSlots(t.rating))}}function ma(s,o){if(1&s&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&s){const t=o.$implicit;e.BMQ("aria-label",t.ariaLabel||t.text),e.R7$(),e.SpI(" ",t.text," ")}}function ga(s,o){if(1&s&&(e.j41(0,"li",13),e.DNE(1,pa,2,1,"span",17),e.j41(2,"div",18)(3,"a",19),e.EFF(4),e.k0s(),e.DNE(5,ha,3,1,"span",20),e.k0s(),e.j41(6,"div",21),e.Z7z(7,ma,2,2,"span",22,da),e.k0s()()),2&s){const t=o.$implicit;e.XpG(2);const r=e.r8f(5);
1e.R7$(),e.vxM("trendingProducts"===r.variant?1:-1),e.R7$(2),e.Y8G("href",t.href,e.B4B),e.BMQ("aria-label",t.ariaLabel||t.name),e.R7$(),e.SpI(" ",t.name," "),e.R7$(),e.vxM("morningStar"===r.variant&&t.rating?5:-1),e.R7$(2),e.Dyx(t.badges)}}function Ca(s,o){1&s&&(e.j41(0,"div",14),e.nrm(1,"frk-card",24),e.k0s()),2&s&&(e.R7$(),e.Y8G("config",o))}function va(s,o){1&s&&(e.j41(0,"div",25),e.nrm(1,"frk-product-card",24),e.k0s()),2&s&&(e.R7$(),e.Y8G("config",o))}function Sa(s,o){if(1&s&&e.DNE(0,va,2,1,"div",25),2&s){let t;e.XpG(2);const r=e.r8f(5);e.vxM((t=r.card)?0:-1,t)}}function Ta(s,o){if(1&s&&(e.j41(0,"div",4)(1,"div",5)(2,"div",6),e.nrm(3,"span",7),e.j41(4,"div",8)(5,"div",9)(6,"h3",10),e.EFF(7),e.k0s(),e.DNE(8,ua,4,3,"a",11),e.k0s(),e.j41(9,"ul",12),e.Z7z(10,ga,9,5,"li",13,ca),e.k0s()()()(),e.DNE(12,Ca,2,1,"div",14)(13,Sa,1,1),e.k0s()),2&s){let t,r;const a=e.XpG(),n=e.r8f(5);e.R7$(7),e.SpI(" ",n.heading," "),e.R7$(),e.vxM((t=n.viewAll)?8:-1,t),e.R7$(),e.Y8G("ngClass",a.listGridClass()),e.R7$(),e.Dyx(a.visibleProducts()),e.R7$(2),e.vxM((r=n.contentCard)?12:13,r)}}let V=(()=>{class s{loggerService=(0,e.WQX)(x.L);navAsOfDateSignal=(0,e.vPA)(null);getNavAsOfDate=this.navAsOfDateSignal.asReadonly();totalNetAssetAsOfDateSignal=(0,e.vPA)(null);getTotalNetAssetAsOfDate=this.totalNetAssetAsOfDateSignal.asReadonly();currentCalcType;getCurrentCalcType(){return this.currentCalcType}setCurrentCalcType(t){this.loggerService.debug("TableFilterStateService","New calc type set: ",t),this.currentCalcType=t}setNavAsOfDate(t){this.navAsOfDateSignal.set(t)}setTotalNetAssetAsOfDate(t){this.totalNetAssetAsOfDateSignal.set(t)}selectedProductsFromPPSS=(0,e.vPA)([]);uncheckedProductsFromPPSS=(0,e.vPA)([]);isFilteredProductsSelectedForBulkDownload=(0,e.vPA)(!0);manageSelectedProducts(t,r=!1){this.selectedProductsFromPPSS.update(r?a=>{const n=a.filter(i=>i.fundId===t.fundId);return n.forEach(i=>{i.isChecked=!1}),this.uncheckedProductsFromPPSS.set([...this.uncheckedProductsFromPPSS(),...n]),a.filter(i=>i.fundId!==t.fundId)}:a=>{const n=a.find(l=>l.fundId===t.fundId&&l.shareClassCode===t.shareClassCode),i=a.findIndex(l=>l.fundId===t.fundId&&l.shareClassCode===t.shareClassCode);return i>-1?(n&&(n.isChecked=!1,this.uncheckedProductsFromPPSS.set([n])),a.filter((l,c)=>c!==i)):[...a,t]})}getSelectedProducts(){return this.selectedProductsFromPPSS()}emptyCart(){this.selectedProductsFromPPSS().forEach(t=>{t.isChecked=!1}),this.uncheckedProductsFromPPSS.set(this.selectedProductsFromPPSS()),this.selectedProductsFromPPSS.set([])}updateProductListingSelectState(t){const r=this.selectedProductsFromPPSS();if(!r.length)return;const a=new Set(r.map(i=>i.fundId)),n=new Set(r.map(i=>i.shareClassCode));t.forEach(i=>{i.isChecked=a.has(i.productId)&&n.has(i.shareClassCode)}),this.isFilteredProductsSelectedForBulkDownload.set(t.some(i=>i.isChecked))}static \u0275fac=function(r){return new(r||s)};static \u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),_a=(()=>{class s{loggerName="BulkDownloadComponent";loggerService=(0,e.WQX)(x.L);tableFilterStateService=(0,e.WQX)(V);literatureService=(0,e.WQX)(S.LITERATURE_SERVICE);modalService=(0,e.WQX)(C.Bg);cartService=(0,e.WQX)(N.f);config=(0,e.hFB)(null);activeTab=(0,e.hFB)(null);selectedDocuments=(0,e.vPA)([]);cartDocuments=(0,e.vPA)([]);existingDocuments=(0,e.vPA)([]);selectedDocumentDocIds=(0,e.EWP)(()=>this.selectedDocuments().map(t=>t.docId));productsFromPPSS=e.hFB.required();isFilteredProductsSelectedForBulkDownload=(0,e.EWP)(()=>this.tableFilterStateService.isFilteredProductsSelectedForBulkDownload());showDocumentNotifications=(0,e.EWP)(()=>"Money Market Funds"!==this.config()?.selectedProductType);hasProductsFormPPSSChanged=(0,e.EWP)(()=>this.productsFromPPSS().length===this.existingDocuments().length);destroyRef=(0,e.WQX)(e.abz);ngOnChanges(t){t.productsFromPPSS&&this.onBulkDownloadInitiated()}stickyFooterConfig=(0,e.EWP)(()=>({countValue:this.productsFromPPSS().length||0,countLabel:"literature.ppss-sticky-item-selected",isCardView:this.config()?.isCardView??!1}));stickyFooterButtons=(0,e.EWP)(()=>{const t=[{type:"email",testId:"openEmailBtn",translationKey:"literature.lit-sticky-email-button",iconName:"heroEnvelope",buttonClass:"button button--primary button--sm",gtmIntent:"email",modalId:"document-list-email"},{type:"download",testId:"openDownloadBtn",translationKey:"literature.lit-sticky-download-button",iconName:"heroArrowDownTray",buttonClass:"button button--secondary button--sm",gtmIntent:"download",modalId:"document-list-download"}];return this.config()?.viewCartUrl&&t.push({type:"cart",testId:"openCartBtn",translationKey:"literature.lit-sticky-add-to-cart-button",iconName:"heroShoppingCart",buttonClass:"button button--secondary button--sm",gtmIntent:"cart_add",action:"addToCart"}),t});onBulkDownloadInitiated(){const t=this.productsFromPPSS();if(!this.hasValidProducts(t))return;const{existingDocumentsToKeep:r,newProductsToFetch:a}=this.categorizeProducts(t);this.updateDocumentSignals(r),this.fetchNewProductDocuments(a)}hasValidProducts(t){return t.length>0}categorizeProducts(t){const r=this.existingDocuments(),a=[],n=[];return t.forEach(i=>
1{const l=this.findExistingDocument(r,i);l?n.push(l):a.push(i)}),{existingDocumentsToKeep:n,newProductsToFetch:a}}findExistingDocument(t,r){return t.find(a=>a.productId===r.fundId&&a.shareClassCode===r.shareClassCode)}updateDocumentSignals(t){this.existingDocuments.set(t),this.selectedDocuments.set(t)}fetchNewProductDocuments(t){t.length>0&&t.forEach(r=>{this.fetchProductForSelectedProducts(r)})}fetchProductForSelectedProducts(t){this.literatureService.getLiteratureDetails$({productId:t.fundId,isCached:!0,documentTypes:["FACT-SHEET","Factsheet"],shareClassCode:t.shareClassCode}).pipe((0,y.pQ)(this.destroyRef)).subscribe({next:a=>{if("empty-data"===a.productLiterature?.status)return this.tableFilterStateService.manageSelectedProducts({fundId:t.fundId,shareClassCode:t.shareClassCode,isChecked:!1}),void this.loggerService.debug(this.loggerName,`No documents found for productId ${t.fundId} and shareClassCode ${t.shareClassCode}`);if("loaded"===a.productLiterature?.status&&a.productLiterature.literatureDocs.length>0){const i=a.productLiterature.literatureDocs.map(l=>({...l,productId:t.fundId,shareClassCode:t.shareClassCode,isChecked:!0,...t.productName&&!l.productName?{productName:t.productName}:{}}))[0];i&&(this.existingDocuments.update(l=>function Me(s,o){return s&&s.length?Q(s,(0,De.A)(o,2)):[]}([...l,i],"docId")),this.selectedDocuments.set(this.filterSelectedDocumentsFromExisting(this.existingDocuments(),this.productsFromPPSS())))}},error:a=>{this.loggerService.error(this.loggerName,`Error fetching documents for productId ${t.fundId}: ${a}`)}})}filterSelectedDocumentsFromExisting(t,r){return t.filter(n=>r.some(i=>i.fundId===n.productId&&i.shareClassCode===n.shareClassCode))}addSelectedToCart(){if(!this.cartDocuments().length||this.selectedDocuments().length){this.cartDocuments.update(a=>[...a,...this.selectedDocuments()]);const t=this.selectedDocuments().filter(a=>null!==a.productId&&null!==a.shareClassCode).map(a=>({productId:a.productId,shareClassCode:a.shareClassCode,docId:a.docId,quantity:1}));let r=this.cartService.getFromStorage();if(!r.length)return this.cartDocuments.set(this.selectedDocuments()),r=[...t],this.cartService.addToStorage(r),void setTimeout(()=>{this.modalService.open("document-list-cart")});r=[...r,...t],this.cartService.addToStorage(r),r.length&&this.getCartDocs$(r,"open")}}getCartDocs$(t,r){const a=t.map(n=>n.docId);this.literatureService.getLiteratureDocuments$(a).pipe((0,y.pQ)(this.destroyRef)).subscribe({next:n=>{"loaded"===n.status&&(n.literatureDocs.map(i=>{i.productId=t.find(l=>l.docId===i.docId)?.productId??null,i.shareClassCode=t.find(l=>l.docId===i.docId)?.shareClassCode??null}),this.cartDocuments.set(n.literatureDocs),"open"===r&&setTimeout(()=>{this.modalService.open("document-list-cart")}))},error:n=>{this.loggerService.error(this.loggerName,n)}})}deleteSelectedDocuments(t){const r=this.selectedDocuments();this.selectedDocuments.set(r.filter(n=>n!==t)),null!==t.productId&&null!==t.shareClassCode?(this.tableFilterStateService.manageSelectedProducts({fundId:t.productId,shareClassCode:t.shareClassCode,isChecked:!1},!0),this.selectedDocuments().length||(this.closeModalType("email"),this.closeModalType("download"))):this.loggerService.error(this.loggerName,"Cannot remove document: productId is null")}removeItemsFromCart(t){this.cartService.removeFromStorage([t]);const r=this.cartDocuments().find(n=>n.docId===t),a=this.productsFromPPSS().find(n=>n.fundId===r?.productId&&n.shareClassCode===r.shareClassCode);a&&this.tableFilterStateService.manageSelectedProducts(a,!0),this.cartDocuments.update(n=>n.filter(i=>i.docId!==t)),this.cartDocuments().length||this.closeModalType("cart")}emptyDocsCart(){this.tableFilterStateService.emptyCart(),this.cartService.emptyStorage(),this.cartDocuments.set([]),this.closeModalType("cart")}closeModalType(t){switch(t){case"email":this.modalService.close("document-list-email");break;case"download":this.modalService.close("document-list-download");break;case"cart":this.modalService.close("document-list-cart")}}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-bulk-download"]],hostAttrs:["data-gtm-component","frk-bulk-download"],inputs:{config:[1,"config"],activeTab:[1,"activeTab"],productsFromPPSS:[1,"productsFromPPSS"]},features:[e.OA$],decls:4,vars:4,consts:[[3,"stickyConfig","buttons"],[3,"selectedDocuments","docIds","showDocumentNotifications"],[3,"docIds","selectedDocuments","showDocumentNotifications"],[3,"config","cartDocuments"],[3,"buttonAction","stickyConfig","buttons"],[3,"checkBoxChange","closeModal","selectedDocuments","docIds","showDocumentNotifications"],[3,"checkBoxChange","closeModal","docIds","selectedDocuments","showDocumentNotifications"],[3,"removeItemsFromCart","emptyDocsCart","closeModal","config","cartDocuments"]],template:function(r,a){1&r&&e.DNE(0,Tt,1,2,"frk-sticky-footer",0)(1,Dt,1,3,"frk-email-modal",1)(2,_t,1,3,"frk-download-modal",2)(3,Pt,1,2,"frk-cart-modal",3),2&r&&(e.vxM(a.productsFromPPSS().length&&"Performance"===a.activeTab()?0:-1),e.R7$(),e.vxM(a.selectedDocuments().length?1:-1),e.R7$(),e.vxM(a.selectedDocuments().length?2:-1),e.R7$(),e.vxM(a.cartDocuments().length?3:-1))},dependencies:[U.CartModalComponent,P.MD,U.DownloadModalComponent,U.EmailModalComponent,S.StickyFooterComponent],encapsulation:2,changeDetection:0})}return s})();const Ge="PpssBannerComponent";let Pa=(()=>{class s{cdr;profileService=(0,e.WQX)(N.b);
1signInModalService=(0,e.WQX)(S.SignInModalService);loggerService=(0,e.WQX)(x.L);segmentService=(0,e.WQX)(N.S);router=(0,e.WQX)(M.Ix);activatedRoute=(0,e.WQX)(M.nX);location=(0,e.WQX)(Y.aZ);productTypes=e.hFB.required();selectedProductType=e.hFB.required();processSelectedProductTypeName=(0,e.EWP)(()=>{const t=this.selectedProductType();if(!t)return"";switch(t){case"ETFs":return"Exchange Traded Funds";case"Managed Accounts":return"Separately Managed Accounts";case"Variable Insurance":return"Variable Insurance Options";default:return t}});filterInputs=e.hFB.required();changedProductType=(0,e.CGW)();updatedFilterOutput=(0,e.CGW)();refreshFilterInputs=(0,e.CGW)();selectFiltersSignal=(0,e.vPA)([]);selectFilters=this.selectFiltersSignal.asReadonly();selectPreTextSignal=(0,e.vPA)("");selectPreText=this.selectPreTextSignal.asReadonly();watchListTogglesSignal=(0,e.vPA)([]);watchListToggles=this.watchListTogglesSignal.asReadonly();search$=new q.B;unsubscribe$=new q.B;isProductSelectorMenuOpen=(0,e.vPA)(!1);isFilterDrawerOpen=(0,e.vPA)(!1);showWatchlistToggle=!0;shouldSkipDocClickOutsideFilterDrawer=!1;selectedChipsSignal=(0,e.vPA)([]);selectedChips=this.selectedChipsSignal.asReadonly();trapFocus(t,r){const n=Array.from(t.querySelectorAll(["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"a[href]"].join(",")));if(!n.length)return;const i=n[0]?n[0]:null,l=n[n.length-1]?n[n.length-1]:null,c=document.activeElement;"Tab"===r.key&&(r.shiftKey?(c===i||!t.contains(c))&&l&&(l.focus(),r.preventDefault()):(c===l||!t.contains(c))&&i&&(i.focus(),r.preventDefault()))}handleTabTrap(t){if(!this.isFilterDrawerOpen())return;const r=this.filterDrawerRef.nativeElement;r&&this.trapFocus(r,t)}productSelectorRef;filterDrawerRef;filterToggleRef;onDocumentClick(t){this.productSelectorRef.nativeElement.contains(t.target)||this.isProductSelectorMenuOpen.set(!1),!this.filterDrawerRef.nativeElement.contains(t.target)&&!this.shouldSkipDocClickOutsideFilterDrawer&&this.isFilterDrawerOpen.set(!1),this.shouldSkipDocClickOutsideFilterDrawer&&(this.shouldSkipDocClickOutsideFilterDrawer=!1)}handleEscape(t){this.isFilterDrawerOpen()&&(this.isFilterDrawerOpen.set(!1),setTimeout(()=>{this.filterToggleRef.nativeElement.querySelector("#filterToggle").focus()},100),t.preventDefault(),t.stopPropagation())}constructor(t){this.cdr=t,this.search$.pipe((0,se.B)(500),(0,ne.Q)(this.unsubscribe$)).subscribe({next:r=>{(r.trim().length>1||!r.length)&&this.onApplyFilters("search",void 0,r)},error:r=>this.loggerService.error(Ge,r)}),(0,y.br)(this.filterInputs).pipe((0,ne.Q)(this.unsubscribe$)).subscribe({next:r=>{(r.select||r.search||r.toggle)&&(this.extactFilters(),this.generateSelectedChips("load"))},error:r=>{this.loggerService.error(Ge,"Error in having filter input signal as an observable: ",r)}})}ngOnInit(){setTimeout(()=>{this.filterDrawerRef.nativeElement?.classList?.toggle("invisible")},200)}filterDetailsClickHandler(t){this.filterDrawerRef.nativeElement.querySelectorAll("details").forEach(a=>{a!==t&&a.removeAttribute("open")})}extactFilters(t){if(this.selectFiltersSignal.set(this.filterInputs().select),!t){this.selectPreTextSignal.set(this.filterInputs().search.preText??"");const r=this.filterInputs().toggle;if(this.watchListTogglesSignal.set(r.find(a=>"watchlist"===a.name)?.buttons??[]),this.segmentService.getCurrentSegmentId()===F.zu.INVESTOR){const a=this.watchListTogglesSignal().filter(n=>"watchlist"!==n.value);this.watchListTogglesSignal.set(a)}}}generateSelectedChips(t,r){if("load"===t){const a=[];this.filterInputs().select.forEach(n=>{n.options.forEach(i=>{i.isChecked&&a.push({id:n.id,option:i.val})})}),this.selectedChipsSignal.set(a)}else this.selectedChipsSignal.update("add"===t?a=>[...a,{id:r?.id,option:r?.option}]:a=>a.filter(n=>!(n.id===r?.id&&n.option===r.option)))}onProductTypeMenuToggle(){this.isProductSelectorMenuOpen.update(t=>!t)}onProductTypeChange(t){this.changedProductType.emit(t)}onFilterDrawerToggle(t){"open"===t?(this.isFilterDrawerOpen.set(!0),setTimeout(()=>{this.filterDrawerRef.nativeElement.querySelector("#closeFilters").focus()},100),this.shouldSkipDocClickOutsideFilterDrawer=!0):(this.isFilterDrawerOpen.set(!1),setTimeout(()=>{this.filterToggleRef.nativeElement.querySelector("#filterToggle").focus()},100))}onApplyFilters(t,r,a,n,i){let l;switch(t){case"select":l={type:"select",info:[r]},r&&this.generateSelectedChips(r.action,{id:r.id,option:r.options[0]??""});break;case"search":l={type:"search",info:{term:a}};break;case"toggle":l={type:"toggle",info:{name:n,selectedToggle:i}}}this.loggerService.debug(Ge,"Updated filter output: ",l),this.updatedFilterOutput.emit(l)}onClearFilters(){this.selectedChipsSignal.set([]),this.isFilterDrawerOpen.set(!1),this.updatedFilterOutput.emit({type:"select",info:[]}),this.refreshFilterInputs.emit(),this.extactFilters(!0)}onSelectFilter(t,r,a){this.onApplyFilters("select",{id:r,options:[a],action:t.target.checked?"add":"remove"})}onSearchFilter(t){this.search$.next(t.target.value)}onToggleFilter(t,r){if("watchlist"===t)if("all"===r.value||this.profileService.isLoggedIn()||this.profileService.isIdentified())this.onApplyFilters("toggle",void 0,void 0,"watchlist",r);else{this.showWatchlistToggle=!1,this.cdr.detectChanges(),this.watchListTogglesSignal.update(l=>l.map(c=>({...c,isActive:"all"===c.value})));const a=this.router.parseUrl(this.location.path(!0)),n=a.queryParams.filter,i=a.fragment??void 0;if(!n?.includes("toggleView:watchlist")){const l=this.router.createUrlTree([],{relativeTo:this.activatedRoute,queryParams:{filter:n?`${n};toggleView:watchlist`:"toggleView:watchlist"},queryParamsHandling:"merge",fragment:i}).toString();this.location.replaceState(l)}this.showWatchlistToggle=!0,this.cdr.detectChanges(),this.signInModalService.open("watchlist")}}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}static \u0275fac=function(r){return new(r||s)(e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:s,selectors:[["frk-ppss-banner"]],viewQuery:function(r,a){
1if(1&r&&(e.GBs(bt,5),e.GBs(yt,5),e.GBs(Rt,5)),2&r){let n;e.mGM(n=e.lsd())&&(a.productSelectorRef=n.first),e.mGM(n=e.lsd())&&(a.filterDrawerRef=n.first),e.mGM(n=e.lsd())&&(a.filterToggleRef=n.first)}},hostAttrs:["data-gtm-component","frk-ppss-banner"],hostBindings:function(r,a){1&r&&e.bIt("keydown",function(i){return a.handleTabTrap(i)},!1,e.EBC)("click",function(i){return a.onDocumentClick(i)},!1,e.EBC)("keydown.escape",function(i){return a.handleEscape(i)},!1,e.EBC)},inputs:{productTypes:[1,"productTypes"],selectedProductType:[1,"selectedProductType"],filterInputs:[1,"filterInputs"]},outputs:{changedProductType:"changedProductType",updatedFilterOutput:"updatedFilterOutput",refreshFilterInputs:"refreshFilterInputs"},decls:41,vars:22,consts:[["productSelector",""],["filterDrawer",""],["filterToggle",""],["detailsElem",""],[1,"from-pc1-800","via-pc1-600","to-pc1-20","peer","relative","bg-gradient-to-br","pt-10","print:hidden",3,"ngClass"],[1,"container","mx-auto"],[1,"relative","z-10","grid","auto-rows-min","grid-cols-12","gap-x-3","md:gap-x-4"],[1,"col-span-12","col-start-1","mb-10","flex","items-center","xl:col-span-10"],[1,"text-nc1-0","text-3xl","font-bold","md:text-4xl","xl:text-5xl"],[1,"relative"],["for","product-selector"],["type","button","id","product-selector","data-gtm-intent","open_product_type_drawer","aria-haspopup","menu","aria-controls","product-type-menu",1,"button","button--action","button--action-lg","button--action-ghost-dark","group","ml-4","inline-flex","p-1",3,"click"],["name","heroChevronDown",1,"group-[open]:animate-flip","text-nc1-0","inline-flex"],[1,"sr-only"],["role","menu","id","product-type-menu",1,"bg-pc1-800","text-nc1-0","absolute","right-0","z-10","min-w-[14.7rem]","rounded","sm:left-4"],[1,"relative","col-span-12","xl:col-span-10"],[1,"bg-pc1-800","before:bg-pc1-800","sm:pr[2rem]","relative","-mr-[1rem]","flex-wrap","justify-start","gap-8","pr-[1rem]","before:absolute","before:left-[-100vw]","before:top-1/2","before:z-[-1]","before:h-full","before:w-[120vw]","before:-translate-y-1/2","before:content-['']","sm:-mr-[2rem]","sm:rounded-tr-[7rem]","md:mr-0","md:inline-flex","md:w-full","md:min-w-[70%]","md:gap-10","md:pl-0","lg:block","xl:mr-0"],[1,"flex","flex-col","gap-8","py-4","lg:flex-row","print:hidden"],[1,"flex","w-[95%]","flex-col","gap-8","lg:flex-row"],["aria-modal","true","aria-labelledby","filterDrawerTitle",1,"bg-nc1-0","animate-slideOut","peer-[.isActive]:animate-slideIn","invisible","fixed","left-0","top-0","z-[51]","m-0","flex","h-full","max-h-none","w-full","flex-col","border-0","p-8","sm:w-2/4","xl:max-w-[400px]"],[1,"mb-5","flex","justify-between"],["id","filterDrawerTitle"],["for","closeFilters"],["id","closeFilters","type","button","aria-label","Close filters",1,"button","button--action","button--action-dark",3,"click"],["name","heroXMark",3,"size"],[1,"max-h-full","grow","overflow-auto"],["tabindex","0",1,"filter-category","border-t-pc1-200","last:border-b-pc1-200","group","border-t","px-5","py-4","last:border-b"],[1,"bg-ac2-90","absolute","left-0","top-0","z-10","hidden","h-full","w-full","opacity-0","transition-all","duration-[10000]","ease-out","peer-[.isActive]:block","peer-[.isActive]:opacity-10"],[1,"hidden","print:block"],[1,"text-nc1-600","text-3xl","font-bold","md:text-4xl","xl:text-5xl"],[1,"mb-0","list-none"],[1,"ml-0","list-none","p-0","px-3","pb-1","pt-2"],[1,"ml-0","list-none","p-0"],["type","button","data-gtm-intent","select_product_type","role","menuitem",1,"button","button--action","button--action-lg","button--action-ghost-dark","min-h-[2.125rem]","px-3","py-0",3,"click"],[1,"relative","sm:w-[92%]","md:w-full","lg:max-w-[35%]"],["name","heroMagnifyingGlass",1,"text-pc1-500","absolute","left-4","top-3",3,"size"],["for","searchFilter"],["id","searchFilter","name","searchFilter","type","text",1,"pl-12","text-base","sm:text-sm",3,"keyup","value","placeholder"],[1,"flex","flex-col","gap-8","sm:flex-row","sm:items-center","sm:gap-5"],[1,"sm:border-r-pc1-500","sm:border-r","sm:pr-5"],[1,"flex","flex-wrap","items-center","gap-2"],["for","filterToggle"],["type","button","id","filterToggle","data-gtm-intent","open_filters",1,"button","button--secondary-dark","button--sm","w-full","sm:w-auto",3,"click"],["name","heroAdjustmentsHorizontal",1,"inline-flex"],["for","viewToggle",1,"text-nc1-0"],[1,"-mb-4","flex","grow","sm:mb-auto",3,"toggleActive","useDar
1kTheme","toggleButtons"],[1,"bg-nc1-200","h-8"],[1,"flex","w-full","flex-col","gap-8","sm:flex-row","sm:items-center","sm:gap-5"],[1,"bg-nc1-200","h-8","w-full","md:w-1/4"],[1,"bg-nc1-200","h-8","w-full","md:w-3/4"],[1,"my-3","flex","items-center","text-sm"],["for","clearFIlterChips"],["id","clearFIlterChips","type","button","data-gtm-intent","remove_filter_chip",1,"button","button--ghost","button--ghost-light","p-0",3,"click"],["aria-label","Selected filters",1,"m-0","ml-4","flex","list-none","flex-wrap","gap-x-4","gap-y-2"],[1,"border-pc1-800","hover:border-pc1-500","group","m-0","flex","min-h-7","list-none","items-center","rounded-full","border","px-2","py-0"],["for","removeFacet"],["id","removeFacet","data-gtm-intent","remove_facet","type","button",1,"text-pc1-800","ml-1","flex",3,"click"],["name","heroXCircleSolid",1,"group-hover:fill-pc1-500","inline-flex","fill-[#000000]",3,"size"],["tabindex","0",1,"filter-category","border-t-pc1-200","last:border-b-pc1-200","group","border-t","px-5","py-4","last:border-b",3,"click","keydown"],[1,"flex","cursor-pointer","justify-between","[&::-webkit-details-marker]:hidden"],[1,"text-pc1-800","font-bold"],[1,"origin-center","transform","transition-transform","duration-300","group-open:rotate-180"],["name","heroChevronDown",1,"text-pc1-500","group-[open]:animate-flip","origin-center"],[1,"mt-10","max-h-56","overflow-y-auto"],[1,"mb-4","ml-0","list-none","p-0"],[1,"checkbox","group"],[1,"checkbox__label","pl-1","pt-1"],["type","checkbox",1,"peer","sr-only",3,"change","checked"],[1,"checkbox__wrapper"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke-width","1.5","stroke","currentColor",1,"w-full"],["stroke-linecap","round","stroke-linejoin","round","d","m4.5 12.75 6 6 9-13.5"],[1,"checkbox__text"]],template:function(r,a){if(1&r){const n=e.RV6();e.j41(0,"header",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h1",8),e.EFF(5),e.k0s(),e.j41(6,"div",9)(7,"label",10)(8,"button",11,0),e.bIt("click",function(){return e.eBV(n),e.Njj(a.onProductTypeMenuToggle())}),e.nrm(10,"frk-heroicon",12),e.j41(11,"span",13),e.EFF(12),e.nI1(13,"translate"),e.k0s()()(),e.DNE(14,wt,7,3,"menu",14),e.k0s()(),e.j41(15,"div",15)(16,"section",16)(17,"div",17),e.DNE(18,Nt,11,10)(19,It,6,0,"div",18),e.k0s()()()()()(),e.DNE(20,$t,9,3,"div",5),e.j41(21,"dialog",19,1),e.nI1(23,"translate"),e.j41(24,"div",20)(25,"h3",21),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.j41(28,"label",22)(29,"button",23),e.bIt("click",function(){return e.eBV(n),e.Njj(a.onFilterDrawerToggle("close"))}),e.nrm(30,"frk-heroicon",24),e.j41(31,"span",13),e.EFF(32),e.nI1(33,"translate"),e.k0s()()()(),e.j41(34,"div",25),e.Z7z(35,Gt,12,3,"details",26,Qe),e.k0s()(),e.nrm(37,"div",27),e.j41(38,"div",28)(39,"h2",29),e.EFF(40),e.k0s()()}2&r&&(e.Y8G("ngClass",e.eq3(20,xt,a.isFilterDrawerOpen())),e.R7$(5),e.SpI(" ",a.processSelectedProductTypeName()," "),e.R7$(3),e.BMQ("aria-expanded",a.isProductSelectorMenuOpen()),e.R7$(4),e.JRh(e.bMT(13,12,"products.product-type-select")),e.R7$(2),e.vxM(a.isProductSelectorMenuOpen()?14:-1),e.R7$(4),e.vxM(a.selectFilters().length||a.showWatchlistToggle&&a.watchListToggles().length?18:19),e.R7$(2),e.vxM(a.selectedChips().length?20:-1),e.R7$(),e.BMQ("aria-label",e.bMT(23,14,"products.ppss-filter-filters")),e.R7$(5),e.SpI(" ",e.bMT(27,16,"products.ppss-filter-filters")," "),e.R7$(4),e.Y8G("size",16),e.R7$(2),e.JRh(e.bMT(33,18,"products.ppss-filter-close-filters")),e.R7$(3),e.Dyx(a.selectFilters()),e.R7$(5),e.SpI(" ",a.processSelectedProductTypeName()," "))},dependencies:[P.MD,P.YU,C.zq,S.TranslatePipe,C.ai],encapsulation:2,changeDetection:0})}return s})();const Oe={ASSET_CLASS:"assetClass",INVESTMENT_GROUP:"investmentGroup",SHARE_CLASS_NAME:"shareClassName",CLASS_STRATEGY:"investmentCategory",CLASS_GEOGRAPHY:"region",ETF_TYPE:"etfType",CURRENCY:"currency",SFDR:"sfdrCategory",SHARE_CLASS:"shareClassFeeStructure",INVESTMENT_VEHICLE:"investmentVehicle",INVESTMENT_MANAGER:"investmentManager"},ba={AVG_ANNUAL:["avgAnnual"],CALENDAR_YEAR:["calendarYear"],CUMULATIVE:["cumulative"],DISCRETE:["discrete"],MONTHLY_RETURN:["monthlyReturn"]},ya={16590073:"ALL"},Ke="BannerFilterStateService";let Je=(()=>{class s{loggerService=(0,e.WQX)(x.L);translateService=(0,e.WQX)(u.c$);profileService=(0,e.WQX)(N.b);activatedRoute=(0,e.WQX)(M.nX);router=(0,e.WQX)(M.Ix);location=(0,e.WQX)(Y.aZ);filterInputsSignal=(0,e.vPA)({});filterInputs=this.filterInputsSignal.asReadonly();isPreFiltersAvailableSignal=(0,e.vPA)(!1);isPreFiltersAvailable=this.isPreFiltersAvailableSignal.asReadonly();queryParamsWithFragmentSignal=(0,e.vPA)(null);queryParamsWithFragment=this.queryParamsWithFragmentSignal.asReadonly();savedFilterInputs={};urlQueryParams={select:null,search:null,toggle:null};urlFragment;lastToggleValueFromQueryParams=null;showWatchlistToggle=!0;getSavedFilterInputs(){return this.savedFilterInputs}refreshFilterInputs(){this.filterInputsSignal.set(this.savedFilterInputs)}initialize(t,r,a,n){this.showWatchlistToggle=n??!0,a?.length?this.profileService.getProfileData$().subscribe({next:i=>{t=this.handleFirmSpecificSelectFilters(t,a,i.personalInfo?.parentFirmGlobalId),this.processSavedFilterInputs(t,r)},error:i=>{this.loggerService.error(Ke,"Error in fetching profile data: ",i)}}):this.processSavedFilterInputs(t,r)}processSavedFilterInputs(t,r){this.processFiltersFromURLQueryParams(r),this.savedFilterInputs={select:this.generateSelectFilterInput(t),search:this.generateSearchFilterInput(),toggle:this.generateToggleFilterInput()},this.showWatchlistToggle||this.savedFilterInputs.toggle.forEach(a=>{a.buttons=a.buttons.filter(n=>"watchlist"!==n.value)}),this.loggerService.debug(Ke,"Banner filter inputs: ",this.savedFilterInputs),this.filterInputsSignal.set(this.savedFilterInputs)}handleFirmSpecificSelectFilters(t,r,a){let n;return a&&(n=ya[a]),"ALL"===n?t.forEach(i=>
1{i.options=this.overrideFirmSpecificSelectFilterOptions(r,i.id)}):n?.length&&n.forEach(i=>{const l=t.findIndex(c=>c.id===i);t[l]&&Oe[i]&&(t[l].options=this.overrideFirmSpecificSelectFilterOptions(r,i))}),t}overrideFirmSpecificSelectFilterOptions(t,r){return function ct(s){return s&&s.length?Q(s):[]}(t.flatMap(a=>this.fetchOptionsForSelectFilterApplied(a,r)).filter(a=>!!a&&"-"!==a&&"N/A"!==a)).map(a=>({val:a})).sort((a,n)=>a.val.localeCompare(n.val))}fetchOptionsForSelectFilterApplied(t,r){if("CLASS_STRATEGY"===r)return["tclassStrategyLocal","tclassStyleLocal","tclassSubstyleLocal","investmentCategory"].map(n=>t[n]);{const a=Oe[r];return a?[t[a]]:[void 0]}}processFiltersFromURLQueryParams(t){const r=this.activatedRoute.snapshot.queryParams,a=this.activatedRoute.snapshot.fragment;let n="";r.filter&&(n+=r.filter),a&&(n+=`#${a}`),n.trim()&&this.queryParamsWithFragmentSignal.set({filter:n});const i=this.router.parseUrl(this.location.path(!0)),l=i.queryParams.filter?.split(";"),c=i.fragment??void 0;l?.length&&this.extractFiltersFromUrl(l,t,c)}extractFiltersFromUrl(t,r,a){this.extractSearchFilter(t);const n=this.extractToggleFilter(t,r);this.urlQueryParams.select=t.join(";")||null,(this.urlQueryParams.select||this.urlQueryParams.search||this.urlQueryParams.toggle)&&this.isPreFiltersAvailableSignal.set(!0),n>-1&&r&&this.removeToggleParamsFromUrl(t,a)}extractSearchFilter(t){const r=t.findIndex(a=>"searchQuery"===a.split(":")[0]);r>-1&&(this.urlQueryParams.search=t[r]??null,t.splice(r,1))}extractToggleFilter(t,r){const a=t.findIndex(n=>"toggleView"===n.split(":")[0]);return r&&a>-1&&(this.lastToggleValueFromQueryParams="toggleView:watchlist"),(a>-1||this.lastToggleValueFromQueryParams)&&!r&&(this.urlQueryParams.toggle=t[a]??this.lastToggleValueFromQueryParams,t.splice(a,1)),a}removeToggleParamsFromUrl(t,r){const a=t.join(";").split(";").filter(i=>"toggleView:watchlist"!==i.trim()).join(";"),n=this.router.createUrlTree([],{relativeTo:this.activatedRoute,queryParams:a?{filter:a}:null,fragment:r}).toString();this.location.replaceState(n)}generateSelectFilterInput(t){const r=new Map;return this.urlQueryParams.select?.split(";").forEach(a=>{const n=a.split(":");r.set(n[0],n[1])}),t.map(a=>{const n=r.get(a.id)?.split(",");return{id:a.id,options:a.options.map(i=>({...i,isChecked:!!n?.length&&n.includes(i.val)}))}})}generateSearchFilterInput(){const t=this.urlQueryParams.search?.split("searchQuery:")[1];return{preText:t||""}}generateToggleFilterInput(){const t=this.urlQueryParams.toggle?.split("toggleView:")[1];return[{name:"watchlist",buttons:[{text:this.translateService.instant("products.all-products"),value:"all",isActive:!t},{text:this.translateService.instant("products.watchlist"),value:"watchlist",isActive:!!t&&"watchlist"===t}]}]}updateSavedFilterInputs(t,r){switch(this.urlFragment=r,t.type){case"select":this.updateSavedFilterInputsForSelect(t);break;case"search":this.updateSavedFilterInputsForSearch(t);break;case"toggle":this.updateSavedFilterInputsForToggle(t)}}updateSavedFilterInputsForSelect(t){const r=t.info,a=this.savedFilterInputs.select;if(0===r.length)a.forEach(n=>{n.options.forEach(i=>{i.isChecked=!1})});else{const n=a.findIndex(l=>l.id===r[0]?.id),i=a[n]?.options.findIndex(l=>l.val===r[0]?.options[0]);-1!==n&&void 0!==i&&-1!==i&&a[n]?.options[i]&&(a[n].options[i].isChecked="add"===r[0]?.action)}this.processUrlQueryParams("select")}updateSavedFilterInputsForSearch(t){this.savedFilterInputs.search={term:t.info.term,preText:""},this.processUrlQueryParams("search")}updateSavedFilterInputsForToggle(t){const r=t.info,a=this.savedFilterInputs.toggle,n=a.findIndex(i=>i.name===r.name);a[n]?.buttons.forEach(i=>{i.isActive=i.value===r.selectedToggle.value}),this.processUrlQueryParams("toggle")}processUrlQueryParams(t){this.updateUrlQueryParamsLocally(t);const r=[];this.urlQueryParams.select&&r.push(this.urlQueryParams.select),this.urlQueryParams.search&&r.push(this.urlQueryParams.search),this.urlQueryParams.toggle&&r.push(this.urlQueryParams.toggle),this.queryParamsWithFragmentSignal.set(r.length?{filter:r.join(";")}:null);const a=this.router.createUrlTree([],{relativeTo:this.activatedRoute,queryParams:this.queryParamsWithFragment(),queryParamsHandling:"replace",fragment:this.urlFragment}).toString();this.location.replaceState(a)}updateUrlQueryParamsLocally(t){switch(t){case"select":this.urlQueryParams.select=this.savedFilterInputs.select.filter(r=>r.options.some(a=>a.isChecked)).map(r=>`${r.id}:${r.options.filter(a=>a.isChecked).map(a=>a.val).join(",")}`).join(";");break;case"search":{const r=this.savedFilterInputs.search.term;this.urlQueryParams.search=r?`searchQuery:${r}`:null;break}case"toggle":{const a=this.savedFilterInputs.toggle.find(n=>"watchlist"===n.name)?.buttons.find(n=>n.isActive)?.value;this.urlQueryParams.toggle=a&&"all"!==a?`toggleView:${a}
1`:null}}}static \u0275fac=function(r){return new(r||s)};static \u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Ra=(()=>{class s{translateService=(0,e.WQX)(u.c$);params;tooltipContent;ngOnChanges(){if(this.tooltipContent="",this.params?.rowData.charges?.waiverEndDate&&this.params.rowData.charges.waiverEndDate!==u.BX){const t=this.translateService.instant("products.exp-ratio-tootltip-title"),r=this.translateService.instant("products.exp-ratio-tootltip-waiver-type"),a=this.translateService.instant("products.exp-ratio-tootltip-waiver-end-date");this.tooltipContent=`<b>${t}</b><br><br>${r}:<b> ${this.params.rowData.charges.waiverType}</b><br>${a}:<b> ${this.params.rowData.charges.waiverEndDate?this.params.rowData.charges.waiverEndDate:u.BX}</b>`}}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-expense-ratio-cell-renderer"]],hostAttrs:["data-gtm-component","expense-ratio-cell-renderer"],inputs:{params:"params"},features:[e.OA$],decls:17,vars:12,consts:[[1,"flex",3,"ngClass"],[1,"text-left"],[1,"text-nc1-950","text-base","font-normal"],[1,"flex"],[3,"a11yPretext","ariaLabel"],[1,"inline-block","text-sm","font-normal",3,"innerHTML"]],template:function(r,a){1&r&&(e.j41(0,"div",0)(1,"div",1)(2,"div")(3,"span",2),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",3)(7,"div")(8,"span",2),e.EFF(9),e.nI1(10,"translate"),e.k0s()(),e.DNE(11,Ot,3,5,"frk-tooltip",4),e.k0s()(),e.j41(12,"div")(13,"div",2),e.EFF(14),e.k0s(),e.j41(15,"div",2),e.EFF(16),e.k0s()()()),2&r&&(e.Y8G("ngClass",null!=a.params&&a.params.isCardView?"justify-end":"justify-between"),e.R7$(),e.AVh("pr-2",null==a.params?null:a.params.isCardView),e.R7$(3),e.JRh(e.bMT(5,8,"products.gross-expense-ratio")),e.R7$(5),e.JRh(e.bMT(10,10,"products.net-expense-ratio")),e.R7$(2),e.vxM(a.tooltipContent?11:-1),e.R7$(3),e.SpI(" ",null!=a.params&&null!=a.params.rowData&&null!=a.params.rowData.charges&&a.params.rowData.charges.expenseRatioGross?null==a.params||null==a.params.rowData||null==a.params.rowData.charges?null:a.params.rowData.charges.expenseRatioGross:"-"," "),e.R7$(2),e.SpI(" ",null!=a.params&&null!=a.params.rowData&&null!=a.params.rowData.charges&&a.params.rowData.charges.expenseRatioNet?null==a.params||null==a.params.rowData||null==a.params.rowData.charges?null:a.params.rowData.charges.expenseRatioNet:"-"," "))},dependencies:[P.MD,P.YU,C.b6,S.TranslatePipe],encapsulation:2,changeDetection:0})}return s})(),Aa=(()=>{class s{params;documentUrl="";isCardView=(0,e.vPA)(!1);literatureService=(0,e.WQX)(S.LITERATURE_SERVICE);loggerService=(0,e.WQX)(x.L);modalService=(0,e.WQX)(C.Bg);windowRef=(0,e.WQX)(fe.Qc);locationRef=(0,e.WQX)(fe.zz);destroyRef=(0,e.WQX)(e.abz);ngOnChanges(){this.isCardView.set(this.params?.isCardView??!1)}onFundDownload(){this.literatureService.getLiteratureDetails$({productId:this.params?.rowData.productId,isCached:!0,documentTypes:["FACT-SHEET","Factsheet"],shareClassCode:this.params?.rowData.shareClassCode}).pipe((0,ve.$)(),(0,y.pQ)(this.destroyRef)).subscribe({next:r=>{const a=r.productLiterature;if(this.modalService.close("factsheetModal"),"loaded"===a?.status&&a.literatureDocs[0]?.customFilePath)this.documentUrl=`${this.locationRef.origin}/${this.params?.cellRendererParams.documentDownloadUrl}${a.literatureDocs[0].customFilePath}`,this.windowRef.open(this.documentUrl,"_blank");else if("loaded"===a?.status&&a.literatureDocs[0]?.docId){const n=a.literatureDocs[0].downloadUrl.replace("&download=true","").replace("?download=true","");this.windowRef.open(n,"_blank")}else this.modalService.open("factsheetModal")},error:r=>{this.loggerService.debug("FactsheetCellRendererComponent","Error fetching literature details",r)}})}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-factsheet-cell-renderer"]],hostAttrs:["data-gtm-component","factsheet-cell-renderer"],inputs:{params:"params"},features:[e.OA$],decls:14,vars:16,consts:[["type","button",1,"button",3,"click","ngClass"],["name","heroArrowDownTray",1,"size-4",3,"size"],[1,"sr-only"],["id","factsheetModal",3,"modalCloseLabel","ariaCloseLabel","showCloseButton"],["data-testid","signIn",1,"min-w-auto","ml-4","md:min-w-[500px]","lg:min-w-[768px]"],[1,"mb-2","font-normal"],[1,"normal","mb-8"]],template:function(r,a){1&r&&(e.j41(0,"button",0),e.bIt("click",function(){return a.onFundDownload()}),e.nrm(1,"frk-heroicon",1),e.DNE(2,Wt,2,3)(3,Vt,3,3,"span",2),e.k0s(),e.j41(4,"frk-modal",3),e.nI1(5,"translate"),e.nI1(6,"translate"),e.j41(7,"section",4)(8,"h2",5),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"p",6),e.EFF(12),e.nI1(13,"translate"),e.k0s()()()),2&r&&(e.Y8G("ngClass",a.isCardView()?"button--primary rounded-full":"button--action-light button--action"),e.R7$(),e.Y8G("size",16),e.R7$(),e.vxM(a.isCardView()?2:3),e.R7$(2),e.Y8G("modalCloseLabel",e.bMT(5,8,"common.aria-label.close-modal"))("ariaCloseLabel",e.bMT(6,10,"common.aria-label.close-modal"))("showCloseButton",!0),e.R7$(5),e.SpI(" ",e.bMT(10,12,"products.fact-sheet-not-available")," "),e.R7$(3),e.SpI(" ",e.bMT(13,14,"products.fact-sheet-not-exist-text")," "))},dependencies:[P.MD,P.YU,C.zf,S.TranslatePipe,C.zq],encapsulation:2,changeDetection:0})}return s})(),te=(()=>{class s{params;intlService=(0,e.WQX)(x.I);lastValidHeaderName;hasRowData(t){return!!t&&(Array.isArray(t)?t.length>0:Object.keys(t).length>0)}get headerName(){const t=this.params?.rowData;if(this.hasRowData(t)){const r=this.createColumnLabel();return r&&(this.lastValidHeaderName=r),r}return this.lastValidHeaderName}createColumnLabel(){const t=Array.isArray(this.params?.rowData)?this.params.rowData[0]?.performanceAsOfDateStd:this.params?.rowData.performanceAsOfDateStd,r=new Date(t);if("CALENDAR_YEAR"===this.params?.headerComponentParams?.performanceType){let a=function mt(s,o){return(0,Ue.a)(s,o?.in).getFullYear()}(r);return 11===function gt(s,o){return(0,Ue.a)(s,o?.in).getMonth()}(r)&&a++,Number.isNaN(a)?"\u2014":(a-this.params.headerComponentParams.yearsAgo).toString()}return"DISCRETE"===this.params?.headerComponentParams?.performanceType?(0,Ct.f)(r)?`${this.intlService.toLocalMonthYearShort((0,$e.d)(r,this.params.headerComponentParams.yearsAgo)).trim().split(" ").join("-")} / ${this.intlService.toLocalMonthYearShort((0,$e.d)(r,this.params.headerComponentParams.yearsAgo-1)).trim().split(" ").join("-")}`:"\u2014":""}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-performance-view-header-name-cell-renderer"]],inputs:{params:"params"},decls:2,vars:1,consts:[[1,"flex","flex-col"],[1,"font-medium"]],template:function(r,a){1&r&&(e.j41(0,"div",0),e.DNE(1,Yt,2,1,"span",1),e.k0s()),2&r&&(e.R7$(),e.vxM(a.headerName?1:-1))},encapsulation:2,changeDetection:0})}return s})(),Fa=(()=>{class s{params;fundUrl="";identifier="";suffix=void 0;secondarySuffixType=void 0;get identifierValue(){const t=this.params;if(t?.rowData&&this.identifier)return t.rowData[this.identifier]}ngOnChanges(){if(this.params?.cellRendererParams.getProductPageUrl){const t=this.params,r=t.cellRendererParams.getProductPageUrl({fundId:t.rowData.productId,shareClassCode:t.rowData.shareClassCode,fundName:t.rowData.productName,identifier:t.rowData.identifierTicker})??"";this.fundUrl=`${r}`;const a=t.cellRendererParams.getDefaultIdentifierKey(t.rowData.productTaxonomy);this.identifier=a?`identifier${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()}`:"";const n=this.params.cellRendererParams.getSuffixConfig?.();this.suffix=n?.productNameSuffix,this.secondarySuffixType="sponsorFeeOrExpenseRatio"===n?.secondarySuffixType?this.getDynamicSuffixType(t.rowData):n?.secondarySuffixType}}getDynamicSuffixType(t){const r=t.charges;if(!r)return;const a=r.sponsorFeeGross&&"\u2014"!==r.sponsorFeeGross||r.sponsorFeeNet&&"\u2014"!==r.sponsorFeeNet;return!a&&(r.expenseRatioGross&&"\u2014"!==r.expenseRatioGross||r.expenseRatioNet&&"\u2014"!==r.expenseRatioNet)?"expense-ratio":a?"sponsor-fee":"expense-ratio"}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-product-name-cell-renderer"]],hostAttrs:["data-gtm-component","ppss-product-name-link"],inputs:{params:"params"},features:[e.OA$],decls:9,vars:4,consts:[["fundNameContent",""],[1,"flex","flex-col"],[1,"frk-size--large","frk-layout--horizontal","group","flex","flex-wrap"],[1,"group-[.frk-theme--dark]:text-nc1-0","text-pc1-500","inline-block","text-base","font-normal","transition-all","duration-300","hover:underline",3,"routerLink"],[1,"mb-0","mt-1","text-xs","font-normal"],[1,"mt-1","flex","flex-wrap","gap-1"],[4,"ngTemplateOutlet"],[1,"group-[.frk-theme--light]:text-nc1-950","group-[.frk-theme--dark]:text-nc1-0","m-0","mt-1","text-sm","font-normal"],[1,"align-middle"],["name","heroBellAlert",1,"frk-icon","frk-icon--info",3,"size"],[3,"tooltipTitle","a11yPretext","ariaLabel"],[1,"bg-nc1-0","border-pc1-800","text-pc1-800","group-[.frk-theme--dark]:border-nc1-0","group-[.frk-theme--dark]:text-nc1-0","inline-block","w-fit","rounded","border","px-2","py-0.5","text-xs","font-medium","group-[.frk-theme--dark]:bg-transparent"],[1,"text-base","font-normal"],[1,"whitespace-nowrap"]],template:function(r,a){
1if(1&r&&(e.j41(0,"div",1)(1,"div",2),e.DNE(2,jt,1,1,"ng-container")(3,Ht,2,2,"a",3),e.k0s(),e.DNE(4,rr,3,1)(5,sr,6,3,"p",4)(6,or,3,2,"div",5),e.k0s(),e.DNE(7,pr,5,2,"ng-template",null,0,e.C5r)),2&r){let n;e.R7$(2),e.vxM(null!=a.params&&null!=a.params.rowData&&a.params.rowData.isSoftLaunch?2:3),e.R7$(2),e.vxM(null!=a.params&&null!=a.params.cellRendererParams&&null!=a.params.cellRendererParams.getSuffixConfig&&null!=(n=a.params.cellRendererParams.getSuffixConfig())&&n.showSecondSuffix?4:-1),e.R7$(),e.vxM(null!=a.params&&null!=a.params.rowData&&null!=a.params.rowData.ppssAlert&&a.params.rowData.ppssAlert.ppssMessage?5:-1),e.R7$(),e.vxM(null!=a.params&&null!=a.params.cellRendererParams&&a.params.cellRendererParams.showBadge?6:-1)}},dependencies:[P.MD,P.T3,S.TranslatePipe,C.zq,C.b6,I.iI,I.Wk],encapsulation:2,changeDetection:0})}return s})(),me=(()=>{class s{intlService=(0,e.WQX)(x.I);numberOfFunds;stars=(0,e.vPA)([]);isHollowStar=(0,e.vPA)(!1);params;emdash=u.BX;ngOnChanges(){if(!this.params?.cellRendererParams||!this.params?.rowData)return;const{ratingsPath:t,yearsSinceInception:r,numberOfFundsPath:a}=this.params.cellRendererParams;this.numberOfFunds=a?(0,Z.A)(this.params.rowData,a,null):null;const n=(0,Z.A)(this.params.rowData,"inceptionDateStd",void 0);if(n){const l=new Date(n),c=Number.isNaN(l.getTime())?void 0:this.intlService.toDate(l),d=(0,$e.d)(this.intlService.today(),r);this.isHollowStar.set(!!c&&c>d)}else this.isHollowStar.set(!1);const i=(0,u.wR)((0,Z.A)(this.params.rowData,t,"0"));this.stars.set(Array.from({length:i||0}))}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-ratings-cell-renderer"]],inputs:{params:"params"},features:[e.OA$],decls:2,vars:2,consts:[[1,"items-centers","mb-1","flex","gap-[2px]","text-base"],[1,"h-4","w-4"],[1,"mb-0"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 95.33 91.92"],["points","65.82 56.74 77.17 91.92 47.66 70.22 18.3 91.92 29.79 56.74 0 34.47 36.6 34.47 47.66 0 58.59 34.47 95.33 34.47 65.82 56.74"],[3,"tooltipTitle","ariaLabel"]],template:function(r,a){if(1&r&&e.DNE(0,gr,5,4)(1,Cr,2,1,"span"),2&r){let n,i;e.vxM(null!=(n=a.stars())&&n.length?0:-1),e.R7$(),e.vxM(null!=(i=a.stars())&&i.length?-1:1)}},dependencies:[P.MD,S.TranslatePipe,C.b6],encapsulation:2,changeDetection:0})}return s})(),Ze=(()=>{class s{tableFilterStateService=(0,e.WQX)(V);params;selectedProduct=(0,e.vPA)({});productTobeUnchecked=(0,e.EWP)(()=>this.tableFilterStateService.uncheckedProductsFromPPSS());cdr=(0,e.WQX)(e.gRc);constructor(){(0,e.QZP)(()=>{const t=this.productTobeUnchecked();this.updateCheckboxState(t)})}updateCheckboxState(t){if(!this.params?.rowData)return;const r=this.params.rowData;t.some(n=>n.fundId===r.productId&&n.shareClassCode===r.shareClassCode)&&r.isChecked&&(r.isChecked=!1,this.cdr.detectChanges(),this.selectedProduct.set({fundId:r.productId,shareClassCode:r.shareClassCode,isChecked:!1}))}productRowCheckboxHandler(t){if(this.params){const r={fundId:this.params.rowData.productId,shareClassCode:this.params.rowData.shareClassCode,productName:this.params.rowData.productName??void 0,isChecked:t.target.checked};this.params.rowData.isChecked=r.isChecked,this.selectedProduct.set(r),this.tableFilterStateService.manageSelectedProducts(r)}}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-select-row-cell-renderer"]],hostAttrs:["data-gtm-component","select-row-cell-renderer"],inputs:{params:"params"},decls:8,vars:6,consts:[[1,"checkbox","frk-size--small","group","mt-1","flex","print:hidden"],[1,"checkbox__label"],["type","checkbox",1,"peer","sr-only",3,"change","id","checked"],[1,"checkbox__wrapper"],["name","heroCheck","aria-hidden","true",3,"size"],[1,"checkbox__text","sr-only"]],template:function(r,a){1&r&&(e.j41(0,"div",0)(1,"label",1)(2,"input",2),e.bIt("change",function(i){return a.productRowCheckboxHandler(i)}),e.k0s(),e.j41(3,"div",3),e.nrm(4,"frk-heroicon",4),e.k0s(),e.j41(5,"span",5),e.EFF(6),e.nI1(7,"translate"),e.k0s()()()),2&r&&(e.R7$(2),e.Y8G("id",null==a.params||null==a.params.rowData?null:a.params.rowData.productId)("checked",null==a.params||null==a.params.rowData?null:a.params.rowData.isChecked),e.R7$(2),e.Y8G("size",16),e.R7$(2),e.JRh(e.bMT(7,4,"literature.accessibility.checkbox")))},dependencies:[P.MD,S.TranslatePipe,C.zq],encapsulation:2,changeDetection:0})}return s})(),wa=(()=>{class s{profileService=(0,e.WQX)(N.b);params;productUrl="";locationRef=(0,e.WQX)(fe.zz);loggerName="ProductBannerComponent";isWatchlistProduct=(0,e.vPA)(void 0);isCardView=(0,e.vPA)(!1);storageService=(0,e.WQX)(N.d);
1signInModalService=(0,e.WQX)(S.SignInModalService);logger=(0,e.WQX)(x.L);gtmParams={};ngOnChanges(){this.checkWatchlistProduct(this.params?.rowData),this.isCardView.set(this.params?.isCardView??!1),this.setGTMDirectiveParameters(this.params?.rowData)}ngOnInit(){if(this.params?.cellRendererParams.getProductPageUrl&&this.params.rowData){const t=this.params.cellRendererParams.getProductPageUrl({fundId:this.params.rowData.productId,shareClassCode:this.params.rowData.shareClassCode,fundName:this.params.rowData.productName,identifier:this.params.rowData.identifierTicker})??"";this.productUrl=`${this.locationRef.origin}${t}`}}setGTMDirectiveParameters(t){this.gtmParams={assetClass:t?.assetClass,productName:t?.productName??void 0,identifier:t?.identifierTicker??void 0,productShareClassId:t?.productShareClassCode,productType:t?.productType}}checkWatchlistProduct(t){this.profileService.getWatchlist$().subscribe({next:r=>{const a=r.some(n=>n.productShareClassCode===t.productShareClassCode);this.isWatchlistProduct.set(a)},error:r=>{this.logger.error(this.loggerName,"Error loading watchlist:",r)}})}updateWatchlist(){const t={productName:this.params?.rowData.productName,productType:this.params?.rowData.productType,productUrl:this.productUrl,productShareClassCode:this.params?.rowData.productId+"-"+this.params?.rowData.shareClassCode};this.profileService.isLoggedIn()?this.profileService.updateWatchlist(t):(this.storageService.store(N.i.LOGIN_ACTION_KEY,{action:"updateWatchlist",product:t},!0,!1),this.signInModalService.open("watchlist"))}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-watchlist-cell-renderer"]],hostAttrs:["data-gtm-component","watchlist-cell-renderer"],inputs:{params:"params"},features:[e.OA$],decls:3,vars:4,consts:[["type","button","frkAnalyticsWatchlist","",1,"button",3,"click","ngClass","gtmAttributes"],["name","heroBookmarkSolid",1,"size-4",3,"size"],[1,"sr-only"],["name","heroBookmark",1,"size-4",3,"size"]],template:function(r,a){1&r&&(e.j41(0,"button",0),e.bIt("click",function(){return a.updateWatchlist()}),e.DNE(1,Tr,3,2)(2,Pr,3,2),e.k0s()),2&r&&(e.Y8G("ngClass",a.isCardView()?"button--primary rounded-full":"button--action-light button--action")("gtmAttributes",a.gtmParams),e.BMQ("data-gtm-intent",a.isWatchlistProduct()?"remove_favourite":"add_favourite"),e.R7$(),e.vxM(a.isWatchlistProduct()?1:2))},dependencies:[P.MD,P.YU,S.TranslatePipe,C.zq,S.AnalyticsWatchlistDirective],encapsulation:2,changeDetection:0})}return s})();const R=s=>s.replace(/-|\s/g,"");let re=(()=>{class s{tableFilterStateService=(0,e.WQX)(V);placement;headerLabelKey;row;asOfDate;params;ngOnChanges(t){this.params?.cellRendererParams?.asOfDate&&this.params.rowData.length&&this.params.cellRendererParams.productType!==F.lM.MMF?t.params?.previousValue?.cellRendererParams?.asOfDate!==t.params?.currentValue?.cellRendererParams?.asOfDate&&(this.row=this.params.rowData.find(r=>{const a=this.params?.cellRendererParams.asOfDate;return void 0!==(0,Z.A)(r,a,void 0)&&(0,Z.A)(r,a,u.BX)!==u.BX}),this.asOfDate=(0,Z.A)(this.row,this.params.cellRendererParams.asOfDate,void 0)):this.params?.cellRendererParams?.isTnaAsOfDate?(this.showExpectWhereNoted(),this.asOfDate=this.tableFilterStateService.getTotalNetAssetAsOfDate()):this.asOfDate=this.tableFilterStateService.getNavAsOfDate(),"Managed Accounts"===this.params?.cellRendererParams?.productType&&(this.headerLabelKey="products.total-returns",this.placement=`${this.params.cellRendererParams.productType.replace(/-|\s/g,"")}TotalReturnsPPSS`)}showExpectWhereNoted(){this.params?.cellRendererParams&&(this.params.cellRendererParams.showExpectWhereNoted=this.params.cellRendererParams.productType===F.lM.TOF&&this.params.rowData.some(t=>t.isTotalNetAssetAsOfDateDifferent))}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-date-group-header"]],hostAttrs:["data-gtm-component","date-group-header"],inputs:{params:"params"},features:[e.OA$],decls:1,vars:1,consts:[[1,"text-nc1-950","text-xs","font-normal"],[1,"text-nc1-950","mb-0","text-xs","font-normal"],[3,"placement"]],template:function(r,a){1&r&&e.DNE(0,Rr,6,8),2&r&&e.vxM(a.asOfDate?0:-1)},dependencies:[P.MD,S.TranslatePipe,S.FootnoteComponent],encapsulation:2,changeDetection:0})}return s})(),ka=(()=>{class s{tableFilterStateService=(0,e.WQX)(V);placement;headerLabelKey;row;params;ngOnChanges(){this.row=this.params?.rowData.find(r=>r.calcTypeStd);let t=this.tableFilterStateService.getCurrentCalcType();("GROSS"===t||"PUREGROSS"===t)&&(t="GROSS"),this.headerLabelKey="products.perf-view-header-avg-annual-"+t,"Managed Accounts"===this.row?.productType&&(this.headerLabelKey+="-sma"),this.params?.cellRendererParams.selectedPerformanceView&&(this.headerLabelKey="products.show-performance"),this.placement=`${this.params?.cellRendererParams?.productType.replace(/-|\s/g,"")}TotalReturnsPerformance${(0,Xe.A)((0,He.A)(t))}`}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-performance-group-header"]],inputs:{params:"params"},features:[e.OA$],decls:2,vars:2,consts:[[1,"text-nc1-950","text-xs","font-normal"],[3,"placement"]],template:function(r,a){1&r&&e.DNE(0,xr,4,4)(1,Ar,3,4,"span",0),2&r&&(e.vxM(a.headerLabelKey&&a.placement?0:-1),e.R7$(),e.vxM(a.row?1:-1))},dependencies:[P.MD,S.FootnoteComponent,S.TranslatePipe],encapsulation:2,changeDetection:0})}return s})(),Ea=(()=>{class s{translateService=(0,e.WQX)(u.c$);footnotePlacement;tooltipTitle;asOfDateText;params;ngOnInit(){const t=this.params?.rowData.find(r=>r.ratings?.asOfDate&&r.ratings.asOfDate!==u.BX);this.asOfDateText=this.params?.cellRendererParams.selectedPerformanceView?`${this.translateService.instant("products.as-of")}\n ${t?.ratings?.asOfDate}`:`${this.translateService.instant("products.as-of")}\n ${t?.ratings?.asOfDate}\n ${this.translateService.instant("products.ratings-risk-adjusted-returns")}`,this.footnotePlacement="MorningStarRatingPPSS",this.tooltipTitle=this.translateService.tooltip("products.ratings-title")}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-ratings-group-header"]],inputs:{params:"params"},decls:7,vars:6,consts:[[1,"text-nc1-950","text-xs","font-normal"],[3,"placement"],[3,"tooltipTitle","ariaLabel"]],template:function(r,a){
1if(1&r&&(e.j41(0,"div",0),e.EFF(1),e.nI1(2,"translate"),e.DNE(3,Fr,1,1,"frk-footnote",1)(4,wr,2,4,"frk-tooltip",2),e.k0s(),e.j41(5,"span",0),e.EFF(6),e.k0s()),2&r){let n;e.R7$(),e.SpI(" ",e.bMT(2,4,null!==(n=null==a.params||null==a.params.cellRendererParams?null:a.params.cellRendererParams.titleKey)&&void 0!==n?n:"products.morningstar-group-header-title")," "),e.R7$(2),e.vxM(a.footnotePlacement?3:-1),e.R7$(),e.vxM(a.tooltipTitle?4:-1),e.R7$(2),e.JRh(a.asOfDateText)}},dependencies:[P.MD,S.FootnoteComponent,S.TranslatePipe,C.b6],encapsulation:2,changeDetection:0})}return s})();let ge=(()=>{class s{loggerService=(0,e.WQX)(x.L);translateService=(0,e.WQX)(u.c$);getPerformanceViewSpecificColDefs(t,r){return r=r?.map(a=>{if("performance"===a.groupId){const n=t.selectedPerformanceView,i=n?ba[n]:[];return{...a,cols:i.length>0?a.cols.filter(l=>i.some(c=>l.toLowerCase().includes(c.toLowerCase()))):a.cols}}return a}),r}fetchColDefs(t,r=!1){let a=t.tabs[t.selectedTabIndex??0]?.groupColDefs;const n=[];return t.selectedPerformanceView&&!r&&(a=this.getPerformanceViewSpecificColDefs(t,a)),!r&&("ETFs"===t.selectedProductType||"Closed-End Funds"===t.selectedProductType)&&(a="NAV"===t.selectedCalcType?a?.filter(i=>"marketPrice"!==i.groupId):a?.filter(i=>"navPricing"!==i.groupId&&"nav"!==i.groupId)),a?.length&&a.forEach(i=>{const l=[];i.cols.forEach(d=>{const p=this.generateColDef(d,t);p&&l.push({...p,headerName:p.headerName?this.translateService.instant(p.headerName):""})});const c=this.generateGroupHeader(i.groupId,l,t);n.push(c)}),this.loggerService.info("TableColdefService","Generated Coldefs:",n),n}generateColDef(t,r){return this.generatePricingColDef(t,r)??this.generatePerformanceColDef(t,r)??this.generateAdditionalColDef(t,r)}generatePricingColDef(t,r){switch(t){case"selectRow":return(s=>f({field:"selectAll",headerName:"",hasCheckboxColumn:!0,cellRenderer:Ze},s))();case"fundName":return(s=>f({field:"productName",headerName:"pds.FUND_NAME",isSortable:!0,isAlignRight:!1,isCardTitle:!0,dataType:"string",cellRenderer:Fa,widthClass:"w-2/6"},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{}),getDefaultIdentifierKey:r.getDefaultIdentifierKey,getSuffixConfig:r.getSuffixConfig},colId:t});case"shareClass":return((s,o)=>{const t={field:"shareClassName",headerName:"products.ppss-share-class",footnotePlacement:`${R(s.productType)}ShareClassPPSS`,isAlignRight:!1,isSortable:!0,dataType:"string",valueGetter:r=>r.node.isSingleShareClass?u.BX:r.node.shareClassName,widthClass:"w-[125px]"};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"nav":return((s,o)=>{const t={field:"navValue",footnotePlacement:`${R(s.productType)}NavPPSS`,headerName:"products.ppss-nav-value",valueGetter:r=>r.node.nav?.navValue||u.BX,isAlignRight:!0,dataType:"currency",isSortable:!0,widthClass:"whitespace-nowrap"};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"navChange":return((s,o)=>{const t={field:"navChangePercentage",headerName:"pds.DAILY_NAV_CHANGE",footnotePlacement:`${R(s.productType)}NavChangePPSS`,valueGetter:r=>r.node.nav?.navChangePercentage,cellRenderer:r=>r.nav?.navChangeValue?`<p class="mb-0 text-nc1-950 text-base">${r.nav.navChangePercentage}</p>\n <p class="mb-0 text-nc1-950 text-sm">${r.nav.navChangeValue}</p>\n ${"Mutual Funds"===s.productType||"Tender Offer Funds"===s.productType?`<p class="mb-0 text-nc1-950 text-sm">${r.isNavAsOfDateDifferent?`(${s.translatedLabel} ${r.nav.navAsOfDate})`:""}</p>`:""}\n `:u.BX,isAlignRight:!0,dataType:"percent",isSortable:!0};return f(t,o)})({productType:r.selectedProductType,translatedLabel:this.translateService.instant("pds.PERF_AS_OF_DATE")},{colId:t});case"navYtd":return((s,o)=>{const t={field:"navYearToDateReturn",headerName:"Mutual Funds"===s.productType||"Managed Accounts"===s.productType||"Collective Investment Trust"===s.productType?"products.nav-ytd":"products.ytd-total-returns-nav",footnotePlacement:`${R(s.productType)}NavYtdPPSS`,valueGetter:r=>r.node.nav?.navYearToDateReturn||u.BX,isAlignRight:!0,isSortable:!0,dataType:"percent"};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"marketPrice":return((s,o)=>{const t={field:"marketPriceValue",headerName:"pds.MARKET_VALUE",footnotePlacement:`${R(s.productType)}MarketPricePPSS`,valueGetter:r=>r.node.nav?.marketPriceValue||u.BX,isAlignRight:!0,dataType:"currency",isSortable:!0};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"marketPriceChange":return((s,o)=>{const t={field:"marketPriceChangePercentage",headerName:"pds.MARKET_PRICE_VALUE_CHANGE_PCT",footnotePlacement:`${R(s.productType)}MarketPriceChangePPSS`,valueGetter:r=>r.node.nav?.marketPriceChangePercentage,cellRenderer:r=>r.nav?.marketPriceChangeValue?`<p class="mb-0 text-nc1-950 text-base">${r.nav.marketPriceChangePercentage}</p>\n <p class="mb-0 text-nc1-950 text-sm">${r.nav.marketPriceChangeValue}</p>`:u.BX,isAlignRight:!0,dataType:"percent",isSortable:!0};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"ytdTotalReturnsAtMktPrice":case"marketPriceYtd":return((s,o)=>{const t={field:"marketPriceYearToDateReturn",headerName:"ETFs"===s.productType||"Closed-End Funds"===s.productType||"Money Market Funds"===s.productType||"Tender Offer Funds"===s.productType||"Interval Funds"===s.productType?"products.ytd-total-returns-market-price":"products.market-price-ytd",footnotePlacement:`${R(s.productType)}MarketPriceYtdPPSS`,valueGetter:r=>r.node.nav?.marketPriceYearToDateReturn||u.BX,isAlignRight:!0,isSortable:!0,dataType:"percent"};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"avgAnnual1Yr":return(s=>f({field:"avgAnnual1YearReturn",headerName:"pds.AVG_ANNUAL_RET_1YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"avgAnnual3Yr":return(s=>f({field:"avgAnnual3YearReturn",headerName:"pds.AVG_ANNUAL_RET_3YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"avgAnnual5Yr":return(s=>f({field:"avgAnnual5YearReturn",headerName:"pds.AVG_ANNUAL_RET_5YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"avgAnnual7Yr":return(s=>f({field:"avgAnnual7YearReturn",headerName:"products.ppss-sevenYear",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"avgAnnual10Yr":return(s=>f({field:"avgAnnual10YearReturn",headerName:"pds.AVG_ANNUAL_RET_10YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"avgAnnualSinceInception":return((s,o)=>{const t={field:"avgAnnualSinceInceptionReturn",headerName:"products.sinceInception",footnotePlacement:`${R(s.productType)}PerfInceptionPPSS`,isAlignRight:!0,isSortable:!0,dataType:"number",widthClass:"w-[120px]",cellRenderer:r=>`<span>${r.avgAnnualSinceInceptionReturn||u.BX}</span>
1<p class="mb-0 text-sm font-normal text-nc1-950">\n ${r.performanceInceptionDate}\n </p>`};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"cumulative3Month":return(s=>f({field:"cummulativeReturn3Month",headerName:"products.CUMULATIVE_RET_3MTH_TOTAL_RETURNS",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulative3Mths":return(s=>f({field:"cummulativeReturn3Month",headerName:"pds.CUMULATIVE_RET_3MTH",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulativeYtd":return((s,o)=>{const t={field:"cummulativeReturnYearToDate",headerName:"products.ytd-total-returns",footnotePlacement:`${R(s.productType)}YtdTotalReturnsPPSS`,isAlignRight:!0,isSortable:!0,dataType:"number"};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"expenseRatio":return((s,o)=>{const t={field:"expenseRatio",headerName:"products.expense-ratio",isAlignRight:!0,footnotePlacement:`${R(s.productType)}ExpenseRatioPPSS`,cellRenderer:Ra,valueGetter:r=>r.node.charges?.expenseRatioGross,isSortable:!0,dataType:"percent"};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"totalExpenseRatio":return((s,o)=>{const t={field:"totalExpenseRatio",headerName:"products.expense-ratio",isAlignRight:!0,footnotePlacement:`${R(s.productType)}ExpenseRatioPPSS`,valueGetter:r=>r.node.charges?.expenseRatioNet,isSortable:!0,dataType:"percent"};return f(t,o)})({productType:r.selectedProductType},{colId:t});default:return null}}generatePerformanceColDef(t,r){switch(t){case"totalNetAssets":return((s,o)=>{const t={field:"totalNetAsset",headerName:"pds.TOTAL_NET_ASSETS",isAlignRight:!0,footnotePlacement:`${R(s.productType)}TotalNetAssetsPPSS`,dataType:"number",isSortable:!0,valueGetter:r=>r.node.totalNetAssetsStd||u.BX,cellRenderer:r=>r.totalNetAssets?`<span class="text-nc1-950 font-normal text-base">${r.totalNetAssets||u.BX}</span>\n ${"Tender Offer Funds"===s.productType?`<p class="mb-0 text-nc1-950 text-sm">${r.isTotalNetAssetAsOfDateDifferent?`(${s.translatedLabel} ${r.totalNetAssetAsOfDate})`:""}</p>`:""}\n `:u.BX};return f(t,o)})({productType:r.selectedProductType,translatedLabel:this.translateService.instant("pds.PERF_AS_OF_DATE")},{colId:t});case"distributionRateAtMarketPrice":return((s,o)=>{const t={field:"distributionRateAtPOP",headerName:"products.distribution-rate-market-price",footnotePlacement:`${R(s.productType)}DistributionRatePPSS`,isAlignRight:!0,dataType:"percent",isSortable:!0,valueGetter:r=>r.node.nav?.distributionRateAtPOP||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"distRateAtNav":return((s,o)=>{const t={field:"distributionRateAtNAV",headerName:"products.distribution-rate-nav",footnotePlacement:`${R(s.productType)}DistributionRatePPSS`,isAlignRight:!0,dataType:"percent",isSortable:!0,valueGetter:r=>r.node.nav?.distributionRateAtNAV||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"30DaySecWithWaiver":return((s,o)=>{const t={field:"secYieldThrtyDay",headerName:"pds.STD_SEC_YIELD_30_DAY",footnotePlacement:`${R(s.productType)}30DayStdYieldWithWaiverPPSS`,isAlignRight:!0,dataType:"percent",isSortable:!0,valueGetter:r=>r.node.yields?.secYieldThrtyDay||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"30DaySecWithoutWaiver":return((s,o)=>{const t={field:"secYieldThrtyDayWoWaiver",headerName:"pds.STD_SEC_YIELD_30_DAY_WO_WAIVER",footnotePlacement:`${R(s.productType)}30DayStdYieldWithoutWaiverPPSS`,isAlignRight:!0,dataType:"percent",isSortable:!0,valueGetter:r=>r.node.yields?.secYieldThrtyDayWoWaiver||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"7DayCurrentYieldWithWaiver":return((s,o)=>{const t={field:"currentYield7Day",headerName:"pds.CURR_YIELD_7DAY",isAlignRight:!0,isSortable:!0,dataType:"number",footnotePlacement:`${R(s.productType)}7DayCurrentYieldWithWaiverPPSS`,valueGetter:r=>r.node.yields?.currentYield7Day||u.BX};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"7DayCurrentYieldWithoutWaiver":return((s,o)=>{const t={field:"currentYield7DayWithoutWaiver",headerName:"pds.CURR_YIELD_7DAY_WO_WAIVER",isAlignRight:!0,isSortable:!0,dataType:"number",footnotePlacement:`${R(s.productType)}7DayCurrentYieldWithoutWaiverPPSS`,valueGetter:r=>r.node.yields?.currentYield7DayWithoutWaiver||u.BX};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"7DayEffectiveYieldWithWaiver":return((s,o)=>{const t={field:"effectiveYield7Day",headerName:"pds.EFFECTIVE_YIELD_7_DAY",isAlignRight:!0,isSortable:!0,dataType:"number",footnotePlacement:`${R(s.productType)}7DayEffectiveYieldWithWaiverPPSS`,valueGetter:r=>r.node.yields?.effectiveYield7Day||u.BX};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"7DayEffectiveYieldWithoutWaiver":return((s,o)=>{const t={field:"effectiveYield7DayWithoutWaiver",headerName:"pds.EFFECTIVE_YIELD_7_DAY_WO_WAIVER",isAlignRight:!0,isSortable:!0,dataType:"number",footnotePlacement:`${R(s.productType)}7DayEffectiveYieldWithoutWaiverPPSS`,valueGetter:r=>r.node.yields?.effectiveYield7DayWithoutWaiver||u.BX};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"morningstarCategory":return(s=>f({field:"morningStarCategory",headerName:"pds.MS_CATEGORY",footnotePlacement:"MorningStarCategoyPPSS",isAlignRight:!1,isSortable:!0,dataType:"string",valueGetter:t=>t.node.ratings?.morningStarCategory||u.BX,widthClass:"w-[180px]"},s))({colId:t});case"morningstarOverall":return(s=>f({field:"morningStarRatingOverall",headerName:"pds.MS_RATING_OVERALL",footnotePlacement:"MorningStarRatingPPSS",isSortable:!0,isAlignRight:!1,dataType:"number",valueGetter:t=>t.node.ratings?.morningStarRatingOverall,cellRenderer:me,cellRendererParams:{ratingsPath:"ratings.morningStarRatingOverall",yearsSinceInception:3},widthClass:"w-[180px]"},s))({colId:t});case"morningstar3Yr":return(s=>f({field:"morningStarRating3yr",headerName:"pds.MS_RATING_3YR",dataType:"number",isSortable:!0,valueGetter:t=>t.node.ratings?.morningStarRating3yr,cellRenderer:me,cellRendererParams:{ratingsPath:"ratings.morningStarRating3yr",yearsSinceInception:3,numberOfFundsPath:"ratings.monthEndNoOfFunds3yr"},isAlignRight:!1,widthClass:"w-[146px]"},s))({colId:t});case"morningstar5Yr":return(s=>f({field:"morningStarRating5yr",headerName:"pds.MS_RATING_5YR",dataType:"number",isSortable:!0,valueGetter:t=>t.node.ratings?.morningStarRating5yr,cellRenderer:me,cellRendererParams:{ratingsPath:"ratings.morningStarRating5yr",yearsSinceInception:5,numberOfFundsPath:"ratings.monthEndNoOfFunds5yr"},isAlignRight:!1,widthClass:"w-[146px]"},s))({colId:t});case"morningstar10Yr":return(s=>f({field:"morningStarRating10yr",headerName:"pds.MS_RATING_10YR",dataType:"number",isSortable:!0,valueGetter:t=>t.node.ratings?.morningStarRating10yr,cellRenderer:me,cellRendererParams:{ratingsPath:"ratings.morningStarRating10yr",yearsSinceInception:10,numberOfFundsPath:"ratings.monthEndNoOfFunds10yr"},isAlignRight:!1,widthClass:"w-[146px]"},s))({colId:t});case"dailyVolume":return((s,o)=>{const t={field:"dailyVolume",headerName:"products.daily-volume",footnotePlacement:`${R(s.productType)}DailyVolumePPSS`,isAlignRight:!0,isSortable:!0,dataType:"number",valueGetter:r=>r.node.nav?.dailyVolume||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"premiumDiscount":return((s,o)=>{const t={field:"premiumDiscount",headerName:"products.Premium-Discount",footnotePlacement:`${R(s.productType)}PremiumDiscountPPSS`,isAlignRight:!0,isSortable:!0,dataType:"number",valueGetter:r=>r.node.nav?.premiumDiscount||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"assetBasedFees":return((s,o)=>{const t={field:"annualCharge",headerName:"products.total-annual-op-expenses",footnotePlacement:`${R(s.productType)}AnnualAssetBasedFeesPPSS`,isAlignRight:!0,isSortable:!0,dataType:"percent",valueGetter:r=>r.node.charges?.annualCharge||u.nj};return f(t,o)})({productType:r.selectedProductType},{colId:t});default:return null}}generateAdditionalColDef(t,r){switch(t){case"factsheet":return(s=>f({field:"factSheet",headerName:"products.fact-sheet",isAlignCenter:!0,isFactSheet:!0,cellRenderer:Aa,widthClass:"print:hidden"},s))({cellRendererParams:{documentDownloadUrl:r.documentDownloadUrl},colId:t});case"watchlist":return(s=>f({field:"watchList",isAlignCenter:!0,headerName:"products.performance-favorite-products",isWatchList:!0,cellRenderer:wa,widthClass:"print:hidden"},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"discrete1Yr":return(s=>f({field:"discreteRollingYear1",headerName:"",headerComponent:te,headerComponentParams:{performanceType:"DISCRETE",yearsAgo:1},isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"discrete2Yr":return(s=>f({field:"discreteRollingYear2",headerName:"",headerComponent:te,headerComponentParams:{performanceType:"DISCRETE",yearsAgo:2},isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"discrete3Yr":return(s=>f({field:"discreteRollingYear3",headerName:"",headerComponent:te,headerComponentParams:{performanceType:"DISCRETE",yearsAgo:3},isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});
1case"discrete4Yr":return(s=>f({field:"discreteRollingYear4",headerName:"",headerComponent:te,headerComponentParams:{performanceType:"DISCRETE",yearsAgo:4},isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"discrete5Yr":return(s=>f({field:"discreteRollingYear5",headerName:"",headerComponent:te,headerComponentParams:{performanceType:"DISCRETE",yearsAgo:5},isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"discreteSinceInception":return(s=>f({field:"discreteSinceInception",headerName:"products.inception-date",isAlignRight:!0,isSortable:!0,dataType:"number",valueGetter:t=>t.node.performanceInceptionDate||u.BX},s))({colId:t});case"cumulativeYTD":return(s=>f({field:"cumulativeYtd",headerName:"pds.CUMULATIVE_RET_YTD",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulative1Yr":return(s=>f({field:"cumulativeYear1",headerName:"pds.CUMULATIVE_RET_1YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulative3Yr":return(s=>f({field:"cumulativeYear3",headerName:"pds.CUMULATIVE_RET_3YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulative5Yr":return(s=>f({field:"cumulativeYear5",headerName:"pds.CUMULATIVE_RET_5YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulative10Yr":return(s=>f({field:"cumulativeYear10",headerName:"pds.CUMULATIVE_RET_10YR",isAlignRight:!0,isSortable:!0,dataType:"number"},s))({colId:t});case"cumulativeSinceInception":return((s,o)=>{const t={field:"cummulativeSinceInception",headerName:"products.sinceInception",isAlignRight:!0,isSortable:!0,dataType:"number",cellRenderer:r=>`<span>${r.cumulativeSinceInception}</span><p class="mb-0 text-sm font-normal text-nc1-950">\n ${r.performanceInceptionDate}\n </p>`,footnotePlacement:`${R(s.productType)}PerfInceptionPPSS`};return f(t,o)})({productType:r.selectedProductType},{colId:t});case"currency":return(s=>f({field:"currency",headerName:"products.currency",isAlignRight:!0,isSortable:!0,dataType:"string",valueGetter:t=>t.node.currency,widthClass:"w-[100px]"},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"identifierIsin":return(s=>f({field:"identifierIsin",headerName:"products.isin",isAlignRight:!0,isSortable:!0,dataType:"string",valueGetter:t=>t.node.identifierIsin,widthClass:"w-[150px]"},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"identifierBloomberg":return(s=>f({field:"identifierBloomberg",headerName:"pds.BLOOMBERG_IDENTIFIER",isAlignRight:!0,isSortable:!0,dataType:"string",valueGetter:t=>t.node.identifierBloomberg,widthClass:"w-[150px]"},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"identifierFundNumber":return(s=>f({field:"identifierFundNumber",headerName:"pds.TA_ID",isAlignRight:!0,isSortable:!0,dataType:"string",widthClass:"w-[100px]",valueGetter:t=>t.node.identifierTaid||u.BX},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"identifierSedol":return(s=>f({field:"identifierSedol",headerName:"pds.SEDOL",isAlignRight:!0,isSortable:!0,dataType:"string",widthClass:"w-[100px]",valueGetter:t=>t.node.identifierSedol||u.BX},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"identifierBdrTicker":return(s=>f({field:"identifierBdrTicker",headerName:"products.BDR_TICKER",isAlignRight:!0,isSortable:!0,dataType:"string",widthClass:"w-[100px]",valueGetter:t=>t.node.identifierBdrTicker||u.BX},s))({cellRendererParams:{getProductPageUrl:r.getProductPageUrl??(()=>{})},colId:t});case"fundInceptionDate":return(s=>f({field:"performanceInceptionDate",headerName:"products.fund-inception-date",isAlignRight:!0,isSortable:!0},s))({colId:t});case"yieldToWorst":return(s=>f({field:"yieldToWorst",headerName:"products.YIELD_TO_WORST_WGT_AVG",isAlignRight:!0,isSortable:!0,dataType:"number",valueGetter:t=>t.node.portfolioCharacteristics?.find(a=>"YIELD_TO_WORST_WGT_AVG"===a.elementName)?.elementValue??u.BX},s))({colId:t});default:return null}}generateGroupHeader(t,r,a){switch(t){case"nav":case"distribution":case"marketPrice":case"dailyVolume":return((s,o)=>({groupTitle:"",groupHeaderComponent:re,colDefs:s,groupId:o}))(r,t);case"navPricing":return((s,o,t)=>({groupTitle:"",groupHeaderComponent:re,groupHeaderParams:{showExpectWhereNoted:"Mutual Funds"===t||"Tender Offer Funds"===t,productType:t},colDefs:s,groupId:o}))(r,t,a.selectedProductType);case"totalAssets":return((s,o,t)=>({groupTitle:"",groupHeaderComponent:re,groupHeaderParams:{isTnaAsOfDate:!0,showExpectWhereNoted:"Tender Offer Funds"===t,productType:t},colDefs:s,groupId:o}))(r,t,a.selectedProductType);case"performance":return((s,o,t,r)=>({groupTitle:"",groupHeaderComponent:ka,colDefs:s,groupId:o,groupHeaderParams:{productType:t,selectedPerformanceView:r}}))(r,t,a.selectedProductType,a.selectedPerformanceView);case"additionalPerformance":return((s,o,t)=>({groupTitle:"",groupHeaderComponent:re,groupHeaderParams:{asOfDate:"performanceAsOfDate",productType:o},colDefs:s,groupId:t}))(r,a.selectedProductType,t);case"yield":return((s,o,t)=>({groupTitle:"",groupHeaderComponent:re,groupHeaderParams:{asOfDate:"yields.stdYieldThirtyDayAsofDate",productType:t},colDefs:s,groupId:o}))(r,t,a.selectedProductType);case"morningstar":return((s,o,t)=>({groupTitle:"",groupHeaderComponent:Ea,groupHeaderParams:{selectedPerformanceView:t},colDefs:s,groupId:o}))(r,t,a.selectedPerformanceView);default:return((s,o)=>({groupTitle:"",colDefs:s,groupId:o}))(r,t)}}static \u0275fac=function(r){return new(r||s)};static \u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();const T={v:"",t:"z"};let We=(()=>{class s{loggerService=(0,e.WQX)(x.L);tableFilterStateService=(0,e.WQX)(V);translateService=(0,e.WQX)(u.c$);tableColdefService=(0,e.WQX)(ge);proximalService=(0,e.WQX)(S.PROXIMAL_SERVICE,{optional:!0});excelDownloadService=(0,e.WQX)(u.hR);locationRef=(0,e.WQX)(fe.zz);intlService=(0,e.WQX)(x.I);downloadPpssExcelDownloadHandler(t,r,a){const{allGroupHeaders:n,allMappedRecords:i,sheetNames:l}=this.buildWorkbookSheets(t,r),c=this.getFileName(t),d=t[0]?.productType,p=this.buildXlsCaveatKeyCandidates(d,"PpssXls");this.getXlsCaveats$(p).pipe((0,ie.s)(1),(0,y.pQ)(a)).subscribe({next:({topCaveat:g,bottomCaveat:v})=>{const _=this.tableFilterStateService.getNavAsOfDate()?(0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s"):null;this.excelDownloadService.exportToExcel([],g,v,_?[[_]]:[],"",c,{otherSections:[],allGroupHeaders:n,multipleWorkSheetsData:i,sheetNames:l,hasMultipleWorkSheets:!0})},error:g=>{this.loggerService.error("PpssExcelDownloadService",g)}})}buildXlsCaveatKeyCandidates(t,r){if(!t)return{topCaveats:[],bottomCaveats:[]};const a=(0,Xe.A)((0,He.A)(t));return{topCaveats:[`${r}${a}Top`],bottomCaveats:[`${r}${a}Bottom`]}}getXlsCaveats$(t){return this.proximalService?(0,j.z)([this.resolveFirstAvailableProximal$(t.bottomCaveats),this.resolveFirstAvailableProximal$(t.topCaveats)]).pipe((0,H.T)(([r,a])=>({topCaveat:a,bottomCaveat:r}))):(0,K.of)({topCaveat:[],bottomCaveat:[]})}resolveFirstAvailableProximal$(t){const r=this.proximalService;return r?(0,j.z)(t.map(a=>r.getProximals$(a).pipe((0,Se.W)(()=>(0,K.of)([]))))).pipe((0,H.T)(a=>a.find(n=>Array.isArray(n)&&n.length>0)??[])):(0,K.of)([])}buildWorkbookSheets(t,r){const a=[],n=[],i=[];
1r.tabs.forEach((c,d)=>{this.mapData(t,c,d,a,i,r),n.push(this.translateService.instant(c.labelKey))});const l=[];return a.forEach(c=>{const d=[];c[0]?.map(g=>Object.keys(g)).forEach(g=>{d.push(this.mapCol(g[0],{dataType:"string"}))});const p=[d];c.forEach(g=>{const v=[];g.forEach(_=>{v.push(Object.values(_)[0])}),p.push(v)}),l.push(p)}),{allGroupHeaders:i,allMappedRecords:l,sheetNames:n}}getFileName(t){return`franklin-templeton_us_${(0,ht.A)(t[0]?.productType.toLocaleLowerCase())}_${this.intlService.toLocalDate()}`}mapData(t,r,a,n,i,l){const c=[],d=[],p=r.groupColDefs.some(D=>D.cols.some(w=>w.startsWith("avgAnnual"))),g=!p&&r.groupColDefs.some(D=>"performance"===D.groupId&&D.cols.some(w=>w.startsWith("discrete")||w.startsWith("cumulative"))),v=t.some(D=>D.isNavAsOfDateDifferent&&this.hasValidAsOfDate(D.nav?.navAsOfDate));l.selectedTabIndex=a,l.selectedCalcType=l.defaultCalcType;const _=this.tableColdefService.fetchColDefs(l,!0);let L=[],A=[];_.forEach(D=>{"performance"===D.groupId&&p?(L=[...D.colDefs],c.push(D.colDefs[0])):"performance"===D.groupId&&g?(A=[...D.colDefs],c.push(D.colDefs[0])):D.colDefs.forEach(w=>{w.hasCheckboxColumn||c.push(w)})});const b=r;b.expandableGroupColDefs?.length&&b.expandableGroupColDefs.flatMap(w=>w.cols).forEach(w=>{const W=this.tableColdefService.generateColDef(w,l);W&&!c.some(E=>E.colId===w)&&c.push({...W,headerName:W.headerName?this.translateService.instant(W.headerName):""})});const G=[];t.forEach((D,w)=>{const W=[];c.forEach(E=>{E.cellRenderer?this.renderCellRendererCol(E,{data:D,cells:W,isFirst:0===w,groupHeaders:d,config:l,tab:r,shouldIncludeNavAsOfDateColumn:v}):E.valueGetter?this.renderValueGetterCol(E,{data:D,cells:W,isFirst:0===w,groupHeaders:d,config:l,tab:r,rowData:t}):E.field&&this.renderFieldCol(E,{data:D,cells:W,isFirst:0===w,groupHeaders:d,config:l,tab:r,rowData:t,performanceColDefs:L,periodReturnPerformanceColDefs:A})}),G.push(W)}),n.push(G),i.push(d)}renderCellRendererCol(t,r){const{data:a,cells:n,isFirst:i,groupHeaders:l,config:c,tab:d,shouldIncludeNavAsOfDateColumn:p=!1}=r;switch(t.colId){case"fundName":this.getCellFundName(t,a,n,i,l,c,d.labelKey);break;case"expenseRatio":this.getCellExpenseRatio(t,a,n,i,l);break;case"navChange":this.getNavChangeCols(t,a,n,l,i,!!c.isSalesChargeToggleVisible,p);break;case"totalNetAssets":this.getFundSizeCol(t,a,n,l,i);break;case"morningstarOverall":this.getMorningstarOverallRatings(t,a,n,i,l);break;case"marketPriceChange":this.getMarketPriceChange(t,a,n,i,l);break;default:this.defaultCellRenderer(t,a,n,l,i)}}renderValueGetterCol(t,r){const{data:a,cells:n,isFirst:i,groupHeaders:l,config:c,tab:d,rowData:p}=r;switch(t.colId){case"nav":this.getNavCols(t,a,n,i,l);break;case"navYtd":this.getNavYTDCols(t,a,n,d.labelKey,i,l,c);break;case"30DaySecWithoutWaiver":this.getYieldWithoutWaiver(t,a,n,i,l,p);break;case"30DaySecWithWaiver":this.getYieldWithWaiver(t,a,n,i,l);break;case"7DayCurrentYieldWithWaiver":this.get7DayCurrentYieldWithWaiver(t,a,n,i,l);break;case"7DayCurrentYieldWithoutWaiver":this.get7DayCurrentYieldWithoutWaiver(t,a,n,i,l);break;case"7DayEffectiveYieldWithWaiver":this.get7DayEffectiveYieldWithWaiver(t,a,n,i,l);break;case"7DayEffectiveYieldWithoutWaiver":this.get7DayEffectiveYieldWithoutWaiver(t,a,n,i,l);break;case"distRateAtNav":this.getDistributionRateAtNAV(t,a,n,i,l);break;case"distributionRateAtMarketPrice":this.getDistributionRateAtMarketPrice(t,a,n,i,l);break;case"premiumDiscount":this.premiumDiscount(t,a,n,i,l);break;case"dailyVolume":this.getDailyVolume(t,a,n,i,l);break;case"ytdTotalReturnsAtMktPrice":case"marketPriceYtd":this.getTotalReturnsAtMktPrice(t,a,n,d.labelKey,i,l);break;case"marketPrice":this.getMarketPrice(t,a,n,i,l);break;case"assetBasedFees":this.getAssetBasedFees(t,a,n,i,l);break;case"yieldToWorst":this.getYieldToWorstCol(t,a,n,i,l);break;default:n.push({[t.headerName]:this.mapCol(t.valueGetter({colDef:t,node:a}),t)}),i&&l.push(T)}}renderFieldCol(t,r){const{data:a,cells:n,isFirst:i,groupHeaders:l,config:c,tab:d,rowData:p,performanceColDefs:g,periodReturnPerformanceColDefs:v}=r;t.colId?.startsWith("avgAnnual")?this.getPerformanceColsBasedOnCalcType(a,n,g,i,l,c):t.colId?.includes("cumulative3Month")||t.colId?.includes("cumulative3Mths")?this.getCumulative3Month(t,a,n,i,l,c,p):t.colId?.includes("cumulativeYtd")?this.getCumulativeYTD(t,a,n,i,l,c,p):t.colId?.startsWith("discrete")||t.colId?.startsWith("cumulative")?this.getPeriodReturnPerformanceCols(a,n,v,i,l,c,d,p):(n.push({[t.headerName]:this.mapCol(a[t.field],t)}),i&&l.push(T))}getCumulative3Month(t,r,a,n,i,l,c){const d=r.performance?.[l.selectedPeriodEnd].find(p=>
1"NET"===p.calcTypeStd);if(n){const p=c.map(v=>v.performance?.[l.selectedPeriodEnd]?.find(_=>"NET"===_.calcTypeStd)?.performanceAsOfDate).find(v=>this.hasValidAsOfDate(v)),g=this.getHeaderTextWithOptionalAsOfDate(this.translateService.instant("products.total-returns"),p);i.push((0,u.KQ)(g,"s"))}a.push({[l.isServicingXls?this.translateService.instant("pds.CUMULATIVE_RET_3MTH")+" (%)":t.headerName+" (%)"]:this.mapCol(d?.cummulativeReturn3Month,t)})}getCumulativeYTD(t,r,a,n,i,l,c){n&&i.push(T);const d=r.performance?.[l.selectedPeriodEnd].find(p=>"NET"===p.calcTypeStd);a.push({[t.headerName+" (%)"]:this.mapCol(d?.cummulativeReturnYearToDate,t)}),this.getCumulative3MonthandYTDForGross(t,r,a,n,i,l,c)}getCumulative3MonthandYTDForGross(t,r,a,n,i,l,c){const d=r.performance?.[l.selectedPeriodEnd].find(p=>"PUREGROSS"===p.calcTypeStd);if(n){const p=c.map(v=>v.performance?.[l.selectedPeriodEnd]?.find(_=>"PUREGROSS"===_.calcTypeStd)?.performanceAsOfDate).find(v=>this.hasValidAsOfDate(v)),g=this.getHeaderTextWithOptionalAsOfDate(this.translateService.instant("products.total-returns"),p);i.push((0,u.KQ)(g,"s")),i.push(T)}a.push({[l.isServicingXls?this.translateService.instant("pds.CUMULATIVE_RET_3MTH")+" (%)":this.translateService.instant("products.CUMULATIVE_RET_3MTH_TOTAL_RETURNS")+" (%)"]:this.mapCol(d?.cummulativeReturn3Month,t)}),a.push({[t.headerName+" (%)"]:this.mapCol(d?.cummulativeReturnYearToDate,t)})}getPeriodReturnPerformanceCols(t,r,a,n,i,l,c,d){if(!a.length)return;const g=c.showPeriodEnd?["monthEnd","quarterEnd"]:[l.selectedPeriodEnd??"monthEnd"],v=(l.calcTypes.length?l.calcTypes[0]:l.defaultCalcType)??l.defaultCalcType,_=a.filter(b=>b.colId?.startsWith("discrete")),L=a.filter(b=>b.colId?.startsWith("cumulative"));[...g.map(b=>({titleKey:`products.perf-view-header-discrete-${v}`,periodEnd:b,cols:_,isDiscrete:!0})),...g.map(b=>({titleKey:`products.perf-view-header-cumulative-${v}`,periodEnd:b,cols:L,isDiscrete:!1}))].forEach(b=>{if(!b.cols.length)return;const G=t.performance?.[b.periodEnd]?.find(E=>E.calcTypeStd===v),D=this.findPeriodReturnSectionAsOfDate(d,b.periodEnd,v),w=this.findPeriodReturnSectionAsOfDateStd(d,b.periodEnd,v),W=b.cols.map(E=>b.isDiscrete?this.getPeriodReturnDiscreteHeader(E,w):this.getPeriodReturnCumulativeHeader(E));if(n){const E=this.translateService.instant(b.titleKey),Be=this.translateService.instant("monthEnd"===b.periodEnd?"products.xls_monthly":"products.xls_quarterly"),je=this.getHeaderTextWithOptionalAsOfDate(`${E} (%) ${Be}`,D);i.push((0,u.KQ)(je,"s")),i.push(...Array(b.cols.length-1).fill(T))}b.cols.forEach((E,Be)=>{const je=W[Be]??"";r.push({[je]:this.resolvePeriodReturnPerfCellValue(E,t,G)})})})}findPeriodReturnSectionAsOfDate(t,r,a){return t.map(n=>n.performance?.[r].find(i=>i.calcTypeStd===a)?.performanceAsOfDate).find(n=>this.hasValidAsOfDate(n))}findPeriodReturnSectionAsOfDateStd(t,r,a){return t.map(n=>n.performance?.[r].find(i=>i.calcTypeStd===a)?.performanceAsOfDateStd).find(n=>this.hasValidAsOfDate(n))}resolvePeriodReturnPerfCellValue(t,r,a){if("discreteSinceInception"===t.colId)return this.mapCol(r.performanceInceptionDate,{dataType:"date"});if("cumulativeSinceInception"===t.colId)return this.mapCol(a?.cumulativeSinceInception??"",t);const n=a?.[t.field];return this.mapCol(n,t)}getPeriodReturnDiscreteHeader(t,r){if("discreteSinceInception"===t.colId)return t.headerName||"";if(!t.headerName){const n=this.generateDiscreteDateRangeHeader(r,t.headerComponentParams?.yearsAgo??0);if(n)return n}return""}generateDiscreteDateRangeHeader(t,r){if(r<=0)return;const a=new Date(t||"");if(Number.isNaN(a.getTime()))return u.BX;const n=new Date(a);n.setFullYear(n.getFullYear()-r);const i=new Date(a);return i.setFullYear(i.getFullYear()-(r-1)),`${this.intlService.toLocalMonthYearShort(n).trim().split(" ").join("-")} / ${this.intlService.toLocalMonthYearShort(i).trim().split(" ").join("-")}`}getPeriodReturnCumulativeHeader(t){return t.headerName||""}getAssetBasedFees(t,r,a,n,i){n&&i.push(T),t.valueGetter&&a.push({[t.headerName+" (%)"]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}getMarketPrice(t,r,a,n,i){n&&i.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s")),t.valueGetter&&a.push({[t.headerName+" ($)"]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}getTotalReturnsAtMktPrice(t,r,a,n,i,l){"Pricing"!==this.translateService.instant(n)?i&&l.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s")):"Pricing"===this.translateService.instant(n)&&i&&l.push(T),t.valueGetter&&a.push({[this.translateService.instant("marketPriceYtd"===t.colId?"products.market-price-ytd":"products.ytd-total-returns-market-price")+" (%)"]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}getDailyVolume(t,r,a,n,i){n&&i.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s")),t.valueGetter&&a.push({[t.headerName+" (%)"]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}premiumDiscount(t,r,a,n,i){n&&i.push(T),t.valueGetter&&a.push({[this.translateService.instant("products.xls_premium-discount")]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}getDistributionRateAtMarketPrice(t,r,a,n,i){n&&i.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s")),t.valueGetter&&a.push({[this.translateService.instant("products.xls_market-price-distribution")]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}getDistributionRateAtNAV(t,r,a,n,i){if(n){const l=this.getHeaderTextWithOptionalAsOfDate("",this.tableFilterStateService.getNavAsOfDate());i.push((0,u.KQ)(l,"s"))}if(t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(r.nav?.distributionRateAtNAV,l.includes("%")?"n":"s")})}}getYieldWithWaiver(t,r,a,n,i){if(t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(l,l.includes("%")?"n":"s")})}n&&i.push(T)}get7DayCurrentYieldWithWaiver(t,r,a,n,i){if(n&&i.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s")),t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(l,l.includes("%")?"n":"s")})}}get7DayCurrentYieldWithoutWaiver(t,r,a,n,i){if(n&&i.push(T),t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(l,l.includes("%")?"n":"s")})}}get7DayEffectiveYieldWithWaiver(t,r,a,n,i){if(n&&i.push(T),t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(l,l.includes("%")?"n":"s")})}}get7DayEffectiveYieldWithoutWaiver(t,r,a,n,i){if(n&&i.push(T),t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(l,l.includes("%")?"n":"s")})}}getYieldWithoutWaiver(t,r,a,n,i,l){if(n){const c=l.map(p=>p.yields?.stdYieldThirtyDayAsofDate).find(p=>this.hasValidAsOfDate(p)),d=this.getHeaderTextWithOptionalAsOfDate("",c);i.push((0,u.KQ)(d,"s"))}if(t.valueGetter){const c=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:(0,u.KQ)(c,c.includes("%")?"n":"s")})}}
1getYieldToWorstCol(t,r,a,n,i){if(n&&i.push(T),t.valueGetter){const l=t.valueGetter({colDef:t,node:r});a.push({[t.headerName+" (%)"]:this.mapCol(l,t)})}}getMarketPriceChange(t,r,a,n,i){n&&i.push(T,T),t.valueGetter&&a.push({[t.headerName]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)}),a.push({[this.translateService.instant("products.xls_market-price-change-val-abs")]:this.mapCol(r.nav?.marketPriceChangeValue,{dataType:"currency"})})}getMorningstarOverallRatings(t,r,a,n,i){n&&i.push((0,u.KQ)(this.translateService.instant("products.ratings-title")+" "+this.translateService.instant("products.xls_as-of")+" "+r.ratings?.asOfDate+" "+this.translateService.instant("products.ratings-risk-adjusted-returns"),"s")),t.valueGetter&&a.push({[t.headerName]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)})}getCellFundName(t,r,a,n,i,l,c){let p;l.getProductPageUrl&&(p=`${this.locationRef.origin}/${l.getProductPageUrl({fundId:r.productId,shareClassCode:r.shareClassCode,fundName:r.productName,identifier:r.identifierTicker})}`),r.isSoftLaunch&&(p=void 0);const g=l.isServicingXls?this.getProductTypeFundNameHeaderLabel(r):this.getColumnFundNameHeaderLabel(t);this.pushFundNameCellForProductType({col:t,data:r,cells:a,isFirst:n,groupHeaders:i,linkUrl:p,headerLabel:g},l,c),l.showBadgeColumns&&this.pushBadgeCells(t,r,a,n,i)}pushFundNameCellForProductType(t,r,a){const{col:n,data:i,cells:l,isFirst:c,groupHeaders:d,linkUrl:p,headerLabel:g}=t,v=r.getSuffixConfig?.().productNameSuffix,_=!!r.isSalesChargeToggleVisible;if(_)switch(this.resolveFundNameCellVariant(r,a)){case"allTickers":this.getCellFundNameWithAllTickers(n,i,l,c,d,p,{suffix:v,headerLabel:g,isSalesChargeVisible:_});break;case"identifierTicker":this.getCellFundNameWithIdentifierTicker(n,i,l,c,d,p,{suffix:v,headerLabel:g});break;case"noTicker":this.getCellFundNameWithoutTicker(n,i,l,c,d,p,{headerLabel:g});break;case"shareClassAndCharges":this.getCellFundNameWithShareClassAndCharges(n,i,l,c,d,p,{suffix:v,headerLabel:g,isSalesChargeVisible:_})}else this.getCellFundNameWithoutTicker(n,i,l,c,d,p,{headerLabel:g,suffix:v})}resolveFundNameCellVariant(t,r){const a=t.selectedProductType,n="Yield"===this.translateService.instant(r);return a===F.lM.MF||a===F.lM.IF||!n&&a===F.lM.MMF?"allTickers":a===F.lM.ETF||a===F.lM.CEF||a===F.lM._529||a===F.lM.VIP||n&&a===F.lM.MMF?"identifierTicker":a===F.lM.SMA||a===F.lM.CIT?"noTicker":a===F.lM.TOF?"shareClassAndCharges":"none"}
1pushBadgeCells(t,r,a,n,i){a.push({[this.translateService.instant(`products.${r.investmentBadgeLabel??"investments"}`)]:this.mapCol(r.isInvested?"Yes":u.BX,t)},{[this.translateService.instant("products.performance-favorite-products")]:this.mapCol(r.isWatchlisted?"Yes":u.BX,t)}),n&&i.push(T,T)}getCellFundNameWithoutTicker(t,r,a,n,i,l,c){let d=r[t.field];"shareclass"===c?.suffix&&r.shareClassName?d+=` - ${r.shareClassName}`:"identifiers"===c?.suffix&&r.identifierTicker&&"-"!==r.identifierTicker?d+=` - ${r.identifierTicker}`:"identifiers-shareclass"===c?.suffix&&(r.identifierTicker&&"-"!==r.identifierTicker&&(d+=` - ${r.identifierTicker}`),r.shareClassName&&(d+=` (${r.shareClassName})`)),a.push({[c?.headerLabel??this.getColumnFundNameHeaderLabel(t)]:(0,u.KQ)(d,"s",l)}),n&&i.push(T)}getCellFundNameWithIdentifierTicker(t,r,a,n,i,l,c){const d=!!r.shareClassName&&("shareclass"===c?.suffix||"identifiers-shareclass"===c?.suffix);a.push({[c?.headerLabel??this.getColumnFundNameHeaderLabel(t)]:(0,u.KQ)(r[t.field],"s",l)},{[this.translateService.instant("products.xls_ticker")]:this.mapCol(r.identifierTicker,t)}),d&&a.push({[this.translateService.instant("products.ppss-share-class")]:this.mapCol(r.shareClassName,t)}),n&&(i.push(T,T),d&&i.push(T))}getCellFundNameWithShareClassAndCharges(t,r,a,n,i,l,c){const d=c?.isSalesChargeVisible??!0,p=!!r.shareClassName&&("shareclass"===c?.suffix||"identifiers-shareclass"===c?.suffix);a.push({[c?.headerLabel??this.getColumnFundNameHeaderLabel(t)]:(0,u.KQ)(r[t.field],"s",l)}),p&&a.push({[this.translateService.instant("products.ppss-share-class")]:this.mapCol(r.shareClassName,t)}),d&&a.push({[this.translateService.instant("products.xls_max-charges")]:this.mapCol(r.charges?.maxIntialSalesCharge,{dataType:"percent"})},{[this.translateService.instant("products.xls_cdsc")]:this.mapCol(r.charges?.cdsc,{dataType:"percent"})}),n&&(i.push(T),p&&i.push(T),d&&i.push(T,T))}getCellFundNameWithAllTickers(t,r,a,n,i,l,c){const d=c?.isSalesChargeVisible??!0,p=!!r.shareClassName&&"identifiers-shareclass"===c?.suffix;a.push({[c?.headerLabel??this.getColumnFundNameHeaderLabel(t)]:(0,u.KQ)(r[t.field],"s",l)},{[this.translateService.instant("products.xls_ticker")]:this.mapCol(r.identifierTicker,t)}),p&&a.push({[this.translateService.instant("products.ppss-share-class")]:this.mapCol(r.shareClassName,t)}),d&&a.push({[this.translateService.instant("products.xls_max-charges")]:this.mapCol(r.charges?.maxIntialSalesCharge,{dataType:"percent"})},{[this.translateService.instant("products.xls_cdsc")]:this.mapCol(r.charges?.cdsc,{dataType:"percent"})}),n&&(i.push(T,T),p&&i.push(T),d&&i.push(T,T))}getCellExpenseRatio(t,r,a,n,i){a.push({[this.translateService.instant("products.xls_expense-ratio-gross")]:this.mapCol(r.charges?.expenseRatioGross,t)},{[this.translateService.instant("products.xls_expense-ratio-net")]:this.mapCol(r.charges?.expenseRatioNet,t)}),n&&i.push(T,T)}getPerformanceColsBasedOnCalcType(t,r,a,n,i,l){if(!a.length)return;const c=l.selectedPeriodEnd,d=l.calcTypes.length?l.calcTypes:[l.defaultCalcType],p=l.tabs[0]?.showPeriodEnd;let g="";const v=_=>!!_&&("PUREGROSS"===g?"PUREGROSS"===_||"GROSS"===_:_===g);d.forEach(_=>{g="GROSS"===_||"PUREGROSS"===_?"PUREGROSS":_;const L=t.performance?.monthEnd.find(D=>v(D.calcTypeStd)),A=t.performance?.quarterEnd.find(D=>v(D.calcTypeStd)),b=p?void 0:t.performance?.[c].find(D=>v(D.calcTypeStd));(p&&L&&A||!p&&b)&&(n&&this.pushPerformanceGroupHeaders(i,a,t,l,_,p,c),this.pushPerformanceCells(r,a,t,p,b,L,A))})}pushPerformanceGroupHeaders(t,r,a,n,i,l,c){const d=n.selectedProductType===F.lM.SMA?"-sma":"";t.push((0,u.KQ)(this.translateService.instant(`products.perf-view-header-avg-annual-${i}${d}`)+" "+(l?this.translateService.instant("products.xls_monthly"):"")+" "+this.translateService.instant("products.xls_as-of")+" "+(l?a.performance?.monthEnd[0]?.performanceAsOfDate:a.performance?.[c][0]?.performanceAsOfDate),"s")),t.push(...Array(r.length).fill(T)),l&&(t.push((0,u.KQ)(this.translateService.instant(`products.perf-view-header-avg-annual-${i}${d}`)+" "+this.translateService.instant("products.xls_quarterly")+" "+this.translateService.instant("products.xls_as-of")+" "+a.performance?.quarterEnd[0]?.performanceAsOfDate,"
1s")),t.push(...Array(r.length).fill(T)))}pushPerformanceCells(t,r,a,n,i,l,c){const d=()=>{t.push({[this.translateService.instant("products.xls_since-inception-date")]:this.mapCol(a.performanceInceptionDate,{dataType:"date"})})},p=g=>{r.forEach(v=>{t.push({[v.headerName]:this.mapCol(g?.[v.field],v)})})};n?(p(l),d(),p(c),d()):(p(i),d())}getFundSizeCol(t,r,a,n,i){t.valueGetter&&(i&&(t.headerName=t.headerName+" ($)",n.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+r.totalNetAssetAsOfDate,"s"))),a.push({[t.headerName]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)}))}defaultCellRenderer(t,r,a,n,i){if("watchlist"!==t.colId&&"factsheet"!==t.colId){if(i&&n.push(T),t.valueGetter)return void a.push({[t.headerName]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)});a.push({[t.headerName]:this.mapCol(r[t.field],t)})}}getNavCols(t,r,a,n,i){t.valueGetter&&a.push({[this.translateService.instant("products.xls_nav-val-abs")]:this.mapCol(t.valueGetter({colDef:t,node:r}),t)}),n&&i.push((0,u.KQ)(this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate(),"s"))}getNavChangeCols(t,r,a,n,i,l=!0,c=!1){a.push({[this.translateService.instant("products.xls_nav-change-val-percent")]:this.mapCol(r.nav?.navChangePercentage,t)});const d=this.translateService.instant(l?"products.xls_nav-change-val-abs":"products.xls_nav-change-val");if(a.push({[d]:this.mapCol(r.nav?.navChangeValue,t)}),c){const p=r.isNavAsOfDateDifferent&&this.hasValidAsOfDate(r.nav?.navAsOfDate)?r.nav?.navAsOfDate:this.tableFilterStateService.getNavAsOfDate()??u.BX;a.push({[this.translateService.instant("products.xls_nav-as-of-date")]:(0,u.KQ)(p,"s")}),i&&n.push(T)}i&&n.push(T,T)}getNavYTDCols(t,r,a,n,i,l,c){if(a.push({[c.selectedProductType===F.lM.MF||c.selectedProductType===F.lM.SMA||c.selectedProductType===F.lM.CIT?this.translateService.instant("products.xls_nav-ytd"):this.translateService.instant("products.ytd-total-returns-nav")+" (%)"]:this.mapCol(r.nav?.navYearToDateReturn,t)}),i)if("Pricing"!==this.translateService.instant(n)){const d=this.translateService.instant("products.xls_as-of")+" "+this.tableFilterStateService.getNavAsOfDate();l.push((0,u.KQ)(d,"s"))}else l.push(T)}mapCol(t,r){let a;switch(r.dataType){case"currency":case"number":case"percent":a="n";break;case"date":a="d";break;default:a="s"}return(0,u.KQ)(t,a)}getHeaderTextWithOptionalAsOfDate(t,r){if(!this.hasValidAsOfDate(r))return t;const a=this.translateService.instant("products.xls_as-of")+" "+r;return t?`${t} ${a}`:a}hasValidAsOfDate(t){return!!t&&""!==t.trim()&&t!==u.BX}getProductTypeFundNameHeaderLabel(t){return t.productType}getColumnFundNameHeaderLabel(t){return t.headerName}static \u0275fac=function(r){return new(r||s)};static \u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();const Ma=["ASSET_CLASS","CLASS_GEOGRAPHY","CLASS_STRATEGY","INVESTMENT_MANAGER","INVESTMENT_GROUP","INVESTMENT_VEHICLE","FUND_CATEGORY","FUND_FAMILY","ETF_TYPE","METHODOLOGY","SFDR"],qe="ProductFilterService";let et=(()=>{class s{loggerService=(0,e.WQX)(x.L);searchService=(0,e.WQX)(S.SEARCH_SERVICE);tableFilterStateService=(0,e.WQX)(V);productListing=[];specificProductListingSignal=(0,e.vPA)([]);specificProductListing=this.specificProductListingSignal.asReadonly();savedSelectSearchFilterListing=null;savedSelectFilterListing=[];savedAllRatingFilterListing=[];savedFilteredProductListing=null;filteredProductListingSignal=(0,e.vPA)(null);filteredProductListing=this.filteredProductListingSignal.asReadonly();hasFirmSpecificActiveList=!1;showAllShareClasses=!1;start="0";initialRecordsToBeFetched="75";init(t,r){this.productListing=t,this.hasFirmSpecificActiveList=r}publishFilteredProductListing(){this.filteredProductListingSignal.set(this.savedFilteredProductListing)}filterProductListing(t,r,a="all",n="all",i={}){const{shouldExtractPerformanceData:l=!1,useLastFilteredProductListing:c=!1,shouldRefreshSpecificProductListing:d=!1,useSavedSelectFilterListing:p=!1,shouldPublishProductListing:g=!1,isFirstLoad:v=!1}=i;let _=i.start??this.start,L=i.number??this.initialRecordsToBeFetched,A=i.updatedProductListing??[];this.showAllShareClasses=t.showAllShareClasses??!1;
1const b=r?.info?.term;(0,Te.T)(()=>"search"===r?.type&&!!b,this.getSearchTermResults$(b??"",t.selectedProductType,_,L),(0,K.of)({isApiToBeCalledAgain:!1,totalResults:0,searchHits:[]})).subscribe({next:G=>{({start:_,number:L}=this.resolveFetchWindow(v,G.totalResults,_,L)),d&&this.specificProductListingSignal.set(this.getListingByWatchlistToggleValue(a)),"toggle"===r?.type&&"watchlist"===r.info.name?A=this.savedSelectSearchFilterListing?.filter(D=>this.matchesWatchlistToggle(D,a)):c?A=this.filteredProductListing()??[]:(A=[...A,...this.getProductListingByFilterType(a,G.searchHits,r,p)],v&&G.totalResults>Number(this.initialRecordsToBeFetched)&&G.isApiToBeCalledAgain&&this.filterProductListing(t,r,a,n,{shouldExtractPerformanceData:l,useLastFilteredProductListing:c,shouldRefreshSpecificProductListing:d,useSavedSelectFilterListing:p,shouldPublishProductListing:g,isFirstLoad:!1,start:_,number:L,updatedProductListing:A}),this.savedSelectSearchFilterListing=(0,z.A)(A)),l&&(A=A.map(D=>this.extractPerformanceData(t,D)),this.savedAllRatingFilterListing=(0,z.A)(A)),A=this.applyRatingToggleFilter(n),this.tableFilterStateService.selectedProductsFromPPSS().length&&this.tableFilterStateService.updateProductListingSelectState(A),this.loggerService.debug(qe,"Current filtered product listing state: ",A),this.savedFilteredProductListing=(0,z.A)(A),g&&this.publishFilteredProductListing()},error:G=>{this.loggerService.error(qe,"Error in fetching search result from elastic: ",G)}})}resolveFetchWindow(t,r,a,n){return t&&r?{start:this.initialRecordsToBeFetched,number:r.toString()}:t?{start:a,number:n}:{start:this.start,number:this.initialRecordsToBeFetched}}matchesWatchlistToggle(t,r){return"watchlist"!==r||!!t.isWatchlisted}applyRatingToggleFilter(t){return"all"===t?(0,z.A)(this.savedAllRatingFilterListing):this.savedAllRatingFilterListing.filter(r=>!!r.ratings?.morningStarRatingOverall&&r.ratings.morningStarRatingOverall>=Number(t))}getListingByWatchlistToggleValue(t){return"watchlist"===t?this.productListing.filter(r=>r.isWatchlisted):(0,z.A)(this.productListing)}getProductListingByFilterType(t,r,a,n){switch(a?.type){case"select":return this.getProductListingBySelectFilter(t,a.info);case"search":return this.getProductListingBySearchFilter(a.info,r,n);default:return this.savedSelectFilterListing=[],this.hasFirmSpecificActiveList||this.showAllShareClasses?this.specificProductListing():this.specificProductListing().filter(i=>i.isPrimary||i.isWatchlisted)}}getProductListingBySelectFilter(t,r){let a=(0,z.A)(this.specificProductListing());const n=!this.showAllShareClasses&&r.every(i=>Ma.includes(i.id));return r.forEach(i=>{i.options.length&&(a=a.filter(l=>this.isSpecificProductValid(t,l,i,n)))}),this.savedSelectFilterListing=a,a}isSpecificProductValid(t,r,a,n){let i=!1;return this.isProductValidForSelectFilterOption(r,a)&&(i=!("all"===t&&n&&!this.hasFirmSpecificActiveList)||r.isPrimary),i}isProductValidForSelectFilterOption(t,r){return"CLASS_STRATEGY"===r.id?r.options.includes(t.tclassStrategyLocal??"")||r.options.includes(t.tclassStyleLocal??"")||r.options.includes(t.tclassSubstyleLocal??"")||r.options.includes(t.investmentCategory??""):r.options.includes(t[Oe[r.id]])}getProductListingBySearchFilter(t,r,a){const n=t.term,i=a?this.savedSelectFilterListing:(0,z.A)(this.specificProductListing());return n?i.filter(l=>r.includes(l.productShareClassCode)):i}getSearchTermResults$(t,r,a,n){return this.searchService.findResult$(t,r,a,n).pipe((0,H.T)(i=>{let l=i.results?.response.hits.hits??[];const c=l.some(d=>5===d.score);return l=c?l.filter(d=>5===d.score):l,{isApiToBeCalledAgain:c&&l.length===+this.initialRecordsToBeFetched,totalResults:i.results?.response.hits.total.value,searchHits:l.map(d=>d.productShareClassCode)}}))}extractPerformanceData(t,r){const n=("monthEnd"===t.selectedPeriodEnd?r.performance?.monthEnd:r.performance?.quarterEnd)?.find(i=>"GROSS"!==t.selectedCalcType||"GROSS"!==i.calcTypeStd&&"PUREGROSS"!==i.calcTypeStd?i.calcTypeStd===t.selectedCalcType:i);return n?{...r,...n}:{...r}}static \u0275fac=function(r){return new(r||s)};static \u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();const tt="ProductListingService";let rt=(()=>{class s{loggerService=(0,e.WQX)(x.L);products=(0,e.WQX)(S.PRODUCTS_SERVICE);profileService=(0,e.WQX)(N.b);
1destroyRef=(0,e.WQX)(e.abz);caveatService=(0,e.WQX)(x.C);tableFilterStateService=(0,e.WQX)(V);productListing=[];productListing$=new q.B;hasFirmSpecificActiveListSignal=(0,e.vPA)(!1);hasFirmSpecificActiveList=this.hasFirmSpecificActiveListSignal.asReadonly();totalNumberOfProductsSignal=(0,e.vPA)(null);totalNumberOfProducts=this.totalNumberOfProductsSignal.asReadonly();navAsOfDate;totalNetAssetAsOfDate;getAllProductListing(){return this.productListing}getAllProductListing$(){return this.productListing$.asObservable()}initialize(t){this.profileService.getFirmSpecificActiveList$().pipe((0,oe.n)(r=>(this.hasFirmSpecificActiveListSignal.set(!!r?.length),(0,j.z)([this.products.getProductList$(t.selectedProductType),this.profileService.getWatchlist$(),this.caveatService.getPpssAlerts$()])))).pipe((0,y.pQ)(this.destroyRef)).subscribe({next:([r,a,n])=>{this.compareAsOfDate(r),r.length&&(Object.keys(n).length||a.length)&&(r=r.map(i=>this.mapDataToProducts(i,n,a))),this.loggerService.info(tt,"Product listing data from data-services: ",r),this.productListing=this.sortProductListing(r),this.productListing$.next(this.productListing),this.totalNumberOfProductsSignal.set(this.productListing.length)},error:r=>{this.loggerService.error(tt,"PPSS service error during loading data : ",r),this.productListing$.next(this.productListing),this.totalNumberOfProductsSignal.set(this.productListing.length)}})}compareAsOfDate(t){const r=t.reduce((n,i)=>{if(i.nav?.navAsOfDate){const l=he(i.nav.navAsOfDate),c=n?he(n):null;if(!n||l.isAfter(c))return i.nav.navAsOfDate}return n},""),a=t.reduce((n,i)=>{if(i.totalNetAssetAsOfDate){const l=he(i.totalNetAssetAsOfDate),c=n?he(n):null;if(!n||l.isAfter(c))return i.totalNetAssetAsOfDate}return n},"");this.navAsOfDate=r,this.totalNetAssetAsOfDate=a,this.tableFilterStateService.setNavAsOfDate(this.navAsOfDate),this.tableFilterStateService.setTotalNetAssetAsOfDate(this.totalNetAssetAsOfDate)}mapDataToProducts(t,r,a=[]){return(r[t.productShareClassCode]||r[t.productId])&&(t.ppssAlert=r[t.productShareClassCode]||r[t.productId]),a.length&&(t.isWatchlisted=a.some(n=>n.productShareClassCode===t.productShareClassCode)||!1),this.navAsOfDate?.length&&(t.isNavAsOfDateDifferent=this.navAsOfDate!==t.nav?.navAsOfDate),this.totalNetAssetAsOfDate?.length&&(t.isTotalNetAssetAsOfDateDifferent=this.totalNetAssetAsOfDate!==t.totalNetAssetAsOfDate),t}sortProductListing(t){return t.sort((r,a)=>{const n=(r.productName??"").localeCompare(a.productName??"");return 0===n?(r.shareClassName??"").localeCompare(a.shareClassName??""):n})}static \u0275fac=function(r){return new(r||s)};static \u0275prov=e.jDH({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();const ae="PpssComponent";let $a=(()=>{class s{bannerFilterStateService=(0,e.WQX)(Je);tableFilterStateService=(0,e.WQX)(V);tableColdefService=(0,e.WQX)(ge);productListingService=(0,e.WQX)(rt);productFilterService=(0,e.WQX)(et);translateService=(0,e.WQX)(u.c$);loggerService=(0,e.WQX)(x.L);profileService=(0,e.WQX)(N.b);responsiveService=(0,e.WQX)(x.R);modalService=(0,e.WQX)(C.Bg);ppssExcelDownloadService=(0,e.WQX)(We);router=(0,e.WQX)(M.Ix);activatedRoute=(0,e.WQX)(M.nX);location=(0,e.WQX)(Y.aZ);destroyRef=(0,e.WQX)(e.abz);config=e.hFB.required();isSalesCharge=(0,e.vPA)(!1);changedProductType=(0,e.CGW)();selectedProductType=(0,e.CGW)();proximalTopPlacement=(0,e.EWP)(()=>`PPSS${this.config().selectedProductType}Top`.replace(/-|\s/g,""));tabIdByLabelKey=(0,e.EWP)(()=>{const t={};
1return this.config().tabs.forEach(r=>{t[r.labelKey]=this.getNormalizedTabName(r.labelKey)}),t});filterInputs=(0,e.EWP)(()=>this.bannerFilterStateService.filterInputs());toggleCalcTypeButtons=(0,e.vPA)([]);togglePeriodEndButtons=(0,e.vPA)([]);togglePerformanceViewButtons=(0,e.vPA)([]);ratingsTypeToggle=(0,e.vPA)([{text:this.translateService.instant("products.ratings-all"),isActive:!0,value:"all"},{text:this.translateService.instant("products.ratings-3starplus"),isActive:!1,value:"3"},{text:this.translateService.instant("products.ratings-4starplus"),isActive:!1,value:"4"},{text:this.translateService.instant("products.ratings-5star"),isActive:!1,value:"5"}]);isCardView$;isHandheld$;isHandheld=!1;groupColDefs=(0,e.vPA)([]);rowData=(0,e.EWP)(()=>this.productFilterService.filteredProductListing());dropdownId=`excelDownloadDropDown${(0,J.A)()}`;dropdownOptions=[{label:this.translateService.instant("products.download_xls"),value:"",isHidden:!0},{label:this.translateService.instant("products.all_results"),value:"all_results",isHidden:!1},{label:this.translateService.instant("products.watchlist_results"),value:"watchlist_results",isHidden:!0}];defaultDropDownOption=this.dropdownOptions[0];isLoggedIn=(0,e.vPA)(!1);watchlistOptionHidden=(0,e.vPA)(!0);visibleDropdownOptions=(0,e.EWP)(()=>{const t=this.isLoggedIn(),r=this.profileService.isIdentified(),a=this.watchlistOptionHidden();return this.dropdownOptions.slice(1).filter(n=>"watchlist_results"===n.value?!(a||!t&&!r):!n.isHidden)});isDefaultOptionSelected=(0,e.vPA)(!1);fileName=(0,e.vPA)(void 0);selectedValue=(0,e.vPA)(void 0);modalId=`excelDownloadModal${(0,J.A)()}`;activeTab=(0,e.vPA)(null);getProductsFromPPSS=(0,e.EWP)(()=>this.tableFilterStateService.getSelectedProducts());toastMessage=(0,e.vPA)(void 0);toastType=(0,e.vPA)(C.Ck.SUCCESS);totalNumberOfProducts=(0,e.EWP)(()=>{const t=this.productFilterService.specificProductListing().length;return this.dropdownOptions[1].label=this.translateService.instant("products.all_results")+` (${this.productListingService.getAllProductListing().length})`,this.dropdownOptions[2].label=this.translateService.instant("products.watchlist_results")+` (${t})`,t});placementTop=(0,e.vPA)(null);watchlistToggleValue;ratingToggleValue="all";constructor(){(0,e.QZP)(()=>{const t=this.config();this.loggerService.info(ae,"config changes:",t),this.config().selectedCalcType=this.config().defaultCalcType,this.config().selectedPeriodEnd="Managed Accounts"===this.config().selectedProductType?"quarterEnd":"monthEnd",this.initConfigs()})}ngOnInit(){this.config().selectedCalcType=this.config().defaultCalcType,this.config().selectedPeriodEnd="Managed Accounts"===this.config().selectedProductType?"quarterEnd":"monthEnd",this.initConfigs(),this.tableFilterStateService.setCurrentCalcType(this.config().selectedCalcType),(0,j.z)([this.productListingService.getAllProductListing$(),this.profileService.isLoggedIn$()]).pipe((0,y.pQ)(this.destroyRef)).subscribe({next:([t,r])=>{this.initMain(t,r)},error:t=>{this.loggerService.error(ae,"Error in fetching all product listing: ",t)}}),this.productListingService.initialize(this.config()),this.initExtras()}initMain(t,r){this.isLoggedIn.set(r);const a=!r&&!this.profileService.isIdentified();this.bannerFilterStateService.initialize(this.config().filters??[],a,this.productListingService.hasFirmSpecificActiveList()?t:void 0,this.config().showWatchlistToggle),this.handlePreOrDefaultFilter(this.productListingService.getAllProductListing(),this.productListingService.hasFirmSpecificActiveList(),this.bannerFilterStateService.getSavedFilterInputs(),this.bannerFilterStateService.isPreFiltersAvailable())}initConfigs(){this.groupColDefs.set(this.tableColdefService.fetchColDefs(this.config()));const t={MARKET_PRICE:this.translateService.instant("products.market-price"),NAV:this.translateService.instant("products.nav"),GROSS:this.translateService.instant("products.gross"),NET:this.translateService.instant("products.net")},r={DISCRETE:this.translateService.instant("products.perf-view-discrete"),CUMULATIVE:this.translateService.instant("products.perf-view-cumulative")};
1this.config().calcTypes.length>1&&(this.config().isSalesChargeToggleVisible?this.toggleCalcTypeButtons.set(this.config().calcTypes.map(n=>({text:this.translateService.instant("NET"===n||"NAV"===n?"products.off":"products.on"),isActive:this.config().defaultCalcType===n,value:n}))):this.toggleCalcTypeButtons.set(this.config().calcTypes.map(n=>({text:t[n],isActive:this.config().selectedCalcType===n,value:n})))),this.config().availablePerformanceViews&&this.config().availablePerformanceViews.length>1&&this.togglePerformanceViewButtons.set(this.config().availablePerformanceViews.map(n=>({text:r[n],isActive:this.config().selectedPerformanceView===n,value:n})));const a={monthEnd:this.translateService.instant("products.MONTHLY"),quarterEnd:this.translateService.instant("products.QUARTERLY"),yearEnd:this.translateService.instant("products.YEARLY")};this.togglePeriodEndButtons().length||this.togglePeriodEndButtons.set(this.config().perfTypes[0]?.periodEnds.map(n=>({text:a[n],isActive:"monthEnd"===n,value:n}))??[])}initExtras(){this.profileService.getWatchlistSavedResult$().pipe((0,y.pQ)(this.destroyRef)).subscribe({next:t=>{if(t.isError)this.toastType.set(C.Ck.ERROR),this.toastMessage.set(this.translateService.instant("products.unable-to-add-product"));else{const r=`${t.productName} ${this.translateService.instant("add"===t.action?"products.added-to-watchlist":"products.removed-from-watchlist")}`;this.toastMessage.set(r),this.toastType.set(C.Ck.SUCCESS)}},error:t=>{this.loggerService.error(ae,"Error in getting saved result:",t)}}),this.isHandheld$=this.responsiveService.isHandheld$,this.isCardView$=(0,j.z)([this.responsiveService.isHandheld$,this.responsiveService.isTablet$,this.responsiveService.isMobile$]).pipe((0,H.T)(([t,r,a])=>(this.isHandheld=t,t||r||a))),this.isCardView$.subscribe({next:t=>{this.config().isCardView=t},error:t=>{this.loggerService.error(ae,"Error in isCardView$:",t)}}),this.placementTop.set(`PPSS${this.selectedProductType}Top`.replace(/-|\s/g,""))}onProductTypeChange(t){this.loggerService.debug(ae,"Selected Product Type: "+t),this.selectedProductType.emit(t)}onTabChange(t){const r=this.tabIdByLabelKey();this.config().selectedTabIndex=this.config().tabs.findIndex(i=>t.id===r[i.labelKey]),this.groupColDefs.set(this.tableColdefService.fetchColDefs(this.config()));const a=this.config().selectedTabIndex,n=void 0!==a&&a>=0?this.config().tabs[a]:void 0;this.activeTab.set(n?this.translateService.instant(n.labelKey):null),"click"===t.action&&this.updateURLOnTabChange(t.id.toLowerCase())}getNormalizedTabName(t){const r=this.translateService.instant(t);return this.normalizeTabIdPart(r)||"tab"}normalizeTabIdPart(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"")}updateURLOnTabChange(t){const r=this.bannerFilterStateService.queryParamsWithFragment(),a=r?.filter?.replace("filter=","").split("#")[0],n=r?.filter?.split("#")[1],i=this.router.createUrlTree([],{relativeTo:this.activatedRoute,queryParams:a?{filter:a}:null,fragment:t||n}).toString();this.location.replaceState(i)}handlePreOrDefaultFilter(t,r,a,n){if(this.productFilterService.init(t,r),n){const i=a.select.map(d=>({id:d.id,options:d.options.filter(p=>p.isChecked).map(p=>p.val)})).filter(d=>d.options.length);this.watchlistToggleValue=a.toggle.find(d=>"watchlist"===d.name)?.buttons.find(d=>d.isActive)?.value,this.handleSelectFilterOperation(a.search,i,!1,!0);const l={type:"toggle",info:{name:"watchlist",selectedToggle:a.toggle[0]?.buttons.find(d=>d.isActive)}},c={shouldExtractPerformanceData:!0};this.productFilterService.filterProductListing(this.config(),l,this.watchlistToggleValue,this.ratingToggleValue,c)}else{const i={shouldExtractPerformanceData:!0,shouldRefreshSpecificProductListing:!0};this.productFilterService.filterProductListing(this.config(),void 0,"all","all",i)}this.productFilterService.publishFilteredProductListing()}onUpdatedFilterOutput(t){this.bannerFilterStateService.updateSavedFilterInputs(t,this.activeTab()?.toLowerCase()??void 0),"toggle"===t.type&&"watchlist"===t.info.name&&(this.watchlistToggleValue=t.info.selectedToggle.value);const r=this.bannerFilterStateService.getSavedFilterInputs(),a=r.select.map(n=>({id:n.id,options:n.options.filter(i=>i.isChecked).map(i=>i.val)})).filter(n=>n.options.length);switch(t.type){case"select":this.handleSelectFilterOperation(r.search,a,!0);break;case"search":this.handleSearchFilterOperation(t,a);break;case"toggle":this.handleToggleFilterOperation(t,r.search,a)}"toggle"===t.type&&"watchlist"===t.info.selectedToggle.value?(this.watchlistOptionHidden.set(0===this.productFilterService.specificProductListing(
1).length),this.isDefaultOptionSelected.set(!0),this.toastMessage.set(void 0)):"toggle"===t.type&&"watchlist"!==t.info.selectedToggle.value&&(this.watchlistOptionHidden.set(!0),this.isDefaultOptionSelected.set(!0),this.toastMessage.set(void 0))}handleSelectFilterOperation(t,r,a=!1,n=!1){if(t.preText&&(t={term:t.preText,preText:""}),t.term){const i=r.length?{type:"select",info:r}:void 0,l={shouldRefreshSpecificProductListing:n};this.productFilterService.filterProductListing(this.config(),i,this.watchlistToggleValue,this.ratingToggleValue,l);const c={type:"search",info:t},d={shouldExtractPerformanceData:!0,shouldRefreshSpecificProductListing:n,useSavedSelectFilterListing:!!r.length,shouldPublishProductListing:!0,isFirstLoad:!0};this.productFilterService.filterProductListing(this.config(),c,this.watchlistToggleValue,this.ratingToggleValue,d)}else{const i=r.length?{type:"select",info:r}:void 0,l={shouldExtractPerformanceData:!0,shouldRefreshSpecificProductListing:n};this.productFilterService.filterProductListing(this.config(),i,this.watchlistToggleValue,this.ratingToggleValue,l)}a&&this.productFilterService.publishFilteredProductListing()}handleSearchFilterOperation(t,r){const n=r.length||t.info.term?t:void 0,i={shouldExtractPerformanceData:!0,useSavedSelectFilterListing:!!r.length,shouldPublishProductListing:!0,isFirstLoad:!0};this.productFilterService.filterProductListing(this.config(),n,this.watchlistToggleValue,this.ratingToggleValue,i)}handleToggleFilterOperation(t,r,a){this.handleSelectFilterOperation(r,a,!1,!0),this.productFilterService.filterProductListing(this.config(),t,this.watchlistToggleValue,this.ratingToggleValue,{shouldExtractPerformanceData:!0}),this.productFilterService.publishFilteredProductListing()}onPerformanceViewToggle(t){this.config().selectedPerformanceView=t.value,this.initConfigs(),this.productFilterService.filterProductListing(this.config(),void 0,this.watchlistToggleValue,this.ratingToggleValue,{shouldExtractPerformanceData:!0,useLastFilteredProductListing:!0}),this.productFilterService.publishFilteredProductListing()}onCalcTypeToggle(t){this.config().selectedCalcType=t.value,this.tableFilterStateService.setCurrentCalcType(this.config().selectedCalcType),("ETFs"===this.config().selectedProductType||"Closed-End Funds"===this.config().selectedProductType)&&this.initConfigs(),this.productFilterService.filterProductListing(this.config(),void 0,this.watchlistToggleValue,this.ratingToggleValue,{shouldExtractPerformanceData:!0,useLastFilteredProductListing:!0}),this.productFilterService.publishFilteredProductListing()}onPeriodEndToggle(t){this.config().selectedPeriodEnd=t.value,this.productFilterService.filterProductListing(this.config(),void 0,this.watchlistToggleValue,this.ratingToggleValue,{shouldExtractPerformanceData:!0,useLastFilteredProductListing:!0}),this.productFilterService.publishFilteredProductListing()}onRatingToggle(t){this.ratingToggleValue=t.value,this.productFilterService.filterProductListing(this.config(),void 0,this.watchlistToggleValue,this.ratingToggleValue,{useLastFilteredProductListing:!0}),this.productFilterService.publishFilteredProductListing()}onRefreshFilterInputs(){this.bannerFilterStateService.refreshFilterInputs()}emitModalClose(t=!1){t&&this.isDefaultOptionSelected.set(!0)}mobileDownloadHandler(){if(this.modalService.close(this.modalId),this.toastType.set(C.Ck.SUCCESS),this.selectedValue()===this.dropdownOptions[1]?.value){this.toastMessage.set(this.translateService.instant("products.download_all_products"));const t=this.productListingService.getAllProductListing();this.ppssExcelDownloadService.downloadPpssExcelDownloadHandler(t,this.config(),this.destroyRef)}else if(this.selectedValue()===this.dropdownOptions[2]?.value){this.toastMessage.set(this.translateService.instant("products.download_all_watchlist_products"));const t=this.productFilterService.specificProductListing();this.ppssExcelDownloadService.downloadPpssExcelDownloadHandler(t,this.config(),this.destroyRef)}}downloadExcel(t){const r=t.target.value;if(this.toastType.set(C.Ck.SUCCESS),this.selectedValue.set(r),r===this.dropdownOptions[1]?.value){const a=this.productListingService.getAllProductListing(
1);this.fileName.set(this.ppssExcelDownloadService.getFileName(a)),this.isHandheld?this.modalService.open(this.modalId):(this.toastMessage.set(this.translateService.instant("products.download_all_products")),this.ppssExcelDownloadService.downloadPpssExcelDownloadHandler(a,this.config(),this.destroyRef))}else if(r===this.dropdownOptions[2]?.value){const a=this.productFilterService.specificProductListing();this.fileName.set(this.ppssExcelDownloadService.getFileName(a)),this.isHandheld?this.modalService.open(this.modalId):(this.toastMessage.set(this.translateService.instant("products.download_all_watchlist_products")),this.ppssExcelDownloadService.downloadPpssExcelDownloadHandler(a,this.config(),this.destroyRef))}this.isDefaultOptionSelected.set(!1)}goToAuth0(t){this.profileService.submitAuth0(t)}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-ppss"]],hostAttrs:["data-gtm-component","frk-ppss"],inputs:{config:[1,"config"]},outputs:{changedProductType:"changedProductType",selectedProductType:"selectedProductType"},features:[e.Jv_([Je,V,rt,et,ge,We])],decls:45,vars:68,consts:[[1,"mb-5"],[3,"changedProductType","updatedFilterOutput","refreshFilterInputs","productTypes","selectedProductType","filterInputs"],[1,"container","mx-auto","min-h-[calc(100vh-200px)]","print:m-0","print:w-full","print:max-w-full","print:p-0"],[1,"[&_a]:!text-pc1-500"],[1,"font-bold",3,"placement"],[1,"flex","flex-col","justify-between","sm:gap-4","xl:flex-row","xl:gap-4",3,"ngClass"],[1,"sm:mb-0","sm:flex","sm:flex-row","sm:items-center",3,"ngClass"],[1,"flex","items-center","sm:pr-4"],[1,"m-0","font-bold"],[3,"tooltipTitle","ariaLabel"],[1,"flex","flex-col","justify-between","sm:flex-row","sm:items-center","md:gap-4","xl:gap-8","print:hidden"],[1,"flex","flex-col","gap-2","sm:flex-row","sm:items-center"],[1,"select","select--light","md:select--light-small","flex","items-center"],[1,"border-b-nc1-500","my-5","border-0","border-b","sm:hidden"],["id","ppss-tab-list"],[3,"tabChange"],[3,"name","id"],["tableTheme","primary",3,"groupColDefs","rowData","showPagination","isCardView","isMobile","pageSize","isStickyHeader","showMoreTxt","showLessTxt"],[1,"text-center"],[1,"mb-0","mt-4","font-bold","print:hidden"],[3,"config","activeTab","productsFromPPSS"],[3,"emitModalClose","id","modalCloseLabel","ariaCloseLabel","showCloseButton"],[1,"flex","flex-col","items-center"],[1,"text-pc1-800","mb-2","self-start"],[1,"mb-2"],["type","button","data-gtm-event","xls_download","data-testid","download-button",1,"button","button--primary",3,"click"],[3,"type","message","toastInfoLabel","toastCloseLabel"],[3,"innerHTML"],[3,"toggleActive","toggleButtons"],[1,"w-full","sm:max-w-[115px]","md:max-w-[200px]",3,"change","name","id"],[3,"selected"],[1,"text-pc1-500",3,"value"],[1,"flex","justify-between",3,"ngClass"],[1,"mb-4","text-2xl","font-bold","lg:text-3xl","xl:text-4xl"],[1,"mb-4","flex","flex-col","sm:flex-row","sm:items-center"],[1,"sm:mr-4",3,"toggleButtons"],[1,"flex","flex-wrap","items-center","gap-2"],["id","label-performance-view-toggle",1,"-mb-4","flex","grow","sm:mb-auto",3,"toggleButtons"],[1,"sm:mr-4",3,"toggleActive","toggleButtons"],["for","label-advanced-toggle",1,""],["id","label-advanced-toggle",1,"-mb-4","flex","grow","sm:mb-auto",3,"toggleActive","toggleButtons"],["id","label-performance-view-toggle",1,"-mb-4","flex","grow","sm:mb-auto",3,"toggleActive","toggleButtons"],["data-testid","ppss-related-funds-link",1,"text-pc1-500","hover:text-pc1-700","underline",3,"href"]],template:function(r,a){if(1&r&&(e.j41(0,"div",0)(1,"frk-ppss-banner",1),e.bIt("changedProductType",function(i){return a.onProductTypeChange(i)})("updatedFilterOutput",function(i){return a.onUpdatedFilterOutput(i)})("refreshFilterInputs",function(){return a.onRefreshFilterInputs()}),e.k0s()(),e.j41(2,"div",2)(3,"div",3),e.nrm(4,"frk-proximal",4),e.k0s(),e.j41(5,"div",5)(6,"div",6)(7,"div",7)(8,"p",8),e.EFF(9),e.nI1(10,"translate"),e.nI1(11,"translate"),e.nI1(12,"translate"),e.k0s(),e.DNE(13,$r,3,6,"frk-tooltip",9),e.k0s()(),e.j41(14,"div",10),e.DNE(15,Lr,4,4,"div",11)(16,Or,6,4,"div",12),e.k0s()(),e.DNE(17,Wr,1,0,"hr",13),e.j41(18,"section",14)(19,"frk-tabs",15),e.bIt("tabChange",function(i){return a.onTabChange(i)}),e.Z7z(20,Hr,8,11,"frk-tab",16,Ir),e.k0s()(),e.DNE(22,Ur,5,18,"frk-dynamic-table",17)(23,Qr,3,3,"p",18)(24,zr,4,3,"p",19),e.k0s(),e.nrm(25,"frk-bulk-download",20),e.j41(26,"frk-modal",21),e.nI1(27,"translate"),e.nI1(28,"translate"),e.bIt("emitModalClose",function(){return a.emitModalClose(!0)}
1),e.j41(29,"div",22)(30,"h2",23),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.j41(33,"div",24),e.EFF(34),e.nI1(35,"translate"),e.nI1(36,"translate"),e.nI1(37,"translate"),e.k0s(),e.j41(38,"div")(39,"button",25),e.bIt("click",function(){return a.mobileDownloadHandler()}),e.EFF(40),e.nI1(41,"translate"),e.k0s()()()(),e.nrm(42,"frk-toast-message",26),e.nI1(43,"translate"),e.nI1(44,"translate")),2&r){let n,i,l,c;e.R7$(),e.Y8G("productTypes",a.config().productTypes)("selectedProductType",a.config().selectedProductType)("filterInputs",a.filterInputs()),e.R7$(3),e.Y8G("placement",a.proximalTopPlacement()),e.R7$(),e.Y8G("ngClass",e.sMw(61,kr,!a.config().showExcelDownloadDropdown,a.config().showExcelDownloadDropdown,"Managed Accounts"===a.config().selectedProductType)),e.R7$(),e.Y8G("ngClass",e.l_i(65,Er,a.config().showExcelDownloadDropdown,!a.config().showExcelDownloadDropdown)),e.R7$(2),e.BMQ("data-gtm-product-count",null==(n=a.rowData())?null:n.length)("data-gtm-product-total",a.totalNumberOfProducts()),e.R7$(),e.SjE(" ",e.bMT(10,37,"products.ppss-listing-displaying")," ",null==(i=a.rowData())?null:i.length," ",e.bMT(11,39,"products.ppss-listing-of")," ",a.totalNumberOfProducts()," ",e.bMT(12,41,"products.ppss-listing-items")," "),e.R7$(4),e.vxM("Mutual Funds"===a.config().selectedProductType?13:-1),e.R7$(2),e.vxM(a.config().isRatingsToggleVisible?15:-1),e.R7$(),e.vxM(a.config().showExcelDownloadDropdown?16:-1),e.R7$(),e.vxM(a.config().showExcelDownloadDropdown?17:-1),e.R7$(3),e.Dyx(a.config().tabs),e.R7$(2),e.vxM(a.groupColDefs().length?22:-1),e.R7$(),e.vxM(0===(null==(l=a.rowData())?null:l.length)?23:-1),e.R7$(),e.vxM((c=a.config().relatedFundsLink)?24:-1,c),e.R7$(),e.Y8G("config",a.config())("activeTab",a.activeTab())("productsFromPPSS",a.getProductsFromPPSS()),e.R7$(),e.Y8G("id",a.modalId)("modalCloseLabel",e.bMT(27,43,"signin.close-modal"))("ariaCloseLabel",e.bMT(28,45,"common.aria-label.close-modal"))("showCloseButton",!0),e.R7$(5),e.SpI(" ",e.bMT(32,47,"products.download-file")," "),e.R7$(3),e.LHq(" ",e.bMT(35,49,"products.do-you-want-to-download"),' "',a.fileName(),'" ',e.bMT(36,51,"products.price-history-on")," ",e.bMT(37,53,"products.franklin-templeton")," ? "),e.R7$(6),e.SpI(" ",e.bMT(41,55,"literature.lit-sticky-download-button")," "),e.R7$(2),e.Y8G("type",a.toastType())("message",a.toastMessage())("toastInfoLabel",e.bMT(43,57,"common.sr-alert-info"))("toastCloseLabel",e.bMT(44,59,"common.sr-alert-close"))}},dependencies:[_a,P.MD,P.YU,P.Jj,S.DynamicTableComponent,C.zf,Pa,S.ProximalComponent,C.je,C.OW,C.Yw,C.ai,C.b6,S.TranslatePipe],encapsulation:2,changeDetection:0})}return s})(),at=(()=>
1{class s{params=(0,e.hFB)();emdash=u.BX;isChecked=(0,e.EWP)(()=>{const t=this.params();if(!t)return!1;const r=t.cellRendererParams?.field;return!(!r||!t.rowData[r])});static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-sfdr-article-icon-cell"]],inputs:{params:[1,"params"]},decls:2,vars:1,consts:[["name","heroCheck","aria-hidden","true",1,"text-pc1-500","group-[.frk-theme--dark]:text-nc1-0","inline-flex",3,"size"],[1,"sr-only"],["aria-hidden","true",1,"text-nc1-600","group-[.frk-theme--dark]:text-nc1-0"]],template:function(r,a){1&r&&e.DNE(0,Kr,4,4)(1,Jr,5,4),2&r&&e.vxM(a.isChecked()?0:1)},dependencies:[C.zq,S.TranslatePipe],encapsulation:2,changeDetection:0})}return s})(),La=(()=>{class s{params=(0,e.hFB)();emdash=u.BX;link=(0,e.EWP)(()=>this.params()?.rowData.disclosureLink??null);static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-sfdr-disclosure-cell"]],inputs:{params:[1,"params"]},decls:2,vars:1,consts:[[1,"text-pc1-500","group-[.frk-theme--dark]:text-nc1-0","underline","underline-offset-2",3,"href"],[1,"sr-only"],["aria-hidden","true"]],template:function(r,a){if(1&r&&e.DNE(0,Zr,5,5,"a",0)(1,qr,5,4),2&r){let n;e.vxM((n=a.link())?0:1,n)}},dependencies:[S.TranslatePipe],encapsulation:2,changeDetection:0})}return s})();function st(s){if(!s)return null;const o=Number.parseInt(s,10);return Number.isNaN(o)?null:o}function Ga(s,o,t,r,a){const n=st(t.amfCode??t.amfCategory),i=st(r.amfCode??r.amfCategory);return null===n&&null===i?0:null===n?1:null===i?-1:a?i-n:n-i}function nt(s,o,t,r,a){const n=s?1:0,i=o?1:0;return a?i-n:n-i}let it=(()=>{class s{translateService=(0,e.WQX)(u.c$);responsiveService=(0,e.WQX)(x.R);sections=(0,e.hFB)([]);showAmfColumn=(0,e.hFB)(!1);layout=(0,e.hFB)();layoutTheme=(0,e.EWP)(()=>(0,u.wX)(this.layout()));containerClass=(0,e.EWP)(()=>{const{width:t}=this.layoutTheme();return t.raw?t.containerClass:""});isCardView=(0,y.ot)((0,j.z)([this.responsiveService.isLteMd$,this.responsiveService.isTablet$]).pipe((0,H.T)(([t,r])=>t||r)),{initialValue:!1});colDefs=(0,e.EWP)(()=>function Oa(s,o){const t=[{headerName:s.instant("pds.FUND_NAME"),field:"productName",isSortable:!0,sort:"asc",isCardTitle:!0},{headerName:s.instant("products.fund-range"),field:"investmentVehicle",isSortable:!0},{headerName:s.instant("products.sfdr-article-8"),field:"isArticle8",isSortable:!0,isAlignCenter:!0,tooltipContent:s.instant("products.sfdr-tooltip__8-tooltip"),cellRenderer:at,cellRendererParams:{field:"isArticle8"},valueGetter:({node:r})=>r.isArticle8,comparatorFn:nt},{headerName:s.instant("products.sfdr-article-9"),field:"isArticle9",isSortable:!0,isAlignCenter:!0,tooltipContent:s.instant("products.sfdr-tooltip__9-tooltip"),cellRenderer:at,cellRendererParams:{field:"isArticle9"},valueGetter:({node:r})=>r.isArticle9,comparatorFn:nt}];return o&&t.push({headerName:s.instant("products.sfdr-amf-category"),field:"amfCategory",isSortable:!0,isAlignCenter:!0,comparatorFn:Ga}),t.push({headerName:s.instant("products.sfdr-disclosure"),field:"disclosureLink",isSortable:!1,cellRenderer:La}),t}(this.translateService,this.showAmfColumn()));static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-sfdr-product-listing"]],hostAttrs:["data-gtm-component","sfdr-product-listing",1,"block"],inputs:{sections:[1,"sections"],showAmfColumn:[1,"showAmfColumn"],layout:[1,"layout"]},decls:7,vars:2,consts:[["gridList",""],["data-testid","sfdr-wrapper"],["data-testid","sfdr-container"],[1,"flex","flex-col","gap-4"],[1,"border-nc1-200","group","rounded-lg","border",3,"open"],[1,"text-pc1-800","group-[.frk-theme--dark]:text-nc1-0","mb-4","mt-4","text-lg","font-bold"],[3,"placement"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"flex","cursor-pointer","list-none","items-center","justify-between","gap-4","px-5","py-4","[&::-webkit-details-marker]:hidden"],[1,"text-pc1-800","group-[.frk-theme--dark]:text-nc1-0","text-lg","font-bold"],["name","heroChevronDown","aria-hidden","true",1,"text-pc1-500","group-[.frk-theme--dark]:text-nc1-0","inline-flex","
1shrink-0","transition-transform","duration-300","group-open:rotate-180",3,"size"],[1,"border-nc1-200","flex","flex-col","gap-4","border-t","px-5","py-5"],[3,"click","keydown","placement"],[1,"flex","flex-col","gap-3"],[1,"text-pc1-800","group-[.frk-theme--dark]:text-nc1-0","mb-4","text-base","font-bold"],[3,"colDefs","rowData","isCardView","isMobile","showMoreTxt","showLessTxt","expandedByDefault"]],template:function(r,a){1&r&&(e.j41(0,"section",1)(1,"div",2)(2,"div",3),e.Z7z(3,sa,2,1,null,null,Qe),e.k0s()()(),e.DNE(5,oa,2,0,"ng-template",null,0,e.C5r)),2&r&&(e.R7$(),e.HbH(a.containerClass()),e.R7$(2),e.Dyx(a.sections()))},dependencies:[S.DynamicTableComponent,S.FootnoteComponent,C.zq,P.T3,S.TranslatePipe],encapsulation:2,changeDetection:0})}return s})();const Wa="#disclosures";function Ya(s,o){return s?o.translateAmf?o.translateAmf(s):s:""}function Ba(s,o){if(!o.getProductPageUrl||s.isSoftLaunch)return;const t=o.getProductPageUrl({fundId:s.productId,shareClassCode:s.shareClassCode,fundName:s.productName});if(!t)return;const r=o.linkFragment??Wa;return t.endsWith(r)?t:`${t}${r}`}function ja(s,o){return{productId:s.productId,productName:s.productName||u.BX,investmentVehicle:s.investmentVehicle||u.BX,isArticle8:"8"===s.sfdrCategory,isArticle9:"9"===s.sfdrCategory,amfCategory:Ya(s.amfCategory,o),amfCode:s.amfCategory??null,primaryShareClassCode:s.shareClassCode,disclosureLink:Ba(s,o)}}function ot(s,o,t={}){const r=(s??[]).filter(n=>"8"===n.sfdrCategory||"9"===n.sfdrCategory);if(0===r.length)return null;const a=function Xa(s,o){const t=new Map;for(const r of s){const a=t.get(r.assetClass)??[];a.push(ja(r,o)),t.set(r.assetClass,a)}return[...t.entries()].map(([r,a])=>({assetClass:r,rows:a.sort((n,i)=>n.productName.localeCompare(i.productName))}))}(function Va(s){const o=new Map;for(const t of s){const r=o.get(t.productId);(!r||t.isPrimary&&!r.isPrimary)&&o.set(t.productId,t)}return[...o.values()].filter(t=>t.isPrimary)}(r),t);return 0===a.length?null:{id:o.id,title:o.title,isAccordion:o.isAccordion,isOpen:o.isOpen??!0,footnotePlacement:o.footnotePlacement,grids:a}}let Ha=(()=>{class s{products=(0,e.WQX)(S.PRODUCTS_SERVICE);translateService=(0,e.WQX)(u.c$);config=e.hFB.required();productList=(0,y.ot)((0,y.br)(this.config).pipe((0,oe.n)(t=>this.products.getProductList$(t.productType))),{initialValue:[]});sections=(0,e.EWP)(()=>{const t=this.config(),r=ot(this.productList(),{id:t.sectionId,title:t.sectionTitle,isAccordion:t.isAccordion,isOpen:t.isOpen,footnotePlacement:t.footnotePlacement},{getProductPageUrl:t.getProductPageUrl,linkFragment:t.linkFragment,translateAmf:a=>this.translateService.instant(`products.amf_${a}`)});return r?[r]:[]});showAmfColumn=(0,e.EWP)(()=>this.config().showAmfColumn??!1);layout=(0,e.EWP)(()=>this.config().layout);static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-sfdr-product-type-listing"]],hostAttrs:[1,"block"],inputs:{config:[1,"config"]},decls:1,vars:1,consts:[[3,"sections","showAmfColumn","layout"]],template:function(r,a){1&r&&e.DNE(0,la,1,3,"frk-sfdr-product-listing",0),2&r&&e.vxM(a.sections().length?0:-1)},dependencies:[it],encapsulation:2,changeDetection:0})}return s})(),Ua=(()=>{class s{static MAX_RATING=5;static DEFAULT_MAX_PRODUCTS=7;config=e.hFB.required();sectionClasses=(0,e.EWP)(()=>{const t=this.config().theme;return[t?.background.cssClass,t?.spacing.cssClass].filter(Boolean).join(" ").trim()});containerClass=(0,e.EWP)(()=>this.config().theme?.width.containerClass??"");titleColorClass=(0,e.EWP)(()=>"dark"===this.config().theme?.background.theme?"text-nc1-0":"text-pc1-800");selectedTabId=(0,e.vPA)(null);activeTabId=(0,e.EWP)(()=>{const t=this.selectedTabId();if(t)return t;const{tabs:r,activeTabId:a}=this.config();return a??r[0]?.id??null});activeTab=(0,e.EWP)(()=>this.config().tabs.find(t=>t.id===this.activeTabId()));visibleProducts=(0,e.EWP)(()=>{const t=this.activeTab();if(!t)return[];const r=t.maximumProducts??s.DEFAULT_MAX_PRODUCTS;return r<0?t.products:t.products.slice(0,r)});toggleButtons=(0,e.EWP)(()=>{const t=this.activeTabId();return this.config().tabs.map(r=>
1({text:r.label,value:r.id,isActive:r.id===t}))});onTabToggle(t){"string"==typeof t.value&&this.selectedTabId.set(t.value)}listGridClass=(0,e.EWP)(()=>"trendingProducts"===this.activeTab()?.variant?"grid-cols-[max-content_minmax(0,1fr)_max-content]":"grid-cols-[minmax(0,1fr)_max-content]");starSlots(t){const r=Math.max(0,Math.min(s.MAX_RATING,Math.round(t)));return Array.from({length:r},(a,n)=>n)}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=e.VBU({type:s,selectors:[["frk-trending-and-top-rated-products"]],hostAttrs:["data-gtm-component","trending-and-top-rated-products",1,"block"],inputs:{config:[1,"config"]},decls:7,vars:9,consts:[["data-testid","trending-section",1,"component-root","block",3,"ngClass"],["data-testid","trending-container",1,"mx-auto","w-full",3,"ngClass"],["data-testid","trending-title",1,"mb-8","max-w-2xl","text-3xl","font-bold","md:text-4xl",3,"ngClass"],[1,"mb-8","block",3,"toggleActive","toggleButtons","canWrapLabelText","ariaLabel"],[1,"grid","grid-cols-1","items-start","gap-8","lg:grid-cols-5"],[1,"lg:col-span-3"],[1,"bg-nc1-0","shadow-tooltip","relative","overflow-hidden","rounded-xl"],["aria-hidden","true",1,"from-sc3-500","to-pc1-500","absolute","inset-y-0","left-0","w-4","bg-gradient-to-b"],[1,"p-6","md:py-10","md:pl-16","md:pr-12"],[1,"mb-9","flex","flex-wrap","items-center","justify-between","gap-4"],["data-testid","tab-heading",1,"text-pc1-800","text-3xl","font-bold"],[1,"text-pc1-500","inline-flex","items-center","gap-2","whitespace-nowrap","text-sm","underline",3,"href"],[1,"m-0","list-none","p-0","lg:grid",3,"ngClass"],[1,"border-nc1-200","flex","flex-wrap","items-center","gap-x-3","gap-y-2","border-b","py-3","lg:contents","lg:gap-0","lg:border-b-0","lg:py-0"],[1,"lg:col-span-2"],["aria-hidden","true","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"h-4","w-4"],["d","M9 6l6 6-6 6"],["aria-hidden","true","data-testid","product-number",1,"text-pc1-500","lg:border-nc1-200","flex","items-start","text-3xl","font-bold","lg:border-b","lg:py-3","lg:pr-3"],[1,"lg:border-nc1-200","flex","min-w-0","flex-1","flex-col","justify-center","lg:flex-none","lg:border-b","lg:py-3","lg:pr-4"],["data-testid","product-link",1,"text-pc1-500","text-lg","font-bold","underline","[overflow-wrap:anywhere]",3,"href"],["data-testid","product-rating",1,"text-nc1-950","mt-1","flex","gap-0.5"],[1,"lg:border-nc1-200","flex","basis-full","flex-wrap","items-center","gap-2","lg:basis-auto","lg:justify-end","lg:border-b","lg:py-3","lg:pl-4"],["data-testid","product-badge",1,"badge","badge--square"],["name","heroStarSolid",3,"size"],[3,"config"],["data-testid","product-card-wrapper",1,"frk-theme--light","lg:col-span-2"]],template:function(r,a){if(1&r){const n=e.RV6();e.j41(0,"section",0)(1,"div",1)(2,"h2",2),e.EFF(3),e.k0s(),e.j41(4,"frk-toggle",3),e.bIt("toggleActive",function(l){return e.eBV(n),e.Njj(a.onTabToggle(l))}),e.k0s(),e.SS7(5),e.DNE(6,Ta,14,4,"div",4),e.k0s()()}if(2&r){e.Y8G("ngClass",a.sectionClasses()),e.R7$(),e.Y8G("ngClass",a.containerClass()),e.R7$(),e.Y8G("ngClass",a.titleColorClass()),e.R7$(),e.SpI(" ",a.config().title," "),e.R7$(),e.Y8G("toggleButtons",a.toggleButtons())("canWrapLabelText",!0)("ariaLabel",a.
1config().title),e.R7$();const n=e.bH3(a.activeTab());e.R7$(),e.vxM(n?6:-1)}},dependencies:[P.YU,C.zq,C.ai,vt.CardComponent,St.ProductCardComponent],encapsulation:2,changeDetection:0})}return s})()},53265:(Ce,B,m)=>{m.d(B,{A:()=>C});var P=m(16325),Y=m(7613);const C=(0,m(37678).A)(function(S,N,x){return N=N.toLowerCase(),S+(x?function e(S){return(0,Y.A)((0,P.A)(S).toLowerCase())}(N):N)})},54909:(Ce,B,m)=>{m.d(B,{A:()=>Y});const Y=function P(e,y,I){var M=-1,C=e.length;y<0&&(y=-y>C?0:C+y),(I=I>C?C:I)<0&&(I+=C),C=y>I?0:I-y>>>0,y>>>=0;for(var S=Array(C);++M<C;)S[M]=e[M+y];return S}}}]); 2//# sourceMappingURL=default-dist_libs_ng_ui-products-listing_fesm2022_frk-ng-ui-products-listing_mjs.1364216b010ddad8.js.map
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.