import{V as a,a as O,m as y,n as u,h as $,i as V,b as M,e as z,p as G}from"./chunks/vendor-13bf5d31.min.js";import{R as K,D as B}from"./chunks/date-intervals-2f4eb617.min.js";import{R as q,a as Z,b as j}from"./chunks/ReportReAuth-bd7ca8cd.min.js";import{S as J}from"./chunks/SettingsInfoTooltip-c1590d73.min.js";import{W as X}from"./chunks/WidgetReportError-37110df3.min.js";import{N as Q,M as F,s as _}from"./chunks/index-6abfe9ae.min.js";const ee=(o,e,t,i,r)=>new Promise(n=>{let l=new FormData;t=JSON.stringify(t),l.append("action","monsterinsights_save_widget_state"),l.append("nonce",a.prototype.$mi.nonce),l.append("width",e),l.append("reports",t),l.append("interval",i),l.append("notice",r),l.append("compact",o.state.compact),O.post(a.prototype.$mi.ajax,l).then(g=>{a.prototype.$swal.close(),n(g.data)}).catch(function(g){console.log(g)})}),te=()=>new Promise(()=>{let o=new FormData;o.append("action","monsterinsights_mark_notice_closed"),o.append("nonce",a.prototype.$mi.nonce),O.post(a.prototype.$mi.ajax,o)}),U={saveWidgetState:ee,markNoticeClosed:te},se=o=>new Promise(e=>{if(a.prototype.$mi.widget_state&&a.prototype.$mi.widget_state.reports){for(let t in a.prototype.$mi.widget_state.reports)if(a.prototype.$mi.widget_state.reports.hasOwnProperty(t))for(let i in a.prototype.$mi.widget_state.reports[t])a.prototype.$mi.widget_state.reports[t].hasOwnProperty(i)&&(o.state.reports[i].enabled=a.prototype.$mi.widget_state.reports[t][i])}o.state.width=a.prototype.$mi.widget_state.width,o.state.interval=a.prototype.$mi.widget_state.interval,o.state.notice30day=a.prototype.$mi.widget_state.notice30day,o.state.compact=typeof a.prototype.$mi.widget_state.compact<"u"?a.prototype.$mi.widget_state.compact:!1,e(!0)}),oe=o=>{let e={overview:{},publisher:{},ecommerce:{}},t=o.rootGetters.hasOwnProperty("$_reports/date")?o.rootGetters["$_reports/date"].interval:"";for(let i in o.state.reports)if(o.state.reports.hasOwnProperty(i)&&o.state.reports[i].hasOwnProperty("type")){let r=o.state.reports[i].type;e[r][i]=o.state.reports[i].enabled}U.saveWidgetState(o,o.state.width,e,t)},ie=()=>{U.markNoticeClosed()},re={processDefaults:se,saveWidgetState:oe,markNoticeClosed:ie},ne=o=>{const e="hide_for_v4",t={};for(let i in o.reports)o.reports[i][e]||(t[i]=o.reports[i]);return t},ae=o=>o.width,le=o=>o.width!=="regular"?!1:o.compact,ce=o=>o.loaded,de=o=>o.error,ge=o=>o.notice30day,pe={reports:ne,width:ae,loaded:ce,error:de,notice30day:ge,compact:le},fe=(o,e)=>{o.reports[e]&&a.set(o.reports[e],"enabled",!0)},ue=(o,e)=>{o.reports[e]&&a.set(o.reports[e],"enabled",!1)},he=(o,e)=>{o.loaded=e},me=(o,e)=>{o.width=e},we=(o,e)=>{o.compact=e},_e=(o,e)=>{if(typeof e.title>"u"&&typeof e.content>"u"&&typeof e.footer>"u"){a.set(o.error,e.report,!1);return}a.set(o.error,e.report,e)},ye={ENABLE_REPORT:fe,DISABLE_REPORT:ue,UPDATE_LOADED:he,UPDATE_WIDTH:me,SET_ERROR:_e,UPDATE_COMPACT:we},{__:c}=wp.i18n,ve={width:"regular",interval:30,loaded:!1,compact:!0,reports:{overview:{type:"overview",name:c("Overview Report","google-analytics-for-wordpress"),enabled:!0,component:"WidgetReportOverview"},toppages:{type:"overview",name:c("Top Posts/Pages","google-analytics-for-wordpress"),tooltip:c("This list shows your website's most viewed posts and pages based on pageviews.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportTopPosts"},newvsreturn:{type:"overview",name:c("New vs. Returning Visitors","google-analytics-for-wordpress"),tooltip:c("This graph shows what percent of your user sessions come from new versus repeat visitors.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportNewVsReturning"},devices:{type:"overview",name:c("Device Breakdown","google-analytics-for-wordpress"),tooltip:c("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"),enabled:!1,component:"WidgetReportDevices"},landingpages:{type:"publisher",name:c("Top Landing Pages","google-analytics-for-wordpress"),tooltip:c("This list shows the top pages users first land on when visiting your website.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportLandingPages"},exitpages:{type:"publisher",name:c("Top Exit Pages","google-analytics-for-wordpress"),tooltip:c("This list shows the top pages users exit your website from.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportExitPages",hide_for_v4:!0},outboundlinks:{type:"publisher",name:c("Top Outbound Links","google-analytics-for-wordpress"),tooltip:c("This list shows the top links clicked on your website that go to another website.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportOutboundLinks"},affiliatelinks:{type:"publisher",name:c("Top Affiliate Links","google-analytics-for-wordpress"),tooltip:c("This list shows the top affiliate links your visitors clicked the most.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportAffiliateLinks"},downloadlinks:{type:"publisher",name:c("Top Download Links","google-analytics-for-wordpress"),tooltip:c("This list shows the download links your visitors clicked the most.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportDownloadLinks"},infobox:{type:"ecommerce",name:c("Overview","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportEcommerceOverview"},products:{type:"ecommerce",name:c("Top Products","google-analytics-for-wordpress"),tooltip:c("This list shows the top selling products on your website.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportTopProducts"},conversions:{type:"ecommerce",name:c("Top Conversion Sources","google-analytics-for-wordpress"),tooltip:c("This list shows the top referral websites in terms of product revenue.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportTopConversions"},addremove:{type:"ecommerce",name:c("Total Add/Remove","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportAddRemove"},days:{type:"ecommerce",name:c("Time to Purchase","google-analytics-for-wordpress"),tooltip:c("This list shows how many days from first visit it took users to purchase products from your site.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportDays",hide_for_v4:!0},sessions:{type:"ecommerce",name:c("Sessions to Purchase","google-analytics-for-wordpress"),tooltip:c("This list shows the number of sessions it took users before they purchased a product from your website.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportSessions",hide_for_v4:!0},newcustomers:{type:"ecommerce",name:c("New Customers","google-analytics-for-wordpress"),tooltip:c("The percentage of first time purchasers.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportNewCustomers",hide_for_ua:!0},abandonedcheckouts:{type:"ecommerce",name:c("Abandoned Checkouts","google-analytics-for-wordpress"),tooltip:c("The percentage of checkouts that do not result in a transaction.","google-analytics-for-wordpress"),enabled:!1,component:"WidgetReportAbandonedCheckouts",hide_for_ua:!0}},error:{},notice30day:!1},be={namespaced:!0,state:ve,actions:re,getters:pe,mutations:ye},{__:h}=wp.i18n,xe={name:"WidgetTips",data(){return{tips:[{text:h("Forms Tracking help you see who’s viewing your forms, so you can increase conversions.","google-analytics-for-wordpress"),utm:"forms",level:"pro"},{text:h("Custom Dimensions show you popular categories, best time to publish, focus keywords, etc.","google-analytics-for-wordpress"),utm:"custom-dimensions",level:"pro"},{text:h("Make Google Analytics GDPR compliant with our EU Compliance addon.","google-analytics-for-wordpress"),utm:"gdpr",level:"plus"},{text:h("Get real-time Google Analytics report right inside your WordPress dashboard.","google-analytics-for-wordpress"),utm:"real-time",level:"plus"},{text:h("See all your important store metrics in one place with Enhanced Ecommerce Tracking.","google-analytics-for-wordpress"),utm:"ecommerce",level:"pro"},{text:h("Unlock search console report to see your top performing keywords in Google.","google-analytics-for-wordpress"),utm:"search-console",level:"plus"},{text:h("Get Page Insights to see important metrics for individual posts / pages in WordPress.","google-analytics-for-wordpress"),utm:"page-insights",level:"plus"},{text:h("Publishers Report shows your top performing pages, audience demographics, and more.","google-analytics-for-wordpress"),utm:"publishers",level:"plus"},{text:h("Get Scroll-Depth tracking to see how far users scroll on your pages before leaving.","google-analytics-for-wordpress"),utm:"scroll",level:"plus"}],text_upgrade_link:h("Upgrade to Pro »","google-analytics-for-wordpress"),text_pro_tip:h("Pro Tip:","google-analytics-for-wordpress")}},computed:{...y({license:"$_license/license",license_network:"$_license/license_network"}),licenseLevel(){return this.$mi.network?this.license_network.type:this.license.type},tip(){return this.getTip()}},methods:{getRandomTip(){return this.tips[Math.floor(Math.random()*this.tips.length)]},getPlusTip(){let o=this.getRandomTip();return o.level!=="pro"?this.getPlusTip():o},getTip(){return this.licenseLevel===""?this.getRandomTip():this.licenseLevel==="plus"||this.licenseLevel==="basic"?this.getPlusTip():!1},upgradeUrl(o,e){return this.$getUpgradeUrl(o,e)}}};var Ce=function(){var e=this,t=e._self._c;return e.tip?t("div",{staticClass:"monsterinsights-tips"},[t("span",{staticClass:"monstericon-star"}),t("div",{staticClass:"monsterinsights-tip-text"},[t("strong",{domProps:{textContent:e._s(e.text_pro_tip)}}),e._v(" "+e._s(e.tip.text)+" "),t("a",{attrs:{href:e.upgradeUrl("pro-tips",e.tip.utm),target:"_blank",rel:"noopener"},domProps:{textContent:e._s(e.text_upgrade_link)}})])]):e._e()},$e=[],Re=u(xe,Ce,$e,!1,null,null,null,null);const ke=Re.exports,{__:f,sprintf:S}=wp.i18n,Te={name:"WidgetReportOverview",components:{WidgetTips:ke,ReportInfobox:q},computed:{...y({overview:"$_reports/overview",widget_width:"$_widget/width"}),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")}},data(){return{chartKey:0,current_tab:"sessions",text_sessions:f("Sessions","google-analytics-for-wordpress"),text_sessions_tooltip:S(f("Unique %s Sessions","google-analytics-for-wordpress"),"<br />"),text_pageviews:f("Pageviews","google-analytics-for-wordpress"),text_pageviews_tooltip:S(f("Unique %s Pageviews","google-analytics-for-wordpress"),"<br />"),text_infobox_tooltip_sessions:f("A session is the browsing session of a single user to your site.","google-analytics-for-wordpress"),text_infobox_tooltip_pageviews:f("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:f("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:f("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:f("The number of distinct tracked users","google-analytics-for-wordpress"),text_infobox_tooltip_newusers:f("Users who interacted with your site for the first time.","google-analytics-for-wordpress"),text_duration:f("Avg. Session Duration","google-analytics-for-wordpress"),text_bounce:f("Bounce Rate","google-analytics-for-wordpress"),text_total_users:f("Total Users","google-analytics-for-wordpress"),text_new_users:f("New Users","google-analytics-for-wordpress")}},methods:{infoboxData(o,e=!1){let t={};return this.overview.infobox&&this.overview.infobox[o]&&(t.change=this.overview.infobox[o].prev,t.value=this.overview.infobox[o].value.toString(),this.overview.infobox[o].prev===0?t.direction="":this.overview.infobox[o].prev>0?(t.direction="up",t.color="green"):(t.direction="down",t.color="red")),e&&(t.direction==="down"?t.color="green":t.color="red"),t},forceRerender(){this.chartKey+=1}}};var De=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"monsterinsights-report-row monsterinsights-report-infobox-row"},[t("report-infobox",{attrs:{title:e.text_sessions,value:e.$formatNumber(e.infoboxSessionsData.value),change:e.infoboxSessionsData.change,color:e.infoboxSessionsData.color,direction:e.infoboxSessionsData.direction,days:e.infoboxRange,tooltip:e.text_infobox_tooltip_sessions}}),t("report-infobox",{attrs:{title:e.text_pageviews,value:e.$formatNumber(e.infoboxPageviewsData.value),change:e.infoboxPageviewsData.change,color:e.infoboxPageviewsData.color,direction:e.infoboxPageviewsData.direction,days:e.infoboxRange,tooltip:e.text_infobox_tooltip_pageviews}}),t("report-infobox",{attrs:{title:e.text_duration,value:e.infoboxDurationData.value,change:e.infoboxDurationData.change,color:e.infoboxDurationData.color,direction:e.infoboxDurationData.direction,days:e.infoboxRange,tooltip:e.text_infobox_tooltip_average}}),t("report-infobox",{attrs:{title:e.text_total_users,value:e.$formatNumber(e.infoboxTotalUsersData.value),change:e.infoboxTotalUsersData.change,color:e.infoboxTotalUsersData.color,direction:e.infoboxTotalUsersData.direction,days:e.infoboxRange,tooltip:e.text_infobox_tooltip_totalusers}}),t("report-infobox",{attrs:{title:e.text_bounce,value:e.infoboxBounceData.value,change:e.infoboxBounceData.change,color:e.infoboxBounceData.color,direction:e.infoboxBounceData.direction,days:e.infoboxRange,tooltip:e.text_infobox_tooltip_bounce}}),t("report-infobox",{attrs:{title:e.text_new_users,value:e.$formatNumber(e.infoboxNewUsersData.value),change:e.infoboxNewUsersData.change,color:e.infoboxNewUsersData.color,direction:e.infoboxNewUsersData.direction,days:e.infoboxRange,tooltip:e.text_infobox_tooltip_newusers}})],1),t("WidgetTips")],1)},Pe=[],Se=u(Te,De,Pe,!1,null,null,null,null);const Ee=Se.exports,{__:E}=wp.i18n,Le={name:"WidgetReportsLink",props:{see_all:String,go_to:String},data(){return{default_see_all:E("See All Reports","google-analytics-for-wordpress"),default_go_to:E("Go to the Analytics Dashboard","google-analytics-for-wordpress")}},computed:{text_see_all(){return this.see_all?this.see_all:this.default_see_all},text_go_to(){return this.go_to?this.go_to:this.default_go_to}}};var We=function(){var e=this,t=e._self._c;return t("div",{staticClass:"monsterinsights-reports-link"},[t("span",{domProps:{innerHTML:e._s(e.text_see_all)}}),e._v(" "),t("a",{staticClass:"monsterinsights-button monsterinsights-button-small",attrs:{href:e.$mi.reports_url},domProps:{innerHTML:e._s(e.text_go_to)}})])},Ae=[],Ie=u(Le,We,Ae,!1,null,null,null,null);const Ne=Ie.exports;let T=!1,D=!1,L=!1;const Oe={name:"WidgetAccordion",components:{WidgetReportsLink:Ne,ReportUpsellOverlay:Z,WidgetReportError:X,SettingsInfoTooltip:J,WidgetReportOverview:Ee},props:{mobileWidth:{default:782,type:Number}},data(){return{activeReport:"overview",reportsWithUpsell:{},isMobile:!1}},created(){if(this.$mi.widget_state&&this.$mi.widget_state.interval){const o=this.$mi.widget_state.interval,e=this.$mi_intervals(),t=e[o]||e.last30days,i=t.start||$().subtract(1,"days"),r=t.end||$.subtract(30,"days");this.$store.commit("$_reports/UPDATE_INTERVAL",this.$mi.widget_state.interval),this.$store.commit("$_reports/UPDATE_DATE",{start:i.format("YYYY-MM-DD"),end:r.format("YYYY-MM-DD")})}},computed:{...y({widget_reports:"$_widget/reports",widget_width:"$_widget/width",loaded:"$_widget/loaded",error:"$_widget/error"}),widgetFullWidth(){return this.widget_width!=="regular"},widgetReports(){let o={},e={};T=!1;for(let t in this.widget_reports)if(this.widget_reports.hasOwnProperty(t)&&this.widget_reports[t].enabled){if(this.widgetFullWidth){if(typeof this.reportsWithUpsell[t]<"u")if(T===!1)T=!0;else continue;if(this.error[this.widget_reports[t].type]){let i=this.widget_reports[t].type;if(e[i]=e[i]?e[i]+1:1,e[i]>1)continue}}o[t]=this.widget_reports[t]}return o}},methods:{maybeHideUpsell(o){this.$set(this.reportsWithUpsell,o,1),this.widgetFullWidth&&!L&&(L=!0,this.$forceUpdate())},toggle(o,e){const t=this.widget_reports[e].type,i=this;i.$store.commit("$_widget/UPDATE_LOADED",!1),i.$store.commit("$_widget/SET_ERROR",{report:t}),this.$store.dispatch("$_reports/getReportData",t).then(function(){i.$store.commit("$_widget/UPDATE_LOADED",!0)}),this.activeReport=e===this.activeReport?"":e,this.activeReport!==""&&this.scrollIntoView(o.target)},toggleClass(o){let e="monsterinsights-widget-toggle";return this.activeReport===o&&(e+=" monsterinsights-widget-toggle-active"),e},showReport(o,e){return this.widgetFullWidth&&e.enabled&&!this.isMobile?!0:this.activeReport===o},reportClass(o){return"monsterinsights-widget-report-element monsterinsights-widget-report-"+o},scrollIntoView(o){this.$nextTick(()=>{let e=o.getBoundingClientRect();window.scrollTo({top:e.top-50+pageYOffset,left:0,behavior:"smooth"})})},showReportTitle(o){return this.widgetFullWidth?!0:o},handleResize(){D||(D=!0,window.requestAnimationFrame?window.requestAnimationFrame(this.resizeCallback):setTimeout(this.resizeCallback,66))},resizeCallback(){this.isMobile=window.innerWidth<this.mobileWidth,D=!1}},mounted(){const o=this;this.$store.dispatch("$_reports/getReportData","overview").then(function(){o.$store.commit("$_widget/UPDATE_LOADED",!0),o.$forceUpdate()}),window.addEventListener("resize",this.handleResize),this.handleResize()},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize)}};var Me=function(){var e=this,t=e._self._c;return t("div",{staticClass:"monsterinsights-widget-accordion monsterinsights-widget-accordion-lite"},[e._l(e.widgetReports,function(i,r){return t("div",{key:r,class:e.reportClass(r)},[e.showReportTitle(i.enabled)?t("div",{class:e.toggleClass(r),attrs:{tabindex:"0"},on:{click:function(n){return n.preventDefault(),e.toggle(n,r)},keyup:[function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:e.toggle(n,r)},function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.toggle(n,r)}]}},[t("h2",{staticClass:"monsterinsights-widget-report-title"},[t("span",{domProps:{textContent:e._s(i.name)}}),i.tooltip?t("settings-info-tooltip",{attrs:{content:i.tooltip}}):e._e()],1)]):e._e(),e.showReport(r,i)?t("div",{staticClass:"monsterinsights-widget-content"},[e.error[i.type]?t("widget-report-error",{attrs:{error:e.error[i.type]}}):r==="overview"&&e.loaded?t("WidgetReportOverview"):e.loaded?t("report-upsell-overlay",{attrs:{report:i.type,"no-image":"","show-sample-button":!1}}):t("div",{staticClass:"monsterinsights-widget-loading"})],1):e._e()])}),e.widgetFullWidth?e._e():t("widget-reports-link")],2)},Be=[],Fe=u(Oe,Me,Be,!1,null,null,null,null);const Ue=Fe.exports,{__:x}=wp.i18n,He={name:"WidgetSettingsHide",data(){return{text_hide_widget:x("Hide dashboard widget","google-analytics-for-wordpress")}},computed:{...y({widget_width:"$_widget/width"}),fullWidth(){return this.widget_width!=="regular"}},methods:{hideWidget(){const o=this;this.$swal({icon:"info",customClass:{container:"monsterinsights-swal"},title:x("Are you sure you want to hide the MonsterInsights Dashboard Widget? ","google-analytics-for-wordpress"),showCancelButton:!0,confirmButtonText:x("Yes, hide it!","google-analytics-for-wordpress"),cancelButtonText:x("No, cancel!","google-analytics-for-wordpress"),reverseButtons:!0}).then(function(e){if(e.value){o.$swal({icon:"success",title:x("MonsterInsights Widget Hidden","google-analytics-for-wordpress"),html:x('You can re-enable the MonsterInsights widget at any time using the "Screen Options" menu on the top right of this page',"google-analytics-for-wordpress")});const t=document.getElementById("monsterinsights_reports_widget-hide");t&&t.click()}})}}};var Ye=function(){var e=this,t=e._self._c;return t("button",{staticClass:"monsterinsights-hide-button",domProps:{textContent:e._s(e.text_hide_widget)},on:{click:function(i){return i.preventDefault(),e.hideWidget.apply(null,arguments)}}})},Ve=[],ze=u(He,Ye,Ve,!1,null,null,null,null);const Ge=ze.exports,Ke={name:"WidgetSettingsCompact"};var qe=function(){var e=this,t=e._self._c;return t("div")},Ze=[],je=u(Ke,qe,Ze,!1,null,null,null,null);const Je=je.exports,{__:k}=wp.i18n;a.directive("click-outside",{bind:function(o,e,t){o.clickOutsideEvent=function(i){o===i.target||o.contains(i.target)||t.context[e.expression](i)},document.body.addEventListener("click",o.clickOutsideEvent)},unbind:function(o){document.body.removeEventListener("click",o.clickOutsideEvent)}});const Xe={name:"WidgetSettingsReports",components:{WidgetSettingsCompact:Je,WidgetSettingsHide:Ge},data(){return{dropdownVisible:!1,text_settings_overview:k("Show Overview Reports","google-analytics-for-wordpress"),text_settings_publisher:k("Show Publishers Reports","google-analytics-for-wordpress"),text_settings_ecommerce:k("Show eCommerce Reports","google-analytics-for-wordpress"),text_settings_dropdown:k("Settings Menu","google-analytics-for-wordpress"),tooltip_data:{content:k("Available in PRO version","google-analytics-for-wordpress"),autoHide:!1,trigger:"hover focus click"}}},computed:{...y({widget_reports:"$_widget/reports"}),reportSettings(){let o={};for(let e in this.widget_reports)this.widget_reports.hasOwnProperty(e)&&e!=="overview"&&(o[e]=this.widget_reports[e]);return o}},methods:{toggleReport(o,e){this.widget_reports[e].enabled?this.$store.commit("$_widget/DISABLE_REPORT",e):(this.$store.commit("$_widget/ENABLE_REPORT",e),this.fullWidth&&this.getReportData(e)),this.saveState()},getReportSettings(o){let e={};for(let t in this.reportSettings)this.reportSettings.hasOwnProperty(t)&&t!=="overview"&&o===this.reportSettings[t].type&&(e[t]=this.reportSettings[t]);return e},toggleDropdown(){this.dropdownVisible=!this.dropdownVisible},hideDropdown(){this.dropdownVisible=!1},saveState(){this.$store.dispatch("$_widget/saveWidgetState")}}};var Qe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"monsterinsights-widget-dropdown"},[t("button",{staticClass:"monsterinsights-widget-cog",attrs:{"aria-label":e.text_settings_dropdown,"aria-pressed":e.dropdownVisible,type:"button"},on:{click:function(i){return i.stopPropagation(),e.toggleDropdown.apply(null,arguments)}}},[t("i",{staticClass:"monstericon-cog"})]),e.dropdownVisible?t("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.hideDropdown,expression:"hideDropdown"}],staticClass:"monsterinsights-widget-dropdown-content"},[t("widget-settings-compact"),t("span",{domProps:{textContent:e._s(e.text_settings_overview)}}),e._l(e.getReportSettings("overview"),function(i,r){return t("div",{key:r,staticClass:"monsterinsights-widget-setting"},[t("label",{class:i.enabled?"monsterinsights-checked":"",attrs:{tabindex:"0"},on:{click:function(n){return n.preventDefault(),e.toggleReport(n,r)},keyup:[function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.toggleReport(n,r)},function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"space",32,n.key,[" ","Spacebar"])?null:e.toggleReport(n,r)}]}},[t("input",{attrs:{type:"checkbox"},domProps:{checked:i.enabled}}),e._v(" "+e._s(i.name)+" ")])])}),t("span",{domProps:{textContent:e._s(e.text_settings_publisher)}}),e._l(e.getReportSettings("publisher"),function(i,r){return t("div",{key:r,staticClass:"monsterinsights-widget-setting"},[t("label",{directives:[{name:"tooltip",rawName:"v-tooltip.left",value:e.tooltip_data,expression:"tooltip_data",modifiers:{left:!0}}],staticClass:"monsterinsights-faded",attrs:{tabindex:"0"}},[t("input",{attrs:{type:"checkbox"},domProps:{checked:i.enabled}}),e._v(" "+e._s(i.name)+" ")])])}),t("span",{domProps:{textContent:e._s(e.text_settings_ecommerce)}}),e._l(e.getReportSettings("ecommerce"),function(i,r){return t("div",{key:r,staticClass:"monsterinsights-widget-setting"},[t("label",{directives:[{name:"tooltip",rawName:"v-tooltip.left",value:e.tooltip_data,expression:"tooltip_data",modifiers:{left:!0}}],staticClass:"monsterinsights-faded",attrs:{tabindex:"0"}},[t("input",{attrs:{type:"checkbox"},domProps:{checked:i.enabled}}),e._v(" "+e._s(i.name)+" ")])])}),t("widget-settings-hide")],2):e._e()])},et=[],tt=u(Xe,Qe,et,!1,null,null,null,null);const st=tt.exports,{__:W}=wp.i18n,ot={name:"WidgetSettingsWidth",data(){return{normal_sortables:"",widget_element:"",welcome_panel:""}},computed:{...y({widget_width:"$_widget/width",widget_reports:"$_widget/reports"}),fullWidth:{set(o){let e="regular";o&&(e="full"),this.$store.commit("$_widget/UPDATE_WIDTH",e),this.saveState()},get(){return this.widget_width!=="regular"}},tooltip_data(){return{content:this.fullWidth?W("Show in widget mode","google-analytics-for-wordpress"):W("Show in full-width mode","google-analytics-for-wordpress"),autoHide:!1,trigger:"hover focus click"}}},methods:{toggleFullWidth(o){if(o!==!0&&(this.fullWidth=!this.fullWidth),this.fullWidth)this.widget_element.classList.add("monsterinsights-widget-full-width"),this.widget_element.classList.remove("monsterinsights-widget-regular-width"),this.welcome_panel.parentNode.insertBefore(this.widget_element,this.welcome_panel),this.getActiveReportsData();else{if(this.widget_element.classList.add("monsterinsights-widget-regular-width"),o===!0)return;this.widget_element.classList.remove("monsterinsights-widget-full-width"),this.normal_sortables.insertBefore(this.widget_element,this.normal_sortables.firstChild),this.normal_sortables.classList.remove("empty-container")}},getActiveReportsData(){const o=this;let e={};for(let r in this.widget_reports)this.widget_reports.hasOwnProperty(r)&&this.widget_reports[r].enabled&&(e[this.widget_reports[r].type]=1);let t=Object.keys(e).length,i=0;for(let r in e)e.hasOwnProperty(r)&&(i++,o.$store.commit("$_widget/UPDATE_LOADED",!1),this.$store.dispatch("$_reports/getReportData",r).then(function(){i===t&&o.$store.commit("$_widget/UPDATE_LOADED",!0)}))},saveState(){this.$store.dispatch("$_widget/saveWidgetState")}},mounted(){this.widget_element=document.getElementById("monsterinsights_reports_widget"),this.normal_sortables=document.getElementById("normal-sortables"),this.welcome_panel=document.getElementById("dashboard-widgets-wrap")}};var it=function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.tooltip_data,expression:"tooltip_data"}],staticClass:"monsterinsights-width-button",attrs:{"aria-label":e.tooltip_data.content},on:{click:e.toggleFullWidth}},[e.fullWidth?t("i",{staticClass:"monstericon-compress"}):t("i",{staticClass:"monstericon-expand"})])},rt=[],nt=u(ot,it,rt,!1,null,null,null,null);const at=nt.exports,{sprintf:lt}=wp.i18n,ct={name:"WidgetSettings",components:{WidgetSettingsWidth:at,WidgetSettingsReports:st},computed:{selectedIntervalText(){const o=this.$mi.widget_state.interval,e=this.$mi_intervals();return(e[o]||e.last30days).text}},methods:{toggleFullWidth(){this.$refs.width.toggleFullWidth(!0)},sprintf:lt}};var dt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"monsterinsights-widget-settings"},[t("div",{staticClass:"monsterinsights-widget-interval-static",domProps:{textContent:e._s(e.selectedIntervalText)}}),t("widget-settings-width",{ref:"width"}),t("widget-settings-reports")],1)},gt=[],pt=u(ct,dt,gt,!1,null,null,null,null);const ft=pt.exports,{__:C,sprintf:ut}=wp.i18n,ht={name:"WidgetFooter",data(){return{display:!1,text_learn_more:C("Learn More","google-analytics-for-wordpress"),learn_url:null,action_text:null,action_url:null,plugin_name:null}},created(){if(this.display=!0,this.action_url=this.$mi.userfeedback_url,this.plugin_name="User Feedback",this.learn_url="https://userfeedback.com/",!this.$mi.userfeedback_installed){this.action_text=C("Install","google-analytics-for-wordpress");return}if(!this.$mi.userfeedback_enabled){this.action_text=C("Activate","google-analytics-for-wordpress");return}if(this.plugin_name="WPForms",this.action_url=this.$mi.wpforms_url,this.learn_url="https://wpforms.com/",!this.$mi.wpforms_installed){this.action_text=C("Install","google-analytics-for-wordpress");return}if(!this.$mi.wpforms_enabled){this.action_text=C("Activate","google-analytics-for-wordpress");return}this.display=!1},computed:{showRecommended(){return this.display},getRecommendedText(){return ut('%1$s <span class="monsterinsights-dark">%2$s</span>',C("Recommended Plugin:","google-analytics-for-wordpress"),this.plugin_name)}}};var mt=function(){var e=this,t=e._self._c;return e.showRecommended?t("div",{staticClass:"monsterinsights-widget-footer"},[t("span",{domProps:{innerHTML:e._s(e.getRecommendedText)}}),t("span",[e._v(" - ")]),t("a",{attrs:{href:e.action_url},domProps:{textContent:e._s(e.action_text)}}),t("a",{attrs:{href:e.learn_url,target:"_blank"},domProps:{textContent:e._s(e.text_learn_more)}})]):e._e()},wt=[],_t=u(ht,mt,wt,!1,null,null,null,null);const yt=_t.exports,{__:vt}=wp.i18n,bt={name:"ModuleDashboardWidget",components:{ReportReAuth:j,WidgetFooter:yt,WidgetSettings:ft,WidgetAccordion:Ue},data(){return{text_overview_report:vt("Overview Report","google-analytics-for-wordpress")}},computed:{...y({blocked:"$_app/blocked",blur:"$_reports/blur",widget_width:"$_widget/width",compact:"$_widget/compact",reauth:"$_reports/reauth"}),route(){return this.$route.name},mainClass(){let o="monsterinsights-dashboard-widget-page";return this.blur&&(o+=" monsterinsights-blur"),this.compact&&(o+=" monsterinsights-dashboard-widget-compact"),o},fullWidth(){return this.widget_width!=="regular"}},created(){const o="$_reports";o in this.$store._modules.root._children||this.$store.registerModule(o,K);const e="$_widget";e in this.$store._modules.root._children||this.$store.registerModule(e,be)},mounted(){this.$store.dispatch("$_widget/processDefaults").then(()=>{this.$nextTick(()=>{this.$refs.settings.toggleFullWidth(!0)})})}};var xt=function(){var e=this,t=e._self._c;return t("div",{class:e.mainClass},[t("widget-settings",{ref:"settings"}),e.reauth?t("report-re-auth"):t("widget-accordion"),e.fullWidth?t("div",{staticClass:"monsterinsights-fullwidth-mascot"}):e._e(),e.fullWidth?t("div",{staticClass:"monsterinsights-fullwidth-report-title",domProps:{textContent:e._s(e.text_overview_report)}}):e._e(),e.fullWidth?e._e():t("widget-footer")],1)},Ct=[],$t=u(bt,xt,Ct,!1,null,null,null,null);const Rt=$t.exports;const{__:P}=wp.i18n,kt={name:"WidgetReminder",data(){return{notifications:[],icons:{default:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="16" fill="#D3F8EA"/><path d="M21.8634 18.6429C21.8634 18.8571 21.7831 19.0268 21.6224 19.1518C21.5688 19.3482 21.542 19.6786 21.542 20.1429C21.542 20.6071 21.5688 20.9375 21.6224 21.1339C21.7831 21.2768 21.8634 21.4464 21.8634 21.6429V22.0714C21.8634 22.25 21.8009 22.4018 21.6759 22.5268C21.5509 22.6518 21.3992 22.7143 21.2206 22.7143H12.4349C11.7206 22.7143 11.1134 22.4643 10.6134 21.9643C10.1134 21.4643 9.86345 20.8571 9.86345 20.1429V11.5714C9.86345 10.8571 10.1134 10.25 10.6134 9.75C11.1134 9.25 11.7206 9 12.4349 9H21.2206C21.3992 9 21.5509 9.0625 21.6759 9.1875C21.8009 9.3125 21.8634 9.46429 21.8634 9.64286V18.6429ZM13.292 12.5893V13.125C13.292 13.2321 13.3456 13.2857 13.4527 13.2857H19.1313C19.2384 13.2857 19.292 13.2321 19.292 13.125V12.5893C19.292 12.4821 19.2384 12.4286 19.1313 12.4286H13.4527C13.3456 12.4286 13.292 12.4821 13.292 12.5893ZM13.292 14.3036V14.8393C13.292 14.9464 13.3456 15 13.4527 15H19.1313C19.2384 15 19.292 14.9464 19.292 14.8393V14.3036C19.292 14.1964 19.2384 14.1429 19.1313 14.1429H13.4527C13.3456 14.1429 13.292 14.1964 13.292 14.3036ZM20.0688 21C20.0152 20.4286 20.0152 19.8571 20.0688 19.2857H12.4349C12.2027 19.2857 11.9974 19.375 11.8188 19.5536C11.6581 19.7143 11.5777 19.9107 11.5777 20.1429C11.5777 20.375 11.6581 20.5804 11.8188 20.7589C11.9974 20.9196 12.2027 21 12.4349 21H20.0688Z" fill="#1EC185"/></svg>',star:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="16" fill="#D4E7F7"/><path d="M15.0867 9.48214C15.2474 9.16071 15.5063 9 15.8634 9C16.2206 9 16.4795 9.16071 16.6402 9.48214L18.3813 13.0179L22.292 13.6071C22.6492 13.6429 22.8813 13.8304 22.9884 14.1696C23.0956 14.5089 23.0242 14.8036 22.7742 15.0536L19.9349 17.8125L20.6045 21.7232C20.6581 22.0625 20.542 22.3304 20.2563 22.5268C19.9706 22.7411 19.6759 22.7679 19.3724 22.6071L15.8634 20.7857L12.3545 22.6071C12.0509 22.7857 11.7563 22.7679 11.4706 22.5536C11.1849 22.3393 11.0688 22.0625 11.1224 21.7232L11.792 17.8125L8.95274 15.0536C8.70274 14.8036 8.63131 14.5089 8.73845 14.1696C8.84559 13.8304 9.07774 13.6429 9.43488 13.6071L13.3456 13.0179L15.0867 9.48214Z" fill="#2679C1"/></svg>',warning:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="16" fill="#FAD1D1"/><path d="M17.3634 19.0714C17.792 19.4821 18.0063 19.9821 18.0063 20.5714C18.0063 21.1607 17.792 21.6607 17.3634 22.0714C16.9527 22.5 16.4527 22.7143 15.8634 22.7143C15.2742 22.7143 14.7652 22.5 14.3367 22.0714C13.9259 21.6607 13.7206 21.1607 13.7206 20.5714C13.7206 19.9821 13.9259 19.4821 14.3367 19.0714C14.7652 18.6429 15.2742 18.4286 15.8634 18.4286C16.4527 18.4286 16.9527 18.6429 17.3634 19.0714ZM13.9617 9.66964C13.9617 9.49107 14.0242 9.33929 14.1492 9.21429C14.2742 9.07143 14.4259 9 14.6045 9H17.1224C17.3009 9 17.4527 9.07143 17.5777 9.21429C17.7027 9.33929 17.7652 9.49107 17.7652 9.66964L17.3902 16.9554C17.3902 17.1339 17.3277 17.2857 17.2027 17.4107C17.0777 17.5179 16.9259 17.5714 16.7474 17.5714H14.9795C14.8009 17.5714 14.6492 17.5179 14.5242 17.4107C14.3992 17.2857 14.3367 17.1339 14.3367 16.9554L13.9617 9.66964Z" fill="#EB5757"/></svg>',lightning:'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="16" cy="16" r="16" fill="#E1DAF1"/><path d="M20.0331 13.2857C20.2831 13.2857 20.4706 13.3929 20.5956 13.6071C20.7206 13.8214 20.7206 14.0357 20.5956 14.25L15.8813 22.3929C15.7563 22.6071 15.5688 22.7143 15.3188 22.7143C15.1045 22.7143 14.9349 22.6339 14.8099 22.4732C14.6849 22.3125 14.6492 22.125 14.7027 21.9107L15.9349 16.7143H12.7474C12.6224 16.7143 12.5063 16.6786 12.3992 16.6071C12.292 16.5357 12.2117 16.4464 12.1581 16.3393C12.1045 16.2321 12.0867 16.1161 12.1045 15.9911L12.9617 9.5625C12.9795 9.45536 13.0152 9.35714 13.0688 9.26786C13.1402 9.17857 13.2206 9.11607 13.3099 9.08036C13.3992 9.02679 13.4974 9 13.6045 9H17.4617C17.6759 9 17.8456 9.08929 17.9706 9.26786C18.0956 9.42857 18.1313 9.60714 18.0777 9.80357L16.9527 13.2857H20.0331Z" fill="#6F4BBB"/></svg>'},text_expired_license:{title:P("Your MonsterInsights license key has expired.","google-analytics-for-wordpress"),content:P("Renew today to ensure Google Analytics continues to track properly.","google-analytics-for-wordpress"),btn:{text:P("Click here.","google-analytics-for-wordpress"),url:this.$getUrl("vue-admin-notification","expired-license","https://www.monsterinsights.com/my-account/")}},elem_id_expired_license:"expired-license-notice",showLoader:!1}},computed:{...y({license:"$_license/license",license_network:"$_license/license_network"})},mounted(){this.getNotifications(),this.checkExpiredLicenseNoticeStatus()},methods:{async getNotifications(){const o=await Q.fetchNotifications();return o?this.notifications=o.notifications:!1},hideNotice(o){let e=this;this.showLoader=!0,this.$store.dispatch("$_notifications/dismissNotification",o).then(()=>{e.getNotifications(),this.showLoader=!1})},isLicenseExpired(){return this.license!=="undefined"?this.license.is_expired:!1},isNetworkLicenseExpired(){return this.license_network!=="undefined"?this.license_network.is_expired:!1},showExpiredLicenseNotice(){const o=localStorage.getItem("hideExpiredLicenseNotice");return!(o&&parseInt(o)===1)},hideExpiredNotice(o){const e=$($().tz(this.$mi.timezone).format("YYYY-MM-DD"));localStorage.setItem("hideExpiredLicenseNotice",1),localStorage.setItem("hideExpiredLicenseNoticeTime",e);let t=document.getElementById(o);t.style.display="none"},checkExpiredLicenseNoticeStatus(){const o=localStorage.getItem("hideExpiredLicenseNoticeTime");o&&$($().tz(this.$mi.timezone).format("YYYY-MM-DD")).diff(o)>=1&&(localStorage.removeItem("hideExpiredLicenseNotice"),localStorage.removeItem("hideExpiredLicenseNoticeTime"))}}};var Tt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"monsterinsights-reminder-widget-container"},[e.isLicenseExpired()||e.isNetworkLicenseExpired()?t("transition",{attrs:{name:"monsterinsights-slide-up"}},[e.showExpiredLicenseNotice()?t("div",{attrs:{id:e.elem_id_expired_license}},[t("div",{staticClass:"monsterinsights-reminder-widget"},[t("div",{staticClass:"monsterinsights-tracking-notice"},[t("div",{staticClass:"monsterinsights-tracking-notice-icon"},[t("div",{domProps:{innerHTML:e._s(e.icons.warning)}})]),t("div",{staticClass:"monsterinsights-tracking-notice-text"},[t("h3",{domProps:{textContent:e._s(e.text_expired_license.title)}}),t("p",[t("span",{domProps:{innerHTML:e._s(e.text_expired_license.content)}}),t("br"),t("br"),t("span",[t("a",{staticClass:"monsterinsights-reminder-notice-links",attrs:{target:"_blank",href:e.text_expired_license.btn.url,title:e.text_expired_license.btn.text}},[e._v(" "+e._s(e.text_expired_license.btn.text)+" ")])])])]),t("div",{staticClass:"monsterinsights-tracking-notice-close",on:{click:function(i){return e.hideExpiredNotice(e.elem_id_expired_license)}}},[e._v(" × ")])])])]):e._e()]):e._e(),e.notifications?t("div",[e.showLoader?t("div",{staticClass:"monsterinsights-notice-closing-loader"}):e._e(),t("TransitionGroup",{attrs:{name:"monsterinsights-slide-up",tag:"div"}},e._l(e.notifications,function(i,r){return t("div",{key:r,staticClass:"monsterinsights-reminder-widget"},[t("div",{staticClass:"monsterinsights-tracking-notice"},[t("div",{staticClass:"monsterinsights-tracking-notice-icon"},[t("div",{domProps:{innerHTML:e._s(e.icons[i.icon])}})]),t("div",{staticClass:"monsterinsights-tracking-notice-text"},[t("h3",{domProps:{textContent:e._s(i.title)}}),t("p",[t("span",{domProps:{innerHTML:e._s(i.content)}}),t("br"),i.btns?t("span",e._l(i.btns,function(n,l){return t("a",{key:l,staticClass:"monsterinsights-reminder-notice-links",attrs:{target:n.is_external?"_blank":"_self",href:n.url},domProps:{textContent:e._s(n.text)},on:{click:function(g){return e.hideNotice(i.id)}}})}),0):e._e()])]),t("div",{staticClass:"monsterinsights-tracking-notice-close",on:{click:function(n){return e.hideNotice(i.id)}}},[e._v(" × ")])])])}),0)],1):e._e()],1)},Dt=[],Pt=u(kt,Tt,Dt,!1,null,null,null,null);const St=Pt.exports,{__:s,sprintf:Et}=wp.i18n,H={install(o){const e=this;o.prototype.$miOverviewTooltips=function(t){if(!t.title)return document.querySelectorAll(".monsterinsights-line-chart-tooltip").forEach(function(R){R.style.opacity=0}),!1;let i=t.title[0],r=t.title[1],n=parseInt(t.title[2]),l=t.title[3],g=t.title[4]?t.title[4]:t.title[2],m=t.title[5]?t.title[5]:[],d=document.getElementById("monsterinsights-chartjs-line-"+g+"-tooltip");if(d===null&&(d=document.createElement("div"),document.body.appendChild(d),d.setAttribute("id","monsterinsights-chartjs-line-"+g+"-tooltip"),d.classList.add("monsterinsights-line-chart-tooltip")),!t.opacity){d.style.opacity=0;return}d.classList.remove("above"),d.classList.remove("below"),d.classList.remove("no-transform"),t.yAlign?d.classList.add(t.yAlign):d.classList.add("no-transform");let w="";n&&(n===0?w+="0%":n>0?w+='<span class="monsterinsights-green"><span class="monsterinsights-arrow monsterinsights-up"></span> '+n+"%</span>":w+='<span class="monsterinsights-red"><span class="monsterinsights-arrow monsterinsights-down"></span> '+Math.abs(n)+"%</span>");let p='<div class="monsterinsights-reports-overview-datagraph-tooltip-container monsterinsights-reports-tooltip">';p+='<div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+r+"</div>",p+='<div class="monsterinsights-reports-overview-datagraph-tooltip-trend">'+w+"</div>",l&&(p+='<div class="monsterinsights-reports-overview-datagraph-tooltip-descriptor">'+l+"</div>"),p+='<div class="monsterinsights-reports-overview-datagraph-tooltip-title">'+i+"</div>",m&&(p+="<hr>",m.forEach(v=>{v.title&&(p+=v.title+"<br>")})),p+="</div>",d.innerHTML=p;const b=this._chart.canvas.getBoundingClientRect();d.style.opacity="1",d.style.left=b.left+window.pageXOffset+t.x+"px",d.style.top=b.top+window.pageYOffset+t.y+"px",d.style.fontFamily="Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;",d.style.fontSize=t.fontSize,d.style.fontStyle=t._fontStyle,d.style.padding=t.yPadding+"px "+t.xPadding+"px",d.style.zIndex=99999,d.style.pointerEvents="none"},o.prototype.$miPieTooltips=function(t){if(!t.title)return document.querySelectorAll(".monsterinsights-pie-chart-tooltip").forEach(function(d){d.style.opacity=0}),!1;let i=t.title[0],r=t.title[1],n=t.title[2],l=document.getElementById("monsterinsights-chartjs-pie-"+n+"-tooltip");l===null&&(l=document.createElement("div"),document.body.appendChild(l),l.setAttribute("id","monsterinsights-chartjs-pie-"+n+"-tooltip")),l.classList.remove("above"),l.classList.remove("below"),l.classList.remove("no-transform"),t.yAlign?l.classList.add(t.yAlign):l.classList.add("no-transform");let g='<div class="monsterinsights-reports-overview-datagraph-tooltip-container monsterinsights-reports-doughnut-tooltip">';g+='<div class="monsterinsights-reports-overview-datagraph-tooltip-title">'+r+"%</div>",g+='<div class="monsterinsights-reports-overview-datagraph-tooltip-number">'+i+"</div>",g+="</div>",l.innerHTML=g,l.style.opacity=1,l.style.padding=t.yPadding+"px "+t.xPadding+"px",l.style.zIndex="99999"},o.prototype.$mi_loading_toast=function(t,i=!0){let r="monsterinsights-swal monsterinsights-swal-loading";(window.scrollY>0||i)&&(r+=" monsterinsights-swal-full-height"),o.prototype.$swal({customClass:{container:r},icon:"info",title:t||s("Loading new report data","google-analytics-for-wordpress"),html:s("Please wait...","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,loaderHtml:e.getCustomLoaderHtml(),didOpen:function(){o.prototype.$swal.showLoading()}})},o.prototype.$mi_success_toast=function(t){let{toast:i=!0,position:r="top-end",showConfirmButton:n=!1,icon:l="success",timer:g=3e3,customClass:m="mi-success",showCloseButton:d=!0,title:w=s("Settings Updated","google-analytics-for-wordpress"),showCancelButton:p=!1,confirmButtonText:b="",cancelButtonText:v="",text:R=""}=t;return o.prototype.$swal({customClass:{container:"monsterinsights-swal "+(m||"")},toast:i,position:r,showConfirmButton:n,icon:l,showCloseButton:d,title:w,timer:g,showCancelButton:p,confirmButtonText:b,cancelButtonText:v,text:R,showClass:{popup:""},hideClass:{popup:""}})},o.prototype.$mi_error_toast=function(t){let i=s("Continue %s","google-analytics-for-wordpress"),{icon:r="error",customContainerClass:n="monsterinsights-swal monsterinsights-swal-succcess",allowOutsideClick:l=!1,allowEscapeKey:g=!1,allowEnterKey:m=!1,title:d=s("Error","google-analytics-for-wordpress"),html:w=s("Please try again.","google-analytics-for-wordpress"),confirmButtonText:p=Et(i,'<i class="monstericon-long-arrow-right-light"></i>'),showCancelButton:b=!1,cancelButtonText:v="Cancel",footer:R=!1}=t;return o.prototype.$swal({icon:r,customClass:{container:n},allowOutsideClick:l,allowEscapeKey:g,allowEnterKey:m,title:d,html:'<div class="monsterinsights-swal-icons"><i class="monstericon-exclamation-em-solid"></i><i class="monstericon-exclamation-em-solid"></i><i class="monstericon-exclamation-em-solid"></i><i class="monstericon-exclamation-em-solid"></i></div><p>'+w+"</p>",footer:R,showCancelButton:b,cancelButtonText:v,confirmButtonText:p,didOpen:function(){o.prototype.$swal.hideLoading()}})},o.prototype.$mi_get_upsell_content=function(t){let i={};const r={overview:{mainheading:s("Publishers Report","google-analytics-for-wordpress"),title:s("Improve Your Conversion Rate With Insights Into Which Content Works Best.","google-analytics-for-wordpress"),subtitle:s("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:[s("Top Landing Pages","google-analytics-for-wordpress"),s("Top Affilliate Links","google-analytics-for-wordpress"),s("Top Exit Pages","google-analytics-for-wordpress"),s("Top Download Links","google-analytics-for-wordpress"),s("Top Outbound Links","google-analytics-for-wordpress"),s("Scroll Depth","google-analytics-for-wordpress")]},publisher:{mainheading:s("Publishers Report","google-analytics-for-wordpress"),title:s("Improve Your Conversion Rate With Insights Into Which Content Works Best.","google-analytics-for-wordpress"),features:[s("Top Landing Pages","google-analytics-for-wordpress"),s("Top Affilliate Links","google-analytics-for-wordpress"),s("Top Exit Pages","google-analytics-for-wordpress"),s("Top Download Links","google-analytics-for-wordpress"),s("Top Outbound Links","google-analytics-for-wordpress"),s("Scroll Depth","google-analytics-for-wordpress")]},engagement_pages:{mainheading:s("Pages Report","google-analytics-for-wordpress"),title:s("View the most popular pages on your website.","google-analytics-for-wordpress"),features:[s("Page Name","google-analytics-for-wordpress"),s("New Sessions","google-analytics-for-wordpress"),s("Sessions","google-analytics-for-wordpress"),s("Bounce Rate","google-analytics-for-wordpress"),s("Engaged Sessions","google-analytics-for-wordpress"),s("Exits","google-analytics-for-wordpress")]},ecommerce:{mainheading:s("eCommerce Report","google-analytics-for-wordpress"),title:s("Increase Sales and Make More Money With Enhanced eCommerce Insights.","google-analytics-for-wordpress"),features:[s("10+ eCommerce Integrations","google-analytics-for-wordpress"),s("Average Order Value","google-analytics-for-wordpress"),s("Total Revenue","google-analytics-for-wordpress"),s("Sessions to Purchase","google-analytics-for-wordpress"),s("Top Conversion Sources","google-analytics-for-wordpress"),s("Top Products","google-analytics-for-wordpress"),s("Number of Transactions","google-analytics-for-wordpress"),s("Time to Purchase","google-analytics-for-wordpress")]},ecommerce_funnel:{mainheading:s("eCommerce Funnel Report","google-analytics-for-wordpress"),title:s("Visually see how customers move through your eCommerce website to make a purchase.","google-analytics-for-wordpress"),features:[s("Step by Step Funnel View","google-analytics-for-wordpress"),s("Conversion Rates","google-analytics-for-wordpress"),s("Breakdowns by Devices","google-analytics-for-wordpress"),s("Abandonment Rates","google-analytics-for-wordpress"),s("Breakdowns by Channel","google-analytics-for-wordpress"),s("Date Picker","google-analytics-for-wordpress")]},ecommerce_coupons:{mainheading:s("Coupon Report","google-analytics-for-wordpress"),title:s("Learn which coupons are generating the most sales for your store.","google-analytics-for-wordpress"),features:[s("Coupons","google-analytics-for-wordpress"),s("Average Order Value","google-analytics-for-wordpress"),s("Total Revenue","google-analytics-for-wordpress"),s("Sessions to Purchase","google-analytics-for-wordpress"),s("Top Conversion Sources","google-analytics-for-wordpress"),s("Top Products","google-analytics-for-wordpress"),s("Number of Transactions","google-analytics-for-wordpress"),s("Time to Purchase","google-analytics-for-wordpress")]},dimensions:{mainheading:s("Dimensions Report","google-analytics-for-wordpress"),title:s("Increase Engagement and Unlock New Insights About Your Site.","google-analytics-for-wordpress"),features:[s("Author Tracking","google-analytics-for-wordpress"),s("User ID Tracking","google-analytics-for-wordpress"),s("Post Types","google-analytics-for-wordpress"),s("Tag Tracking","google-analytics-for-wordpress"),s("Categories","google-analytics-for-wordpress"),s("SEO Scores","google-analytics-for-wordpress"),s("Publish Times","google-analytics-for-wordpress"),s("Focus Keywords","google-analytics-for-wordpress")]},forms:{mainheading:s("Forms Report","google-analytics-for-wordpress"),title:s("Track Every Type of Web Form and Gain Visibility Into Your Customer Journey.","google-analytics-for-wordpress"),columns:1,features:[s("Conversion Counts","google-analytics-for-wordpress"),s("Impression Counts","google-analytics-for-wordpress"),s("Conversion Rates","google-analytics-for-wordpress")]},queries:{mainheading:s("Search Console Report","google-analytics-for-wordpress"),title:s("See Exactly How Visitors Find Your Website From Google.","google-analytics-for-wordpress"),columns:1,features:[s("Top Google Search Terms","google-analytics-for-wordpress"),s("Number of Clicks","google-analytics-for-wordpress"),s("Click-through Ratio","google-analytics-for-wordpress"),s("Average Results Position","google-analytics-for-wordpress")]},realtime:{mainheading:s("Realtime Report","google-analytics-for-wordpress"),title:s("See Who And What is Happening on Your Website in Realtime.","google-analytics-for-wordpress"),features:[s("Top Page Views","google-analytics-for-wordpress"),s("Current Active Users","google-analytics-for-wordpress"),s("Top Referral Sources","google-analytics-for-wordpress"),s("Pageviews Per Minute","google-analytics-for-wordpress"),s("Top Countries","google-analytics-for-wordpress"),s("Top Cities","google-analytics-for-wordpress")]},sitespeed:{mainheading:s("Site Speed Report","google-analytics-for-wordpress"),title:s("Improve Your User Experience and Improve Search Engine Rankings.","google-analytics-for-wordpress"),features:[s("Overall Site Speed Score","google-analytics-for-wordpress"),s("Server Response Times","google-analytics-for-wordpress"),s("Mobile and Desktop Scores","google-analytics-for-wordpress"),s("First Contentful Paint","google-analytics-for-wordpress"),s("Automatic Recommendations","google-analytics-for-wordpress"),s("Total Blocking Time","google-analytics-for-wordpress"),s("On-Demand Audits","google-analytics-for-wordpress"),s("Time to Interactive","google-analytics-for-wordpress")]},traffic:{mainheading:s("Traffic Report","google-analytics-for-wordpress"),title:s("Learn how visitors arrive to your website and which are the most engaged or profitable.","google-analytics-for-wordpress"),features:[s("Channel Breakdowns","google-analytics-for-wordpress"),s("Session Counts","google-analytics-for-wordpress"),s("Pages/Session","google-analytics-for-wordpress"),s("Conversion Rate","google-analytics-for-wordpress"),s("Revenue","google-analytics-for-wordpress"),s("Engaged Sessions","google-analytics-for-wordpress")]},traffic_landing_pages:{mainheading:s("Landing Page Report","google-analytics-for-wordpress"),title:s("Find out which pages are making your first impression.","google-analytics-for-wordpress"),features:[s("Page Name","google-analytics-for-wordpress"),s("Pages/Session","google-analytics-for-wordpress"),s("Sessions","google-analytics-for-wordpress"),s("Purchases","google-analytics-for-wordpress"),s("Session Counts","google-analytics-for-wordpress"),s("Conversion Rates","google-analytics-for-wordpress")]},traffic_technology:{mainheading:s("Technology Report","google-analytics-for-wordpress"),title:s("Optimize your website for your top devices and browsers.","google-analytics-for-wordpress"),features:[s("Browser Names","google-analytics-for-wordpress"),s("Device Types","google-analytics-for-wordpress"),s("Export to PDF","google-analytics-for-wordpress"),s("Date Filtering","google-analytics-for-wordpress")]},traffic_campaign:{mainheading:s("Campaigns Report","google-analytics-for-wordpress"),title:s("Measure how effective your marketing campaigns are performing.","google-analytics-for-wordpress"),features:[s("Campaign Names","google-analytics-for-wordpress"),s("Easy Filtering","google-analytics-for-wordpress"),s("Pages / Session","google-analytics-for-wordpress"),s("Purchases","google-analytics-for-wordpress"),s("eCommerce Conversion Rates","google-analytics-for-wordpress"),s("Revenue","google-analytics-for-wordpress")]},traffic_source_medium:{mainheading:s("Source and Medium Report","google-analytics-for-wordpress"),title:s("Uncover which traffic sources are creating engagement and sales from your website.","google-analytics-for-wordpress"),features:[s("Source Name","google-analytics-for-wordpress"),s("Pages / Sessions","google-analytics-for-wordpress"),s("Session Counts","google-analytics-for-wordpress"),s("Purchases","google-analytics-for-wordpress"),s("Easy Filtering","google-analytics-for-wordpress"),s("Conversion Rates","google-analytics-for-wordpress")]},traffic_social:{mainheading:s("Social Media Report","google-analytics-for-wordpress"),title:s("See Which Social Media Networks are Making You Money.","google-analytics-for-wordpress"),features:[s("Social Networks","google-analytics-for-wordpress"),s("Sessions","google-analytics-for-wordpress"),s("Bounce Rate","google-analytics-for-wordpress"),s("Purchases","google-analytics-for-wordpress"),s("Revenue","google-analytics-for-wordpress"),s("Conversion Rate","google-analytics-for-wordpress")]},media:{mainheading:s("Media Report","google-analytics-for-wordpress"),title:s("Easily See Which Videos Are Most Popular.","google-analytics-for-wordpress"),features:[s("Videos Plays, Average Duration, and Completions","google-analytics-for-wordpress"),s("Works with YouTube, Vimeo, and HTML 5 Videos","google-analytics-for-wordpress"),s("Compare stats over time","google-analytics-for-wordpress")]},exceptions:{mainheading:s("Exceptions Report","google-analytics-for-wordpress"),title:s("Be Notified About Important Website Events","google-analytics-for-wordpress"),features:[s("Traffic Changes","google-analytics-for-wordpress"),s("Conversion Rate Changes","google-analytics-for-wordpress"),s("Revenue Changes","google-analytics-for-wordpress"),s("Landing Page Changes","google-analytics-for-wordpress"),s("Engagement Rates","google-analytics-for-wordpress"),s("Email Notifications","google-analytics-for-wordpress"),s("Campaign Alerts","google-analytics-for-wordpress"),s("Site Notes Integration","google-analytics-for-wordpress")]},ai_insights:{mainheading:s("AI Insights","google-analytics-for-wordpress"),title:s("Get Actionable Insights with the Power of AI","google-analytics-for-wordpress"),features:[s("On Demand Insights","google-analytics-for-wordpress"),s("Traffic Insights","google-analytics-for-wordpress"),s("Visitor Insights","google-analytics-for-wordpress"),s("Campaign Insights","google-analytics-for-wordpress"),s("Store Insights","google-analytics-for-wordpress"),s("Form Insights","google-analytics-for-wordpress")]},ai_insights_chat:{mainheading:s("Conversations AI","google-analytics-for-wordpress"),title:s("Chat with your website’s analytics, no experience needed.","google-analytics-for-wordpress"),features:[s("Get insights about your website by simply asking","google-analytics-for-wordpress"),s("Ask for specific metrics or trends over time","google-analytics-for-wordpress"),s("Understand your marketing ROI","google-analytics-for-wordpress"),s("Create charts and graphs for easy analysis","google-analytics-for-wordpress"),s("Pin and save your conversations for later use","google-analytics-for-wordpress")]}};return r[t]&&(i=r[t]),i},o.prototype.$mi_intervals=function(){return B}},getCustomLoaderHtml(){return'<div class="monsterinsights-roller"><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>'}},{__:A}=wp.i18n,Y={install(o,{store:e}){o.prototype.$mi_loading_toast=function(){},o.prototype.$mi_error_toast=function(t){let{icon:i="error",customContainerClass:r="monsterinsights-swal",allowOutsideClick:n=!1,allowEscapeKey:l=!1,allowEnterKey:g=!1,title:m=A("Error","google-analytics-for-wordpress"),html:d=A("Please try again.","google-analytics-for-wordpress"),footer:w=!1,report:p="general"}=t;t={icon:i,customClass:{container:r},allowOutsideClick:n,allowEscapeKey:l,allowEnterKey:g,title:m,html:d,footer:w,report:p},e.commit("$_widget/SET_ERROR",{report:p,title:t.title,content:t.html,footer:t.footer})},o.prototype.$mi_intervals=function(){return B}}};const I=document.getElementById("monsterinsights-dashboard-widget"),N=document.getElementById("monsterinsights-reminder-notice");a.config.productionTip=!1;I&&({}.NODE_ENV!=="production"&&(a.config.devtools=!0,a.config.performance=!0),V({ctrl:!0}),a.use(M),a.use(z),a.use(G,{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"}),a.use(F),a.use(H),a.use(Y,{store:_}),new a({store:_,mounted:()=>{_.dispatch("$_app/init"),_.dispatch("$_license/getLicense"),_.dispatch("$_queue/add",()=>_.dispatch("$_notifications/getNotifications"))},render:o=>o(Rt)}).$mount(I));N&&(a.use(M),a.use(F),a.use(H),a.use(Y,{store:_}),new a({store:_,mounted:()=>{_.dispatch("$_app/init"),_.dispatch("$_license/getLicense")},render:o=>o(St)}).$mount(N));