PageSourceSearch

https://boombam.app/assets/backlink-analysis-BmJ9tZXC.js

js boombam.app collected 2026-10-04 13:34:12 UTC 21,153 bytes, 2 lines download raw bytes

1import{N as we,a5 as De,r as h,a as Se,a6 as A,j as e,aE as _,X as G,aZ as C,aY as z,T as X,l as W,C as l,b as m,d as j,o as b,e as r,ab as g,aF as Ae,$ as ee,a0 as se,a1 as ae,a2 as ne,a3 as u,bd as B,B as v,a4 as ie,V as Ce,D as I,s as o,bM as N,bN as w,bO as x,bP as n,bQ as D,bR as i,bU as Te,E as Pe,au as Le,c2 as d,a7 as T}from"./index-CuSEeJFb.js";import{T as Re,a as Fe,b as y,c as p}from"./tabs-CcPOXtvT.js";import{P as te}from"./progress-B2eMqtVV.js";import{H as E}from"./history-CN2Tjn9d.js";import{C as ze}from"./copy-Ctw93tQ7.js";function He(){const{activeCompanyId:k}=we(),P=De(),[O,$]=h.useState(!1),[le,L]=h.useState("analyze"),[a,H]=h.useState(null),[R,re]=h.useState(""),[M,ce]=h.useState("domain"),[q,de]=h.useState(!1),[V,oe]=h.useState(!0),[Q,xe]=h.useState(!0),[U,he]=h.useState(100),{data:F,isLoading:me}=Se({queryKey:["/api/seo-history/backlink-analysis",{companyId:k}],enabled:!!k}),Z=(F==null?void 0:F.data)||[],je=A({mutationFn:async s=>(await T("/api/seo-history/backlink-analysis",{method:"POST",body:JSON.stringify(s)})).json(),onSuccess:()=>{P.invalidateQueries({queryKey:["/api/seo-history/backlink-analysis"]}),d({title:"Analysis Saved",description:"Your backlink analysis has been saved to history."})},onError:s=>{d({title:"Save Failed",description:s.message||"Failed to save analysis to history",variant:"destructive"})}}),K=A({mutationFn:async({id:s,isStarred:t})=>(await T(`/api/seo-history/backlink-analysis/${s}`,{method:"PATCH",body:JSON.stringify({isStarred:t})})).json(),onSuccess:()=>{P.invalidateQueries({queryKey:["/api/seo-history/backlink-analysis"]}),d({title:"Updated",description:"Analysis has been updated."})},onError:s=>{d({title:"Update Failed",description:s.message||"Failed to update analysis",variant:"destructive"})}}),J=A({mutationFn:async s=>(await T(`/api/seo-history/backlink-analysis/${s}`,{method:"DELETE"})).json(),onSuccess:()=>{P.invalidateQueries({queryKey:["/api/seo-history/backlink-analysis"]}),d({title:"Deleted",description:"Analysis has been deleted from history."})},onError:s=>{d({title:"Delete Failed",description:s.message||"Failed to delete analysis",variant:"destructive"})}}),ge=A({mutationFn:async s=>(await T("/api/backlinks/analyze",{method:"POST",body:JSON.stringify(s)})).json(),onSuccess:(s,t)=>{var f;const c=s.data;if(H(c),L("overview"),d({title:"Backlink Analysis Complete",description:`Found ${c.totalBacklinks} backlinks from ${c.totalReferringDomains} domains.`}),k){const S=`Backlink Analysis - ${t.targetDomain}`;je.mutate({companyId:k,title:S,targetDomain:t.targetDomain,analysisMode:t.mode||"domain",totalBacklinks:c.totalBacklinks||0,referringDomains:c.totalReferringDomains||
10,domainRank:Math.round(((f=c.linkProfile)==null?void 0:f.averageDomainRank)||0),results:c})}},onError:s=>{d({title:"Analysis Failed",description:s.message||"Failed to analyze backlinks",variant:"destructive"})},onSettled:()=>{$(!1)}}),ue=async s=>{if(s.preventDefault(),!k){d({title:"Company Required",description:"Please select a company before analyzing backlinks",variant:"destructive"});return}if(!R.trim()){d({title:"Domain Required",description:"Please enter a target domain to analyze",variant:"destructive"});return}const t=/^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/,c=R.replace(/^https?:\/\//,"").replace(/^www\./,"").split("/")[0];if(!t.test(c)){d({title:"Invalid Domain",description:"Please enter a valid domain (e.g., example.com)",variant:"destructive"});return}$(!0),ge.mutate({targetDomain:c,mode:M,includeCompetitors:q,includeAnchors:V,includePages:Q,limit:U,companyId:k})},Y=s=>{switch(s){case"follow":return"bg-green-100 text-green-800";case"nofollow":return"bg-red-100 text-red-800";case"mixed":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},ye=s=>{switch(s){case"easy":return"bg-green-100 text-green-800";case"medium":return"bg-yellow-100 text-yellow-800";case"hard":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},pe=s=>{navigator.clipboard.writeText(s.join(`
2`)),d({title:"Domains Copied",description:`Copied ${s.length} domains to clipboard`})},ke=s=>{var t,c,f,S;if(s.results){const Ne={targetDomain:s.targetDomain,totalBacklinks:s.totalBacklinks||0,totalReferringDomains:s.referringDomains||
20,totalReferringIPs:((t=s.results.overview)==null?void 0:t.referringIPs)||0,totalReferringSubnets:((c=s.results.overview)==null?void 0:c.referringSubnets)||0,backlinks:s.results.backlinks||[],referringDomains:s.results.referringDomains||[],anchorAnalysis:s.results.anchorAnalysis||[],topPages:s.results.topPages||[],linkProfile:s.results.linkProfile||{dofollowPercentage:0,nofollowPercentage:0,textLinks:0,imageLinks:0,averageDomainRank:s.domainRank||0},competitors:s.results.competitors||[],opportunities:s.results.opportunities||[],analyzedAt:((f=s.analyzedAt)==null?void 0:f.toString())||((S=s.createdAt)==null?void 0:S.toString())||new Date().toISOString()};H(Ne),L("overview"),d({title:"Loaded from History",description:`Viewing results for "${s.title}"`})}},be=s=>{K.mutate({id:s.id,isStarred:!s.isStarred})},fe=s=>{J.mutate(s)},ve=s=>s?new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):"N/A";return e.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:"🔗 Backlink Analysis"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Comprehensive backlink research using live DataForSEO Backlinks API"})]}),e.jsxs(Re,{value:le,onValueChange:L,className:"space-y-6",children:[e.jsxs(Fe,{className:"grid w-full grid-cols-7",children:[e.jsxs(y,{value:"analyze","data-testid":"tab-analyze",children:[e.jsx(_,{className:"w-4 h-4 mr-2"}),"Analyze"]}),e.jsxs(y,{value:"overview","data-testid":"tab-overview",children:[e.jsx(G,{className:"w-4 h-4 mr-2"}),"Overview"]}),e.jsxs(y,{value:"backlinks","data-testid":"tab-backlinks",children:[e.jsx(C,{className:"w-4 h-4 mr-2"}),"Backlinks"]}),e.jsxs(y,{value:"domains","data-testid":"tab-domains",children:[e.jsx(z,{className:"w-4 h-4 mr-2"}),"Domains"]}),e.jsxs(y,{value:"anchors","data-testid":"tab-anchors",children:[e.jsx(X,{className:"w-4 h-4 mr-2"}),"Anchors"]}),e.jsxs(y,{value:"opportunities","data-testid":"tab-opportunities",children:[e.jsx(W,{className:"w-4 h-4 mr-2"}),"Opportunities"]}),e.jsxs(y,{value:"history","data-testid":"tab-history",children:[e.jsx(E,{className:"w-4 h-4 mr-2"}),"History"]})]}),e.jsx(p,{value:"analyze",className:"space-y-6",children:e.jsxs(l,{children:[e.jsxs(m,{children:[e.jsxs(j,{className:"flex items-center gap-2",children:[e.jsx(C,{className:"w-5 h-5 text-orange-600"}),"Backlink Analysis Setup"]}),e.jsx(b,{children:"Analyze backlink profile using live DataForSEO Backlinks API"})]}),e.jsx(r,{children:e.jsxs("form",{onSubmit:ue,className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(g,{htmlFor:"domain",children:"Target Domain"}),e.jsx(Ae,{id:"domain",placeholder:"example.com",value:R,onChange:s=>re(s.target.value),"data-testid":"input-domain"}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Enter the domain to analyze backlinks for"})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"mode",children:"Analysis Mode"}),e.jsxs(ee,{value:M,onValueChange:ce,children:[e.jsx(se,{"data-testid":"select-mode",children:e.jsx(ae,{})}),e.jsxs(ne,{children:[e.jsx(u,{value:"domain",children:"Entire Domain"}),e.jsx(u,{value:"subdomain",children:"Subdomain Only"}),e.jsx(u,{value:"exact_url",children:"Exact URL Only"})]})]})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"limit",children:"Results Limit"}),e.jsxs(ee,{value:U.toString(),onValueChange:s=>he(parseInt(s)),children:[e.jsx(se,{"data-testid":"select-limit",children:e.jsx(ae,{})}),e.jsxs(ne,{children:[e.jsx(u,{value:"50",children:"Quick (50 backlinks)"}),e.jsx(u,{value:"100",children:"Standard (100 backlinks)"}),e.jsx(u,{value:"250",children:"Detailed (250 backlinks)"}),e.jsx(u,{value:"500",children:"Comprehensive (500 backlinks)"})]})]})]})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsx(g,{children:"Analysis Options"}),e.jsxs("div",{className:"space-y-3 mt-2",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(B,{id:"anchors",checked:V,onCheckedChange:oe,"data-testid":"checkbox-anchors"}),e.jsx(g,{htmlFor:"anchors",children:"Include Anchor Text Analysis"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(B,{id:"pages",checked:Q,onCheckedChange:xe,"data-testid":"checkbox-pages"}),e.jsx(g,{htmlFor:"pages",children:"Include Top Pages Analysis"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(B,{id:"competitors",checked:q,onCheckedChange:de,"data-testid":"checkbox-competitors"}),e.jsx(g,{htmlFor:"competitors",children:"Include Competitor Analysis"})]})]})]})})]}),e.jsx(v,{type:"submit",disabled:O,className:"w-full bg-orange-600 hover:bg-orange-700","data-testid":"button-analyze",children:O?e.jsxs(e.Fragment,{children:[e.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing Backlinks..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"w-4 h-4 mr-2"}),"Analyze Backlinks"]})})]})})]})}),e.jsx(p,{value:"overview",className:"space-y-6",children:a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsx(l,{children:e.jsx(r,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{className:"w-5 h-5 text-blue-600"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Total Backlinks"}),e.jsx("p",{className:"text-2xl font-bold",children:a.totalBacklinks.toLocaleStr
2ing()})]})]})})}),e.jsx(l,{children:e.jsx(r,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-green-600"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Referring Domains"}),e.jsx("p",{className:"text-2xl font-bold text-green-600",children:a.totalReferringDomains.toLocaleString()})]})]})})}),e.jsx(l,{children:e.jsx(r,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"w-5 h-5 text-orange-600"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Avg Domain Rank"}),e.jsx("p",{className:"text-2xl font-bold text-orange-600",children:a.linkProfile.averageDomainRank.toFixed(1)})]})]})})}),e.jsx(l,{children:e.jsx(r,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{className:"w-5 h-5 text-yellow-600"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Dofollow %"}),e.jsxs("p",{className:"text-2xl font-bold text-yellow-600",children:[a.linkProfile.dofollowPercentage.toFixed(1),"%"]})]})]})})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs(l,{children:[e.jsx(m,{children:e.jsx(j,{children:"Link Profile"})}),e.jsx(r,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{children:"Dofollow Links"}),e.jsxs("span",{children:[a.linkProfile.dofollowPercentage.toFixed(1),"%"]})]}),e.jsx(te,{value:a.linkProfile.dofollowPercentage,className:"h-2"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-2",children:[e.jsx("span",{children:"Nofollow Links"}),e.jsxs("span",{children:[a.linkProfile.nofollowPercentage.toFixed(1),"%"]})]}),e.jsx(te,{value:a.linkProfile.nofollowPercentage,className:"h-2"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-4",children:[e.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded",children:[e.jsx("p",{className:"text-2xl font-bold text-blue-600",children:a.linkProfile.textLinks}),e.jsx("p",{className:"text-sm text-gray-600",children:"Text Links"})]}),e.jsxs("div",{className:"text-center p-3 bg-gray-50 rounded",children:[e.jsx("p",{className:"text-2xl font-bold text-green-600",children:a.linkProfile.imageLinks}),e.jsx("p",{className:"text-sm text-gray-600",children:"Image Links"})]})]})]})})]}),e.jsxs(l,{children:[e.jsx(m,{children:e.jsx(j,{children:"Network Diversity"})}),e.jsx(r,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Referring IPs"}),e.jsx(o,{variant:"outline",children:a.totalReferringIPs.toLocaleString()})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Referring Subnets"}),e.jsx(o,{variant:"outline",children:a.totalReferringSubnets.toLocaleString()})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Target Domain"}),e.jsx(o,{variant:"outline",children:a.targetDomain})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Analyzed"}),e.jsx(o,{variant:"outline",children:new Date(a.analyzedAt).toLocaleDateString()})]})]})})]})]})]}):e.jsx(l,{children:e.jsxs(r,{className:"p-8 text-center",children:[e.jsx(G,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-600 mb-2",children:"No Analysis Data"}),e.jsx("p",{className:"text-gray-500",children:"Start a backlink analysis to see comprehensive results here."})]})})}),e.jsx(p,{value:"backlinks",className:"space-y-6",children:a!=null&&a.backlinks?e.jsxs(l,{children:[e.jsxs(m,{children:[e.jsx(j,{children:"Recent Backlinks"}
2),e.jsxs(b,{children:["Latest backlinks found for ",a.targetDomain]})]}),e.jsx(r,{children:e.jsxs(N,{children:[e.jsx(w,{children:e.jsxs(x,{children:[e.jsx(n,{children:"Source Domain"}),e.jsx(n,{children:"Anchor Text"}),e.jsx(n,{children:"Link Type"}),e.jsx(n,{children:"Domain Rank"}),e.jsx(n,{children:"First Seen"}),e.jsx(n,{})]})}),e.jsx(D,{children:a.backlinks.map((s,t)=>e.jsxs(x,{children:[e.jsx(i,{className:"font-medium",children:s.sourceDomain}),e.jsx(i,{className:"max-w-xs truncate",children:s.anchorText||"No anchor"}),e.jsx(i,{children:e.jsx(o,{className:Y(s.linkType),children:s.linkType})}),e.jsx(i,{children:s.domainRank}),e.jsx(i,{children:new Date(s.firstSeen).toLocaleDateString()}),e.jsx(i,{children:e.jsx("a",{href:s.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:e.jsx(Te,{className:"w-4 h-4"})})})]},t))})]})})]}):e.jsx(l,{children:e.jsxs(r,{className:"p-8 text-center",children:[e.jsx(C,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-600 mb-2",children:"No Backlink Data"}),e.jsx("p",{className:"text-gray-500",children:"Run a backlink analysis to see detailed backlink information."})]})})}),e.jsx(p,{value:"domains",className:"space-y-6",children:a!=null&&a.referringDomains?e.jsxs(l,{children:[e.jsx(m,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(j,{children:"Top Referring Domains"}),e.jsxs(b,{children:["Domains with the most backlinks to ",a.targetDomain]})]}),e.jsxs(v,{variant:"outline",size:"sm",onClick:()=>pe(a.referringDomains.map(s=>s.domain)),children:[e.jsx(ze,{className:"w-4 h-4 mr-2"}),"Copy Domains"]})]})}),e.jsx(r,{children:e.jsxs(N,{children:[e.jsx(w,{children:e.jsxs(x,{children:[e.jsx(n,{children:"Domain"}),e.jsx(n,{children:"Backlinks"}),e.jsx(n,{children:"Domain Rank"}),e.jsx(n,{children:"Link Type"}),e.jsx(n,{children:"First Seen"})]})}),e.jsx(D,{children:a.referringDomains.map((s,t)=>e.jsxs(x,{children:[e.jsx(i,{className:"font-medium",children:s.domain}),e.jsx(i,{children:s.backlinks}),e.jsx(i,{children:s.domainRank}),e.jsx(i,{children:e.jsx(o,{className:Y(s.linkType),children:s.linkType})}),e.jsx(i,{children:new Date(s.firstSeen).toLocaleDateString()})]},t))})]})})]}):e.jsx(l,{children:e.jsxs(r,{className:"p-8 text-center",children:[e.jsx(z,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-600 mb-2",children:"No Domain Data"}),e.jsx("p",{className:"text-gray-500",children:"Run a backlink analysis to see referring domains."})]})})}),e.jsx(p,{value:"anchors",className:"space-y-6",children:a!=null&&a.anchorAnalysis?e.jsxs(l,{children:[e.jsxs(m,{children:[e.jsx(j,{children:"Anchor Text Distribution"}),e.jsx(b,{children:"Most common anchor texts used in backlinks"})]}),e.jsx(r,{children:e.jsxs(N,{children:[e.jsx(w,{children:e.jsxs(x,{children:[e.jsx(n,{children:"Anchor Text"}),e.jsx(n,{children:"Backlinks"}),e.jsx(n,{children:"Referring Domains"}),e.jsx(n,{children:"Percentage"}),e.jsx(n,{children:"Category"})]})}),e.jsx(D,{children:a.anchorAnalysis.map((s,t)=>e.jsxs(x,{children:[e.jsx(i,{className:"font-medium max-w-xs truncate",children:s.anchorText}),e.jsx(i,{children:s.backlinks}),e.jsx(i,{children:s.referringDomains}),e.jsxs(i,{children:[s.percentage.toFixed(1),"%"]}),e.jsx(i,{children:e.jsx(o,{variant:"outline",children:s.category})})]},t))})]})})]}):e.jsx(l,{children:e.jsxs(r,{className:"p-8 text-center",children:[e.jsx(X,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-600 mb-2",children:"No Anchor Data"}),e.jsx("p",{className:"text-gray-500",children:'Run backlink analysis with "Include Anchor Text Analysis" enabled.'})]})})}),e.jsx(p,{value:"opportunities",className:"space-y-6",children:a!=null&&a.opportunities?e.jsxs(l,{children:[e.jsxs(m,{children:[e.jsx(j,{children:"Link Building Opportunities"}),e.jsx(b,{children:"Potential backlink opportunities based on competitor analysis"})]}),e.jsx(r,{children:e.jsxs(N,{children:[e.jsx(w,{children:e.jsxs(x,{children:[e.jsx(n,{children:"Domain"}),e.jsx(n,{children:"Domain Rank"}),e.jsx(n,{children:"Their Backlinks"}),e.jsx(n,{children:"Opportunity Score"}),e.jsx(n,{children:"Difficulty"}),e.jsx(n,{children:"Reason"})]})}),e.jsx(D,{children:a.opportunities.map((s,t)=>e.jsxs(x,{children:[e.jsx(i,{className:"font-medium",children:s.domain}),e.jsx(i,{children:s.domainRank}),e.jsx(i,{children:s.backlinks}),e.jsx(i,{children:e.jsxs(o,{variant:"outline",children:[s.opportunityScore,"/100"]})}),e.jsx(i,{children:e.jsx(o,{className:ye(s.difficulty),children:s.difficulty})}),e.jsx(i,{className:"max-w-md",children:s.reason})]},t))})]})})]}):e.jsx(l,{children:e.jsxs(r,{className:"p-8 text-center",children:[e.jsx(W,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-600 mb-2",children:"No Opp
2ortunities"}),e.jsx("p",{className:"text-gray-500",children:'Run backlink analysis with "Include Competitor Analysis" to find opportunities.'})]})})}),e.jsx(p,{value:"history",className:"space-y-6",children:e.jsxs(l,{children:[e.jsxs(m,{children:[e.jsxs(j,{className:"flex items-center gap-2",children:[e.jsx(E,{className:"w-5 h-5 text-orange-600"}),"Analysis History"]}),e.jsx(b,{children:"View and manage your past backlink analysis sessions"})]}),e.jsx(r,{children:me?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx(ie,{className:"w-8 h-8 animate-spin text-orange-600"})}):Z.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx(E,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-gray-600 mb-2",children:"No History Yet"}),e.jsx("p",{className:"text-gray-500",children:"Complete a backlink analysis to see it here."})]}):e.jsxs(N,{children:[e.jsx(w,{children:e.jsxs(x,{children:[e.jsx(n,{children:"Title"}),e.jsx(n,{children:"Domain"}),e.jsx(n,{children:"Total Backlinks"}),e.jsx(n,{children:"Referring Domains"}),e.jsx(n,{children:"Date"}),e.jsx(n,{children:"Actions"})]})}),e.jsx(D,{children:Z.map(s=>e.jsxs(x,{"data-testid":`history-row-${s.id}`,children:[e.jsx(i,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-2",children:[s.isStarred&&e.jsx(I,{className:"w-4 h-4 text-yellow-500 fill-yellow-500"}),s.title]})}),e.jsx(i,{children:e.jsx(o,{variant:"secondary",children:s.targetDomain})}),e.jsx(i,{children:(s.totalBacklinks||0).toLocaleString()}
2),e.jsx(i,{children:(s.referringDomains||0).toLocaleString()}),e.jsx(i,{children:ve(s.createdAt)}),e.jsx(i,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{variant:"outline",size:"sm",onClick:()=>ke(s),"data-testid":`button-view-${s.id}`,children:e.jsx(Pe,{className:"w-4 h-4"})}),e.jsx(v,{variant:"outline",size:"sm",onClick:()=>be(s),disabled:K.isPending,"data-testid":`button-star-${s.id}`,children:e.jsx(I,{className:`w-4 h-4 ${s.isStarred?"text-yellow-500 fill-yellow-500":""}`})}),e.jsx(v,{variant:"outline",size:"sm",onClick:()=>fe(s.id),disabled:J.isPending,className:"text-red-600 hover:text-red-700 hover:bg-red-50","data-testid":`button-delete-${s.id}`,children:e.jsx(Le,{className:"w-4 h-4"})})]})})]},s.id))})]})})]})})]})]})})}export{He as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.