@actioneer/ads 0.5.8 → 0.6.0
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/components/assistant-ui/composer-harness.js +12 -10
- package/components/avatar.d.ts +1 -0
- package/components/avatar.js +5 -4
- package/components/breadcrumbs.d.ts +3 -1
- package/components/breadcrumbs.js +62 -56
- package/components/button.js +11 -11
- package/components/card.js +19 -18
- package/components/chart.d.ts +6 -0
- package/components/chart.js +747 -657
- package/components/date-range-picker.d.ts +25 -0
- package/components/date-range-picker.js +187 -0
- package/components/drawer.d.ts +3 -1
- package/components/drawer.js +115 -95
- package/components/index.d.ts +1 -0
- package/components/index.js +499 -497
- package/components/modal.d.ts +5 -1
- package/components/modal.js +74 -61
- package/components/panel.js +31 -28
- package/components/pixel-icon.d.ts +4 -0
- package/components/pixel-icon.js +210 -163
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +31 -28
- package/components/select.d.ts +5 -0
- package/components/select.js +177 -132
- package/components/table.d.ts +7 -0
- package/components/table.js +183 -173
- package/components/tabs.js +1 -1
- package/components/tree.js +86 -58
- package/components/viz-charts.js +186 -183
- package/demo/components/add-to-artifact.js +131 -107
- package/demo/lib/artifact-library.js +37 -29
- package/demo/lib/artifact-pin-guard.js +12 -0
- package/fonts.css +2 -0
- package/lib/icons.d.ts +20 -0
- package/lib/icons.js +112 -107
- package/llms.txt +23 -3
- package/manifest.json +13774 -14
- package/package.json +4 -1
- package/styles.css +76 -60
- package/theme.css +70 -57
package/components/chart.js
CHANGED
|
@@ -1,174 +1,188 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { ResponsiveContainer as j, LineChart as
|
|
5
|
-
import { MotionConfig as
|
|
2
|
+
import { jsxs as A, jsx as e, Fragment as K } from "react/jsx-runtime";
|
|
3
|
+
import * as R from "react";
|
|
4
|
+
import { ResponsiveContainer as j, LineChart as be, Tooltip as O, Line as se, AreaChart as pe, Area as Ne, CartesianGrid as te, XAxis as ne, YAxis as U, BarChart as we, Bar as ce, Cell as de, ComposedChart as Ae, ScatterChart as Ce, Scatter as ye, PieChart as Re, Pie as ke, RadarChart as Me, PolarGrid as $e, PolarAngleAxis as ue, PolarRadiusAxis as Se, Radar as Le, RadialBarChart as Fe, RadialBar as Oe, Treemap as Te, ReferenceArea as Ie, ReferenceLine as Be, ReferenceDot as De } from "recharts";
|
|
5
|
+
import { MotionConfig as Ee, AnimatePresence as We, motion as ze } from "motion/react";
|
|
6
6
|
import { cn as $ } from "../lib/cn.js";
|
|
7
7
|
import { floatVariants as je } from "../lib/motion.js";
|
|
8
|
-
const
|
|
8
|
+
const V = (t) => `var(--color-chart-${t % 6 + 1})`, ee = (t) => V(t), re = "var(--chart-context)", Y = 2.5, He = 2.5, W = {
|
|
9
9
|
primary: { ref: "var(--brand)", pill: "bg-fill text-fill-foreground" },
|
|
10
10
|
success: { ref: "var(--color-success-600)", pill: "bg-success-50 text-success-700" },
|
|
11
11
|
warning: { ref: "var(--color-warning-500)", pill: "bg-warning-50 text-warning-700" },
|
|
12
12
|
danger: { ref: "var(--color-danger-500)", pill: "bg-danger-50 text-danger-700" },
|
|
13
13
|
info: { ref: "var(--color-info-500)", pill: "bg-info-50 text-info-700" }
|
|
14
|
-
}, F = (t) => new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 }).format(t),
|
|
15
|
-
const
|
|
16
|
-
for (const
|
|
17
|
-
for (const o of Object.keys(
|
|
18
|
-
o !== r && typeof
|
|
19
|
-
return
|
|
14
|
+
}, F = (t) => new Intl.NumberFormat("en-US", { notation: "compact", maximumFractionDigits: 1 }).format(t), me = (t, r) => {
|
|
15
|
+
const a = [];
|
|
16
|
+
for (const i of t)
|
|
17
|
+
for (const o of Object.keys(i))
|
|
18
|
+
o !== r && typeof i[o] == "number" && !a.includes(o) && a.push(o);
|
|
19
|
+
return a;
|
|
20
20
|
};
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */ e("text", { x: t, y: r, dy: o, textAnchor:
|
|
21
|
+
function D({ x: t, y: r, payload: a, anchor: i, dy: o, format: n }) {
|
|
22
|
+
const l = (a == null ? void 0 : a.value) ?? "", x = n ? n(l) : l;
|
|
23
|
+
return /* @__PURE__ */ e("text", { x: t, y: r, dy: o, textAnchor: i, className: "fill-tertiary text-xs tabular-nums", children: x });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function fe({
|
|
26
26
|
x: t,
|
|
27
27
|
y: r,
|
|
28
|
-
value:
|
|
29
|
-
hidden:
|
|
30
|
-
|
|
28
|
+
value: a,
|
|
29
|
+
hidden: i,
|
|
30
|
+
color: o,
|
|
31
|
+
format: n
|
|
31
32
|
}) {
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
return Number.isNaN(
|
|
33
|
+
if (i || t == null || r == null || a == null || a === "") return null;
|
|
34
|
+
const l = Number(a);
|
|
35
|
+
return Number.isNaN(l) ? null : /* @__PURE__ */ e(
|
|
35
36
|
"text",
|
|
36
37
|
{
|
|
37
38
|
x: Number(t),
|
|
38
39
|
y: Number(r) - 10,
|
|
39
40
|
textAnchor: "middle",
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
fill: o,
|
|
42
|
+
className: $(!o && "fill-secondary", "text-xs tabular-nums"),
|
|
43
|
+
children: n(l)
|
|
42
44
|
}
|
|
43
45
|
);
|
|
44
46
|
}
|
|
45
|
-
function
|
|
47
|
+
function E({
|
|
48
|
+
cx: t,
|
|
49
|
+
cy: r,
|
|
50
|
+
color: a,
|
|
51
|
+
active: i = !1
|
|
52
|
+
}) {
|
|
53
|
+
return t == null || r == null ? null : /* @__PURE__ */ e(
|
|
54
|
+
"circle",
|
|
55
|
+
{
|
|
56
|
+
"aria-hidden": !0,
|
|
57
|
+
cx: t,
|
|
58
|
+
cy: r,
|
|
59
|
+
r: i ? 5.5 : 4,
|
|
60
|
+
fill: "var(--background)",
|
|
61
|
+
stroke: a,
|
|
62
|
+
strokeWidth: i ? 3 : He
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function Pe({
|
|
46
67
|
x: t,
|
|
47
68
|
y: r,
|
|
48
|
-
width:
|
|
49
|
-
height:
|
|
69
|
+
width: a,
|
|
70
|
+
height: i,
|
|
50
71
|
value: o,
|
|
51
|
-
format:
|
|
52
|
-
horizontal:
|
|
72
|
+
format: n,
|
|
73
|
+
horizontal: l
|
|
53
74
|
}) {
|
|
54
75
|
if (t == null || r == null || o == null || o === "") return null;
|
|
55
|
-
const
|
|
56
|
-
if (Number.isNaN(
|
|
57
|
-
const c = Number(t),
|
|
58
|
-
return
|
|
76
|
+
const x = Number(o);
|
|
77
|
+
if (Number.isNaN(x)) return null;
|
|
78
|
+
const c = Number(t), m = Number(r), u = Number(a ?? 0), N = Number(i ?? 0);
|
|
79
|
+
return l ? /* @__PURE__ */ e(
|
|
59
80
|
"text",
|
|
60
81
|
{
|
|
61
|
-
x: c +
|
|
62
|
-
y:
|
|
82
|
+
x: c + u + 8,
|
|
83
|
+
y: m + N / 2,
|
|
63
84
|
dy: "0.32em",
|
|
64
85
|
textAnchor: "start",
|
|
65
86
|
className: "fill-secondary text-xs tabular-nums",
|
|
66
|
-
children:
|
|
87
|
+
children: n(x)
|
|
67
88
|
}
|
|
68
89
|
) : /* @__PURE__ */ e(
|
|
69
90
|
"text",
|
|
70
91
|
{
|
|
71
|
-
x: c +
|
|
72
|
-
y:
|
|
92
|
+
x: c + u / 2,
|
|
93
|
+
y: m - 8,
|
|
73
94
|
textAnchor: "middle",
|
|
74
95
|
className: "fill-secondary text-xs tabular-nums",
|
|
75
|
-
children:
|
|
96
|
+
children: n(x)
|
|
76
97
|
}
|
|
77
98
|
);
|
|
78
99
|
}
|
|
79
|
-
function
|
|
80
|
-
cx: t,
|
|
81
|
-
cy: r,
|
|
82
|
-
fill: n
|
|
83
|
-
}) {
|
|
84
|
-
return t == null || r == null ? null : /* @__PURE__ */ e("circle", { cx: t, cy: r, r: 4.5, fill: n, stroke: "var(--background)", strokeWidth: 2 });
|
|
85
|
-
}
|
|
86
|
-
function O({
|
|
100
|
+
function T({
|
|
87
101
|
active: t,
|
|
88
102
|
payload: r,
|
|
89
|
-
label:
|
|
90
|
-
format:
|
|
103
|
+
label: a,
|
|
104
|
+
format: i,
|
|
91
105
|
labelKey: o,
|
|
92
|
-
renderer:
|
|
106
|
+
renderer: n
|
|
93
107
|
}) {
|
|
94
|
-
var
|
|
95
|
-
const
|
|
96
|
-
const
|
|
108
|
+
var N, b;
|
|
109
|
+
const l = (r ?? []).map((f, y) => {
|
|
110
|
+
const C = f.payload && typeof f.payload == "object" ? f.payload : void 0;
|
|
97
111
|
return {
|
|
98
|
-
key:
|
|
99
|
-
name:
|
|
100
|
-
value:
|
|
101
|
-
color:
|
|
102
|
-
datum:
|
|
112
|
+
key: f.dataKey ?? y,
|
|
113
|
+
name: f.name ?? f.dataKey ?? y,
|
|
114
|
+
value: f.value,
|
|
115
|
+
color: f.color,
|
|
116
|
+
datum: C
|
|
103
117
|
};
|
|
104
|
-
}),
|
|
118
|
+
}), x = o ? (b = (N = l[0]) == null ? void 0 : N.datum) == null ? void 0 : b[o] : void 0, c = {
|
|
105
119
|
active: !!t,
|
|
106
|
-
label: typeof
|
|
107
|
-
items:
|
|
108
|
-
formatValue:
|
|
120
|
+
label: typeof x == "string" || typeof x == "number" ? x : a,
|
|
121
|
+
items: l,
|
|
122
|
+
formatValue: i
|
|
109
123
|
};
|
|
110
|
-
if (
|
|
111
|
-
if (!c.active || !
|
|
112
|
-
const
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */ e("div", { className: $("text-xs font-normal tracking-wide uppercase text-background/60", !
|
|
115
|
-
|
|
116
|
-
!
|
|
117
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background:
|
|
118
|
-
/* @__PURE__ */ e("span", { className: "text-background/70", children:
|
|
124
|
+
if (n) return /* @__PURE__ */ e(K, { children: n(c) });
|
|
125
|
+
if (!c.active || !l.length) return null;
|
|
126
|
+
const m = l.length === 1, u = c.label ?? (m ? l[0].name : void 0);
|
|
127
|
+
return /* @__PURE__ */ A("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background", children: [
|
|
128
|
+
/* @__PURE__ */ e("div", { className: $("text-xs font-normal tracking-wide uppercase text-background/60", !m && "mb-1"), children: u }),
|
|
129
|
+
l.map((f) => /* @__PURE__ */ A("div", { className: "flex items-center gap-1.5", children: [
|
|
130
|
+
!m && /* @__PURE__ */ A(K, { children: [
|
|
131
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-1.5 rounded-dot", style: { background: f.color } }),
|
|
132
|
+
/* @__PURE__ */ e("span", { className: "text-background/70", children: f.name })
|
|
119
133
|
] }),
|
|
120
|
-
/* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-normal tabular-nums", children: typeof
|
|
121
|
-
] },
|
|
134
|
+
/* @__PURE__ */ e("span", { className: "ml-auto pl-3 font-normal tabular-nums", children: typeof f.value == "number" ? i(f.value) : String(f.value ?? "") })
|
|
135
|
+
] }, f.key))
|
|
122
136
|
] });
|
|
123
137
|
}
|
|
124
|
-
const
|
|
125
|
-
function
|
|
138
|
+
const he = "pointer-events-none inline-flex min-h-4 items-center rounded-full px-2 py-0.5 text-xs font-normal whitespace-nowrap";
|
|
139
|
+
function _e({
|
|
126
140
|
viewBox: t,
|
|
127
141
|
label: r,
|
|
128
|
-
value:
|
|
129
|
-
color:
|
|
142
|
+
value: a,
|
|
143
|
+
color: i,
|
|
130
144
|
axis: o
|
|
131
145
|
}) {
|
|
132
|
-
const
|
|
146
|
+
const n = t ?? {}, l = /* @__PURE__ */ A("span", { className: $(he, W[i].pill), children: [
|
|
133
147
|
r,
|
|
134
|
-
|
|
148
|
+
a != null && /* @__PURE__ */ e("span", { className: "ml-1 tabular-nums", children: a })
|
|
135
149
|
] });
|
|
136
|
-
return o === "y" ? /* @__PURE__ */ e("foreignObject", { x:
|
|
150
|
+
return o === "y" ? /* @__PURE__ */ e("foreignObject", { x: n.x ?? 0, y: (n.y ?? 0) - 12, width: n.width ?? 0, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-end pr-1", children: l }) }) : /* @__PURE__ */ e("foreignObject", { x: (n.x ?? 0) - 90, y: (n.y ?? 0) - 12, width: 180, height: 24, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: l }) });
|
|
137
151
|
}
|
|
138
|
-
function
|
|
139
|
-
const
|
|
140
|
-
return /* @__PURE__ */ e("foreignObject", { x:
|
|
152
|
+
function Ge({ viewBox: t, label: r, color: a }) {
|
|
153
|
+
const i = t ?? {};
|
|
154
|
+
return /* @__PURE__ */ e("foreignObject", { x: i.x ?? 0, y: i.y ?? 0, width: i.width ?? 0, height: 28, className: "overflow-visible", children: /* @__PURE__ */ e("div", { className: "flex h-full items-center pl-1.5", children: /* @__PURE__ */ e("span", { className: $(he, W[a].pill), children: r }) }) });
|
|
141
155
|
}
|
|
142
|
-
function
|
|
156
|
+
function Ue({
|
|
143
157
|
cx: t,
|
|
144
158
|
cy: r,
|
|
145
|
-
n,
|
|
146
|
-
ann:
|
|
159
|
+
n: a,
|
|
160
|
+
ann: i,
|
|
147
161
|
onEnter: o,
|
|
148
|
-
onLeave:
|
|
162
|
+
onLeave: n
|
|
149
163
|
}) {
|
|
150
|
-
const [
|
|
164
|
+
const [l, x] = R.useState(!1);
|
|
151
165
|
if (t == null || r == null || !Number.isFinite(t) || !Number.isFinite(r)) return /* @__PURE__ */ e("g", {});
|
|
152
|
-
const c = () => o({ ann:
|
|
153
|
-
return /* @__PURE__ */
|
|
166
|
+
const c = () => o({ ann: i, n: a, cx: t, cy: r }), m = () => n();
|
|
167
|
+
return /* @__PURE__ */ A(
|
|
154
168
|
"g",
|
|
155
169
|
{
|
|
156
170
|
tabIndex: 0,
|
|
157
171
|
role: "img",
|
|
158
|
-
"aria-label": `Annotation ${
|
|
172
|
+
"aria-label": `Annotation ${a}: ${i.label}`,
|
|
159
173
|
className: "cursor-default outline-none [transform-box:fill-box] origin-center transition-transform ease-out [transition-duration:150ms] hover:scale-110 focus-visible:scale-110 motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100",
|
|
160
174
|
onMouseEnter: c,
|
|
161
|
-
onMouseLeave:
|
|
175
|
+
onMouseLeave: m,
|
|
162
176
|
onFocus: () => {
|
|
163
|
-
|
|
177
|
+
x(!0), c();
|
|
164
178
|
},
|
|
165
179
|
onBlur: () => {
|
|
166
|
-
|
|
180
|
+
x(!1), m();
|
|
167
181
|
},
|
|
168
182
|
children: [
|
|
169
|
-
|
|
183
|
+
l && /* @__PURE__ */ e("circle", { cx: t, cy: r, r: 12, fill: "none", stroke: "var(--ring)", strokeWidth: 2 }),
|
|
170
184
|
/* @__PURE__ */ e("circle", { cx: t, cy: r, r: 10, fill: "var(--background)" }),
|
|
171
|
-
/* @__PURE__ */ e("circle", { cx: t, cy: r, r: 8, fill:
|
|
185
|
+
/* @__PURE__ */ e("circle", { cx: t, cy: r, r: 8, fill: W[i.color ?? "primary"].ref }),
|
|
172
186
|
/* @__PURE__ */ e(
|
|
173
187
|
"text",
|
|
174
188
|
{
|
|
@@ -177,15 +191,15 @@ function _e({
|
|
|
177
191
|
dy: "0.35em",
|
|
178
192
|
textAnchor: "middle",
|
|
179
193
|
className: "pointer-events-none fill-brand-foreground text-xs font-medium select-none",
|
|
180
|
-
children:
|
|
194
|
+
children: a
|
|
181
195
|
}
|
|
182
196
|
)
|
|
183
197
|
]
|
|
184
198
|
}
|
|
185
199
|
);
|
|
186
200
|
}
|
|
187
|
-
function
|
|
188
|
-
return /* @__PURE__ */ e(
|
|
201
|
+
function Ve({ hovered: t, frameWidth: r, format: a }) {
|
|
202
|
+
return /* @__PURE__ */ e(Ee, { reducedMotion: "user", children: /* @__PURE__ */ e(We, { children: t && /* @__PURE__ */ e(
|
|
189
203
|
"div",
|
|
190
204
|
{
|
|
191
205
|
className: "pointer-events-none absolute z-10",
|
|
@@ -193,8 +207,8 @@ function Ge({ hovered: t, frameWidth: r, format: n }) {
|
|
|
193
207
|
left: Math.max(96, Math.min(t.cx, Math.max(r - 96, 96))),
|
|
194
208
|
top: t.cy - 16
|
|
195
209
|
},
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
|
|
210
|
+
children: /* @__PURE__ */ A(
|
|
211
|
+
ze.div,
|
|
198
212
|
{
|
|
199
213
|
variants: je,
|
|
200
214
|
initial: "hidden",
|
|
@@ -202,23 +216,23 @@ function Ge({ hovered: t, frameWidth: r, format: n }) {
|
|
|
202
216
|
exit: "hidden",
|
|
203
217
|
className: "w-max max-w-60 -translate-x-1/2 -translate-y-full origin-bottom rounded-lg bg-elevated p-3 shadow-elevation",
|
|
204
218
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
|
|
206
220
|
/* @__PURE__ */ e(
|
|
207
221
|
"span",
|
|
208
222
|
{
|
|
209
223
|
"aria-hidden": !0,
|
|
210
224
|
className: "flex size-4.5 shrink-0 items-center justify-center rounded-full text-xs font-medium text-brand-foreground",
|
|
211
|
-
style: { background:
|
|
225
|
+
style: { background: W[t.ann.color ?? "primary"].ref },
|
|
212
226
|
children: t.n
|
|
213
227
|
}
|
|
214
228
|
),
|
|
215
229
|
/* @__PURE__ */ e("span", { className: "text-xs font-normal text-foreground", children: t.ann.label })
|
|
216
230
|
] }),
|
|
217
231
|
t.ann.description && /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs leading-relaxed text-secondary", children: t.ann.description }),
|
|
218
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ A("div", { className: "mt-1.5 text-xs font-normal tracking-wide uppercase text-tertiary tabular-nums", children: [
|
|
219
233
|
t.ann.x,
|
|
220
234
|
" · ",
|
|
221
|
-
|
|
235
|
+
a(t.ann.y)
|
|
222
236
|
] })
|
|
223
237
|
]
|
|
224
238
|
}
|
|
@@ -226,299 +240,362 @@ function Ge({ hovered: t, frameWidth: r, format: n }) {
|
|
|
226
240
|
}
|
|
227
241
|
) }) });
|
|
228
242
|
}
|
|
229
|
-
function
|
|
230
|
-
const [
|
|
231
|
-
const
|
|
232
|
-
let
|
|
233
|
-
return (t ?? []).forEach((
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
const
|
|
237
|
-
|
|
243
|
+
function xe(t, r) {
|
|
244
|
+
const [a, i] = R.useState(null), o = R.useCallback(() => i(null), []), { back: n, front: l } = R.useMemo(() => {
|
|
245
|
+
const x = [], c = [];
|
|
246
|
+
let m = 0;
|
|
247
|
+
return (t ?? []).forEach((u, N) => {
|
|
248
|
+
const b = u.color ?? "primary";
|
|
249
|
+
if (u.kind === "band") {
|
|
250
|
+
const f = u.axis ?? "y";
|
|
251
|
+
x.push(
|
|
238
252
|
/* @__PURE__ */ e(
|
|
239
|
-
|
|
253
|
+
Ie,
|
|
240
254
|
{
|
|
241
|
-
...
|
|
242
|
-
fill:
|
|
255
|
+
...f === "y" ? { y1: u.from, y2: u.to } : { x1: u.from, x2: u.to },
|
|
256
|
+
fill: W[b].ref,
|
|
243
257
|
fillOpacity: 0.06,
|
|
244
258
|
stroke: "none",
|
|
245
|
-
ifOverflow:
|
|
246
|
-
label:
|
|
259
|
+
ifOverflow: f === "y" ? "extendDomain" : "visible",
|
|
260
|
+
label: u.label ? /* @__PURE__ */ e(Ge, { label: u.label, color: b }) : void 0
|
|
247
261
|
},
|
|
248
|
-
`ann-${
|
|
262
|
+
`ann-${N}`
|
|
249
263
|
)
|
|
250
264
|
);
|
|
251
|
-
} else if (
|
|
252
|
-
const
|
|
265
|
+
} else if (u.kind === "line") {
|
|
266
|
+
const f = u.axis ?? "y";
|
|
253
267
|
c.push(
|
|
254
268
|
/* @__PURE__ */ e(
|
|
255
|
-
|
|
269
|
+
Be,
|
|
256
270
|
{
|
|
257
|
-
...
|
|
258
|
-
stroke:
|
|
271
|
+
...f === "y" ? { y: u.value } : { x: u.value },
|
|
272
|
+
stroke: W[b].ref,
|
|
259
273
|
strokeWidth: 1,
|
|
260
274
|
strokeDasharray: "4 4",
|
|
261
|
-
ifOverflow:
|
|
262
|
-
label:
|
|
263
|
-
|
|
275
|
+
ifOverflow: f === "y" ? "extendDomain" : "visible",
|
|
276
|
+
label: u.label ? /* @__PURE__ */ e(
|
|
277
|
+
_e,
|
|
264
278
|
{
|
|
265
|
-
label:
|
|
266
|
-
value: typeof
|
|
267
|
-
color:
|
|
268
|
-
axis:
|
|
279
|
+
label: u.label,
|
|
280
|
+
value: typeof u.value == "number" ? r(u.value) : String(u.value),
|
|
281
|
+
color: b,
|
|
282
|
+
axis: f
|
|
269
283
|
}
|
|
270
284
|
) : void 0
|
|
271
285
|
},
|
|
272
|
-
`ann-${
|
|
286
|
+
`ann-${N}`
|
|
273
287
|
)
|
|
274
288
|
);
|
|
275
289
|
} else {
|
|
276
|
-
|
|
277
|
-
const
|
|
290
|
+
m += 1;
|
|
291
|
+
const f = m;
|
|
278
292
|
c.push(
|
|
279
293
|
/* @__PURE__ */ e(
|
|
280
|
-
|
|
294
|
+
De,
|
|
281
295
|
{
|
|
282
|
-
x:
|
|
283
|
-
y:
|
|
296
|
+
x: u.x,
|
|
297
|
+
y: u.y,
|
|
284
298
|
ifOverflow: "visible",
|
|
285
|
-
shape: (
|
|
299
|
+
shape: (y) => /* @__PURE__ */ e(Ue, { cx: y.cx, cy: y.cy, n: f, ann: u, onEnter: i, onLeave: o })
|
|
286
300
|
},
|
|
287
|
-
`ann-${
|
|
301
|
+
`ann-${N}`
|
|
288
302
|
)
|
|
289
303
|
);
|
|
290
304
|
}
|
|
291
|
-
}), { back:
|
|
305
|
+
}), { back: x, front: c };
|
|
292
306
|
}, [t, r, o]);
|
|
293
|
-
return { back:
|
|
307
|
+
return { back: n, front: l, hovered: a };
|
|
294
308
|
}
|
|
295
|
-
function
|
|
309
|
+
function X({
|
|
296
310
|
items: t,
|
|
297
311
|
align: r = "end",
|
|
298
|
-
className:
|
|
312
|
+
className: a,
|
|
313
|
+
onToggle: i
|
|
299
314
|
}) {
|
|
300
|
-
const
|
|
315
|
+
const o = {
|
|
301
316
|
start: "justify-start",
|
|
302
317
|
center: "justify-center",
|
|
303
318
|
end: "justify-end"
|
|
304
319
|
}[r];
|
|
305
|
-
return /* @__PURE__ */ e("div", { className: $("mb-3 flex flex-wrap items-center gap-x-4 gap-y-1",
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
320
|
+
return /* @__PURE__ */ e("div", { className: $("mb-3 flex flex-wrap items-center gap-x-4 gap-y-1", o, a), children: t.map(
|
|
321
|
+
(n) => i && n.key !== void 0 ? /* @__PURE__ */ A(
|
|
322
|
+
"button",
|
|
323
|
+
{
|
|
324
|
+
type: "button",
|
|
325
|
+
"aria-pressed": !n.hidden,
|
|
326
|
+
"aria-label": `Toggle ${n.label} series`,
|
|
327
|
+
onClick: () => i(n.key),
|
|
328
|
+
className: $(
|
|
329
|
+
"inline-flex cursor-pointer items-center gap-1.5 rounded-sm text-xs outline-none",
|
|
330
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none",
|
|
331
|
+
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
332
|
+
n.hidden ? "text-tertiary" : "text-secondary hover:text-foreground"
|
|
333
|
+
),
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ e(
|
|
336
|
+
"span",
|
|
337
|
+
{
|
|
338
|
+
"aria-hidden": !0,
|
|
339
|
+
className: $(
|
|
340
|
+
"size-2 rounded-dot transition-opacity duration-150 ease-out motion-reduce:transition-none",
|
|
341
|
+
n.hidden && "opacity-25"
|
|
342
|
+
),
|
|
343
|
+
style: { background: n.color }
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
n.label
|
|
347
|
+
]
|
|
348
|
+
},
|
|
349
|
+
n.label
|
|
350
|
+
) : /* @__PURE__ */ A("span", { className: "inline-flex items-center gap-1.5 text-xs text-secondary", children: [
|
|
351
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "size-2 rounded-dot", style: { background: n.color } }),
|
|
352
|
+
n.label
|
|
353
|
+
] }, n.label)
|
|
354
|
+
) });
|
|
309
355
|
}
|
|
310
|
-
const
|
|
311
|
-
({ className: t, height: r, legendItems:
|
|
312
|
-
var
|
|
313
|
-
const
|
|
314
|
-
return /* @__PURE__ */
|
|
315
|
-
|
|
316
|
-
}, className: $("relative w-full font-sans", t), ...
|
|
317
|
-
|
|
318
|
-
/* @__PURE__ */ e(j, { width: "100%", height: Math.max(r,
|
|
319
|
-
/* @__PURE__ */ e(
|
|
356
|
+
const z = R.forwardRef(
|
|
357
|
+
({ className: t, height: r, legendItems: a, hovered: i, format: o, onLegendToggle: n, children: l, ...x }, c) => {
|
|
358
|
+
var N;
|
|
359
|
+
const m = R.useRef(null);
|
|
360
|
+
return /* @__PURE__ */ A("div", { ref: (b) => {
|
|
361
|
+
m.current = b, typeof c == "function" ? c(b) : c && (c.current = b);
|
|
362
|
+
}, className: $("relative w-full font-sans", t), ...x, children: [
|
|
363
|
+
a && /* @__PURE__ */ e(X, { items: a, onToggle: n }),
|
|
364
|
+
/* @__PURE__ */ e(j, { width: "100%", height: Math.max(r, I), children: l }),
|
|
365
|
+
/* @__PURE__ */ e(Ve, { hovered: i, frameWidth: ((N = m.current) == null ? void 0 : N.clientWidth) ?? 0, format: o })
|
|
320
366
|
] });
|
|
321
367
|
}
|
|
322
368
|
);
|
|
323
|
-
|
|
324
|
-
function
|
|
369
|
+
z.displayName = "ChartFrame";
|
|
370
|
+
function Z(t) {
|
|
325
371
|
const {
|
|
326
372
|
data: r,
|
|
327
|
-
categoryKey:
|
|
328
|
-
series:
|
|
373
|
+
categoryKey: a,
|
|
374
|
+
series: i,
|
|
329
375
|
seriesLabels: o,
|
|
330
|
-
highlight:
|
|
331
|
-
annotations:
|
|
332
|
-
grid:
|
|
376
|
+
highlight: n,
|
|
377
|
+
annotations: l,
|
|
378
|
+
grid: x = !1,
|
|
333
379
|
legend: c,
|
|
334
|
-
showYAxis:
|
|
335
|
-
formatValue:
|
|
336
|
-
xScale:
|
|
337
|
-
xDomain:
|
|
338
|
-
yDomain:
|
|
339
|
-
xTickFormatter:
|
|
340
|
-
yTickFormatter:
|
|
341
|
-
yAxisWidth:
|
|
342
|
-
} = t, p =
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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
|
-
|
|
376
|
-
|
|
377
|
-
|
|
380
|
+
showYAxis: m = !0,
|
|
381
|
+
formatValue: u,
|
|
382
|
+
xScale: N = "category",
|
|
383
|
+
xDomain: b,
|
|
384
|
+
yDomain: f,
|
|
385
|
+
xTickFormatter: y,
|
|
386
|
+
yTickFormatter: C,
|
|
387
|
+
yAxisWidth: w = 44
|
|
388
|
+
} = t, p = R.useMemo(() => i ?? me(r, a), [i, r, a]), h = u ?? F, k = C ?? ((M) => typeof M == "number" ? h(M) : M), d = xe(l, h), s = (M, B) => n && p.includes(n) ? M === n ? "var(--color-chart-1)" : re : V(B), v = (M) => (o == null ? void 0 : o[M]) ?? M, [g, S] = R.useState(
|
|
389
|
+
() => /* @__PURE__ */ new Set()
|
|
390
|
+
), L = R.useCallback((M) => {
|
|
391
|
+
S((B) => {
|
|
392
|
+
const _ = new Set(B);
|
|
393
|
+
return _.has(M) ? _.delete(M) : _.add(M), _;
|
|
394
|
+
});
|
|
395
|
+
}, []), P = (M) => g.has(M), Q = c ?? p.length > 1 ? p.map((M, B) => ({
|
|
396
|
+
key: M,
|
|
397
|
+
label: v(M),
|
|
398
|
+
color: s(M, B),
|
|
399
|
+
hidden: g.has(M)
|
|
400
|
+
})) : null;
|
|
401
|
+
return {
|
|
402
|
+
names: p,
|
|
403
|
+
format: h,
|
|
404
|
+
layers: d,
|
|
405
|
+
legendItems: Q,
|
|
406
|
+
furniture: [
|
|
407
|
+
/* Gridlines one step below the border token — guides, not content. */
|
|
408
|
+
x ? /* @__PURE__ */ e(te, { vertical: !1, stroke: "var(--chart-grid)" }, "grid") : null,
|
|
409
|
+
/* @__PURE__ */ e(
|
|
410
|
+
ne,
|
|
411
|
+
{
|
|
412
|
+
dataKey: a,
|
|
413
|
+
type: N === "time" ? "number" : "category",
|
|
414
|
+
scale: N === "time" ? "time" : "auto",
|
|
415
|
+
domain: N === "time" ? b ?? ["dataMin", "dataMax"] : b,
|
|
416
|
+
allowDataOverflow: !!b,
|
|
417
|
+
axisLine: { stroke: "var(--chart-axis)" },
|
|
418
|
+
tickLine: !1,
|
|
419
|
+
minTickGap: 28,
|
|
420
|
+
tickMargin: 24,
|
|
421
|
+
padding: { left: 16, right: 16 },
|
|
422
|
+
height: 40,
|
|
423
|
+
tick: /* @__PURE__ */ e(D, { anchor: "middle", dy: 0, format: y })
|
|
424
|
+
},
|
|
425
|
+
"x"
|
|
426
|
+
),
|
|
427
|
+
m ? /* @__PURE__ */ e(
|
|
428
|
+
U,
|
|
429
|
+
{
|
|
430
|
+
width: w,
|
|
431
|
+
domain: f,
|
|
432
|
+
allowDataOverflow: !!f,
|
|
433
|
+
axisLine: { stroke: "var(--chart-axis)" },
|
|
434
|
+
tickLine: !1,
|
|
435
|
+
tickMargin: 12,
|
|
436
|
+
tick: /* @__PURE__ */ e(D, { anchor: "end", dy: "0.32em", format: k })
|
|
437
|
+
},
|
|
438
|
+
"y"
|
|
439
|
+
) : null
|
|
440
|
+
],
|
|
441
|
+
colorFor: s,
|
|
442
|
+
labelFor: v,
|
|
443
|
+
toggleSeries: L,
|
|
444
|
+
isHidden: P
|
|
445
|
+
};
|
|
378
446
|
}
|
|
379
|
-
const
|
|
380
|
-
function
|
|
381
|
-
if (
|
|
382
|
-
if (
|
|
383
|
-
if (
|
|
384
|
-
const
|
|
385
|
-
return /* @__PURE__ */ new Set([
|
|
447
|
+
const I = 300, H = { top: 24, right: 12, bottom: 8, left: 0 };
|
|
448
|
+
function ae(t, r, a, i) {
|
|
449
|
+
if (i === !0) return new Set(t);
|
|
450
|
+
if (i === !1) return /* @__PURE__ */ new Set();
|
|
451
|
+
if (a && t.includes(a)) {
|
|
452
|
+
const n = (r ?? []).filter((l) => l !== a);
|
|
453
|
+
return /* @__PURE__ */ new Set([a, ...n]);
|
|
386
454
|
}
|
|
387
|
-
return t.filter((
|
|
455
|
+
return t.filter((n) => !(r != null && r.includes(n))).length === 1 ? new Set(t) : /* @__PURE__ */ new Set();
|
|
388
456
|
}
|
|
389
|
-
function
|
|
390
|
-
return
|
|
391
|
-
(
|
|
392
|
-
if (!(r != null && r.includes(
|
|
393
|
-
const
|
|
394
|
-
return
|
|
457
|
+
function ge(t, r, a) {
|
|
458
|
+
return R.useCallback(
|
|
459
|
+
(i, o) => {
|
|
460
|
+
if (!(r != null && r.includes(i))) return a(i, o);
|
|
461
|
+
const n = t.filter((x) => !r.includes(x)), l = n[r.indexOf(i)] ?? n[0];
|
|
462
|
+
return l ? a(l, t.indexOf(l)) : a(i, o);
|
|
395
463
|
},
|
|
396
|
-
[t, r,
|
|
464
|
+
[t, r, a]
|
|
397
465
|
);
|
|
398
466
|
}
|
|
399
|
-
const
|
|
467
|
+
const Ye = R.forwardRef(
|
|
400
468
|
// Straight segments by default: the house line is a solid stroke with a DOT
|
|
401
469
|
// at every observation — the data points are visible, the path connects them
|
|
402
470
|
// without inventing values between them.
|
|
403
471
|
// A smooth curve invents values between observations; opt back in with
|
|
404
472
|
// `curve="natural"` when the interpolation is the point.
|
|
405
|
-
({ height: t =
|
|
406
|
-
const { names:
|
|
407
|
-
return /* @__PURE__ */ e(
|
|
408
|
-
|
|
473
|
+
({ height: t = I, curve: r = "linear", forecastKeys: a, animatedSeriesKeys: i, showValues: o, className: n, ...l }, x) => {
|
|
474
|
+
const { names: c, format: m, layers: u, legendItems: N, furniture: b, colorFor: f, labelFor: y, toggleSeries: C, isHidden: w } = Z(l), p = ge(c, a, f), h = ae(c, a, l.highlight, o), [k, d] = R.useState(null);
|
|
475
|
+
return /* @__PURE__ */ e(z, { ref: x, className: n, height: t, legendItems: N, hovered: u.hovered, format: m, onLegendToggle: C, children: /* @__PURE__ */ A(
|
|
476
|
+
be,
|
|
409
477
|
{
|
|
410
|
-
data:
|
|
411
|
-
margin:
|
|
412
|
-
onMouseMove: (
|
|
413
|
-
onMouseLeave: () =>
|
|
478
|
+
data: l.data,
|
|
479
|
+
margin: H,
|
|
480
|
+
onMouseMove: (s) => d((s == null ? void 0 : s.activeTooltipIndex) ?? null),
|
|
481
|
+
onMouseLeave: () => d(null),
|
|
414
482
|
children: [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
483
|
+
b,
|
|
484
|
+
l.tooltip !== !1 && /* @__PURE__ */ e(
|
|
485
|
+
O,
|
|
418
486
|
{
|
|
419
487
|
content: /* @__PURE__ */ e(
|
|
420
|
-
|
|
488
|
+
T,
|
|
421
489
|
{
|
|
422
|
-
format:
|
|
423
|
-
renderer:
|
|
490
|
+
format: m,
|
|
491
|
+
renderer: l.tooltip
|
|
424
492
|
}
|
|
425
493
|
),
|
|
426
494
|
cursor: { stroke: "var(--border-strong)" },
|
|
427
495
|
isAnimationActive: !1
|
|
428
496
|
}
|
|
429
497
|
),
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
498
|
+
u.back,
|
|
499
|
+
c.map((s, v) => /* @__PURE__ */ e(
|
|
500
|
+
se,
|
|
433
501
|
{
|
|
434
|
-
dataKey:
|
|
435
|
-
name:
|
|
502
|
+
dataKey: s,
|
|
503
|
+
name: y(s),
|
|
436
504
|
type: r,
|
|
437
|
-
stroke:
|
|
438
|
-
strokeWidth:
|
|
439
|
-
strokeDasharray:
|
|
440
|
-
dot:
|
|
441
|
-
activeDot: /* @__PURE__ */ e(
|
|
442
|
-
label:
|
|
443
|
-
|
|
505
|
+
stroke: p(s, v),
|
|
506
|
+
strokeWidth: Y,
|
|
507
|
+
strokeDasharray: a != null && a.includes(s) ? "6 4" : void 0,
|
|
508
|
+
dot: /* @__PURE__ */ e(E, { color: p(s, v) }),
|
|
509
|
+
activeDot: /* @__PURE__ */ e(E, { color: p(s, v), active: !0 }),
|
|
510
|
+
label: h.has(s) ? /* @__PURE__ */ e(
|
|
511
|
+
fe,
|
|
512
|
+
{
|
|
513
|
+
color: p(s, v),
|
|
514
|
+
format: m,
|
|
515
|
+
hidden: k != null
|
|
516
|
+
}
|
|
517
|
+
) : void 0,
|
|
518
|
+
hide: w(s),
|
|
519
|
+
isAnimationActive: (i == null ? void 0 : i.includes(s)) ?? !1
|
|
444
520
|
},
|
|
445
|
-
|
|
521
|
+
s
|
|
446
522
|
)),
|
|
447
|
-
|
|
523
|
+
u.front
|
|
448
524
|
]
|
|
449
525
|
}
|
|
450
526
|
) });
|
|
451
527
|
}
|
|
452
528
|
);
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
({ height: t =
|
|
456
|
-
const { names: c, format:
|
|
457
|
-
return /* @__PURE__ */ e(
|
|
458
|
-
|
|
529
|
+
Ye.displayName = "LineChart";
|
|
530
|
+
const Xe = R.forwardRef(
|
|
531
|
+
({ height: t = I, curve: r = "linear", stacked: a = !1, forecastKeys: i, showValues: o, className: n, ...l }, x) => {
|
|
532
|
+
const { names: c, format: m, layers: u, legendItems: N, furniture: b, colorFor: f, labelFor: y, toggleSeries: C, isHidden: w } = Z(l), p = ge(c, i, f), h = a ? /* @__PURE__ */ new Set() : ae(c, i, l.highlight, o), [k, d] = R.useState(null), s = R.useId().replace(/[^a-zA-Z0-9]/g, "");
|
|
533
|
+
return /* @__PURE__ */ e(z, { ref: x, className: n, height: t, legendItems: N, hovered: u.hovered, format: m, onLegendToggle: C, children: /* @__PURE__ */ A(
|
|
534
|
+
pe,
|
|
459
535
|
{
|
|
460
|
-
data:
|
|
461
|
-
margin:
|
|
462
|
-
onMouseMove: (
|
|
463
|
-
onMouseLeave: () =>
|
|
536
|
+
data: l.data,
|
|
537
|
+
margin: H,
|
|
538
|
+
onMouseMove: (v) => d((v == null ? void 0 : v.activeTooltipIndex) ?? null),
|
|
539
|
+
onMouseLeave: () => d(null),
|
|
464
540
|
children: [
|
|
465
|
-
/* @__PURE__ */ e("defs", { children: c.map((
|
|
466
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
467
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
468
|
-
] },
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
541
|
+
/* @__PURE__ */ e("defs", { children: c.map((v, g) => /* @__PURE__ */ A("linearGradient", { id: `${s}-${g}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
542
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: f(v, g), stopOpacity: 0.18 }),
|
|
543
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: f(v, g), stopOpacity: 0.02 })
|
|
544
|
+
] }, v)) }),
|
|
545
|
+
b,
|
|
546
|
+
l.tooltip !== !1 && /* @__PURE__ */ e(
|
|
547
|
+
O,
|
|
472
548
|
{
|
|
473
549
|
content: /* @__PURE__ */ e(
|
|
474
|
-
|
|
550
|
+
T,
|
|
475
551
|
{
|
|
476
|
-
format:
|
|
477
|
-
renderer:
|
|
552
|
+
format: m,
|
|
553
|
+
renderer: l.tooltip
|
|
478
554
|
}
|
|
479
555
|
),
|
|
480
556
|
cursor: { stroke: "var(--border-strong)" },
|
|
481
557
|
isAnimationActive: !1
|
|
482
558
|
}
|
|
483
559
|
),
|
|
484
|
-
|
|
485
|
-
c.map((
|
|
486
|
-
|
|
560
|
+
u.back,
|
|
561
|
+
c.map((v, g) => /* @__PURE__ */ e(
|
|
562
|
+
Ne,
|
|
487
563
|
{
|
|
488
|
-
dataKey:
|
|
489
|
-
name:
|
|
564
|
+
dataKey: v,
|
|
565
|
+
name: y(v),
|
|
490
566
|
type: r,
|
|
491
|
-
stackId:
|
|
492
|
-
stroke:
|
|
493
|
-
strokeWidth:
|
|
494
|
-
strokeDasharray:
|
|
495
|
-
fill: `url(#${
|
|
496
|
-
dot:
|
|
497
|
-
activeDot: /* @__PURE__ */ e(
|
|
498
|
-
label:
|
|
567
|
+
stackId: a ? "stack" : void 0,
|
|
568
|
+
stroke: p(v, g),
|
|
569
|
+
strokeWidth: Y,
|
|
570
|
+
strokeDasharray: i != null && i.includes(v) ? "6 4" : void 0,
|
|
571
|
+
fill: `url(#${s}-${g})`,
|
|
572
|
+
dot: /* @__PURE__ */ e(E, { color: p(v, g) }),
|
|
573
|
+
activeDot: /* @__PURE__ */ e(E, { color: p(v, g), active: !0 }),
|
|
574
|
+
label: h.has(v) ? /* @__PURE__ */ e(fe, { color: p(v, g), format: m, hidden: k != null }) : void 0,
|
|
575
|
+
hide: w(v),
|
|
499
576
|
isAnimationActive: !1
|
|
500
577
|
},
|
|
501
|
-
|
|
578
|
+
v
|
|
502
579
|
)),
|
|
503
|
-
|
|
580
|
+
u.front
|
|
504
581
|
]
|
|
505
582
|
}
|
|
506
583
|
) });
|
|
507
584
|
}
|
|
508
585
|
);
|
|
509
|
-
|
|
510
|
-
const
|
|
586
|
+
Xe.displayName = "AreaChart";
|
|
587
|
+
const Ze = R.forwardRef(
|
|
511
588
|
({
|
|
512
|
-
height: t =
|
|
589
|
+
height: t = I,
|
|
513
590
|
stacked: r = !1,
|
|
514
|
-
layout:
|
|
515
|
-
showValues:
|
|
591
|
+
layout: a = "vertical",
|
|
592
|
+
showValues: i,
|
|
516
593
|
className: o,
|
|
517
|
-
...
|
|
518
|
-
},
|
|
519
|
-
const { names:
|
|
520
|
-
|
|
521
|
-
|
|
594
|
+
...n
|
|
595
|
+
}, l) => {
|
|
596
|
+
const { names: x, format: c, layers: m, legendItems: u, furniture: N, colorFor: b, labelFor: f, toggleSeries: y, isHidden: C } = Z(n), w = a === "horizontal", p = r ? /* @__PURE__ */ new Set() : ae(x, void 0, n.highlight, i), h = n.xTickFormatter ?? ((s) => typeof s == "number" ? c(s) : s), k = [
|
|
597
|
+
n.grid !== !1 ? /* @__PURE__ */ e(
|
|
598
|
+
te,
|
|
522
599
|
{
|
|
523
600
|
horizontal: !1,
|
|
524
601
|
vertical: !0,
|
|
@@ -527,105 +604,116 @@ const Ve = k.forwardRef(
|
|
|
527
604
|
"grid"
|
|
528
605
|
) : null,
|
|
529
606
|
/* @__PURE__ */ e(
|
|
530
|
-
|
|
607
|
+
ne,
|
|
531
608
|
{
|
|
532
609
|
type: "number",
|
|
533
|
-
domain:
|
|
534
|
-
allowDataOverflow: !!
|
|
610
|
+
domain: n.xDomain,
|
|
611
|
+
allowDataOverflow: !!n.xDomain,
|
|
535
612
|
axisLine: !1,
|
|
536
613
|
tickLine: !1,
|
|
537
614
|
minTickGap: 28,
|
|
538
615
|
tickMargin: 10,
|
|
539
|
-
tick: /* @__PURE__ */ e(
|
|
616
|
+
tick: /* @__PURE__ */ e(D, { anchor: "middle", dy: 0, format: h })
|
|
540
617
|
},
|
|
541
618
|
"x"
|
|
542
619
|
),
|
|
543
|
-
|
|
544
|
-
|
|
620
|
+
n.showYAxis !== !1 ? /* @__PURE__ */ e(
|
|
621
|
+
U,
|
|
545
622
|
{
|
|
546
623
|
type: "category",
|
|
547
|
-
dataKey:
|
|
548
|
-
width:
|
|
624
|
+
dataKey: n.categoryKey,
|
|
625
|
+
width: n.yAxisWidth ?? 144,
|
|
549
626
|
axisLine: !1,
|
|
550
627
|
tickLine: !1,
|
|
551
628
|
tickMargin: 6,
|
|
552
629
|
tick: /* @__PURE__ */ e(
|
|
553
|
-
|
|
630
|
+
D,
|
|
554
631
|
{
|
|
555
632
|
anchor: "end",
|
|
556
633
|
dy: "0.32em",
|
|
557
|
-
format:
|
|
634
|
+
format: n.yTickFormatter
|
|
558
635
|
}
|
|
559
636
|
)
|
|
560
637
|
},
|
|
561
638
|
"y"
|
|
562
639
|
) : null
|
|
563
|
-
],
|
|
564
|
-
return /* @__PURE__ */ e(
|
|
565
|
-
|
|
640
|
+
], d = n.highlight && x.length === 1 && !x.includes(n.highlight) ? n.highlight : null;
|
|
641
|
+
return /* @__PURE__ */ e(z, { ref: l, className: o, height: t, legendItems: u, hovered: m.hovered, format: c, onLegendToggle: y, children: /* @__PURE__ */ A(
|
|
642
|
+
we,
|
|
566
643
|
{
|
|
567
|
-
data:
|
|
568
|
-
layout:
|
|
569
|
-
margin:
|
|
644
|
+
data: n.data,
|
|
645
|
+
layout: w ? "vertical" : "horizontal",
|
|
646
|
+
margin: H,
|
|
570
647
|
barCategoryGap: "24%",
|
|
571
648
|
children: [
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
649
|
+
w ? k : N,
|
|
650
|
+
n.tooltip !== !1 && /* @__PURE__ */ e(
|
|
651
|
+
O,
|
|
575
652
|
{
|
|
576
653
|
content: /* @__PURE__ */ e(
|
|
577
|
-
|
|
654
|
+
T,
|
|
578
655
|
{
|
|
579
656
|
format: c,
|
|
580
|
-
renderer:
|
|
657
|
+
renderer: n.tooltip
|
|
581
658
|
}
|
|
582
659
|
),
|
|
583
660
|
cursor: { fill: "var(--muted)" },
|
|
584
661
|
isAnimationActive: !1
|
|
585
662
|
}
|
|
586
663
|
),
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
const
|
|
664
|
+
m.back,
|
|
665
|
+
x.map((s, v) => {
|
|
666
|
+
const g = r ? v === x.length - 1 : !0, S = w ? [0, 4, 4, 0] : [4, 4, 0, 0];
|
|
590
667
|
return /* @__PURE__ */ e(
|
|
591
|
-
|
|
668
|
+
ce,
|
|
592
669
|
{
|
|
593
|
-
dataKey:
|
|
594
|
-
name:
|
|
670
|
+
dataKey: s,
|
|
671
|
+
name: f(s),
|
|
595
672
|
stackId: r ? "stack" : void 0,
|
|
596
|
-
fill:
|
|
597
|
-
radius:
|
|
673
|
+
fill: b(s, v),
|
|
674
|
+
radius: g ? S : 0,
|
|
598
675
|
maxBarSize: 48,
|
|
599
|
-
label:
|
|
676
|
+
label: p.has(s) ? /* @__PURE__ */ e(Pe, { format: c, horizontal: w }) : void 0,
|
|
677
|
+
hide: C(s),
|
|
600
678
|
isAnimationActive: !1,
|
|
601
|
-
children:
|
|
602
|
-
|
|
679
|
+
children: d && n.data.map((L) => /* @__PURE__ */ e(
|
|
680
|
+
de,
|
|
603
681
|
{
|
|
604
|
-
fill:
|
|
682
|
+
fill: L[n.categoryKey] === d ? "var(--color-chart-1)" : re
|
|
605
683
|
},
|
|
606
|
-
String(
|
|
684
|
+
String(L[n.categoryKey])
|
|
607
685
|
))
|
|
608
686
|
},
|
|
609
|
-
|
|
687
|
+
s
|
|
610
688
|
);
|
|
611
689
|
}),
|
|
612
|
-
|
|
690
|
+
m.front
|
|
613
691
|
]
|
|
614
692
|
}
|
|
615
693
|
) });
|
|
616
694
|
}
|
|
617
695
|
);
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
({ height: t =
|
|
621
|
-
const { names: c, format:
|
|
622
|
-
...
|
|
623
|
-
|
|
696
|
+
Ze.displayName = "BarChart";
|
|
697
|
+
const ve = R.forwardRef(
|
|
698
|
+
({ height: t = I, lineKeys: r, dualAxis: a = !1, stacked: i = !1, forecastKeys: o, className: n, ...l }, x) => {
|
|
699
|
+
const { names: c, format: m, layers: u, furniture: N, colorFor: b, labelFor: f, toggleSeries: y, isHidden: C } = Z(l), w = c.filter((d) => !r.includes(d)), p = (d, s) => r.length ? "var(--chart-axis)" : b(d, s), h = (d, s) => r.length ? "var(--color-chart-1)" : b(d, s), k = c.length > 1 ? [
|
|
700
|
+
...w.map((d) => ({
|
|
701
|
+
key: d,
|
|
702
|
+
label: f(d),
|
|
703
|
+
color: p(d, c.indexOf(d)),
|
|
704
|
+
hidden: C(d)
|
|
705
|
+
})),
|
|
706
|
+
...r.map((d) => ({
|
|
707
|
+
key: d,
|
|
708
|
+
label: f(d),
|
|
709
|
+
color: h(d, c.indexOf(d)),
|
|
710
|
+
hidden: C(d)
|
|
711
|
+
}))
|
|
624
712
|
] : null;
|
|
625
|
-
return /* @__PURE__ */ e(
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
713
|
+
return /* @__PURE__ */ e(z, { ref: x, className: n, height: t, legendItems: k, hovered: u.hovered, format: m, onLegendToggle: y, children: /* @__PURE__ */ A(Ae, { data: l.data, margin: H, barCategoryGap: "24%", children: [
|
|
714
|
+
N,
|
|
715
|
+
a && /* @__PURE__ */ e(
|
|
716
|
+
U,
|
|
629
717
|
{
|
|
630
718
|
yAxisId: "right",
|
|
631
719
|
orientation: "right",
|
|
@@ -634,254 +722,256 @@ const he = k.forwardRef(
|
|
|
634
722
|
tickLine: !1,
|
|
635
723
|
tickMargin: 6,
|
|
636
724
|
tick: /* @__PURE__ */ e(
|
|
637
|
-
|
|
725
|
+
D,
|
|
638
726
|
{
|
|
639
727
|
anchor: "start",
|
|
640
728
|
dy: "0.32em",
|
|
641
|
-
format: (
|
|
729
|
+
format: (d) => typeof d == "number" ? m(d) : d
|
|
642
730
|
}
|
|
643
731
|
)
|
|
644
732
|
}
|
|
645
733
|
),
|
|
646
|
-
|
|
647
|
-
|
|
734
|
+
l.tooltip !== !1 && /* @__PURE__ */ e(
|
|
735
|
+
O,
|
|
648
736
|
{
|
|
649
737
|
content: /* @__PURE__ */ e(
|
|
650
|
-
|
|
738
|
+
T,
|
|
651
739
|
{
|
|
652
|
-
format:
|
|
653
|
-
renderer:
|
|
740
|
+
format: m,
|
|
741
|
+
renderer: l.tooltip
|
|
654
742
|
}
|
|
655
743
|
),
|
|
656
744
|
cursor: { fill: "var(--muted)" },
|
|
657
745
|
isAnimationActive: !1
|
|
658
746
|
}
|
|
659
747
|
),
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
const
|
|
748
|
+
u.back,
|
|
749
|
+
w.map((d) => {
|
|
750
|
+
const s = c.indexOf(d), v = i ? d === w[w.length - 1] : !0;
|
|
663
751
|
return /* @__PURE__ */ e(
|
|
664
|
-
|
|
752
|
+
ce,
|
|
665
753
|
{
|
|
666
|
-
dataKey:
|
|
667
|
-
name:
|
|
668
|
-
stackId:
|
|
669
|
-
fill:
|
|
670
|
-
radius:
|
|
754
|
+
dataKey: d,
|
|
755
|
+
name: f(d),
|
|
756
|
+
stackId: i ? "stack" : void 0,
|
|
757
|
+
fill: p(d, s),
|
|
758
|
+
radius: v ? [4, 4, 0, 0] : 0,
|
|
671
759
|
maxBarSize: 48,
|
|
760
|
+
hide: C(d),
|
|
672
761
|
isAnimationActive: !1
|
|
673
762
|
},
|
|
674
|
-
|
|
763
|
+
d
|
|
675
764
|
);
|
|
676
765
|
}),
|
|
677
|
-
r.map((
|
|
678
|
-
const
|
|
766
|
+
r.map((d) => {
|
|
767
|
+
const s = c.indexOf(d);
|
|
679
768
|
return /* @__PURE__ */ e(
|
|
680
|
-
|
|
769
|
+
se,
|
|
681
770
|
{
|
|
682
|
-
dataKey:
|
|
683
|
-
name:
|
|
684
|
-
yAxisId:
|
|
771
|
+
dataKey: d,
|
|
772
|
+
name: f(d),
|
|
773
|
+
yAxisId: a ? "right" : void 0,
|
|
685
774
|
type: "linear",
|
|
686
|
-
stroke:
|
|
687
|
-
strokeWidth:
|
|
688
|
-
strokeDasharray: o != null && o.includes(
|
|
689
|
-
dot:
|
|
690
|
-
activeDot: /* @__PURE__ */ e(
|
|
775
|
+
stroke: h(d, s),
|
|
776
|
+
strokeWidth: Y,
|
|
777
|
+
strokeDasharray: o != null && o.includes(d) ? "6 4" : void 0,
|
|
778
|
+
dot: /* @__PURE__ */ e(E, { color: h(d, s) }),
|
|
779
|
+
activeDot: /* @__PURE__ */ e(E, { color: h(d, s), active: !0 }),
|
|
780
|
+
hide: C(d),
|
|
691
781
|
isAnimationActive: !1
|
|
692
782
|
},
|
|
693
|
-
|
|
783
|
+
d
|
|
694
784
|
);
|
|
695
785
|
}),
|
|
696
|
-
|
|
786
|
+
u.front
|
|
697
787
|
] }) });
|
|
698
788
|
}
|
|
699
789
|
);
|
|
700
|
-
|
|
701
|
-
const
|
|
702
|
-
(t, r) => /* @__PURE__ */ e(
|
|
790
|
+
ve.displayName = "ComboChart";
|
|
791
|
+
const Qe = R.forwardRef(
|
|
792
|
+
(t, r) => /* @__PURE__ */ e(ve, { ref: r, ...t })
|
|
703
793
|
);
|
|
704
|
-
|
|
705
|
-
const
|
|
794
|
+
Qe.displayName = "ComposedChart";
|
|
795
|
+
const qe = R.forwardRef(
|
|
706
796
|
({
|
|
707
797
|
data: t,
|
|
708
798
|
xKey: r,
|
|
709
|
-
yKey:
|
|
710
|
-
labelKey:
|
|
799
|
+
yKey: a,
|
|
800
|
+
labelKey: i,
|
|
711
801
|
annotations: o,
|
|
712
|
-
height:
|
|
713
|
-
grid:
|
|
714
|
-
showYAxis:
|
|
802
|
+
height: n = I,
|
|
803
|
+
grid: l = !1,
|
|
804
|
+
showYAxis: x = !0,
|
|
715
805
|
formatValue: c,
|
|
716
|
-
xScale:
|
|
717
|
-
xDomain:
|
|
718
|
-
yDomain:
|
|
719
|
-
xTickFormatter:
|
|
720
|
-
yTickFormatter:
|
|
721
|
-
yAxisWidth:
|
|
722
|
-
tooltip:
|
|
723
|
-
className:
|
|
806
|
+
xScale: m = "number",
|
|
807
|
+
xDomain: u,
|
|
808
|
+
yDomain: N,
|
|
809
|
+
xTickFormatter: b,
|
|
810
|
+
yTickFormatter: f,
|
|
811
|
+
yAxisWidth: y = 44,
|
|
812
|
+
tooltip: C,
|
|
813
|
+
className: w
|
|
724
814
|
}, p) => {
|
|
725
|
-
const
|
|
726
|
-
return /* @__PURE__ */ e(
|
|
727
|
-
|
|
815
|
+
const h = c ?? F, k = b ?? ((v) => typeof v == "number" ? F(v) : v), d = f ?? ((v) => typeof v == "number" ? h(v) : v), s = xe(o, h);
|
|
816
|
+
return /* @__PURE__ */ e(z, { ref: p, className: w, height: n, legendItems: null, hovered: s.hovered, format: h, children: /* @__PURE__ */ A(Ce, { margin: H, children: [
|
|
817
|
+
l && /* @__PURE__ */ e(te, { vertical: !1, stroke: "var(--chart-grid)" }),
|
|
728
818
|
/* @__PURE__ */ e(
|
|
729
|
-
|
|
819
|
+
ne,
|
|
730
820
|
{
|
|
731
821
|
type: "number",
|
|
732
822
|
dataKey: r,
|
|
733
|
-
scale:
|
|
734
|
-
domain:
|
|
735
|
-
allowDataOverflow: !!
|
|
823
|
+
scale: m === "time" ? "time" : "auto",
|
|
824
|
+
domain: u ?? (m === "time" ? ["dataMin", "dataMax"] : ["auto", "auto"]),
|
|
825
|
+
allowDataOverflow: !!u,
|
|
736
826
|
axisLine: !1,
|
|
737
827
|
tickLine: !1,
|
|
738
828
|
minTickGap: 28,
|
|
739
829
|
tickMargin: 10,
|
|
740
|
-
tick: /* @__PURE__ */ e(
|
|
830
|
+
tick: /* @__PURE__ */ e(D, { anchor: "middle", dy: 0, format: k })
|
|
741
831
|
}
|
|
742
832
|
),
|
|
743
|
-
|
|
744
|
-
|
|
833
|
+
x && /* @__PURE__ */ e(
|
|
834
|
+
U,
|
|
745
835
|
{
|
|
746
836
|
type: "number",
|
|
747
|
-
dataKey:
|
|
748
|
-
width:
|
|
749
|
-
domain:
|
|
750
|
-
allowDataOverflow: !!
|
|
837
|
+
dataKey: a,
|
|
838
|
+
width: y,
|
|
839
|
+
domain: N,
|
|
840
|
+
allowDataOverflow: !!N,
|
|
751
841
|
axisLine: !1,
|
|
752
842
|
tickLine: !1,
|
|
753
843
|
tickMargin: 6,
|
|
754
|
-
tick: /* @__PURE__ */ e(
|
|
844
|
+
tick: /* @__PURE__ */ e(D, { anchor: "end", dy: "0.32em", format: d })
|
|
755
845
|
}
|
|
756
846
|
),
|
|
757
|
-
|
|
758
|
-
|
|
847
|
+
C !== !1 && /* @__PURE__ */ e(
|
|
848
|
+
O,
|
|
759
849
|
{
|
|
760
850
|
content: /* @__PURE__ */ e(
|
|
761
|
-
|
|
851
|
+
T,
|
|
762
852
|
{
|
|
763
|
-
format:
|
|
764
|
-
labelKey:
|
|
765
|
-
renderer:
|
|
853
|
+
format: h,
|
|
854
|
+
labelKey: i,
|
|
855
|
+
renderer: C
|
|
766
856
|
}
|
|
767
857
|
),
|
|
768
858
|
cursor: { stroke: "var(--border-strong)", strokeDasharray: "4 4" },
|
|
769
859
|
isAnimationActive: !1
|
|
770
860
|
}
|
|
771
861
|
),
|
|
772
|
-
|
|
862
|
+
s.back,
|
|
773
863
|
/* @__PURE__ */ e(
|
|
774
|
-
|
|
864
|
+
ye,
|
|
775
865
|
{
|
|
776
866
|
data: t,
|
|
777
867
|
fill: "var(--color-chart-1)",
|
|
778
|
-
shape: (
|
|
868
|
+
shape: (v) => /* @__PURE__ */ e("circle", { cx: v.cx, cy: v.cy, r: 4.5, fill: "var(--color-chart-1)", fillOpacity: 0.75 }),
|
|
779
869
|
isAnimationActive: !1
|
|
780
870
|
}
|
|
781
871
|
),
|
|
782
|
-
|
|
872
|
+
s.front
|
|
783
873
|
] }) });
|
|
784
874
|
}
|
|
785
875
|
);
|
|
786
|
-
|
|
787
|
-
const
|
|
876
|
+
qe.displayName = "ScatterChart";
|
|
877
|
+
const Je = R.forwardRef(
|
|
788
878
|
({
|
|
789
879
|
data: t,
|
|
790
880
|
nameKey: r,
|
|
791
|
-
valueKey:
|
|
792
|
-
donut:
|
|
881
|
+
valueKey: a,
|
|
882
|
+
donut: i = !0,
|
|
793
883
|
centerLabel: o,
|
|
794
|
-
highlight:
|
|
795
|
-
height:
|
|
796
|
-
legend:
|
|
884
|
+
highlight: n,
|
|
885
|
+
height: l = 260,
|
|
886
|
+
legend: x = !0,
|
|
797
887
|
formatValue: c,
|
|
798
|
-
tooltip:
|
|
799
|
-
className:
|
|
800
|
-
},
|
|
801
|
-
const
|
|
802
|
-
label: `${p[r]} · ${
|
|
803
|
-
color:
|
|
888
|
+
tooltip: m,
|
|
889
|
+
className: u
|
|
890
|
+
}, N) => {
|
|
891
|
+
const b = c ?? F, f = t.reduce((p, h) => p + (typeof h[a] == "number" ? h[a] : 0), 0), y = (p, h) => V(h), C = (p) => n && p !== n ? 0.3 : 1, w = x ? t.map((p, h) => ({
|
|
892
|
+
label: `${p[r]} · ${f ? Math.round(Number(p[a]) / f * 100) : 0}%`,
|
|
893
|
+
color: y(String(p[r]), h)
|
|
804
894
|
})) : null;
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */ e(j, { width: "100%", height:
|
|
809
|
-
|
|
810
|
-
|
|
895
|
+
return /* @__PURE__ */ A("div", { ref: N, className: $("relative w-full font-sans", u), children: [
|
|
896
|
+
w && /* @__PURE__ */ e(X, { items: w }),
|
|
897
|
+
/* @__PURE__ */ A("div", { className: "relative", children: [
|
|
898
|
+
/* @__PURE__ */ e(j, { width: "100%", height: l, children: /* @__PURE__ */ A(Re, { margin: { top: 8, right: 8, bottom: 8, left: 8 }, children: [
|
|
899
|
+
m !== !1 && /* @__PURE__ */ e(
|
|
900
|
+
O,
|
|
811
901
|
{
|
|
812
902
|
content: /* @__PURE__ */ e(
|
|
813
|
-
|
|
903
|
+
T,
|
|
814
904
|
{
|
|
815
|
-
format:
|
|
816
|
-
renderer:
|
|
905
|
+
format: b,
|
|
906
|
+
renderer: m
|
|
817
907
|
}
|
|
818
908
|
),
|
|
819
909
|
isAnimationActive: !1
|
|
820
910
|
}
|
|
821
911
|
),
|
|
822
912
|
/* @__PURE__ */ e(
|
|
823
|
-
|
|
913
|
+
ke,
|
|
824
914
|
{
|
|
825
915
|
data: t,
|
|
826
|
-
dataKey:
|
|
916
|
+
dataKey: a,
|
|
827
917
|
nameKey: r,
|
|
828
|
-
innerRadius:
|
|
918
|
+
innerRadius: i ? "62%" : 0,
|
|
829
919
|
outerRadius: "88%",
|
|
830
|
-
paddingAngle:
|
|
831
|
-
cornerRadius:
|
|
920
|
+
paddingAngle: i ? 2 : 1,
|
|
921
|
+
cornerRadius: i ? 4 : 2,
|
|
832
922
|
stroke: "none",
|
|
833
923
|
isAnimationActive: !1,
|
|
834
|
-
children: t.map((p,
|
|
835
|
-
|
|
924
|
+
children: t.map((p, h) => /* @__PURE__ */ e(
|
|
925
|
+
de,
|
|
836
926
|
{
|
|
837
927
|
role: "presentation",
|
|
838
928
|
"aria-hidden": "true",
|
|
839
|
-
fill:
|
|
840
|
-
fillOpacity:
|
|
929
|
+
fill: y(String(p[r]), h),
|
|
930
|
+
fillOpacity: C(String(p[r]))
|
|
841
931
|
},
|
|
842
932
|
String(p[r])
|
|
843
933
|
))
|
|
844
934
|
}
|
|
845
935
|
)
|
|
846
936
|
] }) }),
|
|
847
|
-
|
|
848
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children:
|
|
937
|
+
i && /* @__PURE__ */ A("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
938
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: b(f) }),
|
|
849
939
|
o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
|
|
850
940
|
] })
|
|
851
941
|
] })
|
|
852
942
|
] });
|
|
853
943
|
}
|
|
854
944
|
);
|
|
855
|
-
|
|
856
|
-
const
|
|
945
|
+
Je.displayName = "PieChart";
|
|
946
|
+
const Ke = R.forwardRef(
|
|
857
947
|
({
|
|
858
948
|
data: t,
|
|
859
949
|
categoryKey: r,
|
|
860
|
-
series:
|
|
861
|
-
seriesLabels:
|
|
950
|
+
series: a,
|
|
951
|
+
seriesLabels: i,
|
|
862
952
|
highlight: o,
|
|
863
|
-
maxValue:
|
|
864
|
-
height:
|
|
865
|
-
legend:
|
|
953
|
+
maxValue: n,
|
|
954
|
+
height: l = 300,
|
|
955
|
+
legend: x,
|
|
866
956
|
formatValue: c,
|
|
867
|
-
tooltip:
|
|
868
|
-
className:
|
|
869
|
-
},
|
|
870
|
-
const
|
|
871
|
-
() =>
|
|
872
|
-
[r, t,
|
|
873
|
-
),
|
|
957
|
+
tooltip: m,
|
|
958
|
+
className: u
|
|
959
|
+
}, N) => {
|
|
960
|
+
const b = R.useMemo(
|
|
961
|
+
() => a ?? me(t, r),
|
|
962
|
+
[r, t, a]
|
|
963
|
+
), f = c ?? F, y = n ?? Math.max(
|
|
874
964
|
1,
|
|
875
965
|
...t.flatMap(
|
|
876
|
-
(
|
|
877
|
-
(
|
|
966
|
+
(h) => b.map(
|
|
967
|
+
(k) => typeof h[k] == "number" ? h[k] : 0
|
|
878
968
|
)
|
|
879
969
|
)
|
|
880
|
-
),
|
|
881
|
-
return /* @__PURE__ */
|
|
882
|
-
p && /* @__PURE__ */ e(
|
|
883
|
-
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(j, { width: "100%", height:
|
|
884
|
-
|
|
970
|
+
), C = (h) => (i == null ? void 0 : i[h]) ?? h, w = (h, k) => o && b.includes(o) ? h === o ? "var(--color-chart-1)" : re : V(k), p = x ?? b.length > 1 ? b.map((h, k) => ({ label: C(h), color: w(h, k) })) : null;
|
|
971
|
+
return /* @__PURE__ */ A("div", { ref: N, className: $("relative w-full font-sans", u), children: [
|
|
972
|
+
p && /* @__PURE__ */ e(X, { items: p, align: "center" }),
|
|
973
|
+
/* @__PURE__ */ e("div", { className: "mx-auto w-full max-w-[520px]", children: /* @__PURE__ */ e(j, { width: "100%", height: l, children: /* @__PURE__ */ A(
|
|
974
|
+
Me,
|
|
885
975
|
{
|
|
886
976
|
data: t,
|
|
887
977
|
cx: "50%",
|
|
@@ -889,50 +979,50 @@ const Qe = k.forwardRef(
|
|
|
889
979
|
outerRadius: "68%",
|
|
890
980
|
margin: { top: 10, right: 56, bottom: 16, left: 56 },
|
|
891
981
|
children: [
|
|
892
|
-
/* @__PURE__ */ e(
|
|
982
|
+
/* @__PURE__ */ e($e, { stroke: "var(--border)", radialLines: !0 }),
|
|
893
983
|
/* @__PURE__ */ e(
|
|
894
|
-
|
|
984
|
+
ue,
|
|
895
985
|
{
|
|
896
986
|
dataKey: r,
|
|
897
987
|
tick: { fill: "var(--text-secondary)", fontSize: 11, fontWeight: 500 }
|
|
898
988
|
}
|
|
899
989
|
),
|
|
900
990
|
/* @__PURE__ */ e(
|
|
901
|
-
|
|
991
|
+
Se,
|
|
902
992
|
{
|
|
903
993
|
angle: 90,
|
|
904
|
-
domain: [0,
|
|
994
|
+
domain: [0, y],
|
|
905
995
|
tick: !1,
|
|
906
996
|
axisLine: !1,
|
|
907
997
|
tickLine: !1
|
|
908
998
|
}
|
|
909
999
|
),
|
|
910
|
-
|
|
911
|
-
|
|
1000
|
+
m !== !1 && /* @__PURE__ */ e(
|
|
1001
|
+
O,
|
|
912
1002
|
{
|
|
913
1003
|
content: /* @__PURE__ */ e(
|
|
914
|
-
|
|
1004
|
+
T,
|
|
915
1005
|
{
|
|
916
|
-
format:
|
|
917
|
-
renderer:
|
|
1006
|
+
format: f,
|
|
1007
|
+
renderer: m
|
|
918
1008
|
}
|
|
919
1009
|
),
|
|
920
1010
|
isAnimationActive: !1
|
|
921
1011
|
}
|
|
922
1012
|
),
|
|
923
|
-
|
|
924
|
-
|
|
1013
|
+
b.map((h, k) => /* @__PURE__ */ e(
|
|
1014
|
+
Le,
|
|
925
1015
|
{
|
|
926
|
-
dataKey:
|
|
927
|
-
name:
|
|
928
|
-
stroke:
|
|
929
|
-
fill:
|
|
930
|
-
fillOpacity: o ?
|
|
931
|
-
strokeWidth:
|
|
932
|
-
dot:
|
|
1016
|
+
dataKey: h,
|
|
1017
|
+
name: C(h),
|
|
1018
|
+
stroke: w(h, k),
|
|
1019
|
+
fill: w(h, k),
|
|
1020
|
+
fillOpacity: o ? h === o ? 0.16 : 0.05 : 0.1,
|
|
1021
|
+
strokeWidth: Y,
|
|
1022
|
+
dot: /* @__PURE__ */ e(E, { color: w(h, k) }),
|
|
933
1023
|
isAnimationActive: !1
|
|
934
1024
|
},
|
|
935
|
-
|
|
1025
|
+
h
|
|
936
1026
|
))
|
|
937
1027
|
]
|
|
938
1028
|
}
|
|
@@ -940,51 +1030,51 @@ const Qe = k.forwardRef(
|
|
|
940
1030
|
] });
|
|
941
1031
|
}
|
|
942
1032
|
);
|
|
943
|
-
|
|
944
|
-
const
|
|
1033
|
+
Ke.displayName = "RadarChart";
|
|
1034
|
+
const et = R.forwardRef(
|
|
945
1035
|
({
|
|
946
1036
|
data: t,
|
|
947
1037
|
nameKey: r,
|
|
948
|
-
valueKey:
|
|
949
|
-
maxValue:
|
|
1038
|
+
valueKey: a,
|
|
1039
|
+
maxValue: i = 100,
|
|
950
1040
|
centerLabel: o,
|
|
951
|
-
height:
|
|
952
|
-
legend:
|
|
953
|
-
formatValue:
|
|
1041
|
+
height: n = I,
|
|
1042
|
+
legend: l = !0,
|
|
1043
|
+
formatValue: x,
|
|
954
1044
|
tooltip: c,
|
|
955
|
-
className:
|
|
956
|
-
},
|
|
957
|
-
const
|
|
958
|
-
...
|
|
959
|
-
name: String(
|
|
960
|
-
fill:
|
|
961
|
-
})),
|
|
962
|
-
(
|
|
1045
|
+
className: m
|
|
1046
|
+
}, u) => {
|
|
1047
|
+
const N = x ?? F, b = t.map((C, w) => ({
|
|
1048
|
+
...C,
|
|
1049
|
+
name: String(C[r]),
|
|
1050
|
+
fill: ee(w)
|
|
1051
|
+
})), f = b.length ? b.reduce(
|
|
1052
|
+
(C, w) => C + (typeof w[a] == "number" ? w[a] : 0),
|
|
963
1053
|
0
|
|
964
|
-
) /
|
|
965
|
-
label: String(
|
|
966
|
-
color:
|
|
1054
|
+
) / b.length : 0, y = l ? b.map((C, w) => ({
|
|
1055
|
+
label: String(C[r]),
|
|
1056
|
+
color: ee(w)
|
|
967
1057
|
})) : null;
|
|
968
|
-
return /* @__PURE__ */
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */ e(j, { width: "100%", height:
|
|
971
|
-
|
|
1058
|
+
return /* @__PURE__ */ A("div", { ref: u, className: $("relative w-full font-sans", m), children: [
|
|
1059
|
+
/* @__PURE__ */ A("div", { className: "relative mx-auto w-full max-w-[420px]", children: [
|
|
1060
|
+
/* @__PURE__ */ e(j, { width: "100%", height: n, children: /* @__PURE__ */ A(
|
|
1061
|
+
Fe,
|
|
972
1062
|
{
|
|
973
|
-
data:
|
|
1063
|
+
data: b,
|
|
974
1064
|
innerRadius: "48%",
|
|
975
1065
|
outerRadius: "82%",
|
|
976
1066
|
startAngle: 90,
|
|
977
1067
|
endAngle: -270,
|
|
978
1068
|
margin: { top: 6, right: 6, bottom: 6, left: 6 },
|
|
979
1069
|
children: [
|
|
980
|
-
/* @__PURE__ */ e(
|
|
1070
|
+
/* @__PURE__ */ e(ue, { type: "number", domain: [0, i], tick: !1 }),
|
|
981
1071
|
c !== !1 && /* @__PURE__ */ e(
|
|
982
|
-
|
|
1072
|
+
O,
|
|
983
1073
|
{
|
|
984
1074
|
content: /* @__PURE__ */ e(
|
|
985
|
-
|
|
1075
|
+
T,
|
|
986
1076
|
{
|
|
987
|
-
format:
|
|
1077
|
+
format: N,
|
|
988
1078
|
renderer: c
|
|
989
1079
|
}
|
|
990
1080
|
),
|
|
@@ -992,9 +1082,9 @@ const qe = k.forwardRef(
|
|
|
992
1082
|
}
|
|
993
1083
|
),
|
|
994
1084
|
/* @__PURE__ */ e(
|
|
995
|
-
|
|
1085
|
+
Oe,
|
|
996
1086
|
{
|
|
997
|
-
dataKey:
|
|
1087
|
+
dataKey: a,
|
|
998
1088
|
background: { fill: "var(--muted)" },
|
|
999
1089
|
cornerRadius: 999,
|
|
1000
1090
|
maxBarSize: 18,
|
|
@@ -1004,71 +1094,71 @@ const qe = k.forwardRef(
|
|
|
1004
1094
|
]
|
|
1005
1095
|
}
|
|
1006
1096
|
) }),
|
|
1007
|
-
/* @__PURE__ */
|
|
1008
|
-
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children:
|
|
1097
|
+
/* @__PURE__ */ A("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
1098
|
+
/* @__PURE__ */ e("div", { className: "text-xl font-medium text-foreground tabular-nums", children: N(Math.round(f)) }),
|
|
1009
1099
|
o && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs font-normal tracking-wide uppercase text-tertiary", children: o })
|
|
1010
1100
|
] })
|
|
1011
1101
|
] }),
|
|
1012
|
-
|
|
1102
|
+
y && /* @__PURE__ */ e(X, { items: y, align: "center", className: "mb-0 mt-3" })
|
|
1013
1103
|
] });
|
|
1014
1104
|
}
|
|
1015
1105
|
);
|
|
1016
|
-
|
|
1017
|
-
function
|
|
1106
|
+
et.displayName = "RadialBarChart";
|
|
1107
|
+
function tt({
|
|
1018
1108
|
x: t = 0,
|
|
1019
1109
|
y: r = 0,
|
|
1020
|
-
width:
|
|
1021
|
-
height:
|
|
1110
|
+
width: a = 0,
|
|
1111
|
+
height: i = 0,
|
|
1022
1112
|
depth: o = 0,
|
|
1023
|
-
index:
|
|
1024
|
-
name:
|
|
1025
|
-
value:
|
|
1113
|
+
index: n = 0,
|
|
1114
|
+
name: l,
|
|
1115
|
+
value: x,
|
|
1026
1116
|
format: c = F
|
|
1027
1117
|
}) {
|
|
1028
1118
|
if (o === 0) return /* @__PURE__ */ e("g", {});
|
|
1029
|
-
const
|
|
1030
|
-
return /* @__PURE__ */
|
|
1119
|
+
const m = o === 0 ? "transparent" : ee(n), u = o > 0 && n < 4, N = a > 72 && i > 38;
|
|
1120
|
+
return /* @__PURE__ */ A("g", { children: [
|
|
1031
1121
|
/* @__PURE__ */ e(
|
|
1032
1122
|
"rect",
|
|
1033
1123
|
{
|
|
1034
1124
|
x: t,
|
|
1035
1125
|
y: r,
|
|
1036
|
-
width:
|
|
1037
|
-
height:
|
|
1126
|
+
width: a,
|
|
1127
|
+
height: i,
|
|
1038
1128
|
rx: 6,
|
|
1039
1129
|
ry: 6,
|
|
1040
|
-
fill:
|
|
1130
|
+
fill: m,
|
|
1041
1131
|
stroke: "var(--background)",
|
|
1042
1132
|
strokeWidth: 4
|
|
1043
1133
|
}
|
|
1044
1134
|
),
|
|
1045
|
-
|
|
1135
|
+
N && /* @__PURE__ */ e(
|
|
1046
1136
|
"foreignObject",
|
|
1047
1137
|
{
|
|
1048
1138
|
x: t + 8,
|
|
1049
1139
|
y: r + 8,
|
|
1050
|
-
width: Math.max(0,
|
|
1051
|
-
height: Math.max(0,
|
|
1140
|
+
width: Math.max(0, a - 16),
|
|
1141
|
+
height: Math.max(0, i - 16),
|
|
1052
1142
|
className: "pointer-events-none overflow-hidden",
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1143
|
+
children: /* @__PURE__ */ A("div", { className: "flex h-full flex-col justify-between", children: [
|
|
1054
1144
|
/* @__PURE__ */ e(
|
|
1055
1145
|
"p",
|
|
1056
1146
|
{
|
|
1057
1147
|
className: $(
|
|
1058
1148
|
"truncate text-xs font-medium",
|
|
1059
|
-
|
|
1149
|
+
u ? "text-background" : "text-foreground"
|
|
1060
1150
|
),
|
|
1061
|
-
children:
|
|
1151
|
+
children: l
|
|
1062
1152
|
}
|
|
1063
1153
|
),
|
|
1064
|
-
typeof
|
|
1154
|
+
typeof x == "number" && i > 58 && /* @__PURE__ */ e(
|
|
1065
1155
|
"p",
|
|
1066
1156
|
{
|
|
1067
1157
|
className: $(
|
|
1068
1158
|
"text-xs tabular-nums",
|
|
1069
|
-
|
|
1159
|
+
u ? "text-background/70" : "text-tertiary"
|
|
1070
1160
|
),
|
|
1071
|
-
children: c(
|
|
1161
|
+
children: c(x)
|
|
1072
1162
|
}
|
|
1073
1163
|
)
|
|
1074
1164
|
] })
|
|
@@ -1076,53 +1166,53 @@ function Je({
|
|
|
1076
1166
|
)
|
|
1077
1167
|
] });
|
|
1078
1168
|
}
|
|
1079
|
-
function
|
|
1080
|
-
const
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1083
|
-
|
|
1169
|
+
function nt(t, r, a) {
|
|
1170
|
+
const i = [], o = (n) => {
|
|
1171
|
+
const l = Array.isArray(n.children) ? n.children : void 0;
|
|
1172
|
+
if (l != null && l.length) {
|
|
1173
|
+
l.forEach(o);
|
|
1084
1174
|
return;
|
|
1085
1175
|
}
|
|
1086
|
-
typeof a
|
|
1087
|
-
...
|
|
1088
|
-
name: String(
|
|
1089
|
-
value: a
|
|
1176
|
+
typeof n[a] == "number" && i.push({
|
|
1177
|
+
...n,
|
|
1178
|
+
name: String(n[r] ?? ""),
|
|
1179
|
+
value: n[a]
|
|
1090
1180
|
});
|
|
1091
1181
|
};
|
|
1092
|
-
return t.forEach(o),
|
|
1182
|
+
return t.forEach(o), i.length ? i : t;
|
|
1093
1183
|
}
|
|
1094
|
-
const
|
|
1184
|
+
const rt = R.forwardRef(
|
|
1095
1185
|
({
|
|
1096
1186
|
data: t,
|
|
1097
1187
|
nameKey: r,
|
|
1098
|
-
valueKey:
|
|
1099
|
-
height:
|
|
1188
|
+
valueKey: a,
|
|
1189
|
+
height: i = I,
|
|
1100
1190
|
formatValue: o,
|
|
1101
|
-
tooltip:
|
|
1102
|
-
className:
|
|
1103
|
-
},
|
|
1104
|
-
const c = o ?? F,
|
|
1105
|
-
() =>
|
|
1106
|
-
[t, r,
|
|
1191
|
+
tooltip: n,
|
|
1192
|
+
className: l
|
|
1193
|
+
}, x) => {
|
|
1194
|
+
const c = o ?? F, m = R.useMemo(
|
|
1195
|
+
() => nt(t, r, a),
|
|
1196
|
+
[t, r, a]
|
|
1107
1197
|
);
|
|
1108
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
1109
|
-
|
|
1198
|
+
return /* @__PURE__ */ e("div", { ref: x, className: $("relative w-full font-sans", l), children: /* @__PURE__ */ e(j, { width: "100%", height: i, children: /* @__PURE__ */ e(
|
|
1199
|
+
Te,
|
|
1110
1200
|
{
|
|
1111
|
-
data:
|
|
1201
|
+
data: m,
|
|
1112
1202
|
nameKey: r,
|
|
1113
|
-
dataKey:
|
|
1203
|
+
dataKey: a,
|
|
1114
1204
|
type: "flat",
|
|
1115
1205
|
aspectRatio: 1.6,
|
|
1116
|
-
content: /* @__PURE__ */ e(
|
|
1206
|
+
content: /* @__PURE__ */ e(tt, { format: c }),
|
|
1117
1207
|
isAnimationActive: !1,
|
|
1118
|
-
children:
|
|
1119
|
-
|
|
1208
|
+
children: n !== !1 && /* @__PURE__ */ e(
|
|
1209
|
+
O,
|
|
1120
1210
|
{
|
|
1121
1211
|
content: /* @__PURE__ */ e(
|
|
1122
|
-
|
|
1212
|
+
T,
|
|
1123
1213
|
{
|
|
1124
1214
|
format: c,
|
|
1125
|
-
renderer:
|
|
1215
|
+
renderer: n
|
|
1126
1216
|
}
|
|
1127
1217
|
),
|
|
1128
1218
|
isAnimationActive: !1
|
|
@@ -1132,90 +1222,90 @@ const et = k.forwardRef(
|
|
|
1132
1222
|
) }) });
|
|
1133
1223
|
}
|
|
1134
1224
|
);
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
const
|
|
1138
|
-
return `M ${t},${r +
|
|
1225
|
+
rt.displayName = "TreemapChart";
|
|
1226
|
+
const J = "var(--color-chart-1)", at = "var(--chart-track)", G = 24, it = 44, ie = 0.55, oe = 4, le = (t, r, a, i, o) => {
|
|
1227
|
+
const n = Math.min(o, a / 2, i);
|
|
1228
|
+
return `M ${t},${r + i} L ${t},${r + n} Q ${t},${r} ${t + n},${r} L ${t + a - n},${r} Q ${t + a},${r} ${t + a},${r + n} L ${t + a},${r + i} Z`;
|
|
1139
1229
|
};
|
|
1140
|
-
function
|
|
1141
|
-
const t =
|
|
1142
|
-
return
|
|
1143
|
-
const
|
|
1144
|
-
if (!
|
|
1145
|
-
|
|
1146
|
-
const o = new ResizeObserver((
|
|
1147
|
-
var
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1230
|
+
function ot() {
|
|
1231
|
+
const t = R.useRef(null), [r, a] = R.useState(0);
|
|
1232
|
+
return R.useLayoutEffect(() => {
|
|
1233
|
+
const i = t.current;
|
|
1234
|
+
if (!i) return;
|
|
1235
|
+
a(i.getBoundingClientRect().width);
|
|
1236
|
+
const o = new ResizeObserver((n) => {
|
|
1237
|
+
var x;
|
|
1238
|
+
const l = ((x = n[0]) == null ? void 0 : x.contentRect.width) ?? 0;
|
|
1239
|
+
a((c) => Math.abs(c - l) > 0.5 ? l : c);
|
|
1150
1240
|
});
|
|
1151
|
-
return o.observe(
|
|
1241
|
+
return o.observe(i), () => o.disconnect();
|
|
1152
1242
|
}, []), { ref: t, width: r };
|
|
1153
1243
|
}
|
|
1154
|
-
const
|
|
1244
|
+
const lt = R.forwardRef(
|
|
1155
1245
|
({
|
|
1156
1246
|
data: t,
|
|
1157
1247
|
nameKey: r,
|
|
1158
|
-
valueKey:
|
|
1159
|
-
height:
|
|
1248
|
+
valueKey: a,
|
|
1249
|
+
height: i = I,
|
|
1160
1250
|
formatValue: o,
|
|
1161
|
-
label:
|
|
1162
|
-
tooltip:
|
|
1163
|
-
className:
|
|
1251
|
+
label: n,
|
|
1252
|
+
tooltip: l,
|
|
1253
|
+
className: x
|
|
1164
1254
|
}, c) => {
|
|
1165
|
-
var
|
|
1166
|
-
const
|
|
1167
|
-
var
|
|
1168
|
-
const
|
|
1255
|
+
var v;
|
|
1256
|
+
const m = o ?? F, { ref: u, width: N } = ot(), [b, f] = R.useState(null), y = Number(((v = t[0]) == null ? void 0 : v[a]) ?? 0), C = t.length, w = Math.max(0, i - G - it), p = G + w, h = C > 0 ? N / (C + (C - 1) * ie) : 0, k = h * ie, d = t.map((g, S) => {
|
|
1257
|
+
var B;
|
|
1258
|
+
const L = Number(g[a]), P = Number(((B = t[S - 1]) == null ? void 0 : B[a]) ?? L), Q = y ? L / y * 100 : 0, q = P ? L / P * 100 : 0, M = y && L > 0 ? Math.max(2, L / y * w) : 0;
|
|
1169
1259
|
return {
|
|
1170
1260
|
datum: g,
|
|
1171
|
-
index:
|
|
1261
|
+
index: S,
|
|
1172
1262
|
name: String(g[r]),
|
|
1173
|
-
value:
|
|
1174
|
-
conversionFromFirst:
|
|
1175
|
-
conversionFromPrevious:
|
|
1176
|
-
dropOffFromPrevious:
|
|
1177
|
-
x:
|
|
1178
|
-
y: p -
|
|
1179
|
-
width:
|
|
1180
|
-
height:
|
|
1181
|
-
formatValue:
|
|
1263
|
+
value: L,
|
|
1264
|
+
conversionFromFirst: Q,
|
|
1265
|
+
conversionFromPrevious: q,
|
|
1266
|
+
dropOffFromPrevious: S === 0 ? 0 : 100 - q,
|
|
1267
|
+
x: S * (h + k),
|
|
1268
|
+
y: p - M,
|
|
1269
|
+
width: h,
|
|
1270
|
+
height: M,
|
|
1271
|
+
formatValue: m
|
|
1182
1272
|
};
|
|
1183
|
-
}),
|
|
1184
|
-
return /* @__PURE__ */ e("div", { ref: c, className: $("relative w-full font-sans",
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
const
|
|
1273
|
+
}), s = b != null ? d[b] : void 0;
|
|
1274
|
+
return /* @__PURE__ */ e("div", { ref: c, className: $("relative w-full font-sans", x), children: /* @__PURE__ */ A("div", { ref: u, className: "relative w-full", style: { height: i }, children: [
|
|
1275
|
+
N > 0 && C > 0 && /* @__PURE__ */ A("svg", { width: N, height: i, className: "block", children: [
|
|
1276
|
+
d.slice(1).map((g) => {
|
|
1277
|
+
const S = d[g.index - 1];
|
|
1188
1278
|
return /* @__PURE__ */ e(
|
|
1189
1279
|
"path",
|
|
1190
1280
|
{
|
|
1191
|
-
d: `M ${
|
|
1192
|
-
fill:
|
|
1281
|
+
d: `M ${S.x + S.width},${S.y} L ${g.x},${g.y} L ${g.x},${p} L ${S.x + S.width},${p} Z`,
|
|
1282
|
+
fill: J,
|
|
1193
1283
|
opacity: 0.14
|
|
1194
1284
|
},
|
|
1195
1285
|
`connector-${g.index}`
|
|
1196
1286
|
);
|
|
1197
1287
|
}),
|
|
1198
|
-
|
|
1288
|
+
d.map((g) => /* @__PURE__ */ A(
|
|
1199
1289
|
"g",
|
|
1200
1290
|
{
|
|
1201
1291
|
role: "img",
|
|
1202
|
-
"aria-label": `${g.name}: ${
|
|
1292
|
+
"aria-label": `${g.name}: ${m(g.value)} (${Math.round(g.conversionFromFirst)}% of ${d[0].name})`,
|
|
1203
1293
|
children: [
|
|
1204
1294
|
/* @__PURE__ */ e(
|
|
1205
1295
|
"path",
|
|
1206
1296
|
{
|
|
1207
|
-
d:
|
|
1208
|
-
fill:
|
|
1297
|
+
d: le(g.x, G, g.width, w, oe),
|
|
1298
|
+
fill: at
|
|
1209
1299
|
}
|
|
1210
1300
|
),
|
|
1211
1301
|
g.height > 0 && /* @__PURE__ */ e(
|
|
1212
1302
|
"path",
|
|
1213
1303
|
{
|
|
1214
|
-
d:
|
|
1215
|
-
fill:
|
|
1304
|
+
d: le(g.x, g.y, g.width, g.height, oe),
|
|
1305
|
+
fill: J
|
|
1216
1306
|
}
|
|
1217
1307
|
),
|
|
1218
|
-
|
|
1308
|
+
n !== !1 && (n ? n(g) : /* @__PURE__ */ A(
|
|
1219
1309
|
"text",
|
|
1220
1310
|
{
|
|
1221
1311
|
x: g.x,
|
|
@@ -1245,19 +1335,19 @@ const at = k.forwardRef(
|
|
|
1245
1335
|
y: p + 34,
|
|
1246
1336
|
textAnchor: "start",
|
|
1247
1337
|
className: "fill-tertiary text-xs tabular-nums",
|
|
1248
|
-
children:
|
|
1338
|
+
children: m(g.value)
|
|
1249
1339
|
}
|
|
1250
1340
|
),
|
|
1251
1341
|
/* @__PURE__ */ e(
|
|
1252
1342
|
"rect",
|
|
1253
1343
|
{
|
|
1254
1344
|
x: g.x,
|
|
1255
|
-
y:
|
|
1256
|
-
width: g.index ===
|
|
1257
|
-
height:
|
|
1345
|
+
y: G,
|
|
1346
|
+
width: g.index === C - 1 ? h : h + k,
|
|
1347
|
+
height: w,
|
|
1258
1348
|
fill: "transparent",
|
|
1259
|
-
onMouseEnter: () =>
|
|
1260
|
-
onMouseLeave: () =>
|
|
1349
|
+
onMouseEnter: () => f(g.index),
|
|
1350
|
+
onMouseLeave: () => f(null)
|
|
1261
1351
|
}
|
|
1262
1352
|
)
|
|
1263
1353
|
]
|
|
@@ -1265,34 +1355,34 @@ const at = k.forwardRef(
|
|
|
1265
1355
|
`${g.name}-${g.index}`
|
|
1266
1356
|
))
|
|
1267
1357
|
] }),
|
|
1268
|
-
|
|
1358
|
+
l !== !1 && s && /* @__PURE__ */ e(
|
|
1269
1359
|
"div",
|
|
1270
1360
|
{
|
|
1271
1361
|
className: "pointer-events-none absolute z-10 -translate-x-1/2 -translate-y-full",
|
|
1272
|
-
style: { left:
|
|
1273
|
-
children:
|
|
1362
|
+
style: { left: s.x + s.width / 2, top: s.y - 10 },
|
|
1363
|
+
children: l ? l({
|
|
1274
1364
|
active: !0,
|
|
1275
|
-
label:
|
|
1365
|
+
label: s.name,
|
|
1276
1366
|
items: [
|
|
1277
1367
|
{
|
|
1278
|
-
key:
|
|
1279
|
-
name:
|
|
1280
|
-
value:
|
|
1281
|
-
color:
|
|
1282
|
-
datum:
|
|
1368
|
+
key: s.name,
|
|
1369
|
+
name: s.name,
|
|
1370
|
+
value: s.value,
|
|
1371
|
+
color: J,
|
|
1372
|
+
datum: s.datum
|
|
1283
1373
|
}
|
|
1284
1374
|
],
|
|
1285
|
-
formatValue:
|
|
1286
|
-
}) : /* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children:
|
|
1288
|
-
/* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children:
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
Math.round(
|
|
1375
|
+
formatValue: m
|
|
1376
|
+
}) : /* @__PURE__ */ A("div", { className: "rounded-md bg-foreground px-2.5 py-1.5 text-xs whitespace-nowrap text-background", children: [
|
|
1377
|
+
/* @__PURE__ */ e("div", { className: "text-xs font-normal tracking-wide uppercase text-background/60", children: s.name }),
|
|
1378
|
+
/* @__PURE__ */ e("div", { className: "font-normal tabular-nums", children: m(s.value) }),
|
|
1379
|
+
/* @__PURE__ */ A("div", { className: "text-background/70 tabular-nums", children: [
|
|
1380
|
+
Math.round(s.conversionFromFirst),
|
|
1291
1381
|
"% of ",
|
|
1292
|
-
|
|
1293
|
-
|
|
1382
|
+
d[0].name,
|
|
1383
|
+
s.index > 0 && /* @__PURE__ */ A(K, { children: [
|
|
1294
1384
|
" · −",
|
|
1295
|
-
Math.round(
|
|
1385
|
+
Math.round(s.dropOffFromPrevious),
|
|
1296
1386
|
"% step"
|
|
1297
1387
|
] })
|
|
1298
1388
|
] })
|
|
@@ -1302,18 +1392,18 @@ const at = k.forwardRef(
|
|
|
1302
1392
|
] }) });
|
|
1303
1393
|
}
|
|
1304
1394
|
);
|
|
1305
|
-
|
|
1395
|
+
lt.displayName = "FunnelChart";
|
|
1306
1396
|
export {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1397
|
+
Xe as AreaChart,
|
|
1398
|
+
Ze as BarChart,
|
|
1399
|
+
ve as ComboChart,
|
|
1400
|
+
Qe as ComposedChart,
|
|
1401
|
+
lt as FunnelChart,
|
|
1402
|
+
Ye as LineChart,
|
|
1403
|
+
I as MIN_HEIGHT,
|
|
1404
|
+
Je as PieChart,
|
|
1405
|
+
Ke as RadarChart,
|
|
1406
|
+
et as RadialBarChart,
|
|
1407
|
+
qe as ScatterChart,
|
|
1408
|
+
rt as TreemapChart
|
|
1319
1409
|
};
|