import{at as e,lt as t}from"./CaGtQlYh.js";import{Gt as n}from"#entry";import"./CIa-1CJu.js";var r=n(`global`,()=>{let n=t(null),r=t(null),i=t(null),a=e({download:[],upload:[]}),o=e([]),s=e([]);return{rootElement:n,latestTraffic:r,latestMemory:i,trafficChartHistory:a,memoryChartHistory:o,connectionCountHistory:s,setLatestTraffic:e=>{r.value=e},setLatestMemory:e=>{i.value=e},addTrafficDataPoint:(e,t,n)=>{a.download.push([e,t]),a.upload.push([e,n]),a.download.length>30&&a.download.shift(),a.upload.length>30&&a.upload.shift()},addMemoryDataPoint:(e,t)=>{o.push([e,t]),o.length>30&&o.shift()},addConnectionCountDataPoint:(e,t)=>{s.push([e,t]),s.length>30&&s.shift()},clearChartHistory:()=>{a.download.length=0,a.upload.length=0,o.length=0,s.length=0}}});export{r as t};