(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CustomVariables"]=t(require("CoreHome"),require("vue")):e["CustomVariables"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){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/CustomVariables/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ManageCustomVarsStore",(function(){return j})),n.d(t,"ManageCustomVars",(function(){return H})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var o=n("8bbf"),l=n("19dc");function i(e,t){return m(e)||b(e,t)||s(e,t)||c()}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}))}},{key:"fetchUsages",value:function(){var e=this;return this.privateState.isLoading=!0,Promise.all([this.fetchCustomVariables(),l["AjaxHelper"].fetch({method:"CustomVariables.getUsagesOfSlots",filter_limit:"-1"})]).then((function(t){var n=i(t,2),r=n[1];e.privateState.customVariables=r,r.forEach((function(t){t.index>e.state.value.numSlotsAvailable&&(e.privateState.numSlotsAvailable=t.index),t.usages&&t.usages.length>0&&(e.privateState.hasAtLeastOneUsage=!0)}))})).finally((function(){e.privateState.isLoading=!1}))}}]),e}(),j=new O,h={class:"manageCustomVars"},g=["innerHTML"],y={class:"index"},V=["title"],C={key:0},S=Object(o["createElementVNode"])("br",null,null,-1),E=Object(o["createElementVNode"])("br",null,null,-1),N=["innerHTML"],w=Object(o["createElementVNode"])("br",null,null,-1),x=Object(o["createElementVNode"])("br",null,null,-1),_=Object(o["createElementVNode"])("br",null,null,-1),k=["textContent"];function A(e,t,n,r,a,l){var i=Object(o["resolveComponent"])("EnrichedHeadline"),c=Object(o["resolveComponent"])("ContentBlock"),s=Object(o["resolveDirective"])("content-intro"),u=Object(o["resolveDirective"])("content-table"),b=Object(o["resolveDirective"])("select-on-focus");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",h,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(i,{"help-url":"https://matomo.org/docs/custom-variables/"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("CustomVariables_CustomVariables")),1)]})),_:1})]),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("CustomVariables_ManageDescription",e.siteName))},null,8,g)])],512),[[s]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",{class:"alert alert-info"},Object(o["toDisplayString"])(e.translate("CustomVariables_SlotsReportIsGeneratedOverTime")),513),[[o["vShow"],!e.isLoading&&e.hasCustomVariablesInGeneral&&!e.hasAtLeastOneUsage]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.scopes,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t.name},[Object(o["createVNode"])(c,{"content-title":e.translate("CustomVariables_ScopeX",t.name)},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("CustomVariables_Index")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("CustomVariables_Usages")),1)])]),Object(o["createElementVNode"])("tbody",null,[Object(o["createElementVNode"])("tr",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("td",{colspan:"3"},Object(o["toDisplayString"])(e.translate("General_Loading")),513),[[o["vShow"],e.isLoading]])]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.customVariablesByScope[t.value],(function(t,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:n},[Object(o["createElementVNode"])("td",y,Object(o["toDisplayString"])(t.index),1),Object(o["createElementVNode"])("td",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"unused"},Object(o["toDisplayString"])(e.translate("CustomVariables_Unused")),513),[[o["vShow"],0===t.usages.length]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sortUsages(t),(function(n,r){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:r},[Object(o["createElementVNode"])("span",{title:e.translate("CustomVariables_UsageDetails",n.nb_visits?n.nb_visits:0,n.nb_actions?n.nb_actions:0)},Object(o["toDisplayString"])(n.name),9,V),re.length)&&(t=e.length);for(var n=0,r=new Array(t);n".concat(this.numSlotsAvailable,""))},setMaxCustomVariablesCmd:function(){return"./console customvariables:set-max-custom-variables ".concat(this.numSlotsAvailable+1)}}});U.render=A;var H=U; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */}})})); //# sourceMappingURL=CustomVariables.umd.min.js.map