OwlCyberSecurity - MANAGER
Edit File: Main.DEJNx6n3.js
import{a as w,g as C,f as L,D as c}from"./links.C2upUfsO.js";import{l as g}from"./license.sYpqoxga.js";import{G as M}from"./GoogleSearchConsole.DUPkNCf_.js";import{C as T}from"./Caret.iRBf3wcH.js";import{x as o,o as r,l,m as n,a as y,t as d,d as u,c as _,C as p,v as S,D}from"./vue.esm-bundler.CWQFYt9y.js";import{_ as h}from"./_plugin-vue_export-helper.BN1snXvA.js";import{B}from"./DatePicker.Ds0FlmSm.js";import{C as A}from"./Blur.DNVDismY.js";import{C as O}from"./Index.CV8d5ZeP.js";import R from"./ContentRankings.DRxh5y1s.js";import{C as J}from"./Index.XNbBlAFo.js";import G from"./Dashboard.BmqVMmWc.js";import N from"./KeywordRankings.BDHYBQOl.js";import P from"./SeoStatistics.COQBfv0w.js";import"./default-i18n.Bd0Z306Z.js";import"./helpers.D2xRWOvn.js";import"./upperFirst.CP4N4hLd.js";import"./_stringToArray.DnK4tKcY.js";import"./toString.XwB3Xa5p.js";import"./get.BT85ybc8.js";import"./isUndefined.CwgbffFV.js";import"./_getTag.CQI1SwGE.js";import"./debounce.DX0w6jjQ.js";import"./toNumber.LBtMnsWu.js";import"./_baseTrim.BYZhh0MR.js";import"./allowed.CndRDYQd.js";/* empty css */import"./params.B3T1WKlC.js";import"./Ellipse.DXUYYFQW.js";import"./Header.CWn_G_CB.js";import"./addons.BNPuHzyp.js";import"./ScrollAndHighlight.BtfMkLpR.js";import"./LogoGear.BF23BIEd.js";import"./AnimatedNumber.D3vhSMTe.js";import"./numbers.zAmItkHM.js";import"./Logo.DoVR4qom.js";import"./index.BQgiQQKQ.js";import"./Support.B-t20u3s.js";import"./Tabs.CzBLxKs2.js";import"./TruSeoScore.TjofuHRQ.js";import"./Information.CESrgQJV.js";import"./Slide.CRIn0kdn.js";import"./Url.BbnxEVtY.js";import"./Date.BuX8UpcY.js";import"./constants.DpuIWwJ9.js";import"./Exclamation.DKtT8kuH.js";import"./Gear.aQH8e4fl.js";import"./Row.CzuhYwfs.js";import"./PostsTable.CS1LylXF.js";import"./WpTable.D4QfcWP2.js";import"./ScoreButton.CYslBSvp.js";import"./Table._qU3COyQ.js";import"./Tooltip.Jp05nfCy.js";import"./LicenseConditions.H_KRSR-O.js";import"./_arrayEach.Fgt6pfHj.js";import"./IndexStatus.BXxQ8ydO.js";import"./PostTypes.Cef6XkQ_.js";import"./RequiredPlans.CStdZuHU.js";import"./Card.BF8YEwxA.js";import"./Overview.0WC-juYW.js";import"./DonutChartWithLegend.C8x48JXe.js";import"./KeywordsGraph.BQSOAv0-.js";import"./SeoStatisticsOverview.y6g5A26W.js";import"./List.CUwrrSMe.js";import"./Statistics.DwUxcNUd.js";const V={setup(){return{optionsStore:w(),searchStatisticsStore:C()}},components:{CoreAlert:T},data(){return{error:this.$t.__("Your connection with Google Search Console has expired or is invalid. Please check that your site is verified in Google Search Console and try to reconnect. If the problem persists, please contact our support team.",this.$td)}},computed:{invalidAuthentication(){var t,e;return this.searchStatisticsStore.unverifiedSite||typeof((e=(t=this.optionsStore.internalOptions.internal)==null?void 0:t.searchStatistics)==null?void 0:e.profile)!="object"}}};function F(t,e,i,f,a,s){const m=o("core-alert");return s.invalidAuthentication?(r(),l(m,{key:0,class:"aioseo-input-error aioseo-search-statistics-authentication-alert",type:"red"},{default:n(()=>[y("strong",null,d(a.error),1)]),_:1})):u("",!0)}const I=h(V,[["render",F]]),U={};function z(t,e){return r(),_("div")}const E=h(U,[["render",z]]),H={};function j(t,e){return r(),_("div")}const q=h(H,[["render",j]]),K={setup(){return{licenseStore:L(),searchStatisticsStore:C()}},emits:["rolling"],components:{AuthenticationAlert:I,BaseDatePicker:B,CoreBlur:A,CoreMain:O,ContentRankings:R,Cta:J,Dashboard:G,KeywordRankings:N,PostDetail:E,Settings:q,SeoStatistics:P},mixins:[M],data(){return{maxDate:null,minDate:null,strings:{pageName:this.$t.__("Search Statistics",this.$td),ctaHeaderText:this.$t.__("Connect your website to Google Search Console",this.$td),ctaDescription:this.$t.__("Connect your site to Google Search Console to receive insights on how content is being discovered. Identify areas for improvement and drive traffic to your website.",this.$td),ctaButtonText:this.$t.__("Connect to Google Search Console",this.$td),feature1:this.$t.__("Search traffic insights",this.$td),feature2:this.$t.__("Improved visibility",this.$td),feature3:this.$t.__("Track page and keyword rankings",this.$td),feature4:this.$t.__("Speed tests for individual pages/posts",this.$td)}}},computed:{defaultRange(){const t=new Date(`${this.searchStatisticsStore.range.start} 00:00:00`),e=new Date(`${this.searchStatisticsStore.range.end} 00:00:00`);return[t,e]},excludeTabs(){const t=["post-detail"];return(this.licenseStore.isUnlicensed||!g.hasCoreFeature("search-statistics"))&&t.push("settings"),t},isSettings(){return this.$route.name==="settings"},showConnectCta(){return(g.hasCoreFeature("search-statistics")&&!this.searchStatisticsStore.isConnected||this.searchStatisticsStore.unverifiedSite)&&!this.isSettings},showDatePicker(){const t=this.searchStatisticsStore.isConnected&&!this.searchStatisticsStore.unverifiedSite,e=this.searchStatisticsStore.range.start&&this.searchStatisticsStore.range.end;return!["settings","content-rankings"].includes(this.$route.name)&&t&&e},containerClasses(){const t=[];return this.searchStatisticsStore.fetching&&t.push("aioseo-blur"),t},getOriginalMaxDate(){return this.searchStatisticsStore.latestAvailableDate?c.fromFormat(this.searchStatisticsStore.latestAvailableDate,"yyyy-MM-dd").setZone(c.zone)||c.local().plus({days:-2}):c.local().plus({days:-2})},datepickerShortcuts(){return[{text:this.$t.__("Last 7 Days",this.$td),value:()=>(window.aioseoBus.$emit("rolling","last7Days"),[this.getOriginalMaxDate.plus({days:-6}).toJSDate(),this.getOriginalMaxDate.toJSDate()])},{text:this.$t.__("Last 28 Days",this.$td),value:()=>(window.aioseoBus.$emit("rolling","last28Days"),[this.getOriginalMaxDate.plus({days:-27}).toJSDate(),this.getOriginalMaxDate.toJSDate()])},{text:this.$t.__("Last 3 Months",this.$td),value:()=>(window.aioseoBus.$emit("rolling","last3Months"),[this.getOriginalMaxDate.plus({days:-89}).toJSDate(),this.getOriginalMaxDate.toJSDate()])}]}},methods:{isDisabledDate(t){return this.minDate===null?!0:t.getTime()<this.minDate.getTime()||t.getTime()>this.maxDate.getTime()},onDateChange(t,e){this.searchStatisticsStore.setDateRange({dateRange:t,rolling:e})},highlightShortcut(t){if(!t)return;document.querySelectorAll(".el-picker-panel__shortcut").forEach(i=>{switch(i.innerText){case this.$t.__("Last 7 Days",this.$td):t==="last7Days"?i.classList.add("active"):i.classList.remove("active");break;case this.$t.__("Last 28 Days",this.$td):t==="last28Days"?i.classList.add("active"):i.classList.remove("active");break;case this.$t.__("Last 3 Months",this.$td):t==="last3Months"?i.classList.add("active"):i.classList.remove("active");break;case this.$t.__("Last 6 Months",this.$td):t==="last6Months"?i.classList.add("active"):i.classList.remove("active");break;default:i.classList.remove("active")}})}},mounted(){this.minDate=c.now().plus({months:-16}).toJSDate(),this.maxDate=this.getOriginalMaxDate.toJSDate()}},Y={key:0,class:"connect-cta"};function Z(t,e,i,f,a,s){const m=o("base-date-picker"),v=o("authentication-alert"),x=o("core-blur"),$=o("cta"),k=o("core-main");return r(),l(k,{"page-name":a.strings.pageName,"exclude-tabs":s.excludeTabs,showTabs:!s.excludeTabs.includes(t.$route.name),containerClasses:s.containerClasses},{extra:n(()=>[s.showDatePicker?(r(),l(m,{key:0,onChange:s.onDateChange,onUpdated:e[0]||(e[0]=b=>s.highlightShortcut(b)),clearable:!1,defaultValue:s.defaultRange,defaultRolling:f.searchStatisticsStore.rolling,isDisabledDate:s.isDisabledDate,shortcuts:s.datepickerShortcuts,size:"small"},null,8,["onChange","defaultValue","defaultRolling","isDisabledDate","shortcuts"])):u("",!0)]),default:n(()=>[y("div",null,[p(v),s.showConnectCta?(r(),_("div",Y,[p(x,null,{default:n(()=>[(r(),l(S(t.$route.name)))]),_:1}),p($,{"cta-button-action":"",onCtaButtonClick:t.connect,"cta-button-loading":t.loading,"show-link":!1,"button-text":a.strings.ctaButtonText,alignTop:!0,hideBonus:!0,"feature-list":[a.strings.feature1,a.strings.feature2,a.strings.feature3,a.strings.feature4]},{"header-text":n(()=>[D(d(a.strings.ctaHeaderText),1)]),description:n(()=>[D(d(a.strings.ctaDescription),1)]),_:1},8,["onCtaButtonClick","cta-button-loading","button-text","feature-list"])])):u("",!0),s.showConnectCta?u("",!0):(r(),l(S(t.$route.name),{key:1}))])]),_:1},8,["page-name","exclude-tabs","showTabs","containerClasses"])}const ce=h(K,[["render",Z]]);export{ce as default};