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