llmtap 0.1.8 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/assets/{CommandBar-CBRbPbgc.js → CommandBar-B_DQ8GYv.js} +1 -1
- package/dist/dashboard/assets/Costs-dUmFKVXo.js +1 -0
- package/dist/dashboard/assets/Dashboard-IWWZjOTC.js +2 -0
- package/dist/dashboard/assets/{DataTable-p1PD-dJj.js → DataTable-D8anr2Up.js} +1 -1
- package/dist/dashboard/assets/{EmptyState-xDl-M9Rz.js → EmptyState-Dvek8YFy.js} +1 -1
- package/dist/dashboard/assets/{GettingStartedPanel-Cn46fQ1w.js → GettingStartedPanel-CsH3tON-.js} +1 -1
- package/dist/dashboard/assets/{Models-BpMhGVp5.js → Models-B0Q40VZD.js} +1 -1
- package/dist/dashboard/assets/{ProviderBadge-Cs31007s.js → ProviderBadge-BBZCNYYv.js} +1 -1
- package/dist/dashboard/assets/Sessions-C3P6KXfc.js +3 -0
- package/dist/dashboard/assets/{Settings-7wRfCPnB.js → Settings-C_38Y0pf.js} +2 -2
- package/dist/dashboard/assets/TraceDetail-CK0lF8m4.js +17 -0
- package/dist/dashboard/assets/Traces-EE_1Xnk8.js +1 -0
- package/dist/dashboard/assets/accordion-BvqffQGQ.js +1 -0
- package/dist/dashboard/assets/badge-FUUR5c9z.js +1 -0
- package/dist/dashboard/assets/{content-DZmxO8bn.js → content-9_8TanwE.js} +1 -1
- package/dist/dashboard/assets/format-BuYDUKIt.js +1 -0
- package/dist/dashboard/assets/icons-x20EK9lj.js +1 -0
- package/dist/dashboard/assets/index-9FuuW_w-.css +1 -0
- package/dist/dashboard/assets/index-D1QTIMAj.js +1023 -0
- package/dist/dashboard/assets/line-chart-recharts-iHjPE6yj.js +61 -0
- package/dist/dashboard/assets/llmtap-logo-CD_0qTjn.png +0 -0
- package/dist/dashboard/assets/{motion-CSeNjKbZ.js → motion-DMBhW-IL.js} +1 -1
- package/dist/dashboard/assets/{number-ticker-CjofSQ3s.js → number-ticker-tHv0tgNj.js} +1 -1
- package/dist/dashboard/assets/query-b9vbXHQr.js +4 -0
- package/dist/dashboard/assets/{select-BJEJvQo4.js → select-B7JjM23_.js} +1 -1
- package/dist/dashboard/assets/statistics-with-status-grid-CVBurKW6.js +1 -0
- package/dist/dashboard/assets/{ui-BFiKdTjl.js → ui-CaGzZKq9.js} +1 -1
- package/dist/dashboard/index.html +6 -6
- package/dist/index.js +0 -0
- package/package.json +14 -24
- package/dist/dashboard/assets/Costs-B-TMvDlI.js +0 -1
- package/dist/dashboard/assets/Dashboard-CFNAMjdc.js +0 -1
- package/dist/dashboard/assets/Sessions-CiKyTRlP.js +0 -3
- package/dist/dashboard/assets/TraceDetail-CKDDbbEV.js +0 -17
- package/dist/dashboard/assets/Traces-BYWwPP14.js +0 -1
- package/dist/dashboard/assets/accordion-CC_sxDZ8.js +0 -1
- package/dist/dashboard/assets/format-zoXqpaOb.js +0 -1
- package/dist/dashboard/assets/icons-BOLUIAKd.js +0 -1
- package/dist/dashboard/assets/index-CtlcBMi-.css +0 -1
- package/dist/dashboard/assets/index-DG2eF3M2.js +0 -14
- package/dist/dashboard/assets/query-DVWnIZNd.js +0 -4
- package/dist/dashboard/assets/statistics-with-status-grid-tcb9SpIY.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as $,j as e,d as K}from"./query-DVWnIZNd.js";import{c as ve,L as be,u as ye,a as Ne,B as ce,b as we,f as ke,d as Se,e as Ce}from"./index-DG2eF3M2.js";import{G as _e}from"./GettingStartedPanel-Cn46fQ1w.js";import{f as Y,a as M,P as $e,b as Te,c as de}from"./format-zoXqpaOb.js";import{B as Pe,S as Le}from"./statistics-with-status-grid-tcb9SpIY.js";import{h as E,i as Ae,j as Me,k as Ie,d as De,l as me,G as He,X as Ve,m as qe,n as Fe,T as xe,o as Oe,g as Ge,O as Re}from"./icons-BOLUIAKd.js";import{A as We,a as J,b as ee,c as re}from"./accordion-CC_sxDZ8.js";import{S as G,a as R,b as W,c as B,d as P}from"./select-BJEJvQo4.js";import{P as he,C as Be}from"./CommandBar-CBRbPbgc.js";import{E as z}from"./EmptyState-xDl-M9Rz.js";import{P as ze}from"./ProviderBadge-Cs31007s.js";import{c as ge}from"./motion-CSeNjKbZ.js";import"./ui-BFiKdTjl.js";const V=720,ae=320,h={top:24,right:16,bottom:42,left:16};function Ee(a){if(typeof a=="number")return new Date(a).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});const t=Number(a);return!Number.isNaN(t)&&String(a).length>=10?new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):String(a)}function ue(a){if(typeof a=="number")return a;if(!a)return 0;const t=Number(a);return Number.isFinite(t)?t:0}function se(a){if(a.length===0)return"";if(a.length===1)return`M ${a[0].x} ${a[0].y}`;let t=`M ${a[0].x} ${a[0].y}`;for(let m=0;m<a.length-1;m+=1){const i=a[m],c=a[m+1];if(!(i&&c))continue;const g=(i.x+c.x)/2;t+=` C ${g} ${i.y}, ${g} ${c.y}, ${c.x} ${c.y}`}return t}function Xe(a,t){if(a.length===0)return"";const m=se(a),i=a[a.length-1],c=a[0];return i&&c?`${m} L ${i.x} ${t} L ${c.x} ${t} Z`:""}function Ue({data:a,xDataKey:t,primaryDataKey:m,secondaryDataKey:i}){const c=$.useId().replace(/:/g,""),[g,N]=$.useState(Math.max(0,a.length-1)),s=$.useMemo(()=>{const l=V-h.left-h.right,x=ae-h.top-h.bottom,u=h.top+x,b=Math.max(a.length-1,1),p=a.map(n=>ue(n[m])),o=i?a.map(n=>ue(n[i])):[],I=Math.max(...p,...o.length>0?o:[0],1),f=a.map((n,j)=>{const O=h.left+l*j/b,H=p[j]??0,k=o.length>0?o[j]??0:void 0,S=C=>u-C/I*x;return{index:j,x:O,yPrimary:S(H),ySecondary:k===void 0?void 0:S(k),label:Ee(n[t]),primaryValue:H,secondaryValue:k}}),X=se(f.map(n=>({x:n.x,y:n.yPrimary}))),F=Xe(f.map(n=>({x:n.x,y:n.yPrimary})),u),D=i&&f.some(n=>n.ySecondary!==void 0)?se(f.map(n=>({x:n.x,y:n.ySecondary??u}))):"",w=Math.max(1,Math.floor(f.length/5)),U=f.filter((n,j)=>j===0||j===f.length-1||j%w===0);return{chartInnerWidth:l,chartInnerHeight:x,baselineY:u,maxValue:I,points:f,primaryPath:X,primaryArea:F,secondaryPath:D,ticks:U,gridLines:[.25,.5,.75].map(n=>h.top+x*n)}},[a,m,i,t]),d=s.points[Math.min(g,s.points.length-1)];return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs(Pe,{variant:"info",className:"border-[var(--color-accent)]/18 bg-[var(--color-accent)]/12 text-[var(--color-accent)]",children:[e.jsx(E,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"live trend"})]}),d?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("div",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-bg-surface),0.72)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)]",children:d.label}),e.jsx("div",{className:"rounded-full border border-[var(--color-accent-2)]/20 bg-[var(--color-accent-2)]/12 px-3 py-1.5 font-mono text-xs text-[var(--color-text-primary)]",children:d.primaryValue.toLocaleString(void 0,{maximumFractionDigits:4})}),i&&d.secondaryValue!==void 0&&e.jsx("div",{className:"rounded-full border border-[var(--color-accent)]/18 bg-[var(--color-accent)]/10 px-3 py-1.5 font-mono text-xs text-[var(--color-text-primary)]",children:d.secondaryValue.toLocaleString(void 0,{maximumFractionDigits:4})})]}):null]}),e.jsxs("div",{className:"relative overflow-hidden rounded-[24px] border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-surface),0.74),rgba(var(--ch-bg-base),0.96))] p-3",children:[e.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-24 bg-[radial-gradient(circle_at_top,rgba(var(--ch-accent), 0.16),transparent_60%)]"}),e.jsxs("svg",{"aria-hidden":"true",className:"h-[320px] w-full",viewBox:`0 0 ${V} ${ae}`,children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:`line-fill-${c}`,x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-accent-2)",stopOpacity:"0.38"}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-accent-2)",stopOpacity:"0"})]}),e.jsxs("linearGradient",{id:`line-stroke-${c}`,x1:"0",x2:"1",y1:"0",y2:"0",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-accent-2)"}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-accent)"})]}),e.jsxs("filter",{id:`line-glow-${c}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:[e.jsx("feGaussianBlur",{stdDeviation:"9",result:"blur"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"blur"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),s.gridLines.map(l=>e.jsx("line",{x1:h.left,x2:V-h.right,y1:l,y2:l,stroke:"rgba(var(--ch-text-primary),0.16)",strokeDasharray:"4 8"},l)),e.jsx("line",{x1:h.left,x2:V-h.right,y1:s.baselineY,y2:s.baselineY,stroke:"rgba(var(--ch-text-primary),0.2)"}),s.primaryArea?e.jsx("path",{d:s.primaryArea,fill:`url(#line-fill-${c})`,opacity:"0.95"}):null,s.secondaryPath?e.jsx("path",{d:s.secondaryPath,fill:"none",stroke:"var(--color-text-primary)",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:"0.55",strokeWidth:"2"}):null,s.primaryPath?e.jsxs(e.Fragment,{children:[e.jsx("path",{d:s.primaryPath,fill:"none",filter:`url(#line-glow-${c})`,stroke:"url(#line-stroke-${chartId})",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.75"}),e.jsx("path",{d:s.primaryPath,fill:"none",stroke:"rgba(var(--ch-text-primary),0.16)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1"})]}):null,d?e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d.x,x2:d.x,y1:h.top,y2:s.baselineY,stroke:"rgba(var(--ch-accent), 0.24)",strokeDasharray:"4 6"}),e.jsx("circle",{cx:d.x,cy:d.yPrimary,fill:"var(--color-text-primary)",r:"5",stroke:"var(--color-accent)",strokeWidth:"3"})]}):null,s.ticks.map(l=>e.jsx("text",{x:l.x,y:ae-12,fill:"rgba(var(--ch-text-primary),0.74)",fontSize:"11",textAnchor:"middle",children:l.label},`${l.index}-${l.label}`)),s.points.map((l,x)=>{const u=s.points[x-1],b=s.points[x+1],p=u?(u.x+l.x)/2:h.left,o=b?(b.x+l.x)/2:V-h.right;return e.jsx("rect",{x:p,y:h.top,width:Math.max(o-p,8),height:s.chartInnerHeight,fill:"transparent",onFocus:()=>N(l.index),onMouseEnter:()=>N(l.index)},l.index)})]}),e.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-3",children:[e.jsx(te,{label:"Peak",value:s.maxValue.toLocaleString(void 0,{maximumFractionDigits:4})}),e.jsx(te,{label:"Samples",value:s.points.length.toLocaleString()}),e.jsx(te,{label:"Current",value:(d?.primaryValue??0).toLocaleString(void 0,{maximumFractionDigits:4})})]})]})]})}function te({label:a,value:t}){return e.jsxs("div",{className:"rounded-2xl border border-[var(--border-dim)] bg-[rgba(var(--ch-bg-surface),0.72)] px-4 py-3",children:[e.jsx("div",{className:"hud-label",children:a}),e.jsx("div",{className:"mt-2 font-mono text-sm text-[var(--color-text-primary)]",children:t})]})}function Qe(a){return a<.01?{color:"var(--color-accent)",background:"var(--color-accent-soft)",border:"var(--border-default)",shadow:"0 0 18px rgba(var(--ch-accent), 0.14)"}:a<.1?{color:"var(--color-text-primary)",background:"rgba(var(--ch-text-primary), 0.05)",border:"var(--border-dim)",shadow:"none"}:a<=1?{color:"var(--color-warning)",background:"rgba(var(--ch-warning), 0.08)",border:"rgba(var(--ch-warning), 0.24)",shadow:"0 0 18px rgba(var(--ch-warning), 0.14)"}:{color:"var(--color-error)",background:"rgba(var(--ch-error), 0.08)",border:"rgba(var(--ch-error), 0.24)",shadow:"0 0 18px rgba(var(--ch-error), 0.16)"}}function fe({value:a,size:t="md",className:m}){const i=Qe(a);return e.jsxs("span",{className:ve("badge justify-center",t==="sm"?"px-2.5 py-[2px] text-[10px]":"px-3 py-[3px] text-[11px]",m),style:{color:i.color,background:i.background,borderColor:i.border,boxShadow:i.shadow},children:["$",a.toFixed(4)]})}function Ze(a){return a<1e3?`${Math.round(a)}ms`:`${(a/1e3).toFixed(1)}s`}function Ke(a){return a>=1e3?`${(a/1e3).toFixed(1)}k`:`${a}`}function Ye(a){return a==="active"?{dot:e.jsx("span",{"aria-hidden":"true",className:"live-dot",style:{display:"inline-block"}}),label:"active"}:a==="warning"?{dot:e.jsx("span",{"aria-hidden":"true",className:"inline-block h-[6px] w-[6px] rounded-full",style:{background:"var(--color-warning)",boxShadow:"0 0 6px rgba(var(--ch-warning), 0.55)"}}),label:"warning"}:a==="error"?{dot:e.jsx("span",{"aria-hidden":"true",className:"inline-block h-[6px] w-[6px] rounded-full",style:{background:"var(--color-error)",boxShadow:"0 0 6px rgba(var(--ch-error), 0.48)"}}),label:"error"}:{dot:e.jsx("span",{"aria-hidden":"true",className:"inline-block h-[6px] w-[6px] rounded-full",style:{background:"var(--color-accent-2)",boxShadow:"0 0 6px rgba(var(--ch-accent-2), 0.38)"}}),label:"complete"}}function Je({trace:a,selected:t=!1,onSelect:m,onClick:i,href:c,index:g=0,className:N}){const s=Ye(a.status),d="grid w-full grid-cols-[auto_auto_minmax(0,1.5fr)_minmax(0,0.8fr)_minmax(72px,0.5fr)_minmax(80px,0.7fr)_minmax(94px,0.6fr)_minmax(86px,0.6fr)_minmax(96px,0.7fr)] items-center gap-3 px-4 py-3 text-left hover:bg-[rgba(var(--ch-text-primary),0.02)]",l=e.jsxs(e.Fragment,{children:[m?e.jsx("span",{onClick:x=>{x.stopPropagation(),m(a.id)},className:"inline-flex h-7 w-7 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--border-dim)] bg-transparent text-[var(--color-text-tertiary)] transition-colors hover:border-[var(--border-default)] hover:text-[var(--color-accent)]",children:t?e.jsx(Ae,{className:"h-4 w-4"}):e.jsx(Me,{className:"h-4 w-4"})}):e.jsx("span",{className:"w-0"}),e.jsxs("div",{className:"flex items-center gap-2",children:[s.dot,e.jsx("span",{className:"mono-label text-[var(--color-text-secondary)]",children:s.label})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-[14px] font-medium text-[var(--color-text-primary)]",children:a.name}),e.jsx("div",{className:"mono-label mt-1 truncate",children:a.when})]}),e.jsx("div",{className:"mono-value truncate text-[var(--color-text-secondary)]",children:a.id.slice(0,10)}),e.jsx("div",{className:"mono-value justify-self-end",children:a.spans}),e.jsx("div",{className:"mono-value justify-self-end",children:Ke(a.tokens)}),e.jsx("div",{className:"justify-self-end",children:e.jsx(fe,{value:a.cost,size:"sm"})}),e.jsx("div",{className:"mono-value justify-self-end text-[var(--color-text-secondary)]",children:Ze(a.duration)}),e.jsx("div",{className:"mono-label justify-self-end text-[var(--color-text-secondary)]",children:a.when})]});return e.jsxs(ge.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.28,delay:g*.04,ease:[.16,1,.3,1]},className:ve("relative overflow-hidden rounded-[var(--radius-panel)] border transition-[background-color,border-color,transform] duration-[var(--duration-base)] ease-[var(--ease-out)] hover:-translate-y-[1px]",N),style:{borderColor:t?"var(--border-default)":"var(--border-dim)",background:t?"var(--color-accent-dim)":"linear-gradient(180deg, rgba(var(--ch-text-primary), 0.02), rgba(var(--ch-text-primary), 0.01))"},children:[t?e.jsx("div",{"aria-hidden":"true",className:"absolute inset-y-2 left-0 w-[2px] rounded-full",style:{background:"var(--color-accent)"}}):null,c&&!m?e.jsx(be,{to:c,onClick:()=>i?.(a.id),className:d,children:l}):e.jsx("button",{type:"button",onClick:()=>i?.(a.id),className:d,children:l})]})}const q="dashboard-shell rounded-[var(--radius-card)]",pe=[12,25,50,100];function hr(){const a=ye(),[t,m]=Ne(),i=t.get("q")??"",c=$.useDeferredValue(i),g=t.get("provider")??"",N=t.get("status"),s=N==="ok"||N==="error"?N:"",d=Number(t.get("periodHours")??"24"),l=Number(t.get("pageSize")??"12"),x=pe.includes(l)?l:12,u=Math.max(1,Number(t.get("page")??"1")||1),b=(u-1)*x,p=$.useMemo(()=>({limit:x,offset:b,q:c.trim()||void 0,provider:g||void 0,status:s||void 0,periodHours:he.some(r=>r.value===d)?d:24}),[c,x,b,d,g,s]),{data:o}=K({queryKey:["stats",p.periodHours],queryFn:()=>ke(p.periodHours??24)}),{data:I,isLoading:f}=K({queryKey:["traces",p],queryFn:()=>Se(p)}),{data:X}=K({queryKey:["insights"],queryFn:Ce,refetchInterval:6e4}),F=X?.insights??[],D=I?.traces??[],w=I?.total??0,U=Math.max(1,Math.ceil(w/x)),[n,j]=$.useState(null),[O,H]=$.useState("desc");function k(r){n===r?H(y=>y==="asc"?"desc":"asc"):(j(r),H("desc"))}const S=$.useMemo(()=>n?[...D].sort((r,y)=>{const A=r[n]??0,T=y[n]??0;return O==="asc"?A-T:T-A}):D,[D,n,O]),C=o?.byProvider[0],L=S[0],oe=[...new Set(o?.byProvider.map(r=>r.provider)??[])],v=o?.costOverTime.map(r=>({timestamp:r.timestamp,cost:r.cost}))??[],ne=o&&o.totalSpans>0?o.totalCost/o.totalSpans:0,Q=Math.round((o?.errorRate??0)*100),je=[{title:"Trace Volume",value:Y(o?.totalTraces??0),status:(o?.totalTraces??0)>0?"within":"unknown",range:`${o?.totalSpans??0} spans in window`,icon:e.jsx(Ie,{className:"h-4 w-4"})},{title:"Token Throughput",value:Y(o?.totalTokens??0),status:(o?.totalTokens??0)>0?"within":"unknown",range:"Token load across active filter window",icon:e.jsx(De,{className:"h-4 w-4"})},{title:"Spend Velocity",value:M(o?.totalCost??0),status:ne>0?"observe":"unknown",range:`${M(ne)} avg per call`,icon:e.jsx(E,{className:"h-4 w-4"})},{title:"Risk Surface",value:`${Q}%`,status:Q>=8?"exceed":Q>=3?"observe":"within",range:`${o?.errorCount??0} failing calls`,icon:e.jsx(me,{className:"h-4 w-4"})}],ie=i.length>0||g.length>0||s.length>0||p.periodHours!==24;function _(r,y=!0){m(A=>{const T=new URLSearchParams(A);for(const[le,Z]of Object.entries(r))Z===void 0||Z===""?T.delete(le):T.set(le,String(Z));return y&&T.delete("page"),T},{replace:!0})}return e.jsxs($e,{eyebrow:"Flight Deck",title:"Read the behavior of every model call like a live system.",description:"LLMTap should feel like a live operator console, not a half-finished devtool. This view keeps spend movement, provider pressure, queue state, and the latest traces readable in one sweep.",aside:e.jsxs("div",{className:"insight-panel",children:[e.jsx(we,{}),e.jsxs("div",{className:"mt-4 grid gap-3",children:[e.jsxs("div",{className:"deck-card deck-card--accent",children:[e.jsx("div",{className:"hud-label",children:"Dominant provider"}),e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsx("div",{className:"capitalize text-[var(--color-text-primary)]",style:{fontFamily:"var(--font-operator)",fontSize:"30px",fontWeight:700,lineHeight:"0.92",letterSpacing:"-0.04em"},children:C?.provider??"Awaiting traffic"}),e.jsx(Re,{className:"h-4 w-4 text-[var(--color-accent)]"})]}),e.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:C?`${C.spanCount} calls, ${M(C.totalCost)} spend`:"No provider activity yet"})]}),e.jsxs("div",{className:"deck-card",children:[e.jsx("div",{className:"hud-label",children:"Latest trace"}),e.jsx("div",{className:"mt-2 text-lg font-medium text-[var(--color-text-primary)]",children:L?.name??"No recent traces"}),e.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:L?`${de(L.startTime)} / ${L.spanCount} spans`:"Start sending spans to populate the deck"})]})]})]}),children:[e.jsxs("div",{className:"pill-strip w-fit max-w-full overflow-x-auto",children:[e.jsxs("span",{className:"pill-item",children:["window ",e.jsxs("strong",{children:[p.periodHours,"h"]})]}),e.jsxs("span",{className:"pill-item",children:["providers ",e.jsx("strong",{children:oe.length||0})]}),e.jsxs("span",{className:"pill-item",children:["traces ",e.jsx("strong",{children:w})]}),e.jsxs("span",{className:"pill-item",children:["status ",e.jsx("strong",{children:o?.errorCount?"watching":"stable"})]})]}),e.jsx(Le,{cards:je,className:"max-w-none px-0 sm:px-0 lg:px-0"}),e.jsxs("div",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,0.95fr)]",children:[e.jsxs("section",{className:`${q} p-5 sm:p-6`,children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Economic pulse"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Cost gradient"})]}),e.jsxs("div",{className:"status-chip",children:[e.jsx(He,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}),e.jsxs("span",{children:[p.periodHours,"h window"]})]})]}),v.length>0?e.jsxs("div",{className:"surface-strong overflow-hidden rounded-[var(--radius-card)] p-4",children:[e.jsx(Ue,{data:v,xDataKey:"timestamp",primaryDataKey:"cost"}),e.jsxs("div",{className:"mt-4 grid gap-3 sm:grid-cols-3",children:[e.jsxs("div",{className:"surface-muted rounded-[var(--radius-panel)] p-4",children:[e.jsx("div",{className:"hud-label",children:"Latest"}),e.jsx("div",{className:"mt-2 text-lg font-semibold text-[var(--color-text-primary)]",children:M(v.at(-1)?.cost??0)})]}),e.jsxs("div",{className:"surface-muted rounded-[var(--radius-panel)] p-4",children:[e.jsx("div",{className:"hud-label",children:"Peak"}),e.jsx("div",{className:"mt-2 text-lg font-semibold text-[var(--color-text-primary)]",children:M(Math.max(...v.map(r=>r.cost),0))})]}),e.jsxs("div",{className:"surface-muted rounded-[var(--radius-panel)] p-4",children:[e.jsx("div",{className:"hud-label",children:"Change"}),e.jsxs("div",{className:`mt-2 text-lg font-semibold ${(v.at(-1)?.cost??0)-(v.at(-2)?.cost??v.at(-1)?.cost??0)>=0?"text-[var(--color-accent)]":"text-[var(--color-text-primary)]"}`,children:[(v.at(-1)?.cost??0)-(v.at(-2)?.cost??v.at(-1)?.cost??0)>=0?"+":"-",M(Math.abs((v.at(-1)?.cost??0)-(v.at(-2)?.cost??v.at(-1)?.cost??0)))]})]})]})]}):e.jsx(z,{title:"No cost movement yet",description:"This turns into a live spend curve as soon as the collector receives traced calls.",className:"min-h-[320px]"})]}),e.jsxs("section",{className:`${q} p-5 sm:p-6`,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"hud-label",children:"Provider pressure"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Allocation by provider"})]}),e.jsx("div",{className:"space-y-4",children:(o?.byProvider??[]).length>0?(o?.byProvider??[]).map(r=>{const y=(o?.totalCost??0)>0?r.totalCost/(o?.totalCost??1)*100:0;return e.jsxs("div",{className:"surface-muted rounded-[var(--radius-panel)] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(ze,{provider:r.provider}),e.jsxs("div",{className:"text-[length:var(--text-caption)] text-[var(--color-text-secondary)]",children:[r.spanCount," calls / ",Y(r.totalTokens)," tokens"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx(fe,{value:r.totalCost,size:"sm"}),e.jsx("div",{className:"text-[length:var(--text-caption)] text-[var(--color-text-tertiary)]",children:Te(r.avgDuration)})]})]}),e.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-[rgba(var(--ch-bg-base),0.84)]",children:e.jsx(ge.div,{className:"h-full w-full origin-left rounded-full bg-[linear-gradient(90deg,var(--color-accent-2),var(--color-accent))]",initial:{scaleX:0},animate:{scaleX:Math.max(y,4)/100},transition:{duration:.5,ease:"easeOut"}})})]},r.provider)}):e.jsx(z,{title:"No provider activity yet",description:"Allocation bands appear here once the collector receives instrumented traffic.",className:"min-h-[320px]"})})]})]}),e.jsxs("div",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.45fr)_minmax(320px,0.85fr)]",children:[e.jsxs("section",{className:`${q} p-4 sm:p-5`,children:[e.jsxs("div",{className:"surface-strong mb-4 rounded-[var(--radius-card)] p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Search console"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Trace dispatch queue"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"status-chip",children:[w," matches"]}),e.jsxs("button",{type:"button",onClick:()=>_({q:void 0,provider:void 0,status:void 0,periodHours:void 0}),disabled:!ie,className:"status-chip transition-all duration-[--duration-normal] hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)] disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(Ve,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Clear"})]})]})]}),e.jsxs("div",{className:"mt-4 grid gap-3 xl:grid-cols-[minmax(0,1.7fr)_repeat(3,minmax(0,0.7fr))]",children:[e.jsx(Be,{value:i,onChange:r=>_({q:r||void 0}),placeholder:"Search traces, models, providers, errors"}),e.jsxs(G,{value:g||"__all__",onValueChange:r=>_({provider:r==="__all__"?void 0:r}),children:[e.jsx(R,{className:"w-full rounded-2xl py-3",children:e.jsx(W,{placeholder:"All providers"})}),e.jsxs(B,{children:[e.jsx(P,{value:"__all__",children:"All providers"}),oe.map(r=>e.jsx(P,{value:r,children:r},r))]})]}),e.jsxs(G,{value:s||"__all__",onValueChange:r=>_({status:r==="__all__"?void 0:r}),children:[e.jsx(R,{className:"w-full rounded-2xl py-3",children:e.jsx(W,{placeholder:"All states"})}),e.jsxs(B,{children:[e.jsx(P,{value:"__all__",children:"All states"}),e.jsx(P,{value:"ok",children:"Healthy only"}),e.jsx(P,{value:"error",children:"Errors only"})]})]}),e.jsxs(G,{value:String(p.periodHours??24),onValueChange:r=>_({periodHours:Number(r)===24?void 0:Number(r)}),children:[e.jsx(R,{className:"w-full rounded-2xl py-3",children:e.jsx(W,{})}),e.jsx(B,{children:he.map(r=>e.jsx(P,{value:String(r.value),children:r.label},r.value))})]})]})]}),f?e.jsx(z,{title:"Loading trace queue",description:"The latest calls are being assembled into the dispatch surface.",className:"min-h-[280px]"}):S.length===0&&!ie?e.jsx(_e,{}):S.length===0?e.jsx(z,{title:"No traces match these filters",description:"Try adjusting the search term, provider filter, or time window.",className:"min-h-[280px]"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs("div",{className:"grid grid-cols-[auto_auto_minmax(0,1.5fr)_minmax(0,0.8fr)_minmax(72px,0.5fr)_minmax(80px,0.7fr)_minmax(94px,0.6fr)_minmax(86px,0.6fr)_minmax(96px,0.7fr)] gap-3 px-4 py-2 text-[11px] uppercase tracking-[0.18em] text-[var(--color-text-tertiary)]",children:[e.jsx("span",{}),e.jsx("span",{children:"State"}),e.jsx("span",{children:"Trace"}),e.jsx("span",{children:"ID"}),e.jsx("button",{type:"button",onClick:()=>k("spanCount"),className:"justify-self-end",children:"Spans"}),e.jsx("button",{type:"button",onClick:()=>k("totalTokens"),className:"justify-self-end",children:"Tokens"}),e.jsx("button",{type:"button",onClick:()=>k("totalCost"),className:"justify-self-end",children:"Cost"}),e.jsx("span",{className:"justify-self-end",children:"Duration"}),e.jsx("button",{type:"button",onClick:()=>k("startTime"),className:"justify-self-end",children:"When"})]}),S.map((r,y)=>e.jsx(Je,{index:y,trace:{id:r.traceId,name:r.name,status:r.status==="ok"?"complete":"error",spans:r.spanCount,tokens:r.totalTokens,cost:r.totalCost,duration:r.totalDuration??0,when:de(r.startTime)},href:`/trace/${r.traceId}`,onClick:A=>a(`/trace/${A}`)},r.traceId))]}),e.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 px-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"text-[length:var(--text-caption)] text-[var(--color-text-tertiary)]",children:w>0?`Showing ${b+1}-${Math.min(b+S.length,w)} of ${w}`:"Awaiting traces"}),e.jsxs(G,{value:String(x),onValueChange:r=>_({pageSize:Number(r)===12?void 0:Number(r)}),children:[e.jsx(R,{className:"w-auto rounded-xl px-2 py-1.5 text-[length:var(--text-caption)]",children:e.jsx(W,{})}),e.jsx(B,{children:pe.map(r=>e.jsxs(P,{value:String(r),children:[r," / page"]},r))})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(ce,{variant:"outline",size:"sm",onClick:()=>_({page:u>2?u-1:void 0},!1),disabled:u<=1,children:[e.jsx(qe,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Previous"})]}),e.jsxs(ce,{variant:"outline",size:"sm",onClick:()=>_({page:u+1},!1),disabled:u>=U,children:[e.jsx("span",{children:"Next"}),e.jsx(Fe,{className:"h-3.5 w-3.5"})]})]})]})]})]}),e.jsxs("section",{className:`${q} p-5`,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"hud-label",children:"Intelligence layer"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Insights"})]}),e.jsx("div",{className:"space-y-4",children:F.length>0?F.map(r=>e.jsxs("div",{className:`rounded-2xl border p-4 ${r.severity==="critical"?"border-[var(--color-text-primary)]/18 bg-[var(--color-text-primary)]/8":r.severity==="warning"?"border-[var(--color-accent-2)]/18 bg-[var(--color-accent-2)]/8":"border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)]"}`,children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-[var(--color-text-primary)]",children:[r.type==="cost_anomaly"&&e.jsx(xe,{className:"h-4 w-4 text-[var(--color-accent-2)]"}),r.type==="error_pattern"&&e.jsx(me,{className:"h-4 w-4 text-[var(--color-text-primary)]"}),r.type==="model_recommendation"&&e.jsx(Oe,{className:"h-4 w-4 text-[var(--color-accent)]"}),r.type==="token_waste"&&e.jsx(E,{className:"h-4 w-4 text-[var(--color-accent-2)]"}),r.title]}),r.metric&&e.jsx("span",{className:"shrink-0 rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5 font-mono text-[length:var(--text-hud)] text-[var(--color-text-tertiary)]",children:r.metric})]}),e.jsx("p",{className:"text-sm leading-6 text-[var(--color-text-secondary)]",children:r.description})]},r.id)):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"surface-muted rounded-2xl p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-[var(--color-text-primary)]",children:[e.jsx(Ge,{className:"h-4 w-4 text-[var(--color-accent)]"}),"Health read"]}),e.jsx("p",{className:"text-sm leading-6 text-[var(--color-text-secondary)]",children:(o?.errorRate??0)>.05?"Error rate is elevated. Start with the most recent failed trace and inspect provider or tool payloads.":"Error pressure is currently low. Use this window to compare provider cost drift and latency patterns."})]}),e.jsxs("div",{className:"surface-muted rounded-2xl p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-[var(--color-text-primary)]",children:[e.jsx(E,{className:"h-4 w-4 text-[var(--color-accent-2)]"}),"Spend insight"]}),e.jsx("p",{className:"text-sm leading-6 text-[var(--color-text-secondary)]",children:C?`${C.provider} currently leads cost share. If that is unexpected, inspect the filtered queue for bursty workflows.`:"Provider concentration will appear here once traces land."})]}),e.jsxs("div",{className:"surface-muted rounded-2xl p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-[var(--color-text-primary)]",children:[e.jsx(xe,{className:"h-4 w-4 text-[var(--color-text-primary)]"}),"Queue focus"]}),e.jsx("p",{className:"text-sm leading-6 text-[var(--color-text-secondary)]",children:L?`Latest traffic is "${L.name}". Open it to inspect hierarchy, timing, and payload shape.`:"No active traces yet. Generate a request through an instrumented client to validate the pipeline."})]})]})})]})]}),e.jsxs("section",{className:`${q} p-5 sm:p-6`,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"hud-label",children:"Operator Briefing"}),e.jsx("h2",{className:"page-section-title mt-1",children:"What this surface is telling you"})]}),e.jsxs(We,{defaultValue:["queue-health"],multiple:!0,children:[e.jsxs(J,{value:"queue-health",className:"border-[var(--border-dim)]",children:[e.jsx(ee,{className:"text-base text-[var(--color-text-primary)] hover:no-underline",children:"What should I check first when I open LLMTap?"}),e.jsx(re,{className:"leading-6 text-[var(--color-text-secondary)]",children:"Start with the economic pulse, dominant provider, and latest trace. That combination tells you whether traffic is flowing, whether one provider is dominating spend, and which trace should be inspected first."})]}),e.jsxs(J,{value:"traces-vs-economics",className:"border-[var(--border-dim)]",children:[e.jsx(ee,{className:"text-base text-[var(--color-text-primary)] hover:no-underline",children:"When do I move from Overview to Traces or Economics?"}),e.jsx(re,{className:"leading-6 text-[var(--color-text-secondary)]",children:"Use Traces when something looks operationally wrong and you need the exact request timeline. Use Economics when behavior is healthy but budget concentration or model mix looks suspicious."})]}),e.jsxs(J,{value:"healthy-window",className:"border-[var(--border-dim)]",children:[e.jsx(ee,{className:"text-base text-[var(--color-text-primary)] hover:no-underline",children:"What does a healthy window look like?"}),e.jsx(re,{className:"leading-6 text-[var(--color-text-secondary)]",children:"Healthy windows show steady cost movement, low risk surface, no sudden provider concentration shifts, and a queue of recent traces that stays readable instead of spiking with failures."})]})]})]})]})}export{hr as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as m,d as v,j as s}from"./query-DVWnIZNd.js";import{L as g,b as N,s as j}from"./index-DG2eF3M2.js";import{D as f}from"./DataTable-p1PD-dJj.js";import{c as o,f as y,a as l,P as b}from"./format-zoXqpaOb.js";import{E as C}from"./EmptyState-xDl-M9Rz.js";import{N as S}from"./number-ticker-CjofSQ3s.js";import{M as k,T as w,a3 as T}from"./icons-BOLUIAKd.js";import{c as K}from"./motion-CSeNjKbZ.js";import"./ui-BFiKdTjl.js";import"./select-BJEJvQo4.js";const d="dashboard-shell rounded-[var(--radius-card)]";function R(){const[x,h]=m.useState([{id:"lastSeen",desc:!0}]),{data:i,isLoading:p}=v({queryKey:["sessions"],queryFn:()=>j(168)}),t=i?.sessions??[],a=i?.total??0,n=t.reduce((e,r)=>e+r.totalCost,0),c=t.reduce((e,r)=>e+r.traceCount,0),u=m.useMemo(()=>[{accessorKey:"sessionId",header:"Session ID",cell:({row:e})=>s.jsxs(g,{to:`/traces?q=${encodeURIComponent(e.original.sessionId)}`,className:"group inline-flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--radius-panel)] border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] text-[var(--color-accent)] transition-colors hover:border-[var(--border-default)] hover:text-[var(--color-accent)]",children:s.jsx(k,{className:"h-4 w-4"})}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block truncate font-mono text-sm font-semibold text-[var(--color-text-primary)] transition-colors hover:text-[var(--color-accent)]",children:e.original.sessionId.length>28?`${e.original.sessionId.slice(0,26)}...`:e.original.sessionId}),s.jsxs("span",{className:"mt-1 block text-xs text-[var(--color-text-secondary)]",children:["Last active ",o(e.original.lastSeen)]})]})]})},{accessorKey:"traceCount",header:"Traces",cell:({row:e})=>s.jsx("span",{className:"font-mono text-sm text-[var(--color-text-secondary)]",children:e.original.traceCount}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"spanCount",header:"Spans",cell:({row:e})=>s.jsx("span",{className:"font-mono text-sm text-[var(--color-text-secondary)]",children:e.original.spanCount}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"totalTokens",header:"Tokens",cell:({row:e})=>s.jsx("span",{className:"font-mono text-sm text-[var(--color-text-secondary)]",children:y(e.original.totalTokens)}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"totalCost",header:"Cost",cell:({row:e})=>s.jsx("span",{className:"font-mono text-sm font-semibold text-[var(--color-text-primary)]",children:l(e.original.totalCost)}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"errorCount",header:"Errors",cell:({row:e})=>e.original.errorCount>0?s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-[var(--color-text-primary)]/20 bg-[var(--color-text-primary)]/10 px-2 py-0.5 text-xs font-bold text-[var(--color-text-primary)]",children:[s.jsx(w,{className:"h-3 w-3"}),e.original.errorCount]}):s.jsx("span",{className:"font-mono text-sm text-[var(--color-text-tertiary)]",children:"0"}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"firstSeen",header:"First Seen",cell:({row:e})=>s.jsx("span",{className:"text-sm text-[var(--color-text-secondary)]",children:o(e.original.firstSeen)}),meta:{className:"text-right",cellClassName:"text-right"}},{accessorKey:"lastSeen",header:"Last Active",cell:({row:e})=>s.jsx("span",{className:"text-sm text-[var(--color-text-secondary)]",children:o(e.original.lastSeen)}),meta:{className:"text-right",cellClassName:"text-right"}}],[]);return p?s.jsxs("div",{className:"mx-auto max-w-[1760px] space-y-8",children:[s.jsx("div",{className:"skeleton-panel h-44 rounded-[28px]"}),s.jsx("div",{className:"skeleton-panel h-80 rounded-[24px]"})]}):s.jsxs(b,{eyebrow:"Session Fabric",title:"Multi-turn conversations, grouped and measured.",description:"Sessions collect related traces into logical units. Track total cost and token volume across entire user conversations, multi-step agent runs, or workflow pipelines.",aside:s.jsxs("div",{className:"insight-panel",children:[s.jsx(N,{}),s.jsxs("div",{className:"mt-5 space-y-4",children:[s.jsxs("div",{className:"deck-card deck-card--accent",children:[s.jsx("div",{className:"hud-label",children:"Active sessions"}),s.jsx("div",{className:"mt-2 text-lg font-medium text-[var(--color-text-primary)]",children:s.jsx(S,{value:a})}),s.jsxs("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:[c," traces across all sessions"]})]}),s.jsxs("div",{className:"deck-card",children:[s.jsx("div",{className:"hud-label",children:"Session spend"}),s.jsx("div",{className:"mt-2 text-lg font-medium text-[var(--color-text-primary)]",children:l(n)}),s.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:"Combined cost across visible sessions"})]})]})]}),children:[s.jsxs("div",{className:"pill-strip w-fit max-w-full overflow-x-auto",children:[s.jsxs("span",{className:"pill-item",children:["window ",s.jsx("strong",{children:"168h"})]}),s.jsxs("span",{className:"pill-item",children:["sessions ",s.jsx("strong",{children:a})]}),s.jsxs("span",{className:"pill-item",children:["traces ",s.jsx("strong",{children:c})]}),s.jsxs("span",{className:"pill-item",children:["spend ",s.jsx("strong",{children:l(n)})]})]}),t.length>0?s.jsxs(K.div,{className:`${d} overflow-hidden p-5`,initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.35},children:[s.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3 px-1",children:[s.jsxs("div",{children:[s.jsx("div",{className:"hud-label",children:"Session registry"}),s.jsx("h2",{className:"page-section-title mt-1",children:"Tracked sessions"})]}),s.jsxs("span",{className:"status-chip",children:[s.jsx(T,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}),s.jsxs("span",{children:[a," sessions"]})]})]}),s.jsx(f,{columns:u,data:t,sorting:x,onSortingChange:h})]}):s.jsx("div",{className:`${d} p-16`,children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(C,{title:"No sessions tracked yet",description:"Sessions appear when you pass a `sessionId` to the SDK. This groups related traces into logical conversations or workflows."}),s.jsx("pre",{className:"mx-auto mt-5 max-w-lg rounded-[var(--radius-panel)] border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] p-5 text-left font-mono text-sm text-[var(--color-text-secondary)]",children:`import { init } from "@llmtap/sdk";
|
|
2
|
-
|
|
3
|
-
init({ sessionId: "user-session-123" });`})]})})]})}export{R as default};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{r as u,d as me,j as e}from"./query-DVWnIZNd.js";import{l as ue,L as he,D as ve,m as ge,n as be,o as je,p as fe,b as ye,t as I,r as Ne,k as ke}from"./index-DG2eF3M2.js";import{P as we,a as w,b as g}from"./format-zoXqpaOb.js";import{E as Se}from"./EmptyState-xDl-M9Rz.js";import{g as S,S as Ce}from"./content-DZmxO8bn.js";import{P as Q}from"./ProviderBadge-Cs31007s.js";import{m as Te,z as E,B as $e,F as Ie,E as Me,H as Y,y as Z,Z as Re,I as V,x as D,O as ee,J as _e,q as te,N as Oe,Q as Pe,U as Ee,W as De,w as W,Y as Le,_ as re,$ as Ae,t as He}from"./icons-BOLUIAKd.js";import{c as ae,b as qe}from"./motion-CSeNjKbZ.js";import"./ui-BFiKdTjl.js";function Be(t){const s=new Map,o=[];for(const l of t)s.set(l.spanId,{span:l,children:[]});for(const l of t){const n=s.get(l.spanId);n&&(l.parentSpanId&&s.has(l.parentSpanId)?s.get(l.parentSpanId)?.children.push(n):o.push(n))}const c=l=>{l.sort((n,r)=>n.span.startTime-r.span.startTime);for(const n of l)c(n.children)};return c(o),o}function L(t){return t.children.reduce((s,o)=>s+1+L(o),0)}function Fe(){const[t,s]=u.useState(null);function o(c,l){navigator.clipboard.writeText(c),s(l),I.success("Copied to clipboard",{description:`${l} copied successfully.`}),setTimeout(()=>s(null),2e3)}return{copied:t,copy:o}}function k({text:t,label:s,copied:o,onCopy:c}){return e.jsx("button",{type:"button",onClick:l=>{l.stopPropagation(),c(t,s)},className:"rounded-lg border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.035)] p-1.5 text-[var(--color-text-tertiary)] transition-colors hover:border-[var(--border-default)] hover:text-[var(--color-text-primary)]",title:"Copy to clipboard",children:o===s?e.jsx(E,{className:"h-3 w-3 text-[var(--color-accent)]"}):e.jsx(Ee,{className:"h-3 w-3"})})}function b({icon:t,label:s,value:o}){return e.jsxs("div",{className:"deck-card h-full rounded-[calc(var(--radius-panel)+4px)] p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[e.jsx(t,{className:"h-3 w-3"}),s]}),e.jsx("div",{className:"text-[var(--color-text-primary)]",style:{fontFamily:"var(--font-operator)",fontSize:"28px",fontWeight:700,lineHeight:"0.92",letterSpacing:"-0.04em"},children:o})]})}function v({label:t,value:s,tone:o="default"}){const c=o==="success"?"border-[var(--color-accent)]/16 bg-[var(--color-accent)]/8 text-[var(--color-text-primary)]":o==="danger"?"border-[var(--color-text-primary)]/16 bg-[var(--color-text-primary)]/8 text-[var(--color-text-primary)]":"border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.035)] text-[var(--color-text-primary)]";return e.jsxs("div",{className:`rounded-2xl border px-3 py-2 ${c}`,children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:t}),e.jsx("div",{className:"mt-1 font-mono text-xs font-semibold",children:s})]})}function P({icon:t,title:s,count:o,collapsed:c,onToggle:l}){const n=e.jsxs(e.Fragment,{children:[l?e.jsx(He,{className:`h-3.5 w-3.5 transition-transform ${c?"-rotate-90":""}`}):null,e.jsx(t,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:s}),typeof o=="number"?e.jsx("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5 font-mono text-[10px] text-[var(--color-text-secondary)]",children:o}):null]});return l?e.jsx("button",{type:"button",onClick:l,className:"mb-3 flex w-full items-center gap-1.5 text-[10px] font-bold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)] transition-colors hover:text-[var(--color-text-secondary)]",children:n}):e.jsx("div",{className:"mb-3 flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:n})}function Ke({role:t,type:s}){const o={system:"bg-[var(--color-panel)]/90 text-[var(--color-text-primary)] border-[var(--color-accent-2)]/16",user:"bg-[var(--color-accent)]/10 text-[var(--color-text-primary)] border-[var(--color-accent)]/16",assistant:"bg-[var(--color-accent-2)]/10 text-[var(--color-accent)] border-[var(--color-accent-2)]/16",tool:"bg-[var(--color-text-primary)]/10 text-[var(--color-text-primary)] border-[var(--color-text-primary)]/16",function:"bg-[var(--color-text-primary)]/10 text-[var(--color-text-primary)] border-[var(--color-text-primary)]/16"},c=s==="input"?"bg-[var(--color-accent)]/10 text-[var(--color-text-primary)] border-[var(--color-accent)]/16":"bg-[var(--color-accent-2)]/10 text-[var(--color-accent)] border-[var(--color-accent-2)]/16";return e.jsx("span",{className:`rounded-full border px-2.5 py-1 text-[10px] font-bold capitalize tracking-[0.16em] ${o[t]??c}`,children:t})}function X(t){return!t||typeof t=="string"?!1:t.some(s=>s.type==="image_url"||s.type==="image")}function A(t){return t.map(s=>s.type==="image_url"&&s.image_url?.url?s.image_url.url:s.type==="image"&&s.source?.data?`data:${s.source.media_type||"image/png"};base64,${s.source.data}`:null).filter(s=>{if(!s)return!1;if(s.startsWith("data:image/"))return!0;try{const o=new URL(s);return o.protocol==="http:"||o.protocol==="https:"}catch{return!1}})}function Je(t){const s=S(t);let o=s?Math.ceil(s.length/4):0;if(t&&typeof t!="string"){const c=t.filter(l=>l.type==="image_url"||l.type==="image").length;o+=c*85}return o}function G({message:t,type:s,copied:o,onCopy:c}){const l=t.content,n=S(l),r=l&&typeof l!="string"?A(l):[],d=s==="input"?"border-[var(--border-dim)]":"border-[var(--color-accent)]/12",i=`msg-${s}-${t.role}-${n.slice(0,20)}`;return e.jsxs("div",{className:`rounded-2xl border ${d} bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.68),rgba(var(--ch-bg-base),0.9))] p-4`,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ke,{role:t.role,type:s}),t.name&&e.jsx("span",{className:"font-mono text-[10px] text-[var(--color-text-tertiary)]",children:t.name}),r.length>0&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-[var(--color-accent-2)]/16 bg-[var(--color-panel)]/90 px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--color-text-primary)]",children:[e.jsx(Ae,{className:"h-2.5 w-2.5"}),r.length," image",r.length>1?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"font-mono text-[10px] text-[var(--color-text-disabled)]",children:["~",Je(l)," tok"]}),n&&e.jsx(k,{text:n,label:i,copied:o,onCopy:c})]})]}),n&&e.jsx("pre",{className:"mt-2.5 whitespace-pre-wrap font-mono text-xs leading-relaxed text-[var(--color-text-secondary)]",children:We(n)}),r.length>0&&e.jsx("div",{className:"mt-2.5 flex flex-wrap gap-2",children:r.map((x,j)=>e.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"group relative overflow-hidden rounded-lg border border-[var(--border-dim)] bg-[rgba(var(--ch-bg-base),0.72)] transition-colors hover:border-[var(--border-default)]",children:[e.jsx("img",{src:x,alt:`Image ${j+1}`,className:"max-h-48 max-w-64 object-contain",loading:"lazy"}),e.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 transition-opacity group-hover:opacity-100",children:e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-[var(--color-text-primary)]",children:"Open"})})]},j))})]})}function Ue({span:t,copied:s,onCopy:o}){const c=t.inputMessages?.length??0,l=t.outputMessages?.length??0,[n,r]=u.useState(c>3),[d,i]=u.useState(l>3);return e.jsx(ae.div,{initial:{opacity:0,gridTemplateRows:"0fr"},animate:{opacity:1,gridTemplateRows:"1fr"},exit:{opacity:0,gridTemplateRows:"0fr"},transition:{duration:.2},style:{display:"grid"},children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("div",{className:"mx-4 mb-4 rounded-[24px] border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.92),rgba(var(--ch-bg-deep),0.97),rgba(var(--ch-bg-base),0.99))] p-5 text-sm shadow-[inset_0_1px_0_rgba(var(--ch-text-primary),0.04),0_26px_60px_rgba(0,0,0,0.22)]",children:e.jsxs("div",{className:"grid gap-5 xl:grid-cols-[minmax(0,1fr)_320px]",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"grid flex-1 grid-cols-2 gap-3 md:grid-cols-4",children:[e.jsx(b,{icon:De,label:"Model",value:t.responseModel??t.requestModel??"-"}),e.jsx(b,{icon:Z,label:"Tokens",value:`${t.inputTokens} in / ${t.outputTokens} out`}),e.jsx(b,{icon:V,label:"Cost",value:w(t.totalCost)}),e.jsx(b,{icon:D,label:"Duration",value:t.duration?g(t.duration):"-"})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[e.jsx(v,{label:"Input msgs",value:String(c)}),e.jsx(v,{label:"Output msgs",value:String(l)}),e.jsx(v,{label:"Tool calls",value:String(t.toolCalls?.length??0)}),e.jsx(v,{label:"Status",value:t.status==="error"?"Error":"OK",tone:t.status==="error"?"danger":"success"})]}),t.status==="error"&&e.jsxs("div",{className:"rounded-2xl border border-[var(--color-text-primary)]/18 bg-[var(--color-text-primary)]/6 p-4",children:[e.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-bold uppercase tracking-[0.16em] text-[var(--color-text-primary)]",children:[e.jsx(te,{className:"h-4 w-4"}),t.errorType??"error"]}),t.errorMessage&&e.jsx(k,{text:t.errorMessage,label:"error",copied:s,onCopy:o})]}),e.jsx("div",{className:"font-mono text-xs leading-relaxed text-[var(--color-text-primary)]/70",children:t.errorMessage})]}),t.inputMessages&&t.inputMessages.length>0&&e.jsxs("div",{children:[e.jsx(P,{icon:W,title:"Input messages",count:t.inputMessages.length,collapsed:n,onToggle:()=>r(x=>!x)}),!n&&e.jsx("div",{className:"space-y-2",children:t.inputMessages.map((x,j)=>e.jsx(G,{message:x,type:"input",copied:s,onCopy:o},`in-${x.role}-${j}`))})]}),t.outputMessages&&t.outputMessages.length>0&&e.jsxs("div",{children:[e.jsx(P,{icon:W,title:"Output messages",count:t.outputMessages.length,collapsed:d,onToggle:()=>i(x=>!x)}),!d&&e.jsx("div",{className:"space-y-2",children:t.outputMessages.map((x,j)=>e.jsx(G,{message:x,type:"output",copied:s,onCopy:o},`out-${x.role}-${j}`))})]}),t.toolCalls&&t.toolCalls.length>0&&e.jsxs("div",{children:[e.jsx(P,{icon:Le,title:"Tool calls",count:t.toolCalls.length}),e.jsx("div",{className:"space-y-2",children:t.toolCalls.map(x=>e.jsxs("div",{className:"rounded-2xl border border-[var(--color-accent-2)]/10 bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.7),rgba(var(--ch-bg-base),0.86))] p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"rounded-full border border-[var(--color-accent-2)]/16 bg-[var(--color-accent-2)]/10 px-2.5 py-1 text-[10px] font-bold tracking-[0.16em] text-[var(--color-accent)]",children:x.name}),e.jsx(k,{text:x.arguments,label:`tool-${x.id}`,copied:s,onCopy:o})]}),e.jsx("pre",{className:"mt-2.5 overflow-x-auto font-mono text-xs leading-relaxed text-[var(--color-text-secondary)]",children:se(x.arguments)}),x.result&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"my-2 border-t border-[var(--border-dim)]"}),e.jsx("div",{className:"mb-1 text-[10px] font-bold uppercase tracking-[0.16em] text-[var(--color-text-disabled)]",children:"Result"}),e.jsx("pre",{className:"overflow-x-auto font-mono text-xs leading-relaxed text-[var(--color-text-secondary)]",children:x.result})]})]},x.id))})]})]}),e.jsxs("div",{className:"space-y-4 xl:sticky xl:top-6 xl:self-start",children:[e.jsxs("div",{className:"rounded-2xl border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.74),rgba(var(--ch-bg-base),0.9))] p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),"Span identity"]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-disabled)]",children:"Span ID"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-[var(--color-text-secondary)]",children:t.spanId}),e.jsx(k,{text:t.spanId,label:"spanId",copied:s,onCopy:o})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-disabled)]",children:"Operation"}),e.jsx("div",{className:"mt-1 text-sm text-[var(--color-text-secondary)]",children:t.operationName})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-disabled)]",children:"Provider"}),e.jsx("div",{className:"mt-1",children:e.jsx(Q,{provider:t.providerName})})]}),t.parentSpanId&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-disabled)]",children:"Parent span"}),e.jsx("div",{className:"mt-1 font-mono text-xs text-[var(--color-text-secondary)]",children:t.parentSpanId})]}),t.sessionId&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-disabled)]",children:"Session"}),e.jsx("div",{className:"mt-1 font-mono text-xs text-[var(--color-text-secondary)]",children:t.sessionId})]})]})]}),e.jsxs("div",{className:"rounded-2xl border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.74),rgba(var(--ch-bg-base),0.9))] p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-1.5 text-[10px] font-bold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),"Request config"]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-1",children:[e.jsx(v,{label:"Request model",value:t.requestModel}),e.jsx(v,{label:"Response model",value:t.responseModel??t.requestModel??"-"}),e.jsx(v,{label:"Temperature",value:t.temperature!==void 0?String(t.temperature):"-"}),e.jsx(v,{label:"Top P",value:t.topP!==void 0?String(t.topP):"-"}),e.jsx(v,{label:"Max tokens",value:t.maxTokens!==void 0?String(t.maxTokens):"-"}),e.jsx(v,{label:"Started",value:new Date(t.startTime).toLocaleTimeString()})]})]})]})]})})})})}function se(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function ze(t){const s=t.providerName?.toLowerCase()??"",o=t.requestModel??t.responseModel??"unknown",c=(t.inputMessages??[]).map(r=>({role:r.role,content:typeof r.content=="string"?r.content:r.content??""})),n=JSON.stringify({model:o,messages:c}).replace(/'/g,"'\\''");return s==="openai"?`curl https://api.openai.com/v1/chat/completions \\
|
|
2
|
-
-H "Authorization: Bearer $OPENAI_API_KEY" \\
|
|
3
|
-
-H "Content-Type: application/json" \\
|
|
4
|
-
-d '${n}'`:s==="anthropic"?`curl https://api.anthropic.com/v1/messages \\
|
|
5
|
-
-H "x-api-key: $ANTHROPIC_API_KEY" \\
|
|
6
|
-
-H "anthropic-version: 2023-06-01" \\
|
|
7
|
-
-H "Content-Type: application/json" \\
|
|
8
|
-
-d '${JSON.stringify({model:o,max_tokens:t.maxTokens??1024,messages:c.filter(i=>i.role!=="system"),...c.find(i=>i.role==="system")?{system:c.find(i=>i.role==="system").content}:{}}).replace(/'/g,"'\\''")}'`:s==="google"?`curl "https://generativelanguage.googleapis.com/v1beta/models/${o}:generateContent?key=$GOOGLE_API_KEY" \\
|
|
9
|
-
-H "Content-Type: application/json" \\
|
|
10
|
-
-d '${n}'`:`curl https://api.example.com/v1/chat/completions \\
|
|
11
|
-
-H "Authorization: Bearer $API_KEY" \\
|
|
12
|
-
-H "Content-Type: application/json" \\
|
|
13
|
-
-d '${n}'`}function Ye(t,s,o,c,l,n){const r=[];r.push("# Trace Report"),r.push(""),r.push(`**Trace ID:** \`${t}\``),r.push(`**Status:** ${n?"Error":"Stable"}`),r.push(`**Total Spans:** ${s.length}`),r.push(`**Total Tokens:** ${o.toLocaleString()}`),r.push(`**Total Cost:** ${w(c)}`),r.push(`**Duration:** ${g(l)}`),r.push(""),r.push("---"),r.push("");for(const d of s){if(r.push(`## Span: ${d.name}`),r.push(""),r.push("| Field | Value |"),r.push("|-------|-------|"),r.push(`| Span ID | \`${d.spanId}\` |`),r.push(`| Provider | ${d.providerName} |`),r.push(`| Model | ${d.responseModel??d.requestModel??"-"} |`),r.push(`| Operation | ${d.operationName} |`),r.push(`| Tokens | ${d.inputTokens} in / ${d.outputTokens} out |`),r.push(`| Cost | ${w(d.totalCost)} |`),r.push(`| Duration | ${d.duration?g(d.duration):"-"} |`),r.push(`| Status | ${d.status} |`),r.push(""),d.inputMessages&&d.inputMessages.length>0){r.push("### Input Messages"),r.push("");for(const i of d.inputMessages)r.push(`**[${i.role}]${i.name?` (${i.name})`:""}**`),r.push(""),r.push(S(i.content)||"_empty_"),X(i.content)&&r.push(`
|
|
14
|
-
_[${A(i.content).length} image(s) attached]_`),r.push("")}if(d.outputMessages&&d.outputMessages.length>0){r.push("### Output Messages"),r.push("");for(const i of d.outputMessages)r.push(`**[${i.role}]${i.name?` (${i.name})`:""}**`),r.push(""),r.push(S(i.content)||"_empty_"),X(i.content)&&r.push(`
|
|
15
|
-
_[${A(i.content).length} image(s) attached]_`),r.push("")}if(d.toolCalls&&d.toolCalls.length>0){r.push("### Tool Calls"),r.push("");for(const i of d.toolCalls)r.push(`**${i.name}** (\`${i.id}\`)`),r.push(""),r.push("```json"),r.push(se(i.arguments)),r.push("```"),i.result&&(r.push(""),r.push("Result:"),r.push("```"),r.push(i.result),r.push("```")),r.push("")}r.push("---"),r.push("")}return r.join(`
|
|
16
|
-
`)}function We(t){const s=/```(\w*)\n?([\s\S]*?)```/g,o=[];let c=0,l,n=0;for(;(l=s.exec(t))!==null;){l.index>c&&o.push(e.jsx("span",{children:t.slice(c,l.index)},n++));const r=l[1]||"",d=l[2];o.push(e.jsxs("span",{className:"my-1.5 block rounded-lg border border-[var(--border-dim)] bg-[rgba(var(--ch-bg-base),0.78)] px-3 py-2",children:[r&&e.jsxs("span",{className:"mb-1 flex items-center gap-1 text-[10px] font-bold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[e.jsx(re,{className:"h-3 w-3"}),r]}),e.jsx("span",{className:"block font-mono text-[11px] leading-relaxed text-[var(--color-accent)]/80",children:d})]},n++)),c=l.index+l[0].length}return c<t.length&&o.push(e.jsx("span",{children:t.slice(c)},n++)),o.length===0?t:o}function ot(){const{traceId:t}=ue(),[s,o]=u.useState(null),[c,l]=u.useState({}),{copied:n,copy:r}=Fe(),[d,i]=u.useState(!1),[x,j]=u.useState(""),[H,q]=u.useState(!1),[y,C]=u.useState(null),[B,T]=u.useState(null),[M,oe]=u.useState(null),{data:le,isLoading:ne}=me({queryKey:["trace",t],queryFn:()=>ke(t),enabled:!!t}),p=le?.spans??[],R=u.useMemo(()=>Be(p),[p]),_=p.length>0?Math.min(...p.map(a=>a.startTime)):0,N=(p.length>0?Math.max(...p.map(a=>a.endTime??a.startTime)):0)-_||1,O=p.reduce((a,h)=>a+h.totalTokens,0),F=p.reduce((a,h)=>a+h.totalCost,0),$=p.some(a=>a.status==="error");function ce(){const a=new Blob([JSON.stringify(p,null,2)],{type:"application/json"}),h=URL.createObjectURL(a),m=document.createElement("a");m.href=h,m.download=`trace-${t?.slice(0,12)}.json`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(h),I.success("Trace exported",{description:"The full trace payload was downloaded as JSON."})}async function ie(){if(!(!M||!x.trim())){q(!0),T(null),C(null);try{const a=await Ne(M,x.trim());C(a),I.success("Replay complete",{description:`Received a fresh response from ${a.provider}.`})}catch(a){T(a instanceof Error?a.message:String(a)),I.error("Replay failed",{description:a instanceof Error?a.message:String(a)})}finally{q(!1)}}}function de(a){oe(a),i(!0),C(null),T(null)}const K=(a,h=0)=>{const m=a.span.spanId===s,J=a.children.length>0,U=c[a.span.spanId]??!1,xe=(a.span.startTime-_)/N*100,pe=Math.max(((a.span.endTime??a.span.startTime)-a.span.startTime)/N*100,1);return e.jsxs(u.Fragment,{children:[e.jsx("div",{className:"border-t border-[var(--border-dim)] first:border-t-0",children:e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(m?null:a.span.spanId),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(m?null:a.span.spanId))},className:`grid w-full gap-3 px-4 py-3 text-left transition-colors sm:grid-cols-[minmax(0,380px)_minmax(0,1fr)_110px] sm:items-center sm:px-5 ${m?"bg-[rgba(var(--ch-accent),0.06)]":"hover:bg-[rgba(var(--ch-text-primary),0.03)]"}`,children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex min-w-0 items-start gap-3",style:{paddingLeft:`${h*22}px`},children:[J?e.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),l(z=>({...z,[a.span.spanId]:!z[a.span.spanId]}))},className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.035)] text-[var(--color-text-tertiary)] transition-colors hover:border-[var(--border-default)] hover:text-[var(--color-text-primary)]",children:e.jsx(Pe,{className:`h-4 w-4 transition-transform ${U?"":"rotate-90"}`})}):e.jsx("span",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] text-[var(--color-text-tertiary)]",children:e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--color-text-tertiary)]"})}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{status:a.span.status}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-medium text-[var(--color-text-primary)]",children:a.span.name}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2.5",children:[e.jsx(Q,{provider:a.span.providerName}),e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:a.span.operationName}),J?e.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[L(a)," child",L(a)===1?"":"ren"]}):null]})]})]})})]})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between text-[10px] uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[e.jsxs("span",{children:[Math.round(a.span.startTime-_),"ms"]}),e.jsx("span",{children:a.span.duration?g(a.span.duration):"instant"})]}),e.jsx("div",{className:"relative h-8 overflow-hidden rounded-full bg-[rgba(var(--ch-bg-base),0.88)]",children:e.jsx(ae.div,{className:`absolute bottom-1 top-1 origin-left rounded-full ${a.span.status==="error"?"bg-[linear-gradient(90deg,var(--color-text-primary),var(--color-accent-2))]":"bg-[linear-gradient(90deg,var(--color-accent-2),var(--color-accent))]"}`,style:{left:`${xe}%`,width:`${Math.max(pe,.5)}%`},initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.4,ease:"easeOut"}})})]}),e.jsxs("div",{className:"text-right font-mono text-[11px] text-[var(--color-text-tertiary)]",children:[e.jsx("div",{className:"text-[var(--color-text-secondary)]",children:w(a.span.totalCost)}),e.jsxs("div",{children:[a.span.totalTokens.toLocaleString()," tok"]})]})]})}),e.jsx(qe,{children:m?e.jsx(Ue,{span:a.span,copied:n,onCopy:r}):null}),!U&&a.children.map(f=>K(f,h+1))]},a.span.spanId)};return ne?e.jsxs("div",{className:"mx-auto max-w-[1760px] space-y-6",children:[e.jsx("div",{className:"skeleton-panel h-44 rounded-[28px]"}),e.jsx("div",{className:"skeleton-panel h-28 rounded-[24px]"}),e.jsx("div",{className:"skeleton-panel h-72 rounded-[24px]"})]}):e.jsxs(we,{eyebrow:"Trace Console",title:t?`Trace ${t.slice(0,12)}...`:"Trace detail",description:"Inspect the nested execution tree, timing offsets, token pressure, and payloads for a single trace without losing the operator surface.",aside:e.jsxs("div",{className:"insight-panel",children:[e.jsx(ye,{}),e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"deck-card deck-card--accent",children:[e.jsx("div",{className:"hud-label",children:"Current status"}),e.jsx("div",{className:"mt-2 flex items-center gap-2 text-base font-medium text-[var(--color-text-primary)]",children:$?e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"h-4 w-4 text-[var(--color-text-primary)]"}),"Error state"]}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{className:"h-4 w-4 text-[var(--color-accent)]"}),"Stable"]})})]}),e.jsxs("div",{className:"deck-card",children:[e.jsx("div",{className:"hud-label",children:"Hierarchy"}),e.jsxs("div",{className:"mt-2 text-lg font-medium text-[var(--color-text-primary)]",children:[R.length," root spans"]}),e.jsxs("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:[g(N)," elapsed from first to last event"]})]})]})]}),children:[e.jsxs("div",{className:"pill-strip w-fit max-w-full overflow-x-auto",children:[e.jsxs("span",{className:"pill-item",children:["trace ",e.jsx("strong",{children:t?.slice(0,10)??"unknown"})]}),e.jsxs("span",{className:"pill-item",children:["spans ",e.jsx("strong",{children:p.length})]}),e.jsxs("span",{className:"pill-item",children:["tokens ",e.jsx("strong",{children:O})]}),e.jsxs("span",{className:"pill-item",children:["status ",e.jsx("strong",{children:$?"error":"stable"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 text-sm",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.jsxs(he,{to:"/",className:"status-chip transition-colors hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)] hover:text-[var(--color-text-primary)]",children:[e.jsx(Te,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Back to overview"})]}),e.jsx("span",{className:"truncate rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2.5 py-1 font-mono text-xs text-[var(--color-text-tertiary)]",children:t}),e.jsx(k,{text:t??"",label:"traceId",copied:n,onCopy:r})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p.length>0&&e.jsxs("button",{type:"button",onClick:()=>{const a=p[0];r(ze(a),"curl")},className:"terminal-action",children:[n==="curl"?e.jsx(E,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}):e.jsx($e,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:n==="curl"?"Copied!":"Copy as cURL"})]}),p.length>0&&e.jsxs("button",{type:"button",onClick:()=>{r(Ye(t??"",p,O,F,N,$),"markdown")},className:"terminal-action",children:[n==="markdown"?e.jsx(E,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}):e.jsx(Ie,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:n==="markdown"?"Copied!":"Copy as Markdown"})]}),e.jsxs("button",{type:"button",onClick:ce,className:"terminal-action",children:[e.jsx(Me,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Export JSON"})]}),p.length>0&&e.jsxs("button",{type:"button",onClick:()=>de(p[0].spanId),className:"terminal-action",children:[e.jsx(Y,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}),e.jsx("span",{children:"Replay"})]})]})]}),e.jsx("div",{className:"dashboard-shell rounded-[26px] px-5 py-5",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-5",children:[e.jsx(b,{icon:Z,label:"Spans",value:String(p.length)}),e.jsx(b,{icon:Re,label:"Tokens",value:O.toLocaleString()}),e.jsx(b,{icon:V,label:"Cost",value:w(F)}),e.jsx(b,{icon:D,label:"Duration",value:p.length>0?g(N):"-"}),e.jsx(b,{icon:ee,label:"Status",value:$?"Error":"Stable"})]})}),e.jsxs("div",{className:"dashboard-shell overflow-hidden rounded-[26px]",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-[var(--border-dim)] px-5 py-4",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-2xl border border-[var(--color-accent)]/16 bg-[var(--color-accent)]/10",children:e.jsx(D,{className:"h-4 w-4 text-[var(--color-accent)]"})}),e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Execution tree"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Trace hierarchy"})]}),e.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2.5 py-1 text-xs font-mono tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[g(N)," total"]}),e.jsxs("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2.5 py-1 text-xs font-mono tracking-[0.16em] text-[var(--color-text-tertiary)]",children:[p.length," spans"]})]})]}),R.length>0?e.jsxs("div",{className:"py-2",children:[e.jsxs("div",{className:"grid gap-3 border-b border-[var(--border-dim)] px-4 py-3 text-[10px] uppercase tracking-[0.18em] text-[var(--color-text-tertiary)] sm:grid-cols-[minmax(0,380px)_minmax(0,1fr)_110px] sm:px-5",children:[e.jsx("span",{children:"Span"}),e.jsx("span",{children:"Timeline"}),e.jsx("span",{className:"text-right",children:"Spend / Tokens"})]}),R.map(a=>K(a))]}):e.jsx(Se,{title:"No spans found for this trace",description:"This trace exists, but there are no captured span events to render in the execution tree yet.",className:"h-[280px]"})]}),e.jsx(ve,{open:d,onOpenChange:a=>!a&&i(!1),children:e.jsxs(ge,{className:"max-w-2xl",children:[e.jsx(be,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl border border-[var(--color-accent)]/20 bg-[var(--color-accent)]/10",children:e.jsx(Y,{className:"h-4.5 w-4.5 text-[var(--color-accent)]"})}),e.jsxs("div",{children:[e.jsx(je,{children:"Trace Replay"}),e.jsx(fe,{children:"Re-send the same prompts and compare responses"})]})]})}),!y&&!H&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-xl border border-[var(--color-accent-2)]/20 bg-[var(--color-accent-2)]/8 p-3 text-xs text-[var(--color-text-primary)]/80",children:"Your API key is sent directly to the provider and is never stored by LLMTap."}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs font-medium text-[var(--color-text-tertiary)]",children:"Provider API Key"}),e.jsx("input",{type:"password",value:x,onChange:a=>j(a.target.value),placeholder:"sk-... or anthropic key",className:"w-full rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] px-4 py-3 text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-disabled)] focus:border-[var(--color-accent)]/30 focus:outline-none"})]}),B&&e.jsx("div",{className:"rounded-xl border border-[var(--color-text-primary)]/20 bg-[var(--color-text-primary)]/8 p-3 text-sm text-[var(--color-text-primary)]",children:B}),e.jsx("button",{type:"button",disabled:!x.trim(),onClick:ie,className:"w-full rounded-xl bg-[var(--color-accent)] px-4 py-3 text-sm font-semibold text-[var(--color-bg-base)] transition-colors hover:bg-[var(--color-accent-2)] disabled:cursor-not-allowed disabled:opacity-40",children:"Send Replay Request"})]}),H&&e.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[e.jsx(_e,{className:"h-8 w-8 animate-spin text-[var(--color-accent)]"}),e.jsxs("p",{className:"text-sm text-[var(--color-text-tertiary)]",children:["Replaying against ",p[0]?.providerName," API..."]})]}),y&&(()=>{const a=p.find(m=>m.spanId===M)??p[0],h=a?.outputMessages?.map(m=>S(m.content)).join(`
|
|
17
|
-
`)??"";return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-3 text-center",children:[e.jsxs("div",{className:"rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] p-3",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:"Tokens"}),e.jsxs("div",{className:"mt-1 font-mono text-sm text-[var(--color-text-primary)]",children:[a.totalTokens," ",e.jsx("span",{className:"text-[var(--color-text-tertiary)]",children:"vs"})," ",y.totalTokens]})]}),e.jsxs("div",{className:"rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] p-3",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:"Duration"}),e.jsxs("div",{className:"mt-1 font-mono text-sm text-[var(--color-text-primary)]",children:[g(a.duration??0)," ",e.jsx("span",{className:"text-[var(--color-text-tertiary)]",children:"vs"})," ",g(y.duration)]})]}),e.jsxs("div",{className:"rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] p-3",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:"Model"}),e.jsx("div",{className:"mt-1 truncate font-mono text-xs text-[var(--color-text-primary)]",children:y.responseModel})]})]}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.16em] text-[var(--color-text-tertiary)]",children:"Original Response"}),e.jsx("div",{className:"max-h-[300px] overflow-y-auto rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] p-3 text-sm leading-6 text-[var(--color-text-secondary)]",children:h||e.jsx("span",{className:"text-[var(--color-text-disabled)]",children:"No content captured"})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-[0.16em] text-[var(--color-accent)]/80",children:"Replay Response"}),e.jsx("div",{className:"max-h-[300px] overflow-y-auto rounded-xl border border-[var(--color-accent)]/12 bg-[var(--color-accent)]/6 p-3 text-sm leading-6 text-[var(--color-text-secondary)]",children:y.content||e.jsx("span",{className:"text-[var(--color-text-disabled)]",children:"Empty response"})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{C(null),T(null)},className:"flex-1 rounded-xl border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] px-4 py-2.5 text-sm text-[var(--color-text-secondary)] transition-colors hover:bg-[rgba(var(--ch-text-primary),0.06)]",children:"Replay Again"}),e.jsx("button",{type:"button",onClick:()=>i(!1),className:"flex-1 rounded-xl bg-[var(--color-accent)] px-4 py-2.5 text-sm font-semibold text-[var(--color-bg-base)] transition-colors hover:bg-[var(--color-accent-2)]",children:"Done"})]})]})})()]})})]})}export{ot as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,d as me,j as e}from"./query-DVWnIZNd.js";import{a as pe,S as he,g as ue,h as ve,i as be,j as ge,L as je,k as J,d as fe}from"./index-DG2eF3M2.js";import{G as Ne}from"./GettingStartedPanel-Cn46fQ1w.js";import{P as ye,c as G,a as T,b as k,f as se}from"./format-zoXqpaOb.js";import{S as E,g as Se}from"./content-DZmxO8bn.js";import{S as M,a as P,b as $,c as L,d as S}from"./select-BJEJvQo4.js";import{P as Y,C as we}from"./CommandBar-CBRbPbgc.js";import{E as A}from"./EmptyState-xDl-M9Rz.js";import{b as B,c as ae}from"./motion-CSeNjKbZ.js";import{p as V,q as Ce,r as K,Z as Te,X as re,j as ee,s as ke,t as _e,u as De,m as Ie,n as le,v as Me,w as Pe,x as $e,y as Le,d as Ee,D as He}from"./icons-BOLUIAKd.js";import"./ui-BFiKdTjl.js";const te=[25,50,100,200];function qe({trace:s,onClose:a}){const h=s.totalDuration??(s.endTime?s.endTime-s.startTime:0);return e.jsx(he,{open:!0,onOpenChange:u=>!u&&a(),children:e.jsxs(ue,{side:"right",className:"flex flex-col overflow-y-auto",children:[e.jsxs(ve,{className:"border-b border-[var(--border-dim)]",children:[e.jsx("div",{className:"hud-label",children:"Quick preview"}),e.jsx(be,{className:"truncate",children:s.name}),e.jsx(ge,{className:"sr-only",children:"Trace preview panel"})]}),e.jsxs("div",{className:"flex-1 space-y-4 p-5",children:[e.jsxs("div",{className:"surface-strong rounded-[20px] p-4",children:[e.jsx("div",{className:"hud-label",children:"Trace ID"}),e.jsx("div",{className:"mt-1 break-all font-mono text-sm text-[var(--color-text-secondary)]",children:s.traceId})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"surface-strong rounded-[20px] p-4",children:[e.jsx("div",{className:"hud-label",children:"Status"}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx(E,{status:s.status}),e.jsx("span",{className:`text-sm font-medium ${s.status==="error"?"text-[var(--color-text-primary)]":"text-[var(--color-accent)]"}`,children:s.status==="error"?"Error":"Healthy"})]})]}),e.jsxs("div",{className:"surface-strong rounded-[20px] p-4",children:[e.jsx("div",{className:"hud-label",children:"Duration"}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx($e,{className:"h-4 w-4 text-[var(--color-accent)]"}),e.jsx("span",{className:"text-sm font-medium text-[var(--color-text-primary)]",children:h>0?k(h):"N/A"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{className:"surface-strong rounded-[20px] p-4 text-center",children:[e.jsx("div",{className:"hud-label",children:"Spans"}),e.jsx("div",{className:"mt-2 text-xl font-semibold text-[var(--color-text-primary)]",children:s.spanCount}),e.jsx(Le,{className:"mx-auto mt-1 h-4 w-4 text-[var(--color-accent-2)]/70"})]}),e.jsxs("div",{className:"surface-strong rounded-[20px] p-4 text-center",children:[e.jsx("div",{className:"hud-label",children:"Tokens"}),e.jsx("div",{className:"mt-2 text-xl font-semibold text-[var(--color-text-primary)]",children:se(s.totalTokens)}),e.jsx(Ee,{className:"mx-auto mt-1 h-4 w-4 text-[var(--color-accent)]/70"})]}),e.jsxs("div",{className:"surface-strong rounded-[20px] p-4 text-center",children:[e.jsx("div",{className:"hud-label",children:"Cost"}),e.jsx("div",{className:"mt-2 text-xl font-semibold text-[var(--color-text-primary)]",children:T(s.totalCost)}),e.jsx(He,{className:"mx-auto mt-1 h-4 w-4 text-[var(--color-text-primary)]/70"})]})]}),e.jsxs("div",{className:"surface-strong rounded-[20px] p-4",children:[e.jsx("div",{className:"hud-label",children:"Started"}),e.jsxs("div",{className:"mt-1 text-sm text-[var(--color-text-secondary)]",children:[new Date(s.startTime).toLocaleString()," (",G(s.startTime),")"]}),s.endTime&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hud-label mt-3",children:"Ended"}),e.jsx("div",{className:"mt-1 text-sm text-[var(--color-text-secondary)]",children:new Date(s.endTime).toLocaleString()})]})]}),e.jsxs(je,{to:`/trace/${s.traceId}`,className:"flex w-full items-center justify-center gap-2 rounded-2xl border border-[var(--color-accent-2)]/20 bg-[linear-gradient(135deg,rgba(var(--ch-accent-2), 0.14),rgba(var(--ch-accent), 0.08))] px-5 py-3 text-sm font-medium text-[var(--color-accent)] transition-colors hover:bg-[linear-gradient(135deg,rgba(var(--ch-accent-2), 0.24),rgba(var(--ch-accent), 0.14))]",children:["Open full trace detail",e.jsx(le,{className:"h-4 w-4"})]})]})]})})}function ze({traceA:s,traceB:a}){const[h,u]=d.useState([]),[c,n]=d.useState([]),[l,f]=d.useState(!0);if(d.useEffect(()=>{let N=!1;return f(!0),Promise.all([J(s.traceId),J(a.traceId)]).then(([i,b])=>{N||(u(i.spans),n(b.spans),f(!1))}),()=>{N=!0}},[s.traceId,a.traceId]),l)return e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-[var(--color-text-tertiary)]",children:"Loading responses..."});const o=N=>N.flatMap(i=>(i.outputMessages??[]).filter(b=>b.role==="assistant").map(b=>({spanName:i.name,model:i.responseModel??i.requestModel,content:Se(b.content)}))),v=o(h),g=o(c),r=Math.max(v.length,g.length);return r===0?e.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-[var(--color-text-tertiary)]",children:"No assistant responses found in either trace."}):e.jsx("div",{className:"space-y-3",children:Array.from({length:r},(N,i)=>{const b=v[i],p=g[i];return e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx("div",{className:"surface-strong rounded-[20px] border-[var(--color-accent-2)]/12 p-3",children:b?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-1.5 flex items-center gap-2",children:[e.jsx("span",{className:"rounded-full border border-[var(--color-accent-2)]/16 bg-[var(--color-accent-2)]/10 px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--color-accent)]",children:"assistant"}),e.jsx("span",{className:"font-mono text-[10px] text-[var(--color-text-tertiary)]",children:b.model})]}),e.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed text-[var(--color-text-secondary)]",children:b.content||e.jsx("span",{className:"text-[var(--color-text-disabled)] italic",children:"empty response"})})]}):e.jsx("div",{className:"text-xs italic text-[var(--color-text-disabled)]",children:"No response"})}),e.jsx("div",{className:"surface-strong rounded-[20px] border-[var(--color-accent)]/12 p-3",children:p?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-1.5 flex items-center gap-2",children:[e.jsx("span",{className:"rounded-full border border-[var(--color-accent)]/16 bg-[var(--color-accent)]/10 px-2 py-0.5 text-[10px] font-bold uppercase tracking-[0.12em] text-[var(--color-accent)]",children:"assistant"}),e.jsx("span",{className:"font-mono text-[10px] text-[var(--color-text-tertiary)]",children:p.model})]}),e.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed text-[var(--color-text-secondary)]",children:p.content||e.jsx("span",{className:"text-[var(--color-text-disabled)] italic",children:"empty response"})})]}):e.jsx("div",{className:"text-xs italic text-[var(--color-text-disabled)]",children:"No response"})})]},i)})})}function Re({traceA:s,traceB:a,durA:h,durB:u}){const[c,n]=d.useState("cost"),l=d.useMemo(()=>[{id:"A",name:s.name,cost:s.totalCost,latency:h,tokens:s.totalTokens},{id:"B",name:a.name,cost:a.totalCost,latency:u,tokens:a.totalTokens}],[s,a,h,u]),f=r=>c==="tokens"?r.toLocaleString():c==="latency"?k(r):T(r),o=c==="tokens"?"Token distribution":c==="latency"?"Latency comparison":"Cost comparison",v=Math.max(...l.map(r=>r[c]),1),g=l[0][c]===l[1][c]?null:l[0][c]>l[1][c]?"A":"B";return e.jsxs("div",{className:"surface-strong mb-4 rounded-[24px] p-4",children:[e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Signal lanes"}),e.jsx("div",{className:"text-sm font-medium text-[var(--color-text-primary)]",children:o})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2.5 py-1 text-[10px] font-mono uppercase tracking-[0.18em] text-[var(--color-text-tertiary)]",children:g?`trace ${g} leading`:"even"}),e.jsxs(M,{value:c,onValueChange:r=>n(r),children:[e.jsx(P,{className:"h-8 w-[170px] text-xs",children:e.jsx($,{placeholder:"Select metric"})}),e.jsxs(L,{children:[e.jsx(S,{value:"cost",children:"Model cost ranking"}),e.jsx(S,{value:"latency",children:"Model latency ranking"}),e.jsx(S,{value:"tokens",children:"Token distribution"})]})]})]})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2",children:l.map(r=>{const N=Math.max(r[c]/v*100,8),i=r.id==="A";return e.jsxs("div",{className:`rounded-[22px] border px-4 py-4 ${i?"border-[var(--color-accent)]/18 bg-[var(--color-accent)]/8":"border-[var(--color-accent-2)]/18 bg-[var(--color-accent-2)]/8"}`,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:`rounded-full border px-2 py-0.5 font-mono text-[10px] uppercase tracking-[0.18em] ${i?"border-[var(--color-accent)]/22 bg-[var(--color-accent)]/12 text-[var(--color-text-primary)]":"border-[var(--color-accent-2)]/20 bg-[var(--color-accent-2)]/10 text-[var(--color-text-primary)]"}`,children:["Trace ",r.id]}),g===r.id?e.jsx("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5 text-[10px] uppercase tracking-[0.18em] text-[var(--color-text-secondary)]",children:"lead"}):null]}),e.jsx("div",{className:"mt-2 truncate text-sm font-semibold text-[var(--color-text-primary)]",children:r.name}),e.jsx("div",{className:"mt-1 font-mono text-[11px] text-[var(--color-text-tertiary)]",children:i?s.traceId.slice(0,14):a.traceId.slice(0,14)})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-mono text-sm text-[var(--color-text-primary)]",children:f(r[c])}),e.jsx("div",{className:"mt-1 text-[11px] text-[var(--color-text-tertiary)]",children:r.cost>0?T(r.cost):"No cost"})]})]}),e.jsx("div",{className:"mt-4 h-2.5 overflow-hidden rounded-full bg-[rgba(var(--ch-bg-base),0.82)]",children:e.jsx("div",{className:`h-full rounded-full ${i?"bg-[linear-gradient(90deg,var(--color-accent-2),var(--color-accent))]":"bg-[linear-gradient(90deg,var(--color-bg-panel),var(--color-accent-2))]"}`,style:{width:`${N}%`}})}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px] text-[var(--color-text-tertiary)]",children:[e.jsxs("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5",children:[r.tokens.toLocaleString()," tokens"]}),e.jsx("span",{className:"rounded-full border border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] px-2 py-0.5",children:r.latency>0?k(r.latency):"N/A"})]})]},r.id)})})]})}function Fe({traceA:s,traceB:a,onClose:h}){const[u,c]=d.useState("metrics"),n=s.totalDuration??(s.endTime?s.endTime-s.startTime:0),l=a.totalDuration??(a.endTime?a.endTime-a.startTime:0),f=[{label:"Status",a:s.status,b:a.status,better:s.status===a.status?"tie":s.status==="ok"?"a":"b"},{label:"Spans",a:String(s.spanCount),b:String(a.spanCount)},{label:"Tokens",a:s.totalTokens.toLocaleString(),b:a.totalTokens.toLocaleString(),diff:s.totalTokens!==a.totalTokens?`${a.totalTokens-s.totalTokens>0?"+":""}${(a.totalTokens-s.totalTokens).toLocaleString()}`:"same",better:s.totalTokens===a.totalTokens?"tie":s.totalTokens<a.totalTokens?"a":"b"},{label:"Cost",a:T(s.totalCost),b:T(a.totalCost),diff:s.totalCost!==a.totalCost?`${a.totalCost-s.totalCost>0?"+":""}${T(Math.abs(a.totalCost-s.totalCost))}`:"same",better:s.totalCost===a.totalCost?"tie":s.totalCost<a.totalCost?"a":"b"},{label:"Duration",a:n>0?k(n):"N/A",b:l>0?k(l):"N/A",diff:n>0&&l>0&&n!==l?`${l-n>0?"+":""}${k(Math.abs(l-n))}`:n===l?"same":void 0,better:n===l?"tie":n>0&&l>0&&n<l?"a":"b"}];return e.jsxs(ae.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24},transition:{duration:.3,ease:[.22,1,.36,1]},className:"dashboard-shell rounded-[26px] px-5 py-5 sm:px-6",children:[e.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Comparison mode"}),e.jsx("h2",{className:"mt-1 text-xl font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:"Side-by-side analysis"})]}),e.jsxs("button",{type:"button",onClick:h,className:"status-chip transition-colors hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)]",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Close comparison"})]})]}),e.jsxs("div",{className:"mb-4 flex gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>c("metrics"),className:`inline-flex items-center gap-1.5 rounded-full border px-3.5 py-1.5 text-xs font-semibold transition-colors ${u==="metrics"?"border-[var(--color-accent)]/22 bg-[var(--color-accent)]/12 text-[var(--color-text-primary)]":"border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)]"}`,children:[e.jsx(K,{className:"h-3 w-3"}),"Metrics"]}),e.jsxs("button",{type:"button",onClick:()=>c("responses"),className:`inline-flex items-center gap-1.5 rounded-full border px-3.5 py-1.5 text-xs font-semibold transition-colors ${u==="responses"?"border-[var(--color-accent)]/22 bg-[var(--color-accent)]/12 text-[var(--color-text-primary)]":"border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.04)] text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)]"}`,children:[e.jsx(Pe,{className:"h-3 w-3"}),"Response diff"]})]}),u==="metrics"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 grid grid-cols-[110px_1fr_1fr_96px] gap-3",children:[e.jsx("div",{}),e.jsxs("div",{className:"rounded-2xl border border-[var(--color-accent)]/18 bg-[var(--color-accent)]/8 p-3",children:[e.jsx("div",{className:"hud-label",children:"Trace A"}),e.jsx("div",{className:"mt-1 truncate text-sm font-medium text-[var(--color-text-primary)]",children:s.name}),e.jsx("div",{className:"mt-0.5 font-mono text-[10px] text-[var(--color-text-tertiary)]",children:s.traceId.slice(0,16)})]}),e.jsxs("div",{className:"rounded-2xl border border-[var(--color-accent-2)]/18 bg-[var(--color-accent-2)]/8 p-3",children:[e.jsx("div",{className:"hud-label",children:"Trace B"}),e.jsx("div",{className:"mt-1 truncate text-sm font-medium text-[var(--color-text-primary)]",children:a.name}),e.jsx("div",{className:"mt-0.5 font-mono text-[10px] text-[var(--color-text-tertiary)]",children:a.traceId.slice(0,16)})]}),e.jsx("div",{className:"flex items-center justify-center text-[11px] uppercase tracking-[0.18em] text-[var(--color-text-tertiary)]",children:"Delta"})]}),e.jsx(Re,{traceA:s,traceB:a,durA:n,durB:l}),e.jsx("div",{className:"space-y-2",children:f.map(o=>e.jsxs("div",{className:"grid grid-cols-[110px_1fr_1fr_96px] items-center gap-3 rounded-2xl border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.72),rgba(var(--ch-bg-base),0.9))] px-4 py-3",children:[e.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-[var(--color-text-tertiary)]",children:o.label}),e.jsx("div",{className:`text-sm font-mono ${o.better==="a"?"text-[var(--color-accent)]":(o.better==="tie","text-[var(--color-text-secondary)]")}`,children:o.label==="Status"?e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(E,{status:s.status}),o.a]}):o.a}),e.jsx("div",{className:`text-sm font-mono ${o.better==="b"?"text-[var(--color-accent-2)]":(o.better==="tie","text-[var(--color-text-secondary)]")}`,children:o.label==="Status"?e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(E,{status:a.status}),o.b]}):o.b}),e.jsx("div",{className:"text-center text-xs font-mono text-[var(--color-text-tertiary)]",children:o.diff??"--"})]},o.label))})]}):e.jsx(ze,{traceA:s,traceB:a})]})}function Ae(){const[s,a]=pe(),h=s.get("q")??"",u=d.useDeferredValue(h),c=s.get("status"),n=c==="ok"||c==="error"?c:"",l=Number(s.get("periodHours")??"24"),f=Number(s.get("pageSize")??"50"),o=te.includes(f)?f:50,v=Math.max(1,Number(s.get("page")??"1")||1),g=(v-1)*o,[r,N]=d.useState(null),[i,b]=d.useState("desc"),[p,H]=d.useState(new Set),[q,Q]=d.useState(null),[oe,z]=d.useState(!1),_=d.useMemo(()=>({limit:o,offset:g,q:u.trim()||void 0,status:n||void 0,periodHours:Y.some(t=>t.value===l)?l:24}),[u,o,g,l,n]),{data:U,isLoading:ce}=me({queryKey:["traces",_],queryFn:()=>fe(_)}),R=U?.traces??[],w=U?.total??0,Z=Math.max(1,Math.ceil(w/o));function ne(t){r===t?b(x=>x==="asc"?"desc":"asc"):(N(t),b("desc"))}const j=d.useMemo(()=>r?[...R].sort((t,x)=>{const m=t[r]??0,y=x[r]??0;return i==="asc"?m-y:y-m}):R,[R,r,i]),D=j.length>0&&j.every(t=>p.has(t.traceId)),ie=d.useCallback(()=>{H(t=>{const x=new Set(t);if(D)for(const m of j)x.delete(m.traceId);else for(const m of j)x.add(m.traceId);return x})},[D,j]),de=d.useCallback(t=>{H(x=>{const m=new Set(x);return m.has(t)?m.delete(t):m.add(t),m})},[]),xe=d.useCallback(()=>{H(new Set),z(!1)},[]),F=d.useMemo(()=>j.filter(t=>p.has(t.traceId)),[j,p]),I=p.size===2,W=h.length>0||n.length>0||_.periodHours!==24;function C(t,x=!0){a(m=>{const y=new URLSearchParams(m);for(const[X,O]of Object.entries(t))O===void 0||O===""?y.delete(X):y.set(X,String(O));return x&&y.delete("page"),y},{replace:!0})}return e.jsxs(e.Fragment,{children:[e.jsxs(ye,{eyebrow:"Trace Explorer",title:"Deep-dive into every trace flowing through the system.",description:"Explore, compare, and inspect individual traces with full visibility into span counts, token usage, cost, and execution timing.",aside:e.jsx("div",{className:"insight-panel",children:e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"deck-card deck-card--accent",children:[e.jsx("div",{className:"hud-label",children:"Total traces"}),e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsx("div",{className:"text-[var(--color-text-primary)]",style:{fontFamily:"var(--font-operator)",fontSize:"30px",fontWeight:700,lineHeight:"0.92",letterSpacing:"-0.04em"},children:se(w)}),e.jsx(Me,{className:"h-4 w-4 text-[var(--color-accent)]"})]}),e.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:"Matching current filters"})]}),p.size>0&&e.jsxs("div",{className:"deck-card",children:[e.jsx("div",{className:"hud-label",children:"Selected"}),e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsxs("div",{className:"text-lg font-medium text-[var(--color-text-primary)]",children:[p.size," trace",p.size!==1&&"s"]}),e.jsx(K,{className:"h-4 w-4 text-[var(--color-accent)]"})]}),e.jsx("div",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:I?"Ready to compare":"Select exactly 2 to compare"})]})]})}),children:[e.jsxs("div",{className:"pill-strip w-fit max-w-full overflow-x-auto",children:[e.jsxs("span",{className:"pill-item",children:["window ",e.jsxs("strong",{children:[_.periodHours,"h"]})]}),e.jsxs("span",{className:"pill-item",children:["selected ",e.jsx("strong",{children:p.size})]}),e.jsxs("span",{className:"pill-item",children:["compare ",e.jsx("strong",{children:I?"ready":"idle"})]}),e.jsxs("span",{className:"pill-item",children:["matches ",e.jsx("strong",{children:w})]})]}),e.jsx(B,{children:p.size>0&&e.jsx(ae.div,{initial:{opacity:0,gridTemplateRows:"0fr"},animate:{opacity:1,gridTemplateRows:"1fr"},exit:{opacity:0,gridTemplateRows:"0fr"},transition:{duration:.25,ease:"easeOut"},style:{display:"grid"},children:e.jsx("div",{className:"overflow-hidden",children:e.jsxs("div",{className:"dashboard-shell flex items-center justify-between gap-4 rounded-[24px] px-5 py-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"status-chip",children:[e.jsx(V,{className:"h-3.5 w-3.5 text-[var(--color-accent)]"}),e.jsxs("span",{children:[p.size," selected"]})]}),e.jsxs("button",{type:"button",onClick:xe,className:"status-chip transition-colors hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)]",children:[e.jsx(Ce,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Clear"})]})]}),e.jsxs("button",{type:"button",disabled:!I,onClick:()=>z(!0),className:`inline-flex items-center gap-2 rounded-[var(--radius-panel)] border px-4 py-2 text-sm font-medium transition-all ${I?"border-[var(--color-accent-2)]/20 bg-[linear-gradient(135deg,rgba(var(--ch-accent-2), 0.14),rgba(var(--ch-accent), 0.08))] text-[var(--color-accent)] hover:bg-[linear-gradient(135deg,rgba(var(--ch-accent-2), 0.24),rgba(var(--ch-accent), 0.14))]":"cursor-not-allowed border-[var(--border-dim)] bg-[rgba(var(--ch-text-primary),0.03)] text-[var(--color-text-tertiary)]"}`,children:[e.jsx(K,{className:"h-4 w-4"}),"Compare traces"]})]})})})}),e.jsx(B,{children:oe&&F.length===2&&e.jsx(Fe,{traceA:F[0],traceB:F[1],onClose:()=>z(!1)})}),e.jsxs("section",{className:"dashboard-shell rounded-[26px] px-4 py-4 sm:px-5 sm:py-5",children:[e.jsxs("div",{className:"surface-strong mb-4 rounded-[24px] p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"hud-label",children:"Search console"}),e.jsx("h2",{className:"page-section-title mt-1",children:"Trace explorer"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"status-chip",children:[e.jsx(Te,{className:"h-3.5 w-3.5 text-[var(--color-text-primary)]"}),e.jsxs("span",{children:[w," traces"]})]}),e.jsxs("button",{type:"button",onClick:()=>C({q:void 0,status:void 0,periodHours:void 0}),disabled:!W,className:"status-chip transition-colors hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)] disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Clear"})]})]})]}),e.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-[minmax(0,1.8fr)_minmax(0,0.6fr)_minmax(0,0.6fr)]",children:[e.jsx(we,{value:h,onChange:t=>C({q:t||void 0}),placeholder:"Search by trace name, ID, or keyword..."}),e.jsxs(M,{value:n||"__all__",onValueChange:t=>C({status:t==="__all__"?void 0:t}),children:[e.jsx(P,{className:"w-full rounded-2xl py-3",children:e.jsx($,{placeholder:"All states"})}),e.jsxs(L,{children:[e.jsx(S,{value:"__all__",children:"All states"}),e.jsx(S,{value:"ok",children:"Healthy only"}),e.jsx(S,{value:"error",children:"Errors only"})]})]}),e.jsxs(M,{value:String(_.periodHours??24),onValueChange:t=>C({periodHours:Number(t)===24?void 0:Number(t)}),children:[e.jsx(P,{className:"w-full rounded-2xl py-3",children:e.jsx($,{})}),e.jsx(L,{children:Y.map(t=>e.jsx(S,{value:String(t.value),children:t.label},t.value))})]})]})]}),ce?e.jsx(A,{title:"Loading traces",description:"LLMTap is assembling the explorer feed for the current filter window.",className:"min-h-[400px]"}):j.length===0?W?e.jsx(A,{title:"No traces match these filters",description:"Try adjusting the search term or time window to widen the explorer surface.",className:"min-h-[400px]"}):e.jsx(Ne,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-hidden rounded-[22px] border border-[var(--border-dim)] bg-[linear-gradient(180deg,rgba(var(--ch-bg-panel),0.9),rgba(var(--ch-bg-deep),0.96),rgba(var(--ch-bg-base),0.99))] shadow-[inset_0_1px_0_rgba(var(--ch-text-primary),0.04),0_24px_56px_rgba(0,0,0,0.3)]",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[980px] border-collapse text-sm",children:[e.jsx("thead",{className:"sticky top-0 z-10 bg-[rgba(var(--ch-bg-base),0.94)] backdrop-blur-xl",children:e.jsxs("tr",{className:"text-left text-[11px] uppercase tracking-[0.18em] text-[var(--color-text-tertiary)]",children:[e.jsx("th",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",onClick:ie,"aria-label":D?"Deselect all traces on page":"Select all traces on page",className:"inline-flex items-center justify-center transition-colors hover:text-[var(--color-text-secondary)]",title:D?"Deselect all":"Select all",children:D?e.jsx(V,{className:"h-4 w-4 text-[var(--color-accent)]"}):e.jsx(ee,{className:"h-4 w-4"})})}),e.jsx("th",{className:"w-10 px-4 py-3",children:"State"}),e.jsx("th",{className:"px-4 py-3",children:"Trace"}),e.jsx("th",{className:"px-4 py-3",children:"ID"}),[["spanCount","Spans"],["totalTokens","Tokens"],["totalCost","Cost"],["startTime","When"]].map(([t,x])=>e.jsx("th",{className:"px-4 py-3 text-right",children:e.jsxs("button",{type:"button",onClick:()=>ne(t),className:"inline-flex items-center gap-1 transition-colors hover:text-[var(--color-text-secondary)]",children:[x,r===t?i==="asc"?e.jsx(ke,{className:"h-3 w-3"}):e.jsx(_e,{className:"h-3 w-3"}):e.jsx(De,{className:"h-3 w-3 opacity-30"})]})},t)),e.jsx("th",{className:"px-4 py-3 text-right",children:"Duration"})]})}),e.jsx("tbody",{children:j.map(t=>{const x=p.has(t.traceId),m=t.totalDuration??(t.endTime?t.endTime-t.startTime:0);return e.jsxs("tr",{onClick:()=>Q(t),className:`cursor-pointer border-t border-[var(--border-dim)] transition-colors ${x?"bg-[var(--color-accent)]/8":"hover:bg-[rgba(var(--ch-text-primary),0.03)]"}`,children:[e.jsx("td",{className:"px-4 py-3.5 text-center",onClick:y=>y.stopPropagation(),children:e.jsx("button",{type:"button",onClick:()=>de(t.traceId),"aria-label":`Select trace ${t.name}`,className:"inline-flex items-center justify-center transition-colors hover:text-[var(--color-accent)]",children:x?e.jsx(V,{className:"h-4 w-4 text-[var(--color-accent)]"}):e.jsx(ee,{className:"h-4 w-4 text-[var(--color-text-tertiary)]"})})}),e.jsx("td",{className:"px-4 py-3.5",children:e.jsx(E,{status:t.status})}),e.jsx("td",{className:"px-4 py-3.5",children:e.jsxs("div",{className:"max-w-[320px]",children:[e.jsx("div",{className:"truncate text-sm font-semibold text-[var(--color-text-primary)]",children:t.name}),e.jsxs("div",{className:"mt-1 text-[11px] text-[var(--color-text-tertiary)]",children:[G(t.startTime)," started"]})]})}),e.jsx("td",{className:"px-4 py-3.5",children:e.jsx("span",{className:"font-mono text-[11px] uppercase tracking-[0.12em] text-[var(--color-text-tertiary)]",children:t.traceId.slice(0,12)})}),e.jsx("td",{className:"px-4 py-3.5 text-right font-mono text-xs text-[var(--color-text-secondary)]",children:t.spanCount}),e.jsx("td",{className:"px-4 py-3.5 text-right font-mono text-xs text-[var(--color-text-secondary)]",children:t.totalTokens.toLocaleString()}),e.jsx("td",{className:"px-4 py-3.5 text-right font-mono text-xs text-[var(--color-text-secondary)]",children:T(t.totalCost)}),e.jsx("td",{className:"px-4 py-3.5 text-right text-xs text-[var(--color-text-tertiary)]",children:G(t.startTime)}),e.jsx("td",{className:"px-4 py-3.5 text-right font-mono text-xs text-[var(--color-text-secondary)]",children:m>0?k(m):"--"})]},t.traceId)})})]})})}),e.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 px-1",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"text-xs text-[var(--color-text-tertiary)]",children:w>0?`Showing ${g+1}-${Math.min(g+j.length,w)} of ${w}`:"Awaiting traces"}),e.jsxs(M,{value:String(o),onValueChange:t=>C({pageSize:Number(t)===50?void 0:Number(t)}),children:[e.jsx(P,{className:"w-auto rounded-xl px-2 py-1.5 text-xs",children:e.jsx($,{})}),e.jsx(L,{children:te.map(t=>e.jsxs(S,{value:String(t),children:[t," / page"]},t))})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>C({page:v>2?v-1:void 0},!1),disabled:v<=1,className:"status-chip transition-colors hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)] disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx(Ie,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Previous"})]}),e.jsxs("span",{className:"text-xs text-[var(--color-text-tertiary)]",children:[v," / ",Z]}),e.jsxs("button",{type:"button",onClick:()=>C({page:v+1},!1),disabled:v>=Z,className:"status-chip transition-colors hover:border-[var(--border-default)] hover:bg-[rgba(var(--ch-accent),0.06)] disabled:cursor-not-allowed disabled:opacity-50",children:[e.jsx("span",{children:"Next"}),e.jsx(le,{className:"h-3.5 w-3.5"})]})]})]})]})]})]}),q&&e.jsx(qe,{trace:q,onClose:()=>Q(null)},q.traceId)]})}export{Ae as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,R as Ie,j as P}from"./query-DVWnIZNd.js";import{A as We,m as he}from"./motion-CSeNjKbZ.js";import{a as X,q as $e}from"./ui-BFiKdTjl.js";import{c as oe}from"./index-DG2eF3M2.js";import{t as Ke}from"./icons-BOLUIAKd.js";function Re({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=i.useRef(e!==void 0),[s,c]=i.useState(t),u=o?e:s,h=i.useCallback(p=>{o||c(p)},[]);return[u,h]}const me={};function H(e,t){const n=i.useRef(me);return n.current===me&&(n.current=e(t)),n}const Q=Ie[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],qe=Q&&Q!==i.useLayoutEffect?Q:e=>e();function U(e){const t=H(Be).current;return t.next=e,qe(t.effect),t.trampoline}function Be(){const e={next:void 0,callback:ze,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ze(){}const Ge=()=>{},D=typeof document<"u"?i.useLayoutEffect:Ge,Se=i.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Ye(){return i.useContext(Se)}function Ze(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,s=U(o),c=i.useRef(0),u=H(Qe).current,h=H(Je).current,[p,g]=i.useState(0),m=i.useRef(p),y=U((f,I)=>{h.set(f,I??null),m.current+=1,g(m.current)}),d=U(f=>{h.delete(f),m.current+=1,g(m.current)}),C=i.useMemo(()=>{const f=new Map;return Array.from(h.keys()).filter(v=>v.isConnected).sort(Xe).forEach((v,l)=>{const b=h.get(v)??{};f.set(v,{...b,index:l})}),f},[h,p]);D(()=>{if(typeof MutationObserver!="function"||C.size===0)return;const f=new MutationObserver(I=>{const v=new Set,l=b=>v.has(b)?v.delete(b):v.add(b);I.forEach(b=>{b.removedNodes.forEach(l),b.addedNodes.forEach(l)}),v.size===0&&(m.current+=1,g(m.current))});return C.forEach((I,v)=>{v.parentElement&&f.observe(v.parentElement,{childList:!0})}),()=>{f.disconnect()}},[C]),D(()=>{m.current===p&&(n.current.length!==C.size&&(n.current.length=C.size),r&&r.current.length!==C.size&&(r.current.length=C.size),c.current=C.size),s(C)},[s,C,n,r,p]),D(()=>()=>{n.current=[]},[n]),D(()=>()=>{r&&(r.current=[])},[r]);const k=U(f=>(u.add(f),()=>{u.delete(f)}));D(()=>{u.forEach(f=>f(C))},[u,C]);const A=i.useMemo(()=>({register:y,unregister:d,subscribeMapChange:k,elementsRef:n,labelsRef:r,nextIndexRef:c}),[y,d,k,n,r,c]);return P.jsx(Se.Provider,{value:A,children:t})}function Je(){return new Map}function Qe(){return new Set}function Xe(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const et=i.createContext(void 0);function tt(){return i.useContext(et)?.direction??"ltr"}function K(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const ke=i.createContext(void 0);function se(){const e=i.useContext(ke);if(e===void 0)throw new Error(K(10));return e}function Z(e,t,n,r){const o=H(Ee).current;return rt(o,e,t,n,r)&&Oe(o,[e,t,n,r]),o.callback}function nt(e){const t=H(Ee).current;return ot(t,e)&&Oe(t,e),t.callback}function Ee(){return{callback:null,cleanup:null,refs:[]}}function rt(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function ot(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Oe(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const c=s(n);typeof c=="function"&&(r[o]=c);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const c=r[o];typeof c=="function"?c():s(null);break}case"object":{s.current=null;break}}}}}}}const st=parseInt(i.version,10);function it(e){return st>=e}function ge(e){if(!i.isValidElement(e))return null;const t=e,n=t.props;return(it(19)?n?.ref:t.ref)??null}function ee(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function at(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e,t){return typeof e=="function"?e(t):e}const W={};function Pe(e,t,n,r,o){let s={...te(e,W)};return t&&(s=Y(s,t)),n&&(s=Y(s,n)),r&&(s=Y(s,r)),s}function lt(e){if(e.length===0)return W;if(e.length===1)return te(e[0],W);let t={...te(e[0],W)};for(let n=1;n<e.length;n+=1)t=Y(t,e[n]);return t}function Y(e,t){return Ae(t)?t(e):dt(e,t)}function dt(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ee(e.style,r);break}case"className":{e[n]=Me(e.className,r);break}default:ft(n,r)?e[n]=pt(e[n],r):e[n]=r}}return e}function ft(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Ae(e){return typeof e=="function"}function te(e,t){return Ae(e)?e(t):e??W}function pt(e,t){return t?e?n=>{if(ht(n)){const o=n;ne(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function ne(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Me(e,t){return t?e?t+" "+e:t:e}function ht(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const _=Object.freeze({});function q(e,t,n={}){const r=t.render,o=mt(t,n);if(n.enabled===!1)return null;const s=n.state??_;return gt(e,r,o,s)}function mt(e,t={}){const{className:n,style:r,render:o}=e,{state:s=_,ref:c,props:u,stateAttributesMapping:h,enabled:p=!0}=t,g=p?ct(n,s):void 0,m=p?ut(r,s):void 0,y=p?at(s,h):_,d=p?ee(y,Array.isArray(u)?lt(u):u)??_:_;return typeof document<"u"&&(p?Array.isArray(c)?d.ref=nt([d.ref,ge(o),...c]):d.ref=Z(d.ref,ge(o),c):Z(null,null)),p?(g!==void 0&&(d.className=Me(d.className,g)),m!==void 0&&(d.style=ee(d.style,m)),d):_}function gt(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Pe(n,t.props);return o.ref=n.ref,i.cloneElement(t,o)}if(e&&typeof e=="string")return bt(e,n);throw new Error(K(8))}function bt(e,t){return e==="button"?i.createElement("button",{type:"button",...t,key:t.key}):e==="img"?i.createElement("img",{alt:"",...t,key:t.key}):i.createElement(e,t)}const we="none",xt="trigger-press";function ie(e,t,n,r){let o=!1,s=!1;const c=_;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...c}}const yt={value:()=>null},Ct=i.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,hiddenUntilFound:c,keepMounted:u,loopFocus:h=!0,onValueChange:p,multiple:g=!1,orientation:m="vertical",value:y,defaultValue:d,...C}=t,k=tt(),A=i.useMemo(()=>{if(y===void 0)return d??[]},[y,d]),f=U(p),I=i.useRef([]),[v,l]=Re({controlled:y,default:A,name:"Accordion",state:"value"}),b=U((O,L)=>{const M=ie(we);if(g)if(L){const a=v.slice();if(a.push(O),f(a,M),M.isCanceled)return;l(a)}else{const a=v.filter(S=>S!==O);if(f(a,M),M.isCanceled)return;l(a)}else{const a=v[0]===O?[]:[O];if(f(a,M),M.isCanceled)return;l(a)}}),w=i.useMemo(()=>({value:v,disabled:s,orientation:m}),[v,s,m]),T=i.useMemo(()=>({accordionItemRefs:I,direction:k,disabled:s,handleValueChange:b,hiddenUntilFound:c??!1,keepMounted:u??!1,loopFocus:h,orientation:m,state:w,value:v}),[k,s,b,c,u,h,m,w,v]),j=q("div",t,{state:w,ref:n,props:[{dir:k,role:"region"},C],stateAttributesMapping:yt});return P.jsx(ke.Provider,{value:T,children:P.jsx(Ze,{elementsRef:I,children:j})})}),vt={...Ie};let be=0;function It(e,t="mui"){const[n,r]=i.useState(e),o=e||n;return i.useEffect(()=>{n==null&&(be+=1,r(`${t}-${be}`))},[n,t]),o}const xe=vt.useId;function Rt(e,t){if(xe!==void 0){const n=xe();return`${t}-${n}`}return It(e,t)}function re(e){return Rt(e,"base-ui")}const St=[];function Ne(e){i.useEffect(e,St)}const z=null;class kt{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const G=new kt;class N{static create(){return new N}static request(t){return G.request(t)}static cancel(t){return G.cancel(t)}currentId=z;request(t){this.cancel(),this.currentId=G.request(()=>{this.currentId=z,t()})}cancel=()=>{this.currentId!==z&&(G.cancel(this.currentId),this.currentId=z)};disposeEffect=()=>this.cancel}function De(){const e=H(N.create).current;return Ne(e.disposeEffect),e}function Et(e){return e==null?e:"current"in e?e.current:e}function Te(e,t=!1,n=!0){const r=De();return U((o,s=null)=>{r.cancel();const c=Et(e);c!=null&&(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function u(){c&&Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{s!=null&&s.aborted||X.flushSync(o)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;X.flushSync(o)}else c.getAnimations().length>0&&c.getAnimations().some(h=>h.pending||h.playState!=="finished")&&u()})}t?r.request(u):u()}))})}function Ot(e,t=!1,n=!1){const[r,o]=i.useState(e&&t?"idle":void 0),[s,c]=i.useState(e);return e&&!s&&(c(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),D(()=>{if(!e&&s&&r!=="ending"&&n){const u=N.request(()=>{o("ending")});return()=>{N.cancel(u)}}},[e,s,r,n]),D(()=>{if(!e||t)return;const u=N.request(()=>{X.flushSync(()=>{o(void 0)})});return()=>{N.cancel(u)}},[t,e]),D(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const u=N.request(()=>{o("idle")});return()=>{N.cancel(u)}},[t,e,s,o,r]),i.useMemo(()=>({mounted:s,setMounted:c,transitionStatus:r}),[s,r])}function Pt(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:o}=e,s=t!==void 0,[c,u]=Re({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:h,setMounted:p,transitionStatus:g}=Ot(c,!0,!0),[m,y]=i.useState(c),[{height:d,width:C},k]=i.useState({height:void 0,width:void 0}),A=re(),[f,I]=i.useState(),v=f??A,[l,b]=i.useState(!1),[w,T]=i.useState(!1),j=i.useRef(null),O=i.useRef(null),L=i.useRef(null),M=i.useRef(null),a=Te(M,!1),S=U(R=>{const x=!c,E=ie(xt,R.nativeEvent);if(r(x,E),E.isCanceled)return;const F=M.current;O.current==="css-animation"&&F!=null&&F.style.removeProperty("animation-name"),!l&&!w&&(O.current!=null&&O.current!=="css-animation"&&!h&&x&&p(!0),O.current==="css-animation"&&(!m&&x&&y(!0),!h&&x&&p(!0))),u(x),O.current==="none"&&h&&!x&&p(!1)});return D(()=>{s&&O.current==="none"&&!w&&!c&&p(!1)},[s,w,c,t,p]),i.useMemo(()=>({abortControllerRef:j,animationTypeRef:O,disabled:o,handleTrigger:S,height:d,mounted:h,open:c,panelId:v,panelRef:M,runOnceAnimationsFinish:a,setDimensions:k,setHiddenUntilFound:b,setKeepMounted:T,setMounted:p,setOpen:u,setPanelIdState:I,setVisible:y,transitionDimensionRef:L,transitionStatus:g,visible:m,width:C}),[j,O,o,S,d,h,c,v,M,a,k,b,T,p,u,y,L,g,m,C])}const je=i.createContext(void 0);function Fe(){const e=i.useContext(je);if(e===void 0)throw new Error(K(15));return e}let At=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Mt(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:s}=e,{register:c,unregister:u,subscribeMapChange:h,elementsRef:p,labelsRef:g,nextIndexRef:m}=Ye(),y=i.useRef(-1),[d,C]=i.useState(s??(o===At.GuessFromOrder?()=>{if(y.current===-1){const f=m.current;m.current+=1,y.current=f}return y.current}:-1)),k=i.useRef(null),A=i.useCallback(f=>{if(k.current=f,d!==-1&&f!==null&&(p.current[d]=f,g)){const I=t!==void 0;g.current[d]=I?t:r?.current?.textContent??f.textContent}},[d,p,g,t,r]);return D(()=>{if(s!=null)return;const f=k.current;if(f)return c(f,n),()=>{u(f)}},[s,c,u,n]),D(()=>{if(s==null)return h(f=>{const I=k.current?f.get(k.current)?.index:null;I!=null&&C(I)})},[s,h,C]),i.useMemo(()=>({ref:A,index:d}),[d,A])}const Ue=i.createContext(void 0);function ae(){const e=i.useContext(Ue);if(e===void 0)throw new Error(K(9));return e}let J=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const wt={[J.startingStyle]:""},Nt={[J.endingStyle]:""},Dt={transitionStatus(e){return e==="starting"?wt:e==="ending"?Nt:null}};let $=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=J.startingStyle]="startingStyle",e[e.endingStyle=J.endingStyle]="endingStyle",e})({}),Tt=(function(e){return e.panelOpen="data-panel-open",e})({});const jt={[$.open]:""},Ft={[$.closed]:""},Ut={open(e){return e?{[Tt.panelOpen]:""}:null}},Lt={open(e){return e?jt:Ft}};let Vt=(function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e})({});const ce={...Lt,index:e=>Number.isInteger(e)?{[Vt.index]:String(e)}:null,...Dt,value:()=>null},_t=i.forwardRef(function(t,n){const{className:r,disabled:o=!1,onOpenChange:s,render:c,value:u,...h}=t,{ref:p,index:g}=Mt(),m=Z(n,p),{disabled:y,handleValueChange:d,state:C,value:k}=se(),A=re(),f=u??A,I=o||y,v=i.useMemo(()=>{if(!k)return!1;for(let S=0;S<k.length;S+=1)if(k[S]===f)return!0;return!1},[k,f]),l=U((S,R)=>{s?.(S,R),!R.isCanceled&&d(f,S)}),b=Pt({open:v,onOpenChange:l,disabled:I}),w=i.useMemo(()=>({open:b.open,disabled:b.disabled,hidden:!b.mounted,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.mounted,b.transitionStatus]),T=i.useMemo(()=>({...b,onOpenChange:l,state:w}),[b,w,l]),j=i.useMemo(()=>({...C,index:g,disabled:I,open:v}),[I,g,v,C]),[O,L]=i.useState(re()),M=i.useMemo(()=>({open:v,state:j,setTriggerId:L,triggerId:O}),[v,j,L,O]),a=q("div",t,{state:j,ref:m,props:h,stateAttributesMapping:ce});return P.jsx(je.Provider,{value:T,children:P.jsx(Ue.Provider,{value:M,children:a})})}),Ht=i.forwardRef(function(t,n){const{render:r,className:o,...s}=t,{state:c}=ae();return q("h3",t,{state:c,ref:n,props:s,stateAttributesMapping:ce})});function ye(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const Wt=i.createContext(void 0);function $t(e=!1){const t=i.useContext(Wt);if(t===void 0&&!e)throw new Error(K(16));return t}function Kt(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,c=r&&t!==!1,u=r&&t===!1;return{props:i.useMemo(()=>{const p={onKeyDown(g){n&&t&&g.key!=="Tab"&&g.preventDefault()}};return r||(p.tabIndex=o,!s&&n&&(p.tabIndex=t?o:-1)),(s&&(t||c)||!s&&n)&&(p["aria-disabled"]=n),s&&(!t||u)&&(p.disabled=n),p},[r,n,t,c,u,s,o])}}function qt(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=i.useRef(null),c=$t(!0)!==void 0,u=U(()=>{const y=s.current;return!!(y?.tagName==="A"&&y?.href)}),{props:h}=Kt({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:o}),p=i.useCallback(()=>{const y=s.current;Bt(y)&&c&&t&&h.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,h.disabled,c]);D(p,[p]);const g=i.useCallback((y={})=>{const{onClick:d,onMouseDown:C,onKeyUp:k,onKeyDown:A,onPointerDown:f,...I}=y;return Pe({type:o?"button":void 0,onClick(l){if(t){l.preventDefault();return}d?.(l)},onMouseDown(l){t||C?.(l)},onKeyDown(l){if(t||(ne(l),A?.(l)),l.baseUIHandlerPrevented)return;const b=l.target===l.currentTarget&&!o&&!u()&&!t,w=l.key==="Enter",T=l.key===" ";b&&((T||w)&&l.preventDefault(),w&&d?.(l))},onKeyUp(l){t||(ne(l),k?.(l)),!l.baseUIHandlerPrevented&&l.target===l.currentTarget&&!o&&!t&&l.key===" "&&d?.(l)},onPointerDown(l){if(t){l.preventDefault();return}f?.(l)}},o?void 0:{role:"button"},h,I)},[t,h,o,u]),m=U(y=>{s.current=y,p()});return{getButtonProps:g,buttonRef:m}}function Bt(e){return $e(e)&&e.tagName==="BUTTON"}function zt(e){e.preventDefault(),e.stopPropagation()}const ue="ArrowUp",le="ArrowDown",de="ArrowLeft",fe="ArrowRight",Le="Home",Ve="End",Gt=new Set([de,fe]),Yt=new Set([ue,le]),Zt=new Set([...Gt,...Yt]);[...Zt];const Jt=new Set([le,ue,fe,de,Le,Ve]);function Qt(e){const{current:t}=e,n=[];for(let r=0;r<t.length;r+=1){const o=t[r];if(!ye(o)){const s=o?.querySelector('[type="button"]');ye(s)||n.push(s)}}return n}const Xt=i.forwardRef(function(t,n){const{disabled:r,className:o,id:s,render:c,nativeButton:u=!0,...h}=t,{panelId:p,open:g,handleTrigger:m,disabled:y}=Fe(),d=r??y,{getButtonProps:C,buttonRef:k}=qt({disabled:d,focusableWhenDisabled:!0,native:u}),{accordionItemRefs:A,direction:f,loopFocus:I,orientation:v}=se(),l=f==="rtl",b=v==="horizontal",{state:w,setTriggerId:T,triggerId:j}=ae();D(()=>(s&&T(s),()=>{T(void 0)}),[s,T]);const O=i.useMemo(()=>({"aria-controls":g?p:void 0,"aria-expanded":g,disabled:d,id:j,onClick:m,onKeyDown(M){if(!Jt.has(M.key))return;zt(M);const a=Qt(A),R=a.length-1;let x=-1;const E=a.indexOf(M.target);function F(){I?x=E+1>R?0:E+1:x=Math.min(E+1,R)}function V(){I?x=E===0?R:E-1:x=E-1}switch(M.key){case le:b||F();break;case ue:b||V();break;case fe:b&&(l?V():F());break;case de:b&&(l?F():V());break;case"Home":x=0;break;case"End":x=R;break}x>-1&&a[x].focus()}}),[A,d,m,j,b,l,I,g,p]);return q("button",t,{state:w,ref:[n,k],props:[O,h,C],stateAttributesMapping:Ut})});let en=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function tn(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:o,hiddenUntilFound:s,keepMounted:c,id:u,mounted:h,onOpenChange:p,open:g,panelRef:m,runOnceAnimationsFinish:y,setDimensions:d,setMounted:C,setOpen:k,setVisible:A,transitionDimensionRef:f,visible:I,width:v}=e,l=i.useRef(!1),b=i.useRef(null),w=i.useRef(g),T=i.useRef(g),j=De(),O=i.useMemo(()=>n.current==="css-animation"?!I:!g&&!h,[g,h,I,n]),L=U(a=>{if(!a)return;if(n.current==null||f.current==null){const x=getComputedStyle(a),E=x.animationName!=="none"&&x.animationName!=="",F=x.transitionDuration!=="0s"&&x.transitionDuration!=="";E&&F||(x.animationName==="none"&&x.transitionDuration!=="0s"?n.current="css-transition":x.animationName!=="none"&&x.transitionDuration==="0s"?n.current="css-animation":n.current="none"),a.getAttribute(en.orientation)==="horizontal"||x.transitionProperty.indexOf("width")>-1?f.current="width":f.current="height"}if(n.current!=="css-transition")return;(o===void 0||v===void 0)&&(d({height:a.scrollHeight,width:a.scrollWidth}),T.current&&a.style.setProperty("transition-duration","0s"));let S=-1,R=-1;return S=N.request(()=>{T.current=!1,R=N.request(()=>{setTimeout(()=>{a.style.removeProperty("transition-duration")})})}),()=>{N.cancel(S),N.cancel(R)}}),M=Z(r,m,L);return D(()=>{if(n.current!=="css-transition")return;const a=m.current;if(!a)return;let S=-1;if(t.current!=null&&(t.current.abort(),t.current=null),g){const R={"justify-content":a.style.justifyContent,"align-items":a.style.alignItems,"align-content":a.style.alignContent,"justify-items":a.style.justifyItems};Object.keys(R).forEach(x=>{a.style.setProperty(x,"initial","important")}),!T.current&&!c&&a.setAttribute($.startingStyle,""),d({height:a.scrollHeight,width:a.scrollWidth}),S=N.request(()=>{Object.entries(R).forEach(([x,E])=>{E===""?a.style.removeProperty(x):a.style.setProperty(x,E)})})}else{if(a.scrollHeight===0&&a.scrollWidth===0)return;d({height:a.scrollHeight,width:a.scrollWidth});const R=new AbortController;t.current=R;const x=R.signal;let E=null;const F=$.endingStyle;return E=new MutationObserver(V=>{V.some(B=>B.type==="attributes"&&B.attributeName===F)&&(E?.disconnect(),E=null,y(()=>{d({height:0,width:0}),a.style.removeProperty("content-visibility"),C(!1),t.current===R&&(t.current=null)},x))}),E.observe(a,{attributes:!0,attributeFilter:[F]}),()=>{E?.disconnect(),j.cancel(),t.current===R&&(R.abort(),t.current=null)}}return()=>{N.cancel(S)}},[t,n,j,s,c,h,g,m,y,d,C]),D(()=>{if(n.current!=="css-animation")return;const a=m.current;a&&(b.current=a.style.animationName||b.current,a.style.setProperty("animation-name","none"),d({height:a.scrollHeight,width:a.scrollWidth}),!w.current&&!l.current&&a.style.removeProperty("animation-name"),g?(t.current!=null&&(t.current.abort(),t.current=null),C(!0),A(!0)):(t.current=new AbortController,y(()=>{C(!1),A(!1),t.current=null},t.current.signal)))},[t,n,g,m,y,d,C,A,I]),Ne(()=>{const a=N.request(()=>{w.current=!1});return()=>N.cancel(a)}),D(()=>{if(!s)return;const a=m.current;if(!a)return;let S=-1,R=-1;return g&&l.current&&(a.style.transitionDuration="0s",d({height:a.scrollHeight,width:a.scrollWidth}),S=N.request(()=>{l.current=!1,R=N.request(()=>{setTimeout(()=>{a.style.removeProperty("transition-duration")})})})),()=>{N.cancel(S),N.cancel(R)}},[s,g,m,d]),D(()=>{const a=m.current;a&&s&&O&&(a.setAttribute("hidden","until-found"),n.current==="css-transition"&&a.setAttribute($.startingStyle,""))},[s,O,n,m]),i.useEffect(function(){const S=m.current;if(!S)return;function R(x){l.current=!0,k(!0),p(!0,ie(we,x))}return S.addEventListener("beforematch",R),()=>{S.removeEventListener("beforematch",R)}},[p,m,k]),i.useMemo(()=>({props:{hidden:O,id:u,ref:M}}),[O,u,M])}let Ce=(function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e})({});function nn(e){const t=H(rn,e).current;return t.next=e,D(t.effect),t}function rn(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function on(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=nn(n),c=U(o),u=Te(r,n);i.useEffect(()=>{t&&u(()=>{n===s.current&&c()})},[t,n,c,u,s])}const ve=i.forwardRef(function(t,n){const{className:r,hiddenUntilFound:o,keepMounted:s,id:c,render:u,...h}=t,{hiddenUntilFound:p,keepMounted:g}=se(),{abortControllerRef:m,animationTypeRef:y,height:d,mounted:C,onOpenChange:k,open:A,panelId:f,panelRef:I,runOnceAnimationsFinish:v,setDimensions:l,setHiddenUntilFound:b,setKeepMounted:w,setMounted:T,setOpen:j,setVisible:O,transitionDimensionRef:L,visible:M,width:a,setPanelIdState:S,transitionStatus:R}=Fe(),x=o??p,E=s??g;D(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]),D(()=>{b(x)},[b,x]),D(()=>{w(E)},[w,E]),on({open:A&&R==="idle",ref:I,onComplete(){A&&l({width:void 0,height:void 0})}});const{props:F}=tn({abortControllerRef:m,animationTypeRef:y,externalRef:n,height:d,hiddenUntilFound:x,id:c??f,keepMounted:E,mounted:C,onOpenChange:k,open:A,panelRef:I,runOnceAnimationsFinish:v,setDimensions:l,setMounted:T,setOpen:j,setVisible:O,transitionDimensionRef:L,visible:M,width:a}),{state:V,triggerId:pe}=ae(),B=i.useMemo(()=>({...V,transitionStatus:R}),[V,R]),He=q("div",t,{state:B,ref:[n,I],props:[F,{"aria-labelledby":pe,role:"region",style:{[Ce.accordionPanelHeight]:d===void 0?"auto":`${d}px`,[Ce.accordionPanelWidth]:a===void 0?"auto":`${a}px`}},h],stateAttributesMapping:ce});return E||x||!E&&C?He:null});function _e(e){const t=i.createContext(void 0);return[({value:o,children:s})=>P.jsx(t.Provider,{value:o,children:s}),()=>{const o=i.useContext(t);if(o===void 0)throw new Error(`useContext must be used within ${e??"a Provider"}`);return o}]}function sn(e){const{value:t,defaultValue:n,onChange:r}=e,[o,s]=i.useState(t!==void 0?t:n);i.useEffect(()=>{t!==void 0&&s(t)},[t]);const c=i.useCallback((u,...h)=>{s(u),r?.(u,...h)},[r]);return[o,c]}const[an,cn]=_e("AccordionContext"),[un,ln]=_e("AccordionItemContext");function dn(e){const[t,n]=sn({value:e?.value,defaultValue:e?.defaultValue,onChange:e?.onValueChange});return P.jsx(an,{value:{value:t,setValue:n},children:P.jsx(Ct,{"data-slot":"accordion",...e,onValueChange:n})})}function fn(e){const{value:t}=cn(),[n,r]=i.useState(t?.includes(e?.value)??!1);return i.useEffect(()=>{r(t?.includes(e?.value)??!1)},[t,e?.value]),P.jsx(un,{value:{isOpen:n,setIsOpen:r},children:P.jsx(_t,{"data-slot":"accordion-item",...e})})}function pn(e){return P.jsx(Ht,{"data-slot":"accordion-header",...e})}function hn(e){return P.jsx(Xt,{"data-slot":"accordion-trigger",...e})}function mn({transition:e={duration:.35,ease:"easeInOut"},hiddenUntilFound:t,keepRendered:n=!1,...r}){const{isOpen:o}=ln();return P.jsx(We,{children:n?P.jsx(ve,{hidden:!1,hiddenUntilFound:t,keepMounted:!0,render:P.jsx(he.div,{"data-slot":"accordion-panel",initial:{height:0,opacity:0,"--mask-stop":"0%",y:20},animate:o?{height:"auto",opacity:1,"--mask-stop":"100%",y:0}:{height:0,opacity:0,"--mask-stop":"0%",y:20},transition:e,style:{maskImage:"linear-gradient(black var(--mask-stop), transparent var(--mask-stop))",WebkitMaskImage:"linear-gradient(black var(--mask-stop), transparent var(--mask-stop))",overflow:"hidden"},...r},"accordion-panel")}):o&&P.jsx(ve,{hidden:!1,hiddenUntilFound:t,keepMounted:!0,render:P.jsx(he.div,{"data-slot":"accordion-panel",initial:{height:0,opacity:0,"--mask-stop":"0%",y:20},animate:{height:"auto",opacity:1,"--mask-stop":"100%",y:0},exit:{height:0,opacity:0,"--mask-stop":"0%",y:20},transition:e,style:{maskImage:"linear-gradient(black var(--mask-stop), transparent var(--mask-stop))",WebkitMaskImage:"linear-gradient(black var(--mask-stop), transparent var(--mask-stop))",overflow:"hidden"},...r},"accordion-panel")})})}function In(e){return P.jsx(dn,{...e})}function Rn({className:e,...t}){return P.jsx(fn,{className:oe("border-b last:border-b-0",e),...t})}function Sn({className:e,children:t,showArrow:n=!0,...r}){return P.jsx(pn,{className:"flex",children:P.jsxs(hn,{className:oe("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-panel-open]>svg]:rotate-180",e),...r,children:[t,n&&P.jsx(Ke,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function kn({className:e,children:t,...n}){return P.jsx(mn,{...n,children:P.jsx("div",{className:oe("text-sm pt-0 pb-4",e),children:t})})}export{In as A,Rn as a,Sn as b,kn as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./query-DVWnIZNd.js";import{E as c,c as o}from"./index-DG2eF3M2.js";function d({context:a,title:t,description:r,tags:n=[],rightSlot:s,className:l}){return e.jsxs("section",{className:o("hero-panel relative overflow-hidden rounded-[calc(var(--radius-panel)+10px)] border px-6 py-6 sm:px-8 sm:py-7",l),style:{borderColor:"var(--border-dim)"},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.04] [background-image:linear-gradient(rgba(var(--ch-accent),0.8)_1px,transparent_1px),linear-gradient(90deg,rgba(var(--ch-accent),0.8)_1px,transparent_1px)] [background-size:84px_84px]"}),e.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-[0.92] [mask-image:radial-gradient(circle_at_center,black,transparent_84%)]",children:e.jsx(c,{className:"h-full w-full",speed:110,factor:.008,starColor:"rgba(var(--rgb-text-frost), 0.2)",pointerEvents:!1,transparent:!0,blendMode:"normal",fieldOpacity:.82,layers:[{count:240,size:1,durationMultiplier:1},{count:92,size:2,durationMultiplier:1.8},{count:36,size:3,durationMultiplier:2.6}]})}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 left-0 w-[46%]",style:{background:"radial-gradient(circle at 0% 40%, rgba(var(--ch-accent), 0.12), transparent 72%)"}}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -right-12 top-[-20px] h-44 w-44 rounded-full",style:{background:"var(--bloom-purple)"}}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-0 left-10 right-10 h-px",style:{background:"linear-gradient(90deg, transparent, var(--border-bright), transparent)"}}),e.jsxs("div",{className:o("relative min-h-[248px]",s&&"grid gap-6 lg:min-h-[360px] lg:grid-cols-[minmax(0,1.1fr)_minmax(400px,430px)] lg:items-start lg:gap-8"),children:[e.jsxs("div",{className:"flex max-w-5xl flex-col justify-between gap-8",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"inline-flex items-center gap-3 rounded-[var(--radius-badge)] border border-[var(--border-default)] bg-[rgba(var(--ch-accent),0.04)] px-4 py-2",children:[e.jsx("span",{"aria-hidden":"true",className:"h-px w-7",style:{background:"var(--color-accent)",boxShadow:"0 0 12px rgba(var(--ch-accent), 0.35)"}}),e.jsx("span",{className:"mono-label text-[var(--color-accent-max)]",children:a}),e.jsx("span",{className:"live-dot",style:{display:"inline-block"}})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h1",{className:"max-w-[9ch] text-[var(--color-text-primary)]",style:{fontFamily:"var(--font-operator)",fontSize:"clamp(42px, 5.2vw, 84px)",fontWeight:700,lineHeight:"0.88",letterSpacing:"-0.065em",textShadow:"0 18px 60px rgba(0, 0, 0, 0.42)"},children:t}),e.jsx("p",{className:"page-section-copy",children:r})]})]}),n.length>0?e.jsx("div",{className:"pill-strip",children:n.map(i=>e.jsx("span",{className:"pill-item",children:i},i))}):null]}),s?e.jsx("div",{className:"min-w-0 lg:w-full lg:max-w-[430px] lg:justify-self-end",children:s}):null]}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-5 right-6 select-none text-right uppercase leading-none",style:{fontFamily:"var(--font-operator)",fontSize:"clamp(52px, 9vw, 116px)",color:"rgba(var(--ch-text-primary), 0.034)",fontWeight:700,letterSpacing:"-0.06em"},children:a})]})}function x({eyebrow:a,title:t,description:r,aside:n,children:s}){return e.jsxs("div",{className:"mx-auto flex w-full max-w-[1760px] flex-col gap-6",children:[e.jsx(d,{context:a,title:t,description:r,tags:["Local-first telemetry","Streaming traces","Cost intelligence"],rightSlot:n}),s]})}function u(a){const t=Math.abs(a),r=a<0?"-":"";return t<.01?`${r}$${t.toFixed(4)}`:`${r}$${t.toFixed(2)}`}function g(a){return a<1e3?`${Math.round(a)}ms`:`${(a/1e3).toFixed(1)}s`}function f(a){return new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:a>=1e3?1:0}).format(a)}function h(a){const t=Date.now()-a,r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const n=Math.floor(r/60);return n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}export{x as P,u as a,g as b,h as c,f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d}from"./query-DVWnIZNd.js";const r=(...t)=>t.filter((a,o,c)=>!!a&&a.trim()!==""&&c.indexOf(a)===o).join(" ").trim();const M=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const _=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,o,c)=>c?c.toUpperCase():o.toLowerCase());const y=t=>{const a=_(t);return a.charAt(0).toUpperCase()+a.slice(1)};var m={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const x=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const g=d.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:n="",children:h,iconNode:k,...s},p)=>d.createElement("svg",{ref:p,...m,width:a,height:a,stroke:t,strokeWidth:c?Number(o)*24/Number(a):o,className:r("lucide",n),...!h&&!x(s)&&{"aria-hidden":"true"},...s},[...k.map(([i,l])=>d.createElement(i,l)),...Array.isArray(h)?h:[h]]));const e=(t,a)=>{const o=d.forwardRef(({className:c,...n},h)=>d.createElement(g,{ref:h,iconNode:a,className:r(`lucide-${M(y(t))}`,`lucide-${t}`,c),...n}));return o.displayName=y(t),o};const v=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],U1=e("activity",v);const u=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],D1=e("arrow-down",u);const w=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],P1=e("arrow-left",w);const f=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z1=e("arrow-right",f);const $=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],E1=e("arrow-up-down",$);const N=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],I1=e("arrow-up",N);const z=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],W1=e("audio-lines",z);const b=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],B1=e("chart-no-axes-column",b);const q=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],F1=e("check",q);const C=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],G1=e("chevron-down",C);const A=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],K1=e("chevron-left",A);const j=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],O1=e("chevron-right",j);const L=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],X1=e("chevron-up",L);const H=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],J1=e("chevrons-left",H);const V=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],Q1=e("chevrons-right",V);const S=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Y1=e("circle-check",S);const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ee=e("circle-x",T);const R=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],ae=e("clock",R);const U=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],te=e("code",U);const D=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],oe=e("coins",D);const P=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],ce=e("columns-2",P);const Z=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],he=e("copy",Z);const E=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],de=e("cpu",E);const I=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],ne=e("database",I);const W=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],se=e("dollar-sign",W);const B=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ye=e("download",B);const F=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],re=e("file-text",F);const G=[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",key:"1u1bxd"}]],ke=e("folder-code",G);const K=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],pe=e("gauge",K);const O=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],ie=e("hash",O);const X=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],le=e("image",X);const J=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Me=e("info",J);const Q=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],_e=e("keyboard",Q);const Y=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],me=e("layers",Y);const e1=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],xe=e("layout-grid",e1);const a1=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],ge=e("lightbulb",a1);const t1=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],ve=e("list",t1);const o1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ue=e("loader-circle",o1);const c1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M8 11h.01",key:"1dfujw"}]],we=e("message-square-more",c1);const h1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],fe=e("message-square",h1);const d1=[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]],$e=e("orbit",d1);const n1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Ne=e("panel-left",n1);const s1=[["path",{d:"M2 22h20",key:"272qi7"}],["path",{d:"M6.36 17.4 4 17l-2-4 1.1-.55a2 2 0 0 1 1.8 0l.17.1a2 2 0 0 0 1.8 0L8 12 5 6l.9-.45a2 2 0 0 1 2.09.2l4.02 3a2 2 0 0 0 2.1.2l4.19-2.06a2.41 2.41 0 0 1 1.73-.17L21 7a1.4 1.4 0 0 1 .87 1.99l-.38.76c-.23.46-.6.84-1.07 1.08L7.58 17.2a2 2 0 0 1-1.22.18Z",key:"fkigj9"}]],ze=e("plane-takeoff",s1);const y1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],be=e("play",y1);const r1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qe=e("plus",r1);const k1=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],Ce=e("radar",k1);const p1=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],Ae=e("receipt-text",p1);const i1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],je=e("rotate-ccw",i1);const l1=[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Le=e("search-check",l1);const M1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],He=e("search",M1);const _1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Ve=e("send",_1);const m1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Se=e("settings-2",m1);const x1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Te=e("shield-alert",x1);const g1=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],Re=e("sliders-horizontal",g1);const v1=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ue=e("sparkles",v1);const u1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],De=e("square-check",u1);const w1=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Pe=e("square-check-big",w1);const f1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ze=e("square",f1);const $1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ee=e("terminal",$1);const N1=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],Ie=e("timer-reset",N1);const z1=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],We=e("timer",z1);const b1=[["path",{d:"M18.2 12.27 20 6H4l1.8 6.27a1 1 0 0 0 .95.73h10.5a1 1 0 0 0 .96-.73Z",key:"1pledb"}],["path",{d:"M8 13v9",key:"hmv0ci"}],["path",{d:"M16 22v-9",key:"ylnf1u"}],["path",{d:"m9 6 1 7",key:"dpdgam"}],["path",{d:"m15 6-1 7",key:"ls7zgu"}],["path",{d:"M12 6V2",key:"1pj48d"}],["path",{d:"M13 2h-2",key:"mj6ths"}]],Be=e("tower-control",b1);const q1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fe=e("trash-2",q1);const C1=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Ge=e("trending-up",C1);const A1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ke=e("triangle-alert",A1);const j1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Oe=e("users",j1);const L1=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Xe=e("video",L1);const H1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2",key:"4125el"}],["path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21",key:"1dpki6"}]],Je=e("wallet-cards",H1);const V1=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Qe=e("wrench",V1);const S1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ye=e("x",S1);const T1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e2=e("zap",T1);export{le as $,W1 as A,Ee as B,B1 as C,se as D,ye as E,re as F,pe as G,be as H,oe as I,ue as J,_e as K,xe as L,we as M,Y1 as N,$e as O,ze as P,O1 as Q,je as R,Ve as S,Ke as T,he as U,Xe as V,ie as W,Ye as X,Qe as Y,e2 as Z,te as _,He as a,Je as a0,Ae as a1,Ie as a2,Oe as a3,Re as a4,I1 as a5,D1 as a6,J1 as a7,K1 as a8,Q1 as a9,ne as aa,Fe as ab,qe as ac,We as ad,Me as ae,Le as af,ke as ag,Ne as b,ve as c,de as d,Se as e,Be as f,Ue as g,Ge as h,De as i,Ze as j,Ce as k,Te as l,P1 as m,Z1 as n,ge as o,Pe as p,ee as q,ce as r,X1 as s,G1 as t,E1 as u,U1 as v,fe as w,ae as x,me as y,F1 as z};
|