usage-board 4.0.1 → 5.0.0

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.
Files changed (76) hide show
  1. package/dist/index.mjs +40 -22
  2. package/dist/public/_nuxt/3inMrCcs.js +146 -0
  3. package/dist/public/_nuxt/5M1aAlPv.js +6 -0
  4. package/dist/public/_nuxt/{C0GhHHgI.js → BHGcQrYH.js} +2 -2
  5. package/dist/public/_nuxt/{DF2WsXH3.js → BgVTqBr9.js} +1 -1
  6. package/dist/public/_nuxt/{DXWxIyGU.js → BhTZzeJU.js} +1 -1
  7. package/dist/public/_nuxt/{D7qEPtpx.js → BlxNEZ3W.js} +1 -1
  8. package/dist/public/_nuxt/BwYRMC0_.js +1 -0
  9. package/dist/public/_nuxt/C3BLG0Zo.js +21 -0
  10. package/dist/public/_nuxt/{De8DvPWL.js → C8lAAJpL.js} +1 -1
  11. package/dist/public/_nuxt/Cxd8QZxF.js +261 -0
  12. package/dist/public/_nuxt/DXeNXt_b.js +1 -0
  13. package/dist/public/_nuxt/DavRiQHq.js +25 -0
  14. package/dist/public/_nuxt/{Jp5cgQZi.js → DfL4oXhq.js} +3 -3
  15. package/dist/public/_nuxt/DjKivtvZ.js +1 -0
  16. package/dist/public/_nuxt/{37OOe3RF.js → OPi16VNs.js} +1 -1
  17. package/dist/public/_nuxt/builds/latest.json +1 -1
  18. package/dist/public/_nuxt/builds/meta/eff380a6-8407-4f41-af1f-39f3ae1dface.json +1 -0
  19. package/dist/public/_nuxt/{entry.DnkKc-6G.css → entry.BYVbC6M5.css} +1 -1
  20. package/dist/public/_nuxt/error-404.ABvo6GrV.css +1 -0
  21. package/dist/public/_nuxt/error-500.CaR7LJUF.css +1 -0
  22. package/dist/public/pricing-data/fast-multiplier-overrides.json +12 -0
  23. package/dist/public/pricing-data/litellm-pricing.json +43714 -0
  24. package/dist/public/pricing-data/models-dev-pricing.json +178004 -0
  25. package/dist/server/chunks/_/analysis-handlers.mjs +54 -0
  26. package/dist/server/chunks/_/pagination.mjs +16 -0
  27. package/dist/server/chunks/build/client.precomputed.mjs +1 -1
  28. package/dist/server/chunks/nitro/nitro.mjs +4976 -5765
  29. package/dist/server/chunks/routes/api/analysis/agent/session.json.mjs +28 -4
  30. package/dist/server/chunks/routes/api/analysis/agent/token.json.mjs +14 -4
  31. package/dist/server/chunks/routes/api/analysis/cache.json.mjs +12 -3
  32. package/dist/server/chunks/routes/api/analysis/hot-project.json.mjs +15 -5
  33. package/dist/server/chunks/routes/api/analysis/live-state.json.mjs +32 -0
  34. package/dist/server/chunks/routes/api/analysis/model.json.mjs +12 -3
  35. package/dist/server/chunks/routes/api/analysis/overview-cards.json.mjs +12 -3
  36. package/dist/server/chunks/routes/api/analysis/session.json.mjs +12 -3
  37. package/dist/server/chunks/routes/api/analysis/token/daily.json.mjs +25 -4
  38. package/dist/server/chunks/routes/api/analysis/token/today-hourly.json.mjs +12 -3
  39. package/dist/server/chunks/routes/api/analysis/token.json.mjs +12 -3
  40. package/dist/server/chunks/routes/api/projects/_project/modules.get.mjs +14 -6
  41. package/dist/server/chunks/routes/api/projects/catalog.get.mjs +12 -4
  42. package/dist/server/chunks/routes/renderer.mjs +11 -3
  43. package/dist/server/chunks/routes/ws.mjs +64 -59
  44. package/dist/server/index.mjs +11 -3
  45. package/dist/server/node_modules/@clack/core/dist/index.mjs +17 -0
  46. package/dist/server/node_modules/@clack/core/package.json +63 -0
  47. package/dist/server/node_modules/@clack/prompts/dist/index.mjs +145 -0
  48. package/dist/server/node_modules/@clack/prompts/package.json +68 -0
  49. package/dist/server/node_modules/dayjs/dayjs.min.js +1 -0
  50. package/dist/server/node_modules/dayjs/package.json +85 -0
  51. package/dist/server/node_modules/dayjs/plugin/utc.js +1 -0
  52. package/dist/server/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  53. package/dist/server/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  54. package/dist/server/node_modules/fast-string-truncated-width/package.json +35 -0
  55. package/dist/server/node_modules/fast-string-width/dist/index.js +14 -0
  56. package/dist/server/node_modules/fast-string-width/package.json +34 -0
  57. package/dist/server/node_modules/fast-wrap-ansi/lib/main.js +218 -0
  58. package/dist/server/node_modules/fast-wrap-ansi/package.json +51 -0
  59. package/dist/server/node_modules/sisteransi/package.json +34 -0
  60. package/dist/server/node_modules/sisteransi/src/index.js +58 -0
  61. package/dist/server/node_modules/xdg-basedir/index.js +30 -0
  62. package/dist/server/node_modules/xdg-basedir/package.json +47 -0
  63. package/dist/server/package.json +10 -2
  64. package/package.json +11 -9
  65. package/dist/public/_nuxt/65Ayv2XK.js +0 -146
  66. package/dist/public/_nuxt/BOWwkrCY.js +0 -25
  67. package/dist/public/_nuxt/D9-Yw1TR.js +0 -1
  68. package/dist/public/_nuxt/DKaPq50Z.js +0 -6
  69. package/dist/public/_nuxt/DgMMKsPE.js +0 -258
  70. package/dist/public/_nuxt/DxvuOJRP.js +0 -1
  71. package/dist/public/_nuxt/builds/meta/34b12f78-e5b7-490f-99ba-b4a8ab41b914.json +0 -1
  72. package/dist/public/_nuxt/error-404.CFBEg71j.css +0 -1
  73. package/dist/public/_nuxt/error-500.BqCnH31G.css +0 -1
  74. package/dist/public/_nuxt/qXgLTL_3.js +0 -21
  75. package/dist/public/_nuxt/y6mAKUDU.js +0 -1
  76. package/dist/server/chunks/routes/api/payload.json.mjs +0 -26
