@weing-dev/ui-kit-primitive 0.5.0 → 0.5.2
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.
- package/README.md +86 -49
- package/dist/calendar.js +1383 -3790
- package/dist/chart.d.ts +2 -1
- package/dist/chart.js +614 -442
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Chart/Chart.gradient.d.ts +10 -0
- package/dist/components/Chart/Chart.options.d.ts +7 -2
- package/dist/components/Chart/Chart.type.d.ts +51 -4
- package/dist/components/Chart/charts/RadarChart.d.ts +3 -0
- package/dist/components/FloatingAnchor/FloatingAnchor.context.d.ts +5 -0
- package/dist/components/FloatingAnchor/FloatingAnchor.d.ts +14 -0
- package/dist/components/FloatingAnchor/FloatingAnchor.type.d.ts +41 -0
- package/dist/components/FloatingAnchor/FloatingAnchor.util.d.ts +43 -0
- package/dist/components/Form/Dropdown/Dropdown.type.d.ts +2 -0
- package/dist/components/KanbanBoard/KanbanBoard.d.ts +4 -0
- package/dist/components/KanbanBoard/KanbanBoard.type.d.ts +36 -0
- package/dist/components/Pagination/Pagination.d.ts +4 -1
- package/dist/components/Timeline/Timeline.colors.d.ts +6 -0
- package/dist/components/Timeline/Timeline.d.ts +4 -0
- package/dist/components/Timeline/Timeline.type.d.ts +16 -0
- package/dist/core.esm-CuBlrIcC.js +2859 -0
- package/dist/display.css +1 -1
- package/dist/display.d.ts +4 -0
- package/dist/display.js +2932 -2123
- package/dist/entry/chart.d.ts +2 -1
- package/dist/entry/display.d.ts +4 -0
- package/dist/entry/feedback.d.ts +2 -0
- package/dist/feedback.css +1 -1
- package/dist/feedback.d.ts +2 -0
- package/dist/feedback.js +595 -312
- package/dist/form.css +1 -1
- package/dist/form.js +1740 -1742
- package/dist/index.css +1 -1
- package/dist/index.js +3521 -3522
- package/dist/index.umd.cjs +21 -21
- package/dist/navigation.css +1 -1
- package/dist/navigation.js +297 -296
- package/docs/ui-kit-agent-guide.md +616 -0
- package/package.json +3 -2
package/dist/chart.js
CHANGED
|
@@ -1,318 +1,412 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Bar as
|
|
4
|
-
import
|
|
5
|
-
import { Chart as
|
|
6
|
-
import
|
|
7
|
-
import { B as
|
|
8
|
-
const
|
|
9
|
-
ChartFrame:
|
|
10
|
-
ChartState:
|
|
11
|
-
},
|
|
12
|
-
const
|
|
13
|
-
height:
|
|
14
|
-
loading:
|
|
15
|
-
empty:
|
|
16
|
-
isEmpty:
|
|
17
|
-
className:
|
|
18
|
-
children:
|
|
19
|
-
} =
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
let d;
|
|
24
|
-
e[2] !== u || e[3] !== c ? (d = {
|
|
25
|
-
height: u,
|
|
26
|
-
minHeight: c
|
|
27
|
-
}, e[2] = u, e[3] = c, e[4] = d) : d = e[4];
|
|
28
|
-
let p;
|
|
29
|
-
e[5] !== a || e[6] !== l || e[7] !== n || e[8] !== r ? (p = n ? /* @__PURE__ */ G.jsx("div", { className: q("ChartState"), children: l ?? "데이터가 없습니다" }) : r ? /* @__PURE__ */ G.jsx("div", { className: q("ChartState"), children: "불러오는 중…" }) : a, e[5] = a, e[6] = l, e[7] = n, e[8] = r, e[9] = p) : p = e[9];
|
|
1
|
+
import { c as _, j } from "./compiler-runtime-BFrE5JtX.js";
|
|
2
|
+
import { c as ut } from "./bind-D3ZJ5k4I.js";
|
|
3
|
+
import { Bar as pt, Line as ht, Pie as mt, Doughnut as gt, Radar as yt } from "react-chartjs-2";
|
|
4
|
+
import ft from "chartjs-plugin-datalabels";
|
|
5
|
+
import { Chart as ot, CategoryScale as bt, LinearScale as Ct, RadialLinearScale as xt, BarController as At, BarElement as vt, LineController as Lt, LineElement as St, PointElement as Et, ArcElement as Gt, PieController as Pt, DoughnutController as Tt, RadarController as Rt, Title as Dt, Tooltip as Bt, Legend as kt, Filler as jt } from "chart.js";
|
|
6
|
+
import U from "react";
|
|
7
|
+
import { B as S } from "./baseColor-DYa5_IOB.js";
|
|
8
|
+
const wt = "_ChartFrame_1t22s_2", Ot = "_ChartState_1t22s_6", _t = {
|
|
9
|
+
ChartFrame: wt,
|
|
10
|
+
ChartState: Ot
|
|
11
|
+
}, Y = ut.bind(_t), I = (e) => {
|
|
12
|
+
const t = _.c(14), {
|
|
13
|
+
height: r,
|
|
14
|
+
loading: o,
|
|
15
|
+
empty: n,
|
|
16
|
+
isEmpty: a,
|
|
17
|
+
className: l,
|
|
18
|
+
children: c
|
|
19
|
+
} = e;
|
|
20
|
+
let s;
|
|
21
|
+
t[0] !== l ? (s = Y("ChartFrame", l), t[0] = l, t[1] = s) : s = t[1];
|
|
22
|
+
const i = r ?? "100%", u = r ? void 0 : 240;
|
|
30
23
|
let h;
|
|
31
|
-
|
|
24
|
+
t[2] !== i || t[3] !== u ? (h = {
|
|
25
|
+
height: i,
|
|
26
|
+
minHeight: u
|
|
27
|
+
}, t[2] = i, t[3] = u, t[4] = h) : h = t[4];
|
|
28
|
+
let d;
|
|
29
|
+
t[5] !== c || t[6] !== n || t[7] !== a || t[8] !== o ? (d = a ? /* @__PURE__ */ j.jsx("div", { className: Y("ChartState"), children: n ?? "데이터가 없습니다" }) : o ? /* @__PURE__ */ j.jsx("div", { className: Y("ChartState"), children: "불러오는 중…" }) : c, t[5] = c, t[6] = n, t[7] = a, t[8] = o, t[9] = d) : d = t[9];
|
|
30
|
+
let m;
|
|
31
|
+
return t[10] !== s || t[11] !== h || t[12] !== d ? (m = /* @__PURE__ */ j.jsx("div", { className: s, style: h, children: d }), t[10] = s, t[11] = h, t[12] = d, t[13] = m) : m = t[13], m;
|
|
32
32
|
};
|
|
33
|
-
let
|
|
34
|
-
const
|
|
33
|
+
let lt = !1;
|
|
34
|
+
const $t = () => {
|
|
35
35
|
if (typeof window > "u") return "sans-serif";
|
|
36
|
-
const
|
|
37
|
-
return (
|
|
38
|
-
},
|
|
39
|
-
|
|
36
|
+
const e = getComputedStyle(document.body).fontFamily;
|
|
37
|
+
return (e == null ? void 0 : e.trim()) || "sans-serif";
|
|
38
|
+
}, Ft = () => {
|
|
39
|
+
lt || (lt = !0, ot.register(
|
|
40
|
+
bt,
|
|
41
|
+
Ct,
|
|
42
|
+
xt,
|
|
43
|
+
// radar 방사축
|
|
44
|
+
At,
|
|
45
|
+
vt,
|
|
46
|
+
Lt,
|
|
47
|
+
St,
|
|
48
|
+
Et,
|
|
49
|
+
Gt,
|
|
50
|
+
Pt,
|
|
51
|
+
Tt,
|
|
52
|
+
Rt,
|
|
53
|
+
// radar (point/line/Filler 는 위에서 공용)
|
|
54
|
+
Dt,
|
|
55
|
+
Bt,
|
|
56
|
+
kt,
|
|
57
|
+
jt
|
|
58
|
+
), ot.defaults.font.family = $t());
|
|
40
59
|
};
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
bar:
|
|
44
|
-
line:
|
|
45
|
-
pie:
|
|
46
|
-
doughnut:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
Ft();
|
|
61
|
+
const Nt = {
|
|
62
|
+
bar: pt,
|
|
63
|
+
line: ht,
|
|
64
|
+
pie: mt,
|
|
65
|
+
doughnut: gt,
|
|
66
|
+
radar: yt
|
|
67
|
+
}, Wt = (e) => {
|
|
68
|
+
var r, o;
|
|
69
|
+
const t = (o = (r = e.plugins) == null ? void 0 : r.datalabels) == null ? void 0 : o.display;
|
|
70
|
+
return t !== void 0 && t !== !1;
|
|
71
|
+
}, M = (e) => {
|
|
72
|
+
const t = _.c(12), {
|
|
73
|
+
kind: r,
|
|
74
|
+
data: o,
|
|
75
|
+
options: n,
|
|
76
|
+
plugins: a
|
|
77
|
+
} = e, l = Nt[r];
|
|
78
|
+
let c;
|
|
79
|
+
t[0] !== a ? (c = a ?? [], t[0] = a, t[1] = c) : c = t[1];
|
|
80
|
+
let s;
|
|
81
|
+
t[2] !== n ? (s = Wt(n) ? [ft] : [], t[2] = n, t[3] = s) : s = t[3];
|
|
60
82
|
let i;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return Array.isArray(t) ? t.map(V) : e;
|
|
105
|
-
}, oe = W.createContext(void 0), Fe = () => W.use(oe), Ne = {
|
|
83
|
+
t[4] !== c || t[5] !== s ? (i = [...c, ...s], t[4] = c, t[5] = s, t[6] = i) : i = t[6];
|
|
84
|
+
const u = i, h = o, d = n, m = u;
|
|
85
|
+
let g;
|
|
86
|
+
return t[7] !== l || t[8] !== h || t[9] !== d || t[10] !== m ? (g = /* @__PURE__ */ j.jsx(l, { data: h, options: d, plugins: m }), t[7] = l, t[8] = h, t[9] = d, t[10] = m, t[11] = g) : g = t[11], g;
|
|
87
|
+
}, It = 8, J = [S.deepGreen.DeepGreen6, S.blue.Blue6, S.gold.Gold6, S.purple.Purple6, S.cyanBlue.CyanBlue6, S.red.Red6, S.lightGreen.LightGreen6, S.grey.Grey6], Mt = {
|
|
88
|
+
red: S.red.Red6,
|
|
89
|
+
lightGreen: S.lightGreen.LightGreen6,
|
|
90
|
+
cyanBlue: S.cyanBlue.CyanBlue6,
|
|
91
|
+
purple: S.purple.Purple6,
|
|
92
|
+
gold: S.gold.Gold6,
|
|
93
|
+
blue: S.blue.Blue6,
|
|
94
|
+
grey: S.grey.Grey6,
|
|
95
|
+
deepGreen: S.deepGreen.DeepGreen6,
|
|
96
|
+
primary: S.deepGreen.DeepGreen6
|
|
97
|
+
}, X = (e) => /^(#|rgb|hsl|var\()/.test(e) ? e : Mt[e] ?? e, F = (e) => typeof window > "u" ? "" : getComputedStyle(document.documentElement).getPropertyValue(e).trim(), Vt = () => {
|
|
98
|
+
const e = Array.from({
|
|
99
|
+
length: It
|
|
100
|
+
}, (t, r) => F(`--chartCategorical${r}`));
|
|
101
|
+
return e.some(Boolean) ? e.map((t, r) => t || J[r]) : J;
|
|
102
|
+
}, st = (e, t) => {
|
|
103
|
+
const [r, o] = U.useState(t);
|
|
104
|
+
return U.useEffect(() => {
|
|
105
|
+
const n = () => o(e());
|
|
106
|
+
n();
|
|
107
|
+
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
108
|
+
return a.addEventListener("change", n), () => a.removeEventListener("change", n);
|
|
109
|
+
}, []), r;
|
|
110
|
+
}, Kt = () => st(Vt, J), N = {
|
|
111
|
+
grid: S.grey.Grey4,
|
|
112
|
+
axis: S.grey.Grey6,
|
|
113
|
+
label: S.grey.Grey7,
|
|
114
|
+
tooltipBg: S.grey.Grey9,
|
|
115
|
+
tooltipText: S.whiteWhite
|
|
116
|
+
}, zt = () => ({
|
|
117
|
+
grid: F("--chartGrid") || N.grid,
|
|
118
|
+
axis: F("--chartAxis") || N.axis,
|
|
119
|
+
label: F("--chartLabel") || N.label,
|
|
120
|
+
tooltipBg: F("--chartTooltipBg") || N.tooltipBg,
|
|
121
|
+
tooltipText: F("--chartTooltipText") || N.tooltipText
|
|
122
|
+
}), V = () => st(zt, N), Ht = (e, t) => {
|
|
123
|
+
if (e)
|
|
124
|
+
return Array.isArray(e) ? e.map(X) : t;
|
|
125
|
+
}, it = U.createContext(void 0), qt = () => U.use(it), Ut = {
|
|
106
126
|
// 예) 모든 도넛 기본 정책을 켤 때:
|
|
107
127
|
// doughnut: { cutout: 0.6, showTotal: true, legend: "right" },
|
|
108
128
|
// bar: { barRadius: 6 },
|
|
109
|
-
},
|
|
110
|
-
const
|
|
111
|
-
let
|
|
112
|
-
return
|
|
113
|
-
kind:
|
|
114
|
-
instance:
|
|
115
|
-
theme:
|
|
116
|
-
preset:
|
|
117
|
-
tokenPalette:
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
var
|
|
129
|
+
}, K = (e, t) => {
|
|
130
|
+
const r = _.c(6), o = Kt(), n = qt(), a = Ut[e];
|
|
131
|
+
let l;
|
|
132
|
+
return r[0] !== t || r[1] !== e || r[2] !== a || r[3] !== n || r[4] !== o ? (l = {
|
|
133
|
+
kind: e,
|
|
134
|
+
instance: t,
|
|
135
|
+
theme: n,
|
|
136
|
+
preset: a,
|
|
137
|
+
tokenPalette: o
|
|
138
|
+
}, r[0] = t, r[1] = e, r[2] = a, r[3] = n, r[4] = o, r[5] = l) : l = r[5], l;
|
|
139
|
+
}, Xt = (e) => {
|
|
140
|
+
var t, r, o;
|
|
121
141
|
return {
|
|
122
|
-
...(
|
|
123
|
-
...(
|
|
142
|
+
...(t = e.theme) == null ? void 0 : t.defaults,
|
|
143
|
+
...(o = (r = e.theme) == null ? void 0 : r.presets) == null ? void 0 : o[e.kind]
|
|
124
144
|
};
|
|
125
|
-
},
|
|
126
|
-
var
|
|
127
|
-
return ((
|
|
128
|
-
},
|
|
129
|
-
const
|
|
130
|
-
return
|
|
131
|
-
},
|
|
132
|
-
var
|
|
133
|
-
return ((
|
|
134
|
-
},
|
|
135
|
-
var
|
|
136
|
-
return
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
145
|
+
}, Yt = (e) => {
|
|
146
|
+
var t, r, o, n, a, l;
|
|
147
|
+
return ((o = (r = (t = e.theme) == null ? void 0 : t.presets) == null ? void 0 : r[e.kind]) == null ? void 0 : o.palette) ?? ((a = (n = e.theme) == null ? void 0 : n.defaults) == null ? void 0 : a.palette) ?? ((l = e.theme) == null ? void 0 : l.palette);
|
|
148
|
+
}, Z = (e, t, r) => {
|
|
149
|
+
const o = Ht(e, r);
|
|
150
|
+
return o && o.length ? o[t % o.length] : void 0;
|
|
151
|
+
}, W = (e, t) => {
|
|
152
|
+
var r, o;
|
|
153
|
+
return ((r = t.instance) == null ? void 0 : r[e]) ?? Xt(t)[e] ?? ((o = t.preset) == null ? void 0 : o[e]);
|
|
154
|
+
}, Q = (e, t) => {
|
|
155
|
+
var r, o;
|
|
156
|
+
return Z((r = t.instance) == null ? void 0 : r.colors, e, t.tokenPalette) ?? Z(Yt(t), e, t.tokenPalette) ?? Z((o = t.preset) == null ? void 0 : o.palette, e, t.tokenPalette) ?? t.tokenPalette[e % t.tokenPalette.length];
|
|
157
|
+
}, Zt = (e, t) => (r) => {
|
|
158
|
+
const {
|
|
159
|
+
chart: o
|
|
160
|
+
} = r, {
|
|
161
|
+
ctx: n,
|
|
162
|
+
chartArea: a
|
|
163
|
+
} = o;
|
|
164
|
+
if (!a) return e;
|
|
165
|
+
const l = n.createLinearGradient(0, a.top, 0, a.bottom);
|
|
166
|
+
return l.addColorStop(0, e), l.addColorStop(1, t), l;
|
|
167
|
+
}, nt = (e) => !!e && typeof e == "object" && !Array.isArray(e), tt = (e, t) => {
|
|
168
|
+
if (!t) return e;
|
|
169
|
+
const r = Array.isArray(e) ? [...e] : {
|
|
170
|
+
...e
|
|
141
171
|
};
|
|
142
|
-
for (const
|
|
143
|
-
const
|
|
144
|
-
o
|
|
172
|
+
for (const o of Object.keys(t)) {
|
|
173
|
+
const n = e == null ? void 0 : e[o], a = t[o];
|
|
174
|
+
r[o] = nt(n) && nt(a) ? tt(n, a) : a;
|
|
145
175
|
}
|
|
146
|
-
return
|
|
147
|
-
},
|
|
148
|
-
const r =
|
|
149
|
-
|
|
176
|
+
return r;
|
|
177
|
+
}, et = (e, t) => /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e, Jt = (e, t) => {
|
|
178
|
+
const r = e === !0 ? void 0 : e.from, o = e === !0 ? void 0 : e.to;
|
|
179
|
+
return Zt(r ?? et(t, "33"), o ?? et(t, "03"));
|
|
180
|
+
}, Qt = (e) => !Array.isArray(e) && "series" in e, rt = (e, t, r = {}) => {
|
|
181
|
+
const o = t.kind === "line" || t.kind === "radar", n = (l) => o && r.area ? et(l, "29") : l;
|
|
182
|
+
if (Qt(e))
|
|
150
183
|
return {
|
|
151
|
-
labels:
|
|
152
|
-
datasets:
|
|
153
|
-
const
|
|
184
|
+
labels: e.labels,
|
|
185
|
+
datasets: e.series.map((l, c) => {
|
|
186
|
+
const s = l.color ? X(l.color) : Q(c, t), i = t.kind === "line" ? l.gradient : void 0, u = i != null && i !== !1;
|
|
154
187
|
return {
|
|
155
|
-
label:
|
|
156
|
-
data:
|
|
157
|
-
backgroundColor:
|
|
158
|
-
borderColor:
|
|
159
|
-
fill:
|
|
160
|
-
tension:
|
|
161
|
-
pointStyle:
|
|
162
|
-
borderWidth:
|
|
188
|
+
label: l.name,
|
|
189
|
+
data: l.values,
|
|
190
|
+
backgroundColor: u ? Jt(i, s) : n(s),
|
|
191
|
+
borderColor: s,
|
|
192
|
+
fill: o ? u || !!r.area : void 0,
|
|
193
|
+
tension: r.tension,
|
|
194
|
+
pointStyle: r.pointStyle,
|
|
195
|
+
borderWidth: r.lineWidth,
|
|
196
|
+
// ── 데이터셋 단위 옵션 (① 듀얼축·점선·null 구간) ──
|
|
197
|
+
yAxisID: l.yAxisID,
|
|
198
|
+
borderDash: l.borderDash,
|
|
199
|
+
spanGaps: l.spanGaps
|
|
163
200
|
};
|
|
164
201
|
})
|
|
165
202
|
};
|
|
166
|
-
const
|
|
203
|
+
const a = e.map((l, c) => l.color ? X(l.color) : Q(c, t));
|
|
167
204
|
return {
|
|
168
|
-
labels:
|
|
205
|
+
labels: e.map((l) => l.label),
|
|
169
206
|
datasets: [{
|
|
170
207
|
label: "",
|
|
171
|
-
data:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
208
|
+
data: e.map((l) => l.value),
|
|
209
|
+
// line/radar 는 단일색 면적, bar/pie 는 항목별 색
|
|
210
|
+
backgroundColor: o ? n(a[0]) : a,
|
|
211
|
+
// radar 단일 시리즈는 한 색, 그 외(line 기존동작 포함)는 항목별 배열
|
|
212
|
+
borderColor: t.kind === "radar" ? a[0] : a,
|
|
213
|
+
fill: o ? !!r.area : void 0,
|
|
214
|
+
tension: r.tension,
|
|
215
|
+
pointStyle: r.pointStyle,
|
|
216
|
+
borderWidth: r.lineWidth
|
|
178
217
|
}]
|
|
179
218
|
};
|
|
180
|
-
},
|
|
181
|
-
labels:
|
|
219
|
+
}, ct = (e, t) => ({
|
|
220
|
+
labels: e.map((r) => r.label),
|
|
182
221
|
datasets: [{
|
|
183
222
|
label: "",
|
|
184
|
-
data:
|
|
185
|
-
backgroundColor:
|
|
223
|
+
data: e.map((r) => r.value),
|
|
224
|
+
backgroundColor: e.map((r, o) => r.color ? X(r.color) : Q(o, t)),
|
|
186
225
|
borderWidth: 0
|
|
187
226
|
}]
|
|
188
|
-
}),
|
|
227
|
+
}), te = (e) => e === !1 ? {
|
|
189
228
|
display: !1
|
|
190
|
-
} :
|
|
229
|
+
} : e === !0 || e === void 0 ? {
|
|
191
230
|
display: !0,
|
|
192
231
|
position: "top"
|
|
193
232
|
} : {
|
|
194
233
|
display: !0,
|
|
195
|
-
position:
|
|
196
|
-
},
|
|
234
|
+
position: e
|
|
235
|
+
}, ee = {
|
|
197
236
|
top: 24,
|
|
198
237
|
right: 28,
|
|
199
238
|
left: 8
|
|
200
|
-
},
|
|
239
|
+
}, re = (e, t, r) => e ? {
|
|
201
240
|
display: "auto",
|
|
202
|
-
color:
|
|
203
|
-
anchor:
|
|
204
|
-
align:
|
|
241
|
+
color: t ? r.label : "#fff",
|
|
242
|
+
anchor: t ? "end" : "center",
|
|
243
|
+
align: t ? "top" : "center",
|
|
205
244
|
// 차트 영역 밖으로 라벨이 잘리지 않도록 안쪽으로 강제 (라인 양 끝 점 등)
|
|
206
245
|
clamp: !0,
|
|
207
246
|
font: {
|
|
208
247
|
weight: 600
|
|
209
248
|
},
|
|
210
|
-
formatter: typeof
|
|
249
|
+
formatter: typeof e == "function" ? e : (o) => typeof o == "number" ? o.toLocaleString() : o
|
|
211
250
|
} : {
|
|
212
251
|
display: !1
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
252
|
+
}, at = (e, t, r) => {
|
|
253
|
+
const o = t == null ? void 0 : t.tickFormat;
|
|
254
|
+
return {
|
|
255
|
+
grid: {
|
|
256
|
+
color: e.grid,
|
|
257
|
+
// 보조축 격자는 주축과 겹쳐 지저분해지므로 차트 영역엔 안 그림
|
|
258
|
+
...r === "right" ? {
|
|
259
|
+
drawOnChartArea: !1
|
|
260
|
+
} : {}
|
|
261
|
+
},
|
|
262
|
+
ticks: {
|
|
263
|
+
color: e.label,
|
|
264
|
+
...o ? {
|
|
265
|
+
callback: (n) => o(Number(n))
|
|
266
|
+
} : {}
|
|
267
|
+
},
|
|
268
|
+
border: {
|
|
269
|
+
color: e.axis
|
|
270
|
+
},
|
|
271
|
+
...(t == null ? void 0 : t.max) != null ? {
|
|
272
|
+
max: t.max
|
|
273
|
+
} : {},
|
|
274
|
+
...(t == null ? void 0 : t.min) != null ? {
|
|
275
|
+
min: t.min
|
|
276
|
+
} : {},
|
|
277
|
+
...r ? {
|
|
278
|
+
position: r
|
|
279
|
+
} : {},
|
|
280
|
+
...t != null && t.title ? {
|
|
281
|
+
title: {
|
|
282
|
+
display: !0,
|
|
283
|
+
text: t.title,
|
|
284
|
+
color: e.label
|
|
285
|
+
}
|
|
286
|
+
} : {}
|
|
287
|
+
};
|
|
288
|
+
}, oe = (e, t, r) => {
|
|
289
|
+
if (e === "bar" || e === "line")
|
|
290
|
+
return {
|
|
291
|
+
x: {
|
|
292
|
+
grid: {
|
|
293
|
+
color: t.grid
|
|
294
|
+
},
|
|
295
|
+
ticks: {
|
|
296
|
+
color: t.label
|
|
297
|
+
},
|
|
298
|
+
border: {
|
|
299
|
+
color: t.axis
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
y: at(t, r == null ? void 0 : r.y, "left"),
|
|
303
|
+
...r != null && r.y1 ? {
|
|
304
|
+
y1: at(t, r.y1, "right")
|
|
305
|
+
} : {}
|
|
306
|
+
};
|
|
307
|
+
if (e === "radar")
|
|
308
|
+
return {
|
|
309
|
+
r: {
|
|
310
|
+
grid: {
|
|
311
|
+
color: t.grid
|
|
312
|
+
},
|
|
313
|
+
angleLines: {
|
|
314
|
+
color: t.grid
|
|
315
|
+
},
|
|
316
|
+
pointLabels: {
|
|
317
|
+
color: t.label
|
|
318
|
+
},
|
|
319
|
+
ticks: {
|
|
320
|
+
color: t.label,
|
|
321
|
+
backdropColor: "transparent"
|
|
322
|
+
},
|
|
323
|
+
beginAtZero: !0
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
}, z = ({
|
|
327
|
+
kind: e,
|
|
328
|
+
base: t,
|
|
329
|
+
tokens: r,
|
|
330
|
+
extra: o,
|
|
331
|
+
axes: n
|
|
218
332
|
}) => {
|
|
219
|
-
const
|
|
333
|
+
const a = e === "bar" || e === "line", l = oe(e, r, n), c = {
|
|
220
334
|
responsive: !0,
|
|
221
|
-
maintainAspectRatio:
|
|
222
|
-
aspectRatio:
|
|
335
|
+
maintainAspectRatio: t.height == null,
|
|
336
|
+
aspectRatio: t.aspectRatio,
|
|
223
337
|
// 영역 여백: padding prop 이 최우선, 없으면 valueLabel·직교좌표 시 기본 여백(라벨 잘림 방지)
|
|
224
338
|
layout: (() => {
|
|
225
|
-
const
|
|
226
|
-
return
|
|
227
|
-
padding:
|
|
339
|
+
const i = t.padding ?? (t.valueLabel && a ? ee : void 0);
|
|
340
|
+
return i ? {
|
|
341
|
+
padding: i
|
|
228
342
|
} : void 0;
|
|
229
343
|
})(),
|
|
230
344
|
plugins: {
|
|
231
|
-
legend:
|
|
232
|
-
title:
|
|
345
|
+
legend: te(t.legend),
|
|
346
|
+
title: t.title ? {
|
|
233
347
|
display: !0,
|
|
234
|
-
text:
|
|
235
|
-
color:
|
|
348
|
+
text: t.title,
|
|
349
|
+
color: r.label
|
|
236
350
|
} : {
|
|
237
351
|
display: !1
|
|
238
352
|
},
|
|
239
353
|
tooltip: {
|
|
240
|
-
backgroundColor:
|
|
241
|
-
titleColor:
|
|
242
|
-
bodyColor:
|
|
354
|
+
backgroundColor: r.tooltipBg,
|
|
355
|
+
titleColor: r.tooltipText,
|
|
356
|
+
bodyColor: r.tooltipText
|
|
243
357
|
},
|
|
244
|
-
datalabels:
|
|
358
|
+
datalabels: re(t.valueLabel, a, r)
|
|
245
359
|
},
|
|
246
360
|
...l ? {
|
|
247
|
-
scales:
|
|
248
|
-
x: {
|
|
249
|
-
grid: {
|
|
250
|
-
color: o.grid
|
|
251
|
-
},
|
|
252
|
-
ticks: {
|
|
253
|
-
color: o.label
|
|
254
|
-
},
|
|
255
|
-
border: {
|
|
256
|
-
color: o.axis
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
y: {
|
|
260
|
-
grid: {
|
|
261
|
-
color: o.grid
|
|
262
|
-
},
|
|
263
|
-
ticks: {
|
|
264
|
-
color: o.label
|
|
265
|
-
},
|
|
266
|
-
border: {
|
|
267
|
-
color: o.axis
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
361
|
+
scales: l
|
|
271
362
|
} : {}
|
|
272
|
-
}, s =
|
|
273
|
-
return
|
|
274
|
-
},
|
|
275
|
-
const
|
|
276
|
-
data:
|
|
277
|
-
orientation:
|
|
278
|
-
stacked:
|
|
279
|
-
barRadius:
|
|
280
|
-
barThickness:
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
barRadius: n
|
|
298
|
-
}, e[0] = n, e[1] = a, e[2] = C) : C = e[2];
|
|
299
|
-
const A = z("bar", C), T = K();
|
|
363
|
+
}, s = tt(tt(c, o), t.options);
|
|
364
|
+
return t.rawOptions ?? s;
|
|
365
|
+
}, le = (e) => Array.isArray(e) ? e.length === 0 : e.series.length === 0, ye = (e) => {
|
|
366
|
+
const t = _.c(35), {
|
|
367
|
+
data: r,
|
|
368
|
+
orientation: o,
|
|
369
|
+
stacked: n,
|
|
370
|
+
barRadius: a,
|
|
371
|
+
barThickness: l,
|
|
372
|
+
yAxis: c,
|
|
373
|
+
y1Axis: s,
|
|
374
|
+
colors: i,
|
|
375
|
+
title: u,
|
|
376
|
+
legend: h,
|
|
377
|
+
height: d,
|
|
378
|
+
aspectRatio: m,
|
|
379
|
+
padding: g,
|
|
380
|
+
loading: E,
|
|
381
|
+
empty: v,
|
|
382
|
+
className: G,
|
|
383
|
+
valueLabel: R,
|
|
384
|
+
options: p,
|
|
385
|
+
rawOptions: L,
|
|
386
|
+
plugins: P
|
|
387
|
+
} = e, T = o === void 0 ? "vertical" : o;
|
|
300
388
|
let f;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
389
|
+
t[0] !== a || t[1] !== i ? (f = {
|
|
390
|
+
colors: i,
|
|
391
|
+
barRadius: a
|
|
392
|
+
}, t[0] = a, t[1] = i, t[2] = f) : f = t[2];
|
|
393
|
+
const b = K("bar", f), y = V();
|
|
394
|
+
let C;
|
|
395
|
+
if (t[3] !== l || t[4] !== r || t[5] !== b) {
|
|
396
|
+
const O = W("barRadius", b);
|
|
397
|
+
C = rt(r, b), C.datasets = C.datasets.map(($) => ({
|
|
398
|
+
...$,
|
|
399
|
+
borderRadius: O,
|
|
400
|
+
barThickness: l
|
|
401
|
+
})), t[3] = l, t[4] = r, t[5] = b, t[6] = C;
|
|
308
402
|
} else
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
let
|
|
312
|
-
if (
|
|
313
|
-
const
|
|
314
|
-
indexAxis:
|
|
315
|
-
...
|
|
403
|
+
C = t[6];
|
|
404
|
+
const x = T === "horizontal" ? "y" : "x";
|
|
405
|
+
let A;
|
|
406
|
+
if (t[7] !== m || t[8] !== r || t[9] !== d || t[10] !== h || t[11] !== p || t[12] !== g || t[13] !== L || t[14] !== n || t[15] !== x || t[16] !== u || t[17] !== y || t[18] !== R || t[19] !== s || t[20] !== c) {
|
|
407
|
+
const O = {
|
|
408
|
+
indexAxis: x,
|
|
409
|
+
...n ? {
|
|
316
410
|
scales: {
|
|
317
411
|
x: {
|
|
318
412
|
stacked: !0
|
|
@@ -322,220 +416,298 @@ const Ge = {
|
|
|
322
416
|
}
|
|
323
417
|
}
|
|
324
418
|
} : {}
|
|
325
|
-
},
|
|
326
|
-
|
|
419
|
+
}, $ = h ?? (Array.isArray(r) ? !1 : void 0);
|
|
420
|
+
A = z({
|
|
327
421
|
kind: "bar",
|
|
328
422
|
base: {
|
|
329
|
-
title:
|
|
330
|
-
legend:
|
|
331
|
-
height:
|
|
332
|
-
aspectRatio:
|
|
333
|
-
padding:
|
|
334
|
-
valueLabel:
|
|
335
|
-
options:
|
|
336
|
-
rawOptions:
|
|
423
|
+
title: u,
|
|
424
|
+
legend: $,
|
|
425
|
+
height: d,
|
|
426
|
+
aspectRatio: m,
|
|
427
|
+
padding: g,
|
|
428
|
+
valueLabel: R,
|
|
429
|
+
options: p,
|
|
430
|
+
rawOptions: L
|
|
337
431
|
},
|
|
338
|
-
tokens:
|
|
339
|
-
extra:
|
|
340
|
-
|
|
432
|
+
tokens: y,
|
|
433
|
+
extra: O,
|
|
434
|
+
axes: {
|
|
435
|
+
y: c,
|
|
436
|
+
y1: s
|
|
437
|
+
}
|
|
438
|
+
}), t[7] = m, t[8] = r, t[9] = d, t[10] = h, t[11] = p, t[12] = g, t[13] = L, t[14] = n, t[15] = x, t[16] = u, t[17] = y, t[18] = R, t[19] = s, t[20] = c, t[21] = A;
|
|
341
439
|
} else
|
|
342
|
-
|
|
343
|
-
const
|
|
344
|
-
let
|
|
345
|
-
|
|
346
|
-
let E;
|
|
347
|
-
e[22] !== f || e[23] !== R ? (E = /* @__PURE__ */ G.jsx(I, { kind: "bar", data: f, options: R }), e[22] = f, e[23] = R, e[24] = E) : E = e[24];
|
|
440
|
+
A = t[21];
|
|
441
|
+
const B = A;
|
|
442
|
+
let D;
|
|
443
|
+
t[22] !== r ? (D = le(r), t[22] = r, t[23] = D) : D = t[23];
|
|
348
444
|
let k;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}, e[0] = a, e[1] = n, e[2] = l, e[3] = L) : L = e[3];
|
|
376
|
-
const C = z("line", L), A = K();
|
|
445
|
+
t[24] !== C || t[25] !== B || t[26] !== P ? (k = /* @__PURE__ */ j.jsx(M, { kind: "bar", data: C, options: B, plugins: P }), t[24] = C, t[25] = B, t[26] = P, t[27] = k) : k = t[27];
|
|
446
|
+
let w;
|
|
447
|
+
return t[28] !== G || t[29] !== v || t[30] !== d || t[31] !== E || t[32] !== D || t[33] !== k ? (w = /* @__PURE__ */ j.jsx(I, { height: d, loading: E, empty: v, isEmpty: D, className: G, children: k }), t[28] = G, t[29] = v, t[30] = d, t[31] = E, t[32] = D, t[33] = k, t[34] = w) : w = t[34], w;
|
|
448
|
+
}, ne = (e) => Array.isArray(e) ? e.length === 0 : e.series.length === 0, fe = (e) => {
|
|
449
|
+
const t = _.c(34), {
|
|
450
|
+
data: r,
|
|
451
|
+
area: o,
|
|
452
|
+
tension: n,
|
|
453
|
+
pointStyle: a,
|
|
454
|
+
lineWidth: l,
|
|
455
|
+
yAxis: c,
|
|
456
|
+
y1Axis: s,
|
|
457
|
+
colors: i,
|
|
458
|
+
title: u,
|
|
459
|
+
legend: h,
|
|
460
|
+
height: d,
|
|
461
|
+
aspectRatio: m,
|
|
462
|
+
padding: g,
|
|
463
|
+
loading: E,
|
|
464
|
+
empty: v,
|
|
465
|
+
className: G,
|
|
466
|
+
valueLabel: R,
|
|
467
|
+
options: p,
|
|
468
|
+
rawOptions: L,
|
|
469
|
+
plugins: P
|
|
470
|
+
} = e;
|
|
377
471
|
let T;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
tension:
|
|
381
|
-
pointStyle:
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
472
|
+
t[0] !== i || t[1] !== a || t[2] !== n ? (T = {
|
|
473
|
+
colors: i,
|
|
474
|
+
tension: n,
|
|
475
|
+
pointStyle: a
|
|
476
|
+
}, t[0] = i, t[1] = a, t[2] = n, t[3] = T) : T = t[3];
|
|
477
|
+
const f = K("line", T), b = V();
|
|
478
|
+
let y;
|
|
479
|
+
t[4] !== o || t[5] !== r || t[6] !== l || t[7] !== f ? (y = rt(r, f, {
|
|
480
|
+
area: o,
|
|
481
|
+
tension: W("tension", f) ?? 0.4,
|
|
482
|
+
pointStyle: W("pointStyle", f),
|
|
483
|
+
lineWidth: l
|
|
484
|
+
}), t[4] = o, t[5] = r, t[6] = l, t[7] = f, t[8] = y) : y = t[8];
|
|
485
|
+
const C = y, x = h ?? (Array.isArray(r) ? !1 : void 0);
|
|
486
|
+
let A;
|
|
487
|
+
t[9] !== m || t[10] !== d || t[11] !== x || t[12] !== p || t[13] !== g || t[14] !== L || t[15] !== u || t[16] !== b || t[17] !== R || t[18] !== s || t[19] !== c ? (A = z({
|
|
387
488
|
kind: "line",
|
|
388
489
|
base: {
|
|
389
|
-
title:
|
|
390
|
-
legend:
|
|
391
|
-
height:
|
|
392
|
-
aspectRatio:
|
|
393
|
-
padding:
|
|
394
|
-
valueLabel:
|
|
395
|
-
options:
|
|
396
|
-
rawOptions:
|
|
490
|
+
title: u,
|
|
491
|
+
legend: x,
|
|
492
|
+
height: d,
|
|
493
|
+
aspectRatio: m,
|
|
494
|
+
padding: g,
|
|
495
|
+
valueLabel: R,
|
|
496
|
+
options: p,
|
|
497
|
+
rawOptions: L
|
|
397
498
|
},
|
|
398
|
-
tokens:
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
499
|
+
tokens: b,
|
|
500
|
+
axes: {
|
|
501
|
+
y: c,
|
|
502
|
+
y1: s
|
|
503
|
+
}
|
|
504
|
+
}), t[9] = m, t[10] = d, t[11] = x, t[12] = p, t[13] = g, t[14] = L, t[15] = u, t[16] = b, t[17] = R, t[18] = s, t[19] = c, t[20] = A) : A = t[20];
|
|
505
|
+
const B = A;
|
|
506
|
+
let D;
|
|
507
|
+
t[21] !== r ? (D = ne(r), t[21] = r, t[22] = D) : D = t[22];
|
|
405
508
|
let k;
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
let
|
|
432
|
-
|
|
509
|
+
t[23] !== C || t[24] !== B || t[25] !== P ? (k = /* @__PURE__ */ j.jsx(M, { kind: "line", data: C, options: B, plugins: P }), t[23] = C, t[24] = B, t[25] = P, t[26] = k) : k = t[26];
|
|
510
|
+
let w;
|
|
511
|
+
return t[27] !== G || t[28] !== v || t[29] !== d || t[30] !== E || t[31] !== D || t[32] !== k ? (w = /* @__PURE__ */ j.jsx(I, { height: d, loading: E, empty: v, isEmpty: D, className: G, children: k }), t[27] = G, t[28] = v, t[29] = d, t[30] = E, t[31] = D, t[32] = k, t[33] = w) : w = t[33], w;
|
|
512
|
+
}, be = (e) => {
|
|
513
|
+
const t = _.c(26), {
|
|
514
|
+
data: r,
|
|
515
|
+
colors: o,
|
|
516
|
+
title: n,
|
|
517
|
+
legend: a,
|
|
518
|
+
height: l,
|
|
519
|
+
aspectRatio: c,
|
|
520
|
+
padding: s,
|
|
521
|
+
loading: i,
|
|
522
|
+
empty: u,
|
|
523
|
+
className: h,
|
|
524
|
+
valueLabel: d,
|
|
525
|
+
options: m,
|
|
526
|
+
rawOptions: g,
|
|
527
|
+
plugins: E
|
|
528
|
+
} = e;
|
|
529
|
+
let v;
|
|
530
|
+
t[0] !== o ? (v = {
|
|
531
|
+
colors: o
|
|
532
|
+
}, t[0] = o, t[1] = v) : v = t[1];
|
|
533
|
+
const G = K("pie", v), R = V();
|
|
534
|
+
let p;
|
|
535
|
+
t[2] !== r || t[3] !== G ? (p = ct(r, G), t[2] = r, t[3] = G, t[4] = p) : p = t[4];
|
|
536
|
+
const L = p;
|
|
537
|
+
let P;
|
|
538
|
+
t[5] !== c || t[6] !== l || t[7] !== a || t[8] !== m || t[9] !== s || t[10] !== g || t[11] !== n || t[12] !== R || t[13] !== d ? (P = z({
|
|
433
539
|
kind: "pie",
|
|
434
540
|
base: {
|
|
435
|
-
title:
|
|
436
|
-
legend:
|
|
437
|
-
height:
|
|
438
|
-
aspectRatio:
|
|
439
|
-
padding:
|
|
440
|
-
valueLabel:
|
|
441
|
-
options:
|
|
442
|
-
rawOptions:
|
|
541
|
+
title: n,
|
|
542
|
+
legend: a,
|
|
543
|
+
height: l,
|
|
544
|
+
aspectRatio: c,
|
|
545
|
+
padding: s,
|
|
546
|
+
valueLabel: d,
|
|
547
|
+
options: m,
|
|
548
|
+
rawOptions: g
|
|
443
549
|
},
|
|
444
|
-
tokens:
|
|
445
|
-
}),
|
|
446
|
-
const
|
|
447
|
-
let f;
|
|
448
|
-
e[15] !== L || e[16] !== A ? (f = /* @__PURE__ */ G.jsx(I, { kind: "pie", data: L, options: A }), e[15] = L, e[16] = A, e[17] = f) : f = e[17];
|
|
550
|
+
tokens: R
|
|
551
|
+
}), t[5] = c, t[6] = l, t[7] = a, t[8] = m, t[9] = s, t[10] = g, t[11] = n, t[12] = R, t[13] = d, t[14] = P) : P = t[14];
|
|
552
|
+
const T = P, f = r.length === 0;
|
|
449
553
|
let b;
|
|
450
|
-
|
|
451
|
-
|
|
554
|
+
t[15] !== L || t[16] !== T || t[17] !== E ? (b = /* @__PURE__ */ j.jsx(M, { kind: "pie", data: L, options: T, plugins: E }), t[15] = L, t[16] = T, t[17] = E, t[18] = b) : b = t[18];
|
|
555
|
+
let y;
|
|
556
|
+
return t[19] !== h || t[20] !== u || t[21] !== l || t[22] !== i || t[23] !== f || t[24] !== b ? (y = /* @__PURE__ */ j.jsx(I, { height: l, loading: i, empty: u, isEmpty: f, className: h, children: b }), t[19] = h, t[20] = u, t[21] = l, t[22] = i, t[23] = f, t[24] = b, t[25] = y) : y = t[25], y;
|
|
557
|
+
}, ae = (e, t) => ({
|
|
452
558
|
id: "centerTotal",
|
|
453
|
-
afterDraw(
|
|
559
|
+
afterDraw(r) {
|
|
454
560
|
const {
|
|
455
|
-
ctx:
|
|
456
|
-
chartArea:
|
|
457
|
-
} =
|
|
458
|
-
if (!
|
|
459
|
-
const
|
|
460
|
-
|
|
561
|
+
ctx: o,
|
|
562
|
+
chartArea: n
|
|
563
|
+
} = r;
|
|
564
|
+
if (!n) return;
|
|
565
|
+
const a = (n.left + n.right) / 2, l = (n.top + n.bottom) / 2;
|
|
566
|
+
o.save(), o.textAlign = "center", o.textBaseline = "middle", o.fillStyle = t, o.font = "600 18px sans-serif", o.fillText(e, a, l), o.restore();
|
|
461
567
|
}
|
|
462
|
-
}),
|
|
463
|
-
const
|
|
464
|
-
data:
|
|
465
|
-
showTotal:
|
|
466
|
-
cutout:
|
|
467
|
-
colors:
|
|
468
|
-
title:
|
|
469
|
-
legend:
|
|
470
|
-
height:
|
|
471
|
-
aspectRatio:
|
|
472
|
-
padding:
|
|
473
|
-
loading:
|
|
474
|
-
empty:
|
|
475
|
-
className:
|
|
476
|
-
valueLabel:
|
|
477
|
-
options:
|
|
478
|
-
rawOptions: v
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
568
|
+
}), Ce = (e) => {
|
|
569
|
+
const t = _.c(56), {
|
|
570
|
+
data: r,
|
|
571
|
+
showTotal: o,
|
|
572
|
+
cutout: n,
|
|
573
|
+
colors: a,
|
|
574
|
+
title: l,
|
|
575
|
+
legend: c,
|
|
576
|
+
height: s,
|
|
577
|
+
aspectRatio: i,
|
|
578
|
+
padding: u,
|
|
579
|
+
loading: h,
|
|
580
|
+
empty: d,
|
|
581
|
+
className: m,
|
|
582
|
+
valueLabel: g,
|
|
583
|
+
options: E,
|
|
584
|
+
rawOptions: v,
|
|
585
|
+
plugins: G
|
|
586
|
+
} = e;
|
|
587
|
+
let R;
|
|
588
|
+
t[0] !== a || t[1] !== n || t[2] !== o ? (R = {
|
|
589
|
+
colors: a,
|
|
590
|
+
cutout: n,
|
|
591
|
+
showTotal: o
|
|
592
|
+
}, t[0] = a, t[1] = n, t[2] = o, t[3] = R) : R = t[3];
|
|
593
|
+
const p = K("doughnut", R), L = V();
|
|
594
|
+
let P;
|
|
595
|
+
t[4] !== p ? (P = W("cutout", p) ?? 0.6, t[4] = p, t[5] = P) : P = t[5];
|
|
596
|
+
const T = P;
|
|
597
|
+
let f;
|
|
598
|
+
t[6] !== p ? (f = W("showTotal", p) ?? !1, t[6] = p, t[7] = f) : f = t[7];
|
|
599
|
+
const b = f;
|
|
600
|
+
let y, C, x, A;
|
|
601
|
+
if (t[8] !== i || t[9] !== T || t[10] !== r || t[11] !== s || t[12] !== c || t[13] !== E || t[14] !== u || t[15] !== G || t[16] !== v || t[17] !== b || t[18] !== p || t[19] !== l || t[20] !== L || t[21] !== g) {
|
|
602
|
+
const dt = r.reduce(se, 0);
|
|
603
|
+
let H;
|
|
604
|
+
t[26] !== r || t[27] !== p ? (H = ct(r, p), t[26] = r, t[27] = p, t[28] = H) : H = t[28], y = H;
|
|
605
|
+
let q;
|
|
606
|
+
t[29] !== i || t[30] !== T || t[31] !== s || t[32] !== c || t[33] !== E || t[34] !== u || t[35] !== v || t[36] !== l || t[37] !== L || t[38] !== g ? (q = z({
|
|
500
607
|
kind: "doughnut",
|
|
501
608
|
base: {
|
|
502
|
-
title:
|
|
503
|
-
legend:
|
|
504
|
-
height:
|
|
505
|
-
aspectRatio:
|
|
506
|
-
padding:
|
|
507
|
-
valueLabel:
|
|
508
|
-
options:
|
|
609
|
+
title: l,
|
|
610
|
+
legend: c,
|
|
611
|
+
height: s,
|
|
612
|
+
aspectRatio: i,
|
|
613
|
+
padding: u,
|
|
614
|
+
valueLabel: g,
|
|
615
|
+
options: E,
|
|
509
616
|
rawOptions: v
|
|
510
617
|
},
|
|
511
618
|
tokens: L,
|
|
512
619
|
extra: {
|
|
513
|
-
cutout: `${
|
|
620
|
+
cutout: `${T * 100}%`
|
|
514
621
|
}
|
|
515
|
-
}),
|
|
622
|
+
}), t[29] = i, t[30] = T, t[31] = s, t[32] = c, t[33] = E, t[34] = u, t[35] = v, t[36] = l, t[37] = L, t[38] = g, t[39] = q) : q = t[39], C = q, t[40] !== G ? (x = G ?? [], t[40] = G, t[41] = x) : x = t[41], A = b ? [ae(dt.toLocaleString(), L.label)] : [], t[8] = i, t[9] = T, t[10] = r, t[11] = s, t[12] = c, t[13] = E, t[14] = u, t[15] = G, t[16] = v, t[17] = b, t[18] = p, t[19] = l, t[20] = L, t[21] = g, t[22] = y, t[23] = C, t[24] = x, t[25] = A;
|
|
516
623
|
} else
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
let
|
|
522
|
-
|
|
624
|
+
y = t[22], C = t[23], x = t[24], A = t[25];
|
|
625
|
+
let B;
|
|
626
|
+
t[42] !== x || t[43] !== A ? (B = [...x, ...A], t[42] = x, t[43] = A, t[44] = B) : B = t[44];
|
|
627
|
+
const D = B, k = r.length === 0, w = D.length ? D : void 0;
|
|
628
|
+
let O;
|
|
629
|
+
t[45] !== y || t[46] !== C || t[47] !== w ? (O = /* @__PURE__ */ j.jsx(M, { kind: "doughnut", data: y, options: C, plugins: w }), t[45] = y, t[46] = C, t[47] = w, t[48] = O) : O = t[48];
|
|
630
|
+
let $;
|
|
631
|
+
return t[49] !== m || t[50] !== d || t[51] !== s || t[52] !== h || t[53] !== k || t[54] !== O ? ($ = /* @__PURE__ */ j.jsx(I, { height: s, loading: h, empty: d, isEmpty: k, className: m, children: O }), t[49] = m, t[50] = d, t[51] = s, t[52] = h, t[53] = k, t[54] = O, t[55] = $) : $ = t[55], $;
|
|
523
632
|
};
|
|
524
|
-
function
|
|
525
|
-
return
|
|
633
|
+
function se(e, t) {
|
|
634
|
+
return e + t.value;
|
|
526
635
|
}
|
|
527
|
-
const
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
636
|
+
const ie = (e) => Array.isArray(e) ? e.length === 0 : e.series.length === 0, xe = (e) => {
|
|
637
|
+
const t = _.c(30), {
|
|
638
|
+
data: r,
|
|
639
|
+
max: o,
|
|
640
|
+
fill: n,
|
|
641
|
+
colors: a,
|
|
642
|
+
title: l,
|
|
643
|
+
legend: c,
|
|
644
|
+
height: s,
|
|
645
|
+
aspectRatio: i,
|
|
646
|
+
padding: u,
|
|
647
|
+
loading: h,
|
|
648
|
+
empty: d,
|
|
649
|
+
className: m,
|
|
650
|
+
valueLabel: g,
|
|
651
|
+
options: E,
|
|
652
|
+
rawOptions: v,
|
|
653
|
+
plugins: G
|
|
654
|
+
} = e, R = n === void 0 ? !0 : n;
|
|
655
|
+
let p;
|
|
656
|
+
t[0] !== a ? (p = {
|
|
657
|
+
colors: a
|
|
658
|
+
}, t[0] = a, t[1] = p) : p = t[1];
|
|
659
|
+
const L = K("radar", p), P = V();
|
|
660
|
+
let T;
|
|
661
|
+
t[2] !== r || t[3] !== R || t[4] !== L ? (T = rt(r, L, {
|
|
662
|
+
area: R
|
|
663
|
+
}), t[2] = r, t[3] = R, t[4] = L, t[5] = T) : T = t[5];
|
|
664
|
+
const f = T, b = c ?? (Array.isArray(r) ? !1 : void 0);
|
|
665
|
+
let y;
|
|
666
|
+
if (t[6] !== i || t[7] !== s || t[8] !== b || t[9] !== o || t[10] !== E || t[11] !== u || t[12] !== v || t[13] !== l || t[14] !== P || t[15] !== g) {
|
|
667
|
+
const D = o != null ? {
|
|
668
|
+
scales: {
|
|
669
|
+
r: {
|
|
670
|
+
suggestedMax: o
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
} : {};
|
|
674
|
+
y = z({
|
|
675
|
+
kind: "radar",
|
|
676
|
+
base: {
|
|
677
|
+
title: l,
|
|
678
|
+
legend: b,
|
|
679
|
+
height: s,
|
|
680
|
+
aspectRatio: i,
|
|
681
|
+
padding: u,
|
|
682
|
+
valueLabel: g,
|
|
683
|
+
options: E,
|
|
684
|
+
rawOptions: v
|
|
685
|
+
},
|
|
686
|
+
tokens: P,
|
|
687
|
+
extra: D
|
|
688
|
+
}), t[6] = i, t[7] = s, t[8] = b, t[9] = o, t[10] = E, t[11] = u, t[12] = v, t[13] = l, t[14] = P, t[15] = g, t[16] = y;
|
|
689
|
+
} else
|
|
690
|
+
y = t[16];
|
|
691
|
+
const C = y;
|
|
692
|
+
let x;
|
|
693
|
+
t[17] !== r ? (x = ie(r), t[17] = r, t[18] = x) : x = t[18];
|
|
694
|
+
let A;
|
|
695
|
+
t[19] !== f || t[20] !== C || t[21] !== G ? (A = /* @__PURE__ */ j.jsx(M, { kind: "radar", data: f, options: C, plugins: G }), t[19] = f, t[20] = C, t[21] = G, t[22] = A) : A = t[22];
|
|
696
|
+
let B;
|
|
697
|
+
return t[23] !== m || t[24] !== d || t[25] !== s || t[26] !== h || t[27] !== x || t[28] !== A ? (B = /* @__PURE__ */ j.jsx(I, { height: s, loading: h, empty: d, isEmpty: x, className: m, children: A }), t[23] = m, t[24] = d, t[25] = s, t[26] = h, t[27] = x, t[28] = A, t[29] = B) : B = t[29], B;
|
|
698
|
+
}, Ae = (e) => {
|
|
699
|
+
const t = _.c(3), {
|
|
700
|
+
value: r,
|
|
701
|
+
children: o
|
|
702
|
+
} = e;
|
|
703
|
+
let n;
|
|
704
|
+
return t[0] !== o || t[1] !== r ? (n = /* @__PURE__ */ j.jsx(it, { value: r, children: o }), t[0] = o, t[1] = r, t[2] = n) : n = t[2], n;
|
|
534
705
|
};
|
|
535
706
|
export {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
707
|
+
ye as BarChart,
|
|
708
|
+
Ae as ChartThemeProvider,
|
|
709
|
+
Ce as DoughnutChart,
|
|
710
|
+
fe as LineChart,
|
|
711
|
+
be as PieChart,
|
|
712
|
+
xe as RadarChart
|
|
541
713
|
};
|