PageSourceSearch

https://www.franklintempleton.com.au/default-src_app_ft-components…-product_service_ts.d073c59062a3cb25ba68.js

js franklintempleton.com.au collected 2026-09-28 07:35:16 UTC 18,478 bytes, 2 lines download raw bytes

1(self.webpackChunkgw_core_sites_app=self.webpackChunkgw_core_sites_app||[]).push([["default-src_app_ft-components_products_similar-product_services_similar-product_service_ts"],{73553:(N,f,r)=>{"use strict";r.d(f,{H:()=>L});var T=r(1772),k=r(46923),h=r.n(k),y=r(70553);const F={data:[],siteConfig:null,isSiteIntl:!1,config:null,asOfDates:null};var n=r(26310),s=r(68411),d=r(97735),c=r(96604),p=r.n(c),v=r(79441),S=r(42720),u=r(22663),l=r(2316),D=r(61931),P=r(57536),E=r(55311),w=r(34046);const C=s.Y.getLogger("SimilarProductService");var m=(()=>{return(o=m||(m={}))["3 year cumulative performance"]="cummulativeReturn3Year",o["Morning star rating"]="morningStarRatingOverall",m;var o})();let L=(()=>{class o{constructor(e,a,i,t){this.productDetailService=e,this.fundDataService=a,this.siteConfigService=i,this.pdsLabelLoaderService=t,this.unsubscribe$=new v.xQ,this.similarProductState=new v.xQ,this.fundListingResponse=[],this.priorityCurrencyOrder={}}getProductDetails$(e,a){return this.productDetailService.getProductDetails$(e,a)}populate(e){this.initialiseState(),this.fundListingResponse&&this.fundListingResponse[this.configurationName]?this.setProductsState(this.fundListingResponse[this.configurationName],e):(0,S.D)([this.fundDataService.fetchData([h()],{configurationName:n.WX.MF,productType:this.getProductTypeParameter(n.WX.MF)}),this.fundDataService.fetchData([h()],{configurationName:n.WX.ETF,productType:this.getProductTypeParameter(n.WX.ETF)}),this.pdsLabelLoaderService.loadPdsLabels$()]).pipe((0,u.R)(this.unsubscribe$)).subscribe(([a,i,t])=>{this.fundListingResponse[n.WX.MF]=a,this.fundListingResponse[n.WX.ETF]=i,C.debug("PDS Labels Loaded"),this.setProductsState(this.fundListingResponse[this.configurationName],e),this.hideOrShowProductTypeViewOption(this.configurationName,e)},a=>{C.error("Error calling subsequent services",a)})}hideOrShowProductTypeViewOption(e,a){this.sortProducts(this.getProductsData(this.fundListingResponse[e===n.WX.MF?n.WX.ETF:n.WX.MF].products,a)).splice(0,5).length||(this.state.config.productTypeViewOptions=[],this.similarProductState.next(this.state))}setProductsState(e,a){const i=this.sortProducts(this.getProductsData(e.products,a)).splice(0,5);this.state.data=i,this.state.asOfDates.navAsOfDate=e.navAsOfDate,this.state.asOfDates.performanceAsOfDateMonthly=e.performanceAsOfDateMonthly,this.state.asOfDates.performanceAsOfDateMonthlyStd=e.performanceAsOfDateMonthlyStd,this.state.asOfDates.performanceAsOfDateQuarterly=e.performanceAsOfDateQuarterly,this.state.asOfDates.performanceAsOfDateQuarterlyStd=e.performanceAsOfDateQuarterlyStd,this.state.asOfDates.ratingsAsOfDate=e.ratingsAsOfDate,this.similarProductState.next(this.state)}initialiseState(){this.productType=this.configurationName||n.WX.MF,this.state=(0,T.X)(F),this.state.siteConfig=this.siteConfigService.product?.site,this.state.isSiteIntl="US"!==this.siteConfigService.product?.site?.country,this.state.config={performanceViewOptions:[],productTypeViewOptions:[{headerLabelKey:"MF",labelKey:"products.MF",name:n.WX.MF,isDefault:this.productType===n.WX.MF},{headerLabelKey:"ETF",labelKey:"products.ETF",name:n.WX.ETF,isDefault:this.productType===n.WX.ETF}],performanceView:null,periodEnd:"",calcType:"",productType:this.productType},this.state.asOfDates={};const e=this.siteConfigService.product?.general,a=this.siteConfigService.product?.performance,i=this.createViewOptions(a);this.state.config.performanceViewOptions=i;const t=i.find(g=>g.isDefault);this.state.config.performanceView=t,this.state.config.periodEnd=t?.periodEnds[0],this.state.siteConfig=this.siteConfigService.product?.site,this.state.config.identifierList=this.siteConfigService.getFundIdentifiers(this.productType),e.showMDashForUnder1Year&&(this.state.config.suppressDetails={showMDashForUnder1Year:e.showMDashForUnder1Year}),this.state.config.calcType=this.siteConfigService.getDefaultCalcType(this.productType)}createViewOptions(e){const a=e.dataRefreshRate[this.productType],t=e.ppssPerformanceViews[this.productType].map(g=>({name:g,labelKey:`products.perf-view-${p()(g)}`,headerLabelKey:`products.perf-view-header-${p()(g)}`,periodEnds:this.siteConfigService.decodePeriodEnds(a[g]),isDefault:!1}));return t.length>0&&(t[t.length-1].isDefault=!0),t}sortProducts(e){switch(e=e.sort((a,i)=>a.fundName.localeCompare(i.fundName)),this.sortBy){case m["3 year cumulative performance"]:e=e.sort((a,i)=>(0,d.xg)(i?.shareClass?.performance?.monthEnd?.find(t=>t.calcTypeStd===this.state.config.calcType)?.[this.sortBy],a?.shareClass?.performance?.monthEnd?.find(t=>t.calcTypeStd===this.state.config.calcType)?.[this.sortBy],null,null,!0));break;case m["Morning star rating"]:e=this.filterAndSortMorningStarRecord(e)}return e}filterAndSortMorningStarRecord(e){return e=e?.filter(a=>(a?.shareClass?.ratings?.[this.sortBy]||0)>=4),e=e?.sort((a,i)=>(i?.shareClass?.ratings?.[this.sortBy]||0)-(a?.shareClass?.ratings?.[this.sortBy]||0)==0?this.sortOnCurrency(a,i):(i?.shareClass?.ratings?.[this.sortBy]||0)-(a?.shareClass?.ratings?.[this.sortBy]||0)),e}sortOnCurrency(e,a){const i=this.priorityCurrencyOrder[e.shareClass.shareClassCurrency
1],t=this.priorityCurrencyOrder[a.shareClass.shareClassCurrency];return void 0!==i&&void 0!==t?i-t:void 0!==i?-1:void 0!==t?1:0}setConfigurationName(e){this.configurationName=e}getConfigurationName(){return this.configurationName}setSortByCurrencyCode(e){e&&e.split(",").map(i=>n.NE[i.trim().toUpperCase()]).forEach((i,t)=>{i&&(this.priorityCurrencyOrder[i]=t)})}setSortOrder(e){this.sortBy=e&&e in m?m[e]:"US"!==this.siteConfigService.product?.site?.country?m["3 year cumulative performance"]:m["Morning star rating"]}getProductTypeParameter(e){switch(e){case n.WX.MF:return y.Q.MUTUAL_FUNDS;case n.WX.ETF:return y.Q.ETFS;default:C.error("unknown product type: ",e)}throw Error("unknown product type: "+e)}getProductsData(e,a){return e.map(i=>{if(i.assetClass===a)return i.shareClasses.map(t=>{if(t.primaryShareClass){const{shareClasses:g,...V}=i,b=V;return b.shareClass=t,b}})}).flat().filter(i=>void 0!==i)}changePerformanceView(e,a){this.state.config.performanceView=e,this.state.config.performanceViewOptions.forEach(i=>{i.isDefault=i.name===e.name}),this.state.config.periodEnd=a,this.similarProductState.next(this.state)}removeData(){this.fundListingResponse=[]}ngOnDestroy(){this.fundListingResponse=[],this.unsubscribe$.next(),this.unsubscribe$.complete()}}return o.\u0275fac=function(e){return new(e||o)(l.LFG(D.G),l.LFG(P.K),l.LFG(E.r5),l.LFG(w.K))},o.\u0275prov=l.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},46923:N=>{var f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SimilarFundListing"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"countrycode"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"languagecode"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"PPSS"},arguments:[{kind:"Argument",name:{kind:"Name",value:"countrycode"},value:{kind:"Variable",name:{kind:"Name",value:"countrycode"}}},{kind:"Argument",name:{kind:"Name",value:"languagecode"},value:{kind:"Variable",name:{kind:"Name",value:"languagecode"}}},{kind:"Argument",name:{kind:"Name",value:"productType"},value:{kind:"Variable",name:{kind:"Name",value:"productType"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fundid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"producttype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"webprdcttaxonomy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fundname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assetclass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"basecurrcode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fundcatg"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invmangr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invstmntcatg"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invvehcile"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"region"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"invstmntgroup"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"etftype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"strategy"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"methodology"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fundfamily"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sfdrcategory"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shareclass"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shclname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shclcurr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prmryshclind"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"perfincdt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"perfincdtstd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shclfeestructr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"identifiers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fundid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shclcode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ticker"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"taid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cusip"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bloomberg"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fundbmticker"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"intradaynav"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"iopv"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"ratings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"msrtngoverall"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"performance"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"month_end"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"asofdate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"asofdatestd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calcname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calcnamestd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currcode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret1yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret2yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret3yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret5yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannretactinc"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret1mth"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret3mth"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret1yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret2yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret3yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret5yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret10yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummretytd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummretactinc"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear5"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"quarter_end"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"asofdate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"asofdatestd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calcname"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calcnamestd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currcode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret1yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret3yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannret5yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avgannretactinc"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret1mth"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret3mth"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret1yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret3yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret5yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummret10yr"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummretytd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cummretactinc"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear1"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear2"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear3"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear4"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"discrannualrollyear5"},arguments:[],directives:[]}]}}]}}]}}]}}]}}],loc:{start:0,end:2013}};function k(n,s){if("FragmentSpread"===n.kind)s.add(n.name.value);
1else if("VariableDefinition"===n.kind){var d=n.type;"NamedType"===d.kind&&s.add(d.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(c){k(c,s)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(c){k(c,s)}),n.definitions&&n.definitions.forEach(function(c){k(c,s)})}f.loc.source={body:"query SimilarFundListing(\n  $countrycode: String!\n  $languagecode: String!\n  $productType: String!\n) {\n  PPSS(\n    countrycode: $countrycode\n    languagecode: $languagecode\n    productType: $productType\n  ) {\n    fundid\n    producttype\n    webprdcttaxonomy\n    fundname\n    assetclass\n    basecurrcode\n    fundcatg\n    invmangr\n    invstmntcatg\n    invvehcile\n    region\n    invstmntgroup\n    etftype\n    strategy\n    methodology\n    fundfamily\n    sfdrcategory\n    shareclass {\n      shclname\n      shclcurr\n      prmryshclind\n      perfincdt\n      perfincdtstd\n      shclfeestructr\n      identifiers {\n        fundid\n        shclcode\n        ticker\n        taid\n        cusip\n        isin\n        bloomberg\n        fundbmticker\n        intradaynav\n        iopv\n      }\n      ratings {\n        msrtngoverall\n      }\n      performance {\n        month_end {\n          asofdate\n          asofdatestd\n          calcname\n          calcnamestd\n          currcode\n          avgannret1yr\n          avgannret2yr\n          avgannret3yr\n          avgannret5yr\n          avgannretactinc\n          cummret1mth\n          cummret3mth\n          cummret1yr\n          cummret2yr\n          cummret3yr\n          cummret5yr\n          cummret10yr\n          cummretytd\n          cummretactinc\n          discrannualrollyear1\n          discrannualrollyear2\n          discrannualrollyear3\n          discrannualrollyear4\n          discrannualrollyear5\n        }\n        quarter_end {\n          asofdate\n          asofdatestd\n          calcname\n          calcnamestd\n          currcode\n          avgannret1yr\n          avgannret3yr\n          avgannret5yr\n          avgannretactinc\n          cummret1mth\n          cummret3mth\n          cummret1yr\n          cummret3yr\n          cummret5yr\n          cummret10yr\n          cummretytd\n          cummretactinc\n          discrannualrollyear1\n          discrannualrollyear2\n          discrannualrollyear3\n          discrannualrollyear4\n          discrannualrollyear5\n        }\n      }\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var h={};function y(n,s){for(var d=0;d<n.definitions.length;d++){var c=n.definitions[d];if(c.name&&c.name.value==s)return c}}f.definitions.forEach(function(s){if(s.name){var d=new Set;k(s,d),h[s.name.value]=d}}),N.exports=f,N.exports.SimilarFundListing=function(n,s){var d={kind:n.kind,definitions:[y(n,s)]};n.hasOwnProperty("loc")&&(d.loc=n.loc);var c=h[s]||new Set,p=new Set,v=new Set;for(c.forEach(function(u){v.add(u)});v.size>0;){var S=v;v=new Set,S.forEach(function(u){p.has(u)||(p.add(u),(h[u]||new Set).forEach(function(D){v.add(D)}))})}return p.forEach(function(u){var l=y(n,u);l&&d.definitions.push(l)}),d}(f,"SimilarFundListing")}}]);
2//# sourceMappingURL=default-src_app_ft-components_products_similar-product_services_similar-product_service_ts.d073c59062a3cb25ba68.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.