diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-04-06 17:43:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 17:43:42 +0300 |
commit | 6ab9923d6324c3d98765881e525d7ecf8ba9d831 (patch) | |
tree | 7304f857cb6b11ee31dc447e62b7e5458a4284a6 /plugins | |
parent | 698c83bb1e411b18c6ea7c4d1df8668f9f432855 (diff) |
[Vue] migrate location-provider-selection directive to vue component (#19026)
* migrate location-provider-selection directive to vue component
* test manually
* fix UI tests
* fix paragraph markup
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins')
40 files changed, 1118 insertions, 510 deletions
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index f96639c60f..9714c1ce19 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -142,6 +142,7 @@ __webpack_require__.d(__webpack_exports__, "cloneThenApply", function() { return __webpack_require__.d(__webpack_exports__, "activityIndicatorAdapter", function() { return /* reexport */ ActivityIndicator_adapter; }); __webpack_require__.d(__webpack_exports__, "ActivityIndicator", function() { return /* reexport */ ActivityIndicator; }); __webpack_require__.d(__webpack_exports__, "translate", function() { return /* reexport */ translate; }); +__webpack_require__.d(__webpack_exports__, "translateOrDefault", function() { return /* reexport */ translateOrDefault; }); __webpack_require__.d(__webpack_exports__, "Alert", function() { return /* reexport */ Alert; }); __webpack_require__.d(__webpack_exports__, "AjaxHelper", function() { return /* reexport */ AjaxHelper_AjaxHelper; }); __webpack_require__.d(__webpack_exports__, "setCookie", function() { return /* reexport */ setCookie; }); @@ -424,6 +425,10 @@ var Matomo = Matomo_piwik; * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ function translate(translationStringId) { + if (!translationStringId) { + return ''; + } + for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { values[_key - 1] = arguments[_key]; } @@ -436,6 +441,23 @@ function translate(translationStringId) { return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line } +function translateOrDefault(translationStringIdOrText) { + if (!translationStringIdOrText || !window.piwik_translations[translationStringIdOrText]) { + return translationStringIdOrText; + } + + for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + values[_key2 - 1] = arguments[_key2]; + } + + var pkArgs = values; // handle variadic args AND single array of values (to match _pk_translate signature) + + if (values.length === 1 && values[0] && Array.isArray(values[0])) { + pkArgs = values[0]; + } + + return window._pk_translate(translationStringIdOrText, pkArgs); // eslint-disable-line +} // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/utilities.ts /*! * Matomo - free/libre analytics platform @@ -2269,6 +2291,7 @@ function createVueApp() { var app = external_commonjs_vue_commonjs2_vue_root_Vue_["createApp"].apply(void 0, arguments); app.config.globalProperties.$sanitize = window.vueSanitize; app.config.globalProperties.translate = translate; + app.config.globalProperties.translateOrDefault = translateOrDefault; return app; } // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/createAngularJsAdapter.ts @@ -4439,45 +4462,45 @@ var Comparisons_store_ComparisonsStore = /*#__PURE__*/function () { // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.store.instance.ts /* harmony default export */ var Comparisons_store_instance = (new Comparisons_store_ComparisonsStore()); -// 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/Comparisons/Comparisons.vue?vue&type=template&id=a22a9668 +// 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/Comparisons/Comparisons.vue?vue&type=template&id=d1a096d8 -var Comparisonsvue_type_template_id_a22a9668_hoisted_1 = { +var Comparisonsvue_type_template_id_d1a096d8_hoisted_1 = { key: 0, ref: "root", class: "matomo-comparisons" }; -var Comparisonsvue_type_template_id_a22a9668_hoisted_2 = { +var Comparisonsvue_type_template_id_d1a096d8_hoisted_2 = { class: "comparison-type" }; -var Comparisonsvue_type_template_id_a22a9668_hoisted_3 = ["title"]; -var Comparisonsvue_type_template_id_a22a9668_hoisted_4 = ["href"]; -var Comparisonsvue_type_template_id_a22a9668_hoisted_5 = ["title"]; -var Comparisonsvue_type_template_id_a22a9668_hoisted_6 = { +var Comparisonsvue_type_template_id_d1a096d8_hoisted_3 = ["title"]; +var Comparisonsvue_type_template_id_d1a096d8_hoisted_4 = ["href"]; +var Comparisonsvue_type_template_id_d1a096d8_hoisted_5 = ["title"]; +var Comparisonsvue_type_template_id_d1a096d8_hoisted_6 = { class: "comparison-period-label" }; -var Comparisonsvue_type_template_id_a22a9668_hoisted_7 = ["onClick"]; -var Comparisonsvue_type_template_id_a22a9668_hoisted_8 = ["title"]; -var Comparisonsvue_type_template_id_a22a9668_hoisted_9 = { +var Comparisonsvue_type_template_id_d1a096d8_hoisted_7 = ["onClick"]; +var Comparisonsvue_type_template_id_d1a096d8_hoisted_8 = ["title"]; +var Comparisonsvue_type_template_id_d1a096d8_hoisted_9 = { class: "loadingPiwik", style: { "display": "none" } }; -var Comparisonsvue_type_template_id_a22a9668_hoisted_10 = ["alt"]; -function Comparisonsvue_type_template_id_a22a9668_render(_ctx, _cache, $props, $setup, $data, $options) { +var Comparisonsvue_type_template_id_d1a096d8_hoisted_10 = ["alt"]; +function Comparisonsvue_type_template_id_d1a096d8_render(_ctx, _cache, $props, $setup, $data, $options) { var _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - return _ctx.isComparing ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Comparisonsvue_type_template_id_a22a9668_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Comparisons')), 1), (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.segmentComparisons, function (comparison, $index) { + return _ctx.isComparing ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", Comparisonsvue_type_template_id_d1a096d8_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Comparisons')), 1), (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.segmentComparisons, function (comparison, $index) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { class: "comparison card", key: comparison.index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_a22a9668_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Segment')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_d1a096d8_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Segment')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "title", title: comparison.title + '<br/>' + decodeURIComponent(comparison.params.segment) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { target: "_blank", href: _ctx.getUrlToSegment(comparison.params.segment) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(comparison.title), 9, Comparisonsvue_type_template_id_a22a9668_hoisted_4)], 8, Comparisonsvue_type_template_id_a22a9668_hoisted_3), (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.periodComparisons, function (periodComparison) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(comparison.title), 9, Comparisonsvue_type_template_id_d1a096d8_hoisted_4)], 8, Comparisonsvue_type_template_id_d1a096d8_hoisted_3), (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.periodComparisons, function (periodComparison) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { class: "comparison-period", key: periodComparison.index, @@ -4487,7 +4510,7 @@ function Comparisonsvue_type_template_id_a22a9668_render(_ctx, _cache, $props, $ style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({ 'background-color': _ctx.getSeriesColor(comparison, periodComparison) }) - }, null, 4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Comparisonsvue_type_template_id_a22a9668_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(periodComparison.title) + " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getComparisonPeriodType(periodComparison)) + ") ", 1)], 8, Comparisonsvue_type_template_id_a22a9668_hoisted_5); + }, null, 4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", Comparisonsvue_type_template_id_d1a096d8_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(periodComparison.title) + " (" + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getComparisonPeriodType(periodComparison)) + ") ", 1)], 8, Comparisonsvue_type_template_id_d1a096d8_hoisted_5); }), 128)), _ctx.segmentComparisons.length > 1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { key: 0, class: "remove-button", @@ -4497,17 +4520,17 @@ function Comparisonsvue_type_template_id_a22a9668_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-close", title: _ctx.translate('General_ClickToRemoveComp') - }, null, 8, Comparisonsvue_type_template_id_a22a9668_hoisted_8)], 8, Comparisonsvue_type_template_id_a22a9668_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_a22a9668_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + }, null, 8, Comparisonsvue_type_template_id_d1a096d8_hoisted_8)], 8, Comparisonsvue_type_template_id_d1a096d8_hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); + }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", Comparisonsvue_type_template_id_d1a096d8_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif", alt: _ctx.translate('General_LoadingData') - }, null, 8, Comparisonsvue_type_template_id_a22a9668_hoisted_10), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512)), [[_directive_tooltips, { + }, null, 8, Comparisonsvue_type_template_id_d1a096d8_hoisted_10), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])], 512)), [[_directive_tooltips, { duration: 200, delay: 200, content: _ctx.transformTooltipContent }]]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=template&id=a22a9668 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.vue?vue&type=template&id=d1a096d8 // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Tooltips/Tooltips.ts /*! @@ -4712,7 +4735,7 @@ function setupTooltips(el, binding) { -Comparisonsvue_type_script_lang_ts.render = Comparisonsvue_type_template_id_a22a9668_render +Comparisonsvue_type_script_lang_ts.render = Comparisonsvue_type_template_id_d1a096d8_render /* harmony default export */ var Comparisons = (Comparisonsvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Comparisons/Comparisons.adapter.ts @@ -5705,44 +5728,44 @@ PeriodDatePickervue_type_script_lang_ts.render = PeriodDatePickervue_type_templa directiveName: 'piwikPeriodDatePicker', restrict: 'E' })); -// 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/SiteSelector/SiteSelector.vue?vue&type=template&id=e9b88206 +// 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/SiteSelector/SiteSelector.vue?vue&type=template&id=48e19035 -var SiteSelectorvue_type_template_id_e9b88206_hoisted_1 = ["value", "name"]; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_2 = ["title"]; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_3 = ["textContent"]; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_4 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_1 = ["value", "name"]; +var SiteSelectorvue_type_template_id_48e19035_hoisted_2 = ["title"]; +var SiteSelectorvue_type_template_id_48e19035_hoisted_3 = ["textContent"]; +var SiteSelectorvue_type_template_id_48e19035_hoisted_4 = { key: 1, class: "placeholder" }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_5 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_5 = { class: "dropdown" }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_6 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_6 = { class: "custom_select_search" }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_7 = ["placeholder"]; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_8 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_7 = ["placeholder"]; +var SiteSelectorvue_type_template_id_48e19035_hoisted_8 = { key: 0 }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_9 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_9 = { class: "custom_select_container" }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_10 = ["onClick"]; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_11 = ["innerHTML", "href", "title"]; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_12 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_10 = ["onClick"]; +var SiteSelectorvue_type_template_id_48e19035_hoisted_11 = ["innerHTML", "href", "title"]; +var SiteSelectorvue_type_template_id_48e19035_hoisted_12 = { class: "ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect" }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_13 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_13 = { class: "ui-menu-item" }; -var SiteSelectorvue_type_template_id_e9b88206_hoisted_14 = { +var SiteSelectorvue_type_template_id_48e19035_hoisted_14 = { class: "ui-corner-all", tabindex: "-1" }; var _hoisted_15 = { key: 1 }; -function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, $setup, $data, $options) { +function SiteSelectorvue_type_template_id_48e19035_render(_ctx, _cache, $props, $setup, $data, $options) { var _ctx$modelValue, _ctx$modelValue2, _ctx$modelValue3, _ctx$modelValue4; var _component_AllSitesLink = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("AllSitesLink"); @@ -5761,7 +5784,7 @@ function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, type: "hidden", value: (_ctx$modelValue = _ctx.modelValue) === null || _ctx$modelValue === void 0 ? void 0 : _ctx$modelValue.id, name: _ctx.name - }, null, 8, SiteSelectorvue_type_template_id_e9b88206_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { ref: "selectorLink", onClick: _cache[0] || (_cache[0] = function () { return _ctx.onClickSelector && _ctx.onClickSelector.apply(_ctx, arguments); @@ -5783,7 +5806,7 @@ function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, }, null, 2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [(_ctx$modelValue2 = _ctx.modelValue) !== null && _ctx$modelValue2 !== void 0 && _ctx$modelValue2.name || !_ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { key: 0, textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(((_ctx$modelValue3 = _ctx.modelValue) === null || _ctx$modelValue3 === void 0 ? void 0 : _ctx$modelValue3.name) || _ctx.firstSiteName) - }, null, 8, SiteSelectorvue_type_template_id_e9b88206_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$modelValue4 = _ctx.modelValue) !== null && _ctx$modelValue4 !== void 0 && _ctx$modelValue4.name) && _ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SiteSelectorvue_type_template_id_e9b88206_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 42, SiteSelectorvue_type_template_id_e9b88206_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_e9b88206_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_e9b88206_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_3)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !((_ctx$modelValue4 = _ctx.modelValue) !== null && _ctx$modelValue4 !== void 0 && _ctx$modelValue4.name) && _ctx.placeholder ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", SiteSelectorvue_type_template_id_48e19035_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.placeholder), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 42, SiteSelectorvue_type_template_id_48e19035_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_48e19035_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_48e19035_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", onClick: _cache[2] || (_cache[2] = function ($event) { _ctx.searchTerm = ''; @@ -5796,7 +5819,7 @@ function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, tabindex: "4", class: "websiteSearch inp browser-default", placeholder: _ctx.translate('General_Search') - }, null, 8, SiteSelectorvue_type_template_id_e9b88206_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.shouldFocusOnSearch]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { + }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_7), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.shouldFocusOnSearch]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { title: "Clear", onClick: _cache[4] || (_cache[4] = function ($event) { _ctx.searchTerm = ''; @@ -5805,13 +5828,13 @@ function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, }), class: "reset", src: "plugins/CoreHome/images/reset_search.png" - }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.autocompleteMinSites <= _ctx.sites.length || _ctx.searchTerm]]), _ctx.allSitesLocation === 'top' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_e9b88206_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { + }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.autocompleteMinSites <= _ctx.sites.length || _ctx.searchTerm]]), _ctx.allSitesLocation === 'top' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", SiteSelectorvue_type_template_id_48e19035_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { href: _ctx.urlAllSites, "all-sites-text": _ctx.allSitesText, onClick: _cache[5] || (_cache[5] = function ($event) { return _ctx.onAllSitesClick($event); }) - }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_e9b88206_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { + }, null, 8, ["href", "all-sites-text"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SiteSelectorvue_type_template_id_48e19035_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", { class: "custom_select_ul_list", onClick: _cache[7] || (_cache[7] = function ($event) { return _ctx.showSitesList = false; @@ -5832,8 +5855,8 @@ function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, tabindex: "4", href: _ctx.getUrlForSiteId(site.idsite), title: site.name - }, null, 8, SiteSelectorvue_type_template_id_e9b88206_hoisted_11)], 8, SiteSelectorvue_type_template_id_e9b88206_hoisted_10)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(!_ctx.showSelectedSite && _ctx.activeSiteId === site.idsite)]]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", SiteSelectorvue_type_template_id_e9b88206_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", SiteSelectorvue_type_template_id_e9b88206_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", SiteSelectorvue_type_template_id_e9b88206_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_NotFound') + ' ' + _ctx.searchTerm), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.sites.length && _ctx.searchTerm]])]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { + }, null, 8, SiteSelectorvue_type_template_id_48e19035_hoisted_11)], 8, SiteSelectorvue_type_template_id_48e19035_hoisted_10)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(!_ctx.showSelectedSite && _ctx.activeSiteId === site.idsite)]]); + }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", SiteSelectorvue_type_template_id_48e19035_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", SiteSelectorvue_type_template_id_48e19035_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", SiteSelectorvue_type_template_id_48e19035_hoisted_14, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_NotFound') + ' ' + _ctx.searchTerm), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.sites.length && _ctx.searchTerm]])]), _ctx.allSitesLocation === 'bottom' && _ctx.showAllSitesItem ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_AllSitesLink, { href: _ctx.urlAllSites, "all-sites-text": _ctx.allSitesText, onClick: _cache[8] || (_cache[8] = function ($event) { @@ -5843,7 +5866,7 @@ function SiteSelectorvue_type_template_id_e9b88206_render(_ctx, _cache, $props, blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=e9b88206 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue?vue&type=template&id=48e19035 // 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/SiteSelector/AllSitesLink.vue?vue&type=template&id=45607d28 @@ -6320,7 +6343,7 @@ function debounce(fn) { -SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_e9b88206_render +SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_48e19035_render /* harmony default export */ var SiteSelector = (SiteSelectorvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SiteSelector.adapter.ts @@ -6472,36 +6495,36 @@ function siteSelectorModelAdapter() { } window.angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter); -// 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/QuickAccess/QuickAccess.vue?vue&type=template&id=fab656e6 +// 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/QuickAccess/QuickAccess.vue?vue&type=template&id=7b45bbd5 -var QuickAccessvue_type_template_id_fab656e6_hoisted_1 = { +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_1 = { ref: "root", class: "quickAccessInside" }; -var QuickAccessvue_type_template_id_fab656e6_hoisted_2 = ["title", "placeholder"]; -var QuickAccessvue_type_template_id_fab656e6_hoisted_3 = { +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_2 = ["title", "placeholder"]; +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_3 = { class: "dropdown" }; -var QuickAccessvue_type_template_id_fab656e6_hoisted_4 = { +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_4 = { class: "no-result" }; -var QuickAccessvue_type_template_id_fab656e6_hoisted_5 = ["onClick"]; -var QuickAccessvue_type_template_id_fab656e6_hoisted_6 = ["onMouseenter", "onClick"]; -var QuickAccessvue_type_template_id_fab656e6_hoisted_7 = { +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_5 = ["onClick"]; +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_6 = ["onMouseenter", "onClick"]; +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_7 = { class: "quickAccessMatomoSearch" }; -var QuickAccessvue_type_template_id_fab656e6_hoisted_8 = ["onMouseenter", "onClick"]; -var QuickAccessvue_type_template_id_fab656e6_hoisted_9 = ["textContent"]; -var QuickAccessvue_type_template_id_fab656e6_hoisted_10 = { +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_8 = ["onMouseenter", "onClick"]; +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_9 = ["textContent"]; +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_10 = { class: "quick-access-category helpCategory" }; -var QuickAccessvue_type_template_id_fab656e6_hoisted_11 = ["href"]; -function QuickAccessvue_type_template_id_fab656e6_render(_ctx, _cache, $props, $setup, $data, $options) { +var QuickAccessvue_type_template_id_7b45bbd5_hoisted_11 = ["href"]; +function QuickAccessvue_type_template_id_7b45bbd5_render(_ctx, _cache, $props, $setup, $data, $options) { var _directive_focus_if = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-if"); var _directive_focus_anywhere_but_here = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-anywhere-but-here"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", QuickAccessvue_type_template_id_fab656e6_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", QuickAccessvue_type_template_id_7b45bbd5_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-search", onMouseenter: _cache[0] || (_cache[0] = function ($event) { return _ctx.searchActive = true; @@ -6522,7 +6545,7 @@ function QuickAccessvue_type_template_id_fab656e6_render(_ctx, _cache, $props, $ title: _ctx.quickAccessTitle, placeholder: _ctx.translate('General_Search'), ref: "input" - }, null, 40, QuickAccessvue_type_template_id_fab656e6_hoisted_2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.searchActive]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", QuickAccessvue_type_template_id_fab656e6_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_fab656e6_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_SearchNoResults')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.numMenuItems > 0 || _ctx.sites.length)]]), (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.menuItems, function (subcategory) { + }, null, 40, QuickAccessvue_type_template_id_7b45bbd5_hoisted_2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelText"], _ctx.searchTerm], [_directive_focus_if, {}, _ctx.searchActive]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", QuickAccessvue_type_template_id_7b45bbd5_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_7b45bbd5_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_SearchNoResults')), 1)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !(_ctx.numMenuItems > 0 || _ctx.sites.length)]]), (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.menuItems, function (subcategory) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { key: subcategory.title }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { @@ -6532,7 +6555,7 @@ function QuickAccessvue_type_template_id_fab656e6_render(_ctx, _cache, $props, $ _ctx.searchMenu(_ctx.searchTerm); } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.title), 9, QuickAccessvue_type_template_id_fab656e6_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"])(subcategory.items, function (submenuEntry) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcategory.title), 9, QuickAccessvue_type_template_id_7b45bbd5_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"])(subcategory.items, function (submenuEntry) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["result", { selected: submenuEntry.menuIndex === _ctx.searchIndex @@ -6544,9 +6567,9 @@ function QuickAccessvue_type_template_id_fab656e6_render(_ctx, _cache, $props, $ return _ctx.selectMenuItem(submenuEntry.index); }, key: submenuEntry.index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(submenuEntry.name.trim()), 1)], 42, QuickAccessvue_type_template_id_fab656e6_hoisted_6); + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(submenuEntry.name.trim()), 1)], 42, QuickAccessvue_type_template_id_7b45bbd5_hoisted_6); }), 128))]); - }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", QuickAccessvue_type_template_id_fab656e6_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { + }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", QuickAccessvue_type_template_id_7b45bbd5_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: "quick-access-category websiteCategory" }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_Sites')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && _ctx.sites.length || _ctx.isLoading]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: "no-result" @@ -6564,8 +6587,8 @@ function QuickAccessvue_type_template_id_fab656e6_render(_ctx, _cache, $props, $ key: site.idsite }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { textContent: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(site.name) - }, null, 8, QuickAccessvue_type_template_id_fab656e6_hoisted_9)], 42, QuickAccessvue_type_template_id_fab656e6_hoisted_8)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && !_ctx.isLoading]]); - }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_fab656e6_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_HelpResources')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { + }, null, 8, QuickAccessvue_type_template_id_7b45bbd5_hoisted_9)], 42, QuickAccessvue_type_template_id_7b45bbd5_hoisted_8)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSitesSelector && !_ctx.isLoading]]); + }), 128))]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", QuickAccessvue_type_template_id_7b45bbd5_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_HelpResources')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ selected: _ctx.searchIndex === 'help' }, "quick-access-help"]), @@ -6575,11 +6598,11 @@ function QuickAccessvue_type_template_id_fab656e6_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "https://matomo.org?mtm_campaign=App_Help&mtm_source=Matomo_App&mtm_keyword=QuickSearch&s=".concat(encodeURIComponent(_ctx.searchTerm)), target: "_blank" - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_SearchOnMatomo', _ctx.searchTerm)), 9, QuickAccessvue_type_template_id_fab656e6_hoisted_11)], 34)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm && _ctx.searchActive]])], 512)), [[_directive_focus_anywhere_but_here, { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_SearchOnMatomo', _ctx.searchTerm)), 9, QuickAccessvue_type_template_id_7b45bbd5_hoisted_11)], 34)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.searchTerm && _ctx.searchActive]])], 512)), [[_directive_focus_anywhere_but_here, { blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=fab656e6 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=7b45bbd5 // 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/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=script&lang=ts @@ -6977,7 +7000,7 @@ function scrollFirstElementIntoView(element) { -QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_fab656e6_render +QuickAccessvue_type_script_lang_ts.render = QuickAccessvue_type_template_id_7b45bbd5_render /* harmony default export */ var QuickAccess = (QuickAccessvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.adapter.ts @@ -7458,53 +7481,53 @@ MultiPairFieldvue_type_script_lang_ts.render = MultiPairFieldvue_type_template_i } } })); -// 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/PeriodSelector/PeriodSelector.vue?vue&type=template&id=042ce166 +// 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/PeriodSelector/PeriodSelector.vue?vue&type=template&id=0115e905 -var PeriodSelectorvue_type_template_id_042ce166_hoisted_1 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_1 = { ref: "root", class: "periodSelector piwikSelector" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_2 = ["title"]; +var PeriodSelectorvue_type_template_id_0115e905_hoisted_2 = ["title"]; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon icon-calendar" }, null, -1); -var PeriodSelectorvue_type_template_id_042ce166_hoisted_4 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_4 = { id: "periodMore", class: "dropdown" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_5 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_5 = { class: "flex" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_6 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_6 = { key: 0, class: "period-date" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_7 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_7 = { class: "period-type" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_8 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_8 = { id: "otherPeriods" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_9 = ["onDblclick", "title"]; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_10 = ["id", "checked", "onChange", "onDblclick"]; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_11 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_9 = ["onDblclick", "title"]; +var PeriodSelectorvue_type_template_id_0115e905_hoisted_10 = ["id", "checked", "onChange", "onDblclick"]; +var PeriodSelectorvue_type_template_id_0115e905_hoisted_11 = { key: 0, class: "compare-checkbox" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_12 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_12 = { id: "comparePeriodToDropdown" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_13 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_13 = { key: 1, class: "compare-date-range" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_14 = { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_14 = { id: "comparePeriodStartDate" }; -var PeriodSelectorvue_type_template_id_042ce166_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var PeriodSelectorvue_type_template_id_0115e905_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "compare-dates-separator" }, null, -1); @@ -7522,7 +7545,7 @@ var _hoisted_19 = { var _hoisted_20 = { class: "loadingSegment" }; -function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props, $setup, $data, $options) { +function PeriodSelectorvue_type_template_id_0115e905_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_DateRangePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("DateRangePicker"); var _component_PeriodDatePicker = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PeriodDatePicker"); @@ -7533,13 +7556,13 @@ function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props var _directive_expand_on_click = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("expand-on-click"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { ref: "title", id: "date", class: "title", tabindex: "-1", title: _ctx.translate('General_ChooseDate', _ctx.currentlyViewingText) - }, [PeriodSelectorvue_type_template_id_042ce166_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.currentlyViewingText), 1)], 8, PeriodSelectorvue_type_template_id_042ce166_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DateRangePicker, { + }, [PeriodSelectorvue_type_template_id_0115e905_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.currentlyViewingText), 1)], 8, PeriodSelectorvue_type_template_id_0115e905_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_DateRangePicker, { class: "period-range", "start-date": _ctx.startRangeDate, "end-date": _ctx.endRangeDate, @@ -7549,14 +7572,14 @@ function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props onSubmit: _cache[1] || (_cache[1] = function ($event) { return _ctx.onApplyClicked(); }) - }, null, 8, ["start-date", "end-date"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.selectedPeriod === 'range']]), _ctx.selectedPeriod !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodDatePicker, { + }, null, 8, ["start-date", "end-date"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.selectedPeriod === 'range']]), _ctx.selectedPeriod !== 'range' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PeriodDatePicker, { id: "datepicker", period: _ctx.selectedPeriod, date: _ctx.periodValue === _ctx.selectedPeriod ? _ctx.dateValue : null, onSelect: _cache[2] || (_cache[2] = function ($event) { return _ctx.setPiwikPeriodAndDate(_ctx.selectedPeriod, $event.date); }) - }, null, 8, ["period", "date"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Period')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_8, [(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.periodsFiltered, function (period) { + }, null, 8, ["period", "date"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h6", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Period')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_8, [(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.periodsFiltered, function (period) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", { key: period }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", { @@ -7581,14 +7604,14 @@ function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props onDblclick: function onDblclick($event) { return _ctx.changeViewedPeriod(period); } - }, null, 40, PeriodSelectorvue_type_template_id_042ce166_hoisted_10), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelRadio"], _ctx.selectedPeriod]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getPeriodDisplayText(period)), 1)], 42, PeriodSelectorvue_type_template_id_042ce166_hoisted_9)]); - }), 128))])])]), _ctx.isComparisonEnabled ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 40, PeriodSelectorvue_type_template_id_0115e905_hoisted_10), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelRadio"], _ctx.selectedPeriod]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getPeriodDisplayText(period)), 1)], 42, PeriodSelectorvue_type_template_id_0115e905_hoisted_9)]); + }), 128))])])]), _ctx.isComparisonEnabled ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { id: "comparePeriodTo", type: "checkbox", "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) { return _ctx.isComparing = $event; }) - }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelCheckbox"], _ctx.isComparing]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CompareTo')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelCheckbox"], _ctx.isComparing]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CompareTo')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.comparePeriodType, "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) { return _ctx.comparePeriodType = $event; @@ -7601,7 +7624,7 @@ function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props options: _ctx.comparePeriodDropdownOptions, "full-width": true, disabled: !_ctx.isComparing - }, null, 8, ["modelValue", "style", "options", "disabled"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.isComparing && _ctx.comparePeriodType === 'custom' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_042ce166_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "style", "options", "disabled"])])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.isComparing && _ctx.comparePeriodType === 'custom' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PeriodSelectorvue_type_template_id_0115e905_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.compareStartDate, "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) { return _ctx.compareStartDate = $event; @@ -7611,7 +7634,7 @@ function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props "full-width": true, title: _ctx.translate('CoreHome_StartDate'), placeholder: 'YYYY-MM-DD' - }, null, 8, ["modelValue", "title"])])]), PeriodSelectorvue_type_template_id_042ce166_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue", "title"])])]), PeriodSelectorvue_type_template_id_0115e905_hoisted_15, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.compareEndDate, "onUpdate:modelValue": _cache[7] || (_cache[7] = function ($event) { return _ctx.compareEndDate = $event; @@ -7636,23 +7659,23 @@ function PeriodSelectorvue_type_template_id_042ce166_render(_ctx, _cache, $props expander: 'title' }]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=template&id=042ce166 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=template&id=0115e905 -// 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/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=6af4d064 +// 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/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=7c5fe406 -var ActivityIndicatorvue_type_template_id_6af4d064_hoisted_1 = { +var ActivityIndicatorvue_type_template_id_7c5fe406_hoisted_1 = { class: "loadingPiwik" }; -var ActivityIndicatorvue_type_template_id_6af4d064_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var ActivityIndicatorvue_type_template_id_7c5fe406_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif", alt: "" }, null, -1); -function ActivityIndicatorvue_type_template_id_6af4d064_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ActivityIndicatorvue_type_template_id_6af4d064_hoisted_1, [ActivityIndicatorvue_type_template_id_6af4d064_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.loadingMessage), 1)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loading]]); +function ActivityIndicatorvue_type_template_id_7c5fe406_render(_ctx, _cache, $props, $setup, $data, $options) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ActivityIndicatorvue_type_template_id_7c5fe406_hoisted_1, [ActivityIndicatorvue_type_template_id_7c5fe406_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.loadingMessage), 1)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loading]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=6af4d064 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=7c5fe406 // 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/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=script&lang=ts @@ -7677,7 +7700,7 @@ function ActivityIndicatorvue_type_template_id_6af4d064_render(_ctx, _cache, $pr -ActivityIndicatorvue_type_script_lang_ts.render = ActivityIndicatorvue_type_template_id_6af4d064_render +ActivityIndicatorvue_type_script_lang_ts.render = ActivityIndicatorvue_type_template_id_7c5fe406_render /* harmony default export */ var ActivityIndicator = (ActivityIndicatorvue_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/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue?vue&type=script&lang=ts @@ -8041,7 +8064,7 @@ function isValidDate(d) { -PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_id_042ce166_render +PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_id_0115e905_render /* harmony default export */ var PeriodSelector = (PeriodSelectorvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.adapter.ts @@ -8062,55 +8085,55 @@ PeriodSelectorvue_type_script_lang_ts.render = PeriodSelectorvue_type_template_i }, directiveName: 'piwikPeriodSelector' })); -// 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=a3508790 +// 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=112d4a20 -var ReportingMenuvue_type_template_id_a3508790_hoisted_1 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_1 = { class: "reportingMenu" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_2 = ["aria-label"]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_3 = ["onClick"]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_4 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_2 = ["aria-label"]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_3 = ["onClick"]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_4 = { class: "hidden" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_5 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_5 = { role: "menu" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_6 = ["href", "onClick", "title"]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_7 = ["href", "onClick"]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_8 = ["onClick"]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_6 = ["href", "onClick", "title"]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_7 = ["href", "onClick"]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_8 = ["onClick"]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_9 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-help" }, null, -1); -var ReportingMenuvue_type_template_id_a3508790_hoisted_10 = [ReportingMenuvue_type_template_id_a3508790_hoisted_9]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_11 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_10 = [ReportingMenuvue_type_template_id_112d4a20_hoisted_9]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_11 = { id: "mobile-left-menu", class: "sidenav hide-on-large-only" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_12 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_12 = { class: "collapsible collapsible-accordion" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_13 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_13 = { class: "collapsible-header" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_14 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_14 = { class: "collapsible-body" }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_15 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_15 = { key: 0 }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_16 = ["onClick", "href"]; -var ReportingMenuvue_type_template_id_a3508790_hoisted_17 = { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_16 = ["onClick", "href"]; +var ReportingMenuvue_type_template_id_112d4a20_hoisted_17 = { key: 1 }; -var ReportingMenuvue_type_template_id_a3508790_hoisted_18 = ["onClick", "href"]; -function ReportingMenuvue_type_template_id_a3508790_render(_ctx, _cache, $props, $setup, $data, $options) { +var ReportingMenuvue_type_template_id_112d4a20_hoisted_18 = ["onClick", "href"]; +function ReportingMenuvue_type_template_id_112d4a20_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_MenuDropdown = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("MenuDropdown"); 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_a3508790_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_112d4a20_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') @@ -8130,7 +8153,7 @@ function ReportingMenuvue_type_template_id_a3508790_render(_ctx, _cache, $props, }, ["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-arrow-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_a3508790_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_a3508790_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_a3508790_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) { + }, 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_112d4a20_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_Menu')), 1)], 8, ReportingMenuvue_type_template_id_112d4a20_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_112d4a20_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"])({ @@ -8155,7 +8178,7 @@ function ReportingMenuvue_type_template_id_a3508790_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_a3508790_hoisted_6); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 11, ReportingMenuvue_type_template_id_112d4a20_hoisted_6); }), 128))]; }), _: 2 @@ -8166,7 +8189,7 @@ function ReportingMenuvue_type_template_id_a3508790_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_a3508790_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_112d4a20_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 @@ -8176,37 +8199,37 @@ function ReportingMenuvue_type_template_id_a3508790_render(_ctx, _cache, $props, onClick: function onClick($event) { return _ctx.showHelp(category, subcategory, $event); } - }, ReportingMenuvue_type_template_id_a3508790_hoisted_10, 10, ReportingMenuvue_type_template_id_a3508790_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); + }, ReportingMenuvue_type_template_id_112d4a20_hoisted_10, 10, ReportingMenuvue_type_template_id_112d4a20_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2); }), 128))])], 2); - }), 128))], 8, ReportingMenuvue_type_template_id_a3508790_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_a3508790_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_112d4a20_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", ReportingMenuvue_type_template_id_112d4a20_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_a3508790_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_a3508790_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_112d4a20_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_112d4a20_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-arrow-bottom') - }, 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_a3508790_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_112d4a20_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"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", ReportingMenuvue_type_template_id_a3508790_hoisted_15, [(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"])(subcategory.subcategories, function (subcat) { + }, [subcategory.isGroup ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", ReportingMenuvue_type_template_id_112d4a20_hoisted_15, [(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"])(subcategory.subcategories, function (subcat) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { onClick: function onClick($event) { return _ctx.loadSubcategory(category, subcat); }, 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_a3508790_hoisted_16); - }), 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"])("span", ReportingMenuvue_type_template_id_a3508790_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(subcat.name), 9, ReportingMenuvue_type_template_id_112d4a20_hoisted_16); + }), 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"])("span", ReportingMenuvue_type_template_id_112d4a20_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { 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_a3508790_hoisted_18)])) : 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_112d4a20_hoisted_18)])) : 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=a3508790 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue?vue&type=template&id=112d4a20 // 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/Notification/Notification.vue?vue&type=template&id=52166f8a @@ -9436,7 +9459,7 @@ var REPORTING_HELP_NOTIFICATION_ID = 'reportingmenu-help'; -ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_a3508790_render +ReportingMenuvue_type_script_lang_ts.render = ReportingMenuvue_type_template_id_112d4a20_render /* harmony default export */ var ReportingMenu = (ReportingMenuvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.adapter.ts @@ -9633,33 +9656,33 @@ window.angular.module('piwikApp.service').factory('reportMetadataModel', functio } }; }); -// 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/WidgetLoader/WidgetLoader.vue?vue&type=template&id=4261d57b +// 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/WidgetLoader/WidgetLoader.vue?vue&type=template&id=5b8231c3 -var WidgetLoadervue_type_template_id_4261d57b_hoisted_1 = { +var WidgetLoadervue_type_template_id_5b8231c3_hoisted_1 = { key: 0 }; -var WidgetLoadervue_type_template_id_4261d57b_hoisted_2 = { +var WidgetLoadervue_type_template_id_5b8231c3_hoisted_2 = { class: "notification system notification-error" }; -var WidgetLoadervue_type_template_id_4261d57b_hoisted_3 = { +var WidgetLoadervue_type_template_id_5b8231c3_hoisted_3 = { key: 0, rel: "noreferrer noopener", target: "_blank", href: "https://matomo.org/faq/troubleshooting/faq_19489/" }; -var WidgetLoadervue_type_template_id_4261d57b_hoisted_4 = { +var WidgetLoadervue_type_template_id_5b8231c3_hoisted_4 = { class: "theWidgetContent", ref: "widgetContent" }; -function WidgetLoadervue_type_template_id_4261d57b_render(_ctx, _cache, $props, $setup, $data, $options) { +function WidgetLoadervue_type_template_id_5b8231c3_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { "loading-message": _ctx.loadingMessage, loading: _ctx.loading - }, null, 8, ["loading-message", "loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_ctx.widgetName ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", WidgetLoadervue_type_template_id_4261d57b_hoisted_1, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.widgetName), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_4261d57b_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _ctx.hasErrorFaqLink ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", WidgetLoadervue_type_template_id_4261d57b_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequestFaqLink')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loadingFailed]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_4261d57b_hoisted_4, null, 512)]); + }, null, 8, ["loading-message", "loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_ctx.widgetName ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", WidgetLoadervue_type_template_id_5b8231c3_hoisted_1, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.widgetName), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_5b8231c3_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequest', '', '')) + " ", 1), _ctx.hasErrorFaqLink ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", WidgetLoadervue_type_template_id_5b8231c3_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ErrorRequestFaqLink')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.loadingFailed]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", WidgetLoadervue_type_template_id_5b8231c3_hoisted_4, null, 512)]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=template&id=4261d57b +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=template&id=5b8231c3 // 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/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue?vue&type=script&lang=ts @@ -9873,7 +9896,7 @@ function WidgetLoadervue_type_template_id_4261d57b_render(_ctx, _cache, $props, -WidgetLoadervue_type_script_lang_ts.render = WidgetLoadervue_type_template_id_4261d57b_render +WidgetLoadervue_type_script_lang_ts.render = WidgetLoadervue_type_template_id_5b8231c3_render /* harmony default export */ var WidgetLoader = (WidgetLoadervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.adapter.ts @@ -10376,25 +10399,25 @@ Widgetvue_type_script_lang_ts.render = Widgetvue_type_template_id_23f53472_rende }, directiveName: 'piwikWidget' })); -// 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/ReportingPage/ReportingPage.vue?vue&type=template&id=607224ec +// 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/ReportingPage/ReportingPage.vue?vue&type=template&id=28b6d8b8 -var ReportingPagevue_type_template_id_607224ec_hoisted_1 = { +var ReportingPagevue_type_template_id_28b6d8b8_hoisted_1 = { class: "reporting-page" }; -var ReportingPagevue_type_template_id_607224ec_hoisted_2 = { +var ReportingPagevue_type_template_id_28b6d8b8_hoisted_2 = { key: 1, class: "col s12 l6 leftWidgetColumn" }; -var ReportingPagevue_type_template_id_607224ec_hoisted_3 = { +var ReportingPagevue_type_template_id_28b6d8b8_hoisted_3 = { key: 2, class: "col s12 l6 rightWidgetColumn" }; -function ReportingPagevue_type_template_id_607224ec_render(_ctx, _cache, $props, $setup, $data, $options) { +function ReportingPagevue_type_template_id_28b6d8b8_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); var _component_Widget = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Widget"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_607224ec_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_28b6d8b8_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { loading: _ctx.loading }, null, 8, ["loading"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_NoSuchPage')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasNoPage]]), (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.widgets, function (widget) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { @@ -10404,12 +10427,12 @@ function ReportingPagevue_type_template_id_607224ec_render(_ctx, _cache, $props, key: 0, class: "col s12 fullWidgetColumn", widget: widget - }, null, 8, ["widget"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_607224ec_hoisted_2, [(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"])(widget.left, function (widgetInGroup) { + }, null, 8, ["widget"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_28b6d8b8_hoisted_2, [(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"])(widget.left, function (widgetInGroup) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { widget: widgetInGroup, key: widgetInGroup.uniqueId }, null, 8, ["widget"]); - }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_607224ec_hoisted_3, [(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"])(widget.right, function (widgetInGroup) { + }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), widget.group ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportingPagevue_type_template_id_28b6d8b8_hoisted_3, [(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"])(widget.right, function (widgetInGroup) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_Widget, { widget: widgetInGroup, key: widgetInGroup.uniqueId @@ -10417,7 +10440,7 @@ function ReportingPagevue_type_template_id_607224ec_render(_ctx, _cache, $props, }), 128))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); }), 128))]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=template&id=607224ec +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue?vue&type=template&id=28b6d8b8 // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.store.ts function ReportingPage_store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -10830,7 +10853,7 @@ function hideOnlyRawDataNoticifation() { -ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_607224ec_render +ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_28b6d8b8_render /* harmony default export */ var ReportingPage = (ReportingPagevue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportingPage/ReportingPage.adapter.ts @@ -10846,66 +10869,66 @@ ReportingPagevue_type_script_lang_ts.render = ReportingPagevue_type_template_id_ component: ReportingPage, directiveName: 'piwikReportingPage' })); -// 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/ReportExport/ReportExportPopover.vue?vue&type=template&id=9b90d7c0 +// 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/ReportExport/ReportExportPopover.vue?vue&type=template&id=3d203950 -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_1 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_1 = { class: "report-export-popover row", id: "reportExport" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_2 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_2 = { class: "col l6" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_3 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_3 = { name: "format" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_4 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_4 = { name: "option_flat" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_5 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_5 = { name: "option_expanded" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_6 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_6 = { name: "option_format_metrics" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_7 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_7 = { class: "col l6" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_8 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_8 = { name: "filter_type" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_9 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_9 = { class: "filter_limit" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_10 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_10 = { name: "filter_limit_all" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_11 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_11 = { key: 0, name: "filter_limit" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_12 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_12 = { key: 1, name: "filter_limit" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_13 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_13 = { class: "col l12" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_14 = ["value"]; +var ReportExportPopovervue_type_template_id_3d203950_hoisted_14 = ["value"]; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("\n "); +var ReportExportPopovervue_type_template_id_3d203950_hoisted_15 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])("\n "); -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_16 = [ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_15]; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_17 = ["innerHTML"]; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_18 = { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_16 = [ReportExportPopovervue_type_template_id_3d203950_hoisted_15]; +var ReportExportPopovervue_type_template_id_3d203950_hoisted_17 = ["innerHTML"]; +var ReportExportPopovervue_type_template_id_3d203950_hoisted_18 = { class: "col l12" }; -var ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_19 = ["href", "title"]; -function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $props, $setup, $data, $options) { +var ReportExportPopovervue_type_template_id_3d203950_hoisted_19 = ["href", "title"]; +function ReportExportPopovervue_type_template_id_3d203950_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _directive_select_on_focus = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("select-on-focus"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'radio', name: 'format', title: _ctx.translate('CoreHome_ExportFormat'), @@ -10915,7 +10938,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ }), "full-width": true, options: _ctx.availableReportFormats[_ctx.reportType] - }, null, 8, ["title", "modelValue", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue", "options"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'checkbox', name: 'option_flat', title: _ctx.translate('CoreHome_FlattenReport'), @@ -10923,7 +10946,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { return _ctx.optionFlat = $event; }) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'checkbox', name: 'option_expanded', title: _ctx.translate('CoreHome_ExpandSubtables'), @@ -10931,7 +10954,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) { return _ctx.optionExpanded = $event; }) - }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables && !_ctx.optionFlat]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasSubtables && !_ctx.optionFlat]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'checkbox', name: 'option_format_metrics', title: _ctx.translate('CoreHome_FormatMetrics'), @@ -10939,7 +10962,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) { return _ctx.optionFormatMetrics = $event; }) - }, null, 8, ["title", "modelValue"])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue"])])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'radio', name: 'filter_type', title: _ctx.translate('CoreHome_ReportType'), @@ -10949,7 +10972,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ }), "full-width": true, options: _ctx.availableReportTypes - }, null, 8, ["title", "modelValue", "options"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue", "options"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'radio', name: 'filter_limit_all', title: _ctx.translate('CoreHome_RowLimit'), @@ -10959,7 +10982,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ }), "full-width": true, options: _ctx.limitAllOptions - }, null, 8, ["title", "modelValue", "options"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.maxFilterLimit || _ctx.maxFilterLimit <= 0]]), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit <= 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["title", "modelValue", "options"])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.maxFilterLimit || _ctx.maxFilterLimit <= 0]]), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit <= 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'number', name: "filter_limit", min: 1, @@ -10968,7 +10991,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ return _ctx.reportLimit = $event; }), "full-width": true - }, null, 8, ["modelValue"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["modelValue"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.reportLimitAll === 'no' && _ctx.maxFilterLimit > 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: 'number', name: 'filter_limit', min: 1, @@ -10980,19 +11003,19 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ value: _ctx.reportLimit, "full-width": true, title: _ctx.filterLimitTooltip - }, null, 8, ["max", "modelValue", "value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", { + }, null, 8, ["max", "modelValue", "value", "title"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("textarea", { readonly: "", class: "exportFullUrl", value: _ctx.exportLinkWithoutToken - }, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_16, 8, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_14), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, ReportExportPopovervue_type_template_id_3d203950_hoisted_16, 8, ReportExportPopovervue_type_template_id_3d203950_hoisted_14), [[_directive_select_on_focus, {}]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "tooltip", innerHTML: _ctx.$sanitize(_ctx.translate('CoreHome_ExportTooltipWithLink', '<a target=_blank href=\'?module=UsersManager&action=userSecurity\'>', '</a>', 'ENTER_YOUR_TOKEN_AUTH_HERE')) - }, null, 8, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_17)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ReportExportPopovervue_type_template_id_3d203950_hoisted_17)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ReportExportPopovervue_type_template_id_3d203950_hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "btn", href: _ctx.exportLink, target: "_new", title: _ctx.translate('CoreHome_ExportTooltip') - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Export')), 9, ReportExportPopovervue_type_template_id_9b90d7c0_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Export')), 9, ReportExportPopovervue_type_template_id_3d203950_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "javascript:", onClick: _cache[8] || (_cache[8] = function ($event) { return _ctx.showUrl = !_ctx.showUrl; @@ -11000,7 +11023,7 @@ function ReportExportPopovervue_type_template_id_9b90d7c0_render(_ctx, _cache, $ class: "toggle-export-url" }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_ShowExportUrl')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.showUrl]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('CoreHome_HideExportUrl')), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showUrl]])])])]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=template&id=9b90d7c0 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=template&id=3d203950 // 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/CoreHome/vue/src/ReportExport/ReportExportPopover.vue?vue&type=script&lang=ts function ReportExportPopovervue_type_script_lang_ts_slicedToArray(arr, i) { return ReportExportPopovervue_type_script_lang_ts_arrayWithHoles(arr) || ReportExportPopovervue_type_script_lang_ts_iterableToArrayLimit(arr, i) || ReportExportPopovervue_type_script_lang_ts_unsupportedIterableToArray(arr, i) || ReportExportPopovervue_type_script_lang_ts_nonIterableRest(); } @@ -11298,7 +11321,7 @@ var ReportExportPopovervue_type_script_lang_ts_Field = useExternalPluginComponen -ReportExportPopovervue_type_script_lang_ts.render = ReportExportPopovervue_type_template_id_9b90d7c0_render +ReportExportPopovervue_type_script_lang_ts.render = ReportExportPopovervue_type_template_id_3d203950_render /* harmony default export */ var ReportExportPopover = (ReportExportPopovervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ReportExport/ReportExport.ts @@ -11715,13 +11738,13 @@ function piwikContentTable() { }; } window.angular.module('piwikApp').directive('piwikContentTable', piwikContentTable); -// 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/AjaxForm/AjaxForm.vue?vue&type=template&id=102798b2 +// 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/AjaxForm/AjaxForm.vue?vue&type=template&id=00d5220c -var AjaxFormvue_type_template_id_102798b2_hoisted_1 = { +var AjaxFormvue_type_template_id_00d5220c_hoisted_1 = { ref: "root" }; -function AjaxFormvue_type_template_id_102798b2_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"])("div", AjaxFormvue_type_template_id_102798b2_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", { +function AjaxFormvue_type_template_id_00d5220c_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"])("div", AjaxFormvue_type_template_id_00d5220c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default", { formData: _ctx.formData, submitApiMethod: _ctx.submitApiMethod, sendJsonPayload: _ctx.sendJsonPayload, @@ -11733,7 +11756,7 @@ function AjaxFormvue_type_template_id_102798b2_render(_ctx, _cache, $props, $set errorPostResponse: _ctx.errorPostResponse })], 512); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=template&id=102798b2 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=template&id=00d5220c // 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/CoreHome/vue/src/AjaxForm/AjaxForm.vue?vue&type=script&lang=ts @@ -11832,7 +11855,7 @@ var AjaxFormvue_type_script_lang_ts_window = window, -AjaxFormvue_type_script_lang_ts.render = AjaxFormvue_type_template_id_102798b2_render +AjaxFormvue_type_script_lang_ts.render = AjaxFormvue_type_template_id_00d5220c_render /* harmony default export */ var AjaxForm = (AjaxFormvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/AjaxForm/AjaxForm.adapter.ts diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index c708da4c4a..e6436e2409 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -4,7 +4,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createVueApp",(function(){return ut})),n.d(t,"useExternalPluginComponent",(function(){return _n})),n.d(t,"DirectiveUtilities",(function(){return _t})),n.d(t,"debounce",(function(){return Ji})),n.d(t,"getFormattedEvolution",(function(){return Cu})),n.d(t,"createAngularJsAdapter",(function(){return jt})),n.d(t,"transformAngularJsBoolAttr",(function(){return kt})),n.d(t,"transformAngularJsIntAttr",(function(){return St})),n.d(t,"removeAngularJsSpecificProperties",(function(){return Ot})),n.d(t,"clone",(function(){return Ct})),n.d(t,"cloneThenApply",(function(){return Et})),n.d(t,"activityIndicatorAdapter",(function(){return Eu})),n.d(t,"ActivityIndicator",(function(){return ho})),n.d(t,"translate",(function(){return C})),n.d(t,"Alert",(function(){return st})),n.d(t,"AjaxHelper",(function(){return Xe})),n.d(t,"setCookie",(function(){return Du})),n.d(t,"getCookie",(function(){return Pu})),n.d(t,"deleteCookie",(function(){return Vu})),n.d(t,"MatomoUrl",(function(){return Ce})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return G})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return ce})),n.d(t,"Range",(function(){return _})),n.d(t,"format",(function(){return E})),n.d(t,"getToday",(function(){return D})),n.d(t,"parseDate",(function(){return P})),n.d(t,"todayIsInRange",(function(){return V})),n.d(t,"DropdownMenu",(function(){return Dt})),n.d(t,"FocusAnywhereButHere",(function(){return xt})),n.d(t,"FocusIf",(function(){return Lt})),n.d(t,"Tooltips",(function(){return Lr})),n.d(t,"MatomoDialog",(function(){return Sn})),n.d(t,"ExpandOnClick",(function(){return Yt})),n.d(t,"ExpandOnHover",(function(){return nn})),n.d(t,"ShowSensitiveData",(function(){return ln})),n.d(t,"DropdownButton",(function(){return dn})),n.d(t,"SelectOnFocus",(function(){return gn})),n.d(t,"SideNav",(function(){return yn})),n.d(t,"EnrichedHeadline",(function(){return Un})),n.d(t,"ContentBlock",(function(){return er})),n.d(t,"Comparisons",(function(){return Rr})),n.d(t,"MenuDropdown",(function(){return ei})),n.d(t,"DatePicker",(function(){return li})),n.d(t,"DateRangePicker",(function(){return mi})),n.d(t,"PeriodDatePicker",(function(){return bi})),n.d(t,"Notification",(function(){return al})),n.d(t,"NotificationGroup",(function(){return yl})),n.d(t,"NotificationsStore",(function(){return fl})),n.d(t,"SitesStore",(function(){return qi})),n.d(t,"SiteSelector",(function(){return zi})),n.d(t,"QuickAccess",(function(){return da})),n.d(t,"FieldArray",(function(){return Ca})),n.d(t,"MultiPairField",(function(){return Ha})),n.d(t,"PeriodSelector",(function(){return Vo})),n.d(t,"ReportingMenu",(function(){return Xl})),n.d(t,"ReportingMenuStore",(function(){return $l})),n.d(t,"ReportingPagesStore",(function(){return Cl})),n.d(t,"ReportMetadataStore",(function(){return lc})),n.d(t,"WidgetsStore",(function(){return Yl})),n.d(t,"WidgetLoader",(function(){return fc})),n.d(t,"WidgetContainer",(function(){return Pc})),n.d(t,"WidgetByDimensionContainer",(function(){return qc})),n.d(t,"Widget",(function(){return Kc})),n.d(t,"ReportingPage",(function(){return ys})),n.d(t,"ReportExport",(function(){return Ks})),n.d(t,"Sparkline",(function(){return nu})),n.d(t,"Progressbar",(function(){return su})),n.d(t,"ContentIntro",(function(){return uu})),n.d(t,"ContentTable",(function(){return pu})),n.d(t,"AjaxForm",(function(){return yu})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createVueApp",(function(){return dt})),n.d(t,"useExternalPluginComponent",(function(){return $n})),n.d(t,"DirectiveUtilities",(function(){return $t})),n.d(t,"debounce",(function(){return Gi})),n.d(t,"getFormattedEvolution",(function(){return Eu})),n.d(t,"createAngularJsAdapter",(function(){return kt})),n.d(t,"transformAngularJsBoolAttr",(function(){return St})),n.d(t,"transformAngularJsIntAttr",(function(){return Ct})),n.d(t,"removeAngularJsSpecificProperties",(function(){return jt})),n.d(t,"clone",(function(){return Et})),n.d(t,"cloneThenApply",(function(){return Dt})),n.d(t,"activityIndicatorAdapter",(function(){return Du})),n.d(t,"ActivityIndicator",(function(){return go})),n.d(t,"translate",(function(){return C})),n.d(t,"translateOrDefault",(function(){return E})),n.d(t,"Alert",(function(){return ut})),n.d(t,"AjaxHelper",(function(){return Ze})),n.d(t,"setCookie",(function(){return Pu})),n.d(t,"getCookie",(function(){return Vu})),n.d(t,"deleteCookie",(function(){return Nu})),n.d(t,"MatomoUrl",(function(){return Ee})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return z})),n.d(t,"Week",(function(){return Z})),n.d(t,"Month",(function(){return ie})),n.d(t,"Year",(function(){return se})),n.d(t,"Range",(function(){return H})),n.d(t,"format",(function(){return D})),n.d(t,"getToday",(function(){return P})),n.d(t,"parseDate",(function(){return V})),n.d(t,"todayIsInRange",(function(){return N})),n.d(t,"DropdownMenu",(function(){return Pt})),n.d(t,"FocusAnywhereButHere",(function(){return Bt})),n.d(t,"FocusIf",(function(){return Ft})),n.d(t,"Tooltips",(function(){return Fr})),n.d(t,"MatomoDialog",(function(){return Cn})),n.d(t,"ExpandOnClick",(function(){return Qt})),n.d(t,"ExpandOnHover",(function(){return rn})),n.d(t,"ShowSensitiveData",(function(){return cn})),n.d(t,"DropdownButton",(function(){return pn})),n.d(t,"SelectOnFocus",(function(){return vn})),n.d(t,"SideNav",(function(){return wn})),n.d(t,"EnrichedHeadline",(function(){return qn})),n.d(t,"ContentBlock",(function(){return tr})),n.d(t,"Comparisons",(function(){return _r})),n.d(t,"MenuDropdown",(function(){return ti})),n.d(t,"DatePicker",(function(){return ci})),n.d(t,"DateRangePicker",(function(){return fi})),n.d(t,"PeriodDatePicker",(function(){return yi})),n.d(t,"Notification",(function(){return ol})),n.d(t,"NotificationGroup",(function(){return wl})),n.d(t,"NotificationsStore",(function(){return hl})),n.d(t,"SitesStore",(function(){return Wi})),n.d(t,"SiteSelector",(function(){return Yi})),n.d(t,"QuickAccess",(function(){return pa})),n.d(t,"FieldArray",(function(){return Ea})),n.d(t,"MultiPairField",(function(){return Ua})),n.d(t,"PeriodSelector",(function(){return No})),n.d(t,"ReportingMenu",(function(){return Zl})),n.d(t,"ReportingMenuStore",(function(){return Hl})),n.d(t,"ReportingPagesStore",(function(){return El})),n.d(t,"ReportMetadataStore",(function(){return cc})),n.d(t,"WidgetsStore",(function(){return Ql})),n.d(t,"WidgetLoader",(function(){return hc})),n.d(t,"WidgetContainer",(function(){return Vc})),n.d(t,"WidgetByDimensionContainer",(function(){return Wc})),n.d(t,"Widget",(function(){return Xc})),n.d(t,"ReportingPage",(function(){return ws})),n.d(t,"ReportExport",(function(){return Xs})),n.d(t,"Sparkline",(function(){return ru})),n.d(t,"Progressbar",(function(){return uu})),n.d(t,"ContentIntro",(function(){return du})),n.d(t,"ContentTable",(function(){return mu})),n.d(t,"AjaxForm",(function(){return wu})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * @@ -23,481 +23,481 @@ * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return 1===n.length&&n[0]&&Array.isArray(n[0])&&(i=n[0]),window._pk_translate(e,i)} +function C(e){if(!e)return"";for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return 1===n.length&&n[0]&&Array.isArray(n[0])&&(i=n[0]),window._pk_translate(e,i)}function E(e){if(!e||!window.piwik_translations[e])return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n;return 1===n.length&&n[0]&&Array.isArray(n[0])&&(i=n[0]),window._pk_translate(e,i)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function E(e){return $.datepicker.formatDate("yy-mm-dd",e)}function D(){var e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function P(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return D();if("yesterday"===t||"yesterdaySameTime"===t){var n=D();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=D();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=D();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var a=D();return a.setFullYear(a.getFullYear()-1),a}return $.datepicker.parseDate("yy-mm-dd",t)}function V(e){return 2===e.length&&(D()>=e[0]&&D()<=e[1])}function N(e,t){return B(e)||x(e,t)||A(e,t)||T()}function T(){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 A(e,t){if(e){if("string"===typeof e)return I(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)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function B(e){if(Array.isArray(e))return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function D(e){return $.datepicker.formatDate("yy-mm-dd",e)}function P(){var e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function V(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return P();if("yesterday"===t||"yesterdaySameTime"===t){var n=P();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=P();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=P();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var a=P();return a.setFullYear(a.getFullYear()-1),a}return $.datepicker.parseDate("yy-mm-dd",t)}function N(e){return 2===e.length&&(P()>=e[0]&&P()<=e[1])}function T(e,t){return M(e)||B(e,t)||I(e,t)||A()}function A(){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 I(e,t){if(e){if("string"===typeof e)return x(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)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function M(e){if(Array.isArray(e))return e}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var _=function(){function e(t,n,r){M(this,e),R(this,"startDate",void 0),R(this,"endDate",void 0),R(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return F(e,[{key:"getPrettyString",value:function(){var e=E(this.startDate),t=E(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return V(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var a=r?P(r):D(),o=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-i);else if("week"===t)o.setDate(o.getDate()-7*i);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-i)}if("day"!==t){var l=p.periods[t].parse(o),c=p.periods[t].parse(a),s=l.getDateRange(),u=N(s,1);o=u[0];var d=c.getDateRange(),m=N(d,2);a=m[1]}var f=new Date(1991,7,6);if(o.getTime()-f.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=f;break}return new e(o,a,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?P(n):D(),a=new Date(i.getTime()),o=new Date(i.getTime());if("day"===t)a.setDate(a.getDate()-r),o.setDate(o.getDate()-r);else if("week"===t)a.setDate(a.getDate()-7*r),o.setDate(o.getDate()-7*r);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-r),o.setDate(1),o.setMonth(o.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-r),o.setFullYear(o.getFullYear()-r)}if("day"!==t){var l=p.periods[t].parse(a),c=p.periods[t].parse(o),s=l.getDateRange(),u=N(s,1);a=u[0];var d=c.getDateRange(),m=N(d,2);o=m[1]}var f=new Date(1991,7,6);if(a.getTime()-f.getTime()<0)switch(t){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=f;break}return new e(a,o,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(P(i[0]),P(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function H(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:P,format:E,RangePeriod:_,todayIsInRange:V}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var H=function(){function e(t,n,r){L(this,e),_(this,"startDate",void 0),_(this,"endDate",void 0),_(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return R(e,[{key:"getPrettyString",value:function(){var e=D(this.startDate),t=D(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return N(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var a=r?V(r):P(),o=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-i);else if("week"===t)o.setDate(o.getDate()-7*i);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-i)}if("day"!==t){var l=p.periods[t].parse(o),c=p.periods[t].parse(a),s=l.getDateRange(),u=T(s,1);o=u[0];var d=c.getDateRange(),m=T(d,2);a=m[1]}var f=new Date(1991,7,6);if(o.getTime()-f.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=f;break}return new e(o,a,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?V(n):P(),a=new Date(i.getTime()),o=new Date(i.getTime());if("day"===t)a.setDate(a.getDate()-r),o.setDate(o.getDate()-r);else if("week"===t)a.setDate(a.getDate()-7*r),o.setDate(o.getDate()-7*r);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-r),o.setDate(1),o.setMonth(o.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-r),o.setFullYear(o.getFullYear()-r)}if("day"!==t){var l=p.periods[t].parse(a),c=p.periods[t].parse(o),s=l.getDateRange(),u=T(s,1);a=u[0];var d=c.getDateRange(),m=T(d,2);o=m[1]}var f=new Date(1991,7,6);if(a.getTime()-f.getTime()<0)switch(t){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=f;break}return new e(a,o,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(V(i[0]),V(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function U(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:V,format:D,RangePeriod:H,todayIsInRange:N}}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),e}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("range",_), + */p.addCustomPeriod("range",H), /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("piwikApp.service").factory("piwikPeriods",H);var G=function(){function e(t){U(this,e),J(this,"dateInPeriod",void 0),this.dateInPeriod=t}return W(e,[{key:"getPrettyString",value:function(){return E(this.dateInPeriod)}},{key:"getDateRange",value:function(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(P(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodDay")}}]),e}();function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("piwikApp.service").factory("piwikPeriods",U);var z=function(){function e(t){q(this,e),G(this,"dateInPeriod",void 0),this.dateInPeriod=t}return J(e,[{key:"getPrettyString",value:function(){return D(this.dateInPeriod)}},{key:"getDateRange",value:function(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}},{key:"containsToday",value:function(){return N(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(V(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodDay")}}]),e}();function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function K(e,t,n){return t&&Q(e.prototype,t),n&&Q(e,n),e}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("day",G);var X=function(){function e(t){z(this,e),K(this,"dateInPeriod",void 0),this.dateInPeriod=t}return Q(e,[{key:"getPrettyString",value:function(){var e=this.getDateRange(),t=E(e[0]),n=E(e[1]);return C("General_DateRangeFromTo",[t,n])}},{key:"getDateRange",value:function(){var e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);var n=new Date(t.getTime());return n.setDate(t.getDate()+6),[t,n]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(P(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodWeek")}}]),e}();function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */p.addCustomPeriod("day",z);var Z=function(){function e(t){Y(this,e),X(this,"dateInPeriod",void 0),this.dateInPeriod=t}return K(e,[{key:"getPrettyString",value:function(){var e=this.getDateRange(),t=D(e[0]),n=D(e[1]);return C("General_DateRangeFromTo",[t,n])}},{key:"getDateRange",value:function(){var e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);var n=new Date(t.getTime());return n.setDate(t.getDate()+6),[t,n]}},{key:"containsToday",value:function(){return N(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(V(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodWeek")}}]),e}();function ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ne(e,t,n){return t&&te(e.prototype,t),n&&te(e,n),e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("week",X);var re=function(){function e(t){Z(this,e),ne(this,"dateInPeriod",void 0),this.dateInPeriod=t}return te(e,[{key:"getPrettyString",value:function(){var e=C("Intl_Month_Long_StandAlone_".concat(this.dateInPeriod.getMonth()+1));return"".concat(e," ").concat(this.dateInPeriod.getFullYear())}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(P(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t,n){return t&&ae(e.prototype,t),n&&ae(e,n),e}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */p.addCustomPeriod("week",Z);var ie=function(){function e(t){ee(this,e),re(this,"dateInPeriod",void 0),this.dateInPeriod=t}return ne(e,[{key:"getPrettyString",value:function(){var e=C("Intl_Month_Long_StandAlone_".concat(this.dateInPeriod.getMonth()+1));return"".concat(e," ").concat(this.dateInPeriod.getFullYear())}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return N(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(V(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t,n){return t&&oe(e.prototype,t),n&&oe(e,n),e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("month",re);var ce=function(){function e(t){ie(this,e),le(this,"dateInPeriod",void 0),this.dateInPeriod=t}return oe(e,[{key:"getPrettyString",value:function(){return this.dateInPeriod.getFullYear().toString()}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(P(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodYear")}}]),e}(); + */p.addCustomPeriod("month",ie);var se=function(){function e(t){ae(this,e),ce(this,"dateInPeriod",void 0),this.dateInPeriod=t}return le(e,[{key:"getPrettyString",value:function(){return this.dateInPeriod.getFullYear().toString()}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return N(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(V(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodYear")}}]),e}(); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function se(e,t){return fe(e)||me(e,t)||de(e,t)||ue()}function ue(){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 de(e,t){if(e){if("string"===typeof e)return pe(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)?pe(e,t):void 0}}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function me(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function fe(e){if(Array.isArray(e))return e}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){return t&&ge(e.prototype,t),n&&ge(e,n),e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +function ue(e,t){return he(e)||fe(e,t)||pe(e,t)||de()}function de(){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 pe(e,t){if(e){if("string"===typeof e)return me(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)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fe(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function be(e,t,n){return t&&ve(e.prototype,t),n&&ve(e,n),e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("year",ce);var ye=window,we=ye.piwik,Oe=ye.broadcast;function je(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var ke=function(){function e(){var t=this;he(this,e),be(this,"urlQuery",Object(a["ref"])("")),be(this,"hashQuery",Object(a["ref"])("")),be(this,"urlParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.urlQuery.value))}))),be(this,"hashParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.hashQuery.value))}))),be(this,"parsed",Object(a["computed"])((function(){return Object(a["readonly"])(Object.assign(Object.assign({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return ve(e,[{key:"updateHashToUrl",value:function(e){var t=S.helper.getAngularDependency("$location");t.url(e)}},{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},i=this.stringify(r),a="?".concat(n);i.length&&(a="".concat(a,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:this.parse(e),r="string"!==typeof e?t:this.parse(t);return Object.assign({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"parse",value:function(e){return Oe.getValuesFromUrl("?".concat(e),!0)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=se(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(je(t,e)&&(we.period!==t||we.currentDateString!==e)){we.period=t;var n=p.parse(t,e).getDateRange();we.startDateString=E(n[0]),we.endDateString=E(n[1]),we.updateDateInTitle(e,t),"range"===we.period&&(e="".concat(we.startDateString,",").concat(we.endDateString)),we.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),Se=new ke,Ce=Se; + */p.addCustomPeriod("year",se);var we=window,Oe=we.piwik,je=we.broadcast;function ke(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Se=function(){function e(){var t=this;ge(this,e),ye(this,"urlQuery",Object(a["ref"])("")),ye(this,"hashQuery",Object(a["ref"])("")),ye(this,"urlParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.urlQuery.value))}))),ye(this,"hashParsed",Object(a["computed"])((function(){return Object(a["readonly"])(t.parse(t.hashQuery.value))}))),ye(this,"parsed",Object(a["computed"])((function(){return Object(a["readonly"])(Object.assign(Object.assign({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return be(e,[{key:"updateHashToUrl",value:function(e){var t=S.helper.getAngularDependency("$location");t.url(e)}},{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=Object.keys(t).length?this.getFinalHashParams(t,e):{},i=this.stringify(r),a="?".concat(n);i.length&&(a="".concat(a,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}},{key:"getFinalHashParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?e:this.parse(e),r="string"!==typeof e?t:this.parse(t);return Object.assign({period:r.period||this.parsed.value.period,date:r.date||this.parsed.value.date,segment:r.segment||this.parsed.value.segment},n)}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"parse",value:function(e){return je.getValuesFromUrl("?".concat(e),!0)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=ue(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(ke(t,e)&&(Oe.period!==t||Oe.currentDateString!==e)){Oe.period=t;var n=p.parse(t,e).getDateRange();Oe.startDateString=D(n[0]),Oe.endDateString=D(n[1]),Oe.updateDateInTitle(e,t),"range"===Oe.period&&(e="".concat(Oe.startDateString,",").concat(Oe.endDateString)),Oe.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),Ce=new Se,Ee=Ce; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Ee(){var e={getSearchParam:Ce.getSearchParam.bind(Ce)};return e} +function De(){var e={getSearchParam:Ee.getSearchParam.bind(Ee)};return e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function De(){return S}function Pe(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ve(e){return Ve="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Ne(e){return xe(e)||Ie(e)||Ae(e)||Te()}function Te(){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 Ae(e,t){if(e){if("string"===typeof e)return Be(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)?Be(e,t):void 0}}function Ie(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function xe(e){if(Array.isArray(e))return Be(e)}function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t,n){return t&&Me(e.prototype,t),n&&Me(e,n),e}function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}function $e(e){var t=Je();return function(){var n,r=Ye(e);if(t){var i=Ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return He(this,n)}}function He(e,t){if(t&&("object"===Ve(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ue(e)}function Ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qe(e){var t="function"===typeof Map?new Map:void 0;return qe=function(e){if(null===e||!Ge(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return We(e,arguments,Ye(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ze(n,e)},qe(e)}function We(e,t,n){return We=Je()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),a=new i;return n&&ze(a,n.prototype),a},We.apply(null,arguments)}function Je(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Ge(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function ze(e,t){return ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ze(e,t)}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)} +function Pe(){return S}function Ve(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ne(e){return Ne="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Te(e){return Be(e)||xe(e)||Ie(e)||Ae()}function Ae(){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 Ie(e,t){if(e){if("string"===typeof e)return Me(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)?Me(e,t):void 0}}function xe(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Be(e){if(Array.isArray(e))return Me(e)}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t,n){return t&&Le(e.prototype,t),n&&Le(e,n),e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ye(e,t)}function He(e){var t=Ge();return function(){var n,r=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ue(this,n)}}function Ue(e,t){if(t&&("object"===Ne(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qe(e)}function qe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function We(e){var t="function"===typeof Map?new Map:void 0;return We=function(e){if(null===e||!ze(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Je(e,arguments,Qe(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ye(n,e)},We(e)}function Je(e,t,n){return Je=Ge()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),a=new i;return n&&Ye(a,n.prototype),a},Je.apply(null,arguments)}function Ge(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ze(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function Ye(e,t){return Ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ye(e,t)}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Qe(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}we.updatePeriodParamsFromUrl=Se.updatePeriodParamsFromUrl.bind(Se),window.angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").run(["$location",function(){return null}]),window.angular.module("piwikApp.service").service("piwik",De),Pe.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Pe),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var Ke=function(e){_e(n,e);var t=$e(n);function n(){return Re(this,n),t.apply(this,arguments)}return n}(qe(Error)),Xe=function(){function e(){Re(this,e),Fe(this,"format","json"),Fe(this,"timeout",null),Fe(this,"callback",null),Fe(this,"useRegularCallbackInCaseOfError",!1),Fe(this,"errorCallback",void 0),Fe(this,"withToken",!1),Fe(this,"completeCallback",void 0),Fe(this,"getParams",{}),Fe(this,"getUrl","?"),Fe(this,"postParams",{}),Fe(this,"loadingElement",null),Fe(this,"errorElement","#ajaxError"),Fe(this,"headers",void 0),Fe(this,"requestHandle",null),Fe(this,"abortController",null),Fe(this,"defaultParams",["idSite","period","date","segment"]),Fe(this,"resolveWithHelper",!1),this.errorCallback=Qe}return Le(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(t){e.resolveWithHelper?n(e):n(t)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var l=window["require"]("piwik/UI"),c=new l.Notification;c.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Object.assign(Object.assign({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Ce.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}},{key:"getRequestHandle",value:function(){return this.requestHandle}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),n.errorElement&&r.setErrorElement(n.errorElement),r.setFormat(n.format||"json"),Array.isArray(t)?r.setBulkRequests.apply(r,Ne(t)):r.addParams(Object.assign(Object.assign({module:"API",format:n.format||"json"},t),{},{segment:t.segment?encodeURIComponent(t.segment):void 0}),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new Ke(n.message);return t}))}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Object.assign(Object.assign({},n),{},{postParams:t}))}}]),e}();function Ze(){return window.globalAjaxQueue}function et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nt(e,t,n){return t&&tt(e.prototype,t),n&&tt(e,n),e} + */function Ke(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}Oe.updatePeriodParamsFromUrl=Ce.updatePeriodParamsFromUrl.bind(Ce),window.angular.module("piwikApp.service").service("piwikUrl",De),window.angular.module("piwikApp.service").run(["$location",function(){return null}]),window.angular.module("piwikApp.service").service("piwik",Pe),Ve.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Ve),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var Xe=function(e){$e(n,e);var t=He(n);function n(){return _e(this,n),t.apply(this,arguments)}return n}(We(Error)),Ze=function(){function e(){_e(this,e),Re(this,"format","json"),Re(this,"timeout",null),Re(this,"callback",null),Re(this,"useRegularCallbackInCaseOfError",!1),Re(this,"errorCallback",void 0),Re(this,"withToken",!1),Re(this,"completeCallback",void 0),Re(this,"getParams",{}),Re(this,"getUrl","?"),Re(this,"postParams",{}),Re(this,"loadingElement",null),Re(this,"errorElement","#ajaxError"),Re(this,"headers",void 0),Re(this,"requestHandle",null),Re(this,"abortController",null),Re(this,"defaultParams",["idSite","period","date","segment"]),Re(this,"resolveWithHelper",!1),this.errorCallback=Ke}return Fe(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){e.requestHandle&&e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(t){e.resolveWithHelper?n(e):n(t)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var l=window["require"]("piwik/UI"),c=new l.Notification;c.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),c.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Object.assign(Object.assign({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Ee.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}},{key:"getRequestHandle",value:function(){return this.requestHandle}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),n.errorElement&&r.setErrorElement(n.errorElement),r.setFormat(n.format||"json"),Array.isArray(t)?r.setBulkRequests.apply(r,Te(t)):r.addParams(Object.assign(Object.assign({module:"API",format:n.format||"json"},t),{},{segment:t.segment?encodeURIComponent(t.segment):void 0}),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),n.returnResponseObject&&(r.resolveWithHelper=!0),r.send().then((function(t){var n=t instanceof e?t.requestHandle.responseJSON:t;if("error"===n.result)throw new Xe(n.message);return t}))}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Object.assign(Object.assign({},n),{},{postParams:t}))}}]),e}();function et(){return window.globalAjaxQueue}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rt(e,t,n){return t&&nt(e.prototype,t),n&&nt(e,n),e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.ajaxHelper=Xe,window.angular.module("piwikApp.service").service("globalAjaxQueue",Ze);var rt=window,it=rt.$,at=function(){function e(){et(this,e),this.setup()}return nt(e,[{key:"setup",value:function(){var e=this;Object(a["watch"])((function(){return Ce.parsed.value.popover}),(function(){return e.onPopoverParamChanged()})),Ce.parsed.value.popover&&this.onPopoverParamChangedInitial()}},{key:"onPopoverParamChangedInitial",value:function(){var e=this;it((function(){setTimeout((function(){e.openOrClose()}))}))}},{key:"onPopoverParamChanged",value:function(){var e=this;it((function(){e.openOrClose()}))}},{key:"openOrClose",value:function(){this.close();var e=Ce.parsed.value.popover;e?this.open(e):window.broadcast.resetPopoverStack()}},{key:"close",value:function(){window.Piwik_Popover.close()}},{key:"open",value:function(e){var t=decodeURIComponent(e);t=t.replace(/\$/g,"%"),t=decodeURIComponent(t);var n=t.split(":"),r=n[0];n.shift();var i=n.join(":");"undefined"===typeof window.broadcast.popoverHandlers[r]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[r](i)}}]),e}();new at;function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lt(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["alert",ot({},"alert-".concat(e.severity),!0)])},[Object(a["renderSlot"])(e.$slots,"default")],2)}var ct=Object(a["defineComponent"])({props:{severity:{type:String,required:!0}}});ct.render=lt;var st=ct; + */window.ajaxHelper=Ze,window.angular.module("piwikApp.service").service("globalAjaxQueue",et);var it=window,at=it.$,ot=function(){function e(){tt(this,e),this.setup()}return rt(e,[{key:"setup",value:function(){var e=this;Object(a["watch"])((function(){return Ee.parsed.value.popover}),(function(){return e.onPopoverParamChanged()})),Ee.parsed.value.popover&&this.onPopoverParamChangedInitial()}},{key:"onPopoverParamChangedInitial",value:function(){var e=this;at((function(){setTimeout((function(){e.openOrClose()}))}))}},{key:"onPopoverParamChanged",value:function(){var e=this;at((function(){e.openOrClose()}))}},{key:"openOrClose",value:function(){this.close();var e=Ee.parsed.value.popover;e?this.open(e):window.broadcast.resetPopoverStack()}},{key:"close",value:function(){window.Piwik_Popover.close()}},{key:"open",value:function(e){var t=decodeURIComponent(e);t=t.replace(/\$/g,"%"),t=decodeURIComponent(t);var n=t.split(":"),r=n[0];n.shift();var i=n.join(":");"undefined"===typeof window.broadcast.popoverHandlers[r]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[r](i)}}]),e}();new ot;function lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["alert",lt({},"alert-".concat(e.severity),!0)])},[Object(a["renderSlot"])(e.$slots,"default")],2)}var st=Object(a["defineComponent"])({props:{severity:{type:String,required:!0}}});st.render=ct;var ut=st; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ut(){var e=a["createApp"].apply(void 0,arguments);return e.config.globalProperties.$sanitize=window.vueSanitize,e.config.globalProperties.translate=C,e}function dt(e,t){return gt(e)||ht(e,t)||mt(e,t)||pt()}function pt(){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 mt(e,t){if(e){if("string"===typeof e)return ft(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)?ft(e,t):void 0}}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ht(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function gt(e){if(Array.isArray(e))return e}function vt(e){return vt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)} + */function dt(){var e=a["createApp"].apply(void 0,arguments);return e.config.globalProperties.$sanitize=window.vueSanitize,e.config.globalProperties.translate=C,e.config.globalProperties.translateOrDefault=E,e}function pt(e,t){return vt(e)||gt(e,t)||ft(e,t)||mt()}function mt(){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 ft(e,t){if(e){if("string"===typeof e)return ht(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)?ht(e,t):void 0}}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gt(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function vt(e){if(Array.isArray(e))return e}function bt(e){return bt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt(e)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var bt=0;function yt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function wt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function Ot(e){return"object"===vt(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).filter((function(e){return!/^\$/.test(e[0])}))):e}function jt(e){var t=e.component,n=e.require,r=e.scope,i=void 0===r?{}:r,o=e.events,l=void 0===o?{}:o,c=e.$inject,s=e.directiveName,u=e.transclude,d=e.mountPointFactory,p=e.postCreate,m=e.noScope,f=e.restrict,h=void 0===f?"A":f,g=e.priority,v=e.replace,b=bt;u&&(bt+=1);var y={},w={};function O(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var c={restrict:h,require:n,priority:g,scope:m?void 0:w,compile:function(){return{post:function(e,n,o,c){var s=u?n.find("[ng-transclude][counter=".concat(b,"]")):null,m="<root-component";Object.entries(l).forEach((function(e){var t=dt(e,1),n=t[0];m+=" @".concat(yt(n),"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(i).forEach((function(e){var t=dt(e,2),n=t[1];if("&"===n.angularJsBind||"&?"===n.angularJsBind){var r=yt(n.vue);l[n.vue]||(m+=" @".concat(r,"=\"onEventHandler('").concat(n.vue,"', $event)\""))}else m+=" :".concat(yt(n.vue),'="').concat(n.vue,'"')})),m+=">",u&&(m+='<div ref="transcludeTarget"/>'),m+="</root-component>";var f=ut({template:m,data:function(){var t=this,a={};return Object.entries(i).forEach((function(i){var l=dt(i,2),s=l[0],u=l[1],d=Ot(e[s]);"undefined"===typeof d&&"undefined"!==typeof u.default&&(d=u.default instanceof Function?u.default.apply(u,[e,n,o].concat(r)):u.default),u.transform&&(d=u.transform.apply(u,[d,t,e,n,o,c].concat(r))),a[u.vue]=d})),a},setup:function(){if(u){var e=Object(a["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,i){var a=wt(t);a=y[a]||a,e[a]&&e[a](i),l[t]&&l[t].apply(l,[i,this,e,n,o,c].concat(r))}}});f.component("root-component",t);var h=d?d.apply(void 0,[e,n,o].concat(r)):n[0],g=f.mount(h);Object.entries(i).forEach((function(t){var i=dt(t,2),a=i[0],l=i[1];l.angularJsBind&&"&"!==l.angularJsBind&&"&?"!==l.angularJsBind&&e.$watch(a,(function(t,i){if(t!==i||JSON.stringify(g[l.vue])!==JSON.stringify(t)){var a=Ot(t);"undefined"!==typeof l.default&&"undefined"===typeof t&&(a=l.default instanceof Function?l.default.apply(l,[e,n,o].concat(r)):l.default),l.transform&&(a=l.transform.apply(l,[a,g,e,n,o,c].concat(r))),g[l.vue]=a}}))})),u&&s&&$(g.transcludeTarget).append(s),p&&p.apply(void 0,[g,e,n,o,c].concat(r)),v&&(Array.from(n[0].attributes).forEach((function(e){i[e.nodeName]||h.firstElementChild&&h.firstElementChild.setAttribute(e.nodeName,e.nodeValue)})),n.replaceWith(window.$(h).children())),n.on("$destroy",(function(){f.unmount()}))}}}};return u&&(c.transclude=!0,c.template='<div ng-transclude counter="'.concat(b,'"/>')),c}return Object.entries(i).forEach((function(e){var t=dt(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(w[n]=r.angularJsBind),y[r.vue]=n})),O.$inject=c||[],window.angular.module("piwikApp").directive(s,O),O}function kt(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function St(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function Ct(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function Et(e){var t=Ct(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} + */var yt=0;function wt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function Ot(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function jt(e){return"object"===bt(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).filter((function(e){return!/^\$/.test(e[0])}))):e}function kt(e){var t=e.component,n=e.require,r=e.scope,i=void 0===r?{}:r,o=e.events,l=void 0===o?{}:o,c=e.$inject,s=e.directiveName,u=e.transclude,d=e.mountPointFactory,p=e.postCreate,m=e.noScope,f=e.restrict,h=void 0===f?"A":f,g=e.priority,v=e.replace,b=yt;u&&(yt+=1);var y={},w={};function O(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var c={restrict:h,require:n,priority:g,scope:m?void 0:w,compile:function(){return{post:function(e,n,o,c){var s=u?n.find("[ng-transclude][counter=".concat(b,"]")):null,m="<root-component";Object.entries(l).forEach((function(e){var t=pt(e,1),n=t[0];m+=" @".concat(wt(n),"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(i).forEach((function(e){var t=pt(e,2),n=t[1];if("&"===n.angularJsBind||"&?"===n.angularJsBind){var r=wt(n.vue);l[n.vue]||(m+=" @".concat(r,"=\"onEventHandler('").concat(n.vue,"', $event)\""))}else m+=" :".concat(wt(n.vue),'="').concat(n.vue,'"')})),m+=">",u&&(m+='<div ref="transcludeTarget"/>'),m+="</root-component>";var f=dt({template:m,data:function(){var t=this,a={};return Object.entries(i).forEach((function(i){var l=pt(i,2),s=l[0],u=l[1],d=jt(e[s]);"undefined"===typeof d&&"undefined"!==typeof u.default&&(d=u.default instanceof Function?u.default.apply(u,[e,n,o].concat(r)):u.default),u.transform&&(d=u.transform.apply(u,[d,t,e,n,o,c].concat(r))),a[u.vue]=d})),a},setup:function(){if(u){var e=Object(a["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,i){var a=Ot(t);a=y[a]||a,e[a]&&e[a](i),l[t]&&l[t].apply(l,[i,this,e,n,o,c].concat(r))}}});f.component("root-component",t);var h=d?d.apply(void 0,[e,n,o].concat(r)):n[0],g=f.mount(h);Object.entries(i).forEach((function(t){var i=pt(t,2),a=i[0],l=i[1];l.angularJsBind&&"&"!==l.angularJsBind&&"&?"!==l.angularJsBind&&e.$watch(a,(function(t,i){if(t!==i||JSON.stringify(g[l.vue])!==JSON.stringify(t)){var a=jt(t);"undefined"!==typeof l.default&&"undefined"===typeof t&&(a=l.default instanceof Function?l.default.apply(l,[e,n,o].concat(r)):l.default),l.transform&&(a=l.transform.apply(l,[a,g,e,n,o,c].concat(r))),g[l.vue]=a}}))})),u&&s&&$(g.transcludeTarget).append(s),p&&p.apply(void 0,[g,e,n,o,c].concat(r)),v&&(Array.from(n[0].attributes).forEach((function(e){i[e.nodeName]||h.firstElementChild&&h.firstElementChild.setAttribute(e.nodeName,e.nodeValue)})),n.replaceWith(window.$(h).children())),n.on("$destroy",(function(){f.unmount()}))}}}};return u&&(c.transclude=!0,c.template='<div ng-transclude counter="'.concat(b,'"/>')),c}return Object.entries(i).forEach((function(e){var t=pt(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(w[n]=r.angularJsBind),y[r.vue]=n})),O.$inject=c||[],window.angular.module("piwikApp").directive(s,O),O}function St(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function Ct(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function Et(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function Dt(e){var t=Et(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:st,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0}); + */kt({component:ut,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Dt={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r,i=!!$(e).parent().closest(".dropdown-content").length;i&&(n={hover:!0},$(e).addClass("submenu"),$((null===(r=t.value)||void 0===r?void 0:r.activates)||$(e).data("target")).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container"));$(e).dropdown(n)},updated:function(e){Object(a["nextTick"])((function(){$(e).addClass("matomo-dropdown-menu")}))}}; + */var Pt={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r,i=!!$(e).parent().closest(".dropdown-content").length;i&&(n={hover:!0},$(e).addClass("submenu"),$((null===(r=t.value)||void 0===r?void 0:r.activates)||$(e).data("target")).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container"));$(e).dropdown(n)},updated:function(e){Object(a["nextTick"])((function(){$(e).addClass("matomo-dropdown-menu")}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Pt(e){return{restrict:"A",link:function(t,n,r){var i={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Dt.mounted(n[0],i)}))}}} +function Vt(e){return{restrict:"A",link:function(t,n,r){var i={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Pt.mounted(n[0],i)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Vt(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function Nt(e,t){t.value.hasScrolled=!0}function Tt(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function At(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}Pt.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikDropdownMenu",Pt);var It=document.documentElement,xt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=At.bind(null,e,t),t.value.onMouseDown=Tt.bind(null,e,t),t.value.onClickOutsideElement=Vt.bind(null,e,t),t.value.onScroll=Nt.bind(null,e,t),It.addEventListener("keyup",t.value.onEscapeHandler),It.addEventListener("mousedown",t.value.onMouseDown),It.addEventListener("mouseup",t.value.onClickOutsideElement),It.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){It.removeEventListener("keyup",t.value.onEscapeHandler),It.removeEventListener("mousedown",t.value.onMouseDown),It.removeEventListener("mouseup",t.value.onClickOutsideElement),It.removeEventListener("scroll",t.value.onScroll)}}; +function Nt(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function Tt(e,t){t.value.hasScrolled=!0}function At(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function It(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}Vt.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikDropdownMenu",Vt);var xt=document.documentElement,Bt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=It.bind(null,e,t),t.value.onMouseDown=At.bind(null,e,t),t.value.onClickOutsideElement=Nt.bind(null,e,t),t.value.onScroll=Tt.bind(null,e,t),xt.addEventListener("keyup",t.value.onEscapeHandler),xt.addEventListener("mousedown",t.value.onMouseDown),xt.addEventListener("mouseup",t.value.onClickOutsideElement),xt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){xt.removeEventListener("keyup",t.value.onEscapeHandler),xt.removeEventListener("mousedown",t.value.onMouseDown),xt.removeEventListener("mouseup",t.value.onClickOutsideElement),xt.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Bt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};xt.mounted(t[0],r),t.on("$destroy",(function(){return xt.unmounted(t[0],r)}))}}} +function Mt(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};Bt.mounted(t[0],r),t.on("$destroy",(function(){return Bt.unmounted(t[0],r)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Mt(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}window.angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Bt);var Lt={mounted:function(e,t){Mt(e,t)},updated:function(e,t){Mt(e,t)}}; +function Lt(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}window.angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",Mt);var Ft={mounted:function(e,t){Lt(e,t)},updated:function(e,t){Lt(e,t)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ft(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Lt.updated(t[0],r)}))}}} + */function Rt(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Ft.updated(t[0],r)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Rt(e,t){var n;return e instanceof HTMLElement?e:null===(n=t.instance)||void 0===n?void 0:n.$refs[e]}window.angular.module("piwikApp.directive").directive("piwikFocusIf",Ft);var _t={getRef:Rt}; +function _t(e,t){var n;return e instanceof HTMLElement?e:null===(n=t.instance)||void 0===n?void 0:n.$refs[e]}window.angular.module("piwikApp.directive").directive("piwikFocusIf",Rt);var $t={getRef:_t}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function $t(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Ht(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function Ut(e){e.value.hasScrolled=!0}function qt(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function Wt(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var Jt=document.documentElement,Gt=window,zt=Gt.$,Yt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=$t.bind(null,e),t.value.onEscapeHandler=Wt.bind(null,e,t),t.value.onMouseDown=qt.bind(null,t),t.value.onClickOutsideElement=Ht.bind(null,e,t),t.value.onScroll=Ut.bind(null,t),setTimeout((function(){var e=_t.getRef(t.value.expander,t);e&&zt(e).on("click",t.value.onExpand)})),Jt.addEventListener("keyup",t.value.onEscapeHandler),Jt.addEventListener("mousedown",t.value.onMouseDown),Jt.addEventListener("mouseup",t.value.onClickOutsideElement),Jt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=_t.getRef(t.value.expander,t);n&&zt(n).off("click",t.value.onExpand),Jt.removeEventListener("keyup",t.value.onEscapeHandler),Jt.removeEventListener("mousedown",t.value.onMouseDown),Jt.removeEventListener("mouseup",t.value.onClickOutsideElement),Jt.removeEventListener("scroll",t.value.onScroll)}}; + */function Ht(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Ut(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function qt(e){e.value.hasScrolled=!0}function Wt(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function Jt(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var Gt=document.documentElement,zt=window,Yt=zt.$,Qt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=Ht.bind(null,e),t.value.onEscapeHandler=Jt.bind(null,e,t),t.value.onMouseDown=Wt.bind(null,t),t.value.onClickOutsideElement=Ut.bind(null,e,t),t.value.onScroll=qt.bind(null,t),setTimeout((function(){var e=$t.getRef(t.value.expander,t);e&&Yt(e).on("click",t.value.onExpand)})),Gt.addEventListener("keyup",t.value.onEscapeHandler),Gt.addEventListener("mousedown",t.value.onMouseDown),Gt.addEventListener("mouseup",t.value.onClickOutsideElement),Gt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=$t.getRef(t.value.expander,t);n&&Yt(n).off("click",t.value.onExpand),Gt.removeEventListener("keyup",t.value.onEscapeHandler),Gt.removeEventListener("mousedown",t.value.onMouseDown),Gt.removeEventListener("mouseup",t.value.onClickOutsideElement),Gt.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Qt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Yt.mounted(t[0],n),t.on("$destroy",(function(){return Yt.unmounted(t[0],n)}))}}} +function Kt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Qt.mounted(t[0],n),t.on("$destroy",(function(){return Qt.unmounted(t[0],n)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Kt(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Xt(e){e.classList.remove("expanded")}function Zt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function en(e,t){27===t.which&&e.classList.remove("expanded")}window.angular.module("piwikApp").directive("piwikExpandOnClick",Qt);var tn=document.documentElement,nn={mounted:function(e,t){t.value.onMouseEnter=Kt.bind(null,e),t.value.onMouseLeave=Xt.bind(null,e),t.value.onClickOutsideElement=Zt.bind(null,e),t.value.onEscapeHandler=en.bind(null,e),setTimeout((function(){var e=_t.getRef(t.value.expander,t);e&&e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),tn.addEventListener("keyup",t.value.onEscapeHandler),tn.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=_t.getRef(t.value.expander,t);n&&n.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; +function Xt(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function Zt(e){e.classList.remove("expanded")}function en(e,t){e.contains(t.target)||e.classList.remove("expanded")}function tn(e,t){27===t.which&&e.classList.remove("expanded")}window.angular.module("piwikApp").directive("piwikExpandOnClick",Kt);var nn=document.documentElement,rn={mounted:function(e,t){t.value.onMouseEnter=Xt.bind(null,e),t.value.onMouseLeave=Zt.bind(null,e),t.value.onClickOutsideElement=en.bind(null,e),t.value.onEscapeHandler=tn.bind(null,e),setTimeout((function(){var e=$t.getRef(t.value.expander,t);e&&e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),nn.addEventListener("keyup",t.value.onEscapeHandler),nn.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=$t.getRef(t.value.expander,t);n&&n.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function rn(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};nn.mounted(t[0],n),t.on("$destroy",(function(){return nn.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikExpandOnHover",rn); +function an(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};rn.mounted(t[0],n),t.on("$destroy",(function(){return rn.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikExpandOnHover",an); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var an=window,on=an.$,ln={mounted:function(e,t){var n=on(e),r=t.value.sensitiveData,i=t.value.showCharacters||6,a=t.value.clickElementSelector||n,o="";function l(){n.html(r),on(a).css({cursor:""}),on(a).tooltip("destroy")}i>0&&(o+=r.substr(0,i)),o+=r.substr(i).replace(/./g,"*"),n.html(o),on(a).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),on(a).one("click",l),on(a).css({cursor:"pointer"})}}; +var on=window,ln=on.$,cn={mounted:function(e,t){var n=ln(e),r=t.value.sensitiveData,i=t.value.showCharacters||6,a=t.value.clickElementSelector||n,o="";function l(){n.html(r),ln(a).css({cursor:""}),ln(a).tooltip("destroy")}i>0&&(o+=r.substr(0,i)),o+=r.substr(i).replace(/./g,"*"),n.html(o),ln(a).tooltip({content:C("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),ln(a).one("click",l),ln(a).css({cursor:"pointer"})}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function cn(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{sensitiveData:n.piwikShowSensitiveData||(n.text?n.text():""),showCharacters:n.showCharacters?parseInt(n.showCharacters,10):void 0,clickElementSelector:n.clickElementSelector},oldValue:null,modifiers:{},dir:{}};ln.mounted(t[0],r)}}}window.angular.module("piwikApp").directive("piwikShowSensitiveData",cn); +function sn(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{sensitiveData:n.piwikShowSensitiveData||(n.text?n.text():""),showCharacters:n.showCharacters?parseInt(n.showCharacters,10):void 0,clickElementSelector:n.clickElementSelector},oldValue:null,modifiers:{},dir:{}};cn.mounted(t[0],r)}}}window.angular.module("piwikApp").directive("piwikShowSensitiveData",sn); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var sn=window,un=sn.$,dn={mounted:function(e){var t=un(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));var n=t.attr("data-target");n&&un("#".concat(n)).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}}; +var un=window,dn=un.$,pn={mounted:function(e){var t=dn(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));var n=t.attr("data-target");n&&dn("#".concat(n)).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!0})}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function pn(){return{restrict:"C",link:function(e,t){dn.mounted(t[0])}}} +function mn(){return{restrict:"C",link:function(e,t){pn.mounted(t[0])}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function mn(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,window.angular.element(t.target).select())}function fn(e){var t=document.createRange();t.selectNode(e.target);var n=window.getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),n&&n.addRange(t)}function hn(e){delete e.value.focusedElement}window.angular.module("piwikApp").directive("dropdownButton",pn);var gn={mounted:function(e,t){var n=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===n,t.value.elementSupportsSelect?(t.value.onFocusHandler=mn.bind(null,t),t.value.onBlurHandler=hn.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=fn,e.addEventListener("click",t.value.onClickHandler))},unmounted:function(e,t){t.value.elementSupportsSelect?(e.removeEventListener("focus",t.value.onFocusHandler),e.removeEventListener("blur",t.value.onBlurHandler)):e.removeEventListener("click",t.value.onClickHandler)}}; +function fn(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,window.angular.element(t.target).select())}function hn(e){var t=document.createRange();t.selectNode(e.target);var n=window.getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),n&&n.addRange(t)}function gn(e){delete e.value.focusedElement}window.angular.module("piwikApp").directive("dropdownButton",mn);var vn={mounted:function(e,t){var n=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===n,t.value.elementSupportsSelect?(t.value.onFocusHandler=fn.bind(null,t),t.value.onBlurHandler=gn.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=hn,e.addEventListener("click",t.value.onClickHandler))},unmounted:function(e,t){t.value.elementSupportsSelect?(e.removeEventListener("focus",t.value.onFocusHandler),e.removeEventListener("blur",t.value.onBlurHandler)):e.removeEventListener("click",t.value.onClickHandler)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function vn(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};gn.mounted(t[0],n),t.on("$destroy",(function(){return gn.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikSelectOnFocus",vn); + */function bn(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};vn.mounted(t[0],n),t.on("$destroy",(function(){return vn.unmounted(t[0],n)}))}}}window.angular.module("piwikApp").directive("piwikSelectOnFocus",bn); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var bn=!1,yn={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!bn){bn=!0;var n=_t.getRef(t.value.activator,t);if(n){window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; +var yn=!1,wn={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!yn){yn=!0;var n=$t.getRef(t.value.activator,t);if(n){window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function wn(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){yn.mounted(n[0],i)}))}}}wn.$inject=["$timeout"],window.angular.module("piwikApp.directive").directive("piwikSideNav",wn);var On={ref:"root"};function jn(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",On,[Object(a["renderSlot"])(e.$slots,"default")],512)),[[a["vShow"],e.modelValue]])}var kn=Object(a["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});kn.render=jn;var Sn=kn,Cn=(jt({component:Sn,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,a,o){setTimeout((function(){n.$apply(o(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0}),{key:0,class:"title",tabindex:"6"}),En=["href","title"],Dn={class:"iconsBar"},Pn=["href","title"],Vn=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Nn=[Vn],Tn=["title"],An=Object(a["createElementVNode"])("span",{class:"icon-info"},null,-1),In=[An],xn={class:"ratingIcons"},Bn={class:"inlineHelp"},Mn=["innerHTML"],Ln=["innerHTML"],Fn=["href"]; +function On(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){wn.mounted(n[0],i)}))}}}On.$inject=["$timeout"],window.angular.module("piwikApp.directive").directive("piwikSideNav",On);var jn={ref:"root"};function kn(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",jn,[Object(a["renderSlot"])(e.$slots,"default")],512)),[[a["vShow"],e.modelValue]])}var Sn=Object(a["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});Sn.render=kn;var Cn=Sn,En=(kt({component:Cn,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,a,o){setTimeout((function(){n.$apply(o(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0}),{key:0,class:"title",tabindex:"6"}),Dn=["href","title"],Pn={class:"iconsBar"},Vn=["href","title"],Nn=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Tn=[Nn],An=["title"],In=Object(a["createElementVNode"])("span",{class:"icon-info"},null,-1),xn=[In],Bn={class:"ratingIcons"},Mn={class:"inlineHelp"},Ln=["innerHTML"],Fn=["innerHTML"],Rn=["href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Rn(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Cn,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,En)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Dn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Nn,8,Pn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},In,10,Tn)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",xn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Bn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Mn),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Ln)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Fn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} + */function _n(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",En,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,Dn)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Pn,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Tn,8,Vn)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},xn,10,An)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Bn,[Object(a["createVNode"])(l,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Mn,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Ln),""!=e.reportGenerated?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,Fn)):Object(a["createCommentVNode"])("",!0),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Rn)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function _n(e,t){return Object(a["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var $n=_n("Feedback","RateFeature"),Hn=Object(a["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:$n},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i,a=null===(i=r.getAttribute("data-content"))||void 0===i?void 0:i.trim();a&&a.length&&(e.actualInlineHelp="<p>".concat(a,"</p>"),setTimeout((function(){return r.remove()}),0))}}var o;e.actualFeatureName||(e.actualFeatureName=null===(o=t.querySelector(".title"))||void 0===o?void 0:o.textContent);if(S.period&&S.currentDateString){var l=p.parse(S.period,S.currentDateString);e.reportGenerated&&l.containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}}))}});Hn.render=Rn;var Un=Hn,qn=(jt({component:Un,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Wn={class:"card-content"},Jn={key:0,class:"card-title"},Gn={key:1,class:"card-title"},zn={ref:"content"}; + */function $n(e,t){return Object(a["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var Hn=$n("Feedback","RateFeature"),Un=Object(a["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:Hn},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i,a=null===(i=r.getAttribute("data-content"))||void 0===i?void 0:i.trim();a&&a.length&&(e.actualInlineHelp="<p>".concat(a,"</p>"),setTimeout((function(){return r.remove()}),0))}}var o;e.actualFeatureName||(e.actualFeatureName=null===(o=t.querySelector(".title"))||void 0===o?void 0:o.textContent);if(S.period&&S.currentDateString){var l=p.parse(S.period,S.currentDateString);e.reportGenerated&&l.containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}}))}});Un.render=_n;var qn=Un,Wn=(kt({component:qn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),Jn={class:"card-content"},Gn={key:0,class:"card-title"},zn={key:1,class:"card-title"},Yn={ref:"content"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Yn(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("EnrichedHeadline");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",qn,[Object(a["createElementVNode"])("div",Wn,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Jn,Object(a["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Gn,[Object(a["createVNode"])(l,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",zn,[Object(a["renderSlot"])(e.$slots,"default")],512)])],512)}var Qn=null,Kn=window,Xn=Kn.$,Zn=Object(a["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:Un},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e=this,t=this.$refs.root,n=this.$refs.content;if(this.anchor&&t&&t.parentElement){var r=document.createElement("a");r.id=this.anchor,Xn(t.parentElement).prepend(r)}setTimeout((function(){var t=n.querySelector(".contentHelp");t&&(e.actualHelpText=t.innerHTML,t.remove())}),0),this.actualFeature&&"true"===this.actualFeature&&(this.actualFeature=this.contentTitle),null===Qn&&(Qn=document.querySelector("#content.admin"));var i=null;if(Qn&&(i=Qn.offsetTop),i||0===i){var a=t.closest("[piwik-widget-loader]"),o=a?a.offsetTop:t.offsetTop;o-i<17&&(t.style.marginTop="0")}}});Zn.render=Yn;var er=Zn; + */function Qn(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("EnrichedHeadline");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Wn,[Object(a["createElementVNode"])("div",Jn,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Gn,Object(a["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",zn,[Object(a["createVNode"])(l,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Yn,[Object(a["renderSlot"])(e.$slots,"default")],512)])],512)}var Kn=null,Xn=window,Zn=Xn.$,er=Object(a["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:qn},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e=this,t=this.$refs.root,n=this.$refs.content;if(this.anchor&&t&&t.parentElement){var r=document.createElement("a");r.id=this.anchor,Zn(t.parentElement).prepend(r)}setTimeout((function(){var t=n.querySelector(".contentHelp");t&&(e.actualHelpText=t.innerHTML,t.remove())}),0),this.actualFeature&&"true"===this.actualFeature&&(this.actualFeature=this.contentTitle),null===Kn&&(Kn=document.querySelector("#content.admin"));var i=null;if(Kn&&(i=Kn.offsetTop),i||0===i){var a=t.closest("[piwik-widget-loader]"),o=a?a.offsetTop:t.offsetTop;o-i<17&&(t.style.marginTop="0")}}});er.render=Qn;var tr=er; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:er,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function tr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rr(e,t,n){return t&&nr(e.prototype,t),n&&nr(e,n),e}function ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */kt({component:tr,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function nr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ir(e,t,n){return t&&rr(e.prototype,t),n&&rr(e,n),e}function ar(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var ar=function(){function e(){var t=this;tr(this,e),ir(this,"segmentState",Object(a["reactive"])({availableSegments:[]})),S.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return rr(e,[{key:"state",get:function(){return Object(a["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),or=new ar;function lr(e){return dr(e)||ur(e)||sr(e)||cr()}function cr(){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 sr(e,t){if(e){if("string"===typeof e)return pr(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)?pr(e,t):void 0}}function ur(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function dr(e){if(Array.isArray(e))return pr(e)}function pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t,n){return t&&fr(e.prototype,t),n&&fr(e,n),e}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var or=function(){function e(){var t=this;nr(this,e),ar(this,"segmentState",Object(a["reactive"])({availableSegments:[]})),S.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return ir(e,[{key:"state",get:function(){return Object(a["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),lr=new or;function cr(e){return pr(e)||dr(e)||ur(e)||sr()}function sr(){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 ur(e,t){if(e){if("string"===typeof e)return mr(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)?mr(e,t):void 0}}function dr(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function pr(e){if(Array.isArray(e))return mr(e)}function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gr(e,t,n){return t&&hr(e.prototype,t),n&&hr(e,n),e}function vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var vr=8,br=3;function yr(e){return e?Array.isArray(e)?e:[e]:[]}var wr=function(){function e(){var t=this;mr(this,e),gr(this,"privateState",Object(a["reactive"])({comparisonsDisabledFor:[]})),gr(this,"state",Object(a["readonly"])(this.privateState)),gr(this,"colors",{}),gr(this,"segmentComparisons",Object(a["computed"])((function(){return t.parseSegmentComparisons()}))),gr(this,"periodComparisons",Object(a["computed"])((function(){return t.parsePeriodComparisons()}))),gr(this,"isEnabled",Object(a["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(a["watch"])((function(){return t.getComparisons()}),(function(){return S.postEvent("piwikComparisonsChanged")}),{deep:!0})}return hr(e,[{key:"getComparisons",value:function(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}},{key:"isComparing",value:function(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%vr;if(0===n)return this.colors["series".concat(r)];var i=n%br;return this.colors["series".concat(r,"-shade").concat(i)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%vr);return t>0&&(n+="-shade".concat(t%br)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(i){t.push({index:n,params:Object.assign(Object.assign({},i.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=lr(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},a=!1,o=!1;e.forEach((function(e){a?r[e.params.segment]=!0:a=!0})),t.forEach((function(e){o?i["".concat(e.params.period,"|").concat(e.params.date)]=!0:o=!0}));var l=[],c=[];Object.keys(i).forEach((function(e){var t=e.split("|");l.push(t[0]),c.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:l,compareDates:c},u=S.helper.isAngularRenderingThePage()?Ce.hashParsed.value:Ce.urlParsed.value;Ce.updateLocation(Object.assign(Object.assign(Object.assign({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n<vr;n+=1){t.push("series".concat(n));for(var r=0;r<br;r+=1)t.push("series".concat(n,"-shade").concat(r))}return e.getColors("comparison-series-color",t)}},{key:"loadComparisonsDisabledFor",value:function(){var e=this,t=Ce.parsed.value.module;window.piwik.installation?this.privateState.comparisonsDisabledFor=[]:"CoreUpdater"!==t&&"Installation"!==t&&"Overlay"!==t?Xe.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=or.state.availableSegments,t=lr(yr(Ce.parsed.value.compareSegments));t.unshift(Ce.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var i;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(i=e)}));var a=i?i.name:C("General_Unknown");""===t.trim()&&(a=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:S.helper.htmlDecode(a),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=lr(yr(Ce.parsed.value.comparePeriods)),t=lr(yr(Ce.parsed.value.compareDates));e.unshift(Ce.parsed.value.period),t.unshift(Ce.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var i=void 0;try{i=p.parse(e[r],t[r]).getPrettyString()}catch(a){i=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:i,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=Ce.parsed.value.category||Ce.parsed.value.module,t=Ce.parsed.value.subcategory||Ce.parsed.value.action,n="".concat(e,".").concat(t),r=-1===this.privateState.comparisonsDisabledFor.indexOf(n)&&-1===this.privateState.comparisonsDisabledFor.indexOf("".concat(e,".*"));return document.documentElement.classList.toggle("comparisonsDisabled",!r),r}}]),e}(),Or=new wr,jr={key:0,ref:"root",class:"matomo-comparisons"},kr={class:"comparison-type"},Sr=["title"],Cr=["href"],Er=["title"],Dr={class:"comparison-period-label"},Pr=["onClick"],Vr=["title"],Nr={class:"loadingPiwik",style:{display:"none"}},Tr=["alt"];function Ar(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("tooltips");return e.isComparing?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",jr,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.segmentComparisons,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(a["createElementVNode"])("div",kr,Object(a["toDisplayString"])(e.translate("General_Segment")),1),Object(a["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(a["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(a["toDisplayString"])(t.title),9,Cr)],8,Sr),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodComparisons,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(a["createElementVNode"])("span",{class:"comparison-dot",style:Object(a["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(a["createElementVNode"])("span",Dr,Object(a["toDisplayString"])(n.title)+" ("+Object(a["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,Er)})),128)),e.segmentComparisons.length>1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(a["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Vr)],8,Pr)):Object(a["createCommentVNode"])("",!0)])})),128)),Object(a["createElementVNode"])("div",Nr,[Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,Tr),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[l,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(a["createCommentVNode"])("",!0)} + */var br=8,yr=3;function wr(e){return e?Array.isArray(e)?e:[e]:[]}var Or=function(){function e(){var t=this;fr(this,e),vr(this,"privateState",Object(a["reactive"])({comparisonsDisabledFor:[]})),vr(this,"state",Object(a["readonly"])(this.privateState)),vr(this,"colors",{}),vr(this,"segmentComparisons",Object(a["computed"])((function(){return t.parseSegmentComparisons()}))),vr(this,"periodComparisons",Object(a["computed"])((function(){return t.parsePeriodComparisons()}))),vr(this,"isEnabled",Object(a["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(a["watch"])((function(){return t.getComparisons()}),(function(){return S.postEvent("piwikComparisonsChanged")}),{deep:!0})}return gr(e,[{key:"getComparisons",value:function(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}},{key:"isComparing",value:function(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%br;if(0===n)return this.colors["series".concat(r)];var i=n%yr;return this.colors["series".concat(r,"-shade").concat(i)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%br);return t>0&&(n+="-shade".concat(t%yr)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(i){t.push({index:n,params:Object.assign(Object.assign({},i.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=cr(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},a=!1,o=!1;e.forEach((function(e){a?r[e.params.segment]=!0:a=!0})),t.forEach((function(e){o?i["".concat(e.params.period,"|").concat(e.params.date)]=!0:o=!0}));var l=[],c=[];Object.keys(i).forEach((function(e){var t=e.split("|");l.push(t[0]),c.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:l,compareDates:c},u=S.helper.isAngularRenderingThePage()?Ee.hashParsed.value:Ee.urlParsed.value;Ee.updateLocation(Object.assign(Object.assign(Object.assign({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n<br;n+=1){t.push("series".concat(n));for(var r=0;r<yr;r+=1)t.push("series".concat(n,"-shade").concat(r))}return e.getColors("comparison-series-color",t)}},{key:"loadComparisonsDisabledFor",value:function(){var e=this,t=Ee.parsed.value.module;window.piwik.installation?this.privateState.comparisonsDisabledFor=[]:"CoreUpdater"!==t&&"Installation"!==t&&"Overlay"!==t?Ze.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=lr.state.availableSegments,t=cr(wr(Ee.parsed.value.compareSegments));t.unshift(Ee.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var i;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(i=e)}));var a=i?i.name:C("General_Unknown");""===t.trim()&&(a=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:S.helper.htmlDecode(a),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=cr(wr(Ee.parsed.value.comparePeriods)),t=cr(wr(Ee.parsed.value.compareDates));e.unshift(Ee.parsed.value.period),t.unshift(Ee.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var i=void 0;try{i=p.parse(e[r],t[r]).getPrettyString()}catch(a){i=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:i,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=Ee.parsed.value.category||Ee.parsed.value.module,t=Ee.parsed.value.subcategory||Ee.parsed.value.action,n="".concat(e,".").concat(t),r=-1===this.privateState.comparisonsDisabledFor.indexOf(n)&&-1===this.privateState.comparisonsDisabledFor.indexOf("".concat(e,".*"));return document.documentElement.classList.toggle("comparisonsDisabled",!r),r}}]),e}(),jr=new Or,kr={key:0,ref:"root",class:"matomo-comparisons"},Sr={class:"comparison-type"},Cr=["title"],Er=["href"],Dr=["title"],Pr={class:"comparison-period-label"},Vr=["onClick"],Nr=["title"],Tr={class:"loadingPiwik",style:{display:"none"}},Ar=["alt"];function Ir(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("tooltips");return e.isComparing?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",kr,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.segmentComparisons,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(a["createElementVNode"])("div",Sr,Object(a["toDisplayString"])(e.translate("General_Segment")),1),Object(a["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(a["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(a["toDisplayString"])(t.title),9,Er)],8,Cr),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodComparisons,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(a["createElementVNode"])("span",{class:"comparison-dot",style:Object(a["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(a["createElementVNode"])("span",Pr,Object(a["toDisplayString"])(n.title)+" ("+Object(a["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,Dr)})),128)),e.segmentComparisons.length>1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(a["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Nr)],8,Vr)):Object(a["createCommentVNode"])("",!0)])})),128)),Object(a["createElementVNode"])("div",Tr,[Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,Ar),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[l,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(a["createCommentVNode"])("",!0)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Ir=window,xr=Ir.$;function Br(){var e=xr(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))}function Mr(e,t){var n,r,i;xr(e).tooltip({track:!0,content:(null===(n=t.value)||void 0===n?void 0:n.content)||Br,show:{delay:(null===(r=t.value)||void 0===r?void 0:r.delay)||700,duration:(null===(i=t.value)||void 0===i?void 0:i.duration)||200},hide:!1})}var Lr={mounted:function(e,t){setTimeout((function(){return Mr(e,t)}))},updated:function(e,t){setTimeout((function(){return Mr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}},Fr=Object(a["defineComponent"])({props:{},directives:{Tooltips:Lr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(a["computed"])((function(){return Or.isComparing()})),t=Object(a["computed"])((function(){return Or.getSegmentComparisons()})),n=Object(a["computed"])((function(){return Or.getPeriodComparisons()})),r=Or.getSeriesColor.bind(Or);function i(){var e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),Or.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Object.assign({},Ce.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Ce.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,Or.isComparing()){var t=Or.getPeriodComparisons(),n=Or.getSegmentComparisons();Xe.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Ce.getSearchParam("compareSegments"),comparePeriods:Ce.getSearchParam("comparePeriods"),compareDates:Ce.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=Or.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],a=Or.getComparisonSeriesIndex(t.index,n.index),o=e.reportData.comparisons[a],l=e.reportData.comparisons[n.index],c='<div class="comparison-card-tooltip">',s=(o.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),c+=C("General_ComparisonCardTooltip1",["'".concat(o.compareSegmentPretty,"'"),o.comparePeriodPretty,s,o.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(c+="<br/><br/>",c+=C("General_ComparisonCardTooltip2",[o.nb_visits_change.toString(),l.compareSegmentPretty,l.comparePeriodPretty])),c+="</div>",c}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Fr.render=Ar;var Rr=Fr; + */var xr=window,Br=xr.$;function Mr(){var e=Br(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))}function Lr(e,t){var n,r,i;Br(e).tooltip({track:!0,content:(null===(n=t.value)||void 0===n?void 0:n.content)||Mr,show:{delay:(null===(r=t.value)||void 0===r?void 0:r.delay)||700,duration:(null===(i=t.value)||void 0===i?void 0:i.duration)||200},hide:!1})}var Fr={mounted:function(e,t){setTimeout((function(){return Lr(e,t)}))},updated:function(e,t){setTimeout((function(){return Lr(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}},Rr=Object(a["defineComponent"])({props:{},directives:{Tooltips:Fr},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(a["computed"])((function(){return jr.isComparing()})),t=Object(a["computed"])((function(){return jr.getSegmentComparisons()})),n=Object(a["computed"])((function(){return jr.getPeriodComparisons()})),r=jr.getSeriesColor.bind(jr);function i(){var e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),jr.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Object.assign({},Ee.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Ee.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,jr.isComparing()){var t=jr.getPeriodComparisons(),n=jr.getSegmentComparisons();Ze.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Ee.getSearchParam("compareSegments"),comparePeriods:Ee.getSearchParam("comparePeriods"),compareDates:Ee.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=jr.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],a=jr.getComparisonSeriesIndex(t.index,n.index),o=e.reportData.comparisons[a],l=e.reportData.comparisons[n.index],c='<div class="comparison-card-tooltip">',s=(o.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),c+=C("General_ComparisonCardTooltip1",["'".concat(o.compareSegmentPretty,"'"),o.comparePeriodPretty,s,o.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(c+="<br/><br/>",c+=C("General_ComparisonCardTooltip2",[o.nb_visits_change.toString(),l.compareSegmentPretty,l.comparePeriodPretty])),c+="</div>",c}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Rr.render=Ir;var _r=Rr; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function _r(){return Or}window.angular.module("piwikApp.service").factory("piwikComparisonsService",_r);jt({component:Rr,directiveName:"piwikComparisons",restrict:"E"});var $r={ref:"root",class:"menuDropdown"},Hr=["title"],Ur=["innerHTML"],qr=Object(a["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Wr={class:"items"},Jr={key:0,class:"search"},Gr=["placeholder"],zr=["title"],Yr=["title"];function Qr(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$r,[Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,Ur),qr],8,Hr),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Wr,[e.showSearch&&e.showItems?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Jr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,Gr),[[a["vModelText"],e.searchTerm],[l,{},e.showItems]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,zr),[[a["vShow"],!e.searchTerm]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Yr),[[a["vShow"],e.searchTerm]])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(a["renderSlot"])(e.$slots,"default")])],512),[[a["vShow"],e.showItems]])],512)),[[c,{blur:e.lostFocus}]])}var Kr=window,Xr=Kr.$,Zr=Object(a["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:xt,FocusIf:Lt},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Xr(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Xr(this.$refs.root).find(".item").each((function(e,n){var r=Xr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});Zr.render=Qr;var ei=Zr,ti=(jt({component:ei,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); + */function $r(){return jr}window.angular.module("piwikApp.service").factory("piwikComparisonsService",$r);kt({component:_r,directiveName:"piwikComparisons",restrict:"E"});var Hr={ref:"root",class:"menuDropdown"},Ur=["title"],qr=["innerHTML"],Wr=Object(a["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),Jr={class:"items"},Gr={key:0,class:"search"},zr=["placeholder"],Yr=["title"],Qr=["title"];function Kr(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Hr,[Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,qr),Wr],8,Ur),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Jr,[e.showSearch&&e.showItems?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,zr),[[a["vModelText"],e.searchTerm],[l,{},e.showItems]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,Yr),[[a["vShow"],!e.searchTerm]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,Qr),[[a["vShow"],e.searchTerm]])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(a["renderSlot"])(e.$slots,"default")])],512),[[a["vShow"],e.showItems]])],512)),[[c,{blur:e.lostFocus}]])}var Xr=window,Zr=Xr.$,ei=Object(a["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(this.menuTitleChangeOnClick&&(this.actualMenuTitle=(e.target.textContent||"").replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Zr(this.$slots.default()[0].el).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Zr(this.$refs.root).find(".item").each((function(e,n){var r=Zr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});ei.render=Kr;var ti=ei,ni=(kt({component:ti,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ni(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ti,null,512)}var ri=1,ii=window,ai=ii.$,oi=Object(a["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(a["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var i=r.length?r:t;i.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function i(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return o(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function o(e,t,n){var r,a=e.parent(),o=a.children("td");if(a.is(":first-child")){var l=a.children("td:not(.ui-datepicker-other-month)").first();return r=i(l,t,n),r.setDate(o.index(e)-o.index(l)+1),r}var c=a.children("td:not(.ui-datepicker-other-month)").last();return r=i(c,t,n),r.setDate(r.getDate()+o.index(e)-o.index(c)),r}function l(){var e=ai(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),i=parseInt(t.attr("data-year"),10);return[r,i]}function c(){var e=ai(n.value),t=e.find(".ui-datepicker-calendar"),a=l(),o=t.find("td"),c=o.first(),s=i(c,a[0],a[1]);o.each((function(){r(ai(this),s),s.setDate(s.getDate()+1)}))}function s(){if(!e.viewDate)return!1;var t;if("string"===typeof e.viewDate)try{t=P(e.viewDate)}catch(a){return!1}else t=e.viewDate;var r=ai(n.value),i=l();return(i[0]!==t.getMonth()||i[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=ai(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=ai(n.value),r=e.stepMonths||ri;if(t.datepicker("option","stepMonths")===r)return!1;var i=ai(".ui-datepicker-month",t).val(),a=ai(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(a,i)),u(),!0}function p(){var t=ai(n.value),r=t.find(".ui-datepicker-month")[0];r&&(r.disabled=e.disableMonthDropdown)}function m(){if(ai(this).hasClass("ui-state-hover")){var e=ai(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function f(){p(),c()}return Object(a["watch"])((function(){return Object.assign({},e)}),(function(e,t){var n=!1;[function(e){return e.selectedDateStart},function(e){return e.selectedDateEnd},function(e){return e.highlightedDateStart},function(e){return e.highlightedDateEnd}].forEach((function(r){if(!n){var i=r(e),a=r(t);!i&&a&&(n=!0),i&&!a&&(n=!0),i&&a&&i.getTime()!==a.getTime()&&(n=!0)}})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.disableMonthDropdown!==t.disableMonthDropdown&&p(),n&&c()})),Object(a["onMounted"])((function(){var r=ai(n.value),a=e.options||{},o=Object.assign(Object.assign(Object.assign({},S.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(o),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&c()})),r.on("mouseenter","tbody td",(function(){var e=l(),n=ai(this),r=i(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){c()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",m),r.on("click",(function(e){e.preventDefault();var t=ai(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&f()})),r.on("click","td[data-month]",(function(e){var n=ai(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),i=parseInt(n.attr("data-year"),10),a=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(i,r,a)})}));var h=d();s(),p(),h||u(),c()})),{root:n}}});oi.render=ni;var li=oi,ci=(jt({component:li,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,i,a,o){o()},"cell-hover-leave":function(e,t,n,r,i,a,o){o()},"date-select":function(e,t,n,r,i,a,o){o()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),si={id:"calendarRangeTo"}; + */function ri(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ni,null,512)}var ii=1,ai=window,oi=ai.$,li=Object(a["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(a["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var i=r.length?r:t;i.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function i(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return o(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function o(e,t,n){var r,a=e.parent(),o=a.children("td");if(a.is(":first-child")){var l=a.children("td:not(.ui-datepicker-other-month)").first();return r=i(l,t,n),r.setDate(o.index(e)-o.index(l)+1),r}var c=a.children("td:not(.ui-datepicker-other-month)").last();return r=i(c,t,n),r.setDate(r.getDate()+o.index(e)-o.index(c)),r}function l(){var e=oi(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),i=parseInt(t.attr("data-year"),10);return[r,i]}function c(){var e=oi(n.value),t=e.find(".ui-datepicker-calendar"),a=l(),o=t.find("td"),c=o.first(),s=i(c,a[0],a[1]);o.each((function(){r(oi(this),s),s.setDate(s.getDate()+1)}))}function s(){if(!e.viewDate)return!1;var t;if("string"===typeof e.viewDate)try{t=V(e.viewDate)}catch(a){return!1}else t=e.viewDate;var r=oi(n.value),i=l();return(i[0]!==t.getMonth()||i[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=oi(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=oi(n.value),r=e.stepMonths||ii;if(t.datepicker("option","stepMonths")===r)return!1;var i=oi(".ui-datepicker-month",t).val(),a=oi(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(a,i)),u(),!0}function p(){var t=oi(n.value),r=t.find(".ui-datepicker-month")[0];r&&(r.disabled=e.disableMonthDropdown)}function m(){if(oi(this).hasClass("ui-state-hover")){var e=oi(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function f(){p(),c()}return Object(a["watch"])((function(){return Object.assign({},e)}),(function(e,t){var n=!1;[function(e){return e.selectedDateStart},function(e){return e.selectedDateEnd},function(e){return e.highlightedDateStart},function(e){return e.highlightedDateEnd}].forEach((function(r){if(!n){var i=r(e),a=r(t);!i&&a&&(n=!0),i&&!a&&(n=!0),i&&a&&i.getTime()!==a.getTime()&&(n=!0)}})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.disableMonthDropdown!==t.disableMonthDropdown&&p(),n&&c()})),Object(a["onMounted"])((function(){var r=oi(n.value),a=e.options||{},o=Object.assign(Object.assign(Object.assign({},S.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(o),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&c()})),r.on("mouseenter","tbody td",(function(){var e=l(),n=oi(this),r=i(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){c()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",m),r.on("click",(function(e){e.preventDefault();var t=oi(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&f()})),r.on("click","td[data-month]",(function(e){var n=oi(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),i=parseInt(n.attr("data-year"),10),a=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(i,r,a)})}));var h=d();s(),p(),h||u(),c()})),{root:n}}});li.render=ri;var ci=li,si=(kt({component:ci,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,i,a,o){o()},"cell-hover-leave":function(e,t,n,r,i,a,o){o()},"date-select":function(e,t,n,r,i,a,o){o()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),ui={id:"calendarRangeTo"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ui(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createElementVNode"])("div",ci,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onKeydown:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.startDateText]])]),Object(a["createVNode"])(l,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(a["createElementVNode"])("div",si,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onKeydown:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.endDateText]])]),Object(a["createVNode"])(l,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])])}var di="YYYY-MM-DD",pi=Object(a["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:li},data:function(){var e=null;try{this.startDate&&(e=P(this.startDate))}catch(n){}var t=null;try{this.endDate&&(t=P(this.endDate))}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.setEndRangeDateFromStr(t.target.value)}))},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){this.startDateInvalid=!0;var t=null;try{e&&e.length===di.length&&(t=P(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){this.endDateInvalid=!0;var t=null;try{e&&e.length===di.length&&(t=P(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:this.fromPickerSelectedDates[0]?E(this.fromPickerSelectedDates[0]):null,end:this.toPickerSelectedDates[0]?E(this.toPickerSelectedDates[0]):null})}}});pi.render=ui;var mi=pi; + */function di(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createElementVNode"])("div",si,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onKeydown:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.startDateText]])]),Object(a["createVNode"])(l,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(a["createElementVNode"])("div",ui,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onKeydown:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.endDateText]])]),Object(a["createVNode"])(l,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])])}var pi="YYYY-MM-DD",mi=Object(a["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:ci},data:function(){var e=null;try{this.startDate&&(e=V(this.startDate))}catch(n){}var t=null;try{this.endDate&&(t=V(this.endDate))}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.setEndRangeDateFromStr(t.target.value)}))},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){this.startDateInvalid=!0;var t=null;try{e&&e.length===pi.length&&(t=V(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){this.endDateInvalid=!0;var t=null;try{e&&e.length===pi.length&&(t=V(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:this.fromPickerSelectedDates[0]?D(this.fromPickerSelectedDates[0]):null,end:this.toPickerSelectedDates[0]?D(this.toPickerSelectedDates[0]):null})}}});mi.render=di;var fi=mi; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:mi,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function fi(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var hi=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),gi=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),vi=Object(a["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date]},components:{DatePicker:li},emits:["select"],setup:function(e,t){var n=Object(a["ref"])(e.date),r=Object(a["ref"])([null,null]),i=Object(a["ref"])([null,null]);function o(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=hi<n[0]?n[0]:hi,n[1]=gi>n[1]?n[1]:gi,n}function l(t,n){var r=t<hi||t>gi,a=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);i.value=r||a?[null,null]:o(t)}function c(){i.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=o(e.date),n.value=P(e.date)}return Object(a["watch"])(e,u),u(),{selectedDates:r,highlightedDates:i,viewDate:n,onHoverNormalCell:l,onHoverLeaveNormalCells:c,onDateSelected:s}}});vi.render=fi;var bi=vi,yi=(jt({component:bi,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),wi=["title"],Oi=["textContent"],ji={key:1,class:"placeholder"},ki={class:"dropdown"},Si={class:"custom_select_search"},Ci=["placeholder"],Ei={key:0},Di={class:"custom_select_container"},Pi=["onClick"],Vi=["innerHTML","href","title"],Ni={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},Ti={class:"ui-menu-item"},Ai={class:"ui-corner-all",tabindex:"-1"},Ii={key:1}; + */kt({component:fi,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function hi(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var gi=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),vi=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),bi=Object(a["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date]},components:{DatePicker:ci},emits:["select"],setup:function(e,t){var n=Object(a["ref"])(e.date),r=Object(a["ref"])([null,null]),i=Object(a["ref"])([null,null]);function o(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=gi<n[0]?n[0]:gi,n[1]=vi>n[1]?n[1]:vi,n}function l(t,n){var r=t<gi||t>vi,a=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);i.value=r||a?[null,null]:o(t)}function c(){i.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=o(e.date),n.value=V(e.date)}return Object(a["watch"])(e,u),u(),{selectedDates:r,highlightedDates:i,viewDate:n,onHoverNormalCell:l,onHoverLeaveNormalCells:c,onDateSelected:s}}});bi.render=hi;var yi=bi,wi=(kt({component:yi,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),Oi=["title"],ji=["textContent"],ki={key:1,class:"placeholder"},Si={class:"dropdown"},Ci={class:"custom_select_search"},Ei=["placeholder"],Di={key:0},Pi={class:"custom_select_container"},Vi=["onClick"],Ni=["innerHTML","href","title"],Ti={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},Ai={class:"ui-menu-item"},Ii={class:"ui-corner-all",tabindex:"-1"},xi={key:1}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function xi(e,t,n,r,i,o){var l,c,s,u,d=Object(a["resolveComponent"])("AllSitesLink"),p=Object(a["resolveDirective"])("focus-if"),m=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{key:0,type:"hidden",value:null===(l=e.modelValue)||void 0===l?void 0:l.id,name:e.name},null,8,yi)):Object(a["createCommentVNode"])("",!0),Object(a["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(a["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(a["createElementVNode"])("span",null,[null!==(c=e.modelValue)&&void 0!==c&&c.name||!e.placeholder?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,textContent:Object(a["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,Oi)):Object(a["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ji,Object(a["toDisplayString"])(e.placeholder),1))])],42,wi),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",ki,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Si,[Object(a["withDirectives"])(Object(a["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,Ci),[[a["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(a["withDirectives"])(Object(a["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),[[a["vShow"],e.searchTerm]])],512),[[a["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ei,[Object(a["createVNode"])(d,{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(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Di,[Object(a["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(n,r){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(a["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,Vi)],8,Pi)),[[a["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ni,[Object(a["createElementVNode"])("li",Ti,[Object(a["createElementVNode"])("a",Ai,Object(a["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[a["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ii,[Object(a["createVNode"])(d,{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(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var Bi=["innerHTML","href"];function Mi(e,t,n,r,i,o){var l=this;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return l.onClick(e)}),class:"custom_select_all"},[Object(a["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Bi)])}var Li=Object(a["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Li.render=Mi;var Fi=Li;function Ri(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $i(e,t,n){return t&&_i(e.prototype,t),n&&_i(e,n),e}function Hi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Bi(e,t,n,r,i,o){var l,c,s,u,d=Object(a["resolveComponent"])("AllSitesLink"),p=Object(a["resolveDirective"])("focus-if"),m=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{key:0,type:"hidden",value:null===(l=e.modelValue)||void 0===l?void 0:l.id,name:e.name},null,8,wi)):Object(a["createCommentVNode"])("",!0),Object(a["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(a["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(a["createElementVNode"])("span",null,[null!==(c=e.modelValue)&&void 0!==c&&c.name||!e.placeholder?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,textContent:Object(a["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,ji)):Object(a["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",ki,Object(a["toDisplayString"])(e.placeholder),1))])],42,Oi),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Si,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ci,[Object(a["withDirectives"])(Object(a["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,Ei),[[a["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(a["withDirectives"])(Object(a["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),[[a["vShow"],e.searchTerm]])],512),[[a["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Di,[Object(a["createVNode"])(d,{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(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Pi,[Object(a["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(n,r){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{onClick:function(t){return e.switchSite(Object.assign(Object.assign({},n),{},{id:n.idsite}),t)},key:r},[Object(a["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,Ni)],8,Vi)),[[a["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ti,[Object(a["createElementVNode"])("li",Ai,[Object(a["createElementVNode"])("a",Ii,Object(a["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[a["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",xi,[Object(a["createVNode"])(d,{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(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showSitesList]])],2)),[[m,{blur:e.onBlur}]])}var Mi=["innerHTML","href"];function Li(e,t,n,r,i,o){var l=this;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return l.onClick(e)}),class:"custom_select_all"},[Object(a["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Mi)])}var Fi=Object(a["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});Fi.render=Li;var Ri=Fi;function _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hi(e,t,n){return t&&$i(e.prototype,t),n&&$i(e,n),e}function Ui(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Ui=function(){function e(){var t=this;Ri(this,e),Hi(this,"state",Object(a["reactive"])({initialSites:[],isInitialized:!1})),Hi(this,"currentRequestAbort",null),Hi(this,"limitRequest",void 0),Hi(this,"initialSites",Object(a["computed"])((function(){return Object(a["readonly"])(t.state.initialSites)})))}return $i(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(a["readonly"])(this.state.initialSites)):this.searchSite("%").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];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Xe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Xe.fetch({method:a,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{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:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),qi=new Ui,Wi=300;function Ji(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wi;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];t&&clearTimeout(t),t=setTimeout((function(){e.call.apply(e,[r].concat(a))}),n)}}var Gi=Object(a["defineComponent"])({props:{modelValue:{type:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},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:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:Fi},directives:{FocusAnywhereButHere:xt,FocusIf:Lt},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(S.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Ji(this.searchSite)},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.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?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return qi.initialSites.value&&qi.initialSites.value.length>1},firstSiteName:function(){var e=qi.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)}},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&&qi.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 S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return qi.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,qi.searchSite(e,this.onlySitesWithAdminAccess).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)}}});Gi.render=xi;var zi=Gi; + */var qi=function(){function e(){var t=this;_i(this,e),Ui(this,"state",Object(a["reactive"])({initialSites:[],isInitialized:!1})),Ui(this,"currentRequestAbort",null),Ui(this,"limitRequest",void 0),Ui(this,"initialSites",Object(a["computed"])((function(){return Object(a["readonly"])(t.state.initialSites)})))}return Hi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(a["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,null!==t&&(e.state.initialSites=t),t}))}},{key:"loadSite",value:function(e){"all"===e?Ee.updateUrl(Object.assign(Object.assign({},Ee.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ee.parsed.value.date,period:Ee.parsed.value.period})):Ee.updateUrl(Object.assign(Object.assign({},Ee.urlParsed.value),{},{segment:"",idSite:e}),Object.assign(Object.assign({},Ee.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Ze.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Ze.fetch({method:a,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{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:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),Wi=new qi,Ji=300;function Gi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ji;return function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];t&&clearTimeout(t),t=setTimeout((function(){e.call.apply(e,[r].concat(a))}),n)}}var zi=Object(a["defineComponent"])({props:{modelValue:{type:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},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:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:Ri},directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:"".concat(S.idSite),showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},created:function(){this.searchSite=Gi(this.searchSite)},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.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?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return Wi.initialSites.value&&Wi.initialSites.value.length>1},firstSiteName:function(){var e=Wi.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Ee.stringify(Object.assign(Object.assign({},Ee.urlParsed.value),{},{module:"MultiSites",action:"index",date:Ee.parsed.value.date,period:Ee.parsed.value.period}));return"?".concat(e)}},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&&Wi.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 S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return Wi.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,Wi.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Ee.stringify(Object.assign(Object.assign({},Ee.urlParsed.value),{},{segment:"",idSite:e})),n=Ee.stringify(Object.assign(Object.assign({},Ee.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});zi.render=Bi;var Yi=zi; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:zi,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,i,a,o){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&o((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),a&&(a.$setViewValue(e),a.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var o=i;t.$watch("value",(function(t){Object(a["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),o&&(o.$setViewValue(e.modelValue),o.$render=function(){Object(a["nextTick"])((function(){Object(a["nextTick"])((function(){window.angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue}))}))})}}); + */kt({component:Yi,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,i,a,o){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&o((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),a&&(a.$setViewValue(e),a.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var o=i;t.$watch("value",(function(t){Object(a["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),o&&(o.$setViewValue(e.modelValue),o.$render=function(){Object(a["nextTick"])((function(){Object(a["nextTick"])((function(){window.angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue}))}))})}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Yi(){return{get initialSites(){return qi.initialSites.value},loadSite:qi.loadSite.bind(qi),loadInitialSites:function(){return Et(qi.loadInitialSites())},searchSite:function(){return Et(qi.searchSite.apply(qi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Yi);var Qi={ref:"root",class:"quickAccessInside"},Ki=["title","placeholder"],Xi={class:"dropdown"},Zi={class:"no-result"},ea=["onClick"],ta=["onMouseenter","onClick"],na={class:"quickAccessMatomoSearch"},ra=["onMouseenter","onClick"],ia=["textContent"],aa={class:"quick-access-category helpCategory"},oa=["href"];function la(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qi,[Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(a["withDirectives"])(Object(a["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,Ki),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Xi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",Zi,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ea),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,ta)})),128))])})),128)),Object(a["createElementVNode"])("ul",na,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,ia)],42,ra)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",aa,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["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(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,oa)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function ca(e){var t=e.getBoundingClientRect(),n=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=n.height()&&t.right<=n.width()}function sa(e){e&&e.scrollIntoView&&e.scrollIntoView()}var ua=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:xt,FocusIf:Lt},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(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),sa(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=Ji(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,i=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||i&&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&&!ca(e)&&sa(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,i={},a=[],o=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,qi.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(o),s.forEach(o),u.forEach(o),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){qi.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=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i,a,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o||(o=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.trim());o&&(n.push({name:o,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,i=window.$(n).find("> .item"),a=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.substr(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&(t.push({name:o,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=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i,a,o=null===(i=r.querySelector(".segname"))||void 0===i||null===(a=i.textContent)||void 0===a?void 0:a.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});ua.render=la;var da=ua; +function Qi(){return{get initialSites(){return Wi.initialSites.value},loadSite:Wi.loadSite.bind(Wi),loadInitialSites:function(){return Dt(Wi.loadInitialSites())},searchSite:function(){return Dt(Wi.searchSite.apply(Wi,arguments))}}}window.angular.module("piwikApp.service").factory("siteSelectorModel",Qi);var Ki={ref:"root",class:"quickAccessInside"},Xi=["title","placeholder"],Zi={class:"dropdown"},ea={class:"no-result"},ta=["onClick"],na=["onMouseenter","onClick"],ra={class:"quickAccessMatomoSearch"},ia=["onMouseenter","onClick"],aa=["textContent"],oa={class:"quick-access-category helpCategory"},la=["href"];function ca(e,t,n,r,i,o){var l=Object(a["resolveDirective"])("focus-if"),c=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ki,[Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,32),Object(a["withDirectives"])(Object(a["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,Xi),[[a["vModelText"],e.searchTerm],[l,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Zi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",ea,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ta),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,na)})),128))])})),128)),Object(a["createElementVNode"])("ul",ra,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["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(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,aa)],42,ia)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",oa,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["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(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,la)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[c,{blur:e.onBlur}]])}function sa(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 da=Object(a["defineComponent"])({directives:{FocusAnywhereButHere:Bt,FocusIf:Ft},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(),S.helper.registerShortcut("f",C("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=Gi(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,i=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||i&&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&&!sa(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,i={},a=[],o=function(e){var t=Object.assign({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Wi.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(o),s.forEach(o),u.forEach(o),this.numMenuItems=c.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){Wi.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=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i,a,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o||(o=null===(a=r.getAttribute("title"))||void 0===a?void 0:a.trim());o&&(n.push({name:o,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,i=window.$(n).find("> .item"),a=(null===(r=i[0])||void 0===r?void 0:r.innerText.trim())||"";a&&-1!==a.lastIndexOf("\n")&&(a=a.substr(0,a.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,r){var i,o=null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&(t.push({name:o,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=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i,a,o=null===(i=r.querySelector(".segname"))||void 0===i||null===(a=i.textContent)||void 0===a?void 0:a.trim();o&&(n.push({name:o,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});da.render=ca;var pa=da; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:da,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,a,o){o()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ma={class:"fieldArray form-group"},fa={key:0,class:"fieldUiControl"},ha=["onClick","title"];function ga(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ma,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",pa({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fa,[Object(a["createVNode"])(l,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},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","uicontrol","title","name","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ha),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function va(e){return Oa(e)||wa(e)||ya(e)||ba()}function ba(){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 ya(e,t){if(e){if("string"===typeof e)return ja(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)?ja(e,t):void 0}}function wa(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Oa(e){if(Array.isArray(e))return ja(e)}function ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ka=_n("CorePluginsAdmin","Field"),Sa=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:ka},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&""===e.slice(-1)[0]||this.$emit("update:modelValue",[].concat(va(e||[]),[""]))},onEntryChange:function(e,t){var n=va(this.modelValue||[]);n[t]=e,this.$emit("update:modelValue",n)},removeEntry:function(e){if(e>-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});Sa.render=ga;var Ca=Sa; + */kt({component:pa,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,a,o){o()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fa={class:"fieldArray form-group"},ha={key:0,class:"fieldUiControl"},ga=["onClick","title"];function va(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",ma({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ha,[Object(a["createVNode"])(l,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},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","uicontrol","title","name","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ga),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function ba(e){return ja(e)||Oa(e)||wa(e)||ya()}function ya(){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 wa(e,t){if(e){if("string"===typeof e)return ka(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)?ka(e,t):void 0}}function Oa(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ja(e){if(Array.isArray(e))return ka(e)}function ka(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Sa=$n("CorePluginsAdmin","Field"),Ca=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:Sa},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&""===e.slice(-1)[0]||this.$emit("update:modelValue",[].concat(ba(e||[]),[""]))},onEntryChange:function(e,t){var n=ba(this.modelValue||[]);n[t]=e,this.$emit("update:modelValue",n)},removeEntry:function(e){if(e>-1&&this.modelValue){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});Ca.render=va;var Ea=Ca; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:Ca,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Da={class:"multiPairField form-group"},Pa={key:1,class:"fieldUiControl fieldUiControl2"},Va={key:2,class:"fieldUiControl fieldUiControl3"},Na={key:3,class:"fieldUiControl fieldUiControl4"},Ta=["onClick","title"];function Aa(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Da,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Ea(r,"multiPairFieldTable".concat(n),!0),Ea(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(l,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,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,["modelValue","onUpdate:modelValue","options","uicontrol","name","title","template-file","component"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Pa,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],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","modelValue","uicontrol","name","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Va,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Na,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Ta),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Ia(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e){return Fa(e)||La(e)||Ma(e)||Ba()}function Ba(){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 Ma(e,t){if(e){if("string"===typeof e)return Ra(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)?Ra(e,t):void 0}}function La(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Fa(e){if(Array.isArray(e))return Ra(e)}function Ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _a=_n("CorePluginsAdmin","Field"),$a=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:_a},computed:{fieldCount:function(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(xa(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=xa(this.modelValue);r[e]=Object.assign(Object.assign({},r[e]),{},Ia({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-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}}});$a.render=Aa;var Ha=$a,Ua=(jt({component:Ha,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),qa=["title"],Wa=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ja={id:"periodMore",class:"dropdown"},Ga={class:"flex"},za={key:0,class:"period-date"},Ya={class:"period-type"},Qa={id:"otherPeriods"},Ka=["onDblclick","title"],Xa=["id","checked","onChange","onDblclick"],Za={key:0,class:"compare-checkbox"},eo={id:"comparePeriodToDropdown"},to={key:1,class:"compare-date-range"},no={id:"comparePeriodStartDate"},ro=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),io={id:"comparePeriodEndDate"},ao={class:"apply-button-container"},oo=["disabled","value"],lo={key:2,id:"ajaxLoadingCalendar"},co={class:"loadingSegment"}; + */kt({component:Ea,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pa={class:"multiPairField form-group"},Va={key:1,class:"fieldUiControl fieldUiControl2"},Na={key:2,class:"fieldUiControl fieldUiControl3"},Ta={key:3,class:"fieldUiControl fieldUiControl4"},Aa=["onClick","title"];function Ia(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Pa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Da(r,"multiPairFieldTable".concat(n),!0),Da(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(l,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,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,["modelValue","onUpdate:modelValue","options","uicontrol","name","title","template-file","component"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Va,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],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","modelValue","uicontrol","name","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Na,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title,"template-file":e.field3.templateFile,component:e.field3.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ta,[Object(a["createVNode"])(l,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title,"template-file":e.field4.templateFile,component:e.field4.component},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title","template-file","component"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Aa),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function xa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e){return Ra(e)||Fa(e)||La(e)||Ma()}function Ma(){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 La(e,t){if(e){if("string"===typeof e)return _a(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)?_a(e,t):void 0}}function Fa(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ra(e){if(Array.isArray(e))return _a(e)}function _a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $a=$n("CorePluginsAdmin","Field"),Ha=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:$a},computed:{fieldCount:function(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(Ba(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=Ba(this.modelValue);r[e]=Object.assign(Object.assign({},r[e]),{},xa({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-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}}});Ha.render=Ia;var Ua=Ha,qa=(kt({component:Ua,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){window.angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),Wa=["title"],Ja=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Ga={id:"periodMore",class:"dropdown"},za={class:"flex"},Ya={key:0,class:"period-date"},Qa={class:"period-type"},Ka={id:"otherPeriods"},Xa=["onDblclick","title"],Za=["id","checked","onChange","onDblclick"],eo={key:0,class:"compare-checkbox"},to={id:"comparePeriodToDropdown"},no={key:1,class:"compare-date-range"},ro={id:"comparePeriodStartDate"},io=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),ao={id:"comparePeriodEndDate"},oo={class:"apply-button-container"},lo=["disabled","value"],co={key:2,id:"ajaxLoadingCalendar"},so={class:"loadingSegment"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function so(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DateRangePicker"),c=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ua,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Wa,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,qa),Object(a["createElementVNode"])("div",Ja,[Object(a["createElementVNode"])("div",Ga,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{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"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",za,[Object(a["createVNode"])(c,{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(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Ya,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",Qa,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["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,Xa),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Ka)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Za,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",eo,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["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(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",to,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",no,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{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"])])]),ro,Object(a["createElementVNode"])("div",io,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{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(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",ao,[Object(a["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,oo)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",lo,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",co,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var uo={class:"loadingPiwik"},po=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function mo(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",uo,[po,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var fo=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});fo.render=mo;var ho=fo;function go(e,t){return Oo(e)||wo(e,t)||bo(e,t)||vo()}function vo(){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 bo(e,t){if(e){if("string"===typeof e)return yo(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)?yo(e,t):void 0}}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wo(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Oo(e){if(Array.isArray(e))return e}var jo=_n("CorePluginsAdmin","Field"),ko=S.helper.htmlDecode(" "),So=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,ko)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,ko)}],Co=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),Eo=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function Do(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var Po=Object(a["defineComponent"])({props:{periods:Array},components:{DateRangePicker:mi,PeriodDatePicker:bi,Field:jo,ActivityIndicator:ho},directives:{ExpandOnClick:Yt},data:function(){var e=Ce.parsed.value.period;return{comparePeriodDropdownOptions:So,periodValue:e,dateValue:null,selectedPeriod:e,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(a["watch"])((function(){return Ce.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=Or.isComparingPeriods(),Object(a["watch"])((function(){return Or.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=E(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return Or.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):E(this.dateValue),t=p.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],compareDates:["".concat(E(t[0]),",").concat(E(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[E(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=P(this.startRangeDate),t=P(this.endRangeDate),n=_.getLastNRange("day",2,e).startDate,r=Math.floor((t.valueOf()-e.valueOf())/864e5),i=_.getLastNRange("day",1+r,n);return"".concat(E(i.startDate),",").concat(E(i.endDate))}var a=_.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return E(a)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=P(e),r=P(t);return!Do(n)||!Do(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return E(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=E(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Ce.hashParsed.value):(this.isLoadingNewPage=!0,n=Ce.parsed.value);var i=Object.assign({},n);delete i.comparePeriods,delete i.compareDates,Ce.updateLocation(Object.assign(Object.assign({},i),{},{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{p.parse(t,e)}catch(l){return}if("range"===t){var n=p.get(t).parse(e),r=n.getDateRange(),i=go(r,2),a=i[0],o=i[1];this.dateValue=a,this.startRangeDate=E(a),this.endRangeDate=E(o)}else this.dateValue=P(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=E(n[0]<Co?Co:n[0]),this.endRangeDate=E(n[1]>Eo?Eo:n[1])},getPeriodDisplayText:function(e){return p.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{P(this.compareStartDate)}catch(e){return!1}try{P(this.compareEndDate)}catch(e){return!1}return!0}}});Po.render=so;var Vo=Po,No=(jt({component:Vo,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),To=["aria-label"],Ao=["onClick"],Io={class:"hidden"},xo={role:"menu"},Bo=["href","onClick","title"],Mo=["href","onClick"],Lo=["onClick"],Fo=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Ro=[Fo],_o={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},$o={class:"collapsible collapsible-accordion"},Ho={class:"collapsible-header"},Uo={class:"collapsible-body"},qo={key:0},Wo=["onClick","href"],Jo={key:1},Go=["onClick","href"]; + */function uo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("DateRangePicker"),c=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",qa,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[Ja,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,Wa),Object(a["createElementVNode"])("div",Ga,[Object(a["createElementVNode"])("div",za,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{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"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ya,[Object(a["createVNode"])(c,{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(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",Qa,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",Ka,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["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,Za),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Xa)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",eo,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",to,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["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(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",no,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",ro,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{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"])])]),io,Object(a["createElementVNode"])("div",ao,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{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(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",oo,[Object(a["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,lo)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",co,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",so,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var po={class:"loadingPiwik"},mo=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function fo(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",po,[mo,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var ho=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});ho.render=fo;var go=ho;function vo(e,t){return jo(e)||Oo(e,t)||yo(e,t)||bo()}function bo(){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 yo(e,t){if(e){if("string"===typeof e)return wo(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)?wo(e,t):void 0}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oo(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function jo(e){if(Array.isArray(e))return e}var ko=$n("CorePluginsAdmin","Field"),So=S.helper.htmlDecode(" "),Co=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,So)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,So)}],Eo=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),Do=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function Po(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var Vo=Object(a["defineComponent"])({props:{periods:Array},components:{DateRangePicker:fi,PeriodDatePicker:yi,Field:ko,ActivityIndicator:go},directives:{ExpandOnClick:Qt},data:function(){var e=Ee.parsed.value.period;return{comparePeriodDropdownOptions:Co,periodValue:e,dateValue:null,selectedPeriod:e,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(a["watch"])((function(){return Ee.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=jr.isComparingPeriods(),Object(a["watch"])((function(){return jr.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=D(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return jr.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):D(this.dateValue),t=p.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],compareDates:["".concat(D(t[0]),",").concat(D(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[D(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=V(this.startRangeDate),t=V(this.endRangeDate),n=H.getLastNRange("day",2,e).startDate,r=Math.floor((t.valueOf()-e.valueOf())/864e5),i=H.getLastNRange("day",1+r,n);return"".concat(D(i.startDate),",").concat(D(i.endDate))}var a=H.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return D(a)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=V(e),r=V(t);return!Po(n)||!Po(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return D(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=D(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Ee.hashParsed.value):(this.isLoadingNewPage=!0,n=Ee.parsed.value);var i=Object.assign({},n);delete i.comparePeriods,delete i.compareDates,Ee.updateLocation(Object.assign(Object.assign({},i),{},{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=Ee.parsed.value.date,t=Ee.parsed.value.period;this.periodValue=t,this.selectedPeriod=t,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(t,e)}catch(l){return}if("range"===t){var n=p.get(t).parse(e),r=n.getDateRange(),i=vo(r,2),a=i[0],o=i[1];this.dateValue=a,this.startRangeDate=D(a),this.endRangeDate=D(o)}else this.dateValue=V(e),this.setRangeStartEndFromPeriod(t,e)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=D(n[0]<Eo?Eo:n[0]),this.endRangeDate=D(n[1]>Do?Do:n[1])},getPeriodDisplayText:function(e){return p.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{V(this.compareStartDate)}catch(e){return!1}try{V(this.compareEndDate)}catch(e){return!1}return!0}}});Vo.render=uo;var No=Vo,To=(kt({component:No,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),Ao=["aria-label"],Io=["onClick"],xo={class:"hidden"},Bo={role:"menu"},Mo=["href","onClick","title"],Lo=["href","onClick"],Fo=["onClick"],Ro=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),_o=[Ro],$o={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Ho={class:"collapsible collapsible-accordion"},Uo={class:"collapsible-header"},qo={class:"collapsible-body"},Wo={key:0},Jo=["onClick","href"],Go={key:1},zo=["onClick","href"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function zo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("MenuDropdown"),c=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",No,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",Io,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,Ao),Object(a["createElementVNode"])("ul",xo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["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(a["toDisplayString"])(r.name),11,Bo)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,Mo)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["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)}},Ro,10,Lo)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,To),Object(a["createElementVNode"])("ul",_o,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",$o,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",Ho,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",Uo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",qo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,Wo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Jo,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,Go)]))])})),128))])])])],512),[[c,{activator:e.sideNavActivator}]])])})),128))])])}var Yo={key:0},Qo=["data-notification-instance-id"],Ko={key:1},Xo={class:"notification-body"},Zo=["innerHTML"],el={key:1};function tl(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Yo,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Ko,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Xo,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,Zo)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",el,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Qo)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var nl=window,rl=nl.$,il=Object(a["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&rl(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Xe.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});il.render=tl;var al=il; + */function Yo(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("MenuDropdown"),c=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",To,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",xo,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,Io),Object(a["createElementVNode"])("ul",Bo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["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(a["toDisplayString"])(r.name),11,Mo)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,Lo)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["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)}},_o,10,Fo)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,Ao),Object(a["createElementVNode"])("ul",$o,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Ho,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",Uo,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",qo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Wo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,Jo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Go,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,zo)]))])})),128))])])])],512),[[c,{activator:e.sideNavActivator}]])])})),128))])])}var Qo={key:0},Ko=["data-notification-instance-id"],Xo={key:1},Zo={class:"notification-body"},el=["innerHTML"],tl={key:1};function nl(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qo,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Xo,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Zo,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,el)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",tl,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Ko)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var rl=window,il=rl.$,al=Object(a["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&il(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Ze.post({module:"CoreHome",action:"markNotificationAsRead"},{notificationId:this.notificationId},{withTokenInUrl:!0})}}});al.render=nl;var ol=al; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:al,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:kt},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});function ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cl(e,t,n){return t&&ll(e.prototype,t),n&&ll(e,n),e}function sl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */kt({component:ol,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:St},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});function ll(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sl(e,t,n){return t&&cl(e.prototype,t),n&&cl(e,n),e}function ul(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var ul=window,dl=ul.$,pl=function(){function e(){ol(this,e),sl(this,"privateState",Object(a["reactive"])({notifications:[]})),sl(this,"nextNotificationId",0)}return cl(e,[{key:"state",get:function(){return Object(a["readonly"])(this.privateState)}},{key:"appendNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}},{key:"prependNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}},{key:"remove",value:function(e){this.privateState.notifications=this.privateState.notifications.filter((function(t){return t.id!==e}))}},{key:"parseNotificationDivs",value:function(){var e=this,t=dl('[data-role="notification"]'),n=[];t.each((function(e,r){var i=dl(r),a=i.data(),o=i.html();o&&n.push(Object.assign(Object.assign({},a),{},{message:o,animate:!1})),t.remove()})),n.forEach((function(t){return e.show(t)}))}},{key:"clearTransientNotifications",value:function(){this.privateState.notifications=this.privateState.notifications.filter((function(e){return"transient"!==e.type}))}},{key:"show",value:function(e){this.checkMessage(e.message);var t=e.prepend?this.prependNotification:this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content",i=document.querySelector(r);i&&(i.querySelector("#modalNotificationContainer")||dl(i).prepend('<div id="modalNotificationContainer"/>'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var a=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,a);var o=(this.nextNotificationId+=1).toString();return t.call(this,Object.assign(Object.assign({},e),{},{noclear:!!e.noclear,group:a,notificationId:e.id,notificationInstanceId:o,type:e.type||"transient"})),o}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=e.placeat?dl(e.placeat):void 0;if(!t||!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");var n=document.createElement("div");n.style.position="absolute",n.style.top="".concat(t.offset().top,"px"),n.style.left="".concat(t.offset().left,"px"),n.style.zIndex="1000",document.body.appendChild(n);var r=ut({render:function(){return Object(a["createVNode"])(al,Object.assign(Object.assign({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){if(e){var n=dl(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,i=ut({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});i.component("NotificationGroup",r),i.mount(n[0])}}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),ml=new pl,fl=ml;dl((function(){return ml.parseNotificationDivs()})), + */var dl=window,pl=dl.$,ml=function(){function e(){ll(this,e),ul(this,"privateState",Object(a["reactive"])({notifications:[]})),ul(this,"nextNotificationId",0)}return sl(e,[{key:"state",get:function(){return Object(a["readonly"])(this.privateState)}},{key:"appendNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}},{key:"prependNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}},{key:"remove",value:function(e){this.privateState.notifications=this.privateState.notifications.filter((function(t){return t.id!==e}))}},{key:"parseNotificationDivs",value:function(){var e=this,t=pl('[data-role="notification"]'),n=[];t.each((function(e,r){var i=pl(r),a=i.data(),o=i.html();o&&n.push(Object.assign(Object.assign({},a),{},{message:o,animate:!1})),t.remove()})),n.forEach((function(t){return e.show(t)}))}},{key:"clearTransientNotifications",value:function(){this.privateState.notifications=this.privateState.notifications.filter((function(e){return"transient"!==e.type}))}},{key:"show",value:function(e){this.checkMessage(e.message);var t=e.prepend?this.prependNotification:this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content",i=document.querySelector(r);i&&(i.querySelector("#modalNotificationContainer")||pl(i).prepend('<div id="modalNotificationContainer"/>'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var a=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,a);var o=(this.nextNotificationId+=1).toString();return t.call(this,Object.assign(Object.assign({},e),{},{noclear:!!e.noclear,group:a,notificationId:e.id,notificationInstanceId:o,type:e.type||"transient"})),o}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=e.placeat?pl(e.placeat):void 0;if(!t||!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");var n=document.createElement("div");n.style.position="absolute",n.style.top="".concat(t.offset().top,"px"),n.style.left="".concat(t.offset().left,"px"),n.style.zIndex="1000",document.body.appendChild(n);var r=dt({render:function(){return Object(a["createVNode"])(ol,Object.assign(Object.assign({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){if(e){var n=pl(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,i=dt({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});i.component("NotificationGroup",r),i.mount(n[0])}}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),fl=new ml,hl=fl;pl((function(){return fl.parseNotificationDivs()})), /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -window.angular.module("piwikApp").factory("notifications",(function(){return fl}));var hl={class:"notification-group"},gl=["innerHTML"];function vl(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Notification");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hl,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.notifications,(function(t,n){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.id||"no-id-".concat(n),"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(a["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:function(n){return e.removeNotification(t.id)}},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,gl)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var bl=Object(a["defineComponent"])({props:{group:String},components:{Notification:al},computed:{notifications:function(){var e=this;return fl.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){fl.remove(e)}}});bl.render=vl;var yl=bl; +window.angular.module("piwikApp").factory("notifications",(function(){return hl}));var gl={class:"notification-group"},vl=["innerHTML"];function bl(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Notification");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",gl,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.notifications,(function(t,n){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:t.id||"no-id-".concat(n),"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(a["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:function(n){return e.removeNotification(t.id)}},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,vl)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var yl=Object(a["defineComponent"])({props:{group:String},components:{Notification:ol},computed:{notifications:function(){var e=this;return hl.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){hl.remove(e)}}});yl.render=bl;var wl=yl; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jl(e,t,n){return t&&Ol(e.prototype,t),n&&Ol(e,n),e}function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */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<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kl(e,t,n){return t&&jl(e.prototype,t),n&&jl(e,n),e}function Sl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Sl=function(){function e(){var t=this;wl(this,e),kl(this,"privateState",Object(a["reactive"])({pages:[]})),kl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),kl(this,"fetchAllPagesPromise",void 0),kl(this,"pages",Object(a["computed"])((function(){return t.state.value.pages})))}return jl(e,[{key:"findPageInCategory",value:function(e){return this.pages.value.find((function(t){return t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id}))}},{key:"findPage",value:function(e,t){return this.pages.value.find((function(n){return n&&n.category&&n.subcategory&&n.category.id===e&&"".concat(n.subcategory.id)===t}))}},{key:"reloadAllPages",value:function(){return delete this.fetchAllPagesPromise,this.getAllPages()}},{key:"getAllPages",value:function(){var e=this;return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=Xe.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){return e.privateState.pages=t,e.pages.value}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),Cl=new Sl;function El(e){return Nl(e)||Vl(e)||Pl(e)||Dl()}function Dl(){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 Pl(e,t){if(e){if("string"===typeof e)return Tl(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)?Tl(e,t):void 0}}function Vl(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Nl(e){if(Array.isArray(e))return Tl(e)}function Tl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r} + */var Cl=function(){function e(){var t=this;Ol(this,e),Sl(this,"privateState",Object(a["reactive"])({pages:[]})),Sl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Sl(this,"fetchAllPagesPromise",void 0),Sl(this,"pages",Object(a["computed"])((function(){return t.state.value.pages})))}return kl(e,[{key:"findPageInCategory",value:function(e){return this.pages.value.find((function(t){return t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id}))}},{key:"findPage",value:function(e,t){return this.pages.value.find((function(n){return n&&n.category&&n.subcategory&&n.category.id===e&&"".concat(n.subcategory.id)===t}))}},{key:"reloadAllPages",value:function(){return delete this.fetchAllPagesPromise,this.getAllPages()}},{key:"getAllPages",value:function(){var e=this;return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=Ze.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){return e.privateState.pages=t,e.pages.value}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),El=new Cl;function Dl(e){return Tl(e)||Nl(e)||Vl(e)||Pl()}function Pl(){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 Vl(e,t){if(e){if("string"===typeof e)return Al(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)?Al(e,t):void 0}}function Nl(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Tl(e){if(Array.isArray(e))return Al(e)}function Al(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Al(e){var t=El(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),t} + */function Il(e){var t=Dl(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),t} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Il(e){var t=e;return t.subcategories?t.subcategories:[]} + */function xl(e){var t=e;return t.subcategories?t.subcategories:[]} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function xl(e){var t=e;return t.subcategories?t.subcategories:[]}function Bl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ll(e,t,n){return t&&Ml(e.prototype,t),n&&Ml(e,n),e}function Fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function Bl(e){var t=e;return t.subcategories?t.subcategories:[]}function Ml(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fl(e,t,n){return t&&Ll(e.prototype,t),n&&Ll(e,n),e}function Rl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Rl(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var _l=function(){function e(){var t=this;Bl(this,e),Fl(this,"privateState",Object(a["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),Fl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Fl(this,"activeCategory",Object(a["computed"])((function(){return t.state.value.activeCategoryId||Ce.parsed.value.category}))),Fl(this,"activeSubcategory",Object(a["computed"])((function(){return t.state.value.activeSubcategoryId||Ce.parsed.value.subcategory}))),Fl(this,"activeSubsubcategory",Object(a["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),Fl(this,"menu",Object(a["computed"])((function(){return t.buildMenuFromPages()})))}return Ll(e,[{key:"fetchMenuItems",value:function(){var e=this;return Cl.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return Cl.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=void 0,r=void 0,i=void 0;return this.menu.value.forEach((function(a){a.id===e&&(Il(a)||[]).forEach((function(e){e.id===t&&(n=a,r=e),e.isGroup&&(xl(e)||[]).forEach((function(o){o.id===t&&(n=a,r=e,i=o)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Ce.parsed.value.category,n=Ce.parsed.value.subcategory,r=Cl.pages.value,i={};return r.forEach((function(a){var o=Object.assign({},a.category),l=o.id,c=l===t;if(!i[l]){i[l]=!0,o.subcategories=[];var s=null,u=r.filter((function(e){return e.category.id===l}));u.forEach((function(e){var t=Object.assign({},e.subcategory),r=t.id===n&&c;if(e.widgets&&e.widgets[0]&&Rl(e.subcategory.id)){s||(s=Object.assign({},t),s.name=C("CoreHome_ChooseX",[o.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=a.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}o.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return o.subcategories.push(e)})):s&&o.subcategories.push(s),o.subcategories=Al(Il(o)),e.push(o)}})),Al(e)}},{key:"toggleCategory",value:function(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.privateState.activeCategoryId===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),$l=new _l;function Hl(e){return Hl="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hl(e)}function Ul(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wl(e,t,n){return t&&ql(e.prototype,t),n&&ql(e,n),e}function Jl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function _l(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var $l=function(){function e(){var t=this;Ml(this,e),Rl(this,"privateState",Object(a["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),Rl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Rl(this,"activeCategory",Object(a["computed"])((function(){return t.state.value.activeCategoryId||Ee.parsed.value.category}))),Rl(this,"activeSubcategory",Object(a["computed"])((function(){return t.state.value.activeSubcategoryId||Ee.parsed.value.subcategory}))),Rl(this,"activeSubsubcategory",Object(a["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),Rl(this,"menu",Object(a["computed"])((function(){return t.buildMenuFromPages()})))}return Fl(e,[{key:"fetchMenuItems",value:function(){var e=this;return El.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return El.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=void 0,r=void 0,i=void 0;return this.menu.value.forEach((function(a){a.id===e&&(xl(a)||[]).forEach((function(e){e.id===t&&(n=a,r=e),e.isGroup&&(Bl(e)||[]).forEach((function(o){o.id===t&&(n=a,r=e,i=o)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Ee.parsed.value.category,n=Ee.parsed.value.subcategory,r=El.pages.value,i={};return r.forEach((function(a){var o=Object.assign({},a.category),l=o.id,c=l===t;if(!i[l]){i[l]=!0,o.subcategories=[];var s=null,u=r.filter((function(e){return e.category.id===l}));u.forEach((function(e){var t=Object.assign({},e.subcategory),r=t.id===n&&c;if(e.widgets&&e.widgets[0]&&_l(e.subcategory.id)){s||(s=Object.assign({},t),s.name=C("CoreHome_ChooseX",[o.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=a.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}o.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return o.subcategories.push(e)})):s&&o.subcategories.push(s),o.subcategories=Il(xl(o)),e.push(o)}})),Il(e)}},{key:"toggleCategory",value:function(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.privateState.activeCategoryId===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),Hl=new $l;function Ul(e){return Ul="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ul(e)}function ql(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jl(e,t,n){return t&&Wl(e.prototype,t),n&&Wl(e,n),e}function Gl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Gl(e){var t=e;return t.widgets?t.widgets:[]}var zl=function(){function e(){var t=this;Ul(this,e),Jl(this,"privateState",Object(a["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),Jl(this,"state",Object(a["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(a["readonly"])(t.privateState)}))),Jl(this,"widgets",Object(a["computed"])((function(){return t.state.value.categorizedWidgets})))}return Wl(e,[{key:"fetchAvailableWidgets",value:function(){var e=this;return Ce.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((function(t,n){try{window.widgetsHelper.getAvailableWidgets((function(n){var r=n;e.privateState.categorizedWidgets=r,t(e.widgets.value)}))}catch(r){n(r)}}))):Promise.resolve(this.widgets.value)}},{key:"reloadAvailableWidgets",value:function(){return"object"===Hl(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),Yl=new zl,Ql="reportingmenu-help",Kl=Object(a["defineComponent"])({components:{MenuDropdown:ei},directives:{SideNav:yn},props:{},data:function(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator:function(){return document.querySelector("nav .activateLeftMenu")},menu:function(){return $l.menu.value},activeCategory:function(){return $l.activeCategory.value},activeSubcategory:function(){return $l.activeSubcategory.value},activeSubsubcategory:function(){return $l.activeSubsubcategory.value},displayedCategory:function(){return Ce.parsed.value.category},displayedSubcategory:function(){return Ce.parsed.value.subcategory}},created:function(){var e=this;$l.fetchMenuItems().then((function(t){if(!Ce.parsed.value.subcategory){var n=t[0],r=n.subcategories[0];$l.enterSubcategory(n,r),e.propagateUrlChange(n,r)}})),Object(a["watch"])((function(){return Ce.parsed.value}),(function(e){var t=$l.findSubcategory(e.category,e.subcategory);$l.enterSubcategory(t.category,t.subcategory,t.subsubcategory)})),S.on("piwikPageChange",(function(){e.initialLoad||window.globalAjaxQueue.abort(),e.helpShownCategory=null,e.showSubcategoryHelpOnLoad&&(e.showHelp(e.showSubcategoryHelpOnLoad.category,e.showSubcategoryHelpOnLoad.subcategory),e.showSubcategoryHelpOnLoad=null),window.$("#loadingError").hide(),e.initialLoad=!1})),S.on("updateReportingMenu",(function(){$l.reloadMenuItems().then((function(){var e=Ce.parsed.value.category,t=Ce.parsed.value.subcategory;if(e&&t){var n=$l.findSubcategory(e,t);n.category&&$l.enterSubcategory(n.category,n.subcategory,n.subsubcategory)}})),Yl.reloadAvailableWidgets()}))},methods:{propagateUrlChange:function(e,t){var n=Ce.parsed.value;n.category===e.id&&n.subcategory===t.id?this.loadSubcategory(e,t):Ce.updateHash(Object.assign(Object.assign({},Ce.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){fl.remove(Ql);var t=$l.toggleCategory(e);if(t&&e.subcategories&&1===e.subcategories.length){this.helpShownCategory=null;var n=e.subcategories[0];this.propagateUrlChange(e,n)}},loadSubcategory:function(e,t,n){n&&(n.shiftKey||n.ctrlKey||n.metaKey)||(fl.remove(Ql),t&&t.id===this.activeSubcategory&&(this.helpShownCategory=null,setTimeout((function(){S.postEvent("loadPage",e.id,t.id)}))))},makeUrl:function(e,t){var n=Ce.parsed.value,r=n.idSite,i=n.period,a=n.date,o=n.segment,l=n.comparePeriods,c=n.compareDates,s=n.compareSegments;return Ce.stringify({idSite:r,period:i,date:a,segment:o,comparePeriods:l,compareDates:c,compareSegments:s,category:e.id,subcategory:t.id})},htmlEntities:function(e){return S.helper.htmlEntities(e)},showHelp:function(e,t,n){var r=Ce.parsed.value,i=r.category,a=r.subcategory;if((i!==e.id||a!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void Ce.updateHash(Object.assign(Object.assign({},Ce.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return fl.remove(Ql),void(this.helpShownCategory=null);var o=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),l="<strong>".concat(o,"</strong><br/>");fl.show({context:"info",id:Ql,type:"help",noclear:!0,class:"help-notification",message:l+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Kl.render=zo;var Xl=Kl; + */function zl(e){var t=e;return t.widgets?t.widgets:[]}var Yl=function(){function e(){var t=this;ql(this,e),Gl(this,"privateState",Object(a["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),Gl(this,"state",Object(a["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(a["readonly"])(t.privateState)}))),Gl(this,"widgets",Object(a["computed"])((function(){return t.state.value.categorizedWidgets})))}return Jl(e,[{key:"fetchAvailableWidgets",value:function(){var e=this;return Ee.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((function(t,n){try{window.widgetsHelper.getAvailableWidgets((function(n){var r=n;e.privateState.categorizedWidgets=r,t(e.widgets.value)}))}catch(r){n(r)}}))):Promise.resolve(this.widgets.value)}},{key:"reloadAvailableWidgets",value:function(){return"object"===Ul(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),Ql=new Yl,Kl="reportingmenu-help",Xl=Object(a["defineComponent"])({components:{MenuDropdown:ti},directives:{SideNav:wn},props:{},data:function(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator:function(){return document.querySelector("nav .activateLeftMenu")},menu:function(){return Hl.menu.value},activeCategory:function(){return Hl.activeCategory.value},activeSubcategory:function(){return Hl.activeSubcategory.value},activeSubsubcategory:function(){return Hl.activeSubsubcategory.value},displayedCategory:function(){return Ee.parsed.value.category},displayedSubcategory:function(){return Ee.parsed.value.subcategory}},created:function(){var e=this;Hl.fetchMenuItems().then((function(t){if(!Ee.parsed.value.subcategory){var n=t[0],r=n.subcategories[0];Hl.enterSubcategory(n,r),e.propagateUrlChange(n,r)}})),Object(a["watch"])((function(){return Ee.parsed.value}),(function(e){var t=Hl.findSubcategory(e.category,e.subcategory);Hl.enterSubcategory(t.category,t.subcategory,t.subsubcategory)})),S.on("piwikPageChange",(function(){e.initialLoad||window.globalAjaxQueue.abort(),e.helpShownCategory=null,e.showSubcategoryHelpOnLoad&&(e.showHelp(e.showSubcategoryHelpOnLoad.category,e.showSubcategoryHelpOnLoad.subcategory),e.showSubcategoryHelpOnLoad=null),window.$("#loadingError").hide(),e.initialLoad=!1})),S.on("updateReportingMenu",(function(){Hl.reloadMenuItems().then((function(){var e=Ee.parsed.value.category,t=Ee.parsed.value.subcategory;if(e&&t){var n=Hl.findSubcategory(e,t);n.category&&Hl.enterSubcategory(n.category,n.subcategory,n.subsubcategory)}})),Ql.reloadAvailableWidgets()}))},methods:{propagateUrlChange:function(e,t){var n=Ee.parsed.value;n.category===e.id&&n.subcategory===t.id?this.loadSubcategory(e,t):Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){hl.remove(Kl);var t=Hl.toggleCategory(e);if(t&&e.subcategories&&1===e.subcategories.length){this.helpShownCategory=null;var n=e.subcategories[0];this.propagateUrlChange(e,n)}},loadSubcategory:function(e,t,n){n&&(n.shiftKey||n.ctrlKey||n.metaKey)||(hl.remove(Kl),t&&t.id===this.activeSubcategory&&(this.helpShownCategory=null,setTimeout((function(){S.postEvent("loadPage",e.id,t.id)}))))},makeUrl:function(e,t){var n=Ee.parsed.value,r=n.idSite,i=n.period,a=n.date,o=n.segment,l=n.comparePeriods,c=n.compareDates,s=n.compareSegments;return Ee.stringify({idSite:r,period:i,date:a,segment:o,comparePeriods:l,compareDates:c,compareSegments:s,category:e.id,subcategory:t.id})},htmlEntities:function(e){return S.helper.htmlEntities(e)},showHelp:function(e,t,n){var r=Ee.parsed.value,i=r.category,a=r.subcategory;if((i!==e.id||a!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return hl.remove(Kl),void(this.helpShownCategory=null);var o=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),l="<strong>".concat(o,"</strong><br/>");hl.show({context:"info",id:Kl,type:"help",noclear:!0,class:"help-notification",message:l+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Xl.render=Yo;var Zl=Xl; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:Xl,directiveName:"piwikReportingMenu"}); + */kt({component:Zl,directiveName:"piwikReportingMenu"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Zl(e){return e.forEach((function(e){e.id===$l.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===$l.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===$l.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function ec(){return{get menu(){return $l.menu.value},findSubcategory:$l.findSubcategory.bind($l),reloadMenuItems:function(){return $l.reloadMenuItems().then((function(e){return Zl(Et(e))}))},fetchMenuItems:function(){return $l.fetchMenuItems().then((function(e){return Zl(Et(e))}))}}} +function ec(e){return e.forEach((function(e){e.id===Hl.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===Hl.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===Hl.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function tc(){return{get menu(){return Hl.menu.value},findSubcategory:Hl.findSubcategory.bind(Hl),reloadMenuItems:function(){return Hl.reloadMenuItems().then((function(e){return ec(Dt(e))}))},fetchMenuItems:function(){return Hl.fetchMenuItems().then((function(e){return ec(Dt(e))}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function tc(){return{get pages(){return Cl.pages.value},findPageInCategory:function(){return Ct(Cl.findPageInCategory.apply(Cl,arguments))},findPage:function(){return Ct(Cl.findPage.apply(Cl,arguments))},reloadAllPages:function(){return Cl.reloadAllPages().then((function(e){return Et(e)}))},getAllPages:function(){return Cl.getAllPages().then((function(e){return Et(e)}))}}}function nc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ic(e,t,n){return t&&rc(e.prototype,t),n&&rc(e,n),e}function ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +function nc(){return{get pages(){return El.pages.value},findPageInCategory:function(){return Et(El.findPageInCategory.apply(El,arguments))},findPage:function(){return Et(El.findPage.apply(El,arguments))},reloadAllPages:function(){return El.reloadAllPages().then((function(e){return Dt(e)}))},getAllPages:function(){return El.getAllPages().then((function(e){return Dt(e)}))}}}function rc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ic(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ac(e,t,n){return t&&ic(e.prototype,t),n&&ic(e,n),e}function oc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.angular.module("piwikApp.service").factory("reportingMenuModel",ec),window.angular.module("piwikApp.service").factory("reportingPagesModel",tc);var oc=function(){function e(){var t=this;nc(this,e),ac(this,"privateState",Object(a["reactive"])({reports:[]})),ac(this,"state",Object(a["readonly"])(this.privateState)),ac(this,"reports",Object(a["computed"])((function(){return t.state.reports}))),ac(this,"reportsPromise",void 0)}return ic(e,[{key:"findReport",value:function(e,t){return this.reports.value.find((function(n){return n.module===e&&n.action===t}))}},{key:"fetchReportMetadata",value:function(){var e=this;return this.reportsPromise||(this.reportsPromise=Xe.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:S.idSite||Ce.parsed.value.idSite}).then((function(t){return e.privateState.reports=t,t}))),this.reportsPromise.then((function(){return e.reports.value}))}}]),e}(),lc=new oc; + */window.angular.module("piwikApp.service").factory("reportingMenuModel",tc),window.angular.module("piwikApp.service").factory("reportingPagesModel",nc);var lc=function(){function e(){var t=this;rc(this,e),oc(this,"privateState",Object(a["reactive"])({reports:[]})),oc(this,"state",Object(a["readonly"])(this.privateState)),oc(this,"reports",Object(a["computed"])((function(){return t.state.reports}))),oc(this,"reportsPromise",void 0)}return ac(e,[{key:"findReport",value:function(e,t){return this.reports.value.find((function(n){return n.module===e&&n.action===t}))}},{key:"fetchReportMetadata",value:function(){var e=this;return this.reportsPromise||(this.reportsPromise=Ze.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:S.idSite||Ee.parsed.value.idSite}).then((function(t){return e.privateState.reports=t,t}))),this.reportsPromise.then((function(){return e.reports.value}))}}]),e}(),cc=new lc; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -window.angular.module("piwikApp.service").factory("reportMetadataModel",(function(){return{get reports(){return lc.reports.value},findReport:lc.findReport.bind(lc),fetchReportMetadata:function(){return lc.fetchReportMetadata().then((function(e){return Et(e)}))}}}));var cc={key:0},sc={class:"notification system notification-error"},uc={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},dc={class:"theWidgetContent",ref:"widgetContent"};function pc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("ActivityIndicator");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createVNode"])(l,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[e.widgetName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",cc,Object(a["toDisplayString"])(e.widgetName),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",sc,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",uc,Object(a["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(a["createCommentVNode"])("",!0)])],512),[[a["vShow"],e.loadingFailed]]),Object(a["createElementVNode"])("div",dc,null,512)])}var mc=Object(a["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:ho},data:function(){return{loading:!1,loadingFailed:!1,changeCounter:0,currentScope:null,lastWidgetAbortController:null}},watch:{widgetParams:function(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{loadingMessage:function(){return this.widgetName?C("General_LoadingPopover",this.widgetName):C("General_LoadingData")},hasErrorFaqLink:function(){var e=S.config.enable_general_settings_admin,t=S.config.enable_plugins_admin;return S.hasSuperUserAccess&&(e||t)}},mounted:function(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},unmounted:function(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded:function(){this.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=null)},cleanupLastWidgetContent:function(){var e=this.$refs.widgetContent;e&&(e.innerHTML=""),this.currentScope&&this.currentScope.$destroy()},getWidgetUrl:function(e){var t=Ce.parsed.value,n=Object.assign({},e||{}),r=Object.keys(Object.assign(Object.assign({},Ce.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),Or.isComparisonEnabled()&&(n=Object.assign(Object.assign({},n),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(n.showtitle="1"),S.shouldPropagateTokenAuth&&t.token_auth&&(S.broadcast.isWidgetizeRequestWithoutSession()||(n.force_api_session="1"),n.token_auth=t.token_auth),n.random=Math.floor(1e4*Math.random()),n},loadWidgetUrl:function(e,t){var n=this;this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController,Xe.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"},abortController:this.lastWidgetAbortController}).then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetAbortController=null,n.loading=!1,n.loadingFailed=!1;var i=n.$refs.widgetContent;window.$(i).html(r);var a=window.$(i).children();if(n.widgetName){var o=a.find("> .card-content .card-title");o.length||(o=a.find("> h2")),o.length&&o.html(S.helper.htmlEntities(n.widgetName))}var l=S.helper.getAngularDependency("$rootScope"),c=l.$new();n.currentScope=c,S.helper.compileAngularComponents(a,{scope:c}),S.helper.compileVueEntryComponents(a),fl.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:a})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetAbortController=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});mc.render=pc;var fc=mc; +window.angular.module("piwikApp.service").factory("reportMetadataModel",(function(){return{get reports(){return cc.reports.value},findReport:cc.findReport.bind(cc),fetchReportMetadata:function(){return cc.fetchReportMetadata().then((function(e){return Dt(e)}))}}}));var sc={key:0},uc={class:"notification system notification-error"},dc={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},pc={class:"theWidgetContent",ref:"widgetContent"};function mc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("ActivityIndicator");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createVNode"])(l,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[e.widgetName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",sc,Object(a["toDisplayString"])(e.widgetName),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",uc,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",dc,Object(a["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(a["createCommentVNode"])("",!0)])],512),[[a["vShow"],e.loadingFailed]]),Object(a["createElementVNode"])("div",pc,null,512)])}var fc=Object(a["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:go},data:function(){return{loading:!1,loadingFailed:!1,changeCounter:0,currentScope:null,lastWidgetAbortController:null}},watch:{widgetParams:function(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{loadingMessage:function(){return this.widgetName?C("General_LoadingPopover",this.widgetName):C("General_LoadingData")},hasErrorFaqLink:function(){var e=S.config.enable_general_settings_admin,t=S.config.enable_plugins_admin;return S.hasSuperUserAccess&&(e||t)}},mounted:function(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},unmounted:function(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded:function(){this.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=null)},cleanupLastWidgetContent:function(){var e=this.$refs.widgetContent;e&&(e.innerHTML=""),this.currentScope&&this.currentScope.$destroy()},getWidgetUrl:function(e){var t=Ee.parsed.value,n=Object.assign({},e||{}),r=Object.keys(Object.assign(Object.assign({},Ee.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),jr.isComparisonEnabled()&&(n=Object.assign(Object.assign({},n),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(n.showtitle="1"),S.shouldPropagateTokenAuth&&t.token_auth&&(S.broadcast.isWidgetizeRequestWithoutSession()||(n.force_api_session="1"),n.token_auth=t.token_auth),n.random=Math.floor(1e4*Math.random()),n},loadWidgetUrl:function(e,t){var n=this;this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController,Ze.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"},abortController:this.lastWidgetAbortController}).then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetAbortController=null,n.loading=!1,n.loadingFailed=!1;var i=n.$refs.widgetContent;window.$(i).html(r);var a=window.$(i).children();if(n.widgetName){var o=a.find("> .card-content .card-title");o.length||(o=a.find("> h2")),o.length&&o.html(S.helper.htmlEntities(n.widgetName))}var l=S.helper.getAngularDependency("$rootScope"),c=l.$new();n.currentScope=c,S.helper.compileAngularComponents(a,{scope:c}),S.helper.compileVueEntryComponents(a),hl.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:a})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetAbortController=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});fc.render=mc;var hc=fc; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */jt({component:fc,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function hc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.actualContainer,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function gc(e){return yc(e)||bc(e)||jc(e)||vc()}function vc(){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 bc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function yc(e){if(Array.isArray(e))return kc(e)}function wc(e,t){return Cc(e)||Sc(e,t)||jc(e,t)||Oc()}function Oc(){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 jc(e,t){if(e){if("string"===typeof e)return kc(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)?kc(e,t):void 0}}function kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sc(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Cc(e){if(Array.isArray(e))return e}var Ec=_n("CoreHome","Widget"),Dc=Object(a["defineComponent"])({props:{container:{type:Array,required:!0}},components:{Widget:Ec},computed:{actualContainer:function(){var e,t,n,r=this.container;if(null===r||void 0===r||null===(e=r[0])||void 0===e||!e.parameters)return r;var i=wc(r,1),a=i[0],o="1"===(null===(t=a.parameters)||void 0===t?void 0:t.widget)||1===(null===(n=a.parameters)||void 0===n?void 0:n.widget),l=o&&"graphEvolution"===a.viewDataTable,c=l?Object.assign(Object.assign({},a),{},{parameters:Object.assign(Object.assign({},a.parameters),{},{showtitle:"0"})}):a;return[c].concat(gc(r.slice(1)))}}});Dc.render=hc;var Pc=Dc,Vc=(jt({component:Pc,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),Nc={class:"entityList"},Tc={class:"listCircle"},Ac=["onClick"],Ic={class:"dimension"},xc={class:"reportContainer"},Bc=Object(a["createElementVNode"])("div",{class:"clear"},null,-1); + */kt({component:hc,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function gc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.actualContainer,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function vc(e){return wc(e)||yc(e)||kc(e)||bc()}function bc(){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 yc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function wc(e){if(Array.isArray(e))return Sc(e)}function Oc(e,t){return Ec(e)||Cc(e,t)||kc(e,t)||jc()}function jc(){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 kc(e,t){if(e){if("string"===typeof e)return Sc(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)?Sc(e,t):void 0}}function Sc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cc(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Ec(e){if(Array.isArray(e))return e}var Dc=$n("CoreHome","Widget"),Pc=Object(a["defineComponent"])({props:{container:{type:Array,required:!0}},components:{Widget:Dc},computed:{actualContainer:function(){var e,t,n,r=this.container;if(null===r||void 0===r||null===(e=r[0])||void 0===e||!e.parameters)return r;var i=Oc(r,1),a=i[0],o="1"===(null===(t=a.parameters)||void 0===t?void 0:t.widget)||1===(null===(n=a.parameters)||void 0===n?void 0:n.widget),l=o&&"graphEvolution"===a.viewDataTable,c=l?Object.assign(Object.assign({},a),{},{parameters:Object.assign(Object.assign({},a.parameters),{},{showtitle:"0"})}):a;return[c].concat(vc(r.slice(1)))}}});Pc.render=gc;var Vc=Pc,Nc=(kt({component:Vc,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),Tc={class:"entityList"},Ac={class:"listCircle"},Ic=["onClick"],xc={class:"dimension"},Bc={class:"reportContainer"},Mc=Object(a["createElementVNode"])("div",{class:"clear"},null,-1); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Mc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Vc,[Object(a["createElementVNode"])("div",Nc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgetsByCategory,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("ul",Tc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.widgets,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(a["createElementVNode"])("span",Ic,Object(a["toDisplayString"])(t.name),1)],10,Ac)})),128))])])})),128))]),Object(a["createElementVNode"])("div",xc,[e.selectedWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(a["createCommentVNode"])("",!0)]),Bc])}function Lc(e,t){return Hc(e)||$c(e,t)||Rc(e,t)||Fc()}function Fc(){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 Rc(e,t){if(e){if("string"===typeof e)return _c(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)?_c(e,t):void 0}}function _c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $c(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Hc(e){if(Array.isArray(e))return e}var Uc=Object(a["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:fc},data:function(){return{selectedWidget:null}},created:function(){var e=Lc(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return Al(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n,r=null===(n=t.subcategory)||void 0===n?void 0:n.name;r&&(e[r]||(e[r]={name:r,order:t.order,widgets:[]}),e[r].widgets.push(t))})),Al(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=Object.assign({},e)}}});Uc.render=Mc;var qc=Uc,Wc=(jt({component:qc,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),Jc={key:1},Gc={key:2}; + */function Lc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Nc,[Object(a["createElementVNode"])("div",Tc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgetsByCategory,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("ul",Ac,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.widgets,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(a["createElementVNode"])("span",xc,Object(a["toDisplayString"])(t.name),1)],10,Ic)})),128))])])})),128))]),Object(a["createElementVNode"])("div",Bc,[e.selectedWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(a["createCommentVNode"])("",!0)]),Mc])}function Fc(e,t){return Uc(e)||Hc(e,t)||_c(e,t)||Rc()}function Rc(){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 _c(e,t){if(e){if("string"===typeof e)return $c(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)?$c(e,t):void 0}}function $c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hc(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Uc(e){if(Array.isArray(e))return e}var qc=Object(a["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:hc},data:function(){return{selectedWidget:null}},created:function(){var e=Fc(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return Il(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n,r=null===(n=t.subcategory)||void 0===n?void 0:n.name;r&&(e[r]||(e[r]={name:r,order:t.order,widgets:[]}),e[r].widgets.push(t))})),Il(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=Object.assign({},e)}}});qc.render=Lc;var Wc=qc,Jc=(kt({component:Wc,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),Gc={key:1},zc={key:2}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function zc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader"),c=Object(a["resolveComponent"])("WidgetContainer"),s=Object(a["resolveComponent"])("WidgetByDimensionContainer"),u=Object(a["resolveDirective"])("tooltips");return e.actualWidget?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Jc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(a["createCommentVNode"])("",!0)],10,Wc)),[[a["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(a["createCommentVNode"])("",!0)}function Yc(e,t){var n=void 0;return Object.values(e||{}).some((function(e){return n=e.find((function(e){var n;return e&&e.isContainer&&(null===(n=e.parameters)||void 0===n?void 0:n.containerId)===t})),n})),n}var Qc=Object(a["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:fc,WidgetContainer:Pc,WidgetByDimensionContainer:qc},directives:{Tooltips:Lr},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;if(t&&t.middlewareParameters){var n=t.middlewareParameters;Xe.fetch(n).then((function(t){e.showWidget=!!t}))}else this.showWidget=!0},computed:{allWidgets:function(){return Yl.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Object.assign({},t);if(t&&t.isReport&&!t.documentation){var r=lc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Yc(this.allWidgets,this.containerid);if(i){var a=Object.assign({},i);if(this.widgetized){a.isFirstInPage=!0,a.parameters=Object.assign(Object.assign({},a.parameters),{},{widget:"1"});var o=Gl(a);o&&(a.widgets=o.map((function(t){return Object.assign(Object.assign({},t),{},{parameters:Object.assign(Object.assign({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))}return a}}return null}}});Qc.render=zc;var Kc=Qc,Xc=(jt({component:Kc,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),Zc={key:1,class:"col s12 l6 leftWidgetColumn"},es={key:2,class:"col s12 l6 rightWidgetColumn"}; + */function Yc(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("WidgetLoader"),c=Object(a["resolveComponent"])("WidgetContainer"),s=Object(a["resolveComponent"])("WidgetByDimensionContainer"),u=Object(a["resolveDirective"])("tooltips");return e.actualWidget?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Gc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",zc,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(a["createCommentVNode"])("",!0)],10,Jc)),[[a["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(a["createCommentVNode"])("",!0)}function Qc(e,t){var n=void 0;return Object.values(e||{}).some((function(e){return n=e.find((function(e){var n;return e&&e.isContainer&&(null===(n=e.parameters)||void 0===n?void 0:n.containerId)===t})),n})),n}var Kc=Object(a["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:hc,WidgetContainer:Vc,WidgetByDimensionContainer:Wc},directives:{Tooltips:Fr},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title")||"";return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;if(t&&t.middlewareParameters){var n=t.middlewareParameters;Ze.fetch(n).then((function(t){e.showWidget=!!t}))}else this.showWidget=!0},computed:{allWidgets:function(){return Ql.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Object.assign({},t);if(t&&t.isReport&&!t.documentation){var r=cc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Qc(this.allWidgets,this.containerid);if(i){var a=Object.assign({},i);if(this.widgetized){a.isFirstInPage=!0,a.parameters=Object.assign(Object.assign({},a.parameters),{},{widget:"1"});var o=zl(a);o&&(a.widgets=o.map((function(t){return Object.assign(Object.assign({},t),{},{parameters:Object.assign(Object.assign({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))}return a}}return null}}});Kc.render=Yc;var Xc=Kc,Zc=(kt({component:Xc,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),es={key:1,class:"col s12 l6 leftWidgetColumn"},ts={key:2,class:"col s12 l6 rightWidgetColumn"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ts(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("ActivityIndicator"),c=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xc,[Object(a["createVNode"])(l,{loading:e.loading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,Object(a["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[a["vShow"],e.hasNoPage]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgets,(function(e){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Zc,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.left,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",es,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.right,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0)])})),128))])}function ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function is(e,t,n){return t&&rs(e.prototype,t),n&&rs(e,n),e}function as(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function os(e){return us(e)||ss(e)||cs(e)||ls()}function ls(){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 cs(e,t){if(e){if("string"===typeof e)return ds(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)?ds(e,t):void 0}}function ss(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function us(e){if(Array.isArray(e))return ds(e)}function ds(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r} + */function ns(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("ActivityIndicator"),c=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Zc,[Object(a["createVNode"])(l,{loading:e.loading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,Object(a["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[a["vShow"],e.hasNoPage]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgets,(function(e){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",es,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.left,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ts,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.right,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0)])})),128))])}function rs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function is(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function as(e,t,n){return t&&is(e.prototype,t),n&&is(e,n),e}function os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ls(e){return ds(e)||us(e)||ss(e)||cs()}function cs(){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 ss(e,t){if(e){if("string"===typeof e)return ps(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)?ps(e,t):void 0}}function us(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ds(e){if(Array.isArray(e))return ps(e)}function ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ps(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function ms(e){if(e&&e[0]){var t=os(e),n=e[0];return n.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:ms(n.left||[]),right:ms(n.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}var fs=function(){function e(){var t=this;ns(this,e),as(this,"privateState",Object(a["reactive"])({})),as(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),as(this,"page",Object(a["computed"])((function(){return t.state.value.page}))),as(this,"widgets",Object(a["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},a=function(e){if(!e.isReport)return[];var t=lc.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(a(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=Al(n),1===n.length)return ms(n);for(var o=[],l=0;l<n.length;l+=1){var c=n[l];if(ps(c)||n[l+1]&&ps(n[l+1]))o.push(Object.assign(Object.assign({},c),{},{widgets:Al(Gl(c))}));else{var s=0,u=[c],d=[];while(n[l+1]&&!ps(n[l+1]))l+=1,s+=1,s%2===0?u.push(n[l]):d.push(n[l]);o.push({group:!0,left:u,right:d})}}var p=ms(o);return p})))}return is(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([Cl.getAllPages(),lc.fetchReportMetadata()]).then((function(){return n.privateState.page=Cl.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=void 0}}]),e}(),hs=new fs;function gs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);fl.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function vs(){fl.remove("onlyRawData")}var bs=Object(a["defineComponent"])({components:{ActivityIndicator:ho,Widget:Kc},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;hs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Ce.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(vs(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return hs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return hs.resetPage(),void(this.loading=!1);var r=Ce.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return fl.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),hs.resetPage(),void(this.loading=!1)}fl.remove("invalidDate"),S.postEvent("piwikPageChange",{}),fl.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired();var o={category:e,subcategory:t};if(S.postEvent("ReportingPage.loadPage",o),o.promise)return this.loading=!0,void Promise.resolve(o.promise).finally((function(){n.loading=!1}));hs.fetchPage(e,t).then((function(){var t=!hs.page.value;if(t){var r=Cl.findPageInCategory(e);if(r&&r.subcategory)return void Ce.updateHash(Object.assign(Object.assign({},Ce.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Ce.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&gs();var t=Ce.parsed.value,n=t.segment;if(n)vs();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"],a=t.subcategory,o=t.category;if(-1===r.indexOf(a)&&-1===i.indexOf(o)&&-1===a.toLowerCase().indexOf("manage")){var l=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<l||Xe.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=new Date,t.value>0?(e.hasNoVisits=!1,void vs()):(e.hasNoVisits=!0,e.hasRawData?void gs():Xe.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void vs();e.hasRawData=!0,gs()}))}else vs()}}}});bs.render=ts;var ys=bs,ws=(jt({component:ys,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),Os={class:"col l6"},js={name:"format"},ks={name:"option_flat"},Ss={name:"option_expanded"},Cs={name:"option_format_metrics"},Es={class:"col l6"},Ds={name:"filter_type"},Ps={class:"filter_limit"},Vs={name:"filter_limit_all"},Ns={key:0,name:"filter_limit"},Ts={key:1,name:"filter_limit"},As={class:"col l12"},Is=["value"],xs=Object(a["createTextVNode"])("\n "),Bs=[xs],Ms=["innerHTML"],Ls={class:"col l12"},Fs=["href","title"]; + */function ms(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function fs(e){if(e&&e[0]){var t=ls(e),n=e[0];return n.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:fs(n.left||[]),right:fs(n.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}var hs=function(){function e(){var t=this;rs(this,e),os(this,"privateState",Object(a["reactive"])({})),os(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),os(this,"page",Object(a["computed"])((function(){return t.state.value.page}))),os(this,"widgets",Object(a["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},a=function(e){if(!e.isReport)return[];var t=cc.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(a(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=Il(n),1===n.length)return fs(n);for(var o=[],l=0;l<n.length;l+=1){var c=n[l];if(ms(c)||n[l+1]&&ms(n[l+1]))o.push(Object.assign(Object.assign({},c),{},{widgets:Il(zl(c))}));else{var s=0,u=[c],d=[];while(n[l+1]&&!ms(n[l+1]))l+=1,s+=1,s%2===0?u.push(n[l]):d.push(n[l]);o.push({group:!0,left:u,right:d})}}var p=fs(o);return p})))}return as(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([El.getAllPages(),cc.fetchReportMetadata()]).then((function(){return n.privateState.page=El.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=void 0}}]),e}(),gs=new hs;function vs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);hl.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function bs(){hl.remove("onlyRawData")}var ys=Object(a["defineComponent"])({components:{ActivityIndicator:go,Widget:Xc},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;gs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Ee.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(bs(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return gs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return gs.resetPage(),void(this.loading=!1);var r=Ee.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return hl.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),gs.resetPage(),void(this.loading=!1)}hl.remove("invalidDate"),S.postEvent("piwikPageChange",{}),hl.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired();var o={category:e,subcategory:t};if(S.postEvent("ReportingPage.loadPage",o),o.promise)return this.loading=!0,void Promise.resolve(o.promise).finally((function(){n.loading=!1}));gs.fetchPage(e,t).then((function(){var t=!gs.page.value;if(t){var r=El.findPageInCategory(e);if(r&&r.subcategory)return void Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Ee.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&vs();var t=Ee.parsed.value,n=t.segment;if(n)bs();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"],a=t.subcategory,o=t.category;if(-1===r.indexOf(a)&&-1===i.indexOf(o)&&-1===a.toLowerCase().indexOf("manage")){var l=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<l||Ze.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=new Date,t.value>0?(e.hasNoVisits=!1,void bs()):(e.hasNoVisits=!0,e.hasRawData?void vs():Ze.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void bs();e.hasRawData=!0,vs()}))}else bs()}}}});ys.render=ns;var ws=ys,Os=(kt({component:ws,directiveName:"piwikReportingPage"}),{class:"report-export-popover row",id:"reportExport"}),js={class:"col l6"},ks={name:"format"},Ss={name:"option_flat"},Cs={name:"option_expanded"},Es={name:"option_format_metrics"},Ds={class:"col l6"},Ps={name:"filter_type"},Vs={class:"filter_limit"},Ns={name:"filter_limit_all"},Ts={key:0,name:"filter_limit"},As={key:1,name:"filter_limit"},Is={class:"col l12"},xs=["value"],Bs=Object(a["createTextVNode"])("\n "),Ms=[Bs],Ls=["innerHTML"],Fs={class:"col l12"},Rs=["href","title"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Rs(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ws,[Object(a["createElementVNode"])("div",Os,[Object(a["createElementVNode"])("div",js,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",ks,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ss,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Cs,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(a["createElementVNode"])("div",Es,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ds,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(a["createElementVNode"])("div",Ps,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Vs,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[a["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ns,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(a["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ts,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(a["createCommentVNode"])("",!0)])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",As,[Object(a["withDirectives"])(Object(a["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},Bs,8,Is),[[c,{}]]),Object(a["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Ms)],512),[[a["vShow"],e.showUrl]]),Object(a["createElementVNode"])("div",Ls,[Object(a["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(a["toDisplayString"])(e.translate("General_Export")),9,Fs),Object(a["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[a["vShow"],!e.showUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[a["vShow"],e.showUrl]])])])])}function _s(e,t){return Ws(e)||qs(e,t)||Hs(e,t)||$s()}function $s(){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 Hs(e,t){if(e){if("string"===typeof e)return Us(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)?Us(e,t):void 0}}function Us(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qs(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Ws(e){if(Array.isArray(e))return e}var Js=_n("CorePluginsAdmin","Field"),Gs=Object(a["defineComponent"])({components:{Field:Js},directives:{SelectOnFocus:gn},props:{hasSubtables:Boolean,availableReportTypes:Object,availableReportFormats:{type:Object,required:!0},maxFilterLimit:Number,limitAllOptions:Object,dataTable:{type:Object,required:!0},requestParams:[Object,String],apiMethod:{type:String,required:!0},initialReportType:{type:String,default:"default"},initialReportLimit:{type:[String,Number],default:100},initialReportLimitAll:{type:String,default:"yes"},initialOptionFlat:{type:Boolean,default:!1},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"XML"}},data:function(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionFlat:this.initialOptionFlat,optionExpanded:this.initialOptionExpanded,optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit}},watch:{reportType:function(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="XML")},reportLimit:function(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=this.maxFilterLimit?C("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.reportFormat,n=this.apiMethod,r=this.reportType,i=this.dataTable;if(t){var a={},o="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams&&(a=JSON.parse(this.requestParams));var l=i.param,c=l.segment,s=l.label,u=l.idGoal,d=l.idDimension,p=l.idSite,m=i.param,f=m.date,h=m.period;"RSS"===t&&(f="last10"),"undefined"!==typeof i.param.dateUsedInGraph&&(f=i.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(t.toLowerCase())&&"range"===i.param.period&&(h="day"),"range"===i.param.period&&"graphEvolution"===i.param.viewDataTable&&(h="day");var v={module:"API",format:t,idSite:p,period:h,date:f};if("processed"===r){v.method="API.getProcessedReport";var b=n.split("."),y=_s(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=n;if(i.param.compareDates&&i.param.compareDates.length&&(v.compareDates=i.param.compareDates,v.compare="1"),i.param.comparePeriods&&i.param.comparePeriods.length&&(v.comparePeriods=i.param.comparePeriods,v.compare="1"),i.param.compareSegments&&i.param.compareSegments.length&&(v.compareSegments=i.param.compareSegments,v.compare="1"),"undefined"!==typeof i.param.filter_pattern&&(v.filter_pattern=i.param.filter_pattern),"undefined"!==typeof i.param.filter_pattern_recursive&&(v.filter_pattern_recursive=i.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach((function(e){var t=_s(e,2),n=t[0],r=t[1],i=r;!0===i?i=1:!1===i&&(i=0),v[n]=i})),this.optionFlat&&(v.flat=1,"undefined"!==typeof i.param.include_aggregate_rows&&"1"===i.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),i.param.pivotBy&&(v.pivotBy=i.param.pivotBy,v.pivotByColumnLimit=20,i.props.pivot_by_column&&(v.pivotByColumn=i.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof c&&(v.segment=decodeURIComponent(c)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var w=s.split(",");if(w.length>1)v.label=w;else{var O=_s(w,1);v.label=O[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=o;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(Ce.stringify(v))}}}});Gs.render=Rs;var zs=Gs,Ys=window,Qs=Ys.$,Ks={mounted:function(e,t){e.addEventListener("click",(function(){var n=Ce.hashParsed.value.popover,r=Qs(e).closest("[data-report]").data("uiControlObject"),i=window.Piwik_Popover.showLoading("Export"),a=t.value.reportFormats,o=r.param.filter_limit;t.value.maxFilterLimit>0&&(o=Math.min(o,t.value.maxFilterLimit));var l=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,c={initialReportType:"default",initialReportLimit:o>0?o:100,initialReportLimitAll:-1===o?"yes":"no",initialOptionFlat:l,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:l||r.numberOfSubtables>0,availableReportFormats:{default:a,processed:{XML:a.XML,JSON:a.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=ut({template:'\n <popover v-bind="bind"/>',data:function(){return{bind:c}}});s.component("popover",zs);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){Ce.updateHash(Object.assign(Object.assign({},Ce.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){i.dialog(),Qs(".exportFullUrl, .btn",i).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; + */function _s(e,t,n,r,i,o){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Os,[Object(a["createElementVNode"])("div",js,[Object(a["createElementVNode"])("div",ks,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"format",title:e.translate("CoreHome_ExportFormat"),modelValue:e.reportFormat,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.reportFormat=t}),"full-width":!0,options:e.availableReportFormats[e.reportType]},null,8,["title","modelValue","options"])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ss,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_flat",title:e.translate("CoreHome_FlattenReport"),modelValue:e.optionFlat,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.optionFlat=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Cs,[Object(a["withDirectives"])(Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_expanded",title:e.translate("CoreHome_ExpandSubtables"),modelValue:e.optionExpanded,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.optionExpanded=t})},null,8,["title","modelValue"]),[[a["vShow"],e.hasSubtables&&!e.optionFlat]])])]),Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Es,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"option_format_metrics",title:e.translate("CoreHome_FormatMetrics"),modelValue:e.optionFormatMetrics,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.optionFormatMetrics=t})},null,8,["title","modelValue"])])])]),Object(a["createElementVNode"])("div",Ds,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ps,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_type",title:e.translate("CoreHome_ReportType"),modelValue:e.reportType,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.reportType=t}),"full-width":!0,options:e.availableReportTypes},null,8,["title","modelValue","options"])])]),Object(a["createElementVNode"])("div",Vs,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ns,[Object(a["createVNode"])(l,{uicontrol:"radio",name:"filter_limit_all",title:e.translate("CoreHome_RowLimit"),modelValue:e.reportLimitAll,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.reportLimitAll=t}),"full-width":!0,options:e.limitAllOptions},null,8,["title","modelValue","options"])],512),[[a["vShow"],!e.maxFilterLimit||e.maxFilterLimit<=0]]),"no"===e.reportLimitAll&&e.maxFilterLimit<=0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ts,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,modelValue:e.reportLimit,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.reportLimit=t}),"full-width":!0},null,8,["modelValue"])])):Object(a["createCommentVNode"])("",!0),"no"===e.reportLimitAll&&e.maxFilterLimit>0?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",As,[Object(a["createVNode"])(l,{uicontrol:"number",name:"filter_limit",min:1,max:e.maxFilterLimit,modelValue:e.reportLimit,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.reportLimit=t}),value:e.reportLimit,"full-width":!0,title:e.filterLimitTooltip},null,8,["max","modelValue","value","title"])])):Object(a["createCommentVNode"])("",!0)])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Is,[Object(a["withDirectives"])(Object(a["createElementVNode"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},Ms,8,xs),[[c,{}]]),Object(a["createElementVNode"])("div",{class:"tooltip",innerHTML:e.$sanitize(e.translate("CoreHome_ExportTooltipWithLink","<a target=_blank href='?module=UsersManager&action=userSecurity'>","</a>","ENTER_YOUR_TOKEN_AUTH_HERE"))},null,8,Ls)],512),[[a["vShow"],e.showUrl]]),Object(a["createElementVNode"])("div",Fs,[Object(a["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(a["toDisplayString"])(e.translate("General_Export")),9,Rs),Object(a["createElementVNode"])("a",{href:"javascript:",onClick:t[8]||(t[8]=function(t){return e.showUrl=!e.showUrl}),class:"toggle-export-url"},[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_ShowExportUrl")),513),[[a["vShow"],!e.showUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("CoreHome_HideExportUrl")),513),[[a["vShow"],e.showUrl]])])])])}function $s(e,t){return Js(e)||Ws(e,t)||Us(e,t)||Hs()}function Hs(){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 Us(e,t){if(e){if("string"===typeof e)return qs(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)?qs(e,t):void 0}}function qs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ws(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return a}}function Js(e){if(Array.isArray(e))return e}var Gs=$n("CorePluginsAdmin","Field"),zs=Object(a["defineComponent"])({components:{Field:Gs},directives:{SelectOnFocus:vn},props:{hasSubtables:Boolean,availableReportTypes:Object,availableReportFormats:{type:Object,required:!0},maxFilterLimit:Number,limitAllOptions:Object,dataTable:{type:Object,required:!0},requestParams:[Object,String],apiMethod:{type:String,required:!0},initialReportType:{type:String,default:"default"},initialReportLimit:{type:[String,Number],default:100},initialReportLimitAll:{type:String,default:"yes"},initialOptionFlat:{type:Boolean,default:!1},initialOptionExpanded:{type:Boolean,default:!0},initialOptionFormatMetrics:{type:Boolean,default:!1},initialReportFormat:{type:String,default:"XML"}},data:function(){return{showUrl:!1,reportFormat:this.initialReportFormat,optionFlat:this.initialOptionFlat,optionExpanded:this.initialOptionExpanded,optionFormatMetrics:this.initialOptionFormatMetrics,reportType:this.initialReportType,reportLimitAll:this.initialReportLimitAll,reportLimit:"string"===typeof this.initialReportLimit?parseInt(this.initialReportLimit,10):this.initialReportLimit}},watch:{reportType:function(e){this.availableReportFormats[e][this.reportFormat]||(this.reportFormat="XML")},reportLimit:function(e,t){this.maxFilterLimit&&this.maxFilterLimit>0&&e>this.maxFilterLimit&&(this.reportLimit=t)}},computed:{filterLimitTooltip:function(){var e=C("CoreHome_RowLimit"),t=this.maxFilterLimit?C("General_ComputedMetricMax",this.maxFilterLimit.toString()):"";return"".concat(e," (").concat(t,")")},exportLink:function(){return this.getExportLink(!0)},exportLinkWithoutToken:function(){return this.getExportLink(!1)}},methods:{getExportLink:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.reportFormat,n=this.apiMethod,r=this.reportType,i=this.dataTable;if(t){var a={},o="yes"===this.reportLimitAll?-1:this.reportLimit;this.requestParams&&"string"===typeof this.requestParams&&(a=JSON.parse(this.requestParams));var l=i.param,c=l.segment,s=l.label,u=l.idGoal,d=l.idDimension,p=l.idSite,m=i.param,f=m.date,h=m.period;"RSS"===t&&(f="last10"),"undefined"!==typeof i.param.dateUsedInGraph&&(f=i.param.dateUsedInGraph);var g=S.config.datatable_export_range_as_day.toLowerCase();-1!==g.indexOf(t.toLowerCase())&&"range"===i.param.period&&(h="day"),"range"===i.param.period&&"graphEvolution"===i.param.viewDataTable&&(h="day");var v={module:"API",format:t,idSite:p,period:h,date:f};if("processed"===r){v.method="API.getProcessedReport";var b=n.split("."),y=$s(b,2);v.apiModule=y[0],v.apiAction=y[1]}else v.method=n;if(i.param.compareDates&&i.param.compareDates.length&&(v.compareDates=i.param.compareDates,v.compare="1"),i.param.comparePeriods&&i.param.comparePeriods.length&&(v.comparePeriods=i.param.comparePeriods,v.compare="1"),i.param.compareSegments&&i.param.compareSegments.length&&(v.compareSegments=i.param.compareSegments,v.compare="1"),"undefined"!==typeof i.param.filter_pattern&&(v.filter_pattern=i.param.filter_pattern),"undefined"!==typeof i.param.filter_pattern_recursive&&(v.filter_pattern_recursive=i.param.filter_pattern_recursive),window.$.isPlainObject(a)&&Object.entries(a).forEach((function(e){var t=$s(e,2),n=t[0],r=t[1],i=r;!0===i?i=1:!1===i&&(i=0),v[n]=i})),this.optionFlat&&(v.flat=1,"undefined"!==typeof i.param.include_aggregate_rows&&"1"===i.param.include_aggregate_rows&&(v.include_aggregate_rows=1)),!this.optionFlat&&this.optionExpanded&&(v.expanded=1),this.optionFormatMetrics&&(v.format_metrics=1),i.param.pivotBy&&(v.pivotBy=i.param.pivotBy,v.pivotByColumnLimit=20,i.props.pivot_by_column&&(v.pivotByColumn=i.props.pivot_by_column)),"CSV"!==t&&"TSV"!==t&&"RSS"!==t||(v.translateColumnNames=1,v.language=S.language),"undefined"!==typeof c&&(v.segment=decodeURIComponent(c)),"undefined"!==typeof u&&"-1"!==u&&(v.idGoal=u),"undefined"!==typeof d&&"-1"!==d&&(v.idDimension=d),s){var w=s.split(",");if(w.length>1)v.label=w;else{var O=$s(w,1);v.label=O[0]}}v.token_auth="ENTER_YOUR_TOKEN_AUTH_HERE",!0===e&&(v.token_auth=S.token_auth,v.force_api_session=1),v.filter_limit=o;var j=window.location.href.split("?")[0];return"".concat(j,"?").concat(Ee.stringify(v))}}}});zs.render=_s;var Ys=zs,Qs=window,Ks=Qs.$,Xs={mounted:function(e,t){e.addEventListener("click",(function(){var n=Ee.hashParsed.value.popover,r=Ks(e).closest("[data-report]").data("uiControlObject"),i=window.Piwik_Popover.showLoading("Export"),a=t.value.reportFormats,o=r.param.filter_limit;t.value.maxFilterLimit>0&&(o=Math.min(o,t.value.maxFilterLimit));var l=!0===r.param.flat||1===r.param.flat||"1"===r.param.flat,c={initialReportType:"default",initialReportLimit:o>0?o:100,initialReportLimitAll:-1===o?"yes":"no",initialOptionFlat:l,initialOptionExpanded:!0,initialOptionFormatMetrics:!1,hasSubtables:l||r.numberOfSubtables>0,availableReportFormats:{default:a,processed:{XML:a.XML,JSON:a.JSON}},availableReportTypes:{default:C("CoreHome_StandardReport"),processed:C("CoreHome_ReportWithMetadata")},limitAllOptions:{yes:C("General_All"),no:C("CoreHome_CustomLimit")},maxFilterLimit:t.value.maxFilterLimit,dataTable:r,requestParams:t.value.requestParams,apiMethod:t.value.apiMethod},s=dt({template:'\n <popover v-bind="bind"/>',data:function(){return{bind:c}}});s.component("popover",Ys);var u=document.createElement("div");s.mount(u);var d=t.value.reportTitle;window.Piwik_Popover.setTitle("".concat(C("General_Export")," ").concat(S.helper.htmlEntities(d))),window.Piwik_Popover.setContent(u),window.Piwik_Popover.onClose((function(){s.unmount(),""!==n&&setTimeout((function(){Ee.updateHash(Object.assign(Object.assign({},Ee.hashParsed.value),{},{popover:n})),t.value.onClose&&t.value.onClose()}),100)})),setTimeout((function(){i.dialog(),Ks(".exportFullUrl, .btn",i).tooltip({track:!0,show:!1,hide:!1})}),100)}))}}; /*! * Matomo - free/libre analytics platform * @@ -510,13 +510,13 @@ window.angular.module("piwikApp.service").factory("reportMetadataModel",(functio * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Xs(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",reportFormats:"@",apiMethod:"@",maxFilterLimit:"@"},link:function(t,n){var r={instance:null,value:{reportTitle:t.reportTitle,requestParams:t.requestParams,reportFormats:"string"===typeof t.reportFormats?JSON.parse(t.reportFormats):t.reportFormats,apiMethod:t.apiMethod,maxFilterLimit:parseInt(t.maxFilterLimit,10),onClose:function(){e((function(){window.angular.element(document).injector().get("$rootScope").$apply()}),10)}},oldValue:null,modifiers:{},dir:{}};Ks.mounted(n[0],r)}}}Xs.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikReportExport",Xs);var Zs=["src"];function eu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{src:e.sparklineUrl},null,8,Zs)}var tu=Object(a["defineComponent"])({props:{seriesIndices:Array,params:Object},data:function(){return{isWidget:!1}},mounted:function(){this.isWidget=!!this.$el.closest("[widgetId]")},computed:{sparklineUrl:function(){var e=this.seriesIndices,t=this.params,n=S.getSparklineColors();e&&(n.lineColor=n.lineColor.filter((function(t,n){return-1!==e.indexOf(n)})));var r=JSON.stringify(n),i={forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:r,random:Date.now(),date:this.defaultDate},a=new Xe,o=a.mixinDefaultGetParams(Object.assign(Object.assign({},i),t)),l=Ce.parsed.value.token_auth;return l&&l.length&&S.shouldPropagateTokenAuth&&(o.token_auth=l),"?".concat(Ce.stringify(o))},defaultDate:function(){if("range"===S.period)return"".concat(S.startDateString,",").concat(S.endDateString);var e=_.getLastNRange(S.period,30,S.currentDateString).getDateRange(),t=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay);e[0]<t&&(e[0]=t);var n=E(e[0]),r=E(e[1]);return"".concat(n,",").concat(r)}}});tu.render=eu;var nu=tu,ru=(jt({component:nu,scope:{seriesIndices:{angularJsBind:"<"},params:{angularJsBind:"<"}},directiveName:"piwikSparkline",restrict:"E"}),{class:"progressbar"}),iu={class:"progress"},au=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",style:{"margin-right":"3.5px"}},null,-1),ou=["innerHTML"]; +function Zs(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",reportFormats:"@",apiMethod:"@",maxFilterLimit:"@"},link:function(t,n){var r={instance:null,value:{reportTitle:t.reportTitle,requestParams:t.requestParams,reportFormats:"string"===typeof t.reportFormats?JSON.parse(t.reportFormats):t.reportFormats,apiMethod:t.apiMethod,maxFilterLimit:parseInt(t.maxFilterLimit,10),onClose:function(){e((function(){window.angular.element(document).injector().get("$rootScope").$apply()}),10)}},oldValue:null,modifiers:{},dir:{}};Xs.mounted(n[0],r)}}}Zs.$inject=["$timeout"],window.angular.module("piwikApp").directive("piwikReportExport",Zs);var eu=["src"];function tu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("img",{src:e.sparklineUrl},null,8,eu)}var nu=Object(a["defineComponent"])({props:{seriesIndices:Array,params:Object},data:function(){return{isWidget:!1}},mounted:function(){this.isWidget=!!this.$el.closest("[widgetId]")},computed:{sparklineUrl:function(){var e=this.seriesIndices,t=this.params,n=S.getSparklineColors();e&&(n.lineColor=n.lineColor.filter((function(t,n){return-1!==e.indexOf(n)})));var r=JSON.stringify(n),i={forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:r,random:Date.now(),date:this.defaultDate},a=new Ze,o=a.mixinDefaultGetParams(Object.assign(Object.assign({},i),t)),l=Ee.parsed.value.token_auth;return l&&l.length&&S.shouldPropagateTokenAuth&&(o.token_auth=l),"?".concat(Ee.stringify(o))},defaultDate:function(){if("range"===S.period)return"".concat(S.startDateString,",").concat(S.endDateString);var e=H.getLastNRange(S.period,30,S.currentDateString).getDateRange(),t=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay);e[0]<t&&(e[0]=t);var n=D(e[0]),r=D(e[1]);return"".concat(n,",").concat(r)}}});nu.render=tu;var ru=nu,iu=(kt({component:ru,scope:{seriesIndices:{angularJsBind:"<"},params:{angularJsBind:"<"}},directiveName:"piwikSparkline",restrict:"E"}),{class:"progressbar"}),au={class:"progress"},ou=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",style:{"margin-right":"3.5px"}},null,-1),lu=["innerHTML"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function lu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ru,[Object(a["createElementVNode"])("div",iu,[Object(a["createElementVNode"])("div",{class:"determinate",style:Object(a["normalizeStyle"])([{width:"0"},{width:"".concat(e.actualProgress,"%")}])},null,4)]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,[au,Object(a["createElementVNode"])("span",{class:"label",innerHTML:e.$sanitize(e.label)},null,8,ou)],512),[[a["vShow"],!!e.label]])])}var cu=Object(a["defineComponent"])({props:{progress:{type:Number,required:!0},label:String},computed:{actualProgress:function(){return this.progress>100?100:this.progress<0?0:this.progress}}});cu.render=lu;var su=cu,uu=(jt({component:su,scope:{progress:{angularJsBind:"="},label:{angularJsBind:"="}},directiveName:"piwikProgressbar"}),{mounted:function(e){e.classList.add("piwik-content-intro")},updated:function(e){Object(a["nextTick"])((function(){e.classList.add("piwik-content-intro")}))}}); + */function cu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",iu,[Object(a["createElementVNode"])("div",au,[Object(a["createElementVNode"])("div",{class:"determinate",style:Object(a["normalizeStyle"])([{width:"0"},{width:"".concat(e.actualProgress,"%")}])},null,4)]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,[ou,Object(a["createElementVNode"])("span",{class:"label",innerHTML:e.$sanitize(e.label)},null,8,lu)],512),[[a["vShow"],!!e.label]])])}var su=Object(a["defineComponent"])({props:{progress:{type:Number,required:!0},label:String},computed:{actualProgress:function(){return this.progress>100?100:this.progress<0?0:this.progress}}});su.render=cu;var uu=su,du=(kt({component:uu,scope:{progress:{angularJsBind:"="},label:{angularJsBind:"="}},directiveName:"piwikProgressbar"}),{mounted:function(e){e.classList.add("piwik-content-intro")},updated:function(e){Object(a["nextTick"])((function(){e.classList.add("piwik-content-intro")}))}}); /*! * Matomo - free/libre analytics platform * @@ -529,38 +529,38 @@ function Xs(e){return{restrict:"A",scope:{reportTitle:"@",requestParams:"@",repo * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function du(){return{restrict:"A",link:function(e,t){uu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentIntro",du); +function pu(){return{restrict:"A",link:function(e,t){du.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentIntro",pu); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var pu={mounted:function(e){e.classList.add("card","card-table","entityTable")},updated:function(e){Object(a["nextTick"])((function(){e.classList.add("card","card-table","entityTable")}))}}; + */var mu={mounted:function(e){e.classList.add("card","card-table","entityTable")},updated:function(e){Object(a["nextTick"])((function(){e.classList.add("card","card-table","entityTable")}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function mu(){return{restrict:"A",link:function(e,t){pu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentTable",mu);var fu={ref:"root"};function hu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fu,[Object(a["renderSlot"])(e.$slots,"default",{formData:e.formData,submitApiMethod:e.submitApiMethod,sendJsonPayload:e.sendJsonPayload,noErrorNotification:e.noErrorNotification,noSuccessNotification:e.noSuccessNotification,submitForm:e.submitForm,isSubmitting:e.isSubmitting,successfulPostResponse:e.successfulPostResponse,errorPostResponse:e.errorPostResponse})],512)}var gu=window,vu=gu.$,bu=Object(a["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data:function(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted:function(){var e=this;vu(this.$refs.root).on("click","input[type=submit]",(function(){e.submitForm()}))},methods:{submitForm:function(){var e=this;this.successfulPostResponse=null,this.errorPostResponse=null;var t=this.formData;this.sendJsonPayload&&(t={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,Xe.post({module:"API",method:this.submitApiMethod},t,{createErrorNotification:!this.noErrorNotification}).then((function(t){if(e.successfulPostResponse=t,!e.noSuccessNotification){var n=fl.show({message:C("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});fl.scrollToNotification(n)}})).catch((function(t){e.errorPostResponse=t.message})).finally((function(){e.isSubmitting=!1}))}}});bu.render=hu;var yu=bu,wu=window,Ou=wu.$; + */function fu(){return{restrict:"A",link:function(e,t){mu.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikContentTable",fu);var hu={ref:"root"};function gu(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hu,[Object(a["renderSlot"])(e.$slots,"default",{formData:e.formData,submitApiMethod:e.submitApiMethod,sendJsonPayload:e.sendJsonPayload,noErrorNotification:e.noErrorNotification,noSuccessNotification:e.noSuccessNotification,submitForm:e.submitForm,isSubmitting:e.isSubmitting,successfulPostResponse:e.successfulPostResponse,errorPostResponse:e.errorPostResponse})],512)}var vu=window,bu=vu.$,yu=Object(a["defineComponent"])({props:{formData:{type:Object,required:!0},submitApiMethod:{type:String,required:!0},sendJsonPayload:Boolean,noErrorNotification:Boolean,noSuccessNotification:Boolean},data:function(){return{isSubmitting:!1,successfulPostResponse:null,errorPostResponse:null}},emits:["update:modelValue"],mounted:function(){var e=this;bu(this.$refs.root).on("click","input[type=submit]",(function(){e.submitForm()}))},methods:{submitForm:function(){var e=this;this.successfulPostResponse=null,this.errorPostResponse=null;var t=this.formData;this.sendJsonPayload&&(t={data:JSON.stringify(this.formData)}),this.isSubmitting=!0,Ze.post({module:"API",method:this.submitApiMethod},t,{createErrorNotification:!this.noErrorNotification}).then((function(t){if(e.successfulPostResponse=t,!e.noSuccessNotification){var n=hl.show({message:C("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});hl.scrollToNotification(n)}})).catch((function(t){e.errorPostResponse=t.message})).finally((function(){e.isSubmitting=!1}))}}});yu.render=gu;var wu=yu,Ou=window,ju=Ou.$; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ju(e){return{restrict:"A",scope:{submitApiMethod:"=",sendJsonPayload:"=",noErrorNotification:"=",noSuccessNotification:"=",useCustomDataBinding:"="},require:"?ngModel",transclude:!0,compile:function(t,n){return n.noErrorNotification=!!n.noErrorNotification,function(t,n,r,i,o){if(!t.submitApiMethod)throw new Error("submitApiMethod is required");if(t.ajaxForm={},t.ajaxForm.submitApiMethod=t.submitApiMethod,t.ajaxForm.sendJsonPayload=t.sendJsonPayload,t.ajaxForm.noErrorNotification=t.noErrorNotification,t.ajaxForm.noSuccessNotification=t.noSuccessNotification,t.ajaxForm.data={},i){var l=e(r.ngModel);t.ajaxForm.data=l(t.$parent)}var c={mounted:function(e,n){t.ajaxForm.submitForm=n.value.submitForm}},s='\n <AjaxForm\n :form-data="data"\n :submit-api-method="submitApiMethod"\n :send-json-payload="sendJsonPayload"\n :no-error-notification="noErrorNotification"\n :no-success-notification="noSuccessNotification"\n >\n <template v-slot:default="ajaxFormVue">\n <div\n ref="transcludeTarget"\n v-special-bind-directive="{ submitForm: ajaxFormVue.submitForm }"\n />\n </template>\n </AjaxForm>',u=ut({template:s,data:function(){return t.ajaxForm},setup:function(){var e=Object(a["ref"])(null);return{transcludeTarget:e}}});u.component("AjaxForm",yu),u.directive("SpecialBindDirective",c);var d=u.mount(n[0]);function p(e,n){var r,i=Ou(e).attr("name");r="checkbox"===Ou(e).attr("type")?Ou(e).is(":checked"):Ou(e).val(),t.ajaxForm.data[i]=r,n||setTimeout((function(){t.$apply()}),0)}n.on("$destroy",(function(){u.unmount()})),t.useCustomDataBinding||n.on("change","input,select",(function(e){p(e.target)})),o(t,(function(e,t){if(!t.useCustomDataBinding){var n=e.find("input,select").not("[type=submit]");n.each((function(){p(this,!0)}))}Ou(d.transcludeTarget).append(e)}))}}}} + */function ku(e){return{restrict:"A",scope:{submitApiMethod:"=",sendJsonPayload:"=",noErrorNotification:"=",noSuccessNotification:"=",useCustomDataBinding:"="},require:"?ngModel",transclude:!0,compile:function(t,n){return n.noErrorNotification=!!n.noErrorNotification,function(t,n,r,i,o){if(!t.submitApiMethod)throw new Error("submitApiMethod is required");if(t.ajaxForm={},t.ajaxForm.submitApiMethod=t.submitApiMethod,t.ajaxForm.sendJsonPayload=t.sendJsonPayload,t.ajaxForm.noErrorNotification=t.noErrorNotification,t.ajaxForm.noSuccessNotification=t.noSuccessNotification,t.ajaxForm.data={},i){var l=e(r.ngModel);t.ajaxForm.data=l(t.$parent)}var c={mounted:function(e,n){t.ajaxForm.submitForm=n.value.submitForm}},s='\n <AjaxForm\n :form-data="data"\n :submit-api-method="submitApiMethod"\n :send-json-payload="sendJsonPayload"\n :no-error-notification="noErrorNotification"\n :no-success-notification="noSuccessNotification"\n >\n <template v-slot:default="ajaxFormVue">\n <div\n ref="transcludeTarget"\n v-special-bind-directive="{ submitForm: ajaxFormVue.submitForm }"\n />\n </template>\n </AjaxForm>',u=dt({template:s,data:function(){return t.ajaxForm},setup:function(){var e=Object(a["ref"])(null);return{transcludeTarget:e}}});u.component("AjaxForm",wu),u.directive("SpecialBindDirective",c);var d=u.mount(n[0]);function p(e,n){var r,i=ju(e).attr("name");r="checkbox"===ju(e).attr("type")?ju(e).is(":checked"):ju(e).val(),t.ajaxForm.data[i]=r,n||setTimeout((function(){t.$apply()}),0)}n.on("$destroy",(function(){u.unmount()})),t.useCustomDataBinding||n.on("change","input,select",(function(e){p(e.target)})),o(t,(function(e,t){if(!t.useCustomDataBinding){var n=e.find("input,select").not("[type=submit]");n.each((function(){p(this,!0)}))}ju(d.transcludeTarget).append(e)}))}}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function ku(e,t){var n,r=parseInt(t,10),i=parseInt(e,10)-r;return n=0===i||Number.isNaN(i)?0:0===r||Number.isNaN(r)?100:i/r*100,n}function Su(e){return"".concat(e>0?S.numbers.symbolPlus:"").concat(Math.round(e),"}%")}function Cu(e,t){var n=ku(e,t);return Su(n)} +function Su(e,t){var n,r=parseInt(t,10),i=parseInt(e,10)-r;return n=0===i||Number.isNaN(i)?0:0===r||Number.isNaN(r)?100:i/r*100,n}function Cu(e){return"".concat(e>0?S.numbers.symbolPlus:"").concat(Math.round(e),"}%")}function Eu(e,t){var n=Su(e,t);return Cu(n)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ju.$inject=["$parse"],window.angular.module("piwikApp").directive("piwikAjaxForm",ju);var Eu=jt({component:ho,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});function Du(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function Pu(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Vu(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")} + */ku.$inject=["$parse"],window.angular.module("piwikApp").directive("piwikAjaxForm",ku);var Du=kt({component:go,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"});function Pu(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function Vu(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Nu(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")} /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts b/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts index 84cb965fc6..614d128056 100644 --- a/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts +++ b/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts @@ -6,7 +6,7 @@ */ import ActivityIndicator from './ActivityIndicator.vue'; -import translate from '../translate'; +import { translate } from '../translate'; import createAngularJsAdapter from '../createAngularJsAdapter'; export default createAngularJsAdapter({ diff --git a/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue b/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue index a5f27080dc..ea3daf5ddb 100644 --- a/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue +++ b/plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue @@ -14,7 +14,7 @@ <script lang="ts"> import { defineComponent } from 'vue'; -import translate from '../translate'; +import { translate } from '../translate'; export default defineComponent({ props: { diff --git a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue index 935f438b62..2a84ef2559 100644 --- a/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue +++ b/plugins/CoreHome/vue/src/AjaxForm/AjaxForm.vue @@ -23,7 +23,7 @@ <script lang="ts"> import { defineComponent } from 'vue'; -import translate from '../translate'; +import { translate } from '../translate'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import { NotificationsStore } from '../Notification'; diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts b/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts index f6734c3e56..3c7659dde6 100644 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts +++ b/plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts @@ -13,7 +13,7 @@ import { } from 'vue'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import Matomo from '../Matomo/Matomo'; -import translate from '../translate'; +import { translate } from '../translate'; import Periods from '../Periods/Periods'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import SegmentsStore from '../Segmentation/Segments.store'; diff --git a/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue b/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue index 62bf2f04cc..d9ab36781d 100644 --- a/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue +++ b/plugins/CoreHome/vue/src/Comparisons/Comparisons.vue @@ -76,7 +76,7 @@ import ComparisonsStoreInstance from './Comparisons.store.instance'; import Matomo from '../Matomo/Matomo'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; -import translate from '../translate'; +import { translate } from '../translate'; import Tooltips from '../Tooltips/Tooltips'; interface ProcessedReportComparison { diff --git a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue index 2e7b60ab64..15f8d10e78 100644 --- a/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue +++ b/plugins/CoreHome/vue/src/PeriodSelector/PeriodSelector.vue @@ -165,7 +165,7 @@ import DateRangePicker from '../DateRangePicker/DateRangePicker.vue'; import PeriodDatePicker from '../PeriodDatePicker/PeriodDatePicker.vue'; import ActivityIndicator from '../ActivityIndicator/ActivityIndicator.vue'; import Matomo from '../Matomo/Matomo'; -import translate from '../translate'; +import { translate } from '../translate'; import ComparisonsStore from '../Comparisons/Comparisons.store.instance'; import useExternalPluginComponent from '../useExternalPluginComponent'; import { diff --git a/plugins/CoreHome/vue/src/Periods/Day.ts b/plugins/CoreHome/vue/src/Periods/Day.ts index f4150d9a35..f6a49efa07 100644 --- a/plugins/CoreHome/vue/src/Periods/Day.ts +++ b/plugins/CoreHome/vue/src/Periods/Day.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import translate from '../translate'; +import { translate } from '../translate'; import Periods from './Periods'; import { parseDate, format, todayIsInRange } from './utilities'; diff --git a/plugins/CoreHome/vue/src/Periods/Month.ts b/plugins/CoreHome/vue/src/Periods/Month.ts index 2924745912..ea19981dbc 100644 --- a/plugins/CoreHome/vue/src/Periods/Month.ts +++ b/plugins/CoreHome/vue/src/Periods/Month.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import translate from '../translate'; +import { translate } from '../translate'; import Periods from './Periods'; import { parseDate, todayIsInRange } from './utilities'; diff --git a/plugins/CoreHome/vue/src/Periods/Range.ts b/plugins/CoreHome/vue/src/Periods/Range.ts index f1c092d7da..144a945c91 100644 --- a/plugins/CoreHome/vue/src/Periods/Range.ts +++ b/plugins/CoreHome/vue/src/Periods/Range.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import translate from '../translate'; +import { translate } from '../translate'; import Periods from './Periods'; import { parseDate, diff --git a/plugins/CoreHome/vue/src/Periods/Week.ts b/plugins/CoreHome/vue/src/Periods/Week.ts index 4bb45ceedf..2045fb4afe 100644 --- a/plugins/CoreHome/vue/src/Periods/Week.ts +++ b/plugins/CoreHome/vue/src/Periods/Week.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import translate from '../translate'; +import { translate } from '../translate'; import Periods from './Periods'; import { parseDate, format, todayIsInRange } from './utilities'; diff --git a/plugins/CoreHome/vue/src/Periods/Year.ts b/plugins/CoreHome/vue/src/Periods/Year.ts index 9f9c0c0c88..178781af37 100644 --- a/plugins/CoreHome/vue/src/Periods/Year.ts +++ b/plugins/CoreHome/vue/src/Periods/Year.ts @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -import translate from '../translate'; +import { translate } from '../translate'; import Periods from './Periods'; import { parseDate, todayIsInRange } from './utilities'; diff --git a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue b/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue index a9ae4a65f3..c86008c139 100644 --- a/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue +++ b/plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue @@ -99,7 +99,7 @@ import { DeepReadonly, defineComponent } from 'vue'; import FocusAnywhereButHere from '../FocusAnywhereButHere/FocusAnywhereButHere'; import FocusIf from '../FocusIf/FocusIf'; -import translate from '../translate'; +import { translate } from '../translate'; import SitesStore from '../SiteSelector/SitesStore'; import Site from '../SiteSelector/Site'; import Matomo from '../Matomo/Matomo'; diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts b/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts index f5e5d334d6..f7f8a07430 100644 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts +++ b/plugins/CoreHome/vue/src/ReportExport/ReportExport.ts @@ -7,7 +7,7 @@ import { DirectiveBinding } from 'vue'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import translate from '../translate'; +import { translate } from '../translate'; import ReportExportPopover from './ReportExportPopover.vue'; import Matomo from '../Matomo/Matomo'; import createVueApp from '../createVueApp'; diff --git a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue index 2df26563d8..37caea1e2b 100644 --- a/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue +++ b/plugins/CoreHome/vue/src/ReportExport/ReportExportPopover.vue @@ -150,7 +150,7 @@ import useExternalPluginComponent from '../useExternalPluginComponent'; import SelectOnFocus from '../SelectOnFocus/SelectOnFocus'; import Matomo from '../Matomo/Matomo'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import translate from '../translate'; +import { translate } from '../translate'; interface DataTable { param: Record<string, string|string[]>; diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts index 108318ec76..2241b23d8e 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts +++ b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.store.ts @@ -8,7 +8,7 @@ import { computed, reactive, readonly } from 'vue'; import ReportingPagesStoreInstance from '../ReportingPages/ReportingPages.store'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import translate from '../translate'; +import { translate } from '../translate'; import { sortOrderables } from '../Orderable'; import { Category, CategoryContainer, getCategoryChildren } from './Category'; import { getSubcategoryChildren, Subcategory, SubcategoryContainer } from './Subcategory'; diff --git a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue index 49a4073266..463e42989f 100644 --- a/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue +++ b/plugins/CoreHome/vue/src/ReportingMenu/ReportingMenu.vue @@ -145,7 +145,7 @@ import { NotificationsStore } from '../Notification'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import ReportingMenuStoreInstance from './ReportingMenu.store'; import Matomo from '../Matomo/Matomo'; -import translate from '../translate'; +import { translate } from '../translate'; import WidgetsStoreInstance from '../Widget/Widgets.store'; import { Category, CategoryContainer } from './Category'; import { Subcategory, SubcategoryContainer } from './Subcategory'; diff --git a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue index 5f9dec0367..2cba4525ae 100644 --- a/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue +++ b/plugins/CoreHome/vue/src/ReportingPage/ReportingPage.vue @@ -52,7 +52,7 @@ import ReportingPageStoreInstance from './ReportingPage.store'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; import { Periods } from '../Periods'; import { NotificationsStore } from '../Notification'; -import translate from '../translate'; +import { translate } from '../translate'; import Matomo from '../Matomo/Matomo'; import ReportingPagesStoreInstance from '../ReportingPages/ReportingPages.store'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; diff --git a/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts b/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts index db5d495d88..76d5c0c53a 100644 --- a/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts +++ b/plugins/CoreHome/vue/src/ShowSensitiveData/ShowSensitiveData.ts @@ -6,7 +6,7 @@ */ import { DirectiveBinding } from 'vue'; -import translate from '../translate'; +import { translate } from '../translate'; interface ShowSensitiveDataArgs { sensitiveData: string; diff --git a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue index f05d59a7b0..5d115f8136 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue +++ b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue @@ -126,7 +126,7 @@ import FocusIf from '../FocusIf/FocusIf'; import AllSitesLink from './AllSitesLink.vue'; import Matomo from '../Matomo/Matomo'; import MatomoUrl from '../MatomoUrl/MatomoUrl'; -import translate from '../translate'; +import { translate } from '../translate'; import SitesStore from './SitesStore'; import debounce from '../debounce'; import SiteRef from './SiteRef'; diff --git a/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue b/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue index 76548ccc26..2d1eeea6a7 100644 --- a/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue +++ b/plugins/CoreHome/vue/src/WidgetLoader/WidgetLoader.vue @@ -32,7 +32,7 @@ import { IRootScopeService, IScope } from 'angular'; import { defineComponent } from 'vue'; import ActivityIndicator from '../ActivityIndicator/ActivityIndicator.vue'; -import translate from '../translate'; +import { translate } from '../translate'; import Matomo from '../Matomo/Matomo'; import AjaxHelper from '../AjaxHelper/AjaxHelper'; import { NotificationsStore } from '../Notification'; diff --git a/plugins/CoreHome/vue/src/createVueApp.ts b/plugins/CoreHome/vue/src/createVueApp.ts index c968a892a1..65caca5251 100644 --- a/plugins/CoreHome/vue/src/createVueApp.ts +++ b/plugins/CoreHome/vue/src/createVueApp.ts @@ -6,7 +6,7 @@ */ import { createApp } from 'vue'; -import translate from './translate'; +import { translate, translateOrDefault } from './translate'; export default function createVueApp( ...args: Parameters<typeof createApp> @@ -14,5 +14,6 @@ export default function createVueApp( const app = createApp(...args); app.config.globalProperties.$sanitize = window.vueSanitize; app.config.globalProperties.translate = translate; + app.config.globalProperties.translateOrDefault = translateOrDefault; return app; } diff --git a/plugins/CoreHome/vue/src/index.ts b/plugins/CoreHome/vue/src/index.ts index 3080549c03..63113e7b5f 100644 --- a/plugins/CoreHome/vue/src/index.ts +++ b/plugins/CoreHome/vue/src/index.ts @@ -71,7 +71,7 @@ export { } from './createAngularJsAdapter'; export { default as activityIndicatorAdapter } from './ActivityIndicator/ActivityIndicator.adapter'; export { default as ActivityIndicator } from './ActivityIndicator/ActivityIndicator.vue'; -export { default as translate } from './translate'; +export * from './translate'; export { default as Alert } from './Alert/Alert.vue'; export { default as AjaxHelper, AjaxOptions } from './AjaxHelper/AjaxHelper'; export { setCookie, getCookie, deleteCookie } from './CookieHelper/CookieHelper'; diff --git a/plugins/CoreHome/vue/src/translate.ts b/plugins/CoreHome/vue/src/translate.ts index 8df4fe2fc4..37f9184bfe 100644 --- a/plugins/CoreHome/vue/src/translate.ts +++ b/plugins/CoreHome/vue/src/translate.ts @@ -5,10 +5,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -export default function translate( +export function translate( translationStringId: string, ...values: (string|string[])[] ): string { + if (!translationStringId) { + return ''; + } + let pkArgs = values as string[]; // handle variadic args AND single array of values (to match _pk_translate signature) if (values.length === 1 && values[0] && Array.isArray(values[0])) { @@ -16,3 +20,20 @@ export default function translate( } return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line } + +export function translateOrDefault( + translationStringIdOrText?: string, + ...values: (string|string[])[] +): string { + if (!translationStringIdOrText || !window.piwik_translations[translationStringIdOrText]) { + return translationStringIdOrText!; + } + + let pkArgs = values as string[]; + // handle variadic args AND single array of values (to match _pk_translate signature) + if (values.length === 1 && values[0] && Array.isArray(values[0])) { + [pkArgs] = values as string[][]; + } + + return window._pk_translate(translationStringIdOrText, pkArgs); // eslint-disable-line +} diff --git a/plugins/CoreVue/types/index.d.ts b/plugins/CoreVue/types/index.d.ts index f038a54fde..dcc0229382 100644 --- a/plugins/CoreVue/types/index.d.ts +++ b/plugins/CoreVue/types/index.d.ts @@ -225,6 +225,7 @@ declare global { declare module '@vue/runtime-core' { export interface ComponentCustomProperties { translate: (translationStringId: string, ...values: string[]|string[][]) => string; + translateOrDefault: (translationStringIdOrText: string, ...values: string[]|string[][]) => string; $sanitize: Window['vueSanitize']; } } diff --git a/plugins/GeoIp2/vue/dist/GeoIp2.umd.js b/plugins/GeoIp2/vue/dist/GeoIp2.umd.js index 75a3f46248..31abf9a446 100644 --- a/plugins/GeoIp2/vue/dist/GeoIp2.umd.js +++ b/plugins/GeoIp2/vue/dist/GeoIp2.umd.js @@ -149,7 +149,7 @@ var external_CoreHome_ = __webpack_require__("19dc"); // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); -// 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/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=template&id=423508b8 +// 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/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=template&id=23b5cb60 var _hoisted_1 = { key: 0 @@ -341,7 +341,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }, 8, ["content-title"]); } -// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=template&id=423508b8 +// CONCATENATED MODULE: ./plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue?vue&type=template&id=23b5cb60 // EXTERNAL MODULE: external "CorePluginsAdmin" var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); @@ -398,7 +398,8 @@ var _window = window, orgDbUrl: '', updatePeriod: this.geoipUpdatePeriod || 'month', isUpdatingGeoIpDatabase: false, - downloadErrorMessage: null + downloadErrorMessage: null, + nextRunTimePrettyUpdated: undefined }; }, methods: { diff --git a/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js b/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js index e634cb447e..b2cbaa9234 100644 --- a/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js +++ b/plugins/GeoIp2/vue/dist/GeoIp2.umd.min.js @@ -1,4 +1,4 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["GeoIp2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["GeoIp2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/GeoIp2/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Geoip2Updater",(function(){return W})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var a=n("19dc"),i=n("8bbf"),l={key:0},d={key:0},c={id:"manage-geoip-dbs"},s={class:"row",id:"geoipdb-screen1"},p={class:"geoipdb-column-1 col s6"},u=Object(i["createElementVNode"])("sup",null,[Object(i["createElementVNode"])("small",null,"*")],-1),b={class:"geoipdb-column-2 col s6"},m=["innerHTML"],g={class:"geoipdb-column-1 col s6"},f=["value"],j={class:"geoipdb-column-2 col s6"},O=["value"],h={class:"row"},w=Object(i["createTextVNode"])("* "),I=["innerHTML"],v={id:"geoipdb-screen2-download"},N={key:1,id:"geoipdb-update-info"},U=["innerHTML"],D=Object(i["createElementVNode"])("br",null,null,-1),G=Object(i["createElementVNode"])("br",null,null,-1),k=["innerHTML"],x=["innerHTML"],y=Object(i["createElementVNode"])("br",null,null,-1),P=Object(i["createElementVNode"])("br",null,null,-1),V={id:"locationProviderUpdatePeriodInlineHelp",class:"inline-help-node",ref:"inlineHelpNode"},E=["innerHTML"],_={key:1},T=Object(i["createElementVNode"])("br",null,null,-1),L=Object(i["createElementVNode"])("br",null,null,-1),B=["innerHTML"],S=["value"],C=Object(i["createElementVNode"])("div",{id:"done-updating-updater"},null,-1),M=Object(i["createElementVNode"])("div",{id:"geoipdb-update-info-error"},null,-1),H=["innerHTML"],F={key:1},R={class:"form-description"};function A(e,t,n,o,r,a){var A=Object(i["resolveComponent"])("Progressbar"),J=Object(i["resolveComponent"])("Field"),q=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createBlock"])(q,{"content-title":e.contentTitle,id:"geoip-db-mangement"},{default:Object(i["withCtx"])((function(){return[e.showGeoipUpdateSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[e.geoipDatabaseInstalled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",d,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("GeoIp2_NotManagingGeoIPDBs")),1),Object(i["createElementVNode"])("div",c,[Object(i["createElementVNode"])("div",s,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("GeoIp2_IWantToDownloadFreeGeoIP")),1),u])]),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.purchasedGeoIpText)},null,8,m)]),Object(i["createElementVNode"])("div",g,[Object(i["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[0]||(t[0]=function(t){return e.startDownloadFreeGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,f)]),Object(i["createElementVNode"])("div",j,[Object(i["createElementVNode"])("input",{type:"button",class:"btn",id:"start-automatic-update-geoip",onClick:t[1]||(t[1]=function(t){return e.startAutomaticUpdateGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,O)])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("sup",null,[w,Object(i["createElementVNode"])("small",{innerHTML:e.$sanitize(e.accuracyNote)},null,8,I)])])])])],512),[[i["vShow"],e.showPiwikNotManagingInfo]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",v,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(A,{label:e.freeProgressbarLabel,progress:e.progressFreeDownload},null,8,["label","progress"])])],512),[[i["vShow"],e.showFreeDownload]])])),e.geoipDatabaseInstalled&&!e.downloadErrorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",N,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.geoIPUpdaterInstructions)},null,8,U),D,G,e.dbipLiteUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.geoliteCityLink)},null,8,k)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.maxMindLinkExplanation)},null,8,x),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[y,P,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("GeoIp2_GeoIPUpdaterIntro"))+": ",1)],512),[[i["vShow"],e.geoipDatabaseInstalled]])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"text",name:"geoip-location-db",introduction:e.translate("GeoIp2_LocationDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.translate("GeoIp2_LocationDatabaseHint"),modelValue:e.locationDbUrl,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.locationDbUrl=t})},null,8,["introduction","title","inline-help","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"text",name:"geoip-isp-db",introduction:e.translate("GeoIp2_ISPDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.providerPluginHelp,modelValue:e.ispDbUrl,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.ispDbUrl=t}),disabled:!e.isProviderPluginActive},null,8,["introduction","title","inline-help","modelValue","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"radio",name:"geoip-update-period",introduction:e.translate("GeoIp2_DownloadNewDatabasesEvery"),modelValue:e.updatePeriod,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.updatePeriod=t}),options:e.updatePeriodOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",V,[e.lastTimeUpdaterRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.translate("GeoIp2_UpdaterWasLastRun",e.lastTimeUpdaterRun))},null,8,E)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",_,Object(i["toDisplayString"])(e.translate("GeoIp2_UpdaterHasNotBeenRun")),1)),T,L,Object(i["createElementVNode"])("div",{id:"geoip-updater-next-run-time",innerHTML:e.$sanitize(e.nextRunTimeText)},null,8,B)],512)]})),_:1},8,["introduction","modelValue","options"])]),Object(i["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[5]||(t[5]=function(t){return e.saveGeoIpLinks()}),value:e.buttonUpdateSaveText},null,8,S),Object(i["createElementVNode"])("div",null,[C,M,Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createVNode"])(A,{progress:e.progressUpdateDownload,label:e.progressUpdateLabel},null,8,["progress","label"]),[[i["vShow"],e.isUpdatingGeoIpDatabase]])])])])):Object(i["createCommentVNode"])("",!0),e.downloadErrorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:2,innerHTML:e.$sanitize(e.downloadErrorMessage)},null,8,H)):Object(i["createCommentVNode"])("",!0)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",F,[Object(i["createElementVNode"])("p",R,Object(i["toDisplayString"])(e.translate("GeoIp2_CannotSetupGeoIPAutoUpdating")),1)]))]})),_:1},8,["content-title"])}var J=n("a5a2"),q=window,$=q.$,z=Object(i["defineComponent"])({props:{geoipDatabaseStartedInstalled:Boolean,showGeoipUpdateSection:{type:Boolean,required:!0},dbipLiteUrl:{type:String,required:!0},dbipLiteFilename:{type:String,required:!0},geoipLocUrl:String,isProviderPluginActive:Boolean,geoipIspUrl:String,lastTimeUpdaterRun:String,geoipUpdatePeriod:String,updatePeriodOptions:{type:Object,required:!0},nextRunTime:Number,nextRunTimePretty:String},components:{Progressbar:a["Progressbar"],Field:J["Field"],ContentBlock:a["ContentBlock"]},data:function(){return{geoipDatabaseInstalled:!!this.geoipDatabaseStartedInstalled,showFreeDownload:!1,showPiwikNotManagingInfo:!0,progressFreeDownload:0,progressUpdateDownload:0,buttonUpdateSaveText:Object(a["translate"])("General_Save"),progressUpdateLabel:"",locationDbUrl:this.geoipLocUrl||"",ispDbUrl:this.geoipIspUrl||"",orgDbUrl:"",updatePeriod:this.geoipUpdatePeriod||"month",isUpdatingGeoIpDatabase:!1,downloadErrorMessage:null}},methods:{startDownloadFreeGeoIp:function(){var e=this;this.showFreeDownload=!0,this.showPiwikNotManagingInfo=!1,this.progressFreeDownload=0,this.downloadNextChunk("downloadFreeDBIPLiteDB",(function(t){e.progressFreeDownload=t}),!1,{}).then((function(){window.location.reload()})).catch((function(t){e.geoipDatabaseInstalled=!0,e.downloadErrorMessage=t.message}))},startAutomaticUpdateGeoIp:function(){this.buttonUpdateSaveText=Object(a["translate"])("General_Continue"),this.showGeoIpUpdateInfo()},showGeoIpUpdateInfo:function(){this.geoipDatabaseInstalled=!0},saveGeoIpLinks:function(){var e=this;return a["AjaxHelper"].post({period:this.updatePeriod,module:"GeoIp2",action:"updateGeoIPLinks"},{loc_db:this.locationDbUrl,isp_db:this.ispDbUrl,org_db:this.orgDbUrl},{withTokenInUrl:!0}).then((function(t){return e.downloadNextFileIfNeeded(t,null)})).then((function(t){e.progressUpdateLabel="",e.isUpdatingGeoIpDatabase=!1,a["NotificationsStore"].show({message:Object(a["translate"])("General_Done"),placeat:"#done-updating-updater",context:"success",noclear:!0,type:"toast",style:{display:"inline-block"},id:"userCountryGeoIpUpdate"}),e.nextRunTimePrettyUpdated=t.nextRunTime,$(e.$refs.inlineHelpNode).effect("highlight",{color:"#FFFFCB"},2e3)})).catch((function(t){e.isUpdatingGeoIpDatabase=!1,a["NotificationsStore"].show({message:t.message,placeat:"#geoipdb-update-info-error",context:"error",style:{display:"inline-block"},id:"userCountryGeoIpUpdate",type:"transient"})}))},downloadNextFileIfNeeded:function(e,t){var n=this;if(null!==e&&void 0!==e&&e.to_download){var o=t===e.to_download;return this.progressUpdateDownload=0,this.progressUpdateLabel=e.to_download_label,this.isUpdatingGeoIpDatabase=!0,this.downloadNextChunk("downloadMissingGeoIpDb",(function(e){n.progressUpdateDownload=e}),o,{key:e.to_download}).then((function(t){return n.downloadNextFileIfNeeded(t,e.to_download)}))}return Promise.resolve(e)},downloadNextChunk:function(e,t,n,o){var r=this,i=Object.assign({},o);return a["AjaxHelper"].post({module:"GeoIp2",action:e,continue:n?1:0},i,{withTokenInUrl:!0}).catch((function(){throw new Error(Object(a["translate"])("GeoIp2_FatalErrorDuringDownload"))})).then((function(n){if(n.error)throw new Error(n.error);var a=Math.floor(n.current_size/n.expected_file_size*100);return t(Math.min(a,100)),a<100?r.downloadNextChunk(e,t,!0,o):n}))}},computed:{nextRunTimeText:function(){return this.nextRunTimePrettyUpdated?this.nextRunTimePrettyUpdated:this.nextRunTime?1e3*this.nextRunTime<Date.now()?Object(a["translate"])("GeoIp2_UpdaterScheduledForNextRun"):Object(a["translate"])("GeoIp2_UpdaterWillRunNext","<strong>".concat(this.nextRunTimePretty,"</strong>")):Object(a["translate"])("GeoIp2_UpdaterIsNotScheduledToRun")},providerPluginHelp:function(){if(!this.isProviderPluginActive){var e=Object(a["translate"])("GeoIp2_ISPRequiresProviderPlugin");return"<div style=\"margin:0\" class='alert alert-warning'>".concat(e,"</div>")}},contentTitle:function(){return Object(a["translate"])(this.geoipDatabaseInstalled?"GeoIp2_SetupAutomaticUpdatesOfGeoIP":"GeoIp2_GeoIPDatabases")},accuracyNote:function(){return Object(a["translate"])("UserCountry_GeoIpDbIpAccuracyNote",'<a href="https://dev.maxmind.com/geoip/geoip2/geolite2/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>")},purchasedGeoIpText:function(){var e="http://www.maxmind.com/en/geolocation_landing?rId=piwik";return Object(a["translate"])("GeoIp2_IPurchasedGeoIPDBs",'<a rel="noreferrer noopener" href="'.concat(e,'" target="_blank">'),"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/db/?refid=mtm" target="_blank">',"</a>")},geoIPUpdaterInstructions:function(){return Object(a["translate"])("GeoIp2_GeoIPUpdaterInstructions",'<a href="http://www.maxmind.com/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")},geoliteCityLink:function(){var e=Object(a["translate"])("GeoIp2_GeoLiteCityLink",'<a rel="noreferrer noopener" href="'.concat(this.dbipLiteUrl,'" target="_blank">'),this.dbipLiteUrl,"</a>");return"".concat(e,"<br /><br />")},maxMindLinkExplanation:function(){var e="https://matomo.org/faq/how-to/how-do-i-get-the-geolocation-download-url-for-the-free-maxmind-db/";return Object(a["translate"])("UserCountry_MaxMindLinkExplanation",'<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>")},freeProgressbarLabel:function(){return Object(a["translate"])("GeoIp2_DownloadingDb",'<a href="'.concat(this.dbipLiteUrl,'">').concat(this.dbipLiteFilename,"</a>..."))}}});z.render=A;var W=z; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["GeoIp2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["GeoIp2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/GeoIp2/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Geoip2Updater",(function(){return W})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var a=n("19dc"),i=n("8bbf"),l={key:0},d={key:0},c={id:"manage-geoip-dbs"},s={class:"row",id:"geoipdb-screen1"},p={class:"geoipdb-column-1 col s6"},u=Object(i["createElementVNode"])("sup",null,[Object(i["createElementVNode"])("small",null,"*")],-1),b={class:"geoipdb-column-2 col s6"},m=["innerHTML"],g={class:"geoipdb-column-1 col s6"},f=["value"],j={class:"geoipdb-column-2 col s6"},O=["value"],h={class:"row"},w=Object(i["createTextVNode"])("* "),I=["innerHTML"],v={id:"geoipdb-screen2-download"},U={key:1,id:"geoipdb-update-info"},N=["innerHTML"],D=Object(i["createElementVNode"])("br",null,null,-1),G=Object(i["createElementVNode"])("br",null,null,-1),x=["innerHTML"],k=["innerHTML"],y=Object(i["createElementVNode"])("br",null,null,-1),P=Object(i["createElementVNode"])("br",null,null,-1),V={id:"locationProviderUpdatePeriodInlineHelp",class:"inline-help-node",ref:"inlineHelpNode"},E=["innerHTML"],_={key:1},T=Object(i["createElementVNode"])("br",null,null,-1),L=Object(i["createElementVNode"])("br",null,null,-1),B=["innerHTML"],S=["value"],C=Object(i["createElementVNode"])("div",{id:"done-updating-updater"},null,-1),M=Object(i["createElementVNode"])("div",{id:"geoipdb-update-info-error"},null,-1),H=["innerHTML"],F={key:1},R={class:"form-description"};function A(e,t,n,o,r,a){var A=Object(i["resolveComponent"])("Progressbar"),J=Object(i["resolveComponent"])("Field"),q=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createBlock"])(q,{"content-title":e.contentTitle,id:"geoip-db-mangement"},{default:Object(i["withCtx"])((function(){return[e.showGeoipUpdateSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[e.geoipDatabaseInstalled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",d,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("GeoIp2_NotManagingGeoIPDBs")),1),Object(i["createElementVNode"])("div",c,[Object(i["createElementVNode"])("div",s,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("GeoIp2_IWantToDownloadFreeGeoIP")),1),u])]),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.purchasedGeoIpText)},null,8,m)]),Object(i["createElementVNode"])("div",g,[Object(i["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[0]||(t[0]=function(t){return e.startDownloadFreeGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,f)]),Object(i["createElementVNode"])("div",j,[Object(i["createElementVNode"])("input",{type:"button",class:"btn",id:"start-automatic-update-geoip",onClick:t[1]||(t[1]=function(t){return e.startAutomaticUpdateGeoIp()}),value:"".concat(e.translate("General_GetStarted"),"...")},null,8,O)])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("sup",null,[w,Object(i["createElementVNode"])("small",{innerHTML:e.$sanitize(e.accuracyNote)},null,8,I)])])])])],512),[[i["vShow"],e.showPiwikNotManagingInfo]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",v,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(A,{label:e.freeProgressbarLabel,progress:e.progressFreeDownload},null,8,["label","progress"])])],512),[[i["vShow"],e.showFreeDownload]])])),e.geoipDatabaseInstalled&&!e.downloadErrorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",U,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.geoIPUpdaterInstructions)},null,8,N),D,G,e.dbipLiteUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.geoliteCityLink)},null,8,x)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.maxMindLinkExplanation)},null,8,k),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[y,P,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("GeoIp2_GeoIPUpdaterIntro"))+": ",1)],512),[[i["vShow"],e.geoipDatabaseInstalled]])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"text",name:"geoip-location-db",introduction:e.translate("GeoIp2_LocationDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.translate("GeoIp2_LocationDatabaseHint"),modelValue:e.locationDbUrl,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.locationDbUrl=t})},null,8,["introduction","title","inline-help","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"text",name:"geoip-isp-db",introduction:e.translate("GeoIp2_ISPDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.providerPluginHelp,modelValue:e.ispDbUrl,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.ispDbUrl=t}),disabled:!e.isProviderPluginActive},null,8,["introduction","title","inline-help","modelValue","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(J,{uicontrol:"radio",name:"geoip-update-period",introduction:e.translate("GeoIp2_DownloadNewDatabasesEvery"),modelValue:e.updatePeriod,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.updatePeriod=t}),options:e.updatePeriodOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",V,[e.lastTimeUpdaterRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.translate("GeoIp2_UpdaterWasLastRun",e.lastTimeUpdaterRun))},null,8,E)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",_,Object(i["toDisplayString"])(e.translate("GeoIp2_UpdaterHasNotBeenRun")),1)),T,L,Object(i["createElementVNode"])("div",{id:"geoip-updater-next-run-time",innerHTML:e.$sanitize(e.nextRunTimeText)},null,8,B)],512)]})),_:1},8,["introduction","modelValue","options"])]),Object(i["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[5]||(t[5]=function(t){return e.saveGeoIpLinks()}),value:e.buttonUpdateSaveText},null,8,S),Object(i["createElementVNode"])("div",null,[C,M,Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createVNode"])(A,{progress:e.progressUpdateDownload,label:e.progressUpdateLabel},null,8,["progress","label"]),[[i["vShow"],e.isUpdatingGeoIpDatabase]])])])])):Object(i["createCommentVNode"])("",!0),e.downloadErrorMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:2,innerHTML:e.$sanitize(e.downloadErrorMessage)},null,8,H)):Object(i["createCommentVNode"])("",!0)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",F,[Object(i["createElementVNode"])("p",R,Object(i["toDisplayString"])(e.translate("GeoIp2_CannotSetupGeoIPAutoUpdating")),1)]))]})),_:1},8,["content-title"])}var J=n("a5a2"),q=window,$=q.$,z=Object(i["defineComponent"])({props:{geoipDatabaseStartedInstalled:Boolean,showGeoipUpdateSection:{type:Boolean,required:!0},dbipLiteUrl:{type:String,required:!0},dbipLiteFilename:{type:String,required:!0},geoipLocUrl:String,isProviderPluginActive:Boolean,geoipIspUrl:String,lastTimeUpdaterRun:String,geoipUpdatePeriod:String,updatePeriodOptions:{type:Object,required:!0},nextRunTime:Number,nextRunTimePretty:String},components:{Progressbar:a["Progressbar"],Field:J["Field"],ContentBlock:a["ContentBlock"]},data:function(){return{geoipDatabaseInstalled:!!this.geoipDatabaseStartedInstalled,showFreeDownload:!1,showPiwikNotManagingInfo:!0,progressFreeDownload:0,progressUpdateDownload:0,buttonUpdateSaveText:Object(a["translate"])("General_Save"),progressUpdateLabel:"",locationDbUrl:this.geoipLocUrl||"",ispDbUrl:this.geoipIspUrl||"",orgDbUrl:"",updatePeriod:this.geoipUpdatePeriod||"month",isUpdatingGeoIpDatabase:!1,downloadErrorMessage:null,nextRunTimePrettyUpdated:void 0}},methods:{startDownloadFreeGeoIp:function(){var e=this;this.showFreeDownload=!0,this.showPiwikNotManagingInfo=!1,this.progressFreeDownload=0,this.downloadNextChunk("downloadFreeDBIPLiteDB",(function(t){e.progressFreeDownload=t}),!1,{}).then((function(){window.location.reload()})).catch((function(t){e.geoipDatabaseInstalled=!0,e.downloadErrorMessage=t.message}))},startAutomaticUpdateGeoIp:function(){this.buttonUpdateSaveText=Object(a["translate"])("General_Continue"),this.showGeoIpUpdateInfo()},showGeoIpUpdateInfo:function(){this.geoipDatabaseInstalled=!0},saveGeoIpLinks:function(){var e=this;return a["AjaxHelper"].post({period:this.updatePeriod,module:"GeoIp2",action:"updateGeoIPLinks"},{loc_db:this.locationDbUrl,isp_db:this.ispDbUrl,org_db:this.orgDbUrl},{withTokenInUrl:!0}).then((function(t){return e.downloadNextFileIfNeeded(t,null)})).then((function(t){e.progressUpdateLabel="",e.isUpdatingGeoIpDatabase=!1,a["NotificationsStore"].show({message:Object(a["translate"])("General_Done"),placeat:"#done-updating-updater",context:"success",noclear:!0,type:"toast",style:{display:"inline-block"},id:"userCountryGeoIpUpdate"}),e.nextRunTimePrettyUpdated=t.nextRunTime,$(e.$refs.inlineHelpNode).effect("highlight",{color:"#FFFFCB"},2e3)})).catch((function(t){e.isUpdatingGeoIpDatabase=!1,a["NotificationsStore"].show({message:t.message,placeat:"#geoipdb-update-info-error",context:"error",style:{display:"inline-block"},id:"userCountryGeoIpUpdate",type:"transient"})}))},downloadNextFileIfNeeded:function(e,t){var n=this;if(null!==e&&void 0!==e&&e.to_download){var o=t===e.to_download;return this.progressUpdateDownload=0,this.progressUpdateLabel=e.to_download_label,this.isUpdatingGeoIpDatabase=!0,this.downloadNextChunk("downloadMissingGeoIpDb",(function(e){n.progressUpdateDownload=e}),o,{key:e.to_download}).then((function(t){return n.downloadNextFileIfNeeded(t,e.to_download)}))}return Promise.resolve(e)},downloadNextChunk:function(e,t,n,o){var r=this,i=Object.assign({},o);return a["AjaxHelper"].post({module:"GeoIp2",action:e,continue:n?1:0},i,{withTokenInUrl:!0}).catch((function(){throw new Error(Object(a["translate"])("GeoIp2_FatalErrorDuringDownload"))})).then((function(n){if(n.error)throw new Error(n.error);var a=Math.floor(n.current_size/n.expected_file_size*100);return t(Math.min(a,100)),a<100?r.downloadNextChunk(e,t,!0,o):n}))}},computed:{nextRunTimeText:function(){return this.nextRunTimePrettyUpdated?this.nextRunTimePrettyUpdated:this.nextRunTime?1e3*this.nextRunTime<Date.now()?Object(a["translate"])("GeoIp2_UpdaterScheduledForNextRun"):Object(a["translate"])("GeoIp2_UpdaterWillRunNext","<strong>".concat(this.nextRunTimePretty,"</strong>")):Object(a["translate"])("GeoIp2_UpdaterIsNotScheduledToRun")},providerPluginHelp:function(){if(!this.isProviderPluginActive){var e=Object(a["translate"])("GeoIp2_ISPRequiresProviderPlugin");return"<div style=\"margin:0\" class='alert alert-warning'>".concat(e,"</div>")}},contentTitle:function(){return Object(a["translate"])(this.geoipDatabaseInstalled?"GeoIp2_SetupAutomaticUpdatesOfGeoIP":"GeoIp2_GeoIPDatabases")},accuracyNote:function(){return Object(a["translate"])("UserCountry_GeoIpDbIpAccuracyNote",'<a href="https://dev.maxmind.com/geoip/geoip2/geolite2/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>")},purchasedGeoIpText:function(){var e="http://www.maxmind.com/en/geolocation_landing?rId=piwik";return Object(a["translate"])("GeoIp2_IPurchasedGeoIPDBs",'<a rel="noreferrer noopener" href="'.concat(e,'" target="_blank">'),"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/db/?refid=mtm" target="_blank">',"</a>")},geoIPUpdaterInstructions:function(){return Object(a["translate"])("GeoIp2_GeoIPUpdaterInstructions",'<a href="http://www.maxmind.com/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")},geoliteCityLink:function(){var e=Object(a["translate"])("GeoIp2_GeoLiteCityLink",'<a rel="noreferrer noopener" href="'.concat(this.dbipLiteUrl,'" target="_blank">'),this.dbipLiteUrl,"</a>");return"".concat(e,"<br /><br />")},maxMindLinkExplanation:function(){var e="https://matomo.org/faq/how-to/how-do-i-get-the-geolocation-download-url-for-the-free-maxmind-db/";return Object(a["translate"])("UserCountry_MaxMindLinkExplanation",'<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>")},freeProgressbarLabel:function(){return Object(a["translate"])("GeoIp2_DownloadingDb",'<a href="'.concat(this.dbipLiteUrl,'">').concat(this.dbipLiteFilename,"</a>..."))}}});z.render=A;var W=z; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue b/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue index 83e84dd15a..ceca56f526 100644 --- a/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue +++ b/plugins/GeoIp2/vue/src/Geoip2Updater/Geoip2Updater.vue @@ -240,6 +240,7 @@ export default defineComponent({ updatePeriod: this.geoipUpdatePeriod || 'month', isUpdatingGeoIpDatabase: false, downloadErrorMessage: null, + nextRunTimePrettyUpdated: undefined, }; }, methods: { diff --git a/plugins/UserCountry/LocationProvider/DefaultProvider.php b/plugins/UserCountry/LocationProvider/DefaultProvider.php index e5f311fed6..4c426eef6b 100644 --- a/plugins/UserCountry/LocationProvider/DefaultProvider.php +++ b/plugins/UserCountry/LocationProvider/DefaultProvider.php @@ -111,10 +111,10 @@ class DefaultProvider extends LocationProvider */ public function getInfo() { - $desc = Piwik::translate('UserCountry_DefaultLocationProviderDesc1') . ' ' + $desc = '<p>' . Piwik::translate('UserCountry_DefaultLocationProviderDesc1') . ' ' . Piwik::translate('UserCountry_DefaultLocationProviderDesc2', array('<strong>', '', '', '</strong>')) - . '<p><a href="https://matomo.org/faq/how-to/#faq_163" rel="noreferrer noopener" target="_blank">' + . '</p><p><a href="https://matomo.org/faq/how-to/#faq_163" rel="noreferrer noopener" target="_blank">' . Piwik::translate('UserCountry_HowToInstallGeoIPDatabases') . '</a></p>'; return array('id' => self::ID, 'title' => self::TITLE, 'description' => $desc, 'order' => 1); diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php index 4fea13b899..a91b2e95d8 100644 --- a/plugins/UserCountry/UserCountry.php +++ b/plugins/UserCountry/UserCountry.php @@ -24,6 +24,7 @@ class UserCountry extends \Piwik\Plugin public function registerEvents() { return array( + 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys', 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJavaScriptFiles' => 'getJsFiles', 'Tracker.setTrackerCacheGeneral' => 'setTrackerCacheGeneral', @@ -31,6 +32,19 @@ class UserCountry extends \Piwik\Plugin ); } + public function getClientSideTranslationKeys(&$translations) + { + $translations[] = 'General_InfoFor'; + $translations[] = 'General_NotInstalled'; + $translations[] = 'General_Installed'; + $translations[] = 'General_Broken'; + $translations[] = 'UserCountry_CurrentLocationIntro'; + $translations[] = 'General_Refresh'; + $translations[] = 'UserCountry_CannotLocalizeLocalIP'; + $translations[] = 'UserCountry_NoProviders'; + $translations[] = 'General_Disabled'; + } + public function addReportToInsightsOverview(&$reports) { $reports['UserCountry_getCountry'] = array(); @@ -48,8 +62,6 @@ class UserCountry extends \Piwik\Plugin public function getJsFiles(&$jsFiles) { - $jsFiles[] = "plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.controller.js"; - $jsFiles[] = "plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.directive.js"; } /** diff --git a/plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.controller.js b/plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.controller.js deleted file mode 100644 index a415e15686..0000000000 --- a/plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.controller.js +++ /dev/null @@ -1,72 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ -(function () { - angular.module('piwikApp').controller('LocationProviderSelectionController', LocationProviderSelectionController); - - LocationProviderSelectionController.$inject = ['piwikApi']; - - function LocationProviderSelectionController(piwikApi) { - var self = this; - - this.isLoading = false; - this.updateLoading = {}; - - // handle 'refresh location' link click - this.refreshProviderInfo = function (providerId) { - - this.updateLoading[providerId] = true; - - // this should not be in a controller... ideally we fetch this data always from client side and do not - // prefill it server side - var $locationNode = $('.provider' + providerId + ' .location'); - $locationNode.css('visibility', 'hidden'); - - piwikApi.fetch({ - module: 'UserCountry', - action: 'getLocationUsingProvider', - id: providerId, - format: 'html' - }).then(function (response) { - self.updateLoading[providerId] = false; - $locationNode.html('<strong>' + response + '</strong>').css('visibility', 'visible'); - }, function () { - self.updateLoading[providerId] = false; - }); - }; - - this.save = function () { - if (!this.selectedProvider) { - return; - } - - this.isLoading = true; - - var parent = $(this).closest('p'), - loading = $('.loadingPiwik', parent), - ajaxSuccess = $('.success', parent); - - piwikApi.withTokenInUrl(); - piwikApi.fetch({ - method: 'UserCountry.setLocationProvider', - providerId: this.selectedProvider - }).then(function () { - self.isLoading = false; - var UI = require('piwik/UI'); - var notification = new UI.Notification(); - notification.show(_pk_translate('General_Done'), { - context: 'success', - noclear: true, - type: 'toast', - id: 'userCountryLocationProvider' - }); - notification.scrollToNotification(); - }, function () { - self.isLoading = false; - }); - }; - } -})();
\ No newline at end of file diff --git a/plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.directive.js b/plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.directive.js deleted file mode 100644 index e5bc4efb5b..0000000000 --- a/plugins/UserCountry/angularjs/location-provider-selection/location-provider-selection.directive.js +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/** - * Usage: - * <div piwik-location-provider-selection> - */ -(function () { - angular.module('piwikApp').directive('piwikLocationProviderSelection', piwikLocationProviderSelection); - - piwikLocationProviderSelection.$inject = ['piwik']; - - function piwikLocationProviderSelection(piwik){ - - return { - restrict: 'A', - transclude: true, - controller: 'LocationProviderSelectionController', - controllerAs: 'locationSelector', - template: '<div ng-transclude></div>', - compile: function (element, attrs) { - - return function (scope, element, attrs, controller) { - controller.selectedProvider = attrs.piwikLocationProviderSelection; - }; - } - }; - } -})();
\ No newline at end of file diff --git a/plugins/UserCountry/stylesheets/userCountry.less b/plugins/UserCountry/stylesheets/userCountry.less index 515513bf8d..1fb2dce597 100644 --- a/plugins/UserCountry/stylesheets/userCountry.less +++ b/plugins/UserCountry/stylesheets/userCountry.less @@ -44,4 +44,10 @@ span.is-broken { [name="geoip-isp-db"] .alert { margin-bottom: 0; +} + +.locationProviderSelection { + .loadingPiwik { + padding: 1px; + } }
\ No newline at end of file diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig index 20cc6deede..658bcc0b27 100644 --- a/plugins/UserCountry/templates/adminIndex.twig +++ b/plugins/UserCountry/templates/adminIndex.twig @@ -12,97 +12,16 @@ <p>{{ 'UserCountry_GeolocationPageDesc'|translate }}</p> </div> <div piwik-content-block content-title="{{ 'UserCountry_LocationProvider'|translate|e('html_attr') }}"> -<div piwik-location-provider-selection="{{ currentProviderId|e('html_attr') }}"> - - {% if not isThereWorkingProvider %} - {{ setUpGuides|raw }} - {% endif %} - - <div class="row"> - <div class="col s12 push-m9 m3">{{ 'General_InfoFor'|translate(thisIP) }}</div> - </div> - - {% for id,provider in locationProviders|filter(provider => provider.isVisible) %} - <div class="row form-group provider{{ id|e('html_attr') }}"> - <div class="col s12 m4 l2"> - <p> - <label> - <input class="location-provider" - name="location-provider" - value="{{ id }}" - type="radio" - ng-model="locationSelector.selectedProvider" - id="provider_input_{{ id }}" {% if provider.status != 1 %}disabled="disabled"{% endif %}/> - - <span>{{ provider.title|translate }}</span> - </label> - </p> - <p class="loc-provider-status"> - {% if provider.status == 0 %} - <span class="is-not-installed">{{ 'General_NotInstalled'|translate}}</span> - {% elseif provider.status == 1 %} - <span class="is-installed">{{ 'General_Installed'|translate }}</span> - {% elseif provider.status == 2 %} - <span class="is-broken">{{ 'General_Broken'|translate }}</span> - {% endif %} - </p> - </div> - <div class="col s12 m4 l6"> - <p>{{ provider.description|translate|raw }}</p> - {% if provider.status != 1 and provider.install_docs is defined %} - <p>{{ provider.install_docs|raw }}</p> - {% endif %} - </div> - <div class="col s12 m4 l4"> - {% if provider.status == 1 %} - <div class="form-help"> - {% if thisIP != '127.0.0.1' %} - {{ 'UserCountry_CurrentLocationIntro'|translate }}: - <div> - <br/> - <div style="position: absolute;" - piwik-activity-indicator - loading='locationSelector.updateLoading[{{ id|json_encode }}]'></div> - <span class="location"><strong>{{ provider.location|raw }}</strong></span> - </div> - <div class="text-right"> - <a href="javascript:;" - ng-click='locationSelector.refreshProviderInfo({{ id|json_encode }})'>{{ 'General_Refresh'|translate }}</a> - </div> - {% else %} - {{ 'UserCountry_CannotLocalizeLocalIP'|translate(thisIP) }} - {% endif %} - </div> - {% endif %} - {% if provider.statusMessage is defined and provider.statusMessage %} - <div class="form-help"> - {% if provider.status == 2 %}<strong>{{ 'General_Error'|translate }}:</strong> {% endif %}{{ provider.statusMessage|raw }} - </div> - {% endif %} - {% if provider.extra_message is defined and provider.extra_message %} - <div class="form-help"> - {{ provider.extra_message|raw }} - </div> - {% endif %} - </div> - </div> - {% endfor %} - - - {% if locationProviders|filter(provider => ( - provider.id != constant("Piwik\\Plugins\\UserCountry\\LocationProvider\\DefaultProvider::ID") and - provider.id != constant("Piwik\\Plugins\\UserCountry\\LocationProvider\\DisabledProvider::ID") - ))|length == 0 %} - <div piwik-notification - noclear="true" - context="warning"> - {{ 'UserCountry_NoProviders'|translate('<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm">','</a>')|raw }} - </div> - {% endif %} - - <div piwik-save-button onconfirm="locationSelector.save()" saving="locationSelector.isLoading"></div> - -</div> +<div + vue-entry="UserCountry.LocationProviderSelection" + current-provider-id="{{ currentProviderId|json_encode|e('html_attr') }}" + is-there-working-provider="{{ isThereWorkingProvider|default(null)|json_encode|e('html_attr') }}" + set-up-guides="{{ setUpGuides|default(null)|json_encode|e('html_attr') }}" + this-ip="{{ thisIP|default(null)|json_encode|e('html_attr') }}" + location-providers="{{ locationProviders|default(null)|json_encode|e('html_attr') }}" + default-provider-id="{{ constant("Piwik\\Plugins\\UserCountry\\LocationProvider\\DefaultProvider::ID")|default(null)|json_encode|e('html_attr') }}" + disabled-provider-id="{{ constant("Piwik\\Plugins\\UserCountry\\LocationProvider\\DisabledProvider::ID")|default(null)|json_encode|e('html_attr') }}" +></div> </div> {{ configurations|raw }} diff --git a/plugins/UserCountry/vue/dist/UserCountry.umd.js b/plugins/UserCountry/vue/dist/UserCountry.umd.js new file mode 100644 index 0000000000..a6e7f01ed1 --- /dev/null +++ b/plugins/UserCountry/vue/dist/UserCountry.umd.js @@ -0,0 +1,456 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("CoreHome"), require("vue"), require("CorePluginsAdmin")); + else if(typeof define === 'function' && define.amd) + define(["CoreHome", , "CorePluginsAdmin"], factory); + else if(typeof exports === 'object') + exports["UserCountry"] = factory(require("CoreHome"), require("vue"), require("CorePluginsAdmin")); + else + root["UserCountry"] = factory(root["CoreHome"], root["Vue"], root["CorePluginsAdmin"]); +})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__19dc__, __WEBPACK_EXTERNAL_MODULE__8bbf__, __WEBPACK_EXTERNAL_MODULE_a5a2__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "plugins/UserCountry/vue/dist/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "fae3"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "19dc": +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__19dc__; + +/***/ }), + +/***/ "8bbf": +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__; + +/***/ }), + +/***/ "a5a2": +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_a5a2__; + +/***/ }), + +/***/ "fae3": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "LocationProviderSelection", function() { return /* reexport */ LocationProviderSelection; }); + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js +// This file is imported into lib/wc client bundles. + +if (typeof window !== 'undefined') { + var currentScript = window.document.currentScript + if (false) { var getCurrentScript; } + + var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/) + if (src) { + __webpack_require__.p = src[1] // eslint-disable-line + } +} + +// Indicate to webpack that this file can be concatenated +/* harmony default export */ var setPublicPath = (null); + +// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"} +var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf"); + +// 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/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue?vue&type=template&id=2fa21635 + +var _hoisted_1 = { + class: "locationProviderSelection" +}; +var _hoisted_2 = ["innerHTML"]; +var _hoisted_3 = { + class: "row" +}; +var _hoisted_4 = { + class: "col s12 push-m9 m3" +}; +var _hoisted_5 = { + class: "col s12 m4 l2" +}; +var _hoisted_6 = ["id", "disabled", "checked", "onChange"]; +var _hoisted_7 = { + class: "loc-provider-status" +}; +var _hoisted_8 = { + key: 0, + class: "is-not-installed" +}; +var _hoisted_9 = { + key: 1, + class: "is-installed" +}; +var _hoisted_10 = { + key: 2, + class: "is-broken" +}; +var _hoisted_11 = { + class: "col s12 m4 l6" +}; +var _hoisted_12 = ["innerHTML"]; +var _hoisted_13 = ["innerHTML"]; +var _hoisted_14 = { + class: "col s12 m4 l4" +}; +var _hoisted_15 = { + key: 0, + class: "form-help" +}; +var _hoisted_16 = { + key: 0 +}; + +var _hoisted_17 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); + +var _hoisted_18 = { + style: { + "position": "absolute" + } +}; +var _hoisted_19 = ["innerHTML"]; +var _hoisted_20 = { + class: "text-right" +}; +var _hoisted_21 = ["onClick"]; +var _hoisted_22 = { + key: 1 +}; +var _hoisted_23 = { + key: 1, + class: "form-help" +}; +var _hoisted_24 = { + key: 0 +}; +var _hoisted_25 = ["innerHTML"]; +var _hoisted_26 = ["innerHTML"]; +var _hoisted_27 = { + key: 1 +}; +var _hoisted_28 = ["innerHTML"]; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator"); + + var _component_Notification = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Notification"); + + var _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_1, [!_ctx.isThereWorkingProvider ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: 0, + innerHTML: _ctx.$sanitize(_ctx.setUpGuides || '') + }, null, 8, _hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_InfoFor', _ctx.thisIp)), 1)]), (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.visibleLocationProviders, function (provider, id) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: id, + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])("row form-group provider".concat(id)) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + class: "location-provider", + name: "location-provider", + type: "radio", + id: "provider_input_".concat(id), + disabled: provider.status !== 1, + checked: _ctx.selectedProvider === id, + onChange: function onChange($event) { + return _ctx.selectedProvider = id; + } + }, null, 40, _hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translateOrDefault(provider.title)), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", _hoisted_7, [provider.status === 0 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_NotInstalled')), 1)) : provider.status === 1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_9, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Installed')), 1)) : provider.status === 2 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", _hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Broken')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { + innerHTML: _ctx.$sanitize(_ctx.translateOrDefault(provider.description)) + }, null, 8, _hoisted_12), provider.status !== 1 && provider.install_docs ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", { + key: 0, + innerHTML: _ctx.$sanitize(provider.install_docs) + }, null, 8, _hoisted_13)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_14, [provider.status === 1 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_15, [_ctx.thisIp !== '127.0.0.1' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UserCountry_CurrentLocationIntro')) + ": ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [_hoisted_17, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_18, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, { + loading: _ctx.updateLoading[id] + }, null, 8, ["loading"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "location", + style: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeStyle"])({ + visibility: _ctx.providerLocations[id] ? 'visible' : 'hidden' + }) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", { + innerHTML: _ctx.$sanitize(_ctx.providerLocations[id] || ' ') + }, null, 8, _hoisted_19)], 4)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + onClick: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { + return _ctx.refreshProviderInfo(id); + }, ["prevent"]) + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Refresh')), 9, _hoisted_21)])])) : (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_22, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UserCountry_CannotLocalizeLocalIP', _ctx.thisIp)), 1))])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), provider.statusMessage ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_23, [provider.status === 2 ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("strong", _hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Error')) + ":", 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + innerHTML: _ctx.$sanitize(provider.statusMessage) + }, null, 8, _hoisted_25)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), provider.extra_message ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + key: 2, + class: "form-help", + innerHTML: _ctx.$sanitize(provider.extra_message) + }, null, 8, _hoisted_26)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])], 2); + }), 128)), !Object.keys(_ctx.locationProvidersNotDefaultOrDisabled).length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", _hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Notification, { + noclear: true, + context: "warning" + }, { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + innerHTML: _ctx.$sanitize(_ctx.noProvidersText) + }, null, 8, _hoisted_28)]; + }), + _: 1 + })])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SaveButton, { + onConfirm: _cache[0] || (_cache[0] = function ($event) { + return _ctx.save(); + }), + saving: _ctx.isLoading + }, null, 8, ["saving"])]); +} +// CONCATENATED MODULE: ./plugins/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue?vue&type=template&id=2fa21635 + +// EXTERNAL MODULE: external "CoreHome" +var external_CoreHome_ = __webpack_require__("19dc"); + +// EXTERNAL MODULE: external "CorePluginsAdmin" +var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); + +// 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/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue?vue&type=script&lang=ts +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + + +/* harmony default export */ var LocationProviderSelectionvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + currentProviderId: { + type: String, + required: true + }, + isThereWorkingProvider: Boolean, + setUpGuides: String, + thisIp: { + type: String, + required: true + }, + locationProviders: { + type: Object, + required: true + }, + defaultProviderId: { + type: String, + required: true + }, + disabledProviderId: { + type: String, + required: true + } + }, + components: { + ActivityIndicator: external_CoreHome_["ActivityIndicator"], + Notification: external_CoreHome_["Notification"], + SaveButton: external_CorePluginsAdmin_["SaveButton"] + }, + data: function data() { + return { + isLoading: false, + updateLoading: {}, + selectedProvider: this.currentProviderId, + providerLocations: Object.fromEntries(Object.entries(this.locationProviders).map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + k = _ref2[0], + p = _ref2[1]; + + return [k, p.location]; + })) + }; + }, + methods: { + refreshProviderInfo: function refreshProviderInfo(providerId) { + var _this = this; + + // this should not be in a controller... ideally we fetch this data always from client side + // and do not prefill it server side + this.updateLoading[providerId] = true; + delete this.providerLocations[providerId]; + external_CoreHome_["AjaxHelper"].fetch({ + module: 'UserCountry', + action: 'getLocationUsingProvider', + id: providerId, + format: 'html' + }, { + format: 'html' + }).then(function (response) { + _this.providerLocations[providerId] = response; + }).finally(function () { + _this.updateLoading[providerId] = false; + }); + }, + save: function save() { + var _this2 = this; + + if (!this.selectedProvider) { + return; + } + + this.isLoading = true; + external_CoreHome_["AjaxHelper"].fetch({ + method: 'UserCountry.setLocationProvider', + providerId: this.selectedProvider + }, { + withTokenInUrl: true + }).then(function () { + var notificationInstanceId = external_CoreHome_["NotificationsStore"].show({ + message: Object(external_CoreHome_["translate"])('General_Done'), + context: 'success', + noclear: true, + type: 'toast', + id: 'userCountryLocationProvider' + }); + external_CoreHome_["NotificationsStore"].scrollToNotification(notificationInstanceId); + }).finally(function () { + _this2.isLoading = false; + }); + } + }, + computed: { + visibleLocationProviders: function visibleLocationProviders() { + return Object.fromEntries(Object.entries(this.locationProviders).filter(function (_ref3) { + var _ref4 = _slicedToArray(_ref3, 2), + p = _ref4[1]; + + return p.isVisible; + })); + }, + locationProvidersNotDefaultOrDisabled: function locationProvidersNotDefaultOrDisabled() { + var _this3 = this; + + return Object.fromEntries(Object.entries(this.locationProviders).filter(function (_ref5) { + var _ref6 = _slicedToArray(_ref5, 2), + p = _ref6[1]; + + return p.id !== _this3.defaultProviderId && p.id !== _this3.disabledProviderId; + })); + }, + noProvidersText: function noProvidersText() { + return Object(external_CoreHome_["translate"])('UserCountry_NoProviders', '<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">', '</a>'); + } + } +})); +// CONCATENATED MODULE: ./plugins/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue + + + +LocationProviderSelectionvue_type_script_lang_ts.render = render + +/* harmony default export */ var LocationProviderSelection = (LocationProviderSelectionvue_type_script_lang_ts); +// CONCATENATED MODULE: ./plugins/UserCountry/vue/src/index.ts +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js + + + + +/***/ }) + +/******/ }); +}); +//# sourceMappingURL=UserCountry.umd.js.map
\ No newline at end of file diff --git a/plugins/UserCountry/vue/dist/UserCountry.umd.min.js b/plugins/UserCountry/vue/dist/UserCountry.umd.min.js new file mode 100644 index 0000000000..850c46d8f2 --- /dev/null +++ b/plugins/UserCountry/vue/dist/UserCountry.umd.min.js @@ -0,0 +1,8 @@ +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["UserCountry"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["UserCountry"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,r){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="plugins/UserCountry/vue/dist/",r(r.s="fae3")}({"19dc":function(t,r){t.exports=e},"8bbf":function(e,r){e.exports=t},a5a2:function(e,t){e.exports=r},fae3:function(e,t,r){"use strict";if(r.r(t),r.d(t,"LocationProviderSelection",(function(){return $})),"undefined"!==typeof window){var n=window.document.currentScript,o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(r.p=o[1])}var i=r("8bbf"),c={class:"locationProviderSelection"},a=["innerHTML"],l={class:"row"},s={class:"col s12 push-m9 m3"},d={class:"col s12 m4 l2"},u=["id","disabled","checked","onChange"],b={class:"loc-provider-status"},f={key:0,class:"is-not-installed"},p={key:1,class:"is-installed"},m={key:2,class:"is-broken"},v={class:"col s12 m4 l6"},j=["innerHTML"],O=["innerHTML"],y={class:"col s12 m4 l4"},g={key:0,class:"form-help"},h={key:0},k=Object(i["createElementVNode"])("br",null,null,-1),N={style:{position:"absolute"}},P=["innerHTML"],E={class:"text-right"},C=["onClick"],L={key:1},B={key:1,class:"form-help"},V={key:0},S=["innerHTML"],I=["innerHTML"],x={key:1},T=["innerHTML"];function _(e,t,r,n,o,_){var M=Object(i["resolveComponent"])("ActivityIndicator"),H=Object(i["resolveComponent"])("Notification"),w=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",c,[e.isThereWorkingProvider?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.setUpGuides||"")},null,8,a)),Object(i["createElementVNode"])("div",l,[Object(i["createElementVNode"])("div",s,Object(i["toDisplayString"])(e.translate("General_InfoFor",e.thisIp)),1)]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.visibleLocationProviders,(function(t,r){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:r,class:Object(i["normalizeClass"])("row form-group provider".concat(r))},[Object(i["createElementVNode"])("div",d,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("label",null,[Object(i["createElementVNode"])("input",{class:"location-provider",name:"location-provider",type:"radio",id:"provider_input_".concat(r),disabled:1!==t.status,checked:e.selectedProvider===r,onChange:function(t){return e.selectedProvider=r}},null,40,u),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translateOrDefault(t.title)),1)])]),Object(i["createElementVNode"])("p",b,[0===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",f,Object(i["toDisplayString"])(e.translate("General_NotInstalled")),1)):1===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",p,Object(i["toDisplayString"])(e.translate("General_Installed")),1)):2===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",m,Object(i["toDisplayString"])(e.translate("General_Broken")),1)):Object(i["createCommentVNode"])("",!0)])]),Object(i["createElementVNode"])("div",v,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translateOrDefault(t.description))},null,8,j),1!==t.status&&t.install_docs?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(t.install_docs)},null,8,O)):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",y,[1===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",g,["127.0.0.1"!==e.thisIp?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",h,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("UserCountry_CurrentLocationIntro"))+": ",1),Object(i["createElementVNode"])("div",null,[k,Object(i["createElementVNode"])("div",N,[Object(i["createVNode"])(M,{loading:e.updateLoading[r]},null,8,["loading"])]),Object(i["createElementVNode"])("span",{class:"location",style:Object(i["normalizeStyle"])({visibility:e.providerLocations[r]?"visible":"hidden"})},[Object(i["createElementVNode"])("strong",{innerHTML:e.$sanitize(e.providerLocations[r]||" ")},null,8,P)],4)]),Object(i["createElementVNode"])("div",E,[Object(i["createElementVNode"])("a",{onClick:Object(i["withModifiers"])((function(t){return e.refreshProviderInfo(r)}),["prevent"])},Object(i["toDisplayString"])(e.translate("General_Refresh")),9,C)])])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",L,Object(i["toDisplayString"])(e.translate("UserCountry_CannotLocalizeLocalIP",e.thisIp)),1))])):Object(i["createCommentVNode"])("",!0),t.statusMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",B,[2===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("strong",V,Object(i["toDisplayString"])(e.translate("General_Error"))+":",1)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(t.statusMessage)},null,8,S)])):Object(i["createCommentVNode"])("",!0),t.extra_message?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:2,class:"form-help",innerHTML:e.$sanitize(t.extra_message)},null,8,I)):Object(i["createCommentVNode"])("",!0)])],2)})),128)),Object.keys(e.locationProvidersNotDefaultOrDisabled).length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",x,[Object(i["createVNode"])(H,{noclear:!0,context:"warning"},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noProvidersText)},null,8,T)]})),_:1})])),Object(i["createVNode"])(w,{onConfirm:t[0]||(t[0]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])])}var M=r("19dc"),H=r("a5a2");function w(e,t){return z(e)||q(e,t)||A(e,t)||D()}function D(){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 A(e,t){if(e){if("string"===typeof e)return U(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function q(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],c=!0,a=!1;try{for(r=r.call(e);!(c=(n=r.next()).done);c=!0)if(i.push(n.value),t&&i.length===t)break}catch(l){a=!0,o=l}finally{try{c||null==r["return"]||r["return"]()}finally{if(a)throw o}}return i}}function z(e){if(Array.isArray(e))return e}var G=Object(i["defineComponent"])({props:{currentProviderId:{type:String,required:!0},isThereWorkingProvider:Boolean,setUpGuides:String,thisIp:{type:String,required:!0},locationProviders:{type:Object,required:!0},defaultProviderId:{type:String,required:!0},disabledProviderId:{type:String,required:!0}},components:{ActivityIndicator:M["ActivityIndicator"],Notification:M["Notification"],SaveButton:H["SaveButton"]},data:function(){return{isLoading:!1,updateLoading:{},selectedProvider:this.currentProviderId,providerLocations:Object.fromEntries(Object.entries(this.locationProviders).map((function(e){var t=w(e,2),r=t[0],n=t[1];return[r,n.location]})))}},methods:{refreshProviderInfo:function(e){var t=this;this.updateLoading[e]=!0,delete this.providerLocations[e],M["AjaxHelper"].fetch({module:"UserCountry",action:"getLocationUsingProvider",id:e,format:"html"},{format:"html"}).then((function(r){t.providerLocations[e]=r})).finally((function(){t.updateLoading[e]=!1}))},save:function(){var e=this;this.selectedProvider&&(this.isLoading=!0,M["AjaxHelper"].fetch({method:"UserCountry.setLocationProvider",providerId:this.selectedProvider},{withTokenInUrl:!0}).then((function(){var e=M["NotificationsStore"].show({message:Object(M["translate"])("General_Done"),context:"success",noclear:!0,type:"toast",id:"userCountryLocationProvider"});M["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1})))}},computed:{visibleLocationProviders:function(){return Object.fromEntries(Object.entries(this.locationProviders).filter((function(e){var t=w(e,2),r=t[1];return r.isVisible})))},locationProvidersNotDefaultOrDisabled:function(){var e=this;return Object.fromEntries(Object.entries(this.locationProviders).filter((function(t){var r=w(t,2),n=r[1];return n.id!==e.defaultProviderId&&n.id!==e.disabledProviderId})))},noProvidersText:function(){return Object(M["translate"])("UserCountry_NoProviders",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")}}});G.render=_;var $=G; +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */}})})); +//# sourceMappingURL=UserCountry.umd.min.js.map
\ No newline at end of file diff --git a/plugins/UserCountry/vue/dist/umd.metadata.json b/plugins/UserCountry/vue/dist/umd.metadata.json new file mode 100644 index 0000000000..dce4477a3c --- /dev/null +++ b/plugins/UserCountry/vue/dist/umd.metadata.json @@ -0,0 +1,6 @@ +{ + "dependsOn": [ + "CoreHome", + "CorePluginsAdmin" + ] +}
\ No newline at end of file diff --git a/plugins/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue b/plugins/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue new file mode 100644 index 0000000000..8563a75749 --- /dev/null +++ b/plugins/UserCountry/vue/src/LocationProviderSelection/LocationProviderSelection.vue @@ -0,0 +1,250 @@ +<!-- + Matomo - free/libre analytics platform + @link https://matomo.org + @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later +--> + +<template> + <div class="locationProviderSelection"> + <div v-if="!isThereWorkingProvider" v-html="$sanitize(setUpGuides || '')"></div> + <div class="row"> + <div class="col s12 push-m9 m3">{{ translate('General_InfoFor', thisIp) }}</div> + </div> + <div + v-for="(provider, id) in visibleLocationProviders" + :key="id" + :class="`row form-group provider${id}`" + > + <div class="col s12 m4 l2"> + <p> + <label> + <input + class="location-provider" + name="location-provider" + type="radio" + :id="`provider_input_${id}`" + :disabled="provider.status !== 1" + :checked="selectedProvider === id" + @change="selectedProvider = id" + /> + <span>{{ translateOrDefault(provider.title) }}</span> + </label> + </p> + <p class="loc-provider-status"> + <span v-if="provider.status === 0 " class="is-not-installed"> + {{ translate('General_NotInstalled') }} + </span> + <span v-else-if="provider.status === 1" class="is-installed"> + {{ translate('General_Installed') }} + </span> + <span v-else-if="provider.status === 2" class="is-broken"> + {{ translate('General_Broken') }} + </span> + </p> + </div> + <div class="col s12 m4 l6"> + <p v-html="$sanitize(translateOrDefault(provider.description))"></p> + <p + v-if="provider.status !== 1 && provider.install_docs" + v-html="$sanitize(provider.install_docs)" + ></p> + </div> + <div class="col s12 m4 l4"> + <div class="form-help" v-if="provider.status === 1"> + <div v-if="thisIp !== '127.0.0.1'"> + {{ translate('UserCountry_CurrentLocationIntro') }}: + <div> + <br /> + <div style="position: absolute;"> + <ActivityIndicator + :loading="updateLoading[id]" + /> + </div> + <span + class="location" + :style="{ visibility: providerLocations[id] ? 'visible' : 'hidden'}" + > + <strong v-html="$sanitize(providerLocations[id] || ' ')"/> + </span> + </div> + <div class="text-right"> + <a + @click.prevent="refreshProviderInfo(id)" + >{{ translate('General_Refresh') }}</a> + </div> + </div> + <div v-else> + {{ translate('UserCountry_CannotLocalizeLocalIP', thisIp) }} + </div> + </div> + <div class="form-help" v-if="provider.statusMessage"> + <strong v-if="provider.status === 2">{{ translate('General_Error') }}:</strong> + <span v-html="$sanitize(provider.statusMessage)"/> + </div> + <div + class="form-help" + v-if="provider.extra_message" + v-html="$sanitize(provider.extra_message)" + > + </div> + </div> + </div> + <div v-if="!Object.keys(locationProvidersNotDefaultOrDisabled).length"> + <Notification + :noclear="true" + context="warning" + > + <span v-html="$sanitize(noProvidersText)"></span> + </Notification> + </div> + <SaveButton + @confirm="save()" + :saving="isLoading" + /> + </div> +</template> + +<script lang="ts"> +import { defineComponent } from 'vue'; +import { + translate, + AjaxHelper, + NotificationsStore, + ActivityIndicator, + Notification, +} from 'CoreHome'; +import { SaveButton } from 'CorePluginsAdmin'; + +interface ProviderInfo { + id: string; + isVisible: boolean; + description: string; + status: number; + install_docs?: string; + extra_message?: string; + location?: string; +} + +interface LocationProviderSelectionState { + isLoading: boolean; + updateLoading: Record<string, boolean>; + selectedProvider: string; + statusMessage?: string; + providerLocations: Record<string, string>; +} + +export default defineComponent({ + props: { + currentProviderId: { + type: String, + required: true, + }, + isThereWorkingProvider: Boolean, + setUpGuides: String, + thisIp: { + type: String, + required: true, + }, + locationProviders: { + type: Object, + required: true, + }, + defaultProviderId: { + type: String, + required: true, + }, + disabledProviderId: { + type: String, + required: true, + }, + }, + components: { + ActivityIndicator, + Notification, + SaveButton, + }, + data(): LocationProviderSelectionState { + return { + isLoading: false, + updateLoading: {}, + selectedProvider: this.currentProviderId, + providerLocations: Object.fromEntries( + Object.entries(this.locationProviders).map(([k, p]) => [k, p.location]), + ), + }; + }, + methods: { + refreshProviderInfo(providerId: string) { + // this should not be in a controller... ideally we fetch this data always from client side + // and do not prefill it server side + this.updateLoading[providerId] = true; + + delete this.providerLocations[providerId]; + + AjaxHelper.fetch<string>( + { + module: 'UserCountry', + action: 'getLocationUsingProvider', + id: providerId, + format: 'html', + }, + { + format: 'html', + }, + ).then((response) => { + this.providerLocations[providerId] = response; + }).finally(() => { + this.updateLoading[providerId] = false; + }); + }, + save() { + if (!this.selectedProvider) { + return; + } + + this.isLoading = true; + AjaxHelper.fetch( + { + method: 'UserCountry.setLocationProvider', + providerId: this.selectedProvider, + }, + { + withTokenInUrl: true, + }, + ).then(() => { + const notificationInstanceId = NotificationsStore.show({ + message: translate('General_Done'), + context: 'success', + noclear: true, + type: 'toast', + id: 'userCountryLocationProvider', + }); + NotificationsStore.scrollToNotification(notificationInstanceId); + }).finally(() => { + this.isLoading = false; + }); + }, + }, + computed: { + visibleLocationProviders() { + return Object.fromEntries( + Object.entries(this.locationProviders as ProviderInfo[]).filter(([, p]) => p.isVisible), + ); + }, + locationProvidersNotDefaultOrDisabled() { + return Object.fromEntries( + Object.entries(this.locationProviders as ProviderInfo[]).filter( + ([, p]) => p.id !== this.defaultProviderId && p.id !== this.disabledProviderId, + ), + ); + }, + noProvidersText() { + return translate( + 'UserCountry_NoProviders', + '<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">', + '</a>', + ); + }, + }, +}); +</script> diff --git a/plugins/UserCountry/vue/src/index.ts b/plugins/UserCountry/vue/src/index.ts new file mode 100644 index 0000000000..9f5cffa51d --- /dev/null +++ b/plugins/UserCountry/vue/src/index.ts @@ -0,0 +1,8 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +export { default as LocationProviderSelection } from './LocationProviderSelection/LocationProviderSelection.vue'; |