import{aX as se,p as W,q as Se,h as ye,c as K}from"./app-core.52885c02.js";import{C as Y}from"./Card.91e8fa10.js";import{C as we}from"./DonutChartWithLegend.0bf51e92.js";import{C as ae}from"./Button.7e4e5aaa.js";import{o as xe,w as ke,an as Ce,f as a,Q as u,R as d,a0 as _,P as oe,v as e,i as n,M as x,ae as p,U as o,O as F,ad as U,S,j as t,T as J,r as $,u as G,n as Te}from"./vendor-vue-ui.c21c50b5.js";import{u as Re}from"./IndexStatus.d8c68103.js";import{u as Ie}from"./PostTypes.77c34fbf.js";import{u as Le}from"./WpTable.d284dc05.js";import{C as E}from"./Tooltip.9761aafe.js";import{C as Pe}from"./Table.59bf9b43.js";import{S as Fe}from"./Caret.911868b5.js";import{a as Ae}from"./Pencil.886eeda5.js";import{S as N}from"./Trash.e939fb36.js";import{S as Z}from"./Link.1625083e.js";import{S as D}from"./External.508bedda.js";import{l as Oe}from"./vendor-lodash.b9aaf385.js";import{_ as f}from"./vendor-other.ec82d685.js";import{y as He}from"./Input.d5d0cc38.js";import{_ as Ve}from"./_plugin-vue_export-helper.eefbdd86.js";import{C as Ue}from"./Blur.733ff0bf.js";import{C as $e}from"./Index.8f92cf19.js";import{R as je}from"./RequiredPlans.3d75e621.js";import{u as Ge}from"./Cta.674c1e6d.js";import{u as Be}from"./License.0b49f66d.js";import"./Close.4a8424fd.js";import"./Slide.a69b6847.js";import"./DonutChart.a854383d.js";import"./AnimatedNumber.4884d078.js";import"./Loading.0b1aae81.js";import"./Calendar.7ce59e57.js";import"./Exclamation.7df31205.js";import"./Mobile.24062455.js";import"./ScrollTo.f4df02aa.js";import"./Index.df48fa2a.js";import"./Download.516acc07.js";import"./Row.2e668feb.js";const Me={class:"post-title"},Ee=["onClick"],Ne={key:0,class:"row-actions"},De={class:"edit"},We=["href"],qe=["href"],ze=["onClick"],Qe={class:"inner-row"},Xe={class:"inner-row__heading"},Ke={class:"inner-table inner-table--index-status"},Ye={key:0},Je={colspan:"4"},Ze={key:0},et={key:1},tt=["href"],st={scope:"col"},at={class:"inner-table__col inner-table__col--items-start"},ot={scope:"col"},lt={class:"inner-table__col inner-table__col--items-start"},it={scope:"col"},nt={class:"inner-table__col inner-table__col--items-start"},rt=["innerHTML"],ct={scope:"col"},dt={class:"inner-table__col inner-table__col--items-start"},ut={scope:"col"},ht={class:"inner-table__col inner-table__col--items-start"},pt=["innerHTML"],_t={scope:"col"},gt={class:"inner-table__col inner-table__col--items-start"},mt=["innerHTML"],bt={scope:"col"},ft={class:"inner-table__col inner-table__col--items-start"},vt=["innerHTML"],St={scope:"col"},yt={class:"inner-table__col inner-table__col--items-start"},wt=["innerHTML"],xt={key:0},kt={colspan:"4"},Ct=["href"],Tt={class:"inner-row__heading"},Rt={class:"inner-table"},It={class:"inner-table__col"},Lt=["href"],Pt={key:1},Ft={class:"inner-row__heading"},At={class:"inner-table"},Ot={class:"inner-table__col"},Ht=["href"],Vt={key:1},Ut={class:"inner-row__heading"},$t={class:"inner-table inner-table--rich-results"},jt={scope:"col"},Gt={class:"inner-table__col inner-table__col--items-start"},Bt={class:"rich-result-type__label"},Mt={colspan:"2"},Et={key:0,class:"rich-result-type-item-issues"},Nt={key:1},Dt={class:"inner-table__col"},Wt={key:1},qt={key:2},zt={colspan:"3"},Qt=["href"],Xt=["title"],Kt=["title"],Yt=["title"],Jt=["title"],Zt=["title"],es={key:0,class:"loader-overlay-table"},ee="searchStatisticsIndexStatus",te="index-status-objects-table",ts={__name:"ObjectsTable",props:{paginatedRows:Object,selectedStatus:String,showTableFooter:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0}},setup(k){const r="all-in-one-seo-pack",h=se(),v=W(),A=Se(),m={richResults:f("Rich Results",r),richResultTypes:f("Rich Result Types",r),richResultTypesHelp:f("Results of the Google Rich Results Test. These are the different schema graphs that are added to the post. Empty if no rich results were found.",r),indexStatusResult:f("Index Status Result",r),sitemaps:f("Sitemaps",r),sitemapsHelp:f("Any sitemaps that this URL was listed in, as known by Google. Not guaranteed to be an exhaustive list, especially if Google did not discover this URL through a sitemap. Empty if no entries in sitemaps were found.",r),referringPages:f("Referring URLs",r),referringPagesHelp:f("URLs that link to the inspected URL, directly and indirectly.",r),issues:f("Issues",r),noIssues:f("No issues",r),notAvailable:f("N/A",r)},R=k,P=$(new Set),y=$(new Set),C=$(null),{items:l,parseRichResults:O,strings:c}=Re(),{editPost:I,viewPost:j}=Ie(),{orderBy:T,orderDir:H,processAdditionalFilters:B,processChangeItemsPerPage:ie,processFilterTable:ne,processPagination:re,processSearch:ce,processSort:de,searchTerm:ue,selectedFilters:q,wpTableKey:he,wpTableLoading:z}=Le({changeItemsPerPageSlug:ee,fetchData:h.fetchIndexStatusObjects,tableId:te,tableRef:C.value,selectedFilters:{}}),pe=G(()=>R.selectedStatus?{...q.value,status:R.selectedStatus}:q.value),_e=G(()=>R.paginatedRows.totals.page),ge=G(()=>[{slug:"title",label:f("Title",r),sortable:1{w(b)},M=(b,i)=>{const w=l[i].parseValue(b[i]);let s=w?.description;return i==="verdict"&&b.coverageState&&(s=b.coverageState),s?`${w.value}
${s}
`:`${w.value}`},me=async b=>{C.value.activeRow=null,P.value.add(b.id);try{await v.getInspectionResult({paths:b.path,force:!0})}catch(i){console.error(i)}finally{P.value.delete(b.id);try{P.value.size||(R.paginatedRows.rows.forEach(i=>y.value.add(i.id)),await Promise.all([h.fetchIndexStatusOverview(),h.fetchIndexStatusObjects()]))}catch(i){console.error(i)}}},be=Oe(async b=>{b.forEach(i=>y.value.add(i.id));try{const i=b.map(w=>(P.value.add(w.id),w.path));await v.getInspectionResult({paths:i})}catch(i){console.error(i)}finally{b.forEach(i=>{P.value.delete(i.id)});try{await Promise.all([h.fetchIndexStatusOverview(),h.fetchIndexStatusObjects()])}catch(i){console.error(i)}}},2e3);return xe(async()=>{if(v.isConnected&&!v.shouldShowSampleReports&&!h.objects.paginated.rows.length)try{await Promise.all([h.fetchIndexStatusOverview(),h.fetchIndexStatusObjects()])}catch(b){console.error(b)}}),ke(()=>R.paginatedRows.rows,b=>{const i=b.filter(w=>!w.isInspectionValid&&!y.value.has(w.id));i.length&&be(i)}),(b,i)=>{const w=Ce("base-button");return a(),u(e(Pe),{ref_key:"table",ref:C,id:te,"additional-filters":Object.values(e(h).options?.table?.additionalFilters||{}),"selected-filters":pe.value,"bulk-options":[],columns:ge.value,filters:[],"initial-items-per-page":e(A).settings.tablePagination[ee],"initial-page-number":_e.value,"initial-search-term":k.paginatedRows?.searchTerm||e(ue),key:e(he),loading:e(z)||e(h).objects.fetching,rows:k.paginatedRows.rows,"show-bulk-actions":!1,"show-header":k.showHeader,"show-table-footer":k.showTableFooter,totals:k.paginatedRows.totals,"show-items-per-page":"",onFilterTable:e(ne),onPaginate:e(re),onProcessAdditionalFilters:i[0]||(i[0]=s=>e(B)({filters:s.filters,term:s.searchTerm,number:s.pageNumber})),onProcessChangeItemsPerPage:e(ie),onSearch:e(ce),onSortColumn:e(de)},{title:d(({row:s,index:g,editRow:L})=>[t("div",Me,[t("a",{href:"#",onClick:J(V=>Q(g,s,L),["prevent"]),class:"allow-click"},o(s.objectTitle),9,Ee)]),s?.objectId?(a(),n("div",Ne,[t("span",De,[t("a",{href:s?.permalink||"#",target:"_blank"},o(e(j)(s?.postTypeLabels?.singular||null)),9,We),i[1]||(i[1]=p(" | ",-1)),t("a",{href:s?.editLink||"#",target:"_blank"},o(e(I)(s?.postTypeLabels?.singular||null)),9,qe),i[2]||(i[2]=p(" | ",-1)),t("a",{href:"#",onClick:J(V=>me(s),["prevent","exact"])},o(e(c).refreshStatus),9,ze)])])):x("",!0)]),"edit-row":d(({row:s})=>[t("div",Qe,[t("div",Xe,o(m.indexStatusResult),1),t("table",Ke,[i[3]||(i[3]=t("thead",null,[t("tr",null,[t("th"),t("th"),t("th"),t("th")])],-1)),t("tbody",null,[s.lastCrawlTime?(a(),n(F,{key:1},[t("tr",null,[t("th",st,o(e(l).pageFetchState.title)+":",1),t("td",null,[t("div",at,[(a(),u(S(e(l).pageFetchState.getIcon(s.pageFetchState)),{width:"20",height:"20"})),p(" "+o(e(l).pageFetchState.parseValue(s.pageFetchState).value),1)])]),t("th",ot,o(e(l).crawledAs.title)+":",1),t("td",null,[t("div",lt,[(a(),u(S(e(l).crawledAs.getIcon(s.crawledAs)),{width:"20",height:"20",color:"#8C8F9A"})),p(" "+o(e(l).crawledAs.parseValue(s.crawledAs).value),1)])])]),t("tr",null,[t("th",it,o(e(l).indexingState.title),1),t("td",null,[t("div",nt,[(a(),u(S(e(l).indexingState.getIcon(s.indexingState)),{width:"20",height:"20"})),t("div",{innerHTML:M(s,"indexingState")},null,8,rt)])]),t("th",ct,o(e(l).lastCrawlTime.title)+":",1),t("td",null,[t("div",dt,[(a(),u(S(e(l).lastCrawlTime.getIcon(s.lastCrawlTime)),{width:"20",height:"20",color:"#8C8F9A"})),p(" "+o(e(l).lastCrawlTime.parseValue(s.lastCrawlTime).value),1)])])]),t("tr",null,[t("th",ut,o(e(l).verdict.title)+":",1),t("td",null,[t("div",ht,[(a(),u(S(e(l).verdict.getIcon(s.verdict)),{width:"20",height:"20"})),t("div",{innerHTML:M(s,"verdict")},null,8,pt)])]),t("th",_t,o(e(l).googleCanonical.title)+":",1),t("td",null,[t("div",gt,[(a(),u(S(e(l).googleCanonical.getIcon()),{width:"20",height:"20",color:"#8C8F9A"})),t("span",{innerHTML:e(l).googleCanonical.parseValue(s.googleCanonical).value},null,8,mt)])])]),t("tr",null,[t("th",bt,o(e(l).robotsTxtState.title)+":",1),t("td",null,[t("div",ft,[(a(),u(S(e(l).robotsTxtState.getIcon(s.robotsTxtState)),{width:"20",height:"20"})),t("div",{innerHTML:M(s,"robotsTxtState")},null,8,vt)])]),t("th",St,o(e(l).userCanonical.title)+":",1),t("td",null,[t("div",yt,[(a(),u(S(e(l).userCanonical.getIcon()),{width:"20",height:"20",color:"#8C8F9A"})),t("span",{innerHTML:e(l).userCanonical.parseValue(s.userCanonical).value},null,8,wt)])])]),s?.inspectionResultLink?(a(),n("tr",xt,[t("td",kt,[t("a",{class:"inner-table__inspection-link button-secondary",href:s.inspectionResultLink,target:"_blank"},[p(o(e(c).inspectOnGsc)+" ",1),_(e(D),{width:"12",height:"12"})],8,Ct)])])):x("",!0)],64)):(a(),n("tr",Ye,[t("td",Je,[s.coverageState&&s.indexingState!=="INDEXING_ALLOWED"?(a(),n("span",Ze,o(s.coverageState)+". ",1)):(a(),n("span",et,o(e(c).noResultsYetLowercase)+". ",1)),s?.inspectionResultLink?(a(),n("a",{key:2,class:"inner-table__inspection-link",href:s.inspectionResultLink,target:"_blank"},[p(o(e(c).inspectOnGsc)+" ",1),_(e(D),{width:"12",height:"12"})],8,tt)):x("",!0)])]))])]),s.lastCrawlTime?(a(),n(F,{key:0},[t("div",Tt,[p(o(m.sitemaps)+" ",1),_(e(E),{placement:"right"},{tooltip:d(()=>[p(o(m.sitemapsHelp),1)]),default:d(()=>[_(e(N))]),_:1})]),t("table",Rt,[t("tbody",null,[s.sitemap.length?(a(!0),n(F,{key:0},U(s.sitemap,(g,L)=>(a(),n("tr",{key:`sitemap-${L}`},[t("td",It,[_(e(Z),{width:20,height:20,color:"#8C8F9A"}),t("a",{href:g,target:"_blank"},o(g),9,Lt)])]))),128)):(a(),n("tr",Pt,[t("td",null,o(m.notAvailable),1)]))])]),t("div",Ft,[p(o(m.referringPages)+" ",1),_(e(E),{placement:"right"},{tooltip:d(()=>[p(o(m.referringPagesHelp),1)]),default:d(()=>[_(e(N))]),_:1})]),t("table",At,[t("tbody",null,[s.referringUrls.length?(a(!0),n(F,{key:0},U(s.referringUrls,(g,L)=>(a(),n("tr",{key:`sitemap-${L}`},[t("td",Ot,[_(e(Z),{width:20,height:20,color:"#8C8F9A"}),t("a",{href:g,target:"_blank"},o(g),9,Ht)])]))),128)):(a(),n("tr",Vt,[t("td",null,o(m.notAvailable),1)]))])]),t("div",Ut,[p(o(m.richResultTypes)+" ",1),_(e(E),{placement:"right"},{tooltip:d(()=>[p(o(m.richResultTypesHelp),1)]),default:d(()=>[_(e(N))]),_:1})]),t("table",$t,[i[4]||(i[4]=t("thead",null,[t("tr",null,[t("th"),t("th"),t("th")])],-1)),t("tbody",null,[(s.richResultsResult?.detectedItems||[]).length?(a(!0),n(F,{key:0},U(e(O)(s.richResultsResult),(g,L)=>(a(),n("tr",{key:`rich-result-type-${L}`},[t("th",jt,[t("div",Gt,[(a(),u(S(g.icon),{color:"#8C8F9A",fill:"currentColor"})),t("span",Bt,o(g.label),1)])]),t("td",Mt,[(a(!0),n(F,null,U(g.items,(V,fe)=>(a(),n("div",{class:"rich-result-type-item",key:`rich-result-type-item-${fe}`},[t("b",null,o(V.name),1),V.issues.length?(a(),n("div",Et,[t("b",null,o(m.issues),1),(a(!0),n(F,null,U(V.issues,(X,ve)=>(a(),n("div",{key:`rich-result-type-item-issue-${ve}`,class:"inner-table__col"},[(a(),u(S(X.icon()))),p(" "+o(X.message),1)]))),128))])):(a(),n("div",Nt,[t("div",Dt,[_(e(Ae),{width:"20",height:"20"}),p(" "+o(m.noIssues),1)])]))]))),128))])]))),128)):(a(),n("tr",Wt,[t("td",null,o(m.notAvailable),1)])),s?.richResultsTestLink?(a(),n("tr",qt,[t("td",zt,[t("a",{class:"inner-table__inspection-link button-secondary",href:s.richResultsTestLink,target:"_blank"},[p(o(e(c).testWithGoogle)+" ",1),_(e(D),{width:"12",height:"12"})],8,Qt)])])):x("",!0)])])],64)):x("",!0)])]),verdict:d(({row:s})=>[t("div",{title:e(l).verdict.parseValue(s.verdict).value},[(a(),u(S(e(l).verdict.getIcon(s.verdict)),{width:"20",height:"20"}))],8,Xt)]),robotsTxt:d(({row:s})=>[s.lastCrawlTime?(a(),n("div",{key:0,title:e(l).robotsTxtState.parseValue(s.robotsTxtState).value},[(a(),u(S(e(l).robotsTxtState.getIcon(s.robotsTxtState)),{width:"20",height:"20"}))],8,Kt)):x("",!0)]),crawledAs:d(({row:s})=>[s.lastCrawlTime?(a(),n("div",{key:0,title:e(l).crawledAs.parseValue(s.crawledAs).value},[(a(),u(S(e(l).crawledAs.getIcon(s.crawledAs)),{width:"20",height:"20",color:"#8C8F9A"}))],8,Yt)):x("",!0)]),pageFetch:d(({row:s})=>[s.lastCrawlTime?(a(),n("div",{key:0,title:e(l).pageFetchState.parseValue(s.pageFetchState).value},[(a(),u(S(e(l).pageFetchState.getIcon(s.pageFetchState)),{width:"20",height:"20"}))],8,Jt)):x("",!0)]),richResults:d(({row:s})=>[(s.richResultsResult?.detectedItems||[]).length?(a(!0),n(F,{key:0},U(e(O)(s.richResultsResult),g=>(a(),n("div",{class:"rich-result-type",key:`rich-result-type-${g.label}`},[(a(),u(S(g.icon),{fill:"currentColor"})),t("span",{class:"rich-result-type__label",title:g.label},o(g.label),9,Zt)]))),128)):x("",!0)]),lastCrawlTime:d(({row:s})=>[p(o(e(l).lastCrawlTime.parseValue(s.lastCrawlTime).value),1)]),buttons:d(({row:s,index:g,editRow:L})=>[_(w,{onClick:V=>Q(g,s,L),type:C.value?.activeRow===g?"blue":"gray",disabled:e(z),class:oe([{active:C.value?.activeRow===g},"btn-toggle-row allow-click"])},{default:d(()=>[_(e(Fe),{width:"20"})]),_:1},8,["onClick","type","disabled","class"]),P.value.has(s.id)?(a(),n("div",es,[_(e(ae))])):x("",!0)]),_:1},8,["additional-filters","selected-filters","columns","initial-items-per-page","initial-page-number","initial-search-term","loading","rows","show-header","show-table-footer","totals","onFilterTable","onPaginate","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}}},ss={class:"aioseo-donut-chart-with-legend-wrapper"},as={__name:"Index",setup(k){const r=se(),h="all-in-one-seo-pack",v={presenceOnGoogle:f("Presence on Google",h),tooltipPresenceOnGoogle:f("View at a glance how many of your posts have been indexed and discovered by Google.",h),indexOfIndividual:f("Post Index Status",h),tooltipIndexOfIndividual:f("The table below shows the index status of each of your posts, along with any extra information from Google that may be relevant as to why they are not indexed.",h),totalUrls:f("Total Posts",h)},A=$(null),m=$(""),R=G(()=>{const y=r.overview;if(!y)return[];const C=r.options.table.additionalFilters.statusOptions.options.filter(c=>!!c?.value).map(c=>({...c,regex:new RegExp(c.value,"i"),name:c.label,emitValue:c.value,link:"#"}));let l=0;const O=C.map((c,I)=>{const T=y.post.results.filter(H=>c.regex.test(H?.coverageState)).reduce((H,B)=>H+Number(B.count||0),0);return l+=T,{...c,count:T,ratio:I===0?100:y.post.total?T/y.post.total*100:0}}).map(c=>{if(c.value==="unknown|excluded|invalid|error"){const I=y.post.total-l;return{...c,count:c.count+I,ratio:y.post.total?(c.count+I)/y.post.total*100:0}}return c});return O.forEach((c,I)=>(I===0||O.forEach((j,T)=>(I{m.value=y,await Te(),A.value.$el.querySelector(".aioseo-wp-additional-filters button").click(),m.value=""};return(y,C)=>(a(),n("div",null,[_(e(Y),{slug:"presenceOnGoogle","header-text":v.presenceOnGoogle,toggles:!1,"no-slide":""},{"header-icon":d(()=>[_(e(He),{width:"24",height:"24"})]),tooltip:d(()=>[p(o(v.tooltipPresenceOnGoogle),1)]),default:d(()=>[t("div",ss,[e(r).overview===null?(a(),u(e(ae),{key:0,dark:""})):(a(),u(e(we),{key:1,total:e(r).overview.post.total,parts:R.value,label:v.totalUrls,onOnLabelClick:C[0]||(C[0]=l=>P(l))},null,8,["total","parts","label"]))])]),_:1},8,["header-text"]),_(e(Y),{slug:"indexOfIndividual","header-text":v.indexOfIndividual,toggles:!1,"no-slide":""},{tooltip:d(()=>[p(o(v.tooltipIndexOfIndividual),1)]),default:d(()=>[_(e(ts),{ref_key:"refObjectsTable",ref:A,"paginated-rows":e(r).objects.paginated,"selected-status":m.value},null,8,["paginated-rows","selected-status"])]),_:1},8,["header-text"])]))}},le=Ve(as,[["__scopeId","data-v-60ce8eda"]]),os={__name:"Blur",setup(k){return(r,h)=>(a(),u(e(Ue),null,{default:d(()=>[_(e(le))]),_:1}))}},ls={__name:"Index",setup(k){const{strings:r}=Ge(),h=ye(),v=W();return(A,m)=>(a(),n("div",null,[e(v).shouldShowSampleReports?x("",!0):(a(),u(e(os),{key:0})),e(v).shouldShowSampleReports?x("",!0):(a(),u(e($e),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:e(v).showSampleReports,"cta-link":e(K).getPricingUrl("search-statistics","search-statistics-upsell","index-status","liteUpgrade"),"button-text":e(r).ctaButtonText,"second-button-text":e(r).ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":e(K).getUpsellUrl("search-statistics","index-status","liteUpgrade"),"feature-list":[e(r).feature1,e(r).feature2,e(r).feature3,e(r).feature4],"align-top":"","hide-bonus":!e(h).isUnlicensed},{"header-text":d(()=>[p(o(e(r).ctaHeader),1)]),description:d(()=>[_(e(je),{"core-feature":["search-statistics"]}),p(" "+o(e(r).ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))]))}},Es={__name:"IndexStatus",setup(k){const r=W(),{shouldShowLite:h,shouldShowUpgrade:v}=Be();return(A,m)=>(e(v)("search-statistics","index-status")||e(h))&&!e(r).shouldShowSampleReports?(a(),u(e(ls),{key:0,class:"aioseo-search-statistics-index-status"})):(a(),u(e(le),{key:1,class:oe([{"aioseo-search-statistics-index-status--disable-click":e(r).shouldShowSampleReports},"aioseo-search-statistics-index-status"])},null,8,["class"]))}};export{Es as default};