File: D:/web/matomo.vdk/plugins/PrivacyManager/vue/dist/PrivacyManager.umd.min.js
(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 le})),n.d(t,"AnonymizeIp",(function(){return Pe})),n.d(t,"OptOutCustomizer",(function(){return at})),n.d(t,"AnonymizeLogData",(function(){return Rt})),n.d(t,"DoNotTrackPreference",(function(){return $t})),n.d(t,"ReportDeletionSettings",(function(){return Kt})),n.d(t,"DeleteOldLogs",(function(){return an})),n.d(t,"DeleteOldReports",(function(){return On})),n.d(t,"ScheduleReportDeletion",(function(){return An})),n.d(t,"AskingForConsent",(function(){return Jn})),n.d(t,"GdprOverview",(function(){return fa})),n.d(t,"PreviousAnonymizations",(function(){return Ia})),n.d(t,"PrivacySettings",(function(){return Ga})),n.d(t,"Compliance",(function(){return Oo})),n.d(t,"UsersOptOut",(function(){return fo})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("8bbf");const l={class:"manageGdpr"},r={class:"intro"},c=Object(i["createElementVNode"])("br",null,null,-1),s=Object(i["createElementVNode"])("br",null,null,-1),d=Object(i["createElementVNode"])("br",null,null,-1),m=Object(i["createElementVNode"])("br",null,null,-1),u=["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"},h={class:"col s12"},y={style:{margin:"8px 0",display:"inline-block"}},v={key:2,class:"dataUnavailable system notification notification-icon notification-info"},S=["innerHTML"],f={key:0,class:"system notification notification-icon notification-info"},V={class:"notification-body"},C=["innerHTML"],E=Object(i["createElementVNode"])("br",null,null,-1),N=Object(i["createElementVNode"])("br",null,null,-1),D=Object(i["createElementVNode"])("br",null,null,-1),k=Object(i["createElementVNode"])("br",null,null,-1),M={class:"checkInclude"},P={colspan:"8"},_=["title"],w={class:"checkInclude"},T=["title"],z={class:"visitId"},A={class:"visitorId"},B=["title","onClick"],I={class:"visitorIp"},x=["title","onClick"],L={class:"userId"},F=["title","onClick"],R=["title"],U=["src"],H=["title"],q=["src"],G=["title"],K=["src"],W=["title"],Y=["src"],J=["onClick"],Q=Object(i["createElementVNode"])("img",{src:"plugins/Live/images/visitorProfileLaunch.png",style:{"margin-right":"3.5px"}},null,-1),X={class:"ui-confirm",id:"confirmDeleteDataSubject",ref:"confirmDeleteDataSubject"},Z=["value"],ee=["value"];function te(e,t,n,a,o,$){const te=Object(i["resolveComponent"])("SiteSelector"),ne=Object(i["resolveComponent"])("SegmentGenerator"),ae=Object(i["resolveComponent"])("SaveButton"),oe=Object(i["resolveComponent"])("ContentBlock"),ie=Object(i["resolveComponent"])("Field"),le=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",l,[Object(i["createVNode"])(oe,{"content-title":e.translate("PrivacyManager_GdprTools")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro1"))+" ",1),c,s,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntro2"))+" ",1),d]),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroAccessRight")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprToolsPageIntroEraseRight")),1)]),Object(i["createElementVNode"])("p",null,[m,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.overviewHintText)},null,8,u)])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SearchForDataSubject")),1),Object(i["createElementVNode"])("div",b,[Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",g,Object(i["toDisplayString"])(e.translate("PrivacyManager_SelectWebsite")),1),Object(i["createElementVNode"])("div",O,[Object(i["createVNode"])(te,{id:"gdprsite",modelValue:e.site,"onUpdate:modelValue":[t[0]||(t[0]=t=>e.site=t),t[1]||(t[1]=t=>e.changeSite(t))],"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),e.isVisitorLogAndProfileEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",j,[Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",y,Object(i["toDisplayString"])(e.translate("PrivacyManager_FindDataSubjectsBy")),1),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(ne,{modelValue:e.segment_filter,"onUpdate:modelValue":t[2]||(t[2]=t=>e.segment_filter=t),"visit-segments-only":!0,idsite:e.site.id,"show-segment-editor":!0},null,8,["modelValue","idsite"])])])])])):Object(i["createCommentVNode"])("",!0),e.isVisitorLogAndProfileEnabled?(Object(i["openBlock"])(),Object(i["createBlock"])(ae,{key:1,class:"findDataSubjects",value:e.translate("PrivacyManager_FindMatchingDataSubjects"),onConfirm:t[3]||(t[3]=t=>e.findDataSubjects()),disabled:!e.segment_filter,saving:e.isLoading},null,8,["value","disabled","saving"])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",v,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SiteDataNotAvailable")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitorLogsProfilesDisabledMessage")),1),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteSettingsTextSingle)},null,8,S)]))]),_:1},8,["content-title"]),e.allWebsitesContainsDisabledSite?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",f,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SiteDataNotAvailableCertainSites")),1),Object(i["createElementVNode"])("div",V,[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitorLogsProfilesSiteNamesDisabledMessage")),1),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteSettingsText)},null,8,C)])])):Object(i["createCommentVNode"])("",!0),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NoDataSubjectsFound")),1)],512),[[i["vShow"],!e.dataSubjects.length&&e.hasSearched]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_MatchingDataSubjects")),1),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitsMatchedCriteria"))+" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ExportingNote"))+" ",1),E,Object(i["createTextVNode"])(),N,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeletionFromMatomoOnly"))+" ",1),D,k,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultIncludesAllVisits")),1)]),Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",M,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(ie,{uicontrol:"checkbox",name:"activateAll","model-value":e.toggleAll,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.toggleAll=t,e.toggleActivateAll()}),"full-width":!0},null,8,["model-value"])])]),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorID")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_VisitorIP")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_UserId")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Details")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("General_Action")),513),[[i["vShow"],e.profileEnabled]])])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",P,Object(i["toDisplayString"])(e.translate("PrivacyManager_ResultTruncated","400")),1)],512),[[i["vShow"],e.dataSubjects.length>400]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.dataSubjects,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{title:`${e.translate("PrivacyManager_LastAction")}: ${t.lastActionDateTime}`,key:n},[Object(i["createElementVNode"])("td",w,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(ie,{uicontrol:"checkbox",name:"subject"+t.idVisit,modelValue:e.dataSubjectsActive[n],"onUpdate:modelValue":t=>e.dataSubjectsActive[n]=t,"full-width":!0},null,8,["name","modelValue","onUpdate:modelValue"])])]),Object(i["createElementVNode"])("td",{class:"site",title:`(${e.translate("General_Id")} ${t.idSite})`},Object(i["toDisplayString"])(t.siteName),9,T),Object(i["createElementVNode"])("td",z,Object(i["toDisplayString"])(t.idVisit),1),Object(i["createElementVNode"])("td",A,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIdToSearch"),onClick:n=>e.addFilter("visitorId",t.visitorId)},Object(i["toDisplayString"])(t.visitorId),9,B)]),Object(i["createElementVNode"])("td",I,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddVisitorIPToSearch"),onClick:n=>e.addFilter("visitIp",t.visitIp)},Object(i["toDisplayString"])(t.visitIp),9,x)]),Object(i["createElementVNode"])("td",L,[Object(i["createElementVNode"])("a",{title:e.translate("PrivacyManager_AddUserIdToSearch"),onClick:n=>e.addFilter("userId",t.userId)},Object(i["toDisplayString"])(t.userId),9,F)]),Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("span",{title:`${t.deviceType} ${t.deviceModel}`,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.deviceTypeIcon},null,8,U)],8,R),Object(i["createElementVNode"])("span",{title:t.operatingSystem,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.operatingSystemIcon},null,8,q)],8,H),Object(i["createElementVNode"])("span",{title:`${t.browser} ${t.browserFamilyDescription}`,style:{"margin-right":"3.5px"}},[Object(i["createElementVNode"])("img",{height:"16",src:t.browserIcon},null,8,K)],8,G),Object(i["createElementVNode"])("span",{title:`${t.country} ${t.region||""}`},[Object(i["createElementVNode"])("img",{height:"16",src:t.countryFlag},null,8,Y)],8,W)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("a",{class:"visitorLogTooltip",title:"View visitor profile",onClick:n=>e.showProfile(t.visitorId,t.idSite)},[Q,Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("Live_ViewVisitorProfile")),1)],8,J)],512),[[i["vShow"],e.profileEnabled]])],8,_))),128))])])),[[le]]),Object(i["createVNode"])(ae,{class:"exportDataSubjects",style:{"margin-right":"3.5px"},onConfirm:t[5]||(t[5]=t=>e.exportDataSubject()),disabled:!e.hasActiveDataSubjects,value:e.translate("PrivacyManager_ExportSelectedVisits")},null,8,["disabled","value"]),Object(i["createVNode"])(ae,{class:"deleteDataSubjects",onConfirm:t[6]||(t[6]=t=>e.deleteDataSubject()),disabled:!e.hasActiveDataSubjects||e.isDeleting,value:e.translate("PrivacyManager_DeleteSelectedVisits")},null,8,["disabled","value"])],512),[[i["vShow"],e.dataSubjects.length]]),Object(i["createElementVNode"])("div",X,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteVisitsConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Z),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ee)],512)])}var ne=n("19dc"),ae=n("f06f"),oe=n("a5a2"),ie=Object(i["defineComponent"])({components:{ContentBlock:ne["ContentBlock"],SiteSelector:ne["SiteSelector"],SegmentGenerator:ae["SegmentGenerator"],SaveButton:oe["SaveButton"],Field:oe["Field"]},directives:{ContentTable:ne["ContentTable"]},data(){return{isLoading:!1,isDeleting:!1,site:{id:"all",name:Object(ne["translate"])("UsersManager_AllWebsites")},segment_filter:"visitId==",dataSubjects:[],toggleAll:!0,hasSearched:!1,profileEnabled:ne["Matomo"].visitorProfileEnabled,dataSubjectsActive:[],isVisitorLogAndProfileEnabled:!0,allWebsitesContainsDisabledSite:!1}},created(){this.changeSite(this.site)},watch:{site(e){"all"!==e.id?(this.allWebsitesContainsDisabledSite=!1,this.isLoading=!0,this.dataSubjects=[],this.hasSearched=!1,ne["AjaxHelper"].fetch({method:"Live.isVisitorProfileEnabled",idSite:e.id}).then(e=>{this.isVisitorLogAndProfileEnabled=e.value}).finally(()=>{this.isLoading=!1})):this.isVisitorLogAndProfileEnabled=!0}},setup(){const e=ne["AjaxHelper"].fetch({method:"SitesManager.getSitesIdWithAdminAccess",filter_limit:"-1"});return{getSites(){return e}}},methods:{changeSite(e){ne["AjaxHelper"].fetch({module:"API",method:"Live.isVisitorProfileEnabled",filter_limit:-1,idSite:e.id},{createErrorNotification:!1}).then(e=>{e.value||"userId=="!==this.segment_filter?e.value&&"visitId=="===this.segment_filter&&(this.segment_filter="userId=="):this.segment_filter="visitId=="}).catch(()=>{this.segment_filter="visitId=="})},showSuccessNotification(e){const t=ne["NotificationsStore"].show({message:e,context:"success",id:"manageGdpr",type:"transient"});setTimeout(()=>{ne["NotificationsStore"].scrollToNotification(t)},200)},linkTo(e,t="PrivacyManager"){return"?"+ne["MatomoUrl"].stringify(Object.assign(Object.assign({},ne["MatomoUrl"].urlParsed.value),{},{module:t,action:e}))},toggleActivateAll(){this.dataSubjectsActive.fill(this.toggleAll)},showProfile(e,t){ne["Matomo"].helper.showVisitorProfilePopup(e,t)},exportDataSubject(){const e=this.activatedDataSubjects;ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.exportDataSubjects",format:"json",filter_limit:-1},{visits:e}).then(e=>{this.showSuccessNotification(Object(ne["translate"])("PrivacyManager_VisitsSuccessfullyExported")),ne["Matomo"].helper.sendContentAsDownload("exported_data_subjects.json",JSON.stringify(e))})},deleteDataSubject(){ne["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteDataSubject,{yes:()=>{this.isDeleting=!0;const e=this.activatedDataSubjects;ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.deleteDataSubjects",filter_limit:-1},{visits:e}).then(()=>{this.dataSubjects=[],this.showSuccessNotification(Object(ne["translate"])("PrivacyManager_VisitsSuccessfullyDeleted")),this.findDataSubjects()}).finally(()=>{this.isDeleting=!1})}})},addFilter(e,t){this.segment_filter+=`,${e}==${t}`,this.findDataSubjects()},findDataSubjects(){this.dataSubjects=[],this.dataSubjectsActive=[],this.isLoading=!0,this.toggleAll=!0,this.hasSearched=!1,this.getSites().then(e=>{let t=this.site.id;"all"!==t||ne["Matomo"].hasSuperUserAccess||(t=e,Array.isArray(e)&&(t=e.join(","))),ne["AjaxHelper"].fetch({method:"Live.isVisitorProfileEnabled",idSite:t}).then(e=>{this.allWebsitesContainsDisabledSite=!e.value}),ne["AjaxHelper"].fetch({idSite:t,module:"API",method:"PrivacyManager.findDataSubjects",segment:this.segment_filter}).then(e=>{this.hasSearched=!0,this.dataSubjectsActive=e.map(()=>!0),this.dataSubjects=e}).finally(()=>{this.isLoading=!1})})}},computed:{hasActiveDataSubjects(){return!!this.activatedDataSubjects.length},activatedDataSubjects(){return this.dataSubjects.filter((e,t)=>this.dataSubjectsActive[t]).map(e=>({idsite:e.idSite,idvisit:e.idVisit}))},overviewHintText(){return Object(ne["translate"])("PrivacyManager_GdprToolsOverviewHint",`<a href="${this.linkTo("gdprOverview")}">`,"</a>")},siteSettingsText(){return Object(ne["translate"])("PrivacyManager_PleaseEnableVisitorLogsProfilesSites",`<a href="${this.linkTo("index","SitesManager")}">`,"</a>")},siteSettingsTextSingle(){return Object(ne["translate"])("PrivacyManager_PleaseEnableVisitorLogsProfiles",`<a href="${this.linkTo("index","SitesManager")}">`,"</a>")}}});ie.render=te;var le=ie;const re={class:"anonymizeSettings"},ce={class:"anonymizeIpSettingsField"},se={class:"maskLengthField"},de={class:"useAnonymizedIpForVisitEnrichmentField"},me={class:"anonymizeUserIdField"},ue=Object(i["createElementVNode"])("br",null,null,-1),be=Object(i["createElementVNode"])("br",null,null,-1),pe={class:"anonymizeOrderIdField"},ge={key:0,class:"forceCookielessTrackingField"},Oe=Object(i["createElementVNode"])("br",null,null,-1),je=Object(i["createElementVNode"])("br",null,null,-1),he={key:0},ye=Object(i["createElementVNode"])("br",null,null,-1),ve=Object(i["createElementVNode"])("br",null,null,-1),Se={class:"alert-warning alert"},fe={class:"anonymizeReferrerField"},Ve={class:"randomizeConfigIdField"},Ce={key:2,class:"footer-buttons"};function Ee(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveComponent"])("PasswordConfirmation"),d=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",re,[e.idSiteSpecific?(Object(i["openBlock"])(),Object(i["createBlock"])(r,{key:0,uicontrol:"radio",name:"useSiteSpecificSettings"+e.idSiteSpecific,title:e.translate("PrivacyManager_SiteAnonymizationConfig"),modelValue:e.actualUseSiteSpecificSettings,"onUpdate:modelValue":t[0]||(t[0]=t=>e.actualUseSiteSpecificSettings=t),options:e.useSiteSpecificSettingsOptions,"inline-help":e.useSiteSpecificSettingsHelpText},null,8,["name","title","modelValue","options","inline-help"])):Object(i["createCommentVNode"])("",!0),e.showSettings?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[Object(i["createElementVNode"])("div",ce,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeIpSettings"+e.idSiteSpecific,title:e.translate("PrivacyManager_UseAnonymizeIp"),modelValue:e.actualEnabled,"onUpdate:modelValue":t[1]||(t[1]=t=>e.actualEnabled=t),"inline-help":e.anonymizeIpEnabledHelp,"extra-metadata":e.getExtraMetadataForField("ipAnonymizerEnabled")},null,8,["name","title","modelValue","inline-help","extra-metadata"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",se,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"maskLength"+e.idSiteSpecific,title:e.translate("PrivacyManager_AnonymizeIpMaskLengtDescription"),modelValue:e.actualMaskLength,"onUpdate:modelValue":t[2]||(t[2]=t=>e.actualMaskLength=t),options:e.maskLengthOptions,"inline-help":e.translate("PrivacyManager_GeolocationAnonymizeIpNote"),"extra-metadata":e.getExtraMetadataForField("ipAddressMaskLength")},null,8,["name","title","modelValue","options","inline-help","extra-metadata"])]),Object(i["createElementVNode"])("div",de,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"useAnonymizedIpForVisitEnrichment"+e.idSiteSpecific,title:e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichment"),modelValue:e.actualUseAnonymizedIpForVisitEnrichment,"onUpdate:modelValue":t[3]||(t[3]=t=>e.actualUseAnonymizedIpForVisitEnrichment=t),options:e.useAnonymizedIpForVisitEnrichmentOptions,"inline-help":e.translate("PrivacyManager_UseAnonymizedIpForVisitEnrichmentNote"),"extra-metadata":e.getExtraMetadataForField("useAnonymizedIpForVisitEnrichment")},null,8,["name","title","modelValue","options","inline-help","extra-metadata"])])],512),[[i["vShow"],e.actualEnabled]]),Object(i["createElementVNode"])("div",me,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeUserId"+e.idSiteSpecific,title:e.translate("PrivacyManager_PseudonymizeUserId"),modelValue:e.actualAnonymizeUserId,"onUpdate:modelValue":t[4]||(t[4]=t=>e.actualAnonymizeUserId=t),"extra-metadata":e.getExtraMetadataForField("anonymizeUserId")},{"inline-help":Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote"))+" ",1),ue,be,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PseudonymizeUserIdNote2")),1)]),_:1},8,["name","title","modelValue","extra-metadata"])]),Object(i["createElementVNode"])("div",pe,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"anonymizeOrderId"+e.idSiteSpecific,title:e.translate("Ecommerce_UseAnonymizeOrderId"),modelValue:e.actualAnonymizeOrderId,"onUpdate:modelValue":t[5]||(t[5]=t=>e.actualAnonymizeOrderId=t),"inline-help":e.translate("Ecommerce_AnonymizeOrderIdNote"),"extra-metadata":e.getExtraMetadataForField("anonymizeOrderId")},null,8,["name","title","modelValue","inline-help","extra-metadata"])]),e.idSiteSpecific?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ge,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"forceCookielessTracking",title:e.translate("PrivacyManager_ForceCookielessTracking"),modelValue:e.actualForceCookielessTracking,"onUpdate:modelValue":t[6]||(t[6]=t=>e.actualForceCookielessTracking=t),"extra-metadata":e.getExtraMetadataForField("forceCookielessTracking")},{"inline-help":Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription",e.trackerFileName))+" ",1),Oe,je,Object(i["createElementVNode"])("em",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescription2")),1),e.trackerWritable?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",he,[ye,ve,Object(i["createElementVNode"])("p",Se,Object(i["toDisplayString"])(e.translate("PrivacyManager_ForceCookielessTrackingDescriptionNotWritable",e.trackerFileName)),1)]))]),_:1},8,["title","modelValue","extra-metadata"])])),Object(i["createElementVNode"])("div",fe,[Object(i["createVNode"])(r,{uicontrol:"select",name:"anonymizeReferrer"+e.idSiteSpecific,title:e.translate("PrivacyManager_AnonymizeReferrer"),modelValue:e.actualAnonymizeReferrer,"onUpdate:modelValue":t[7]||(t[7]=t=>e.actualAnonymizeReferrer=t),options:e.referrerAnonymizationOptions,"inline-help":e.translate("PrivacyManager_AnonymizeReferrerNote"),"extra-metadata":e.getExtraMetadataForField("anonymizeReferrer")},null,8,["name","title","modelValue","options","inline-help","extra-metadata"])]),Object(i["createElementVNode"])("div",Ve,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"randomizeConfigId"+e.idSiteSpecific,title:e.translate("PrivacyManager_UseRandomizeConfigId"),modelValue:e.actualRandomizeConfigId,"onUpdate:modelValue":t[8]||(t[8]=t=>e.actualRandomizeConfigId=t),"inline-help":e.randomiseConfigIdHelpText,"extra-metadata":e.getExtraMetadataForField("randomizeConfigId")},null,8,["name","title","modelValue","inline-help","extra-metadata"])])],64)):Object(i["createCommentVNode"])("",!0),e.idSiteSpecific?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ce,[Object(i["createVNode"])(c,{onConfirm:t[9]||(t[9]=t=>e.shouldSave()),saving:e.isLoading},null,8,["saving"])])),Object(i["createVNode"])(s,{modelValue:e.showPasswordConfirmation,"onUpdate:modelValue":t[10]||(t[10]=t=>e.showPasswordConfirmation=t),onConfirmed:e.save,onAborted:e.abortPasswordConfirmation},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.passwordConfirmationTitle),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ConfirmConfigRandomisationExplanation")),1)]),_:1},8,["modelValue","onConfirmed","onAborted"])])),[[d]])}function Ne(e){return!0===e||1===e||"1"===e?1:0}const De="system",ke="site-specific";var Me=Object(i["defineComponent"])({props:{ipAnonymizerEnabled:Boolean,anonymizeUserId:Boolean,ipAddressMaskLength:{type:[Number,String],required:!0},useAnonymizedIpForVisitEnrichment:{type:[Boolean,String,Number],default:0},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,idSiteSpecific:{type:[String,Number]},useSiteSpecificSettings:{type:Boolean,default:!1},triggerSave:{type:Boolean,default:!1},extraMetadata:{type:Object,default:()=>({})}},components:{Field:oe["Field"],PasswordConfirmation:oe["PasswordConfirmation"],SaveButton:oe["SaveButton"]},directives:{Form:oe["Form"]},emits:["updated","aborted"],data(){return{isLoading:!1,actualEnabled:this.ipAnonymizerEnabled,actualUseSiteSpecificSettings:this.getActualUseSiteSpecificSettings(),actualMaskLength:+this.ipAddressMaskLength,actualUseAnonymizedIpForVisitEnrichment:Ne(this.useAnonymizedIpForVisitEnrichment),actualAnonymizeUserId:!!this.anonymizeUserId,actualAnonymizeOrderId:!!this.anonymizeOrderId,actualForceCookielessTracking:!!this.forceCookielessTracking,actualAnonymizeReferrer:this.anonymizeReferrer,actualRandomizeConfigId:!!this.randomizeConfigId,showPasswordConfirmation:!1}},methods:{shouldSave(){this.showSettings&&this.actualRandomizeConfigId?this.showPasswordConfirmation=!0:this.save()},abortPasswordConfirmation(){this.$emit("aborted")},save(e){this.isLoading=!0;const t={anonymizeIPEnable:Ne(this.actualEnabled),anonymizeUserId:Ne(this.actualAnonymizeUserId),anonymizeOrderId:Ne(this.actualAnonymizeOrderId),forceCookielessTracking:this.idSiteSpecific?void 0:Ne(this.actualForceCookielessTracking),anonymizeReferrer:this.actualAnonymizeReferrer?this.actualAnonymizeReferrer:"",ipAddressMaskLength:this.actualMaskLength,useAnonymizedIpForVisitEnrichment:this.actualUseAnonymizedIpForVisitEnrichment,randomizeConfigId:Ne(this.actualRandomizeConfigId),idSiteSpecific:this.idSiteSpecific?this.idSiteSpecific:void 0,useSiteSpecificSettings:this.idSiteSpecific?Ne(this.isSiteSpecificSettingsEnabled):void 0};e&&(t.passwordConfirmation=e),ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.setAnonymizeIpSettings"},t).then(()=>{if(!this.idSiteSpecific){const e=ne["NotificationsStore"].show({message:Object(ne["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});ne["NotificationsStore"].scrollToNotification(e)}this.$emit("updated")}).catch(()=>{this.$emit("aborted")}).finally(()=>{this.isLoading=!1})},getActualUseSiteSpecificSettings(){return this.idSiteSpecific&&this.useSiteSpecificSettings?ke:De},randomiseConfigIdHelpText(){const e=Object(ne["translate"])("PrivacyManager_RandomizeConfigIdNote"),t=Object(ne["translate"])("PrivacyManager_RandomizeConfigIdNoteWarning","<strong>","</strong>");return`${e}<br><br>${t}`},getExtraMetadataForField(e){var t;return null===(t=this.extraMetadata)||void 0===t?void 0:t[e]}},computed:{anonymizeIpEnabledHelp(){const e=Object(ne["translate"])("PrivacyManager_AnonymizeIpInlineHelp"),t=Object(ne["translate"])("PrivacyManager_AnonymizeIpDescription");return`${e} ${t}`},passwordConfirmationTitle(){return this.idSiteSpecific?Object(ne["translate"])("PrivacyManager_ConfirmConfigRandomisationEnabledPerSite"):Object(ne["translate"])("PrivacyManager_ConfirmConfigRandomisationEnabled")},useSiteSpecificSettingsHelpText(){const e="?"+ne["MatomoUrl"].stringify(Object.assign(Object.assign({},ne["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:"privacySettings"}));return Object(ne["translate"])("PrivacyManager_UseSiteSpecificSettingsHelpText",`<a href="${e}" rel="noreferrer noopener" target="_blank">`,"</a>",Object(ne["translate"])("PrivacyManager_UseSiteSpecificSettings"))},showSettings(){return!this.idSiteSpecific||this.isSiteSpecificSettingsEnabled},isSiteSpecificSettingsEnabled(){return this.idSiteSpecific&&this.actualUseSiteSpecificSettings===ke},useSiteSpecificSettingsOptions(){return[{value:Object(ne["translate"])("PrivacyManager_UseSystemSettings"),key:De},{value:Object(ne["translate"])("PrivacyManager_UseSiteSpecificSettings"),key:ke}]}},watch:{triggerSave(e){e&&this.shouldSave()}}});Me.render=Ee;var Pe=Me;const _e={class:"optOutCustomizer"},we=["innerHTML"],Te={key:0,id:"opt-out-styling"},ze=["value"],Ae=["value"],Be=["value"],Ie=["value"],xe=Object(i["createStaticVNode"])('<option value="px">px</option><option value="pt">pt</option><option value="em">em</option><option value="rem">rem</option><option value="%">%</option>',5),Le=[xe],Fe=["value"],Re=["src"],Ue={class:"form-group row"},He={class:"col s12 m6"},$e={for:"codeType1"},qe={for:"codeType2"},Ge={key:0},Ke={class:"col s12 m6"},We=["innerHTML"],Ye={ref:"pre"},Je=["innerHTML"],Qe={class:"system notification notification-info optOutTestReminder"},Xe=["innerHTML"];function Ze(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveDirective"])("copy-to-clipboard");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createElementVNode"])("div",_e,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_OptOutExplanation"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.readThisToLearnMore)},null,8,we)]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutAppearance")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("label",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{id:"applyStyling",type:"checkbox",name:"applyStyling","onUpdate:modelValue":t[0]||(t[0]=t=>e.applyStyling=t),onKeydown:t[1]||(t[1]=t=>e.updateCode()),onChange:t[2]||(t[2]=t=>e.updateCode())},null,544),[[i["vModelCheckbox"],e.applyStyling]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ApplyStyling")),1)])])]),e.applyStyling?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Te,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.fontColor,onKeydown:t[3]||(t[3]=t=>e.onFontColorChange(t)),onChange:t[4]||(t[4]=t=>e.onFontColorChange(t))},null,40,ze)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_BackgroundColor"))+": ",1),Object(i["createElementVNode"])("input",{type:"color",value:e.backgroundColor,onKeydown:t[5]||(t[5]=t=>e.onBgColorChange(t)),onChange:t[6]||(t[6]=t=>e.onBgColorChange(t))},null,40,Ae)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontSize"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontSizeInput",type:"number",min:"1",max:"100",value:e.fontSize,onKeydown:t[7]||(t[7]=t=>e.onFontSizeChange(t)),onChange:t[8]||(t[8]=t=>e.onFontSizeChange(t))},null,40,Be)]),Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("select",{class:"browser-default",value:e.fontSizeUnit,onKeydown:t[9]||(t[9]=t=>e.onFontSizeUnitChange(t)),onChange:t[10]||(t[10]=t=>e.onFontSizeUnitChange(t))},Le,40,Ie)]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_FontFamily"))+": ",1),Object(i["createElementVNode"])("input",{id:"FontFamilyInput",type:"text",value:e.fontFamily,onKeydown:t[11]||(t[11]=t=>e.onFontFamilyChange(t)),onChange:t[12]||(t[12]=t=>e.onFontFamilyChange(t))},null,40,Fe)])])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("span",null,[Object(i["createElementVNode"])("label",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{id:"showIntro",type:"checkbox",name:"showIntro","onUpdate:modelValue":t[13]||(t[13]=t=>e.showIntro=t),onKeydown:t[14]||(t[14]=t=>e.updateCode()),onChange:t[15]||(t[15]=t=>e.updateCode())},null,544),[[i["vModelCheckbox"],e.showIntro]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ShowIntro")),1)])])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutPreview")),1),Object(i["createElementVNode"])("iframe",{id:"previewIframe",style:{border:"1px solid #333",height:"200px",width:"600px"},src:e.iframeUrl,class:Object(i["normalizeClass"])({withBg:e.withBg})},null,10,Re)]),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",Ue,[Object(i["createElementVNode"])("div",He,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutHtmlCode")),1),Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("label",$e,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"codeType1",name:"codeType",value:"tracker","onUpdate:modelValue":t[16]||(t[16]=t=>e.codeType=t),onKeydown:t[17]||(t[17]=t=>e.updateCode()),onChange:t[18]||(t[18]=t=>e.updateCode())},null,544),[[i["vModelRadio"],e.codeType]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutUseTracker")),1)])]),Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("label",qe,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"codeType2",name:"codeType",value:"selfContained","onUpdate:modelValue":t[19]||(t[19]=t=>e.codeType=t),onKeydown:t[20]||(t[20]=t=>e.updateCode()),onChange:t[21]||(t[21]=t=>e.updateCode())},null,544),[[i["vModelRadio"],e.codeType]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutUseStandalone")),1)])]),"selfContained"===e.codeType?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ge,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[22]||(t[22]=t=>e.language=t),title:e.translate("General_Language"),options:e.languageOptions,onKeydown:t[23]||(t[23]=t=>e.updateCode()),onChange:t[24]||(t[24]=t=>e.updateCode())},null,8,["modelValue","title","options"])])])):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.codeTypeHelp)},null,8,We)])])]),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("pre",Ye,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.codeBox)+"\n ",1)])),[[c,{}]])]),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutExplanationIntro)},null,8,Je),Object(i["createElementVNode"])("div",Qe,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTest")),1)]),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestBody")),1),Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep1")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep2")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep3")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_OptOutRememberToTestStep4")),1)])])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_BuildYourOwn")),1),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.optOutCustomOptOutLink)},null,8,Xe)])],64)}function et(e){const t=parseInt(e,16),n=t>>16&255,a=t>>8&255,o=255&t;return n>=225&&a>=225&&o>=225}const{$:tt}=window;var nt=Object(i["defineComponent"])({props:{currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},matomoUrl:String},components:{Field:oe["Field"]},directives:{CopyToClipboard:ne["CopyToClipboard"]},data(){return{fontSizeUnit:"px",backgroundColor:"#FFFFFF",fontColor:"#000000",fontSize:"12",fontFamily:"Arial",showIntro:!0,applyStyling:!1,codeType:"tracker",code:"",language:this.currentLanguageCode}},created(){this.onFontColorChange=Object(ne["debounce"])(this.onFontColorChange,50),this.onBgColorChange=Object(ne["debounce"])(this.onBgColorChange,50),this.onFontSizeChange=Object(ne["debounce"])(this.onFontSizeChange,50),this.onFontSizeUnitChange=Object(ne["debounce"])(this.onFontSizeUnitChange,50),this.onFontFamilyChange=Object(ne["debounce"])(this.onFontFamilyChange,50),this.matomoUrl&&this.updateCode()},methods:{onFontColorChange(e){this.fontColor=e.target.value,this.updateCode()},onBgColorChange(e){this.backgroundColor=e.target.value,this.updateCode()},onFontSizeChange(e){this.fontSize=e.target.value,this.updateCode()},onFontSizeUnitChange(e){this.fontSizeUnit=e.target.value,this.updateCode()},onFontFamilyChange(e){this.fontFamily=e.target.value,this.updateCode()},updateCode(){let e="CoreAdminHome.getOptOutJSEmbedCode";"selfContained"===this.codeType&&(e="CoreAdminHome.getOptOutSelfContainedEmbedCode"),ne["AjaxHelper"].fetch({method:e,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(e=>{this.code=e.value||""})}},watch:{codeBox(){const e=this.$refs.pre,t=tt(e).queue("fx").length>0;t||tt(e).effect("highlight",{},1500)}},computed:{fontSizeWithUnit(){return this.fontSize?`${this.fontSize}${this.fontSizeUnit}`:""},withBg(){return!!this.matomoUrl&&""===this.backgroundColor&&""!==this.fontColor&&et(this.fontColor.slice(1))},codeBox(){return this.matomoUrl?this.code:""},iframeUrl(){const e=ne["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`${this.matomoUrl}index.php?${e}`},readThisToLearnMore(){return Object(ne["translate"])("General_ReadThisToLearnMore",Object(ne["externalLink"])("https://matomo.org/faq/how-to/faq_25918/"),"</a>")},optOutExplanationIntro(){return Object(ne["translate"])("CoreAdminHome_OptOutExplanationIntro",`<a href="${this.iframeUrl}" rel="noreferrer noopener" target="_blank">`,"</a>")},optOutCustomOptOutLink(){const e="https://developer.matomo.org/guides/tracking-javascript-guide#optional-creating-a-custom-opt-out-form";return Object(ne["translate"])("CoreAdminHome_OptOutCustomOptOutLink",Object(ne["externalLink"])(e),"</a>")},codeTypeHelp(){return Object(ne["translate"])("PrivacyManager_OptOutCodeTypeExplanation")}}});nt.render=Ze;var at=nt;const ot={class:"anonymizeLogData"},it={class:"form-group row"},lt={class:"col s12 input-field"},rt={for:"anonymizeSite",class:"siteSelectorLabel"},ct={class:"sites_autocomplete"},st={class:"form-group row"},dt={class:"col s6 input-field"},mt={for:"anonymizeStartDate",class:"active"},ut=["value"],bt={class:"col s6 input-field"},pt={for:"anonymizeEndDate",class:"active"},gt=["value"],Ot={name:"anonymizeIp"},jt={name:"anonymizeLocation"},ht={name:"anonymizeTheUserId"},yt={class:"form-group row"},vt={class:"col s12 m6"},St={for:"visit_columns"},ft={class:"innerFormField",name:"visit_columns"},Vt=["onClick","title"],Ct={class:"col s12 m6"},Et={class:"form-help"},Nt={class:"inline-help"},Dt={class:"form-group row"},kt={class:"col s12"},Mt={class:"form-group row"},Pt={class:"col s12 m6"},_t={for:"action_columns"},wt={class:"innerFormField",name:"action_columns"},Tt=["onClick","title"],zt={class:"col s12 m6"},At={class:"form-help"},Bt={class:"inline-help"},It=Object(i["createElementVNode"])("span",{class:"icon-info"},null,-1);function xt(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("SiteSelector"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),d=Object(i["resolveComponent"])("PasswordConfirmation");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ot,[Object(i["createElementVNode"])("div",it,[Object(i["createElementVNode"])("div",lt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",rt,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeSites")),1),Object(i["createElementVNode"])("div",ct,[Object(i["createVNode"])(r,{id:"anonymizeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=t=>e.site=t),"show-all-sites-item":!0,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",st,[Object(i["createElementVNode"])("div",dt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",mt,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataFrom")),1),Object(i["createElementVNode"])("input",{type:"text",id:"anonymizeStartDate",class:"anonymizeStartDate",ref:"anonymizeStartDate",name:"anonymizeStartDate",value:e.startDate,onKeydown:t[1]||(t[1]=t=>e.onKeydownStartDate(t)),onChange:t[2]||(t[2]=t=>e.onKeydownStartDate(t))},null,40,ut)])]),Object(i["createElementVNode"])("div",bt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",pt,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeRowDataTo")),1),Object(i["createElementVNode"])("input",{type:"text",class:"anonymizeEndDate",id:"anonymizeEndDate",ref:"anonymizeEndDate",name:"anonymizeEndDate",value:e.endDate,onKeydown:t[3]||(t[3]=t=>e.onKeydownEndDate(t)),onChange:t[4]||(t[4]=t=>e.onKeydownEndDate(t))},null,40,gt)])])]),Object(i["createElementVNode"])("div",Ot,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeIp",title:e.translate("PrivacyManager_AnonymizeIp"),modelValue:e.anonymizeIp,"onUpdate:modelValue":t[5]||(t[5]=t=>e.anonymizeIp=t),introduction:e.translate("General_Visit"),"inline-help":e.translate("PrivacyManager_AnonymizeIpHelp")},null,8,["title","modelValue","introduction","inline-help"])]),Object(i["createElementVNode"])("div",jt,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeLocation",title:e.translate("PrivacyManager_AnonymizeLocation"),modelValue:e.anonymizeLocation,"onUpdate:modelValue":t[6]||(t[6]=t=>e.anonymizeLocation=t),"inline-help":e.translate("PrivacyManager_AnonymizeLocationHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",ht,[Object(i["createVNode"])(c,{uicontrol:"checkbox",name:"anonymizeTheUserId",title:e.translate("PrivacyManager_AnonymizeUserId"),modelValue:e.anonymizeUserId,"onUpdate:modelValue":t[7]||(t[7]=t=>e.anonymizeUserId=t),"inline-help":e.translate("PrivacyManager_AnonymizeUserIdHelp")},null,8,["title","modelValue","inline-help"])]),Object(i["createElementVNode"])("div",yt,[Object(i["createElementVNode"])("div",vt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",St,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedVisitColumns,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(`selectedVisitColumns selectedVisitColumns${n} multiple valign-wrapper`),key:n},[Object(i["createElementVNode"])("div",ft,[Object(i["createVNode"])(c,{uicontrol:"select",name:"visit_columns","model-value":t.column,"onUpdate:modelValue":n=>{t.column=n,e.onVisitColumnChange()},"full-width":!0,options:e.availableVisitColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:t=>e.removeVisitColumn(n),title:e.translate("General_Remove")},null,8,Vt),[[i["vShow"],n+1!==e.selectedVisitColumns.length]])],2))),128))])]),Object(i["createElementVNode"])("div",Ct,[Object(i["createElementVNode"])("div",Et,[Object(i["createElementVNode"])("span",Nt,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetVisitColumnsHelp")),1)])])]),Object(i["createElementVNode"])("div",Dt,[Object(i["createElementVNode"])("div",kt,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Action")),1)])]),Object(i["createElementVNode"])("div",Mt,[Object(i["createElementVNode"])("div",Pt,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("label",_t,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumns")),1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.selectedActionColumns,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(`selectedActionColumns selectedActionColumns${n} multiple valign-wrapper`),key:n},[Object(i["createElementVNode"])("div",wt,[Object(i["createVNode"])(c,{uicontrol:"select",name:"action_columns","model-value":t.column,"onUpdate:modelValue":n=>{t.column=n,e.onActionColumnChange()},"full-width":!0,options:e.availableActionColumns},null,8,["model-value","onUpdate:modelValue","options"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{class:"icon-minus valign",onClick:t=>e.removeActionColumn(n),title:e.translate("General_Remove")},null,8,Tt),[[i["vShow"],n+1!==e.selectedActionColumns.length]])],2))),128))])]),Object(i["createElementVNode"])("div",zt,[Object(i["createElementVNode"])("div",At,[Object(i["createElementVNode"])("span",Bt,Object(i["toDisplayString"])(e.translate("PrivacyManager_UnsetActionColumnsHelp")),1)])])]),Object(i["createElementVNode"])("p",null,[It,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeProcessInfo")),1)]),Object(i["createVNode"])(s,{class:"anonymizePastData",onConfirm:t[8]||(t[8]=t=>e.showPasswordConfirmModal=!0),disabled:e.isAnonymizePastDataDisabled,value:e.translate("PrivacyManager_AnonymizeDataNow")},null,8,["disabled","value"]),Object(i["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[9]||(t[9]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.scheduleAnonymization},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeDataConfirm")),1)]),_:1},8,["modelValue","onConfirmed"])])}function Lt(e){return e<10?"0"+e:e}var Ft=Object(i["defineComponent"])({components:{PasswordConfirmation:oe["PasswordConfirmation"],SiteSelector:ne["SiteSelector"],Field:oe["Field"],SaveButton:oe["SaveButton"]},data(){const e=new Date,t=`${e.getFullYear()}-${Lt(e.getMonth()+1)}-${Lt(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(){this.onKeydownStartDate=Object(ne["debounce"])(this.onKeydownStartDate,50),this.onKeydownEndDate=Object(ne["debounce"])(this.onKeydownEndDate,50),ne["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableVisitColumnsToAnonymize"}).then(e=>{this.availableVisitColumns=[],e.forEach(e=>{this.availableVisitColumns.push({key:e.column_name,value:e.column_name})})}),ne["AjaxHelper"].fetch({method:"PrivacyManager.getAvailableLinkVisitActionColumnsToAnonymize"}).then(e=>{this.availableActionColumns=[],e.forEach(e=>{this.availableActionColumns.push({key:e.column_name,value:e.column_name})})}),setTimeout(()=>{const e=ne["Matomo"].getBaseDatePickerOptions(null),t=ne["Matomo"].getBaseDatePickerOptions(null);$(this.$refs.anonymizeStartDate).datepicker(e),$(this.$refs.anonymizeEndDate).datepicker(t)})},methods:{onVisitColumnChange(){const e=this.selectedVisitColumns.every(e=>!(null===e||void 0===e||!e.column));e&&this.addVisitColumn()},addVisitColumn(){this.selectedVisitColumns.push({column:""})},removeVisitColumn(e){if(e>-1){const t=this.selectedVisitColumns.length-1;t===e?this.selectedVisitColumns[e]={column:""}:this.selectedVisitColumns.splice(e,1)}},onActionColumnChange(){const e=this.selectedActionColumns.every(e=>!(null===e||void 0===e||!e.column));e&&this.addActionColumn()},addActionColumn(){this.selectedActionColumns.push({column:""})},removeActionColumn(e){if(e>-1){const t=this.selectedActionColumns.length-1;t===e?this.selectedActionColumns[e]={column:""}:this.selectedActionColumns.splice(e,1)}},scheduleAnonymization(e){let t=`${this.startDate},${this.endDate}`;this.startDate===this.endDate&&(t=this.startDate);const 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(e=>!(null===e||void 0===e||!e.column)).map(e=>e.column),n.unsetLinkVisitActionColumns=this.selectedActionColumns.filter(e=>!(null===e||void 0===e||!e.column)).map(e=>e.column),n.passwordConfirmation=e,ne["AjaxHelper"].post({method:"PrivacyManager.anonymizeSomeRawData"},n).then(()=>{window.location.reload(!0)})},onKeydownStartDate(e){this.startDate=e.target.value},onKeydownEndDate(e){this.endDate=e.target.value}},computed:{isAnonymizePastDataDisabled(){return!this.anonymizeIp&&!this.anonymizeLocation&&!this.selectedVisitColumns&&!this.selectedActionColumns}}});Ft.render=xt;var Rt=Ft;function Ut(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"radio",name:"doNotTrack",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.enabled=t),options:e.doNotTrackOptions,"inline-help":e.translate("PrivacyManager_DoNotTrack_Description")},null,8,["modelValue","options","inline-help"])]),Object(i["createVNode"])(c,{onConfirm:t[1]||(t[1]=t=>e.save()),saving:e.isLoading},null,8,["saving"])])),[[s]])}var Ht=Object(i["defineComponent"])({props:{dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0}},components:{Field:oe["Field"],SaveButton:oe["SaveButton"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,enabled:this.dntSupport?1:0}},methods:{save(){this.isLoading=!0;let e="deactivateDoNotTrack";this.enabled&&"0"!==this.enabled&&(e="activateDoNotTrack"),ne["AjaxHelper"].post({module:"API",method:"PrivacyManager."+e}).then(()=>{const e=ne["NotificationsStore"].show({message:Object(ne["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"transient"});ne["NotificationsStore"].scrollToNotification(e)}).finally(()=>{this.isLoading=!1})}}});Ht.render=Ut;var $t=Ht;function qt(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
*/class Gt{constructor(){qt(this,"privateState",Object(i["reactive"])({settings:{},showEstimate:!1,loadingEstimation:!1,estimation:"",isModified:!1})),qt(this,"state",Object(i["computed"])(()=>Object(i["readonly"])(this.privateState))),qt(this,"enableDeleteReports",Object(i["computed"])(()=>this.state.value.settings.enableDeleteReports)),qt(this,"enableDeleteLogs",Object(i["computed"])(()=>this.state.value.settings.enableDeleteLogs)),qt(this,"currentRequest",void 0)}updateSettings(e){this.initSettings(e),this.privateState.isModified=!0}initSettings(e){this.privateState.settings=Object.assign(Object.assign({},this.privateState.settings),e),this.reloadDbStats()}savePurgeDataSettings(e,t,n){return this.privateState.isModified=!1,ne["AjaxHelper"].post({module:"API",method:e},Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0",passwordConfirmation:n})).then(()=>{const e=ne["NotificationsStore"].show({message:Object(ne["translate"])("CoreAdminHome_SettingsSaveSuccess"),context:"success",id:"privacyManagerSettings",type:"toast"});ne["NotificationsStore"].scrollToNotification(e)})}isEitherDeleteSectionEnabled(){return this.state.value.settings.enableDeleteLogs||this.state.value.settings.enableDeleteReports}isManualEstimationLinkShowing(){return window.$("#getPurgeEstimateLink").length>0}reloadDbStats(e){if(this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),!e&&(!this.isEitherDeleteSectionEnabled()||this.isManualEstimationLinkShowing()))return;this.privateState.loadingEstimation=!0,this.privateState.estimation="",this.privateState.showEstimate=!1;const{settings:t}=this.privateState,n=Object.assign(Object.assign({},t),{},{enableDeleteLogs:t.enableDeleteLogs?"1":"0",enableDeleteReports:t.enableDeleteReports?"1":"0"});!0===e&&(n.forceEstimate=1),this.currentRequest=new AbortController,ne["AjaxHelper"].post({module:"PrivacyManager",action:"getDatabaseSize",format:"html"},n,{abortController:this.currentRequest,format:"html"}).then(e=>{this.privateState.estimation=e,this.privateState.showEstimate=!0,this.privateState.loadingEstimation=!1}).finally(()=>{this.currentRequest=void 0,this.privateState.loadingEstimation=!1})}}var Kt=new Gt;const Wt={id:"formDeleteSettings"},Yt={id:"deleteLogSettingEnabled"},Jt={class:"alert alert-warning deleteOldLogsWarning",style:{width:"50%"}},Qt=["href"],Xt={id:"deleteLogSettings"},Zt={key:0},en={key:1};function tn(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveComponent"])("PasswordConfirmation"),d=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Wt,[Object(i["createElementVNode"])("div",Yt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteLog"),"inline-help":e.translate("PrivacyManager_DeleteRawDataInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Jt,[Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/general/faq_125"),rel:"noreferrer noopener",target:"_blank"},Object(i["toDisplayString"])(e.translate("General_ClickHere")),9,Qt)],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Xt,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastDaysInput","1")},null,8,["model-value","title","inline-help"])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[2]||(t[2]=e=>this.showPasswordConfirmModal=!0),saving:e.isLoading},null,8,["saving"]),Object(i["createVNode"])(s,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[3]||(t[3]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.saveSettings},{default:Object(i["withCtx"])(()=>[e.enabled&&!e.enableDeleteReports?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",Zt,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteLogsConfirm")),1)):Object(i["createCommentVNode"])("",!0),e.enabled&&e.enableDeleteReports?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",en,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteBothConfirm")),1)):Object(i["createCommentVNode"])("",!0)]),_:1},8,["modelValue","onConfirmed"])])),[[d]])}var nn=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{PasswordConfirmation:oe["PasswordConfirmation"],Field:oe["Field"],SaveButton:oe["SaveButton"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,enabled:1===parseInt(this.deleteData.config.delete_logs_enable,10),deleteOlderThan:this.deleteData.config.delete_logs_older_than,showPasswordConfirmModal:!1}},created(){setTimeout(()=>{Kt.initSettings(this.settings)})},methods:{saveSettings(e){const t="PrivacyManager.setDeleteLogsSettings";this.isLoading=!0,Kt.savePurgeDataSettings(t,this.settings,e).finally(()=>{this.isLoading=!1})},reloadDbStats(){Kt.updateSettings(this.settings)}},computed:{settings(){return{enableDeleteLogs:!!this.enabled,deleteLogsOlderThan:this.deleteOlderThan}},deleteOlderThanTitle(){return`${Object(ne["translate"])("PrivacyManager_DeleteLogsOlderThan")} (${Object(ne["translate"])("Intl_PeriodDays")})`},enableDeleteReports(){return!!Kt.enableDeleteReports.value}}});nn.render=tn;var an=nn;const on={id:"formDeleteSettings"},ln={id:"deleteReportsSettingEnabled"},rn={class:"alert alert-warning",style:{width:"50%"}},cn=Object(i["createElementVNode"])("br",null,null,-1),sn=Object(i["createElementVNode"])("br",null,null,-1),dn={id:"deleteReportsSettings"},mn={key:0},un={key:1};function bn(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("SaveButton"),s=Object(i["resolveComponent"])("PasswordConfirmation"),d=Object(i["resolveDirective"])("form");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",on,[Object(i["createElementVNode"])("div",ln,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsEnable","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>{e.enabled=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_UseDeleteReports"),"inline-help":e.translate("PrivacyManager_DeleteAggregateReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",rn,[Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo2",e.deleteOldLogsText)),1),cn,sn,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsInfo3",e.deleteOldLogsText)),1)])],512),[[i["vShow"],e.enabled]])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",dn,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"text",name:"deleteReportsOlderThan","model-value":e.deleteOlderThan,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.deleteOlderThan=t,e.reloadDbStats()}),title:e.deleteReportsOlderThanTitle,"inline-help":e.translate("PrivacyManager_LeastMonthsInput","1")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepBasic","model-value":e.keepBasic,"onUpdate:modelValue":t[2]||(t[2]=t=>{e.keepBasic=t,e.reloadDbStats()}),title:e.deleteReportsKeepBasicTitle,"inline-help":e.translate("PrivacyManager_KeepBasicMetricsReportsDetailedInfo")},null,8,["model-value","title","inline-help"])]),Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_KeepDataFor")),1),Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepDay","model-value":e.keepDataForDay,"onUpdate:modelValue":t[3]||(t[3]=t=>{e.keepDataForDay=t,e.reloadDbStats()}),title:e.translate("General_DailyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepWeek","model-value":e.keepDataForWeek,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.keepDataForWeek=t,e.reloadDbStats()}),title:e.translate("General_WeeklyReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepMonth","model-value":e.keepDataForMonth,"onUpdate:modelValue":t[5]||(t[5]=t=>{e.keepDataForMonth=t,e.reloadDbStats()}),title:`${e.translate("General_MonthlyReports")} (${e.translate("General_Recommended")})`},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepYear","model-value":e.keepDataForYear,"onUpdate:modelValue":t[6]||(t[6]=t=>{e.keepDataForYear=t,e.reloadDbStats()}),title:`${e.translate("General_YearlyReports")} (${e.translate("General_Recommended")})`},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepRange","model-value":e.keepDataForRange,"onUpdate:modelValue":t[7]||(t[7]=t=>{e.keepDataForRange=t,e.reloadDbStats()}),title:e.translate("General_RangeReports")},null,8,["model-value","title"])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(r,{uicontrol:"checkbox",name:"deleteReportsKeepSegments","model-value":e.keepDataForSegments,"onUpdate:modelValue":t[8]||(t[8]=t=>{e.keepDataForSegments=t,e.reloadDbStats()}),title:e.translate("PrivacyManager_KeepReportSegments")},null,8,["model-value","title"])])])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(c,{onConfirm:t[9]||(t[9]=e=>this.showPasswordConfirmModal=!0),saving:e.isLoading},null,8,["saving"]),Object(i["createVNode"])(s,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[10]||(t[10]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.saveSettings},{default:Object(i["withCtx"])(()=>[e.enabled&&!e.enableDeleteLogs?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",mn,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteReportsConfirm")),1)):Object(i["createCommentVNode"])("",!0),e.enabled&&e.enableDeleteLogs?(Object(i["openBlock"])(),Object(i["createElementBlock"])("h2",un,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteBothConfirm")),1)):Object(i["createCommentVNode"])("",!0)]),_:1},8,["modelValue","onConfirmed"])])),[[d]])}function pn(e){return e?"1":"0"}var gn=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{Field:oe["Field"],SaveButton:oe["SaveButton"],PasswordConfirmation:oe["PasswordConfirmation"]},directives:{Form:oe["Form"]},data(){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(){setTimeout(()=>{Kt.initSettings(this.settings)})},methods:{saveSettings(e){const t="PrivacyManager.setDeleteReportsSettings";this.isLoading=!0,Kt.savePurgeDataSettings(t,this.settings,e).finally(()=>{this.isLoading=!1})},reloadDbStats(){Kt.updateSettings(this.settings)}},computed:{settings(){return{enableDeleteReports:this.enabled,deleteReportsOlderThan:this.deleteOlderThan,keepBasic:pn(this.keepBasic),keepDay:pn(this.keepDataForDay),keepWeek:pn(this.keepDataForWeek),keepMonth:pn(this.keepDataForMonth),keepYear:pn(this.keepDataForYear),keepRange:pn(this.keepDataForRange),keepSegments:pn(this.keepDataForSegments)}},deleteOldLogsText(){return Object(ne["translate"])("PrivacyManager_UseDeleteLog")},deleteReportsOlderThanTitle(){const e=Object(ne["translate"])("PrivacyManager_DeleteReportsOlderThan");return`${e} (${Object(ne["translate"])("Intl_PeriodMonths")})`},deleteReportsKeepBasicTitle(){const e=Object(ne["translate"])("PrivacyManager_KeepBasicMetrics");return`${e} (${Object(ne["translate"])("General_Recommended")})`},enableDeleteLogs(){return!!Kt.enableDeleteLogs.value}}});gn.render=bn;var On=gn;const jn={id:"formDeleteSettings"},hn={id:"deleteSchedulingSettings"},yn={id:"deleteSchedulingSettingsInlineHelp",class:"inline-help-node"},vn={key:0},Sn=Object(i["createElementVNode"])("br",null,null,-1),fn=Object(i["createElementVNode"])("br",null,null,-1),Vn=Object(i["createElementVNode"])("br",null,null,-1),Cn=Object(i["createElementVNode"])("br",null,null,-1),En={key:0,id:"deleteDataEstimateSect",class:"form-group row"},Nn={class:"col s12",id:"databaseSizeHeadline"},Dn={class:"col s12 m6"},kn=["innerHTML"],Mn={class:"col s12 m6"},Pn={key:0,class:"form-help"},_n={class:"ui-confirm",id:"saveSettingsBeforePurge"},wn=["value"];function Tn(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),d=Object(i["resolveComponent"])("PasswordConfirmation"),m=Object(i["resolveComponent"])("ContentBlock"),u=Object(i["resolveDirective"])("form");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",jn,[Object(i["withDirectives"])(Object(i["createVNode"])(m,{id:"scheduleSettingsHeadline","content-title":e.translate("PrivacyManager_DeleteSchedulingSettings")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",hn,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{uicontrol:"select",name:"deleteLowestInterval",title:e.translate("PrivacyManager_DeleteDataInterval"),modelValue:e.deleteLowestInterval,"onUpdate:modelValue":t[1]||(t[1]=t=>e.deleteLowestInterval=t),options:e.scheduleDeletionOptions},{"inline-help":Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",yn,[e.deleteData.lastRun?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",vn,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_LastDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.lastRunPretty)+" ",1),Sn,fn])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_NextDelete"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.deleteData.nextRunPretty)+" ",1),Vn,Cn,Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{id:"purgeDataNowLink",href:"#",onClick:t[0]||(t[0]=Object(i["withModifiers"])(t=>e.executeDataPurge(),["prevent"]))},Object(i["toDisplayString"])(e.translate("PrivacyManager_PurgeNow")),513),[[i["vShow"],e.showPurgeNowLink]]),Object(i["createVNode"])(r,{"loading-message":e.translate("PrivacyManager_PurgingData"),loading:e.loadingDataPurge},null,8,["loading-message","loading"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{id:"db-purged-message"},Object(i["toDisplayString"])(e.translate("PrivacyManager_DBPurged")),513),[[i["vShow"],e.dataWasPurged]])])]),_:1},8,["title","modelValue","options"])])]),"1"===e.deleteData.config.enable_database_size_estimate||1===e.deleteData.config.enable_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",En,[Object(i["createElementVNode"])("h3",Nn,Object(i["toDisplayString"])(e.translate("PrivacyManager_ReportsDataSavedEstimate")),1),Object(i["createElementVNode"])("div",Dn,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",{id:"deleteDataEstimate",innerHTML:e.$sanitize(e.estimation)},null,8,kn),[[i["vShow"],e.showEstimate]]),Object(i["createTextVNode"])(" "),Object(i["createVNode"])(r,{loading:e.loadingEstimation},null,8,["loading"])]),Object(i["createElementVNode"])("div",Mn,["1"!==e.deleteData.config.enable_auto_database_size_estimate&&1!==e.deleteData.config.enable_auto_database_size_estimate?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Pn,[Object(i["createElementVNode"])("a",{id:"getPurgeEstimateLink",href:"#",onClick:t[2]||(t[2]=Object(i["withModifiers"])(t=>e.getPurgeEstimate(),["prevent"]))},Object(i["toDisplayString"])(e.translate("PrivacyManager_GetPurgeEstimate")),1)])):Object(i["createCommentVNode"])("",!0)])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{onConfirm:t[3]||(t[3]=t=>e.showPasswordConfirmModal=!0),saving:e.isLoading},null,8,["saving"]),Object(i["createVNode"])(d,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[4]||(t[4]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.save},null,8,["modelValue","onConfirmed"]),Object(i["createVNode"])(d,{modelValue:e.showPasswordConfirmModalForPurge,"onUpdate:modelValue":t[5]||(t[5]=t=>e.showPasswordConfirmModalForPurge=t),onConfirmed:e.executePurgeNow},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PurgeNowConfirm")),1)]),_:1},8,["modelValue","onConfirmed"])]),_:1},8,["content-title"]),[[i["vShow"],e.isEitherDeleteSectionEnabled]])])),[[u]]),Object(i["createElementVNode"])("div",_n,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SaveSettingsBeforePurge")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Ok")},null,8,wn)])],64)}var zn=Object(i["defineComponent"])({props:{isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0}},components:{ContentBlock:ne["ContentBlock"],ActivityIndicator:ne["ActivityIndicator"],Field:oe["Field"],SaveButton:oe["SaveButton"],PasswordConfirmation:oe["PasswordConfirmation"]},directives:{Form:oe["Form"]},data(){return{isLoading:!1,loadingDataPurge:!1,dataWasPurged:!1,showPurgeNowLink:!0,deleteLowestInterval:this.deleteData.config.delete_logs_schedule_lowest_interval,showPasswordConfirmModal:!1,showPasswordConfirmModalForPurge:!1}},methods:{save(e){const t="PrivacyManager.setScheduleReportDeletionSettings";Kt.savePurgeDataSettings(t,{deleteLowestInterval:this.deleteLowestInterval},e)},executeDataPurge(){Kt.state.value.isModified?ne["Matomo"].helper.modalConfirm("#saveSettingsBeforePurge",{yes:()=>null}):this.showPasswordConfirmModalForPurge=!0},getPurgeEstimate(){return Kt.reloadDbStats(!0)},executePurgeNow(e){return this.loadingDataPurge=!0,this.showPurgeNowLink=!1,ne["AjaxHelper"].post({module:"API",method:"PrivacyManager.executeDataPurge"},{passwordConfirmation:e}).then(()=>{Kt.reloadDbStats(),this.dataWasPurged=!0,setTimeout(()=>{this.dataWasPurged=!1,this.showPurgeNowLink=!0},2e3)}).catch(()=>{this.showPurgeNowLink=!0}).finally(()=>{this.loadingDataPurge=!1})}},computed:{showEstimate(){return Kt.state.value.showEstimate},isEitherDeleteSectionEnabled(){return Kt.isEitherDeleteSectionEnabled()},estimation(){return Kt.state.value.estimation},loadingEstimation(){return Kt.state.value.loadingEstimation}}});zn.render=Tn;var An=zn;const Bn=["innerHTML"],In=["innerHTML"],xn=["innerHTML"],Ln=Object(i["createElementVNode"])("br",null,null,-1),Fn=Object(i["createElementVNode"])("br",null,null,-1),Rn=["innerHTML"],Un=Object(i["createElementVNode"])("br",null,null,-1),Hn=Object(i["createElementVNode"])("br",null,null,-1),$n=["innerHTML"],qn=["innerHTML"],Gn=Object(i["createElementVNode"])("p",null,null,-1),Kn=["innerHTML"];function Wn(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("ContentBlock"),c=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AskingForConsent")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_ConsentExplanation")),1)])),[[c]]),e.consentManagerName?(Object(i["openBlock"])(),Object(i["createBlock"])(r,{key:0,"content-title":e.translate("PrivacyManager_ConsentManager"),class:"privacyAskingForConsent"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.consentManagerDetectedText)},null,8,Bn),e.consentManagerIsConnected?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_ConsentManagerConnected",e.consentManagerName))},null,8,In)):Object(i["createCommentVNode"])("",!0)]),_:1},8,["content-title"])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(r,{"content-title":e.translate("PrivacyManager_WhenDoINeedConsent"),class:"privacyAskingForConsent"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded1)},null,8,xn),Ln,Fn,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded2)},null,8,Rn),Un,Hn,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whenConsentIsNeeded3)},null,8,$n)])]),_:1},8,["content-title"]),Object(i["createVNode"])(r,{"content-title":e.translate("PrivacyManager_HowDoIAskForConsent"),class:"privacyAskingForConsent"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_HowDoIAskForConsentIntro")),1),Object(i["createElementVNode"])("ul",{innerHTML:e.$sanitize(e.consentManagersList)},null,8,qn),Gn,Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.howDoIAskForConsentOthers)},null,8,Kn)]),_:1},8,["content-title"])])}var Yn=Object(i["defineComponent"])({props:{consentManagerName:{type:String,required:!0},consentManagerUrl:{type:String,required:!0},consentManagerIsConnected:{type:Boolean,required:!0},consentManagers:{type:Object,required:!0}},components:{ContentBlock:ne["ContentBlock"]},directives:{ContentIntro:ne["ContentIntro"]},computed:{whenConsentIsNeeded1(){return Object(ne["translate"])("PrivacyManager_WhenConsentIsNeededPart1",Object(ne["externalLink"])("https://matomo.org/faq/new-to-piwik/what-is-gdpr/"),"</a>")},whenConsentIsNeeded2(){const e="https://matomo.org/blog/2018/04/lawful-basis-for-processing-personal-data-under-gdpr-with-matomo/";return Object(ne["translate"])("PrivacyManager_WhenConsentIsNeededPart2",Object(ne["externalLink"])(e),"</a>")},whenConsentIsNeeded3(){return Object(ne["translate"])("PrivacyManager_WhenConsentIsNeededPart3",Object(ne["externalLink"])("https://matomo.org/faq/how-to/faq_35661/"),"</a>")},howDoIAskForConsentOthers(){return Object(ne["translate"])("PrivacyManager_HowDoIAskForConsentOutro",Object(ne["externalLink"])("https://developer.matomo.org/guides/tracking-consent"),"</a>")},consentManagersList(){let e="";return Object.entries(this.consentManagers).forEach(([t,n])=>{const a=Object(ne["externalRawLink"])(n);e+=`<li> <a href="${a}" target="_blank" rel="noreferrer noopener"> ${t} ${Object(ne["translate"])("PrivacyManager_ConsentManager")} </a></li>`}),e},consentManagerDetectedText(){return Object(ne["translate"])("PrivacyManager_ConsentManagerDetected",this.consentManagerName,`<a href="${this.consentManagerUrl}" target="_blank" rel="noreferrer noopener">`,"</a>")}}});Yn.render=Wn;var Jn=Yn;const Qn={class:"gdprOverview"},Xn=Object(i["createElementVNode"])("br",null,null,-1),Zn=Object(i["createElementVNode"])("br",null,null,-1),ea=Object(i["createElementVNode"])("br",null,null,-1),ta=Object(i["createElementVNode"])("br",null,null,-1),na=["innerHTML"],aa=["innerHTML"],oa=["innerHTML"],ia=["innerHTML"],la=["innerHTML"],ra=["innerHTML"],ca=["innerHTML"],sa=["innerHTML"],da=["innerHTML"],ma=["innerHTML"],ua=["innerHTML"],ba=["innerHTML"],pa=["innerHTML"],ga=["innerHTML"],Oa=["innerHTML"],ja=["innerHTML"],ha=Object(i["createElementVNode"])("br",null,null,-1);function ya(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("VueEntryContainer"),c=Object(i["resolveComponent"])("ContentBlock"),s=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Qn,[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprOverview")),1),Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro1"))+" ",1),Xn,Zn,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro2")),1)])])),[[s]]),Object(i["createVNode"])(r,{html:e.afterGDPROverviewIntroContent},null,8,["html"]),Object(i["createVNode"])(c,{"content-title":e.translate("PrivacyManager_GdprChecklists")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_GdprChecklistDesc1"))+" ",1),ea,ta,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gdprChecklistDesc2)},null,8,na)])]),_:1},8,["content-title"]),Object(i["createVNode"])(c,{"content-title":e.translate("PrivacyManager_IndividualsRights")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsIntro")),1),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsInform")),1),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsAccess"))},null,8,aa),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsErasure"))},null,8,oa),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsRectification"))},null,8,ia),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsPortability"))},null,8,la),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsObject","usersOptOut"))},null,8,ra),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsChildren")),1)])]),_:1},8,["content-title"]),Object(i["createVNode"])(c,{"content-title":e.translate("PrivacyManager_AwarenessDocumentation")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationIntro")),1),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc1")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc2")),1),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc3)},null,8,ca),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc4)},null,8,sa)])]),_:1},8,["content-title"]),Object(i["createVNode"])(c,{"content-title":e.translate("PrivacyManager_SecurityProcedures")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_SecurityProceduresIntro")),1),Object(i["createElementVNode"])("ol",null,[Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc1)},null,8,da),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc2)},null,8,ma),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc3)},null,8,ua),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc4)},null,8,ba)])]),_:1},8,["content-title"]),Object(i["createVNode"])(c,{"content-title":e.translate("PrivacyManager_DataRetention")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DataRetentionInMatomo")),1),Object(i["createElementVNode"])("ul",null,[e.deleteLogsEnable?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataRemovedAfter",`<strong>${e.rawDataRetention}</strong>`))},null,8,pa)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataNeverRemoved"))},null,8,ga)),e.deleteReportsEnable?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsRemovedAfter",`<strong>${e.reportRetention}</strong>`))},null,8,Oa)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:3,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsNeverRemoved"))},null,8,ja))]),Object(i["createElementVNode"])("p",null,[ha,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DataRetentionOverall")),1)])]),_:1},8,["content-title"])])}function va(e,t){return Object(ne["translate"])("PrivacyManager_"+e,Object(ne["externalLink"])(t),"</a>")}var Sa=Object(i["defineComponent"])({props:{afterGDPROverviewIntroContent:String,deleteLogsEnable:Boolean,deleteReportsEnable:Boolean,rawDataRetention:null,reportRetention:null},components:{ContentBlock:ne["ContentBlock"],VueEntryContainer:ne["VueEntryContainer"]},directives:{ContentIntro:ne["ContentIntro"]},methods:{rightsLinkText(e,t="gdprTools"){const n="?"+ne["MatomoUrl"].stringify({module:"PrivacyManager",action:t});return Object(ne["translate"])("PrivacyManager_"+e,`<a target="_blank" rel="noreferrer noopener" href="${n}">`,"</a>")}},computed:{gdprChecklistDesc2(){return va("GdprChecklistDesc2","https://matomo.org/docs/gdpr")},awarenessDocumentationDesc3(){return va("AwarenessDocumentationDesc3","https://matomo.org/faq/general/faq_18254/")},awarenessDocumentationDesc4(){return va("AwarenessDocumentationDesc4","https://matomo.org/blog/2018/04/gdpr-how-to-fill-in-the-information-asset-register-when-using-matomo/")},securityProceduresDesc1(){return va("SecurityProceduresDesc1","https://matomo.org/docs/security/")},securityProceduresDesc2(){return va("SecurityProceduresDesc2","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/international-transfers/")},securityProceduresDesc3(){return va("SecurityProceduresDesc3","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/personal-data-breaches/")},securityProceduresDesc4(){return va("SecurityProceduresDesc4","https://www.cnil.fr/en/guidelines-dpia")}}});Sa.render=ya;var fa=Sa;const Va={key:0},Ca=Object(i["createElementVNode"])("br",null,null,-1),Ea={key:1},Na=Object(i["createElementVNode"])("br",null,null,-1),Da={key:2},ka={key:3},Ma={key:0},Pa=["title"],_a={key:1},wa=["title"],Ta={key:2},za=["title"];function Aa(e,t,n,a,o,l){const r=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_PreviousRawDataAnonymizations")),1),Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_Requester")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AffectedIDSites")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AffectedDate")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_Anonymize")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_VisitColumns")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_LinkVisitActionColumns")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1)])]),Object(i["createElementVNode"])("tbody",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.anonymizations,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:n},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.requester),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.sites.join(", ")),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.date_start)+" - "+Object(i["toDisplayString"])(t.date_end),1),Object(i["createElementVNode"])("td",null,[t.anonymize_ip?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Va,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_IPAddress")),1),Ca])):Object(i["createCommentVNode"])("",!0),t.anonymize_location?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ea,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Overlay_Location")),1),Na])):Object(i["createCommentVNode"])("",!0),t.anonymize_userid?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Da,Object(i["toDisplayString"])(e.translate("General_UserId")),1)):Object(i["createCommentVNode"])("",!0),t.anonymize_ip||t.anonymize_location||t.anonymize_userid?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",ka,"-"))]),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.unset_visit_columns.join(", ")),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.unset_link_visit_action_columns.join(", ")),1),Object(i["createElementVNode"])("td",null,[t.job_start_date?t.job_start_date&&!t.job_finish_date?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",_a,[Object(i["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:`${e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||"")}.\n${e.translate("PrivacyManager_JobStartDate",t.job_start_date)}.\n${e.translate("PrivacyManager_CurrentOutput",t.output)}`},null,8,wa),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_InProgress")),1)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ta,[Object(i["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:`${e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||"")}.\n${e.translate("PrivacyManager_JobStartDate",t.job_start_date)}.\n${e.translate("PrivacyManager_JobFinishDate",t.job_finish_date)}.\n${e.translate("PrivacyManager_Output",t.output)}`},null,8,za),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Done")),1)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ma,[Object(i["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:""+e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||"")},null,8,Pa),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_Scheduled")),1)]))])]))),128))])])),[[r]])])}var Ba=Object(i["defineComponent"])({props:{anonymizations:{type:Array,required:!0}},directives:{ContentTable:ne["ContentTable"]}});Ba.render=Aa;var Ia=Ba;const xa=["innerHTML"],La=["innerHTML"],Fa={key:0},Ra=Object(i["createElementVNode"])("a",{name:"anonymizeHistoricalData",id:"anonymizeHistoricalData"},null,-1),Ua={key:1},Ha=Object(i["createElementVNode"])("br",null,null,-1);function $a(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("EnrichedHeadline"),c=Object(i["resolveComponent"])("AnonymizeIp"),s=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveComponent"])("DeleteOldLogs"),m=Object(i["resolveComponent"])("DeleteOldReports"),u=Object(i["resolveComponent"])("ScheduleReportDeletion"),b=Object(i["resolveComponent"])("AnonymizeLogData"),p=Object(i["resolveComponent"])("PreviousAnonymizations"),g=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(r,{"help-url":e.externalRawLink("https://matomo.org/docs/privacy/")},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizeData")),1)]),_:1},8,["help-url"])]),Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.teaserHeader),style:{"margin-right":"3.5px"}},null,8,xa),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.seeAlsoOurOfficialGuide)},null,8,La)])])),[[g]]),Object(i["createVNode"])(s,{id:"anonymizeIPAnchor","content-title":e.translate("PrivacyManager_UseAnonymizeTrackingData")},{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(c,{"ip-anonymizer-enabled":e.ipAnonymizerEnabled,"anonymize-user-id":e.anonymizeUserId,"ip-address-mask-length":e.ipAddressMaskLength,"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,"extra-metadata":e.extraMetadata},null,8,["ip-anonymizer-enabled","anonymize-user-id","ip-address-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","extra-metadata"])]),_:1},8,["content-title"]),e.isDataPurgeSettingsEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fa,[Object(i["createVNode"])(s,{id:"deleteLogsAnchor","content-title":e.translate("PrivacyManager_DeleteOldRawData")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DeleteDataDescription")),1),Object(i["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(i["createVNode"])(s,{id:"deleteReportsAnchor","content-title":e.translate("PrivacyManager_DeleteOldAggregatedReports")},{default:Object(i["withCtx"])(()=>[Object(i["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"])]),_:1},8,["content-title"]),Object(i["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"])])):Object(i["createCommentVNode"])("",!0),Ra,Object(i["createVNode"])(s,{"content-title":e.translate("PrivacyManager_AnonymizePreviousData"),class:"logDataAnonymizer"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataDescription")),1),e.isSuperUser?(Object(i["openBlock"])(),Object(i["createBlock"])(b,{key:0})):(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",Ua,Object(i["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataOnlySuperUser")),1)),Ha,Object(i["createVNode"])(p,{anonymizations:e.anonymizations},null,8,["anonymizations"])]),_:1},8,["content-title"])])}var qa=Object(i["defineComponent"])({props:{ipAnonymizerEnabled:Boolean,anonymizeUserId:Boolean,ipAddressMaskLength:{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,extraMetadata:{type:Object,default:()=>({})}},components:{AnonymizeIp:Pe,EnrichedHeadline:ne["EnrichedHeadline"],ContentBlock:ne["ContentBlock"],DeleteOldLogs:an,DeleteOldReports:On,ScheduleReportDeletion:An,AnonymizeLogData:Rt,PreviousAnonymizations:Ia},directives:{ContentIntro:ne["ContentIntro"]},computed:{teaserHeader(){return Object(ne["translate"])("PrivacyManager_TeaserHeader",'<a href="#anonymizeIPAnchor">',"</a>",'<a href="#deleteLogsAnchor">',"</a>",'<a href="#anonymizeHistoricalData">',"</a>")},seeAlsoOurOfficialGuide(){return Object(ne["translate"])("PrivacyManager_SeeAlsoOurOfficialGuidePrivacy",Object(ne["externalLink"])("https://matomo.org/privacy/"),"</a>")}}});qa.render=$a;var Ga=qa;const Ka={for:"complianceSite"};function Wa(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("EnrichedHeadline"),c=Object(i["resolveComponent"])("SiteSelector"),s=Object(i["resolveComponent"])("ComplianceOverview");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(r,null,{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_Compliance")),1)]),_:1})]),Object(i["createElementVNode"])("label",Ka,Object(i["toDisplayString"])(e.translate("PrivacyManager_ComplianceSelectSite")),1),Object(i["createVNode"])(c,{id:"complianceSite","switch-site-on-select":!1,"show-selected-site":!0,modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=t=>e.site=t)},null,8,["modelValue"]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.complianceTypes,t=>(Object(i["openBlock"])(),Object(i["createBlock"])(s,{key:t.id,"id-site":e.siteId,"compliance-type":t.id,title:t.title,description:t.description},null,8,["id-site","compliance-type","title","description"]))),128))],64)}async function Ya(){return ne["AjaxHelper"].fetch({method:"PrivacyManager.getCompliancePolicies"},{createErrorNotification:!1})}function Ja(e){const t=Object(i["reactive"])({idSite:null,loading:!1,complianceType:e,complianceModeEnforced:!1,complianceConfigControlled:!1,complianceRequirements:[],fetchComplianceError:null,saveComplianceError:null});function n(){return ne["AjaxHelper"].fetch({idSite:t.idSite,complianceType:t.complianceType,method:"PrivacyManager.getComplianceStatus"},{createErrorNotification:!1})}function a(e){t.complianceModeEnforced=e.complianceModeEnforced,t.complianceConfigControlled=e.complianceConfigControlled,t.complianceRequirements=e.complianceRequirements}function o(){t.idSite&&t.complianceType&&(t.loading=!0,t.fetchComplianceError=null,n().then(e=>{a(e)}).catch(e=>{t.fetchComplianceError=e.message||e}).finally(()=>{t.loading=!1}))}function l(e){t.idSite=e,o()}function r(e,n){t.loading=!0,t.saveComplianceError=null,ne["AjaxHelper"].post({idSite:t.idSite,complianceType:t.complianceType,enforce:e,method:"PrivacyManager.setComplianceStatus"},{createErrorNotification:!1,passwordConfirmation:n}).then(()=>{o()}).catch(e=>{t.saveComplianceError=e.message||e}).finally(()=>{t.loading=!1})}const c=Object(i["readonly"])(t);return{state:c,setIdSite:l,saveComplianceStatus:r}}const Qa=["innerHTML"],Xa={key:0,class:"notification system notification-error"},Za={key:0,class:"notification system notification-error"};function eo(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveComponent"])("ComplianceTable"),s=Object(i["resolveComponent"])("Field"),d=Object(i["resolveComponent"])("SaveButton"),m=Object(i["resolveComponent"])("PasswordConfirmation"),u=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createBlock"])(u,{"content-title":e.title},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.description)},null,8,Qa),Object(i["createVNode"])(r,{loading:e.state.loading},null,8,["loading"]),e.state.loading?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[e.state.fetchComplianceError?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Xa,Object(i["toDisplayString"])(e.translate("General_ErrorTryAgain"))+" "+Object(i["toDisplayString"])(e.translate("General_ExceptionContactSupportGeneric",["",""])),1)):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[Object(i["createVNode"])(c,{results:e.state.complianceRequirements},null,8,["results"]),e.state.complianceConfigControlled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createVNode"])(s,{uicontrol:"checkbox",name:"site-"+e.idSite+"-"+e.complianceType+"-enableFeature",title:e.translate("PrivacyManager_ComplianceEnforceCheckboxIntro"),introduction:e.translate("PrivacyManager_ComplianceEnforceCheckboxTitle"),"inline-help":e.translate("PrivacyManager_ComplianceEnforceCheckboxHelp"),modelValue:e.shouldEnforceComplianceMode,"onUpdate:modelValue":t[0]||(t[0]=t=>e.shouldEnforceComplianceMode=t)},null,8,["name","title","introduction","inline-help","modelValue"]),e.state.saveComplianceError?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Za,Object(i["toDisplayString"])(e.translate("General_ErrorTryAgain"))+" "+Object(i["toDisplayString"])(e.translate("General_ExceptionContactSupportGeneric",["",""])),1)):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(d,{class:Object(i["normalizeClass"])("site-"+e.idSite+"-"+e.complianceType+"-save"),onConfirm:t[1]||(t[1]=e=>this.showPasswordConfirmation=!0),value:e.translate("General_Save")},null,8,["class","value"]),Object(i["createVNode"])(m,{"model-value":this.showPasswordConfirmation,passwordFieldId:"password"+e.complianceType,onConfirmed:e.saveSettings,onAborted:e.resetSave},null,8,["model-value","passwordFieldId","onConfirmed","onAborted"])],64))],64))],64))]),_:1},8,["content-title"])}const to={class:"card-table dataTable compliance"},no={class:"label"},ao={class:"label"},oo={class:"label"},io=["innerHTML"];function lo(e,t,n,a,o,l){return Object(i["openBlock"])(),Object(i["createElementBlock"])("table",to,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",no,Object(i["toDisplayString"])(e.translate("PrivacyManager_ComplianceTableSettingName")),1),Object(i["createElementVNode"])("th",ao,Object(i["toDisplayString"])(e.translate("PrivacyManager_ComplianceTableSettingStatus")),1),Object(i["createElementVNode"])("th",oo,Object(i["toDisplayString"])(e.translate("PrivacyManager_ComplianceTableSettingNotes")),1)])]),Object(i["createElementVNode"])("tbody",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.results,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:n},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.name),1),Object(i["createElementVNode"])("td",{class:Object(i["normalizeClass"])(["status",e.getStatusClass(t.value)])},[Object(i["createElementVNode"])("span",{class:Object(i["normalizeClass"])(["icon",e.getIconClass(t.value)])},null,2),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate(e.getStatusText(t.value))),1)],2),Object(i["createElementVNode"])("td",{innerHTML:e.$sanitize(t.notes)},null,8,io)]))),128))])])}const ro={compliant:"compliant",non_compliant:"non-compliant",unknown:"unknown"},co={compliant:"icon-ok",non_compliant:"icon-close",unknown:"icon-circle"},so={compliant:"PrivacyManager_ComplianceCompliant",non_compliant:"PrivacyManager_ComplianceNonCompliant",unknown:"PrivacyManager_ComplianceComplianceUnknown"};var mo=Object(i["defineComponent"])({props:{results:{type:Array,required:!0}},methods:{getStatusClass(e){return ro[e]||ro.unknown},getIconClass(e){return co[e]||co.unknown},getStatusText(e){return so[e]||so.unknown}}});mo.render=lo;var uo=mo,bo=Object(i["defineComponent"])({props:{idSite:{type:String,required:!0},complianceType:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!0}},components:{PasswordConfirmation:oe["PasswordConfirmation"],SaveButton:oe["SaveButton"],Field:oe["Field"],ActivityIndicator:ne["ActivityIndicator"],ComplianceTable:uo,ContentBlock:ne["ContentBlock"]},methods:{saveSettings(e){this.saveComplianceStatus(this.shouldEnforceComplianceMode,e),this.showPasswordConfirmation=!1},resetSave(){this.showPasswordConfirmation=!1}},setup(e){const t=Ja(e.complianceType);t.setIdSite(e.idSite);const n=Object(i["ref"])(!1);return Object(i["watch"])(()=>t.state.complianceModeEnforced,e=>{n.value=e},{immediate:!0}),Object(i["watch"])(()=>e.idSite,e=>{e&&t.setIdSite(e)},{immediate:!0}),{state:t.state,saveComplianceStatus:t.saveComplianceStatus,shouldEnforceComplianceMode:n,showPasswordConfirmation:Object(i["ref"])(!1)}}});bo.render=eo;var po=bo,go=Object(i["defineComponent"])({components:{EnrichedHeadline:ne["EnrichedHeadline"],ComplianceOverview:po,SiteSelector:ne["SiteSelector"]},setup(){var e,t;const n=Object(i["ref"])({id:null!==(e=ne["Matomo"].idSite)&&void 0!==e?e:ne["MatomoUrl"].urlParsed.value.idSite,name:ne["Matomo"].siteName?ne["Matomo"].helper.htmlDecode(ne["Matomo"].siteName):Object(ne["translate"])("General_MultiSitesSummary")}),a=Object(i["ref"])(String(null!==(t=ne["Matomo"].idSite)&&void 0!==t?t:ne["MatomoUrl"].urlParsed.value.idSite));Object(i["watch"])(n,e=>{a.value=null!=(null===e||void 0===e?void 0:e.id)?String(e.id):""});const o=Object(i["ref"])([]);return Object(i["onMounted"])(async()=>{o.value=await Ya()}),{site:n,siteId:a,complianceTypes:o}}});go.render=Wa;var Oo=go;const jo={key:0},ho=Object(i["createElementVNode"])("br",null,null,-1),yo={key:1};function vo(e,t,n,a,o,l){const r=Object(i["resolveComponent"])("OptOutCustomizer"),c=Object(i["resolveComponent"])("ContentBlock"),s=Object(i["resolveComponent"])("Alert"),d=Object(i["resolveComponent"])("DoNotTrackPreference");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createVNode"])(c,{"content-title":e.translate("PrivacyManager_TrackingOptOut")},{default:Object(i["withCtx"])(()=>[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.prefaceComponentsResolved,(e,t)=>(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e),{key:t}))),128)),Object(i["createVNode"])(r,{"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(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,id:"DNT","content-title":e.translate("PrivacyManager_DoNotTrack_SupportDNTPreference")},{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(s,{severity:"warning"},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Deprecated")),1)]),_:1}),Object(i["createElementVNode"])("p",null,[e.dntSupport?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",jo,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Enabled")),1),ho,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_EnabledMoreInfo")),1)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",yo,Object(i["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Disabled"))+" "+Object(i["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_DisabledMoreInfo")),1))]),Object(i["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(i["createCommentVNode"])("",!0)])}var So=Object(i["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:ne["Alert"],ContentBlock:ne["ContentBlock"],DoNotTrackPreference:$t,OptOutCustomizer:at},data(){return{prefaceComponents:[]}},computed:{prefaceComponentsResolved(){return Object(i["markRaw"])(this.prefaceComponents.map(e=>Object(i["markRaw"])(Object(ne["useExternalPluginComponent"])(e.plugin,e.component))))}},created(){const e=[];ne["Matomo"].postEvent("PrivacyManager.UsersOptOut.preface",e),this.prefaceComponents=e}});So.render=vo;var fo=So;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# sourceMappingURL=PrivacyManager.umd.min.js.map