Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CorePluginsAdmin.umd.min.js « dist « vue « CorePluginsAdmin « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d1de6b9a54e2a0d9ab69a3ffd42783fd4e53f956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
(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 i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));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 Gt})),n.d(t,"Field",(function(){return en})),n.d(t,"PluginSettings",(function(){return Ln})),n.d(t,"PluginFilter",(function(){return so})),n.d(t,"PluginManagement",(function(){return _n})),n.d(t,"PluginUpload",(function(){return Qn})),n.d(t,"SaveButton",(function(){return ho})),n.d(t,"Form",(function(){return jo})),n.d(t,"GroupedSettings",(function(){return yn})),n.d(t,"PasswordConfirmation",(function(){return En})),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var r=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,i,r){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,modelModifiers:e.modelModifiers,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||e.hasInlineHelpSlot?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",s,[e.inlineHelpComponent?(Object(l["openBlock"])(),Object(l["createBlock"])(Object(l["resolveDynamicComponent"])(e.inlineHelpComponent),Object(l["normalizeProps"])(Object(l["mergeProps"])({key:0},e.inlineHelpBind)),null,16)):Object(l["createCommentVNode"])("",!0),Object(l["renderSlot"])(e.$slots,"inline-help")],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,i,r){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.isChecked,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,Number,String],modelModifiers:Object,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){var t=e.target.checked;if(this.modelValue!==t){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);var o={value:t,abort:function(){e.target.checked=!t}};this.$emit("update:modelValue",o)}}},computed:{isChecked:function(){return!!this.modelValue&&"0"!==this.modelValue}}});h.render=v;var g=h,O={ref:"root"},j=["value","checked","onChange","id","name"];function y(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",O,[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,j),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))],512)}function V(e){return k(e)||S(e)||C(e)||w()}function w(){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 C(e,t){if(e){if("string"===typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function S(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function k(e){if(Array.isArray(e))return A(e)}function A(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 F(e,t){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var B=Object(l["defineComponent"])({props:{modelValue:Array,modelModifiers:Object,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return F(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t,n=this,o=V(this.checkboxStates);o[e]=!o[e];var i=this.availableOptions||{},r=[];if(Object.values(i).forEach((function(e,t){o[t]&&r.push(e.key)})),null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var l={value:r,abort:function(){var t=n.$refs.root.querySelectorAll("input").item(e);t.checked=!t.checked}};this.$emit("update:modelValue",l)}else this.$emit("update:modelValue",r)}}});B.render=y;var x=B,E={class:"expandableSelector"},N=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),M=["value"],$={class:"expandableList z-depth-2"},T={class:"searchContainer"},P={class:"collection firstLevel"},J=["onClick"],H={class:"collection secondLevel"},D=["onClick"],I={class:"primary-content"},L=["title"];function z(e,t,n,o,i,r){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"},[N,Object(l["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,M)]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",$,[Object(l["createElementVNode"])("div",T,[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",P,[(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,J),Object(l["withDirectives"])(Object(l["createElementVNode"])("ul",H,[(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",I,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 U(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 i={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(i.tooltip=t.tooltip),n[o].values.push(i)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var q=Object(l["defineComponent"])({props:{modelValue:[Number,String],modelModifiers:Object,availableOptions:Array,title:String},directives:{FocusAnywhereButHere:r["FocusAnywhereButHere"],FocusIf:r["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){var t;if(this.showSelect=!1,null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var n={value:e.key,abort:function(){}};this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",e.key)}}});q.render=z;var K=q,_=["for","innerHTML"];function R(e,t,n,o,i,r){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)}),"model-modifiers":e.modelModifiers,field:e.uiControlAttributes.field},null,8,["name","model-value","model-modifiers","field"])])}var G=Object(l["defineComponent"])({components:{FieldArray:r["FieldArray"]},props:{name:String,title:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});G.render=R;var W=G,Z={class:"btn"},Y=["for","innerHTML"],Q=["name","id"],X={class:"file-path-wrapper"},ee=["value"];function te(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",Z,[Object(l["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Y),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,Q)]),Object(l["createElementVNode"])("div",X,[Object(l["createElementVNode"])("input",{class:"file-path validate",value:e.filePath,type:"text"},null,8,ee)])])}var ne=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:[String,File],modelModifiers:Object},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,n=e.target.files;if(n){var o=n.item(0);if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var i={value:o,abort:function(){}};this.$emit("update:modelValue",i)}else this.$emit("update:modelValue",o)}}},computed:{filePath:function(){if(this.modelValue instanceof File)return this.$refs.fileInput.value}}});ne.render=te;var oe=ne,ie=["type","name","value"];function re(e,t,n,o,i,r){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,ie)])}var le=Object(l["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});le.render=re;var ae=le,ue={class:"fieldMultiTuple"},ce=["for","innerHTML"];function se(e,t,n,o,i,r){var a=Object(l["resolveComponent"])("MultiPairField");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",ue,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ce),Object(l["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,"model-modifiers":e.modelModifiers,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","model-modifiers","field1","field2","field3","field4"])])}var de=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:r["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});de.render=se;var me=de,fe=["type","id","name","value"],pe=["for","innerHTML"];function be(e,t,n,o,i,r){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.modelValueFormatted,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,fe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,pe)],64)}var ve=Object(l["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(r["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=this,n=parseFloat(e.target.value);if(n!==this.modelValue){var o;if(null===(o=this.modelModifiers)||void 0===o||!o.abortable)return void this.$emit("update:modelValue",n);var i={value:n,abort:function(){e.target.value!==t.modelValueFormatted&&(e.target.value=t.modelValueFormatted)}};this.$emit("update:modelValue",i)}}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},computed:{modelValueFormatted:function(){return(this.modelValue||"").toString()}}});ve.render=be;var he=ve,ge={ref:"root"},Oe=["value","id","name","disabled","checked"];function je(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",ge,[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,Oe),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))],512)}var ye=Object(l["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){var t,n=this;if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var o=function(){n.$refs.root.querySelectorAll("input").forEach((function(e,t){var o;if(null!==(o=n.availableOptions)&&void 0!==o&&o[t]){var i=n.availableOptions[t].key;e.checked=n.modelValue===i||"".concat(n.modelValue)===i}}))},i={value:e.target.value,abort:function(){o()}};this.$emit("update:modelValue",i)}else this.$emit("update:modelValue",e.target.value)}}});ye.render=je;var Ve=ye;function we(e,t){return Fe(e)||Ae(e,t)||Se(e,t)||Ce()}function Ce(){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 Se(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 Ae(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){a=!0,i=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw i}}return r}}function Fe(e){if(Array.isArray(e))return e}var Be={key:0,class:"matomo-field-select"},xe=["multiple","name"],Ee=["label"],Ne=["value","selected","disabled"],Me=["for","innerHTML"],$e={key:1,class:"matomo-field-select"},Te=["multiple","name"],Pe=["value","selected","disabled"],Je=["for","innerHTML"];function He(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[e.groupedOptions?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Be,[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=we(t,2),o=n[0],i=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"])(i,(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,Ne)})),128))],8,Ee)})),128))],16,xe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Me)])):Object(l["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",$e,[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,Pe)})),128))],16,Te),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Je)])):Object(l["createCommentVNode"])("",!0)],64)}function De(e){return ze(e)||Le(e)||Ke(e)||Ie()}function Ie(){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 Le(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ze(e){if(Array.isArray(e))return _e(e)}function Ue(e,t){return Ge(e)||Re(e,t)||Ke(e,t)||qe()}function qe(){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 Ke(e,t){if(e){if("string"===typeof e)return _e(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)?_e(e,t):void 0}}function _e(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 Re(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){a=!0,i=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw i}}return r}}function Ge(e){if(Array.isArray(e))return e}function We(e){return We="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},We(e)}function Ze(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;if(e){var r=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=i?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),r.formSelect(o),n){var l=r.closest(".select-wrapper").find("input");l.attr("placeholder",n)}}}function Ye(e){return!Array.isArray(e)&&"object"===We(e)&&Object.values(e).some((function(e){return"object"===We(e)}))}function Qe(e,t){return e.some((function(e){return e.key===t}))}function Xe(e,t,n){if(!e)return[];var o=!0,i=e;Ye(i)||(i={"":e},o=!1);var r=[];return Object.entries(i).forEach((function(e){var n=Ue(e,2),i=n[0],l=n[1];Object.entries(l).forEach((function(e){var n=Ue(e,2),l=n[0],a=n[1];if(a&&"object"===We(a)&&"undefined"!==typeof a.key)r.push(a);else{var u=l;"integer"===t&&"string"===typeof l&&(u=parseInt(l,10)),r.push({group:o?i:void 0,key:u,value:a})}}))})),null!==n&&void 0!==n&&n.placeholder&&!Qe(r,"")?[{key:"",value:""}].concat(r):r}function et(e){return"string"===typeof e?e.replace(/^string:/,""):e}var tt=Object(l["defineComponent"])({props:{modelValue:null,modelModifiers:Object,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||Qe(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(De(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,o=this,i=e.target;if(this.multiple?(n=Array.from(i.options).filter((function(e){return e.selected})).map((function(e){return e.value})),n=n.map((function(e){return et(e)}))):(n=i.value,n=et(n)),null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var r={value:n,abort:function(){o.onModelValueChange(o.modelValue)}};this.$emit("update:modelValue",r)}else this.$emit("update:modelValue",n)},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){var n;Ze(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&&Ze(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;Ze(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;Ze(e.$refs.select,e.modelValue,null===(t=e.uiControlAttributes)||void 0===t?void 0:t.placeholder,e.uiControlOptions,e.multiple)}))}});tt.render=He;var nt=tt,ot=["for","innerHTML"],it={class:"sites_autocomplete"};function rt(e,t,n,o,i,r){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,ot),Object(l["createElementVNode"])("div",it,[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 lt=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:r["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){var t;if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var n={value:e,abort:function(){}};this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",e)}}});lt.render=rt;var at=lt,ut=["type","id","name","value"],ct=["for","innerHTML"];function st(e,t,n,o,i,r){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,ut),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ct)],64)}var dt=Object(l["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object,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(r["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){var t=this,n=e.target.value;if(this.modelValue!==n){var o;if(null===(o=this.modelModifiers)||void 0===o||!o.abortable)return void this.$emit("update:modelValue",n);var i={value:n,abort:function(){e.target.value!==t.modelValueText&&(e.target.value=t.modelValueText)}};this.$emit("update:modelValue",i)}}}});dt.render=st;var mt=dt,ft=["for","innerHTML"],pt=["type","name","value"];function bt(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,ft),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,pt)])}var vt=Object(l["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,modelModifiers:Object,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(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(",").map((function(e){return e.trim()}));if(n.join(", ")!==this.concattedValues){var o;if(null===(o=this.modelModifiers)||void 0===o||!o.abortable)return void this.$emit("update:modelValue",n);var i={value:n,abort:function(){e.target.value!==t.concattedValues&&(e.target.value=t.concattedValues)}};this.$emit("update:modelValue",i)}}}});vt.render=bt;var ht=vt,gt=["name","id","value"],Ot=["for","innerHTML"];function jt(e,t,n,o,i,r){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.modelValueText,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,gt),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ot)],64)}var yt=Object(l["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,modelModifiers:Object,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value;if(n!==this.modelValue){var o;if(null===(o=this.modelModifiers)||void 0===o||!o.abortable)return void this.$emit("update:modelValue",n);var i={value:n,abort:function(){e.target.value!==t.modelValue&&(e.target.value=t.modelValueText)}};this.$emit("update:modelValue",i)}}},computed:{modelValueText:function(){return this.modelValue||""}},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()}))}});yt.render=jt;var Vt=yt,wt=["for","innerHTML"],Ct=["name","value"];function St(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,wt),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,Ct)])}var kt="\n",At=Object(l["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(kt)}},created:function(){this.onKeydown=Object(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(kt);if(n.join(kt)!==this.concattedValue){var o;if(null===(o=this.modelModifiers)||void 0===o||!o.abortable)return void this.$emit("update:modelValue",n);var i={value:n,abort:function(){e.target.value!==t.concattedValue&&(e.target.value=t.concattedValue)}};this.$emit("update:modelValue",i)}}},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()}))}});At.render=St;var Ft=At;function Bt(e){return Bt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function xt(e,t){return Tt(e)||$t(e,t)||Nt(e,t)||Et()}function Et(){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 Nt(e,t){if(e){if("string"===typeof e)return Mt(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)?Mt(e,t):void 0}}function Mt(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 $t(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){a=!0,i=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw i}}return r}}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 Pt(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var o=xt(e,2),i=o[0],r=o[1];if(r&&"object"===Bt(r)&&"undefined"!==typeof r.key)n.push(r);else{var l=i;"integer"===t&&"string"===typeof i&&(l=parseInt(l,10)),n.push({key:l,value:r})}})),n}var Jt={ref:"root"};function Ht(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Jt,null,512)}function Dt(e){if("undefined"!==typeof e)return JSON.parse(JSON.stringify(e))}var It=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(r["Matomo"].cacheBuster,"'\"></div>")),i=r["Matomo"].helper.getAngularDependency("$timeout"),a=r["Matomo"].helper.getAngularDependency("$rootScope"),u=a.$new();return u.formField=Object.assign(Object.assign({},Dt(e.formField)),{},{value:Dt(e.modelValue)}),u.$watch("formField.value",(function(n,o){n!==o&&JSON.stringify(n)!==JSON.stringify(e.modelValue)&&t.emit("update:modelValue",Dt(n))})),Object(l["watch"])((function(){return e.modelValue}),(function(e){JSON.stringify(e)!==JSON.stringify(u.formField.value)&&i((function(){u.formField.value=e}))})),Object(l["watch"])((function(){return e.formField}),(function(e){i((function(){var t=u.formField.value;u.formField=Object.assign(Object.assign({},Dt(e)),{},{value:t})}))}),{deep:!0}),Object(l["onMounted"])((function(){window.$(n.value).append(o),r["Matomo"].helper.compileAngularComponents(o,{scope:u,params:{formField:Object.assign(Object.assign({},Dt(e.formField)),{},{value:e.modelValue})}})})),{root:n}}});It.render=Ht;var Lt=It;function zt(e){return zt="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},zt(e)}var Ut=["password","url","search","email"],qt=["textarea","checkbox","text"],Kt={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"},_t={FieldSelect:Xe,FieldCheckboxArray:Pt,FieldRadio:Pt,FieldExpandableSelect:U},Rt=Object(l["defineComponent"])({props:{modelValue:null,modelModifiers:Object,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:g,FieldCheckboxArray:x,FieldExpandableSelect:K,FieldFieldArray:W,FieldFile:oe,FieldHidden:ae,FieldMultituple:me,FieldNumber:he,FieldRadio:Ve,FieldSelect:nt,FieldSite:at,FieldText:mt,FieldTextArray:ht,FieldTextarea:Vt,FieldTextareaArray:Ft},setup:function(e){var t=Object(l["ref"])(null),n=function(e){var n;e&&t.value&&"function"!==typeof e.render&&(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:{inlineHelpComponent:function(){var e=this.formField,t=e.inlineHelp;if(t&&"function"===typeof t.render)return e.inlineHelp},inlineHelpBind:function(){return this.inlineHelpComponent?this.formField.inlineHelpBind:void 0},childComponent:function(){var e=this.formField;if(e.component){var t=e.component;if(e.component.plugin){var n=e.component,o=n.plugin,i=n.name;if(!o||!i)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");t=Object(r["useExternalPluginComponent"])(o,i)}return Object(l["markRaw"])(t)}if(e.templateFile)return Object(l["markRaw"])(Lt);var a=e.uiControl,u=Kt[a];return-1!==Ut.indexOf(a)&&(u="FieldText"),"array"===this.formField.type&&-1!==qt.indexOf(a)&&(u="".concat(u,"Array")),u},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue||this.hasInlineHelpSlot},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!(this.formField&&this.formField.condition&&this.formField.condition instanceof Function)||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&&_t[e]?_t[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(r){}if(null!==o&&"object"===zt(o))return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?"".concat(t):"";var i=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach((function(e){"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&i.push(e.value)})),i.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)},hasInlineHelpSlot:function(){var e,t;if(!this.$slots["inline-help"])return!1;var n=this.$slots["inline-help"]();return!(null===n||void 0===n||null===(e=n[0])||void 0===e||null===(t=e.children)||void 0===t||!t.length)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});Rt.render=m;var Gt=Rt;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Wt(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(r["useExternalPluginComponent"])(t,n)}}function Zt(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(r["createAngularJsAdapter"])({component:Gt,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(r["transformAngularJsBoolAttr"])(t.value):t.value}},piwikFormField:{vue:"formField",angularJsBind:"=",transform:function(e,t,n){var o=e;function i(){if(o.templateFile)return Object(l["markRaw"])(Lt);var e=Wt(o.component);return e?Object(l["markRaw"])(e):void 0}return Object.assign(Object.assign({},o),{},{condition:o.condition?Zt.bind(null,n,o.condition):o.condition,disabled:Object(r["transformAngularJsBoolAttr"])(o.disabled),autocomplete:Object(r["transformAngularJsBoolAttr"])(o.autocomplete),autofocus:Object(r["transformAngularJsBoolAttr"])(o.autofocus),tabindex:Object(r["transformAngularJsIntAttr"])(o.tabindex),fullWidth:Object(r["transformAngularJsBoolAttr"])(o.fullWidth),maxlength:Object(r["transformAngularJsIntAttr"])(o.maxlength),required:Object(r["transformAngularJsBoolAttr"])(o.required),rows:Object(r["transformAngularJsIntAttr"])(o.rows),min:Object(r["transformAngularJsIntAttr"])(o.min),max:Object(r["transformAngularJsIntAttr"])(o.max),component:i()})}},allSettings:{angularJsBind:"="}},directiveName:"piwikFormField",events:{"update:modelValue":function(e,t,n,o,i,r,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?Zt.bind(null,t,t.piwikFormField.condition):t.piwikFormField.condition})}),!0)}});function Yt(e,t,n,o,i,r){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)}),"model-modifiers":e.modelModifiers},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["renderSlot"])(e.$slots,"inline-help")]})),_:3},8,["form-field","model-value","model-modifiers"])}var Qt={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},Xt=Object(l["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:[String,Object],inlineHelpBind:Object,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:String,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null,templateFile:String},emits:["update:modelValue"],components:{FormField:Gt},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&Qt[e]?Qt[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,inlineHelpBind:this.inlineHelpBind,title:this.title,component:this.component,templateFile:this.templateFile,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)}}});Xt.render=Yt;var en=Xt;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function tn(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=r["Matomo"].helper.htmlDecode(o.name)),o}return"checkbox"===n&&"array"!==t?Object(r["transformAngularJsBoolAttr"])(e):e}Object(r["createAngularJsAdapter"])({component:en,require:"?ngModel",scope:{uicontrol:{angularJsBind:"@"},name:{angularJsBind:"@"},value:{vue:"modelValue",angularJsBind:"@",transform:function(e,t,n){return tn(e,n.varType,n.uicontrol)}},default:{vue:"defaultValue",angularJsBind:"@"},options:{angularJsBind:"="},description:{angularJsBind:"@"},introduction:{angularJsBind:"@"},title:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@"},disabled:{angularJsBind:"=",transform:r["transformAngularJsBoolAttr"]},uiControlAttributes:{angularJsBind:"="},uiControlOptions:{angularJsBind:"="},autocomplete:{angularJsBind:"@"},condition:{angularJsBind:"@",transform:function(e,t,n){if(e)return function(t){return n.$eval(e,t)}}},varType:{angularJsBind:"@"},autofocus:{angularJsBind:"@",transform:r["transformAngularJsBoolAttr"]},tabindex:{angularJsBind:"@",transform:r["transformAngularJsIntAttr"]},fullWidth:{angularJsBind:"@",transform:r["transformAngularJsBoolAttr"]},maxlength:{angularJsBind:"@",transform:r["transformAngularJsIntAttr"]},required:{angularJsBind:"@",transform:r["transformAngularJsBoolAttr"]},placeholder:{angularJsBind:"@"},rows:{angularJsBind:"@",transform:r["transformAngularJsIntAttr"]},min:{angularJsBind:"@",transform:r["transformAngularJsIntAttr"]},max:{angularJsBind:"@",transform:r["transformAngularJsIntAttr"]},component:{angularJsBind:"<",transform:function(e,t,n){if(e){if(n.templateFile)return Object(l["shallowRef"])(Lt);var o=e.plugin,i=e.name;if(!o||!i)throw new Error("Invalid component property given to piwik-field directive, must be {plugin: '...',name: '...'}");return Object(l["shallowRef"])(Object(r["useExternalPluginComponent"])(o,i))}}}},directiveName:"piwikField",$inject:["$timeout"],events:{"update:modelValue":function(e,t,n,o,i,r,l){var a=r?r.$viewValue:n.value;e!==a&&l((function(){r?(r.$setViewValue(e),r.$render()):n.value=e}))}},postCreate:function(e,t,n,o,i){var a=i;if(a){if(a.$render=function(){Object(l["nextTick"])((function(){e.modelValue=Object(r["removeAngularJsSpecificProperties"])(a.$viewValue)}))},"undefined"!==typeof t.value){var u=tn(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=tn(n,t.varType,t.uicontrol);Object(l["nextTick"])((function(){e.modelValue=o}))}}))}});var nn,on={class:"pluginSettings",ref:"root"},rn=["id"],ln={class:"card-content"},an=["id"],un=["onClick","disabled","value"];function cn(e,t,n,o,i,r){var a=Object(l["resolveComponent"])("GroupedSettings"),u=Object(l["resolveComponent"])("ActivityIndicator"),c=Object(l["resolveComponent"])("PasswordConfirmation");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",on,[(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",ln,[Object(l["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(l["toDisplayString"])(t.title),9,an),Object(l["createVNode"])(a,{"group-name":t.pluginName,settings:t.settings,"all-setting-values":e.settingValues,onChange:function(n){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}},null,8,["group-name","settings","all-setting-values","onChange"]),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,un),Object(l["createVNode"])(u,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,rn)})),128)),Object(l["createVNode"])(c,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.confirmPassword},{default:Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)}function sn(e,t,n,o,i,r){var a=Object(l["resolveComponent"])("GroupedSetting");return Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.settings,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:"".concat(e.groupPrefix).concat(t.name)},[Object(l["createVNode"])(a,{"model-value":e.allSettingValues["".concat(e.groupPrefix).concat(t.name)],"onUpdate:modelValue":function(n){return e.$emit("change",{name:t.name,value:n})},setting:t,"condition-values":e.settingValues},null,8,["model-value","onUpdate:modelValue","setting","condition-values"])])})),128)}function dn(e,t,n,o,i,r){var a=Object(l["resolveComponent"])("FormField");return Object(l["withDirectives"])((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":e.settingWithComponent},null,8,["model-value","form-field"])],512)),[[l["vShow"],e.showField]])}var mn=Object(l["defineComponent"])({props:{setting:{type:Object,required:!0},modelValue:null,conditionValues:{type:Object,required:!0}},components:{FormField:Gt},emits:["update:modelValue"],computed:{settingWithComponent:function(){return this.setting.templateFile?Object.assign(Object.assign({},this.setting),{},{component:Lt}):this.setting},showField:function(){var e=this.setting.condition;if(!e)return!0;if(!nn){var t=r["Matomo"].helper.getAngularDependency("$rootScope");nn=t.$new(!0)}return nn.$eval(e,this.conditionValues)}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});mn.render=dn;var fn=mn;function pn(e,t){return On(e)||gn(e,t)||vn(e,t)||bn()}function bn(){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 vn(e,t){if(e){if("string"===typeof e)return hn(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)?hn(e,t):void 0}}function hn(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 gn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){a=!0,i=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw i}}return r}}function On(e){if(Array.isArray(e))return e}var jn=Object(l["defineComponent"])({props:{groupName:String,settings:{type:Array,required:!0},allSettingValues:{type:Object,required:!0}},emits:["change"],components:{GroupedSetting:fn},computed:{settingValues:function(){var e=this,t=Object.entries(this.allSettingValues).filter((function(t){var n=pn(t,1),o=n[0];if(e.groupName){var i=o.split("."),r=pn(i,1),l=r[0];if(l!==e.groupName)return!1}return!0})).map((function(t){var n=pn(t,2),o=n[0],i=n[1];return e.groupName?[o.split(".")[1],i]:[o,i]}));return Object.fromEntries(t)},groupPrefix:function(){return this.groupName?"".concat(this.groupName,"."):""}}});jn.render=sn;var yn=jn,Vn={class:"confirm-password-modal modal",ref:"root"},wn={class:"modal-content"},Cn={class:"modal-text"},Sn={class:"modal-footer"},kn=["disabled"];function An(e,t,n,o,i,r){var a=Object(l["resolveComponent"])("Field");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Vn,[Object(l["createElementVNode"])("div",wn,[Object(l["createElementVNode"])("div",Cn,[Object(l["renderSlot"])(e.$slots,"default")]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",disabled:e.requiresPasswordConfirmation?void 0:"disabled",name:"currentUserPassword",autocomplete:"off","full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","disabled","title"])])]),Object(l["createElementVNode"])("div",Sn,[Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.requiresPasswordConfirmation&&!e.passwordConfirmation?"disabled":void 0,onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.$emit("confirmed",e.passwordConfirmation),e.passwordConfirmation=""})},Object(l["toDisplayString"])(e.translate("General_Yes")),9,kn),Object(l["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no btn-flat",onClick:t[2]||(t[2]=function(t){t.preventDefault(),e.$emit("aborted")})},Object(l["toDisplayString"])(e.translate("General_No")),1)])],512)}var Fn=window,Bn=Fn.$,xn=Object(l["defineComponent"])({props:{modelValue:{type:Boolean,required:!0}},data:function(){return{passwordConfirmation:""}},emits:["confirmed","aborted","update:modelValue"],components:{Field:en},activated:function(){this.$emit("update:modelValue",!1)},methods:{showPasswordConfirmModal:function(){var e=this,t=this.$refs.root,n=Bn(t),o=function(t){var o=t.keyCode?t.keyCode:t.which;13===o&&(n.modal("close"),e.$emit("confirmed",e.passwordConfirmation),e.passwordConfirmation="")};n.modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";Bn(e).focus(),Bn(e).off("keypress").keypress(o)},onCloseEnd:function(){e.$emit("update:modelValue",!1)}}).modal("open")}},computed:{requiresPasswordConfirmation:function(){return!!r["Matomo"].requiresPasswordConfirmation}},watch:{modelValue:function(e){e&&this.showPasswordConfirmModal()}}});xn.render=An;var En=xn;function Nn(e,t){return Jn(e)||Pn(e,t)||$n(e,t)||Mn()}function Mn(){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 $n(e,t){if(e){if("string"===typeof e)return Tn(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)?Tn(e,t):void 0}}function Tn(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 Pn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done);l=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){a=!0,i=u}finally{try{l||null==n["return"]||n["return"]()}finally{if(a)throw i}}return r}}function Jn(e){if(Array.isArray(e))return e}var Hn=window,Dn=Hn.$,In=Object(l["defineComponent"])({props:{mode:String},components:{PasswordConfirmation:En,ActivityIndicator:r["ActivityIndicator"],GroupedSettings:yn},data:function(){return{isLoading:!0,isSaving:{},showPasswordConfirmModal:!1,settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;r["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=Dn("#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> ")))}))}},confirmPassword:function(e){this.showPasswordConfirmModal=!1,this.save(this.settingsToSave,e)},saveSetting:function(e){"admin"===this.mode?(this.settingsToSave=e,this.showPasswordConfirmModal=!0):this.save(e)},save:function(e,t){var n=this,o=this.saveApiMethod;this.isSaving[e]=!0;var i=this.getValuesForPlugin(e);r["AjaxHelper"].post({method:o},{settingValues:i,passwordConfirmation:t}).then((function(){n.isSaving[e]=!1;var t=r["NotificationsStore"].show({message:Object(r["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(t)})).catch((function(){n.isSaving[e]=!1})),this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var o=Nn(n,2),i=o[0],r=o[1],l=i.split("."),a=Nn(l,2),u=a[0],c=a[1];if(u===e){var s=r;!1===s?s="0":!0===s&&(s="1"),t[u].push({name:c,value:s})}})),t}}});In.render=cn;var Ln=In,zn=(Object(r["createAngularJsAdapter"])({component:Ln,scope:{mode:{angularJsBind:"@"}},directiveName:"piwikPluginSettings"}),window),Un=zn.$;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function qn(e,t){t.preventDefault();var n=Un(t.target).attr("href"),o=Un(t.target).attr("data-plugin-name");if(n&&o){e.value.uninstallConfirmMessage||(e.value.uninstallConfirmMessage=Un("#uninstallPluginConfirm").text());var i=(e.value.uninstallConfirmMessage||"").replace("%s",o);Un("#uninstallPluginConfirm").text(i),r["Matomo"].helper.modalConfirm("#confirmUninstallPlugin",{yes:function(){window.location.href=n}})}}function Kn(e){e.preventDefault();var t=Un(e.target).data("overlay-id");r["Matomo"].helper.modalConfirm("#".concat(t),{})}var _n={mounted:function(e,t){setTimeout((function(){t.value.uninstallConfirmMessage="",Un(e).find(".uninstall").click(qn.bind(null,t)),Un(e).find(".plugin-donation-link").click(Kn)}))}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Rn(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{},oldValue:null,modifiers:{},dir:{}};_n.mounted(t[0],n)}}}window.angular.module("piwikApp").directive("piwikPluginManagement",Rn);
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
var Gn=window,Wn=Gn.$;function Zn(e){e.preventDefault(),r["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function Yn(e){var t=Wn("[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(r["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(r["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var Qn={mounted:function(){setTimeout((function(){Wn(".uploadPlugin").click(Zn),Wn("#uploadPluginForm").submit(Yn)}))}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Xn(){return{restrict:"A",link:function(){Qn.mounted()}}}window.angular.module("piwikApp").directive("piwikPluginUpload",Xn);
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
var eo=window,to=eo.$;function no(e){return e.find(".origin a.active").data("filter-origin")}function oo(e){return e.find(".status a.active").data("filter-status")}function io(e,t){var n="#plugins tr";return n+="all"===e?"[data-filter-origin]":"[data-filter-origin=".concat(e,"]"),n+="all"===t?"[data-filter-status]":"[data-filter-status=".concat(t,"]"),to(n)}function ro(e,t,n,o){var i=io(n,o).length,r=" (".concat(i,")");e.find("".concat(t," .counter")).text(r)}function lo(e){var t=no(e),n=oo(e);ro(e,'[data-filter-status="all"]',t,"all"),ro(e,'[data-filter-status="active"]',t,"active"),ro(e,'[data-filter-status="inactive"]',t,"inactive"),ro(e,'[data-filter-origin="all"]',"all",n),ro(e,'[data-filter-origin="core"]',"core",n),ro(e,'[data-filter-origin="official"]',"official",n),ro(e,'[data-filter-origin="thirdparty"]',"thirdparty",n)}function ao(e){var t=no(e),n=oo(e),o=io(t,n);to("#plugins tr[data-filter-origin][data-filter-status]").css("display","none"),o.css("display","table-row"),lo(e)}function uo(e,t){t.preventDefault(),to(t.target).siblings().removeClass("active"),to(t.target).addClass("active"),ao(e)}function co(e,t){t.preventDefault(),to(t.target).siblings().removeClass("active"),to(t.target).addClass("active"),ao(e)}var so={mounted:function(e){setTimeout((function(){lo(to(e)),to(e).find(".status").on("click","a",uo.bind(null,to(e))),to(e).find(".origin").on("click","a",co.bind(null,to(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 mo(){return{restrict:"A",link:function(e,t){so.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikPluginFilter",mo);var fo={class:"matomo-save-button",style:{display:"inline-block"}},po=["disabled","value"];function bo(e,t,n,o,i,r){var a=Object(l["resolveComponent"])("ActivityIndicator");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",fo,[Object(l["createElementVNode"])("input",{type:"button",onClick:t[0]||(t[0]=function(t){return e.onConfirm(t)}),disabled:e.saving||e.disabled,class:"btn",value:e.value?e.value:e.translate("General_Save")},null,8,po),Object(l["createVNode"])(a,{loading:e.saving},null,8,["loading"])])}var vo=Object(l["defineComponent"])({props:{saving:Boolean,value:String,disabled:Boolean},components:{ActivityIndicator:r["ActivityIndicator"]},emits:["confirm"],methods:{onConfirm:function(e){this.$emit("confirm",e)}}});vo.render=bo;var ho=vo,go=(Object(r["createAngularJsAdapter"])({component:ho,scope:{saving:{angularJsBind:"=?"},value:{angularJsBind:"@?"},disabled:{angularJsBind:"=?"},onconfirm:{angularJsBind:"&?",vue:"confirm"}},events:{confirm:function(e,t,n,o,i,r,l){o[0].click(),l()}},replace:!0,directiveName:"piwikSaveButton",$inject:["$timeout"]}),window),Oo=go.$,jo={mounted:function(e){setTimeout((function(){Oo(e).find("input[type=text]").keypress((function(t){var n=t.keyCode||t.which;13===n&&Oo(e).find(".matomo-save-button input").triggerHandler("click")}))}))}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
function yo(){return{restrict:"A",link:function(e,t){jo.mounted(t[0])}}}window.angular.module("piwikApp").directive("piwikForm",yo)}})}));
//# sourceMappingURL=CorePluginsAdmin.umd.min.js.map