import{_ as p}from"./app-B4o_iLTT.js";async function g(){const n=await p(()=>import("./apexcharts.esm-CfSzfZrp.js"),[],import.meta.url).then(t=>t.default).catch(()=>null),c={fontFamily:"Plus Jakarta Sans, system-ui, sans-serif"},h={borderColor:"#EFEBE0",strokeDashArray:4},i={colors:"#6B807C",fontSize:"11px"},r=(t,e)=>{try{return JSON.parse(t.getAttribute("data-"+e)||"[]")}catch{return[]}},a={};function b(){if(!n)return;const t=document.querySelector("#chart-platform-growth");if(t&&!a.growth){const l=r(t,"series"),o=r(t,"categories");a.growth=new n(t,{chart:{type:"area",height:315,toolbar:{show:!1},...c},series:[{name:"Signups",data:l}],colors:["#075E54"],stroke:{curve:"smooth",width:3},fill:{type:"gradient",gradient:{shade:"light",opacityFrom:.3,opacityTo:.05}},grid:h,xaxis:{categories:o,labels:{style:i}},yaxis:{labels:{style:i,formatter:u=>u.toFixed(0)}},legend:{show:!1}}),a.growth.render()}const e=document.querySelector("#chart-module-mix");if(e&&!a.mix){const l=r(e,"labels"),o=r(e,"series");o.length?(a.mix=new n(e,{chart:{type:"donut",height:225,...c},labels:l,series:o,colors:["#075E54","#128C7E","#13478A","#E5A04E","#E87A5D","#9DC9B6","#3FA37A","#0A7A66"],dataLabels:{enabled:!1},legend:{show:!0,position:"bottom",fontSize:"11px",labels:{colors:"#6B807C"}},stroke:{colors:["#FBFAF6"],width:2}}),a.mix.render()):e.innerHTML='<div class="h-full w-full flex flex-col items-center justify-center text-center px-4"><div class="font-mono text-[10px] uppercase tracking-[0.16em] text-ink-500 mb-1">No data yet</div><div class="text-[12px] text-ink-600 max-w-[200px]">Plan distribution shows once at least one workspace has been assigned a plan.</div></div>'}const s=document.querySelector("#chart-delivery");if(s&&!a.del){const l=r(s,"labels"),o=r(s,"series");o.length?(a.del=new n(s,{chart:{type:"bar",height:225,toolbar:{show:!1},...c},series:[{name:"Sends (24h)",data:o}],colors:["#075E54"],plotOptions:{bar:{borderRadius:4,horizontal:!0,barHeight:"52%",distributed:!1}},dataLabels:{enabled:!1},grid:h,xaxis:{categories:l,labels:{style:i}},yaxis:{labels:{style:i}},legend:{show:!1}}),a.del.render()):s.innerHTML='<div class="h-full w-full flex flex-col items-center justify-center text-center px-4"><div class="font-mono text-[10px] uppercase tracking-[0.16em] text-ink-500 mb-1">No sends yet</div><div class="text-[12px] text-ink-600 max-w-[200px]">Top devices populate as soon as any number sends a message.</div></div>'}const d=document.querySelector("#chart-retention");if(d&&!a.ret){const l=r(d,"series"),o=r(d,"categories");l.length&&(a.ret=new n(d,{chart:{type:"bar",height:285,toolbar:{show:!1},...c},series:[{name:"New users",data:l}],colors:["#075E54"],plotOptions:{bar:{columnWidth:"60%",borderRadius:4}},dataLabels:{enabled:!1},grid:h,xaxis:{categories:o,labels:{style:i}},yaxis:{labels:{style:i,formatter:u=>u.toFixed(0)}},legend:{show:!1}}),a.ret.render())}}function f(t){document.querySelectorAll("[data-wa-tabs] [data-wa-tab]").forEach(e=>{const s=e.dataset.waTab===t;e.classList.toggle("bg-wa-deep",s),e.classList.toggle("text-paper-0",s),e.classList.toggle("text-ink-600",!s),e.classList.toggle("hover:bg-paper-50",!s)}),document.querySelectorAll("[data-wa-tab-panel]").forEach(e=>{const s=(e.getAttribute("data-wa-tab-panel")||"").split(/\s+/);e.style.display=s.includes(t)?"":"none"}),Object.values(a).forEach(e=>{try{e.windowResizeHandler&&e.windowResizeHandler()}catch{}})}document.querySelectorAll("[data-wa-tabs] [data-wa-tab]").forEach(t=>{t.addEventListener("click",()=>f(t.dataset.waTab))}),b(),f("overview")}export{g as default};
