OwlCyberSecurity - MANAGER
Edit File: reports.min.js
import{A as Y,h as m,m as v,n,_ as r,V as g,s as d,g as ut,y as c,H as mt,j as S,k as _t,l as z,a as F,M as ft,c as H,r as vt,o as Ct,q as U,t as R,u as wt,b as et,v as yt,i as bt,e as xt,p as kt,f as $t}from"./chunks/vendor-008d034f.min.js";import{a as Rt,i as Lt,R as Pt,D as Dt}from"./chunks/date-intervals-1516c30d.min.js";import{S as I}from"./chunks/SettingsInfoTooltip-61cb2dba.min.js";import{R as st,a as f,b as St}from"./chunks/ReportReAuth-61360c4f.min.js";import{S as rt,b as ot,c as L,g as Mt,A as Tt,U as Et,T as Ft,d as It,e as At,f as Bt,N as Nt,L as Ot}from"./chunks/index-71743d89.min.js";import{u as Ht,i as Yt,M as W,s as D}from"./chunks/index-f32ade64.min.js";import"./chunks/SlideDownUp-38353d0b.min.js";const Ut={name:"ReportOverviewLineChartApex",props:{chartData:Object,tooltipDescriptor:String,chartStyles:{type:Object,default(){return{foreColor:"#999",borderColor:"#f3f6fa",colors:["#3a93dd","#5CC0A5"],markersStrokeColor:["#3a93dd"],markersColors:["#ffffff"],markersStrokeColorHover:["#ffffff"],markersColorsHover:["#3a93dd"],fontSize:"12px",fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif'}}}},components:{apexchart:Y},methods:{chartOptions(){const s=this.chartData,t=this.tooltipDescriptor,e=this.$formatNumber,o=this.siteNotes,i=this.chartStyles,a=s.datasets?Math.min(...s.data):1;let l=this;return{chart:{type:"area",foreColor:i.foreColor,stacked:!1,dropShadow:{enabled:!0,enabledSeries:[0],top:-2,left:2,blur:5,opacity:.06},animations:{enabled:!1},toolbar:{show:!1},width:"100%",height:355,zoom:!1},padding:{left:0},colors:i.colors,stroke:{curve:"straight",width:3},dataLabels:{enabled:!1},markers:{size:4,colors:i.markersColors,strokeColor:i.markersStrokeColor,strokeWidth:1,strokeOpacity:1,fillOpacity:1,hover:{size:5,strokeColor:i.markersStrokeColorHover,colors:i.markersColorsHover}},xaxis:{type:"datetime",axisTicks:{show:!1},labels:{format:"d MMM"},tooltip:{enabled:!1}},yaxis:{tooltip:{enabled:!1},labels:{formatter(p){return a>0&&a<1?p.toFixed(1):p&&p.toFixed(0)}}},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!0}},borderColor:i.borderColor,strokeDashArray:0,position:"back",padding:{top:0,right:24,bottom:0,left:20}},tooltip:{custom({dataPointIndex:p}){let u=s.labels[p]?s.labels[p]:"0",_=e(s.data[p]),y=p>0?parseInt(s.trend[p-1]):0,w="";y===0?w="0%":y>0?w='<span class="monsterinsights-green"><span class="monsterinsights-arrow monsterinsights-up"></span>'+y+"%</span>":w='<span class="monsterinsights-red"><span class="monsterinsights-arrow monsterinsights-down"></span>'+Math.abs(y)+"%</span>";let k=s.timestamps[p]*1e3,$="";o[k]&&(o[k].forEach(function(B){$+="<span>"+B.title+"</span><br />"}),$!==""&&($='<div class="monsterinsights-reports-apex-datagraph-tooltip-sitenotes"><hr />'+$+"</div>"));let P="";if(l.date.compareReport&&l.chartData.compare&&l.chartData.compare[p]){let j=m.unix(l.chartData.compare[p][0]),B=l.chartData.compare[p][1];P=P+'<div class="monsterinsights-reports-overview-datagraph-tooltip-title monsterinsights-reports-overview-datagraph-tooltip-title-compare">'+j.format("D MMM")+'</div><div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+B+"</div>"}return'<div id="monsterinsights-chartjs-line-apex-tooltip" class="monsterinsights-line-chart-apex-tooltip top"><div class="monsterinsights-reports-datagraph-tooltip-container monsterinsights-reports-tooltip" > <div class="monsterinsights-reports-overview-datagraph-tooltip-title">'+u+'</div><div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+_+"</div>"+P+'<div class="monsterinsights-reports-overview-datagraph-tooltip-descriptor">'+t+'</div><div class="monsterinsights-reports-overview-datagraph-tooltip-trend">'+w+"</div>"+$+"</div></div>"},x:{show:!0,format:"dd MMM yyyy",formatter:void 0},style:{fontSize:i.fontSize,fontFamily:i.fontFamily}},legend:{position:"bottom",horizontalAlign:"center"},fill:{type:"solid",opacity:.15},annotations:{points:this.chartAnnotationsPoints()}}},chartSeries(){const s=this.date.intervalText;if(typeof this.chartData.data>"u")return[{name:s,data:[]}];const t=[];for(let o=0;o<this.chartData.data.length;o++)t.push([this.chartData.timestamps[o]*1e3,this.chartData.data[o]]);let e=[{name:s,data:t,zIndex:2}];if(this.date.compareReport&&this.chartData.compare){let o=[];t.forEach((i,a)=>{let l=this.chartData.compare[a]?this.chartData.compare[a][1]:0;o.push([i[0],l])}),e.push({name:this.date.intervalCompareText,data:o,zIndex:1})}return e},chartAnnotationsPoints(){let s=[];const t=this.siteNotes;for(let e in t){let o=t[e];if(!o[0])continue;let i=o[0].important,a=o[0].color?o[0].color:"#3a93dd".replace("#",""),l="";i?l='data:image/svg+xml,%3C%3Fxml version="1.0" encoding="utf-8"%3F%3E%3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 25 25" style="enable-background:new 0 0 25 25;" xml:space="preserve"%3E%3Cstyle type="text/css"%3E.st0%7Bfill:%23'+a+';%7D.st1%7Bfill:%23FFFFFF;%7D.st2%7Bfill:%23FFD74B;%7D%3C/style%3E%3Cg%3E%3Cg%3E%3Cpath class="st0" d="M22.5,0.7H2.5c-0.6,0-1.1,0.5-1.1,1v18.6c0,0.6,0.5,1,1.1,1h6.4c0.2,0,0.4,0.1,0.5,0.2l2.5,2.6 c0.3,0.3,0.8,0.3,1.1,0l2.5-2.6c0.1-0.1,0.3-0.2,0.5-0.2h6.4c0.6,0,1.1-0.5,1.1-1V1.7C23.6,1.1,23.1,0.7,22.5,0.7z"/%3E%3Cpath class="st1" d="M12.5,24.6C12.5,24.6,12.5,24.6,12.5,24.6c-0.3,0-0.6-0.1-0.8-0.3l-2.5-2.6c-0.1-0.1-0.2-0.1-0.3-0.1H2.5 c-0.8,0-1.4-0.6-1.4-1.3V1.7c0-0.7,0.6-1.3,1.4-1.3h19.9c0.8,0,1.4,0.6,1.4,1.3v18.6c0,0.7-0.6,1.3-1.4,1.3h-6.4 c-0.1,0-0.2,0-0.3,0.1l-2.5,2.6C13.1,24.5,12.8,24.6,12.5,24.6z M2.5,1C2.1,1,1.7,1.3,1.7,1.7v18.6c0,0.4,0.4,0.7,0.8,0.7h6.4 c0.3,0,0.6,0.1,0.8,0.3l2.5,2.6c0.1,0.1,0.2,0.1,0.3,0.1c0,0,0,0,0,0c0.1,0,0.2,0,0.3-0.1l2.5-2.6c0.2-0.2,0.5-0.3,0.8-0.3h6.4 c0.4,0,0.8-0.3,0.8-0.7V1.7c0-0.4-0.4-0.7-0.8-0.7H2.5z"/%3E%3C/g%3E%3Cpath class="st2" d="M13.1,4.9l1.7,3.2c0.1,0.2,0.3,0.3,0.5,0.3L19.1,9c0.6,0.1,0.8,0.7,0.4,1.1l-2.7,2.5c-0.2,0.1-0.2,0.4-0.2,0.6 l0.6,3.5c0.1,0.5-0.5,0.9-1,0.7l-3.4-1.7c-0.2-0.1-0.4-0.1-0.6,0l-3.4,1.7c-0.5,0.2-1.1-0.2-1-0.7l0.6-3.5c0-0.2,0-0.4-0.2-0.6 l-2.7-2.5C5.1,9.7,5.3,9,5.9,9l3.8-0.5c0.2,0,0.4-0.2,0.5-0.3l1.7-3.2C12.1,4.4,12.9,4.4,13.1,4.9L13.1,4.9z"/%3E%3C/g%3E%3C/svg%3E%0A':l="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2042.4%2047.9%22%20style%3D%22enable-background%3Anew%200%200%2042.4%2047.9%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E.st0%7Bfill%3A%23"+a+"%3B%7D.st1%7Bfill%3A%23FFFFFF%3B%7D%3C%2Fstyle%3E%3Cg%3E%3Cg%3E%3Cpath%20class%3D%22st0%22%20d%3D%22M38.9%2C1.6H3.5c-1.1%2C0-1.9%2C0.9-1.9%2C1.9V39c0%2C1.1%2C0.9%2C1.9%2C1.9%2C1.9h12.8l4.9%2C5.1l4.9-5.1h12.8c1.1%2C0%2C1.9-0.9%2C1.9-1.9V3.6C40.9%2C2.5%2C40%2C1.6%2C38.9%2C1.6z%22%2F%3E%3Cpath%20class%3D%22st1%22%20d%3D%22M21.2%2C46.6l-5.1-5.3H3.5c-1.3%2C0-2.3-1-2.3-2.3V3.6c0-1.3%2C1-2.3%2C2.3-2.3h35.4c1.3%2C0%2C2.3%2C1%2C2.3%2C2.3V39c0%2C1.3-1%2C2.3-2.3%2C2.3H26.3L21.2%2C46.6z%20M3.5%2C2C2.6%2C2%2C1.9%2C2.7%2C1.9%2C3.6V39c0%2C0.9%2C0.7%2C1.6%2C1.6%2C1.6h12.9l4.8%2C5l4.8-5h12.9c0.9%2C0%2C1.6-0.7%2C1.6-1.6V3.6c0-0.9-0.7-1.6-1.6-1.6H3.5z%22%2F%3E%3C%2Fg%3E%3Cg%3E%3Cg%3E%3Cpath%20class%3D%22st1%22%20d%3D%22M33.1%2C14.6H9.3c-0.6%2C0-1.2-0.6-1.2-1.2s0.5-1.2%2C1.2-1.2h23.7c0.6%2C0%2C1.2%2C0.6%2C1.2%2C1.2S33.7%2C14.6%2C33.1%2C14.6z%22%2F%3E%3C%2Fg%3E%3Cg%3E%3Cpath%20class%3D%22st1%22%20d%3D%22M33.1%2C22H9.3c-0.6%2C0-1.2-0.6-1.2-1.2s0.5-1.2%2C1.2-1.2h23.7c0.6%2C0%2C1.2%2C0.6%2C1.2%2C1.2S33.7%2C22%2C33.1%2C22z%22%2F%3E%3C%2Fg%3E%3Cg%3E%3Cpath%20class%3D%22st1%22%20d%3D%22M33.1%2C29.4H9.3c-0.6%2C0-1.2-0.6-1.2-1.2s0.5-1.2%2C1.2-1.2h23.7c0.6%2C0%2C1.2%2C0.6%2C1.2%2C1.2S33.7%2C29.4%2C33.1%2C29.4z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E",s.push({x:e,y:0,marker:0,image:{path:l}})}return s}},computed:{...v({date:"$_reports/date"}),siteNotes(){let s=this.chartData.datasets?this.chartData.notes:[];if(typeof s>"u")return[];if(s.length==0)return s;let t={...s},e=this.chartData,o=[];return Object.keys(t).forEach(i=>{const a=e.labels.indexOf(i),l=this.chartData.timestamps[a]*1e3;o[l]=[...t[i]]}),o}}};var Vt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"apexchart-overview apexchart-line-chart"},[e("apexchart",{attrs:{options:t.chartOptions(),series:t.chartSeries(),height:"355"}})],1)},Zt=[],jt=n(Ut,Vt,Zt,!1,null,null,null,null);const V=jt.exports,zt={COLORS:["#2870C8","#489DFF","#BDDEFF","#7AAEE3","#5FB2F2","#9FCAFF","#166BAF","#80B9FF","#007EFF","#DBEDFF","#4CA6BC","#5E2CEC","#CB4CD0","#F164F6","#FDC5FF","#BDE9F3","#B79EFF","#5DC8E2","#FCA4FF","#BDE2FF","#4CA6BC","#5E2CEC","#CB4CD0","#F164F6","#FDC5FF","#BDE9F3","#B79EFF","#5DC8E2","#FCA4FF","#BDE2FF"]},Wt=null,Gt=null;var qt=n(zt,Wt,Gt,!1,null,null,null,null);const Z=qt.exports,Jt={name:"ReportPieChartApex",props:{chartData:Object,height:{type:Number,required:!0},width:{type:Number,required:!0},size:{type:Number,required:!0},colors:{type:Array,required:!1},withLegend:{type:Boolean,required:!1}},components:{apexchart:Y},methods:{chartOptions(){return{chart:{type:"donut"},colors:this.chartColors(),plotOptions:{pie:{donut:{size:this.size+"%"}}},labels:this.chartLabels(),legend:{show:this.withLegend,position:"bottom",horizontalAlign:"left",offsetY:8},dataLabels:{enabled:!1},grid:{padding:{top:0,bottom:0,left:0,right:0}}}},chartSeries(){let s=[];return typeof this.chartData.values<"u"&&this.chartData.values.forEach(function(t){typeof t<"u"?s.push(t):s.push(0)}),s},chartLabels(){let s=[];return typeof this.chartData.labels<"u"&&this.chartData.labels.forEach(function(t){typeof t<"u"?s.push(t):s.push("")}),s},chartColors(){return this.colors||Z.COLORS}}};var Kt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"apexchart-overview apexchart-pie-chart"},[e("apexchart",{attrs:{options:t.chartOptions(),series:t.chartSeries(),width:t.width,height:t.height}})],1)},Qt=[],Xt=n(Jt,Kt,Qt,!1,null,null,null,null);const te=Xt.exports,ee={name:"ReportOverviewPieChartApex",components:{SettingsInfoTooltip:I,ReportPieChartApex:te},props:{chartData:[Object,Boolean],title:String,tooltip:String,legend:{type:Boolean,default:!0},id:String,enableTooltips:{type:Boolean,default:!0},cutoutPercentage:Number,width:{type:Number,default:200},height:{type:Number,default:200},size:{type:Number,default:50},icon:{default:"",type:String}},computed:{...v({date:"$_reports/date"}),titleClass(){return"monsterinsights-report-title "+this.icon},tooltipId(){return"monsterinsights-chartjs-pie-"+this.id+"-tooltip"},style(){return this.date.compareReport?"":"max-width: "+this.width+"px; max-height: "+this.width+"px;"},colors(){return Z.COLORS},chartWidth(){return this.width},chartHeight(){return this.height},chartSize(){return this.size},compareReportChartData(){if(this.date.compareReport&&this.chartData.compare){if(this.chartData.compare.length&&!this.chartData.compare.labels)return{values:this.chartData.compare,labels:this.chartData.labels};if(this.chartData.compare.values&&this.chartData.compare.labels)return this.chartData.compare}return{}}},methods:{labelBackground(s){return"background-color: "+s+";"},chartClasses(){let s="monsterinsights-reports-pie-chart";return typeof this.chartData.values<"u"&&this.chartData.values.length>7&&(s+=" --long-list"),s}}};var se=function(){var t=this,e=t._self._c;return t.chartData?e("div",{class:t.chartClasses(),attrs:{id:t.id}},[t.title?e("h3",{class:t.titleClass,domProps:{textContent:t._s(t.title)}}):t._e(),t.tooltip?e("settings-info-tooltip",{attrs:{content:t.tooltip}}):t._e(),e("div",{class:{"monsterinsights-reports-compare-pie-charts":t.date.compareReport}},[e("div",{staticClass:"monsterinsights-reports-pie-chart-holder"},[t.date.compareReport?e("p",{staticClass:"monsterinsights-reports-pie-chart-holder-compare-date"},[t._v(" "+t._s(t.date.intervalText)+" ")]):t._e(),e("div",{staticClass:"monsterinsights-reports-pie-chart-and-legend"},[e("report-pie-chart-apex",{staticClass:"monsterinsights-pie-chart",style:t.style,attrs:{"chart-data":t.chartData,width:t.chartWidth,height:t.chartHeight,size:t.chartSize}}),t.legend?e("ul",{staticClass:"monsterinsights-pie-chart-legend"},t._l(t.chartData.values,function(o,i){return e("li",{key:i},[e("span",{staticClass:"monsterinsights-pie-chart-legend-color",style:t.labelBackground(t.colors[i])}),e("span",{staticClass:"monsterinsights-pie-chart-legend-text-and-value"},[e("span",{staticClass:"monsterinsights-pie-chart-legend-text",domProps:{textContent:t._s(t.chartData.labels[i])}}),e("span",{staticClass:"monsterinsights-pie-chart-legend-value"},[t._v(" "+t._s(o||0)+"% ")])])])}),0):t._e()],1),e("div",{staticClass:"monsterinsights-pie-chart-tooltip",attrs:{id:t.tooltipId}})]),t.date.compareReport?e("div",{staticClass:"monsterinsights-reports-pie-chart-holder monsterinsights-reports-compare-pie-chart-holder"},[e("p",{staticClass:"monsterinsights-reports-pie-chart-holder-compare-date"},[t._v(" "+t._s(t.date.intervalCompareText)+" ")]),e("div",{staticClass:"monsterinsights-reports-pie-chart-and-legend"},[e("report-pie-chart-apex",{staticClass:"monsterinsights-pie-chart",style:t.style,attrs:{"chart-data":t.compareReportChartData,width:t.chartWidth,height:t.chartHeight,size:t.chartSize}}),t.legend?e("ul",{staticClass:"monsterinsights-pie-chart-legend"},t._l(t.compareReportChartData.values,function(o,i){return e("li",{key:i},[e("span",{staticClass:"monsterinsights-pie-chart-legend-color",style:t.labelBackground(t.colors[i])}),e("span",{staticClass:"monsterinsights-pie-chart-legend-text-and-value"},[e("span",{staticClass:"monsterinsights-pie-chart-legend-text",domProps:{textContent:t._s(t.chartData.labels[i])}}),e("span",{staticClass:"monsterinsights-pie-chart-legend-value"},[t._v(" "+t._s(o||0)+"% ")])])])}),0):t._e()],1),e("div",{staticClass:"monsterinsights-pie-chart-tooltip",attrs:{id:t.tooltipId}})]):t._e()])],1):t._e()},re=[],oe=n(ee,se,re,!1,null,null,null,null);const it=oe.exports,ie={name:"ReportsPagination",props:{limit:Number,length:Number},data(){return{currentLimit:this.limit,text_show:r("Show","google-analytics-for-wordpress"),text_all:r("All","google-analytics-for-wordpress")}},methods:{sendUpdate(s){this.currentLimit=s,this.$emit("updated",s)},getButtonClass(s){let t="monsterinsights-button";return s===this.currentLimit&&(t+=" monsterinsights-selected-interval"),t}}};var ae=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-table-box-pagination"},[e("span",{domProps:{textContent:t._s(t.text_show)}}),e("div",{staticClass:"monsterinsights-buttons-toggle"},[e("button",{class:t.getButtonClass(10),on:{click:function(o){return t.sendUpdate(10)}}},[t._v(" 10 ")]),t.length>10?e("button",{class:t.getButtonClass(25),on:{click:function(o){return t.sendUpdate(25)}}},[t._v(" 25 ")]):t._e(),t.length>25?e("button",{class:t.getButtonClass(50),on:{click:function(o){return t.sendUpdate(50)}}},[t._v(" 50 ")]):t._e(),t.length>50?e("button",{class:t.getButtonClass(t.length),on:{click:function(o){return t.sendUpdate(t.length)}}},[t._v(" "+t._s(t.text_all)+" ")]):t._e()])])},ne=[],le=n(ie,ae,ne,!1,null,null,null,null);const at=le.exports,ce={name:"ReportListBox",components:{ReportsPagination:at,SettingsInfoTooltip:I},props:{title:String,id:String,tooltip:String,rows:Array,icon:{default:"",type:String},withPagination:{default:!0,type:Boolean}},data(){return{limit:10,text_date_1:r("Date 1","google-analytics-for-wordpress"),text_date_2:r("Date 2","google-analytics-for-wordpress")}},computed:{...v({date:"$_reports/date"}),componentClass(){let s="monsterinsights-table-box";return this.paginate&&(s+=" monsterinsights-has-pagination"),s},titleClass(){let s="monsterinsights-report-title ";return this.icon&&(s+=this.icon),this.paginate&&(s+=" monsterinsights-has-pagination"),s},paginate(){return this.withPagination&&this.rows.length>10},tableRows(){let s=[...this.rows];if(s.length<10)for(;s.length<10;)s.push({number:"",text:"",right:""});return s=s.slice(0,this.limit),s}},methods:{hasButtonSlot(){return this.$slots.button},changeLimit(s){this.limit=s},compareChange(s){if(typeof s.compare_change>"u")return"";let t=s.compare_change>0?"up":"down",e=s.compare_change>0?"green":"red";return'<span class="monsterinsights-arrow monsterinsights-'+t+" monsterinsights-"+e+'"></span> '+Math.abs(s.compare_change)+"%"}}};var pe=function(){var t=this,e=t._self._c;return e("div",{class:t.componentClass,attrs:{id:t.id}},[t.title?e("h3",{class:t.titleClass,domProps:{textContent:t._s(t.title)}}):t._e(),t.tooltip?e("settings-info-tooltip",{attrs:{content:t.tooltip}}):t._e(),e("div",{staticClass:"monsterinsights-table-box-list"},[t.date.compareReport&&t.rows.length?[e("ul",{staticClass:"monsterinsights-table-box-list-compare-date-legends"},[e("li",[e("strong",{domProps:{textContent:t._s(t.text_date_1)}}),t._v(": "+t._s(t.date.intervalText))]),e("li",[e("strong",{domProps:{textContent:t._s(t.text_date_2)}}),t._v(": "+t._s(t.date.intervalCompareText))])]),e("div",{staticClass:"monsterinsights-table-box-list-compare-thead"},[e("div",{staticClass:"monsterinsights-table-box-list-compare-th monsterinsights-table-box-list-compare-th-text"}),e("div",{staticClass:"monsterinsights-table-box-list-compare-th monsterinsights-table-box-list-compare-th-date"},[t._v(" "+t._s(t.text_date_1)+" ")]),e("div",{staticClass:"monsterinsights-table-box-list-compare-th monsterinsights-table-box-list-compare-th-date"},[t._v(" "+t._s(t.text_date_2)+" ")]),e("div",{staticClass:"monsterinsights-table-box-list-compare-th monsterinsights-table-box-list-compare-th-change"},[t._v(" Change% ")])])]:t._e(),t._l(t.tableRows,function(o,i){return e("div",{key:i,class:{"monsterinsights-table-list-item":!0,"monsterinsights-table-list-item-compare":t.date.compareReport}},[e("div",{staticClass:"monsterinsights-table-list-item-td-text"},[e("span",{staticClass:"monsterinsights-reports-list-count",domProps:{textContent:t._s(o.number)}}),e("span",{staticClass:"monsterinsights-reports-list-text",domProps:{innerHTML:t._s(o.text)}})]),e("div",{staticClass:"monsterinsights-table-list-item-td-number"},[e("span",{staticClass:"monsterinsights-reports-list-number",domProps:{innerHTML:t._s(o.number?t.$formatNumber(o.right):"")}})]),t.date.compareReport?e("div",{staticClass:"monsterinsights-table-list-item-td-number"},[e("span",{staticClass:"monsterinsights-reports-list-number",domProps:{innerHTML:t._s(typeof o.compare_value>"u"?"":t.$formatNumber(o.compare_value))}})]):t._e(),t.date.compareReport?e("div",{staticClass:"monsterinsights-table-list-item-td-change",domProps:{innerHTML:t._s(t.compareChange(o))}}):t._e()])})],2),t.hasButtonSlot()||t.paginate?e("div",{staticClass:"monsterinsights-table-box-footer"},[t._t("button"),t.paginate?e("reports-pagination",{attrs:{limit:t.limit,length:t.rows.length},on:{updated:t.changeLimit}}):t._e()],2):t._e()],1)},de=[],he=n(ce,pe,de,!1,null,null,null,null);const ge=he.exports;g.directive("click-outside",{bind:function(s,t,e){s.clickOutsideEvent=function(o){s===o.target||s.contains(o.target)||e.context[t.expression](o)},document.body.addEventListener("click",s.clickOutsideEvent)},unbind:function(s){document.body.removeEventListener("click",s.clickOutsideEvent)}});const ue={name:"ReportsPdfExport",props:{buttonText:{type:String,default:r("Export PDF Report","google-analytics-for-wordpress")}},data(){return{dropdownVisible:!1,text_upgrade:r("Upgrade to PRO","google-analytics-for-wordpress"),upgrade_url:this.$getUpgradeUrl("reports","pdfexport"),text_customize_date:r("You can export PDF reports only in the PRO version.","google-analytics-for-wordpress")}},computed:{dropdownClass(){let s="monsterinsights-reports-intervals-dropdown";return this.dropdownVisible||(s+=" monsterinsights-hide"),s}},methods:{maybeHideDropdown(){this.dropdownVisible&&(this.dropdownVisible=!1)}}};var me=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-export-pdf-report monsterinsights-export-pdf-report-lite"},[e("div",{staticClass:"monsterinsights-reports-interval-dropdown-container"},[e("button",{class:["monsterinsights-button"],domProps:{innerHTML:t._s(t.buttonText)},on:{click:function(o){o.stopPropagation(),t.dropdownVisible=!t.dropdownVisible}}}),e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.maybeHideDropdown,expression:"maybeHideDropdown"}],class:t.dropdownClass},[e("div",{staticClass:"monsterinsights-lite-datepicker"},[e("p",{domProps:{innerHTML:t._s(t.text_customize_date)}}),e("a",{staticClass:"monsterinsights-button monsterinsights-button-text",attrs:{href:t.upgrade_url,target:"_blank"}},[e("span",{domProps:{textContent:t._s(t.text_upgrade)}}),e("i",{staticClass:"monstericon-long-arrow-right-light"})])])])])])},_e=[],fe=n(ue,me,_e,!1,null,null,null,null);const ve=fe.exports,Ce={name:"ReportUpsellInline",props:{title:String}};var we=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-report-box monsterinsights-upsell-inline"},[e("div",{staticClass:"monsterinsights-upsell-inline-content"},[e("h3",{domProps:{textContent:t._s(t.title)}}),e("div",{staticClass:"monsterinsights-upsell-content"},[t._t("default")],2)])])},ye=[],be=n(Ce,we,ye,!1,null,null,null,null);const xe=be.exports,ke={name:"ReportOverviewUpsell",components:{ReportUpsellInline:xe},data(){return{text_upsell_title:r("Upgrade to MonsterInsights Pro to Unlock More Actionable Insights","google-analytics-for-wordpress"),text_upsell_content_1:r("It's easy to double your traffic and sales when you know exactly how people find and use your website. MonsterInsights Pro shows you the stats that matter!","google-analytics-for-wordpress"),text_upsell_content_2:r("Upgrade to MonsterInsights Pro and Save 50% OFF!","google-analytics-for-wordpress"),text_upsell_content_3:d(r("Use coupon code %1$sLITEUPGRADE%2$s","google-analytics-for-wordpress"),"<b>","</b>"),text_upsell_button:r("Upgrade to MonsterInsights Pro","google-analytics-for-wordpress"),upgrade_link:this.$getUpgradeUrl("report","overview")}}};var $e=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-report-row monsterinsights-overview-upsell-desktop"},[e("report-upsell-inline",{attrs:{title:t.text_upsell_title}},[e("p",{domProps:{textContent:t._s(t.text_upsell_content_1)}}),e("p",[e("span",{staticClass:"monsterinsights-green-text"},[e("b",{domProps:{innerHTML:t._s(t.text_upsell_content_2)}})]),e("br"),e("span",{staticClass:"monsterinsights-light",domProps:{innerHTML:t._s(t.text_upsell_content_3)}})]),e("a",{staticClass:"monsterinsights-button monsterinsights-button-green",attrs:{href:t.upgrade_link,target:"_blank"},domProps:{textContent:t._s(t.text_upsell_button)}})])],1)},Re=[],Le=n(ke,$e,Re,!1,null,null,null,null);const Pe=Le.exports;g.directive("click-outside",{bind:function(s,t,e){s.clickOutsideEvent=function(o){s===o.target||s.contains(o.target)||e.context[t.expression](o)},document.body.addEventListener("click",s.clickOutsideEvent)},unbind:function(s){document.body.removeEventListener("click",s.clickOutsideEvent)}});const De={name:"ReportsDatePicker",data(){return{dropdownVisible:!1,text_30_days:r("Last 30 days","google-analytics-for-wordpress"),text_customize_date:d(r("You can customize your %sdate range only in the PRO version.","google-analytics-for-wordpress"),"<br />"),text_upgrade:r("Upgrade to PRO","google-analytics-for-wordpress"),upgrade_url:this.$getUpgradeUrl("reports","datepicker")}},computed:{...v({date:"$_reports/date",activeReport:"$_reports/activeReport"}),selectedIntervalText(){return this.getIntervalFormatted(this.text_30_days,m().subtract(30,"days"),m().subtract(1,"days"))},local_date(){return this.date.text},dropdownClass(){let s="monsterinsights-reports-intervals-dropdown";return this.dropdownVisible||(s+=" monsterinsights-hide"),s}},methods:{getFormattedDate(s){if(s instanceof Date){let t=this.addLeadingZero(s.getMonth()+1),e=this.addLeadingZero(s.getDate());s=s.getFullYear()+"-"+t+"-"+e}return s},addLeadingZero(s){return s<10&&s>0?0+s.toString():s},getInterval(s,t,e,o){this.dropdownVisible=!1,this.interval=o,this.$store.commit("$_reports/UPDATE_DATE",{start:s.format("YYYY-MM-DD"),end:t.format("YYYY-MM-DD")}),window.blur(),this.$store.dispatch("$_reports/getReportData",this.activeReport),this.local_date=""},getIntervalText(s,t){return s.format("YYYYMMDD")===t.format("YYYYMMDD")?s.format("MMMM D, YYYY"):s.format("MMMM D")+" - "+t.format("MMMM D, YYYY")},getIntervalFormatted(s,t,e){return"<b>"+s+":</b> "+this.getIntervalText(t,e)},getButtonClass(s){let t="monsterinsights-button";return s===this.interval&&(t+=" monsterinsights-selected-interval"),t},maybeHideDropdown(){this.dropdownVisible&&(this.dropdownVisible=!1)}}};var Se=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-reports-datepicker"},[e("div",{staticClass:"monsterinsights-reports-interval-dropdown-container"},[e("button",{staticClass:"monsterinsights-reports-interval-date-info",on:{click:function(o){o.stopPropagation(),t.dropdownVisible=!t.dropdownVisible}}},[e("span",{domProps:{innerHTML:t._s(t.selectedIntervalText)}}),e("i",{staticClass:"monstericon-calendar-alt"})]),e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.maybeHideDropdown,expression:"maybeHideDropdown"}],class:t.dropdownClass},[e("div",{staticClass:"monsterinsights-lite-datepicker"},[e("p",{domProps:{innerHTML:t._s(t.text_customize_date)}}),e("a",{staticClass:"monsterinsights-button monsterinsights-button-text",attrs:{href:t.upgrade_url,target:"_blank"}},[e("span",{domProps:{textContent:t._s(t.text_upgrade)}}),e("i",{staticClass:"monstericon-long-arrow-right-light"})])])])])])},Me=[],Te=n(De,Se,Me,!1,null,null,null,null);const Ee=Te.exports,Fe={name:"ReportOverviewUpsellMobile",data(){return{text_upsell_title:d(r("Upgrade to Pro and unlock addons and other great features. %1$sSave 50%% automatically!%2$s","google-analytics-for-wordpress"),'<span class="monsterinsights-green-text"><b>',"</b></span>"),text_upsell_button:r("Upgrade Now","google-analytics-for-wordpress"),upgrade_link:this.$getUpgradeUrl("report","overview-mobile")}}};var Ie=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-report-row monsterinsights-mobile-upsell"},[e("div",{staticClass:"monsterinsights-notice monsterinsights-notice-success"},[e("div",{staticClass:"monsterinsights-notice-inner"},[e("span",{domProps:{innerHTML:t._s(t.text_upsell_title)}}),e("div",{staticClass:"monsterinsights-notice-button"},[e("a",{staticClass:"monsterinsights-button monsterinsights-button-green",attrs:{href:t.upgrade_link,target:"_blank",rel:"noopener"},domProps:{textContent:t._s(t.text_upsell_button)}})])])])])},Ae=[],Be=n(Fe,Ie,Ae,!1,null,null,null,null);const Ne=Be.exports,Oe={name:"SiteNotesMediaIconField"};var He=function(){var t=this;return t._self._c,t._e()},Ye=[],Ue=n(Oe,He,Ye,!1,null,null,null,null);const Ve=Ue.exports,Ze={name:"SiteNotesOverviewList",components:{Fragment:ut,SiteNotesDatePickerField:rt,SiteNotesMediasField:ot,SiteNotesMediaIconField:Ve},data(){return{notes:[],notes_all_count:0,notes_important_count:0,filters:{important:null,date_range:{start:null,end:null,interval:"last30days"}},showProgressBar:!1,texts:{note_date:r("Date","google-analytics-for-wordpress"),note_title:r("Site Note","google-analytics-for-wordpress"),note_category:r("Category","google-analytics-for-wordpress"),show:r("Show:","google-analytics-for-wordpress"),all:r("All","google-analytics-for-wordpress"),important:r("Important","google-analytics-for-wordpress"),add_new:r("+ Add New Site Note","google-analytics-for-wordpress"),empty:r("There aren’t any site notes. Go ahead and create one!","google-analytics-for-wordpress"),edit:r("Edit","google-analytics-for-wordpress"),selectCategories:r("Select Category","google-analytics-for-wordpress"),save_changes:r("Save Changes","google-analytics-for-wordpress"),cancel:r("Cancel","google-analytics-for-wordpress")},selectedNote:null,isSaving:!1,noteCategories:[],selectedCategory:null}},computed:{...v({date:"$_reports/date"}),starClasses(){return"monsterinsights-star"+(this.selectedNote.important?"":"-empty")},categoryChoices(){return this.noteCategories?this.noteCategories.map(s=>(s.text=s.name,s.handle=this.selectCategory,s)):[]}},methods:{toggleImportant(s){let t=s;s.important?t.important=!1:t.important=!0,L.saveNote(t).then(()=>{this.fetchNotes({},!0)})},importantClass(s){return"monsterinsights-star"+(s.important?"":"-empty")},categoryStyle(s){return{backgroundColor:s.category&&s.category.background_color?s.category.background_color:"#E2EFFB"}},fetchNotes(s,t){t||(this.showProgressBar=!0),this.filters.date_range=this.date;const e=Object.assign({orderby:"id",order:"asc",per_page:"-1",filter:this.filters},s);L.getNotes(e).then(o=>{this.notes=[],this.notes_all_count=o.pagination.total_published?o.pagination.total_published:0,this.notes_important_count=o.pagination.total_important?o.pagination.total_important:0,this.notes=o.items}).finally(()=>{t||(this.showProgressBar=!1)})},removeFilters(){this.filters.important=null,this.fetchNotes()},filterImportant(){this.filters.important=!0,this.fetchNotes()},AddNewClick(){this.$emit("monsterinsights-site-notes-overview-show-create")},filtersClass(s=null){return s===this.filters.important?"selected":""},toggleStar(){this.selectedNote.important=!this.selectedNote.important},fetchCategories(s){const t=Object.assign({page:1,orderby:"name",order:"asc",select:["name"]},s);L.getCategories(t).then(e=>{this.noteCategories=e.items})},saveNote(){this.isSaving=!0,L.saveNote(this.selectedNote).then(()=>{this.fetchNotes(),this.$store.dispatch("$_reports/getReportData","overview").then(()=>{this.$emit("refresh-overview-report")})}).finally(()=>{this.isSaving=!1,this.cancelEdit()})},cancelEdit(){this.selectedNote={id:null,note_title:"",category:null,note_date:null,note_date_ymd:null,important:!1,medias:[]}},selectCategory(s){this.selectedNote.category=s},formatDate(s,t="YYYY-MM-DD"){return m(new Date(s)).format(t)}},watch:{date:{handler(){this.fetchNotes()},deep:!0}},mounted(){this.fetchNotes(),this.fetchCategories()}};var je=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"monsterinsights-overview-notes__header"},[e("div",{staticClass:"monsterinsights-overview-notes__header-left"},[e("div",{staticClass:"monsterinsights-overview-notes__header-left-links"},[t._v(" "+t._s(t.texts.show)+" "),e("a",{class:t.filtersClass(),attrs:{href:"#"},on:{click:function(o){return o.preventDefault(),t.removeFilters()}}},[e("span",{staticClass:"text",domProps:{textContent:t._s(t.texts.all)}}),t._v(" "),e("span",{domProps:{textContent:t._s(`(${t.notes_all_count})`)}})]),e("a",{class:t.filtersClass(!0),attrs:{href:"#"},on:{click:function(o){return o.preventDefault(),t.filterImportant()}}},[e("span",{staticClass:"text important",domProps:{textContent:t._s(t.texts.important)}}),t._v(" "),e("span",{domProps:{textContent:t._s(`(${t.notes_important_count})`)}})])])]),e("div",{staticClass:"monsterinsights-overview-notes__header-right"},[e("button",{staticClass:"monsterinsights-button",domProps:{textContent:t._s(t.texts.add_new)},on:{click:t.AddNewClick}})])]),e("div",{staticClass:"monsterinsights-overview-notes__body"},[e("div",{staticClass:"monsterinsights-overview-notes__body-list"},[t.showProgressBar?e("div",{staticClass:"monsterinsights-loader"}):t._e(),t.showProgressBar?t._e():e("table",{staticClass:"monsterinsights-overview-notes__body-list-table"},[e("thead",[e("tr",[e("th",{domProps:{textContent:t._s(t.texts.note_date)}}),e("th",{domProps:{textContent:t._s(t.texts.note_title)}}),e("th",{domProps:{textContent:t._s(t.texts.note_category)}})])]),e("tbody",[t._l(t.notes,function(o){return e("fragment",{key:o.id},[e("tr",[e("td",{staticClass:"monsterinsights-overview-notes__body-list-table-column-notedate"},[e("div",{staticClass:"monsterinsights-flex-container"},[e("div",{staticClass:"monsterinsights-flex-container",staticStyle:{"flex-grow":"1"}},[e("a",{staticClass:"monsterinsights-toggle-note-important",attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleImportant(o)}}},[e("div",{class:t.importantClass(o)})]),e("div",{domProps:{textContent:t._s(t.formatDate(o.note_date,"DD MMM"))}})]),e("site-notes-media-icon-field",{attrs:{medias:o.medias}})],1)]),e("td",{staticClass:"monsterinsights-overview-notes__body-list-table-column-note"},[e("div",{staticClass:"monsterinsights-flex-container"},[e("div",{domProps:{innerHTML:t._s(o.note_title)}}),e("a",{staticClass:"monsterinsights-overview-notes__body-list-table-column-note-edit",attrs:{href:"#"},domProps:{textContent:t._s(t.texts.edit)},on:{click:function(i){i.preventDefault(),t.selectedNote={...o}}}})])]),e("td",{staticClass:"monsterinsights-overview-notes__body-list-table-column-notecategory"},[o.category&&o.category.background_color?e("span",{staticClass:"monsterinsights-category-with-bg",style:{backgroundColor:o.category.background_color},domProps:{textContent:t._s(o.category?o.category.name:"")}}):e("span",{staticClass:"monsterinsights-category-without-bg",domProps:{textContent:t._s(o.category?o.category.name:"")}})])]),t.selectedNote&&t.selectedNote.id===o.id?e("tr",{staticClass:"edit-row"},[e("td",{staticClass:"monsterinsights-overview-notes__body-list-table-column-notedate"},[e("div",{staticClass:"monsterinsights-flex-container"},[e("a",{class:t.starClasses,attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleStar()}}}),e("site-notes-date-picker-field",{attrs:{disabled:t.isSaving},model:{value:t.selectedNote.note_date_ymd,callback:function(i){t.$set(t.selectedNote,"note_date_ymd",i)},expression:"selectedNote.note_date_ymd"}})],1)]),e("td",{staticClass:"monsterinsights-overview-notes__body-list-table-column-note"},[e("div",{staticClass:"monsterinsights-flex-container"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.selectedNote.note_title,expression:"selectedNote.note_title"}],attrs:{disabled:t.isSaving,rows:"1"},domProps:{value:t.selectedNote.note_title},on:{input:function(i){i.target.composing||t.$set(t.selectedNote,"note_title",i.target.value)}}}),e("site-notes-medias-field",{attrs:{"show-label":!1},model:{value:t.selectedNote.medias,callback:function(i){t.$set(t.selectedNote,"medias",i)},expression:"selectedNote.medias"}})],1),e("div",{staticClass:"monsterinsights-buttons"},[e("button",{staticClass:"monsterinsights-button",domProps:{textContent:t._s(t.texts.save_changes)},on:{click:t.saveNote}}),e("a",{staticClass:"monsterinsights-button monsterinsights-button-secondary",attrs:{href:"#"},domProps:{textContent:t._s(t.texts.cancel)},on:{click:function(i){return i.preventDefault(),t.cancelEdit.apply(null,arguments)}}})])]),e("td",{staticClass:"monsterinsights-overview-notes__body-list-table-column-notecategory"},[e("select",{directives:[{name:"model",rawName:"v-model",value:o.category.id,expression:"note.category.id"}],on:{change:function(i){var a=Array.prototype.filter.call(i.target.options,function(l){return l.selected}).map(function(l){var h="_value"in l?l._value:l.value;return h});t.$set(o.category,"id",i.target.multiple?a:a[0])}}},[e("option",{attrs:{value:"0"},domProps:{textContent:t._s(t.texts.selectCategories)}}),t._l(t.noteCategories,function(i,a){return e("option",{key:a,domProps:{value:i.id,textContent:t._s(i.name)}})})],2)])]):t._e()])}),t.notes.length<=0&&!t.showProgressBar?e("tr",[e("td",{attrs:{colspan:"3"}},[e("div",{staticClass:"monsterinsights-overview-notes__body-list-table-empty",domProps:{textContent:t._s(t.texts.empty)}})])]):t._e()],2)])])])])},ze=[],We=n(Ze,je,ze,!1,null,null,null,null);const Ge=We.exports,qe={name:"SiteNotesOverviewCreate",components:{SiteNotesMediasField:ot,SiteNotesDatePickerField:rt},data(){return{note:{id:null,note_title:"",category:{id:0},note_date:null,note_date_ymd:null,important:!1,medias:{}},texts:{note_date:r("Date","google-analytics-for-wordpress"),note_title:r("Site Note","google-analytics-for-wordpress"),note_category:r("Category","google-analytics-for-wordpress"),selectCategories:r("Select Category","google-analytics-for-wordpress"),save_changes:r("Add Site Note","google-analytics-for-wordpress"),site_notes:r("Site Notes","google-analytics-for-wordpress"),add_new:r("Add New","google-analytics-for-wordpress"),edit:r("Edit Note","google-analytics-for-wordpress"),cancel:r("Cancel","google-analytics-for-wordpress")},noteCategories:[],message:"",isEdit:!1,isSaving:!1}},methods:{fetchCategories(s){const t=Object.assign({page:1,orderby:"name",order:"asc",select:["name"]},s);L.getCategories(t).then(e=>{this.noteCategories=e.items})},saveNote(){this.isSaving=!0,L.saveNote(this.note).then(()=>{this.$store.dispatch("$_reports/getReportData","overview").then(()=>{this.$emit("refresh-overview-report")})}).finally(()=>{this.isSaving=!1,this.note={id:null,note_title:"",category:{id:0},note_date:null,note_date_ymd:null,important:!1,medias:{}},this.updateDatepickerDate()})},toggleStar(){this.note.important=!this.note.important},showListClick(){this.$emit("monsterinsights-site-notes-overview-show-list")},isPro(){return this.$isPro()},updateDatepickerDate(){this.date.end===""?this.note.note_date_ymd=m().subtract(1,"day").format("YYYY-MM-DD"):this.note.note_date_ymd=this.date.end}},computed:{...v({date:"$_reports/date"}),starClasses(){return"monsterinsights-star"+(this.note.important?"":"-empty")},datepickerEndDate(){return this.date.end}},mounted(){this.fetchCategories(),this.updateDatepickerDate()},watch:{datepickerEndDate(){this.updateDatepickerDate()}}};var Je=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"monsterinsights-overview-notes__header"},[e("div",{staticClass:"monsterinsights-overview-notes__header-left"}),e("div",{staticClass:"monsterinsights-overview-notes__header-right"},[e("div",{staticClass:"monsterinsights-button-group"},[e("button",{staticClass:"monsterinsights-button monsterinsights-button-secondary",domProps:{textContent:t._s(t.texts.cancel)},on:{click:t.showListClick}}),e("button",{staticClass:"monsterinsights-button",domProps:{textContent:t._s(t.texts.save_changes)},on:{click:t.saveNote}})])])]),e("div",{staticClass:"monsterinsights-overview-notes__body"},[e("table",{staticClass:"monsterinsights-site-notes-create__table",class:t.isSaving?"loading":""},[e("thead",[e("tr",[e("th",{domProps:{textContent:t._s(t.texts.note_date)}}),e("th",{domProps:{textContent:t._s(t.texts.note_title)}}),e("th",{domProps:{textContent:t._s(t.texts.note_category)}})])]),e("tbody",[e("tr",[e("td",{staticClass:"monsterinsights-site-notes-create__table-column-notedate"},[e("div",{staticClass:"monsterinsights-flex-container"},[e("a",{class:t.starClasses,attrs:{href:"#"},on:{click:function(o){return o.preventDefault(),t.toggleStar()}}}),e("site-notes-date-picker-field",{attrs:{disabled:t.isSaving},model:{value:t.note.note_date_ymd,callback:function(o){t.$set(t.note,"note_date_ymd",o)},expression:"note.note_date_ymd"}})],1)]),e("td",{staticClass:"monsterinsights-site-notes-create__table-column-note"},[e("div",{staticClass:"monsterinsights-flex-container"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.note.note_title,expression:"note.note_title"}],attrs:{disabled:t.isSaving,rows:"1"},domProps:{value:t.note.note_title},on:{input:function(o){o.target.composing||t.$set(t.note,"note_title",o.target.value)}}}),e("site-notes-medias-field",{attrs:{"show-label":!1},model:{value:t.note.medias,callback:function(o){t.$set(t.note,"medias",o)},expression:"note.medias"}})],1)]),e("td",{staticClass:"monsterinsights-site-notes-create__table-column-notecategory"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.note.category.id,expression:"note.category.id"}],on:{change:function(o){var i=Array.prototype.filter.call(o.target.options,function(a){return a.selected}).map(function(a){var l="_value"in a?a._value:a.value;return l});t.$set(t.note.category,"id",o.target.multiple?i:i[0])}}},[e("option",{attrs:{value:"0"},domProps:{textContent:t._s(t.texts.selectCategories)}}),t._l(t.noteCategories,function(o,i){return e("option",{key:i,domProps:{value:o.id,textContent:t._s(o.name)}})})],2)])])])])])])},Ke=[],Qe=n(qe,Je,Ke,!1,null,null,null,null);const Xe=Qe.exports,ts={name:"SiteNotesOverview",components:{SiteNotesOverviewList:Ge,SiteNotesOverviewCreate:Xe},data(){return{toggle_list_add:!0,texts:{}}},computed:{},methods:{showListClick(){this.toggle_list_add=!0},AddNewClick(){this.toggle_list_add=!1},siteNoteSaved(){this.showListClick(),this.$emit("refresh-overview-report")}},mounted(){}};var es=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-overview-notes"},[t.toggle_list_add?e("site-notes-overview-list",{on:{"monsterinsights-site-notes-overview-show-create":t.AddNewClick,"refresh-overview-report":t.siteNoteSaved}}):t._e(),t.toggle_list_add?t._e():e("site-notes-overview-create",{on:{"monsterinsights-site-notes-overview-show-list":t.showListClick,"refresh-overview-report":t.siteNoteSaved}})],1)},ss=[],rs=n(ts,es,ss,!1,null,null,null,null);const os=rs.exports,is={name:"ReportOverview",mixins:[Mt],components:{ReportOverviewUpsellMobile:Ne,ReportOverviewDatePicker:Ee,ReportOverviewUpsell:Pe,ReportListBox:ge,ReportsPdfExport:ve,ReportOverviewPieChartApex:it,ReportInfobox:st,ReportOverviewLineChartApex:V,SiteNotesOverview:os},computed:{...v({overview:"$_reports/overview",date:"$_reports/date",license:"$_license/license",license_network:"$_license/license_network"}),gaLinks(){return!!this.overview.galinks},infoboxRange(){return this.overview.infobox&&this.overview.infobox.range?this.overview.infobox.range:0},infoboxSessionsData(){return this.infoboxData("sessions")},infoboxPageviewsData(){return this.infoboxData("pageviews")},infoboxDurationData(){return this.infoboxData("duration")},infoboxBounceData(){return this.infoboxData("bounce_rate",!0)},infoboxTotalUsersData(){return this.infoboxData("totalusers")},infoboxNewUsersData(){return this.infoboxData("new_users")},newVsReturningData(){if(this.overview.newvsreturn){let s={values:[this.overview.newvsreturn.new,this.overview.newvsreturn.returning],labels:[r("New","google-analytics-for-wordpress"),r("Returning","google-analytics-for-wordpress")]};return this.date.compareReport&&(this.overview.newvsreturn.compare?s.compare=[this.overview.newvsreturn.compare.new,this.overview.newvsreturn.compare.returning]:s.compare=s.values),s}return{values:[],labels:[]}},devicesData(){if(this.overview.devices){let s={values:[this.overview.devices.desktop,this.overview.devices.tablet,this.overview.devices.mobile],labels:[r("Desktop","google-analytics-for-wordpress"),r("Tablet","google-analytics-for-wordpress"),r("Mobile","google-analytics-for-wordpress")]};return this.date.compareReport&&(this.overview.compare&&this.overview.compare.devices?s.compare=[this.overview.compare.devices.desktop,this.overview.compare.devices.tablet,this.overview.compare.devices.mobile]:s.compare=s.values),s}return{values:[],labels:[]}},countriesData(){let s=[],t=0;return this.overview.countries&&this.overview.countries.forEach(function(e){t++,s.push({number:t+".",text:'<span class="monsterinsights-flag monsterinsights-flag-'+e.iso.toLowerCase()+'"></span> '+e.name,right:e.sessions,compare_value:typeof e.compare_sessions>"u"?e.sessions:e.compare_sessions,compare_change:typeof e.compare_change>"u"?100:e.compare_change})}),s},referralsData(){let s=[],t=0;return this.overview.referrals&&this.overview.referrals.forEach(function(e){t++,s.push({number:t+".",text:'<img src="https://www.google.com/s2/favicons?domain=http://'+e.url+'" />'+e.url,right:e.sessions,compare_value:typeof e.compare_sessions>"u"?e.sessions:e.compare_sessions,compare_change:typeof e.compare_change>"u"?100:e.compare_change})}),s},topPostsData(){let s=[],t=0;return this.overview.toppages&&this.overview.toppages.forEach(function(e){t++;let o=e.hostname?'<a href="'+e.hostname+e.url+'" target="_blank" rel="noreferrer noopener">'+e.title+"</a>":e.title;s.push({number:t+".",text:o,right:e.sessions,compare_value:typeof e.compare_sessions>"u"?e.sessions:e.compare_sessions,compare_change:typeof e.compare_change>"u"?100:e.compare_change})}),s}},data(){return{show_overview_notes:!1,chart_style:{foreColor:"#999",borderColor:"#f3f6fa",colors:["#3a93dd","#5CC0A5"],markersStrokeColor:["#3a93dd"],markersColors:["#ffffff"],markersStrokeColorHover:["#ffffff"],markersColorsHover:["#3a93dd"],fontSize:"12px",fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif'},text_site_notes:r("Site Notes","google-analytics-for-wordpress"),text_overview:r("Overview Report","google-analytics-for-wordpress"),text_sessions:r("Sessions","google-analytics-for-wordpress"),text_sessions_tooltip:d(r("Unique %s Sessions","google-analytics-for-wordpress"),"<br />"),text_pageviews:r("Pageviews","google-analytics-for-wordpress"),text_pageviews_tooltip:d(r("Unique %s Pageviews","google-analytics-for-wordpress"),"<br />"),text_duration:r("Avg. Session Duration","google-analytics-for-wordpress"),text_bounce:r("Bounce Rate","google-analytics-for-wordpress"),text_total_users:r("Total Users","google-analytics-for-wordpress"),text_new_vs_returning:r("New vs. Returning Visitors","google-analytics-for-wordpress"),text_device_breakdown:r("Device Breakdown","google-analytics-for-wordpress"),text_countries:r("Top 10 Countries","google-analytics-for-wordpress"),text_countries_button:r("View Countries Report","google-analytics-for-wordpress"),text_referrals:r("Top 10 Referrals","google-analytics-for-wordpress"),text_referral_button:r("View All Referral Sources","google-analytics-for-wordpress"),text_top_posts:r("Top Posts/Pages","google-analytics-for-wordpress"),text_top_posts_button:r("View Full Posts/Pages Report","google-analytics-for-wordpress"),current_tab:"sessions",text_infobox_tooltip_sessions:r("A session is the browsing session of a single user to your site.","google-analytics-for-wordpress"),text_infobox_tooltip_pageviews:r("A pageview is defined as a view of a page on your site that is being tracked by the Analytics tracking code. Each refresh of a page is also a new pageview.","google-analytics-for-wordpress"),text_infobox_tooltip_average:r("Average session duration is calculated by dividing the total time spent by all users on your site (in seconds) by the number of sessions.","google-analytics-for-wordpress"),text_infobox_tooltip_bounce:r("Bounce Rate represents the percentage of sessions that don't meet the criteria for an engaged session. A session counts as engaged if the visitor completes an event (like a click or form submission), stays on your site for 10 seconds or longer, or views more than one page.","google-analytics-for-wordpress"),text_infobox_tooltip_totalusers:r("The number of distinct tracked users","google-analytics-for-wordpress"),text_pie_tooltip_newvsreturning:r("This graph shows what percent of your user sessions come from new versus repeat visitors.","google-analytics-for-wordpress"),text_pie_tooltip_devices:r("This graph shows the percentage of sessions on your site from different types of devices: traditional desktops/laptops, tablets, and mobile phones.","google-analytics-for-wordpress"),text_countries_tooltip:r("This list shows the top countries based on the number of sessions, showing where your website's visitors are from.","google-analytics-for-wordpress"),text_referral_tooltip:r("This list shows the top websites that send users to your website, known as referral traffic.","google-analytics-for-wordpress"),text_top_posts_tooltip:r("This list shows your website's most viewed posts and pages based on pageviews.","google-analytics-for-wordpress"),text_export_pdf_overview_report:r("Export PDF Overview Report","google-analytics-for-wordpress"),text_waiting_for_your_stats:r("We're Waiting for Your Stats!","google-analytics-for-wordpress"),text_waiting_to_process_your_data:r("We're waiting to process your data which might take up to 24 hours.","google-analytics-for-wordpress"),text_close_site_notes:r("Close Site Notes","google-analytics-for-wordpress"),overviewKey:1,text_new_users:r("New Users","google-analytics-for-wordpress"),text_infobox_tooltip_newusers:r("Users who interacted with your site for the first time.","google-analytics-for-wordpress")}},methods:{infoboxData(s,t=!1){let e={};return this.overview.infobox&&this.overview.infobox[s]&&(e.change=this.overview.infobox[s].prev,e.value=this.overview.infobox[s].value.toString(),typeof this.overview.infobox[s].compare_value>"u"?e.compareValue=e.value:e.compareValue=this.overview.infobox[s].compare_value?this.overview.infobox[s].compare_value.toString():"0",this.overview.infobox[s].prev===0?e.direction="":this.overview.infobox[s].prev>0?(e.direction="up",e.color="green"):(e.direction="down",e.color="red")),t&&(e.direction==="down"?e.color="green":e.color="red"),e},switchTab(s){this.current_tab=s},activeTabButtonClass(s){return s===this.current_tab?"monsterinsights-active-tab-button":"monsterinsights-deactive-tab-button"},sessionsData(){return this.overview.overviewgraph?{labels:this.overview.overviewgraph.labels,data:this.overview.overviewgraph.sessions.datapoints,timestamps:this.overview.overviewgraph.timestamps,trend:this.overview.overviewgraph.sessions.trendpoints,notes:this.overview.overviewgraph.notes,compare:this.overview.compare?this.overview.compare.overviewgraph.sessions:[]}:{}},pageviewsData(){return this.overview.overviewgraph?{labels:this.overview.overviewgraph.labels,data:this.overview.overviewgraph.pageviews.datapoints,timestamps:this.overview.overviewgraph.timestamps,trend:this.overview.overviewgraph.pageviews.trendpoints,notes:this.overview.overviewgraph.notes,compare:this.overview.compare?this.overview.compare.overviewgraph.pageviews:[]}:{}},showChart(){let s=!0;return this.overview.overviewgraph&&this.overview.overviewgraph.count===0&&(s=!1),s},toggleNotes(){this.show_overview_notes=!this.show_overview_notes},changeOverviewKey(){this.overviewKey=Math.random()}},mounted(){this.$store.dispatch("$_reports/getReportData","overview")}};var as=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-overview"},[e("report-overview-upsell-mobile"),e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_overview)}}),e("report-overview-date-picker"),e("reports-pdf-export")],1),t.showChart()?e("div",{staticClass:"monsterinsights-report-tabs monsterinsights-report-row",attrs:{id:"monsterinsights-report-overview"}},[e("div",{staticClass:"monsterinsights-report-tabs-navigation"},[e("button",{class:t.activeTabButtonClass("sessions"),on:{click:function(o){return t.switchTab("sessions")}}},[e("i",{staticClass:"monstericon-user"}),e("span",{domProps:{textContent:t._s(t.text_sessions)}})]),e("button",{class:t.activeTabButtonClass("pageviews"),on:{click:function(o){return t.switchTab("pageviews")}}},[e("i",{staticClass:"monstericon-eye"}),e("span",{domProps:{textContent:t._s(t.text_pageviews)}})])]),e("div",{staticClass:"monsterinsights-report-tabs-content"},[t.current_tab==="sessions"?e("div",[e("report-overview-line-chart-apex",{attrs:{id:"chart-overview-sessions","chart-data":t.sessionsData(),tooltipDescriptor:t.text_sessions_tooltip,chartStyles:t.chart_style}})],1):t._e(),t.current_tab==="pageviews"?e("div",[e("report-overview-line-chart-apex",{attrs:{id:"chart-overview-pageviews","chart-data":t.pageviewsData(),tooltipDescriptor:t.text_sessions_tooltip,chartStyles:t.chart_style}})],1):t._e(),t.overview.show_chart_overlay?e("div",{staticClass:"monsterinsights-report-tabs-content-overlay"},[e("div",{staticClass:"monsterinsights-report-tabs-content-overlay-box"},[e("div",{staticClass:"monsterinsights-report-tabs-content-overlay-box-icon"},[e("svg",{attrs:{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"}},[e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.40686 12.8342C1.88862 12.8197 1.3904 12.5195 1.12016 11.9178C0.844361 11.305 0.925545 10.7056 1.38262 10.2007C1.82635 9.71029 2.3924 9.56127 3.02296 9.76145C3.23204 9.82817 3.36216 9.80371 3.52563 9.65913C4.85793 8.48142 6.19801 7.31149 7.54142 6.1449C7.70157 6.00589 7.76051 5.87799 7.72158 5.65557C7.567 4.77702 8.09859 4.01634 8.96714 3.83507C9.79343 3.66158 10.5897 4.16091 10.7921 5.02057C10.8555 5.28747 10.9834 5.39089 11.2236 5.47097C12.1933 5.79681 13.1564 6.14045 14.1195 6.48631C14.3019 6.55193 14.4287 6.54637 14.5877 6.40402C15.0314 6.00922 15.563 5.91358 16.1179 6.11265C16.3259 6.18716 16.4404 6.14045 16.5872 6.01478L17.0591 5.60925C18.1158 4.7009 19.1722 3.79274 20.2438 2.90313C20.424 2.75363 20.4056 2.61111 20.3856 2.4555L20.3856 2.45544L20.3856 2.45538L20.3856 2.45532C20.3816 2.42462 20.3776 2.39341 20.3751 2.36154C20.305 1.48965 20.8221 0.796812 21.6629 0.636669C22.4491 0.487648 23.2142 0.94472 23.4478 1.72653C23.6213 2.30815 23.5056 2.84307 23.0786 3.28124C22.656 3.71385 22.1333 3.89735 21.5461 3.70495C21.2603 3.61154 21.0801 3.66269 20.8622 3.85286C19.7067 4.85931 18.539 5.85242 17.369 6.84107C17.1867 6.99565 17.1199 7.12466 17.1622 7.386C17.3023 8.26567 16.6962 9.03969 15.811 9.1776C15.0158 9.30104 14.2218 8.74054 14.065 7.91536C14.025 7.70629 13.9393 7.61954 13.7514 7.55393C12.7449 7.20918 11.7429 6.85331 10.7409 6.49743C10.5786 6.4396 10.4607 6.43182 10.3072 6.5675C9.85348 6.97119 9.31522 7.07906 8.74138 6.8711C8.56789 6.80771 8.46892 6.84107 8.34436 6.95006C6.96647 8.16002 5.58858 9.36887 4.2029 10.5699C4.06327 10.691 4.08094 10.7961 4.10685 10.9501L4.10837 10.9592C4.27852 11.9712 3.55788 12.8353 2.41131 12.8353L2.40686 12.8342ZM20.0248 14.9084V7.8922C20.0248 7.10817 20.235 6.90132 21.0235 6.90132C21.2299 6.90132 21.4361 6.90089 21.6424 6.90047H21.6425C22.1064 6.89953 22.57 6.89858 23.0342 6.90243C23.5791 6.90688 23.8515 7.16266 23.8515 7.70091C23.856 12.5163 23.856 17.3317 23.8515 22.146C23.8515 22.6687 23.5858 22.9189 23.062 22.9233C22.3235 22.93 21.5851 22.9289 20.8455 22.9233C20.2639 22.9189 20.027 22.6687 20.0259 22.0492C20.0235 20.3493 20.024 18.6487 20.0244 16.9484V16.9483V16.9482C20.0246 16.2682 20.0248 15.5883 20.0248 14.9084ZM11.185 18.7474L11.1847 16.9545H11.1858C11.1858 16.3521 11.1861 15.7498 11.1863 15.1475V15.1456V15.1455C11.1868 13.9418 11.1873 12.7382 11.1858 11.5341C11.1858 10.9058 10.9456 10.6522 10.3317 10.6456C9.62 10.6367 8.90826 10.6367 8.19651 10.6456C7.60265 10.6533 7.34131 10.9114 7.34131 11.5008C7.33797 15.1284 7.33797 18.755 7.34131 22.3827C7.34131 22.9632 7.61933 23.2323 8.20207 23.2368C8.90047 23.2423 9.59776 23.2412 10.2962 23.2368C10.9312 23.2334 11.1847 22.9765 11.1847 22.3337C11.1855 21.1386 11.1852 19.9429 11.185 18.7474ZM17.5182 17.893L17.5184 19.3144V19.3198C17.5187 20.2666 17.5189 21.2136 17.5182 22.1601C17.5182 22.8441 17.2858 23.0776 16.6163 23.0787L16.268 23.0793H16.2676C15.6862 23.0804 15.1044 23.0815 14.5233 23.0787C13.9573 23.0754 13.6848 22.8218 13.6826 22.2558C13.6759 19.3554 13.6759 16.4551 13.6826 13.5547C13.6837 12.9942 13.9628 12.7395 14.53 12.7362C15.2417 12.7317 15.9524 12.7317 16.6641 12.7362C17.258 12.7395 17.516 12.992 17.5171 13.5836C17.5195 14.6098 17.519 15.6355 17.5186 16.6614V16.6615C17.5184 17.072 17.5182 17.4824 17.5182 17.893ZM1.00389 19.2723C1.00426 19.5411 1.00463 19.8098 1.00463 20.0785L1.00352 20.0774C1.00352 20.3295 1.0031 20.5818 1.00268 20.8341C1.00173 21.4019 1.00078 21.9699 1.00463 22.5373C1.00797 23.099 1.27265 23.3759 1.8287 23.3837C2.55268 23.3937 3.27777 23.3925 4.00174 23.3837C4.58337 23.377 4.85028 23.1056 4.85139 22.5207C4.85584 20.8937 4.85584 19.2678 4.85139 17.6408C4.85028 17.0758 4.59116 16.8111 4.02732 16.8034C3.30334 16.7945 2.57826 16.7956 1.85428 16.8034C1.26375 16.81 1.00797 17.0703 1.00463 17.6586C1.00241 18.1969 1.00315 18.7347 1.00389 19.2723Z",fill:"#FEFEFE"}})])]),e("h3",{domProps:{textContent:t._s(t.text_waiting_for_your_stats)}}),e("p",{domProps:{textContent:t._s(t.text_waiting_to_process_your_data)}})])]):t._e()]),t.show_overview_notes?t._e():e("a",{staticClass:"monsterinsights-notes-show",attrs:{href:"#"},on:{click:function(o){return o.preventDefault(),t.toggleNotes()}}},[e("span",[t._v(t._s(t.text_site_notes))])])]):t._e(),t.show_overview_notes?e("div",{staticClass:"monsterinsights-overview-notes-container",attrs:{id:"monsterinsights_site_notes"}},[e("site-notes-overview",{on:{"refresh-overview-report":t.changeOverviewKey}}),t.show_overview_notes?e("a",{staticClass:"monsterinsights-notes-hide",attrs:{href:"#"},domProps:{textContent:t._s(t.text_close_site_notes)},on:{click:function(o){return o.preventDefault(),t.toggleNotes()}}}):t._e()],1):t._e(),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-infobox-row",attrs:{id:"monsterinsights-report-infobox"}},[e("report-infobox",{attrs:{title:t.text_sessions,value:t.$formatNumber(t.infoboxSessionsData.value),change:t.infoboxSessionsData.change,color:t.infoboxSessionsData.color,direction:t.infoboxSessionsData.direction,days:t.infoboxRange,tooltip:t.text_infobox_tooltip_sessions,"compare-value":t.$formatNumber(t.infoboxSessionsData.compareValue)}}),e("report-infobox",{attrs:{title:t.text_pageviews,value:t.$formatNumber(t.infoboxPageviewsData.value),change:t.infoboxPageviewsData.change,color:t.infoboxPageviewsData.color,direction:t.infoboxPageviewsData.direction,days:t.infoboxRange,tooltip:t.text_infobox_tooltip_pageviews,"compare-value":t.$formatNumber(t.infoboxPageviewsData.compareValue)}}),e("report-infobox",{attrs:{title:t.text_duration,value:t.infoboxDurationData.value,change:t.infoboxDurationData.change,color:t.infoboxDurationData.color,direction:t.infoboxDurationData.direction,days:t.infoboxRange,tooltip:t.text_infobox_tooltip_average,"compare-value":t.infoboxDurationData.compareValue}}),e("report-infobox",{attrs:{title:t.text_bounce,value:t.infoboxBounceData.value,change:t.infoboxBounceData.change,color:t.infoboxBounceData.color,direction:t.infoboxBounceData.direction,days:t.infoboxRange,tooltip:t.text_infobox_tooltip_bounce,"compare-value":t.infoboxBounceData.compareValue}})],1),e("report-overview-upsell"),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-flex"},[e("report-overview-pie-chart-apex",{attrs:{id:"newvsreturning",chartData:t.newVsReturningData,title:t.text_new_vs_returning,tooltip:t.text_pie_tooltip_newvsreturning,width:200,height:200,size:50}}),e("report-overview-pie-chart-apex",{attrs:{id:"devices",chartData:t.devicesData,title:t.text_device_breakdown,tooltip:t.text_pie_tooltip_devices,width:200,height:200,size:50}})],1),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-flex monsterinsights-report-2-columns"},[e("report-list-box",{attrs:{id:"monsterinsights-report-top-countries",title:t.text_countries,rows:t.countriesData,tooltip:t.text_countries_tooltip}},[t.gaLinks?e("a",{staticClass:"monsterinsights-button",attrs:{slot:"button",href:t.overview.galinks.countries,target:"_blank"},domProps:{textContent:t._s(t.text_countries_button)},slot:"button"}):t._e()]),e("report-list-box",{attrs:{id:"monsterinsights-report-top-referrals",title:t.text_referrals,rows:t.referralsData,tooltip:t.text_referral_tooltip}},[t.gaLinks?e("a",{staticClass:"monsterinsights-button",attrs:{slot:"button",href:t.overview.galinks.referrals,target:"_blank"},domProps:{textContent:t._s(t.text_referral_button)},slot:"button"}):t._e()])],1),e("div",{staticClass:"monsterinsights-report-row"},[e("report-list-box",{attrs:{title:t.text_top_posts,rows:t.topPostsData,tooltip:t.text_top_posts_tooltip}},[t.gaLinks?e("a",{staticClass:"monsterinsights-button",attrs:{slot:"button",href:t.overview.galinks.topposts,target:"_blank"},domProps:{textContent:t._s(t.text_top_posts_button)},slot:"button"}):t._e()])],1)],1)},ns=[],ls=n(is,as,ns,!1,null,null,null,null);const cs=ls.exports,ps={name:"ReportTableBox",components:{ReportsPagination:at,SettingsInfoTooltip:I},props:{title:String,tooltip:String,rows:Array,headers:Array,button:Object,emptytext:String,error:String,mobileWidth:{default:783,type:Number},icon:{default:"",type:String},compareSingleColumns:{type:Array,default:()=>[0]},hasCompareChangeColumn:{type:Boolean,default:!1},compareChangeOpposite:{type:Array,default:()=>[]}},data(){return{paginate:!1,limit:10,text_show:r("Show","google-analytics-for-wordpress"),activeRow:"",isMobile:!1,resizing:!1}},computed:{...v({mobileTableExpanded:"$_reports/mobileTableExpanded",date:"$_reports/date"}),mobileHeaders(){let s=[];return this.headers.forEach(function(t,e){e>0&&s.push(t)}),s},emptyTable(){let s=[[this.emptytext]];for(;s.length<10;)s.push([" "]);return s},componentClass(){let s="monsterinsights-table-box";return this.isMobile&&(s+=" monsterinsights-table-box-mobile"),this.title||(s+=" monsterinsights-table-box-no-title"),this.date.compareReport&&(s+=" monsterinsights-table-box-compare-report"),this.paginate&&(s+=" monsterinsights-has-pagination"),s},tableRows(){let s=this.rows.filter(()=>!0);if(s.length<10){let t=[],e=0;for(;e<this.headers.length;){let o=[""];e>0&&this.date.compareReport&&(o.push(""),this.hasCompareChangeColumn&&o.push("")),t.push(o),e++}for(;s.length<10;)s.push(t)}return s=s.slice(0,this.limit),s},titleClass(){let s="monsterinsights-report-title ";return this.icon&&(s+=this.icon),this.paginate&&(s+=" monsterinsights-has-pagination"),s},compareDateColumns(){if(!this.date.compareReport)return[];let s=[];return this.headers.forEach((t,e)=>{this.compareSingleColumns.includes(e)||(s.push(this.date.intervalText,this.date.intervalCompareText),this.hasCompareChangeColumn&&s.push(r("Change%","google-analytics-for-wordpress")))}),s}},methods:{hasButtonSlot(){return this.rows.length>10&&(this.paginate=!0),this.$slots.button},getButtonClass(s){let t="monsterinsights-button";return s===this.limit&&(t+=" monsterinsights-selected-interval"),t},cellText(s,t,e){return s===""?" ":t===0?'<span class="monsterinsights-reports-list-count">'+(e+1)+'.</span><span class="monsterinsights-reports-list-title">'+s+"</span>":s},rowClass(s){let t="monsterinsights-table-list-item";return(this.mobileTableExpanded||this.activeRow===s)&&window.innerWidth<this.mobileWidth&&(t+=" monsterinsights-table-list-item-active"),this.tableRows[s][0]===""&&(t+=" monsterinsights-table-list-item-empty"),t},showMobileRow(s,t){return window.innerWidth<this.mobileWidth&&t>0&&(this.mobileTableExpanded||s===this.activeRow)},handleResize(){this.resizing||(this.resizing=!0,window.requestAnimationFrame?window.requestAnimationFrame(this.resizeCallback):setTimeout(this.resizeCallback,66))},resizeCallback(){this.isMobile=window.innerWidth<this.mobileWidth,this.resizing=!1},cellClass(s){return s++,"monsterinsights-table-cell-"+s},toggleMobileTables(s){if(this.mobileTableExpanded)return!1;this.activeRow=this.activeRow===s?"":s},changeLimit(s){this.limit=s},getRowSpan(s){return this.compareSingleColumns.includes(s)&&this.date.compareReport?2:1},getColSpan(s){return!this.compareSingleColumns.includes(s)&&this.date.compareReport?this.hasCompareChangeColumn?3:2:1}},mounted(){window.addEventListener("resize",this.handleResize),this.handleResize()},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize)}};var ds=function(){var t=this,e=t._self._c;return e("div",{class:t.componentClass},[t.title?e("h3",{class:t.titleClass,domProps:{textContent:t._s(t.title)}}):t._e(),t.tooltip?e("settings-info-tooltip",{attrs:{content:t.tooltip}}):t._e(),e("div",{staticClass:"monsterinsights-table-box-list monsterinsights-table-box-table"},[t.error?e("div",[e("h3",{domProps:{textContent:t._s(t.error)}})]):t.rows.length>0?e("table",{class:{"monsterinsights-report-box-table-compare-report":t.date.compareReport}},[t.headers.length>0?e("thead",{class:{"monsterinsights-report-table-head-compare-report":t.date.compareReport}},[e("tr",{staticClass:"monsterinsights-report-box-table-head-columns"},t._l(t.headers,function(o,i){return e("th",{key:i,attrs:{rowspan:t.getRowSpan(i),colspan:t.getColSpan(i)},domProps:{textContent:t._s(o)}})}),0),t.date.compareReport?e("tr",{class:{"monsterinsights-report-table-head-date-range-row":!0,"monsterinsights-report-table-head-date-range-row-has-change-col":t.hasCompareChangeColumn}},t._l(t.compareDateColumns,function(o,i){return e("th",{key:i},[t._v(" "+t._s(o)+" ")])}),0):t._e()]):t._e(),e("tbody",{class:{"monsterinsights-report-table-body-compare-report":t.date.compareReport}},t._l(t.tableRows,function(o,i){return e("tr",{key:i,class:t.rowClass(i),on:{click:function(a){return t.toggleMobileTables(i)}}},t._l(t.tablePrepareColumnItems(o),function(a,l){return e("td",{key:l+"td"+i,class:t.cellClass(l)},[t.tableIsCurrentColumn(l)?[t.showMobileRow(i,l)?e("div",{staticClass:"monsterinsights-table-mobile-heading",domProps:{textContent:t._s(t.headers[l])}}):t._e(),e("div",{staticClass:"monsterinsights-table-item-content",domProps:{innerHTML:t._s(t.cellText(a,l,i))}})]:t._e(),t.tableIsPreviousColumn(l)?[e("span",{staticClass:"monsterinsights-table-item-compare-report-content",domProps:{innerHTML:t._s(a)}})]:t._e(),t.tableIsChangeColumn(a,l)?[e("div",{staticClass:"monsterinsights-table-item-compare-report-change",domProps:{innerHTML:t._s(t.tableCompareChange(a,l))}})]:t._e()],2)}),0)}),0)]):e("div",{staticClass:"monsterinsights-table-no-data"},[e("h3",{domProps:{textContent:t._s(t.emptytext)}})])]),t.hasButtonSlot()||t.paginate?e("div",{staticClass:"monsterinsights-table-box-footer"},[t._t("button"),t.paginate?e("reports-pagination",{attrs:{limit:t.limit,length:t.rows.length},on:{updated:t.changeLimit}}):t._e()],2):t._e()],1)},hs=[],gs=n(ps,ds,hs,!1,null,null,null,null);const C=gs.exports,us={name:"ReportEcommerce",components:{ReportUpsellOverlay:f,ReportTableBox:C,ReportInfobox:st},data(){return{text_ecommerce:"eCommerce Report",text_conversion_rate:"Conversion Rate",text_transactions:"Transactions",text_revenue:"Revenue",text_average_order_value:"Avg. Order Value",text_top_products:"Top Products",top_products_headers:["Product Name","Quantity","% of Sales","Total Revenue"],text_top_conversions:"Top Conversion Sources",topConversionsHeaders:["Sources","Total Users","% of Users","Revenue"]}},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},methods:{topProductsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.words(3),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s},topConversionsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.words(2),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var ms=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-ecommerce"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_ecommerce)}})]),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-infobox-row",attrs:{id:"monsterinsights-report-ecommerce-infobox"}},[e("report-infobox",{attrs:{id:"monsterinsights-report-ecommerce-conversion-rate",title:t.text_conversion_rate,value:"5",change:6}}),e("report-infobox",{attrs:{title:t.text_transactions,value:"5",change:6}}),e("report-infobox",{attrs:{id:"monsterinsights-report-ecommerce-revenue",title:t.text_revenue,value:"5",change:6}}),e("report-infobox",{attrs:{title:t.text_average_order_value,value:"5",change:6}})],1),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{title:t.text_top_products,headers:t.top_products_headers,rows:t.topProductsRows()}})],1),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{title:t.text_top_conversions,headers:t.topConversionsHeaders,rows:t.topConversionsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"ecommerce"}})],1)},_s=[],fs=n(us,ms,_s,!1,null,null,null,null);const vs=fs.exports,Cs={name:"ReportEcommerceCoupons",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_upsell_title:r("eCommerce","google-analytics-for-wordpress"),text_ecommerce:r("eCommerce Coupons Report","google-analytics-for-wordpress"),fake_headers:["Coupon","Qty"]}}};var ws=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-ecommerce-coupons"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_ecommerce)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_upsell_title,rows:[]}})],1),e("report-upsell-overlay",{attrs:{report:"ecommerce"}})],1)},ys=[],bs=n(Cs,ws,ys,!1,null,null,null,null);const xs=bs.exports,ks={name:"ReportEcommerceFunnel",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_ecommerce_funnel:r("eCommerce Funnel","google-analytics-for-wordpress")}}};var $s=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-ecommerce-funnel"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_ecommerce_funnel)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:[],title:t.text_ecommerce_funnel,rows:[]}})],1),e("report-upsell-overlay",{attrs:{report:"ecommerce_funnel"}})],1)},Rs=[],Ls=n(ks,$s,Rs,!1,null,null,null,null);const Ps=Ls.exports,Ds={name:"ReportSearchConsole",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_top_search_terms:"Top 50 Google Search Terms",text_search_console:"Search Console Report",fake_headers:["Terms","Clicks","Impressions","CTR","Avg. Position"]}},methods:{topSearchTermsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.words(3),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var Ss=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-search-console"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_search_console)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_top_search_terms,rows:t.topSearchTermsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"queries"}})],1)},Ms=[],Ts=n(Ds,Ss,Ms,!1,null,null,null,null);const Es=Ts.exports,Fs={name:"ReportDimensions",components:{ReportUpsellOverlay:f,ReportTableBox:C},data(){return{text_dimensions_upsell:"Dimensions",text_dimensions:"Dimensions Report",fake_headers:["Author","Percent"]}},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},methods:{dimensionRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.words(2),c.datatype.number()]);return s}}};var Is=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-dimensions"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_dimensions)}})]),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-flex monsterinsights-report-2-columns"},[e("report-table-box",{attrs:{title:t.text_dimensions_upsell,rows:t.dimensionRows(),headers:t.fake_headers}}),e("report-table-box",{attrs:{title:t.text_dimensions_upsell,rows:t.dimensionRows(),headers:t.fake_headers}}),e("report-table-box",{attrs:{title:t.text_dimensions_upsell,rows:t.dimensionRows(),headers:t.fake_headers}}),e("report-table-box",{attrs:{title:t.text_dimensions_upsell,rows:t.dimensionRows(),headers:t.fake_headers}})],1),e("report-upsell-overlay",{attrs:{report:"dimensions"}})],1)},As=[],Bs=n(Fs,Is,As,!1,null,null,null,null);const Ns=Bs.exports,Os={name:"ReportSearchConsole",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_forms:"Forms Report",text_forms_upsell:"Forms",fake_headers:["Form Name or ID","Impressions","Conversions","Conversion Rate"]}},methods:{formsRows(){let s=[];for(let t=0;t<20;t++)s.push([c.lorem.words(2),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var Hs=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-forms"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_forms)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_forms_upsell,rows:t.formsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"forms"}})],1)},Ys=[],Us=n(Os,Hs,Ys,!1,null,null,null,null);const Vs=Us.exports,Zs={name:"ReportRealTime",components:{ReportUpsellOverlay:f,SettingsInfoTooltip:I,ReportTableBox:C},data(){return{text_realtime:r("Real-Time Report","google-analytics-for-wordpress"),text_right_now:r("Right Now","google-analytics-for-wordpress"),text_active:r("Active users on site","google-analytics-for-wordpress"),text_graph_not_available:r("The real-time graph of visitors over time is not currently available for this site. Please try again later.","google-analytics-for-wordpress"),text_active_explainer:r("Important: this only includes users who are tracked in real-time. Not all users are tracked in real-time including (but not limited to) logged-in site administrators, certain mobile users, and users who match a Google Analytics filter.","google-analytics-for-wordpress"),text_refresh_explainer:r("The real-time report automatically updates approximately every 60 seconds.","google-analytics-for-wordpress"),text_refresh_ago:r("The real-time report was last updated %s seconds ago.","google-analytics-for-wordpress"),text_refresh_explainer_2:r("The latest data will be automatically shown on this page when it becomes available.","google-analytics-for-wordpress"),text_refresh_explainer_3:r("There is no need to refresh the browser (doing so won't have any effect).","google-analytics-for-wordpress"),text_graph_title:r("Pageviews Per Minute","google-analytics-for-wordpress"),text_chart_tooltip:d(r("Unique %s Pageviews","google-analytics-for-wordpress"),"<br />"),text_top_pages:r("Top Pages","google-analytics-for-wordpress"),text_top_pages_empty:r("No pageviews currently.","google-analytics-for-wordpress"),top_pages_headers:[r("Page","google-analytics-for-wordpress"),r("Pageview Count","google-analytics-for-wordpress"),r("Percent of Total","google-analytics-for-wordpress")],text_right_now_tooltip:r("This is the number of active users in the last 30 minutes on your site.","google-analytics-for-wordpress"),text_pageviews_tooltip:r("This graph shows the number of pageviews for each of the last 30 minutes.","google-analytics-for-wordpress"),text_top_pages_tooltip:r("This list shows the top pages users visited in the last 30 minutes.","google-analytics-for-wordpress"),text_top_pages_button:r("View All Real-Time Pageviews","google-analytics-for-wordpress"),text_referrals_button:r("View All Real-Time Traffic Sources","google-analytics-for-wordpress"),text_countries_button:r("View All Real-Time Traffic by Country","google-analytics-for-wordpress"),text_city_button:r("View All Real-Time Traffic by City","google-analytics-for-wordpress"),seconds:12}},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},methods:{sprintf:d}};var js=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-realtime"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_realtime)}})]),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-flex monsterinsights-report-2-columns"},[e("div",{staticClass:"monsterinsights-report-box"},[e("h3",{domProps:{textContent:t._s(t.text_right_now)}}),e("settings-info-tooltip",{attrs:{content:t.text_right_now_tooltip}}),e("div",{staticClass:"monsterinsights-realtime-box-content"},[e("div",{staticClass:"monsterinsights-realtime-large",domProps:{textContent:t._s(0)}}),e("div",{staticClass:"monsterinsights-realtime-active",domProps:{textContent:t._s(t.text_active)}}),e("p",{domProps:{textContent:t._s(t.text_active_explainer)}}),e("p",[e("span",{domProps:{textContent:t._s(t.text_refresh_explainer)}}),e("span",{domProps:{textContent:t._s(t.sprintf(t.text_refresh_ago,t.seconds))}}),e("span",{domProps:{textContent:t._s(t.text_refresh_explainer_2)}}),e("span",{domProps:{textContent:t._s(t.text_refresh_explainer_3)}})])])],1),e("div",{staticClass:"monsterinsights-report-box"},[e("h3",{domProps:{textContent:t._s(t.text_graph_title)}}),e("settings-info-tooltip",{attrs:{content:t.text_pageviews_tooltip}}),e("div",{staticClass:"monsterinsights-realtime-box-content"})],1)]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{title:t.text_top_pages,headers:t.top_pages_headers,rows:[],emptytext:t.text_top_pages_empty,tooltip:t.text_top_pages_tooltip}})],1),e("report-upsell-overlay",{attrs:{report:"realtime"}})],1)},zs=[],Ws=n(Zs,js,zs,!1,null,null,null,null);const Gs=Ws.exports,qs={name:"ReportYearInReviewBarChart",data(){}},Js=null,Ks=null;var Qs=n(qs,Js,Ks,!1,null,null,null,null);const Xs=Qs.exports,tr={name:"ReportYearInReviewByMonth",components:{ReportYearInReviewBarChart:Xs},props:{chartData:[Object,Boolean],title:String,subTitle:String,id:String,icon:{type:String,default:"map"}},computed:{tooltipId(){return"monsterinsights-chartjs-pie-"+this.id+"-tooltip"},titleClassName(){return"monsterinsights-report-title with-outbound-icon with-icon-"+this.icon}}};var er=function(){var t=this,e=t._self._c;return t.chartData?e("div",{staticClass:"monsterinsights-reports-visitorbymonth-chart monsterinsights-yir-chart"},[e("div",{staticClass:"monsterinsights-reports-visitorbymonth-header monsterinsights-yir-chart-header"},[e("div",{staticClass:"monsterinsights-reports-visitorbymonth-title monsterinsights-yir-chart-header-title"},[e("h3",{class:t.titleClassName,domProps:{textContent:t._s(t.title)}})]),e("div",{staticClass:"monsterinsights-reports-visitorbymonth-subtitle monsterinsights-yir-chart-header-subtitle"},[e("h4",{staticClass:"monsterinsights-report-subtitle",domProps:{textContent:t._s(t.subTitle)}})])]),e("div",{staticClass:"monsterinsights-reports-visitorbymonth-chart-content monsterinsights-yir-chart-content"},[e("div",{staticClass:"monsterinsights-reports-bar-chart-holder"},[e("div",{staticClass:"monsterinsights-chart-tooltip",attrs:{id:t.tooltipId}}),e("report-year-in-review-bar-chart",{attrs:{"chart-data":t.chartData,tooltipid:t.id}})],1)])]):t._e()},sr=[],rr=n(tr,er,sr,!1,null,null,null,null);const or=rr.exports,ir={name:"ReportYearInReviewTip",props:{title:String,summary:String,link:String,linkText:String}};var ar=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-yir-year-in-review-tip monsterinsights-yir-tip"},[e("div",{staticClass:"monsterinsights-yir-tip-icon"}),e("div",{staticClass:"monsterinsights-yir-tip-content"},[e("h3",{staticClass:"monsterinsights-yir-tip-content-title",domProps:{textContent:t._s(t.title)}}),e("p",{staticClass:"monsterinsights-yir-tip-content-summary",domProps:{textContent:t._s(t.summary)}}),e("div",{staticClass:"monsterinsights-yir-tip-content-link-wrapper"},[e("a",{staticClass:"monsterinsights-yir-tip-content-link",attrs:{href:t.link,target:"_blank"},domProps:{textContent:t._s(t.linkText)}})])])])},nr=[],lr=n(ir,ar,nr,!1,null,null,null,null);const cr=lr.exports,pr={name:"ReportYearInReviewListBox",props:{title:String,subTitle:String,tooltip:String,rows:Array},data(){return{limit:5,text_show:r("Show","google-analytics-for-wordpress"),text_no_records:r("No records found.","google-analytics-for-wordpress")}},methods:{tableRows(){let s=this.rows;if(s.length<5)for(;s.length<5;)s.push({number:"",text:"",right:""});return s=s.slice(0,this.limit),s}}};var dr=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-year-in-review-table-box monsterinsights-yir-chart"},[e("div",{staticClass:"monsterinsights-year-in-review-table-box-header monsterinsights-yir-chart-header"},[e("div",{staticClass:"monsterinsights-year-in-review-table-box-title monsterinsights-yir-chart-header-title"},[t.title?e("h3",{staticClass:"monsterinsights-report-title",domProps:{textContent:t._s(t.title)}}):t._e()]),e("div",{staticClass:"monsterinsights-year-in-review-table-box-subtitle monsterinsights-yir-chart-header-subtitle"},[t.subTitle?e("h4",{staticClass:"monsterinsights-report-subtitle",domProps:{textContent:t._s(t.subTitle)}}):t._e()])]),e("div",{staticClass:"monsterinsights-year-in-review-table-box-list"},[t.rows.length>0?e("div",t._l(t.tableRows(),function(o,i){return e("div",{key:i,staticClass:"monsterinsights-table-list-item"},[e("span",{staticClass:"monsterinsights-reports-list-count",domProps:{textContent:t._s(o.number)}}),e("span",{staticClass:"monsterinsights-reports-list-text",domProps:{innerHTML:t._s(o.text)}}),e("span",{staticClass:"monsterinsights-reports-list-number"},[o.right?e("span",{domProps:{innerHTML:t._s(parseFloat(o.right).toLocaleString("en"))}}):t._e()])])}),0):t._e(),t.rows.length===0?e("div",{staticClass:"monsterinsights-table-list-item"},[e("span",{staticClass:"monsterinsights-reports-list-text",domProps:{innerHTML:t._s(t.text_no_records)}})]):t._e()]),t.tooltip?e("div",{staticClass:"monsterinsights-year-in-review-table-box-footer"},[e("span",{staticClass:"monsterinsights-yir-tooltip"},[e("span",{domProps:{textContent:t._s(t.tooltip)}})])]):t._e()])},hr=[],gr=n(pr,dr,hr,!1,null,null,null,null);const ur=gr.exports,mr={name:"ReportYearInReviewDeviceUsage",props:{deviceData:[Object,Boolean],title:String,subtitle:String,id:String},data(){return{labels:{mobile:r("Mobile","google-analytics-for-wordpress"),desktop:r("Desktop","google-analytics-for-wordpress"),tablet:r("Tablet","google-analytics-for-wordpress")}}},computed:{},methods:{}};var _r=function(){var t=this,e=t._self._c;return t.deviceData?e("div",{staticClass:"monsterinsights-reports-device-usage"},[t.title?e("h3",{staticClass:"monsterinsights-report-title",domProps:{textContent:t._s(t.title)}}):t._e(),t.subtitle?e("h3",{staticClass:"monsterinsights-report-subtitle",domProps:{innerHTML:t._s(t.subtitle)}}):t._e(),e("div",{staticClass:"monsterinsights-reports-device-usage-cards"},[e("div",{staticClass:"monsterinsights-yir-card monsterinsights-yir-green2-card"},[e("h4",{staticClass:"monsterinsights-yir-card-title with-small-mobile-icon",domProps:{textContent:t._s(t.labels.mobile)}}),e("span",{staticClass:"monsterinsights-yir-number",domProps:{textContent:t._s((t.deviceData.mobile.value||0)+"%")}})]),e("div",{staticClass:"monsterinsights-yir-card monsterinsights-yir-orange-card"},[e("h4",{staticClass:"monsterinsights-yir-card-title with-small-desktop-icon",domProps:{textContent:t._s(t.labels.desktop)}}),e("span",{staticClass:"monsterinsights-yir-number",domProps:{textContent:t._s((t.deviceData.desktop.value||0)+"%")}})]),e("div",{staticClass:"monsterinsights-yir-card monsterinsights-yir-blue2-card"},[e("h4",{staticClass:"monsterinsights-yir-card-title with-small-tablet-icon",domProps:{textContent:t._s(t.labels.tablet)}}),e("span",{staticClass:"monsterinsights-yir-number",domProps:{textContent:t._s((t.deviceData.tablet.value||0)+"%")}})])])]):t._e()},fr=[],vr=n(mr,_r,fr,!1,null,null,null,null);const Cr=vr.exports,wr={name:"YearInReviewReportsPdfExport",components:{},props:{reportTitle:{type:String,default:r("Overview Report","google-analytics-for-wordpress")},buttonText:{type:String,default:r("Download as PDF","google-analytics-for-wordpress")},reportContainer:{type:String,default:".monsterinsights-reports-page"},filename:{type:String,default:"monsterinsights-report.pdf"},quality:{type:Number,default:1},pdfdpi:{type:Number,default:300},orientation:{type:String,default:"portrait"},ignoreClasses:{type:Array,default(){return[".monsterinsights-yir-export-link",".monsterinsights-header",".monsterinsights-notices-area",".monsterinsights-navigation-bar",".monsterinsights-yir-year-in-review-plugins-block",".monsterinsights-yir-join-communities",".with-behavior-icon"]}},ignoreHeightOfClasses:{type:Array,default(){return[".monsterinsights-header",".monsterinsights-notices-area",".monsterinsights-navigation-bar",".monsterinsights-yir-year-in-review-plugins-block",".monsterinsights-yir-join-communities",".with-behavior-icon"]}}},data(){return{logo:this.$mi.assets+"/img/logo-MonsterInsights.png",downloading:!1,mobileWidth:783}},computed:{...v({date:"$_reports/date",activeReport:"$_reports/activeReport",settings:"$_settings/settings"}),getDateRange(){let s=m().subtract(30,"days").format("MMMM Do YYYY"),t=m().subtract(1,"days").format("MMMM Do YYYY");return this.date.end&&this.date.start&&(s=m(this.date.start).format("MMMM Do YYYY"),t=m(this.date.end).format("MMMM Do YYYY")),d("%1$s - %2$s",s,t)}},methods:{exportPDFReport(){let s=this;if(!document.querySelector(s.reportContainer)){s.downloading=!1,s.$swal({icon:"error",title:r("Download Failed","google-analytics-for-wordpress"),text:r("Download Failed, no report found!","google-analytics-for-wordpress"),confirmButtonText:r("Ok","google-analytics-for-wordpress")});return}document.body.classList.add("monsterinsights-downloading-pdf-report"),s.downloading=!0,s.$swal({customClass:{container:"monsterinsights-swal monsterinsights-swal-loading monsterinsights-pdf-report-swal"},icon:"info",title:r("Generating PDF Report","google-analytics-for-wordpress"),didOpen:function(){s.$swal.showLoading()}}),s.ignoreContents(),setTimeout(()=>{s.doExport()},2e3)},async doExport(){let s=this,t=document.querySelector(s.reportContainer),e=s.getOuterHeight(t)-25-s.ignoreElementsHeight()+15,o={margin:[0,-70],filename:s.filename,image:{type:"jpeg",quality:this.quality},enableLinks:!1,html2canvas:{dpi:s.pdfdpi,scale:2,scrollY:0,height:e,onclone:a=>{a.querySelectorAll("[data-html2canvas-class]").forEach(h=>{const p=h.getAttribute("data-html2canvas-class");p&&(h.className=[h.className.trim(),p.trim()].join(" "))})}},jsPDF:{orientation:s.orientation,format:[980,e],unit:"px"}};try{await mt().from(t).set(o).toPdf().get("pdf").then(function(a){a.setPage(1),a.setFontSize(20),a.setFont(void 0,"bold"),a.setTextColor("#393f4c")}).save()}catch(a){this.downloading=!1,s.pageBreaks("reset"),document.body.classList.remove("monsterinsights-downloading-pdf-report"),s.$swal({icon:"error",title:r("Download Failed","google-analytics-for-wordpress"),text:a,confirmButtonText:r("Ok","google-analytics-for-wordpress")});return}this.downloading=!1,s.pageBreaks("reset"),document.body.classList.remove("monsterinsights-downloading-pdf-report");let i=document.querySelectorAll(".monsterinsights-accordion-item");i.length&&i.forEach(function(a){a.setAttribute("style","margin-bottom: 0")}),s.$swal({customClass:{container:"monsterinsights-swal monsterinsights-swal-succcess monsterinsights-pdf-report-swal"},icon:"success",title:r("Downloaded PDF report successfully!","google-analytics-for-wordpress"),confirmButtonText:r("Ok","google-analytics-for-wordpress")})},ignoreContents(){this.ignoreClasses.length&&this.ignoreClasses.forEach(s=>{let t=document.querySelectorAll(s);t.length&&t.forEach(function(e){if(s===".monsterinsights-active-tab-button")e.removeAttribute("data-html2canvas-ignore");else{let o=document.createAttribute("data-html2canvas-ignore");o.value="",e.setAttributeNode(o)}})})},ignoreElementsHeight(){let s=this,t=0;return s.ignoreHeightOfClasses.forEach(e=>{let o=document.querySelectorAll(e);o.length&&o.forEach(function(i){e===".monsterinsights-table-box-footer"&&i.parentNode.parentNode.querySelectorAll(e).length===2?t+=s.getOuterHeight(i)/2:e===".monsterinsights-mobile-upsell"?i.children.length===0||window.innerWidth>s.mobileWidth||screen.width>s.mobileWidth||(t+=s.getOuterHeight(i)):e===".monsterinsights-overview-upsell-desktop"&&(i.children.length===0||window.innerWidth<s.mobileWidth||screen.width<s.mobileWidth)||(t+=s.getOuterHeight(i))})}),t},getOuterHeight(s){let t=s.offsetHeight,e=getComputedStyle(s);return t+=parseInt(e.marginTop)+parseInt(e.marginBottom),t},getHeaderImage(){let s=new Image;return s.src=this.logo,this.settings.pdf_reports_header_image&&(s.src=this.settings.pdf_reports_header_image),document.location.protocol=="https:"&&s.src.startsWith("http://")&&(s.src="https://"+s.src.substring(7)),document.location.protocol=="http:"&&s.src.startsWith("https://")&&(s.src="http://"+s.src.substring(8)),s},mmToPx(s){return s*3.779527559055},pxToMm(s){return s*.2645833333},pageBreaks(s="add"){let t=this,e=document.querySelectorAll(".monsterinsights-report-row"),o=t.mmToPx(210.0015555555555),i=105,a=0;if(s==="reset"){e.forEach(function(h){h.setAttribute("style","margin-bottom: 25px;")});return}for(var l=0;l<e.length;l++){let h=t.getOuterHeight(e[l]),p=e[l].querySelector(".monsterinsights-table-box-footer");if(p&&(h=t.getOuterHeight(e[l])-t.getOuterHeight(p)),l===0&&(a+=i),e[l].classList.contains("monsterinsights-overview-upsell-desktop")||e[l].classList.contains("monsterinsights-mobile-upsell")||(a+=h,a<o))continue;let u=o-(a-h);u+=50;let _=l>0?l-1:0;(e[_].classList.contains("monsterinsights-overview-upsell-desktop")||e[l].classList.contains("monsterinsights-mobile-upsell"))&&(_=_>0?_-1:0),e[_].setAttribute("style","margin-bottom:"+Math.round(u)+"px;"),e.length===1&&e[0].setAttribute("style","margin-bottom: 0;"),a=h+25}}}};var yr=function(){var t=this,e=t._self._c;return e("span",{attrs:{data:"html2canvas-ignore"}},[e("a",{staticClass:"monsterinsights-yir-export-link",domProps:{innerHTML:t._s(t.buttonText)},on:{click:function(o){return o.preventDefault(),t.exportPDFReport.apply(null,arguments)}}})])},br=[],xr=n(wr,yr,br,!1,null,null,null,null);const kr=xr.exports,$r={name:"YearInReview",components:{ReportYearInReviewByMonth:or,ReportYearInReviewTip:cr,ReportYearInReviewListBox:ur,ReportYearInReviewDeviceUsage:Cr,AddonBlock:Tt,YearInReviewReportsPdfExport:kr},data(){return{text_calculating:r("Still Calculating...","google-analytics-for-wordpress"),text_back_to_overview_report:r("Back to Overview Report","google-analytics-for-wordpress"),text_audience_section_title:r("Audience","google-analytics-for-wordpress"),text_congrats:r("Congrats","google-analytics-for-wordpress"),text_popular:r("Congrats! This year your website had ","google-analytics-for-wordpress"),text_you_had:r("You had ","google-analytics-for-wordpress"),text_visitors:r(" visitors","google-analytics-for-wordpress"),text_best_month_visitors:r(" visitors","google-analytics-for-wordpress"),text_total_visitors:r("Total Visitors","google-analytics-for-wordpress"),text_total_sessions:r("Total Sessions","google-analytics-for-wordpress"),text_visitor_by_month_chart_title:r("Visitors by Month","google-analytics-for-wordpress"),text_section_demographics_title:r("Demographics","google-analytics-for-wordpress"),text_number_one:r("#1","google-analytics-for-wordpress"),text_countries:r("You Top 5 Countries","google-analytics-for-wordpress"),text_know_your_visitors:r("Let’s get to know your visitors a little better, shall we?","google-analytics-for-wordpress"),text_gender:r("Gender","google-analytics-for-wordpress"),text_female:r("Female","google-analytics-for-wordpress"),text_women:r("Women","google-analytics-for-wordpress"),text_male:r("Male","google-analytics-for-wordpress"),text_unknown:r("Unknown","google-analytics-for-wordpress"),text_average_age:r("Average Age","google-analytics-for-wordpress"),text_section_behavior_title:r("Behavior","google-analytics-for-wordpress"),text_top_pages_graph_title:r("Your Top 5 Pages","google-analytics-for-wordpress"),text_top_pages_graph_subtitle:r("Pageviews","google-analytics-for-wordpress"),text_time_spent:r("Time Spent on Site","google-analytics-for-wordpress"),text_minutes:r("minutes","google-analytics-for-wordpress"),text_device_type:r("Device Type","google-analytics-for-wordpress"),text_grow_traffic_tip_summary:r("Did you know that using internal links can give you huge SEO gains? Get the scoop on internal links and how to build them in our guide.","google-analytics-for-wordpress"),text_grow_traffic_tip_link_text:r("How to Add WordPress Internal Links to Improve Your SEO","google-analytics-for-wordpress"),text_grow_traffic_tip_link:this.$getUrl("yearinreview","tips","https://www.monsterinsights.com/how-to-add-wordpress-internal-links-to-improve-your-seo/?utm_source=drip&utm_medium=email&utm_campaign=newsletter&utm_content=YIR"),text_visitors_come_from:r("So, where did all of these visitors come from?","google-analytics-for-wordpress"),text_clicks:r("Clicks","google-analytics-for-wordpress"),text_top_keywords:r("Your Top 5 Keywords","google-analytics-for-wordpress"),text_top_keywords_tooltip:r("What keywords visitors searched for to find your site","google-analytics-for-wordpress"),text_top_referrals:r("Your Top 5 Referrals","google-analytics-for-wordpress"),text_pageviews:r("Pageviews","google-analytics-for-wordpress"),text_top_referrals_tooltip:r("The websites that link back to your website","google-analytics-for-wordpress"),text_opportunity_tip_title:r("Opportunity","google-analytics-for-wordpress"),text_opportunity_tip_summary:r("Did you know you might have direct traffic that's getting counted wrong by Google Analytics? Learn how to track it correctly in our direct traffic guide.","google-analytics-for-wordpress"),text_opportunity_tip_link_text:r("What is Direct Traffic in Google Analytics? (GA4 Updates)","google-analytics-for-wordpress"),text_opportunity_tip_link:this.$getUrl("yearinreview","tips","https://www.monsterinsights.com/what-is-direct-traffic-in-google-analytics/"),text_thank_you_section_title:r("Thank you for using MonsterInsights!","google-analytics-for-wordpress"),text_thank_you_section_summary:r("We’re grateful for your continued support. If there’s anything we can do to help you grow your business, please don’t hesitate to contact our team.","google-analytics-for-wordpress"),text_enjoying_monsterinsights:r("Enjoying MonsterInsights?","google-analytics-for-wordpress"),text_leave_review:r("Leave a five star review!","google-analytics-for-wordpress"),text_syed_balkhi:r("Syed Balkhi","google-analytics-for-wordpress"),text_chris_christoff:r("Chris Christoff","google-analytics-for-wordpress"),text_write_review:r("Write Review","google-analytics-for-wordpress"),text_plugins_section_title:r("Did you know over 10 million websites use our plugins?","google-analytics-for-wordpress"),text_communities_section_title:r("Join our Communities!","google-analytics-for-wordpress"),text_facebook_group:r("Facebook Group","google-analytics-for-wordpress"),text_facebook_group_summary:r("Join our team of WordPress experts and other motivated website owners in the WPBeginner Engage Facebook Group.","google-analytics-for-wordpress"),text_facebook_join_button:r("Join Now...It’s Free!","google-analytics-for-wordpress"),text_wpbeginner_community_title:r("WordPress Tutorials by WPBeginner","google-analytics-for-wordpress"),text_wpbeginner_community_summary:r("WPBeginner is the largest free WordPress resource site for beginners and non-techy users.","google-analytics-for-wordpress"),text_visit_wpbeginner:r("Visit WPBeginner","google-analytics-for-wordpress"),text_follow_us:r("Follow Us!","google-analytics-for-wordpress"),text_sunset_warning:r("Hey! 👋 <br />Your Year in Review Report is only showing statistics after July 1, 2023 due to the Google Analytics 3 sunset!","google-analytics-for-wordpress"),text_follow_us_summary:r("Follow MonsterInsights on social media to stay up to date with latest updates, trends, and tutorials on how to make the most out of analytics.","google-analytics-for-wordpress"),text_search_console_upsell_overlay_details:r("Upgrade to MonsterInsights Pro to Unlock Additional Actionable Insights","google-analytics-for-wordpress"),text_search_console_upsell_overlay_btn_text:r("Upgrade to MonsterInsights Pro","google-analytics-for-wordpress"),text_search_console_upsell_overlay_btn_link:this.$getUrl("yearinreview","searchconsole","https://www.monsterinsights.com/lite/"),months:{Jan:r("January","google-analytics-for-wordpress"),Feb:r("February","google-analytics-for-wordpress"),Mar:r("March","google-analytics-for-wordpress"),Apr:r("April","google-analytics-for-wordpress"),May:r("May","google-analytics-for-wordpress"),Jun:r("June","google-analytics-for-wordpress"),Jul:r("July","google-analytics-for-wordpress"),Aug:r("August","google-analytics-for-wordpress"),Sep:r("September","google-analytics-for-wordpress"),Oct:r("October","google-analytics-for-wordpress"),Nov:r("November","google-analytics-for-wordpress"),Dec:r("December","google-analytics-for-wordpress")},logo:this.$mi.assets+"/img/logo-MonsterInsights.png",logo2x:this.$mi.assets+"/img/logo-MonsterInsights@2x.png 2x"}},mounted(){this.$store.dispatch("$_reports/getReportData","yearinreview")},computed:{...v({yearinreview_data:"$_reports/yearinreview_data",addons:"$_addons/addons",yearInReview:"$_reports/yearinreview",date:"$_reports/date",license:"$_license/license",license_network:"$_license/license_network"}),link(){return this.$getUrl("logo","header","https://www.monsterinsights.com/lite/")},stringsWithYear(){return{text_year_in_review_still_calculating:d(r("Your %s Year in Review is still calculating. Please check back later to see how your website performed last year.","google-analytics-for-wordpress"),this.yearinreview_data.report_year),text_title:d(r("Your %s Analytics Report","google-analytics-for-wordpress"),this.yearinreview_data.report_year),text_sub_title:d(r("%s Year in Review","google-analytics-for-wordpress"),this.yearinreview_data.report_year),text_visitor_by_month_chart_tooltip:d(r("January 1, %1$s - December 31, %2$s","google-analytics-for-wordpress"),this.yearinreview_data.report_year,this.yearinreview_data.report_year),text_summary:d(r("See how your website performed this year and find tips along the way to help grow even more in %s!","google-analytics-for-wordpress"),this.yearinreview_data.next_year),text_audience_tip_title:d(r("A Tip for %s","google-analytics-for-wordpress"),this.yearinreview_data.next_year),text_grow_traffic_tip_title:d(r("A Tip For %s","google-analytics-for-wordpress"),this.yearinreview_data.next_year),text_plugins_section_summary:d(r("Try our other popular WordPress plugins to grow your website in %s.","google-analytics-for-wordpress"),this.yearinreview_data.next_year),text_communities_section_summary:d(r("Become a WordPress expert in %s. Join our amazing communities and take your website to the next level.","google-analytics-for-wordpress"),this.yearinreview_data.next_year),text_copyright_monsterinsights:d(r("Copyright MonsterInsights, %s MonsterInsights, LLC","google-analytics-for-wordpress"),this.yearinreview_data.next_year),text_amazing_next_year:d(r("Here's to an amazing %s!","google-analytics-for-wordpress"),this.yearinreview_data.next_year),report_title:d(r("Year In Review %s!","google-analytics-for-wordpress"),this.yearinreview_data.report_year)}},visitorByMonthData(){return{datasets:[{backgroundColor:"#338EEF",data:this.yearInReview.usersgraph.datapoints}],labels:this.yearInReview.usersgraph.labels}},bestMonthVisitorsSummary(){return d(S("Your best month was <strong>%1$s</strong> with <strong>%2$s visitor!</strong>","Your best month was <strong>%1$s</strong> with <strong>%2$s visitors!</strong>",this.yearInReview.usersgraph.max,"google-analytics-for-wordpress"),this.months[this.yearInReview.usersgraph.bestmonth],this.commaNumbers(this.yearInReview.usersgraph.max))},bestMonthTip(){return d(r("See the top Traffic Sources and Top Pages for the Month of %s in the Overview Report to replicate your success.","google-analytics-for-wordpress"),this.months[this.yearInReview.usersgraph.bestmonth])},countriesData(){let s=[],t=0;return this.yearInReview.countries&&this.yearInReview.countries.forEach(function(e){t++,s.push({number:t+".",text:'<span class="monsterinsights-flag monsterinsights-flag-'+e.iso.toLowerCase()+'"></span> '+e.name,right:e.sessions})}),s},demoGraphicsSummary(){return d(r("Your <strong>%1$s</strong> visitors came from <strong>%2$s</strong> different countries.","google-analytics-for-wordpress"),this.commaNumbers(this.yearInReview.info.users.value),this.commaNumbers(this.yearInReview.countries.length))},topCountryFlagClass(){return"monsterinsights-flag-"+this.yearInReview.countries[0].iso.toLowerCase()},topCountryVisitors(){return d(r("%s Visitors","google-analytics-for-wordpress"),this.commaNumbers(this.yearInReview.countries[0].sessions))},maxVisitorGender(){let s="",t=this.getMaxVisitorGenderObj();return t.gender==="male"&&(s=this.text_male.toLowerCase()),t.gender==="female"&&(s=this.text_female.toLowerCase()),t.gender==="unknown"&&(s=this.text_unknown.toLowerCase()),s},maxVisitorGenderSummary(){return d(r("%1$s% of your visitors were %2$s","google-analytics-for-wordpress"),this.getMaxVisitorGenderObj().percent,this.maxVisitorGender)},maxVisitorAverageAge(){return this.getMaxVisitorAgeObj().age},maxVisitorAgeSummary(){return d(r("%1$s% of your visitors were between the ages of %2$s","google-analytics-for-wordpress"),this.getMaxVisitorGenderObj().percent,this.maxVisitorAverageAge)},behaviourSummary(){const s=parseInt(this.yearInReview.info.users.value),t=parseInt(this.yearInReview.info.pageviews.value),e=s===0?0:t/s,o=d(S("Your <strong>%s</strong> visitor","Your <strong>%s</strong> visitors",s,"google-analytics-for-wordpress"),this.commaNumbers(s)),i=d(S("viewed a total of <strong>%s</strong> page.","viewed a total of <strong>%s</strong> pages.",t,"google-analytics-for-wordpress"),this.commaNumbers(t)),a=d(S("That's an average of %s page for each visitor!","That's an average of %s pages for each visitor!",e,"google-analytics-for-wordpress"),this.commaNumbers(e,2));return o+" "+i+"<br /><span class='average-page-per-user'>"+a+"</span>"},topPages(){let s=[],t=0;return this.yearInReview.toppages&&this.yearInReview.toppages.forEach(function(e){t++;let o=e.hostname?'<a href="'+e.hostname+e.url+'" target="_blank" rel="noreferrer noopener">'+e.title+"</a>":e.title;s.push({number:t+".",text:o,right:e.sessions})}),s},eachVisitorSpentSummary(){return d(r("Each visitor spent an average of <strong>%1$s minutes</strong> on your website in <strong>%2$s</strong>.","google-analytics-for-wordpress"),this.commaNumbers(this.yearInReview.info.duration.avg_minutes,2),this.yearinreview_data.report_year)},mostVisitorsDevice(){if(this.yearInReview.devices){let s=this.yearInReview.devices,t=0,e=[];for(let o in s)s.hasOwnProperty(o)&&s[o]>t&&(e.name=o,e.percent=s[o],t=s[o]);return e}return!1},mostVisitorsDeviceClassName(){return"monsterinsights-yir-most-visitors-device is-device-"+this.mostVisitorsDevice.name},mostVisitorsDeviceSummary(){return d(r("Most of your visitors viewed your website from their <strong>%s</strong> device.","google-analytics-for-wordpress"),this.mostVisitorsDevice.name)},mostVisitorsDevicePercent(){return d(r("%1$s% of your visitors were on a %2$s device.","google-analytics-for-wordpress"),this.mostVisitorsDevice.percent,this.mostVisitorsDevice.name)},devicesData(){return this.yearInReview.devices?{desktop:{label:r("Desktop","google-analytics-for-wordpress"),value:this.yearInReview.devices.desktop,color:"#6AB1FC"},tablet:{label:r("Tablet","google-analytics-for-wordpress"),value:this.yearInReview.devices.tablet,color:"#AAD3FF"},mobile:{label:r("Mobile","google-analytics-for-wordpress"),value:this.yearInReview.devices.mobile,color:"#338EEF"}}:!1},referralsData(){let s=[],t=0;return this.yearInReview.referrals&&this.yearInReview.referrals.forEach(function(e){t++,s.push({number:t+".",text:'<img src="https://www.google.com/s2/favicons?domain=http://'+e.url+'" />'+e.url,right:e.sessions})}),s},searchConsoleSampleData(){return[{number:1,text:"search term one",right:7978},{number:2,text:"search term two",right:79789},{number:3,text:"search three",right:897},{number:4,text:"search four",right:797},{number:5,text:"search term five",right:299}]}},methods:{isAddonActive(s){return this.addons[s]?this.addons[s].active:!1},commaNumbers(s,t=0){return parseFloat(parseFloat(s).toFixed(t)).toLocaleString("en")},isMoreVisitors(){return this.yearInReview.info.users.value>this.yearInReview.info.users.prev},getMaxVisitorGenderObj(){let s=this.yearInReview.gender,t=0,e={};return s===void 0||s.forEach(function(o){o.percent>t&&(t=o.percent,e=o)}),e},getMaxVisitorAgeObj(){let s=this.yearInReview.age,t=0,e={};return s.forEach(function(o){o.percent>t&&(t=o.percent,e=o)}),e},pluginsList(){let s=["optinmonster","wpforms-lite","userfeedback-lite","wp-mail-smtp","all-in-one-seo-pack","coming-soon","rafflepress","pushengage","instagram-feed","custom-facebook-feed","feeds-for-youtube","custom-twitter-feeds","trustpulse-api","searchwp-live-ajax-search","affiliate-wp","stripe","easy-digital-downloads","sugar-calendar-lite","charitable","insert-headers-and-footers","duplicator"],t=[];return s.forEach(e=>{if(this.addons[e]){let o=Object.create(this.addons[e]);o.type="licensed",t.push(o)}}),t},hasSunsetData(){return!1}}};var Rr=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-reports-page",class:["monsterinsights-report-year-in-review","monsterinsights-report-row",t.yearInReview.is_enabled?"":"monsterinsights-yir-report-calculating-row"]},[t.yearInReview.is_enabled?t._e():e("div",{staticClass:"monsterinsights-yir-top-header monsterinsights-yir-report-calculating"},[e("p",{staticClass:"monsterinsights-yir-summary",domProps:{textContent:t._s(t.stringsWithYear.text_year_in_review_still_calculating)}}),e("router-link",{staticClass:"monsterinsights-navigation-tab-link",attrs:{to:"/"},domProps:{textContent:t._s(t.text_back_to_overview_report)}})],1),t.yearInReview.is_enabled?e("div",[e("div",{staticClass:"monsterinsights-logo-area",attrs:{"data-html2canvas-class":"display-flex-important"}},[e("a",{attrs:{href:t.link,target:"_blank",rel:"noopener"}},[e("img",{attrs:{src:t.logo,srcset:t.logo2x}})])]),t.hasSunsetData()?e("div",{staticClass:"monsterinsights-sunset-warning monsterinsights-blue-warning",domProps:{innerHTML:t._s(t.text_sunset_warning)}}):t._e(),e("header",{staticClass:"monsterinsights-yir-top-header"},[e("h1",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.stringsWithYear.text_title)}})]),e("section",{staticClass:"monsterinsights-yir-audience"},[e("year-in-review-reports-pdf-export",{staticClass:"monsterinsights-export-button",attrs:{"report-title":t.stringsWithYear.report_title}}),e("h2",{staticClass:"monsterinsights-yir-purple-title monsterinsights-yir-title",domProps:{textContent:t._s(t.text_audience_section_title)}}),e("h3",{staticClass:"monsterinsights-yir-summary"},[t.isMoreVisitors?e("span",{domProps:{textContent:t._s(t.text_popular)}}):t._e(),e("span",[e("strong",{domProps:{textContent:t._s(t.commaNumbers(t.yearInReview.info.users.value)+t.text_visitors)}}),t._v(".")]),e("br"),e("span",{domProps:{innerHTML:t._s(t.bestMonthVisitorsSummary)}})]),e("div",{staticClass:"monsterinsights-yir-total-visitors-sessions"},[e("div",{staticClass:"monsterinsights-yir-visitors monsterinsights-yir-card monsterinsights-yir-blue-card"},[e("h4",{staticClass:"monsterinsights-yir-card-title",domProps:{textContent:t._s(t.text_total_visitors)}}),e("span",{staticClass:"monsterinsights-yir-number",domProps:{textContent:t._s(t.commaNumbers(t.yearInReview.info.users.value))}})]),e("div",{staticClass:"monsterinsights-yir-sessions monsterinsights-yir-card monsterinsights-yir-green-card"},[e("h4",{staticClass:"monsterinsights-yir-card-title",domProps:{textContent:t._s(t.text_total_sessions)}}),e("span",{staticClass:"monsterinsights-yir-number",domProps:{textContent:t._s(t.commaNumbers(t.yearInReview.info.sessions.value))}})])]),e("div",{staticClass:"monsterinsights-yir-visitor-by-chart monsterinsights-yir-chart"},[e("report-year-in-review-by-month",{attrs:{id:"visitorbymonth",chartData:t.visitorByMonthData,title:t.text_visitor_by_month_chart_title,"sub-title":t.stringsWithYear.text_visitor_by_month_chart_tooltip}})],1),e("report-year-in-review-tip",{attrs:{title:t.stringsWithYear.text_audience_tip_title,summary:t.bestMonthTip}})],1),e("section",{staticClass:"monsterinsights-yir-demographics monsterinsights-yir-map-bg"},[e("h2",{staticClass:"monsterinsights-yir-title monsterinsights-yir-purple-title",domProps:{textContent:t._s(t.text_section_demographics_title)}}),e("h3",{staticClass:"monsterinsights-yir-summary",domProps:{innerHTML:t._s(t.demoGraphicsSummary)}}),e("div",{staticClass:"monsterinsights-yir-countries"},[e("div",{staticClass:"monsterinsights-yir-top-country"},[e("h4",{staticClass:"monsterinsights-yir-top-country-name",domProps:{textContent:t._s(t.yearInReview.countries[0].name)}}),e("h5",{staticClass:"monsterinsights-yir-top-country-visitors",domProps:{textContent:t._s(t.topCountryVisitors)}})]),e("div",{staticClass:"monsterinsights-yir-top-countries-graph monsterinsights-yir-chart"},[e("report-year-in-review-list-box",{attrs:{title:t.text_countries,"sub-title":t.text_best_month_visitors,rows:t.countriesData}})],1)])]),e("section",{staticClass:"monsterinsights-yir-behavior"},[e("h2",{staticClass:"monsterinsights-yir-title monsterinsights-yir-purple-title",domProps:{textContent:t._s(t.text_section_behavior_title)}}),e("h3",{staticClass:"monsterinsights-yir-summary",domProps:{innerHTML:t._s(t.behaviourSummary)}}),e("div",{staticClass:"monsterinsights-yir-pages-data"},[e("div",{staticClass:"monsterinsights-yir-pages-summary"},[e("div",{staticClass:"with-behavior-icon"}),e("br"),e("span",{staticClass:"monsterinsights-yir-time-spent",domProps:{textContent:t._s(t.text_time_spent)}}),e("div",{staticClass:"monsterinsights-yir-total-time-spent-wrapper"},[e("h4",{staticClass:"monsterinsights-yir-total-time-spent"},[e("span",{staticClass:"monsterinsights-yir-number",domProps:{textContent:t._s(t.commaNumbers(t.yearInReview.info.duration.total_minutes))}}),e("span",{staticClass:"monsterinsights-yir-type",domProps:{textContent:t._s(t.text_minutes)}})]),e("h5",{staticClass:"monsterinsights-yir-each-visitor-spent monsterinsights-blue-warning",domProps:{innerHTML:t._s(t.eachVisitorSpentSummary)}})])]),e("div",{staticClass:"monsterinsights-yir-top-pages-graph monsterinsights-yir-chart"},[e("report-year-in-review-list-box",{attrs:{title:t.text_top_pages_graph_title,"sub-title":t.text_top_pages_graph_subtitle,rows:t.topPages}})],1)]),e("h3",{class:t.mostVisitorsDeviceClassName,domProps:{innerHTML:t._s(t.mostVisitorsDeviceSummary)}}),e("div",{staticClass:"monsterinsights-yir-visitors-info"},[e("report-year-in-review-device-usage",{attrs:{id:"devices",deviceData:t.devicesData,title:t.text_device_type,subtitle:t.mostVisitorsDevicePercent}})],1),e("div",{staticClass:"monsterinsights-yir-grow-traffic-tip"},[e("report-year-in-review-tip",{attrs:{title:t.stringsWithYear.text_grow_traffic_tip_title,summary:t.text_grow_traffic_tip_summary,"link-text":t.text_grow_traffic_tip_link_text,link:t.text_grow_traffic_tip_link}})],1)]),e("div",{staticClass:"monsterinsights-yir-visitors-come-from"},[e("h2",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_visitors_come_from)}}),e("div",{staticClass:"monsterinsights-yir-keywords-referrals"},[e("div",{staticClass:"monsterinsights-yir-referrals"},[e("report-year-in-review-list-box",{attrs:{title:t.text_top_referrals,"sub-title":t.text_pageviews,tooltip:t.text_top_referrals_tooltip,rows:t.referralsData}})],1)])]),e("div",{staticClass:"monsterinsights-yir-grow-traffic-tip"},[e("report-year-in-review-tip",{attrs:{title:t.text_opportunity_tip_title,summary:t.text_opportunity_tip_summary,"link-text":t.text_opportunity_tip_link_text,link:t.text_opportunity_tip_link}})],1),e("section",{staticClass:"monsterinsights-yir-thank-you"},[e("h2",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_thank_you_section_title)}}),e("h3",{staticClass:"monsterinsights-yir-summary",domProps:{textContent:t._s(t.text_thank_you_section_summary)}}),e("div",{staticClass:"monsterinsights-yir-dashboard-preview"}),e("h4",{staticClass:"monsterinsights-yir-amazing-year",domProps:{textContent:t._s(t.stringsWithYear.text_amazing_next_year)}}),e("div",{staticClass:"monsterinsights-yir-authors"},[e("div",{staticClass:"monsterinsights-yir-author"},[e("div",{staticClass:"monsterinsights-yir-thumbnail syed"}),e("span",{staticClass:"monsterinsights-yir-name",domProps:{textContent:t._s(t.text_syed_balkhi)}})]),e("div",{staticClass:"monsterinsights-yir-author"},[e("div",{staticClass:"monsterinsights-yir-thumbnail chris"}),e("span",{staticClass:"monsterinsights-yir-name",domProps:{textContent:t._s(t.text_chris_christoff)}})])]),e("div",{staticClass:"monsterinsights-yir-write-review"},[e("div",{staticClass:"monsterinsights-yir-content"},[e("span",{domProps:{textContent:t._s(t.text_enjoying_monsterinsights)}}),e("h3",{domProps:{textContent:t._s(t.text_leave_review)}})]),t._m(0),e("div",{staticClass:"monsterinsights-yir-review-button"},[e("a",{attrs:{href:"https://wordpress.org/support/view/plugin-reviews/google-analytics-for-wordpress?filter=5",target:"_blank"},domProps:{textContent:t._s(t.text_write_review)}})])])]),e("section",{staticClass:"monsterinsights-yir-year-in-review-plugins-block",attrs:{data:"html2canvas-ignore"}},[e("h2",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_plugins_section_title)}}),e("div",{staticClass:"monsterinsights-yir-plugins"},t._l(t.pluginsList(),function(o,i){return e("addon-block",{key:i,attrs:{addon:o,"is-addon":!1}})}),1)]),e("section",{staticClass:"monsterinsights-yir-join-communities",attrs:{data:"html2canvas-ignore"}},[e("h2",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_communities_section_title)}}),e("div",{staticClass:"monsterinsights-yir-communities"},[e("div",{staticClass:"monsterinsights-yir-community"},[e("div",{staticClass:"monsterinsights-yir-thumbnail with-chat-icon"}),e("h3",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_facebook_group)}}),e("p",{staticClass:"monsterinsights-yir-details",domProps:{textContent:t._s(t.text_facebook_group_summary)}}),e("a",{staticClass:"monsterinsights-yir-link",attrs:{href:"https://www.facebook.com/groups/wpbeginner/",target:"_blank"},domProps:{textContent:t._s(t.text_facebook_join_button)}})]),e("div",{staticClass:"monsterinsights-yir-community"},[e("div",{staticClass:"monsterinsights-yir-thumbnail with-pen-icon"}),e("h3",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_wpbeginner_community_title)}}),e("p",{staticClass:"monsterinsights-yir-details",domProps:{textContent:t._s(t.text_wpbeginner_community_summary)}}),e("a",{staticClass:"monsterinsights-yir-link",attrs:{href:"https://www.wpbeginner.com/",target:"_blank"},domProps:{textContent:t._s(t.text_visit_wpbeginner)}})]),e("div",{staticClass:"monsterinsights-yir-community"},[e("div",{staticClass:"monsterinsights-yir-thumbnail with-global-icon"}),e("h3",{staticClass:"monsterinsights-yir-title",domProps:{textContent:t._s(t.text_follow_us)}}),e("p",{staticClass:"monsterinsights-yir-details",domProps:{textContent:t._s(t.text_follow_us_summary)}}),t._m(1)])])]),e("footer",{staticClass:"monsterinsights-yir-footer"},[e("div",{domProps:{textContent:t._s(t.stringsWithYear.text_copyright_monsterinsights)}}),e("div",{staticClass:"monsterinsights-yir-text-right"},[e("div",{staticClass:"monsterinsights-footer-logo"},[e("a",{attrs:{href:t.link,target:"_blank",rel:"noopener"}},[e("img",{attrs:{src:t.logo,srcset:t.logo2x}})])])])])]):t._e()])},Lr=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"monsterinsights-yir-rating"},[t("ul",{staticClass:"monsterinsights-yir-five-star"},[t("li",{staticClass:"monsterinsights-yir-five-star-icon"}),t("li",{staticClass:"monsterinsights-yir-five-star-icon"}),t("li",{staticClass:"monsterinsights-yir-five-star-icon"}),t("li",{staticClass:"monsterinsights-yir-five-star-icon"}),t("li",{staticClass:"monsterinsights-yir-five-star-icon"})])])},function(){var s=this,t=s._self._c;return t("ul",{staticClass:"monsterinsights-yir-social-links"},[t("li",[t("a",{staticClass:"with-small-youtube-icon",attrs:{href:"https://www.youtube.com/channel/UCnB-GV6lyQYgBLLhQr-kuVw",target:"_blank"}})]),t("li",[t("a",{staticClass:"with-small-fb-icon",attrs:{href:"https://www.facebook.com/monsterinsights",target:"_blank"}})]),t("li",[t("a",{staticClass:"with-small-twitter-icon",attrs:{href:"https://twitter.com/monsterinsights",target:"_blank"}})]),t("li",[t("a",{staticClass:"with-small-linkedin-icon",attrs:{href:"https://www.linkedin.com/company/awesome-motive-inc./",target:"_blank"}})])])}],Pr=n($r,Rr,Lr,!1,null,null,null,null);const Dr=Pr.exports,Sr={name:"ReportSearchConsole",components:{ReportUpsellOverlay:f},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_sitespeed:r("Site Speed","google-analytics-for-wordpress"),text_sitespeed_upsell:"",fake_headers:["Form Name or ID","Impressions","Conversions","Conversion Rate"]}}};var Mr=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-site-speed"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_sitespeed)}})]),e("div",{staticClass:"monsterinsights-report-row monsterinsights-site-speed-blur"}),e("report-upsell-overlay",{attrs:{report:"sitespeed"}})],1)},Tr=[],Er=n(Sr,Mr,Tr,!1,null,null,null,null);const Fr=Er.exports;g.directive("click-outside",{bind:function(s,t,e){s.clickOutsideEvent=function(o){s===o.target||s.contains(o.target)||e.context[t.expression](o)},document.body.addEventListener("click",s.clickOutsideEvent)},unbind:function(s){document.body.removeEventListener("click",s.clickOutsideEvent)}});const G=783;let N=!1;const Ir={name:"ReportsDatePicker",data(){const s=this;return{config:{mode:"range",disableMobile:"true",dateFormat:"Y-m-d",disable:[function(t){let e=t,o=m(m().tz(s.$mi.timezone).format("YYYY-MM-DD")),a=m.duration(o.diff(e)).asDays();a=a+1;let h=m(t).tz(s.$mi.timezone).subtract(a,"d").tz(s.$mi.timezone),p=m(),u=h.isBetween(m("01-01-2005","MM-DD-YYYY").tz(s.$mi.timezone),p),_=m(t).isBetween(m("01-01-2005","MM-DD-YYYY").tz(s.$mi.timezone),p);return!u||!_}],static:!0,inline:!0},isMobile:window.innerWidth<G,dropdownVisible:!1,isCalendarOpen:!1,dateInputStart:"",dateInputEnd:"",dateCompareStart:"",dateCompareEnd:"",text_compare_to_previous:r("Compare to Previous","google-analytics-for-wordpress"),text_cancel:r("Cancel","google-analytics-for-wordpress"),text_apply:r("Apply","google-analytics-for-wordpress"),text_date_range:r("Date Range","google-analytics-for-wordpress"),text_compare_to:r("Compare To","google-analytics-for-wordpress"),selectedInterval:"last30days",compareDateLocal:!1}},props:{isGetReportData:{type:Boolean,default:!0},compareOptions:{type:Boolean,default:!0}},computed:{...v({date:"$_reports/date",activeReport:"$_reports/activeReport",mobileTableExpanded:"$_reports/mobileTableExpanded"}),selectedIntervalText(){if(this.date.compareReport)return d(r("%1$sComparison:%2$s %3$s To %4$s","google-analytics-for-wordpress"),'<b class="monsterinsights-custom-dates-label">',"</b>",this.date.intervalText,this.date.intervalCompareText);if(this.interval){let e=this.intervals[this.interval];return this.getIntervalFormatted(e.text,e.start,e.end)}let s=m(this.date.start),t=m(this.date.end);return d(r("%1$sCustom dates:%2$s %3$s - %4$s","google-analytics-for-wordpress"),'<b class="monsterinsights-custom-dates-label">',"</b>",s.format("MMMM D"),t.format("MMMM D, YYYY"))},text_datepicker_placeholder(){return this.isMobile?r("Custom Date Range","google-analytics-for-wordpress"):r("Set Custom Date Range","google-analytics-for-wordpress")},text_mobile_details(){return this.mobileTableExpanded?r("Hide Details","google-analytics-for-wordpress"):r("Show Details","google-analytics-for-wordpress")},interval:{set(s){this.$store.commit("$_reports/UPDATE_INTERVAL",s)},get(){let s=this.date.interval;return(s===30||s==="false")&&(s="last30days"),s===7&&(s="last7days"),s}},local_date:{set(s){this.$store.commit("$_reports/UPDATE_DATE_TEXT",s)},get(){return this.date.text}},comparePickerDate:{set(s){this.$store.commit("$_reports/UPDATE_DATE_STORE",{compareText:s})},get(){return this.date.compareText}},dropdownClass(){let s="monsterinsights-reports-intervals-dropdown";return this.dropdownVisible||(s+=" monsterinsights-hide"),s},intervals(){let s=this.$mi_intervals();return typeof this.$route<"u"&&this.$route.name==="queries"&&(delete s.today,delete s.yesterday),s},compareDate:{set(s){this.compareDateLocal=s,s||this.$store.commit("$_reports/UPDATE_DATE_STORE",{compareReport:s}),this.selectedInterval&&(this.dropdownVisible=!1,this.sendReportRequest())},get(){return this.compareDateLocal}}},components:{flatPickr:_t},methods:{updateDates(s){if(this.compareDate)return;const t=this;this.dropdownVisible=!1;let e={};s[0]&&s[1]&&(e.start=this.getFormattedDate(s[0]),e.end=this.getFormattedDate(s[1]),this.interval=!1,document.activeElement.blur(),this.$store.commit("$_reports/UPDATE_DATE",e),t.$emit("date-changed"),this.sendReportRequest())},getFormattedDate(s){if(s instanceof Date){let t=this.addLeadingZero(s.getMonth()+1),e=this.addLeadingZero(s.getDate());s=s.getFullYear()+"-"+t+"-"+e}return s},addLeadingZero(s){return s<10&&s>0?0+s.toString():s},getInterval(s){const t=this;this.dropdownVisible=!1,this.interval=s.interval,this.selectedInterval=s.interval,this.$store.commit("$_reports/UPDATE_DATE_STORE",{start:s.start.format("YYYY-MM-DD"),end:s.end.format("YYYY-MM-DD"),compareStart:s.compareStart.format("YYYY-MM-DD"),compareEnd:s.compareEnd.format("YYYY-MM-DD")}),t.$emit("date-changed",s.interval),window.blur(),this.sendReportRequest(),this.defaultSelectClear()},getIntervalText(s,t){return s.format("YYYYMMDD")===t.format("YYYYMMDD")?s.format("MMMM D, YYYY"):s.format("MMMM D")+" - "+t.format("MMMM D, YYYY")},getIntervalFormatted(s,t,e){return"<b>"+s+'<span class="monsterinsights-datepicker-colon">:</span></b> <span class="monsterinsights-datepicker-interval-dates">'+this.getIntervalText(t,e)+"</span>"},getButtonClass(s){let t="monsterinsights-button";return s===this.interval&&(t+=" monsterinsights-selected-interval"),t},hideMobileTables(){this.mobileTableExpanded&&this.$store.commit("$_reports/CONTRACT_TABLES")},showMobileTables(){this.mobileTableExpanded||this.$store.commit("$_reports/EXPAND_TABLES")},toggleMobileTables(){this.mobileTableExpanded?this.hideMobileTables():this.showMobileTables()},handleResize(){N||(N=!0,window.requestAnimationFrame?window.requestAnimationFrame(this.resizeCallback):setTimeout(this.resizeCallback,66))},resizeCallback(){this.isMobile=window.innerWidth<G,N=!1},openFlatPicker(){this.isCalendarOpen=!0,this.selectedInterval=!1,this.$store.commit("$_reports/UPDATE_DATE_STORE",{start:"",end:"",compareStart:"",compareEnd:""})},showIfFlatpickr(){return this.$refs.datePicker&&(this.isCalendarOpen||!this.interval)?"":"monsterinsights-hide"},maybeHideDropdown(){this.isCalendarOpen=!1,this.dropdownVisible&&(this.dropdownVisible=!1)},intervalButtonClass(s){let t="monsterinsights-button ";return this.interval===s&&(t+=" monsterinsights-interval-active"),t},toggleDropdown(){this.dropdownVisible=!this.dropdownVisible,this.isCalendarOpen=!1},onCancelDatepicker(){this.isCalendarOpen=!1,this.dropdownVisible=!1},onApplyDatepicker(){this.isReadyToApplyDatepicker()&&(this.dropdownVisible=!1,this.interval=!1,window.blur(),this.sendReportRequest())},onComparePickerChange(s){s[0]&&(this.dateCompareStart=m(s[0]).format("MMMM D, YYYY"),this.updateDateToStore(s[0],"compareStart")),s[1]&&(this.dateCompareEnd=m(s[1]).format("MMMM D, YYYY"),this.updateDateToStore(s[1],"compareEnd"))},onDatePickerChange(s){s[0]&&(this.dateInputStart=m(s[0]).format("MMMM D, YYYY"),this.updateDateToStore(s[0],"start")),s[1]&&(this.dateInputEnd=m(s[1]).format("MMMM D, YYYY"),this.updateDateToStore(s[1],"end"))},updateDateToStore(s,t){this.$store.commit("$_reports/UPDATE_DATE_STORE",{[t]:this.getFormattedDate(s)})},sendReportRequest(){this.isGetReportData&&(this.$store.commit("$_reports/UPDATE_DATE_STORE",{compareReport:this.compareDateLocal}),this.$store.dispatch("$_reports/getReportData",this.activeReport).then(()=>{this.$emit("reports-updated")}))},isReadyToApplyDatepicker(){return this.compareDate?this.date.compareStart&&this.date.compareEnd:!0},defaultSelectClear(){this.dateInputStart="",this.dateInputEnd="",this.dateCompareStart="",this.dateCompareEnd="",this.local_date="",this.comparePickerDate=""}},mounted(){this.compareDateLocal=this.date.compareReport,this.selectedInterval=this.date.interval,this.selectedInterval===!1&&(this.date.start&&(this.dateInputStart=m(this.date.start).format("MMMM D, YYYY")),this.date.end&&(this.dateInputEnd=m(this.date.end).format("MMMM D, YYYY"))),this.date.compareReport&&(this.date.compareStart&&(this.dateCompareStart=m(this.date.compareStart).format("MMMM D, YYYY")),this.date.compareEnd&&(this.dateCompareEnd=m(this.date.compareEnd).format("MMMM D, YYYY"))),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize)}};var Ar=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-reports-datepicker"},[e("div",{staticClass:"monsterinsights-reports-interval-dropdown-container"},[e("button",{staticClass:"monsterinsights-reports-interval-date-info",on:{click:function(o){return o.stopPropagation(),t.toggleDropdown.apply(null,arguments)}}},[e("span",{domProps:{innerHTML:t._s(t.selectedIntervalText)}}),e("i",{staticClass:"monstericon-calendar-alt"})]),e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.maybeHideDropdown,expression:"maybeHideDropdown"}],class:t.dropdownClass},[e("div",{staticClass:"monsterinsights-datepicker-default-buttons"},[t._l(t.intervals,function(o,i){return e("div",{key:i},[e("button",{class:t.intervalButtonClass(o.interval),domProps:{innerHTML:t._s(t.getIntervalFormatted(o.text,o.start,o.end))},on:{click:function(a){return t.getInterval(o)}}})])}),t._t("beforeinterval"),e("div",[e("button",{class:t.intervalButtonClass(!1),on:{click:t.openFlatPicker}},[e("i",{staticClass:"monstericon-calendar-alt"}),t._v(" "),e("span",{domProps:{textContent:t._s(t.text_datepicker_placeholder)}})])]),t.compareOptions?e("div",[e("div",{staticClass:"monsterinsights-datepicker-input-switch"},[e("label",[e("span",{class:{"monsterinsights-styled-checkbox":!0,"monsterinsights-styled-checkbox-checked":t.compareDate}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.compareDate,expression:"compareDate"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.compareDate)?t._i(t.compareDate,null)>-1:t.compareDate},on:{change:function(o){var i=t.compareDate,a=o.target,l=!!a.checked;if(Array.isArray(i)){var h=null,p=t._i(i,h);a.checked?p<0&&(t.compareDate=i.concat([h])):p>-1&&(t.compareDate=i.slice(0,p).concat(i.slice(p+1)))}else t.compareDate=l}}}),e("span",{staticClass:"monsterinsights-checkbox-label",domProps:{textContent:t._s(t.text_compare_to_previous)}})])])]):t._e()],2),e("div",{class:["monsterinsights-datepicker-range-wrapper",t.showIfFlatpickr()]},[e("div",{staticClass:"monsterinsights-datepicker-range-inputs"},[e("div",{staticClass:"monsterinsights-datepicker-range-input"},[e("h3",{domProps:{textContent:t._s(t.text_date_range)}}),e("div",{staticClass:"monsterinsights-datepicker-range-input-fields"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.dateInputStart,expression:"dateInputStart"}],attrs:{type:"text"},domProps:{value:t.dateInputStart},on:{input:function(o){o.target.composing||(t.dateInputStart=o.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.dateInputEnd,expression:"dateInputEnd"}],attrs:{type:"text"},domProps:{value:t.dateInputEnd},on:{input:function(o){o.target.composing||(t.dateInputEnd=o.target.value)}}})])]),t.compareDate?e("div",{staticClass:"monsterinsights-datepicker-range-input"},[e("h3",{domProps:{textContent:t._s(t.text_compare_to)}}),e("div",{staticClass:"monsterinsights-datepicker-range-input-fields"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.dateCompareStart,expression:"dateCompareStart"}],attrs:{type:"text"},domProps:{value:t.dateCompareStart},on:{input:function(o){o.target.composing||(t.dateCompareStart=o.target.value)}}}),e("input",{directives:[{name:"model",rawName:"v-model",value:t.dateCompareEnd,expression:"dateCompareEnd"}],attrs:{type:"text"},domProps:{value:t.dateCompareEnd},on:{input:function(o){o.target.composing||(t.dateCompareEnd=o.target.value)}}})])]):t._e()]),e("div",{staticClass:"monsterinsights-datepicker-calender-wrapper"},[e("div",{staticClass:"monsterinsights-datepicker-calenders"},[e("div",{staticClass:"monsterinsights-datepicker-calender"},[e("flat-pickr",{ref:"datePicker",staticClass:"monsterinsights-datepicker",attrs:{config:t.config},on:{"on-close":t.updateDates,"on-change":t.onDatePickerChange},model:{value:t.local_date,callback:function(o){t.local_date=o},expression:"local_date"}})],1),t.compareDate?e("div",{staticClass:"monsterinsights-datepicker-calender"},[e("flat-pickr",{ref:"comparePicker",staticClass:"monsterinsights-datepicker",attrs:{config:t.config},on:{"on-change":t.onComparePickerChange},model:{value:t.comparePickerDate,callback:function(o){t.comparePickerDate=o},expression:"comparePickerDate"}})],1):t._e()]),t.compareDate?e("div",{staticClass:"monsterinsights-datepicker-calenders-bottom"},[e("button",{staticClass:"monsterinsights-button monsterinsights-button-secondary",domProps:{textContent:t._s(t.text_cancel)},on:{click:t.onCancelDatepicker}}),e("button",{class:{"monsterinsights-button":!0,"monsterinsights-button-primary":!0,"monsterinsights-button-disabled":!t.isReadyToApplyDatepicker()},attrs:{disabled:!t.isReadyToApplyDatepicker()},domProps:{textContent:t._s(t.text_apply)},on:{click:t.onApplyDatepicker}})]):t._e()])])])]),e("button",{staticClass:"monsterinsights-button monsterinsights-mobile-details-toggle",domProps:{textContent:t._s(t.text_mobile_details)},on:{click:t.toggleMobileTables}})])},Br=[],Nr=n(Ir,Ar,Br,!1,null,null,null,null);const Or=Nr.exports,Hr={name:"MIReportsDatePicker",extends:Or},Yr=null,Ur=null;var Vr=n(Hr,Yr,Ur,!1,null,null,null,null);const nt=Vr.exports,Zr={name:"ReportMedia",components:{ReportsDatePicker:nt,ReportOverviewLineChartApex:V,ReportTableBox:C,ReportUpsellOverlay:f},data(){return{text_media_report:"Media Report",text_graph_title:"Video Plays",text_chart_tooltip:d(r("Video %s Plays","google-analytics-for-wordpress"),"<br />"),video_plays_headers:["Video Details","Video Plays","Avg. Watch Time","Avg. % Watched","Completion Rate"]}},methods:{chartData(){let s={labels:[],datasets:[{labels:[],data:[],trend:[],timestamps:[]}]},t=c.date.month();for(let e=1;e<=30;e++){let o=String(e)+" "+t;s.labels.push(o),s.datasets[0].labels.push(o),s.datasets[0].data.push(c.datatype.number({min:5,max:10})),s.datasets[0].trend.push(c.datatype.number({min:50,max:100})),s.datasets[0].timestamps.push(Math.floor(new Date(o).getTime()/1e3))}return s},videoPlaysRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.words(3),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")}};var jr=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-media"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_media_report)}}),e("reports-date-picker")],1),e("div",{staticClass:"monsterinsights-report-box monsterinsights-report-row"},[e("h3",{domProps:{textContent:t._s(t.text_graph_title)}}),e("ReportOverviewLineChartApex",{attrs:{id:"media-chart","chart-data":t.chartData(),tooltipDescriptor:t.text_chart_tooltip}})],1),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.video_plays_headers,rows:t.videoPlaysRows()}})],1),e("report-upsell-overlay",{attrs:{report:"media"}})],1)},zr=[],Wr=n(Zr,jr,zr,!1,null,null,null,null);const Gr=Wr.exports,qr={date:{start:z().subtract(29,"days").format("YYYY-MM-DD"),end:z().format("YYYY-MM-DD"),interval:!1,text:""},mobileTableExpanded:!1,activeReport:"user-journey",journeyReports:{items:{},pagination:{}},filterForm:{search:"",sources:{value:"",label:"All Sources"},mediums:{value:"",label:"All Mediums"},campaigns:{value:"",label:"All Campaigns"}},noauth:!1,blur:!1,reauth:!1},Jr={date:s=>s.date,activeReport:s=>s.activeReport,mobileTableExpanded:s=>s.mobileTableExpanded,journeyReports:s=>s.journeyReports,filterForm:s=>s.filterForm,noauth:s=>s.noauth,reauth:s=>s.reauth,blur:s=>s.blur},Kr={UPDATE_INTERVAL:(s,t)=>{g.set(s.date,"interval",t)},UPDATE_DATE:(s,t)=>{t.start&&t.end&&(g.set(s.date,"start",t.start),g.set(s.date,"end",t.end))},UPDATE_DATE_TEXT:(s,t)=>{g.set(s.date,"text",t)},UPDATE_REPORT_DATA:(s,t)=>{s.journeyReports=t},updateFilterForm(s,t){s.filterForm[t.name]=t.value},ENABLE_BLUR(s){s.blur=!0},DISABLE_BLUR(s){s.blur=!1}};function M(s,t,e,o){let i=e?r("activate","google-analytics-for-wordpress"):r("install","google-analytics-for-wordpress");g.prototype.$swal({icon:"error",customClass:{container:"monsterinsights-swal"},title:r("Report Unavailable","google-analytics-for-wordpress"),html:d(r("Please %1$s the <strong>%2$s</strong> addon to view User journey reports.","google-analytics-for-wordpress"),i,o),allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!1,showCancelButton:!0,confirmButtonText:d(r("%s Addon","google-analytics-for-wordpress"),i.charAt(0).toUpperCase()+i.slice(1)),cancelButtonText:r("Dismiss","google-analytics-for-wordpress")}).then(function(a){a.value&&(e?Rt(s,s.rootState.$_addons.addons[t]):Lt(s,t))})}function Qr(s){s.dispatch("$_addons/getAddons",null,{root:!0}).then(t=>{if(!t)return;let e=s.rootState.$_addons.addons["user-journey"],o=s.rootState.$_addons.addons.ecommerce;if(!e.installed){M(s,"user-journey",!1,e.title);return}if(!e.active){M(s,"user-journey",!0,e.title);return}if(!o.installed){M(s,"ecommerce",!1,o.title);return}o.active||M(s,"ecommerce",!0,o.title)})}const Xr={getReportData(s,t={}){return new Promise(e=>{let o=new FormData;o.append("action","monsterinsights_user_journey_report"),o.append("nonce",g.prototype.$mi.nonce),o.append("search",s.state.filterForm.search),o.append("start_date",s.state.date.start),o.append("end_date",s.state.date.end),o.append("sources",s.state.filterForm.sources.value),o.append("mediums",s.state.filterForm.mediums.value),o.append("campaigns",s.state.filterForm.campaigns.value),o.append("page",t.page?t.page:1),F.post(g.prototype.$mi.ajax,o).then(i=>{i.data.success&&(s.commit("UPDATE_REPORT_DATA",{items:i.data.items,pagination:i.data.pagination}),e(!0)),i.data.demo&&(s.commit("UPDATE_REPORT_DATA",{items:i.data.items,pagination:{}}),e(!0),s.commit("$_app/ADD_NOTICE",{content:r("This is a demo report. The demo report will replaced after the first sale is tracked.","google-analytics-for-wordpress"),type:"warning",dismissable:!1,id:"user_journey_report_notice"},{root:!0})),e(!1)}).catch(i=>{s.commit("ENABLE_BLUR"),i.response.status===400&&Qr(s)})})}},q={namespaced:!0,state:qr,actions:Xr,getters:Jr,mutations:Kr},to={name:"AdminTableNavigation",props:{pagination:{type:Object,default:()=>({})}},data(){return{currentPage:1,filterValues:{},keywords:"",keywordsTimeout:null}},computed:{texts(){return{currentPage:r("Current Page",this.$_textDomain),firstPage:r("First Page",this.$_textDomain),prevPage:r("Previous Page",this.$_textDomain),nextPage:r("Next Page",this.$_textDomain),lastPage:r("Last Page",this.$_textDomain),of:r("of",this.$_textDomain)}}},methods:{goToPrev(){this.$emit("page-change",Number.parseInt(this.pagination.page)-1)},goToNext(){this.$emit("page-change",Number.parseInt(this.pagination.page)+1)},goToPage(s){this.$emit("page-change",s)}},mounted(){this.currentPage=this.pagination.page,this.filters&&this.filters.forEach(s=>{this.filterValues[s.id]=0})},watch:{"pagination.page"(s){this.currentPage=s}}};var eo=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-journey-report-pagination tablenav"},[e("div",{staticClass:"tablenav-pages",class:{"one-page":t.pagination.pages===1}},[t.pagination.pages>1?e("span",{staticClass:"pagination-links"},[t.pagination.page==1?[e("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("«")]),e("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("‹")])]:[e("a",{staticClass:"first-page button",attrs:{href:"#",role:"button"},on:{click:function(o){return o.preventDefault(),t.goToPage(1)}}},[e("span",{attrs:{"aria-hidden":"true"}},[t._v("«")])]),e("a",{staticClass:"prev-page button",attrs:{href:"#",role:"button"},on:{click:function(o){return o.preventDefault(),t.goToPrev.apply(null,arguments)}}},[e("span",{attrs:{"aria-hidden":"true"}},[t._v("‹")])])],e("span",{staticClass:"paging-input"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.currentPage,expression:"currentPage"}],staticClass:"current-page",attrs:{id:"current-page-selector",type:"text",name:"paged",size:"1","aria-describedby":"table-paging",max:t.pagination.pages},domProps:{value:t.currentPage},on:{keyup:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"enter",13,o.key,"Enter")?null:t.goToPage(t.currentPage)},input:function(o){o.target.composing||(t.currentPage=o.target.value)}}}),e("span",{staticClass:"tablenav-paging-text"},[t._v(" "+t._s(t.texts.of)+" "),e("span",{staticClass:"total-pages"},[t._v(t._s(t.pagination.pages))])])]),t.pagination.page==t.pagination.pages?[e("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("›")]),e("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("»")])]:[e("a",{staticClass:"next-page button",attrs:{href:"#",role:"button"},on:{click:function(o){return o.preventDefault(),t.goToNext.apply(null,arguments)}}},[e("span",{attrs:{"aria-hidden":"true"}},[t._v("›")])]),e("a",{staticClass:"last-page button",attrs:{href:"#",role:"button"},on:{click:function(o){return o.preventDefault(),t.goToPage(t.pagination.pages)}}},[e("span",{attrs:{"aria-hidden":"true"}},[t._v("»")])])]],2):t._e()])])},so=[],ro=n(to,eo,so,!1,null,null,null,null);const lt=ro.exports,oo={name:"UserJourneyReport",components:{ReportsDatePicker:nt,Multiselect:ft,Pagination:lt},data(){return{parameters:{sources:[{value:"",label:"All Sources"}],mediums:[{value:"",label:"All Mediums"}],campaigns:[{value:"",label:"All Campaigns"}]},isMobileView:!1,currentExpandedRow:null,noItemText:r("No User Journey's matched your filters. Please remove some conditions and try again.","google-analytics-for-wordpress"),dataFetched:!1}},computed:{...v({journeyReports:"$_reports/journeyReports",filterForm:"$_reports/filterForm"}),searchJourneysField:{get(){return this.filterForm.search},set(s){this.$store.commit("$_reports/updateFilterForm",{name:"search",value:s})}},filterFieldCampaigns:{get(){return this.filterForm.campaigns},set(s){this.$store.commit("$_reports/updateFilterForm",{name:"campaigns",value:s})}},filterFieldMediums:{get(){return this.filterForm.mediums},set(s){this.$store.commit("$_reports/updateFilterForm",{name:"mediums",value:s})}},filterFieldSources:{get(){return this.filterForm.sources},set(s){this.$store.commit("$_reports/updateFilterForm",{name:"sources",value:s})}},showUpsell(){if(!this.$isPro())return!0;let s=this.$store.getters["$_license/license"];return!!(s&&s.type==="plus")}},methods:{getFilterParams(){if(this.showUpsell)return;let s=new FormData;s.append("action","monsterinsights_user_journey_report_filter_params"),s.append("nonce",this.$mi.nonce),F.post(this.$mi.ajax,s).then(t=>{if(t.data.success){let e=t.data.data;e.campaigns.forEach(o=>{this.parameters.campaigns.push({value:o,label:o})}),e.mediums.forEach(o=>{this.parameters.mediums.push({value:o,label:o})}),e.sources.forEach(o=>{this.parameters.sources.push({value:o,label:o})})}})},searchJourneys(){this.$mi_loading_toast(r("Searching Journeys","google-analytics-for-wordpress")),this.$store.dispatch("$_reports/getReportData").then(()=>{this.$swal.close()})},onDateChanged(){this.$mi_loading_toast(r("Searching Journeys","google-analytics-for-wordpress"))},onReportsUpdated(){this.$swal.close()},onFilterClick(){this.$mi_loading_toast(r("Searching Journeys","google-analytics-for-wordpress")),this.$store.dispatch("$_reports/getReportData").then(()=>{this.$swal.close()})},pageChange(s){this.$mi_loading_toast(r("Loading Journeys","google-analytics-for-wordpress")),this.$store.dispatch("$_reports/getReportData",{page:s}).then(()=>{this.$swal.close()})},handleResize(){window.innerWidth<783?this.isMobileView=!0:this.isMobileView=!1},expandCurrentRow(s){this.currentExpandedRow===s?this.currentExpandedRow=null:this.currentExpandedRow=s}},created(){this.$isPro()&&(this.$store.dispatch("$_reports/getReportData").then(()=>{this.dataFetched=!0}),this.getFilterParams())},mounted(){window.addEventListener("resize",this.handleResize),this.handleResize()},beforeDestroy(){window.removeEventListener("resize",this.handleResize),this.$store.commit("$_app/REMOVE_NOTICE","user_journey_report_notice",{root:!0})}};var io=function(){var t=this,e=t._self._c;return e("main",{class:{"monsterinsights-user-journey-report":!0,"monsterinsights-blur":t.showUpsell},attrs:{id:"monsterinsights-user-journey-report"}},[e("div",{staticClass:"monsterinsights-container"},[t._t("em-heading"),e("div",{staticClass:"monsterinsights-user-journey-report-filters"},[e("div",{staticClass:"monsterinsights-user-journey-report-filters-left"},[e("reports-date-picker",{on:{"date-changed":t.onDateChanged,"reports-updated":t.onReportsUpdated}}),e("multiselect",{attrs:{options:t.parameters.campaigns,multiple:!1,"track-by":"value",label:"label",searchable:!1,selectLabel:"",selectedLabel:"",deselectLabel:"","allow-empty":!1},model:{value:t.filterFieldCampaigns,callback:function(o){t.filterFieldCampaigns=o},expression:"filterFieldCampaigns"}}),e("multiselect",{attrs:{options:t.parameters.mediums,multiple:!1,"track-by":"value",label:"label",searchable:!1,selectLabel:"",selectedLabel:"",deselectLabel:"","allow-empty":!1},model:{value:t.filterFieldMediums,callback:function(o){t.filterFieldMediums=o},expression:"filterFieldMediums"}}),e("multiselect",{attrs:{options:t.parameters.sources,multiple:!1,"track-by":"value",label:"label",searchable:!1,selectLabel:"",selectedLabel:"",deselectLabel:"","allow-empty":!1},model:{value:t.filterFieldSources,callback:function(o){t.filterFieldSources=o},expression:"filterFieldSources"}}),e("button",{staticClass:"monsterinsights-button monsterinsights-button-outline",on:{click:t.onFilterClick}},[t._v(" Filter ")])],1),e("div",{staticClass:"monsterinsights-user-journey-report-filters-right"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.searchJourneysField,expression:"searchJourneysField"}],staticClass:"monsterinsights-search-transaction-id",attrs:{type:"text",placeholder:"Transaction ID"},domProps:{value:t.searchJourneysField},on:{keyup:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"enter",13,o.key,"Enter")?null:t.searchJourneys.apply(null,arguments)},input:function(o){o.target.composing||(t.searchJourneysField=o.target.value)}}}),e("button",{staticClass:"monsterinsights-button",on:{click:t.searchJourneys}},[t._v(" Search Journeys ")])])]),t.journeyReports.items.length>0?e("table",{staticClass:"monsterinsights-user-journey-report-table",class:{"monsterinsights-ujr-table-small-device":t.isMobileView}},[t._m(0),e("tbody",t._l(t.journeyReports.items,function(o,i){return e("tr",{key:String(o.transaction_id)+i,class:{"monsterinsights-ujr-table-small-device-row":t.isMobileView,"monsterinsights-ujr-table-small-device-row-expanded":t.currentExpandedRow===i}},[e("td",{staticClass:"monsterinsights-ujr-table-small-device-heading",on:{click:function(a){return t.expandCurrentRow(i)}}},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("Transaction ID")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value"},[e("a",{attrs:{href:o.edit_order_url}},[t._v(" "+t._s(o.transaction_id)+" ")])])]),e("td",{staticClass:"monsterinsights-ujr-table-small-device-content"},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("Purchase Date")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value"},[t._v(t._s(o.purchase_date))])]),e("td",{staticClass:"monsterinsights-ujr-table-small-device-content"},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("UTM Campaign")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value"},[t._v(t._s(o.utm_campaign))])]),e("td",{staticClass:"monsterinsights-ujr-table-small-device-content"},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("UTM Medium")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value"},[t._v(t._s(o.utm_medium))])]),e("td",{staticClass:"monsterinsights-ujr-table-small-device-content"},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("UTM Source")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value"},[t._v(t._s(o.utm_source))])]),e("td",{staticClass:"monsterinsights-ujr-table-small-device-content"},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("Order Total")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value",domProps:{innerHTML:t._s(o.order_total)}})]),e("td",{staticClass:"monsterinsights-ujr-table-small-device-content"},[e("span",{staticClass:"monsterinsights-ujr-table-small-device-label"},[t._v("Steps to Purchase")]),e("span",{staticClass:"monsterinsights-ujr-table-small-device-value"},[t._v(t._s(o.steps))])])])}),0)]):t.dataFetched&&t.journeyReports.items.length==0?e("div",{staticClass:"monsterinsights-notice monsterinsights-notice-info"},[e("div",{staticClass:"monsterinsights-notice-inner"},[e("div",{staticClass:"notice-content"},[e("span",{staticClass:"monsterinsights-notice-content"},[t._v(t._s(t.noItemText))])])])]):t._e(),e("Pagination",{attrs:{pagination:t.journeyReports.pagination},on:{"page-change":t.pageChange}})],2),t._t("mi-upsell-overlay")],2)},ao=[function(){var s=this,t=s._self._c;return t("thead",[t("tr",[t("th",[s._v("Transaction ID")]),t("th",[s._v("Purchase Date")]),t("th",[s._v("UTM Campaign")]),t("th",[s._v("UTM Medium")]),t("th",[s._v("UTM Source")]),t("th",[s._v("Order Total")]),t("th",[s._v("Steps to Purchase")])])])}],no=n(oo,io,ao,!1,null,null,null,null);const lo=no.exports,co={name:"MonsterInsightsUserJourneyReport",components:{UserJourneyReport:lo,ReportUpsellOverlay:f},beforeCreate(){const s="$_reports";s in this.$store._modules.root._children?(this.$store.unregisterModule(s),this.$store.registerModule(s,q)):this.$store.registerModule(s,q)},beforeDestroy(){this.$store.unregisterModule("$_reports")},computed:{showUpsell(){if(!this.$isPro())return!0;let s=this.$store.getters["$_license/license"];return!!(s&&s.type==="plus")}}};var po=function(){var t=this,e=t._self._c;return e("UserJourneyReport",{scopedSlots:t._u([{key:"mi-upsell-overlay",fn:function(){return[t.showUpsell?e("report-upsell-overlay",{attrs:{report:"userjourney"}}):t._e()]},proxy:!0}])})},ho=[],go=n(co,po,ho,!1,null,null,null,null);const uo=go.exports,mo={components:{ReportOverviewLineChartApex:V},data(){return{chart_style:{foreColor:"#999",borderColor:"#f3f6fa",colors:["#3a93dd"],markersStrokeColor:["#3a93dd"],markersColors:["#ffffff"],markersStrokeColorHover:["#ffffff"],markersColorsHover:["#3a93dd"],fontSize:"12px",fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif'}}},methods:{sessionsData(){let s=[],t=[],e=[],o=[],i=c.date.month();for(let a=1;a<=30;a++){let l=String(a)+" "+i;t.push(l),s.push(c.datatype.number({min:20,max:100})),o.push(c.datatype.number({min:50,max:100})),e.push(Math.floor(Date.now()/1e3)+86400*a)}return{labels:t,datasets:[{labels:t,data:s,timestamps:e,trend:o,notes:[]}]}}}};var _o=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-tabs"},[t._m(0),e("div",{staticClass:"monsterinsights-report-tabs-content"},[e("report-overview-line-chart-apex",{attrs:{id:"chart-overview-sessions","chart-data":t.sessionsData(),tooltipDescriptor:"Unique <br> Sessionsss",chartStyles:t.chart_style}})],1)])},fo=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"monsterinsights-report-tabs-navigation"},[t("button",{staticClass:"monsterinsights-active-tab-button"},[t("i",{staticClass:"monstericon-user"}),t("span",[s._v("Sessions")])]),t("button",{staticClass:"monsterinsights-deactive-tab-button"},[t("i",{staticClass:"monstericon-eye"}),t("span",[s._v("Pageviews")])])])}],vo=n(mo,_o,fo,!1,null,null,null,null);const A=vo.exports,Co={name:"ReportTrafficOverview",components:{ReportUpsellOverlay:f,ReportTableBox:C,LiteFakeSessionChart:A},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_traffic_overview:"Traffic Overview Report",text_traffic_details:"Traffic Details",fake_headers:["Channel","Sessions","Engaged Sessions","Page / Sessions","Purchase","Conversion Rate","Revenue"]}},methods:{trafficDetailsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.word(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var wo=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-publishers"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_traffic_overview)}})]),e("LiteFakeSessionChart"),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_traffic_details,rows:t.trafficDetailsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"traffic",level:"plus"}})],1)},yo=[],bo=n(Co,wo,yo,!1,null,null,null,null);const xo=bo.exports,ko={name:"ReportTrafficLandingPages",components:{ReportUpsellOverlay:f,ReportTableBox:C,LiteFakeSessionChart:A},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_publishers:r("Traffic Landing Pages","google-analytics-for-wordpress"),fake_headers:["Landing Page","Sessions","Engaged Sessions","Page / Sessions","Purchase","Conversion Rate","Revenue"]}},methods:{trafficDetailsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.slug(4),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var $o=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-traffic-landing-pages"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_publishers)}})]),e("LiteFakeSessionChart"),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_publishers,rows:t.trafficDetailsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"traffic_landing_pages",level:"plus"}})],1)},Ro=[],Lo=n(ko,$o,Ro,!1,null,null,null,null);const Po=Lo.exports,Do={name:"ReportTrafficTechnology",components:{ReportUpsellOverlay:f,ReportOverviewPieChartApex:it},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_publishers:"Traffic Technology",text_browser_breakdown:"Browser Breakdown",text_device_breakdown:"Device Breakdown"}},methods:{browserBreakdown(){let s={labels:["Chrome","Firefox","Edge"],series:[51,30,19]};return{datasets:s,values:s.series,labels:s.labels}}}};var So=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-traffic-technology"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_publishers)}})]),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-flex"},[e("report-overview-pie-chart-apex",{attrs:{id:"browserBreakdown",chartData:t.browserBreakdown(),title:t.text_browser_breakdown}}),e("report-overview-pie-chart-apex",{attrs:{id:"deviceBreakdown",chartData:t.browserBreakdown(),title:t.text_device_breakdown}})],1),e("report-upsell-overlay",{attrs:{report:"traffic_technology",level:"plus"}})],1)},Mo=[],To=n(Do,So,Mo,!1,null,null,null,null);const Eo=To.exports,Fo={name:"ReportTrafficOverview",components:{ReportUpsellOverlay:f,ReportTableBox:C,LiteFakeSessionChart:A},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_publishers:r("Traffic Landing Pages","google-analytics-for-wordpress"),fake_headers:["Landing Page","Sessions","Engaged Sessions","Page / Sessions","Purchase","Conversion Rate","Revenue"]}},methods:{trafficDetailsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.slug(2),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var Io=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-traffic-landing-pages"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_publishers)}})]),e("LiteFakeSessionChart"),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_publishers,rows:t.trafficDetailsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"traffic_campaign",level:"plus"}})],1)},Ao=[],Bo=n(Fo,Io,Ao,!1,null,null,null,null);const No=Bo.exports,Oo={name:"ReportTrafficOverview",components:{ReportUpsellOverlay:f,ReportTableBox:C,LiteFakeSessionChart:A},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_publishers:r("Traffic Landing Pages","google-analytics-for-wordpress"),fake_headers:["Landing Page","Sessions","Engaged Sessions","Page / Sessions","Purchase","Conversion Rate","Revenue"]}},methods:{trafficDetailsRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.slug(2),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var Ho=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-traffic-source-medium"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_publishers)}})]),e("LiteFakeSessionChart"),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_publishers,rows:t.trafficDetailsRows()}})],1),e("report-upsell-overlay",{attrs:{report:"traffic_source_medium",level:"plus"}})],1)},Yo=[],Uo=n(Oo,Ho,Yo,!1,null,null,null,null);const Vo=Uo.exports,Zo={name:"MILiteReportTrafficSocial",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_social_media_report:r("Social Media Report","google-analytics-for-wordpress")}}};var jo=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-traffic-social"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_social_media_report)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:[],title:t.text_social_media_report,rows:[]}})],1),e("report-upsell-overlay",{attrs:{report:"traffic_social"}})],1)},zo=[],Wo=n(Zo,jo,zo,!1,null,null,null,null);const Go=Wo.exports,qo={name:"ReportEngagementOverview",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_engagement:r("Engagement Overview","google-analytics-for-wordpress"),fake_headers:["Page Titles","Visits","Avg. Duration","Bounce Rate"],text_outbound_links:r("Top Outbound Links","google-analytics-for-wordpress"),outbound_links_headers:[r("Links","google-analytics-for-wordpress"),r("Total Clicks","google-analytics-for-wordpress")],text_affiliate_links:r("Top Affiliate Links","google-analytics-for-wordpress"),affiliate_links_headers:[r("Label","google-analytics-for-wordpress"),r("Link","google-analytics-for-wordpress"),r("Total Clicks","google-analytics-for-wordpress")]}},methods:{landingPagesRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.sentence(5),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s},outboundLinksRows(){let s=[];for(let t=0;t<10;t++)s.push([c.internet.url(),c.datatype.number()]);return s},affiliateLinksRows(){let s=[];for(let t=0;t<10;t++)s.push([c.lorem.word(),c.internet.url(),c.datatype.number()]);return s}}};var Jo=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-engagement-overview"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_engagement)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_engagement,rows:t.landingPagesRows()}},[e("a",{staticClass:"monsterinsights-button",attrs:{slot:"button",href:"#",target:"_blank"},slot:"button"},[t._v("View Full Top Landing Pages Report")])])],1),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-flex"},[e("report-table-box",{attrs:{title:t.text_outbound_links,headers:t.outbound_links_headers,rows:t.outboundLinksRows()}},[e("a",{staticClass:"monsterinsights-button",attrs:{slot:"button",href:"#",target:"_blank"},slot:"button"},[t._v("Top Outbound Links")])]),e("report-table-box",{attrs:{title:t.text_affiliate_links,headers:t.affiliate_links_headers,rows:t.affiliateLinksRows()}},[e("a",{staticClass:"monsterinsights-button",attrs:{slot:"button",href:"#",target:"_blank"},slot:"button"},[t._v("Top Affiliate Links")])])],1),e("report-upsell-overlay",{attrs:{report:"engagement_overview",level:"plus"}})],1)},Ko=[],Qo=n(qo,Jo,Ko,!1,null,null,null,null);const Xo=Qo.exports,ti={name:"ReportEngagementPages",components:{ReportUpsellOverlay:f,ReportTableBox:C},mounted(){this.$store.commit("$_reports/ENABLE_BLUR")},data(){return{text_engagement:r("Engagement Pages","google-analytics-for-wordpress"),fake_headers:["Page Titles","Visits","Avg. Duration","Bounce Rate"]}},methods:{landingPagesRows(){let s=[];for(let t=0;t<40;t++)s.push([c.lorem.slug(5),c.datatype.number(),c.datatype.number(),c.datatype.number()]);return s}}};var ei=function(){var t=this,e=t._self._c;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-engagement-pages"},[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.text_engagement)}})]),e("div",{staticClass:"monsterinsights-report-row"},[e("report-table-box",{attrs:{headers:t.fake_headers,title:t.text_engagement,rows:t.landingPagesRows()}})],1),e("report-upsell-overlay",{attrs:{report:"engagement_pages",level:"plus"}})],1)},si=[],ri=n(ti,ei,si,!1,null,null,null,null);const oi=ri.exports,ii={__name:"ExceptionsStatus",props:{status:{type:String,default:"false"}},setup(s){const t=s,e=H(()=>t.status!=="true");return{__sfc:!0,props:t,status:e}}};var ai=function(){var t=this,e=t._self._c,o=t._self._setupProxy;return o.status?e("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M10 0C4.47715 0 0 4.47715 0 10C0 15.5229 4.47715 20 10 20C15.5229 20 20 15.5229 20 10C20 4.47715 15.5229 0 10 0ZM14.2908 4.68383L16.3684 6.76147L9.87915 13.252L7.81372 15.3162L5.73608 13.2385L3.63158 11.1328L5.6958 9.06858L7.8003 11.1743L14.2908 4.68383Z",fill:"#4CAF50"}})]):e("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0ZM10 2.17285C14.3228 2.17285 17.8259 5.67827 17.8259 10C17.8259 14.3218 14.3228 17.8259 10 17.8259C5.67717 17.8259 2.17407 14.3218 2.17407 10C2.17408 5.67827 5.67717 2.17285 10 2.17285ZM13.8318 5.25147L8.03588 11.0486L6.156 9.1687L4.31152 11.012L6.1914 12.8919L8.04808 14.7485L9.89137 12.9041L15.6885 7.10815L13.8318 5.25147Z",fill:"#BDBDBD"}})])},ni=[],li=n(ii,ai,ni,!1,null,null,null,null);const ci=li.exports,pi={__name:"ExceptionsDelete",props:{exceptionId:{type:Number,required:!0}},emits:["exception-deleted"],setup(s,{emit:t}){const e=s;function o(){g.prototype.$mi_loading_toast(r("Deleting Exception","google-analytics-for-wordpress"));let i=new FormData;i.append("action","monsterinsights_exceptions_delete"),i.append("nonce",g.prototype.$mi.nonce),i.append("exception_id",e.exceptionId),F.post(g.prototype.$mi.ajax,i).then(a=>{a.data.success?t("exception-deleted"):g.prototype.$swal.close()}).catch(()=>{g.prototype.$swal.close()})}return{__sfc:!0,props:e,emit:t,onClick:o}}};var di=function(){var t=this,e=t._self._c,o=t._self._setupProxy;return e("a",{attrs:{href:"javascript:void(0);"},on:{click:function(i){return i.stopPropagation(),i.preventDefault(),o.onClick.apply(null,arguments)}}},[e("svg",{attrs:{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M10.9688 2.15625H8.86133L7.99805 0.734375C7.79492 0.404297 7.33789 0.125 6.95703 0.125H4.39258C4.01172 0.125 3.55469 0.404297 3.35156 0.734375L2.48828 2.15625H0.40625C0.177734 2.15625 0 2.35938 0 2.5625V2.96875C0 3.19727 0.177734 3.375 0.40625 3.375H0.8125L1.3457 11.9824C1.37109 12.6172 1.92969 13.125 2.56445 13.125H8.78516C9.41992 13.125 9.97852 12.6172 10.0039 11.9824L10.5625 3.375H10.9688C11.1719 3.375 11.375 3.19727 11.375 2.96875V2.5625C11.375 2.35938 11.1719 2.15625 10.9688 2.15625ZM4.39258 1.34375H6.95703L7.43945 2.15625H3.91016L4.39258 1.34375ZM8.78516 11.9062H2.56445L2.03125 3.375H9.31836L8.78516 11.9062Z",fill:"#EB5757"}})]),e("span",[t._v("Delete")])])},hi=[],gi=n(pi,di,hi,!1,null,null,null,null);const ui=gi.exports,mi={__name:"ExceptionsTable",props:{tableRows:{type:Array,required:!0},pagination:{type:Object,default:()=>({})},perPage:{type:String,required:!0}},emits:["per-page-change"],setup(s,{emit:t}){const e=s,o=r("Category","google-analytics-for-wordpress"),i=r("Time","google-analytics-for-wordpress"),a=r("Recurring","google-analytics-for-wordpress"),l=r("Description","google-analytics-for-wordpress"),h=r("Action","google-analytics-for-wordpress"),p=r("No data currently for the report.","google-analytics-for-wordpress"),u=r("Items per page:","google-analytics-for-wordpress"),_=H(()=>e.tableRows),y=H(()=>e.pagination),w=vt(e.perPage),k=[20,50,100,200,500];function $(P){t("per-page-change",P.target.value)}return{__sfc:!0,text_category:o,text_time:i,text_resolved:a,text_description:l,text_action:h,text_empty:p,text_number_of_items:u,props:e,emit:t,tableRows:_,tablePagination:y,itemsPerPage:w,itemsPerPageOptions:k,onItemsPerPageChange:$,ExceptionsStatus:ci,ExceptionsDelete:ui,Pagination:lt}}};var _i=function(){var t=this,e=t._self._c,o=t._self._setupProxy;return e("div",{staticClass:"monsterinsights-table-box"},[o.tableRows.length>0?e("div",{staticClass:"monsterinsights-table-box-table"},[e("table",{staticClass:"monsterinsights-has-th-border"},[e("thead",[e("tr",[e("th",[t._v(t._s(o.text_category))]),e("th",[t._v(t._s(o.text_time))]),e("th",[t._v(t._s(o.text_resolved))]),e("th",[t._v(t._s(o.text_description))]),e("th",[t._v(t._s(o.text_action))])])]),e("tbody",t._l(o.tableRows,function(i,a){return e("tr",{key:a,staticClass:"monsterinsights-table-list-item"},[e("td",[t._v(t._s(i.category))]),e("td",[t._v(t._s(i.time))]),e("td",{staticClass:"text-align-center"},[e(o.ExceptionsStatus,{attrs:{status:String(i.resolved)}})],1),e("td",[t._v(t._s(i.description))]),e("td",{staticClass:"monsterinsights-table-exceptions-action"},[e(o.ExceptionsDelete,{attrs:{"exception-id":i.id},on:{"exception-deleted":function(l){return t.$emit("exception-deleted")}}})],1)])}),0)])]):e("div",{staticClass:"monsterinsights-table-no-data"},[e("h3",{domProps:{textContent:t._s(o.text_empty)}})]),o.tableRows.length>0?e("div",{staticClass:"monsterinsights-table-box-footer"},[e("div",{staticClass:"monsterinsights-table-box-footer-items-per-page"},[e("label",{domProps:{textContent:t._s(o.text_number_of_items)}}),e("select",{directives:[{name:"model",rawName:"v-model",value:o.itemsPerPage,expression:"itemsPerPage"}],on:{change:[function(i){var a=Array.prototype.filter.call(i.target.options,function(l){return l.selected}).map(function(l){var h="_value"in l?l._value:l.value;return h});o.itemsPerPage=i.target.multiple?a:a[0]},o.onItemsPerPageChange]}},t._l(o.itemsPerPageOptions,function(i){return e("option",{key:"option-"+i,domProps:{textContent:t._s(i)}})}),0)]),o.tablePagination.pages>1?e(o.Pagination,{attrs:{pagination:o.tablePagination},on:{"page-change":function(i){return t.$emit("page-change",i)}}}):t._e()],1):t._e()])},fi=[],vi=n(mi,_i,fi,!1,null,null,null,null);const Ci=vi.exports,wi={__name:"monsterinsights-ExceptionsReport-Lite",setup(s){const t=Ht(),e=r("Exceptions Report","google-analytics-for-wordpress");function o(){let a=[];for(let l=1;l<=10;l++)a.push({category:"eCommerce",time:c.date.past(),resolved:!1,description:c.lorem.sentence(5),id:l});return a}Ct(()=>{t.commit("$_reports/ENABLE_BLUR")});function i(){return g.prototype.$isPro()?g.prototype.$getAgencyUpgradeUrl("reports","exceptions"):null}return{__sfc:!0,store:t,text_main_heading:e,reportData:o,getUpgradeHref:i,ExceptionsTable:Ci,ReportUpsellOverlay:f}}};var yi=function(){var t=this,e=t._self._c,o=t._self._setupProxy;return e("main",{staticClass:"monsterinsights-report monsterinsights-report-exceptions"},[e("div",{staticClass:"monsterinsights-report-top monsterinsights-report-exceptions-top"},[e("h2",{domProps:{textContent:t._s(o.text_main_heading)}})]),e("div",{staticClass:"monsterinsights-report-row monsterinsights-report-table-wrapper"},[e(o.ExceptionsTable,{attrs:{"table-rows":o.reportData(),pagination:{}}})],1),e(o.ReportUpsellOverlay,{attrs:{report:"exceptions","upgrade-href":o.getUpgradeHref(),"is-agency":!0}})],1)},bi=[],xi=n(wi,yi,bi,!1,null,null,null,null);const ki=xi.exports;const $i=(s,t)=>{s.insights=t},Ri=(s,t=!0)=>{s.isLoading=t},Li=(s,{insightId:t,score:e,feedback:o=null,skipped:i=!1})=>{let a=s.ratings.filter(l=>l.insightId!==t);a.push({insightId:t,score:e,feedback:o,skipped:i}),s.ratings=a},Pi=s=>{s.ratings=[]},Di={UPDATE_INSIGHTS:$i,SET_LOADING:Ri,RATE_INSIGHT:Li,RESET_RATINGS:Pi},Si=(s=null)=>{const t=F.create();return t.interceptors.request.use(e=>{const o=window.monsterinsights,{rest_url:i,rest_nonce:a}=o;return{...e,baseURL:i+s,headers:{"X-WP-Nonce":a}}},e=>Promise.reject(e)),t};class ct{constructor(t="monsterinsights/v1/"){this.client=Si(t)}get(t,e={}){return this.client.get(t,e).then(o=>Promise.resolve(o.data)).catch(o=>Promise.reject(o))}delete(t,e={}){return this.client.delete(t,e).then(o=>Promise.resolve(o.data)).catch(o=>Promise.reject(o))}head(t,e={}){return this.client.head(t,e).then(o=>Promise.resolve(o)).catch(o=>Promise.reject(o))}options(t,e={}){return this.client.options(t,e).then(o=>Promise.resolve(o)).catch(o=>Promise.reject(o))}post(t,e={},o={}){return this.client.post(t,e,o).then(i=>Promise.resolve(i.data)).catch(i=>Promise.reject(i))}put(t,e={},o={}){return this.client.put(t,e,o).then(i=>Promise.resolve(i.data)).catch(i=>Promise.reject(i))}patch(t,e={},o={}){return this.client.patch(t,e,o).then(i=>Promise.resolve(i.data)).catch(i=>Promise.reject(i))}}const b=new ct,Mi=(s={})=>b.get("ai-insights",{params:s}).then(t=>t),Ti=(s,t)=>b.post("ai-insights/rate",{insight_id:s,score:t}).then(e=>e),Ei=()=>b.get("ai-insights/ratings").then(s=>s),Fi=({insightId:s,message:t,skipped:e=!1})=>b.post("ai-insights/feedback",{insight_id:s,message:t,skipped:e}).then(o=>o),x={getChats:(s=null)=>b.get("ai-insights/chats",{params:{lists:s}}).then(t=>t.data),getChatById:s=>b.get(`ai-insights/chat/${s}`).then(t=>t.data),updateChatProperties:(s,t)=>b.put(`ai-insights/chat/${s}`,t).then(e=>e.data),deleteChat:s=>b.delete(`ai-insights/chat/${s}`).then(t=>t.data),sendMessage:(s,t=null)=>{let e="ai-insights/chat";return t&&(e+=`/${t}`),b.post(e,{message:s}).then(o=>o.data)},rateChatMessage:(s,t,e)=>b.post(`ai-insights/chat/${s}/rate`,{message_id:t,rating:e}).then(o=>o.data),saveChatMessageFeedback:({chatId:s,messageId:t,feedback:e,skipped_feedback:o=!1})=>b.post(`ai-insights/chat/${s}/rate`,{message_id:t,feedback:e,skipped_feedback:o}).then(i=>i.data),retryLastChatMessage:s=>b.post(`ai-insights/chat/${s}/retry`).then(t=>t.data)},Ii=async({commit:s},t={})=>(s("SET_LOADING",!0),Mi(t).then(e=>{if(!e.success){g.prototype.$mi_error_toast({title:!1,html:e.error});return}s("UPDATE_INSIGHTS",e.data.insights),s("RESET_RATINGS");const{ratings:o}=e.data;for(let i=0;i<o.length;i++)s("RATE_INSIGHT",{insightId:o[i].insight_id,score:o[i].score,feedback:o[i].feedback,skipped:o[i].skipped})}).finally(()=>{s("SET_LOADING",!1)})),Ai=async({commit:s},{insightId:t,score:e})=>{s("RATE_INSIGHT",{insightId:t,score:e}),await Ti(t,e)},Bi=async({commit:s})=>Ei().then(t=>{if(!t.success){g.prototype.$mi_error_toast({title:!1,html:t.error});return}s("RESET_RATINGS");const e=Object.values(t.data);for(let o=0;o<e.length;o++)s("RATE_INSIGHT",{insightId:e[o].insight_id,score:e[o].score,feedback:e[o].feedback,skipped:e[o].skipped})}),Ni=async(s,t)=>Fi(t).then(e=>e.data),Oi={fetchInsights:Ii,rateInsight:Ai,refreshRatings:Bi,saveInsightFeedback:Ni},Hi={isLoading:!0,insights:[],ratings:[]},Yi={namespaced:!0,state:Hi,mutations:Di,actions:Oi},Ui={name:"AIInsights",computed:{...v({addons:"$_addons/addons"}),showUpsell(){if(!this.$isPro())return!0;let s=this.$store.getters["$_license/license"];return!!(s&&s.type==="plus")}},beforeCreate(){this.$store.hasModule("$_ai-insights")&&this.$store.unregisterModule("$_ai-insights"),this.$store.registerModule("$_ai-insights",Yi)}};var Vi=function(){var t=this,e=t._self._c;return e("main",{ref:"container",staticClass:"monsterinsights-report monsterinsights-ai-insights"},[e("router-view")],1)},Zi=[],ji=n(Ui,Vi,Zi,!1,null,null,null,null);const zi=ji.exports,Wi={};var Gi=function(t,e){return t("i",{staticClass:"icon"},[t("svg",{attrs:{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.2226 1.65012C13.4579 0.575261 14.9892 0.568832 15.2348 1.6424L15.2451 1.69255L15.2682 1.79283C15.5511 2.99369 16.5231 3.9104 17.7394 4.12255C18.8605 4.31798 18.8605 5.92769 17.7394 6.12312C17.1413 6.22722 16.5873 6.50571 16.1469 6.92364C15.7066 7.34156 15.3995 7.88027 15.2644 8.47212L15.2335 8.60326C14.9892 9.67683 13.4592 9.6704 13.2226 8.59555L13.1982 8.4824C13.0684 7.88823 12.7645 7.3462 12.3253 6.92553C11.8861 6.50485 11.3314 6.2246 10.7322 6.12055C9.61364 5.9264 9.61364 4.31926 10.7322 4.12512C11.3293 4.0215 11.8821 3.74294 12.3207 3.32475C12.7592 2.90656 13.0638 2.36758 13.1956 1.77612L13.2136 1.69126L13.2226 1.65012ZM14.1574 10.8018C13.5447 10.7899 12.9592 10.547 12.5181 10.1217C12.4211 10.1856 12.3366 10.2667 12.2686 10.3608C11.6901 11.1271 11.0125 11.9101 10.2462 12.6751C9.66507 13.2563 9.07621 13.7847 8.49507 14.2565C7.91393 13.7847 7.32507 13.2563 6.74393 12.6751C6.18707 12.1194 5.65923 11.5353 5.1625 10.9253C5.63435 10.3428 6.16407 9.75526 6.74393 9.17412C7.46794 8.44757 8.2412 7.77182 9.05821 7.15169C9.14353 7.09057 9.21824 7.01586 9.27935 6.93055C9.03494 6.7077 8.83914 6.43681 8.70419 6.13484C8.56924 5.83286 8.49805 5.50629 8.49507 5.17555C7.23378 4.29226 5.98664 3.63783 4.87321 3.29712C3.66721 2.92812 2.25293 2.82912 1.32593 3.75483C0.725497 4.35655 0.562212 5.17426 0.608497 5.95212C0.654783 6.73126 0.915783 7.58755 1.3105 8.45669C1.71315 9.32151 2.19386 10.1478 2.74664 10.9253C2.19399 11.7019 1.71329 12.5273 1.3105 13.3913C0.915783 14.2604 0.654783 15.1167 0.608497 15.8958C0.562212 16.6737 0.724212 17.4914 1.32593 18.0931C1.92764 18.6935 2.74535 18.8568 3.52321 18.8105C4.30107 18.763 5.15864 18.5033 6.02778 18.1085C6.81207 17.7524 7.6465 17.2664 8.49635 16.6724C9.34493 17.2664 10.1781 17.7524 10.9636 18.1085C11.8315 18.5033 12.6891 18.7643 13.4682 18.8105C14.2461 18.8568 15.0625 18.6935 15.6642 18.0918C16.5912 17.1661 16.4922 15.7518 16.1232 14.5458C15.7709 13.3964 15.0856 12.1043 14.1574 10.8018ZM4.30878 5.14083C5.04935 5.36712 5.93264 5.79655 6.88921 6.41883C5.84483 7.30492 4.87473 8.27502 3.98864 9.3194C3.64043 8.78918 3.33188 8.23396 3.0655 7.65826C2.72735 6.91255 2.5615 6.2954 2.53321 5.8364C2.50621 5.37483 2.61935 5.18969 2.69007 5.11898C2.80578 5.00326 3.23264 4.81297 4.30878 5.14083ZM3.0655 14.191C3.30207 13.6703 3.61193 13.111 3.98864 12.5298C4.87516 13.5742 5.84569 14.5443 6.8905 15.4304C6.36072 15.779 5.80592 16.088 5.23064 16.3548C4.48493 16.693 3.86778 16.8588 3.40878 16.8871C2.94593 16.9141 2.76207 16.801 2.69135 16.7303C2.62064 16.6595 2.5075 16.4731 2.5345 16.0128C2.56278 15.5538 2.72735 14.9367 3.06678 14.191H3.0655ZM11.7608 16.3548C11.1857 16.0883 10.6313 15.7793 10.1022 15.4304C11.1457 14.5442 12.1149 13.5741 13.0002 12.5298C13.6212 13.4877 14.0506 14.371 14.2769 15.1115C14.6061 16.1864 14.4158 16.6145 14.3001 16.7303C14.2281 16.801 14.0429 16.9141 13.5826 16.8858C13.1224 16.8601 12.5065 16.693 11.7608 16.3548ZM7.20935 10.9253C7.20935 10.5843 7.34481 10.2572 7.58593 10.0161C7.82705 9.77501 8.15408 9.63955 8.49507 9.63955C8.83606 9.63955 9.16309 9.77501 9.40421 10.0161C9.64532 10.2572 9.78078 10.5843 9.78078 10.9253C9.78078 11.2663 9.64532 11.5933 9.40421 11.8344C9.16309 12.0755 8.83606 12.211 8.49507 12.211C8.15408 12.211 7.82705 12.0755 7.58593 11.8344C7.34481 11.5933 7.20935 11.2663 7.20935 10.9253Z",fill:"currentColor"}})])])},qi=[],Ji=n(Wi,Gi,qi,!0,null,null,null,null);const Ki=Ji.exports,Qi={};var Xi=function(){var t=this,e=t._self._c;return e("i",{staticClass:"icon"},[e("svg",{attrs:{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M12.0342 7.27191L11.2942 7.14891C11.2763 7.25635 11.2821 7.36639 11.311 7.47138C11.34 7.57637 11.3915 7.67379 11.4619 7.75687C11.5323 7.83995 11.62 7.90669 11.7188 7.95247C11.8177 7.99824 11.9253 8.02193 12.0342 8.02191V7.27191ZM1.03418 7.27191V6.52191C0.835267 6.52191 0.644502 6.60093 0.50385 6.74158C0.363197 6.88223 0.28418 7.073 0.28418 7.27191H1.03418ZM3.03418 18.0219H14.3942V16.5219H3.03418V18.0219ZM15.5942 6.52191H12.0342V8.02191H15.5942V6.52191ZM12.7742 7.39491L13.5802 2.55991L12.1002 2.31291L11.2942 7.14891L12.7742 7.39491ZM11.8542 0.521912H11.6402V2.02191H11.8532L11.8542 0.521912ZM8.51918 2.19191L6.00418 5.96491L7.25218 6.79691L9.76718 3.02391L8.51918 2.19191ZM4.96418 6.52191H1.03418V8.02191H4.96418V6.52191ZM0.28418 7.27191V15.2719H1.78418V7.27191H0.28418ZM17.0912 15.8119L18.2912 9.81191L16.8212 9.51691L15.6212 15.5169L17.0912 15.8119ZM6.00418 5.96491C5.89008 6.1362 5.73545 6.27566 5.55403 6.37283C5.3726 6.46999 5.16999 6.52086 4.96418 6.52091V8.02091C5.88418 8.02091 6.74218 7.56191 7.25218 6.79691L6.00418 5.96491ZM13.5802 2.55991C13.6218 2.30928 13.6084 2.05158 13.5409 1.80665C13.4733 1.56173 13.3533 1.33445 13.189 1.1406C13.0248 0.94676 12.8203 0.791006 12.5898 0.684165C12.3593 0.577323 12.1083 0.521956 11.8542 0.521912L11.8532 2.02191C11.8894 2.022 11.9262 2.02997 11.9591 2.04527C11.9919 2.06057 12.0211 2.08283 12.0445 2.11051C12.0679 2.1382 12.085 2.17064 12.0946 2.20558C12.1042 2.24053 12.1061 2.27716 12.1002 2.31291L13.5802 2.55991ZM15.5942 8.02091C16.3842 8.02091 16.9742 8.74291 16.8202 9.51591L18.2912 9.81091C18.3708 9.412 18.3609 8.99941 18.2622 8.6048C18.1635 8.21018 17.9785 7.84237 17.7205 7.52787C17.4626 7.21337 17.138 6.96001 16.7703 6.78606C16.4027 6.61211 16.0009 6.52189 15.5942 6.52191V8.02091ZM14.3942 18.0219C15.0299 18.022 15.646 17.8009 16.1377 17.398C16.6294 16.9951 16.9663 16.4342 17.0912 15.8109L15.6212 15.5159C15.5645 15.7995 15.4112 16.0547 15.1875 16.2379C14.9637 16.4212 14.6834 16.5222 14.3942 16.5219V18.0219ZM11.6402 0.521912C11.0228 0.521957 10.4151 0.673407 9.8708 0.964732C9.32653 1.25606 8.86259 1.67725 8.52018 2.19091L9.76718 3.02391C9.97272 2.71557 10.2512 2.46177 10.578 2.28697C10.9047 2.11217 11.2696 2.02177 11.6402 2.02191V0.521912ZM3.03418 16.5219C2.34418 16.5219 1.78418 15.9619 1.78418 15.2719H0.28418C0.28418 16.0013 0.573911 16.7007 1.08964 17.2165C1.60536 17.7322 2.30483 18.0219 3.03418 18.0219V16.5219Z",fill:"currentColor"}}),e("path",{attrs:{d:"M5.03418 7.27191V17.2719",stroke:"currentColor","stroke-width":"1.5"}})])])},ta=[],ea=n(Qi,Xi,ta,!1,null,null,null,null);const pt=ea.exports,sa={};var ra=function(){var t=this,e=t._self._c;return e("i",{staticClass:"icon"},[e("svg",{attrs:{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M7.03418 11.2719L7.77418 11.3949C7.79204 11.2875 7.78629 11.1774 7.75732 11.0724C7.72836 10.9675 7.67687 10.87 7.60645 10.787C7.53603 10.7039 7.44836 10.6371 7.34953 10.5914C7.2507 10.5456 7.14309 10.5219 7.03418 10.5219L7.03418 11.2719ZM18.0342 11.2719L18.0342 12.0219C18.2331 12.0219 18.4239 11.9429 18.5645 11.8022C18.7052 11.6616 18.7842 11.4708 18.7842 11.2719L18.0342 11.2719ZM16.0342 0.521911L4.67418 0.52191L4.67418 2.02191L16.0342 2.02191L16.0342 0.521911ZM3.47418 12.0219L7.03418 12.0219L7.03418 10.5219L3.47418 10.5219L3.47418 12.0219ZM6.29418 11.1489L5.48818 15.9839L6.96818 16.2309L7.77418 11.3949L6.29418 11.1489ZM7.21418 18.0219L7.42818 18.0219L7.42818 16.5219L7.21518 16.5219L7.21418 18.0219ZM10.5492 16.3519L13.0642 12.5789L11.8162 11.7469L9.30118 15.5199L10.5492 16.3519ZM14.1042 12.0219L18.0342 12.0219L18.0342 10.5219L14.1042 10.5219L14.1042 12.0219ZM18.7842 11.2719L18.7842 3.27191L17.2842 3.27191L17.2842 11.2719L18.7842 11.2719ZM1.97718 2.73191L0.777181 8.73191L2.24718 9.02691L3.44718 3.02691L1.97718 2.73191ZM13.0642 12.5789C13.1783 12.4076 13.3329 12.2682 13.5143 12.171C13.6958 12.0738 13.8984 12.023 14.1042 12.0229L14.1042 10.5229C13.1842 10.5229 12.3262 10.9819 11.8162 11.7469L13.0642 12.5789ZM5.48818 15.9839C5.44651 16.2345 5.45992 16.4922 5.52747 16.7372C5.59501 16.9821 5.71508 17.2094 5.87933 17.4032C6.04358 17.5971 6.24806 17.7528 6.47858 17.8597C6.70909 17.9665 6.96011 18.0219 7.21418 18.0219L7.21518 16.5219C7.17893 16.5218 7.14214 16.5139 7.10928 16.4986C7.07642 16.4833 7.04727 16.461 7.02387 16.4333C7.00047 16.4056 6.98337 16.3732 6.97375 16.3382C6.96414 16.3033 6.96223 16.2667 6.96818 16.2309L5.48818 15.9839ZM3.47418 10.5229C2.68418 10.5229 2.09418 9.80091 2.24818 9.02791L0.777181 8.73291C0.697602 9.13182 0.707507 9.54441 0.806184 9.93902C0.90486 10.3336 1.08985 10.7015 1.34782 11.016C1.60579 11.3305 1.93032 11.5838 2.29801 11.7578C2.66571 11.9317 3.06741 12.0219 3.47418 12.0219L3.47418 10.5229ZM4.67418 0.52191C4.03847 0.521786 3.42236 0.742909 2.93065 1.14583C2.43894 1.54875 2.10201 2.10958 1.97718 2.73291L3.44718 3.02791C3.50387 2.74431 3.65714 2.48914 3.88087 2.30588C4.10461 2.12263 4.38497 2.02162 4.67418 2.02191L4.67418 0.52191ZM7.42818 18.0219C8.04551 18.0219 8.65329 17.8704 9.19756 17.5791C9.74183 17.2878 10.2058 16.8666 10.5482 16.3529L9.30118 15.5199C9.09564 15.8283 8.81712 16.0821 8.49037 16.2569C8.16362 16.4317 7.79875 16.522 7.42818 16.5219L7.42818 18.0219ZM16.0342 2.02191C16.7242 2.02191 17.2842 2.58191 17.2842 3.27191L18.7842 3.27191C18.7842 2.54257 18.4944 1.84309 17.9787 1.32737C17.463 0.811643 16.7635 0.521911 16.0342 0.521911L16.0342 2.02191Z",fill:"currentColor"}}),e("path",{attrs:{d:"M14.0342 11.2719L14.0342 1.27191",stroke:"currentColor","stroke-width":"1.5"}})])])},oa=[],ia=n(sa,ra,oa,!1,null,null,null,null);const dt=ia.exports,aa={};var na=function(){var t=this,e=t._self._c;return e("i",{staticClass:"icon"},[e("svg",{attrs:{width:"29",height:"25",viewBox:"0 0 29 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M26.3519 9.01789H18.7877C18.596 9.01789 18.4503 8.8364 18.5014 8.65234C18.8082 7.56079 18.8363 6.37464 18.8363 5.25753C18.8363 4.63889 18.867 3.93846 18.7979 3.26103C18.7289 2.57338 18.5576 1.91128 18.1537 1.38724C17.7038 0.806949 17.0341 0.374939 16.2902 0.374939C14.5621 0.374939 14.2886 2.06723 14.1275 3.43998C13.9409 5.04024 13.8668 6.69419 13.1587 8.16919C12.6627 9.20195 11.9623 10.089 10.8605 10.5236C10.0144 10.8585 9.39064 11.1192 8.49848 11.293C8.36044 11.3211 8.26074 11.4387 8.26074 11.5793V22.7633C8.26074 22.9269 8.39366 23.0573 8.55471 23.0573H11.6504C11.745 23.0573 11.8319 23.1033 11.8882 23.18C12.4991 23.998 13.4731 24.5297 14.5749 24.5297H24.271C25.6873 24.5297 26.8427 23.3717 26.8427 21.958C26.8427 21.5925 26.7532 21.2448 26.5973 20.9381C26.536 20.8154 26.5666 20.6671 26.674 20.5827C27.1981 20.1635 27.538 19.21 27.538 18.4917V18.1977C27.538 17.8321 27.4486 17.4845 27.2926 17.1777C27.2313 17.055 27.262 16.9067 27.3693 16.8224C27.8934 16.4031 28.2334 15.7615 28.2334 15.0432V14.7492C28.2334 14.3836 28.1439 14.036 27.9879 13.7292C27.9266 13.6065 27.9573 13.4582 28.0646 13.3739C28.5887 12.9546 28.9287 12.313 28.9287 11.5947C28.9287 10.1785 27.7706 9.02301 26.357 9.02301L26.3519 9.01789Z",fill:"currentColor"}}),e("path",{attrs:{d:"M5.98246 10.0302H1.4143C1.02746 10.0302 0.713867 10.3439 0.713867 10.7307V23.5021C0.713867 23.889 1.02746 24.2025 1.4143 24.2025H5.98246C6.3693 24.2025 6.68289 23.889 6.68289 23.5021V10.7307C6.68289 10.3439 6.3693 10.0302 5.98246 10.0302Z",fill:"currentColor"}})])])},la=[],ca=n(aa,na,la,!1,null,null,null,null);const pa=ca.exports,da=U({__name:"IconClose",setup(s){return{__sfc:!0}}});var ha=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("span",{staticClass:"icon"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"}},[e("path",{attrs:{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z",fill:"currentColor"}})])])},ga=[],ua=n(da,ha,ga,!1,null,null,null,null);const ma=ua.exports,_a={name:"FeedbackInputBox",components:{IconClose:ma,IconThumbsUpFill:pa},props:{labels:{type:Object,default:()=>({})},hasFeedback:{type:Boolean,default:!1},isSaving:{type:Boolean,default:!1}},data(){return{message:""}},computed:{texts(){const s={title:d(r("Tell us how this insight can be improved %s(Optional)%s","google-analytics-for-wordpress"),"<span>","</span>"),feedbackHelp:r("Feedback submitted will include your analytics data & insights provided so we can improve. Thank you!","google-analytics-for-wordpress"),submit:r("Submit","google-analytics-for-wordpress"),thanksTitle:r("Thanks for your feedback!","google-analytics-for-wordpress")};return Object.assign(s,this.labels)}},methods:{onSubmit(){this.$emit("submit",this.message)},onClose(){this.$emit("close")}},mounted(){this.$nextTick(()=>{!this.hasFeedback&&this.$refs.textarea&&this.$refs.textarea.focus()})}};var fa=function(){var t=this,e=t._self._c;return e("form",{staticClass:"monsterinsights-ai-feedback",class:{"is-submitted":t.hasFeedback,"is-saving":t.isSaving},on:{submit:function(o){return o.preventDefault(),t.onSubmit.apply(null,arguments)}}},[t.hasFeedback?t._e():e("div",{staticClass:"monsterinsights-ai-feedback__close"},[e("button",{attrs:{type:"button"},on:{click:t.onClose}},[e("icon-close")],1)]),t.hasFeedback?[e("icon-thumbs-up-fill"),e("h3",{domProps:{innerHTML:t._s(t.texts.thanksTitle)}})]:[e("h3",{domProps:{innerHTML:t._s(t.texts.title)}}),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.message,expression:"message"}],ref:"textarea",attrs:{required:""},domProps:{value:t.message},on:{input:function(o){o.target.composing||(t.message=o.target.value)}}}),t.texts.feedbackHelp!==null?e("p",{domProps:{innerHTML:t._s(t.texts.feedbackHelp)}}):t._e(),e("button",{attrs:{type:"submit"},domProps:{innerHTML:t._s(t.texts.submit)}})]],2)},va=[],Ca=n(_a,fa,va,!1,null,null,null,null);const ht=Ca.exports,wa={name:"InsightsFeedback",components:{FeedbackInputBox:ht},props:{insight:{type:Object,required:!0}},data(){return{isSaving:!1}},computed:{...R("$_ai-insights",["ratings"]),foundRating(){return this.ratings.find(s=>s.insightId===this.insight.id)},hasFeedback(){return typeof this.foundRating<"u"?this.foundRating.hasOwnProperty("feedback")&&this.foundRating.feedback!==null:!1},hasSkippedFeedback(){return typeof this.foundRating<"u"?this.foundRating.hasOwnProperty("skipped")&&this.foundRating.skipped===!0:!1}},methods:{onSubmit(s){this.isSaving=!0,this.$store.dispatch("$_ai-insights/saveInsightFeedback",{insightId:this.insight.id,message:s}).then(async()=>{await this.$store.dispatch("$_ai-insights/refreshRatings"),this.isSaving=!1})},onClose(){this.isSaving=!0,this.$store.dispatch("$_ai-insights/saveInsightFeedback",{insightId:this.insight.id,skipped:!0}).then(async()=>{await this.$store.dispatch("$_ai-insights/refreshRatings"),this.isSaving=!1})}}};var ya=function(){var t=this,e=t._self._c;return t.hasSkippedFeedback?t._e():e("feedback-input-box",{attrs:{"has-feedback":t.hasFeedback,"is-saving":t.isSaving},on:{submit:t.onSubmit,close:t.onClose}})},ba=[],xa=n(wa,ya,ba,!1,null,null,null,null);const ka=xa.exports,$a={name:"InsightsItem",components:{InsightsFeedback:ka,IconAI:Ki,IconThumbsUp:pt,IconThumbsDown:dt},props:{mock:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},insight:{type:Object}},computed:{score:{get(){const s=this.$store.state["$_ai-insights"].ratings;if(s.length===0)return-1;const t=s.find(e=>e.insightId===this.insight.id);return typeof t>"u"?-1:t.score},set(s){this.$emit("rate",{id:this.insight.id,score:s})}},showFeedbackBox(){return this.score===0},mockInsight(){return{content:r("For the week of March 18 to March 24, 2024, your website received 6,424 visitors. Comparing this to the previous week, March 11 to March 17, 2024, when you had 6,658 visitors, there was decrease of 234 visotors (-3.51%).","google-analytics-for-wordpress")}},shownInsight(){return this.mock?this.mockInsight:this.insight}},methods:{rate(s){this.mock||(this.score=s)}}};var Ra=function(){var t=this,e=t._self._c;return e("article",{staticClass:"monsterinsights-ai-result"},[e("IconAI"),e("section",{staticClass:"monsterinsights-ai-result__content"},[t.loading?[t._m(0)]:t.insight||t.mock?[e("div",{staticClass:"monsterinsights-ai-result__message",domProps:{innerHTML:t._s(t.shownInsight.content)}}),e("div",{staticClass:"monsterinsights-ai-result__rate"},[e("button",{class:{"is-on":t.score===1},attrs:{type:"button",disabled:t.score===1||t.mock},on:{click:function(o){return o.preventDefault(),t.rate(1)}}},[e("IconThumbsUp")],1),e("button",{class:{"is-on":t.score===0},attrs:{type:"button",disabled:t.score===0||t.mock},on:{click:function(o){return o.preventDefault(),t.rate(0)}}},[e("IconThumbsDown")],1)]),t.showFeedbackBox?e("insights-feedback",{attrs:{insight:t.insight}}):t._e()]:t._e()],2)],1)},La=[function(){var s=this,t=s._self._c;return t("div",{staticClass:"monsterinsights-text-skeleton"},[t("span"),t("span"),t("span")])}],Pa=n($a,Ra,La,!1,null,null,null,null);const Da=Pa.exports,Sa=new ct,Ma=(s,t)=>Sa.post("feedback",{...t,feature_key:s}).then(e=>e.data),Ta={};var Ea=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("g",{attrs:{"clip-path":"url(#clip0_26_3424)"}},[e("path",{attrs:{d:"M22.5614 1.08295C22.5246 1.16322 22.4738 1.23635 22.4114 1.29895L8.23044 15.4769L12.2354 22.1535C12.3064 22.2722 12.4088 22.369 12.5313 22.4332C12.6539 22.4973 12.7918 22.5264 12.9298 22.5171C13.0678 22.5077 13.2005 22.4604 13.3133 22.3804C13.4261 22.3003 13.5146 22.1906 13.5689 22.0634L22.5614 1.08295ZM7.17144 14.4179L0.494942 10.4099C0.376203 10.339 0.279397 10.2366 0.215228 10.1141C0.151059 9.99152 0.122027 9.85363 0.131341 9.71562C0.140656 9.57761 0.187954 9.44487 0.268006 9.33207C0.348058 9.21927 0.457746 9.1308 0.584942 9.07645L21.5699 0.0854492C21.4885 0.122481 21.4143 0.17379 21.3509 0.236949L7.17144 14.4179Z",fill:"currentColor"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_26_3424"}},[e("rect",{attrs:{width:"22.5",height:"22.5",fill:"currentColor",transform:"translate(0.130371 0.0180664)"}})])])])},Fa=[],Ia=n(Ta,Ea,Fa,!1,null,null,null,null);const J=Ia.exports,Aa={};var Ba=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M15.7825 1.98804L1.2168 16.5537M1.2168 1.98804L15.7825 16.5537",stroke:"currentColor","stroke-width":"2.04109","stroke-linecap":"round","stroke-linejoin":"round"}})])},Na=[],Oa=n(Aa,Ba,Na,!1,null,null,null,null);const Ha=Oa.exports,Ya={inheritAttrs:!1,name:"FeatureFeedbackNPS",props:{value:{type:Number}},computed:{inputAttrs(){return{...this.$attrs,name:`feature-feedback-nps-${this.$attrs.name}`}},internalValue:{get(){return this.value},set(s){this.$emit("input",s)}},ratingIcons(){return{"rate-1":new URL(""+new URL("../img/rate-1.svg",import.meta.url).href,self.location).href,"rate-2":new URL(""+new URL("../img/rate-2.svg",import.meta.url).href,self.location).href,"rate-3":new URL(""+new URL("../img/rate-3.svg",import.meta.url).href,self.location).href,"rate-4":new URL(""+new URL("../img/rate-4.svg",import.meta.url).href,self.location).href,"rate-5":new URL(""+new URL("../img/rate-5.svg",import.meta.url).href,self.location).href}}}};var Ua=function(){var t=this,e=t._self._c;return e("fieldset",{staticClass:"monsterinsights-feature-feedback-nps"},t._l(5,function(o){return e("label",{key:o,staticClass:"monsterinsights-nps-radio",attrs:{for:t.inputAttrs.id}},[e("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.internalValue,expression:"internalValue"}],attrs:{type:"radio"},domProps:{value:o,checked:t._q(t.internalValue,o)},on:{change:function(i){t.internalValue=o}}},"input",t.inputAttrs,!1)),e("img",{attrs:{src:t.ratingIcons["rate-"+o],alt:""}})])}),0)},Va=[],Za=n(Ya,Ua,Va,!1,null,null,null,null);const ja=Za.exports,za={name:"FeatureFeedback",components:{IconMessage:J,FeatureFeedbackNPS:ja},props:{featureKey:{type:String,required:!0},labels:{type:Object,default:()=>{}}},data(){return{hasSubmitted:!1,isSubmitting:!1,isVisible:!1,renderWidget:!1,rating:0,message:""}},computed:{finalLabels(){return{...{widgetTitle:r("Provide Feedback","google-analytics-for-wordpress"),textAreaLabel:r("What do you think about this feature?","google-analytics-for-wordpress"),textAreaPlaceholder:r("Tell us in your words...","google-analytics-for-wordpress"),submitButtonText:r("Submit","google-analytics-for-wordpress"),thankYouTitle:r("Thanks! We appreciate your feedback.","google-analytics-for-wordpress")},...this.labels}},toggleButtonComponent(){return this.isVisible?Ha:J},thanksImage(){return new URL(""+new URL("../img/charlie-with-heart.svg",import.meta.url).href,self.location).href}},methods:{close(){this.$destroy(),this.$el.parentNode.removeChild(this.$el)},toggleWidget(){this.isVisible?(setTimeout(()=>{this.renderWidget=!1,this.hasSubmitted&&this.close()},250),this.isVisible=!1):(this.renderWidget=!0,setTimeout(()=>{this.isVisible=!0},10))},handleSubmit(){this.isSubmitting=!0,Ma(this.featureKey,{rating:this.rating,message:this.message}).then(()=>{this.hasSubmitted=!0}).finally(()=>{this.isSubmitting=!1})}}};var Wa=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-feature-feedback",class:[`monsterinsights-feature-feedback-${t.featureKey}`,{"is-loading":t.isSubmitting}]},[t.renderWidget?e("div",{staticClass:"monsterinsights-feature-feedback-widget",class:{"is-open":t.isVisible}},[t.hasSubmitted?e("div",{staticClass:"monsterinsights-feature-feedback-thanks"},[e("img",{attrs:{src:t.thanksImage,alt:""}}),e("h4",{domProps:{innerHTML:t._s(t.finalLabels.thankYouTitle)}})]):[e("h4",{domProps:{innerHTML:t._s(t.finalLabels.widgetTitle)}}),e("form",{staticClass:"monsterinsights-feature-feedback-form",on:{submit:function(o){return o.preventDefault(),t.handleSubmit.apply(null,arguments)}}},[e("FeatureFeedbackNPS",{attrs:{name:t.featureKey,required:""},model:{value:t.rating,callback:function(o){t.rating=o},expression:"rating"}}),e("label",{attrs:{for:`feature-feedback-message-${t.featureKey}`},domProps:{innerHTML:t._s(t.finalLabels.textAreaLabel)}}),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.message,expression:"message"}],attrs:{id:`feature-feedback-message-${t.featureKey}`,name:`feature-feedback-message-${t.featureKey}`,placeholder:t.finalLabels.textAreaPlaceholder},domProps:{value:t.message},on:{input:function(o){o.target.composing||(t.message=o.target.value)}}}),e("button",{staticClass:"monsterinsights-button",attrs:{type:"submit",disabled:!t.rating},domProps:{innerHTML:t._s(t.finalLabels.submitButtonText)}})],1)]],2):t._e(),e("button",{staticClass:"monsterinsights-feature-feedback-toggle",attrs:{type:"button"},on:{click:t.toggleWidget}},[e("transition",{attrs:{name:"fade"}},[e(t.toggleButtonComponent,{tag:"component"})],1)],1)])},Ga=[],qa=n(za,Wa,Ga,!1,null,null,null,null);const Ja=qa.exports,Ka={create(s,t={}){const{feedback:e}=window.monsterinsights;if(typeof e<"u"&&Object.keys(e.tracked_features).includes(s))return;const o={parentElement:document.body,props:{featureKey:s}},i=wt(o,t),a=document.createElement("div"),{parentElement:l,props:h}=i;l.append(a),new g({render:p=>p(Ja,{props:h})}).$mount(a)}},Qa={name:"AiInsightsViewer",components:{ReportUpsellOverlay:f,InsightsItem:Da},props:{upsell:{type:Boolean,default:!1}},data(){return{}},computed:{...R("$_ai-insights",["isLoading","insights","ratings"]),mascotImage(){return new URL(""+new URL("../img/charlie-front.svg",import.meta.url).href,self.location).href},texts(){return{title:r("AI Insights","google-analytics-for-wordpress"),generateInsights:r("Generate Insights","google-analytics-for-wordpress"),feedbackTitle:d(r("Tell us how this insight can be improved %s(Optional)%s","google-analytics-for-wordpress"),"<span>","</span>"),upsellSubheading:r("Our AI Insights Report includes:","google-analytics-for-wordpress")}}},methods:{fetchInsights(s=!1){this.$isPro()&&this.$store.dispatch("$_ai-insights/fetchInsights",{force_refresh:s})},handleItemRating(s){const{id:t,score:e}=s;this.$store.dispatch("$_ai-insights/rateInsight",{insightId:t,score:e})}},mounted(){this.$isPro()&&(Ka.create("ai-insights",{parentElement:this.$refs.container,props:{labels:{textAreaLabel:r("What do you think about Our AI Insights?","google-analytics-for-wordpress")}}}),this.fetchInsights())}};var Xa=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.texts.title)}})]),e("article",{ref:"container",staticClass:"monsterinsights-ai-insights-card",class:{"monsterinsights-blur":t.upsell}},[t.upsell?e("report-upsell-overlay",{attrs:{"custom-subheading":t.texts.upsellSubheading,report:"ai_insights","force-two-columns":""}}):t._e(),e("div",{staticClass:"monsterinsights-container"},[e("div",{staticClass:"monsterinsights-ai-insights-card-wrapper"},[e("header",{staticClass:"monsterinsights-ai-insights-card__header"},[e("figure",{staticClass:"framed-mascot"},[e("img",{attrs:{src:t.mascotImage,alt:""}})]),e("h3",{domProps:{textContent:t._s(t.texts.title)}})]),e("section",{staticClass:"monsterinsights-ai-insights-card__content"},[t.upsell?[e("insights-item",{attrs:{mock:""}}),e("insights-item",{attrs:{mock:""}}),e("insights-item",{attrs:{mock:""}})]:t.isLoading?e("insights-item",{attrs:{loading:""}}):t._l(t.insights,function(o){return e("insights-item",{key:o.id,attrs:{insight:o},on:{rate:t.handleItemRating}})})],2),e("footer",{staticClass:"monsterinsights-ai-insights-card__footer"},[e("button",{staticClass:"monsterinsights-button",domProps:{textContent:t._s(t.texts.generateInsights)},on:{click:function(o){return t.fetchInsights(!0)}}})])])])],1)])},tn=[],en=n(Qa,Xa,tn,!1,null,null,null,null);const sn=en.exports,rn=(s,t)=>{s.chatId=t},on=(s,t)=>{s.currentChat=t,t.length>0&&s.currentChat[s.currentChat.length-1].role==="user"?s.aiError=r("Looks like your last message was not sent. Please try again.","monsterinsights-ai-insights"):s.aiError=null},an=(s,t=!0)=>{s.isLoadingChat=t},nn=(s,t=!0)=>{s.isWaitingForAI=t},ln=(s,t=!0)=>{s.isLoadingChatLists=t},cn=(s,{pinnedChats:t,recentChats:e})=>{s.pinnedChats=t,s.recentChats=e},pn=(s,t)=>{let{currentChat:e}=s;e=[...e,...t],s.currentChat=e},dn=(s,t)=>{if(t===null){s.aiError=null,s.retryable=!0;return}typeof t=="string"?(s.aiError=t,s.retryable=!0):(s.aiError=t.error?t.error:"",s.retryable=t.hasOwnProperty("retryable")?t.retryable:!0)},hn=(s,{messageId:t,rating:e})=>{const o=s.currentChat.findIndex(i=>i.id===t);o!==-1&&(s.currentChat[o].rating=e),s.currentChat=[...s.currentChat]},gn={SET_CHAT_ID:rn,SET_IS_LOADING_CHAT:an,UPDATE_CURRENT_CHAT:on,SET_IS_WAITING_FOR_AI:nn,SET_IS_LOADING_CHAT_LISTS:ln,UPDATE_CHAT_LISTS:cn,APPEND_MESSAGES:pn,SET_AI_ERROR:dn,UPDATE_MESSAGE_RATING:hn},un=({commit:s},t=!1)=>{t||s("SET_IS_LOADING_CHAT_LISTS"),x.getChats().then(e=>{s("UPDATE_CHAT_LISTS",{pinnedChats:e.pinned,recentChats:e.recent})}).finally(()=>{s("SET_IS_LOADING_CHAT_LISTS",!1)})},mn=({state:s,commit:t,dispatch:e},{chatId:o,force:i=!1})=>{if(o===!1){t("SET_CHAT_ID",null),t("UPDATE_CURRENT_CHAT",[]);return}if(!(!i&&s.chatId===o))return t("SET_IS_LOADING_CHAT"),x.getChatById(o).then(a=>{t("SET_CHAT_ID",a.id),t("UPDATE_CURRENT_CHAT",a.chat)}).catch(()=>{throw t("SET_CHAT_ID",null),t("UPDATE_CURRENT_CHAT",[]),e("getChats"),new Error("Chat not found")}).finally(()=>{t("SET_IS_LOADING_CHAT",!1)})},_n=(s,{chatId:t,properties:e})=>x.updateChatProperties(t,e),fn=({state:s,commit:t,dispatch:e},o)=>{t("SET_IS_LOADING_CHAT_LISTS"),x.deleteChat(o).then(()=>{o===s.chatId&&(t("SET_CHAT_ID",null),t("UPDATE_CURRENT_CHAT",[])),e("getChats")})},vn=({commit:s,state:t})=>{s("SET_IS_WAITING_FOR_AI"),x.retryLastChatMessage(t.chatId).then(e=>{s("SET_AI_ERROR",null),s("APPEND_MESSAGES",[e.latest_message])}).catch(e=>{const{data:o}=e.response.data;s("SET_AI_ERROR",o)}).finally(()=>{s("SET_IS_WAITING_FOR_AI",!1)})},Cn=({dispatch:s,commit:t,state:e,getters:o},i)=>{const a=!o.hasChatStarted;return t("APPEND_MESSAGES",[{role:"user",content:i}]),t("SET_IS_WAITING_FOR_AI"),(a?x.sendMessage(i):x.sendMessage(i,e.chatId)).then(p=>{t("SET_AI_ERROR",null),a&&(t("SET_CHAT_ID",p.chat_id),s("getChats",!0));const u=p.latest_message;return t("APPEND_MESSAGES",[u]),{isNewChat:a,chatId:p.chat_id}}).catch(p=>{const{data:u}=p.response.data;t("SET_AI_ERROR",u),u.chat_id&&t("SET_CHAT_ID",u.chat_id)}).finally(()=>{t("SET_IS_WAITING_FOR_AI",!1)})},wn=({commit:s},{chatId:t,messageId:e,rating:o})=>(s("UPDATE_MESSAGE_RATING",{messageId:e,rating:o}),x.rateChatMessage(t,e,o)),yn=(s,t)=>x.saveChatMessageFeedback(t),bn={getChats:un,loadChat:mn,deleteChat:fn,updateChatProperties:_n,addUserMessage:Cn,retryLastChatMessage:vn,rateChatMessage:wn,saveChatMessageFeedback:yn},xn=s=>s.currentChat.length>0,kn=s=>!s.isWaitingForAI,$n=s=>s.aiError!==null,Rn=(s,t)=>t.hasAIError&&s.chatId!==null&&!s.isWaitingForAI,Ln={hasChatStarted:xn,userCanSendMessage:kn,hasAIError:$n,canRetryLastMessage:Rn},Pn={chatId:null,isWaitingForAI:!1,currentChat:[],pinnedChats:[],recentChats:[],isLoadingChatLists:!1,isLoadingChat:!1,aiError:null,retryable:!0},Dn={namespaced:!0,state:Pn,getters:Ln,mutations:gn,actions:bn},Sn={};var Mn=function(){var t=this,e=t._self._c;return e("i",{staticClass:"icon"},[e("svg",{attrs:{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M6 6.0592L0.803849 0.0592046L11.1962 0.0592055L6 6.0592Z",fill:"currentColor"}})])])},Tn=[],En=n(Sn,Mn,Tn,!1,null,null,null,null);const Fn=En.exports,In={name:"SidebarBlock",components:{IconArrowDown:Fn},props:{toggleLabel:{required:!0,type:String},isLoading:{type:Boolean,default:!1}},data(){return{isOpen:!1}},methods:{open(){this.isOpen=!0},close(){this.isOpen=!1},toggle(){this.isLoading||(this.isOpen=!this.isOpen)}}};var An=function(){var t=this,e=t._self._c;return e("section",{staticClass:"monsterinsights-sidebar-block",class:{"is-open":t.isOpen,"is-loading":t.isLoading}},[e("button",{staticClass:"monsterinsights-sidebar-block__toggle",on:{click:t.toggle}},[e("span",{domProps:{innerHTML:t._s(t.toggleLabel)}}),e("icon-arrow-down")],1),e("transition",{attrs:{name:"slide-down"}},[t.isOpen?e("div",{staticClass:"monsterinsights-sidebar-block__content"},[t._t("default")],2):t._e()])],1)},Bn=[],Nn=n(In,An,Bn,!1,null,null,null,null);const On=Nn.exports,Hn={};var Yn=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M2.5 11.3981L3.4525 10.6362L3.45875 10.6312C3.6575 10.4718 3.75812 10.3918 3.87 10.3349C3.97 10.2837 4.07688 10.2462 4.1875 10.2237C4.31188 10.1981 4.44125 10.1981 4.70125 10.1981H10.1269C10.8256 10.1981 11.1756 10.1981 11.4425 10.0618C11.6777 9.94197 11.8689 9.75075 11.9887 9.51556C12.125 9.24806 12.125 8.89806 12.125 8.20056V3.44618C12.125 2.74743 12.125 2.39743 11.9887 2.13056C11.8687 1.8953 11.6773 1.70408 11.4419 1.58431C11.175 1.44806 10.825 1.44806 10.125 1.44806H2.875C2.175 1.44806 1.825 1.44806 1.5575 1.58431C1.32228 1.70411 1.13105 1.89534 1.01125 2.13056C0.875 2.39806 0.875 2.74806 0.875 3.44806V10.6174C0.875 11.2837 0.875 11.6168 1.01125 11.7874C1.06984 11.861 1.14427 11.9204 1.229 11.9612C1.31374 12.002 1.40658 12.0231 1.50062 12.0231C1.71937 12.0231 1.97937 11.8143 2.5 11.3981Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}})])},Un=[],Vn=n(Hn,Yn,Un,!1,null,null,null,null);const Zn=Vn.exports,jn={};var zn=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"4",height:"15",viewBox:"0 0 4 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M2 2.3512C2.41421 2.3512 2.75 2.01541 2.75 1.6012C2.75 1.18698 2.41421 0.851196 2 0.851196C1.58579 0.851196 1.25 1.18698 1.25 1.6012C1.25 2.01541 1.58579 2.3512 2 2.3512Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M2 7.8512C2.41421 7.8512 2.75 7.51541 2.75 7.1012C2.75 6.68699 2.41421 6.3512 2 6.3512C1.58579 6.3512 1.25 6.68699 1.25 7.1012C1.25 7.51541 1.58579 7.8512 2 7.8512Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}}),e("path",{attrs:{d:"M2 13.3512C2.41421 13.3512 2.75 13.0154 2.75 12.6012C2.75 12.187 2.41421 11.8512 2 11.8512C1.58579 11.8512 1.25 12.187 1.25 12.6012C1.25 13.0154 1.58579 13.3512 2 13.3512Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}})])},Wn=[],Gn=n(jn,zn,Wn,!1,null,null,null,null);const qn=Gn.exports,Jn={};var Kn=function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon"},[e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("g",{attrs:{"clip-path":"url(#clip0_93_850)"}},[e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.7812 3.54248L12.7637 5.52748C13.3937 6.15748 13.9037 6.66811 14.2324 7.11186C14.5705 7.56811 14.7893 8.04936 14.6705 8.59748C14.5518 9.14686 14.1543 9.49373 13.658 9.76936C13.1749 10.0375 12.4993 10.2912 11.6662 10.6044L10.4305 11.0687C9.93366 11.255 9.79866 11.3131 9.69803 11.4C9.64803 11.4437 9.60241 11.4937 9.56303 11.5481C9.48553 11.6562 9.43991 11.7962 9.29928 12.3081L9.29116 12.3362C9.14866 12.8556 9.03053 13.2844 8.90116 13.6062C8.76991 13.9331 8.59303 14.2425 8.27491 14.4244C8.05408 14.5504 7.80416 14.6165 7.54991 14.6162C7.18303 14.6162 6.87616 14.4337 6.60053 14.215C6.32928 13.9987 6.01553 13.6837 5.63491 13.3025L4.64241 12.31L2.06616 14.8894C1.9783 14.9774 1.85908 15.0269 1.73472 15.027C1.61036 15.0271 1.49105 14.9778 1.40303 14.89C1.31501 14.8021 1.2655 14.6829 1.26538 14.5586C1.26526 14.4342 1.31455 14.3149 1.40241 14.2269L3.97991 11.6469L3.02053 10.6862C2.64241 10.3081 2.33053 9.99561 2.11553 9.72561C1.89741 9.45186 1.71678 9.14686 1.71428 8.78311C1.71286 8.52387 1.78038 8.26892 1.90991 8.04436C2.09116 7.72873 2.39866 7.55311 2.72366 7.42248C3.04366 7.29436 3.46928 7.17686 3.98491 7.03498L4.01303 7.02686C4.52553 6.88561 4.66616 6.83936 4.77366 6.76186C4.82991 6.72186 4.87991 6.67498 4.92491 6.62311C5.01116 6.52123 5.06866 6.38561 5.25178 5.88561L5.69928 4.66311C6.00866 3.81998 6.25866 3.13686 6.52428 2.64936C6.79741 2.14748 7.14303 1.74436 7.69428 1.62311C8.24553 1.50123 8.72866 1.72186 9.18741 2.06186C9.63241 2.39311 10.1468 2.90748 10.7812 3.54248ZM8.62803 2.81436C8.25178 2.53436 8.05241 2.50311 7.89616 2.53748C7.73991 2.57186 7.57178 2.68436 7.34741 3.09686C7.11928 3.51561 6.89178 4.13311 6.56616 5.02248L6.13178 6.20811L6.10678 6.27561C5.96116 6.67561 5.84803 6.98561 5.63803 7.23124C5.54469 7.34084 5.43851 7.43884 5.32178 7.52311C5.05928 7.71186 4.74241 7.79873 4.33116 7.91186L4.26241 7.93061C3.71116 8.08248 3.33741 8.18686 3.07303 8.29311C2.80741 8.39936 2.74366 8.47436 2.72178 8.51186C2.67539 8.59244 2.65124 8.68389 2.65178 8.77686C2.65178 8.82061 2.67053 8.91748 2.84928 9.14186C3.02678 9.36498 3.30053 9.63998 3.70428 10.0444L6.27741 12.6194C6.68366 13.0269 6.96053 13.3025 7.18491 13.4819C7.40991 13.6606 7.50741 13.6787 7.55053 13.6787C7.64172 13.679 7.73137 13.6552 7.81053 13.61C7.84803 13.5887 7.92366 13.525 8.03116 13.2575C8.13803 12.9906 8.24241 12.6137 8.39491 12.0594L8.41366 11.9906C8.52616 11.58 8.61366 11.2631 8.80116 11.0012C8.88312 10.8872 8.97814 10.7832 9.08428 10.6912C9.32803 10.4806 9.63553 10.365 10.0337 10.2162L10.1005 10.1912L11.2987 9.74123C12.1787 9.40998 12.788 9.17999 13.2024 8.94999C13.6093 8.72436 13.7205 8.55623 13.7543 8.39998C13.788 8.24311 13.7562 8.04373 13.4793 7.66998C13.1968 7.28873 12.7374 6.82686 12.0724 6.16186L10.1462 4.23311C9.47678 3.56311 9.01116 3.09936 8.62803 2.81436Z",fill:"currentColor"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_93_850"}},[e("rect",{attrs:{width:"15",height:"15",fill:"white",transform:"translate(0.484253 0.808105)"}})])])])])},Qn=[],Xn=n(Jn,Kn,Qn,!1,null,null,null,null);const tl=Xn.exports,el=U({__name:"IconPencil",setup(s){return{__sfc:!0}}});var sl=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("span",{staticClass:"icon"},[e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M2.46179 14.3307H13.5118M3.61237 9.1655C3.31777 9.44793 3.15234 9.83075 3.15242 10.2299V12.3474H5.3783C5.79544 12.3474 6.19531 12.1887 6.49021 11.9058L13.0511 5.62201C13.3459 5.33963 13.5114 4.9568 13.5114 4.55764C13.5114 4.15849 13.3459 3.77566 13.0511 3.49327L12.4033 2.87184C12.2572 2.73192 12.0838 2.62094 11.8928 2.54524C11.7019 2.46954 11.4973 2.4306 11.2906 2.43066C11.0839 2.43073 10.8793 2.46978 10.6884 2.54559C10.4976 2.62141 10.3242 2.73249 10.1781 2.8725L3.61237 9.1655Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}})])])},rl=[],ol=n(el,sl,rl,!1,null,null,null,null);const il=ol.exports,al=U({__name:"IconUnpin",setup(s){return{__sfc:!0}}});var nl=function(){var t=this,e=t._self._c;return t._self._setupProxy,e("span",{staticClass:"icon"},[e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("g",{attrs:{"clip-path":"url(#clip0_93_615)"}},[e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.2255 2.84497L13.208 4.82997C13.838 5.45997 14.348 5.9706 14.6767 6.41435C15.0149 6.8706 15.2336 7.35185 15.1149 7.89997C14.9961 8.44935 14.5986 8.79623 14.1024 9.07185C13.6192 9.33998 12.9436 9.59373 12.1105 9.90685L10.8749 10.3712C10.378 10.5575 10.243 10.6156 10.1424 10.7025C10.0924 10.7462 10.0467 10.7962 10.0074 10.8506C9.92987 10.9587 9.88424 11.0987 9.74362 11.6106L9.73549 11.6387C9.59299 12.1581 9.47487 12.5868 9.34549 12.9087C9.21424 13.2356 9.03737 13.545 8.71924 13.7268C8.49842 13.8529 8.2485 13.919 7.99424 13.9187C7.62737 13.9187 7.32049 13.7362 7.04487 13.5175C6.77362 13.3012 6.45987 12.9862 6.07924 12.605L5.08674 11.6125L2.51049 14.1918C2.42264 14.2799 2.30342 14.3294 2.17906 14.3295C2.0547 14.3296 1.93539 14.2803 1.84737 14.1925C1.75935 14.1046 1.70983 13.9854 1.70972 13.861C1.7096 13.7367 1.75889 13.6174 1.84674 13.5293L4.42424 10.9493L3.46487 9.98872C3.08674 9.6106 2.77487 9.2981 2.55987 9.0281C2.34174 8.75435 2.16112 8.44935 2.15862 8.0856C2.1572 7.82636 2.22471 7.57141 2.35424 7.34685C2.53549 7.03122 2.84299 6.8556 3.16799 6.72498C3.48799 6.59685 3.91362 6.47935 4.42924 6.33747L4.45737 6.32935C4.96987 6.1881 5.11049 6.14185 5.21799 6.06435C5.27424 6.02435 5.32424 5.97747 5.36924 5.9256C5.45549 5.82372 5.51299 5.6881 5.69612 5.1881L6.14362 3.9656C6.45299 3.12247 6.70299 2.43935 6.96862 1.95185C7.24174 1.44997 7.58737 1.04685 8.13862 0.9256C8.68987 0.803725 9.17299 1.02435 9.63174 1.36435C10.0767 1.6956 10.5911 2.20997 11.2255 2.84497ZM9.07237 2.11685C8.69612 1.83685 8.49674 1.8056 8.34049 1.83997C8.18424 1.87435 8.01612 1.98685 7.79174 2.39935C7.56362 2.8181 7.33612 3.4356 7.01049 4.32497L6.57612 5.5106L6.55112 5.5781C6.40549 5.9781 6.29237 6.2881 6.08237 6.53373C5.98902 6.64333 5.88285 6.74133 5.76612 6.8256C5.50362 7.01435 5.18674 7.10122 4.77549 7.21435L4.70674 7.2331C4.15549 7.38497 3.78174 7.48935 3.51737 7.5956C3.25174 7.70185 3.18799 7.77685 3.16612 7.81435C3.11973 7.89493 3.09557 7.98638 3.09612 8.07935C3.09612 8.1231 3.11487 8.21997 3.29362 8.44435C3.47112 8.66747 3.74487 8.94247 4.14862 9.34685L6.72174 11.9219C7.12799 12.3293 7.40487 12.605 7.62924 12.7843C7.85424 12.9631 7.95174 12.9812 7.99487 12.9812C8.08606 12.9814 8.17571 12.9577 8.25487 12.9125C8.29237 12.8912 8.36799 12.8275 8.47549 12.56C8.58237 12.2931 8.68674 11.9162 8.83924 11.3618L8.85799 11.2931C8.97049 10.8825 9.05799 10.5656 9.24549 10.3037C9.32745 10.1897 9.42247 10.0857 9.52862 9.99372C9.77237 9.7831 10.0799 9.66747 10.478 9.51873L10.5449 9.49372L11.743 9.04373C12.623 8.71247 13.2324 8.48248 13.6467 8.25248C14.0536 8.02685 14.1649 7.85873 14.1986 7.70248C14.2324 7.5456 14.2005 7.34622 13.9236 6.97248C13.6411 6.59123 13.1817 6.12935 12.5167 5.46435L10.5905 3.5356C9.92112 2.8656 9.45549 2.40185 9.07237 2.11685Z",fill:"currentColor"}}),e("path",{attrs:{d:"M3.35693 2.06339L13.5005 13.1579",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_93_615"}},[e("rect",{attrs:{width:"15",height:"15",fill:"white",transform:"translate(0.928711 0.110596)"}})])])])])},ll=[],cl=n(al,nl,ll,!1,null,null,null,null);const pl=cl.exports,dl={};var hl=function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon"},[e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("g",{attrs:{"clip-path":"url(#clip0_93_862)"}},[e("path",{attrs:{d:"M6.64499 3.21886V3.48672H9.3236V3.21886C9.3236 2.86365 9.1825 2.52299 8.93133 2.27183C8.68016 2.02066 8.3395 1.87955 7.9843 1.87955C7.62909 1.87955 7.28843 2.02066 7.03726 2.27183C6.78609 2.52299 6.64499 2.86365 6.64499 3.21886ZM5.57354 3.48672V3.21886C5.57354 2.57949 5.82753 1.9663 6.27964 1.5142C6.73174 1.06209 7.34492 0.808105 7.9843 0.808105C8.62367 0.808105 9.23685 1.06209 9.68896 1.5142C10.1411 1.9663 10.395 2.57949 10.395 3.21886V3.48672H14.413C14.5551 3.48672 14.6913 3.54316 14.7918 3.64363C14.8923 3.7441 14.9487 3.88036 14.9487 4.02244C14.9487 4.16453 14.8923 4.30079 14.7918 4.40126C14.6913 4.50172 14.5551 4.55817 14.413 4.55817H13.6051L12.5915 13.434C12.5168 14.0877 12.2041 14.691 11.713 15.1289C11.222 15.5668 10.5869 15.8087 9.92897 15.8084H6.03962C5.38168 15.8087 4.74664 15.5668 4.25558 15.1289C3.76453 14.691 3.45182 14.0877 3.37708 13.434L2.36349 4.55817H1.55562C1.41354 4.55817 1.27727 4.50172 1.17681 4.40126C1.07634 4.30079 1.0199 4.16453 1.0199 4.02244C1.0199 3.88036 1.07634 3.7441 1.17681 3.64363C1.27727 3.54316 1.41354 3.48672 1.55562 3.48672H5.57354ZM4.4421 13.3119C4.48682 13.704 4.67425 14.0659 4.96867 14.3287C5.26309 14.5915 5.6439 14.7368 6.03855 14.7369H9.92951C10.3242 14.7368 10.705 14.5915 10.9994 14.3287C11.2938 14.0659 11.4812 13.704 11.526 13.3119L12.5272 4.55817H3.4419L4.4421 13.3119ZM6.37713 6.4332C6.51921 6.4332 6.65547 6.48964 6.75594 6.59011C6.85641 6.69057 6.91285 6.82684 6.91285 6.96892V12.3262C6.91285 12.4682 6.85641 12.6045 6.75594 12.705C6.65547 12.8054 6.51921 12.8619 6.37713 12.8619C6.23504 12.8619 6.09878 12.8054 5.99831 12.705C5.89785 12.6045 5.8414 12.4682 5.8414 12.3262V6.96892C5.8414 6.82684 5.89785 6.69057 5.99831 6.59011C6.09878 6.48964 6.23504 6.4332 6.37713 6.4332ZM10.1272 6.96892C10.1272 6.82684 10.0707 6.69057 9.97028 6.59011C9.86981 6.48964 9.73355 6.4332 9.59146 6.4332C9.44938 6.4332 9.31312 6.48964 9.21265 6.59011C9.11218 6.69057 9.05574 6.82684 9.05574 6.96892V12.3262C9.05574 12.4682 9.11218 12.6045 9.21265 12.705C9.31312 12.8054 9.44938 12.8619 9.59146 12.8619C9.73355 12.8619 9.86981 12.8054 9.97028 12.705C10.0707 12.6045 10.1272 12.4682 10.1272 12.3262V6.96892Z",fill:"currentColor"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_93_862"}},[e("rect",{attrs:{width:"15",height:"15",fill:"white",transform:"translate(0.484253 0.808105)"}})])])])])},gl=[],ul=n(dl,hl,gl,!1,null,null,null,null);const ml=ul.exports,_l={name:"ChatItem",components:{IconUnpin:pl,IconChatItem:Zn,IconMenuDots:qn,IconPin:tl,IconPencil:il,IconTrash:ml},props:{eventBus:{type:Object,required:!0},chat:{type:Object,required:!0},isActive:{type:Boolean,default:!1}},data(){return{showFloatingMenu:!1,isRenaming:!1,renameValue:""}},computed:{preview(){return this.chat.title?this.chat.title:this.chat.preview},texts(){return{actions:{pin:this.chat.is_pinned?r("Unpin","google-analytics-for-wordpress"):r("Pin","google-analytics-for-wordpress"),rename:r("Rename","google-analytics-for-wordpress"),delete:r("Delete","google-analytics-for-wordpress")}}}},methods:{handleClick(){this.$emit("selected",this.chat.id)},toggleFloatingMenu(){this.showFloatingMenu=!this.showFloatingMenu,this.showFloatingMenu&&this.eventBus.$emit("chat-item-float-open",this.chat.id)},closeFloatingMenu(){this.showFloatingMenu=!1},toggleChatPin(){this.closeFloatingMenu(),this.$emit("update",this.chat.id,{is_pinned:!this.chat.is_pinned})},enableChatRename(){this.closeFloatingMenu(),this.isRenaming=!0;const{title:s,preview:t}=this.chat;s&&s.length>0?this.renameValue=s:this.renameValue=t.substring(0,50),this.$nextTick(()=>{this.$refs.renameField.focus()})},deleteChat(){this.$emit("delete",this.chat.id),this.eventBus.$emit("chat-item-float-open",null)},onItemRename(){this.$emit("update",this.chat.id,{title:this.renameValue.length>0?this.renameValue:this.chat.preview}),this.finishRename()},finishRename(){this.isRenaming=!1,this.renameValue=""}},mounted(){this.eventBus.$on("chat-item-float-open",s=>{s!==this.chat.id&&this.closeFloatingMenu()})}};var fl=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-ai-chat-history-item",class:{"is-active":t.isActive},on:{keyup:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"esc",27,o.key,["Esc","Escape"])?null:t.closeFloatingMenu.apply(null,arguments)}}},[e("button",{staticClass:"monsterinsights-ai-chat-history-item__action",attrs:{type:"button"},on:{click:t.handleClick}},[e("span",{staticClass:"monsterinsights-ai-chat-history-item__icon"},[e("icon-chat-item")],1),e("span",{staticClass:"monsterinsights-ai-chat-history-item__preview",domProps:{innerHTML:t._s(t.preview)}})]),t.isRenaming?e("form",{staticClass:"monsterinsights-ai-chat-history-item__rename",on:{keyup:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"esc",27,o.key,["Esc","Escape"])?null:t.finishRename.apply(null,arguments)},submit:function(o){return o.preventDefault(),t.onItemRename.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.renameValue,expression:"renameValue"}],ref:"renameField",attrs:{type:"text",maxlength:"50",placeholder:t.chat.preview},domProps:{value:t.renameValue},on:{input:function(o){o.target.composing||(t.renameValue=o.target.value)}}}),e("button",{attrs:{type:"submit"}},[e("icon-pencil")],1)]):t._e(),e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.closeFloatingMenu,expression:"closeFloatingMenu"}],staticClass:"monsterinsights-ai-chat-history-item-menu"},[e("button",{staticClass:"monsterinsights-ai-chat-history-item-menu-toggle",attrs:{type:"button"},on:{click:t.toggleFloatingMenu}},[e("icon-menu-dots")],1),t.showFloatingMenu?e("div",{staticClass:"monsterinsights-ai-chat-history-item-menu-float"},[e("button",{staticClass:"floating-action",on:{click:t.toggleChatPin}},[t.chat.is_pinned?e("icon-unpin"):e("icon-pin"),e("span",{domProps:{innerHTML:t._s(t.texts.actions.pin)}})],1),e("button",{staticClass:"floating-action",on:{click:t.enableChatRename}},[e("icon-pencil"),e("span",{domProps:{innerHTML:t._s(t.texts.actions.rename)}})],1),e("button",{staticClass:"floating-action",on:{click:t.deleteChat}},[e("icon-trash"),e("span",{domProps:{innerHTML:t._s(t.texts.actions.delete)}})],1)]):t._e()])])},vl=[],Cl=n(_l,fl,vl,!1,null,null,null,null);const wl=Cl.exports,yl=new g,bl={name:"AiAnalyticsSidebar",components:{ChatItem:wl,SidebarBlock:On},data(){return{eventBus:yl}},computed:{...R("$_ai-chat",["chatId","pinnedChats","recentChats","isLoadingChat","isLoadingChatLists"]),texts(){return{newConversation:r("New Conversation","google-analytics-for-wordpress"),pinnedConversations:r("Pinned Conversations","google-analytics-for-wordpress"),recent:r("Recent","google-analytics-for-wordpress"),noPinnedConversations:r("There aren't any pinned conversations","google-analytics-for-wordpress"),noRecentConversations:r("There aren't any recent conversations","google-analytics-for-wordpress")}}},methods:{startNewChat(){this.$router.push({name:"ai-insights-new-chat"})},onSidebarChatSelected(s){this.chatId!==s&&this.$router.push({name:"ai-insights-chat",params:{chatId:s}})},async onSidebarChatUpdate(s,t){this.$store.commit("$_ai-chat/SET_IS_LOADING_CHAT_LISTS"),await this.$store.dispatch("$_ai-chat/updateChatProperties",{chatId:s,properties:t}),await this.$store.dispatch("$_ai-chat/getChats")},onSidebarChatDelete(s){this.$store.dispatch("$_ai-chat/deleteChat",s).then(()=>{s===this.chatId&&this.$router.replace("/ai-insights/chat")})}},watch:{pinnedChats(s){const{pinnedChatsBlock:t}=this.$refs;s.length>0?t.open():t.close()},recentChats(s){const{recentChatsBlock:t}=this.$refs;s.length>0?t.open():t.close()}}};var xl=function(){var t=this,e=t._self._c;return e("aside",{staticClass:"monsterinsights-ai-insights__sidebar"},[t.chatId?e("div",{staticClass:"monsterinsights-ai-insights__sidebar-actions"},[e("button",{staticClass:"monsterinsights-button",domProps:{innerHTML:t._s(t.texts.newConversation)},on:{click:t.startNewChat}})]):t._e(),e("sidebar-block",{ref:"pinnedChatsBlock",attrs:{"is-loading":t.isLoadingChatLists,"toggle-label":t.texts.pinnedConversations}},[t.pinnedChats.length===0?e("div",[e("p",{domProps:{innerHTML:t._s(t.texts.noPinnedConversations)}})]):t._l(t.pinnedChats,function(o){return e("chat-item",{key:o.id,attrs:{chat:o,"event-bus":t.eventBus,"is-active":o.id===t.chatId},on:{selected:t.onSidebarChatSelected,update:t.onSidebarChatUpdate,delete:t.onSidebarChatDelete}})})],2),e("sidebar-block",{ref:"recentChatsBlock",attrs:{"is-loading":t.isLoadingChatLists,"toggle-label":t.texts.recent}},[t.recentChats.length===0?e("div",[e("p",{domProps:{innerHTML:t._s(t.texts.noRecentConversations)}})]):t._l(t.recentChats,function(o){return e("chat-item",{key:o.id,attrs:{chat:o,"event-bus":t.eventBus,"is-active":o.id===t.chatId},on:{selected:t.onSidebarChatSelected,update:t.onSidebarChatUpdate,delete:t.onSidebarChatDelete}})})],2)],1)},kl=[],$l=n(bl,xl,kl,!1,null,null,null,null);const Rl=$l.exports,Ll={};var Pl=function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon"},[e("svg",{attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M15.67 0.823711C15.7361 0.889929 15.7813 0.974112 15.8 1.0658C15.8186 1.15749 15.81 1.25265 15.775 1.33946L10.2174 15.2331C10.1684 15.3554 10.0866 15.4619 9.98104 15.5408C9.87545 15.6196 9.75014 15.6678 9.61892 15.6801C9.48769 15.6923 9.35564 15.6681 9.23728 15.6102C9.11892 15.5522 9.01885 15.4627 8.94808 15.3515L5.91283 10.5809L1.14218 7.54559C1.03074 7.4749 0.940995 7.3748 0.882848 7.25632C0.824701 7.13785 0.800413 7.00562 0.812664 6.87422C0.824915 6.74282 0.873229 6.61735 0.952274 6.51167C1.03132 6.40599 1.13802 6.3242 1.26061 6.27533L15.1542 0.719607C15.241 0.684663 15.3362 0.675991 15.4279 0.694669C15.5196 0.713346 15.6037 0.758551 15.67 0.824666V0.823711ZM6.866 10.302L9.50299 14.4451L14.0234 3.14457L6.866 10.302ZM13.3482 2.46932L2.0476 6.98973L6.19171 9.62577L13.3482 2.46932Z",fill:"currentColor"}})])])},Dl=[],Sl=n(Ll,Pl,Dl,!1,null,null,null,null);const Ml=Sl.exports,Tl={name:"ChatStart",components:{IconMessagePrompt:Ml},computed:{mascotImage(){return new URL(""+new URL("../img/charlie-ai.svg",import.meta.url).href,self.location).href},texts(){return{title:r("Have a conversation with Google Analytics.","google-analytics-for-wordpress")}},predefinedPrompts(){return[{title:r("Last week's visitors","google-analytics-for-wordpress"),prompt:r("How many visits did I get last week?","google-analytics-for-wordpress")},{title:r("Last month's page views","google-analytics-for-wordpress"),prompt:r("How many page views did I get last month?","google-analytics-for-wordpress")},{title:r("Bounce rate","google-analytics-for-wordpress"),prompt:r("What was the bounce rate from last week?","google-analytics-for-wordpress")},{title:r("Popular marketing campaign","google-analytics-for-wordpress"),prompt:r("What was my most popular marketing campaign last week?","google-analytics-for-wordpress")}]}},methods:{startChatWithPrompt(s){const t=this.predefinedPrompts[s];this.$emit("prompt-selected",t.prompt)}}};var El=function(){var t=this,e=t._self._c;return e("div",[e("header",{staticClass:"monsterinsights-ai-insights-card__header"},[e("figure",[e("img",{attrs:{src:t.mascotImage,alt:""}})]),e("h3",{domProps:{textContent:t._s(t.texts.title)}})]),e("section",{staticClass:"monsterinsights-ai-insights-card__content"},[e("div",{staticClass:"monsterinsights-ai-prompts"},t._l(t.predefinedPrompts,function(o,i){return e("button",{key:i,staticClass:"monsterinsights-ai-prompt-item",attrs:{type:"button"},on:{click:function(a){return t.startChatWithPrompt(i)}}},[e("span",{staticClass:"monsterinsights-ai-prompt-item-content"},[e("span",{staticClass:"monsterinsights-ai-prompt-item__title"},[t._v(t._s(o.title))]),e("span",{staticClass:"monsterinsights-ai-prompt-item__desc"},[t._v(t._s(o.prompt))])]),e("icon-message-prompt")],1)}),0)])])},Fl=[],Il=n(Tl,El,Fl,!1,null,null,null,null);const Al=Il.exports,Bl={};var Nl=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M10.4812 9.69294C12.4524 9.69294 14.0504 8.09497 14.0504 6.12377C14.0504 4.15257 12.4524 2.5546 10.4812 2.5546C8.51002 2.5546 6.91205 4.15257 6.91205 6.12377C6.91205 8.09497 8.51002 9.69294 10.4812 9.69294Z",fill:"currentColor"}}),e("path",{attrs:{d:"M17.6195 16.3852C17.6195 18.6025 17.6195 20.4005 10.4812 20.4005C3.34283 20.4005 3.34283 18.6025 3.34283 16.3852C3.34283 14.1678 6.53903 12.3698 10.4812 12.3698C14.4233 12.3698 17.6195 14.1678 17.6195 16.3852Z",fill:"currentColor"}})])},Ol=[],Hl=n(Bl,Nl,Ol,!1,null,null,null,null);const K=Hl.exports,Yl={};var Ul=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"21",height:"18",viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M5.50099 15.2466L8.76075 15.2471L8.76276 17.9758L5.56254 17.9753C5.05631 17.7617 4.63931 17.4579 4.33639 17.102C4.45503 16.5136 4.89605 15.7448 5.50099 15.2466Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M5.6898 15.4741C5.25846 15.9012 4.83214 16.4184 4.68869 17.0068C4.94691 17.301 5.28446 17.5289 5.64678 17.695L8.38557 17.6954L8.38393 15.4745L5.6898 15.4741Z",fill:"#7D5DC2"}}),e("path",{attrs:{d:"M4.93651 16.4048C4.85224 16.5187 4.69382 16.9789 4.68391 17.0074C4.94213 17.3016 5.27967 17.5295 5.64198 17.6956L7.10065 17.6958L7.09978 16.5047C6.38036 16.4999 5.66093 16.4666 4.93651 16.4048Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M5.48776 17.3973C5.82521 17.5065 5.98412 17.7105 6.03393 17.9763L4.85809 17.9761C4.9373 17.7484 5.16036 17.4684 5.48776 17.3973Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M5.4826 17.5211C5.29905 17.5686 5.14533 17.7062 5.04621 17.8628L5.48781 17.8628L5.48756 17.5211L5.4826 17.5211Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M6.64877 17.3306C7.10033 17.4492 7.31883 17.7387 7.37358 17.9759L5.80582 17.9757C5.90983 17.7243 6.22711 17.3874 6.64877 17.3306Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M6.63887 17.4494C6.39082 17.492 6.14783 17.6581 6.00409 17.8621L6.6491 17.8622L6.6488 17.4494L6.63887 17.4494Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M12.6694 15.2459L9.40967 15.2455L9.41168 17.9741L12.6119 17.9746C13.1178 17.7611 13.5344 17.4574 13.8368 17.1016C13.7222 16.5131 13.2801 15.7443 12.6694 15.2459Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M12.4862 15.4744C12.9181 15.9015 13.3452 16.4188 13.4895 17.0073C13.2318 17.3015 12.8945 17.5292 12.5325 17.6952L9.79369 17.6949L9.79205 15.474L12.4862 15.4744Z",fill:"#7D5DC2"}}),e("path",{attrs:{d:"M13.2355 16.4045C13.3199 16.5184 13.479 16.9787 13.4889 17.0072C13.2312 17.3014 12.8939 17.5291 12.5319 17.6952L11.0732 17.695L11.0723 16.5039C11.7917 16.4993 12.5161 16.4661 13.2355 16.4045Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M12.6901 17.3968C12.3528 17.5059 12.1942 17.7099 12.1448 17.9756L13.3206 17.9758C13.2411 17.748 13.0176 17.468 12.6901 17.3968Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M12.6953 17.5195C12.8789 17.567 13.0328 17.7047 13.1322 17.8613L12.6906 17.8613L12.6903 17.5195L12.6953 17.5195Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M11.5294 17.33C11.078 17.4486 10.8599 17.738 10.8055 17.9752L12.3733 17.9754C12.2689 17.7239 11.9511 17.387 11.5294 17.33Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M11.5344 17.4488C11.7825 17.4915 12.0258 17.6576 12.1698 17.8617L11.5248 17.8616L11.5245 17.4488L11.5344 17.4488Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M0.372645 16.0872C0.392865 16.5856 0.512246 16.9748 0.740684 17.2169C1.09794 17.1884 1.40034 16.8088 1.53904 16.4813C1.33037 16.1348 0.923359 15.9781 0.372645 16.0872Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M0.556401 16.2249C0.566538 16.5145 0.646171 16.8135 0.810125 17.0319L0.94853 16.2439C0.824422 16.2154 0.690408 16.2154 0.556401 16.2249Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M1.27579 16.3528C1.31086 16.799 1.37069 17.1929 1.66375 17.5916C2.18964 17.4825 2.60128 17.2026 2.77462 16.7565C2.51618 16.1916 1.90083 16.1156 1.27579 16.3528Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M1.73804 17.4017L2.08967 16.4097C1.89112 16.3717 1.66782 16.4002 1.45446 16.4666C1.48945 16.8036 1.54923 17.1027 1.73804 17.4017Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M3.00209 16.7189C3.09178 17.2267 3.59312 17.4783 3.84617 17.4641C3.96016 17.2791 4.07411 17.037 4.07389 16.7475L3.85544 16.5719C3.52294 16.5101 3.17065 16.5338 3.00209 16.7189Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M3.75685 17.2928C3.85601 17.1504 3.92037 16.932 3.93014 16.7231L3.57275 16.6661L3.75685 17.2928Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M4.07582 9.91119L4.08082 16.742C2.84508 16.889 1.40571 16.8413 0.372805 16.0817C0.392192 15.4456 0.456259 14.8238 0.574942 14.2304C0.797501 13.1576 1.21866 12.1798 1.94767 11.3777C2.59237 10.6705 3.23734 10.3336 4.07582 9.91119Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M0.720111 15.925C1.3657 16.3998 2.91438 16.5472 3.7283 16.4476L3.72393 10.4617C1.6252 11.5295 0.792792 13.4993 0.720111 15.925Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M0.720327 15.9255C1.04814 16.1676 1.60425 16.3196 2.18513 16.4051C2.26844 14.8812 2.25689 12.5883 1.89903 11.9806C1.12039 13.0392 0.768882 14.3921 0.720327 15.9255Z",fill:"#A58DD4"}}),e("path",{attrs:{d:"M2.18265 14.9094C2.45557 14.9094 2.67405 15.1183 2.67425 15.3793C2.67444 15.6403 2.45627 15.8491 2.18335 15.8491C1.91044 15.8491 1.69195 15.6402 1.69176 15.3792C1.69156 15.1181 1.90974 14.9093 2.18265 14.9094Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M3.34585 4.58242C3.20128 3.69483 3.35973 3.23445 3.54769 2.42285C4.13856 2.89283 4.51594 3.22987 5.23573 3.57646C5.379 2.71739 5.69598 1.90581 6.1569 1.14645L6.4295 0.700334C7.48207 1.4599 8.38069 2.06756 9.07616 3.07389C9.77013 2.06776 10.6679 1.46036 11.7193 0.701088L11.9925 1.14729C12.4546 1.90677 12.7728 2.71844 12.9173 3.57755C13.6366 3.23117 14.0135 2.89423 14.6037 2.42443C14.7978 3.23134 14.952 3.69176 14.8087 4.58405L16.1091 4.92598C15.8535 8.17245 15.5925 10.9395 15.2625 14.186C15.2181 14.6322 15.1689 15.0831 15.1196 15.5292C15.1048 15.6574 14.9412 15.8899 14.2465 15.8945C10.8524 16.1124 7.29944 16.1119 3.91004 15.8931C3.21532 15.8835 3.05139 15.6556 3.03641 15.5275C2.98645 15.0718 2.93648 14.6162 2.89149 14.1605C2.8715 13.9754 2.85151 13.7903 2.83152 13.6004C2.54652 10.7051 2.26648 7.81928 2.03109 4.91922L3.33096 4.57767L3.34585 4.57767L3.34585 4.58242Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M6.57361 1.37927C6.01355 2.29049 5.70164 3.25396 5.64283 4.25068C5.06705 4.04176 4.41178 3.69993 3.84575 3.25844C3.73198 3.74255 3.75726 4.37382 3.9115 4.92442C3.4352 5.02877 2.99364 5.13788 2.55208 5.26122C2.79249 8.24197 3.01801 11.2227 3.32789 14.194C3.35788 14.4883 3.42286 15.1243 3.45782 15.4186C3.58192 15.485 3.83996 15.4851 3.94417 15.4898C7.35839 15.7086 10.8121 15.7091 14.226 15.4913C14.3352 15.4818 14.5883 15.4819 14.7123 15.4202C14.7468 15.1306 14.8108 14.4804 14.8404 14.1956C15.1409 11.2197 15.3669 8.23901 15.6029 5.26308C15.1612 5.13961 14.7194 5.03038 14.243 4.92589C14.3964 4.37534 14.4207 3.74407 14.3062 3.25993C13.7458 3.70601 13.0861 4.0429 12.5106 4.25166C12.4504 3.25966 12.137 2.29136 11.5756 1.37998C10.4349 2.20568 9.68602 2.80362 9.07655 3.99962C8.46033 2.80344 7.71555 2.2053 6.56864 1.37927L6.57361 1.37927Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M6.5752 1.37919C6.66054 2.70362 7.00906 4.17525 7.6647 4.79244C6.79104 4.70214 6.32439 4.60239 5.64909 4.25103C5.06821 4.04209 4.41277 3.70022 3.8466 3.25868C4.15001 4.13217 4.44331 4.75407 5.04435 5.36176C4.53309 5.3522 4.24012 5.19077 3.91233 4.92489C3.43591 5.02927 2.99423 5.13839 2.55256 5.26176C2.79297 8.24293 3.0185 11.2241 3.3284 14.1958C3.35839 14.4901 3.42338 15.1262 3.45834 15.4205C3.58247 15.487 3.84058 15.487 3.94482 15.4918C5.65237 15.6012 7.3698 15.6536 9.08719 15.6538L9.08591 13.8784C6.4355 14.0775 4.01038 10.0802 6.79304 7.45542L6.23733 7.74966C6.16754 7.32717 6.30614 6.80027 6.48948 6.37306C6.85122 5.54237 7.8137 4.92538 9.0793 4.77838L9.07874 3.99512C8.46239 2.79879 7.72238 2.20057 6.5752 1.37919Z",fill:"#A58DD4"}}),e("path",{attrs:{d:"M13.1117 5.35967C13.7068 4.75218 14.0041 4.12567 14.3062 3.25232C14.4207 3.7365 14.3963 4.3678 14.2429 4.91839C13.9155 5.18891 13.6229 5.35025 13.1117 5.35967ZM12.1041 5.11271C12.4019 5.11275 12.6402 5.34537 12.6404 5.62542C12.6407 5.91022 12.3977 6.13803 12.1049 6.13799C11.8071 6.13795 11.5687 5.90533 11.5685 5.62527C11.5683 5.34522 11.8113 5.11267 12.1041 5.11271ZM14.0652 6.27117C14.2687 6.27119 14.4375 6.4326 14.4377 6.62722C14.4378 6.82183 14.2692 6.98319 14.0658 6.98316C13.8623 6.98314 13.6934 6.82173 13.6933 6.62711C13.6931 6.42775 13.8568 6.27114 14.0652 6.27117ZM10.4959 4.78496C11.1506 4.17274 11.4969 2.70132 11.5802 1.37227C12.1417 2.2837 12.4551 3.24732 12.5154 4.24413C11.8357 4.59529 11.3693 4.6949 10.4959 4.78496Z",fill:"#7D5DC2"}}),e("path",{attrs:{d:"M4.21721 5.85968C4.7036 5.85974 5.10093 6.23955 5.10128 6.70474C5.10162 7.16993 4.70484 7.54963 4.21845 7.54957C3.73206 7.5495 3.33473 7.1697 3.33439 6.70451C3.33405 6.23931 3.73082 5.85962 4.21721 5.85968ZM3.64835 8.4514C3.84192 8.45142 4.00085 8.60335 4.00098 8.78847C4.00112 8.9736 3.84241 9.12548 3.64885 9.12546C3.45528 9.12543 3.29635 8.97351 3.29622 8.78838C3.29608 8.60325 3.45479 8.45137 3.64835 8.4514Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M9.13739 6.32119C11.2364 6.32149 12.9396 7.94968 12.9411 9.95732C12.9426 11.965 11.2418 13.5927 9.1428 13.5924C7.04384 13.5921 5.34063 11.9639 5.33913 9.95623C5.33764 7.94859 7.03842 6.32089 9.13739 6.32119Z",fill:"#D3E8EF"}}),e("path",{attrs:{d:"M5.43844 9.12992C5.76988 7.76309 6.91035 6.69063 8.34912 6.40132C9.91703 6.28764 11.1881 7.33671 11.1892 8.76529C11.1902 10.2034 9.90105 11.4799 8.31826 11.6126C6.73051 11.7452 5.44456 10.6914 5.44349 9.24858C5.4385 9.21061 5.43847 9.16789 5.43844 9.12992Z",fill:"white"}}),e("path",{attrs:{d:"M10.3096 8.56165C11.4955 8.56182 12.4539 9.47797 12.4547 10.6123C12.4556 11.7466 11.4986 12.6625 10.3126 12.6624C9.12669 12.6622 8.16833 11.746 8.16748 10.6117C8.16664 9.4821 9.12364 8.56148 10.3096 8.56165Z",fill:"#EA4E64"}}),e("path",{attrs:{d:"M10.3097 8.56165C10.6223 8.56169 10.9201 8.62344 11.1881 8.74213L11.1881 8.76586C11.1892 10.166 9.96942 11.4141 8.43129 11.6037C8.26236 11.3094 8.16287 10.9724 8.1626 10.6117C8.16175 9.47737 9.11877 8.56148 10.3097 8.56165Z",fill:"#EC6277"}}),e("path",{attrs:{d:"M10.3101 9.28247C11.0792 9.28258 11.7049 9.87594 11.7055 10.6163C11.706 11.352 11.0862 11.9499 10.3121 11.9498C9.54298 11.9497 8.91732 11.3564 8.91676 10.6159C8.91622 9.88029 9.53603 9.28236 10.3101 9.28247Z",fill:"#232323"}}),e("path",{attrs:{d:"M10.3101 9.28247C10.5929 9.28251 10.856 9.36323 11.0744 9.50091C10.8071 10.3504 10.103 11.0718 9.20015 11.4134C9.02631 11.1903 8.9219 10.9102 8.92168 10.616C8.91617 9.8803 9.53599 9.28236 10.3101 9.28247Z",fill:"#323232"}}),e("path",{attrs:{d:"M8.79199 9.07816C9.27828 9.07823 9.67056 9.45323 9.67091 9.91836C9.67125 10.3835 9.27953 10.7584 8.79324 10.7583C8.30695 10.7582 7.91467 10.3832 7.91432 9.91811C7.91398 9.45298 8.3057 9.07809 8.79199 9.07816Z",fill:"white"}}),e("path",{attrs:{d:"M4.6712 11.6239C5.75248 11.0545 7.38074 12.0514 7.26285 13.665C6.23054 13.3611 5.11341 12.4307 4.6712 11.6239Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M4.67108 11.6241C5.65354 11.6432 6.74058 12.1749 7.26269 13.6652C6.02709 13.5321 4.87527 12.6302 4.67108 11.6241Z",fill:"#A58DD4"}}),e("path",{attrs:{d:"M5.183 12.9723C5.32687 12.9249 6.00173 12.9392 6.05637 13.0104C6.12094 13.0958 5.94263 13.5325 5.75428 13.8172C5.50603 13.6273 5.30239 13.3663 5.183 12.9723Z",fill:"#7D5DC2"}}),e("path",{attrs:{d:"M4.98458 12.8156C5.12845 12.7681 5.80331 12.7825 5.85794 12.8537C5.92251 12.9391 5.7442 13.3757 5.55585 13.6605C5.30761 13.4706 5.10396 13.2095 4.98458 12.8156Z",fill:"white"}}),e("path",{attrs:{d:"M5.18743 12.5923C5.23276 13.5082 6.48376 14.3911 7.66937 14.0638C7.73407 14.3296 7.54564 14.4862 7.35216 14.5241C6.27554 14.6141 5.23806 13.9638 4.89509 13.1333C4.79569 12.9055 4.90463 12.6207 5.18743 12.5923Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M4.98523 14.3112C5.28333 14.8475 5.74992 15.0991 6.26105 15.1799C5.5319 15.493 4.88656 15.0753 4.98523 14.3112Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M5.4762 14.4391C6.06182 14.7523 6.61753 14.852 7.26243 14.7951C6.79134 15.0939 5.86861 15.127 5.4762 14.4391Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M10.4528 5.28945C9.27547 3.34366 6.18031 4.4774 6.49449 6.66034C7.26759 5.43613 8.76072 5.03771 10.4528 5.28945Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M10.4527 5.28899C9.78716 4.19303 8.38808 4.12172 7.45086 4.72412C7.44609 4.9803 7.52559 5.16533 7.66957 5.31241C8.42836 4.96143 9.42048 4.81921 10.4527 5.28899Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M16.6109 12.6912C17.8464 12.6913 18.8594 13.6407 18.8603 14.8273C18.8612 16.0138 17.8496 16.9629 16.614 16.9627C15.3785 16.9626 14.3655 16.0132 14.3646 14.8266C14.3637 13.6401 15.3753 12.691 16.6109 12.6912Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M16.6113 13.0046C17.6732 13.0047 18.5322 13.8212 18.533 14.8226C18.5337 15.8288 17.6759 16.6403 16.614 16.6401C15.5521 16.64 14.6931 15.8235 14.6923 14.8221C14.6916 13.8206 15.5544 13.0044 16.6113 13.0046Z",fill:"#9478CF"}}),e("path",{attrs:{d:"M16.6115 13.004C17.3658 13.0041 18.0161 13.4171 18.3341 14.0151C18.4042 14.9643 17.1941 15.6618 16.385 15.3342C15.7894 15.0256 15.3771 14.4228 15.3766 13.7347C15.3765 13.6208 15.3863 13.5116 15.4111 13.4025C15.7433 13.1557 16.16 13.0039 16.6115 13.004Z",fill:"#A58DD4"}}),e("path",{attrs:{d:"M16.3084 14.2781C16.3098 14.002 17.3827 14.0293 17.386 14.307L17.3894 17.3797C17.388 17.6557 16.3151 17.6285 16.3118 17.3508L16.3084 14.2781Z",fill:"#2B3039"}}),e("path",{attrs:{d:"M17.2967 14.2481C16.895 14.4854 16.5627 14.7179 16.3248 15.1498C16.6675 15.5485 17.1192 15.7669 17.6154 15.71C18.017 15.226 17.8081 14.6706 17.2967 14.2481Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M17.6101 14.9123C17.5504 14.7462 17.4412 14.5896 17.3021 14.4377C16.9947 14.6275 16.7418 14.8315 16.5485 15.1257C16.7618 15.1447 17.0942 15.0926 17.6101 14.9123Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M17.6842 15.411C17.2825 15.6482 16.9502 15.8807 16.7123 16.3126C17.055 16.7113 17.5067 16.9297 18.0029 16.8728C18.4045 16.3888 18.1956 15.8334 17.6842 15.411Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M17.9975 16.0281C17.9379 15.862 17.8286 15.7054 17.6895 15.5535C17.3821 15.7433 17.1292 15.9473 16.9359 16.2415C17.1492 16.2652 17.4816 16.2083 17.9975 16.0281Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M15.5908 15.5247C15.9728 15.4346 16.3102 15.3777 16.7221 15.4916C16.7721 15.9188 16.6483 16.308 16.3259 16.5547C15.79 16.5119 15.5614 16.0658 15.5908 15.5247Z",fill:"#5F3EA7"}}),e("path",{attrs:{d:"M15.8248 16.0422C15.7552 15.9094 15.7204 15.7575 15.7054 15.5914C16.003 15.525 16.2759 15.4966 16.5786 15.5583C16.4695 15.6959 16.2414 15.8525 15.8248 16.0422Z",fill:"#6F4BBB"}}),e("path",{attrs:{d:"M16.4433 3.80966C13.3755 3.97424 11.0296 6.49216 11.2043 9.42657C11.379 12.361 14.0135 14.607 17.0813 14.4424C20.149 14.2778 22.4949 11.7599 22.3202 8.8255C22.1455 5.89109 19.5185 3.64509 16.4433 3.80966Z",fill:"#232323"}}),e("path",{attrs:{d:"M16.4886 4.46947C13.8034 4.61257 11.7423 6.82204 11.8942 9.39771C12.0462 11.9662 14.3579 13.9395 17.0506 13.7893C19.7359 13.6462 21.797 11.4367 21.645 8.86102C21.4856 6.29251 19.1813 4.31919 16.4886 4.46947Z",fill:"white"}}),e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.4614 5.795C18.5474 5.38994 19.1237 5.38391 19.2186 5.78736L19.2226 5.8062L19.2316 5.84389C19.3409 6.29515 19.7088 6.63785 20.1671 6.71482C20.5895 6.78573 20.5933 7.39152 20.1718 7.46771C19.9469 7.5083 19.7391 7.61442 19.5744 7.77274C19.4096 7.93105 19.2954 8.13452 19.2459 8.35757L19.2346 8.407C19.1452 8.8116 18.5694 8.81279 18.4778 8.40883L18.4683 8.36631C18.4181 8.14301 18.3024 7.93974 18.1362 7.78246C17.9699 7.62518 17.7605 7.52102 17.5347 7.48327C17.1133 7.41284 17.1095 6.80802 17.53 6.73231C17.7545 6.69191 17.9619 6.58577 18.1259 6.42736C18.29 6.26895 18.4033 6.06539 18.4516 5.84249L18.4581 5.81051L18.4614 5.795ZM18.8348 9.23694C18.6042 9.2339 18.3833 9.14385 18.2162 8.98484C18.1799 9.00913 18.1483 9.03983 18.1229 9.07543C17.907 9.36518 17.6539 9.66145 17.3673 9.95115C17.1499 10.1712 16.9296 10.3715 16.712 10.5504C16.4922 10.3742 16.2693 10.1767 16.0492 9.95941C15.8384 9.75158 15.6383 9.53302 15.45 9.3046C15.6262 9.0843 15.8241 8.86192 16.041 8.64185C16.3117 8.36672 16.6012 8.11058 16.9072 7.87528C16.9391 7.85207 16.9671 7.82378 16.9899 7.79153C16.8974 7.70824 16.823 7.60676 16.7715 7.49343C16.72 7.3801 16.6925 7.25737 16.6906 7.13291C16.2138 6.80347 15.7429 6.56012 15.3231 6.43452C14.8684 6.2985 14.3359 6.26457 13.9892 6.61514C13.7646 6.84301 13.7051 7.15113 13.7244 7.44376C13.7436 7.73687 13.8439 8.05851 13.9945 8.38467C14.148 8.70918 14.3309 9.01901 14.5408 9.3103C14.3346 9.60389 14.1557 9.91566 14.0061 10.2417C13.8596 10.5698 13.7634 10.8926 13.7478 11.186C13.7322 11.4788 13.7951 11.7862 14.023 12.0112C14.2509 12.2357 14.559 12.2953 14.8516 12.276C15.1442 12.2563 15.4664 12.1565 15.7925 12.0059C16.0868 11.87 16.3997 11.6852 16.7182 11.4596C17.0389 11.6812 17.3536 11.8621 17.6501 11.9943C17.9776 12.1408 18.301 12.237 18.5943 12.2526C18.8872 12.2681 19.194 12.2048 19.419 11.9769C19.7657 11.6263 19.7251 11.0943 19.5834 10.6413C19.4481 10.2096 19.1872 9.72491 18.8348 9.23694ZM15.115 7.12971C15.3943 7.21313 15.7277 7.37265 16.0892 7.60459C15.6982 7.94052 15.3354 8.30789 15.0044 8.70303C14.8721 8.5043 14.7547 8.29608 14.6531 8.08005C14.5241 7.80021 14.4602 7.56834 14.4485 7.39567C14.4372 7.22203 14.4793 7.15208 14.5058 7.1253C14.5491 7.08148 14.7093 7.00887 15.115 7.12971ZM14.6685 10.5386C14.7563 10.342 14.8716 10.1308 15.012 9.91123C15.3481 10.3022 15.7156 10.665 16.1109 10.996C15.9123 11.1284 15.7043 11.246 15.4884 11.3478C15.2086 11.4768 14.9767 11.5407 14.804 11.5524C14.6299 11.5637 14.5604 11.5215 14.5337 11.4951C14.5069 11.4686 14.4639 11.3987 14.4729 11.2254C14.4825 11.0526 14.543 10.82 14.669 10.5386L14.6685 10.5386ZM17.9459 11.3324C17.7289 11.2335 17.5195 11.1185 17.3196 10.9884C17.7102 10.6524 18.0727 10.2851 18.4034 9.88998C18.6393 10.249 18.803 10.5804 18.8899 10.8586C19.0163 11.2623 18.9457 11.4239 18.9025 11.4677C18.8755 11.4945 18.8061 11.5375 18.6328 11.5279C18.4595 11.5193 18.2274 11.4579 17.9459 11.3324ZM16.2203 9.29978C16.2195 9.17145 16.2697 9.04805 16.3598 8.95674C16.45 8.86543 16.5728 8.81368 16.7011 8.81288C16.8294 8.81208 16.9528 8.86228 17.0441 8.95246C17.1354 9.04263 17.1872 9.16538 17.188 9.29371C17.1888 9.42204 17.1386 9.54543 17.0484 9.63674C16.9582 9.72805 16.8355 9.7798 16.7072 9.78061C16.5788 9.78141 16.4554 9.7312 16.3641 9.64103C16.2728 9.55086 16.2211 9.4281 16.2203 9.29978Z",fill:"#232323"}}),e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.4609 5.79522C18.5469 5.39015 19.1231 5.38412 19.2181 5.78757L19.2221 5.80642L19.231 5.8441C19.3403 6.29536 19.7083 6.63807 20.1665 6.71504C20.5889 6.78594 20.5927 7.39174 20.1712 7.46793C19.9464 7.50852 19.7385 7.61463 19.5738 7.77295C19.4091 7.93127 19.2948 8.13473 19.2453 8.35778L19.234 8.40721C19.1446 8.81181 18.5688 8.813 18.4772 8.40905L18.4678 8.36653C18.4175 8.14322 18.3019 7.93995 18.1356 7.78267C17.9693 7.62539 17.7599 7.52123 17.5342 7.48348C17.1127 7.41306 17.109 6.80823 17.5295 6.73253C17.7539 6.69212 17.9613 6.58599 18.1254 6.42757C18.2894 6.26916 18.4028 6.0656 18.451 5.8427L18.4576 5.81072L18.4609 5.79522Z",fill:"#EA4E64"}})])},Vl=[],Zl=n(Yl,Ul,Vl,!1,null,null,null,null);const jl=Zl.exports,zl={};var Wl=function(){var t=this,e=t._self._c;return e("svg",{attrs:{width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.0664 2.18408H10.1544C8.83485 2.18408 7.78952 2.18408 6.97178 2.29794C6.13034 2.41552 5.44901 2.66259 4.91126 3.21924C4.37424 3.77664 4.13588 4.48287 4.02244 5.35506C3.9126 6.20343 3.9126 7.28622 3.9126 8.65404V13.1608C3.91261 13.8257 4.14158 14.4687 4.55828 14.9742C4.97497 15.4796 5.55204 15.8143 6.18562 15.918C6.28398 16.4866 6.47424 16.9718 6.85475 17.367C7.28696 17.815 7.83116 18.007 8.47732 18.0978C9.09978 18.1841 9.89167 18.1841 10.8731 18.1841H13.1059C14.0874 18.1841 14.8793 18.1841 15.5017 18.0978C16.1479 18.007 16.6921 17.815 17.1243 17.367C17.5565 16.919 17.7417 16.3549 17.8293 15.6851C17.9126 15.0399 17.9126 14.2191 17.9126 13.2018V9.39897C17.9126 8.38166 17.9126 7.56083 17.8293 6.91562C17.7417 6.24585 17.5565 5.68176 17.1243 5.23376C16.7431 4.83934 16.275 4.64213 15.7264 4.54017C15.6264 3.88344 15.3035 3.28528 14.8159 2.85336C14.3282 2.42143 13.7079 2.1841 13.0664 2.18408ZM14.5957 4.43227C14.4865 4.10185 14.2804 3.81508 14.0062 3.61212C13.732 3.40915 13.4034 3.30015 13.0664 3.30036H10.1946C8.82552 3.30036 7.85342 3.30185 7.11465 3.40455C6.39311 3.50501 5.9767 3.69404 5.67301 4.00883C5.36932 4.32362 5.18696 4.75524 5.09003 5.5039C4.99096 6.26892 4.98952 7.27655 4.98952 8.69571V13.1608C4.98932 13.5101 5.09448 13.8507 5.29029 14.1349C5.4861 14.4191 5.76275 14.6328 6.08152 14.7459C6.06644 14.292 6.06644 13.7785 6.06644 13.2018V9.39897C6.06644 8.38166 6.06644 7.56083 6.15044 6.91562C6.2366 6.24585 6.42326 5.68176 6.85475 5.23376C7.28696 4.78576 7.83116 4.59376 8.47732 4.50371C9.09978 4.41664 9.89167 4.41664 10.8731 4.41664H13.1059C13.6623 4.41664 14.1577 4.41664 14.5957 4.43227ZM7.61578 6.02408C7.81465 5.81794 8.09321 5.68399 8.62091 5.61031C9.16224 5.53515 9.88162 5.53366 10.9119 5.53366H13.0657C14.096 5.53366 14.8146 5.53515 15.3574 5.61031C15.8844 5.68399 16.163 5.81869 16.3618 6.02408C16.5607 6.23022 16.6899 6.51897 16.761 7.06594C16.8335 7.62706 16.835 8.37273 16.835 9.44064V13.1616C16.835 14.2295 16.8335 14.9744 16.761 15.537C16.6899 16.0832 16.56 16.372 16.3618 16.5781C16.163 16.7843 15.8844 16.9182 15.3567 16.9919C14.8146 17.0671 14.096 17.0685 13.0657 17.0685H10.9119C9.88162 17.0685 9.16224 17.0671 8.62019 16.9919C8.09321 16.9182 7.81465 16.7835 7.61578 16.5781C7.41691 16.372 7.28767 16.0832 7.2166 15.5363C7.14409 14.9744 7.14265 14.2295 7.14265 13.1616V9.44064C7.14265 8.37273 7.14409 7.62706 7.2166 7.0652C7.28767 6.51897 7.41762 6.23022 7.61578 6.02408Z",fill:"currentColor"}})])},Gl=[],ql=n(zl,Wl,Gl,!1,null,null,null,null);const Jl=ql.exports,Kl={name:"ChatMessageFeedback",components:{FeedbackInputBox:ht},props:{message:{type:Object,required:!0}},data(){return{isSaving:!1}},computed:{...R("$_ai-chat",["chatId","currentChat"]),hasFeedback(){return this.message.feedback!==null},hasSkippedFeedback(){return this.message.hasOwnProperty("skipped_feedback")?this.message.skipped_feedback:!1},feedbackBoxLabels(){return{title:d(r("Why didn't this response meet your expectations? %s(Optional)%s","google-analytics-for-wordpress"),"<span>","</span>"),feedbackHelp:null,submit:r("Send Feedback","google-analytics-for-wordpress"),thanksTitle:r("Thanks for your feedback!","google-analytics-for-wordpress")}}},methods:{onSubmit(s){this.isSaving=!0,this.$store.dispatch("$_ai-chat/saveChatMessageFeedback",{chatId:this.chatId,messageId:this.message.id,feedback:s}).then(async()=>{await this.$store.dispatch("$_ai-chat/loadChat",{chatId:this.chatId,force:!0}),this.isSaving=!1})},onClose(){this.isSaving=!0,this.$store.dispatch("$_ai-chat/saveChatMessageFeedback",{chatId:this.chatId,messageId:this.message.id,skipped_feedback:!0}).then(async()=>{await this.$store.dispatch("$_ai-chat/loadChat",{chatId:this.chatId,force:!0}),this.isSaving=!1})}}};var Ql=function(){var t=this,e=t._self._c;return t.hasSkippedFeedback?t._e():e("feedback-input-box",{attrs:{"has-feedback":t.hasFeedback,"is-saving":t.isSaving,labels:t.feedbackBoxLabels},on:{submit:t.onSubmit,close:t.onClose}})},Xl=[],t1=n(Kl,Ql,Xl,!1,null,null,null,null);const e1=t1.exports,T=Z.COLORS,s1={options:{chart:{toolbar:{show:!1}},yaxis:{decimalsInFloat:!1},dataLabels:{enabled:!1},tooltip:{y:{title:{formatter:function(){return""}}}}}},r1={name:"ChatMessageChart",components:{ApexChart:Y},props:{messageId:{type:String,required:!0},messageChartData:{type:Object,required:!0}},computed:{chartConfig(){const{type:s,seriesName:t="",data:e}=this.messageChartData;if(!e)return null;const o=[],i=[];for(const l of e)o.push(l.value),i.push(l.label);const a=JSON.parse(JSON.stringify(s1));return a.options.chart.type=s,s==="pie"||s==="donut"?(a.options.colors=T,a.options.labels=i,a.options.tooltip.enabled=!1,a.series=o):(a.options.colors=[l=>T[l.dataPointIndex]?T[l.dataPointIndex]:T[0]],a.options.xaxis={categories:i},a.series=[{name:t,data:o}]),a}}};var o1=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-ai-insights-chat-item__message-chart",class:`chart--${t.messageChartData.type}`},[t.chartConfig?e("ApexChart",{key:`chart-${t.messageId}`,attrs:{options:t.chartConfig.options,series:t.chartConfig.series}}):t._e()],1)},i1=[],a1=n(r1,o1,i1,!1,null,null,null,null);const n1=a1.exports,l1={name:"ChatMessage",components:{IconUser:K,ChatMessageChart:n1,IconClipboard:Jl,IconThumbsDown:dt,IconThumbsUp:pt,ChatMessageFeedback:e1},props:{message:{type:Object},aiMock:{type:Boolean,default:!1}},data(){return{canCopyTextToClipboard:!1}},computed:{score:{get(){return this.aiMock||this.message.role==="user"?-1:typeof this.message.rating<"u"?this.message.rating:-1},set(s){this.aiMock||this.message.role==="user"||this.$emit("rate",{messageId:this.message.id,rating:s})}},hasChart(){if(!this.isAIMessage)return!1;const{meta:{chart:s}}=this.message;return!(typeof s>"u"||s===!1)},showFeedbackBox(){return this.score===0},isAIMessage(){return!this.aiMock&&this.message.role==="assistant"},mascotImage(){return new URL(""+new URL("../img/charlie-ai.svg",import.meta.url).href,self.location).href},senderIcon(){return!this.aiMock&&this.message.role==="user"?K:jl},sender(){return!this.aiMock&&this.message.role==="user"?r("You","google-analytics-for-wordpress"):"MonsterInsights"},messageHtml(){return this.message.content},texts(){return{aiLoading:d(r("Retrieving data from %s...","google-analytics-for-wordpress"),"MonsterInsights")}}},methods:{async copyToClipboard(){try{await navigator.clipboard.writeText(this.message.content),g.prototype.$mi_success_toast({title:r("Copied to clipboard!","google-analytics-for-wordpress")})}catch(s){console.error("Failed to copy: ",s)}},rate(s){this.aiMock||(this.score=s)}},beforeMount(){this.canCopyTextToClipboard=typeof navigator.clipboard<"u"}};var c1=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-ai-insights-chat-item",class:{"is-ai":t.isAIMessage}},[e("div",{staticClass:"monsterinsights-ai-insights-chat-item__icon"},[!t.aiMock&&t.message.role==="user"?e("IconUser"):e("img",{attrs:{src:t.mascotImage,alt:""}})],1),e("div",{staticClass:"monsterinsights-ai-insights-chat-item__content"},[e("p",{staticClass:"monsterinsights-ai-insights-chat-item__sender"},[t._v(" "+t._s(t.sender)+" ")]),t.aiMock?e("div",{staticClass:"monsterinsights-ai-insights-chat-item__message",class:{"is-mock":t.aiMock}},[e("div",{staticClass:"ai-spinner"}),e("p",{domProps:{innerHTML:t._s(t.texts.aiLoading)}})]):e("div",{staticClass:"monsterinsights-ai-insights-chat-item__message",domProps:{innerHTML:t._s(t.messageHtml)}}),t.isAIMessage?[t.hasChart?e("ChatMessageChart",{attrs:{"message-id":t.message.id,"message-chart-data":t.message.meta.chart}}):t._e(),e("div",{staticClass:"monsterinsights-ai-insights-chat-item__actions"},[e("button",{class:{"is-on":t.score===1},attrs:{type:"button",disabled:t.score===1},on:{click:function(o){return o.preventDefault(),t.rate(1)}}},[e("IconThumbsUp")],1),e("button",{class:{"is-on":t.score===0},attrs:{type:"button",disabled:t.score===0},on:{click:function(o){return o.preventDefault(),t.rate(0)}}},[e("IconThumbsDown")],1),t.canCopyTextToClipboard?e("button",{attrs:{type:"button"},on:{click:function(o){return o.preventDefault(),t.copyToClipboard.apply(null,arguments)}}},[e("IconClipboard")],1):t._e()]),t.showFeedbackBox?e("chat-message-feedback",{attrs:{message:t.message}}):t._e()]:t._e()],2)])},p1=[],d1=n(l1,c1,p1,!1,null,null,null,null);const h1=d1.exports,g1={name:"ChatScreen",components:{ChatMessage:h1},computed:{...R("$_ai-chat",["chatId","currentChat","isWaitingForAI"])},methods:{scrollToBottom(){this.$refs.container&&this.$refs.container.scroll({top:this.$refs.container.scrollHeight,behavior:"smooth"})},handleMessageRating(s){const{messageId:t,rating:e}=s;this.$store.dispatch("$_ai-chat/rateChatMessage",{chatId:this.chatId,messageId:t,rating:e})}},created(){this.unsubscribe=this.$store.subscribe(s=>{(s.type==="$_ai-chat/APPEND_MESSAGES"||s.type==="$_ai-chat/UPDATE_CURRENT_CHAT")&&this.$nextTick(()=>{this.scrollToBottom()})})},mounted(){this.$nextTick(()=>{this.scrollToBottom()})},beforeDestroy(){this.unsubscribe()}};var u1=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-ai-insights-chat-wrapper"},[e("div",{ref:"container",staticClass:"monsterinsights-ai-insights-chat-container"},[t._l(t.currentChat,function(o){return e("chat-message",{key:o.id,attrs:{message:o},on:{rate:t.handleMessageRating}})}),t.isWaitingForAI?e("chat-message",{attrs:{"ai-mock":""}}):t._e()],2)])},m1=[],_1=n(g1,u1,m1,!1,null,null,null,null);const f1=_1.exports,v1={};var C1=function(){var t=this,e=t._self._c;return e("span",{staticClass:"icon"},[e("svg",{attrs:{width:"23",height:"20",viewBox:"0 0 23 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M0.5 19.1077V0.441071L22.6667 9.7744L0.5 19.1077ZM2.83333 15.6077L16.6583 9.7744L2.83333 3.94107V8.0244L9.83333 9.7744L2.83333 11.5244V15.6077Z",fill:"currentColor"}})])])},w1=[],y1=n(v1,C1,w1,!1,null,null,null,null);const b1=y1.exports,x1={name:"UserInputForm",components:{IconMessageSend:b1},data(){return{currentMessage:""}},computed:{...v("$_ai-chat",["userCanSendMessage"]),texts(){return{inputPlaceholder:d(r("Start a conversation with %s","google-analytics-for-wordpress"),"MonsterInsights"),buttonLabel:r("Send Message","google-analytics-for-wordpress")}}},methods:{clear(){this.currentMessage=""},handleSubmit(){this.userCanSendMessage&&(this.$emit("submit",this.currentMessage),this.clear())}},mounted(){this.unsubscribe=this.$store.subscribe(s=>{(s.type==="$_ai-chat/UPDATE_CURRENT_CHAT"||s.type==="$_ai-chat/APPEND_MESSAGES")&&this.$refs.field!==void 0&&this.$refs.field.focus()})},beforeDestroy(){this.unsubscribe()}};var k1=function(){var t=this,e=t._self._c;return e("form",{staticClass:"monsterinsights-ai-user-prompt",on:{submit:function(o){return o.preventDefault(),t.handleSubmit.apply(null,arguments)}}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.currentMessage,expression:"currentMessage"}],ref:"field",staticClass:"monsterinsights-ai-user-prompt__input",attrs:{id:"monsterinsights-ai-user-input",placeholder:t.texts.inputPlaceholder,required:"",maxlength:"300"},domProps:{value:t.currentMessage},on:{keydown:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"enter",13,o.key,"Enter")||o.ctrlKey||o.shiftKey||o.altKey||o.metaKey?null:(o.preventDefault(),t.handleSubmit.apply(null,arguments))},input:function(o){o.target.composing||(t.currentMessage=o.target.value)}}}),e("button",{staticClass:"monsterinsights-ai-user-prompt__submit",attrs:{type:"submit","aria-label":t.texts.buttonLabel}},[e("icon-message-send")],1)])},$1=[],R1=n(x1,k1,$1,!1,null,null,null,null);const L1=R1.exports,P1={name:"UserInputRetry",computed:{...R("$_ai-chat",["aiError","retryable","isWaitingForAI"]),texts(){return{retry:r("Retry","google-analytics-for-wordpress")}}},methods:{retry(){this.$store.dispatch("$_ai-chat/retryLastChatMessage")}}};var D1=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-ai-user-retry"},[e("div",{staticClass:"monsterinsights-ai-user-retry__message",domProps:{innerHTML:t._s(t.aiError)}}),t.retryable?e("button",{staticClass:"monsterinsights-button",attrs:{disabled:t.isWaitingForAI},domProps:{innerHTML:t._s(t.texts.retry)},on:{click:t.retry}}):t._e()])},S1=[],M1=n(P1,D1,S1,!1,null,null,null,null);const T1=M1.exports,E1={name:"AiAnalytics",components:{ReportUpsellOverlay:f,UserInputForm:L1,UserInputRetry:T1,ChatStart:Al,ChatScreen:f1,AiAnalyticsSidebar:Rl},props:{upsell:{type:Boolean,default:!1}},computed:{...R("$_ai-chat",["isLoadingChat"]),...v("$_ai-chat",["hasChatStarted","canRetryLastMessage"]),texts(){return{title:r("Conversations","google-analytics-for-wordpress"),upsellSubheading:r("Our AI Insights Report includes:","google-analytics-for-wordpress")}}},methods:{handleUserInput(s){this.$store.dispatch("$_ai-chat/addUserMessage",s).then(({isNewChat:t,chatId:e})=>{t&&this.$router.push({name:"ai-insights-chat",params:{chatId:e}})})}},beforeRouteEnter(s,t,e){const{monsterinsights:{addons_pre_check:o}}=window;o.ai_insights||e({name:"ai-insights"}),e()},beforeCreate(){if(this.$store.hasModule("$_ai-chat")&&this.$store.unregisterModule("$_ai-chat"),this.$store.registerModule("$_ai-chat",Dn),!this.$isPro())return;this.$store.dispatch("$_ai-chat/getChats");const{name:s,params:t}=this.$route;if(s==="ai-insights-chat"){const{chatId:e}=t;e&&this.$store.dispatch("$_ai-chat/loadChat",{chatId:e}).catch(()=>{this.$router.replace("/ai-insights/chat")})}},watch:{$route(s){if(!this.$isPro())return;const{chatId:t}=s.params;t?this.$store.dispatch("$_ai-chat/loadChat",{chatId:t}).catch(()=>{this.$router.replace("/ai-insights/chat")}):this.$store.dispatch("$_ai-chat/loadChat",{chatId:!1})}}};var F1=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"monsterinsights-report-top"},[e("h2",{domProps:{textContent:t._s(t.texts.title)}})]),e("article",{staticClass:"monsterinsights-ai-insights-card has-sidebar",class:{"monsterinsights-blur":t.upsell,"is-loading-chat":t.isLoadingChat}},[t.upsell?e("report-upsell-overlay",{attrs:{"custom-subheading":t.texts.upsellSubheading,report:"ai_insights","force-two-columns":""}}):e("ai-analytics-sidebar"),e("main",{staticClass:"monsterinsights-ai-insights__content monsterinsights-ai-insights__content--chat"},[e("div",{staticClass:"monsterinsights-container"},[e("div",{staticClass:"monsterinsights-ai-insights-card-wrapper"},[t.hasChatStarted?e("chat-screen"):e("chat-start",{on:{"prompt-selected":t.handleUserInput}}),e("footer",{staticClass:"monsterinsights-ai-insights-card__footer"},[t.canRetryLastMessage?e("user-input-retry"):e("user-input-form",{on:{submit:t.handleUserInput}})],1)],1)])])],1)])},I1=[],A1=n(E1,F1,I1,!1,null,null,null,null);const Q=A1.exports,E={meta:{hideNav:!0,title:r("AI Insights","google-analytics-for-wordpress")},props:{upsell:!Yt()}},B1=()=>[{path:"/ai-insights",component:zi,...E,children:[{path:"",name:"ai-insights",component:sn,...E},{path:"chat",name:"ai-insights-new-chat",component:Q,...E},{path:"chat/:chatId",name:"ai-insights-chat",component:Q,...E}]}];let gt={routes:[{path:"*",redirect:"/"},{path:"/",name:"overview",component:cs,meta:{title:r("Overview Report","google-analytics-for-wordpress")}},{path:"/publishers",name:"publisher",component:Xo,meta:{title:r("Engagement Overview Report","google-analytics-for-wordpress")}},{path:"/publishers-pages",name:"engagement_pages",component:oi,meta:{title:r("Pages Report","google-analytics-for-wordpress")}},{path:"/ecommerce",name:"ecommerce",component:vs,meta:{title:r("eCommerce Report","google-analytics-for-wordpress")}},{path:"/ecommerce-coupons",name:"ecommerce_coupons",component:xs,meta:{title:r("eCommerce Coupons Report","google-analytics-for-wordpress")}},{path:"/ecommerce-funnel",name:"ecommerce_funnel",component:Ps,meta:{title:r("eCommerce Funnel Report","google-analytics-for-wordpress")}},{path:"/search-console",name:"queries",component:Es,meta:{title:r("Search Console Report","google-analytics-for-wordpress")}},{path:"/dimensions",name:"dimensions",component:Ns,meta:{title:r("Dimensions Report","google-analytics-for-wordpress")}},{path:"/forms",name:"forms",component:Vs,meta:{title:r("Forms Report","google-analytics-for-wordpress")}},{path:"/real-time",name:"realtime",component:Gs,meta:{title:r("Real-Time Report","google-analytics-for-wordpress")}},{path:"/site-speed",name:"sitespeed",component:Fr,meta:{title:r("Site Speed Report","google-analytics-for-wordpress")}},{path:"/media",name:"media",component:Gr,meta:{title:r("Media Report","google-analytics-for-wordpress")}},{path:"/user-journey-report",name:"user-journey-report",component:uo,meta:{hideNav:!0,customNav:"user-journey-navigation"}},...B1(),{path:"/traffic-overview",name:"traffic_overview",component:xo,meta:{title:r("Traffic Overview","google-analytics-for-wordpress")}},{path:"/traffic-landing-pages",name:"traffic_landing_pages",component:Po,meta:{title:r("Top Landing Pages","google-analytics-for-wordpress")}},{path:"/traffic-technology",name:"traffic_technology",component:Eo,meta:{title:r("Technology","google-analytics-for-wordpress")}},{path:"/traffic-campaign",name:"traffic_campaign",component:No,meta:{title:r("Campaigns","google-analytics-for-wordpress")}},{path:"/traffic-source-medium",name:"traffic_source_medium",component:Vo,meta:{title:r("Source / Medium","google-analytics-for-wordpress")}},{path:"/traffic-social",name:"traffic_social",component:Go,meta:{title:r("Social","google-analytics-for-wordpress")}},{path:"/exceptions",name:"exceptions",component:ki,meta:{title:r("Exceptions","google-analytics-for-wordpress")}}]};window.monsterinsights.yearinreview.show_report&>.routes.push({path:"/year-in-review",name:"yearinreview",component:Dr,meta:{title:r("Year in Review","google-analytics-for-wordpress")}});const N1=new et(gt),O1={name:"ReportNavigationSubmenu",props:{menu_id:String,items:Array,submenu_index:Number},inject:["sharedState"],computed:{active(){return this.sharedState.active==this.submenu_index}},methods:{closeMenu(){this.sharedState=null}}};var H1=function(){var t=this,e=t._self._c;return t.active?e("ul",{staticClass:"submenu"},t._l(t.items,function(o,i){return e("li",{key:t.menu_id+i},[e("router-link",{attrs:{to:o.to},on:{click:function(a){return t.closeMenu()}}},[e("span",{staticClass:"submenu_title"},[t._v(t._s(o.label))]),e("span",{staticClass:"submenu_text"},[t._v(t._s(o.description))])])],1)}),0):t._e()},Y1=[],U1=n(O1,H1,Y1,!1,null,null,null,null);const V1=U1.exports,Z1={name:"ReportNavigationMenu",components:{ReportNavigationSubmenu:V1},mixins:[yt],props:{menu_id:String,menu_data:Array,nav_class:String,route_title:String,with_arrows:{default:!1,type:Boolean}},provide(){return{sharedState:this.sharedState}},data(){return{sharedState:{active:null}}},methods:{hasActiveChild(s){return s.length==0?!1:s.find(t=>t.to==this.$route.path)},itemClasses(s){return this.hasActiveChild(s.children)?"active":""},menuToggle(s){this.sharedState.active!=s?this.sharedState.active=s:this.sharedState.active=null},closeMenu(){this.sharedState.active=null}}};var j1=function(){var t=this,e=t._self._c;return e("div",[e("ul",{directives:[{name:"on-clickaway",rawName:"v-on-clickaway",value:t.closeMenu,expression:"closeMenu"}],class:t.nav_class},[t.with_arrows?e("li",{staticClass:"dashicons-before dashicons-arrow-left-alt2",attrs:{"data-direction":"left"}}):t._e(),t._l(t.menu_data,function(o,i){return e("li",{key:t.menu_id+i},[o.children.length==0?e("router-link",{class:o.class,attrs:{to:o.to},nativeOn:{click:function(a){return t.closeMenu()}}},[t._v(" "+t._s(o.label)+" ")]):e("div",{class:t.itemClasses(o),on:{click:function(a){return t.menuToggle(i)}}},[t._t("menuToggler",function(){return[e("button",[t._v(" "+t._s(o.label)+" "),e("span",{staticClass:"caret"},[e("svg",{attrs:{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M9 1L5 5L1 1",stroke:"#8EA4B4","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}})])])])]}),e("ReportNavigationSubmenu",{attrs:{items:o.children,menu_id:t.menu_id,submenu_index:i}})],2)],1)}),t.with_arrows?e("li",{staticClass:"dashicons-before dashicons-arrow-right-alt2",attrs:{"data-direction":"right"}}):t._e()],2)])},z1=[],W1=n(Z1,j1,z1,!1,null,null,null,null);const G1=W1.exports,q1={MENU:[{id:"overview",label:r("Overview","google-analytics-for-wordpress"),to:"/",children:[],class:"monsterinsights-navigation-tab-link"},{id:"traffic",label:r("Traffic","google-analytics-for-wordpress"),children:[{label:r("Overview","google-analytics-for-wordpress"),to:"/traffic-overview",children:[],class:"monsterinsights-navigation-submenu-link",description:"See how customers find your website."},{label:r("Technology","google-analytics-for-wordpress"),to:"/traffic-technology",children:[],class:"monsterinsights-navigation-submenu-link",description:r("Uncover the devices and browsers your visitors are utilizing.","google-analytics-for-wordpress")},{label:r("Landing Page Details","google-analytics-for-wordpress"),to:"/traffic-landing-pages",children:[],class:"monsterinsights-navigation-submenu-link",description:r("See the first page visitors land when visiting your website.","google-analytics-for-wordpress")},{label:r("Campaigns","google-analytics-for-wordpress"),to:"/traffic-campaign",children:[],class:"monsterinsights-navigation-submenu-link",description:r("Easily measure the effectiveness of your marketing efforts.","google-analytics-for-wordpress")},{label:r("Source / Medium","google-analytics-for-wordpress"),to:"/traffic-source-medium",children:[],class:"monsterinsights-navigation-submenu-link",description:r("Details about referring traffic to your website.","google-analytics-for-wordpress")},{label:r("Social","google-analytics-for-wordpress"),to:"/traffic-social",children:[],class:"monsterinsights-navigation-submenu-link",description:r("Details about social traffic to your website.","google-analytics-for-wordpress")}],class:"monsterinsights-navigation-tab-link"},{id:"Publishers",label:r("Publishers","google-analytics-for-wordpress"),children:[{label:r("Overview","google-analytics-for-wordpress"),to:"/publishers",children:[],class:"monsterinsights-navigation-submenu-link",description:"See how visitors interact with your website."},{label:r("Pages Report","google-analytics-for-wordpress"),to:"/publishers-pages",children:[],class:"monsterinsights-navigation-submenu-link",description:r("The most popular pages on your website.","google-analytics-for-wordpress")}],class:"monsterinsights-navigation-tab-link"},{id:"search-console",label:r("Search Console","google-analytics-for-wordpress"),to:"search-console",children:[],class:"monsterinsights-navigation-tab-link"},{id:"ecommerce",label:r("eCommerce","google-analytics-for-wordpress"),children:[{label:r("Overview","google-analytics-for-wordpress"),to:"/ecommerce",children:[],class:"monsterinsights-navigation-submenu-link",description:"See how your store is performing."},{label:r("Coupons","google-analytics-for-wordpress"),to:"/ecommerce-coupons",children:[],class:"monsterinsights-navigation-submenu-link",description:r("See the coupons and discounts being used on your website.","google-analytics-for-wordpress")},{label:r("Funnel","google-analytics-for-wordpress"),to:"/ecommerce-funnel",children:[],class:"monsterinsights-navigation-submenu-link",description:r("Visually measure how customers convert in your store.","google-analytics-for-wordpress")}],class:"monsterinsights-navigation-tab-link"},{id:"dimensions",label:r("Dimensions","google-analytics-for-wordpress"),to:"/dimensions",children:[],class:"monsterinsights-navigation-tab-link"},{id:"forms",label:r("Forms","google-analytics-for-wordpress"),to:"/forms",children:[],class:"monsterinsights-navigation-tab-link"},{id:"realtime",label:r("Realtime ","google-analytics-for-wordpress"),to:"/real-time",children:[],class:"monsterinsights-navigation-tab-link"},{id:"site-speed",label:r("Site Speed","google-analytics-for-wordpress"),to:"/site-speed",children:[],class:"monsterinsights-navigation-tab-link"},{id:"media",label:r("Media","google-analytics-for-wordpress"),to:"/media",children:[],class:"monsterinsights-navigation-tab-link"},{id:"exceptions",label:r("Exceptions","google-analytics-for-wordpress"),to:"/exceptions",children:[],class:"monsterinsights-navigation-tab-link"}]},J1=null,K1=null;var Q1=n(q1,J1,K1,!1,null,null,null,null);const X1=Q1.exports,X=document.querySelector('a.current[href="admin.php?page=monsterinsights_reports"]'),O={"user-journey-report":document.querySelector('[href*="monsterinsights_reports#/user-journey-report"]'),"ai-insights":document.querySelector('[href*="monsterinsights_reports#/ai-insights"]'),"ai-insights-new-chat":document.querySelector('[href*="monsterinsights_reports#/ai-insights/chat"]'),"ai-insights-chat":document.querySelector('[href*="monsterinsights_reports#/ai-insights/chat"]')},tc={name:"ReportsNavigation",components:{ReportNavigationMenu:G1,UserJourneyNavigation:Et},data(){return{menu_id:"monsterinsights-top-menu",nav_open:!1}},computed:{...v({addons:"$_addons/addons",license:"$_license/license",license_network:"$_license/license_network",yearinreview_data:"$_reports/yearinreview_data"}),customNavComponent(){return this.$route.meta.customNav?this.$route.meta.customNav:""},hideReportNavigation(){return this.$route.meta.hideNav===!0},menuData(){let s=X1.MENU;const t=s.find(e=>e.to==="year-in-review");return this.isYearInReviewVisible()&&typeof t!="object"&&s.push({label:this.textYearInReview,to:"year-in-review",children:[],class:"monsterinsights-navigation-tab-link year-in-review"}),s},textYearInReview(){return d(r("%s Year in Review","google-analytics-for-wordpress"),this.yearinreview_data.report_year)},routeTitle(){return this.$route.meta.title?this.$route.meta.title:!1},navClass(){let s="monsterinsights-main-navigation monsterinsights-reports-navigation";return this.nav_open&&(s+=" monsterinsights-main-navigation-open"),s},buttonIconClass(){let s="monstericon-arrow";return this.nav_open&&(s+=" monstericon-down"),s},triggerClass(){let s="monsterinsights-mobile-nav-trigger";return this.nav_open&&(s+=" monsterinsights-mobile-nav-trigger-open"),s},licenseLevel(){return this.$mi.network?this.license_network.type:this.license.type},routeName(){return this.$route.name}},methods:{isAddonActive(s){return this.addons[s]?this.addons[s].active:!1},isYearInReviewVisible(){return this.yearinreview_data.show_report},sprintf:d,handleRouteChange(s){for(const t in O)if(s===t){this.removeActiveClasses();const e=O[t];e&&e.parentElement.classList.add("current");break}},removeActiveClasses(){Object.values(O).forEach(s=>{s&&s.parentElement.classList.remove("current")}),X&&X.parentElement.classList.remove("current")}},watch:{$route(s){this.handleRouteChange(s.name),this.nav_open=!1}},created(){this.handleRouteChange(this.routeName)}};var ec=function(){var t=this,e=t._self._c;return e("div",[t.hideReportNavigation?t._e():e("nav",[e("button",{class:t.triggerClass,on:{click:function(o){t.nav_open=!t.nav_open}}},[t.routeTitle?e("span",{staticClass:"monsterinsights-route-title",domProps:{textContent:t._s(t.routeTitle)}}):t._e(),e("i",{class:t.buttonIconClass})]),e("ReportNavigationMenu",{class:t.navClass,attrs:{menu_id:"monsterinsights-top-menu",menu_data:t.menuData,nav_open:!1,route_title:t.routeTitle}})],1),t.customNavComponent?e("nav",[e(t.customNavComponent,{tag:"component"})],1):t._e()])},sc=[],rc=n(tc,ec,sc,!1,null,null,null,null);const oc=rc.exports,ic={name:"ReportNoAuth",data(){return{text_no_auth:r("You must connect with MonsterInsights before you can view reports.","google-analytics-for-wordpress"),text_auth_label:r("MonsterInsights makes it effortless for you to connect your site with Google Analytics and see reports right here in the WordPress dashboard.","google-analytics-for-wordpress"),text_wizard:r("Launch Setup Wizard","google-analytics-for-wordpress"),text_ask_webmaster:r("Please ask your webmaster to connect MonsterInsights to Google Analytics.","google-analytics-for-wordpress"),wizard_url:this.$mi.wizard_url,update_settings:this.$mi.update_settings}}};var ac=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-not-authenticated-notice"},[e("h3",{domProps:{textContent:t._s(t.text_no_auth)}}),e("div",{staticClass:"monsterinsights-settings-input monsterinsights-settings-input-authenticate"},[e("span",{staticClass:"monsterinsights-dark",domProps:{textContent:t._s(t.text_auth_label)}}),t.update_settings?e("div",[e("a",{staticClass:"monsterinsights-button-alt monsterinsights-button",attrs:{slot:"before_connect",href:t.wizard_url},domProps:{textContent:t._s(t.text_wizard)},slot:"before_connect"})]):e("div",[e("p",{staticClass:"monsterinsights-dark"},[e("strong",{domProps:{textContent:t._s(t.text_ask_webmaster)}})])])])])},nc=[],lc=n(ic,ac,nc,!1,null,null,null,null);const cc=lc.exports,pc={name:"ModuleReports",router:N1,components:{TheQuickLinks:Ft,ReportReAuth:St,ReportNoAuth:cc,TheAppNotices:It,ReportsNavigation:oc,TheAppNavigation:At,TheAppHeader:Bt,Notifications:Nt},computed:{...v({blocked:"$_app/blocked",blur:"$_reports/blur",noauth:"$_reports/noauth",reauth:"$_reports/reauth",isLoaded:"$_reports/isLoaded"}),route(){return this.$route.name},mainClass(){let s="monsterinsights-admin-page monsterinsights-reports-page";return this.blur&&(s+=" monsterinsights-blur"),s}},beforeCreate(){const s="$_reports";s in this.$store._modules.root._children||this.$store.registerModule(s,Pt)},created(){this.updateSelectedReport(this.route),this.$store.dispatch("$_notifications/getNotifications")},watch:{$route(s){this.updateSelectedReport(s.name)}},methods:{updateSelectedReport(s){this.$mi.authed||(this.$store.commit("$_reports/ENABLE_BLUR"),this.$store.commit("$_reports/ENABLE_NOAUTH")),this.$store.commit("$_reports/UPDATE_ACTIVE_REPORT",s)}}};var dc=function(){var t=this,e=t._self._c;return e("div",{class:t.mainClass},[e("the-app-header",[e("Notifications")],1),e("the-app-navigation",[e("reports-navigation")],1),e("the-app-notices"),e("router-view"),t.blocked?e("div",{staticClass:"monsterinsights-blocked"}):t._e(),t.noauth?e("report-no-auth"):t._e(),t.reauth?e("report-re-auth"):t._e(),e("the-quick-links")],1)},hc=[],gc=n(pc,dc,hc,!1,null,null,null,null);const uc=gc.exports,mc={install(s){s.prototype.$miOverviewTooltips=function(t){if(!t.title)return document.querySelectorAll(".monsterinsights-line-chart-tooltip").forEach(function(k){k.style.opacity=0}),!1;let e=t.title[0],o=t.title[1],i=parseInt(t.title[2]),a=t.title[3],l=t.title[4],h=t.title[5]?t.title[5]:[],p=document.getElementById("monsterinsights-chartjs-line-"+l+"-tooltip");if(p===null&&(p=document.createElement("div"),document.body.appendChild(p),p.setAttribute("id","monsterinsights-chartjs-line-"+l+"-tooltip"),p.classList.add("monsterinsights-line-chart-tooltip")),!t.opacity){p.style.opacity=0;return}p.classList.remove("above"),p.classList.remove("below"),p.classList.remove("no-transform"),t.yAlign?p.classList.add(t.yAlign):p.classList.add("no-transform");let u="";i===0?u+="0%":i>0?u+='<span class="monsterinsights-green"><span class="monsterinsights-arrow monsterinsights-up"></span>'+i+"%</span>":u+='<span class="monsterinsights-red"><span class="monsterinsights-arrow monsterinsights-down"></span>'+Math.abs(i)+"%</span>";let _='<div class="monsterinsights-reports-overview-datagraph-tooltip-container monsterinsights-reports-tooltip">';_+='<div class="monsterinsights-reports-overview-datagraph-tooltip-title">'+e+"</div>",_+='<div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+o+"</div>",_+='<div class="monsterinsights-reports-overview-datagraph-tooltip-descriptor">'+a+"</div>",_+='<div class="monsterinsights-reports-overview-datagraph-tooltip-trend">'+u+"</div>",h&&(_+="<hr>",h.forEach(w=>{w.title&&(_+=w.title+"<br>")})),_+="</div>",p.innerHTML=_;const y=this._chart.canvas.getBoundingClientRect();p.style.opacity="1",p.style.left=y.left+window.pageXOffset+t.x+"px",p.style.top=y.top+window.pageYOffset+t.y+"px",p.style.fontFamily="Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;",p.style.fontSize=t.fontSize,p.style.fontStyle=t._fontStyle,p.style.padding=t.yPadding+"px "+t.xPadding+"px",p.style.zIndex=99999,p.style.pointerEvents="none"},s.prototype.$miPieTooltips=function(t){if(!t.title)return document.querySelectorAll(".monsterinsights-pie-chart-tooltip").forEach(function(u){u.style.opacity=0}),!1;let e=t.title[0],o=t.title[1],i=t.title[2],a=document.getElementById("monsterinsights-chartjs-pie-"+i+"-tooltip");a===null&&(a=document.createElement("div"),document.body.appendChild(a),a.setAttribute("id","monsterinsights-chartjs-pie-"+i+"-tooltip")),a.classList.remove("above"),a.classList.remove("below"),a.classList.remove("no-transform"),t.yAlign?a.classList.add(t.yAlign):a.classList.add("no-transform");let l='<div class="monsterinsights-reports-overview-datagraph-tooltip-container monsterinsights-reports-tooltip">';l+='<div class="monsterinsights-reports-overview-datagraph-tooltip-title">'+e+"</div>",l+='<div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+o+"%</div>",l+="</div>",a.innerHTML=l;let h=0;if(t.yAlign){let p=0;t.caretHeight&&(p=t.caretHeight),t.yAlign==="above"?h=t.y-p-t.caretPadding:h=t.y+p+t.caretPadding}a.style.opacity=1,a.style.left=t.x-50+"px",a.style.top=h-40+"px",a.style.padding=t.yPadding+"px "+t.xPadding+"px",a.style.zIndex="99999"},s.prototype.$miyearInReviewTooltips=function(t){if(!t.title)return document.querySelectorAll(".monsterinsights-line-chart-tooltip").forEach(function(u){u.style.opacity=0}),!1;let e=t.title[0],o=t.title[1],i=t.title[4],a=document.getElementById("monsterinsights-chartjs-line-"+i+"-tooltip");if(a===null&&(a=document.createElement("div"),document.body.appendChild(a),a.setAttribute("id","monsterinsights-chartjs-line-"+i+"-tooltip"),a.classList.add("monsterinsights-line-chart-tooltip")),!t.opacity){a.style.opacity=0;return}a.classList.remove("above"),a.classList.remove("below"),a.classList.remove("no-transform"),t.yAlign?a.classList.add(t.yAlign):a.classList.add("no-transform");let l='<div class="monsterinsights-reports-overview-datagraph-tooltip-container monsterinsights-reports-tooltip">';l+='<div class="monsterinsights-reports-overview-datagraph-tooltip-title">'+e+"</div>",l+='<div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+o+"</div>",l+="</div>",a.innerHTML=l;const h=this._chart.canvas.getBoundingClientRect();a.style.opacity="1",a.style.left=h.left+window.pageXOffset+t.x+"px",a.style.top=h.top+window.pageYOffset+t.y+"px",a.style.fontFamily="Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;",a.style.fontSize=t.fontSize,a.style.fontStyle=t._fontStyle,a.style.padding=t.yPadding+"px "+t.xPadding+"px",a.style.zIndex=99999,a.style.pointerEvents="none"},s.prototype.$mi_loading_toast=function(t,e){s.prototype.$swal({icon:"info",customClass:{container:"monsterinsights-swal"},title:t||r("Refreshing Report","google-analytics-for-wordpress"),html:e||r("Loading new report data...","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,didOpen:function(){s.prototype.$swal.showLoading()}})},s.prototype.$mi_error_toast=function(t){let{icon:e="error",customContainerClass:o="monsterinsights-swal",allowOutsideClick:i=!1,allowEscapeKey:a=!1,allowEnterKey:l=!1,title:h=r("Error","google-analytics-for-wordpress"),html:p=r("Please try again.","google-analytics-for-wordpress"),confirmButtonText:u="OK",showCancelButton:_=!1,cancelButtonText:y="Cancel",footer:w=!1,willClose:k=()=>{}}=t;return s.prototype.$swal({icon:e,customClass:{container:o},allowOutsideClick:i,allowEscapeKey:a,allowEnterKey:l,title:h,html:p,footer:w,showCancelButton:_,cancelButtonText:y,confirmButtonText:u,didOpen:function(){s.prototype.$swal.hideLoading()},willClose:k})},s.prototype.$mi_success_toast=function(t){let{toast:e=!0,position:o="top-end",showConfirmButton:i=!1,icon:a="success",timer:l=3e3,showCloseButton:h=!0,title:p=r("Settings Updated","google-analytics-for-wordpress"),showCancelButton:u=!1,confirmButtonText:_="",cancelButtonText:y="",text:w=""}=t;return s.prototype.$swal({customClass:{container:"monsterinsights-swal"},toast:e,position:o,showConfirmButton:i,icon:a,showCloseButton:h,title:p,timer:l,showCancelButton:u,confirmButtonText:_,cancelButtonText:y,text:w,showClass:{popup:""},hideClass:{popup:""}})},s.prototype.$mi_get_upsell_content=function(t){let e={};const o={overview:{mainheading:r("Publishers Report","google-analytics-for-wordpress"),title:r("Improve Your Conversion Rate With Insights Into Which Content Works Best.","google-analytics-for-wordpress"),subtitle:r("Stop guessing about what content your visitors are interested in. MonsterInsights Publisher Report shows you exactly which content gets the most visits, so you can analyze and optimize it for higher conversions.","google-analytics-for-wordpress"),features:[r("Top Landing Pages","google-analytics-for-wordpress"),r("Top Affilliate Links","google-analytics-for-wordpress"),r("Top Exit Pages","google-analytics-for-wordpress"),r("Top Download Links","google-analytics-for-wordpress"),r("Top Outbound Links","google-analytics-for-wordpress"),r("Scroll Depth","google-analytics-for-wordpress")]},publisher:{mainheading:r("Publishers Report","google-analytics-for-wordpress"),title:r("Improve Your Conversion Rate With Insights Into Which Content Works Best.","google-analytics-for-wordpress"),features:[r("Top Landing Pages","google-analytics-for-wordpress"),r("Top Affilliate Links","google-analytics-for-wordpress"),r("Top Exit Pages","google-analytics-for-wordpress"),r("Top Download Links","google-analytics-for-wordpress"),r("Top Outbound Links","google-analytics-for-wordpress"),r("Scroll Depth","google-analytics-for-wordpress")]},ecommerce:{mainheading:r("eCommerce Report","google-analytics-for-wordpress"),title:r("Increase Sales and Make More Money With Enhanced eCommerce Insights.","google-analytics-for-wordpress"),features:[r("10+ eCommerce Integrations","google-analytics-for-wordpress"),r("Average Order Value","google-analytics-for-wordpress"),r("Total Revenue","google-analytics-for-wordpress"),r("Sessions to Purchase","google-analytics-for-wordpress"),r("Top Conversion Sources","google-analytics-for-wordpress"),r("Top Products","google-analytics-for-wordpress"),r("Number of Transactions","google-analytics-for-wordpress"),r("Time to Purchase","google-analytics-for-wordpress")]},ecommerce_product_sales:{mainheading:r("Product Sales Report","google-analytics-for-wordpress"),title:r("See which products are the most popular with your customers.","google-analytics-for-wordpress"),features:[r("Products","google-analytics-for-wordpress"),r("Quantity Counts","google-analytics-for-wordpress"),r("Easy Filtering","google-analytics-for-wordpress"),r("PDF Exporting","google-analytics-for-wordpress")]},ecommerce_funnel:{mainheading:r("eCommerce Funnel Report","google-analytics-for-wordpress"),title:r("Visually see how customers move through your eCommerce website to make a purchase.","google-analytics-for-wordpress"),features:[r("Step by Step Funnel View","google-analytics-for-wordpress"),r("Conversion Rates","google-analytics-for-wordpress"),r("Breakdowns by Devices","google-analytics-for-wordpress"),r("Abandonment Rates","google-analytics-for-wordpress"),r("Breakdowns by Channel","google-analytics-for-wordpress"),r("Date Picker","google-analytics-for-wordpress")]},ecommerce_coupons:{mainheading:r("Coupon Report","google-analytics-for-wordpress"),title:r("Learn which coupons are generating the most sales for your store.","google-analytics-for-wordpress"),features:[r("Coupons","google-analytics-for-wordpress"),r("Average Order Value","google-analytics-for-wordpress"),r("Total Revenue","google-analytics-for-wordpress"),r("Sessions to Purchase","google-analytics-for-wordpress"),r("Top Conversion Sources","google-analytics-for-wordpress"),r("Top Products","google-analytics-for-wordpress"),r("Number of Transactions","google-analytics-for-wordpress"),r("Time to Purchase","google-analytics-for-wordpress")]},dimensions:{mainheading:r("Dimensions Report","google-analytics-for-wordpress"),title:r("Increase Engagement and Unlock New Insights About Your Site.","google-analytics-for-wordpress"),features:[r("Author Tracking","google-analytics-for-wordpress"),r("User ID Tracking","google-analytics-for-wordpress"),r("Post Types","google-analytics-for-wordpress"),r("Tag Tracking","google-analytics-for-wordpress"),r("Categories","google-analytics-for-wordpress"),r("SEO Scores","google-analytics-for-wordpress"),r("Publish Times","google-analytics-for-wordpress"),r("Focus Keywords","google-analytics-for-wordpress")]},forms:{mainheading:r("Forms Report","google-analytics-for-wordpress"),title:r("Track Every Type of Web Form and Gain Visibility Into Your Customer Journey.","google-analytics-for-wordpress"),columns:1,features:[r("Conversion Counts","google-analytics-for-wordpress"),r("Impression Counts","google-analytics-for-wordpress"),r("Conversion Rates","google-analytics-for-wordpress")]},queries:{mainheading:r("Search Console Report","google-analytics-for-wordpress"),title:r("See Exactly How Visitors Find Your Website From Google.","google-analytics-for-wordpress"),columns:1,features:[r("Top Google Search Terms","google-analytics-for-wordpress"),r("Number of Clicks","google-analytics-for-wordpress"),r("Click-through Ratio","google-analytics-for-wordpress"),r("Average Results Position","google-analytics-for-wordpress")]},realtime:{mainheading:r("Realtime Report","google-analytics-for-wordpress"),title:r("See Who And What is Happening on Your Website in Realtime.","google-analytics-for-wordpress"),features:[r("Top Page Views","google-analytics-for-wordpress"),r("Current Active Users","google-analytics-for-wordpress"),r("Top Referral Sources","google-analytics-for-wordpress"),r("Pageviews Per Minute","google-analytics-for-wordpress"),r("Top Countries","google-analytics-for-wordpress"),r("Top Cities","google-analytics-for-wordpress")]},sitespeed:{mainheading:r("Site Speed Report","google-analytics-for-wordpress"),title:r("Improve Your User Experience and Improve Search Engine Rankings.","google-analytics-for-wordpress"),features:[r("Overall Site Speed Score","google-analytics-for-wordpress"),r("Server Response Times","google-analytics-for-wordpress"),r("Mobile and Desktop Scores","google-analytics-for-wordpress"),r("First Contentful Paint","google-analytics-for-wordpress"),r("Automatic Recommendations","google-analytics-for-wordpress"),r("Total Blocking Time","google-analytics-for-wordpress"),r("On-Demand Audits","google-analytics-for-wordpress"),r("Time to Interactive","google-analytics-for-wordpress")]},media:{mainheading:r("Media Report","google-analytics-for-wordpress"),title:r("Easily See Which Videos Are Most Popular.","google-analytics-for-wordpress"),features:[r("Videos Plays, Average Duration, and Completions","google-analytics-for-wordpress"),r("Works with YouTube, Vimeo, and HTML 5 Videos","google-analytics-for-wordpress"),r("Compare stats over time","google-analytics-for-wordpress")]},userjourney:{mainheading:r("User Journey Report","google-analytics-for-wordpress"),title:r("See the exact steps your customers took to purchase, and how they arrived at your website.","google-analytics-for-wordpress"),features:[r("Step-by-Step Purchase Paths","google-analytics-for-wordpress"),r("Purchase Dates","google-analytics-for-wordpress"),r("Campaign Filtering","google-analytics-for-wordpress"),r("Order Totals","google-analytics-for-wordpress"),r("Medium & Source Filtering","google-analytics-for-wordpress"),r("Average Steps to Purchase","google-analytics-for-wordpress")]},traffic:{mainheading:r("Traffic Report","google-analytics-for-wordpress"),title:r("Learn how visitors arrive to your website and which are the most engaged or profitable.","google-analytics-for-wordpress"),features:[r("Channel Breakdowns","google-analytics-for-wordpress"),r("Session Counts","google-analytics-for-wordpress"),r("Pages/Session","google-analytics-for-wordpress"),r("Conversion Rate","google-analytics-for-wordpress"),r("Revenue","google-analytics-for-wordpress"),r("Engaged Sessions","google-analytics-for-wordpress")]},traffic_landing_pages:{mainheading:r("Landing Page Report","google-analytics-for-wordpress"),title:r("Find out which pages are making your first impression.","google-analytics-for-wordpress"),features:[r("Page Name","google-analytics-for-wordpress"),r("Pages/Session","google-analytics-for-wordpress"),r("Sessions","google-analytics-for-wordpress"),r("Purchases","google-analytics-for-wordpress"),r("Session Counts","google-analytics-for-wordpress"),r("Conversion Rates","google-analytics-for-wordpress")]},traffic_technology:{mainheading:r("Technology Report","google-analytics-for-wordpress"),title:r("Optimize your website for your top devices and browsers.","google-analytics-for-wordpress"),features:[r("Browser Names","google-analytics-for-wordpress"),r("Device Types","google-analytics-for-wordpress"),r("Export to PDF","google-analytics-for-wordpress"),r("Date Filtering","google-analytics-for-wordpress")]},traffic_campaign:{mainheading:r("Campaigns Report","google-analytics-for-wordpress"),title:r("Measure how effective your marketing campaigns are performing.","google-analytics-for-wordpress"),features:[r("Campaign Names","google-analytics-for-wordpress"),r("Easy Filtering","google-analytics-for-wordpress"),r("Pages / Session","google-analytics-for-wordpress"),r("Purchases","google-analytics-for-wordpress"),r("eCommerce Conversion Rates","google-analytics-for-wordpress"),r("Revenue","google-analytics-for-wordpress")]},traffic_source_medium:{mainheading:r("Source and Medium Report","google-analytics-for-wordpress"),title:r("Uncover which traffic sources are creating engagement and sales from your website.","google-analytics-for-wordpress"),features:[r("Source Name","google-analytics-for-wordpress"),r("Pages / Sessions","google-analytics-for-wordpress"),r("Session Counts","google-analytics-for-wordpress"),r("Purchases","google-analytics-for-wordpress"),r("Easy Filtering","google-analytics-for-wordpress"),r("Conversion Rates","google-analytics-for-wordpress")]},engagement_overview:{mainheading:r("Engagement Report","google-analytics-for-wordpress"),title:r("Improve Your Conversion Rate With Insights Into Which Content Works Best.","google-analytics-for-wordpress"),features:[r("Top Landing Pages","google-analytics-for-wordpress"),r("Top Affilliate Links","google-analytics-for-wordpress"),r("Top Exit Pages","google-analytics-for-wordpress"),r("Top Download Links","google-analytics-for-wordpress"),r("Top Outbound Links","google-analytics-for-wordpress"),r("Scroll Depth","google-analytics-for-wordpress")]},engagement_pages:{mainheading:r("Pages Report","google-analytics-for-wordpress"),title:r("View the most popular pages on your website.","google-analytics-for-wordpress"),features:[r("Page Name","google-analytics-for-wordpress"),r("New Sessions","google-analytics-for-wordpress"),r("Sessions","google-analytics-for-wordpress"),r("Bounce Rate","google-analytics-for-wordpress"),r("Engaged Sessions","google-analytics-for-wordpress"),r("Exits","google-analytics-for-wordpress")]},traffic_social:{mainheading:r("Social Media Report","google-analytics-for-wordpress"),title:r("See Which Social Media Networks are Making You Money.","google-analytics-for-wordpress"),features:[r("Social Networks","google-analytics-for-wordpress"),r("Sessions","google-analytics-for-wordpress"),r("Bounce Rate","google-analytics-for-wordpress"),r("Purchases","google-analytics-for-wordpress"),r("Revenue","google-analytics-for-wordpress"),r("Conversion Rate","google-analytics-for-wordpress")]},exceptions:{mainheading:r("Exceptions Report","google-analytics-for-wordpress"),title:r("Be Notified About Important Website Events","google-analytics-for-wordpress"),features:[r("Traffic Changes","google-analytics-for-wordpress"),r("Conversion Rate Changes","google-analytics-for-wordpress"),r("Revenue Changes","google-analytics-for-wordpress"),r("Landing Page Changes","google-analytics-for-wordpress"),r("Engagement Rates","google-analytics-for-wordpress"),r("Email Notifications","google-analytics-for-wordpress"),r("Campaign Alerts","google-analytics-for-wordpress"),r("Site Notes Integration","google-analytics-for-wordpress")]},ai_insights:{mainheading:r("AI Insights","google-analytics-for-wordpress"),title:r("Get incredible new insights about your website with the power of AI.","google-analytics-for-wordpress"),features:[r("On Demand Insights","google-analytics-for-wordpress"),r("Traffic Insights","google-analytics-for-wordpress"),r("Visitor Insights","google-analytics-for-wordpress"),r("Campaign Insights","google-analytics-for-wordpress")]}};return o[t]&&(e=o[t]),e},s.prototype.$mi_intervals=function(){return Dt}}},_c={install(s){s.mixin({methods:{tablePrepareColumnItems(t){let e=[];return Array.isArray(t)&&t.forEach(o=>{Array.isArray(o)&&o.forEach((i,a)=>{!this.date.compareReport&&a>0||e.push(i)})}),e},tableIsCurrentColumn(t){return!this.date.compareReport||this.compareSingleColumns.includes(t)?!0:(t-=this.compareSingleColumns.length,this.hasCompareChangeColumn?t%3===0:t%2===0)},tableIsPreviousColumn(t){return this.date.compareReport?(t-=this.compareSingleColumns.length,this.hasCompareChangeColumn?[1,4,7,10,13,16].includes(t):[1,3,5,7,9,11,13].includes(t)):!1},tableIsChangeColumn(t,e){return t===""||!this.hasCompareChangeColumn||!this.date.compareReport?!1:(e-=this.compareSingleColumns.length,[2,5,8,11,14,17].includes(e))},tableCompareChange(t,e){let o=Number(t),i=o>0?"up":"down",a=o>0?"green":"red";return this.compareChangeOpposite.includes(e)&&(a=o<=0?"green":"red"),'<span class="monsterinsights-arrow monsterinsights-'+i+" monsterinsights-"+a+'"></span> '+Math.abs(o)+"%"},tableFormatRowData(t,e=null,o=null){if(Array.isArray(t))return t.map((i,a)=>{if(a==2)return i;let l=o?o(i):i;return e&&(l+=e),l});if(typeof t<"u"){let i=o?o(t):t;return e&&(i+=e),[i]}return["--"]}}})}};const tt=document.getElementById("monsterinsights-reports");g.config.productionTip=!1;tt&&(bt({ctrl:!0}),g.use(et),g.use(xt),g.use(kt,{defaultTemplate:'<div class="monsterinsights-tooltip" role="tooltip"><div class="monsterinsights-tooltip-arrow"></div><div class="monsterinsights-tooltip-inner"></div></div>',defaultArrowSelector:".monsterinsights-tooltip-arrow, .monsterinsights-tooltip__arrow",defaultInnerSelector:".monsterinsights-tooltip-inner, .monsterinsights-tooltip__inner"}),g.use(W),g.use(mc),g.use(_c),g.use(W),g.directive("click-outside",{bind:function(s,t,e){s.clickOutsideEvent=function(o){s===o.target||s.contains(o.target)||e.context[t.expression](o)},document.body.addEventListener("click",s.clickOutsideEvent)},unbind:function(s){document.body.removeEventListener("click",s.clickOutsideEvent)}}),g.use(Ot,{componentPrefix:"monsterinsights",classPrefix:"monsterinsights",textDomain:"google-analytics-for-wordpress"}),$t(window.monsterinsights.translations,"google-analytics-for-wordpress"),new g({store:D,mounted:()=>{D.dispatch("$_app/init"),D.dispatch("$_addons/getAddons"),D.dispatch("$_settings/getSettings"),g.prototype.$isPro()&&D.dispatch("$_license/getLicense")},render:s=>s(uc)}).$mount(tt));