1import{n,a as o,V as p}from"./_plugin-vue2_normalizer85f9f878.js";import"./js/brunswick-bootstrap-6a7c7c5a.js";const c={name:"productFilters",props:["eventToEmit","productOptions","defaultValue"],data(){return{currentLabel:this.defaultValue}},methods:{emitValue(s){this.currentLabel=s.target.innerText,this.$emit(this.eventToEmit,s.currentTarget.dataset.btnValue)}},watch:{defaultValue:function(s){this.currentLabel=s}}};var d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ar-filters-wrapper"},[e("div",{staticClass:"ar-filter-dd ar-control"},[e("div",{staticClass:"dropdown ar-dropdown"},[e("button",{staticClass:"dropdown-toggle",attrs:{type:"button",id:"arielProductAppFilterDD","data-bs-toggle":"dropdown","aria-expanded":"false"}},[t._v(" "+t._s(this.currentLabel)+" ")]),e("ul",{staticClass:"dropdown-menu",attrs:{"aria-labelledby":"arielProductAppFilterDD",role:"menu"}},t._l(this.productOptions,function(a){return e("li",{class:`dropdown-item ${t.currentLabel===a.label?"dropdown-item-selected":""}`,attrs:{"data-btn-value":a.id},on:{click:function(i){return t.emitValue(i)}}},[e("button",[t._v(" "+t._s(a.label)+" ")])])}),0)])])])},u=[],h=n(c,d,u,!1,null,null,null,null);const m=h.exports,f={name:"productStandard",props:["productData","filter"],data(){return{product:this.productData.product,colClasses:this.productData.colClasses}},methods:{}};var v=function(){var t=this,e=t._self._c;return t.filter==="0"||t.filter===t.product.taxonomy[0].terms[0].id?e("div",{staticClass:"g-3",class:[t.product.itemClasses,t.colClasses]},[e("a",{staticClass:"ar-product-link",attrs:{href:t.product.permalink}},[e("div",[e("h3",{staticClass:"ar-product-tag"},[t._v(t._s(t.product.taxonomy[0].terms[0].label))]),e("h4",{staticClass:"ar-product-title"},[t._v(t._s(t.product.title))])]),e("div",{staticClass:"ar-product-text"},[t._v(" "+t._s(t.product.text)+" ")])])]):t._e()},_=[],g=n(f,v,_,!1,null,null,null,null);const V=g.exports;const F={name:"productsApp",components:{productFilters:m,productStandard:V},data(){return{productsData:null,appLoading:!0,investmentVehicles:[],investmentApproaches:[],filterValues:{vehiclesFilter:"0",approachesFilter:"0"}}},created:function(){if(this.productsData=o.getLocalApplicationJson(),this.productsData){for(let s=0;s<this.productsData.length;s++){let t=this.productsData[s].item;for(let e=0;e<t.length;e++){let a=t[e].product.taxonomy;for(let i=0;i<a.length;i++){let r=a[i],l={};r.type==="approach"&&(l.id=r.terms[0].id,l.label=r.terms[0].label,this.investmentApproaches.push(l)),r.type==="vehicle"&&(l.id=r.terms[0].id,this.productsData[s].vid=r.terms[0].id,l.label=r.terms[0].label,this.investmentVehicles.push(l))}}}this.investmentVehicles=this.makeUniqueArrays(this.investmentVehicles,"id"),this.investmentApproaches=this.makeUniqueArrays(this.investmentApproaches,"id")}this.investmentVehicles.unshift({id:"0",label:"All Investment Vehicles"}),this.investmentApproaches.unshift({id:"0",label:"All Investment Approaches"})},mounted(){this.appLoading=!1,this.applyUrlParams()},methods:{hasItems(s){return s.item.filter(t=>t.product.taxonomy[0].terms[0].id===this.filterValues.approachesFilter).length>0},waitFor(s){this.appLoading=!0,setTimeout(()=>{this.appLoading=!1},s)},async filterOnVehicles(s){await this.waitFor(500),this.filterValues.approachesFilter="0",this.filterValues.vehiclesFilter=s,this.setUrlParameters()},async filterOnApproaches(s){await this.waitFor(500),this.filterValues.vehiclesFilter="0",this.filterValues.approachesFilter=s,this.setUrlParameters()},makeUniqueArrays(s,t){return[...new Map(s.map(e=>[e[t],e])).values()]},applyUrlParams(){let s=window.location.search;if(s){let t=s,e=new URLSearchParams(t);e.has("vehicles")&&(this.filterValues.vehiclesFilter=this.getIdFromLabel(decodeURI(e.get("vehicles")),this.investmentVehicles)),e.has("approaches")&&(this.filterValues.approachesFilter=this.getIdFromLabel(decodeURI(e.get("approaches")),this.investmentApproaches))}else return},setUrlParameters(){let s;s=`?vehicles=${this.getLabelFromId(this.filterValues.vehiclesFilter,this.investmentVehicles)}&approaches=${this.getLabelFromId(this.filterValues.approachesFilter,this.investmentApproaches)}`,window.history.replaceState(null,null,s)},getLabelFromId(s,t){return t.filter(e=>e.id===s.toString())[0].label},getIdFromLabel(s,t){return t.filter(e=>e.label===s)[0].id.toString()}}};var b=function(){var t=this,e=t._self._c;return t.productsData?e("section",[e("div",{staticClass:"ar-ppapp-filters-wrapper-outer"},[e("div",{staticClass:"ar-ppapp-filters-wrapper-inner"},[e("product-filters",{attrs:{defaultValue:this.getLabelFromId(this.filterValues.vehiclesFilter,this.investmentVehicles),eventToEmit:"filterOnVehicles",productOptions:this.investmentVehicles},on:{filterOnVehicles:t.filterOnVehicles}}),e("product-filters",{attrs:{defaultValue:this.getLabelFromId(this.filterValues.approachesFilter,this.investmentApproaches),eventToEmit:"filterOnApproaches",productOptions:this.investmentApproaches},on:{filterOnApproaches:t.filterOnApproaches}})],1)]),e("transition",{staticClass:"faderesults",attrs:{name:"faderesults"}},[t.appLoading?e("div",{staticClass:"ar-vpapp-loading-el"},[t._v("Loading...")]):t._e()]),e("transition",{staticClass:"faderesults",attrs:{name:"faderesults"}},[t.appLoading?t._e():e("div",{staticClass:"ar-pp-app-products-outer"},[e("transition-group",{staticClass:"pproducts",attrs:{name:"pproducts"}},t._l(this.productsData,function(a,i){return t.filterValues.vehiclesFilter==="0"||t.filterValues.vehiclesFilter===a.vid||t.hasItems(a)?e("div",{key:a.title,staticClass:"ar-ppapp-items-wrap",class:[a.wrapperClasses,a.itemClasses],attrs:{"data-pid":a.vid}},[t.hasItems(a)||t.filterValues.approachesFilter==="0"?e("div",{staticClass:"ar-ppapp-std-outer g-0",class:a.innerClasses},[e("div",{staticClass:"ar-pp-app-section-title"},[e("h2",{staticClass:"ar-listing-title"},[t._v(t._s(a.title))])]),e("div",{staticClass:"ar-ppapp-std-wrap row"},t._l(a.item,function(r){return e("product-standard",{key:a.id,attrs:{filter:t.filterValues.approachesFilter,productData:r}})}),1)]):t._e()]):t._e()}),0)],1)])],1):t._e()},C=[],w=n(F,b,C,!1,null,null,null,null);const A=w.exports;function x(){p.config.productionTip=!1,new p({render:s=>s(A)}).$mount("#arielProductAppContainer")}export{x as arielProductsApplication};
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.