import{u as Z}from"./AddonConditions.9fe985d0.js";import{_ as x}from"./_plugin-vue_export-helper.eefbdd86.js";import{f as i,i as v,j as m,an as l,Q as _,S as B,a0 as s,U as g,R as e,M as b,O as D,ad as I,P as R,ae as O,v as L}from"./vendor-vue-ui.c21c50b5.js";import{bi as Q,n as z,h as W,c as H}from"./app-core.52885c02.js";import{C as J}from"./Blur.733ff0bf.js";import{G as M,a as q}from"./Row.2e668feb.js";import{C as $}from"./Card.91e8fa10.js";import{C as F}from"./Tooltip.9761aafe.js";import{S as K}from"./Trash.e939fb36.js";import{a as V,b as X,S as Y}from"./InternalOutbound.cf8875df.js";import{S as tt}from"./External.508bedda.js";import{c as nt}from"./Pencil.886eeda5.js";import{U as et}from"./AnimatedNumber.4884d078.js";import{_ as a,a as E}from"./vendor-other.ec82d685.js";import{u as ot}from"./SeoSiteScore.dd511084.js";import{C as N}from"./DonutChartWithLegend.0bf51e92.js";import{m as st}from"./vendor-lodash.b9aaf385.js";import{C as it}from"./Tabs.0c075353.js";import{T as j,a as G}from"./Row.7cae5da2.js";import{R as at}from"./RequiredPlans.3d75e621.js";import{C as rt}from"./Index.8f92cf19.js";import"./Index.df48fa2a.js";import"./Close.4a8424fd.js";import"./Caret.911868b5.js";import"./Slide.a69b6847.js";import"./DonutChart.a854383d.js";import"./Loading.0b1aae81.js";import"./Button.7e4e5aaa.js";import"./ProBadge.3032531f.js";import"./Information.6d9ffde8.js";const lt={};function ct(n,t){return i(),v("div")}const ut=x(lt,[["render",ct]]),pt={},dt={viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-orphaned"};function _t(n,t){return i(),v("svg",dt,[...t[0]||(t[0]=[m("path",{d:"M13.875 3.87495H10.375V5.53745H13.875C15.3713 5.53745 16.5875 6.7537 16.5875 8.24995C16.5875 9.5012 15.73 10.5512 14.5663 10.8575L15.8438 12.135C17.27 11.4087 18.25 9.9562 18.25 8.24995C18.25 5.83495 16.29 3.87495 13.875 3.87495ZM13 7.37495H11.0838L12.8338 9.12495H13V7.37495ZM0.75 1.4862L3.47125 4.20745C2.66729 4.53457 1.97904 5.09383 1.49435 5.81385C1.00966 6.53387 0.750518 7.38199 0.75 8.24995C0.75 10.665 2.71 12.625 5.125 12.625H8.625V10.9625H5.125C3.62875 10.9625 2.4125 9.7462 2.4125 8.24995C2.4125 6.8587 3.47125 5.71245 4.8275 5.5637L6.63875 7.37495H6V9.12495H8.38875L10.375 11.1112V12.625H11.8888L15.3975 16.125L16.5 15.0225L1.86125 0.374954L0.75 1.4862Z",fill:"currentColor"},null,-1)])])}const mt=x(pt,[["render",_t]]),C="all-in-one-seo-pack",ft={components:{CoreTooltip:F,SvgCircleQuestionMark:K,SvgLinkAffiliate:X,SvgLinkExternal:tt,SvgLinkInternalInbound:V,SvgLinkOrphaned:mt,SvgSearch:nt,UtilAnimatedNumber:et},props:{type:{type:String,required:!0},count:{type:Number,required:!0}},data(){return{strings:{orphanedPostsDescription:a("Orphaned posts are posts that have no inbound internal links yet and may be more difficult to find by search engines.",C)},icons:[{type:"posts",name:a("Posts Crawled",C),icon:"svg-search"},{type:"external",name:a("External Links",C),icon:"svg-link-external"},{type:"internal",name:a("Internal Links",C),icon:"svg-link-internal-inbound"},{type:"affiliate",name:a("Affiliate Links",C),icon:"svg-link-affiliate"},{type:"orphaned",name:a("Orphaned Posts",C),icon:"svg-link-orphaned"}]}},computed:{getType(){return this.icons.find(n=>n.type===this.type)},getLink(){switch(this.type){case"posts":case"affiliate":case"internal":return"#/links-report?fullReport=1";case"external":return"#/domains-report";case"orphaned":return"#/links-report?orphaned-posts=1";default:return""}}}},kt=["href"],gt={class:"aioseo-link-count-top"},ht={class:"aioseo-link-count-bottom"},bt={class:"disabled-button gray"};function Lt(n,t,o,u,r,c){const f=l("util-animated-number"),d=l("svg-circle-question-mark"),k=l("core-tooltip");return i(),v("a",{class:"aioseo-link-count",href:c.getLink},[m("div",gt,[(i(),_(B(c.getType.icon))),s(f,{number:parseInt(o.count)},null,8,["number"])]),m("div",ht,[m("span",null,g(c.getType.name),1),o.type==="orphaned"?(i(),_(k,{key:0},{tooltip:e(()=>[m("span",null,g(r.strings.orphanedPostsDescription),1)]),default:e(()=>[m("div",bt,[s(d)])]),_:1})):b("",!0)])],8,kt)}const vt=x(ft,[["render",Lt]]),yt={components:{CoreCard:$,GridColumn:q,GridRow:M,LinkCount:vt},props:{totals:{type:Object,required:!0}}};function xt(n,t,o,u,r,c){const f=l("LinkCount"),d=l("grid-column"),k=l("grid-row"),y=l("core-card");return i(),_(y,{class:"aioseo-link-assistant-statistics",slug:"internalLinksOverviewCounter",toggles:!1,"no-slide":"","hide-header":""},{default:e(()=>[s(k,null,{default:e(()=>[s(d,{class:"counter divider-right",oneFifth:""},{default:e(()=>[s(f,{type:"posts",count:o.totals.crawledPosts},null,8,["count"])]),_:1}),s(d,{class:"counter divider-right",oneFifth:""},{default:e(()=>[s(f,{type:"orphaned",count:o.totals.orphanedPosts},null,8,["count"])]),_:1}),s(d,{class:"counter divider-right",oneFifth:""},{default:e(()=>[s(f,{type:"external",count:o.totals.externalLinks},null,8,["count"])]),_:1}),s(d,{class:"counter divider-right",oneFifth:""},{default:e(()=>[s(f,{type:"internal",count:o.totals.internalLinks},null,8,["count"])]),_:1}),s(d,{class:"counter",oneFifth:""},{default:e(()=>[s(f,{type:"affiliate",count:o.totals.affiliateLinks},null,8,["count"])]),_:1})]),_:1})]),_:1})}const Tt=x(yt,[["render",xt]]),S="all-in-one-seo-pack",wt={setup(){const{strings:n}=ot();return{composableStrings:n}},components:{CoreCard:$,CoreDonutChartWithLegend:N},props:{totals:{type:Object,required:!0}},data(){return{strings:st(this.composableStrings,{header:a("Internal vs External vs Affiliate Links",S),totalLinks:a("Total Links",S),linksReportLink:E('%2$s ',"#/links-report?fullReport=1",a("See a Full Links Report",S))})}},computed:{parts(){return[{slug:"external",name:a("External Links",S),count:this.totals.externalLinks},{slug:"affiliate",name:a("Affiliate Links",S),count:this.totals.affiliateLinks},{slug:"internal",name:a("Internal Links",S),count:this.totals.internalLinks}]},sortedParts(){const n=this.parts;return n.sort(function(t,o){return o.count>t.count?1:-1}),n[0].ratio=100,n[1].ratio=n[1].count/this.totals.totalLinks*100,n[2].ratio=n[2].count/this.totals.totalLinks*100,n.forEach(t=>{switch(t.slug){case"external":{t.color="#005AE0";break}case"internal":{t.color="#00AA63";break}case"affiliate":{t.color="#F18200";break}}}),n.filter(function(t){return t.count!==0}),n.forEach((t,o)=>(o===0||n.forEach((u,r)=>(o[s(f,{parts:c.sortedParts,total:o.totals.totalLinks,label:r.strings.totalLinks,link:r.strings.linksReportLink},null,8,["parts","total","label","link"])]),_:1},8,["header-text"])}const St=x(wt,[["render",Ct]]),T="all-in-one-seo-pack",Ot={components:{CoreCard:$,CoreMainTabs:it,CoreTooltip:F,SvgLinkInternalInbound:V,SvgLinkInternalOutbound:Y,TableColumn:G,TableRow:j},props:{linkingOpportunities:{type:Object,required:!0}},data(){return{activeTab:"inbound",strings:{linkingOpportunities:a("Linking Opportunities",T),noResults:a("No items found.",T)},link:E('%2$s ',"#/links-report?linkingOpportunities=1",a("See All Linking Opportunities",T)),tabs:[{slug:"inbound",name:a("Inbound Suggestions",T)},{slug:"outbound",name:a("Outbound Suggestions",T)}],columns:[{slug:"post-title",label:a("Post Title",T)},{slug:"suggestions-count",label:a("Count",T)}]}},computed:{opportunities(){return this.linkingOpportunities[this.activeTab]}}},At={class:"linking-opportunities-table"},Pt={class:"row"},Dt={key:0},It={key:1,class:"aioseo-tooltip-wrapper"},Rt=["innerHTML"],$t={class:"row"},Et=["href"],Ft={class:"count"},Ht={class:"count"},Ut={key:0,class:"links-report-link"},Bt=["innerHTML"];function Mt(n,t,o,u,r,c){const f=l("core-main-tabs"),d=l("core-tooltip"),k=l("table-column"),y=l("table-row"),A=l("router-link"),h=l("core-card");return i(),_(h,{class:"aioseo-link-assistant-linking-opportunities",slug:"linkAssistantLinkOpportunities","no-slide":"","header-text":r.strings.linkingOpportunities},{tabs:e(()=>[s(f,{tabs:r.tabs,showSaveButton:!1,active:r.activeTab,onChanged:t[0]||(t[0]=p=>r.activeTab=p),internal:""},null,8,["tabs","active"])]),default:e(()=>[m("div",null,[m("div",At,[c.opportunities?.length?(i(),_(y,{key:0,class:"header-row"},{default:e(()=>[(i(!0),v(D,null,I(r.columns,(p,P)=>(i(),_(k,{key:P,class:R(p.slug)},{default:e(()=>[m("div",Pt,[p.tooltipIcon?b("",!0):(i(),v("div",Dt,g(p.label),1)),p.tooltipIcon?(i(),v("div",It,[s(d,{class:"action"},{tooltip:e(()=>[m("span",{innerHTML:p.label},null,8,Rt)]),default:e(()=>[(i(),_(B(p.tooltipIcon)))]),_:2},1024)])):b("",!0)])]),_:2},1032,["class"]))),128))]),_:1})):b("",!0),(i(!0),v(D,null,I(c.opportunities,(p,P)=>(i(),_(y,{key:P,class:R(["row",{even:P%2===0}])},{default:e(()=>[s(k,{class:"post-title"},{default:e(()=>[m("div",$t,[s(d,{type:"action"},{tooltip:e(()=>[m("a",{class:"tooltip-url",href:p.permalink,target:"_blank"},g(p.postTitle),9,Et)]),default:e(()=>[s(A,{to:{name:"links-report",query:{postTitle:p.postTitle}}},{default:e(()=>[O(g(p.postTitle),1)]),_:2},1032,["to"])]),_:2},1024)])]),_:2},1024),r.activeTab==="inbound"?(i(),_(k,{key:0,class:"internal-inbound"},{default:e(()=>[m("span",Ft,g(p.inboundSuggestions),1)]),_:2},1024)):b("",!0),r.activeTab==="outbound"?(i(),_(k,{key:1,class:"internal-outbound"},{default:e(()=>[m("span",Ht,g(p.outboundSuggestions),1)]),_:2},1024)):b("",!0)]),_:2},1032,["class"]))),128)),c.opportunities?.length?b("",!0):(i(),_(y,{key:1,class:"row even"},{default:e(()=>[s(k,{class:"post-title"},{default:e(()=>[O(g(r.strings.noResults),1)]),_:1})]),_:1}))]),c.opportunities?.length?(i(),v("div",Ut,[m("span",{innerHTML:r.link},null,8,Bt)])):b("",!0)])]),_:1},8,["header-text"])}const qt=x(Ot,[["render",Mt]]),w="all-in-one-seo-pack",Vt={components:{CoreCard:$,CoreTooltip:F,CoreDonutChartWithLegend:N,TableColumn:G,TableRow:j},props:{totals:{type:Object,required:!0},mostLinkedDomains:{type:Array,required:!0}},data(){return{numbers:z,strings:{mostLinkedDomains:a("Most Linked to Domains",w),totalExternalLinks:a("Total External Links",w),noResults:a("No items found.",w),link:E('%2$s ',"#/domains-report?fullReport=1",a("See a Full Domains Report",w))}}},computed:{sortedParts(){const n=this.mostLinkedDomains.map(o=>o).splice(0,3);let t=this.totals.externalLinks;return n[0]&&(n[0].color="#005AE0",n[0].ratio=100,t=t-n[0].count),n[1]&&(n[1].color="#80ACF0",n[1].ratio=n[1].count/this.totals.externalLinks*100,t=t-n[1].count),n[2]&&(n[2].color="#BFD6F7",n[2].ratio=n[2].count/this.totals.externalLinks*100,t=t-n[2].count),t&&n.push({name:a("other domains",w),color:"#E8E8EB",count:t,ratio:t/this.totals.externalLinks*100,last:!0}),n.filter(function(o){return o.count!==0}).sort(function(o,u){return parseInt(u.count)>parseInt(o.count)?1:-1}),n.forEach((o,u)=>(u===0||n.forEach((r,c)=>(u[s(f,{parts:c.sortedParts,total:o.totals.externalLinks,label:r.strings.totalExternalLinks,link:r.strings.link},null,8,["parts","total","label","link"]),m("div",Nt,[s(k,{class:"header-row"},{default:e(()=>[(i(!0),v(D,null,I(c.columns,(h,p)=>(i(),_(d,{key:p,class:R(h.slug)},{default:e(()=>[O(g(h.label),1)]),_:2},1032,["class"]))),128))]),_:1}),(i(!0),v(D,null,I(o.mostLinkedDomains,(h,p)=>(i(),_(k,{key:p,class:R(["row",{even:p%2===0}])},{default:e(()=>[s(d,{class:"domain"},{default:e(()=>[m("div",jt,[c.getFaviconUrl(h.name)?(i(),v("img",{key:0,alt:"Domain Favicon",class:"favicon",src:c.getFaviconUrl(h.name)},null,8,Gt)):b("",!0),s(y,{type:"action"},{tooltip:e(()=>[m("a",{class:"tooltip-url",href:`https://${h.name}`,target:"_blank"},g(h.name),9,Qt)]),default:e(()=>[m("a",{class:"domain-name",href:`#/domains-report?hostname=${h.name}`},g(h.name),9,Zt)]),_:2},1024)])]),_:2},1024),s(d,{class:"count"},{default:e(()=>[m("span",null,g(r.numbers.numberFormat(h.count)),1)]),_:2},1024)]),_:2},1032,["class"]))),128)),o.mostLinkedDomains.length?b("",!0):(i(),_(k,{key:0,class:"row even"},{default:e(()=>[s(d,{class:"domain"},{default:e(()=>[O(g(r.strings.noResults),1)]),_:1})]),_:1}))])]),_:1},8,["header-text"])}const Wt=x(Vt,[["render",zt]]),Jt={components:{CoreBlur:J,GridColumn:q,GridRow:M,LinkCounts:Tt,LinkRatio:St,LinkingOpportunities:qt,MostLinkedDomains:Wt},props:{showTotals:{type:Boolean,default(){return!0}}},computed:{totals(){return{crawledPosts:102,externalLinks:753,internalLinks:56,affiliateLinks:175,orphanedPosts:78,totalLinks:984}},linkingOpportunities(){return[{postTitle:"Test Post Title 1",postId:"123",suggestionsInbound:"2",suggestionsOutbound:"13"},{postTitle:"Test Post Title 2",postId:"124",suggestionsInbound:"2",suggestionsOutbound:"13"},{postTitle:"Test Post Title 3",postId:"125",suggestionsInbound:"2",suggestionsOutbound:"13"},{postTitle:"Test Post Title 4",postId:"126",suggestionsInbound:"2",suggestionsOutbound:"13"},{postTitle:"Test Post Title 5",postId:"127",suggestionsInbound:"2",suggestionsOutbound:"13"}]},mostLinkedDomains(){return[{name:"aioseo.com",count:100},{name:"wpbeginner.com",count:99},{name:"wpforms.com",count:50},{name:"optinmonster.com",count:40},{name:"monsterinsights.com",count:30},{name:"smashballoon.com",count:20},{name:"exactmetrics.com",count:10},{name:"seedprod.com",count:5},{name:"awesomemotive.com",count:4},{name:"easydigitaldownloads.com",count:3}]}}};function Kt(n,t,o,u,r,c){const f=l("link-counts"),d=l("grid-column"),k=l("grid-row"),y=l("link-ratio"),A=l("linking-opportunities"),h=l("most-linked-domains"),p=l("core-blur");return i(),_(p,null,{default:e(()=>[o.showTotals?(i(),_(k,{key:0,class:"overview-link-count"},{default:e(()=>[s(d,null,{default:e(()=>[s(f,{totals:c.totals},null,8,["totals"])]),_:1})]),_:1})):b("",!0),s(k,null,{default:e(()=>[s(d,{md:"6"},{default:e(()=>[s(y,{totals:c.totals},null,8,["totals"]),s(A,{"linking-opportunities":c.linkingOpportunities},null,8,["linking-opportunities"])]),_:1}),s(d,{md:"6"},{default:e(()=>[s(h,{totals:c.totals,"most-linked-domains":c.mostLinkedDomains},null,8,["totals","most-linked-domains"])]),_:1})]),_:1})]),_:1})}const Xt=x(Jt,[["render",Kt]]),Yt={class:"aioseo-link-assistant-overview"},U={__name:"Overview",setup(n){const t="all-in-one-seo-pack",o=W(),u={ctaButtonText:a("Unlock Link Assistant",t),ctaHeader:E(a("Link Assistant is a %1$s Feature",t),"PRO"),linkAssistantDescription:a("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",t),linkOpportunities:a("Actionable Link Suggestions",t),orphanedPosts:a("See Orphaned Posts",t),affiliateLinks:a("See Affiliate Links",t),domainReports:a("Top Domain Reports",t)};return(r,c)=>(i(),v("div",Yt,[s(L(Xt)),s(L(rt),{class:"aioseo-link-assistant-cta","cta-link":L(H).getPricingUrl("link-assistant","link-assistant-upsell","overview","liteUpgrade"),"button-text":u.ctaButtonText,"learn-more-link":L(H).getUpsellUrl("link-assistant","overview","liteUpgrade"),"feature-list":[u.linkOpportunities,u.domainReports,u.orphanedPosts,u.affiliateLinks],"align-top":"","hide-bonus":!L(o).isUnlicensed},{"header-text":e(()=>[O(g(u.ctaHeader),1)]),description:e(()=>[s(L(at),{addon:"aioseo-link-assistant"}),O(" "+g(u.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]))}},tn={class:"aioseo-link-assistant-overview"},In={__name:"Overview",setup(n){const{shouldShowActivate:t,shouldShowLite:o,shouldShowMain:u,shouldShowUpdate:r}=Z({addonSlug:"aioseo-link-assistant"});return(c,f)=>(i(),v("div",tn,[L(u)?(i(),_(L(U),{key:0})):b("",!0),L(r)||L(t)?(i(),_(L(ut),{key:1})):b("",!0),L(o)?(i(),_(L(U),{key:2})):b("",!0)]))}};export{In as default};