diff options
Diffstat (limited to 'plugins')
6 files changed, 61 insertions, 40 deletions
diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js index d01067019b..61e6b8e886 100644 --- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js +++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js @@ -199,35 +199,35 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { } // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FormField.vue?vue&type=template&id=b3ece69c -// 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/FieldCheckbox.vue?vue&type=template&id=3ee04378 +// 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/FieldCheckbox.vue?vue&type=template&id=c04f97ea -var FieldCheckboxvue_type_template_id_3ee04378_hoisted_1 = { +var FieldCheckboxvue_type_template_id_c04f97ea_hoisted_1 = { class: "checkbox" }; -var FieldCheckboxvue_type_template_id_3ee04378_hoisted_2 = ["checked", "id", "name"]; -var FieldCheckboxvue_type_template_id_3ee04378_hoisted_3 = ["innerHTML"]; -function FieldCheckboxvue_type_template_id_3ee04378_render(_ctx, _cache, $props, $setup, $data, $options) { - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldCheckboxvue_type_template_id_3ee04378_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ +var FieldCheckboxvue_type_template_id_c04f97ea_hoisted_2 = ["checked", "id", "name"]; +var FieldCheckboxvue_type_template_id_c04f97ea_hoisted_3 = ["innerHTML"]; +function FieldCheckboxvue_type_template_id_c04f97ea_render(_ctx, _cache, $props, $setup, $data, $options) { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", FieldCheckboxvue_type_template_id_c04f97ea_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("label", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", Object(external_commonjs_vue_commonjs2_vue_root_Vue_["mergeProps"])({ onChange: _cache[0] || (_cache[0] = function ($event) { return _ctx.onChange($event); }) }, _ctx.uiControlAttributes, { value: 1, - checked: !!_ctx.modelValue, + checked: _ctx.isChecked, type: "checkbox", id: _ctx.name, name: _ctx.name - }), null, 16, FieldCheckboxvue_type_template_id_3ee04378_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }), null, 16, FieldCheckboxvue_type_template_id_c04f97ea_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.title) - }, null, 8, FieldCheckboxvue_type_template_id_3ee04378_hoisted_3)])]); + }, null, 8, FieldCheckboxvue_type_template_id_c04f97ea_hoisted_3)])]); } -// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=template&id=3ee04378 +// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=template&id=c04f97ea // 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/FieldCheckbox.vue?vue&type=script&lang=ts /* harmony default export */ var FieldCheckboxvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { - modelValue: [Boolean, Number], + modelValue: [Boolean, Number, String], uiControlAttributes: Object, name: String, title: String @@ -240,6 +240,11 @@ function FieldCheckboxvue_type_template_id_3ee04378_render(_ctx, _cache, $props, this.$emit('update:modelValue', event.target.checked); } } + }, + computed: { + isChecked: function isChecked() { + return !!this.modelValue && this.modelValue !== '0'; + } } })); // CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue?vue&type=script&lang=ts @@ -248,7 +253,7 @@ function FieldCheckboxvue_type_template_id_3ee04378_render(_ctx, _cache, $props, -FieldCheckboxvue_type_script_lang_ts.render = FieldCheckboxvue_type_template_id_3ee04378_render +FieldCheckboxvue_type_script_lang_ts.render = FieldCheckboxvue_type_template_id_c04f97ea_render /* harmony default export */ var FieldCheckbox = (FieldCheckboxvue_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/FieldCheckboxArray.vue?vue&type=template&id=b01b8bfc diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js index 32c945e410..0a1caaab3a 100644 --- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js +++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js @@ -1,4 +1,4 @@ -(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 qt})),n.d(t,"Field",(function(){return Qt})),n.d(t,"PluginSettings",(function(){return Tn})),n.d(t,"PluginFilter",(function(){return no})),n.d(t,"PluginManagement",(function(){return Hn})),n.d(t,"PluginUpload",(function(){return Kn})),n.d(t,"SaveButton",(function(){return uo})),n.d(t,"Form",(function(){return mo})),n.d(t,"GroupedSettings",(function(){return wn})),"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,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.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,Number],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 j(e,t,n,o,i,r){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 y(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=y(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=j;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"},H=["onClick"],D={class:"primary-content"},I=["title"];function L(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"},[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",D,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,H)})),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 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 U=Object(l["defineComponent"])({props:{modelValue:[Number,String],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){this.$emit("update:modelValue",e.key),this.showSelect=!1}}});U.render=L;var K=U,_=["for","innerHTML"];function q(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)}),field:e.uiControlAttributes.field},null,8,["name","model-value","field"])])}var R=Object(l["defineComponent"])({components:{FieldArray:r["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 G=R,W={class:"btn"},Z=["for","innerHTML"],Y=["name","id"],Q={class:"file-path-wrapper"},X=["value"];function ee(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",W,[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 ie(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,oe)])}var re=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)}}});re.render=ie;var le=re,ae={class:"fieldMultiTuple"},ue=["for","innerHTML"];function ce(e,t,n,o,i,r){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:r["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,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.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(r["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,i,r){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 je=Oe;function ye(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,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 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,i,r){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=ye(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,Ee)})),128))],8,Be)})),128))],16,Fe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(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.$sanitize(e.title)},null,8,Me)])):Object(l["createCommentVNode"])("",!0)],64)}function Je(e){return Ie(e)||De(e)||Ue(e)||He()}function He(){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 De(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,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 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 Ge(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 We(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,i=e;We(i)||(i={"":e},o=!1);var r=[];return Object.entries(i).forEach((function(e){var n=Le(e,2),i=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)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&&!Ze(r,"")?[{key:"",value:""}].concat(r):r}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;Ge(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&&Ge(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;Ge(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;Ge(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,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,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 it=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:r["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});it.render=ot;var rt=it,lt=["type","id","name","value"],at=["for","innerHTML"];function ut(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,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(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=e.target.value;this.modelValue!==t&&this.$emit("update:modelValue",t)}}});ct.render=ut;var st=ct,dt=["for","innerHTML"],mt=["type","name","value"];function ft(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,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(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(",").map((function(e){return e.trim()}));t.join(", ")!==this.concattedValues&&this.$emit("update:modelValue",t)}}});pt.render=ft;var bt=pt,vt=["name","id","value"],ht=["for","innerHTML"];function gt(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.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(r["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 jt=Ot,yt=["for","innerHTML"],Vt=["name","value"];function wt(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,yt),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(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(Ct);t.join(Ct)!==this.concattedValue&&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,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} +(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 qt})),n.d(t,"Field",(function(){return Qt})),n.d(t,"PluginSettings",(function(){return Tn})),n.d(t,"PluginFilter",(function(){return no})),n.d(t,"PluginManagement",(function(){return Hn})),n.d(t,"PluginUpload",(function(){return Kn})),n.d(t,"SaveButton",(function(){return uo})),n.d(t,"Form",(function(){return mo})),n.d(t,"GroupedSettings",(function(){return wn})),"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,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],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)}},computed:{isChecked:function(){return!!this.modelValue&&"0"!==this.modelValue}}});h.render=v;var g=h,O=["value","checked","onChange","id","name"];function j(e,t,n,o,i,r){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 y(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=y(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=j;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"},H=["onClick"],D={class:"primary-content"},I=["title"];function L(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"},[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",D,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,H)})),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 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 U=Object(l["defineComponent"])({props:{modelValue:[Number,String],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){this.$emit("update:modelValue",e.key),this.showSelect=!1}}});U.render=L;var K=U,_=["for","innerHTML"];function q(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)}),field:e.uiControlAttributes.field},null,8,["name","model-value","field"])])}var R=Object(l["defineComponent"])({components:{FieldArray:r["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 G=R,W={class:"btn"},Z=["for","innerHTML"],Y=["name","id"],Q={class:"file-path-wrapper"},X=["value"];function ee(e,t,n,o,i,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[Object(l["createElementVNode"])("div",W,[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 ie(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,oe)])}var re=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)}}});re.render=ie;var le=re,ae={class:"fieldMultiTuple"},ue=["for","innerHTML"];function ce(e,t,n,o,i,r){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:r["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,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.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(r["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,i,r){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 je=Oe;function ye(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,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 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,i,r){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=ye(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,Ee)})),128))],8,Be)})),128))],16,Fe),Object(l["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(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.$sanitize(e.title)},null,8,Me)])):Object(l["createCommentVNode"])("",!0)],64)}function Je(e){return Ie(e)||De(e)||Ue(e)||He()}function He(){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 De(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,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 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 Ge(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 We(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,i=e;We(i)||(i={"":e},o=!1);var r=[];return Object.entries(i).forEach((function(e){var n=Le(e,2),i=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)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&&!Ze(r,"")?[{key:"",value:""}].concat(r):r}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;Ge(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&&Ge(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;Ge(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;Ge(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,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,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 it=Object(l["defineComponent"])({props:{name:String,title:String,modelValue:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:r["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});it.render=ot;var rt=it,lt=["type","id","name","value"],at=["for","innerHTML"];function ut(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,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(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=e.target.value;this.modelValue!==t&&this.$emit("update:modelValue",t)}}});ct.render=ut;var st=ct,dt=["for","innerHTML"],mt=["type","name","value"];function ft(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,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(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(",").map((function(e){return e.trim()}));t.join(", ")!==this.concattedValues&&this.$emit("update:modelValue",t)}}});pt.render=ft;var bt=pt,vt=["name","id","value"],ht=["for","innerHTML"];function gt(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.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(r["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 jt=Ot,yt=["for","innerHTML"],Vt=["name","value"];function wt(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,yt),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(r["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=e.target.value.split(Ct);t.join(Ct)!==this.concattedValue&&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,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 * diff --git a/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue b/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue index b84e83ac56..b07115f983 100644 --- a/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue +++ b/plugins/CorePluginsAdmin/vue/src/FormField/FieldCheckbox.vue @@ -11,7 +11,7 @@ @change="onChange($event)" v-bind="uiControlAttributes" :value="1" - :checked="!!modelValue" + :checked="isChecked" type="checkbox" :id="name" :name="name" @@ -27,7 +27,7 @@ import { defineComponent } from 'vue'; export default defineComponent({ props: { - modelValue: [Boolean, Number], + modelValue: [Boolean, Number, String], uiControlAttributes: Object, name: String, title: String, @@ -41,5 +41,10 @@ export default defineComponent({ } }, }, + computed: { + isChecked() { + return !!this.modelValue && this.modelValue !== '0'; + }, + }, }); </script> diff --git a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js index 27f00026f5..a26727f078 100644 --- a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js +++ b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.js @@ -605,29 +605,29 @@ var external_CorePluginsAdmin_ = __webpack_require__("a5a2"); ManageGdprvue_type_script_lang_ts.render = render /* harmony default export */ var ManageGdpr = (ManageGdprvue_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/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue?vue&type=template&id=536c794c +// 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/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue?vue&type=template&id=3a6e17ea -var AnonymizeIpvue_type_template_id_536c794c_hoisted_1 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_1 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var AnonymizeIpvue_type_template_id_536c794c_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_2 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var AnonymizeIpvue_type_template_id_536c794c_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var AnonymizeIpvue_type_template_id_536c794c_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_4 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var AnonymizeIpvue_type_template_id_536c794c_hoisted_5 = { +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_5 = { key: 0 }; -var AnonymizeIpvue_type_template_id_536c794c_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_6 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var AnonymizeIpvue_type_template_id_536c794c_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_7 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var AnonymizeIpvue_type_template_id_536c794c_hoisted_8 = { +var AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_8 = { class: "alert-warning alert" }; -function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $setup, $data, $options) { +function AnonymizeIpvue_type_template_id_3a6e17ea_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton"); @@ -673,7 +673,7 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ }) }, { "inline-help": Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_PseudonymizeUserIdNote')) + " ", 1), AnonymizeIpvue_type_template_id_536c794c_hoisted_1, AnonymizeIpvue_type_template_id_536c794c_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("em", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_PseudonymizeUserIdNote2')), 1)]; + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_PseudonymizeUserIdNote')) + " ", 1), AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_1, AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("em", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_PseudonymizeUserIdNote2')), 1)]; }), _: 1 }, 8, ["title", "modelValue"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { @@ -695,7 +695,7 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ }) }, { "inline-help": Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_ForceCookielessTrackingDescription', _ctx.trackerFileName)) + " ", 1), AnonymizeIpvue_type_template_id_536c794c_hoisted_3, AnonymizeIpvue_type_template_id_536c794c_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("em", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_ForceCookielessTrackingDescription2')), 1), !_ctx.trackerWritable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", AnonymizeIpvue_type_template_id_536c794c_hoisted_5, [AnonymizeIpvue_type_template_id_536c794c_hoisted_6, AnonymizeIpvue_type_template_id_536c794c_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", AnonymizeIpvue_type_template_id_536c794c_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_ForceCookielessTrackingDescriptionNotWritable', _ctx.trackerFileName)), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]; + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_ForceCookielessTrackingDescription', _ctx.trackerFileName)) + " ", 1), AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_3, AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("em", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_ForceCookielessTrackingDescription2')), 1), !_ctx.trackerWritable ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_5, [AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_6, AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", AnonymizeIpvue_type_template_id_3a6e17ea_hoisted_8, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('PrivacyManager_ForceCookielessTrackingDescriptionNotWritable', _ctx.trackerFileName)), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]; }), _: 1 }, 8, ["title", "modelValue"])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { @@ -715,12 +715,17 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ saving: _ctx.isLoading }, null, 8, ["saving"])], 512)), [[_directive_form]]); } -// CONCATENATED MODULE: ./plugins/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue?vue&type=template&id=536c794c +// CONCATENATED MODULE: ./plugins/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue?vue&type=template&id=3a6e17ea // 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/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue?vue&type=script&lang=ts + +function configBoolToInt(value) { + return value === true || value === 1 || value === '1' ? 1 : 0; +} + /* harmony default export */ var AnonymizeIpvue_type_script_lang_ts = (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["defineComponent"])({ props: { anonymizeIpEnabled: Boolean, @@ -729,7 +734,7 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ type: Number, required: true }, - useAnonymizedIpForVisitEnrichment: Boolean, + useAnonymizedIpForVisitEnrichment: [Boolean, String, Number], anonymizeOrderId: Boolean, forceCookielessTracking: Boolean, anonymizeReferrer: String, @@ -764,9 +769,9 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ data: function data() { return { isLoading: false, - actualEnabled: !!this.anonymizeIpEnabled, + actualEnabled: this.anonymizeIpEnabled, actualMaskLength: this.maskLength, - actualUseAnonymizedIpForVisitEnrichment: this.useAnonymizedIpForVisitEnrichment ? '1' : '0', + actualUseAnonymizedIpForVisitEnrichment: configBoolToInt(this.useAnonymizedIpForVisitEnrichment), actualAnonymizeUserId: !!this.anonymizeUserId, actualAnonymizeOrderId: !!this.anonymizeOrderId, actualForceCookielessTracking: !!this.forceCookielessTracking, @@ -788,7 +793,7 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ forceCookielessTracking: this.actualForceCookielessTracking ? '1' : '0', anonymizeReferrer: this.actualAnonymizeReferrer ? this.actualAnonymizeReferrer : '', maskLength: this.actualMaskLength, - useAnonymizedIpForVisitEnrichment: this.actualUseAnonymizedIpForVisitEnrichment ? '1' : '0' + useAnonymizedIpForVisitEnrichment: this.actualUseAnonymizedIpForVisitEnrichment }).then(function () { var notificationInstanceId = external_CoreHome_["NotificationsStore"].show({ message: Object(external_CoreHome_["translate"])('CoreAdminHome_SettingsSaveSuccess'), @@ -816,7 +821,7 @@ function AnonymizeIpvue_type_template_id_536c794c_render(_ctx, _cache, $props, $ -AnonymizeIpvue_type_script_lang_ts.render = AnonymizeIpvue_type_template_id_536c794c_render +AnonymizeIpvue_type_script_lang_ts.render = AnonymizeIpvue_type_template_id_3a6e17ea_render /* harmony default export */ var AnonymizeIp = (AnonymizeIpvue_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/PrivacyManager/vue/src/OptOutCustomizer/OptOutCustomizer.vue?vue&type=template&id=7ea00f35 diff --git a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js index 44139e19f0..f1bbfdd848 100644 --- a/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js +++ b/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js @@ -1,10 +1,10 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin","SegmentEditor"],t):"object"===typeof exports?exports["PrivacyManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):e["PrivacyManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"],e["SegmentEditor"])})("undefined"!==typeof self?self:this,(function(e,t,n,a){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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/PrivacyManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},f06f:function(e,t){e.exports=a},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ManageGdpr",(function(){return ne})),n.d(t,"AnonymizeIp",(function(){return be})),n.d(t,"OptOutCustomizer",(function(){return ke})),n.d(t,"AnonymizeLogData",(function(){return gt})),n.d(t,"DoNotTrackPreference",(function(){return Ot})),n.d(t,"ReportDeletionSettings",(function(){return Dt})),n.d(t,"DeleteOldLogs",(function(){return zt})),n.d(t,"DeleteOldReports",(function(){return Kt})),n.d(t,"ScheduleReportDeletion",(function(){return un})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("8bbf"),l={class:"manageGdpr"},r={class:"intro"},c=Object(i["createElementVNode"])("br",null,null,-1),s=Object(i["createElementVNode"])("br",null,null,-1),d=Object(i["createElementVNode"])("br",null,null,-1),u=Object(i["createElementVNode"])("br",null,null,-1),m=["innerHTML"],b={class:"form-group row"},p={class:"col s12 input-field"},g={for:"gdprsite",class:"siteSelectorLabel"},v={class:"sites_autocomplete"},h={class:"form-group row segmentFilterGroup"},O={class:"col s12"},j={style:{margin:"8px 0",display:"inline-block"}},f=Object(i["createElementVNode"])("br",null,null,-1),y=Object(i["createTextVNode"])(),V=Object(i["createElementVNode"])("br",null,null,-1),S=Object(i["createElementVNode"])("br",null,null,-1),D=Object(i["createElementVNode"])("br",null,null,-1),N={class:"checkInclude"},E={colspan:"8"},C=["title"],k={class:"checkInclude"},_=["title"],P={class:"visitId"},w={class:"visitorId"},M=["title","onClick"],A={class:"visitorIp"},z=["title","onClick"],I={class:"userId"},F=["title","onClick"],T=["title"],x=["src"],L=["title"],B=["src"],U=["title"],R=["src"],H=["title"],G=["src"],q=["onClick"],K=Object(i["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),W={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},Y=["value"],J=["value"];function Q(e,t,n,a,o,$){var Q=Object(i["resolveComponent"])("SiteSelector"),X=Object(i["resolveComponent"])("SegmentGenerator"),Z=Object(i["resolveComponent"])("SaveButton"),ee=Object(i["resolveComponent"])("ContentBlock"),te=Object(i["resolveComponent"])("Field"),ne=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[Object(i["createVNode"])(ee,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(i["createElementVNode"])("p",null,[u,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,m)])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",g,Object(i["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(i["createElementVNode"])("div",v,[Object(i["createVNode"])(Q,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("div",O,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",j,Object(i["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(X,{modelValue:e.segment_filter,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.segment_filter=t}),"visit-segments-only":!0,idsite:e.site.id},null,8,["modelValue","idsite"])])])])]),Object(i["createVNode"])(Z,{class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[2]||(t[2]=function(t){return e.findDataSubjects()}),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])]})),_:1},8,["content-title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[i["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),f,y,V,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),S,D,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",N,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorID")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_UserId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Details")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Action")),513),[[i["vShow"],e.profileEnabled]])])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",E,Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[i["vShow"],e.dataSubjects.length>400]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.dataSubjects,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{title:"".concat(e.translate("PrivacyManager_LastAction"),": ").concat(t.lastActionDateTime),key:n},[Object(i["createElementVNode"])("td",k,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"subject".concat(t.idVisit),modelValue:e.dataSubjectsActive[n],"onUpdate:modelValue":function(t){return e.dataSubjectsActive[n]=t},"full-width":!0},null,8,["name","modelValue","onUpdate:modelValue"])])]),Object(i["createElementVNode"])("td",{class:"site",title:"(".concat(e.translate("General_Id")," ").concat(t.idSite,")")},Object(i["toDisplayString"])(t.siteName),9,_),Object(i["createElementVNode"])("td",P,Object(i["toDisplayString"])(t.idVisit),1),Object(i["createElementVNode"])("td",w,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:function(n){return e.addFilter("visitorId",t.visitorId)}},Object(i["toDisplayString"])(t.visitorId),9,M)]),Object(i["createElementVNode"])("td",A,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:function(n){return e.addFilter("visitIp",t.visitIp)}},Object(i["toDisplayString"])(t.visitIp),9,z)]),Object(i["createElementVNode"])("td",I,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:function(n){return e.addFilter("userId",t.userId)}},Object(i["toDisplayString"])(t.userId),9,F)]),Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("span",{title:"".concat(t.deviceType," ").concat(t.deviceModel),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,x)],8,T),Object(i["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,B)],8,L),Object(i["createElementVNode"])("span",{title:"".concat(t.browser," ").concat(t.browserFamilyDescription),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,R)],8,U),Object(i["createElementVNode"])("span",{title:"".concat(t.country," ").concat(t.region||"")},[Object(i["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,G)],8,H)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:function(n){return e.showProfile(t.visitorId,t.idSite)}},[K,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,q)],512),[[i["vShow"],e.profileEnabled]])],8,C)})),128))])],512),[[ne]]),Object(i["createVNode"])(Z,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[4]||(t[4]=function(t){return e.exportDataSubject()}),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(i["createVNode"])(Z,{class:"deleteDataSubjects",onConfirm:t[5]||(t[5]=function(t){return e.deleteDataSubject()}),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[i["vShow"],e.dataSubjects.length]]),Object(i["createElementVNode"])("div",W,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Y),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,J)],512)])}var X=n("19dc"),Z=n("f06f"),ee=n("a5a2"),te=Object(i["defineComponent"])({components:{ContentBlock:X["ContentBlock"],SiteSelector:X["SiteSelector"],SegmentGenerator:Z["SegmentGenerator"],SaveButton:ee["SaveButton"],Field:ee["Field"]},directives:{ContentTable:X["ContentTable"]},data:function(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(X["translate"])("UsersManager_AllWebsites")},segment_filter:"userId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:X["Matomo"].visitorProfileEnabled,dataSubjectsActive:[]}},setup:function(){var e=X["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites:function(){return e}}},methods:{showSuccessNotification:function(e){var t=X["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout((function(){X["NotificationsStore"].scrollToNotification(t)}),200)},linkTo:function(e){return"?".concat(X["MatomoUrl"].stringify(Object.assign(Object.assign({},X["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:e})))},toggleActivateAll:function(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile:function(e,t){X["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject:function(){var e=this,t=this.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:t}).then((function(t){e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyExported")),X["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(t))}))},deleteDataSubject:function(){var e=this;X["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:function(){e.isDeleting=!0;var t=e.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:t}).then((function(){e.dataSubjects=[],e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyDeleted")),e.findDataSubjects()})).finally((function(){e.isDeleting=!1}))}})},addFilter:function(e,t){this.segment_filter+=",".concat(e,"==").concat(t),this.findDataSubjects()},findDataSubjects:function(){var e=this;this.dataSubjects=[],this.dataSubjectsActive=[],this.isLoading=!0,this.toggleAll=!0,this.hasSearched=!1,this.getSites().then((function(t){var n=e.site.id;"all"!==n||X["Matomo"].hasSuperUserAccess||(n=t,Array.isArray(t)&&(n=t.join(","))),X["AjaxHelper"].fetch({idSite:n,module:"API",method:"PrivacyManager.findDataSubjects",segment:e.segment_filter}).then((function(t){e.hasSearched=!0,e.dataSubjectsActive=t.map((function(){return!0})),e.dataSubjects=t})).finally((function(){e.isLoading=!1}))}))}},computed:{hasActiveDataSubjects:function(){return!!this.activatedDataSubjects.length},activatedDataSubjects:function(){var e=this;return this.dataSubjects.filter((function(t,n){return e.dataSubjectsActive[n]})).map((function(e){return{idsite:e.idSite,idvisit:e.idVisit}}))},overviewHintText:function(){return Object(X["translate"])("PrivacyManager_GdprToolsOverviewHint",'<a href="'.concat(this.linkTo("gdprOverview"),'">'),"</a>")}}});te.render=Q;var ne=te,ae=Object(i["createElementVNode"])("br",null,null,-1),oe=Object(i["createElementVNode"])("br",null,null,-1),ie=Object(i["createElementVNode"])("br",null,null,-1),le=Object(i["createElementVNode"])("br",null,null,-1),re={key:0},ce=Object(i["createElementVNode"])("br",null,null,-1),se=Object(i["createElementVNode"])("br",null,null,-1),de={class:"alert-warning alert"};function ue(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeIpSettings",title:e.translate("PrivacyManager_UseAnonymizeIp"),modelValue:e.actualEnabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.actualEnabled=t}),"inline-help":e.anonymizeIpEnabledHelp},null,8,["title","modelValue","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"maskLength",title:e.translate("PrivacyManager_AnonymizeIpMaskLengtDescription"),modelValue:e.actualMaskLength,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.actualMaskLength=t}),options:e.maskLengthOptions,"inline-help":e.translate("PrivacyManager_GeolocationAnonymizeIpNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"useAnonymizedIpForVisitEnrichment",title:e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichment"),modelValue:e.actualUseAnonymizedIpForVisitEnrichment,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.actualUseAnonymizedIpForVisitEnrichment=t}),options:e.useAnonymizedIpForVisitEnrichmentOptions,"inline-help":e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichmentNote")},null,8,["title","modelValue","options","inline-help"])])],512),[[i["vShow"],e.actualEnabled]]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeUserId",title:e.translate("PrivacyManager_PseudonymizeUserId"),modelValue:e.actualAnonymizeUserId,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.actualAnonymizeUserId=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),ae,oe,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeOrderId",title:e.translate("PrivacyManager_UseAnonymizeOrderId"),modelValue:e.actualAnonymizeOrderId,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.actualAnonymizeOrderId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeOrderIdNote")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"forceCookielessTracking",title:e.translate("PrivacyManager_ForceCookielessTracking"),modelValue:e.actualForceCookielessTracking,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.actualForceCookielessTracking=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),ie,le,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",re,[ce,se,Object(i["createElementVNode"])("p",de,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"select",name:"anonymizeReferrer",title:e.translate("PrivacyManager_AnonymizeReferrer"),modelValue:e.actualAnonymizeReferrer,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.actualAnonymizeReferrer=t}),options:e.referrerAnonymizationOptions,"inline-help":e.translate("PrivacyManager_AnonymizeReferrerNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var me=Object(i["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:Boolean,anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,actualEnabled:!!this.anonymizeIpEnabled,actualMaskLength:this.maskLength,actualUseAnonymizedIpForVisitEnrichment:this.useAnonymizedIpForVisitEnrichment?"1":"0",actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer}},methods:{save:function(){var e=this;this.isLoading=!0,X["AjaxHelper"].post({module:"API",method:"PrivacyManager.setAnonymizeIpSettings"},{anonymizeIPEnable:this.actualEnabled?"1":"0",anonymizeUserId:this.actualAnonymizeUserId?"1":"0",anonymizeOrderId:this.actualAnonymizeOrderId?"1":"0",forceCookielessTracking:this.actualForceCookielessTracking?"1":"0",anonymizeReferrer:this.actualAnonymizeReferrer?this.actualAnonymizeReferrer:"",maskLength:this.actualMaskLength,useAnonymizedIpForVisitEnrichment:this.actualUseAnonymizedIpForVisitEnrichment?"1":"0"}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}},computed:{anonymizeIpEnabledHelp:function(){var e=Object(X["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(X["translate"])("PrivacyManager_AnonymizeIpDescription");return"".concat(e," ").concat(t)}}});me.render=ue;var be=me,pe={class:"optOutCustomizer"},ge=["innerHTML"],ve=["value"],he=["value"],Oe=Object(i["createStaticVNode"])('<option value="px">px</option><option value="pt">pt</option><option value="em">em</option><option value="rem">rem</option><option value="%">%</option>',5),je=[Oe],fe={ref:"pre"},ye=["innerHTML"],Ve=["src"];function Se(e,t,n,a,o,l){var r=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",pe,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,ge)]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutCustomize")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[0]||(t[0]=function(t){return e.onFontColorChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onFontColorChange(t)})},null,40,ve)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[2]||(t[2]=function(t){return e.onBgColorChange(t)}),onChange:t[3]||(t[3]=function(t){return e.onBgColorChange(t)})},null,40,he)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",onKeydown:t[4]||(t[4]=function(t){return e.onFontSizeChange(t)}),onChange:t[5]||(t[5]=function(t){return e.onFontSizeChange(t)})},null,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("select",{class:"browser-default",onKeydown:t[6]||(t[6]=function(t){return e.onFontSizeUnitChange(t)}),onChange:t[7]||(t[7]=function(t){return e.onFontSizeUnitChange(t)})},je,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",onKeydown:t[8]||(t[8]=function(t){return e.onFontFamilyChange(t)}),onChange:t[9]||(t[9]=function(t){return e.onFontFamilyChange(t)})},null,32)])])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",fe,[Object(i["createTextVNode"])('<iframe\n style="border: 0; height: 200px; width: 600px;"\n src="'+Object(i["toDisplayString"])(e.iframeUrl)+'"\n ></iframe>',1)],512),[[r,{}]]),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,ye),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(i["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(i["normalizeClass"])({withBg:e.withBg})},null,10,Ve)])}function De(e){var t=parseInt(e,16),n=t>>16&255,a=t>>8&255,o=255&t;return n>=225&&a>=225&&o>=225}var Ne=window,Ee=Ne.$,Ce=Object(i["defineComponent"])({props:{language:{type:String,required:!0},piwikurl:String},directives:{SelectOnFocus:X["SelectOnFocus"]},data:function(){return{fontSizeUnit:"px",backgroundColor:"",fontColor:"",fontSize:"",fontFamily:""}},created:function(){this.onFontColorChange=Object(X["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(X["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(X["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(X["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(X["debounce"])(this.onFontFamilyChange,50)},methods:{onFontColorChange:function(e){this.fontColor=e.target.value},onBgColorChange:function(e){this.backgroundColor=e.target.value},onFontSizeChange:function(e){this.fontSize=e.target.value},onFontSizeUnitChange:function(e){this.fontSizeUnit=e.target.value},onFontFamilyChange:function(e){this.fontFamily=e.target.value}},watch:{iframeUrl:function(){var e=this.$refs.pre,t=Ee(e).queue("fx").length>0;t||Ee(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit:function(){return this.fontSize?"".concat(this.fontSize).concat(this.fontSizeUnit):""},withBg:function(){return!!this.piwikurl&&""===this.backgroundColor&&""!==this.fontColor&&De(this.fontColor.substr(1))},iframeUrl:function(){if(this.piwikurl){var e=X["MatomoUrl"].stringify({module:"CoreAdminHome",action:"optOut",language:this.language,backgroundColor:this.backgroundColor.substr(1),fontColor:this.fontColor.substr(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily});return"".concat(this.piwikurl,"index.php?").concat(e)}return""},readThisToLearnMore:function(){var e="https://matomo.org/faq/how-to/faq_25918/";return Object(X["translate"])("General_ReadThisToLearnMore","<a rel='noreferrer noopener' target='_blank' href='".concat(e,"'>"),"</a>")},optOutExplanationIntro:function(){return Object(X["translate"])("CoreAdminHome_OptOutExplanationIntro",'<a href="'.concat(this.iframeUrl,'" rel="noreferrer noopener" target="_blank">'),"</a>")}}});Ce.render=Se;var ke=Ce,_e={class:"anonymizeLogData"},Pe={class:"form-group row"},we={class:"col s12 input-field"},Me={for:"anonymizeSite",class:"siteSelectorLabel"},Ae={class:"sites_autocomplete"},ze={class:"form-group row"},Ie={class:"col s6 input-field"},Fe={for:"anonymizeStartDate",class:"active"},Te=["value"],xe={class:"col s6 input-field"},Le={for:"anonymizeEndDate",class:"active"},Be=["value"],Ue={name:"anonymizeIp"},Re={name:"anonymizeLocation"},He={name:"anonymizeTheUserId"},Ge={class:"form-group row"},qe={class:"col s12 m6"},Ke={for:"visit_columns"},We={class:"innerFormField",name:"visit_columns"},$e=["onClick","title"],Ye={class:"col s12 m6"},Je={class:"form-help"},Qe={class:"inline-help"},Xe={class:"form-group row"},Ze={class:"col s12"},et={class:"form-group row"},tt={class:"col s12 m6"},nt={for:"action_columns"},at={class:"innerFormField",name:"action_columns"},ot=["onClick","title"],it={class:"col s12 m6"},lt={class:"form-help"},rt={class:"inline-help"},ct=Object(i["createElementVNode"])("span",{class:"icon-info"},null,-1),st={class:"ui-confirm",id:"confirmAnonymizeLogData",ref:"confirmAnonymizeLogData"},dt=["value"],ut=["value"];function mt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("SiteSelector"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",_e,[Object(i["createElementVNode"])("div",Pe,[Object(i["createElementVNode"])("div",we,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Me,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(i["createElementVNode"])("div",Ae,[Object(i["createVNode"])(r,{id:"anonymizeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",ze,[Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Fe,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(i["createElementVNode"])("input",{type:"text",id:"anonymizeStartDate",class:"anonymizeStartDate",ref:"anonymizeStartDate",name:"anonymizeStartDate",value:e.startDate,onKeydown:t[1]||(t[1]=function(t){return e.onKeydownStartDate(t)}),onChange:t[2]||(t[2]=function(t){return e.onKeydownStartDate(t)})},null,40,Te)])]),Object(i["createElementVNode"])("div",xe,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Le,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(i["createElementVNode"])("input",{type:"text",class:"anonymizeEndDate",id:"anonymizeEndDate",ref:"anonymizeEndDate",name:"anonymizeEndDate",value:e.endDate,onKeydown:t[3]||(t[3]=function(t){return e.onKeydownEndDate(t)}),onChange:t[4]||(t[4]=function(t){return e.onKeydownEndDate(t)})},null,40,Be)])])]),Object(i["createElementVNode"])("div",Ue,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeIp",title:e.translate("PrivacyManager_AnonymizeIp"),modelValue:e.anonymizeIp,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.anonymizeIp=t}),introduction:e.translate("General_Visit"),"inline-help":e.translate("PrivacyManager_AnonymizeIpHelp")},null,8,["title","modelValue","introduction","inline-help"])]),Object(i["createElementVNode"])("div",Re,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeLocation",title:e.translate("PrivacyManager_AnonymizeLocation"),modelValue:e.anonymizeLocation,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.anonymizeLocation=t}),"inline-help":e.translate("PrivacyManager_AnonymizeLocationHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",He,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeTheUserId",title:e.translate("PrivacyManager_AnonymizeUserId"),modelValue:e.anonymizeUserId,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.anonymizeUserId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeUserIdHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",Ge,[Object(i["createElementVNode"])("div",qe,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Ke,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedVisitColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedVisitColumns selectedVisitColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",We,[Object(i["createVNode"])(c,{uicontrol:"select",name:"visit_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onVisitColumnChange()},"full-width":!0,options:e.availableVisitColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeVisitColumn(n)},title:e.translate("General_Remove")},null,8,$e),[[i["vShow"],n+1!==e.selectedVisitColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",Ye,[Object(i["createElementVNode"])("div",Je,[Object(i["createElementVNode"])("span",Qe,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(i["createElementVNode"])("div",Xe,[Object(i["createElementVNode"])("div",Ze,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Action")),1)])]),Object(i["createElementVNode"])("div",et,[Object(i["createElementVNode"])("div",tt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",nt,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedActionColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedActionColumns selectedActionColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",at,[Object(i["createVNode"])(c,{uicontrol:"select",name:"action_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onActionColumnChange()},"full-width":!0,options:e.availableActionColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeActionColumn(n)},title:e.translate("General_Remove")},null,8,ot),[[i["vShow"],n+1!==e.selectedActionColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",it,[Object(i["createElementVNode"])("div",lt,[Object(i["createElementVNode"])("span",rt,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(i["createElementVNode"])("p",null,[ct,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(i["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=function(t){return e.scheduleAnonymization()}),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(i["createElementVNode"])("div",st,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,dt),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ut)],512)])}function bt(e){return e<10?"0".concat(e):e}var pt=Object(i["defineComponent"])({components:{SiteSelector:X["SiteSelector"],Field:ee["Field"],SaveButton:ee["SaveButton"]},data:function(){var e=new Date,t="".concat(e.getFullYear(),"-").concat(bt(e.getMonth()+1),"-").concat(bt(e.getDay()+1));return{isLoading:!1,isDeleting:!1,anonymizeIp:!1,anonymizeLocation:!1,anonymizeUserId:!1,site:{id:"all",name:"All Websites"},availableVisitColumns:[],availableActionColumns:[],selectedVisitColumns:[{column:""}],selectedActionColumns:[{column:""}],startDate:t,endDate:t}},created:function(){var e=this;this.onKeydownStartDate=Object(X["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(X["debounce"])(this.onKeydownEndDate,50),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableVisitColumnsToAnonymize"}).then((function(t){e.availableVisitColumns=[],t.forEach((function(t){e.availableVisitColumns.push({key:t.column_name,value:t.column_name})}))})),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize"}).then((function(t){e.availableActionColumns=[],t.forEach((function(t){e.availableActionColumns.push({key:t.column_name,value:t.column_name})}))})),setTimeout((function(){var t=X["Matomo"].getBaseDatePickerOptions(null),n=X["Matomo"].getBaseDatePickerOptions(null);$(e.$refs.anonymizeStartDate).datepicker(t),$(e.$refs.anonymizeEndDate).datepicker(n)}))},methods:{onVisitColumnChange:function(){var e=this.selectedVisitColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addVisitColumn()},addVisitColumn:function(){this.selectedVisitColumns.push({column:""})},removeVisitColumn:function(e){if(e>-1){var t=this.selectedVisitColumns.length-1;t===e?this.selectedVisitColumns[e]={column:""}:this.selectedVisitColumns.splice(e,1)}},onActionColumnChange:function(){var e=this.selectedActionColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addActionColumn()},addActionColumn:function(){this.selectedActionColumns.push({column:""})},removeActionColumn:function(e){if(e>-1){var t=this.selectedActionColumns.length-1;t===e?this.selectedActionColumns[e]={column:""}:this.selectedActionColumns.splice(e,1)}},scheduleAnonymization:function(){var e="".concat(this.startDate,",").concat(this.endDate);this.startDate===this.endDate&&(e=this.startDate);var t={date:e};t.idSites=this.site.id,t.anonymizeIp=this.anonymizeIp?"1":"0",t.anonymizeLocation=this.anonymizeLocation?"1":"0",t.anonymizeUserId=this.anonymizeUserId?"1":"0",t.unsetVisitColumns=this.selectedVisitColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),t.unsetLinkVisitActionColumns=this.selectedActionColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),X["Matomo"].helper.modalConfirm(this.$refs.confirmAnonymizeLogData,{yes:function(){X["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},t).then((function(){window.location.reload(!0)}))}})},onKeydownStartDate:function(e){this.startDate=e.target.value},onKeydownEndDate:function(e){this.endDate=e.target.value}},computed:{isAnonymizePastDataDisabled:function(){return!this.anonymizeIp&&!this.anonymizeLocation&&!this.selectedVisitColumns&&!this.selectedActionColumns}}});pt.render=mt;var gt=pt;function vt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"doNotTrack",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),options:e.doNotTrackOptions,"inline-help":e.translate("PrivacyManager_DoNotTrack_Description")},null,8,["modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[1]||(t[1]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var ht=Object(i["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:this.dntSupport?1:0}},methods:{save:function(){var e=this;this.isLoading=!0;var t="deactivateDoNotTrack";this.enabled&&"0"!==this.enabled&&(t="activateDoNotTrack"),X["AjaxHelper"].post({module:"API",method:"PrivacyManager.".concat(t)}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});ht.render=vt;var Ot=ht;function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ft(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function yt(e,t,n){return t&&ft(e.prototype,t),n&&ft(e,n),e}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin","SegmentEditor"],t):"object"===typeof exports?exports["PrivacyManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin"),require("SegmentEditor")):e["PrivacyManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"],e["SegmentEditor"])})("undefined"!==typeof self?self:this,(function(e,t,n,a){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},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/PrivacyManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},f06f:function(e,t){e.exports=a},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ManageGdpr",(function(){return ne})),n.d(t,"AnonymizeIp",(function(){return pe})),n.d(t,"OptOutCustomizer",(function(){return _e})),n.d(t,"AnonymizeLogData",(function(){return vt})),n.d(t,"DoNotTrackPreference",(function(){return jt})),n.d(t,"ReportDeletionSettings",(function(){return Nt})),n.d(t,"DeleteOldLogs",(function(){return It})),n.d(t,"DeleteOldReports",(function(){return Wt})),n.d(t,"ScheduleReportDeletion",(function(){return mn})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("8bbf"),l={class:"manageGdpr"},r={class:"intro"},c=Object(i["createElementVNode"])("br",null,null,-1),s=Object(i["createElementVNode"])("br",null,null,-1),d=Object(i["createElementVNode"])("br",null,null,-1),u=Object(i["createElementVNode"])("br",null,null,-1),m=["innerHTML"],b={class:"form-group row"},p={class:"col s12 input-field"},g={for:"gdprsite",class:"siteSelectorLabel"},v={class:"sites_autocomplete"},h={class:"form-group row segmentFilterGroup"},O={class:"col s12"},j={style:{margin:"8px 0",display:"inline-block"}},f=Object(i["createElementVNode"])("br",null,null,-1),y=Object(i["createTextVNode"])(),V=Object(i["createElementVNode"])("br",null,null,-1),S=Object(i["createElementVNode"])("br",null,null,-1),D=Object(i["createElementVNode"])("br",null,null,-1),N={class:"checkInclude"},E={colspan:"8"},C=["title"],k={class:"checkInclude"},_=["title"],P={class:"visitId"},w={class:"visitorId"},M=["title","onClick"],A={class:"visitorIp"},z=["title","onClick"],I={class:"userId"},F=["title","onClick"],T=["title"],x=["src"],L=["title"],B=["src"],U=["title"],R=["src"],H=["title"],G=["src"],q=["onClick"],K=Object(i["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),W={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},Y=["value"],J=["value"];function Q(e,t,n,a,o,$){var Q=Object(i["resolveComponent"])("SiteSelector"),X=Object(i["resolveComponent"])("SegmentGenerator"),Z=Object(i["resolveComponent"])("SaveButton"),ee=Object(i["resolveComponent"])("ContentBlock"),te=Object(i["resolveComponent"])("Field"),ne=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[Object(i["createVNode"])(ee,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(i["createElementVNode"])("p",null,[u,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,m)])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",g,Object(i["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(i["createElementVNode"])("div",v,[Object(i["createVNode"])(Q,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("div",O,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",j,Object(i["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(X,{modelValue:e.segment_filter,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.segment_filter=t}),"visit-segments-only":!0,idsite:e.site.id},null,8,["modelValue","idsite"])])])])]),Object(i["createVNode"])(Z,{class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[2]||(t[2]=function(t){return e.findDataSubjects()}),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])]})),_:1},8,["content-title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[i["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),f,y,V,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),S,D,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",N,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorID")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_UserId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Details")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Action")),513),[[i["vShow"],e.profileEnabled]])])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",E,Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[i["vShow"],e.dataSubjects.length>400]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.dataSubjects,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{title:"".concat(e.translate("PrivacyManager_LastAction"),": ").concat(t.lastActionDateTime),key:n},[Object(i["createElementVNode"])("td",k,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(te,{uicontrol:"checkbox",name:"subject".concat(t.idVisit),modelValue:e.dataSubjectsActive[n],"onUpdate:modelValue":function(t){return e.dataSubjectsActive[n]=t},"full-width":!0},null,8,["name","modelValue","onUpdate:modelValue"])])]),Object(i["createElementVNode"])("td",{class:"site",title:"(".concat(e.translate("General_Id")," ").concat(t.idSite,")")},Object(i["toDisplayString"])(t.siteName),9,_),Object(i["createElementVNode"])("td",P,Object(i["toDisplayString"])(t.idVisit),1),Object(i["createElementVNode"])("td",w,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:function(n){return e.addFilter("visitorId",t.visitorId)}},Object(i["toDisplayString"])(t.visitorId),9,M)]),Object(i["createElementVNode"])("td",A,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:function(n){return e.addFilter("visitIp",t.visitIp)}},Object(i["toDisplayString"])(t.visitIp),9,z)]),Object(i["createElementVNode"])("td",I,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:function(n){return e.addFilter("userId",t.userId)}},Object(i["toDisplayString"])(t.userId),9,F)]),Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("span",{title:"".concat(t.deviceType," ").concat(t.deviceModel),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,x)],8,T),Object(i["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,B)],8,L),Object(i["createElementVNode"])("span",{title:"".concat(t.browser," ").concat(t.browserFamilyDescription),style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,R)],8,U),Object(i["createElementVNode"])("span",{title:"".concat(t.country," ").concat(t.region||"")},[Object(i["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,G)],8,H)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:function(n){return e.showProfile(t.visitorId,t.idSite)}},[K,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,q)],512),[[i["vShow"],e.profileEnabled]])],8,C)})),128))])],512),[[ne]]),Object(i["createVNode"])(Z,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[4]||(t[4]=function(t){return e.exportDataSubject()}),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(i["createVNode"])(Z,{class:"deleteDataSubjects",onConfirm:t[5]||(t[5]=function(t){return e.deleteDataSubject()}),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[i["vShow"],e.dataSubjects.length]]),Object(i["createElementVNode"])("div",W,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Y),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,J)],512)])}var X=n("19dc"),Z=n("f06f"),ee=n("a5a2"),te=Object(i["defineComponent"])({components:{ContentBlock:X["ContentBlock"],SiteSelector:X["SiteSelector"],SegmentGenerator:Z["SegmentGenerator"],SaveButton:ee["SaveButton"],Field:ee["Field"]},directives:{ContentTable:X["ContentTable"]},data:function(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(X["translate"])("UsersManager_AllWebsites")},segment_filter:"userId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:X["Matomo"].visitorProfileEnabled,dataSubjectsActive:[]}},setup:function(){var e=X["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites:function(){return e}}},methods:{showSuccessNotification:function(e){var t=X["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout((function(){X["NotificationsStore"].scrollToNotification(t)}),200)},linkTo:function(e){return"?".concat(X["MatomoUrl"].stringify(Object.assign(Object.assign({},X["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:e})))},toggleActivateAll:function(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile:function(e,t){X["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject:function(){var e=this,t=this.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:t}).then((function(t){e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyExported")),X["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(t))}))},deleteDataSubject:function(){var e=this;X["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:function(){e.isDeleting=!0;var t=e.activatedDataSubjects;X["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:t}).then((function(){e.dataSubjects=[],e.showSuccessNotification(Object(X["translate"])("PrivacyManager_VisitsSuccessfullyDeleted")),e.findDataSubjects()})).finally((function(){e.isDeleting=!1}))}})},addFilter:function(e,t){this.segment_filter+=",".concat(e,"==").concat(t),this.findDataSubjects()},findDataSubjects:function(){var e=this;this.dataSubjects=[],this.dataSubjectsActive=[],this.isLoading=!0,this.toggleAll=!0,this.hasSearched=!1,this.getSites().then((function(t){var n=e.site.id;"all"!==n||X["Matomo"].hasSuperUserAccess||(n=t,Array.isArray(t)&&(n=t.join(","))),X["AjaxHelper"].fetch({idSite:n,module:"API",method:"PrivacyManager.findDataSubjects",segment:e.segment_filter}).then((function(t){e.hasSearched=!0,e.dataSubjectsActive=t.map((function(){return!0})),e.dataSubjects=t})).finally((function(){e.isLoading=!1}))}))}},computed:{hasActiveDataSubjects:function(){return!!this.activatedDataSubjects.length},activatedDataSubjects:function(){var e=this;return this.dataSubjects.filter((function(t,n){return e.dataSubjectsActive[n]})).map((function(e){return{idsite:e.idSite,idvisit:e.idVisit}}))},overviewHintText:function(){return Object(X["translate"])("PrivacyManager_GdprToolsOverviewHint",'<a href="'.concat(this.linkTo("gdprOverview"),'">'),"</a>")}}});te.render=Q;var ne=te,ae=Object(i["createElementVNode"])("br",null,null,-1),oe=Object(i["createElementVNode"])("br",null,null,-1),ie=Object(i["createElementVNode"])("br",null,null,-1),le=Object(i["createElementVNode"])("br",null,null,-1),re={key:0},ce=Object(i["createElementVNode"])("br",null,null,-1),se=Object(i["createElementVNode"])("br",null,null,-1),de={class:"alert-warning alert"};function ue(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeIpSettings",title:e.translate("PrivacyManager_UseAnonymizeIp"),modelValue:e.actualEnabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.actualEnabled=t}),"inline-help":e.anonymizeIpEnabledHelp},null,8,["title","modelValue","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"maskLength",title:e.translate("PrivacyManager_AnonymizeIpMaskLengtDescription"),modelValue:e.actualMaskLength,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.actualMaskLength=t}),options:e.maskLengthOptions,"inline-help":e.translate("PrivacyManager_GeolocationAnonymizeIpNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"useAnonymizedIpForVisitEnrichment",title:e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichment"),modelValue:e.actualUseAnonymizedIpForVisitEnrichment,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.actualUseAnonymizedIpForVisitEnrichment=t}),options:e.useAnonymizedIpForVisitEnrichmentOptions,"inline-help":e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichmentNote")},null,8,["title","modelValue","options","inline-help"])])],512),[[i["vShow"],e.actualEnabled]]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeUserId",title:e.translate("PrivacyManager_PseudonymizeUserId"),modelValue:e.actualAnonymizeUserId,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.actualAnonymizeUserId=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),ae,oe,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeOrderId",title:e.translate("PrivacyManager_UseAnonymizeOrderId"),modelValue:e.actualAnonymizeOrderId,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.actualAnonymizeOrderId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeOrderIdNote")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"forceCookielessTracking",title:e.translate("PrivacyManager_ForceCookielessTracking"),modelValue:e.actualForceCookielessTracking,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.actualForceCookielessTracking=t})},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),ie,le,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",re,[ce,se,Object(i["createElementVNode"])("p",de,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]})),_:1},8,["title","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"select",name:"anonymizeReferrer",title:e.translate("PrivacyManager_AnonymizeReferrer"),modelValue:e.actualAnonymizeReferrer,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.actualAnonymizeReferrer=t}),options:e.referrerAnonymizationOptions,"inline-help":e.translate("PrivacyManager_AnonymizeReferrerNote")},null,8,["title","modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function me(e){return!0===e||1===e||"1"===e?1:0}var be=Object(i["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:[Boolean,String,Number],anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,actualEnabled:this.anonymizeIpEnabled,actualMaskLength:this.maskLength,actualUseAnonymizedIpForVisitEnrichment:me(this.useAnonymizedIpForVisitEnrichment),actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer}},methods:{save:function(){var e=this;this.isLoading=!0,X["AjaxHelper"].post({module:"API",method:"PrivacyManager.setAnonymizeIpSettings"},{anonymizeIPEnable:this.actualEnabled?"1":"0",anonymizeUserId:this.actualAnonymizeUserId?"1":"0",anonymizeOrderId:this.actualAnonymizeOrderId?"1":"0",forceCookielessTracking:this.actualForceCookielessTracking?"1":"0",anonymizeReferrer:this.actualAnonymizeReferrer?this.actualAnonymizeReferrer:"",maskLength:this.actualMaskLength,useAnonymizedIpForVisitEnrichment:this.actualUseAnonymizedIpForVisitEnrichment}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}},computed:{anonymizeIpEnabledHelp:function(){var e=Object(X["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(X["translate"])("PrivacyManager_AnonymizeIpDescription");return"".concat(e," ").concat(t)}}});be.render=ue;var pe=be,ge={class:"optOutCustomizer"},ve=["innerHTML"],he=["value"],Oe=["value"],je=Object(i["createStaticVNode"])('<option value="px">px</option><option value="pt">pt</option><option value="em">em</option><option value="rem">rem</option><option value="%">%</option>',5),fe=[je],ye={ref:"pre"},Ve=["innerHTML"],Se=["src"];function De(e,t,n,a,o,l){var r=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ge,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,ve)]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutCustomize")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[0]||(t[0]=function(t){return e.onFontColorChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onFontColorChange(t)})},null,40,he)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[2]||(t[2]=function(t){return e.onBgColorChange(t)}),onChange:t[3]||(t[3]=function(t){return e.onBgColorChange(t)})},null,40,Oe)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",onKeydown:t[4]||(t[4]=function(t){return e.onFontSizeChange(t)}),onChange:t[5]||(t[5]=function(t){return e.onFontSizeChange(t)})},null,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("select",{class:"browser-default",onKeydown:t[6]||(t[6]=function(t){return e.onFontSizeUnitChange(t)}),onChange:t[7]||(t[7]=function(t){return e.onFontSizeUnitChange(t)})},fe,32)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",onKeydown:t[8]||(t[8]=function(t){return e.onFontFamilyChange(t)}),onChange:t[9]||(t[9]=function(t){return e.onFontFamilyChange(t)})},null,32)])])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",ye,[Object(i["createTextVNode"])('<iframe\n style="border: 0; height: 200px; width: 600px;"\n src="'+Object(i["toDisplayString"])(e.iframeUrl)+'"\n ></iframe>',1)],512),[[r,{}]]),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,Ve),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(i["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(i["normalizeClass"])({withBg:e.withBg})},null,10,Se)])}function Ne(e){var t=parseInt(e,16),n=t>>16&255,a=t>>8&255,o=255&t;return n>=225&&a>=225&&o>=225}var Ee=window,Ce=Ee.$,ke=Object(i["defineComponent"])({props:{language:{type:String,required:!0},piwikurl:String},directives:{SelectOnFocus:X["SelectOnFocus"]},data:function(){return{fontSizeUnit:"px",backgroundColor:"",fontColor:"",fontSize:"",fontFamily:""}},created:function(){this.onFontColorChange=Object(X["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(X["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(X["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(X["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(X["debounce"])(this.onFontFamilyChange,50)},methods:{onFontColorChange:function(e){this.fontColor=e.target.value},onBgColorChange:function(e){this.backgroundColor=e.target.value},onFontSizeChange:function(e){this.fontSize=e.target.value},onFontSizeUnitChange:function(e){this.fontSizeUnit=e.target.value},onFontFamilyChange:function(e){this.fontFamily=e.target.value}},watch:{iframeUrl:function(){var e=this.$refs.pre,t=Ce(e).queue("fx").length>0;t||Ce(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit:function(){return this.fontSize?"".concat(this.fontSize).concat(this.fontSizeUnit):""},withBg:function(){return!!this.piwikurl&&""===this.backgroundColor&&""!==this.fontColor&&Ne(this.fontColor.substr(1))},iframeUrl:function(){if(this.piwikurl){var e=X["MatomoUrl"].stringify({module:"CoreAdminHome",action:"optOut",language:this.language,backgroundColor:this.backgroundColor.substr(1),fontColor:this.fontColor.substr(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily});return"".concat(this.piwikurl,"index.php?").concat(e)}return""},readThisToLearnMore:function(){var e="https://matomo.org/faq/how-to/faq_25918/";return Object(X["translate"])("General_ReadThisToLearnMore","<a rel='noreferrer noopener' target='_blank' href='".concat(e,"'>"),"</a>")},optOutExplanationIntro:function(){return Object(X["translate"])("CoreAdminHome_OptOutExplanationIntro",'<a href="'.concat(this.iframeUrl,'" rel="noreferrer noopener" target="_blank">'),"</a>")}}});ke.render=De;var _e=ke,Pe={class:"anonymizeLogData"},we={class:"form-group row"},Me={class:"col s12 input-field"},Ae={for:"anonymizeSite",class:"siteSelectorLabel"},ze={class:"sites_autocomplete"},Ie={class:"form-group row"},Fe={class:"col s6 input-field"},Te={for:"anonymizeStartDate",class:"active"},xe=["value"],Le={class:"col s6 input-field"},Be={for:"anonymizeEndDate",class:"active"},Ue=["value"],Re={name:"anonymizeIp"},He={name:"anonymizeLocation"},Ge={name:"anonymizeTheUserId"},qe={class:"form-group row"},Ke={class:"col s12 m6"},We={for:"visit_columns"},$e={class:"innerFormField",name:"visit_columns"},Ye=["onClick","title"],Je={class:"col s12 m6"},Qe={class:"form-help"},Xe={class:"inline-help"},Ze={class:"form-group row"},et={class:"col s12"},tt={class:"form-group row"},nt={class:"col s12 m6"},at={for:"action_columns"},ot={class:"innerFormField",name:"action_columns"},it=["onClick","title"],lt={class:"col s12 m6"},rt={class:"form-help"},ct={class:"inline-help"},st=Object(i["createElementVNode"])("span",{class:"icon-info"},null,-1),dt={class:"ui-confirm",id:"confirmAnonymizeLogData",ref:"confirmAnonymizeLogData"},ut=["value"],mt=["value"];function bt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("SiteSelector"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Pe,[Object(i["createElementVNode"])("div",we,[Object(i["createElementVNode"])("div",Me,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Ae,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(i["createElementVNode"])("div",ze,[Object(i["createVNode"])(r,{id:"anonymizeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",Fe,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Te,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(i["createElementVNode"])("input",{type:"text",id:"anonymizeStartDate",class:"anonymizeStartDate",ref:"anonymizeStartDate",name:"anonymizeStartDate",value:e.startDate,onKeydown:t[1]||(t[1]=function(t){return e.onKeydownStartDate(t)}),onChange:t[2]||(t[2]=function(t){return e.onKeydownStartDate(t)})},null,40,xe)])]),Object(i["createElementVNode"])("div",Le,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",Be,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(i["createElementVNode"])("input",{type:"text",class:"anonymizeEndDate",id:"anonymizeEndDate",ref:"anonymizeEndDate",name:"anonymizeEndDate",value:e.endDate,onKeydown:t[3]||(t[3]=function(t){return e.onKeydownEndDate(t)}),onChange:t[4]||(t[4]=function(t){return e.onKeydownEndDate(t)})},null,40,Ue)])])]),Object(i["createElementVNode"])("div",Re,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeIp",title:e.translate("PrivacyManager_AnonymizeIp"),modelValue:e.anonymizeIp,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.anonymizeIp=t}),introduction:e.translate("General_Visit"),"inline-help":e.translate("PrivacyManager_AnonymizeIpHelp")},null,8,["title","modelValue","introduction","inline-help"])]),Object(i["createElementVNode"])("div",He,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeLocation",title:e.translate("PrivacyManager_AnonymizeLocation"),modelValue:e.anonymizeLocation,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.anonymizeLocation=t}),"inline-help":e.translate("PrivacyManager_AnonymizeLocationHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",Ge,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeTheUserId",title:e.translate("PrivacyManager_AnonymizeUserId"),modelValue:e.anonymizeUserId,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.anonymizeUserId=t}),"inline-help":e.translate("PrivacyManager_AnonymizeUserIdHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",qe,[Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",We,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedVisitColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedVisitColumns selectedVisitColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",$e,[Object(i["createVNode"])(c,{uicontrol:"select",name:"visit_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onVisitColumnChange()},"full-width":!0,options:e.availableVisitColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeVisitColumn(n)},title:e.translate("General_Remove")},null,8,Ye),[[i["vShow"],n+1!==e.selectedVisitColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",Je,[Object(i["createElementVNode"])("div",Qe,[Object(i["createElementVNode"])("span",Xe,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(i["createElementVNode"])("div",Ze,[Object(i["createElementVNode"])("div",et,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Action")),1)])]),Object(i["createElementVNode"])("div",tt,[Object(i["createElementVNode"])("div",nt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",at,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedActionColumns,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])("selectedActionColumns selectedActionColumns".concat(n," multiple valign-wrapper")),key:n},[Object(i["createElementVNode"])("div",ot,[Object(i["createVNode"])(c,{uicontrol:"select",name:"action_columns","model-value":t.column,"onUpdate:modelValue":function(n){t.column=n,e.onActionColumnChange()},"full-width":!0,options:e.availableActionColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeActionColumn(n)},title:e.translate("General_Remove")},null,8,it),[[i["vShow"],n+1!==e.selectedActionColumns.length]])],2)})),128))])]),Object(i["createElementVNode"])("div",lt,[Object(i["createElementVNode"])("div",rt,[Object(i["createElementVNode"])("span",ct,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(i["createElementVNode"])("p",null,[st,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(i["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=function(t){return e.scheduleAnonymization()}),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(i["createElementVNode"])("div",dt,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ut),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,mt)],512)])}function pt(e){return e<10?"0".concat(e):e}var gt=Object(i["defineComponent"])({components:{SiteSelector:X["SiteSelector"],Field:ee["Field"],SaveButton:ee["SaveButton"]},data:function(){var e=new Date,t="".concat(e.getFullYear(),"-").concat(pt(e.getMonth()+1),"-").concat(pt(e.getDay()+1));return{isLoading:!1,isDeleting:!1,anonymizeIp:!1,anonymizeLocation:!1,anonymizeUserId:!1,site:{id:"all",name:"All Websites"},availableVisitColumns:[],availableActionColumns:[],selectedVisitColumns:[{column:""}],selectedActionColumns:[{column:""}],startDate:t,endDate:t}},created:function(){var e=this;this.onKeydownStartDate=Object(X["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(X["debounce"])(this.onKeydownEndDate,50),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableVisitColumnsToAnonymize"}).then((function(t){e.availableVisitColumns=[],t.forEach((function(t){e.availableVisitColumns.push({key:t.column_name,value:t.column_name})}))})),X["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize"}).then((function(t){e.availableActionColumns=[],t.forEach((function(t){e.availableActionColumns.push({key:t.column_name,value:t.column_name})}))})),setTimeout((function(){var t=X["Matomo"].getBaseDatePickerOptions(null),n=X["Matomo"].getBaseDatePickerOptions(null);$(e.$refs.anonymizeStartDate).datepicker(t),$(e.$refs.anonymizeEndDate).datepicker(n)}))},methods:{onVisitColumnChange:function(){var e=this.selectedVisitColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addVisitColumn()},addVisitColumn:function(){this.selectedVisitColumns.push({column:""})},removeVisitColumn:function(e){if(e>-1){var t=this.selectedVisitColumns.length-1;t===e?this.selectedVisitColumns[e]={column:""}:this.selectedVisitColumns.splice(e,1)}},onActionColumnChange:function(){var e=this.selectedActionColumns.every((function(e){return!(null===e||void 0===e||!e.column)}));e&&this.addActionColumn()},addActionColumn:function(){this.selectedActionColumns.push({column:""})},removeActionColumn:function(e){if(e>-1){var t=this.selectedActionColumns.length-1;t===e?this.selectedActionColumns[e]={column:""}:this.selectedActionColumns.splice(e,1)}},scheduleAnonymization:function(){var e="".concat(this.startDate,",").concat(this.endDate);this.startDate===this.endDate&&(e=this.startDate);var t={date:e};t.idSites=this.site.id,t.anonymizeIp=this.anonymizeIp?"1":"0",t.anonymizeLocation=this.anonymizeLocation?"1":"0",t.anonymizeUserId=this.anonymizeUserId?"1":"0",t.unsetVisitColumns=this.selectedVisitColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),t.unsetLinkVisitActionColumns=this.selectedActionColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),X["Matomo"].helper.modalConfirm(this.$refs.confirmAnonymizeLogData,{yes:function(){X["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},t).then((function(){window.location.reload(!0)}))}})},onKeydownStartDate:function(e){this.startDate=e.target.value},onKeydownEndDate:function(e){this.endDate=e.target.value}},computed:{isAnonymizePastDataDisabled:function(){return!this.anonymizeIp&&!this.anonymizeLocation&&!this.selectedVisitColumns&&!this.selectedActionColumns}}});gt.render=bt;var vt=gt;function ht(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"doNotTrack",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),options:e.doNotTrackOptions,"inline-help":e.translate("PrivacyManager_DoNotTrack_Description")},null,8,["modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[1]||(t[1]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Ot=Object(i["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:this.dntSupport?1:0}},methods:{save:function(){var e=this;this.isLoading=!0;var t="deactivateDoNotTrack";this.enabled&&"0"!==this.enabled&&(t="activateDoNotTrack"),X["AjaxHelper"].post({module:"API",method:"PrivacyManager.".concat(t)}).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});X["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});Ot.render=ht;var jt=Ot;function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Vt(e,t,n){return t&&yt(e.prototype,t),n&&yt(e,n),e}function St(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var St=function(){function e(){var t=this;jt(this,e),Vt(this,"privateState",Object(i["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),Vt(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Vt(this,"enableDeleteReports",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteReports}))),Vt(this,"enableDeleteLogs",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteLogs}))),Vt(this,"currentRequest",void 0)}return yt(e,[{key:"updateSettings",value:function(e){this.initSettings(e),this.privateState.isModified=!0}},{key:"initSettings",value:function(e){this.privateState.settings=Object.assign(Object.assign({},this.privateState.settings),e),this.reloadDbStats()}},{key:"savePurgeDataSettings",value:function(e,t){return this.privateState.isModified=!1,X["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0"})).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)}))}},{key:"isEitherDeleteSectionEnabled",value:function(){return this.state.value.settings.enableDeleteLogs||this.state.value.settings.enableDeleteReports}},{key:"isManualEstimationLinkShowing",value:function(){return window.$("#getPurgeEstimateLink").length>0}},{key:"reloadDbStats",value:function(e){var t=this;if(this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),e||this.isEitherDeleteSectionEnabled()&&!this.isManualEstimationLinkShowing()){this.privateState.loadingEstimation=!0,this.privateState.estimation="",this.privateState.showEstimate=!1;var n=this.privateState.settings,a=Object.assign(Object.assign({},n),{},{enableDeleteLogs:n.enableDeleteLogs?"1":"0",enableDeleteReports:n.enableDeleteReports?"1":"0"});!0===e&&(a.forceEstimate=1),this.currentRequest=new AbortController,X["AjaxHelper"].post({module:"PrivacyManager",action:"getDatabaseSize",format:"html"},a,{abortController:this.currentRequest,format:"html"}).then((function(e){t.privateState.estimation=e,t.privateState.showEstimate=!0,t.privateState.loadingEstimation=!1})).finally((function(){t.currentRequest=void 0,t.privateState.loadingEstimation=!1}))}}}]),e}(),Dt=new St,Nt={id:"formDeleteSettings"},Et={id:"deleteLogSettingEnabled"},Ct={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},kt={href:"https://matomo.org/faq/general/#faq_125",rel:"noreferrer noopener",target:"_blank"},_t={id:"deleteLogSettings"};function Pt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Nt,[Object(i["createElementVNode"])("div",Et,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteLog"),"inline-help":e.translate("PrivacyManager_DeleteRawDataInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ct,[Object(i["createElementVNode"])("a",kt,Object(i["toDisplayString"])(e.translate("General_ClickHere")),1)],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",_t,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastDaysInput","1")},null,8,["model-value","title","inline-help"])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[2]||(t[2]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var wt=window,Mt=wt.$,At=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:"1"===this.deleteData.config.delete_logs_enable,deleteOlderThan:this.deleteData.config.delete_logs_older_than}},created:function(){var e=this;setTimeout((function(){Dt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Dt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Dt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteLogsConfirm";Dt.enableDeleteReports.value&&(t="deleteBothConfirm"),Mt("#confirmDeleteSettings").find(">h2").hide(),Mt("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle:function(){return"".concat(Object(X["translate"])("PrivacyManager_DeleteLogsOlderThan")," (").concat(Object(X["translate"])("Intl_PeriodDays"),")")}}});At.render=Pt;var zt=At,It={id:"formDeleteSettings"},Ft={id:"deleteReportsSettingEnabled"},Tt={class:"alert alert-warning",style:{width:"50%"}},xt=Object(i["createElementVNode"])("br",null,null,-1),Lt=Object(i["createElementVNode"])("br",null,null,-1),Bt={id:"deleteReportsSettings"};function Ut(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",It,[Object(i["createElementVNode"])("div",Ft,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteReports"),"inline-help":e.translate("PrivacyManager_DeleteAggregateReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Tt,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),xt,Lt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Bt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteReportsOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteReportsOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastMonthsInput","1")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepBasic","model-value":e.keepBasic,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.keepBasic=t,e.reloadDbStats()}),title:e.deleteReportsKeepBasicTitle,"inline-help":e.translate("PrivacyManager_KeepBasicMetricsReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepDay","model-value":e.keepDataForDay,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.keepDataForDay=t,e.reloadDbStats()}),title:e.translate("General_DailyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepWeek","model-value":e.keepDataForWeek,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.keepDataForWeek=t,e.reloadDbStats()}),title:e.translate("General_WeeklyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepMonth","model-value":e.keepDataForMonth,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.keepDataForMonth=t,e.reloadDbStats()}),title:"".concat(e.translate("General_MonthlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepYear","model-value":e.keepDataForYear,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.keepDataForYear=t,e.reloadDbStats()}),title:"".concat(e.translate("General_YearlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepRange","model-value":e.keepDataForRange,"onUpdate:modelValue":t[7]||(t[7]=function(t){e.keepDataForRange=t,e.reloadDbStats()}),title:e.translate("General_RangeReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepSegments","model-value":e.keepDataForSegments,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.keepDataForSegments=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_KeepReportSegments")},null,8,["model-value","title"])])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[9]||(t[9]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function Rt(e){return e?"1":"0"}var Ht=window,Gt=Ht.$,qt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_reports_enable,10),deleteOlderThan:this.deleteData.config.delete_reports_older_than,keepBasic:1===parseInt(this.deleteData.config.delete_reports_keep_basic_metrics,10),keepDataForDay:1===parseInt(this.deleteData.config.delete_reports_keep_day_reports,10),keepDataForWeek:1===parseInt(this.deleteData.config.delete_reports_keep_week_reports,10),keepDataForMonth:1===parseInt(this.deleteData.config.delete_reports_keep_month_reports,10),keepDataForYear:1===parseInt(this.deleteData.config.delete_reports_keep_year_reports,10),keepDataForRange:1===parseInt(this.deleteData.config.delete_reports_keep_range_reports,10),keepDataForSegments:1===parseInt(this.deleteData.config.delete_reports_keep_segment_reports,10)}},created:function(){var e=this;setTimeout((function(){Dt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Dt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Dt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteReportsConfirm";Dt.enableDeleteLogs.value&&(t="deleteBothConfirm"),Gt("#confirmDeleteSettings").find(">h2").hide(),Gt("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:Rt(this.keepBasic),keepDay:Rt(this.keepDataForDay),keepWeek:Rt(this.keepDataForWeek),keepMonth:Rt(this.keepDataForMonth),keepYear:Rt(this.keepDataForYear),keepRange:Rt(this.keepDataForRange),keepSegments:Rt(this.keepDataForSegments)}},deleteOldLogsText:function(){return Object(X["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle:function(){var e=Object(X["translate"])("PrivacyManager_DeleteReportsOlderThan");return"".concat(e," (").concat(Object(X["translate"])("Intl_PeriodMonths"),")")},deleteReportsKeepBasicTitle:function(){var e=Object(X["translate"])("PrivacyManager_KeepBasicMetrics");return"".concat(e," (").concat(Object(X["translate"])("General_Recommended"),")")}}});qt.render=Ut;var Kt=qt,Wt={id:"formDeleteSettings"},$t={id:"deleteSchedulingSettings"},Yt={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},Jt={key:0},Qt=Object(i["createElementVNode"])("br",null,null,-1),Xt=Object(i["createElementVNode"])("br",null,null,-1),Zt=Object(i["createElementVNode"])("br",null,null,-1),en=Object(i["createElementVNode"])("br",null,null,-1),tn={key:0,id:"deleteDataEstimateSect",class:"form-group row"},nn={class:"col s12",id:"databaseSizeHeadline"},an={class:"col s12 m6"},on=["innerHTML"],ln=Object(i["createTextVNode"])(" "),rn={class:"col s12 m6"},cn={key:0,class:"form-help"};function sn(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),d=Object(i["resolveComponent"])("ContentBlock"),u=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Wt,[Object(i["withDirectives"])(Object(i["createVNode"])(d,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",$t,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{uicontrol:"select",name:"deleteLowestInterval",title:e.translate("PrivacyManager_DeleteDataInterval"),modelValue:e.deleteLowestInterval,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.deleteLowestInterval=t}),options:e.scheduleDeletionOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Yt,[e.deleteData.lastRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Jt,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),Qt,Xt])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),Zt,en,Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=function(t){return e.executeDataPurgeNow()})},Object(i["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[i["vShow"],e.showPurgeNowLink]]),Object(i["createVNode"])(r,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"db-purged-message"},Object(i["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[i["vShow"],e.dataWasPurged]])])]})),_:1},8,["title","modelValue","options"])])]),"1"===e.deleteData.config.enable_database_size_estimate||1===e.deleteData.config.enable_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",tn,[Object(i["createElementVNode"])("h3",nn,Object(i["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(i["createElementVNode"])("div",an,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,on),[[i["vShow"],e.showEstimate]]),ln,Object(i["createVNode"])(r,{loading:e.loadingEstimation},null,8,["loading"])]),Object(i["createElementVNode"])("div",rn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",cn,[Object(i["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(i["withModifiers"])((function(t){return e.getPurgeEstimate()}),["prevent"]))},Object(i["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(i["createCommentVNode"])("",!0)])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{onConfirm:t[3]||(t[3]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])]})),_:1},8,["content-title"]),[[i["vShow"],e.isEitherDeleteSectionEnabled]])],512)),[[u]])}var dn=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:X["ContentBlock"],ActivityIndicator:X["ActivityIndicator"],Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval}},methods:{save:function(){var e="PrivacyManager.setScheduleReportDeletionSettings";Dt.savePurgeDataSettings(e,{deleteLowestInterval:this.deleteLowestInterval})},executeDataPurgeNow:function(){var e=this;Dt.state.value.isModified?X["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:function(){return null}}):X["Matomo"].helper.modalConfirm("#confirmPurgeNow",{yes:function(){e.loadingDataPurge=!0,e.showPurgeNowLink=!1,X["AjaxHelper"].fetch({module:"PrivacyManager",action:"executeDataPurge",format:"html"},{withTokenInUrl:!0}).then((function(){Dt.reloadDbStats(),e.dataWasPurged=!0,setTimeout((function(){e.dataWasPurged=!1,e.showPurgeNowLink=!0}),2e3)})).finally((function(){e.loadingDataPurge=!1}))}})},getPurgeEstimate:function(){return Dt.reloadDbStats(!0)}},computed:{showEstimate:function(){return Dt.state.value.showEstimate},isEitherDeleteSectionEnabled:function(){return Dt.isEitherDeleteSectionEnabled()},estimation:function(){return Dt.state.value.estimation},loadingEstimation:function(){return Dt.state.value.loadingEstimation}}});dn.render=sn;var un=dn; + */var Dt=function(){function e(){var t=this;ft(this,e),St(this,"privateState",Object(i["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),St(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),St(this,"enableDeleteReports",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteReports}))),St(this,"enableDeleteLogs",Object(i["computed"])((function(){return t.state.value.settings.enableDeleteLogs}))),St(this,"currentRequest",void 0)}return Vt(e,[{key:"updateSettings",value:function(e){this.initSettings(e),this.privateState.isModified=!0}},{key:"initSettings",value:function(e){this.privateState.settings=Object.assign(Object.assign({},this.privateState.settings),e),this.reloadDbStats()}},{key:"savePurgeDataSettings",value:function(e,t){return this.privateState.isModified=!1,X["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0"})).then((function(){var e=X["NotificationsStore"].show({message:Object(X["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});X["NotificationsStore"].scrollToNotification(e)}))}},{key:"isEitherDeleteSectionEnabled",value:function(){return this.state.value.settings.enableDeleteLogs||this.state.value.settings.enableDeleteReports}},{key:"isManualEstimationLinkShowing",value:function(){return window.$("#getPurgeEstimateLink").length>0}},{key:"reloadDbStats",value:function(e){var t=this;if(this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),e||this.isEitherDeleteSectionEnabled()&&!this.isManualEstimationLinkShowing()){this.privateState.loadingEstimation=!0,this.privateState.estimation="",this.privateState.showEstimate=!1;var n=this.privateState.settings,a=Object.assign(Object.assign({},n),{},{enableDeleteLogs:n.enableDeleteLogs?"1":"0",enableDeleteReports:n.enableDeleteReports?"1":"0"});!0===e&&(a.forceEstimate=1),this.currentRequest=new AbortController,X["AjaxHelper"].post({module:"PrivacyManager",action:"getDatabaseSize",format:"html"},a,{abortController:this.currentRequest,format:"html"}).then((function(e){t.privateState.estimation=e,t.privateState.showEstimate=!0,t.privateState.loadingEstimation=!1})).finally((function(){t.currentRequest=void 0,t.privateState.loadingEstimation=!1}))}}}]),e}(),Nt=new Dt,Et={id:"formDeleteSettings"},Ct={id:"deleteLogSettingEnabled"},kt={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},_t={href:"https://matomo.org/faq/general/#faq_125",rel:"noreferrer noopener",target:"_blank"},Pt={id:"deleteLogSettings"};function wt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Et,[Object(i["createElementVNode"])("div",Ct,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteLog"),"inline-help":e.translate("PrivacyManager_DeleteRawDataInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",kt,[Object(i["createElementVNode"])("a",_t,Object(i["toDisplayString"])(e.translate("General_ClickHere")),1)],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Pt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastDaysInput","1")},null,8,["model-value","title","inline-help"])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[2]||(t[2]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Mt=window,At=Mt.$,zt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:"1"===this.deleteData.config.delete_logs_enable,deleteOlderThan:this.deleteData.config.delete_logs_older_than}},created:function(){var e=this;setTimeout((function(){Nt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Nt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Nt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteLogsConfirm";Nt.enableDeleteReports.value&&(t="deleteBothConfirm"),At("#confirmDeleteSettings").find(">h2").hide(),At("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle:function(){return"".concat(Object(X["translate"])("PrivacyManager_DeleteLogsOlderThan")," (").concat(Object(X["translate"])("Intl_PeriodDays"),")")}}});zt.render=wt;var It=zt,Ft={id:"formDeleteSettings"},Tt={id:"deleteReportsSettingEnabled"},xt={class:"alert alert-warning",style:{width:"50%"}},Lt=Object(i["createElementVNode"])("br",null,null,-1),Bt=Object(i["createElementVNode"])("br",null,null,-1),Ut={id:"deleteReportsSettings"};function Rt(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ft,[Object(i["createElementVNode"])("div",Tt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteReports"),"inline-help":e.translate("PrivacyManager_DeleteAggregateReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",xt,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),Lt,Bt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ut,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteReportsOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteReportsOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastMonthsInput","1")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepBasic","model-value":e.keepBasic,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.keepBasic=t,e.reloadDbStats()}),title:e.deleteReportsKeepBasicTitle,"inline-help":e.translate("PrivacyManager_KeepBasicMetricsReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepDay","model-value":e.keepDataForDay,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.keepDataForDay=t,e.reloadDbStats()}),title:e.translate("General_DailyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepWeek","model-value":e.keepDataForWeek,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.keepDataForWeek=t,e.reloadDbStats()}),title:e.translate("General_WeeklyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepMonth","model-value":e.keepDataForMonth,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.keepDataForMonth=t,e.reloadDbStats()}),title:"".concat(e.translate("General_MonthlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepYear","model-value":e.keepDataForYear,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.keepDataForYear=t,e.reloadDbStats()}),title:"".concat(e.translate("General_YearlyReports")," (").concat(e.translate("General_Recommended"),")")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepRange","model-value":e.keepDataForRange,"onUpdate:modelValue":t[7]||(t[7]=function(t){e.keepDataForRange=t,e.reloadDbStats()}),title:e.translate("General_RangeReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepSegments","model-value":e.keepDataForSegments,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.keepDataForSegments=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_KeepReportSegments")},null,8,["model-value","title"])])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[9]||(t[9]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function Ht(e){return e?"1":"0"}var Gt=window,qt=Gt.$,Kt=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_reports_enable,10),deleteOlderThan:this.deleteData.config.delete_reports_older_than,keepBasic:1===parseInt(this.deleteData.config.delete_reports_keep_basic_metrics,10),keepDataForDay:1===parseInt(this.deleteData.config.delete_reports_keep_day_reports,10),keepDataForWeek:1===parseInt(this.deleteData.config.delete_reports_keep_week_reports,10),keepDataForMonth:1===parseInt(this.deleteData.config.delete_reports_keep_month_reports,10),keepDataForYear:1===parseInt(this.deleteData.config.delete_reports_keep_year_reports,10),keepDataForRange:1===parseInt(this.deleteData.config.delete_reports_keep_range_reports,10),keepDataForSegments:1===parseInt(this.deleteData.config.delete_reports_keep_segment_reports,10)}},created:function(){var e=this;setTimeout((function(){Nt.initSettings(e.settings)}))},methods:{saveSettings:function(){var e=this,t="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Nt.savePurgeDataSettings(t,this.settings).finally((function(){e.isLoading=!1}))},reloadDbStats:function(){Nt.updateSettings(this.settings)},save:function(){var e=this;if(this.enabled){var t="deleteReportsConfirm";Nt.enableDeleteLogs.value&&(t="deleteBothConfirm"),qt("#confirmDeleteSettings").find(">h2").hide(),qt("#".concat(t)).show(),X["Matomo"].helper.modalConfirm("#confirmDeleteSettings",{yes:function(){e.saveSettings()}})}else this.saveSettings()}},computed:{settings:function(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:Ht(this.keepBasic),keepDay:Ht(this.keepDataForDay),keepWeek:Ht(this.keepDataForWeek),keepMonth:Ht(this.keepDataForMonth),keepYear:Ht(this.keepDataForYear),keepRange:Ht(this.keepDataForRange),keepSegments:Ht(this.keepDataForSegments)}},deleteOldLogsText:function(){return Object(X["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle:function(){var e=Object(X["translate"])("PrivacyManager_DeleteReportsOlderThan");return"".concat(e," (").concat(Object(X["translate"])("Intl_PeriodMonths"),")")},deleteReportsKeepBasicTitle:function(){var e=Object(X["translate"])("PrivacyManager_KeepBasicMetrics");return"".concat(e," (").concat(Object(X["translate"])("General_Recommended"),")")}}});Kt.render=Rt;var Wt=Kt,$t={id:"formDeleteSettings"},Yt={id:"deleteSchedulingSettings"},Jt={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},Qt={key:0},Xt=Object(i["createElementVNode"])("br",null,null,-1),Zt=Object(i["createElementVNode"])("br",null,null,-1),en=Object(i["createElementVNode"])("br",null,null,-1),tn=Object(i["createElementVNode"])("br",null,null,-1),nn={key:0,id:"deleteDataEstimateSect",class:"form-group row"},an={class:"col s12",id:"databaseSizeHeadline"},on={class:"col s12 m6"},ln=["innerHTML"],rn=Object(i["createTextVNode"])(" "),cn={class:"col s12 m6"},sn={key:0,class:"form-help"};function dn(e,t,n,a,o,l){var r=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),d=Object(i["resolveComponent"])("ContentBlock"),u=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",$t,[Object(i["withDirectives"])(Object(i["createVNode"])(d,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Yt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{uicontrol:"select",name:"deleteLowestInterval",title:e.translate("PrivacyManager_DeleteDataInterval"),modelValue:e.deleteLowestInterval,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.deleteLowestInterval=t}),options:e.scheduleDeletionOptions},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",Jt,[e.deleteData.lastRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Qt,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),Xt,Zt])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),en,tn,Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=function(t){return e.executeDataPurgeNow()})},Object(i["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[i["vShow"],e.showPurgeNowLink]]),Object(i["createVNode"])(r,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"db-purged-message"},Object(i["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[i["vShow"],e.dataWasPurged]])])]})),_:1},8,["title","modelValue","options"])])]),"1"===e.deleteData.config.enable_database_size_estimate||1===e.deleteData.config.enable_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",nn,[Object(i["createElementVNode"])("h3",an,Object(i["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(i["createElementVNode"])("div",on,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,ln),[[i["vShow"],e.showEstimate]]),rn,Object(i["createVNode"])(r,{loading:e.loadingEstimation},null,8,["loading"])]),Object(i["createElementVNode"])("div",cn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",sn,[Object(i["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(i["withModifiers"])((function(t){return e.getPurgeEstimate()}),["prevent"]))},Object(i["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(i["createCommentVNode"])("",!0)])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{onConfirm:t[3]||(t[3]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])]})),_:1},8,["content-title"]),[[i["vShow"],e.isEitherDeleteSectionEnabled]])],512)),[[u]])}var un=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:X["ContentBlock"],ActivityIndicator:X["ActivityIndicator"],Field:ee["Field"],SaveButton:ee["SaveButton"]},directives:{Form:ee["Form"]},data:function(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval}},methods:{save:function(){var e="PrivacyManager.setScheduleReportDeletionSettings";Nt.savePurgeDataSettings(e,{deleteLowestInterval:this.deleteLowestInterval})},executeDataPurgeNow:function(){var e=this;Nt.state.value.isModified?X["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:function(){return null}}):X["Matomo"].helper.modalConfirm("#confirmPurgeNow",{yes:function(){e.loadingDataPurge=!0,e.showPurgeNowLink=!1,X["AjaxHelper"].fetch({module:"PrivacyManager",action:"executeDataPurge",format:"html"},{withTokenInUrl:!0}).then((function(){Nt.reloadDbStats(),e.dataWasPurged=!0,setTimeout((function(){e.dataWasPurged=!1,e.showPurgeNowLink=!0}),2e3)})).finally((function(){e.loadingDataPurge=!1}))}})},getPurgeEstimate:function(){return Nt.reloadDbStats(!0)}},computed:{showEstimate:function(){return Nt.state.value.showEstimate},isEitherDeleteSectionEnabled:function(){return Nt.isEitherDeleteSectionEnabled()},estimation:function(){return Nt.state.value.estimation},loadingEstimation:function(){return Nt.state.value.loadingEstimation}}});un.render=dn;var mn=un; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue b/plugins/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue index c73ddb6546..10cb1a77f2 100644 --- a/plugins/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue +++ b/plugins/PrivacyManager/vue/src/AnonymizeIp/AnonymizeIp.vue @@ -113,13 +113,17 @@ interface AnonymizeIpState { isLoading: boolean; actualEnabled: boolean; actualMaskLength: number; - actualUseAnonymizedIpForVisitEnrichment: string; + actualUseAnonymizedIpForVisitEnrichment: number; actualAnonymizeUserId: boolean; actualAnonymizeOrderId: boolean; actualForceCookielessTracking: boolean; actualAnonymizeReferrer?: string; } +function configBoolToInt(value?: string|number|boolean): number { + return value === true || value === 1 || value === '1' ? 1 : 0; +} + export default defineComponent({ props: { anonymizeIpEnabled: Boolean, @@ -128,7 +132,7 @@ export default defineComponent({ type: Number, required: true, }, - useAnonymizedIpForVisitEnrichment: Boolean, + useAnonymizedIpForVisitEnrichment: [Boolean, String, Number], anonymizeOrderId: Boolean, forceCookielessTracking: Boolean, anonymizeReferrer: String, @@ -163,9 +167,11 @@ export default defineComponent({ data(): AnonymizeIpState { return { isLoading: false, - actualEnabled: !!this.anonymizeIpEnabled, + actualEnabled: this.anonymizeIpEnabled, actualMaskLength: this.maskLength, - actualUseAnonymizedIpForVisitEnrichment: this.useAnonymizedIpForVisitEnrichment ? '1' : '0', + actualUseAnonymizedIpForVisitEnrichment: configBoolToInt( + this.useAnonymizedIpForVisitEnrichment, + ), actualAnonymizeUserId: !!this.anonymizeUserId, actualAnonymizeOrderId: !!this.anonymizeOrderId, actualForceCookielessTracking: !!this.forceCookielessTracking, @@ -187,7 +193,7 @@ export default defineComponent({ forceCookielessTracking: this.actualForceCookielessTracking ? '1' : '0', anonymizeReferrer: this.actualAnonymizeReferrer ? this.actualAnonymizeReferrer : '', maskLength: this.actualMaskLength, - useAnonymizedIpForVisitEnrichment: this.actualUseAnonymizedIpForVisitEnrichment ? '1' : '0', + useAnonymizedIpForVisitEnrichment: this.actualUseAnonymizedIpForVisitEnrichment, }, ).then(() => { const notificationInstanceId = NotificationsStore.show({ |