1"use strict";(self.webpackChunkcore_web=self.webpackChunkcore_web||[]).push([["apps_core-web_src_app_components_products_product-cards_product-cards_component_ts"],{9972:(D,C,l)=>{l.r(C),l.d(C,{ProductCardsComponent:()=>U});var p=l(42733),t=l(71326),_=l(62868),g=l(4364),f=l(92201),h=l(2959),m=l(64193),v=l(37997),P=l(70944),b=l(20358);const k=(e,a)=>a.componentId;function x(e,a){if(1&e&&(t.j41(0,"h2",3)(1,"span",9),t.EFF(2),t.k0s(),t.nrm(3,"span",10),t.k0s()),2&e){let n,o;const s=t.XpG(3);t.Y8G("ngClass",s.titleClasses()),t.R7$(2),t.JRh(null==(n=s.productCardsConfig())?null:n.titleText),t.R7$(),t.Y8G("innerHTML",null==(o=s.productCardsConfig())?null:o.title,t.npT)}}function M(e,a){if(1&e&&(t.j41(0,"div")(1,"a",11),t.EFF(2),t.k0s()()),2&e){let n,o,s;const i=t.XpG(3);t.R7$(),t.Y8G("href",null==(n=i.productCardsConfig())?null:n.viewAllLinkUrl,t.B4B),t.BMQ("aria-label",null==(o=i.productCardsConfig())?null:o.viewAllAreaText),t.R7$(),t.SpI(" ",null==(s=i.productCardsConfig())?null:s.viewAllLinkText," ")}}function E(e,a){if(1&e&&(t.j41(0,"div",3),t.DNE(1,x,4,3,"h2",3)(2,M,3,3,"div"),t.k0s()),2&e){let n,o;const s=t.XpG(2);t.Y8G("ngClass",s.headingContentClasses()),t.R7$(),t.vxM(null!=(n=s.productCardsConfig())&&n.title?1:-1),t.R7$(),t.vxM(null!=(o=s.productCardsConfig())&&o.viewAllLinkUrl?2:-1)}}function T(e,a){if(1&e&&t.nrm(0,"div",4),2&e){let n;const o=t.XpG(2);t.Y8G("ngClass",o.descriptionClasses())("innerHTML",null==(n=o.productCardsConfig())?null:n.description,t.npT)}}function S(e,a){1&e&&t.nrm(0,"frk-product-card",6),2&e&&t.Y8G("config",a.$implicit)}function w(e,a){if(1&e){const n=t.RV6();t.j41(0,"div",7)(1,"button",12),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(n);const s=t.XpG(2);return t.Njj(s.onLoadMore())}),t.EFF(3),t.nI1(4,"translate"),t.nrm(5,"frk-heroicon",13),t.k0s()()}2&e&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,3,"common.aria-label.show-more-cards")),t.R7$(2),t.SpI(" ",t.bMT(4,5,"products.show-more")," "),t.R7$(2),t.Y8G("size",16))}function L(e,a){if(1&e){const n=t.RV6();t.j41(0,"div",7)(1,"button",12),t.nI1(2,"translate"),t.bIt("click",function(){t.eBV(n);const s=t.XpG(2);return t.Njj(s.onShowLess())}),t.EFF(3),t.nI1(4,"translate"),t.nrm(5,"frk-heroicon",14),t.k0s()()}2&e&&(t.R7$(),t.BMQ("aria-label",t.bMT(2,3,"common.aria-label.show-less-cards")),t.R7$(2),t.SpI(" ",t.bMT(4,5,"products.show-less")," "),t.R7$(2),t.Y8G("size",16))}function R(e,a){if(1&e&&t.nrm(0,"div",8),2&e){let n;const o=t.XpG(2);t.Y8G("ngClass",o.footnotesClasses())("innerHTML",null==(n=o.productCardsConfig())?null:n.footnotes,t.npT)}}function A(e,a){if(1&e&&(t.j41(0,"section",1)(1,"div",2),t.DNE(2,E,3,3,"div",3)(3,T,1,2,"div",4),t.j41(4,"div",5),t.Z7z(5,S,1,1,"frk-product-card",6,k),t.k0s(),t.DNE(7,w,6,7,"div",7)(8,L,6,7,"div",7)(9,R,1,2,"div",8),t.k0s()()),2&e){let n,o,s,i;const r=t.XpG();t.HbH(r.containerClasses()),t.Y8G("id",null==(n=r.productCardsConfig())?null:n.componentId),t.R7$(),t.Y8G("ngClass",r.widthClasse
1s()),t.R7$(),t.vxM(null!=(o=r.productCardsConfig())&&o.title||null!=(o=r.productCardsConfig())&&o.viewAllLinkUrl?2:-1),t.R7$(),t.vxM(null!=(s=r.productCardsConfig())&&s.description?3:-1),t.R7$(2),t.Dyx(r.visibleProductCards()),t.R7$(2),t.vxM(r.hasMoreCards()?7:-1),t.R7$(),t.vxM(r.canShowLess()?8:-1),t.R7$(),t.vxM(null!=(i=r.productCardsConfig())&&i.footnotes?9:-1)}}const c="ProductCardsComponent";let U=(()=>{class e{appConfig;componentStatusService;loggerService;component=t.hFB.required();page=t.hFB.required();productCardsConfigSignal=(0,t.vPA)(null);productCardsConfig=this.productCardsConfigSignal.asReadonly();statusUpdate=(0,t.CGW)();destroyRef=(0,t.WQX)(t.abz);sanitizer=(0,t.WQX)(_.up);constructor(n,o,s){this.appConfig=n,this.componentStatusService=o,this.loggerService=s}ngOnInit(){this.addProductCardsConfig()}addProductCardsConfig(){const n=this.component().getParameters(),o=this.getProductCardsData(n),s=this.getViewAllLinkUrl(o);let i=this.buildProductCardsConfig(n,o,s);this.loggerService.debug(c,"Product Cards Config",i),this.loggerService.debug(c,"Product Cards Data Array:",i.productCardsData);const r=(0,m.wX)(n);i={...i,theme:r},this.productCardsConfigSignal.set(i)}buildProductCardsConfig(n,o,s){return{componentId:n.componentId??"",background:n.background??"",topSpacing:n.topSpacing??"",bottomSpacing:n.bottomSpacing??"",title:o?.title?this.sanitizer.bypassSecurityTrustHtml(o.title):null,titleText:o?.title?o.title.replace(/<[^>]*>/g,""):"",description:o?.text?.value?this.sanitizer.bypassSecurityTrustHtml(o.text.value):null,viewAllLinkText:o?.linkButtonCompound?.displayText??"",viewAllLinkUrl:s,viewAllAreaText:o?.linkButtonCompound?.link?.title??"",productCardsData:this.buildProductCardsData(o),width:n.width??"default",footnotes:o?.footnotes?.value?this.sanitizer.bypassSecurityTrustHtml(o.footnotes.value):null,showMore:n.showMore??!1}}buildProductCardsData(n){return n?.productCardCompound?this.addProductCards(n.productCardCompound):null}getProductCardsData(n){return n.productCardsData?this.page().getContent(n.productCardsData)?.getData()??null:null}getViewAllLinkUrl(n){let o="";return n?.linkButtonCompound?.link?.link&&(o=n.linkButtonCompound.link.link.url||n.linkButtonCompound.link.link.externalLinkUrl||this.getLinkUrl(n.linkButtonCompound.link.link.pageLink)||""),o}addProductCards(n){let o=[];return n&&(this.loggerService.debug(c,"Processing product cards DTO count:",n.length),o=n.map((s,i)=>{const r=/[A-Za-z\d]+-[A-Za-z\d]+(?:-[A-Za-z\d]+)?/.exec(s.fund)?.[0],u={componentId:`product-card-${r}-${i}`,productShareClassCode:r,description:this.sanitizer.bypassSecurityTrustHtml(s.summary?.value??""),visibleSections:s.sections,getIdentifierKey:d=>this.appConfig.getDefaultIdentifierKey(d),getProductPageUrl:d=>this.appConfig.getProductPageUrl(d.fundId,d.shareClassCode,d.fundName??void 0,d.identifier??void 0,d.isLitPreview)};return this.loggerService.debug(c,`Created card config at index ${i}:`,u.componentId,u.productShareClassCode),u}).filter(s=>this.appConfig.getSiteProductConfig()?.general.activeList.includes(s.productShareClassCode)),this.loggerService.debug(c,"Final product cards count after filter:",o.length)),o}getLinkUrl(n){const o=n?this.page().getContent(n)?.getUrl():"";return o?this.appConfig.getHomeUrl()+o:""}onStatusUpdate(n,o){this.componentStatusService.setStatus(n,o),this.statusUpdate.emit(o)}showAllCards=(0,t.vPA)(!1);static SHOW_MORE_THRESHOLD=3;visibleProductCards=(0,t.EWP)(()=>{const n=this.productCardsConfig()?.productCardsData??[];return this.productCardsConfig()?.showMore&&!this.showAllCards()?n.slice(0,e.SHOW_MORE_THRESHOLD):n});hasMoreCards=(0,t.EWP)(()=>{const n=this.productCardsConfig(),o=n?.productCardsData??[];return!!n?.showMore&&o.length>e.SHOW_MORE_THRESHOLD&&!this.showAllCards()});canShowLess=(0,t.EWP)(()=>{const n=this.productCardsConfig(),o=n?.productCardsData??[];return!!n?.showMore&&o.length>e.SHOW_MORE_THRESHOLD&&this.showAllCards()});onLoadMore(){this.showAllCards.set(!0)}onShowLess(){this.showAllCards.set(!1)}containerClasses=(0,t.EWP)(()=>{const n=this.productCardsConfig()?.theme,o=n?.background.cssClass?n.background.cssClass.replace(/\bfrk-theme--dark\b/,"").trim().replaceAll(/\s+/g," "):"";return n?["component-root","gap-8",n.spacing.cssClass,o].filter(
1Boolean).join(" "):"component-root gap-8"});headingContentClasses=(0,t.EWP)(()=>"flex justify-between flex-row");titleClasses=(0,t.EWP)(()=>{const n=this.productCardsConfig()?.theme?.background.theme,o="text-3xl";return"dark"===n?`${o} text-nc1-0`:`${o} text-nc1-950`});descriptionClasses=(0,t.EWP)(()=>{const n=this.productCardsConfig()?.theme?.background.theme,o="text-lg";return"dark"===n?`${o} text-nc1-0`:`${o} text-nc1-950`});widthClasses=(0,t.EWP)(()=>{const n=this.productCardsConfig()?.width;return"full"===n?"w-full":"container"===n?"container":"container--small"});footnotesClasses=(0,t.EWP)(()=>{const n=this.productCardsConfig()?.theme?.background.theme,o="text-lg leading-[25px] mt-4";return"dark"===n?`${o} text-nc1-0`:`${o} text-nc1-950`});static \u0275fac=function(o){return new(o||e)(t.rXU(v.RK),t.rXU(P.X),t.rXU(b.L))};static \u0275cmp=t.VBU({type:e,selectors:[["app-product-cards"]],hostAttrs:["data-gtm-component","product-cards"],inputs:{component:[1,"component"],page:[1,"page"]},outputs:{statusUpdate:"statusUpdate"},decls:1,vars:1,consts:[[3,"id","class"],[3,"id"],["data-testid","widthClasse
1s",1,"component-root",3,"ngClass"],[3,"ngClass"],["data-testid","descriptionClasses",3,"ngClass","innerHTML"],[1,"xs:grid-cols-1","grid","gap-4","sm:grid-cols-1","md:grid-cols-2","xl:grid-cols-3"],[3,"config"],[1,"flex","justify-center","pt-6"],["data-testid","footnotesClasses",3,"ngClass","innerHTML"],[1,"sr-only"],["aria-hidden","true",3,"innerHTML"],[1,"button","button--secondary","button--sm","whitespace-nowrap",3,"href"],["type","button",1,"button","border-pc1-500","bg-nc1-0","text-pc1-500","hover:!bg-nc1-0","hover:!text-pc1-500","focus:!bg-nc1-0","focus:!text-pc1-500","inline-flex","items-center","rounded-full","border","hover:!no-underline","focus:!no-underline",3,"click"],["name","heroArrowDown",1,"size-4",3,"size"],["name","heroArrowUp",1,"size-4",3,"size"]],template:function(o,s){if(1&o&&t.DNE(0,A,10,9,"section",0),2&o){let i;t.vxM(null!=(i=s.productCardsConfig())&&null!=i.productCardsData&&i.productCardsData.length?0:-1)}},dependencies:[p.MD,p.YU,h.ProductCardComponent,g.zq,f.TranslatePipe],encapsulation:2,changeDetection:0})}return e})()}}]); 2//# sourceMappingURL=apps_core-web_src_app_components_products_product-cards_product-cards_component_ts.b982c4c77674dc1a.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.