pi-tps-web 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -203,7 +203,7 @@ Error generating stack: `+e.message+`
203
203
  THEN tokens_output / (total_ms / 1000.0)
204
204
  ELSE 0 END AS wall_tps
205
205
  FROM base
206
- `)}async function yx(e){let{conn:t}=await gx(),n=await t.query(e),r=n.schema.fields.map(e=>e.name),i=[];for(let e of n.batches){let t=r.map(t=>e.getChild(t));for(let n=0;n<e.numRows;n++){let e=t.map(e=>{let t=e?.get(n);return typeof t==`bigint`?Number(t):t??null});i.push(e)}}return{columns:r,rows:i,rowCount:i.length}}async function bx(){let{conn:e}=await gx();await e.query(`DROP VIEW IF EXISTS tps_paired`),await e.query(`DROP VIEW IF EXISTS messages_flat`),await e.query(`DROP VIEW IF EXISTS tps_flat`),await e.query(`DROP VIEW IF EXISTS energy_flat`),await e.query(`DROP VIEW IF EXISTS energy_detailed`),await e.query(`DROP TABLE IF EXISTS events`)}function xx(e){let[t,n]=(0,b.useState)(new Map),[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(0),d=(0,b.useMemo)(()=>{if(t.size===0)return null;if(r)return t.get(r)?.events??null;let e=[];for(let n of t.values())e.push(...n.events);return e},[t,r]),f=(0,b.useMemo)(()=>d?up(d):[],[d]),p=(0,b.useMemo)(()=>d?dp(d):[],[d]),m=(0,b.useMemo)(()=>fp(f,p),[f,p]),h=(0,b.useMemo)(()=>d?pp(d,m):[],[d,m]);return(0,b.useEffect)(()=>{if(t.size===0){queueMicrotask(()=>{o(!1),c(!1),e(!1)});return}queueMicrotask(()=>{o(!0),e(!1)});let n=!1,r=setTimeout(()=>{let e=[];for(let n of t.values())e.push(...n.events);vx(e).then(()=>{n||(u(e=>e+1),o(!1),c(!0))}).catch(e=>{console.error(`DuckDB load failed:`,e),n||o(!1)})},100);return()=>{n=!0,clearTimeout(r)}},[t,e]),{sessions:t,activeSessionId:r,setActiveSessionId:i,dbLoading:a,hasLoaded:s,dbVersion:l,events:d,allTpsEvents:f,allEnergyEvents:p,paired:m,timeline:h,addSession:(0,b.useCallback)((e,t)=>{let r=sp(e),a=cp(r),o=r.sessionId;n(n=>{let i=new Map(n);return i.set(o,{raw:e,ingest:r,events:a,fileName:t}),i}),i(null)},[]),removeSession:(0,b.useCallback)(e=>{n(t=>{let n=new Map(t);return n.delete(e),n}),i(t=>t===e?null:t)},[]),clearSessions:(0,b.useCallback)(()=>{n(new Map),i(null),o(!1),c(!1),bx().catch(()=>{})},[])}}function Sx(e,t){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(!1),o=(0,b.useRef)(null),s=(0,b.useCallback)(n=>{let r=n.filter(e=>e.name.endsWith(`.jsonl`)||e.name.endsWith(`.json`)||e.type===`text/plain`);if(r.length===0)return;let i=0,a=r.length;for(let n of r){let r=new FileReader;r.onload=()=>{e(r.result,n.name),i++,i>=a&&t(!1)},r.onerror=()=>{console.error(`Failed to read file`,n.name),i++,i>=a&&t(!1)},r.readAsText(n)}r.length>0&&t(!0)},[e,t]),c=(0,b.useCallback)(e=>{e.preventDefault(),r(!1),s(Array.from(e.dataTransfer.files))},[s]),l=(0,b.useCallback)(e=>{s(Array.from(e.target.files??[])),o.current&&(o.current.value=``)},[s]),u=(0,b.useCallback)(e=>{e.preventDefault(),r(!0)},[]),d=(0,b.useCallback)(()=>r(!1),[]),f=(0,b.useCallback)(async()=>{t(!0);try{e(await(await fetch(`/sample.jsonl`)).text(),`sample.jsonl`)}catch(e){console.error(`Failed to load sample`,e),t(!1)}},[e,t]);return(0,b.useEffect)(()=>{let t=t=>{let n=t.clipboardData?.getData(`text/plain`);!n||n.trim()[0]!==`{`||lp(n).length!==0&&(t.preventDefault(),e(n),a(!0),setTimeout(()=>a(!1),600))};return document.addEventListener(`paste`,t),()=>document.removeEventListener(`paste`,t)},[e]),{dragOver:n,pasteFlash:i,fileInputRef:o,handleDrop:c,handleDragOver:u,handleDragLeave:d,handleFileSelect:l,loadSample:f}}function Cx(e,t){let n=(0,b.useRef)(e),r=(0,b.useRef)(t);n.current=e,r.current=t,(0,b.useEffect)(()=>{if(!new URLSearchParams(window.location.search).has(`auto`))return;let e=!1,t;async function i(){if(!e){r.current(!0);try{let e=await fetch(`/api/telemetry`,{cache:`no-cache`});if(!e.ok){r.current(!1);return}let t=await e.text();if(!t.trim()){r.current(!1);return}if(lp(t).length===0){r.current(!1);return}n.current(t,`pi-session`)}catch{r.current(!1)}}}i();let a=null;function o(){e||fetch(`/api/version`,{cache:`no-cache`}).then(e=>e.json()).then(n=>{e||(a!==null&&n.version!==a&&i(),a=n.version,t=setTimeout(o,2e3))}).catch(()=>{t=setTimeout(o,5e3)})}return t=setTimeout(o,3e3),()=>{e=!0,clearTimeout(t)}},[])}function wx(e,t=[],n={}){let[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(!0),[s,c]=(0,b.useState)(null),l=(0,b.useRef)(!0);return(0,b.useEffect)(()=>{if(l.current=!0,n.skip){queueMicrotask(()=>{l.current&&o(!1)});return}return(async()=>{o(!0),c(null);try{let t=await e();l.current&&(i(t),c(null))}catch(e){l.current&&c(e instanceof Error?e:Error(String(e)))}finally{l.current&&o(!1)}})(),()=>{l.current=!1}},[...t,n.skip]),{data:r,loading:a,error:s}}var Tx=120,Ex=null;function Dx({children:e,content:t,preferredPlacement:n=`bottom`,gap:r=10,minWidth:i=240,maxWidth:a=340}){let o=(0,b.useRef)(null),s=(0,b.useRef)(null),c=(0,b.useRef)(null),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)({opacity:0,pointerEvents:`none`}),[p,m]=(0,b.useState)(`up`),[h,g]=(0,b.useState)(0),_=(0,b.useCallback)(()=>{s.current&&=(clearTimeout(s.current),null)},[]),v=(0,b.useCallback)(()=>{_(),Ex===c.current&&(Ex=null),u(!1),f({opacity:0,pointerEvents:`none`})},[_]);(0,b.useEffect)(()=>{c.current=v},[v]);let y=(0,b.useCallback)(()=>{_(),s.current=setTimeout(()=>v(),Tx)},[_,v]),x=(0,b.useCallback)(()=>{_(),Ex&&Ex!==c.current&&Ex(),Ex=c.current;let e=o.current;if(!e)return;let t=e.querySelector(`[data-tooltip-sizer]`);if(!t)return;let s=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=window.innerWidth,p=window.innerHeight,h=Math.max(i,Math.min(l.width+1,a)),v=p-s.bottom,y=s.top,b=l.height+r+14,x=n;n===`bottom`&&v<b?y>=b&&(x=`top`):n===`top`&&y<b&&v>=b&&(x=`bottom`),m(x===`bottom`?`up`:`down`);let S=x===`bottom`?s.bottom+r:void 0,C=x===`top`?p-s.top+r:void 0,w=s.left+s.width/2,T=w-h/2;T<14&&(T=14),T+h>d-14&&(T=d-14-h),g(w-T),f({position:`fixed`,top:S,bottom:C,left:T,width:h,opacity:1,pointerEvents:`auto`}),u(!0)},[_,n,r,i,a]);(0,b.useEffect)(()=>{if(!l)return;let e=()=>{_(),v()};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[l,v,_]),(0,b.useEffect)(()=>()=>{_(),Ex===c.current&&(Ex=null)},[_]);let S=p===`up`?`top-[-4px] border-l border-t`:`bottom-[-4px] border-r border-b`;return(0,F.jsxs)(`div`,{ref:o,className:`relative inline-block w-full`,onMouseEnter:x,onMouseLeave:y,onFocus:x,onBlur:y,children:[e,(0,F.jsx)(`div`,{"data-tooltip-sizer":!0,className:`fixed opacity-0 pointer-events-none`,style:{minWidth:i,maxWidth:a,visibility:`hidden`,left:-9999,top:-9999},"aria-hidden":`true`,children:t}),(0,F.jsx)(Rc,{children:l&&(0,F.jsxs)(Pu.div,{initial:{opacity:0,scale:.96,y:p===`up`?6:-6},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:p===`up`?4:-4,pointerEvents:`none`},transition:{type:`spring`,stiffness:400,damping:28,mass:.8},className:`z-[100]`,style:d,onMouseEnter:_,onMouseLeave:y,children:[(0,F.jsx)(Pu.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`absolute h-2 w-2 bg-white dark:bg-zinc-800 border-zinc-200/60 dark:border-white/[0.08] ${S}`,style:{left:h,transform:`translateX(-50%) rotate(45deg)`}}),t]},`tooltip`)})]})}function Ox({activeTps:e,wallTps:t,lossPct:n,mode:r}){let i=e>0?t/e*100:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsxs)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:[r===`avg`?`Average`:`Weighted`,` Speed`]}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`tok/s`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-2 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-moss/5 dark:bg-moss/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-moss`,children:`Active`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5 truncate`,children:Zf(e)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-accent/5 dark:bg-accent/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-accent`,children:`Wall`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5 truncate`,children:Zf(t)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-ember/5 dark:bg-ember/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-ember`,children:`Loss`}),(0,F.jsxs)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5 truncate`,children:[n.toFixed(1),`%`]})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-1`,children:[(0,F.jsx)(`span`,{children:`Retention`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-moss`,children:[i.toFixed(0),`%`]})]}),(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${i}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-ember`,style:{width:`${Math.max(0,100-i)}%`}})]})]}),(0,F.jsxs)(`div`,{className:`space-y-1 mt-2 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-moss mt-1.5 shrink-0`}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-moss`,children:`Active`}),` — generation-only throughput, excluding stalls and TTFT`]})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-accent mt-1.5 shrink-0`}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-accent`,children:`Wall`}),` — pooled wall-clock throughput, including stalls and TTFT`]})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-ember mt-1.5 shrink-0`}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-ember`,children:`Loss`}),` — percentage of active throughput lost to stalls, TTFT, and gaps`]})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:r===`avg`?`Simple mean of per-request generation throughput.`:`Token-weighted average throughput. Longer responses count more heavily.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Output speed (tokens/s) — measures the `,(0,F.jsx)(`strong`,{children:`decode`}),` stage (token-by-token generation). Also called generation throughput or output token rate.`]})]})}function Kte({total:e,models:t,avgTokensPerCall:n,stalledCalls:r,cachedCalls:i,fastCalls:a}){let o=e>0?r/e*100:0,s=e>0?i/e*100:0,c=e>0?a/e*100:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Requests`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`calls`})]}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-2.5`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Yf(e,0)}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:`total LLM calls`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Tok/call`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Yf(Math.round(n),0)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-moss/5 dark:bg-moss/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-moss`,children:`Fast TTFT`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:a})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-amber/5 dark:bg-amber/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-amber`,children:`Stalled`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:r})]})]}),(0,F.jsxs)(`div`,{className:`space-y-1.5 mb-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-0.5`,children:[(0,F.jsx)(`span`,{children:`Fast responses (< 3s TTFT)`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-moss`,children:[c.toFixed(0),`%`]})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${c}%`}})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-0.5`,children:[(0,F.jsx)(`span`,{children:`Cache-aware calls`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-accent`,children:[s.toFixed(0),`%`]})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-accent`,style:{width:`${s}%`}})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-0.5`,children:[(0,F.jsx)(`span`,{children:`Stalled calls`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-ember`,children:[o.toFixed(0),`%`]})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-ember`,style:{width:`${o}%`}})})]})]}),t.length>0&&(0,F.jsxs)(`div`,{className:`space-y-1.5 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Per Model`}),(0,F.jsx)(`p`,{className:`text-[8px] text-zinc-400 dark:text-zinc-500`,children:`calls`})]}),t.map(t=>{let n=e>0?t.callCount/e*100:0;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,F.jsx)(`span`,{className:`text-zinc-600 dark:text-zinc-300 font-medium truncate`,children:t.modelId.split(`/`).pop()}),(0,F.jsx)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:t.provider})]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200 shrink-0`,children:t.callCount})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-accent/40`,style:{width:`${n}%`}})})]},t.modelId)})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:`Each LLM call is one assistant turn. Fast responses (< 3s TTFT) felt snappy. Stalled calls experienced at least one idle pause. Cache-aware calls read or wrote prompt cache.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Requests per second (RPS) — system throughput across all concurrent requests. Primarily emphasized for batch or high-throughput serving scenarios.`]})]})}function qte({wallClockMs:e,totalTimeMs:t,generationMs:n}){let r=Math.max(0,t-n),i=Math.max(0,e-t),a=Math.max(e,t,1),o=n/a*100,s=r/a*100,c=i/a*100;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-2`,children:(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Time Breakdown`})}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-2.5`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Jf(e)}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:`wall-clock span`})]}),(0,F.jsxs)(`div`,{className:`space-y-1 mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-moss`}),`Generation time`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(n)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),`Overhead (TTFT + stalls)`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(r)})]}),i>0&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-zinc-300 dark:bg-zinc-600`}),`Idle (between requests)`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(i)})]}),t>e&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-accent`}),`Parallel overlap`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-accent`,children:Jf(t-e)})]})]}),(0,F.jsx)(`div`,{className:`mb-1`,children:(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${o}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-amber`,style:{width:`${s}%`}}),i>0&&(0,F.jsx)(`div`,{className:`h-full bg-zinc-300 dark:bg-zinc-600`,style:{width:`${c}%`}})]})}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-moss`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`gen `,o.toFixed(0),`%`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`over `,s.toFixed(0),`%`]})]}),i>0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-zinc-300 dark:bg-zinc-600`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`idle `,c.toFixed(0),`%`]})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:`Wall-clock is the real-world time from first to last event. It includes idle gaps between user interactions. "Active" time (generation + overhead) is the sum of individual request durations — it can exceed wall-clock when multiple requests execute in parallel.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` End-to-end latency — total wall-clock time from request submission to final token. Breaks down as TTFT + (ITL × output tokens).`]})]})}function Jte({avgTtft:e,p50:t,p75:n,p90:r,p99:i,min:a,max:o}){return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Time to First Token`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`latency`})]}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-3`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Jf(Math.round(e))}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:`mean`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-1 mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Min`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(a)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P50`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(t)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P75`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(n)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P90`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(r)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P99`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-ember`,children:Jf(i)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Max`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-ember`,children:Jf(o)})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:`TTFT measures the delay from sending the prompt to receiving the first token. High P99 values often indicate cold starts or queueing.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Time to First Token (TTFT) — measures the `,(0,F.jsx)(`strong`,{children:`prefill`}),` stage (prompt processing before generation begins). For reasoning models, Time to First Answer Token (TTFAT) is the operationally relevant variant.`]})]})}function Yte({count:e,ms:t,totalTimeMs:n}){let r=n>0?t/n*100:0,i=e>0?t/e:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Stall Analysis`}),(0,F.jsx)(Wf,{weight:`bold`,size:12,className:`text-ember`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex-1 rounded-lg bg-ember/5 dark:bg-ember/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-ember`,children:`Events`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Yf(e,0)})]}),(0,F.jsxs)(`div`,{className:`flex-1 rounded-lg bg-amber/5 dark:bg-amber/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-amber`,children:`Total`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Jf(t)})]}),(0,F.jsxs)(`div`,{className:`flex-1 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Avg`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Jf(Math.round(i))})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-1`,children:[(0,F.jsx)(`span`,{children:`Stall overhead`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-ember`,children:[r.toFixed(1),`%`]})]}),(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-ember`,style:{width:`${r}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${Math.max(0,100-r)}%`}})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:`Stalls are pauses where the model is idle — waiting for tokens to arrive, network hiccups, or queueing delays.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Inter-token Latency (ITL) — the time between consecutive output tokens. Also called Time Per Output Token (TPOT) when referring to the mean. Variable ITL causes perceptible stuttering even when average output speed looks acceptable.`]})]})}function Xte({totalCost:e,energyCost:t,costSource:n,models:r,totalTokens:i}){if(e===null)return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Cost`}),(0,F.jsx)(uf,{weight:`bold`,size:12,className:`text-zinc-400`})]}),(0,F.jsx)(`p`,{className:`text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:`No cost data available for this session.`})]});let a=t!==null&&e>0?(e-t)/e*100:0,o=t!==null&&e>0?t/e*100:0,s=i>0?e/(i/1e6):0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Total Cost`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`USD`})]}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Xf(e)}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:n?`source: ${n}`:`unknown source`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3 mt-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Per 1M tok`}),(0,F.jsxs)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:[`$`,s.toFixed(3)]})]}),t!==null&&(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-accent/5 dark:bg-accent/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-accent`,children:`Energy`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Xf(t)})]}),n===`both`&&t!==null&&(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-amber/5 dark:bg-amber/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-amber`,children:`Token est.`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Xf(Math.max(0,e-t))})]})]}),n===`both`&&(0,F.jsxs)(`div`,{className:`mb-3`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-1`,children:(0,F.jsx)(`span`,{children:`Cost attribution`})}),(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-accent`,style:{width:`${o}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-amber`,style:{width:`${a}%`}})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 mt-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-accent`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`neuralwatt `,o.toFixed(0),`%`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`provider `,a.toFixed(0),`%`]})]})]})]}),r.length>0&&r.some(e=>e.blendedCostUsd!==null)&&(0,F.jsxs)(`div`,{className:`space-y-1.5 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Per Model`}),(0,F.jsx)(`p`,{className:`text-[8px] text-zinc-400 dark:text-zinc-500`,children:`cost`})]}),r.filter(e=>e.blendedCostUsd!==null).sort((e,t)=>(t.blendedCostUsd??0)-(e.blendedCostUsd??0)).map(t=>{let n=e>0?(t.blendedCostUsd??0)/e*100:0,r=t.energyCostUsd!==null&&t.energyCostUsd>0,i=t.energyCostUsd??t.blendedCostUsd??0;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,F.jsx)(`span`,{className:`text-zinc-600 dark:text-zinc-300 font-medium truncate`,children:t.modelId.split(`/`).pop()}),(0,F.jsxs)(`span`,{className:`text-zinc-400 dark:text-zinc-500 text-[9px]`,children:[t.callCount,` calls`]})]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium shrink-0 ${r?`text-accent`:`text-amber`}`,children:Xf(i)})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full ${r?`bg-accent/60`:`bg-amber/60`}`,style:{width:`${n}%`}})})]},t.modelId)})]}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:[n===`neuralwatt`&&`All costs measured via NeuralWatt energy profiling.`,n===`tps`&&`All costs estimated from provider token pricing (input + output + cache).`,n===`both`&&`Costs are a hybrid — NeuralWatt where energy data was paired, provider token pricing as fallback for unpaired requests.`]})]})}function Zte({joules:e,energyCost:t,models:n,totalCalls:r}){if(e===null)return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-2`,children:(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Energy`})}),(0,F.jsx)(`p`,{className:`text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:`No energy data available for this session.`})]});let i=e/36e5,a=r>0?e/r:0,o=n.filter(e=>e.energyJoules!==null&&e.energyJoules>0),s=o.reduce((e,t)=>e+(t.energyJoules??0),0),c=e/18e3,l=e/(9*3600);return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-2`,children:(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Energy`})}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-1`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Qf(e)}),(0,F.jsxs)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:[i.toFixed(4),` kWh`]})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3 mt-2.5`,children:[t!==null&&(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-accent/5 dark:bg-accent/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-accent`,children:`Energy cost`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Xf(t)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Energy/call`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Qf(a)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-moss/5 dark:bg-moss/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-moss`,children:`Phone charges`}),(0,F.jsxs)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:[c.toFixed(1),`x`]})]})]}),(0,F.jsx)(`div`,{className:`space-y-1 mb-3`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`9W LED bulb`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[l.toFixed(1),`h`]})]})}),o.length>0&&(0,F.jsxs)(`div`,{className:`space-y-1.5 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Per Model`}),(0,F.jsx)(`p`,{className:`text-[8px] text-zinc-400 dark:text-zinc-500`,children:`scaled`})]}),o.sort((e,t)=>(t.energyJoules??0)-(e.energyJoules??0)).map(e=>{let t=s>0?(e.energyJoules??0)/s*100:0;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,F.jsx)(`span`,{className:`text-zinc-600 dark:text-zinc-300 font-medium truncate`,children:e.modelId.split(`/`).pop()}),(0,F.jsxs)(`span`,{className:`text-zinc-400 dark:text-zinc-500 text-[9px]`,children:[e.callCount,` calls`]})]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-accent shrink-0`,children:Qf(e.energyJoules??0)})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-accent/60`,style:{width:`${t}%`}})})]},e.modelId)})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:`Energy measured via NeuralWatt inference profiling. Per-model values only include paired energy events — unpaired measurements cannot be attributed to a specific model.`})]})}function Qte({input:e,output:t,cacheRead:n,cacheWrite:r,total:i,totalCost:a}){let o=i>0?e/i*100:0,s=i>0?t/i*100:0,c=i>0?n/i*100:0,l=i>0?r/i*100:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Token Breakdown`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`tokens`})]}),(0,F.jsxs)(`div`,{className:`space-y-1 mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-zinc-400`}),`New input`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(e),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,o.toFixed(0),`%)`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-accent`}),`Output`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(t),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,s.toFixed(0),`%)`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),`Cache read`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(n),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,c.toFixed(0),`%)`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-moss`}),`Cache write`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(r),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,l.toFixed(0),`%)`]})]})]})]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex`,children:[(0,F.jsx)(`div`,{className:`h-full bg-zinc-400`,style:{width:`${o}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-accent`,style:{width:`${s}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-amber`,style:{width:`${c}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${l}%`}})]})}),(0,F.jsxs)(`div`,{className:`space-y-1 mt-2 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Total`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Yf(i)})]}),a!==null&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Cost per 1M tokens`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:i>0?`$${(a/(i/1e6)).toFixed(4)}`:`-`})]})]})]})}var kx={moss:{bg:`bg-moss/5 dark:bg-moss/10`,border:`border-moss/15 dark:border-moss/20`,iconBg:`bg-moss/10 dark:bg-moss/15`,iconText:`text-moss`},accent:{bg:`bg-accent/5 dark:bg-accent/10`,border:`border-accent/15 dark:border-accent/20`,iconBg:`bg-accent/10 dark:bg-accent/15`,iconText:`text-accent`},amber:{bg:`bg-amber/5 dark:bg-amber/10`,border:`border-amber/15 dark:border-amber/20`,iconBg:`bg-amber/10 dark:bg-amber/15`,iconText:`text-amber`},ember:{bg:`bg-ember/5 dark:bg-ember/10`,border:`border-ember/15 dark:border-ember/20`,iconBg:`bg-ember/10 dark:bg-ember/15`,iconText:`text-ember`}},$te={bg:`bg-white/60 dark:bg-zinc-800/40`,border:`border-zinc-200/50 dark:border-white/[0.06]`,iconBg:`bg-zinc-100 dark:bg-white/[0.04]`,iconText:`text-zinc-500 dark:text-zinc-400`},ene=kx.accent;function tne(e,t){return e&&kx[e]?kx[e]:t?ene:$te}function Ax({icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o=!1,color:s}){let c=tne(s,o);return(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5 px-3.5 py-2.5 rounded-2xl border transition-colors ${c.bg} ${c.border}`,children:[(0,F.jsx)(`div`,{className:`shrink-0 p-1.5 rounded-lg ${c.iconBg} ${c.iconText}`,children:(0,F.jsx)(e,{weight:`bold`,size:14})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-medium uppercase tracking-wider text-zinc-400 dark:text-zinc-400 leading-none`,children:t}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-1.5 mt-0.5`,children:[(0,F.jsxs)(`p`,{className:`metric-mono text-base font-semibold text-zinc-800 dark:text-zinc-300 leading-tight whitespace-nowrap`,children:[n,r&&(0,F.jsx)(`span`,{className:`text-xs text-zinc-400 dark:text-zinc-400 ml-0.5`,children:r})]}),a&&(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-tight`,children:[i&&(0,F.jsx)(`span`,{className:`text-zinc-400 dark:text-zinc-500 mr-0.5`,children:i}),(0,F.jsx)(`span`,{className:`metric-mono font-medium`,children:a})]})]})]})]})}function jx({icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o=!1,color:s,tooltip:c}){return c?(0,F.jsx)(Dx,{content:c,children:(0,F.jsx)(Ax,{icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o,color:s})}):(0,F.jsx)(Ax,{icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o,color:s})}function Mx({icon:e,label:t,activeTps:n,wallTps:r,lossPct:i,accent:a=!1,mode:o}){return(0,F.jsx)(Dx,{content:(0,F.jsx)(Ox,{activeTps:n,wallTps:r,lossPct:i,mode:o}),preferredPlacement:`bottom`,gap:10,children:(0,F.jsx)(Ax,{icon:e,label:t,value:Zf(n),unit:`tok/s`,accent:a})})}function Nx(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Nx(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Px(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Nx(e))&&(r&&(r+=` `),r+=t);return r}var nne=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Fx(e){return typeof e==`string`?nne.includes(e):!1}var rne=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Ix(e){return typeof e==`string`?rne.has(e):!1}function Lx(e){return typeof e==`string`&&e.startsWith(`data-`)}function Rx(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Ix(n)||Lx(n))&&(t[n]=e[n]);return t}function zx(e){if(e==null)return null;if((0,b.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return Rx(t)}return typeof e==`object`&&!Array.isArray(e)?Rx(e):null}function Bx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Ix(n)||Lx(n)||Fx(n))&&(t[n]=e[n]);return t}function ine(e){return e==null?null:(0,b.isValidElement)(e)?Bx(e.props):typeof e==`object`&&!Array.isArray(e)?Bx(e):null}var ane=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Vx(){return Vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vx.apply(null,arguments)}function one(e,t){if(e==null)return{};var n,r,i=sne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hx=(0,b.forwardRef)((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=one(e,ane),d=a||{width:r,height:i,x:0,y:0},f=Px(`recharts-surface`,o);return b.createElement(`svg`,Vx({},Bx(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),b.createElement(`title`,null,c),b.createElement(`desc`,null,l),n)}),cne=[`children`,`className`];function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ux.apply(null,arguments)}function lne(e,t){if(e==null)return{};var n,r,i=une(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function une(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Wx=b.forwardRef((e,t)=>{var{children:n,className:r}=e,i=lne(e,cne),a=Px(`recharts-layer`,r);return b.createElement(`g`,Ux({className:a},Bx(i),{ref:t}),n)}),dne=(0,b.createContext)(null);function Gx(e){return function(){return e}}var Kx=Math.cos,qx=Math.sin,Jx=Math.sqrt,Yx=Math.PI;Yx/2;var Xx=2*Yx,Zx=Math.PI,Qx=2*Zx,$x=1e-6,fne=Qx-$x;function eS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function pne(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return eS;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var tS=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?eS:pne(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>$x)if(!(Math.abs(u*s-c*l)>$x)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Zx-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>$x&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>$x||Math.abs(this._y1-l)>$x)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Qx+Qx),d>fne?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>$x&&this._append`A${n},${n},0,${+(d>=Zx)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function mne(){return new tS}mne.prototype=tS.prototype;function nS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new tS(t)}Array.prototype.slice;function rS(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function iS(e){this._context=e}iS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function aS(e){return new iS(e)}function oS(e){return e[0]}function sS(e){return e[1]}function cS(e,t){var n=Gx(!0),r=null,i=aS,a=null,o=nS(s);e=typeof e==`function`?e:e===void 0?oS:Gx(e),t=typeof t==`function`?t:t===void 0?sS:Gx(t);function s(s){var c,l=(s=rS(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Gx(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function lS(e,t,n){var r=null,i=Gx(!0),a=null,o=aS,s=null,c=nS(l);e=typeof e==`function`?e:e===void 0?oS:Gx(+e),t=typeof t==`function`?t:Gx(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sS:Gx(+n);function l(l){var u,d,f,p=(l=rS(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return cS().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Gx(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Gx(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Gx(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var uS=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function hne(e){return new uS(e,!0)}function gne(e){return new uS(e,!1)}var dS={draw(e,t){let n=Jx(t/Yx);e.moveTo(n,0),e.arc(0,0,n,0,Xx)}},_ne={draw(e,t){let n=Jx(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},fS=Jx(1/3),vne=fS*2,yne={draw(e,t){let n=Jx(t/vne),r=n*fS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},bne={draw(e,t){let n=Jx(t),r=-n/2;e.rect(r,r,n,n)}},xne=.8908130915292852,pS=qx(Yx/10)/qx(7*Yx/10),Sne=qx(Xx/10)*pS,Cne=-Kx(Xx/10)*pS,wne={draw(e,t){let n=Jx(t*xne),r=Sne*n,i=Cne*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Xx*t/5,o=Kx(a),s=qx(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},mS=Jx(3),Tne={draw(e,t){let n=-Jx(t/(mS*3));e.moveTo(0,n*2),e.lineTo(-mS*n,-n),e.lineTo(mS*n,-n),e.closePath()}},hS=-.5,gS=Jx(3)/2,_S=1/Jx(12),Ene=(_S/2+1)*3,Dne={draw(e,t){let n=Jx(t/Ene),r=n/2,i=n*_S,a=r,o=n*_S+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(hS*r-gS*i,gS*r+hS*i),e.lineTo(hS*a-gS*o,gS*a+hS*o),e.lineTo(hS*s-gS*c,gS*s+hS*c),e.lineTo(hS*r+gS*i,hS*i-gS*r),e.lineTo(hS*a+gS*o,hS*o-gS*a),e.lineTo(hS*s+gS*c,hS*c-gS*s),e.closePath()}};function One(e,t){let n=null,r=nS(i);e=typeof e==`function`?e:Gx(e||dS),t=typeof t==`function`?t:Gx(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function vS(){}function yS(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function bS(e){this._context=e}bS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yS(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kne(e){return new bS(e)}function xS(e){this._context=e}xS.prototype={areaStart:vS,areaEnd:vS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:yS(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ane(e){return new xS(e)}function SS(e){this._context=e}SS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yS(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jne(e){return new SS(e)}function CS(e){this._context=e}CS.prototype={areaStart:vS,areaEnd:vS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Mne(e){return new CS(e)}function wS(e){return e<0?-1:1}function TS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(wS(a)+wS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ES(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function DS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function OS(e){this._context=e}OS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:DS(this,this._t0,ES(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,DS(this,ES(this,n=TS(this,e,t)),n);break;default:DS(this,this._t0,n=TS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kS(e){this._context=new AS(e)}(kS.prototype=Object.create(OS.prototype)).point=function(e,t){OS.prototype.point.call(this,t,e)};function AS(e){this._context=e}AS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Nne(e){return new OS(e)}function Pne(e){return new kS(e)}function jS(e){this._context=e}jS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=MS(e),i=MS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function MS(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Fne(e){return new jS(e)}function NS(e,t){this._context=e,this._t=t}NS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Ine(e){return new NS(e,.5)}function Lne(e){return new NS(e,0)}function Rne(e){return new NS(e,1)}function PS(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function FS(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function zne(e,t){return e[t]}function Bne(e){let t=[];return t.key=e,t}function Vne(){var e=Gx([]),t=FS,n=PS,r=zne;function i(i){var a=Array.from(e.apply(this,arguments),Bne),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=rS(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Gx(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?FS:typeof e==`function`?e:Gx(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??PS,i):n},i}function Hne(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}PS(e,t)}}function Une(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}PS(e,t)}}function Wne(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,PS(e,t)}}var Gne=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===`__proto__`}e.isUnsafeProperty=t})),IS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}e.isDeepKey=t})),LS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}e.toKey=t})),Kne=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(t).join(`,`);let n=String(e);return n===`0`&&Object.is(Number(e),-0)?`-0`:n}e.toString=t})),RS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Kne(),n=LS();function r(e){if(Array.isArray(e))return e.map(n.toKey);if(typeof e==`symbol`)return[e];e=t.toString(e);let r=[],i=e.length;if(i===0)return r;let a=0,o=``,s=``,c=!1;for(e.charCodeAt(0)===46&&(r.push(``),a++);a<i;){let t=e[a];s?t===`\\`&&a+1<i?(a++,o+=e[a]):t===s?s=``:o+=t:c?t===`"`||t===`'`?s=t:t===`]`?(c=!1,r.push(o),o=``):o+=t:t===`[`?(c=!0,o&&=(r.push(o),``)):t===`.`?o&&=(r.push(o),``):o+=t,a++}return o&&r.push(o),r}e.toPath=r})),zS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Gne(),n=IS(),r=LS(),i=RS();function a(e,s,c){if(e==null)return c;switch(typeof s){case`string`:{if(t.isUnsafeProperty(s))return c;let r=e[s];return r===void 0?n.isDeepKey(s)?a(e,i.toPath(s),c):c:r}case`number`:case`symbol`:{typeof s==`number`&&(s=r.toKey(s));let t=e[s];return t===void 0?c:t}default:{if(Array.isArray(s))return o(e,s,c);if(s=Object.is(s?.valueOf(),-0)?`-0`:String(s),t.isUnsafeProperty(s))return c;let n=e[s];return n===void 0?c:n}}}function o(e,n,r){if(n.length===0)return r;let i=e;for(let e=0;e<n.length;e++){if(i==null||t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}return i===void 0?r:i}e.get=a})),qne=s(((e,t)=>{t.exports=zS().get})),Jne=4;function BS(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jne),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function VS(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+BS(i)+n},``)}var HS=u(qne()),US=e=>e===0?0:e>0?1:-1,WS=e=>typeof e==`number`&&e!=+e,GS=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,H=e=>(typeof e==`number`||e instanceof Number)&&!WS(e),KS=e=>H(e)||typeof e==`string`,Yne=0,qS=e=>{var t=++Yne;return`${e||``}${t}`},JS=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!H(e)&&typeof e!=`string`)return n;var i;if(GS(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return WS(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},YS=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function XS(e,t,n){return H(e)&&H(t)?BS(e+n*(t-e)):t}function ZS(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):(0,HS.default)(e,t))===n)}var Xne=e=>{for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,c=0,l=0,u=0;u<t;u++)c=e[u]?.cx||0,l=e[u]?.cy||0,n+=c,r+=l,i+=c*l,a+=c*c,o=Math.min(o,c),s=Math.max(s,c);var d=t*a===n*n?0:(t*i-n*r)/(t*a-n*n);return{xmin:o,xmax:s,a:d,b:(r-d*n)/t}},QS=e=>e==null,$S=e=>QS(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function eC(e){return e!=null}function tC(){}var Zne=[`type`,`size`,`sizeType`];function nC(){return nC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nC.apply(null,arguments)}function rC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rC(Object(n),!0).forEach(function(t){Qne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qne(e,t,n){return(t=$ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ne(e){var t=ere(e,`string`);return typeof t==`symbol`?t:t+``}function ere(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tre(e,t){if(e==null)return{};var n,r,i=nre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nre(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aC={symbolCircle:dS,symbolCross:_ne,symbolDiamond:yne,symbolSquare:bne,symbolStar:wne,symbolTriangle:Tne,symbolWye:Dne},rre=Math.PI/180,ire=e=>aC[`symbol${$S(e)}`]||dS,are=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*rre;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},ore=(e,t)=>{aC[`symbol${$S(e)}`]=t},oC=e=>{var{type:t=`circle`,size:n=64,sizeType:r=`area`}=e,i=iC(iC({},tre(e,Zne)),{},{type:t,size:n,sizeType:r}),a=`circle`;typeof t==`string`&&(a=t);var o=()=>{var e=ire(a),t=One().type(e).size(are(n,r,a))();if(t!==null)return t},{className:s,cx:c,cy:l}=i,u=Bx(i);return H(c)&&H(l)&&H(n)?b.createElement(`path`,nC({},u,{className:Px(`recharts-symbols`,s),transform:`translate(${c}, ${l})`,d:o()})):null};oC.registerSymbol=ore;var sC=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,cC=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,b.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{Fx(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},sre=(e,t,n)=>r=>(e(t,n,r),null),lC=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Fx(i)&&typeof a==`function`&&(r||={},r[i]=sre(a,t,n))}),r},cre=e=>Array.isArray(e)&&e.length>0;function uC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lre(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uC(Object(n),!0).forEach(function(t){ure(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ure(e,t,n){return(t=dre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dre(e){var t=fre(e,`string`);return typeof t==`symbol`?t:t+``}function fre(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dC(e,t){var n=lre({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}var pre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}e.uniqBy=t})),mre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}e.ary=t})),fC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e}e.identity=t})),hre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Number.isSafeInteger(e)&&e>=0}e.isLength=t})),pC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=hre();function n(e){return e!=null&&typeof e!=`function`&&t.isLength(e.length)}e.isArrayLike=n})),gre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`object`&&!!e}e.isObjectLike=t})),_re=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=pC(),n=gre();function r(e){return n.isObjectLike(e)&&t.isArrayLike(e)}e.isArrayLikeObject=r})),vre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=zS();function n(e){return function(n){return t.get(n,e)}}e.property=n})),mC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}e.isObject=t})),hC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null||typeof e!=`object`&&typeof e!=`function`}e.isPrimitive=t})),gC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}e.isEqualsSameValueZero=t})),yre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=mC(),n=hC(),r=gC();function i(e,t,n){return typeof n==`function`?a(e,t,function e(t,r,i,o,s,c){let l=n(t,r,i,o,s,c);return l===void 0?a(t,r,e,c):!!l},new Map):i(e,t,()=>void 0)}function a(e,n,i,s){if(n===e)return!0;switch(typeof n){case`object`:return o(e,n,i,s);case`function`:return Object.keys(n).length>0?a(e,{...n},i,s):r.isEqualsSameValueZero(e,n);default:return t.isObject(e)?typeof n==`string`?n===``:!0:r.isEqualsSameValueZero(e,n)}}function o(e,t,r,i){if(t==null)return!0;if(Array.isArray(t))return c(e,t,r,i);if(t instanceof Map)return s(e,t,r,i);if(t instanceof Set)return l(e,t,r,i);let a=Object.keys(t);if(e==null||n.isPrimitive(e))return a.length===0;if(a.length===0)return!0;if(i?.has(t))return i.get(t)===e;i?.set(t,e);try{for(let o=0;o<a.length;o++){let s=a[o];if(!n.isPrimitive(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!r(e[s],t[s],s,e,t,i))return!1}return!0}finally{i?.delete(t)}}function s(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function c(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function l(e,t,n,r){return t.size===0?!0:e instanceof Set?c([...e],[...t],n,r):!1}e.isMatchWith=i,e.isSetMatch=l})),_C=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=yre();function n(e,n){return t.isMatchWith(e,n,()=>void 0)}e.isMatch=n})),bre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}e.getSymbols=t})),vC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}e.getTag=t})),yC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.argumentsTag=`[object Arguments]`,e.arrayBufferTag=`[object ArrayBuffer]`,e.arrayTag=`[object Array]`,e.bigInt64ArrayTag=`[object BigInt64Array]`,e.bigUint64ArrayTag=`[object BigUint64Array]`,e.booleanTag=`[object Boolean]`,e.dataViewTag=`[object DataView]`,e.dateTag=`[object Date]`,e.errorTag=`[object Error]`,e.float32ArrayTag=`[object Float32Array]`,e.float64ArrayTag=`[object Float64Array]`,e.functionTag=`[object Function]`,e.int16ArrayTag=`[object Int16Array]`,e.int32ArrayTag=`[object Int32Array]`,e.int8ArrayTag=`[object Int8Array]`,e.mapTag=`[object Map]`,e.numberTag=`[object Number]`,e.objectTag=`[object Object]`,e.regexpTag=`[object RegExp]`,e.setTag=`[object Set]`,e.stringTag=`[object String]`,e.symbolTag=`[object Symbol]`,e.uint16ArrayTag=`[object Uint16Array]`,e.uint32ArrayTag=`[object Uint32Array]`,e.uint8ArrayTag=`[object Uint8Array]`,e.uint8ClampedArrayTag=`[object Uint8ClampedArray]`})),xre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.globalThis=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)()})),bC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=xre();function n(e){return t.globalThis.Buffer!==void 0&&t.globalThis.Buffer.isBuffer(e)}e.isBuffer=n})),xC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}e.isTypedArray=t})),SC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=bre(),n=vC(),r=yC(),i=bC(),a=hC(),o=xC();function s(e,t){return c(e,void 0,e,new Map,t)}function c(e,t,n,r=new Map,s=void 0){let d=s?.(e,t,n,r);if(d!==void 0)return d;if(a.isPrimitive(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=c(e[i],i,n,r,s);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[i,a]of e)t.set(i,c(a,i,n,r,s));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let i of e)t.add(c(i,void 0,n,r,s));return t}if(i.isBuffer(e))return e.subarray();if(o.isTypedArray(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=c(e[i],i,n,r,s);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),l(t,e,n,r,s),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),l(t,e,n,r,s),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,l(t,e,n,r,s),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(typeof e==`object`&&u(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),l(t,e,n,r,s),t}return e}function l(e,n,r=e,i,a){let o=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<o.length;t++){let s=o[t],l=Object.getOwnPropertyDescriptor(e,s);(l==null||l.writable)&&(e[s]=c(n[s],s,r,i,a))}}function u(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=l})),CC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=SC();function n(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}e.cloneDeep=n})),wC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=_C(),n=CC();function r(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}e.matches=r})),TC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=SC(),n=vC(),r=yC();function i(e,i){return t.cloneDeepWith(e,(a,o,s,c)=>{let l=i?.(a,o,s,c);if(l!==void 0)return l;if(typeof e==`object`){if(n.getTag(e)===r.objectTag&&typeof e.constructor!=`function`){let n={};return c.set(e,n),t.copyProperties(n,e,s,c),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{let n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{let n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}e.cloneDeepWith=i})),EC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=TC();function n(e){return t.cloneDeepWith(e)}e.cloneDeep=n})),DC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=/^(?:0|[1-9]\d*)$/;function n(e,n=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<n;case`symbol`:return!1;case`string`:return t.test(e)}}e.isIndex=n})),OC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=vC();function n(e){return typeof e==`object`&&!!e&&t.getTag(e)===`[object Arguments]`}e.isArguments=n})),kC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=IS(),n=DC(),r=OC(),i=RS();function a(e,a){let o;if(o=Array.isArray(a)?a:typeof a==`string`&&t.isDeepKey(a)&&e?.[a]==null?i.toPath(a):[a],o.length===0)return!1;let s=e;for(let e=0;e<o.length;e++){let t=o[e];if((s==null||!Object.hasOwn(s,t))&&!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1;s=s[t]}return!0}e.has=a})),AC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=_C(),n=LS(),r=EC(),i=zS(),a=kC();function o(e,o){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=n.toKey(e);break}return o=r.cloneDeep(o),function(n){let r=i.get(n,e);return r===void 0?a.has(n,e):o===void 0?r===void 0:t.isMatch(r,o)}}e.matchesProperty=o})),jC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=fC(),n=vre(),r=wC(),i=AC();function a(e){if(e==null)return t.identity;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?i.matchesProperty(e[0],e[1]):r.matches(e);case`string`:case`symbol`:case`number`:return n.property(e)}}e.iteratee=a})),MC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=pre(),n=mre(),r=fC(),i=_re(),a=jC();function o(e,o=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(a.iteratee(o),1)):[]}e.uniqBy=o})),NC=u(s(((e,t)=>{t.exports=MC().uniqBy}))());function PC(e,t,n){return t===!0?(0,NC.default)(e,n):typeof t==`function`?(0,NC.default)(e,t):e}var FC=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),IC=s(((e,t)=>{t.exports=FC()})),LC=s((e=>{var t=p(),n=IC();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),RC=s(((e,t)=>{t.exports=LC()})),zC=(0,b.createContext)(null),BC=RC(),VC=e=>e,HC=()=>{var e=(0,b.useContext)(zC);return e?e.store.dispatch:VC},UC=()=>{},WC=()=>UC,GC=(e,t)=>e===t;function U(e){var t=(0,b.useContext)(zC),n=(0,b.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:UC,[t,e]);return(0,BC.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:WC,t?t.store.getState:UC,t?t.store.getState:UC,n,GC)}function KC(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function qC(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function JC(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var YC=e=>Array.isArray(e)?e:[e];function XC(e){let t=Array.isArray(e[0])?e[0]:e;return JC(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function ZC(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var QC=class{constructor(e){this.value=e}deref(){return this.value}},$C=typeof WeakRef<`u`?WeakRef:QC,ew=0,tw=1;function nw(){return{s:ew,v:void 0,o:null,p:null}}function rw(e,t={}){let n=nw(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=nw(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=nw(),e.set(n,t)):t=r}}let s=t,c;if(t.s===tw)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new $C(c):c}return s.s=tw,s.v=c,c}return o.clearCache=()=>{n=nw(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function iw(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),KC(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=rw,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=YC(c),p=YC(u),m=XC(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=ZC(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var W=iw(rw),aw=Object.assign((e,t=W)=>{qC(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>aw}),ow=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}e.compareValues=(e,n,r)=>{if(e!==n){let i=t(e),a=t(n);if(i===a&&i===0){if(e<n)return r===`desc`?1:-1;if(e>n)return r===`desc`?-1:1}return r===`desc`?a-i:i-a}return 0}})),sw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`||e instanceof Symbol}e.isSymbol=t})),cw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=sw(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(e,i){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||t.isSymbol(e)?!0:typeof e==`string`&&(r.test(e)||!n.test(e))||i!=null&&Object.hasOwn(i,e)}e.isKey=i})),lw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=ow(),n=cw(),r=RS();function i(e,i,a,o){if(e==null)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(e=>String(e));let s=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},c=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?s(t,e):typeof t==`object`?t[e]:t,l=i.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>c(t,e))})).slice().sort((e,n)=>{for(let r=0;r<l.length;r++){let i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(i!==0)return i}return 0}).map(e=>e.original)}e.orderBy=i})),uw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}e.flatten=t})),dw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=DC(),n=pC(),r=mC(),i=gC();function a(e,a,o){return r.isObject(o)&&(typeof a==`number`&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||typeof a==`string`&&a in o)?i.isEqualsSameValueZero(o[a],e):!1}e.isIterateeCall=a})),fw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=lw(),n=uw(),r=dw();function i(e,...i){let a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),[`asc`])}e.sortBy=i})),pw=u(s(((e,t)=>{t.exports=fw().sortBy}))()),mw=e=>e.legend.settings,hw=e=>e.legend.size;W([e=>e.legend.payload,mw],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?(0,pw.default)(r,n):r});var gw=1;function _w(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=(0,b.useState)({height:0,left:0,top:0,width:0});return[t,(0,b.useCallback)(e=>{if(e!=null){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>gw||Math.abs(i.left-t.left)>gw||Math.abs(i.top-t.top)>gw||Math.abs(i.width-t.width)>gw)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e])]}function vw(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yw=typeof Symbol==`function`&&Symbol.observable||`@@observable`,bw=()=>Math.random().toString(36).substring(7).split(``).join(`.`),xw={INIT:`@@redux/INIT${bw()}`,REPLACE:`@@redux/REPLACE${bw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${bw()}`};function Sw(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Cw(e,t,n){if(typeof e!=`function`)throw Error(vw(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(vw(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(vw(1));return n(Cw)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(vw(3));return i}function d(e){if(typeof e!=`function`)throw Error(vw(4));if(c)throw Error(vw(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(vw(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!Sw(e))throw Error(vw(7));if(e.type===void 0)throw Error(vw(8));if(typeof e.type!=`string`)throw Error(vw(17));if(c)throw Error(vw(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(vw(10));r=e,f({type:xw.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(vw(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[yw](){return this}}}return f({type:xw.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[yw]:m}}function ww(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:xw.INIT})===void 0)throw Error(vw(12));if(n(void 0,{type:xw.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(vw(13))})}function Tw(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{ww(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(vw(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function Ew(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Dw(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(vw(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=Ew(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function Ow(e){return Sw(e)&&`type`in e&&typeof e.type==`string`}var kw=Symbol.for(`immer-nothing`),Aw=Symbol.for(`immer-draftable`),jw=Symbol.for(`immer-state`);function Mw(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nw=Object,Pw=Nw.getPrototypeOf,Fw=`constructor`,Iw=`prototype`,Lw=`configurable`,Rw=`enumerable`,zw=`writable`,Bw=`value`,Vw=e=>!!e&&!!e[jw];function Hw(e){return e?Gw(e)||Qw(e)||!!e[Aw]||!!e[Fw]?.[Aw]||$w(e)||eT(e):!1}var Uw=Nw[Iw][Fw].toString(),Ww=new WeakMap;function Gw(e){if(!e||!tT(e))return!1;let t=Pw(e);if(t===null||t===Nw[Iw])return!0;let n=Nw.hasOwnProperty.call(t,Fw)&&t[Fw];if(n===Object)return!0;if(!nT(n))return!1;let r=Ww.get(n);return r===void 0&&(r=Function.toString.call(n),Ww.set(n,r)),r===Uw}function Kw(e,t,n=!0){qw(e)===0?(n?Reflect.ownKeys(e):Nw.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function qw(e){let t=e[jw];return t?t.type_:Qw(e)?1:$w(e)?2:eT(e)?3:0}var Jw=(e,t,n=qw(e))=>n===2?e.has(t):Nw[Iw].hasOwnProperty.call(e,t),Yw=(e,t,n=qw(e))=>n===2?e.get(t):e[t],Xw=(e,t,n,r=qw(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Zw(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Qw=Array.isArray,$w=e=>e instanceof Map,eT=e=>e instanceof Set,tT=e=>typeof e==`object`,nT=e=>typeof e==`function`,rT=e=>typeof e==`boolean`;function iT(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var aT=e=>e.copy_||e.base_,oT=e=>e.modified_?e.copy_:e.base_;function sT(e,t){if($w(e))return new Map(e);if(eT(e))return new Set(e);if(Qw(e))return Array[Iw].slice.call(e);let n=Gw(e);if(t===!0||t===`class_only`&&!n){let t=Nw.getOwnPropertyDescriptors(e);delete t[jw];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[zw]===!1&&(a[zw]=!0,a[Lw]=!0),(a.get||a.set)&&(t[i]={[Lw]:!0,[zw]:!0,[Rw]:a[Rw],[Bw]:e[i]})}return Nw.create(Pw(e),t)}else{let t=Pw(e);if(t!==null&&n)return{...e};let r=Nw.create(t);return Nw.assign(r,e)}}function cT(e,t=!1){return dT(e)||Vw(e)||!Hw(e)?e:(qw(e)>1&&Nw.defineProperties(e,{set:uT,add:uT,clear:uT,delete:uT}),Nw.freeze(e),t&&Kw(e,(e,t)=>{cT(t,!0)},!1),e)}function lT(){Mw(2)}var uT={[Bw]:lT};function dT(e){return e===null||!tT(e)?!0:Nw.isFrozen(e)}var fT=`MapSet`,pT=`Patches`,mT=`ArrayMethods`,hT={};function gT(e){let t=hT[e];return t||Mw(0,e),t}var _T=e=>!!hT[e],vT,yT=()=>vT,bT=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:_T(fT)?gT(fT):void 0,arrayMethodsPlugin_:_T(mT)?gT(mT):void 0});function xT(e,t){t&&(e.patchPlugin_=gT(pT),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ST(e){CT(e),e.drafts_.forEach(TT),e.drafts_=null}function CT(e){e===vT&&(vT=e.parent_)}var wT=e=>vT=bT(vT,e);function TT(e){let t=e[jw];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ET(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[jw].modified_&&(ST(t),Mw(4)),Hw(e)&&(e=DT(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[jw].base_,e,t)}else e=DT(t,n);return OT(t,e,!0),ST(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===kw?void 0:e}function DT(e,t){if(dT(t))return t;let n=t[jw];if(!n)return IT(t,e.handledSet_,e);if(!AT(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);PT(n,e)}return n.copy_}function OT(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cT(t,n)}function kT(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var AT=(e,t)=>e.scope_===t,jT=[];function MT(e,t,n,r){let i=aT(e),a=e.type_;if(r!==void 0&&Yw(i,r,a)===t){Xw(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Kw(i,(e,n)=>{if(Vw(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??jT;for(let e of o)Xw(i,e,n,a)}function NT(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!AT(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=oT(i);MT(e,i.draft_??i,a,n),PT(i,r)})}function PT(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}kT(e)}}function FT(e,t,n){let{scope_:r}=e;if(Vw(n)){let i=n[jw];AT(i,r)&&i.callbacks_.push(function(){WT(e),MT(e,n,oT(i),t)})}else Hw(n)&&e.callbacks_.push(function(){let i=aT(e);e.type_===3?i.has(n)&&IT(n,r.handledSet_,r):Yw(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&IT(Yw(e.copy_,t,e.type_),r.handledSet_,r)})}function IT(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Vw(e)||t.has(e)||!Hw(e)||dT(e)?e:(t.add(e),Kw(e,(r,i)=>{if(Vw(i)){let t=i[jw];AT(t,n)&&(Xw(e,r,oT(t),e.type_),kT(t))}else Hw(i)&&IT(i,t,n)}),e)}function LT(e,t){let n=Qw(e),r={type_:+!!n,scope_:t?t.scope_:yT(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=RT;n&&(i=[r],a=zT);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var RT={get(e,t){if(t===jw)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=aT(e);if(!Jw(i,t,e.type_))return VT(e,i,t);let a=i[t];if(e.finalized_||!Hw(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&iT(t))return a;if(a===BT(e.base_,t)){WT(e);let n=e.type_===1?+t:t,r=GT(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in aT(e)},ownKeys(e){return Reflect.ownKeys(aT(e))},set(e,t,n){let r=HT(aT(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=BT(aT(e),t),i=r?.[jw];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Zw(n,r)&&(n!==void 0||Jw(e.base_,t,e.type_)))return!0;WT(e),UT(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),FT(e,t,n),!0)},deleteProperty(e,t){return WT(e),BT(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),UT(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=aT(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[zw]:!0,[Lw]:e.type_!==1||t!==`length`,[Rw]:r[Rw],[Bw]:n[t]}},defineProperty(){Mw(11)},getPrototypeOf(e){return Pw(e.base_)},setPrototypeOf(){Mw(12)}},zT={};for(let e in RT){let t=RT[e];zT[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}zT.deleteProperty=function(e,t){return zT.set.call(this,e,t,void 0)},zT.set=function(e,t,n){return RT.set.call(this,e[0],t,n,e[0])};function BT(e,t){let n=e[jw];return(n?aT(n):e)[t]}function VT(e,t,n){let r=HT(t,n);return r?Bw in r?r[Bw]:r.get?.call(e.draft_):void 0}function HT(e,t){if(!(t in e))return;let n=Pw(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Pw(n)}}function UT(e){e.modified_||(e.modified_=!0,e.parent_&&UT(e.parent_))}function WT(e){e.copy_||=(e.assigned_=new Map,sT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sre=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(nT(e)&&!nT(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}nT(t)||Mw(6),n!==void 0&&!nT(n)&&Mw(7);let r;if(Hw(e)){let i=wT(this),a=GT(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ST(i):CT(i)}return xT(i,n),ET(r,i)}else if(!e||!tT(e)){if(r=t(e),r===void 0&&(r=e),r===kw&&(r=void 0),this.autoFreeze_&&cT(r,!0),n){let t=[],i=[];gT(pT).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else Mw(1,e)},this.produceWithPatches=(e,t)=>{if(nT(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},rT(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),rT(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),rT(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Hw(e)||Mw(8),Vw(e)&&(e=KT(e));let t=wT(this),n=GT(t,e,void 0);return n[jw].isManual_=!0,CT(t),n}finishDraft(e,t){let n=e&&e[jw];(!n||!n.isManual_)&&Mw(9);let{scope_:r}=n;return xT(r,t),ET(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=gT(pT).applyPatches_;return Vw(e)?r(e,t):this.produce(e,e=>r(e,t))}};function GT(e,t,n,r){let[i,a]=$w(t)?gT(fT).proxyMap_(t,n):eT(t)?gT(fT).proxySet_(t,n):LT(t,n);return(n?.scope_??yT()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?NT(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function KT(e){return Vw(e)||Mw(10,e),qT(e)}function qT(e){if(!Hw(e)||dT(e))return e;let t=e[jw],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=sT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=sT(e,!0);return Kw(n,(e,t)=>{Xw(n,e,qT(t))},r),t&&(t.finalized_=!1),n}var JT=new Sre().produce;function YT(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Cre=YT(),wre=YT,Tre=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?Ew:Ew.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function XT(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(jE(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Ow(t)&&t.type===e,n}var ZT=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function QT(e){return Hw(e)?JT(e,()=>{}):e}function $T(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Ere(e){return typeof e==`boolean`}var Dre=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new ZT;return t&&(Ere(t)?a.push(Cre):a.push(wre(t.extraArgument))),a},eE=`RTK_autoBatch`,tE=()=>e=>({payload:e,meta:{[eE]:!0}}),nE=e=>t=>{setTimeout(t,e)},Ore=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},rE=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Ore(window.requestAnimationFrame,100):nE(10):e.type===`callback`?e.queueNotification:nE(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[eE],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},kre=e=>function(t){let{autoBatch:n=!0}=t??{},r=new ZT(e);return n&&r.push(rE(typeof n==`object`?n:void 0)),r};function Are(e){let t=Dre(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(Sw(n))c=Tw(n);else throw Error(jE(1));let l;l=typeof r==`function`?r(t):t();let u=Ew;i&&(u=Tre({trace:!1,...typeof i==`object`&&i}));let d=kre(Dw(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return Cw(c,o,p)}function iE(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(jE(28));if(r in t)throw Error(jE(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function jre(e){return typeof e==`function`}function Mre(e,t){let[n,r,i]=iE(t),a;if(jre(e))a=()=>QT(e());else{let t=QT(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(Vw(e)){let r=n(e,t);return r===void 0?e:r}else if(Hw(e))return JT(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var Nre=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,Pre=(e=21)=>{let t=``,n=e;for(;n--;)t+=Nre[Math.random()*64|0];return t},Fre=Symbol.for(`rtk-slice-createasyncthunk`);function Ire(e,t){return`${e}/${t}`}function Lre({creators:e}={}){let t=e?.asyncThunk?.[Fre];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(jE(11));let i=(typeof e.reducers==`function`?e.reducers(zre()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(jE(12));if(n in o.sliceCaseReducersByType)throw Error(jE(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:Ire(n,r),createNotation:typeof e.reducers==`function`};Vre(a)?Ure(o,a,s,t):Bre(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?iE(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return Mre(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=$T(d,r,m)),i}function i(t=l){return $T($T(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=Rre(a,t,()=>$T(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function Rre(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var aE=Lre();function zre(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function Bre({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!Hre(r))throw Error(jE(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?XT(e,o):XT(e))}function Vre(e){return e._reducerDefinitionType===`asyncThunk`}function Hre(e){return e._reducerDefinitionType===`reducerWithPrepare`}function Ure({type:e,reducerName:t},n,r,i){if(!i)throw Error(jE(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||oE,pending:s||oE,rejected:c||oE,settled:l||oE})}function oE(){}var Wre=`task`,sE=`listener`,cE=`completed`,lE=`cancelled`,Gre=`task-${lE}`,Kre=`task-${cE}`,uE=`${sE}-${lE}`,qre=`${sE}-${cE}`,dE=class{constructor(e){this.code=e,this.message=`${Wre} ${lE} (reason: ${e})`}code;name=`TaskAbortError`;message},fE=(e,t)=>{if(typeof e!=`function`)throw TypeError(jE(32))},pE=()=>{},mE=(e,t=pE)=>(e.catch(t),e),hE=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),gE=e=>{if(e.aborted)throw new dE(e.reason)};function _E(e,t){let n=pE;return new Promise((r,i)=>{let a=()=>i(new dE(e.reason));if(e.aborted){a();return}n=hE(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=pE})}var Jre=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof dE?`cancelled`:`rejected`,error:e}}finally{t?.()}},vE=e=>t=>mE(_E(e,t).then(t=>(gE(e),t))),yE=e=>{let t=vE(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:bE}=Object,xE={},SE=`listenerMiddleware`,Yre=(e,t)=>{let n=t=>hE(e,()=>t.abort(e.reason));return(r,i)=>{fE(r,`taskExecutor`);let a=new AbortController;n(a);let o=Jre(async()=>{gE(e),gE(a.signal);let t=await r({pause:vE(a.signal),delay:yE(a.signal),signal:a.signal});return gE(a.signal),t},()=>a.abort(Kre));return i?.autoJoin&&t.push(o.catch(pE)),{result:vE(e)(o),cancel(){a.abort(Gre)}}}},Xre=(e,t)=>{let n=async(n,r)=>{gE(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await _E(t,Promise.race(a));return gE(t),e}finally{i()}};return((e,t)=>mE(n(e,t)))},CE=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=XT(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(jE(21));return fE(a,`options.listener`),{predicate:i,type:t,effect:a}},wE=bE(e=>{let{type:t,predicate:n,effect:r}=CE(e);return{id:Pre(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(jE(22))}}},{withTypes:()=>wE}),TE=(e,t)=>{let{type:n,effect:r,predicate:i}=CE(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},EE=e=>{e.pending.forEach(e=>{e.abort(uE)})},Zre=(e,t)=>()=>{for(let e of t.keys())EE(e);e.clear()},DE=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},OE=bE(XT(`${SE}/add`),{withTypes:()=>OE}),Qre=XT(`${SE}/removeAll`),kE=bE(XT(`${SE}/remove`),{withTypes:()=>kE}),$re=(...e)=>{console.error(`${SE}/error`,...e)},AE=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=$re}=e;fE(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&EE(e)}),c=(e=>s(TE(t,e)??wE(e)));bE(c,{withTypes:()=>c});let l=e=>{let n=TE(t,e);return n&&(n.unsubscribe(),e.cancelActive&&EE(n)),!!n};bE(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Xre(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,bE({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:yE(u.signal),pause:vE(u.signal),extra:a,signal:u.signal,fork:Yre(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(uE),n.delete(e))})},cancel:()=>{u.abort(uE),e.pending.delete(u)},throwIfCancelled:()=>{gE(u.signal)}})))}catch(e){e instanceof dE||DE(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(qre),i(e),e.pending.delete(u)}},d=Zre(t,n);return{middleware:e=>n=>r=>{if(!Ow(r))return n(r);if(OE.match(r))return c(r.payload);if(Qre.match(r)){d();return}if(kE.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===xE)throw Error(jE(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,DE(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=xE}return s},startListening:c,stopListening:l,clearListeners:d}};function jE(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ME=aE({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),{setMargin:eie,setLayout:tie,setChartSize:nie,setScale:rie}=ME.actions,iie=ME.reducer;function NE(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function PE(e){return Number.isFinite(e)}function FE(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function IE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?IE(Object(n),!0).forEach(function(t){aie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aie(e,t,n){return(t=oie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oie(e){var t=sie(e,`string`);return typeof t==`symbol`?t:t+``}function sie(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function RE(e,t,n){return QS(e)||QS(t)?n:KS(t)?(0,HS.default)(e,t,n):typeof t==`function`?t(e):n}var cie=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&H(e[a]))return LE(LE({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&H(e[o]))return LE(LE({},e),{},{[o]:e[o]+(i||0)})}return e},zE=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,BE=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},VE=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:l,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?US(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return PE(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(eC):c&&l?l.map((e,t)=>{var n=o.map(e);return PE(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(eC):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return PE(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(eC):o.domain().map((e,t)=>{var n=o.map(e);return PE(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(eC)},lie=(e,t)=>{if(!t||t.length!==2||!H(t[0])||!H(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!H(e[0])||e[0]<n)&&(i[0]=n),(!H(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},uie={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=WS(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Hne,none:PS,silhouette:Une,wiggle:Wne,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=WS(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},die=(e,t,n)=>{var r=uie[n]??PS,i=Vne().keys(t).value((e,t)=>Number(RE(e,t,0))).order(FS).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=RE(e[i],t[r],0);Array.isArray(a)&&a.length===2&&H(a[0])&&H(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function HE(e){return e==null?void 0:String(e)}function UE(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!QS(i[t.dataKey])){var s=ZS(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=RE(i,QS(o)?t.dataKey:o),l=t.scale.map(c);return H(l)?l:null}var WE=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=RE(a,t.dataKey,t.scale.domain()[o]);if(QS(s))return null;var c=t.scale.map(s);return H(c)?c-i/2+r:null},fie=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},pie=e=>{var t=e.flat(2).filter(H);return[Math.min(...t),Math.max(...t)]},mie=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],hie=(e,t,n)=>{if(e!=null)return mie(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=pie(NE(r,t,n));return!PE(i[0])||!PE(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},GE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,KE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qE=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,pw.default)(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function JE(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return LE(LE({},t),{},{dataKey:n,payload:r,value:i,name:a})}function YE(e,t){if(e)return String(e);if(typeof t==`string`)return t}var gie=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},_ie=(e,t)=>t===`centric`?e.angle:e.radius,XE=e=>e.layout.width,ZE=e=>e.layout.height,vie=e=>e.layout.scale,QE=e=>e.layout.margin,$E=W(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),eD=W(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),tD=`data-recharts-item-index`,nD=`data-recharts-item-id`;function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rD(Object(n),!0).forEach(function(t){yie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yie(e,t,n){return(t=bie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bie(e){var t=xie(e,`string`);return typeof t==`symbol`?t:t+``}function xie(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Sie=e=>e.brush.height;function Cie(e){return eD(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function wie(e){return eD(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Tie(e){return $E(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function Eie(e){return $E(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var aD=W([XE,ZE,QE,Sie,Cie,wie,Tie,Eie,mw,hw],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=iD(iD({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=cie(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return iD(iD({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Die=W(aD,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),oD=W(XE,ZE,(e,t)=>({x:0,y:0,width:e,height:t})),Oie=(0,b.createContext)(null),sD=()=>(0,b.useContext)(Oie)!=null,cD=e=>e.brush,lD=W([cD,aD,QE],(e,t,n)=>({height:e.height,x:H(e.x)?e.x:t.left,y:H(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:H(e.width)?e.width:t.width})),kie=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}e.debounce=t})),Aie=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=kie();function n(e,n=0,r={}){typeof r!=`object`&&(r={});let{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=[,,];i&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=t.debounce(function(...t){c=e.apply(this,t),l=null},n,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}e.debounce=n})),jie=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Aie();function n(e,n=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}e.throttle=n})),Mie=s(((e,t)=>{t.exports=jie().throttle})),Nie=!0,uD=function(e,t){var n=[...arguments].slice(2);if(Nie&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},dD={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},fD=(e,t,n)=>{var{width:r=dD.width,height:i=dD.height,aspect:a,maxHeight:o}=n,s=GS(r)?e:Number(r),c=GS(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},Pie={width:0,height:0,overflow:`visible`},Fie={width:0,overflowX:`visible`},Iie={height:0,overflowY:`visible`},Lie={},Rie=e=>{var{width:t,height:n}=e,r=GS(t),i=GS(n);return r&&i?Pie:r?Fie:i?Iie:Lie};function zie(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=dD.width,a=dD.height):i===void 0?i=r&&r>0?void 0:dD.width:a===void 0&&(a=r&&r>0?void 0:dD.height),{width:i,height:a}}var Bie=u(Mie());function pD(){return pD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pD.apply(null,arguments)}function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mD(Object(n),!0).forEach(function(t){Vie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vie(e,t,n){return(t=Hie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hie(e){var t=Uie(e,`string`);return typeof t==`symbol`?t:t+``}function Uie(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gD=(0,b.createContext)(dD.initialDimension);function Wie(e){return FE(e.width)&&FE(e.height)}function _D(e){var{children:t,width:n,height:r}=e,i=(0,b.useMemo)(()=>({width:n,height:r}),[n,r]);return Wie(i)?b.createElement(gD.Provider,{value:i},t):null}var vD=()=>(0,b.useContext)(gD),Gie=(0,b.forwardRef)((e,t)=>{var{aspect:n,initialDimension:r=dD.initialDimension,width:i,height:a,minWidth:o=dD.minWidth,minHeight:s,maxHeight:c,children:l,debounce:u=dD.debounce,id:d,className:f,onResize:p,style:m={}}=e,h=(0,b.useRef)(null),g=(0,b.useRef)();g.current=p,(0,b.useImperativeHandle)(t,()=>h.current);var[_,v]=(0,b.useState)({containerWidth:r.width,containerHeight:r.height}),y=(0,b.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,b.useEffect)(()=>{if(h.current==null||typeof ResizeObserver>`u`)return tC;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;y(r,i),(t=g.current)==null||t.call(g,r,i)}};u>0&&(e=(0,Bie.default)(e,u,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=h.current.getBoundingClientRect();return y(n,r),t.observe(h.current),()=>{t.disconnect()}},[y,u]);var{containerWidth:x,containerHeight:S}=_;uD(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var{calculatedWidth:C,calculatedHeight:w}=fD(x,S,{width:i,height:a,aspect:n,maxHeight:c});return uD(C!=null&&C>0||w!=null&&w>0,`The width(%s) and height(%s) of chart should be greater than 0,
206
+ `)}async function yx(e){let{conn:t}=await gx(),n=await t.query(e),r=n.schema.fields.map(e=>e.name),i=[];for(let e of n.batches){let t=r.map(t=>e.getChild(t));for(let n=0;n<e.numRows;n++){let e=t.map(e=>{let t=e?.get(n);return typeof t==`bigint`?Number(t):t??null});i.push(e)}}return{columns:r,rows:i,rowCount:i.length}}async function bx(){let{conn:e}=await gx();await e.query(`DROP VIEW IF EXISTS tps_paired`),await e.query(`DROP VIEW IF EXISTS messages_flat`),await e.query(`DROP VIEW IF EXISTS tps_flat`),await e.query(`DROP VIEW IF EXISTS energy_flat`),await e.query(`DROP VIEW IF EXISTS energy_detailed`),await e.query(`DROP TABLE IF EXISTS events`)}function xx(e){let[t,n]=(0,b.useState)(new Map),[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(!1),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(0),d=(0,b.useMemo)(()=>{if(t.size===0)return null;if(r)return t.get(r)?.events??null;let e=[];for(let n of t.values())e.push(...n.events);return e},[t,r]),f=(0,b.useMemo)(()=>d?up(d):[],[d]),p=(0,b.useMemo)(()=>d?dp(d):[],[d]),m=(0,b.useMemo)(()=>fp(f,p),[f,p]),h=(0,b.useMemo)(()=>d?pp(d,m):[],[d,m]);return(0,b.useEffect)(()=>{if(t.size===0){queueMicrotask(()=>{o(!1),c(!1),e(!1)});return}queueMicrotask(()=>{o(!0),e(!1)});let n=!1,r=setTimeout(()=>{let e=[];for(let n of t.values())e.push(...n.events);vx(e).then(()=>{n||(u(e=>e+1),o(!1),c(!0))}).catch(e=>{console.error(`DuckDB load failed:`,e),n||o(!1)})},100);return()=>{n=!0,clearTimeout(r)}},[t,e]),{sessions:t,activeSessionId:r,setActiveSessionId:i,dbLoading:a,hasLoaded:s,dbVersion:l,events:d,allTpsEvents:f,allEnergyEvents:p,paired:m,timeline:h,addSession:(0,b.useCallback)((e,t)=>{let r=sp(e),a=cp(r),o=r.sessionId;n(n=>{let i=new Map(n);return i.set(o,{raw:e,ingest:r,events:a,fileName:t}),i}),i(null)},[]),removeSession:(0,b.useCallback)(e=>{n(t=>{let n=new Map(t);return n.delete(e),n}),i(t=>t===e?null:t)},[]),clearSessions:(0,b.useCallback)(()=>{n(new Map),i(null),o(!1),c(!1),bx().catch(()=>{})},[])}}function Sx(e,t){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(!1),o=(0,b.useRef)(null),s=(0,b.useCallback)(n=>{let r=n.filter(e=>e.name.endsWith(`.jsonl`)||e.name.endsWith(`.json`)||e.type===`text/plain`);if(r.length===0)return;let i=0,a=r.length;for(let n of r){let r=new FileReader;r.onload=()=>{e(r.result,n.name),i++,i>=a&&t(!1)},r.onerror=()=>{console.error(`Failed to read file`,n.name),i++,i>=a&&t(!1)},r.readAsText(n)}r.length>0&&t(!0)},[e,t]),c=(0,b.useCallback)(e=>{e.preventDefault(),r(!1),s(Array.from(e.dataTransfer.files))},[s]),l=(0,b.useCallback)(e=>{s(Array.from(e.target.files??[])),o.current&&(o.current.value=``)},[s]),u=(0,b.useCallback)(e=>{e.preventDefault(),r(!0)},[]),d=(0,b.useCallback)(()=>r(!1),[]),f=(0,b.useCallback)(async()=>{t(!0);try{e(await(await fetch(`/sample.jsonl`)).text(),`sample.jsonl`)}catch(e){console.error(`Failed to load sample`,e),t(!1)}},[e,t]);return(0,b.useEffect)(()=>{let t=t=>{let n=t.clipboardData?.getData(`text/plain`);!n||n.trim()[0]!==`{`||lp(n).length!==0&&(t.preventDefault(),e(n),a(!0),setTimeout(()=>a(!1),600))};return document.addEventListener(`paste`,t),()=>document.removeEventListener(`paste`,t)},[e]),{dragOver:n,pasteFlash:i,fileInputRef:o,handleDrop:c,handleDragOver:u,handleDragLeave:d,handleFileSelect:l,loadSample:f}}function Cx(e,t){let n=(0,b.useRef)(e),r=(0,b.useRef)(t);n.current=e,r.current=t,(0,b.useEffect)(()=>{if(!new URLSearchParams(window.location.search).has(`auto`))return;let e=!1,t;async function i(){if(!e){r.current(!0);try{let e=await fetch(`/api/telemetry`,{cache:`no-cache`});if(!e.ok){r.current(!1);return}let t=await e.text();if(!t.trim()){r.current(!1);return}if(lp(t).length===0){r.current(!1);return}n.current(t,`pi-session`)}catch{r.current(!1)}}}i();let a=null;function o(){e||i()}let s=null;try{s=new EventSource(`/api/events`),s.onmessage=e=>{try{let t=JSON.parse(e.data);typeof t.version==`number`&&(a!==null&&t.version!==a&&o(),a=t.version)}catch{}},s.onerror=()=>{}}catch{}function c(){e||fetch(`/api/version`,{cache:`no-cache`}).then(e=>e.json()).then(n=>{e||(a!==null&&n.version!==a&&o(),a=n.version,t=setTimeout(c,2e3))}).catch(()=>{t=setTimeout(c,5e3)})}return t=setTimeout(c,3e3),()=>{e=!0,clearTimeout(t),s?.close()}},[])}function wx(e,t=[],n={}){let[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)(!0),[s,c]=(0,b.useState)(null),l=(0,b.useRef)(!0);return(0,b.useEffect)(()=>{if(l.current=!0,n.skip){queueMicrotask(()=>{l.current&&o(!1)});return}return(async()=>{o(!0),c(null);try{let t=await e();l.current&&(i(t),c(null))}catch(e){l.current&&c(e instanceof Error?e:Error(String(e)))}finally{l.current&&o(!1)}})(),()=>{l.current=!1}},[...t,n.skip]),{data:r,loading:a,error:s}}var Tx=120,Ex=null;function Dx({children:e,content:t,preferredPlacement:n=`bottom`,gap:r=10,minWidth:i=240,maxWidth:a=340}){let o=(0,b.useRef)(null),s=(0,b.useRef)(null),c=(0,b.useRef)(null),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)({opacity:0,pointerEvents:`none`}),[p,m]=(0,b.useState)(`up`),[h,g]=(0,b.useState)(0),_=(0,b.useCallback)(()=>{s.current&&=(clearTimeout(s.current),null)},[]),v=(0,b.useCallback)(()=>{_(),Ex===c.current&&(Ex=null),u(!1),f({opacity:0,pointerEvents:`none`})},[_]);(0,b.useEffect)(()=>{c.current=v},[v]);let y=(0,b.useCallback)(()=>{_(),s.current=setTimeout(()=>v(),Tx)},[_,v]),x=(0,b.useCallback)(()=>{_(),Ex&&Ex!==c.current&&Ex(),Ex=c.current;let e=o.current;if(!e)return;let t=e.querySelector(`[data-tooltip-sizer]`);if(!t)return;let s=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=window.innerWidth,p=window.innerHeight,h=Math.max(i,Math.min(l.width+1,a)),v=p-s.bottom,y=s.top,b=l.height+r+14,x=n;n===`bottom`&&v<b?y>=b&&(x=`top`):n===`top`&&y<b&&v>=b&&(x=`bottom`),m(x===`bottom`?`up`:`down`);let S=x===`bottom`?s.bottom+r:void 0,C=x===`top`?p-s.top+r:void 0,w=s.left+s.width/2,T=w-h/2;T<14&&(T=14),T+h>d-14&&(T=d-14-h),g(w-T),f({position:`fixed`,top:S,bottom:C,left:T,width:h,opacity:1,pointerEvents:`auto`}),u(!0)},[_,n,r,i,a]);(0,b.useEffect)(()=>{if(!l)return;let e=()=>{_(),v()};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[l,v,_]),(0,b.useEffect)(()=>()=>{_(),Ex===c.current&&(Ex=null)},[_]);let S=p===`up`?`top-[-4px] border-l border-t`:`bottom-[-4px] border-r border-b`;return(0,F.jsxs)(`div`,{ref:o,className:`relative inline-block w-full`,onMouseEnter:x,onMouseLeave:y,onFocus:x,onBlur:y,children:[e,(0,F.jsx)(`div`,{"data-tooltip-sizer":!0,className:`fixed opacity-0 pointer-events-none`,style:{minWidth:i,maxWidth:a,visibility:`hidden`,left:-9999,top:-9999},"aria-hidden":`true`,children:t}),(0,F.jsx)(Rc,{children:l&&(0,F.jsxs)(Pu.div,{initial:{opacity:0,scale:.96,y:p===`up`?6:-6},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:p===`up`?4:-4,pointerEvents:`none`},transition:{type:`spring`,stiffness:400,damping:28,mass:.8},className:`z-[100]`,style:d,onMouseEnter:_,onMouseLeave:y,children:[(0,F.jsx)(Pu.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`absolute h-2 w-2 bg-white dark:bg-zinc-800 border-zinc-200/60 dark:border-white/[0.08] ${S}`,style:{left:h,transform:`translateX(-50%) rotate(45deg)`}}),t]},`tooltip`)})]})}function Ox({activeTps:e,wallTps:t,lossPct:n,mode:r}){let i=e>0?t/e*100:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsxs)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:[r===`avg`?`Average`:`Weighted`,` Speed`]}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`tok/s`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-2 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-moss/5 dark:bg-moss/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-moss`,children:`Active`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5 truncate`,children:Zf(e)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-accent/5 dark:bg-accent/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-accent`,children:`Wall`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5 truncate`,children:Zf(t)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-ember/5 dark:bg-ember/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-ember`,children:`Loss`}),(0,F.jsxs)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5 truncate`,children:[n.toFixed(1),`%`]})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-1`,children:[(0,F.jsx)(`span`,{children:`Retention`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-moss`,children:[i.toFixed(0),`%`]})]}),(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${i}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-ember`,style:{width:`${Math.max(0,100-i)}%`}})]})]}),(0,F.jsxs)(`div`,{className:`space-y-1 mt-2 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-moss mt-1.5 shrink-0`}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-moss`,children:`Active`}),` — generation-only throughput, excluding stalls and TTFT`]})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-accent mt-1.5 shrink-0`}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-accent`,children:`Wall`}),` — pooled wall-clock throughput, including stalls and TTFT`]})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-ember mt-1.5 shrink-0`}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-ember`,children:`Loss`}),` — percentage of active throughput lost to stalls, TTFT, and gaps`]})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:r===`avg`?`Simple mean of per-request generation throughput.`:`Token-weighted average throughput. Longer responses count more heavily.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Output speed (tokens/s) — measures the `,(0,F.jsx)(`strong`,{children:`decode`}),` stage (token-by-token generation). Also called generation throughput or output token rate.`]})]})}function Kte({total:e,models:t,avgTokensPerCall:n,stalledCalls:r,cachedCalls:i,fastCalls:a}){let o=e>0?r/e*100:0,s=e>0?i/e*100:0,c=e>0?a/e*100:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Requests`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`calls`})]}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-2.5`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Yf(e,0)}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:`total LLM calls`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Tok/call`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Yf(Math.round(n),0)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-moss/5 dark:bg-moss/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-moss`,children:`Fast TTFT`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:a})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-amber/5 dark:bg-amber/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-amber`,children:`Stalled`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:r})]})]}),(0,F.jsxs)(`div`,{className:`space-y-1.5 mb-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-0.5`,children:[(0,F.jsx)(`span`,{children:`Fast responses (< 3s TTFT)`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-moss`,children:[c.toFixed(0),`%`]})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${c}%`}})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-0.5`,children:[(0,F.jsx)(`span`,{children:`Cache-aware calls`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-accent`,children:[s.toFixed(0),`%`]})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-accent`,style:{width:`${s}%`}})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-0.5`,children:[(0,F.jsx)(`span`,{children:`Stalled calls`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-ember`,children:[o.toFixed(0),`%`]})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-ember`,style:{width:`${o}%`}})})]})]}),t.length>0&&(0,F.jsxs)(`div`,{className:`space-y-1.5 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Per Model`}),(0,F.jsx)(`p`,{className:`text-[8px] text-zinc-400 dark:text-zinc-500`,children:`calls`})]}),t.map(t=>{let n=e>0?t.callCount/e*100:0;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,F.jsx)(`span`,{className:`text-zinc-600 dark:text-zinc-300 font-medium truncate`,children:t.modelId.split(`/`).pop()}),(0,F.jsx)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:t.provider})]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200 shrink-0`,children:t.callCount})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-accent/40`,style:{width:`${n}%`}})})]},t.modelId)})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:`Each LLM call is one assistant turn. Fast responses (< 3s TTFT) felt snappy. Stalled calls experienced at least one idle pause. Cache-aware calls read or wrote prompt cache.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Requests per second (RPS) — system throughput across all concurrent requests. Primarily emphasized for batch or high-throughput serving scenarios.`]})]})}function qte({wallClockMs:e,totalTimeMs:t,generationMs:n}){let r=Math.max(0,t-n),i=Math.max(0,e-t),a=Math.max(e,t,1),o=n/a*100,s=r/a*100,c=i/a*100;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-2`,children:(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Time Breakdown`})}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-2.5`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Jf(e)}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:`wall-clock span`})]}),(0,F.jsxs)(`div`,{className:`space-y-1 mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-moss`}),`Generation time`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(n)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),`Overhead (TTFT + stalls)`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(r)})]}),i>0&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-zinc-300 dark:bg-zinc-600`}),`Idle (between requests)`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(i)})]}),t>e&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-accent`}),`Parallel overlap`]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-accent`,children:Jf(t-e)})]})]}),(0,F.jsx)(`div`,{className:`mb-1`,children:(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${o}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-amber`,style:{width:`${s}%`}}),i>0&&(0,F.jsx)(`div`,{className:`h-full bg-zinc-300 dark:bg-zinc-600`,style:{width:`${c}%`}})]})}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-moss`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`gen `,o.toFixed(0),`%`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`over `,s.toFixed(0),`%`]})]}),i>0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-zinc-300 dark:bg-zinc-600`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`idle `,c.toFixed(0),`%`]})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:`Wall-clock is the real-world time from first to last event. It includes idle gaps between user interactions. "Active" time (generation + overhead) is the sum of individual request durations — it can exceed wall-clock when multiple requests execute in parallel.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` End-to-end latency — total wall-clock time from request submission to final token. Breaks down as TTFT + (ITL × output tokens).`]})]})}function Jte({avgTtft:e,p50:t,p75:n,p90:r,p99:i,min:a,max:o}){return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Time to First Token`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`latency`})]}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-3`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Jf(Math.round(e))}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:`mean`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-1 mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Min`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(a)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P50`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(t)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P75`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(n)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P90`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Jf(r)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`P99`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-ember`,children:Jf(i)})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Max`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-ember`,children:Jf(o)})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:`TTFT measures the delay from sending the prompt to receiving the first token. High P99 values often indicate cold starts or queueing.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Time to First Token (TTFT) — measures the `,(0,F.jsx)(`strong`,{children:`prefill`}),` stage (prompt processing before generation begins). For reasoning models, Time to First Answer Token (TTFAT) is the operationally relevant variant.`]})]})}function Yte({count:e,ms:t,totalTimeMs:n}){let r=n>0?t/n*100:0,i=e>0?t/e:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Stall Analysis`}),(0,F.jsx)(Wf,{weight:`bold`,size:12,className:`text-ember`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,F.jsxs)(`div`,{className:`flex-1 rounded-lg bg-ember/5 dark:bg-ember/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-ember`,children:`Events`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Yf(e,0)})]}),(0,F.jsxs)(`div`,{className:`flex-1 rounded-lg bg-amber/5 dark:bg-amber/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-amber`,children:`Total`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Jf(t)})]}),(0,F.jsxs)(`div`,{className:`flex-1 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Avg`}),(0,F.jsx)(`p`,{className:`metric-mono text-[13px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Jf(Math.round(i))})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-1`,children:[(0,F.jsx)(`span`,{children:`Stall overhead`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-ember`,children:[r.toFixed(1),`%`]})]}),(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-ember`,style:{width:`${r}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${Math.max(0,100-r)}%`}})]})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:`Stalls are pauses where the model is idle — waiting for tokens to arrive, network hiccups, or queueing delays.`}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-300 dark:text-zinc-600 mt-1.5 pt-1.5 border-t border-zinc-200/30 dark:border-white/[0.04]`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-500 dark:text-zinc-400`,children:`Standard term:`}),` Inter-token Latency (ITL) — the time between consecutive output tokens. Also called Time Per Output Token (TPOT) when referring to the mean. Variable ITL causes perceptible stuttering even when average output speed looks acceptable.`]})]})}function Xte({totalCost:e,energyCost:t,costSource:n,models:r,totalTokens:i}){if(e===null)return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Cost`}),(0,F.jsx)(uf,{weight:`bold`,size:12,className:`text-zinc-400`})]}),(0,F.jsx)(`p`,{className:`text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:`No cost data available for this session.`})]});let a=t!==null&&e>0?(e-t)/e*100:0,o=t!==null&&e>0?t/e*100:0,s=i>0?e/(i/1e6):0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Total Cost`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`USD`})]}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Xf(e)}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:n?`source: ${n}`:`unknown source`})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3 mt-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Per 1M tok`}),(0,F.jsxs)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:[`$`,s.toFixed(3)]})]}),t!==null&&(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-accent/5 dark:bg-accent/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-accent`,children:`Energy`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Xf(t)})]}),n===`both`&&t!==null&&(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-amber/5 dark:bg-amber/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-amber`,children:`Token est.`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Xf(Math.max(0,e-t))})]})]}),n===`both`&&(0,F.jsxs)(`div`,{className:`mb-3`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between text-[9px] text-zinc-400 dark:text-zinc-400 mb-1`,children:(0,F.jsx)(`span`,{children:`Cost attribution`})}),(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex bg-zinc-100 dark:bg-white/[0.06]`,children:[(0,F.jsx)(`div`,{className:`h-full bg-accent`,style:{width:`${o}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-amber`,style:{width:`${a}%`}})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 mt-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-accent`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`neuralwatt `,o.toFixed(0),`%`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:[`provider `,a.toFixed(0),`%`]})]})]})]}),r.length>0&&r.some(e=>e.blendedCostUsd!==null)&&(0,F.jsxs)(`div`,{className:`space-y-1.5 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Per Model`}),(0,F.jsx)(`p`,{className:`text-[8px] text-zinc-400 dark:text-zinc-500`,children:`cost`})]}),r.filter(e=>e.blendedCostUsd!==null).sort((e,t)=>(t.blendedCostUsd??0)-(e.blendedCostUsd??0)).map(t=>{let n=e>0?(t.blendedCostUsd??0)/e*100:0,r=t.energyCostUsd!==null&&t.energyCostUsd>0,i=t.energyCostUsd??t.blendedCostUsd??0;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,F.jsx)(`span`,{className:`text-zinc-600 dark:text-zinc-300 font-medium truncate`,children:t.modelId.split(`/`).pop()}),(0,F.jsxs)(`span`,{className:`text-zinc-400 dark:text-zinc-500 text-[9px]`,children:[t.callCount,` calls`]})]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium shrink-0 ${r?`text-accent`:`text-amber`}`,children:Xf(i)})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full ${r?`bg-accent/60`:`bg-amber/60`}`,style:{width:`${n}%`}})})]},t.modelId)})]}),(0,F.jsxs)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:[n===`neuralwatt`&&`All costs measured via NeuralWatt energy profiling.`,n===`tps`&&`All costs estimated from provider token pricing (input + output + cache).`,n===`both`&&`Costs are a hybrid — NeuralWatt where energy data was paired, provider token pricing as fallback for unpaired requests.`]})]})}function Zte({joules:e,energyCost:t,models:n,totalCalls:r}){if(e===null)return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-2`,children:(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Energy`})}),(0,F.jsx)(`p`,{className:`text-xs text-zinc-500 dark:text-zinc-400 leading-relaxed`,children:`No energy data available for this session.`})]});let i=e/36e5,a=r>0?e/r:0,o=n.filter(e=>e.energyJoules!==null&&e.energyJoules>0),s=o.reduce((e,t)=>e+(t.energyJoules??0),0),c=e/18e3,l=e/(9*3600);return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between mb-2`,children:(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Energy`})}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 mb-1`,children:[(0,F.jsx)(`p`,{className:`metric-mono text-xl font-bold text-zinc-800 dark:text-zinc-200`,children:Qf(e)}),(0,F.jsxs)(`span`,{className:`text-[10px] text-zinc-400 dark:text-zinc-500`,children:[i.toFixed(4),` kWh`]})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 mb-3 mt-2.5`,children:[t!==null&&(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-accent/5 dark:bg-accent/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-accent`,children:`Energy cost`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Xf(t)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-zinc-100 dark:bg-white/[0.06] p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-zinc-400`,children:`Energy/call`}),(0,F.jsx)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:Qf(a)})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 rounded-lg bg-moss/5 dark:bg-moss/10 p-1.5 text-center`,children:[(0,F.jsx)(`p`,{className:`text-[8px] font-semibold uppercase tracking-wider text-moss`,children:`Phone charges`}),(0,F.jsxs)(`p`,{className:`metric-mono text-[12px] font-bold text-zinc-800 dark:text-zinc-200 mt-0.5`,children:[c.toFixed(1),`x`]})]})]}),(0,F.jsx)(`div`,{className:`space-y-1 mb-3`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`9W LED bulb`}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[l.toFixed(1),`h`]})]})}),o.length>0&&(0,F.jsxs)(`div`,{className:`space-y-1.5 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Per Model`}),(0,F.jsx)(`p`,{className:`text-[8px] text-zinc-400 dark:text-zinc-500`,children:`scaled`})]}),o.sort((e,t)=>(t.energyJoules??0)-(e.energyJoules??0)).map(e=>{let t=s>0?(e.energyJoules??0)/s*100:0;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,F.jsx)(`span`,{className:`text-zinc-600 dark:text-zinc-300 font-medium truncate`,children:e.modelId.split(`/`).pop()}),(0,F.jsxs)(`span`,{className:`text-zinc-400 dark:text-zinc-500 text-[9px]`,children:[e.callCount,` calls`]})]}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-accent shrink-0`,children:Qf(e.energyJoules??0)})]}),(0,F.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden bg-zinc-100 dark:bg-white/[0.06]`,children:(0,F.jsx)(`div`,{className:`h-full bg-accent/60`,style:{width:`${t}%`}})})]},e.modelId)})]}),(0,F.jsx)(`p`,{className:`text-[9px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2`,children:`Energy measured via NeuralWatt inference profiling. Per-model values only include paired energy events — unpaired measurements cannot be attributed to a specific model.`})]})}function Qte({input:e,output:t,cacheRead:n,cacheWrite:r,total:i,totalCost:a}){let o=i>0?e/i*100:0,s=i>0?t/i*100:0,c=i>0?n/i*100:0,l=i>0?r/i*100:0;return(0,F.jsxs)(`div`,{className:`glass-panel rounded-2xl px-4 py-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`p`,{className:`text-[10px] font-bold uppercase tracking-wider text-zinc-400 dark:text-zinc-400`,children:`Token Breakdown`}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 dark:text-zinc-500`,children:`tokens`})]}),(0,F.jsxs)(`div`,{className:`space-y-1 mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-zinc-400`}),`New input`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(e),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,o.toFixed(0),`%)`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-accent`}),`Output`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(t),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,s.toFixed(0),`%)`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-amber`}),`Cache read`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(n),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,c.toFixed(0),`%)`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-500 dark:text-zinc-400`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full bg-moss`}),`Cache write`]}),(0,F.jsxs)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:[Yf(r),` `,(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`(`,l.toFixed(0),`%)`]})]})]})]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`div`,{className:`h-1.5 rounded-full overflow-hidden flex`,children:[(0,F.jsx)(`div`,{className:`h-full bg-zinc-400`,style:{width:`${o}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-accent`,style:{width:`${s}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-amber`,style:{width:`${c}%`}}),(0,F.jsx)(`div`,{className:`h-full bg-moss`,style:{width:`${l}%`}})]})}),(0,F.jsxs)(`div`,{className:`space-y-1 mt-2 pt-2 border-t border-zinc-200/50 dark:border-white/[0.06]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Total`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:Yf(i)})]}),a!==null&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px]`,children:[(0,F.jsx)(`span`,{className:`text-zinc-500 dark:text-zinc-400`,children:`Cost per 1M tokens`}),(0,F.jsx)(`span`,{className:`metric-mono font-medium text-zinc-800 dark:text-zinc-200`,children:i>0?`$${(a/(i/1e6)).toFixed(4)}`:`-`})]})]})]})}var kx={moss:{bg:`bg-moss/5 dark:bg-moss/10`,border:`border-moss/15 dark:border-moss/20`,iconBg:`bg-moss/10 dark:bg-moss/15`,iconText:`text-moss`},accent:{bg:`bg-accent/5 dark:bg-accent/10`,border:`border-accent/15 dark:border-accent/20`,iconBg:`bg-accent/10 dark:bg-accent/15`,iconText:`text-accent`},amber:{bg:`bg-amber/5 dark:bg-amber/10`,border:`border-amber/15 dark:border-amber/20`,iconBg:`bg-amber/10 dark:bg-amber/15`,iconText:`text-amber`},ember:{bg:`bg-ember/5 dark:bg-ember/10`,border:`border-ember/15 dark:border-ember/20`,iconBg:`bg-ember/10 dark:bg-ember/15`,iconText:`text-ember`}},$te={bg:`bg-white/60 dark:bg-zinc-800/40`,border:`border-zinc-200/50 dark:border-white/[0.06]`,iconBg:`bg-zinc-100 dark:bg-white/[0.04]`,iconText:`text-zinc-500 dark:text-zinc-400`},ene=kx.accent;function tne(e,t){return e&&kx[e]?kx[e]:t?ene:$te}function Ax({icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o=!1,color:s}){let c=tne(s,o);return(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5 px-3.5 py-2.5 rounded-2xl border transition-colors ${c.bg} ${c.border}`,children:[(0,F.jsx)(`div`,{className:`shrink-0 p-1.5 rounded-lg ${c.iconBg} ${c.iconText}`,children:(0,F.jsx)(e,{weight:`bold`,size:14})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`p`,{className:`text-[9px] font-medium uppercase tracking-wider text-zinc-400 dark:text-zinc-400 leading-none`,children:t}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-1.5 mt-0.5`,children:[(0,F.jsxs)(`p`,{className:`metric-mono text-base font-semibold text-zinc-800 dark:text-zinc-300 leading-tight whitespace-nowrap`,children:[n,r&&(0,F.jsx)(`span`,{className:`text-xs text-zinc-400 dark:text-zinc-400 ml-0.5`,children:r})]}),a&&(0,F.jsxs)(`span`,{className:`text-[9px] text-zinc-500 dark:text-zinc-400 leading-tight`,children:[i&&(0,F.jsx)(`span`,{className:`text-zinc-400 dark:text-zinc-500 mr-0.5`,children:i}),(0,F.jsx)(`span`,{className:`metric-mono font-medium`,children:a})]})]})]})]})}function jx({icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o=!1,color:s,tooltip:c}){return c?(0,F.jsx)(Dx,{content:c,children:(0,F.jsx)(Ax,{icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o,color:s})}):(0,F.jsx)(Ax,{icon:e,label:t,value:n,unit:r,subLabel:i,subValue:a,accent:o,color:s})}function Mx({icon:e,label:t,activeTps:n,wallTps:r,lossPct:i,accent:a=!1,mode:o}){return(0,F.jsx)(Dx,{content:(0,F.jsx)(Ox,{activeTps:n,wallTps:r,lossPct:i,mode:o}),preferredPlacement:`bottom`,gap:10,children:(0,F.jsx)(Ax,{icon:e,label:t,value:Zf(n),unit:`tok/s`,accent:a})})}function Nx(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Nx(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Px(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Nx(e))&&(r&&(r+=` `),r+=t);return r}var nne=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Fx(e){return typeof e==`string`?nne.includes(e):!1}var rne=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Ix(e){return typeof e==`string`?rne.has(e):!1}function Lx(e){return typeof e==`string`&&e.startsWith(`data-`)}function Rx(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Ix(n)||Lx(n))&&(t[n]=e[n]);return t}function zx(e){if(e==null)return null;if((0,b.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return Rx(t)}return typeof e==`object`&&!Array.isArray(e)?Rx(e):null}function Bx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Ix(n)||Lx(n)||Fx(n))&&(t[n]=e[n]);return t}function ine(e){return e==null?null:(0,b.isValidElement)(e)?Bx(e.props):typeof e==`object`&&!Array.isArray(e)?Bx(e):null}var ane=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Vx(){return Vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vx.apply(null,arguments)}function one(e,t){if(e==null)return{};var n,r,i=sne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hx=(0,b.forwardRef)((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=one(e,ane),d=a||{width:r,height:i,x:0,y:0},f=Px(`recharts-surface`,o);return b.createElement(`svg`,Vx({},Bx(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),b.createElement(`title`,null,c),b.createElement(`desc`,null,l),n)}),cne=[`children`,`className`];function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ux.apply(null,arguments)}function lne(e,t){if(e==null)return{};var n,r,i=une(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function une(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Wx=b.forwardRef((e,t)=>{var{children:n,className:r}=e,i=lne(e,cne),a=Px(`recharts-layer`,r);return b.createElement(`g`,Ux({className:a},Bx(i),{ref:t}),n)}),dne=(0,b.createContext)(null);function Gx(e){return function(){return e}}var Kx=Math.cos,qx=Math.sin,Jx=Math.sqrt,Yx=Math.PI;Yx/2;var Xx=2*Yx,Zx=Math.PI,Qx=2*Zx,$x=1e-6,fne=Qx-$x;function eS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function pne(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return eS;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var tS=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?eS:pne(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>$x)if(!(Math.abs(u*s-c*l)>$x)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Zx-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>$x&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>$x||Math.abs(this._y1-l)>$x)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Qx+Qx),d>fne?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>$x&&this._append`A${n},${n},0,${+(d>=Zx)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function mne(){return new tS}mne.prototype=tS.prototype;function nS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new tS(t)}Array.prototype.slice;function rS(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function iS(e){this._context=e}iS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function aS(e){return new iS(e)}function oS(e){return e[0]}function sS(e){return e[1]}function cS(e,t){var n=Gx(!0),r=null,i=aS,a=null,o=nS(s);e=typeof e==`function`?e:e===void 0?oS:Gx(e),t=typeof t==`function`?t:t===void 0?sS:Gx(t);function s(s){var c,l=(s=rS(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Gx(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function lS(e,t,n){var r=null,i=Gx(!0),a=null,o=aS,s=null,c=nS(l);e=typeof e==`function`?e:e===void 0?oS:Gx(+e),t=typeof t==`function`?t:Gx(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sS:Gx(+n);function l(l){var u,d,f,p=(l=rS(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return cS().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Gx(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Gx(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Gx(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var uS=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function hne(e){return new uS(e,!0)}function gne(e){return new uS(e,!1)}var dS={draw(e,t){let n=Jx(t/Yx);e.moveTo(n,0),e.arc(0,0,n,0,Xx)}},_ne={draw(e,t){let n=Jx(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},fS=Jx(1/3),vne=fS*2,yne={draw(e,t){let n=Jx(t/vne),r=n*fS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},bne={draw(e,t){let n=Jx(t),r=-n/2;e.rect(r,r,n,n)}},xne=.8908130915292852,pS=qx(Yx/10)/qx(7*Yx/10),Sne=qx(Xx/10)*pS,Cne=-Kx(Xx/10)*pS,wne={draw(e,t){let n=Jx(t*xne),r=Sne*n,i=Cne*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=Xx*t/5,o=Kx(a),s=qx(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},mS=Jx(3),Tne={draw(e,t){let n=-Jx(t/(mS*3));e.moveTo(0,n*2),e.lineTo(-mS*n,-n),e.lineTo(mS*n,-n),e.closePath()}},hS=-.5,gS=Jx(3)/2,_S=1/Jx(12),Ene=(_S/2+1)*3,Dne={draw(e,t){let n=Jx(t/Ene),r=n/2,i=n*_S,a=r,o=n*_S+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(hS*r-gS*i,gS*r+hS*i),e.lineTo(hS*a-gS*o,gS*a+hS*o),e.lineTo(hS*s-gS*c,gS*s+hS*c),e.lineTo(hS*r+gS*i,hS*i-gS*r),e.lineTo(hS*a+gS*o,hS*o-gS*a),e.lineTo(hS*s+gS*c,hS*c-gS*s),e.closePath()}};function One(e,t){let n=null,r=nS(i);e=typeof e==`function`?e:Gx(e||dS),t=typeof t==`function`?t:Gx(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Gx(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function vS(){}function yS(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function bS(e){this._context=e}bS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yS(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kne(e){return new bS(e)}function xS(e){this._context=e}xS.prototype={areaStart:vS,areaEnd:vS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:yS(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ane(e){return new xS(e)}function SS(e){this._context=e}SS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yS(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jne(e){return new SS(e)}function CS(e){this._context=e}CS.prototype={areaStart:vS,areaEnd:vS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Mne(e){return new CS(e)}function wS(e){return e<0?-1:1}function TS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(wS(a)+wS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ES(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function DS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function OS(e){this._context=e}OS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:DS(this,this._t0,ES(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,DS(this,ES(this,n=TS(this,e,t)),n);break;default:DS(this,this._t0,n=TS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kS(e){this._context=new AS(e)}(kS.prototype=Object.create(OS.prototype)).point=function(e,t){OS.prototype.point.call(this,t,e)};function AS(e){this._context=e}AS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Nne(e){return new OS(e)}function Pne(e){return new kS(e)}function jS(e){this._context=e}jS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=MS(e),i=MS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function MS(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Fne(e){return new jS(e)}function NS(e,t){this._context=e,this._t=t}NS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Ine(e){return new NS(e,.5)}function Lne(e){return new NS(e,0)}function Rne(e){return new NS(e,1)}function PS(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function FS(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function zne(e,t){return e[t]}function Bne(e){let t=[];return t.key=e,t}function Vne(){var e=Gx([]),t=FS,n=PS,r=zne;function i(i){var a=Array.from(e.apply(this,arguments),Bne),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=rS(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Gx(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Gx(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?FS:typeof e==`function`?e:Gx(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??PS,i):n},i}function Hne(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}PS(e,t)}}function Une(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}PS(e,t)}}function Wne(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,PS(e,t)}}var Gne=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===`__proto__`}e.isUnsafeProperty=t})),IS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}e.isDeepKey=t})),LS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}e.toKey=t})),Kne=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(t).join(`,`);let n=String(e);return n===`0`&&Object.is(Number(e),-0)?`-0`:n}e.toString=t})),RS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Kne(),n=LS();function r(e){if(Array.isArray(e))return e.map(n.toKey);if(typeof e==`symbol`)return[e];e=t.toString(e);let r=[],i=e.length;if(i===0)return r;let a=0,o=``,s=``,c=!1;for(e.charCodeAt(0)===46&&(r.push(``),a++);a<i;){let t=e[a];s?t===`\\`&&a+1<i?(a++,o+=e[a]):t===s?s=``:o+=t:c?t===`"`||t===`'`?s=t:t===`]`?(c=!1,r.push(o),o=``):o+=t:t===`[`?(c=!0,o&&=(r.push(o),``)):t===`.`?o&&=(r.push(o),``):o+=t,a++}return o&&r.push(o),r}e.toPath=r})),zS=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Gne(),n=IS(),r=LS(),i=RS();function a(e,s,c){if(e==null)return c;switch(typeof s){case`string`:{if(t.isUnsafeProperty(s))return c;let r=e[s];return r===void 0?n.isDeepKey(s)?a(e,i.toPath(s),c):c:r}case`number`:case`symbol`:{typeof s==`number`&&(s=r.toKey(s));let t=e[s];return t===void 0?c:t}default:{if(Array.isArray(s))return o(e,s,c);if(s=Object.is(s?.valueOf(),-0)?`-0`:String(s),t.isUnsafeProperty(s))return c;let n=e[s];return n===void 0?c:n}}}function o(e,n,r){if(n.length===0)return r;let i=e;for(let e=0;e<n.length;e++){if(i==null||t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}return i===void 0?r:i}e.get=a})),qne=s(((e,t)=>{t.exports=zS().get})),Jne=4;function BS(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jne),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function VS(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+BS(i)+n},``)}var HS=u(qne()),US=e=>e===0?0:e>0?1:-1,WS=e=>typeof e==`number`&&e!=+e,GS=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,H=e=>(typeof e==`number`||e instanceof Number)&&!WS(e),KS=e=>H(e)||typeof e==`string`,Yne=0,qS=e=>{var t=++Yne;return`${e||``}${t}`},JS=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!H(e)&&typeof e!=`string`)return n;var i;if(GS(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return WS(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},YS=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function XS(e,t,n){return H(e)&&H(t)?BS(e+n*(t-e)):t}function ZS(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):(0,HS.default)(e,t))===n)}var Xne=e=>{for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,c=0,l=0,u=0;u<t;u++)c=e[u]?.cx||0,l=e[u]?.cy||0,n+=c,r+=l,i+=c*l,a+=c*c,o=Math.min(o,c),s=Math.max(s,c);var d=t*a===n*n?0:(t*i-n*r)/(t*a-n*n);return{xmin:o,xmax:s,a:d,b:(r-d*n)/t}},QS=e=>e==null,$S=e=>QS(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function eC(e){return e!=null}function tC(){}var Zne=[`type`,`size`,`sizeType`];function nC(){return nC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nC.apply(null,arguments)}function rC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rC(Object(n),!0).forEach(function(t){Qne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qne(e,t,n){return(t=$ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ne(e){var t=ere(e,`string`);return typeof t==`symbol`?t:t+``}function ere(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tre(e,t){if(e==null)return{};var n,r,i=nre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nre(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aC={symbolCircle:dS,symbolCross:_ne,symbolDiamond:yne,symbolSquare:bne,symbolStar:wne,symbolTriangle:Tne,symbolWye:Dne},rre=Math.PI/180,ire=e=>aC[`symbol${$S(e)}`]||dS,are=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*rre;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},ore=(e,t)=>{aC[`symbol${$S(e)}`]=t},oC=e=>{var{type:t=`circle`,size:n=64,sizeType:r=`area`}=e,i=iC(iC({},tre(e,Zne)),{},{type:t,size:n,sizeType:r}),a=`circle`;typeof t==`string`&&(a=t);var o=()=>{var e=ire(a),t=One().type(e).size(are(n,r,a))();if(t!==null)return t},{className:s,cx:c,cy:l}=i,u=Bx(i);return H(c)&&H(l)&&H(n)?b.createElement(`path`,nC({},u,{className:Px(`recharts-symbols`,s),transform:`translate(${c}, ${l})`,d:o()})):null};oC.registerSymbol=ore;var sC=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,cC=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,b.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{Fx(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},sre=(e,t,n)=>r=>(e(t,n,r),null),lC=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Fx(i)&&typeof a==`function`&&(r||={},r[i]=sre(a,t,n))}),r},cre=e=>Array.isArray(e)&&e.length>0;function uC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lre(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uC(Object(n),!0).forEach(function(t){ure(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ure(e,t,n){return(t=dre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dre(e){var t=fre(e,`string`);return typeof t==`symbol`?t:t+``}function fre(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dC(e,t){var n=lre({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}var pre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}e.uniqBy=t})),mre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}e.ary=t})),fC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e}e.identity=t})),hre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Number.isSafeInteger(e)&&e>=0}e.isLength=t})),pC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=hre();function n(e){return e!=null&&typeof e!=`function`&&t.isLength(e.length)}e.isArrayLike=n})),gre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`object`&&!!e}e.isObjectLike=t})),_re=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=pC(),n=gre();function r(e){return n.isObjectLike(e)&&t.isArrayLike(e)}e.isArrayLikeObject=r})),vre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=zS();function n(e){return function(n){return t.get(n,e)}}e.property=n})),mC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}e.isObject=t})),hC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null||typeof e!=`object`&&typeof e!=`function`}e.isPrimitive=t})),gC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}e.isEqualsSameValueZero=t})),yre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=mC(),n=hC(),r=gC();function i(e,t,n){return typeof n==`function`?a(e,t,function e(t,r,i,o,s,c){let l=n(t,r,i,o,s,c);return l===void 0?a(t,r,e,c):!!l},new Map):i(e,t,()=>void 0)}function a(e,n,i,s){if(n===e)return!0;switch(typeof n){case`object`:return o(e,n,i,s);case`function`:return Object.keys(n).length>0?a(e,{...n},i,s):r.isEqualsSameValueZero(e,n);default:return t.isObject(e)?typeof n==`string`?n===``:!0:r.isEqualsSameValueZero(e,n)}}function o(e,t,r,i){if(t==null)return!0;if(Array.isArray(t))return c(e,t,r,i);if(t instanceof Map)return s(e,t,r,i);if(t instanceof Set)return l(e,t,r,i);let a=Object.keys(t);if(e==null||n.isPrimitive(e))return a.length===0;if(a.length===0)return!0;if(i?.has(t))return i.get(t)===e;i?.set(t,e);try{for(let o=0;o<a.length;o++){let s=a[o];if(!n.isPrimitive(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!r(e[s],t[s],s,e,t,i))return!1}return!0}finally{i?.delete(t)}}function s(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function c(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function l(e,t,n,r){return t.size===0?!0:e instanceof Set?c([...e],[...t],n,r):!1}e.isMatchWith=i,e.isSetMatch=l})),_C=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=yre();function n(e,n){return t.isMatchWith(e,n,()=>void 0)}e.isMatch=n})),bre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}e.getSymbols=t})),vC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}e.getTag=t})),yC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.argumentsTag=`[object Arguments]`,e.arrayBufferTag=`[object ArrayBuffer]`,e.arrayTag=`[object Array]`,e.bigInt64ArrayTag=`[object BigInt64Array]`,e.bigUint64ArrayTag=`[object BigUint64Array]`,e.booleanTag=`[object Boolean]`,e.dataViewTag=`[object DataView]`,e.dateTag=`[object Date]`,e.errorTag=`[object Error]`,e.float32ArrayTag=`[object Float32Array]`,e.float64ArrayTag=`[object Float64Array]`,e.functionTag=`[object Function]`,e.int16ArrayTag=`[object Int16Array]`,e.int32ArrayTag=`[object Int32Array]`,e.int8ArrayTag=`[object Int8Array]`,e.mapTag=`[object Map]`,e.numberTag=`[object Number]`,e.objectTag=`[object Object]`,e.regexpTag=`[object RegExp]`,e.setTag=`[object Set]`,e.stringTag=`[object String]`,e.symbolTag=`[object Symbol]`,e.uint16ArrayTag=`[object Uint16Array]`,e.uint32ArrayTag=`[object Uint32Array]`,e.uint8ArrayTag=`[object Uint8Array]`,e.uint8ClampedArrayTag=`[object Uint8ClampedArray]`})),xre=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.globalThis=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)()})),bC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=xre();function n(e){return t.globalThis.Buffer!==void 0&&t.globalThis.Buffer.isBuffer(e)}e.isBuffer=n})),xC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}e.isTypedArray=t})),SC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=bre(),n=vC(),r=yC(),i=bC(),a=hC(),o=xC();function s(e,t){return c(e,void 0,e,new Map,t)}function c(e,t,n,r=new Map,s=void 0){let d=s?.(e,t,n,r);if(d!==void 0)return d;if(a.isPrimitive(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=c(e[i],i,n,r,s);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[i,a]of e)t.set(i,c(a,i,n,r,s));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let i of e)t.add(c(i,void 0,n,r,s));return t}if(i.isBuffer(e))return e.subarray();if(o.isTypedArray(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=c(e[i],i,n,r,s);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),l(t,e,n,r,s),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),l(t,e,n,r,s),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,l(t,e,n,r,s),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(typeof e==`object`&&u(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),l(t,e,n,r,s),t}return e}function l(e,n,r=e,i,a){let o=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<o.length;t++){let s=o[t],l=Object.getOwnPropertyDescriptor(e,s);(l==null||l.writable)&&(e[s]=c(n[s],s,r,i,a))}}function u(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=l})),CC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=SC();function n(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}e.cloneDeep=n})),wC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=_C(),n=CC();function r(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}e.matches=r})),TC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=SC(),n=vC(),r=yC();function i(e,i){return t.cloneDeepWith(e,(a,o,s,c)=>{let l=i?.(a,o,s,c);if(l!==void 0)return l;if(typeof e==`object`){if(n.getTag(e)===r.objectTag&&typeof e.constructor!=`function`){let n={};return c.set(e,n),t.copyProperties(n,e,s,c),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{let n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{let n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}e.cloneDeepWith=i})),EC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=TC();function n(e){return t.cloneDeepWith(e)}e.cloneDeep=n})),DC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=/^(?:0|[1-9]\d*)$/;function n(e,n=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<n;case`symbol`:return!1;case`string`:return t.test(e)}}e.isIndex=n})),OC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=vC();function n(e){return typeof e==`object`&&!!e&&t.getTag(e)===`[object Arguments]`}e.isArguments=n})),kC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=IS(),n=DC(),r=OC(),i=RS();function a(e,a){let o;if(o=Array.isArray(a)?a:typeof a==`string`&&t.isDeepKey(a)&&e?.[a]==null?i.toPath(a):[a],o.length===0)return!1;let s=e;for(let e=0;e<o.length;e++){let t=o[e];if((s==null||!Object.hasOwn(s,t))&&!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1;s=s[t]}return!0}e.has=a})),AC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=_C(),n=LS(),r=EC(),i=zS(),a=kC();function o(e,o){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=n.toKey(e);break}return o=r.cloneDeep(o),function(n){let r=i.get(n,e);return r===void 0?a.has(n,e):o===void 0?r===void 0:t.isMatch(r,o)}}e.matchesProperty=o})),jC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=fC(),n=vre(),r=wC(),i=AC();function a(e){if(e==null)return t.identity;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?i.matchesProperty(e[0],e[1]):r.matches(e);case`string`:case`symbol`:case`number`:return n.property(e)}}e.iteratee=a})),MC=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=pre(),n=mre(),r=fC(),i=_re(),a=jC();function o(e,o=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(a.iteratee(o),1)):[]}e.uniqBy=o})),NC=u(s(((e,t)=>{t.exports=MC().uniqBy}))());function PC(e,t,n){return t===!0?(0,NC.default)(e,n):typeof t==`function`?(0,NC.default)(e,t):e}var FC=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),IC=s(((e,t)=>{t.exports=FC()})),LC=s((e=>{var t=p(),n=IC();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),RC=s(((e,t)=>{t.exports=LC()})),zC=(0,b.createContext)(null),BC=RC(),VC=e=>e,HC=()=>{var e=(0,b.useContext)(zC);return e?e.store.dispatch:VC},UC=()=>{},WC=()=>UC,GC=(e,t)=>e===t;function U(e){var t=(0,b.useContext)(zC),n=(0,b.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:UC,[t,e]);return(0,BC.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:WC,t?t.store.getState:UC,t?t.store.getState:UC,n,GC)}function KC(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function qC(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function JC(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var YC=e=>Array.isArray(e)?e:[e];function XC(e){let t=Array.isArray(e[0])?e[0]:e;return JC(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function ZC(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var QC=class{constructor(e){this.value=e}deref(){return this.value}},$C=typeof WeakRef<`u`?WeakRef:QC,ew=0,tw=1;function nw(){return{s:ew,v:void 0,o:null,p:null}}function rw(e,t={}){let n=nw(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=nw(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=nw(),e.set(n,t)):t=r}}let s=t,c;if(t.s===tw)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new $C(c):c}return s.s=tw,s.v=c,c}return o.clearCache=()=>{n=nw(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function iw(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),KC(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=rw,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=YC(c),p=YC(u),m=XC(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=l(function(){r++;let e=ZC(m,arguments);return i=h.apply(null,e),i},...p);return Object.assign(g,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var W=iw(rw),aw=Object.assign((e,t=W)=>{qC(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>aw}),ow=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}e.compareValues=(e,n,r)=>{if(e!==n){let i=t(e),a=t(n);if(i===a&&i===0){if(e<n)return r===`desc`?1:-1;if(e>n)return r===`desc`?-1:1}return r===`desc`?a-i:i-a}return 0}})),sw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`||e instanceof Symbol}e.isSymbol=t})),cw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=sw(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(e,i){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||t.isSymbol(e)?!0:typeof e==`string`&&(r.test(e)||!n.test(e))||i!=null&&Object.hasOwn(i,e)}e.isKey=i})),lw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=ow(),n=cw(),r=RS();function i(e,i,a,o){if(e==null)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(e=>String(e));let s=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},c=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?s(t,e):typeof t==`object`?t[e]:t,l=i.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>c(t,e))})).slice().sort((e,n)=>{for(let r=0;r<l.length;r++){let i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(i!==0)return i}return 0}).map(e=>e.original)}e.orderBy=i})),uw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}e.flatten=t})),dw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=DC(),n=pC(),r=mC(),i=gC();function a(e,a,o){return r.isObject(o)&&(typeof a==`number`&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||typeof a==`string`&&a in o)?i.isEqualsSameValueZero(o[a],e):!1}e.isIterateeCall=a})),fw=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=lw(),n=uw(),r=dw();function i(e,...i){let a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),[`asc`])}e.sortBy=i})),pw=u(s(((e,t)=>{t.exports=fw().sortBy}))()),mw=e=>e.legend.settings,hw=e=>e.legend.size;W([e=>e.legend.payload,mw],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?(0,pw.default)(r,n):r});var gw=1;function _w(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=(0,b.useState)({height:0,left:0,top:0,width:0});return[t,(0,b.useCallback)(e=>{if(e!=null){var r=e.getBoundingClientRect(),i={height:r.height,left:r.left,top:r.top,width:r.width};(Math.abs(i.height-t.height)>gw||Math.abs(i.left-t.left)>gw||Math.abs(i.top-t.top)>gw||Math.abs(i.width-t.width)>gw)&&n({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e])]}function vw(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yw=typeof Symbol==`function`&&Symbol.observable||`@@observable`,bw=()=>Math.random().toString(36).substring(7).split(``).join(`.`),xw={INIT:`@@redux/INIT${bw()}`,REPLACE:`@@redux/REPLACE${bw()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${bw()}`};function Sw(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Cw(e,t,n){if(typeof e!=`function`)throw Error(vw(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(vw(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(vw(1));return n(Cw)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(vw(3));return i}function d(e){if(typeof e!=`function`)throw Error(vw(4));if(c)throw Error(vw(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(vw(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!Sw(e))throw Error(vw(7));if(e.type===void 0)throw Error(vw(8));if(typeof e.type!=`string`)throw Error(vw(17));if(c)throw Error(vw(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(vw(10));r=e,f({type:xw.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(vw(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[yw](){return this}}}return f({type:xw.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[yw]:m}}function ww(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:xw.INIT})===void 0)throw Error(vw(12));if(n(void 0,{type:xw.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(vw(13))})}function Tw(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{ww(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(vw(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function Ew(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Dw(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(vw(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=Ew(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function Ow(e){return Sw(e)&&`type`in e&&typeof e.type==`string`}var kw=Symbol.for(`immer-nothing`),Aw=Symbol.for(`immer-draftable`),jw=Symbol.for(`immer-state`);function Mw(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nw=Object,Pw=Nw.getPrototypeOf,Fw=`constructor`,Iw=`prototype`,Lw=`configurable`,Rw=`enumerable`,zw=`writable`,Bw=`value`,Vw=e=>!!e&&!!e[jw];function Hw(e){return e?Gw(e)||Qw(e)||!!e[Aw]||!!e[Fw]?.[Aw]||$w(e)||eT(e):!1}var Uw=Nw[Iw][Fw].toString(),Ww=new WeakMap;function Gw(e){if(!e||!tT(e))return!1;let t=Pw(e);if(t===null||t===Nw[Iw])return!0;let n=Nw.hasOwnProperty.call(t,Fw)&&t[Fw];if(n===Object)return!0;if(!nT(n))return!1;let r=Ww.get(n);return r===void 0&&(r=Function.toString.call(n),Ww.set(n,r)),r===Uw}function Kw(e,t,n=!0){qw(e)===0?(n?Reflect.ownKeys(e):Nw.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function qw(e){let t=e[jw];return t?t.type_:Qw(e)?1:$w(e)?2:eT(e)?3:0}var Jw=(e,t,n=qw(e))=>n===2?e.has(t):Nw[Iw].hasOwnProperty.call(e,t),Yw=(e,t,n=qw(e))=>n===2?e.get(t):e[t],Xw=(e,t,n,r=qw(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Zw(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var Qw=Array.isArray,$w=e=>e instanceof Map,eT=e=>e instanceof Set,tT=e=>typeof e==`object`,nT=e=>typeof e==`function`,rT=e=>typeof e==`boolean`;function iT(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var aT=e=>e.copy_||e.base_,oT=e=>e.modified_?e.copy_:e.base_;function sT(e,t){if($w(e))return new Map(e);if(eT(e))return new Set(e);if(Qw(e))return Array[Iw].slice.call(e);let n=Gw(e);if(t===!0||t===`class_only`&&!n){let t=Nw.getOwnPropertyDescriptors(e);delete t[jw];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[zw]===!1&&(a[zw]=!0,a[Lw]=!0),(a.get||a.set)&&(t[i]={[Lw]:!0,[zw]:!0,[Rw]:a[Rw],[Bw]:e[i]})}return Nw.create(Pw(e),t)}else{let t=Pw(e);if(t!==null&&n)return{...e};let r=Nw.create(t);return Nw.assign(r,e)}}function cT(e,t=!1){return dT(e)||Vw(e)||!Hw(e)?e:(qw(e)>1&&Nw.defineProperties(e,{set:uT,add:uT,clear:uT,delete:uT}),Nw.freeze(e),t&&Kw(e,(e,t)=>{cT(t,!0)},!1),e)}function lT(){Mw(2)}var uT={[Bw]:lT};function dT(e){return e===null||!tT(e)?!0:Nw.isFrozen(e)}var fT=`MapSet`,pT=`Patches`,mT=`ArrayMethods`,hT={};function gT(e){let t=hT[e];return t||Mw(0,e),t}var _T=e=>!!hT[e],vT,yT=()=>vT,bT=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:_T(fT)?gT(fT):void 0,arrayMethodsPlugin_:_T(mT)?gT(mT):void 0});function xT(e,t){t&&(e.patchPlugin_=gT(pT),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ST(e){CT(e),e.drafts_.forEach(TT),e.drafts_=null}function CT(e){e===vT&&(vT=e.parent_)}var wT=e=>vT=bT(vT,e);function TT(e){let t=e[jw];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ET(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[jw].modified_&&(ST(t),Mw(4)),Hw(e)&&(e=DT(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[jw].base_,e,t)}else e=DT(t,n);return OT(t,e,!0),ST(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===kw?void 0:e}function DT(e,t){if(dT(t))return t;let n=t[jw];if(!n)return IT(t,e.handledSet_,e);if(!AT(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);PT(n,e)}return n.copy_}function OT(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cT(t,n)}function kT(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var AT=(e,t)=>e.scope_===t,jT=[];function MT(e,t,n,r){let i=aT(e),a=e.type_;if(r!==void 0&&Yw(i,r,a)===t){Xw(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Kw(i,(e,n)=>{if(Vw(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??jT;for(let e of o)Xw(i,e,n,a)}function NT(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!AT(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=oT(i);MT(e,i.draft_??i,a,n),PT(i,r)})}function PT(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}kT(e)}}function FT(e,t,n){let{scope_:r}=e;if(Vw(n)){let i=n[jw];AT(i,r)&&i.callbacks_.push(function(){WT(e),MT(e,n,oT(i),t)})}else Hw(n)&&e.callbacks_.push(function(){let i=aT(e);e.type_===3?i.has(n)&&IT(n,r.handledSet_,r):Yw(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&IT(Yw(e.copy_,t,e.type_),r.handledSet_,r)})}function IT(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Vw(e)||t.has(e)||!Hw(e)||dT(e)?e:(t.add(e),Kw(e,(r,i)=>{if(Vw(i)){let t=i[jw];AT(t,n)&&(Xw(e,r,oT(t),e.type_),kT(t))}else Hw(i)&&IT(i,t,n)}),e)}function LT(e,t){let n=Qw(e),r={type_:+!!n,scope_:t?t.scope_:yT(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=RT;n&&(i=[r],a=zT);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var RT={get(e,t){if(t===jw)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=aT(e);if(!Jw(i,t,e.type_))return VT(e,i,t);let a=i[t];if(e.finalized_||!Hw(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&iT(t))return a;if(a===BT(e.base_,t)){WT(e);let n=e.type_===1?+t:t,r=GT(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in aT(e)},ownKeys(e){return Reflect.ownKeys(aT(e))},set(e,t,n){let r=HT(aT(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=BT(aT(e),t),i=r?.[jw];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Zw(n,r)&&(n!==void 0||Jw(e.base_,t,e.type_)))return!0;WT(e),UT(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),FT(e,t,n),!0)},deleteProperty(e,t){return WT(e),BT(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),UT(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=aT(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[zw]:!0,[Lw]:e.type_!==1||t!==`length`,[Rw]:r[Rw],[Bw]:n[t]}},defineProperty(){Mw(11)},getPrototypeOf(e){return Pw(e.base_)},setPrototypeOf(){Mw(12)}},zT={};for(let e in RT){let t=RT[e];zT[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}zT.deleteProperty=function(e,t){return zT.set.call(this,e,t,void 0)},zT.set=function(e,t,n){return RT.set.call(this,e[0],t,n,e[0])};function BT(e,t){let n=e[jw];return(n?aT(n):e)[t]}function VT(e,t,n){let r=HT(t,n);return r?Bw in r?r[Bw]:r.get?.call(e.draft_):void 0}function HT(e,t){if(!(t in e))return;let n=Pw(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Pw(n)}}function UT(e){e.modified_||(e.modified_=!0,e.parent_&&UT(e.parent_))}function WT(e){e.copy_||=(e.assigned_=new Map,sT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sre=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(nT(e)&&!nT(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}nT(t)||Mw(6),n!==void 0&&!nT(n)&&Mw(7);let r;if(Hw(e)){let i=wT(this),a=GT(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?ST(i):CT(i)}return xT(i,n),ET(r,i)}else if(!e||!tT(e)){if(r=t(e),r===void 0&&(r=e),r===kw&&(r=void 0),this.autoFreeze_&&cT(r,!0),n){let t=[],i=[];gT(pT).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else Mw(1,e)},this.produceWithPatches=(e,t)=>{if(nT(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},rT(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),rT(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),rT(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Hw(e)||Mw(8),Vw(e)&&(e=KT(e));let t=wT(this),n=GT(t,e,void 0);return n[jw].isManual_=!0,CT(t),n}finishDraft(e,t){let n=e&&e[jw];(!n||!n.isManual_)&&Mw(9);let{scope_:r}=n;return xT(r,t),ET(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=gT(pT).applyPatches_;return Vw(e)?r(e,t):this.produce(e,e=>r(e,t))}};function GT(e,t,n,r){let[i,a]=$w(t)?gT(fT).proxyMap_(t,n):eT(t)?gT(fT).proxySet_(t,n):LT(t,n);return(n?.scope_??yT()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?NT(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function KT(e){return Vw(e)||Mw(10,e),qT(e)}function qT(e){if(!Hw(e)||dT(e))return e;let t=e[jw],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=sT(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=sT(e,!0);return Kw(n,(e,t)=>{Xw(n,e,qT(t))},r),t&&(t.finalized_=!1),n}var JT=new Sre().produce;function YT(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var Cre=YT(),wre=YT,Tre=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?Ew:Ew.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function XT(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(jE(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Ow(t)&&t.type===e,n}var ZT=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function QT(e){return Hw(e)?JT(e,()=>{}):e}function $T(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Ere(e){return typeof e==`boolean`}var Dre=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new ZT;return t&&(Ere(t)?a.push(Cre):a.push(wre(t.extraArgument))),a},eE=`RTK_autoBatch`,tE=()=>e=>({payload:e,meta:{[eE]:!0}}),nE=e=>t=>{setTimeout(t,e)},Ore=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},rE=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?Ore(window.requestAnimationFrame,100):nE(10):e.type===`callback`?e.queueNotification:nE(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[eE],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},kre=e=>function(t){let{autoBatch:n=!0}=t??{},r=new ZT(e);return n&&r.push(rE(typeof n==`object`?n:void 0)),r};function Are(e){let t=Dre(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(Sw(n))c=Tw(n);else throw Error(jE(1));let l;l=typeof r==`function`?r(t):t();let u=Ew;i&&(u=Tre({trace:!1,...typeof i==`object`&&i}));let d=kre(Dw(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return Cw(c,o,p)}function iE(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(jE(28));if(r in t)throw Error(jE(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function jre(e){return typeof e==`function`}function Mre(e,t){let[n,r,i]=iE(t),a;if(jre(e))a=()=>QT(e());else{let t=QT(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(Vw(e)){let r=n(e,t);return r===void 0?e:r}else if(Hw(e))return JT(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var Nre=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,Pre=(e=21)=>{let t=``,n=e;for(;n--;)t+=Nre[Math.random()*64|0];return t},Fre=Symbol.for(`rtk-slice-createasyncthunk`);function Ire(e,t){return`${e}/${t}`}function Lre({creators:e}={}){let t=e?.asyncThunk?.[Fre];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(jE(11));let i=(typeof e.reducers==`function`?e.reducers(zre()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(jE(12));if(n in o.sliceCaseReducersByType)throw Error(jE(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:Ire(n,r),createNotation:typeof e.reducers==`function`};Vre(a)?Ure(o,a,s,t):Bre(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?iE(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return Mre(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=$T(d,r,m)),i}function i(t=l){return $T($T(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=Rre(a,t,()=>$T(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function Rre(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var aE=Lre();function zre(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function Bre({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!Hre(r))throw Error(jE(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?XT(e,o):XT(e))}function Vre(e){return e._reducerDefinitionType===`asyncThunk`}function Hre(e){return e._reducerDefinitionType===`reducerWithPrepare`}function Ure({type:e,reducerName:t},n,r,i){if(!i)throw Error(jE(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||oE,pending:s||oE,rejected:c||oE,settled:l||oE})}function oE(){}var Wre=`task`,sE=`listener`,cE=`completed`,lE=`cancelled`,Gre=`task-${lE}`,Kre=`task-${cE}`,uE=`${sE}-${lE}`,qre=`${sE}-${cE}`,dE=class{constructor(e){this.code=e,this.message=`${Wre} ${lE} (reason: ${e})`}code;name=`TaskAbortError`;message},fE=(e,t)=>{if(typeof e!=`function`)throw TypeError(jE(32))},pE=()=>{},mE=(e,t=pE)=>(e.catch(t),e),hE=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),gE=e=>{if(e.aborted)throw new dE(e.reason)};function _E(e,t){let n=pE;return new Promise((r,i)=>{let a=()=>i(new dE(e.reason));if(e.aborted){a();return}n=hE(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=pE})}var Jre=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof dE?`cancelled`:`rejected`,error:e}}finally{t?.()}},vE=e=>t=>mE(_E(e,t).then(t=>(gE(e),t))),yE=e=>{let t=vE(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:bE}=Object,xE={},SE=`listenerMiddleware`,Yre=(e,t)=>{let n=t=>hE(e,()=>t.abort(e.reason));return(r,i)=>{fE(r,`taskExecutor`);let a=new AbortController;n(a);let o=Jre(async()=>{gE(e),gE(a.signal);let t=await r({pause:vE(a.signal),delay:yE(a.signal),signal:a.signal});return gE(a.signal),t},()=>a.abort(Kre));return i?.autoJoin&&t.push(o.catch(pE)),{result:vE(e)(o),cancel(){a.abort(Gre)}}}},Xre=(e,t)=>{let n=async(n,r)=>{gE(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await _E(t,Promise.race(a));return gE(t),e}finally{i()}};return((e,t)=>mE(n(e,t)))},CE=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=XT(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(jE(21));return fE(a,`options.listener`),{predicate:i,type:t,effect:a}},wE=bE(e=>{let{type:t,predicate:n,effect:r}=CE(e);return{id:Pre(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(jE(22))}}},{withTypes:()=>wE}),TE=(e,t)=>{let{type:n,effect:r,predicate:i}=CE(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},EE=e=>{e.pending.forEach(e=>{e.abort(uE)})},Zre=(e,t)=>()=>{for(let e of t.keys())EE(e);e.clear()},DE=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},OE=bE(XT(`${SE}/add`),{withTypes:()=>OE}),Qre=XT(`${SE}/removeAll`),kE=bE(XT(`${SE}/remove`),{withTypes:()=>kE}),$re=(...e)=>{console.error(`${SE}/error`,...e)},AE=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=$re}=e;fE(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&EE(e)}),c=(e=>s(TE(t,e)??wE(e)));bE(c,{withTypes:()=>c});let l=e=>{let n=TE(t,e);return n&&(n.unsubscribe(),e.cancelActive&&EE(n)),!!n};bE(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=Xre(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,bE({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:yE(u.signal),pause:vE(u.signal),extra:a,signal:u.signal,fork:Yre(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(uE),n.delete(e))})},cancel:()=>{u.abort(uE),e.pending.delete(u)},throwIfCancelled:()=>{gE(u.signal)}})))}catch(e){e instanceof dE||DE(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(qre),i(e),e.pending.delete(u)}},d=Zre(t,n);return{middleware:e=>n=>r=>{if(!Ow(r))return n(r);if(OE.match(r))return c(r.payload);if(Qre.match(r)){d();return}if(kE.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===xE)throw Error(jE(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,DE(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=xE}return s},startListening:c,stopListening:l,clearListeners:d}};function jE(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ME=aE({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),{setMargin:eie,setLayout:tie,setChartSize:nie,setScale:rie}=ME.actions,iie=ME.reducer;function NE(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function PE(e){return Number.isFinite(e)}function FE(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function IE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?IE(Object(n),!0).forEach(function(t){aie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aie(e,t,n){return(t=oie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oie(e){var t=sie(e,`string`);return typeof t==`symbol`?t:t+``}function sie(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function RE(e,t,n){return QS(e)||QS(t)?n:KS(t)?(0,HS.default)(e,t,n):typeof t==`function`?t(e):n}var cie=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&H(e[a]))return LE(LE({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&H(e[o]))return LE(LE({},e),{},{[o]:e[o]+(i||0)})}return e},zE=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,BE=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},VE=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:l,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?US(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return PE(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(eC):c&&l?l.map((e,t)=>{var n=o.map(e);return PE(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(eC):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return PE(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(eC):o.domain().map((e,t)=>{var n=o.map(e);return PE(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(eC)},lie=(e,t)=>{if(!t||t.length!==2||!H(t[0])||!H(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!H(e[0])||e[0]<n)&&(i[0]=n),(!H(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},uie={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=WS(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:Hne,none:PS,silhouette:Une,wiggle:Wne,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=WS(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},die=(e,t,n)=>{var r=uie[n]??PS,i=Vne().keys(t).value((e,t)=>Number(RE(e,t,0))).order(FS).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=RE(e[i],t[r],0);Array.isArray(a)&&a.length===2&&H(a[0])&&H(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function HE(e){return e==null?void 0:String(e)}function UE(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!QS(i[t.dataKey])){var s=ZS(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=RE(i,QS(o)?t.dataKey:o),l=t.scale.map(c);return H(l)?l:null}var WE=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=RE(a,t.dataKey,t.scale.domain()[o]);if(QS(s))return null;var c=t.scale.map(s);return H(c)?c-i/2+r:null},fie=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},pie=e=>{var t=e.flat(2).filter(H);return[Math.min(...t),Math.max(...t)]},mie=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],hie=(e,t,n)=>{if(e!=null)return mie(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=pie(NE(r,t,n));return!PE(i[0])||!PE(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},GE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,KE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qE=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,pw.default)(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function JE(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return LE(LE({},t),{},{dataKey:n,payload:r,value:i,name:a})}function YE(e,t){if(e)return String(e);if(typeof t==`string`)return t}var gie=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},_ie=(e,t)=>t===`centric`?e.angle:e.radius,XE=e=>e.layout.width,ZE=e=>e.layout.height,vie=e=>e.layout.scale,QE=e=>e.layout.margin,$E=W(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),eD=W(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),tD=`data-recharts-item-index`,nD=`data-recharts-item-id`;function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rD(Object(n),!0).forEach(function(t){yie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yie(e,t,n){return(t=bie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bie(e){var t=xie(e,`string`);return typeof t==`symbol`?t:t+``}function xie(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Sie=e=>e.brush.height;function Cie(e){return eD(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function wie(e){return eD(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Tie(e){return $E(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function Eie(e){return $E(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var aD=W([XE,ZE,QE,Sie,Cie,wie,Tie,Eie,mw,hw],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=iD(iD({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=cie(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return iD(iD({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Die=W(aD,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),oD=W(XE,ZE,(e,t)=>({x:0,y:0,width:e,height:t})),Oie=(0,b.createContext)(null),sD=()=>(0,b.useContext)(Oie)!=null,cD=e=>e.brush,lD=W([cD,aD,QE],(e,t,n)=>({height:e.height,x:H(e.x)?e.x:t.left,y:H(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:H(e.width)?e.width:t.width})),kie=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}e.debounce=t})),Aie=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=kie();function n(e,n=0,r={}){typeof r!=`object`&&(r={});let{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=[,,];i&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=t.debounce(function(...t){c=e.apply(this,t),l=null},n,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}e.debounce=n})),jie=s((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Aie();function n(e,n=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}e.throttle=n})),Mie=s(((e,t)=>{t.exports=jie().throttle})),Nie=!0,uD=function(e,t){var n=[...arguments].slice(2);if(Nie&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},dD={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},fD=(e,t,n)=>{var{width:r=dD.width,height:i=dD.height,aspect:a,maxHeight:o}=n,s=GS(r)?e:Number(r),c=GS(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},Pie={width:0,height:0,overflow:`visible`},Fie={width:0,overflowX:`visible`},Iie={height:0,overflowY:`visible`},Lie={},Rie=e=>{var{width:t,height:n}=e,r=GS(t),i=GS(n);return r&&i?Pie:r?Fie:i?Iie:Lie};function zie(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=dD.width,a=dD.height):i===void 0?i=r&&r>0?void 0:dD.width:a===void 0&&(a=r&&r>0?void 0:dD.height),{width:i,height:a}}var Bie=u(Mie());function pD(){return pD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pD.apply(null,arguments)}function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mD(Object(n),!0).forEach(function(t){Vie(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vie(e,t,n){return(t=Hie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hie(e){var t=Uie(e,`string`);return typeof t==`symbol`?t:t+``}function Uie(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gD=(0,b.createContext)(dD.initialDimension);function Wie(e){return FE(e.width)&&FE(e.height)}function _D(e){var{children:t,width:n,height:r}=e,i=(0,b.useMemo)(()=>({width:n,height:r}),[n,r]);return Wie(i)?b.createElement(gD.Provider,{value:i},t):null}var vD=()=>(0,b.useContext)(gD),Gie=(0,b.forwardRef)((e,t)=>{var{aspect:n,initialDimension:r=dD.initialDimension,width:i,height:a,minWidth:o=dD.minWidth,minHeight:s,maxHeight:c,children:l,debounce:u=dD.debounce,id:d,className:f,onResize:p,style:m={}}=e,h=(0,b.useRef)(null),g=(0,b.useRef)();g.current=p,(0,b.useImperativeHandle)(t,()=>h.current);var[_,v]=(0,b.useState)({containerWidth:r.width,containerHeight:r.height}),y=(0,b.useCallback)((e,t)=>{v(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,b.useEffect)(()=>{if(h.current==null||typeof ResizeObserver>`u`)return tC;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;y(r,i),(t=g.current)==null||t.call(g,r,i)}};u>0&&(e=(0,Bie.default)(e,u,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=h.current.getBoundingClientRect();return y(n,r),t.observe(h.current),()=>{t.disconnect()}},[y,u]);var{containerWidth:x,containerHeight:S}=_;uD(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var{calculatedWidth:C,calculatedHeight:w}=fD(x,S,{width:i,height:a,aspect:n,maxHeight:c});return uD(C!=null&&C>0||w!=null&&w>0,`The width(%s) and height(%s) of chart should be greater than 0,
207
207
  please check the style of container, or the props width(%s) and height(%s),
208
208
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
209
209
  height and width.`,C,w,i,a,o,s,n),b.createElement(`div`,{id:d?`${d}`:void 0,className:Px(`recharts-responsive-container`,f),style:hD(hD({},m),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:c}),ref:h},b.createElement(`div`,{style:Rie({width:i,height:a})},b.createElement(_D,{width:C,height:w},l)))}),yD=(0,b.forwardRef)((e,t)=>{var n=vD();if(FE(n.width)&&FE(n.height))return e.children;var{width:r,height:i}=zie({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=fD(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return H(a)&&H(o)?b.createElement(_D,{width:a,height:o},e.children):b.createElement(Gie,pD({},e,{width:r,height:i,ref:t}))});function bD(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var xD=()=>{var e=sD(),t=U(Die),n=U(lD),r=U(cD)?.padding;return!e||!n||!r?t:{width:n.width-r.left-r.right,height:n.height-r.top-r.bottom,x:r.left,y:r.top}},Kie={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},SD=()=>U(aD)??Kie,CD=()=>U(XE),wD=()=>U(ZE),TD=e=>e.layout.layoutType,ED=()=>U(TD),DD=()=>{var e=ED();if(e===`horizontal`||e===`vertical`)return e},OD=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},qie=()=>ED()!==void 0,kD=e=>{var t=HC(),n=sD(),{width:r,height:i}=e,a=vD(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),(0,b.useEffect)(()=>{!n&&FE(o)&&FE(s)&&t(nie({width:o,height:s}))},[t,n,o,s]),null},AD=Symbol.for(`immer-nothing`),jD=Symbol.for(`immer-draftable`),MD=Symbol.for(`immer-state`);function ND(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var PD=Object.getPrototypeOf;function FD(e){return!!e&&!!e[MD]}function ID(e){return e?RD(e)||Array.isArray(e)||!!e[jD]||!!e.constructor?.[jD]||UD(e)||WD(e):!1}var Jie=Object.prototype.constructor.toString(),LD=new WeakMap;function RD(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let n=Object.hasOwnProperty.call(t,`constructor`)&&t.constructor;if(n===Object)return!0;if(typeof n!=`function`)return!1;let r=LD.get(n);return r===void 0&&(r=Function.toString.call(n),LD.set(n,r)),r===Jie}function zD(e,t,n=!0){BD(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function BD(e){let t=e[MD];return t?t.type_:Array.isArray(e)?1:UD(e)?2:WD(e)?3:0}function VD(e,t){return BD(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function HD(e,t,n){let r=BD(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Yie(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function UD(e){return e instanceof Map}function WD(e){return e instanceof Set}function GD(e){return e.copy_||e.base_}function KD(e,t){if(UD(e))return new Map(e);if(WD(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=RD(e);if(t===!0||t===`class_only`&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[MD];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(PD(e),t)}else{let t=PD(e);return t!==null&&n?{...e}:Object.assign(Object.create(t),e)}}function qD(e,t=!1){return YD(e)||FD(e)||!ID(e)?e:(BD(e)>1&&Object.defineProperties(e,{set:JD,add:JD,clear:JD,delete:JD}),Object.freeze(e),t&&Object.values(e).forEach(e=>qD(e,!0)),e)}function Xie(){ND(2)}var JD={value:Xie};function YD(e){return typeof e!=`object`||!e?!0:Object.isFrozen(e)}var Zie={};function XD(e){let t=Zie[e];return t||ND(0,e),t}var ZD;function QD(){return ZD}function Qie(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function $D(e,t){t&&(XD(`Patches`),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eO(e){tO(e),e.drafts_.forEach($ie),e.drafts_=null}function tO(e){e===ZD&&(ZD=e.parent_)}function nO(e){return ZD=Qie(ZD,e)}function $ie(e){let t=e[MD];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rO(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[MD].modified_&&(eO(t),ND(4)),ID(e)&&(e=iO(t,e),t.parent_||oO(t,e)),t.patches_&&XD(`Patches`).generateReplacementPatches_(n[MD].base_,e,t.patches_,t.inversePatches_)):e=iO(t,n,[]),eO(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===AD?void 0:e}function iO(e,t,n){if(YD(t))return t;let r=e.immer_.shouldUseStrictIteration(),i=t[MD];if(!i)return zD(t,(r,a)=>aO(e,i,t,r,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return oO(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,a=t,o=!1;i.type_===3&&(a=new Set(t),t.clear(),o=!0),zD(a,(r,a)=>aO(e,i,t,r,a,n,o),r),oO(e,t,!1),n&&e.patches_&&XD(`Patches`).generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function aO(e,t,n,r,i,a,o){if(i==null||typeof i!=`object`&&!o)return;let s=YD(i);if(!(s&&!o)){if(FD(i)){let o=iO(e,i,a&&t&&t.type_!==3&&!VD(t.assigned_,r)?a.concat(r):void 0);if(HD(n,r,o),FD(o))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ID(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;iO(e,i),(!t||!t.scope_.parent_)&&typeof r!=`symbol`&&(UD(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&oO(e,i)}}}function oO(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qD(t,n)}function eae(e,t){let n=Array.isArray(e),r={type_:+!!n,scope_:t?t.scope_:QD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=r,a=sO;n&&(i=[r],a=cO);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var sO={get(e,t){if(t===MD)return e;let n=GD(e);if(!VD(n,t))return tae(e,n,t);let r=n[t];return e.finalized_||!ID(r)?r:r===lO(e.base_,t)?(fO(e),e.copy_[t]=pO(r,e)):r},has(e,t){return t in GD(e)},ownKeys(e){return Reflect.ownKeys(GD(e))},set(e,t,n){let r=uO(GD(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=lO(GD(e),t),i=r?.[MD];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Yie(n,r)&&(n!==void 0||VD(e.base_,t)))return!0;fO(e),dO(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_[t]=!0,!0)},deleteProperty(e,t){return lO(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fO(e),dO(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=GD(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!==`length`,enumerable:r.enumerable,value:n[t]}},defineProperty(){ND(11)},getPrototypeOf(e){return PD(e.base_)},setPrototypeOf(){ND(12)}},cO={};zD(sO,(e,t)=>{cO[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),cO.deleteProperty=function(e,t){return cO.set.call(this,e,t,void 0)},cO.set=function(e,t,n){return sO.set.call(this,e[0],t,n,e[0])};function lO(e,t){let n=e[MD];return(n?GD(n):e)[t]}function tae(e,t,n){let r=uO(t,n);return r?`value`in r?r.value:r.get?.call(e.draft_):void 0}function uO(e,t){if(!(t in e))return;let n=PD(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=PD(n)}}function dO(e){e.modified_||(e.modified_=!0,e.parent_&&dO(e.parent_))}function fO(e){e.copy_||=KD(e.base_,e.scope_.immer_.useStrictShallowCopy_)}var nae=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if(typeof e==`function`&&typeof t!=`function`){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}typeof t!=`function`&&ND(6),n!==void 0&&typeof n!=`function`&&ND(7);let r;if(ID(e)){let i=nO(this),a=pO(e,void 0),o=!0;try{r=t(a),o=!1}finally{o?eO(i):tO(i)}return $D(i,n),rO(r,i)}else if(!e||typeof e!=`object`){if(r=t(e),r===void 0&&(r=e),r===AD&&(r=void 0),this.autoFreeze_&&qD(r,!0),n){let t=[],i=[];XD(`Patches`).generateReplacementPatches_(e,r,t,i),n(t,i)}return r}else ND(1,e)},this.produceWithPatches=(e,t)=>{if(typeof e==`function`)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},typeof e?.autoFreeze==`boolean`&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy==`boolean`&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration==`boolean`&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ID(e)||ND(8),FD(e)&&(e=rae(e));let t=nO(this),n=pO(e,void 0);return n[MD].isManual_=!0,tO(t),n}finishDraft(e,t){let n=e&&e[MD];(!n||!n.isManual_)&&ND(9);let{scope_:r}=n;return $D(r,t),rO(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=XD(`Patches`).applyPatches_;return FD(e)?r(e,t):this.produce(e,e=>r(e,t))}};function pO(e,t){let n=UD(e)?XD(`MapSet`).proxyMap_(e,t):WD(e)?XD(`MapSet`).proxySet_(e,t):eae(e,t);return(t?t.scope_:QD()).drafts_.push(n),n}function rae(e){return FD(e)||ND(10,e),mO(e)}function mO(e){if(!ID(e)||YD(e))return e;let t=e[MD],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=KD(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=KD(e,!0);return zD(n,(e,t)=>{HD(n,e,mO(t))},r),t&&(t.finalized_=!1),n}new nae().produce;function hO(e){return e}var gO=aE({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`middle`,itemSorter:`value`},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(hO(t.payload))},prepare:tE()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=KT(e).payload.indexOf(hO(n));i>-1&&(e.payload[i]=hO(r))},prepare:tE()},removeLegendPayload:{reducer(e,t){var n=KT(e).payload.indexOf(hO(t.payload));n>-1&&e.payload.splice(n,1)},prepare:tE()}}}),{setLegendSize:iae,setLegendSettings:aae,addLegendPayload:_O,replaceLegendPayload:vO,removeLegendPayload:yO}=gO.actions,oae=gO.reducer,sae=s((e=>{var t=p();t.useSyncExternalStore,t.useRef,t.useEffect,t.useMemo,t.useDebugValue}));s(((e,t)=>{t.exports=sae()}))();function cae(e){e()}function lae(){let e=null,t=null;return{clear(){e=null,t=null},notify(){cae(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0,i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var bO={notify(){},get:()=>[]};function uae(e,t){let n,r=bO,i=0,a=!1;function o(e){u();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),d())}}function s(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return a}function u(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=lae())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=bO)}function f(){a||(a=!0,u())}function p(){a&&(a=!1,d())}let m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var dae=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,fae=typeof navigator<`u`&&navigator.product===`ReactNative`,pae=dae||fae?b.useLayoutEffect:b.useEffect;function xO(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function mae(e,t){if(xO(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!xO(e[n[r]],t[n[r]]))return!1;return!0}var hae=Symbol.for(`react-redux-context`),gae=typeof globalThis<`u`?globalThis:{};function _ae(){if(!b.createContext)return{};let e=gae[hae]??=new Map,t=e.get(b.createContext);return t||(t=b.createContext(null),e.set(b.createContext,t)),t}var vae=_ae();function yae(e){let{children:t,context:n,serverState:r,store:i}=e,a=b.useMemo(()=>({store:i,subscription:uae(i),getServerState:r?()=>r:void 0}),[i,r]),o=b.useMemo(()=>i.getState(),[i]);pae(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||vae;return b.createElement(s.Provider,{value:a},t)}var bae=yae,xae=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`]);function Sae(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function SO(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(xae.has(n)){if(e[n]==null&&t[n]==null)continue;if(!mae(e[n],t[n]))return!1}else if(!Sae(e[n],t[n]))return!1;return!0}function CO(){return CO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CO.apply(null,arguments)}function wO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wO(Object(n),!0).forEach(function(t){Cae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cae(e,t,n){return(t=wae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wae(e){var t=Tae(e,`string`);return typeof t==`symbol`?t:t+``}function Tae(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Eae(e){return Array.isArray(e)&&KS(e[0])&&KS(e[1])?e.join(` ~ `):e}var EO={separator:` : `,contentStyle:{margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},itemStyle:{display:`block`,paddingTop:4,paddingBottom:4,color:`#000`},labelStyle:{},accessibilityLayer:!1};function Dae(e,t){return t==null?e:(0,pw.default)(e,t)}var Oae=e=>{var{separator:t=EO.separator,contentStyle:n,itemStyle:r,labelStyle:i=EO.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:c,labelClassName:l,label:u,labelFormatter:d,accessibilityLayer:f=EO.accessibilityLayer}=e,p=()=>{if(a&&a.length){var e={padding:0,margin:0},n=Dae(a,s).map((e,n)=>{if(!e||e.type===`none`)return null;var i=e.formatter||o||Eae,{value:s,name:c}=e,l=s,u=c;if(i){var d=i(s,c,e,n,a);if(Array.isArray(d))[l,u]=d;else if(d!=null)l=d;else return null}var f=TO(TO({},EO.itemStyle),{},{color:e.color||EO.itemStyle.color},r);return b.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${n}`,style:f},KS(u)?b.createElement(`span`,{className:`recharts-tooltip-item-name`},u):null,KS(u)?b.createElement(`span`,{className:`recharts-tooltip-item-separator`},t):null,b.createElement(`span`,{className:`recharts-tooltip-item-value`},l),b.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return b.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},n)}return null},m=TO(TO({},EO.contentStyle),n),h=TO({margin:0},i),g=!QS(u),_=g?u:``,v=Px(`recharts-default-tooltip`,c),y=Px(`recharts-tooltip-label`,l);g&&d&&a!=null&&(_=d(u,a));var x=f?{role:`status`,"aria-live":`assertive`}:{};return b.createElement(`div`,CO({className:v,style:m},x),b.createElement(`p`,{className:y,style:h},b.isValidElement(_)?_:`${_}`),p())},DO=`recharts-tooltip-wrapper`,kae={visibility:`hidden`};function Aae(e){var{coordinate:t,translateX:n,translateY:r}=e;return Px(DO,{[`${DO}-right`]:H(n)&&t&&H(t.x)&&n>=t.x,[`${DO}-left`]:H(n)&&t&&H(t.x)&&n<t.x,[`${DO}-bottom`]:H(r)&&t&&H(t.y)&&r>=t.y,[`${DO}-top`]:H(r)&&t&&H(t.y)&&r<t.y})}function OO(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:c,viewBoxDimension:l}=e;if(a&&H(a[r]))return a[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(u<f?d:u,f):l==null?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function jae(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Mae(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:s,useTranslate3d:c,viewBox:l}=e,u,d,f;return s.height>0&&s.width>0&&n?(d=OO({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=OO({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=jae({translateX:d,translateY:f,useTranslate3d:c})):u=kae,{cssProperties:u,cssClasses:Aae({translateX:d,translateY:f,coordinate:n})}}var kO={devToolsEnabled:!0,isSsr:!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)};function AO(){var[e,t]=(0,b.useState)(()=>kO.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,b.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=()=>{t(e.matches)};return e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}}},[]),e}function jO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jO(Object(n),!0).forEach(function(t){Nae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nae(e,t,n){return(t=Pae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pae(e){var t=Fae(e,`string`);return typeof t==`symbol`?t:t+``}function Fae(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Iae(e){if(!(e.prefersReducedMotion&&e.isAnimationActive===`auto`)&&e.isAnimationActive&&e.active)return`transform ${e.animationDuration}ms ${e.animationEasing}`}function Lae(e){var t=AO(),[n,r]=b.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));b.useEffect(()=>{var t=t=>{t.key===`Escape`&&r({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),n.dismissed&&((e.coordinate?.x??0)!==n.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==n.dismissedAtCoordinate.y)&&r(MO(MO({},n),{},{dismissed:!1}));var{cssClasses:i,cssProperties:a}=Mae({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),o=MO(MO({},e.hasPortalFromProps?{}:MO(MO({transition:Iae({prefersReducedMotion:t,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},a),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!n.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return b.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:i,style:o,ref:e.innerRef},e.children)}var Rae=b.memo(Lae),NO=()=>U(e=>e.rootProps.accessibilityLayer)??!0;function PO(){return PO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PO.apply(null,arguments)}function FO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FO(Object(n),!0).forEach(function(t){zae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zae(e,t,n){return(t=Bae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bae(e){var t=Vae(e,`string`);return typeof t==`symbol`?t:t+``}function Vae(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var LO={curveBasisClosed:Ane,curveBasisOpen:jne,curveBasis:kne,curveBumpX:hne,curveBumpY:gne,curveLinearClosed:Mne,curveLinear:aS,curveMonotoneX:Nne,curveMonotoneY:Pne,curveNatural:Fne,curveStep:Ine,curveStepAfter:Rne,curveStepBefore:Lne},RO=e=>PE(e.x)&&PE(e.y),zO=e=>e.base!=null&&RO(e.base)&&RO(e),BO=e=>e.x,VO=e=>e.y,Hae=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${$S(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=LO[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return LO[n]||aS},HO={connectNulls:!1,type:`linear`},Uae=e=>{var{type:t=HO.type,points:n=[],baseLine:r,layout:i,connectNulls:a=HO.connectNulls}=e,o=Hae(t,i),s=a?n.filter(RO):n;if(Array.isArray(r)){var c,l=n.map((e,t)=>IO(IO({},e),{},{base:r[t]}));return c=i===`vertical`?lS().y(VO).x1(BO).x0(e=>e.base.x):lS().x(BO).y1(VO).y0(e=>e.base.y),c.defined(zO).curve(o)(a?l.filter(zO):l)}return(i===`vertical`&&H(r)?lS().y(VO).x1(BO).x0(r):H(r)?lS().x(BO).y1(VO).y0(r):cS().x(BO).y(VO)).defined(RO).curve(o)(s)},UO=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=ED();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?Uae(o):r;return b.createElement(`path`,PO({},Rx(e),cC(e),{className:Px(`recharts-curve`,t),d:s===null?void 0:s,ref:i}))},Wae=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function WO(){return WO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WO.apply(null,arguments)}function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GO(Object(n),!0).forEach(function(t){Kae(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kae(e,t,n){return(t=qae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qae(e){var t=Jae(e,`string`);return typeof t==`symbol`?t:t+``}function Jae(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Yae(e,t){if(e==null)return{};var n,r,i=Xae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Zae=(e,t,n,r,i,a)=>`M${e},${i}v${r}M${a},${t}h${n}`,Qae=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:o=0,className:s}=e,c=Yae(e,Wae),l=Gae({x:t,y:n,top:r,left:i,width:a,height:o},c);return!H(t)||!H(n)||!H(a)||!H(o)||!H(r)||!H(i)?null:b.createElement(`path`,WO({},Bx(l),{className:Px(`recharts-cross`,s),d:Zae(t,n,a,o,r,i)}))};function $ae(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}function KO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?KO(Object(n),!0).forEach(function(t){eoe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eoe(e,t,n){return(t=toe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function toe(e){var t=noe(e,`string`);return typeof t==`symbol`?t:t+``}function noe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var roe=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),JO=(e,t,n)=>e.map(e=>`${roe(e)} ${t}ms ${n}`).join(`,`),ioe=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((e,t)=>e.filter(e=>t.includes(e))),YO=(e,t)=>Object.keys(t).reduce((n,r)=>qO(qO({},n),{},{[r]:e(r,t[r])}),{});function XO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XO(Object(n),!0).forEach(function(t){aoe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aoe(e,t,n){return(t=ooe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ooe(e){var t=soe(e,`string`);return typeof t==`symbol`?t:t+``}function soe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var QO=(e,t,n)=>e+(t-e)*n,$O=e=>{var{from:t,to:n}=e;return t!==n},ek=(e,t,n)=>{var r=YO((t,n)=>{if($O(n)){var[r,i]=e(n.from,n.to,n.velocity);return ZO(ZO({},n),{},{from:r,velocity:i})}return n},t);return n<1?YO((e,t)=>$O(t)&&r[e]!=null?ZO(ZO({},t),{},{velocity:QO(t.velocity,r[e].velocity,n),from:QO(t.from,r[e].from,n)}):t,t):ek(e,r,n-1)};function coe(e,t,n,r,i,a){var o,s=r.reduce((n,r)=>ZO(ZO({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),c=()=>YO((e,t)=>t.from,s),l=()=>!Object.values(s).filter($O).length,u=null,d=r=>{o||=r;var f=(r-o)/n.dt;s=ek(n,s,f),i(ZO(ZO(ZO({},e),t),c())),o=r,l()||(u=a.setTimeout(d))};return()=>(u=a.setTimeout(d),()=>{var e;(e=u)==null||e()})}function loe(e,t,n,r,i,a,o){var s=null,c=i.reduce((n,r)=>{var i=e[r],a=t[r];return i==null||a==null?n:ZO(ZO({},n),{},{[r]:[i,a]})},{}),l,u=i=>{l||=i;var d=(i-l)/r,f=YO((e,t)=>QO(...t,n(d)),c);if(a(ZO(ZO(ZO({},e),t),f)),d<1)s=o.setTimeout(u);else{var p=YO((e,t)=>QO(...t,n(1)),c);a(ZO(ZO(ZO({},e),t),p))}};return()=>(s=o.setTimeout(u),()=>{var e;(e=s)==null||e()})}var uoe=(e,t,n,r,i,a)=>{var o=ioe(e,t);return n==null?()=>(i(ZO(ZO({},e),t)),()=>{}):n.isStepper===!0?coe(e,t,n,o,i,a):loe(e,t,n,r,o,i,a)},tk=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],nk=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),rk=(e,t)=>n=>nk(tk(e,t),n),doe=(e,t)=>n=>nk([...tk(e,t).map((e,t)=>e*t).slice(1),0],n),foe=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},poe=function(){var e=[...arguments];if(e.length===1)switch(e[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var t=foe(e[0]);if(t)return t}return e.length===4?e:[0,0,1,1]},moe=(e,t,n,r)=>{var i=rk(e,n),a=rk(t,r),o=doe(e,n),s=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var c=i(n)-t,l=o(n);if(Math.abs(c-t)<1e-4||l<1e-4)return a(n);n=s(n-c/l)}return a(n)};return c.isStepper=!1,c},ik=function(){return moe(...poe(...arguments))},hoe=function(){var{stiff:e=100,damping:t=8,dt:n=17}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(r,i,a)=>{var o=a+(-(r-i)*e-a*t)*n/1e3,s=a*n/1e3+r;return Math.abs(s-i)<1e-4&&Math.abs(o)<1e-4?[i,0]:[s,o]};return r.isStepper=!0,r.dt=n,r},goe=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return ik(e);case`spring`:return hoe();default:if(e.split(`(`)[0]===`cubic-bezier`)return ik(e)}return typeof e==`function`?e:null};function _oe(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var[s,...c]=o;if(typeof s==`number`){i=e.setTimeout(a.bind(null,c),s);return}a(s),i=e.setTimeout(a.bind(null,c));return}typeof o==`string`&&(t=o,n(t)),typeof o==`object`&&(t=o,n(t)),typeof o==`function`&&o()}};return{stop:()=>{r=!0},start:e=>{r=!1,i&&=(i(),null),a(e)},subscribe:e=>(n=e,()=>{n=()=>null}),getTimeoutController:()=>e}}var voe=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):typeof requestAnimationFrame==`function`&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}};function yoe(){return _oe(new voe)}var boe=(0,b.createContext)(yoe);function xoe(e,t){var n=(0,b.useContext)(boe);return(0,b.useMemo)(()=>t??n(e),[e,t,n])}var Soe={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},ak={t:0},ok={t:1};function sk(e){var t=dC(e,Soe),{isActive:n,canBegin:r,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:c,children:l}=t,u=AO(),d=n===`auto`?!kO.isSsr&&!u:n,f=xoe(t.animationId,t.animationManager),[p,m]=(0,b.useState)(d?ak:ok),h=(0,b.useRef)(null);return(0,b.useEffect)(()=>{d||m(ok)},[d]),(0,b.useEffect)(()=>{if(!d||!r)return tC;var e=uoe(ak,ok,goe(a),i,m,f.getTimeoutController());return f.start([c,o,()=>{h.current=e()},i,s]),()=>{f.stop(),h.current&&h.current(),s()}},[d,r,i,a,o,c,s,f]),l(p.t)}function ck(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,n=(0,b.useRef)(qS(t)),r=(0,b.useRef)(e);return r.current!==e&&(n.current=qS(t),r.current=e),n.current}var Coe=[`radius`],woe=[`radius`],Toe,Eoe,Doe,Ooe,koe,Aoe,joe,Moe,Noe,Poe;function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lk(Object(n),!0).forEach(function(t){dk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dk(e,t,n){return(t=fk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fk(e){var t=pk(e,`string`);return typeof t==`symbol`?t:t+``}function pk(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mk(){return mk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mk.apply(null,arguments)}function hk(e,t){if(e==null)return{};var n,r,i=gk(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _k(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var vk=(e,t,n,r,i)=>{var a=BS(n),o=BS(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,l=a>=0?1:-1,u=+(o>=0&&a>=0||o<0&&a<0),d;if(s>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0,m=4;p<m;p++){var h=i[p]??0;f[p]=h>s?s:h}d=VS(Toe||=_k([`M`,`,`,``]),e,t+c*f[0]),f[0]>0&&(d+=VS(Eoe||=_k([`A `,`,`,`,0,0,`,`,`,`,`,``]),f[0],f[0],u,e+l*f[0],t)),d+=VS(Doe||=_k([`L `,`,`,``]),e+n-l*f[1],t),f[1]>0&&(d+=VS(Ooe||=_k([`A `,`,`,`,0,0,`,`,
package/dist/index.html CHANGED
@@ -16,7 +16,7 @@
16
16
  }
17
17
  })();
18
18
  </script>
19
- <script type="module" crossorigin src="/assets/index-BwpWPmjQ.js"></script>
19
+ <script type="module" crossorigin src="/assets/index-CmAr6tUj.js"></script>
20
20
  <link rel="stylesheet" crossorigin href="/assets/index-DRtHH789.css">
21
21
  </head>
22
22
  <body>
@@ -142,6 +142,9 @@ export default function tpsWebExtension(pi: ExtensionAPI) {
142
142
  let telemetryJsonl: string | null = null;
143
143
  let telemetryVersion = 0;
144
144
 
145
+ // Connected SSE clients for real-time push notifications.
146
+ const sseClients = new Set<import('http').ServerResponse>();
147
+
145
148
  function startServer(): Promise<number> {
146
149
  if (server) return Promise.resolve(serverPort);
147
150
 
@@ -171,6 +174,24 @@ export default function tpsWebExtension(pi: ExtensionAPI) {
171
174
  return;
172
175
  }
173
176
 
177
+ // API: Server-Sent Events stream for real-time push.
178
+ // When /tps-web updates the telemetry, the server pushes
179
+ // the new version to all connected clients immediately,
180
+ // eliminating the 2s polling latency.
181
+ if (urlPath === '/api/events') {
182
+ res.writeHead(200, {
183
+ 'Content-Type': 'text/event-stream',
184
+ 'Cache-Control': 'no-store',
185
+ 'Connection': 'keep-alive',
186
+ });
187
+ res.write('');
188
+ sseClients.add(res);
189
+ req.on('close', () => {
190
+ sseClients.delete(res);
191
+ });
192
+ return;
193
+ }
194
+
174
195
  // Static files from dist/
175
196
  serveStatic(DIST_PATH, req, res);
176
197
  });
@@ -194,6 +215,11 @@ export default function tpsWebExtension(pi: ExtensionAPI) {
194
215
 
195
216
  // Clean up server on session shutdown
196
217
  pi.on('session_shutdown', () => {
218
+ // Close all SSE connections before shutting down the server
219
+ for (const client of sseClients) {
220
+ client.end();
221
+ }
222
+ sseClients.clear();
197
223
  if (server) {
198
224
  server.close();
199
225
  server = null;
@@ -297,6 +323,11 @@ export default function tpsWebExtension(pi: ExtensionAPI) {
297
323
  telemetryJsonl = content;
298
324
  telemetryVersion++;
299
325
 
326
+ // Push update to all connected SSE clients
327
+ for (const client of sseClients) {
328
+ client.write(`data: ${JSON.stringify({ version: telemetryVersion })}\n\n`);
329
+ }
330
+
300
331
  const structuralCount = exportedEntries.filter((e: { type: string }) => isStructural(e)).length;
301
332
  const customCount = exportedEntries.length - structuralCount;
302
333
  const parts: string[] = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-tps-web",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",