import{C as r,A as t,a as e,L as o,P as a,b as n,B as i,p as s,c,d as l,i as d}from"./c6a992d55-CsBN2wIW.js";import{r as u,j as f}from"./vendor-react-DcxrbCFs.js";import{u as m}from"./c8748971a-CqajCpTp.js";import{t as p}from"./c4b350ac1-BTR_0NaM.js";function g(r){return p.chart.categorical[r].value}r.register(t,e,o,a,n,i,s,c,l,d),c.positioners.cursor=function(r,t){return{x:t.x,y:t.y}};const h={primary:g(1),secondary:g(2),tertiary:g(3),cowork:g(4),border:"#E5E4DD",text:"#73726C",textLight:"#6B7280"},y=[h.primary,h.secondary,h.tertiary,h.cowork,g(5),g(6)],b={primary:0,secondary:1,tertiary:2,cowork:3,negative:5};function x(r,t){if(!/^#[0-9a-f]{6}/i.test(r))return r;const e=parseInt(r.slice(1,7),16);return`rgba(${e>>16&255}, ${e>>8&255}, ${255&e}, ${t})`}function F(r,t){if(t<r.length)return r[t];const e=Math.floor(t/r.length);return`hsl(${(function(r){const t=parseInt(r.slice(1,3),16)/255,e=parseInt(r.slice(3,5),16)/255,o=parseInt(r.slice(5,7),16)/255,a=Math.max(t,e,o),n=a-Math.min(t,e,o);if(0===n)return 0;const i=a===t?(e-o)/n%6:a===e?(o-t)/n+2:(t-e)/n+4;return Math.round((60*i+360)%360)}(r[t%r.length])+16*e)%360}, 48%, ${e%2==1?45:62}%)`}function C(r){return F(y,r)}function k(){const r=m("chart-categorical-1"),t=m("chart-categorical-2"),e=m("chart-categorical-3"),o=m("chart-categorical-4"),a=m("chart-categorical-5"),n=m("chart-categorical-6");return u.useMemo(()=>[r,t,e,o,a,n],[r,t,e,o,a,n])}const j={default:{size:12}},v={color:h.text,font:j.default},w={light:{backgroundColor:"#FFFFFF",titleColor:"#000000",bodyColor:"#000000",borderColor:h.border,borderWidth:1,padding:8,cornerRadius:8}},B={backgroundColor:"#1F2937",titleColor:"#F9FAFB",bodyColor:"#F9FAFB",borderColor:"#374151",borderWidth:1,padding:8,cornerRadius:8},W={surface:"#FFFFFF",text:"#000000",tick:h.text,grid:h.border};function $(){const r=m("surface-3"),t=m("text-primary"),e=m("text-secondary"),o=m("neutral-900");return u.useMemo(()=>({surface:r,text:t,tick:e,grid:x(o,.1)}),[r,t,e,o])}let M;function N(){return M??=function(r,t){if("undefined"==typeof document)return t;const e=document.querySelector(".cds-root")??document.documentElement;return getComputedStyle(e).getPropertyValue(r).trim()||t}("--cds-font-sans","ui-sans-serif, system-ui, -apple-system, sans-serif")}function P(r=W){const t=N();return{backgroundColor:r.surface,titleColor:r.text,bodyColor:r.text,borderColor:r.grid,borderWidth:1,usePointStyle:!0,boxWidth:6,boxHeight:6,boxPadding:4,padding:10,cornerRadius:10,titleFont:{family:t,weight:"bold"},bodyFont:{family:t},position:"cursor",caretPadding:12}}function R(r=W){return{color:r.tick,font:{...j.default,family:N()}}}function H(r){return{borderColor:r,borderWidth:2,tension:.4,pointStyle:"circle",pointBackgroundColor:r,pointBorderWidth:0,pointRadius:0,pointHoverRadius:4,pointHoverBackgroundColor:r,pointHoverBorderWidth:0}}function I(r=W){return{grid:{color:r.grid,lineWidth:1},border:{dash:[3,3]}}}function S(){return{grid:{display:!1},border:{display:!1}}}const A=u.memo(function({items:r}){const t=r.some(r=>void 0!==r.value);return f.jsx("ul",{role:"list",className:t?"flex flex-col gap-1.5 font-ui":"flex flex-wrap items-center justify-center gap-x-5 gap-y-2 font-ui",children:r.map((r,e)=>f.jsxs("li",{className:"flex items-center gap-1.5 text-caption text-secondary",children:[f.jsx("span",{className:"size-1.5 shrink-0 rounded-full",style:{backgroundColor:r.color},"aria-hidden":!0}),t?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"min-w-0 truncate",title:r.label,children:r.label}),f.jsx("span",{className:"ml-auto whitespace-nowrap tabular-nums text-primary",children:r.value})]}):r.label]},`${r.label}-${e}`))})});export{v as C,k as a,w as b,H as c,h as d,C as e,y as f,I as g,R as h,P as i,F as j,S as k,A as l,N as m,b as n,B as o,$ as u};
