diff --git a/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js b/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js index fb0cc0b601b..741855e63b5 100644 --- a/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js +++ b/plugins/MultiSites/tests/UI/AllWebsitesDashboard_spec.js @@ -191,6 +191,8 @@ describe('AllWebsitesDashboard', function () { expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); expect(await getSitesTableCell(1, 2)).to.equal('2'); + expect(await getSitesTableCell(2, 1)).to.equal('Site 2'); + expect(await getSitesTableCell(2, 2)).to.equal('1'); // reverse default "visits" sorting await page.click('.sitesTableSort.sitesTableSortDesc'); @@ -221,19 +223,21 @@ describe('AllWebsitesDashboard', function () { }); it('should allow sorting by other metrics', async function () { - // sort by "pageviews" - await page.click('.sitesTable th:nth-child(3)'); + // sort by "hits" + await page.click('.sitesTable th:nth-child(4)'); await page.waitForNetworkIdle(); expect(await getSitesTableCell(1, 1)).to.equal('Site 1'); - expect(await getSitesTableCell(1, 3)).to.equal('3'); + expect(await getSitesTableCell(1, 4)).to.equal('4'); + expect(await getSitesTableCell(2, 1)).to.equal('Site 3'); + expect(await getSitesTableCell(2, 4)).to.equal('4'); // reverse sorting - await page.click('.sitesTable th:nth-child(3)'); + await page.click('.sitesTable th:nth-child(4)'); await page.waitForNetworkIdle(); expect(await getSitesTableCell(1, 1)).to.not.equal('Site 1'); - expect(await getSitesTableCell(1, 3)).to.equal('0'); + expect(await getSitesTableCell(1, 4)).to.equal('0'); }); it('should allow changing the evolution metric', async function () { diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index 7578d2ac66e..6ae4e6a7f4e 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -826,74 +826,74 @@ function SitesTablevue_type_template_id_198e6bf1_render(_ctx, _cache, $props, $s } // CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=template&id=198e6bf1 -// 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/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=784430e8 +// 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/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=66fe07ff -var SitesTableSitevue_type_template_id_784430e8_hoisted_1 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_1 = { class: "label" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_2 = ["href", "title"]; +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_2 = ["href", "title"]; -var SitesTableSitevue_type_template_id_784430e8_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-outlink" }, null, -1); -var SitesTableSitevue_type_template_id_784430e8_hoisted_4 = [SitesTableSitevue_type_template_id_784430e8_hoisted_3]; -var SitesTableSitevue_type_template_id_784430e8_hoisted_5 = ["href"]; -var SitesTableSitevue_type_template_id_784430e8_hoisted_6 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_4 = [SitesTableSitevue_type_template_id_66fe07ff_hoisted_3]; +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_5 = ["href"]; +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_6 = { key: 1, class: "value" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_7 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_7 = { class: "value" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_8 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_8 = { class: "value" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_9 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_9 = { class: "value" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_10 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_10 = { key: 0 }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_11 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_11 = { class: "value" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_12 = ["colspan"]; -var SitesTableSitevue_type_template_id_784430e8_hoisted_13 = ["src"]; -var SitesTableSitevue_type_template_id_784430e8_hoisted_14 = { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_12 = ["colspan"]; +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_13 = ["src"]; +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_14 = { key: 1, class: "sitesTableSparkline" }; -var SitesTableSitevue_type_template_id_784430e8_hoisted_15 = ["href", "title"]; -var SitesTableSitevue_type_template_id_784430e8_hoisted_16 = ["src"]; -function SitesTableSitevue_type_template_id_784430e8_render(_ctx, _cache, $props, $setup, $data, $options) { +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_15 = ["href", "title"]; +var SitesTableSitevue_type_template_id_66fe07ff_hoisted_16 = ["src"]; +function SitesTableSitevue_type_template_id_66fe07ff_render(_ctx, _cache, $props, $setup, $data, $options) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])({ sitesTableGroup: !!_ctx.site.isGroup, sitesTableGroupSite: !_ctx.site.isGroup && !!_ctx.site.group, sitesTableSite: !_ctx.site.isGroup && !_ctx.site.group }) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", SitesTableSitevue_type_template_id_784430e8_hoisted_1, [!_ctx.site.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", SitesTableSitevue_type_template_id_66fe07ff_hoisted_1, [!_ctx.site.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { key: 0 }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { rel: "noreferrer noopener", target: "_blank", href: _ctx.site.main_url, title: _ctx.translate('General_GoTo', _ctx.site.main_url) - }, SitesTableSitevue_type_template_id_784430e8_hoisted_4, 8, SitesTableSitevue_type_template_id_784430e8_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, SitesTableSitevue_type_template_id_66fe07ff_hoisted_4, 8, SitesTableSitevue_type_template_id_66fe07ff_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { title: "View reports", class: "value", href: _ctx.dashboardUrl - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 9, SitesTableSitevue_type_template_id_784430e8_hoisted_5)], 64)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SitesTableSitevue_type_template_id_784430e8_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 1))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_784430e8_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.nb_visits)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_784430e8_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.nb_pageviews)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_784430e8_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.hits)), 1)]), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_784430e8_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_784430e8_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatCurrency(_ctx.site.revenue, _ctx.site.currencySymbol || '')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 9, SitesTableSitevue_type_template_id_66fe07ff_hoisted_5)], 64)) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SitesTableSitevue_type_template_id_66fe07ff_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.siteLabel), 1))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_66fe07ff_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.nb_visits)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_66fe07ff_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.nb_pageviews)), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_66fe07ff_hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatNumber(_ctx.site.hits)), 1)]), _ctx.displayRevenue ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_66fe07ff_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", SitesTableSitevue_type_template_id_66fe07ff_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.formatCurrency(_ctx.site.revenue, _ctx.site.currencySymbol || '')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { colspan: _ctx.displaySparkline ? 1 : 2 - }, [!_ctx.site.isGroup && !!_ctx.site[_ctx.evolutionMetric] ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { + }, [!_ctx.site.isGroup && _ctx.sparklineMetric in _ctx.site ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], { key: 0 }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: _ctx.evolutionIconSrc, alt: "" - }, null, 8, SitesTableSitevue_type_template_id_784430e8_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, SitesTableSitevue_type_template_id_66fe07ff_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.evolutionTrendClass) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.calculateAndFormatEvolution(_ctx.site[_ctx.sparklineMetric], _ctx.site["previous_".concat(_ctx.sparklineMetric)], true)), 3)], 64)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, SitesTableSitevue_type_template_id_784430e8_hoisted_12), _ctx.displaySparkline ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_784430e8_hoisted_14, [!_ctx.site.isGroup ? (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"])(_ctx.calculateAndFormatEvolution(_ctx.site[_ctx.sparklineMetric], _ctx.site["previous_".concat(_ctx.sparklineMetric)] * _ctx.site.ratio, true)), 3)], 64)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, SitesTableSitevue_type_template_id_66fe07ff_hoisted_12), _ctx.displaySparkline ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", SitesTableSitevue_type_template_id_66fe07ff_hoisted_14, [!_ctx.site.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, rel: "noreferrer noopener", target: "_blank", @@ -904,9 +904,9 @@ function SitesTableSitevue_type_template_id_784430e8_render(_ctx, _cache, $props width: "100", height: "25", src: _ctx.evolutionSparklineSrc - }, null, 8, SitesTableSitevue_type_template_id_784430e8_hoisted_16)], 8, SitesTableSitevue_type_template_id_784430e8_hoisted_15)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); + }, null, 8, SitesTableSitevue_type_template_id_66fe07ff_hoisted_16)], 8, SitesTableSitevue_type_template_id_66fe07ff_hoisted_15)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); } -// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=784430e8 +// CONCATENATED MODULE: ./plugins/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=template&id=66fe07ff // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/MultiSites/vue/src/AllWebsitesDashboard/SitesTableSite.vue?vue&type=script&lang=ts @@ -1007,7 +1007,7 @@ function SitesTableSitevue_type_template_id_784430e8_render(_ctx, _cache, $props -SitesTableSitevue_type_script_lang_ts.render = SitesTableSitevue_type_template_id_784430e8_render +SitesTableSitevue_type_script_lang_ts.render = SitesTableSitevue_type_template_id_66fe07ff_render /* harmony default export */ var SitesTableSite = (SitesTableSitevue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./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/MultiSites/vue/src/AllWebsitesDashboard/SitesTable.vue?vue&type=script&lang=ts diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index 9b1aa260872..2f1a0fdbde8 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js @@ -4,7 +4,7 @@ * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var j="desc",g="nb_visits",S=function(){function e(){var t=this;v(this,e),f(this,"fetchAbort",null),f(this,"privateState",Object(o["reactive"])({dashboardKPIs:{evolutionPeriod:"day",hits:"?",hitsEvolution:"",hitsTrend:0,pageviews:"?",pageviewsEvolution:"",pageviewsTrend:0,revenue:"?",revenueEvolution:"",revenueTrend:0,visits:"?",visitsEvolution:"",visitsTrend:0},dashboardSites:[],errorLoading:!1,isLoadingKPIs:!1,isLoadingSites:!1,numSites:0,paginationCurrentPage:0,sortColumn:g,sortOrder:j})),f(this,"autoRefreshInterval",0),f(this,"autoRefreshTimeout",null),f(this,"pageSize",25),f(this,"searchTerm",""),f(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),f(this,"numberOfPages",Object(o["computed"])((function(){return Math.ceil(t.state.value.numSites/t.pageSize-1)}))),f(this,"currentPagingOffset",Object(o["computed"])((function(){return Math.ceil(t.state.value.paginationCurrentPage*t.pageSize)}))),f(this,"paginationLowerBound",Object(o["computed"])((function(){return 0===t.state.value.numSites?0:1+t.currentPagingOffset.value}))),f(this,"paginationUpperBound",Object(o["computed"])((function(){if(0===t.state.value.numSites)return 0;var e=t.pageSize+t.currentPagingOffset.value,r=t.state.value.numSites;return e0&&void 0!==arguments[0]&&arguments[0];this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelAutoRefresh()),this.fetchAbort=new AbortController,this.privateState.errorLoading=!1,this.privateState.isLoadingKPIs=!t,this.privateState.isLoadingSites=!0;var r={method:"MultiSites.getAllWithGroups",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,format_metrics:0,showColumns:["hits_evolution","hits_evolution_trend","label","hits","nb_pageviews","nb_visits","pageviews_evolution","pageviews_evolution_trend","revenue","revenue_evolution","revenue_evolution_trend","visits_evolution","visits_evolution_trend"].join(",")};return this.searchTerm&&(r.pattern=this.searchTerm),p["AjaxHelper"].fetch(r,{abortController:this.fetchAbort}).then((function(r){t||e.updateDashboardKPIs(r),e.updateDashboardSites(r)})).catch((function(){e.privateState.dashboardSites=[],e.privateState.errorLoading=!0})).finally((function(){e.privateState.isLoadingKPIs=!1,e.privateState.isLoadingSites=!1,e.fetchAbort=null,e.startAutoRefresh()}))}},{key:"startAutoRefresh",value:function(){var e=this;if(this.cancelAutoRefresh(),!(this.autoRefreshInterval<=0)){var t;try{t=p["Periods"].parse(p["Matomo"].period,p["Matomo"].currentDateString)}catch(r){}t&&t.containsToday()&&(this.autoRefreshTimeout=setTimeout((function(){e.autoRefreshTimeout=null,e.refreshData()}),1e3*this.autoRefreshInterval))}}},{key:"updateDashboardKPIs",value:function(e){this.privateState.dashboardKPIs={evolutionPeriod:p["Matomo"].period,hits:p["NumberFormatter"].formatNumber(e.totals.hits),hitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.hits,e.totals.previous_hits,!0),hitsTrend:Math.sign(e.totals.hits-e.totals.previous_hits),pageviews:p["NumberFormatter"].formatNumber(e.totals.nb_pageviews),pageviewsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_pageviews,e.totals.previous_nb_pageviews,!0),pageviewsTrend:Math.sign(e.totals.nb_pageviews-e.totals.previous_nb_pageviews),revenue:p["NumberFormatter"].formatCurrency(e.totals.revenue,""),revenueEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.revenue,e.totals.previous_revenue,!0),revenueTrend:Math.sign(e.totals.revenue-e.totals.previous_revenue),visits:p["NumberFormatter"].formatNumber(e.totals.nb_visits),visitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_visits,e.totals.previous_nb_visits,!0),visitsTrend:Math.sign(e.totals.nb_visits-e.totals.previous_nb_visits)}}},{key:"updateDashboardSites",value:function(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites}}]),e}(),k=new S,y={class:"kpiCardContainer"},_={key:0,class:"kpiCard kpiCardLoading"},N=Object(o["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),C={class:"kpiCardValue"},E=Object(o["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),V={key:0,class:"kpiCardBadge"};function w(e,t,r,n,a,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("KPICard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",y,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",_,[N,Object(o["createElementVNode"])("div",C,[Object(o["createVNode"])(s)]),E,e.hasKpiBadge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",V," ")):Object(o["createCommentVNode"])("",!0)])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:1},Object(o["renderList"])(e.kpis,(function(t,r){return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:"kpi-card-".concat(r)},[r>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64)})),128))])}var T={class:"kpiCard"},B={class:"kpiCardTitle"},P={class:"kpiCardValue"},M={class:"kpiCardEvolution"},D={key:1,class:"kpiCardEvolution"},x=Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),L=[x],A=["innerHTML"];function R(e,t,r,n,a,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardIcon ".concat(e.kpi.icon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(o["createElementVNode"])("div",P,Object(o["toDisplayString"])(e.kpi.value),1),Object(o["createElementVNode"])("div",M,[""!==e.kpi.evolutionValue?(Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:0},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionTrend ".concat(e.evolutionTrendClass))},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionIcon ".concat(e.evolutionTrendIcon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.kpi.evolutionValue),1)],2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",D,L))]),e.kpi.badge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.kpi.badge),class:"kpiCardBadge"},null,8,A)):Object(o["createCommentVNode"])("",!0)])}var G=Object(o["defineComponent"])({props:{modelValue:{type:Object,required:!0}},computed:{evolutionTrendFrom:function(){switch(this.kpi.evolutionPeriod){case"day":return"MultiSites_EvolutionFromPreviousDay";case"week":return"MultiSites_EvolutionFromPreviousWeek";case"month":return"MultiSites_EvolutionFromPreviousMonth";case"year":return"MultiSites_EvolutionFromPreviousYear";default:return"MultiSites_EvolutionFromPreviousPeriod"}},evolutionTrendClass:function(){return 1===this.kpi.evolutionTrend?"kpiTrendPositive":-1===this.kpi.evolutionTrend?"kpiTrendNegative":"kpiTrendNeutral"},evolutionTrendIcon:function(){return 1===this.kpi.evolutionTrend?"icon-chevron-up":-1===this.kpi.evolutionTrend?"icon-chevron-down":"icon-circle"},kpi:function(){return this.modelValue}}});G.render=R;var F=G,I=Object(o["defineComponent"])({components:{MatomoLoader:p["MatomoLoader"],KPICard:F},props:{isLoading:Boolean,modelValue:{type:Array,required:!0}},computed:{hasKpiBadge:function(){return this.kpis.some((function(e){return!!e.badge}))},kpis:function(){return this.modelValue}}});I.render=w;var z=I,U={class:"sitesTableContainer"},H={class:"card-table dataTable sitesTable"},q={class:"sitesTableEvolutionSelector"},K=["value"],W={value:"hits_evolution"},$={value:"visits_evolution"},J={value:"pageviews_evolution"},Y={key:0,value:"revenue_evolution"},Q={key:0},X={class:"sitesTableLoading",colspan:"7"},Z={key:1},ee={colspan:"7"},te={class:"notification system notification-error"},re=Object(o["createElementVNode"])("br",null,null,-1),ne=Object(o["createElementVNode"])("br",null,null,-1),ae=["href"],oe=Object(o["createTextVNode"])(" – "),ie=["href"],se=["href"],le=Object(o["createTextVNode"])(". "),ce={key:0,class:"sitesTablePagination"},ue={class:"dataTablePages"};function de(e,t,r,n,a,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("SitesTableSite");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",U,[Object(o["createElementVNode"])("table",H,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",{onClick:t[0]||(t[0]=function(t){return e.sortBy("label")}),class:"label"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},["nb_visits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(o["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},["nb_pageviews"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)]),Object(o["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.sortBy("hits")})},["hits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1)]),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,onClick:t[4]||(t[4]=function(t){return e.sortBy("revenue")})},["revenue"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.sortBy(e.evolutionSelector)})},[e.sortColumn===e.evolutionSelector?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("MultiSites_Evolution")),1)]),Object(o["createElementVNode"])("th",q,[Object(o["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[6]||(t[6]=function(t){return e.changeEvolutionSelector(t.target.value)})},[Object(o["createElementVNode"])("option",W,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(o["createElementVNode"])("option",$,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",J,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",Y,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,K)])])]),Object(o["createElementVNode"])("tbody",null,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Q,[Object(o["createElementVNode"])("td",X,[Object(o["createVNode"])(s)])])):e.errorLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Z,[Object(o["createElementVNode"])("td",ee,[Object(o["createElementVNode"])("div",te,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),re,ne,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(o["toDisplayString"])(e.translate("General_Faq")),9,ae),oe,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,ie),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null," – ",512),[[o["vShow"],e.errorShowProfessionalHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(o["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,se),[[o["vShow"],e.errorShowProfessionalHelp]]),le])])])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:2},Object(o["renderList"])(e.sites,(function(t){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-".concat(t.idsite),"model-value":t,"display-sparkline":e.displaySparklines,"sparkline-metric":e.sparklineMetric},null,8,["display-revenue","evolution-metric","model-value","display-sparkline","sparkline-metric"])})),128))])])]),!e.isLoading||e.paginationUpperBound>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ce,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.navigatePreviousPage()})}," « "+Object(o["toDisplayString"])(e.translate("General_Previous")),513),[[o["vShow"],0!==e.paginationCurrentPage]]),Object(o["createElementVNode"])("span",ue,Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTableNext",onClick:t[8]||(t[8]=function(t){return e.navigateNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[o["vShow"],e.paginationCurrentPage0&&void 0!==arguments[0]&&arguments[0];this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelAutoRefresh()),this.fetchAbort=new AbortController,this.privateState.errorLoading=!1,this.privateState.isLoadingKPIs=!t,this.privateState.isLoadingSites=!0;var r={method:"MultiSites.getAllWithGroups",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,format_metrics:0,showColumns:["hits_evolution","hits_evolution_trend","label","hits","nb_pageviews","nb_visits","pageviews_evolution","pageviews_evolution_trend","revenue","revenue_evolution","revenue_evolution_trend","visits_evolution","visits_evolution_trend"].join(",")};return this.searchTerm&&(r.pattern=this.searchTerm),p["AjaxHelper"].fetch(r,{abortController:this.fetchAbort}).then((function(r){t||e.updateDashboardKPIs(r),e.updateDashboardSites(r)})).catch((function(){e.privateState.dashboardSites=[],e.privateState.errorLoading=!0})).finally((function(){e.privateState.isLoadingKPIs=!1,e.privateState.isLoadingSites=!1,e.fetchAbort=null,e.startAutoRefresh()}))}},{key:"startAutoRefresh",value:function(){var e=this;if(this.cancelAutoRefresh(),!(this.autoRefreshInterval<=0)){var t;try{t=p["Periods"].parse(p["Matomo"].period,p["Matomo"].currentDateString)}catch(r){}t&&t.containsToday()&&(this.autoRefreshTimeout=setTimeout((function(){e.autoRefreshTimeout=null,e.refreshData()}),1e3*this.autoRefreshInterval))}}},{key:"updateDashboardKPIs",value:function(e){this.privateState.dashboardKPIs={evolutionPeriod:p["Matomo"].period,hits:p["NumberFormatter"].formatNumber(e.totals.hits),hitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.hits,e.totals.previous_hits,!0),hitsTrend:Math.sign(e.totals.hits-e.totals.previous_hits),pageviews:p["NumberFormatter"].formatNumber(e.totals.nb_pageviews),pageviewsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_pageviews,e.totals.previous_nb_pageviews,!0),pageviewsTrend:Math.sign(e.totals.nb_pageviews-e.totals.previous_nb_pageviews),revenue:p["NumberFormatter"].formatCurrency(e.totals.revenue,""),revenueEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.revenue,e.totals.previous_revenue,!0),revenueTrend:Math.sign(e.totals.revenue-e.totals.previous_revenue),visits:p["NumberFormatter"].formatNumber(e.totals.nb_visits),visitsEvolution:p["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_visits,e.totals.previous_nb_visits,!0),visitsTrend:Math.sign(e.totals.nb_visits-e.totals.previous_nb_visits)}}},{key:"updateDashboardSites",value:function(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites}}]),e}(),k=new S,y={class:"kpiCardContainer"},_={key:0,class:"kpiCard kpiCardLoading"},N=Object(o["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),C={class:"kpiCardValue"},E=Object(o["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),V={key:0,class:"kpiCardBadge"};function w(e,t,r,n,a,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("KPICard");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",y,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",_,[N,Object(o["createElementVNode"])("div",C,[Object(o["createVNode"])(s)]),E,e.hasKpiBadge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",V," ")):Object(o["createCommentVNode"])("",!0)])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:1},Object(o["renderList"])(e.kpis,(function(t,r){return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:"kpi-card-".concat(r)},[r>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64)})),128))])}var T={class:"kpiCard"},B={class:"kpiCardTitle"},P={class:"kpiCardValue"},M={class:"kpiCardEvolution"},D={key:1,class:"kpiCardEvolution"},x=Object(o["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),L=[x],A=["innerHTML"];function R(e,t,r,n,a,i){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",T,[Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardIcon ".concat(e.kpi.icon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(o["createElementVNode"])("div",P,Object(o["toDisplayString"])(e.kpi.value),1),Object(o["createElementVNode"])("div",M,[""!==e.kpi.evolutionValue?(Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],{key:0},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionTrend ".concat(e.evolutionTrendClass))},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("kpiCardEvolutionIcon ".concat(e.evolutionTrendIcon))},null,2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.kpi.evolutionValue),1)],2),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",D,L))]),e.kpi.badge?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.kpi.badge),class:"kpiCardBadge"},null,8,A)):Object(o["createCommentVNode"])("",!0)])}var G=Object(o["defineComponent"])({props:{modelValue:{type:Object,required:!0}},computed:{evolutionTrendFrom:function(){switch(this.kpi.evolutionPeriod){case"day":return"MultiSites_EvolutionFromPreviousDay";case"week":return"MultiSites_EvolutionFromPreviousWeek";case"month":return"MultiSites_EvolutionFromPreviousMonth";case"year":return"MultiSites_EvolutionFromPreviousYear";default:return"MultiSites_EvolutionFromPreviousPeriod"}},evolutionTrendClass:function(){return 1===this.kpi.evolutionTrend?"kpiTrendPositive":-1===this.kpi.evolutionTrend?"kpiTrendNegative":"kpiTrendNeutral"},evolutionTrendIcon:function(){return 1===this.kpi.evolutionTrend?"icon-chevron-up":-1===this.kpi.evolutionTrend?"icon-chevron-down":"icon-circle"},kpi:function(){return this.modelValue}}});G.render=R;var F=G,I=Object(o["defineComponent"])({components:{MatomoLoader:p["MatomoLoader"],KPICard:F},props:{isLoading:Boolean,modelValue:{type:Array,required:!0}},computed:{hasKpiBadge:function(){return this.kpis.some((function(e){return!!e.badge}))},kpis:function(){return this.modelValue}}});I.render=w;var z=I,U={class:"sitesTableContainer"},H={class:"card-table dataTable sitesTable"},q={class:"sitesTableEvolutionSelector"},K=["value"],W={value:"hits_evolution"},$={value:"visits_evolution"},J={value:"pageviews_evolution"},Y={key:0,value:"revenue_evolution"},Q={key:0},X={class:"sitesTableLoading",colspan:"7"},Z={key:1},ee={colspan:"7"},te={class:"notification system notification-error"},re=Object(o["createElementVNode"])("br",null,null,-1),ne=Object(o["createElementVNode"])("br",null,null,-1),ae=["href"],oe=Object(o["createTextVNode"])(" – "),ie=["href"],se=["href"],le=Object(o["createTextVNode"])(". "),ce={key:0,class:"sitesTablePagination"},ue={class:"dataTablePages"};function de(e,t,r,n,a,i){var s=Object(o["resolveComponent"])("MatomoLoader"),l=Object(o["resolveComponent"])("SitesTableSite");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",U,[Object(o["createElementVNode"])("table",H,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",{onClick:t[0]||(t[0]=function(t){return e.sortBy("label")}),class:"label"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.sortBy("nb_visits")})},["nb_visits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(o["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.sortBy("nb_pageviews")})},["nb_pageviews"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1)]),Object(o["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.sortBy("hits")})},["hits"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1)]),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,onClick:t[4]||(t[4]=function(t){return e.sortBy("revenue")})},["revenue"===e.sortColumn?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.sortBy(e.evolutionSelector)})},[e.sortColumn===e.evolutionSelector?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:Object(o["normalizeClass"])(e.sortColumnClass)},null,2)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("MultiSites_Evolution")),1)]),Object(o["createElementVNode"])("th",q,[Object(o["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[6]||(t[6]=function(t){return e.changeEvolutionSelector(t.target.value)})},[Object(o["createElementVNode"])("option",W,Object(o["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(o["createElementVNode"])("option",$,Object(o["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(o["createElementVNode"])("option",J,Object(o["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.displayRevenue?(Object(o["openBlock"])(),Object(o["createElementBlock"])("option",Y,Object(o["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(o["createCommentVNode"])("",!0)],40,K)])])]),Object(o["createElementVNode"])("tbody",null,[e.isLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Q,[Object(o["createElementVNode"])("td",X,[Object(o["createVNode"])(s)])])):e.errorLoading?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Z,[Object(o["createElementVNode"])("td",ee,[Object(o["createElementVNode"])("div",te,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),re,ne,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_NeedMoreHelp"))+" ",1),Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(o["toDisplayString"])(e.translate("General_Faq")),9,ae),oe,Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(o["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,ie),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",null," – ",512),[[o["vShow"],e.errorShowProfessionalHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(o["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,se),[[o["vShow"],e.errorShowProfessionalHelp]]),le])])])):(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],{key:2},Object(o["renderList"])(e.sites,(function(t){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-".concat(t.idsite),"model-value":t,"display-sparkline":e.displaySparklines,"sparkline-metric":e.sparklineMetric},null,8,["display-revenue","evolution-metric","model-value","display-sparkline","sparkline-metric"])})),128))])])]),!e.isLoading||e.paginationUpperBound>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ce,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[7]||(t[7]=function(t){return e.navigatePreviousPage()})}," « "+Object(o["toDisplayString"])(e.translate("General_Previous")),513),[[o["vShow"],0!==e.paginationCurrentPage]]),Object(o["createElementVNode"])("span",ue,Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"dataTableNext",onClick:t[8]||(t[8]=function(t){return e.navigateNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[o["vShow"],e.paginationCurrentPage -