ccdeck 4.0.2 → 4.0.3
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/web/assets/AccountBridge-CmB2ClCh.js +1 -0
- package/dist/web/assets/{AccountSection-crq1VjX0.js → AccountSection-C0_ISsSw.js} +1 -1
- package/dist/web/assets/{BrowserWatchModal-CoXeeb2o.js → BrowserWatchModal-C4G5G12x.js} +1 -1
- package/dist/web/assets/{FeedbackConversations-BDjrxpxf.js → FeedbackConversations-Bqqn0VaM.js} +1 -1
- package/dist/web/assets/{IntegrationModal-4Z8_QVBa.js → IntegrationModal-CKgtTF3f.js} +1 -1
- package/dist/web/assets/{IntegrationSkeleton-DHuH_POu.js → IntegrationSkeleton-WE6DOfez.js} +1 -1
- package/dist/web/assets/{RadioPanel-Dw3zruRE.js → RadioPanel-j_p9qx4L.js} +1 -1
- package/dist/web/assets/{StageShell-Dn1RGcsF.js → StageShell-Bl0ddeiL.js} +3 -3
- package/dist/web/assets/{TrafficRadar--OAIaujE.js → TrafficRadar-CTGz345C.js} +1 -1
- package/dist/web/assets/{UsageHistoryModal-D1hw3AaJ.js → UsageHistoryModal-C2IDurbk.js} +1 -1
- package/dist/web/assets/{app-DiIDGQPy.js → app-CdRq5GPP.js} +10 -10
- package/dist/web/assets/{index-BXBkLnYy.js → index-pIus964m.js} +1 -1
- package/dist/web/assets/{inspector-status-pane-DP7kOBus.js → inspector-status-pane-BY6DHEeo.js} +1 -1
- package/dist/web/assets/{screens-CqpMhDCL.js → screens-BMLZR8WS.js} +1 -1
- package/dist/web/assets/{stage-board-0PYMffFC.js → stage-board-6RJd7VXM.js} +1 -1
- package/dist/web/assets/{use-account-DskceWF8.js → use-account-t_qL6ab-.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/release-notes.json +7 -0
- package/src/server/pro-engine-terminal.mjs +22 -2
- package/dist/web/assets/AccountBridge-BWSoT0Lr.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,t as pt,r as d,ar as zn,ap as nn,as as He,o as rn,u as Oe,at as yn,a as Vr,h as un,g as $n,au as Fr,w as Br,av as Wn,G as Hr,J as zr,Q as $r,D as Wr}from"./app-DiIDGQPy.js";const Ur={radar:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M20 12a8 8 0 1 1-8-8v8l5-5"}),e.jsx("path",{d:"M12 8a4 4 0 1 0 4 4"}),e.jsx("circle",{cx:"12",cy:"12",r:"1"})]}),connection:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M8 8h8v8H8zM12 3v5M12 16v5M3 12h5M16 12h5"}),e.jsx("circle",{cx:"12",cy:"3",r:"1"}),e.jsx("circle",{cx:"21",cy:"12",r:"1"})]}),logs:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"5",y:"3",width:"14",height:"18",rx:"2"}),e.jsx("path",{d:"M9 8h6M9 12h6M9 16h3"})]}),metrics:e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 20h16M7 16v-5M12 16V4M17 16V8"})}),traces:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M7 5h10M7 12h10M7 19h10M12 5v14"}),e.jsx("circle",{cx:"7",cy:"5",r:"2"}),e.jsx("circle",{cx:"17",cy:"12",r:"2"}),e.jsx("circle",{cx:"7",cy:"19",r:"2"})]}),info:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"M12 11v5M12 7h.01"})]})};function Lt({kind:t,...n}){return e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:Ur[t]})}function mn({className:t="",children:n,...r}){return e.jsxs("span",{className:"tr-select-wrap",children:[e.jsx("select",{...r,className:`tr-select${t?` ${t}`:""}`,children:n}),e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})]})}function fn(t,n=!1,r=pt){return n||t.active===null?r("radar.conn.unavailable"):t.connecting?t.active?r("radar.conn.connecting"):r("radar.conn.attempted"):t.active?r("radar.conn.active"):r("radar.conn.previous")}function Un(t){return[...new Set(t.filter(n=>n.key.endsWith("ENDPOINT")).map(n=>n.value).filter(n=>/^https?:\/\//.test(n)))]}function Yr(t){return(t==null?void 0:t.status)!=="observing"?[]:[...new Set(t.connections.filter(n=>n.active===!0&&!n.connecting).map(n=>n.destination))]}function Jr(t){try{const n=new URL(t);return/^\d+\.\d+\.\d+\.\d+$/.test(n.hostname)?`${n.hostname}:${n.port||(n.protocol==="https:"?"443":"80")}`:null}catch{return null}}function Gr(t){const n=t.filter(r=>r.key==="CLAUDE_CODE_ENABLE_TELEMETRY").map(r=>r.value);return n.length?new Set(n).size>1?"conflict":n[0]==="Enabled"?"enabled":n[0]==="Disabled"?"disabled":"unknown":"unknown"}function qr(t,n=pt){const r=t.filter(i=>i.key==="CLAUDE_CODE_ENABLE_TELEMETRY"),s=r.map(i=>i.value);if(!s.length)return n("radar.state.unknown");if(new Set(s).size>1)return n("radar.state.conflict");const o=r.every(i=>i.launch);return s[0]==="Enabled"?n(o?"radar.state.enabledLaunch":"radar.state.enabledSettings"):s[0]==="Disabled"?n(o?"radar.state.disabledLaunch":"radar.state.disabledSettings"):n("radar.state.unknown")}function Xr(t){const n=t.replace(/^\uFEFF/,"").trim();if(!n)return[];let r;try{JSON.parse(n),r=[n]}catch{r=t.replace(/^\uFEFF/,"").split(/\r?\n/)}if(r.length>1e4)throw new Error(pt("radar.file.tooLong"));return r.flatMap((s,o)=>{var i;if(!s.trim())return[];try{const c=JSON.parse(s),u=c&&typeof c=="object"?c:{},m=new Set,l=[c];for(;l.length;){const a=l.pop();if(!a||typeof a!="object")continue;if(Array.isArray(a)){for(const f of a)l.push(f);continue}const p=a;for(const f of["session.id","session_id","sessionId"])typeof p[f]=="string"&&m.add(p[f]);if(["session.id","session_id"].includes(String(p.key))){const f=p.value;typeof(f==null?void 0:f.stringValue)=="string"&&m.add(f.stringValue)}for(const f of Object.values(p))l.push(f)}return[{line:o+1,raw:s,sessionIds:[...m],label:String(u.eventName??((i=u.event)==null?void 0:i.name)??u.type??u.model??pt("radar.file.jsonRecord")).slice(0,160),sessionId:typeof(u.session_id??u.sessionId??u["session.id"])=="string"?u.session_id??u.sessionId??u["session.id"]:null,timestamp:typeof u.timestamp=="string"?u.timestamp:null,valid:!0}]}catch{return[{line:o+1,raw:s,label:pt("radar.invalidJson"),sessionId:null,timestamp:null,sessionIds:[],valid:!1}]}})}function Qr(){const[t,n]=d.useState(null),[r,s]=d.useState(!1),o=d.useRef(0);return d.useEffect(()=>{let c=!0,u,m=null;const l=()=>document.visibilityState!=="hidden",a=()=>{clearTimeout(u),m==null||m.abort(),m=null},p=async()=>{if(!c||!l()||m)return;const x=new AbortController,w=o.current;m=x;try{const b=await fetch("/api/system/traffic-radar",{signal:x.signal});if(!b.ok)throw new Error("radar_unavailable");const v=await b.json();if(!v.ok)throw new Error("radar_unavailable");c&&!x.signal.aborted&&w===o.current&&(n(v),s(!1))}catch{c&&!x.signal.aborted&&w===o.current&&s(!0)}finally{m===x&&(m=null),c&&!x.signal.aborted&&l()&&(u=setTimeout(p,5e3))}},f=()=>{a(),document.visibilityState!=="hidden"&&p()};return p(),document.addEventListener("visibilitychange",f),()=>{c=!1,a(),document.removeEventListener("visibilitychange",f)}},[]),{snapshot:t,failed:r,updateConfig:c=>{o.current++,n(u=>u&&{...u,config:c})}}}function Zr(){const[t,n]=d.useState(null),[r,s]=d.useState(!1),[o,i]=d.useState(!1),[c,u]=d.useState(""),[m,l]=d.useState(null),[a,p]=d.useState(null),f=d.useRef(null),x=d.useRef(null),w=d.useRef(0);return d.useEffect(()=>{let v=!0,C,I=null;const A=()=>document.visibilityState!=="hidden",E=()=>{clearTimeout(C),I==null||I.abort(),I=null},g=async()=>{if(!v||!A()||I)return;if(f.current){C=setTimeout(g,1e3);return}const N=w.current,S=new AbortController;I=S;try{const O=await fetch("/api/system/traffic-radar/capture",{signal:S.signal});if(!O.ok)throw new Error;const T=await O.json();v&&!S.signal.aborted&&N===w.current&&(n(T),s(!1))}catch{v&&!S.signal.aborted&&N===w.current&&s(!0)}finally{I===S&&(I=null),v&&!S.signal.aborted&&A()&&(C=setTimeout(g,1e3))}},y=()=>{E(),document.visibilityState!=="hidden"&&g()};return g(),document.addEventListener("visibilitychange",y),()=>{var N;v=!1,E(),(N=x.current)==null||N.abort(),document.removeEventListener("visibilitychange",y)}},[]),{capture:t,failed:r,busy:o,pendingAction:a,error:c,permission:m,action:async v=>{if(!zn(f.current))return;w.current++,f.current=v,p(v),i(!0),u(""),v==="permission"&&l(null);const C=new AbortController;x.current=C;const I=setTimeout(()=>C.abort(),v==="permission"?3e5:2e4);try{const A=await fetch(`/api/system/traffic-radar/capture/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}",signal:C.signal}),E=await A.json();if(!A.ok)throw new nn(He(E.error)||pt("radar.srv.captureActionFailed"));v==="permission"&&l(E);const g=await fetch("/api/system/traffic-radar/capture",{signal:C.signal});g.ok&&(n(await g.json()),s(!1))}catch(A){u(rn(A,pt("radar.srv.captureActionFailed")))}finally{clearTimeout(I),x.current=null,f.current=null,p(null),i(!1)}}}}function ea({workspace:t,width:n,onCommit:r}){const s=Oe(),o=d.useRef(null),i=a=>Math.max(28,Math.min(65,a)),c=a=>{var p;return(p=t.current)==null?void 0:p.style.setProperty("--tr-feed-width",`${a}%`)},u=a=>{const p=i(a);c(p),r(p)},m=a=>{if(o.current===null||!t.current)return;const p=t.current.getBoundingClientRect();o.current=i((a.clientX-p.left)/p.width*100),c(o.current),a.currentTarget.setAttribute("aria-valuenow",String(Math.round(o.current)))},l=()=>{var p;if(o.current===null)return;const a=o.current;o.current=null,(p=t.current)==null||p.removeAttribute("data-resizing"),u(a)};return e.jsx("div",{className:"tr-splitter",role:"separator","aria-label":s("radar.splitter.label"),"aria-orientation":"vertical","aria-valuemin":28,"aria-valuemax":65,"aria-valuenow":Math.round(n),tabIndex:0,title:s("radar.splitter.hint"),onPointerDown:a=>{var p;a.button===0&&(a.preventDefault(),o.current=n,a.currentTarget.setPointerCapture(a.pointerId),(p=t.current)==null||p.setAttribute("data-resizing",""))},onPointerMove:m,onPointerUp:l,onPointerCancel:l,onLostPointerCapture:l,onDoubleClick:()=>u(34),onKeyDown:a=>{const p=a.key==="ArrowLeft"?n-(a.shiftKey?10:2):a.key==="ArrowRight"?n+(a.shiftKey?10:2):a.key==="Home"?28:a.key==="End"?65:a.key==="Enter"?34:null;p!==null&&(a.preventDefault(),u(p))}})}const an=["prompt_text","user_prompt","prompt","gen_ai.prompt","gen_ai.input.messages"],vn=["response","assistant_response","completion","gen_ai.completion","gen_ai.output.messages"],Yn=["project.name","project_name","project","workspace.name","workspace","repository.name","repo.name"],Jn=["cwd","working_directory","working.directory","process.cwd","process.working_directory","workspace.path","project.path","project_path"],St=t=>t&&typeof t=="object"&&!Array.isArray(t)?t:{},Wt=t=>Array.isArray(t)?t:[];function Bt(t){const n=St(t);for(const r of["stringValue","intValue","doubleValue","boolValue","bytesValue"])if(n[r]!==void 0)return n[r];return n.arrayValue?Wt(St(n.arrayValue).values).map(Bt):n.kvlistValue?Dt(St(n.kvlistValue).values):null}function Dt(t){return Object.fromEntries(Wt(t).map(n=>{const r=St(n);return[String(r.key),Bt(r.value)]}))}const gn=t=>typeof t=="string"&&/^(?:\[redacted\]|<redacted>|\(redacted\)|redacted)$/i.test(t.trim());function ut(t,n){const r=n.filter(o=>t[o]!==void 0&&t[o]!==null&&t[o]!==""),s=r.find(o=>!gn(t[o]))??r[0];return s?{state:gn(t[s])?"redacted":"included",key:s,value:t[s]}:{state:"absent",key:null,value:null}}function ta(t){let n=!1;const r=St(t);for(const[s,o,i]of[["resourceLogs","scopeLogs","logRecords"],["resourceSpans","scopeSpans","spans"],["resourceMetrics","scopeMetrics","metrics"]])for(const c of Wt(r[s]))for(const u of Wt(St(c)[o]))for(const m of Wt(St(u)[i])){const l=ut(Dt(St(m).attributes),an);if(l.state==="redacted"&&(n=!0),l.state==="included"){const a=(typeof l.value=="string"?l.value:JSON.stringify(l.value)).replace(/\s+/g," ").trim();if(a)return a.length>180?`${a.slice(0,180)}…`:a}}return n?pt("radar.payload.promptRedacted"):null}function na(t){const n=Dt(t.attributes);if(/error|fatal/i.test(String(t.severityText??""))||typeof t.severityNumber=="number"&&t.severityNumber>=17||ut(n,["error.message","exception.message","error","error_type"]).state!=="absent"||n.success===!1)return 0;if(ut(n,an).state!=="absent")return 1;if(ut(n,vn).state!=="absent")return 2;if(ut(n,["tool_name","tool.name","gen_ai.tool.name","model","gen_ai.request.model","cost_usd","input_tokens"]).state!=="absent")return 3;const r=String(t.eventName??t.name??n["event.name"]??"");return/^(?:claude_code[._])?(?:plugin[._]loaded|managed[._]settings[._]resolved)$/i.test(r)?4:t.body!==void 0&&Bt(t.body)!==null&&Bt(t.body)!==""?3:4}function ra(t,n){const r=ut(t,Yn),s=ut(t,Jn);if(r.state!=="absent"||s.state!=="absent")return{source:"export",project:r,directory:s};const o=ut(t,["session.id","session_id","gen_ai.conversation.id"]),i=n.filter(u=>u.id===o.value&&u.workspace);return new Set(i.map(u=>u.workspace)).size===1?{source:"local",project:{state:"included",value:i[0].project??i[0].label,key:null},directory:{state:"included",value:i[0].workspace,key:null}}:{source:"absent",project:r,directory:s}}function aa({event:t}){const n=Oe(),r=d.useRef(null),[s,o]=d.useState(null);return d.useEffect(()=>{const i=new AbortController;let c=!1;const u=()=>{c||(c=!0,fetch(`/api/system/traffic-radar/capture/event?id=${t.id}`,{signal:i.signal}).then(async l=>{if(!l.ok)return;const a=await l.json();i.signal.aborted||o(ta(a.payload))}).catch(()=>{}))},m=typeof IntersectionObserver>"u"?null:new IntersectionObserver(l=>{l.some(a=>a.isIntersecting)&&(u(),m==null||m.disconnect())},{rootMargin:"100px"});return r.current&&m?m.observe(r.current):u(),()=>{i.abort(),m==null||m.disconnect()}},[t.id,t.observedAt]),e.jsx("span",{ref:r,className:"tr-prompt-preview",children:s??n("radar.feed.preview")})}const Tt=()=>{},bn=t=>Array.isArray(t)?t:[t],et=t=>t!==null&&typeof t=="object",jn=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Gn=t=>t!=null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",qn=t=>t&&typeof t=="object"&&"type"in t&&"target"in t&&"preventDefault"in t&&typeof t.preventDefault=="function",An=(t,n)=>{if(typeof t!="string")return null;const r=n.filter(s=>s instanceof Object&&s.enum&&s.values.includes(t)&&s.matchPriority);return r.sort((s,o)=>(o.matchPriority??0)-(s.matchPriority??0)),r[0]??null},Xn=t=>{if(t!==Qn){if(t&&typeof t=="object")for(const n in t){const r=t[n],s=Xn(r);s!==r&&(t[n]=s)}return t}},Qn="__undefined__",Zn=t=>t.split(/(\.|\[\d+\])/).filter(n=>n!=="."&&n!=="").map(n=>{const r=/\[(\d+)\]/.exec(n);return r?Number(r[1]):n}),er=t=>typeof t=="string"?t:typeof t=="number"?String(t):t.reduce((n,r)=>typeof r=="number"?`${n}[${r}]`:n===""?r:`${n}.${r}`,""),nt=t=>t.length===1&&t[0]===""?"\0":t.map(n=>encodeURIComponent(String(n))).join("/"),ht=(t,n)=>t.length===n.length&&t.every((r,s)=>r===n[s]),wn=(t,n)=>t.length>=n.length&&n.every((r,s)=>r===t[s]),Pt=(t,n,r,s,o)=>{if(!s)throw new Error(o??`Invalid property path: ${n}
|
|
1
|
+
import{j as e,t as pt,r as d,ar as zn,ap as nn,as as He,o as rn,u as Oe,at as yn,a as Vr,h as un,g as $n,au as Fr,w as Br,av as Wn,G as Hr,J as zr,Q as $r,D as Wr}from"./app-CdRq5GPP.js";const Ur={radar:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M20 12a8 8 0 1 1-8-8v8l5-5"}),e.jsx("path",{d:"M12 8a4 4 0 1 0 4 4"}),e.jsx("circle",{cx:"12",cy:"12",r:"1"})]}),connection:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M8 8h8v8H8zM12 3v5M12 16v5M3 12h5M16 12h5"}),e.jsx("circle",{cx:"12",cy:"3",r:"1"}),e.jsx("circle",{cx:"21",cy:"12",r:"1"})]}),logs:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"5",y:"3",width:"14",height:"18",rx:"2"}),e.jsx("path",{d:"M9 8h6M9 12h6M9 16h3"})]}),metrics:e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 20h16M7 16v-5M12 16V4M17 16V8"})}),traces:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M7 5h10M7 12h10M7 19h10M12 5v14"}),e.jsx("circle",{cx:"7",cy:"5",r:"2"}),e.jsx("circle",{cx:"17",cy:"12",r:"2"}),e.jsx("circle",{cx:"7",cy:"19",r:"2"})]}),info:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"M12 11v5M12 7h.01"})]})};function Lt({kind:t,...n}){return e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:Ur[t]})}function mn({className:t="",children:n,...r}){return e.jsxs("span",{className:"tr-select-wrap",children:[e.jsx("select",{...r,className:`tr-select${t?` ${t}`:""}`,children:n}),e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})]})}function fn(t,n=!1,r=pt){return n||t.active===null?r("radar.conn.unavailable"):t.connecting?t.active?r("radar.conn.connecting"):r("radar.conn.attempted"):t.active?r("radar.conn.active"):r("radar.conn.previous")}function Un(t){return[...new Set(t.filter(n=>n.key.endsWith("ENDPOINT")).map(n=>n.value).filter(n=>/^https?:\/\//.test(n)))]}function Yr(t){return(t==null?void 0:t.status)!=="observing"?[]:[...new Set(t.connections.filter(n=>n.active===!0&&!n.connecting).map(n=>n.destination))]}function Jr(t){try{const n=new URL(t);return/^\d+\.\d+\.\d+\.\d+$/.test(n.hostname)?`${n.hostname}:${n.port||(n.protocol==="https:"?"443":"80")}`:null}catch{return null}}function Gr(t){const n=t.filter(r=>r.key==="CLAUDE_CODE_ENABLE_TELEMETRY").map(r=>r.value);return n.length?new Set(n).size>1?"conflict":n[0]==="Enabled"?"enabled":n[0]==="Disabled"?"disabled":"unknown":"unknown"}function qr(t,n=pt){const r=t.filter(i=>i.key==="CLAUDE_CODE_ENABLE_TELEMETRY"),s=r.map(i=>i.value);if(!s.length)return n("radar.state.unknown");if(new Set(s).size>1)return n("radar.state.conflict");const o=r.every(i=>i.launch);return s[0]==="Enabled"?n(o?"radar.state.enabledLaunch":"radar.state.enabledSettings"):s[0]==="Disabled"?n(o?"radar.state.disabledLaunch":"radar.state.disabledSettings"):n("radar.state.unknown")}function Xr(t){const n=t.replace(/^\uFEFF/,"").trim();if(!n)return[];let r;try{JSON.parse(n),r=[n]}catch{r=t.replace(/^\uFEFF/,"").split(/\r?\n/)}if(r.length>1e4)throw new Error(pt("radar.file.tooLong"));return r.flatMap((s,o)=>{var i;if(!s.trim())return[];try{const c=JSON.parse(s),u=c&&typeof c=="object"?c:{},m=new Set,l=[c];for(;l.length;){const a=l.pop();if(!a||typeof a!="object")continue;if(Array.isArray(a)){for(const f of a)l.push(f);continue}const p=a;for(const f of["session.id","session_id","sessionId"])typeof p[f]=="string"&&m.add(p[f]);if(["session.id","session_id"].includes(String(p.key))){const f=p.value;typeof(f==null?void 0:f.stringValue)=="string"&&m.add(f.stringValue)}for(const f of Object.values(p))l.push(f)}return[{line:o+1,raw:s,sessionIds:[...m],label:String(u.eventName??((i=u.event)==null?void 0:i.name)??u.type??u.model??pt("radar.file.jsonRecord")).slice(0,160),sessionId:typeof(u.session_id??u.sessionId??u["session.id"])=="string"?u.session_id??u.sessionId??u["session.id"]:null,timestamp:typeof u.timestamp=="string"?u.timestamp:null,valid:!0}]}catch{return[{line:o+1,raw:s,label:pt("radar.invalidJson"),sessionId:null,timestamp:null,sessionIds:[],valid:!1}]}})}function Qr(){const[t,n]=d.useState(null),[r,s]=d.useState(!1),o=d.useRef(0);return d.useEffect(()=>{let c=!0,u,m=null;const l=()=>document.visibilityState!=="hidden",a=()=>{clearTimeout(u),m==null||m.abort(),m=null},p=async()=>{if(!c||!l()||m)return;const x=new AbortController,w=o.current;m=x;try{const b=await fetch("/api/system/traffic-radar",{signal:x.signal});if(!b.ok)throw new Error("radar_unavailable");const v=await b.json();if(!v.ok)throw new Error("radar_unavailable");c&&!x.signal.aborted&&w===o.current&&(n(v),s(!1))}catch{c&&!x.signal.aborted&&w===o.current&&s(!0)}finally{m===x&&(m=null),c&&!x.signal.aborted&&l()&&(u=setTimeout(p,5e3))}},f=()=>{a(),document.visibilityState!=="hidden"&&p()};return p(),document.addEventListener("visibilitychange",f),()=>{c=!1,a(),document.removeEventListener("visibilitychange",f)}},[]),{snapshot:t,failed:r,updateConfig:c=>{o.current++,n(u=>u&&{...u,config:c})}}}function Zr(){const[t,n]=d.useState(null),[r,s]=d.useState(!1),[o,i]=d.useState(!1),[c,u]=d.useState(""),[m,l]=d.useState(null),[a,p]=d.useState(null),f=d.useRef(null),x=d.useRef(null),w=d.useRef(0);return d.useEffect(()=>{let v=!0,C,I=null;const A=()=>document.visibilityState!=="hidden",E=()=>{clearTimeout(C),I==null||I.abort(),I=null},g=async()=>{if(!v||!A()||I)return;if(f.current){C=setTimeout(g,1e3);return}const N=w.current,S=new AbortController;I=S;try{const O=await fetch("/api/system/traffic-radar/capture",{signal:S.signal});if(!O.ok)throw new Error;const T=await O.json();v&&!S.signal.aborted&&N===w.current&&(n(T),s(!1))}catch{v&&!S.signal.aborted&&N===w.current&&s(!0)}finally{I===S&&(I=null),v&&!S.signal.aborted&&A()&&(C=setTimeout(g,1e3))}},y=()=>{E(),document.visibilityState!=="hidden"&&g()};return g(),document.addEventListener("visibilitychange",y),()=>{var N;v=!1,E(),(N=x.current)==null||N.abort(),document.removeEventListener("visibilitychange",y)}},[]),{capture:t,failed:r,busy:o,pendingAction:a,error:c,permission:m,action:async v=>{if(!zn(f.current))return;w.current++,f.current=v,p(v),i(!0),u(""),v==="permission"&&l(null);const C=new AbortController;x.current=C;const I=setTimeout(()=>C.abort(),v==="permission"?3e5:2e4);try{const A=await fetch(`/api/system/traffic-radar/capture/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}",signal:C.signal}),E=await A.json();if(!A.ok)throw new nn(He(E.error)||pt("radar.srv.captureActionFailed"));v==="permission"&&l(E);const g=await fetch("/api/system/traffic-radar/capture",{signal:C.signal});g.ok&&(n(await g.json()),s(!1))}catch(A){u(rn(A,pt("radar.srv.captureActionFailed")))}finally{clearTimeout(I),x.current=null,f.current=null,p(null),i(!1)}}}}function ea({workspace:t,width:n,onCommit:r}){const s=Oe(),o=d.useRef(null),i=a=>Math.max(28,Math.min(65,a)),c=a=>{var p;return(p=t.current)==null?void 0:p.style.setProperty("--tr-feed-width",`${a}%`)},u=a=>{const p=i(a);c(p),r(p)},m=a=>{if(o.current===null||!t.current)return;const p=t.current.getBoundingClientRect();o.current=i((a.clientX-p.left)/p.width*100),c(o.current),a.currentTarget.setAttribute("aria-valuenow",String(Math.round(o.current)))},l=()=>{var p;if(o.current===null)return;const a=o.current;o.current=null,(p=t.current)==null||p.removeAttribute("data-resizing"),u(a)};return e.jsx("div",{className:"tr-splitter",role:"separator","aria-label":s("radar.splitter.label"),"aria-orientation":"vertical","aria-valuemin":28,"aria-valuemax":65,"aria-valuenow":Math.round(n),tabIndex:0,title:s("radar.splitter.hint"),onPointerDown:a=>{var p;a.button===0&&(a.preventDefault(),o.current=n,a.currentTarget.setPointerCapture(a.pointerId),(p=t.current)==null||p.setAttribute("data-resizing",""))},onPointerMove:m,onPointerUp:l,onPointerCancel:l,onLostPointerCapture:l,onDoubleClick:()=>u(34),onKeyDown:a=>{const p=a.key==="ArrowLeft"?n-(a.shiftKey?10:2):a.key==="ArrowRight"?n+(a.shiftKey?10:2):a.key==="Home"?28:a.key==="End"?65:a.key==="Enter"?34:null;p!==null&&(a.preventDefault(),u(p))}})}const an=["prompt_text","user_prompt","prompt","gen_ai.prompt","gen_ai.input.messages"],vn=["response","assistant_response","completion","gen_ai.completion","gen_ai.output.messages"],Yn=["project.name","project_name","project","workspace.name","workspace","repository.name","repo.name"],Jn=["cwd","working_directory","working.directory","process.cwd","process.working_directory","workspace.path","project.path","project_path"],St=t=>t&&typeof t=="object"&&!Array.isArray(t)?t:{},Wt=t=>Array.isArray(t)?t:[];function Bt(t){const n=St(t);for(const r of["stringValue","intValue","doubleValue","boolValue","bytesValue"])if(n[r]!==void 0)return n[r];return n.arrayValue?Wt(St(n.arrayValue).values).map(Bt):n.kvlistValue?Dt(St(n.kvlistValue).values):null}function Dt(t){return Object.fromEntries(Wt(t).map(n=>{const r=St(n);return[String(r.key),Bt(r.value)]}))}const gn=t=>typeof t=="string"&&/^(?:\[redacted\]|<redacted>|\(redacted\)|redacted)$/i.test(t.trim());function ut(t,n){const r=n.filter(o=>t[o]!==void 0&&t[o]!==null&&t[o]!==""),s=r.find(o=>!gn(t[o]))??r[0];return s?{state:gn(t[s])?"redacted":"included",key:s,value:t[s]}:{state:"absent",key:null,value:null}}function ta(t){let n=!1;const r=St(t);for(const[s,o,i]of[["resourceLogs","scopeLogs","logRecords"],["resourceSpans","scopeSpans","spans"],["resourceMetrics","scopeMetrics","metrics"]])for(const c of Wt(r[s]))for(const u of Wt(St(c)[o]))for(const m of Wt(St(u)[i])){const l=ut(Dt(St(m).attributes),an);if(l.state==="redacted"&&(n=!0),l.state==="included"){const a=(typeof l.value=="string"?l.value:JSON.stringify(l.value)).replace(/\s+/g," ").trim();if(a)return a.length>180?`${a.slice(0,180)}…`:a}}return n?pt("radar.payload.promptRedacted"):null}function na(t){const n=Dt(t.attributes);if(/error|fatal/i.test(String(t.severityText??""))||typeof t.severityNumber=="number"&&t.severityNumber>=17||ut(n,["error.message","exception.message","error","error_type"]).state!=="absent"||n.success===!1)return 0;if(ut(n,an).state!=="absent")return 1;if(ut(n,vn).state!=="absent")return 2;if(ut(n,["tool_name","tool.name","gen_ai.tool.name","model","gen_ai.request.model","cost_usd","input_tokens"]).state!=="absent")return 3;const r=String(t.eventName??t.name??n["event.name"]??"");return/^(?:claude_code[._])?(?:plugin[._]loaded|managed[._]settings[._]resolved)$/i.test(r)?4:t.body!==void 0&&Bt(t.body)!==null&&Bt(t.body)!==""?3:4}function ra(t,n){const r=ut(t,Yn),s=ut(t,Jn);if(r.state!=="absent"||s.state!=="absent")return{source:"export",project:r,directory:s};const o=ut(t,["session.id","session_id","gen_ai.conversation.id"]),i=n.filter(u=>u.id===o.value&&u.workspace);return new Set(i.map(u=>u.workspace)).size===1?{source:"local",project:{state:"included",value:i[0].project??i[0].label,key:null},directory:{state:"included",value:i[0].workspace,key:null}}:{source:"absent",project:r,directory:s}}function aa({event:t}){const n=Oe(),r=d.useRef(null),[s,o]=d.useState(null);return d.useEffect(()=>{const i=new AbortController;let c=!1;const u=()=>{c||(c=!0,fetch(`/api/system/traffic-radar/capture/event?id=${t.id}`,{signal:i.signal}).then(async l=>{if(!l.ok)return;const a=await l.json();i.signal.aborted||o(ta(a.payload))}).catch(()=>{}))},m=typeof IntersectionObserver>"u"?null:new IntersectionObserver(l=>{l.some(a=>a.isIntersecting)&&(u(),m==null||m.disconnect())},{rootMargin:"100px"});return r.current&&m?m.observe(r.current):u(),()=>{i.abort(),m==null||m.disconnect()}},[t.id,t.observedAt]),e.jsx("span",{ref:r,className:"tr-prompt-preview",children:s??n("radar.feed.preview")})}const Tt=()=>{},bn=t=>Array.isArray(t)?t:[t],et=t=>t!==null&&typeof t=="object",jn=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Gn=t=>t!=null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",qn=t=>t&&typeof t=="object"&&"type"in t&&"target"in t&&"preventDefault"in t&&typeof t.preventDefault=="function",An=(t,n)=>{if(typeof t!="string")return null;const r=n.filter(s=>s instanceof Object&&s.enum&&s.values.includes(t)&&s.matchPriority);return r.sort((s,o)=>(o.matchPriority??0)-(s.matchPriority??0)),r[0]??null},Xn=t=>{if(t!==Qn){if(t&&typeof t=="object")for(const n in t){const r=t[n],s=Xn(r);s!==r&&(t[n]=s)}return t}},Qn="__undefined__",Zn=t=>t.split(/(\.|\[\d+\])/).filter(n=>n!=="."&&n!=="").map(n=>{const r=/\[(\d+)\]/.exec(n);return r?Number(r[1]):n}),er=t=>typeof t=="string"?t:typeof t=="number"?String(t):t.reduce((n,r)=>typeof r=="number"?`${n}[${r}]`:n===""?r:`${n}.${r}`,""),nt=t=>t.length===1&&t[0]===""?"\0":t.map(n=>encodeURIComponent(String(n))).join("/"),ht=(t,n)=>t.length===n.length&&t.every((r,s)=>r===n[s]),wn=(t,n)=>t.length>=n.length&&n.every((r,s)=>r===t[s]),Pt=(t,n,r,s,o)=>{if(!s)throw new Error(o??`Invalid property path: ${n}
|
|
2
2
|
Couldn't access "${r}" in ${JSON.stringify(t)}`)},Xt=t=>Array.isArray(t),tr=(t,n)=>t.filter((r,s)=>s!==n),sa=(t,n,r,s={})=>{const{remove:o=!1,createNew:i=!0,noError:c=!1}=s,u=t,m=er(n),l={...s,remove:o,createNew:i,noError:c,fullData:u,fullPath:m},a=Array.isArray(n)?n:Zn(n);return Xt(t)&&o&&a.length===1?tr(t,a[0]):$t(t,a,r,l)},$t=(t,n,r,s)=>{const o=jn(t)?{...t}:null,i=Xt(t)?[...t]:null;if(n.length===0)return t;if(!o&&!i)throw new Error("Can't assign property -- invalid input object");const{createNew:c,remove:u,noError:m,fullData:l,fullPath:a}=s,p=n[0];if(i&&typeof p=="string")return i.map(b=>$t(b,n,r,s));if(n.length===1)return o&&typeof p=="string"?oa(o,p,r,s)??o:i&&typeof p=="number"?(ia(i,p,r,s),i):(Pt(l,a,p,m),t);const f=o||i||[];if(u&&n.length===2&&typeof n[1]=="number"){const b=f[p],v=n[1];return Xt(b)?f[p]=tr(b,v):Pt(l,a,p,m,"Trying to remove an indexed item from an object that is not an array"),f}const x=n.slice(1);if(p in t){if(w=f[p],!Xt(w)&&!jn(w)){if(!c)return Pt(l,a,p,m),f;f[p]={}}return f[p]=$t(f[p],x,r,s),f}var w;if(c){const b=typeof x[0]=="number"?[]:{};if(o)return f[p]=b,f[p]=$t(f[p],x,r,s),f;if(i&&Array.isArray(f)){f.push(b);const v=f.length-1;return f[v]=$t(f[v],x,r,s),f}}return Pt(l,a,p,m),f},oa=(t,n,r,s)=>{const{remove:o,createNew:i,noError:c,insertAfter:u,insertBefore:m,fullData:l,fullPath:a}=s;if(m!==void 0||u!==void 0){const f=Object.entries(t);let x;return x=typeof m=="number"?m:typeof u=="number"?u:f.findIndex(([w])=>w===(m??u)),u!==void 0&&x++,f.splice(x,0,[n,r]),Object.fromEntries(f)}const p=n in t;o?p?delete t[n]:Pt(l,a,n,c):i||p?t[n]=r:Pt(l,a,n,c)},ia=(t,n,r,s)=>{const{noError:o,fullData:i,fullPath:c,createNew:u,insert:m}=s;m&&t.splice(n,0,r),n in t?t[n]=r:u?t.push(r):Pt(i,c,n,o)},tt=(t,n,r)=>{const s=Array.isArray(n)?n:Zn(n);if(s.length===0)return t;const o=s[0];if(Array.isArray(t)&&typeof o!="number"&&t.length>0)return t.map(c=>tt(c,s,r));if(typeof t!="object"||t===null||!(o in t))return la(t,o,r);const i=t[o];return s.length===1?i:tt(i,s.slice(1),r)},la=(t,n,r)=>{if(r===void 0)throw new Error(`Unable to extract object property
|
|
3
3
|
Looking for property: ${n}
|
|
4
4
|
In object: ${JSON.stringify(t)}`);return r},wt=(t,n,r="",s)=>{if(n.length===0)return{key:r,path:[],level:0,index:0,value:t,size:et(t)?Object.keys(t).length:1,parentData:null,fullData:t};const o=n[n.length-1],i=tt(t,n),c=tt(t,n.slice(0,-1))??null;let u=0;if(Array.isArray(c))u=typeof o=="number"?o:Number(o);else if(c&&typeof c=="object"){const m=Object.entries(c);s==null||s(m,l=>l),u=m.findIndex(([l])=>l===o)}return{key:o,path:n,level:n.length,index:u,value:i,size:et(i)?Object.keys(i).length:null,parentData:c,fullData:t}},nr=typeof window<"u"?d.useLayoutEffect:d.useEffect,rr=({className:t,name:n,value:r,setValue:s,onKeyDown:o,styles:i,textAreaRef:c})=>{const u=d.useRef(null);if(nr(()=>{const l=u.current;u.current=null;const a=c==null?void 0:c.current;if(!l||!a)return;const p=l.start+r.length-l.sourceLength,f=Math.max(0,Math.min(p,r.length));a.selectionStart!==f&&a.setSelectionRange(f,f)},[r,c]),typeof r!="string")return null;const m=r.slice(-1)===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a8 as I,a9 as J,g as ls,r as h,s as cs,aa as us,u as Q,ab as S,j as s,ac as N,ad as K,ae as X,af as f,G as ds,J as hs,ag as ms,ah as gs,Q as ps,ai as fs,R as xs,k as H,aj as js}from"./app-DiIDGQPy.js";function Ns(t){return!t.answer||t.answer.range!==t.want?{phase:"busy",stale:!1}:t.answer.ok?{phase:t.answer.days>0?"chart":"empty",stale:t.loading}:{phase:"error",stale:t.loading}}function Y(t){const e=new Map;for(const a of t)for(const o of a.agents??[]){if(!o||typeof o.agent!="string"||o.agent==="")continue;const l=e.get(o.agent)??{id:o.agent,cost:0,tokens:0};l.cost+=Number.isFinite(o.totalCost)?o.totalCost:0,l.tokens+=Number.isFinite(o.totalTokens)?o.totalTokens:0,e.set(o.agent,l)}return[...e.values()].sort((a,o)=>o.cost-a.cost||a.id.localeCompare(o.id))}function ks(t){const e=Y([{agents:t}]);return e.length<2?null:e.map(a=>`${I(a.id)} ${J(a.cost)}`).join(" · ")}function V(t){switch(t.toLowerCase()){case"claude":return"var(--model-opus)";case"codex":return"var(--model-codex)";case"gemini":return"var(--model-gemini)";case"copilot":return"var(--model-haiku)";default:return"var(--model-other)"}}function bs(t,e){if(!(e>0)||!(t>0))return"0%";const a=t/e*100;return a<.1?"<0.1%":`${a.toFixed(1)}%`}const g=t=>typeof t=="number"&&Number.isFinite(t)?t:0,M=t=>typeof t=="string"?t:"",W=t=>Array.isArray(t)?t.filter(e=>typeof e=="string"):[];function ys(t){const e=t??{};return{modelName:M(e.modelName),cost:g(e.cost),...typeof e.missingPricing=="boolean"?{missingPricing:e.missingPricing}:{},...typeof e.storedCost=="number"&&Number.isFinite(e.storedCost)&&e.storedCost>=0?{storedCost:Math.min(e.storedCost,Math.max(0,g(e.cost)))}:{},inputTokens:g(e.inputTokens),outputTokens:g(e.outputTokens),cacheCreationTokens:g(e.cacheCreationTokens),cacheReadTokens:g(e.cacheReadTokens)}}function Cs(t){const e=t??{},a=Array.isArray(e.agents)?e.agents.map(o=>{const l=o??{};return{agent:M(l.agent),totalCost:g(l.totalCost),totalTokens:g(l.totalTokens)}}):void 0;return{period:M(e.period),totalCost:g(e.totalCost),totalTokens:g(e.totalTokens),inputTokens:g(e.inputTokens),outputTokens:g(e.outputTokens),cacheCreationTokens:g(e.cacheCreationTokens),cacheReadTokens:g(e.cacheReadTokens),modelsUsed:W(e.modelsUsed),modelBreakdowns:Array.isArray(e.modelBreakdowns)?e.modelBreakdowns.map(ys):[],...a?{agents:a}:{},...e.metadata&&typeof e.metadata=="object"?{metadata:{agents:W(e.metadata.agents)}}:{}}}function vs(t){const e=t??{};return{...e,ok:e.ok===!0,days:Array.isArray(e.days)?e.days.map(Cs):void 0}}function $(t){const e=t.toLowerCase();return e.includes("opus")?"var(--model-opus)":e.includes("sonnet")?"var(--model-sonnet)":e.includes("haiku")?"var(--model-haiku)":e.includes("gpt-5")||e.includes("gpt5")?"var(--model-gpt5)":e.includes("gpt")?"var(--model-gpt)":e.includes("gemini")?"var(--model-gemini)":e.includes("codex")?"var(--model-codex)":e.includes("fable")||e.includes("mythos")?"var(--model-fable)":"var(--model-other)"}function Ts(t){let e=0,a=0,o=0,l=0;const p=new Map,r=new Set;let i=null;for(const u of t){e+=u.totalCost,a+=u.totalTokens,o+=u.inputTokens+u.outputTokens,l+=u.cacheReadTokens;for(const m of u.modelBreakdowns)p.set(m.modelName,(p.get(m.modelName)??0)+m.cost),m.missingPricing&&r.add(m.modelName),m.storedCost!==void 0&&(i=(i??0)+m.storedCost)}return{totalCost:e,totalTok:a,inOut:o,cacheRead:l,modelCosts:p,missingModels:r,storedCost:i}}function ws(t){return Array.from(t.entries()).sort((e,a)=>a[1]-e[1])}function Z(t){return t.slice().sort((e,a)=>a.cost-e.cost)}function v(t,e){return e>0?t/e*100:0}function Rs(t){var a,o;return ks(t.agents)??((o=(a=t.metadata)==null?void 0:a.agents)!=null&&o.length?t.metadata.agents.join(" · "):null)}function Ss(t){return t<=14?1:t<=31?2:7}function Ms(t){return t>0?t<1?"<$1":`$${Math.round(t).toLocaleString("en-US")}`:""}function $s(t){const e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);return e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])).toLocaleDateString(ls(),{weekday:"short"}):t}function Ls(){let t=0;return{begin(){const e=++t;return()=>e===t},cancel(){t++}}}function Ps(t){const[e,a]=h.useState(null),[o,l]=h.useState(!1),p=h.useState(Ls)[0],r=h.useRef(!1),i=(u=!1)=>{if(u&&!cs(r.current))return;const m=p.begin();r.current=u;const x=t;l(!0);const T=`/api/ccusage?since=${us(x)}${u?"&refresh=1":""}`;fetch(T).then(c=>c.json()).then(c=>{m()&&a({range:x,resp:vs(c)})}).catch(()=>{m()&&a({range:x,resp:{ok:!1,reason:"unreachable"}})}).finally(()=>{m()&&(r.current=!1,l(!1))})};return h.useEffect(()=>(i(!1),()=>p.cancel()),[t]),{landed:e,loading:o,reload:()=>i(!0)}}function As({selectedDay:t}){const e=Q(),a=Rs(t),o=t.modelBreakdowns.some(r=>r.missingPricing),l=t.modelBreakdowns.filter(r=>r.storedCost!==void 0),p=S(l.length?l.reduce((r,i)=>r+i.storedCost,0):null,t.totalCost);return s.jsxs("div",{className:"uh-detail",children:[s.jsxs("div",{className:"uh-detail-head",children:[s.jsx("span",{className:"uh-detail-date",children:t.period}),s.jsx("span",{className:"uh-detail-cost",children:N(t.totalCost,o)}),a&&s.jsx("span",{className:"uh-detail-agents",title:a,children:a})]}),o&&s.jsx("p",{className:"uh-cost-note",children:K()}),p&&s.jsx("p",{className:"uh-cost-note",children:p}),s.jsxs("table",{className:"uh-day-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:e("insights.usage.model")}),s.jsx("th",{scope:"col",children:e("insights.cost.inputTitle")}),s.jsx("th",{scope:"col",children:e("insights.cost.outputTitle")}),s.jsx("th",{scope:"col",children:e("insights.usage.cost")})]})}),s.jsx("tbody",{children:Z(t.modelBreakdowns).map(r=>{const i=v(r.cost,t.totalCost);return s.jsxs("tr",{title:r.modelName,children:[s.jsx("th",{scope:"row",children:s.jsxs("span",{className:"uh-model-name",children:[s.jsx("span",{className:"uh-legend-dot",style:{background:$(r.modelName)}}),s.jsx("span",{className:"uh-model-label",children:X(r.modelName)}),s.jsxs("span",{className:"uh-model-share",children:[Math.round(i),"%"]})]})}),s.jsx("td",{children:f(r.inputTokens)}),s.jsx("td",{children:f(r.outputTokens)}),s.jsx("td",{children:N(r.cost,r.missingPricing)})]},r.modelName)})}),t.modelBreakdowns.length>1&&s.jsx("tfoot",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"row",children:e("insights.usage.dayTotal")}),s.jsx("td",{children:f(t.inputTokens)}),s.jsx("td",{children:f(t.outputTokens)}),s.jsx("td",{children:N(t.totalCost,o)})]})})]}),s.jsxs("div",{className:"uh-detail-mini",children:[s.jsx(q,{label:e("insights.usage.cacheWrite"),val:f(t.cacheCreationTokens)}),s.jsx(q,{label:e("insights.usage.cacheRead"),val:f(t.cacheReadTokens)})]})]})}function q({label:t,val:e}){return s.jsxs("span",{className:"uh-ministat",children:[s.jsx("span",{className:"uh-ministat-label",children:t}),s.jsx("span",{className:"uh-ministat-val",children:e})]})}const Bs=[7,14,30,90];function Es({onClose:t,providers:e}){var G;const a=Q(),[o,l]=h.useState(30),[p,r]=h.useState(null),{landed:i,loading:u,reload:m}=Ps(o),x=h.useRef(null),L=ds(t,{focusRef:x}),T=hs(t),c=Ns({loading:u,want:o,answer:i&&{range:i.range,ok:i.resp.ok===!0,days:((G=i.resp.days)==null?void 0:G.length)??0}}),d=c.phase==="chart"?i.resp.days??[]:[],P=h.useRef(null),_=ms(c.phase!=="error",P),D=h.useMemo(()=>d.reduce((n,j)=>Math.max(n,j.totalCost),0),[d]),A=h.useRef(null);h.useLayoutEffect(()=>{const n=A.current;n&&(n.scrollLeft=n.scrollWidth)},[d]);const{totalCost:k,totalTok:ss,inOut:es,cacheRead:ts,modelCosts:B,missingModels:w,storedCost:F}=h.useMemo(()=>Ts(d),[d]),as=h.useMemo(()=>ws(B),[B]),y=h.useMemo(()=>Y(d),[d]),ns=y.length>1,E=p?d.find(n=>n.period===p)??null:null,os=Ss(d.length),O=d.length>0&&d.length<=14,U=c.phase==="error"?gs(i.resp,a("insights.usage.noReport")):"";return s.jsxs(ps,{scrim:T,dialogRef:L,className:"uh-modal","aria-label":a("insights.usage.title"),children:[s.jsxs("header",{className:"modal-head",children:[s.jsx("div",{className:"modal-tool-name",children:a("insights.usage.title")}),s.jsx("div",{className:"modal-actions",children:s.jsx("button",{ref:x,className:"glyph-btn uh-close",onClick:t,"aria-label":a("insights.usage.close"),children:"×"})})]}),s.jsxs("div",{className:"modal-body uh-body",children:[s.jsxs("div",{className:"uh-toolbar",children:[s.jsx("div",{className:"uh-range",role:"group","aria-label":a("insights.usage.range"),children:Bs.map(n=>s.jsx("button",{type:"button","aria-pressed":o===n,className:"uh-range-btn",onClick:()=>{l(n),r(null)},children:a("insights.usage.days",{n})},n))}),s.jsx("div",{className:"uh-source",children:s.jsx("span",{className:"uh-sub",children:c.stale?a("insights.usage.running"):fs(e,y.map(n=>n.id))})}),s.jsx("button",{ref:P,className:"glyph-btn uh-reload",onClick:m,...H(u),title:a("insights.usage.rerun"),"aria-label":a("insights.usage.reload"),children:s.jsx(xs,{})})]}),c.phase==="busy"?s.jsxs("div",{className:"uh-status uh-status-wait",role:"status","aria-label":a("insights.usage.reading"),"aria-busy":"true",children:[s.jsx("strong",{className:"uh-reading-title",children:a("insights.usage.reading")}),s.jsxs("span",{className:"uh-reading-note",children:[a("insights.usage.gathering"),!i&&` ${a("insights.usage.firstRun")}`]}),s.jsx("span",{className:"uh-skeleton","aria-hidden":"true",children:[0,1].map(n=>s.jsxs("span",{className:"uh-skel-row",children:[s.jsx("i",{className:"uh-skel-dot"}),s.jsx("i",{className:"uh-skel-bar"}),s.jsx("i",{className:"uh-skel-bar uh-skel-end"})]},n))})]}):c.phase==="error"?s.jsxs("div",{className:"uh-status uh-err",role:"alert",title:js(i.resp)||void 0,children:[s.jsx("strong",{className:"uh-err-title",children:a("insights.usage.noReport")}),s.jsx("span",{className:"uh-err-hint",children:a("insights.usage.checkHint")}),U!==a("insights.usage.noReport")&&s.jsx("span",{className:"uh-err-reason",children:U})]}):c.phase==="empty"?s.jsx("div",{className:`uh-status${c.stale?" uh-stale":""}`,"aria-busy":c.stale||void 0,children:a("insights.usage.empty")}):s.jsxs("div",{className:c.stale?"uh-loaded uh-stale":"uh-loaded","aria-busy":c.stale||void 0,children:[s.jsxs("div",{className:"uh-totals",children:[s.jsx(C,{label:a("insights.usage.totalCost"),val:N(k,w.size>0)}),s.jsx(C,{label:a("insights.usage.tokens"),val:f(ss)}),s.jsx(C,{label:a("insights.usage.inOut"),val:f(es)}),s.jsx(C,{label:a("insights.usage.cacheReads"),val:f(ts)})]}),w.size>0&&s.jsx("p",{className:"uh-cost-note",children:K()}),S(F,k)&&s.jsx("p",{className:"uh-cost-note",children:S(F,k)}),ns&&s.jsxs("div",{className:"uh-agents",role:"group","aria-label":a("insights.usage.byCli"),children:[s.jsx("div",{className:"uh-agent-bar","aria-hidden":"true",children:y.map(n=>s.jsx("span",{className:"uh-agent-seg",style:{width:`${v(n.cost,k)}%`,background:V(n.id)}},n.id))}),s.jsx("div",{className:"uh-agent-keys",children:y.map(n=>s.jsxs("span",{className:"uh-agent-key",title:a("insights.usage.agentTokens",{id:n.id,tokens:f(n.tokens)}),children:[s.jsx("span",{className:"uh-legend-dot",style:{background:V(n.id)}}),I(n.id),s.jsx("span",{className:"uh-agent-cost",children:J(n.cost)}),s.jsx("span",{className:"uh-agent-share",children:bs(n.cost,k)})]},n.id))})]}),s.jsx("div",{ref:A,className:"uh-chart",role:"group","aria-label":a("insights.usage.daily"),children:d.map((n,j)=>{const rs=v(n.totalCost,D),R=n.period===p,z=`${n.period}, ${N(n.totalCost,n.modelBreakdowns.some(b=>b.missingPricing))}`;return s.jsxs("button",{className:`uh-bar-col${R?" sel":""}`,onClick:()=>r(R?null:n.period),"aria-pressed":R,"aria-label":z,title:z,style:{flexBasis:`${100/d.length}%`,"--uh-i":j,"--uh-step":`${Math.min(10,160/Math.max(d.length,1))}ms`},children:[s.jsxs("span",{className:"uh-bar-plot",children:[O&&n.totalCost>0&&s.jsx("span",{className:"uh-bar-value","aria-hidden":"true",children:Ms(n.totalCost)}),s.jsx("span",{className:"uh-bar",style:{"--uh-h":Math.max(rs,n.totalCost>0?2:0)/100},children:Z(n.modelBreakdowns).map(b=>{const is=v(b.cost,n.totalCost);return s.jsx("span",{className:"uh-bar-seg",style:{height:`${is}%`,background:$(b.modelName)}},b.modelName)})})]}),s.jsx("span",{className:"uh-bar-label","aria-hidden":"true",children:(d.length-1-j)%os===0?O?$s(n.period):n.period.slice(5):""})]},n.period)})}),s.jsx("div",{className:"uh-legend",children:as.map(([n,j])=>s.jsxs("span",{className:"uh-legend-item",title:n,children:[s.jsx("span",{className:"uh-legend-dot",style:{background:$(n)}}),X(n)," ",s.jsx("span",{className:"uh-legend-cost",children:N(j,w.has(n))})]},n))}),E&&s.jsx(As,{selectedDay:E})]})]}),c.phase==="error"?s.jsx("footer",{className:"modal-foot",children:s.jsx("button",{className:"btn primary uh-retry",onClick:()=>{_(),m()},...H(u),children:a(u?"insights.usage.trying":"insights.audit.tryAgain")})}):s.jsx("footer",{className:"modal-foot",children:s.jsx("button",{type:"button",className:"btn primary",onClick:t,children:a("shell.done")})})]})}function C({label:t,val:e}){return s.jsxs("div",{className:"uh-stat",children:[s.jsx("span",{className:"uh-stat-val",children:e}),s.jsx("span",{className:"uh-stat-label",children:t})]})}export{Es as default};
|
|
1
|
+
import{a8 as I,a9 as J,g as ls,r as h,s as cs,aa as us,u as Q,ab as S,j as s,ac as N,ad as K,ae as X,af as f,G as ds,J as hs,ag as ms,ah as gs,Q as ps,ai as fs,R as xs,k as H,aj as js}from"./app-CdRq5GPP.js";function Ns(t){return!t.answer||t.answer.range!==t.want?{phase:"busy",stale:!1}:t.answer.ok?{phase:t.answer.days>0?"chart":"empty",stale:t.loading}:{phase:"error",stale:t.loading}}function Y(t){const e=new Map;for(const a of t)for(const o of a.agents??[]){if(!o||typeof o.agent!="string"||o.agent==="")continue;const l=e.get(o.agent)??{id:o.agent,cost:0,tokens:0};l.cost+=Number.isFinite(o.totalCost)?o.totalCost:0,l.tokens+=Number.isFinite(o.totalTokens)?o.totalTokens:0,e.set(o.agent,l)}return[...e.values()].sort((a,o)=>o.cost-a.cost||a.id.localeCompare(o.id))}function ks(t){const e=Y([{agents:t}]);return e.length<2?null:e.map(a=>`${I(a.id)} ${J(a.cost)}`).join(" · ")}function V(t){switch(t.toLowerCase()){case"claude":return"var(--model-opus)";case"codex":return"var(--model-codex)";case"gemini":return"var(--model-gemini)";case"copilot":return"var(--model-haiku)";default:return"var(--model-other)"}}function bs(t,e){if(!(e>0)||!(t>0))return"0%";const a=t/e*100;return a<.1?"<0.1%":`${a.toFixed(1)}%`}const g=t=>typeof t=="number"&&Number.isFinite(t)?t:0,M=t=>typeof t=="string"?t:"",W=t=>Array.isArray(t)?t.filter(e=>typeof e=="string"):[];function ys(t){const e=t??{};return{modelName:M(e.modelName),cost:g(e.cost),...typeof e.missingPricing=="boolean"?{missingPricing:e.missingPricing}:{},...typeof e.storedCost=="number"&&Number.isFinite(e.storedCost)&&e.storedCost>=0?{storedCost:Math.min(e.storedCost,Math.max(0,g(e.cost)))}:{},inputTokens:g(e.inputTokens),outputTokens:g(e.outputTokens),cacheCreationTokens:g(e.cacheCreationTokens),cacheReadTokens:g(e.cacheReadTokens)}}function Cs(t){const e=t??{},a=Array.isArray(e.agents)?e.agents.map(o=>{const l=o??{};return{agent:M(l.agent),totalCost:g(l.totalCost),totalTokens:g(l.totalTokens)}}):void 0;return{period:M(e.period),totalCost:g(e.totalCost),totalTokens:g(e.totalTokens),inputTokens:g(e.inputTokens),outputTokens:g(e.outputTokens),cacheCreationTokens:g(e.cacheCreationTokens),cacheReadTokens:g(e.cacheReadTokens),modelsUsed:W(e.modelsUsed),modelBreakdowns:Array.isArray(e.modelBreakdowns)?e.modelBreakdowns.map(ys):[],...a?{agents:a}:{},...e.metadata&&typeof e.metadata=="object"?{metadata:{agents:W(e.metadata.agents)}}:{}}}function vs(t){const e=t??{};return{...e,ok:e.ok===!0,days:Array.isArray(e.days)?e.days.map(Cs):void 0}}function $(t){const e=t.toLowerCase();return e.includes("opus")?"var(--model-opus)":e.includes("sonnet")?"var(--model-sonnet)":e.includes("haiku")?"var(--model-haiku)":e.includes("gpt-5")||e.includes("gpt5")?"var(--model-gpt5)":e.includes("gpt")?"var(--model-gpt)":e.includes("gemini")?"var(--model-gemini)":e.includes("codex")?"var(--model-codex)":e.includes("fable")||e.includes("mythos")?"var(--model-fable)":"var(--model-other)"}function Ts(t){let e=0,a=0,o=0,l=0;const p=new Map,r=new Set;let i=null;for(const u of t){e+=u.totalCost,a+=u.totalTokens,o+=u.inputTokens+u.outputTokens,l+=u.cacheReadTokens;for(const m of u.modelBreakdowns)p.set(m.modelName,(p.get(m.modelName)??0)+m.cost),m.missingPricing&&r.add(m.modelName),m.storedCost!==void 0&&(i=(i??0)+m.storedCost)}return{totalCost:e,totalTok:a,inOut:o,cacheRead:l,modelCosts:p,missingModels:r,storedCost:i}}function ws(t){return Array.from(t.entries()).sort((e,a)=>a[1]-e[1])}function Z(t){return t.slice().sort((e,a)=>a.cost-e.cost)}function v(t,e){return e>0?t/e*100:0}function Rs(t){var a,o;return ks(t.agents)??((o=(a=t.metadata)==null?void 0:a.agents)!=null&&o.length?t.metadata.agents.join(" · "):null)}function Ss(t){return t<=14?1:t<=31?2:7}function Ms(t){return t>0?t<1?"<$1":`$${Math.round(t).toLocaleString("en-US")}`:""}function $s(t){const e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);return e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])).toLocaleDateString(ls(),{weekday:"short"}):t}function Ls(){let t=0;return{begin(){const e=++t;return()=>e===t},cancel(){t++}}}function Ps(t){const[e,a]=h.useState(null),[o,l]=h.useState(!1),p=h.useState(Ls)[0],r=h.useRef(!1),i=(u=!1)=>{if(u&&!cs(r.current))return;const m=p.begin();r.current=u;const x=t;l(!0);const T=`/api/ccusage?since=${us(x)}${u?"&refresh=1":""}`;fetch(T).then(c=>c.json()).then(c=>{m()&&a({range:x,resp:vs(c)})}).catch(()=>{m()&&a({range:x,resp:{ok:!1,reason:"unreachable"}})}).finally(()=>{m()&&(r.current=!1,l(!1))})};return h.useEffect(()=>(i(!1),()=>p.cancel()),[t]),{landed:e,loading:o,reload:()=>i(!0)}}function As({selectedDay:t}){const e=Q(),a=Rs(t),o=t.modelBreakdowns.some(r=>r.missingPricing),l=t.modelBreakdowns.filter(r=>r.storedCost!==void 0),p=S(l.length?l.reduce((r,i)=>r+i.storedCost,0):null,t.totalCost);return s.jsxs("div",{className:"uh-detail",children:[s.jsxs("div",{className:"uh-detail-head",children:[s.jsx("span",{className:"uh-detail-date",children:t.period}),s.jsx("span",{className:"uh-detail-cost",children:N(t.totalCost,o)}),a&&s.jsx("span",{className:"uh-detail-agents",title:a,children:a})]}),o&&s.jsx("p",{className:"uh-cost-note",children:K()}),p&&s.jsx("p",{className:"uh-cost-note",children:p}),s.jsxs("table",{className:"uh-day-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:e("insights.usage.model")}),s.jsx("th",{scope:"col",children:e("insights.cost.inputTitle")}),s.jsx("th",{scope:"col",children:e("insights.cost.outputTitle")}),s.jsx("th",{scope:"col",children:e("insights.usage.cost")})]})}),s.jsx("tbody",{children:Z(t.modelBreakdowns).map(r=>{const i=v(r.cost,t.totalCost);return s.jsxs("tr",{title:r.modelName,children:[s.jsx("th",{scope:"row",children:s.jsxs("span",{className:"uh-model-name",children:[s.jsx("span",{className:"uh-legend-dot",style:{background:$(r.modelName)}}),s.jsx("span",{className:"uh-model-label",children:X(r.modelName)}),s.jsxs("span",{className:"uh-model-share",children:[Math.round(i),"%"]})]})}),s.jsx("td",{children:f(r.inputTokens)}),s.jsx("td",{children:f(r.outputTokens)}),s.jsx("td",{children:N(r.cost,r.missingPricing)})]},r.modelName)})}),t.modelBreakdowns.length>1&&s.jsx("tfoot",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"row",children:e("insights.usage.dayTotal")}),s.jsx("td",{children:f(t.inputTokens)}),s.jsx("td",{children:f(t.outputTokens)}),s.jsx("td",{children:N(t.totalCost,o)})]})})]}),s.jsxs("div",{className:"uh-detail-mini",children:[s.jsx(q,{label:e("insights.usage.cacheWrite"),val:f(t.cacheCreationTokens)}),s.jsx(q,{label:e("insights.usage.cacheRead"),val:f(t.cacheReadTokens)})]})]})}function q({label:t,val:e}){return s.jsxs("span",{className:"uh-ministat",children:[s.jsx("span",{className:"uh-ministat-label",children:t}),s.jsx("span",{className:"uh-ministat-val",children:e})]})}const Bs=[7,14,30,90];function Es({onClose:t,providers:e}){var G;const a=Q(),[o,l]=h.useState(30),[p,r]=h.useState(null),{landed:i,loading:u,reload:m}=Ps(o),x=h.useRef(null),L=ds(t,{focusRef:x}),T=hs(t),c=Ns({loading:u,want:o,answer:i&&{range:i.range,ok:i.resp.ok===!0,days:((G=i.resp.days)==null?void 0:G.length)??0}}),d=c.phase==="chart"?i.resp.days??[]:[],P=h.useRef(null),_=ms(c.phase!=="error",P),D=h.useMemo(()=>d.reduce((n,j)=>Math.max(n,j.totalCost),0),[d]),A=h.useRef(null);h.useLayoutEffect(()=>{const n=A.current;n&&(n.scrollLeft=n.scrollWidth)},[d]);const{totalCost:k,totalTok:ss,inOut:es,cacheRead:ts,modelCosts:B,missingModels:w,storedCost:F}=h.useMemo(()=>Ts(d),[d]),as=h.useMemo(()=>ws(B),[B]),y=h.useMemo(()=>Y(d),[d]),ns=y.length>1,E=p?d.find(n=>n.period===p)??null:null,os=Ss(d.length),O=d.length>0&&d.length<=14,U=c.phase==="error"?gs(i.resp,a("insights.usage.noReport")):"";return s.jsxs(ps,{scrim:T,dialogRef:L,className:"uh-modal","aria-label":a("insights.usage.title"),children:[s.jsxs("header",{className:"modal-head",children:[s.jsx("div",{className:"modal-tool-name",children:a("insights.usage.title")}),s.jsx("div",{className:"modal-actions",children:s.jsx("button",{ref:x,className:"glyph-btn uh-close",onClick:t,"aria-label":a("insights.usage.close"),children:"×"})})]}),s.jsxs("div",{className:"modal-body uh-body",children:[s.jsxs("div",{className:"uh-toolbar",children:[s.jsx("div",{className:"uh-range",role:"group","aria-label":a("insights.usage.range"),children:Bs.map(n=>s.jsx("button",{type:"button","aria-pressed":o===n,className:"uh-range-btn",onClick:()=>{l(n),r(null)},children:a("insights.usage.days",{n})},n))}),s.jsx("div",{className:"uh-source",children:s.jsx("span",{className:"uh-sub",children:c.stale?a("insights.usage.running"):fs(e,y.map(n=>n.id))})}),s.jsx("button",{ref:P,className:"glyph-btn uh-reload",onClick:m,...H(u),title:a("insights.usage.rerun"),"aria-label":a("insights.usage.reload"),children:s.jsx(xs,{})})]}),c.phase==="busy"?s.jsxs("div",{className:"uh-status uh-status-wait",role:"status","aria-label":a("insights.usage.reading"),"aria-busy":"true",children:[s.jsx("strong",{className:"uh-reading-title",children:a("insights.usage.reading")}),s.jsxs("span",{className:"uh-reading-note",children:[a("insights.usage.gathering"),!i&&` ${a("insights.usage.firstRun")}`]}),s.jsx("span",{className:"uh-skeleton","aria-hidden":"true",children:[0,1].map(n=>s.jsxs("span",{className:"uh-skel-row",children:[s.jsx("i",{className:"uh-skel-dot"}),s.jsx("i",{className:"uh-skel-bar"}),s.jsx("i",{className:"uh-skel-bar uh-skel-end"})]},n))})]}):c.phase==="error"?s.jsxs("div",{className:"uh-status uh-err",role:"alert",title:js(i.resp)||void 0,children:[s.jsx("strong",{className:"uh-err-title",children:a("insights.usage.noReport")}),s.jsx("span",{className:"uh-err-hint",children:a("insights.usage.checkHint")}),U!==a("insights.usage.noReport")&&s.jsx("span",{className:"uh-err-reason",children:U})]}):c.phase==="empty"?s.jsx("div",{className:`uh-status${c.stale?" uh-stale":""}`,"aria-busy":c.stale||void 0,children:a("insights.usage.empty")}):s.jsxs("div",{className:c.stale?"uh-loaded uh-stale":"uh-loaded","aria-busy":c.stale||void 0,children:[s.jsxs("div",{className:"uh-totals",children:[s.jsx(C,{label:a("insights.usage.totalCost"),val:N(k,w.size>0)}),s.jsx(C,{label:a("insights.usage.tokens"),val:f(ss)}),s.jsx(C,{label:a("insights.usage.inOut"),val:f(es)}),s.jsx(C,{label:a("insights.usage.cacheReads"),val:f(ts)})]}),w.size>0&&s.jsx("p",{className:"uh-cost-note",children:K()}),S(F,k)&&s.jsx("p",{className:"uh-cost-note",children:S(F,k)}),ns&&s.jsxs("div",{className:"uh-agents",role:"group","aria-label":a("insights.usage.byCli"),children:[s.jsx("div",{className:"uh-agent-bar","aria-hidden":"true",children:y.map(n=>s.jsx("span",{className:"uh-agent-seg",style:{width:`${v(n.cost,k)}%`,background:V(n.id)}},n.id))}),s.jsx("div",{className:"uh-agent-keys",children:y.map(n=>s.jsxs("span",{className:"uh-agent-key",title:a("insights.usage.agentTokens",{id:n.id,tokens:f(n.tokens)}),children:[s.jsx("span",{className:"uh-legend-dot",style:{background:V(n.id)}}),I(n.id),s.jsx("span",{className:"uh-agent-cost",children:J(n.cost)}),s.jsx("span",{className:"uh-agent-share",children:bs(n.cost,k)})]},n.id))})]}),s.jsx("div",{ref:A,className:"uh-chart",role:"group","aria-label":a("insights.usage.daily"),children:d.map((n,j)=>{const rs=v(n.totalCost,D),R=n.period===p,z=`${n.period}, ${N(n.totalCost,n.modelBreakdowns.some(b=>b.missingPricing))}`;return s.jsxs("button",{className:`uh-bar-col${R?" sel":""}`,onClick:()=>r(R?null:n.period),"aria-pressed":R,"aria-label":z,title:z,style:{flexBasis:`${100/d.length}%`,"--uh-i":j,"--uh-step":`${Math.min(10,160/Math.max(d.length,1))}ms`},children:[s.jsxs("span",{className:"uh-bar-plot",children:[O&&n.totalCost>0&&s.jsx("span",{className:"uh-bar-value","aria-hidden":"true",children:Ms(n.totalCost)}),s.jsx("span",{className:"uh-bar",style:{"--uh-h":Math.max(rs,n.totalCost>0?2:0)/100},children:Z(n.modelBreakdowns).map(b=>{const is=v(b.cost,n.totalCost);return s.jsx("span",{className:"uh-bar-seg",style:{height:`${is}%`,background:$(b.modelName)}},b.modelName)})})]}),s.jsx("span",{className:"uh-bar-label","aria-hidden":"true",children:(d.length-1-j)%os===0?O?$s(n.period):n.period.slice(5):""})]},n.period)})}),s.jsx("div",{className:"uh-legend",children:as.map(([n,j])=>s.jsxs("span",{className:"uh-legend-item",title:n,children:[s.jsx("span",{className:"uh-legend-dot",style:{background:$(n)}}),X(n)," ",s.jsx("span",{className:"uh-legend-cost",children:N(j,w.has(n))})]},n))}),E&&s.jsx(As,{selectedDay:E})]})]}),c.phase==="error"?s.jsx("footer",{className:"modal-foot",children:s.jsx("button",{className:"btn primary uh-retry",onClick:()=>{_(),m()},...H(u),children:a(u?"insights.usage.trying":"insights.audit.tryAgain")})}):s.jsx("footer",{className:"modal-foot",children:s.jsx("button",{type:"button",className:"btn primary",onClick:t,children:a("shell.done")})})]})}function C({label:t,val:e}){return s.jsxs("div",{className:"uh-stat",children:[s.jsx("span",{className:"uh-stat-val",children:e}),s.jsx("span",{className:"uh-stat-label",children:t})]})}export{Es as default};
|