")},whenConsentIsNeeded2:function(){var e="https://matomo.org/blog/2018/04/lawful-basis-for-processing-personal-data-under-gdpr-with-matomo/";return Object(X["translate"])("PrivacyManager_WhenConsentIsNeededPart2",Object(X["externalLink"])(e),"")},whenConsentIsNeeded3:function(){return Object(X["translate"])("PrivacyManager_WhenConsentIsNeededPart3",Object(X["externalLink"])("https://matomo.org/faq/how-to/faq_35661/"),"")},howDoIAskForConsentOthers:function(){return Object(X["translate"])("PrivacyManager_HowDoIAskForConsentOutro",Object(X["externalLink"])("https://developer.matomo.org/guides/tracking-consent"),"")},consentManagersList:function(){var e="";return Object.entries(this.consentManagers).forEach((function(t){var n=Bn(t,2),a=n[0],o=n[1],r=Object(X["externalRawLink"])(o);e+=""+' '+" ".concat(a," ").concat(Object(X["translate"])("PrivacyManager_ConsentManager"))+" "})),e},consentManagerDetectedText:function(){return Object(X["translate"])("PrivacyManager_ConsentManagerDetected",this.consentManagerName,''),"")}}});qn.render=Ln;var Gn=qn,$n={class:"gdprOverview"},Kn=Object(r["createElementVNode"])("br",null,null,-1),Wn=Object(r["createElementVNode"])("br",null,null,-1),Yn=Object(r["createElementVNode"])("br",null,null,-1),Jn=Object(r["createElementVNode"])("br",null,null,-1),Qn=["innerHTML"],Xn=["innerHTML"],Zn=["innerHTML"],ea=["innerHTML"],ta=["innerHTML"],na=["innerHTML"],aa=["innerHTML"],oa=["innerHTML"],ra=["innerHTML"],ia=["innerHTML"],la=["innerHTML"],ca=["innerHTML"],sa=["innerHTML"],da=["innerHTML"],ua=["innerHTML"],ma=["innerHTML"],ba=Object(r["createElementVNode"])("br",null,null,-1);function pa(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("VueEntryContainer"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",$n,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprOverview")),1),Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro1"))+" ",1),Kn,Wn,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprOverviewIntro2")),1)])],512),[[s]]),Object(r["createVNode"])(l,{html:e.afterGDPROverviewIntroContent},null,8,["html"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_GdprChecklists")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_GdprChecklistDesc1"))+" ",1),Yn,Jn,Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gdprChecklistDesc2)},null,8,Qn)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_IndividualsRights")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsIntro")),1),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsInform")),1),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsAccess"))},null,8,Xn),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsErasure"))},null,8,Zn),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsRectification"))},null,8,ea),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsPortability"))},null,8,ta),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.rightsLinkText("IndividualsRightsObject","usersOptOut"))},null,8,na),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_IndividualsRightsChildren")),1)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_AwarenessDocumentation")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationIntro")),1),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc1")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AwarenessDocumentationDesc2")),1),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc3)},null,8,aa),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.awarenessDocumentationDesc4)},null,8,oa)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_SecurityProcedures")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_SecurityProceduresIntro")),1),Object(r["createElementVNode"])("ol",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc1)},null,8,ra),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc2)},null,8,ia),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc3)},null,8,la),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.securityProceduresDesc4)},null,8,ca)])]})),_:1},8,["content-title"]),Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_DataRetention")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DataRetentionInMatomo")),1),Object(r["createElementVNode"])("ul",null,[e.deleteLogsEnable?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataRemovedAfter","".concat(e.rawDataRetention,"")))},null,8,sa)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.translate("PrivacyManager_RawDataNeverRemoved"))},null,8,da)),e.deleteReportsEnable?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsRemovedAfter","".concat(e.reportRetention,"")))},null,8,ua)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:3,innerHTML:e.$sanitize(e.translate("PrivacyManager_ReportsNeverRemoved"))},null,8,ma))]),Object(r["createElementVNode"])("p",null,[ba,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DataRetentionOverall")),1)])]})),_:1},8,["content-title"])])}function Oa(e,t){return Object(X["translate"])("PrivacyManager_".concat(e),Object(X["externalLink"])(t),"")}var ga=Object(r["defineComponent"])({props:{afterGDPROverviewIntroContent:String,deleteLogsEnable:Boolean,deleteReportsEnable:Boolean,rawDataRetention:null,reportRetention:null},components:{ContentBlock:X["ContentBlock"],VueEntryContainer:X["VueEntryContainer"]},directives:{ContentIntro:X["ContentIntro"]},methods:{rightsLinkText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gdprTools",n="?".concat(X["MatomoUrl"].stringify({module:"PrivacyManager",action:t}));return Object(X["translate"])("PrivacyManager_".concat(e),''),"")}},computed:{gdprChecklistDesc2:function(){return Oa("GdprChecklistDesc2","https://matomo.org/docs/gdpr")},awarenessDocumentationDesc3:function(){return Oa("AwarenessDocumentationDesc3","https://matomo.org/faq/general/faq_18254/")},awarenessDocumentationDesc4:function(){return Oa("AwarenessDocumentationDesc4","https://matomo.org/blog/2018/04/gdpr-how-to-fill-in-the-information-asset-register-when-using-matomo/")},securityProceduresDesc1:function(){return Oa("SecurityProceduresDesc1","https://matomo.org/docs/security/")},securityProceduresDesc2:function(){return Oa("SecurityProceduresDesc2","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/international-transfers/")},securityProceduresDesc3:function(){return Oa("SecurityProceduresDesc3","https://ico.org.uk/for-organisations/guide-to-the-general-data-protection-regulation-gdpr/personal-data-breaches/")},securityProceduresDesc4:function(){return Oa("SecurityProceduresDesc4","https://www.cnil.fr/en/guidelines-dpia")}}});ga.render=pa;var ja=ga,va={key:0},ha=Object(r["createElementVNode"])("br",null,null,-1),ya={key:1},fa=Object(r["createElementVNode"])("br",null,null,-1),Va={key:2},Da={key:3},Na={key:0},Ea=["title"],Sa={key:1},Ca=["title"],ka={key:2},_a=["title"];function Pa(e,t,n,a,o,i){var l=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_PreviousRawDataAnonymizations")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_Requester")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AffectedIDSites")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AffectedDate")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_Anonymize")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_VisitColumns")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_LinkVisitActionColumns")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1)])]),Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.anonymizations,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.requester),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.sites.join(", ")),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.date_start)+" - "+Object(r["toDisplayString"])(t.date_end),1),Object(r["createElementVNode"])("td",null,[t.anonymize_ip?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",va,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_IPAddress")),1),ha])):Object(r["createCommentVNode"])("",!0),t.anonymize_location?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ya,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Overlay_Location")),1),fa])):Object(r["createCommentVNode"])("",!0),t.anonymize_userid?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Va,Object(r["toDisplayString"])(e.translate("General_UserId")),1)):Object(r["createCommentVNode"])("",!0),t.anonymize_ip||t.anonymize_location||t.anonymize_userid?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Da,"-"))]),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.unset_visit_columns.join(", ")),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.unset_link_visit_action_columns.join(", ")),1),Object(r["createElementVNode"])("td",null,[t.job_start_date?t.job_start_date&&!t.job_finish_date?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Sa,[Object(r["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:"".concat(e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||""),".\n").concat(e.translate("PrivacyManager_JobStartDate",t.job_start_date),".\n").concat(e.translate("PrivacyManager_CurrentOutput",t.output))},null,8,Ca),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_InProgress")),1)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ka,[Object(r["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:"".concat(e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||""),".\n").concat(e.translate("PrivacyManager_JobStartDate",t.job_start_date),".\n").concat(e.translate("PrivacyManager_JobFinishDate",t.job_finish_date),".\n").concat(e.translate("PrivacyManager_Output",t.output))},null,8,_a),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Done")),1)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Na,[Object(r["createElementVNode"])("span",{class:"icon-info",style:{cursor:"help"},title:"".concat(e.translate("PrivacyManager_ScheduledDate",t.scheduled_date||""))},null,8,Ea),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_Scheduled")),1)]))])])})),128))])],512),[[l]])])}var Ma=Object(r["defineComponent"])({props:{anonymizations:{type:Array,required:!0}},directives:{ContentTable:X["ContentTable"]}});Ma.render=Pa;var wa=Ma,za=["innerHTML"],Ta=["innerHTML"],Aa={key:0},Ia=Object(r["createElementVNode"])("a",{name:"anonymizeHistoricalData",id:"anonymizeHistoricalData"},null,-1),La={key:1},Ba=Object(r["createElementVNode"])("br",null,null,-1);function xa(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("EnrichedHeadline"),c=Object(r["resolveComponent"])("AnonymizeIp"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveComponent"])("DeleteOldLogs"),u=Object(r["resolveComponent"])("DeleteOldReports"),m=Object(r["resolveComponent"])("ScheduleReportDeletion"),b=Object(r["resolveComponent"])("AnonymizeLogData"),p=Object(r["resolveComponent"])("PreviousAnonymizations"),O=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/docs/privacy/")},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizeData")),1)]})),_:1},8,["help-url"])]),Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.teaserHeader),style:{"margin-right":"3.5px"}},null,8,za),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.seeAlsoOurOfficialGuide)},null,8,Ta)])],512),[[O]]),Object(r["createVNode"])(s,{id:"anonymizeIPAnchor","content-title":e.translate("PrivacyManager_UseAnonymizeTrackingData")},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(c,{"anonymize-ip-enabled":e.anonymizeIpEnabled,"anonymize-user-id":e.anonymizeUserId,"mask-length":e.maskLength,"use-anonymized-ip-for-visit-enrichment":e.useAnonymizedIpForVisitEnrichment,"anonymize-order-id":e.anonymizeOrderId,"force-cookieless-tracking":e.forceCookielessTracking,"anonymize-referrer":e.anonymizeReferrer,"mask-length-options":e.maskLengthOptions,"use-anonymized-ip-for-visit-enrichment-options":e.useAnonymizedIpForVisitEnrichmentOptions,"tracker-file-name":e.trackerFileName,"tracker-writable":e.trackerWritable,"referrer-anonymization-options":e.referrerAnonymizationOptions},null,8,["anonymize-ip-enabled","anonymize-user-id","mask-length","use-anonymized-ip-for-visit-enrichment","anonymize-order-id","force-cookieless-tracking","anonymize-referrer","mask-length-options","use-anonymized-ip-for-visit-enrichment-options","tracker-file-name","tracker-writable","referrer-anonymization-options"])]})),_:1},8,["content-title"]),e.isDataPurgeSettingsEnabled?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Aa,[Object(r["createVNode"])(s,{id:"deleteLogsAnchor","content-title":e.translate("PrivacyManager_DeleteOldRawData")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DeleteDataDescription")),1),Object(r["createVNode"])(d,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])]})),_:1},8,["content-title"]),Object(r["createVNode"])(s,{id:"deleteReportsAnchor","content-title":e.translate("PrivacyManager_DeleteOldAggregatedReports")},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(u,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])]})),_:1},8,["content-title"]),Object(r["createVNode"])(m,{"is-data-purge-settings-enabled":e.isDataPurgeSettingsEnabled,"delete-data":e.deleteData,"schedule-deletion-options":e.scheduleDeletionOptions},null,8,["is-data-purge-settings-enabled","delete-data","schedule-deletion-options"])])):Object(r["createCommentVNode"])("",!0),Ia,Object(r["createVNode"])(s,{"content-title":e.translate("PrivacyManager_AnonymizePreviousData"),class:"logDataAnonymizer"},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataDescription")),1),e.isSuperUser?(Object(r["openBlock"])(),Object(r["createBlock"])(b,{key:0})):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",La,Object(r["toDisplayString"])(e.translate("PrivacyManager_AnonymizePreviousDataOnlySuperUser")),1)),Ba,Object(r["createVNode"])(p,{anonymizations:e.anonymizations},null,8,["anonymizations"])]})),_:1},8,["content-title"])])}var Fa=Object(r["defineComponent"])({props:{anonymizeIpEnabled:Boolean,anonymizeUserId:Boolean,maskLength:{type:Number,required:!0},useAnonymizedIpForVisitEnrichment:[Boolean,String,Number],anonymizeOrderId:Boolean,forceCookielessTracking:Boolean,anonymizeReferrer:String,maskLengthOptions:{type:Array,required:!0},useAnonymizedIpForVisitEnrichmentOptions:{type:Array,required:!0},trackerFileName:{type:String,required:!0},trackerWritable:{type:Boolean,required:!0},referrerAnonymizationOptions:{type:Object,required:!0},isDataPurgeSettingsEnabled:Boolean,deleteData:{type:Object,required:!0},scheduleDeletionOptions:{type:Object,required:!0},anonymizations:{type:Array,required:!0},isSuperUser:Boolean},components:{AnonymizeIp:pe,EnrichedHeadline:X["EnrichedHeadline"],ContentBlock:X["ContentBlock"],DeleteOldLogs:Gt,DeleteOldReports:an,ScheduleReportDeletion:Nn,AnonymizeLogData:St,PreviousAnonymizations:wa},directives:{ContentIntro:X["ContentIntro"]},computed:{teaserHeader:function(){return Object(X["translate"])("PrivacyManager_TeaserHeader",'',"",'',"",'',"")},seeAlsoOurOfficialGuide:function(){return Object(X["translate"])("PrivacyManager_SeeAlsoOurOfficialGuidePrivacy",Object(X["externalLink"])("https://matomo.org/privacy/"),"")}}});Fa.render=xa;var Ra=Fa,Ua={key:0},Ha=Object(r["createElementVNode"])("br",null,null,-1),qa={key:1};function Ga(e,t,n,a,o,i){var l=Object(r["resolveComponent"])("OptOutCustomizer"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveComponent"])("Alert"),d=Object(r["resolveComponent"])("DoNotTrackPreference");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createVNode"])(c,{"content-title":e.translate("PrivacyManager_TrackingOptOut")},{default:Object(r["withCtx"])((function(){return[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.prefaceComponentsResolved,(function(e,t){return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e),{key:t})})),128)),Object(r["createVNode"])(l,{"matomo-url":e.matomoUrl,language:e.language,"language-options":e.languageOptions},null,8,["matomo-url","language","language-options"])]})),_:1},8,["content-title"]),e.isSuperUser?(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,id:"DNT","content-title":e.translate("PrivacyManager_DoNotTrack_SupportDNTPreference")},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(s,{severity:"warning"},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Deprecated")),1)]})),_:1}),Object(r["createElementVNode"])("p",null,[e.dntSupport?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Ua,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Enabled")),1),Ha,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_EnabledMoreInfo")),1)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",qa,Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_Disabled"))+" "+Object(r["toDisplayString"])(e.translate("PrivacyManager_DoNotTrack_DisabledMoreInfo")),1))]),Object(r["createVNode"])(d,{"dnt-support":e.dntSupport,"do-not-track-options":e.doNotTrackOptions},null,8,["dnt-support","do-not-track-options"])]})),_:1},8,["content-title"])):Object(r["createCommentVNode"])("",!0)])}var $a=Object(r["defineComponent"])({props:{language:{type:String,required:!0},matomoUrl:String,isSuperUser:Boolean,dntSupport:Boolean,doNotTrackOptions:{type:Array,required:!0},languageOptions:{type:Object,required:!0}},components:{Alert:X["Alert"],ContentBlock:X["ContentBlock"],DoNotTrackPreference:_t,OptOutCustomizer:Ue},data:function(){return{prefaceComponents:[]}},computed:{prefaceComponentsResolved:function(){return Object(r["markRaw"])(this.prefaceComponents.map((function(e){return Object(r["markRaw"])(Object(X["useExternalPluginComponent"])(e.plugin,e.component))})))}},created:function(){var e=[];X["Matomo"].postEvent("PrivacyManager.UsersOptOut.preface",e),this.prefaceComponents=e}});$a.render=Ga;var Ka=$a;
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/PrivacyManager/vue/src/ManageGdpr/ManageGdpr.vue b/plugins/PrivacyManager/vue/src/ManageGdpr/ManageGdpr.vue
index bd70927d904..c6db5093b3f 100644
--- a/plugins/PrivacyManager/vue/src/ManageGdpr/ManageGdpr.vue
+++ b/plugins/PrivacyManager/vue/src/ManageGdpr/ManageGdpr.vue
@@ -43,6 +43,7 @@
:show-all-sites-item="true"
:switch-site-on-select="false"
:show-selected-site="true"
+ @update:modelValue="changeSite($event)"
/>
@@ -106,7 +107,7 @@
{{ translate('General_VisitorIP') }} |
{{ translate('General_UserId') }} |
{{ translate('General_Details') }} |
- {{ translate('General_Action') }} |
+ {{ translate('General_Action') }} |
@@ -189,7 +190,7 @@
/>
-
+ |
;
+ site: SiteRef;
segment_filter: string;
dataSubjects: DataSubject[];
toggleAll: boolean;
@@ -306,7 +308,7 @@ export default defineComponent({
id: 'all',
name: translate('UsersManager_AllWebsites'),
},
- segment_filter: 'userId==',
+ segment_filter: 'visitId==',
dataSubjects: [],
toggleAll: true,
hasSearched: false,
@@ -326,7 +328,33 @@ export default defineComponent({
},
};
},
+ created() {
+ this.changeSite(this.site);
+ },
methods: {
+ changeSite(newValue: SiteRef) {
+ AjaxHelper.fetch(
+ {
+ module: 'API',
+ method: 'Live.isVisitorProfileEnabled',
+ filter_limit: -1,
+ idSite: newValue.id,
+ },
+ {
+ createErrorNotification: false, // don't show errors from this API in UI
+ },
+ ).then((response) => {
+ this.profileEnabled = response.value;
+ }).catch(() => {
+ this.profileEnabled = false;
+ }).finally(() => {
+ if (!this.profileEnabled && this.segment_filter === 'userId==') {
+ this.segment_filter = 'visitId==';
+ } else if (this.profileEnabled && this.segment_filter === 'visitId==') {
+ this.segment_filter = 'userId==';
+ }
+ });
+ },
showSuccessNotification(message: string) {
const notificationInstanceId = NotificationsStore.show({
message,
@@ -430,6 +458,9 @@ export default defineComponent({
},
},
computed: {
+ hasActions(): boolean {
+ return !!this.dataSubjects.find((elem) => !!elem.visitorId);
+ },
hasActiveDataSubjects(): boolean {
return !!this.activatedDataSubjects.length;
},
diff --git a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js
index 94a4ee8fd2f..911934638b7 100644
--- a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js
+++ b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.js
@@ -262,7 +262,7 @@ var SegmentGenerator_store_SegmentGeneratorStore = /*#__PURE__*/function () {
}();
/* harmony default export */ var SegmentGenerator_store = (new SegmentGenerator_store_SegmentGeneratorStore());
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=1efeab05
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=3ff4cb6c
var _hoisted_1 = {
class: "segment-generator",
@@ -406,7 +406,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
innerHTML: _ctx.$sanitize(_ctx.addNewAndConditionLinkText)
}, null, 8, _hoisted_20)])])], 512);
}
-// CONCATENATED MODULE: ./plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=1efeab05
+// CONCATENATED MODULE: ./plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue?vue&type=template&id=3ff4cb6c
// EXTERNAL MODULE: external "CorePluginsAdmin"
var external_CorePluginsAdmin_ = __webpack_require__("a5a2");
@@ -687,7 +687,11 @@ var _window = window,
module: 'API',
format: 'json',
method: 'API.getSuggestedValuesForSegment',
- segmentName: orCondition.segment
+ segmentName: orCondition.segment,
+ idSite: this.idsite
+ }, {
+ createErrorNotification: false // don't show errors returned from the API in UI
+
}).then(function (response) {
_this3.conditionValuesLoading[orCondition.id] = false;
resolved = true;
diff --git a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js
index f690087c011..4eb616437e6 100644
--- a/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js
+++ b/plugins/SegmentEditor/vue/dist/SegmentEditor.umd.min.js
@@ -10,7 +10,7 @@
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var u=function(){function e(){var t=this;c(this,e),d(this,"privateState",Object(a["reactive"])({isLoading:!1,segments:[]})),d(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),d(this,"loadSegmentsAbort",void 0),d(this,"loadSegmentsPromise",void 0),d(this,"fetchedSiteId",void 0)}return s(e,[{key:"loadSegments",value:function(e,t){var n=this;if(this.loadSegmentsAbort&&(this.loadSegmentsAbort.abort(),this.loadSegmentsAbort=void 0),this.privateState.isLoading=!0,this.fetchedSiteId!==e&&(this.loadSegmentsAbort=void 0,this.fetchedSiteId=e),!this.loadSegmentsPromise){var o=void 0,i=void 0;"all"!==e&&e?e&&(o=e,i=e):(o="all",i="all"),this.loadSegmentsAbort=new AbortController,this.loadSegmentsPromise=r["AjaxHelper"].fetch({method:"API.getSegmentsMetadata",filter_limit:"-1",_hideImplementationData:0,idSites:o,idSite:i})}return this.loadSegmentsPromise.then((function(e){return n.privateState.isLoading=!1,e&&(n.privateState.segments=t?e.filter((function(e){return e.sqlSegment&&e.sqlSegment.match(/log_visit\./)})):e),n.state.value.segments})).finally((function(){n.privateState.isLoading=!1,delete n.loadSegmentsPromise}))}}]),e}(),m=new u,f={class:"segment-generator",ref:"root"},p={class:"segment-rows"},g={class:"segment-row"},v=["onClick"],h={href:"#",class:"segment-loading"},O={class:"segment-row-inputs valign-wrapper"},b={class:"segment-input metricListBlock valign-wrapper"},j={style:{width:"100%"}},S={class:"segment-input metricMatchBlock valign-wrapper"},y={style:{display:"inline-block"}},C={class:"segment-input metricValueBlock valign-wrapper"},V={class:"form-group row",style:{width:"100%"}},k={class:"input-field col s12"},w=Object(a["createElementVNode"])("span",{role:"status","aria-live":"polite",class:"ui-helper-hidden-accessible"},null,-1),E=Object(a["createElementVNode"])("div",{class:"clear"},null,-1),N={class:"segment-or"},A=["onClick"],L=["innerHTML"],_={class:"segment-and"},I=["innerHTML"];function x(e,t,n,o,i,r){var c=this,l=Object(a["resolveComponent"])("ActivityIndicator"),s=Object(a["resolveComponent"])("Field"),d=Object(a["resolveComponent"])("ValueInput");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",f,[Object(a["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.conditions,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("segmentRow".concat(n)),key:n},[Object(a["createElementVNode"])("div",p,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.orConditions,(function(n,o){var i,r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("orCondId".concat(n.id)),key:o},[Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("a",{class:"segment-close",onClick:function(o){return e.removeOrCondition(t,n)}},null,8,v),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",h,null,512),[[a["vShow"],e.conditionValuesLoading[n.id]]]),Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",j,[Object(a["createVNode"])(s,{uicontrol:"expandable-select",name:"segments","model-value":n.segment,"onUpdate:modelValue":function(t){n.segment=t,e.updateAutocomplete(n),e.computeSegmentDefinition()},title:null===(i=e.segments[n.segment])||void 0===i?void 0:i.name,"full-width":!0,options:e.segmentList},null,8,["model-value","onUpdate:modelValue","title","options"])])]),Object(a["createElementVNode"])("div",S,[Object(a["createElementVNode"])("div",y,[Object(a["createVNode"])(s,{uicontrol:"select",name:"matchType","model-value":n.matches,"onUpdate:modelValue":function(t){n.matches=t,e.computeSegmentDefinition()},"full-width":!0,options:e.matches[null===(r=e.segments[n.segment])||void 0===r?void 0:r.type]},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",C,[Object(a["createElementVNode"])("div",V,[Object(a["createElementVNode"])("div",k,[w,Object(a["createVNode"])(d,{value:n.value,onUpdate:function(e){n.value=e,c.computeSegmentDefinition()}},null,8,["value","onUpdate"])])])]),E])]),Object(a["createElementVNode"])("div",N,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorOR")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-or",onClick:function(n){return e.addNewOrCondition(t)}},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewOrConditionLinkText)},null,8,L)])],8,A)]),Object(a["createElementVNode"])("div",_,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorAND")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-row initial",onClick:t[0]||(t[0]=function(t){return e.addNewAndCondition()})},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewAndConditionLinkText)},null,8,I)])])],512)}var D=n("a5a2"),B=["placeholder","title","value"];function P(e,t,n,o,i,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{placeholder:e.translate("General_Value"),type:"text",class:"autocomplete",title:e.translate("General_Value"),autocomplete:"off",value:e.value,onKeydown:t[0]||(t[0]=function(t){return e.onKeydownOrConditionValue(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydownOrConditionValue(t)})},null,40,B)}var G=Object(a["defineComponent"])({props:{value:null},created:function(){this.onKeydownOrConditionValue=Object(r["debounce"])(this.onKeydownOrConditionValue,50)},emits:["update"],methods:{onKeydownOrConditionValue:function(e){this.$emit("update",e.target.value)}}});G.render=P;var q=G;function M(){return{metric:[{key:"==",value:Object(r["translate"])("General_OperationEquals")},{key:"!=",value:Object(r["translate"])("General_OperationNotEquals")},{key:"<=",value:Object(r["translate"])("General_OperationAtMost")},{key:">=",value:Object(r["translate"])("General_OperationAtLeast")},{key:"<",value:Object(r["translate"])("General_OperationLessThan")},{key:">",value:Object(r["translate"])("General_OperationGreaterThan")}],dimension:[{key:"==",value:Object(r["translate"])("General_OperationIs")},{key:"!=",value:Object(r["translate"])("General_OperationIsNot")},{key:"=@",value:Object(r["translate"])("General_OperationContains")},{key:"!@",value:Object(r["translate"])("General_OperationDoesNotContain")},{key:"=^",value:Object(r["translate"])("General_OperationStartsWith")},{key:"=$",value:Object(r["translate"])("General_OperationEndsWith")}]}}function T(){for(var e="",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=1;n<=10;n+=1)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function U(e){for(var t,n,o=["==","!=","<=",">=","=@","!@","<",">","=^","=$"],i={},a=e.length,r=!1,c=0;c]+)>)/gi,""):e}var R=window,$=R.$,F=Object(a["defineComponent"])({props:{addInitialCondition:Boolean,visitSegmentsOnly:Boolean,idsite:{type:[String,Number],default:function(){return r["Matomo"].idSite}},modelValue:{type:String,default:""}},components:{ActivityIndicator:r["ActivityIndicator"],Field:D["Field"],ValueInput:q},data:function(){return{conditions:[],queriedSegments:[],matches:M(),conditionValuesLoading:{},segmentDefinition:""}},emits:["update:modelValue"],watch:{modelValue:function(e){(e||"")!==(this.segmentDefinition||"")&&this.setSegmentString(e)},conditions:{deep:!0,handler:function(){this.computeSegmentDefinition()}},segmentDefinition:function(e){(e||"")!==(this.modelValue||"")&&this.$emit("update:modelValue",e)},idsite:function(e){this.reloadSegments(e,this.visitSegmentsOnly)}},created:function(){this.matches[""]=this.matches.dimension,this.setSegmentString(this.modelValue),this.segmentDefinition=this.modelValue,this.reloadSegments(this.idsite,this.visitSegmentsOnly)},methods:{reloadSegments:function(e,t){var n=this;m.loadSegments(e,t).then((function(e){n.queriedSegments=e.map((function(e){return Object.assign(Object.assign({},e),{},{category:e.category||"Others"})})),n.addInitialCondition&&0===n.conditions.length&&n.addNewAndCondition()}))},addAndCondition:function(e){this.conditions.push(e)},addNewOrCondition:function(e){if(this.firstSegment){var t={segment:this.firstSegment,matches:this.firstMatch,value:""};this.addOrCondition(e,t)}},addOrCondition:function(e,t){var n=this;this.conditionValuesLoading[t.id]=!1,t.id=T(),e.orConditions.push(t),Object(a["nextTick"])((function(){n.updateAutocomplete(t)}))},updateAutocomplete:function(e){var t=this;this.conditionValuesLoading[e.id]=!0,$(".orCondId".concat(e.id," .metricValueBlock input"),this.$refs.root).autocomplete({source:[],minLength:0});var n=new AbortController,o=!1;r["AjaxHelper"].fetch({module:"API",format:"json",method:"API.getSuggestedValuesForSegment",segmentName:e.segment}).then((function(n){t.conditionValuesLoading[e.id]=!1,o=!0;var i=n;Array.isArray(i)&&(i=i.map((function(e){return"".concat(e)})));var a=$(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:i,minLength:0,select:function(n,o){n.preventDefault(),e.value=o.item.value,t.computeSegmentDefinition(),t.$forceUpdate()}}).off("click").click((function(){$(a).autocomplete("search",e.value)}))})).catch((function(){o=!0,t.conditionValuesLoading[e.id]=!1,$(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:[],minLength:0}).autocomplete("search",e.value)})),setTimeout((function(){o||n.abort()}),2e4)},removeOrCondition:function(e,t){var n=e.orConditions.indexOf(t);if(n>-1&&e.orConditions.splice(n,1),0===e.orConditions.length){var o=this.conditions.indexOf(e);n>-1&&this.conditions.splice(o,1)}},setSegmentString:function(e){var t=this;if(this.conditions=[],e){var n=e.split(";").map((function(e){return e.split(",")}));this.conditions=n.map((function(e){var n={orConditions:[]};return e.forEach((function(e){var o=U(e);t.addOrCondition(n,o)})),n}))}},addNewAndCondition:function(){var e={orConditions:[]};this.firstSegment&&(this.addAndCondition(e),this.addNewOrCondition(e))},computeSegmentDefinition:function(){var e="";this.conditions.forEach((function(t){if(t.orConditions.length){var n="";t.orConditions.forEach((function(e){if(e.value||e.segment||e.matches){""!==n&&(n+=",");var t=encodeURIComponent(encodeURIComponent(e.value));n+="".concat(e.segment).concat(e.matches).concat(t)}})),""!==e&&(e+=";"),e+=n}})),this.segmentDefinition=e}},computed:{firstSegment:function(){var e;return(null===(e=this.queriedSegments[0])||void 0===e?void 0:e.segment)||null},firstMatch:function(){var e=this.queriedSegments[0];return e?e.type&&this.matches[e.type]?this.matches[e.type][0].key:this.matches[""][0].key:null},segments:function(){var e={};return this.queriedSegments.forEach((function(t){e[t.segment]=t})),e},segmentList:function(){return this.queriedSegments.map((function(e){return{group:e.category,key:e.segment,value:e.name,tooltip:e.acceptedValues?H(e.acceptedValues):void 0}}))},addNewOrConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","".concat(Object(r["translate"])("SegmentEditor_OperatorOR"),"")))},andConditionLabel:function(){return this.conditions.length?Object(r["translate"])("SegmentEditor_OperatorAND"):""},addNewAndConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","".concat(this.andConditionLabel,"")))},isLoading:function(){return m.state.value.isLoading}}});F.render=x;var K=F;
+ */var u=function(){function e(){var t=this;c(this,e),d(this,"privateState",Object(a["reactive"])({isLoading:!1,segments:[]})),d(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),d(this,"loadSegmentsAbort",void 0),d(this,"loadSegmentsPromise",void 0),d(this,"fetchedSiteId",void 0)}return s(e,[{key:"loadSegments",value:function(e,t){var n=this;if(this.loadSegmentsAbort&&(this.loadSegmentsAbort.abort(),this.loadSegmentsAbort=void 0),this.privateState.isLoading=!0,this.fetchedSiteId!==e&&(this.loadSegmentsAbort=void 0,this.fetchedSiteId=e),!this.loadSegmentsPromise){var o=void 0,i=void 0;"all"!==e&&e?e&&(o=e,i=e):(o="all",i="all"),this.loadSegmentsAbort=new AbortController,this.loadSegmentsPromise=r["AjaxHelper"].fetch({method:"API.getSegmentsMetadata",filter_limit:"-1",_hideImplementationData:0,idSites:o,idSite:i})}return this.loadSegmentsPromise.then((function(e){return n.privateState.isLoading=!1,e&&(n.privateState.segments=t?e.filter((function(e){return e.sqlSegment&&e.sqlSegment.match(/log_visit\./)})):e),n.state.value.segments})).finally((function(){n.privateState.isLoading=!1,delete n.loadSegmentsPromise}))}}]),e}(),m=new u,f={class:"segment-generator",ref:"root"},p={class:"segment-rows"},g={class:"segment-row"},v=["onClick"],h={href:"#",class:"segment-loading"},O={class:"segment-row-inputs valign-wrapper"},b={class:"segment-input metricListBlock valign-wrapper"},j={style:{width:"100%"}},S={class:"segment-input metricMatchBlock valign-wrapper"},y={style:{display:"inline-block"}},C={class:"segment-input metricValueBlock valign-wrapper"},V={class:"form-group row",style:{width:"100%"}},k={class:"input-field col s12"},w=Object(a["createElementVNode"])("span",{role:"status","aria-live":"polite",class:"ui-helper-hidden-accessible"},null,-1),E=Object(a["createElementVNode"])("div",{class:"clear"},null,-1),N={class:"segment-or"},A=["onClick"],L=["innerHTML"],_={class:"segment-and"},I=["innerHTML"];function x(e,t,n,o,i,r){var c=this,l=Object(a["resolveComponent"])("ActivityIndicator"),s=Object(a["resolveComponent"])("Field"),d=Object(a["resolveComponent"])("ValueInput");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",f,[Object(a["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.conditions,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("segmentRow".concat(n)),key:n},[Object(a["createElementVNode"])("div",p,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.orConditions,(function(n,o){var i,r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])("orCondId".concat(n.id)),key:o},[Object(a["createElementVNode"])("div",g,[Object(a["createElementVNode"])("a",{class:"segment-close",onClick:function(o){return e.removeOrCondition(t,n)}},null,8,v),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",h,null,512),[[a["vShow"],e.conditionValuesLoading[n.id]]]),Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("div",b,[Object(a["createElementVNode"])("div",j,[Object(a["createVNode"])(s,{uicontrol:"expandable-select",name:"segments","model-value":n.segment,"onUpdate:modelValue":function(t){n.segment=t,e.updateAutocomplete(n),e.computeSegmentDefinition()},title:null===(i=e.segments[n.segment])||void 0===i?void 0:i.name,"full-width":!0,options:e.segmentList},null,8,["model-value","onUpdate:modelValue","title","options"])])]),Object(a["createElementVNode"])("div",S,[Object(a["createElementVNode"])("div",y,[Object(a["createVNode"])(s,{uicontrol:"select",name:"matchType","model-value":n.matches,"onUpdate:modelValue":function(t){n.matches=t,e.computeSegmentDefinition()},"full-width":!0,options:e.matches[null===(r=e.segments[n.segment])||void 0===r?void 0:r.type]},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(a["createElementVNode"])("div",C,[Object(a["createElementVNode"])("div",V,[Object(a["createElementVNode"])("div",k,[w,Object(a["createVNode"])(d,{value:n.value,onUpdate:function(e){n.value=e,c.computeSegmentDefinition()}},null,8,["value","onUpdate"])])])]),E])]),Object(a["createElementVNode"])("div",N,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorOR")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-or",onClick:function(n){return e.addNewOrCondition(t)}},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewOrConditionLinkText)},null,8,L)])],8,A)]),Object(a["createElementVNode"])("div",_,Object(a["toDisplayString"])(e.translate("SegmentEditor_OperatorAND")),1)],2)})),128)),Object(a["createElementVNode"])("div",{class:"segment-add-row initial",onClick:t[0]||(t[0]=function(t){return e.addNewAndCondition()})},[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("a",{innerHTML:e.$sanitize(e.addNewAndConditionLinkText)},null,8,I)])])],512)}var D=n("a5a2"),B=["placeholder","title","value"];function P(e,t,n,o,i,r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{placeholder:e.translate("General_Value"),type:"text",class:"autocomplete",title:e.translate("General_Value"),autocomplete:"off",value:e.value,onKeydown:t[0]||(t[0]=function(t){return e.onKeydownOrConditionValue(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydownOrConditionValue(t)})},null,40,B)}var G=Object(a["defineComponent"])({props:{value:null},created:function(){this.onKeydownOrConditionValue=Object(r["debounce"])(this.onKeydownOrConditionValue,50)},emits:["update"],methods:{onKeydownOrConditionValue:function(e){this.$emit("update",e.target.value)}}});G.render=P;var q=G;function M(){return{metric:[{key:"==",value:Object(r["translate"])("General_OperationEquals")},{key:"!=",value:Object(r["translate"])("General_OperationNotEquals")},{key:"<=",value:Object(r["translate"])("General_OperationAtMost")},{key:">=",value:Object(r["translate"])("General_OperationAtLeast")},{key:"<",value:Object(r["translate"])("General_OperationLessThan")},{key:">",value:Object(r["translate"])("General_OperationGreaterThan")}],dimension:[{key:"==",value:Object(r["translate"])("General_OperationIs")},{key:"!=",value:Object(r["translate"])("General_OperationIsNot")},{key:"=@",value:Object(r["translate"])("General_OperationContains")},{key:"!@",value:Object(r["translate"])("General_OperationDoesNotContain")},{key:"=^",value:Object(r["translate"])("General_OperationStartsWith")},{key:"=$",value:Object(r["translate"])("General_OperationEndsWith")}]}}function T(){for(var e="",t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=1;n<=10;n+=1)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function U(e){for(var t,n,o=["==","!=","<=",">=","=@","!@","<",">","=^","=$"],i={},a=e.length,r=!1,c=0;c]+)>)/gi,""):e}var R=window,$=R.$,F=Object(a["defineComponent"])({props:{addInitialCondition:Boolean,visitSegmentsOnly:Boolean,idsite:{type:[String,Number],default:function(){return r["Matomo"].idSite}},modelValue:{type:String,default:""}},components:{ActivityIndicator:r["ActivityIndicator"],Field:D["Field"],ValueInput:q},data:function(){return{conditions:[],queriedSegments:[],matches:M(),conditionValuesLoading:{},segmentDefinition:""}},emits:["update:modelValue"],watch:{modelValue:function(e){(e||"")!==(this.segmentDefinition||"")&&this.setSegmentString(e)},conditions:{deep:!0,handler:function(){this.computeSegmentDefinition()}},segmentDefinition:function(e){(e||"")!==(this.modelValue||"")&&this.$emit("update:modelValue",e)},idsite:function(e){this.reloadSegments(e,this.visitSegmentsOnly)}},created:function(){this.matches[""]=this.matches.dimension,this.setSegmentString(this.modelValue),this.segmentDefinition=this.modelValue,this.reloadSegments(this.idsite,this.visitSegmentsOnly)},methods:{reloadSegments:function(e,t){var n=this;m.loadSegments(e,t).then((function(e){n.queriedSegments=e.map((function(e){return Object.assign(Object.assign({},e),{},{category:e.category||"Others"})})),n.addInitialCondition&&0===n.conditions.length&&n.addNewAndCondition()}))},addAndCondition:function(e){this.conditions.push(e)},addNewOrCondition:function(e){if(this.firstSegment){var t={segment:this.firstSegment,matches:this.firstMatch,value:""};this.addOrCondition(e,t)}},addOrCondition:function(e,t){var n=this;this.conditionValuesLoading[t.id]=!1,t.id=T(),e.orConditions.push(t),Object(a["nextTick"])((function(){n.updateAutocomplete(t)}))},updateAutocomplete:function(e){var t=this;this.conditionValuesLoading[e.id]=!0,$(".orCondId".concat(e.id," .metricValueBlock input"),this.$refs.root).autocomplete({source:[],minLength:0});var n=new AbortController,o=!1;r["AjaxHelper"].fetch({module:"API",format:"json",method:"API.getSuggestedValuesForSegment",segmentName:e.segment,idSite:this.idsite},{createErrorNotification:!1}).then((function(n){t.conditionValuesLoading[e.id]=!1,o=!0;var i=n;Array.isArray(i)&&(i=i.map((function(e){return"".concat(e)})));var a=$(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:i,minLength:0,select:function(n,o){n.preventDefault(),e.value=o.item.value,t.computeSegmentDefinition(),t.$forceUpdate()}}).off("click").click((function(){$(a).autocomplete("search",e.value)}))})).catch((function(){o=!0,t.conditionValuesLoading[e.id]=!1,$(".orCondId".concat(e.id," .metricValueBlock input")).autocomplete({source:[],minLength:0}).autocomplete("search",e.value)})),setTimeout((function(){o||n.abort()}),2e4)},removeOrCondition:function(e,t){var n=e.orConditions.indexOf(t);if(n>-1&&e.orConditions.splice(n,1),0===e.orConditions.length){var o=this.conditions.indexOf(e);n>-1&&this.conditions.splice(o,1)}},setSegmentString:function(e){var t=this;if(this.conditions=[],e){var n=e.split(";").map((function(e){return e.split(",")}));this.conditions=n.map((function(e){var n={orConditions:[]};return e.forEach((function(e){var o=U(e);t.addOrCondition(n,o)})),n}))}},addNewAndCondition:function(){var e={orConditions:[]};this.firstSegment&&(this.addAndCondition(e),this.addNewOrCondition(e))},computeSegmentDefinition:function(){var e="";this.conditions.forEach((function(t){if(t.orConditions.length){var n="";t.orConditions.forEach((function(e){if(e.value||e.segment||e.matches){""!==n&&(n+=",");var t=encodeURIComponent(encodeURIComponent(e.value));n+="".concat(e.segment).concat(e.matches).concat(t)}})),""!==e&&(e+=";"),e+=n}})),this.segmentDefinition=e}},computed:{firstSegment:function(){var e;return(null===(e=this.queriedSegments[0])||void 0===e?void 0:e.segment)||null},firstMatch:function(){var e=this.queriedSegments[0];return e?e.type&&this.matches[e.type]?this.matches[e.type][0].key:this.matches[""][0].key:null},segments:function(){var e={};return this.queriedSegments.forEach((function(t){e[t.segment]=t})),e},segmentList:function(){return this.queriedSegments.map((function(e){return{group:e.category,key:e.segment,value:e.name,tooltip:e.acceptedValues?H(e.acceptedValues):void 0}}))},addNewOrConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","".concat(Object(r["translate"])("SegmentEditor_OperatorOR"),"")))},andConditionLabel:function(){return this.conditions.length?Object(r["translate"])("SegmentEditor_OperatorAND"):""},addNewAndConditionLinkText:function(){return"+".concat(Object(r["translate"])("SegmentEditor_AddANDorORCondition","".concat(this.andConditionLabel,"")))},isLoading:function(){return m.state.value.isLoading}}});F.render=x;var K=F;
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue b/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue
index 042690ddf00..4c17d71442b 100644
--- a/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue
+++ b/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue
@@ -362,6 +362,10 @@ export default defineComponent({
format: 'json',
method: 'API.getSuggestedValuesForSegment',
segmentName: orCondition.segment,
+ idSite: this.idsite,
+ },
+ {
+ createErrorNotification: false, // don't show errors returned from the API in UI
},
).then((response) => {
this.conditionValuesLoading[orCondition.id!] = false;
|