import{C as r,A as t,a,L as e,P as o,b as n,B as s,p as i,c,d as l,i as d}from"./c6a992d55-c5W_gcW7.js";import{r as u,j as f}from"./vendor-react-Dp9pL_Wn.js";import{e as p}from"./vendor-ant-cds-DvTmcYA1.js";import{as as m,at as g}from"./c4b350ac1-KLFM4jkb.js";r.register(t,a,e,o,n,s,i,c,l,d),c.positioners.cursor=function(r,t){return{x:t.x,y:t.y}};const h={primary:m.chart.categorical.array[0].value,secondary:m.chart.categorical.array[1].value,tertiary:m.chart.categorical.array[2].value,cowork:m.chart.categorical.array[3].value,border:"#E5E4DD",text:"#73726C",textLight:"#6B7280"},y={primary:0,secondary:1,tertiary:2,cowork:3,negative:5};function b(r,t){if(t<r.length)return r[t];const a=Math.floor(t/r.length);return`hsl(${(function(r){const t=parseInt(r.slice(1,3),16)/255,a=parseInt(r.slice(3,5),16)/255,e=parseInt(r.slice(5,7),16)/255,o=Math.max(t,a,e),n=o-Math.min(t,a,e);if(0===n)return 0;const s=o===t?(a-e)/n%6:o===a?(e-t)/n+2:(t-a)/n+4;return Math.round((60*s+360)%360)}(r[t%r.length])+16*a)%360}, 48%, ${a%2==1?45:62}%)`}function x(r){return b(m.chart.categorical.array.slice(0,6).map(r=>r.value),r)}function F(){const r=p();return u.useMemo(()=>m.chart.categorical.array.slice(0,6).map(t=>"dark"===r&&"modes"in t?t.modes.dark:t.value),[r])}const C={default:{size:12}},k={color:h.text,font:C.default},v={light:{backgroundColor:"#FFFFFF",titleColor:"#000000",bodyColor:"#000000",borderColor:h.border,borderWidth:1,padding:8,cornerRadius:8}},j={backgroundColor:"#1F2937",titleColor:"#F9FAFB",bodyColor:"#F9FAFB",borderColor:"#374151",borderWidth:1,padding:8,cornerRadius:8},B={surface:"#FFFFFF",text:"#000000",tick:h.text,grid:h.border,font:"ui-sans-serif, system-ui, -apple-system, sans-serif"};function W(){const r=g("surface-3"),t=g("text-primary"),a=g("text-secondary"),e=g("chart-grid"),o=g("font-sans");return u.useMemo(()=>({surface:r,text:t,tick:a,grid:e,font:o}),[r,t,a,e,o])}function w(r=B){const t=r.font;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 M(r=B){return{color:r.tick,font:{...C.default,family:r.font}}}function N(r){return 1===r.dataset.data.length?3:0}function R(r){return{borderColor:r,borderWidth:2,tension:.4,pointStyle:"circle",pointBackgroundColor:r,pointBorderWidth:0,pointRadius:N,pointHoverRadius:4,pointHoverBackgroundColor:r,pointHoverBorderWidth:0}}function H(r=B){return{grid:{color:r.grid,lineWidth:1},border:{dash:[3,3]}}}function P(){return{grid:{display:!1},border:{display:!1}}}const $=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,a)=>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}-${a}`))})});export{k as C,F as a,N as b,R as c,v as d,h as e,x as f,H as g,M as h,w as i,b as j,P as k,$ as l,y as m,j as n,W as u};