@@ -0,0 +1 @@
1
+ import{h as Y,I as H,F as G,b as ee,k as I,i as se,j as $,g as ae,D as B,G as te,H as oe,K as L,L as F,M as O}from"./Cxd8QZxF.js";import{_ as ne,a as ie,b as re,f as le,c as ce,d as de,u as ge,e as ue,g as me,h as he,i as j}from"./DavRiQHq.js";import{c as pe}from"./BwYRMC0_.js";import{e as C,N as ye,o as c,g as _,w as p,c as m,t as f,F as D,a as l,b as t,i as s,l as V,G as n,q as fe,s as we,E as ke,R as be,S as Pe,T as xe,U as ve,V as Ue,P as _e}from"./DfL4oXhq.js";import{u as K}from"./5M1aAlPv.js";import"./BHGcQrYH.js";import"./BgVTqBr9.js";const Te={key:0,class:"text-xs text-destructive"},Se={class:"mb-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},De={class:"mb-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},Re={class:"rounded-md border px-3 py-2"},Me={class:"mt-1 text-lg font-semibold tabular-nums"},Ce={class:"rounded-md border px-3 py-2"},Ee={class:"mt-1 text-lg font-semibold tabular-nums"},Ne={class:"rounded-md border px-3 py-2"},Ae={class:"mt-1 text-lg font-semibold tabular-nums"},$e={key:0,class:"mb-3 text-xs text-destructive"},je=C({name:"UsageAnalyticsSessionUsageTable",__name:"SessionUsageTable",props:{errorMessage:{},fetchPage:{},items:{},loading:{type:Boolean},pagination:{},productName:{default:"Product"}},setup(e){const o=e,g=n(()=>({items:o.items,pagination:o.pagination??{page:1,pageCount:Math.max(1,Math.ceil(o.items.length/B)),pageSize:B,total:o.items.length}})),{error:d,pageData:i,setPage:u}=Y(g,o.fetchPage),w=[{accessorKey:"sessionId",cell:({row:a})=>a.original.sessionId,header:"Session ID",meta:{class:"max-w-80 truncate font-mono text-xs"}},{accessorKey:"project",header:"Project",meta:{class:"font-medium"}},{accessorKey:"threadName",header:"Thread",meta:{class:"max-w-64 truncate"}},{accessorKey:"model",header:"Model"},{accessorKey:"startedAt",cell:({row:a})=>x(a.original.startedAt),header:"Started",meta:{class:"whitespace-nowrap"}},{accessorKey:"duration",header:"Duration",meta:{class:"text-right tabular-nums"}},{accessorKey:"inputTokens",cell:({row:a})=>$(a.original.inputTokens),header:"Input",meta:{class:"text-right tabular-nums"}},{accessorKey:"outputTokens",cell:({row:a})=>$(a.original.outputTokens),header:"Output",meta:{class:"text-right tabular-nums"}},{accessorKey:"tokenTotal",cell:({row:a})=>$(a.original.tokenTotal),header:"Total Tokens",meta:{class:"text-right tabular-nums"}},{accessorKey:"costUSD",cell:({row:a})=>I(a.original.costUSD),header:"Cost",meta:{class:"text-right tabular-nums"}}],k=n(()=>i.value.items.reduce((a,r)=>a+r.costUSD,0)),b=n(()=>i.value.items.reduce((a,r)=>a+r.tokenTotal,0)),P=n(()=>i.value.pagination.total);ye(()=>o.fetchPage,a=>{a&&i.value.pagination.page!==1&&u(1)});function x(a){return ae(a,"MMM DD HH:mm")??a}return(a,r)=>{const y=G,T=se,S=H;return c(),_(S,{description:`Each row maps one ${e.productName} session to its session-level token consumption.`,icon:"lucide:file-json-2",title:`${e.productName} Session Statistics`},{default:p(()=>[e.errorMessage?(c(),m("p",Te,f(e.errorMessage),1)):e.loading?(c(),m(D,{key:1},[l("div",Se,[t(y,{class:"h-20 w-full rounded-md"}),t(y,{class:"h-20 w-full rounded-md"}),t(y,{class:"h-20 w-full rounded-md"})]),t(y,{class:"h-72 w-full rounded-md"})],64)):(c(),m(D,{key:2},[l("div",De,[l("div",Re,[r[0]||(r[0]=l("p",{class:"text-xs text-muted-foreground"}," Sessions ",-1)),l("p",Me,f(s(P)),1)]),l("div",Ce,[r[1]||(r[1]=l("p",{class:"text-xs text-muted-foreground"}," Tokens ",-1)),l("p",Ee,f(("formatCompactNumber"in a?a.formatCompactNumber:s(ee))(s(b))),1)]),l("div",Ne,[r[2]||(r[2]=l("p",{class:"text-xs text-muted-foreground"}," Spend ",-1)),l("p",Ae,f(("formatCurrency"in a?a.formatCurrency:s(I))(s(k))),1)])]),s(d)?(c(),m("p",$e,f(s(d).message),1)):V("",!0),t(T,{columns:w,data:s(i).items,"empty-text":`No ${e.productName} sessions found.`,pagination:s(i).pagination,onPageChange:s(u)},null,8,["data","empty-text","pagination","onPageChange"])],64))]),_:1},8,["description","title"])}}}),Ke=Object.assign(je,{__name:"UsageAnalyticsSessionUsageTable"}),Ie={class:"bg-background border border-input rounded-xl shadow-xs min-h-0 flex-1 overflow-y-auto"},Be={class:"grid content-start p-4 space-y-3"},Le={key:0,class:"text-xs text-destructive"},Fe={class:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4"},Oe={key:0,class:"text-xs text-destructive"},He=C({name:"DashboardTokenConsumptionDashboard",__name:"TokenConsumptionDashboard",props:{dailyRows:{},dailyRowsPagination:{},dailyTokenUsage:{},errorMessage:{},fetchSessionUsagePage:{type:Function},fetchTokenUsagePage:{type:Function},insightsErrorMessage:{},insightsLoading:{type:Boolean},loading:{type:Boolean},monthlyModelUsage:{},monthlyRows:{},monthlyRowsPagination:{},overviewCards:{},productName:{},projectUsage:{},sessionErrorMessage:{},sessionLoading:{type:Boolean},sessionRows:{},sessionRowsPagination:{},sessionUsage:{},sessionUsagePagination:{},weeklyRows:{},weeklyRowsPagination:{}},setup(e){return(o,g)=>{const d=G,i=H,u=te,w=oe,k=ne,b=ie,P=re,x=pe,a=Ke;return c(),m("div",Ie,[l("div",Be,[l("div",{class:fe(s(we)("relative flex items-center gap-2 mb-4 text-foreground font-medium","after:content-[ ]","after:absolute after:w-px after:h-full after:rounded-2xl","after:border-l-2 after:border-amber-500/50 after:-ml-2 ml-2"))},[g[0]||(g[0]=l("span",{class:"capitalize"},"agent:",-1)),l("span",null,f(e.productName),1)],2),e.errorMessage?(c(),m("p",Le,f(e.errorMessage),1)):V("",!0),e.loading?(c(),m(D,{key:1},[l("div",Fe,[(c(),m(D,null,ke(4,r=>t(d,{key:r,class:"h-28 rounded-md"})),64))]),t(u,null,{default:p(()=>[t(i,{class:"md:col-span-8",description:"Monthly token trends by model",icon:"solar:cpu-line-duotone",title:"Model Usage"},{default:p(()=>[t(d,{class:"h-72 w-full rounded-md"})]),_:1}),t(i,{class:"md:col-span-4",description:"Best performers by spend",icon:"lucide:folder-git-2",title:"Top Projects"},{default:p(()=>[t(d,{class:"h-72 w-full rounded-md"})]),_:1}),t(i,{class:"md:col-span-12",description:`${e.productName} token usage across the heatmap range`,icon:"lucide:chart-area",title:`${e.productName} Token Heatmap`},{default:p(()=>[t(d,{class:"h-80 w-full rounded-md"})]),_:1},8,["description","title"]),t(i,{class:"md:col-span-12",description:`Browse ${e.productName} token consumption by day, week, month, or session.`,icon:"lucide:table-2",title:`${e.productName} Token Usage`},{default:p(()=>[t(d,{class:"h-72 w-full rounded-md"})]),_:1},8,["description","title"]),t(i,{class:"md:col-span-12",description:`Each row maps one ${e.productName} session to its session-level token consumption.`,icon:"lucide:file-json-2",title:`${e.productName} Session Statistics`},{default:p(()=>[t(d,{class:"h-72 w-full rounded-md"})]),_:1},8,["description","title"])]),_:1})],64)):(c(),m(D,{key:2},[t(w,{cards:e.overviewCards},null,8,["cards"]),t(u,null,{default:p(()=>[t(k,{"monthly-items":e.monthlyModelUsage,class:"md:col-span-8"},null,8,["monthly-items"]),e.insightsLoading||e.insightsErrorMessage?(c(),_(i,{key:0,class:"md:col-span-4",description:"Best performers by spend",icon:"lucide:folder-git-2",title:"Top Projects"},{default:p(()=>[e.insightsErrorMessage?(c(),m("p",Oe,f(e.insightsErrorMessage),1)):(c(),_(d,{key:1,class:"h-72 w-full rounded-md"}))]),_:1})):(c(),_(b,{key:1,items:e.projectUsage,class:"md:col-span-4"},null,8,["items"])),t(P,{items:e.dailyTokenUsage,class:"md:col-span-12",title:`${e.productName} Token Heatmap`},null,8,["items","title"]),t(x,{"daily-items":e.dailyRows,"daily-pagination":e.dailyRowsPagination,"error-message":e.insightsErrorMessage,"fetch-page":e.fetchTokenUsagePage,loading:e.insightsLoading,"monthly-items":e.monthlyRows,"monthly-pagination":e.monthlyRowsPagination,"product-name":e.productName,"session-items":e.sessionRows,"session-pagination":e.sessionRowsPagination,"weekly-items":e.weeklyRows,"weekly-pagination":e.weeklyRowsPagination,class:"md:col-span-12"},null,8,["daily-items","daily-pagination","error-message","fetch-page","loading","monthly-items","monthly-pagination","product-name","session-items","session-pagination","weekly-items","weekly-pagination"]),t(a,{"error-message":e.sessionErrorMessage,"fetch-page":e.fetchSessionUsagePage,items:e.sessionUsage,loading:e.sessionLoading,pagination:e.sessionUsagePagination,"product-name":e.productName,class:"md:col-span-12"},null,8,["error-message","fetch-page","items","loading","pagination","product-name"])]),_:1})],64))])])}}}),Ge=Object.assign(He,{__name:"DashboardTokenConsumptionDashboard"});function Ve(e){const o=n(()=>be(e)),{data:g,error:d,refresh:i,status:u}=K(()=>`analysis:agent:${o.value}:core`,()=>le(o.value),{default:L,watch:[o]}),{clear:w,data:k,error:b,execute:P,refresh:x,status:a}=K(()=>`analysis:agent:${o.value}:insights`,()=>ce(o.value),{default:F,immediate:!1,server:!1}),{clear:r,data:y,error:T,execute:S,refresh:E,status:N}=K(()=>`analysis:agent:${o.value}:session`,()=>de(o.value),{default:O,immediate:!1,server:!1}),v=n(()=>g.value??L()),h=n(()=>k.value??F()),R=n(()=>y.value??O()),{refresh:M}=ge({clearDeferred:()=>{w(),r()},coreStatus:u,executeDeferred:()=>Promise.all([P(),S()]),refreshCore:i,refreshDeferred:()=>Promise.all([x(),E()])});return ue(U=>{if(U.updatedPlatforms.includes(o.value))return M()}),{dailyRows:n(()=>v.value.dailyRows),dailyRowsPagination:n(()=>v.value.dailyRowsPagination),dailyTokenUsage:n(()=>v.value.dailyTokenUsage),error:d,fetchSessionUsagePage:U=>he(o.value,U),fetchTokenUsagePage:(U,A)=>me(o.value,U,A),insightsError:b,insightsStatus:a,monthlyModelUsage:n(()=>v.value.monthlyModelUsage),monthlyRows:n(()=>h.value.monthlyRows),monthlyRowsPagination:n(()=>h.value.monthlyRowsPagination),overviewCards:n(()=>v.value.overviewCards),projectUsage:n(()=>h.value.projectUsage),refresh:M,sessionError:T,sessionRows:n(()=>h.value.sessionRows),sessionRowsPagination:n(()=>h.value.sessionRowsPagination),sessionStatus:N,sessionUsage:n(()=>R.value.sessionUsage),sessionUsagePagination:n(()=>R.value.sessionUsagePagination),status:u,weeklyRows:n(()=>h.value.weeklyRows),weeklyRowsPagination:n(()=>h.value.weeklyRowsPagination)}}const ze=C({name:"DashboardProductPage",__name:"ProductPage",props:{productKey:{},productName:{}},setup(e){const o=e,{dailyRows:g,dailyRowsPagination:d,dailyTokenUsage:i,error:u,fetchSessionUsagePage:w,fetchTokenUsagePage:k,insightsError:b,insightsStatus:P,monthlyModelUsage:x,monthlyRows:a,monthlyRowsPagination:r,overviewCards:y,projectUsage:T,sessionError:S,sessionRows:E,sessionRowsPagination:N,sessionStatus:v,sessionUsage:h,sessionUsagePagination:R,status:M,weeklyRows:U,weeklyRowsPagination:A}=Ve(Pe(o,"productKey")),{errorText:z,showSkeleton:q}=j(M,u),{errorText:J,showSkeleton:Z}=j(P,b),{errorText:Q,showSkeleton:W}=j(v,S);return(Je,Ze)=>{const X=Ge;return c(),_(X,{"daily-rows":s(g),"daily-rows-pagination":s(d),"daily-token-usage":s(i),"error-message":s(z),"fetch-session-usage-page":s(w),"fetch-token-usage-page":s(k),"insights-error-message":s(J),"insights-loading":s(Z),loading:s(q),"monthly-model-usage":s(x),"monthly-rows":s(a),"monthly-rows-pagination":s(r),"overview-cards":s(y),"product-name":e.productName,"project-usage":s(T),"session-error-message":s(Q),"session-loading":s(W),"session-rows":s(E),"session-rows-pagination":s(N),"session-usage":s(h),"session-usage-pagination":s(R),"weekly-rows":s(U),"weekly-rows-pagination":s(A)},null,8,["daily-rows","daily-rows-pagination","daily-token-usage","error-message","fetch-session-usage-page","fetch-token-usage-page","insights-error-message","insights-loading","loading","monthly-model-usage","monthly-rows","monthly-rows-pagination","overview-cards","product-name","project-usage","session-error-message","session-loading","session-rows","session-rows-pagination","session-usage","session-usage-pagination","weekly-rows","weekly-rows-pagination"])}}}),qe=Object.assign(ze,{__name:"DashboardProductPage"}),ts=C({__name:"[product]",setup(e){const o=xe(),g=ve(o.params.product);if(!g)throw Ue({status:404,message:"Page not found"});return(d,i)=>{const u=qe;return c(),_(u,{"product-key":s(g),"product-name":s(_e)[s(g)].label},null,8,["product-key","product-name"])}}});export{ts as default};
@@ -0,0 +1,25 @@
1
+ import{c as xe,I as re,_ as _e,S as we,C as Se,a as de,f as Te,z as Me,A as Ce,u as De,e as Ue,b as U,g as Z,d as me,k as F,t as $e,D as W,s as Pe,w as Ae,y as Le}from"./Cxd8QZxF.js";import{e as ie,B as je,C as Re,o as u,g as ee,w as te,a as l,i as r,b as X,l as z,c as g,D as Y,t as m,F as j,E as R,G as i,q as oe,d as pe,P as fe,N as ce,J as ge,L as Be,M as ze,Q as Ee}from"./DfL4oXhq.js";const Ne={key:0,class:"pointer-events-none absolute inset-0 z-10"},He={class:"mt-4 flex flex-wrap items-center justify-center gap-3 text-xs text-muted-foreground"},Ie={class:"font-medium text-foreground tabular-nums"},Oe=288,Fe=ie({name:"StatisticalAnalysisModelUsagePanel",__name:"ModelUsagePanel",props:{monthlyItems:{},year:{}},setup(t){const e=t,c=["#2563eb","#f97316","#0891b2","#8b5cf6","#059669","#f43f5e"],d={bottom:32,left:56,right:12,top:8},h=[0,void 0],w=je("chartRoot"),{width:A}=Re(w),q=i(()=>e.year??ke(e.monthlyItems)??Number(Z(Date.now(),"YYYY")??new Date().getFullYear())),T=i(()=>Array.from({length:12},(a,f)=>{const v=`${f+1}`.padStart(2,"0");return`${q.value}-${v}`})),Q=i(()=>[0,Math.max(T.value.length-1,0)]),V=i(()=>T.value.map((a,f)=>f)),E=i(()=>e.monthlyItems.filter(a=>a.month.startsWith(`${q.value}-`))),M=i(()=>Array.from(new Set(E.value.map(a=>a.model)))),$=i(()=>T.value.map((a,f)=>{const v=Object.fromEntries(M.value.map(S=>[S,E.value.find(x=>x.month===a&&x.model===S)?.tokenTotal??0]));return{month:a,monthIndex:f,tokensByModel:v,totalTokens:Object.values(v).reduce((S,x)=>S+x,0)}})),D=i(()=>M.value.map((a,f)=>{const v=ue(f),S=$.value.reduce((x,le)=>x+(le.tokensByModel[a]??0),0);return{color:v,model:a,totalLabel:U(S),totalTokens:S}}).sort((a,f)=>f.totalTokens-a.totalTokens)),N=i(()=>D.value.map(a=>f=>f.tokensByModel[a.model]??0)),y=i(()=>Object.fromEntries(D.value.map(a=>[a.model,{color:a.color,label:a.model}]))),{getAreaColor:H,getCrosshairColor:L,getGradientId:ae,getLineColor:se}=xe(()=>D.value,{fallbackColor:ue(0),getColor:a=>a.color,getKey:a=>a.model,gradientPrefix:"model-usage"}),J=i(()=>D.value.map(a=>`
2
+ <linearGradient id="${ae(a.model)}" x1="0" y1="0" x2="0" y2="1">
3
+ <stop offset="0%" stop-color="${a.color}" stop-opacity="0.45" />
4
+ <stop offset="100%" stop-color="${a.color}" stop-opacity="0.08" />
5
+ </linearGradient>
6
+ `).join("")),K=i(()=>$.value.length>0&&D.value.length>0),I=i(()=>d.left),O=i(()=>d.top),B=i(()=>Math.max(A.value-d.left-d.right,0)),G=i(()=>Math.max(Oe-d.top-d.bottom,0)),o=i(()=>O.value+G.value),s=i(()=>Math.max(...$.value.map(a=>a.totalTokens),0)),{clearHoverGuide:p,handlePointerMove:n,hoverPointerY:b,hoverSelection:P}=De({chartRoot:w,isEnabled:()=>K.value&&T.value.length>0&&B.value>0,resolveBounds:()=>({bottom:o.value,left:I.value,right:I.value+B.value,top:O.value}),resolveSelection(a){const f=me((a-I.value)/Math.max(B.value,1),0,1);return T.value.length<=1?0:Math.round(f*(T.value.length-1))}}),k=i(()=>{if(P.value===null||b.value===null)return null;const a=$.value[P.value];if(!a||B.value<=0||G.value<=0)return null;const f=T.value.length<=1?0:P.value/(T.value.length-1),v=I.value+f*B.value,S=me(b.value,O.value,o.value),le=(G.value<=0?0:1-(S-O.value)/G.value)*s.value;return{x:v,xLabel:be(a.month),y:S,yLabel:U(le)}});function C(a){return a.monthIndex}function he(a){const f=D.value.map(v=>({...v,tokenTotal:a.tokensByModel[v.model]??0})).sort((v,S)=>S.tokenTotal-v.tokenTotal);return`
7
+ <div class="grid min-w-48 gap-2 rounded-md border bg-background px-3 py-2 text-xs shadow-lg">
8
+ <div class="font-medium text-foreground">${ne(a.month)} ${a.month.slice(0,4)}</div>
9
+ <div class="grid gap-1 text-muted-foreground">
10
+ ${f.map(v=>`
11
+ <div class="flex items-center justify-between gap-4">
12
+ <span class="flex items-center gap-2">
13
+ <span class="size-2 rounded-sm" style="background-color: ${v.color}"></span>
14
+ ${Ue(v.model)}
15
+ </span>
16
+ <span class="font-mono font-medium text-foreground">${U(v.tokenTotal)}</span>
17
+ </div>
18
+ `).join("")}
19
+ </div>
20
+ <div class="flex justify-between gap-4 border-t pt-2 text-muted-foreground">
21
+ <span>Total</span>
22
+ <span class="font-mono font-semibold text-foreground">${U(a.totalTokens)}</span>
23
+ </div>
24
+ </div>
25
+ `}function ve(a){if(a instanceof Date)return"";const f=T.value[a];return f?ne(f):""}function ne(a){return Z(`${a}-01`,"MMM")??a}function be(a){return`${ne(a)} ${a.slice(0,4)}`}function ke(a){const v=[...a].sort((S,x)=>x.month.localeCompare(S.month))[0]?.month?.split("-")[0];return v?Number(v):null}function ue(a){return c[a%c.length]??"#2563eb"}return(a,f)=>{const v=_e,S=re;return u(),ee(S,{description:"Monthly token trends by model",icon:"solar:cpu-line-duotone",title:"Model Usage"},{default:te(()=>[l("div",{ref_key:"chartRoot",ref:w,class:"relative",onPointerleave:f[0]||(f[0]=(...x)=>r(p)&&r(p)(...x)),onPointermove:f[1]||(f[1]=(...x)=>r(n)&&r(n)(...x))},[X(v,{class:"h-72 w-full",config:r(y)},{default:te(()=>[X(r(we),{"auto-margin":!1,data:r($),height:288,margin:d,"svg-defs":r(J),"x-domain":r(Q),"y-domain":h},{default:te(()=>[X(r(Se),{color:r(H),line:!0,"line-color":r(se),"line-width":2.5,opacity:.82,x:C,y:r(N)},null,8,["color","line-color","y"]),X(r(de),{"grid-line":!1,"tick-format":ve,"tick-values":r(V),type:"x"},null,8,["tick-values"]),X(r(de),{"num-ticks":4,"tick-format":r(Te),type:"y"},null,8,["tick-format"]),r(K)?(u(),ee(r(Me),{key:0})):z("",!0),r(K)?(u(),ee(r(Ce),{key:1,color:r(L),template:he,x:C,"y-stacked":r(N)},null,8,["color","y-stacked"])):z("",!0)]),_:1},8,["data","svg-defs","x-domain"])]),_:1},8,["config"]),r(k)?(u(),g("div",Ne,[l("div",{class:"absolute border-l border-dashed border-border/80",style:Y({height:`${r(G)}px`,left:`${r(k).x}px`,top:`${r(O)}px`})},null,4),l("div",{class:"absolute border-t border-dashed border-border/80",style:Y({left:`${r(I)}px`,top:`${r(k).y}px`,width:`${r(B)}px`})},null,4),l("div",{class:"absolute rounded-sm bg-foreground px-2 py-1 text-[11px] font-medium text-background shadow-sm",style:Y({left:`${r(k).x}px`,top:`${r(o)+6}px`,transform:"translateX(-50%)"})},m(r(k).xLabel),5),l("div",{class:"absolute rounded-sm bg-foreground px-2 py-1 text-[11px] font-medium text-background shadow-sm",style:Y({left:`${Math.max(r(I)-8,0)}px`,top:`${r(k).y}px`,transform:"translate(-100%, -50%)"})},m(r(k).yLabel),5)])):z("",!0)],544),l("div",He,[(u(!0),g(j,null,R(r(D),x=>(u(),g("div",{key:x.model,class:"flex items-center gap-2"},[l("span",{class:"size-2.5 rounded-sm",style:Y({backgroundColor:x.color})},null,4),l("span",null,m(x.model),1),l("span",Ie,m(x.totalLabel),1)]))),128))])]),_:1})}}}),Nt=Object.assign(Fe,{__name:"StatisticalAnalysisModelUsagePanel"}),Ye={class:"space-y-3"},Ge={class:"flex flex-col flex-1"},qe={class:"truncate text-sm font-medium tracking-tight"},Ve={class:"mt-1 truncate text-xs text-muted-foreground"},We={class:"text-right"},Qe={class:"text-xs font-medium tracking-tight tabular-nums"},Je=ie({name:"StatisticalAnalysisProjectUsagePanel",__name:"ProjectUsagePanel",props:{items:{}},setup(t){return(e,c)=>{const d=re;return u(),ee(d,{description:"Best performers by spend",icon:"lucide:folder-git-2",title:"Top Projects"},{default:te(()=>[l("div",Ye,[(u(!0),g(j,null,R(t.items,h=>(u(),g("div",{key:h.repository,class:"flex justify-between items-center gap-3 rounded-md transition-colors"},[l("div",Ge,[l("p",qe,m(h.label),1),l("p",Ve,m(h.detail),1)]),l("div",We,[l("p",Qe,m(h.value),1)])]))),128))])]),_:1})}}}),Ht=Object.assign(Je,{__name:"StatisticalAnalysisProjectUsagePanel"}),Ke={class:"mb-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},Xe={class:"text-xs text-muted-foreground"},Ze={class:"mt-1 text-lg font-semibold tabular-nums"},et={class:"border-b pb-4"},tt=["aria-label","tabindex"],at={class:"sr-only"},ot={class:"font-medium"},st={key:0,class:"flex items-center justify-between gap-4 text-muted-foreground"},nt={class:"font-mono font-medium text-foreground"},lt={class:"flex items-center justify-between gap-4 text-muted-foreground"},rt={class:"font-mono font-medium text-foreground"},it={key:1,class:"flex items-center justify-between gap-4 text-muted-foreground"},ct={class:"font-mono font-medium text-foreground"},ut={key:2,class:"mt-1 grid max-h-56 gap-2 overflow-y-auto border-t pt-2 pr-1"},dt={class:"flex items-center justify-between gap-3 text-[11px] font-semibold"},mt={class:"font-mono text-muted-foreground"},pt={class:"min-w-0 truncate"},ft={key:0},gt={class:"shrink-0 font-mono"},yt={class:"min-w-0 truncate"},ht={key:0},vt={class:"shrink-0 font-mono"},bt={class:"mt-4 flex items-center justify-between gap-4"},kt={class:"text-xs text-muted-foreground"},xt={class:"flex items-center gap-1 text-xs text-muted-foreground"},_t={class:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},wt={class:"text-xs text-muted-foreground"},St={class:"mt-1 flex items-center justify-between gap-2"},Tt={class:"text-sm font-semibold"},Mt={class:"text-xs text-muted-foreground"},Ct=ie({name:"UsageHeatmapPanel",__name:"UsageHeatmapPanel",props:{heatMetric:{default:"tokens"},items:{},title:{}},setup(t){const e=t,c=["bg-zinc-100 dark:bg-zinc-800/80","bg-emerald-50 dark:bg-emerald-950/70","bg-emerald-100 dark:bg-emerald-900/70","bg-teal-100 dark:bg-teal-900/75","bg-teal-200 dark:bg-teal-800/80","bg-cyan-200 dark:bg-cyan-800/85","bg-cyan-300 dark:bg-cyan-700/90","bg-sky-300 dark:bg-sky-600/90","bg-sky-400 dark:bg-sky-500/95","bg-blue-500 dark:bg-blue-400"],d=[...c],h=[{key:"sun",label:"S",row:"1"},{key:"mon",label:"M",row:"2"},{key:"tue",label:"T",row:"3"},{key:"wed",label:"W",row:"4"},{key:"thu",label:"T",row:"5"},{key:"fri",label:"F",row:"6"},{key:"sat",label:"S",row:"7"}],w=i(()=>$e()),A=i(()=>new Date(w.value.getTime()-364*864e5)),q=i(()=>`${J(A.value)} - ${J(w.value)}`),T=i(()=>e.heatMetric==="cost"?"spend":"tokens"),Q=i(()=>`${q.value} ${T.value} heatmap. Darker cells mean higher daily ${T.value}.`),V=i(()=>`Colored by daily ${T.value}`),E=i(()=>{const o=new Map(e.items.map(s=>[Z(s.date)??s.date,s]));return Array.from({length:365},(s,p)=>{const n=new Date(A.value.getTime()+p*864e5);return{date:n,usage:o.get(Z(n)??"")}})}),M=i(()=>{const o=Math.max(...E.value.map(s=>e.heatMetric==="cost"?s.usage?.costUSD??0:s.usage?.totalTokens??0));return E.value.map(s=>{const p=s.usage?.costUSD??0,n=s.usage?.totalTokens??0,b=e.heatMetric==="cost"?p:n;return{colorClass:c[K(b,o)],costLabel:F(p),costUSD:p,date:J(s.date),hasUsage:!!s.usage,modelRows:O(s.usage?.models??{}),platformSections:I(s.usage?.platforms),tokenLabel:U(n),totalTokens:n}})}),$=i(()=>{const o=A.value.getDay(),s=(7-(o+M.value.length)%7)%7,p=Math.ceil((o+M.value.length+s)/7),n=Array.from({length:o},(k,C)=>({column:String(Math.floor(C/7)+2),colorClass:"bg-transparent",costLabel:"",date:"",isBlank:!0,key:`blank-${C}`,modelRows:[],platformSections:[],row:String(C%7+1),title:"No date",tooltipArrowClass:"",tooltipClass:"",tokenLabel:""})),b=M.value.map((k,C)=>({...k,column:String(Math.floor((o+C)/7)+2),isBlank:!1,key:k.date,row:String((o+C)%7+1),title:e.heatMetric==="cost"?`${k.date}: ${F(k.costUSD)} / ${U(k.totalTokens)} tokens`:`${k.date}: ${U(k.totalTokens)} tokens / ${F(k.costUSD)}`,...G(Math.floor((o+C)/7),p)})),P=Array.from({length:s},(k,C)=>({column:String(Math.floor((o+M.value.length+C)/7)+2),colorClass:"bg-transparent",costLabel:"",date:"",isBlank:!0,key:`trailing-blank-${C}`,modelRows:[],platformSections:[],row:String((o+M.value.length+C)%7+1),title:"No date",tooltipArrowClass:"",tooltipClass:"",tokenLabel:""}));return[...n,...b,...P]}),D=i(()=>Math.ceil($.value.length/7)),N=i(()=>({gridTemplateColumns:`max-content repeat(${D.value}, minmax(0, 1fr))`,gridTemplateRows:"repeat(7, minmax(0, 1fr))"})),y=i(()=>M.value.filter(o=>o.hasUsage).slice(-3)),H=i(()=>M.value.filter(o=>o.hasUsage).length),L=i(()=>F(M.value.reduce((o,s)=>o+s.costUSD,0))),ae=i(()=>U(M.value.reduce((o,s)=>o+s.totalTokens,0))),se=i(()=>e.heatMetric==="cost"?[{key:"year-cost",label:"Year Spend",value:L.value},{key:"year-tokens",label:"Year Tokens",value:ae.value},{key:"active-days",label:"Active Days",value:String(H.value)}]:[{key:"year-tokens",label:"Year Tokens",value:ae.value},{key:"year-cost",label:"Year Spend",value:L.value},{key:"active-days",label:"Active Days",value:String(H.value)}]);function J(o){return Z(o,"display")??o.toLocaleDateString("en-US",{day:"2-digit",month:"short",year:"numeric"})}function K(o,s){return o<=0||s<=0?0:Math.min(9,Math.max(1,Math.ceil(o/s*9)))}function I(o){return Object.entries(o??{}).map(([s,p])=>({costLabel:F(p.costUSD),costUSD:p.costUSD,key:s,label:fe[s]?.label??s,models:O(p.models),totalTokens:p.totalTokens,tokenLabel:U(p.totalTokens)})).sort(B)}function O(o){return Object.entries(o).map(([s,p])=>({costLabel:F(p.costUSD),costUSD:p.costUSD,isFallback:p.isFallback,key:s,label:s,totalTokens:p.totalTokens,tokenLabel:U(p.totalTokens)})).sort(B)}function B(o,s){const p=e.heatMetric==="cost"?s.costUSD-o.costUSD:s.totalTokens-o.totalTokens;return p!==0?p:s.totalTokens!==o.totalTokens?s.totalTokens-o.totalTokens:s.costUSD!==o.costUSD?s.costUSD-o.costUSD:o.label.localeCompare(s.label)}function G(o,s){return o<=1?{tooltipArrowClass:"left-3.5",tooltipClass:"left-0"}:o>=s-2?{tooltipArrowClass:"right-3.5",tooltipClass:"right-0"}:{tooltipArrowClass:"left-1/2 -translate-x-1/2",tooltipClass:"left-1/2 -translate-x-1/2"}}return(o,s)=>{const p=re;return u(),ee(p,{description:Q.value,icon:"lucide:calendar-days",title:e.title},{default:te(()=>[l("div",Ke,[(u(!0),g(j,null,R(se.value,n=>(u(),g("div",{key:n.key,class:"rounded-md border px-3 py-2"},[l("p",Xe,m(n.label),1),l("p",Ze,m(n.value),1)]))),128))]),l("div",et,[l("div",{class:"grid w-full gap-1",style:Y(N.value)},[(u(),g(j,null,R(h,n=>l("span",{key:n.key,class:"flex items-center justify-end pr-1 text-[10px] text-muted-foreground",style:Y({gridColumn:"1",gridRow:n.row})},m(n.label),5)),64)),(u(!0),g(j,null,R($.value,n=>(u(),g("div",{key:n.key,class:oe(["group relative aspect-square w-full max-w-3 justify-self-center rounded-sm border border-black/5 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/50 dark:border-white/10",[n.colorClass,{"border-transparent opacity-0":n.isBlank}]]),"aria-label":n.title,style:Y({gridColumn:n.column,gridRow:n.row}),tabindex:n.isBlank?-1:0},[l("span",at,m(n.title),1),n.isBlank?z("",!0):(u(),g("div",{key:0,class:oe(["pointer-events-none absolute bottom-full z-30 mb-2 hidden w-64 max-w-[calc(100vw-2rem)] gap-1 rounded-md border bg-popover px-2.5 py-2 text-xs text-popover-foreground shadow-md group-hover:grid group-focus-visible:grid",n.tooltipClass]),role:"tooltip"},[l("span",ot,m(n.date),1),e.heatMetric==="tokens"?(u(),g("span",st,[s[0]||(s[0]=l("span",null,"Tokens",-1)),l("span",nt,m(n.tokenLabel),1)])):z("",!0),l("span",lt,[s[1]||(s[1]=l("span",null,"Cost",-1)),l("span",rt,m(n.costLabel),1)]),e.heatMetric==="cost"?(u(),g("span",it,[s[2]||(s[2]=l("span",null,"Tokens",-1)),l("span",ct,m(n.tokenLabel),1)])):z("",!0),n.platformSections.length>0||n.modelRows.length>0?(u(),g("div",ut,[n.platformSections.length>0?(u(!0),g(j,{key:0},R(n.platformSections,b=>(u(),g("div",{key:b.key,class:"grid gap-1"},[l("div",dt,[l("span",null,m(b.label),1),l("span",mt,m(b.costLabel)+" / "+m(b.tokenLabel),1)]),(u(!0),g(j,null,R(b.models,P=>(u(),g("div",{key:P.key,class:"flex items-center justify-between gap-3 text-[11px] text-muted-foreground"},[l("span",pt,[pe(m(P.label),1),P.isFallback?(u(),g("span",ft," (fallback)")):z("",!0)]),l("span",gt,m(P.costLabel)+" / "+m(P.tokenLabel),1)]))),128))]))),128)):(u(!0),g(j,{key:1},R(n.modelRows,b=>(u(),g("div",{key:b.key,class:"flex items-center justify-between gap-3 text-[11px] text-muted-foreground"},[l("span",yt,[pe(m(b.label),1),b.isFallback?(u(),g("span",ht," (fallback)")):z("",!0)]),l("span",vt,m(b.costLabel)+" / "+m(b.tokenLabel),1)]))),128))])):z("",!0),l("span",{class:oe(["absolute top-full size-2 -translate-y-1/2 rotate-45 border-r border-b border-border bg-popover",n.tooltipArrowClass])},null,2)],2))],14,tt))),128))],4),l("div",bt,[l("p",kt,m(V.value),1),l("div",xt,[s[3]||(s[3]=l("span",null,"Less",-1)),(u(),g(j,null,R(d,n=>l("span",{key:n,class:oe(["size-3 rounded-[2px] border border-black/5 dark:border-white/10",n])},null,2)),64)),s[4]||(s[4]=l("span",null,"More",-1))])])]),l("div",_t,[(u(!0),g(j,null,R(y.value,n=>(u(),g("div",{key:n.date,class:"rounded-md border px-3 py-2"},[l("p",wt,m(n.date),1),l("div",St,[l("span",Tt,m(e.heatMetric==="cost"?("formatCurrency"in o?o.formatCurrency:r(F))(n.costUSD):("formatCompactNumber"in o?o.formatCompactNumber:r(U))(n.totalTokens)),1),l("span",Mt,m(e.heatMetric==="cost"?("formatCompactNumber"in o?o.formatCompactNumber:r(U))(n.totalTokens):("formatCurrency"in o?o.formatCurrency:r(F))(n.costUSD)),1)])]))),128))])]),_:1},8,["description","title"])}}}),It=Object.assign(Ct,{__name:"UsageHeatmapPanel"}),Dt=["day","week","month","session"],Ut={agentSession:"/api/analysis/agent/session.json",agentToken:"/api/analysis/agent/token.json",cache:"/api/analysis/cache.json",dailyTokenUsage:"/api/analysis/token/daily.json",hotProject:"/api/analysis/hot-project.json",liveState:"/api/analysis/live-state.json",model:"/api/analysis/model.json",overviewCards:"/api/analysis/overview-cards.json",session:"/api/analysis/session.json",token:"/api/analysis/token.json",todayHourlyUsage:"/api/analysis/token/today-hourly.json"};async function Ot(){const[t,e,c]=await Promise.all([_("overviewCards"),_("model"),_("hotProject")]);return{hotProjects:c,modelUsage:e,overviewCards:t}}async function Ft(){const[t,e,c]=await Promise.all([_("cache"),_("token"),_("todayHourlyUsage")]);return{dailyTokenUsage:e,efficiencyMetrics:t.items,todayHourlyUsage:c}}function Yt(){return _("session")}function $t(){return _("liveState")}function Gt(t=1){return _("dailyTokenUsage",{page:t,pageSize:W})}async function qt(t){const[e,c,d,h]=await Promise.all([_("overviewCards",{agent:t}),_("model",{agent:t}),_("token",{agent:t}),_("agentToken",{agent:t,page:1,pageSize:W,type:"day"})]);return{dailyRows:h.items,dailyRowsPagination:h.pagination,dailyTokenUsage:d,monthlyModelUsage:c,overviewCards:e}}async function Vt(t){const[e,c]=await Promise.all([_("hotProject",{agent:t}),Promise.all(Dt.filter(h=>h!=="day").map(async h=>[h,await _("agentToken",{agent:t,page:1,pageSize:W,type:h})]))]),d=Object.fromEntries(c);return{monthlyRows:d.month.items,monthlyRowsPagination:d.month.pagination,projectUsage:e,sessionRows:d.session.items,sessionRowsPagination:d.session.pagination,weeklyRows:d.week.items,weeklyRowsPagination:d.week.pagination}}function Wt(t){return _("agentSession",{agent:t,page:1,pageSize:W}).then(e=>({sessionUsage:e.items,sessionUsagePagination:e.pagination}))}function Qt(t,e,c){return _("agentToken",{agent:t,page:c,pageSize:W,type:e})}function Jt(t,e){return _("agentSession",{agent:t,page:e,pageSize:W})}function _(t,e={}){return $fetch(Ut[t],{query:Pt(e)})}function Pt(t){const e={};return t.agent&&(e.agent=fe[t.agent].slug),t.type&&(e.type=t.type),t.page&&(e.page=String(t.page)),t.pageSize&&(e.pageSize=String(t.pageSize)),Object.keys(e).length>0?e:void 0}function Kt(t){const e=ge(!1);ce(t.coreStatus,async d=>{if(d!=="success"){e.value=!1,t.clearDeferred();return}e.value||(e.value=!0,await t.executeDeferred())},{immediate:!0});async function c(){e.value=!1,await t.refreshCore(),t.coreStatus.value==="success"&&(e.value=!0,await t.refreshDeferred())}return{refresh:c}}const At=globalThis.setInterval,Lt=300,jt=2e3;function Xt(t){let e=!1,c="",d=null,h=null,w=null,A=null;const q=Le(),{status:T,open:Q}=Be(q,{immediate:!1,autoReconnect:{delay:1e3,retries:3},onMessage(y,H){const L=Rt(H.data);L&&(N(L.payload.updatedAt),M(L.payload))}});ze(()=>{Q(),D(),V()}),Ee(()=>{E(),w&&(clearTimeout(w),w=null)}),ce(T,y=>{y==="OPEN"?E():V()});function V(){h||(h=At(()=>{D()},jt))}function E(){h&&(clearInterval(h),h=null)}function M(y){w&&clearTimeout(w),w=setTimeout(()=>{w=null,$(y)},Lt)}async function $(y){if(A){d=y;return}if(A=Promise.resolve(t(y)).then(()=>{}).catch(L=>{console.error("[usage-live-update] failed to refresh dashboard",L)}).finally(()=>{A=null}),await A,!d)return;const H=d;d=null,await $(H)}async function D(){if(!(document.hidden||e)){e=!0;try{const y=await $t();if(!y.updatedAt)return;if(!c){N(y.updatedAt);return}if(y.updatedAt===c)return;N(y.updatedAt),M({affectedProjects:[],updatedAt:y.updatedAt,updatedPlatforms:[],updatedSessions:[]})}catch(y){Bt(y)||console.error("[usage-live-update] failed to fetch live state",y)}finally{e=!1}}}function N(y){!y||y<=c||(c=y)}}function Rt(t){if(typeof t!="string")return null;const e=Pe(t);return Ae(e)?e:null}function Bt(t){return ye(t).some(c=>c.includes("Failed to fetch")||c.includes("<no response>"))}function ye(t,e=[]){const c=t;return c?(typeof c.message=="string"&&e.push(c.message),c.cause?ye(c.cause,e):e):typeof t=="string"?[...e,t]:e}function Zt(t,e){const c=ge(!1);ce(t,w=>{w==="success"&&(c.value=!0)},{immediate:!0});const d=i(()=>!c.value&&t.value!=="error");return{errorText:i(()=>t.value!=="error"?"":e.value instanceof Error?e.value.message:typeof e.value=="string"?e.value:"Failed to load dashboard data."),showSkeleton:d}}export{Nt as _,Ht as a,It as b,Vt as c,Wt as d,Xt as e,qt as f,Qt as g,Jt as h,Zt as i,Ot as j,Ft as k,Gt as l,Yt as m,Kt as u};