agentwrangler 0.1.1-next.afd4e62 → 0.1.1-next.bca85ea
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/ui/assets/{BarChart-CMfobGNC.js → BarChart-CIjCNfbI.js} +1 -1
- package/dist/ui/assets/{BriefsPage-CnWsYSEI.js → BriefsPage-DIU8iFjV.js} +1 -1
- package/dist/ui/assets/{CacheWriteSpikesChart-Fufucloe.js → CacheWriteSpikesChart-1Nfnf7OX.js} +1 -1
- package/dist/ui/assets/{CartesianChart-xsHi_mRg.js → CartesianChart-DEnDOGKj.js} +1 -1
- package/dist/ui/assets/{Chip-B18SATzv.js → Chip-s-32Dh3o.js} +1 -1
- package/dist/ui/assets/{ComposedChart-C9ExQN46.js → ComposedChart-DUw8Y79v.js} +1 -1
- package/dist/ui/assets/{EmptyState-DDZZlBIw.js → EmptyState-B8vpug3_.js} +1 -1
- package/dist/ui/assets/{FlavorDecomposition-DaFuiY-s.js → FlavorDecomposition-CkHX3M-U.js} +1 -1
- package/dist/ui/assets/{FrictionCell-Cf7n9pZ5.js → FrictionCell-X75fKRBK.js} +1 -1
- package/dist/ui/assets/{GlossaryPage-Ch9vnV-9.js → GlossaryPage-D1tYumqL.js} +1 -1
- package/dist/ui/assets/{HotSessionsPage-CMVND16B.js → HotSessionsPage-8HlRe0VB.js} +1 -1
- package/dist/ui/assets/{InfoTip-CE9f04Fa.js → InfoTip-CL8RC4vz.js} +1 -1
- package/dist/ui/assets/{Legend-CjlVvByY.js → Legend-CB7sqqJH.js} +1 -1
- package/dist/ui/assets/{Line-CVFZTFsG.js → Line-B9XY30uT.js} +1 -1
- package/dist/ui/assets/{OverviewPage-CZPvN1Rh.js → OverviewPage-DL4joBBE.js} +2 -2
- package/dist/ui/assets/{RecommendationsPage-CKD8i6pV.js → RecommendationsPage-NkfH17eB.js} +1 -1
- package/dist/ui/assets/{Scatter-DCdt0o6A.js → Scatter-BSWm_yIZ.js} +1 -1
- package/dist/ui/assets/{SessionDetailPage-CqbwihMb.js → SessionDetailPage-Ceqt7poO.js} +1 -1
- package/dist/ui/assets/{SettingsPage-Wjg7im_R.js → SettingsPage-ZK4ii5h_.js} +1 -1
- package/dist/ui/assets/{Skeleton-DEF-0Fbx.js → Skeleton-Dp_m79B8.js} +1 -1
- package/dist/ui/assets/{SpendPercentileChip-BNvG7aFY.js → SpendPercentileChip-CzY6h1gP.js} +1 -1
- package/dist/ui/assets/{TrendChart-vycHn5rQ.js → TrendChart-BSLwlBiq.js} +1 -1
- package/dist/ui/assets/{WorkspaceDetailPage-SSW09ztI.js → WorkspaceDetailPage-DFOdEB39.js} +1 -1
- package/dist/ui/assets/{WorkspacesPage-NHvgHsMQ.js → WorkspacesPage-Doct6meK.js} +1 -1
- package/dist/ui/assets/{chart-theme-DcuvcaLU.js → chart-theme-DYgw_Tac.js} +1 -1
- package/dist/ui/assets/{graphicalItemSelectors-DXHqMBmB.js → graphicalItemSelectors-0-Ue_y1f.js} +1 -1
- package/dist/ui/assets/{index-kCU7neaT.js → index-DhFiA8Ch.js} +10 -10
- package/dist/ui/assets/{useExperimentalActions-BOEFCZJz.js → useExperimentalActions-aI00AFZv.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as l}from"./index-
|
|
1
|
+
import{r as t,j as l}from"./index-DhFiA8Ch.js";function b({children:d,content:x,label:w}){const[o,n]=t.useState(!1),c=`infotip-${t.useId().replace(/:/g,"")}`,r=t.useRef(null),u=t.useRef(null),i=t.useRef(!1),[p,m]=t.useState({left:8,top:8});return t.useLayoutEffect(()=>{if(!o)return;const e=()=>{var f,h;const s=(f=r.current)==null?void 0:f.getBoundingClientRect(),a=(h=u.current)==null?void 0:h.getBoundingClientRect();s&&a&&m({left:Math.max(8,Math.min(s.left,window.innerWidth-a.width-8)),top:Math.max(8,Math.min(s.bottom,window.innerHeight-a.height-8))})};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[o]),l.jsxs("span",{style:{display:"inline-block",position:"relative"},onMouseEnter:()=>n(!0),onMouseLeave:()=>{document.activeElement!==r.current&&n(!1)},children:[l.jsx("button",{ref:r,type:"button","aria-describedby":o?c:void 0,"aria-label":w,onBlur:()=>n(!1),onPointerDown:()=>{i.current=o&&document.activeElement===r.current},onClick:()=>{n(!i.current),i.current=!1},onFocus:()=>n(!0),onKeyDown:e=>{e.key==="Escape"&&n(!1)},style:d?{background:"none",border:0,color:"inherit",cursor:"help",font:"inherit",padding:0,textDecoration:"underline dotted",textUnderlineOffset:3}:{alignItems:"center",background:"none",border:0,borderRadius:"50%",color:"var(--muted)",cursor:"help",display:"inline-flex",fontSize:14,height:18,justifyContent:"center",padding:0,width:18},children:d??"ⓘ"}),o?l.jsx("span",{ref:u,id:c,role:"tooltip",style:{background:"var(--panel2)",border:"1px solid var(--line)",borderRadius:"var(--r)",boxShadow:"var(--shadow)",color:"var(--text)",fontSize:13,left:p.left,lineHeight:1.4,maxWidth:"min(260px, calc(100vw - 16px))",maxHeight:"calc(100dvh - 16px)",overflowY:"auto",padding:"8px 10px",position:"fixed",top:p.top,width:"max-content",zIndex:20},children:x}):null]})}export{b as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l}from"./index-
|
|
1
|
+
import{r as l}from"./index-DhFiA8Ch.js";import{r as T,J as G,aa as Q,ab as X,H as W,ac as ee,c as te,ad as re,ae as ne,af as ae,p as ie,ag as oe,ah as le,ai as I,aj as ce,ak as ue,al as se,am as fe,an as de,ao as ve,ap as V,aq as he,ar as k,as as ge}from"./CartesianChart-DEnDOGKj.js";import{a as pe}from"./Scatter-BSWm_yIZ.js";function E(){return E=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},E.apply(null,arguments)}function z(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function H(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?z(Object(t),!0).forEach(function(n){ye(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ye(e,r,t){return(r=me(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function me(e){var r=be(e,"string");return typeof r=="symbol"?r:r+""}function be(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var g=32,we={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function Oe(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Pe(e){var r=e.data,t=e.iconType,n=e.inactiveColor,a=g/2,o=g/6,c=g/3,u=r.inactive?n:r.color,f=t??r.type;if(f==="none")return null;if(f==="plainline")return l.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:Oe(r.payload),x1:0,y1:a,x2:g,y2:a,className:"recharts-legend-icon"});if(f==="line")return l.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(c,`
|
|
2
2
|
A`).concat(o,",").concat(o,",0,1,1,").concat(2*c,",").concat(a,`
|
|
3
3
|
H`).concat(g,"M").concat(2*c,",").concat(a,`
|
|
4
4
|
A`).concat(o,",").concat(o,",0,1,1,").concat(c,",").concat(a),className:"recharts-legend-icon"});if(f==="rect")return l.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(g/8,"h").concat(g,"v").concat(g*3/4,"h").concat(-g,"z"),className:"recharts-legend-icon"});if(l.isValidElement(r.legendIcon)){var i=H({},r);return delete i.legendIcon,l.cloneElement(r.legendIcon,i)}return l.createElement(pe,{fill:u,cx:a,cy:a,size:g,sizeType:"diameter",type:f})}function Se(e){var r=e.payload,t=e.iconSize,n=e.layout,a=e.formatter,o=e.inactiveColor,c=e.iconType,u=e.labelStyle,f={x:0,y:0,width:g,height:g},i={display:n==="horizontal"?"inline-block":"block",marginRight:10,whiteSpace:"nowrap"},v={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map((d,b)=>{var h,s,O=d.formatter||a,j=G({"recharts-legend-item":!0,["legend-item-".concat(b)]:!0,inactive:d.inactive});if(d.type==="none")return null;var p=typeof u=="object"?H({},u):{};p.color=d.inactive?o:p.color||d.color,(h=p.whiteSpace)!==null&&h!==void 0||(p.whiteSpace="normal"),(s=p.overflowWrap)!==null&&s!==void 0||(p.overflowWrap="break-word");var y=O?O(d.value,d,b):d.value;return l.createElement("li",E({className:j,style:i,key:"legend-item-".concat(b)},Q(e,d,b)),l.createElement(X,{width:t,height:t,viewBox:f,style:v,"aria-label":d.value==null?"legend icon":"".concat(d.value," legend icon")},l.createElement(Pe,{data:d,iconType:c,inactiveColor:o})),l.createElement("span",{className:"recharts-legend-item-text",style:p},y))})}var je=e=>{var r=T(e,we),t=r.payload,n=r.layout,a=r.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:n==="horizontal"?a:"left"};return l.createElement("ul",{className:"recharts-default-legend",style:o},l.createElement(Se,E({},r,{payload:t})))};function xe(){return W(ee)}var Ee=te([re,ne,ae],(e,r,t)=>({x:t.left||0,y:t.top||0,width:Math.max(e-(t.left||0)-(t.right||0),0),height:Math.max(r-(t.top||0)-(t.bottom||0),0)}));function Ae(e,r){var t;if(e==="start"&&r==="start")return"";var n={start:"0",middle:"-50%",end:"-100%"},a={start:"0",middle:"-50%",end:"-100%"},o=e==="inherit"?"0":n[e],c=(t=a[r])!==null&&t!==void 0?t:"0";return"translate(".concat(o,", ").concat(c,")")}var Le=["contextPayload"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},L.apply(null,arguments)}function _e(e,r){return ze(e)||ke(e,r)||Ce(e,r)||De()}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./index-kCU7neaT.js";import{m as Q,a7 as _,c as C,s as T,a8 as ee,d as F,e as z,h as te,i as ae,f as R,p as ne,r as M,D as ie,q as re,t as V,v as oe,S as le,w as se,y as L,z as $,A as ue,B as de,G as ce,I as pe,E as ve,H as he,J as me,K as ye,Z as fe,L as xe,M as ge,a9 as Ae,N as G,O as W,a2 as B,U as Pe,W as Ie,_ as be,$ as Ee,a0 as De,a1 as Le,l as Se}from"./CartesianChart-xsHi_mRg.js";import{g as Oe,A as ke,D as we}from"./Scatter-DCdt0o6A.js";var Ce=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},w.apply(null,arguments)}function Ne(e,t){if(e==null)return{};var n,a,i=je(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function je(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Re(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function U(e,t){return"".concat(t,"px ").concat(e,"px")}function We(e){return e.length%2!==0?[...e,...e]:e}function Be(e,t){for(var n=[],a=0;a<t;++a)n.push(...e);return n}function Ke(e,t,n){var a=We(n),i=a.reduce((d,h)=>d+h,0);if(!i)return U(t,e);for(var r=Math.floor(e/i),s=e%i,l=[],u=0,c=0;u<a.length;c+=(v=a[u])!==null&&v!==void 0?v:0,++u){var v,p=a[u];if(p!=null&&c+p>s){l=[...a.slice(0,u),s-c];break}}var m=l.length%2===0?[0,t]:[t];return[...Be(a,r),...l,...m].map(d=>"".concat(d,"px")).join(", ")}function Te(e,t,n){if(e){var a="".concat(e).split(/[,\s]+/gim).map(i=>parseFloat(i));return Ke(n,t,a)}return U(t,n)}function Fe(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,a=e.connectNulls,i=Ne(e,Ce),r=a??!1,s;if(t!=null){var l,u=i.pathRef,c=Re((l=u==null?void 0:u.current)!==null&&l!==void 0?l:null);s=Te(n,c,t)}else n!=null&&(s=String(n));return o.createElement(Q,w({},i,{connectNulls:r,strokeDasharray:s}))}function ze(e){var t=o.useRef(0),n=o.useRef(0),a=o.useRef(!1),i=o.useRef(e);return i.current!==e&&(t.current=n.current,i.current=e),o.useCallback((r,s)=>{if(a.current)return null;var l=Math.min(_(t.current+r*s),s);return r>0&&s>0&&(n.current=Math.max(n.current,l),l>=s)?(a.current=!0,null):l},[])}var Z=(e,t,n,a)=>F(e,"xAxis",t,a),q=(e,t,n,a)=>z(e,"xAxis",t,a),X=(e,t,n,a)=>F(e,"yAxis",n,a),Y=(e,t,n,a)=>z(e,"yAxis",n,a),Me=C([T,Z,X,q,Y],(e,t,n,a,i)=>ae(e,"xAxis")?R(t,a,!1):R(n,i,!1)),Ve=(e,t,n,a,i)=>i;function $e(e){return e.type==="line"}var Ge=C([te,Ve],(e,t)=>e.filter($e).find(n=>n.id===t)),Ue=C([T,Z,X,q,Y,Ge,Me,ee],(e,t,n,a,i,r,s,l)=>{var u=l.chartData,c=l.dataStartIndex,v=l.dataEndIndex;if(!(r==null||t==null||n==null||a==null||i==null||a.length===0||i.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var p=r.dataKey,m=r.data,d;if(m!=null&&m.length>0?d=m:d=u==null?void 0:u.slice(c,v+1),d!=null)return pt({layout:e,xAxis:t,yAxis:n,xAxisTicks:a,yAxisTicks:i,dataKey:p,bandSize:s,displayedData:d})}}),Ze=["id"],qe=["type","layout","connectNulls","needClip","shape","strokeDasharray"],Xe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},S.apply(null,arguments)}function N(e,t){if(e==null)return{};var n,a,i=Ye(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ye(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K(Object(n),!0).forEach(function(a){He(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function He(e,t,n){return(t=Je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e){var t=Qe(e,"string");return typeof t=="symbol"?t:t+""}function Qe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _e(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function et(e){var t=0,n=0;for(var a of e)a.status==="matched"&&a.prev.x!=null&&a.next.x!=null&&(t+=a.next.x-a.prev.x,n++);return n>0?t/n:0}var tt=(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(l=>l.status==="removed"?[]:[l.next]);var n=et(e),a=[];for(var i of e)if(i.status==="matched")a.push(g(g({},i.next),{},{x:L(i.prev.x,i.next.x,t),y:L(i.prev.y,i.next.y,t)}));else if(i.status==="added")if(i.next.x!=null){var r=i.next.x-n;a.push(g(g({},i.next),{},{x:L(r,i.next.x,t),y:i.next.y}))}else a.push(i.next);else if(i.status==="removed"&&i.prev.x!=null){var s=i.prev.x+n;a.push(g(g({},i.prev),{},{x:L(i.prev.x,s,t),y:i.prev.y}))}return a},j={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:tt,animationMatchBy:re,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",shape:Fe,stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:ie.line,type:"linear"},at=e=>{var t=e.dataKey,n=e.name,a=e.stroke,i=e.legendType,r=e.hide;return[{inactive:r,dataKey:t,type:i,color:a,value:$(n,t),payload:e}]},nt=o.memo(e=>{var t=e.dataKey,n=e.data,a=e.stroke,i=e.strokeWidth,r=e.fill,s=e.name,l=e.hide,u=e.unit,c=e.formatter,v=e.tooltipType,p=e.id,m={dataDefinedOnItem:n,getPosition:de,settings:{stroke:a,strokeWidth:i,fill:r,dataKey:t,nameKey:void 0,name:$(s,t),hide:l,type:v,color:a,unit:u,formatter:c,graphicalItemId:p}};return o.createElement(ue,{tooltipEntrySettings:m})});function it(e){var t=e.clipPathId,n=e.points,a=e.props,i=a.dot,r=a.dataKey,s=a.needClip;a.id;var l=N(a,Ze),u=Se(l);return o.createElement(we,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:r,baseProps:u,needClip:s,clipPathId:t})}function rt(e){var t=e.showLabels,n=e.children,a=e.points,i=o.useMemo(()=>a==null?void 0:a.map(r=>{var s,l,u={x:(s=r.x)!==null&&s!==void 0?s:0,y:(l=r.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return g(g({},u),{},{value:r.value,payload:r.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[a]);return o.createElement(Ee,{value:t?i:void 0},n)}function ot(e){var t=e.clipPathId,n=e.pathRef,a=e.points,i=e.props,r=e.animationElapsedTime,s=e.isAnimating,l=e.isEntrance,u=e.visibleLength,c=i.type,v=i.layout,p=i.connectNulls,m=i.needClip,d=i.shape,h=i.strokeDasharray,y=N(i,qe),f=g(g({},De(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:a,type:c,layout:v,connectNulls:p,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:r,isAnimating:s,isEntrance:i.animateNewValues?l:!1,visibleLength:u});return o.createElement(o.Fragment,null,(a==null?void 0:a.length)>1&&o.createElement(Le,{option:d,DefaultShape:j.shape,shapeProps:f}),o.createElement(it,{points:a,clipPathId:t,props:i}))}function lt(e){var t=e.clipPathId,n=e.props,a=e.pathRef,i=e.previousPointsRef,r=n.points,s=n.isAnimationActive,l=n.animationBegin,u=n.animationDuration,c=n.animationEasing,v=n.animationMatchBy,p=n.animationInterpolateFn,m=n.layout,d=_e(a.current),h=Pe(n.onAnimationStart,n.onAnimationEnd),y=h.isAnimating,f=h.handleAnimationStart,b=h.handleAnimationEnd,E=!y,A=ze(r),P=o.useCallback(x=>x>0&&d>0,[d]);return o.createElement(rt,{points:r,showLabels:E},n.children,o.createElement(Ie,{animationInput:r,animationIdPrefix:"recharts-line-",items:r,previousItemsRef:i,isAnimationActive:s,animationBegin:l,animationDuration:u,animationEasing:c,onAnimationStart:f,onAnimationEnd:b,animationInterpolateFn:p,animationMatchBy:v,shouldUpdatePreviousRef:P,layout:m},(x,I,O)=>{var D=y||I<1,k=D?A(I,d):null;return o.createElement(ot,{props:n,points:x,clipPathId:t,pathRef:a,animationElapsedTime:I,isAnimating:D,isEntrance:O,visibleLength:k})}),o.createElement(be,{label:n.label}))}function st(e){var t=e.clipPathId,n=e.props,a=o.useRef(null),i=o.useRef(null);return o.createElement(lt,{props:n,clipPathId:t,previousPointsRef:a,pathRef:i})}var ut=(e,t)=>{var n,a;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(a=e.y)!==null&&a!==void 0?a:void 0,value:e.value,errorVal:G(e.payload,t)}};class dt extends o.Component{render(){var t=this.props,n=t.hide,a=t.dot,i=t.points,r=t.className,s=t.xAxisId,l=t.yAxisId,u=t.top,c=t.left,v=t.width,p=t.height,m=t.id,d=t.needClip,h=t.zIndex;if(n)return null;var y=me("recharts-line",r),f=m,b=Oe(a),E=b.r,A=b.strokeWidth,P=ye(a),x=E*2+A,I=d?"url(#clipPath-".concat(P?"":"dots-").concat(f,")"):void 0;return o.createElement(fe,{zIndex:h},o.createElement(xe,{className:y},d&&o.createElement("defs",null,o.createElement(ge,{clipPathId:f,xAxisId:s,yAxisId:l}),!P&&o.createElement("clipPath",{id:"clipPath-dots-".concat(f)},o.createElement("rect",{x:c-x/2,y:u-x/2,width:v+x,height:p+x}))),o.createElement(Ae,{xAxisId:s,yAxisId:l,data:i,dataPointFormatter:ut,errorBarOffset:0},o.createElement(st,{props:this.props,clipPathId:f}))),o.createElement(ke,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:I}))}}function ct(e){var t=M(e,j),n=t.activeDot,a=t.animateNewValues,i=t.animationBegin,r=t.animationDuration,s=t.animationEasing,l=t.connectNulls,u=t.dot,c=t.hide,v=t.isAnimationActive,p=t.label,m=t.legendType,d=t.xAxisId,h=t.yAxisId,y=t.id,f=N(t,Xe),b=ce(d,h),E=b.needClip,A=pe(),P=ve(),x=V(),I=he(J=>Ue(J,d,h,x,y));if(P!=="horizontal"&&P!=="vertical"||I==null||A==null)return null;var O=A.height,D=A.width,k=A.x,H=A.y;return o.createElement(dt,S({},f,{id:y,connectNulls:l,dot:u,activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:r,animationEasing:s,isAnimationActive:v,hide:c,label:p,legendType:m,xAxisId:d,yAxisId:h,points:I,layout:P,height:O,width:D,left:k,top:H,needClip:E}))}function pt(e){var t=e.layout,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,r=e.yAxisTicks,s=e.dataKey,l=e.bandSize,u=e.displayedData;return u.map((c,v)=>{var p=G(c,s);if(t==="horizontal"){var m=W({axis:n,ticks:i,bandSize:l,entry:c,index:v}),d=B(p)?null:a.scale.map(p);return{x:m,y:d??null,value:p,payload:c}}var h=B(p)?null:n.scale.map(p),y=W({axis:a,ticks:r,bandSize:l,entry:c,index:v});return h==null||y==null?null:{x:h,y,value:p,payload:c}}).filter(Boolean)}function vt(e){var t=M(e,j),n=V();return o.createElement(oe,{id:t.id,type:"line"},a=>o.createElement(o.Fragment,null,o.createElement(le,{legendPayload:at(t)}),o.createElement(nt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:a}),o.createElement(se,{type:"line",id:a,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),o.createElement(ct,S({},t,{id:a}))))}var ht=o.memo(vt,ne);ht.displayName="Line";export{ht as L};
|
|
1
|
+
import{r as o}from"./index-DhFiA8Ch.js";import{m as Q,a7 as _,c as C,s as T,a8 as ee,d as F,e as z,h as te,i as ae,f as R,p as ne,r as M,D as ie,q as re,t as V,v as oe,S as le,w as se,y as L,z as $,A as ue,B as de,G as ce,I as pe,E as ve,H as he,J as me,K as ye,Z as fe,L as xe,M as ge,a9 as Ae,N as G,O as W,a2 as B,U as Pe,W as Ie,_ as be,$ as Ee,a0 as De,a1 as Le,l as Se}from"./CartesianChart-DEnDOGKj.js";import{g as Oe,A as ke,D as we}from"./Scatter-BSWm_yIZ.js";var Ce=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},w.apply(null,arguments)}function Ne(e,t){if(e==null)return{};var n,a,i=je(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function je(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Re(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function U(e,t){return"".concat(t,"px ").concat(e,"px")}function We(e){return e.length%2!==0?[...e,...e]:e}function Be(e,t){for(var n=[],a=0;a<t;++a)n.push(...e);return n}function Ke(e,t,n){var a=We(n),i=a.reduce((d,h)=>d+h,0);if(!i)return U(t,e);for(var r=Math.floor(e/i),s=e%i,l=[],u=0,c=0;u<a.length;c+=(v=a[u])!==null&&v!==void 0?v:0,++u){var v,p=a[u];if(p!=null&&c+p>s){l=[...a.slice(0,u),s-c];break}}var m=l.length%2===0?[0,t]:[t];return[...Be(a,r),...l,...m].map(d=>"".concat(d,"px")).join(", ")}function Te(e,t,n){if(e){var a="".concat(e).split(/[,\s]+/gim).map(i=>parseFloat(i));return Ke(n,t,a)}return U(t,n)}function Fe(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,a=e.connectNulls,i=Ne(e,Ce),r=a??!1,s;if(t!=null){var l,u=i.pathRef,c=Re((l=u==null?void 0:u.current)!==null&&l!==void 0?l:null);s=Te(n,c,t)}else n!=null&&(s=String(n));return o.createElement(Q,w({},i,{connectNulls:r,strokeDasharray:s}))}function ze(e){var t=o.useRef(0),n=o.useRef(0),a=o.useRef(!1),i=o.useRef(e);return i.current!==e&&(t.current=n.current,i.current=e),o.useCallback((r,s)=>{if(a.current)return null;var l=Math.min(_(t.current+r*s),s);return r>0&&s>0&&(n.current=Math.max(n.current,l),l>=s)?(a.current=!0,null):l},[])}var Z=(e,t,n,a)=>F(e,"xAxis",t,a),q=(e,t,n,a)=>z(e,"xAxis",t,a),X=(e,t,n,a)=>F(e,"yAxis",n,a),Y=(e,t,n,a)=>z(e,"yAxis",n,a),Me=C([T,Z,X,q,Y],(e,t,n,a,i)=>ae(e,"xAxis")?R(t,a,!1):R(n,i,!1)),Ve=(e,t,n,a,i)=>i;function $e(e){return e.type==="line"}var Ge=C([te,Ve],(e,t)=>e.filter($e).find(n=>n.id===t)),Ue=C([T,Z,X,q,Y,Ge,Me,ee],(e,t,n,a,i,r,s,l)=>{var u=l.chartData,c=l.dataStartIndex,v=l.dataEndIndex;if(!(r==null||t==null||n==null||a==null||i==null||a.length===0||i.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var p=r.dataKey,m=r.data,d;if(m!=null&&m.length>0?d=m:d=u==null?void 0:u.slice(c,v+1),d!=null)return pt({layout:e,xAxis:t,yAxis:n,xAxisTicks:a,yAxisTicks:i,dataKey:p,bandSize:s,displayedData:d})}}),Ze=["id"],qe=["type","layout","connectNulls","needClip","shape","strokeDasharray"],Xe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},S.apply(null,arguments)}function N(e,t){if(e==null)return{};var n,a,i=Ye(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ye(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K(Object(n),!0).forEach(function(a){He(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function He(e,t,n){return(t=Je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e){var t=Qe(e,"string");return typeof t=="symbol"?t:t+""}function Qe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _e(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function et(e){var t=0,n=0;for(var a of e)a.status==="matched"&&a.prev.x!=null&&a.next.x!=null&&(t+=a.next.x-a.prev.x,n++);return n>0?t/n:0}var tt=(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(l=>l.status==="removed"?[]:[l.next]);var n=et(e),a=[];for(var i of e)if(i.status==="matched")a.push(g(g({},i.next),{},{x:L(i.prev.x,i.next.x,t),y:L(i.prev.y,i.next.y,t)}));else if(i.status==="added")if(i.next.x!=null){var r=i.next.x-n;a.push(g(g({},i.next),{},{x:L(r,i.next.x,t),y:i.next.y}))}else a.push(i.next);else if(i.status==="removed"&&i.prev.x!=null){var s=i.prev.x+n;a.push(g(g({},i.prev),{},{x:L(i.prev.x,s,t),y:i.prev.y}))}return a},j={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:tt,animationMatchBy:re,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",shape:Fe,stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:ie.line,type:"linear"},at=e=>{var t=e.dataKey,n=e.name,a=e.stroke,i=e.legendType,r=e.hide;return[{inactive:r,dataKey:t,type:i,color:a,value:$(n,t),payload:e}]},nt=o.memo(e=>{var t=e.dataKey,n=e.data,a=e.stroke,i=e.strokeWidth,r=e.fill,s=e.name,l=e.hide,u=e.unit,c=e.formatter,v=e.tooltipType,p=e.id,m={dataDefinedOnItem:n,getPosition:de,settings:{stroke:a,strokeWidth:i,fill:r,dataKey:t,nameKey:void 0,name:$(s,t),hide:l,type:v,color:a,unit:u,formatter:c,graphicalItemId:p}};return o.createElement(ue,{tooltipEntrySettings:m})});function it(e){var t=e.clipPathId,n=e.points,a=e.props,i=a.dot,r=a.dataKey,s=a.needClip;a.id;var l=N(a,Ze),u=Se(l);return o.createElement(we,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:r,baseProps:u,needClip:s,clipPathId:t})}function rt(e){var t=e.showLabels,n=e.children,a=e.points,i=o.useMemo(()=>a==null?void 0:a.map(r=>{var s,l,u={x:(s=r.x)!==null&&s!==void 0?s:0,y:(l=r.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return g(g({},u),{},{value:r.value,payload:r.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[a]);return o.createElement(Ee,{value:t?i:void 0},n)}function ot(e){var t=e.clipPathId,n=e.pathRef,a=e.points,i=e.props,r=e.animationElapsedTime,s=e.isAnimating,l=e.isEntrance,u=e.visibleLength,c=i.type,v=i.layout,p=i.connectNulls,m=i.needClip,d=i.shape,h=i.strokeDasharray,y=N(i,qe),f=g(g({},De(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:a,type:c,layout:v,connectNulls:p,strokeDasharray:h??i.strokeDasharray,pathRef:n,animationElapsedTime:r,isAnimating:s,isEntrance:i.animateNewValues?l:!1,visibleLength:u});return o.createElement(o.Fragment,null,(a==null?void 0:a.length)>1&&o.createElement(Le,{option:d,DefaultShape:j.shape,shapeProps:f}),o.createElement(it,{points:a,clipPathId:t,props:i}))}function lt(e){var t=e.clipPathId,n=e.props,a=e.pathRef,i=e.previousPointsRef,r=n.points,s=n.isAnimationActive,l=n.animationBegin,u=n.animationDuration,c=n.animationEasing,v=n.animationMatchBy,p=n.animationInterpolateFn,m=n.layout,d=_e(a.current),h=Pe(n.onAnimationStart,n.onAnimationEnd),y=h.isAnimating,f=h.handleAnimationStart,b=h.handleAnimationEnd,E=!y,A=ze(r),P=o.useCallback(x=>x>0&&d>0,[d]);return o.createElement(rt,{points:r,showLabels:E},n.children,o.createElement(Ie,{animationInput:r,animationIdPrefix:"recharts-line-",items:r,previousItemsRef:i,isAnimationActive:s,animationBegin:l,animationDuration:u,animationEasing:c,onAnimationStart:f,onAnimationEnd:b,animationInterpolateFn:p,animationMatchBy:v,shouldUpdatePreviousRef:P,layout:m},(x,I,O)=>{var D=y||I<1,k=D?A(I,d):null;return o.createElement(ot,{props:n,points:x,clipPathId:t,pathRef:a,animationElapsedTime:I,isAnimating:D,isEntrance:O,visibleLength:k})}),o.createElement(be,{label:n.label}))}function st(e){var t=e.clipPathId,n=e.props,a=o.useRef(null),i=o.useRef(null);return o.createElement(lt,{props:n,clipPathId:t,previousPointsRef:a,pathRef:i})}var ut=(e,t)=>{var n,a;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(a=e.y)!==null&&a!==void 0?a:void 0,value:e.value,errorVal:G(e.payload,t)}};class dt extends o.Component{render(){var t=this.props,n=t.hide,a=t.dot,i=t.points,r=t.className,s=t.xAxisId,l=t.yAxisId,u=t.top,c=t.left,v=t.width,p=t.height,m=t.id,d=t.needClip,h=t.zIndex;if(n)return null;var y=me("recharts-line",r),f=m,b=Oe(a),E=b.r,A=b.strokeWidth,P=ye(a),x=E*2+A,I=d?"url(#clipPath-".concat(P?"":"dots-").concat(f,")"):void 0;return o.createElement(fe,{zIndex:h},o.createElement(xe,{className:y},d&&o.createElement("defs",null,o.createElement(ge,{clipPathId:f,xAxisId:s,yAxisId:l}),!P&&o.createElement("clipPath",{id:"clipPath-dots-".concat(f)},o.createElement("rect",{x:c-x/2,y:u-x/2,width:v+x,height:p+x}))),o.createElement(Ae,{xAxisId:s,yAxisId:l,data:i,dataPointFormatter:ut,errorBarOffset:0},o.createElement(st,{props:this.props,clipPathId:f}))),o.createElement(ke,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:I}))}}function ct(e){var t=M(e,j),n=t.activeDot,a=t.animateNewValues,i=t.animationBegin,r=t.animationDuration,s=t.animationEasing,l=t.connectNulls,u=t.dot,c=t.hide,v=t.isAnimationActive,p=t.label,m=t.legendType,d=t.xAxisId,h=t.yAxisId,y=t.id,f=N(t,Xe),b=ce(d,h),E=b.needClip,A=pe(),P=ve(),x=V(),I=he(J=>Ue(J,d,h,x,y));if(P!=="horizontal"&&P!=="vertical"||I==null||A==null)return null;var O=A.height,D=A.width,k=A.x,H=A.y;return o.createElement(dt,S({},f,{id:y,connectNulls:l,dot:u,activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:r,animationEasing:s,isAnimationActive:v,hide:c,label:p,legendType:m,xAxisId:d,yAxisId:h,points:I,layout:P,height:O,width:D,left:k,top:H,needClip:E}))}function pt(e){var t=e.layout,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,r=e.yAxisTicks,s=e.dataKey,l=e.bandSize,u=e.displayedData;return u.map((c,v)=>{var p=G(c,s);if(t==="horizontal"){var m=W({axis:n,ticks:i,bandSize:l,entry:c,index:v}),d=B(p)?null:a.scale.map(p);return{x:m,y:d??null,value:p,payload:c}}var h=B(p)?null:n.scale.map(p),y=W({axis:a,ticks:r,bandSize:l,entry:c,index:v});return h==null||y==null?null:{x:h,y,value:p,payload:c}}).filter(Boolean)}function vt(e){var t=M(e,j),n=V();return o.createElement(oe,{id:t.id,type:"line"},a=>o.createElement(o.Fragment,null,o.createElement(le,{legendPayload:at(t)}),o.createElement(nt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:a}),o.createElement(se,{type:"line",id:a,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),o.createElement(ct,S({},t,{id:a}))))}var ht=o.memo(vt,ne);ht.displayName="Line";export{ht as L};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CacheWriteSpikesChart-
|
|
2
|
-
import{r as o,j as e,L as pt,g as Te,f as mt,a as ft,e as Ie,h as xt,b as gt,c as vt,u as se,i as jt,d as bt,k as _t,l as kt,_ as oe,m as yt,n as wt,o as Nt}from"./index-kCU7neaT.js";import{C as b,K as Oe}from"./Chip-B18SATzv.js";import{S as M,a as St,b as D}from"./Skeleton-DEF-0Fbx.js";import{I as ce}from"./InfoTip-CE9f04Fa.js";import{w as Re}from"./workspace-label-CysPJNc0.js";import{E as Et}from"./EmptyState-DDZZlBIw.js";import{b as Ct}from"./prompt-templates-CVzMex9L.js";import{s as z}from"./chart-theme-DcuvcaLU.js";const Tt=Object.keys(Oe);function It(){const[t,s]=o.useState(!1),n=o.useId();return e.jsxs("div",{className:"chip-legend",children:[e.jsx("button",{className:"chip-legend-toggle",type:"button","aria-controls":n,"aria-expanded":t,onClick:()=>s(a=>!a),children:"ℹ How certain is this?"}),t&&e.jsx("section",{className:"chip-legend-panel",id:n,"aria-label":"What the labels mean",children:e.jsx("ul",{className:"chip-legend-list",children:Tt.map(a=>e.jsxs("li",{className:"chip-legend-item",children:[e.jsx(b,{kind:a}),e.jsx("span",{children:Oe[a]})]},a))})})]})}function ne({children:t,label:s,ready:n=!0}){const a=o.useRef(null),[i,l]=o.useState(!1);return o.useEffect(()=>{if(i||!n)return;if(typeof IntersectionObserver>"u"){l(!0);return}const r=new IntersectionObserver(u=>{u.some(c=>c.isIntersecting)&&(l(!0),r.disconnect())},{rootMargin:"200px"});return a.current&&r.observe(a.current),()=>r.disconnect()},[i,n]),e.jsx("div",{ref:a,style:{minHeight:320},children:i?e.jsx(pt,{label:s,children:t}):e.jsxs("button",{type:"button",onClick:()=>l(!0),children:["Load ",s]})})}function Ft(t,s,n){return Math.max(s,Math.min(n,t))}function Lt(t,s,n){const a=Math.round(n*100);if(t===null)return{B:null,budgetPct:null,actualPct:a,deltaPts:null,daysElapsed:null};const l=Date.parse(t)-7*864e5,r=Ft((s.getTime()-l)/(7*864e5),0,1);return{B:r,budgetPct:Math.round(r*100),actualPct:a,deltaPts:Math.round(n*100-r*100),daysElapsed:Math.round(r*7*10)/10}}function ae(t){return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toLocaleString()}function Dt(t){return new Date(t).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})}function $t({forecast:t,burnStatus:s}){const{state:n,tokens_used:a,tokens_per_day:i,limit_tokens:l,limit_confidence:r,limit_resets_at:u}=t,c=s!=null&&s.available?s.seven_day:void 0,m=c?c.utilization:l!==null?a/l:null,f=(c==null?void 0:c.resets_at)??u??null,p=m!==null?Lt(f,new Date,m):null,C=m!==null?Math.min(m,1)*100:0,_=m!==null?Math.round(m*100):null,N=p!==null&&p.B!==null?7*(1-p.B):null,S=i!==null&&l!==null&&N!==null?Math.round((a+i*N)/l*100):null,E=n==="EXCEEDED"?"red":n==="WARNING"?"amber":"green",$=n==="EXCEEDED"?"EXCEEDED":n==="WARNING"?"WARN":"ON TRACK",j=(p==null?void 0:p.deltaPts)??null,H=j!==null&&j>2?"amber":j!==null&&j<-2?"green":"neutral",V=j!==null&&j>2?`${j} pts over weekly pace`:j!==null&&j<-2?`${Math.abs(j)} pts under pace`:"on pace";return e.jsxs("div",{className:"kpi card",children:[e.jsxs("div",{className:"kpi-label",children:["BURN FORECAST"," ",e.jsx(ce,{label:"What the burn forecast shows",content:"Projects when you'll hit a usage limit at your current pace. If the date lands before the reset, slow down or switch to a cheaper model."})]}),n==="OFF"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"kpi-off","aria-label":"Forecast off",children:"● OFF"}),e.jsxs("div",{className:"kpi-off-hint",children:["Configure ",e.jsx("span",{title:":limit_tokens",children:"Weekly token limit"})," in Settings to enable burn alerting."]})]}),n!=="OFF"&&m!==null&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bfc-headline",children:[_,"% of weekly limit"]}),e.jsxs("div",{className:"bfc-meter",role:"progressbar",tabIndex:0,"aria-valuenow":Math.min(_??0,100),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${_}% of weekly limit used`,children:[e.jsx("div",{className:`bfc-meter-fill bfc-fill-${E}`,style:{width:`${C}%`}}),p!==null&&p.B!==null&&e.jsx("div",{className:"bfc-tick",style:{left:`${p.B*100}%`},"aria-hidden":"true"})]}),p!==null&&p.B!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`chip bfc-delta-chip bfc-delta-${H}`,role:"status",children:V}),e.jsxs("div",{className:"bfc-caption",children:[p.daysElapsed," of 7 days elapsed → ",p.budgetPct,"% budgeted vs"," ",p.actualPct,"% used"]})]}),e.jsxs("div",{className:"kpi-subval",children:[ae(a),l!==null&&e.jsxs(e.Fragment,{children:[" / ",ae(l)," cap-weighted"]}),f!==null&&e.jsxs(e.Fragment,{children:[" · resets ",Dt(f)]})]}),i!==null&&e.jsxs("div",{className:"kpi-subval",children:[ae(i),"/day",S!==null&&e.jsxs(e.Fragment,{children:[" · at this pace you'd end the week at ~",S,"%"]})]}),n==="COLD_START"&&e.jsx("div",{className:"kpi-subval",children:"Building baseline — need ≥7 days of data"})]}),e.jsxs("div",{className:"chips",children:[n!=="OFF"&&m!==null&&e.jsx("span",{className:`chip bfc-state-chip bfc-chip-${E}`,role:"status",children:$}),(r??null)==="low"&&e.jsx("span",{className:"chip bfc-chip-low-confidence",role:"status",children:"LOW CONFIDENCE"}),e.jsx(b,{kind:"PROXY"})]})]})}const At={NO_DATA:"var(--muted, #888)",NO_DENOMINATOR:"var(--muted, #888)",WRITE_HEAVY:"var(--amber, #f39c12)",MIXED_REUSE:"var(--accent, #5bc0de)",REUSE_DOMINANT:"var(--green, #2ecc71)"},Ot={NO_DATA:"NO DATA",NO_DENOMINATOR:"NO DENOMINATOR",WRITE_HEAVY:"WRITE HEAVY",MIXED_REUSE:"MIXED REUSE",REUSE_DOMINANT:"REUSE DOMINANT"};function ie(t){return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toLocaleString()}function Rt({state:t,forecast:s=null}){if(t.status==="loading")return e.jsx("div",{className:"kpi card","aria-busy":"true","aria-label":"Loading reuse efficiency",children:e.jsx(M,{})});if(t.status==="error")return e.jsxs("div",{className:"kpi card",children:[e.jsx("div",{className:"kpi-label",children:"REUSE EFFICIENCY"}),e.jsx("div",{className:"kpi-off",children:"N/A"}),e.jsx("div",{className:"kpi-off-hint",children:"Reuse efficiency unavailable"})]});const n=t.value.data;if(n===null||n.turns===0)return e.jsxs("div",{className:"kpi card",children:[e.jsx("div",{className:"kpi-label",children:"REUSE EFFICIENCY"}),e.jsx("div",{className:"kpi-off",children:"N/A"}),e.jsx("div",{className:"kpi-off-hint",children:"No reconciled turns in this selected window."}),e.jsx("div",{className:"chips",children:e.jsx(b,{kind:"N_A"})})]});const a=n.ratio===null?"—":`${(n.ratio*100).toFixed(1)}%`,i=n.cache_creation_tokens===0?"—":`${(n.cache_read_tokens/n.cache_creation_tokens).toFixed(1)}×`,l=At[n.reuse_band],r=Ot[n.reuse_band];return e.jsxs("div",{className:"kpi card",children:[e.jsx("div",{className:"kpi-label",children:"REUSE EFFICIENCY"}),e.jsxs("div",{className:"kpi-value",style:{color:l},children:[i,e.jsxs("span",{style:{fontSize:"0.55em",marginLeft:8,color:l},children:["— ",r]})]}),e.jsxs("div",{className:"kpi-subval",style:{marginTop:4},children:["cache read : creation · ",ie(n.cache_read_tokens)," :"," ",ie(n.cache_creation_tokens)]}),e.jsxs("div",{className:"kpi-fn",style:{marginTop:4},children:["Raw cache-read share: ",a," · diagnostic only · not a health signal"]}),e.jsxs("div",{className:"kpi-subval",style:{marginTop:6},children:["Cap-weighted draw: ",ie(n.cap_weighted_tokens)]}),e.jsxs("div",{className:"kpi-fn",style:{marginTop:4},children:["coefficient ",n.coeff_used,"× unverified · selected window excludes provisional turns"]}),n.cache_creation_tokens>0&&e.jsx("div",{className:"kpi-fn",style:{color:"var(--amber, #f39c12)",marginTop:4},children:"⚠ TTL 5m/1h volatile · active TTL unknown (run /usage to confirm)"}),e.jsxs("div",{className:"kpi-fn",style:{marginTop:4},children:["Separate limit-relative context: Burn Forecast is trailing 1-day and provisional-inclusive",s!==null?` (${s.state.replaceAll("_"," ")}).`:"."]}),e.jsx("div",{className:"chips",style:{marginTop:6},children:e.jsx(b,{kind:"LIST_EQUIV"})})]})}function Mt({hookConfig:t,isLoading:s}){return e.jsxs("div",{className:"card","data-testid":"hook-tile",style:{padding:"14px 16px"},children:[e.jsxs("div",{style:{marginBottom:10,fontWeight:700,fontSize:13,color:"var(--soft)"},children:["IN-SESSION WARNINGS"," ",e.jsx(ce,{label:"What in-session warnings do",content:"An optional local helper that warns before a conversation grows large enough to be automatically condensed. Set it up in Settings."})]}),s&&e.jsx("div",{className:"skeleton",style:{height:48,borderRadius:6},"aria-label":"Loading hook status"}),!s&&t===null&&e.jsx("div",{className:"kpi-off-hint",style:{fontSize:12},children:"Warning status is unavailable."}),!s&&t!==null&&t.installed&&e.jsxs("div",{children:[e.jsxs("div",{"data-testid":"hook-installed-badge",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"3px 10px",borderRadius:20,background:"rgba(63,166,107,.15)",color:"var(--green, #3fa66b)",fontSize:12,fontWeight:700,marginBottom:8},children:[e.jsx("span",{"aria-hidden":"true",children:"✓"})," Installed"]}),e.jsx("div",{style:{fontSize:12,color:"var(--soft)",lineHeight:1.5},children:"Warnings are on. A retry guard also watches for repeated tool-call cycles."})]}),!s&&t!==null&&!t.installed&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:12.5,color:"var(--soft)",lineHeight:1.5,marginBottom:10},children:"Set up warnings before a conversation reaches its context limit."}),e.jsx("a",{href:"#/settings",style:{display:"inline-block",padding:"4px 12px",borderRadius:6,background:"var(--teal)",color:"#fff",fontSize:12,fontWeight:700,textDecoration:"none"},"data-testid":"hook-install-cta",children:"Install in Settings →"})]})]})}function Wt(t){const s=t/1e6;return s<.01?`$${s.toFixed(4)}`:`$${s.toFixed(2)}`}function Pt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:String(t)}function Bt(t){const s=t.replace("claude-","");return s.charAt(0).toUpperCase()+s.slice(1)}function Ut(t){return t===null?"—":new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function Fe(t){return Re({workspace_id:t.workspace_id,repo_owner:t.repo_owner??null,repo_name:t.repo_name??null,repo_path:t.repo_path??null,repo_canonical:t.repo_canonical??null})}function zt(t,s){return t===void 0?null:`updated ${Math.max(0,Math.floor((s-t)/1e3))}s ago`}function Ht({sessions:t,isLoading:s,isPending:n=!1,error:a,lastFetchedAt:i,onSelectSession:l}){const r=t.length,[u,c]=o.useState(()=>Date.now()),m=zt(i,u);return o.useEffect(()=>{if(i===void 0)return;c(Date.now());const f=window.setInterval(()=>c(Date.now()),1e3);return()=>window.clearInterval(f)},[i]),e.jsx("div",{className:"live-strip-wrap",children:e.jsxs("div",{className:"live-strip",children:[e.jsxs("div",{className:"live-strip-head",children:[e.jsxs("span",{children:[e.jsx("span",{className:`live-dot${r>0?" on":""}`,"aria-hidden":"true"}),"LIVE (",r,")"]}),e.jsx("span",{className:"live-strip-freshness",children:m===null?"awaiting first refresh":m})]}),e.jsxs("div",{"aria-live":"polite","aria-label":"Live sessions",children:[s&&e.jsx(St,{height:48}),!n&&!s&&a!==null&&e.jsxs("div",{className:"empty-state",children:[e.jsx("span",{className:"empty-state-icon","aria-hidden":"true",children:"⚠"}),e.jsx("span",{className:"empty-state-text",children:"Live session data unavailable — will retry"})]}),!n&&!s&&a===null&&r===0&&e.jsx("div",{className:"live-strip-empty",children:e.jsx(Et,{headline:"No active sessions",why:"The daemon is connected, but no observed Claude Code session is running.",whatWillAppear:"Live cost, context, and model aggregates will appear while a session is active.",command:"claude"})}),!n&&!s&&r>0&&e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Workspace"}),e.jsx("th",{children:"Running cost"}),e.jsx("th",{children:"Context"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Started"})]})}),e.jsx("tbody",{children:t.map(f=>e.jsxs("tr",{className:"live-row-live",children:[e.jsx("td",{children:l===void 0?Fe(f):e.jsx("button",{type:"button",className:"live-session-link",onClick:()=>l(f.session_id),children:Fe(f)})}),e.jsxs("td",{children:[Wt(f.running_usd_u)," ",e.jsx(b,{kind:"LIVE",label:"LIVE"})]}),e.jsx("td",{children:Pt(f.current_context_tokens)}),e.jsx("td",{children:Bt(f.model)}),e.jsx("td",{children:Ut(f.started_at)})]},f.session_id))})]})]})]})})}function Vt(t){return t>=.85?"red":t>=.6?"amber":"green"}function qt(t){return t==="red"?"var(--red, #e05252)":t==="amber"?"var(--amber, #d4a017)":"var(--green, #3fa66b)"}function Kt(t){try{return new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return t}}function Le({label:t,utilization:s,resetsAt:n}){const a=Math.round(s*100),i=Vt(s),l=qt(i),r=Math.min(s*100,100);return e.jsxs("div",{style:{minWidth:0},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[e.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--soft)"},children:t}),e.jsxs("span",{style:{fontSize:13,fontWeight:700,color:l},"aria-label":`${t} utilization ${a}%`,children:[a,"%"]})]}),e.jsx("div",{role:"progressbar",tabIndex:0,"aria-label":`${t} rate-limit utilization`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,style:{height:8,borderRadius:4,background:"rgba(132,146,166,.18)",overflow:"hidden",marginBottom:4},children:e.jsx("div",{"aria-hidden":"true",style:{width:`${r}%`,minWidth:r>0?3:0,height:"100%",background:l,borderRadius:"4px 0 0 4px",transition:"width 0.3s ease"}})}),e.jsxs("div",{style:{fontSize:11,color:"var(--muted)"},children:["resets ",Kt(n)]})]})}function Xt({burnStatus:t,isLoading:s}){return e.jsxs("div",{className:"card","data-testid":"rate-limit-gauges",style:{padding:"14px 16px"},children:[e.jsxs("div",{style:{marginBottom:10,fontWeight:700,fontSize:13,color:"var(--soft)"},children:["CLAUDE USAGE LIMITS"," ",e.jsx(ce,{label:"What these usage bars show",content:"How much of each Claude usage period you have used. Check the 7-day bar before starting work that can wait, so you do not run out before it resets."})]}),s&&e.jsx("div",{className:"skeleton",style:{height:48,borderRadius:6},"aria-label":"Loading rate-limit data"}),!s&&t===null&&e.jsxs("div",{className:"kpi-off-hint",style:{fontSize:12},children:[e.jsx("div",{children:"Current Claude usage is unavailable."}),e.jsx("a",{href:"#/settings",style:{color:"var(--teal)"},"data-testid":"gauges-calibrate-link",children:"Calibrate from usage in Settings →"})]}),!s&&t!==null&&!t.available&&e.jsxs("div",{style:{fontSize:12.5,color:"var(--soft)"},children:[e.jsx("span",{children:"Signed out — "}),e.jsx("a",{href:"#/settings",style:{color:"var(--teal)"},children:"Set up usage tracking in Settings"}),e.jsx("div",{style:{fontSize:11,color:"var(--muted)",marginTop:4},children:t.reason??"Sign in to Claude Code to see current usage."})]}),!s&&(t==null?void 0:t.available)&&e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16},children:[t.five_hour&&e.jsx(Le,{label:"5-hour",utilization:t.five_hour.utilization,resetsAt:t.five_hour.resets_at}),t.seven_day&&e.jsx(Le,{label:"7-day",utilization:t.seven_day.utilization,resetsAt:t.seven_day.resets_at})]})]})}function Me(t){return`$${(t/1e6).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function re(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${Math.round(t/1e3)}K`:t.toLocaleString("en-US")}function Yt(t){const s=l=>{const r=t.evidence[l];return typeof r=="number"&&Number.isFinite(r)?r:null},n=s("source_tokens"),a=s("source_target");if(n!==null&&a!==null)return`${re(n)} always-loaded vs ${re(a)} target`;const i=s("delta_context_tokens");return i!==null?`−${re(i)} tokens/turn`:t.modeled_savings_u_per_wk!==null&&t.detector_id!=="D4"?`${Me(t.modeled_savings_u_per_wk)}/wk modeled`:null}function De(t){return t===null?null:t.buckets.reduce((s,n)=>s+n.cost_equiv_u,0)}function We(t,s){if(t===null||s===null)return{direction:"unavailable",label:"Prior window unavailable"};if(s===0&&t===0)return{direction:"flat",label:"No change vs prior"};if(s===0)return{direction:"new",label:"New spend vs prior"};const n=(t-s)/s;if(Math.abs(n)<.005)return{direction:"flat",label:"No material change vs prior"};const a=`${Math.abs(n*100).toFixed(1)}%`;return n>0?{direction:"up",label:`${a} higher vs prior`}:{direction:"down",label:`${a} lower vs prior`}}function Pe({delta:t}){return e.jsx("span",{className:`window-delta window-delta-${t.direction}`,children:t.label})}function Be({values:t,label:s}){const n=t.filter(u=>Number.isFinite(u));if(n.length<2)return e.jsx("span",{className:"trend-sparkline-empty",children:"Trend unavailable"});const a=Math.max(...n),i=Math.min(...n),l=a-i||1,r=n.map((u,c)=>`${c/(n.length-1)*100},${28-(u-i)/l*24}`).join(" ");return e.jsx("svg",{className:"trend-sparkline",viewBox:"0 0 100 32",role:"img","aria-label":s,preserveAspectRatio:"none",children:e.jsx("polyline",{points:r,fill:"none",stroke:"currentColor",strokeWidth:"2.4",vectorEffect:"non-scaling-stroke"})})}function Gt({value:t}){const[s,n]=o.useState(t??0),a=o.useRef(t??0);return o.useEffect(()=>{if(t===null)return;const i=a.current,l=performance.now();let r=0;const u=c=>{const m=Math.min((c-l)/560,1);n(i+(t-i)*(1-(1-m)**3)),m<1?r=requestAnimationFrame(u):a.current=t};return r=requestAnimationFrame(u),()=>cancelAnimationFrame(r)},[t]),e.jsx("div",{className:"verdict-band-value",children:t===null?"—":Me(s)})}function Qt({preset:t,trend:s,priorTrend:n,isLoading:a,topRecommendation:i}){const l=De(s),r=De(n),u=We(l,r),c=(s==null?void 0:s.buckets.map(E=>E.cost_equiv_u))??[],m=(i==null?void 0:i.title)??(i==null?void 0:i.lever)??"No active waste source detected",f=i===null?null:Yt(i),p=i===null?null:Ct(i),C=i===null?"#/recommendations":`#/recommendations?focus=${encodeURIComponent(i.rec_id)}`,[_,N]=o.useState(!1);function S(){p!==null&&navigator.clipboard.writeText(p.text).then(()=>{N(!0),setTimeout(()=>N(!1),2e3)})}return e.jsxs("section",{className:"verdict-band card","aria-labelledby":"verdict-band-title","aria-busy":a,children:[e.jsxs("div",{className:"verdict-band-summary",children:[e.jsxs("div",{children:[e.jsx("div",{className:"verdict-band-label",id:"verdict-band-title",children:"Usage this period"}),e.jsx(Gt,{value:l}),e.jsxs("div",{className:"verdict-band-caption",children:[t.toUpperCase()," list-price equivalent"]})]}),e.jsx(Pe,{delta:u})]}),e.jsxs("div",{className:"verdict-band-trend",children:[e.jsx(Be,{values:c,label:`${t} spend trend`}),e.jsx("span",{children:"Selected-window spend trend"})]}),e.jsxs("div",{className:"verdict-band-detail",children:[e.jsx("strong",{children:"Suggested next step:"})," ",m,f!==null&&e.jsxs("span",{className:"verdict-band-claim",children:[" · ",f]})]}),p!==null&&e.jsx("textarea",{className:"prompt-code verdict-prompt","aria-label":"Fix prompt",readOnly:!0,value:p.text}),e.jsxs("div",{className:"verdict-band-actions",children:[p!==null&&e.jsx("button",{type:"button",className:"verdict-band-copy",onClick:S,children:_?"Copied ✓":"Copy fix prompt"}),e.jsx("a",{className:"verdict-band-action",href:C,children:i===null?"Review recommendations →":"Review suggestion →"})]})]})}const Jt={D1:"Always-loaded instructions",D2:"Long sessions",D4:"Model choice",D5:"Usage-limit warning",D6:"Large tool results",D8:"Repeated cache rebuilds",D9:"Background-agent work",D10:"Always-loaded tools"};function $e(t){return`$${(t/1e6).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Zt(t){return`${(t*100).toFixed(1)}%`}function es(t){return t===null?"—":`$${t.toFixed(3)}`}function ts(t){return Re({workspace_id:t.workspace_id,repo_owner:t.repo_owner??null,repo_name:t.repo_name??null,repo_path:t.repo_path??null,repo_canonical:t.repo_canonical??null})}function ss({workspaces:t,globalCostU:s,globalTurns:n,isLoading:a,topRecByWorkspace:i,teaser:l=!1}){const r=n>0?s/1e6/n:null;return e.jsxs("div",{className:"card",style:{marginBottom:13},children:[e.jsxs("div",{className:"section-head",children:[e.jsx("h2",{children:l?"Top Workspaces":"Workspace Comparison"}),e.jsx("span",{className:"section-meta",children:e.jsx(b,{kind:"LIST_EQUIV"})})]}),e.jsx("div",{className:"table-wrap",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Workspace"}),e.jsx("th",{children:"Est. value"}),e.jsx("th",{children:"Share of total"}),e.jsx("th",{children:"Active now"}),e.jsx("th",{children:"Est. value / turn"}),e.jsx("th",{children:"Best next improvement"})]})}),e.jsxs("tbody",{children:[a&&e.jsxs(e.Fragment,{children:[e.jsx(D,{cols:6}),e.jsx(D,{cols:6}),e.jsx(D,{cols:6})]}),!a&&t.map(u=>e.jsxs("tr",{children:[e.jsxs("td",{children:[ts(u),u.has_live&&e.jsx("span",{className:"nav-dot",style:{marginLeft:6,display:"inline-block"},"aria-label":"has live session"})]}),e.jsx("td",{children:$e(u.cost_equiv_u)}),e.jsx("td",{children:Zt(u.cost_share)}),e.jsx("td",{children:u.has_live?"● live":"0"}),e.jsx("td",{children:es(u.usd_per_turn)}),e.jsx("td",{children:(()=>{const c=i==null?void 0:i.get(u.workspace_id);return c===void 0?e.jsx(b,{kind:"N_A",label:"—"}):e.jsx(b,{kind:"EXPERIMENTAL",label:`${Jt[c.detector_id]??c.detector_id} · ${c.state.toLowerCase()}`})})()})]},u.workspace_id))]}),!a&&t.length>0&&!l&&e.jsx("tfoot",{children:e.jsxs("tr",{className:"total-row",children:[e.jsx("td",{children:"TOTAL (global)"}),e.jsx("td",{children:$e(s)}),e.jsx("td",{children:"100%"}),e.jsx("td",{children:"—"}),e.jsx("td",{children:r!==null?`~$${r.toFixed(3)}`:"—"}),e.jsx("td",{})]})})]})}),l&&e.jsx("div",{style:{textAlign:"right",padding:"4px 0 2px"},children:e.jsxs("a",{href:"#/workspaces",style:{fontSize:12.5,color:"var(--teal)"},"data-testid":"all-workspaces-link",children:["All workspaces ","→"]})}),e.jsxs("div",{className:"table-footnotes",children:["¹"," Spend = list-price equivalent (LIST_EQUIV) ","—"," not billing data. ","²"," Top waste source = highest-modeled active DetectorEngine recommendation scoped to this workspace (EXPERIMENTAL); ","“—”"," = none."]})]})}const ns=o.lazy(()=>oe(()=>import("./CacheWriteSpikesChart-Fufucloe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),as=o.lazy(()=>oe(()=>import("./FlavorDecomposition-DaFuiY-s.js"),__vite__mapDeps([11,1,2,3,4,5,6,12,10]))),is=o.lazy(()=>oe(()=>import("./TrendChart-vycHn5rQ.js"),__vite__mapDeps([13,1,2,14,3,4,5,6,12,10,8,9,15]))),rs="ℹ List-price equivalents only — Max/Team plans are NOT billed this way. Tokens drive rate limits. Check /usage or the status-line 5h/7d % for your real budget signal.",ls=300;function le(t,s){const n=kt(t,s);return n===void 0?{status:"loading"}:{status:"ok",value:n}}function T(t){t(s=>s.status==="ok"?s:{status:"loading"})}function Ue({status:t}){return t.scan_state==="failed"?e.jsxs("p",{role:"alert",children:["Initial scan failed. Review ",e.jsx("a",{href:"#/settings?section=parser-health",children:"parser health"})," and restart the daemon."]}):(t.invalid_scan_root_count??0)>0?e.jsxs("p",{role:"alert",children:[t.invalid_scan_root_count," scan root(s) are missing or unreadable. Review"," ",e.jsx("a",{href:"#/settings?section=scan-roots",children:"scan roots"}),", save corrections, and restart the daemon."]}):t.scan_state==="scanning"?e.jsxs("p",{children:["Scanning… ",t.files_parsed," of ",t.files_seen," files"]}):(t.lines_quarantined??0)>0?e.jsxs("p",{role:"alert",children:[t.lines_quarantined," transcript line(s) could not be parsed. Review"," ",e.jsx("a",{href:"#/settings?section=parser-health",children:"parser health"}),"."]}):t.scan_state==="complete"&&t.sessions===0?e.jsxs("p",{children:["Scan complete — no readable sessions found. Run a Claude Code session or review"," ",e.jsx("a",{href:"#/settings?section=scan-roots",children:"scan roots"}),"."]}):t.scan_state===void 0?e.jsx("p",{children:"Scan completion status is unavailable. Restart with the updated daemon to see scan progress."}):null}function os({status:t,limitCalibrated:s,tokenConfigured:n,hookInstalled:a}){const i=t.sessions>0,l=[{label:"Daemon running",complete:!0},{label:"First session ingested",complete:i}],r=l.filter(c=>c.complete).length,u=[{key:"calibrate",show:!s,text:"Calibrate your weekly limit from usage so burn forecasts have a real ceiling to project against.",href:"#/settings?section=calibration",cta:"Calibrate in Settings →",testid:"first-run-calibrate"},{key:"token",show:!n,text:"Optionally install the gh CLI and set a read-only AW_GITHUB_TOKEN to cross-check local work with GitHub outcomes.",href:"#/settings?section=outcomes-sync",cta:"Configure token in Settings →",testid:"first-run-token"},{key:"hook",show:!a,text:"Install the context-budget hook to get warned in-session before a costly auto-compact.",href:"#/settings?section=in-session-guards",cta:"Install in Settings →",testid:"first-run-hook"}].filter(c=>c.show);return e.jsxs("section",{className:"settings-onboarding-card","aria-labelledby":"first-run-welcome-title",children:[e.jsx("h2",{id:"first-run-welcome-title",children:"Welcome to AgentWrangler"}),e.jsx("p",{children:"Turn local Claude Code activity into clear, actionable guidance."}),e.jsxs("p",{"aria-label":`${r} of 2 onboarding steps complete`,children:[r," of 2"]}),e.jsx("ol",{children:l.map(c=>e.jsxs("li",{children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:c.complete,readOnly:!0})," ",c.label]}),c.label==="First session ingested"&&!i&&e.jsxs("p",{className:"first-run-step-hint","data-testid":"first-run-ingest-hint",children:["Run any ",e.jsx("code",{children:"claude"})," session — the daemon tails its transcript live."]})]},c.label))}),e.jsx(Ue,{status:t}),u.length>0&&e.jsxs("div",{className:"first-run-activation","data-testid":"first-run-activation",children:[e.jsx("h3",{className:"first-run-activation-title",children:"Activate the rest"}),e.jsx("ul",{children:u.map(c=>e.jsxs("li",{"data-testid":c.testid,children:[e.jsx("span",{children:c.text})," ",e.jsx("a",{href:c.href,children:c.cta})]},c.key))})]}),e.jsxs("p",{className:"first-run-glossary-link",children:["New to these numbers?"," ",e.jsx("a",{href:"#/glossary","data-testid":"first-run-glossary-link",children:"How to read this dashboard →"})]})]})}function cs(t){return`$${(t/1e6).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function ze(t){const s=t.replace("claude-","");return s.charAt(0).toUpperCase()+s.slice(1)}function Ae(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(Math.round(t))}function ds({overview:t,preset:s,trends:n,priorTrends:a}){const i=(n==null?void 0:n.buckets.reduce((r,u)=>r+u.cost_equiv_u,0))??null,l=(a==null?void 0:a.buckets.reduce((r,u)=>r+u.cost_equiv_u,0))??null;return e.jsxs("div",{className:"kpi kpi-secondary card",children:[e.jsxs("div",{className:"kpi-label-row",children:[e.jsxs("div",{className:"kpi-label",children:[s.toUpperCase()," SPEND-EQUIV"]}),e.jsx(Pe,{delta:We(i,l)})]}),e.jsx("div",{className:"kpi-value",children:cs(t.cost_equiv_u)}),e.jsx(Be,{values:(n==null?void 0:n.buckets.map(r=>r.cost_equiv_u))??[],label:`${s} spend trend`}),e.jsxs("div",{className:"kpi-subval",children:[t.turns.toLocaleString()," in-window turns · ",t.turns_total.toLocaleString()," ","total"]}),t.unpriced_turns>0&&e.jsxs("div",{className:"kpi-subval",style:{color:"var(--amber)"},children:["⚠ ",t.unpriced_turns," unpriced turns"]}),e.jsx("div",{className:"chips",children:e.jsx(b,{kind:"LIST_EQUIV"})})]})}function us({rows:t}){const s=t.reduce((n,a)=>n+a.turns,0);return s===0||t.length===0?null:e.jsxs("p",{className:"kpi-fn",style:{marginTop:4},children:["Model mix:"," ",t.map(n=>`${ze(n.model)} ${(n.turns/s*100).toFixed(1)}%`).join(" · ")," ","· ",e.jsx(b,{kind:"EXACT",label:"EXACT"})]})}function hs({rows:t}){return e.jsxs("div",{className:"card","data-testid":"context-per-turn-section",style:{padding:"16px 18px",marginBottom:13},children:[e.jsxs("div",{className:"section-head",children:[e.jsx("h2",{children:"Context / Turn"}),e.jsx("div",{className:"chips",children:e.jsx(b,{kind:"OBS_PROXY"})})]}),t.length===0?e.jsx("div",{className:"banner banner-info",children:e.jsx("span",{children:"No context-per-turn data in this window."})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-testid":"context-per-turn-grid",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:14},children:t.map((s,n)=>{const a=ze(s.model),i=s.avg_context_per_turn>0?s.avg_output_per_turn/s.avg_context_per_turn*100:0,l=Math.max(0,Math.min(i,100));return e.jsxs("div",{"data-testid":"context-per-turn-cell",style:{background:"var(--panel2)",border:"1px solid var(--line)",borderRadius:10,padding:"12px 14px",minWidth:0},children:[e.jsxs("div",{style:{color:"var(--soft)",fontSize:12,fontWeight:600,marginBottom:6,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:z[n%z.length],marginRight:6}}),a]}),e.jsxs("div",{style:{fontSize:22,fontWeight:700,letterSpacing:"-0.01em"},children:[Ae(s.avg_context_per_turn),e.jsx("span",{style:{fontSize:12,color:"var(--muted)",marginLeft:4},children:"ctx"})]}),e.jsxs("div",{style:{fontSize:12.5,color:"var(--soft)",margin:"2px 0 8px"},children:[Ae(s.avg_output_per_turn)," out"]}),e.jsx("div",{role:"progressbar",tabIndex:0,"aria-label":`Output is ${i.toFixed(1)}% of context for ${a}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l,style:{height:10,borderRadius:5,background:"rgba(132,146,166,.18)",overflow:"hidden"},children:e.jsx("div",{"aria-hidden":"true",style:{width:`${l}%`,minWidth:l>0?3:0,height:"100%",background:z[n%z.length],borderRadius:"5px 0 0 5px"}})}),e.jsxs("div",{style:{fontSize:11,color:"var(--muted)",marginTop:5},children:["output = ",i.toFixed(1),"% of context"]}),e.jsx("div",{className:"chips",style:{marginTop:6},children:e.jsx(b,{kind:"OBS_PROXY"})})]},s.model)})}),e.jsx("p",{style:{margin:"12px 0 0",fontSize:12.5,color:"var(--soft)",borderLeft:"3px solid var(--teal)",paddingLeft:10},children:"Context : Output ratio — if output is a small fraction of context, you're paying mostly to re-read history, not to generate. Consider more frequent /clear."})]})]})}function _s({onSelectSession:t}){var Ne,Se,Ee;const[s,n]=o.useState(()=>{try{return typeof window>"u"||window.localStorage.getItem("aw-caveat-dismissed")!=="1"}catch{return!0}}),[a,i]=o.useState("7d"),[l,r]=o.useState(a),[u,c]=o.useState(a),[m,f]=o.useState(()=>le("/api/overview",{preset:l})),[p,C]=o.useState(()=>le("/api/workspaces",{preset:u})),[_,N]=o.useState(()=>le("/api/live")),[S,E]=o.useState({status:"pending"}),[$,j]=o.useState(!1),[H,V]=o.useState(()=>Te("/api/live")),[He,de]=o.useState(null),[Ve,ue]=o.useState(!1),[he,qe]=o.useState(null),[Ke,pe]=o.useState(!0),[W,me]=o.useState(null),[Xe,Ye]=o.useState(!0),[Ge,fe]=o.useState(!1),[q,xe]=o.useState([]),[K,Qe]=o.useState(!0),[Je,ge]=o.useState(new Map),[P,X]=o.useState({status:"loading"}),[Y,B]=o.useState({status:"loading"}),[Ze,ve]=o.useState(null),[et,je]=o.useState(null),[tt,G]=o.useState({status:"loading"}),[st,U]=o.useState({status:"loading"}),[nt,Q]=o.useState({status:"loading"});o.useEffect(()=>{const d=window.setTimeout(()=>j(!0),ls);return()=>window.clearTimeout(d)},[]);const J=o.useCallback(d=>{const k={preset:d};T(f),T(C),mt(k).then(h=>{f({status:"ok",value:h}),r(d)}).catch(h=>{f({status:"error",message:String(h)}),r(d)}),ft(k).then(h=>{C({status:"ok",value:h}),c(d)}).catch(h=>{C({status:"error",message:String(h)}),c(d)}),T(X),T(B),Ie(k).then(h=>{X({status:"ok",value:h});const{from:v,to:w}=h.meta.window,O=Date.parse(w)-Date.parse(v);return Ie({from:new Date(Date.parse(v)-O).toISOString(),to:v}).then(L=>B({status:"ok",value:L})).catch(L=>B({status:"error",message:String(L)}))}).catch(h=>{X({status:"error",message:String(h)}),B({status:"error",message:String(h)})}),T(G),T(U),xt(k).then(h=>{G({status:"ok",value:h});const v=h.data;if(v!==null){const w={ratio:v.cache_read_share,cache_read_tokens:v.cache_read_tokens,cache_creation_tokens:v.cache_creation_tokens,reuse_band:v.reuse_band,cap_weighted_tokens:v.cap_weighted_tokens,coeff_used:v.coeff_used,coeff_unverified:v.coeff_unverified,turns:v.turns};U({status:"ok",value:{...h,data:w}})}else U({status:"ok",value:{...h,data:null}})}).catch(h=>{G({status:"error",message:String(h)}),U({status:"error",message:String(h)})}),T(Q),gt(k).then(h=>Q({status:"ok",value:h})).catch(h=>Q({status:"error",message:String(h)})),vt().then(h=>{var L;const v=((L=h.data)==null?void 0:L.active)??[],w=h.data;je(w==null?null:w.active.length+w.limit_warnings.length+w.adopted.length+w.dismissed.length>0),ve(v.reduce((y,R)=>y===null||(R.modeled_savings_u_per_wk??-1)>(y.modeled_savings_u_per_wk??-1)?R:y,null));const O=new Map;for(const y of v){if(y.scope_workspace_id===null)continue;const R=O.get(y.scope_workspace_id),Ce=y.modeled_savings_u_per_wk??-1;(R===void 0||Ce>(R.savings??-1))&&O.set(y.scope_workspace_id,{detector_id:y.detector_id,state:y.state,savings:Ce})}ge(O)}).catch(()=>{ge(new Map),ve(null),je(null)})},[]);o.useEffect(()=>{J(a)},[a,J]),se(yt,3e4,d=>{E(d===void 0?{status:"error",message:"Status response was empty"}:{status:"ok",value:d})},d=>{E(k=>k.status==="ok"?k:{status:"error",message:String(d)})}),se(wt,3e4,d=>{N({status:"ok",value:d}),V(Te("/api/live")),de(null)},d=>{de(String(d)),N(k=>k.status==="ok"?k:{status:"error",message:String(d)})}),se(Nt,6e4,d=>{qe(d.data),pe(!1),ue(!1)},()=>{pe(!1),ue(!0)}),o.useEffect(()=>{jt().then(d=>me(d.data)).catch(()=>me(null)).finally(()=>Ye(!1)),bt().then(d=>xe(d.slice(0,3))).catch(()=>xe([])).finally(()=>Qe(!1)),Promise.resolve(_t()).then(d=>fe((d==null?void 0:d.configured)??!1)).catch(()=>fe(!1))},[]);const at=()=>J(a),it=()=>{try{window.localStorage.setItem("aw-caveat-dismissed","1")}catch{}n(!1)},Z=l===a,ee=u===a,g=Z&&m.status==="ok"?m.value.data:null,be=P.status==="ok"?P.value.data:null,_e=Y.status==="ok"?Y.value.data:null,rt=ee&&p.status==="ok"?((Ne=p.value.data)==null?void 0:Ne.items)??[]:[],lt=_.status==="ok"?((Se=_.value.data)==null?void 0:Se.items)??[]:[],x=S.status==="ok"?S.value:null,te=S.status==="pending",I=(x==null?void 0:x.sessions)===0,F=m.status==="loading"||!Z,ke=p.status==="loading"||!ee,A=_.status==="loading",ot=F&&$,ct=ke&&$,dt=A&&$,ye=Z&&m.status==="error"?m.message:null,ut=ee&&p.status==="error"?p.message:null,ht=_.status==="error"?_.message:null,we=ye??ut;return e.jsxs("div",{children:[e.jsxs("div",{className:"page-top",children:[e.jsxs("div",{className:"page-title",children:[e.jsx("h1",{children:"Overview"}),e.jsx("p",{className:"page-sub",children:"Where your tokens go · burn forecast · live sessions"})]}),e.jsxs("div",{className:"page-top-controls",children:[e.jsx("div",{className:"date-range","aria-label":"Date range",children:["24h","7d","30d"].map(d=>e.jsx("button",{type:"button",className:`date-preset-btn${a===d?" active":""}`,onClick:()=>i(d),"aria-pressed":a===d,children:d},d))}),s&&e.jsxs("div",{className:"banner banner-info",children:[e.jsx("span",{children:rs}),e.jsx("button",{className:"banner-dismiss",type:"button","aria-label":"Dismiss usage caveat",onClick:it,children:"✕"})]})]})]}),e.jsx(It,{}),we!==null&&e.jsxs("div",{className:"banner banner-error",role:"alert","aria-live":"assertive",children:[e.jsxs("span",{children:["⚠ Daemon unreachable — ",we]}),e.jsx("button",{className:"banner-retry",type:"button",onClick:at,children:"Retry"})]}),e.jsx(Qt,{preset:a,trend:be,priorTrend:_e,isLoading:P.status==="loading"||Y.status==="loading",topRecommendation:Ze}),e.jsxs("div",{"data-testid":"rv7-tile-row",style:{display:"grid",gridTemplateColumns:"1fr 1fr 2fr",gap:12,marginBottom:13},children:[e.jsxs("div",{children:[e.jsx(Xt,{burnStatus:he,isLoading:Ke}),Ve&&e.jsx("output",{children:"Burn status refresh failed; displayed data may be stale. Will retry."})]}),e.jsx(Mt,{hookConfig:W,isLoading:Xe}),e.jsxs("div",{className:"card","data-testid":"hot-sessions-tile",style:{padding:"14px 16px"},children:[e.jsx("div",{style:{marginBottom:10,fontWeight:700,fontSize:13,color:"var(--soft)"},children:"HOT SESSIONS"}),K&&e.jsx("div",{className:"skeleton",style:{height:64,borderRadius:6},"aria-label":"Loading hot sessions"}),!K&&q.length===0&&e.jsx("div",{className:"kpi-off-hint",style:{fontSize:12},children:"No sessions yet."}),!K&&q.length>0&&e.jsxs("div",{children:[q.map(d=>e.jsxs("button",{type:"button","data-testid":`hot-session-row-${d.session_id}`,onClick:()=>t==null?void 0:t(d.session_id),style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"5px 0",background:"none",border:"none",borderBottom:"1px solid var(--line)",cursor:"pointer",textAlign:"left"},children:[e.jsxs("span",{style:{fontSize:12,color:"var(--text)",fontFamily:"monospace"},children:[d.session_id.slice(0,12),"…"]}),e.jsxs("span",{style:{fontSize:12,color:"var(--amber)",fontWeight:600},children:["$",(d.cost_equiv_u/1e6).toFixed(2)]})]},d.session_id)),e.jsx("div",{style:{textAlign:"right",marginTop:6},children:e.jsx("a",{href:"#/sessions",style:{fontSize:12,color:"var(--teal)"},children:"All sessions →"})})]})]})]}),!I&&x!==null&&e.jsx(Ue,{status:x}),!I&&(x==null?void 0:x.scan_state)==="complete"&&((x==null?void 0:x.sessions)??0)>0&&((x==null?void 0:x.lines_quarantined)??0)===0&&((x==null?void 0:x.invalid_scan_root_count)??0)===0&&et===!1&&e.jsxs("p",{children:["Setup complete — your history is ready and no recommendations were found."," ",e.jsx("a",{href:"#/sessions",children:"Read an ingested session"}),"; optional integrations are not required."]}),I&&x!==null&&e.jsx(os,{status:x,limitCalibrated:(((Ee=g==null?void 0:g.forecast)==null?void 0:Ee.state)??"OFF")!=="OFF",tokenConfigured:Ge,hookInstalled:(W==null?void 0:W.installed)??!1}),!I&&(te||ot)?e.jsxs("div",{className:"kpi-grid","aria-busy":"true","aria-label":"Loading overview data",children:[e.jsx(M,{}),e.jsx(M,{}),e.jsx(M,{}),e.jsx(M,{})]}):null,!te&&!I&&!F&&g!==null&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"section-head",children:e.jsx("h2",{children:"Two meters, several tanks"})}),e.jsx("p",{className:"section-subtitle",children:"Watch spend and your configured limit together; each answers a different question."}),e.jsx("p",{className:"kpi-fn",style:{marginTop:2,marginBottom:8},children:"Absolute cap values are unpublished (Anthropic publishes only relative multipliers). Which cap you're hitting is visible only in /usage."}),e.jsxs("div",{className:"kpi-grid overview-secondary-kpis",children:[e.jsx(ds,{overview:g,preset:a,trends:be,priorTrends:_e}),e.jsx($t,{forecast:g.forecast,burnStatus:he})]}),e.jsx(us,{rows:g.model_mix}),e.jsx(hs,{rows:g.context_per_turn})]}),!te&&!I&&!F&&ye===null&&g===null&&e.jsx("div",{className:"banner banner-info",children:e.jsx("span",{children:"No spend data in this window."})}),e.jsx(Ht,{sessions:lt,isLoading:dt,isPending:A,error:He??ht,lastFetchedAt:H,onSelectSession:t}),e.jsx("div",{className:"section-head",children:e.jsx("h2",{children:"Where your tokens go"})}),e.jsx("p",{className:"section-subtitle",children:"Use these breakdowns to see which usage patterns are driving the total."}),e.jsx(Rt,{state:st,forecast:(g==null?void 0:g.forecast)??null}),e.jsx(ne,{label:"token breakdown",ready:!F&&!A,children:e.jsx(as,{state:tt})}),e.jsx(ne,{label:"cache writes chart",ready:!F&&!A,children:e.jsx(ns,{state:nt})}),ct?e.jsxs("div",{className:"card",style:{marginBottom:13},children:[e.jsx("div",{className:"section-head",children:e.jsx("h2",{children:"Top Workspaces"})}),e.jsx("div",{className:"table-wrap","aria-busy":"true","aria-label":"Loading workspace data",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Workspace"}),e.jsx("th",{children:"Spend"}),e.jsx("th",{children:"Share"}),e.jsx("th",{children:"Live now"}),e.jsx("th",{children:"$/turn"}),e.jsx("th",{children:"Top waste source"})]})}),e.jsxs("tbody",{children:[e.jsx(D,{cols:6}),e.jsx(D,{cols:6}),e.jsx(D,{cols:6})]})]})})]}):ke?null:e.jsx(ss,{workspaces:rt.slice(0,3),globalCostU:(g==null?void 0:g.cost_equiv_u)??0,globalTurns:(g==null?void 0:g.turns)??0,isLoading:!1,topRecByWorkspace:Je,teaser:!0}),e.jsx(ne,{label:"spend trends chart",ready:!F&&!A,children:e.jsx(is,{state:P})})]})}export{_s as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CacheWriteSpikesChart-1Nfnf7OX.js","assets/index-DhFiA8Ch.js","assets/index-D_IJsvkJ.css","assets/Chip-s-32Dh3o.js","assets/Skeleton-Dp_m79B8.js","assets/chart-theme-DYgw_Tac.js","assets/CartesianChart-DEnDOGKj.js","assets/ComposedChart-DUw8Y79v.js","assets/Legend-CB7sqqJH.js","assets/Scatter-BSWm_yIZ.js","assets/graphicalItemSelectors-0-Ue_y1f.js","assets/FlavorDecomposition-CkHX3M-U.js","assets/BarChart-CIjCNfbI.js","assets/TrendChart-BSLwlBiq.js","assets/workspace-label-CysPJNc0.js","assets/Line-B9XY30uT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as o,j as e,L as pt,g as Te,f as mt,a as ft,e as Ie,h as xt,b as gt,c as vt,u as se,i as jt,d as bt,k as _t,l as kt,_ as oe,m as yt,n as wt,o as Nt}from"./index-DhFiA8Ch.js";import{C as b,K as Oe}from"./Chip-s-32Dh3o.js";import{S as M,a as St,b as D}from"./Skeleton-Dp_m79B8.js";import{I as ce}from"./InfoTip-CL8RC4vz.js";import{w as Re}from"./workspace-label-CysPJNc0.js";import{E as Et}from"./EmptyState-B8vpug3_.js";import{b as Ct}from"./prompt-templates-CVzMex9L.js";import{s as z}from"./chart-theme-DYgw_Tac.js";const Tt=Object.keys(Oe);function It(){const[t,s]=o.useState(!1),n=o.useId();return e.jsxs("div",{className:"chip-legend",children:[e.jsx("button",{className:"chip-legend-toggle",type:"button","aria-controls":n,"aria-expanded":t,onClick:()=>s(a=>!a),children:"ℹ How certain is this?"}),t&&e.jsx("section",{className:"chip-legend-panel",id:n,"aria-label":"What the labels mean",children:e.jsx("ul",{className:"chip-legend-list",children:Tt.map(a=>e.jsxs("li",{className:"chip-legend-item",children:[e.jsx(b,{kind:a}),e.jsx("span",{children:Oe[a]})]},a))})})]})}function ne({children:t,label:s,ready:n=!0}){const a=o.useRef(null),[i,l]=o.useState(!1);return o.useEffect(()=>{if(i||!n)return;if(typeof IntersectionObserver>"u"){l(!0);return}const r=new IntersectionObserver(u=>{u.some(c=>c.isIntersecting)&&(l(!0),r.disconnect())},{rootMargin:"200px"});return a.current&&r.observe(a.current),()=>r.disconnect()},[i,n]),e.jsx("div",{ref:a,style:{minHeight:320},children:i?e.jsx(pt,{label:s,children:t}):e.jsxs("button",{type:"button",onClick:()=>l(!0),children:["Load ",s]})})}function Ft(t,s,n){return Math.max(s,Math.min(n,t))}function Lt(t,s,n){const a=Math.round(n*100);if(t===null)return{B:null,budgetPct:null,actualPct:a,deltaPts:null,daysElapsed:null};const l=Date.parse(t)-7*864e5,r=Ft((s.getTime()-l)/(7*864e5),0,1);return{B:r,budgetPct:Math.round(r*100),actualPct:a,deltaPts:Math.round(n*100-r*100),daysElapsed:Math.round(r*7*10)/10}}function ae(t){return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toLocaleString()}function Dt(t){return new Date(t).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})}function $t({forecast:t,burnStatus:s}){const{state:n,tokens_used:a,tokens_per_day:i,limit_tokens:l,limit_confidence:r,limit_resets_at:u}=t,c=s!=null&&s.available?s.seven_day:void 0,m=c?c.utilization:l!==null?a/l:null,f=(c==null?void 0:c.resets_at)??u??null,p=m!==null?Lt(f,new Date,m):null,C=m!==null?Math.min(m,1)*100:0,_=m!==null?Math.round(m*100):null,N=p!==null&&p.B!==null?7*(1-p.B):null,S=i!==null&&l!==null&&N!==null?Math.round((a+i*N)/l*100):null,E=n==="EXCEEDED"?"red":n==="WARNING"?"amber":"green",$=n==="EXCEEDED"?"EXCEEDED":n==="WARNING"?"WARN":"ON TRACK",j=(p==null?void 0:p.deltaPts)??null,H=j!==null&&j>2?"amber":j!==null&&j<-2?"green":"neutral",V=j!==null&&j>2?`${j} pts over weekly pace`:j!==null&&j<-2?`${Math.abs(j)} pts under pace`:"on pace";return e.jsxs("div",{className:"kpi card",children:[e.jsxs("div",{className:"kpi-label",children:["BURN FORECAST"," ",e.jsx(ce,{label:"What the burn forecast shows",content:"Projects when you'll hit a usage limit at your current pace. If the date lands before the reset, slow down or switch to a cheaper model."})]}),n==="OFF"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"kpi-off","aria-label":"Forecast off",children:"● OFF"}),e.jsxs("div",{className:"kpi-off-hint",children:["Configure ",e.jsx("span",{title:":limit_tokens",children:"Weekly token limit"})," in Settings to enable burn alerting."]})]}),n!=="OFF"&&m!==null&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bfc-headline",children:[_,"% of weekly limit"]}),e.jsxs("div",{className:"bfc-meter",role:"progressbar",tabIndex:0,"aria-valuenow":Math.min(_??0,100),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${_}% of weekly limit used`,children:[e.jsx("div",{className:`bfc-meter-fill bfc-fill-${E}`,style:{width:`${C}%`}}),p!==null&&p.B!==null&&e.jsx("div",{className:"bfc-tick",style:{left:`${p.B*100}%`},"aria-hidden":"true"})]}),p!==null&&p.B!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`chip bfc-delta-chip bfc-delta-${H}`,role:"status",children:V}),e.jsxs("div",{className:"bfc-caption",children:[p.daysElapsed," of 7 days elapsed → ",p.budgetPct,"% budgeted vs"," ",p.actualPct,"% used"]})]}),e.jsxs("div",{className:"kpi-subval",children:[ae(a),l!==null&&e.jsxs(e.Fragment,{children:[" / ",ae(l)," cap-weighted"]}),f!==null&&e.jsxs(e.Fragment,{children:[" · resets ",Dt(f)]})]}),i!==null&&e.jsxs("div",{className:"kpi-subval",children:[ae(i),"/day",S!==null&&e.jsxs(e.Fragment,{children:[" · at this pace you'd end the week at ~",S,"%"]})]}),n==="COLD_START"&&e.jsx("div",{className:"kpi-subval",children:"Building baseline — need ≥7 days of data"})]}),e.jsxs("div",{className:"chips",children:[n!=="OFF"&&m!==null&&e.jsx("span",{className:`chip bfc-state-chip bfc-chip-${E}`,role:"status",children:$}),(r??null)==="low"&&e.jsx("span",{className:"chip bfc-chip-low-confidence",role:"status",children:"LOW CONFIDENCE"}),e.jsx(b,{kind:"PROXY"})]})]})}const At={NO_DATA:"var(--muted, #888)",NO_DENOMINATOR:"var(--muted, #888)",WRITE_HEAVY:"var(--amber, #f39c12)",MIXED_REUSE:"var(--accent, #5bc0de)",REUSE_DOMINANT:"var(--green, #2ecc71)"},Ot={NO_DATA:"NO DATA",NO_DENOMINATOR:"NO DENOMINATOR",WRITE_HEAVY:"WRITE HEAVY",MIXED_REUSE:"MIXED REUSE",REUSE_DOMINANT:"REUSE DOMINANT"};function ie(t){return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toLocaleString()}function Rt({state:t,forecast:s=null}){if(t.status==="loading")return e.jsx("div",{className:"kpi card","aria-busy":"true","aria-label":"Loading reuse efficiency",children:e.jsx(M,{})});if(t.status==="error")return e.jsxs("div",{className:"kpi card",children:[e.jsx("div",{className:"kpi-label",children:"REUSE EFFICIENCY"}),e.jsx("div",{className:"kpi-off",children:"N/A"}),e.jsx("div",{className:"kpi-off-hint",children:"Reuse efficiency unavailable"})]});const n=t.value.data;if(n===null||n.turns===0)return e.jsxs("div",{className:"kpi card",children:[e.jsx("div",{className:"kpi-label",children:"REUSE EFFICIENCY"}),e.jsx("div",{className:"kpi-off",children:"N/A"}),e.jsx("div",{className:"kpi-off-hint",children:"No reconciled turns in this selected window."}),e.jsx("div",{className:"chips",children:e.jsx(b,{kind:"N_A"})})]});const a=n.ratio===null?"—":`${(n.ratio*100).toFixed(1)}%`,i=n.cache_creation_tokens===0?"—":`${(n.cache_read_tokens/n.cache_creation_tokens).toFixed(1)}×`,l=At[n.reuse_band],r=Ot[n.reuse_band];return e.jsxs("div",{className:"kpi card",children:[e.jsx("div",{className:"kpi-label",children:"REUSE EFFICIENCY"}),e.jsxs("div",{className:"kpi-value",style:{color:l},children:[i,e.jsxs("span",{style:{fontSize:"0.55em",marginLeft:8,color:l},children:["— ",r]})]}),e.jsxs("div",{className:"kpi-subval",style:{marginTop:4},children:["cache read : creation · ",ie(n.cache_read_tokens)," :"," ",ie(n.cache_creation_tokens)]}),e.jsxs("div",{className:"kpi-fn",style:{marginTop:4},children:["Raw cache-read share: ",a," · diagnostic only · not a health signal"]}),e.jsxs("div",{className:"kpi-subval",style:{marginTop:6},children:["Cap-weighted draw: ",ie(n.cap_weighted_tokens)]}),e.jsxs("div",{className:"kpi-fn",style:{marginTop:4},children:["coefficient ",n.coeff_used,"× unverified · selected window excludes provisional turns"]}),n.cache_creation_tokens>0&&e.jsx("div",{className:"kpi-fn",style:{color:"var(--amber, #f39c12)",marginTop:4},children:"⚠ TTL 5m/1h volatile · active TTL unknown (run /usage to confirm)"}),e.jsxs("div",{className:"kpi-fn",style:{marginTop:4},children:["Separate limit-relative context: Burn Forecast is trailing 1-day and provisional-inclusive",s!==null?` (${s.state.replaceAll("_"," ")}).`:"."]}),e.jsx("div",{className:"chips",style:{marginTop:6},children:e.jsx(b,{kind:"LIST_EQUIV"})})]})}function Mt({hookConfig:t,isLoading:s}){return e.jsxs("div",{className:"card","data-testid":"hook-tile",style:{padding:"14px 16px"},children:[e.jsxs("div",{style:{marginBottom:10,fontWeight:700,fontSize:13,color:"var(--soft)"},children:["IN-SESSION WARNINGS"," ",e.jsx(ce,{label:"What in-session warnings do",content:"An optional local helper that warns before a conversation grows large enough to be automatically condensed. Set it up in Settings."})]}),s&&e.jsx("div",{className:"skeleton",style:{height:48,borderRadius:6},"aria-label":"Loading hook status"}),!s&&t===null&&e.jsx("div",{className:"kpi-off-hint",style:{fontSize:12},children:"Warning status is unavailable."}),!s&&t!==null&&t.installed&&e.jsxs("div",{children:[e.jsxs("div",{"data-testid":"hook-installed-badge",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"3px 10px",borderRadius:20,background:"rgba(63,166,107,.15)",color:"var(--green, #3fa66b)",fontSize:12,fontWeight:700,marginBottom:8},children:[e.jsx("span",{"aria-hidden":"true",children:"✓"})," Installed"]}),e.jsx("div",{style:{fontSize:12,color:"var(--soft)",lineHeight:1.5},children:"Warnings are on. A retry guard also watches for repeated tool-call cycles."})]}),!s&&t!==null&&!t.installed&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:12.5,color:"var(--soft)",lineHeight:1.5,marginBottom:10},children:"Set up warnings before a conversation reaches its context limit."}),e.jsx("a",{href:"#/settings",style:{display:"inline-block",padding:"4px 12px",borderRadius:6,background:"var(--teal)",color:"#fff",fontSize:12,fontWeight:700,textDecoration:"none"},"data-testid":"hook-install-cta",children:"Install in Settings →"})]})]})}function Wt(t){const s=t/1e6;return s<.01?`$${s.toFixed(4)}`:`$${s.toFixed(2)}`}function Pt(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:String(t)}function Bt(t){const s=t.replace("claude-","");return s.charAt(0).toUpperCase()+s.slice(1)}function Ut(t){return t===null?"—":new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function Fe(t){return Re({workspace_id:t.workspace_id,repo_owner:t.repo_owner??null,repo_name:t.repo_name??null,repo_path:t.repo_path??null,repo_canonical:t.repo_canonical??null})}function zt(t,s){return t===void 0?null:`updated ${Math.max(0,Math.floor((s-t)/1e3))}s ago`}function Ht({sessions:t,isLoading:s,isPending:n=!1,error:a,lastFetchedAt:i,onSelectSession:l}){const r=t.length,[u,c]=o.useState(()=>Date.now()),m=zt(i,u);return o.useEffect(()=>{if(i===void 0)return;c(Date.now());const f=window.setInterval(()=>c(Date.now()),1e3);return()=>window.clearInterval(f)},[i]),e.jsx("div",{className:"live-strip-wrap",children:e.jsxs("div",{className:"live-strip",children:[e.jsxs("div",{className:"live-strip-head",children:[e.jsxs("span",{children:[e.jsx("span",{className:`live-dot${r>0?" on":""}`,"aria-hidden":"true"}),"LIVE (",r,")"]}),e.jsx("span",{className:"live-strip-freshness",children:m===null?"awaiting first refresh":m})]}),e.jsxs("div",{"aria-live":"polite","aria-label":"Live sessions",children:[s&&e.jsx(St,{height:48}),!n&&!s&&a!==null&&e.jsxs("div",{className:"empty-state",children:[e.jsx("span",{className:"empty-state-icon","aria-hidden":"true",children:"⚠"}),e.jsx("span",{className:"empty-state-text",children:"Live session data unavailable — will retry"})]}),!n&&!s&&a===null&&r===0&&e.jsx("div",{className:"live-strip-empty",children:e.jsx(Et,{headline:"No active sessions",why:"The daemon is connected, but no observed Claude Code session is running.",whatWillAppear:"Live cost, context, and model aggregates will appear while a session is active.",command:"claude"})}),!n&&!s&&r>0&&e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Workspace"}),e.jsx("th",{children:"Running cost"}),e.jsx("th",{children:"Context"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Started"})]})}),e.jsx("tbody",{children:t.map(f=>e.jsxs("tr",{className:"live-row-live",children:[e.jsx("td",{children:l===void 0?Fe(f):e.jsx("button",{type:"button",className:"live-session-link",onClick:()=>l(f.session_id),children:Fe(f)})}),e.jsxs("td",{children:[Wt(f.running_usd_u)," ",e.jsx(b,{kind:"LIVE",label:"LIVE"})]}),e.jsx("td",{children:Pt(f.current_context_tokens)}),e.jsx("td",{children:Bt(f.model)}),e.jsx("td",{children:Ut(f.started_at)})]},f.session_id))})]})]})]})})}function Vt(t){return t>=.85?"red":t>=.6?"amber":"green"}function qt(t){return t==="red"?"var(--red, #e05252)":t==="amber"?"var(--amber, #d4a017)":"var(--green, #3fa66b)"}function Kt(t){try{return new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return t}}function Le({label:t,utilization:s,resetsAt:n}){const a=Math.round(s*100),i=Vt(s),l=qt(i),r=Math.min(s*100,100);return e.jsxs("div",{style:{minWidth:0},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[e.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--soft)"},children:t}),e.jsxs("span",{style:{fontSize:13,fontWeight:700,color:l},"aria-label":`${t} utilization ${a}%`,children:[a,"%"]})]}),e.jsx("div",{role:"progressbar",tabIndex:0,"aria-label":`${t} rate-limit utilization`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,style:{height:8,borderRadius:4,background:"rgba(132,146,166,.18)",overflow:"hidden",marginBottom:4},children:e.jsx("div",{"aria-hidden":"true",style:{width:`${r}%`,minWidth:r>0?3:0,height:"100%",background:l,borderRadius:"4px 0 0 4px",transition:"width 0.3s ease"}})}),e.jsxs("div",{style:{fontSize:11,color:"var(--muted)"},children:["resets ",Kt(n)]})]})}function Xt({burnStatus:t,isLoading:s}){return e.jsxs("div",{className:"card","data-testid":"rate-limit-gauges",style:{padding:"14px 16px"},children:[e.jsxs("div",{style:{marginBottom:10,fontWeight:700,fontSize:13,color:"var(--soft)"},children:["CLAUDE USAGE LIMITS"," ",e.jsx(ce,{label:"What these usage bars show",content:"How much of each Claude usage period you have used. Check the 7-day bar before starting work that can wait, so you do not run out before it resets."})]}),s&&e.jsx("div",{className:"skeleton",style:{height:48,borderRadius:6},"aria-label":"Loading rate-limit data"}),!s&&t===null&&e.jsxs("div",{className:"kpi-off-hint",style:{fontSize:12},children:[e.jsx("div",{children:"Current Claude usage is unavailable."}),e.jsx("a",{href:"#/settings",style:{color:"var(--teal)"},"data-testid":"gauges-calibrate-link",children:"Calibrate from usage in Settings →"})]}),!s&&t!==null&&!t.available&&e.jsxs("div",{style:{fontSize:12.5,color:"var(--soft)"},children:[e.jsx("span",{children:"Signed out — "}),e.jsx("a",{href:"#/settings",style:{color:"var(--teal)"},children:"Set up usage tracking in Settings"}),e.jsx("div",{style:{fontSize:11,color:"var(--muted)",marginTop:4},children:t.reason??"Sign in to Claude Code to see current usage."})]}),!s&&(t==null?void 0:t.available)&&e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16},children:[t.five_hour&&e.jsx(Le,{label:"5-hour",utilization:t.five_hour.utilization,resetsAt:t.five_hour.resets_at}),t.seven_day&&e.jsx(Le,{label:"7-day",utilization:t.seven_day.utilization,resetsAt:t.seven_day.resets_at})]})]})}function Me(t){return`$${(t/1e6).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function re(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${Math.round(t/1e3)}K`:t.toLocaleString("en-US")}function Yt(t){const s=l=>{const r=t.evidence[l];return typeof r=="number"&&Number.isFinite(r)?r:null},n=s("source_tokens"),a=s("source_target");if(n!==null&&a!==null)return`${re(n)} always-loaded vs ${re(a)} target`;const i=s("delta_context_tokens");return i!==null?`−${re(i)} tokens/turn`:t.modeled_savings_u_per_wk!==null&&t.detector_id!=="D4"?`${Me(t.modeled_savings_u_per_wk)}/wk modeled`:null}function De(t){return t===null?null:t.buckets.reduce((s,n)=>s+n.cost_equiv_u,0)}function We(t,s){if(t===null||s===null)return{direction:"unavailable",label:"Prior window unavailable"};if(s===0&&t===0)return{direction:"flat",label:"No change vs prior"};if(s===0)return{direction:"new",label:"New spend vs prior"};const n=(t-s)/s;if(Math.abs(n)<.005)return{direction:"flat",label:"No material change vs prior"};const a=`${Math.abs(n*100).toFixed(1)}%`;return n>0?{direction:"up",label:`${a} higher vs prior`}:{direction:"down",label:`${a} lower vs prior`}}function Pe({delta:t}){return e.jsx("span",{className:`window-delta window-delta-${t.direction}`,children:t.label})}function Be({values:t,label:s}){const n=t.filter(u=>Number.isFinite(u));if(n.length<2)return e.jsx("span",{className:"trend-sparkline-empty",children:"Trend unavailable"});const a=Math.max(...n),i=Math.min(...n),l=a-i||1,r=n.map((u,c)=>`${c/(n.length-1)*100},${28-(u-i)/l*24}`).join(" ");return e.jsx("svg",{className:"trend-sparkline",viewBox:"0 0 100 32",role:"img","aria-label":s,preserveAspectRatio:"none",children:e.jsx("polyline",{points:r,fill:"none",stroke:"currentColor",strokeWidth:"2.4",vectorEffect:"non-scaling-stroke"})})}function Gt({value:t}){const[s,n]=o.useState(t??0),a=o.useRef(t??0);return o.useEffect(()=>{if(t===null)return;const i=a.current,l=performance.now();let r=0;const u=c=>{const m=Math.min((c-l)/560,1);n(i+(t-i)*(1-(1-m)**3)),m<1?r=requestAnimationFrame(u):a.current=t};return r=requestAnimationFrame(u),()=>cancelAnimationFrame(r)},[t]),e.jsx("div",{className:"verdict-band-value",children:t===null?"—":Me(s)})}function Qt({preset:t,trend:s,priorTrend:n,isLoading:a,topRecommendation:i}){const l=De(s),r=De(n),u=We(l,r),c=(s==null?void 0:s.buckets.map(E=>E.cost_equiv_u))??[],m=(i==null?void 0:i.title)??(i==null?void 0:i.lever)??"No active waste source detected",f=i===null?null:Yt(i),p=i===null?null:Ct(i),C=i===null?"#/recommendations":`#/recommendations?focus=${encodeURIComponent(i.rec_id)}`,[_,N]=o.useState(!1);function S(){p!==null&&navigator.clipboard.writeText(p.text).then(()=>{N(!0),setTimeout(()=>N(!1),2e3)})}return e.jsxs("section",{className:"verdict-band card","aria-labelledby":"verdict-band-title","aria-busy":a,children:[e.jsxs("div",{className:"verdict-band-summary",children:[e.jsxs("div",{children:[e.jsx("div",{className:"verdict-band-label",id:"verdict-band-title",children:"Usage this period"}),e.jsx(Gt,{value:l}),e.jsxs("div",{className:"verdict-band-caption",children:[t.toUpperCase()," list-price equivalent"]})]}),e.jsx(Pe,{delta:u})]}),e.jsxs("div",{className:"verdict-band-trend",children:[e.jsx(Be,{values:c,label:`${t} spend trend`}),e.jsx("span",{children:"Selected-window spend trend"})]}),e.jsxs("div",{className:"verdict-band-detail",children:[e.jsx("strong",{children:"Suggested next step:"})," ",m,f!==null&&e.jsxs("span",{className:"verdict-band-claim",children:[" · ",f]})]}),p!==null&&e.jsx("textarea",{className:"prompt-code verdict-prompt","aria-label":"Fix prompt",readOnly:!0,value:p.text}),e.jsxs("div",{className:"verdict-band-actions",children:[p!==null&&e.jsx("button",{type:"button",className:"verdict-band-copy",onClick:S,children:_?"Copied ✓":"Copy fix prompt"}),e.jsx("a",{className:"verdict-band-action",href:C,children:i===null?"Review recommendations →":"Review suggestion →"})]})]})}const Jt={D1:"Always-loaded instructions",D2:"Long sessions",D4:"Model choice",D5:"Usage-limit warning",D6:"Large tool results",D8:"Repeated cache rebuilds",D9:"Background-agent work",D10:"Always-loaded tools"};function $e(t){return`$${(t/1e6).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function Zt(t){return`${(t*100).toFixed(1)}%`}function es(t){return t===null?"—":`$${t.toFixed(3)}`}function ts(t){return Re({workspace_id:t.workspace_id,repo_owner:t.repo_owner??null,repo_name:t.repo_name??null,repo_path:t.repo_path??null,repo_canonical:t.repo_canonical??null})}function ss({workspaces:t,globalCostU:s,globalTurns:n,isLoading:a,topRecByWorkspace:i,teaser:l=!1}){const r=n>0?s/1e6/n:null;return e.jsxs("div",{className:"card",style:{marginBottom:13},children:[e.jsxs("div",{className:"section-head",children:[e.jsx("h2",{children:l?"Top Workspaces":"Workspace Comparison"}),e.jsx("span",{className:"section-meta",children:e.jsx(b,{kind:"LIST_EQUIV"})})]}),e.jsx("div",{className:"table-wrap",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Workspace"}),e.jsx("th",{children:"Est. value"}),e.jsx("th",{children:"Share of total"}),e.jsx("th",{children:"Active now"}),e.jsx("th",{children:"Est. value / turn"}),e.jsx("th",{children:"Best next improvement"})]})}),e.jsxs("tbody",{children:[a&&e.jsxs(e.Fragment,{children:[e.jsx(D,{cols:6}),e.jsx(D,{cols:6}),e.jsx(D,{cols:6})]}),!a&&t.map(u=>e.jsxs("tr",{children:[e.jsxs("td",{children:[ts(u),u.has_live&&e.jsx("span",{className:"nav-dot",style:{marginLeft:6,display:"inline-block"},"aria-label":"has live session"})]}),e.jsx("td",{children:$e(u.cost_equiv_u)}),e.jsx("td",{children:Zt(u.cost_share)}),e.jsx("td",{children:u.has_live?"● live":"0"}),e.jsx("td",{children:es(u.usd_per_turn)}),e.jsx("td",{children:(()=>{const c=i==null?void 0:i.get(u.workspace_id);return c===void 0?e.jsx(b,{kind:"N_A",label:"—"}):e.jsx(b,{kind:"EXPERIMENTAL",label:`${Jt[c.detector_id]??c.detector_id} · ${c.state.toLowerCase()}`})})()})]},u.workspace_id))]}),!a&&t.length>0&&!l&&e.jsx("tfoot",{children:e.jsxs("tr",{className:"total-row",children:[e.jsx("td",{children:"TOTAL (global)"}),e.jsx("td",{children:$e(s)}),e.jsx("td",{children:"100%"}),e.jsx("td",{children:"—"}),e.jsx("td",{children:r!==null?`~$${r.toFixed(3)}`:"—"}),e.jsx("td",{})]})})]})}),l&&e.jsx("div",{style:{textAlign:"right",padding:"4px 0 2px"},children:e.jsxs("a",{href:"#/workspaces",style:{fontSize:12.5,color:"var(--teal)"},"data-testid":"all-workspaces-link",children:["All workspaces ","→"]})}),e.jsxs("div",{className:"table-footnotes",children:["¹"," Spend = list-price equivalent (LIST_EQUIV) ","—"," not billing data. ","²"," Top waste source = highest-modeled active DetectorEngine recommendation scoped to this workspace (EXPERIMENTAL); ","“—”"," = none."]})]})}const ns=o.lazy(()=>oe(()=>import("./CacheWriteSpikesChart-1Nfnf7OX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),as=o.lazy(()=>oe(()=>import("./FlavorDecomposition-CkHX3M-U.js"),__vite__mapDeps([11,1,2,3,4,5,6,12,10]))),is=o.lazy(()=>oe(()=>import("./TrendChart-BSLwlBiq.js"),__vite__mapDeps([13,1,2,14,3,4,5,6,12,10,8,9,15]))),rs="ℹ List-price equivalents only — Max/Team plans are NOT billed this way. Tokens drive rate limits. Check /usage or the status-line 5h/7d % for your real budget signal.",ls=300;function le(t,s){const n=kt(t,s);return n===void 0?{status:"loading"}:{status:"ok",value:n}}function T(t){t(s=>s.status==="ok"?s:{status:"loading"})}function Ue({status:t}){return t.scan_state==="failed"?e.jsxs("p",{role:"alert",children:["Initial scan failed. Review ",e.jsx("a",{href:"#/settings?section=parser-health",children:"parser health"})," and restart the daemon."]}):(t.invalid_scan_root_count??0)>0?e.jsxs("p",{role:"alert",children:[t.invalid_scan_root_count," scan root(s) are missing or unreadable. Review"," ",e.jsx("a",{href:"#/settings?section=scan-roots",children:"scan roots"}),", save corrections, and restart the daemon."]}):t.scan_state==="scanning"?e.jsxs("p",{children:["Scanning… ",t.files_parsed," of ",t.files_seen," files"]}):(t.lines_quarantined??0)>0?e.jsxs("p",{role:"alert",children:[t.lines_quarantined," transcript line(s) could not be parsed. Review"," ",e.jsx("a",{href:"#/settings?section=parser-health",children:"parser health"}),"."]}):t.scan_state==="complete"&&t.sessions===0?e.jsxs("p",{children:["Scan complete — no readable sessions found. Run a Claude Code session or review"," ",e.jsx("a",{href:"#/settings?section=scan-roots",children:"scan roots"}),"."]}):t.scan_state===void 0?e.jsx("p",{children:"Scan completion status is unavailable. Restart with the updated daemon to see scan progress."}):null}function os({status:t,limitCalibrated:s,tokenConfigured:n,hookInstalled:a}){const i=t.sessions>0,l=[{label:"Daemon running",complete:!0},{label:"First session ingested",complete:i}],r=l.filter(c=>c.complete).length,u=[{key:"calibrate",show:!s,text:"Calibrate your weekly limit from usage so burn forecasts have a real ceiling to project against.",href:"#/settings?section=calibration",cta:"Calibrate in Settings →",testid:"first-run-calibrate"},{key:"token",show:!n,text:"Optionally install the gh CLI and set a read-only AW_GITHUB_TOKEN to cross-check local work with GitHub outcomes.",href:"#/settings?section=outcomes-sync",cta:"Configure token in Settings →",testid:"first-run-token"},{key:"hook",show:!a,text:"Install the context-budget hook to get warned in-session before a costly auto-compact.",href:"#/settings?section=in-session-guards",cta:"Install in Settings →",testid:"first-run-hook"}].filter(c=>c.show);return e.jsxs("section",{className:"settings-onboarding-card","aria-labelledby":"first-run-welcome-title",children:[e.jsx("h2",{id:"first-run-welcome-title",children:"Welcome to AgentWrangler"}),e.jsx("p",{children:"Turn local Claude Code activity into clear, actionable guidance."}),e.jsxs("p",{"aria-label":`${r} of 2 onboarding steps complete`,children:[r," of 2"]}),e.jsx("ol",{children:l.map(c=>e.jsxs("li",{children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:c.complete,readOnly:!0})," ",c.label]}),c.label==="First session ingested"&&!i&&e.jsxs("p",{className:"first-run-step-hint","data-testid":"first-run-ingest-hint",children:["Run any ",e.jsx("code",{children:"claude"})," session — the daemon tails its transcript live."]})]},c.label))}),e.jsx(Ue,{status:t}),u.length>0&&e.jsxs("div",{className:"first-run-activation","data-testid":"first-run-activation",children:[e.jsx("h3",{className:"first-run-activation-title",children:"Activate the rest"}),e.jsx("ul",{children:u.map(c=>e.jsxs("li",{"data-testid":c.testid,children:[e.jsx("span",{children:c.text})," ",e.jsx("a",{href:c.href,children:c.cta})]},c.key))})]}),e.jsxs("p",{className:"first-run-glossary-link",children:["New to these numbers?"," ",e.jsx("a",{href:"#/glossary","data-testid":"first-run-glossary-link",children:"How to read this dashboard →"})]})]})}function cs(t){return`$${(t/1e6).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function ze(t){const s=t.replace("claude-","");return s.charAt(0).toUpperCase()+s.slice(1)}function Ae(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(Math.round(t))}function ds({overview:t,preset:s,trends:n,priorTrends:a}){const i=(n==null?void 0:n.buckets.reduce((r,u)=>r+u.cost_equiv_u,0))??null,l=(a==null?void 0:a.buckets.reduce((r,u)=>r+u.cost_equiv_u,0))??null;return e.jsxs("div",{className:"kpi kpi-secondary card",children:[e.jsxs("div",{className:"kpi-label-row",children:[e.jsxs("div",{className:"kpi-label",children:[s.toUpperCase()," SPEND-EQUIV"]}),e.jsx(Pe,{delta:We(i,l)})]}),e.jsx("div",{className:"kpi-value",children:cs(t.cost_equiv_u)}),e.jsx(Be,{values:(n==null?void 0:n.buckets.map(r=>r.cost_equiv_u))??[],label:`${s} spend trend`}),e.jsxs("div",{className:"kpi-subval",children:[t.turns.toLocaleString()," in-window turns · ",t.turns_total.toLocaleString()," ","total"]}),t.unpriced_turns>0&&e.jsxs("div",{className:"kpi-subval",style:{color:"var(--amber)"},children:["⚠ ",t.unpriced_turns," unpriced turns"]}),e.jsx("div",{className:"chips",children:e.jsx(b,{kind:"LIST_EQUIV"})})]})}function us({rows:t}){const s=t.reduce((n,a)=>n+a.turns,0);return s===0||t.length===0?null:e.jsxs("p",{className:"kpi-fn",style:{marginTop:4},children:["Model mix:"," ",t.map(n=>`${ze(n.model)} ${(n.turns/s*100).toFixed(1)}%`).join(" · ")," ","· ",e.jsx(b,{kind:"EXACT",label:"EXACT"})]})}function hs({rows:t}){return e.jsxs("div",{className:"card","data-testid":"context-per-turn-section",style:{padding:"16px 18px",marginBottom:13},children:[e.jsxs("div",{className:"section-head",children:[e.jsx("h2",{children:"Context / Turn"}),e.jsx("div",{className:"chips",children:e.jsx(b,{kind:"OBS_PROXY"})})]}),t.length===0?e.jsx("div",{className:"banner banner-info",children:e.jsx("span",{children:"No context-per-turn data in this window."})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-testid":"context-per-turn-grid",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:14},children:t.map((s,n)=>{const a=ze(s.model),i=s.avg_context_per_turn>0?s.avg_output_per_turn/s.avg_context_per_turn*100:0,l=Math.max(0,Math.min(i,100));return e.jsxs("div",{"data-testid":"context-per-turn-cell",style:{background:"var(--panel2)",border:"1px solid var(--line)",borderRadius:10,padding:"12px 14px",minWidth:0},children:[e.jsxs("div",{style:{color:"var(--soft)",fontSize:12,fontWeight:600,marginBottom:6,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[e.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:z[n%z.length],marginRight:6}}),a]}),e.jsxs("div",{style:{fontSize:22,fontWeight:700,letterSpacing:"-0.01em"},children:[Ae(s.avg_context_per_turn),e.jsx("span",{style:{fontSize:12,color:"var(--muted)",marginLeft:4},children:"ctx"})]}),e.jsxs("div",{style:{fontSize:12.5,color:"var(--soft)",margin:"2px 0 8px"},children:[Ae(s.avg_output_per_turn)," out"]}),e.jsx("div",{role:"progressbar",tabIndex:0,"aria-label":`Output is ${i.toFixed(1)}% of context for ${a}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l,style:{height:10,borderRadius:5,background:"rgba(132,146,166,.18)",overflow:"hidden"},children:e.jsx("div",{"aria-hidden":"true",style:{width:`${l}%`,minWidth:l>0?3:0,height:"100%",background:z[n%z.length],borderRadius:"5px 0 0 5px"}})}),e.jsxs("div",{style:{fontSize:11,color:"var(--muted)",marginTop:5},children:["output = ",i.toFixed(1),"% of context"]}),e.jsx("div",{className:"chips",style:{marginTop:6},children:e.jsx(b,{kind:"OBS_PROXY"})})]},s.model)})}),e.jsx("p",{style:{margin:"12px 0 0",fontSize:12.5,color:"var(--soft)",borderLeft:"3px solid var(--teal)",paddingLeft:10},children:"Context : Output ratio — if output is a small fraction of context, you're paying mostly to re-read history, not to generate. Consider more frequent /clear."})]})]})}function _s({onSelectSession:t}){var Ne,Se,Ee;const[s,n]=o.useState(()=>{try{return typeof window>"u"||window.localStorage.getItem("aw-caveat-dismissed")!=="1"}catch{return!0}}),[a,i]=o.useState("7d"),[l,r]=o.useState(a),[u,c]=o.useState(a),[m,f]=o.useState(()=>le("/api/overview",{preset:l})),[p,C]=o.useState(()=>le("/api/workspaces",{preset:u})),[_,N]=o.useState(()=>le("/api/live")),[S,E]=o.useState({status:"pending"}),[$,j]=o.useState(!1),[H,V]=o.useState(()=>Te("/api/live")),[He,de]=o.useState(null),[Ve,ue]=o.useState(!1),[he,qe]=o.useState(null),[Ke,pe]=o.useState(!0),[W,me]=o.useState(null),[Xe,Ye]=o.useState(!0),[Ge,fe]=o.useState(!1),[q,xe]=o.useState([]),[K,Qe]=o.useState(!0),[Je,ge]=o.useState(new Map),[P,X]=o.useState({status:"loading"}),[Y,B]=o.useState({status:"loading"}),[Ze,ve]=o.useState(null),[et,je]=o.useState(null),[tt,G]=o.useState({status:"loading"}),[st,U]=o.useState({status:"loading"}),[nt,Q]=o.useState({status:"loading"});o.useEffect(()=>{const d=window.setTimeout(()=>j(!0),ls);return()=>window.clearTimeout(d)},[]);const J=o.useCallback(d=>{const k={preset:d};T(f),T(C),mt(k).then(h=>{f({status:"ok",value:h}),r(d)}).catch(h=>{f({status:"error",message:String(h)}),r(d)}),ft(k).then(h=>{C({status:"ok",value:h}),c(d)}).catch(h=>{C({status:"error",message:String(h)}),c(d)}),T(X),T(B),Ie(k).then(h=>{X({status:"ok",value:h});const{from:v,to:w}=h.meta.window,O=Date.parse(w)-Date.parse(v);return Ie({from:new Date(Date.parse(v)-O).toISOString(),to:v}).then(L=>B({status:"ok",value:L})).catch(L=>B({status:"error",message:String(L)}))}).catch(h=>{X({status:"error",message:String(h)}),B({status:"error",message:String(h)})}),T(G),T(U),xt(k).then(h=>{G({status:"ok",value:h});const v=h.data;if(v!==null){const w={ratio:v.cache_read_share,cache_read_tokens:v.cache_read_tokens,cache_creation_tokens:v.cache_creation_tokens,reuse_band:v.reuse_band,cap_weighted_tokens:v.cap_weighted_tokens,coeff_used:v.coeff_used,coeff_unverified:v.coeff_unverified,turns:v.turns};U({status:"ok",value:{...h,data:w}})}else U({status:"ok",value:{...h,data:null}})}).catch(h=>{G({status:"error",message:String(h)}),U({status:"error",message:String(h)})}),T(Q),gt(k).then(h=>Q({status:"ok",value:h})).catch(h=>Q({status:"error",message:String(h)})),vt().then(h=>{var L;const v=((L=h.data)==null?void 0:L.active)??[],w=h.data;je(w==null?null:w.active.length+w.limit_warnings.length+w.adopted.length+w.dismissed.length>0),ve(v.reduce((y,R)=>y===null||(R.modeled_savings_u_per_wk??-1)>(y.modeled_savings_u_per_wk??-1)?R:y,null));const O=new Map;for(const y of v){if(y.scope_workspace_id===null)continue;const R=O.get(y.scope_workspace_id),Ce=y.modeled_savings_u_per_wk??-1;(R===void 0||Ce>(R.savings??-1))&&O.set(y.scope_workspace_id,{detector_id:y.detector_id,state:y.state,savings:Ce})}ge(O)}).catch(()=>{ge(new Map),ve(null),je(null)})},[]);o.useEffect(()=>{J(a)},[a,J]),se(yt,3e4,d=>{E(d===void 0?{status:"error",message:"Status response was empty"}:{status:"ok",value:d})},d=>{E(k=>k.status==="ok"?k:{status:"error",message:String(d)})}),se(wt,3e4,d=>{N({status:"ok",value:d}),V(Te("/api/live")),de(null)},d=>{de(String(d)),N(k=>k.status==="ok"?k:{status:"error",message:String(d)})}),se(Nt,6e4,d=>{qe(d.data),pe(!1),ue(!1)},()=>{pe(!1),ue(!0)}),o.useEffect(()=>{jt().then(d=>me(d.data)).catch(()=>me(null)).finally(()=>Ye(!1)),bt().then(d=>xe(d.slice(0,3))).catch(()=>xe([])).finally(()=>Qe(!1)),Promise.resolve(_t()).then(d=>fe((d==null?void 0:d.configured)??!1)).catch(()=>fe(!1))},[]);const at=()=>J(a),it=()=>{try{window.localStorage.setItem("aw-caveat-dismissed","1")}catch{}n(!1)},Z=l===a,ee=u===a,g=Z&&m.status==="ok"?m.value.data:null,be=P.status==="ok"?P.value.data:null,_e=Y.status==="ok"?Y.value.data:null,rt=ee&&p.status==="ok"?((Ne=p.value.data)==null?void 0:Ne.items)??[]:[],lt=_.status==="ok"?((Se=_.value.data)==null?void 0:Se.items)??[]:[],x=S.status==="ok"?S.value:null,te=S.status==="pending",I=(x==null?void 0:x.sessions)===0,F=m.status==="loading"||!Z,ke=p.status==="loading"||!ee,A=_.status==="loading",ot=F&&$,ct=ke&&$,dt=A&&$,ye=Z&&m.status==="error"?m.message:null,ut=ee&&p.status==="error"?p.message:null,ht=_.status==="error"?_.message:null,we=ye??ut;return e.jsxs("div",{children:[e.jsxs("div",{className:"page-top",children:[e.jsxs("div",{className:"page-title",children:[e.jsx("h1",{children:"Overview"}),e.jsx("p",{className:"page-sub",children:"Where your tokens go · burn forecast · live sessions"})]}),e.jsxs("div",{className:"page-top-controls",children:[e.jsx("div",{className:"date-range","aria-label":"Date range",children:["24h","7d","30d"].map(d=>e.jsx("button",{type:"button",className:`date-preset-btn${a===d?" active":""}`,onClick:()=>i(d),"aria-pressed":a===d,children:d},d))}),s&&e.jsxs("div",{className:"banner banner-info",children:[e.jsx("span",{children:rs}),e.jsx("button",{className:"banner-dismiss",type:"button","aria-label":"Dismiss usage caveat",onClick:it,children:"✕"})]})]})]}),e.jsx(It,{}),we!==null&&e.jsxs("div",{className:"banner banner-error",role:"alert","aria-live":"assertive",children:[e.jsxs("span",{children:["⚠ Daemon unreachable — ",we]}),e.jsx("button",{className:"banner-retry",type:"button",onClick:at,children:"Retry"})]}),e.jsx(Qt,{preset:a,trend:be,priorTrend:_e,isLoading:P.status==="loading"||Y.status==="loading",topRecommendation:Ze}),e.jsxs("div",{"data-testid":"rv7-tile-row",style:{display:"grid",gridTemplateColumns:"1fr 1fr 2fr",gap:12,marginBottom:13},children:[e.jsxs("div",{children:[e.jsx(Xt,{burnStatus:he,isLoading:Ke}),Ve&&e.jsx("output",{children:"Burn status refresh failed; displayed data may be stale. Will retry."})]}),e.jsx(Mt,{hookConfig:W,isLoading:Xe}),e.jsxs("div",{className:"card","data-testid":"hot-sessions-tile",style:{padding:"14px 16px"},children:[e.jsx("div",{style:{marginBottom:10,fontWeight:700,fontSize:13,color:"var(--soft)"},children:"HOT SESSIONS"}),K&&e.jsx("div",{className:"skeleton",style:{height:64,borderRadius:6},"aria-label":"Loading hot sessions"}),!K&&q.length===0&&e.jsx("div",{className:"kpi-off-hint",style:{fontSize:12},children:"No sessions yet."}),!K&&q.length>0&&e.jsxs("div",{children:[q.map(d=>e.jsxs("button",{type:"button","data-testid":`hot-session-row-${d.session_id}`,onClick:()=>t==null?void 0:t(d.session_id),style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"5px 0",background:"none",border:"none",borderBottom:"1px solid var(--line)",cursor:"pointer",textAlign:"left"},children:[e.jsxs("span",{style:{fontSize:12,color:"var(--text)",fontFamily:"monospace"},children:[d.session_id.slice(0,12),"…"]}),e.jsxs("span",{style:{fontSize:12,color:"var(--amber)",fontWeight:600},children:["$",(d.cost_equiv_u/1e6).toFixed(2)]})]},d.session_id)),e.jsx("div",{style:{textAlign:"right",marginTop:6},children:e.jsx("a",{href:"#/sessions",style:{fontSize:12,color:"var(--teal)"},children:"All sessions →"})})]})]})]}),!I&&x!==null&&e.jsx(Ue,{status:x}),!I&&(x==null?void 0:x.scan_state)==="complete"&&((x==null?void 0:x.sessions)??0)>0&&((x==null?void 0:x.lines_quarantined)??0)===0&&((x==null?void 0:x.invalid_scan_root_count)??0)===0&&et===!1&&e.jsxs("p",{children:["Setup complete — your history is ready and no recommendations were found."," ",e.jsx("a",{href:"#/sessions",children:"Read an ingested session"}),"; optional integrations are not required."]}),I&&x!==null&&e.jsx(os,{status:x,limitCalibrated:(((Ee=g==null?void 0:g.forecast)==null?void 0:Ee.state)??"OFF")!=="OFF",tokenConfigured:Ge,hookInstalled:(W==null?void 0:W.installed)??!1}),!I&&(te||ot)?e.jsxs("div",{className:"kpi-grid","aria-busy":"true","aria-label":"Loading overview data",children:[e.jsx(M,{}),e.jsx(M,{}),e.jsx(M,{}),e.jsx(M,{})]}):null,!te&&!I&&!F&&g!==null&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"section-head",children:e.jsx("h2",{children:"Two meters, several tanks"})}),e.jsx("p",{className:"section-subtitle",children:"Watch spend and your configured limit together; each answers a different question."}),e.jsx("p",{className:"kpi-fn",style:{marginTop:2,marginBottom:8},children:"Absolute cap values are unpublished (Anthropic publishes only relative multipliers). Which cap you're hitting is visible only in /usage."}),e.jsxs("div",{className:"kpi-grid overview-secondary-kpis",children:[e.jsx(ds,{overview:g,preset:a,trends:be,priorTrends:_e}),e.jsx($t,{forecast:g.forecast,burnStatus:he})]}),e.jsx(us,{rows:g.model_mix}),e.jsx(hs,{rows:g.context_per_turn})]}),!te&&!I&&!F&&ye===null&&g===null&&e.jsx("div",{className:"banner banner-info",children:e.jsx("span",{children:"No spend data in this window."})}),e.jsx(Ht,{sessions:lt,isLoading:dt,isPending:A,error:He??ht,lastFetchedAt:H,onSelectSession:t}),e.jsx("div",{className:"section-head",children:e.jsx("h2",{children:"Where your tokens go"})}),e.jsx("p",{className:"section-subtitle",children:"Use these breakdowns to see which usage patterns are driving the total."}),e.jsx(Rt,{state:st,forecast:(g==null?void 0:g.forecast)??null}),e.jsx(ne,{label:"token breakdown",ready:!F&&!A,children:e.jsx(as,{state:tt})}),e.jsx(ne,{label:"cache writes chart",ready:!F&&!A,children:e.jsx(ns,{state:nt})}),ct?e.jsxs("div",{className:"card",style:{marginBottom:13},children:[e.jsx("div",{className:"section-head",children:e.jsx("h2",{children:"Top Workspaces"})}),e.jsx("div",{className:"table-wrap","aria-busy":"true","aria-label":"Loading workspace data",children:e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Workspace"}),e.jsx("th",{children:"Spend"}),e.jsx("th",{children:"Share"}),e.jsx("th",{children:"Live now"}),e.jsx("th",{children:"$/turn"}),e.jsx("th",{children:"Top waste source"})]})}),e.jsxs("tbody",{children:[e.jsx(D,{cols:6}),e.jsx(D,{cols:6}),e.jsx(D,{cols:6})]})]})})]}):ke?null:e.jsx(ss,{workspaces:rt.slice(0,3),globalCostU:(g==null?void 0:g.cost_equiv_u)??0,globalTurns:(g==null?void 0:g.turns)??0,isLoading:!1,topRecByWorkspace:Je,teaser:!0}),e.jsx(ne,{label:"spend trends chart",ready:!F&&!A,children:e.jsx(is,{state:P})})]})}export{_s as default};
|