diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-10-26 15:00:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 15:00:14 +0300 |
commit | 1023fb7d691ebf47c27aa8a1cab4702c55c2630d (patch) | |
tree | 849d9c373e89d9ceb346238fcd58430f661645f5 /plugins/CoreHome | |
parent | 2b72bfe1648f25b76966adc93b6250ed239e0cbe (diff) |
[Vue] Migrate content-block, enriched-headline, rate-feature + related (#18166)
* migrating RateFeature and ReviewLinks + adding AjaxHelper.fetch utility method (all untested)
* get ratefeature component to work, modify matomodialog component to use v-model, add event parameters to createAngularAdapter, allow translate to use variadic args or one string array + rebuild
* remove ratefeature angularjs files
* rebuild + make vue mapping property optional in createANgularJsAdapter
* migrate enrichedheadline and get to work
* fix test
* fix translate
* fix another translate issue & migrate contentblock directive
* fix anchor links, not including the "/" causes angularjs to fail (also on 4.x-dev)
* update expected screenshots
* fix ui test
* fix some test failures
* fix nested transclude issue
* remove content block files
* fix icon spacing that occurs due to angularjs inserting empty comments in between nodes while vue 3 does not
* update some screenshots
* update screenshot (actually fixes an alignment issue)
* update screenshot
* Update _dataTable.twig
* fix order of operations issue
* built vue files
* fix variable reference
* built vue files
* make sure absolute paths are not used in polyfill source map
* trigger build
* trigger another build
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CoreHome')
22 files changed, 1003 insertions, 329 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index 7c682d77b7..641fac9a1e 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -136,7 +136,7 @@ class CoreHome extends \Piwik\Plugin $stylesheets[] = "plugins/CoreHome/stylesheets/notification.less"; $stylesheets[] = "plugins/CoreHome/stylesheets/zen-mode.less"; $stylesheets[] = "plugins/CoreHome/stylesheets/layout.less"; - $stylesheets[] = "plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less"; + $stylesheets[] = "plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less"; $stylesheets[] = "plugins/CoreHome/angularjs/notification/notification.directive.less"; $stylesheets[] = "plugins/CoreHome/angularjs/quick-access/quick-access.directive.less"; $stylesheets[] = "plugins/CoreHome/angularjs/selector/selector.directive.less"; @@ -237,9 +237,7 @@ class CoreHome extends \Piwik\Plugin $jsFiles[] = "plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.js"; - $jsFiles[] = "plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.js"; $jsFiles[] = "plugins/CoreHome/angularjs/content-intro/content-intro.directive.js"; - $jsFiles[] = "plugins/CoreHome/angularjs/content-block/content-block.directive.js"; $jsFiles[] = "plugins/CoreHome/angularjs/notification/notification.controller.js"; $jsFiles[] = "plugins/CoreHome/angularjs/notification/notification.directive.js"; diff --git a/plugins/CoreHome/angularjs/content-block/content-block.directive.html b/plugins/CoreHome/angularjs/content-block/content-block.directive.html deleted file mode 100644 index 547ea79878..0000000000 --- a/plugins/CoreHome/angularjs/content-block/content-block.directive.html +++ /dev/null @@ -1,10 +0,0 @@ -<div class="card"> - <div class="card-content"> - <h2 ng-if="contentTitle && !feature && !helpUrl && !helpText" class="card-title">{{contentTitle}}</h2> - <h2 ng-if="contentTitle && (feature || helpUrl || helpText)" class="card-title" - piwik-enriched-headline feature-name="{{feature}}" help-url="{{helpUrl}}" inline-help="{{ helpText }}"> - {{contentTitle}}</h2> - <div ng-transclude> - </div> - </div> -</div>
\ No newline at end of file diff --git a/plugins/CoreHome/angularjs/content-block/content-block.directive.js b/plugins/CoreHome/angularjs/content-block/content-block.directive.js deleted file mode 100644 index d803bb98c5..0000000000 --- a/plugins/CoreHome/angularjs/content-block/content-block.directive.js +++ /dev/null @@ -1,89 +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-content-block> - */ -(function () { - angular.module('piwikApp').directive('piwikContentBlock', piwikContentBlock); - - piwikContentBlock.$inject = ['piwik']; - - function piwikContentBlock(piwik){ - - var adminContent = null; - - return { - restrict: 'A', - replace: true, - transclude: true, - scope: { - contentTitle: '@', - feature: '@', - helpUrl: '@', - helpText: '@', - anchor: '@?' - }, - templateUrl: 'plugins/CoreHome/angularjs/content-block/content-block.directive.html?cb=' + piwik.cacheBuster, - controllerAs: 'contentBlock', - compile: function (element, attrs) { - - if (attrs.feature === 'true') { - attrs.feature = true; - } - - return function (scope, element, attrs) { - if (scope.anchor) { - var anchor = $('<a></a>').attr('id', scope.anchor); - element.prepend(anchor); - } - - var inlineHelp = element.find('[ng-transclude] > .contentHelp'); - if (inlineHelp.length) { - scope.helpText = inlineHelp.html(); - inlineHelp.remove(); - } - - if (scope.feature && (scope.feature===true || scope.feature ==='true')) { - scope.feature = scope.contentTitle; - } - - if (adminContent === null) { - // cache admin node for further content blocks - adminContent = $('#content.admin'); - } - - var contentTopPosition = false; - - if (adminContent.length) { - contentTopPosition = adminContent.offset().top; - } - - if (contentTopPosition || contentTopPosition === 0) { - var parents = element.parentsUntil('.col', '[piwik-widget-loader]'); - var topThis; - if (parents.length) { - // when shown within the widget loader, we need to get the offset of that element - // as the widget loader might be still shown. Would otherwise not position correctly - // the widgets on the admin home page - topThis = parents.offset().top; - } else { - topThis = element.offset().top; - } - - if ((topThis - contentTopPosition) < 17) { - // we make sure to display the first card with no margin-top to have it on same as line as - // navigation - element.css('marginTop', '0'); - } - } - }; - } - }; - } -})(); diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.html b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.html deleted file mode 100644 index 4907525499..0000000000 --- a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.html +++ /dev/null @@ -1,34 +0,0 @@ -<div class="enrichedHeadline" - ng-mouseenter="view.showIcons=true" ng-mouseleave="view.showIcons=false"> - <div ng-show="!editUrl" class="title" ng-transclude tabindex="6"></div> - <a ng-show="editUrl" class="title" href="{{ editUrl }}" - title="{{ 'CoreHome_ClickToEditX'|translate:(featureName|escape) }}" - ng-transclude ></a> - - <span ng-show="view.showIcons || view.showInlineHelp" class="iconsBar"> - <a ng-if="helpUrl && !inlineHelp" - rel="noreferrer noopener" - target="_blank" - href="{{ helpUrl }}" - title="{{ 'CoreHome_ExternalHelp'|translate }}" - class="helpIcon"><span class="icon-help"></span></a> - - <a ng-if="inlineHelp" - title="{{ (reportGenerated ? 'General_HelpReport' : 'General_Help' )|translate }}" - ng-click="view.showInlineHelp=!view.showInlineHelp" - class="helpIcon" ng-class="{ 'active': view.showInlineHelp }"><span class="icon-info"></span></a> - - <div class="ratingIcons" - piwik-rate-feature - title="{{ featureName }}"></div> - </span> - - <div class="inlineHelp" ng-show="view.showInlineHelp"> - <div ng-bind-html="inlineHelp"></div> - <a ng-if="helpUrl" - rel="noreferrer noopener" - target="_blank" - href="{{ helpUrl }}" - class="readMore">{{ 'General_MoreDetails'|translate }}</a> - </div> -</div> diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.js b/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.js deleted file mode 100644 index 6280736cf7..0000000000 --- a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.js +++ /dev/null @@ -1,111 +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: - * - * <h2 piwik-enriched-headline>All Websites Dashboard</h2> - * -> uses "All Websites Dashboard" as featurename - * - * <h2 piwik-enriched-headline feature-name="All Websites Dashboard">All Websites Dashboard (Total: 309 Visits)</h2> - * -> custom featurename - * - * <h2 piwik-enriched-headline help-url="http://piwik.org/guide">All Websites Dashboard</h2> - * -> shows help icon and links to external url - * - * <h2 piwik-enriched-headline edit-url="index.php?module=Foo&action=bar&id=4">All Websites Dashboard</h2> - * -> makes the headline clickable linking to the specified url - * - * <h2 piwik-enriched-headline inline-help="inlineHelp">Pages report</h2> - * -> inlineHelp specified via a attribute shows help icon on headline hover - * - * <h2 piwik-enriched-headline>All Websites Dashboard - * <div class="inlineHelp">My <strong>inline help</strong></div> - * </h2> - * -> alternative definition for inline help - * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url - * - * * <h2 piwik-enriched-headline report-generated="generated time">Pages report</h2> - * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which activated by hover - * -> the tooltip shows the value of the attribute - */ -(function () { - angular.module('piwikApp').directive('piwikEnrichedHeadline', piwikEnrichedHeadline); - - piwikEnrichedHeadline.$inject = ['$document', 'piwik', '$filter', '$parse', 'piwikPeriods']; - - function piwikEnrichedHeadline($document, piwik, $filter, $parse, piwikPeriods){ - var defaults = { - helpUrl: '', - editUrl: '', - }; - - return { - transclude: true, - restrict: 'A', - scope: { - helpUrl: '@', - editUrl: '@', - reportGenerated: '@?', - featureName: '@', - inlineHelp: '@?', - }, - templateUrl: 'plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.html?cb=' + piwik.cacheBuster, - compile: function (element, attrs) { - - for (var index in defaults) { - if (!attrs[index]) { attrs[index] = defaults[index]; } - } - - return function (scope, element, attrs) { - if (!scope.inlineHelp) { - - var helpNode = $('[ng-transclude] .inlineHelp', element); - - if ((!helpNode || !helpNode.length) && element.next()) { - // hack for reports :( - helpNode = element.next().find('.reportDocumentation'); - } - - if (helpNode && helpNode.length) { - - // hackish solution to get binded html of p tag within the help node - // at this point the ng-bind-html is not yet converted into html when report is not - // initially loaded. Using $compile doesn't work. So get and set it manually - var helpParagraph = $('p[ng-bind-html]', helpNode); - - if (helpParagraph.length) { - helpParagraph.html($parse(helpParagraph.attr('ng-bind-html'))); - } - - if ($.trim(helpNode.text())) { - scope.inlineHelp = $.trim(helpNode.html()); - } - helpNode.remove(); - } - } - - if (!attrs.featureName) { - attrs.featureName = $.trim(element.find('.title').first().text()); - } - - if (scope.reportGenerated && piwikPeriods.parse(piwik.period, piwik.currentDateString).containsToday()) { - element.find('.report-generated').first().tooltip({ - track: true, - content: scope.reportGenerated, - items: 'div', - show: false, - hide: false - }); - - - } - }; - } - }; - } -})(); diff --git a/plugins/CoreHome/angularjs/enrichedheadline/help.png b/plugins/CoreHome/angularjs/enrichedheadline/help.png Binary files differdeleted file mode 100644 index c5174cdf63..0000000000 --- a/plugins/CoreHome/angularjs/enrichedheadline/help.png +++ /dev/null diff --git a/plugins/CoreHome/templates/_dataTable.twig b/plugins/CoreHome/templates/_dataTable.twig index 9cc562a977..f9abda1fc2 100644 --- a/plugins/CoreHome/templates/_dataTable.twig +++ b/plugins/CoreHome/templates/_dataTable.twig @@ -41,7 +41,7 @@ <div class="card-description">{{ properties.description }}</div> {% endif %} - <div class="reportDocumentation"> + <div class="reportDocumentation" data-content="{{ properties.documentation|default|e('html_attr') }}"> {% if properties.documentation|default is not empty %}<p ng-bind-html="{{ properties.documentation|json_encode|e('html_attr') }}"></p>{% endif %} {% if properties.onlineGuideUrl|default is not empty %}<a href="{{ properties.onlineGuideUrl|safelink|e('html_attr') }}" target="_blank" rel="noreferrer noopener" class="onlineGuide">{{ 'CoreHome_ReadMoreOnlineGuide'|translate }}</a>{% endif %} {% if reportLastUpdatedMessage is defined and reportLastUpdatedMessage %}<span class="helpDate">{{ reportLastUpdatedMessage|raw }}</span>{% endif %} diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js index 7c16b4c88f..5f237e71cb 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js @@ -147,6 +147,8 @@ __webpack_require__.d(__webpack_exports__, "getToday", function() { return /* re __webpack_require__.d(__webpack_exports__, "parseDate", function() { return /* reexport */ parseDate; }); __webpack_require__.d(__webpack_exports__, "todayIsInRange", function() { return /* reexport */ todayIsInRange; }); __webpack_require__.d(__webpack_exports__, "MatomoDialog", function() { return /* reexport */ MatomoDialog; }); +__webpack_require__.d(__webpack_exports__, "EnrichedHeadline", function() { return /* reexport */ EnrichedHeadline; }); +__webpack_require__.d(__webpack_exports__, "ContentBlock", function() { return /* reexport */ ContentBlock; }); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js // This file is imported into lib/wc client bundles. @@ -485,8 +487,14 @@ var noAdblockFlag = __webpack_require__("2342"); * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function translate(translationStringId, values = []) { - return window._pk_translate(translationStringId, values); // eslint-disable-line +function translate(translationStringId, ...values) { + let pkArgs = values; // handle variadic args AND single array of values (to match _pk_translate signature) + + if (values.length === 1 && values[0] && values[0] instanceof Array) { + [pkArgs] = values; + } + + return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line } // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/Periods/Day.ts function Day_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -1007,6 +1015,14 @@ class AjaxHelper_AjaxHelper { /** * Handle for current request */ + // helper method entry point + static fetch(params) { + const helper = new AjaxHelper_AjaxHelper(); + helper.setFormat('json'); + helper.addParams(params, 'get'); + return helper.send(); + } + constructor() { AjaxHelper_defineProperty(this, "format", 'json'); @@ -1564,12 +1580,15 @@ angular.module('piwikApp.service').run(Piwik_adapter_initPiwikService); // 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/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=42c028e0 +// 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/MatomoDialog/MatomoDialog.vue?vue&type=template&id=50fda6d8 +const _hoisted_1 = { + ref: "root" +}; function render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default"); + 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", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.modelValue]]); } -// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=42c028e0 +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?vue&type=template&id=50fda6d8 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-3!./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/MatomoDialog/MatomoDialog.vue?vue&type=script&lang=ts @@ -1579,7 +1598,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { /** * Whether the modal is displayed or not; */ - show: { + modelValue: { type: Boolean, required: true }, @@ -1596,17 +1615,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { required: false } }, - emits: ['yes', 'no', 'closeEnd', 'close'], + emits: ['yes', 'no', 'closeEnd', 'close', 'update:modelValue'], + + setup() { + const root = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); + return { + root + }; + }, activated() { - const slotElement = this.element || this.$slots.default()[0].el; - slotElement.style.display = 'none'; + this.$emit('update:modelValue', false); }, watch: { - show(newValue, oldValue) { + modelValue(newValue, oldValue) { if (newValue) { - const slotElement = this.element || this.$slots.default()[0].el; + const slotElement = this.element || this.$refs.root.firstElementChild; Matomo_Matomo.helper.modalConfirm(slotElement, { yes: () => { this.$emit('yes'); @@ -1616,6 +1641,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { } }, { onCloseEnd: () => { + // materialize removes the child element, so we move it back to the slot + if (!this.element) { + this.$refs.root.appendChild(slotElement); + } + + this.$emit('update:modelValue', false); this.$emit('closeEnd'); } }); @@ -1644,6 +1675,8 @@ MatomoDialogvue_type_script_lang_ts.render = render * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ + +let transcludeCounter = 0; function createAngularJsAdapter(options) { const { component, @@ -1656,8 +1689,18 @@ function createAngularJsAdapter(options) { postCreate, noScope } = options; + const currentTranscludeCounter = transcludeCounter; + + if (transclude) { + transcludeCounter += 1; + } + const angularJsScope = {}; Object.entries(scope).forEach(([scopeVarName, info]) => { + if (!info.vue) { + info.vue = scopeVarName; + } + if (info.angularJsBind) { angularJsScope[scopeVarName] = info.angularJsBind; } @@ -1670,14 +1713,14 @@ function createAngularJsAdapter(options) { compile: function angularJsAdapterCompile() { return { post: function angularJsAdapterLink(ngScope, ngElement, ngAttrs) { - const clone = ngElement.find('[ng-transclude]'); + const clone = transclude ? ngElement.find(`[ng-transclude][counter=${currentTranscludeCounter}]`) : null; let rootVueTemplate = '<root-component'; Object.entries(scope).forEach(([, info]) => { rootVueTemplate += ` :${info.vue}="${info.vue}"`; }); Object.entries(events).forEach(info => { const [eventName] = info; - rootVueTemplate += ` @${eventName}="onEventHandler('${eventName}')"`; + rootVueTemplate += ` @${eventName}="onEventHandler('${eventName}', $event)"`; }); rootVueTemplate += '>'; @@ -1715,15 +1758,16 @@ function createAngularJsAdapter(options) { }, methods: { - onEventHandler(name) { + onEventHandler(name, $event) { if (events[name]) { - events[name](ngScope, ngElement, ngAttrs, ...injectedServices); + events[name]($event, ngScope, ngElement, ngAttrs, ...injectedServices); } } } }); app.config.globalProperties.$sanitize = window.vueSanitize; + app.config.globalProperties.translate = translate; app.component('root-component', component); const mountPoint = mountPointFactory ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices) : ngElement[0]; const vm = app.mount(mountPoint); @@ -1755,7 +1799,7 @@ function createAngularJsAdapter(options) { if (transclude) { adapter.transclude = true; - adapter.template = '<div ng-transclude/>'; + adapter.template = `<div ng-transclude counter="${currentTranscludeCounter}"/>`; } return adapter; @@ -1778,16 +1822,15 @@ function createAngularJsAdapter(options) { component: MatomoDialog, scope: { show: { - vue: 'show', + vue: 'modelValue', default: false }, element: { - vue: 'element', default: (scope, element) => element[0] } }, events: { - yes: (scope, element, attrs) => { + yes: ($event, scope, element, attrs) => { if (attrs.yes) { scope.$eval(attrs.yes); setTimeout(() => { @@ -1795,7 +1838,7 @@ function createAngularJsAdapter(options) { }, 0); } }, - no: (scope, element, attrs) => { + no: ($event, scope, element, attrs) => { if (attrs.no) { scope.$eval(attrs.no); setTimeout(() => { @@ -1803,7 +1846,7 @@ function createAngularJsAdapter(options) { }, 0); } }, - close: (scope, element, attrs) => { + close: ($event, scope, element, attrs) => { if (attrs.close) { scope.$eval(attrs.close); setTimeout(() => { @@ -1811,9 +1854,9 @@ function createAngularJsAdapter(options) { }, 0); } }, - closeEnd: (scope, element, attrs, $parse) => { + 'update:modelValue': (newValue, scope, element, attrs, $parse) => { setTimeout(() => { - scope.$apply($parse(attrs.piwikDialog).assign(scope, false)); + scope.$apply($parse(attrs.piwikDialog).assign(scope, newValue)); }, 0); } }, @@ -1826,25 +1869,443 @@ function createAngularJsAdapter(options) { return vueRootPlaceholder[0]; }, postCreate: (vm, scope, element, attrs) => { - scope.$watch(attrs.piwikDialog, newValue => { - vm.show = newValue || false; + scope.$watch(attrs.piwikDialog, (newValue, oldValue) => { + if (oldValue !== newValue) { + vm.modelValue = newValue || false; + } }); }, noScope: true })); +// 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/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=678de864 + +const EnrichedHeadlinevue_type_template_id_678de864_hoisted_1 = { + key: 0, + class: "title", + tabindex: "6" +}; +const _hoisted_2 = ["href", "title"]; +const _hoisted_3 = { + class: "iconsBar" +}; +const _hoisted_4 = ["href", "title"]; + +const _hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "icon-help" +}, null, -1); + +const _hoisted_6 = [_hoisted_5]; +const _hoisted_7 = ["title"]; + +const _hoisted_8 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + class: "icon-info" +}, null, -1); + +const _hoisted_9 = [_hoisted_8]; +const _hoisted_10 = { + class: "ratingIcons" +}; +const _hoisted_11 = { + class: "inlineHelp" +}; +const _hoisted_12 = ["innerHTML"]; +const _hoisted_13 = ["href"]; +function EnrichedHeadlinevue_type_template_id_678de864_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_RateFeature = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("RateFeature"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", { + class: "enrichedHeadline", + onMouseenter: _cache[1] || (_cache[1] = $event => _ctx.showIcons = true), + onMouseleave: _cache[2] || (_cache[2] = $event => _ctx.showIcons = false), + ref: "root" + }, [!_ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", EnrichedHeadlinevue_type_template_id_678de864_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.editUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 1, + class: "title", + href: _ctx.editUrl, + title: _ctx.translate('CoreHome_ClickToEditX', _ctx.$sanitize(_ctx.actualFeatureName)) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 8, _hoisted_2)) : 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"])("span", _hoisted_3, [_ctx.helpUrl && !_ctx.actualInlineHelp ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 0, + rel: "noreferrer noopener", + target: "_blank", + class: "helpIcon", + href: _ctx.helpUrl, + title: _ctx.translate('CoreHome_ExternalHelp') + }, _hoisted_6, 8, _hoisted_4)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.actualInlineHelp ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 1, + onClick: _cache[0] || (_cache[0] = $event => _ctx.showInlineHelp = !_ctx.showInlineHelp), + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(["helpIcon", { + 'active': _ctx.showInlineHelp + }]), + title: _ctx.translate(_ctx.reportGenerated ? 'General_HelpReport' : 'General_Help') + }, _hoisted_9, 10, _hoisted_7)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_RateFeature, { + title: _ctx.actualFeatureName + }, null, 8, ["title"])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showIcons || _ctx.showInlineHelp]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", _hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + innerHTML: _ctx.$sanitize(_ctx.actualInlineHelp) + }, null, 8, _hoisted_12), _ctx.helpUrl ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 0, + rel: "noreferrer noopener", + target: "_blank", + class: "readMore", + href: _ctx.helpUrl + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_MoreDetails')), 9, _hoisted_13)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showInlineHelp]])], 544); +} +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=template&id=678de864 + +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-3!./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/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts + + + // working around a cycle in dependencies (CoreHome depends on Feedback, Feedback depends on +// CoreHome) +// TODO: may need a generic solution at some point, but it's bad practice to have +// cyclic dependencies like this. it worked before because it was individual files +// dependening on each other, not whole plugins. + +const RateFeature = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineAsyncComponent"])(() => new Promise(resolve => { + window.$(document).ready(() => { + resolve(window.Feedback.RateFeature); // eslint-disable-line + }); +})); +/** + * Usage: + * + * <h2 piwik-enriched-headline>All Websites Dashboard</h2> + * -> uses "All Websites Dashboard" as featurename + * + * <h2 piwik-enriched-headline feature-name="All Websites Dashboard">All Websites Dashboard (Total: + * 309 Visits)</h2> + * -> custom featurename + * + * <h2 piwik-enriched-headline help-url="http://piwik.org/guide">All Websites Dashboard</h2> + * -> shows help icon and links to external url + * + * <h2 piwik-enriched-headline edit-url="index.php?module=Foo&action=bar&id=4">All Websites + * Dashboard</h2> + * -> makes the headline clickable linking to the specified url + * + * <h2 piwik-enriched-headline inline-help="inlineHelp">Pages report</h2> + * -> inlineHelp specified via a attribute shows help icon on headline hover + * + * <h2 piwik-enriched-headline>All Websites Dashboard + * <div class="inlineHelp">My <strong>inline help</strong></div> + * </h2> + * -> alternative definition for inline help + * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url + * + * * <h2 piwik-enriched-headline report-generated="generated time">Pages report</h2> + * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which + * activated by hover + * -> the tooltip shows the value of the attribute + */ + +/* harmony default export */ var EnrichedHeadlinevue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + helpUrl: { + type: String, + default: '' + }, + editUrl: { + type: String, + default: '' + }, + reportGenerated: String, + featureName: String, + inlineHelp: String + }, + components: { + RateFeature + }, + + data() { + return { + showIcons: false, + showInlineHelp: false, + actualFeatureName: this.featureName, + actualInlineHelp: this.inlineHelp + }; + }, + + setup() { + const root = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); + return { + root + }; + }, + + watch: { + inlineHelp(newValue) { + this.actualInlineHelp = newValue; + }, + + featureName(newValue) { + this.actualFeatureName = newValue; + } + + }, + + mounted() { + const { + root + } = this.$refs; + + if (!this.actualInlineHelp) { + let helpNode = root.querySelector('.title .inlineHelp'); + + if (!helpNode && root.parentElement.nextElementSibling) { + // hack for reports :( + helpNode = root.parentElement.nextElementSibling.querySelector('.reportDocumentation'); + } + + if (helpNode) { + // hackish solution to get binded html of p tag within the help node + // at this point the ng-bind-html is not yet converted into html when report is not + // initially loaded. Using $compile doesn't work. So get and set it manually + const helpDocs = helpNode.getAttribute('data-content').trim(); + + if (helpDocs.length) { + this.actualInlineHelp = `<p>${helpDocs}</p>`; + setTimeout(() => helpNode.remove(), 0); + } + } + } + + if (!this.actualFeatureName) { + this.actualFeatureName = root.querySelector('.title').textContent; + } + + if (this.reportGenerated && Periods_Periods.parse(Matomo_Matomo.period, Matomo_Matomo.currentDateString).containsToday()) { + window.$(root.querySelector('.report-generated')).tooltip({ + track: true, + content: this.reportGenerated, + items: 'div', + show: false, + hide: false + }); + } + } + +})); +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue + + + +EnrichedHeadlinevue_type_script_lang_ts.render = EnrichedHeadlinevue_type_template_id_678de864_render + +/* harmony default export */ var EnrichedHeadline = (EnrichedHeadlinevue_type_script_lang_ts); +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + + +/* harmony default export */ var EnrichedHeadline_adapter = (createAngularJsAdapter({ + component: EnrichedHeadline, + scope: { + helpUrl: { + angularJsBind: '@' + }, + editUrl: { + angularJsBind: '@' + }, + reportGenerated: { + angularJsBind: '@?' + }, + featureName: { + angularJsBind: '@' + }, + inlineHelp: { + angularJsBind: '@?' + } + }, + directiveName: 'piwikEnrichedHeadline', + transclude: true +})); +// 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/ContentBlock/ContentBlock.vue?vue&type=template&id=5f6844c4 + +const ContentBlockvue_type_template_id_5f6844c4_hoisted_1 = { + class: "card", + ref: "root" +}; +const ContentBlockvue_type_template_id_5f6844c4_hoisted_2 = { + class: "card-content" +}; +const ContentBlockvue_type_template_id_5f6844c4_hoisted_3 = { + key: 0, + class: "card-title" +}; +const ContentBlockvue_type_template_id_5f6844c4_hoisted_4 = { + key: 1, + class: "card-title" +}; +const ContentBlockvue_type_template_id_5f6844c4_hoisted_5 = { + ref: "content" +}; +function ContentBlockvue_type_template_id_5f6844c4_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); + + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContentBlockvue_type_template_id_5f6844c4_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_5f6844c4_hoisted_2, [_ctx.contentTitle && !_ctx.actualFeature && !_ctx.helpUrl && !_ctx.actualHelpText ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_5f6844c4_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.contentTitle), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.contentTitle && (_ctx.actualFeature || _ctx.helpUrl || _ctx.actualHelpText) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("h2", ContentBlockvue_type_template_id_5f6844c4_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + "feature-name": _ctx.actualFeature, + "help-url": _ctx.helpUrl, + "inline-help": _ctx.actualHelpText + }, { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(() => [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.contentTitle), 1)]), + _: 1 + }, 8, ["feature-name", "help-url", "inline-help"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContentBlockvue_type_template_id_5f6844c4_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512)])], 512); +} +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=template&id=5f6844c4 + +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-3!./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/ContentBlock/ContentBlock.vue?vue&type=script&lang=ts + + +let adminContent = null; +/* harmony default export */ var ContentBlockvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ + props: { + contentTitle: String, + feature: String, + helpUrl: String, + helpText: String, + anchor: String + }, + components: { + EnrichedHeadline: EnrichedHeadline + }, + + data() { + return { + actualFeature: this.feature, + actualHelpText: this.helpText + }; + }, + + setup() { + const root = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); + const content = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["ref"])(null); + return { + root, + content + }; + }, + + watch: { + feature(newValue) { + this.actualFeature = newValue; + }, + + helpText(newValue) { + this.actualHelpText = newValue; + } + + }, + + mounted() { + const { + root, + content + } = this.$refs; + + if (this.anchor) { + const anchorElement = document.createElement('a'); + anchorElement.id = this.anchor; + root.parentElement.prepend(anchorElement); + } + + setTimeout(() => { + const inlineHelp = content.querySelector('.contentHelp'); + + if (inlineHelp) { + this.actualHelpText = inlineHelp.innerHTML; + inlineHelp.remove(); + } + }, 0); + + if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) { + this.actualFeature = this.contentTitle; + } + + if (adminContent === null) { + // cache admin node for further content blocks + adminContent = document.querySelector('#content.admin'); + } + + let contentTopPosition; + + if (adminContent) { + contentTopPosition = adminContent.offsetTop; + } + + if (contentTopPosition || contentTopPosition === 0) { + const parents = root.closest('[piwik-widget-loader]'); // when shown within the widget loader, we need to get the offset of that element + // as the widget loader might be still shown. Would otherwise not position correctly + // the widgets on the admin home page + + const topThis = parents ? parents.offsetTop : root.offsetTop; + + if (topThis - contentTopPosition < 17) { + // we make sure to display the first card with no margin-top to have it on same as line as + // navigation + root.style.marginTop = 0; + } + } + } + +})); +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?vue&type=script&lang=ts + +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue + + + +ContentBlockvue_type_script_lang_ts.render = ContentBlockvue_type_template_id_5f6844c4_render + +/* harmony default export */ var ContentBlock = (ContentBlockvue_type_script_lang_ts); +// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + + +/* harmony default export */ var ContentBlock_adapter = (createAngularJsAdapter({ + component: ContentBlock, + scope: { + contentTitle: { + angularJsBind: '@' + }, + feature: { + angularJsBind: '@' + }, + helpUrl: { + angularJsBind: '@' + }, + helpText: { + angularJsBind: '@' + }, + anchor: { + angularJsBind: '@?' + } + }, + directiveName: 'piwikContentBlock', + transclude: true +})); // 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 -const _hoisted_1 = { +const ActivityIndicatorvue_type_template_id_6af4d064_hoisted_1 = { class: "loadingPiwik" }; -const _hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +const ActivityIndicatorvue_type_template_id_6af4d064_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", _hoisted_1, [_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]]); + 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]]); } // CONCATENATED MODULE: ./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?vue&type=template&id=6af4d064 @@ -1995,6 +2456,10 @@ Alertvue_type_script_lang_ts.render = Alertvue_type_template_id_c3863ae2_render + + + + // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js.map b/plugins/CoreHome/vue/dist/CoreHome.umd.js.map index b4dd196131..0c88a2e6e3 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.js.map +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://CoreHome/webpack/universalModuleDefinition","webpack://CoreHome/webpack/bootstrap","webpack://CoreHome/./plugins/CoreHome/vue/src/noAdblockFlag.ts","webpack://CoreHome/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/utilities.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/translate.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Day.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Week.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Month.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Year.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Range.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?c435","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?a576","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?7b62","webpack://CoreHome/./plugins/CoreHome/vue/src/createAngularJsAdapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?0bf6","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?f42e","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?6f80","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?14a2","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?92a9","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?cc69","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/index.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/index.ts","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;AClFA;;;;;AAKG;AAEH;;AACA,MAAM,CAAC,iBAAP,GAA2B,KAA3B,C;;;;;;;ACRA,mD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AAEA;AACA;AACA,MAAM,KAAuC,EAAE,yBAQ5C;;AAEH;AACA;AACA,IAAI,qBAAuB;AAC3B;AACA;;AAEA;AACe,sDAAI;;;ACrBnB;;;;;AAKG;;AAEH;;;AAGG;AACH,MAAM,SAAS,GAAG;AAChB,gBAAc,CAAC,SAAD,EAAkB;AAC9B,UAAM,IAAI,GAAG,MAAM,CAAC,QAAP,CAAgB,IAAhB,CAAqB,K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pC,WAAS,EAAE,KADyB;AAEpC,OAAK,EAAE;AACL,YAAQ,EAAE;AACR,SAAG,EAAE,UADG;AAER,mBAAa,EAAE;AAFP;AADL,GAF6B;AAQpC,eAAa,EAAE,YARqB;AASpC,YAAU,EAAE;AATwB,CAAD,CAArC,E;;ACVA;;;;;AAKG;AACH;AAEA;AACA;AACA;AACA;AACA;AACA;;;ACbA;;;;;AAKG;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BwB;AACF","file":"CoreHome.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CoreHome\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"CoreHome\"] = factory(root[\"Vue\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/CoreHome/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n// see https://github.com/matomo-org/matomo/issues/5094 used to detect an ad blocker\nwindow.hasBlockedContent = false;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst MatomoUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default MatomoUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport MatomoUrl from './MatomoUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: MatomoUrl.getSearchParam.bind(MatomoUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\ninterface Period {\n getPrettyString(): string;\n getDateRange(): Date[];\n containsToday(): boolean;\n}\n\ninterface PeriodClass {\n parse(strDate: string|Date): Period;\n getDisplayText(): string;\n}\n\n/**\n * Matomo period management service for the frontend.\n *\n * Usage:\n *\n * var DayPeriod = matomoPeriods.get('day');\n * var day = new DayPeriod(new Date());\n *\n * or\n *\n * var day = matomoPeriods.parse('day', '2013-04-05');\n *\n * Adding custom periods:\n *\n * To add your own period to the frontend, create a period class for it\n * w/ the following methods:\n *\n * - **getPrettyString()**: returns a human readable display string for the period.\n * - **getDateRange()**: returns an array w/ two elements, the first being the start\n * Date of the period, the second being the end Date. The dates\n * must be Date objects, not strings, and are inclusive.\n * - **containsToday()**: returns true if the date period contains today. False if not.\n * - (_static_) **parse(strDate)**: creates a new instance of this period from the\n * value of the 'date' query parameter.\n * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month',\n * 'week', etc.\n *\n * Then call Periods.addCustomPeriod w/ your period class:\n *\n * Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod);\n *\n * NOTE: currently only single date periods like day, week, month year can\n * be extended. Other types of periods that require a special UI to\n * view/edit aren't, since there is currently no way to use a\n * custom UI for a custom period.\n */\nclass Periods {\n periods: {[name: string]: PeriodClass} = {};\n\n periodOrder: string[] = [];\n\n addCustomPeriod(name: string, periodClass: PeriodClass) {\n if (this.periods[name]) {\n throw new Error(`The \"${name}\" period already exists! It cannot be overridden.`);\n }\n\n this.periods[name] = periodClass;\n this.periodOrder.push(name);\n }\n\n getAllLabels(): string[] {\n return Array<string>().concat(this.periodOrder);\n }\n\n get(strPeriod: string): PeriodClass {\n const periodClass = this.periods[strPeriod];\n if (!periodClass) {\n throw new Error(`Invalid period label: ${strPeriod}`);\n }\n return periodClass;\n }\n\n parse(strPeriod: string, strDate: string): Period {\n return this.get(strPeriod).parse(strDate);\n }\n\n isRecognizedPeriod(strPeriod: string): boolean {\n return !!this.periods[strPeriod];\n }\n}\n\nexport default new Periods();\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport function format(date: Date): string {\n return $.datepicker.formatDate('yy-mm-dd', date);\n}\n\nexport function getToday(): Date {\n const date = new Date(Date.now());\n\n // undo browser timezone\n date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000);\n\n // apply Matomo site timezone (if it exists)\n date.setHours(date.getHours() + ((window.piwik.timezoneOffset || 0) / 3600));\n\n // get rid of hours/minutes/seconds/etc.\n date.setHours(0);\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return date;\n}\n\nexport function parseDate(date: string|Date): Date {\n if (date instanceof Date) {\n return date;\n }\n\n const strDate = decodeURIComponent(date);\n\n if (strDate === 'today'\n || strDate === 'now'\n ) {\n return getToday();\n }\n\n if (strDate === 'yesterday'\n // note: ignoring the 'same time' part since the frontend doesn't care about the time\n || strDate === 'yesterdaySameTime'\n ) {\n const yesterday = getToday();\n yesterday.setDate(yesterday.getDate() - 1);\n return yesterday;\n }\n\n if (strDate.match(/last[ -]?week/i)) {\n const lastWeek = getToday();\n lastWeek.setDate(lastWeek.getDate() - 7);\n return lastWeek;\n }\n\n if (strDate.match(/last[ -]?month/i)) {\n const lastMonth = getToday();\n lastMonth.setDate(1);\n lastMonth.setMonth(lastMonth.getMonth() - 1);\n return lastMonth;\n }\n\n if (strDate.match(/last[ -]?year/i)) {\n const lastYear = getToday();\n lastYear.setFullYear(lastYear.getFullYear() - 1);\n return lastYear;\n }\n\n try {\n return $.datepicker.parseDate('yy-mm-dd', strDate);\n } catch (err) {\n // angular swallows this error, so manual console log here\n console.error(err.message || err);\n throw err;\n }\n}\n\nexport function todayIsInRange(dateRange: Date[]): boolean {\n if (dateRange.length !== 2) {\n return false;\n }\n\n if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) {\n return true;\n }\n\n return false;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = MatomoUrl.getSearchParam('date');\n const period = MatomoUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Matomo = piwik;\nexport default Matomo;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Matomo from './Matomo';\n\nfunction piwikService() {\n return Matomo;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport default function translate(translationStringId: string, values: string[] = []): string {\n return window._pk_translate(translationStringId, values); // eslint-disable-line\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class DayPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): DayPeriod {\n return new DayPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodDay');\n }\n\n getPrettyString(): string {\n return format(this.dateInPeriod);\n }\n\n getDateRange(): Date[] {\n return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('day', DayPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class WeekPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): WeekPeriod {\n return new WeekPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodWeek');\n }\n\n getPrettyString(): string {\n const weekDates = this.getDateRange();\n const startWeek = format(weekDates[0]);\n const endWeek = format(weekDates[1]);\n\n return translate('General_DateRangeFromTo', [startWeek, endWeek]);\n }\n\n getDateRange(): Date[] {\n const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7;\n\n const startWeek = new Date(this.dateInPeriod.getTime());\n startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday);\n\n const endWeek = new Date(startWeek.getTime());\n endWeek.setDate(startWeek.getDate() + 6);\n\n return [startWeek, endWeek];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('week', WeekPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class MonthPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): MonthPeriod {\n return new MonthPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodMonth');\n }\n\n getPrettyString(): string {\n const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`);\n return `${month} ${this.dateInPeriod.getFullYear()}`;\n }\n\n getDateRange(): Date[] {\n const startMonth = new Date(this.dateInPeriod.getTime());\n startMonth.setDate(1);\n\n const endMonth = new Date(this.dateInPeriod.getTime());\n endMonth.setDate(1);\n endMonth.setMonth(endMonth.getMonth() + 1);\n endMonth.setDate(0);\n\n return [startMonth, endMonth];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('month', MonthPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class YearPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): YearPeriod {\n return new YearPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodYear');\n }\n\n getPrettyString(): string {\n return this.dateInPeriod.getFullYear().toString();\n }\n\n getDateRange(): Date[] {\n const startYear = new Date(this.dateInPeriod.getTime());\n startYear.setMonth(0);\n startYear.setDate(1);\n\n const endYear = new Date(this.dateInPeriod.getTime());\n endYear.setMonth(12);\n endYear.setDate(0);\n\n return [startYear, endYear];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('year', YearPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport {\n parseDate,\n format,\n getToday,\n todayIsInRange,\n} from './utilities';\n\nexport default class RangePeriod {\n constructor(\n public readonly startDate: Date,\n public readonly endDate: Date,\n public readonly childPeriodType: string,\n ) {}\n\n /**\n * Returns a range representing the last N childPeriodType periods, including the current one.\n */\n static getLastNRange(\n childPeriodType: string,\n strAmount: string|number,\n strEndDate?: Date|string,\n ): RangePeriod {\n const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0);\n if (Number.isNaN(nAmount)) {\n throw new Error('Invalid range strAmount');\n }\n\n let endDate = strEndDate ? parseDate(strEndDate) : getToday();\n\n let startDate = new Date(endDate.getTime());\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - nAmount);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (nAmount * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - nAmount);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - nAmount);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n /**\n * Returns a range representing a specific child date range counted back from the end date\n *\n * @param childPeriodType Type of the period, eg. day, week, year\n * @param rangeEndDate\n * @param countBack Return only the child date range for this specific period number\n * @returns {RangePeriod}\n */\n static getLastNRangeChild(\n childPeriodType: string,\n rangeEndDate: Date|string,\n countBack: number,\n ): RangePeriod {\n const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday();\n let startDate = new Date(ed.getTime());\n let endDate = new Date(ed.getTime());\n\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - countBack);\n endDate.setDate(endDate.getDate() - countBack);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (countBack * 7));\n endDate.setDate(endDate.getDate() - (countBack * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - countBack);\n endDate.setDate(1);\n endDate.setMonth(endDate.getMonth() - countBack);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - countBack);\n endDate.setFullYear(endDate.getFullYear() - countBack);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n static parse(strDate: string, childPeriodType = 'day'): RangePeriod {\n if (/^previous/.test(strDate)) {\n const endDate = RangePeriod.getLastNRange(childPeriodType, '2').startDate;\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate);\n }\n\n if (/^last/.test(strDate)) {\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(4));\n }\n\n const parts = decodeURIComponent(strDate).split(',');\n return new RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType);\n }\n\n static getDisplayText(): string {\n return translate('General_DateRangeInPeriodList');\n }\n\n getPrettyString(): string {\n const start = format(this.startDate);\n const end = format(this.endDate);\n return translate('General_DateRangeFromTo', [start, end]);\n }\n\n getDateRange(): Date[] {\n return [this.startDate, this.endDate];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('range', RangePeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Periods from './Periods';\nimport RangePeriod from './Range';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nwindow.piwik.addCustomPeriod = Periods.addCustomPeriod.bind(Periods);\n\nfunction piwikPeriods() {\n return {\n getAllLabels: Periods.getAllLabels.bind(Periods),\n isRecognizedPeriod: Periods.isRecognizedPeriod.bind(Periods),\n get: Periods.get.bind(Periods),\n parse: Periods.parse.bind(Periods),\n parseDate,\n format,\n RangePeriod,\n todayIsInRange,\n };\n}\n\nangular.module('piwikApp.service').factory('piwikPeriods', piwikPeriods);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Matomo from '../Matomo/Matomo';\n\nwindow.globalAjaxQueue = [] as GlobalAjaxQueue;\nwindow.globalAjaxQueue.active = 0;\n\nwindow.globalAjaxQueue.clean = function globalAjaxQueueClean() {\n for (let i = this.length; i >= 0; i -= 1) {\n if (!this[i] || this[i].readyState === 4) {\n this.splice(i, 1);\n }\n }\n};\n\nwindow.globalAjaxQueue.push = function globalAjaxQueuePush(...args: (XMLHttpRequest|null)[]) {\n this.active += args.length;\n\n // cleanup ajax queue\n this.clean();\n\n // call original array push\n return Array.prototype.push.call(this, ...args);\n};\n\nwindow.globalAjaxQueue.abort = function globalAjaxQueueAbort() {\n // abort all queued requests if possible\n this.forEach((x) => x && x.abort && x.abort());\n\n // remove all elements from array\n this.splice(0, this.length);\n\n this.active = 0;\n};\n\ntype ParameterValue = string | number | null | undefined | ParameterValue[];\ntype Parameters = {[name: string]: ParameterValue | Parameters};\ntype AnyFunction = (...params:any[]) => any; // eslint-disable-line\n\n/**\n * error callback to use by default\n */\nfunction defaultErrorCallback(deferred: XMLHttpRequest, status: string): void {\n // do not display error message if request was aborted\n if (status === 'abort') {\n return;\n }\n\n const loadingError = $('#loadingError');\n if (Piwik_Popover.isOpen() && deferred && deferred.status === 500) {\n if (deferred && deferred.status === 500) {\n $(document.body).html(piwikHelper.escape(deferred.responseText));\n }\n } else {\n loadingError.show();\n }\n}\n\n/**\n * Global ajax helper to handle requests within Matomo\n */\nexport default class AjaxHelper {\n /**\n * Format of response\n */\n format = 'json';\n\n /**\n * A timeout for the request which will override any global timeout\n */\n timeout = null;\n\n /**\n * Callback function to be executed on success\n */\n callback: AnyFunction = null;\n\n /**\n * Use this.callback if an error is returned\n */\n useRegularCallbackInCaseOfError = false;\n\n /**\n * Callback function to be executed on error\n *\n * @deprecated use the jquery promise API\n */\n errorCallback: AnyFunction;\n\n withToken = false;\n\n /**\n * Callback function to be executed on complete (after error or success)\n *\n * @deprecated use the jquery promise API\n */\n completeCallback: AnyFunction;\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultGetParams\n */\n getParams: Parameters = {};\n\n /**\n * Base URL used in the AJAX request. Can be set by setUrl.\n *\n * It is set to '?' rather than 'index.php?' to increase chances that it works\n * including for users who have an automatic 301 redirection from index.php? to ?\n * POST values are missing when there is such 301 redirection. So by by-passing\n * this 301 redirection, we avoid this issue.\n *\n * @see ajaxHelper.setUrl\n */\n getUrl = '?';\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultPostParams\n */\n postParams: Parameters = {};\n\n /**\n * Element to be displayed while loading\n */\n loadingElement: HTMLElement|null|JQuery|JQLite|string = null;\n\n /**\n * Element to be displayed on error\n */\n errorElement: HTMLElement|JQuery|JQLite|string = '#ajaxError';\n\n /**\n * Handle for current request\n */\n requestHandle: XMLHttpRequest|JQuery.jqXHR|null = null;\n\n defaultParams = ['idSite', 'period', 'date', 'segment'];\n\n constructor() {\n this.errorCallback = defaultErrorCallback;\n }\n\n /**\n * Adds params to the request.\n * If params are given more then once, the latest given value is used for the request\n *\n * @param params\n * @param type type of given parameters (POST or GET)\n * @return {void}\n */\n addParams(params: Parameters|string, type: string): void {\n if (typeof params === 'string') {\n // TODO: add global types for broadcast (multiple uses below)\n params = window['broadcast'].getValuesFromUrl(params); // eslint-disable-line\n }\n\n const arrayParams = ['compareSegments', 'comparePeriods', 'compareDates'];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n if (arrayParams.indexOf(key) !== -1\n && !value\n ) {\n return;\n }\n\n if (type.toLowerCase() === 'get') {\n this.getParams[key] = value;\n } else if (type.toLowerCase() === 'post') {\n this.postParams[key] = value;\n }\n });\n }\n\n withTokenInUrl(): void {\n this.withToken = true;\n }\n\n /**\n * Sets the base URL to use in the AJAX request.\n */\n setUrl(url: string): void {\n this.addParams(broadcast.getValuesFromUrl(url), 'GET');\n }\n\n /**\n * Gets this helper instance ready to send a bulk request. Each argument to this\n * function is a single request to use.\n */\n setBulkRequests(...urls: string[]): void {\n const urlsProcessed = urls.map((u) => $.param(u));\n\n this.addParams({\n module: 'API',\n method: 'API.getBulkRequest',\n urls: urlsProcessed,\n format: 'json',\n }, 'post');\n }\n\n /**\n * Set a timeout (in milliseconds) for the request. This will override any global timeout.\n *\n * @param timeout Timeout in milliseconds\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Sets the callback called after the request finishes\n *\n * @param callback Callback function\n * @deprecated use the jquery promise API\n */\n setCallback(callback: AnyFunction): void {\n this.callback = callback;\n }\n\n /**\n * Set that the callback passed to setCallback() should be used if an application error (i.e. an\n * Exception in PHP) is returned.\n */\n useCallbackInCaseOfError(): void {\n this.useRegularCallbackInCaseOfError = true;\n }\n\n /**\n * Set callback to redirect on success handler\n * &update=1(+x) will be appended to the current url\n *\n * @param [params] to modify in redirect url\n * @return {void}\n */\n redirectOnSuccess(params: Parameters): void {\n this.setCallback(() => {\n piwikHelper.redirect(params);\n });\n }\n\n /**\n * Sets the callback called in case of an error within the request\n *\n * @deprecated use the jquery promise API\n */\n setErrorCallback(callback: AnyFunction): void {\n this.errorCallback = callback;\n }\n\n /**\n * Sets the complete callback which is called after an error or success callback.\n *\n * @deprecated use the jquery promise API\n */\n setCompleteCallback(callback: AnyFunction): void {\n this.completeCallback = callback;\n }\n\n /**\n * Sets the response format for the request\n *\n * @param format response format (e.g. json, html, ...)\n */\n setFormat(format: string): void {\n this.format = format;\n }\n\n /**\n * Set the div element to show while request is loading\n *\n * @param [element] selector for the loading element\n */\n setLoadingElement(element: string|HTMLElement|JQuery): void {\n this.loadingElement = element || '#ajaxLoadingDiv';\n }\n\n /**\n * Set the div element to show on error\n *\n * @param element selector for the error element\n */\n setErrorElement(element: HTMLElement|JQuery|string): void {\n if (!element) {\n return;\n }\n this.errorElement = element;\n }\n\n /**\n * Detect whether are allowed to use the given default parameter or not\n */\n private useGETDefaultParameter(parameter: string): boolean {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Removes a default parameter that is usually send automatically along the request.\n *\n * @param parameter A name such as \"period\", \"date\", \"segment\".\n */\n removeDefaultParameter(parameter: string): void {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n this.defaultParams.splice(i, 1);\n }\n }\n }\n }\n\n /**\n * Send the request\n */\n send(): JQuery.jqXHR {\n if ($(this.errorElement).length) {\n $(this.errorElement).hide();\n }\n\n if (this.loadingElement) {\n $(this.loadingElement).fadeIn();\n }\n\n this.requestHandle = this.buildAjaxCall();\n globalAjaxQueue.push(this.requestHandle);\n\n return this.requestHandle;\n }\n\n /**\n * Aborts the current request if it is (still) running\n */\n abort(): void {\n if (this.requestHandle && typeof this.requestHandle.abort === 'function') {\n this.requestHandle.abort();\n this.requestHandle = null;\n }\n }\n\n /**\n * Builds and sends the ajax requests\n */\n private buildAjaxCall(): JQuery.jqXHR {\n const self = this;\n const parameters = this.mixinDefaultGetParams(this.getParams);\n\n let url = this.getUrl;\n if (url[url.length - 1] !== '?') {\n url += '&';\n }\n\n // we took care of encoding &segment properly already, so we don't use $.param for it ($.param\n // URL encodes the values)\n if (parameters.segment) {\n url = `${url}segment=${parameters.segment}&`;\n delete parameters.segment;\n }\n if (parameters.date) {\n url = `${url}date=${decodeURIComponent(parameters.date.toString())}&`;\n delete parameters.date;\n }\n url += $.param(parameters);\n const ajaxCall = {\n type: 'POST',\n async: true,\n url,\n dataType: this.format || 'json',\n complete: this.completeCallback,\n error: function errorCallback() {\n globalAjaxQueue.active -= 1;\n\n if (self.errorCallback) {\n self.errorCallback.apply(this, arguments); // eslint-disable-line\n }\n },\n success: (response, status, request) => {\n if (this.loadingElement) {\n $(this.loadingElement).hide();\n }\n\n if (response && response.result === 'error' && !this.useRegularCallbackInCaseOfError) {\n let placeAt = null;\n let type = 'toast';\n if ($(this.errorElement).length && response.message) {\n $(this.errorElement).show();\n placeAt = this.errorElement;\n type = null;\n }\n\n if (response.message) {\n const UI = window['require']('piwik/UI'); // eslint-disable-line\n const notification = new UI.Notification();\n notification.show(response.message, {\n placeat: placeAt,\n context: 'error',\n type,\n id: 'ajaxHelper',\n });\n notification.scrollToNotification();\n }\n } else if (this.callback) {\n this.callback(response, status, request);\n }\n\n globalAjaxQueue.active -= 1;\n if (Matomo.ajaxRequestFinished) {\n Matomo.ajaxRequestFinished();\n }\n },\n data: this.mixinDefaultPostParams(this.postParams),\n timeout: this.timeout !== null ? this.timeout : undefined,\n };\n\n return $.ajax(ajaxCall);\n }\n\n private isRequestToApiMethod() {\n return (this.getParams && this.getParams.module === 'API' && this.getParams.method)\n || (this.postParams && this.postParams.module === 'API' && this.postParams.method);\n }\n\n isWidgetizedRequest(): boolean {\n return (broadcast.getValueFromUrl('module') === 'Widgetize');\n }\n\n private getDefaultPostParams() {\n if (this.withToken || this.isRequestToApiMethod() || Matomo.shouldPropagateTokenAuth) {\n return {\n token_auth: Matomo.token_auth,\n // When viewing a widgetized report there won't be any session that can be used, so don't\n // force session usage\n force_api_session: broadcast.isWidgetizeRequestWithoutSession() ? 0 : 1,\n };\n }\n\n return {};\n }\n\n /**\n * Mixin the default parameters to send as POST\n *\n * @param params parameter object\n */\n private mixinDefaultPostParams(params): Parameters {\n const defaultParams = this.getDefaultPostParams();\n\n const mergedParams = {\n ...defaultParams,\n ...params,\n };\n\n return mergedParams;\n }\n\n /**\n * Mixin the default parameters to send as GET\n *\n * @param params parameter object\n */\n private mixinDefaultGetParams(originalParams): Parameters {\n const segment = MatomoUrl.getSearchParam('segment');\n\n const defaultParams = {\n idSite: Matomo.idSite || broadcast.getValueFromUrl('idSite'),\n period: Matomo.period || broadcast.getValueFromUrl('period'),\n segment,\n };\n\n const params = originalParams;\n\n // never append token_auth to url\n if (params.token_auth) {\n params.token_auth = null;\n delete params.token_auth;\n }\n\n Object.keys(defaultParams).forEach((key) => {\n if (this.useGETDefaultParameter(key)\n && !params[key]\n && !this.postParams[key]\n && defaultParams[key]\n ) {\n params[key] = defaultParams[key];\n }\n });\n\n // handle default date & period if not already set\n if (this.useGETDefaultParameter('date') && !params.date && !this.postParams.date) {\n params.date = Matomo.currentDateString;\n }\n\n return params;\n }\n}\n","import AjaxHelper from './AjaxHelper';\n\ndeclare global {\n interface Window {\n ajaxHelper: AjaxHelper;\n }\n}\n\nwindow.ajaxHelper = AjaxHelper;\n\nfunction ajaxQueue() {\n return globalAjaxQueue;\n}\n\nangular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst PiwikUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default PiwikUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport PiwikUrl from './PiwikUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: PiwikUrl.getSearchParam.bind(PiwikUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport PiwikUrl from '../PiwikUrl/PiwikUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = PiwikUrl.getSearchParam('date');\n const period = PiwikUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Piwik = piwik;\nexport default Piwik;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Piwik from './Piwik';\n\nfunction piwikService() {\n return Piwik;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n<template>\n <slot></slot>\n</template>\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n show: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close'],\n activated() {\n const slotElement = this.element || this.$slots.default()[0].el;\n slotElement.style.display = 'none';\n },\n watch: {\n show(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$slots.default()[0].el;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => { this.$emit('closeEnd'); },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n show: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close'],\n activated() {\n const slotElement = this.element || this.$slots.default()[0].el;\n slotElement.style.display = 'none';\n },\n watch: {\n show(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$slots.default()[0].el;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => { this.$emit('closeEnd'); },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./MatomoDialog.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./MatomoDialog.vue?vue&type=script&lang=ts\"","import { render } from \"./MatomoDialog.vue?vue&type=template&id=42c028e0\"\nimport script from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport {\n createApp,\n defineComponent,\n ref,\n ComponentPublicInstance,\n} from 'vue';\n\ninterface SingleScopeVarInfo {\n vue: string;\n default?: any; // eslint-disable-line\n angularJsBind?: string;\n}\n\ntype ScopeMapping = { [scopeVarName: string]: SingleScopeVarInfo };\n\ntype AdapterFunction<InjectTypes, R = void> = (\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype PostCreateFunction<InjectTypes, R = void> = (\n vm: ComponentPublicInstance,\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype EventMapping<InjectTypes> = { [vueEventName: string]: AdapterFunction<InjectTypes> };\n\ntype ComponentType = ReturnType<typeof defineComponent>;\n\nexport default function createAngularJsAdapter<InjectTypes = []>(options: {\n component: ComponentType,\n scope?: ScopeMapping,\n directiveName: string,\n events?: EventMapping<InjectTypes>,\n $inject?: string[],\n transclude?: boolean,\n mountPointFactory?: AdapterFunction<InjectTypes, HTMLElement>,\n postCreate?: PostCreateFunction<InjectTypes>,\n noScope?: boolean,\n}): ng.IDirectiveFactory {\n const {\n component,\n scope = {},\n events = {},\n $inject,\n directiveName,\n transclude,\n mountPointFactory,\n postCreate,\n noScope,\n } = options;\n\n const angularJsScope = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (info.angularJsBind) {\n angularJsScope[scopeVarName] = info.angularJsBind;\n }\n });\n\n function angularJsAdapter(...injectedServices: InjectTypes) {\n const adapter: ng.IDirective = {\n restrict: 'A',\n scope: noScope ? undefined : angularJsScope,\n compile: function angularJsAdapterCompile() {\n return {\n post: function angularJsAdapterLink(\n ngScope: ng.IScope,\n ngElement: ng.IAugmentedJQuery,\n ngAttrs: ng.IAttributes,\n ) {\n const clone = ngElement.find('[ng-transclude]');\n\n let rootVueTemplate = '<root-component';\n Object.entries(scope).forEach(([, info]) => {\n rootVueTemplate += ` :${info.vue}=\"${info.vue}\"`;\n });\n Object.entries(events).forEach((info) => {\n const [eventName] = info;\n rootVueTemplate += ` @${eventName}=\"onEventHandler('${eventName}')\"`;\n });\n rootVueTemplate += '>';\n if (transclude) {\n rootVueTemplate += '<div ref=\"transcludeTarget\"/>';\n }\n rootVueTemplate += '</root-component>';\n const app = createApp({\n template: rootVueTemplate,\n data() {\n const initialData = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n let value = ngScope[scopeVarName];\n if (typeof value === 'undefined' && typeof info.default !== 'undefined') {\n value = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n }\n initialData[info.vue] = value;\n });\n return initialData;\n },\n setup() {\n if (transclude) {\n const transcludeTarget = ref(null);\n return {\n transcludeTarget,\n };\n }\n\n return undefined;\n },\n methods: {\n onEventHandler(name: string) {\n if (events[name]) {\n events[name](ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n },\n });\n app.config.globalProperties.$sanitize = window.vueSanitize;\n app.component('root-component', component);\n\n const mountPoint = mountPointFactory\n ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices)\n : ngElement[0];\n const vm = app.mount(mountPoint);\n\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (!info.angularJsBind) {\n return;\n }\n\n ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line\n if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {\n vm[scopeVarName] = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n } else {\n vm[scopeVarName] = newValue;\n }\n });\n });\n\n if (transclude) {\n $(vm.transcludeTarget).append(clone);\n }\n\n if (postCreate) {\n postCreate(vm, ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n };\n },\n };\n\n if (transclude) {\n adapter.transclude = true;\n adapter.template = '<div ng-transclude/>';\n }\n\n return adapter;\n }\n\n angularJsAdapter.$inject = $inject || [];\n\n angular.module('piwikApp').directive(directiveName, angularJsAdapter);\n\n return angularJsAdapter;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport { IParseService } from 'angular';\nimport { ComponentPublicInstance } from 'vue';\nimport MatomoDialog from './MatomoDialog.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter<[IParseService]>({\n component: MatomoDialog,\n scope: {\n show: {\n vue: 'show',\n default: false,\n },\n element: {\n vue: 'element',\n default: (scope, element) => element[0],\n },\n },\n events: {\n yes: (scope, element, attrs) => {\n if (attrs.yes) {\n scope.$eval(attrs.yes);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n no: (scope, element, attrs) => {\n if (attrs.no) {\n scope.$eval(attrs.no);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n close: (scope, element, attrs) => {\n if (attrs.close) {\n scope.$eval(attrs.close);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n closeEnd: (scope, element, attrs, $parse: IParseService) => {\n setTimeout(() => {\n scope.$apply($parse(attrs.piwikDialog).assign(scope, false));\n }, 0);\n },\n },\n $inject: ['$parse'],\n directiveName: 'piwikDialog',\n transclude: true,\n mountPointFactory: (scope, element) => {\n const vueRootPlaceholder = $('<div class=\"vue-placeholder\"/>');\n vueRootPlaceholder.appendTo(element);\n return vueRootPlaceholder[0];\n },\n postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => {\n scope.$watch(attrs.piwikDialog, (newValue: boolean) => {\n vm.show = newValue || false;\n });\n },\n noScope: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div v-show=\"loading\" class=\"loadingPiwik\">\n <img src=\"plugins/Morpheus/images/loading-blue.gif\" alt=\"\"/>\n <span>{{ loadingMessage }}</span>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./ActivityIndicator.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./ActivityIndicator.vue?vue&type=script&lang=ts\"","import { render } from \"./ActivityIndicator.vue?vue&type=template&id=6af4d064\"\nimport script from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nexport * from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport ActivityIndicator from './ActivityIndicator.vue';\nimport translate from '../translate';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: ActivityIndicator,\n scope: {\n loading: {\n vue: 'loading',\n angularJsBind: '<',\n },\n loadingMessage: {\n vue: 'loadingMessage',\n angularJsBind: '<',\n default: () => translate('General_LoadingData'),\n },\n },\n $inject: [],\n directiveName: 'piwikActivityIndicator',\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div\n class=\"alert\"\n :class=\"{ [`alert-${severity}`]: true }\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./Alert.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./Alert.vue?vue&type=script&lang=ts\"","import { render } from \"./Alert.vue?vue&type=template&id=c3863ae2\"\nimport script from \"./Alert.vue?vue&type=script&lang=ts\"\nexport * from \"./Alert.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Alert from './Alert.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: Alert,\n scope: {\n severity: {\n vue: 'severity',\n angularJsBind: '@piwikAlert',\n },\n },\n directiveName: 'piwikAlert',\n transclude: true,\n});\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport './Periods.adapter';\n\nexport { default as Periods } from './Periods';\nexport { default as Day } from './Day';\nexport { default as Week } from './Week';\nexport { default as Month } from './Month';\nexport { default as Year } from './Year';\nexport { default as Range } from './Range';\nexport * from './utilities';\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport './MatomoUrl/MatomoUrl.adapter';\nimport './Matomo/Matomo.adapter';\nimport './noAdblockFlag';\nimport './Periods/Day';\nimport './Periods/Week';\nimport './Periods/Month';\nimport './Periods/Year';\nimport './Periods/Range';\nimport './Periods/Periods.adapter';\nimport './AjaxHelper/AjaxHelper.adapter';\nimport './PiwikUrl/PiwikUrl.adapter';\nimport './Piwik/Piwik.adapter';\nimport './MatomoDialog/MatomoDialog.adapter';\n\nexport { default as createAngularJsAdapter } from './createAngularJsAdapter';\nexport { default as activityIndicatorAdapter } from './ActivityIndicator/ActivityIndicator.adapter';\nexport { default as ActivityIndicator } from './ActivityIndicator/ActivityIndicator.vue';\nexport { default as translate } from './translate';\nexport { default as alertAdapter } from './Alert/Alert.adapter';\nexport { default as AjaxHelper } from './AjaxHelper/AjaxHelper';\nexport { default as MatomoUrl } from './MatomoUrl/MatomoUrl';\nexport { default as Matomo } from './Matomo/Matomo';\nexport * from './Periods';\nexport { default as MatomoDialog } from './MatomoDialog/MatomoDialog.vue';\n","import './setPublicPath'\nexport * from '~entry'\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack://CoreHome/webpack/universalModuleDefinition","webpack://CoreHome/webpack/bootstrap","webpack://CoreHome/./plugins/CoreHome/vue/src/noAdblockFlag.ts","webpack://CoreHome/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/utilities.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/translate.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Day.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Week.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Month.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Year.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Range.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?c435","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?a576","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?7b62","webpack://CoreHome/./plugins/CoreHome/vue/src/createAngularJsAdapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?7f4f","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?c3b8","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?9cf5","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?4b9f","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?cfa9","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?5539","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?0bf6","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?f42e","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?6f80","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?14a2","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?92a9","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?cc69","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/index.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/index.ts","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA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","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CoreHome\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"CoreHome\"] = factory(root[\"Vue\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/CoreHome/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n// see https://github.com/matomo-org/matomo/issues/5094 used to detect an ad blocker\nwindow.hasBlockedContent = false;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst MatomoUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default MatomoUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport MatomoUrl from './MatomoUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: MatomoUrl.getSearchParam.bind(MatomoUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\ninterface Period {\n getPrettyString(): string;\n getDateRange(): Date[];\n containsToday(): boolean;\n}\n\ninterface PeriodClass {\n parse(strDate: string|Date): Period;\n getDisplayText(): string;\n}\n\n/**\n * Matomo period management service for the frontend.\n *\n * Usage:\n *\n * var DayPeriod = matomoPeriods.get('day');\n * var day = new DayPeriod(new Date());\n *\n * or\n *\n * var day = matomoPeriods.parse('day', '2013-04-05');\n *\n * Adding custom periods:\n *\n * To add your own period to the frontend, create a period class for it\n * w/ the following methods:\n *\n * - **getPrettyString()**: returns a human readable display string for the period.\n * - **getDateRange()**: returns an array w/ two elements, the first being the start\n * Date of the period, the second being the end Date. The dates\n * must be Date objects, not strings, and are inclusive.\n * - **containsToday()**: returns true if the date period contains today. False if not.\n * - (_static_) **parse(strDate)**: creates a new instance of this period from the\n * value of the 'date' query parameter.\n * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month',\n * 'week', etc.\n *\n * Then call Periods.addCustomPeriod w/ your period class:\n *\n * Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod);\n *\n * NOTE: currently only single date periods like day, week, month year can\n * be extended. Other types of periods that require a special UI to\n * view/edit aren't, since there is currently no way to use a\n * custom UI for a custom period.\n */\nclass Periods {\n periods: {[name: string]: PeriodClass} = {};\n\n periodOrder: string[] = [];\n\n addCustomPeriod(name: string, periodClass: PeriodClass) {\n if (this.periods[name]) {\n throw new Error(`The \"${name}\" period already exists! It cannot be overridden.`);\n }\n\n this.periods[name] = periodClass;\n this.periodOrder.push(name);\n }\n\n getAllLabels(): string[] {\n return Array<string>().concat(this.periodOrder);\n }\n\n get(strPeriod: string): PeriodClass {\n const periodClass = this.periods[strPeriod];\n if (!periodClass) {\n throw new Error(`Invalid period label: ${strPeriod}`);\n }\n return periodClass;\n }\n\n parse(strPeriod: string, strDate: string): Period {\n return this.get(strPeriod).parse(strDate);\n }\n\n isRecognizedPeriod(strPeriod: string): boolean {\n return !!this.periods[strPeriod];\n }\n}\n\nexport default new Periods();\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport function format(date: Date): string {\n return $.datepicker.formatDate('yy-mm-dd', date);\n}\n\nexport function getToday(): Date {\n const date = new Date(Date.now());\n\n // undo browser timezone\n date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000);\n\n // apply Matomo site timezone (if it exists)\n date.setHours(date.getHours() + ((window.piwik.timezoneOffset || 0) / 3600));\n\n // get rid of hours/minutes/seconds/etc.\n date.setHours(0);\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return date;\n}\n\nexport function parseDate(date: string|Date): Date {\n if (date instanceof Date) {\n return date;\n }\n\n const strDate = decodeURIComponent(date);\n\n if (strDate === 'today'\n || strDate === 'now'\n ) {\n return getToday();\n }\n\n if (strDate === 'yesterday'\n // note: ignoring the 'same time' part since the frontend doesn't care about the time\n || strDate === 'yesterdaySameTime'\n ) {\n const yesterday = getToday();\n yesterday.setDate(yesterday.getDate() - 1);\n return yesterday;\n }\n\n if (strDate.match(/last[ -]?week/i)) {\n const lastWeek = getToday();\n lastWeek.setDate(lastWeek.getDate() - 7);\n return lastWeek;\n }\n\n if (strDate.match(/last[ -]?month/i)) {\n const lastMonth = getToday();\n lastMonth.setDate(1);\n lastMonth.setMonth(lastMonth.getMonth() - 1);\n return lastMonth;\n }\n\n if (strDate.match(/last[ -]?year/i)) {\n const lastYear = getToday();\n lastYear.setFullYear(lastYear.getFullYear() - 1);\n return lastYear;\n }\n\n try {\n return $.datepicker.parseDate('yy-mm-dd', strDate);\n } catch (err) {\n // angular swallows this error, so manual console log here\n console.error(err.message || err);\n throw err;\n }\n}\n\nexport function todayIsInRange(dateRange: Date[]): boolean {\n if (dateRange.length !== 2) {\n return false;\n }\n\n if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) {\n return true;\n }\n\n return false;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = MatomoUrl.getSearchParam('date');\n const period = MatomoUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Matomo = piwik;\nexport default Matomo;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Matomo from './Matomo';\n\nfunction piwikService() {\n return Matomo;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport default function translate(\n translationStringId: string,\n ...values: string[]|string[][]\n): string {\n let pkArgs = values as string[];\n // handle variadic args AND single array of values (to match _pk_translate signature)\n if (values.length === 1 && values[0] && values[0] instanceof Array) {\n [pkArgs] = values as string[][];\n }\n return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class DayPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): DayPeriod {\n return new DayPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodDay');\n }\n\n getPrettyString(): string {\n return format(this.dateInPeriod);\n }\n\n getDateRange(): Date[] {\n return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('day', DayPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class WeekPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): WeekPeriod {\n return new WeekPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodWeek');\n }\n\n getPrettyString(): string {\n const weekDates = this.getDateRange();\n const startWeek = format(weekDates[0]);\n const endWeek = format(weekDates[1]);\n\n return translate('General_DateRangeFromTo', [startWeek, endWeek]);\n }\n\n getDateRange(): Date[] {\n const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7;\n\n const startWeek = new Date(this.dateInPeriod.getTime());\n startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday);\n\n const endWeek = new Date(startWeek.getTime());\n endWeek.setDate(startWeek.getDate() + 6);\n\n return [startWeek, endWeek];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('week', WeekPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class MonthPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): MonthPeriod {\n return new MonthPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodMonth');\n }\n\n getPrettyString(): string {\n const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`);\n return `${month} ${this.dateInPeriod.getFullYear()}`;\n }\n\n getDateRange(): Date[] {\n const startMonth = new Date(this.dateInPeriod.getTime());\n startMonth.setDate(1);\n\n const endMonth = new Date(this.dateInPeriod.getTime());\n endMonth.setDate(1);\n endMonth.setMonth(endMonth.getMonth() + 1);\n endMonth.setDate(0);\n\n return [startMonth, endMonth];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('month', MonthPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class YearPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): YearPeriod {\n return new YearPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodYear');\n }\n\n getPrettyString(): string {\n return this.dateInPeriod.getFullYear().toString();\n }\n\n getDateRange(): Date[] {\n const startYear = new Date(this.dateInPeriod.getTime());\n startYear.setMonth(0);\n startYear.setDate(1);\n\n const endYear = new Date(this.dateInPeriod.getTime());\n endYear.setMonth(12);\n endYear.setDate(0);\n\n return [startYear, endYear];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('year', YearPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport {\n parseDate,\n format,\n getToday,\n todayIsInRange,\n} from './utilities';\n\nexport default class RangePeriod {\n constructor(\n public readonly startDate: Date,\n public readonly endDate: Date,\n public readonly childPeriodType: string,\n ) {}\n\n /**\n * Returns a range representing the last N childPeriodType periods, including the current one.\n */\n static getLastNRange(\n childPeriodType: string,\n strAmount: string|number,\n strEndDate?: Date|string,\n ): RangePeriod {\n const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0);\n if (Number.isNaN(nAmount)) {\n throw new Error('Invalid range strAmount');\n }\n\n let endDate = strEndDate ? parseDate(strEndDate) : getToday();\n\n let startDate = new Date(endDate.getTime());\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - nAmount);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (nAmount * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - nAmount);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - nAmount);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n /**\n * Returns a range representing a specific child date range counted back from the end date\n *\n * @param childPeriodType Type of the period, eg. day, week, year\n * @param rangeEndDate\n * @param countBack Return only the child date range for this specific period number\n * @returns {RangePeriod}\n */\n static getLastNRangeChild(\n childPeriodType: string,\n rangeEndDate: Date|string,\n countBack: number,\n ): RangePeriod {\n const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday();\n let startDate = new Date(ed.getTime());\n let endDate = new Date(ed.getTime());\n\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - countBack);\n endDate.setDate(endDate.getDate() - countBack);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (countBack * 7));\n endDate.setDate(endDate.getDate() - (countBack * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - countBack);\n endDate.setDate(1);\n endDate.setMonth(endDate.getMonth() - countBack);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - countBack);\n endDate.setFullYear(endDate.getFullYear() - countBack);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n static parse(strDate: string, childPeriodType = 'day'): RangePeriod {\n if (/^previous/.test(strDate)) {\n const endDate = RangePeriod.getLastNRange(childPeriodType, '2').startDate;\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate);\n }\n\n if (/^last/.test(strDate)) {\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(4));\n }\n\n const parts = decodeURIComponent(strDate).split(',');\n return new RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType);\n }\n\n static getDisplayText(): string {\n return translate('General_DateRangeInPeriodList');\n }\n\n getPrettyString(): string {\n const start = format(this.startDate);\n const end = format(this.endDate);\n return translate('General_DateRangeFromTo', [start, end]);\n }\n\n getDateRange(): Date[] {\n return [this.startDate, this.endDate];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('range', RangePeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Periods from './Periods';\nimport RangePeriod from './Range';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nwindow.piwik.addCustomPeriod = Periods.addCustomPeriod.bind(Periods);\n\nfunction piwikPeriods() {\n return {\n getAllLabels: Periods.getAllLabels.bind(Periods),\n isRecognizedPeriod: Periods.isRecognizedPeriod.bind(Periods),\n get: Periods.get.bind(Periods),\n parse: Periods.parse.bind(Periods),\n parseDate,\n format,\n RangePeriod,\n todayIsInRange,\n };\n}\n\nangular.module('piwikApp.service').factory('piwikPeriods', piwikPeriods);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Matomo from '../Matomo/Matomo';\n\nwindow.globalAjaxQueue = [] as GlobalAjaxQueue;\nwindow.globalAjaxQueue.active = 0;\n\nwindow.globalAjaxQueue.clean = function globalAjaxQueueClean() {\n for (let i = this.length; i >= 0; i -= 1) {\n if (!this[i] || this[i].readyState === 4) {\n this.splice(i, 1);\n }\n }\n};\n\nwindow.globalAjaxQueue.push = function globalAjaxQueuePush(...args: (XMLHttpRequest|null)[]) {\n this.active += args.length;\n\n // cleanup ajax queue\n this.clean();\n\n // call original array push\n return Array.prototype.push.call(this, ...args);\n};\n\nwindow.globalAjaxQueue.abort = function globalAjaxQueueAbort() {\n // abort all queued requests if possible\n this.forEach((x) => x && x.abort && x.abort());\n\n // remove all elements from array\n this.splice(0, this.length);\n\n this.active = 0;\n};\n\ntype ParameterValue = string | number | null | undefined | ParameterValue[];\ntype Parameters = {[name: string]: ParameterValue | Parameters};\ntype AnyFunction = (...params:any[]) => any; // eslint-disable-line\n\n/**\n * error callback to use by default\n */\nfunction defaultErrorCallback(deferred: XMLHttpRequest, status: string): void {\n // do not display error message if request was aborted\n if (status === 'abort') {\n return;\n }\n\n const loadingError = $('#loadingError');\n if (Piwik_Popover.isOpen() && deferred && deferred.status === 500) {\n if (deferred && deferred.status === 500) {\n $(document.body).html(piwikHelper.escape(deferred.responseText));\n }\n } else {\n loadingError.show();\n }\n}\n\n/**\n * Global ajax helper to handle requests within Matomo\n */\nexport default class AjaxHelper {\n /**\n * Format of response\n */\n format = 'json';\n\n /**\n * A timeout for the request which will override any global timeout\n */\n timeout = null;\n\n /**\n * Callback function to be executed on success\n */\n callback: AnyFunction = null;\n\n /**\n * Use this.callback if an error is returned\n */\n useRegularCallbackInCaseOfError = false;\n\n /**\n * Callback function to be executed on error\n *\n * @deprecated use the jquery promise API\n */\n errorCallback: AnyFunction;\n\n withToken = false;\n\n /**\n * Callback function to be executed on complete (after error or success)\n *\n * @deprecated use the jquery promise API\n */\n completeCallback: AnyFunction;\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultGetParams\n */\n getParams: Parameters = {};\n\n /**\n * Base URL used in the AJAX request. Can be set by setUrl.\n *\n * It is set to '?' rather than 'index.php?' to increase chances that it works\n * including for users who have an automatic 301 redirection from index.php? to ?\n * POST values are missing when there is such 301 redirection. So by by-passing\n * this 301 redirection, we avoid this issue.\n *\n * @see ajaxHelper.setUrl\n */\n getUrl = '?';\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultPostParams\n */\n postParams: Parameters = {};\n\n /**\n * Element to be displayed while loading\n */\n loadingElement: HTMLElement|null|JQuery|JQLite|string = null;\n\n /**\n * Element to be displayed on error\n */\n errorElement: HTMLElement|JQuery|JQLite|string = '#ajaxError';\n\n /**\n * Handle for current request\n */\n requestHandle: XMLHttpRequest|JQuery.jqXHR|null = null;\n\n defaultParams = ['idSite', 'period', 'date', 'segment'];\n\n // helper method entry point\n static fetch(params: Parameters): JQuery.jqXHR {\n const helper = new AjaxHelper();\n helper.setFormat('json');\n helper.addParams(params, 'get');\n return helper.send();\n }\n\n constructor() {\n this.errorCallback = defaultErrorCallback;\n }\n\n /**\n * Adds params to the request.\n * If params are given more then once, the latest given value is used for the request\n *\n * @param params\n * @param type type of given parameters (POST or GET)\n * @return {void}\n */\n addParams(params: Parameters|string, type: string): void {\n if (typeof params === 'string') {\n // TODO: add global types for broadcast (multiple uses below)\n params = window['broadcast'].getValuesFromUrl(params); // eslint-disable-line\n }\n\n const arrayParams = ['compareSegments', 'comparePeriods', 'compareDates'];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n if (arrayParams.indexOf(key) !== -1\n && !value\n ) {\n return;\n }\n\n if (type.toLowerCase() === 'get') {\n this.getParams[key] = value;\n } else if (type.toLowerCase() === 'post') {\n this.postParams[key] = value;\n }\n });\n }\n\n withTokenInUrl(): void {\n this.withToken = true;\n }\n\n /**\n * Sets the base URL to use in the AJAX request.\n */\n setUrl(url: string): void {\n this.addParams(broadcast.getValuesFromUrl(url), 'GET');\n }\n\n /**\n * Gets this helper instance ready to send a bulk request. Each argument to this\n * function is a single request to use.\n */\n setBulkRequests(...urls: string[]): void {\n const urlsProcessed = urls.map((u) => $.param(u));\n\n this.addParams({\n module: 'API',\n method: 'API.getBulkRequest',\n urls: urlsProcessed,\n format: 'json',\n }, 'post');\n }\n\n /**\n * Set a timeout (in milliseconds) for the request. This will override any global timeout.\n *\n * @param timeout Timeout in milliseconds\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Sets the callback called after the request finishes\n *\n * @param callback Callback function\n * @deprecated use the jquery promise API\n */\n setCallback(callback: AnyFunction): void {\n this.callback = callback;\n }\n\n /**\n * Set that the callback passed to setCallback() should be used if an application error (i.e. an\n * Exception in PHP) is returned.\n */\n useCallbackInCaseOfError(): void {\n this.useRegularCallbackInCaseOfError = true;\n }\n\n /**\n * Set callback to redirect on success handler\n * &update=1(+x) will be appended to the current url\n *\n * @param [params] to modify in redirect url\n * @return {void}\n */\n redirectOnSuccess(params: Parameters): void {\n this.setCallback(() => {\n piwikHelper.redirect(params);\n });\n }\n\n /**\n * Sets the callback called in case of an error within the request\n *\n * @deprecated use the jquery promise API\n */\n setErrorCallback(callback: AnyFunction): void {\n this.errorCallback = callback;\n }\n\n /**\n * Sets the complete callback which is called after an error or success callback.\n *\n * @deprecated use the jquery promise API\n */\n setCompleteCallback(callback: AnyFunction): void {\n this.completeCallback = callback;\n }\n\n /**\n * Sets the response format for the request\n *\n * @param format response format (e.g. json, html, ...)\n */\n setFormat(format: string): void {\n this.format = format;\n }\n\n /**\n * Set the div element to show while request is loading\n *\n * @param [element] selector for the loading element\n */\n setLoadingElement(element: string|HTMLElement|JQuery): void {\n this.loadingElement = element || '#ajaxLoadingDiv';\n }\n\n /**\n * Set the div element to show on error\n *\n * @param element selector for the error element\n */\n setErrorElement(element: HTMLElement|JQuery|string): void {\n if (!element) {\n return;\n }\n this.errorElement = element;\n }\n\n /**\n * Detect whether are allowed to use the given default parameter or not\n */\n private useGETDefaultParameter(parameter: string): boolean {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Removes a default parameter that is usually send automatically along the request.\n *\n * @param parameter A name such as \"period\", \"date\", \"segment\".\n */\n removeDefaultParameter(parameter: string): void {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n this.defaultParams.splice(i, 1);\n }\n }\n }\n }\n\n /**\n * Send the request\n */\n send(): JQuery.jqXHR {\n if ($(this.errorElement).length) {\n $(this.errorElement).hide();\n }\n\n if (this.loadingElement) {\n $(this.loadingElement).fadeIn();\n }\n\n this.requestHandle = this.buildAjaxCall();\n globalAjaxQueue.push(this.requestHandle);\n\n return this.requestHandle;\n }\n\n /**\n * Aborts the current request if it is (still) running\n */\n abort(): void {\n if (this.requestHandle && typeof this.requestHandle.abort === 'function') {\n this.requestHandle.abort();\n this.requestHandle = null;\n }\n }\n\n /**\n * Builds and sends the ajax requests\n */\n private buildAjaxCall(): JQuery.jqXHR {\n const self = this;\n const parameters = this.mixinDefaultGetParams(this.getParams);\n\n let url = this.getUrl;\n if (url[url.length - 1] !== '?') {\n url += '&';\n }\n\n // we took care of encoding &segment properly already, so we don't use $.param for it ($.param\n // URL encodes the values)\n if (parameters.segment) {\n url = `${url}segment=${parameters.segment}&`;\n delete parameters.segment;\n }\n if (parameters.date) {\n url = `${url}date=${decodeURIComponent(parameters.date.toString())}&`;\n delete parameters.date;\n }\n url += $.param(parameters);\n const ajaxCall = {\n type: 'POST',\n async: true,\n url,\n dataType: this.format || 'json',\n complete: this.completeCallback,\n error: function errorCallback() {\n globalAjaxQueue.active -= 1;\n\n if (self.errorCallback) {\n self.errorCallback.apply(this, arguments); // eslint-disable-line\n }\n },\n success: (response, status, request) => {\n if (this.loadingElement) {\n $(this.loadingElement).hide();\n }\n\n if (response && response.result === 'error' && !this.useRegularCallbackInCaseOfError) {\n let placeAt = null;\n let type = 'toast';\n if ($(this.errorElement).length && response.message) {\n $(this.errorElement).show();\n placeAt = this.errorElement;\n type = null;\n }\n\n if (response.message) {\n const UI = window['require']('piwik/UI'); // eslint-disable-line\n const notification = new UI.Notification();\n notification.show(response.message, {\n placeat: placeAt,\n context: 'error',\n type,\n id: 'ajaxHelper',\n });\n notification.scrollToNotification();\n }\n } else if (this.callback) {\n this.callback(response, status, request);\n }\n\n globalAjaxQueue.active -= 1;\n if (Matomo.ajaxRequestFinished) {\n Matomo.ajaxRequestFinished();\n }\n },\n data: this.mixinDefaultPostParams(this.postParams),\n timeout: this.timeout !== null ? this.timeout : undefined,\n };\n\n return $.ajax(ajaxCall);\n }\n\n private isRequestToApiMethod() {\n return (this.getParams && this.getParams.module === 'API' && this.getParams.method)\n || (this.postParams && this.postParams.module === 'API' && this.postParams.method);\n }\n\n isWidgetizedRequest(): boolean {\n return (broadcast.getValueFromUrl('module') === 'Widgetize');\n }\n\n private getDefaultPostParams() {\n if (this.withToken || this.isRequestToApiMethod() || Matomo.shouldPropagateTokenAuth) {\n return {\n token_auth: Matomo.token_auth,\n // When viewing a widgetized report there won't be any session that can be used, so don't\n // force session usage\n force_api_session: broadcast.isWidgetizeRequestWithoutSession() ? 0 : 1,\n };\n }\n\n return {};\n }\n\n /**\n * Mixin the default parameters to send as POST\n *\n * @param params parameter object\n */\n private mixinDefaultPostParams(params): Parameters {\n const defaultParams = this.getDefaultPostParams();\n\n const mergedParams = {\n ...defaultParams,\n ...params,\n };\n\n return mergedParams;\n }\n\n /**\n * Mixin the default parameters to send as GET\n *\n * @param params parameter object\n */\n private mixinDefaultGetParams(originalParams): Parameters {\n const segment = MatomoUrl.getSearchParam('segment');\n\n const defaultParams = {\n idSite: Matomo.idSite || broadcast.getValueFromUrl('idSite'),\n period: Matomo.period || broadcast.getValueFromUrl('period'),\n segment,\n };\n\n const params = originalParams;\n\n // never append token_auth to url\n if (params.token_auth) {\n params.token_auth = null;\n delete params.token_auth;\n }\n\n Object.keys(defaultParams).forEach((key) => {\n if (this.useGETDefaultParameter(key)\n && !params[key]\n && !this.postParams[key]\n && defaultParams[key]\n ) {\n params[key] = defaultParams[key];\n }\n });\n\n // handle default date & period if not already set\n if (this.useGETDefaultParameter('date') && !params.date && !this.postParams.date) {\n params.date = Matomo.currentDateString;\n }\n\n return params;\n }\n}\n","import AjaxHelper from './AjaxHelper';\n\ndeclare global {\n interface Window {\n ajaxHelper: AjaxHelper;\n }\n}\n\nwindow.ajaxHelper = AjaxHelper;\n\nfunction ajaxQueue() {\n return globalAjaxQueue;\n}\n\nangular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst PiwikUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default PiwikUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport PiwikUrl from './PiwikUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: PiwikUrl.getSearchParam.bind(PiwikUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport PiwikUrl from '../PiwikUrl/PiwikUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = PiwikUrl.getSearchParam('date');\n const period = PiwikUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Piwik = piwik;\nexport default Piwik;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Piwik from './Piwik';\n\nfunction piwikService() {\n return Piwik;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n<template>\n <div v-show=\"modelValue\" ref=\"root\">\n <slot></slot>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n modelValue: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close', 'update:modelValue'],\n setup() {\n const root = ref(null);\n\n return {\n root,\n };\n },\n activated() {\n this.$emit('update:modelValue', false);\n },\n watch: {\n modelValue(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$refs.root.firstElementChild;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => {\n // materialize removes the child element, so we move it back to the slot\n if (!this.element) {\n this.$refs.root.appendChild(slotElement);\n }\n this.$emit('update:modelValue', false);\n this.$emit('closeEnd');\n },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n</script>\n","\nimport { defineComponent, ref } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n modelValue: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close', 'update:modelValue'],\n setup() {\n const root = ref(null);\n\n return {\n root,\n };\n },\n activated() {\n this.$emit('update:modelValue', false);\n },\n watch: {\n modelValue(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$refs.root.firstElementChild;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => {\n // materialize removes the child element, so we move it back to the slot\n if (!this.element) {\n this.$refs.root.appendChild(slotElement);\n }\n this.$emit('update:modelValue', false);\n this.$emit('closeEnd');\n },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./MatomoDialog.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./MatomoDialog.vue?vue&type=script&lang=ts\"","import { render } from \"./MatomoDialog.vue?vue&type=template&id=50fda6d8\"\nimport script from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport {\n createApp,\n defineComponent,\n ref,\n ComponentPublicInstance,\n} from 'vue';\nimport translate from './translate';\n\ninterface SingleScopeVarInfo {\n vue?: string;\n default?: any; // eslint-disable-line\n angularJsBind?: string;\n}\n\ntype ScopeMapping = { [scopeVarName: string]: SingleScopeVarInfo };\n\ntype AdapterFunction<InjectTypes, R = void> = (\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype EventAdapterFunction<InjectTypes, R = void> = (\n $event: any, // eslint-disable-line\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype PostCreateFunction<InjectTypes, R = void> = (\n vm: ComponentPublicInstance,\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype EventMapping<InjectTypes> = { [vueEventName: string]: EventAdapterFunction<InjectTypes> };\n\ntype ComponentType = ReturnType<typeof defineComponent>;\n\nlet transcludeCounter = 0;\n\nexport default function createAngularJsAdapter<InjectTypes = []>(options: {\n component: ComponentType,\n scope?: ScopeMapping,\n directiveName: string,\n events?: EventMapping<InjectTypes>,\n $inject?: string[],\n transclude?: boolean,\n mountPointFactory?: AdapterFunction<InjectTypes, HTMLElement>,\n postCreate?: PostCreateFunction<InjectTypes>,\n noScope?: boolean,\n}): ng.IDirectiveFactory {\n const {\n component,\n scope = {},\n events = {},\n $inject,\n directiveName,\n transclude,\n mountPointFactory,\n postCreate,\n noScope,\n } = options;\n\n const currentTranscludeCounter = transcludeCounter;\n if (transclude) {\n transcludeCounter += 1;\n }\n\n const angularJsScope = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (!info.vue) {\n info.vue = scopeVarName;\n }\n if (info.angularJsBind) {\n angularJsScope[scopeVarName] = info.angularJsBind;\n }\n });\n\n function angularJsAdapter(...injectedServices: InjectTypes) {\n const adapter: ng.IDirective = {\n restrict: 'A',\n scope: noScope ? undefined : angularJsScope,\n compile: function angularJsAdapterCompile() {\n return {\n post: function angularJsAdapterLink(\n ngScope: ng.IScope,\n ngElement: ng.IAugmentedJQuery,\n ngAttrs: ng.IAttributes,\n ) {\n const clone = transclude ? ngElement.find(`[ng-transclude][counter=${currentTranscludeCounter}]`) : null;\n\n let rootVueTemplate = '<root-component';\n Object.entries(scope).forEach(([, info]) => {\n rootVueTemplate += ` :${info.vue}=\"${info.vue}\"`;\n });\n Object.entries(events).forEach((info) => {\n const [eventName] = info;\n rootVueTemplate += ` @${eventName}=\"onEventHandler('${eventName}', $event)\"`;\n });\n rootVueTemplate += '>';\n if (transclude) {\n rootVueTemplate += '<div ref=\"transcludeTarget\"/>';\n }\n rootVueTemplate += '</root-component>';\n const app = createApp({\n template: rootVueTemplate,\n data() {\n const initialData = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n let value = ngScope[scopeVarName];\n if (typeof value === 'undefined' && typeof info.default !== 'undefined') {\n value = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n }\n initialData[info.vue] = value;\n });\n return initialData;\n },\n setup() {\n if (transclude) {\n const transcludeTarget = ref(null);\n return {\n transcludeTarget,\n };\n }\n\n return undefined;\n },\n methods: {\n onEventHandler(name: string, $event: any) { // eslint-disable-line\n if (events[name]) {\n events[name]($event, ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n },\n });\n app.config.globalProperties.$sanitize = window.vueSanitize;\n app.config.globalProperties.translate = translate;\n app.component('root-component', component);\n\n const mountPoint = mountPointFactory\n ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices)\n : ngElement[0];\n const vm = app.mount(mountPoint);\n\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (!info.angularJsBind) {\n return;\n }\n\n ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line\n if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {\n vm[scopeVarName] = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n } else {\n vm[scopeVarName] = newValue;\n }\n });\n });\n\n if (transclude) {\n $(vm.transcludeTarget).append(clone);\n }\n\n if (postCreate) {\n postCreate(vm, ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n };\n },\n };\n\n if (transclude) {\n adapter.transclude = true;\n adapter.template = `<div ng-transclude counter=\"${currentTranscludeCounter}\"/>`;\n }\n\n return adapter;\n }\n\n angularJsAdapter.$inject = $inject || [];\n\n angular.module('piwikApp').directive(directiveName, angularJsAdapter);\n\n return angularJsAdapter;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport { IParseService } from 'angular';\nimport { ComponentPublicInstance } from 'vue';\nimport MatomoDialog from './MatomoDialog.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter<[IParseService]>({\n component: MatomoDialog,\n scope: {\n show: {\n vue: 'modelValue',\n default: false,\n },\n element: {\n default: (scope, element) => element[0],\n },\n },\n events: {\n yes: ($event, scope, element, attrs) => {\n if (attrs.yes) {\n scope.$eval(attrs.yes);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n no: ($event, scope, element, attrs) => {\n if (attrs.no) {\n scope.$eval(attrs.no);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n close: ($event, scope, element, attrs) => {\n if (attrs.close) {\n scope.$eval(attrs.close);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n 'update:modelValue': (newValue, scope, element, attrs, $parse: IParseService) => {\n setTimeout(() => {\n scope.$apply($parse(attrs.piwikDialog).assign(scope, newValue));\n }, 0);\n },\n },\n $inject: ['$parse'],\n directiveName: 'piwikDialog',\n transclude: true,\n mountPointFactory: (scope, element) => {\n const vueRootPlaceholder = $('<div class=\"vue-placeholder\"/>');\n vueRootPlaceholder.appendTo(element);\n return vueRootPlaceholder[0];\n },\n postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => {\n scope.$watch(attrs.piwikDialog, (newValue: boolean, oldValue: boolean) => {\n if (oldValue !== newValue) {\n vm.modelValue = newValue || false;\n }\n });\n },\n noScope: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div\n class=\"enrichedHeadline\"\n v-on:mouseenter=\"showIcons = true\"\n v-on:mouseleave=\"showIcons = false\"\n ref=\"root\"\n >\n <div\n v-if=\"!editUrl\"\n class=\"title\"\n tabindex=\"6\"\n >\n <slot />\n </div>\n <a\n v-if=\"editUrl\"\n class=\"title\"\n :href=\"editUrl\"\n :title=\"translate('CoreHome_ClickToEditX', $sanitize(actualFeatureName))\"\n >\n <slot />\n </a>\n <span\n v-show=\"showIcons || showInlineHelp\"\n class=\"iconsBar\"\n >\n <a\n v-if=\"helpUrl && !actualInlineHelp\"\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"helpIcon\"\n :href=\"helpUrl\"\n :title=\"translate('CoreHome_ExternalHelp')\"\n ><span class=\"icon-help\" /></a>\n <a\n v-if=\"actualInlineHelp\"\n v-on:click=\"showInlineHelp = !showInlineHelp\"\n class=\"helpIcon\"\n :class=\"{ 'active': showInlineHelp }\"\n :title=\"translate(reportGenerated ? 'General_HelpReport' : 'General_Help')\"\n ><span class=\"icon-info\" /></a>\n <div class=\"ratingIcons\">\n <RateFeature\n :title=\"actualFeatureName\"\n />\n </div>\n </span>\n <div\n class=\"inlineHelp\"\n v-show=\"showInlineHelp\"\n >\n <div v-html=\"$sanitize(actualInlineHelp)\"/>\n <a\n v-if=\"helpUrl\"\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"readMore\"\n :href=\"helpUrl\"\n >{{ translate('General_MoreDetails') }}</a>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n defineComponent,\n defineAsyncComponent,\n ref,\n} from 'vue';\nimport Matomo from '../Matomo/Matomo';\nimport Periods from '../Periods/Periods';\n\n// working around a cycle in dependencies (CoreHome depends on Feedback, Feedback depends on\n// CoreHome)\n// TODO: may need a generic solution at some point, but it's bad practice to have\n// cyclic dependencies like this. it worked before because it was individual files\n// dependening on each other, not whole plugins.\nconst RateFeature = defineAsyncComponent(() => new Promise((resolve) => {\n window.$(document).ready(() => {\n resolve((window as any).Feedback.RateFeature); // eslint-disable-line\n });\n}));\n\n/**\n * Usage:\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard</h2>\n * -> uses \"All Websites Dashboard\" as featurename\n *\n * <h2 piwik-enriched-headline feature-name=\"All Websites Dashboard\">All Websites Dashboard (Total:\n * 309 Visits)</h2>\n * -> custom featurename\n *\n * <h2 piwik-enriched-headline help-url=\"http://piwik.org/guide\">All Websites Dashboard</h2>\n * -> shows help icon and links to external url\n *\n * <h2 piwik-enriched-headline edit-url=\"index.php?module=Foo&action=bar&id=4\">All Websites\n * Dashboard</h2>\n * -> makes the headline clickable linking to the specified url\n *\n * <h2 piwik-enriched-headline inline-help=\"inlineHelp\">Pages report</h2>\n * -> inlineHelp specified via a attribute shows help icon on headline hover\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard\n * <div class=\"inlineHelp\">My <strong>inline help</strong></div>\n * </h2>\n * -> alternative definition for inline help\n * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url\n *\n * * <h2 piwik-enriched-headline report-generated=\"generated time\">Pages report</h2>\n * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which\n * activated by hover\n * -> the tooltip shows the value of the attribute\n */\nexport default defineComponent({\n props: {\n helpUrl: {\n type: String,\n default: '',\n },\n editUrl: {\n type: String,\n default: '',\n },\n reportGenerated: String,\n featureName: String,\n inlineHelp: String,\n },\n components: {\n RateFeature,\n },\n data() {\n return {\n showIcons: false,\n showInlineHelp: false,\n actualFeatureName: this.featureName,\n actualInlineHelp: this.inlineHelp,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n\n return {\n root,\n };\n },\n watch: {\n inlineHelp(newValue: string) {\n this.actualInlineHelp = newValue;\n },\n featureName(newValue: string) {\n this.actualFeatureName = newValue;\n },\n },\n mounted() {\n const { root } = this.$refs;\n\n if (!this.actualInlineHelp) {\n let helpNode = root.querySelector('.title .inlineHelp');\n if (!helpNode && root.parentElement.nextElementSibling) {\n // hack for reports :(\n helpNode = (root.parentElement.nextElementSibling as HTMLElement)\n .querySelector('.reportDocumentation');\n }\n\n if (helpNode) {\n // hackish solution to get binded html of p tag within the help node\n // at this point the ng-bind-html is not yet converted into html when report is not\n // initially loaded. Using $compile doesn't work. So get and set it manually\n const helpDocs = helpNode.getAttribute('data-content').trim();\n if (helpDocs.length) {\n this.actualInlineHelp = `<p>${helpDocs}</p>`;\n setTimeout(() => helpNode.remove(), 0);\n }\n }\n }\n\n if (!this.actualFeatureName) {\n this.actualFeatureName = root.querySelector('.title').textContent;\n }\n\n if (this.reportGenerated\n && Periods.parse(Matomo.period, Matomo.currentDateString).containsToday()\n ) {\n window.$(root.querySelector('.report-generated')).tooltip({\n track: true,\n content: this.reportGenerated,\n items: 'div',\n show: false,\n hide: false,\n });\n }\n },\n});\n</script>\n","\nimport {\n defineComponent,\n defineAsyncComponent,\n ref,\n} from 'vue';\nimport Matomo from '../Matomo/Matomo';\nimport Periods from '../Periods/Periods';\n\n// working around a cycle in dependencies (CoreHome depends on Feedback, Feedback depends on\n// CoreHome)\n// TODO: may need a generic solution at some point, but it's bad practice to have\n// cyclic dependencies like this. it worked before because it was individual files\n// dependening on each other, not whole plugins.\nconst RateFeature = defineAsyncComponent(() => new Promise((resolve) => {\n window.$(document).ready(() => {\n resolve((window as any).Feedback.RateFeature); // eslint-disable-line\n });\n}));\n\n/**\n * Usage:\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard</h2>\n * -> uses \"All Websites Dashboard\" as featurename\n *\n * <h2 piwik-enriched-headline feature-name=\"All Websites Dashboard\">All Websites Dashboard (Total:\n * 309 Visits)</h2>\n * -> custom featurename\n *\n * <h2 piwik-enriched-headline help-url=\"http://piwik.org/guide\">All Websites Dashboard</h2>\n * -> shows help icon and links to external url\n *\n * <h2 piwik-enriched-headline edit-url=\"index.php?module=Foo&action=bar&id=4\">All Websites\n * Dashboard</h2>\n * -> makes the headline clickable linking to the specified url\n *\n * <h2 piwik-enriched-headline inline-help=\"inlineHelp\">Pages report</h2>\n * -> inlineHelp specified via a attribute shows help icon on headline hover\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard\n * <div class=\"inlineHelp\">My <strong>inline help</strong></div>\n * </h2>\n * -> alternative definition for inline help\n * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url\n *\n * * <h2 piwik-enriched-headline report-generated=\"generated time\">Pages report</h2>\n * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which\n * activated by hover\n * -> the tooltip shows the value of the attribute\n */\nexport default defineComponent({\n props: {\n helpUrl: {\n type: String,\n default: '',\n },\n editUrl: {\n type: String,\n default: '',\n },\n reportGenerated: String,\n featureName: String,\n inlineHelp: String,\n },\n components: {\n RateFeature,\n },\n data() {\n return {\n showIcons: false,\n showInlineHelp: false,\n actualFeatureName: this.featureName,\n actualInlineHelp: this.inlineHelp,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n\n return {\n root,\n };\n },\n watch: {\n inlineHelp(newValue: string) {\n this.actualInlineHelp = newValue;\n },\n featureName(newValue: string) {\n this.actualFeatureName = newValue;\n },\n },\n mounted() {\n const { root } = this.$refs;\n\n if (!this.actualInlineHelp) {\n let helpNode = root.querySelector('.title .inlineHelp');\n if (!helpNode && root.parentElement.nextElementSibling) {\n // hack for reports :(\n helpNode = (root.parentElement.nextElementSibling as HTMLElement)\n .querySelector('.reportDocumentation');\n }\n\n if (helpNode) {\n // hackish solution to get binded html of p tag within the help node\n // at this point the ng-bind-html is not yet converted into html when report is not\n // initially loaded. Using $compile doesn't work. So get and set it manually\n const helpDocs = helpNode.getAttribute('data-content').trim();\n if (helpDocs.length) {\n this.actualInlineHelp = `<p>${helpDocs}</p>`;\n setTimeout(() => helpNode.remove(), 0);\n }\n }\n }\n\n if (!this.actualFeatureName) {\n this.actualFeatureName = root.querySelector('.title').textContent;\n }\n\n if (this.reportGenerated\n && Periods.parse(Matomo.period, Matomo.currentDateString).containsToday()\n ) {\n window.$(root.querySelector('.report-generated')).tooltip({\n track: true,\n content: this.reportGenerated,\n items: 'div',\n show: false,\n hide: false,\n });\n }\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./EnrichedHeadline.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./EnrichedHeadline.vue?vue&type=script&lang=ts\"","import { render } from \"./EnrichedHeadline.vue?vue&type=template&id=678de864\"\nimport script from \"./EnrichedHeadline.vue?vue&type=script&lang=ts\"\nexport * from \"./EnrichedHeadline.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport createAngularJsAdapter from '../createAngularJsAdapter';\nimport EnrichedHeadline from './EnrichedHeadline.vue';\n\nexport default createAngularJsAdapter({\n component: EnrichedHeadline,\n scope: {\n helpUrl: {\n angularJsBind: '@',\n },\n editUrl: {\n angularJsBind: '@',\n },\n reportGenerated: {\n angularJsBind: '@?',\n },\n featureName: {\n angularJsBind: '@',\n },\n inlineHelp: {\n angularJsBind: '@?',\n },\n },\n directiveName: 'piwikEnrichedHeadline',\n transclude: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div class=\"card\" ref=\"root\">\n <div class=\"card-content\">\n <h2\n v-if=\"contentTitle && !actualFeature && !helpUrl && !actualHelpText\"\n class=\"card-title\"\n >{{ contentTitle }}</h2>\n <h2\n v-if=\"contentTitle && (actualFeature || helpUrl || actualHelpText)\"\n class=\"card-title\"\n >\n <EnrichedHeadline\n :feature-name=\"actualFeature\"\n :help-url=\"helpUrl\"\n :inline-help=\"actualHelpText\"\n >\n {{ contentTitle }}\n </EnrichedHeadline>\n </h2>\n <div ref=\"content\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\nimport EnrichedHeadline from '../EnrichedHeadline/EnrichedHeadline.vue';\n\nlet adminContent: HTMLElement|null = null;\n\nexport default defineComponent({\n props: {\n contentTitle: String,\n feature: String,\n helpUrl: String,\n helpText: String,\n anchor: String,\n },\n components: {\n EnrichedHeadline,\n },\n data() {\n return {\n actualFeature: this.feature,\n actualHelpText: this.helpText,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n const content = ref<HTMLElement>(null);\n\n return {\n root,\n content,\n };\n },\n watch: {\n feature(newValue: string) {\n this.actualFeature = newValue;\n },\n helpText(newValue: string) {\n this.actualHelpText = newValue;\n },\n },\n mounted() {\n const { root, content } = this.$refs;\n\n if (this.anchor) {\n const anchorElement = document.createElement('a');\n anchorElement.id = this.anchor;\n root.parentElement.prepend(anchorElement);\n }\n\n setTimeout(() => {\n const inlineHelp = content.querySelector('.contentHelp');\n if (inlineHelp) {\n this.actualHelpText = inlineHelp.innerHTML;\n inlineHelp.remove();\n }\n }, 0);\n\n if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) {\n this.actualFeature = this.contentTitle;\n }\n\n if (adminContent === null) {\n // cache admin node for further content blocks\n adminContent = document.querySelector('#content.admin');\n }\n\n let contentTopPosition: number;\n if (adminContent) {\n contentTopPosition = adminContent.offsetTop;\n }\n\n if (contentTopPosition || contentTopPosition === 0) {\n const parents = root.closest('[piwik-widget-loader]');\n\n // when shown within the widget loader, we need to get the offset of that element\n // as the widget loader might be still shown. Would otherwise not position correctly\n // the widgets on the admin home page\n const topThis = parents ? parents.offsetTop : root.offsetTop;\n\n if (topThis - contentTopPosition < 17) {\n // we make sure to display the first card with no margin-top to have it on same as line as\n // navigation\n root.style.marginTop = 0;\n }\n }\n },\n});\n</script>\n","\nimport { defineComponent, ref } from 'vue';\nimport EnrichedHeadline from '../EnrichedHeadline/EnrichedHeadline.vue';\n\nlet adminContent: HTMLElement|null = null;\n\nexport default defineComponent({\n props: {\n contentTitle: String,\n feature: String,\n helpUrl: String,\n helpText: String,\n anchor: String,\n },\n components: {\n EnrichedHeadline,\n },\n data() {\n return {\n actualFeature: this.feature,\n actualHelpText: this.helpText,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n const content = ref<HTMLElement>(null);\n\n return {\n root,\n content,\n };\n },\n watch: {\n feature(newValue: string) {\n this.actualFeature = newValue;\n },\n helpText(newValue: string) {\n this.actualHelpText = newValue;\n },\n },\n mounted() {\n const { root, content } = this.$refs;\n\n if (this.anchor) {\n const anchorElement = document.createElement('a');\n anchorElement.id = this.anchor;\n root.parentElement.prepend(anchorElement);\n }\n\n setTimeout(() => {\n const inlineHelp = content.querySelector('.contentHelp');\n if (inlineHelp) {\n this.actualHelpText = inlineHelp.innerHTML;\n inlineHelp.remove();\n }\n }, 0);\n\n if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) {\n this.actualFeature = this.contentTitle;\n }\n\n if (adminContent === null) {\n // cache admin node for further content blocks\n adminContent = document.querySelector('#content.admin');\n }\n\n let contentTopPosition: number;\n if (adminContent) {\n contentTopPosition = adminContent.offsetTop;\n }\n\n if (contentTopPosition || contentTopPosition === 0) {\n const parents = root.closest('[piwik-widget-loader]');\n\n // when shown within the widget loader, we need to get the offset of that element\n // as the widget loader might be still shown. Would otherwise not position correctly\n // the widgets on the admin home page\n const topThis = parents ? parents.offsetTop : root.offsetTop;\n\n if (topThis - contentTopPosition < 17) {\n // we make sure to display the first card with no margin-top to have it on same as line as\n // navigation\n root.style.marginTop = 0;\n }\n }\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./ContentBlock.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./ContentBlock.vue?vue&type=script&lang=ts\"","import { render } from \"./ContentBlock.vue?vue&type=template&id=5f6844c4\"\nimport script from \"./ContentBlock.vue?vue&type=script&lang=ts\"\nexport * from \"./ContentBlock.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport createAngularJsAdapter from '../createAngularJsAdapter';\nimport ContentBlock from './ContentBlock.vue';\n\nexport default createAngularJsAdapter({\n component: ContentBlock,\n scope: {\n contentTitle: {\n angularJsBind: '@',\n },\n feature: {\n angularJsBind: '@',\n },\n helpUrl: {\n angularJsBind: '@',\n },\n helpText: {\n angularJsBind: '@',\n },\n anchor: {\n angularJsBind: '@?',\n },\n },\n directiveName: 'piwikContentBlock',\n transclude: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div v-show=\"loading\" class=\"loadingPiwik\">\n <img src=\"plugins/Morpheus/images/loading-blue.gif\" alt=\"\"/>\n <span>{{ loadingMessage }}</span>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./ActivityIndicator.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./ActivityIndicator.vue?vue&type=script&lang=ts\"","import { render } from \"./ActivityIndicator.vue?vue&type=template&id=6af4d064\"\nimport script from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nexport * from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport ActivityIndicator from './ActivityIndicator.vue';\nimport translate from '../translate';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: ActivityIndicator,\n scope: {\n loading: {\n vue: 'loading',\n angularJsBind: '<',\n },\n loadingMessage: {\n vue: 'loadingMessage',\n angularJsBind: '<',\n default: () => translate('General_LoadingData'),\n },\n },\n $inject: [],\n directiveName: 'piwikActivityIndicator',\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div\n class=\"alert\"\n :class=\"{ [`alert-${severity}`]: true }\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n","export { default } from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./Alert.vue?vue&type=script&lang=ts\"; export * from \"-!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../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/index.js??ref--0-1!./Alert.vue?vue&type=script&lang=ts\"","import { render } from \"./Alert.vue?vue&type=template&id=c3863ae2\"\nimport script from \"./Alert.vue?vue&type=script&lang=ts\"\nexport * from \"./Alert.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Alert from './Alert.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: Alert,\n scope: {\n severity: {\n vue: 'severity',\n angularJsBind: '@piwikAlert',\n },\n },\n directiveName: 'piwikAlert',\n transclude: true,\n});\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport './Periods.adapter';\n\nexport { default as Periods } from './Periods';\nexport { default as Day } from './Day';\nexport { default as Week } from './Week';\nexport { default as Month } from './Month';\nexport { default as Year } from './Year';\nexport { default as Range } from './Range';\nexport * from './utilities';\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport './MatomoUrl/MatomoUrl.adapter';\nimport './Matomo/Matomo.adapter';\nimport './noAdblockFlag';\nimport './Periods/Day';\nimport './Periods/Week';\nimport './Periods/Month';\nimport './Periods/Year';\nimport './Periods/Range';\nimport './Periods/Periods.adapter';\nimport './AjaxHelper/AjaxHelper.adapter';\nimport './PiwikUrl/PiwikUrl.adapter';\nimport './Piwik/Piwik.adapter';\nimport './MatomoDialog/MatomoDialog.adapter';\nimport './EnrichedHeadline/EnrichedHeadline.adapter';\nimport './ContentBlock/ContentBlock.adapter';\n\nexport { default as createAngularJsAdapter } from './createAngularJsAdapter';\nexport { default as activityIndicatorAdapter } from './ActivityIndicator/ActivityIndicator.adapter';\nexport { default as ActivityIndicator } from './ActivityIndicator/ActivityIndicator.vue';\nexport { default as translate } from './translate';\nexport { default as alertAdapter } from './Alert/Alert.adapter';\nexport { default as AjaxHelper } from './AjaxHelper/AjaxHelper';\nexport { default as MatomoUrl } from './MatomoUrl/MatomoUrl';\nexport { default as Matomo } from './Matomo/Matomo';\nexport * from './Periods';\nexport { default as MatomoDialog } from './MatomoDialog/MatomoDialog.vue';\nexport { default as EnrichedHeadline } from './EnrichedHeadline/EnrichedHeadline.vue';\nexport { default as ContentBlock } from './ContentBlock/ContentBlock.vue';\n","import './setPublicPath'\nexport * from '~entry'\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 188d989b97..dd32960c54 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -1,140 +1,152 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.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 a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));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/CoreHome/vue/dist/",r(r.s="fae3")}({2342:function(e,t,r){"use strict"; +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},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/CoreHome/vue/dist/",n(n.s="fae3")}({2342:function(e,t,n){"use strict"; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */window.hasBlockedContent=!1},"8bbf":function(t,r){t.exports=e},fae3:function(e,t,r){"use strict";if(r.r(t),r.d(t,"createAngularJsAdapter",(function(){return ne})),r.d(t,"activityIndicatorAdapter",(function(){return ue})),r.d(t,"ActivityIndicator",(function(){return le})),r.d(t,"translate",(function(){return j})),r.d(t,"alertAdapter",(function(){return ge})),r.d(t,"AjaxHelper",(function(){return H})),r.d(t,"MatomoUrl",(function(){return o})),r.d(t,"Matomo",(function(){return D})),r.d(t,"Periods",(function(){return d})),r.d(t,"Day",(function(){return T})),r.d(t,"Week",(function(){return I})),r.d(t,"Month",(function(){return E})),r.d(t,"Year",(function(){return R})),r.d(t,"Range",(function(){return M})),r.d(t,"format",(function(){return c})),r.d(t,"getToday",(function(){return p})),r.d(t,"parseDate",(function(){return g})),r.d(t,"todayIsInRange",(function(){return h})),r.d(t,"MatomoDialog",(function(){return re})),"undefined"!==typeof window){var n=window.document.currentScript,a=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(r.p=a[1])} + */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"createAngularJsAdapter",(function(){return ie})),n.d(t,"activityIndicatorAdapter",(function(){return Ae})),n.d(t,"ActivityIndicator",(function(){return Ne})),n.d(t,"translate",(function(){return k})),n.d(t,"alertAdapter",(function(){return Ve})),n.d(t,"AjaxHelper",(function(){return U})),n.d(t,"MatomoUrl",(function(){return o})),n.d(t,"Matomo",(function(){return P})),n.d(t,"Periods",(function(){return u})),n.d(t,"Day",(function(){return S})),n.d(t,"Week",(function(){return E})),n.d(t,"Month",(function(){return I})),n.d(t,"Year",(function(){return H})),n.d(t,"Range",(function(){return F})),n.d(t,"format",(function(){return d})),n.d(t,"getToday",(function(){return p})),n.d(t,"parseDate",(function(){return h})),n.d(t,"todayIsInRange",(function(){return m})),n.d(t,"MatomoDialog",(function(){return re})),n.d(t,"EnrichedHeadline",(function(){return ve})),n.d(t,"ContentBlock",(function(){return Ie})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -const i={getSearchParam(e){const t=window.location.href.split("#"),r=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&r.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}};var o=i; +const i={getSearchParam(e){const t=window.location.href.split("#"),n=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}};var o=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 s(){const e={getSearchParam:o.getSearchParam.bind(o)};return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */function s(){const e={getSearchParam:o.getSearchParam.bind(o)};return e}function l(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 - */s.$inject=[],angular.module("piwikApp.service").service("piwikUrl",s);class u{constructor(){l(this,"periods",{}),l(this,"periodOrder",[])}addCustomPeriod(e,t){if(this.periods[e])throw new Error(`The "${e}" period already exists! It cannot be overridden.`);this.periods[e]=t,this.periodOrder.push(e)}getAllLabels(){return Array().concat(this.periodOrder)}get(e){const t=this.periods[e];if(!t)throw new Error("Invalid period label: "+e);return t}parse(e,t){return this.get(e).parse(t)}isRecognizedPeriod(e){return!!this.periods[e]}}var d=new u; + */s.$inject=[],angular.module("piwikApp.service").service("piwikUrl",s);class c{constructor(){l(this,"periods",{}),l(this,"periodOrder",[])}addCustomPeriod(e,t){if(this.periods[e])throw new Error(`The "${e}" period already exists! It cannot be overridden.`);this.periods[e]=t,this.periodOrder.push(e)}getAllLabels(){return Array().concat(this.periodOrder)}get(e){const t=this.periods[e];if(!t)throw new Error("Invalid period label: "+e);return t}parse(e,t){return this.get(e).parse(t)}isRecognizedPeriod(e){return!!this.periods[e]}}var u=new c; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function c(e){return $.datepicker.formatDate("yy-mm-dd",e)}function p(){const 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 g(e){if(e instanceof Date)return e;const t=decodeURIComponent(e);if("today"===t||"now"===t)return p();if("yesterday"===t||"yesterdaySameTime"===t){const e=p();return e.setDate(e.getDate()-1),e}if(t.match(/last[ -]?week/i)){const e=p();return e.setDate(e.getDate()-7),e}if(t.match(/last[ -]?month/i)){const e=p();return e.setDate(1),e.setMonth(e.getMonth()-1),e}if(t.match(/last[ -]?year/i)){const e=p();return e.setFullYear(e.getFullYear()-1),e}try{return $.datepicker.parseDate("yy-mm-dd",t)}catch(r){throw console.error(r.message||r),r}}function h(e){return 2===e.length&&(p()>=e[0]&&p()<=e[1])} + */function d(e){return $.datepicker.formatDate("yy-mm-dd",e)}function p(){const 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 h(e){if(e instanceof Date)return e;const t=decodeURIComponent(e);if("today"===t||"now"===t)return p();if("yesterday"===t||"yesterdaySameTime"===t){const e=p();return e.setDate(e.getDate()-1),e}if(t.match(/last[ -]?week/i)){const e=p();return e.setDate(e.getDate()-7),e}if(t.match(/last[ -]?month/i)){const e=p();return e.setDate(1),e.setMonth(e.getMonth()-1),e}if(t.match(/last[ -]?year/i)){const e=p();return e.setFullYear(e.getFullYear()-1),e}try{return $.datepicker.parseDate("yy-mm-dd",t)}catch(n){throw console.error(n.message||n),n}}function m(e){return 2===e.length&&(p()>=e[0]&&p()<=e[1])} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */let m;const{piwik:f,broadcast:w,piwikHelper:b}=window;function P(e,t){try{return d.parse(e,t),!0}catch(r){return!1}}f.helper=b,f.broadcast=w,f.updatePeriodParamsFromUrl=function(){let e=o.getSearchParam("date");const t=o.getSearchParam("period");if(!P(t,e))return;if(f.period===t&&f.currentDateString===e)return;f.period=t;const r=d.parse(t,e).getDateRange();f.startDateString=c(r[0]),f.endDateString=c(r[1]),f.updateDateInTitle(e,t),"range"===f.period&&(e=`${f.startDateString},${f.endDateString}`),f.currentDateString=e},f.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(m=m||document.title,0===m.indexOf(f.siteName))){const r=` - ${d.parse(t,e).getPrettyString()} `;document.title=`${f.siteName}${r}${m.substr(f.siteName.length)}`}},f.hasUserCapability=function(e){return window.angular.isArray(f.userCapabilities)&&-1!==f.userCapabilities.indexOf(e)};const y=f;var D=y; + */let g;const{piwik:f,broadcast:b,piwikHelper:w}=window;function y(e,t){try{return u.parse(e,t),!0}catch(n){return!1}}f.helper=w,f.broadcast=b,f.updatePeriodParamsFromUrl=function(){let e=o.getSearchParam("date");const t=o.getSearchParam("period");if(!y(t,e))return;if(f.period===t&&f.currentDateString===e)return;f.period=t;const n=u.parse(t,e).getDateRange();f.startDateString=d(n[0]),f.endDateString=d(n[1]),f.updateDateInTitle(e,t),"range"===f.period&&(e=`${f.startDateString},${f.endDateString}`),f.currentDateString=e},f.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(g=g||document.title,0===g.indexOf(f.siteName))){const n=` - ${u.parse(t,e).getPrettyString()} `;document.title=`${f.siteName}${n}${g.substr(f.siteName.length)}`}},f.hasUserCapability=function(e){return window.angular.isArray(f.userCapabilities)&&-1!==f.userCapabilities.indexOf(e)};const D=f;var P=D; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function v(){return D}function k(e,t){t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}angular.module("piwikApp.service").service("piwik",v),k.$inject=["piwik","$rootScope"],angular.module("piwikApp.service").run(k);r("2342"); + */function v(){return P}function j(e,t){t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}angular.module("piwikApp.service").service("piwik",v),j.$inject=["piwik","$rootScope"],angular.module("piwikApp.service").run(j);n("2342"); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function j(e,t=[]){return window._pk_translate(e,t)}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */function k(e,...t){let n=t;return 1===t.length&&t[0]&&t[0]instanceof Array&&([n]=t),window._pk_translate(e,n)}function O(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 - */class T{constructor(e){S(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new T(g(e))}static getDisplayText(){return j("Intl_PeriodDay")}getPrettyString(){return c(this.dateInPeriod)}getDateRange(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}containsToday(){return h(this.getDateRange())}}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */class S{constructor(e){O(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new S(h(e))}static getDisplayText(){return k("Intl_PeriodDay")}getPrettyString(){return d(this.dateInPeriod)}getDateRange(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}containsToday(){return m(this.getDateRange())}}function T(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 - */d.addCustomPeriod("day",T);class I{constructor(e){C(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new I(g(e))}static getDisplayText(){return j("Intl_PeriodWeek")}getPrettyString(){const e=this.getDateRange(),t=c(e[0]),r=c(e[1]);return j("General_DateRangeFromTo",[t,r])}getDateRange(){const e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);const r=new Date(t.getTime());return r.setDate(t.getDate()+6),[t,r]}containsToday(){return h(this.getDateRange())}}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */u.addCustomPeriod("day",S);class E{constructor(e){T(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new E(h(e))}static getDisplayText(){return k("Intl_PeriodWeek")}getPrettyString(){const e=this.getDateRange(),t=d(e[0]),n=d(e[1]);return k("General_DateRangeFromTo",[t,n])}getDateRange(){const e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);const n=new Date(t.getTime());return n.setDate(t.getDate()+6),[t,n]}containsToday(){return m(this.getDateRange())}}function C(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 - */d.addCustomPeriod("week",I);class E{constructor(e){O(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new E(g(e))}static getDisplayText(){return j("Intl_PeriodMonth")}getPrettyString(){const e=j("Intl_Month_Long_StandAlone_"+(this.dateInPeriod.getMonth()+1));return`${e} ${this.dateInPeriod.getFullYear()}`}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}containsToday(){return h(this.getDateRange())}}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */u.addCustomPeriod("week",E);class I{constructor(e){C(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new I(h(e))}static getDisplayText(){return k("Intl_PeriodMonth")}getPrettyString(){const e=k("Intl_Month_Long_StandAlone_"+(this.dateInPeriod.getMonth()+1));return`${e} ${this.dateInPeriod.getFullYear()}`}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}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 - */d.addCustomPeriod("month",E);class R{constructor(e){x(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new R(g(e))}static getDisplayText(){return j("Intl_PeriodYear")}getPrettyString(){return this.dateInPeriod.getFullYear().toString()}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}containsToday(){return h(this.getDateRange())}}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */u.addCustomPeriod("month",I);class H{constructor(e){x(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new H(h(e))}static getDisplayText(){return k("Intl_PeriodYear")}getPrettyString(){return this.dateInPeriod.getFullYear().toString()}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}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} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */d.addCustomPeriod("year",R);class M{constructor(e,t,r){A(this,"startDate",void 0),A(this,"endDate",void 0),A(this,"childPeriodType",void 0),this.startDate=e,this.endDate=t,this.childPeriodType=r}static getLastNRange(e,t,r){const n=Math.max(parseInt(t.toString(),10)-1,0);if(Number.isNaN(n))throw new Error("Invalid range strAmount");let a=r?g(r):p(),i=new Date(a.getTime());if("day"===e)i.setDate(i.getDate()-n);else if("week"===e)i.setDate(i.getDate()-7*n);else if("month"===e)i.setDate(1),i.setMonth(i.getMonth()-n);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);i.setFullYear(i.getFullYear()-n)}if("day"!==e){const t=d.periods[e].parse(i),r=d.periods[e].parse(a);[i]=t.getDateRange(),[,a]=r.getDateRange()}const o=new Date(1991,7,6);if(i.getTime()-o.getTime()<0)switch(e){case"year":i=new Date(1992,0,1);break;case"month":i=new Date(1991,8,1);break;case"week":i=new Date(1991,8,12);break;case"day":default:i=o;break}return new M(i,a,e)}static getLastNRangeChild(e,t,r){const n=t?g(t):p();let a=new Date(n.getTime()),i=new Date(n.getTime());if("day"===e)a.setDate(a.getDate()-r),i.setDate(i.getDate()-r);else if("week"===e)a.setDate(a.getDate()-7*r),i.setDate(i.getDate()-7*r);else if("month"===e)a.setDate(1),a.setMonth(a.getMonth()-r),i.setDate(1),i.setMonth(i.getMonth()-r);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);a.setFullYear(a.getFullYear()-r),i.setFullYear(i.getFullYear()-r)}if("day"!==e){const t=d.periods[e].parse(a),r=d.periods[e].parse(i);[a]=t.getDateRange(),[,i]=r.getDateRange()}const o=new Date(1991,7,6);if(a.getTime()-o.getTime()<0)switch(e){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=o;break}return new M(a,i,e)}static parse(e,t="day"){if(/^previous/.test(e)){const r=M.getLastNRange(t,"2").startDate;return M.getLastNRange(t,e.substring(8),r)}if(/^last/.test(e))return M.getLastNRange(t,e.substring(4));const r=decodeURIComponent(e).split(",");return new M(g(r[0]),g(r[1]),t)}static getDisplayText(){return j("General_DateRangeInPeriodList")}getPrettyString(){const e=c(this.startDate),t=c(this.endDate);return j("General_DateRangeFromTo",[e,t])}getDateRange(){return[this.startDate,this.endDate]}containsToday(){return h(this.getDateRange())}}function F(){return{getAllLabels:d.getAllLabels.bind(d),isRecognizedPeriod:d.isRecognizedPeriod.bind(d),get:d.get.bind(d),parse:d.parse.bind(d),parseDate:g,format:c,RangePeriod:M,todayIsInRange:h}}function _(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e} + */u.addCustomPeriod("year",H);class F{constructor(e,t,n){R(this,"startDate",void 0),R(this,"endDate",void 0),R(this,"childPeriodType",void 0),this.startDate=e,this.endDate=t,this.childPeriodType=n}static getLastNRange(e,t,n){const r=Math.max(parseInt(t.toString(),10)-1,0);if(Number.isNaN(r))throw new Error("Invalid range strAmount");let a=n?h(n):p(),i=new Date(a.getTime());if("day"===e)i.setDate(i.getDate()-r);else if("week"===e)i.setDate(i.getDate()-7*r);else if("month"===e)i.setDate(1),i.setMonth(i.getMonth()-r);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);i.setFullYear(i.getFullYear()-r)}if("day"!==e){const t=u.periods[e].parse(i),n=u.periods[e].parse(a);[i]=t.getDateRange(),[,a]=n.getDateRange()}const o=new Date(1991,7,6);if(i.getTime()-o.getTime()<0)switch(e){case"year":i=new Date(1992,0,1);break;case"month":i=new Date(1991,8,1);break;case"week":i=new Date(1991,8,12);break;case"day":default:i=o;break}return new F(i,a,e)}static getLastNRangeChild(e,t,n){const r=t?h(t):p();let a=new Date(r.getTime()),i=new Date(r.getTime());if("day"===e)a.setDate(a.getDate()-n),i.setDate(i.getDate()-n);else if("week"===e)a.setDate(a.getDate()-7*n),i.setDate(i.getDate()-7*n);else if("month"===e)a.setDate(1),a.setMonth(a.getMonth()-n),i.setDate(1),i.setMonth(i.getMonth()-n);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);a.setFullYear(a.getFullYear()-n),i.setFullYear(i.getFullYear()-n)}if("day"!==e){const t=u.periods[e].parse(a),n=u.periods[e].parse(i);[a]=t.getDateRange(),[,i]=n.getDateRange()}const o=new Date(1991,7,6);if(a.getTime()-o.getTime()<0)switch(e){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=o;break}return new F(a,i,e)}static parse(e,t="day"){if(/^previous/.test(e)){const n=F.getLastNRange(t,"2").startDate;return F.getLastNRange(t,e.substring(8),n)}if(/^last/.test(e))return F.getLastNRange(t,e.substring(4));const n=decodeURIComponent(e).split(",");return new F(h(n[0]),h(n[1]),t)}static getDisplayText(){return k("General_DateRangeInPeriodList")}getPrettyString(){const e=d(this.startDate),t=d(this.endDate);return k("General_DateRangeFromTo",[e,t])}getDateRange(){return[this.startDate,this.endDate]}containsToday(){return m(this.getDateRange())}}function N(){return{getAllLabels:u.getAllLabels.bind(u),isRecognizedPeriod:u.isRecognizedPeriod.bind(u),get:u.get.bind(u),parse:u.parse.bind(u),parseDate:h,format:d,RangePeriod:F,todayIsInRange:m}}function A(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 U(e,t){if("abort"===t)return;const r=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):r.show()}d.addCustomPeriod("range",M), + */function B(e,t){if("abort"===t)return;const n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}u.addCustomPeriod("range",F), /*! * 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=d.addCustomPeriod.bind(d),angular.module("piwikApp.service").factory("piwikPeriods",F),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(let e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(...e){return this.active+=e.length,this.clean(),Array.prototype.push.call(this,...e)},window.globalAjaxQueue.abort=function(){this.forEach(e=>e&&e.abort&&e.abort()),this.splice(0,this.length),this.active=0};class H{constructor(){_(this,"format","json"),_(this,"timeout",null),_(this,"callback",null),_(this,"useRegularCallbackInCaseOfError",!1),_(this,"errorCallback",void 0),_(this,"withToken",!1),_(this,"completeCallback",void 0),_(this,"getParams",{}),_(this,"getUrl","?"),_(this,"postParams",{}),_(this,"loadingElement",null),_(this,"errorElement","#ajaxError"),_(this,"requestHandle",null),_(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=U}addParams(e,t){"string"===typeof e&&(e=window["broadcast"].getValuesFromUrl(e));const r=["compareSegments","comparePeriods","compareDates"];Object.keys(e).forEach(n=>{const a=e[n];(-1===r.indexOf(n)||a)&&("get"===t.toLowerCase()?this.getParams[n]=a:"post"===t.toLowerCase()&&(this.postParams[n]=a))})}withTokenInUrl(){this.withToken=!0}setUrl(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}setBulkRequests(...e){const t=e.map(e=>$.param(e));this.addParams({module:"API",method:"API.getBulkRequest",urls:t,format:"json"},"post")}setTimeout(e){this.timeout=e}setCallback(e){this.callback=e}useCallbackInCaseOfError(){this.useRegularCallbackInCaseOfError=!0}redirectOnSuccess(e){this.setCallback(()=>{piwikHelper.redirect(e)})}setErrorCallback(e){this.errorCallback=e}setCompleteCallback(e){this.completeCallback=e}setFormat(e){this.format=e}setLoadingElement(e){this.loadingElement=e||"#ajaxLoadingDiv"}setErrorElement(e){e&&(this.errorElement=e)}useGETDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}removeDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}send(){return $(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),globalAjaxQueue.push(this.requestHandle),this.requestHandle}abort(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}buildAjaxCall(){const e=this,t=this.mixinDefaultGetParams(this.getParams);let r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),t.segment&&(r=`${r}segment=${t.segment}&`,delete t.segment),t.date&&(r=`${r}date=${decodeURIComponent(t.date.toString())}&`,delete t.date),r+=$.param(t);const n={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,error:function(){globalAjaxQueue.active-=1,e.errorCallback&&e.errorCallback.apply(this,arguments)},success:(e,t,r)=>{if(this.loadingElement&&$(this.loadingElement).hide(),e&&"error"===e.result&&!this.useRegularCallbackInCaseOfError){let t=null,r="toast";if($(this.errorElement).length&&e.message&&($(this.errorElement).show(),t=this.errorElement,r=null),e.message){const n=window["require"]("piwik/UI"),a=new n.Notification;a.show(e.message,{placeat:t,context:"error",type:r,id:"ajaxHelper"}),a.scrollToNotification()}}else this.callback&&this.callback(e,t,r);globalAjaxQueue.active-=1,D.ajaxRequestFinished&&D.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(n)}isRequestToApiMethod(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}isWidgetizedRequest(){return"Widgetize"===broadcast.getValueFromUrl("module")}getDefaultPostParams(){return this.withToken||this.isRequestToApiMethod()||D.shouldPropagateTokenAuth?{token_auth:D.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}mixinDefaultPostParams(e){const t=this.getDefaultPostParams(),r={...t,...e};return r}mixinDefaultGetParams(e){const t=o.getSearchParam("segment"),r={idSite:D.idSite||broadcast.getValueFromUrl("idSite"),period:D.period||broadcast.getValueFromUrl("period"),segment:t},n=e;return n.token_auth&&(n.token_auth=null,delete n.token_auth),Object.keys(r).forEach(e=>{this.useGETDefaultParameter(e)&&!n[e]&&!this.postParams[e]&&r[e]&&(n[e]=r[e])}),!this.useGETDefaultParameter("date")||n.date||this.postParams.date||(n.date=D.currentDateString),n}}function q(){return globalAjaxQueue}window.ajaxHelper=H,angular.module("piwikApp.service").service("globalAjaxQueue",q); +window.piwik.addCustomPeriod=u.addCustomPeriod.bind(u),angular.module("piwikApp.service").factory("piwikPeriods",N),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(let e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(...e){return this.active+=e.length,this.clean(),Array.prototype.push.call(this,...e)},window.globalAjaxQueue.abort=function(){this.forEach(e=>e&&e.abort&&e.abort()),this.splice(0,this.length),this.active=0};class U{static fetch(e){const t=new U;return t.setFormat("json"),t.addParams(e,"get"),t.send()}constructor(){A(this,"format","json"),A(this,"timeout",null),A(this,"callback",null),A(this,"useRegularCallbackInCaseOfError",!1),A(this,"errorCallback",void 0),A(this,"withToken",!1),A(this,"completeCallback",void 0),A(this,"getParams",{}),A(this,"getUrl","?"),A(this,"postParams",{}),A(this,"loadingElement",null),A(this,"errorElement","#ajaxError"),A(this,"requestHandle",null),A(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=B}addParams(e,t){"string"===typeof e&&(e=window["broadcast"].getValuesFromUrl(e));const n=["compareSegments","comparePeriods","compareDates"];Object.keys(e).forEach(r=>{const a=e[r];(-1===n.indexOf(r)||a)&&("get"===t.toLowerCase()?this.getParams[r]=a:"post"===t.toLowerCase()&&(this.postParams[r]=a))})}withTokenInUrl(){this.withToken=!0}setUrl(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}setBulkRequests(...e){const t=e.map(e=>$.param(e));this.addParams({module:"API",method:"API.getBulkRequest",urls:t,format:"json"},"post")}setTimeout(e){this.timeout=e}setCallback(e){this.callback=e}useCallbackInCaseOfError(){this.useRegularCallbackInCaseOfError=!0}redirectOnSuccess(e){this.setCallback(()=>{piwikHelper.redirect(e)})}setErrorCallback(e){this.errorCallback=e}setCompleteCallback(e){this.completeCallback=e}setFormat(e){this.format=e}setLoadingElement(e){this.loadingElement=e||"#ajaxLoadingDiv"}setErrorElement(e){e&&(this.errorElement=e)}useGETDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}removeDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}send(){return $(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),globalAjaxQueue.push(this.requestHandle),this.requestHandle}abort(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}buildAjaxCall(){const e=this,t=this.mixinDefaultGetParams(this.getParams);let n=this.getUrl;"?"!==n[n.length-1]&&(n+="&"),t.segment&&(n=`${n}segment=${t.segment}&`,delete t.segment),t.date&&(n=`${n}date=${decodeURIComponent(t.date.toString())}&`,delete t.date),n+=$.param(t);const r={type:"POST",async:!0,url:n,dataType:this.format||"json",complete:this.completeCallback,error:function(){globalAjaxQueue.active-=1,e.errorCallback&&e.errorCallback.apply(this,arguments)},success:(e,t,n)=>{if(this.loadingElement&&$(this.loadingElement).hide(),e&&"error"===e.result&&!this.useRegularCallbackInCaseOfError){let t=null,n="toast";if($(this.errorElement).length&&e.message&&($(this.errorElement).show(),t=this.errorElement,n=null),e.message){const r=window["require"]("piwik/UI"),a=new r.Notification;a.show(e.message,{placeat:t,context:"error",type:n,id:"ajaxHelper"}),a.scrollToNotification()}}else this.callback&&this.callback(e,t,n);globalAjaxQueue.active-=1,P.ajaxRequestFinished&&P.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(r)}isRequestToApiMethod(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}isWidgetizedRequest(){return"Widgetize"===broadcast.getValueFromUrl("module")}getDefaultPostParams(){return this.withToken||this.isRequestToApiMethod()||P.shouldPropagateTokenAuth?{token_auth:P.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}mixinDefaultPostParams(e){const t=this.getDefaultPostParams(),n={...t,...e};return n}mixinDefaultGetParams(e){const t=o.getSearchParam("segment"),n={idSite:P.idSite||broadcast.getValueFromUrl("idSite"),period:P.period||broadcast.getValueFromUrl("period"),segment:t},r=e;return r.token_auth&&(r.token_auth=null,delete r.token_auth),Object.keys(n).forEach(e=>{this.useGETDefaultParameter(e)&&!r[e]&&!this.postParams[e]&&n[e]&&(r[e]=n[e])}),!this.useGETDefaultParameter("date")||r.date||this.postParams.date||(r.date=P.currentDateString),r}}function M(){return globalAjaxQueue}window.ajaxHelper=U,angular.module("piwikApp.service").service("globalAjaxQueue",M); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -const N={getSearchParam(e){const t=window.location.href.split("#"),r=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&r.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}};var L=N; +const V={getSearchParam(e){const t=window.location.href.split("#"),n=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}};var _=V; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function B(){const e={getSearchParam:L.getSearchParam.bind(L)};return e} + */function q(){const e={getSearchParam:_.getSearchParam.bind(_)};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 */ -let V;B.$inject=[],angular.module("piwikApp.service").service("piwikUrl",B);const{piwik:Y,broadcast:z,piwikHelper:G}=window;function Q(e,t){try{return d.parse(e,t),!0}catch(r){return!1}}Y.helper=G,Y.broadcast=z,Y.updatePeriodParamsFromUrl=function(){let e=L.getSearchParam("date");const t=L.getSearchParam("period");if(!Q(t,e))return;if(Y.period===t&&Y.currentDateString===e)return;Y.period=t;const r=d.parse(t,e).getDateRange();Y.startDateString=c(r[0]),Y.endDateString=c(r[1]),Y.updateDateInTitle(e,t),"range"===Y.period&&(e=`${Y.startDateString},${Y.endDateString}`),Y.currentDateString=e},Y.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(V=V||document.title,0===V.indexOf(Y.siteName))){const r=` - ${d.parse(t,e).getPrettyString()} `;document.title=`${Y.siteName}${r}${V.substr(Y.siteName.length)}`}},Y.hasUserCapability=function(e){return window.angular.isArray(Y.userCapabilities)&&-1!==Y.userCapabilities.indexOf(e)};const J=Y;var W=J; +let L;q.$inject=[],angular.module("piwikApp.service").service("piwikUrl",q);const{piwik:G,broadcast:J,piwikHelper:z}=window;function Y(e,t){try{return u.parse(e,t),!0}catch(n){return!1}}G.helper=z,G.broadcast=J,G.updatePeriodParamsFromUrl=function(){let e=_.getSearchParam("date");const t=_.getSearchParam("period");if(!Y(t,e))return;if(G.period===t&&G.currentDateString===e)return;G.period=t;const n=u.parse(t,e).getDateRange();G.startDateString=d(n[0]),G.endDateString=d(n[1]),G.updateDateInTitle(e,t),"range"===G.period&&(e=`${G.startDateString},${G.endDateString}`),G.currentDateString=e},G.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(L=L||document.title,0===L.indexOf(G.siteName))){const n=` - ${u.parse(t,e).getPrettyString()} `;document.title=`${G.siteName}${n}${L.substr(G.siteName.length)}`}},G.hasUserCapability=function(e){return window.angular.isArray(G.userCapabilities)&&-1!==G.userCapabilities.indexOf(e)};const Q=G;var W=Q; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function K(){return W}function X(e,t){t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}angular.module("piwikApp.service").service("piwik",K),X.$inject=["piwik","$rootScope"],angular.module("piwikApp.service").run(X);var Z=r("8bbf");function ee(e,t,r,n,a,i){return Object(Z["renderSlot"])(e.$slots,"default")}var te=Object(Z["defineComponent"])({props:{show:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close"],activated(){const e=this.element||this.$slots.default()[0].el;e.style.display="none"},watch:{show(e,t){if(e){const e=this.element||this.$slots.default()[0].el;D.helper.modalConfirm(e,{yes:()=>{this.$emit("yes")},no:()=>{this.$emit("no")}},{onCloseEnd:()=>{this.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});te.render=ee;var re=te; + */function X(){return W}function K(e,t){t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}angular.module("piwikApp.service").service("piwik",X),K.$inject=["piwik","$rootScope"],angular.module("piwikApp.service").run(K);var Z=n("8bbf");const ee={ref:"root"};function te(e,t,n,r,a,i){return Object(Z["withDirectives"])((Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",ee,[Object(Z["renderSlot"])(e.$slots,"default")],512)),[[Z["vShow"],e.modelValue]])}var ne=Object(Z["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","update:modelValue"],setup(){const e=Object(Z["ref"])(null);return{root:e}},activated(){this.$emit("update:modelValue",!1)},watch:{modelValue(e,t){if(e){const e=this.element||this.$refs.root.firstElementChild;P.helper.modalConfirm(e,{yes:()=>{this.$emit("yes")},no:()=>{this.$emit("no")}},{onCloseEnd:()=>{this.element||this.$refs.root.appendChild(e),this.$emit("update:modelValue",!1),this.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});ne.render=te;var re=ne; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ne(e){const{component:t,scope:r={},events:n={},$inject:a,directiveName:i,transclude:o,mountPointFactory:s,postCreate:l,noScope:u}=e,d={};function c(...e){const a={restrict:"A",scope:u?void 0:d,compile:function(){return{post:function(a,i,u){const d=i.find("[ng-transclude]");let c="<root-component";Object.entries(r).forEach(([,e])=>{c+=` :${e.vue}="${e.vue}"`}),Object.entries(n).forEach(e=>{const[t]=e;c+=` @${t}="onEventHandler('${t}')"`}),c+=">",o&&(c+='<div ref="transcludeTarget"/>'),c+="</root-component>";const p=Object(Z["createApp"])({template:c,data(){const t={};return Object.entries(r).forEach(([r,n])=>{let o=a[r];"undefined"===typeof o&&"undefined"!==typeof n.default&&(o=n.default instanceof Function?n.default(a,i,u,...e):n.default),t[n.vue]=o}),t},setup(){if(o){const e=Object(Z["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler(t){n[t]&&n[t](a,i,u,...e)}}});p.config.globalProperties.$sanitize=window.vueSanitize,p.component("root-component",t);const g=s?s(a,i,u,...e):i[0],h=p.mount(g);Object.entries(r).forEach(([t,r])=>{r.angularJsBind&&a.$watch(t,n=>{"undefined"!==typeof r.default&&"undefined"===typeof n?h[t]=r.default instanceof Function?r.default(a,i,u,...e):r.default:h[t]=n})}),o&&$(h.transcludeTarget).append(d),l&&l(h,a,i,u,...e)}}}};return o&&(a.transclude=!0,a.template="<div ng-transclude/>"),a}return Object.entries(r).forEach(([e,t])=>{t.angularJsBind&&(d[e]=t.angularJsBind)}),c.$inject=a||[],angular.module("piwikApp").directive(i,c),c} + */let ae=0;function ie(e){const{component:t,scope:n={},events:r={},$inject:a,directiveName:i,transclude:o,mountPointFactory:s,postCreate:l,noScope:c}=e,u=ae;o&&(ae+=1);const d={};function p(...e){const a={restrict:"A",scope:c?void 0:d,compile:function(){return{post:function(a,i,c){const d=o?i.find(`[ng-transclude][counter=${u}]`):null;let p="<root-component";Object.entries(n).forEach(([,e])=>{p+=` :${e.vue}="${e.vue}"`}),Object.entries(r).forEach(e=>{const[t]=e;p+=` @${t}="onEventHandler('${t}', $event)"`}),p+=">",o&&(p+='<div ref="transcludeTarget"/>'),p+="</root-component>";const h=Object(Z["createApp"])({template:p,data(){const t={};return Object.entries(n).forEach(([n,r])=>{let o=a[n];"undefined"===typeof o&&"undefined"!==typeof r.default&&(o=r.default instanceof Function?r.default(a,i,c,...e):r.default),t[r.vue]=o}),t},setup(){if(o){const e=Object(Z["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler(t,n){r[t]&&r[t](n,a,i,c,...e)}}});h.config.globalProperties.$sanitize=window.vueSanitize,h.config.globalProperties.translate=k,h.component("root-component",t);const m=s?s(a,i,c,...e):i[0],g=h.mount(m);Object.entries(n).forEach(([t,n])=>{n.angularJsBind&&a.$watch(t,r=>{"undefined"!==typeof n.default&&"undefined"===typeof r?g[t]=n.default instanceof Function?n.default(a,i,c,...e):n.default:g[t]=r})}),o&&$(g.transcludeTarget).append(d),l&&l(g,a,i,c,...e)}}}};return o&&(a.transclude=!0,a.template=`<div ng-transclude counter="${u}"/>`),a}return Object.entries(n).forEach(([e,t])=>{t.vue||(t.vue=e),t.angularJsBind&&(d[e]=t.angularJsBind)}),p.$inject=a||[],angular.module("piwikApp").directive(i,p),p} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ne({component:re,scope:{show:{vue:"show",default:!1},element:{vue:"element",default:(e,t)=>t[0]}},events:{yes:(e,t,r)=>{r.yes&&(e.$eval(r.yes),setTimeout(()=>{e.$apply()},0))},no:(e,t,r)=>{r.no&&(e.$eval(r.no),setTimeout(()=>{e.$apply()},0))},close:(e,t,r)=>{r.close&&(e.$eval(r.close),setTimeout(()=>{e.$apply()},0))},closeEnd:(e,t,r,n)=>{setTimeout(()=>{e.$apply(n(r.piwikDialog).assign(e,!1))},0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:(e,t)=>{const r=$('<div class="vue-placeholder"/>');return r.appendTo(t),r[0]},postCreate:(e,t,r,n)=>{t.$watch(n.piwikDialog,t=>{e.show=t||!1})},noScope:!0});const ae={class:"loadingPiwik"},ie=Object(Z["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function oe(e,t,r,n,a,i){return Object(Z["withDirectives"])((Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",ae,[ie,Object(Z["createElementVNode"])("span",null,Object(Z["toDisplayString"])(e.loadingMessage),1)],512)),[[Z["vShow"],e.loading]])}var se=Object(Z["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:j("General_LoadingData")}}});se.render=oe;var le=se,ue=ne({component:le,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:()=>j("General_LoadingData")}},$inject:[],directiveName:"piwikActivityIndicator"}); + */ie({component:re,scope:{show:{vue:"modelValue",default:!1},element:{default:(e,t)=>t[0]}},events:{yes:(e,t,n,r)=>{r.yes&&(t.$eval(r.yes),setTimeout(()=>{t.$apply()},0))},no:(e,t,n,r)=>{r.no&&(t.$eval(r.no),setTimeout(()=>{t.$apply()},0))},close:(e,t,n,r)=>{r.close&&(t.$eval(r.close),setTimeout(()=>{t.$apply()},0))},"update:modelValue":(e,t,n,r,a)=>{setTimeout(()=>{t.$apply(a(r.piwikDialog).assign(t,e))},0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:(e,t)=>{const n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:(e,t,n,r)=>{t.$watch(r.piwikDialog,(t,n)=>{n!==t&&(e.modelValue=t||!1)})},noScope:!0});const oe={key:0,class:"title",tabindex:"6"},se=["href","title"],le={class:"iconsBar"},ce=["href","title"],ue=Object(Z["createElementVNode"])("span",{class:"icon-help"},null,-1),de=[ue],pe=["title"],he=Object(Z["createElementVNode"])("span",{class:"icon-info"},null,-1),me=[he],ge={class:"ratingIcons"},fe={class:"inlineHelp"},be=["innerHTML"],we=["href"];function ye(e,t,n,r,a,i){const o=Object(Z["resolveComponent"])("RateFeature");return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=t=>e.showIcons=!0),onMouseleave:t[2]||(t[2]=t=>e.showIcons=!1),ref:"root"},[e.editUrl?Object(Z["createCommentVNode"])("",!0):(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",oe,[Object(Z["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(Z["renderSlot"])(e.$slots,"default")],8,se)):Object(Z["createCommentVNode"])("",!0),Object(Z["withDirectives"])(Object(Z["createElementVNode"])("span",le,[e.helpUrl&&!e.actualInlineHelp?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},de,8,ce)):Object(Z["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=t=>e.showInlineHelp=!e.showInlineHelp),class:Object(Z["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},me,10,pe)):Object(Z["createCommentVNode"])("",!0),Object(Z["createElementVNode"])("div",ge,[Object(Z["createVNode"])(o,{title:e.actualFeatureName},null,8,["title"])])],512),[[Z["vShow"],e.showIcons||e.showInlineHelp]]),Object(Z["withDirectives"])(Object(Z["createElementVNode"])("div",fe,[Object(Z["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,be),e.helpUrl?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(Z["toDisplayString"])(e.translate("General_MoreDetails")),9,we)):Object(Z["createCommentVNode"])("",!0)],512),[[Z["vShow"],e.showInlineHelp]])],544)}const De=Object(Z["defineAsyncComponent"])(()=>new Promise(e=>{window.$(document).ready(()=>{e(window.Feedback.RateFeature)})}));var Pe=Object(Z["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:De},data(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},setup(){const e=Object(Z["ref"])(null);return{root:e}},watch:{inlineHelp(e){this.actualInlineHelp=e},featureName(e){this.actualFeatureName=e}},mounted(){const{root:e}=this.$refs;if(!this.actualInlineHelp){let t=e.querySelector(".title .inlineHelp");if(!t&&e.parentElement.nextElementSibling&&(t=e.parentElement.nextElementSibling.querySelector(".reportDocumentation")),t){const e=t.getAttribute("data-content").trim();e.length&&(this.actualInlineHelp=`<p>${e}</p>`,setTimeout(()=>t.remove(),0))}}this.actualFeatureName||(this.actualFeatureName=e.querySelector(".title").textContent),this.reportGenerated&&u.parse(P.period,P.currentDateString).containsToday()&&window.$(e.querySelector(".report-generated")).tooltip({track:!0,content:this.reportGenerated,items:"div",show:!1,hide:!1})}});Pe.render=ye;var ve=Pe; /*! * 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(e,t,r,n,a,i){return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",{class:Object(Z["normalizeClass"])(["alert",{["alert-"+e.severity]:!0}])},[Object(Z["renderSlot"])(e.$slots,"default")],2)}var ce=Object(Z["defineComponent"])({props:{severity:{type:String,required:!0}}});ce.render=de;var pe=ce,ge=ne({component:pe,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0}); + */ie({component:ve,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0});const je={class:"card",ref:"root"},ke={class:"card-content"},Oe={key:0,class:"card-title"},Se={key:1,class:"card-title"},Te={ref:"content"};function $e(e,t,n,r,a,i){const o=Object(Z["resolveComponent"])("EnrichedHeadline");return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",je,[Object(Z["createElementVNode"])("div",ke,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(Z["createCommentVNode"])("",!0):(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("h2",Oe,Object(Z["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("h2",Se,[Object(Z["createVNode"])(o,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(Z["withCtx"])(()=>[Object(Z["createTextVNode"])(Object(Z["toDisplayString"])(e.contentTitle),1)]),_:1},8,["feature-name","help-url","inline-help"])])):Object(Z["createCommentVNode"])("",!0),Object(Z["createElementVNode"])("div",Te,[Object(Z["renderSlot"])(e.$slots,"default")],512)])],512)}let Ee=null;var Ce=Object(Z["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:ve},data(){return{actualFeature:this.feature,actualHelpText:this.helpText}},setup(){const e=Object(Z["ref"])(null),t=Object(Z["ref"])(null);return{root:e,content:t}},watch:{feature(e){this.actualFeature=e},helpText(e){this.actualHelpText=e}},mounted(){const{root:e,content:t}=this.$refs;if(this.anchor){const t=document.createElement("a");t.id=this.anchor,e.parentElement.prepend(t)}let n;if(setTimeout(()=>{const e=t.querySelector(".contentHelp");e&&(this.actualHelpText=e.innerHTML,e.remove())},0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===Ee&&(Ee=document.querySelector("#content.admin")),Ee&&(n=Ee.offsetTop),n||0===n){const t=e.closest("[piwik-widget-loader]"),r=t?t.offsetTop:e.offsetTop;r-n<17&&(e.style.marginTop=0)}}});Ce.render=$e;var Ie=Ce; +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ie({component:Ie,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});const xe={class:"loadingPiwik"},He=Object(Z["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function Re(e,t,n,r,a,i){return Object(Z["withDirectives"])((Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",xe,[He,Object(Z["createElementVNode"])("span",null,Object(Z["toDisplayString"])(e.loadingMessage),1)],512)),[[Z["vShow"],e.loading]])}var Fe=Object(Z["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:k("General_LoadingData")}}});Fe.render=Re;var Ne=Fe,Ae=ie({component:Ne,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:()=>k("General_LoadingData")}},$inject:[],directiveName:"piwikActivityIndicator"}); +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */function Be(e,t,n,r,a,i){return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",{class:Object(Z["normalizeClass"])(["alert",{["alert-"+e.severity]:!0}])},[Object(Z["renderSlot"])(e.$slots,"default")],2)}var Ue=Object(Z["defineComponent"])({props:{severity:{type:String,required:!0}}});Ue.render=Be;var Me=Ue,Ve=ie({component:Me,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0}); /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js.map b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js.map index c853811992..53a0c55611 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js.map +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://CoreHome/webpack/universalModuleDefinition","webpack://CoreHome/webpack/bootstrap","webpack://CoreHome/./plugins/CoreHome/vue/src/noAdblockFlag.ts","webpack://CoreHome/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/utilities.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/translate.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Day.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Week.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Month.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Year.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Range.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?c435","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?7b62","webpack://CoreHome/./plugins/CoreHome/vue/src/createAngularJsAdapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?0bf6","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?6f80","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?14a2","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?cc69","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.adapter.ts"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__8bbf__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","hasBlockedContent","currentScript","document","src","match","MatomoUrl","paramName","hash","location","href","split","regex","RegExp","test","decodeURIComponent","valueFromHash","broadcast","getValueFromHash","getValueFromUrl","search","piwikUrl","model","getSearchParam","$inject","angular","service","Periods","periodClass","periods","Error","periodOrder","push","Array","concat","strPeriod","strDate","parse","format","date","$","datepicker","formatDate","getToday","Date","now","setTime","getTime","getTimezoneOffset","setHours","getHours","piwik","timezoneOffset","setMinutes","setSeconds","setMilliseconds","parseDate","yesterday","setDate","getDate","lastWeek","lastMonth","setMonth","getMonth","lastYear","setFullYear","getFullYear","err","console","error","message","todayIsInRange","dateRange","length","originalTitle","piwikHelper","isValidPeriod","periodStr","dateStr","e","helper","updatePeriodParamsFromUrl","period","currentDateString","getDateRange","startDateString","endDateString","updateDateInTitle","title","indexOf","siteName","dateString","getPrettyString","substr","hasUserCapability","capability","isArray","userCapabilities","Matomo","piwikService","initPiwikService","$rootScope","$on","run","translate","translationStringId","values","_pk_translate","dateInPeriod","addCustomPeriod","weekDates","startWeek","endWeek","daysToMonday","getDay","month","startMonth","endMonth","toString","startYear","endYear","startDate","endDate","childPeriodType","strAmount","strEndDate","nAmount","Math","max","parseInt","Number","isNaN","startPeriod","endPeriod","firstWebsiteDate","rangeEndDate","countBack","ed","getLastNRange","substring","parts","start","end","piwikPeriods","getAllLabels","isRecognizedPeriod","RangePeriod","defaultErrorCallback","deferred","status","loadingError","Piwik_Popover","isOpen","body","html","escape","responseText","show","globalAjaxQueue","active","clean","readyState","splice","args","abort","forEach","x","errorCallback","params","type","getValuesFromUrl","arrayParams","keys","toLowerCase","getParams","postParams","withToken","url","addParams","urls","urlsProcessed","map","u","param","method","timeout","callback","useRegularCallbackInCaseOfError","setCallback","redirect","completeCallback","element","loadingElement","errorElement","parameter","defaultParams","hide","fadeIn","requestHandle","buildAjaxCall","parameters","mixinDefaultGetParams","getUrl","segment","ajaxCall","async","dataType","complete","apply","arguments","success","response","request","result","placeAt","UI","notification","Notification","placeat","context","id","scrollToNotification","ajaxRequestFinished","data","mixinDefaultPostParams","undefined","ajax","isRequestToApiMethod","shouldPropagateTokenAuth","token_auth","force_api_session","isWidgetizeRequestWithoutSession","getDefaultPostParams","mergedParams","originalParams","idSite","useGETDefaultParameter","ajaxQueue","ajaxHelper","PiwikUrl","Piwik","props","Boolean","required","HTMLElement","emits","slotElement","$slots","default","el","style","display","watch","newValue","oldValue","modalConfirm","yes","$emit","no","onCloseEnd","render","createAngularJsAdapter","options","component","scope","events","directiveName","transclude","mountPointFactory","postCreate","noScope","angularJsScope","angularJsAdapter","injectedServices","adapter","restrict","compile","post","ngScope","ngElement","ngAttrs","clone","find","rootVueTemplate","entries","info","vue","eventName","app","template","initialData","scopeVarName","Function","transcludeTarget","methods","config","globalProperties","$sanitize","vueSanitize","mountPoint","vm","mount","angularJsBind","$watch","append","directive","MatomoDialog","attrs","$eval","setTimeout","$apply","close","closeEnd","$parse","piwikDialog","assign","vueRootPlaceholder","appendTo","class","alt","loadingMessage","loading","String","ActivityIndicator","severity","Alert"],"mappings":"CAAA,SAA2CA,EAAMC,GAC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Aa,qB,GCTF,oCAAgB,CAC7BnF,MAAO,CACLmF,SAAU,CACR3J,KAAMyJ,OACN/E,UAAU,MCJhB,GAAOiB,OAAS,GAED,UCKA,GAAAC,GAAuB,CACpCE,UAAW8D,GACX7D,MAAO,CACL4D,SAAU,CACRtC,IAAK,WACLgB,cAAe,gBAGnBpC,cAAe,aACfC,YAAY","file":"CoreHome.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CoreHome\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"CoreHome\"] = factory(root[\"Vue\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/CoreHome/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n// see https://github.com/matomo-org/matomo/issues/5094 used to detect an ad blocker\nwindow.hasBlockedContent = false;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst MatomoUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default MatomoUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport MatomoUrl from './MatomoUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: MatomoUrl.getSearchParam.bind(MatomoUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\ninterface Period {\n getPrettyString(): string;\n getDateRange(): Date[];\n containsToday(): boolean;\n}\n\ninterface PeriodClass {\n parse(strDate: string|Date): Period;\n getDisplayText(): string;\n}\n\n/**\n * Matomo period management service for the frontend.\n *\n * Usage:\n *\n * var DayPeriod = matomoPeriods.get('day');\n * var day = new DayPeriod(new Date());\n *\n * or\n *\n * var day = matomoPeriods.parse('day', '2013-04-05');\n *\n * Adding custom periods:\n *\n * To add your own period to the frontend, create a period class for it\n * w/ the following methods:\n *\n * - **getPrettyString()**: returns a human readable display string for the period.\n * - **getDateRange()**: returns an array w/ two elements, the first being the start\n * Date of the period, the second being the end Date. The dates\n * must be Date objects, not strings, and are inclusive.\n * - **containsToday()**: returns true if the date period contains today. False if not.\n * - (_static_) **parse(strDate)**: creates a new instance of this period from the\n * value of the 'date' query parameter.\n * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month',\n * 'week', etc.\n *\n * Then call Periods.addCustomPeriod w/ your period class:\n *\n * Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod);\n *\n * NOTE: currently only single date periods like day, week, month year can\n * be extended. Other types of periods that require a special UI to\n * view/edit aren't, since there is currently no way to use a\n * custom UI for a custom period.\n */\nclass Periods {\n periods: {[name: string]: PeriodClass} = {};\n\n periodOrder: string[] = [];\n\n addCustomPeriod(name: string, periodClass: PeriodClass) {\n if (this.periods[name]) {\n throw new Error(`The \"${name}\" period already exists! It cannot be overridden.`);\n }\n\n this.periods[name] = periodClass;\n this.periodOrder.push(name);\n }\n\n getAllLabels(): string[] {\n return Array<string>().concat(this.periodOrder);\n }\n\n get(strPeriod: string): PeriodClass {\n const periodClass = this.periods[strPeriod];\n if (!periodClass) {\n throw new Error(`Invalid period label: ${strPeriod}`);\n }\n return periodClass;\n }\n\n parse(strPeriod: string, strDate: string): Period {\n return this.get(strPeriod).parse(strDate);\n }\n\n isRecognizedPeriod(strPeriod: string): boolean {\n return !!this.periods[strPeriod];\n }\n}\n\nexport default new Periods();\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport function format(date: Date): string {\n return $.datepicker.formatDate('yy-mm-dd', date);\n}\n\nexport function getToday(): Date {\n const date = new Date(Date.now());\n\n // undo browser timezone\n date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000);\n\n // apply Matomo site timezone (if it exists)\n date.setHours(date.getHours() + ((window.piwik.timezoneOffset || 0) / 3600));\n\n // get rid of hours/minutes/seconds/etc.\n date.setHours(0);\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return date;\n}\n\nexport function parseDate(date: string|Date): Date {\n if (date instanceof Date) {\n return date;\n }\n\n const strDate = decodeURIComponent(date);\n\n if (strDate === 'today'\n || strDate === 'now'\n ) {\n return getToday();\n }\n\n if (strDate === 'yesterday'\n // note: ignoring the 'same time' part since the frontend doesn't care about the time\n || strDate === 'yesterdaySameTime'\n ) {\n const yesterday = getToday();\n yesterday.setDate(yesterday.getDate() - 1);\n return yesterday;\n }\n\n if (strDate.match(/last[ -]?week/i)) {\n const lastWeek = getToday();\n lastWeek.setDate(lastWeek.getDate() - 7);\n return lastWeek;\n }\n\n if (strDate.match(/last[ -]?month/i)) {\n const lastMonth = getToday();\n lastMonth.setDate(1);\n lastMonth.setMonth(lastMonth.getMonth() - 1);\n return lastMonth;\n }\n\n if (strDate.match(/last[ -]?year/i)) {\n const lastYear = getToday();\n lastYear.setFullYear(lastYear.getFullYear() - 1);\n return lastYear;\n }\n\n try {\n return $.datepicker.parseDate('yy-mm-dd', strDate);\n } catch (err) {\n // angular swallows this error, so manual console log here\n console.error(err.message || err);\n throw err;\n }\n}\n\nexport function todayIsInRange(dateRange: Date[]): boolean {\n if (dateRange.length !== 2) {\n return false;\n }\n\n if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) {\n return true;\n }\n\n return false;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = MatomoUrl.getSearchParam('date');\n const period = MatomoUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Matomo = piwik;\nexport default Matomo;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Matomo from './Matomo';\n\nfunction piwikService() {\n return Matomo;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport default function translate(translationStringId: string, values: string[] = []): string {\n return window._pk_translate(translationStringId, values); // eslint-disable-line\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class DayPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): DayPeriod {\n return new DayPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodDay');\n }\n\n getPrettyString(): string {\n return format(this.dateInPeriod);\n }\n\n getDateRange(): Date[] {\n return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('day', DayPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class WeekPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): WeekPeriod {\n return new WeekPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodWeek');\n }\n\n getPrettyString(): string {\n const weekDates = this.getDateRange();\n const startWeek = format(weekDates[0]);\n const endWeek = format(weekDates[1]);\n\n return translate('General_DateRangeFromTo', [startWeek, endWeek]);\n }\n\n getDateRange(): Date[] {\n const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7;\n\n const startWeek = new Date(this.dateInPeriod.getTime());\n startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday);\n\n const endWeek = new Date(startWeek.getTime());\n endWeek.setDate(startWeek.getDate() + 6);\n\n return [startWeek, endWeek];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('week', WeekPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class MonthPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): MonthPeriod {\n return new MonthPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodMonth');\n }\n\n getPrettyString(): string {\n const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`);\n return `${month} ${this.dateInPeriod.getFullYear()}`;\n }\n\n getDateRange(): Date[] {\n const startMonth = new Date(this.dateInPeriod.getTime());\n startMonth.setDate(1);\n\n const endMonth = new Date(this.dateInPeriod.getTime());\n endMonth.setDate(1);\n endMonth.setMonth(endMonth.getMonth() + 1);\n endMonth.setDate(0);\n\n return [startMonth, endMonth];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('month', MonthPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class YearPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): YearPeriod {\n return new YearPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodYear');\n }\n\n getPrettyString(): string {\n return this.dateInPeriod.getFullYear().toString();\n }\n\n getDateRange(): Date[] {\n const startYear = new Date(this.dateInPeriod.getTime());\n startYear.setMonth(0);\n startYear.setDate(1);\n\n const endYear = new Date(this.dateInPeriod.getTime());\n endYear.setMonth(12);\n endYear.setDate(0);\n\n return [startYear, endYear];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('year', YearPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport {\n parseDate,\n format,\n getToday,\n todayIsInRange,\n} from './utilities';\n\nexport default class RangePeriod {\n constructor(\n public readonly startDate: Date,\n public readonly endDate: Date,\n public readonly childPeriodType: string,\n ) {}\n\n /**\n * Returns a range representing the last N childPeriodType periods, including the current one.\n */\n static getLastNRange(\n childPeriodType: string,\n strAmount: string|number,\n strEndDate?: Date|string,\n ): RangePeriod {\n const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0);\n if (Number.isNaN(nAmount)) {\n throw new Error('Invalid range strAmount');\n }\n\n let endDate = strEndDate ? parseDate(strEndDate) : getToday();\n\n let startDate = new Date(endDate.getTime());\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - nAmount);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (nAmount * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - nAmount);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - nAmount);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n /**\n * Returns a range representing a specific child date range counted back from the end date\n *\n * @param childPeriodType Type of the period, eg. day, week, year\n * @param rangeEndDate\n * @param countBack Return only the child date range for this specific period number\n * @returns {RangePeriod}\n */\n static getLastNRangeChild(\n childPeriodType: string,\n rangeEndDate: Date|string,\n countBack: number,\n ): RangePeriod {\n const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday();\n let startDate = new Date(ed.getTime());\n let endDate = new Date(ed.getTime());\n\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - countBack);\n endDate.setDate(endDate.getDate() - countBack);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (countBack * 7));\n endDate.setDate(endDate.getDate() - (countBack * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - countBack);\n endDate.setDate(1);\n endDate.setMonth(endDate.getMonth() - countBack);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - countBack);\n endDate.setFullYear(endDate.getFullYear() - countBack);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n static parse(strDate: string, childPeriodType = 'day'): RangePeriod {\n if (/^previous/.test(strDate)) {\n const endDate = RangePeriod.getLastNRange(childPeriodType, '2').startDate;\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate);\n }\n\n if (/^last/.test(strDate)) {\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(4));\n }\n\n const parts = decodeURIComponent(strDate).split(',');\n return new RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType);\n }\n\n static getDisplayText(): string {\n return translate('General_DateRangeInPeriodList');\n }\n\n getPrettyString(): string {\n const start = format(this.startDate);\n const end = format(this.endDate);\n return translate('General_DateRangeFromTo', [start, end]);\n }\n\n getDateRange(): Date[] {\n return [this.startDate, this.endDate];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('range', RangePeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Periods from './Periods';\nimport RangePeriod from './Range';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nwindow.piwik.addCustomPeriod = Periods.addCustomPeriod.bind(Periods);\n\nfunction piwikPeriods() {\n return {\n getAllLabels: Periods.getAllLabels.bind(Periods),\n isRecognizedPeriod: Periods.isRecognizedPeriod.bind(Periods),\n get: Periods.get.bind(Periods),\n parse: Periods.parse.bind(Periods),\n parseDate,\n format,\n RangePeriod,\n todayIsInRange,\n };\n}\n\nangular.module('piwikApp.service').factory('piwikPeriods', piwikPeriods);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Matomo from '../Matomo/Matomo';\n\nwindow.globalAjaxQueue = [] as GlobalAjaxQueue;\nwindow.globalAjaxQueue.active = 0;\n\nwindow.globalAjaxQueue.clean = function globalAjaxQueueClean() {\n for (let i = this.length; i >= 0; i -= 1) {\n if (!this[i] || this[i].readyState === 4) {\n this.splice(i, 1);\n }\n }\n};\n\nwindow.globalAjaxQueue.push = function globalAjaxQueuePush(...args: (XMLHttpRequest|null)[]) {\n this.active += args.length;\n\n // cleanup ajax queue\n this.clean();\n\n // call original array push\n return Array.prototype.push.call(this, ...args);\n};\n\nwindow.globalAjaxQueue.abort = function globalAjaxQueueAbort() {\n // abort all queued requests if possible\n this.forEach((x) => x && x.abort && x.abort());\n\n // remove all elements from array\n this.splice(0, this.length);\n\n this.active = 0;\n};\n\ntype ParameterValue = string | number | null | undefined | ParameterValue[];\ntype Parameters = {[name: string]: ParameterValue | Parameters};\ntype AnyFunction = (...params:any[]) => any; // eslint-disable-line\n\n/**\n * error callback to use by default\n */\nfunction defaultErrorCallback(deferred: XMLHttpRequest, status: string): void {\n // do not display error message if request was aborted\n if (status === 'abort') {\n return;\n }\n\n const loadingError = $('#loadingError');\n if (Piwik_Popover.isOpen() && deferred && deferred.status === 500) {\n if (deferred && deferred.status === 500) {\n $(document.body).html(piwikHelper.escape(deferred.responseText));\n }\n } else {\n loadingError.show();\n }\n}\n\n/**\n * Global ajax helper to handle requests within Matomo\n */\nexport default class AjaxHelper {\n /**\n * Format of response\n */\n format = 'json';\n\n /**\n * A timeout for the request which will override any global timeout\n */\n timeout = null;\n\n /**\n * Callback function to be executed on success\n */\n callback: AnyFunction = null;\n\n /**\n * Use this.callback if an error is returned\n */\n useRegularCallbackInCaseOfError = false;\n\n /**\n * Callback function to be executed on error\n *\n * @deprecated use the jquery promise API\n */\n errorCallback: AnyFunction;\n\n withToken = false;\n\n /**\n * Callback function to be executed on complete (after error or success)\n *\n * @deprecated use the jquery promise API\n */\n completeCallback: AnyFunction;\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultGetParams\n */\n getParams: Parameters = {};\n\n /**\n * Base URL used in the AJAX request. Can be set by setUrl.\n *\n * It is set to '?' rather than 'index.php?' to increase chances that it works\n * including for users who have an automatic 301 redirection from index.php? to ?\n * POST values are missing when there is such 301 redirection. So by by-passing\n * this 301 redirection, we avoid this issue.\n *\n * @see ajaxHelper.setUrl\n */\n getUrl = '?';\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultPostParams\n */\n postParams: Parameters = {};\n\n /**\n * Element to be displayed while loading\n */\n loadingElement: HTMLElement|null|JQuery|JQLite|string = null;\n\n /**\n * Element to be displayed on error\n */\n errorElement: HTMLElement|JQuery|JQLite|string = '#ajaxError';\n\n /**\n * Handle for current request\n */\n requestHandle: XMLHttpRequest|JQuery.jqXHR|null = null;\n\n defaultParams = ['idSite', 'period', 'date', 'segment'];\n\n constructor() {\n this.errorCallback = defaultErrorCallback;\n }\n\n /**\n * Adds params to the request.\n * If params are given more then once, the latest given value is used for the request\n *\n * @param params\n * @param type type of given parameters (POST or GET)\n * @return {void}\n */\n addParams(params: Parameters|string, type: string): void {\n if (typeof params === 'string') {\n // TODO: add global types for broadcast (multiple uses below)\n params = window['broadcast'].getValuesFromUrl(params); // eslint-disable-line\n }\n\n const arrayParams = ['compareSegments', 'comparePeriods', 'compareDates'];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n if (arrayParams.indexOf(key) !== -1\n && !value\n ) {\n return;\n }\n\n if (type.toLowerCase() === 'get') {\n this.getParams[key] = value;\n } else if (type.toLowerCase() === 'post') {\n this.postParams[key] = value;\n }\n });\n }\n\n withTokenInUrl(): void {\n this.withToken = true;\n }\n\n /**\n * Sets the base URL to use in the AJAX request.\n */\n setUrl(url: string): void {\n this.addParams(broadcast.getValuesFromUrl(url), 'GET');\n }\n\n /**\n * Gets this helper instance ready to send a bulk request. Each argument to this\n * function is a single request to use.\n */\n setBulkRequests(...urls: string[]): void {\n const urlsProcessed = urls.map((u) => $.param(u));\n\n this.addParams({\n module: 'API',\n method: 'API.getBulkRequest',\n urls: urlsProcessed,\n format: 'json',\n }, 'post');\n }\n\n /**\n * Set a timeout (in milliseconds) for the request. This will override any global timeout.\n *\n * @param timeout Timeout in milliseconds\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Sets the callback called after the request finishes\n *\n * @param callback Callback function\n * @deprecated use the jquery promise API\n */\n setCallback(callback: AnyFunction): void {\n this.callback = callback;\n }\n\n /**\n * Set that the callback passed to setCallback() should be used if an application error (i.e. an\n * Exception in PHP) is returned.\n */\n useCallbackInCaseOfError(): void {\n this.useRegularCallbackInCaseOfError = true;\n }\n\n /**\n * Set callback to redirect on success handler\n * &update=1(+x) will be appended to the current url\n *\n * @param [params] to modify in redirect url\n * @return {void}\n */\n redirectOnSuccess(params: Parameters): void {\n this.setCallback(() => {\n piwikHelper.redirect(params);\n });\n }\n\n /**\n * Sets the callback called in case of an error within the request\n *\n * @deprecated use the jquery promise API\n */\n setErrorCallback(callback: AnyFunction): void {\n this.errorCallback = callback;\n }\n\n /**\n * Sets the complete callback which is called after an error or success callback.\n *\n * @deprecated use the jquery promise API\n */\n setCompleteCallback(callback: AnyFunction): void {\n this.completeCallback = callback;\n }\n\n /**\n * Sets the response format for the request\n *\n * @param format response format (e.g. json, html, ...)\n */\n setFormat(format: string): void {\n this.format = format;\n }\n\n /**\n * Set the div element to show while request is loading\n *\n * @param [element] selector for the loading element\n */\n setLoadingElement(element: string|HTMLElement|JQuery): void {\n this.loadingElement = element || '#ajaxLoadingDiv';\n }\n\n /**\n * Set the div element to show on error\n *\n * @param element selector for the error element\n */\n setErrorElement(element: HTMLElement|JQuery|string): void {\n if (!element) {\n return;\n }\n this.errorElement = element;\n }\n\n /**\n * Detect whether are allowed to use the given default parameter or not\n */\n private useGETDefaultParameter(parameter: string): boolean {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Removes a default parameter that is usually send automatically along the request.\n *\n * @param parameter A name such as \"period\", \"date\", \"segment\".\n */\n removeDefaultParameter(parameter: string): void {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n this.defaultParams.splice(i, 1);\n }\n }\n }\n }\n\n /**\n * Send the request\n */\n send(): JQuery.jqXHR {\n if ($(this.errorElement).length) {\n $(this.errorElement).hide();\n }\n\n if (this.loadingElement) {\n $(this.loadingElement).fadeIn();\n }\n\n this.requestHandle = this.buildAjaxCall();\n globalAjaxQueue.push(this.requestHandle);\n\n return this.requestHandle;\n }\n\n /**\n * Aborts the current request if it is (still) running\n */\n abort(): void {\n if (this.requestHandle && typeof this.requestHandle.abort === 'function') {\n this.requestHandle.abort();\n this.requestHandle = null;\n }\n }\n\n /**\n * Builds and sends the ajax requests\n */\n private buildAjaxCall(): JQuery.jqXHR {\n const self = this;\n const parameters = this.mixinDefaultGetParams(this.getParams);\n\n let url = this.getUrl;\n if (url[url.length - 1] !== '?') {\n url += '&';\n }\n\n // we took care of encoding &segment properly already, so we don't use $.param for it ($.param\n // URL encodes the values)\n if (parameters.segment) {\n url = `${url}segment=${parameters.segment}&`;\n delete parameters.segment;\n }\n if (parameters.date) {\n url = `${url}date=${decodeURIComponent(parameters.date.toString())}&`;\n delete parameters.date;\n }\n url += $.param(parameters);\n const ajaxCall = {\n type: 'POST',\n async: true,\n url,\n dataType: this.format || 'json',\n complete: this.completeCallback,\n error: function errorCallback() {\n globalAjaxQueue.active -= 1;\n\n if (self.errorCallback) {\n self.errorCallback.apply(this, arguments); // eslint-disable-line\n }\n },\n success: (response, status, request) => {\n if (this.loadingElement) {\n $(this.loadingElement).hide();\n }\n\n if (response && response.result === 'error' && !this.useRegularCallbackInCaseOfError) {\n let placeAt = null;\n let type = 'toast';\n if ($(this.errorElement).length && response.message) {\n $(this.errorElement).show();\n placeAt = this.errorElement;\n type = null;\n }\n\n if (response.message) {\n const UI = window['require']('piwik/UI'); // eslint-disable-line\n const notification = new UI.Notification();\n notification.show(response.message, {\n placeat: placeAt,\n context: 'error',\n type,\n id: 'ajaxHelper',\n });\n notification.scrollToNotification();\n }\n } else if (this.callback) {\n this.callback(response, status, request);\n }\n\n globalAjaxQueue.active -= 1;\n if (Matomo.ajaxRequestFinished) {\n Matomo.ajaxRequestFinished();\n }\n },\n data: this.mixinDefaultPostParams(this.postParams),\n timeout: this.timeout !== null ? this.timeout : undefined,\n };\n\n return $.ajax(ajaxCall);\n }\n\n private isRequestToApiMethod() {\n return (this.getParams && this.getParams.module === 'API' && this.getParams.method)\n || (this.postParams && this.postParams.module === 'API' && this.postParams.method);\n }\n\n isWidgetizedRequest(): boolean {\n return (broadcast.getValueFromUrl('module') === 'Widgetize');\n }\n\n private getDefaultPostParams() {\n if (this.withToken || this.isRequestToApiMethod() || Matomo.shouldPropagateTokenAuth) {\n return {\n token_auth: Matomo.token_auth,\n // When viewing a widgetized report there won't be any session that can be used, so don't\n // force session usage\n force_api_session: broadcast.isWidgetizeRequestWithoutSession() ? 0 : 1,\n };\n }\n\n return {};\n }\n\n /**\n * Mixin the default parameters to send as POST\n *\n * @param params parameter object\n */\n private mixinDefaultPostParams(params): Parameters {\n const defaultParams = this.getDefaultPostParams();\n\n const mergedParams = {\n ...defaultParams,\n ...params,\n };\n\n return mergedParams;\n }\n\n /**\n * Mixin the default parameters to send as GET\n *\n * @param params parameter object\n */\n private mixinDefaultGetParams(originalParams): Parameters {\n const segment = MatomoUrl.getSearchParam('segment');\n\n const defaultParams = {\n idSite: Matomo.idSite || broadcast.getValueFromUrl('idSite'),\n period: Matomo.period || broadcast.getValueFromUrl('period'),\n segment,\n };\n\n const params = originalParams;\n\n // never append token_auth to url\n if (params.token_auth) {\n params.token_auth = null;\n delete params.token_auth;\n }\n\n Object.keys(defaultParams).forEach((key) => {\n if (this.useGETDefaultParameter(key)\n && !params[key]\n && !this.postParams[key]\n && defaultParams[key]\n ) {\n params[key] = defaultParams[key];\n }\n });\n\n // handle default date & period if not already set\n if (this.useGETDefaultParameter('date') && !params.date && !this.postParams.date) {\n params.date = Matomo.currentDateString;\n }\n\n return params;\n }\n}\n","import AjaxHelper from './AjaxHelper';\n\ndeclare global {\n interface Window {\n ajaxHelper: AjaxHelper;\n }\n}\n\nwindow.ajaxHelper = AjaxHelper;\n\nfunction ajaxQueue() {\n return globalAjaxQueue;\n}\n\nangular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst PiwikUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default PiwikUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport PiwikUrl from './PiwikUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: PiwikUrl.getSearchParam.bind(PiwikUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport PiwikUrl from '../PiwikUrl/PiwikUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = PiwikUrl.getSearchParam('date');\n const period = PiwikUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Piwik = piwik;\nexport default Piwik;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Piwik from './Piwik';\n\nfunction piwikService() {\n return Piwik;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n<template>\n <slot></slot>\n</template>\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n show: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close'],\n activated() {\n const slotElement = this.element || this.$slots.default()[0].el;\n slotElement.style.display = 'none';\n },\n watch: {\n show(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$slots.default()[0].el;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => { this.$emit('closeEnd'); },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n show: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close'],\n activated() {\n const slotElement = this.element || this.$slots.default()[0].el;\n slotElement.style.display = 'none';\n },\n watch: {\n show(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$slots.default()[0].el;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => { this.$emit('closeEnd'); },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n","import { render } from \"./MatomoDialog.vue?vue&type=template&id=42c028e0\"\nimport script from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport {\n createApp,\n defineComponent,\n ref,\n ComponentPublicInstance,\n} from 'vue';\n\ninterface SingleScopeVarInfo {\n vue: string;\n default?: any; // eslint-disable-line\n angularJsBind?: string;\n}\n\ntype ScopeMapping = { [scopeVarName: string]: SingleScopeVarInfo };\n\ntype AdapterFunction<InjectTypes, R = void> = (\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype PostCreateFunction<InjectTypes, R = void> = (\n vm: ComponentPublicInstance,\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype EventMapping<InjectTypes> = { [vueEventName: string]: AdapterFunction<InjectTypes> };\n\ntype ComponentType = ReturnType<typeof defineComponent>;\n\nexport default function createAngularJsAdapter<InjectTypes = []>(options: {\n component: ComponentType,\n scope?: ScopeMapping,\n directiveName: string,\n events?: EventMapping<InjectTypes>,\n $inject?: string[],\n transclude?: boolean,\n mountPointFactory?: AdapterFunction<InjectTypes, HTMLElement>,\n postCreate?: PostCreateFunction<InjectTypes>,\n noScope?: boolean,\n}): ng.IDirectiveFactory {\n const {\n component,\n scope = {},\n events = {},\n $inject,\n directiveName,\n transclude,\n mountPointFactory,\n postCreate,\n noScope,\n } = options;\n\n const angularJsScope = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (info.angularJsBind) {\n angularJsScope[scopeVarName] = info.angularJsBind;\n }\n });\n\n function angularJsAdapter(...injectedServices: InjectTypes) {\n const adapter: ng.IDirective = {\n restrict: 'A',\n scope: noScope ? undefined : angularJsScope,\n compile: function angularJsAdapterCompile() {\n return {\n post: function angularJsAdapterLink(\n ngScope: ng.IScope,\n ngElement: ng.IAugmentedJQuery,\n ngAttrs: ng.IAttributes,\n ) {\n const clone = ngElement.find('[ng-transclude]');\n\n let rootVueTemplate = '<root-component';\n Object.entries(scope).forEach(([, info]) => {\n rootVueTemplate += ` :${info.vue}=\"${info.vue}\"`;\n });\n Object.entries(events).forEach((info) => {\n const [eventName] = info;\n rootVueTemplate += ` @${eventName}=\"onEventHandler('${eventName}')\"`;\n });\n rootVueTemplate += '>';\n if (transclude) {\n rootVueTemplate += '<div ref=\"transcludeTarget\"/>';\n }\n rootVueTemplate += '</root-component>';\n const app = createApp({\n template: rootVueTemplate,\n data() {\n const initialData = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n let value = ngScope[scopeVarName];\n if (typeof value === 'undefined' && typeof info.default !== 'undefined') {\n value = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n }\n initialData[info.vue] = value;\n });\n return initialData;\n },\n setup() {\n if (transclude) {\n const transcludeTarget = ref(null);\n return {\n transcludeTarget,\n };\n }\n\n return undefined;\n },\n methods: {\n onEventHandler(name: string) {\n if (events[name]) {\n events[name](ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n },\n });\n app.config.globalProperties.$sanitize = window.vueSanitize;\n app.component('root-component', component);\n\n const mountPoint = mountPointFactory\n ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices)\n : ngElement[0];\n const vm = app.mount(mountPoint);\n\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (!info.angularJsBind) {\n return;\n }\n\n ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line\n if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {\n vm[scopeVarName] = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n } else {\n vm[scopeVarName] = newValue;\n }\n });\n });\n\n if (transclude) {\n $(vm.transcludeTarget).append(clone);\n }\n\n if (postCreate) {\n postCreate(vm, ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n };\n },\n };\n\n if (transclude) {\n adapter.transclude = true;\n adapter.template = '<div ng-transclude/>';\n }\n\n return adapter;\n }\n\n angularJsAdapter.$inject = $inject || [];\n\n angular.module('piwikApp').directive(directiveName, angularJsAdapter);\n\n return angularJsAdapter;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport { IParseService } from 'angular';\nimport { ComponentPublicInstance } from 'vue';\nimport MatomoDialog from './MatomoDialog.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter<[IParseService]>({\n component: MatomoDialog,\n scope: {\n show: {\n vue: 'show',\n default: false,\n },\n element: {\n vue: 'element',\n default: (scope, element) => element[0],\n },\n },\n events: {\n yes: (scope, element, attrs) => {\n if (attrs.yes) {\n scope.$eval(attrs.yes);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n no: (scope, element, attrs) => {\n if (attrs.no) {\n scope.$eval(attrs.no);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n close: (scope, element, attrs) => {\n if (attrs.close) {\n scope.$eval(attrs.close);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n closeEnd: (scope, element, attrs, $parse: IParseService) => {\n setTimeout(() => {\n scope.$apply($parse(attrs.piwikDialog).assign(scope, false));\n }, 0);\n },\n },\n $inject: ['$parse'],\n directiveName: 'piwikDialog',\n transclude: true,\n mountPointFactory: (scope, element) => {\n const vueRootPlaceholder = $('<div class=\"vue-placeholder\"/>');\n vueRootPlaceholder.appendTo(element);\n return vueRootPlaceholder[0];\n },\n postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => {\n scope.$watch(attrs.piwikDialog, (newValue: boolean) => {\n vm.show = newValue || false;\n });\n },\n noScope: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div v-show=\"loading\" class=\"loadingPiwik\">\n <img src=\"plugins/Morpheus/images/loading-blue.gif\" alt=\"\"/>\n <span>{{ loadingMessage }}</span>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n","import { render } from \"./ActivityIndicator.vue?vue&type=template&id=6af4d064\"\nimport script from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nexport * from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport ActivityIndicator from './ActivityIndicator.vue';\nimport translate from '../translate';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: ActivityIndicator,\n scope: {\n loading: {\n vue: 'loading',\n angularJsBind: '<',\n },\n loadingMessage: {\n vue: 'loadingMessage',\n angularJsBind: '<',\n default: () => translate('General_LoadingData'),\n },\n },\n $inject: [],\n directiveName: 'piwikActivityIndicator',\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div\n class=\"alert\"\n :class=\"{ [`alert-${severity}`]: true }\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n","import { render } from \"./Alert.vue?vue&type=template&id=c3863ae2\"\nimport script from \"./Alert.vue?vue&type=script&lang=ts\"\nexport * from \"./Alert.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Alert from './Alert.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: Alert,\n scope: {\n severity: {\n vue: 'severity',\n angularJsBind: '@piwikAlert',\n },\n },\n directiveName: 'piwikAlert',\n transclude: true,\n});\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack://CoreHome/webpack/universalModuleDefinition","webpack://CoreHome/webpack/bootstrap","webpack://CoreHome/./plugins/CoreHome/vue/src/noAdblockFlag.ts","webpack://CoreHome/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/utilities.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/translate.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Day.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Week.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Month.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Year.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Range.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?c435","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?7b62","webpack://CoreHome/./plugins/CoreHome/vue/src/createAngularJsAdapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?7f4f","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue?9cf5","webpack://CoreHome/./plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?4b9f","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue?5539","webpack://CoreHome/./plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?0bf6","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?6f80","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?14a2","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?cc69","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.adapter.ts"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__8bbf__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","hasBlockedContent","currentScript","document","src","match","MatomoUrl","paramName","hash","location","href","split","regex","RegExp","test","decodeURIComponent","valueFromHash","broadcast","getValueFromHash","getValueFromUrl","search","piwikUrl","model","getSearchParam","$inject","angular","service","Periods","periodClass","periods","Error","periodOrder","push","Array","concat","strPeriod","strDate","parse","format","date","$","datepicker","formatDate","getToday","Date","now","setTime","getTime","getTimezoneOffset","setHours","getHours","piwik","timezoneOffset","setMinutes","setSeconds","setMilliseconds","parseDate","yesterday","setDate","getDate","lastWeek","lastMonth","setMonth","getMonth","lastYear","setFullYear","getFullYear","err","console","error","message","todayIsInRange","dateRange","length","originalTitle","piwikHelper","isValidPeriod","periodStr","dateStr","e","helper","updatePeriodParamsFromUrl","period","currentDateString","getDateRange","startDateString","endDateString","updateDateInTitle","title","indexOf","siteName","dateString","getPrettyString","substr","hasUserCapability","capability","isArray","userCapabilities","Matomo","piwikService","initPiwikService","$rootScope","$on","run","translate","translationStringId","values","pkArgs","_pk_translate","dateInPeriod","addCustomPeriod","weekDates","startWeek","endWeek","daysToMonday","getDay","month","startMonth","endMonth","toString","startYear","endYear","startDate","endDate","childPeriodType","strAmount","strEndDate","nAmount","Math","max","parseInt","Number","isNaN","startPeriod","endPeriod","firstWebsiteDate","rangeEndDate","countBack","ed","getLastNRange","substring","parts","start","end","piwikPeriods","getAllLabels","isRecognizedPeriod","RangePeriod","defaultErrorCallback","deferred","status","loadingError","Piwik_Popover","isOpen","body","html","escape","responseText","show","globalAjaxQueue","active","clean","readyState","splice","args","abort","forEach","x","params","setFormat","addParams","send","errorCallback","type","getValuesFromUrl","arrayParams","keys","toLowerCase","getParams","postParams","withToken","url","urls","urlsProcessed","map","u","param","method","timeout","callback","useRegularCallbackInCaseOfError","setCallback","redirect","completeCallback","element","loadingElement","errorElement","parameter","defaultParams","hide","fadeIn","requestHandle","buildAjaxCall","parameters","mixinDefaultGetParams","getUrl","segment","ajaxCall","async","dataType","complete","apply","arguments","success","response","request","result","placeAt","UI","notification","Notification","placeat","context","id","scrollToNotification","ajaxRequestFinished","data","mixinDefaultPostParams","undefined","ajax","isRequestToApiMethod","shouldPropagateTokenAuth","token_auth","force_api_session","isWidgetizeRequestWithoutSession","getDefaultPostParams","mergedParams","originalParams","idSite","useGETDefaultParameter","ajaxQueue","ajaxHelper","PiwikUrl","Piwik","ref","modelValue","props","Boolean","required","HTMLElement","emits","$emit","watch","newValue","oldValue","slotElement","$refs","firstElementChild","modalConfirm","yes","no","onCloseEnd","appendChild","render","transcludeCounter","createAngularJsAdapter","options","component","scope","events","directiveName","transclude","mountPointFactory","postCreate","noScope","currentTranscludeCounter","angularJsScope","angularJsAdapter","injectedServices","adapter","restrict","compile","post","ngScope","ngElement","ngAttrs","clone","find","rootVueTemplate","entries","info","vue","eventName","app","template","initialData","scopeVarName","default","Function","transcludeTarget","methods","$event","config","globalProperties","$sanitize","vueSanitize","mountPoint","vm","mount","angularJsBind","$watch","append","directive","MatomoDialog","attrs","$eval","setTimeout","$apply","close","$parse","piwikDialog","assign","vueRootPlaceholder","appendTo","class","tabindex","showIcons","editUrl","actualFeatureName","helpUrl","actualInlineHelp","rel","target","showInlineHelp","reportGenerated","RateFeature","Promise","resolve","ready","Feedback","String","featureName","inlineHelp","components","helpNode","querySelector","parentElement","nextElementSibling","helpDocs","getAttribute","trim","remove","textContent","containsToday","tooltip","track","content","items","EnrichedHeadline","contentTitle","actualFeature","actualHelpText","feature-name","help-url","inline-help","adminContent","feature","helpText","anchor","anchorElement","createElement","prepend","contentTopPosition","innerHTML","offsetTop","parents","closest","topThis","style","marginTop","ContentBlock","alt","loadingMessage","loading","ActivityIndicator","severity","Alert"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,QACR,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIJ,GACe,kBAAZC,QACdA,QAAQ,YAAcD,EAAQG,QAAQ,QAEtCJ,EAAK,YAAcC,EAAQD,EAAK,SARlC,CASoB,qBAATO,KAAuBA,KAAOC,MAAO,SAASC,GACzD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC,IAAIC,EAASO,EA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AUA,EAAQD,UAAYna,EAAKma,UAE/CG,EAAUL,EAAqB,KAGjCja,EAAKua,MAAMC,UAAY,OC/E/B,GAAOpH,OAAS,GAED;;;;;;GCKAE,GAAuB,CACpCE,UAAWiH,GACXhH,MAAO,CACL2F,aAAc,CACZlD,cAAe,KAEjByD,QAAS,CACPzD,cAAe,KAEjBoB,QAAS,CACPpB,cAAe,KAEjB0D,SAAU,CACR1D,cAAe,KAEjB2D,OAAQ,CACN3D,cAAe,OAGnBvC,cAAe,oBACfC,YAAY,I,UCtBUqD,MAAM,gB,GAC1B,gCAA4D,OAAvDhU,IAAI,2CAA2CyX,IAAI,I,+FAD1D,gCAGM,MAHN,GAGM,CAFJ,GACA,gCAAiC,yCAAxB,EAAAC,gBAAc,I,mBAFZ,EAAAC,WCJA,oCAAgB,CAC7BzI,MAAO,CACLyI,QAAS,CACPlN,KAAM0E,QACNC,UAAU,EACViD,SAAS,GAEXqF,eAAgB,CACdjN,KAAMuK,OACN5F,UAAU,EACViD,QAASjM,EAAU,2BCXzB,GAAO+J,OAAS,GAED,UCMA,GAAAE,GAAuB,CACpCE,UAAWqH,GACXpH,MAAO,CACLmH,QAAS,CACP5F,IAAK,UACLkB,cAAe,KAEjByE,eAAgB,CACd3F,IAAK,iBACLkB,cAAe,IACfZ,QAAS,IAAMjM,EAAU,yBAG7BhF,QAAS,GACTsP,cAAe;;;;;;4DCjBf,gCAKM,OAJJsD,MAAK,6BAAC,QAAO,WACO,EAAA6D,WAAQ,M,CAE5B,wBAAa,qB,GCTF,oCAAgB,CAC7B3I,MAAO,CACL2I,SAAU,CACRpN,KAAMuK,OACN5F,UAAU,MCJhB,GAAOe,OAAS,GAED,UCKA,GAAAE,GAAuB,CACpCE,UAAWuH,GACXtH,MAAO,CACLqH,SAAU,CACR9F,IAAK,WACLkB,cAAe,gBAGnBvC,cAAe,aACfC,YAAY","file":"CoreHome.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CoreHome\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"CoreHome\"] = factory(root[\"Vue\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/CoreHome/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n// see https://github.com/matomo-org/matomo/issues/5094 used to detect an ad blocker\nwindow.hasBlockedContent = false;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst MatomoUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default MatomoUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport MatomoUrl from './MatomoUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: MatomoUrl.getSearchParam.bind(MatomoUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\ninterface Period {\n getPrettyString(): string;\n getDateRange(): Date[];\n containsToday(): boolean;\n}\n\ninterface PeriodClass {\n parse(strDate: string|Date): Period;\n getDisplayText(): string;\n}\n\n/**\n * Matomo period management service for the frontend.\n *\n * Usage:\n *\n * var DayPeriod = matomoPeriods.get('day');\n * var day = new DayPeriod(new Date());\n *\n * or\n *\n * var day = matomoPeriods.parse('day', '2013-04-05');\n *\n * Adding custom periods:\n *\n * To add your own period to the frontend, create a period class for it\n * w/ the following methods:\n *\n * - **getPrettyString()**: returns a human readable display string for the period.\n * - **getDateRange()**: returns an array w/ two elements, the first being the start\n * Date of the period, the second being the end Date. The dates\n * must be Date objects, not strings, and are inclusive.\n * - **containsToday()**: returns true if the date period contains today. False if not.\n * - (_static_) **parse(strDate)**: creates a new instance of this period from the\n * value of the 'date' query parameter.\n * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month',\n * 'week', etc.\n *\n * Then call Periods.addCustomPeriod w/ your period class:\n *\n * Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod);\n *\n * NOTE: currently only single date periods like day, week, month year can\n * be extended. Other types of periods that require a special UI to\n * view/edit aren't, since there is currently no way to use a\n * custom UI for a custom period.\n */\nclass Periods {\n periods: {[name: string]: PeriodClass} = {};\n\n periodOrder: string[] = [];\n\n addCustomPeriod(name: string, periodClass: PeriodClass) {\n if (this.periods[name]) {\n throw new Error(`The \"${name}\" period already exists! It cannot be overridden.`);\n }\n\n this.periods[name] = periodClass;\n this.periodOrder.push(name);\n }\n\n getAllLabels(): string[] {\n return Array<string>().concat(this.periodOrder);\n }\n\n get(strPeriod: string): PeriodClass {\n const periodClass = this.periods[strPeriod];\n if (!periodClass) {\n throw new Error(`Invalid period label: ${strPeriod}`);\n }\n return periodClass;\n }\n\n parse(strPeriod: string, strDate: string): Period {\n return this.get(strPeriod).parse(strDate);\n }\n\n isRecognizedPeriod(strPeriod: string): boolean {\n return !!this.periods[strPeriod];\n }\n}\n\nexport default new Periods();\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport function format(date: Date): string {\n return $.datepicker.formatDate('yy-mm-dd', date);\n}\n\nexport function getToday(): Date {\n const date = new Date(Date.now());\n\n // undo browser timezone\n date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000);\n\n // apply Matomo site timezone (if it exists)\n date.setHours(date.getHours() + ((window.piwik.timezoneOffset || 0) / 3600));\n\n // get rid of hours/minutes/seconds/etc.\n date.setHours(0);\n date.setMinutes(0);\n date.setSeconds(0);\n date.setMilliseconds(0);\n return date;\n}\n\nexport function parseDate(date: string|Date): Date {\n if (date instanceof Date) {\n return date;\n }\n\n const strDate = decodeURIComponent(date);\n\n if (strDate === 'today'\n || strDate === 'now'\n ) {\n return getToday();\n }\n\n if (strDate === 'yesterday'\n // note: ignoring the 'same time' part since the frontend doesn't care about the time\n || strDate === 'yesterdaySameTime'\n ) {\n const yesterday = getToday();\n yesterday.setDate(yesterday.getDate() - 1);\n return yesterday;\n }\n\n if (strDate.match(/last[ -]?week/i)) {\n const lastWeek = getToday();\n lastWeek.setDate(lastWeek.getDate() - 7);\n return lastWeek;\n }\n\n if (strDate.match(/last[ -]?month/i)) {\n const lastMonth = getToday();\n lastMonth.setDate(1);\n lastMonth.setMonth(lastMonth.getMonth() - 1);\n return lastMonth;\n }\n\n if (strDate.match(/last[ -]?year/i)) {\n const lastYear = getToday();\n lastYear.setFullYear(lastYear.getFullYear() - 1);\n return lastYear;\n }\n\n try {\n return $.datepicker.parseDate('yy-mm-dd', strDate);\n } catch (err) {\n // angular swallows this error, so manual console log here\n console.error(err.message || err);\n throw err;\n }\n}\n\nexport function todayIsInRange(dateRange: Date[]): boolean {\n if (dateRange.length !== 2) {\n return false;\n }\n\n if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) {\n return true;\n }\n\n return false;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = MatomoUrl.getSearchParam('date');\n const period = MatomoUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Matomo = piwik;\nexport default Matomo;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Matomo from './Matomo';\n\nfunction piwikService() {\n return Matomo;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport default function translate(\n translationStringId: string,\n ...values: string[]|string[][]\n): string {\n let pkArgs = values as string[];\n // handle variadic args AND single array of values (to match _pk_translate signature)\n if (values.length === 1 && values[0] && values[0] instanceof Array) {\n [pkArgs] = values as string[][];\n }\n return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class DayPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): DayPeriod {\n return new DayPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodDay');\n }\n\n getPrettyString(): string {\n return format(this.dateInPeriod);\n }\n\n getDateRange(): Date[] {\n return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('day', DayPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class WeekPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): WeekPeriod {\n return new WeekPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodWeek');\n }\n\n getPrettyString(): string {\n const weekDates = this.getDateRange();\n const startWeek = format(weekDates[0]);\n const endWeek = format(weekDates[1]);\n\n return translate('General_DateRangeFromTo', [startWeek, endWeek]);\n }\n\n getDateRange(): Date[] {\n const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7;\n\n const startWeek = new Date(this.dateInPeriod.getTime());\n startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday);\n\n const endWeek = new Date(startWeek.getTime());\n endWeek.setDate(startWeek.getDate() + 6);\n\n return [startWeek, endWeek];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('week', WeekPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class MonthPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): MonthPeriod {\n return new MonthPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodMonth');\n }\n\n getPrettyString(): string {\n const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`);\n return `${month} ${this.dateInPeriod.getFullYear()}`;\n }\n\n getDateRange(): Date[] {\n const startMonth = new Date(this.dateInPeriod.getTime());\n startMonth.setDate(1);\n\n const endMonth = new Date(this.dateInPeriod.getTime());\n endMonth.setDate(1);\n endMonth.setMonth(endMonth.getMonth() + 1);\n endMonth.setDate(0);\n\n return [startMonth, endMonth];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('month', MonthPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class YearPeriod {\n constructor(private dateInPeriod: Date) {}\n\n static parse(strDate: string): YearPeriod {\n return new YearPeriod(parseDate(strDate));\n }\n\n static getDisplayText(): string {\n return translate('Intl_PeriodYear');\n }\n\n getPrettyString(): string {\n return this.dateInPeriod.getFullYear().toString();\n }\n\n getDateRange(): Date[] {\n const startYear = new Date(this.dateInPeriod.getTime());\n startYear.setMonth(0);\n startYear.setDate(1);\n\n const endYear = new Date(this.dateInPeriod.getTime());\n endYear.setMonth(12);\n endYear.setDate(0);\n\n return [startYear, endYear];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('year', YearPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport {\n parseDate,\n format,\n getToday,\n todayIsInRange,\n} from './utilities';\n\nexport default class RangePeriod {\n constructor(\n public readonly startDate: Date,\n public readonly endDate: Date,\n public readonly childPeriodType: string,\n ) {}\n\n /**\n * Returns a range representing the last N childPeriodType periods, including the current one.\n */\n static getLastNRange(\n childPeriodType: string,\n strAmount: string|number,\n strEndDate?: Date|string,\n ): RangePeriod {\n const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0);\n if (Number.isNaN(nAmount)) {\n throw new Error('Invalid range strAmount');\n }\n\n let endDate = strEndDate ? parseDate(strEndDate) : getToday();\n\n let startDate = new Date(endDate.getTime());\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - nAmount);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (nAmount * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - nAmount);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - nAmount);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n /**\n * Returns a range representing a specific child date range counted back from the end date\n *\n * @param childPeriodType Type of the period, eg. day, week, year\n * @param rangeEndDate\n * @param countBack Return only the child date range for this specific period number\n * @returns {RangePeriod}\n */\n static getLastNRangeChild(\n childPeriodType: string,\n rangeEndDate: Date|string,\n countBack: number,\n ): RangePeriod {\n const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday();\n let startDate = new Date(ed.getTime());\n let endDate = new Date(ed.getTime());\n\n if (childPeriodType === 'day') {\n startDate.setDate(startDate.getDate() - countBack);\n endDate.setDate(endDate.getDate() - countBack);\n } else if (childPeriodType === 'week') {\n startDate.setDate(startDate.getDate() - (countBack * 7));\n endDate.setDate(endDate.getDate() - (countBack * 7));\n } else if (childPeriodType === 'month') {\n startDate.setDate(1);\n startDate.setMonth(startDate.getMonth() - countBack);\n endDate.setDate(1);\n endDate.setMonth(endDate.getMonth() - countBack);\n } else if (childPeriodType === 'year') {\n startDate.setFullYear(startDate.getFullYear() - countBack);\n endDate.setFullYear(endDate.getFullYear() - countBack);\n } else {\n throw new Error(`Unknown period type '${childPeriodType}'.`);\n }\n\n if (childPeriodType !== 'day') {\n const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n [startDate] = startPeriod.getDateRange();\n [, endDate] = endPeriod.getDateRange();\n }\n\n const firstWebsiteDate = new Date(1991, 7, 6);\n if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n switch (childPeriodType) {\n case 'year':\n startDate = new Date(1992, 0, 1);\n break;\n case 'month':\n startDate = new Date(1991, 8, 1);\n break;\n case 'week':\n startDate = new Date(1991, 8, 12);\n break;\n case 'day':\n default:\n startDate = firstWebsiteDate;\n break;\n }\n }\n\n return new RangePeriod(startDate, endDate, childPeriodType);\n }\n\n static parse(strDate: string, childPeriodType = 'day'): RangePeriod {\n if (/^previous/.test(strDate)) {\n const endDate = RangePeriod.getLastNRange(childPeriodType, '2').startDate;\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate);\n }\n\n if (/^last/.test(strDate)) {\n return RangePeriod.getLastNRange(childPeriodType, strDate.substring(4));\n }\n\n const parts = decodeURIComponent(strDate).split(',');\n return new RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType);\n }\n\n static getDisplayText(): string {\n return translate('General_DateRangeInPeriodList');\n }\n\n getPrettyString(): string {\n const start = format(this.startDate);\n const end = format(this.endDate);\n return translate('General_DateRangeFromTo', [start, end]);\n }\n\n getDateRange(): Date[] {\n return [this.startDate, this.endDate];\n }\n\n containsToday(): boolean {\n return todayIsInRange(this.getDateRange());\n }\n}\n\nPeriods.addCustomPeriod('range', RangePeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Periods from './Periods';\nimport RangePeriod from './Range';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nwindow.piwik.addCustomPeriod = Periods.addCustomPeriod.bind(Periods);\n\nfunction piwikPeriods() {\n return {\n getAllLabels: Periods.getAllLabels.bind(Periods),\n isRecognizedPeriod: Periods.isRecognizedPeriod.bind(Periods),\n get: Periods.get.bind(Periods),\n parse: Periods.parse.bind(Periods),\n parseDate,\n format,\n RangePeriod,\n todayIsInRange,\n };\n}\n\nangular.module('piwikApp.service').factory('piwikPeriods', piwikPeriods);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Matomo from '../Matomo/Matomo';\n\nwindow.globalAjaxQueue = [] as GlobalAjaxQueue;\nwindow.globalAjaxQueue.active = 0;\n\nwindow.globalAjaxQueue.clean = function globalAjaxQueueClean() {\n for (let i = this.length; i >= 0; i -= 1) {\n if (!this[i] || this[i].readyState === 4) {\n this.splice(i, 1);\n }\n }\n};\n\nwindow.globalAjaxQueue.push = function globalAjaxQueuePush(...args: (XMLHttpRequest|null)[]) {\n this.active += args.length;\n\n // cleanup ajax queue\n this.clean();\n\n // call original array push\n return Array.prototype.push.call(this, ...args);\n};\n\nwindow.globalAjaxQueue.abort = function globalAjaxQueueAbort() {\n // abort all queued requests if possible\n this.forEach((x) => x && x.abort && x.abort());\n\n // remove all elements from array\n this.splice(0, this.length);\n\n this.active = 0;\n};\n\ntype ParameterValue = string | number | null | undefined | ParameterValue[];\ntype Parameters = {[name: string]: ParameterValue | Parameters};\ntype AnyFunction = (...params:any[]) => any; // eslint-disable-line\n\n/**\n * error callback to use by default\n */\nfunction defaultErrorCallback(deferred: XMLHttpRequest, status: string): void {\n // do not display error message if request was aborted\n if (status === 'abort') {\n return;\n }\n\n const loadingError = $('#loadingError');\n if (Piwik_Popover.isOpen() && deferred && deferred.status === 500) {\n if (deferred && deferred.status === 500) {\n $(document.body).html(piwikHelper.escape(deferred.responseText));\n }\n } else {\n loadingError.show();\n }\n}\n\n/**\n * Global ajax helper to handle requests within Matomo\n */\nexport default class AjaxHelper {\n /**\n * Format of response\n */\n format = 'json';\n\n /**\n * A timeout for the request which will override any global timeout\n */\n timeout = null;\n\n /**\n * Callback function to be executed on success\n */\n callback: AnyFunction = null;\n\n /**\n * Use this.callback if an error is returned\n */\n useRegularCallbackInCaseOfError = false;\n\n /**\n * Callback function to be executed on error\n *\n * @deprecated use the jquery promise API\n */\n errorCallback: AnyFunction;\n\n withToken = false;\n\n /**\n * Callback function to be executed on complete (after error or success)\n *\n * @deprecated use the jquery promise API\n */\n completeCallback: AnyFunction;\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultGetParams\n */\n getParams: Parameters = {};\n\n /**\n * Base URL used in the AJAX request. Can be set by setUrl.\n *\n * It is set to '?' rather than 'index.php?' to increase chances that it works\n * including for users who have an automatic 301 redirection from index.php? to ?\n * POST values are missing when there is such 301 redirection. So by by-passing\n * this 301 redirection, we avoid this issue.\n *\n * @see ajaxHelper.setUrl\n */\n getUrl = '?';\n\n /**\n * Params to be passed as GET params\n * @see ajaxHelper.mixinDefaultPostParams\n */\n postParams: Parameters = {};\n\n /**\n * Element to be displayed while loading\n */\n loadingElement: HTMLElement|null|JQuery|JQLite|string = null;\n\n /**\n * Element to be displayed on error\n */\n errorElement: HTMLElement|JQuery|JQLite|string = '#ajaxError';\n\n /**\n * Handle for current request\n */\n requestHandle: XMLHttpRequest|JQuery.jqXHR|null = null;\n\n defaultParams = ['idSite', 'period', 'date', 'segment'];\n\n // helper method entry point\n static fetch(params: Parameters): JQuery.jqXHR {\n const helper = new AjaxHelper();\n helper.setFormat('json');\n helper.addParams(params, 'get');\n return helper.send();\n }\n\n constructor() {\n this.errorCallback = defaultErrorCallback;\n }\n\n /**\n * Adds params to the request.\n * If params are given more then once, the latest given value is used for the request\n *\n * @param params\n * @param type type of given parameters (POST or GET)\n * @return {void}\n */\n addParams(params: Parameters|string, type: string): void {\n if (typeof params === 'string') {\n // TODO: add global types for broadcast (multiple uses below)\n params = window['broadcast'].getValuesFromUrl(params); // eslint-disable-line\n }\n\n const arrayParams = ['compareSegments', 'comparePeriods', 'compareDates'];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n if (arrayParams.indexOf(key) !== -1\n && !value\n ) {\n return;\n }\n\n if (type.toLowerCase() === 'get') {\n this.getParams[key] = value;\n } else if (type.toLowerCase() === 'post') {\n this.postParams[key] = value;\n }\n });\n }\n\n withTokenInUrl(): void {\n this.withToken = true;\n }\n\n /**\n * Sets the base URL to use in the AJAX request.\n */\n setUrl(url: string): void {\n this.addParams(broadcast.getValuesFromUrl(url), 'GET');\n }\n\n /**\n * Gets this helper instance ready to send a bulk request. Each argument to this\n * function is a single request to use.\n */\n setBulkRequests(...urls: string[]): void {\n const urlsProcessed = urls.map((u) => $.param(u));\n\n this.addParams({\n module: 'API',\n method: 'API.getBulkRequest',\n urls: urlsProcessed,\n format: 'json',\n }, 'post');\n }\n\n /**\n * Set a timeout (in milliseconds) for the request. This will override any global timeout.\n *\n * @param timeout Timeout in milliseconds\n */\n setTimeout(timeout: number): void {\n this.timeout = timeout;\n }\n\n /**\n * Sets the callback called after the request finishes\n *\n * @param callback Callback function\n * @deprecated use the jquery promise API\n */\n setCallback(callback: AnyFunction): void {\n this.callback = callback;\n }\n\n /**\n * Set that the callback passed to setCallback() should be used if an application error (i.e. an\n * Exception in PHP) is returned.\n */\n useCallbackInCaseOfError(): void {\n this.useRegularCallbackInCaseOfError = true;\n }\n\n /**\n * Set callback to redirect on success handler\n * &update=1(+x) will be appended to the current url\n *\n * @param [params] to modify in redirect url\n * @return {void}\n */\n redirectOnSuccess(params: Parameters): void {\n this.setCallback(() => {\n piwikHelper.redirect(params);\n });\n }\n\n /**\n * Sets the callback called in case of an error within the request\n *\n * @deprecated use the jquery promise API\n */\n setErrorCallback(callback: AnyFunction): void {\n this.errorCallback = callback;\n }\n\n /**\n * Sets the complete callback which is called after an error or success callback.\n *\n * @deprecated use the jquery promise API\n */\n setCompleteCallback(callback: AnyFunction): void {\n this.completeCallback = callback;\n }\n\n /**\n * Sets the response format for the request\n *\n * @param format response format (e.g. json, html, ...)\n */\n setFormat(format: string): void {\n this.format = format;\n }\n\n /**\n * Set the div element to show while request is loading\n *\n * @param [element] selector for the loading element\n */\n setLoadingElement(element: string|HTMLElement|JQuery): void {\n this.loadingElement = element || '#ajaxLoadingDiv';\n }\n\n /**\n * Set the div element to show on error\n *\n * @param element selector for the error element\n */\n setErrorElement(element: HTMLElement|JQuery|string): void {\n if (!element) {\n return;\n }\n this.errorElement = element;\n }\n\n /**\n * Detect whether are allowed to use the given default parameter or not\n */\n private useGETDefaultParameter(parameter: string): boolean {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * Removes a default parameter that is usually send automatically along the request.\n *\n * @param parameter A name such as \"period\", \"date\", \"segment\".\n */\n removeDefaultParameter(parameter: string): void {\n if (parameter && this.defaultParams) {\n for (let i = 0; i < this.defaultParams.length; i += 1) {\n if (this.defaultParams[i] === parameter) {\n this.defaultParams.splice(i, 1);\n }\n }\n }\n }\n\n /**\n * Send the request\n */\n send(): JQuery.jqXHR {\n if ($(this.errorElement).length) {\n $(this.errorElement).hide();\n }\n\n if (this.loadingElement) {\n $(this.loadingElement).fadeIn();\n }\n\n this.requestHandle = this.buildAjaxCall();\n globalAjaxQueue.push(this.requestHandle);\n\n return this.requestHandle;\n }\n\n /**\n * Aborts the current request if it is (still) running\n */\n abort(): void {\n if (this.requestHandle && typeof this.requestHandle.abort === 'function') {\n this.requestHandle.abort();\n this.requestHandle = null;\n }\n }\n\n /**\n * Builds and sends the ajax requests\n */\n private buildAjaxCall(): JQuery.jqXHR {\n const self = this;\n const parameters = this.mixinDefaultGetParams(this.getParams);\n\n let url = this.getUrl;\n if (url[url.length - 1] !== '?') {\n url += '&';\n }\n\n // we took care of encoding &segment properly already, so we don't use $.param for it ($.param\n // URL encodes the values)\n if (parameters.segment) {\n url = `${url}segment=${parameters.segment}&`;\n delete parameters.segment;\n }\n if (parameters.date) {\n url = `${url}date=${decodeURIComponent(parameters.date.toString())}&`;\n delete parameters.date;\n }\n url += $.param(parameters);\n const ajaxCall = {\n type: 'POST',\n async: true,\n url,\n dataType: this.format || 'json',\n complete: this.completeCallback,\n error: function errorCallback() {\n globalAjaxQueue.active -= 1;\n\n if (self.errorCallback) {\n self.errorCallback.apply(this, arguments); // eslint-disable-line\n }\n },\n success: (response, status, request) => {\n if (this.loadingElement) {\n $(this.loadingElement).hide();\n }\n\n if (response && response.result === 'error' && !this.useRegularCallbackInCaseOfError) {\n let placeAt = null;\n let type = 'toast';\n if ($(this.errorElement).length && response.message) {\n $(this.errorElement).show();\n placeAt = this.errorElement;\n type = null;\n }\n\n if (response.message) {\n const UI = window['require']('piwik/UI'); // eslint-disable-line\n const notification = new UI.Notification();\n notification.show(response.message, {\n placeat: placeAt,\n context: 'error',\n type,\n id: 'ajaxHelper',\n });\n notification.scrollToNotification();\n }\n } else if (this.callback) {\n this.callback(response, status, request);\n }\n\n globalAjaxQueue.active -= 1;\n if (Matomo.ajaxRequestFinished) {\n Matomo.ajaxRequestFinished();\n }\n },\n data: this.mixinDefaultPostParams(this.postParams),\n timeout: this.timeout !== null ? this.timeout : undefined,\n };\n\n return $.ajax(ajaxCall);\n }\n\n private isRequestToApiMethod() {\n return (this.getParams && this.getParams.module === 'API' && this.getParams.method)\n || (this.postParams && this.postParams.module === 'API' && this.postParams.method);\n }\n\n isWidgetizedRequest(): boolean {\n return (broadcast.getValueFromUrl('module') === 'Widgetize');\n }\n\n private getDefaultPostParams() {\n if (this.withToken || this.isRequestToApiMethod() || Matomo.shouldPropagateTokenAuth) {\n return {\n token_auth: Matomo.token_auth,\n // When viewing a widgetized report there won't be any session that can be used, so don't\n // force session usage\n force_api_session: broadcast.isWidgetizeRequestWithoutSession() ? 0 : 1,\n };\n }\n\n return {};\n }\n\n /**\n * Mixin the default parameters to send as POST\n *\n * @param params parameter object\n */\n private mixinDefaultPostParams(params): Parameters {\n const defaultParams = this.getDefaultPostParams();\n\n const mergedParams = {\n ...defaultParams,\n ...params,\n };\n\n return mergedParams;\n }\n\n /**\n * Mixin the default parameters to send as GET\n *\n * @param params parameter object\n */\n private mixinDefaultGetParams(originalParams): Parameters {\n const segment = MatomoUrl.getSearchParam('segment');\n\n const defaultParams = {\n idSite: Matomo.idSite || broadcast.getValueFromUrl('idSite'),\n period: Matomo.period || broadcast.getValueFromUrl('period'),\n segment,\n };\n\n const params = originalParams;\n\n // never append token_auth to url\n if (params.token_auth) {\n params.token_auth = null;\n delete params.token_auth;\n }\n\n Object.keys(defaultParams).forEach((key) => {\n if (this.useGETDefaultParameter(key)\n && !params[key]\n && !this.postParams[key]\n && defaultParams[key]\n ) {\n params[key] = defaultParams[key];\n }\n });\n\n // handle default date & period if not already set\n if (this.useGETDefaultParameter('date') && !params.date && !this.postParams.date) {\n params.date = Matomo.currentDateString;\n }\n\n return params;\n }\n}\n","import AjaxHelper from './AjaxHelper';\n\ndeclare global {\n interface Window {\n ajaxHelper: AjaxHelper;\n }\n}\n\nwindow.ajaxHelper = AjaxHelper;\n\nfunction ajaxQueue() {\n return globalAjaxQueue;\n}\n\nangular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst PiwikUrl = {\n getSearchParam(paramName: string): string {\n const hash = window.location.href.split('#');\n\n const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n // for date, period and idsite fall back to parameter from url, if non in hash was provided\n if (valueFromHash\n || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n ) {\n return valueFromHash;\n }\n }\n\n return window.broadcast.getValueFromUrl(paramName, window.location.search);\n },\n};\n\nexport default PiwikUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport PiwikUrl from './PiwikUrl';\n\nfunction piwikUrl() {\n const model = {\n getSearchParam: PiwikUrl.getSearchParam.bind(PiwikUrl),\n };\n\n return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport PiwikUrl from '../PiwikUrl/PiwikUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n try {\n Periods.parse(periodStr, dateStr);\n return true;\n } catch (e) {\n return false;\n }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n let date = PiwikUrl.getSearchParam('date');\n const period = PiwikUrl.getSearchParam('period');\n if (!isValidPeriod(period, date)) {\n // invalid data in URL\n return;\n }\n\n if (piwik.period === period && piwik.currentDateString === date) {\n // this period / date is already loaded\n return;\n }\n\n piwik.period = period;\n\n const dateRange = Periods.parse(period, date).getDateRange();\n piwik.startDateString = format(dateRange[0]);\n piwik.endDateString = format(dateRange[1]);\n\n piwik.updateDateInTitle(date, period);\n\n // do not set anything to previousN/lastN, as it's more useful to plugins\n // to have the dates than previousN/lastN.\n if (piwik.period === 'range') {\n date = `${piwik.startDateString},${piwik.endDateString}`;\n }\n\n piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n if (!$('.top_controls #periodString').length) {\n return;\n }\n\n // Cache server-rendered page title\n originalTitle = originalTitle || document.title;\n\n if (originalTitle.indexOf(piwik.siteName) === 0) {\n const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n return window.angular.isArray(piwik.userCapabilities)\n && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Piwik = piwik;\nexport default Piwik;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Piwik from './Piwik';\n\nfunction piwikService() {\n return Piwik;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n<template>\n <div v-show=\"modelValue\" ref=\"root\">\n <slot></slot>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n modelValue: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close', 'update:modelValue'],\n setup() {\n const root = ref(null);\n\n return {\n root,\n };\n },\n activated() {\n this.$emit('update:modelValue', false);\n },\n watch: {\n modelValue(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$refs.root.firstElementChild;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => {\n // materialize removes the child element, so we move it back to the slot\n if (!this.element) {\n this.$refs.root.appendChild(slotElement);\n }\n this.$emit('update:modelValue', false);\n this.$emit('closeEnd');\n },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n</script>\n","\nimport { defineComponent, ref } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n props: {\n /**\n * Whether the modal is displayed or not;\n */\n modelValue: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n * element to launch the modal instead of the element in the slot. This should not\n * be used for new Vue code.\n *\n * @deprecated\n */\n element: {\n type: HTMLElement,\n required: false,\n },\n },\n emits: ['yes', 'no', 'closeEnd', 'close', 'update:modelValue'],\n setup() {\n const root = ref(null);\n\n return {\n root,\n };\n },\n activated() {\n this.$emit('update:modelValue', false);\n },\n watch: {\n modelValue(newValue, oldValue) {\n if (newValue) {\n const slotElement = this.element || this.$refs.root.firstElementChild;\n Matomo.helper.modalConfirm(slotElement, {\n yes: () => { this.$emit('yes'); },\n no: () => { this.$emit('no'); },\n }, {\n onCloseEnd: () => {\n // materialize removes the child element, so we move it back to the slot\n if (!this.element) {\n this.$refs.root.appendChild(slotElement);\n }\n this.$emit('update:modelValue', false);\n this.$emit('closeEnd');\n },\n });\n } else if (newValue === false && oldValue === true) {\n // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n this.$emit('close');\n }\n },\n },\n});\n","import { render } from \"./MatomoDialog.vue?vue&type=template&id=50fda6d8\"\nimport script from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport {\n createApp,\n defineComponent,\n ref,\n ComponentPublicInstance,\n} from 'vue';\nimport translate from './translate';\n\ninterface SingleScopeVarInfo {\n vue?: string;\n default?: any; // eslint-disable-line\n angularJsBind?: string;\n}\n\ntype ScopeMapping = { [scopeVarName: string]: SingleScopeVarInfo };\n\ntype AdapterFunction<InjectTypes, R = void> = (\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype EventAdapterFunction<InjectTypes, R = void> = (\n $event: any, // eslint-disable-line\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype PostCreateFunction<InjectTypes, R = void> = (\n vm: ComponentPublicInstance,\n scope: ng.IScope,\n element: ng.IAugmentedJQuery,\n attrs: ng.IAttributes,\n ...injected: InjectTypes,\n) => R;\n\ntype EventMapping<InjectTypes> = { [vueEventName: string]: EventAdapterFunction<InjectTypes> };\n\ntype ComponentType = ReturnType<typeof defineComponent>;\n\nlet transcludeCounter = 0;\n\nexport default function createAngularJsAdapter<InjectTypes = []>(options: {\n component: ComponentType,\n scope?: ScopeMapping,\n directiveName: string,\n events?: EventMapping<InjectTypes>,\n $inject?: string[],\n transclude?: boolean,\n mountPointFactory?: AdapterFunction<InjectTypes, HTMLElement>,\n postCreate?: PostCreateFunction<InjectTypes>,\n noScope?: boolean,\n}): ng.IDirectiveFactory {\n const {\n component,\n scope = {},\n events = {},\n $inject,\n directiveName,\n transclude,\n mountPointFactory,\n postCreate,\n noScope,\n } = options;\n\n const currentTranscludeCounter = transcludeCounter;\n if (transclude) {\n transcludeCounter += 1;\n }\n\n const angularJsScope = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (!info.vue) {\n info.vue = scopeVarName;\n }\n if (info.angularJsBind) {\n angularJsScope[scopeVarName] = info.angularJsBind;\n }\n });\n\n function angularJsAdapter(...injectedServices: InjectTypes) {\n const adapter: ng.IDirective = {\n restrict: 'A',\n scope: noScope ? undefined : angularJsScope,\n compile: function angularJsAdapterCompile() {\n return {\n post: function angularJsAdapterLink(\n ngScope: ng.IScope,\n ngElement: ng.IAugmentedJQuery,\n ngAttrs: ng.IAttributes,\n ) {\n const clone = transclude ? ngElement.find(`[ng-transclude][counter=${currentTranscludeCounter}]`) : null;\n\n let rootVueTemplate = '<root-component';\n Object.entries(scope).forEach(([, info]) => {\n rootVueTemplate += ` :${info.vue}=\"${info.vue}\"`;\n });\n Object.entries(events).forEach((info) => {\n const [eventName] = info;\n rootVueTemplate += ` @${eventName}=\"onEventHandler('${eventName}', $event)\"`;\n });\n rootVueTemplate += '>';\n if (transclude) {\n rootVueTemplate += '<div ref=\"transcludeTarget\"/>';\n }\n rootVueTemplate += '</root-component>';\n const app = createApp({\n template: rootVueTemplate,\n data() {\n const initialData = {};\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n let value = ngScope[scopeVarName];\n if (typeof value === 'undefined' && typeof info.default !== 'undefined') {\n value = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n }\n initialData[info.vue] = value;\n });\n return initialData;\n },\n setup() {\n if (transclude) {\n const transcludeTarget = ref(null);\n return {\n transcludeTarget,\n };\n }\n\n return undefined;\n },\n methods: {\n onEventHandler(name: string, $event: any) { // eslint-disable-line\n if (events[name]) {\n events[name]($event, ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n },\n });\n app.config.globalProperties.$sanitize = window.vueSanitize;\n app.config.globalProperties.translate = translate;\n app.component('root-component', component);\n\n const mountPoint = mountPointFactory\n ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices)\n : ngElement[0];\n const vm = app.mount(mountPoint);\n\n Object.entries(scope).forEach(([scopeVarName, info]) => {\n if (!info.angularJsBind) {\n return;\n }\n\n ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line\n if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {\n vm[scopeVarName] = info.default instanceof Function\n ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n : info.default;\n } else {\n vm[scopeVarName] = newValue;\n }\n });\n });\n\n if (transclude) {\n $(vm.transcludeTarget).append(clone);\n }\n\n if (postCreate) {\n postCreate(vm, ngScope, ngElement, ngAttrs, ...injectedServices);\n }\n },\n };\n },\n };\n\n if (transclude) {\n adapter.transclude = true;\n adapter.template = `<div ng-transclude counter=\"${currentTranscludeCounter}\"/>`;\n }\n\n return adapter;\n }\n\n angularJsAdapter.$inject = $inject || [];\n\n angular.module('piwikApp').directive(directiveName, angularJsAdapter);\n\n return angularJsAdapter;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport { IParseService } from 'angular';\nimport { ComponentPublicInstance } from 'vue';\nimport MatomoDialog from './MatomoDialog.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter<[IParseService]>({\n component: MatomoDialog,\n scope: {\n show: {\n vue: 'modelValue',\n default: false,\n },\n element: {\n default: (scope, element) => element[0],\n },\n },\n events: {\n yes: ($event, scope, element, attrs) => {\n if (attrs.yes) {\n scope.$eval(attrs.yes);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n no: ($event, scope, element, attrs) => {\n if (attrs.no) {\n scope.$eval(attrs.no);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n close: ($event, scope, element, attrs) => {\n if (attrs.close) {\n scope.$eval(attrs.close);\n setTimeout(() => { scope.$apply(); }, 0);\n }\n },\n 'update:modelValue': (newValue, scope, element, attrs, $parse: IParseService) => {\n setTimeout(() => {\n scope.$apply($parse(attrs.piwikDialog).assign(scope, newValue));\n }, 0);\n },\n },\n $inject: ['$parse'],\n directiveName: 'piwikDialog',\n transclude: true,\n mountPointFactory: (scope, element) => {\n const vueRootPlaceholder = $('<div class=\"vue-placeholder\"/>');\n vueRootPlaceholder.appendTo(element);\n return vueRootPlaceholder[0];\n },\n postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => {\n scope.$watch(attrs.piwikDialog, (newValue: boolean, oldValue: boolean) => {\n if (oldValue !== newValue) {\n vm.modelValue = newValue || false;\n }\n });\n },\n noScope: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div\n class=\"enrichedHeadline\"\n v-on:mouseenter=\"showIcons = true\"\n v-on:mouseleave=\"showIcons = false\"\n ref=\"root\"\n >\n <div\n v-if=\"!editUrl\"\n class=\"title\"\n tabindex=\"6\"\n >\n <slot />\n </div>\n <a\n v-if=\"editUrl\"\n class=\"title\"\n :href=\"editUrl\"\n :title=\"translate('CoreHome_ClickToEditX', $sanitize(actualFeatureName))\"\n >\n <slot />\n </a>\n <span\n v-show=\"showIcons || showInlineHelp\"\n class=\"iconsBar\"\n >\n <a\n v-if=\"helpUrl && !actualInlineHelp\"\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"helpIcon\"\n :href=\"helpUrl\"\n :title=\"translate('CoreHome_ExternalHelp')\"\n ><span class=\"icon-help\" /></a>\n <a\n v-if=\"actualInlineHelp\"\n v-on:click=\"showInlineHelp = !showInlineHelp\"\n class=\"helpIcon\"\n :class=\"{ 'active': showInlineHelp }\"\n :title=\"translate(reportGenerated ? 'General_HelpReport' : 'General_Help')\"\n ><span class=\"icon-info\" /></a>\n <div class=\"ratingIcons\">\n <RateFeature\n :title=\"actualFeatureName\"\n />\n </div>\n </span>\n <div\n class=\"inlineHelp\"\n v-show=\"showInlineHelp\"\n >\n <div v-html=\"$sanitize(actualInlineHelp)\"/>\n <a\n v-if=\"helpUrl\"\n rel=\"noreferrer noopener\"\n target=\"_blank\"\n class=\"readMore\"\n :href=\"helpUrl\"\n >{{ translate('General_MoreDetails') }}</a>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport {\n defineComponent,\n defineAsyncComponent,\n ref,\n} from 'vue';\nimport Matomo from '../Matomo/Matomo';\nimport Periods from '../Periods/Periods';\n\n// working around a cycle in dependencies (CoreHome depends on Feedback, Feedback depends on\n// CoreHome)\n// TODO: may need a generic solution at some point, but it's bad practice to have\n// cyclic dependencies like this. it worked before because it was individual files\n// dependening on each other, not whole plugins.\nconst RateFeature = defineAsyncComponent(() => new Promise((resolve) => {\n window.$(document).ready(() => {\n resolve((window as any).Feedback.RateFeature); // eslint-disable-line\n });\n}));\n\n/**\n * Usage:\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard</h2>\n * -> uses \"All Websites Dashboard\" as featurename\n *\n * <h2 piwik-enriched-headline feature-name=\"All Websites Dashboard\">All Websites Dashboard (Total:\n * 309 Visits)</h2>\n * -> custom featurename\n *\n * <h2 piwik-enriched-headline help-url=\"http://piwik.org/guide\">All Websites Dashboard</h2>\n * -> shows help icon and links to external url\n *\n * <h2 piwik-enriched-headline edit-url=\"index.php?module=Foo&action=bar&id=4\">All Websites\n * Dashboard</h2>\n * -> makes the headline clickable linking to the specified url\n *\n * <h2 piwik-enriched-headline inline-help=\"inlineHelp\">Pages report</h2>\n * -> inlineHelp specified via a attribute shows help icon on headline hover\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard\n * <div class=\"inlineHelp\">My <strong>inline help</strong></div>\n * </h2>\n * -> alternative definition for inline help\n * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url\n *\n * * <h2 piwik-enriched-headline report-generated=\"generated time\">Pages report</h2>\n * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which\n * activated by hover\n * -> the tooltip shows the value of the attribute\n */\nexport default defineComponent({\n props: {\n helpUrl: {\n type: String,\n default: '',\n },\n editUrl: {\n type: String,\n default: '',\n },\n reportGenerated: String,\n featureName: String,\n inlineHelp: String,\n },\n components: {\n RateFeature,\n },\n data() {\n return {\n showIcons: false,\n showInlineHelp: false,\n actualFeatureName: this.featureName,\n actualInlineHelp: this.inlineHelp,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n\n return {\n root,\n };\n },\n watch: {\n inlineHelp(newValue: string) {\n this.actualInlineHelp = newValue;\n },\n featureName(newValue: string) {\n this.actualFeatureName = newValue;\n },\n },\n mounted() {\n const { root } = this.$refs;\n\n if (!this.actualInlineHelp) {\n let helpNode = root.querySelector('.title .inlineHelp');\n if (!helpNode && root.parentElement.nextElementSibling) {\n // hack for reports :(\n helpNode = (root.parentElement.nextElementSibling as HTMLElement)\n .querySelector('.reportDocumentation');\n }\n\n if (helpNode) {\n // hackish solution to get binded html of p tag within the help node\n // at this point the ng-bind-html is not yet converted into html when report is not\n // initially loaded. Using $compile doesn't work. So get and set it manually\n const helpDocs = helpNode.getAttribute('data-content').trim();\n if (helpDocs.length) {\n this.actualInlineHelp = `<p>${helpDocs}</p>`;\n setTimeout(() => helpNode.remove(), 0);\n }\n }\n }\n\n if (!this.actualFeatureName) {\n this.actualFeatureName = root.querySelector('.title').textContent;\n }\n\n if (this.reportGenerated\n && Periods.parse(Matomo.period, Matomo.currentDateString).containsToday()\n ) {\n window.$(root.querySelector('.report-generated')).tooltip({\n track: true,\n content: this.reportGenerated,\n items: 'div',\n show: false,\n hide: false,\n });\n }\n },\n});\n</script>\n","\nimport {\n defineComponent,\n defineAsyncComponent,\n ref,\n} from 'vue';\nimport Matomo from '../Matomo/Matomo';\nimport Periods from '../Periods/Periods';\n\n// working around a cycle in dependencies (CoreHome depends on Feedback, Feedback depends on\n// CoreHome)\n// TODO: may need a generic solution at some point, but it's bad practice to have\n// cyclic dependencies like this. it worked before because it was individual files\n// dependening on each other, not whole plugins.\nconst RateFeature = defineAsyncComponent(() => new Promise((resolve) => {\n window.$(document).ready(() => {\n resolve((window as any).Feedback.RateFeature); // eslint-disable-line\n });\n}));\n\n/**\n * Usage:\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard</h2>\n * -> uses \"All Websites Dashboard\" as featurename\n *\n * <h2 piwik-enriched-headline feature-name=\"All Websites Dashboard\">All Websites Dashboard (Total:\n * 309 Visits)</h2>\n * -> custom featurename\n *\n * <h2 piwik-enriched-headline help-url=\"http://piwik.org/guide\">All Websites Dashboard</h2>\n * -> shows help icon and links to external url\n *\n * <h2 piwik-enriched-headline edit-url=\"index.php?module=Foo&action=bar&id=4\">All Websites\n * Dashboard</h2>\n * -> makes the headline clickable linking to the specified url\n *\n * <h2 piwik-enriched-headline inline-help=\"inlineHelp\">Pages report</h2>\n * -> inlineHelp specified via a attribute shows help icon on headline hover\n *\n * <h2 piwik-enriched-headline>All Websites Dashboard\n * <div class=\"inlineHelp\">My <strong>inline help</strong></div>\n * </h2>\n * -> alternative definition for inline help\n * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url\n *\n * * <h2 piwik-enriched-headline report-generated=\"generated time\">Pages report</h2>\n * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which\n * activated by hover\n * -> the tooltip shows the value of the attribute\n */\nexport default defineComponent({\n props: {\n helpUrl: {\n type: String,\n default: '',\n },\n editUrl: {\n type: String,\n default: '',\n },\n reportGenerated: String,\n featureName: String,\n inlineHelp: String,\n },\n components: {\n RateFeature,\n },\n data() {\n return {\n showIcons: false,\n showInlineHelp: false,\n actualFeatureName: this.featureName,\n actualInlineHelp: this.inlineHelp,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n\n return {\n root,\n };\n },\n watch: {\n inlineHelp(newValue: string) {\n this.actualInlineHelp = newValue;\n },\n featureName(newValue: string) {\n this.actualFeatureName = newValue;\n },\n },\n mounted() {\n const { root } = this.$refs;\n\n if (!this.actualInlineHelp) {\n let helpNode = root.querySelector('.title .inlineHelp');\n if (!helpNode && root.parentElement.nextElementSibling) {\n // hack for reports :(\n helpNode = (root.parentElement.nextElementSibling as HTMLElement)\n .querySelector('.reportDocumentation');\n }\n\n if (helpNode) {\n // hackish solution to get binded html of p tag within the help node\n // at this point the ng-bind-html is not yet converted into html when report is not\n // initially loaded. Using $compile doesn't work. So get and set it manually\n const helpDocs = helpNode.getAttribute('data-content').trim();\n if (helpDocs.length) {\n this.actualInlineHelp = `<p>${helpDocs}</p>`;\n setTimeout(() => helpNode.remove(), 0);\n }\n }\n }\n\n if (!this.actualFeatureName) {\n this.actualFeatureName = root.querySelector('.title').textContent;\n }\n\n if (this.reportGenerated\n && Periods.parse(Matomo.period, Matomo.currentDateString).containsToday()\n ) {\n window.$(root.querySelector('.report-generated')).tooltip({\n track: true,\n content: this.reportGenerated,\n items: 'div',\n show: false,\n hide: false,\n });\n }\n },\n});\n","import { render } from \"./EnrichedHeadline.vue?vue&type=template&id=678de864\"\nimport script from \"./EnrichedHeadline.vue?vue&type=script&lang=ts\"\nexport * from \"./EnrichedHeadline.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport createAngularJsAdapter from '../createAngularJsAdapter';\nimport EnrichedHeadline from './EnrichedHeadline.vue';\n\nexport default createAngularJsAdapter({\n component: EnrichedHeadline,\n scope: {\n helpUrl: {\n angularJsBind: '@',\n },\n editUrl: {\n angularJsBind: '@',\n },\n reportGenerated: {\n angularJsBind: '@?',\n },\n featureName: {\n angularJsBind: '@',\n },\n inlineHelp: {\n angularJsBind: '@?',\n },\n },\n directiveName: 'piwikEnrichedHeadline',\n transclude: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div class=\"card\" ref=\"root\">\n <div class=\"card-content\">\n <h2\n v-if=\"contentTitle && !actualFeature && !helpUrl && !actualHelpText\"\n class=\"card-title\"\n >{{ contentTitle }}</h2>\n <h2\n v-if=\"contentTitle && (actualFeature || helpUrl || actualHelpText)\"\n class=\"card-title\"\n >\n <EnrichedHeadline\n :feature-name=\"actualFeature\"\n :help-url=\"helpUrl\"\n :inline-help=\"actualHelpText\"\n >\n {{ contentTitle }}\n </EnrichedHeadline>\n </h2>\n <div ref=\"content\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\nimport EnrichedHeadline from '../EnrichedHeadline/EnrichedHeadline.vue';\n\nlet adminContent: HTMLElement|null = null;\n\nexport default defineComponent({\n props: {\n contentTitle: String,\n feature: String,\n helpUrl: String,\n helpText: String,\n anchor: String,\n },\n components: {\n EnrichedHeadline,\n },\n data() {\n return {\n actualFeature: this.feature,\n actualHelpText: this.helpText,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n const content = ref<HTMLElement>(null);\n\n return {\n root,\n content,\n };\n },\n watch: {\n feature(newValue: string) {\n this.actualFeature = newValue;\n },\n helpText(newValue: string) {\n this.actualHelpText = newValue;\n },\n },\n mounted() {\n const { root, content } = this.$refs;\n\n if (this.anchor) {\n const anchorElement = document.createElement('a');\n anchorElement.id = this.anchor;\n root.parentElement.prepend(anchorElement);\n }\n\n setTimeout(() => {\n const inlineHelp = content.querySelector('.contentHelp');\n if (inlineHelp) {\n this.actualHelpText = inlineHelp.innerHTML;\n inlineHelp.remove();\n }\n }, 0);\n\n if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) {\n this.actualFeature = this.contentTitle;\n }\n\n if (adminContent === null) {\n // cache admin node for further content blocks\n adminContent = document.querySelector('#content.admin');\n }\n\n let contentTopPosition: number;\n if (adminContent) {\n contentTopPosition = adminContent.offsetTop;\n }\n\n if (contentTopPosition || contentTopPosition === 0) {\n const parents = root.closest('[piwik-widget-loader]');\n\n // when shown within the widget loader, we need to get the offset of that element\n // as the widget loader might be still shown. Would otherwise not position correctly\n // the widgets on the admin home page\n const topThis = parents ? parents.offsetTop : root.offsetTop;\n\n if (topThis - contentTopPosition < 17) {\n // we make sure to display the first card with no margin-top to have it on same as line as\n // navigation\n root.style.marginTop = 0;\n }\n }\n },\n});\n</script>\n","\nimport { defineComponent, ref } from 'vue';\nimport EnrichedHeadline from '../EnrichedHeadline/EnrichedHeadline.vue';\n\nlet adminContent: HTMLElement|null = null;\n\nexport default defineComponent({\n props: {\n contentTitle: String,\n feature: String,\n helpUrl: String,\n helpText: String,\n anchor: String,\n },\n components: {\n EnrichedHeadline,\n },\n data() {\n return {\n actualFeature: this.feature,\n actualHelpText: this.helpText,\n };\n },\n setup() {\n const root = ref<HTMLElement>(null);\n const content = ref<HTMLElement>(null);\n\n return {\n root,\n content,\n };\n },\n watch: {\n feature(newValue: string) {\n this.actualFeature = newValue;\n },\n helpText(newValue: string) {\n this.actualHelpText = newValue;\n },\n },\n mounted() {\n const { root, content } = this.$refs;\n\n if (this.anchor) {\n const anchorElement = document.createElement('a');\n anchorElement.id = this.anchor;\n root.parentElement.prepend(anchorElement);\n }\n\n setTimeout(() => {\n const inlineHelp = content.querySelector('.contentHelp');\n if (inlineHelp) {\n this.actualHelpText = inlineHelp.innerHTML;\n inlineHelp.remove();\n }\n }, 0);\n\n if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) {\n this.actualFeature = this.contentTitle;\n }\n\n if (adminContent === null) {\n // cache admin node for further content blocks\n adminContent = document.querySelector('#content.admin');\n }\n\n let contentTopPosition: number;\n if (adminContent) {\n contentTopPosition = adminContent.offsetTop;\n }\n\n if (contentTopPosition || contentTopPosition === 0) {\n const parents = root.closest('[piwik-widget-loader]');\n\n // when shown within the widget loader, we need to get the offset of that element\n // as the widget loader might be still shown. Would otherwise not position correctly\n // the widgets on the admin home page\n const topThis = parents ? parents.offsetTop : root.offsetTop;\n\n if (topThis - contentTopPosition < 17) {\n // we make sure to display the first card with no margin-top to have it on same as line as\n // navigation\n root.style.marginTop = 0;\n }\n }\n },\n});\n","import { render } from \"./ContentBlock.vue?vue&type=template&id=5f6844c4\"\nimport script from \"./ContentBlock.vue?vue&type=script&lang=ts\"\nexport * from \"./ContentBlock.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport createAngularJsAdapter from '../createAngularJsAdapter';\nimport ContentBlock from './ContentBlock.vue';\n\nexport default createAngularJsAdapter({\n component: ContentBlock,\n scope: {\n contentTitle: {\n angularJsBind: '@',\n },\n feature: {\n angularJsBind: '@',\n },\n helpUrl: {\n angularJsBind: '@',\n },\n helpText: {\n angularJsBind: '@',\n },\n anchor: {\n angularJsBind: '@?',\n },\n },\n directiveName: 'piwikContentBlock',\n transclude: true,\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div v-show=\"loading\" class=\"loadingPiwik\">\n <img src=\"plugins/Morpheus/images/loading-blue.gif\" alt=\"\"/>\n <span>{{ loadingMessage }}</span>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n props: {\n loading: {\n type: Boolean,\n required: true,\n default: false,\n },\n loadingMessage: {\n type: String,\n required: false,\n default: translate('General_LoadingData'),\n },\n },\n});\n","import { render } from \"./ActivityIndicator.vue?vue&type=template&id=6af4d064\"\nimport script from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nexport * from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport ActivityIndicator from './ActivityIndicator.vue';\nimport translate from '../translate';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: ActivityIndicator,\n scope: {\n loading: {\n vue: 'loading',\n angularJsBind: '<',\n },\n loadingMessage: {\n vue: 'loadingMessage',\n angularJsBind: '<',\n default: () => translate('General_LoadingData'),\n },\n },\n $inject: [],\n directiveName: 'piwikActivityIndicator',\n});\n","<!--\n Matomo - free/libre analytics platform\n\n @link https://matomo.org\n @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n <div\n class=\"alert\"\n :class=\"{ [`alert-${severity}`]: true }\"\n >\n <slot></slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n severity: {\n type: String,\n required: true,\n },\n },\n});\n","import { render } from \"./Alert.vue?vue&type=template&id=c3863ae2\"\nimport script from \"./Alert.vue?vue&type=script&lang=ts\"\nexport * from \"./Alert.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Alert from './Alert.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n component: Alert,\n scope: {\n severity: {\n vue: 'severity',\n angularJsBind: '@piwikAlert',\n },\n },\n directiveName: 'piwikAlert',\n transclude: true,\n});\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts index c4e61b2ad5..15088322d7 100644 --- a/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts +++ b/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts @@ -143,6 +143,14 @@ export default class AjaxHelper { defaultParams = ['idSite', 'period', 'date', 'segment']; + // helper method entry point + static fetch(params: Parameters): JQuery.jqXHR { + const helper = new AjaxHelper(); + helper.setFormat('json'); + helper.addParams(params, 'get'); + return helper.send(); + } + constructor() { this.errorCallback = defaultErrorCallback; } diff --git a/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts new file mode 100644 index 0000000000..8bdbf2e300 --- /dev/null +++ b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.adapter.ts @@ -0,0 +1,32 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +import createAngularJsAdapter from '../createAngularJsAdapter'; +import ContentBlock from './ContentBlock.vue'; + +export default createAngularJsAdapter({ + component: ContentBlock, + scope: { + contentTitle: { + angularJsBind: '@', + }, + feature: { + angularJsBind: '@', + }, + helpUrl: { + angularJsBind: '@', + }, + helpText: { + angularJsBind: '@', + }, + anchor: { + angularJsBind: '@?', + }, + }, + directiveName: 'piwikContentBlock', + transclude: true, +}); diff --git a/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue new file mode 100644 index 0000000000..47774a4f39 --- /dev/null +++ b/plugins/CoreHome/vue/src/ContentBlock/ContentBlock.vue @@ -0,0 +1,120 @@ +<!-- + 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="card" ref="root"> + <div class="card-content"> + <h2 + v-if="contentTitle && !actualFeature && !helpUrl && !actualHelpText" + class="card-title" + >{{ contentTitle }}</h2> + <h2 + v-if="contentTitle && (actualFeature || helpUrl || actualHelpText)" + class="card-title" + > + <EnrichedHeadline + :feature-name="actualFeature" + :help-url="helpUrl" + :inline-help="actualHelpText" + > + {{ contentTitle }} + </EnrichedHeadline> + </h2> + <div ref="content"> + <slot /> + </div> + </div> + </div> +</template> + +<script lang="ts"> +import { defineComponent, ref } from 'vue'; +import EnrichedHeadline from '../EnrichedHeadline/EnrichedHeadline.vue'; + +let adminContent: HTMLElement|null = null; + +export default defineComponent({ + props: { + contentTitle: String, + feature: String, + helpUrl: String, + helpText: String, + anchor: String, + }, + components: { + EnrichedHeadline, + }, + data() { + return { + actualFeature: this.feature, + actualHelpText: this.helpText, + }; + }, + setup() { + const root = ref<HTMLElement>(null); + const content = ref<HTMLElement>(null); + + return { + root, + content, + }; + }, + watch: { + feature(newValue: string) { + this.actualFeature = newValue; + }, + helpText(newValue: string) { + this.actualHelpText = newValue; + }, + }, + mounted() { + const { root, content } = this.$refs; + + if (this.anchor) { + const anchorElement = document.createElement('a'); + anchorElement.id = this.anchor; + root.parentElement.prepend(anchorElement); + } + + setTimeout(() => { + const inlineHelp = content.querySelector('.contentHelp'); + if (inlineHelp) { + this.actualHelpText = inlineHelp.innerHTML; + inlineHelp.remove(); + } + }, 0); + + if (this.actualFeature && (this.actualFeature === true || this.actualFeature === 'true')) { + this.actualFeature = this.contentTitle; + } + + if (adminContent === null) { + // cache admin node for further content blocks + adminContent = document.querySelector('#content.admin'); + } + + let contentTopPosition: number; + if (adminContent) { + contentTopPosition = adminContent.offsetTop; + } + + if (contentTopPosition || contentTopPosition === 0) { + const parents = root.closest('[piwik-widget-loader]'); + + // when shown within the widget loader, we need to get the offset of that element + // as the widget loader might be still shown. Would otherwise not position correctly + // the widgets on the admin home page + const topThis = parents ? parents.offsetTop : root.offsetTop; + + if (topThis - contentTopPosition < 17) { + // we make sure to display the first card with no margin-top to have it on same as line as + // navigation + root.style.marginTop = 0; + } + } + }, +}); +</script> diff --git a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts new file mode 100644 index 0000000000..e730605e59 --- /dev/null +++ b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.adapter.ts @@ -0,0 +1,32 @@ +/*! + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +import createAngularJsAdapter from '../createAngularJsAdapter'; +import EnrichedHeadline from './EnrichedHeadline.vue'; + +export default createAngularJsAdapter({ + component: EnrichedHeadline, + scope: { + helpUrl: { + angularJsBind: '@', + }, + editUrl: { + angularJsBind: '@', + }, + reportGenerated: { + angularJsBind: '@?', + }, + featureName: { + angularJsBind: '@', + }, + inlineHelp: { + angularJsBind: '@?', + }, + }, + directiveName: 'piwikEnrichedHeadline', + transclude: true, +}); diff --git a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less index 878372c857..e2ee9dd5d9 100644 --- a/plugins/CoreHome/angularjs/enrichedheadline/enrichedheadline.directive.less +++ b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.less @@ -48,12 +48,14 @@ .ratingIcons { display: inline-block; vertical-align: middle; + margin-left: 6px; } .helpIcon { cursor: pointer; display: inline-block; - margin: 0 0 -1px 4px; + margin-bottom: -1px; + margin-left: 8px; opacity: 0.4; font-size: 16px; color: @theme-color-text-light !important; diff --git a/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue new file mode 100644 index 0000000000..f9452ac24f --- /dev/null +++ b/plugins/CoreHome/vue/src/EnrichedHeadline/EnrichedHeadline.vue @@ -0,0 +1,201 @@ +<!-- + 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="enrichedHeadline" + v-on:mouseenter="showIcons = true" + v-on:mouseleave="showIcons = false" + ref="root" + > + <div + v-if="!editUrl" + class="title" + tabindex="6" + > + <slot /> + </div> + <a + v-if="editUrl" + class="title" + :href="editUrl" + :title="translate('CoreHome_ClickToEditX', $sanitize(actualFeatureName))" + > + <slot /> + </a> + <span + v-show="showIcons || showInlineHelp" + class="iconsBar" + > + <a + v-if="helpUrl && !actualInlineHelp" + rel="noreferrer noopener" + target="_blank" + class="helpIcon" + :href="helpUrl" + :title="translate('CoreHome_ExternalHelp')" + ><span class="icon-help" /></a> + <a + v-if="actualInlineHelp" + v-on:click="showInlineHelp = !showInlineHelp" + class="helpIcon" + :class="{ 'active': showInlineHelp }" + :title="translate(reportGenerated ? 'General_HelpReport' : 'General_Help')" + ><span class="icon-info" /></a> + <div class="ratingIcons"> + <RateFeature + :title="actualFeatureName" + /> + </div> + </span> + <div + class="inlineHelp" + v-show="showInlineHelp" + > + <div v-html="$sanitize(actualInlineHelp)"/> + <a + v-if="helpUrl" + rel="noreferrer noopener" + target="_blank" + class="readMore" + :href="helpUrl" + >{{ translate('General_MoreDetails') }}</a> + </div> + </div> +</template> + +<script lang="ts"> +import { + defineComponent, + defineAsyncComponent, + ref, +} from 'vue'; +import Matomo from '../Matomo/Matomo'; +import Periods from '../Periods/Periods'; + +// working around a cycle in dependencies (CoreHome depends on Feedback, Feedback depends on +// CoreHome) +// TODO: may need a generic solution at some point, but it's bad practice to have +// cyclic dependencies like this. it worked before because it was individual files +// dependening on each other, not whole plugins. +const RateFeature = defineAsyncComponent(() => new Promise((resolve) => { + window.$(document).ready(() => { + resolve((window as any).Feedback.RateFeature); // eslint-disable-line + }); +})); + +/** + * Usage: + * + * <h2 piwik-enriched-headline>All Websites Dashboard</h2> + * -> uses "All Websites Dashboard" as featurename + * + * <h2 piwik-enriched-headline feature-name="All Websites Dashboard">All Websites Dashboard (Total: + * 309 Visits)</h2> + * -> custom featurename + * + * <h2 piwik-enriched-headline help-url="http://piwik.org/guide">All Websites Dashboard</h2> + * -> shows help icon and links to external url + * + * <h2 piwik-enriched-headline edit-url="index.php?module=Foo&action=bar&id=4">All Websites + * Dashboard</h2> + * -> makes the headline clickable linking to the specified url + * + * <h2 piwik-enriched-headline inline-help="inlineHelp">Pages report</h2> + * -> inlineHelp specified via a attribute shows help icon on headline hover + * + * <h2 piwik-enriched-headline>All Websites Dashboard + * <div class="inlineHelp">My <strong>inline help</strong></div> + * </h2> + * -> alternative definition for inline help + * -> shows help icon to display inline help on click. Note: You can combine inlinehelp and help-url + * + * * <h2 piwik-enriched-headline report-generated="generated time">Pages report</h2> + * -> reportGenerated specified via this attribute shows a clock icon with a tooltip which + * activated by hover + * -> the tooltip shows the value of the attribute + */ +export default defineComponent({ + props: { + helpUrl: { + type: String, + default: '', + }, + editUrl: { + type: String, + default: '', + }, + reportGenerated: String, + featureName: String, + inlineHelp: String, + }, + components: { + RateFeature, + }, + data() { + return { + showIcons: false, + showInlineHelp: false, + actualFeatureName: this.featureName, + actualInlineHelp: this.inlineHelp, + }; + }, + setup() { + const root = ref<HTMLElement>(null); + + return { + root, + }; + }, + watch: { + inlineHelp(newValue: string) { + this.actualInlineHelp = newValue; + }, + featureName(newValue: string) { + this.actualFeatureName = newValue; + }, + }, + mounted() { + const { root } = this.$refs; + + if (!this.actualInlineHelp) { + let helpNode = root.querySelector('.title .inlineHelp'); + if (!helpNode && root.parentElement.nextElementSibling) { + // hack for reports :( + helpNode = (root.parentElement.nextElementSibling as HTMLElement) + .querySelector('.reportDocumentation'); + } + + if (helpNode) { + // hackish solution to get binded html of p tag within the help node + // at this point the ng-bind-html is not yet converted into html when report is not + // initially loaded. Using $compile doesn't work. So get and set it manually + const helpDocs = helpNode.getAttribute('data-content').trim(); + if (helpDocs.length) { + this.actualInlineHelp = `<p>${helpDocs}</p>`; + setTimeout(() => helpNode.remove(), 0); + } + } + } + + if (!this.actualFeatureName) { + this.actualFeatureName = root.querySelector('.title').textContent; + } + + if (this.reportGenerated + && Periods.parse(Matomo.period, Matomo.currentDateString).containsToday() + ) { + window.$(root.querySelector('.report-generated')).tooltip({ + track: true, + content: this.reportGenerated, + items: 'div', + show: false, + hide: false, + }); + } + }, +}); +</script> diff --git a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts index 0b318173e7..659bcaa97e 100644 --- a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts +++ b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts @@ -14,36 +14,35 @@ export default createAngularJsAdapter<[IParseService]>({ component: MatomoDialog, scope: { show: { - vue: 'show', + vue: 'modelValue', default: false, }, element: { - vue: 'element', default: (scope, element) => element[0], }, }, events: { - yes: (scope, element, attrs) => { + yes: ($event, scope, element, attrs) => { if (attrs.yes) { scope.$eval(attrs.yes); setTimeout(() => { scope.$apply(); }, 0); } }, - no: (scope, element, attrs) => { + no: ($event, scope, element, attrs) => { if (attrs.no) { scope.$eval(attrs.no); setTimeout(() => { scope.$apply(); }, 0); } }, - close: (scope, element, attrs) => { + close: ($event, scope, element, attrs) => { if (attrs.close) { scope.$eval(attrs.close); setTimeout(() => { scope.$apply(); }, 0); } }, - closeEnd: (scope, element, attrs, $parse: IParseService) => { + 'update:modelValue': (newValue, scope, element, attrs, $parse: IParseService) => { setTimeout(() => { - scope.$apply($parse(attrs.piwikDialog).assign(scope, false)); + scope.$apply($parse(attrs.piwikDialog).assign(scope, newValue)); }, 0); }, }, @@ -56,8 +55,10 @@ export default createAngularJsAdapter<[IParseService]>({ return vueRootPlaceholder[0]; }, postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => { - scope.$watch(attrs.piwikDialog, (newValue: boolean) => { - vm.show = newValue || false; + scope.$watch(attrs.piwikDialog, (newValue: boolean, oldValue: boolean) => { + if (oldValue !== newValue) { + vm.modelValue = newValue || false; + } }); }, noScope: true, diff --git a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue index 5a46841cbf..779b0c155c 100644 --- a/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue +++ b/plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue @@ -5,10 +5,12 @@ @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later --> <template> - <slot></slot> + <div v-show="modelValue" ref="root"> + <slot></slot> + </div> </template> <script lang="ts"> -import { defineComponent } from 'vue'; +import { defineComponent, ref } from 'vue'; import Matomo from '../Matomo/Matomo'; export default defineComponent({ @@ -16,7 +18,7 @@ export default defineComponent({ /** * Whether the modal is displayed or not; */ - show: { + modelValue: { type: Boolean, required: true, }, @@ -33,20 +35,33 @@ export default defineComponent({ required: false, }, }, - emits: ['yes', 'no', 'closeEnd', 'close'], + emits: ['yes', 'no', 'closeEnd', 'close', 'update:modelValue'], + setup() { + const root = ref(null); + + return { + root, + }; + }, activated() { - const slotElement = this.element || this.$slots.default()[0].el; - slotElement.style.display = 'none'; + this.$emit('update:modelValue', false); }, watch: { - show(newValue, oldValue) { + modelValue(newValue, oldValue) { if (newValue) { - const slotElement = this.element || this.$slots.default()[0].el; + const slotElement = this.element || this.$refs.root.firstElementChild; Matomo.helper.modalConfirm(slotElement, { yes: () => { this.$emit('yes'); }, no: () => { this.$emit('no'); }, }, { - onCloseEnd: () => { this.$emit('closeEnd'); }, + onCloseEnd: () => { + // materialize removes the child element, so we move it back to the slot + if (!this.element) { + this.$refs.root.appendChild(slotElement); + } + this.$emit('update:modelValue', false); + this.$emit('closeEnd'); + }, }); } else if (newValue === false && oldValue === true) { // the user closed the dialog, e.g. by pressing Esc or clicking away from it diff --git a/plugins/CoreHome/vue/src/createAngularJsAdapter.ts b/plugins/CoreHome/vue/src/createAngularJsAdapter.ts index 9d7ba86cea..f15822bfbc 100644 --- a/plugins/CoreHome/vue/src/createAngularJsAdapter.ts +++ b/plugins/CoreHome/vue/src/createAngularJsAdapter.ts @@ -11,9 +11,10 @@ import { ref, ComponentPublicInstance, } from 'vue'; +import translate from './translate'; interface SingleScopeVarInfo { - vue: string; + vue?: string; default?: any; // eslint-disable-line angularJsBind?: string; } @@ -27,6 +28,14 @@ type AdapterFunction<InjectTypes, R = void> = ( ...injected: InjectTypes, ) => R; +type EventAdapterFunction<InjectTypes, R = void> = ( + $event: any, // eslint-disable-line + scope: ng.IScope, + element: ng.IAugmentedJQuery, + attrs: ng.IAttributes, + ...injected: InjectTypes, +) => R; + type PostCreateFunction<InjectTypes, R = void> = ( vm: ComponentPublicInstance, scope: ng.IScope, @@ -35,10 +44,12 @@ type PostCreateFunction<InjectTypes, R = void> = ( ...injected: InjectTypes, ) => R; -type EventMapping<InjectTypes> = { [vueEventName: string]: AdapterFunction<InjectTypes> }; +type EventMapping<InjectTypes> = { [vueEventName: string]: EventAdapterFunction<InjectTypes> }; type ComponentType = ReturnType<typeof defineComponent>; +let transcludeCounter = 0; + export default function createAngularJsAdapter<InjectTypes = []>(options: { component: ComponentType, scope?: ScopeMapping, @@ -62,8 +73,16 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { noScope, } = options; + const currentTranscludeCounter = transcludeCounter; + if (transclude) { + transcludeCounter += 1; + } + const angularJsScope = {}; Object.entries(scope).forEach(([scopeVarName, info]) => { + if (!info.vue) { + info.vue = scopeVarName; + } if (info.angularJsBind) { angularJsScope[scopeVarName] = info.angularJsBind; } @@ -80,7 +99,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { ngElement: ng.IAugmentedJQuery, ngAttrs: ng.IAttributes, ) { - const clone = ngElement.find('[ng-transclude]'); + const clone = transclude ? ngElement.find(`[ng-transclude][counter=${currentTranscludeCounter}]`) : null; let rootVueTemplate = '<root-component'; Object.entries(scope).forEach(([, info]) => { @@ -88,7 +107,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { }); Object.entries(events).forEach((info) => { const [eventName] = info; - rootVueTemplate += ` @${eventName}="onEventHandler('${eventName}')"`; + rootVueTemplate += ` @${eventName}="onEventHandler('${eventName}', $event)"`; }); rootVueTemplate += '>'; if (transclude) { @@ -121,14 +140,15 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { return undefined; }, methods: { - onEventHandler(name: string) { + onEventHandler(name: string, $event: any) { // eslint-disable-line if (events[name]) { - events[name](ngScope, ngElement, ngAttrs, ...injectedServices); + events[name]($event, ngScope, ngElement, ngAttrs, ...injectedServices); } }, }, }); app.config.globalProperties.$sanitize = window.vueSanitize; + app.config.globalProperties.translate = translate; app.component('root-component', component); const mountPoint = mountPointFactory @@ -166,7 +186,7 @@ export default function createAngularJsAdapter<InjectTypes = []>(options: { if (transclude) { adapter.transclude = true; - adapter.template = '<div ng-transclude/>'; + adapter.template = `<div ng-transclude counter="${currentTranscludeCounter}"/>`; } return adapter; diff --git a/plugins/CoreHome/vue/src/index.ts b/plugins/CoreHome/vue/src/index.ts index 388204a6bd..fdc9743f57 100644 --- a/plugins/CoreHome/vue/src/index.ts +++ b/plugins/CoreHome/vue/src/index.ts @@ -18,6 +18,8 @@ import './AjaxHelper/AjaxHelper.adapter'; import './PiwikUrl/PiwikUrl.adapter'; import './Piwik/Piwik.adapter'; import './MatomoDialog/MatomoDialog.adapter'; +import './EnrichedHeadline/EnrichedHeadline.adapter'; +import './ContentBlock/ContentBlock.adapter'; export { default as createAngularJsAdapter } from './createAngularJsAdapter'; export { default as activityIndicatorAdapter } from './ActivityIndicator/ActivityIndicator.adapter'; @@ -29,3 +31,5 @@ export { default as MatomoUrl } from './MatomoUrl/MatomoUrl'; export { default as Matomo } from './Matomo/Matomo'; export * from './Periods'; export { default as MatomoDialog } from './MatomoDialog/MatomoDialog.vue'; +export { default as EnrichedHeadline } from './EnrichedHeadline/EnrichedHeadline.vue'; +export { default as ContentBlock } from './ContentBlock/ContentBlock.vue'; diff --git a/plugins/CoreHome/vue/src/translate.ts b/plugins/CoreHome/vue/src/translate.ts index 0f543432de..317b5a8751 100644 --- a/plugins/CoreHome/vue/src/translate.ts +++ b/plugins/CoreHome/vue/src/translate.ts @@ -5,6 +5,14 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -export default function translate(translationStringId: string, values: string[] = []): string { - return window._pk_translate(translationStringId, values); // eslint-disable-line +export default function translate( + translationStringId: string, + ...values: string[]|string[][] +): string { + let pkArgs = values as string[]; + // handle variadic args AND single array of values (to match _pk_translate signature) + if (values.length === 1 && values[0] && values[0] instanceof Array) { + [pkArgs] = values as string[][]; + } + return window._pk_translate(translationStringId, pkArgs); // eslint-disable-line } |