OwlCyberSecurity - MANAGER
Edit File: ReportReAuth-61360c4f.min.js
import{m as a,j as c,s as o,_ as s,n as r}from"./vendor-008d034f.min.js";import{S as u}from"./SettingsInfoTooltip-61cb2dba.min.js";const p={name:"ReportInfobox",components:{SettingsInfoTooltip:u},props:{title:String,value:{default:"0",type:String},compareValue:{default:"0",type:String},id:String,days:Number,tooltip:String,change:Number,color:{default:"green",type:String},direction:{default:"up",type:String}},computed:{...a({date:"$_reports/date"}),compare(){return c("vs. Previous Day",o("vs. Previous %s Days",this.days),this.days,"google-analytics-for-wordpress")},changeClass(){let n="monsterinsights-reports-infobox-prev ";return typeof this.change>"u"?n+" monsterinsights-prev-nochange":n+" monsterinsights-"+this.color},changeText(){return this.change?this.direction===""?this.change+"%":'<span class="monsterinsights-arrow monsterinsights-'+this.direction+" monsterinsights-"+this.color+'"></span> '+Math.abs(this.change)+"%":s("No change","google-analytics-for-wordpress")}}};var d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"monsterinsights-reports-infobox",attrs:{id:t.id}},[t.title?e("div",{staticClass:"monsterinsights-report-title",domProps:{textContent:t._s(t.title)}}):t._e(),t.tooltip?e("settings-info-tooltip",{attrs:{content:t.tooltip}}):t._e(),t.date.compareReport?e("div",{staticClass:"monsterinsights-reports-compare-infobox"},[e("div",{staticClass:"monsterinsights-reports-compare-infobox-row"},[e("div",[e("div",{staticClass:"monsterinsights-reports-infobox-number"},[t._v(" "+t._s(t.value)+" ")]),e("div",{staticClass:"monsterinsights-reports-infobox-date-range"},[t._v(" "+t._s(t.date.intervalText)+" ")])]),e("div",[e("div",{class:t.changeClass,domProps:{innerHTML:t._s(t.changeText)}})])]),e("div",{staticClass:"monsterinsights-reports-compare-infobox-row"},[e("div",[e("div",{staticClass:"monsterinsights-reports-infobox-number"},[t._v(" "+t._s(t.compareValue)+" ")]),e("div",{staticClass:"monsterinsights-reports-infobox-date-range"},[t._v(" "+t._s(t.date.intervalCompareText)+" ")])])])]):e("div",{staticClass:"monsterinsights-clearfix"},[t.value!==""?e("div",{staticClass:"monsterinsights-reports-infobox-number",attrs:{title:t.value},domProps:{textContent:t._s(t.value)}}):t._e(),t.value===""?e("div",{staticClass:"monsterinsights-reports-infobox-number",attrs:{title:t.value},domProps:{textContent:t._s(0)}}):t._e(),e("div",{class:t.changeClass,domProps:{innerHTML:t._s(t.changeText)}}),t.days?e("div",{staticClass:"monsterinsights-reports-infobox-compare",domProps:{textContent:t._s(t.compare)}}):t._e()])],1)},g=[],_=r(p,d,g,!1,null,null,null,null);const P=_.exports,h={name:"ReportUpsellOverlay",props:{report:String,customSubheading:{type:String,default:null},forceTwoColumns:{type:Boolean,default:!1},noImage:{type:Boolean,default:!1},upgradeHref:{type:String,default:null},isAgency:{type:Boolean,default:!1}},data(){return{upgrade_link:this.$getUpgradeUrl("report",this.report),report_class:"upsell-"+this.report}},computed:{...a({noauth:"$_reports/noauth"}),upsellData(){return this.$mi_get_upsell_content(this.report)},texts(){return{upsellButton:s("Upgrade and Unlock","google-analytics-for-wordpress"),subheading:this.customSubheading?this.customSubheading:o(s("What’s in the %1$s?","google-analytics-for-wordpress"),this.upsellData.mainheading),footerNotice:o(s("%1$sPlus%2$s, upgrading to Pro will unlock %1$sall%2$s advanced reports, tracking, and integrations. %3$sLearn more about Pro%4$s","google-analytics-for-wordpress"),"<strong>","</strong>",'<a target="_blank" href="'+this.upgrade_link+'">',"</a>"),featuresCliff:s("And more!","google-analytics-for-wordpress")}},featuresClass(){return this.upsellData.features.length>4||this.forceTwoColumns?"columns-2":"columns-1"},footer_notice(){return o(s("%1$sPlus%2$s, upgrading to %5$s will unlock %1$sall%2$s advanced reports, tracking, and integrations. %3$sLearn more about %5$s%4$s","google-analytics-for-wordpress"),"<strong>","</strong>",'<a target="_blank" href="'+this.getUpgradeLink()+'">',"</a>",this.isAgency?"Agency":"Pro")}},methods:{getUpgradeLink(){return this.upgradeHref?this.upgradeHref:this.$getUpgradeUrl("report",this.report)}}};var f=function(){var t=this,e=t._self._c;return t.noauth?t._e():e("div",{staticClass:"monsterinsights-upsell-overlay"},[e("div",{staticClass:"monsterinsights-upsell-top"},[t.upsellData.mainheading?e("h3",{domProps:{textContent:t._s(t.upsellData.mainheading)}}):t._e()]),e("div",{staticClass:"monsterinsights-upsell-content"},[e("div",{staticClass:"monsterinsights-upsell-content__features"},[t.upsellData.title?e("h3",{domProps:{textContent:t._s(t.upsellData.title)}}):t._e(),t.texts.subheading?e("h4",{domProps:{textContent:t._s(t.texts.subheading)}}):t._e(),t.upsellData.features?e("ul",{class:t.featuresClass},t._l(t.upsellData.features,function(i,l){return e("li",{key:l,domProps:{textContent:t._s(i)}})}),0):t._e(),e("div",{staticClass:"monsterinsights-upsell-content__features-cliff"},[e("p",{domProps:{innerHTML:t._s(t.texts.featuresCliff)}})]),e("p",{domProps:{innerHTML:t._s(t.footer_notice)}}),e("a",{staticClass:"monsterinsights-button",attrs:{href:t.getUpgradeLink(),target:"_blank"},domProps:{textContent:t._s(t.texts.upsellButton)}})]),t.noImage?t._e():e("div",{staticClass:"monsterinsights-upsell-content__img",class:t.report_class})])])},m=[],v=r(h,f,m,!1,null,null,null,null);const R=v.exports,x={name:"ReportReAuth",data(){return{text_no_auth:s("MonsterInsights encountered an error loading your report data","google-analytics-for-wordpress"),text_auth_label:s("There is an issue with your Google Account authentication. Please use the button below to fix it by re-authenticating.","google-analytics-for-wordpress"),text_button_reconnect:s("Reconnect MonsterInsights","google-analytics-for-wordpress")}},methods:{doReAuth:function(n){n.preventDefault();const t=this;this.$swal({icon:"info",title:s("Re-Authenticating","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,onOpen:function(){t.$swal.showLoading()}}),this.$store.dispatch("$_auth/doReAuth",this.is_network).then(function(e){e.data.redirect?window.location=e.data.redirect:t.$swal({icon:"error",title:s("Error","google-analytics-for-wordpress"),text:e.data.message,confirmButtonText:s("Ok","google-analytics-for-wordpress")})})}}};var y=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("p",{domProps:{textContent:t._s(t.text_auth_label)}}),e("p",[e("button",{staticClass:"monsterinsights-button",domProps:{textContent:t._s(t.text_button_reconnect)},on:{click:t.doReAuth}})])])},C=[],b=r(x,y,C,!1,null,null,null,null);const k=b.exports;export{P as R,R as a,k as b};