@flesler/cursor-canvas-web 1.3.0 → 1.4.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/dist/cursor-canvas.cjs +1 -1
- package/dist/cursor-canvas.js +581 -559
- package/package.json +5 -2
- package/src/superset/chart-extra.d.ts +7 -1
package/dist/cursor-canvas.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { useComputedColorScheme as ve, Button as be, Alert as Se, Card as ke, Checkbox as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { r as
|
|
6
|
-
import { c as
|
|
7
|
-
import { BarChart as
|
|
8
|
-
const
|
|
2
|
+
import { useComputedColorScheme as ve, Button as be, Alert as Se, Card as ke, Checkbox as Ce, Divider as we, Title as W, ActionIcon as Le, Badge as Te, Group as Pe, Select as Ae, Stack as Me, Text as H, Table as T, Textarea as Be, TextInput as De, Switch as $e } from "@mantine/core";
|
|
3
|
+
import { useState as E, createContext as ae, useCallback as G, useContext as O } from "react";
|
|
4
|
+
import { useEffect as nn, useMemo as rn, useRef as on, useState as an } from "react";
|
|
5
|
+
import { r as Ee, u as ne } from "./host-tokens-Bt6GPXN1.js";
|
|
6
|
+
import { c as ln, a as cn, b as dn, d as un, e as fn, f as hn, g as pn, h as yn, i as mn } from "./host-tokens-Bt6GPXN1.js";
|
|
7
|
+
import { BarChart as Fe, AreaChart as Ie, LineChart as Ne, DonutChart as Re, PieChart as _e, ChartLegend as ze } from "@mantine/charts";
|
|
8
|
+
const C = {
|
|
9
9
|
success: "#1F8A65",
|
|
10
10
|
danger: "#CF2D56",
|
|
11
11
|
warning: "#E8A33D",
|
|
@@ -14,7 +14,7 @@ const w = {
|
|
|
14
14
|
added: "#1F8A65",
|
|
15
15
|
deleted: "#CF2D56",
|
|
16
16
|
renamed: "#5A6CC0"
|
|
17
|
-
},
|
|
17
|
+
}, ie = {
|
|
18
18
|
success: "green",
|
|
19
19
|
danger: "red",
|
|
20
20
|
warning: "orange",
|
|
@@ -25,83 +25,89 @@ const w = {
|
|
|
25
25
|
renamed: "indigo"
|
|
26
26
|
};
|
|
27
27
|
function g() {
|
|
28
|
-
const
|
|
29
|
-
return
|
|
28
|
+
const e = ve("light") === "dark" ? "dark" : "light";
|
|
29
|
+
return Ee(e);
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const se = {
|
|
32
32
|
verticalAlign: "bottom",
|
|
33
33
|
align: "center"
|
|
34
|
-
},
|
|
34
|
+
}, le = {
|
|
35
35
|
legend: { justifyContent: "center" }
|
|
36
36
|
};
|
|
37
37
|
function j() {
|
|
38
|
-
const
|
|
39
|
-
return (n, r) => n ?
|
|
40
|
-
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return { textColor:
|
|
44
|
-
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
const
|
|
48
|
-
for (const
|
|
49
|
-
a
|
|
50
|
-
return
|
|
38
|
+
const e = g().chart.sequence;
|
|
39
|
+
return (n, r) => n ? C[n] : e[r % e.length];
|
|
40
|
+
}
|
|
41
|
+
function ce() {
|
|
42
|
+
const e = g().text.primary;
|
|
43
|
+
return { textColor: e, barLabelColor: e };
|
|
44
|
+
}
|
|
45
|
+
function de(t, e) {
|
|
46
|
+
return t.map((n, r) => {
|
|
47
|
+
const o = { category: n };
|
|
48
|
+
for (const a of e)
|
|
49
|
+
o[a.name] = a.data[r] ?? 0;
|
|
50
|
+
return o;
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
53
|
+
function ue(t, e) {
|
|
54
|
+
return t.map((n, r) => ({
|
|
55
55
|
name: n.name,
|
|
56
|
-
color:
|
|
56
|
+
color: e(n.tone, r)
|
|
57
57
|
}));
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return (n) => `${
|
|
59
|
+
function fe(t, e) {
|
|
60
|
+
return (n) => `${e ?? ""}${n}${t ?? ""}`;
|
|
61
61
|
}
|
|
62
|
-
function He(
|
|
63
|
-
if (
|
|
64
|
-
return
|
|
65
|
-
...
|
|
62
|
+
function He(t, e) {
|
|
63
|
+
if (t != null && t.length)
|
|
64
|
+
return t.map((n) => ({
|
|
65
|
+
...e ? { x: n.value } : { y: n.value },
|
|
66
66
|
label: n.label,
|
|
67
|
-
color: n.tone ?
|
|
67
|
+
color: n.tone ? C[n.tone] : C.neutral
|
|
68
68
|
}));
|
|
69
69
|
}
|
|
70
70
|
const We = /* @__PURE__ */ new Set(["log", "symlog", "pow", "sqrt"]);
|
|
71
|
-
function Ge(
|
|
72
|
-
const { scale:
|
|
73
|
-
return typeof
|
|
74
|
-
...
|
|
75
|
-
type:
|
|
76
|
-
allowDataOverflow:
|
|
77
|
-
allowDecimals:
|
|
78
|
-
domain:
|
|
71
|
+
function Ge(t) {
|
|
72
|
+
const { scale: e } = t;
|
|
73
|
+
return typeof e != "string" || !We.has(e) ? t : {
|
|
74
|
+
...t,
|
|
75
|
+
type: t.type ?? "number",
|
|
76
|
+
allowDataOverflow: t.allowDataOverflow ?? !0,
|
|
77
|
+
allowDecimals: t.allowDecimals ?? !0,
|
|
78
|
+
domain: t.domain ?? [1, "dataMax"]
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
81
|
+
function he(t) {
|
|
82
|
+
const e = He(t.referenceLines, !!t.horizontal);
|
|
83
83
|
let n;
|
|
84
|
-
if (!
|
|
85
|
-
const
|
|
86
|
-
n = [
|
|
84
|
+
if (!t.stacked && !t.normalized) {
|
|
85
|
+
const a = t.beginAtZero !== !1;
|
|
86
|
+
n = [t.yMin ?? (a ? 0 : "auto"), t.yMax ?? "auto"];
|
|
87
87
|
}
|
|
88
|
-
const r =
|
|
88
|
+
const r = t.valueAxis ? Ge(t.valueAxis) : void 0;
|
|
89
89
|
if (!n && !r)
|
|
90
|
-
return { referenceLines:
|
|
91
|
-
const
|
|
92
|
-
return
|
|
90
|
+
return { referenceLines: e };
|
|
91
|
+
const o = { ...n && { domain: n }, ...r };
|
|
92
|
+
return t.horizontal ? { xAxisProps: o, referenceLines: e } : { yAxisProps: o, referenceLines: e };
|
|
93
|
+
}
|
|
94
|
+
function Oe(t, e, n) {
|
|
95
|
+
return t !== void 0 ? t : e.length === 1 && n.length <= 8;
|
|
93
96
|
}
|
|
94
|
-
function
|
|
95
|
-
return e !==
|
|
97
|
+
function je(t, e, n) {
|
|
98
|
+
return e.length !== 1 || e[0].tone ? t : t.map((r, o) => ({
|
|
99
|
+
...r,
|
|
100
|
+
color: n(void 0, o)
|
|
101
|
+
}));
|
|
96
102
|
}
|
|
97
|
-
const
|
|
98
|
-
function
|
|
99
|
-
return
|
|
103
|
+
const Ke = 96, Ve = 6.5;
|
|
104
|
+
function Xe(t, e) {
|
|
105
|
+
return t.length <= e ? t : `${t.slice(0, e - 1)}…`;
|
|
100
106
|
}
|
|
101
|
-
function
|
|
102
|
-
var
|
|
103
|
-
const
|
|
104
|
-
return /* @__PURE__ */ i("g", { transform: `translate(${
|
|
107
|
+
function Ye(t, e) {
|
|
108
|
+
var l;
|
|
109
|
+
const n = typeof e.x == "number" ? e.x : Number(e.x) || 0, r = typeof e.y == "number" ? e.y : Number(e.y) || 0, o = String(((l = e.payload) == null ? void 0 : l.value) ?? ""), a = Xe(o, t);
|
|
110
|
+
return /* @__PURE__ */ i("g", { transform: `translate(${n},${r})`, children: /* @__PURE__ */ y(
|
|
105
111
|
"text",
|
|
106
112
|
{
|
|
107
113
|
x: -10,
|
|
@@ -111,160 +117,176 @@ function Ke(e) {
|
|
|
111
117
|
fill: "currentColor",
|
|
112
118
|
fontSize: 12,
|
|
113
119
|
children: [
|
|
114
|
-
/* @__PURE__ */ i("title", { children:
|
|
120
|
+
/* @__PURE__ */ i("title", { children: o }),
|
|
115
121
|
a
|
|
116
122
|
]
|
|
117
123
|
}
|
|
118
124
|
) });
|
|
119
125
|
}
|
|
120
|
-
function
|
|
126
|
+
function pe(t) {
|
|
121
127
|
return {
|
|
122
128
|
fontWeight: 700,
|
|
123
|
-
fill:
|
|
129
|
+
fill: t
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function qe(t) {
|
|
133
|
+
return {
|
|
134
|
+
...pe(t),
|
|
135
|
+
position: "right"
|
|
124
136
|
};
|
|
125
137
|
}
|
|
126
|
-
function
|
|
138
|
+
function Ze(t = Ke, e = !1) {
|
|
139
|
+
const n = Math.floor(t / Ve);
|
|
127
140
|
return {
|
|
128
141
|
yAxisProps: {
|
|
129
|
-
tick:
|
|
130
|
-
width:
|
|
142
|
+
tick: (r) => Ye(n, r),
|
|
143
|
+
width: t
|
|
131
144
|
},
|
|
132
145
|
barChartProps: {
|
|
133
|
-
margin: { right: 32 }
|
|
134
|
-
}
|
|
146
|
+
margin: { right: e ? 48 : 32 }
|
|
147
|
+
},
|
|
148
|
+
/** Value-axis grid only; Mantine's default `x` draws a line per category row. */
|
|
149
|
+
gridAxis: "y"
|
|
135
150
|
};
|
|
136
151
|
}
|
|
137
|
-
function
|
|
152
|
+
function Je() {
|
|
138
153
|
return {
|
|
139
154
|
barChartProps: {
|
|
140
155
|
margin: { top: 22 }
|
|
141
156
|
}
|
|
142
157
|
};
|
|
143
158
|
}
|
|
144
|
-
function
|
|
145
|
-
categories:
|
|
146
|
-
series:
|
|
159
|
+
function mt({
|
|
160
|
+
categories: t,
|
|
161
|
+
series: e,
|
|
147
162
|
height: n = 240,
|
|
148
163
|
fill: r,
|
|
149
|
-
valueSuffix:
|
|
150
|
-
valuePrefix:
|
|
151
|
-
showValues:
|
|
164
|
+
valueSuffix: o,
|
|
165
|
+
valuePrefix: a,
|
|
166
|
+
showValues: l,
|
|
152
167
|
showHoverGuide: f = !0,
|
|
153
168
|
beginAtZero: d,
|
|
154
|
-
yMin:
|
|
169
|
+
yMin: c,
|
|
155
170
|
yMax: u,
|
|
156
171
|
referenceLines: m,
|
|
157
172
|
style: v,
|
|
158
173
|
extra: h,
|
|
159
|
-
smooth:
|
|
174
|
+
smooth: b
|
|
160
175
|
}) {
|
|
161
|
-
const
|
|
176
|
+
const w = (h == null ? void 0 : h.smooth) ?? b, L = j(), P = ce(), B = de(t, e), $ = ue(e, L), S = !!(r && (h != null && h.stacked)), A = he({
|
|
162
177
|
beginAtZero: d,
|
|
163
|
-
yMin:
|
|
178
|
+
yMin: c,
|
|
164
179
|
yMax: u,
|
|
165
180
|
referenceLines: m,
|
|
166
181
|
horizontal: !1,
|
|
167
|
-
stacked:
|
|
182
|
+
stacked: S,
|
|
168
183
|
valueAxis: h == null ? void 0 : h.valueAxis
|
|
169
|
-
}),
|
|
184
|
+
}), M = {
|
|
170
185
|
h: n,
|
|
171
|
-
data:
|
|
186
|
+
data: B,
|
|
172
187
|
dataKey: "category",
|
|
173
188
|
series: $,
|
|
174
|
-
curveType:
|
|
175
|
-
withLegend:
|
|
176
|
-
legendProps:
|
|
177
|
-
valueFormatter:
|
|
178
|
-
withPointLabels:
|
|
189
|
+
curveType: w ? "monotone" : "linear",
|
|
190
|
+
withLegend: e.length > 1,
|
|
191
|
+
legendProps: se,
|
|
192
|
+
valueFormatter: fe(o, a),
|
|
193
|
+
withPointLabels: l ?? t.length <= 20,
|
|
179
194
|
tooltipProps: f ? void 0 : { cursor: !1 },
|
|
180
195
|
styles: {
|
|
181
|
-
...
|
|
196
|
+
...le,
|
|
182
197
|
legendItemName: { color: P.textColor }
|
|
183
198
|
},
|
|
184
|
-
...
|
|
199
|
+
...A,
|
|
185
200
|
style: v
|
|
186
201
|
};
|
|
187
|
-
return r ? /* @__PURE__ */ i(Ie, { ...
|
|
202
|
+
return r ? /* @__PURE__ */ i(Ie, { ...M, type: S ? "stacked" : "default" }) : /* @__PURE__ */ i(Ne, { ...M });
|
|
188
203
|
}
|
|
189
|
-
function
|
|
190
|
-
categories:
|
|
191
|
-
series:
|
|
204
|
+
function gt({
|
|
205
|
+
categories: t,
|
|
206
|
+
series: e,
|
|
192
207
|
height: n = 240,
|
|
193
208
|
stacked: r,
|
|
194
|
-
horizontal:
|
|
195
|
-
normalized:
|
|
196
|
-
valueSuffix:
|
|
209
|
+
horizontal: o,
|
|
210
|
+
normalized: a,
|
|
211
|
+
valueSuffix: l,
|
|
197
212
|
valuePrefix: f,
|
|
198
213
|
showValues: d,
|
|
199
|
-
beginAtZero:
|
|
214
|
+
beginAtZero: c,
|
|
200
215
|
yMin: u,
|
|
201
216
|
yMax: m,
|
|
202
217
|
referenceLines: v,
|
|
203
218
|
style: h,
|
|
204
|
-
extra:
|
|
219
|
+
extra: b
|
|
205
220
|
}) {
|
|
206
|
-
|
|
207
|
-
|
|
221
|
+
var A;
|
|
222
|
+
const w = j(), L = ce(), P = je(
|
|
223
|
+
de(t, e),
|
|
224
|
+
e,
|
|
225
|
+
w
|
|
226
|
+
), B = a ? "percent" : r ? "stacked" : "default", $ = he({
|
|
227
|
+
beginAtZero: c,
|
|
208
228
|
yMin: u,
|
|
209
229
|
yMax: m,
|
|
210
230
|
referenceLines: v,
|
|
211
|
-
horizontal:
|
|
231
|
+
horizontal: o,
|
|
212
232
|
stacked: r,
|
|
213
|
-
normalized:
|
|
214
|
-
valueAxis:
|
|
215
|
-
}),
|
|
233
|
+
normalized: a,
|
|
234
|
+
valueAxis: b == null ? void 0 : b.valueAxis
|
|
235
|
+
}), S = !r && !a && Oe(d, e, t);
|
|
216
236
|
return /* @__PURE__ */ i(
|
|
217
|
-
|
|
237
|
+
Fe,
|
|
218
238
|
{
|
|
219
239
|
h: n,
|
|
220
240
|
data: P,
|
|
221
241
|
dataKey: "category",
|
|
222
|
-
series:
|
|
223
|
-
type:
|
|
224
|
-
orientation:
|
|
225
|
-
withLegend:
|
|
226
|
-
legendProps:
|
|
227
|
-
valueFormatter:
|
|
228
|
-
withBarValueLabel:
|
|
229
|
-
...
|
|
230
|
-
|
|
242
|
+
series: ue(e, w),
|
|
243
|
+
type: B,
|
|
244
|
+
orientation: o ? "vertical" : "horizontal",
|
|
245
|
+
withLegend: e.length > 1,
|
|
246
|
+
legendProps: se,
|
|
247
|
+
valueFormatter: fe(l, f),
|
|
248
|
+
withBarValueLabel: S,
|
|
249
|
+
...S ? {
|
|
250
|
+
valueLabelProps: o ? qe(L.barLabelColor) : pe(L.barLabelColor)
|
|
251
|
+
} : {},
|
|
252
|
+
...o ? Ze((A = b == null ? void 0 : b.categoryAxis) == null ? void 0 : A.width, S) : S ? Je() : {},
|
|
231
253
|
styles: {
|
|
232
|
-
...
|
|
233
|
-
legendItemName: { color:
|
|
254
|
+
...le,
|
|
255
|
+
legendItemName: { color: L.textColor }
|
|
234
256
|
},
|
|
235
257
|
...$,
|
|
236
258
|
style: h
|
|
237
259
|
}
|
|
238
260
|
);
|
|
239
261
|
}
|
|
240
|
-
const
|
|
241
|
-
function
|
|
242
|
-
if (
|
|
262
|
+
const Ue = 180, Qe = 540;
|
|
263
|
+
function et(t, e) {
|
|
264
|
+
if (e <= 0)
|
|
243
265
|
return "0%";
|
|
244
|
-
const n =
|
|
266
|
+
const n = t / e * 100;
|
|
245
267
|
return n < 10 && Math.abs(n - Math.round(n)) > 0.05 ? `${n.toFixed(1)}%` : `${Math.round(n)}%`;
|
|
246
268
|
}
|
|
247
|
-
function
|
|
248
|
-
return Math.max(28, Math.round(
|
|
269
|
+
function tt(t) {
|
|
270
|
+
return Math.max(28, Math.round(t * 0.22));
|
|
249
271
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
252
|
-
dataKey:
|
|
253
|
-
value:
|
|
254
|
-
color:
|
|
272
|
+
function nt(t) {
|
|
273
|
+
return t.map((e) => ({
|
|
274
|
+
dataKey: e.name,
|
|
275
|
+
value: e.name,
|
|
276
|
+
color: e.color,
|
|
255
277
|
type: "circle"
|
|
256
278
|
}));
|
|
257
279
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
280
|
+
function rt(t, e) {
|
|
281
|
+
return t.map((n) => ({
|
|
260
282
|
name: n.name,
|
|
261
283
|
color: n.color,
|
|
262
|
-
label: `${n.name} ${
|
|
284
|
+
label: `${n.name} ${et(n.value, e)}`
|
|
263
285
|
}));
|
|
264
286
|
}
|
|
265
|
-
function
|
|
266
|
-
total:
|
|
267
|
-
family:
|
|
287
|
+
function ot({
|
|
288
|
+
total: t,
|
|
289
|
+
family: e,
|
|
268
290
|
primary: n,
|
|
269
291
|
subtitle: r
|
|
270
292
|
}) {
|
|
@@ -275,48 +297,48 @@ function tt({
|
|
|
275
297
|
y: "50%",
|
|
276
298
|
textAnchor: "middle",
|
|
277
299
|
dominantBaseline: "central",
|
|
278
|
-
fontFamily:
|
|
300
|
+
fontFamily: e,
|
|
279
301
|
children: [
|
|
280
|
-
/* @__PURE__ */ i("tspan", { x: "50%", dy: "-0.4em", fontSize: 20, fontWeight: 600, fill: n, children:
|
|
302
|
+
/* @__PURE__ */ i("tspan", { x: "50%", dy: "-0.4em", fontSize: 20, fontWeight: 600, fill: n, children: t }),
|
|
281
303
|
/* @__PURE__ */ i("tspan", { x: "50%", dy: "1.55em", fontSize: 16, fontWeight: 500, fill: r, children: "Total" })
|
|
282
304
|
]
|
|
283
305
|
}
|
|
284
306
|
);
|
|
285
307
|
}
|
|
286
|
-
function
|
|
287
|
-
const [
|
|
308
|
+
function xt({ data: t, size: e = 200, donut: n, style: r }) {
|
|
309
|
+
const [o, a] = E(null), l = g(), f = j(), d = t.map((h, b) => ({
|
|
288
310
|
name: h.label,
|
|
289
311
|
value: h.value,
|
|
290
|
-
color: f(h.tone,
|
|
291
|
-
})),
|
|
292
|
-
startAngle:
|
|
293
|
-
endAngle:
|
|
312
|
+
color: f(h.tone, b)
|
|
313
|
+
})), c = d.reduce((h, b) => h + b.value, 0), u = {
|
|
314
|
+
startAngle: Ue,
|
|
315
|
+
endAngle: Qe
|
|
294
316
|
}, m = (h) => ({
|
|
295
|
-
opacity:
|
|
317
|
+
opacity: o === null || o === h ? 1 : 0.35
|
|
296
318
|
}), v = n ? /* @__PURE__ */ i(
|
|
297
|
-
|
|
319
|
+
Re,
|
|
298
320
|
{
|
|
299
321
|
data: d,
|
|
300
|
-
size:
|
|
301
|
-
thickness:
|
|
322
|
+
size: e,
|
|
323
|
+
thickness: tt(e),
|
|
302
324
|
withTooltip: !0,
|
|
303
325
|
cellProps: (h) => m(h.name),
|
|
304
326
|
...u,
|
|
305
327
|
children: /* @__PURE__ */ i(
|
|
306
|
-
|
|
328
|
+
ot,
|
|
307
329
|
{
|
|
308
|
-
total:
|
|
309
|
-
family:
|
|
310
|
-
primary:
|
|
311
|
-
subtitle:
|
|
330
|
+
total: c,
|
|
331
|
+
family: l.typography.fontFamily,
|
|
332
|
+
primary: l.text.primary,
|
|
333
|
+
subtitle: l.text.secondary
|
|
312
334
|
}
|
|
313
335
|
)
|
|
314
336
|
}
|
|
315
337
|
) : /* @__PURE__ */ i(
|
|
316
|
-
|
|
338
|
+
_e,
|
|
317
339
|
{
|
|
318
340
|
data: d,
|
|
319
|
-
size:
|
|
341
|
+
size: e,
|
|
320
342
|
withTooltip: !0,
|
|
321
343
|
withLabelsLine: !1,
|
|
322
344
|
cellProps: (h) => m(h.name),
|
|
@@ -339,8 +361,8 @@ function yt({ data: e, size: t = 200, donut: n, style: r }) {
|
|
|
339
361
|
{
|
|
340
362
|
style: {
|
|
341
363
|
width: "100%",
|
|
342
|
-
height:
|
|
343
|
-
minHeight:
|
|
364
|
+
height: e,
|
|
365
|
+
minHeight: e,
|
|
344
366
|
display: "flex",
|
|
345
367
|
alignItems: "center",
|
|
346
368
|
justifyContent: "center"
|
|
@@ -349,23 +371,23 @@ function yt({ data: e, size: t = 200, donut: n, style: r }) {
|
|
|
349
371
|
}
|
|
350
372
|
),
|
|
351
373
|
/* @__PURE__ */ i(
|
|
352
|
-
|
|
374
|
+
ze,
|
|
353
375
|
{
|
|
354
|
-
payload:
|
|
355
|
-
series:
|
|
376
|
+
payload: nt(d),
|
|
377
|
+
series: rt(d, c),
|
|
356
378
|
legendPosition: "bottom",
|
|
357
379
|
centered: !0,
|
|
358
|
-
onHighlight:
|
|
380
|
+
onHighlight: a,
|
|
359
381
|
mt: "sm",
|
|
360
382
|
w: "100%",
|
|
361
383
|
styles: {
|
|
362
384
|
legend: {
|
|
363
385
|
justifyContent: "center",
|
|
364
386
|
gap: 12,
|
|
365
|
-
color:
|
|
387
|
+
color: l.text.primary
|
|
366
388
|
},
|
|
367
389
|
legendItemName: {
|
|
368
|
-
color:
|
|
390
|
+
color: l.text.primary
|
|
369
391
|
}
|
|
370
392
|
}
|
|
371
393
|
}
|
|
@@ -374,69 +396,69 @@ function yt({ data: e, size: t = 200, donut: n, style: r }) {
|
|
|
374
396
|
}
|
|
375
397
|
);
|
|
376
398
|
}
|
|
377
|
-
function
|
|
399
|
+
function vt(t) {
|
|
378
400
|
const {
|
|
379
|
-
nodes:
|
|
401
|
+
nodes: e,
|
|
380
402
|
edges: n,
|
|
381
403
|
direction: r = "vertical",
|
|
382
|
-
nodeWidth:
|
|
383
|
-
nodeHeight:
|
|
384
|
-
rankGap:
|
|
404
|
+
nodeWidth: o = 160,
|
|
405
|
+
nodeHeight: a = 40,
|
|
406
|
+
rankGap: l = 64,
|
|
385
407
|
nodeGap: f = 48,
|
|
386
408
|
padding: d = 24
|
|
387
|
-
} =
|
|
388
|
-
for (const s of
|
|
409
|
+
} = t, c = e.map((s) => s.id), u = new Set(c), m = /* @__PURE__ */ new Map();
|
|
410
|
+
for (const s of c) m.set(s, []);
|
|
389
411
|
for (const s of n)
|
|
390
412
|
u.has(s.from) && u.has(s.to) && m.get(s.from).push(s.to);
|
|
391
|
-
const v = 0, h = 1,
|
|
392
|
-
|
|
413
|
+
const v = 0, h = 1, b = 2, w = new Map(c.map((s) => [s, v])), L = /* @__PURE__ */ new Set(), P = (s, p) => `${s}\0${p}`, B = (s) => {
|
|
414
|
+
w.set(s, h);
|
|
393
415
|
for (const p of m.get(s) ?? []) {
|
|
394
|
-
const x =
|
|
395
|
-
x === h ?
|
|
416
|
+
const x = w.get(p);
|
|
417
|
+
x === h ? L.add(P(s, p)) : x === v && B(p);
|
|
396
418
|
}
|
|
397
|
-
|
|
419
|
+
w.set(s, b);
|
|
398
420
|
};
|
|
399
|
-
for (const s of
|
|
421
|
+
for (const s of c) w.get(s) === v && B(s);
|
|
400
422
|
const $ = n.filter(
|
|
401
|
-
(s) => u.has(s.from) && u.has(s.to) && !
|
|
402
|
-
),
|
|
423
|
+
(s) => u.has(s.from) && u.has(s.to) && !L.has(P(s.from, s.to))
|
|
424
|
+
), S = new Map(c.map((s) => [s, 0])), A = new Map(c.map((s) => [s, []]));
|
|
403
425
|
for (const s of $)
|
|
404
|
-
|
|
405
|
-
const
|
|
406
|
-
for (;
|
|
407
|
-
const s =
|
|
408
|
-
for (const x of
|
|
409
|
-
|
|
426
|
+
A.get(s.from).push(s.to), S.set(s.to, (S.get(s.to) ?? 0) + 1);
|
|
427
|
+
const M = new Map(c.map((s) => [s, 0])), R = c.filter((s) => (S.get(s) ?? 0) === 0);
|
|
428
|
+
for (; R.length > 0; ) {
|
|
429
|
+
const s = R.shift(), p = M.get(s);
|
|
430
|
+
for (const x of A.get(s))
|
|
431
|
+
M.set(x, Math.max(M.get(x), p + 1)), S.set(x, S.get(x) - 1), S.get(x) === 0 && R.push(x);
|
|
410
432
|
}
|
|
411
|
-
const
|
|
412
|
-
for (const s of
|
|
413
|
-
const p =
|
|
414
|
-
|
|
433
|
+
const D = /* @__PURE__ */ new Map();
|
|
434
|
+
for (const s of c) {
|
|
435
|
+
const p = M.get(s);
|
|
436
|
+
D.has(p) || D.set(p, []), D.get(p).push(s);
|
|
415
437
|
}
|
|
416
|
-
const
|
|
438
|
+
const F = [...D.keys()].sort((s, p) => s - p), k = r === "vertical", X = (s) => s * (k ? o : a) + Math.max(0, s - 1) * f, Y = Math.max(
|
|
417
439
|
0,
|
|
418
|
-
...
|
|
419
|
-
), I = /* @__PURE__ */ new Map(),
|
|
420
|
-
|
|
421
|
-
const x =
|
|
440
|
+
...F.map((s) => X(D.get(s).length))
|
|
441
|
+
), I = /* @__PURE__ */ new Map(), q = [];
|
|
442
|
+
F.forEach((s, p) => {
|
|
443
|
+
const x = D.get(s), _ = X(x.length), z = d + (Y - _) / 2, N = d + p * ((k ? a : o) + l);
|
|
422
444
|
x.forEach((Q, ee) => {
|
|
423
|
-
const te =
|
|
445
|
+
const te = z + ee * ((k ? o : a) + f), ge = k ? te : N, xe = k ? N : te;
|
|
424
446
|
I.set(Q, { id: Q, x: ge, y: xe, rank: s, order: ee });
|
|
425
|
-
}),
|
|
447
|
+
}), q.push({
|
|
426
448
|
rank: s,
|
|
427
|
-
x:
|
|
428
|
-
y:
|
|
429
|
-
width:
|
|
430
|
-
height:
|
|
449
|
+
x: k ? z : N,
|
|
450
|
+
y: k ? N : z,
|
|
451
|
+
width: k ? _ : o,
|
|
452
|
+
height: k ? a : _,
|
|
431
453
|
nodeIds: x
|
|
432
454
|
});
|
|
433
455
|
});
|
|
434
|
-
const Z = (s, p) => s ?
|
|
435
|
-
x: s.x +
|
|
436
|
-
y: p === "source" ? s.y +
|
|
456
|
+
const Z = (s, p) => s ? k ? {
|
|
457
|
+
x: s.x + o / 2,
|
|
458
|
+
y: p === "source" ? s.y + a : s.y
|
|
437
459
|
} : {
|
|
438
|
-
x: p === "source" ? s.x +
|
|
439
|
-
y: s.y +
|
|
460
|
+
x: p === "source" ? s.x + o : s.x,
|
|
461
|
+
y: s.y + a / 2
|
|
440
462
|
} : { x: 0, y: 0 }, me = n.filter((s) => u.has(s.from) && u.has(s.to)).map((s) => {
|
|
441
463
|
const p = Z(I.get(s.from), "source"), x = Z(I.get(s.to), "target");
|
|
442
464
|
return {
|
|
@@ -446,24 +468,24 @@ function mt(e) {
|
|
|
446
468
|
sourceY: p.y,
|
|
447
469
|
targetX: x.x,
|
|
448
470
|
targetY: x.y,
|
|
449
|
-
isBackEdge:
|
|
471
|
+
isBackEdge: L.has(P(s.from, s.to))
|
|
450
472
|
};
|
|
451
|
-
}), J = d * 2 +
|
|
473
|
+
}), J = d * 2 + F.length * (k ? a : o) + Math.max(0, F.length - 1) * l, U = d * 2 + Y;
|
|
452
474
|
return {
|
|
453
475
|
nodes: [...I.values()],
|
|
454
476
|
edges: me,
|
|
455
|
-
ranks:
|
|
477
|
+
ranks: q,
|
|
456
478
|
direction: r,
|
|
457
|
-
width:
|
|
458
|
-
height:
|
|
479
|
+
width: k ? U : J,
|
|
480
|
+
height: k ? J : U
|
|
459
481
|
};
|
|
460
482
|
}
|
|
461
|
-
function
|
|
462
|
-
additions:
|
|
463
|
-
deletions:
|
|
483
|
+
function bt({
|
|
484
|
+
additions: t = 0,
|
|
485
|
+
deletions: e = 0,
|
|
464
486
|
style: n
|
|
465
487
|
}) {
|
|
466
|
-
return
|
|
488
|
+
return t === 0 && e === 0 ? null : /* @__PURE__ */ y(
|
|
467
489
|
"span",
|
|
468
490
|
{
|
|
469
491
|
style: {
|
|
@@ -475,31 +497,31 @@ function gt({
|
|
|
475
497
|
...n
|
|
476
498
|
},
|
|
477
499
|
children: [
|
|
478
|
-
|
|
500
|
+
t > 0 && /* @__PURE__ */ y("span", { style: { color: C.added }, children: [
|
|
479
501
|
"+",
|
|
480
|
-
|
|
502
|
+
t
|
|
481
503
|
] }),
|
|
482
|
-
|
|
504
|
+
e > 0 && /* @__PURE__ */ y("span", { style: { color: C.deleted }, children: [
|
|
483
505
|
"-",
|
|
484
|
-
|
|
506
|
+
e
|
|
485
507
|
] })
|
|
486
508
|
]
|
|
487
509
|
}
|
|
488
510
|
);
|
|
489
511
|
}
|
|
490
|
-
const
|
|
512
|
+
const at = {
|
|
491
513
|
added: "+",
|
|
492
514
|
removed: "-",
|
|
493
515
|
unchanged: " "
|
|
494
516
|
};
|
|
495
|
-
function
|
|
496
|
-
lines:
|
|
497
|
-
showLineNumbers:
|
|
517
|
+
function St({
|
|
518
|
+
lines: t,
|
|
519
|
+
showLineNumbers: e = !0,
|
|
498
520
|
coloredLineNumbers: n = !0,
|
|
499
521
|
showAccentStrip: r = !0,
|
|
500
|
-
style:
|
|
522
|
+
style: o
|
|
501
523
|
}) {
|
|
502
|
-
const
|
|
524
|
+
const a = g(), l = (c) => c === "added" ? a.diff.insertedLine : c === "removed" ? a.diff.removedLine : "transparent", f = (c) => c === "added" ? a.diff.stripAdded : c === "removed" ? a.diff.stripRemoved : "transparent", d = (c) => n && c === "added" ? C.added : n && c === "removed" ? C.deleted : a.text.tertiary;
|
|
503
525
|
return /* @__PURE__ */ i(
|
|
504
526
|
"div",
|
|
505
527
|
{
|
|
@@ -507,21 +529,21 @@ function xt({
|
|
|
507
529
|
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", monospace',
|
|
508
530
|
fontSize: 12.5,
|
|
509
531
|
lineHeight: "18px",
|
|
510
|
-
color:
|
|
532
|
+
color: a.text.primary,
|
|
511
533
|
overflowX: "auto",
|
|
512
|
-
...
|
|
534
|
+
...o
|
|
513
535
|
},
|
|
514
|
-
children:
|
|
536
|
+
children: t.map((c, u) => /* @__PURE__ */ y(
|
|
515
537
|
"div",
|
|
516
538
|
{
|
|
517
539
|
style: {
|
|
518
540
|
display: "flex",
|
|
519
541
|
alignItems: "stretch",
|
|
520
|
-
background: c
|
|
521
|
-
borderLeft: r ? `3px solid ${f(
|
|
542
|
+
background: l(c.type),
|
|
543
|
+
borderLeft: r ? `3px solid ${f(c.type)}` : void 0
|
|
522
544
|
},
|
|
523
545
|
children: [
|
|
524
|
-
|
|
546
|
+
e && /* @__PURE__ */ i(
|
|
525
547
|
"span",
|
|
526
548
|
{
|
|
527
549
|
style: {
|
|
@@ -530,9 +552,9 @@ function xt({
|
|
|
530
552
|
textAlign: "right",
|
|
531
553
|
paddingRight: 10,
|
|
532
554
|
userSelect: "none",
|
|
533
|
-
color: d(
|
|
555
|
+
color: d(c.type)
|
|
534
556
|
},
|
|
535
|
-
children:
|
|
557
|
+
children: c.lineNumber ?? ""
|
|
536
558
|
}
|
|
537
559
|
),
|
|
538
560
|
/* @__PURE__ */ i(
|
|
@@ -543,9 +565,9 @@ function xt({
|
|
|
543
565
|
width: 14,
|
|
544
566
|
textAlign: "center",
|
|
545
567
|
userSelect: "none",
|
|
546
|
-
color: d(
|
|
568
|
+
color: d(c.type)
|
|
547
569
|
},
|
|
548
|
-
children:
|
|
570
|
+
children: at[c.type]
|
|
549
571
|
}
|
|
550
572
|
),
|
|
551
573
|
/* @__PURE__ */ i(
|
|
@@ -557,7 +579,7 @@ function xt({
|
|
|
557
579
|
whiteSpace: "pre",
|
|
558
580
|
fontFamily: "inherit"
|
|
559
581
|
},
|
|
560
|
-
children:
|
|
582
|
+
children: c.content
|
|
561
583
|
}
|
|
562
584
|
)
|
|
563
585
|
]
|
|
@@ -567,8 +589,8 @@ function xt({
|
|
|
567
589
|
}
|
|
568
590
|
);
|
|
569
591
|
}
|
|
570
|
-
function
|
|
571
|
-
const
|
|
592
|
+
function it({ status: t }) {
|
|
593
|
+
const e = g(), n = t === "completed" ? C.success : t === "in_progress" ? e.accent.primary : t === "cancelled" ? C.danger : e.text.tertiary;
|
|
572
594
|
return /* @__PURE__ */ y(
|
|
573
595
|
"svg",
|
|
574
596
|
{
|
|
@@ -580,7 +602,7 @@ function rt({ status: e }) {
|
|
|
580
602
|
"aria-hidden": !0,
|
|
581
603
|
children: [
|
|
582
604
|
/* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 6, stroke: n, strokeWidth: 1.4 }),
|
|
583
|
-
|
|
605
|
+
t === "completed" && /* @__PURE__ */ i(
|
|
584
606
|
"path",
|
|
585
607
|
{
|
|
586
608
|
d: "M4 7.2l2 2 4-4.4",
|
|
@@ -590,8 +612,8 @@ function rt({ status: e }) {
|
|
|
590
612
|
strokeLinejoin: "round"
|
|
591
613
|
}
|
|
592
614
|
),
|
|
593
|
-
|
|
594
|
-
|
|
615
|
+
t === "in_progress" && /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 3, fill: n }),
|
|
616
|
+
t === "cancelled" && /* @__PURE__ */ i(
|
|
595
617
|
"path",
|
|
596
618
|
{
|
|
597
619
|
d: "M4.8 4.8l4.4 4.4M9.2 4.8l-4.4 4.4",
|
|
@@ -604,20 +626,20 @@ function rt({ status: e }) {
|
|
|
604
626
|
}
|
|
605
627
|
);
|
|
606
628
|
}
|
|
607
|
-
function
|
|
608
|
-
todos:
|
|
609
|
-
dimmedTodoIds:
|
|
629
|
+
function st({
|
|
630
|
+
todos: t,
|
|
631
|
+
dimmedTodoIds: e,
|
|
610
632
|
onTodoClick: n,
|
|
611
633
|
style: r
|
|
612
634
|
}) {
|
|
613
|
-
const
|
|
614
|
-
return
|
|
615
|
-
const
|
|
635
|
+
const o = g();
|
|
636
|
+
return t.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...r }, children: t.map((a) => {
|
|
637
|
+
const l = e == null ? void 0 : e.has(a.id);
|
|
616
638
|
return /* @__PURE__ */ y(
|
|
617
639
|
"button",
|
|
618
640
|
{
|
|
619
641
|
type: "button",
|
|
620
|
-
onClick: () => n == null ? void 0 : n(
|
|
642
|
+
onClick: () => n == null ? void 0 : n(a),
|
|
621
643
|
style: {
|
|
622
644
|
display: "flex",
|
|
623
645
|
gap: 8,
|
|
@@ -628,64 +650,64 @@ function ot({
|
|
|
628
650
|
background: "transparent",
|
|
629
651
|
border: "none",
|
|
630
652
|
cursor: n ? "pointer" : "default",
|
|
631
|
-
color:
|
|
653
|
+
color: o.text.primary,
|
|
632
654
|
fontSize: 14,
|
|
633
655
|
lineHeight: "20px",
|
|
634
|
-
opacity:
|
|
656
|
+
opacity: l ? 0.45 : 1
|
|
635
657
|
},
|
|
636
658
|
children: [
|
|
637
|
-
/* @__PURE__ */ i(
|
|
659
|
+
/* @__PURE__ */ i(it, { status: a.status }),
|
|
638
660
|
/* @__PURE__ */ i(
|
|
639
661
|
"span",
|
|
640
662
|
{
|
|
641
663
|
style: {
|
|
642
|
-
textDecoration:
|
|
643
|
-
color:
|
|
664
|
+
textDecoration: a.status === "cancelled" ? "line-through" : void 0,
|
|
665
|
+
color: a.status === "cancelled" ? o.text.tertiary : void 0
|
|
644
666
|
},
|
|
645
|
-
children:
|
|
667
|
+
children: a.content
|
|
646
668
|
}
|
|
647
669
|
)
|
|
648
670
|
]
|
|
649
671
|
},
|
|
650
|
-
|
|
672
|
+
a.id
|
|
651
673
|
);
|
|
652
674
|
}) });
|
|
653
675
|
}
|
|
654
|
-
function
|
|
655
|
-
todos:
|
|
656
|
-
dimmedTodoIds:
|
|
676
|
+
function kt({
|
|
677
|
+
todos: t,
|
|
678
|
+
dimmedTodoIds: e,
|
|
657
679
|
defaultExpanded: n = !1,
|
|
658
680
|
onTodoClick: r,
|
|
659
|
-
style:
|
|
681
|
+
style: o
|
|
660
682
|
}) {
|
|
661
|
-
const
|
|
662
|
-
if (
|
|
663
|
-
const d =
|
|
683
|
+
const a = g(), [l, f] = E(n);
|
|
684
|
+
if (t.length === 0) return null;
|
|
685
|
+
const d = t.filter((c) => c.status === "completed").length;
|
|
664
686
|
return /* @__PURE__ */ y(
|
|
665
687
|
"div",
|
|
666
688
|
{
|
|
667
689
|
style: {
|
|
668
|
-
border: `1px solid ${
|
|
690
|
+
border: `1px solid ${a.stroke.primary}`,
|
|
669
691
|
borderRadius: 6,
|
|
670
692
|
overflow: "hidden",
|
|
671
|
-
...
|
|
693
|
+
...o
|
|
672
694
|
},
|
|
673
695
|
children: [
|
|
674
696
|
/* @__PURE__ */ y(
|
|
675
697
|
"button",
|
|
676
698
|
{
|
|
677
699
|
type: "button",
|
|
678
|
-
onClick: () => f((
|
|
700
|
+
onClick: () => f((c) => !c),
|
|
679
701
|
style: {
|
|
680
702
|
display: "flex",
|
|
681
703
|
alignItems: "center",
|
|
682
704
|
gap: 8,
|
|
683
705
|
width: "100%",
|
|
684
706
|
padding: "6px 10px",
|
|
685
|
-
background:
|
|
707
|
+
background: a.fill.secondary,
|
|
686
708
|
border: "none",
|
|
687
709
|
cursor: "pointer",
|
|
688
|
-
color:
|
|
710
|
+
color: a.text.secondary,
|
|
689
711
|
fontSize: 12,
|
|
690
712
|
fontWeight: 600
|
|
691
713
|
},
|
|
@@ -698,7 +720,7 @@ function vt({
|
|
|
698
720
|
viewBox: "0 0 12 12",
|
|
699
721
|
fill: "none",
|
|
700
722
|
style: {
|
|
701
|
-
transform:
|
|
723
|
+
transform: l ? "rotate(90deg)" : "none",
|
|
702
724
|
transition: "transform 120ms"
|
|
703
725
|
},
|
|
704
726
|
"aria-hidden": !0,
|
|
@@ -719,17 +741,17 @@ function vt({
|
|
|
719
741
|
/* @__PURE__ */ y("span", { children: [
|
|
720
742
|
d,
|
|
721
743
|
" of ",
|
|
722
|
-
|
|
744
|
+
t.length,
|
|
723
745
|
" Done"
|
|
724
746
|
] })
|
|
725
747
|
]
|
|
726
748
|
}
|
|
727
749
|
),
|
|
728
|
-
|
|
729
|
-
|
|
750
|
+
l && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
|
|
751
|
+
st,
|
|
730
752
|
{
|
|
731
|
-
todos:
|
|
732
|
-
dimmedTodoIds:
|
|
753
|
+
todos: t,
|
|
754
|
+
dimmedTodoIds: e,
|
|
733
755
|
onTodoClick: r
|
|
734
756
|
}
|
|
735
757
|
) })
|
|
@@ -737,19 +759,19 @@ function vt({
|
|
|
737
759
|
}
|
|
738
760
|
);
|
|
739
761
|
}
|
|
740
|
-
function
|
|
741
|
-
const n = `canvas:${
|
|
742
|
-
if (typeof localStorage > "u") return
|
|
762
|
+
function Ct(t, e) {
|
|
763
|
+
const n = `canvas:${t}`, [r, o] = E(() => {
|
|
764
|
+
if (typeof localStorage > "u") return e;
|
|
743
765
|
try {
|
|
744
|
-
const
|
|
745
|
-
return
|
|
766
|
+
const l = localStorage.getItem(n);
|
|
767
|
+
return l === null ? e : JSON.parse(l);
|
|
746
768
|
} catch {
|
|
747
|
-
return
|
|
769
|
+
return e;
|
|
748
770
|
}
|
|
749
|
-
}),
|
|
750
|
-
(
|
|
751
|
-
|
|
752
|
-
const d = typeof
|
|
771
|
+
}), a = G(
|
|
772
|
+
(l) => {
|
|
773
|
+
o((f) => {
|
|
774
|
+
const d = typeof l == "function" ? l(f) : l;
|
|
753
775
|
try {
|
|
754
776
|
localStorage == null || localStorage.setItem(n, JSON.stringify(d));
|
|
755
777
|
} catch {
|
|
@@ -759,76 +781,76 @@ function bt(e, t) {
|
|
|
759
781
|
},
|
|
760
782
|
[n]
|
|
761
783
|
);
|
|
762
|
-
return [r,
|
|
784
|
+
return [r, a];
|
|
763
785
|
}
|
|
764
|
-
function
|
|
765
|
-
return G((
|
|
786
|
+
function wt() {
|
|
787
|
+
return G((t) => {
|
|
766
788
|
}, []);
|
|
767
789
|
}
|
|
768
|
-
function
|
|
769
|
-
return { ...
|
|
790
|
+
function Lt(t, e) {
|
|
791
|
+
return { ...t, ...e };
|
|
770
792
|
}
|
|
771
|
-
function K(
|
|
772
|
-
const r =
|
|
793
|
+
function K(t, e, n) {
|
|
794
|
+
const r = t.typography[e];
|
|
773
795
|
return {
|
|
774
|
-
fontFamily:
|
|
796
|
+
fontFamily: t.typography.fontFamily,
|
|
775
797
|
fontSize: r.fontSize,
|
|
776
798
|
lineHeight: r.lineHeight,
|
|
777
799
|
fontWeight: r.fontWeight,
|
|
778
|
-
color:
|
|
800
|
+
color: t.text.primary,
|
|
779
801
|
margin: 0,
|
|
780
802
|
...n
|
|
781
803
|
};
|
|
782
804
|
}
|
|
783
|
-
function
|
|
805
|
+
function Tt({ children: t, style: e }) {
|
|
784
806
|
const n = g();
|
|
785
|
-
return /* @__PURE__ */ i(W, { order: 1, style: K(n, "h1",
|
|
807
|
+
return /* @__PURE__ */ i(W, { order: 1, style: K(n, "h1", e), children: t });
|
|
786
808
|
}
|
|
787
|
-
function
|
|
809
|
+
function Pt({ children: t, style: e }) {
|
|
788
810
|
const n = g();
|
|
789
|
-
return /* @__PURE__ */ i(W, { order: 2, style: K(n, "h2",
|
|
811
|
+
return /* @__PURE__ */ i(W, { order: 2, style: K(n, "h2", e), children: t });
|
|
790
812
|
}
|
|
791
|
-
function
|
|
813
|
+
function At({ children: t, style: e }) {
|
|
792
814
|
const n = g();
|
|
793
|
-
return /* @__PURE__ */ i(W, { order: 3, style: K(n, "h3",
|
|
815
|
+
return /* @__PURE__ */ i(W, { order: 3, style: K(n, "h3", e), children: t });
|
|
794
816
|
}
|
|
795
|
-
const
|
|
817
|
+
const lt = {
|
|
796
818
|
normal: 400,
|
|
797
819
|
medium: 500,
|
|
798
820
|
semibold: 600,
|
|
799
821
|
bold: 700
|
|
800
|
-
},
|
|
801
|
-
function
|
|
802
|
-
children:
|
|
803
|
-
tone:
|
|
822
|
+
}, re = ae(!1);
|
|
823
|
+
function Mt({
|
|
824
|
+
children: t,
|
|
825
|
+
tone: e = "primary",
|
|
804
826
|
size: n = "body",
|
|
805
827
|
as: r = "p",
|
|
806
|
-
weight:
|
|
807
|
-
italic:
|
|
808
|
-
truncate:
|
|
828
|
+
weight: o = "normal",
|
|
829
|
+
italic: a,
|
|
830
|
+
truncate: l,
|
|
809
831
|
style: f
|
|
810
832
|
}) {
|
|
811
|
-
const d = g(), u = O(
|
|
812
|
-
return /* @__PURE__ */ i(
|
|
833
|
+
const d = g(), u = O(re) && r === "p" ? "span" : r, m = r === "p";
|
|
834
|
+
return /* @__PURE__ */ i(re.Provider, { value: !0, children: /* @__PURE__ */ i(
|
|
813
835
|
H,
|
|
814
836
|
{
|
|
815
837
|
component: u,
|
|
816
838
|
size: n === "small" ? "xs" : "sm",
|
|
817
|
-
fw:
|
|
818
|
-
c:
|
|
819
|
-
truncate:
|
|
839
|
+
fw: lt[o],
|
|
840
|
+
c: e === "primary" ? void 0 : d.text[e],
|
|
841
|
+
truncate: l,
|
|
820
842
|
style: {
|
|
821
|
-
fontStyle:
|
|
822
|
-
...
|
|
843
|
+
fontStyle: a ? "italic" : void 0,
|
|
844
|
+
...e === "primary" ? { color: d.text.primary } : void 0,
|
|
823
845
|
...m && u === "span" ? { display: "block" } : void 0,
|
|
824
846
|
fontFamily: d.typography.fontFamily,
|
|
825
847
|
...f
|
|
826
848
|
},
|
|
827
|
-
children:
|
|
849
|
+
children: t
|
|
828
850
|
}
|
|
829
851
|
) });
|
|
830
852
|
}
|
|
831
|
-
function
|
|
853
|
+
function Bt({ children: t, style: e }) {
|
|
832
854
|
const n = g();
|
|
833
855
|
return /* @__PURE__ */ i(
|
|
834
856
|
"code",
|
|
@@ -840,117 +862,117 @@ function Pt({ children: e, style: t }) {
|
|
|
840
862
|
background: n.fill.secondary,
|
|
841
863
|
borderRadius: n.radius.sm,
|
|
842
864
|
padding: "1px 4px",
|
|
843
|
-
...
|
|
865
|
+
...e
|
|
844
866
|
},
|
|
845
|
-
children:
|
|
867
|
+
children: t
|
|
846
868
|
}
|
|
847
869
|
);
|
|
848
870
|
}
|
|
849
|
-
function
|
|
871
|
+
function Dt({ children: t, href: e, style: n }) {
|
|
850
872
|
const r = g();
|
|
851
873
|
return /* @__PURE__ */ i(
|
|
852
874
|
"a",
|
|
853
875
|
{
|
|
854
|
-
href:
|
|
876
|
+
href: e,
|
|
855
877
|
target: "_blank",
|
|
856
878
|
rel: "noreferrer",
|
|
857
879
|
style: { color: r.text.link, ...n },
|
|
858
|
-
children:
|
|
880
|
+
children: t
|
|
859
881
|
}
|
|
860
882
|
);
|
|
861
883
|
}
|
|
862
|
-
function
|
|
863
|
-
return /* @__PURE__ */ i(Me, { gap:
|
|
884
|
+
function $t({ children: t, gap: e, style: n }) {
|
|
885
|
+
return /* @__PURE__ */ i(Me, { gap: e, style: n, children: t });
|
|
864
886
|
}
|
|
865
|
-
const
|
|
887
|
+
const oe = {
|
|
866
888
|
start: "flex-start",
|
|
867
889
|
center: "center",
|
|
868
890
|
end: "flex-end",
|
|
869
891
|
stretch: "stretch",
|
|
870
892
|
"space-between": "space-between"
|
|
871
893
|
};
|
|
872
|
-
function
|
|
873
|
-
children:
|
|
874
|
-
gap:
|
|
894
|
+
function Et({
|
|
895
|
+
children: t,
|
|
896
|
+
gap: e,
|
|
875
897
|
align: n = "center",
|
|
876
898
|
justify: r = "start",
|
|
877
|
-
wrap:
|
|
878
|
-
style:
|
|
899
|
+
wrap: o = !1,
|
|
900
|
+
style: a
|
|
879
901
|
}) {
|
|
880
902
|
return /* @__PURE__ */ i(
|
|
881
903
|
Pe,
|
|
882
904
|
{
|
|
883
|
-
gap:
|
|
884
|
-
align:
|
|
885
|
-
justify:
|
|
886
|
-
wrap:
|
|
887
|
-
style:
|
|
888
|
-
children:
|
|
905
|
+
gap: e,
|
|
906
|
+
align: oe[n],
|
|
907
|
+
justify: oe[r],
|
|
908
|
+
wrap: o ? "wrap" : "nowrap",
|
|
909
|
+
style: a,
|
|
910
|
+
children: t
|
|
889
911
|
}
|
|
890
912
|
);
|
|
891
913
|
}
|
|
892
|
-
function
|
|
914
|
+
function Ft() {
|
|
893
915
|
return /* @__PURE__ */ i("div", { style: { flex: 1 } });
|
|
894
916
|
}
|
|
895
|
-
function
|
|
896
|
-
const
|
|
917
|
+
function It({ children: t, columns: e, gap: n = 16, align: r, style: o }) {
|
|
918
|
+
const a = typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
|
|
897
919
|
return /* @__PURE__ */ i(
|
|
898
920
|
"div",
|
|
899
921
|
{
|
|
900
922
|
style: {
|
|
901
923
|
display: "grid",
|
|
902
|
-
gridTemplateColumns:
|
|
924
|
+
gridTemplateColumns: a,
|
|
903
925
|
gap: n,
|
|
904
926
|
alignItems: r,
|
|
905
|
-
...
|
|
927
|
+
...o
|
|
906
928
|
},
|
|
907
|
-
children:
|
|
929
|
+
children: t
|
|
908
930
|
}
|
|
909
931
|
);
|
|
910
932
|
}
|
|
911
|
-
function
|
|
912
|
-
return /* @__PURE__ */ i(
|
|
933
|
+
function Nt({ style: t }) {
|
|
934
|
+
return /* @__PURE__ */ i(we, { style: t });
|
|
913
935
|
}
|
|
914
|
-
const
|
|
936
|
+
const V = ae({
|
|
915
937
|
collapsible: !1,
|
|
916
938
|
open: !0,
|
|
917
939
|
toggle: () => {
|
|
918
940
|
}
|
|
919
941
|
});
|
|
920
|
-
function
|
|
921
|
-
children:
|
|
922
|
-
variant:
|
|
942
|
+
function Rt({
|
|
943
|
+
children: t,
|
|
944
|
+
variant: e = "default",
|
|
923
945
|
collapsible: n = !1,
|
|
924
946
|
defaultOpen: r = !0,
|
|
925
|
-
open:
|
|
926
|
-
onOpenChange:
|
|
927
|
-
style:
|
|
947
|
+
open: o,
|
|
948
|
+
onOpenChange: a,
|
|
949
|
+
style: l
|
|
928
950
|
}) {
|
|
929
|
-
const f = g(), [d,
|
|
951
|
+
const f = g(), [d, c] = E(r), u = o ?? d, m = G(() => {
|
|
930
952
|
const v = !u;
|
|
931
|
-
|
|
932
|
-
}, [u,
|
|
953
|
+
o === void 0 && c(v), a == null || a(v);
|
|
954
|
+
}, [u, o, a]);
|
|
933
955
|
return /* @__PURE__ */ i(
|
|
934
956
|
ke,
|
|
935
957
|
{
|
|
936
|
-
withBorder:
|
|
958
|
+
withBorder: e !== "borderless",
|
|
937
959
|
radius: f.radius.md,
|
|
938
960
|
padding: 0,
|
|
939
961
|
style: {
|
|
940
962
|
background: f.bg.elevated,
|
|
941
963
|
borderColor: f.stroke.secondary,
|
|
942
|
-
...
|
|
964
|
+
...l
|
|
943
965
|
},
|
|
944
|
-
children: /* @__PURE__ */ i(
|
|
966
|
+
children: /* @__PURE__ */ i(V.Provider, { value: { collapsible: n, open: u, toggle: m }, children: t })
|
|
945
967
|
}
|
|
946
968
|
);
|
|
947
969
|
}
|
|
948
|
-
function
|
|
949
|
-
const r = g(), { collapsible:
|
|
970
|
+
function _t({ children: t, trailing: e, style: n }) {
|
|
971
|
+
const r = g(), { collapsible: o, open: a, toggle: l } = O(V);
|
|
950
972
|
return /* @__PURE__ */ y(
|
|
951
973
|
"div",
|
|
952
974
|
{
|
|
953
|
-
onClick:
|
|
975
|
+
onClick: o ? l : void 0,
|
|
954
976
|
style: {
|
|
955
977
|
display: "flex",
|
|
956
978
|
alignItems: "center",
|
|
@@ -962,25 +984,25 @@ function It({ children: e, trailing: t, style: n }) {
|
|
|
962
984
|
fontWeight: r.typography.h3.fontWeight,
|
|
963
985
|
color: r.text.primary,
|
|
964
986
|
fontFamily: r.typography.fontFamily,
|
|
965
|
-
cursor:
|
|
966
|
-
userSelect:
|
|
987
|
+
cursor: o ? "pointer" : void 0,
|
|
988
|
+
userSelect: o ? "none" : void 0,
|
|
967
989
|
...n
|
|
968
990
|
},
|
|
969
991
|
children: [
|
|
970
992
|
/* @__PURE__ */ y("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
|
|
971
|
-
|
|
972
|
-
|
|
993
|
+
o && /* @__PURE__ */ i(ye, { expanded: a }),
|
|
994
|
+
t
|
|
973
995
|
] }),
|
|
974
|
-
|
|
996
|
+
e != null && /* @__PURE__ */ i("span", { children: e })
|
|
975
997
|
]
|
|
976
998
|
}
|
|
977
999
|
);
|
|
978
1000
|
}
|
|
979
|
-
function
|
|
980
|
-
const { collapsible: n, open: r } = O(
|
|
981
|
-
return n && !r ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...
|
|
1001
|
+
function zt({ children: t, style: e }) {
|
|
1002
|
+
const { collapsible: n, open: r } = O(V);
|
|
1003
|
+
return n && !r ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...e }, children: t });
|
|
982
1004
|
}
|
|
983
|
-
function ye({ expanded:
|
|
1005
|
+
function ye({ expanded: t }) {
|
|
984
1006
|
return /* @__PURE__ */ i(
|
|
985
1007
|
"svg",
|
|
986
1008
|
{
|
|
@@ -989,7 +1011,7 @@ function ye({ expanded: e }) {
|
|
|
989
1011
|
viewBox: "0 0 12 12",
|
|
990
1012
|
fill: "none",
|
|
991
1013
|
style: {
|
|
992
|
-
transform:
|
|
1014
|
+
transform: t ? "rotate(90deg)" : "none",
|
|
993
1015
|
transition: "transform 120ms"
|
|
994
1016
|
},
|
|
995
1017
|
"aria-hidden": !0,
|
|
@@ -1006,8 +1028,8 @@ function ye({ expanded: e }) {
|
|
|
1006
1028
|
}
|
|
1007
1029
|
);
|
|
1008
1030
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const
|
|
1031
|
+
function Ht({ value: t, label: e, tone: n, style: r }) {
|
|
1032
|
+
const o = g();
|
|
1011
1033
|
return /* @__PURE__ */ y("div", { style: r, children: [
|
|
1012
1034
|
/* @__PURE__ */ i(
|
|
1013
1035
|
H,
|
|
@@ -1016,10 +1038,10 @@ function zt({ value: e, label: t, tone: n, style: r }) {
|
|
|
1016
1038
|
fw: 700,
|
|
1017
1039
|
lh: 1.2,
|
|
1018
1040
|
style: {
|
|
1019
|
-
color: n ?
|
|
1020
|
-
fontFamily:
|
|
1041
|
+
color: n ? C[n] : o.text.primary,
|
|
1042
|
+
fontFamily: o.typography.fontFamily
|
|
1021
1043
|
},
|
|
1022
|
-
children:
|
|
1044
|
+
children: t
|
|
1023
1045
|
}
|
|
1024
1046
|
),
|
|
1025
1047
|
/* @__PURE__ */ i(
|
|
@@ -1027,103 +1049,103 @@ function zt({ value: e, label: t, tone: n, style: r }) {
|
|
|
1027
1049
|
{
|
|
1028
1050
|
fz: 12,
|
|
1029
1051
|
style: {
|
|
1030
|
-
color:
|
|
1031
|
-
fontFamily:
|
|
1052
|
+
color: o.text.tertiary,
|
|
1053
|
+
fontFamily: o.typography.fontFamily
|
|
1032
1054
|
},
|
|
1033
|
-
children:
|
|
1055
|
+
children: e
|
|
1034
1056
|
}
|
|
1035
1057
|
)
|
|
1036
1058
|
] });
|
|
1037
1059
|
}
|
|
1038
|
-
function
|
|
1039
|
-
children:
|
|
1040
|
-
active:
|
|
1060
|
+
function Wt({
|
|
1061
|
+
children: t,
|
|
1062
|
+
active: e,
|
|
1041
1063
|
tone: n = "neutral",
|
|
1042
1064
|
size: r = "md",
|
|
1043
|
-
leadingContent:
|
|
1044
|
-
keyboardHint:
|
|
1045
|
-
title:
|
|
1065
|
+
leadingContent: o,
|
|
1066
|
+
keyboardHint: a,
|
|
1067
|
+
title: l,
|
|
1046
1068
|
style: f,
|
|
1047
1069
|
onClick: d
|
|
1048
1070
|
}) {
|
|
1049
1071
|
return /* @__PURE__ */ i(
|
|
1050
1072
|
Te,
|
|
1051
1073
|
{
|
|
1052
|
-
color:
|
|
1053
|
-
variant:
|
|
1074
|
+
color: ie[n],
|
|
1075
|
+
variant: e ? "filled" : "light",
|
|
1054
1076
|
size: r === "sm" ? "sm" : "md",
|
|
1055
|
-
leftSection:
|
|
1056
|
-
rightSection:
|
|
1057
|
-
title:
|
|
1077
|
+
leftSection: o,
|
|
1078
|
+
rightSection: a,
|
|
1079
|
+
title: l,
|
|
1058
1080
|
onClick: d,
|
|
1059
1081
|
style: {
|
|
1060
1082
|
cursor: d ? "pointer" : void 0,
|
|
1061
1083
|
textTransform: "none",
|
|
1062
1084
|
...f
|
|
1063
1085
|
},
|
|
1064
|
-
children:
|
|
1086
|
+
children: t
|
|
1065
1087
|
}
|
|
1066
1088
|
);
|
|
1067
1089
|
}
|
|
1068
|
-
function
|
|
1069
|
-
children:
|
|
1070
|
-
tone:
|
|
1090
|
+
function Gt({
|
|
1091
|
+
children: t,
|
|
1092
|
+
tone: e = "neutral",
|
|
1071
1093
|
title: n,
|
|
1072
1094
|
icon: r,
|
|
1073
|
-
style:
|
|
1095
|
+
style: o
|
|
1074
1096
|
}) {
|
|
1075
1097
|
return /* @__PURE__ */ i(
|
|
1076
1098
|
Se,
|
|
1077
1099
|
{
|
|
1078
|
-
color:
|
|
1100
|
+
color: ie[e],
|
|
1079
1101
|
title: n,
|
|
1080
1102
|
icon: r,
|
|
1081
1103
|
variant: "light",
|
|
1082
|
-
style:
|
|
1083
|
-
children:
|
|
1104
|
+
style: o,
|
|
1105
|
+
children: t
|
|
1084
1106
|
}
|
|
1085
1107
|
);
|
|
1086
1108
|
}
|
|
1087
|
-
const
|
|
1109
|
+
const ct = {
|
|
1088
1110
|
success: "rgba(31,138,101,0.12)",
|
|
1089
1111
|
danger: "rgba(207,45,86,0.12)",
|
|
1090
1112
|
warning: "rgba(232,163,61,0.14)",
|
|
1091
1113
|
info: "rgba(46,121,181,0.12)",
|
|
1092
1114
|
neutral: "rgba(136,136,168,0.12)"
|
|
1093
1115
|
};
|
|
1094
|
-
function
|
|
1095
|
-
headers:
|
|
1096
|
-
rows:
|
|
1116
|
+
function Ot({
|
|
1117
|
+
headers: t,
|
|
1118
|
+
rows: e,
|
|
1097
1119
|
columnAlign: n,
|
|
1098
1120
|
rowTone: r,
|
|
1099
|
-
framed:
|
|
1100
|
-
striped:
|
|
1101
|
-
stickyHeader:
|
|
1121
|
+
framed: o = !0,
|
|
1122
|
+
striped: a,
|
|
1123
|
+
stickyHeader: l,
|
|
1102
1124
|
style: f,
|
|
1103
1125
|
emptyMessage: d
|
|
1104
1126
|
}) {
|
|
1105
1127
|
return /* @__PURE__ */ y(
|
|
1106
|
-
|
|
1128
|
+
T,
|
|
1107
1129
|
{
|
|
1108
|
-
withTableBorder:
|
|
1130
|
+
withTableBorder: o,
|
|
1109
1131
|
withColumnBorders: !1,
|
|
1110
|
-
striped:
|
|
1111
|
-
stickyHeader:
|
|
1132
|
+
striped: a,
|
|
1133
|
+
stickyHeader: l,
|
|
1112
1134
|
highlightOnHover: !0,
|
|
1113
1135
|
style: f,
|
|
1114
1136
|
children: [
|
|
1115
|
-
/* @__PURE__ */ i(
|
|
1116
|
-
/* @__PURE__ */ i(
|
|
1137
|
+
/* @__PURE__ */ i(T.Thead, { children: /* @__PURE__ */ i(T.Tr, { children: t.map((c, u) => /* @__PURE__ */ i(T.Th, { ta: (n == null ? void 0 : n[u]) ?? "left", children: c }, u)) }) }),
|
|
1138
|
+
/* @__PURE__ */ i(T.Tbody, { children: e.length === 0 ? /* @__PURE__ */ i(T.Tr, { children: /* @__PURE__ */ i(T.Td, { colSpan: t.length, ta: "center", c: "dimmed", children: d ?? "No data" }) }) : e.map((c, u) => {
|
|
1117
1139
|
const m = r == null ? void 0 : r[u];
|
|
1118
1140
|
return /* @__PURE__ */ i(
|
|
1119
|
-
|
|
1141
|
+
T.Tr,
|
|
1120
1142
|
{
|
|
1121
|
-
style: m ? { background:
|
|
1122
|
-
children:
|
|
1123
|
-
|
|
1143
|
+
style: m ? { background: ct[m] } : void 0,
|
|
1144
|
+
children: t.map((v, h) => /* @__PURE__ */ i(
|
|
1145
|
+
T.Td,
|
|
1124
1146
|
{
|
|
1125
1147
|
ta: (n == null ? void 0 : n[h]) ?? "left",
|
|
1126
|
-
children:
|
|
1148
|
+
children: c[h]
|
|
1127
1149
|
},
|
|
1128
1150
|
h
|
|
1129
1151
|
))
|
|
@@ -1135,159 +1157,159 @@ function Ht({
|
|
|
1135
1157
|
}
|
|
1136
1158
|
);
|
|
1137
1159
|
}
|
|
1138
|
-
const
|
|
1160
|
+
const dt = {
|
|
1139
1161
|
primary: "filled",
|
|
1140
1162
|
secondary: "default",
|
|
1141
1163
|
ghost: "subtle"
|
|
1142
1164
|
};
|
|
1143
|
-
function
|
|
1144
|
-
children:
|
|
1145
|
-
variant:
|
|
1165
|
+
function jt({
|
|
1166
|
+
children: t,
|
|
1167
|
+
variant: e = "secondary",
|
|
1146
1168
|
disabled: n,
|
|
1147
1169
|
type: r = "button",
|
|
1148
|
-
style:
|
|
1149
|
-
onClick:
|
|
1170
|
+
style: o,
|
|
1171
|
+
onClick: a
|
|
1150
1172
|
}) {
|
|
1151
1173
|
return /* @__PURE__ */ i(
|
|
1152
1174
|
be,
|
|
1153
1175
|
{
|
|
1154
|
-
variant:
|
|
1155
|
-
color:
|
|
1176
|
+
variant: dt[e],
|
|
1177
|
+
color: e === "primary" ? "accent" : void 0,
|
|
1156
1178
|
size: "xs",
|
|
1157
1179
|
disabled: n,
|
|
1158
1180
|
type: r,
|
|
1159
|
-
onClick:
|
|
1160
|
-
style:
|
|
1161
|
-
children:
|
|
1181
|
+
onClick: a,
|
|
1182
|
+
style: o,
|
|
1183
|
+
children: t
|
|
1162
1184
|
}
|
|
1163
1185
|
);
|
|
1164
1186
|
}
|
|
1165
|
-
function
|
|
1166
|
-
children:
|
|
1167
|
-
onClick:
|
|
1187
|
+
function Kt({
|
|
1188
|
+
children: t,
|
|
1189
|
+
onClick: e,
|
|
1168
1190
|
disabled: n,
|
|
1169
1191
|
title: r,
|
|
1170
|
-
variant:
|
|
1171
|
-
size:
|
|
1172
|
-
style:
|
|
1192
|
+
variant: o = "default",
|
|
1193
|
+
size: a = "md",
|
|
1194
|
+
style: l
|
|
1173
1195
|
}) {
|
|
1174
1196
|
return /* @__PURE__ */ i(
|
|
1175
1197
|
Le,
|
|
1176
1198
|
{
|
|
1177
|
-
variant:
|
|
1178
|
-
radius:
|
|
1179
|
-
size:
|
|
1199
|
+
variant: o === "circle" ? "light" : "subtle",
|
|
1200
|
+
radius: o === "circle" ? "xl" : "sm",
|
|
1201
|
+
size: a === "sm" ? "sm" : "md",
|
|
1180
1202
|
color: "gray",
|
|
1181
1203
|
disabled: n,
|
|
1182
1204
|
title: r,
|
|
1183
1205
|
"aria-label": r,
|
|
1184
|
-
onClick:
|
|
1185
|
-
style:
|
|
1186
|
-
children:
|
|
1206
|
+
onClick: e,
|
|
1207
|
+
style: l,
|
|
1208
|
+
children: t
|
|
1187
1209
|
}
|
|
1188
1210
|
);
|
|
1189
1211
|
}
|
|
1190
|
-
function
|
|
1191
|
-
value:
|
|
1192
|
-
onChange:
|
|
1212
|
+
function Vt({
|
|
1213
|
+
value: t,
|
|
1214
|
+
onChange: e,
|
|
1193
1215
|
options: n,
|
|
1194
1216
|
placeholder: r,
|
|
1195
|
-
disabled:
|
|
1196
|
-
style:
|
|
1217
|
+
disabled: o,
|
|
1218
|
+
style: a
|
|
1197
1219
|
}) {
|
|
1198
1220
|
return /* @__PURE__ */ i(
|
|
1199
1221
|
Ae,
|
|
1200
1222
|
{
|
|
1201
|
-
value:
|
|
1223
|
+
value: t,
|
|
1202
1224
|
data: n,
|
|
1203
1225
|
placeholder: r,
|
|
1204
|
-
disabled:
|
|
1226
|
+
disabled: o,
|
|
1205
1227
|
allowDeselect: !1,
|
|
1206
|
-
onChange: (
|
|
1207
|
-
|
|
1228
|
+
onChange: (l) => {
|
|
1229
|
+
l !== null && (e == null || e(l));
|
|
1208
1230
|
},
|
|
1209
|
-
style:
|
|
1231
|
+
style: a
|
|
1210
1232
|
}
|
|
1211
1233
|
);
|
|
1212
1234
|
}
|
|
1213
|
-
function
|
|
1214
|
-
checked:
|
|
1215
|
-
onChange:
|
|
1235
|
+
function Xt({
|
|
1236
|
+
checked: t,
|
|
1237
|
+
onChange: e,
|
|
1216
1238
|
disabled: n,
|
|
1217
1239
|
label: r,
|
|
1218
|
-
style:
|
|
1240
|
+
style: o
|
|
1219
1241
|
}) {
|
|
1220
1242
|
return /* @__PURE__ */ i(
|
|
1221
|
-
|
|
1243
|
+
Ce,
|
|
1222
1244
|
{
|
|
1223
|
-
checked:
|
|
1245
|
+
checked: t,
|
|
1224
1246
|
disabled: n,
|
|
1225
1247
|
label: r,
|
|
1226
|
-
onChange: (
|
|
1227
|
-
style:
|
|
1248
|
+
onChange: (a) => e == null ? void 0 : e(a.currentTarget.checked),
|
|
1249
|
+
style: o
|
|
1228
1250
|
}
|
|
1229
1251
|
);
|
|
1230
1252
|
}
|
|
1231
|
-
function
|
|
1232
|
-
checked:
|
|
1233
|
-
onChange:
|
|
1253
|
+
function Yt({
|
|
1254
|
+
checked: t,
|
|
1255
|
+
onChange: e,
|
|
1234
1256
|
disabled: n,
|
|
1235
1257
|
size: r = "sm",
|
|
1236
|
-
style:
|
|
1258
|
+
style: o
|
|
1237
1259
|
}) {
|
|
1238
1260
|
return /* @__PURE__ */ i(
|
|
1239
|
-
|
|
1261
|
+
$e,
|
|
1240
1262
|
{
|
|
1241
|
-
checked:
|
|
1263
|
+
checked: t,
|
|
1242
1264
|
disabled: n,
|
|
1243
1265
|
size: r === "sm" ? "sm" : "md",
|
|
1244
|
-
onChange: (
|
|
1245
|
-
style:
|
|
1266
|
+
onChange: (a) => e == null ? void 0 : e(a.currentTarget.checked),
|
|
1267
|
+
style: o
|
|
1246
1268
|
}
|
|
1247
1269
|
);
|
|
1248
1270
|
}
|
|
1249
|
-
function
|
|
1250
|
-
value:
|
|
1251
|
-
onChange:
|
|
1271
|
+
function qt({
|
|
1272
|
+
value: t,
|
|
1273
|
+
onChange: e,
|
|
1252
1274
|
placeholder: n,
|
|
1253
1275
|
disabled: r,
|
|
1254
|
-
type:
|
|
1255
|
-
style:
|
|
1276
|
+
type: o,
|
|
1277
|
+
style: a
|
|
1256
1278
|
}) {
|
|
1257
1279
|
return /* @__PURE__ */ i(
|
|
1258
|
-
|
|
1280
|
+
De,
|
|
1259
1281
|
{
|
|
1260
|
-
value:
|
|
1282
|
+
value: t,
|
|
1261
1283
|
placeholder: n,
|
|
1262
1284
|
disabled: r,
|
|
1263
|
-
type:
|
|
1264
|
-
onChange: (
|
|
1265
|
-
style:
|
|
1285
|
+
type: o,
|
|
1286
|
+
onChange: (l) => e == null ? void 0 : e(l.currentTarget.value),
|
|
1287
|
+
style: a
|
|
1266
1288
|
}
|
|
1267
1289
|
);
|
|
1268
1290
|
}
|
|
1269
|
-
function
|
|
1270
|
-
value:
|
|
1271
|
-
onChange:
|
|
1291
|
+
function Zt({
|
|
1292
|
+
value: t,
|
|
1293
|
+
onChange: e,
|
|
1272
1294
|
placeholder: n,
|
|
1273
1295
|
disabled: r,
|
|
1274
|
-
rows:
|
|
1275
|
-
style:
|
|
1296
|
+
rows: o = 3,
|
|
1297
|
+
style: a
|
|
1276
1298
|
}) {
|
|
1277
1299
|
return /* @__PURE__ */ i(
|
|
1278
1300
|
Be,
|
|
1279
1301
|
{
|
|
1280
|
-
value:
|
|
1302
|
+
value: t,
|
|
1281
1303
|
placeholder: n,
|
|
1282
1304
|
disabled: r,
|
|
1283
1305
|
autosize: !0,
|
|
1284
|
-
minRows:
|
|
1285
|
-
onChange: (
|
|
1286
|
-
style:
|
|
1306
|
+
minRows: o,
|
|
1307
|
+
onChange: (l) => e == null ? void 0 : e(l.currentTarget.value),
|
|
1308
|
+
style: a
|
|
1287
1309
|
}
|
|
1288
1310
|
);
|
|
1289
1311
|
}
|
|
1290
|
-
function
|
|
1312
|
+
function Jt({ color: t, style: e }) {
|
|
1291
1313
|
const n = g();
|
|
1292
1314
|
return /* @__PURE__ */ i(
|
|
1293
1315
|
"span",
|
|
@@ -1297,25 +1319,25 @@ function Vt({ color: e, style: t }) {
|
|
|
1297
1319
|
width: 14,
|
|
1298
1320
|
height: 14,
|
|
1299
1321
|
borderRadius: 4,
|
|
1300
|
-
background: n.category[
|
|
1322
|
+
background: n.category[t],
|
|
1301
1323
|
flex: "0 0 auto",
|
|
1302
|
-
...
|
|
1324
|
+
...e
|
|
1303
1325
|
}
|
|
1304
1326
|
}
|
|
1305
1327
|
);
|
|
1306
1328
|
}
|
|
1307
|
-
function
|
|
1308
|
-
segments:
|
|
1309
|
-
total:
|
|
1329
|
+
function Ut({
|
|
1330
|
+
segments: t,
|
|
1331
|
+
total: e,
|
|
1310
1332
|
topLeftLabel: n,
|
|
1311
1333
|
topRightLabel: r,
|
|
1312
|
-
style:
|
|
1334
|
+
style: o
|
|
1313
1335
|
}) {
|
|
1314
|
-
const
|
|
1315
|
-
(
|
|
1336
|
+
const a = g(), l = e > 0 ? e : 1, f = t.reduce(
|
|
1337
|
+
(c, u) => c + (Number.isFinite(u.value) && u.value > 0 ? u.value : 0),
|
|
1316
1338
|
0
|
|
1317
|
-
), d = Math.max(0,
|
|
1318
|
-
return /* @__PURE__ */ y("div", { style:
|
|
1339
|
+
), d = Math.max(0, l - f);
|
|
1340
|
+
return /* @__PURE__ */ y("div", { style: o, children: [
|
|
1319
1341
|
(n != null || r != null) && /* @__PURE__ */ y(
|
|
1320
1342
|
"div",
|
|
1321
1343
|
{
|
|
@@ -1323,7 +1345,7 @@ function Yt({
|
|
|
1323
1345
|
display: "flex",
|
|
1324
1346
|
justifyContent: "space-between",
|
|
1325
1347
|
fontSize: 12,
|
|
1326
|
-
color:
|
|
1348
|
+
color: a.text.secondary,
|
|
1327
1349
|
marginBottom: 6
|
|
1328
1350
|
},
|
|
1329
1351
|
children: [
|
|
@@ -1333,26 +1355,26 @@ function Yt({
|
|
|
1333
1355
|
}
|
|
1334
1356
|
),
|
|
1335
1357
|
/* @__PURE__ */ y("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
|
|
1336
|
-
|
|
1337
|
-
const m = Number.isFinite(
|
|
1358
|
+
t.map((c, u) => {
|
|
1359
|
+
const m = Number.isFinite(c.value) && c.value > 0 ? c.value : 0, v = a.category[c.color ?? ne[u % ne.length]];
|
|
1338
1360
|
return /* @__PURE__ */ i(
|
|
1339
1361
|
"div",
|
|
1340
1362
|
{
|
|
1341
1363
|
style: {
|
|
1342
|
-
width: `${m /
|
|
1364
|
+
width: `${m / l * 100}%`,
|
|
1343
1365
|
background: v,
|
|
1344
1366
|
borderRadius: 3
|
|
1345
1367
|
}
|
|
1346
1368
|
},
|
|
1347
|
-
|
|
1369
|
+
c.id
|
|
1348
1370
|
);
|
|
1349
1371
|
}),
|
|
1350
1372
|
d > 0 && /* @__PURE__ */ i(
|
|
1351
1373
|
"div",
|
|
1352
1374
|
{
|
|
1353
1375
|
style: {
|
|
1354
|
-
width: `${d /
|
|
1355
|
-
background:
|
|
1376
|
+
width: `${d / l * 100}%`,
|
|
1377
|
+
background: a.fill.tertiary,
|
|
1356
1378
|
borderRadius: 3
|
|
1357
1379
|
}
|
|
1358
1380
|
}
|
|
@@ -1360,21 +1382,21 @@ function Yt({
|
|
|
1360
1382
|
] })
|
|
1361
1383
|
] });
|
|
1362
1384
|
}
|
|
1363
|
-
function
|
|
1364
|
-
title:
|
|
1365
|
-
leading:
|
|
1385
|
+
function Qt({
|
|
1386
|
+
title: t,
|
|
1387
|
+
leading: e,
|
|
1366
1388
|
count: n,
|
|
1367
1389
|
trailing: r,
|
|
1368
|
-
children:
|
|
1369
|
-
defaultOpen:
|
|
1370
|
-
style:
|
|
1390
|
+
children: o,
|
|
1391
|
+
defaultOpen: a = !1,
|
|
1392
|
+
style: l
|
|
1371
1393
|
}) {
|
|
1372
|
-
const f = g(), [d,
|
|
1373
|
-
return /* @__PURE__ */ y("div", { style:
|
|
1394
|
+
const f = g(), [d, c] = E(a);
|
|
1395
|
+
return /* @__PURE__ */ y("div", { style: l, children: [
|
|
1374
1396
|
/* @__PURE__ */ y(
|
|
1375
1397
|
"div",
|
|
1376
1398
|
{
|
|
1377
|
-
onClick: () =>
|
|
1399
|
+
onClick: () => c((u) => !u),
|
|
1378
1400
|
style: {
|
|
1379
1401
|
display: "flex",
|
|
1380
1402
|
alignItems: "center",
|
|
@@ -1387,70 +1409,70 @@ function Zt({
|
|
|
1387
1409
|
},
|
|
1388
1410
|
children: [
|
|
1389
1411
|
/* @__PURE__ */ i(ye, { expanded: d }),
|
|
1390
|
-
|
|
1391
|
-
/* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children:
|
|
1412
|
+
e,
|
|
1413
|
+
/* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: t }),
|
|
1392
1414
|
n != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary, fontSize: 12 }, children: n }),
|
|
1393
1415
|
/* @__PURE__ */ i("span", { style: { flex: 1 } }),
|
|
1394
1416
|
r != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary }, children: r })
|
|
1395
1417
|
]
|
|
1396
1418
|
}
|
|
1397
1419
|
),
|
|
1398
|
-
d && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children:
|
|
1420
|
+
d && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: o })
|
|
1399
1421
|
] });
|
|
1400
1422
|
}
|
|
1401
1423
|
export {
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1424
|
+
gt as BarChart,
|
|
1425
|
+
jt as Button,
|
|
1426
|
+
Gt as Callout,
|
|
1427
|
+
Rt as Card,
|
|
1428
|
+
zt as CardBody,
|
|
1429
|
+
_t as CardHeader,
|
|
1430
|
+
Xt as Checkbox,
|
|
1431
|
+
Bt as Code,
|
|
1432
|
+
Qt as CollapsibleSection,
|
|
1433
|
+
bt as DiffStats,
|
|
1434
|
+
St as DiffView,
|
|
1435
|
+
Nt as Divider,
|
|
1436
|
+
It as Grid,
|
|
1437
|
+
Tt as H1,
|
|
1438
|
+
Pt as H2,
|
|
1439
|
+
At as H3,
|
|
1440
|
+
Kt as IconButton,
|
|
1441
|
+
mt as LineChart,
|
|
1442
|
+
Dt as Link,
|
|
1443
|
+
xt as PieChart,
|
|
1444
|
+
Wt as Pill,
|
|
1445
|
+
Et as Row,
|
|
1446
|
+
Vt as Select,
|
|
1447
|
+
Ft as Spacer,
|
|
1448
|
+
$t as Stack,
|
|
1449
|
+
Ht as Stat,
|
|
1450
|
+
Jt as Swatch,
|
|
1451
|
+
Ot as Table,
|
|
1452
|
+
Mt as Text,
|
|
1453
|
+
Zt as TextArea,
|
|
1454
|
+
qt as TextInput,
|
|
1455
|
+
st as TodoList,
|
|
1456
|
+
kt as TodoListCard,
|
|
1457
|
+
Yt as Toggle,
|
|
1458
|
+
Ut as UsageBar,
|
|
1459
|
+
ln as canvasPaletteDark,
|
|
1460
|
+
cn as canvasPaletteGrokDark,
|
|
1461
|
+
dn as canvasPaletteGrokLight,
|
|
1462
|
+
un as canvasPaletteLight,
|
|
1463
|
+
fn as canvasTokens,
|
|
1464
|
+
hn as canvasTokensLight,
|
|
1465
|
+
pn as categoryPaletteDark,
|
|
1466
|
+
yn as categoryPaletteLight,
|
|
1467
|
+
mn as colorPalette,
|
|
1468
|
+
vt as computeDAGLayout,
|
|
1469
|
+
Lt as mergeStyle,
|
|
1448
1470
|
ne as usageColorSequence,
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1471
|
+
wt as useCanvasAction,
|
|
1472
|
+
Ct as useCanvasState,
|
|
1473
|
+
nn as useEffect,
|
|
1452
1474
|
g as useHostTheme,
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1475
|
+
rn as useMemo,
|
|
1476
|
+
on as useRef,
|
|
1477
|
+
an as useState
|
|
1456
1478
|
};
|