File "date-intervals-2f4eb617.min.js"

Full Path: /home/flipjqml/onlinebetsolution.com/wp-content/plugins/google-analytics-for-wordpress/lite/assets/vue/js/chunks/date-intervals-2f4eb617.min.js
File size: 12.26 KB
MIME-type: text/html
Charset: utf-8

import{V as a,a as v,h as o}from"./vendor-13bf5d31.min.js";import{b as i}from"./index-6abfe9ae.min.js";const{__:h,sprintf:A}=wp.i18n,T=(t,e,r,s)=>new Promise(l=>{let c=new FormData;c.append("action","monsterinsights_vue_get_report_data"),c.append("nonce",a.prototype.$mi.nonce),c.append("report",e),c.append("start",r),c.append("end",s),t.getters.date.compareReport&&(c.append("compare_report",!0),c.append("compare_end",t.getters.date.compareEnd),c.append("compare_start",t.getters.date.compareStart)),v.post(a.prototype.$mi.ajax,c).then(d=>{l(d.data)}).catch(function(d){t.dispatch("$_app/block",!1,{root:!0});const u=a.prototype.$getUrl("admin-notices","error-verifying-license","https://www.monsterinsights.com/my-account/support");if(d.response){const w=d.response;return a.prototype.$mi_error_toast({title:A(h("Can't load report data. Error: %1$s, %2$s. Please try again in a few minutes. If the issue persists, please %3$scontact our support%4$s team.","google-analytics-for-wordpress"),w.status,w.statusText,'<a target="_blank" href="'+u+'">',"</a>")})}a.prototype.$swal.hideLoading(),a.prototype.$mi_error_toast({allowOutsideClick:!0,allowEscapeKey:!0,title:h("Error loading report data","google-analytics-for-wordpress"),html:d.message})})}),b=t=>{if(typeof t<"u"){const e=parseInt(t.toString().replace(".",""),10);return e.toString().length===1?parseInt(e===1?e+"00":e+"0"):e}},D=t=>{if(typeof t<"u"){let e={};return Object.keys(t).forEach(function(r){let s=r.toString().split("-").join("_");e[s]=t[r]}),e}},$={fetchReportData:T,getFormattedScore:b,keysReplaceHyphensWithUnderscores:D},{__:n,sprintf:p}=wp.i18n,L=(t,e)=>!a.prototype.$isPro()&&!(e==="overview"||e==="site_summary")?null:new Promise(r=>{if(!a.prototype.$mi.authed)return r(!1),t.commit("ENABLE_BLUR"),t.commit("ENABLE_NOAUTH"),!1;if(t.state[e]&&t.state[e].reportcurrentrange&&!t.state.date.compareReport&&t.state[e].reportcurrentrange.startDate===t.state.date.start&&t.state[e].reportcurrentrange.endDate===t.state.date.end)return r(!1),t.commit("DISABLE_BLUR"),!1;a.prototype.$mi_loading_toast(),t.commit("ENABLE_BLUR"),t.dispatch("$_queue/add",()=>$.fetchReportData(t,e,t.state.date.start,t.state.date.end).then(function(s){if(t.commit("SET_IS_LOADED"),s.data.message==="license_level"){_(t),r(!1);return}if(s.success)_(t),t.commit("DISABLE_BLUR"),t.commit("UPDATE_REPORT_DATA",{report:e,data:s.data}),r(!0);else{if(s.data.message==="invalid_grant"){_(t),r(!1),t.commit("ENABLE_REAUTH");return}if(s.data.footer&&s.data.footer==="install_addon"){let l=t.state.required_addon?t.state.required_addon:e;R(t,l).then(function(c){t.rootState.$_widget&&(t.commit("DISABLE_BLUR"),t.commit("$_widget/UPDATE_LOADED",!0,{root:!0}));let d=n(c?"activate":"install","google-analytics-for-wordpress");a.prototype.$mi_error_toast({title:!1,html:p(s.data.message,d),footer:'<a href="'+a.prototype.$mi.addons_url+'">'+n("Visit addons page","google-analytics-for-wordpress")+"</a>",report:e}),a.prototype.$swal({icon:"error",customClass:{container:"monsterinsights-swal"},title:n("Report Unavailable","google-analytics-for-wordpress"),html:p(s.data.message,d),allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!1,showCancelButton:!0,confirmButtonText:p(n("%s Addon","google-analytics-for-wordpress"),d.charAt(0).toUpperCase()+d.slice(1)),cancelButtonText:n("Dismiss","google-analytics-for-wordpress")}).then(function(u){u.value&&(c?g(t,t.rootState.$_addons.addons[l]):E(t,l))})})}else s.data.footer&&s.data.footer.indexOf("#/ecommerce")>0?(r(!1),a.prototype.$mi_error_toast({title:!1,html:s.data.message,report:e,showCancelButton:!0,cancelButtonText:n("Go Back To Reports","google-analytics-for-wordpress"),confirmButtonText:n("Enable Enhanced eCommerce","google-analytics-for-wordpress")}).then(function(l){l.value&&(window.location=s.data.footer)})):s.data.type&&s.data.type==="expired_license"?(r(!1),a.prototype.$mi_error_toast({type:"",customClass:{container:"monsterinsights-expired-license-alert-toast"},confirmButtonText:"",title:!1,html:s.data.message,footer:s.data.footer,report:e})):(r(!1),a.prototype.$mi_error_toast({title:!1,html:s.data.message,footer:s.data.footer,report:e,onClose:()=>{if(!s.data.type||s.data.type!=="INVALID_DATE_RANGE"||t.state.date==="last30days")return;const l=a.prototype.$mi_intervals().last30days;t.commit("UPDATE_INTERVAL","last30days"),t.commit("UPDATE_DATE",{start:l.start.format("YYYY-MM-DD"),end:l.end.format("YYYY-MM-DD")}),t.dispatch("getReportData",t.state.activeReport)}}))}}),{root:!0})});function R(t,e){return new Promise(function(r){t.dispatch("$_addons/getAddons","",{root:!0}).then(function(){t.rootState.$_addons.addons[e]&&t.rootState.$_addons.addons[e].installed?r(!0):r(!1)}).catch(function(){r(!1),y()})})}function E(t,e){a.prototype.$swal({icon:"info",customClass:{container:"monsterinsights-swal"},title:n("Installing Addon","google-analytics-for-wordpress"),html:n("Please wait","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,didOpen:function(){a.prototype.$swal.showLoading(),t.dispatch("$_addons/installAddon",t.rootState.$_addons.addons[e],{root:!0}).then(function(){g(t,t.rootState.$_addons.addons[e])}).catch(function(){y()})}})}function g(t,e){a.prototype.$swal({icon:"info",customClass:{container:"monsterinsights-swal"},title:n("Activating Addon","google-analytics-for-wordpress"),html:n("Please wait","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,didOpen:function(){a.prototype.$swal.showLoading()}}),t.dispatch("$_addons/activateAddon",e,{root:!0}).then(function(){a.prototype.$swal({icon:"info",customClass:{container:"monsterinsights-swal"},title:n("Addon Activated","google-analytics-for-wordpress"),html:n("Loading report data","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,didOpen:function(){a.prototype.$swal.showLoading(),setTimeout(function(){window.location.reload()},1e3)}})}).catch(function(r){y(r)})}function y(t){let e=n("Please activate manually","google-analytics-for-wordpress");t.response&&(e=p(n("Error: %1$s, %2$s","google-analytics-for-wordpress"),t.response.status,t.response.statusText)),a.prototype.$swal({icon:"error",customClass:{container:"monsterinsights-swal"},title:n("Error Activating Addon","google-analytics-for-wordpress"),html:e,allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,showCancelButton:!0,confirmButtonText:n("View Addons","google-analytics-for-wordpress"),cancelButtonText:n("Dismiss","google-analytics-for-wordpress")}).then(function(r){r.value&&(window.location=a.prototype.$mi.addons_url,a.prototype.$swal({icon:"info",customClass:{container:"monsterinsights-swal"},title:n("Redirecting","google-analytics-for-wordpress"),html:n("Please wait","google-analytics-for-wordpress"),allowOutsideClick:!1,allowEscapeKey:!1,allowEnterKey:!1,didOpen:function(){a.prototype.$swal.showLoading()}}))})}function _(t){t.rootState.$_widget||typeof a.prototype.$swal=="function"&&a.prototype.$swal.close()}const S={getReportData:L,installAddon:E,activateAddon:g},O=t=>t.yearinreview_data,B=t=>t.activeReport,C=t=>t.isLoaded,U=t=>t.blur,Y=t=>t.mobileTableExpanded,P=t=>t.overview,k=t=>t.site_summary,I=t=>t.publisher,M=t=>t.ecommerce,N=t=>t.ecommerce_coupons,K=t=>t.ecommerce_funnel,q=t=>t.queries,V=t=>t.dimensions,H=t=>t.forms,F=t=>t.realtime,G=t=>t.yearinreview,W=t=>t.sitespeed,X=t=>t.sitespeedmobile,j=t=>t.noauth,Q=t=>t.reauth,z=t=>t.media,J=t=>t.traffic_overview,Z=t=>t.traffic_landing_pages,x=t=>t.traffic_technology,tt=t=>t.traffic_campaign,et=t=>t.traffic_source_medium,at=t=>t.traffic_social,ot=t=>t.engagement_pages,st=()=>i("overview"),rt=()=>i("ecommerce"),nt=()=>i("ecommerce_coupons"),it=()=>i("dimensions"),ct=()=>i("traffic_overview"),lt=()=>i("traffic_technology"),dt=()=>i("traffic_landing_pages"),mt=()=>i("traffic_campaign"),ft=()=>i("traffic_source_medium"),pt=()=>i("traffic_social"),ut=()=>i("publisher"),_t=()=>i("engagement_pages"),gt=()=>i("queries"),yt=()=>i("forms"),wt=()=>i("realtime"),ht=()=>i("sitespeed"),Et=()=>i("media"),vt=()=>i("ecommerce_funnel");function f(t,e){return t.format("YYYYMMDD")===e.format("YYYYMMDD")?t.format("MMMM D, YYYY"):t.format("MMMM D")+" - "+e.format("MMMM D, YYYY")}function At(t){let e=t.date,r=a.prototype.$mi_intervals();if(r[e.interval]){let s=r[e.interval];e.intervalText=f(s.start,s.end),e.intervalCompareText=f(s.compareStart,s.compareEnd)}else e.intervalText=f(o(e.start),o(e.end)),e.intervalCompareText=f(o(e.compareStart),o(e.compareEnd));return e}const Tt={yearinreview_data:O,date:At,activeReport:B,isLoaded:C,blur:U,mobileTableExpanded:Y,overview:P,publisher:I,ecommerce:M,ecommerce_coupons:N,ecommerce_funnel:K,queries:q,dimensions:V,forms:H,realtime:F,noauth:j,yearinreview:G,reauth:Q,sitespeed:W,sitespeedmobile:X,site_summary:k,media:z,traffic_overview:J,traffic_landing_pages:Z,traffic_technology:x,traffic_campaign:tt,traffic_source_medium:et,traffic_social:at,engagement_pages:ot,demo_overview:st,demo_ecommerce:rt,demo_ecommerce_coupons:nt,demo_dimensions:it,demo_traffic_overview:ct,demo_traffic_technology:lt,demo_traffic_landing_pages:dt,demo_traffic_campaign:mt,demo_traffic_source_medium:ft,demo_traffic_social:pt,demo_publisher:ut,demo_engagement_pages:_t,demo_queries:gt,demo_forms:yt,demo_realtime:wt,demo_sitespeed:ht,demo_media:Et,demo_ecommerce_funnel:vt},bt=(t,e)=>{e.report&&e.data&&t[e.report]&&a.set(t,e.report,e.data)},Dt=(t,e)=>{e.start&&e.end&&(a.set(t.date,"start",e.start),a.set(t.date,"end",e.end))},$t=(t,e)=>{a.set(t.date,"interval",e)},Lt=(t,e)=>{a.set(t.date,"text",e)},Rt=(t,e)=>{t.activeReport=e},St=t=>{t.isLoaded=!0},Ot=t=>{t.blur=!0},Bt=t=>{t.blur=!1},Ct=t=>{t.mobileTableExpanded=!0},Ut=t=>{t.mobileTableExpanded=!1},Yt=t=>{t.noauth=!0},Pt=t=>{t.reauth=!0},kt=(t,e)=>{t.required_addon=e},It=(t,e)=>{t.date={...t.date,...e}},Mt={UPDATE_REPORT_DATA:bt,UPDATE_DATE:Dt,UPDATE_ACTIVE_REPORT:Rt,UPDATE_INTERVAL:$t,UPDATE_DATE_TEXT:Lt,SET_IS_LOADED:St,ENABLE_BLUR:Ot,DISABLE_BLUR:Bt,EXPAND_TABLES:Ct,CONTRACT_TABLES:Ut,ENABLE_NOAUTH:Yt,ENABLE_REAUTH:Pt,UPDATE_REQUIRED_ADDON:kt,UPDATE_DATE_STORE:It},Nt={yearinreview_data:window.monsterinsights.yearinreview,date:{start:"",end:"",interval:"last30days",text:"",compareText:"",compareReport:!1,compareStart:"",compareEnd:""},blur:!1,activeReport:"overview",mobileTableExpanded:!1,overview:{},site_summary:{},publisher:{},ecommerce:{},ecommerce_coupons:{},ecommerce_funnel:{funnel_table:{none:[]},funnel_chart:[]},queries:{},dimensions:{},forms:{},realtime:{},yearinreview:{},sitespeed:{},sitespeedmobile:{},noauth:!1,reauth:!1,isLoaded:!1,media:{line_chart_report:{},video_details_rows:[]},traffic_overview:{},traffic_landing_pages:{},traffic_technology:{},traffic_campaign:{},traffic_source_medium:{},traffic_social:{sessions_chart:{}},engagement_pages:{},required_addon:null},Vt={namespaced:!0,state:Nt,actions:S,getters:Tt,mutations:Mt},{__:m}=wp.i18n,Ht={today:{text:m("Today","google-analytics-for-wordpress"),start:o(),end:o(),interval:"today",compareStart:o().subtract(1,"days"),compareEnd:o().subtract(1,"days")},yesterday:{text:m("Yesterday","google-analytics-for-wordpress"),start:o().subtract(1,"days"),end:o().subtract(1,"days"),interval:"yesterday",compareStart:o().subtract(2,"days"),compareEnd:o().subtract(2,"days")},lastweek:{text:m("Last Week","google-analytics-for-wordpress"),end:o().startOf("week"),start:o().startOf("week").subtract(6,"days"),interval:"lastweek",compareStart:o().startOf("week").subtract(13,"days"),compareEnd:o().startOf("week").subtract(7,"days")},lastmonth:{text:m("Last Month","google-analytics-for-wordpress"),end:o().startOf("month").subtract(1,"days"),start:o().startOf("month").subtract(1,"month"),interval:"lastmonth",compareStart:o().startOf("month").subtract(2,"month"),compareEnd:o().startOf("month").subtract(1,"month").subtract(1,"days")},last7days:{text:m("Last 7 days","google-analytics-for-wordpress"),end:o().subtract(1,"days"),start:o().subtract(7,"days"),interval:"last7days",compareStart:o().subtract(14,"days"),compareEnd:o().subtract(8,"days")},last30days:{text:m("Last 30 days","google-analytics-for-wordpress"),end:o().subtract(1,"days"),start:o().subtract(30,"days"),interval:"last30days",compareStart:o().subtract(60,"days"),compareEnd:o().subtract(31,"days")},last90days:{text:m("Last 90 days","google-analytics-for-wordpress"),end:o().subtract(1,"days"),start:o().subtract(90,"days"),interval:"last90days",compareStart:o().subtract(180,"days"),compareEnd:o().subtract(91,"days")}};export{Ht as D,Vt as R,g as a,$ as h,E as i};