/* Matomo Javascript - cb=a14788798e1a9299dc3471ff5946556d*/

(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["UsersManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["UsersManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(s){if(t[s])return t[s].exports;var r=t[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},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 s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(s,r,function(t){return e[t]}.bind(null,r));return s},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/UsersManager/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},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CapabilitiesEdit",(function(){return U})),n.d(t,"UserPermissionsEdit",(function(){return He})),n.d(t,"UserEditForm",(function(){return At})),n.d(t,"PagedUsersList",(function(){return ts})),n.d(t,"UsersManager",(function(){return Us})),n.d(t,"AnonymousSettings",(function(){return Ts})),n.d(t,"NewsletterSettings",(function(){return Ls})),n.d(t,"PersonalSettings",(function(){return qs})),n.d(t,"AddNewToken",(function(){return Qs})),n.d(t,"AddNewTokenSuccess",(function(){return rr})),n.d(t,"UserSecurity",(function(){return Rr})),n.d(t,"UserSettings",(function(){return zr})),"undefined"!==typeof window){var s=window.document.currentScript,r=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var o=n("8bbf"),i=["title"],a=["onClick"],l={key:0,class:"addCapability"},c={class:"ui-confirm confirmCapabilityToggle modal",ref:"confirmCapabilityToggleModal"},d={class:"modal-content"},u=["innerHTML"],m=["innerHTML"],b={class:"modal-footer"};function p(e,t,n,s,r,p){var g=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["capabilitiesEdit",{busy:e.isBusy}])},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.actualCapabilities,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t.id,class:"chip"},[Object(o["createElementVNode"])("span",{class:"capability-name",title:"".concat(t.description," ").concat(e.isIncludedInRole(t)?"<br/><br/>".concat(e.translate("UsersManager_IncludedInUsersRole")):"")},Object(o["toDisplayString"])(t.category)+": "+Object(o["toDisplayString"])(t.name),9,i),e.isIncludedInRole(t)?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:"icon-close",onClick:function(n){e.capabilityToRemoveId=t.id,e.onToggleCapability(!1)}},null,8,a))])})),128)),e.availableCapabilitiesGrouped.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",l,["noaccess"!==e.userRole?(Object(o["openBlock"])(),Object(o["createBlock"])(g,{key:0,"model-value":e.capabilityToAddId,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.capabilityToAddId=t,e.onToggleCapability(!0)}),disabled:e.isBusy,uicontrol:"expandable-select",name:"add_capability","full-width":!0,options:e.availableCapabilitiesGrouped},null,8,["model-value","disabled","options"])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",c,[Object(o["createElementVNode"])("div",d,[e.isAddingCapability?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.confirmAddCapabilityToggleContent)},null,8,u)):Object(o["createCommentVNode"])("",!0),e.isAddingCapability?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.confirmCapabilityToggleContent)},null,8,m))]),Object(o["createElementVNode"])("div",b,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.toggleCapability()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){e.capabilityToAddOrRemove=null,e.capabilityToAddId=null,e.capabilityToRemoveId=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var g=n("19dc"),f=n("a5a2");function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function j(e,t,n){return t&&O(e.prototype,t),n&&O(e,n),e}function v(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var C=function(){function e(){var t=this;h(this,e),v(this,"privateState",Object(o["reactive"])({isLoading:!1,capabilities:[]})),v(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),v(this,"capabilities",Object(o["computed"])((function(){return t.state.value.capabilities}))),v(this,"isLoading",Object(o["computed"])((function(){return t.state.value.isLoading}))),v(this,"fetchPromise",void 0)}return j(e,[{key:"init",value:function(){return this.fetchCapabilities()}},{key:"fetchCapabilities",value:function(){var e=this;return this.fetchPromise||(this.privateState.isLoading=!0,this.fetchPromise=g["AjaxHelper"].fetch({method:"UsersManager.getAvailableCapabilities"}).then((function(t){return e.privateState.capabilities=t,e.capabilities.value})).finally((function(){e.privateState.isLoading=!1}))),this.fetchPromise}}]),e}(),k=new C,y=window,N=y.$,S=Object(o["defineComponent"])({props:{idsite:[String,Number],siteName:{type:String,required:!0},userLogin:{type:String,required:!0},userRole:{type:String,required:!0},capabilities:Array},components:{Field:f["Field"]},data:function(){return{theCapabilities:this.capabilities||[],isBusy:!1,isAddingCapability:!1,capabilityToAddId:null,capabilityToRemoveId:null,capabilityToAddOrRemove:null}},emits:["change"],watch:{capabilities:function(e){e&&(this.theCapabilities=e)}},created:function(){var e=this;k.init(),this.capabilities?this.theCapabilities=this.capabilities:(this.isBusy=!0,g["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",limit:"1",filter_search:this.userLogin}).then((function(e){return e&&e.capabilities?e.capabilities:[]})).then((function(t){e.theCapabilities=t})).finally((function(){e.isBusy=!1})))},methods:{onToggleCapability:function(e){var t=this;this.isAddingCapability=e;var n=e?this.capabilityToAddId:this.capabilityToRemoveId;this.capabilityToAddOrRemove=null,this.availableCapabilities.forEach((function(e){e.id===n&&(t.capabilityToAddOrRemove=e)})),this.$refs.confirmCapabilityToggleModal&&N(this.$refs.confirmCapabilityToggleModal).modal({dismissible:!1,yes:function(){return null}}).modal("open")},toggleCapability:function(){this.isAddingCapability?this.addCapability(this.capabilityToAddOrRemove):this.removeCapability(this.capabilityToAddOrRemove)},isIncludedInRole:function(e){return-1!==(e.includedInRoles||[]).indexOf(this.userRole)},getCapabilitiesList:function(){var e=this,t=[];return this.availableCapabilities.forEach((function(n){e.isIncludedInRole(n)||e.capabilitiesSet[n.id]&&t.push(n.id)})),t},addCapability:function(e){var t=this;this.isBusy=!0,g["AjaxHelper"].post({method:"UsersManager.addCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))},removeCapability:function(e){var t=this;this.isBusy=!0,g["AjaxHelper"].post({method:"UsersManager.removeCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))}},computed:{availableCapabilities:function(){return k.capabilities.value},confirmAddCapabilityToggleContent:function(){return Object(g["translate"])("UsersManager_AreYouSureAddCapability","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"","</strong>"),"<strong>".concat(this.siteNameText,"</strong>"))},confirmCapabilityToggleContent:function(){return Object(g["translate"])("UsersManager_AreYouSureRemoveCapability","<strong>".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"","</strong>"),"<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteNameText,"</strong>"))},siteNameText:function(){return g["Matomo"].helper.htmlEntities(this.siteName)},availableCapabilitiesGrouped:function(){var e=this,t=this.availableCapabilities.filter((function(t){return!e.capabilitiesSet[t.id]})).map((function(e){return{group:e.category,key:e.id,value:e.name,tooltip:e.description}}));return t.sort((function(e,t){return e.group===t.group?e.value===t.value?0:e.value<t.value?-1:1:e.group<t.group?-1:1})),t},capabilitiesSet:function(){var e=this,t={},n=this.theCapabilities;return(n||[]).forEach((function(e){t[e]=!0})),(this.availableCapabilities||[]).forEach((function(n){e.isIncludedInRole(n)&&(t[n.id]=!0)})),t},actualCapabilities:function(){var e=this.capabilitiesSet;return this.availableCapabilities.filter((function(t){return!!e[t.id]}))}}});S.render=p;var U=S,V={key:0,class:"row"},E={class:"row to-all-websites"},w={class:"col s12"},A={style:{"margin-right":"3.5px"}},T={id:"all-sites-access-select",style:{"margin-right":"3.5px"}},M={style:{"margin-top":"18px"}},B={class:"filters row"},_={class:"col s12 m12 l8"},L={class:"input-field bulk-actions",style:{"margin-right":"3.5px"}},D={id:"user-permissions-edit-bulk-actions",class:"dropdown-content"},x={class:"dropdown-trigger","data-target":"user-permissions-bulk-set-access"},R={id:"user-permissions-bulk-set-access",class:"dropdown-content"},P=["onClick"],H={class:"input-field site-filter",style:{"margin-right":"3.5px"}},F=["value","placeholder"],I={class:"input-field access-filter",style:{"margin-right":"3.5px"}},q={key:0,class:"col s12 m12 l4 sites-for-permission-pagination-container"},$={class:"sites-for-permission-pagination"},z={class:"counter"},G=["textContent"],W={class:"roles-help-notification"},Y=["innerHTML"],X={class:"capabilities-help-notification"},J={id:"sitesForPermission"},K={class:"select-cell"},Q={class:"checkbox-container"},Z=["checked"],ee=Object(o["createElementVNode"])("span",null,null,-1),te={class:"role_header"},ne=["innerHTML"],se=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),re=[se],oe={class:"capabilities_header"},ie=["innerHTML"],ae=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),le=[ae],ce={key:0,class:"select-all-row"},de={colspan:"4"},ue={key:0},me=["innerHTML"],be=["innerHTML"],pe={key:1},ge=["innerHTML"],fe=["innerHTML"],he={class:"select-cell"},Oe={class:"checkbox-container"},je=["id","onUpdate:modelValue"],ve=Object(o["createElementVNode"])("span",null,null,-1),Ce={class:"role-select"},ke={class:"delete-access-confirm-modal modal",ref:"deleteAccessConfirmModal"},ye={class:"modal-content"},Ne=["innerHTML"],Se=["innerHTML"],Ue={class:"modal-footer"},Ve={class:"change-access-confirm-modal modal",ref:"changeAccessConfirmModal"},Ee={class:"modal-content"},we=["innerHTML"],Ae=["innerHTML"],Te={class:"modal-footer"},Me={class:"confirm-give-access-all-sites modal",ref:"confirmGiveAccessAllSitesModal"},Be={class:"modal-content"},_e=["innerHTML"],Le={class:"modal-footer"};function De(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Notification"),l=Object(o["resolveComponent"])("Field"),c=Object(o["resolveComponent"])("CapabilitiesEdit"),d=Object(o["resolveDirective"])("dropdown-menu"),u=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["userPermissionsEdit",{loading:e.isLoadingAccess}])},[e.hasAccessToAtLeastOneSite?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",V,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{context:"warning",type:"transient",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("General_Warning"))+":",1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_NoAccessWarning")),1)]})),_:1})])])),Object(o["createElementVNode"])("div",E,[Object(o["createElementVNode"])("div",w,[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("span",A,Object(o["toDisplayString"])(e.translate("UsersManager_GiveAccessToAll"))+":",1),Object(o["createElementVNode"])("div",T,[Object(o["createVNode"])(l,{modelValue:e.allWebsitesAccssLevelSet,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.allWebsitesAccssLevelSet=t}),uicontrol:"select",options:e.filteredAccessLevels,"full-width":!0},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["btn",{disabled:e.isGivingAccessToAllSites}]),onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showChangeAccessAllSitesModal()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Apply")),3)]),Object(o["createElementVNode"])("p",M,Object(o["toDisplayString"])(e.translate("UsersManager_OrManageIndividually"))+":",1)])]),Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("div",_,[Object(o["createElementVNode"])("div",L,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-permissions-edit-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[d,{activates:"#user-permissions-edit-bulk-actions"}]]),Object(o["createElementVNode"])("ul",D,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",x,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[d,{activates:"#user-permissions-bulk-set-access"}]]),Object(o["createElementVNode"])("ul",R,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.filteredAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.siteAccessToChange=null,e.roleToChangeTo=t.key,e.showChangeAccessConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,P)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){e.siteAccessToChange=null,e.roleToChangeTo="noaccess",e.showRemoveAccessConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)])])]),Object(o["createElementVNode"])("div",H,[Object(o["createElementVNode"])("input",{type:"text",value:e.siteNameFilter,onKeydown:t[3]||(t[3]=function(t){e.onChangeSiteFilter(t)}),onChange:t[4]||(t[4]=function(t){e.onChangeSiteFilter(t)}),placeholder:e.translate("UsersManager_FilterByWebsite")},null,40,F)]),Object(o["createElementVNode"])("div",I,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(l,{modelValue:e.accessLevelFilter,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.accessLevelFilter=t}),uicontrol:"select",options:e.filteredSelectAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["modelValue","options","placeholder"])])])]),e.totalEntries>e.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createElementVNode"])("div",$,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["prev",{disabled:e.offset<=0}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[6]||(t[6]=function(t){return e.gotoPreviousPage()})},"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("span",z,[Object(o["createElementVNode"])("span",{textContent:Object(o["toDisplayString"])(e.paginationText)},null,8,G)]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["next",{disabled:e.offset+e.limit>=e.totalEntries}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[7]||(t[7]=function(t){return e.gotoNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",W,[e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,Y)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",X,[e.isCapabilitiesHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("UsersManager_CapabilitiesHelp")),1)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",J,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",K,[Object(o["createElementVNode"])("span",Q,[Object(o["createElementVNode"])("label",null,[Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_all",checked:e.isAllCheckboxSelected,onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange(t)})},null,40,Z),ee])])]),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Name")),1),Object(o["createElementVNode"])("th",te,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Role")," "))},null,8,ne),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},re,2)]),Object(o["createElementVNode"])("th",oe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Capabilities")," "))},null,8,ie),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isCapabilitiesHelpToggled}]),onClick:t[10]||(t[10]=Object(o["withModifiers"])((function(t){return e.isCapabilitiesHelpToggled=!e.isCapabilitiesHelpToggled}),["prevent"]))},le,2)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.siteAccess.length<e.totalEntries?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",ce,[Object(o["createElementVNode"])("td",de,[e.areAllResultsSelected?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ue,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.theDisplayedWebsitesAreSelectedText),style:{"margin-right":"3.5px"}},null,8,me),Object(o["createElementVNode"])("a",{href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.clickToSelectAllText)},null,8,be)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",pe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.allWebsitesAreSelectedText),style:{"margin-right":"3.5px"}},null,8,ge),Object(o["createElementVNode"])("a",{href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.clickToSelectDisplayedWebsitesText)},null,8,fe)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.siteAccess,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:n.idsite},[Object(o["createElementVNode"])("td",he,[Object(o["createElementVNode"])("span",Oe,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,je),[[o["vModelCheckbox"],e.selectedRows[s]]]),ve])])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(n.site_name),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("div",Ce,[Object(o["createVNode"])(l,{"model-value":n.role,"onUpdate:modelValue":function(t){e.onRoleChange(n,t)},"model-modifiers":{abortable:!0},uicontrol:"select",options:e.filteredAccessLevels,"full-width":!0},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(c,{idsite:n.idsite,"site-name":n.site_name,"user-login":e.userLogin,"user-role":n.role,capabilities:n.capabilities,onChange:t[14]||(t[14]=function(t){return e.fetchAccess()})},null,8,["idsite","site-name","user-login","user-role","capabilities"])])])])})),128))])],512),[[u]]),Object(o["createElementVNode"])("div",ke,[Object(o["createElementVNode"])("div",ye,[e.siteAccessToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deletePermConfirmSingleText)},null,8,Ne)):Object(o["createCommentVNode"])("",!0),e.siteAccessToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.deletePermConfirmMultipleText)},null,8,Se))]),Object(o["createElementVNode"])("div",Ue,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[15]||(t[15]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){e.siteAccessToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",Ve,[Object(o["createElementVNode"])("div",Ee,[e.siteAccessToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.changePermToSiteConfirmSingleText)},null,8,we)):Object(o["createCommentVNode"])("",!0),e.siteAccessToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.changePermToSiteConfirmMultipleText)},null,8,Ae))]),Object(o["createElementVNode"])("div",Te,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[18]||(t[18]=Object(o["withModifiers"])((function(t){e.accessChangeEvent&&e.accessChangeEvent.abort(),e.siteAccessToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",Me,[Object(o["createElementVNode"])("div",Be,[Object(o["createElementVNode"])("h3",{innerHTML:e.$sanitize(e.changePermToAllSitesConfirmText)},null,8,_e),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ChangePermToAllSitesConfirm2")),1)]),Object(o["createElementVNode"])("div",Le,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[19]||(t[19]=Object(o["withModifiers"])((function(t){return e.giveAccessToAllSites()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[20]||(t[20]=function(e){return e.preventDefault()})},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var xe=window,Re=xe.$,Pe=Object(o["defineComponent"])({props:{userLogin:{type:String,required:!0},limit:{type:Number,default:10},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0}},components:{Notification:g["Notification"],Field:f["Field"],CapabilitiesEdit:U},directives:{DropdownMenu:g["DropdownMenu"],ContentTable:g["ContentTable"]},data:function(){return{siteAccess:[],offset:0,totalEntries:null,accessLevelFilter:"",siteNameFilter:"",isLoadingAccess:!1,allWebsitesAccssLevelSet:"view",isAllCheckboxSelected:!1,selectedRows:{},isBulkActionsDisabled:!0,areAllResultsSelected:!1,accessChangeEvent:null,hasAccessToAtLeastOneSite:!0,isRoleHelpToggled:!1,isCapabilitiesHelpToggled:!1,isGivingAccessToAllSites:!1,roleToChangeTo:null,siteAccessToChange:null}},emits:["userHasAccessDetected","accessChanged"],created:function(){var e=this;this.onChangeSiteFilter=Object(g["debounce"])(this.onChangeSiteFilter,300),Object(o["watch"])((function(){return e.allPropsWatch}),(function(){e.limit&&e.fetchAccess()})),this.fetchAccess()},watch:{accessLevelFilter:function(){this.offset=0,this.fetchAccess()}},methods:{onAllCheckboxChange:function(e){var t=this;this.isAllCheckboxSelected=e.target.checked,this.isAllCheckboxSelected?(this.siteAccess.forEach((function(e,n){t.selectedRows[n]=!0})),this.isBulkActionsDisabled=!1):this.clearSelection()},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.siteAccessToChange=null},onRowSelected:function(){var e=this;setTimeout((function(){var t=e.selectedRowsCount;e.isBulkActionsDisabled=0===t,e.isAllCheckboxSelected=t===e.siteAccess.length}))},fetchAccess:function(){var e=this;return this.isLoadingAccess=!0,g["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",limit:this.limit,offset:this.offset,filter_search:this.siteNameFilter,filter_access:this.accessLevelFilter,userLogin:this.userLogin},{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.isLoadingAccess=!1,e.siteAccess=n.responseJSON,e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results"),10)||0,e.hasAccessToAtLeastOneSite=!!n.getResponseHeader("x-matomo-has-some"),e.$emit("userHasAccessDetected",{hasAccess:e.hasAccessToAtLeastOneSite}),e.clearSelection()})).catch((function(){e.isLoadingAccess=!1,e.clearSelection()}))},gotoPreviousPage:function(){this.offset=Math.max(0,this.offset-this.limit),this.fetchAccess()},gotoNextPage:function(){var e=this.offset+this.limit;e>=(this.totalEntries||0)||(this.offset=e,this.fetchAccess())},showRemoveAccessConfirm:function(){Re(this.$refs.deleteAccessConfirmModal).modal({dismissible:!1}).modal("open")},changeUserRole:function(){var e=this,t=function(){var t=[];return Object.keys(e.selectedRows).forEach((function(n){e.selectedRows[n]&&e.siteAccess[n]&&t.push(e.siteAccess[n].idsite)})),t},n=function(){return g["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",filter_search:e.siteNameFilter,filter_access:e.accessLevelFilter,userLogin:e.userLogin,filter_limit:"-1"}).then((function(e){return e.map((function(e){return e.idsite}))}))};return this.isLoadingAccess=!0,Promise.resolve().then((function(){return e.siteAccessToChange?[e.siteAccessToChange.idsite]:e.areAllResultsSelected?n():t()})).then((function(t){return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.roleToChangeTo,idSites:t})})).catch((function(){})).then((function(){return e.$emit("accessChanged"),e.fetchAccess()}))},showChangeAccessConfirm:function(){var e=this;Re(this.$refs.changeAccessConfirmModal).modal({dismissible:!1,onCloseEnd:function(){e.accessChangeEvent=null}}).modal("open")},getRoleDisplay:function(e){var t=null;return this.filteredAccessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},giveAccessToAllSites:function(){var e=this;this.isGivingAccessToAllSites=!0,g["AjaxHelper"].fetch({method:"SitesManager.getSitesWithAdminAccess",filter_limit:-1}).then((function(t){var n=t.map((function(e){return e.idsite}));return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.allWebsitesAccssLevelSet,idSites:n})})).then((function(){return e.fetchAccess()})).finally((function(){e.isGivingAccessToAllSites=!1}))},showChangeAccessAllSitesModal:function(){Re(this.$refs.confirmGiveAccessAllSitesModal).modal({dismissible:!1}).modal("open")},onChangeSiteFilter:function(e){var t=this;setTimeout((function(){var n=e.target.value;t.siteNameFilter!==n&&(t.siteNameFilter=n,t.offset=0,t.fetchAccess())}))},onRoleChange:function(e,t){this.siteAccessToChange=e,this.roleToChangeTo=t.value,this.accessChangeEvent=t,this.showChangeAccessConfirm()}},computed:{rolesHelpText:function(){return Object(g["translate"])("UsersManager_RolesHelp",Object(g["externalLink"])("https://matomo.org/faq/general/faq_70/"),"</a>",Object(g["externalLink"])("https://matomo.org/faq/general/faq_69/"),"</a>")},theDisplayedWebsitesAreSelectedText:function(){var e=Object(g["translate"])("UsersManager_TheDisplayedWebsitesAreSelected","<strong>".concat(this.siteAccess.length,"</strong>"));return"".concat(e," ")},clickToSelectAllText:function(){return Object(g["translate"])("UsersManager_ClickToSelectAll","<strong>".concat(this.totalEntries,"</strong>"))},allWebsitesAreSelectedText:function(){return Object(g["translate"])("UsersManager_AllWebsitesAreSelected","<strong>".concat(this.totalEntries,"</strong>"))},clickToSelectDisplayedWebsitesText:function(){return Object(g["translate"])("UsersManager_ClickToSelectDisplayedWebsites","<strong>".concat(this.siteAccess.length,"</strong>"))},deletePermConfirmSingleText:function(){return Object(g["translate"])("UsersManager_DeletePermConfirmSingle","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteAccessToChangeName,"</strong>"))},deletePermConfirmMultipleText:function(){return Object(g["translate"])("UsersManager_DeletePermConfirmMultiple","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.affectedSitesCount,"</strong>"))},changePermToSiteConfirmSingleText:function(){return Object(g["translate"])("UsersManager_ChangePermToSiteConfirmSingle","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteAccessToChangeName,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"))},changePermToSiteConfirmMultipleText:function(){return Object(g["translate"])("UsersManager_ChangePermToSiteConfirmMultiple","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.affectedSitesCount,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"))},changePermToAllSitesConfirmText:function(){return Object(g["translate"])("UsersManager_ChangePermToAllSitesConfirm","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.allWebsitesAccssLevelSet),"</strong>"))},paginationLowerBound:function(){return this.offset+1},paginationUpperBound:function(){return this.totalEntries?Math.min(this.offset+this.limit,this.totalEntries):"?"},filteredAccessLevels:function(){return this.accessLevels.filter((function(e){return"superuser"!==e.key&&"role"===e.type}))},filteredSelectAccessLevels:function(){return this.filterAccessLevels.filter((function(e){return"superuser"!==e.key}))},selectedRowsCount:function(){var e=0;return Object.values(this.selectedRows).forEach((function(t){t&&(e+=1)})),e},affectedSitesCount:function(){return this.areAllResultsSelected?this.totalEntries:this.selectedRowsCount},allPropsWatch:function(){return this.userLogin,this.limit,this.accessLevels,this.filterAccessLevels,Date.now()},siteAccessToChangeName:function(){return this.siteAccessToChange?g["Matomo"].helper.htmlEntities(this.siteAccessToChange.site_name):""},paginationText:function(){var e=Object(g["translate"])("General_Pagination","".concat(this.paginationLowerBound),"".concat(this.paginationUpperBound),"".concat(this.totalEntries));return" ".concat(e," ")}}});Pe.render=De;var He=Pe,Fe={class:"row"},Ie={key:0,class:"col s12 m6 invite-notes"},qe={class:"form-help"},$e=["innerHTML"],ze={key:1,class:"col m2 entityList"},Ge={class:"listCircle"},We={key:0,class:"icon-warning"},Ye=Object(o["createElementVNode"])("div",{class:"save-button-spacer hide-on-small-only"},null,-1),Xe={href:"",class:"entityCancelLink"},Je=Object(o["createElementVNode"])("span",{class:"icon-arrow-left"},"  ",-1),Ke={class:"visibleTab col m10"},Qe={key:0,class:"basic-info-tab"},Ze={class:"email-input"},et={class:"form-group row",style:{position:"relative"}},tt={class:"col s12 m6 save-button"},nt={key:0,class:"resend-notes"},st=["innerHTML"],rt={key:0,class:"entityCancel"},ot=Object(o["createElementVNode"])("span",{class:"icon icon-arrow-left"},"  ",-1),it={key:1,class:"user-permissions"},at={key:0},lt={key:1,class:"alert alert-info"},ct={key:2,class:"superuser-access form-group"},dt={key:0},ut={key:1},mt={class:"browser-default"},bt=["innerHTML"],pt=["innerHTML"],gt=["innerHTML"],ft=["innerHTML"],ht=["innerHTML"],Ot=["innerHTML"],jt=["innerHTML"],vt=["innerHTML"],Ct={key:0},kt={key:1},yt={key:3,class:"twofa-reset form-group"},Nt={class:"resetTwoFa"},St=["innerHTML"],Ut=["innerHTML"];function Vt(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("PasswordConfirmation"),d=Object(o["resolveComponent"])("UserPermissionsEdit"),u=Object(o["resolveComponent"])("Notification"),m=Object(o["resolveComponent"])("ContentBlock"),b=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(m,{class:Object(o["normalizeClass"])(["userEditForm",{loading:e.isSavingUserInfo}]),"content-title":"".concat(e.formTitle," ").concat(e.isAdd?"":"".concat(e.theUser.login))},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Fe,[e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ie,[Object(o["createElementVNode"])("div",qe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_InviteSuccessNotification",[e.inviteTokenExpiryDays]))},null,8,$e)])])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ze,[Object(o["createElementVNode"])("ul",Ge,[Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"basic"===e.activeTab},"menuBasicInfo"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){return e.activeTab="basic"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_BasicInformation")),1)],2),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"permissions"===e.activeTab},"menuPermissions"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.activeTab="permissions"}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_Permissions")),1),e.userHasAccess||e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",We))],2),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:0,class:Object(o["normalizeClass"])([{active:"superuser"===e.activeTab},"menuSuperuser"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){return e.activeTab="superuser"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserAccess")),1)],2)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole&&e.theUser.uses_2fa&&!e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:1,class:Object(o["normalizeClass"])([{active:"2fa"===e.activeTab},"menuUserTwoFa"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[3]||(t[3]=Object(o["withModifiers"])((function(t){return e.activeTab="2fa"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_TwoFactorAuthentication")),1)],2)):Object(o["createCommentVNode"])("",!0)]),Ye,Object(o["createElementVNode"])("div",{class:"entityCancel",onClick:t[4]||(t[4]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[Object(o["createElementVNode"])("a",Xe,[Je,Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BackToUser")),1)])])])),Object(o["createElementVNode"])("div",Ke,["basic"===e.activeTab?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qe,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.theUser.login,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.theUser.login=t}),disabled:e.isSavingUserInfo||!e.isAdd||e.isShowingPasswordConfirm,autocomplete:"off",uicontrol:"text",name:"user_login",maxlength:100,title:e.translate("General_Username")},null,8,["modelValue","disabled","title"])]),Object(o["createElementVNode"])("div",null,[e.isPending?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,"model-value":e.theUser.password,disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.theUser.password=t,e.isPasswordModified=!0}),uicontrol:"password",name:"user_password",autocomplete:"new-password",title:e.translate("General_Password")},null,8,["model-value","disabled","title"]))]),Object(o["createElementVNode"])("div",Ze,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.theUser.email,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.theUser.email=t}),disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_email",autocomplete:"off",maxlength:100,title:e.translate("UsersManager_Email")},null,8,["modelValue","disabled","title"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.firstSiteAccess,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.firstSiteAccess=t}),disabled:e.isSavingUserInfo,uicontrol:"site",name:"user_site","ui-control-attributes":{onlySitesWithAdminAccess:!0},title:e.translate("UsersManager_FirstWebsitePermission"),"inline-help":e.translate("UsersManager_FirstSiteInlineHelp")},null,8,["modelValue","disabled","title","inline-help"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",et,[Object(o["createElementVNode"])("div",tt,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,value:e.saveButtonLabel,disabled:e.isAdd&&(!e.firstSiteAccess||!e.firstSiteAccess.id),saving:e.isSavingUserInfo,onConfirm:e.saveUserInfo},null,8,["value","disabled","saving","onConfirm"])):Object(o["createCommentVNode"])("",!0)])]),e.user&&e.isPending?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",nt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_InvitationSent"))+" ",1),Object(o["createElementVNode"])("span",{class:"resend-link",onClick:t[9]||(t[9]=function(){return e.resendRequestedUser&&e.resendRequestedUser.apply(e,arguments)}),innerHTML:e.$sanitize(e.translate("UsersManager_ResendInvite")+"/"+e.translate("UsersManager_CopyLink"))},null,8,st)])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForInviteUser,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.showPasswordConfirmationForInviteUser=t}),onConfirmed:e.inviteUser},null,8,["modelValue","onConfirmed"])]),e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",rt,[Object(o["createElementVNode"])("a",{href:"",class:"entityCancelLink",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[ot,Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BackToUser")),1)])])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",it,[e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",at,[Object(o["createVNode"])(d,{"user-login":e.theUser.login,onUserHasAccessDetected:t[12]||(t[12]=function(t){return e.userHasAccess=t.hasAccess}),onAccessChanged:t[13]||(t[13]=function(t){return e.isUserModified=!0}),"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels},null,8,["user-login","access-levels","filter-access-levels"])])),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",lt,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUsersPermissionsNotice")),1)):Object(o["createCommentVNode"])("",!0)],512)),[[o["vShow"],"permissions"===e.activeTab]]),"superuser"!==e.activeTab||"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ct,[e.isMarketplacePluginEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",dt,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro1")),1)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",ut,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro1WithoutMarketplace")),1)),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro2")),1)]),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro3")),1)]),Object(o["createElementVNode"])("ul",mt,[Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.translateSuperUserRiskString("Data"))},null,8,bt),Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.translateSuperUserRiskString("Security"))},null,8,pt),Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.translateSuperUserRiskString("Misconfiguration"))},null,8,gt),Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.translateSuperUserRiskString("UserManagement"))},null,8,ft),Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.translateSuperUserRiskString("ServiceDisruption"))},null,8,ht),e.isPluginsAdminEnabled&&e.isMarketplacePluginEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.translateSuperUserRiskString("Marketplace"))},null,8,Ot)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.accountabilityRisk)},null,8,jt),Object(o["createElementVNode"])("li",{innerHTML:e.$sanitize(e.translateSuperUserRiskString("Compliance"))},null,8,vt)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.superUserAccessChecked,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.superUserAccessChecked=t}),onClick:t[15]||(t[15]=function(t){return e.confirmSuperUserChange()}),disabled:e.isSavingUserInfo,uicontrol:"checkbox",name:"superuser_access",title:e.translate("UsersManager_HasSuperUserAccess")},null,8,["modelValue","disabled","title"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForSuperUser,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.showPasswordConfirmationForSuperUser=t}),onConfirmed:e.toggleSuperuserAccess,onAborted:t[17]||(t[17]=function(t){return e.setSuperUserAccessChecked()})},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",Ct,Object(o["toDisplayString"])(e.translate("UsersManager_RemoveSuperuserAccessConfirm")),1)):Object(o["createCommentVNode"])("",!0),e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",kt,Object(o["toDisplayString"])(e.translate("UsersManager_AddSuperuserAccessConfirm")),1))]})),_:1},8,["modelValue","onConfirmed"])])),"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",yt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ResetTwoFactorAuthenticationInfo")),1),Object(o["createElementVNode"])("div",Nt,[Object(o["createVNode"])(l,{saving:e.isResetting2FA,onConfirm:t[18]||(t[18]=function(t){return e.confirmReset2FA()}),value:e.translate("UsersManager_ResetTwoFactorAuthentication")},null,8,["saving","value"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationFor2FA,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.showPasswordConfirmationFor2FA=t}),onConfirmed:e.reset2FA},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[o["vShow"],"2fa"===e.activeTab]])])],512),[[b]]),Object(o["createVNode"])(c,{modelValue:e.isShowingPasswordConfirm,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.isShowingPasswordConfirm=t}),onConfirmed:e.updateUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.changePasswordTitle)},null,8,St),e.user&&e.isPending?(Object(o["openBlock"])(),Object(o["createBlock"])(u,{key:0,context:"info",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("strong",{innerHTML:e.$sanitize(e.translate("UsersManager_InviteEmailChange"))},null,8,Ut)]})),_:1})):Object(o["createCommentVNode"])("",!0)]})),_:1},8,["modelValue","onConfirmed"])]})),_:1},8,["class","content-title"])}var Et={login:"",superuser_access:!1,uses_2fa:!1,password:"",email:"",invite_status:""},wt=Object(o["defineComponent"])({props:{user:Object,currentUserRole:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},inviteTokenExpiryDays:{type:String,required:!0},activatedPlugins:{type:Array,required:!0}},components:{Notification:g["Notification"],ContentBlock:g["ContentBlock"],Field:f["Field"],SaveButton:f["SaveButton"],UserPermissionsEdit:He,PasswordConfirmation:f["PasswordConfirmation"]},directives:{Form:f["Form"]},data:function(){return{theUser:this.user||Object.assign({},Et),activeTab:"basic",permissionsForIdSite:1,isSavingUserInfo:!1,userHasAccess:!0,firstSiteAccess:{id:this.initialSiteId,name:this.initialSiteName},isUserModified:!1,isPasswordModified:!1,superUserAccessChecked:null,showPasswordConfirmationForSuperUser:!1,showPasswordConfirmationFor2FA:!1,showPasswordConfirmationForInviteUser:!1,isResetting2FA:!1,isShowingPasswordConfirm:!1}},emits:["done","updated","resendInvite"],watch:{user:function(e){this.onUserChange(e)}},created:function(){this.onUserChange(this.user)},methods:{onUserChange:function(e){this.theUser=e||Object.assign({},Et),this.theUser.password||this.resetPasswordVar(),this.setSuperUserAccessChecked()},confirmSuperUserChange:function(){this.showPasswordConfirmationForSuperUser=!0},confirmReset2FA:function(){this.showPasswordConfirmationFor2FA=!0},toggleSuperuserAccess:function(e){var t=this;this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.setSuperUserAccess"},{userLogin:this.theUser.login,hasSuperUserAccess:this.theUser.superuser_access?"0":"1",passwordConfirmation:e}).then((function(){t.theUser.superuser_access=!t.theUser.superuser_access})).catch((function(){})).then((function(){t.isSavingUserInfo=!1,t.setSuperUserAccessChecked()}))},saveUserInfo:function(){this.isAdd?this.showPasswordConfirmationForInviteUser=!0:this.isShowingPasswordConfirm=!0},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.user})},inviteUser:function(e){var t=this;return this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.inviteUser"},{userLogin:this.theUser.login,email:this.theUser.email,initialIdSite:this.firstSiteAccess?this.firstSiteAccess.id:void 0,passwordConfirmation:e}).catch((function(e){throw t.isSavingUserInfo=!1,e})).then((function(){t.firstSiteAccess=null,t.isSavingUserInfo=!1,t.isUserModified=!0,t.theUser.invite_status="pending",t.resetPasswordVar(),t.showUserCreatedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})}))},resetPasswordVar:function(){this.isAdd||(this.theUser.password="XXXXXXXX")},showUserSavedNotification:function(){g["NotificationsStore"].show({message:Object(g["translate"])("General_YourChangesHaveBeenSaved"),context:"success",type:"toast"})},showUserCreatedNotification:function(){g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_InviteSuccess"),context:"success",type:"toast"})},reset2FA:function(e){var t=this;return this.isResetting2FA=!0,g["AjaxHelper"].post({method:"TwoFactorAuth.resetTwoFactorAuth"},{userLogin:this.theUser.login,passwordConfirmation:e}).catch((function(e){throw t.isResetting2FA=!1,e})).then((function(){t.isResetting2FA=!1,t.theUser.uses_2fa=!1,t.activeTab="basic",t.showUserSavedNotification()}))},updateUser:function(e){var t=this;return this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.updateUser"},{userLogin:this.theUser.login,password:this.isPasswordModified&&this.theUser.password?this.theUser.password:void 0,passwordConfirmation:e,email:this.theUser.email}).then((function(){t.isSavingUserInfo=!1,t.isUserModified=!0,t.isPasswordModified=!1,t.resetPasswordVar(),t.showUserSavedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})})).catch((function(){t.isSavingUserInfo=!1}))},setSuperUserAccessChecked:function(){this.superUserAccessChecked=!!this.theUser.superuser_access},onDoneEditing:function(){this.$emit("done",{isUserModified:this.isUserModified})},translateSuperUserRiskString:function(e){return Object(g["translate"])("UsersManager_SuperUserRisk".concat(e),"<strong>","</strong>")}},computed:{formTitle:function(){return this.isAdd?Object(g["translate"])("UsersManager_InviteNewUser"):""},saveButtonLabel:function(){return this.isAdd?Object(g["translate"])("UsersManager_InviteUser"):Object(g["translate"])("UsersManager_SaveBasicInfo")},isPending:function(){return!this.user||!("pending"!==this.user.invite_status&&!Number.isInteger(this.user.invite_status))},isAdd:function(){return!this.user},changePasswordTitle:function(){return Object(g["translate"])("UsersManager_AreYouSureChangeDetails","<strong>".concat(this.theUser.login,"</strong>"))},isPluginsAdminEnabled:function(){return g["Matomo"].config.enable_plugins_admin},isActivityLogPluginEnabled:function(){return this.activatedPlugins.includes("ActivityLog")},isMarketplacePluginEnabled:function(){return this.activatedPlugins.includes("Marketplace")},isProfessionalServicesPluginEnabled:function(){return this.activatedPlugins.includes("ProfessionalServices")},accountabilityRisk:function(){var e=this.translateSuperUserRiskString("Accountability"),t="";return this.isPluginsAdminEnabled&&this.isProfessionalServicesPluginEnabled&&(this.isActivityLogPluginEnabled?t=Object(g["translate"])("UsersManager_SuperUserRiskAccountabilityCheckActivityLog",'<a href="?module=ActivityLog&action=index" rel="noreferrer noopener" target="_blank">',"</a>"):this.isMarketplacePluginEnabled&&(t=Object(g["translate"])("UsersManager_SuperUserRiskAccountabilityGetActivityLogPlugin",Object(g["externalLink"])("https://plugins.matomo.org/ActivityLog"),"</a>"))),t?"".concat(e," ").concat(t):e}}});wt.render=Vt;var At=wt,Tt={class:"userListFilters row"},Mt={class:"col s12 m12 l8"},Bt={class:"input-field col s12 m3 l3"},_t={id:"user-list-bulk-actions",class:"dropdown-content"},Lt={class:"dropdown-trigger","data-target":"bulk-set-access"},Dt={id:"bulk-set-access",class:"dropdown-content"},xt=["onClick"],Rt={key:0},Pt={class:"input-field col s12 m3 l3"},Ht={class:"permissions-for-selector"},Ft={class:"input-field col s12 m3 l3"},It={class:"input-field col s12 m3 l3"},qt={key:0,class:"input-field col s12 m12 l4 users-list-pagination-container"},$t={class:"usersListPagination"},zt={class:"pointer"},Gt={class:"counter"},Wt={class:"pointer"},Yt={key:0,class:"roles-help-notification"},Xt=["innerHTML"],Jt={class:"select-cell"},Kt={class:"checkbox-container"},Qt=Object(o["createElementVNode"])("span",null,null,-1),Zt={class:"first"},en={class:"role_header"},tn={style:{"margin-right":"3.5px"}},nn=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),sn=[nn],rn={key:0},on=["title"],an={key:2},ln={class:"actions-cell-header"},cn={key:0,class:"select-all-row"},dn={colspan:"8"},un={key:0},mn=["innerHTML"],bn=["innerHTML"],pn={key:1},gn=["innerHTML"],fn=["innerHTML"],hn=["id"],On={class:"select-cell"},jn={class:"checkbox-container"},vn=["id","onUpdate:modelValue"],Cn=Object(o["createElementVNode"])("span",null,null,-1),kn={id:"userLogin"},yn={class:"access-cell"},Nn={key:0,id:"email"},Sn={key:1,id:"twofa"},Un={key:0,class:"icon-ok"},Vn={key:1,class:"icon-close"},En={key:2,id:"last_seen"},wn={id:"status"},An=["title"],Tn={class:"center actions-cell"},Mn=["onClick"],Bn=Object(o["createElementVNode"])("span",{class:"icon-email"},null,-1),_n=[Bn],Ln=["onClick"],Dn=Object(o["createElementVNode"])("span",{class:"icon-edit"},null,-1),xn=[Dn],Rn=["onClick"],Pn=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),Hn=[Pn],Fn=["innerHTML"],In=["innerHTML"],qn=["innerHTML"],$n=["innerHTML"],zn=["innerHTML"],Gn={class:"change-user-role-confirm-modal modal",ref:"changeUserRoleConfirmModal"},Wn={class:"modal-content"},Yn=["innerHTML"],Xn=["innerHTML"],Jn={class:"modal-footer"};function Kn(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ActivityIndicator"),c=Object(o["resolveComponent"])("Notification"),d=Object(o["resolveComponent"])("ContentBlock"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("dropdown-menu"),b=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["pagedUsersList",{loading:e.isLoadingUsers}])},[Object(o["createElementVNode"])("div",Tt,[Object(o["createElementVNode"])("div",Mt,[Object(o["createElementVNode"])("div",Bt,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn bulk-actions",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-list-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[m]]),Object(o["createElementVNode"])("ul",_t,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",Lt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[m]]),Object(o["createElementVNode"])("ul",Dt,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.bulkActionAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.userToChange=null,e.roleToChangeTo=t.key,e.showAccessChangeConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,xt)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo="noaccess",e.showAccessChangeConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",Rt,[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showDeleteConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_DeleteUsers")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createElementVNode"])("div",Pt,[Object(o["createElementVNode"])("div",Ht,[Object(o["createVNode"])(a,{"model-value":e.userTextFilter,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onUserTextFilterChange(t)}),name:"user-text-filter",uicontrol:"text","full-width":!0,placeholder:e.translate("UsersManager_UserSearch")},null,8,["model-value","placeholder"])])]),Object(o["createElementVNode"])("div",Ft,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.accessLevelFilter,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.accessLevelFilter=t,e.changeSearch({filter_access:e.accessLevelFilter,offset:0})}),name:"access-level-filter",uicontrol:"select",options:e.filterAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["model-value","options","placeholder"])])]),Object(o["createElementVNode"])("div",It,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.statusLevelFilter,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.statusLevelFilter=t,e.changeSearch({filter_status:e.statusLevelFilter,offset:0})}),name:"status-level-filter",uicontrol:"select",options:e.filterStatusLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByStatus")},null,8,["model-value","options","placeholder"])])])]),e.totalEntries>e.searchParams.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",qt,[Object(o["createElementVNode"])("div",$t,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn prev",{disabled:e.searchParams.offset<=0}]),onClick:t[5]||(t[5]=Object(o["withModifiers"])((function(t){return e.gotoPreviousPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",zt,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("div",Gt,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])({visibility:e.isLoadingUsers?"hidden":"visible"})},Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.totalEntries)),3),Object(o["createVNode"])(l,{loading:e.isLoadingUsers},null,8,["loading"])]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn next",{disabled:e.searchParams.offset+e.searchParams.limit>=e.totalEntries}]),onClick:t[6]||(t[6]=Object(o["withModifiers"])((function(t){return e.gotoNextPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",Wt,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Yt,[Object(o["createVNode"])(c,{context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,Xt)]})),_:1})])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("table",{id:"manageUsersTable",class:Object(o["normalizeClass"])({loading:e.isLoadingUsers})},[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",Jt,[Object(o["createElementVNode"])("span",Kt,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_all",checked:"checked","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.isAllCheckboxSelected=t}),onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange()})},null,544),[[o["vModelCheckbox"],e.isAllCheckboxSelected]]),Qt])])]),Object(o["createElementVNode"])("th",Zt,Object(o["toDisplayString"])(e.translate("UsersManager_Username")),1),Object(o["createElementVNode"])("th",en,[Object(o["createElementVNode"])("span",tn,Object(o["toDisplayString"])(e.translate("UsersManager_RoleFor")),1),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},sn,2),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{class:"permissions-for-selector","model-value":e.permissionsForSite,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.onPermissionsForUpdate(t)}),uicontrol:"site","ui-control-attributes":{onlySitesWithAdminAccess:"superuser"!==e.currentUserRole}},null,8,["model-value","ui-control-attributes"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",rn,Object(o["toDisplayString"])(e.translate("UsersManager_Email")),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:1,title:e.translate("UsersManager_UsesTwoFactorAuthentication")},Object(o["toDisplayString"])(e.translate("UsersManager_2FA")),9,on)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",an,Object(o["toDisplayString"])(e.translate("UsersManager_LastSeen")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_Status")),1),Object(o["createElementVNode"])("th",ln,[Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.users.length&&e.users.length<e.totalEntries?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",cn,[Object(o["createElementVNode"])("td",dn,[e.areAllResultsSelected?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",un,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_TheDisplayedUsersAreSelected","<strong>".concat(e.users.length,"</strong>"))),style:{"margin-right":"3.5px"}},null,8,mn),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectAll","<strong>".concat(e.totalEntries,"</strong>")))},null,8,bn)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",pn,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AllUsersAreSelected","<strong>".concat(e.totalEntries,"</strong>"))),style:{"margin-right":"3.5px"}},null,8,gn),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectDisplayedUsers","<strong>".concat(e.users.length,"</strong>")))},null,8,fn)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.users,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{id:"row".concat(s),key:n.login},[Object(o["createElementVNode"])("td",On,[Object(o["createElementVNode"])("span",jn,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,vn),[[o["vModelCheckbox"],e.selectedRows[s]]]),Cn])])]),Object(o["createElementVNode"])("td",kn,Object(o["toDisplayString"])(n.login),1),Object(o["createElementVNode"])("td",yn,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":n.role,"onUpdate:modelValue":function(t){e.userToChange=n,e.roleToChangeTo=t.value,e.showAccessChangeConfirm(),t.abort()},"model-modifiers":{abortable:!0},disabled:"superuser"===n.role,uicontrol:"select",options:"anonymous"===n.login?e.anonymousAccessLevels:"noaccess"===n.role?e.onlyRoleAccessLevels:e.accessLevels},null,8,["model-value","onUpdate:modelValue","disabled","options"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",Nn,Object(o["toDisplayString"])(n.email),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",Sn,[n.uses_2fa?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",Un)):Object(o["createCommentVNode"])("",!0),n.uses_2fa?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",Vn))])):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",En,Object(o["toDisplayString"])(n.last_seen?"".concat(n.last_seen," ago"):"-"),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",wn,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(Number.isInteger(n.invite_status)?"pending":n.invite_status),title:"expired"===n.invite_status?e.translate("UsersManager_ExpiredInviteAutomaticallyRemoved","3"):""},Object(o["toDisplayString"])(e.getInviteStatus(n.invite_status)),11,An)]),Object(o["createElementVNode"])("td",Tn,[("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"active"!==n.invite_status?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,class:"resend table-action",title:"Resend/Copy Invite Link",onClick:function(t){e.userToChange=n,e.resendRequestedUser()}},_n,8,Mn)):Object(o["createCommentVNode"])("",!0),"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:1,class:"edituser table-action",title:"Edit",onClick:function(t){return e.$emit("editUser",{user:n})}},xn,8,Ln)):Object(o["createCommentVNode"])("",!0),("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin&&"active"!==n.invite_status)&&"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:2,class:"deleteuser table-action",title:"Delete",onClick:function(t){e.userToChange=n,e.showDeleteConfirm()}},Hn,8,Rn)):Object(o["createCommentVNode"])("",!0)])],8,hn)})),128))])],2),[[b]])]})),_:1}),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForUserRemoval,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showPasswordConfirmationForUserRemoval=t}),onConfirmed:e.deleteRequestedUsers,onAborted:e.resetUserAndRoleToChange},{default:Object(o["withCtx"])((function(){return[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmSingle","<strong>".concat(e.userToChange.login,"</strong>")))},null,8,Fn)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmMultiple","<strong>".concat(e.affectedUsersCount,"</strong>")))},null,8,In))]})),_:1},8,["modelValue","onConfirmed","onAborted"]),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForAnonymousAccess,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.showPasswordConfirmationForAnonymousAccess=t}),onConfirmed:e.changeUserRole,onAborted:e.resetUserAndRoleToChange},{default:Object(o["withCtx"])((function(){return[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deleteUserPermConfirmSingleText)},null,8,qn)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:1,innerHTML:e.$sanitize(e.deleteUserPermConfirmMultipleText)},null,8,$n)),Object(o["createElementVNode"])("h3",null,[Object(o["createElementVNode"])("em",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Note"))+": ",1),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AnonymousUserRoleChangeWarning","anonymous",e.getRoleDisplay(e.roleToChangeTo)))},null,8,zn)])])]})),_:1},8,["modelValue","onConfirmed","onAborted"]),Object(o["createElementVNode"])("div",Gn,[Object(o["createElementVNode"])("div",Wn,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deleteUserPermConfirmSingleText)},null,8,Yn)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.deleteUserPermConfirmMultipleText)},null,8,Xn))]),Object(o["createElementVNode"])("div",Jn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){return e.resetUserAndRoleToChange()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var Qn=window,Zn=Qn.$,es=Object(o["defineComponent"])({props:{initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},currentUserRole:String,isLoadingUsers:Boolean,accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},totalEntries:Number,users:{type:Array,required:!0},searchParams:{type:Object,required:!0}},components:{Field:f["Field"],ActivityIndicator:g["ActivityIndicator"],Notification:g["Notification"],ContentBlock:g["ContentBlock"],PasswordConfirmation:f["PasswordConfirmation"]},directives:{DropdownMenu:g["DropdownMenu"],ContentTable:g["ContentTable"]},data:function(){return{areAllResultsSelected:!1,selectedRows:{},isAllCheckboxSelected:!1,isBulkActionsDisabled:!0,userToChange:null,roleToChangeTo:null,accessLevelFilter:null,statusLevelFilter:null,isRoleHelpToggled:!1,userTextFilter:"",permissionsForSite:{id:this.initialSiteId,name:this.initialSiteName},showPasswordConfirmationForUserRemoval:!1,showPasswordConfirmationForAnonymousAccess:!1}},emits:["editUser","changeUserRole","deleteUser","searchChange","resendInvite"],created:function(){this.onUserTextFilterChange=Object(g["debounce"])(this.onUserTextFilterChange,300)},watch:{users:function(){this.clearSelection()}},methods:{getInviteStatus:function(e){return Number.isInteger(e)?Object(g["translate"])("UsersManager_InviteDayLeft",e):"expired"===e?Object(g["translate"])("UsersManager_Expired"):Object(g["translate"])("UsersManager_Active")},onPermissionsForUpdate:function(e){this.permissionsForSite=e,this.changeSearch({idSite:this.permissionsForSite.id})},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.userToChange=null},resetUserAndRoleToChange:function(){this.userToChange=null,this.roleToChangeTo=null},onAllCheckboxChange:function(){if(this.isAllCheckboxSelected){for(var e=0;e!==this.users.length;e+=1)this.selectedRows[e]=!0;this.isBulkActionsDisabled=!1}else this.clearSelection()},changeUserRole:function(e){this.$emit("changeUserRole",{users:this.userOperationSubject,role:this.roleToChangeTo,password:e})},onRowSelected:function(){var e=this.selectedCount;this.isBulkActionsDisabled=0===e,this.isAllCheckboxSelected=e===this.users.length},deleteRequestedUsers:function(e){this.$emit("deleteUser",{users:this.userOperationSubject,password:e})},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.userToChange})},showDeleteConfirm:function(){this.showPasswordConfirmationForUserRemoval=!0},showAccessChangeConfirm:function(){var e="all"===this.userOperationSubject||Array.isArray(this.userOperationSubject)&&this.userOperationSubject.filter((function(e){return"anonymous"===e.login})).length;e&&"view"===this.roleToChangeTo?this.showPasswordConfirmationForAnonymousAccess=!0:Zn(this.$refs.changeUserRoleConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.accessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},changeSearch:function(e){var t=Object.assign(Object.assign({},this.searchParams),e);this.$emit("searchChange",{params:t})},gotoPreviousPage:function(){this.changeSearch({offset:Math.max(0,this.searchParams.offset-this.searchParams.limit)})},gotoNextPage:function(){var e=this.searchParams.offset+this.searchParams.limit;e>=this.totalEntries||this.changeSearch({offset:e})},onUserTextFilterChange:function(e){this.userTextFilter=e,this.changeSearch({filter_search:e,offset:0})}},computed:{currentUserLogin:function(){return g["Matomo"].userLogin},paginationLowerBound:function(){return this.searchParams.offset+1},paginationUpperBound:function(){if(null===this.totalEntries)return"?";var e=this.searchParams;return Math.min(e.offset+e.limit,this.totalEntries)},userOperationSubject:function(){return this.userToChange?[this.userToChange]:this.areAllResultsSelected?"all":this.selectedUsers},selectedUsers:function(){var e=this,t=this.users,n=[];return Object.keys(this.selectedRows).forEach((function(s){var r=parseInt(s,10);e.selectedRows[s]&&t[r]&&n.push(t[r])})),n},rolesHelpText:function(){return Object(g["translate"])("UsersManager_RolesHelp",Object(g["externalLink"])("https://matomo.org/faq/general/faq_70/"),"</a>",Object(g["externalLink"])("https://matomo.org/faq/general/faq_69/"),"</a>")},affectedUsersCount:function(){return this.areAllResultsSelected?this.totalEntries||0:this.selectedCount},selectedCount:function(){var e=this,t=0;return Object.keys(this.selectedRows).forEach((function(n){e.selectedRows[n]&&(t+=1)})),t},deleteUserPermConfirmSingleText:function(){var e,t;return Object(g["translate"])("UsersManager_DeleteUserPermConfirmSingle","<strong>".concat((null===(e=this.userToChange)||void 0===e?void 0:e.login)||"","</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"),"<strong>".concat(g["Matomo"].helper.htmlEntities((null===(t=this.permissionsForSite)||void 0===t?void 0:t.name)||""),"</strong>"))},deleteUserPermConfirmMultipleText:function(){var e;return Object(g["translate"])("UsersManager_DeleteUserPermConfirmMultiple","<strong>".concat(this.affectedUsersCount,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"),"<strong>".concat(g["Matomo"].helper.htmlEntities((null===(e=this.permissionsForSite)||void 0===e?void 0:e.name)||""),"</strong>"))},bulkActionAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"!==e.key&&"superuser"!==e.key}))},anonymousAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"===e.key||"view"===e.key}))},onlyRoleAccessLevels:function(){return this.accessLevels.filter((function(e){return"role"===e.type}))}}});es.render=Kn;var ts=es,ns={class:"usersManager"},ss={key:0},rs={key:1},os={class:"row add-user-container"},is={class:"col s12"},as={class:"input-field",style:{"margin-right":"3.5px"}},ls={key:0,class:"input-field"},cs={key:0},ds={class:"resend-invite-confirm-modal modal",ref:"resendInviteConfirmModal"},us=Object(o["createElementVNode"])("div",{class:"btn-close modal-close"},[Object(o["createElementVNode"])("i",{class:"icon-close"})],-1),ms={class:"modal-content"},bs={class:"modal-title"},ps=["innerHTML"],gs={class:"modal-footer"},fs={key:0,class:"success-copied"},hs=Object(o["createElementVNode"])("i",{class:"icon-success"},null,-1),Os={class:"add-existing-user-modal modal",ref:"addExistingUserModal"},js={class:"modal-content"},vs={class:"modal-footer"};function Cs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("EnrichedHeadline"),l=Object(o["resolveComponent"])("PagedUsersList"),c=Object(o["resolveComponent"])("UserEditForm"),d=Object(o["resolveComponent"])("Field"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("content-intro"),b=Object(o["resolveDirective"])("tooltips");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ns,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(a,{"help-url":e.externalRawLink("https://matomo.org/docs/manage-users/"),"feature-name":"Users Management"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsers")),1)]})),_:1},8,["help-url"])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",ss,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersDesc")),1)):Object(o["createCommentVNode"])("",!0),"admin"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",rs,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersAdminDesc")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",os,[Object(o["createElementVNode"])("div",is,[Object(o["createElementVNode"])("div",as,[Object(o["createElementVNode"])("a",{class:"btn add-new-user",onClick:t[0]||(t[0]=function(t){return e.onAddNewUser()})},Object(o["toDisplayString"])(e.translate("UsersManager_InviteNewUser")),1)]),"superuser"!==e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ls,[Object(o["createElementVNode"])("a",{class:"btn add-existing-user",onClick:t[1]||(t[1]=function(t){return e.showAddExistingUserModal()})},Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(l,{onEditUser:t[2]||(t[2]=function(t){return e.onEditUser(t.user)}),onChangeUserRole:t[3]||(t[3]=function(t){return e.onChangeUserRole(t.users,t.role,t.password)}),onDeleteUser:t[4]||(t[4]=function(t){return e.onDeleteUser(t.users,t.password)}),onSearchChange:t[5]||(t[5]=function(t){e.searchParams=t.params,e.fetchUsers()}),onResendInvite:t[6]||(t[6]=function(t){return e.showResendPopup(t.user)}),"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,"is-loading-users":e.isLoadingUsers,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"filter-status-levels":e.filterStatusLevels,"search-params":e.searchParams,users:e.users,"total-entries":e.totalEntries},null,8,["initial-site-id","initial-site-name","is-loading-users","current-user-role","access-levels","filter-access-levels","filter-status-levels","search-params","users","total-entries"])],512),[[m]])],512),[[o["vShow"],!e.isEditing]]),e.isEditing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",cs,[Object(o["createVNode"])(c,{onDone:t[7]||(t[7]=function(t){return e.onDoneEditing(t.isUserModified)}),user:e.userBeingEdited,"current-user-role":e.currentUserRole,"invite-token-expiry-days":e.inviteTokenExpiryDays,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,"activated-plugins":e.activatedPlugins,onResendInvite:t[8]||(t[8]=function(t){return e.showResendPopup(t.user)}),onUpdated:t[9]||(t[9]=function(t){return e.userBeingEdited=t.user})},null,8,["user","current-user-role","invite-token-expiry-days","access-levels","filter-access-levels","initial-site-id","initial-site-name","activated-plugins"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ds,[us,Object(o["createElementVNode"])("div",ms,[Object(o["createElementVNode"])("h2",bs,Object(o["toDisplayString"])(e.translate("UsersManager_ResendInvite")),1),e.userBeingEdited?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_InviteConfirmMessage",["<strong>".concat(e.userBeingEdited.login,"</strong>"),"<strong>".concat(e.userBeingEdited.email,"</strong>")]))},null,8,ps)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_InviteActionNotes",e.inviteTokenExpiryDays)),1)])]),Object(o["createElementVNode"])("div",gs,[e.copied?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",fs,[hs,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_LinkCopied")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("button",{onClick:t[10]||(t[10]=function(t){return e.showInviteActionPasswordConfirm("copy")}),class:"btn btn-copy-link modal-action",style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_CopyLink")),1),Object(o["createElementVNode"])("button",{class:"btn btn-resend modal-action modal-no",onClick:t[11]||(t[11]=function(t){return e.showInviteActionPasswordConfirm("send")})},Object(o["toDisplayString"])(e.translate("UsersManager_ResendInvite")),1)])],512),Object(o["createElementVNode"])("div",Os,[Object(o["createElementVNode"])("div",js,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_EnterUsernameOrEmail"))+":",1),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(d,{modelValue:e.addNewUserLoginEmail,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.addNewUserLoginEmail=t}),name:"add-existing-user-email",uicontrol:"text"},null,8,["modelValue"])])]),Object(o["createElementVNode"])("div",vs,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[13]||(t[13]=Object(o["withModifiers"])((function(t){return e.addExistingUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Add")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[14]||(t[14]=Object(o["withModifiers"])((function(t){return e.addNewUserLoginEmail=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],512),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForInviteAction,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.showPasswordConfirmationForInviteAction=t}),onConfirmed:e.onInviteAction},null,8,["modelValue","onConfirmed"])],512)),[[b]])}var ks=20,ys=window,Ns=ys.$,Ss=Object(o["defineComponent"])({props:{currentUserRole:{type:String,required:!0},initialSiteName:{type:String,required:!0},initialSiteId:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},activatedPlugins:{type:Array,required:!0},inviteTokenExpiryDays:{type:String,required:!0}},components:{PasswordConfirmation:f["PasswordConfirmation"],EnrichedHeadline:g["EnrichedHeadline"],PagedUsersList:ts,UserEditForm:At,Field:f["Field"]},directives:{ContentIntro:g["ContentIntro"],Tooltips:g["Tooltips"]},data:function(){return{isEditing:!!g["MatomoUrl"].urlParsed.value.showadduser,isCurrentUserSuperUser:!0,users:[],totalEntries:null,searchParams:{offset:0,limit:ks,filter_search:"",filter_access:"",filter_status:"",idSite:this.initialSiteId},isLoadingUsers:!1,userBeingEdited:null,addNewUserLoginEmail:"",copied:!1,loading:!1,showPasswordConfirmationForInviteAction:!1,inviteAction:""}},created:function(){this.fetchUsers()},watch:{limit:function(){this.fetchUsers()}},methods:{showInviteActionPasswordConfirm:function(e){this.loading||(this.showPasswordConfirmationForInviteAction=!0,this.inviteAction=e)},showResendPopup:function(e){this.userBeingEdited=e,Ns(this.$refs.resendInviteConfirmModal).modal({dismissible:!1}).modal("open"),this.copied=!1},onInviteAction:function(e){"send"===this.inviteAction?this.onResendInvite(e):this.generateInviteLink(e)},onEditUser:function(e){g["Matomo"].helper.lazyScrollToContent(),this.isEditing=!0,this.userBeingEdited=e},onDoneEditing:function(e){this.isEditing=!1,e&&this.fetchUsers()},showAddExistingUserModal:function(){Ns(this.$refs.addExistingUserModal).modal({dismissible:!1}).modal("open")},onChangeUserRole:function(e,t,n){var s=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?s.getAllUsersInSearch():e})).then((function(e){return e.filter((function(e){return"superuser"!==e.role})).map((function(e){return e.login}))})).then((function(e){var r,o=s.accessLevels.filter((function(e){return e.key===t})).map((function(e){return e.type}));return r=o.length&&"capability"===o[0]?e.map((function(e){return{method:"UsersManager.addCapabilities",userLogin:e,capabilities:t,idSites:s.searchParams.idSite,passwordConfirmation:n}})):e.map((function(e){return{method:"UsersManager.setUserAccess",userLogin:e,access:t,idSites:s.searchParams.idSite,passwordConfirmation:n}})),g["AjaxHelper"].fetch(r,{createErrorNotification:!0})})).catch((function(){})).finally((function(){return s.fetchUsers()}))},getAllUsersInSearch:function(){return g["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",filter_search:this.searchParams.filter_search,filter_access:this.searchParams.filter_access,filter_status:this.searchParams.filter_status,idSite:this.searchParams.idSite,filter_limit:"-1"})},onDeleteUser:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.map((function(e){return e.login}))})).then((function(e){var n=e.map((function(e){return{method:"UsersManager.deleteUser",userLogin:e,passwordConfirmation:t}}));return g["AjaxHelper"].fetch(n,{createErrorNotification:!0})})).then((function(){g["NotificationsStore"].scrollToNotification(g["NotificationsStore"].show({id:"removeUserSuccess",message:Object(g["translate"])("UsersManager_DeleteSuccess"),context:"success",type:"toast"})),n.fetchUsers()}),(function(){"all"!==e&&e.length>1&&g["NotificationsStore"].show({id:"removeUserSuccess",message:Object(g["translate"])("UsersManager_DeleteNotSuccessful"),context:"warning",type:"toast"}),n.fetchUsers()}))},generateInviteLink:async function(e){if(!this.loading){this.loading=!0;try{var t=await g["AjaxHelper"].post({method:"UsersManager.generateInviteLink"},{userLogin:this.userBeingEdited.login,passwordConfirmation:e});await this.copyToClipboard(t.value)}catch(n){}this.loading=!1}},copyToClipboard:async function(e){try{var t=document.createElement("input");t.style.top="-100px",t.style.left="0",t.style.position="fixed",t.value=e,document.body.appendChild(t),t.select(),"https:"!==window.location.protocol?document.execCommand("copy"):await navigator.clipboard.writeText(t.value),document.body.removeChild(t),this.copied=!0}catch(s){var n=g["NotificationsStore"].show({message:"<strong>".concat(Object(g["translate"])("UsersManager_CopyDenied"),"</strong><br>\n").concat(Object(g["translate"])("UsersManager_CopyDeniedHints",['<br><span class="invite-link">'.concat(e,"</span>")])),id:"copyError",context:"error",type:"transient"});g["NotificationsStore"].scrollToNotification(n)}},onResendInvite:function(e){var t=this;""!==e&&g["AjaxHelper"].post({method:"UsersManager.resendInvite",userLogin:this.userBeingEdited.login},{passwordConfirmation:e}).then((function(){t.fetchUsers(),Ns(t.$refs.resendInviteConfirmModal).modal("close");var e=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_InviteSuccess"),id:"resendInvite",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e)}))},fetchUsers:function(){var e=this;return this.isLoadingUsers=!0,g["AjaxHelper"].fetch(Object.assign(Object.assign({},this.searchParams),{},{method:"UsersManager.getUsersPlusRole"}),{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results")||"0",10),e.users=n.responseJSON,e.isLoadingUsers=!1})).catch((function(){e.isLoadingUsers=!1}))},addExistingUser:function(){var e=this;return this.isLoadingUsers=!0,g["AjaxHelper"].fetch({method:"UsersManager.userExists",userLogin:this.addNewUserLoginEmail}).then((function(t){return t&&t.value?e.addNewUserLoginEmail:g["AjaxHelper"].fetch({method:"UsersManager.getUserLoginFromUserEmail",userEmail:e.addNewUserLoginEmail}).then((function(e){return e.value}))})).then((function(t){return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:t,access:"view",idSites:e.searchParams.idSite})})).then((function(){return e.fetchUsers()})).catch((function(){e.isLoadingUsers=!1}))},onAddNewUser:function(){var e={isAllowed:!0};g["Matomo"].postEvent("UsersManager.initAddUser",e),e&&!e.isAllowed||(this.isEditing=!0,this.userBeingEdited=null)}}});Ss.render=Cs;var Us=Ss,Vs={key:0,class:"alert alert-info"},Es={key:1};function ws(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock"),d=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"content-title":e.title},{default:Object(o["withCtx"])((function(){return[0===e.anonymousSites.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Vs,Object(o["toDisplayString"])(e.translate("UsersManager_NoteNoAnonymousUserAccessSettingsWontBeUsed2")),1)):Object(o["createCommentVNode"])("",!0),e.anonymousSites.length>0?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Es,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultReport",modelValue:e.defaultReport,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.defaultReport=t}),introduction:e.translate("UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess"),options:e.defaultReportOptions},null,8,["modelValue","introduction","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"anonymousDefaultReportWebsite",modelValue:e.defaultReportWebsite,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.defaultReportWebsite=t}),options:e.anonymousSites},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultDate",modelValue:e.defaultDate,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.defaultDate=t}),introduction:e.translate("UsersManager_ForAnonymousUsersReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(l,{saving:e.loading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])],512)),[[d]]):Object(o["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])}var As=Object(o["defineComponent"])({props:{title:{type:String,required:!0},anonymousSites:{type:Array,required:!0},anonymousDefaultReport:{type:[String,Number],required:!0},anonymousDefaultSite:{type:String,required:!0},anonymousDefaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},defaultReportOptions:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"]},directives:{Form:f["Form"]},data:function(){return{loading:!1,defaultReport:"".concat(this.anonymousDefaultReport),defaultReportWebsite:this.anonymousDefaultSite,defaultDate:this.anonymousDefaultDate}},methods:{save:function(){var e=this,t={anonymousDefaultReport:"1"===this.defaultReport?this.defaultReportWebsite:this.defaultReport,anonymousDefaultDate:this.defaultDate};this.loading=!0,g["AjaxHelper"].post({module:"UsersManager",action:"recordAnonymousUserSettings",format:"json"},t,{withTokenInUrl:!0}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"anonymousUserSettings",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.loading=!1}))}}});As.render=ws;var Ts=As,Ms={id:"newsletterSignup"};function Bs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ms,[Object(o["createVNode"])(c,{"content-title":e.translate("UsersManager_NewsletterSignupTitle")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"newsletterSignupCheckbox",id:"newsletterSignupCheckbox",modelValue:e.newsletterSignupCheckbox,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newsletterSignupCheckbox=t}),"full-width":!0,title:e.signupTitleText},null,8,["modelValue","title"])]),Object(o["createVNode"])(l,{id:"newsletterSignupBtn",onConfirm:t[1]||(t[1]=function(t){return e.signupForNewsletter()}),disabled:!e.newsletterSignupCheckbox,value:e.newsletterSignupButtonTitle,saving:e.isProcessingNewsletterSignup},null,8,["disabled","value","saving"])]})),_:1},8,["content-title"])],512)),[[o["vShow"],e.showNewsletterSignup]])}var _s=Object(o["defineComponent"])({data:function(){return{showNewsletterSignup:!0,newsletterSignupCheckbox:!1,isProcessingNewsletterSignup:!1,newsletterSignupButtonTitle:Object(g["translate"])("General_Save")}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"]},computed:{signupTitleText:function(){return Object(g["translate"])("UsersManager_NewsletterSignupMessage",Object(g["externalLink"])("https://matomo.org/privacy-policy/"),"</a>")}},methods:{signupForNewsletter:function(){var e=this;this.newsletterSignupButtonTitle=Object(g["translate"])("General_Loading"),this.isProcessingNewsletterSignup=!0,g["AjaxHelper"].fetch({module:"API",method:"UsersManager.newsletterSignup"},{withTokenInUrl:!0}).then((function(){e.isProcessingNewsletterSignup=!1,e.showNewsletterSignup=!1;var t=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_NewsletterSignupSuccessMessage"),id:"newslettersignup",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(t)})).catch((function(){e.isProcessingNewsletterSignup=!1;var t=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_NewsletterSignupFailureMessage"),id:"newslettersignup",context:"error",type:"transient"});g["NotificationsStore"].scrollToNotification(t),e.newsletterSignupButtonTitle=Object(g["translate"])("General_PleaseTryAgain")}))}}});_s.render=Bs;var Ls=_s,Ds={id:"userSettingsTable"},xs={key:0},Rs={id:"languageHelp",class:"inline-help-node"},Ps=["href"],Hs={class:"sites_autocomplete"};function Fs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SiteSelector"),c=Object(o["resolveComponent"])("SaveButton"),d=Object(o["resolveComponent"])("PasswordConfirmation"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{"content-title":e.title,feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("form",Ds,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"text",name:"username",title:e.translate("General_Username"),disabled:!0,modelValue:e.username,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.username=t}),"inline-help":e.translate("UsersManager_YourUsernameCannotBeChanged")},null,8,["title","modelValue","inline-help"])]),e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",xs,[Object(o["createVNode"])(a,{uicontrol:"text",name:"email","model-value":e.email,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.email=t,e.doesRequirePasswordConfirmation=!0}),maxlength:100,title:e.translate("UsersManager_Email")},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Rs,[Object(o["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink("https://matomo.org/translations/")},Object(o["toDisplayString"])(e.translate("LanguagesManager_AboutPiwikTranslations")),9,Ps)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.language=t}),title:e.translate("General_Language"),options:e.languageOptions,"inline-help":"#languageHelp"},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"timeformat",modelValue:e.timeformat,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.timeformat=t}),title:e.translate("General_TimeFormat"),options:e.timeFormats},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultReport",modelValue:e.theDefaultReport,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.theDefaultReport=t}),introduction:e.translate("UsersManager_ReportToLoadByDefault"),title:e.translate("General_AllWebsitesDashboard"),options:e.defaultReportOptions},null,8,["modelValue","introduction","title","options"])]),Object(o["createElementVNode"])("div",Hs,[Object(o["createVNode"])(l,{modelValue:e.site,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.site=t}),"show-selected-site":!0,"switch-site-on-select":!1,"show-all-sites-item":!1,showselectedsite:!0,id:"defaultReportSiteSelector"},null,8,["modelValue"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultDate",modelValue:e.theDefaultDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.theDefaultDate=t}),introduction:e.translate("UsersManager_ReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.loading},null,8,["saving"]),Object(o["createVNode"])(d,{modelValue:e.showPasswordConfirmation,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.showPasswordConfirmation=t}),onConfirmed:e.doSave},null,8,["modelValue","onConfirmed"])],512),[[m]])]})),_:1},8,["content-title"])}var Is=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"],SiteSelector:g["SiteSelector"],PasswordConfirmation:f["PasswordConfirmation"]},directives:{Form:f["Form"]},data:function(){return{doesRequirePasswordConfirmation:!1,username:this.userLogin,email:this.userEmail,language:this.currentLanguageCode,timeformat:this.currentTimeformat,theDefaultReport:this.defaultReport,site:{id:this.defaultReportIdSite,name:g["Matomo"].helper.htmlDecode(this.defaultReportSiteName)},theDefaultDate:this.defaultDate,loading:!1,showPasswordConfirmation:!1}},methods:{save:function(){this.doesRequirePasswordConfirmation?this.showPasswordConfirmation=!0:this.doSave()},doSave:function(e){var t=this,n={email:this.email,defaultReport:"MultiSites"===this.theDefaultReport?this.theDefaultReport:this.site.id,defaultDate:this.theDefaultDate,language:this.language,timeformat:this.timeformat};e&&(n.passwordConfirmation=e),this.loading=!0,g["AjaxHelper"].post({module:"UsersManager",action:"recordUserSettings",format:"json"},n,{withTokenInUrl:!0}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"PersonalSettingsSuccess",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e),t.doesRequirePasswordConfirmation=!1,t.loading=!1})).catch((function(){t.loading=!1}))}}});Is.render=Fs;var qs=Is,$s={key:0},zs={key:1,class:"alert alert-danger"},Gs=["action"],Ws=["value"],Ys=["value"],Xs=["innerHTML"];function Js(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ContentBlock");return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"content-title":e.translate("UsersManager_AuthTokens")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_TokenAuthIntro")),1),e.noDescription?(Object(o["openBlock"])(),Object(o["createElementBlock"])("br",$s)):Object(o["createCommentVNode"])("",!0),e.noDescription?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",zs,Object(o["toDisplayString"])(e.translate("General_Description"))+": "+Object(o["toDisplayString"])(e.translate("General_ValidatorErrorEmptyValue")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("form",{action:e.addNewTokenFormUrl,method:"post",class:"addTokenForm"},[Object(o["createVNode"])(a,{uicontrol:"text",name:"description",title:e.translate("General_Description"),maxlength:100,required:!0,"inline-help":e.translate("UsersManager_AuthTokenPurpose"),modelValue:e.tokenDescription,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.tokenDescription=t})},null,8,["title","inline-help","modelValue"]),Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"secure_only",title:e.translate("UsersManager_OnlyAllowSecureRequests"),required:!1,"inline-help":e.secureOnlyHelp,modelValue:e.tokenSecureOnly,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.tokenSecureOnly=t}),disabled:e.forceSecureOnlyCalc},null,8,["title","inline-help","modelValue","disabled"]),Object(o["createElementVNode"])("input",{type:"hidden",value:e.formNonce,name:"nonce"},null,8,Ws),Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("UsersManager_CreateNewToken"),class:"btn",style:{"margin-right":"3.5px"}},null,8,Ys),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.cancelLink)},null,8,Xs)],8,Gs)]})),_:1},8,["content-title"])}var Ks=Object(o["defineComponent"])({props:{formNonce:String,noDescription:Boolean,forceSecureOnly:Boolean},components:{ContentBlock:g["ContentBlock"],Field:f["Field"]},data:function(){return{tokenDescription:"",tokenSecureOnly:!0}},computed:{addNewTokenFormUrl:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})))},cancelLink:function(){var e="?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})));return Object(g["translate"])("General_OrCancel","<a class='entityCancelLink' href='".concat(e,"'>"),"</a>")},forceSecureOnlyCalc:function(){return this.forceSecureOnly},secureOnlyHelp:function(){return this.forceSecureOnly?Object(g["translate"])("UsersManager_AuthTokenSecureOnlyHelpForced"):Object(g["translate"])("UsersManager_AuthTokenSecureOnlyHelp")}}});Ks.render=Js;var Qs=Ks,Zs=Object(o["createElementVNode"])("br",null,null,-1),er={style:{"font-size":"40px"},class:"generatedTokenAuth"},tr=["href"];function nr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("ContentBlock"),l=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createBlock"])(a,{"content-title":e.translate("UsersManager_TokenSuccessfullyGenerated")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_PleaseStoreToken"))+" ",1),Zs,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_DoNotStoreToken")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("pre",er,[Object(o["createElementVNode"])("code",null,Object(o["toDisplayString"])(e.generatedToken),1)],512),[[l,{}]])]),Object(o["createElementVNode"])("a",{href:e.userSecurityLink,class:"btn",style:{height:"auto"}},Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmTokenCopied"))+" "+Object(o["toDisplayString"])(e.translate("UsersManager_GoBackSecurityPage")),9,tr)]})),_:1},8,["content-title"])}var sr=Object(o["defineComponent"])({props:{generatedToken:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"]},directives:{CopyToClipboard:g["CopyToClipboard"]},computed:{userSecurityLink:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})))}}});sr.render=nr;var rr=sr,or=["action"],ir=["value"],ar={key:0},lr=["innerHTML"],cr=["value"],dr={key:1},ur={class:"alert alert-danger"},mr=["innerHTML"],br={ref:"afterPassword"},pr=Object(o["createElementVNode"])("a",{name:"authtokens",id:"authtokens"},null,-1),gr={key:0},fr={class:"listAuthTokens"},hr=["title"],Or={key:0},jr=["colspan","innerHTML"],vr={class:"creationDate"},Cr=["title"],kr=["action"],yr=["value"],Nr=["value"],Sr=["title"],Ur=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),Vr=[Ur],Er={class:"tableActionBar"},wr=["href"],Ar=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),Tr=["action"],Mr=["value"],Br=Object(o["createElementVNode"])("input",{name:"idtokenauth",type:"hidden",value:"all"},null,-1),_r={type:"submit",class:"table-action delete-all-tokens"},Lr=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1);function Dr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ContentBlock"),c=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,"content-title":e.translate("General_ChangePassword"),feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("form",{id:"userSettingsTable",method:"post",action:e.recordPasswordChangeAction},[Object(o["createElementVNode"])("input",{type:"hidden",value:e.changePasswordNonce,name:"nonce"},null,8,ir),e.isValidHost?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ar,[Object(o["createVNode"])(a,{uicontrol:"password",name:"password",autocomplete:!1,modelValue:e.password,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.password=t}),title:e.translate("Login_NewPassword"),"inline-help":e.translate("UsersManager_IfYouWouldLikeToChangeThePasswordTypeANewOne")},null,8,["modelValue","title","inline-help"]),Object(o["createVNode"])(a,{uicontrol:"password",name:"passwordBis",autocomplete:!1,modelValue:e.passwordBis,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.passwordBis=t}),title:e.translate("Login_NewPasswordRepeat"),"inline-help":e.translate("UsersManager_TypeYourPasswordAgain")},null,8,["modelValue","title","inline-help"]),Object(o["createVNode"])(a,{uicontrol:"password",name:"passwordConfirmation",autocomplete:!1,modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.passwordConfirmation=t}),title:e.translate("UsersManager_YourCurrentPassword"),"inline-help":e.translate("UsersManager_TypeYourCurrentPassword")},null,8,["modelValue","title","inline-help"]),Object(o["createElementVNode"])("div",{class:"alert alert-info",innerHTML:e.$sanitize(e.changePasswordInfoNotification)},null,8,lr),Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("General_Save"),class:"btn"},null,8,cr)])):Object(o["createCommentVNode"])("",!0),e.isValidHost?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",dr,[Object(o["createElementVNode"])("div",ur,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_InjectedHostCannotChangePwd",e.invalidHost))+" ",1),e.isSuperUser?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.emailYourAdminText)},null,8,mr))])]))],8,or)]})),_:1},8,["content-title"])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",br,[e.isUsersAdminEnabled&&e.afterPasswordComponent?(Object(o["openBlock"])(),Object(o["createBlock"])(Object(o["resolveDynamicComponent"])(e.afterPasswordComponent),{key:0})):Object(o["createCommentVNode"])("",!0)],512),pr,Object(o["createVNode"])(l,{"content-title":e.translate("UsersManager_AuthTokens")},{default:Object(o["withCtx"])((function(){var t,n;return[Object(o["createElementVNode"])("p",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_TokenAuthIntro"))+" ",1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",gr,Object(o["toDisplayString"])(e.translate("UsersManager_ExpiredTokensDeleteAutomatically")),1)):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",fr,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_CreationDate")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Description")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_LastUsed")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_SecureUseOnly")),1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,title:e.translate("UsersManager_TokensWithExpireDateCreationBySystem")},Object(o["toDisplayString"])(e.translate("UsersManager_ExpireDate")),9,hr)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(o["createElementVNode"])("tbody",null,[null!==(t=e.tokens)&&void 0!==t&&t.length?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",Or,[Object(o["createElementVNode"])("td",{colspan:e.hasTokensWithExpireDate?5:4,innerHTML:e.$sanitize(e.noTokenCreatedYetText)},null,8,jr)])),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.tokens||[],(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.idusertokenauth},[Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",vr,Object(o["toDisplayString"])(t.date_created),1)]),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(t.description),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(t.last_used?t.last_used:e.translate("General_Never")),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(1===parseInt(t.secure_only,10)?e.translate("General_Yes"):e.translate("General_No")),1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",{key:0,title:e.translate("UsersManager_TokensWithExpireDateCreationBySystem")},Object(o["toDisplayString"])(t.date_expired?t.date_expired:e.translate("General_Never")),9,Cr)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("form",{method:"post",action:e.deleteTokenAction,style:{display:"inline"}},[Object(o["createElementVNode"])("input",{name:"nonce",type:"hidden",value:e.deleteTokenNonce},null,8,yr),Object(o["createElementVNode"])("input",{name:"idtokenauth",type:"hidden",value:t.idusertokenauth},null,8,Nr),Object(o["createElementVNode"])("button",{type:"submit",class:"table-action",title:e.translate("General_Delete")},Vr,8,Sr)],8,kr)])])})),128))])],512),[[c]]),Object(o["createElementVNode"])("div",Er,[Object(o["createElementVNode"])("a",{href:e.addNewTokenLink,class:"addNewToken"},[Ar,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_CreateNewToken")),1)],8,wr),null!==(n=e.tokens)&&void 0!==n&&n.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:0,method:"post",action:e.deleteTokenAction,style:{display:"inline"}},[Object(o["createElementVNode"])("input",{name:"nonce",type:"hidden",value:e.deleteTokenNonce},null,8,Mr),Br,Object(o["createElementVNode"])("button",_r,[Lr,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_DeleteAllTokens")),1)])],8,Tr)):Object(o["createCommentVNode"])("",!0)])]})),_:1},8,["content-title"])])}var xr=Object(o["defineComponent"])({props:{deleteTokenNonce:String,tokens:Array,hasTokensWithExpireDate:Boolean,isUsersAdminEnabled:Boolean,changePasswordNonce:String,isValidHost:Boolean,isSuperUser:Boolean,invalidHost:String,afterPasswordEventContent:String,invalidHostMailLinkStart:String},components:{ContentBlock:g["ContentBlock"],Field:f["Field"]},directives:{ContentTable:g["ContentTable"]},data:function(){return{password:"",passwordBis:"",passwordConfirmation:""}},mounted:function(){var e=this.$refs.afterPassword;g["Matomo"].helper.compileVueEntryComponents(e)},computed:{recordPasswordChangeAction:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"recordPasswordChange"})))},emailYourAdminText:function(){return Object(g["translate"])("UsersManager_EmailYourAdministrator",this.invalidHostMailLinkStart||"","</a>")},noTokenCreatedYetText:function(){var e="?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})));return Object(g["translate"])("UsersManager_NoTokenCreatedYetCreateNow",'<a href="'.concat(e,'">'),"</a>")},changePasswordInfoNotification:function(){var e,t=Object(g["translate"])("UsersManager_PasswordChangeTerminatesOtherSessions"),n="";return null!==(e=this.tokens)&&void 0!==e&&e.length&&(n=Object(g["translate"])("UsersManager_PasswordChangeDoesNotRevokeAuthTokens",'<a href="#authtokens">'.concat(Object(g["translate"])("UsersManager_AuthTokens"),"</a>"))),[t,n].filter((function(e){return e})).join("<br><br>")},deleteTokenAction:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"deleteToken"})))},addNewTokenLink:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})))},afterPasswordComponent:function(){if(!this.afterPasswordEventContent)return null;var e=this.$refs.afterPassword;return Object(o["markRaw"])({template:this.afterPasswordEventContent,beforeUnmount:function(){g["Matomo"].helper.destroyVueComponent(e)}})}}});xr.render=Dr;var Rr=xr,Pr=["innerHTML"],Hr={style:{"margin-left":"20px"}},Fr=["href"],Ir=Object(o["createElementVNode"])("br",null,null,-1);function qr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("PersonalSettings"),l=Object(o["resolveComponent"])("NewsletterSettings"),c=Object(o["resolveComponent"])("PluginSettings"),d=Object(o["resolveComponent"])("ContentBlock");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createVNode"])(a,{"is-users-admin-enabled":e.isUsersAdminEnabled,title:e.translate("UsersManager_PersonalSettings"),"user-login":e.userLogin,"user-email":e.userEmail,"current-language-code":e.currentLanguageCode,"language-options":e.languageOptions,"current-timeformat":e.currentTimeformat,"time-formats":e.timeFormats,"default-report":e.defaultReport,"default-report-options":e.defaultReportOptions,"default-report-id-site":e.defaultReportIdSite,"default-report-site-name":e.defaultReportSiteName,"default-date":e.defaultDate,"available-default-dates":e.availableDefaultDates},null,8,["is-users-admin-enabled","title","user-login","user-email","current-language-code","language-options","current-timeformat","time-formats","default-report","default-report-options","default-report-id-site","default-report-site-name","default-date","available-default-dates"]),e.showNewsletterSignup?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0})):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(c,{mode:"user"}),Object(o["createVNode"])(d,{"content-title":e.translate("UsersManager_ExcludeVisitsViaCookie"),class:"ignoreCookieSettings"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.yourVisitsAreText)},null,8,Pr),Object(o["createElementVNode"])("span",Hr,[Object(o["createElementVNode"])("a",{href:e.setIgnoreCookieLink},[Object(o["createTextVNode"])(" › "+Object(o["toDisplayString"])(e.ignoreCookieSet?e.translate("UsersManager_ClickHereToDeleteTheCookie"):e.translate("UsersManager_ClickHereToSetTheCookieOnDomain",e.piwikHost))+" ",1),Ir],8,Fr)])]})),_:1},8,["content-title"])])}var $r=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},showNewsletterSignup:Boolean,ignoreCookieSet:Boolean,setIgnoreCookieNonce:String,piwikHost:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"],PersonalSettings:qs,NewsletterSettings:Ls,PluginSettings:f["PluginSettings"]},computed:{yourVisitsAreText:function(){return this.ignoreCookieSet?Object(g["translate"])("UsersManager_YourVisitsAreIgnoredOnDomain","<strong>",this.piwikHost,"</strong>"):Object(g["translate"])("UsersManager_YourVisitsAreNotIgnored","<strong>","</strong>")},setIgnoreCookieLink:function(){return"?".concat(g["MatomoUrl"].stringify({module:"UsersManager",action:"setIgnoreCookie",nonce:this.setIgnoreCookieNonce}),"#excludeCookie")}}});$r.render=qr;var zr=$r;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["SitesManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["SitesManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));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/SitesManager/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},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"SiteTypesStore",(function(){return h})),n.d(t,"CurrencyStore",(function(){return j})),n.d(t,"TimezoneStore",(function(){return k})),n.d(t,"SitesManagement",(function(){return ht})),n.d(t,"ManageGlobalSettings",(function(){return Zt})),n.d(t,"ExcludeQueryParameterSettings",(function(){return Xt})),n.d(t,"SiteWithoutData",(function(){return En})),"undefined"!==typeof window){var a=window.document.currentScript,r=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("8bbf"),o=n("19dc");function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function u(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var d=window,m=d.$,b=function(){function e(){var t=this;l(this,e),u(this,"state",Object(i["reactive"])({isLoading:!1,typesById:{}})),u(this,"typesById",Object(i["computed"])((function(){return Object(i["readonly"])(t.state).typesById}))),u(this,"isLoading",Object(i["computed"])((function(){return Object(i["readonly"])(t.state).isLoading}))),u(this,"types",Object(i["computed"])((function(){return Object.values(t.typesById.value)}))),u(this,"response",void 0)}return c(e,[{key:"init",value:function(){return this.fetchAvailableTypes()}},{key:"fetchAvailableTypes",value:function(){var e=this;return this.response?Promise.resolve(this.response):(this.state.isLoading=!0,this.response=o["AjaxHelper"].fetch({method:"API.getAvailableMeasurableTypes",filter_limit:"-1"}).then((function(t){return t.forEach((function(t){e.state.typesById[t.id]=t})),e.types.value})).finally((function(){e.state.isLoading=!1})),this.response)}},{key:"getEditSiteIdParameter",value:function(){var e=o["MatomoUrl"].hashQuery.value.match(/editsiteid=([0-9]+)/);if(e){var t="1"===o["MatomoUrl"].urlParsed.value.showaddsite||"true"===o["MatomoUrl"].urlParsed.value.showaddsite,n=e[1];return n&&m.isNumeric(n)&&!t?n:void 0}}},{key:"removeEditSiteIdParameterFromHash",value:function(){var e=Object.assign({},o["MatomoUrl"].hashParsed.value);delete e.editsiteid,o["MatomoUrl"].updateHash(e)}}]),e}(),h=new b;function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 f(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),e}function S(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var O=function(){function e(){var t=this;p(this,e),S(this,"privateState",Object(i["reactive"])({isLoading:!1,currencies:{}})),S(this,"currencies",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState).currencies}))),S(this,"isLoading",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState).isLoading}))),S(this,"initializePromise",null)}return f(e,[{key:"init",value:function(){return this.initializePromise||(this.initializePromise=this.fetchCurrencies()),this.initializePromise}},{key:"fetchCurrencies",value:function(){var e=this;return this.privateState.isLoading=!0,o["AjaxHelper"].fetch({method:"SitesManager.getCurrencyList"}).then((function(t){e.privateState.currencies=t})).finally((function(){e.privateState.isLoading=!1}))}}]),e}(),j=new O;function y(e,t){return V(e)||N(e,t)||E(e,t)||v()}function v(){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 E(e,t){if(e){if("string"===typeof e)return x(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)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function N(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(i.push(a.value),t&&i.length===t)break}catch(s){l=!0,r=s}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw r}}return i}}function V(e){if(Array.isArray(e))return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(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 w(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),e}function P(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var C=function(){function e(){var t=this;M(this,e),P(this,"privateState",Object(i["reactive"])({isLoading:!1,timezones:[],timezoneSupportEnabled:!1})),P(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),P(this,"timezones",Object(i["computed"])((function(){return t.state.value.timezones}))),P(this,"timezoneSupportEnabled",Object(i["computed"])((function(){return t.state.value.timezoneSupportEnabled}))),P(this,"isLoading",Object(i["computed"])((function(){return t.state.value.isLoading}))),P(this,"initializePromise",null)}return w(e,[{key:"init",value:function(){var e=this;return this.initializePromise||(this.privateState.isLoading=!0,this.initializePromise=Promise.all([this.checkTimezoneSupportEnabled(),this.fetchTimezones()]).finally((function(){e.privateState.isLoading=!1}))),this.initializePromise}},{key:"fetchTimezones",value:function(){var e=this;return o["AjaxHelper"].fetch({method:"SitesManager.getTimezonesList"}).then((function(t){var n=[];Object.entries(t).forEach((function(e){var t=y(e,2),a=t[0],r=t[1];Object.entries(r).forEach((function(e){var t=y(e,2),r=t[0],i=t[1];n.push({group:a,label:r,code:i})}))})),e.privateState.timezones=n}))}},{key:"checkTimezoneSupportEnabled",value:function(){var e=this;return o["AjaxHelper"].fetch({method:"SitesManager.isTimezoneSupportEnabled"}).then((function(t){e.privateState.timezoneSupportEnabled=t.value}))}}]),e}(),k=new C,D={class:"SitesManager",ref:"root"},_={class:"sites-manager-header"},G=["innerHTML"],A=Object(i["createElementVNode"])("br",null,null,-1),L=["innerHTML"],U={class:"loadingPiwik"},I=["alt"],B={class:"ui-confirm add-site-dialog"},z={class:"center"},H=["title","onClick"],Q={class:"ui-button-text"},F={class:"sitesManagerList"},R={key:0},W={class:"bottomButtonBar"};function $(e,t,n,a,r,o){var l=this,s=Object(i["resolveComponent"])("EnrichedHeadline"),c=Object(i["resolveComponent"])("ButtonBar"),u=Object(i["resolveComponent"])("MatomoDialog"),d=Object(i["resolveComponent"])("SiteFields"),m=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",D,[Object(i["createElementVNode"])("div",_,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(s,{"help-url":e.externalRawLink("https://matomo.org/docs/manage-websites/"),"feature-name":e.translate("SitesManager_WebsitesManagement")},{default:Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.headlineText),1)]})),_:1},8,["help-url","feature-name"])],512),[[i["vShow"],e.availableTypes.length]]),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_MainDescription"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.mainDescription)},null,8,G),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[A,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.superUserAccessMessage)},null,8,L)],512),[[i["vShow"],e.hasSuperUserAccess]])])],512),[[m]])]),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",{class:Object(i["normalizeClass"])({hide_only:!e.isLoading})},[Object(i["createElementVNode"])("div",U,[Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,I),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_LoadingData")),1)])],2)]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{"site-is-being-edited":e.isSiteBeingEdited,"has-prev":e.hasPrev,hasNext:e.hasNext,"offset-start":e.offsetStart,"offset-end":e.offsetEnd,"total-number-of-sites":e.totalNumberOfSites,"is-loading":e.isLoading,"search-term":e.searchTerm,"is-searching":!!e.activeSearchTerm,"onUpdate:searchTerm":t[0]||(t[0]=function(t){return e.searchTerm=t}),onAdd:t[1]||(t[1]=function(t){return e.addNewEntity()}),onSearch:t[2]||(t[2]=function(t){return e.searchSites(t)}),onPrev:t[3]||(t[3]=function(t){return e.previousPage()}),onNext:t[4]||(t[4]=function(t){return e.nextPage()})},null,8,["site-is-being-edited","has-prev","hasNext","offset-start","offset-end","total-number-of-sites","is-loading","search-term","is-searching"])]),Object(i["createVNode"])(u,{modelValue:e.showAddSiteDialog,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.showAddSiteDialog=t})},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",B,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("SitesManager_ChooseMeasurableTypeHeadline")),1),Object(i["createElementVNode"])("div",z,[Object(i["createElementVNode"])("p",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.availableTypes,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("button",{type:"button",key:t.id,title:t.description,class:"modal-close btn",onClick:function(n){e.addSite(t.id)},"aria-disabled":"false"},[Object(i["createElementVNode"])("span",Q,Object(i["toDisplayString"])(t.name),1)],8,H)})),128))])])])])]})),_:1},8,["modelValue"]),Object(i["createElementVNode"])("div",F,[e.activeSearchTerm&&0===e.sites.length&&!e.isLoading?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",R,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_NotFound"))+" ",1),Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.activeSearchTerm),1)])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sites,(function(n,a){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n.idsite},[Object(i["createVNode"])(d,{site:n,"timezone-support-enabled":e.timezoneSupportEnabled,"utc-time":e.utcTime,"global-settings":e.globalSettings,onEditSite:t[6]||(t[6]=function(e){return l.isSiteBeingEdited=!0}),onCancelEditSite:t[7]||(t[7]=function(t){return e.afterCancelEdit(t)}),onDelete:t[8]||(t[8]=function(t){return e.afterDelete(t)}),onSave:function(t){return e.afterSave(t.site,t.settingValues,a,t.isNew)}},null,8,["site","timezone-support-enabled","utc-time","global-settings","onSave"])])})),128))]),Object(i["createElementVNode"])("div",W,[Object(i["createVNode"])(c,{"site-is-being-edited":e.isSiteBeingEdited,"has-prev":e.hasPrev,hasNext:e.hasNext,"offset-start":e.offsetStart,"offset-end":e.offsetEnd,"total-number-of-sites":e.totalNumberOfSites,"is-loading":e.isLoading,"search-term":e.searchTerm,"is-searching":!!e.activeSearchTerm,"onUpdate:searchTerm":t[9]||(t[9]=function(t){return e.searchTerm=t}),onAdd:t[10]||(t[10]=function(t){return e.addNewEntity()}),onSearch:t[11]||(t[11]=function(t){return e.searchSites(t)}),onPrev:t[12]||(t[12]=function(t){return e.previousPage()}),onNext:t[13]||(t[13]=function(t){return e.nextPage()})},null,8,["site-is-being-edited","has-prev","hasNext","offset-start","offset-end","total-number-of-sites","is-loading","search-term","is-searching"])])],512)}var K={class:"sitesButtonBar clearfix"},q={class:"search"},Y=["value","placeholder","disabled"],X=["title"],J={class:"paging"},Z=["disabled"],ee={style:{cursor:"pointer"}},te={class:"counter"},ne=["disabled"],ae={style:{cursor:"pointer"},class:"pointer"};function re(e,t,n,a,r,o){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",K,[Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:Object(i["normalizeClass"])(["btn addSite",{disabled:e.siteIsBeingEdited}]),onClick:t[0]||(t[0]=function(t){return e.addNewEntity()}),tabindex:"1"},Object(i["toDisplayString"])(e.availableTypes.length>1?e.translate("SitesManager_AddMeasurable"):e.translate("SitesManager_AddSite")),3),[[i["vShow"],e.hasSuperUserAccess&&e.availableTypes]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",q,[Object(i["createElementVNode"])("input",{value:e.searchTerm,onKeydown:t[1]||(t[1]=function(t){return e.onKeydown(t)}),placeholder:e.translate("Actions_SubmenuSitesearch"),type:"text",disabled:e.siteIsBeingEdited},null,40,Y),Object(i["createElementVNode"])("div",{onClick:t[2]||(t[2]=function(t){return e.searchSite()}),title:e.translate("General_ClickToSearch"),class:"search_ico icon-search"},null,8,X)],512),[[i["vShow"],e.hasPrev||e.hasNext||e.isSearching]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",J,[Object(i["createElementVNode"])("a",{class:"btn prev",disabled:!(e.hasPrev&&!e.isLoading&&!e.siteIsBeingEdited)||void 0,onClick:t[3]||(t[3]=function(t){return e.previousPage()})},[Object(i["createElementVNode"])("span",ee,"« "+Object(i["toDisplayString"])(e.translate("General_Previous")),1)],8,Z),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",te,[Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.paginationText),1)],512),[[i["vShow"],e.hasPrev||e.hasNext]]),Object(i["createElementVNode"])("a",{class:"btn next",disabled:!(e.hasNext&&!e.isLoading&&!e.siteIsBeingEdited)||void 0,onClick:t[4]||(t[4]=function(t){return e.nextPage()})},[Object(i["createElementVNode"])("span",ae,Object(i["toDisplayString"])(e.translate("General_Next"))+" »",1)],8,ne)],512),[[i["vShow"],e.hasPrev||e.hasNext]])])}var ie=Object(i["defineComponent"])({props:{siteIsBeingEdited:{type:Boolean,required:!0},hasPrev:{type:Boolean,required:!0},hasNext:{type:Boolean,required:!0},offsetStart:{type:Number,required:!0},offsetEnd:{type:Number,required:!0},totalNumberOfSites:{type:Number},isLoading:{type:Boolean,required:!0},searchTerm:{type:String,required:!0},isSearching:{type:Boolean,required:!0}},emits:["add","search","prev","next","update:searchTerm"],created:function(){h.init(),this.onKeydown=Object(o["debounce"])(this.onKeydown,50)},computed:{hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},availableTypes:function(){return h.types.value},paginationText:function(){var e;return e=this.isSearching?Object(o["translate"])("General_PaginationWithoutTotal","".concat(this.offsetStart),"".concat(this.offsetEnd)):Object(o["translate"])("General_Pagination","".concat(this.offsetStart),"".concat(this.offsetEnd),null===this.totalNumberOfSites?"?":"".concat(this.totalNumberOfSites))," ".concat(e," ")}},methods:{addNewEntity:function(){this.$emit("add")},searchSite:function(){this.siteIsBeingEdited||this.$emit("search")},previousPage:function(){this.$emit("prev")},nextPage:function(){this.$emit("next")},onKeydown:function(e){var t=this;setTimeout((function(){"Enter"!==e.key?t.$emit("update:searchTerm",e.target.value):t.searchSiteOnEnter(e)}))},searchSiteOnEnter:function(e){e.preventDefault(),this.searchSite()}}});ie.render=re;var oe=ie,le=["idsite","type"],se={class:"card-content"},ce={key:0,class:"row"},ue={class:"col m3"},de={class:"title"},me={class:"title"},be=["target","title","href"],he={class:"col m4"},pe={class:"title"},ge={class:"title"},fe={class:"title"},Se={class:"title"},Oe={class:"col m4"},je={class:"title"},ye=Object(i["createTextVNode"])(": "),ve=["href"],Ee={key:0},xe={class:"title"},Ne={key:1},Ve={class:"title"},Me={key:2},Te={class:"title"},we={class:"col m1 text-right"},Pe=["title"],Ce=Object(i["createElementVNode"])("span",{class:"icon-edit"},null,-1),ke=[Ce],De=["title"],_e=Object(i["createElementVNode"])("span",{class:"icon-delete"},null,-1),Ge=[_e],Ae={key:1},Le={class:"form-group row"},Ue={class:"col s12 m6 input-field"},Ie=["placeholder"],Be=Object(i["createElementVNode"])("div",{class:"col s12 m6"},null,-1),ze={id:"timezoneHelpText",class:"inline-help-node"},He={key:0},Qe=Object(i["createElementVNode"])("br",null,null,-1),Fe=Object(i["createElementVNode"])("br",null,null,-1),Re={class:"editingSiteFooter"},We=["disabled","value"],$e=["disabled"],Ke=["innerHTML"];function qe(e,t,n,a,r,o){var l,s,c,u=Object(i["resolveComponent"])("ActivityIndicator"),d=Object(i["resolveComponent"])("GroupedSettings"),m=Object(i["resolveComponent"])("Field"),b=Object(i["resolveComponent"])("PasswordConfirmation");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["site card hoverable",{editingSite:!!e.editMode}]),idsite:e.theSite.idsite,type:e.theSite.type,ref:"root"},[Object(i["createElementVNode"])("div",se,[e.editMode?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ce,[Object(i["createElementVNode"])("div",ue,[Object(i["createElementVNode"])("h4",null,Object(i["toDisplayString"])(e.theSite.name),1),Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",de,Object(i["toDisplayString"])(e.translate("General_Id"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.theSite.idsite),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",me,Object(i["toDisplayString"])(e.translate("SitesManager_Type"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.currentType.name),1)],512),[[i["vShow"],e.availableTypes.length>1]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("a",{target:e.isInternalSetupUrl?"_self":"_blank",title:e.translate("SitesManager_ShowTrackingTag"),href:e.setupUrl},Object(i["toDisplayString"])(e.translate("SitesManager_ShowTrackingTag")),9,be)],512),[[i["vShow"],e.theSite.idsite&&e.howToSetupUrl]])])]),Object(i["createElementVNode"])("div",he,[Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",pe,Object(i["toDisplayString"])(e.translate("SitesManager_Timezone"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.theSite.timezone_name),1)]),Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",ge,Object(i["toDisplayString"])(e.translate("SitesManager_Currency"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.theSite.currency_name),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",fe,Object(i["toDisplayString"])(e.translate("Goals_Ecommerce"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Yes")),1)],512),[[i["vShow"],1===e.theSite.ecommerce||"1"===e.theSite.ecommerce]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",Se,Object(i["toDisplayString"])(e.translate("Actions_SubmenuSitesearch"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Yes")),1)],512),[[i["vShow"],1===e.theSite.sitesearch||"1"===e.theSite.sitesearch]])])]),Object(i["createElementVNode"])("div",Oe,[Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",je,Object(i["toDisplayString"])(e.translate("SitesManager_Urls")),1),ye,(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.theSite.alias_urls,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:t},[Object(i["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:t},Object(i["toDisplayString"])(t)+Object(i["toDisplayString"])(n===e.theSite.alias_urls.length-1?"":", "),9,ve)])})),128))]),null!==(l=e.theSite.excluded_ips)&&void 0!==l&&l.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Ee,[Object(i["createElementVNode"])("span",xe,Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedIps"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.theSite.excluded_ips.split(/\s*,\s*/g).join(", ")),1)])):Object(i["createCommentVNode"])("",!0),null!==(s=e.theSite.excluded_parameters)&&void 0!==s&&s.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Ne,[Object(i["createElementVNode"])("span",Ve,Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedParameters"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.theSite.excluded_parameters.split(/\s*,\s*/g).join(", ")),1)])):Object(i["createCommentVNode"])("",!0),null!==(c=e.theSite.excluded_user_agents)&&void 0!==c&&c.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Me,[Object(i["createElementVNode"])("span",Te,Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedUserAgents"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.theSite.excluded_user_agents.split(/\s*,\s*/g).join(", ")),1)])):Object(i["createCommentVNode"])("",!0)])]),Object(i["createElementVNode"])("div",we,[Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("button",{class:"table-action",onClick:t[0]||(t[0]=function(t){return e.editSite()}),title:e.translate("General_Edit")},ke,8,Pe)]),Object(i["createElementVNode"])("li",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("button",{class:"table-action",onClick:t[1]||(t[1]=function(t){return e.getMessagesToWarnOnSiteRemoval()}),title:e.translate("General_Delete")},Ge,8,De),[[i["vShow"],e.theSite.idsite]])])])])])),e.editMode?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ae,[Object(i["createElementVNode"])("div",Le,[Object(i["createElementVNode"])("div",Ue,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=function(t){return e.theSite.name=t}),maxlength:"90",placeholder:e.translate("General_Name")},null,8,Ie),[[i["vModelText"],e.theSite.name]]),Object(i["createElementVNode"])("label",null,Object(i["toDisplayString"])(e.translate("General_Name")),1)]),Be]),Object(i["createVNode"])(u,{loading:e.isLoading},null,8,["loading"]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.measurableSettings,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:t.pluginName},[Object(i["createVNode"])(d,{"group-name":t.pluginName,settings:t.settings,"all-setting-values":e.settingValues,onChange:function(n){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}},null,8,["group-name","settings","all-setting-values","onChange"])])})),128)),Object(i["createVNode"])(m,{uicontrol:"select",name:"currency",modelValue:e.theSite.currency,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.theSite.currency=t}),title:e.translate("SitesManager_Currency"),"inline-help":e.translate("SitesManager_CurrencySymbolWillBeUsedForGoals"),options:e.currencies},null,8,["modelValue","title","inline-help","options"]),Object(i["createVNode"])(m,{uicontrol:"select",name:"timezone",modelValue:e.theSite.timezone,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.theSite.timezone=t}),title:e.translate("SitesManager_Timezone"),"inline-help":"#timezoneHelpText",options:e.timezones},null,8,["modelValue","title","options"]),Object(i["createElementVNode"])("div",ze,[Object(i["createElementVNode"])("div",null,[e.timezoneSupportEnabled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",He,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_AdvancedTimezoneSupportNotFound"))+" ",1),Qe])),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.utcTimeIs)+" ",1),Fe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_ChangingYourTimezoneWillOnlyAffectDataForward")),1)])]),Object(i["createElementVNode"])("div",Re,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{disabled:e.isSaving,type:"submit",class:"btn",value:e.translate("General_Save"),onClick:t[5]||(t[5]=function(t){return e.saveSite()})},null,8,We),[[i["vShow"],!e.isLoading]]),Object(i["createElementVNode"])("button",{class:"btn btn-link",disabled:e.isSaving,onClick:t[6]||(t[6]=function(t){return e.cancelEditSite(e.site)})},Object(i["toDisplayString"])(e.translate("General_Cancel","","")),9,$e)])])):Object(i["createCommentVNode"])("",!0)]),Object(i["createVNode"])(b,{modelValue:e.showRemoveDialog,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.showRemoveDialog=t}),onConfirmed:e.deleteSite},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.removeDialogTitle),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("SitesManager_DeleteSiteExplanation")),1),e.deleteSiteExplanation?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.deleteSiteExplanation)},null,8,Ke)):Object(i["createCommentVNode"])("",!0)]})),_:1},8,["modelValue","onConfirmed"])],10,le)}var Ye=n("a5a2");function Xe(e,t){return nt(e)||tt(e,t)||Ze(e,t)||Je()}function Je(){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 Ze(e,t){if(e){if("string"===typeof e)return et(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)?et(e,t):void 0}}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function tt(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(i.push(a.value),t&&i.length===t)break}catch(s){l=!0,r=s}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw r}}return i}}function nt(e){if(Array.isArray(e))return e}var at=Object(i["computed"])((function(){return k.timezones.value.map((function(e){var t=e.group,n=e.label,a=e.code;return{group:t,key:n,value:a}}))}));function rt(e){return"undefined"===typeof e.idsite}var it=Object(i["defineComponent"])({props:{site:{type:Object,required:!0},timezoneSupportEnabled:{type:Boolean},utcTime:{type:Date,required:!0},globalSettings:{type:Object,required:!0}},data:function(){return{isLoading:!1,isSaving:!1,editMode:!1,theSite:Object.assign({},this.site),measurableSettings:[],settingValues:{},showRemoveDialog:!1,deleteSiteExplanation:""}},components:{PasswordConfirmation:Ye["PasswordConfirmation"],Field:Ye["Field"],GroupedSettings:Ye["GroupedSettings"],ActivityIndicator:o["ActivityIndicator"]},emits:["delete","editSite","cancelEditSite","save"],created:function(){j.init(),k.init(),h.init(),this.onSiteChanged()},watch:{site:function(){this.onSiteChanged()},measurableSettings:function(e){if(e.length){var t={};e.forEach((function(e){e.settings.forEach((function(n){t["".concat(e.pluginName,".").concat(n.name)]=n.value}))})),this.settingValues=t}}},methods:{onSiteChanged:function(){var e=this.site;this.theSite=Object.assign({},e);var t=rt(e);if(t){var n=this.globalSettings;this.theSite.timezone=n.defaultTimezone,this.theSite.currency=n.defaultCurrency}var a=h.getEditSiteIdParameter();(t||a&&"".concat(e.idsite)===a)&&this.editSite()},editSite:function(){var e=this;if(this.editMode=!0,this.$emit("editSite",{idSite:this.theSite.idsite}),this.measurableSettings=[],rt(this.theSite)){if(!this.currentType)return;this.measurableSettings=this.currentType.settings||[]}else this.isLoading=!0,o["AjaxHelper"].fetch({method:"SitesManager.getSiteSettings",idSite:this.theSite.idsite}).then((function(t){e.measurableSettings=t})).finally((function(){e.isLoading=!1}))},saveSite:function(){var e=this;if(!this.isSaving){this.isSaving=!0;var t={siteName:this.theSite.name,timezone:this.theSite.timezone,currency:this.theSite.currency,type:this.theSite.type,settingValues:{}},n=rt(this.theSite),a="SitesManager.addSite";n||(a="SitesManager.updateSite",t.idSite=this.theSite.idsite),Object.entries(this.settingValues).forEach((function(e){var n=Xe(e,2),a=n[0],r=n[1],i=a.split("."),o=Xe(i,2),l=o[0],s=o[1],c=t.settingValues;c[l]||(c[l]=[]);var u=r;!1===r?u="0":!0===r?u="1":Array.isArray(r)&&(u=r.filter((function(e){return!!e}))),c[l].push({name:s,value:u})})),o["AjaxHelper"].post({method:a},t).then((function(a){e.editMode=!1,!e.theSite.idsite&&a&&a.value&&(e.theSite.idsite="".concat(a.value));var r=k.timezones.value.find((function(t){return t.code===e.theSite.timezone}));e.theSite.timezone_name=(null===r||void 0===r?void 0:r.label)||e.theSite.timezone,e.theSite.currency&&(e.theSite.currency_name=j.currencies.value[e.theSite.currency]);var i=o["NotificationsStore"].show({message:n?Object(o["translate"])("SitesManager_WebsiteCreated"):Object(o["translate"])("SitesManager_WebsiteUpdated"),context:"success",id:"websitecreated",type:"transient"});o["NotificationsStore"].scrollToNotification(i),h.removeEditSiteIdParameterFromHash(),e.$emit("save",{site:e.theSite,settingValues:t.settingValues,isNew:n})})).finally((function(){e.isSaving=!1}))}},cancelEditSite:function(e){this.editMode=!1,h.removeEditSiteIdParameterFromHash(),this.$emit("cancelEditSite",{site:e,element:this.$refs.root})},deleteSite:function(e){var t=this;o["AjaxHelper"].post({idSite:this.theSite.idsite,module:"API",format:"json",method:"SitesManager.deleteSite"},{passwordConfirmation:e}).then((function(){t.$emit("delete",t.theSite)}))},getMessagesToWarnOnSiteRemoval:function(){var e=this;o["AjaxHelper"].post({idSite:this.theSite.idsite,module:"API",format:"json",method:"SitesManager.getMessagesToWarnOnSiteRemoval"}).then((function(t){e.deleteSiteExplanation="",t.length&&(e.deleteSiteExplanation+=t.join("<br>")),e.showRemoveDialog=!0}))}},computed:{availableTypes:function(){return h.types.value},setupUrl:function(){var e=this.theSite,t="",n="";return this.isInternalSetupUrl&&(t=o["MatomoUrl"].stringify({idSite:e.idsite,period:o["MatomoUrl"].parsed.value.period,date:o["MatomoUrl"].parsed.value.date,updated:"false"}),n=-1===this.howToSetupUrl.indexOf("?")?"?":"&"),"".concat(this.howToSetupUrl).concat(n).concat(t)},utcTimeIs:function(){var e=this.utcTime,t=function(e){return e.toString().padStart(2,"0")},n=t(e.getHours()),a=t(e.getMinutes()),r=t(e.getSeconds()),i="".concat(Object(o["format"])(this.utcTime)," ").concat(n,":").concat(a,":").concat(r);return Object(o["translate"])("SitesManager_UTCTimeIs",i)},timezones:function(){return at.value},currencies:function(){return j.currencies.value},currentType:function(){var e=this.site,t=h.typesById.value[e.type];return t||{name:e.type}},howToSetupUrl:function(){var e=this.currentType;if(e)return e.howToSetupUrl},isInternalSetupUrl:function(){var e=this.howToSetupUrl;return!!e&&"?"==="".concat(e).substring(0,1)},removeDialogTitle:function(){return Object(o["translate"])("SitesManager_DeleteConfirm",'"'.concat(this.theSite.name,'" (idSite = ').concat(this.theSite.idsite,")"))}}});it.render=qe;var ot=it;function lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function st(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 ct(e,t,n){return t&&st(e.prototype,t),n&&st(e,n),e}function ut(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var dt=function(){function e(){var t=this;lt(this,e),ut(this,"privateState",Object(i["reactive"])({isLoading:!1,globalSettings:{keepURLFragmentsGlobal:!1,defaultCurrency:"",defaultTimezone:"",excludedIpsGlobal:"",excludedQueryParametersGlobal:"",excludedUserAgentsGlobal:"",excludedReferrersGlobal:"",searchKeywordParametersGlobal:"",searchCategoryParametersGlobal:"",exclusionTypeForQueryParams:""}})),ut(this,"isLoading",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState).isLoading}))),ut(this,"globalSettings",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState).globalSettings})))}return ct(e,[{key:"init",value:function(){return this.fetchGlobalSettings()}},{key:"saveGlobalSettings",value:function(e){var t=this;return this.privateState.isLoading=!0,o["AjaxHelper"].post({module:"SitesManager",format:"json",action:"setGlobalSettings"},e,{withTokenInUrl:!0}).finally((function(){t.privateState.isLoading=!1}))}},{key:"fetchGlobalSettings",value:function(){var e=this;this.privateState.isLoading=!0,o["AjaxHelper"].fetch({module:"SitesManager",action:"getGlobalSettings"}).then((function(t){e.privateState.globalSettings=Object.assign(Object.assign({},t),{},{excludedIpsGlobal:t.excludedIpsGlobal||"",excludedQueryParametersGlobal:t.excludedQueryParametersGlobal||"",excludedUserAgentsGlobal:t.excludedUserAgentsGlobal||"",excludedReferrersGlobal:t.excludedReferrersGlobal||"",searchKeywordParametersGlobal:t.searchKeywordParametersGlobal||"",searchCategoryParametersGlobal:t.searchCategoryParametersGlobal||"",exclusionTypeForQueryParams:t.exclusionTypeForQueryParams||""})})).finally((function(){e.privateState.isLoading=!1}))}}]),e}(),mt=new dt,bt=Object(i["defineComponent"])({props:{dummy:String},components:{MatomoDialog:o["MatomoDialog"],ButtonBar:oe,SiteFields:ot,EnrichedHeadline:o["EnrichedHeadline"]},directives:{ContentIntro:o["ContentIntro"]},data:function(){var e=new Date,t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return{pageSize:10,currentPage:0,showAddSiteDialog:!1,searchTerm:"",activeSearchTerm:"",fetchedSites:[],isLoadingInitialEntities:!1,utcTime:t,totalNumberOfSites:null,isSiteBeingEdited:!1,fetchLimitedSitesAbortController:null}},created:function(){var e=this;k.init(),h.init(),mt.init(),this.isLoadingInitialEntities=!0,Promise.all([h.fetchAvailableTypes(),this.fetchLimitedSitesWithAdminAccess(),this.getTotalNumberOfSites()]).then((function(){e.triggerAddSiteIfRequested()})).finally((function(){e.isLoadingInitialEntities=!1})),Object(i["watch"])((function(){return o["MatomoUrl"].hashQuery.value}),(function(){e.checkGlobalSettingsHash()}))},computed:{sites:function(){var e=this.fetchedSites.filter((function(e){return!e.idsite})).length;return this.fetchedSites.slice(0,this.pageSize+e)},isLoading:function(){return!!this.fetchLimitedSitesAbortController||this.isLoadingInitialEntities||null===this.totalNumberOfSites||h.isLoading.value||k.isLoading.value||mt.isLoading.value},availableTypes:function(){return h.types.value},timezoneSupportEnabled:function(){return k.timezoneSupportEnabled.value},globalSettings:function(){return mt.globalSettings.value},headlineText:function(){return Object(o["translate"])("SitesManager_XManagement",this.availableTypes.length>1?Object(o["translate"])("General_Measurables"):Object(o["translate"])("SitesManager_Sites"))},mainDescription:function(){return Object(o["translate"])("SitesManager_YouCurrentlyHaveAccessToNWebsites","<strong>".concat(this.totalNumberOfSites,"</strong>"))},hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},superUserAccessMessage:function(){return Object(o["translate"])("SitesManager_SuperUserAccessCan","<a href='#globalSettings'>","</a>")},hasPrev:function(){return this.currentPage>=1},hasNext:function(){return this.fetchedSites.filter((function(e){return!!e.idsite})).length>=this.pageSize+1},offsetStart:function(){return this.currentPage*this.pageSize+1},offsetEnd:function(){return this.offsetStart+this.sites.filter((function(e){return!!e.idsite})).length-1}},methods:{checkGlobalSettingsHash:function(){var e=o["MatomoUrl"].hashQuery.value;!o["Matomo"].hasSuperUserAccess||"globalSettings"!==e&&"/globalSettings"!==e||o["MatomoUrl"].updateLocation(Object.assign(Object.assign({},o["MatomoUrl"].urlParsed.value),{},{action:"globalSettings"}))},addNewEntity:function(){this.availableTypes.length>1?this.showAddSiteDialog=!0:1===this.availableTypes.length&&this.addSite(this.availableTypes[0].id)},addSite:function(e){var t=e,n={isAllowed:!0,measurableType:t};o["Matomo"].postEvent("SitesManager.initAddSite",n),n&&!n.isAllowed||(t||(t="website"),this.fetchedSites.unshift({type:t}),this.isSiteBeingEdited=!0)},afterCancelEdit:function(e){var t=e.site,n=e.element;this.isSiteBeingEdited=!1,t.idsite?n.scrollIntoView():this.fetchedSites=this.fetchedSites.filter((function(e){return!!e.idsite}))},fetchLimitedSitesWithAdminAccess:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.fetchLimitedSitesAbortController&&this.fetchLimitedSitesAbortController.abort(),this.fetchLimitedSitesAbortController=new AbortController;var n=this.pageSize+1,a=this.currentPage*this.pageSize,r={method:"SitesManager.getSitesWithAdminAccess",fetchAliasUrls:1,limit:n+a,filter_offset:a,filter_limit:n};return t&&(r.pattern=t),o["AjaxHelper"].fetch(r).then((function(t){e.fetchedSites=t||[]})).then((function(n){return e.activeSearchTerm=t,n})).finally((function(){e.fetchLimitedSitesAbortController=null}))},getTotalNumberOfSites:function(){var e=this;return o["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"}).then((function(t){e.totalNumberOfSites=t.length}))},triggerAddSiteIfRequested:function(){var e=h.getEditSiteIdParameter(),t=o["MatomoUrl"].urlParsed.value.showaddsite;"1"===t?this.addNewEntity():e&&(this.searchTerm=e,this.fetchLimitedSitesWithAdminAccess(this.searchTerm))},previousPage:function(){this.currentPage=Math.max(0,this.currentPage-1),this.fetchLimitedSitesWithAdminAccess(this.activeSearchTerm)},nextPage:function(){this.currentPage=Math.max(0,this.currentPage+1),this.fetchLimitedSitesWithAdminAccess(this.activeSearchTerm)},searchSites:function(){this.currentPage=0,this.fetchLimitedSitesWithAdminAccess(this.searchTerm)},afterDelete:function(e){var t={showaddsite:0};if(o["MatomoUrl"].urlParsed.value.idSite==="".concat(e.idsite)){var n=this.sites.find((function(t){return t.idsite!==e.idsite}));n&&(t=Object.assign(Object.assign({},t),{},{idSite:n.idsite}))}o["Matomo"].helper.redirect(t)},afterSave:function(e,t,n,a){var r=["excluded_ips","excluded_parameters","excluded_user_agents","sitesearch_keyword_parameters","sitesearch_category_parameters"],i=Object.assign({},e);Object.values(t).forEach((function(e){e.forEach((function(e){"urls"===e.name?i.alias_urls=e.value:-1!==r.indexOf(e.name)?i[e.name]=e.value.join(", "):i[e.name]=e.value}))})),this.fetchedSites[n]=i,a&&null!==this.totalNumberOfSites&&(this.totalNumberOfSites+=1),this.isSiteBeingEdited=!1}}});bt.render=$;var ht=bt,pt={class:"SitesManager"},gt=Object(i["createElementVNode"])("a",{name:"globalSettings",id:"globalSettings"},null,-1),ft={id:"excludedIpsGlobalHelp",class:"inline-help-node"},St=Object(i["createElementVNode"])("br",null,null,-1),Ot=Object(i["createElementVNode"])("br",null,null,-1),jt=["innerHTML"],yt={id:"excludedUserAgentsGlobalHelp",class:"inline-help-node"},vt=Object(i["createElementVNode"])("br",null,null,-1),Et=Object(i["createElementVNode"])("br",null,null,-1),xt={id:"excludedReferrersGlobalHelp",class:"inline-help-node"},Nt=Object(i["createElementVNode"])("br",null,null,-1),Vt=Object(i["createElementVNode"])("br",null,null,-1),Mt=Object(i["createElementVNode"])("br",null,null,-1),Tt=Object(i["createElementVNode"])("br",null,null,-1),wt=Object(i["createElementVNode"])("br",null,null,-1),Pt={id:"timezoneHelp",class:"inline-help-node"},Ct={key:0},kt=Object(i["createElementVNode"])("br",null,null,-1),Dt=Object(i["createElementVNode"])("br",null,null,-1),_t={id:"keepURLFragmentsHelp",class:"inline-help-node"},Gt=["innerHTML"],At={class:"alert alert-info"};function Lt(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("ExcludeQueryParameterSettings"),c=Object(i["resolveComponent"])("SaveButton"),u=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",pt,[Object(i["withDirectives"])(Object(i["createVNode"])(u,{"content-title":e.translate("SitesManager_GlobalWebsitesSettings")},{default:Object(i["withCtx"])((function(){return[gt,Object(i["createElementVNode"])("div",ft,[Object(i["createElementVNode"])("div",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_HelpExcludedIpAddresses","1.2.3.4/24","1.2.3.*","1.2.*.*"))+" ",1),St,Ot,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.yourCurrentIpAddressIs)},null,8,jt)])]),Object(i["createElementVNode"])("div",yt,[Object(i["createElementVNode"])("div",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_GlobalExcludedUserAgentHelp1"))+" ",1),vt,Et,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_GlobalListExcludedUserAgents_Desc"))+" "+Object(i["toDisplayString"])(e.translate("SitesManager_GlobalExcludedUserAgentHelp2"))+" "+Object(i["toDisplayString"])(e.translate("SitesManager_GlobalExcludedUserAgentHelp3","/bot|spider|crawl|scanner/i")),1)])]),Object(i["createElementVNode"])("div",xt,[Object(i["createElementVNode"])("div",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedReferrersHelp"))+" ",1),Nt,Vt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedReferrersHelpDetails"))+" ",1),Mt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedReferrersHelpExamples","www.example.org","http://example.org/mypath","https://www.example.org/?param=1","https://sub.example.org/"))+" ",1),Tt,wt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_ExcludedReferrersHelpSubDomains",".sub.example.org","http://sub.example.org/mypath","https://new.sub.example.org/")),1)])]),Object(i["createElementVNode"])("div",Pt,[Object(i["createElementVNode"])("div",null,[e.timezoneSupportEnabled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ct,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_AdvancedTimezoneSupportNotFound"))+" ",1),kt])),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_UTCTimeIs",e.utcTimeDate))+" ",1),Dt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_ChangingYourTimezoneWillOnlyAffectDataForward")),1)])]),Object(i["createElementVNode"])("div",_t,[Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(e.keepUrlFragmentHelp)},null,8,Gt),Object(i["createElementVNode"])("div",null,Object(i["toDisplayString"])(e.translate("SitesManager_KeepURLFragmentsHelp2")),1)]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"textarea",name:"excludedIpsGlobal","var-type":"array",modelValue:e.excludedIpsGlobal,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.excludedIpsGlobal=t}),title:e.translate("SitesManager_ListOfIpsToBeExcludedOnAllWebsites"),introduction:e.translate("SitesManager_GlobalListExcludedIps"),"inline-help":"#excludedIpsGlobalHelp",disabled:e.isLoading},null,8,["modelValue","title","introduction","disabled"])]),Object(i["createVNode"])(s,{exclusionTypeForQueryParams:e.exclusionTypeForQueryParams,"onUpdate:exclusionTypeForQueryParams":t[1]||(t[1]=function(t){return e.exclusionTypeForQueryParams=t}),excludedQueryParametersGlobal:e.excludedQueryParametersGlobal,"onUpdate:excludedQueryParametersGlobal":t[2]||(t[2]=function(t){return e.excludedQueryParametersGlobal=t}),commonSensitiveQueryParams:e.commonSensitiveQueryParams},null,8,["exclusionTypeForQueryParams","excludedQueryParametersGlobal","commonSensitiveQueryParams"]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"textarea",name:"excludedUserAgentsGlobal","var-type":"array",modelValue:e.excludedUserAgentsGlobal,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.excludedUserAgentsGlobal=t}),title:e.translate("SitesManager_GlobalListExcludedUserAgents_Desc"),introduction:e.translate("SitesManager_GlobalListExcludedUserAgents"),"inline-help":"#excludedUserAgentsGlobalHelp",disabled:e.isLoading},null,8,["modelValue","title","introduction","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"textarea",name:"excludedReferrersGlobal","var-type":"array",modelValue:e.excludedReferrersGlobal,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.excludedReferrersGlobal=t}),title:e.translate("SitesManager_GlobalListExcludedReferrersDesc"),introduction:e.translate("SitesManager_GlobalListExcludedReferrers"),"inline-help":"#excludedReferrersGlobalHelp",disabled:e.isLoading},null,8,["modelValue","title","introduction","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"keepURLFragmentsGlobal",modelValue:e.keepURLFragmentsGlobal,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.keepURLFragmentsGlobal=t}),title:e.translate("SitesManager_KeepURLFragmentsLong"),introduction:e.translate("SitesManager_KeepURLFragments"),"inline-help":"#keepURLFragmentsHelp",disabled:e.isLoading},null,8,["modelValue","title","introduction","disabled"])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("SitesManager_TrackingSiteSearch")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteSearchUse")),1),Object(i["createElementVNode"])("div",At,Object(i["toDisplayString"])(e.translate("SitesManager_SearchParametersNote"))+" "+Object(i["toDisplayString"])(e.translate("SitesManager_SearchParametersNote2")),1),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"text",name:"searchKeywordParametersGlobal","var-type":"array",modelValue:e.searchKeywordParametersGlobal,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.searchKeywordParametersGlobal=t}),title:e.translate("SitesManager_SearchKeywordLabel"),"inline-help":e.translate("SitesManager_SearchKeywordParametersDesc"),disabled:e.isLoading},null,8,["modelValue","title","inline-help","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"text",name:"searchCategoryParametersGlobal","var-type":"array",modelValue:e.searchCategoryParametersGlobal,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.searchCategoryParametersGlobal=t}),title:e.translate("SitesManager_SearchCategoryLabel"),"inline-help":e.searchCategoryParamsInlineHelp,disabled:e.isLoading},null,8,["modelValue","title","inline-help","disabled"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"select",name:"defaultTimezone",options:e.timezoneOptions,title:e.translate("SitesManager_SelectDefaultTimezone"),introduction:e.translate("SitesManager_DefaultTimezoneForNewWebsites"),"inline-help":"#timezoneHelp",disabled:e.isLoading,modelValue:e.defaultTimezone,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.defaultTimezone=t})},null,8,["options","title","introduction","disabled","modelValue"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"select",name:"defaultCurrency",modelValue:e.defaultCurrency,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.defaultCurrency=t}),options:e.currencies,title:e.translate("SitesManager_SelectDefaultCurrency"),introduction:e.translate("SitesManager_DefaultCurrencyForNewWebsites"),"inline-help":e.translate("SitesManager_CurrencySymbolWillBeUsedForGoals"),disabled:e.isLoading},null,8,["modelValue","options","title","introduction","inline-help","disabled"])]),Object(i["createVNode"])(c,{saving:e.isSaving,onConfirm:t[10]||(t[10]=function(t){return e.saveGlobalSettings()})},null,8,["saving"])]})),_:1},8,["content-title"]),[[i["vShow"],e.hasSuperUserAccess]])])}var Ut={class:"siteManagerGlobalExcludedUrlParameters"},It={id:"excludedQueryParametersGlobalHelp",class:"inline-help-node"},Bt={id:"excludedQueryParametersGlobalExclusionTypeHelp",class:"inline-help-node"},zt=Object(i["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),Ht=Object(i["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),Qt={key:0},Ft=Object(i["createElementVNode"])("br",null,null,-1),Rt=Object(i["createElementVNode"])("br",null,null,-1),Wt=Object(i["createElementVNode"])("br",null,null,-1),$t=Object(i["createElementVNode"])("br",null,null,-1),Kt=["value"];function qt(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ut,[Object(i["createElementVNode"])("div",It,[Object(i["createElementVNode"])("div",null,Object(i["toDisplayString"])(e.translate("SitesManager_ListOfQueryParametersToExclude","/^sess.*|.*[dD]ate$/")),1)]),Object(i["createElementVNode"])("div",Bt,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,Object(i["toDisplayString"])(e.translate("SitesManager_ExclusionTypeDescriptionCommonSessionParameters")),513),[[i["vShow"],"common_session_parameters"===e.localExclusionTypeForQueryParams]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("SitesManager_ExclusionTypeDescriptionMatomoRecommendedPII")),1),Object(i["createElementVNode"])("div",null,[e.showListOfCommonExclusions?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(i["withModifiers"])((function(t){return e.showListOfCommonExclusions=!0}),["prevent"]))},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_ExclusionViewListLink"))+" ",1),zt])),e.showListOfCommonExclusions?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(i["withModifiers"])((function(t){return e.showListOfCommonExclusions=!1}),["prevent"]))},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_ExclusionViewListLink"))+" ",1),Ht])):Object(i["createCommentVNode"])("",!0)]),e.showListOfCommonExclusions?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Qt,Object(i["toDisplayString"])(e.commonSensitiveQueryParams.join(", ")),1)):Object(i["createCommentVNode"])("",!0),Ft,Rt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_MatomoWillAutomaticallyExcludeCommonSessionParametersInAddition","phpsessid, sessionid, ...")),1)],512),[[i["vShow"],"matomo_recommended_pii"===e.localExclusionTypeForQueryParams]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("SitesManager_ExclusionTypeDescriptionCustom"))+" ",1),Wt,$t,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_MatomoWillAutomaticallyExcludeCommonSessionParametersInAddition","phpsessid, sessionid, ...")),1)],512),[[i["vShow"],"custom"===e.localExclusionTypeForQueryParams]])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"radio",name:"exclusionType",introduction:e.translate("SitesManager_GlobalListExcludedQueryParameters"),options:e.exclusionTypeOptions,modelValue:e.localExclusionTypeForQueryParams,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.localExclusionTypeForQueryParams=t}),"inline-help":"#excludedQueryParametersGlobalExclusionTypeHelp"},null,8,["introduction","options","modelValue"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"textarea",name:"excludedQueryParametersGlobal","var-type":"array",class:"limited-height-scrolling-textarea",modelValue:e.localExcludedQueryParametersGlobal,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.localExcludedQueryParametersGlobal=t}),"model-value":e.localExcludedQueryParametersGlobal.join("\n"),onInput:t[4]||(t[4]=function(t){return e.onInputExcludedQueryParametersGlobal(t.target.value)}),title:e.translate("SitesManager_ListOfQueryParametersToBeExcludedOnAllWebsites"),"inline-help":"#excludedQueryParametersGlobalHelp"},null,8,["modelValue","model-value","title"]),Object(i["createElementVNode"])("input",{type:"button",onClick:t[5]||(t[5]=function(t){return e.addCommonPIIQueryParams()}),class:"btn",value:e.translate("SitesManager_AddSensibleExclusionsToMyCustomListButtonText")},null,8,Kt)],512),[[i["vShow"],"custom"===e.localExclusionTypeForQueryParams]])])}var Yt=Object(i["defineComponent"])({components:{Field:Ye["Field"]},props:{exclusionTypeForQueryParams:{type:String,default:"common_session_parameters"},excludedQueryParametersGlobal:{type:Array,default:function(){return[]}},commonSensitiveQueryParams:{type:Array,default:function(){return[]}}},data:function(){return{localExclusionTypeForQueryParams:this.exclusionTypeForQueryParams,localExcludedQueryParametersGlobal:this.excludedQueryParametersGlobal,exclusionTypeOptions:[{value:Object(o["translate"])("SitesManager_ExclusionTypeOptionCommonSessionParameters"),key:"common_session_parameters"},{value:Object(o["translate"])("SitesManager_ExclusionTypeOptionMatomoRecommendedPII"),key:"matomo_recommended_pii"},{value:Object(o["translate"])("SitesManager_ExclusionTypeOptionCustom"),key:"custom"}],showListOfCommonExclusions:!1}},watch:{exclusionTypeForQueryParams:{handler:function(e){this.localExclusionTypeForQueryParams=e}},localExclusionTypeForQueryParams:{handler:function(e){this.updateExclusionType(e)},immediate:!0},excludedQueryParametersGlobal:{handler:function(e){this.localExcludedQueryParametersGlobal=e}}},methods:{updateExclusionType:function(e){"custom"!==e&&(this.localExcludedQueryParametersGlobal=[],this.onInputExcludedQueryParametersGlobal("")),this.$emit("update:exclusionTypeForQueryParams",e)},onInputExcludedQueryParametersGlobal:function(e){var t=e.split("\n");this.$emit("update:excludedQueryParametersGlobal",t)},addCommonPIIQueryParams:function(){var e=this,t=this.localExcludedQueryParametersGlobal.filter((function(t){return!e.commonSensitiveQueryParams.includes(t)}));t=t.concat(this.commonSensitiveQueryParams),this.localExcludedQueryParametersGlobal=t,this.$emit("update:excludedQueryParametersGlobal",t)}}});Yt.render=qt;var Xt=Yt,Jt=Object(i["defineComponent"])({components:{ExcludeQueryParameterSettings:Xt,ContentBlock:o["ContentBlock"],Field:Ye["Field"],SaveButton:Ye["SaveButton"]},props:{commonSensitiveQueryParams:{type:Array,default:function(){return[]}}},data:function(){var e=new Date,t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()),n=mt.globalSettings.value;return{currentIpAddress:null,utcTime:t,keepURLFragmentsGlobal:n.keepURLFragmentsGlobal,defaultTimezone:n.defaultTimezone,defaultCurrency:n.defaultCurrency,excludedIpsGlobal:(n.excludedIpsGlobal||"").split(","),excludedQueryParametersGlobal:(n.excludedQueryParametersGlobal||"").split(","),excludedUserAgentsGlobal:(n.excludedUserAgentsGlobal||"").split(","),excludedReferrersGlobal:(n.excludedReferrersGlobal||"").split(","),searchKeywordParametersGlobal:(n.searchKeywordParametersGlobal||"").split(","),searchCategoryParametersGlobal:(n.searchCategoryParametersGlobal||"").split(","),isSaving:!1,exclusionTypeForQueryParams:n.exclusionTypeForQueryParams}},created:function(){var e=this;j.init(),k.init(),mt.init(),Object(i["watch"])((function(){return mt.globalSettings.value}),(function(t){e.keepURLFragmentsGlobal=t.keepURLFragmentsGlobal,e.defaultTimezone=t.defaultTimezone,e.defaultCurrency=t.defaultCurrency,e.excludedIpsGlobal=(t.excludedIpsGlobal||"").split(","),e.excludedQueryParametersGlobal=(t.excludedQueryParametersGlobal||"").split(","),e.excludedUserAgentsGlobal=(t.excludedUserAgentsGlobal||"").split(","),e.excludedReferrersGlobal=(t.excludedReferrersGlobal||"").split(","),e.searchKeywordParametersGlobal=(t.searchKeywordParametersGlobal||"").split(","),e.searchCategoryParametersGlobal=(t.searchCategoryParametersGlobal||"").split(","),e.exclusionTypeForQueryParams=t.exclusionTypeForQueryParams})),o["AjaxHelper"].fetch({method:"API.getIpFromHeader"}).then((function(t){e.currentIpAddress=t.value}))},methods:{saveGlobalSettings:function(){var e=this;this.isSaving=!0,mt.saveGlobalSettings({keepURLFragments:this.keepURLFragmentsGlobal,currency:this.defaultCurrency,timezone:this.defaultTimezone,excludedIps:this.excludedIpsGlobal.join(","),excludedQueryParameters:this.excludedQueryParametersGlobal.join(","),excludedUserAgents:this.excludedUserAgentsGlobal.join(","),excludedReferrers:this.excludedReferrersGlobal.join(","),searchKeywordParameters:this.searchKeywordParametersGlobal.join(","),searchCategoryParameters:this.searchCategoryParametersGlobal.join(","),exclusionTypeForQueryParams:this.exclusionTypeForQueryParams}).then((function(){o["Matomo"].helper.redirect({showaddsite:!1})})).finally((function(){e.isSaving=!1}))}},computed:{isLoading:function(){return mt.isLoading.value||k.isLoading.value||j.isLoading.value},timezones:function(){return k.timezones.value},timezoneOptions:function(){return this.timezones.map((function(e){var t=e.group,n=e.label,a=e.code;return{group:t,key:n,value:a}}))},currencies:function(){return j.currencies.value},hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},yourCurrentIpAddressIs:function(){return Object(o["translate"])("SitesManager_YourCurrentIpAddressIs","<i>".concat(this.currentIpAddress,"</i>"))},timezoneSupportEnabled:function(){return k.timezoneSupportEnabled.value},utcTimeDate:function(){var e=this.utcTime,t=function(e){return e.toString().padStart(2,"0")},n=t(e.getHours()),a=t(e.getMinutes()),r=t(e.getSeconds());return"".concat(Object(o["format"])(this.utcTime)," ").concat(n,":").concat(a,":").concat(r)},keepUrlFragmentHelp:function(){return Object(o["translate"])("SitesManager_KeepURLFragmentsHelp","<em>#</em>","<em>example.org/index.html#first_section</em>","<em>example.org/index.html</em>")},searchCategoryParamsInlineHelp:function(){var e=[Object(o["translate"])("Goals_Optional"),Object(o["translate"])("SitesManager_SearchCategoryDesc"),Object(o["translate"])("SitesManager_SearchCategoryParametersDesc")];return e.join(" ")}}});Jt.render=Lt;var Zt=Jt,en=Object(i["createElementVNode"])("span",{class:"icon-chevron-left"},null,-1),tn={id:"start-tracking-data-header"},nn={key:0,class:"row",id:"start-tracking-detection"},an=["src","alt"],rn=["href"],on={class:"row",id:"start-tracking-method-list"},ln=Object(i["createElementVNode"])("span",{class:"icon-search"},null,-1),sn=["href","onClick"],cn=["src"],un={class:"list-entry-text"},dn={id:"start-tracking-skip"},mn=["href"],bn=["data-method"],hn=["src","alt"];function pn(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("VueEntryContainer"),s=Object(i["resolveComponent"])("ActivityIndicator");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[e.showMethodDetails?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,id:"start-tracking-back",onClick:t[0]||(t[0]=Object(i["withModifiers"])((function(t){e.showOverview()}),["prevent"]))},[en,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Mobile_NavigationBack")),1)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("h1",tn,Object(i["toDisplayString"])(e.headline),1),Object(i["createVNode"])(l,{id:"start-tracking-cta",html:e.ctaContent},null,8,["html"]),Object(i["createVNode"])(s,{"loading-message":"".concat(e.translate("SitesManager_DetectingYourSite"),"…"),loading:e.loading},null,8,["loading-message","loading"]),e.loading||e.showMethodDetails?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[e.recommendedMethod?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",nn,[Object(i["createElementVNode"])("img",{src:e.recommendedMethod.icon,alt:"".concat(e.recommendedMethod.name," logo")},null,8,an),Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.recommendedMethod.recommendationTitle),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.recommendedMethod.recommendationText),1),Object(i["createElementVNode"])("a",{href:"#".concat(e.recommendedMethod.id.toLowerCase()),class:"btn",id:"showMethod",onClick:t[1]||(t[1]=Object(i["withModifiers"])((function(t){return e.showMethod(e.recommendedMethod.id)}),["prevent"]))},Object(i["toDisplayString"])(e.recommendedMethod.recommendationButton),9,rn)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",on,[ln,Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataOtherInstallMethods")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataOtherInstallMethodsIntro")),1),Object(i["createElementVNode"])("ul",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.trackingMethods,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:"list-entry",key:t.id},[Object(i["createElementVNode"])("a",{href:"#".concat(t.id.toLowerCase()),onClick:Object(i["withModifiers"])((function(n){return e.showMethod(t.id)}),["prevent"])},[t.icon?(Object(i["openBlock"])(),Object(i["createElementBlock"])("img",{key:0,src:t.icon,class:"list-entry-icon"},null,8,cn)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",un,Object(i["toDisplayString"])(t.name),1)],8,sn)])})),128))])]),Object(i["createElementVNode"])("div",dn,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataNotYetReady")),1),Object(i["createElementVNode"])("div",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataTemporarilyHidePage")),1),Object(i["createElementVNode"])("a",{href:e.ignoreSitesWithoutDataLink,class:"ignoreSitesWithoutData"},Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataHidePageForHour")),9,mn)])],64)),e.showMethodDetails?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:2,id:"start-tracking-details","data-method":e.showMethodDetails.id},[Object(i["createElementVNode"])("img",{src:e.showMethodDetails.icon,alt:"".concat(e.showMethodDetails.name," logo")},null,8,hn),Object(i["createVNode"])(l,{html:e.showMethodDetails.content},null,8,["html"])],8,bn)):Object(i["createCommentVNode"])("",!0)])}function gn(e,t){return yn(e)||jn(e,t)||Sn(e,t)||fn()}function fn(){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 Sn(e,t){if(e){if("string"===typeof e)return On(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)?On(e,t):void 0}}function On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function jn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(i.push(a.value),t&&i.length===t)break}catch(s){l=!0,r=s}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw r}}return i}}function yn(e){if(Array.isArray(e))return e}var vn=Object(i["defineComponent"])({props:{ctaContent:String},components:{ActivityIndicator:o["ActivityIndicator"],VueEntryContainer:o["VueEntryContainer"]},data:function(){return{loading:!0,updateCheckInterval:1e3,currentInterval:1e3,maxInterval:3e4,showMethodDetails:null,recommendedMethod:null,trackingMethods:[]}},created:function(){var e=this,t={module:"SitesManager",action:"getTrackingMethodsForSite"};o["AjaxHelper"].fetch(t).then((function(t){e.trackingMethods=t.trackingMethods,e.recommendedMethod=t.recommendedMethod,e.loading=!1,Object(i["watch"])((function(){return o["MatomoUrl"].hashParsed.value.activeTab}),(function(t){e.showMethodDetails=e.findTrackingMethod(t)})),o["MatomoUrl"].hashParsed.value.activeTab&&(e.showMethodDetails=e.findTrackingMethod(o["MatomoUrl"].hashParsed.value.activeTab)),e.checkIfSiteHasData()}))},methods:{findTrackingMethod:function(e){if(this.recommendedMethod&&e&&this.recommendedMethod.id.toLowerCase()===e.toLowerCase())return this.recommendedMethod;var t=null;return Object.entries(this.trackingMethods).forEach((function(n){var a=gn(n,2),r=a[1];e&&r.id.toLowerCase()===e.toLowerCase()&&(t=r)})),t},showMethod:function(e){o["MatomoUrl"].updateHash(Object.assign(Object.assign({},o["MatomoUrl"].hashParsed.value),{},{activeTab:e.toLowerCase()}))},showOverview:function(){o["MatomoUrl"].updateHash(Object.assign(Object.assign({},o["MatomoUrl"].hashParsed.value),{},{activeTab:null}))},checkIfSiteHasData:function(){var e=this,t={method:"Live.getMostRecentVisitsDateTime",date:"today",period:"day",idSite:o["Matomo"].idSite},n={createErrorNotification:!1};o["AjaxHelper"].fetch(t,n).then((function(t){t&&""!==t.value?window.broadcast.propagateNewPage("date=today"):(window.setTimeout(e.checkIfSiteHasData,e.currentInterval),e.currentInterval=Math.min(e.currentInterval+e.updateCheckInterval,e.maxInterval))})).catch((function(){}))}},computed:{ignoreSitesWithoutDataLink:function(){return"?".concat(o["MatomoUrl"].stringify(Object.assign(Object.assign({},o["MatomoUrl"].urlParsed.value),{},{module:"SitesManager",action:"ignoreNoDataMessage"})))},headline:function(){return this.showMethodDetails&&this.showMethodDetails.name?99===this.showMethodDetails.type?this.showMethodDetails.name:Object(o["translate"])("SitesManager_SiteWithoutDataInstallWithX",this.showMethodDetails.name):Object(o["translate"])("SitesManager_SiteWithoutDataChooseTrackingMethod")}}});vn.render=pn;var En=vn;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(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["Installation"]=t(require("CoreHome"),require("vue")):e["Installation"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Installation/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,"SystemCheckPage",(function(){return W})),n.d(t,"SystemCheck",(function(){return pe})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var l=n("8bbf"),a={key:0,class:"alert alert-danger"},c=["innerHTML"],i={key:1,class:"alert alert-warning"},s={key:2,class:"alert alert-success"};function p(e,t,n,r,o,p){var u=Object(l["resolveComponent"])("SystemCheckSection"),m=Object(l["resolveComponent"])("ContentBlock");return Object(l["openBlock"])(),Object(l["createBlock"])(m,{"content-title":e.translate("Installation_SystemCheck"),feature:"true"},{default:Object(l["withCtx"])((function(){return[e.hasErrors?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",a,[Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.thereWereErrorsText)},null,8,c),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("Installation_SeeBelowForMoreInfo")),1)])):e.hasWarnings?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",i,Object(l["toDisplayString"])(e.translate("Installation_SystemCheckSummaryThereWereWarnings"))+" "+Object(l["toDisplayString"])(e.translate("Installation_SeeBelowForMoreInfo")),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",s,Object(l["toDisplayString"])(e.translate("Installation_SystemCheckSummaryNoProblems")),1)),Object(l["createVNode"])(u,{"error-type":e.errorType,"warning-type":e.warningType,"informational-type":e.informationalType,"system-check-info":e.systemCheckInfo,"mandatory-results":e.mandatoryResults,"optional-results":e.optionalResults,"informational-results":e.informationalResults,"is-installation":e.isInstallation},null,8,["error-type","warning-type","informational-type","system-check-info","mandatory-results","optional-results","informational-results","is-installation"])]})),_:1},8,["content-title"])}var u=n("19dc"),m=Object(l["createElementVNode"])("br",null,null,-1),y=Object(l["createTextVNode"])(),d=Object(l["createElementVNode"])("br",null,null,-1),b=["innerHTML"],f={class:"entityTable system-check",id:"systemCheckRequired"},j={class:"entityTable system-check",id:"systemCheckOptional"},O={class:"entityTable system-check",id:"systemCheckInformational"};function g(e,t,n,r,o,a){var c=Object(l["resolveComponent"])("DiagnosticTable"),i=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("p",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("Installation_CopyBelowInfoForSupport"))+" ",1),m,y,d,Object(l["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(l["withModifiers"])((function(t){return e.copyInfo()}),["prevent"])),class:"btn",style:{"margin-right":"3.5px"}},Object(l["toDisplayString"])(e.translate("Installation_CopySystemCheck")),1),Object(l["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(l["withModifiers"])((function(t){return e.downloadInfo()}),["prevent"])),class:"btn"},Object(l["toDisplayString"])(e.translate("Installation_DownloadSystemCheck")),1)]),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("textarea",{style:{width:"100%",height:"200px"},readonly:"",id:"matomo_system_check_info",ref:"systemCheckInfo",innerHTML:e.$sanitize(e.systemCheckInfo)},null,8,b),Object(l["withDirectives"])(Object(l["createElementVNode"])("table",f,[Object(l["createElementVNode"])("tbody",null,[Object(l["createVNode"])(c,{results:e.mandatoryResults,"informational-type":e.informationalType,"warning-type":e.warningType,"error-type":e.errorType},null,8,["results","informational-type","warning-type","error-type"])])],512),[[i,{off:e.isInstallation}]]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("Installation_Optional")),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("table",j,[Object(l["createElementVNode"])("tbody",null,[Object(l["createVNode"])(c,{results:e.optionalResults,"informational-type":e.informationalType,"warning-type":e.warningType,"error-type":e.errorType},null,8,["results","informational-type","warning-type","error-type"])])],512),[[i,{off:e.isInstallation}]]),Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("Installation_InformationalResults")),1),Object(l["withDirectives"])(Object(l["createElementVNode"])("table",O,[Object(l["createElementVNode"])("tbody",null,[Object(l["createVNode"])(c,{results:e.informationalResults,"informational-type":e.informationalType,"warning-type":e.warningType,"error-type":e.errorType},null,8,["results","informational-type","warning-type","error-type"])])],512),[[i,{off:e.isInstallation}]])])],64)}var k=["innerHTML"],h={key:0},S=Object(l["createElementVNode"])("span",{class:"icon-error"},null,-1),E=["innerHTML"],N={key:1},C=Object(l["createElementVNode"])("span",{class:"icon-warning"},null,-1),T=["innerHTML"],V={key:2},v=Object(l["createElementVNode"])("span",{class:"icon-info"},null,-1),w=["innerHTML"],B={key:3},I=Object(l["createElementVNode"])("span",{class:"icon-ok"},null,-1),q=["innerHTML"],x=Object(l["createElementVNode"])("br",null,null,-1),_={key:0},M=["innerHTML"];function D(e,t,n,r,o,a){var c=Object(l["resolveComponent"])("Passthrough");return Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.results,(function(t,n){return Object(l["openBlock"])(),Object(l["createBlock"])(c,{key:n},{default:Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("td",{innerHTML:e.$sanitize(t.label)},null,8,k),Object(l["createElementVNode"])("td",null,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.items,(function(t,n){return Object(l["openBlock"])(),Object(l["createElementBlock"])("span",{key:n},["error"===t.status?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",h,[S,Object(l["createElementVNode"])("span",{class:"err",innerHTML:e.$sanitize("string"!==typeof t.comment?"":t.comment)},null,8,E)])):"warning"===t.status?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",N,[C,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize("string"!==typeof t.comment?"":t.comment)},null,8,T)])):"informational"===t.status?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",V,[v,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize("string"!==typeof t.comment?"":t.comment)},null,8,w)])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",B,[I,Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize("string"!==typeof t.comment?"":t.comment)},null,8,q)])),x])})),128))])]),t.longErrorMessage?(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",_,[Object(l["createElementVNode"])("td",{colspan:"2",class:"error",style:{"font-size":"small"},innerHTML:e.$sanitize(t.longErrorMessage)},null,8,M)])):Object(l["createCommentVNode"])("",!0)]})),_:2},1024)})),128)}var L=Object(l["defineComponent"])({props:{errorType:{type:String,required:!0},warningType:{type:String,required:!0},informationalType:{type:String,required:!0},results:{type:Array,required:!0}},components:{Passthrough:u["Passthrough"]}});L.render=D;var R=L,H=window,$=H.$,P=Object(l["defineComponent"])({props:{errorType:{type:String,required:!0},warningType:{type:String,required:!0},informationalType:{type:String,required:!0},systemCheckInfo:{type:String,required:!0},mandatoryResults:{type:Array,required:!0},optionalResults:{type:Array,required:!0},informationalResults:{type:Array,required:!0},isInstallation:Boolean},components:{DiagnosticTable:R},directives:{ContentTable:u["ContentTable"]},methods:{copyInfo:function(){var e=this.$refs.systemCheckInfo;e.select(),document.execCommand("copy"),$(e).effect("highlight",{},600)},downloadInfo:function(){var e=this.$refs.systemCheckInfo;u["Matomo"].helper.sendContentAsDownload("matomo_system_check.txt",e.innerHTML)}}});P.render=g;var A=P,z=Object(l["defineComponent"])({props:{errorType:{type:String,required:!0},warningType:{type:String,required:!0},informationalType:{type:String,required:!0},systemCheckInfo:{type:String,required:!0},mandatoryResults:{type:Array,required:!0},optionalResults:{type:Array,required:!0},informationalResults:{type:Array,required:!0},isInstallation:Boolean,hasErrors:Boolean,hasWarnings:Boolean},components:{ContentBlock:u["ContentBlock"],SystemCheckSection:A},computed:{thereWereErrorsText:function(){return Object(u["translate"])("Installation_SystemCheckSummaryThereWereErrors","<strong>","</strong>","<strong>","</strong>")}}});z.render=p;var W=z,F={key:0},G=Object(l["createElementVNode"])("br",{style:{clear:"both"}},null,-1),U={key:1},J={key:0},K=Object(l["createElementVNode"])("span",{class:"icon-export"},null,-1),Q=["href"];function X(e,t,n,r,o,a){var c=Object(l["resolveComponent"])("SystemCheckLegend"),i=Object(l["resolveComponent"])("SystemCheckSection");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",null,[e.showNextStep?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",F,[Object(l["createVNode"])(c,{url:e.systemCheckLegendUrl},null,8,["url"]),G])),Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("Installation_SystemCheck")),1),Object(l["createVNode"])(i,{"error-type":e.errorType,"warning-type":e.warningType,"informational-type":e.informationalType,"system-check-info":e.systemCheckInfo,"mandatory-results":e.mandatoryResults,"optional-results":e.optionalResults,"informational-results":e.informationalResults,"is-installation":e.isInstallation},null,8,["error-type","warning-type","informational-type","system-check-info","mandatory-results","optional-results","informational-results","is-installation"]),e.showNextStep?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",U,[e.showNextStep?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("p",J,[K,Object(l["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink("https://matomo.org/docs/requirements/")},Object(l["toDisplayString"])(e.translate("Installation_Requirements")),9,Q)])),Object(l["createVNode"])(c,{url:e.systemCheckLegendUrl},null,8,["url"])]))])}var Y={class:"system-check-legend"},Z=Object(l["createElementVNode"])("span",{class:"icon-ok"},null,-1),ee=Object(l["createElementVNode"])("span",{class:"icon-warning"},null,-1),te=Object(l["createElementVNode"])("span",{class:"icon-error"},null,-1),ne={class:"next-step"},re=["href"];function oe(e,t,n,r,o,a){return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("div",Y,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("Installation_Legend")),1),Object(l["createElementVNode"])("p",null,[Z,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Ok")),1)]),Object(l["createElementVNode"])("p",null,[ee,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Warning"))+": "+Object(l["toDisplayString"])(e.translate("Installation_SystemCheckWarning")),1)]),Object(l["createElementVNode"])("p",null,[te,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Error"))+": "+Object(l["toDisplayString"])(e.translate("Installation_SystemCheckError")),1)])]),Object(l["createElementVNode"])("p",ne,[Object(l["createElementVNode"])("a",{href:e.url},Object(l["toDisplayString"])(e.translate("General_RefreshPage"))+" »",9,re)])],64)}var le=Object(l["defineComponent"])({props:{url:{type:String,required:!0}}});le.render=oe;var ae=le,ce=window,ie=ce.$,se=Object(l["defineComponent"])({props:{showNextStep:Boolean,systemCheckLegendUrl:{type:String,required:!0},errorType:{type:String,required:!0},warningType:{type:String,required:!0},informationalType:{type:String,required:!0},systemCheckInfo:{type:String,required:!0},mandatoryResults:{type:Array,required:!0},optionalResults:{type:Array,required:!0},informationalResults:{type:Array,required:!0},isInstallation:Boolean},components:{SystemCheckSection:A,SystemCheckLegend:ae},mounted:function(){if("https:"===document.location.protocol){var e=ie("p.next-step a");e.attr("href","".concat(e.attr("href"),"&clientProtocol=https"))}}});se.render=X;var pe=se;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["ScheduledReports"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["ScheduledReports"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,r){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="plugins/ScheduledReports/vue/dist/",r(r.s="fae3")}({"19dc":function(t,r){t.exports=e},"8bbf":function(e,r){e.exports=t},a5a2:function(e,t){e.exports=r},fae3:function(e,t,r){"use strict";if(r.r(t),r.d(t,"ReportParameters",(function(){return d})),r.d(t,"ManageScheduledReport",(function(){return lt})),"undefined"!==typeof window){var o=window.document.currentScript,n=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(r.p=n[1])}var l=r("8bbf"),i={key:0};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function a(e,t,r,o,n,a){var c=Object(l["resolveComponent"])("Field");return e.report?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",i,[Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(c,{uicontrol:"checkbox",name:"report_email_me",introduction:e.translate("ScheduledReports_SendReportTo"),"model-value":e.report.emailMe,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change","emailMe",t)}),title:"".concat(e.translate("ScheduledReports_SentToMe")," (").concat(e.currentUserEmail,")")},null,8,["introduction","model-value","title"]),[[l["vShow"],"email"===e.report.type]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(c,{uicontrol:"textarea","var-type":"array","model-value":e.report.additionalEmails,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.$emit("change","additionalEmails",t)}),title:e.translate("ScheduledReports_AlsoSendReportToTheseEmails")},null,8,["model-value","title"]),[[l["vShow"],"email"===e.report.type]])])])):Object(l["createCommentVNode"])("",!0)}var c=r("a5a2"),p=Object(l["defineComponent"])({props:{report:{type:Object,required:!0},reportType:{type:String,required:!0},defaultDisplayFormat:{type:Number,required:!0},defaultEmailMe:{type:Boolean,required:!0},defaultEvolutionGraph:{type:Boolean,required:!0},currentUserEmail:{type:String,required:!0}},emits:["change"],components:{Field:c["Field"]},setup:function(e){var t=window,r=t.resetReportParametersFunctions,o=t.updateReportParametersFunctions,n=t.getReportParametersFunctions;r[e.reportType]||(r[e.reportType]=function(t){t.displayFormat=e.defaultDisplayFormat,t.emailMe=e.defaultEmailMe,t.evolutionGraph=e.defaultEvolutionGraph,t.additionalEmails=[]}),o[e.reportType]||(o[e.reportType]=function(e){null!==e&&void 0!==e&&e.parameters&&["displayFormat","emailMe","evolutionGraph","additionalEmails"].forEach((function(t){t in e.parameters&&(e[t]=e.parameters[t])}))}),n[e.reportType]||(n[e.reportType]=function(e){return{displayFormat:e.displayFormat,emailMe:e.emailMe,evolutionGraph:e.evolutionGraph,additionalEmails:e.additionalEmails||[]}})}});p.render=a;var d=p,s={class:"emailReports",ref:"root"},u={ref:"reportSentSuccess"},m={ref:"reportUpdatedSuccess"},b=Object(l["createElementVNode"])("div",{id:"ajaxError",style:{display:"none"}},null,-1),O={id:"ajaxLoadingDiv",style:{display:"none"}},y={class:"loadingPiwik"},j=["alt"],h={class:"loadingSegment"},f=Object(l["createElementVNode"])("a",{id:"bottom"},null,-1);function v(e,t,r,o,n,i){var a=Object(l["resolveComponent"])("ListReports"),c=Object(l["resolveComponent"])("AddReport");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",s,[Object(l["createElementVNode"])("div",u,null,512),Object(l["createElementVNode"])("div",m,null,512),Object(l["createElementVNode"])("div",null,[b,Object(l["createElementVNode"])("div",O,[Object(l["createElementVNode"])("div",y,[Object(l["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,j),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_LoadingData")),1)]),Object(l["createElementVNode"])("div",h,Object(l["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)]),Object(l["withDirectives"])(Object(l["createVNode"])(a,{"content-title":e.contentTitle,"user-login":e.userLogin,"login-module":e.loginModule,reports:e.reports,"site-name":e.decodedSiteName,"segment-editor-activated":e.segmentEditorActivated,"saved-segments-by-id":e.savedSegmentsById,periods:e.periods,"report-types":e.reportTypes,"download-output-type":e.downloadOutputType,language:e.language,"report-formats-by-report-type":e.reportFormatsByReportType,onCreate:t[0]||(t[0]=function(t){return e.createReport()}),onEdit:t[1]||(t[1]=function(t){return e.editReport(t)}),onDelete:t[2]||(t[2]=function(t){return e.deleteReport(t)}),onSendnow:t[3]||(t[3]=function(t){return e.sendReportNow(t)})},null,8,["content-title","user-login","login-module","reports","site-name","segment-editor-activated","saved-segments-by-id","periods","report-types","download-output-type","language","report-formats-by-report-type"]),[[l["vShow"],e.showReportsList]]),e.showReportForm?(Object(l["openBlock"])(),Object(l["createBlock"])(c,{key:0,report:e.report,periods:e.periods,"param-periods":e.paramPeriods,"report-type-options":e.reportTypeOptions,"report-formats-by-report-type-options":e.reportFormatsByReportTypeOptions,"display-formats":e.displayFormats,"reports-by-category-by-report-type":e.reportsByCategoryByReportType,"allow-multiple-reports-by-report-type":e.allowMultipleReportsByReportType,"count-websites":e.countWebsites,"site-name":e.decodedSiteName,"selected-reports":e.selectedReports,"report-types":e.reportTypes,"segment-editor-activated":e.segmentEditorActivated,"saved-segments-by-id":e.savedSegmentsById,onToggleSelectedReport:t[4]||(t[4]=function(t){return e.toggleSelectedReport(t.reportType,t.uniqueId)}),onChange:t[5]||(t[5]=function(t){return e.onChangeProperty(t.prop,t.value)}),onSubmit:t[6]||(t[6]=function(t){return e.submitReport()})},{"report-parameters":Object(l["withCtx"])((function(){return[Object(l["renderSlot"])(e.$slots,"report-parameters")]})),_:3},8,["report","periods","param-periods","report-type-options","report-formats-by-report-type-options","display-formats","reports-by-category-by-report-type","allow-multiple-reports-by-report-type","count-websites","site-name","selected-reports","report-types","segment-editor-activated","saved-segments-by-id"])):Object(l["createCommentVNode"])("",!0),f])],512)}var g=r("19dc"),S=Object(l["createElementVNode"])("div",{class:"clear"},null,-1),R={key:0},E=["innerHTML"],N={id:"emailScheduleInlineHelp",class:"inline-help-node"},V=Object(l["createElementVNode"])("br",null,null,-1),k={id:"emailReportPeriodInlineHelp",class:"inline-help-node"},w=Object(l["createElementVNode"])("br",null,null,-1),_=Object(l["createElementVNode"])("br",null,null,-1),B={key:0,id:"reportHourHelpText",class:"inline-help-node"},T=["textContent"],C={ref:"reportParameters"},P={class:"email"},F={class:"report_evolution_graph"},D={class:"row evolution-graph-period"},x={class:"col s12"},q={for:"report_evolution_period_for_each"},M=["checked"],I=["innerHTML"],A={class:"col s12"},L={for:"report_evolution_period_for_prev"},H=["checked"],G=["value"],U={class:"row"},z={class:"col s12"},W={class:"reportCategory"},Z={class:"listReports"},K=["name","type","id","checked","onChange"],X={key:0,class:"entityInlineHelp"},J=Object(l["createElementVNode"])("br",null,null,-1),Q=["innerHTML"];function Y(e,t,r,o,n,i){var a=Object(l["resolveComponent"])("Field"),c=Object(l["resolveComponent"])("SaveButton"),p=Object(l["resolveComponent"])("ContentBlock"),d=Object(l["resolveDirective"])("form");return Object(l["openBlock"])(),Object(l["createBlock"])(p,{class:"entityAddContainer","content-title":e.contentTitle},{default:Object(l["withCtx"])((function(){return[S,Object(l["withDirectives"])(Object(l["createElementVNode"])("form",{id:"addEditReport",onSubmit:t[13]||(t[13]=function(t){return e.$emit("submit")})},[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{uicontrol:"text",name:"website",title:e.translate("General_Website"),disabled:!0,"model-value":e.siteName},null,8,["title","model-value"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{uicontrol:"textarea",name:"report_description",title:e.translate("General_Description"),"model-value":e.report.description,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change",{prop:"description",value:t})}),"inline-help":e.translate("ScheduledReports_DescriptionOnFirstPage")},null,8,["title","model-value","inline-help"])]),e.segmentEditorActivated?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",R,[Object(l["createVNode"])(a,{uicontrol:"select",name:"report_segment",title:e.translate("SegmentEditor_ChooseASegment"),"model-value":e.report.idsegment,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.$emit("change",{prop:"idsegment",value:t})}),options:e.savedSegmentsById},{"inline-help":Object(l["withCtx"])((function(){return[e.segmentEditorActivated?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:0,id:"reportSegmentInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.reportSegmentInlineHelp)},null,8,E)):Object(l["createCommentVNode"])("",!0)]})),_:1},8,["title","model-value","options"])])):Object(l["createCommentVNode"])("",!0),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{uicontrol:"select",name:"report_schedule","model-value":e.report.period,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.$emit("change",{prop:"period",value:t}),e.$emit("change",{prop:"periodParam",value:"never"===e.report.period?null:e.report.period})}),title:e.translate("ScheduledReports_EmailSchedule"),options:e.periods},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("div",N,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_WeeklyScheduleHelp"))+" ",1),V,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_MonthlyScheduleHelp")),1)])]})),_:1},8,["model-value","title","options"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{uicontrol:"select",name:"report_period","model-value":e.report.periodParam,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.$emit("change",{prop:"periodParam",value:t})}),options:e.paramPeriods,title:e.translate("ScheduledReports_ReportPeriod")},{"inline-help":Object(l["withCtx"])((function(){return[Object(l["createElementVNode"])("div",k,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportPeriodHelp"))+" ",1),w,_,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportPeriodHelp2")),1)])]})),_:1},8,["model-value","options","title"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{uicontrol:"select",name:"report_hour","model-value":e.report.hour,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.$emit("change",{prop:"hour",value:t})}),title:e.translate("ScheduledReports_ReportHour","X"),options:e.reportHours},{"inline-help":Object(l["withCtx"])((function(){return[0!==e.timezoneOffset&&"0"!==e.timezoneOffset?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",B,[Object(l["createElementVNode"])("span",{textContent:Object(l["toDisplayString"])(e.reportHourUtc)},null,8,T)])):Object(l["createCommentVNode"])("",!0)]})),_:1},8,["model-value","title","options"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(a,{uicontrol:"select",name:"report_type",disabled:1===e.reportTypes.length,"model-value":e.report.type,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.$emit("change",{prop:"type",value:t})}),title:e.translate("ScheduledReports_ReportType"),options:e.reportTypeOptions},null,8,["disabled","model-value","title","options"])]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.reportFormatsByReportTypeOptions,(function(t,r){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:r},[Object(l["withDirectives"])(Object(l["createVNode"])(a,{uicontrol:"select",name:"report_format",title:e.translate("ScheduledReports_ReportFormat"),class:Object(l["normalizeClass"])(r),"model-value":e.report["format".concat(r)],"onUpdate:modelValue":function(t){return e.$emit("change",{prop:"format".concat(r),value:t})},options:t},null,8,["title","class","model-value","onUpdate:modelValue","options"]),[[l["vShow"],e.report.type===r]])])})),128)),Object(l["createElementVNode"])("div",C,[Object(l["renderSlot"])(e.$slots,"report-parameters")],512),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("div",P,[Object(l["createVNode"])(a,{uicontrol:"select",name:"display_format","model-value":e.report.displayFormat,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.$emit("change",{prop:"displayFormat",value:t})}),options:e.displayFormats,introduction:e.translate("ScheduledReports_AggregateReportsFormat")},null,8,["model-value","options","introduction"])]),Object(l["createElementVNode"])("div",F,[Object(l["withDirectives"])(Object(l["createVNode"])(a,{uicontrol:"checkbox",name:"report_evolution_graph",title:e.translate("ScheduledReports_EvolutionGraph",5),"model-value":e.report.evolutionGraph,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.$emit("change",{prop:"evolutionGraph",value:t})})},null,8,["title","model-value"]),[[l["vShow"],-1!==[2,"2",3,"3"].indexOf(e.report.displayFormat)]])]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",D,[Object(l["createElementVNode"])("div",x,[Object(l["createElementVNode"])("label",q,[Object(l["createElementVNode"])("input",{id:"report_evolution_period_for_each",name:"report_evolution_period_for",type:"radio",value:"each",checked:"each"===e.report.evolutionPeriodFor,onChange:t[8]||(t[8]=function(t){return e.$emit("change",{prop:"evolutionPeriodFor",value:t.target.value})})},null,40,M),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(e.evolutionGraphsShowForEachInPeriod)},null,8,I)])]),Object(l["createElementVNode"])("div",A,[Object(l["createElementVNode"])("label",L,[Object(l["createElementVNode"])("input",{id:"report_evolution_period_for_prev",name:"report_evolution_period_for",type:"radio",value:"prev",checked:"prev"===e.report.evolutionPeriodFor,onChange:t[9]||(t[9]=function(t){return e.$emit("change",{prop:"evolutionPeriodFor",value:t.target.value})})},null,40,H),Object(l["createElementVNode"])("span",null,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("ScheduledReports_EvolutionGraphsShowForPreviousN",e.frequencyPeriodPlural))+": ",1),Object(l["createElementVNode"])("input",{type:"number",name:"report_evolution_period_n",value:e.report.evolutionPeriodN,onKeydown:t[10]||(t[10]=function(t){return e.onEvolutionPeriodN(t)}),onChange:t[11]||(t[11]=function(t){return e.onEvolutionPeriodN(t)})},null,40,G)])])])],512),[[l["vShow"],-1!==[1,"1",2,"2",3,"3"].indexOf(e.report.displayFormat)]])],512),[[l["vShow"],"email"===e.report.type&&"csv"!==e.report.formatemail&&"tsv"!==e.report.formatemail]]),Object(l["createElementVNode"])("div",U,[Object(l["createElementVNode"])("h3",z,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportsIncluded")),1)]),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.reportsByCategoryByReportTypeInColumns,(function(t,r){return Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{name:"reportsList",class:Object(l["normalizeClass"])("row ".concat(r)),key:r},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t,o){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{class:"col s12 m6",key:o},[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t,o){return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:o},[Object(l["createElementVNode"])("h3",W,Object(l["toDisplayString"])(o),1),Object(l["createElementVNode"])("ul",Z,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t,(function(t){var o;return Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{key:t.uniqueId},[Object(l["createElementVNode"])("label",null,[Object(l["createElementVNode"])("input",{name:"".concat(r,"Reports"),type:e.allowMultipleReportsByReportType[r]?"checkbox":"radio",id:"".concat(r).concat(t.uniqueId),checked:null===(o=e.selectedReports[r])||void 0===o?void 0:o[t.uniqueId],onChange:function(o){return e.$emit("toggleSelectedReport",{reportType:r,uniqueId:t.uniqueId})}},null,40,K),Object(l["createElementVNode"])("span",null,Object(l["toDisplayString"])(e.decode(t.name)),1),"MultiSites_getAll"===t.uniqueId?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",X,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportIncludeNWebsites",e.countWebsites)),1)):Object(l["createCommentVNode"])("",!0)])])})),128))]),J])})),128))])})),128))],2)),[[l["vShow"],e.report.type===r]])})),128)),Object(l["createVNode"])(c,{value:e.saveButtonTitle,onConfirm:t[12]||(t[12]=function(t){return e.$emit("submit")})},null,8,["value"]),Object(l["createElementVNode"])("div",{class:"entityCancel",innerHTML:e.$sanitize(e.entityCancelText)},null,8,Q)],544),[[d]])]})),_:3},8,["content-title"])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function ee(e,t){return"".concat((24+parseFloat(e)+t)%24)}function te(e,t){return ie(e)||le(e,t)||oe(e,t)||re()}function re(){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 oe(e,t){if(e){if("string"===typeof e)return ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ne(e,t):void 0}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function le(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,l=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(o=r.next()).done);i=!0)if(l.push(o.value),t&&l.length===t)break}catch(c){a=!0,n=c}finally{try{i||null==r["return"]||r["return"]()}finally{if(a)throw n}}return l}}function ie(e){if(Array.isArray(e))return e}var ae=window,ce=ae.$,pe=Object(l["defineComponent"])({props:{report:{type:Object,required:!0},selectedReports:Object,paramPeriods:{type:Object,required:!0},reportTypeOptions:{type:Object,required:!0},reportFormatsByReportTypeOptions:{type:Object,required:!0},displayFormats:{type:Object,required:!0},reportsByCategoryByReportType:{type:Object,required:!0},allowMultipleReportsByReportType:{type:Object,required:!0},countWebsites:{type:Number,required:!0},siteName:{type:String,required:!0},reportTypes:{type:Object,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0}},emits:["submit","change","toggleSelectedReport"],components:{ContentBlock:g["ContentBlock"],Field:c["Field"],SaveButton:c["SaveButton"]},directives:{Form:c["Form"]},created:function(){this.onEvolutionPeriodN=Object(g["debounce"])(this.onEvolutionPeriodN,50)},methods:{onEvolutionPeriodN:function(e){this.$emit("change",{prop:"evolutionPeriodN",value:e.target.value})},decode:function(e){return g["Matomo"].helper.htmlDecode(e)}},setup:function(e,t){var r=Object(l["ref"])(null);return Object(l["watch"])((function(){return e.report}),(function(e){var t=r.value;t.querySelectorAll("[vue-entry]").forEach((function(t){ce(t).data("vueAppInstance").report_=e}))})),Object(l["onMounted"])((function(){var o=r.value;g["Matomo"].helper.compileVueEntryComponents(o,{report:e.report,onChange:function(e,r){t.emit("change",{prop:e,value:r})}})})),{reportParameters:r}},beforeUnmount:function(){var e=this.$refs.reportParameters;g["Matomo"].helper.destroyVueComponent(e)},computed:{reportsByCategoryByReportTypeInColumns:function(){var e=this.reportsByCategoryByReportType,t=Object.entries(e).map((function(e){var t=te(e,2),r=t[0],o=t[1],n=Math.floor((Object.keys(o).length+1)/2),l={},i={},a=l;return Object.entries(o).forEach((function(e){var t=te(e,2),r=t[0],o=t[1];a[r]=o,Object.keys(a).length>=n&&(a=i)})),[r,[l,i]]}));return Object.fromEntries(t)},entityCancelText:function(){return Object(g["translate"])("General_OrCancel",'<a class="entityCancelLink">',"</a>")},frequencyPeriodSingle:function(){if(!this.report||!this.report.period)return"";var e=window,t=e.ReportPlugin,r=t.periodTranslations[this.report.period];return r||(r=t.periodTranslations.day),r.single},frequencyPeriodPlural:function(){if(!this.report||!this.report.period)return"";var e=window,t=e.ReportPlugin,r=t.periodTranslations[this.report.period];return r||(r=t.periodTranslations.day),r.plural},evolutionGraphsShowForEachInPeriod:function(){return Object(g["translate"])("ScheduledReports_EvolutionGraphsShowForEachInPeriod","<strong>","</strong>",this.frequencyPeriodSingle)},reportSegmentInlineHelp:function(){return Object(g["translate"])("ScheduledReports_Segment_Help",'<a href="./" rel="noreferrer noopener" target="_blank">',"</a>",Object(g["translate"])("SegmentEditor_DefaultAllVisits"),Object(g["translate"])("SegmentEditor_AddNewSegment"))},timezoneOffset:function(){return g["Matomo"].timezoneOffset},timeZoneDifferenceInHours:function(){return g["Matomo"].timezoneOffset/3600},reportHours:function(){for(var e=[],t=0;t<24;t+=1)2*this.timeZoneDifferenceInHours%2!==0?e.push({key:"".concat(t,".5"),value:"".concat(t,":30")}):e.push({key:"".concat(t),value:"".concat(t)});return e},reportHourUtc:function(){var e=ee(this.report.hour,-this.timeZoneDifferenceInHours);return Object(g["translate"])("ScheduledReports_ReportHourWithUTC",[e])},saveButtonTitle:function(){var e=window,t=e.ReportPlugin,r=this.report.idreport>0;return r?t.updateReportString:t.createReportString},contentTitle:function(){var e=window,t=e.ReportPlugin,r=this.report.idreport>0;return r?t.updateReportString:Object(g["translate"])("ScheduledReports_CreateAndScheduleReport")}}});pe.render=Y;var de=pe,se={class:"first"},ue={key:0},me={colspan:"7"},be=Object(l["createElementVNode"])("br",null,null,-1),Oe=Object(l["createElementVNode"])("br",null,null,-1),ye=Object(l["createTextVNode"])("› "),je=["href"],he=Object(l["createElementVNode"])("br",null,null,-1),fe=Object(l["createElementVNode"])("br",null,null,-1),ve={key:1},ge={colspan:"7"},Se=Object(l["createElementVNode"])("br",null,null,-1),Re=Object(l["createElementVNode"])("br",null,null,-1),Ee=Object(l["createElementVNode"])("br",null,null,-1),Ne={class:"first"},Ve={key:0,class:"entityInlineHelp",style:{"font-size":"9pt"}},ke={key:0},we={key:1},_e={key:0},Be={key:0},Te=Object(l["createElementVNode"])("br",null,null,-1),Ce=["onClick"],Pe=["src"],Fe=["id","action"],De=["value"],xe=Object(l["createElementVNode"])("input",{type:"hidden",name:"force_api_session",value:"1"},null,-1),qe=["onClick","id"],Me=["src"],Ie={style:{"text-align":"center","padding-top":"2px"}},Ae=["onClick","title"],Le=Object(l["createElementVNode"])("span",{class:"icon-edit"},null,-1),$e=[Le],He={style:{"text-align":"center","padding-top":"2px"}},Ge=["onClick","title"],Ue=Object(l["createElementVNode"])("span",{class:"icon-delete"},null,-1),ze=[Ue],We={class:"tableActionBar"},Ze=Object(l["createElementVNode"])("span",{class:"icon-add"},null,-1);function Ke(e,t,r,o,n,i){var a=Object(l["resolveComponent"])("ContentBlock"),c=Object(l["resolveDirective"])("content-table");return Object(l["openBlock"])(),Object(l["createBlock"])(a,{id:"entityEditContainer",class:"entityTableContainer","help-url":e.externalRawLink("https://matomo.org/docs/email-reports/"),feature:"true","content-title":e.contentTitle},{default:Object(l["withCtx"])((function(){var r;return[Object(l["withDirectives"])(Object(l["createElementVNode"])("table",null,[Object(l["createElementVNode"])("thead",null,[Object(l["createElementVNode"])("tr",null,[Object(l["createElementVNode"])("th",se,Object(l["toDisplayString"])(e.translate("General_Description")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_EmailSchedule")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_ReportFormat")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("ScheduledReports_SendReportTo")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Download")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Edit")),1),Object(l["createElementVNode"])("th",null,Object(l["toDisplayString"])(e.translate("General_Delete")),1)])]),Object(l["createElementVNode"])("tbody",null,["anonymous"===e.userLogin?(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",ue,[Object(l["createElementVNode"])("td",me,[be,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_MustBeLoggedIn"))+" ",1),Oe,ye,Object(l["createElementVNode"])("a",{href:"index.php?module=".concat(e.loginModule)},Object(l["toDisplayString"])(e.translate("Login_LogIn")),9,je),he,fe])])):null!==(r=e.reports)&&void 0!==r&&r.length?Object(l["createCommentVNode"])("",!0):(Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",ve,[Object(l["createElementVNode"])("td",ge,[Se,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_ThereIsNoReportToManage",e.siteName))+". ",1),Re,Ee])])),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.decodedReports,(function(t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("tr",{key:t.idreport},[Object(l["createElementVNode"])("td",Ne,[Object(l["createTextVNode"])(Object(l["toDisplayString"])(t.description)+" ",1),e.segmentEditorActivated&&t.idsegment?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",Ve,[e.savedSegmentsById[t.idsegment]?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",ke,Object(l["toDisplayString"])(e.savedSegmentsById[t.idsegment]),1)):(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",we,Object(l["toDisplayString"])(e.translate("ScheduledReports_SegmentDeleted")),1))])):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,Object(l["toDisplayString"])(e.periods[t.period]),1),Object(l["createElementVNode"])("td",null,[t.format?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",_e,Object(l["toDisplayString"])(t.format.toUpperCase()),1)):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,[0===t.recipients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",Be,Object(l["toDisplayString"])(e.translate("ScheduledReports_NoRecipients")),1)):Object(l["createCommentVNode"])("",!0),(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(t.recipients,(function(e,t){return Object(l["openBlock"])(),Object(l["createElementBlock"])("span",{key:t},[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e)+" ",1),Te])})),128)),0!==t.recipients.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("a",{key:1,href:"#",name:"linkSendNow",class:"link_but withIcon",style:{"margin-top":"3px"},onClick:Object(l["withModifiers"])((function(r){return e.$emit("sendnow",t.idreport)}),["prevent"])},[Object(l["createElementVNode"])("img",{border:"0",src:e.reportTypes[t.type]},null,8,Pe),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_SendReportNow")),1)],8,Ce)):Object(l["createCommentVNode"])("",!0)]),Object(l["createElementVNode"])("td",null,[Object(l["createElementVNode"])("form",{method:"POST",target:"_blank",id:"downloadReportForm_".concat(t.idreport),action:e.linkTo({module:"API",segment:null,method:"ScheduledReports.generateReport",idReport:t.idreport,outputType:e.downloadOutputType,language:e.language,format:-1!==["html","csv","tsv"].indexOf(t.format)?t.format:"original"})},[Object(l["createElementVNode"])("input",{type:"hidden",name:"token_auth",value:e.token_auth},null,8,De),xe],8,Fe),Object(l["createElementVNode"])("a",{href:"",rel:"noreferrer noopener",name:"linkDownloadReport",class:"link_but withIcon",onClick:Object(l["withModifiers"])((function(r){return e.displayReport(t.idreport)}),["prevent"]),id:t.idreport},[Object(l["createElementVNode"])("img",{border:"0",width:16,height:16,src:e.reportFormatsByReportType[t.type][t.format]},null,8,Me),Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("General_Download")),1)],8,qe)]),Object(l["createElementVNode"])("td",Ie,[Object(l["createElementVNode"])("button",{class:"table-action",onClick:function(r){return e.$emit("edit",t.idreport)},title:e.translate("General_Edit")},$e,8,Ae)]),Object(l["createElementVNode"])("td",He,[Object(l["createElementVNode"])("button",{class:"table-action",onClick:function(r){return e.$emit("delete",t.idreport)},title:e.translate("General_Delete")},ze,8,Ge)])])})),128))])],512),[[c]]),Object(l["createElementVNode"])("div",We,["anonymous"!==e.userLogin?(Object(l["openBlock"])(),Object(l["createElementBlock"])("button",{key:0,id:"add-report",onClick:t[0]||(t[0]=function(t){return e.$emit("create")})},[Ze,Object(l["createTextVNode"])(" "+Object(l["toDisplayString"])(e.translate("ScheduledReports_CreateAndScheduleReport")),1)])):Object(l["createCommentVNode"])("",!0)])]})),_:1},8,["help-url","content-title"])}var Xe=Object(l["defineComponent"])({props:{contentTitle:{type:String,required:!0},userLogin:{type:String,required:!0},loginModule:{type:String,required:!0},reports:{type:Array,required:!0},siteName:{type:String,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0},downloadOutputType:{type:Number,required:!0},language:{type:String,required:!0},reportFormatsByReportType:{type:Object,required:!0},reportTypes:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"]},directives:{ContentTable:g["ContentTable"]},emits:["create","edit","delete","sendnow"],methods:{linkTo:function(e){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),e)))},displayReport:function(e){$("#downloadReportForm_".concat(e)).submit()}},computed:{token_auth:function(){return g["Matomo"].token_auth},decodedReports:function(){return this.reports.map((function(e){return Object.assign(Object.assign({},e),{},{description:g["Matomo"].helper.htmlDecode(e.description)})}))}}});Xe.render=Ke;var Je=Xe;function Qe(){g["Matomo"].helper.lazyScrollTo(".emailReports",200)}function Ye(e,t){var r;null!==(r=window.updateReportParametersFunctions)&&void 0!==r&&r[e]&&window.updateReportParametersFunctions[e](t)}function et(e,t){var r;null!==(r=window.resetReportParametersFunctions)&&void 0!==r&&r[e]&&window.resetReportParametersFunctions[e](t)}window.resetReportParametersFunctions=window.resetReportParametersFunctions||{},window.updateReportParametersFunctions=window.updateReportParametersFunctions||{},window.getReportParametersFunctions=window.getReportParametersFunctions||{};var tt=window,rt=tt.$,ot=g["Matomo"].timezoneOffset/3600,nt=Object(l["defineComponent"])({props:{contentTitle:{type:String,required:!0},userLogin:{type:String,required:!0},loginModule:{type:String,required:!0},reports:{type:Array,required:!0},siteName:{type:String,required:!0},segmentEditorActivated:Boolean,savedSegmentsById:Object,periods:{type:Object,required:!0},downloadOutputType:{type:Number,required:!0},language:{type:String,required:!0},reportFormatsByReportType:{type:Object,required:!0},paramPeriods:{type:Object,required:!0},reportTypeOptions:{type:Object,required:!0},reportFormatsByReportTypeOptions:{type:Object,required:!0},displayFormats:{type:Object,required:!0},reportsByCategoryByReportType:{type:Object,required:!0},allowMultipleReportsByReportType:{type:Object,required:!0},countWebsites:{type:Number,required:!0},reportTypes:{type:Object,required:!0}},components:{AddReport:de,ListReports:Je},directives:{ContentTable:g["ContentTable"],Form:c["Form"]},mounted:function(){var e=this;rt(this.$refs.root).on("click","a.entityCancelLink",(function(){e.showListOfReports()})),g["Matomo"].postEvent("ScheduledReports.ManageScheduledReport.mounted",{element:this.$refs.root})},unmounted:function(){g["Matomo"].postEvent("ScheduledReports.ManageScheduledReport.unmounted",{element:this.$refs.root})},data:function(){return{showReportsList:!0,report:{},selectedReports:{}}},methods:{sendReportNow:function(e){var t=this;Qe(),g["AjaxHelper"].post({method:"ScheduledReports.sendReport"},{idReport:e,force:!0}).then((function(){t.fadeInOutSuccessMessage(t.$refs.reportSentSuccess,Object(g["translate"])("ScheduledReports_ReportSent"),!1)}))},formSetEditReport:function(e){var t=this,r=window,o=r.ReportPlugin,n={idreport:e,type:o.defaultReportType,format:o.defaultReportFormat,description:"",period:o.defaultPeriod,hour:o.defaultHour,reports:[],idsegment:"",evolutionPeriodFor:"prev",evolutionPeriodN:o.defaultEvolutionPeriodN,periodParam:o.defaultPeriod};e>0?(n=o.reportList[e],Ye(n.type,n)):et(n.type,n),n.hour=ee(n.hour,ot),this.selectedReports={},Object.values(n.reports).forEach((function(e){t.selectedReports[n.type]=t.selectedReports[n.type]||{},t.selectedReports[n.type][e]=!0})),n["format".concat(n.type)]=n.format,n.idsegment||(n.idsegment=""),this.report=n,this.report.description=g["Matomo"].helper.htmlDecode(n.description)},fadeInOutSuccessMessage:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g["NotificationsStore"].show({message:t,placeat:e,context:"success",noclear:!0,type:"toast",style:{display:"inline-block",marginTop:"10px"},id:"scheduledReportSuccess"}),r&&g["Matomo"].helper.refreshAfter(2)},changedReportType:function(){et(this.report.type,this.report)},deleteReport:function(e){g["Matomo"].helper.modalConfirm("#confirm",{yes:function(){g["AjaxHelper"].post({method:"ScheduledReports.deleteReport"},{idReport:e},{redirectOnSuccess:!0})}})},showListOfReports:function(e){this.showReportsList=!0,g["Matomo"].helper.hideAjaxError(),("undefined"===typeof e||e)&&Qe()},createReport:function(){var e=this;this.showReportsList=!1,Object(l["nextTick"])((function(){e.formSetEditReport(0)}))},editReport:function(e){var t=this;this.showReportsList=!1,Object(l["nextTick"])((function(){t.formSetEditReport(e)}))},submitReport:function(){var e=this,t={idReport:this.report.idreport,description:this.report.description,idSegment:this.report.idsegment,reportType:this.report.type,reportFormat:this.report["format".concat(this.report.type)],periodParam:this.report.periodParam,evolutionPeriodFor:this.report.evolutionPeriodFor};"each"!==t.evolutionPeriodFor&&(t.evolutionPeriodN=this.report.evolutionPeriodN);var r=this.report.period,o=ee(this.report.hour,-ot),n=this.selectedReports[t.reportType]||{},l=Object.keys(n).filter((function(r){return e.selectedReports[t.reportType][r]}));l.length>0&&(t.reports=l);var i=window.getReportParametersFunctions[this.report.type](this.report);t.parameters=i;var a=this.report.idreport>0;return g["AjaxHelper"].post({method:a?"ScheduledReports.updateReport":"ScheduledReports.addReport",period:r,hour:o},t).then((function(){e.fadeInOutSuccessMessage(e.$refs.reportUpdatedSuccess,Object(g["translate"])("ScheduledReports_ReportUpdated"))})),!1},onChangeProperty:function(e,t){this.report[e]=t,"type"===e&&this.changedReportType()},toggleSelectedReport:function(e,t){this.selectedReports[e]=this.selectedReports[e]||{},this.selectedReports[e][t]=!this.selectedReports[e][t]}},computed:{showReportForm:function(){return!this.showReportsList},decodedSiteName:function(){return g["Matomo"].helper.htmlDecode(this.siteName)}}});nt.render=v;var lt=nt;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(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["Live"]=t(require("CoreHome"),require("vue")):e["Live"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Live/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,"LiveWidgetRefresh",(function(){return c})),n.d(t,"TotalVisitors",(function(){return k})),n.d(t,"LivePage",(function(){return U})),n.d(t,"IndexHeader",(function(){return q})),n.d(t,"LastVisits",(function(){return $})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("19dc"),l=window,a=l.$,c={mounted:function(e,t){setTimeout((function(){var n=i["MatomoUrl"].parsed.value.segment;a(e).find("#visitsLive").liveWidget({interval:t.value.liveRefreshAfterMs,onUpdate:function(){i["AjaxHelper"].fetch({module:"Live",action:"ajaxTotalVisitors",segment:n},{format:"html"}).then((function(t){i["Matomo"].helper.destroyVueComponent(e),a(e).find("#visitsTotal").replaceWith(t),i["Matomo"].helper.compileVueEntryComponents(e)}))},maxRows:10,fadeInSpeed:600,dataUrlParams:{module:"Live",action:"getLastVisitsStart",segment:n}})}))}},s=n("8bbf"),u={class:"dataTable",cellspacing:"0"},d={id:"label",class:"sortable label first",style:{cursor:"auto"}},b={class:"thDIV"},f={class:"sortable",style:{cursor:"auto"}},m={class:"thDIV"},p={class:"sortable",style:{cursor:"auto"}},v={class:"thDIV"},j={class:""},O={class:"label column"},g=["title"],y=["title"],V={class:""},h={class:"label column"},E=["title"],N=["title"];function C(e,t,n,o,r,i){return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",null,[Object(s["createElementVNode"])("table",u,[Object(s["createElementVNode"])("thead",null,[Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("th",d,[Object(s["createElementVNode"])("div",b,Object(s["toDisplayString"])(e.translate("General_Date")),1)]),Object(s["createElementVNode"])("th",f,[Object(s["createElementVNode"])("div",m,Object(s["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)]),Object(s["createElementVNode"])("th",p,[Object(s["createElementVNode"])("div",v,Object(s["toDisplayString"])(e.translate("General_Actions")),1)])])]),Object(s["createElementVNode"])("tbody",null,[Object(s["createElementVNode"])("tr",j,[Object(s["createElementVNode"])("td",O,Object(s["toDisplayString"])(e.translate("Live_LastHours",24)),1),Object(s["createElementVNode"])("td",{class:"column",title:e.countErrorToday},Object(s["toDisplayString"])(e.visitorsCountToday||0),9,g),Object(s["createElementVNode"])("td",{class:"column",title:e.countErrorToday},Object(s["toDisplayString"])(e.pisToday||0),9,y)]),Object(s["createElementVNode"])("tr",V,[Object(s["createElementVNode"])("td",h,Object(s["toDisplayString"])(e.translate("Live_LastMinutes",30)),1),Object(s["createElementVNode"])("td",{class:"column",title:e.countErrorHalfHour},Object(s["toDisplayString"])(e.visitorsCountHalfHour||0),9,E),Object(s["createElementVNode"])("td",{class:"column",title:e.countErrorHalfHour},Object(s["toDisplayString"])(e.pisHalfhour||0),9,N)])])])])}var L=Object(s["defineComponent"])({props:{countErrorToday:Number,visitorsCountToday:Number,pisToday:Number,countErrorHalfHour:Number,visitorsCountHalfHour:Number,pisHalfhour:Number}});L.render=C;var k=L,w={class:"visitsLiveFooter"},S=["title"],H=Object(s["createElementVNode"])("img",{id:"pauseImage",border:"0",src:"plugins/Live/images/pause.png",role:"presentation"},null,-1),T=[H],_=["title"],D=Object(s["createElementVNode"])("img",{id:"playImage",style:{display:"none"},border:"0",src:"plugins/Live/images/play.png",role:"presentation"},null,-1),P=[D],x={key:0},B=Object(s["createTextVNode"])("   "),M=["href"];function I(e,t,n,o,r,i){var l=Object(s["resolveComponent"])("VueEntryContainer"),a=Object(s["resolveDirective"])("live-widget-refresh");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",null,[(Object(s["openBlock"])(),Object(s["createBlock"])(Object(s["resolveDynamicComponent"])(e.isWidgetized?"Passthrough":"ContentBlock"),{"content-title":e.isWidgetized?void 0:e.translate("Live_VisitorsInRealTime")},{default:Object(s["withCtx"])((function(){return[Object(s["withDirectives"])(Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(l,{html:e.initialTotalVisitors},null,8,["html"]),Object(s["createVNode"])(l,{html:e.visitors},null,8,["html"])],512),[[a,{liveRefreshAfterMs:e.liveRefreshAfterMs}]]),Object(s["createElementVNode"])("div",w,[Object(s["createElementVNode"])("a",{title:e.translate("Live_OnClickPause",e.translate("Live_VisitorsInRealTime")),onClick:t[0]||(t[0]=Object(s["withModifiers"])((function(t){return e.onClickPause()}),["prevent"]))},T,8,S),Object(s["createElementVNode"])("a",{title:e.translate("Live_OnClickStart",e.translate("Live_VisitorsInRealTime")),onClick:t[1]||(t[1]=function(t){e.onClickPlay()})},P,8,_),e.disableLink?Object(s["createCommentVNode"])("",!0):(Object(s["openBlock"])(),Object(s["createElementBlock"])("span",x,[B,Object(s["createElementVNode"])("a",{class:"rightLink",href:e.visitorLogUrl},Object(s["toDisplayString"])(e.translate("Live_LinkVisitorLog")),9,M)]))])]})),_:1},8,["content-title"]))])}var R=Object(s["defineComponent"])({props:{disableLink:Boolean,visitors:String,initialTotalVisitors:String,liveRefreshAfterMs:Number,isWidgetized:Boolean},components:{TotalVisitors:k,VueEntryContainer:i["VueEntryContainer"],ContentBlock:i["ContentBlock"],Passthrough:i["Passthrough"]},directives:{LiveWidgetRefresh:c},computed:{visitorLogUrl:function(){return"#?".concat(i["MatomoUrl"].stringify(Object.assign(Object.assign({},i["MatomoUrl"].hashParsed.value),{},{category:"General_Visitors",subcategory:"Live_VisitorLog"})))}},methods:{onClickPause:function(){window.onClickPause()},onClickPlay:function(){window.onClickPlay()}}});R.render=I;var U=R;function W(e,t,n,o,r,i){var l=Object(s["resolveComponent"])("EnrichedHeadline"),a=Object(s["resolveDirective"])("content-intro");return Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("div",null,[Object(s["createElementVNode"])("h2",null,[Object(s["createVNode"])(l,null,{default:Object(s["withCtx"])((function(){return[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("Live_VisitorLog")),1)]})),_:1})])],512)),[[a]])}var A=Object(s["defineComponent"])({components:{EnrichedHeadline:i["EnrichedHeadline"]},directives:{ContentIntro:i["ContentIntro"]}});A.render=W;var q=A,z=window,G=z.$,$={mounted:function(e){G(e).off("click").on("click",".visits-live-launch-visitor-profile",(function(e){return e.preventDefault(),window.broadcast.propagateNewPopoverParameter("visitorProfile",G(this).attr("data-visitor-id")),!1})).tooltip({track:!0,content:function(){var e=G(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))},show:{delay:100,duration:0},hide:!1})}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["SegmentEditor"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["SegmentEditor"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){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/SegmentEditor/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},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"SegmentGeneratorStore",(function(){return m})),n.d(t,"SegmentGenerator",(function(){return K})),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var a=n("8bbf"),r=n("19dc");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function d(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var u=function(){function e(){var t=this;c(this,e),d(this,"privateState",Object(a["reactive"])({isLoading:!1,segments:[]})),d(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),d(this,"loadSegmentsAbort",void 0),d(this,"loadSegmentsPromise",void 0),d(this,"fetchedSiteId",void 0)}return s(e,[{key:"loadSegments",value:function(e,t){var n=this;if(this.loadSegmentsAbort&&(this.loadSegmentsAbort.abort(),this.loadSegmentsAbort=void 0),this.privateState.isLoading=!0,this.fetchedSiteId!==e&&(this.loadSegmentsAbort=void 0,this.fetchedSiteId=e),!this.loadSegmentsPromise){var o=void 0,i=void 0;"all"!==e&&e?e&&(o=e,i=e):(o="all",i="all"),this.loadSegmentsAbort=new AbortController,this.loadSegmentsPromise=r["AjaxHelper"].fetch({method:"API.getSegmentsMetadata",filter_limit:"-1",_hideImplementationData:0,idSites:o,idSite:i})}return this.loadSegmentsPromise.then((function(e){return n.privateState.isLoading=!1,e&&(n.privateState.segments=t?e.filter((function(e){return e.sqlSegment&&e.sqlSegment.match(/log_visit\./)})):e),n.state.value.segments})).finally((function(){n.privateState.isLoading=!1,delete n.loadSegmentsPromise}))}}]),e}(),m=new u,f={class:"segment-generator",ref:"root"},p={class:"segment-rows"},g={class:"segment-row"},v=["onClick"],h={href:"#",class:"segment-loading"},O={class:"segment-row-inputs valign-wrapper"},b={class:"segment-input metricListBlock valign-wrapper"},j={style:{width:"100%"}},S={class:"segment-input metricMatchBlock valign-wrapper"},y={style:{display:"inline-block"}},C={class:"segment-input metricValueBlock valign-wrapper"},V={class:"form-group row",style:{width:"100%"}},k={class:"input-field col s12"},w=Object(a["createElementVNode"])("span",{role:"status","aria-live":"polite",class:"ui-helper-hidden-accessible"},null,-1),E=Object(a["createElementVNode"])("div",{class:"clear"},null,-1),N={class:"segment-or"},A=["onClick"],L=["innerHTML"],_={class:"segment-and"},I=["innerHTML"];function x(e,t,n,o,i,r){var c=this,l=Object(a["resolveComponent"])("ActivityIndicator"),s=Object(a["resolveComponent"])("Field"),d=Object(a["resolveComponent"])("ValueInput");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",f,[Object(a["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.conditions,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("segmentRow".concat(n)),key:n},[Object(a["createElementVNode"])("div",p,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.orConditions,(function(n,o){var i,r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("orCondId".concat(n.id)),key:o},[Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("a",{class:"segment-close",onClick:function(o){return e.removeOrCondition(t,n)}},null,8,v),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",h,null,512),[[a["vShow"],e.conditionValuesLoading[n.id]]]),Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",j,[Object(a["createVNode"])(s,{uicontrol:"expandable-select",name:"segments","model-value":n.segment,"onUpdate:modelValue":function(t){n.segment=t,e.updateAutocomplete(n),e.computeSegmentDefinition()},title:null===(i=e.segments[n.segment])||void 0===i?void 0:i.name,"full-width":!0,options:e.segmentList},null,8,["model-value","onUpdate:modelValue","title","options"])])]),Object(a["createElementVNode"])("div",S,[Object(a["createElementVNode"])("div",y,[Object(a["createVNode"])(s,{uicontrol:"select",name:"matchType","model-value":n.matches,"onUpdate:modelValue":function(t){n.matches=t,e.computeSegmentDefinition()},"full-width":!0,options:e.matches[null===(r=e.segments[n.segment])||void 0===r?void 0:r.type]},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",C,[Object(a["createElementVNode"])("div",V,[Object(a["createElementVNode"])("div",k,[w,Object(a["createVNode"])(d,{value:n.value,onUpdate:function(e){n.value=e,c.computeSegmentDefinition()}},null,8,["value","onUpdate"])])])]),E])]),Object(a["createElementVNode"])("div",N,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorOR")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-or",onClick:function(n){return e.addNewOrCondition(t)}},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewOrConditionLinkText)},null,8,L)])],8,A)]),Object(a["createElementVNode"])("div",_,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorAND")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-row initial",onClick:t[0]||(t[0]=function(t){return e.addNewAndCondition()})},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewAndConditionLinkText)},null,8,I)])])],512)}var D=n("a5a2"),B=["placeholder","title","value"];function P(e,t,n,o,i,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{placeholder:e.translate("General_Value"),type:"text",class:"autocomplete",title:e.translate("General_Value"),autocomplete:"off",value:e.value,onKeydown:t[0]||(t[0]=function(t){return e.onKeydownOrConditionValue(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydownOrConditionValue(t)})},null,40,B)}var G=Object(a["defineComponent"])({props:{value:null},created:function(){this.onKeydownOrConditionValue=Object(r["debounce"])(this.onKeydownOrConditionValue,50)},emits:["update"],methods:{onKeydownOrConditionValue:function(e){this.$emit("update",e.target.value)}}});G.render=P;var q=G;function M(){return{metric:[{key:"==",value:Object(r["translate"])("General_OperationEquals")},{key:"!=",value:Object(r["translate"])("General_OperationNotEquals")},{key:"<=",value:Object(r["translate"])("General_OperationAtMost")},{key:">=",value:Object(r["translate"])("General_OperationAtLeast")},{key:"<",value:Object(r["translate"])("General_OperationLessThan")},{key:">",value:Object(r["translate"])("General_OperationGreaterThan")}],dimension:[{key:"==",value:Object(r["translate"])("General_OperationIs")},{key:"!=",value:Object(r["translate"])("General_OperationIsNot")},{key:"=@",value:Object(r["translate"])("General_OperationContains")},{key:"!@",value:Object(r["translate"])("General_OperationDoesNotContain")},{key:"=^",value:Object(r["translate"])("General_OperationStartsWith")},{key:"=$",value:Object(r["translate"])("General_OperationEndsWith")}]}}function T(){for(var e="",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=1;n<=10;n+=1)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function U(e){for(var t,n,o=["==","!=","<=",">=","=@","!@","<",">","=^","=$"],i={},a=e.length,r=!1,c=0;c<o.length;c+=1)t=o[c],n=e.indexOf(t),-1!==n&&n<a&&(a=n,1===t.length&&(r=!0));a<e.length&&(!0===r?(i.segment=e.slice(0,a),i.matches=e.slice(a,a+1),i.value=decodeURIComponent(e.slice(a+1))):(i.segment=e.slice(0,a),i.matches=e.slice(a,a+2),i.value=decodeURIComponent(e.slice(a+2))),'""'===i.value&&(i.value=""));try{i.value=decodeURIComponent(i.value)}catch(l){}return i}function H(e){return e?"".concat(e).replace(/(<([^>]+)>)/gi,""):e}var R=window,$=R.$,F=Object(a["defineComponent"])({props:{addInitialCondition:Boolean,visitSegmentsOnly:Boolean,idsite:{type:[String,Number],default:function(){return r["Matomo"].idSite}},modelValue:{type:String,default:""}},components:{ActivityIndicator:r["ActivityIndicator"],Field:D["Field"],ValueInput:q},data:function(){return{conditions:[],queriedSegments:[],matches:M(),conditionValuesLoading:{},segmentDefinition:""}},emits:["update:modelValue"],watch:{modelValue:function(e){(e||"")!==(this.segmentDefinition||"")&&this.setSegmentString(e)},conditions:{deep:!0,handler:function(){this.computeSegmentDefinition()}},segmentDefinition:function(e){(e||"")!==(this.modelValue||"")&&this.$emit("update:modelValue",e)},idsite:function(e){this.reloadSegments(e,this.visitSegmentsOnly)}},created:function(){this.matches[""]=this.matches.dimension,this.setSegmentString(this.modelValue),this.segmentDefinition=this.modelValue,this.reloadSegments(this.idsite,this.visitSegmentsOnly)},methods:{reloadSegments:function(e,t){var n=this;m.loadSegments(e,t).then((function(e){n.queriedSegments=e.map((function(e){return Object.assign(Object.assign({},e),{},{category:e.category||"Others"})})),n.addInitialCondition&&0===n.conditions.length&&n.addNewAndCondition()}))},addAndCondition:function(e){this.conditions.push(e)},addNewOrCondition:function(e){if(this.firstSegment){var t={segment:this.firstSegment,matches:this.firstMatch,value:""};this.addOrCondition(e,t)}},addOrCondition:function(e,t){var n=this;this.conditionValuesLoading[t.id]=!1,t.id=T(),e.orConditions.push(t),Object(a["nextTick"])((function(){n.updateAutocomplete(t)}))},updateAutocomplete:function(e){var t=this;this.conditionValuesLoading[e.id]=!0,$(".orCondId".concat(e.id," .metricValueBlock input"),this.$refs.root).autocomplete({source:[],minLength:0});var n=new AbortController,o=!1;r["AjaxHelper"].fetch({module:"API",format:"json",method:"API.getSuggestedValuesForSegment",segmentName:e.segment,idSite:this.idsite},{createErrorNotification:!1}).then((function(n){t.conditionValuesLoading[e.id]=!1,o=!0;var i=n;Array.isArray(i)&&(i=i.map((function(e){return"".concat(e)})));var a=$(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:i,minLength:0,select:function(n,o){n.preventDefault(),e.value=o.item.value,t.computeSegmentDefinition(),t.$forceUpdate()}}).off("click").click((function(){$(a).autocomplete("search",e.value)}))})).catch((function(){o=!0,t.conditionValuesLoading[e.id]=!1,$(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:[],minLength:0}).autocomplete("search",e.value)})),setTimeout((function(){o||n.abort()}),2e4)},removeOrCondition:function(e,t){var n=e.orConditions.indexOf(t);if(n>-1&&e.orConditions.splice(n,1),0===e.orConditions.length){var o=this.conditions.indexOf(e);n>-1&&this.conditions.splice(o,1)}},setSegmentString:function(e){var t=this;if(this.conditions=[],e){var n=e.split(";").map((function(e){return e.split(",")}));this.conditions=n.map((function(e){var n={orConditions:[]};return e.forEach((function(e){var o=U(e);t.addOrCondition(n,o)})),n}))}},addNewAndCondition:function(){var e={orConditions:[]};this.firstSegment&&(this.addAndCondition(e),this.addNewOrCondition(e))},computeSegmentDefinition:function(){var e="";this.conditions.forEach((function(t){if(t.orConditions.length){var n="";t.orConditions.forEach((function(e){if(e.value||e.segment||e.matches){""!==n&&(n+=",");var t=encodeURIComponent(encodeURIComponent(e.value));n+="".concat(e.segment).concat(e.matches).concat(t)}})),""!==e&&(e+=";"),e+=n}})),this.segmentDefinition=e}},computed:{firstSegment:function(){var e;return(null===(e=this.queriedSegments[0])||void 0===e?void 0:e.segment)||null},firstMatch:function(){var e=this.queriedSegments[0];return e?e.type&&this.matches[e.type]?this.matches[e.type][0].key:this.matches[""][0].key:null},segments:function(){var e={};return this.queriedSegments.forEach((function(t){e[t.segment]=t})),e},segmentList:function(){return this.queriedSegments.map((function(e){return{group:e.category,key:e.segment,value:e.name,tooltip:e.acceptedValues?H(e.acceptedValues):void 0}}))},addNewOrConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","<span>".concat(Object(r["translate"])("SegmentEditor_OperatorOR"),"</span>")))},andConditionLabel:function(){return this.conditions.length?Object(r["translate"])("SegmentEditor_OperatorAND"):""},addNewAndConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","<span>".concat(this.andConditionLabel,"</span>")))},isLoading:function(){return m.state.value.isLoading}}});F.render=x;var K=F;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(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 re})),n.d(t,"AnonymizeIp",(function(){return je})),n.d(t,"OptOutCustomizer",(function(){return Ge})),n.d(t,"AnonymizeLogData",(function(){return _t})),n.d(t,"DoNotTrackPreference",(function(){return wt})),n.d(t,"ReportDeletionSettings",(function(){return Bt})),n.d(t,"DeleteOldLogs",(function(){return Wt})),n.d(t,"DeleteOldReports",(function(){return ln})),n.d(t,"ScheduleReportDeletion",(function(){return Cn})),n.d(t,"AskingForConsent",(function(){return Wn})),n.d(t,"GdprOverview",(function(){return ha})),n.d(t,"PreviousAnonymizations",(function(){return Ta})),n.d(t,"PrivacySettings",(function(){return qa})),n.d(t,"UsersOptOut",(function(){return Ja})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var r=n("8bbf"),i={class:"manageGdpr"},l={class:"intro"},c=Object(r["createElementVNode"])("br",null,null,-1),s=Object(r["createElementVNode"])("br",null,null,-1),d=Object(r["createElementVNode"])("br",null,null,-1),u=Object(r["createElementVNode"])("br",null,null,-1),m=["innerHTML"],b={class:"form-group row"},p={class:"col s12 input-field"},g={for:"gdprsite",class:"siteSelectorLabel"},O={class:"sites_autocomplete"},j={key:0,class:"form-group row segmentFilterGroup"},v={class:"col s12"},y={style:{margin:"8px 0",display:"inline-block"}},h={key:2,class:"dataUnavailable system notification notification-icon\n      notification-info"},f={key:0,class:"system notification notification-icon\n      notification-info"},V={class:"notification-body"},D=Object(r["createElementVNode"])("br",null,null,-1),N=Object(r["createTextVNode"])(),E=Object(r["createElementVNode"])("br",null,null,-1),S=Object(r["createElementVNode"])("br",null,null,-1),C=Object(r["createElementVNode"])("br",null,null,-1),k={class:"checkInclude"},_={colspan:"8"},P=["title"],M={class:"checkInclude"},w=["title"],z={class:"visitId"},A={class:"visitorId"},T=["title","onClick"],I={class:"visitorIp"},L=["title","onClick"],B={class:"userId"},x=["title","onClick"],F=["title"],R=["src"],U=["title"],H=["src"],q=["title"],G=["src"],K=["title"],W=["src"],Y=["onClick"],J=Object(r["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),Q={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},X=["value"],Z=["value"];function ee(e,t,n,a,o,$){var ee=Object(r["resolveComponent"])("SiteSelector"),te=Object(r["resolveComponent"])("SegmentGenerator"),ne=Object(r["resolveComponent"])("SaveButton"),ae=Object(r["resolveComponent"])("ContentBlock"),oe=Object(r["resolveComponent"])("Field"),re=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",i,[Object(r["createVNode"])(ae,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",l,[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(r["createElementVNode"])("p",null,[u,Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,m)])]),Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(r["createElementVNode"])("div",b,[Object(r["createElementVNode"])("div",p,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",g,Object(r["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(r["createElementVNode"])("div",O,[Object(r["createVNode"])(ee,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":[t[0]||(t[0]=function(t){return e.site=t}),t[1]||(t[1]=function(t){return e.changeSite(t)})],"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),e.isVisitorLogAndProfileEnabled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",j,[Object(r["createElementVNode"])("div",v,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",y,Object(r["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(te,{modelValue:e.segment_filter,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.segment_filter=t}),"visit-segments-only":!0,idsite:e.site.id,"show-segment-editor":!0},null,8,["modelValue","idsite"])])])])])):Object(r["createCommentVNode"])("",!0),e.isVisitorLogAndProfileEnabled?(Object(r["openBlock"])(),Object(r["createBlock"])(ne,{key:1,class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[3]||(t[3]=function(t){return e.findDataSubjects()}),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",h,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_SiteDataNotAvailable")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_VisitorLogsProfilesDisabledMessage")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_PleaseEnableVisitorLogsProfiles")),1)]))]})),_:1},8,["content-title"]),e.allWebsitesContainsDisabledSite?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",f,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_SiteDataNotAvailableCertainSites")),1),Object(r["createElementVNode"])("div",V,[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_VisitorLogsProfilesSiteNamesDisabledMessage")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_PleaseEnableVisitorLogsProfilesSites")),1)])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[r["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),D,N,E,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),S,C,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",k,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(oe,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_VisitId")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_VisitorID")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_UserId")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Details")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Action")),513),[[r["vShow"],e.profileEnabled]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",_,Object(r["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[r["vShow"],e.dataSubjects.length>400]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.dataSubjects,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{title:"".concat(e.translate("PrivacyManager_LastAction"),": ").concat(t.lastActionDateTime),key:n},[Object(r["createElementVNode"])("td",M,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(oe,{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(r["createElementVNode"])("td",{class:"site",title:"(".concat(e.translate("General_Id")," ").concat(t.idSite,")")},Object(r["toDisplayString"])(t.siteName),9,w),Object(r["createElementVNode"])("td",z,Object(r["toDisplayString"])(t.idVisit),1),Object(r["createElementVNode"])("td",A,[Object(r["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:function(n){return e.addFilter("visitorId",t.visitorId)}},Object(r["toDisplayString"])(t.visitorId),9,T)]),Object(r["createElementVNode"])("td",I,[Object(r["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:function(n){return e.addFilter("visitIp",t.visitIp)}},Object(r["toDisplayString"])(t.visitIp),9,L)]),Object(r["createElementVNode"])("td",B,[Object(r["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:function(n){return e.addFilter("userId",t.userId)}},Object(r["toDisplayString"])(t.userId),9,x)]),Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("span",{title:"".concat(t.deviceType," ").concat(t.deviceModel),style:{"margin-right":"3.5px"}},[Object(r["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,R)],8,F),Object(r["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(r["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,H)],8,U),Object(r["createElementVNode"])("span",{title:"".concat(t.browser," ").concat(t.browserFamilyDescription),style:{"margin-right":"3.5px"}},[Object(r["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,G)],8,q),Object(r["createElementVNode"])("span",{title:"".concat(t.country," ").concat(t.region||"")},[Object(r["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,W)],8,K)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:function(n){return e.showProfile(t.visitorId,t.idSite)}},[J,Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,Y)],512),[[r["vShow"],e.profileEnabled]])],8,P)})),128))])],512),[[re]]),Object(r["createVNode"])(ne,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[5]||(t[5]=function(t){return e.exportDataSubject()}),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(r["createVNode"])(ne,{class:"deleteDataSubjects",onConfirm:t[6]||(t[6]=function(t){return e.deleteDataSubject()}),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[r["vShow"],e.dataSubjects.length]]),Object(r["createElementVNode"])("div",Q,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,X),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Z)],512)])}var te=n("19dc"),ne=n("f06f"),ae=n("a5a2"),oe=Object(r["defineComponent"])({components:{ContentBlock:te["ContentBlock"],SiteSelector:te["SiteSelector"],SegmentGenerator:ne["SegmentGenerator"],SaveButton:ae["SaveButton"],Field:ae["Field"]},directives:{ContentTable:te["ContentTable"]},data:function(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(te["translate"])("UsersManager_AllWebsites")},segment_filter:"visitId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:te["Matomo"].visitorProfileEnabled,dataSubjectsActive:[],isVisitorLogAndProfileEnabled:!0,allWebsitesContainsDisabledSite:!1}},created:function(){this.changeSite(this.site)},watch:{site:function(e){var t=this;"all"!==e.id?(this.allWebsitesContainsDisabledSite=!1,this.isLoading=!0,this.dataSubjects=[],this.hasSearched=!1,te["AjaxHelper"].fetch({method:"Live.isVisitorProfileEnabled",idSite:e.id}).then((function(e){t.isVisitorLogAndProfileEnabled=e.value})).finally((function(){t.isLoading=!1}))):this.isVisitorLogAndProfileEnabled=!0}},setup:function(){var e=te["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites:function(){return e}}},methods:{changeSite:function(e){var t=this;te["AjaxHelper"].fetch({module:"API",method:"Live.isVisitorProfileEnabled",filter_limit:-1,idSite:e.id},{createErrorNotification:!1}).then((function(e){e.value||"userId=="!==t.segment_filter?e.value&&"visitId=="===t.segment_filter&&(t.segment_filter="userId=="):t.segment_filter="visitId=="})).catch((function(){t.segment_filter="visitId=="}))},showSuccessNotification:function(e){var t=te["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout((function(){te["NotificationsStore"].scrollToNotification(t)}),200)},linkTo:function(e){return"?".concat(te["MatomoUrl"].stringify(Object.assign(Object.assign({},te["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:e})))},toggleActivateAll:function(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile:function(e,t){te["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject:function(){var e=this,t=this.activatedDataSubjects;te["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:t}).then((function(t){e.showSuccessNotification(Object(te["translate"])("PrivacyManager_VisitsSuccessfullyExported")),te["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(t))}))},deleteDataSubject:function(){var e=this;te["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:function(){e.isDeleting=!0;var t=e.activatedDataSubjects;te["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:t}).then((function(){e.dataSubjects=[],e.showSuccessNotification(Object(te["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||te["Matomo"].hasSuperUserAccess||(n=t,Array.isArray(t)&&(n=t.join(","))),te["AjaxHelper"].fetch({method:"Live.isVisitorProfileEnabled",idSite:n}).then((function(t){e.allWebsitesContainsDisabledSite=!t.value})),te["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(te["translate"])("PrivacyManager_GdprToolsOverviewHint",'<a href="'.concat(this.linkTo("gdprOverview"),'">'),"</a>")}}});oe.render=ee;var re=oe,ie=Object(r["createElementVNode"])("br",null,null,-1),le=Object(r["createElementVNode"])("br",null,null,-1),ce=Object(r["createElementVNode"])("br",null,null,-1),se=Object(r["createElementVNode"])("br",null,null,-1),de={key:0},ue=Object(r["createElementVNode"])("br",null,null,-1),me=Object(r["createElementVNode"])("br",null,null,-1),be={class:"alert-warning alert"};function pe(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("SaveButton"),s=Object(r["resolveDirective"])("form");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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),[[r["vShow"],e.actualEnabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),ie,le,Object(r["createElementVNode"])("em",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]})),_:1},8,["title","modelValue"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),ce,se,Object(r["createElementVNode"])("em",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",de,[ue,me,Object(r["createElementVNode"])("p",be,Object(r["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]})),_:1},8,["title","modelValue"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["createElementVNode"])("div",null,[e.configRandomisationFeatureFlag?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"checkbox",name:"randomizeConfigId",title:e.translate("PrivacyManager_UseRandomizeConfigId"),modelValue:e.actualRandomizeConfigId,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.actualRandomizeConfigId=t}),"inline-help":e.translate("PrivacyManager_RandomizeConfigIdNote")},null,8,["title","modelValue","inline-help"])):Object(r["createCommentVNode"])("",!0)]),Object(r["createVNode"])(c,{onConfirm:t[8]||(t[8]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}function ge(e){return!0===e||1===e||"1"===e?1:0}var Oe=Object(r["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},randomizeConfigId:Boolean,configRandomisationFeatureFlag:Boolean},components:{Field:ae["Field"],SaveButton:ae["SaveButton"]},directives:{Form:ae["Form"]},data:function(){return{isLoading:!1,actualEnabled:this.anonymizeIpEnabled,actualMaskLength:this.maskLength,actualUseAnonymizedIpForVisitEnrichment:ge(this.useAnonymizedIpForVisitEnrichment),actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer,actualRandomizeConfigId:!!this.randomizeConfigId}},methods:{save:function(){var e=this;this.isLoading=!0,te["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,randomizeConfigId:this.actualRandomizeConfigId?"1":"0"}).then((function(){var e=te["NotificationsStore"].show({message:Object(te["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});te["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}},computed:{anonymizeIpEnabledHelp:function(){var e=Object(te["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(te["translate"])("PrivacyManager_AnonymizeIpDescription");return"".concat(e," ").concat(t)}}});Oe.render=pe;var je=Oe,ve={class:"optOutCustomizer"},ye=["innerHTML"],he={key:0,id:"opt-out-styling"},fe=["value"],Ve=["value"],De=["value"],Ne=["value"],Ee=Object(r["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),Se=[Ee],Ce=["value"],ke=["src"],_e={class:"form-group row"},Pe={class:"col s12 m6"},Me={for:"codeType1"},we={for:"codeType2"},ze={key:0},Ae={class:"col s12 m6"},Te=["innerHTML"],Ie={ref:"pre"},Le=["innerHTML"],Be={class:"system notification notification-info optOutTestReminder"},xe=["innerHTML"];function Fe(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createElementVNode"])("div",ve,[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,ye)]),Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutAppearance")),1),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("label",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"applyStyling",type:"checkbox",name:"applyStyling","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.applyStyling=t}),onKeydown:t[1]||(t[1]=function(t){return e.updateCode()}),onChange:t[2]||(t[2]=function(t){return e.updateCode()})},null,544),[[r["vModelCheckbox"],e.applyStyling]]),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_ApplyStyling")),1)])])]),e.applyStyling?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",he,[Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(r["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[3]||(t[3]=function(t){return e.onFontColorChange(t)}),onChange:t[4]||(t[4]=function(t){return e.onFontColorChange(t)})},null,40,fe)]),Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(r["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[5]||(t[5]=function(t){return e.onBgColorChange(t)}),onChange:t[6]||(t[6]=function(t){return e.onBgColorChange(t)})},null,40,Ve)]),Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(r["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",value:e.fontSize,onKeydown:t[7]||(t[7]=function(t){return e.onFontSizeChange(t)}),onChange:t[8]||(t[8]=function(t){return e.onFontSizeChange(t)})},null,40,De)]),Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("select",{class:"browser-default",value:e.fontSizeUnit,onKeydown:t[9]||(t[9]=function(t){return e.onFontSizeUnitChange(t)}),onChange:t[10]||(t[10]=function(t){return e.onFontSizeUnitChange(t)})},Se,40,Ne)]),Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(r["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",value:e.fontFamily,onKeydown:t[11]||(t[11]=function(t){return e.onFontFamilyChange(t)}),onChange:t[12]||(t[12]=function(t){return e.onFontFamilyChange(t)})},null,40,Ce)])])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("label",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"showIntro",type:"checkbox",name:"showIntro","onUpdate:modelValue":t[13]||(t[13]=function(t){return e.showIntro=t}),onKeydown:t[14]||(t[14]=function(t){return e.updateCode()}),onChange:t[15]||(t[15]=function(t){return e.updateCode()})},null,544),[[r["vModelCheckbox"],e.showIntro]]),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_ShowIntro")),1)])])]),Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(r["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(r["normalizeClass"])({withBg:e.withBg})},null,10,ke)]),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",_e,[Object(r["createElementVNode"])("div",Pe,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("label",Me,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"radio",id:"codeType1",name:"codeType",value:"tracker","onUpdate:modelValue":t[16]||(t[16]=function(t){return e.codeType=t}),onKeydown:t[17]||(t[17]=function(t){return e.updateCode()}),onChange:t[18]||(t[18]=function(t){return e.updateCode()})},null,544),[[r["vModelRadio"],e.codeType]]),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutUseTracker")),1)])]),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("label",we,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"radio",id:"codeType2",name:"codeType",value:"selfContained","onUpdate:modelValue":t[19]||(t[19]=function(t){return e.codeType=t}),onKeydown:t[20]||(t[20]=function(t){return e.updateCode()}),onChange:t[21]||(t[21]=function(t){return e.updateCode()})},null,544),[[r["vModelRadio"],e.codeType]]),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutUseStandalone")),1)])]),"selfContained"===e.codeType?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ze,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[22]||(t[22]=function(t){return e.language=t}),title:e.translate("General_Language"),options:e.languageOptions,onKeydown:t[23]||(t[23]=function(t){return e.updateCode()}),onChange:t[24]||(t[24]=function(t){return e.updateCode()})},null,8,["modelValue","title","options"])])])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",Ae,[Object(r["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.codeTypeHelp)},null,8,Te)])])]),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",Ie,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.codeBox)+"\n      ",1)],512),[[c,{}]])]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,Le),Object(r["createElementVNode"])("div",Be,[Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTest")),1)]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestBody")),1),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep1")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep2")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep3")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep4")),1)])])]),Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_BuildYourOwn")),1),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutCustomOptOutLink)},null,8,xe)])],64)}function Re(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 Ue=window,He=Ue.$,qe=Object(r["defineComponent"])({props:{currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},matomoUrl:String},components:{Field:ae["Field"]},directives:{CopyToClipboard:te["CopyToClipboard"]},data:function(){return{fontSizeUnit:"px",backgroundColor:"#FFFFFF",fontColor:"#000000",fontSize:"12",fontFamily:"Arial",showIntro:!0,applyStyling:!1,codeType:"tracker",code:"",language:this.currentLanguageCode}},created:function(){this.onFontColorChange=Object(te["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(te["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(te["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(te["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(te["debounce"])(this.onFontFamilyChange,50),this.matomoUrl&&this.updateCode()},methods:{onFontColorChange:function(e){this.fontColor=e.target.value,this.updateCode()},onBgColorChange:function(e){this.backgroundColor=e.target.value,this.updateCode()},onFontSizeChange:function(e){this.fontSize=e.target.value,this.updateCode()},onFontSizeUnitChange:function(e){this.fontSizeUnit=e.target.value,this.updateCode()},onFontFamilyChange:function(e){this.fontFamily=e.target.value,this.updateCode()},updateCode:function(){var e=this,t="CoreAdminHome.getOptOutJSEmbedCode";"selfContained"===this.codeType&&(t="CoreAdminHome.getOptOutSelfContainedEmbedCode"),te["AjaxHelper"].fetch({method:t,backgroundColor:this.backgroundColor.substr(1),fontColor:this.fontColor.substr(1),fontSize:this.fontSizeWithUnit,fontFamily:this.fontFamily,showIntro:!0===this.showIntro?1:0,applyStyling:!0===this.applyStyling?1:0,matomoUrl:this.matomoUrl,language:"selfContained"===this.codeType?this.language:"auto"}).then((function(t){e.code=t.value||""}))}},watch:{codeBox:function(){var e=this.$refs.pre,t=He(e).queue("fx").length>0;t||He(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit:function(){return this.fontSize?"".concat(this.fontSize).concat(this.fontSizeUnit):""},withBg:function(){return!!this.matomoUrl&&""===this.backgroundColor&&""!==this.fontColor&&Re(this.fontColor.slice(1))},codeBox:function(){return this.matomoUrl?this.code:""},iframeUrl:function(){var e=te["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,applyStyling:!0===this.applyStyling?1:0,showIntro:!0===this.showIntro?1:0});return"".concat(this.matomoUrl,"index.php?").concat(e)},readThisToLearnMore:function(){return Object(te["translate"])("General_ReadThisToLearnMore",Object(te["externalLink"])("https://matomo.org/faq/how-to/faq_25918/"),"</a>")},optOutExplanationIntro:function(){return Object(te["translate"])("CoreAdminHome_OptOutExplanationIntro",'<a href="'.concat(this.iframeUrl,'" rel="noreferrer noopener" target="_blank">'),"</a>")},optOutCustomOptOutLink:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form";return Object(te["translate"])("CoreAdminHome_OptOutCustomOptOutLink",Object(te["externalLink"])(e),"</a>")},codeTypeHelp:function(){return Object(te["translate"])("PrivacyManager_OptOutCodeTypeExplanation")}}});qe.render=Fe;var Ge=qe,$e={class:"anonymizeLogData"},Ke={class:"form-group row"},We={class:"col s12 input-field"},Ye={for:"anonymizeSite",class:"siteSelectorLabel"},Je={class:"sites_autocomplete"},Qe={class:"form-group row"},Xe={class:"col s6 input-field"},Ze={for:"anonymizeStartDate",class:"active"},et=["value"],tt={class:"col s6 input-field"},nt={for:"anonymizeEndDate",class:"active"},at=["value"],ot={name:"anonymizeIp"},rt={name:"anonymizeLocation"},it={name:"anonymizeTheUserId"},lt={class:"form-group row"},ct={class:"col s12 m6"},st={for:"visit_columns"},dt={class:"innerFormField",name:"visit_columns"},ut=["onClick","title"],mt={class:"col s12 m6"},bt={class:"form-help"},pt={class:"inline-help"},gt={class:"form-group row"},Ot={class:"col s12"},jt={class:"form-group row"},vt={class:"col s12 m6"},yt={for:"action_columns"},ht={class:"innerFormField",name:"action_columns"},ft=["onClick","title"],Vt={class:"col s12 m6"},Dt={class:"form-help"},Nt={class:"inline-help"},Et=Object(r["createElementVNode"])("span",{class:"icon-info"},null,-1);function St(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("SiteSelector"),c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("PasswordConfirmation");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",$e,[Object(r["createElementVNode"])("div",Ke,[Object(r["createElementVNode"])("div",We,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",Ye,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(r["createElementVNode"])("div",Je,[Object(r["createVNode"])(l,{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(r["createElementVNode"])("div",Qe,[Object(r["createElementVNode"])("div",Xe,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",Ze,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(r["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,et)])]),Object(r["createElementVNode"])("div",tt,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",nt,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(r["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,at)])])]),Object(r["createElementVNode"])("div",ot,[Object(r["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(r["createElementVNode"])("div",rt,[Object(r["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(r["createElementVNode"])("div",it,[Object(r["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(r["createElementVNode"])("div",lt,[Object(r["createElementVNode"])("div",ct,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",st,Object(r["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.selectedVisitColumns,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])("selectedVisitColumns selectedVisitColumns".concat(n," multiple valign-wrapper")),key:n},[Object(r["createElementVNode"])("div",dt,[Object(r["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(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeVisitColumn(n)},title:e.translate("General_Remove")},null,8,ut),[[r["vShow"],n+1!==e.selectedVisitColumns.length]])],2)})),128))])]),Object(r["createElementVNode"])("div",mt,[Object(r["createElementVNode"])("div",bt,[Object(r["createElementVNode"])("span",pt,Object(r["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(r["createElementVNode"])("div",gt,[Object(r["createElementVNode"])("div",Ot,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("General_Action")),1)])]),Object(r["createElementVNode"])("div",jt,[Object(r["createElementVNode"])("div",vt,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("label",yt,Object(r["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.selectedActionColumns,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])("selectedActionColumns selectedActionColumns".concat(n," multiple valign-wrapper")),key:n},[Object(r["createElementVNode"])("div",ht,[Object(r["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(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeActionColumn(n)},title:e.translate("General_Remove")},null,8,ft),[[r["vShow"],n+1!==e.selectedActionColumns.length]])],2)})),128))])]),Object(r["createElementVNode"])("div",Vt,[Object(r["createElementVNode"])("div",Dt,[Object(r["createElementVNode"])("span",Nt,Object(r["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(r["createElementVNode"])("p",null,[Et,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(r["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=function(t){return e.showPasswordConfirmModal=!0}),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(r["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.scheduleAnonymization},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1)]})),_:1},8,["modelValue","onConfirmed"])])}function Ct(e){return e<10?"0".concat(e):e}var kt=Object(r["defineComponent"])({components:{PasswordConfirmation:ae["PasswordConfirmation"],SiteSelector:te["SiteSelector"],Field:ae["Field"],SaveButton:ae["SaveButton"]},data:function(){var e=new Date,t="".concat(e.getFullYear(),"-").concat(Ct(e.getMonth()+1),"-").concat(Ct(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,showPasswordConfirmModal:!1}},created:function(){var e=this;this.onKeydownStartDate=Object(te["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(te["debounce"])(this.onKeydownEndDate,50),te["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})}))})),te["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=te["Matomo"].getBaseDatePickerOptions(null),n=te["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(e){var t="".concat(this.startDate,",").concat(this.endDate);this.startDate===this.endDate&&(t=this.startDate);var n={date:t};n.idSites=this.site.id,n.anonymizeIp=this.anonymizeIp?"1":"0",n.anonymizeLocation=this.anonymizeLocation?"1":"0",n.anonymizeUserId=this.anonymizeUserId?"1":"0",n.unsetVisitColumns=this.selectedVisitColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),n.unsetLinkVisitActionColumns=this.selectedActionColumns.filter((function(e){return!(null===e||void 0===e||!e.column)})).map((function(e){return e.column})),n.passwordConfirmation=e,te["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},n).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}}});kt.render=St;var _t=kt;function Pt(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("SaveButton"),s=Object(r["resolveDirective"])("form");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{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(r["createVNode"])(c,{onConfirm:t[1]||(t[1]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512)),[[s]])}var Mt=Object(r["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:ae["Field"],SaveButton:ae["SaveButton"]},directives:{Form:ae["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"),te["AjaxHelper"].post({module:"API",method:"PrivacyManager.".concat(t)}).then((function(){var e=te["NotificationsStore"].show({message:Object(te["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});te["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});Mt.render=Pt;var wt=Mt;function zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(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 Tt(e,t,n){return t&&At(e.prototype,t),n&&At(e,n),e}function It(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var Lt=function(){function e(){var t=this;zt(this,e),It(this,"privateState",Object(r["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),It(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),It(this,"enableDeleteReports",Object(r["computed"])((function(){return t.state.value.settings.enableDeleteReports}))),It(this,"enableDeleteLogs",Object(r["computed"])((function(){return t.state.value.settings.enableDeleteLogs}))),It(this,"currentRequest",void 0)}return Tt(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,n){return this.privateState.isModified=!1,te["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0",passwordConfirmation:n})).then((function(){var e=te["NotificationsStore"].show({message:Object(te["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});te["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,te["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}(),Bt=new Lt,xt={id:"formDeleteSettings"},Ft={id:"deleteLogSettingEnabled"},Rt={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},Ut=["href"],Ht={id:"deleteLogSettings"},qt={key:0},Gt={key:1};function $t(e,t,n,a,o,i){var l=this,c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("PasswordConfirmation"),u=Object(r["resolveDirective"])("form");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",xt,[Object(r["createElementVNode"])("div",Ft,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["withDirectives"])(Object(r["createElementVNode"])("div",Rt,[Object(r["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/general/faq_125"),rel:"noreferrer noopener",target:"_blank"},Object(r["toDisplayString"])(e.translate("General_ClickHere")),9,Ut)],512),[[r["vShow"],e.enabled]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ht,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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),[[r["vShow"],e.enabled]]),Object(r["createVNode"])(s,{onConfirm:t[2]||(t[2]=function(e){return l.showPasswordConfirmModal=!0}),saving:e.isLoading},null,8,["saving"]),Object(r["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.saveSettings},{default:Object(r["withCtx"])((function(){return[e.enabled&&!e.enableDeleteReports?(Object(r["openBlock"])(),Object(r["createElementBlock"])("h2",qt,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteLogsConfirm")),1)):Object(r["createCommentVNode"])("",!0),e.enabled&&e.enableDeleteReports?(Object(r["openBlock"])(),Object(r["createElementBlock"])("h2",Gt,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteBothConfirm")),1)):Object(r["createCommentVNode"])("",!0)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[u]])}var Kt=Object(r["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{PasswordConfirmation:ae["PasswordConfirmation"],Field:ae["Field"],SaveButton:ae["SaveButton"]},directives:{Form:ae["Form"]},data:function(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_logs_enable,10),deleteOlderThan:this.deleteData.config.delete_logs_older_than,showPasswordConfirmModal:!1}},created:function(){var e=this;setTimeout((function(){Bt.initSettings(e.settings)}))},methods:{saveSettings:function(e){var t=this,n="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Bt.savePurgeDataSettings(n,this.settings,e).finally((function(){t.isLoading=!1}))},reloadDbStats:function(){Bt.updateSettings(this.settings)}},computed:{settings:function(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle:function(){return"".concat(Object(te["translate"])("PrivacyManager_DeleteLogsOlderThan")," (").concat(Object(te["translate"])("Intl_PeriodDays"),")")},enableDeleteReports:function(){return!!Bt.enableDeleteReports.value}}});Kt.render=$t;var Wt=Kt,Yt={id:"formDeleteSettings"},Jt={id:"deleteReportsSettingEnabled"},Qt={class:"alert alert-warning",style:{width:"50%"}},Xt=Object(r["createElementVNode"])("br",null,null,-1),Zt=Object(r["createElementVNode"])("br",null,null,-1),en={id:"deleteReportsSettings"},tn={key:0},nn={key:1};function an(e,t,n,a,o,i){var l=this,c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("PasswordConfirmation"),u=Object(r["resolveDirective"])("form");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Yt,[Object(r["createElementVNode"])("div",Jt,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["withDirectives"])(Object(r["createElementVNode"])("div",Qt,[Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),Xt,Zt,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[r["vShow"],e.enabled]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",en,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{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),[[r["vShow"],e.enabled]]),Object(r["createVNode"])(s,{onConfirm:t[9]||(t[9]=function(e){return l.showPasswordConfirmModal=!0}),saving:e.isLoading},null,8,["saving"]),Object(r["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.saveSettings},{default:Object(r["withCtx"])((function(){return[e.enabled&&!e.enableDeleteLogs?(Object(r["openBlock"])(),Object(r["createElementBlock"])("h2",tn,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsConfirm")),1)):Object(r["createCommentVNode"])("",!0),e.enabled&&e.enableDeleteLogs?(Object(r["openBlock"])(),Object(r["createElementBlock"])("h2",nn,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteBothConfirm")),1)):Object(r["createCommentVNode"])("",!0)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[u]])}function on(e){return e?"1":"0"}var rn=Object(r["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:ae["Field"],SaveButton:ae["SaveButton"],PasswordConfirmation:ae["PasswordConfirmation"]},directives:{Form:ae["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),showPasswordConfirmModal:!1}},created:function(){var e=this;setTimeout((function(){Bt.initSettings(e.settings)}))},methods:{saveSettings:function(e){var t=this,n="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Bt.savePurgeDataSettings(n,this.settings,e).finally((function(){t.isLoading=!1}))},reloadDbStats:function(){Bt.updateSettings(this.settings)}},computed:{settings:function(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:on(this.keepBasic),keepDay:on(this.keepDataForDay),keepWeek:on(this.keepDataForWeek),keepMonth:on(this.keepDataForMonth),keepYear:on(this.keepDataForYear),keepRange:on(this.keepDataForRange),keepSegments:on(this.keepDataForSegments)}},deleteOldLogsText:function(){return Object(te["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle:function(){var e=Object(te["translate"])("PrivacyManager_DeleteReportsOlderThan");return"".concat(e," (").concat(Object(te["translate"])("Intl_PeriodMonths"),")")},deleteReportsKeepBasicTitle:function(){var e=Object(te["translate"])("PrivacyManager_KeepBasicMetrics");return"".concat(e," (").concat(Object(te["translate"])("General_Recommended"),")")},enableDeleteLogs:function(){return!!Bt.enableDeleteLogs.value}}});rn.render=an;var ln=rn,cn={id:"formDeleteSettings"},sn={id:"deleteSchedulingSettings"},dn={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},un={key:0},mn=Object(r["createElementVNode"])("br",null,null,-1),bn=Object(r["createElementVNode"])("br",null,null,-1),pn=Object(r["createElementVNode"])("br",null,null,-1),gn=Object(r["createElementVNode"])("br",null,null,-1),On={key:0,id:"deleteDataEstimateSect",class:"form-group row"},jn={class:"col s12",id:"databaseSizeHeadline"},vn={class:"col s12 m6"},yn=["innerHTML"],hn=Object(r["createTextVNode"])(" "),fn={class:"col s12 m6"},Vn={key:0,class:"form-help"},Dn={class:"ui-confirm",id:"saveSettingsBeforePurge"},Nn=["value"];function En(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("PasswordConfirmation"),u=Object(r["resolveComponent"])("ContentBlock"),m=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",cn,[Object(r["withDirectives"])(Object(r["createVNode"])(u,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",sn,[Object(r["createElementVNode"])("div",null,[Object(r["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(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",dn,[e.deleteData.lastRun?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",un,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),mn,bn])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),pn,gn,Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.executeDataPurge()}),["prevent"]))},Object(r["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[r["vShow"],e.showPurgeNowLink]]),Object(r["createVNode"])(l,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{id:"db-purged-message"},Object(r["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[r["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(r["openBlock"])(),Object(r["createElementBlock"])("div",On,[Object(r["createElementVNode"])("h3",jn,Object(r["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(r["createElementVNode"])("div",vn,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,yn),[[r["vShow"],e.showEstimate]]),hn,Object(r["createVNode"])(l,{loading:e.loadingEstimation},null,8,["loading"])]),Object(r["createElementVNode"])("div",fn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vn,[Object(r["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(r["withModifiers"])((function(t){return e.getPurgeEstimate()}),["prevent"]))},Object(r["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(r["createCommentVNode"])("",!0)])])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(s,{onConfirm:t[3]||(t[3]=function(t){return e.showPasswordConfirmModal=!0}),saving:e.isLoading},null,8,["saving"]),Object(r["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.save},null,8,["modelValue","onConfirmed"]),Object(r["createVNode"])(d,{modelValue:e.showPasswordConfirmModalForPurge,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.showPasswordConfirmModalForPurge=t}),onConfirmed:e.executePurgeNow},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_PurgeNowConfirm")),1)]})),_:1},8,["modelValue","onConfirmed"])]})),_:1},8,["content-title"]),[[r["vShow"],e.isEitherDeleteSectionEnabled]])],512),[[m]]),Object(r["createElementVNode"])("div",Dn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_SaveSettingsBeforePurge")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Ok")},null,8,Nn)])],64)}var Sn=Object(r["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:te["ContentBlock"],ActivityIndicator:te["ActivityIndicator"],Field:ae["Field"],SaveButton:ae["SaveButton"],PasswordConfirmation:ae["PasswordConfirmation"]},directives:{Form:ae["Form"]},data:function(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval,showPasswordConfirmModal:!1,showPasswordConfirmModalForPurge:!1}},methods:{save:function(e){var t="PrivacyManager.setScheduleReportDeletionSettings";Bt.savePurgeDataSettings(t,{deleteLowestInterval:this.deleteLowestInterval},e)},executeDataPurge:function(){Bt.state.value.isModified?te["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:function(){return null}}):this.showPasswordConfirmModalForPurge=!0},getPurgeEstimate:function(){return Bt.reloadDbStats(!0)},executePurgeNow:function(e){var t=this;return this.loadingDataPurge=!0,this.showPurgeNowLink=!1,te["AjaxHelper"].post({module:"API",method:"PrivacyManager.executeDataPurge"},{passwordConfirmation:e}).then((function(){Bt.reloadDbStats(),t.dataWasPurged=!0,setTimeout((function(){t.dataWasPurged=!1,t.showPurgeNowLink=!0}),2e3)})).catch((function(){t.showPurgeNowLink=!0})).finally((function(){t.loadingDataPurge=!1}))}},computed:{showEstimate:function(){return Bt.state.value.showEstimate},isEitherDeleteSectionEnabled:function(){return Bt.isEitherDeleteSectionEnabled()},estimation:function(){return Bt.state.value.estimation},loadingEstimation:function(){return Bt.state.value.loadingEstimation}}});Sn.render=En;var Cn=Sn,kn=["innerHTML"],_n=["innerHTML"],Pn=["innerHTML"],Mn=Object(r["createElementVNode"])("br",null,null,-1),wn=Object(r["createElementVNode"])("br",null,null,-1),zn=["innerHTML"],An=Object(r["createElementVNode"])("br",null,null,-1),Tn=Object(r["createElementVNode"])("br",null,null,-1),In=["innerHTML"],Ln=["innerHTML"],Bn=Object(r["createElementVNode"])("p",null,null,-1),xn=["innerHTML"];function Fn(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AskingForConsent")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_ConsentExplanation")),1)],512),[[c]]),e.consentManagerName?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,"content-title":e.translate("PrivacyManager_ConsentManager"),class:"privacyAskingForConsent"},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.consentManagerDetectedText)},null,8,kn),e.consentManagerIsConnected?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_ConsentManagerConnected",e.consentManagerName))},null,8,_n)):Object(r["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(l,{"content-title":e.translate("PrivacyManager_WhenDoINeedConsent"),class:"privacyAskingForConsent"},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded1)},null,8,Pn),Mn,wn,Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded2)},null,8,zn),An,Tn,Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded3)},null,8,In)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(l,{"content-title":e.translate("PrivacyManager_HowDoIAskForConsent"),class:"privacyAskingForConsent"},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_HowDoIAskForConsentIntro")),1),Object(r["createElementVNode"])("ul",{innerHTML:e.$sanitize(e.consentManagersList)},null,8,Ln),Bn,Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.howDoIAskForConsentOthers)},null,8,xn)]})),_:1},8,["content-title"])])}function Rn(e,t){return $n(e)||Gn(e,t)||Hn(e,t)||Un()}function Un(){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 Hn(e,t){if(e){if("string"===typeof e)return qn(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)?qn(e,t):void 0}}function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Gn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,o,r=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(a=n.next()).done);i=!0)if(r.push(a.value),t&&r.length===t)break}catch(c){l=!0,o=c}finally{try{i||null==n["return"]||n["return"]()}finally{if(l)throw o}}return r}}function $n(e){if(Array.isArray(e))return e}var Kn=Object(r["defineComponent"])({props:{consentManagerName:{type:String,required:!0},consentManagerUrl:{type:String,required:!0},consentManagerIsConnected:{type:Boolean,required:!0},consentManagers:{type:Object,required:!0}},components:{ContentBlock:te["ContentBlock"]},directives:{ContentIntro:te["ContentIntro"]},computed:{whenConsentIsNeeded1:function(){return Object(te["translate"])("PrivacyManager_WhenConsentIsNeededPart1",Object(te["externalLink"])("https://matomo.org/faq/new-to-piwik/what-is-gdpr/"),"</a>")},whenConsentIsNeeded2:function(){var e="https://matomo.org/blog/2018/04/lawful-basis-for-processing-personal-data-under-gdpr-with-matomo/";return Object(te["translate"])("PrivacyManager_WhenConsentIsNeededPart2",Object(te["externalLink"])(e),"</a>")},whenConsentIsNeeded3:function(){return Object(te["translate"])("PrivacyManager_WhenConsentIsNeededPart3",Object(te["externalLink"])("https://matomo.org/faq/how-to/faq_35661/"),"</a>")},howDoIAskForConsentOthers:function(){return Object(te["translate"])("PrivacyManager_HowDoIAskForConsentOutro",Object(te["externalLink"])("https://developer.matomo.org/guides/tracking-consent"),"</a>")},consentManagersList:function(){var e="";return Object.entries(this.consentManagers).forEach((function(t){var n=Rn(t,2),a=n[0],o=n[1],r=Object(te["externalRawLink"])(o);e+="<li>"+'  <a href="'.concat(r,'"')+'     target="_blank" rel="noreferrer noopener">'+"    ".concat(a," ").concat(Object(te["translate"])("PrivacyManager_ConsentManager"))+"  </a></li>"})),e},consentManagerDetectedText:function(){return Object(te["translate"])("PrivacyManager_ConsentManagerDetected",this.consentManagerName,'<a href="'.concat(this.consentManagerUrl,'" target="_blank" rel="noreferrer noopener">'),"</a>")}}});Kn.render=Fn;var Wn=Kn,Yn={class:"gdprOverview"},Jn=Object(r["createElementVNode"])("br",null,null,-1),Qn=Object(r["createElementVNode"])("br",null,null,-1),Xn=Object(r["createElementVNode"])("br",null,null,-1),Zn=Object(r["createElementVNode"])("br",null,null,-1),ea=["innerHTML"],ta=["innerHTML"],na=["innerHTML"],aa=["innerHTML"],oa=["innerHTML"],ra=["innerHTML"],ia=["innerHTML"],la=["innerHTML"],ca=["innerHTML"],sa=["innerHTML"],da=["innerHTML"],ua=["innerHTML"],ma=["innerHTML"],ba=["innerHTML"],pa=["innerHTML"],ga=["innerHTML"],Oa=Object(r["createElementVNode"])("br",null,null,-1);function ja(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("VueEntryContainer"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Yn,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprOverview")),1),Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro1"))+" ",1),Jn,Qn,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro2")),1)])],512),[[s]]),Object(r["createVNode"])(l,{html:e.afterGDPROverviewIntroContent},null,8,["html"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_GdprChecklists")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprChecklistDesc1"))+" ",1),Xn,Zn,Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gdprChecklistDesc2)},null,8,ea)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_IndividualsRights")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsIntro")),1),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsInform")),1),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsAccess"))},null,8,ta),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsErasure"))},null,8,na),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsRectification"))},null,8,aa),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsPortability"))},null,8,oa),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsObject","usersOptOut"))},null,8,ra),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsChildren")),1)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_AwarenessDocumentation")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationIntro")),1),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc1")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc2")),1),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc3)},null,8,ia),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc4)},null,8,la)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_SecurityProcedures")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_SecurityProceduresIntro")),1),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc1)},null,8,ca),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc2)},null,8,sa),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc3)},null,8,da),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc4)},null,8,ua)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_DataRetention")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DataRetentionInMatomo")),1),Object(r["createElementVNode"])("ul",null,[e.deleteLogsEnable?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataRemovedAfter","<strong>".concat(e.rawDataRetention,"</strong>")))},null,8,ma)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataNeverRemoved"))},null,8,ba)),e.deleteReportsEnable?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsRemovedAfter","<strong>".concat(e.reportRetention,"</strong>")))},null,8,pa)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:3,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsNeverRemoved"))},null,8,ga))]),Object(r["createElementVNode"])("p",null,[Oa,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DataRetentionOverall")),1)])]})),_:1},8,["content-title"])])}function va(e,t){return Object(te["translate"])("PrivacyManager_".concat(e),Object(te["externalLink"])(t),"</a>")}var ya=Object(r["defineComponent"])({props:{afterGDPROverviewIntroContent:String,deleteLogsEnable:Boolean,deleteReportsEnable:Boolean,rawDataRetention:null,reportRetention:null},components:{ContentBlock:te["ContentBlock"],VueEntryContainer:te["VueEntryContainer"]},directives:{ContentIntro:te["ContentIntro"]},methods:{rightsLinkText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gdprTools",n="?".concat(te["MatomoUrl"].stringify({module:"PrivacyManager",action:t}));return Object(te["translate"])("PrivacyManager_".concat(e),'<a target="_blank" rel="noreferrer noopener" href="'.concat(n,'">'),"</a>")}},computed:{gdprChecklistDesc2:function(){return va("GdprChecklistDesc2","https://matomo.org/docs/gdpr")},awarenessDocumentationDesc3:function(){return va("AwarenessDocumentationDesc3","https://matomo.org/faq/general/faq_18254/")},awarenessDocumentationDesc4:function(){return va("AwarenessDocumentationDesc4","https://matomo.org/blog/2018/04/gdpr-how-to-fill-in-the-information-asset-register-when-using-matomo/")},securityProceduresDesc1:function(){return va("SecurityProceduresDesc1","https://matomo.org/docs/security/")},securityProceduresDesc2:function(){return va("SecurityProceduresDesc2","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/international-transfers/")},securityProceduresDesc3:function(){return va("SecurityProceduresDesc3","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/personal-data-breaches/")},securityProceduresDesc4:function(){return va("SecurityProceduresDesc4","https://www.cnil.fr/en/guidelines-dpia")}}});ya.render=ja;var ha=ya,fa={key:0},Va=Object(r["createElementVNode"])("br",null,null,-1),Da={key:1},Na=Object(r["createElementVNode"])("br",null,null,-1),Ea={key:2},Sa={key:3},Ca={key:0},ka=["title"],_a={key:1},Pa=["title"],Ma={key:2},wa=["title"];function za(e,t,n,a,o,i){var l=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_PreviousRawDataAnonymizations")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_Requester")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AffectedIDSites")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AffectedDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_Anonymize")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_VisitColumns")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_LinkVisitActionColumns")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1)])]),Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.anonymizations,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.requester),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.sites.join(", ")),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.date_start)+" - "+Object(r["toDisplayString"])(t.date_end),1),Object(r["createElementVNode"])("td",null,[t.anonymize_ip?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fa,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_IPAddress")),1),Va])):Object(r["createCommentVNode"])("",!0),t.anonymize_location?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Da,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Overlay_Location")),1),Na])):Object(r["createCommentVNode"])("",!0),t.anonymize_userid?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ea,Object(r["toDisplayString"])(e.translate("General_UserId")),1)):Object(r["createCommentVNode"])("",!0),t.anonymize_ip||t.anonymize_location||t.anonymize_userid?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Sa,"-"))]),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.unset_visit_columns.join(", ")),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.unset_link_visit_action_columns.join(", ")),1),Object(r["createElementVNode"])("td",null,[t.job_start_date?t.job_start_date&&!t.job_finish_date?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",_a,[Object(r["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:"".concat(e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||""),".\n").concat(e.translate("PrivacyManager_JobStartDate",t.job_start_date),".\n").concat(e.translate("PrivacyManager_CurrentOutput",t.output))},null,8,Pa),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_InProgress")),1)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ma,[Object(r["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:"".concat(e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||""),".\n").concat(e.translate("PrivacyManager_JobStartDate",t.job_start_date),".\n").concat(e.translate("PrivacyManager_JobFinishDate",t.job_finish_date),".\n").concat(e.translate("PrivacyManager_Output",t.output))},null,8,wa),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Done")),1)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ca,[Object(r["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:"".concat(e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||""))},null,8,ka),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_Scheduled")),1)]))])])})),128))])],512),[[l]])])}var Aa=Object(r["defineComponent"])({props:{anonymizations:{type:Array,required:!0}},directives:{ContentTable:te["ContentTable"]}});Aa.render=za;var Ta=Aa,Ia=["innerHTML"],La=["innerHTML"],Ba={key:0},xa=Object(r["createElementVNode"])("a",{name:"anonymizeHistoricalData",id:"anonymizeHistoricalData"},null,-1),Fa={key:1},Ra=Object(r["createElementVNode"])("br",null,null,-1);function Ua(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("EnrichedHeadline"),c=Object(r["resolveComponent"])("AnonymizeIp"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveComponent"])("DeleteOldLogs"),u=Object(r["resolveComponent"])("DeleteOldReports"),m=Object(r["resolveComponent"])("ScheduleReportDeletion"),b=Object(r["resolveComponent"])("AnonymizeLogData"),p=Object(r["resolveComponent"])("PreviousAnonymizations"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/docs/privacy/")},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeData")),1)]})),_:1},8,["help-url"])]),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.teaserHeader),style:{"margin-right":"3.5px"}},null,8,Ia),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.seeAlsoOurOfficialGuide)},null,8,La)])],512),[[g]]),Object(r["createVNode"])(s,{id:"anonymizeIPAnchor","content-title":e.translate("PrivacyManager_UseAnonymizeTrackingData")},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(c,{"anonymize-ip-enabled":e.anonymizeIpEnabled,"anonymize-user-id":e.anonymizeUserId,"mask-length":e.maskLength,"use-anonymized-ip-for-visit-enrichment":e.useAnonymizedIpForVisitEnrichment,"anonymize-order-id":e.anonymizeOrderId,"force-cookieless-tracking":e.forceCookielessTracking,"anonymize-referrer":e.anonymizeReferrer,"mask-length-options":e.maskLengthOptions,"use-anonymized-ip-for-visit-enrichment-options":e.useAnonymizedIpForVisitEnrichmentOptions,"tracker-file-name":e.trackerFileName,"tracker-writable":e.trackerWritable,"referrer-anonymization-options":e.referrerAnonymizationOptions,"randomize-config-id":e.randomizeConfigId,"config-randomisation-feature-flag":e.configRandomisationFeatureFlag},null,8,["anonymize-ip-enabled","anonymize-user-id","mask-length","use-anonymized-ip-for-visit-enrichment","anonymize-order-id","force-cookieless-tracking","anonymize-referrer","mask-length-options","use-anonymized-ip-for-visit-enrichment-options","tracker-file-name","tracker-writable","referrer-anonymization-options","randomize-config-id","config-randomisation-feature-flag"])]})),_:1},8,["content-title"]),e.isDataPurgeSettingsEnabled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ba,[Object(r["createVNode"])(s,{id:"deleteLogsAnchor","content-title":e.translate("PrivacyManager_DeleteOldRawData")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteDataDescription")),1),Object(r["createVNode"])(d,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])]})),_:1},8,["content-title"]),Object(r["createVNode"])(s,{id:"deleteReportsAnchor","content-title":e.translate("PrivacyManager_DeleteOldAggregatedReports")},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(u,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])]})),_:1},8,["content-title"]),Object(r["createVNode"])(m,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])])):Object(r["createCommentVNode"])("",!0),xa,Object(r["createVNode"])(s,{"content-title":e.translate("PrivacyManager_AnonymizePreviousData"),class:"logDataAnonymizer"},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataDescription")),1),e.isSuperUser?(Object(r["openBlock"])(),Object(r["createBlock"])(b,{key:0})):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",Fa,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataOnlySuperUser")),1)),Ra,Object(r["createVNode"])(p,{anonymizations:e.anonymizations},null,8,["anonymizations"])]})),_:1},8,["content-title"])])}var Ha=Object(r["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},isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0},anonymizations:{type:Array,required:!0},isSuperUser:Boolean,randomizeConfigId:Boolean,configRandomisationFeatureFlag:Boolean},components:{AnonymizeIp:je,EnrichedHeadline:te["EnrichedHeadline"],ContentBlock:te["ContentBlock"],DeleteOldLogs:Wt,DeleteOldReports:ln,ScheduleReportDeletion:Cn,AnonymizeLogData:_t,PreviousAnonymizations:Ta},directives:{ContentIntro:te["ContentIntro"]},computed:{teaserHeader:function(){return Object(te["translate"])("PrivacyManager_TeaserHeader",'<a href="#anonymizeIPAnchor">',"</a>",'<a href="#deleteLogsAnchor">',"</a>",'<a href="#anonymizeHistoricalData">',"</a>")},seeAlsoOurOfficialGuide:function(){return Object(te["translate"])("PrivacyManager_SeeAlsoOurOfficialGuidePrivacy",Object(te["externalLink"])("https://matomo.org/privacy/"),"</a>")}}});Ha.render=Ua;var qa=Ha,Ga={key:0},$a=Object(r["createElementVNode"])("br",null,null,-1),Ka={key:1};function Wa(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("OptOutCustomizer"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveComponent"])("Alert"),d=Object(r["resolveComponent"])("DoNotTrackPreference");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_TrackingOptOut")},{default:Object(r["withCtx"])((function(){return[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.prefaceComponentsResolved,(function(e,t){return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e),{key:t})})),128)),Object(r["createVNode"])(l,{"matomo-url":e.matomoUrl,language:e.language,"language-options":e.languageOptions},null,8,["matomo-url","language","language-options"])]})),_:1},8,["content-title"]),e.isSuperUser?(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,id:"DNT","content-title":e.translate("PrivacyManager_DoNotTrack_SupportDNTPreference")},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(s,{severity:"warning"},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Deprecated")),1)]})),_:1}),Object(r["createElementVNode"])("p",null,[e.dntSupport?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ga,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Enabled")),1),$a,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_EnabledMoreInfo")),1)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ka,Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Disabled"))+" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_DisabledMoreInfo")),1))]),Object(r["createVNode"])(d,{"dnt-support":e.dntSupport,"do-not-track-options":e.doNotTrackOptions},null,8,["dnt-support","do-not-track-options"])]})),_:1},8,["content-title"])):Object(r["createCommentVNode"])("",!0)])}var Ya=Object(r["defineComponent"])({props:{language:{type:String,required:!0},matomoUrl:String,isSuperUser:Boolean,dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0},languageOptions:{type:Object,required:!0}},components:{Alert:te["Alert"],ContentBlock:te["ContentBlock"],DoNotTrackPreference:wt,OptOutCustomizer:Ge},data:function(){return{prefaceComponents:[]}},computed:{prefaceComponentsResolved:function(){return Object(r["markRaw"])(this.prefaceComponents.map((function(e){return Object(r["markRaw"])(Object(te["useExternalPluginComponent"])(e.plugin,e.component))})))}},created:function(){var e=[];te["Matomo"].postEvent("PrivacyManager.UsersOptOut.preface",e),this.prefaceComponents=e}});Ya.render=Wa;var Ja=Ya;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["MobileMessaging"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["MobileMessaging"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/MobileMessaging/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},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ReportParameters",(function(){return N})),n.d(t,"ManageSmsProvider",(function(){return q})),n.d(t,"SmsProviderCredentials",(function(){return H})),n.d(t,"DelegateMobileMessagingSettings",(function(){return I})),n.d(t,"ManageMobilePhoneNumbers",(function(){return je})),n.d(t,"SelectPhoneNumbers",(function(){return f})),n.d(t,"AdminPage",(function(){return Ae})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var i=n("8bbf"),a={key:0};function l(e,t,n,o,r,l){var c=Object(i["resolveComponent"])("SelectPhoneNumbers");return e.report&&"mobile"===e.report.type?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",a,[Object(i["createVNode"])(c,{"phone-numbers":e.phoneNumbers,"with-introduction":!0,"model-value":e.report.phoneNumbers,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("change","phoneNumbers",t)})},null,8,["phone-numbers","model-value"])])):Object(i["createCommentVNode"])("",!0)}var c={class:"mobile"},s={id:"mobilePhoneNumbersHelp",class:"inline-help-node"},d=Object(i["createElementVNode"])("span",{class:"icon-info",style:{"margin-right":"3.5px"}},null,-1),u={key:0,style:{"margin-right":"3.5px"}},m={key:1,style:{"margin-right":"3.5px"}},b=["href"];function p(e,t,n,o,r,a){var l=Object(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",c,[Object(i["createVNode"])(l,{uicontrol:"checkbox","var-type":"array",name:"phoneNumbers","model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t)}),introduction:e.withIntroduction?e.translate("ScheduledReports_SendReportTo"):void 0,title:e.translate("MobileMessaging_PhoneNumbers"),disabled:0===e.phoneNumbers.length,options:e.phoneNumbers},{"inline-help":Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("div",s,[d,0===e.phoneNumbers.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",u,Object(i["toDisplayString"])(e.translate("MobileMessaging_MobileReport_NoPhoneNumbers")),1)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",m,Object(i["toDisplayString"])(e.translate("MobileMessaging_MobileReport_AdditionalPhoneNumbers")),1)),Object(i["createElementVNode"])("a",{href:e.linkTo({module:"MobileMessaging",action:"index",updated:null})},Object(i["toDisplayString"])(e.translate("MobileMessaging_MobileReport_MobileMessagingSettingsLink")),9,b)])]})),_:1},8,["model-value","introduction","title","disabled","options"])])}var g=n("19dc"),v=n("a5a2"),h=Object(i["defineComponent"])({props:{modelValue:Array,phoneNumbers:{type:[Array,Object],required:!0},withIntroduction:Boolean},emits:["update:modelValue"],components:{Field:v["Field"]},methods:{linkTo:function(e){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),e)))}}});h.render=p;var f=h,j="mobile",O=Object(i["defineComponent"])({props:{report:{type:Object,required:!0},phoneNumbers:{type:[Array,Object],required:!0}},components:{SelectPhoneNumbers:f},emits:["change"],created:function(){var e=window,t=e.resetReportParametersFunctions,n=e.updateReportParametersFunctions,o=e.getReportParametersFunctions;t[j]||(t[j]=function(e){e.phoneNumbers=[],e.formatmobile="sms"}),n[j]||(n[j]=function(e){null!==e&&void 0!==e&&e.parameters&&(e.parameters&&e.parameters.phoneNumbers&&(e.phoneNumbers=e.parameters.phoneNumbers),e.formatmobile="sms")}),o[j]||(o[j]=function(e){var t=e.phoneNumbers;return{phoneNumbers:t||[""]}})}});O.render=l;var N=O,M=Object(i["createElementVNode"])("div",{id:"ajaxErrorManageSmsProviderSettings"},null,-1),S={key:0},y={key:0},C=Object(i["createElementVNode"])("br",null,null,-1),P={key:1},V=Object(i["createElementVNode"])("br",null,null,-1),A=["innerHTML"],E={key:1},_={id:"accountForm"},k=["innerHTML"];function B(e,t,n,o,r,a){var l=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SmsProviderCredentials"),d=Object(i["resolveComponent"])("SaveButton"),u=Object(i["resolveDirective"])("form");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createVNode"])(l,{loading:e.isDeletingAccount},null,8,["loading"]),M,e.credentialSupplied?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",S,[e.credentialError?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",y,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_CredentialInvalid",e.provider)),1),C,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.credentialError),1)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",P,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_CredentialProvided",e.provider))+" "+Object(i["toDisplayString"])(e.creditLeft),1)),V,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.updateOrDeleteAccountText),onClick:t[0]||(t[0]=function(t){return e.onUpdateOrDeleteClick(t)})},null,8,A)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",E,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_PleaseSignUp")),1)),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",_,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{uicontrol:"select",name:"smsProviders",modelValue:e.smsProvider,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.smsProvider=t}),title:e.translate("MobileMessaging_Settings_SMSProvider"),options:e.smsProviderOptions,value:e.provider},null,8,["modelValue","title","options","value"])]),Object(i["createVNode"])(s,{provider:e.smsProvider,modelValue:e.credentials,"onUpdate:modelValue":[t[2]||(t[2]=function(t){return e.credentials=t}),t[3]||(t[3]=function(t){e.credentials=t})],"model-value":e.credentials},null,8,["provider","modelValue","model-value"]),Object(i["createVNode"])(d,{id:"apiAccountSubmit",disabled:!e.isUpdateAccountPossible,saving:e.isUpdatingAccount,onConfirm:t[4]||(t[4]=function(t){return e.updateAccount()})},null,8,["disabled","saving"]),Object(i["createElementVNode"])("div",{class:"providerDescription",innerHTML:e.$sanitize(e.currentProviderDescription)},null,8,k)],512),[[i["vShow"],!e.credentialSupplied||e.showAccountForm],[u]])])}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={key:0};function U(e,t,n,o,r,a){var l=Object(i["resolveComponent"])("Field");return e.fields?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",w,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.fields,(function(t){var n;return Object(i["openBlock"])(),Object(i["createBlock"])(l,{key:t.name,uicontrol:t.type,name:t.name,"model-value":null===(n=e.modelValue)||void 0===n?void 0:n[t.name],"onUpdate:modelValue":function(n){return e.$emit("update:modelValue",Object.assign(Object.assign({},e.modelValue),{},x({},t.name,n)))},title:e.translate(t.title)},null,8,["uicontrol","name","model-value","onUpdate:modelValue","title"])})),128))])):Object(i["createCommentVNode"])("",!0)}var D=Object(i["reactive"])({}),F=Object(i["defineComponent"])({props:{provider:{type:String,required:!0},modelValue:Object},emits:["update:modelValue"],components:{Field:v["Field"]},watch:{provider:function(){this.$emit("update:modelValue",null),this.getCredentialFields()}},created:function(){this.getCredentialFields()},methods:{getCredentialFields:function(){var e=this;D[this.provider]?this.$emit("update:modelValue",Object.fromEntries(D[this.provider].map((function(e){return[e.name,null]})))):g["AjaxHelper"].fetch({module:"MobileMessaging",action:"getCredentialFields",provider:this.provider}).then((function(t){e.$emit("update:modelValue",Object.fromEntries(t.map((function(e){return[e.name,null]})))),D[e.provider]=t}))}},computed:{fields:function(){return D[this.provider]}}});F.render=U;var H=F,T=Object(i["defineComponent"])({props:{credentialSupplied:Boolean,credentialError:String,provider:String,creditLeft:[Number,String],smsProviderOptions:{type:Object,required:!0},smsProviders:{type:Object,required:!0}},components:{ActivityIndicator:g["ActivityIndicator"],Field:v["Field"],SaveButton:v["SaveButton"],SmsProviderCredentials:H},directives:{Form:v["Form"]},data:function(){return{isDeletingAccount:!1,isUpdatingAccount:!1,showAccountForm:!1,credentials:null,smsProvider:this.provider}},methods:{deleteApiAccount:function(){var e=this;this.isDeletingAccount=!0,g["AjaxHelper"].fetch({method:"MobileMessaging.deleteSMSAPICredential"},{errorElement:"#ajaxErrorManageSmsProviderSettings"}).then((function(){g["Matomo"].helper.redirect()})).finally((function(){e.isDeletingAccount=!1}))},showUpdateAccount:function(){this.showAccountForm=!0},updateAccount:function(){var e=this;this.isUpdateAccountPossible&&(this.isUpdatingAccount=!0,g["AjaxHelper"].post({method:"MobileMessaging.setSMSAPICredential"},{provider:this.smsProvider,credentials:this.credentials},{errorElement:"#ajaxErrorManageSmsProviderSettings"}).then((function(){g["Matomo"].helper.redirect()})).finally((function(){e.isUpdatingAccount=!1})))},deleteAccount:function(){var e=this;g["Matomo"].helper.modalConfirm("#confirmDeleteAccount",{yes:function(){e.isDeletingAccount=!0,g["AjaxHelper"].fetch({method:"MobileMessaging.deleteSMSAPICredential"},{errorElement:"#ajaxErrorManageSmsProviderSettings"}).then((function(){e.isDeletingAccount=!1,g["Matomo"].helper.redirect()})).finally((function(){e.isDeletingAccount=!1}))}})},onUpdateOrDeleteClick:function(e){var t=e.target;"displayAccountForm"===t.id?this.showUpdateAccount():"deleteAccount"===t.id&&this.deleteAccount()}},computed:{isUpdateAccountPossible:function(){return!!this.smsProvider&&null!==this.credentials&&Object.values(this.credentials).every((function(e){return!!e}))},updateOrDeleteAccountText:function(){return Object(g["translate"])("MobileMessaging_Settings_UpdateOrDeleteAccount",'<a id="displayAccountForm">',"</a>",'<a id="deleteAccount">',"</a>")},currentProviderDescription:function(){return this.smsProvider&&this.smsProviders?this.smsProviders[this.smsProvider]:""}}});T.render=B;var q=T;function L(e,t,n,o,r,a){var l=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"radio",name:"delegatedManagement",title:e.translate("MobileMessaging_Settings_LetUsersManageAPICredential"),modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),"full-width":!0,options:e.delegateManagementOptions},null,8,["title","modelValue","options"])]),Object(i["createVNode"])(c,{onConfirm:t[1]||(t[1]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])])}var R=Object(i["defineComponent"])({props:{delegateManagementOptions:{type:Array,required:!0},delegatedManagement:[Number,Boolean]},components:{Field:v["Field"],SaveButton:v["SaveButton"]},data:function(){return{isLoading:!1,enabled:this.delegatedManagement?1:0}},methods:{save:function(){var e=this;this.isLoading=!0,g["AjaxHelper"].post({method:"MobileMessaging.setDelegatedManagement"},{delegatedManagement:this.enabled&&"0"!==this.enabled?"true":"false"}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"mobileMessagingSettings",type:"transient",context:"success"});g["NotificationsStore"].scrollToNotification(e),g["Matomo"].helper.redirect()})).finally((function(){e.isLoading=!1}))}}});R.render=L;var I=R,$={key:0},G={class:"row"},Y={class:"col s12"},z={class:"form-group row"},J={class:"col s12 m6"},K={class:"col s12 m6 form-help"},Q={class:"form-group row addPhoneNumber"},W={class:"col s12 m6"},X={class:"countryCode left"},Z=Object(i["createElementVNode"])("span",{class:"countryCodeSymbol"},"+",-1),ee={class:"phoneNumber left"},te={class:"addNumber left valign-wrapper"},ne={class:"col s12 m6 form-help"},oe={id:"ajaxErrorManagePhoneNumber",ref:"errorContainer"},re=Object(i["createElementVNode"])("div",{id:"notificationManagePhoneNumber"},null,-1),ie={key:1,class:"row"},ae={class:"col s12"},le={class:"col s12 m6"},ce={class:"phoneNumber"},se=["onUpdate:modelValue","placeholder"],de={key:0,class:"form-help col s12 m6"},ue=["onClick"],me=Object(i["createTextVNode"])("   "),be={class:"ui-confirm",id:"confirmDeletePhoneNumber"},pe=["innerHTML"],ge=["value"],ve=["value"];function he(e,t,n,o,r,a){var l=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveComponent"])("Alert"),d=Object(i["resolveComponent"])("ActivityIndicator");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_PhoneNumbers_Help")),1),e.isSuperUser?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",$,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_DelegatedPhoneNumbersOnlyUsedByYou")),1)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",G,[Object(i["createElementVNode"])("h3",Y,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_PhoneNumbers_Add")),1)]),Object(i["createElementVNode"])("div",z,[Object(i["createElementVNode"])("div",J,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"select",name:"countryCodeSelect",title:e.translate("MobileMessaging_Settings_SelectCountry"),modelValue:e.countryCallingCode,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.countryCallingCode=t}),"full-width":!0,options:e.countries},null,8,["title","modelValue","options"])])]),Object(i["createElementVNode"])("div",K,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_PhoneNumbers_CountryCode_Help")),1)]),Object(i["createElementVNode"])("div",Q,[Object(i["createElementVNode"])("div",W,[Object(i["createElementVNode"])("div",X,[Z,Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"text",name:"countryCallingCode",title:e.translate("MobileMessaging_Settings_CountryCode"),modelValue:e.countryCallingCode,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.countryCallingCode=t}),"full-width":!0,maxlength:4},null,8,["title","modelValue"])])]),Object(i["createElementVNode"])("div",ee,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"text",name:"newPhoneNumber",modelValue:e.newPhoneNumber,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.newPhoneNumber=t}),title:e.translate("MobileMessaging_Settings_PhoneNumber"),"full-width":!0,maxlength:80},null,8,["modelValue","title"])])]),Object(i["createElementVNode"])("div",te,[Object(i["createVNode"])(c,{class:"valign",disabled:!e.canAddNumber||e.isUpdatingPhoneNumbers,onConfirm:t[3]||(t[3]=function(t){return e.addPhoneNumber()}),value:e.translate("General_Add")},null,8,["disabled","value"])]),Object(i["withDirectives"])(Object(i["createVNode"])(s,{severity:"warning",id:"suspiciousPhoneNumber"},{default:Object(i["withCtx"])((function(){return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_SuspiciousPhoneNumber","54184032")),1)]})),_:1},512),[[i["vShow"],e.showSuspiciousPhoneNumber]])]),Object(i["createElementVNode"])("div",ne,Object(i["toDisplayString"])(e.strHelpAddPhone),1)]),Object(i["createElementVNode"])("div",oe,null,512),re,Object.keys(e.phoneNumbers||{}).length>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ie,[Object(i["createElementVNode"])("h3",ae,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_ManagePhoneNumbers")),1)])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(d,{loading:e.isUpdatingPhoneNumbers},null,8,["loading"]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.phoneNumbers||[],(function(t,n,o){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"form-group row",key:o},[Object(i["createElementVNode"])("div",le,[Object(i["createElementVNode"])("span",ce,Object(i["toDisplayString"])(n),1),t.verified?Object(i["createCommentVNode"])("",!0):Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("input",{key:0,type:"text",class:"verificationCode","onUpdate:modelValue":function(t){return e.validationCode[o]=t},placeholder:e.translate("MobileMessaging_Settings_EnterActivationCode"),style:{"margin-right":"3.5px"}},null,8,se)),[[i["vModelText"],e.validationCode[o]]]),t.verified?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:1,disabled:!e.validationCode[o]||e.isUpdatingPhoneNumbers,onConfirm:function(t){return e.validateActivationCode(n,o)},value:e.translate("MobileMessaging_Settings_ValidatePhoneNumber")},null,8,["disabled","onConfirm","value"])),Object(i["createVNode"])(c,{disabled:e.isUpdatingPhoneNumbers,onConfirm:function(t){return e.removePhoneNumber(n)},value:e.translate("General_Remove"),style:{"margin-left":"3.5px"}},null,8,["disabled","onConfirm","value"])]),t.verified?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",de,[Object(i["createElementVNode"])("div",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_VerificationCodeJustSent"))+" ",1),Object(i["createElementVNode"])("a",{onClick:function(t){return e.resendVerificationCode(n,o)}},Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_ResendVerification")),9,ue)]),me]))])})),128))]),Object(i["createElementVNode"])("div",be,[Object(i["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.removeNumberConfirmation)},null,8,pe),Object(i["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,ge),Object(i["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,ve)])],64)}var fe=Object(i["defineComponent"])({props:{isSuperUser:Boolean,defaultCallingCode:String,countries:{type:Array,required:!0},strHelpAddPhone:{type:String,required:!0}},components:{Field:v["Field"],SaveButton:v["SaveButton"],Alert:g["Alert"],ActivityIndicator:g["ActivityIndicator"]},data:function(){return{isUpdatingPhoneNumbers:!1,phoneNumbers:{},countryCallingCode:this.defaultCallingCode||"",newPhoneNumber:"",validationCode:{},numberToRemove:""}},mounted:function(){this.updatePhoneNumbers()},methods:{validateActivationCode:function(e,t){var n=this;if(this.validationCode[t]){var o=this.validationCode[t];this.isUpdatingPhoneNumbers=!0,this.clearNotifcationsAndErrorsContainer(),g["AjaxHelper"].post({method:"MobileMessaging.validatePhoneNumber"},{phoneNumber:e,verificationCode:o},{errorElement:"#ajaxErrorManagePhoneNumber"}).then((function(e){var t;if(e&&e.value){var o=Object(g["translate"])("MobileMessaging_Settings_PhoneActivated");t=g["NotificationsStore"].show({message:o,placeat:"#notificationManagePhoneNumber",context:"success",id:"MobileMessaging_ValidatePhoneNumber",type:"transient"}),n.updatePhoneNumbers()}else{var r=Object(g["translate"])("MobileMessaging_Settings_InvalidActivationCode");t=g["NotificationsStore"].show({message:r,placeat:"#notificationManagePhoneNumber",context:"error",id:"MobileMessaging_ValidatePhoneNumber",type:"transient"})}g["NotificationsStore"].scrollToNotification(t)})).finally((function(){n.validationCode[t]="",n.isUpdatingPhoneNumbers=!1}))}},resendVerificationCode:function(e){var t=this;this.isUpdatingPhoneNumbers=!0,this.clearNotifcationsAndErrorsContainer(),g["AjaxHelper"].post({method:"MobileMessaging.resendVerificationCode"},{phoneNumber:e},{errorElement:"#ajaxErrorManagePhoneNumber"}).then((function(){var e=Object(g["translate"])("MobileMessaging_Settings_NewVerificationCodeSent"),n=g["NotificationsStore"].show({message:e,placeat:"#notificationManagePhoneNumber",context:"success",id:"MobileMessaging_ValidatePhoneNumber",type:"transient"});g["NotificationsStore"].scrollToNotification(n),t.updatePhoneNumbers()})).finally((function(){t.isUpdatingPhoneNumbers=!1}))},updatePhoneNumbers:function(){var e=this;this.isUpdatingPhoneNumbers=!0,g["AjaxHelper"].post({method:"MobileMessaging.getPhoneNumbers"},{}).then((function(t){e.phoneNumbers=t,e.isUpdatingPhoneNumbers=!1}))},removePhoneNumber:function(e){var t=this;e&&(this.numberToRemove=e,this.clearNotifcationsAndErrorsContainer(),g["Matomo"].helper.modalConfirm("#confirmDeletePhoneNumber",{yes:function(){t.isUpdatingPhoneNumbers=!0,g["AjaxHelper"].post({method:"MobileMessaging.removePhoneNumber"},{phoneNumber:e},{errorElement:"#ajaxErrorManagePhoneNumber"}).then((function(){t.updatePhoneNumbers()})).finally((function(){t.isUpdatingPhoneNumbers=!1,t.numberToRemove=""}))}}))},addPhoneNumber:function(){var e=this,t="+".concat(this.countryCallingCode).concat(this.newPhoneNumber);this.canAddNumber&&t.length>1&&(this.isUpdatingPhoneNumbers=!0,this.clearNotifcationsAndErrorsContainer(),g["AjaxHelper"].post({method:"MobileMessaging.addPhoneNumber"},{phoneNumber:t},{errorElement:"#ajaxErrorManagePhoneNumber"}).then((function(){e.updatePhoneNumbers(),e.countryCallingCode="",e.newPhoneNumber=""})).finally((function(){e.isUpdatingPhoneNumbers=!1})))},clearNotifcationsAndErrorsContainer:function(){this.$refs.errorContainer.innerHTML="",g["NotificationsStore"].remove("MobileMessaging_ValidatePhoneNumber")}},computed:{showSuspiciousPhoneNumber:function(){return 0===this.newPhoneNumber.trim().lastIndexOf("0",0)},canAddNumber:function(){return!!this.newPhoneNumber&&""!==this.newPhoneNumber},removeNumberConfirmation:function(){return Object(g["translate"])("MobileMessaging_ConfirmRemovePhoneNumber",this.numberToRemove)}}});fe.render=he;var je=fe,Oe={class:"manageMobileMessagingSettings"},Ne={key:0},Me={key:0},Se={class:"ui-confirm",id:"confirmDeleteAccount"},ye=["value"],Ce=["value"];function Pe(e,t,n,o,r,a){var l=Object(i["resolveComponent"])("DelegateMobileMessagingSettings"),c=Object(i["resolveComponent"])("ContentBlock"),s=Object(i["resolveComponent"])("ManageSmsProvider"),d=Object(i["resolveComponent"])("ManageMobilePhoneNumbers");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Oe,[e.isSuperUser?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,"content-title":e.translate("MobileMessaging_SettingsMenu")},{default:Object(i["withCtx"])((function(){return[Object(i["createVNode"])(l,{"delegate-management-options":e.delegateManagementOptions,"delegated-management":e.delegatedManagement},null,8,["delegate-management-options","delegated-management"])]})),_:1},8,["content-title"])):Object(i["createCommentVNode"])("",!0),e.accountManagedByCurrentUser?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:1,"content-title":e.translate("MobileMessaging_Settings_SMSProvider"),feature:"true"},{default:Object(i["withCtx"])((function(){return[e.isSuperUser&&e.delegatedManagement?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",Ne,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_DelegatedSmsProviderOnlyAppliesToYou")),1)):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{"credential-supplied":e.credentialSupplied,"credential-error":e.credentialError,provider:e.provider,"credit-left":e.creditLeft,"sms-provider-options":e.smsProviderOptions,"sms-providers":e.smsProviders},null,8,["credential-supplied","credential-error","provider","credit-left","sms-provider-options","sms-providers"])]})),_:1},8,["content-title"])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(c,{"content-title":e.translate("MobileMessaging_PhoneNumbers")},{default:Object(i["withCtx"])((function(){return[e.credentialSupplied?(Object(i["openBlock"])(),Object(i["createBlock"])(d,{key:1,"is-super-user":e.isSuperUser,"default-calling-code":e.defaultCallingCode,countries:e.countries,"str-help-add-phone":e.strHelpAddPhone,"phone-numbers":e.phoneNumbers},null,8,["is-super-user","default-calling-code","countries","str-help-add-phone","phone-numbers"])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",Me,Object(i["toDisplayString"])(e.accountManagedByCurrentUser?e.translate("MobileMessaging_Settings_CredentialNotProvided"):e.translate("MobileMessaging_Settings_CredentialNotProvidedByAdmin")),1))]})),_:1},8,["content-title"]),Object(i["createElementVNode"])("div",Se,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("MobileMessaging_Settings_DeleteAccountConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ye),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Ce)])])}var Ve=Object(i["defineComponent"])({props:{delegateManagementOptions:{type:Array,required:!0},delegatedManagement:[Number,Boolean],isSuperUser:Boolean,defaultCallingCode:String,countries:{type:Array,required:!0},strHelpAddPhone:{type:String,required:!0},phoneNumbers:Object,accountManagedByCurrentUser:Boolean,credentialSupplied:Boolean,credentialError:String,provider:String,creditLeft:[Number,String],smsProviderOptions:{type:Object,required:!0},smsProviders:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],DelegateMobileMessagingSettings:I,ManageMobilePhoneNumbers:je,ManageSmsProvider:q}});Ve.render=Pe;var Ae=Ve;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(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["Morpheus"]=t(require("CoreHome"),require("vue")):e["Morpheus"]=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 c=t[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,n),c.l=!0,c.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 c in e)n.d(o,c,function(t){return e[t]}.bind(null,c));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/Morpheus/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,"Demo",(function(){return k})),"undefined"!==typeof window){var o=window.document.currentScript,c=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(n.p=c[1])}var r=n("8bbf"),i=Object(r["createElementVNode"])("h2",null,"Icons",-1),l={id:"icons",class:"demo icons"},p={class:"row"},u=Object(r["createElementVNode"])("div",{class:"demo-code"},[Object(r["createElementVNode"])("pre",null,'<span class="icon-ok"></span>')],-1);function d(e,t,n,o,c,d){var s=Object(r["resolveComponent"])("DemoCodePair");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.demoSnippets,(function(e){return Object(r["openBlock"])(),Object(r["createBlock"])(s,{key:e.id,snippet:e},null,8,["snippet"])})),128)),i,Object(r["createElementVNode"])("div",l,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.icons,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t),1),Object(r["createElementVNode"])("div",p,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s4 icon",key:t},[Object(r["createElementVNode"])("span",{class:Object(r["normalizeClass"])("icon-".concat(e))},null,2),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e),1)])})),128))])])})),128))]),u])}var s={key:0},a={key:1,class:"demo"},b={key:2,class:"demo-code"},m={key:3};function j(e,t,n,o,c,i){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{style:Object(r["normalizeStyle"])({"margin-top":e.snippet.noMargin?"-16px":void 0})},[e.snippet.title?(Object(r["openBlock"])(),Object(r["createElementBlock"])("h2",s,Object(r["toDisplayString"])(e.snippet.title),1)):Object(r["createCommentVNode"])("",!0),e.snippet.vue_embed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",a,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.vueEmbedComponent)))])):Object(r["createCommentVNode"])("",!0),e.snippet.code?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",b,[Object(r["createElementVNode"])("pre",null,Object(r["toDisplayString"])(e.processedSnippetCode),1)])):Object(r["createCommentVNode"])("",!0),e.snippet.desc?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",m,Object(r["toDisplayString"])(e.snippet.desc),1)):Object(r["createCommentVNode"])("",!0)],4)}var f=n("19dc"),O=Object(r["defineComponent"])({props:{snippet:{type:Object,required:!0}},computed:{vueEmbedComponent:function(){var e=this.snippet,t={};(e.components||[]).forEach((function(e){t[e.component]=Object(f["useExternalPluginComponent"])(e.plugin,e.component)}));var n={};(e.directives||[]).forEach((function(e){n[e.directive]=window[e.plugin][e.directive]}));var o=this.snippet.data||{};return Object(r["markRaw"])({template:this.snippet.vue_embed,components:t,directives:n,data:function(){return o}})},processedSnippetCode:function(){var e=this.snippet,t=e.code.indexOf("%vue_embed%"),n=e.code.lastIndexOf("\n",t),o=e.code.substring(n+1,t);return e.code.replaceAll("%vue_embed%",e.vue_embed.replaceAll("\n","\n".concat(o)))}}});O.render=j;var v=O,y=Object(r["defineComponent"])({props:{demoSnippets:{type:Array,required:!0},icons:{type:Object,required:!0}},components:{DemoCodePair:v}});y.render=d;var k=y;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,n),l.l=!0,l.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 l in e)n.d(a,l,function(t){return e[t]}.bind(null,l));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/Marketplace/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},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return Pn})),n.d(t,"ManageLicenseKey",(function(){return Fn})),n.d(t,"GetNewPlugins",(function(){return Xn})),n.d(t,"GetNewPluginsAdmin",(function(){return da})),n.d(t,"GetPremiumFeatures",(function(){return Ea})),n.d(t,"MissingReqsNotice",(function(){return gn})),n.d(t,"OverviewIntro",(function(){return Da})),n.d(t,"SubscriptionOverview",(function(){return il})),n.d(t,"RichMenuButton",(function(){return bl})),n.d(t,"PluginList",(function(){return Tn})),"undefined"!==typeof window){var a=window.document.currentScript,l=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(n.p=l[1])}var r=n("8bbf"),i={class:"row marketplaceActions",ref:"root"},o={class:"col s12 m6 l4"},c={class:"col s12 m6 l4"},s={key:0,class:"col s12 m12 l4 "},u={class:"plugin-search"},d=Object(r["createElementVNode"])("span",{class:"icon-search"},null,-1),p=["alt"];function m(e,t,n,a,l,m){var b,g=this,O=Object(r["resolveComponent"])("Field"),j=Object(r["resolveComponent"])("PluginList"),h=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createElementVNode"])("div",i,[Object(r["createElementVNode"])("div",o,[Object(r["createVNode"])(O,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":e.updateType,title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","onUpdate:modelValue","title","options"])]),Object(r["createElementVNode"])("div",c,[Object(r["createVNode"])(O,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":e.updateSort,title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","onUpdate:modelValue","title","options"])]),(null===(b=e.pluginsToShow)||void 0===b?void 0:b.length)>20||e.searchQuery?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",s,[Object(r["createElementVNode"])("div",u,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(O,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,"model-value":e.searchQuery,"onUpdate:modelValue":e.updateQuery},null,8,["title","model-value","onUpdate:modelValue"])]),d])])):Object(r["createCommentVNode"])("",!0)],512),!e.loading&&e.pluginsToShow.length>0?(Object(r["openBlock"])(),Object(r["createBlock"])(j,{key:0,"plugins-to-show":e.pluginsToShow,"current-user-email":e.currentUserEmail,"is-auto-update-possible":e.isAutoUpdatePossible,"is-super-user":e.isSuperUser,"is-multi-server-environment":e.isMultiServerEnvironment,"has-some-admin-access":e.hasSomeAdminAccess,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-valid-consumer":e.isValidConsumer,"deactivate-nonce":e.deactivateNonce,"activate-nonce":e.activateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,"num-users":e.numUsers,onTriggerUpdate:t[0]||(t[0]=function(e){return g.updateMarketplace()}),onStartTrialStart:t[1]||(t[1]=function(e){return g.$emit("startTrialStart")}),onStartTrialStop:t[2]||(t[2]=function(e){return g.$emit("startTrialStop")})},null,8,["plugins-to-show","current-user-email","is-auto-update-possible","is-super-user","is-multi-server-environment","has-some-admin-access","is-plugins-admin-enabled","is-valid-consumer","deactivate-nonce","activate-nonce","install-nonce","update-nonce","num-users"])):Object(r["createCommentVNode"])("",!0),e.loading||0!=e.pluginsToShow.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(h,{key:1},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate(e.showThemes?"Marketplace_NoThemesFound":"Marketplace_NoPluginsFound")),1)]})),_:1})),e.loading?(Object(r["openBlock"])(),Object(r["createBlock"])(h,{key:2},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,p),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.loadingMessage),1)]})),_:1})):Object(r["createCommentVNode"])("",!0)],64)}var b=n("19dc"),g=n("a5a2"),O={key:0,class:"pluginListContainer row"},j=["onClick"],h={class:"card"},k={class:"card-content"},v=["src"],y={class:"content-container"},f={class:"card-content-top"},N={key:0,class:"matomo-badge matomo-badge-top",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""},V={class:"price"},S=["onClick"],E=Object(r["createElementVNode"])("div",{class:"card-focus"},null,-1),B={class:"card-title"},M=Object(r["createElementVNode"])("span",{class:"card-title-chevron"}," ›",-1),T={class:"card-description"},w={class:"card-content-bottom"},C={key:0,class:"downloads"},P={class:"owner"},D={key:0},A={key:1},_={class:"cta-container"},L={key:1,class:"matomo-badge matomo-badge-bottom",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""};function U(e,t,n,a,l,i){var o=this,c=Object(r["resolveComponent"])("RequestTrial"),s=Object(r["resolveComponent"])("StartFreeTrial"),u=Object(r["resolveComponent"])("PluginDetailsModal"),d=Object(r["resolveComponent"])("CTAContainer");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createVNode"])(c,{modelValue:e.showRequestTrialForPlugin,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.showRequestTrialForPlugin=t}),onTrialRequested:t[1]||(t[1]=function(e){return o.$emit("triggerUpdate")})},null,8,["modelValue"]),Object(r["createVNode"])(s,{"current-user-email":e.currentUserEmail,"is-valid-consumer":e.isValidConsumer,modelValue:e.showStartFreeTrialForPlugin,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.showStartFreeTrialForPlugin=t}),onTrialStarted:t[3]||(t[3]=function(e){o.$emit("triggerUpdate")}),onStartTrialStart:t[4]||(t[4]=function(e){o.$emit("startTrialStart")}),onStartTrialStop:t[5]||(t[5]=function(e){o.$emit("startTrialStop")})},null,8,["current-user-email","is-valid-consumer","modelValue"]),Object(r["createVNode"])(u,{modelValue:e.showPluginDetailsForPlugin,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.showPluginDetailsForPlugin=t}),"is-super-user":e.isSuperUser,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-multi-server-environment":e.isMultiServerEnvironment,"is-valid-consumer":e.isValidConsumer,"is-auto-update-possible":e.isAutoUpdatePossible,"has-some-admin-access":e.hasSomeAdminAccess,"deactivate-nonce":e.deactivateNonce,"activate-nonce":e.activateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,"num-users":e.numUsers,onRequestTrial:t[7]||(t[7]=function(e){return o.requestTrial(e)}),onStartFreeTrial:t[8]||(t[8]=function(e){return o.startFreeTrial(e)})},null,8,["modelValue","is-super-user","is-plugins-admin-enabled","is-multi-server-environment","is-valid-consumer","is-auto-update-possible","has-some-admin-access","deactivate-nonce","activate-nonce","install-nonce","update-nonce","num-users"]),e.pluginsToShow.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",O,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.pluginsToShow,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s12 m6 l4",key:t.name},[Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])("card-holder ".concat(t.numDownloads>0?"card-with-downloads":"")),onClick:function(n){return e.clickCard(n,t)}},[Object(r["createElementVNode"])("div",h,[Object(r["createElementVNode"])("div",k,[Object(r["createElementVNode"])("img",{src:"".concat(t.coverImage,"?w=880&h=480"),alt:"",class:"cover-image"},null,8,v),Object(r["createElementVNode"])("div",y,[Object(r["createElementVNode"])("div",f,["piwik"==t.owner||"matomo-org"==t.owner?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",N)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",V,[t.priceFrom?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_PriceFromPerPeriod",t.priceFrom.prettyPrice,t.priceFrom.period)),1)],64)):t.isFree?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_Free")),1)],64)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("a",{onClick:Object(r["withModifiers"])((function(n){return e.clickCard(n,t)}),["prevent"]),class:"card-title-link",href:"#",tabindex:"7"},[E,Object(r["createElementVNode"])("h2",B,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.displayName),1),M])],8,S),Object(r["createElementVNode"])("div",T,Object(r["toDisplayString"])(t.description),1)]),Object(r["createElementVNode"])("div",w,[t.numDownloads>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",C,Object(r["toDisplayString"])(t.numDownloadsPretty)+" "+Object(r["toDisplayString"])(e.translate("General_Downloads").toLowerCase()),1)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",P,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_CreatedBy"))+" ",1),"piwik"===t.owner||"matomo-org"===t.owner?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",D," Matomo")):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",A,Object(r["toDisplayString"])(t.owner),1))]),Object(r["createElementVNode"])("div",_,[Object(r["createVNode"])(d,{"is-super-user":e.isSuperUser,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-multi-server-environment":e.isMultiServerEnvironment,"is-valid-consumer":e.isValidConsumer,"is-auto-update-possible":e.isAutoUpdatePossible,"activate-nonce":e.activateNonce,"deactivate-nonce":e.deactivateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,plugin:t,"in-modal":!1,onOpenDetailsModal:function(e){return o.openDetailsModal(t)},onRequestTrial:function(e){return o.requestTrial(t)},onStartFreeTrial:function(e){return o.startFreeTrial(t)}},null,8,["is-super-user","is-plugins-admin-enabled","is-multi-server-environment","is-valid-consumer","is-auto-update-possible","activate-nonce","deactivate-nonce","install-nonce","update-nonce","plugin","onOpenDetailsModal","onRequestTrial","onStartFreeTrial"])]),"piwik"==t.owner||"matomo-org"==t.owner?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",L)):Object(r["createCommentVNode"])("",!0)])])])])],10,j)])})),128))])):Object(r["createCommentVNode"])("",!0)],64)}var q={key:0,class:"alert alert-danger alert-no-background"},x={key:0,style:{"white-space":"nowrap"}},F=Object(r["createTextVNode"])("("),R=Object(r["createTextVNode"])(")"),I=["href"],H={key:2,class:"alert alert-danger alert-no-background"},$={key:0,style:{"white-space":"nowrap"}},K=Object(r["createTextVNode"])("("),z=Object(r["createTextVNode"])(")"),G=["href"],Q={key:1,class:"alert alert-warning alert-no-background"},W={key:0,style:{"white-space":"nowrap"}},J=Object(r["createTextVNode"])("("),Y=Object(r["createTextVNode"])(")"),Z={key:4,class:"alert alert-success alert-no-background"},X=Object(r["createTextVNode"])(" ("),ee=Object(r["createTextVNode"])(") "),te=Object(r["createTextVNode"])(" ("),ne=["href"],ae=Object(r["createTextVNode"])(" - "),le=["href"],re=Object(r["createTextVNode"])(") "),ie=["title"],oe=["title","href"],ce={key:8,class:"alert alert-warning alert-no-background"},se={key:0,style:{"white-space":"nowrap"}},ue=Object(r["createTextVNode"])("("),de=Object(r["createTextVNode"])(")"),pe=["href"],me=["title"],be=["title"];function ge(e,t,n,a,l,i){var o=this,c=Object(r["resolveComponent"])("MoreDetailsAction"),s=Object(r["resolveComponent"])("DownloadButton");return e.isSuperUser?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[e.plugin.isMissingLicense?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",q,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_LicenseMissing"))+" ",1),e.inModal?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",x,[F,Object(r["createVNode"])(c,{onAction:t[0]||(t[0]=function(t){return e.$emit("openDetailsModal")})}),R]))])):e.inModal&&e.plugin.hasExceededLicense&&e.plugin.consumer.loginUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,class:"btn btn-block",tabindex:"7",target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.plugin.consumer.loginUrl)},Object(r["toDisplayString"])(e.translate("Marketplace_UpgradeSubscription")),9,I)):e.plugin.hasExceededLicense?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",H,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_LicenseExceeded"))+" ",1),e.inModal?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",$,[K,Object(r["createVNode"])(c,{onAction:t[1]||(t[1]=function(t){return e.$emit("openDetailsModal")})}),z]))])):e.plugin.canBeUpdated&&0==e.plugin.missingRequirements.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:3},[e.isAutoUpdatePossible&&e.isPluginsAdminEnabled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,tabindex:"7",class:"btn btn-block",href:e.linkToUpdate(e.plugin.name)},Object(r["toDisplayString"])(e.translate("CoreUpdater_UpdateTitle")),9,G)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Q,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_CannotUpdate"))+" ",1),!e.inModal||0===e.plugin.missingRequirements.length&&e.plugin.isDownloadable&&!e.isAutoUpdatePossible?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",W,[J,e.inModal?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,onAction:t[2]||(t[2]=function(t){return e.$emit("openDetailsModal")})})),Object(r["createVNode"])(s,{plugin:e.plugin,"show-or":!e.inModal,"is-auto-update-possible":e.isAutoUpdatePossible},null,8,["plugin","show-or","is-auto-update-possible"]),Y])):Object(r["createCommentVNode"])("",!0)]))],64)):e.plugin.isInstalled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Z,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("General_Installed"))+" ",1),e.plugin.missingRequirements.length>0||!e.isAutoUpdatePossible?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[X,Object(r["createVNode"])(s,{plugin:e.plugin,"show-or":!1,"is-auto-update-possible":e.isAutoUpdatePossible},null,8,["plugin","is-auto-update-possible"]),ee],64)):e.plugin.isInvalid||e.isMultiServerEnvironment||!e.isPluginsAdminEnabled?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[te,e.plugin.isActivated?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,tabindex:"7",href:e.linkToDeactivate(e.plugin.name)},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Deactivate")),9,ne)):e.plugin.missingRequirements.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[ae],64)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:2,tabindex:"7",href:e.linkToActivate(e.plugin.name)},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Activate")),9,le)),re],64))])):e.plugin.isEligibleForFreeTrial&&!e.inModal&&e.isPluginsAdminEnabled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:5,class:"btn btn-block purchaseable",title:e.translate("Marketplace_StartFreeTrial")},Object(r["toDisplayString"])(e.translate("Marketplace_StartFreeTrial")),9,ie)):e.plugin.isEligibleForFreeTrial&&e.inModal?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:6,class:"btn btn-block addToCartLink",target:"_blank",title:e.translate("Marketplace_ClickToCompletePurchase"),rel:"noreferrer noopener",href:e.shopVariationUrl},Object(r["toDisplayString"])(e.translate("Marketplace_AddToCart")),9,oe)):e.inModal||e.plugin.isDownloadable||!(e.plugin.isPaid||e.plugin.missingRequirements.length>0)&&e.isAutoUpdatePossible?e.plugin.missingRequirements.length>0||!e.isAutoUpdatePossible?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ce,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_CannotInstall"))+" ",1),!e.inModal||0===e.plugin.missingRequirements.length&&e.plugin.isDownloadable&&!e.isAutoUpdatePossible?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",se,[ue,e.inModal?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,onAction:t[4]||(t[4]=function(t){return e.$emit("openDetailsModal")})})),Object(r["createVNode"])(s,{plugin:e.plugin,"show-or":!e.inModal,"is-auto-update-possible":e.isAutoUpdatePossible},null,8,["plugin","show-or","is-auto-update-possible"]),de])):Object(r["createCommentVNode"])("",!0)])):e.isPluginsAdminEnabled&&e.plugin.hasDownloadLink?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:9,tabindex:"7",href:e.linkToInstall(e.plugin.name),class:"btn btn-block"},Object(r["toDisplayString"])(e.translate("Marketplace_ActionInstall")),9,pe)):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:10},[e.inModal?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,"show-as-button":!0,label:e.translate("General_MoreDetails"),onAction:t[5]||(t[5]=function(t){return e.$emit("openDetailsModal")})},null,8,["label"]))],64)):(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:7,"show-as-button":!0,label:e.translate("General_MoreDetails"),onAction:t[3]||(t[3]=function(t){return e.$emit("openDetailsModal")})},null,8,["label"]))],64)):e.plugin.isTrialRequested?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,tabindex:"7",class:"btn btn-block purchaseable disabled",href:"",title:e.translate("Marketplace_TrialRequested")},Object(r["toDisplayString"])(e.translate("Marketplace_TrialRequested")),9,me)):e.plugin.canTrialBeRequested&&!e.plugin.isMissingLicense?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:2,tabindex:"7",class:"btn btn-block purchaseable",href:"",onClick:t[6]||(t[6]=Object(r["withModifiers"])((function(e){o.$emit("requestTrial")}),["prevent"])),title:e.translate("Marketplace_RequestTrial")},Object(r["toDisplayString"])(e.translate("Marketplace_RequestTrial")),9,be)):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:3},[e.inModal?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,"show-as-button":!0,label:e.translate("General_MoreDetails"),onAction:t[7]||(t[7]=function(t){return e.$emit("openDetailsModal")})},null,8,["label"]))],64))}var Oe={key:0,onclick:"$(this).css('display', 'none')"},je=["href"];function he(e,t,n,a,l,i){return 0===e.plugin.missingRequirements.length&&e.plugin.isDownloadable&&!e.isAutoUpdatePossible?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Oe,[e.showOr?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Or"))+" ",1)],64)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("a",{tabindex:"7",class:"plugin-details download",href:e.linkTo({module:"Marketplace",action:"download",pluginName:e.plugin.name,nonce:e.plugin.downloadNonce})},Object(r["toDisplayString"])(e.translate("General_Download")),9,je)])):Object(r["createCommentVNode"])("",!0)}var ke=Object(r["defineComponent"])({props:{plugin:{type:Object,required:!0},showOr:{type:Boolean,default:!1},isAutoUpdatePossible:{type:Boolean,required:!0}},methods:{linkTo:function(e){return"?".concat(b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),e)))}}});ke.render=he;var ve=ke,ye=["title"];function fe(e,t,n,a,l,i){return Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{tabindex:"7",class:Object(r["normalizeClass"])({"btn btn-block":e.showAsButton}),href:"",title:e.translate("General_MoreDetails"),onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.$emit("action")}),["prevent"])),onKeyup:t[1]||(t[1]=Object(r["withKeys"])((function(t){return e.$emit("action")}),["enter"]))},Object(r["toDisplayString"])(e.label?e.label:e.translate("General_Help")),43,ye)}var Ne=Object(r["defineComponent"])({props:{showAsButton:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1}},emits:["action"]});Ne.render=fe;var Ve=Ne,Se=Object(r["defineComponent"])({props:{plugin:{type:Object,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},installNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},isAutoUpdatePossible:{type:Boolean,required:!0},isValidConsumer:{type:Boolean,required:!0},isMultiServerEnvironment:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0},isSuperUser:{type:Boolean,required:!0},inModal:{type:Boolean,required:!0},shopVariationUrl:{type:String,required:!1,default:""}},emits:["openDetailsModal","requestTrial","startFreeTrial"],components:{MoreDetailsAction:Ve,DownloadButton:ve},methods:{linkToActivate:function(e){return this.linkTo({module:"CorePluginsAdmin",action:"activate",redirectTo:"referrer",nonce:this.activateNonce,pluginName:e})},linkToDeactivate:function(e){return this.linkTo({module:"CorePluginsAdmin",action:"deactivate",redirectTo:"referrer",nonce:this.deactivateNonce,pluginName:e})},linkToInstall:function(e){return this.linkTo({module:"Marketplace",action:"installPlugin",nonce:this.installNonce,pluginName:e})},linkToUpdate:function(e){return this.linkTo({module:"Marketplace",action:"updatePlugin",nonce:this.updateNonce,pluginName:e})},linkTo:function(e){return"?".concat(b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),e)))}}});Se.render=ge;var Ee=Se,Be={class:"ui-confirm",ref:"confirm"},Me=["value"],Te=["value"];function we(e,t,n,a,l,i){var o;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Be,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_RequestTrialConfirmTitle",null===(o=e.plugin)||void 0===o?void 0:o.displayName)),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("Marketplace_RequestTrialConfirmEmailWarning")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Me),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Te)],512)}var Ce=Object(r["defineComponent"])({props:{modelValue:{type:Object,default:function(){return{}}}},emits:["update:modelValue","trialRequested"],watch:{modelValue:function(e){var t=this;e&&b["Matomo"].helper.modalConfirm(this.$refs.confirm,{yes:function(){t.requestTrial(e)}},{onCloseEnd:function(){t.$emit("update:modelValue",null)}})}},computed:{plugin:function(){return this.modelValue}},methods:{requestTrial:function(e){var t=this;b["AjaxHelper"].post({module:"API",method:"Marketplace.requestTrial"},{pluginName:e.name}).then((function(){var n=b["NotificationsStore"].show({message:Object(b["translate"])("Marketplace_RequestTrialSubmitted",e.displayName),context:"success",id:"requestTrialSuccess",placeat:"#notificationContainer",type:"transient"});b["NotificationsStore"].scrollToNotification(n),t.$emit("trialRequested")}))}}});Ce.render=we;var Pe=Ce,De={class:"modal",id:"startFreeTrial"},Ae={key:0,class:"btn-close modal-close"},_e=Object(r["createElementVNode"])("i",{class:"icon-close"},null,-1),Le=[_e],Ue={key:1,class:"modal-content trial-start-in-progress"},qe={class:"Piwik_Popover_Loading"},xe={class:"Piwik_Popover_Loading_Name"},Fe={key:2,class:"modal-content trial-start-error"},Re={class:"modal-text"},Ie={key:3,class:"modal-content trial-start-no-license"},He={class:"modal-text"},$e=["innerHTML"],Ke=["innerHTML"],ze=["disabled"],Ge=["innerHTML"];function Qe(e,t,n,a,l,i){var o=Object(r["resolveComponent"])("Field");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",De,[e.trialStartInProgress?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",Ae,Le)),e.trialStartInProgress?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ue,[Object(r["createElementVNode"])("div",qe,[Object(r["createElementVNode"])("div",xe,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartInProgressTitle")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartInProgressText")),1)])])])):e.trialStartError?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Fe,[Object(r["createElementVNode"])("div",Re,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartErrorTitle")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.trialStartError),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartErrorSupport")),1)])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ie,[Object(r["createElementVNode"])("div",He,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartNoLicenseTitle")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartNoLicenseText")),1),Object(r["createVNode"])(o,{uicontrol:"text",name:"email",modelValue:e.createAccountEmail,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.createAccountEmail=t}),"full-width":!0,title:e.translate("UsersManager_Email")},null,8,["modelValue","title"]),e.createAccountError?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:0,class:"alert alert-danger",innerHTML:e.$sanitize(e.createAccountError)},null,8,$e)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("p",{class:"trial-start-legal-hint",innerHTML:e.$sanitize(e.trialStartNoLicenseLegalHintText)},null,8,Ke),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("button",{class:"btn",disabled:!e.createAccountEmail,onClick:t[1]||(t[1]=function(t){return e.createAccountAndStartFreeTrial()})},Object(r["toDisplayString"])(e.translate("Marketplace_TrialStartNoLicenseCreateAccount")),9,ze)]),Object(r["createElementVNode"])("p",{class:"add-existing-license",innerHTML:e.$sanitize(e.trialStartNoLicenseAddHereText)},null,8,Ge)])]))])}var We=window,Je=We.$,Ye=Object(r["defineComponent"])({components:{Field:g["Field"]},props:{modelValue:{type:Object,default:function(){return{}}},currentUserEmail:String,isValidConsumer:Boolean},data:function(){return{createAccountEmail:this.currentUserEmail||"",createAccountError:null,trialStartError:null,loadingModalCloseCallback:void 0,trialStartInProgress:!1,trialStartSuccessNotificationMessage:"",trialStartSuccessNotificationTitle:""}},emits:["update:modelValue","trialStarted","startTrialStart","startTrialStop"],watch:{modelValue:function(e){e&&(this.isValidConsumer?(this.trialStartSuccessNotificationMessage=Object(b["translate"])("CorePluginsAdmin_PluginFreeTrialStarted","<strong>","</strong>",this.plugin.displayName),this.startFreeTrial()):(this.trialStartSuccessNotificationTitle=Object(b["translate"])("CorePluginsAdmin_PluginFreeTrialStartedAccountCreatedTitle"),this.trialStartSuccessNotificationMessage=Object(b["translate"])("CorePluginsAdmin_PluginFreeTrialStartedAccountCreatedMessage",this.plugin.displayName),this.showLicenseDialog(!1)))}},computed:{plugin:function(){return this.modelValue},trialStartNoLicenseAddHereText:function(){var e="?".concat(b["MatomoUrl"].stringify({module:"Marketplace",action:"manageLicenseKey"}));return Object(b["translate"])("Marketplace_TrialStartNoLicenseAddHere",'<a href="'.concat(e,'">'),"</a>")},trialStartNoLicenseLegalHintText:function(){return Object(b["translate"])("Marketplace_TrialStartNoLicenseLegalHint",Object(b["externalLink"])("https://shop.matomo.org/terms-conditions/"),"</a>",Object(b["externalLink"])("https://matomo.org/privacy-policy/"),"</a>")}},methods:{closeModal:function(){Je("#startFreeTrial").modal("close")},createAccountAndStartFreeTrial:function(){var e=this;this.createAccountEmail&&(this.showLoadingModal(!0),b["AjaxHelper"].post({module:"API",method:"Marketplace.createAccount"},{email:this.createAccountEmail},{createErrorNotification:!1}).then((function(){e.startFreeTrial()})).catch((function(t){t.message.startsWith("Marketplace_CreateAccountError")?(e.showErrorModal(Object(b["translate"])(t.message)),e.trialStartInProgress=!1,e.$emit("update:modelValue",null)):(e.createAccountError=t.message,e.trialStartInProgress=!1,e.showLicenseDialog(!0))})))},showLicenseDialog:function(e){var t=this,n=function(e){var n=e.keyCode?e.keyCode:e.which;13===n&&(t.closeModal(),t.createAccountAndStartFreeTrial())},a={dismissible:!0,onOpenEnd:function(){var e=".modal.open #email";Je(e).focus(),Je(e).off("keypress").keypress(n)},onCloseEnd:function(){t.createAccountError=null,t.trialStartInProgress||t.$emit("update:modelValue",null)}};e&&(a.inDuration=0),Je("#startFreeTrial").modal(a).modal("open")},showErrorModal:function(e){var t=this;this.trialStartError||(this.trialStartError=e,Je("#startFreeTrial").modal({dismissible:!0,inDuration:0,onCloseEnd:function(){t.trialStartError=null}}).modal("open"))},showLoadingModal:function(e){var t=this;this.trialStartInProgress||(this.trialStartInProgress=!0,this.loadingModalCloseCallback=void 0,Je("#startFreeTrial").modal({dismissible:!1,inDuration:e?0:void 0,onCloseEnd:function(){t.loadingModalCloseCallback&&(t.loadingModalCloseCallback(),t.loadingModalCloseCallback=void 0)}}).modal("open"))},startFreeTrial:function(){var e=this;this.showLoadingModal(!1),this.$emit("startTrialStart"),b["AjaxHelper"].post({module:"API",method:"Marketplace.startFreeTrial"},{pluginName:this.plugin.name},{createErrorNotification:!1}).then((function(){e.loadingModalCloseCallback=e.startFreeTrialSuccess,e.closeModal()})).catch((function(t){e.showErrorModal(b["Matomo"].helper.htmlDecode(t.message)),e.trialStartInProgress=!1,e.$emit("startTrialStop")})).finally((function(){e.$emit("update:modelValue",null)}))},startFreeTrialSuccess:function(){var e=b["NotificationsStore"].show({message:this.trialStartSuccessNotificationMessage,title:this.trialStartSuccessNotificationTitle,context:"success",id:"startTrialSuccess",placeat:"#notificationContainer",type:"transient"});b["NotificationsStore"].scrollToNotification(e),this.trialStartInProgress=!1,this.$emit("trialStarted")}}});Ye.render=Qe;var Ze=Ye,Xe={ref:"root",class:"modal",id:"pluginDetailsModal"},et={class:"modal-content__header"},tt=Object(r["createElementVNode"])("span",{class:"btn-close modal-close"},[Object(r["createElementVNode"])("i",{class:"icon-close"})],-1),nt={key:0,class:"plugin-metadata-part1"},at=Object(r["createElementVNode"])("h3",{class:"sr-only"},"Plugin details — part 1",-1),lt={key:0,class:"pair"},rt=Object(r["createElementVNode"])("img",{class:"star-icon reviews-icon",src:"plugins/Marketplace/images/star.svg",alt:""},null,-1),it={key:1,class:"pair"},ot={key:2,class:"pair"},ct={key:3,class:"pair"},st={key:4,class:"pair"},ut={class:"plugin-description"},dt={key:1,class:"alert alert-warning"},pt={key:2,class:"alert alert-warning"},mt={key:3,class:"alert alert-danger"},bt={key:4,class:"alert alert-warning"},gt=["innerHTML"],Ot=["innerHTML"],jt=["innerHTML"],ht=["innerHTML"],kt={class:"plugin-metadata-part2"},vt=Object(r["createElementVNode"])("hr",null,null,-1),yt=Object(r["createElementVNode"])("h3",{class:"sr-only"},"Plugin details — part 2",-1),ft={key:0,class:"pair"},Nt={key:1,class:"pair"},Vt={class:"pair"},St=["href"],Et=["href"],Bt={key:2},Mt={key:3},Tt={class:"pair"},wt=["href"],Ct=Object(r["createTextVNode"])(", "),Pt=["href"],Dt=Object(r["createTextVNode"])(", "),At=["href"],_t={key:0,class:"pair"},Lt={key:1,class:"pair"},Ut=["href"],qt={key:1},xt=["innerHTML"],Ft={key:0},Rt=["href"],It={key:1},Ht=["href"],$t=["innerHTML"],Kt={key:0,class:"plugin-screenshots"},zt=Object(r["createElementVNode"])("hr",null,null,-1),Gt={class:"thumbnails"},Qt=["src"],Wt={key:1,class:"plugin-documentation"},Jt=Object(r["createElementVNode"])("hr",null,null,-1),Yt=["innerHTML"],Zt={key:2,class:"plugin-faq"},Xt=Object(r["createElementVNode"])("hr",null,null,-1),en=["innerHTML"],tn={key:3,class:"plugin-reviews",id:"reviews"},nn=Object(r["createElementVNode"])("hr",null,null,-1),an=["id","src"],ln={key:0,class:"matomo-badge matomo-badge-modal",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""},rn={class:"cta-container cta-container-modal"},on={key:0,class:"free-trial"},cn={class:"free-trial-lead-in"},sn=["title"],un=["value","title"],dn={key:1,class:"matomo-badge matomo-badge-modal",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""};function pn(e,t,n,a,l,i){var o,c,s,u,d,p,m=this,b=Object(r["resolveComponent"])("MissingReqsNotice"),g=Object(r["resolveComponent"])("CTAContainer");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Xe,[e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:0,class:Object(r["normalizeClass"])(["modal-content",{"modal-content--simple-header":!e.hasHeaderMetadata}])},[Object(r["createElementVNode"])("div",et,[tt,Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.plugin&&e.plugin.displayName?e.plugin.displayName:"Plugin details"),1),e.hasHeaderMetadata?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nt,[at,Object(r["createElementVNode"])("dl",null,[e.showReviews?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",lt,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("Marketplace_Reviews")),1),Object(r["createElementVNode"])("dd",null,[rt,Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.scrollElementIntoView("#reviews")})},Object(r["toDisplayString"])(e.pluginReviews.averageRating),1)])])):Object(r["createCommentVNode"])("",!0),e.plugin.isBundle?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",it,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(r["createElementVNode"])("dd",null,Object(r["toDisplayString"])(e.plugin.latestVersion),1)])),e.plugin.numDownloads>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ot,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("General_Downloads")),1),Object(r["createElementVNode"])("dd",null,Object(r["toDisplayString"])(e.plugin.numDownloadsPretty),1)])):Object(r["createCommentVNode"])("",!0),e.plugin.lastUpdated&&!e.plugin.isBundle?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ct,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("Marketplace_LastUpdated")),1),Object(r["createElementVNode"])("dd",null,Object(r["toDisplayString"])(e.plugin.lastUpdated),1)])):Object(r["createCommentVNode"])("",!0),e.plugin.isBundle?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",st,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("Marketplace_Developer")),1),Object(r["createElementVNode"])("dd",null,Object(r["toDisplayString"])(e.pluginOwner),1)]))])])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["modal-content__main",{"modal-content__main--with-free-trial":e.showFreeTrialDropdown}])},[Object(r["createElementVNode"])("div",ut,[e.showMissingRequirementsNoticeIfApplicable?(Object(r["openBlock"])(),Object(r["createBlock"])(b,{key:0,plugin:e.plugin},null,8,["plugin"])):Object(r["createCommentVNode"])("",!0),e.isMultiServerEnvironment?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",dt,Object(r["toDisplayString"])(e.translate("Marketplace_MultiServerEnvironmentWarning")),1)):e.isAutoUpdatePossible?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",pt,Object(r["toDisplayString"])(e.translate("Marketplace_AutoUpdateDisabledWarning","'[General]enable_auto_update=1'","'config/config.ini.php'")),1)),e.showMissingLicenseDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",mt,Object(r["toDisplayString"])(e.translate("Marketplace_PluginLicenseMissingDescription")),1)):e.showExceededLicenseDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",bt,Object(r["toDisplayString"])(e.translate("Marketplace_PluginLicenseExceededDescription")),1)):"Pending"!==e.plugin.licenseStatus||e.isMultiServerEnvironment?"Cancelled"!==e.plugin.licenseStatus||e.isMultiServerEnvironment?e.plugin.hasDownloadLink||e.isMultiServerEnvironment||!e.plugin.licenseStatus&&e.plugin.isPaid?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:7,class:"alert alert-warning",innerHTML:e.$sanitize(e.getDownloadLinkMissingHelpText(e.plugin.displayName))},null,8,jt)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:6,class:"alert alert-warning",innerHTML:e.$sanitize(e.getCancelledLicenseHelpText(e.plugin.displayName))},null,8,Ot)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:5,class:"alert alert-warning",innerHTML:e.$sanitize(e.getPendingLicenseHelpText(e.plugin.displayName))},null,8,gt)),Object(r["createElementVNode"])("div",{innerHTML:e.$sanitize(e.pluginDescription)},null,8,ht)]),Object(r["createElementVNode"])("div",kt,[vt,yt,Object(r["createElementVNode"])("dl",null,[e.plugin.isBundle?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ft,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(r["createElementVNode"])("dd",null,Object(r["toDisplayString"])(e.plugin.latestVersion),1)])),e.pluginKeywords?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Nt,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("Marketplace_PluginKeywords")),1),Object(r["createElementVNode"])("dd",null,Object(r["toDisplayString"])(e.pluginKeywords.join(", ")),1)])):Object(r["createCommentVNode"])("",!0),e.plugin.isBundle?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[Object(r["createElementVNode"])("div",Vt,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("Marketplace_Authors")),1),Object(r["createElementVNode"])("dd",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.pluginAuthors,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:"author-".concat(n)},[t.homepage?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:t.homepage},Object(r["toDisplayString"])(t.name),9,St)):t.email&&e.isValidEmail(t.email)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"mailto:".concat(encodeURIComponent(t.email))},Object(r["toDisplayString"])(t.name),9,Et)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Bt,Object(r["toDisplayString"])(t.name),1)),n<e.pluginAuthors.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Mt,", ")):Object(r["createCommentVNode"])("",!0)],64)})),128))])]),Object(r["createElementVNode"])("div",Tt,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Websites")),1),Object(r["createElementVNode"])("dd",null,[e.plugin.homepage?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.plugin.homepage},Object(r["toDisplayString"])(e.translate("Marketplace_PluginWebsite")),9,wt)):Object(r["createCommentVNode"])("",!0),e.pluginChangelogUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[e.plugin.homepage?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Ct],64)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.pluginChangelogUrl)},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Changelog")),9,Pt)],64)):Object(r["createCommentVNode"])("",!0),e.plugin.repositoryUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.plugin.homepage||e.pluginChangelogUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Dt],64)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.plugin.repositoryUrl)},"GitHub",8,At)],64)):Object(r["createCommentVNode"])("",!0)])]),e.pluginActivity&&e.pluginActivity.numCommits?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",_t,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Activity")),1),Object(r["createElementVNode"])("dd",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.plugin.activity.numCommits)+" commits ",1),(null===(o=e.pluginActivity)||void 0===o?void 0:o.numContributors)>1?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(" "+e.translate("Marketplace_ByXDevelopers",e.pluginActivity.numContributors)),1)],64)):Object(r["createCommentVNode"])("",!0),null!==(c=e.pluginActivity)&&void 0!==c&&c.lastCommitDate?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(" "+e.translate("Marketplace_LastCommitTime",e.pluginActivity.lastCommitDate)),1)],64)):Object(r["createCommentVNode"])("",!0)])])):Object(r["createCommentVNode"])("",!0),e.showLicenseName?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Lt,[Object(r["createElementVNode"])("dt",null,Object(r["toDisplayString"])(e.translate("Marketplace_License")),1),Object(r["createElementVNode"])("dd",null,[null!==(s=e.pluginLatestVersion.license)&&void 0!==s&&s.url?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",href:null===(u=e.pluginLatestVersion.license)||void 0===u?void 0:u.url,target:"_blank"},Object(r["toDisplayString"])(null===(d=e.pluginLatestVersion.license)||void 0===d?void 0:d.name),9,Ut)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",qt,Object(r["toDisplayString"])(null===(p=e.pluginLatestVersion.license)||void 0===p?void 0:p.name),1))])])):Object(r["createCommentVNode"])("",!0),e.pluginSupport.length?(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],{key:2},Object(r["renderList"])(e.pluginSupport,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"pair",key:"support-".concat(n)},[t.name&&t.value?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createElementVNode"])("dt",{innerHTML:e.$sanitize(t.name)},null,8,xt),m.isValidHttpUrl(t.value)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("dd",Ft,[Object(r["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.$sanitize(t.value))},Object(r["toDisplayString"])(e.$sanitize(t.value)),9,Rt)])):m.isValidEmail(t.value)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("dd",It,[Object(r["createElementVNode"])("a",{href:"mailto:".concat(encodeURIComponent(t.value))},Object(r["toDisplayString"])(e.$sanitize(t.value)),9,Ht)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("dd",{key:2,innerHTML:e.$sanitize(t.value)},null,8,$t))],64)):Object(r["createCommentVNode"])("",!0)])})),128)):Object(r["createCommentVNode"])("",!0)],64))])]),e.pluginScreenshots.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kt,[zt,Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("Marketplace_Screenshots")),1),Object(r["createElementVNode"])("div",Gt,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.pluginScreenshots,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("figure",{key:"screenshot-".concat(e)},[Object(r["createElementVNode"])("img",{src:"".concat(e,"?w=800"),width:"800",alt:""},null,8,Qt),Object(r["createElementVNode"])("figcaption",null,Object(r["toDisplayString"])(m.getScreenshotBaseName(e)),1)])})),128))])])):Object(r["createCommentVNode"])("",!0),e.pluginDocumentation?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Wt,[Jt,Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("General_Documentation")),1),Object(r["createElementVNode"])("div",{innerHTML:e.$sanitize(e.pluginDocumentation)},null,8,Yt)])):Object(r["createCommentVNode"])("",!0),e.pluginFaq?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zt,[Xt,Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("General_Faq")),1),Object(r["createElementVNode"])("div",{innerHTML:e.$sanitize(e.pluginFaq)},null,8,en)])):Object(r["createCommentVNode"])("",!0),e.showReviews?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",tn,[nn,Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("Marketplace_Reviews")),1),Object(r["createElementVNode"])("iframe",{class:"reviewIframe",style:Object(r["normalizeStyle"])(e.pluginReviews.height?"height: ".concat(e.pluginReviews.height,"px;"):""),id:e.pluginReviews.embedUrl.replace(/[\W_]+/g," "),src:e.pluginReviews.embedUrl},null,12,an)])):Object(r["createCommentVNode"])("",!0)],2),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["modal-content__footer",{"modal-content__footer--with-free-trial":e.showFreeTrialDropdown}])},[e.showFreeTrialDropdown&&e.isMatomoPlugin?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",ln)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",rn,[e.showFreeTrialDropdown?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",on,[Object(r["createElementVNode"])("div",cn,Object(r["toDisplayString"])(e.translate("Marketplace_TryFreeTrialTitle")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("select",{class:"free-trial-dropdown",title:"".concat(e.translate("Marketplace_ShownPriceIsExclTax")," ").concat(e.translate("Marketplace_CurrentNumPiwikUsers",e.numUsers)),"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.selectedPluginShopVariationUrl=t}),onChange:t[2]||(t[2]=function(){return e.changeSelectedPluginShopVariationUrl&&e.changeSelectedPluginShopVariationUrl.apply(e,arguments)})},[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugin.shop.variations,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("option",{key:"var-".concat(n),value:t.addToCartUrl,title:"".concat(e.translate("Marketplace_PriceExclTax",t.price,t.currency)," ").concat(e.translate("Marketplace_CurrentNumPiwikUsers",e.numUsers))},Object(r["toDisplayString"])(t.name)+" - "+Object(r["toDisplayString"])(t.prettyPrice)+" / "+Object(r["toDisplayString"])(t.period),9,un)})),128))],40,sn),[[r["vModelSelect"],e.selectedPluginShopVariationUrl]])])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(g,{"is-super-user":e.isSuperUser,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-multi-server-environment":e.isMultiServerEnvironment,"is-valid-consumer":e.isValidConsumer,"is-auto-update-possible":e.isAutoUpdatePossible,"activate-nonce":e.activateNonce,"deactivate-nonce":e.deactivateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,plugin:e.plugin,"in-modal":!0,"shop-variation-url":e.selectedShopVariationUrl,onRequestTrial:t[3]||(t[3]=function(t){return e.emitTrialEvent("requestTrial")}),onStartFreeTrial:t[4]||(t[4]=function(t){return e.emitTrialEvent("startFreeTrial")})},null,8,["is-super-user","is-plugins-admin-enabled","is-multi-server-environment","is-valid-consumer","is-auto-update-possible","activate-nonce","deactivate-nonce","install-nonce","update-nonce","plugin","shop-variation-url"])]),!e.showFreeTrialDropdown&&e.isMatomoPlugin?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",dn)):Object(r["createCommentVNode"])("",!0)],2)],2))],512)}function mn(e,t,n,a,l,i){return Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugin.missingRequirements||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:"alert alert-danger"},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_MissingRequirementsNotice",e.requirement(t.requirement),t.actualVersion,t.requiredVersion)),1)})),128)}var bn=Object(r["defineComponent"])({props:{plugin:{type:Object,required:!0}},methods:{requirement:function(e){return"php"===e?"PHP":"".concat(e[0].toUpperCase()).concat(e.substr(1))}}});bn.render=mn;var gn=bn,On=window,jn=On.$,hn=Object(r["defineComponent"])({components:{MissingReqsNotice:gn,CTAContainer:Ee},props:{modelValue:{type:Object,default:function(){return{}}},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},installNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},isAutoUpdatePossible:{type:Boolean,required:!0},isValidConsumer:{type:Boolean,required:!0},isMultiServerEnvironment:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0},isSuperUser:{type:Boolean,required:!0},hasSomeAdminAccess:{type:Boolean,required:!0},numUsers:{type:Number,required:!0}},data:function(){return{isLoading:!0,currentPluginShopVariationUrl:""}},emits:["requestTrial","startFreeTrial","update:modelValue"],watch:{modelValue:function(e){e&&this.showPluginDetailsDialog()},isLoading:function(e){!1===e&&(this.applyExternalTarget(),this.applyIframeResize())}},computed:{plugin:function(){return this.modelValue},pluginLatestVersion:function(){var e=this.plugin.versions||[{}];return e[e.length-1]},pluginReadmeHtml:function(){var e;return(null===(e=this.pluginLatestVersion)||void 0===e?void 0:e.readmeHtml)||{}},pluginDescription:function(){var e;return(null===(e=this.pluginReadmeHtml)||void 0===e?void 0:e.description)||""},pluginDocumentation:function(){var e;return(null===(e=this.pluginReadmeHtml)||void 0===e?void 0:e.documentation)||""},pluginFaq:function(){var e;return(null===(e=this.pluginReadmeHtml)||void 0===e?void 0:e.faq)||""},pluginShop:function(){return this.plugin.shop},pluginShopVariations:function(){var e;return(null===(e=this.pluginShop)||void 0===e?void 0:e.variations)||[]},pluginReviews:function(){var e;return(null===(e=this.pluginShop)||void 0===e?void 0:e.reviews)||{}},pluginKeywords:function(){var e;return(null===(e=this.plugin)||void 0===e?void 0:e.keywords)||[]},pluginAuthors:function(){var e=this.plugin.authors||[];return e.filter((function(e){return e.name}))},pluginActivity:function(){return this.plugin.activity||{}},pluginChangelogUrl:function(){return this.plugin.changelog.url||""},pluginSupport:function(){return this.plugin.support||[]},isMatomoPlugin:function(){return["piwik","matomo-org"].includes(this.plugin.owner)},pluginOwner:function(){return this.isMatomoPlugin?"Matomo":this.plugin.owner},showReviews:function(){return this.pluginReviews&&this.pluginReviews.embedUrl&&this.pluginReviews.averageRating},showMissingLicenseDescription:function(){return this.hasSomeAdminAccess&&this.plugin.isMissingLicense},showExceededLicenseDescription:function(){return this.hasSomeAdminAccess&&this.plugin.hasExceededLicense},showMissingRequirementsNoticeIfApplicable:function(){return this.isSuperUser&&(this.plugin.isDownloadable||this.plugin.isInstalled)},showLicenseName:function(){var e,t=(null===(e=this.pluginLatestVersion)||void 0===e?void 0:e.license)||{};return!!t.name},showFreeTrialDropdown:function(){return this.isSuperUser&&!this.plugin.isMissingLicense&&!this.plugin.isInstalled&&!this.plugin.hasExceededLicense&&this.plugin.isEligibleForFreeTrial},pluginScreenshots:function(){return this.plugin.screenshots||[]},hasHeaderMetadata:function(){return this.showReviews||!this.plugin.isBundle||(this.plugin.numDownloads||0)>0||this.plugin.lastUpdated&&!this.plugin.isBundle},pluginShopVariationsPretty:function(){return this.pluginShopVariations.map((function(e){return"".concat(e.name," - ").concat(e.prettyPrice," / ").concat(e.period)}))},pluginShopRecommendedVariation:function(){var e=this.pluginShopVariations.filter((function(e){return e.recommended})),t=this.pluginShopVariations.length?this.pluginShopVariations[0]:null;return e.length?e[0]:t},selectedPluginShopVariationUrl:function(){var e;return this.currentPluginShopVariationUrl?this.currentPluginShopVariationUrl:(null===(e=this.pluginShopRecommendedVariation)||void 0===e?void 0:e.addToCartUrl)||""},selectedShopVariationUrl:function(){return this.selectedPluginShopVariationUrl||""}},methods:{changeSelectedPluginShopVariationUrl:function(e){e&&(this.currentPluginShopVariationUrl=e.target.value)},applyExternalTarget:function(){var e=this;setTimeout((function(){var t=e.$refs.root;jn(".modal-content__main a",t).each((function(e,t){var n=jn(t).attr("href");n&&0===n.indexOf("http")&&jn(t).attr("target","_blank")}))}))},scrollElementIntoView:function(e){var t=this;setTimeout((function(){var n=t.$refs.root,a=jn(e,n);a.length&&a[0]&&a[0].scrollIntoView&&a[0].scrollIntoView({block:"nearest",behavior:"smooth"})}))},isValidEmail:function(e){return e.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},isValidHttpUrl:function(e){try{var t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(n){return!1}},getProtocolAndDomain:function(e){var t=new URL(e);return"".concat(t.protocol,"//").concat(t.hostname)},applyIframeResize:function(){var e=this;setTimeout((function(){var t=window,n=t.iFrameResize;e.pluginReviews&&jn((function(){for(var t=jn("#pluginDetailsModal iframe.reviewIframe"),a=0;a<t.length;a+=1)n({checkOrigin:[e.getProtocolAndDomain(e.pluginReviews.embedUrl)]},t[a])}))}))},getScreenshotBaseName:function(e){var t=e.split("/").pop()||"";return t.substring(0,t.lastIndexOf(".")).split("_").join(" ")},emitTrialEvent:function(e){var t=this,n=this.plugin;jn("#pluginDetailsModal").modal("close"),setTimeout((function(){t.$emit(e,n)}),250)},showPluginDetailsDialog:function(){var e=this;jn("#pluginDetailsModal").modal({dismissible:!0,onCloseEnd:function(){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{showPlugin:null})),e.$emit("update:modelValue",null),e.isLoading=!0}}).modal("open"),setTimeout((function(){e.isLoading=!1}),10)},getPendingLicenseHelpText:function(e){return Object(b["translate"])("Marketplace_PluginLicenseStatusPending",e,Object(b["externalLink"])("https://shop.matomo.org/my-account/"),"</a>")},getCancelledLicenseHelpText:function(e){return Object(b["translate"])("Marketplace_PluginLicenseStatusCancelled",e,Object(b["externalLink"])("https://shop.matomo.org/my-account/"),"</a>")},getDownloadLinkMissingHelpText:function(e){return Object(b["translate"])("Marketplace_PluginDownloadLinkMissingDescription",e,Object(b["externalLink"])("https://matomo.org/faq/plugins/faq_21/"),"</a>")}}});hn.render=pn;var kn=hn;function vn(e,t){return Sn(e)||Vn(e,t)||fn(e,t)||yn()}function yn(){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 fn(e,t){if(e){if("string"===typeof e)return Nn(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)?Nn(e,t):void 0}}function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Vn(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,l,r=[],i=!0,o=!1;try{for(n=n.call(e);!(i=(a=n.next()).done);i=!0)if(r.push(a.value),t&&r.length===t)break}catch(c){o=!0,l=c}finally{try{i||null==n["return"]||n["return"]()}finally{if(o)throw l}}return r}}function Sn(e){if(Array.isArray(e))return e}var En=window,Bn=En.$,Mn=Object(r["defineComponent"])({props:{currentUserEmail:String,pluginsToShow:{type:Array,required:!0},isAutoUpdatePossible:{type:Boolean,required:!0},isSuperUser:{type:Boolean,required:!0},isValidConsumer:{type:Boolean,required:!0},isMultiServerEnvironment:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0},hasSomeAdminAccess:{type:Boolean,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},installNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},numUsers:{type:Number,required:!0}},data:function(){return{showRequestTrialForPlugin:null,showStartFreeTrialForPlugin:null,showPluginDetailsForPlugin:null}},components:{PluginDetailsModal:kn,CTAContainer:Ee,RequestTrial:Pe,StartFreeTrial:Ze},emits:["triggerUpdate","startTrialStart","startTrialStop"],watch:{pluginsToShow:function(e,t){e&&e!==t&&(this.shrinkDescriptionIfMultilineTitle(),this.parseShowPluginParameter())}},mounted:function(){var e=this;Bn(window).resize((function(){e.shrinkDescriptionIfMultilineTitle()})),Object(r["watch"])((function(){return b["MatomoUrl"].hashParsed.value.showPlugin}),(function(t,n){t&&t!==n&&e.parseShowPluginParameter()})),this.parseShowPluginParameter()},methods:{parseShowPluginParameter:function(){var e=b["MatomoUrl"].hashParsed.value,t=e.showPlugin,n=e.pluginType,a=e.query;if(t){var l=this.pluginsToShow.filter((function(e){return e.name===t}));if(1===l.length){var r=vn(l,1),i=r[0];this.openDetailsModal(i),this.scrollPluginCardIntoView(i)}else""===n&&""===a||b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{pluginType:"plugins",query:null}))}},shrinkDescriptionIfMultilineTitle:function(){var e=Bn(".marketplace .card-holder");e&&e.length&&e.each((function(e,t){var n=Bn(t),a=n.find(".card-title"),l=n.find(".card-content-bottom .alert"),r=n.hasClass("card-with-downloads"),i=1;if(a.length){var o,c=+a.height(),s=+a.css("line-height").replace("px","");if(s)i=null!==(o=Math.ceil(c/s))&&void 0!==o?o:1}var u=0;if(l.length){var d,p=+l.height(),m=+l.css("line-height").replace("px","");if(m)u=null!==(d=Math.ceil(p/m))&&void 0!==d?d:1}var b=n.find(".card-description");if(b.length){var g=b[0],O=0;r?((i>=2||u>2||i+u>=4)&&(O=2),i+u>=5&&(O=1)):i+u>=5&&(O=2),O?g.setAttribute("data-clamp","".concat(O)):g.removeAttribute("data-clamp")}}))},clickCard:function(e,t){Bn(e.target).closest("a:not(.card-title-link)").length||(e.stopPropagation(),this.openDetailsModal(t))},openDetailsModal:function(e){this.showPluginDetailsForPlugin=e},scrollPluginCardIntoView:function(e){var t=Bn('.pluginListContainer .card-title:contains("'.concat(e.displayName,'")'));if(1===t.length){var n=t.parents(".card");1===n.length&&n[0].scrollIntoView&&n[0].scrollIntoView({block:"start",behavior:"smooth"})}},requestTrial:function(e){this.showRequestTrialForPlugin=e},startFreeTrial:function(e){this.showStartFreeTrialForPlugin=e}}});Mn.render=U;var Tn=Mn,wn=function(e){return"".concat(e[0].toLowerCase()).concat(e.substring(1))},Cn=Object(r["defineComponent"])({props:{pluginTypeOptions:{type:Object,required:!0},defaultSort:{type:String,required:!0},pluginSortOptions:{type:Object,required:!0},numAvailablePluginsByType:{type:Object,required:!0},currentUserEmail:String,isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,isMultiServerEnvironment:Boolean,hasSomeAdminAccess:Boolean,installNonce:{type:String,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},numUsers:{type:Number,required:!0}},components:{ContentBlock:b["ContentBlock"],PluginList:Tn,Field:g["Field"]},data:function(){return{loading:!1,fetchRequest:null,fetchRequestAbortController:null,pluginSort:this.defaultSort,pluginTypeFilter:"plugins",searchQuery:"",pluginsToShow:[]}},emits:["triggerUpdate","startTrialStart","startTrialStop"],mounted:function(){var e=this;b["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root}),Object(r["watch"])((function(){return b["MatomoUrl"].hashParsed.value}),(function(){e.updateValuesFromHash(!1)})),this.updateValuesFromHash(!0)},unmounted:function(){b["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},methods:{updateValuesFromHash:function(e){var t=e,n=b["MatomoUrl"].hashParsed.value.query||"",a=b["MatomoUrl"].hashParsed.value.sort||"",l=b["MatomoUrl"].hashParsed.value.pluginType||"";(n||this.searchQuery)&&(t=t||n!==this.searchQuery,this.searchQuery=n),a&&(t=t||a!==this.pluginSort,this.pluginSort=a),l&&(t=t||l!==this.pluginTypeFilter,this.pluginTypeFilter=l),t&&this.fetchPlugins()},updateQuery:function(e){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{query:e}))},updateType:function(e){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{pluginType:e}))},updateSort:function(e){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{sort:e}))},updateMarketplace:function(){var e=this;this.fetchPlugins((function(){return e.$emit("triggerUpdate")}))},fetchPlugins:function(e){var t=this;this.loading=!0,this.pluginsToShow=[],this.fetchRequestAbortController&&(this.fetchRequestAbortController.abort(),this.fetchRequestAbortController=null),this.fetchRequestAbortController=new AbortController,this.fetchRequest=b["AjaxHelper"].post({module:"Marketplace",action:"searchPlugins",format:"JSON"},{query:this.searchQuery,sort:this.pluginSort,themesOnly:this.showThemes,purchaseType:"premium"===this.pluginTypeFilter?"paid":""},{withTokenInUrl:!0,abortController:this.fetchRequestAbortController}).then((function(n){t.pluginsToShow=n,"function"===typeof e&&e()})).finally((function(){t.loading=!1,t.fetchRequestAbortController=null}))}},computed:{queryInputTitle:function(){var e=wn(Object(b["translate"])("General_Plugins")),t=this.numAvailablePluginsByType[this.pluginTypeFilter]||0;return"".concat(Object(b["translate"])("General_Search")," ").concat(t," ").concat(e,"...")},loadingMessage:function(){return Object(b["translate"])("Mobile_LoadingReport",Object(b["translate"])(this.showThemes?"CorePluginsAdmin_Themes":"General_Plugins"))},showThemes:function(){return"themes"===this.pluginTypeFilter}}});Cn.render=m;var Pn=Cn,Dn=["innerHTML"],An={class:"manage-license-key-input"},_n={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},Ln=["value"],Un=["value"];function qn(e,t,n,a,l,i){var o=Object(r["resolveComponent"])("InstallAllPaidPluginsButton"),c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("SaveButton"),u=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createVNode"])(d,{"content-title":e.translate("Marketplace_LicenseKey"),class:"manage-license-key"},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",{class:"manage-license-key-intro",innerHTML:e.$sanitize(e.manageLicenseKeyIntro)},null,8,Dn),Object(r["createVNode"])(o,{disabled:e.isUpdating},null,8,["disabled"]),Object(r["createElementVNode"])("div",An,[Object(r["createVNode"])(c,{uicontrol:"text",name:"license_key",modelValue:e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.licenseKey=t}),placeholder:e.licenseKeyPlaceholder,"full-width":!0},null,8,["modelValue","placeholder"])]),Object(r["createVNode"])(s,{onConfirm:t[1]||(t[1]=function(t){return e.updateLicense()}),value:e.saveButtonText,disabled:!e.licenseKey||e.isUpdating,id:"submit_license_key"},null,8,["value","disabled"]),e.hasValidLicense?(Object(r["openBlock"])(),Object(r["createBlock"])(s,{key:0,id:"remove_license_key",onConfirm:t[2]||(t[2]=function(t){return e.removeLicense()}),disabled:e.isUpdating,value:e.translate("General_Remove")},null,8,["disabled","value"])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(u,{loading:e.isUpdating},null,8,["loading"])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",_n,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Ln),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Un)],512)],64)}var xn=Object(r["defineComponent"])({props:{hasValidLicenseKey:Boolean},components:{Field:g["Field"],ContentBlock:b["ContentBlock"],SaveButton:g["SaveButton"],ActivityIndicator:b["ActivityIndicator"],InstallAllPaidPluginsButton:g["InstallAllPaidPluginsButton"]},data:function(){return{licenseKey:"",hasValidLicense:this.hasValidLicenseKey,isUpdating:!1}},methods:{updateLicenseKey:function(e,t,n){var a=this;b["NotificationsStore"].remove("ManageLicenseKeySuccess"),b["AjaxHelper"].post({module:"API",method:"Marketplace.".concat(e),format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then((function(t){a.isUpdating=!1,t&&t.value&&(b["NotificationsStore"].show({id:"ManageLicenseKeySuccess",message:n,context:"success",type:"toast"}),a.hasValidLicense="deleteLicenseKey"!==e,a.licenseKey="")}),(function(){a.isUpdating=!1}))},removeLicense:function(){var e=this;b["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:function(){e.isUpdating=!0,e.updateLicenseKey("deleteLicenseKey","",Object(b["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updateLicense:function(){this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(b["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{manageLicenseKeyIntro:function(){var e="?".concat(b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview"})));return Object(b["translate"])("Marketplace_ManageLicenseKeyIntro",'<a href="'.concat(e,'">'),"</a>",Object(b["externalLink"])("https://shop.matomo.org/my-account"),"</a>")},licenseKeyPlaceholder:function(){return this.hasValidLicense?Object(b["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(b["translate"])("Marketplace_LicenseKey")},saveButtonText:function(){return this.hasValidLicense?Object(b["translate"])("CoreUpdater_UpdateTitle"):Object(b["translate"])("Marketplace_ActivateLicenseKey")}}});xn.render=qn;var Fn=xn,Rn={class:"getNewPlugins"},In={class:"row"},Hn={class:"pluginName"},$n=Object(r["createElementVNode"])("br",null,null,-1),Kn={key:0},zn=Object(r["createElementVNode"])("br",null,null,-1),Gn=Object(r["createElementVNode"])("br",null,null,-1),Qn=[zn,Gn],Wn={class:"widgetBody"},Jn=["href"];function Yn(e,t,n,a,l,i){var o=Object(r["resolveDirective"])("plugin-name");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Rn,[Object(r["createElementVNode"])("div",In,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugins,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s12",key:t.name},[Object(r["withDirectives"])(Object(r["createElementVNode"])("h3",Hn,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.displayName),1)],512),[[o,{pluginName:t.name}]]),Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),$n,Object(r["withDirectives"])(Object(r["createElementVNode"])("a",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("General_MoreDetails")),1)],512),[[o,{pluginName:t.name}]])]),n<e.plugins.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Kn,Qn)):Object(r["createCommentVNode"])("",!0)])})),128))]),Object(r["createElementVNode"])("div",Wn,[Object(r["createElementVNode"])("a",{href:e.overviewLink},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_ViewAllMarketplacePlugins")),9,Jn)])])}var Zn=Object(r["defineComponent"])({props:{plugins:{type:Array,required:!0}},directives:{PluginName:g["PluginName"]},computed:{overviewLink:function(){return"?".concat(b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview"})))}}});Zn.render=Yn;var Xn=Zn,ea={class:"getNewPlugins isAdminPage",ref:"root"},ta={class:"row"},na=["title"],aa=["title"],la={key:0},ra=Object(r["createElementVNode"])("br",null,null,-1),ia=["src"],oa={class:"widgetBody"},ca=["href"];function sa(e,t,n,a,l,i){var o=Object(r["resolveDirective"])("plugin-name");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ea,[Object(r["createElementVNode"])("div",ta,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.plugins,(function(e){var t;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s12 m4",key:e.name},[Object(r["withDirectives"])(Object(r["createElementVNode"])("h3",{class:"pluginName",title:e.description},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.displayName),1)],8,na),[[o,{pluginName:e.name}]]),Object(r["createElementVNode"])("p",{class:"description",title:e.description},Object(r["toDisplayString"])(e.description),9,aa),null!==(t=e.screenshots)&&void 0!==t&&t.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",la,[ra,Object(r["withDirectives"])(Object(r["createElementVNode"])("img",{class:"screenshot",src:"".concat(e.screenshots[0],"?w=600"),style:{width:"100%"},alt:""},null,8,ia),[[o,{pluginName:e.name}]])])):Object(r["createCommentVNode"])("",!0)])})),128))]),Object(r["createElementVNode"])("div",oa,[Object(r["createElementVNode"])("a",{href:e.marketplaceOverviewLink},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_ViewAllMarketplacePlugins")),9,ca)])],512)}var ua=Object(r["defineComponent"])({props:{plugins:{type:Array,required:!0}},directives:{PluginName:g["PluginName"]},computed:{marketplaceOverviewLink:function(){return"?".concat(b["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}))}}});ua.render=sa;var da=ua,pa={class:"getNewPlugins getPremiumFeatures widgetBody"},ma={key:0,class:"col s12 m12"},ba=["innerHTML"],ga={style:{"margin-bottom":"28px",color:"#5bb75b"}},Oa=Object(r["createElementVNode"])("i",{class:"icon-heart red-text"},null,-1),ja={class:"pluginName"},ha={key:0,class:"pluginSubtitle"},ka={class:"pluginBody"},va=Object(r["createElementVNode"])("br",null,null,-1),ya={class:"pluginMoreDetails"},fa={class:"widgetBody"},Na=["href"];function Va(e,t,n,a,l,i){var o=Object(r["resolveDirective"])("plugin-name");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",pa,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.pluginRows,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"row",key:n},[0===n?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ma,[Object(r["createElementVNode"])("h3",{style:{"font-weight":"bold",color:"#5bb75b"},innerHTML:e.$sanitize(e.trialHintsText)},null,8,ba),Object(r["createElementVNode"])("h3",ga,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_SupportMatomoThankYou"))+" ",1),Oa])])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"col s12 m4",key:t.name},[Object(r["withDirectives"])(Object(r["createElementVNode"])("h3",ja,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.displayName),1)],512),[[o,{pluginName:t.name}]]),t.specialOffer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ha,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("Marketplace_SpecialOffer"))+":",1),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(t.specialOffer),1)])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",ka,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.isBundle?"".concat(e.translate("Marketplace_SpecialOffer"),": "):"")+Object(r["toDisplayString"])(t.description)+" ",1),va,Object(r["withDirectives"])(Object(r["createElementVNode"])("a",ya,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("General_MoreDetails")),1)],512),[[o,{pluginName:t.name}]])])])})),128))])})),128)),Object(r["createElementVNode"])("div",fa,[Object(r["createElementVNode"])("a",{href:e.overviewLink},Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_ViewAllMarketplacePlugins")),9,Na)])])}var Sa=Object(r["defineComponent"])({props:{plugins:{type:Array,required:!0}},directives:{PluginName:g["PluginName"]},computed:{trialHintsText:function(){var e=Object(b["externalRawLink"])("https://shop.matomo.org/free-trial/"),t="color:#5bb75b;text-decoration: underline;";return Object(b["translate"])("Marketplace_TrialHints",'<a style="'.concat(t,'" href="').concat(e,'" target="_blank" rel="noreferrer noopener">'),"</a>")},pluginRows:function(){var e=[];return this.plugins.forEach((function(t,n){var a=Math.floor(n/3);e[a]=e[a]||[],e[a].push(t)})),e},overviewLink:function(){var e=b["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}),t=b["MatomoUrl"].stringify({pluginType:"premium"});return"?".concat(e,"#?").concat(t)}}});Sa.render=Va;var Ea=Sa,Ba={class:"marketplaceIntro"},Ma={key:0},Ta={key:1},wa={key:0,class:"installAllPaidPlugins"};function Ca(e,t,n,a,l,i){var o=this,c=Object(r["resolveComponent"])("EnrichedHeadline"),s=Object(r["resolveComponent"])("InstallAllPaidPluginsButton"),u=Object(r["resolveComponent"])("Marketplace"),d=Object(r["resolveDirective"])("content-intro");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(c,{"feature-name":e.translate("CorePluginsAdmin_Marketplace")},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)]})),_:1},8,["feature-name"])]),Object(r["createElementVNode"])("div",Ba,[e.isSuperUser?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",Ta,Object(r["toDisplayString"])(e.translate("Marketplace_IntroSuperUser")),1)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",Ma,Object(r["toDisplayString"])(e.translate("Marketplace_Intro")),1))]),e.installAllPaidPluginsVisible?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",wa,[Object(r["createVNode"])(s,{disabled:e.installDisabled},null,8,["disabled"])])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(u,{"plugin-type-options":e.pluginTypeOptions,"default-sort":e.defaultSort,"plugin-sort-options":e.pluginSortOptions,"num-available-plugins-by-type":e.numAvailablePluginsByType,"current-user-email":e.currentUserEmail,"is-auto-update-possible":e.isAutoUpdatePossible,"is-super-user":e.isSuperUser,"is-multi-server-environment":e.isMultiServerEnvironment,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-valid-consumer":e.getIsValidConsumer,"deactivate-nonce":e.deactivateNonce,"activate-nonce":e.activateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,"has-some-admin-access":e.hasSomeAdminAccess,"num-users":e.numUsers,onTriggerUpdate:t[0]||(t[0]=function(e){return o.updateOverviewData()}),onStartTrialStart:t[1]||(t[1]=function(e){return o.disableInstallAllPlugins(!0)}),onStartTrialStop:t[2]||(t[2]=function(e){return o.disableInstallAllPlugins(!1)})},null,8,["plugin-type-options","default-sort","plugin-sort-options","num-available-plugins-by-type","current-user-email","is-auto-update-possible","is-super-user","is-multi-server-environment","is-plugins-admin-enabled","is-valid-consumer","deactivate-nonce","activate-nonce","install-nonce","update-nonce","has-some-admin-access","num-users"])],512)),[[d]])}var Pa=Object(r["defineComponent"])({props:{currentUserEmail:String,inReportingMenu:Boolean,isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,isMultiServerEnvironment:Boolean,hasSomeAdminAccess:Boolean,installNonce:{type:String,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},isPluginUploadEnabled:Boolean,uploadLimit:[String,Number],pluginTypeOptions:{type:Object,required:!0},defaultSort:{type:String,required:!0},pluginSortOptions:{type:Object,required:!0},numAvailablePluginsByType:{type:Object,required:!0},numUsers:{type:Number,required:!0}},components:{InstallAllPaidPluginsButton:g["InstallAllPaidPluginsButton"],EnrichedHeadline:b["EnrichedHeadline"],Marketplace:Pn},directives:{ContentIntro:b["ContentIntro"]},data:function(){return{updating:!1,fetchRequest:null,fetchRequestAbortController:null,updateData:null,installDisabled:!1,installLoading:!1}},computed:{getIsValidConsumer:function(){return this.updateData&&"undefined"!==typeof this.updateData.isValidConsumer?this.updateData.isValidConsumer:this.isValidConsumer},installAllPaidPluginsVisible:function(){return this.getIsValidConsumer&&this.isSuperUser&&this.isAutoUpdatePossible&&this.isPluginsAdminEnabled||this.installDisabled&&this.installLoading},showThemes:function(){return"themes"===b["MatomoUrl"].hashParsed.value.pluginType}},methods:{disableInstallAllPlugins:function(e){this.installDisabled=!0,this.installLoading=e},enableInstallAllPlugins:function(){this.installDisabled=!1,this.installLoading=!1},updateOverviewData:function(){var e=this;this.updating=!0,this.isSuperUser&&this.disableInstallAllPlugins(!0),this.fetchRequestAbortController&&(this.fetchRequestAbortController.abort(),this.fetchRequestAbortController=null),this.fetchRequestAbortController=new AbortController,this.fetchRequest=b["AjaxHelper"].post({module:"Marketplace",action:"updateOverview",format:"JSON"},{},{withTokenInUrl:!0,abortController:this.fetchRequestAbortController}).then((function(t){e.updateData=t})).finally((function(){e.updating=!1,e.fetchRequestAbortController=null,e.enableInstallAllPlugins()}))}}});Pa.render=Ca;var Da=Pa,Aa={key:0},_a=["href"],La=Object(r["createElementVNode"])("br",null,null,-1),Ua=Object(r["createElementVNode"])("br",null,null,-1),qa=["innerHTML"],xa=Object(r["createElementVNode"])("br",null,null,-1),Fa={class:"subscriptionName"},Ra=["href"],Ia={key:1},Ha={class:"subscriptionType"},$a=["title"],Ka={key:0,class:"icon-error"},za={key:1,class:"icon-warning"},Ga={key:2,class:"icon-error"},Qa={key:3,class:"icon-ok"},Wa=["title"],Ja=Object(r["createElementVNode"])("span",{class:"icon-error"},null,-1),Ya={key:0},Za={colspan:"6"},Xa={class:"tableActionBar"},el=["href"],tl=Object(r["createElementVNode"])("span",{class:"icon-table"},null,-1),nl={key:1},al=["innerHTML"];function ll(e,t,n,a,l,i){var o=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(o,{"content-title":e.translate("Marketplace_OverviewPluginSubscriptions"),class:"subscriptionOverview"},{default:Object(r["withCtx"])((function(){return[e.hasLicenseKey?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Aa,[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Marketplace_PluginSubscriptionsList"))+" ",1),e.loginUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.loginUrl},Object(r["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsAllDetails")),9,_a)):Object(r["createCommentVNode"])("",!0),La,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsMissingInfo"))+" ",1),Ua,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_NoValidSubscriptionNoUpdates"))+" ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Marketplace_CurrentNumPiwikUsers","<strong>".concat(e.numUsers,"</strong>")))},null,8,qa)]),xa,Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionType")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionStartDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionEndDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("Marketplace_SubscriptionNextPaymentDate")),1)])]),Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.subscriptions||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",Fa,[t.plugin.htmlUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:t.plugin.htmlUrl,rel:"noreferrer noopener",target:"_blank"},Object(r["toDisplayString"])(t.plugin.displayName),9,Ra)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ia,Object(r["toDisplayString"])(t.plugin.displayName),1))]),Object(r["createElementVNode"])("td",Ha,Object(r["toDisplayString"])(t.productType),1),Object(r["createElementVNode"])("td",{class:"subscriptionStatus",title:e.getSubscriptionStatusTitle(t)},[t.isValid?t.isExpiredSoon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",za)):""!==t.status&&"Active"!==t.status?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ga)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Qa)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ka)),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(t.status)+" ",1),t.isExceeded?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:4,class:"errorMessage",title:e.translate("Marketplace_LicenseExceededPossibleCause")},[Ja,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_Exceeded")),1)],8,Wa)):Object(r["createCommentVNode"])("",!0)],8,$a),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.start),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.isValid&&t.nextPayment?e.translate("Marketplace_LicenseRenewsNextPaymentDate"):t.end),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.nextPayment),1)])})),128)),e.subscriptions.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Ya,[Object(r["createElementVNode"])("td",Za,Object(r["toDisplayString"])(e.translate("Marketplace_NoSubscriptionsFound")),1)]))])],512),[[c]]),Object(r["createElementVNode"])("div",Xa,[Object(r["createElementVNode"])("a",{href:e.marketplaceOverviewLink,class:""},[tl,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_BrowseMarketplace")),1)],8,el)])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nl,[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.missingLicenseText)},null,8,al)]))]})),_:1},8,["content-title"])}var rl=Object(r["defineComponent"])({props:{loginUrl:{type:String,required:!0},numUsers:{type:Number,required:!0},hasLicenseKey:Boolean,subscriptions:{type:Array,required:!0}},components:{ContentBlock:b["ContentBlock"]},directives:{ContentTable:b["ContentTable"]},methods:{getSubscriptionStatusTitle:function(e){return e.isValid?e.isExpiredSoon?Object(b["translate"])("Marketplace_SubscriptionExpiresSoon"):void 0:Object(b["translate"])("Marketplace_SubscriptionInvalid")}},computed:{marketplaceOverviewLink:function(){return"?".concat(b["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}))},licenseKeyLink:function(){return"?".concat(b["MatomoUrl"].stringify({module:"Marketplace",action:"manageLicenseKey"}))},missingLicenseText:function(){return Object(b["translate"])("Marketplace_OverviewPluginSubscriptionsMissingLicenseMessage",'<a href="'.concat(this.licenseKeyLink,'">'),"</a>",'<a href="'.concat(this.marketplaceOverviewLink,'">'),"</a>")}}});rl.render=ll;var il=rl,ol={class:"richMarketplaceMenuButton"},cl=Object(r["createElementVNode"])("hr",null,null,-1),sl={class:"intro"},ul={class:"cta"},dl=Object(r["createElementVNode"])("span",{class:"icon-marketplace"}," ",-1);function pl(e,t,n,a,l,i){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ol,[cl,Object(r["createElementVNode"])("p",sl,Object(r["toDisplayString"])(e.translate("Marketplace_RichMenuIntro")),1),Object(r["createElementVNode"])("p",ul,[Object(r["createElementVNode"])("a",{class:"btn btn-outline",tabindex:"5",href:"",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.$emit("action")}),["prevent"])),onKeyup:t[1]||(t[1]=Object(r["withKeys"])((function(t){return e.$emit("action")}),["enter"]))},[dl,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)],32)])])}var ml=Object(r["defineComponent"])({});ml.render=pl;var bl=ml;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["ProfessionalServices"]=t(require("CoreHome")):e["ProfessionalServices"]=t(e["CoreHome"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="plugins/ProfessionalServices/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"DismissPromoWidget",(function(){return u})),"undefined"!==typeof window){var n=window.document.currentScript,r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(o.p=r[1])}var i=o("19dc");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
function a(e,t){var o=e.value.widgetName,n=i["ReportingMenuStore"].activeCategory.value;return t.preventDefault(),i["Matomo"].helper.showAjaxLoading(),i["AjaxHelper"].post({method:"ProfessionalServices.dismissWidget"},{widgetName:o}).catch((function(e){throw i["Matomo"].helper.hideAjaxLoading(),e})).then((function(){i["ReportingMenuStore"].reloadMenuItems().then((function(){i["Matomo"].helper.hideAjaxLoading(),i["MatomoUrl"].updateHash("category=Dashboard_Dashboard&subcategory=1"),i["NotificationsStore"].show({id:"ProfessionalServices_PromoWidgetDismissed",animate:!1,context:"info",noclear:!0,message:Object(i["translate"])("ProfessionalServices_DismissedNotification",Object(i["translate"])(n)),type:"toast"})}))}))}var u={mounted:function(e,t){var o=t.value.widgetName;o&&(t.value.onClickHandler=a.bind(null,t),e.addEventListener("click",t.value.onClickHandler))},unmounted:function(e,t){e.removeEventListener("click",t.value.onClickHandler)}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["CustomDimensions"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["CustomDimensions"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},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/CustomDimensions/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},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CustomDimensionsStore",(function(){return d})),n.d(t,"Edit",(function(){return P})),n.d(t,"List",(function(){return pe})),n.d(t,"Manage",(function(){return Ne})),"undefined"!==typeof window){var i=window.document.currentScript,o=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var s=n("8bbf"),a=n("19dc");function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function l(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function u(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 https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var m=function(){function e(){var t=this;c(this,e),u(this,"privateState",Object(s["reactive"])({customDimensions:[],availableScopes:[],extractionDimensions:[],isLoading:!1,isUpdating:!1})),u(this,"state",Object(s["computed"])((function(){return Object(s["readonly"])(t.privateState)}))),u(this,"isLoading",Object(s["computed"])((function(){return t.state.value.isLoading}))),u(this,"isUpdating",Object(s["computed"])((function(){return t.state.value.isUpdating}))),u(this,"extractionDimensions",Object(s["computed"])((function(){return t.state.value.extractionDimensions}))),u(this,"extractionDimensionsOptions",Object(s["computed"])((function(){return t.extractionDimensions.value.map((function(e){return{key:e.value,value:e.name}}))}))),u(this,"availableScopes",Object(s["computed"])((function(){return t.state.value.availableScopes}))),u(this,"customDimensions",Object(s["computed"])((function(){return t.state.value.customDimensions}))),u(this,"customDimensionsById",Object(s["computed"])((function(){var e={};return t.customDimensions.value.forEach((function(t){e["".concat(t.idcustomdimension)]=t})),e}))),u(this,"reloadPromise",null)}return l(e,[{key:"reload",value:function(){return this.privateState.customDimensions=[],this.privateState.availableScopes=[],this.privateState.extractionDimensions=[],this.reloadPromise=null,this.fetch()}},{key:"fetch",value:function(){var e=this;return this.reloadPromise||(this.privateState.isLoading=!0,this.reloadPromise=Promise.all([this.fetchConfiguredCustomDimensions(),this.fetchAvailableExtractionDimensions(),this.fetchAvailableScopes()]).finally((function(){e.privateState.isLoading=!1}))),this.reloadPromise}},{key:"fetchConfiguredCustomDimensions",value:function(){var e=this;return a["AjaxHelper"].fetch({method:"CustomDimensions.getConfiguredCustomDimensions",filter_limit:"-1"}).then((function(t){e.privateState.customDimensions=t}))}},{key:"fetchAvailableExtractionDimensions",value:function(){var e=this;return a["AjaxHelper"].fetch({method:"CustomDimensions.getAvailableExtractionDimensions",filter_limit:"-1"}).then((function(t){e.privateState.extractionDimensions=t}))}},{key:"fetchAvailableScopes",value:function(){var e=this;return a["AjaxHelper"].fetch({method:"CustomDimensions.getAvailableScopes",filter_limit:"-1"}).then((function(t){e.privateState.availableScopes=t}))}},{key:"createOrUpdateDimension",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,a["AjaxHelper"].post({method:t,scope:e.scope,idDimension:e.idcustomdimension,idSite:e.idsite,name:e.name,active:e.active?"1":"0",caseSensitive:e.case_sensitive?"1":"0"},{extractions:e.extractions}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),d=new m,p={class:"editCustomDimension"},b={class:"loadingPiwik"},v=Object(s["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),f={class:"row form-group"},j={class:"col s12"},O={class:"col s12 m6"},h={class:"row"},D={class:"col s12 m6"},C={class:"col s12 m6"},g={class:"col s12"},V=["onClick"],E={class:"row"},N={class:"col s12"},S={class:"col s12 m6 form-help"},y=["value","disabled"],x=["value","disabled"],w={class:"btn cancel",type:"button",href:"#list"},k={class:"alert alert-info howToTrackInfo"},T=["innerHTML"],_=["innerHTML"],M=["innerHTML"],U=["innerHTML"];function B(e,t,n,i,o,a){var c=Object(s["resolveComponent"])("Field"),r=Object(s["resolveComponent"])("ContentBlock"),l=Object(s["resolveDirective"])("copy-to-clipboard");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",p,[Object(s["createVNode"])(r,{"content-title":e.contentTitleText},{default:Object(s["withCtx"])((function(){var n;return[Object(s["withDirectives"])(Object(s["createElementVNode"])("p",null,[Object(s["createElementVNode"])("span",b,[v,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[s["vShow"],e.isLoading||e.isUpdating]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("div",null,[Object(s["createElementVNode"])("form",{onSubmit:t[4]||(t[4]=Object(s["withModifiers"])((function(t){return e.edit?e.updateCustomDimension():e.createCustomDimension()}),["prevent"]))},[Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c,{uicontrol:"text",name:"name",modelValue:e.dimension.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.dimension.name=t}),maxlength:255,required:!0,title:e.translate("General_Name"),"inline-help":e.translate("CustomDimensions_NameAllowedCharacters")},null,8,["modelValue","title","inline-help"])]),Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c,{uicontrol:"checkbox",name:"active",modelValue:e.dimension.active,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.dimension.active=t}),title:e.translate("CorePluginsAdmin_Active"),"inline-help":e.translate("CustomDimensions_CannotBeDeleted")},null,8,["modelValue","title","inline-help"])]),Object(s["withDirectives"])(Object(s["createElementVNode"])("div",f,[Object(s["createElementVNode"])("h3",j,Object(s["toDisplayString"])(e.translate("CustomDimensions_ExtractValue")),1),Object(s["createElementVNode"])("div",O,[(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.dimension.extractions,(function(n,i){return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",{class:Object(s["normalizeClass"])("".concat(i,"extraction ")),key:i},[Object(s["createElementVNode"])("div",h,[Object(s["createElementVNode"])("div",D,[Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c,{uicontrol:"select",name:"".concat(i,"dimension"),modelValue:n.dimension,"onUpdate:modelValue":function(e){return n.dimension=e},"full-width":!0,options:e.extractionDimensionsOptions},null,8,["name","modelValue","onUpdate:modelValue","options"])])]),Object(s["createElementVNode"])("div",C,[Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c,{uicontrol:"text",name:"".concat(i,"pattern"),modelValue:n.pattern,"onUpdate:modelValue":function(e){return n.pattern=e},"full-width":!0,title:"urlparam"===n.dimension?e.translate("CustomDimensions_UrlQueryStringParameter"):"eg. /blog/(.*)/"},null,8,["name","modelValue","onUpdate:modelValue","title"])])]),Object(s["createElementVNode"])("div",g,[Object(s["withDirectives"])(Object(s["createElementVNode"])("span",{class:"icon-plus",onClick:t[2]||(t[2]=function(t){return e.addExtraction()})},null,512),[[s["vShow"],n.pattern]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("span",{class:"icon-minus",onClick:function(t){return e.removeExtraction(i)}},null,8,V),[[s["vShow"],e.dimension.extractions.length>1]])])])],2)})),128)),Object(s["createElementVNode"])("div",E,[Object(s["createElementVNode"])("div",N,[Object(s["createElementVNode"])("div",null,[Object(s["withDirectives"])(Object(s["createVNode"])(c,{uicontrol:"checkbox",name:"casesensitive",modelValue:e.dimension.case_sensitive,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.dimension.case_sensitive=t}),title:e.translate("Goals_CaseSensitive")},null,8,["modelValue","title"]),[[s["vShow"],null===(n=e.dimension.extractions[0])||void 0===n?void 0:n.pattern]])])])])]),Object(s["createElementVNode"])("div",S,Object(s["toDisplayString"])(e.translate("CustomDimensions_ExtractionsHelp")),1)],512),[[s["vShow"],e.doesScopeSupportExtraction]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("input",{class:"btn update",type:"submit",value:e.translate("General_Update"),disabled:e.isUpdating,style:{"margin-right":"3.5px"}},null,8,y),[[s["vShow"],e.edit]]),Object(s["withDirectives"])(Object(s["createElementVNode"])("input",{class:"btn create",type:"submit",value:e.translate("General_Create"),disabled:e.isUpdating,style:{"margin-right":"3.5px"}},null,8,x),[[s["vShow"],e.create]]),Object(s["createElementVNode"])("a",w,Object(s["toDisplayString"])(e.translate("General_Cancel")),1)],32),Object(s["withDirectives"])(Object(s["createElementVNode"])("div",k,[Object(s["createElementVNode"])("strong",null,Object(s["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyTitle")),1),Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaJs")),1),Object(s["createElementVNode"])("div",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("pre",null,[Object(s["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCodeViaJs(e.dimension))},null,8,T)],512),[[l,{}]])]),Object(s["createElementVNode"])("p",{innerHTML:e.$sanitize(e.howToTrackManuallyText)},null,8,_),Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaPhp")),1),Object(s["createElementVNode"])("div",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("pre",null,[Object(s["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCodeViaPhp(e.dimension))},null,8,M)],512),[[l,{}]])]),Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("CustomDimensions_HowToTrackManuallyViaHttp")),1),Object(s["createElementVNode"])("div",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("pre",null,[Object(s["createElementVNode"])("code",{innerHTML:e.$sanitize(e.manuallyTrackCode)},null,8,U)],512),[[l,{}]])])],512),[[s["vShow"],e.edit]])],512),[[s["vShow"],!e.isLoading]])]})),_:1},8,["content-title"])])}var L=n("a5a2");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function A(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}var H="customdimensions",I=Object(s["defineComponent"])({props:{dimensionId:Number,dimensionScope:{type:String,required:!0}},components:{ContentBlock:a["ContentBlock"],Field:L["Field"]},directives:{CopyToClipboard:a["CopyToClipboard"]},data:function(){return{dimension:{extractions:[]},isUpdatingDim:!1}},created:function(){this.init()},watch:{dimensionId:function(){this.init()}},methods:{removeAnyCustomDimensionNotification:function(){a["NotificationsStore"].remove(H)},showNotification:function(e,t){a["NotificationsStore"].show({message:e,context:t,id:H,type:"transient"})},init:function(){var e=this;null!==this.dimensionId&&this.removeAnyCustomDimensionNotification(),d.fetch().then((function(){if(e.edit&&e.dimensionId){var t=d.customDimensionsById.value[e.dimensionId];if(!t)return void a["MatomoUrl"].updateHashToUrl("/list");e.dimension=Object(a["clone"])(t),e.dimension&&!e.dimension.extractions.length&&e.addExtraction()}else e.create&&(e.dimension={idsite:a["Matomo"].idSite,name:"",active:!1,extractions:[],scope:e.dimensionScope,case_sensitive:!0},e.addExtraction())}))},removeExtraction:function(e){e>-1&&this.dimension.extractions.splice(e,1)},addExtraction:function(){this.doesScopeSupportExtraction&&this.dimension.extractions.push({dimension:"url",pattern:""})},createCustomDimension:function(){var e=this;this.isUpdatingDim=!0,d.createOrUpdateDimension(this.dimension,"CustomDimensions.configureNewCustomDimension").then((function(){e.showNotification(Object(a["translate"])("CustomDimensions_DimensionCreated"),"success"),d.reload(),a["MatomoUrl"].updateHashToUrl("/list")})).finally((function(){e.isUpdatingDim=!1}))},updateCustomDimension:function(){var e=this;this.isUpdatingDim=!0,d.createOrUpdateDimension(this.dimension,"CustomDimensions.configureExistingCustomDimension").then((function(){e.showNotification(Object(a["translate"])("CustomDimensions_DimensionUpdated"),"success"),d.reload(),a["MatomoUrl"].updateHashToUrl("/list")})).finally((function(){e.isUpdatingDim=!1}))},manuallyTrackCodeViaJs:function(e){return"_paq.push(['setCustomDimension', ".concat(e.idcustomdimension,", ")+"'".concat(Object(a["translate"])("CustomDimensions_ExampleValue"),"']);")},manuallyTrackCodeViaPhp:function(e){return"$tracker->setCustomDimension('".concat(e.idcustomdimension,"', ")+"'".concat(Object(a["translate"])("CustomDimensions_ExampleValue"),"');")}},computed:{isLoading:function(){return d.isLoading.value},isUpdating:function(){return d.isUpdating.value||this.isUpdatingDim},create:function(){return 0===this.dimensionId},edit:function(){return!this.create},extractionDimensionsOptions:function(){return d.extractionDimensionsOptions.value},availableScopes:function(){return d.availableScopes.value},doesScopeSupportExtraction:function(){var e,t=this;if(null===(e=this.dimension)||void 0===e||!e.scope||!this.availableScopes)return!1;var n=this.availableScopes.find((function(e){return e.value===t.dimension.scope}));return null===n||void 0===n?void 0:n.supportsExtractions},contentTitleText:function(){var e;return Object(a["translate"])("CustomDimensions_ConfigureDimension",A(this.dimensionScope),"".concat((null===(e=this.dimension)||void 0===e?void 0:e.index)||""))},howToTrackManuallyText:function(){var e="https://developer.piwik.org/guides/tracking-javascript-guide#custom-dimensions";return Object(a["translate"])("CustomDimensions_HowToTrackManuallyViaJsDetails",'<a target=_blank href="'.concat(e,'" rel="noreferrer noopener">'),"</a>")},manuallyTrackCode:function(){var e=Object(a["translate"])("CustomDimensions_ExampleValue");return"&dimension".concat(this.dimension.idcustomdimension,"=").concat(e)}}});I.render=B;var P=I,q=["innerHTML"],z={class:"loadingPiwik"},G=Object(s["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),$={class:"index"},F={class:"name"},J={class:"active"},Q={class:"action"},X={colspan:"5"},Y={class:"index"},K={class:"name"},R={class:"extractions"},W={class:"active"},Z={class:"action"},ee=["href"],te={class:"tableActionBar"},ne=["disabled","onClick"],ie=Object(s["createElementVNode"])("span",{class:"icon-add"},null,-1),oe={class:"info"};function se(e,t,n,i,o,a){var c=Object(s["resolveComponent"])("EnrichedHeadline"),r=Object(s["resolveComponent"])("ContentBlock"),l=Object(s["resolveDirective"])("content-intro"),u=Object(s["resolveDirective"])("content-table");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("div",null,[Object(s["createElementVNode"])("h2",null,[Object(s["createVNode"])(c,null,{default:Object(s["withCtx"])((function(){return[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("CustomDimensions_CustomDimensions")),1)]})),_:1})]),Object(s["createElementVNode"])("p",{innerHTML:e.$sanitize(e.contentIntroText)},null,8,q),Object(s["withDirectives"])(Object(s["createElementVNode"])("p",null,[Object(s["createElementVNode"])("span",z,[G,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[s["vShow"],e.isLoading]])],512),[[l]]),(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.availableScopes,(function(t){return Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("div",{key:t.value},[Object(s["createVNode"])(r,{"content-title":e.translate("CustomDimensions_ScopeTitle".concat(e.ucfirst(t.value)))},{default:Object(s["withCtx"])((function(){return[Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("CustomDimensions_ScopeDescription".concat(e.ucfirst(t.value))))+" "+Object(s["toDisplayString"])(e.translate("CustomDimensions_ScopeDescription".concat(e.ucfirst(t.value),"MoreInfo"))),1),Object(s["withDirectives"])(Object(s["createElementVNode"])("table",null,[Object(s["createElementVNode"])("thead",null,[Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("th",$,Object(s["toDisplayString"])(e.translate("General_Id")),1),Object(s["createElementVNode"])("th",F,Object(s["toDisplayString"])(e.translate("General_Name")),1),Object(s["withDirectives"])(Object(s["createElementVNode"])("th",{class:"extractions"},Object(s["toDisplayString"])(e.translate("CustomDimensions_Extractions")),513),[[s["vShow"],t.supportsExtractions]]),Object(s["createElementVNode"])("th",J,Object(s["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1),Object(s["createElementVNode"])("th",Q,Object(s["toDisplayString"])(e.translate("General_Action")),1)])]),Object(s["createElementVNode"])("tbody",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("tr",null,[Object(s["createElementVNode"])("td",X,Object(s["toDisplayString"])(e.translate("CustomDimensions_NoCustomDimensionConfigured")),1)],512),[[s["vShow"],0===t.numSlotsUsed&&!e.isLoading]]),(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.sortedCustomDimensionsByScope[t.value],(function(e){var n;return Object(s["openBlock"])(),Object(s["createElementBlock"])("tr",{class:Object(s["normalizeClass"])(["customdimension",e.idcustomdimension]),key:e.idcustomdimension},[Object(s["createElementVNode"])("td",Y,Object(s["toDisplayString"])(e.idcustomdimension),1),Object(s["createElementVNode"])("td",K,Object(s["toDisplayString"])(e.name),1),Object(s["withDirectives"])(Object(s["createElementVNode"])("td",R,[Object(s["createElementVNode"])("span",{class:Object(s["normalizeClass"])({"icon-ok":null===(n=e.extractions[0])||void 0===n?void 0:n.pattern})},null,2)],512),[[s["vShow"],t.supportsExtractions]]),Object(s["createElementVNode"])("td",W,[Object(s["createElementVNode"])("span",{class:Object(s["normalizeClass"])({"icon-ok":e.active})},null,2)]),Object(s["createElementVNode"])("td",Z,[Object(s["createElementVNode"])("a",{class:"table-action icon-edit",href:"#?idDimension=".concat(e.idcustomdimension,"&scope=").concat(t.value)},null,8,ee)])],2)})),128))])],512),[[u]]),Object(s["createElementVNode"])("div",te,[Object(s["withDirectives"])(Object(s["createElementVNode"])("button",{class:"btn",disabled:!t.numSlotsLeft,onClick:function(n){return e.addDimension(t.value)}},[ie,Object(s["createTextVNode"])(" "+Object(s["toDisplayString"])(e.translate("CustomDimensions_ConfigureNewDimension"))+" ",1),Object(s["createElementVNode"])("span",oe,"("+Object(s["toDisplayString"])(e.translate("CustomDimensions_XofYLeft",t.numSlotsLeft,t.numSlotsAvailable))+")",1)],8,ne),[[s["vShow"],!e.isLoading]])])]})),_:2},1032,["content-title"])],512)),[[s["vShow"],!e.isLoading]])})),128))])}function ae(e){return ue(e)||le(e)||re(e)||ce()}function ce(){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 re(e,t){if(e){if("string"===typeof e)return me(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)?me(e,t):void 0}}function le(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ue(e){if(Array.isArray(e))return me(e)}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var de=Object(s["defineComponent"])({name:"listcustomdimensions",components:{EnrichedHeadline:a["EnrichedHeadline"],ContentBlock:a["ContentBlock"]},directives:{ContentIntro:a["ContentIntro"],ContentTable:a["ContentTable"]},created:function(){d.fetch()},methods:{ucfirst:function(e){return A(e)},addDimension:function(e){a["MatomoUrl"].updateHashToUrl("/?idDimension=0&scope=".concat(e))}},computed:{isLoading:function(){return d.isLoading.value},availableScopes:function(){return d.availableScopes.value},contentIntroText:function(){var e=Object(a["translate"])("CustomDimensions_CustomDimensionsIntroNext",'<a target=_blank href="https://piwik.org/docs/custom-variables">',"</a>",'<a target=_blank href="https://piwik.org/faq/general/faq_21117">',"</a>"),t=Object(a["translate"])("CustomDimensions_CustomDimensionsIntro",'<a target=_blank href="https://piwik.org/docs/custom-dimensions">',"</a>",this.siteName);return"".concat(e).concat(t)},customDimensions:function(){return d.customDimensions.value},sortedCustomDimensions:function(){var e=ae(this.customDimensions);return e.sort((function(e,t){var n=parseInt("".concat(e.idcustomdimension),10),i=parseInt("".concat(t.idcustomdimension),10);return n-i})),e},sortedCustomDimensionsByScope:function(){var e={};return this.sortedCustomDimensions.reduce((function(e,t){return e[t.scope]=e[t.scope]||[],e[t.scope].push(t),e}),e),e},siteName:function(){return a["Matomo"].helper.htmlEntities(a["Matomo"].helper.htmlDecode(a["Matomo"].siteName))}}});de.render=se;var pe=de,be={class:"manageCustomDimensions"},ve={key:0},fe=Object(s["createElementVNode"])("br",null,null,-1),je=Object(s["createElementVNode"])("br",null,null,-1),Oe=Object(s["createElementVNode"])("br",null,null,-1),he=Object(s["createElementVNode"])("br",null,null,-1),De=["textContent"],Ce=["textContent"],ge={key:1};function Ve(e,t,n,i,o,a){var c=Object(s["resolveComponent"])("CustomDimensionsList"),r=Object(s["resolveComponent"])("ContentBlock"),l=Object(s["resolveComponent"])("CustomDimensionsEdit"),u=Object(s["resolveDirective"])("copy-to-clipboard");return Object(s["openBlock"])(),Object(s["createElementBlock"])("div",be,[e.editMode?Object(s["createCommentVNode"])("",!0):(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",ve,[Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(c)]),Object(s["createVNode"])(r,{id:"customDimensionsCreateMoreDimensions","content-title":e.translate("CustomDimensions_IncreaseAvailableCustomDimensionsTitle")},{default:Object(s["withCtx"])((function(){return[Object(s["createElementVNode"])("p",null,[Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("CustomDimensions_IncreaseAvailableCustomDimensionsTakesLong"))+" ",1),fe,je,Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("CustomDimensions_HowToCreateCustomDimension"))+" ",1),Oe,he]),Object(s["createElementVNode"])("div",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("pre",null,[Object(s["createElementVNode"])("code",{textContent:Object(s["toDisplayString"])(e.addCustomDimCode)},null,8,De)],512),[[u,{}]])]),Object(s["createElementVNode"])("p",null,Object(s["toDisplayString"])(e.translate("CustomDimensions_HowToManyCreateCustomDimensions"))+" "+Object(s["toDisplayString"])(e.translate("CustomDimensions_ExampleCreateCustomDimensions",5)),1),Object(s["createElementVNode"])("div",null,[Object(s["withDirectives"])(Object(s["createElementVNode"])("pre",null,[Object(s["createElementVNode"])("code",{textContent:Object(s["toDisplayString"])(e.addMultipleCustomDimCode)},null,8,Ce)],512),[[u,{}]])])]})),_:1},8,["content-title"])])),e.editMode?(Object(s["openBlock"])(),Object(s["createElementBlock"])("div",ge,[Object(s["createElementVNode"])("div",null,[Object(s["createVNode"])(l,{"dimension-id":e.dimensionId,"dimension-scope":e.dimensionScope},null,8,["dimension-id","dimension-scope"])])])):Object(s["createCommentVNode"])("",!0)])}var Ee=Object(s["defineComponent"])({components:{CustomDimensionsList:pe,ContentBlock:a["ContentBlock"],CustomDimensionsEdit:P},directives:{CopyToClipboard:a["CopyToClipboard"]},data:function(){return{editMode:!1,dimensionId:null,dimensionScope:""}},created:function(){var e=this;Object(s["watch"])((function(){return a["MatomoUrl"].hashParsed.value}),(function(){e.initState()})),this.initState()},methods:{getValidDimensionScope:function(e){return-1!==["action","visit"].indexOf(e)?e:""},initState:function(){var e=a["MatomoUrl"].hashParsed.value.idDimension;if(e){var t=this.getValidDimensionScope(a["MatomoUrl"].hashParsed.value.scope);if("0"===e){var n={isAllowed:!0,scope:t};if(a["Matomo"].postEvent("CustomDimensions.initAddDimension",n),n&&!n.isAllowed)return this.editMode=!1,this.dimensionId=null,void(this.dimensionScope="")}this.editMode=!0,this.dimensionId=parseInt(e,10),this.dimensionScope=t}else this.editMode=!1,this.dimensionId=null,this.dimensionScope="";a["Matomo"].helper.lazyScrollToContent()}},computed:{addCustomDimCode:function(){return"./console customdimensions:add-custom-dimension --scope=action\n./console customdimensions:add-custom-dimension --scope=visit"},addMultipleCustomDimCode:function(){return"./console customdimensions:add-custom-dimension --scope=action --count=5"}}});Ee.render=Ve;var Ne=Ee;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["JsTrackerInstallCheck"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["JsTrackerInstallCheck"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,s){return function(e){var t={};function s(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(n,r,function(t){return e[t]}.bind(null,r));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="plugins/JsTrackerInstallCheck/vue/dist/",s(s.s="fae3")}({"19dc":function(t,s){t.exports=e},"8bbf":function(e,s){e.exports=t},a5a2:function(e,t){e.exports=s},fae3:function(e,t,s){"use strict";if(s.r(t),s.d(t,"JsTrackerInstallCheck",(function(){return O})),"undefined"!==typeof window){var n=window.document.currentScript,r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(s.p=r[1])}var c=s("8bbf"),i={class:"jsTrackerInstallCheck"},o={class:"row testInstallFields"},a={class:"col s2"},l={class:"col s10"},u=["disabled","value"],d={class:"system-success success-message"},h=Object(c["createElementVNode"])("span",{class:"icon-ok"},null,-1),p={class:"system-errors test-error"},f=Object(c["createElementVNode"])("span",{class:"icon-warning"},null,-1),m=Object(c["createTextVNode"])("  "),T=["innerHTML"];function b(e,t,s,n,r,b){var k=Object(c["resolveComponent"])("Field"),g=Object(c["resolveComponent"])("ActivityIndicator");return Object(c["openBlock"])(),Object(c["createElementBlock"])(c["Fragment"],null,[Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("JsTrackerInstallCheck_OptionalTestInstallationDescription")),1),Object(c["createElementVNode"])("div",i,[Object(c["createElementVNode"])("div",o,[Object(c["createElementVNode"])("div",a,[Object(c["createVNode"])(k,{uicontrol:"url",name:"baseUrl",placeholder:"https://example.com",modelValue:e.baseUrl,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.baseUrl=t}),"full-width":!0,disabled:e.isTesting},null,8,["modelValue","disabled"])]),Object(c["createElementVNode"])("div",l,[Object(c["createElementVNode"])("input",{type:"button",class:"btn testInstallBtn",onClick:t[1]||(t[1]=function(){return e.initiateTrackerTest&&e.initiateTrackerTest.apply(e,arguments)}),disabled:!e.baseUrl||e.isTesting,value:e.translate("JsTrackerInstallCheck_TestInstallationBtnText")},null,8,u)])]),Object(c["createVNode"])(g,{loading:e.isTesting,loadingMessage:e.translate("General_Testing")},null,8,["loading","loadingMessage"]),Object(c["withDirectives"])(Object(c["createElementVNode"])("div",d,[h,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("JsTrackerInstallCheck_JsTrackingCodeInstallCheckSuccessMessage")),1)],512),[[c["vShow"],e.isTestSuccess]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("div",p,[f,m,Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.getTestFailureMessage)},null,8,T)],512),[[c["vShow"],e.isTestComplete&&!e.isTestSuccess]])])],64)}var k=s("19dc"),g=s("a5a2"),C=10,j=1e3,v=Object(c["defineComponent"])({components:{Field:g["Field"],ActivityIndicator:k["ActivityIndicator"]},data:function(){return{checkNonce:"",isTesting:!1,isTestComplete:!1,isTestSuccess:!1,testTimeoutCount:0,baseUrl:""}},props:{site:{type:Object,required:!0},isWordpress:{type:Boolean,required:!1,default:!1}},created:function(){this.checkWhetherSuccessWasRecorded()},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){this.checkNonce="",this.isTesting=!1,this.isTestComplete=!1,this.isTestSuccess=!1,this.testTimeoutCount=0,this.checkWhetherSuccessWasRecorded()},initiateTrackerTest:function(){var e=this;this.isTesting=!0,this.isTestComplete=!1,this.isTestSuccess=!1,this.testTimeoutCount=0;var t=this.site,s={idSite:t.id,url:""};this.baseUrl&&(s.url=this.baseUrl),k["AjaxHelper"].post({module:"API",method:"JsTrackerInstallCheck.initiateJsTrackerInstallTest"},s).then((function(t){var s=t&&t.url&&t.nonce;if(s){e.checkNonce=t.nonce;var n=window.open(t.url);e.setCheckInTime(),setTimeout((function(){n&&!n.closed&&(n.close(),e.testTimeoutCount=C)}),C*j)}})).catch((function(){e.isTesting=!1}))},setCheckInTime:function(){setTimeout(this.checkWhetherSuccessWasRecorded,j)},checkWhetherSuccessWasRecorded:function(){var e=this,t=this.site,s={idSite:t.id,nonce:""};this.checkNonce&&(s.nonce=this.checkNonce),k["AjaxHelper"].post({module:"API",method:"JsTrackerInstallCheck.wasJsTrackerInstallTestSuccessful"},s).then((function(t){if(t&&t.mainUrl&&!e.baseUrl&&(e.baseUrl=t.mainUrl),e.isTestSuccess=t&&t.isSuccess,e.checkNonce&&!e.isTestSuccess&&e.testTimeoutCount<C)return e.testTimeoutCount+=1,void e.setCheckInTime();e.isTestComplete=!!e.checkNonce,e.isTesting=!1})).catch((function(){e.isTesting=!1}))}},computed:{getTestFailureMessage:function(){var e=Object(k["externalLink"])("https://matomo.org/faq/troubleshooting/faq_58/"),t="</a>";return this.isWordpress?Object(k["translate"])("JsTrackerInstallCheck_JsTrackingCodeInstallCheckFailureMessageWordpress",'<a target="_blank" rel="noreferrer noopener" href="https://wordpress.org/plugins/wp-piwik/">WP-Matomo Integration (WP-Piwik)</a>',e,t):Object(k["translate"])("JsTrackerInstallCheck_JsTrackingCodeInstallCheckFailureMessage",e,t)}}});v.render=b;var O=v;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(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["DBStats"]=t(require("CoreHome"),require("vue")):e["DBStats"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/DBStats/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,"DBStatsIntro",(function(){return d})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var c=n("8bbf"),i=Object(c["createElementVNode"])("br",null,null,-1),a=["innerHTML"];function u(e,t,n,r,o,u){var l=Object(c["resolveComponent"])("EnrichedHeadline"),f=Object(c["resolveDirective"])("content-intro");return Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[Object(c["createElementVNode"])("h2",null,[Object(c["createVNode"])(l,null,{default:Object(c["withCtx"])((function(){return[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("DBStats_DatabaseUsage")),1)]})),_:1})]),Object(c["createElementVNode"])("p",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("DBStats_MainDescription",e.totalSpaceUsed)),1),i,Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,a)])],512)),[[f]])}var l=n("19dc"),f=Object(c["defineComponent"])({props:{totalSpaceUsed:{type:[String,Number],required:!0}},components:{EnrichedHeadline:l["EnrichedHeadline"]},directives:{ContentIntro:l["ContentIntro"]},computed:{learnMoreText:function(){var e=Object(l["externalRawLink"])("https://matomo.org/docs/setup-auto-archiving/");return Object(l["translate"])("DBStats_LearnMore",'<a target="_blank" rel="noreferrer noopener" href="'.concat(e,'">Matomo Auto Archiving</a>'))}}});f.render=u;var d=f;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 