1import{r as l,j as r,d9 as E,da as Ye,db as Ue,dc as We,a9 as N,aF as Ke,E as He,a as Ge,cy as Xe,cF as Ze,dd as qe,aP as B,d6 as se,cN as ae,de as Je,df as Qe,bP as et,d7 as $,az as D,bL as Y}from"./index-CPGPO0uB.js";import{E as ce}from"./empty-state-Bdd_iybH.js";import{S as tt,a as R}from"./stat-strip-EU_yR_WD.js";import{C as ie}from"./chart-card-BDlNTo29.js";import{D as le}from"./detail-shell-DuhVnvGZ.js";import{C as nt,a as rt,b as ot,c as me}from"./index-BzL1R_SU.js";import{b as st}from"./citation-helpers-DH358gtp.js";import{B as at}from"./BarChart-B1kgJHFi.js";import{C as ct}from"./CartesianGrid-Ce_H0e-E.js";import{X as it,Y as lt}from"./YAxis-BuQ_4rJg.js";import"./triangle-D_Pjxp4M.js";var dt=Object.defineProperty,w=(e,t)=>dt(e,"name",{value:t,configurable:!0});function ut(e,t){const o=l.createContext(t);o.displayName=e+"Context";const n=w(a=>{const{children:i,...d}=a,c=l.useMemo(()=>d,Object.values(d));return r.jsx(o.Provider,{value:c,children:i})},"Provider");n.displayName=e+"Provider";function s(a,i={}){const{optional:d=!1}=i,c=l.useContext(o);if(c)return c;if(t!==void 0)return t;if(!d)throw new Error(`\`${a}\` must be used within \`${e}\``)}return w(s,"useContext"),[n,s]}w(ut,"createContext");function xe(e,t=[]){let o=[];function n(a,i){const d=l.createContext(i);d.displayName=a+"Context";const c=o.length;o=[...o,i];const m=w(p=>{var b;const{scope:x,children:h,...u}=p,g=((b=x==null?void 0:x[e])==null?void 0:b[c])||d,v=l.useMemo(()=>u,Object.values(u));return r.jsx(g.Provider,{value:v,children:h})},"Provider");m.displayName=a+"Provider";function f(p,x,h={}){var b;const{optional:u=!1}=h,g=((b=x==null?void 0:x[e])==null?void 0:b[c])||d,v=l.useContext(g);if(v)return v;if(i!==void 0)return i;if(!u)throw new Error(`\`${p}\` must be used within \`${a}\``)}return w(f,"useContext"),[m,f]}w(n,"createContext");const s=w(()=>{const a=o.map(i=>l.createContext(i));return w(function(d){const c=(d==null?void 0:d[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...d,[e]:c}}),[d,c])},"useScope")},"createScope");return s.scopeName=e,[n,he(s,...t)]}w(xe,"createContextScope");function he(...e){const t=e[0];if(e.length===1)return t;const o=w(()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return w(function(a){const i=n.reduce((d,{useScope:c,scopeName:m})=>{const p=c(a)[`__scope${m}`];return{...d,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}w(he,"composeContextScopes");var ft=Object.defineProperty,X=(e,t)=>ft(e,"name",{value:t,configurable:!0});function U(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}X(U,"setRef");function ge(...e){return t=>{let o=!1;const n=e.map(s=>{const a=U(s,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():U(e[s],null)}}}}X(ge,"composeRefs");function Z(...e){return l.useCallback(ge(...e),e)}X(Z,"useComposedRefs");var pt=Object.defineProperty,P=(e,t)=>pt(e,"name",{value:t,configurable:!0}),ve=!!(typeof window<"u"&&window.document&&window.document.createElement);function be(e,t,{checkForDefaultPrevented:o=!0}={}){return P(function(s){if(e==null||e(s),o===!1||!s||!s.defaultPrevented)return t==null?void 0:t(s)},"handleEvent")}P(be,"composeEventHandlers");function mt(e){var t;if(!ve)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}P(mt,"getOwnerWindow");function W(e){if(!ve)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}P(W,"getOwnerDocument");function Ce(e,t=!1){const{activeElement:o}=W(e);if(!(o!=null&&o.nodeName))return null;if(je(o)&&o.contentDocument)return Ce(o.contentDocument.body,t);if(t){const n=o.getAttribute("aria-activedescendant");if(n){const s=W(o).getElementById(n);if(s)return s}}return o}P(Ce,"getActiveElement");function je(e){return e.tagName==="IFRAME"}P(je,"isFrame");var q=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},xt=Object.defineProperty,ht=(e,t)=>
1xt(e,"name",{value:t,configurable:!0}),de=E[" useEffectEvent ".trim().toString()],ue=E[" useInsertionEffect ".trim().toString()];function we(e){if(typeof de=="function")return de(e);const t=l.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof ue=="function"?ue(()=>{t.current=e}):q(()=>{t.current=e}),l.useMemo(()=>((...o)=>{var n;return(n=t.current)==null?void 0:n.call(t,...o)}),[])}ht(we,"useEffectEvent");var gt=Object.defineProperty,I=(e,t)=>gt(e,"name",{value:t,configurable:!0}),vt=E[" useInsertionEffect ".trim().toString()]||q;function J({prop:e,defaultProp:t,onChange:o=I(()=>{},"onChange"),caller:n}){const[s,a,i]=ye({defaultProp:t,onChange:o}),d=e!==void 0,c=d?e:s,m=l.useCallback(f=>{var p;if(d){const x=Se(f)?f(e):f;x!==e&&((p=i.current)==null||p.call(i,x))}else a(f)},[d,e,a,i]);return[c,m]}I(J,"useControllableState");function ye({defaultProp:e,onChange:t}){const[o,n]=l.useState(e),s=l.useRef(o),a=l.useRef(t);return vt(()=>{a.current=t},[t]),l.useEffect(()=>{var i;s.current!==o&&((i=a.current)==null||i.call(a,o),s.current=o)},[o,s]),[o,n,a]}I(ye,"useUncontrolledState");function Se(e){return typeof e=="function"}I(Se,"isFunction");var fe=Symbol("RADIX:SYNC_STATE");function bt(e,t,o,n){const{prop:s,defaultProp:a,onChange:i,caller:d}=t,c=s!==void 0,m=we(i),f=[{...o,state:a}];n&&f.push(n);const[p,x]=l.useReducer((v,b)=>{if(b.type===fe)return{...v,state:b.state};const A=e(v,b);return c&&!Object.is(A.state,v.state)&&m(A.state),A},...f),h=p.state,u=l.useRef(h);l.useEffect(()=>{u.current!==h&&(u.current=h,c||m(h))},[h,u,c]);const g=l.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return l.useEffect(()=>{c&&!Object.is(s,p.state)&&x({type:fe,state:s})},[s,p.state,c]),[g,x]}I(bt,"useControllableStateReducer");var Ct=Object.defineProperty,y=(e,t)=>Ct(e,"name",{value:t,configurable:!0}),jt=y(((e,t)=>{const o={...t};for(const n in t){const s=e[n],a=t[n];if(/^on[A-Z]/.test(n))if(s&&a){const d=typeof s=="function",c=typeof a=="function";o[n]=(...m)=>{const f=c?a(...m):void 0;return d&&s(...m),f}}else s&&(o[n]=s);else n==="style"?o[n]={...typeof s=="object"?s:null,...typeof a=="object"?a:null}:n==="className"?o[n]=[s,a].filter(Boolean).join(" "):n==="aria-describedby"&&(o[n]=_e(a,s))}return{...e,...o}}),"mergeProps");function _e(...e){const t=new Set;for(const o of e)if(typeof o=="string")for(const n of String(o).trim().split(/\s+/))n&&t.add(n);return t.size>0?Array.from(t).join(" "):void 0}y(_e,"concatAriaDescribedby");var Ae=l.createContext(jt);Ae.displayName="SlotContext";function Ne(e){const t=l.forwardRef((o,n)=>{const s=l.useContext(Ae);let{children:a,mergeProps:i=s,...d}=o,c=null,m=!1;const f=[];K(a)&&typeof k=="function"&&(a=k(a._payload)),l.Children.forEach(a,u=>{var g;if(Ie(u)){m=!0;const v=u;let b="child"in v.props?v.props.child:v.props.children;K(b)&&typeof k=="function"&&(b=k(b._payload)),c=yt(v,b),f.push((g=c==null?void 0:c.props)==null?void 0:g.children)}else f.push(u)}),c?c=l.cloneElement(c,void 0,f):!m&&l.Children.count(a)===1&&l.isValidElement(a)&&(c=a);const p=c?Ee(c):void 0,x=Z(n,p);if(!c){if(a||a===0)throw new Error(m?At(e):_t(e));return a}const h=i(d,c.props??{});return c.type!==l.Fragment&&(h.ref=n?x:p),l.cloneElement(c,h)});return t.displayName=`${e}.Slot`,t}y(Ne,"createSlot");var Pe=Symbol.for("radix.slottable");function wt(e){const t=y(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Pe,t}y(wt,"createSlottable");var yt=y((e,t)=>{if("child"in e.props){const o=e.props.child;return l.isValidElement(o)?l.cloneElement(o,void 0,e.props.children(o.props.children)):null}return l.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Ee(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}y(Ee,"getElementRef");function Ie(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pe}y(Ie,"isSlottable");var St=Symbol.for("react.lazy");function K(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===St&&"_payload"in e&&Re(e._payload)}y(K,"isLazyComponent");function Re(e){return typeof e=="object"&&e!==null&&"then"in e}y(Re,"isPromiseLike");var _t=y(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),At=y(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),k=E[" use ".trim().toString()],Nt=Object.defineProperty,Pt=(e,t)=>Nt(e,"name",{value:t,configurable:!0}),Et=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=Et.reduce((e,t)=>
1{const o=Ne(`Primitive.${t}`),n=l.forwardRef((s,a)=>{const{asChild:i,...d}=s,c=i?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...d,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function It(e,t){e&&Ye.flushSync(()=>e.dispatchEvent(t))}Pt(It,"dispatchDiscreteCustomEvent");var Rt=Object.defineProperty,kt=(e,t)=>Rt(e,"name",{value:t,configurable:!0}),$t=E[" useId ".trim().toString()]||(()=>{}),Dt=0;function $e(e){const[t,o]=l.useState($t());return q(()=>{e||o(n=>n??String(Dt++))},[e]),e||(t?`radix-${t}`:"")}kt($e,"useId");var Ot=Object.defineProperty,j=(e,t)=>Ot(e,"name",{value:t,configurable:!0}),_="Accordion",Tt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Q,Mt,Lt]=Ue(_),[O,fn]=xe(_,[Lt,me]),ee=me(),Ft=l.forwardRef(j(function(t,o){const{type:n,...s}=t,a=s,i=s;return r.jsx(Q.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?r.jsx(Yt,{...i,ref:o}):r.jsx(zt,{...a,ref:o})})},"Accordion")),[De,Vt]=O(_),[Oe,Bt]=O(_,{collapsible:!1}),zt=l.forwardRef(j(function(t,o){const{value:n,defaultValue:s,onValueChange:a=j(()=>{},"onValueChange"),collapsible:i=!1,...d}=t,[c,m]=J({prop:n,defaultProp:s??"",onChange:a,caller:_});return r.jsx(De,{scope:t.__scopeAccordion,value:l.useMemo(()=>c?[c]:[],[c]),onItemOpen:m,onItemClose:l.useCallback(()=>i&&m(""),[i,m]),children:r.jsx(Oe,{scope:t.__scopeAccordion,collapsible:i,children:r.jsx(Te,{...d,ref:o})})})},"AccordionImplSingle")),Yt=l.forwardRef(j(function(t,o){const{value:n,defaultValue:s,onValueChange:a=j(()=>{},"onValueChange"),...i}=t,[d,c]=J({prop:n,defaultProp:s??[],onChange:a,caller:_}),m=l.useCallback(p=>c((x=[])=>[...x,p]),[c]),f=l.useCallback(p=>c((x=[])=>x.filter(h=>h!==p)),[c]);return r.jsx(De,{scope:t.__scopeAccordion,value:d,onItemOpen:m,onItemClose:f,children:r.jsx(Oe,{scope:t.__scopeAccordion,collapsible:!0,children:r.jsx(Te,{...i,ref:o})})})},"AccordionImplMultiple")),[Ut,T]=O(_),Te=l.forwardRef(j(function(t,o){const{__scopeAccordion:n,disabled:s,dir:a,orientation:i="vertical",...d}=t,c=l.useRef(null),m=Z(c,o),f=Mt(n),x=We(a)==="ltr",h=be(t.onKeyDown,u=>{var re;if(!Tt.includes(u.key))return;const g=u.target,v=f().filter(V=>{var oe;return!((oe=V.ref.current)!=null&&oe.disabled)}),b=v.findIndex(V=>V.ref.current===g),A=v.length;if(b===-1)return;u.preventDefault();let C=b;const S=0,M=A-1,L=j(()=>{C=b+1,C>M&&(C=S)},"moveNext"),F=j(()=>{C=b-1,C<S&&(C=M)},"movePrev");switch(u.key){case"Home":C=S;break;case"End":C=M;break;case"ArrowRight":i==="horizontal"&&(x?L():F());break;case"ArrowDown":i==="vertical"&&L();break;case"ArrowLeft":i==="horizontal"&&(x?F():L());break;case"ArrowUp":i==="vertical"&&F();break}const ze=C%A;(re=v[ze].ref.current)==null||re.focus()});return r.jsx(Ut,{scope:n,disabled:s,direction:a,orientation:i,children:r.jsx(Q.Slot,{scope:n,children:r.jsx(ke.div,{...d,"data-orientation":i,ref:m,onKeyDown:s?void 0:h})})})},"AccordionImpl")),H="AccordionItem",[Wt,te]=O(H),Kt=l.forwardRef(j(function(t,o){const{__scopeAccordion:n,value:s,...a}=t,i=T(H,n),d=Vt(H,n),c=ee(n),m=$e(),f=s&&d.value.includes(s)||!1,p=i.disabled||t.disabled;return r.jsx(Wt,{scope:n,open:f,disabled:p,triggerId:m,children:r.jsx(nt,{"data-orientation":i.orientation,"data-state":ne(f),...c,...a,ref:o,disabled:p,open:f,onOpenChange:x=>{x?d.onItemOpen(s):d.onItemClose(s)}})})},"AccordionItem")),Ht="AccordionHeader",Gt=l.forwardRef(j(function(t,o){const{__scopeAccordion:n,...s}=t,a=T(_,n),i=te(Ht,n);return r.jsx(ke.h3,{"data-orientation":a.orientation,"data-state":ne(i.open),"data-disabled":i.disabled?"":void 0,...s,ref:o})},"AccordionHeader")),pe="AccordionTrigger",Me=l.forwardRef(j(function(t,o){const{__scopeAccordion:n,...s}=t,a=T(_,n),i=te(pe,n),d=Bt(pe,n),c=ee(n);return r.jsx(Q.ItemSlot,{scope:n,children:r.jsx(rt,{"aria-disabled":i.open&&!d.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...c,...s,ref:o})})},"AccordionTrigger")),Xt="AccordionContent",Le=l.forwardRef(j(function(t,o){const{__scopeAccordion:n,...s}=t,a=T(_,n),i=te(Xt,n),d=ee(n);return r.jsx(ot,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...d,...s,ref:o,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})},"AccordionContent"));function ne(e){return e?"open":"closed"}j(ne,"getState");const Zt=Ft,Fe=l.forwardRef(({className:e,...t},o)=>r.jsx(Kt,{ref:o,className:N("border-b",e),...t}));Fe.displayName="AccordionItem";const Ve=l.forwardRef(({className:e,children:t,...o},n)=>r.jsx(Gt,{className:"flex",children:r.jsxs(Me,{ref:n,className:N("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,r.jsx(Ke,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ve.displayName=Me.displayName;const Be=l.forwardRef(({className:e,children:t,...o},n)=>r.jsx(Le,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o,children:r.jsx("div",{className:N("pb-4 pt-0",e),children:t})}));Be.displayName=Le.displayName;const qt=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});function z(e){const t=new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())?e:qt.format(t)}function G({cited:e,answers:t}){return r.jsxs("span",{className:"flex shrink-0 items-center gap-3 tabular-nums text-xs text-muted-foreground",children:[r.jsxs("span",{className:"w-12 text-right",title:"Times cited",children:[r.jsx("span",{className:"text-foreground",children:e})," cited"]}),r.jsxs("span",{className:"w-16 text-right",title:"Answers it's cited in",children:[t," ",t===1?"answer":"answers"]})]})}function Jt({node:e,highlighted:t,highlightRef:o}){return r.jsxs("div",{ref:t?o:void 0,className:N("flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-accent/40",t&&"bg-accent/60"),children:[r.jsx(D,{domain:e.domain,name:e.domain}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.label}),r.jsx("span",{className:"flex shrink-0 items-center gap-1",children:e.origins.map(n=>r.jsx($,{origin:n},n))}
1),r.jsx(G,{cited:e.citation_count,answers:e.answer_count}),e.url?r.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer","aria-label":"Open page",className:"shrink-0 text-muted-foreground hover:text-foreground",children:r.jsx(Y,{className:"h-3.5 w-3.5"})}):null]})}function Qt({node:e,highlighted:t,highlightRef:o}){return r.jsxs(Fe,{value:e.key,className:"border-none",children:[r.jsx("div",{ref:t?o:void 0,className:N(t&&"rounded-md bg-accent/60"),children:r.jsx(Ve,{className:N("rounded-md px-2 py-1.5 text-sm hover:bg-accent/40 hover:no-underline","[&>svg]:text-muted-foreground/60"),children:r.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2 pr-2 font-normal",children:[r.jsx(D,{domain:e.domain,name:e.domain}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-foreground",children:e.label}),r.jsx("span",{className:"flex shrink-0 items-center gap-1",children:e.origins.map(n=>r.jsx($,{origin:n},n))}),r.jsx(G,{cited:e.citation_count,answers:e.answer_count}),e.url?r.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer","aria-label":"Open thread",onClick:n=>n.stopPropagation(),className:"shrink-0 text-muted-foreground hover:text-foreground",children:r.jsx(Y,{className:"h-3.5 w-3.5"})}):null]})})}),r.jsx(Be,{className:"pb-1",children:r.jsx("ul",{className:"ml-6 border-l",children:e.comments.map((n,s)=>{const a=n.title||`Comment #${s+1}`,i="flex items-center gap-2 px-2 py-1.5 text-sm transition-colors hover:bg-accent/50",d=r.jsxs(r.Fragment,{children:[r.jsx(D,{domain:e.domain,name:e.domain}),r.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground",children:a}),r.jsx("span",{className:"flex shrink-0 items-center gap-1",children:n.origins.map(c=>r.jsx($,{origin:c},c))}),r.jsx(G,{cited:n.citation_count,answers:n.answer_count}),n.url?r.jsx(Y,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}):null]});return r.jsx("li",{children:n.url?r.jsx("a",{href:n.url,target:"_blank",rel:"noreferrer",className:i,children:d}):r.jsx("div",{className:i,children:d})},n.url??`comment-${s}`)})})})]})}function pn(){const{projectId:e}=He(),[t]=Ge(),{engineFilter:o,regionFilter:n}=Xe(),s=t.get("d")??"",a=t.get("u"),i=Ze(e,o,n),d=qe(e,o,n),c=(i.data??[]).find(u=>u.domain===s)??null,m=l.useMemo(()=>c?st(c.domain,c.pages):[],[c]),f=l.useMemo(()=>{var b,A;const u=(d.data??[]).filter(C=>C.domain===s),g=new Map;u.forEach(C=>{const S=C.created_at.slice(0,10);g.set(S,(g.get(S)??0)+1)});const v=[...g.entries()].sort(([C],[S])=>C.localeCompare(S)).map(([C,S])=>({day:C,label:z(C),count:S}));return{days:v,firstSeen:((b=v[0])==null?void 0:b.day)??null,lastSeen:((A=v[v.length-1])==null?void 0:A.day)??null}},[d.data,s]),p=l.useRef(null);l.useEffect(()=>{a&&p.current&&p.current.scrollIntoView({block:"center",behavior:"smooth"})},[a,c]);const x="../citations";if(i.isLoading)return r.jsxs("div",{className:"space-y-6",children:[r.jsx(B,{className:"h-8 w-40"}),r.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:4}).map((u,g)=>r.jsx(B,{className:"h-24"},g))}),r.jsx(B,{className:"h-64"})]});if(!c)return r.jsx(le,{backTo:x,backLabel:"Citations",title:s||"Source",children:r.jsx(ce,{icon:r.jsx(se,{className:"h-6 w-6"}),title:"Source not found",description:"This source isn't in the current filter scope â try clearing model or region filters."})});const h=a?m.find(u=>u.url===a||u.comments.some(g=>g.url===a))??null:null;return r.jsxs(le,{backTo:x,backLabel:"Citations",icon:r.jsx(D,{domain:c.domain,name:c.domain,className:"h-8 w-8",size:64}),title:c.domain,subtitle:r.jsxs("span",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[r.jsxs("span",{children:[c.citation_count," ",c.citation_count===1?"citation":"citations"," ·"," ",c.answer_count," ",c.answer_count===1?"answer":"answers"]}),f.firstSeen?r.jsxs("span",{children:["First seen ",z(f.firstSeen),f.lastSeen&&f.lastSeen!==f.firstSeen?` · last seen ${z(f.lastSeen)}`:""]}):null,r.jsx("span",{className:"flex items-center gap-1",children:c.origins.map(u=>r.jsx($,{origin:u},u))})]}),children:[r.jsxs(tt,{className:"[&>*]:min-w-0",children:[r.jsx(R,{label:"Citations",value:c.citation_count}),r.jsx(R,{label:"Citation share",value:ae(c.share)}),r.jsx(R,{label:"Answers",value:c.answer_count}),r.jsx(R,{label:"Answer share",value:ae(c.answer_share)})]}),r.jsx(ie,{title:"Cited over time",children:f.days.length>0?r.jsx(Je,{config:{count:{label:"Citations",color:"hsl(var(--chart-1))"}},className:"h-[220px] w-full",children:r.jsxs(at,{data:f.days,margin:{top:8,right:8,bottom:0,left:-16},children:[r.jsx(ct,{vertical:!1,strokeDasharray:"3 3"}
1),r.jsx(it,{dataKey:"label",tickLine:!1,axisLine:!1,tickMargin:6}),r.jsx(lt,{allowDecimals:!1,tickLine:!1,axisLine:!1,width:40}),r.jsx(Qe,{cursor:{fill:"hsl(var(--accent))",opacity:.4},content:({active:u,payload:g})=>u&&(g!=null&&g.length)?r.jsxs("div",{className:"rounded-md border bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-md",children:[r.jsx("p",{className:"font-medium",children:g[0].payload.label}),r.jsxs("p",{className:"text-muted-foreground",children:[g[0].value," ",Number(g[0].value)===1?"citation":"citations"]})]}):null}),r.jsx(et,{dataKey:"count",fill:"var(--color-count)",radius:[3,3,0,0],maxBarSize:28})]})}):r.jsx(ce,{icon:r.jsx(se,{className:"h-6 w-6"}),title:"No citation history yet",description:"Recent runs haven't recorded individual citations for this source."})}),r.jsx(ie,{title:"Cited pages",children:m.length===0?r.jsx("p",{className:"px-2 py-4 text-sm text-muted-foreground",children:"No individual pages recorded â engines referenced the domain as a whole."}):r.jsx(Zt,{type:"single",collapsible:!0,defaultValue:h&&h.comments.length>0?h.key:void 0,className:"space-y-0.5",children:m.map(u=>u.comments.length>0?r.jsx(Qt,{node:u,highlighted:(h==null?void 0:h.key)===u.key,highlightRef:p},u.key):r.jsx(Jt,{node:u,highlighted:(h==null?void 0:h.key)===u.key||!!a&&u.url===a,highlightRef:p},u.key))})})]})}export{pn as AppCitationDetailPage};
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.