1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9948],{39948:(e,s,t)=>{t.d(s,{Ex:()=>h,_m:()=>ev,Zp:()=>b,Ct:()=>$,U1:()=>H,ww:()=>E,xj:()=>q,Th:()=>B,pp:()=>S,bU:()=>L,wn:()=>G,l7:()=>z,Dr:()=>D,zY:()=>N,P6:()=>ea,FT:()=>eA,Lm:()=>eI,sz:()=>eM,Qt:()=>R,OK:()=>ei});var a=t(95155),n=t(12115);let l={primary:"\n bg-amber-500 hover:bg-amber-400 active:bg-amber-600\n text-neutral-900 \n border-transparent\n focus:ring-amber-500/50\n shadow-sm hover:shadow\n ",secondary:"\n bg-neutral-800 hover:bg-neutral-700 active:bg-neutral-750\n text-neutral-100\n border-neutral-700 hover:border-neutral-600\n focus:ring-neutral-500/50\n ",danger:"\n bg-red-600 hover:bg-red-500 active:bg-red-700\n text-white\n border-transparent\n focus:ring-red-500/50\n shadow-sm hover:shadow\n ",ghost:"\n bg-transparent hover:bg-neutral-800 active:bg-neutral-750\n text-neutral-300 hover:text-neutral-100\n border-transparent\n focus:ring-neutral-500/50\n "},r={sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-base"},i=n.forwardRef((e,s)=>{let{variant:t="primary",size:n="md",isLoading:i=!1,leftIcon:d,rightIcon:o,fullWidth:x=!1,className:m="",children:h,disabled:u,...p}=e,b=["\n inline-flex items-center justify-center gap-2\n font-medium\n rounded-md\n border\n transition-all duration-150 ease-out\n focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-neutral-900\n disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none\n",l[t],r[n],x?"w-full":"",m].join(" ").replace(/\s+/g," ").trim();return(0,a.jsx)("button",{ref:s,className:b,disabled:u||i,...p,children:i?(0,a.jsx)(c,{size:n}):(0,a.jsxs)(a.Fragment,{children:[d&&(0,a.jsx)("span",{className:"flex-shrink-0",children:d}),h,o&&(0,a.jsx)("span",{className:"flex-shrink-0",children:o})]})})});function c(e){let{size:s}=e;return(0,a.jsxs)("svg",{className:"animate-spin ".concat({sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"}[s]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}i.displayName="Button",n.forwardRef((e,s)=>{let{icon:t,size:n="md",className:l="",...r}=e;return(0,a.jsx)(i,{ref:s,size:n,className:"".concat({sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12"}[n]," !px-0 ").concat(l),...r,children:t})}).displayName="IconButton";let d={success:"\n bg-emerald-900/20 text-emerald-200\n border border-emerald-700/50\n ",warning:"\n bg-amber-900/20 text-amber-200\n border border-amber-700/50\n ",error:"\n bg-rose-900/20 text-rose-200\n border border-rose-700/50\n ",info:"\n bg-sky-900/20 text-sky-200\n border border-sky-700/50\n ",neutral:"\n bg-slate-900/30 text-slate-200\n border border-slate-700/60\n "},o={sm:"h-5 px-2 text-[10px]",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"},x={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2 h-2"},m={success:"bg-green-400",warning:"bg-amber-400",error:"bg-red-400",info:"bg-blue-400",neutral:"bg-neutral-400"};function h(e){let{variant:s="neutral",size:t="md",children:n,icon:l,className:r="",dot:i=!1}=e,c=["\n inline-flex items-center gap-1.5\n font-semibold\n rounded-lg\n whitespace-nowrap\n",d[s],o[t],r].join(" ").replace(/\s+/g," ").trim();return(0,a.jsxs)("span",{className:c,children:[i&&(0,a.jsx)("span",{className:"".concat(x[t]," ").concat(m[s]," rounded-full flex-shrink-0")}),l&&(0,a.jsx)("span",{className:"flex-shrink-0",children:l}),n]})}let u={default:"\n bg-slate-900/40\n border border-slate-800/70\n ",elevated:"\n bg-slate-900/60\n border border-slate-800/70\n shadow-lg shadow-black/20\n ",outlined:"\n bg-transparent\n border border-slate-800/70\n ",ghost:"\n bg-slate-900/40\n border border-transparent\n "},p={none:"",sm:"p-4",md:"p-6",lg:"p-8"};function b(e){let{variant:s="default",padding:t="md",children:n,className:l="",as:r="div"}=e,i=["\n rounded-2xl\n transition-all duration-150\n",u[s],p[t],l].join(" ").replace(/\s+/g," ").trim();return(0,a.jsx)(r,{className:i,children:n})}function j(e){let{title:s,subtitle:t,action:n,icon:l,className:r=""}=e;return(0,a.jsxs)("div",{className:"flex items-start justify-between mb-4 ".concat(r),children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[l&&(0,a.jsx)("div",{className:"p-2 bg-slate-800 rounded-xl flex-shrink-0",children:l}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-100",children:s}),t&&(0,a.jsx)("p",{className:"text-sm text-slate-400 mt-0.5",children:t})]})]}),n&&(0,a.jsx)("div",{className:"flex-shrink-0",children:n})]})}function g(e){let{children:s,className:t=""}=e;return(0,a.jsx)("div",{className:t,children:s})}let f={left:"justify-start",center:"justify-center",right:"justify-end",between:"justify-between"};function v(e){let{children:s,className:t="",align:n="right"}=e;return(0,a.jsx)("div",{className:"flex items-center gap-3 mt-4 pt-4 border-t border-slate-800/70 ".concat(f[n]," ").concat(t),children:s})}function N(e){let{title:s,subtitle:t,badge:n,icon:l,actions:r,className:i=""}=e;return(0,a.jsxs)("div",{className:"flex items-start justify-between ".concat(i),children:[(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[l&&(0,a.jsx)("div",{className:"p-3 bg-neutral-800 border border-neutral-700 rounded-xl",children:l}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-white tracking-tight",children:s}),n&&(0,a.jsx)(h,{variant:n.variant,size:"sm",children:n.label})]}),t&&(0,a.jsx)("p",{className:"text-neutral-400 mt-1.5 max-w-2xl",children:t})]})]}),r&&(0,a.jsx)("div",{className:"flex items-center gap-3 flex-shrink-0",children:r})]})}var w=t(43465),y=t(86651),k=t(63581),C=t(6132),A=t(85710);function S(e){let{variant:s="default",icon:t,title:n,description:l,action:r,compact:i=!1,className:c=""}=e,d={default:(0,a.jsx)(w.A,{className:"w-8 h-8"}),search:(0,a.jsx)(y.A,{className:"w-8 h-8"}),filter:(0,a.jsx)(k.A,{className:"w-8 h-8"}),error:(0,a.jsx)(C.A,{className:"w-8 h-8"}
1),"no-data":(0,a.jsx)(A.A,{className:"w-8 h-8"})},o=t||d[s];return(0,a.jsxs)("div",{className:"\n flex flex-col items-center justify-center text-center\n ".concat(i?"py-8 px-4":"py-16 px-6","\n ").concat(c,"\n "),children:[(0,a.jsx)("div",{className:"\n p-4 rounded-xl mb-4\n ".concat("error"===s?"bg-red-500/10":"bg-slate-800/50","\n ").concat({default:"text-slate-500",search:"text-blue-400",filter:"text-amber-400",error:"text-red-400","no-data":"text-slate-500"}[s],"\n "),children:o}),(0,a.jsx)("h3",{className:"text-lg font-semibold text-slate-200 mb-1",children:n}),l&&(0,a.jsx)("p",{className:"text-sm text-slate-500 max-w-sm",children:l}),r&&(0,a.jsx)("div",{className:"mt-4",children:r})]})}function L(e){let{itemName:s="items",className:t=""}=e;return(0,a.jsx)(S,{variant:"no-data",title:"No ".concat(s," found"),description:"There are no ".concat(s," to display at this time."),compact:!0,className:t})}var M=t(1524),I=t(26921),T=t(7125);function z(e){let{title:s,value:t,suffix:n,prefix:l,delta:r,secondaryMetrics:i,icon:c,
1confidence:d,loading:o=!1,error:x,className:m=""}=e;if(o)return(0,a.jsx)(b,{variant:"default",padding:"md",className:m,children:(0,a.jsxs)("div",{className:"animate-pulse space-y-3",children:[(0,a.jsx)("div",{className:"h-4 w-24 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"h-8 w-32 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"h-4 w-20 bg-neutral-800 rounded"})]})});if(x)return(0,a.jsx)(b,{variant:"default",padding:"md",className:m,children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(C.A,{className:"w-5 h-5 text-red-400 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-neutral-300",children:s}),(0,a.jsx)("p",{className:"text-xs text-red-400 mt-1",children:x})]})]})});let h=e=>({positive:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},negative:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"},neutral:{bg:"bg-neutral-700/50",text:"text-neutral-400",border:"border-neutral-600/50"}})[e.sentiment||("up"===e.direction?"positive":"down"===e.direction?"negative":"neutral")],u=(null==r?void 0:r.direction)==="up"?M.A:(null==r?void 0:r.direction)==="down"?I.A:T.A;return(0,a.jsx)(b,{variant:"default",padding:"md",className:"group hover:border-neutral-700 transition-all duration-150 ".concat(m),children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-neutral-400",children:s}),(0,a.jsxs)("div",{className:"flex items-baseline gap-1.5 mt-2",children:[l&&(0,a.jsx)("span",{className:"text-lg text-neutral-500",children:l}),(0,a.jsx)("span",{className:"text-3xl font-bold text-white tracking-tight tabular-nums",children:"number"==typeof t?t.toLocaleString():t}),n&&(0,a.jsx)("span",{className:"text-lg text-neutral-500",children:n})]}),r&&(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-3",children:[(0,a.jsxs)("div",{className:"\n inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium border\n ".concat(h(r).bg," ").concat(h(r).text," ").concat(h(r).border,"\n "),children:[(0,a.jsx)(u,{className:"w-3 h-3"}),r.value>0?"+":"",r.value,"%"]}),r.label&&(0,a.jsx)("span",{className:"text-xs text-neutral-500",children:r.label})]}),i&&i.length>0&&(0,a.jsx)("div",{className:"flex items-center gap-4 mt-3 pt-3 border-t border-neutral-800",children:i.map((e,s)=>(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-neutral-500",children:e.label}),(0,a.jsxs)("p",{className:"text-sm font-medium text-neutral-300 tabular-nums",children:["number"==typeof e.value?e.value.toLocaleString():e.value,e.suffix&&(0,a.jsx)("span",{className:"text-neutral-500 ml-0.5",children:e.suffix})]})]},s))}),d&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-3",children:[(0,a.jsx)("div",{className:"flex gap-0.5",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"w-1.5 h-1.5 rounded-full ".concat("high"===d&&e<=3||"medium"===d&&e<=2||"low"===d&&e<=1?"bg-amber-500":"bg-neutral-700")},e))}),(0,a.jsxs)("span",{className:"text-xs text-neutral-500 capitalize",children:[d," confidence"]})]})]}),c&&(0,a.jsx)("div",{className:"p-3 bg-neutral-800/50 rounded-xl group-hover:bg-amber-500/10 transition-colors duration-150",children:c})]})})}function D(e){let{children:s,columns:t=4,className:n=""}=e;return(0,a.jsx)("div",{className:"grid gap-4 ".concat({2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t]," ").concat(n),children:s})}var P=t(66282);function q(e){let{title:s,subtitle:t,action:n,badge:l,className:r=""}=e;return(0,a.jsxs)("div",{className:"flex items-start justify-between mb-6 ".concat(r),children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-slate-100",children:s}),l]}),t&&(0,a.jsx)("p",{className:"text-sm text-slate-400 mt-1 max-w-2xl",children:t})]}),n&&(0,a.jsx)("div",{className:"flex-shrink-0",children:n})]})}function E(e){let{children:s,className:t=""}=e;return(0,a.jsx)("section",{className:"py-8 first:pt-0 ".concat(t),children:s})}function H(e){let{level:s,showLabel:t=!0}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 cursor-help",title:"Confidence reflects data coverage and diversity, not truthfulness or correctness of answers.",children:[(0,a.jsx)("div",{className:"flex gap-0.5",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"w-1.5 h-1.5 rounded-full ".concat("high"===s&&e<=3||"medium"===s&&e<=2||"low"===s&&e<=1?"bg-amber-500":"bg-slate-700")},e))}),t&&(0,a.jsx)("span",{className:"text-xs ".concat({high:"text-green-400",medium:"text-amber-400",low:"text-red-400"}[s]," capitalize"),children:s})]})}function B(e){let{message:s,className:t="",onViewEvidence:n}=e;return(0,a.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-slate-900/40 rounded-xl border border-slate-800/70 ".concat(t),children:[(0,a.jsx)("div",{className:"w-1 h-1 rounded-full bg-slate-500 mt-2 flex-shrink-0"}),(0,a.jsx)("p",{className:"text-xs text-slate-400 flex-1",children:s}),n&&(0,a.jsx)(P.H,{onClick:n,variant:"link",label:"View evidence context",className:"flex-shrink-0"})]})}var V=t(23327);
1function R(e){let{components:s,totalScore:t,loading:n=!1,className:l="",onViewEvidence:r}=e;return n?(0,a.jsx)(b,{variant:"default",padding:"md",className:l,children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-5 w-40 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"space-y-3",children:[1,2,3].map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"h-4 w-24 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"h-3 w-48 bg-neutral-800 rounded"})]}),(0,a.jsx)("div",{className:"h-6 w-12 bg-neutral-800 rounded"})]},e))})]})}):(0,a.jsxs)(b,{variant:"default",padding:"md",className:l,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Score Breakdown"}),(0,a.jsxs)("div",{className:"group relative",children:[(0,a.jsx)(V.A,{className:"w-4 h-4 text-slate-500 cursor-help"}),(0,a.jsx)("div",{className:"absolute left-0 bottom-full mb-2 w-64 p-3 bg-neutral-800 border border-slate-700 rounded-lg text-xs text-slate-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10",children:"Each component contributes to your overall Visibility Score. Higher values indicate stronger performance in that area."})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[r&&(0,a.jsx)(P.H,{onClick:r,variant:"compact"}),void 0!==t&&(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("span",{className:"text-xs text-slate-500",children:"Total"}),(0,a.jsx)("p",{className:"text-lg font-bold text-white tabular-nums",children:t})]})]})]}),(0,a.jsx)("div",{className:"space-y-4",children:s.map((e,t)=>(0,a.jsx)(W,{component:e,isLast:t===s.length-1},e.name))})]})}function W(e){let{component:s,isLast:t}=e,n=s.maxValue||100,l=Math.min(s.value/n*100,100);return(0,a.jsx)("div",{className:t?"":"pb-4 border-b border-slate-800",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-200",children:s.name}),(0,a.jsx)(H,{level:s.confidence})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500 leading-relaxed",children:s.explanation}),(0,a.jsx)("div",{className:"mt-2 h-1.5 bg-neutral-800 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-amber-500/70 rounded-full transition-all duration-500",style:{width:"".concat(l,"%")}})})]}),(0,a.jsxs)("div",{className:"flex-shrink-0 text-right",children:[(0,a.jsx)("span",{className:"text-xl font-bold text-white tabular-nums",children:s.value}),(0,a.jsxs)("span",{className:"text-sm text-slate-500",children:["/",n]})]})]})})}var Y=t(37586),O=t(18756),U=t(5789),F=t(39068),Q=t(21873),_=t(16485);function K(e){let{level:s}=e,t={high:{label:"High",bgClass:"bg-green-500/15",textClass:"text-green-400",borderClass:"border-green-500/30",dotClass:"bg-green-400"},medium:{label:"Medium",bgClass:"bg-amber-500/15",textClass:"text-amber-400",borderClass:"border-amber-500/30",dotClass:"bg-amber-400"},low:{label:"Low",bgClass:"bg-red-500/15",textClass:"text-red-400",borderClass:"border-red-500/30",dotClass:"bg-red-400"}}[s];return(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded border ".concat(t.bgClass," ").concat(t.borderClass," cursor-help"),title:"Evidence confidence reflects sample size and provider coverage.",children:[(0,a.jsx)("div",{className:"w-1.5 h-1.5 rounded-full ".concat(t.dotClass)}),(0,a.jsxs)("span",{className:"text-[10px] font-medium ".concat(t.textClass),children:[t.label," confidence"]})]})}function G(e){let s,{evidence:t,loading:n=!1,className:l="",onViewEvidence:r}=e;if(n)return(0,a.jsx)(b,{variant:"default",padding:"md",className:l,children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-5 w-40 bg-slate-800 rounded"}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[1,2,3,4,5,6].map(e=>(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"h-3 w-20 bg-slate-800 rounded"}),(0,a.jsx)("div",{className:"h-6 w-16 bg-slate-800 rounded"})]},e))})]})});let i=e=>e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>
1=1e3?"".concat((e/1e3).toFixed(1),"K"):e.toLocaleString(),c=(s=0,(t.responsesAnalyzed>=50&&s++,t.platforms.length>=2&&s++,t.citationsDetected>0&&s++,s>=3)?"high":s>=2?"medium":"low");return(0,a.jsxs)(b,{variant:"default",padding:"md",className:l,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Evidence Summary"}),(0,a.jsx)(K,{level:c})]}),r&&(0,a.jsx)(P.H,{onClick:r,variant:"compact"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-x-6 gap-y-4",children:[(0,a.jsx)(J,{icon:(0,a.jsx)(Y.A,{className:"w-4 h-4"}),label:"AI Responses Analyzed",value:i(t.responsesAnalyzed)}),(0,a.jsx)(J,{icon:(0,a.jsx)(O.A,{className:"w-4 h-4"}),label:"Mentions Detected",value:i(t.mentionsDetected)}),(0,a.jsx)(J,{icon:(0,a.jsx)(U.A,{className:"w-4 h-4"}),label:"Citations Detected",value:i(t.citationsDetected)}),(0,a.jsx)(J,{icon:(0,a.jsx)(F.A,{className:"w-4 h-4"}),label:"Platforms Included",value:t.platforms.length.toString(),subtext:t.platforms.slice(0,3).join(", ")+(t.platforms.length>3?"...":"")}),(0,a.jsx)(J,{icon:(0,a.jsx)(Q.A,{className:"w-4 h-4"}),label:"Locations Included",value:t.locations.length.toString(),subtext:t.locations.slice(0,3).join(", ")+(t.locations.length>3?"...":"")}),(0,a.jsx)(J,{icon:(0,a.jsx)(_.A,{className:"w-4 h-4"}),label:"Date Range",value:((e,s)=>{let t=new Date(e),a=new Date(s),n={month:"short",day:"numeric"};return"".concat(t.toLocaleDateString("en-US",n)," â ").concat(a.toLocaleDateString("en-US",n))})(t.dateRange.start,t.dateRange.end),isText:!0})]}),t.limitation&&(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(B,{message:t.limitation})})]})}function J(e){let{icon:s,label:t,value:n,subtext:l,isText:r=!1}=e;return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-slate-500",children:[s,(0,a.jsx)("span",{className:"text-xs",children:t})]}),(0,a.jsx)("p",{className:"font-semibold text-white ".concat(r?"text-sm":"text-lg tabular-nums"),children:n}),l&&(0,a.jsx)("p",{className:"text-xs text-slate-500 truncate",title:l,children:l})]})}new Date().toISOString(),new Date().toISOString();var Z=t(14270),X=t(19408);function $(e){let{competitors:s,loading:t=!1,className:n="",onViewEvidence:l,onViewCompetitorEvidence:r}=e;return t?(0,a.jsx)(b,{variant:"default",padding:"md",className:n,children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-5 w-48 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"h-4 w-72 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"space-y-2 mt-4",children:[1,2,3,4].map(e=>(0,a.jsx)("div",{className:"h-12 bg-neutral-800/50 rounded"},e))})]})}):0===s.length?(0,a.jsxs)(b,{variant:"default",padding:"md",className:n,children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Relative Comparison"}),(0,a.jsx)("p",{className:"text-sm text-neutral-500 mt-1",children:"Compare how often and how strongly brands appear in AI responses."})]}),(0,a.jsx)(S,{variant:"no-data",title:"No competitors detected",description:"We haven't detected other brands in AI responses for your category yet.",compact:!0})]}):(0,a.jsxs)(b,{variant:"default",padding:"md",className:n,children:[(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Relative Comparison"}),l&&(0,a.jsx)(P.H,{onClick:l,variant:"compact"})]}),(0,a.jsx)("p",{className:"text-sm text-neutral-500 mt-1",children:"Compare how often and how strongly brands appear in AI responses."})]}),(0,a.jsx)("div",{className:"overflow-x-auto -mx-4 px-4",children:(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-neutral-800",children:[(0,a.jsx)("th",{className:"pb-3 text-left text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Brand"}),(0,a.jsx)("th",{className:"pb-3 text-right text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Visibility"}),(0,a.jsx)("th",{className:"pb-3 text-right text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Presence"}),(0,a.jsx)("th",{className:"pb-3 text-right text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Authority"}),(0,a.jsx)("th",{className:"pb-3 text-right text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Mentions"}),(0,a.jsx)("th",{className:"pb-3 text-right text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Citations"}),(0,a.jsx)("th",{className:"pb-3 text-center text-xs font-semibold uppercase tracking-wider text-neutral-500",children:"Confidence"})]})}),(0,a.jsx)("tbody",{children:s.map((e,s)=>(0,a.jsx)(ee,{competitor:e,isEven:s%2==0,onViewEvidence:r?()=>r(e.id,e.name):void 0},e.id))})]})}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(B,{message:"Values reflect sampled AI responses and may vary by platform."})}),(0,a.jsx)(Z.C,{title:"Why competitors appear (or don't)",body:"Competitor mentions depend on how a question is framed. Queries that ask for comparisons or alternatives tend to surface multiple brands. Brand-specific questions often do not.",secondaryText:"This behavior reflects prompt semantics, not competitive performance.",collapsible:!0,defaultCollapsed:!0,className:"mt-4"})]})}
1function ee(e){let{competitor:s,isEven:t,onViewEvidence:n}=e,l=s.isYou?"bg-amber-500/5 border-l-2 border-l-amber-500":t?"bg-neutral-800/20":"";return(0,a.jsxs)("tr",{className:"".concat(l," hover:bg-neutral-800/40 transition-colors"),children:[(0,a.jsx)("td",{className:"py-3 pr-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"\n w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0\n ".concat(s.isYou?"bg-amber-500/20":"bg-neutral-800","\n "),children:s.logo?(0,a.jsx)("img",{src:s.logo,alt:s.name,className:"w-5 h-5 object-contain"}):(0,a.jsx)(X.A,{className:"w-4 h-4 ".concat(s.isYou?"text-amber-500":"text-neutral-500")})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"\n text-sm font-medium truncate block\n ".concat(s.isYou?"text-amber-400":"text-neutral-200","\n "),children:s.name}),s.isYou&&(0,a.jsx)("span",{className:"text-xs text-amber-500/70",children:"You"})]})]})}),(0,a.jsx)("td",{className:"py-3 px-2 text-right",children:(0,a.jsx)("span",{className:"\n text-sm font-semibold tabular-nums\n ".concat(s.isYou?"text-amber-400":"text-neutral-200","\n "),children:s.visibilityScore})}),(0,a.jsx)("td",{className:"py-3 px-2 text-right",children:(0,a.jsx)("span",{className:"text-sm text-neutral-300 tabular-nums",children:s.presence})}),(0,a.jsx)("td",{className:"py-3 px-2 text-right",children:(0,a.jsx)("span",{className:"text-sm text-neutral-300 tabular-nums",children:s.authority})}),(0,a.jsx)("td",{className:"py-3 px-2 text-right",children:(0,a.jsx)("span",{className:"text-sm text-neutral-300 tabular-nums",children:s.mentions})}),(0,a.jsx)("td",{className:"py-3 px-2 text-right",children:(0,a.jsx)("span",{className:"text-sm text-neutral-300 tabular-nums",children:s.citations})}),(0,a.jsx)("td",{className:"py-3 pl-2 text-center",children:(0,a.jsx)(H,{level:s.confidence})}),n&&(0,a.jsx)("td",{className:"py-3 pl-2",children:(0,a.jsx)(P.H,{onClick:n,variant:"compact",label:"View"})})]})}var es=t(24033),et=t(27937);function ea(e){let{topics:s,loading:t=!1,className:l="",onViewEvidence:r}=e,[i,c]=(0,n.useState)(new Set),d=s.reduce((e,s)=>e+s.queries.length,0);return t?(0,a.jsx)(b,{variant:"default",padding:"md",className:l,children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-5 w-56 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"h-4 w-80 bg-neutral-800 rounded"}),(0,a.jsx)("div",{className:"space-y-3 mt-4",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"h-12 bg-neutral-800/50 rounded-lg"},e))})]})}):0===s.length?(0,a.jsxs)(b,{variant:"default",padding:"md",className:l,children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Tracked AI Queries & Topics"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"These are the AI queries we monitor to measure visibility."})]}),(0,a.jsx)(S,{variant:"no-data",title:"No queries configured",description:"Query tracking hasn't been set up for this brand yet.",compact:!0})]}):(0,a.jsxs)(b,{variant:"default",padding:"md",className:l,children:[(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Tracked AI Queries & Topics"}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[r&&(0,a.jsx)(P.H,{onClick:r,variant:"compact"}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[(0,a.jsxs)("span",{children:[s.length," topics"]}),(0,a.jsx)("span",{className:"text-slate-700",children:"â¢"}),(0,a.jsxs)("span",{children:[d," queries"]})]})]})]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"These are the AI queries we monitor to measure visibility."})]}),(0,a.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,a.jsx)(en,{topic:e,isExpanded:i.has(e.id),onToggle:()=>{var s;return s=e.id,void c(e=>{let t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})}},e.id))}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(B,{message:"Queries are system-generated and periodically refined."})})]})}function en(e){let{topic:s,isExpanded:t,onToggle:n}=e;return(0,a.jsxs)("div",{className:"border border-slate-800 rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{onClick:n,className:"w-full flex items-center justify-between p-3 bg-neutral-900/50 hover:bg-neutral-800/50 transition-colors text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"text-slate-500",children:t?(0,a.jsx)(es.A,{className:"w-4 h-4"}):(0,a.jsx)(et.A,{className:"w-4 h-4"})}),(0,a.jsx)("span",{className:"text-sm font-medium text-slate-200",children:s.name}),(0,a.jsxs)(h,{variant:"neutral",size:"sm",children:[s.queries.length," ",1===s.queries.length?"query":"queries"]})]}),(0,a.jsx)(er,{level:s.coverage})]}),t&&(0,a.jsx)("div",{className:"p-4 bg-neutral-900/30 border-t border-slate-800",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.queries.map(e=>(0,a.jsx)(el,{query:e},e.id))})})]})}function el(e){let{query:s}=e,t={informational:{bg:"bg-blue-500/10",text:"text-blue-400",label:"Info"},commercial:{bg:"bg-green-500/10",text:"text-green-400",label:"Commercial"},comparison:{bg:"bg-purple-500/10",text:"text-purple-400",label:"Compare"}};return(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-neutral-800/50 border border-slate-700/50 rounded-full",children:[(0,a.jsx)(y.A,{className:"w-3 h-3 text-slate-500"}),(0,a.jsx)("span",{className:"text-sm text-slate-300",children:s.text}),s.tag&&(0,a.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded ".concat(t[s.tag].bg," ").concat(t[s.tag].text),children:t[s.tag].label})]})}function er(e){let{level:s}=e,{dots:t,color:n,label:l}={high:{dots:3,color:"bg-green-400",label:"High coverage"}
1,medium:{dots:2,color:"bg-amber-400",label:"Medium coverage"},low:{dots:1,color:"bg-neutral-500",label:"Low coverage"}}[s];return(0,a.jsxs)("div",{className:"flex items-center gap-2",title:l,children:[(0,a.jsx)("div",{className:"flex gap-0.5",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"w-1.5 h-1.5 rounded-full ".concat(e<=t?n:"bg-neutral-700")},e))}),(0,a.jsx)("span",{className:"text-xs text-slate-500 hidden sm:inline",children:l})]})}function ei(e){let{sources:s,loading:t=!1,className:l="",onViewEvidence:r}=e,[i,c]=(0,n.useState)(!1),[d,o]=(0,n.useState)(new Set),x=e=>{o(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t})},m=s.filter(e=>e.citationCount>=10),h=s.filter(e=>e.citationCount<10),u=s.reduce((e,s)=>e+s.citationCount,0);return t?(0,a.jsx)(b,{variant:"default",padding:"md",className:l,children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-5 w-48 bg-slate-800 rounded"}),(0,a.jsx)("div",{className:"h-4 w-72 bg-slate-800 rounded"}),(0,a.jsx)("div",{className:"space-y-2 mt-4",children:[1,2,3,4].map(e=>(0,a.jsx)("div",{className:"h-10 bg-slate-800/50 rounded"},e))})]})}):0===s.length?(0,a.jsxs)(b,{variant:"default",padding:"md",className:l,children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Top Sources & Evidence"}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"Sources that frequently appear in AI-generated responses."})]}),(0,a.jsx)(S,{variant:"no-data",title:"No sources detected",description:"We haven't detected cited sources in AI responses for this brand yet.",compact:!0})]}):(0,a.jsxs)(b,{variant:"default",padding:"md",className:l,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("button",{onClick:()=>c(!i),className:"flex-1 flex items-center justify-between text-left",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-white",children:"Top Sources & Evidence"}),(0,a.jsx)("div",{className:"text-slate-500",children:i?(0,a.jsx)(es.A,{className:"w-4 h-4"}):(0,a.jsx)(et.A,{className:"w-4 h-4"})})]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-1",children:"Sources that frequently appear in AI-generated responses."})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:[s.length," sources"]}),(0,a.jsxs)("p",{className:"text-sm font-medium text-slate-300 tabular-nums",children:[u," citations"]})]})]}),r&&(0,a.jsx)(P.H,{onClick:()=>r(),variant:"compact",className:"ml-4"})]}),i&&(0,a.jsxs)("div",{className:"mt-5 space-y-6",children:[m.length>0&&(0,a.jsx)(ec,{title:"Frequently Cited",sources:m,expandedSources:d,onToggleSource:x}),h.length>0&&(0,a.jsx)(ec,{title:"Occasionally Cited",sources:h,expandedSources:d,onToggleSource:x}),(0,a.jsx)(B,{message:"Citations reflect observed references, not endorsements."})]}),!i&&(0,a.jsxs)("div",{className:"mt-4 flex items-center gap-2 text-xs text-slate-500",children:[(0,a.jsx)("span",{children:"Top domains:"}),s.slice(0,3).map((e,t)=>(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"text-slate-400",children:e.domain}),t<2&&t<s.length-1&&(0,a.jsx)("span",{className:"mx-1",children:"â¢"})]},e.id)),s.length>3&&(0,a.jsxs)("span",{className:"text-slate-500",children:["+",s.length-3," more"]})]})]})}function ec(e){let{title:s,sources:t,expandedSources:n,onToggleSource:l}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-slate-500 mb-3",children:s}),(0,a.jsx)("div",{className:"space-y-1",children:t.map((e,s)=>(0,a.jsx)(ed,{source:e,isExpanded:n.has(e.id),onToggle:()=>l(e.id),isEven:s%2==0},e.id))})]})}function ed(e){let{source:s,isExpanded:t,onToggle:n,isEven:l}=e,r=s.topics&&s.topics.length>0;return(0,a.jsxs)("div",{className:"rounded-lg overflow-hidden ".concat(l?"bg-slate-800/20":""),children:[(0,a.jsxs)("div",{className:"\n flex items-center justify-between p-3\n ".concat(r?"curs
1or-pointer hover:bg-slate-800/40":"","\n transition-colors\n "),onClick:r?n:void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[r&&(0,a.jsx)("div",{className:"text-slate-500 flex-shrink-0",children:t?(0,a.jsx)(es.A,{className:"w-3.5 h-3.5"}):(0,a.jsx)(et.A,{className:"w-3.5 h-3.5"})}),(0,a.jsx)("div",{className:"p-1.5 bg-slate-800 rounded flex-shrink-0",children:(0,a.jsx)(F.A,{className:"w-3.5 h-3.5 text-slate-500"})}),(0,a.jsx)("span",{className:"text-sm text-slate-200 truncate",children:s.domain})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4 flex-shrink-0",children:[(0,a.jsxs)("span",{className:"text-sm text-slate-400 tabular-nums",children:[s.citationCount," ",1===s.citationCount?"citation":"citations"]}),(0,a.jsx)(eo,{level:s.relativeImportance})]})]}),t&&r&&(0,a.jsx)("div",{className:"px-3 pb-3 pl-10",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.topics.map((e,s)=>(0,a.jsx)(h,{variant:"neutral",size:"sm",children:e},s))})})]})}function eo(e){let{level:s}=e,{bars:t,color:n}={high:{bars:3,color:"bg-amber-400"},medium:{bars:2,color:"bg-amber-400"},low:{bars:1,color:"bg-slate-500"}}[s];return(0,a.jsx)("div",{className:"flex items-end gap-0.5 h-4",title:"".concat(s," relative importance"),children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"w-1 rounded-sm ".concat(e<=t?n:"bg-slate-700"),style:{height:"".concat(4*e+4,"px")}},e))})}var ex=t(52056),em=t(57828),eh=t(19204),eu=t(37107),ep=t(79397),eb=t(34172);function ej(e){let{content:s,children:t}=e,[l,r]=(0,n.useState)(!1);return(0,a.jsxs)("div",{className:"relative inline-flex",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[t,l&&(0,a.jsxs)("div",{className:"absolute z-50 bottom-full left-1/2 -translate-x-1/2 mb-2 px-3 py-2 bg-neutral-800 border border-neutral-700 rounded-lg shadow-xl max-w-xs",children:[(0,a.jsx)("p",{className:"text-xs text-neutral-300 whitespace-normal",children:s}),(0,a.jsx)("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-px",children:(0,a.jsx)("div",{className:"border-4 border-transparent border-t-neutral-800"})})]})]})}function eg(e){let{label:s,value:t,suffix:n,icon:l,tooltip:r,subtext:i}=e,c=(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-neutral-400",children:s}),r&&(0,a.jsx)(ej,{content:r,children:(0,a.jsx)(V.A,{className:"w-3 h-3 text-neutral-500 cursor-help"})})]});return(0,a.jsx)("div",{className:"flex-1 min-w-0 px-4 py-3 first:pl-0 last:pr-0 border-r border-neutral-800 last:border-r-0",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"p-2 bg-neutral-800/50 rounded-lg flex-shrink-0",children:l}),(0,a.jsxs)("div",{className:"min-w-0",children:[c,(0,a.jsxs)("div",{className:"flex items-baseline gap-1 mt-1",children:[(0,a.jsx)("span",{className:"text-xl font-bold text-white tabular-nums",children:"number"==typeof t?t.toLocaleString():t}),n&&(0,a.jsx)("span",{className:"text-sm text-neutral-500",children:n})]}),i&&(0,a.jsx)("p",{className:"text-xs text-neutral-500 mt-0.5 truncate",children:i})]})]})})}function ef(e){let{confidence:s,showLimitations:t=!0}=e,[l,r]=(0,n.useState)(!1),i={high:{bg:"bg-green-500/10",text:"text-green-400",border:"border-green-500/20"},medium:{bg:"bg-amber-500/10",text:"text-amber-400",border:"border-amber-500/20"},low:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"}}[s.level];return(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-neutral-800",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"flex gap-0.5",children:[1,2,3].map(e=>(0,a.jsx)("div",{className:"w-1.5 h-1.5 rounded-full ".concat("high"===s.level&&e<=3||"medium"===s.level&&e<=2||"low"===s.level&&e<=1?"bg-amber-500":"bg-neutral-700")},e))}),(0,a.jsxs)("span",{className:"text-xs font-medium capitalize ".concat(i.text),children:[s.level," confidence"]})]}),(0,a.jsxs)("div",{className:"hidden md:flex items-center gap-2 text-xs text-neutral-500",children:[(0,a.jsx)("span",{children:"â¢"}),(0,a.jsxs)("span",{children:["Sample: ",s.factors.sampleSize]}),(0,a.jsx)("span",{children:"â¢"}),(0,a.jsxs)("span",{children:["Providers: ",s.factors.providerDiversity]})]})]}),t&&s.limitations.length>0&&(0,a.jsxs)("button",{onClick:()=>r(!l),className:"flex items-center gap-1.5 text-xs text-neutral-500 hover:text-neutral-400 transition-colors",children:[(0,a.jsx)(ex.A,{className:"w-3 h-3"}),(0,a.jsxs)("span",{children:[s.limitations.length," limitation",s.limitations.length>
11?"s":""]})]})]}),l&&s.limitations.length>0&&(0,a.jsx)("div",{className:"mt-3 p-3 bg-neutral-800/50 rounded-lg border border-neutral-700/50",children:(0,a.jsx)("ul",{className:"space-y-1.5",children:s.limitations.map((e,s)=>(0,a.jsxs)("li",{className:"flex items-start gap-2 text-xs text-neutral-400",children:[(0,a.jsx)("div",{className:"w-1 h-1 rounded-full bg-neutral-500 mt-1.5 flex-shrink-0"}),e]},s))})})]})}function ev(e){let{summary:s,loading:t=!1,className:n="",onViewEvidence:l}=e;if(t)return(0,a.jsx)(b,{variant:"default",padding:"md",className:n,children:(0,a.jsx)("div",{className:"flex items-center gap-4",children:[1,2,3,4,5,6].map(e=>(0,a.jsxs)("div",{className:"flex-1 animate-pulse",children:[(0,a.jsx)("div",{className:"h-4 w-20 bg-neutral-800 rounded mb-2"}),(0,a.jsx)("div",{className:"h-6 w-16 bg-neutral-800 rounded"})]},e))})});let r=Math.round(100*s.appearanceRate),i=null!==s.avgPositionIndex?Math.round(s.avgPositionIndex):"â",c=s.platformsCovered.length,d=s.platformsCovered.map(e=>e.providerName).join(", ");return(0,a.jsxs)(b,{variant:"default",padding:"md",className:n,children:[l&&(0,a.jsx)("div",{className:"flex items-center justify-end mb-3 -mt-1",children:(0,a.jsxs)("button",{type:"button",onClick:l,className:"inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium text-blue-400 hover:text-blue-300 bg-blue-500/10 hover:bg-blue-500/20 rounded-md border border-blue-500/30 transition-colors",children:[(0,a.jsx)("span",{children:"View evidence"}),(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})}),(0,a.jsxs)("div",{className:"flex items-stretch -mx-4",children:[(0,a.jsx)(eg,{label:"Visibility Score",value:Math.round(s.visibilityScore),suffix:"/100",icon:(0,a.jsx)(em.A,{className:"w-4 h-4 text-amber-500"}),tooltip:"Visibility Score v1: Overall = (Presence \xd7 55%) + (Authority \xd7 45%). Presence includes Mention Rate and Prominence."}),(0,a.jsx)(eg,{label:"Mention Rate",value:r,suffix:"%",icon:(0,a.jsx)(eh.A,{className:"w-4 h-4 text-amber-500"}),tooltip:"Percentage of AI responses mentioning this brand. This is the MentionRate component (50%) of the Presence score.",subtext:"".concat(s.responsesWithMention," of ").concat(s.totalResponsesSampled," responses")}),(0,a.jsx)(eg,{label:"Avg Position",value:i,icon:(0,a.jsx)(eu.A,{className:"w-4 h-4 text-amber-500"}),tooltip:"Observed mention order within AI responses. Not a search ranking.",subtext:"Lower is earlier"}),(0,a.jsx)(eg,{label:"Mentions",value:s.mentionsCount,icon:(0,a.jsx)(Y.A,{className:"w-4 h-4 text-amber-500"}),tooltip:"Total count of brand mentions across all sampled AI responses."}),(0,a.jsx)(eg,{label:"Prompts Tracked",value:s.promptsTracked,icon:(0,a.jsx)(ep.A,{className:"w-4 h-4 text-amber-500"}),tooltip:"Number of distinct prompts/queries monitored during this period."}),(0,a.jsx)(eg,{label:"Platforms",value:c,icon:(0,a.jsx)(eb.A,{className:"w-4 h-4 text-amber-500"}),tooltip:"Number of AI platforms/providers included in this analysis.",subtext:d})]}),(0,a.jsx)(ef,{confidence:s.confidence}),(0,a.jsx)(Z.C,{title:"How AI answers are formed",body:"AI systems generate answers probabilistically based on patterns observed during training and retrieval. They do not query a live index or rank websites in real time.",secondaryText:"Visibility reflects how often a brand is referenced in generated responses â not search rankings.",collapsible:!0,defaultCollapsed:!0,className:"mt-4"})]})}let eN={perplexity:"\uD83D\uDD0D",chatgpt:"\uD83D\uDCAC",openai:"\uD83E\uDD16",claude:"\uD83E\uDDE0",anthropic:"\uD83E\uDDE0","google-ai":"\uD83C\uDF10",gemini:"â¨"};function ew(e){let{level:s,hasMultiLocation:t}=e,n={high:{label:"High",bgClass:"bg-green-500/15",textClass:"text-green-400",borderClass:"border-green-500/30",dotClass:"bg-green-400"},medium:{label:"Medium",bgClass:"bg-amber-500/15",textClass:"text-amber-400",borderClass:"border-amber-500/30",dotClass:"bg-amber-400"},low:{label:"Low",bgClass:"bg-red-500/15",textClass:"text-red-400",borderClass:"border-red-500/30",dotClass:"bg-red-400"}}[s];return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded border ".concat(n.bgClass," ").concat(n.borderClass),title:"Scope confidence reflects sampling configuration completeness, not performance.",children:[(0,a.jsx)("div",{className:"w-1.5 h-1.5 rounded-full ".concat(n.dotClass)}),(0,a.jsxs)("span",{className:"text-xs font-medium ".concat(n.textClass),children:["Scope confidence: ",n.label]})]}),t&&(0,a.jsx)("span",{className:"text-[10px] text-neutral-500",title:"Multiple locations may increase response variability across regions.",children:"(multi-location)"})]})}function ey(e){let{label:s,value:t,tooltip:n}=e;return(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-neutral-700/50 last:border-0",children:[(0,a.jsx)("span",{className:"text-sm text-neutral-400",title:n,children:s}),(0,a.jsx)("span",{className:"text-sm text-neutral-200 font-medium text-right",children:t})]})}function ek(e){let{location:s}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-neutral-200",children:s.name}),"primary"===s.type&&(0,a.jsx)(h,{variant:"info",size:"sm",children:"Primary"}),s.geoCode&&(0,a.jsx)("span",{className:"text-xs text-neutral-500",children:s.geoCode})]})}function eC(e){var s;let{provider:t}=e,n=t.mode?"".concat(t.providerName," (").concat(t.mode,")"):t.providerName;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 px-3 py-2 bg-neutral-800 rounded-lg border border-neutral-700/50",title:t.explanation,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",title:t.explanation,children:[(0,a.jsx)("span",{className:"text-sm",children:null!=(s=eN[t.providerId])?s:"\uD83D\uDD39"}),(0,a.jsx)("span",{className:"text-sm font-medium text-neutral-200",children:n})]}),t.mode&&(0,a.jsx)("span",{className:"px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide bg-neutral-700 text-neutral-300 rounded",children:t.mode}),t.citationsAvailable?(0,a.jsx)("span",{className:"px-2 py-0.5 text-[10px] font-medium bg-green-500/20 text-green-400 border border-green-500/30 rounded",title:"Citations available",children:"Citations available"}):(0,a.jsx)("span",{className:"px-2 py-0.5 text-[10px] font-medium bg-neutral-700/50 text-neutral-400 border border-neutral-600/30 rounded",title:"No citations",children:"No citations"}),(0,a.jsx)("span",{className:"text-neutral-500 hover:text-neutral-300 cursor-help transition-colors",title:t.explanation,children:(0,a.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})]})}function eA(e){let s,{summary:t,className:n="",onViewEvidence:l}=e,{locations:r,serviceAreasCount:i,aliasesEnabled:c,aliasCount:d,activeTopicsCount:o,activePromptsCount:x,providersEnabled:m,sitemapPagesCount:u,scrapedPagesCount:p,computedAt:f}=t,N=r.find(e=>"primary"===e.type),w=r.filter(e=>"secondary"===e.type),y=m.filter(e=>e.citationsAvailable).length,k=(s=0,t.providersEnabled.length>=2&&s++,t.activePromptsCount>=5&&s++,t.aliasesEnabled&&s++,{level:s>=3?"high":s>=2?"medium":"low",hasMultiLocation:t.locations.length>1});return(0,a.jsxs)(b,{variant:"default",padding:"md",className:n,children:[(0,a.jsx)(j,{title:"Brand Scope Summary",subtitle:"What defines this brand report",action:l&&(0,a.jsx)(P.H,{onClick:l,variant:"compact"}),icon:(0,a.jsx)("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}),(0,a.jsx)("div",{className:"px-4 py-3 border-b border-neutral-700/50",children:(0,a.jsx)(ew,{level:k.level,hasMultiLocation:k.hasMultiLocation})}),(0,a.jsx)(g,{children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h4",{className:"text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-2 cursor-help",title:"Geographic context c
1an influence AI answers and competitor mentions.",children:"Locations"}),(0,a.jsxs)("div",{className:"space-y-2",children:[N&&(0,a.jsx)(ek,{location:N}),w.map(e=>(0,a.jsx)(ek,{location:e},e.id)),0===r.length&&(0,a.jsx)("span",{className:"text-sm text-neutral-500 italic",children:"No locations configured"})]})]}),(0,a.jsx)(ey,{label:"Service Areas",value:i.toLocaleString(),tooltip:"Only recommended for local services. May reduce global SaaS visibility."}),(0,a.jsx)(ey,{label:"Aliases",value:c?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)(h,{variant:"success",size:"sm",children:"Enabled"}),(0,a.jsx)("span",{children:d})]}):(0,a.jsx)(h,{variant:"neutral",size:"sm",children:"Disabled"}),tooltip:"Brand detection depends on identity signals. Aliases improve matching accuracy."}),(0,a.jsx)(ey,{label:"Active Topics",value:o.toLocaleString(),tooltip:"Only active prompts contribute to sampling and visibility calculations."}),(0,a.jsx)(ey,{label:"Active Prompts",value:x.toLocaleString(),tooltip:"Only active prompts contribute to sampling and visibility calculations."})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-3 cursor-help",title:"Citation availability depends on provider capabilities and execution mode.",children:["AI Providers (",m.length,")"]}),(0,a.jsxs)("div",{className:"space-y-2",children:[m.map(e=>(0,a.jsx)(eC,{provider:e},"".concat(e.providerId,"-").concat(e.mode||"default"))),0===m.length&&(0,a.jsx)("span",{className:"text-sm text-neutral-500 italic",children:"No providers enabled"})]}),m.length>0&&(0,a.jsxs)("p",{className:"text-xs text-neutral-500 mt-3",children:[y," of ",m.length," support citations"]})]}),(0,a.jsx)(ey,{label:"Sitemap Pages",value:u.toLocaleString(),tooltip:"Used for topic detection and prompt generation; not a ranking factor."}),(0,a.jsx)(ey,{label:"Scraped Pages",value:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:p.toLocaleString()}),u>0&&(0,a.jsxs)("span",{className:"text-xs text-neutral-500",children:["(",Math.round(p/u*100),"%)"]})]}),tooltip:"Used for topic detection and prompt generation; not a ranking factor."})]})]})}),(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-neutral-700/50",children:[(0,a.jsx)("p",{className:"text-xs text-neutral-400 leading-relaxed",children:"This report reflects sampled AI responses under the current scope."}),(0,a.jsx)("p",{className:"text-xs text-neutral-400 leading-relaxed mt-1",children:"Changing scope changes what is measured."})]}),(0,a.jsxs)(v,{align:"between",children:[(0,a.jsxs)("span",{className:"text-xs text-neutral-500",title:("string"==typeof f?new Date(f):f).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}),children:["Last computed ",function(e){let s="string"==typeof e?new Date(e):e,t=new Date,a=Math.floor((t.getTime()-s.getTime())/6e4),n=Math.floor(a/60),l=Math.floor(n/24);return a<1?"Just now":a<60?"".concat(a,"m ago"):n<24?"".concat(n,"h ago"):l<7?"".concat(l,"d ago"):s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:s.getFullYear()!==t.getFullYear()?"numeric":void 0})}(f)]}),(0,a.jsx)(h,{variant:"neutral",size:"sm",children:"Read-only"})]})]})}function eS(e){let{width:s="w-full"}=e;return(0,a.jsx)("div",{className:"h-4 bg-neutral-700 rounded animate-pulse ".concat(s)})}function eL(){return(0,a.jsx)("div",{className:"h-6 w-16 bg-neutral-700 rounded-full animate-pulse"})}function eM(e){let{className:s=""}=e;return(0,a.jsxs)(b,{variant:"default",padding:"md",className:s,children:[(0,a.jsx)(j,{title:"Brand Scope Summary",subtitle:"What defines this brand report",icon:(0,a.jsx)("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}),(0,a.jsx)(g,{children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"h-3 w-20 bg-neutral-700 rounded animate-pulse mb-3"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(eS,{width:"w-32"}),(0,a.jsx)(eS,{width:"w-24"})]})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-neutral-700/50",children:[(0,a.jsx)(eS,{width:"w-24"}),(0,a.jsx)(eS,{width:"w-8"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-neutral-700/50",children:[(0,a.jsx)(eS,{width:"w-16"}),(0,a.jsx)(eL,{})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-neutral-700/50",children:[(0,a.jsx)(eS,{width:"w-28"}),(0,a.jsx)(eS,{width:"w-8"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2",children:[(0,a.jsx)(eS,{width:"w-28"}),(0,a.jsx)(eS,{width:"w-8"})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"h-3 w-28 bg-neutral-700 rounded animate-pulse mb-3"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)("div",{className:"h-7 w-28 bg-neutral-800 rounded-md animate-pulse"}),(0,a.jsx)("div",{className:"h-7 w-32 bg-neutral-800 rounded-md animate-pulse"}),(0,a.jsx)("div",{className:"h-7 w-24 bg-neutral-800 rounded-md animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 border-b border-neutral-700/50",children:[(0,a.jsx)(eS,{width:"w-28"}),(0,a.jsx)(eS,{width:"w-12"})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2",children:[(0,a.jsx)(eS,{width:"w-28"}),(0,a.jsx)(eS,{width:"w-16"})]})]})]})]})}),(0,a.jsxs)(v,{align:"between",children:[(0,a.jsx)("div",{className:"h-3 w-32 bg-neutral-700 rounded animate-pulse"}),(0,a.jsx)(eL,{})]})]})}function eI(e){let{error:s,onRetry:t,className:n=""}=e;return(0,a.jsxs)(b,{variant:"default",padding:"md",className:n,children:[(0,a.jsx)(j,{title:"Brand Scope Summary",subtitle:"What defines this brand report",icon:(0,a.jsx)("svg",{className:"w-5 h-5 text-neutral-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}),(0,a.jsx)(g,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,a.jsx)("div",{className:"p-3 bg-red-500/10 rounded-full mb-4",children:(0,a.jsx)("svg",{className:"w-6 h-6 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),(0,a.jsx)("p",{className:"text-sm text-neutral-400 mb-4",children:s}),t&&(0,a.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm font-medium text-amber-400 bg-amber-500/10 border border-amber-500/20 rounded-lg hover:bg-amber-500/20 transition-colors",children:"Try Again"})]})})]})}Date.now()}}]);
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.