관리-도구
편집 파일: Main.91318989.js
import{b as R,i as x,m as O,l as U}from"./index.20192476.js";import{l as D}from"./license.37048367.js";import{D as h}from"./datetime.cb3980ce.js";import{u as J}from"./GoogleSearchConsole.9e8ca525.js";import{C as w,_ as P}from"./Caret.662da1f3.js";import"./translations.12335a6a.js";import{_}from"./_plugin-vue_export-helper.249dac1d.js";import{_ as o}from"./default-i18n.54b5d8cd.js";import{v as m,o as a,k as c,l as p,a as f,t as d,b as l,c as S,C as v,x as C,q as y,F}from"./runtime-dom.esm-bundler.6789c400.js";import{B as N}from"./DatePicker.fd6399b7.js";import{_ as V}from"./ConnectCta.444a26a5.js";import{C as G}from"./Blur.31bfcf06.js";import{C as z}from"./Index.86e580cc.js";import $ from"./ContentRankings.1e40ff5e.js";import{C as q}from"./Index.c0a0a208.js";import E from"./Dashboard.d775643b.js";import I from"./KeywordRankTracker.daecd734.js";import j from"./SeoStatistics.60538068.js";import"./helpers.f95d5840.js";import"./upperFirst.96c04516.js";import"./_stringToArray.08127ca9.js";import"./toString.1401d490.js";import"./Calendar.4686ac3f.js";import"./pick.231724a9.js";import"./_baseSet.32e7a763.js";import"./_getTag.8dc22eac.js";import"./debounce.40834200.js";import"./toNumber.30f8b529.js";import"./_baseTrim.940c51cf.js";import"./isEqual.51bf23f5.js";import"./_baseIsEqual.6bc92395.js";import"./vue-router.fc4966b9.js";import"./allowed.f428d9c9.js";/* empty css */import"./params.764403f6.js";import"./Tabs.2fd33524.js";import"./ProBadge.7733ac87.js";import"./Information.82968754.js";import"./Slide.d0517fb0.js";import"./Header.b89e033a.js";import"./addons.9d0af6ad.js";import"./LicenseKeyBar.4ba21094.js";import"./ScrollTo.97c9805f.js";import"./LogoGear.29bd352d.js";import"./AnimatedNumber.66005608.js";import"./numbers.b55b32c5.js";import"./Logo.f6ea28bf.js";import"./index.ee8124c6.js";import"./Support.9384b810.js";import"./date.839db266.js";import"./constants.2019bcb3.js";import"./Url.0ccd8549.js";import"./Exclamation.bf79561a.js";import"./Gear.1433c8c3.js";import"./vue3-apexcharts.8b5abfad.js";import"./Row.f01f32cd.js";import"./PostsTable.ef726bf7.js";import"./PostTypes.d6c1987b.js";import"./Statistic.3ce52bbb.js";import"./_baseClone.e959332d.js";import"./_arrayEach.f4f00336.js";import"./Tooltip.b6b45c85.js";import"./WpTable.46584896.js";import"./ScoreButton.e2a31604.js";import"./Table.963c11c7.js";import"./Download.6a0d8455.js";import"./IndexStatus.d0fe7619.js";import"./CheckSolid.9e151b0e.js";import"./Mobile.3fcac169.js";import"./Checkmark.32f79576.js";import"./ExclamationSolid.8e60a4a3.js";import"./Link.dc972d1e.js";import"./RequiredPlans.7629fd28.js";import"./License.f957e227.js";import"./Card.46af096e.js";import"./Overview.6aab4c21.js";import"./DonutChartWithLegend.6a15c88c.js";import"./KeywordsGraph.05947fac.js";import"./Graph.266090de.js";import"./SeoStatisticsOverview.39008fc7.js";import"./List.fd3f4b7e.js";import"./Statistics.324b239a.js";import"./SettingsRow.1934f141.js";import"./Editor.5a453aa4.js";import"./Index.de83b4aa.js";import"./External.b3b0805d.js";import"./Star.be1f7c70.js";const K="all-in-one-seo-pack",Y={setup(){return{optionsStore:R(),searchStatisticsStore:x()}},components:{CoreAlert:w},data(){return{error:o("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.",K)}},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 Z(t,e,r,i,u,s){const g=m("core-alert");return s.invalidAuthentication?(a(),c(g,{key:0,class:"aioseo-input-error aioseo-search-statistics-authentication-alert",type:"red"},{default:p(()=>[f("strong",null,d(u.error),1)]),_:1})):l("",!0)}const H=_(Y,[["render",Z]]),Q={};function W(t,e){return a(),S("div")}const X=_(Q,[["render",W]]),tt={};function et(t,e){return a(),S("div")}const st=_(tt,[["render",et]]),n="all-in-one-seo-pack",at={emits:["rolling"],setup(){const{connect:t,loading:e}=J();return{connect:t,licenseStore:O(),links:U,loading:e,searchStatisticsStore:x()}},components:{AuthenticationAlert:H,BaseButton:P,BaseDatePicker:N,ConnectCta:V,CoreAlert:w,CoreBlur:G,CoreMain:z,ContentRankings:$,Cta:q,Dashboard:E,KeywordRankTracker:I,PostDetail:X,Settings:st,SeoStatistics:j},data(){return{maxDate:null,minDate:null,strings:{pageName:o("Search Statistics",n),sampleDataAlert:o("Sample data is available for you to explore. 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.",n),ctaButtonText:o("Connect to Google Search Console",n),ctaUnlockButtonText:o("Unlock Search Statistics",n)}}},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||!D.hasCoreFeature("search-statistics"))&&t.push("settings"),t},isSettings(){return this.$route.name==="settings"},showSampleDataUnlockCta(){return D.hasCoreFeature("search-statistics")&&!this.searchStatisticsStore.isConnected||this.searchStatisticsStore.unverifiedSite},showConnectCta(){return(D.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?h.fromFormat(this.searchStatisticsStore.latestAvailableDate,"yyyy-MM-dd").setZone(h.zone)||h.local().plus({days:-2}):h.local().plus({days:-2})},datepickerShortcuts(){return[{text:o("Last 7 Days",n),value:()=>(window.aioseoBus.$emit("rolling","last7Days"),[this.getOriginalMaxDate.plus({days:-6}).toJSDate(),this.getOriginalMaxDate.toJSDate()])},{text:o("Last 28 Days",n),value:()=>(window.aioseoBus.$emit("rolling","last28Days"),[this.getOriginalMaxDate.plus({days:-27}).toJSDate(),this.getOriginalMaxDate.toJSDate()])},{text:o("Last 3 Months",n),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(r=>{switch(r.innerText){case o("Last 7 Days",n):t==="last7Days"?r.classList.add("active"):r.classList.remove("active");break;case o("Last 28 Days",n):t==="last28Days"?r.classList.add("active"):r.classList.remove("active");break;case o("Last 3 Months",n):t==="last3Months"?r.classList.add("active"):r.classList.remove("active");break;case o("Last 6 Months",n):t==="last6Months"?r.classList.add("active"):r.classList.remove("active");break;default:r.classList.remove("active")}})}},mounted(){this.minDate=h.now().plus({months:-16}).toJSDate(),this.maxDate=this.getOriginalMaxDate.toJSDate()}},rt=f("br",null,null,-1),ot=f("br",null,null,-1),it={key:1,class:"connect-cta"};function nt(t,e,r,i,u,s){const g=m("base-date-picker"),b=m("authentication-alert"),k=m("base-button"),L=m("core-alert"),B=m("core-blur"),M=m("connect-cta"),T=m("core-main");return a(),c(T,{"page-name":u.strings.pageName,"exclude-tabs":s.excludeTabs,showTabs:!s.excludeTabs.includes(t.$route.name),containerClasses:s.containerClasses},{extra:p(()=>[s.showDatePicker?(a(),c(g,{key:0,onChange:s.onDateChange,onUpdated:e[0]||(e[0]=A=>s.highlightShortcut(A)),clearable:!1,defaultValue:s.defaultRange,defaultRolling:i.searchStatisticsStore.rolling,isDisabledDate:s.isDisabledDate,shortcuts:s.datepickerShortcuts,size:"small"},null,8,["onChange","defaultValue","defaultRolling","isDisabledDate","shortcuts"])):l("",!0)]),default:p(()=>[f("div",null,[v(b),i.searchStatisticsStore.shouldShowSampleReports?(a(),S(F,{key:0},[v(L,{class:"description sample-data-alert",type:"yellow",onCloseAlert:()=>{}},{default:p(()=>[C(d(u.strings.sampleDataAlert)+" ",1),rt,ot,s.showSampleDataUnlockCta?(a(),c(k,{key:0,type:"green",size:"small",onClick:i.connect,loading:i.loading},{default:p(()=>[C(d(u.strings.ctaButtonText),1)]),_:1},8,["onClick","loading"])):l("",!0),s.showSampleDataUnlockCta?l("",!0):(a(),c(k,{key:1,tag:"a",href:i.links.getPricingUrl("search-statistics","search-statistics-demo-upsell",t.$route.name),target:"_blank",type:"green",size:"small",onClick:i.searchStatisticsStore.showSampleReports,loading:i.loading},{default:p(()=>[C(d(u.strings.ctaUnlockButtonText),1)]),_:1},8,["href","onClick","loading"]))]),_:1}),(a(),c(y(t.$route.name)))],64)):l("",!0),s.showConnectCta?(a(),S("div",it,[i.searchStatisticsStore.shouldShowSampleReports?l("",!0):(a(),c(B,{key:0},{default:p(()=>[(a(),c(y(t.$route.name)))]),_:1})),i.searchStatisticsStore.shouldShowSampleReports?l("",!0):(a(),c(M,{key:1}))])):l("",!0),!s.showConnectCta&&!i.searchStatisticsStore.shouldShowSampleReports?(a(),c(y(t.$route.name),{key:2})):l("",!0)])]),_:1},8,["page-name","exclude-tabs","showTabs","containerClasses"])}const ze=_(at,[["render",nt]]);export{ze as default};