diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index 1794b53fbe43..54eab06c7488 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -7893,49 +7893,49 @@ function isValidDate(d) { PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_id_195706cd_render /* harmony default export */ var PeriodSelector = (PeriodSelectorvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=1a61c250 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=025fd338 -var ReportingMenuvue_type_template_id_1a61c250_hoisted_1 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_1 = { class: "reportingMenu" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_2 = ["aria-label"]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_3 = ["onClick"]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_4 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_2 = ["aria-label"]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_3 = ["onClick"]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_4 = { class: "hidden" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_5 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_5 = { role: "menu" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_6 = ["href", "onClick", "title"]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_7 = ["href", "onClick"]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_8 = ["onClick"]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_6 = ["href", "onClick", "title"]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_7 = ["href", "onClick"]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_8 = ["onClick"]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var ReportingMenuvue_type_template_id_025fd338_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-help" }, null, -1); -var ReportingMenuvue_type_template_id_1a61c250_hoisted_10 = [ReportingMenuvue_type_template_id_1a61c250_hoisted_9]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_11 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_10 = [ReportingMenuvue_type_template_id_025fd338_hoisted_9]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_11 = { id: "mobile-left-menu", class: "sidenav hide-on-large-only" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_12 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_12 = { class: "collapsible collapsible-accordion" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_13 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_13 = { class: "collapsible-header" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_14 = { +var ReportingMenuvue_type_template_id_025fd338_hoisted_14 = { class: "collapsible-body" }; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_15 = ["onClick", "href"]; -var ReportingMenuvue_type_template_id_1a61c250_hoisted_16 = ["onClick", "href"]; -function ReportingMenuvue_type_template_id_1a61c250_render(_ctx, _cache, $props, $setup, $data, $options) { +var ReportingMenuvue_type_template_id_025fd338_hoisted_15 = ["onClick", "href"]; +var ReportingMenuvue_type_template_id_025fd338_hoisted_16 = ["onClick", "href"]; +function ReportingMenuvue_type_template_id_025fd338_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_MenuItemsDropdown = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MenuItemsDropdown"); var _directive_side_nav = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("side-nav"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingMenuvue_type_template_id_1a61c250_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingMenuvue_type_template_id_025fd338_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { class: "navbar hide-on-med-and-down", role: "menu", "aria-label": _ctx.translate('CoreHome_MainNavigation') @@ -7954,8 +7954,8 @@ function ReportingMenuvue_type_template_id_1a61c250_render(_ctx, _cache, $props, return _ctx.loadCategory(category); }, ["prevent"]) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { - class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("menu-icon ".concat(category.icon ? category.icon : 'icon-chevron-down')) - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ReportingMenuvue_type_template_id_1a61c250_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_1a61c250_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_1a61c250_hoisted_5, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(category.subcategories, function (subcategory) { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("menu-icon ".concat(category.icon ? category.icon : category.subcategories && category.id === _ctx.activeCategory ? 'icon-chevron-down' : 'icon-chevron-right')) + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ReportingMenuvue_type_template_id_025fd338_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_025fd338_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_025fd338_hoisted_5, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(category.subcategories, function (subcategory) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { role: "menuitem", class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ @@ -7980,7 +7980,7 @@ function ReportingMenuvue_type_template_id_1a61c250_render(_ctx, _cache, $props, }, title: subcat.tooltip, key: subcat.id - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 11, ReportingMenuvue_type_template_id_1a61c250_hoisted_6); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 11, ReportingMenuvue_type_template_id_025fd338_hoisted_6); }), 128))]; }), _: 2 @@ -7991,7 +7991,7 @@ function ReportingMenuvue_type_template_id_1a61c250_render(_ctx, _cache, $props, onClick: function onClick($event) { return _ctx.loadSubcategory(category, subcategory, $event); } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_1a61c250_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), subcategory.help ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_025fd338_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), subcategory.help ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 2, class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["item-help-icon", { active: _ctx.helpShownCategory && _ctx.helpShownCategory.subcategory === subcategory.id && _ctx.helpShownCategory.category === category.id && subcategory.help @@ -8001,15 +8001,15 @@ function ReportingMenuvue_type_template_id_1a61c250_render(_ctx, _cache, $props, onClick: function onClick($event) { return _ctx.showHelp(category, subcategory, $event); } - }, ReportingMenuvue_type_template_id_1a61c250_hoisted_10, 10, ReportingMenuvue_type_template_id_1a61c250_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); + }, ReportingMenuvue_type_template_id_025fd338_hoisted_10, 10, ReportingMenuvue_type_template_id_025fd338_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); }), 128))])], 2); - }), 128))], 8, ReportingMenuvue_type_template_id_1a61c250_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_1a61c250_hoisted_11, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.menu, function (category) { + }), 128))], 8, ReportingMenuvue_type_template_id_025fd338_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_025fd338_hoisted_11, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.menu, function (category) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "no-padding", key: category.id - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_1a61c250_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", ReportingMenuvue_type_template_id_1a61c250_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_025fd338_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", ReportingMenuvue_type_template_id_025fd338_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("i", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(category.icon ? category.icon : 'icon-chevron-down') - }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportingMenuvue_type_template_id_1a61c250_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(category.subcategories, function (subcategory) { + }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(category.name), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportingMenuvue_type_template_id_025fd338_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(category.subcategories, function (subcategory) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { key: subcategory.id }, [subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { @@ -8021,20 +8021,20 @@ function ReportingMenuvue_type_template_id_1a61c250_render(_ctx, _cache, $props, }, href: "#?".concat(_ctx.makeUrl(category, subcat)), key: subcat.id - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 9, ReportingMenuvue_type_template_id_1a61c250_hoisted_15); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 9, ReportingMenuvue_type_template_id_025fd338_hoisted_15); }), 128)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 1, onClick: function onClick($event) { return _ctx.loadSubcategory(category, subcategory); }, href: "#?".concat(_ctx.makeUrl(category, subcategory)) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_1a61c250_hoisted_16)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.name), 9, ReportingMenuvue_type_template_id_025fd338_hoisted_16)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); }), 128))])])])], 512), [[_directive_side_nav, { activator: _ctx.sideNavActivator }]])]); }), 128))])]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=1a61c250 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=025fd338 // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPages/ReportingPages.store.ts function ReportingPages_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -8716,7 +8716,7 @@ var ReportingMenuvue_type_script_lang_ts_REPORTING_HELP_NOTIFICATION_ID = 'repor -ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_1a61c250_render +ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_025fd338_render /* harmony default export */ var ReportingMenu = (ReportingMenuvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportMetadata/ReportMetadata.store.ts diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 86d4ff4ebbc9..e25a7853aba3 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -209,7 +209,7 @@ function mn(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.posi * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var oa=function(){function e(){var t=this;ea(this,e),ra(this,"state",Object(K["reactive"])({initialSites:[],isInitialized:!1})),ra(this,"stateFiltered",Object(K["reactive"])({initialSites:[],isInitialized:!1,excludedSites:[]})),ra(this,"currentRequestAbort",null),ra(this,"limitRequest",void 0),ra(this,"initialSites",Object(K["computed"])((function(){return Object(K["readonly"])(t.state.initialSites)}))),ra(this,"initialSitesFiltered",Object(K["computed"])((function(){return Object(K["readonly"])(t.stateFiltered.initialSites)})))}return na(e,[{key:"loadInitialSites",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.state.isInitialized&&0===n.length?Promise.resolve(Object(K["readonly"])(this.state.initialSites)):this.stateFiltered.isInitialized&&n.length===this.stateFiltered.excludedSites.length&&n.every((function(t,n){return t===e.stateFiltered.excludedSites[n]}))?Promise.resolve(Object(K["readonly"])(this.stateFiltered.initialSites)):(n.length>0&&this.searchSite("%",t,n).then((function(t){e.stateFiltered.isInitialized=!0,e.stateFiltered.excludedSites=n,null!==t&&(e.stateFiltered.initialSites=t)})),this.state.isInitialized?Promise.resolve(Object(K["readonly"])(this.state.initialSites)):this.searchSite("%",t,n).then((function(t){return e.state.isInitialized=!0,null!==t&&(e.state.initialSites=t),t})))}},{key:"loadSite",value:function(e){"all"===e?Ce.updateUrl(Object.assign(Object.assign({},Ce.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ce.parsed.value.date,period:Ce.parsed.value.period})):Ce.updateUrl(Object.assign(Object.assign({},Ce.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},Ce.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Qe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(o){var a=o.value,i="SitesManager.getPatternMatchSites";return n&&(i="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Qe.fetch({method:i,limit:a,pattern:e,sitesToExclude:r},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites(n,r)}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Object.assign(Object.assign({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()t.name.toLowerCase()?1:0})),t):[]}}]),e}(),aa=new oa,ia=["value","name"],la=["title"],ca=["textContent"],sa={key:1,class:"placeholder"},ua={class:"dropdown"},da={class:"custom_select_search"},ma=["placeholder"],pa={key:0},fa={class:"custom_select_container"},ha=["onClick"],ba=["innerHTML","href","title"],ga={class:"custom_select_ul_list"},va={class:"noresult"},ya={key:1};function Oa(e,t,n,r,o,a){var i,l,c,s,u=Object(K["resolveComponent"])("AllSitesLink"),d=Object(K["resolveDirective"])("focus-if"),m=Object(K["resolveDirective"])("focus-anywhere-but-here");return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{class:Object(K["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(K["openBlock"])(),Object(K["createElementBlock"])("input",{key:0,type:"hidden",value:null===(i=e.displayedModelValue)||void 0===i?void 0:i.id,name:e.name},null,8,ia)):Object(K["createCommentVNode"])("",!0),Object(K["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(K["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(K["createElementVNode"])("span",{class:Object(K["normalizeClass"])(["icon icon-chevron-down",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(K["createElementVNode"])("span",null,[null!==(l=e.displayedModelValue)&&void 0!==l&&l.name||!e.placeholder?(Object(K["openBlock"])(),Object(K["createElementBlock"])("span",{key:0,textContent:Object(K["toDisplayString"])((null===(c=e.displayedModelValue)||void 0===c?void 0:c.name)||e.firstSiteName)},null,8,ca)):Object(K["createCommentVNode"])("",!0),null!==(s=e.displayedModelValue)&&void 0!==s&&s.name||!e.placeholder?Object(K["createCommentVNode"])("",!0):(Object(K["openBlock"])(),Object(K["createElementBlock"])("span",sa,Object(K["toDisplayString"])(e.placeholder),1))])],42,la),Object(K["withDirectives"])(Object(K["createElementVNode"])("div",ua,[Object(K["withDirectives"])(Object(K["createElementVNode"])("div",da,[Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,ma),[[K["vModelText"],e.searchTerm],[d,{focused:e.shouldFocusOnSearch}]]),Object(K["withDirectives"])(Object(K["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[K["vShow"],e.searchTerm]])],512),[[K["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",pa,[Object(K["createVNode"])(u,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(K["createCommentVNode"])("",!0),Object(K["createElementVNode"])("div",fa,[Object(K["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.sites,(function(n,r){return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(K["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,ba)],8,ha)),[[K["vShow"],!(!e.showSelectedSite&&"".concat(e.activeSiteId)==="".concat(n.idsite))]])})),128))]),Object(K["withDirectives"])(Object(K["createElementVNode"])("ul",ga,[Object(K["createElementVNode"])("li",null,[Object(K["createElementVNode"])("div",va,Object(K["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[K["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",ya,[Object(K["createVNode"])(u,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(K["createCommentVNode"])("",!0)],512),[[K["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var ja=["innerHTML","href"];function wa(e,t,n,r,o,a){var i=this;return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return i.onClick(e)}),class:"custom_select_all"},[Object(K["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,ja)])}var ka=Object(K["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});ka.render=wa;var Sa=ka,Ca=Object(K["defineComponent"])({props:{modelValue:Object,showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:a("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String,defaultToFirstSite:Boolean,sitesToExclude:{type:Array,default:function(){return[]}}},emits:["update:modelValue","blur"],components:{AllSitesLink:Sa},directives:{FocusAnywhereButHere:qt,FocusIf:zt},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(ce.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(ce.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Ot(this.searchSite),!this.modelValue&&ce.idSite&&this.$emit("update:modelValue",{id:ce.idSite,name:ce.helper.htmlDecode(ce.siteName)})},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.shouldDefaultToFirstSite&&e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=a("CoreHome_ShortcutWebsiteSelector");ce.helper.registerShortcut("w",t,(function(t){if(!t.altKey){t.preventDefault?t.preventDefault():t.returnValue=!1;var n=e.$refs.selectorLink;n&&(n.click(),n.focus())}}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?a("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){var e=aa.initialSitesFiltered.value&&aa.initialSitesFiltered.value.length?aa.initialSitesFiltered.value:aa.initialSites.value;return e&&e.length>1},firstSiteName:function(){var e=aa.initialSitesFiltered.value&&aa.initialSitesFiltered.value.length?aa.initialSitesFiltered.value:aa.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Ce.stringify(Object.assign(Object.assign({},Ce.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ce.parsed.value.date,period:Ce.parsed.value.period}));return"?".concat(e)},shouldDefaultToFirstSite:function(){var e;return!(null!==(e=this.modelValue)&&void 0!==e&&e.id)&&(!this.hasMultipleSites||this.defaultToFirstSite)&&this.sites[0]},displayedModelValue:function(){return this.modelValue?this.modelValue:ce.idSite?{id:ce.idSite,name:ce.helper.htmlDecode(ce.siteName)}:this.shouldDefaultToFirstSite?{id:this.sites[0].idsite,name:this.sites[0].name}:null}},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.id,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.id&&aa.loadSite(e.id))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return ce.helper.htmlEntities(e);var n=ce.helper.htmlEntities(e.substring(0,t)),r=ce.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'').concat(this.searchTerm,"").concat(r)},loadInitialSites:function(){var e=this;return aa.loadInitialSites(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[]).then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,aa.searchSite(e,this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[]).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Ce.stringify(Object.assign(Object.assign({},Ce.urlParsed.value),{},{segment:"",idSite:e})),n=Ce.stringify(Object.assign(Object.assign({},Ce.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});Ca.render=Oa;var Ea=Ca,Da={ref:"root",class:"quickAccessInside"},Pa=["title","placeholder"],Ta={class:"dropdown"},Va={class:"no-result"},Na=["onClick"],Ia=["onMouseenter","onClick"],xa={class:"quickAccessMatomoSearch"},Ba=["onMouseenter","onClick"],Aa=["textContent"],La={class:"quick-access-category helpCategory"},Ma=["href"];function _a(e,t,n,r,o,a){var i=Object(K["resolveDirective"])("focus-if"),l=Object(K["resolveDirective"])("focus-anywhere-but-here");return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Da,[Object(K["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle,placeholder:e.translate("General_Search"),ref:"input"},null,40,Pa),[[K["vModelText"],e.searchTerm],[i,{focused:e.searchActive}]]),Object(K["withDirectives"])(Object(K["createElementVNode"])("div",Ta,[Object(K["withDirectives"])(Object(K["createElementVNode"])("ul",null,[Object(K["createElementVNode"])("li",Va,Object(K["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[K["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.menuItems,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("ul",{key:t.title},[Object(K["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(K["toDisplayString"])(t.title),9,Na),(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(t.items,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:Object(K["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(K["createElementVNode"])("a",null,Object(K["toDisplayString"])(t.name.trim()),1)],42,Ia)})),128))])})),128)),Object(K["createElementVNode"])("ul",xa,[Object(K["withDirectives"])(Object(K["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(K["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[K["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(K["withDirectives"])(Object(K["createElementVNode"])("li",{class:"no-result"},Object(K["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[K["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.sites,(function(t,n){return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:Object(K["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(K["createElementVNode"])("a",{textContent:Object(K["toDisplayString"])(t.name)},null,8,Aa)],42,Ba)),[[K["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(K["createElementVNode"])("ul",null,[Object(K["createElementVNode"])("li",La,Object(K["toDisplayString"])(e.translate("General_HelpResources")),1),Object(K["createElementVNode"])("li",{class:Object(K["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(K["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(K["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Ma)],34)])],512),[[K["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}var Fa=window,Ra=Fa.ListingFormatter;function Ha(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function Ua(e){e&&e.scrollIntoView&&e.scrollIntoView()}var $a=Object(K["defineComponent"])({directives:{FocusAnywhereButHere:qt,FocusIf:zt},watch:{searchActive:function(e){var t=this.$refs.root;if(t&&t.parentElement){var n=t.parentElement.classList;n.toggle("active",e),n.toggle("expanded",e)}}},mounted:function(){var e=this,t=this.$refs.root;t&&t.parentElement&&t.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),ce.helper.registerShortcut("f",a("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),Ua(e.$refs.root),e.activateSearch())}))},data:function(){var e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created:function(){this.searchMenu=Ot(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector('.top_controls .siteSelector,.top_controls [vue-entry="CoreHome.SiteSelector"]')},quickAccessTitle:function(){var e=[a("CoreHome_MenuEntries")];return this.hasSegmentSelector&&e.push(a("CoreHome_Segments")),this.hasSitesSelector&&e.push(a("SitesManager_Sites")),a("CoreHome_QuickAccessTitle",Ra.formatAnd(e))}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,o=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||o&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!Ha(e)&&Ua(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,o={},a=[],i=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in o||(a.push({title:n,items:[]}),o[n]=a.length-1);var i=o[n];a[i].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,aa.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var l=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var c=this.topMenuItems.filter(l),s=this.leftMenuItems.filter(l),u=this.segmentItems.filter(l);c.forEach(i),s.forEach(i),u.forEach(i),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){aa.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=a("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var o,a,i=null===(o=r.textContent)||void 0===o?void 0:o.trim();i||(i=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.trim());i&&(n.push({name:i,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r,o=window.$(n).find("> .item"),a=(null===(r=o[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.slice(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var o,i=null===(o=r.textContent)||void 0===o?void 0:o.trim();i&&(t.push({name:i,category:a,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=a("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var o,a,i=null===(o=r.querySelector(".segname"))||void 0===o||null===(a=o.textContent)||void 0===a?void 0:a.trim();i&&(n.push({name:i,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});$a.render=_a;var qa=$a;function Wa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var za={class:"fieldArray form-group"},Ga={key:0,class:"fieldUiControl"},Ya=["onClick","title"];function Ja(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("Field");return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",za,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.modelValue,(function(t,n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{class:Object(K["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",Wa({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Ga,[Object(K["createVNode"])(i,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},"model-modifiers":e.field.modelModifiers,placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n),"template-file":e.field.templateFile,component:e.field.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","title","name","template-file","component"])])):Object(K["createCommentVNode"])("",!0),Object(K["withDirectives"])(Object(K["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Ya),[[K["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Ka(e){return ei(e)||Za(e)||Xa(e)||Qa()}function Qa(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xa(e,t){if(e){if("string"===typeof e)return ti(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ti(e,t):void 0}}function Za(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ei(e){if(Array.isArray(e))return ti(e)}function ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});ri.render=Ja;var oi=ri;function ai(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ii={class:"multiPairField form-group"},li={key:1,class:"fieldUiControl fieldUiControl2"},ci={key:2,class:"fieldUiControl fieldUiControl3"},si={key:3,class:"fieldUiControl fieldUiControl4"},ui=["onClick","title"];function di(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("Field");return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",ii,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.modelValue,(function(t,n){var r;return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{class:Object(K["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},ai(r,"multiPairFieldTable".concat(n),!0),ai(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{key:0,class:Object(K["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(K["createVNode"])(i,{"full-width":!0,"model-value":t[e.field1.key],options:e.field1.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field1.key,t)},"model-modifiers":e.field1.modelModifiers,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","name","title","template-file","component"])],2)):Object(K["createCommentVNode"])("",!0),e.field2?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",li,[Object(K["createVNode"])(i,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field2.key,t)},"model-value":t[e.field2.key],"model-modifiers":e.field2.modelModifiers,placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","title","template-file","component"])])):Object(K["createCommentVNode"])("",!0),e.field3?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",ci,[Object(K["createVNode"])(i,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field3.key,t)},"model-value":t[e.field3.key],"model-modifiers":e.field3.modelModifiers,placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","title","template-file","component"])])):Object(K["createCommentVNode"])("",!0),e.field4?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",si,[Object(K["createVNode"])(i,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field4.key,t)},"model-value":t[e.field4.key],"model-modifiers":e.field4.modelModifiers,placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","title","template-file","component"])])):Object(K["createCommentVNode"])("",!0),Object(K["withDirectives"])(Object(K["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ui),[[K["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(e){return gi(e)||bi(e)||hi(e)||fi()}function fi(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hi(e,t){if(e){if("string"===typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}function bi(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function gi(e){if(Array.isArray(e))return vi(e)}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});Oi.render=di;var ji=Oi,wi={ref:"root",class:"periodSelector piwikSelector"},ki=["title"],Si=Object(K["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ci={id:"periodMore",class:"dropdown"},Ei={class:"flex"},Di={key:0,class:"period-date"},Pi={class:"period-type"},Ti={id:"otherPeriods"},Vi=["onDblclick","title"],Ni=["id","checked","onChange","onDblclick"],Ii={key:0,class:"compare-checkbox"},xi={id:"comparePeriodToDropdown"},Bi={key:1,class:"compare-date-range"},Ai={id:"comparePeriodStartDate"},Li=Object(K["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),Mi={id:"comparePeriodEndDate"},_i={class:"apply-button-container"},Fi=["disabled","value"],Ri={key:2,id:"ajaxLoadingCalendar"},Hi={class:"loadingSegment"};function Ui(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("DateRangePicker"),l=Object(K["resolveComponent"])("PeriodDatePicker"),c=Object(K["resolveComponent"])("Field"),s=Object(K["resolveComponent"])("ActivityIndicator"),u=Object(K["resolveDirective"])("expand-on-click");return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("div",wi,[Object(K["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Si,Object(K["createTextVNode"])(" "+Object(K["toDisplayString"])(e.currentlyViewingText),1)],8,ki),Object(K["createElementVNode"])("div",Ci,[Object(K["createElementVNode"])("div",Ei,[Object(K["createElementVNode"])("div",null,[Object(K["withDirectives"])(Object(K["createVNode"])(i,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[K["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Di,[Object(K["createVNode"])(l,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(K["createCommentVNode"])("",!0)]),Object(K["createElementVNode"])("div",Pi,[Object(K["createElementVNode"])("h6",null,Object(K["toDisplayString"])(e.translate("General_Period")),1),Object(K["createElementVNode"])("div",Ti,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.periodsFiltered,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("p",{key:n},[Object(K["createElementVNode"])("label",{class:Object(K["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Ni),[[K["vModelRadio"],e.selectedPeriod]]),Object(K["createElementVNode"])("span",null,Object(K["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Vi)])})),128))])])]),e.isComparisonEnabled?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Ii,[Object(K["createElementVNode"])("label",null,[Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[K["vModelCheckbox"],e.isComparing]]),Object(K["createElementVNode"])("span",null,Object(K["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(K["createElementVNode"])("div",xi,[Object(K["createVNode"])(c,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(K["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(K["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Bi,[Object(K["createElementVNode"])("div",null,[Object(K["createElementVNode"])("div",Ai,[Object(K["createElementVNode"])("div",null,[Object(K["createVNode"])(c,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),Li,Object(K["createElementVNode"])("div",Mi,[Object(K["createElementVNode"])("div",null,[Object(K["createVNode"])(c,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(K["createCommentVNode"])("",!0),Object(K["createElementVNode"])("div",_i,[Object(K["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,Fi)]),e.isLoadingNewPage?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Ri,[Object(K["createVNode"])(s,{loading:!0}),Object(K["createElementVNode"])("div",Hi,Object(K["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(K["createCommentVNode"])("",!0)])],512)),[[u,{expander:"title"}]])}function $i(e,t){return Yi(e)||Gi(e,t)||Wi(e,t)||qi()}function qi(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wi(e,t){if(e){if("string"===typeof e)return zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zi(e,t):void 0}}function zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nr?(window.$("#alert").find("h2").text(a("General_InvalidDateRange")),ce.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return p(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(e){e!==this.periodValue&&"range"!==e&&this.setPiwikPeriodAndDate(e,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=p(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;ce.helper.isReportingPage()?(this.closePeriodSelector(),n=Ce.hashParsed.value):(this.isLoadingNewPage=!0,n=Ce.parsed.value);var o=Object.assign({},n);delete o.comparePeriods,delete o.compareDates,Ce.updateLocation(Object.assign(Object.assign({},o),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Ce.parsed.value.date,t=Ce.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{m.parse(t,e)}catch(l){return}if("range"===t){var n=m.get(t).parse(e),r=n.getDateRange(),o=$i(r,2),a=o[0],i=o[1];this.dateValue=a,this.startRangeDate=p(a),this.endRangeDate=p(i)}else this.dateValue=h(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=m.parse(e,t).getDateRange();this.startRangeDate=p(n[0]Zi?Zi:n[1])},getPeriodDisplayText:function(e){return m.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{h(this.compareStartDate)}catch(e){return!1}try{h(this.compareEndDate)}catch(e){return!1}return!0}}});tl.render=Ui;var nl=tl,rl={class:"reportingMenu"},ol=["aria-label"],al=["onClick"],il={class:"hidden"},ll={role:"menu"},cl=["href","onClick","title"],sl=["href","onClick"],ul=["onClick"],dl=Object(K["createElementVNode"])("span",{class:"icon-help"},null,-1),ml=[dl],pl={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},fl={class:"collapsible collapsible-accordion"},hl={class:"collapsible-header"},bl={class:"collapsible-body"},gl=["onClick","href"],vl=["onClick","href"];function yl(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("MenuItemsDropdown"),l=Object(K["resolveDirective"])("side-nav");return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",rl,[Object(K["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.menu,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:Object(K["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(K["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(K["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(K["createElementVNode"])("span",{class:Object(K["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-chevron-down"))},null,2),Object(K["createTextVNode"])(Object(K["toDisplayString"])(t.name)+" ",1),Object(K["createElementVNode"])("span",il,Object(K["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,al),Object(K["createElementVNode"])("ul",ll,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(t.subcategories,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{role:"menuitem",class:Object(K["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(K["openBlock"])(),Object(K["createBlock"])(i,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(K["withCtx"])((function(){return[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(n.subcategories,(function(r){return Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{class:Object(K["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(K["toDisplayString"])(r.name),11,cl)})),128))]})),_:2},1032,["menu-title"])):Object(K["createCommentVNode"])("",!0),n.isGroup?Object(K["createCommentVNode"])("",!0):(Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(K["toDisplayString"])(n.name),9,sl)),n.help?(Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{key:2,class:Object(K["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},ml,10,ul)):Object(K["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,ol),Object(K["createElementVNode"])("ul",pl,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.menu,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(K["withDirectives"])(Object(K["createElementVNode"])("ul",fl,[Object(K["createElementVNode"])("li",null,[Object(K["createElementVNode"])("a",hl,[Object(K["createElementVNode"])("i",{class:Object(K["normalizeClass"])(t.icon?t.icon:"icon-chevron-down")},null,2),Object(K["createTextVNode"])(Object(K["toDisplayString"])(t.name),1)]),Object(K["createElementVNode"])("div",bl,[Object(K["createElementVNode"])("ul",null,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(t.subcategories,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],{key:0},Object(K["renderList"])(n.subcategories,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(K["toDisplayString"])(n.name),9,gl)})),128)):Object(K["createCommentVNode"])("",!0),n.isGroup?Object(K["createCommentVNode"])("",!0):(Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{key:1,onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(K["toDisplayString"])(n.name),9,vl))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}function Ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jl(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.state.isInitialized&&0===n.length?Promise.resolve(Object(K["readonly"])(this.state.initialSites)):this.stateFiltered.isInitialized&&n.length===this.stateFiltered.excludedSites.length&&n.every((function(t,n){return t===e.stateFiltered.excludedSites[n]}))?Promise.resolve(Object(K["readonly"])(this.stateFiltered.initialSites)):(n.length>0&&this.searchSite("%",t,n).then((function(t){e.stateFiltered.isInitialized=!0,e.stateFiltered.excludedSites=n,null!==t&&(e.stateFiltered.initialSites=t)})),this.state.isInitialized?Promise.resolve(Object(K["readonly"])(this.state.initialSites)):this.searchSite("%",t,n).then((function(t){return e.state.isInitialized=!0,null!==t&&(e.state.initialSites=t),t})))}},{key:"loadSite",value:function(e){"all"===e?Ce.updateUrl(Object.assign(Object.assign({},Ce.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ce.parsed.value.date,period:Ce.parsed.value.period})):Ce.updateUrl(Object.assign(Object.assign({},Ce.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},Ce.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Qe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(o){var a=o.value,i="SitesManager.getPatternMatchSites";return n&&(i="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Qe.fetch({method:i,limit:a,pattern:e,sitesToExclude:r},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites(n,r)}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return Object.assign(Object.assign({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()t.name.toLowerCase()?1:0})),t):[]}}]),e}(),aa=new oa,ia=["value","name"],la=["title"],ca=["textContent"],sa={key:1,class:"placeholder"},ua={class:"dropdown"},da={class:"custom_select_search"},ma=["placeholder"],pa={key:0},fa={class:"custom_select_container"},ha=["onClick"],ba=["innerHTML","href","title"],ga={class:"custom_select_ul_list"},va={class:"noresult"},ya={key:1};function Oa(e,t,n,r,o,a){var i,l,c,s,u=Object(K["resolveComponent"])("AllSitesLink"),d=Object(K["resolveDirective"])("focus-if"),m=Object(K["resolveDirective"])("focus-anywhere-but-here");return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{class:Object(K["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(K["openBlock"])(),Object(K["createElementBlock"])("input",{key:0,type:"hidden",value:null===(i=e.displayedModelValue)||void 0===i?void 0:i.id,name:e.name},null,8,ia)):Object(K["createCommentVNode"])("",!0),Object(K["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(K["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(K["createElementVNode"])("span",{class:Object(K["normalizeClass"])(["icon icon-chevron-down",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(K["createElementVNode"])("span",null,[null!==(l=e.displayedModelValue)&&void 0!==l&&l.name||!e.placeholder?(Object(K["openBlock"])(),Object(K["createElementBlock"])("span",{key:0,textContent:Object(K["toDisplayString"])((null===(c=e.displayedModelValue)||void 0===c?void 0:c.name)||e.firstSiteName)},null,8,ca)):Object(K["createCommentVNode"])("",!0),null!==(s=e.displayedModelValue)&&void 0!==s&&s.name||!e.placeholder?Object(K["createCommentVNode"])("",!0):(Object(K["openBlock"])(),Object(K["createElementBlock"])("span",sa,Object(K["toDisplayString"])(e.placeholder),1))])],42,la),Object(K["withDirectives"])(Object(K["createElementVNode"])("div",ua,[Object(K["withDirectives"])(Object(K["createElementVNode"])("div",da,[Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,ma),[[K["vModelText"],e.searchTerm],[d,{focused:e.shouldFocusOnSearch}]]),Object(K["withDirectives"])(Object(K["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[K["vShow"],e.searchTerm]])],512),[[K["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",pa,[Object(K["createVNode"])(u,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(K["createCommentVNode"])("",!0),Object(K["createElementVNode"])("div",fa,[Object(K["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.sites,(function(n,r){return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(K["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,ba)],8,ha)),[[K["vShow"],!(!e.showSelectedSite&&"".concat(e.activeSiteId)==="".concat(n.idsite))]])})),128))]),Object(K["withDirectives"])(Object(K["createElementVNode"])("ul",ga,[Object(K["createElementVNode"])("li",null,[Object(K["createElementVNode"])("div",va,Object(K["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[K["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",ya,[Object(K["createVNode"])(u,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(K["createCommentVNode"])("",!0)],512),[[K["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var ja=["innerHTML","href"];function wa(e,t,n,r,o,a){var i=this;return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return i.onClick(e)}),class:"custom_select_all"},[Object(K["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,ja)])}var ka=Object(K["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});ka.render=wa;var Sa=ka,Ca=Object(K["defineComponent"])({props:{modelValue:Object,showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:a("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String,defaultToFirstSite:Boolean,sitesToExclude:{type:Array,default:function(){return[]}}},emits:["update:modelValue","blur"],components:{AllSitesLink:Sa},directives:{FocusAnywhereButHere:qt,FocusIf:zt},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(ce.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(ce.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Ot(this.searchSite),!this.modelValue&&ce.idSite&&this.$emit("update:modelValue",{id:ce.idSite,name:ce.helper.htmlDecode(ce.siteName)})},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.shouldDefaultToFirstSite&&e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=a("CoreHome_ShortcutWebsiteSelector");ce.helper.registerShortcut("w",t,(function(t){if(!t.altKey){t.preventDefault?t.preventDefault():t.returnValue=!1;var n=e.$refs.selectorLink;n&&(n.click(),n.focus())}}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?a("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){var e=aa.initialSitesFiltered.value&&aa.initialSitesFiltered.value.length?aa.initialSitesFiltered.value:aa.initialSites.value;return e&&e.length>1},firstSiteName:function(){var e=aa.initialSitesFiltered.value&&aa.initialSitesFiltered.value.length?aa.initialSitesFiltered.value:aa.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Ce.stringify(Object.assign(Object.assign({},Ce.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ce.parsed.value.date,period:Ce.parsed.value.period}));return"?".concat(e)},shouldDefaultToFirstSite:function(){var e;return!(null!==(e=this.modelValue)&&void 0!==e&&e.id)&&(!this.hasMultipleSites||this.defaultToFirstSite)&&this.sites[0]},displayedModelValue:function(){return this.modelValue?this.modelValue:ce.idSite?{id:ce.idSite,name:ce.helper.htmlDecode(ce.siteName)}:this.shouldDefaultToFirstSite?{id:this.sites[0].idsite,name:this.sites[0].name}:null}},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({id:"all",name:this.$props.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.id,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.id&&aa.loadSite(e.id))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return ce.helper.htmlEntities(e);var n=ce.helper.htmlEntities(e.substring(0,t)),r=ce.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'').concat(this.searchTerm,"").concat(r)},loadInitialSites:function(){var e=this;return aa.loadInitialSites(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[]).then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,aa.searchSite(e,this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[]).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Ce.stringify(Object.assign(Object.assign({},Ce.urlParsed.value),{},{segment:"",idSite:e})),n=Ce.stringify(Object.assign(Object.assign({},Ce.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});Ca.render=Oa;var Ea=Ca,Da={ref:"root",class:"quickAccessInside"},Pa=["title","placeholder"],Ta={class:"dropdown"},Va={class:"no-result"},Na=["onClick"],Ia=["onMouseenter","onClick"],xa={class:"quickAccessMatomoSearch"},Ba=["onMouseenter","onClick"],Aa=["textContent"],La={class:"quick-access-category helpCategory"},Ma=["href"];function _a(e,t,n,r,o,a){var i=Object(K["resolveDirective"])("focus-if"),l=Object(K["resolveDirective"])("focus-anywhere-but-here");return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Da,[Object(K["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle,placeholder:e.translate("General_Search"),ref:"input"},null,40,Pa),[[K["vModelText"],e.searchTerm],[i,{focused:e.searchActive}]]),Object(K["withDirectives"])(Object(K["createElementVNode"])("div",Ta,[Object(K["withDirectives"])(Object(K["createElementVNode"])("ul",null,[Object(K["createElementVNode"])("li",Va,Object(K["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[K["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.menuItems,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("ul",{key:t.title},[Object(K["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(K["toDisplayString"])(t.title),9,Na),(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(t.items,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:Object(K["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(K["createElementVNode"])("a",null,Object(K["toDisplayString"])(t.name.trim()),1)],42,Ia)})),128))])})),128)),Object(K["createElementVNode"])("ul",xa,[Object(K["withDirectives"])(Object(K["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(K["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[K["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(K["withDirectives"])(Object(K["createElementVNode"])("li",{class:"no-result"},Object(K["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[K["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.sites,(function(t,n){return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:Object(K["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(K["createElementVNode"])("a",{textContent:Object(K["toDisplayString"])(t.name)},null,8,Aa)],42,Ba)),[[K["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(K["createElementVNode"])("ul",null,[Object(K["createElementVNode"])("li",La,Object(K["toDisplayString"])(e.translate("General_HelpResources")),1),Object(K["createElementVNode"])("li",{class:Object(K["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(K["createElementVNode"])("a",{href:"https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(K["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Ma)],34)])],512),[[K["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}var Fa=window,Ra=Fa.ListingFormatter;function Ha(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function Ua(e){e&&e.scrollIntoView&&e.scrollIntoView()}var $a=Object(K["defineComponent"])({directives:{FocusAnywhereButHere:qt,FocusIf:zt},watch:{searchActive:function(e){var t=this.$refs.root;if(t&&t.parentElement){var n=t.parentElement.classList;n.toggle("active",e),n.toggle("expanded",e)}}},mounted:function(){var e=this,t=this.$refs.root;t&&t.parentElement&&t.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),ce.helper.registerShortcut("f",a("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),Ua(e.$refs.root),e.activateSearch())}))},data:function(){var e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created:function(){this.searchMenu=Ot(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector('.top_controls .siteSelector,.top_controls [vue-entry="CoreHome.SiteSelector"]')},quickAccessTitle:function(){var e=[a("CoreHome_MenuEntries")];return this.hasSegmentSelector&&e.push(a("CoreHome_Segments")),this.hasSitesSelector&&e.push(a("SitesManager_Sites")),a("CoreHome_QuickAccessTitle",Ra.formatAnd(e))}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,o=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||o&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.input&&this.$refs.input.blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!Ha(e)&&Ua(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");if(e&&e.length&&e.item(this.searchIndex))return e.item(this.searchIndex)},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,o={},a=[],i=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in o||(a.push({title:n,items:[]}),o[n]=a.length-1);var i=o[n];a[i].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,aa.searchSite(n).then((function(e){e&&(t.sites=e)})).finally((function(){t.isLoading=!1})));var l=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var c=this.topMenuItems.filter(l),s=this.leftMenuItems.filter(l),u=this.segmentItems.filter(l);c.forEach(i),s.forEach(i),u.forEach(i),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){aa.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=a("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var o,a,i=null===(o=r.textContent)||void 0===o?void 0:o.trim();i||(i=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.trim());i&&(n.push({name:i,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r,o=window.$(n).find("> .item"),a=(null===(r=o[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.slice(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var o,i=null===(o=r.textContent)||void 0===o?void 0:o.trim();i&&(t.push({name:i,category:a,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=a("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var o,a,i=null===(o=r.querySelector(".segname"))||void 0===o||null===(a=o.textContent)||void 0===a?void 0:a.trim();i&&(n.push({name:i,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});$a.render=_a;var qa=$a;function Wa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var za={class:"fieldArray form-group"},Ga={key:0,class:"fieldUiControl"},Ya=["onClick","title"];function Ja(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("Field");return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",za,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.modelValue,(function(t,n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{class:Object(K["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",Wa({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Ga,[Object(K["createVNode"])(i,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},"model-modifiers":e.field.modelModifiers,placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n),"template-file":e.field.templateFile,component:e.field.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","title","name","template-file","component"])])):Object(K["createCommentVNode"])("",!0),Object(K["withDirectives"])(Object(K["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Ya),[[K["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Ka(e){return ei(e)||Za(e)||Xa(e)||Qa()}function Qa(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xa(e,t){if(e){if("string"===typeof e)return ti(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ti(e,t):void 0}}function Za(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ei(e){if(Array.isArray(e))return ti(e)}function ti(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});ri.render=Ja;var oi=ri;function ai(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ii={class:"multiPairField form-group"},li={key:1,class:"fieldUiControl fieldUiControl2"},ci={key:2,class:"fieldUiControl fieldUiControl3"},si={key:3,class:"fieldUiControl fieldUiControl4"},ui=["onClick","title"];function di(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("Field");return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",ii,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.modelValue,(function(t,n){var r;return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{class:Object(K["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},ai(r,"multiPairFieldTable".concat(n),!0),ai(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",{key:0,class:Object(K["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(K["createVNode"])(i,{"full-width":!0,"model-value":t[e.field1.key],options:e.field1.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field1.key,t)},"model-modifiers":e.field1.modelModifiers,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title,"template-file":e.field1.templateFile,component:e.field1.component},null,8,["model-value","options","onUpdate:modelValue","model-modifiers","uicontrol","name","title","template-file","component"])],2)):Object(K["createCommentVNode"])("",!0),e.field2?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",li,[Object(K["createVNode"])(i,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field2.key,t)},"model-value":t[e.field2.key],"model-modifiers":e.field2.modelModifiers,placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title,"template-file":e.field2.templateFile,component:e.field2.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","name","title","template-file","component"])])):Object(K["createCommentVNode"])("",!0),e.field3?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",ci,[Object(K["createVNode"])(i,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field3.key,t)},"model-value":t[e.field3.key],"model-modifiers":e.field3.modelModifiers,placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","title","template-file","component"])])):Object(K["createCommentVNode"])("",!0),e.field4?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",si,[Object(K["createVNode"])(i,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(n,e.field4.key,t)},"model-value":t[e.field4.key],"model-modifiers":e.field4.modelModifiers,placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","model-value","model-modifiers","uicontrol","title","template-file","component"])])):Object(K["createCommentVNode"])("",!0),Object(K["withDirectives"])(Object(K["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ui),[[K["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(e){return gi(e)||bi(e)||hi(e)||fi()}function fi(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hi(e,t){if(e){if("string"===typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}function bi(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function gi(e){if(Array.isArray(e))return vi(e)}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});Oi.render=di;var ji=Oi,wi={ref:"root",class:"periodSelector piwikSelector"},ki=["title"],Si=Object(K["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ci={id:"periodMore",class:"dropdown"},Ei={class:"flex"},Di={key:0,class:"period-date"},Pi={class:"period-type"},Ti={id:"otherPeriods"},Vi=["onDblclick","title"],Ni=["id","checked","onChange","onDblclick"],Ii={key:0,class:"compare-checkbox"},xi={id:"comparePeriodToDropdown"},Bi={key:1,class:"compare-date-range"},Ai={id:"comparePeriodStartDate"},Li=Object(K["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),Mi={id:"comparePeriodEndDate"},_i={class:"apply-button-container"},Fi=["disabled","value"],Ri={key:2,id:"ajaxLoadingCalendar"},Hi={class:"loadingSegment"};function Ui(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("DateRangePicker"),l=Object(K["resolveComponent"])("PeriodDatePicker"),c=Object(K["resolveComponent"])("Field"),s=Object(K["resolveComponent"])("ActivityIndicator"),u=Object(K["resolveDirective"])("expand-on-click");return Object(K["withDirectives"])((Object(K["openBlock"])(),Object(K["createElementBlock"])("div",wi,[Object(K["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Si,Object(K["createTextVNode"])(" "+Object(K["toDisplayString"])(e.currentlyViewingText),1)],8,ki),Object(K["createElementVNode"])("div",Ci,[Object(K["createElementVNode"])("div",Ei,[Object(K["createElementVNode"])("div",null,[Object(K["withDirectives"])(Object(K["createVNode"])(i,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[K["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Di,[Object(K["createVNode"])(l,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(K["createCommentVNode"])("",!0)]),Object(K["createElementVNode"])("div",Pi,[Object(K["createElementVNode"])("h6",null,Object(K["toDisplayString"])(e.translate("General_Period")),1),Object(K["createElementVNode"])("div",Ti,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.periodsFiltered,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("p",{key:n},[Object(K["createElementVNode"])("label",{class:Object(K["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Ni),[[K["vModelRadio"],e.selectedPeriod]]),Object(K["createElementVNode"])("span",null,Object(K["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Vi)])})),128))])])]),e.isComparisonEnabled?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Ii,[Object(K["createElementVNode"])("label",null,[Object(K["withDirectives"])(Object(K["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[K["vModelCheckbox"],e.isComparing]]),Object(K["createElementVNode"])("span",null,Object(K["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(K["createElementVNode"])("div",xi,[Object(K["createVNode"])(c,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(K["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(K["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Bi,[Object(K["createElementVNode"])("div",null,[Object(K["createElementVNode"])("div",Ai,[Object(K["createElementVNode"])("div",null,[Object(K["createVNode"])(c,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),Li,Object(K["createElementVNode"])("div",Mi,[Object(K["createElementVNode"])("div",null,[Object(K["createVNode"])(c,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(K["createCommentVNode"])("",!0),Object(K["createElementVNode"])("div",_i,[Object(K["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,Fi)]),e.isLoadingNewPage?(Object(K["openBlock"])(),Object(K["createElementBlock"])("div",Ri,[Object(K["createVNode"])(s,{loading:!0}),Object(K["createElementVNode"])("div",Hi,Object(K["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(K["createCommentVNode"])("",!0)])],512)),[[u,{expander:"title"}]])}function $i(e,t){return Yi(e)||Gi(e,t)||Wi(e,t)||qi()}function qi(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wi(e,t){if(e){if("string"===typeof e)return zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zi(e,t):void 0}}function zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nr?(window.$("#alert").find("h2").text(a("General_InvalidDateRange")),ce.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return p(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(e){e!==this.periodValue&&"range"!==e&&this.setPiwikPeriodAndDate(e,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=p(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;ce.helper.isReportingPage()?(this.closePeriodSelector(),n=Ce.hashParsed.value):(this.isLoadingNewPage=!0,n=Ce.parsed.value);var o=Object.assign({},n);delete o.comparePeriods,delete o.compareDates,Ce.updateLocation(Object.assign(Object.assign({},o),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Ce.parsed.value.date,t=Ce.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{m.parse(t,e)}catch(l){return}if("range"===t){var n=m.get(t).parse(e),r=n.getDateRange(),o=$i(r,2),a=o[0],i=o[1];this.dateValue=a,this.startRangeDate=p(a),this.endRangeDate=p(i)}else this.dateValue=h(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=m.parse(e,t).getDateRange();this.startRangeDate=p(n[0]Zi?Zi:n[1])},getPeriodDisplayText:function(e){return m.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{h(this.compareStartDate)}catch(e){return!1}try{h(this.compareEndDate)}catch(e){return!1}return!0}}});tl.render=Ui;var nl=tl,rl={class:"reportingMenu"},ol=["aria-label"],al=["onClick"],il={class:"hidden"},ll={role:"menu"},cl=["href","onClick","title"],sl=["href","onClick"],ul=["onClick"],dl=Object(K["createElementVNode"])("span",{class:"icon-help"},null,-1),ml=[dl],pl={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},fl={class:"collapsible collapsible-accordion"},hl={class:"collapsible-header"},bl={class:"collapsible-body"},gl=["onClick","href"],vl=["onClick","href"];function yl(e,t,n,r,o,a){var i=Object(K["resolveComponent"])("MenuItemsDropdown"),l=Object(K["resolveDirective"])("side-nav");return Object(K["openBlock"])(),Object(K["createElementBlock"])("div",rl,[Object(K["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.menu,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:Object(K["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(K["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(K["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(K["createElementVNode"])("span",{class:Object(K["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:t.subcategories&&t.id===e.activeCategory?"icon-chevron-down":"icon-chevron-right"))},null,2),Object(K["createTextVNode"])(Object(K["toDisplayString"])(t.name)+" ",1),Object(K["createElementVNode"])("span",il,Object(K["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,al),Object(K["createElementVNode"])("ul",ll,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(t.subcategories,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{role:"menuitem",class:Object(K["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(K["openBlock"])(),Object(K["createBlock"])(i,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(K["withCtx"])((function(){return[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(n.subcategories,(function(r){return Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{class:Object(K["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(K["toDisplayString"])(r.name),11,cl)})),128))]})),_:2},1032,["menu-title"])):Object(K["createCommentVNode"])("",!0),n.isGroup?Object(K["createCommentVNode"])("",!0):(Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(K["toDisplayString"])(n.name),9,sl)),n.help?(Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{key:2,class:Object(K["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},ml,10,ul)):Object(K["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,ol),Object(K["createElementVNode"])("ul",pl,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(e.menu,(function(t){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(K["withDirectives"])(Object(K["createElementVNode"])("ul",fl,[Object(K["createElementVNode"])("li",null,[Object(K["createElementVNode"])("a",hl,[Object(K["createElementVNode"])("i",{class:Object(K["normalizeClass"])(t.icon?t.icon:"icon-chevron-down")},null,2),Object(K["createTextVNode"])(Object(K["toDisplayString"])(t.name),1)]),Object(K["createElementVNode"])("div",bl,[Object(K["createElementVNode"])("ul",null,[(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],null,Object(K["renderList"])(t.subcategories,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(K["openBlock"])(!0),Object(K["createElementBlock"])(K["Fragment"],{key:0},Object(K["renderList"])(n.subcategories,(function(n){return Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(K["toDisplayString"])(n.name),9,gl)})),128)):Object(K["createCommentVNode"])("",!0),n.isGroup?Object(K["createCommentVNode"])("",!0):(Object(K["openBlock"])(),Object(K["createElementBlock"])("a",{key:1,onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(K["toDisplayString"])(n.name),9,vl))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}function Ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jl(e,t){for(var n=0;n {{ category.name }}