/home/arranoyd/www/wp-content/plugins/google-analytics-for-wordpress/lite/assets/vue/js/frontend.js
(function(t){function e(e){for(var r,a,i=e[0],l=e[1],c=e[2],d=0,p=[];d<i.length;d++)a=i[d],o[a]&&p.push(o[a][0]),o[a]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(t[r]=l[r]);u&&u(e);while(p.length)p.shift()();return s.push.apply(s,c||[]),n()}function n(){for(var t,e=0;e<s.length;e++){for(var n=s[e],r=!0,i=1;i<n.length;i++){var l=n[i];0!==o[l]&&(r=!1)}r&&(s.splice(e--,1),t=a(a.s=n[0]))}return t}var r={},o={frontend:0},s=[];function a(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=r,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)a.d(n,r,function(e){return t[e]}.bind(null,r));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="";var i=window["monsterinsightsjsonp"]=window["monsterinsightsjsonp"]||[],l=i.push.bind(i);i.push=e,i=i.slice();for(var c=0;c<i.length;c++)e(i[c]);var u=l;s.push([4,"chunk-frontend-vendors","chunk-common"]),n()})({4:function(t,e,n){t.exports=n("d67f")},d67f:function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"monsterinsights-adminbar-menu-item",attrs:{id:"wp-admin-bar-monsterinsights_frontend_button"}},[n("div",{class:t.toggleButtonClass,domProps:{innerHTML:t._s(t.text_insights)},on:{click:t.toggleStatsVisibility}}),t.statsVisible?n("div",{staticClass:"monsterinsights-frontend-stats"},[t.noauth?n("frontend-no-auth"):t.error?n("widget-report-error",{attrs:{error:t.error}}):n("frontend-stats-content"),t.loaded?t._e():n("div",{staticClass:"monsterinsights-frontend-stats-loading"},[n("span",{staticClass:"monsterinsights-frontend-spinner"})]),n("frontend-powered-by")],1):t._e()])},o=[],s=(n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b"),n("fc11")),a=(n("d3b7"),n("bc3a")),i=n.n(a),l=n("2b0e"),c=function(t){return new Promise((function(e){var n=new FormData,r=l["a"].prototype.$mi.page_id?l["a"].prototype.$mi.page_id:window.location.pathname;n.append("action","monsterinsights_pageinsights_refresh_report"),n.append("security",l["a"].prototype.$mi.nonce),n.append("report","pageinsights"),n.append("post_id",r),n.append("json",1),i.a.post(l["a"].prototype.$mi.ajax,n).then((function(t){e(t.data)})).catch((function(e){t.dispatch("$_app/block",!1,{root:!0}),e.response}))}))},u={fetchReportData:c},d=function(t){return new Promise((function(e){u.fetchReportData(t).then((function(n){"license_level"!==n.data.message?n.success?(t.commit("UPDATE_REPORT_DATA",{report:"pageinsights",data:n.data}),e(!0)):(l["a"].prototype.$mi_error_toast(!1,n.data.message,n.data.footer),e(!1)):e(!1)}))}))},p={getReportData:d},f=function(t){return t.date},g=function(t){return t.pageinsights},b=function(t){return t.loaded},h=function(t){return t.error},m=function(t){return t.noauth},_={date:f,pageinsights:g,loaded:b,error:h,noauth:m},v=function(t,e){e.report&&e.data&&t[e.report]&&l["a"].set(t,e.report,e.data)},y=function(t,e){e.start&&e.end&&(l["a"].set(t.date,"start",e.start),l["a"].set(t.date,"end",e.end))},w=function(t,e){l["a"].set(t.date,"interval",e)},O=function(t,e){t.loaded=e},j=function(t,e){t.error=e},x=function(t){t.noauth=!0,t.loaded=!0},P={UPDATE_REPORT_DATA:v,UPDATE_DATE:y,UPDATE_INTERVAL:w,UPDATE_LOADED:O,SET_ERROR:j,ENABLE_NOAUTH:x},$={loaded:!1,pageinsights:{},error:!1,noauth:!1},E={namespaced:!0,state:$,actions:p,getters:_,mutations:P},C=n("561c"),D=n("2f62"),S=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"monsterinsights-content-lite"},[n("frontend-stats-general")],1)},A=[],T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.overview.infobox?n("div",{staticClass:"monsterinsights-frontend-stats-inner"},[n("frontend-stats-column",{attrs:{label:t.text_insights_for,value:t.text_your_website}}),n("frontend-stats-column",{attrs:{label:t.text_sessions,value:t.overview.infobox.sessions.value}}),n("frontend-stats-column",{attrs:{label:t.text_pageviews,value:t.overview.infobox.pageviews.value}}),n("frontend-stats-column",{attrs:{label:t.text_session_duration,value:t.overview.infobox.duration.value}}),n("frontend-stats-column",{attrs:{label:t.text_bounce_rate,value:t.overview.infobox.bounce.value}}),n("frontend-stats-column",{attrs:{label:t.text_upsell_title}},[n("frontend-upsell")],1)],1):t._e()},R=[],U=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.columnClass},[t.label?n("div",{staticClass:"monsterinsights-stats-label",domProps:{textContent:t._s(t.label)}}):t._e(),t.value?n("div",{staticClass:"monsterinsights-stats-value",domProps:{innerHTML:t._s(t.value)}}):t._e(),t._t("default")],2)},M=[],F={name:"FrontendStatsColumn",props:{extraClass:{type:String,default:""},label:String,value:String},computed:{columnClass:function(){return"monsterinsights-stats-column "+this.extraClass}}},k=F,L=n("2877"),I=Object(L["a"])(k,U,M,!1,null,null,null),B=I.exports,V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a",{staticClass:"monsterinsights-button",attrs:{href:t.upgradeUrl},domProps:{textContent:t._s(t.text_button)}})},N=[],W={name:"FrontendUpsell",data:function(){return{text_button:Object(C["a"])("Upgrade to PRO","google-analytics-for-wordpress")}},computed:{upgradeUrl:function(){return this.$getUpgradeUrl("frontend-reports","admin-bar")}}},z=W,H=Object(L["a"])(z,V,N,!1,null,null,null),K=H.exports;function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){Object(s["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var q={name:"FrontendStatsGeneral",components:{FrontendUpsell:K,FrontendStatsColumn:B},data:function(){return{text_insights_for:Object(C["a"])("Last 30 Days Insights for:","google-analytics-for-wordpress"),text_your_website:Object(C["a"])("Your Website","google-analytics-for-wordpress"),text_sessions:Object(C["a"])("Sessions","google-analytics-for-wordpress"),text_pageviews:Object(C["a"])("Pageviews","google-analytics-for-wordpress"),text_session_duration:Object(C["a"])("Avg. Duration","google-analytics-for-wordpress"),text_bounce_rate:Object(C["a"])("Bounce Rate","google-analytics-for-wordpress")}},computed:Y({},Object(D["b"])({overview:"$_reports/overview"}),{text_upsell_title:function(){return this.$mi.is_admin?Object(C["a"])("More data is available","google-analytics-for-wordpress"):Object(C["a"])("Want to see page-specific stats?","google-analytics-for-wordpress")}}),mounted:function(){var t=this;this.$mi.authed?this.$store.dispatch("$_reports/getReportData","overview").then((function(){t.$store.commit("$_frontend/UPDATE_LOADED",!0)})):this.$store.commit("$_frontend/ENABLE_NOAUTH")}},J=q,Q=Object(L["a"])(J,T,R,!1,null,null,null),X=Q.exports,Z={name:"FrontendStatsContent",components:{FrontendStatsGeneral:X}},tt=Z,et=Object(L["a"])(tt,S,A,!1,null,null,null),nt=et.exports,rt=n("f284"),ot=n("d3fc"),st=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a",{staticClass:"monsterinsights-powered-by",attrs:{href:t.upgrade_url},domProps:{textContent:t._s(t.text_powered_by)}})},at=[],it={name:"FrontendPoweredBy",data:function(){return{text_powered_by:Object(C["a"])("Powered by MonsterInsights","google-analytics-for-wordpress"),upgrade_url:this.$getUpgradeUrl("admin-bar","powered-by")}}},lt=it,ct=Object(L["a"])(lt,st,at,!1,null,null,null),ut=ct.exports,dt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"monsterinsights-not-authenticated-notice"},[n("h3",{domProps:{textContent:t._s(t.text_no_auth)}}),n("div",{staticClass:"monsterinsights-settings-input monsterinsights-settings-input-authenticate"},[n("p",{domProps:{textContent:t._s(t.text_auth_label)}}),n("div",[n("a",{staticClass:"monsterinsights-wp-button monsterinsights-wp-button-primary",attrs:{href:t.wizard_url},domProps:{textContent:t._s(t.text_wizard)}}),n("a",{staticClass:"monsterinsights-wp-button",attrs:{href:t.learn_link},domProps:{textContent:t._s(t.text_learn)}})])])])},pt=[],ft={name:"FrontendNoAuth",data:function(){return{text_no_auth:Object(C["a"])("Please Setup Website Analytics to See Audience Insights","google-analytics-for-wordpress"),text_auth_label:Object(C["a"])("MonsterInsights, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use MonsterInsights to see the stats that matter and grow their business.","google-analytics-for-wordpress"),text_wizard:Object(C["a"])("Connect MonsterInsights and Setup Website Analytics","google-analytics-for-wordpress"),text_learn:Object(C["a"])("Learn More","google-analytics-for-wordpress"),wizard_url:this.$mi.wizard_url,learn_link:this.$mi.getting_started_url}}},gt=ft,bt=Object(L["a"])(gt,dt,pt,!1,null,null,null),ht=bt.exports;function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _t(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach((function(e){Object(s["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var vt={name:"ModuleFrontendReports",components:{FrontendNoAuth:ht,FrontendPoweredBy:ut,WidgetReportError:ot["a"],FrontendStatsContent:nt},data:function(){return{text_insights:'<span class="ab-icon dashicons-before dashicons-chart-bar"></span><span class="monsterinsights-admin-bar-handle-text">'+Object(C["a"])("Insights","google-analytics-for-wordpress")+"</span>",statsVisible:!1,page_id:this.$mi.page_id}},created:function(){var t="$_reports";t in this.$store._modules.root._children||this.$store.registerModule(t,rt["a"]);var e="$_frontend";e in this.$store._modules.root._children||this.$store.registerModule(e,E)},computed:_t({},Object(D["b"])({reportdata:"$_frontend/pageinsights",loaded:"$_frontend/loaded",error:"$_frontend/error",noauth:"$_frontend/noauth"}),{toggleButtonClass:function(){var t="ab-item ab-empty-item monsterinsights-toggle";return this.statsVisible&&(t+=" monsterinsights-toggle-active"),t}}),methods:{toggleStatsVisibility:function(){this.statsVisible=!this.statsVisible}}},yt=vt,wt=Object(L["a"])(yt,r,o,!1,null,null,null),Ot=wt.exports,jt=n("7460"),xt=n("6c6b"),Pt=(n("f531"),n("4360")),$t={install:function(t,e){var n=e.store;t.prototype.$mi_loading_toast=function(){},t.prototype.$mi_error_toast=function(t){var e=t,r=e.type,o=void 0===r?"error":r,s=e.customContainerClass,a=void 0===s?"monsterinsights-swal":s,i=e.allowOutsideClick,l=void 0!==i&&i,c=e.allowEscapeKey,u=void 0!==c&&c,d=e.allowEnterKey,p=void 0!==d&&d,f=e.title,g=void 0===f?Object(C["a"])("Error","google-analytics-for-wordpress"):f,b=e.html,h=void 0===b?Object(C["a"])("Please try again.","google-analytics-for-wordpress"):b,m=e.footer,_=void 0!==m&&m;t={type:o,customContainerClass:a,allowOutsideClick:l,allowEscapeKey:u,allowEnterKey:p,title:g,html:h,footer:_},n.commit("$_frontend/SET_ERROR",{title:t.title,content:t.html,footer:t.footer})},t.prototype.$swal={close:function(){}}}},Et=$t;window.addEventListener("load",(function(){var t=document.getElementById("wp-admin-bar-monsterinsights_frontend_button");(l["a"].config.productionTip=!1,t)&&(Object(xt["a"])({ctrl:!0}),l["a"].use(jt["a"]),l["a"].use(Et,{store:Pt["a"]}),Object(C["c"])(window.monsterinsights.translations,"google-analytics-for-wordpress"),new l["a"]({store:Pt["a"],render:function(t){return t(Ot)}}).$mount(t))}))},f531:function(t,e,n){}});