diff options
7 files changed, 59 insertions, 22 deletions
diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js index cd2b53bbd0..6c8db6a878 100644 --- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js +++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js @@ -340,13 +340,13 @@ function getCheckboxStates(availableOptions, modelValue) { FieldCheckboxArrayvue_type_script_lang_ts.render = FieldCheckboxArrayvue_type_template_id_b01b8bfc_render /* harmony default export */ var FieldCheckboxArray = (FieldCheckboxArrayvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=674e15fa +// 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/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=c33fad48 -var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_1 = { +var FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_1 = { class: "expandableSelector" }; -var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("svg", { +var FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("svg", { class: "caret", height: "24", viewBox: "0 0 24 24", @@ -359,11 +359,11 @@ var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_2 = /*#__PURE__*/ fill: "none" })], -1); -var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_3 = ["value"]; -var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_4 = { +var FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_3 = ["value"]; +var FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_4 = { class: "expandableList z-depth-2" }; -var FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_5 = { +var FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_5 = { class: "searchContainer" }; var _hoisted_6 = { @@ -378,22 +378,22 @@ var _hoisted_10 = { class: "primary-content" }; var _hoisted_11 = ["title"]; -function FieldExpandableSelectvue_type_template_id_674e15fa_render(_ctx, _cache, $props, $setup, $data, $options) { +function FieldExpandableSelectvue_type_template_id_c33fad48_render(_ctx, _cache, $props, $setup, $data, $options) { var _directive_focus_if = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-if"); var _directive_focus_anywhere_but_here = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("focus-anywhere-but-here"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + 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", FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.showSelect = !_ctx.showSelect; }), class: "select-wrapper" - }, [FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, [FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", class: "select-dropdown", readonly: "readonly", value: _ctx.modelValueText - }, null, 8, FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_3)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_674e15fa_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_3)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", FieldExpandableSelectvue_type_template_id_c33fad48_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "text", placeholder: "Search", "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { @@ -415,7 +415,7 @@ function FieldExpandableSelectvue_type_template_id_674e15fa_render(_ctx, _cache, "icon-arrow-bottom": _ctx.showCategory === options.group }]) }, null, 2)], 8, _hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", _hoisted_8, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(options.values.filter(function (x) { - return x.value.indexOf(_ctx.searchTerm) !== -1; + return x.value.toLowerCase().indexOf(_ctx.searchTerm.toLowerCase()) !== -1; }), function (children) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "expandableListItem collection-item valign-wrapper", @@ -428,13 +428,13 @@ function FieldExpandableSelectvue_type_template_id_674e15fa_render(_ctx, _cache, class: "secondary-content icon-help" }, null, 8, _hoisted_11), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], children.tooltip]])], 8, _hoisted_9); }), 128))], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showCategory === options.group || _ctx.searchTerm]])], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], options.values.filter(function (x) { - return x.value.indexOf(_ctx.searchTerm) !== -1; + return x.value.toLowerCase().indexOf(_ctx.searchTerm.toLowerCase()) !== -1; }).length]]); }), 128))])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.showSelect]])], 512)), [[_directive_focus_anywhere_but_here, { blur: _ctx.onBlur }]]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=674e15fa +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=template&id=c33fad48 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue?vue&type=script&lang=ts @@ -541,7 +541,7 @@ function getAvailableOptions(availableValues) { -FieldExpandableSelectvue_type_script_lang_ts.render = FieldExpandableSelectvue_type_template_id_674e15fa_render +FieldExpandableSelectvue_type_script_lang_ts.render = FieldExpandableSelectvue_type_template_id_c33fad48_render /* harmony default export */ var FieldExpandableSelect = (FieldExpandableSelectvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/FormField/FieldFieldArray.vue?vue&type=template&id=19925759 diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js index cdbca000c7..7cbebdd232 100644 --- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js +++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js @@ -1,22 +1,22 @@ -(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["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/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,"FormField",(function(){return Lt})),n.d(t,"Field",(function(){return Qt})),n.d(t,"PluginSettings",(function(){return En})),n.d(t,"PluginFilter",(function(){return Xn})),n.d(t,"PluginManagement",(function(){return Mn})),n.d(t,"PluginUpload",(function(){return Ln})),n.d(t,"SaveButton",(function(){return io})),n.d(t,"Form",(function(){return uo})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("19dc"),l=n("8bbf"),a={class:"form-group row matomo-form-field"},u={key:0,class:"col s12"},c={key:0,class:"form-help"},s={key:0,class:"inline-help",ref:"inlineHelp"},d=Object(l["createElementVNode"])("br",null,null,-1);function m(e,t,n,o,r,i){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",a,[e.formField.introduction?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h3",u,Object(l["toDisplayString"])(e.formField.introduction),1)):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.childComponent),Object(l["mergeProps"])(Object.assign(Object.assign({formField:e.formField},e.formField),{},{modelValue:e.processedModelValue,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)})}),null,16))],2),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",c,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:"form-description"},Object(l["toDisplayString"])(e.formField.description),513),[[l["vShow"],e.formField.description]]),e.formField.inlineHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",s,null,512)):Object(l["createCommentVNode"])("",!0),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",null,[d,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[l["vShow"],e.showDefaultValue]])])):Object(l["createCommentVNode"])("",!0)],2)],512)),[[l["vShow"],e.showField]])}var f={class:"checkbox"},p=["checked","id","name"],b=["innerHTML"];function v(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",f,[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes,{value:1,checked:!!e.modelValue,type:"checkbox",id:e.name,name:e.name}),null,16,p),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,b)])])}var h=Object(l["defineComponent"])({props:{modelValue:Boolean,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.modelValue!==e.target.checked&&this.$emit("update:modelValue",e.target.checked)}}});h.render=v;var g=h,O=["value","checked","onChange","id","name"];function y(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:function(t){return e.onChange(n)}},e.uiControlAttributes,{type:"checkbox",id:"".concat(e.name).concat(t.key),name:t.name}),null,16,O),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(t.description),513),[[l["vShow"],t.description]])])])})),128))])}function j(e){return S(e)||C(e)||w(e)||V()}function V(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e,t){if(e){if("string"===typeof e)return k(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)?k(e,t):void 0}}function C(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e){if(Array.isArray(e))return k(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function A(e,t){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var F=Object(l["defineComponent"])({props:{modelValue:Array,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return A(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t=j(this.checkboxStates);t[e]=!t[e];var n=this.availableOptions||{},o=[];Object.values(n).forEach((function(e,n){t[n]&&o.push(e.key)})),this.$emit("update:modelValue",o)}}});F.render=y;var B=F,E={class:"expandableSelector"},x=Object(l["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(l["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(l["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),N=["value"],T={class:"expandableList z-depth-2"},$={class:"searchContainer"},M={class:"collection firstLevel"},P=["onClick"],J={class:"collection secondLevel"},D=["onClick"],H={class:"primary-content"},I=["title"];function L(e,t,n,o,r,i){var a=Object(l["resolveDirective"])("focus-if"),u=Object(l["resolveDirective"])("focus-anywhere-but-here");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",E,[Object(l["createElementVNode"])("div",{onClick:t[0]||(t[0]=function(t){return e.showSelect=!e.showSelect}),class:"select-wrapper"},[x,Object(l["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,N)]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",T,[Object(l["createElementVNode"])("div",$,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),class:"expandableSearch browser-default"},null,512),[[l["vModelText"],e.searchTerm],[a,e.showSelect]])]),Object(l["createElementVNode"])("ul",M,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"collection-item",key:n},[Object(l["createElementVNode"])("h4",{class:"expandableListCategory",onClick:function(n){return e.onCategoryClicked(t)}},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.group)+" ",1),Object(l["createElementVNode"])("span",{class:Object(l["normalizeClass"])(["secondary-content",{"icon-arrow-right":e.showCategory!==t.group,"icon-arrow-bottom":e.showCategory===t.group}])},null,2)],8,P),Object(l["withDirectives"])(Object(l["createElementVNode"])("ul",J,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.values.filter((function(t){return-1!==t.value.indexOf(e.searchTerm)})),(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:function(n){return e.onValueClicked(t)}},[Object(l["createElementVNode"])("span",H,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,I),[[l["vShow"],t.tooltip]])],8,D)})),128))],512),[[l["vShow"],e.showCategory===t.group||e.searchTerm]])],512)),[[l["vShow"],t.values.filter((function(t){return-1!==t.value.indexOf(e.searchTerm)})).length]])})),128))])],512),[[l["vShow"],e.showSelect]])],512)),[[u,{blur:e.onBlur}]])}function z(e){var t=[];if(!e)return t;var n={};return Object.values(e).forEach((function(e){var t=e,o=t.group||"";o in n&&n[o]||(n[o]={values:[],group:o});var r={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(r.tooltip=t.tooltip),n[o].values.push(r)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var U=Object(l["defineComponent"])({props:{modelValue:[Number,String],availableOptions:Array,title:String},directives:{FocusAnywhereButHere:i["FocusAnywhereButHere"],FocusIf:i["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{modelValueText:function(){if(this.title)return this.title;var e,t=this.modelValue,n=this.availableOptions||[];return n.some((function(n){return e=n.values.find((function(e){return e.key===t})),e})),e?e.value?"".concat(e.value):"":t?"".concat(t):""}},methods:{onBlur:function(){this.showSelect=!1},onCategoryClicked:function(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked:function(e){this.$emit("update:modelValue",e.key),this.showSelect=!1}}});U.render=L;var K=U,_=["for","innerHTML"];function q(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("FieldArray");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,_),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onValueUpdate(t)}),field:e.uiControlAttributes.field},null,8,["name","model-value","field"])])}var R=Object(l["defineComponent"])({components:{FieldArray:i["FieldArray"]},props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});R.render=q;var W=R,G={class:"btn"},Z=["for","innerHTML"],Y=["name","id"],Q={class:"file-path-wrapper"},X=["value"];function ee(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",G,[Object(l["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Z),Object(l["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,Y)]),Object(l["createElementVNode"])("div",Q,[Object(l["createElementVNode"])("input",{class:"file-path validate",value:e.filePath,type:"text"},null,8,X)])])}var te=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:[String,File]},inheritAttrs:!1,emits:["update:modelValue"],watch:{modelValue:function(e){if(!e||""===e){var t=this.$refs.fileInput;t.value=""}}},methods:{onChange:function(e){var t=e.target.files;if(t){var n=t.item(0);this.$emit("update:modelValue",n)}}},computed:{filePath:function(){if(this.modelValue instanceof File)return this.$refs.fileInput.value}}});te.render=ee;var ne=te,oe=["type","name","value"];function re(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("input",{type:e.uiControl,name:e.name,value:e.modelValue,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,oe)])}var ie=Object(l["defineComponent"])({props:{modelValue:null,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});ie.render=re;var le=ie,ae={class:"fieldMultiTuple"},ue=["for","innerHTML"];function ce(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("MultiPairField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",ae,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ue),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","field1","field2","field3","field4"])])}var se=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:i["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});se.render=ce;var de=se,me=["type","id","name","value"],fe=["for","innerHTML"];function pe(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:(e.modelValue||"").toString(),onKeydown:t[0]||(t[0]=function(t){return e.onChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),null,16,me),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,fe)],64)}var be=Object(l["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(i["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=parseFloat(e.target.value);this.$emit("update:modelValue",t)}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}}});be.render=pe;var ve=be,he=["value","id","name","disabled","checked"];function ge(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions||[],(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=function(t){return e.onChange(t)}),type:"radio",id:"".concat(e.name).concat(n.key),name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||"".concat(e.modelValue)===n.key}),null,16,he),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(n.value)+" ",1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(n.description),513),[[l["vShow"],n.description]])])])])})),128))])}var Oe=Object(l["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number]},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});Oe.render=ge;var ye=Oe;function je(e,t){return ke(e)||Se(e,t)||we(e,t)||Ve()}function Ve(){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 we(e,t){if(e){if("string"===typeof e)return Ce(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)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Se(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function ke(e){if(Array.isArray(e))return e}var Ae={key:0,class:"matomo-field-select"},Fe=["multiple","name"],Be=["label"],Ee=["value","selected","disabled"],xe=["for","innerHTML"],Ne={key:1,class:"matomo-field-select"},Te=["multiple","name"],$e=["value","selected","disabled"],Me=["for","innerHTML"];function Pe(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[e.groupedOptions?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ae,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.groupedOptions,(function(t){var n=je(t,2),o=n[0],r=n[1];return Object(l["openBlock"])(),Object(l["createElementBlock"])("optgroup",{key:o,label:o},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(r,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,Ee)})),128))],8,Be)})),128))],16,Fe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,xe)])):Object(l["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ne,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.options,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,$e)})),128))],16,Te),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,Me)])):Object(l["createCommentVNode"])("",!0)],64)}function Je(e){return Ie(e)||He(e)||Ue(e)||De()}function De(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function He(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ie(e){if(Array.isArray(e))return Ke(e)}function Le(e,t){return qe(e)||_e(e,t)||Ue(e,t)||ze()}function ze(){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 Ue(e,t){if(e){if("string"===typeof e)return Ke(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)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _e(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function qe(e){if(Array.isArray(e))return e}function Re(e){return Re="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function We(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4?arguments[4]:void 0;if(e){var i=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=r?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),i.formSelect(o),n){var l=i.closest(".select-wrapper").find("input");l.attr("placeholder",n)}}}function Ge(e){return!Array.isArray(e)&&"object"===Re(e)&&Object.values(e).some((function(e){return"object"===Re(e)}))}function Ze(e,t){return e.some((function(e){return e.key===t}))}function Ye(e,t,n){if(!e)return[];var o=!0,r=e;Ge(r)||(r={"":e},o=!1);var i=[];return Object.entries(r).forEach((function(e){var n=Le(e,2),r=n[0],l=n[1];Object.entries(l).forEach((function(e){var n=Le(e,2),l=n[0],a=n[1];if(a&&"object"===Re(a)&&"undefined"!==typeof a.key)i.push(a);else{var u=l;"integer"===t&&"string"===typeof l&&(u=parseInt(l,10)),i.push({group:o?r:void 0,key:u,value:a})}}))})),null!==n&&void 0!==n&&n.placeholder&&!Ze(i,"")?[{key:"",value:""}].concat(i):i}function Qe(e){return"string"===typeof e?e.replace(/^string:/,""):e}var Xe=Object(l["defineComponent"])({props:{modelValue:null,multiple:Boolean,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options:function(){var e=this.availableOptions;return!e||Ze(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(Je(e))},hasGroups:function(){var e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions:function(){var e=this.options;if(!this.hasGroups||!e)return null;var t={};e.forEach((function(e){var n=e.group;t[n]=t[n]||[],t[n].push(e)}));var n=Object.entries(t);return n.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),n}},methods:{onChange:function(e){var t,n=this,o=e.target;this.multiple?(t=Array.from(o.options).filter((function(e){return e.selected})).map((function(e){return e.value})),t=t.map((function(e){return Qe(e)}))):(t=o.value,t=Qe(t)),this.$emit("update:modelValue",t),Object(l["nextTick"])((function(){n.modelValue!==t&&n.onModelValueChange(n.modelValue)}))},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){var n;We(t.$refs.select,e,null===(n=t.uiControlAttributes)||void 0===n?void 0:n.placeholder,t.uiControlOptions,t.multiple)}))}},watch:{modelValue:function(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler:function(e,t){var n=this;setTimeout((function(){var o;e!==t&&We(n.$refs.select,n.modelValue,null===(o=n.uiControlAttributes)||void 0===o?void 0:o.placeholder,n.uiControlOptions,n.multiple)}))}},availableOptions:function(e,t){var n=this;e!==t&&setTimeout((function(){var e;We(n.$refs.select,n.modelValue,null===(e=n.uiControlAttributes)||void 0===e?void 0:e.placeholder,n.uiControlOptions,n.multiple)}))}},mounted:function(){var e=this;setTimeout((function(){var t;We(e.$refs.select,e.modelValue,null===(t=e.uiControlAttributes)||void 0===t?void 0:t.placeholder,e.uiControlOptions,e.multiple)}))}});Xe.render=Pe;var et=Xe,tt=["for","innerHTML"],nt={class:"sites_autocomplete"};function ot(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("SiteSelector");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,tt),Object(l["createElementVNode"])("div",nt,[Object(l["createVNode"])(a,Object(l["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),id:e.name,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access"])])])}var rt=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:i["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});rt.render=ot;var it=rt,lt=["type","id","name","value"],at=["for","innerHTML"];function ut(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueText,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)})},e.uiControlAttributes),null,16,lt),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,at)],64)}var ct=Object(l["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText:function(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},mounted:function(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}}});ct.render=ut;var st=ct,dt=["for","innerHTML"],mt=["type","name","value"];function ft(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,dt),Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,name:e.name,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),value:e.concattedValues},e.uiControlAttributes),null,16,mt)])}var pt=Object(l["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(",").map((function(e){return e.trim()}));this.$emit("update:modelValue",t)}}});pt.render=ft;var bt=pt,vt=["name","id","value"],ht=["for","innerHTML"];function gt(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.name,value:e.modelValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea",ref:"textarea"}),null,16,vt),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ht)],64)}var Ot=Object(l["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}},watch:{modelValue:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});Ot.render=gt;var yt=Ot,jt=["for","innerHTML"],Vt=["name","value"];function wt(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,jt),Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({ref:"textarea",name:e.name},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea"}),null,16,Vt)])}var Ct="\n",St=Object(l["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String]},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(Ct)}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(Ct);this.$emit("update:modelValue",t)}},watch:{modelValue:function(e,t){var n=this;e!==t&&setTimeout((function(){n.$refs.textarea&&window.Materialize.textareaAutoResize(n.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){e.$refs.textarea&&window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});St.render=wt;var kt=St;function At(e){return At="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},At(e)}function Ft(e,t){return Tt(e)||Nt(e,t)||Et(e,t)||Bt()}function Bt(){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 Et(e,t){if(e){if("string"===typeof e)return xt(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)?xt(e,t):void 0}}function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Nt(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function Tt(e){if(Array.isArray(e))return e} +(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["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/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,"FormField",(function(){return It})),n.d(t,"Field",(function(){return Qt})),n.d(t,"PluginSettings",(function(){return En})),n.d(t,"PluginFilter",(function(){return Xn})),n.d(t,"PluginManagement",(function(){return Mn})),n.d(t,"PluginUpload",(function(){return In})),n.d(t,"SaveButton",(function(){return io})),n.d(t,"Form",(function(){return uo})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("19dc"),l=n("8bbf"),a={class:"form-group row matomo-form-field"},u={key:0,class:"col s12"},c={key:0,class:"form-help"},s={key:0,class:"inline-help",ref:"inlineHelp"},d=Object(l["createElementVNode"])("br",null,null,-1);function m(e,t,n,o,r,i){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",a,[e.formField.introduction?(Object(l["openBlock"])(),Object(l["createElementBlock"])("h3",u,Object(l["toDisplayString"])(e.formField.introduction),1)):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.childComponent),Object(l["mergeProps"])(Object.assign(Object.assign({formField:e.formField},e.formField),{},{modelValue:e.processedModelValue,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)})}),null,16))],2),Object(l["createElementVNode"])("div",{class:Object(l["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",c,[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:"form-description"},Object(l["toDisplayString"])(e.formField.description),513),[[l["vShow"],e.formField.description]]),e.formField.inlineHelp?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",s,null,512)):Object(l["createCommentVNode"])("",!0),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",null,[d,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[l["vShow"],e.showDefaultValue]])])):Object(l["createCommentVNode"])("",!0)],2)],512)),[[l["vShow"],e.showField]])}var f={class:"checkbox"},p=["checked","id","name"],b=["innerHTML"];function v(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",f,[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes,{value:1,checked:!!e.modelValue,type:"checkbox",id:e.name,name:e.name}),null,16,p),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,b)])])}var h=Object(l["defineComponent"])({props:{modelValue:Boolean,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.modelValue!==e.target.checked&&this.$emit("update:modelValue",e.target.checked)}}});h.render=v;var g=h,O=["value","checked","onChange","id","name"];function y(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:function(t){return e.onChange(n)}},e.uiControlAttributes,{type:"checkbox",id:"".concat(e.name).concat(t.key),name:t.name}),null,16,O),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(t.description),513),[[l["vShow"],t.description]])])])})),128))])}function j(e){return S(e)||C(e)||w(e)||V()}function V(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e,t){if(e){if("string"===typeof e)return k(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)?k(e,t):void 0}}function C(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function S(e){if(Array.isArray(e))return k(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function A(e,t){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var F=Object(l["defineComponent"])({props:{modelValue:Array,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return A(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t=j(this.checkboxStates);t[e]=!t[e];var n=this.availableOptions||{},o=[];Object.values(n).forEach((function(e,n){t[n]&&o.push(e.key)})),this.$emit("update:modelValue",o)}}});F.render=y;var B=F,E={class:"expandableSelector"},x=Object(l["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(l["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(l["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),N=["value"],T={class:"expandableList z-depth-2"},$={class:"searchContainer"},M={class:"collection firstLevel"},P=["onClick"],J={class:"collection secondLevel"},D=["onClick"],H={class:"primary-content"},L=["title"];function I(e,t,n,o,r,i){var a=Object(l["resolveDirective"])("focus-if"),u=Object(l["resolveDirective"])("focus-anywhere-but-here");return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",E,[Object(l["createElementVNode"])("div",{onClick:t[0]||(t[0]=function(t){return e.showSelect=!e.showSelect}),class:"select-wrapper"},[x,Object(l["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,N)]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",T,[Object(l["createElementVNode"])("div",$,[Object(l["withDirectives"])(Object(l["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),class:"expandableSearch browser-default"},null,512),[[l["vModelText"],e.searchTerm],[a,e.showSelect]])]),Object(l["createElementVNode"])("ul",M,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions,(function(t,n){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"collection-item",key:n},[Object(l["createElementVNode"])("h4",{class:"expandableListCategory",onClick:function(n){return e.onCategoryClicked(t)}},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.group)+" ",1),Object(l["createElementVNode"])("span",{class:Object(l["normalizeClass"])(["secondary-content",{"icon-arrow-right":e.showCategory!==t.group,"icon-arrow-bottom":e.showCategory===t.group}])},null,2)],8,P),Object(l["withDirectives"])(Object(l["createElementVNode"])("ul",J,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.values.filter((function(t){return-1!==t.value.toLowerCase().indexOf(e.searchTerm.toLowerCase())})),(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:function(n){return e.onValueClicked(t)}},[Object(l["createElementVNode"])("span",H,Object(l["toDisplayString"])(t.value),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,L),[[l["vShow"],t.tooltip]])],8,D)})),128))],512),[[l["vShow"],e.showCategory===t.group||e.searchTerm]])],512)),[[l["vShow"],t.values.filter((function(t){return-1!==t.value.toLowerCase().indexOf(e.searchTerm.toLowerCase())})).length]])})),128))])],512),[[l["vShow"],e.showSelect]])],512)),[[u,{blur:e.onBlur}]])}function z(e){var t=[];if(!e)return t;var n={};return Object.values(e).forEach((function(e){var t=e,o=t.group||"";o in n&&n[o]||(n[o]={values:[],group:o});var r={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(r.tooltip=t.tooltip),n[o].values.push(r)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var U=Object(l["defineComponent"])({props:{modelValue:[Number,String],availableOptions:Array,title:String},directives:{FocusAnywhereButHere:i["FocusAnywhereButHere"],FocusIf:i["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{modelValueText:function(){if(this.title)return this.title;var e,t=this.modelValue,n=this.availableOptions||[];return n.some((function(n){return e=n.values.find((function(e){return e.key===t})),e})),e?e.value?"".concat(e.value):"":t?"".concat(t):""}},methods:{onBlur:function(){this.showSelect=!1},onCategoryClicked:function(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked:function(e){this.$emit("update:modelValue",e.key),this.showSelect=!1}}});U.render=I;var K=U,_=["for","innerHTML"];function q(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("FieldArray");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,_),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onValueUpdate(t)}),field:e.uiControlAttributes.field},null,8,["name","model-value","field"])])}var R=Object(l["defineComponent"])({components:{FieldArray:i["FieldArray"]},props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});R.render=q;var W=R,G={class:"btn"},Z=["for","innerHTML"],Y=["name","id"],Q={class:"file-path-wrapper"},X=["value"];function ee(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",G,[Object(l["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Z),Object(l["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,Y)]),Object(l["createElementVNode"])("div",Q,[Object(l["createElementVNode"])("input",{class:"file-path validate",value:e.filePath,type:"text"},null,8,X)])])}var te=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:[String,File]},inheritAttrs:!1,emits:["update:modelValue"],watch:{modelValue:function(e){if(!e||""===e){var t=this.$refs.fileInput;t.value=""}}},methods:{onChange:function(e){var t=e.target.files;if(t){var n=t.item(0);this.$emit("update:modelValue",n)}}},computed:{filePath:function(){if(this.modelValue instanceof File)return this.$refs.fileInput.value}}});te.render=ee;var ne=te,oe=["type","name","value"];function re(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("input",{type:e.uiControl,name:e.name,value:e.modelValue,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,oe)])}var ie=Object(l["defineComponent"])({props:{modelValue:null,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});ie.render=re;var le=ie,ae={class:"fieldMultiTuple"},ue=["for","innerHTML"];function ce(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("MultiPairField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",ae,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ue),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","field1","field2","field3","field4"])])}var se=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:null,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:i["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});se.render=ce;var de=se,me=["type","id","name","value"],fe=["for","innerHTML"];function pe(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:(e.modelValue||"").toString(),onKeydown:t[0]||(t[0]=function(t){return e.onChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),null,16,me),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,fe)],64)}var be=Object(l["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(i["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=parseFloat(e.target.value);this.$emit("update:modelValue",t)}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}}});be.render=pe;var ve=be,he=["value","id","name","disabled","checked"];function ge(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["withDirectives"])(Object(l["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(l["toDisplayString"])(e.title),513),[[l["vShow"],e.title]]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.availableOptions||[],(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=function(t){return e.onChange(t)}),type:"radio",id:"".concat(e.name).concat(n.key),name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||"".concat(e.modelValue)===n.key}),null,16,he),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(n.value)+" ",1),Object(l["withDirectives"])(Object(l["createElementVNode"])("span",{class:"form-description"},Object(l["toDisplayString"])(n.description),513),[[l["vShow"],n.description]])])])])})),128))])}var Oe=Object(l["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number]},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});Oe.render=ge;var ye=Oe;function je(e,t){return ke(e)||Se(e,t)||we(e,t)||Ve()}function Ve(){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 we(e,t){if(e){if("string"===typeof e)return Ce(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)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Se(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function ke(e){if(Array.isArray(e))return e}var Ae={key:0,class:"matomo-field-select"},Fe=["multiple","name"],Be=["label"],Ee=["value","selected","disabled"],xe=["for","innerHTML"],Ne={key:1,class:"matomo-field-select"},Te=["multiple","name"],$e=["value","selected","disabled"],Me=["for","innerHTML"];function Pe(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[e.groupedOptions?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ae,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.groupedOptions,(function(t){var n=je(t,2),o=n[0],r=n[1];return Object(l["openBlock"])(),Object(l["createElementBlock"])("optgroup",{key:o,label:o},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(r,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,Ee)})),128))],8,Be)})),128))],16,Fe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,xe)])):Object(l["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ne,[Object(l["createElementVNode"])("select",Object(l["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.options,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(l["toDisplayString"])(t.value),9,$e)})),128))],16,Te),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.title},null,8,Me)])):Object(l["createCommentVNode"])("",!0)],64)}function Je(e){return Le(e)||He(e)||Ue(e)||De()}function De(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function He(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Le(e){if(Array.isArray(e))return Ke(e)}function Ie(e,t){return qe(e)||_e(e,t)||Ue(e,t)||ze()}function ze(){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 Ue(e,t){if(e){if("string"===typeof e)return Ke(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)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _e(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function qe(e){if(Array.isArray(e))return e}function Re(e){return Re="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function We(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4?arguments[4]:void 0;if(e){var i=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=r?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),i.formSelect(o),n){var l=i.closest(".select-wrapper").find("input");l.attr("placeholder",n)}}}function Ge(e){return!Array.isArray(e)&&"object"===Re(e)&&Object.values(e).some((function(e){return"object"===Re(e)}))}function Ze(e,t){return e.some((function(e){return e.key===t}))}function Ye(e,t,n){if(!e)return[];var o=!0,r=e;Ge(r)||(r={"":e},o=!1);var i=[];return Object.entries(r).forEach((function(e){var n=Ie(e,2),r=n[0],l=n[1];Object.entries(l).forEach((function(e){var n=Ie(e,2),l=n[0],a=n[1];if(a&&"object"===Re(a)&&"undefined"!==typeof a.key)i.push(a);else{var u=l;"integer"===t&&"string"===typeof l&&(u=parseInt(l,10)),i.push({group:o?r:void 0,key:u,value:a})}}))})),null!==n&&void 0!==n&&n.placeholder&&!Ze(i,"")?[{key:"",value:""}].concat(i):i}function Qe(e){return"string"===typeof e?e.replace(/^string:/,""):e}var Xe=Object(l["defineComponent"])({props:{modelValue:null,multiple:Boolean,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options:function(){var e=this.availableOptions;return!e||Ze(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(Je(e))},hasGroups:function(){var e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions:function(){var e=this.options;if(!this.hasGroups||!e)return null;var t={};e.forEach((function(e){var n=e.group;t[n]=t[n]||[],t[n].push(e)}));var n=Object.entries(t);return n.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),n}},methods:{onChange:function(e){var t,n=this,o=e.target;this.multiple?(t=Array.from(o.options).filter((function(e){return e.selected})).map((function(e){return e.value})),t=t.map((function(e){return Qe(e)}))):(t=o.value,t=Qe(t)),this.$emit("update:modelValue",t),Object(l["nextTick"])((function(){n.modelValue!==t&&n.onModelValueChange(n.modelValue)}))},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){var n;We(t.$refs.select,e,null===(n=t.uiControlAttributes)||void 0===n?void 0:n.placeholder,t.uiControlOptions,t.multiple)}))}},watch:{modelValue:function(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler:function(e,t){var n=this;setTimeout((function(){var o;e!==t&&We(n.$refs.select,n.modelValue,null===(o=n.uiControlAttributes)||void 0===o?void 0:o.placeholder,n.uiControlOptions,n.multiple)}))}},availableOptions:function(e,t){var n=this;e!==t&&setTimeout((function(){var e;We(n.$refs.select,n.modelValue,null===(e=n.uiControlAttributes)||void 0===e?void 0:e.placeholder,n.uiControlOptions,n.multiple)}))}},mounted:function(){var e=this;setTimeout((function(){var t;We(e.$refs.select,e.modelValue,null===(t=e.uiControlAttributes)||void 0===t?void 0:t.placeholder,e.uiControlOptions,e.multiple)}))}});Xe.render=Pe;var et=Xe,tt=["for","innerHTML"],nt={class:"sites_autocomplete"};function ot(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("SiteSelector");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,tt),Object(l["createElementVNode"])("div",nt,[Object(l["createVNode"])(a,Object(l["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),id:e.name,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access"])])])}var rt=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:i["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});rt.render=ot;var it=rt,lt=["type","id","name","value"],at=["for","innerHTML"];function ut(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueText,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)})},e.uiControlAttributes),null,16,lt),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,at)],64)}var ct=Object(l["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText:function(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},mounted:function(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}}});ct.render=ut;var st=ct,dt=["for","innerHTML"],mt=["type","name","value"];function ft(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,dt),Object(l["createElementVNode"])("input",Object(l["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,name:e.name,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),value:e.concattedValues},e.uiControlAttributes),null,16,mt)])}var pt=Object(l["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(",").map((function(e){return e.trim()}));this.$emit("update:modelValue",t)}}});pt.render=ft;var bt=pt,vt=["name","id","value"],ht=["for","innerHTML"];function gt(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.name,value:e.modelValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea",ref:"textarea"}),null,16,vt),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ht)],64)}var Ot=Object(l["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){this.$emit("update:modelValue",e.target.value)}},watch:{modelValue:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});Ot.render=gt;var yt=Ot,jt=["for","innerHTML"],Vt=["name","value"];function wt(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,jt),Object(l["createElementVNode"])("textarea",Object(l["mergeProps"])({ref:"textarea",name:e.name},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea"}),null,16,Vt)])}var Ct="\n",St=Object(l["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String]},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(Ct)}},created:function(){this.onKeydown=Object(i["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(Ct);this.$emit("update:modelValue",t)}},watch:{modelValue:function(e,t){var n=this;e!==t&&setTimeout((function(){n.$refs.textarea&&window.Materialize.textareaAutoResize(n.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){e.$refs.textarea&&window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});St.render=wt;var kt=St;function At(e){return At="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},At(e)}function Ft(e,t){return Tt(e)||Nt(e,t)||Et(e,t)||Bt()}function Bt(){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 Et(e,t){if(e){if("string"===typeof e)return xt(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)?xt(e,t):void 0}}function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Nt(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function Tt(e){if(Array.isArray(e))return e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function $t(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var o=Ft(e,2),r=o[0],i=o[1];if(i&&"object"===At(i)&&"undefined"!==typeof i.key)n.push(i);else{var l=r;"integer"===t&&"string"===typeof r&&(l=parseInt(l,10)),n.push({key:l,value:i})}})),n}function Mt(e){return Mt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}var Pt=["password","url","search","email"],Jt=["textarea","checkbox","text"],Dt={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},Ht={FieldSelect:Ye,FieldCheckboxArray:$t,FieldRadio:$t,FieldExpandableSelect:z},It=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:g,FieldCheckboxArray:B,FieldExpandableSelect:K,FieldFieldArray:W,FieldFile:ne,FieldHidden:le,FieldMultituple:de,FieldNumber:ve,FieldRadio:ye,FieldSelect:et,FieldSite:it,FieldText:st,FieldTextArray:bt,FieldTextarea:yt,FieldTextareaArray:kt},setup:function(e){var t=Object(l["ref"])(null),n=function(e){var n;e&&t.value&&(n="string"===typeof e?0===e.indexOf("#")?window.$(e):window.vueSanitize(e):e,window.$(t.value).html("").append(n))};return Object(l["watch"])((function(){return e.formField.inlineHelp}),n),Object(l["onMounted"])((function(){n(e.formField.inlineHelp)})),{inlineHelp:t}},computed:{childComponent:function(){var e=this.formField;if(e.component)return e.component;var t=e.uiControl,n=Dt[t];return-1!==Pt.indexOf(t)&&(n="FieldText"),"array"===this.formField.type&&-1!==Jt.indexOf(t)&&(n="".concat(n,"Array")),n},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!this.formField||!this.formField.condition||this.formField.condition()},processedModelValue:function(){var e=this.formField;if("boolean"===e.type){var t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue:function(){var e=this.formField.defaultValue;return Array.isArray(e)?e.join(","):e},availableOptions:function(){var e=this.childComponent;if("string"!==typeof e)return null;var t=this.formField;return t.availableValues&&Ht[e]?Ht[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty:function(){var e=this.formField,t=e.defaultValue,n=this.availableOptions;if("string"===typeof t&&t){var o=null;try{o=JSON.parse(t)}catch(i){}if(null!==o&&"object"===Mt(o))return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?"".concat(t):"";var r=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach((function(e){"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&r.push(e.value)})),r.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});It.render=m;var Lt=It,zt={ref:"root"};function Ut(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",zt,null,512)}function Kt(e){if("undefined"!==typeof e)return JSON.parse(JSON.stringify(e))}var _t=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:null,required:!0},templateFile:{type:String,required:!0}},emits:["update:modelValue"],inheritAttrs:!1,setup:function(e,t){var n=Object(l["ref"])(null),o=window.$("<div ng-include=\"'".concat(e.templateFile,"?cb=").concat(i["Matomo"].cacheBuster,"'\"></div>")),r=i["Matomo"].helper.getAngularDependency("$timeout"),a=i["Matomo"].helper.getAngularDependency("$rootScope"),u=a.$new();return u.formField=Object.assign(Object.assign({},Kt(e.formField)),{},{value:Kt(e.modelValue)}),u.$watch("formField.value",(function(n,o){n!==o&&JSON.stringify(n)!==JSON.stringify(e.modelValue)&&t.emit("update:modelValue",Kt(n))})),Object(l["watch"])((function(){return e.modelValue}),(function(e){JSON.stringify(e)!==JSON.stringify(u.formField.value)&&r((function(){u.formField.value=e}))})),Object(l["watch"])((function(){return e.formField}),(function(e){r((function(){var t=u.formField.value;u.formField=Object.assign(Object.assign({},Kt(e)),{},{value:t})}))}),{deep:!0}),Object(l["onMounted"])((function(){window.$(n.value).append(o),i["Matomo"].helper.compileAngularComponents(o,{scope:u,params:{formField:Object.assign(Object.assign({},Kt(e.formField)),{},{value:e.modelValue})}})})),{root:n}}});_t.render=Ut;var qt=_t; + */function $t(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var o=Ft(e,2),r=o[0],i=o[1];if(i&&"object"===At(i)&&"undefined"!==typeof i.key)n.push(i);else{var l=r;"integer"===t&&"string"===typeof r&&(l=parseInt(l,10)),n.push({key:l,value:i})}})),n}function Mt(e){return Mt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(e)}var Pt=["password","url","search","email"],Jt=["textarea","checkbox","text"],Dt={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},Ht={FieldSelect:Ye,FieldCheckboxArray:$t,FieldRadio:$t,FieldExpandableSelect:z},Lt=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:g,FieldCheckboxArray:B,FieldExpandableSelect:K,FieldFieldArray:W,FieldFile:ne,FieldHidden:le,FieldMultituple:de,FieldNumber:ve,FieldRadio:ye,FieldSelect:et,FieldSite:it,FieldText:st,FieldTextArray:bt,FieldTextarea:yt,FieldTextareaArray:kt},setup:function(e){var t=Object(l["ref"])(null),n=function(e){var n;e&&t.value&&(n="string"===typeof e?0===e.indexOf("#")?window.$(e):window.vueSanitize(e):e,window.$(t.value).html("").append(n))};return Object(l["watch"])((function(){return e.formField.inlineHelp}),n),Object(l["onMounted"])((function(){n(e.formField.inlineHelp)})),{inlineHelp:t}},computed:{childComponent:function(){var e=this.formField;if(e.component)return e.component;var t=e.uiControl,n=Dt[t];return-1!==Pt.indexOf(t)&&(n="FieldText"),"array"===this.formField.type&&-1!==Jt.indexOf(t)&&(n="".concat(n,"Array")),n},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!this.formField||!this.formField.condition||this.formField.condition()},processedModelValue:function(){var e=this.formField;if("boolean"===e.type){var t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue:function(){var e=this.formField.defaultValue;return Array.isArray(e)?e.join(","):e},availableOptions:function(){var e=this.childComponent;if("string"!==typeof e)return null;var t=this.formField;return t.availableValues&&Ht[e]?Ht[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty:function(){var e=this.formField,t=e.defaultValue,n=this.availableOptions;if("string"===typeof t&&t){var o=null;try{o=JSON.parse(t)}catch(i){}if(null!==o&&"object"===Mt(o))return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?"".concat(t):"";var r=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach((function(e){"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&r.push(e.value)})),r.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});Lt.render=m;var It=Lt,zt={ref:"root"};function Ut(e,t,n,o,r,i){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",zt,null,512)}function Kt(e){if("undefined"!==typeof e)return JSON.parse(JSON.stringify(e))}var _t=Object(l["defineComponent"])({props:{modelValue:null,formField:{type:null,required:!0},templateFile:{type:String,required:!0}},emits:["update:modelValue"],inheritAttrs:!1,setup:function(e,t){var n=Object(l["ref"])(null),o=window.$("<div ng-include=\"'".concat(e.templateFile,"?cb=").concat(i["Matomo"].cacheBuster,"'\"></div>")),r=i["Matomo"].helper.getAngularDependency("$timeout"),a=i["Matomo"].helper.getAngularDependency("$rootScope"),u=a.$new();return u.formField=Object.assign(Object.assign({},Kt(e.formField)),{},{value:Kt(e.modelValue)}),u.$watch("formField.value",(function(n,o){n!==o&&JSON.stringify(n)!==JSON.stringify(e.modelValue)&&t.emit("update:modelValue",Kt(n))})),Object(l["watch"])((function(){return e.modelValue}),(function(e){JSON.stringify(e)!==JSON.stringify(u.formField.value)&&r((function(){u.formField.value=e}))})),Object(l["watch"])((function(){return e.formField}),(function(e){r((function(){var t=u.formField.value;u.formField=Object.assign(Object.assign({},Kt(e)),{},{value:t})}))}),{deep:!0}),Object(l["onMounted"])((function(){window.$(n.value).append(o),i["Matomo"].helper.compileAngularComponents(o,{scope:u,params:{formField:Object.assign(Object.assign({},Kt(e.formField)),{},{value:e.modelValue})}})})),{root:n}}});_t.render=Ut;var qt=_t; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Rt(e){if(e){var t=e.plugin,n=e.name;if(!t||!n)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(i["useExternalPluginComponent"])(t,n)}}function Wt(e,t){var n={};return Object.values(e.allSettings||{}).forEach((function(e){"0"===e.value?n[e.name]=0:n[e.name]=e.value})),e.$eval(t,n)}Object(i["createAngularJsAdapter"])({component:Lt,scope:{modelValue:{default:function(e){var t=e.piwikFormField;return"string"!==typeof t.value||!t.value||"array"!==t.type&&"multituple"!==t.uiControl&&"field-array"!==t.uiControl&&"multiselect"!==t.uiControl&&"site"!==t.uiControl||(t.value=JSON.parse(t.value)),"checkbox"===t.uiControl?Object(i["transformAngularJsBoolAttr"])(t.value):t.value}},piwikFormField:{vue:"formField",angularJsBind:"=",transform:function(e,t,n){var o=e;function r(){if(o.templateFile)return Object(l["markRaw"])(qt);var e=Rt(o.component);return e?Object(l["markRaw"])(e):void 0}return Object.assign(Object.assign({},o),{},{condition:o.condition?Wt.bind(null,n,o.condition):o.condition,disabled:Object(i["transformAngularJsBoolAttr"])(o.disabled),autocomplete:Object(i["transformAngularJsBoolAttr"])(o.autocomplete),autofocus:Object(i["transformAngularJsBoolAttr"])(o.autofocus),tabindex:Object(i["transformAngularJsIntAttr"])(o.tabindex),fullWidth:Object(i["transformAngularJsBoolAttr"])(o.fullWidth),maxlength:Object(i["transformAngularJsIntAttr"])(o.maxlength),required:Object(i["transformAngularJsBoolAttr"])(o.required),rows:Object(i["transformAngularJsIntAttr"])(o.rows),min:Object(i["transformAngularJsIntAttr"])(o.min),max:Object(i["transformAngularJsIntAttr"])(o.max),component:r()})}},allSettings:{angularJsBind:"="}},directiveName:"piwikFormField",events:{"update:modelValue":function(e,t,n,o,r,i,l){e!==n.piwikFormField.value&&l((function(){n.piwikFormField.value=e}))}},$inject:["$timeout"],postCreate:function(e,t){t.$watch("piwikFormField.value",(function(t,n){t!==n&&(e.modelValue=t)})),t.$watch("allSettings",(function(){e.formField=Object.assign(Object.assign({},e.formField),{},{condition:t.piwikFormField.condition?Wt.bind(null,t,t.piwikFormField.condition):t.piwikFormField.condition})}),!0)}});function Gt(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),component:e.component},null,8,["form-field","model-value","component"])}var Zt={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},Yt=Object(l["defineComponent"])({props:{modelValue:null,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:String,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:Boolean,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null},emits:["update:modelValue"],components:{FormField:Lt},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&Zt[e]?Zt[e]:"string"},field:function(){return{uiControl:this.uicontrol,type:this.type,name:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,title:this.title,uiControlAttributes:Object.assign(Object.assign({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions}}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});Yt.render=Gt;var Qt=Yt; + */function Rt(e){if(e){var t=e.plugin,n=e.name;if(!t||!n)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(i["useExternalPluginComponent"])(t,n)}}function Wt(e,t){var n={};return Object.values(e.allSettings||{}).forEach((function(e){"0"===e.value?n[e.name]=0:n[e.name]=e.value})),e.$eval(t,n)}Object(i["createAngularJsAdapter"])({component:It,scope:{modelValue:{default:function(e){var t=e.piwikFormField;return"string"!==typeof t.value||!t.value||"array"!==t.type&&"multituple"!==t.uiControl&&"field-array"!==t.uiControl&&"multiselect"!==t.uiControl&&"site"!==t.uiControl||(t.value=JSON.parse(t.value)),"checkbox"===t.uiControl?Object(i["transformAngularJsBoolAttr"])(t.value):t.value}},piwikFormField:{vue:"formField",angularJsBind:"=",transform:function(e,t,n){var o=e;function r(){if(o.templateFile)return Object(l["markRaw"])(qt);var e=Rt(o.component);return e?Object(l["markRaw"])(e):void 0}return Object.assign(Object.assign({},o),{},{condition:o.condition?Wt.bind(null,n,o.condition):o.condition,disabled:Object(i["transformAngularJsBoolAttr"])(o.disabled),autocomplete:Object(i["transformAngularJsBoolAttr"])(o.autocomplete),autofocus:Object(i["transformAngularJsBoolAttr"])(o.autofocus),tabindex:Object(i["transformAngularJsIntAttr"])(o.tabindex),fullWidth:Object(i["transformAngularJsBoolAttr"])(o.fullWidth),maxlength:Object(i["transformAngularJsIntAttr"])(o.maxlength),required:Object(i["transformAngularJsBoolAttr"])(o.required),rows:Object(i["transformAngularJsIntAttr"])(o.rows),min:Object(i["transformAngularJsIntAttr"])(o.min),max:Object(i["transformAngularJsIntAttr"])(o.max),component:r()})}},allSettings:{angularJsBind:"="}},directiveName:"piwikFormField",events:{"update:modelValue":function(e,t,n,o,r,i,l){e!==n.piwikFormField.value&&l((function(){n.piwikFormField.value=e}))}},$inject:["$timeout"],postCreate:function(e,t){t.$watch("piwikFormField.value",(function(t,n){t!==n&&(e.modelValue=t)})),t.$watch("allSettings",(function(){e.formField=Object.assign(Object.assign({},e.formField),{},{condition:t.piwikFormField.condition?Wt.bind(null,t,t.piwikFormField.condition):t.piwikFormField.condition})}),!0)}});function Gt(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),component:e.component},null,8,["form-field","model-value","component"])}var Zt={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},Yt=Object(l["defineComponent"])({props:{modelValue:null,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:String,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:Boolean,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null},emits:["update:modelValue"],components:{FormField:It},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&Zt[e]?Zt[e]:"string"},field:function(){return{uiControl:this.uicontrol,type:this.type,name:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,title:this.title,uiControlAttributes:Object.assign(Object.assign({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions}}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});Yt.render=Gt;var Qt=Yt; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Xt(e,t,n){if("string"===typeof e&&e&&("array"===t||"multituple"===n||"field-array"===n||"multiselect"===n||"site"===n)){var o=JSON.parse(e);return"site"===n&&(o.name=i["Matomo"].helper.htmlDecode(o.name)),o}return"checkbox"===n&&"array"!==t?Object(i["transformAngularJsBoolAttr"])(e):e}Object(i["createAngularJsAdapter"])({component:Qt,require:"?ngModel",scope:{uicontrol:{angularJsBind:"@"},name:{angularJsBind:"@"},value:{vue:"modelValue",angularJsBind:"@",transform:function(e,t,n){return Xt(e,n.varType,n.uicontrol)}},default:{vue:"defaultValue",angularJsBind:"@"},options:{angularJsBind:"="},description:{angularJsBind:"@"},introduction:{angularJsBind:"@"},title:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@"},disabled:{angularJsBind:"=",transform:i["transformAngularJsBoolAttr"]},uiControlAttributes:{angularJsBind:"="},uiControlOptions:{angularJsBind:"="},autocomplete:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},condition:{angularJsBind:"@",transform:function(e,t,n){if(e)return function(t){return n.$eval(e,t)}}},varType:{angularJsBind:"@"},autofocus:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},tabindex:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},fullWidth:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},maxlength:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},required:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},placeholder:{angularJsBind:"@"},rows:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},min:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},max:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},component:{angularJsBind:"<",transform:function(e,t,n){if(e){if(n.templateFile)return Object(l["shallowRef"])(qt);var o=e.plugin,r=e.name;if(!o||!r)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(l["shallowRef"])(Object(i["useExternalPluginComponent"])(o,r))}}}},directiveName:"piwikField",$inject:["$timeout"],events:{"update:modelValue":function(e,t,n,o,r,i,l){var a=i?i.$viewValue:n.value;e!==a&&l((function(){i?(i.$setViewValue(e),i.$render()):n.value=e}))}},postCreate:function(e,t,n,o,r){var a=r;if(a){if(a.$render=function(){Object(l["nextTick"])((function(){e.modelValue=Object(i["removeAngularJsSpecificProperties"])(a.$viewValue)}))},"undefined"!==typeof t.value){var u=Xt(t.value,t.varType,t.uicontrol);a.$setViewValue(u)}else a.$setViewValue(e.modelValue);"site"===t.uicontrol&&a.$viewValue&&setTimeout((function(){a.$setViewValue(Object.assign({},a.$viewValue))}))}else t.$watch("value",(function(n){if(n!==e.modelValue){var o=Xt(n,t.varType,t.uicontrol);Object(l["nextTick"])((function(){e.modelValue=o}))}}))}});var en,tn={class:"pluginSettings",ref:"root"},nn=["id"],on={class:"card-content"},rn=["id"],ln=["onClick","disabled","value"],an={class:"confirm-password-modal modal"},un={class:"modal-content"},cn={class:"modal-footer"},sn=["disabled"];function dn(e,t,n,o,r,i){var a=this,u=Object(l["resolveComponent"])("PluginSetting"),c=Object(l["resolveComponent"])("ActivityIndicator"),s=Object(l["resolveComponent"])("Field");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",tn,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.settingsPerPlugin,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"card",id:"".concat(t.pluginName,"PluginSettings"),key:"".concat(t.pluginName,"PluginSettings")},[Object(l["createElementVNode"])("div",on,[Object(l["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(l["toDisplayString"])(t.title),9,rn),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.settings,(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:"".concat(n.pluginName,".").concat(n.name)},[Object(l["createVNode"])(u,{modelValue:e.settingValues["".concat(t.pluginName,".").concat(n.name)],"onUpdate:modelValue":function(o){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=o},"plugin-name":t.pluginName,setting:n,"setting-values":e.settingValues},null,8,["modelValue","onUpdate:modelValue","plugin-name","setting","setting-values"])])})),128)),Object(l["createElementVNode"])("input",{type:"button",onClick:function(n){return e.saveSetting(t.pluginName)},disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,ln),Object(l["createVNode"])(c,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,nn)})),128)),Object(l["createElementVNode"])("div",an,[Object(l["createElementVNode"])("div",un,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(s,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",name:"currentUserPassword",autocomplete:!1,"full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","title"])])]),Object(l["createElementVNode"])("div",cn,[Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.passwordConfirmation?void 0:"disabled",onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.save(a.settingsToSave)})},Object(l["toDisplayString"])(e.translate("General_Yes")),9,sn),Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=function(e){return e.preventDefault()})},Object(l["toDisplayString"])(e.translate("General_No")),1)])])],512)}function mn(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.changeValue(t)}),"form-field":Object.assign(Object.assign({},e.setting),{},{condition:e.conditionFunction})},null,8,["model-value","form-field"])])}function fn(e,t){return gn(e)||hn(e,t)||bn(e,t)||pn()}function pn(){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 bn(e,t){if(e){if("string"===typeof e)return vn(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)?vn(e,t):void 0}}function vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function hn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function gn(e){if(Array.isArray(e))return e}var On=Object(l["defineComponent"])({props:{pluginName:{type:String,required:!0},setting:{type:Object,required:!0},modelValue:null,settingValues:Object},components:{FormField:Lt},emits:["update:modelValue"],computed:{conditionFunction:function(){var e=this,t=this.setting.condition;if(t)return function(){if(!en){var n=i["Matomo"].helper.getAngularDependency("$rootScope");en=n.$new(!0)}return en.$eval(t,e.conditionValues)}},conditionValues:function(){var e=this,t={};return Object.entries(this.settingValues).forEach((function(n){var o=fn(n,2),r=o[0],i=o[1],l=r.split("."),a=fn(l,2),u=a[0],c=a[1];u===e.pluginName&&(t[c]=i)})),t}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});On.render=mn;var yn=On;function jn(e,t){return kn(e)||Sn(e,t)||wn(e,t)||Vn()}function Vn(){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 wn(e,t){if(e){if("string"===typeof e)return Cn(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)?Cn(e,t):void 0}}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Sn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function kn(e){if(Array.isArray(e))return e}var An=window,Fn=An.$,Bn=Object(l["defineComponent"])({props:{mode:String},components:{ActivityIndicator:i["ActivityIndicator"],Field:Qt,PluginSetting:yn},data:function(){return{isLoading:!0,isSaving:{},passwordConfirmation:"",settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;i["AjaxHelper"].fetch({method:this.apiMethod}).then((function(t){e.isLoading=!1,e.settingsPerPlugin=t,t.forEach((function(t){t.settings.forEach((function(n){e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}))})),window.anchorLinkFix.scrollToAnchorInUrl(),e.addSectionsToTableOfContents()})).catch((function(){e.isLoading=!1}))},computed:{apiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents:function(){var e=Fn("#generalSettingsTOC");if(e.length){var t=this.settingsPerPlugin;t.forEach((function(t){var n=t.pluginName,o=t.settings;n&&("CoreAdminHome"===n&&o?o.filter((function(e){return e.introduction})).forEach((function(t){e.append('<a href="#/'.concat(n,'PluginSettings">').concat(t.introduction,"</a> "))})):e.append('<a href="#/'.concat(n,'">').concat(n.replace(/([A-Z])/g," $1").trim(),"</a> ")))}))}},saveSetting:function(e){"admin"===this.mode?this.showPasswordConfirmModal(e):this.save(e)},showPasswordConfirmModal:function(e){var t=this;this.settingsToSave=e;var n=this.$refs.root,o=Fn(n),r=function(n){var r=n.keyCode?n.keyCode:n.which;13===r&&(o.find(".confirm-password-modal").modal("close"),t.save(e))};o.find(".confirm-password-modal").modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";Fn(e).focus(),Fn(e).off("keypress").keypress(r)}}).modal("open")},save:function(e){var t=this,n=this.saveApiMethod;this.isSaving[e]=!0;var o=this.getValuesForPlugin(e);i["AjaxHelper"].post({method:n},{settingValues:o,passwordConfirmation:this.passwordConfirmation}).then((function(){t.isSaving[e]=!1,i["NotificationsStore"].show({message:Object(i["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"}),i["NotificationsStore"].scrollToNotification("generalSettings")})).catch((function(){t.isSaving[e]=!1})),this.passwordConfirmation="",this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var o=jn(n,2),r=o[0],i=o[1],l=r.split("."),a=jn(l,2),u=a[0],c=a[1];if(u===e){var s=i;!1===s?s="0":!0===s&&(s="1"),t[u].push({name:c,value:s})}})),t}}});Bn.render=dn;var En=Bn,xn=(Object(i["createAngularJsAdapter"])({component:En,scope:{mode:{angularJsBind:"@"}},directiveName:"piwikPluginSettings"}),window),Nn=xn.$; + */function Xt(e,t,n){if("string"===typeof e&&e&&("array"===t||"multituple"===n||"field-array"===n||"multiselect"===n||"site"===n)){var o=JSON.parse(e);return"site"===n&&(o.name=i["Matomo"].helper.htmlDecode(o.name)),o}return"checkbox"===n&&"array"!==t?Object(i["transformAngularJsBoolAttr"])(e):e}Object(i["createAngularJsAdapter"])({component:Qt,require:"?ngModel",scope:{uicontrol:{angularJsBind:"@"},name:{angularJsBind:"@"},value:{vue:"modelValue",angularJsBind:"@",transform:function(e,t,n){return Xt(e,n.varType,n.uicontrol)}},default:{vue:"defaultValue",angularJsBind:"@"},options:{angularJsBind:"="},description:{angularJsBind:"@"},introduction:{angularJsBind:"@"},title:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@"},disabled:{angularJsBind:"=",transform:i["transformAngularJsBoolAttr"]},uiControlAttributes:{angularJsBind:"="},uiControlOptions:{angularJsBind:"="},autocomplete:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},condition:{angularJsBind:"@",transform:function(e,t,n){if(e)return function(t){return n.$eval(e,t)}}},varType:{angularJsBind:"@"},autofocus:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},tabindex:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},fullWidth:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},maxlength:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},required:{angularJsBind:"@",transform:i["transformAngularJsBoolAttr"]},placeholder:{angularJsBind:"@"},rows:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},min:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},max:{angularJsBind:"@",transform:i["transformAngularJsIntAttr"]},component:{angularJsBind:"<",transform:function(e,t,n){if(e){if(n.templateFile)return Object(l["shallowRef"])(qt);var o=e.plugin,r=e.name;if(!o||!r)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(l["shallowRef"])(Object(i["useExternalPluginComponent"])(o,r))}}}},directiveName:"piwikField",$inject:["$timeout"],events:{"update:modelValue":function(e,t,n,o,r,i,l){var a=i?i.$viewValue:n.value;e!==a&&l((function(){i?(i.$setViewValue(e),i.$render()):n.value=e}))}},postCreate:function(e,t,n,o,r){var a=r;if(a){if(a.$render=function(){Object(l["nextTick"])((function(){e.modelValue=Object(i["removeAngularJsSpecificProperties"])(a.$viewValue)}))},"undefined"!==typeof t.value){var u=Xt(t.value,t.varType,t.uicontrol);a.$setViewValue(u)}else a.$setViewValue(e.modelValue);"site"===t.uicontrol&&a.$viewValue&&setTimeout((function(){a.$setViewValue(Object.assign({},a.$viewValue))}))}else t.$watch("value",(function(n){if(n!==e.modelValue){var o=Xt(n,t.varType,t.uicontrol);Object(l["nextTick"])((function(){e.modelValue=o}))}}))}});var en,tn={class:"pluginSettings",ref:"root"},nn=["id"],on={class:"card-content"},rn=["id"],ln=["onClick","disabled","value"],an={class:"confirm-password-modal modal"},un={class:"modal-content"},cn={class:"modal-footer"},sn=["disabled"];function dn(e,t,n,o,r,i){var a=this,u=Object(l["resolveComponent"])("PluginSetting"),c=Object(l["resolveComponent"])("ActivityIndicator"),s=Object(l["resolveComponent"])("Field");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",tn,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.settingsPerPlugin,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"card",id:"".concat(t.pluginName,"PluginSettings"),key:"".concat(t.pluginName,"PluginSettings")},[Object(l["createElementVNode"])("div",on,[Object(l["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(l["toDisplayString"])(t.title),9,rn),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.settings,(function(n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:"".concat(n.pluginName,".").concat(n.name)},[Object(l["createVNode"])(u,{modelValue:e.settingValues["".concat(t.pluginName,".").concat(n.name)],"onUpdate:modelValue":function(o){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=o},"plugin-name":t.pluginName,setting:n,"setting-values":e.settingValues},null,8,["modelValue","onUpdate:modelValue","plugin-name","setting","setting-values"])])})),128)),Object(l["createElementVNode"])("input",{type:"button",onClick:function(n){return e.saveSetting(t.pluginName)},disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,ln),Object(l["createVNode"])(c,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,nn)})),128)),Object(l["createElementVNode"])("div",an,[Object(l["createElementVNode"])("div",un,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(s,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",name:"currentUserPassword",autocomplete:!1,"full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","title"])])]),Object(l["createElementVNode"])("div",cn,[Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.passwordConfirmation?void 0:"disabled",onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.save(a.settingsToSave)})},Object(l["toDisplayString"])(e.translate("General_Yes")),9,sn),Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=function(e){return e.preventDefault()})},Object(l["toDisplayString"])(e.translate("General_No")),1)])])],512)}function mn(e,t,n,o,r,i){var a=Object(l["resolveComponent"])("FormField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.changeValue(t)}),"form-field":Object.assign(Object.assign({},e.setting),{},{condition:e.conditionFunction})},null,8,["model-value","form-field"])])}function fn(e,t){return gn(e)||hn(e,t)||bn(e,t)||pn()}function pn(){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 bn(e,t){if(e){if("string"===typeof e)return vn(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)?vn(e,t):void 0}}function vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function hn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function gn(e){if(Array.isArray(e))return e}var On=Object(l["defineComponent"])({props:{pluginName:{type:String,required:!0},setting:{type:Object,required:!0},modelValue:null,settingValues:Object},components:{FormField:It},emits:["update:modelValue"],computed:{conditionFunction:function(){var e=this,t=this.setting.condition;if(t)return function(){if(!en){var n=i["Matomo"].helper.getAngularDependency("$rootScope");en=n.$new(!0)}return en.$eval(t,e.conditionValues)}},conditionValues:function(){var e=this,t={};return Object.entries(this.settingValues).forEach((function(n){var o=fn(n,2),r=o[0],i=o[1],l=r.split("."),a=fn(l,2),u=a[0],c=a[1];u===e.pluginName&&(t[c]=i)})),t}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});On.render=mn;var yn=On;function jn(e,t){return kn(e)||Sn(e,t)||wn(e,t)||Vn()}function Vn(){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 wn(e,t){if(e){if("string"===typeof e)return Cn(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)?Cn(e,t):void 0}}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Sn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(i.push(o.value),t&&i.length===t)break}catch(u){a=!0,r=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw r}}return i}}function kn(e){if(Array.isArray(e))return e}var An=window,Fn=An.$,Bn=Object(l["defineComponent"])({props:{mode:String},components:{ActivityIndicator:i["ActivityIndicator"],Field:Qt,PluginSetting:yn},data:function(){return{isLoading:!0,isSaving:{},passwordConfirmation:"",settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;i["AjaxHelper"].fetch({method:this.apiMethod}).then((function(t){e.isLoading=!1,e.settingsPerPlugin=t,t.forEach((function(t){t.settings.forEach((function(n){e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}))})),window.anchorLinkFix.scrollToAnchorInUrl(),e.addSectionsToTableOfContents()})).catch((function(){e.isLoading=!1}))},computed:{apiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents:function(){var e=Fn("#generalSettingsTOC");if(e.length){var t=this.settingsPerPlugin;t.forEach((function(t){var n=t.pluginName,o=t.settings;n&&("CoreAdminHome"===n&&o?o.filter((function(e){return e.introduction})).forEach((function(t){e.append('<a href="#/'.concat(n,'PluginSettings">').concat(t.introduction,"</a> "))})):e.append('<a href="#/'.concat(n,'">').concat(n.replace(/([A-Z])/g," $1").trim(),"</a> ")))}))}},saveSetting:function(e){"admin"===this.mode?this.showPasswordConfirmModal(e):this.save(e)},showPasswordConfirmModal:function(e){var t=this;this.settingsToSave=e;var n=this.$refs.root,o=Fn(n),r=function(n){var r=n.keyCode?n.keyCode:n.which;13===r&&(o.find(".confirm-password-modal").modal("close"),t.save(e))};o.find(".confirm-password-modal").modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";Fn(e).focus(),Fn(e).off("keypress").keypress(r)}}).modal("open")},save:function(e){var t=this,n=this.saveApiMethod;this.isSaving[e]=!0;var o=this.getValuesForPlugin(e);i["AjaxHelper"].post({method:n},{settingValues:o,passwordConfirmation:this.passwordConfirmation}).then((function(){t.isSaving[e]=!1,i["NotificationsStore"].show({message:Object(i["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"}),i["NotificationsStore"].scrollToNotification("generalSettings")})).catch((function(){t.isSaving[e]=!1})),this.passwordConfirmation="",this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var o=jn(n,2),r=o[0],i=o[1],l=r.split("."),a=jn(l,2),u=a[0],c=a[1];if(u===e){var s=i;!1===s?s="0":!0===s&&(s="1"),t[u].push({name:c,value:s})}})),t}}});Bn.render=dn;var En=Bn,xn=(Object(i["createAngularJsAdapter"])({component:En,scope:{mode:{angularJsBind:"@"}},directiveName:"piwikPluginSettings"}),window),Nn=xn.$; /*! * Matomo - free/libre analytics platform * @@ -35,13 +35,13 @@ * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var Jn=window,Dn=Jn.$;function Hn(e){e.preventDefault(),i["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function In(e){var t=Dn("[name=pluginZip]"),n=t.val();n&&".zip"===n.slice(-4)?t.data("maxSize")>0&&t[0].files[0].size>1048576*t.data("maxSize")&&(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var Ln={mounted:function(){setTimeout((function(){Dn(".uploadPlugin").click(Hn),Dn("#uploadPluginForm").submit(In)}))}}; +var Jn=window,Dn=Jn.$;function Hn(e){e.preventDefault(),i["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function Ln(e){var t=Dn("[name=pluginZip]"),n=t.val();n&&".zip"===n.slice(-4)?t.data("maxSize")>0&&t[0].files[0].size>1048576*t.data("maxSize")&&(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(i["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var In={mounted:function(){setTimeout((function(){Dn(".uploadPlugin").click(Hn),Dn("#uploadPluginForm").submit(Ln)}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function zn(){return{restrict:"A",link:function(){Ln.mounted()}}}window.angular.module("piwikApp").directive("piwikPluginUpload",zn); + */function zn(){return{restrict:"A",link:function(){In.mounted()}}}window.angular.module("piwikApp").directive("piwikPluginUpload",zn); /*! * Matomo - free/libre analytics platform * diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue index b0b4909eb8..a91b91c377 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldExpandableSelect.vue @@ -28,7 +28,8 @@ <li v-for="(options, index) in availableOptions" class="collection-item" - v-show="options.values.filter(x => x.value.indexOf(searchTerm) !== -1).length" + v-show="options.values.filter(x => + x.value.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1).length" :key="index" > <h4 @@ -48,7 +49,8 @@ <ul v-show="showCategory === options.group || searchTerm" class="collection secondLevel"> <li class="expandableListItem collection-item valign-wrapper" - v-for="children in options.values.filter(x => x.value.indexOf(searchTerm) !== -1)" + v-for="children in options.values.filter(x => + x.value.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1)" :key="children.key" @click="onValueClicked(children)" > diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js index 0c3a9e7bd0..cb183b952c 100644 --- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js +++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js @@ -198,6 +198,32 @@ describe("SegmentSelectorEditorTest", function () { expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('updated_details'); }); + it('should display autocomplete dropdown options correctly with lower case', async function() { + await page.click('.expandableSelector .select-wrapper'); + await page.waitForSelector('.expandableList'); + await page.click('.expandableSelector'); + await page.type('.expandableSelector', 'event'); + await page.waitForTimeout(100); + expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('autocomplete_lowercase'); + }); + + it('should display autocomplete dropdown options correctly with upper case', async function() { + const input = await page.$('.expandableSelector'); + await input.click({ clickCount: 3 }) + await page.type('.expandableSelector', 'EVENT'); + await page.waitForTimeout(100); + expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('autocomplete_uppercase'); + }); + + it('should display autocomplete dropdown options correctly with capitalized', async function() { + const input = await page.$('.expandableSelector'); + await input.click({ clickCount: 3 }) + await page.type('.expandableSelector', 'Event'); + await page.waitForTimeout(100); + expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('autocomplete_capitalized'); + }); + + it("should correctly show delete dialog when the delete link is clicked", async function() { await page.click('.segmentEditorPanel a.delete'); await page.waitForTimeout(500); // animation diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png new file mode 100644 index 0000000000..8366873451 --- /dev/null +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cde5c4f13c565e85374f56c3d39106df049db675e9e5598a1980723eecb52802 +size 55438 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png new file mode 100644 index 0000000000..ea7dcd1fb3 --- /dev/null +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aaceaa9298d53b9bf0dddcddc4366c52cb21c5ae7928c5834b2be5eb1e508e8 +size 55439 diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png new file mode 100644 index 0000000000..562cb51e9a --- /dev/null +++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7f95a1e4b84fc2a161d8204fcff4c6de922e3f98968617d303f3fe082f18d59 +size 55481 |