@mechane-ai/elements 0.51.0 → 0.52.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/dist/ai.js +169 -169
- package/dist/{article-CRlhq9oA.js → article-BDVuehRt.js} +1 -1
- package/dist/article.js +1 -1
- package/dist/catalog.json +42 -1
- package/dist/{categorical-values-BYP_R5gS.js → categorical-values-BoS03HcI.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -13
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +1 -1
- package/dist/charts/plot.js +3 -3
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +1 -1
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/collections.js +1 -1
- package/dist/content/markdown.js +1 -278
- package/dist/{dates-ckJdYF7t.js → dates-CjlTzw00.js} +1 -1
- package/dist/{dumbbell-plot-BC8d_IJy.js → dumbbell-plot-Xxl6P7D1.js} +3 -3
- package/dist/{embedding-map-Bj8krO-d.js → embedding-map-tU8hT_aC.js} +3 -3
- package/dist/{figure-frame-koVKcXph.js → figure-frame-BKc9TvtX.js} +1 -1
- package/dist/forms/dates.js +1 -1
- package/dist/{image-grid-CLhol2jy.js → image-grid-BZy2lkNb.js} +2 -2
- package/dist/kits/evaluation.js +4 -4
- package/dist/kits/interpretability.js +7 -7
- package/dist/kits/operations.js +4 -4
- package/dist/kits/research.js +463 -183
- package/dist/kits/training.js +3 -3
- package/dist/markdown-VpLw_P9T.js +313 -0
- package/dist/mdx.js +2 -2
- package/dist/packages/charts/src/graph/tree-diagram.d.ts +1 -1
- package/dist/packages/charts/src/plot/plot-layout.d.ts +0 -6
- package/dist/packages/charts/src/timeline/event-strip.d.ts +12 -2
- package/dist/packages/charts/src/timeline/index.d.ts +1 -1
- package/dist/packages/collections/src/metrics.d.ts +5 -11
- package/dist/packages/content/src/markdown/markdown.d.ts +8 -1
- package/dist/packages/kits/src/research/collection-page.d.ts +9 -0
- package/dist/packages/kits/src/research/index.d.ts +3 -1
- package/dist/packages/kits/src/research/lineage-graph.d.ts +40 -0
- package/dist/{plot-layout-B2xRt-_k.js → plot-layout-D8j-ozGR.js} +102 -86
- package/dist/{plot-surface-0cKFwtws.js → plot-surface-5e3xeiub.js} +1 -1
- package/dist/{reference-lines-nSxcZVF5.js → reference-lines-1FttCg46.js} +1 -1
- package/dist/{scene-4ePpWdmE.js → scene-8F-fQksU.js} +4 -4
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-DWZIYDty.js → slope-chart-B35ZfaYn.js} +4 -4
- package/dist/{src-DNclWY4V.js → src-fvoTU3Bq.js} +377 -377
- package/dist/{time-series-CsngFxr1.js → time-series-DoFMGmFV.js} +612 -590
- package/dist/{token-heatmap-BQLIxPky.js → token-heatmap-DLPQWwMv.js} +3 -3
- package/dist/{token-predictions-C3B5L-eO.js → token-predictions-D_Jwf8Aw.js} +3 -3
- package/dist/{tree-diagram-Dau9jeXS.js → tree-diagram-DreDBCvt.js} +4 -4
- package/dist/{treemap-DWrMQndu.js → treemap-MVX-wa4t.js} +4 -4
- package/dist/{violin-plot-D05ODcyc.js → violin-plot-Bi71NqXF.js} +3 -3
- package/dist/waterfall-8y8ANO3c.js +605 -0
- package/package.json +1 -1
- package/recipes/calendar-workspace.tsx +39 -0
- package/skills/use-elements/references/workspace.md +8 -6
- package/dist/visible-motion-1GcUaEi4.js +0 -23
- package/dist/waterfall-BkLLv2Lm.js +0 -576
|
@@ -3,25 +3,25 @@ import { k as t } from "./src-9EJskqB_.js";
|
|
|
3
3
|
import { x as n } from "./src-Dxs3Buo_.js";
|
|
4
4
|
import { d as r, u as i } from "./src-npqwq3Sa.js";
|
|
5
5
|
import { n as a, t as o } from "./chart-tones-ei3BC2AL.js";
|
|
6
|
-
import { A as s, D as c, E as l, M as u, S as d, a as f, b as p, c as m, i as h, j as
|
|
7
|
-
import { i as
|
|
8
|
-
import { i as
|
|
9
|
-
import { a as
|
|
10
|
-
import { n as
|
|
11
|
-
import { a as
|
|
12
|
-
import { t as
|
|
13
|
-
import { c as
|
|
14
|
-
import { n as
|
|
15
|
-
import { t as
|
|
16
|
-
import { a as
|
|
17
|
-
import { n as
|
|
18
|
-
import { n as
|
|
19
|
-
import { n as
|
|
20
|
-
import { t as
|
|
21
|
-
import * as
|
|
22
|
-
import { createParts as
|
|
23
|
-
import { useEffect as
|
|
24
|
-
import { bindDrag as
|
|
6
|
+
import { A as s, D as c, E as l, M as u, S as d, a as f, b as p, c as m, i as h, j as ee, m as g, n as _, o as v, p as y, w as b } from "./plot-layout-D8j-ozGR.js";
|
|
7
|
+
import { i as te, n as x, r as S, t as C } from "./categorical-values-BoS03HcI.js";
|
|
8
|
+
import { i as w } from "./chart-link-AE_xuxiP.js";
|
|
9
|
+
import { a as T } from "./tone-scope-DKiSw-JR.js";
|
|
10
|
+
import { n as ne, r as re, t as E } from "./figure-format-B8kRZMlo.js";
|
|
11
|
+
import { a as D, i as O, o as k, r as A, t as ie } from "./scale-C2xgZyZN.js";
|
|
12
|
+
import { t as ae } from "./chart-cursor-1mFd48Jc.js";
|
|
13
|
+
import { c as oe, i as j, l as se, n as ce, o as M, r as le, s as N, t as ue } from "./figure-frame-BKc9TvtX.js";
|
|
14
|
+
import { n as P, t as F } from "./plot-width-D3hTycYX.js";
|
|
15
|
+
import { t as de } from "./plot-axes-D5S9BnBa.js";
|
|
16
|
+
import { a as I, c as L, d as R, f as z, i as fe, l as pe, n as B, o as me, r as V, s as he, t as ge } from "./plot-marks-FVsbFkUs.js";
|
|
17
|
+
import { n as _e, r as ve, t as ye } from "./plot-surface-5e3xeiub.js";
|
|
18
|
+
import { n as be, t as xe } from "./reference-lines-1FttCg46.js";
|
|
19
|
+
import { n as Se, r as H, t as Ce } from "./path-BglsXpnO.js";
|
|
20
|
+
import { t as we } from "./locate-Bcg3QcP4.js";
|
|
21
|
+
import * as U from "@stylexjs/stylex";
|
|
22
|
+
import { createParts as W } from "@ui-sdk/react/primitive";
|
|
23
|
+
import { useEffect as G, useId as Te, useRef as K, useState as Ee } from "react";
|
|
24
|
+
import { bindDrag as De, createChange as q, createSpans as Oe, definePrimitive as J, dispatch as ke } from "@ui-sdk/core";
|
|
25
25
|
import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
26
26
|
// packages/charts/src/cartesian/bar-data.ts
|
|
27
27
|
function Q({ composition: e, series: t, categoryIds: n, domain: r }) {
|
|
@@ -163,8 +163,8 @@ function Je({ markers: e, categoryIds: t, span: n, barTop: r, y: i, isReceded: a
|
|
|
163
163
|
y: i
|
|
164
164
|
});
|
|
165
165
|
return /* @__PURE__ */ X("g", {
|
|
166
|
-
...
|
|
167
|
-
children: s.map(({ key: t, ...n }) => /* @__PURE__ */ X(
|
|
166
|
+
...U.props(P.emphasis, a(t) && P.receded),
|
|
167
|
+
children: s.map(({ key: t, ...n }) => /* @__PURE__ */ X(he, {
|
|
168
168
|
...n,
|
|
169
169
|
tone: e.tone ?? "neutral"
|
|
170
170
|
}, t))
|
|
@@ -182,8 +182,8 @@ function Ye({ annotations: e, left: t, right: n }) {
|
|
|
182
182
|
right: n
|
|
183
183
|
});
|
|
184
184
|
return /* @__PURE__ */ X("g", {
|
|
185
|
-
...
|
|
186
|
-
children: /* @__PURE__ */ X(
|
|
185
|
+
...U.props(P.emphasis, e.isReceded && P.receded),
|
|
186
|
+
children: /* @__PURE__ */ X(L, {
|
|
187
187
|
x: r.x,
|
|
188
188
|
y: e.y,
|
|
189
189
|
anchor: r.anchor,
|
|
@@ -219,8 +219,8 @@ function $e({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a,
|
|
|
219
219
|
}
|
|
220
220
|
let m = d ? Ze : +(e.kind === "total");
|
|
221
221
|
return /* @__PURE__ */ Z(Y, { children: [e.kind !== "gap" && /* @__PURE__ */ X("g", {
|
|
222
|
-
...
|
|
223
|
-
children: /* @__PURE__ */ X(
|
|
222
|
+
...U.props(Xe.mark, Xe.geometry(p(e.total, 0), m)),
|
|
223
|
+
children: /* @__PURE__ */ X(V, {
|
|
224
224
|
x: i,
|
|
225
225
|
y: 0,
|
|
226
226
|
width: a,
|
|
@@ -232,10 +232,10 @@ function $e({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a,
|
|
|
232
232
|
}), f.map((o, f) => {
|
|
233
233
|
let m = o.values[r];
|
|
234
234
|
if (m == null) return null;
|
|
235
|
-
let h = d ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0),
|
|
235
|
+
let h = d ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), ee = d ? n.id === o.id : e.kind === "parts", g = l != null && l !== o.id, _ = ee ? !d && g ? Qe : 1 : 0;
|
|
236
236
|
return /* @__PURE__ */ X("g", {
|
|
237
|
-
...
|
|
238
|
-
children: /* @__PURE__ */ X(
|
|
237
|
+
...U.props(Xe.mark, Xe.geometry(p(m, h), _)),
|
|
238
|
+
children: /* @__PURE__ */ X(V, {
|
|
239
239
|
x: i,
|
|
240
240
|
y: 0,
|
|
241
241
|
width: a,
|
|
@@ -254,10 +254,10 @@ var et = { placeholder: {
|
|
|
254
254
|
} }, tt = 18, nt = 8, rt = 14, it = .08, at = 8, ot = 8, st = .5;
|
|
255
255
|
function ct({ legend: e, layoutLegend: t, notes: n, children: r, inspectionId: i, label: a, summary: o, rows: s = [], x: c = 0, width: l = 0, offset: u, data: d, isLoading: f = !1, ...p }) {
|
|
256
256
|
let m = f && e.length === 0 && p.report?.seriesValues === void 0;
|
|
257
|
-
return /* @__PURE__ */ Z(
|
|
257
|
+
return /* @__PURE__ */ Z(ce, {
|
|
258
258
|
...p,
|
|
259
259
|
series: e,
|
|
260
|
-
seriesLegend: m ? /* @__PURE__ */ X(
|
|
260
|
+
seriesLegend: m ? /* @__PURE__ */ X(N, {}) : /* @__PURE__ */ X(M, {
|
|
261
261
|
id: i,
|
|
262
262
|
label: a,
|
|
263
263
|
summary: o,
|
|
@@ -270,11 +270,11 @@ function ct({ legend: e, layoutLegend: t, notes: n, children: r, inspectionId: i
|
|
|
270
270
|
width: l,
|
|
271
271
|
offset: u
|
|
272
272
|
}),
|
|
273
|
-
children: [d !== void 0 && /* @__PURE__ */ X(
|
|
273
|
+
children: [d !== void 0 && /* @__PURE__ */ X(se, { ...d }), r]
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
function lt() {
|
|
277
|
-
let e =
|
|
277
|
+
let e = T();
|
|
278
278
|
return (t) => t.map((t, n) => ({
|
|
279
279
|
id: t.id,
|
|
280
280
|
label: t.label,
|
|
@@ -286,7 +286,7 @@ function lt() {
|
|
|
286
286
|
}));
|
|
287
287
|
}
|
|
288
288
|
function ut({ title: e = "Loading chart", series: t = [], height: n = "compact", ...r }) {
|
|
289
|
-
let a =
|
|
289
|
+
let a = Te(), o = lt()(t);
|
|
290
290
|
return /* @__PURE__ */ X("div", {
|
|
291
291
|
"aria-hidden": !0,
|
|
292
292
|
inert: !0,
|
|
@@ -298,7 +298,7 @@ function ut({ title: e = "Loading chart", series: t = [], height: n = "compact",
|
|
|
298
298
|
inspectionId: a,
|
|
299
299
|
isLoading: !0,
|
|
300
300
|
children: /* @__PURE__ */ X("div", {
|
|
301
|
-
...
|
|
301
|
+
...U.props(P.plot, et.placeholder),
|
|
302
302
|
children: /* @__PURE__ */ X(i, { height: m[n] })
|
|
303
303
|
})
|
|
304
304
|
})
|
|
@@ -308,12 +308,12 @@ function dt(e, t) {
|
|
|
308
308
|
return Array.from({ length: t }, (t, n) => e.reduce((e, t) => e + Math.max(0, t.values[n] ?? 0), 0));
|
|
309
309
|
}
|
|
310
310
|
function ft({ categories: e, series: t, domain: n, mode: r }) {
|
|
311
|
-
if (e.length >
|
|
312
|
-
if (
|
|
311
|
+
if (e.length > S.items || t.length > S.series) return `Choose a window with at most ${S.items} categories and ${S.series} series.`;
|
|
312
|
+
if (k(n) !== void 0 || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
|
|
313
313
|
if (!u(e) || !u(t)) return "Bar categories and series require unique identifiers.";
|
|
314
314
|
for (let i of t) {
|
|
315
315
|
if (i.values.length !== e.length) return "Every series requires one explicit value per category.";
|
|
316
|
-
if (i.values.some((e) => e !== null &&
|
|
316
|
+
if (i.values.some((e) => e !== null && D(e, n))) return "Bar values must be finite and within the supplied domain.";
|
|
317
317
|
if (r === "stacked" && i.values.some((e) => e === null || e < 0)) return "Stacked bars require present nonnegative values.";
|
|
318
318
|
}
|
|
319
319
|
if (r === "stacked" && dt(t, e.length).some((e) => e > n[1])) return "Stacked bar totals must fit the supplied domain.";
|
|
@@ -330,90 +330,90 @@ function pt({ categories: e, series: t, mode: n, composition: r, referenceLines:
|
|
|
330
330
|
...r?.annotation === void 0 ? [] : [r.annotation.value]
|
|
331
331
|
];
|
|
332
332
|
}
|
|
333
|
-
function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFormat: i, tickFormat: a, valueLabel: o, highlighted: s, selected: c, onSelectedChange: u, height: d = "compact", composition: p, referenceLines: m = [], markers:
|
|
334
|
-
let { emptyLabel:
|
|
335
|
-
if (
|
|
336
|
-
...
|
|
333
|
+
function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFormat: i, tickFormat: a, valueLabel: o, highlighted: s, selected: c, onSelectedChange: u, height: d = "compact", composition: p, referenceLines: m = [], markers: g = [], annotations: _ = [], emphasizedCategoryIds: v = [], ...y }) {
|
|
334
|
+
let { emptyLabel: b = "No categories", ...te } = y, { locale: x, title: S } = te, C = p?.focusedSeries, w = Te(), ne = Te(), { ref: E, width: D, height: O } = ve(d), k = T(), A = lt();
|
|
335
|
+
if (te.status === "loading") return /* @__PURE__ */ X(ut, {
|
|
336
|
+
...te,
|
|
337
337
|
series: t,
|
|
338
338
|
height: d
|
|
339
339
|
});
|
|
340
|
-
let
|
|
340
|
+
let j = n ?? f({
|
|
341
341
|
values: pt({
|
|
342
342
|
categories: e,
|
|
343
343
|
series: t,
|
|
344
344
|
mode: r,
|
|
345
345
|
composition: p,
|
|
346
346
|
referenceLines: m,
|
|
347
|
-
markers:
|
|
347
|
+
markers: g
|
|
348
348
|
}),
|
|
349
349
|
isZeroBased: !0
|
|
350
|
-
}),
|
|
350
|
+
}), se = C === void 0 ? void 0 : ft({
|
|
351
351
|
categories: e,
|
|
352
|
-
series: [
|
|
353
|
-
domain:
|
|
352
|
+
series: [C],
|
|
353
|
+
domain: j,
|
|
354
354
|
mode: "grouped"
|
|
355
|
-
}),
|
|
355
|
+
}), ce = ft({
|
|
356
356
|
categories: e,
|
|
357
357
|
series: t,
|
|
358
|
-
domain:
|
|
358
|
+
domain: j,
|
|
359
359
|
mode: r
|
|
360
|
-
}) ??
|
|
361
|
-
markers:
|
|
362
|
-
annotations:
|
|
363
|
-
emphasizedCategoryIds:
|
|
364
|
-
seriesIds: [...t, ...
|
|
365
|
-
categoryIds:
|
|
366
|
-
domain:
|
|
367
|
-
}) ??
|
|
360
|
+
}) ?? se, M = e.map((e) => e.id), N = Ne({
|
|
361
|
+
markers: g,
|
|
362
|
+
annotations: _,
|
|
363
|
+
emphasizedCategoryIds: v,
|
|
364
|
+
seriesIds: [...t, ...C === void 0 ? [] : [C]].map((e) => e.id),
|
|
365
|
+
categoryIds: M,
|
|
366
|
+
domain: j
|
|
367
|
+
}) ?? be({
|
|
368
368
|
lines: m,
|
|
369
|
-
domain:
|
|
370
|
-
}),
|
|
369
|
+
domain: j
|
|
370
|
+
}), F = ce ?? Q({
|
|
371
371
|
composition: p,
|
|
372
372
|
series: t,
|
|
373
|
-
categoryIds:
|
|
374
|
-
domain:
|
|
375
|
-
}) ??
|
|
376
|
-
if (
|
|
377
|
-
...
|
|
378
|
-
message:
|
|
373
|
+
categoryIds: M,
|
|
374
|
+
domain: j
|
|
375
|
+
}) ?? N;
|
|
376
|
+
if (F !== void 0) return /* @__PURE__ */ X(le, {
|
|
377
|
+
...te,
|
|
378
|
+
message: F
|
|
379
379
|
});
|
|
380
|
-
function
|
|
381
|
-
return
|
|
380
|
+
function I(e) {
|
|
381
|
+
return re({
|
|
382
382
|
value: e,
|
|
383
|
-
locale:
|
|
383
|
+
locale: x,
|
|
384
384
|
format: i
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
let
|
|
387
|
+
let L = C !== void 0 && !t.some((e) => e.id === C.id), R = [...t, ...L ? [C] : []], fe = new Map(R.map((e, t) => [e.id, k({
|
|
388
388
|
id: e.id,
|
|
389
389
|
tone: e.tone,
|
|
390
390
|
index: t
|
|
391
391
|
})]));
|
|
392
|
-
function
|
|
393
|
-
return
|
|
392
|
+
function pe(e) {
|
|
393
|
+
return fe.get(e) ?? "neutral";
|
|
394
394
|
}
|
|
395
|
-
let
|
|
396
|
-
id:
|
|
395
|
+
let B = p === void 0 ? void 0 : {
|
|
396
|
+
id: w,
|
|
397
397
|
label: p.contextLabel,
|
|
398
398
|
tone: "neutral",
|
|
399
399
|
values: p.buckets.map((e) => e.kind === "gap" ? null : e.total)
|
|
400
|
-
},
|
|
400
|
+
}, me = B === void 0 ? t : [B, ...R], he = (C !== void 0 && B !== void 0 ? [C, B] : t).map((e) => ({
|
|
401
401
|
id: e.id,
|
|
402
402
|
label: e.label,
|
|
403
|
-
tone: e.id ===
|
|
404
|
-
})),
|
|
403
|
+
tone: e.id === w ? "neutral" : pe(e.id)
|
|
404
|
+
})), ge = g.map((e) => ({
|
|
405
405
|
id: e.id,
|
|
406
406
|
label: e.label,
|
|
407
407
|
tone: e.tone ?? "neutral",
|
|
408
408
|
shape: e.kind
|
|
409
409
|
}));
|
|
410
|
-
function
|
|
411
|
-
let r = e[n], i = p?.buckets[n], a =
|
|
410
|
+
function Se(n) {
|
|
411
|
+
let r = e[n], i = p?.buckets[n], a = C !== void 0 && B !== void 0 ? [C, B] : B === void 0 || i?.kind === "parts" ? t : [], o = i === void 0 ? void 0 : i.kind === "gap" ? "No reported value" : I(i.total), s = a.map((e) => ({
|
|
412
412
|
id: e.id,
|
|
413
413
|
label: e.label,
|
|
414
|
-
tone: e.id ===
|
|
415
|
-
value:
|
|
416
|
-
})), c =
|
|
414
|
+
tone: e.id === w ? "neutral" : pe(e.id),
|
|
415
|
+
value: I(e.values[n] ?? null)
|
|
416
|
+
})), c = g.map((e) => ({
|
|
417
417
|
id: e.id,
|
|
418
418
|
label: e.label,
|
|
419
419
|
tone: e.tone ?? "neutral",
|
|
@@ -421,14 +421,14 @@ function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
|
|
|
421
421
|
value: Pe({
|
|
422
422
|
marker: e,
|
|
423
423
|
index: n,
|
|
424
|
-
valueText:
|
|
424
|
+
valueText: I
|
|
425
425
|
})
|
|
426
426
|
})), l = m.map((e) => ({
|
|
427
427
|
id: e.id,
|
|
428
428
|
label: e.label,
|
|
429
429
|
tone: e.tone ?? "neutral",
|
|
430
430
|
shape: "dashed",
|
|
431
|
-
value:
|
|
431
|
+
value: I(e.value)
|
|
432
432
|
}));
|
|
433
433
|
return {
|
|
434
434
|
category: r,
|
|
@@ -439,12 +439,12 @@ function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
|
|
|
439
439
|
...c,
|
|
440
440
|
...l
|
|
441
441
|
],
|
|
442
|
-
notes:
|
|
442
|
+
notes: _.filter((e) => e.categoryId === r?.id).map((e) => e.label)
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
|
-
let
|
|
446
|
-
width:
|
|
447
|
-
height:
|
|
445
|
+
let H = p?.annotation, Ce = _.length > 0 || H !== void 0, we = h({
|
|
446
|
+
width: D,
|
|
447
|
+
height: O,
|
|
448
448
|
direction: "columns",
|
|
449
449
|
categories: e.map((e) => ({
|
|
450
450
|
id: e.id,
|
|
@@ -455,45 +455,45 @@ function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
|
|
|
455
455
|
format: i,
|
|
456
456
|
tickFormat: a
|
|
457
457
|
},
|
|
458
|
-
valueDomain:
|
|
459
|
-
locale:
|
|
460
|
-
topInset:
|
|
458
|
+
valueDomain: j,
|
|
459
|
+
locale: x,
|
|
460
|
+
topInset: Ce ? tt : 0,
|
|
461
461
|
hasValueTitle: o !== void 0
|
|
462
|
-
}), { box:
|
|
462
|
+
}), { box: W, band: G } = we, K = we.value.position, Ee = ie({
|
|
463
463
|
ids: t.map((e) => e.id),
|
|
464
|
-
range: [0,
|
|
464
|
+
range: [0, G.bandwidth],
|
|
465
465
|
padding: it
|
|
466
|
-
}),
|
|
467
|
-
function
|
|
468
|
-
return
|
|
466
|
+
}), De = r === "stacked" || p !== void 0;
|
|
467
|
+
function q(e) {
|
|
468
|
+
return G.start(e) ?? W.left;
|
|
469
469
|
}
|
|
470
470
|
function Oe(e) {
|
|
471
|
-
return
|
|
471
|
+
return q(e) + G.bandwidth * st;
|
|
472
472
|
}
|
|
473
473
|
function J(e, t) {
|
|
474
|
-
let n =
|
|
475
|
-
return
|
|
474
|
+
let n = q(e);
|
|
475
|
+
return De ? {
|
|
476
476
|
x: n,
|
|
477
|
-
width:
|
|
477
|
+
width: G.bandwidth
|
|
478
478
|
} : {
|
|
479
|
-
x: n + (
|
|
480
|
-
width:
|
|
479
|
+
x: n + (Ee.start(t) ?? 0),
|
|
480
|
+
width: Ee.bandwidth
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
function ke(e, n) {
|
|
484
|
-
if (!
|
|
484
|
+
if (!De) return t.find((e) => e.id === n)?.values[e] ?? null;
|
|
485
485
|
let r = t.flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null));
|
|
486
486
|
return r.length === 0 ? null : r.reduce((e, t) => e + t, 0);
|
|
487
487
|
}
|
|
488
488
|
function Y(e, n) {
|
|
489
|
-
let r = (n === void 0 ? t : t.filter((e) => e.id === n)).flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null)), i =
|
|
489
|
+
let r = (n === void 0 ? t : t.filter((e) => e.id === n)).flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null)), i = De ? r.reduce((e, t) => e + Math.max(0, t), 0) : Math.max(0, ...r), a = p?.buckets[e], o = a === void 0 || a.kind === "gap" ? 0 : a.total, s = g.filter((e) => n === void 0 || e.seriesId === n).flatMap((t) => [Fe(t, e)].filter((e) => e !== null));
|
|
490
490
|
return Math.max(0, i, o, ...s);
|
|
491
491
|
}
|
|
492
492
|
function Ae(e) {
|
|
493
|
-
return Math.max(rt,
|
|
493
|
+
return Math.max(rt, K(e) - nt);
|
|
494
494
|
}
|
|
495
495
|
let je = {
|
|
496
|
-
label: `${
|
|
496
|
+
label: `${S} observations`,
|
|
497
497
|
columns: [{
|
|
498
498
|
id: "category",
|
|
499
499
|
label: "Category"
|
|
@@ -504,83 +504,104 @@ function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
|
|
|
504
504
|
rows: [...e.map((e, t) => ({
|
|
505
505
|
id: e.id,
|
|
506
506
|
values: [e.label, [
|
|
507
|
-
...
|
|
508
|
-
...
|
|
507
|
+
...me.map((e) => `${e.label}: ${I(e.values[t] ?? null)}`),
|
|
508
|
+
...g.map((e) => `${e.label}: ${Pe({
|
|
509
509
|
marker: e,
|
|
510
510
|
index: t,
|
|
511
|
-
valueText:
|
|
511
|
+
valueText: I
|
|
512
512
|
})}`),
|
|
513
|
-
...
|
|
513
|
+
..._.filter((t) => t.categoryId === e.id).map((e) => e.label)
|
|
514
514
|
].join(" · ")]
|
|
515
515
|
})), ...m.map((e) => ({
|
|
516
516
|
id: `reference:${e.id}`,
|
|
517
|
-
values: [e.label,
|
|
517
|
+
values: [e.label, I(e.value)]
|
|
518
518
|
}))]
|
|
519
519
|
};
|
|
520
520
|
return /* @__PURE__ */ X(l, {
|
|
521
521
|
items: e,
|
|
522
|
-
readout: (e) =>
|
|
523
|
-
locate: (e) =>
|
|
522
|
+
readout: (e) => oe(Se(M.indexOf(e))),
|
|
523
|
+
locate: (e) => G.idAt(e.x / e.width * W.width),
|
|
524
524
|
selected: c ?? null,
|
|
525
525
|
onSelect: u,
|
|
526
526
|
render: (n, { inspected: i, cursor: a }) => {
|
|
527
|
-
let l =
|
|
527
|
+
let l = Se(M.indexOf(i ?? ""));
|
|
528
528
|
function d(e) {
|
|
529
|
-
let t =
|
|
530
|
-
return
|
|
529
|
+
let t = v.includes(e);
|
|
530
|
+
return v.length > 0 && !t && i !== e;
|
|
531
531
|
}
|
|
532
|
-
let f =
|
|
533
|
-
id: `composition:${
|
|
534
|
-
text:
|
|
535
|
-
x: Oe(
|
|
536
|
-
y: Ae(
|
|
537
|
-
isReceded: d(
|
|
538
|
-
}], h =
|
|
532
|
+
let f = H === void 0 || !M.includes(H.categoryId) ? [] : [{
|
|
533
|
+
id: `composition:${H.categoryId}`,
|
|
534
|
+
text: H.label,
|
|
535
|
+
x: Oe(H.categoryId),
|
|
536
|
+
y: Ae(H.value),
|
|
537
|
+
isReceded: d(H.categoryId)
|
|
538
|
+
}], h = _.map((e) => {
|
|
539
539
|
let t = e.seriesId === void 0 ? {
|
|
540
|
-
x:
|
|
541
|
-
width:
|
|
540
|
+
x: q(e.categoryId),
|
|
541
|
+
width: G.bandwidth
|
|
542
542
|
} : J(e.categoryId, e.seriesId);
|
|
543
543
|
return {
|
|
544
544
|
id: e.id,
|
|
545
545
|
text: e.label,
|
|
546
546
|
x: t.x + t.width * st,
|
|
547
|
-
y: Ae(Y(
|
|
547
|
+
y: Ae(Y(M.indexOf(e.categoryId), e.seriesId)),
|
|
548
548
|
isReceded: d(e.categoryId)
|
|
549
549
|
};
|
|
550
|
-
}),
|
|
550
|
+
}), y = [...f, ...h], x = e.flatMap((e, n) => {
|
|
551
|
+
if (p !== void 0) {
|
|
552
|
+
let t = Y(n, void 0), r = K(0), i = K(t);
|
|
553
|
+
return [{
|
|
554
|
+
left: q(e.id),
|
|
555
|
+
right: q(e.id) + G.bandwidth,
|
|
556
|
+
top: Math.min(r, i),
|
|
557
|
+
bottom: Math.max(r, i)
|
|
558
|
+
}];
|
|
559
|
+
}
|
|
560
|
+
return t.flatMap((i, a) => {
|
|
561
|
+
let o = i.values[n];
|
|
562
|
+
if (o == null || r === "stacked" && o === 0) return [];
|
|
563
|
+
let s = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, c = K(s), l = K(s + o), u = J(e.id, i.id);
|
|
564
|
+
return [{
|
|
565
|
+
left: u.x,
|
|
566
|
+
right: u.x + u.width,
|
|
567
|
+
top: Math.min(c, l),
|
|
568
|
+
bottom: Math.max(c, l)
|
|
569
|
+
}];
|
|
570
|
+
});
|
|
571
|
+
});
|
|
551
572
|
return /* @__PURE__ */ X(ct, {
|
|
552
|
-
...
|
|
573
|
+
...te,
|
|
553
574
|
figure: n,
|
|
554
|
-
legend: [...
|
|
555
|
-
layoutLegend: [...
|
|
575
|
+
legend: [...he, ...ge],
|
|
576
|
+
layoutLegend: [...A(t), ...ge],
|
|
556
577
|
notes: l.notes,
|
|
557
|
-
inspectionId:
|
|
578
|
+
inspectionId: ne,
|
|
558
579
|
label: l.label,
|
|
559
580
|
titleDetail: l.category === void 0 ? void 0 : [l.category.axisLabel ?? l.category.label, l.summary].filter(Boolean).join(" · "),
|
|
560
581
|
summary: l.summary,
|
|
561
582
|
rows: l.rows,
|
|
562
583
|
x: Oe(i ?? ""),
|
|
563
|
-
width:
|
|
564
|
-
offset:
|
|
584
|
+
width: D,
|
|
585
|
+
offset: G.bandwidth * st + ot,
|
|
565
586
|
data: je,
|
|
566
|
-
children: e.length === 0 || t.length === 0 && p === void 0 ? /* @__PURE__ */ X(
|
|
567
|
-
plotRef:
|
|
568
|
-
box:
|
|
569
|
-
label:
|
|
570
|
-
title:
|
|
587
|
+
children: e.length === 0 || t.length === 0 && p === void 0 ? /* @__PURE__ */ X(ue, { children: b }) : /* @__PURE__ */ Z(_e, {
|
|
588
|
+
plotRef: E,
|
|
589
|
+
box: W,
|
|
590
|
+
label: ee({
|
|
591
|
+
title: S,
|
|
571
592
|
marks: "categories",
|
|
572
593
|
isSelectable: u !== void 0
|
|
573
594
|
}),
|
|
574
|
-
readoutId:
|
|
595
|
+
readoutId: ne,
|
|
575
596
|
children: [
|
|
576
|
-
/* @__PURE__ */ X(
|
|
577
|
-
box:
|
|
578
|
-
xTicks:
|
|
579
|
-
yTicks:
|
|
597
|
+
/* @__PURE__ */ X(de, {
|
|
598
|
+
box: W,
|
|
599
|
+
xTicks: we.bandTicks,
|
|
600
|
+
yTicks: we.valueTicks,
|
|
580
601
|
yTitle: o
|
|
581
602
|
}),
|
|
582
|
-
/* @__PURE__ */ Z(
|
|
583
|
-
box:
|
|
603
|
+
/* @__PURE__ */ Z(ye, {
|
|
604
|
+
box: W,
|
|
584
605
|
children: [
|
|
585
606
|
e.map((e, n) => {
|
|
586
607
|
let a = p?.buckets[n], o = {
|
|
@@ -590,66 +611,67 @@ function mt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
|
|
|
590
611
|
return a === void 0 ? t.map((i, a) => {
|
|
591
612
|
let c = i.values[n];
|
|
592
613
|
if (c == null || r === "stacked" && c === 0) return null;
|
|
593
|
-
let l = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u =
|
|
594
|
-
return /* @__PURE__ */ X(
|
|
614
|
+
let l = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u = K(l), f = K(l + c), p = s != null && s !== i.id, m = J(e.id, i.id);
|
|
615
|
+
return /* @__PURE__ */ X(V, {
|
|
595
616
|
...o,
|
|
596
617
|
x: m.x,
|
|
597
618
|
y: Math.min(u, f),
|
|
598
619
|
width: m.width,
|
|
599
620
|
height: Math.max(+(c === 0), Math.abs(f - u)),
|
|
600
|
-
tone:
|
|
621
|
+
tone: pe(i.id),
|
|
601
622
|
emphasis: p || d(e.id) ? "receded" : "normal",
|
|
602
623
|
mark: t.length === 1 ? e.id : `${e.id}:${i.id}`
|
|
603
624
|
}, `${e.id}:${i.id}`);
|
|
604
625
|
}) : /* @__PURE__ */ X("g", {
|
|
605
|
-
...
|
|
626
|
+
...U.props(P.emphasis, d(e.id) && P.receded),
|
|
606
627
|
children: /* @__PURE__ */ X($e, {
|
|
607
628
|
...o,
|
|
608
629
|
bucket: a,
|
|
609
630
|
series: t,
|
|
610
|
-
focusedSeries:
|
|
631
|
+
focusedSeries: C,
|
|
611
632
|
index: n,
|
|
612
|
-
x:
|
|
613
|
-
width:
|
|
614
|
-
y:
|
|
633
|
+
x: q(e.id),
|
|
634
|
+
width: G.bandwidth,
|
|
635
|
+
y: K,
|
|
615
636
|
highlighted: s,
|
|
616
|
-
toneOf:
|
|
637
|
+
toneOf: pe
|
|
617
638
|
})
|
|
618
639
|
}, e.id);
|
|
619
640
|
}),
|
|
620
|
-
/* @__PURE__ */ X(
|
|
621
|
-
x1:
|
|
622
|
-
x2:
|
|
623
|
-
y1:
|
|
624
|
-
y2:
|
|
641
|
+
/* @__PURE__ */ X(z, {
|
|
642
|
+
x1: W.left,
|
|
643
|
+
x2: W.right,
|
|
644
|
+
y1: K(0),
|
|
645
|
+
y2: K(0)
|
|
625
646
|
}),
|
|
626
647
|
/* @__PURE__ */ X(Je, {
|
|
627
|
-
markers:
|
|
628
|
-
categoryIds:
|
|
648
|
+
markers: g,
|
|
649
|
+
categoryIds: M,
|
|
629
650
|
span: J,
|
|
630
651
|
barTop: ke,
|
|
631
|
-
y:
|
|
652
|
+
y: K,
|
|
632
653
|
isReceded: d
|
|
633
654
|
})
|
|
634
655
|
]
|
|
635
656
|
}),
|
|
636
|
-
/* @__PURE__ */ X(
|
|
657
|
+
/* @__PURE__ */ X(xe, {
|
|
637
658
|
lines: m,
|
|
638
|
-
box:
|
|
639
|
-
position:
|
|
640
|
-
valueText:
|
|
641
|
-
avoid: Ve(
|
|
659
|
+
box: W,
|
|
660
|
+
position: K,
|
|
661
|
+
valueText: I,
|
|
662
|
+
avoid: Ve(y),
|
|
663
|
+
marks: x
|
|
642
664
|
}),
|
|
643
665
|
/* @__PURE__ */ X(Ye, {
|
|
644
|
-
annotations:
|
|
645
|
-
left:
|
|
646
|
-
right:
|
|
666
|
+
annotations: y,
|
|
667
|
+
left: W.left,
|
|
668
|
+
right: W.right
|
|
647
669
|
}),
|
|
648
|
-
a !== null && /* @__PURE__ */ X(
|
|
670
|
+
a !== null && /* @__PURE__ */ X(ae, {
|
|
649
671
|
x: Oe(a),
|
|
650
|
-
top:
|
|
651
|
-
bottom:
|
|
652
|
-
width: Math.max(at,
|
|
672
|
+
top: W.top,
|
|
673
|
+
bottom: W.bottom,
|
|
674
|
+
width: Math.max(at, G.bandwidth)
|
|
653
675
|
})
|
|
654
676
|
]
|
|
655
677
|
})
|
|
@@ -676,31 +698,31 @@ var ht = {
|
|
|
676
698
|
}
|
|
677
699
|
] }, _t = 100;
|
|
678
700
|
function vt({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange: i, ...s }) {
|
|
679
|
-
let { emptyLabel: c = "No values", ...u } = s, { locale: d, title: f } = u, p =
|
|
680
|
-
if (u.status === "loading") return /* @__PURE__ */ X(
|
|
701
|
+
let { emptyLabel: c = "No values", ...u } = s, { locale: d, title: f } = u, p = T();
|
|
702
|
+
if (u.status === "loading") return /* @__PURE__ */ X(j, {
|
|
681
703
|
...u,
|
|
682
704
|
height: "compact"
|
|
683
705
|
});
|
|
684
|
-
let m =
|
|
685
|
-
if (m !== void 0) return /* @__PURE__ */ X(
|
|
706
|
+
let m = te(e), h = e.reduce((e, t) => e + (t.value ?? 0), 0), ee = 2 ** -52 * Math.max(h, t, 1) * e.length;
|
|
707
|
+
if (m !== void 0) return /* @__PURE__ */ X(le, {
|
|
686
708
|
...u,
|
|
687
709
|
message: m
|
|
688
710
|
});
|
|
689
|
-
if (!Number.isFinite(t) || t < 0 || h - t >
|
|
711
|
+
if (!Number.isFinite(t) || t < 0 || h - t > ee) return /* @__PURE__ */ X(le, {
|
|
690
712
|
...u,
|
|
691
713
|
message: "The total must be finite and at least the sum of recorded values."
|
|
692
714
|
});
|
|
693
|
-
function
|
|
694
|
-
return
|
|
715
|
+
function g(e) {
|
|
716
|
+
return re({
|
|
695
717
|
value: e,
|
|
696
718
|
locale: d,
|
|
697
719
|
format: n
|
|
698
720
|
});
|
|
699
721
|
}
|
|
700
|
-
let
|
|
722
|
+
let _ = e.map((e, t) => ({
|
|
701
723
|
id: e.id,
|
|
702
724
|
label: e.label,
|
|
703
|
-
valueLabel:
|
|
725
|
+
valueLabel: g(e.value),
|
|
704
726
|
tone: p({
|
|
705
727
|
id: e.id,
|
|
706
728
|
tone: e.tone,
|
|
@@ -708,34 +730,34 @@ function vt({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange:
|
|
|
708
730
|
})
|
|
709
731
|
}));
|
|
710
732
|
return /* @__PURE__ */ X(l, {
|
|
711
|
-
items:
|
|
733
|
+
items: x(_),
|
|
712
734
|
arrows: "both",
|
|
713
735
|
selected: r ?? null,
|
|
714
736
|
onSelect: i,
|
|
715
|
-
render: (n, r) => /* @__PURE__ */ X(
|
|
737
|
+
render: (n, r) => /* @__PURE__ */ X(ce, {
|
|
716
738
|
...u,
|
|
717
739
|
figure: n,
|
|
718
|
-
children: e.length === 0 ? /* @__PURE__ */ X(
|
|
740
|
+
children: e.length === 0 ? /* @__PURE__ */ X(ue, { children: c }) : /* @__PURE__ */ Z(Y, { children: [
|
|
719
741
|
/* @__PURE__ */ X("div", {
|
|
720
742
|
"aria-hidden": !0,
|
|
721
743
|
className: "x78zum5 x170jfvy xb3r6kr x1r7kqkb xmkeg23 x1y0btm7 x1ey3b81 x1jfksii",
|
|
722
744
|
children: e.map((e, n) => {
|
|
723
|
-
let r =
|
|
724
|
-
return e.value === null ? null : /* @__PURE__ */ X("span", { ...
|
|
745
|
+
let r = _[n]?.tone ?? "neutral";
|
|
746
|
+
return e.value === null ? null : /* @__PURE__ */ X("span", { ...U.props(gt.segment(t === 0 ? 0 : e.value / t * _t, o[r], a[r])) }, e.id);
|
|
725
747
|
})
|
|
726
748
|
}),
|
|
727
|
-
/* @__PURE__ */ X(
|
|
749
|
+
/* @__PURE__ */ X(C, {
|
|
728
750
|
title: f,
|
|
729
|
-
items:
|
|
751
|
+
items: _,
|
|
730
752
|
view: i === void 0 ? void 0 : r
|
|
731
753
|
}),
|
|
732
|
-
t - h >
|
|
754
|
+
t - h > ee && /* @__PURE__ */ Z("p", {
|
|
733
755
|
className: "x153jb6y x1ghz6dp xy8obcc",
|
|
734
756
|
children: [
|
|
735
757
|
"Unassigned portion: ",
|
|
736
|
-
|
|
758
|
+
g(t - h),
|
|
737
759
|
" of ",
|
|
738
|
-
|
|
760
|
+
g(t)
|
|
739
761
|
]
|
|
740
762
|
})
|
|
741
763
|
] })
|
|
@@ -785,7 +807,7 @@ function Ct(e) {
|
|
|
785
807
|
return n === r ? [n, n + 1] : [n, r];
|
|
786
808
|
}
|
|
787
809
|
function wt({ steps: e, domain: t }) {
|
|
788
|
-
if (e.length >
|
|
810
|
+
if (e.length > S.items) return `Choose a bridge with at most ${S.items} steps.`;
|
|
789
811
|
if (!u(e)) return "Bridge steps require unique identifiers.";
|
|
790
812
|
if (e.length > 0 && e[0]?.kind !== "start") return "A bridge begins with one start step.";
|
|
791
813
|
if (e.filter((e) => e.kind === "start").length > 1) return "A bridge has exactly one start step.";
|
|
@@ -796,7 +818,7 @@ function wt({ steps: e, domain: t }) {
|
|
|
796
818
|
let n = Ct(St(e));
|
|
797
819
|
if (t === void 0) return Number.isFinite(n[0]) && Number.isFinite(n[1]) ? void 0 : "Running totals must stay finite.";
|
|
798
820
|
let r = t[0] <= n[0] && t[1] >= n[1];
|
|
799
|
-
if (!
|
|
821
|
+
if (!O(t) || !r) return "The bridge domain must be finite, increasing, and contain zero and every running total.";
|
|
800
822
|
}
|
|
801
823
|
// packages/charts/src/cartesian/bridge-chart.tsx
|
|
802
824
|
var Tt = 12, Et = 6, Dt = 14, Ot = 12, kt = 8, At = 8, jt = .5;
|
|
@@ -810,10 +832,10 @@ function Nt({ level: e, valueText: t, changeText: n }) {
|
|
|
810
832
|
return e.step.kind === "change" && e.step.value !== null ? n(e.step.value) : e.to === null ? "—" : t(e.to);
|
|
811
833
|
}
|
|
812
834
|
function Pt({ level: e, valueText: t, changeText: n }) {
|
|
813
|
-
return e.step.kind === "change" ? e.step.value === null ?
|
|
835
|
+
return e.step.kind === "change" ? e.step.value === null ? E : n(e.step.value) : e.to === null ? E : t(e.to);
|
|
814
836
|
}
|
|
815
837
|
function Ft({ level: e, valueText: t }) {
|
|
816
|
-
return e.from === null || e.to === null ?
|
|
838
|
+
return e.from === null || e.to === null ? E : `${t(e.from)} → ${t(e.to)}`;
|
|
817
839
|
}
|
|
818
840
|
function It(e, t, n) {
|
|
819
841
|
if (e.from === null || e.to === null) {
|
|
@@ -834,38 +856,38 @@ function It(e, t, n) {
|
|
|
834
856
|
};
|
|
835
857
|
}
|
|
836
858
|
function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r, valueLabel: i, domain: a, referenceLines: o = [], selected: s, onSelectedChange: c, height: u = "regular", ...d }) {
|
|
837
|
-
let { emptyLabel: p = "No steps", ...m } = d, { locale:
|
|
838
|
-
if (m.status === "loading") return /* @__PURE__ */ X(
|
|
859
|
+
let { emptyLabel: p = "No steps", ...m } = d, { locale: g, title: _ } = m, v = ve(u), y = Te();
|
|
860
|
+
if (m.status === "loading") return /* @__PURE__ */ X(j, {
|
|
839
861
|
...m,
|
|
840
862
|
height: u
|
|
841
863
|
});
|
|
842
|
-
let
|
|
864
|
+
let b = St(e), te = Ct(b), x = a ?? f({ values: [...te, ...o.map((e) => e.value)] }), S = wt({
|
|
843
865
|
steps: e,
|
|
844
866
|
domain: a
|
|
845
|
-
}) ??
|
|
867
|
+
}) ?? be({
|
|
846
868
|
lines: o,
|
|
847
|
-
domain:
|
|
869
|
+
domain: x
|
|
848
870
|
});
|
|
849
|
-
if (
|
|
871
|
+
if (S !== void 0) return /* @__PURE__ */ X(le, {
|
|
850
872
|
...m,
|
|
851
|
-
message:
|
|
873
|
+
message: S
|
|
852
874
|
});
|
|
853
|
-
function
|
|
854
|
-
return (t) =>
|
|
875
|
+
function C(e) {
|
|
876
|
+
return (t) => re({
|
|
855
877
|
value: t,
|
|
856
|
-
locale:
|
|
878
|
+
locale: g,
|
|
857
879
|
format: e
|
|
858
880
|
});
|
|
859
881
|
}
|
|
860
|
-
let
|
|
882
|
+
let w = C(t), T = C(n), ne = o.map((e) => ({
|
|
861
883
|
id: e.id,
|
|
862
884
|
label: e.label,
|
|
863
885
|
tone: e.tone ?? "neutral",
|
|
864
886
|
shape: "dashed",
|
|
865
|
-
value:
|
|
887
|
+
value: w(e.value)
|
|
866
888
|
}));
|
|
867
|
-
function
|
|
868
|
-
let t =
|
|
889
|
+
function E(e) {
|
|
890
|
+
let t = b.find((t) => t.step.id === e);
|
|
869
891
|
if (t === void 0) return {
|
|
870
892
|
level: t,
|
|
871
893
|
label: void 0,
|
|
@@ -878,7 +900,7 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
878
900
|
tone: "neutral",
|
|
879
901
|
value: Ft({
|
|
880
902
|
level: t,
|
|
881
|
-
valueText:
|
|
903
|
+
valueText: w
|
|
882
904
|
})
|
|
883
905
|
}] : [];
|
|
884
906
|
return {
|
|
@@ -886,17 +908,17 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
886
908
|
label: t.step.label,
|
|
887
909
|
summary: Pt({
|
|
888
910
|
level: t,
|
|
889
|
-
valueText:
|
|
890
|
-
changeText:
|
|
911
|
+
valueText: w,
|
|
912
|
+
changeText: T
|
|
891
913
|
}),
|
|
892
|
-
rows: [...n, ...
|
|
914
|
+
rows: [...n, ...ne]
|
|
893
915
|
};
|
|
894
916
|
}
|
|
895
|
-
let
|
|
896
|
-
width:
|
|
897
|
-
height:
|
|
917
|
+
let D = h({
|
|
918
|
+
width: v.width,
|
|
919
|
+
height: v.height,
|
|
898
920
|
direction: "columns",
|
|
899
|
-
categories:
|
|
921
|
+
categories: b.map((e) => ({
|
|
900
922
|
id: e.step.id,
|
|
901
923
|
label: e.step.axisLabel ?? e.step.label
|
|
902
924
|
})),
|
|
@@ -905,46 +927,46 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
905
927
|
format: t,
|
|
906
928
|
tickFormat: r
|
|
907
929
|
},
|
|
908
|
-
valueDomain:
|
|
909
|
-
locale:
|
|
930
|
+
valueDomain: x,
|
|
931
|
+
locale: g,
|
|
910
932
|
topInset: Tt,
|
|
911
933
|
hasValueTitle: i !== void 0
|
|
912
|
-
}), { box:
|
|
934
|
+
}), { box: O, band: k } = D, A = D.value.position, ie = b.map((e) => ({
|
|
913
935
|
id: e.step.id,
|
|
914
936
|
label: e.step.label
|
|
915
937
|
}));
|
|
916
|
-
function
|
|
917
|
-
return
|
|
938
|
+
function N(e) {
|
|
939
|
+
return k.start(e) ?? O.left;
|
|
918
940
|
}
|
|
919
|
-
function
|
|
920
|
-
return
|
|
941
|
+
function P(e) {
|
|
942
|
+
return N(e) + k.bandwidth * jt;
|
|
921
943
|
}
|
|
922
|
-
let
|
|
944
|
+
let F = Ve([...b.filter((e) => e.step.kind !== "change"), ...b.filter((e) => e.step.kind === "change")].map((e) => ({
|
|
923
945
|
id: e.step.id,
|
|
924
946
|
isTotal: e.step.kind !== "change",
|
|
925
947
|
text: Nt({
|
|
926
948
|
level: e,
|
|
927
|
-
valueText:
|
|
928
|
-
changeText:
|
|
949
|
+
valueText: w,
|
|
950
|
+
changeText: T
|
|
929
951
|
}),
|
|
930
|
-
x:
|
|
931
|
-
y: It(e,
|
|
952
|
+
x: P(e.step.id),
|
|
953
|
+
y: It(e, A, O.bottom).labelY
|
|
932
954
|
})));
|
|
933
955
|
return /* @__PURE__ */ X(l, {
|
|
934
|
-
items:
|
|
935
|
-
readout: (e) =>
|
|
936
|
-
locate: (e) =>
|
|
956
|
+
items: ie,
|
|
957
|
+
readout: (e) => oe(E(e)),
|
|
958
|
+
locate: (e) => k.idAt(e.x / e.width * O.width),
|
|
937
959
|
selected: s ?? null,
|
|
938
960
|
onSelect: c,
|
|
939
961
|
render: (e, { inspected: t, cursor: n }) => {
|
|
940
|
-
let r =
|
|
941
|
-
return /* @__PURE__ */ Z(
|
|
962
|
+
let r = E(t);
|
|
963
|
+
return /* @__PURE__ */ Z(ce, {
|
|
942
964
|
...m,
|
|
943
965
|
figure: e,
|
|
944
966
|
titleDetail: r.level === void 0 ? void 0 : `${r.label} · ${r.summary}`,
|
|
945
967
|
children: [
|
|
946
|
-
/* @__PURE__ */ X(
|
|
947
|
-
label: `${
|
|
968
|
+
/* @__PURE__ */ X(se, {
|
|
969
|
+
label: `${_} steps`,
|
|
948
970
|
columns: [
|
|
949
971
|
{
|
|
950
972
|
id: "step",
|
|
@@ -959,78 +981,78 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
959
981
|
label: "Running total"
|
|
960
982
|
}
|
|
961
983
|
],
|
|
962
|
-
rows: [...
|
|
984
|
+
rows: [...b.map((e) => ({
|
|
963
985
|
id: e.step.id,
|
|
964
986
|
values: [
|
|
965
987
|
e.step.label,
|
|
966
988
|
Pt({
|
|
967
989
|
level: e,
|
|
968
|
-
valueText:
|
|
969
|
-
changeText:
|
|
990
|
+
valueText: w,
|
|
991
|
+
changeText: T
|
|
970
992
|
}),
|
|
971
993
|
e.step.kind === "change" ? Ft({
|
|
972
994
|
level: e,
|
|
973
|
-
valueText:
|
|
995
|
+
valueText: w
|
|
974
996
|
}) : Pt({
|
|
975
997
|
level: e,
|
|
976
|
-
valueText:
|
|
977
|
-
changeText:
|
|
998
|
+
valueText: w,
|
|
999
|
+
changeText: T
|
|
978
1000
|
})
|
|
979
1001
|
]
|
|
980
1002
|
})), ...o.map((e) => ({
|
|
981
1003
|
id: `reference:${e.id}`,
|
|
982
1004
|
values: [
|
|
983
1005
|
e.label,
|
|
984
|
-
|
|
1006
|
+
w(e.value),
|
|
985
1007
|
""
|
|
986
1008
|
]
|
|
987
1009
|
}))]
|
|
988
1010
|
}),
|
|
989
|
-
/* @__PURE__ */ X(
|
|
990
|
-
id:
|
|
1011
|
+
/* @__PURE__ */ X(M, {
|
|
1012
|
+
id: y,
|
|
991
1013
|
label: r.label,
|
|
992
1014
|
summary: r.summary,
|
|
993
1015
|
legend: [],
|
|
994
1016
|
hasLegend: !1,
|
|
995
1017
|
rows: r.rows,
|
|
996
|
-
x:
|
|
997
|
-
width:
|
|
998
|
-
offset:
|
|
1018
|
+
x: P(t ?? ""),
|
|
1019
|
+
width: v.width,
|
|
1020
|
+
offset: k.bandwidth * jt + At
|
|
999
1021
|
}),
|
|
1000
|
-
|
|
1001
|
-
plotRef:
|
|
1002
|
-
box:
|
|
1003
|
-
label:
|
|
1004
|
-
title:
|
|
1022
|
+
b.length === 0 ? /* @__PURE__ */ X(ue, { children: p }) : /* @__PURE__ */ Z(_e, {
|
|
1023
|
+
plotRef: v.ref,
|
|
1024
|
+
box: O,
|
|
1025
|
+
label: ee({
|
|
1026
|
+
title: _,
|
|
1005
1027
|
marks: "steps",
|
|
1006
1028
|
isSelectable: c !== void 0
|
|
1007
1029
|
}),
|
|
1008
|
-
readoutId:
|
|
1030
|
+
readoutId: y,
|
|
1009
1031
|
children: [
|
|
1010
|
-
/* @__PURE__ */ X(
|
|
1011
|
-
box:
|
|
1012
|
-
xTicks:
|
|
1013
|
-
yTicks:
|
|
1032
|
+
/* @__PURE__ */ X(de, {
|
|
1033
|
+
box: O,
|
|
1034
|
+
xTicks: D.bandTicks,
|
|
1035
|
+
yTicks: D.valueTicks,
|
|
1014
1036
|
yTitle: i
|
|
1015
1037
|
}),
|
|
1016
|
-
/* @__PURE__ */ Z(
|
|
1017
|
-
box:
|
|
1038
|
+
/* @__PURE__ */ Z(ye, {
|
|
1039
|
+
box: O,
|
|
1018
1040
|
children: [
|
|
1019
|
-
|
|
1020
|
-
let n =
|
|
1021
|
-
return n === void 0 || e.to === null || n.from === null ? null : /* @__PURE__ */ X(
|
|
1022
|
-
x1:
|
|
1023
|
-
x2:
|
|
1024
|
-
y1:
|
|
1025
|
-
y2:
|
|
1041
|
+
b.map((e, t) => {
|
|
1042
|
+
let n = b[t + 1];
|
|
1043
|
+
return n === void 0 || e.to === null || n.from === null ? null : /* @__PURE__ */ X(fe, {
|
|
1044
|
+
x1: N(e.step.id) + k.bandwidth,
|
|
1045
|
+
x2: N(n.step.id),
|
|
1046
|
+
y1: A(e.to),
|
|
1047
|
+
y2: A(e.to)
|
|
1026
1048
|
}, `connector:${e.step.id}`);
|
|
1027
1049
|
}),
|
|
1028
|
-
|
|
1029
|
-
let n = It(e,
|
|
1030
|
-
return /* @__PURE__ */ X(
|
|
1031
|
-
x:
|
|
1050
|
+
b.map((e) => {
|
|
1051
|
+
let n = It(e, A, O.bottom);
|
|
1052
|
+
return /* @__PURE__ */ X(V, {
|
|
1053
|
+
x: N(e.step.id),
|
|
1032
1054
|
y: n.top,
|
|
1033
|
-
width:
|
|
1055
|
+
width: k.bandwidth,
|
|
1034
1056
|
height: n.height,
|
|
1035
1057
|
tone: n.isKnown ? e.tone : "neutral",
|
|
1036
1058
|
isHollow: !n.isKnown,
|
|
@@ -1038,25 +1060,25 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
1038
1060
|
isInspected: t === e.step.id
|
|
1039
1061
|
}, e.step.id);
|
|
1040
1062
|
}),
|
|
1041
|
-
/* @__PURE__ */ X(
|
|
1042
|
-
x1:
|
|
1043
|
-
x2:
|
|
1044
|
-
y1:
|
|
1045
|
-
y2:
|
|
1063
|
+
/* @__PURE__ */ X(z, {
|
|
1064
|
+
x1: O.left,
|
|
1065
|
+
x2: O.right,
|
|
1066
|
+
y1: A(0),
|
|
1067
|
+
y2: A(0)
|
|
1046
1068
|
})
|
|
1047
1069
|
]
|
|
1048
1070
|
}),
|
|
1049
|
-
/* @__PURE__ */ X(
|
|
1071
|
+
/* @__PURE__ */ X(xe, {
|
|
1050
1072
|
lines: o,
|
|
1051
|
-
box:
|
|
1052
|
-
position:
|
|
1053
|
-
valueText:
|
|
1054
|
-
avoid:
|
|
1055
|
-
marks:
|
|
1056
|
-
let t = It(e,
|
|
1073
|
+
box: O,
|
|
1074
|
+
position: A,
|
|
1075
|
+
valueText: w,
|
|
1076
|
+
avoid: F,
|
|
1077
|
+
marks: b.map((e) => {
|
|
1078
|
+
let t = It(e, A, O.bottom);
|
|
1057
1079
|
return {
|
|
1058
|
-
left:
|
|
1059
|
-
right:
|
|
1080
|
+
left: N(e.step.id),
|
|
1081
|
+
right: N(e.step.id) + k.bandwidth,
|
|
1060
1082
|
top: t.top,
|
|
1061
1083
|
bottom: t.top + t.height
|
|
1062
1084
|
};
|
|
@@ -1064,7 +1086,7 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
1064
1086
|
}),
|
|
1065
1087
|
/* @__PURE__ */ X("g", {
|
|
1066
1088
|
"aria-hidden": !0,
|
|
1067
|
-
children:
|
|
1089
|
+
children: F.map((e) => /* @__PURE__ */ X(L, {
|
|
1068
1090
|
x: e.x,
|
|
1069
1091
|
y: e.y,
|
|
1070
1092
|
anchor: "middle",
|
|
@@ -1072,11 +1094,11 @@ function Lt({ steps: e, valueFormat: t, changeFormat: n = Mt(t), tickFormat: r,
|
|
|
1072
1094
|
children: e.text
|
|
1073
1095
|
}, e.id))
|
|
1074
1096
|
}),
|
|
1075
|
-
n !== null && /* @__PURE__ */ X(
|
|
1076
|
-
x:
|
|
1077
|
-
top:
|
|
1078
|
-
bottom:
|
|
1079
|
-
width: Math.max(kt,
|
|
1097
|
+
n !== null && /* @__PURE__ */ X(ae, {
|
|
1098
|
+
x: P(n),
|
|
1099
|
+
top: O.top,
|
|
1100
|
+
bottom: O.bottom,
|
|
1101
|
+
width: Math.max(kt, k.bandwidth)
|
|
1080
1102
|
})
|
|
1081
1103
|
]
|
|
1082
1104
|
})
|
|
@@ -1132,12 +1154,12 @@ function Vt(e, t) {
|
|
|
1132
1154
|
return Number.isFinite(e) && e > 0 && e <= t[1] - t[0];
|
|
1133
1155
|
}
|
|
1134
1156
|
function Ht({ points: e, x: t, y: n, xDomain: r, yDomain: i, range: a, onRangeChange: o, rangeStep: s }) {
|
|
1135
|
-
let c =
|
|
1157
|
+
let c = k(r, t.scale) ?? k(i, n.scale);
|
|
1136
1158
|
if (c !== void 0) return c;
|
|
1137
1159
|
if (e.length > Rt.points) return `This plot exceeds the ${Rt.points}-point render limit. Supply a smaller, labelled sample.`;
|
|
1138
1160
|
if (!u(e)) return "Scatter points must have unique identifiers.";
|
|
1139
1161
|
if (e.some((e) => !Number.isFinite(e.x) || !Number.isFinite(e.y))) return "Scatter coordinates must be finite.";
|
|
1140
|
-
if (e.some((e) =>
|
|
1162
|
+
if (e.some((e) => D(e.x, r) || D(e.y, i))) return "Scatter coordinates fall outside the declared domain. Widen the domain or supply a labelled window of points.";
|
|
1141
1163
|
if (o !== void 0) {
|
|
1142
1164
|
if (s === void 0 || !Vt(s.x, r) || !Vt(s.y, i)) return "Range selection steps must be finite, positive, and no larger than their domain span.";
|
|
1143
1165
|
if (a != null && (!Bt(a.x, r) || !Bt(a.y, i))) return "The selected range must have finite, ordered bounds inside the declared domain.";
|
|
@@ -1147,101 +1169,101 @@ function Ut(e, t) {
|
|
|
1147
1169
|
return [Math.min(e, t), Math.max(e, t)];
|
|
1148
1170
|
}
|
|
1149
1171
|
function Wt(e) {
|
|
1150
|
-
let { points: t, x: n, y: r, referenceDiagonal: i, referenceLines: a = [], frontier: o = [], labeledIds: u = [], range: p, onRangeChange: m, rangeStep: h, selected:
|
|
1151
|
-
if (
|
|
1152
|
-
...
|
|
1153
|
-
height:
|
|
1172
|
+
let { points: t, x: n, y: r, referenceDiagonal: i, referenceLines: a = [], frontier: o = [], labeledIds: u = [], range: p, onRangeChange: m, rangeStep: h, selected: g, onSelectedChange: y, height: b = "regular", ...te } = e, { emptyLabel: x = "No points were supplied.", ...S } = te, { locale: C, title: ne } = S, E = Te(), D = ve(b), O = T(), k = w(), [A, ie] = Ee(null), ae = K(null);
|
|
1173
|
+
if (G(() => () => ae.current?.(), []), S.status === "loading") return /* @__PURE__ */ X(j, {
|
|
1174
|
+
...S,
|
|
1175
|
+
height: b
|
|
1154
1176
|
});
|
|
1155
|
-
let
|
|
1177
|
+
let oe = n.domain ?? f({
|
|
1156
1178
|
values: t.map((e) => e.x),
|
|
1157
1179
|
scale: n.scale
|
|
1158
|
-
}),
|
|
1180
|
+
}), M = r.domain ?? f({
|
|
1159
1181
|
values: t.map((e) => e.y),
|
|
1160
1182
|
scale: r.scale
|
|
1161
|
-
}),
|
|
1183
|
+
}), N = Ht({
|
|
1162
1184
|
points: t,
|
|
1163
1185
|
x: n,
|
|
1164
1186
|
y: r,
|
|
1165
|
-
xDomain:
|
|
1166
|
-
yDomain:
|
|
1187
|
+
xDomain: oe,
|
|
1188
|
+
yDomain: M,
|
|
1167
1189
|
range: p,
|
|
1168
1190
|
onRangeChange: m,
|
|
1169
1191
|
rangeStep: h
|
|
1170
|
-
}) ?? (a.length > 0 ?
|
|
1192
|
+
}) ?? (a.length > 0 ? be({
|
|
1171
1193
|
lines: a,
|
|
1172
|
-
domain:
|
|
1173
|
-
}) : void 0),
|
|
1174
|
-
if (
|
|
1175
|
-
...
|
|
1176
|
-
message:
|
|
1194
|
+
domain: M
|
|
1195
|
+
}) : void 0), F = p ?? null;
|
|
1196
|
+
if (N !== void 0) return /* @__PURE__ */ X(le, {
|
|
1197
|
+
...S,
|
|
1198
|
+
message: N
|
|
1177
1199
|
});
|
|
1178
|
-
let
|
|
1179
|
-
width:
|
|
1180
|
-
height:
|
|
1200
|
+
let R = v({
|
|
1201
|
+
width: D.width,
|
|
1202
|
+
height: D.height,
|
|
1181
1203
|
x: n,
|
|
1182
1204
|
y: r,
|
|
1183
|
-
xDomain:
|
|
1184
|
-
yDomain:
|
|
1185
|
-
locale:
|
|
1186
|
-
}), { box:
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1205
|
+
xDomain: oe,
|
|
1206
|
+
yDomain: M,
|
|
1207
|
+
locale: C
|
|
1208
|
+
}), { box: z } = R;
|
|
1209
|
+
function fe(e) {
|
|
1210
|
+
return re({
|
|
1189
1211
|
value: e,
|
|
1190
|
-
locale:
|
|
1212
|
+
locale: C,
|
|
1191
1213
|
format: n.format
|
|
1192
1214
|
});
|
|
1193
1215
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return
|
|
1216
|
+
function B(e) {
|
|
1217
|
+
return re({
|
|
1196
1218
|
value: e,
|
|
1197
|
-
locale:
|
|
1219
|
+
locale: C,
|
|
1198
1220
|
format: r.format
|
|
1199
1221
|
});
|
|
1200
1222
|
}
|
|
1201
|
-
let
|
|
1223
|
+
let me = t.map((e) => ({
|
|
1202
1224
|
id: e.id,
|
|
1203
|
-
label: `${e.label}, ${n.label}: ${
|
|
1204
|
-
})),
|
|
1225
|
+
label: `${e.label}, ${n.label}: ${fe(e.x)}, ${r.label}: ${B(e.y)}`
|
|
1226
|
+
})), V = t.map((e, t) => ({
|
|
1205
1227
|
...e,
|
|
1206
|
-
tone:
|
|
1228
|
+
tone: O({
|
|
1207
1229
|
id: e.id,
|
|
1208
1230
|
tone: e.tone,
|
|
1209
1231
|
index: t
|
|
1210
1232
|
}),
|
|
1211
|
-
left:
|
|
1212
|
-
top:
|
|
1213
|
-
})),
|
|
1233
|
+
left: R.x.position(e.x),
|
|
1234
|
+
top: R.y.position(e.y)
|
|
1235
|
+
})), he = new Map(V.map((e) => [e.id, {
|
|
1214
1236
|
left: e.left,
|
|
1215
1237
|
top: e.top,
|
|
1216
1238
|
right: e.left,
|
|
1217
1239
|
bottom: e.top
|
|
1218
|
-
}])),
|
|
1219
|
-
x: Ut(
|
|
1220
|
-
y: Ut(
|
|
1240
|
+
}])), ge = A === null ? p : {
|
|
1241
|
+
x: Ut(A.start.x, A.end.x),
|
|
1242
|
+
y: Ut(A.start.y, A.end.y)
|
|
1221
1243
|
};
|
|
1222
|
-
function
|
|
1223
|
-
let r = e.getBoundingClientRect(), i = (t - r.left) / r.width *
|
|
1244
|
+
function Se(e, t, n) {
|
|
1245
|
+
let r = e.getBoundingClientRect(), i = (t - r.left) / r.width * z.width, a = (n - r.top) / r.height * z.height;
|
|
1224
1246
|
return {
|
|
1225
|
-
x:
|
|
1226
|
-
y:
|
|
1247
|
+
x: R.x.valueAt(Math.min(z.right, Math.max(z.left, i))),
|
|
1248
|
+
y: R.y.valueAt(Math.min(z.bottom, Math.max(z.top, a)))
|
|
1227
1249
|
};
|
|
1228
1250
|
}
|
|
1229
|
-
function
|
|
1251
|
+
function Ce(t) {
|
|
1230
1252
|
let n = t.button === 0 && t.pointerType !== "touch", r = t.currentTarget, i = r.parentElement, a = t.target instanceof Element && t.target.closest("[data-brush]") !== null, o = n && a;
|
|
1231
|
-
if (m === void 0 ||
|
|
1232
|
-
let s =
|
|
1233
|
-
|
|
1253
|
+
if (m === void 0 || ae.current !== null || !o || i === null) return;
|
|
1254
|
+
let s = Se(r, t.clientX, t.clientY);
|
|
1255
|
+
ie({
|
|
1234
1256
|
start: s,
|
|
1235
1257
|
end: s
|
|
1236
|
-
}),
|
|
1258
|
+
}), ae.current = De(i, t.nativeEvent, {
|
|
1237
1259
|
cancelOnEscape: !0,
|
|
1238
|
-
onMove: ({ x: e, y: t }) =>
|
|
1260
|
+
onMove: ({ x: e, y: t }) => ie({
|
|
1239
1261
|
start: s,
|
|
1240
|
-
end:
|
|
1262
|
+
end: Se(r, e, t)
|
|
1241
1263
|
}),
|
|
1242
1264
|
onEnd: (t, n) => {
|
|
1243
|
-
if (
|
|
1244
|
-
let i =
|
|
1265
|
+
if (ae.current = null, ie(null), n) return;
|
|
1266
|
+
let i = Se(r, t.clientX, t.clientY), a = {
|
|
1245
1267
|
x: Ut(s.x, i.x),
|
|
1246
1268
|
y: Ut(s.y, i.y)
|
|
1247
1269
|
};
|
|
@@ -1252,101 +1274,101 @@ function Wt(e) {
|
|
|
1252
1274
|
}
|
|
1253
1275
|
});
|
|
1254
1276
|
}
|
|
1255
|
-
let
|
|
1277
|
+
let we = new Map(V.map((e) => [e.id, e])), W = o.map((e) => we.get(e)).filter((e) => e !== void 0), q = W.length >= 2 ? H(W.map((e) => ({
|
|
1256
1278
|
x: e.left,
|
|
1257
1279
|
y: e.top
|
|
1258
|
-
}))) : "", Oe = new Set(u), J = i === !0 ? { label: "y = x" } : i === !1 || i === void 0 ? null : i, Y = Math.max(
|
|
1280
|
+
}))) : "", Oe = new Set(u), J = i === !0 ? { label: "y = x" } : i === !1 || i === void 0 ? null : i, Y = Math.max(oe[0], M[0]), Q = Math.min(oe[1], M[1]), Ae = J !== null && Q > Y;
|
|
1259
1281
|
return /* @__PURE__ */ X(l, {
|
|
1260
|
-
...
|
|
1261
|
-
items:
|
|
1262
|
-
place: (e) =>
|
|
1263
|
-
selected:
|
|
1264
|
-
onSelect:
|
|
1265
|
-
render: (e, { inspected: i, cursor: o }) => /* @__PURE__ */ Z(
|
|
1266
|
-
...
|
|
1282
|
+
...k,
|
|
1283
|
+
items: me,
|
|
1284
|
+
place: (e) => he.get(e),
|
|
1285
|
+
selected: g ?? null,
|
|
1286
|
+
onSelect: y,
|
|
1287
|
+
render: (e, { inspected: i, cursor: o }) => /* @__PURE__ */ Z(ce, {
|
|
1288
|
+
...S,
|
|
1267
1289
|
figure: e,
|
|
1268
1290
|
footer: /* @__PURE__ */ X(d, {
|
|
1269
|
-
id:
|
|
1270
|
-
children: s(
|
|
1291
|
+
id: E,
|
|
1292
|
+
children: s(me, i)
|
|
1271
1293
|
}),
|
|
1272
1294
|
children: [
|
|
1273
|
-
t.length === 0 ? /* @__PURE__ */ X(
|
|
1274
|
-
plotRef:
|
|
1275
|
-
box:
|
|
1276
|
-
label:
|
|
1277
|
-
title:
|
|
1278
|
-
isSelectable:
|
|
1295
|
+
t.length === 0 ? /* @__PURE__ */ X(ue, { children: x }) : /* @__PURE__ */ Z(_e, {
|
|
1296
|
+
plotRef: D.ref,
|
|
1297
|
+
box: z,
|
|
1298
|
+
label: ee({
|
|
1299
|
+
title: ne,
|
|
1300
|
+
isSelectable: y !== void 0
|
|
1279
1301
|
}),
|
|
1280
|
-
readoutId:
|
|
1281
|
-
onPointerDown:
|
|
1282
|
-
overlay:
|
|
1302
|
+
readoutId: E,
|
|
1303
|
+
onPointerDown: Ce,
|
|
1304
|
+
overlay: V.map((e, t) => /* @__PURE__ */ X(c, {
|
|
1283
1305
|
value: e.id,
|
|
1284
1306
|
render: /* @__PURE__ */ X("button", {
|
|
1285
1307
|
type: "button",
|
|
1286
1308
|
tabIndex: -1,
|
|
1287
1309
|
title: e.label,
|
|
1288
|
-
"aria-label":
|
|
1289
|
-
"aria-pressed":
|
|
1310
|
+
"aria-label": me[t]?.label,
|
|
1311
|
+
"aria-pressed": y === void 0 ? void 0 : g === e.id
|
|
1290
1312
|
}),
|
|
1291
|
-
...
|
|
1313
|
+
...U.props(zt.target, zt.location(e.left, e.top)),
|
|
1292
1314
|
children: /* @__PURE__ */ X("span", {
|
|
1293
1315
|
"aria-hidden": !0,
|
|
1294
|
-
...
|
|
1316
|
+
...U.props(zt.ring, o === e.id && P.cursor)
|
|
1295
1317
|
})
|
|
1296
1318
|
}, e.id)),
|
|
1297
1319
|
children: [
|
|
1298
|
-
/* @__PURE__ */ X(
|
|
1299
|
-
box:
|
|
1300
|
-
xTicks:
|
|
1301
|
-
yTicks:
|
|
1302
|
-
xTitle:
|
|
1303
|
-
yTitle:
|
|
1320
|
+
/* @__PURE__ */ X(de, {
|
|
1321
|
+
box: z,
|
|
1322
|
+
xTicks: R.xTicks,
|
|
1323
|
+
yTicks: R.yTicks,
|
|
1324
|
+
xTitle: _(n),
|
|
1325
|
+
yTitle: _(r),
|
|
1304
1326
|
grid: "both"
|
|
1305
1327
|
}),
|
|
1306
1328
|
m !== void 0 && /* @__PURE__ */ X("rect", {
|
|
1307
1329
|
"data-brush": "",
|
|
1308
|
-
x:
|
|
1309
|
-
y:
|
|
1310
|
-
width:
|
|
1311
|
-
height:
|
|
1330
|
+
x: z.left,
|
|
1331
|
+
y: z.top,
|
|
1332
|
+
width: z.innerWidth,
|
|
1333
|
+
height: z.innerHeight,
|
|
1312
1334
|
className: "xsid9ct xy6m8k3"
|
|
1313
1335
|
}),
|
|
1314
|
-
/* @__PURE__ */ Z(
|
|
1315
|
-
box:
|
|
1336
|
+
/* @__PURE__ */ Z(ye, {
|
|
1337
|
+
box: z,
|
|
1316
1338
|
pad: 6,
|
|
1317
1339
|
children: [
|
|
1318
1340
|
Ae && /* @__PURE__ */ X(Gt, {
|
|
1319
1341
|
spec: J,
|
|
1320
1342
|
low: Y,
|
|
1321
1343
|
high: Q,
|
|
1322
|
-
plot:
|
|
1344
|
+
plot: R
|
|
1323
1345
|
}),
|
|
1324
|
-
a.length > 0 && /* @__PURE__ */ X(
|
|
1346
|
+
a.length > 0 && /* @__PURE__ */ X(xe, {
|
|
1325
1347
|
lines: a,
|
|
1326
|
-
box:
|
|
1327
|
-
position:
|
|
1328
|
-
valueText:
|
|
1348
|
+
box: z,
|
|
1349
|
+
position: R.y.position,
|
|
1350
|
+
valueText: B
|
|
1329
1351
|
}),
|
|
1330
|
-
|
|
1331
|
-
d:
|
|
1352
|
+
q !== "" && /* @__PURE__ */ X(pe, {
|
|
1353
|
+
d: q,
|
|
1332
1354
|
tone: "series1",
|
|
1333
1355
|
stroke: "dashed"
|
|
1334
1356
|
}),
|
|
1335
|
-
|
|
1336
|
-
range:
|
|
1337
|
-
plot:
|
|
1357
|
+
ge != null && /* @__PURE__ */ X(Kt, {
|
|
1358
|
+
range: ge,
|
|
1359
|
+
plot: R
|
|
1338
1360
|
}),
|
|
1339
|
-
|
|
1361
|
+
V.map((e) => /* @__PURE__ */ X(I, {
|
|
1340
1362
|
mark: e.id,
|
|
1341
1363
|
x: e.left,
|
|
1342
1364
|
y: e.top,
|
|
1343
1365
|
tone: e.tone,
|
|
1344
1366
|
isInspected: i === e.id,
|
|
1345
|
-
isSelected:
|
|
1367
|
+
isSelected: g === e.id
|
|
1346
1368
|
}, e.id)),
|
|
1347
|
-
|
|
1348
|
-
let t = e.left >
|
|
1349
|
-
return /* @__PURE__ */ X(
|
|
1369
|
+
V.filter((e) => Oe.has(e.id)).map((e) => {
|
|
1370
|
+
let t = e.left > z.right - 90, n = e.top < z.top + 18;
|
|
1371
|
+
return /* @__PURE__ */ X(L, {
|
|
1350
1372
|
x: e.left + (t ? -8 : 8),
|
|
1351
1373
|
y: e.top + (n ? 14 : -6),
|
|
1352
1374
|
anchor: t ? "end" : "start",
|
|
@@ -1360,15 +1382,15 @@ function Wt(e) {
|
|
|
1360
1382
|
m !== void 0 && h !== void 0 && /* @__PURE__ */ X(Jt, {
|
|
1361
1383
|
x: n,
|
|
1362
1384
|
y: r,
|
|
1363
|
-
xDomain:
|
|
1364
|
-
yDomain:
|
|
1365
|
-
range:
|
|
1385
|
+
xDomain: oe,
|
|
1386
|
+
yDomain: M,
|
|
1387
|
+
range: F,
|
|
1366
1388
|
rangeStep: h,
|
|
1367
|
-
locale:
|
|
1389
|
+
locale: C,
|
|
1368
1390
|
onRangeChange: m
|
|
1369
1391
|
}),
|
|
1370
|
-
/* @__PURE__ */ X(
|
|
1371
|
-
label: `${
|
|
1392
|
+
/* @__PURE__ */ X(se, {
|
|
1393
|
+
label: `${ne} points`,
|
|
1372
1394
|
columns: [
|
|
1373
1395
|
{
|
|
1374
1396
|
id: "point",
|
|
@@ -1387,8 +1409,8 @@ function Wt(e) {
|
|
|
1387
1409
|
id: e.id,
|
|
1388
1410
|
values: [
|
|
1389
1411
|
e.label,
|
|
1390
|
-
|
|
1391
|
-
|
|
1412
|
+
fe(e.x),
|
|
1413
|
+
B(e.y)
|
|
1392
1414
|
]
|
|
1393
1415
|
}))
|
|
1394
1416
|
})
|
|
@@ -1406,7 +1428,7 @@ function Gt({ spec: e, low: t, high: n, plot: r }) {
|
|
|
1406
1428
|
y2: o,
|
|
1407
1429
|
className: "xhq4mlf xnpr05h xlz5em3 x47corl x13efnbd"
|
|
1408
1430
|
}),
|
|
1409
|
-
e.label !== void 0 && /* @__PURE__ */ X(
|
|
1431
|
+
e.label !== void 0 && /* @__PURE__ */ X(L, {
|
|
1410
1432
|
x: a - 6,
|
|
1411
1433
|
y: o + 14,
|
|
1412
1434
|
anchor: "end",
|
|
@@ -1439,7 +1461,7 @@ function Kt({ range: e, plot: t }) {
|
|
|
1439
1461
|
}
|
|
1440
1462
|
function qt({ axis: e, domain: t, value: r, step: i, locale: a, onChange: o }) {
|
|
1441
1463
|
function s(t) {
|
|
1442
|
-
return
|
|
1464
|
+
return re({
|
|
1443
1465
|
value: t,
|
|
1444
1466
|
locale: a,
|
|
1445
1467
|
format: e.format
|
|
@@ -1620,13 +1642,13 @@ function tn({ points: e, timestamps: t, isStacked: n }) {
|
|
|
1620
1642
|
function nn({ series: e, x: t, y: n, pointRadius: r = 3 }) {
|
|
1621
1643
|
let i = e.points.findLastIndex((e) => e.value !== null);
|
|
1622
1644
|
return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("path", {
|
|
1623
|
-
d:
|
|
1645
|
+
d: H(e.points.map((e) => ({
|
|
1624
1646
|
x: t(e.timestamp),
|
|
1625
1647
|
y: e.value === null ? null : n(e.value + e.base)
|
|
1626
1648
|
}))),
|
|
1627
1649
|
fill: "none",
|
|
1628
1650
|
stroke: o[e.tone],
|
|
1629
|
-
...
|
|
1651
|
+
...U.props(P.mark)
|
|
1630
1652
|
}), e.points.filter((t, n) => {
|
|
1631
1653
|
if (t.value === null) return !1;
|
|
1632
1654
|
let r = e.points[n - 1]?.value === null || e.points[n + 1]?.value === null;
|
|
@@ -1668,7 +1690,7 @@ function cn({ points: e, marked: t }) {
|
|
|
1668
1690
|
});
|
|
1669
1691
|
}
|
|
1670
1692
|
function ln({ title: t, summary: n, unit: r, timestampUnit: i, series: a, valueDomain: s, markedPoints: c = [], baseline: l, layout: u = "inline" }) {
|
|
1671
|
-
let d =
|
|
1693
|
+
let d = Te(), f = F(), m = u === "figure", h = m ? f.width : sn.inline.width, ee = m ? sn.figure.height : sn.inline.height, g = Te(), _ = T(), v = b(), y = un({
|
|
1672
1694
|
title: t,
|
|
1673
1695
|
summary: n,
|
|
1674
1696
|
unit: r,
|
|
@@ -1676,35 +1698,35 @@ function ln({ title: t, summary: n, unit: r, timestampUnit: i, series: a, valueD
|
|
|
1676
1698
|
valueDomain: s,
|
|
1677
1699
|
markedPoints: c,
|
|
1678
1700
|
baseline: l
|
|
1679
|
-
}),
|
|
1680
|
-
if (
|
|
1701
|
+
}), te = a.points.some((e) => e.value !== null);
|
|
1702
|
+
if (y !== void 0 || !te) return /* @__PURE__ */ X("span", {
|
|
1681
1703
|
role: "img",
|
|
1682
|
-
"aria-label": `${t}. ${n} Values in ${r}; timestamps in ${i}. ${
|
|
1683
|
-
title:
|
|
1704
|
+
"aria-label": `${t}. ${n} Values in ${r}; timestamps in ${i}. ${y ?? "No recorded values. Missing observations remain unavailable."}`,
|
|
1705
|
+
title: y ?? "No recorded values",
|
|
1684
1706
|
className: "x2pejg6 x10w6t97 x2lah0s xxymvpz x3nfvp2 x6s0dn4 xl56j7k x153jb6y x1hz01jw xy8obcc",
|
|
1685
|
-
children:
|
|
1707
|
+
children: y === void 0 ? "No data" : "Invalid trend"
|
|
1686
1708
|
});
|
|
1687
|
-
let
|
|
1688
|
-
domain: $t(
|
|
1709
|
+
let x = a.points[0]?.timestamp ?? 0, S = a.points.at(-1)?.timestamp ?? x, C = A({
|
|
1710
|
+
domain: $t(x, S),
|
|
1689
1711
|
range: [on, h - on]
|
|
1690
|
-
}).position,
|
|
1712
|
+
}).position, w = A({
|
|
1691
1713
|
domain: s,
|
|
1692
|
-
range: [
|
|
1693
|
-
}).position,
|
|
1714
|
+
range: [ee - on, on]
|
|
1715
|
+
}).position, ne = en({
|
|
1694
1716
|
series: [a],
|
|
1695
1717
|
isStacked: !1,
|
|
1696
|
-
tones:
|
|
1697
|
-
})[0],
|
|
1718
|
+
tones: _
|
|
1719
|
+
})[0], re = o[ne?.tone ?? "series1"], E = cn({
|
|
1698
1720
|
points: a.points,
|
|
1699
1721
|
marked: c
|
|
1700
|
-
}),
|
|
1722
|
+
}), D = E.map(({ kind: e, point: t }) => `${rn[e]}: ${t.value} ${r}.`).join(" "), O = l === void 0 ? "" : `Reference: ${l} ${r}.`, k = /* @__PURE__ */ Z("svg", {
|
|
1701
1723
|
role: "img",
|
|
1702
1724
|
"aria-labelledby": d,
|
|
1703
|
-
"aria-describedby":
|
|
1725
|
+
"aria-describedby": g,
|
|
1704
1726
|
focusable: "false",
|
|
1705
|
-
viewBox: `0 0 ${h} ${
|
|
1727
|
+
viewBox: `0 0 ${h} ${ee}`,
|
|
1706
1728
|
width: h,
|
|
1707
|
-
height:
|
|
1729
|
+
height: ee,
|
|
1708
1730
|
...{
|
|
1709
1731
|
0: { className: "x1rg5ohu x2pejg6 x10w6t97 x2lah0s xxymvpz" },
|
|
1710
1732
|
1: { className: "x1lliihq xh8yej3 xt7dq6l" }
|
|
@@ -1715,7 +1737,7 @@ function ln({ title: t, summary: n, unit: r, timestampUnit: i, series: a, valueD
|
|
|
1715
1737
|
children: t
|
|
1716
1738
|
}),
|
|
1717
1739
|
/* @__PURE__ */ Z("desc", {
|
|
1718
|
-
id:
|
|
1740
|
+
id: g,
|
|
1719
1741
|
children: [
|
|
1720
1742
|
n,
|
|
1721
1743
|
" Values in ",
|
|
@@ -1730,54 +1752,54 @@ function ln({ title: t, summary: n, unit: r, timestampUnit: i, series: a, valueD
|
|
|
1730
1752
|
" ",
|
|
1731
1753
|
r,
|
|
1732
1754
|
". ",
|
|
1733
|
-
|
|
1755
|
+
D,
|
|
1734
1756
|
" ",
|
|
1735
|
-
|
|
1757
|
+
O
|
|
1736
1758
|
]
|
|
1737
1759
|
}),
|
|
1738
1760
|
l !== void 0 && /* @__PURE__ */ X("line", {
|
|
1739
1761
|
x1: on,
|
|
1740
1762
|
x2: h - on,
|
|
1741
|
-
y1:
|
|
1742
|
-
y2:
|
|
1763
|
+
y1: w(l),
|
|
1764
|
+
y2: w(l),
|
|
1743
1765
|
className: "x1crw9hw xnpr05h xbw2l0c x13efnbd"
|
|
1744
1766
|
}),
|
|
1745
|
-
|
|
1746
|
-
series:
|
|
1747
|
-
x:
|
|
1748
|
-
y:
|
|
1767
|
+
ne !== void 0 && /* @__PURE__ */ X(nn, {
|
|
1768
|
+
series: ne,
|
|
1769
|
+
x: C,
|
|
1770
|
+
y: w,
|
|
1749
1771
|
pointRadius: 2
|
|
1750
1772
|
}),
|
|
1751
|
-
|
|
1752
|
-
cx:
|
|
1753
|
-
cy:
|
|
1773
|
+
E.map(({ kind: e, point: t }) => e === "last" ? /* @__PURE__ */ X("circle", {
|
|
1774
|
+
cx: C(t.timestamp),
|
|
1775
|
+
cy: w(t.value),
|
|
1754
1776
|
r: an,
|
|
1755
|
-
fill:
|
|
1777
|
+
fill: re
|
|
1756
1778
|
}, e) : /* @__PURE__ */ X("circle", {
|
|
1757
|
-
cx:
|
|
1758
|
-
cy:
|
|
1779
|
+
cx: C(t.timestamp),
|
|
1780
|
+
cy: w(t.value),
|
|
1759
1781
|
r: an,
|
|
1760
|
-
stroke:
|
|
1782
|
+
stroke: re,
|
|
1761
1783
|
className: "x1fytgo2 x1r6sdyr x13efnbd"
|
|
1762
1784
|
}, e))
|
|
1763
1785
|
]
|
|
1764
1786
|
});
|
|
1765
1787
|
return m ? /* @__PURE__ */ X(p, {
|
|
1766
|
-
title:
|
|
1767
|
-
...
|
|
1788
|
+
title: v ? /* @__PURE__ */ X("span", {
|
|
1789
|
+
...U.props(e.hidden),
|
|
1768
1790
|
children: t
|
|
1769
1791
|
}) : t,
|
|
1770
|
-
description:
|
|
1792
|
+
description: v ? void 0 : n,
|
|
1771
1793
|
children: /* @__PURE__ */ X("div", {
|
|
1772
1794
|
ref: f.ref,
|
|
1773
1795
|
className: "x1lliihq xeuugli",
|
|
1774
|
-
children:
|
|
1796
|
+
children: k
|
|
1775
1797
|
})
|
|
1776
|
-
}) :
|
|
1798
|
+
}) : k;
|
|
1777
1799
|
}
|
|
1778
1800
|
function un({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPoints: a, baseline: o }) {
|
|
1779
1801
|
if (e.trim() === "" || t.trim() === "" || n.trim() === "") return "A trend requires a title, a readable summary, and a value unit.";
|
|
1780
|
-
if (!
|
|
1802
|
+
if (!O(i)) return "The displayed value domain must have finite, increasing bounds.";
|
|
1781
1803
|
let s = Xt({
|
|
1782
1804
|
series: [r],
|
|
1783
1805
|
isStacked: !1,
|
|
@@ -1910,7 +1932,7 @@ var Tn = J({
|
|
|
1910
1932
|
}),
|
|
1911
1933
|
sync: Cn,
|
|
1912
1934
|
api: (e) => {
|
|
1913
|
-
let t =
|
|
1935
|
+
let t = q(e);
|
|
1914
1936
|
function n(n, { id: r, action: i, reason: a, event: o }) {
|
|
1915
1937
|
let s = i === "delete" ? void 0 : n.find((e) => e.id === r), c = s === void 0 ? null : [s.start, s.end], l = t("value", c, o === void 0 ? { reason: a } : {
|
|
1916
1938
|
reason: a,
|
|
@@ -1982,7 +2004,7 @@ var Tn = J({
|
|
|
1982
2004
|
})
|
|
1983
2005
|
}),
|
|
1984
2006
|
agent: { actions: ["setRange", "clear"] }
|
|
1985
|
-
}), En =
|
|
2007
|
+
}), En = W(Tn, {
|
|
1986
2008
|
root: "div",
|
|
1987
2009
|
track: "div",
|
|
1988
2010
|
span: "div"
|
|
@@ -2013,7 +2035,7 @@ function Mn({ left: e, width: t, height: n, label: r, children: i, ...a }) {
|
|
|
2013
2035
|
render: (r, { spans: a }) => /* @__PURE__ */ Z("div", {
|
|
2014
2036
|
...r,
|
|
2015
2037
|
children: [i, /* @__PURE__ */ X(On, {
|
|
2016
|
-
...
|
|
2038
|
+
...U.props(jn.track(e, t, n)),
|
|
2017
2039
|
children: a.map((e) => /* @__PURE__ */ Z(kn, {
|
|
2018
2040
|
value: e.id,
|
|
2019
2041
|
"aria-label": `Selected range, ${e.label}. Use arrow keys to move it, Shift and an arrow to move its end, and Delete to clear it.`,
|
|
@@ -2075,15 +2097,15 @@ function Bn({ bands: e, x: t, y: n }) {
|
|
|
2075
2097
|
});
|
|
2076
2098
|
}
|
|
2077
2099
|
let i = r((e) => e.lower), a = r((e) => e.upper), o = r((e) => e.center), s = e.points.map((e) => t(e.timestamp));
|
|
2078
|
-
return /* @__PURE__ */ Z("g", { children: [/* @__PURE__ */ X(
|
|
2079
|
-
d:
|
|
2100
|
+
return /* @__PURE__ */ Z("g", { children: [/* @__PURE__ */ X(B, {
|
|
2101
|
+
d: Ce(s.map((e, t) => ({
|
|
2080
2102
|
x: e,
|
|
2081
2103
|
y0: i[t] ?? null,
|
|
2082
2104
|
y1: a[t] ?? null
|
|
2083
2105
|
}))),
|
|
2084
2106
|
tone: e.tone
|
|
2085
|
-
}), /* @__PURE__ */ X(
|
|
2086
|
-
d:
|
|
2107
|
+
}), /* @__PURE__ */ X(pe, {
|
|
2108
|
+
d: H(s.map((e, t) => ({
|
|
2087
2109
|
x: e,
|
|
2088
2110
|
y: o[t] ?? null
|
|
2089
2111
|
}))),
|
|
@@ -2098,18 +2120,18 @@ function Vn({ placed: e, x: t, y: n, top: r, bottom: i }) {
|
|
|
2098
2120
|
children: e.map((e) => {
|
|
2099
2121
|
let r = t(e.timestamp), o = a + (e.lane + 1 / 2) * Nn, s = e.anchor === "start" ? r + Pn : r - Pn;
|
|
2100
2122
|
return /* @__PURE__ */ Z("g", { children: [
|
|
2101
|
-
/* @__PURE__ */ X(
|
|
2123
|
+
/* @__PURE__ */ X(me, {
|
|
2102
2124
|
x: r,
|
|
2103
2125
|
top: o,
|
|
2104
2126
|
bottom: i
|
|
2105
2127
|
}),
|
|
2106
|
-
/* @__PURE__ */ X(
|
|
2128
|
+
/* @__PURE__ */ X(L, {
|
|
2107
2129
|
x: s,
|
|
2108
2130
|
y: o + In,
|
|
2109
2131
|
anchor: e.anchor,
|
|
2110
2132
|
children: e.label
|
|
2111
2133
|
}),
|
|
2112
|
-
e.value !== void 0 && /* @__PURE__ */ X(
|
|
2134
|
+
e.value !== void 0 && /* @__PURE__ */ X(R, {
|
|
2113
2135
|
x: r,
|
|
2114
2136
|
y: n(e.value)
|
|
2115
2137
|
})
|
|
@@ -2205,7 +2227,7 @@ function nr(e) {
|
|
|
2205
2227
|
return /* @__PURE__ */ X(rr, { ...e });
|
|
2206
2228
|
}
|
|
2207
2229
|
function rr({ series: e, height: t = "compact", showTimeAxis: n = !0, ...a }) {
|
|
2208
|
-
let o =
|
|
2230
|
+
let o = Te(), s = T(), c = en({
|
|
2209
2231
|
series: e.map((e) => ({
|
|
2210
2232
|
...e,
|
|
2211
2233
|
points: []
|
|
@@ -2217,11 +2239,11 @@ function rr({ series: e, height: t = "compact", showTimeAxis: n = !0, ...a }) {
|
|
|
2217
2239
|
"aria-hidden": !0,
|
|
2218
2240
|
inert: !0,
|
|
2219
2241
|
className: "xeuugli",
|
|
2220
|
-
children: /* @__PURE__ */ X(
|
|
2242
|
+
children: /* @__PURE__ */ X(ce, {
|
|
2221
2243
|
...a,
|
|
2222
2244
|
status: "loading",
|
|
2223
2245
|
series: c,
|
|
2224
|
-
seriesLegend: /* @__PURE__ */ X(
|
|
2246
|
+
seriesLegend: /* @__PURE__ */ X(M, {
|
|
2225
2247
|
id: o,
|
|
2226
2248
|
label: void 0,
|
|
2227
2249
|
legend: c,
|
|
@@ -2244,7 +2266,7 @@ function rr({ series: e, height: t = "compact", showTimeAxis: n = !0, ...a }) {
|
|
|
2244
2266
|
});
|
|
2245
2267
|
}
|
|
2246
2268
|
function ir({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact", locale: i, status: a }) {
|
|
2247
|
-
let o =
|
|
2269
|
+
let o = K(null), [s, c] = Ee(), l = JSON.stringify(e.map((e) => [
|
|
2248
2270
|
e.id,
|
|
2249
2271
|
e.title,
|
|
2250
2272
|
Qt({
|
|
@@ -2259,22 +2281,22 @@ function ir({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
|
|
|
2259
2281
|
height: r,
|
|
2260
2282
|
locale: i
|
|
2261
2283
|
});
|
|
2262
|
-
if (!f || !u(e)) return /* @__PURE__ */ X(
|
|
2284
|
+
if (!f || !u(e)) return /* @__PURE__ */ X(le, {
|
|
2263
2285
|
title: "Small multiples",
|
|
2264
2286
|
locale: i,
|
|
2265
2287
|
message: "Charts need unique identifiers and aligned observation timestamps."
|
|
2266
2288
|
});
|
|
2267
|
-
if (e.length > $.panels) return /* @__PURE__ */ X(
|
|
2289
|
+
if (e.length > $.panels) return /* @__PURE__ */ X(le, {
|
|
2268
2290
|
title: "Small multiples",
|
|
2269
2291
|
locale: i,
|
|
2270
2292
|
message: `Choose at most ${$.panels} panels.`
|
|
2271
2293
|
});
|
|
2272
|
-
if (e.length === 0) return /* @__PURE__ */ X(
|
|
2294
|
+
if (e.length === 0) return /* @__PURE__ */ X(ce, {
|
|
2273
2295
|
title: "Small multiples",
|
|
2274
2296
|
locale: i,
|
|
2275
|
-
children: /* @__PURE__ */ X(
|
|
2297
|
+
children: /* @__PURE__ */ X(ue, { children: "No charts" })
|
|
2276
2298
|
});
|
|
2277
|
-
let p =
|
|
2299
|
+
let p = g({
|
|
2278
2300
|
height: m[r],
|
|
2279
2301
|
locale: i,
|
|
2280
2302
|
hasValueTitle: e.some((e) => e.valueLabel !== void 0),
|
|
@@ -2330,7 +2352,7 @@ function ir({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
|
|
|
2330
2352
|
});
|
|
2331
2353
|
}
|
|
2332
2354
|
function ar({ charts: e, height: t, locale: n }) {
|
|
2333
|
-
if (!u(e) || e.length > $.panels) return /* @__PURE__ */ X(
|
|
2355
|
+
if (!u(e) || e.length > $.panels) return /* @__PURE__ */ X(le, {
|
|
2334
2356
|
title: "Small multiples",
|
|
2335
2357
|
locale: n,
|
|
2336
2358
|
message: `Choose at most ${$.panels} panels with unique identifiers.`
|
|
@@ -2357,114 +2379,114 @@ function ar({ charts: e, height: t, locale: n }) {
|
|
|
2357
2379
|
}, i))
|
|
2358
2380
|
});
|
|
2359
2381
|
}
|
|
2360
|
-
function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFormat: a, valueLabel: o, markers: s = [], height: c = "compact", kind: u, isStacked: d, sharedInspection: f, gutter: p, showTimeAxis: m = !0, bands: h = [], crossings:
|
|
2361
|
-
let { title:
|
|
2382
|
+
function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFormat: a, valueLabel: o, markers: s = [], height: c = "compact", kind: u, isStacked: d, sharedInspection: f, gutter: p, showTimeAxis: m = !0, bands: h = [], crossings: g = [], range: _ = null, onRangeChange: v, rangeStep: b, emptyLabel: te = "No observations", ...x }) {
|
|
2383
|
+
let { title: S, locale: C, report: w } = x, E = T(), D = ve(c), O = Te(), k = h[0]?.points.map((e) => e.timestamp) ?? [], A = e[0]?.points.map((e) => e.timestamp) ?? k, ie = Xt({
|
|
2362
2384
|
series: e,
|
|
2363
2385
|
isStacked: d,
|
|
2364
2386
|
markers: s,
|
|
2365
|
-
timeline:
|
|
2387
|
+
timeline: k
|
|
2366
2388
|
}) ?? pn({
|
|
2367
2389
|
bands: h,
|
|
2368
|
-
crossings:
|
|
2390
|
+
crossings: g,
|
|
2369
2391
|
series: e,
|
|
2370
|
-
timestamps:
|
|
2392
|
+
timestamps: A
|
|
2371
2393
|
}) ?? sr({
|
|
2372
|
-
range:
|
|
2373
|
-
rangeStep:
|
|
2374
|
-
isSelectable:
|
|
2375
|
-
timeline:
|
|
2376
|
-
}),
|
|
2394
|
+
range: _,
|
|
2395
|
+
rangeStep: b,
|
|
2396
|
+
isSelectable: v !== void 0,
|
|
2397
|
+
timeline: A
|
|
2398
|
+
}), j = ie === void 0 ? en({
|
|
2377
2399
|
series: e,
|
|
2378
2400
|
isStacked: d,
|
|
2379
|
-
tones:
|
|
2380
|
-
}) : [],
|
|
2401
|
+
tones: E
|
|
2402
|
+
}) : [], N = ie === void 0 ? mn({
|
|
2381
2403
|
series: e,
|
|
2382
2404
|
bands: h,
|
|
2383
|
-
tones:
|
|
2384
|
-
}) : [],
|
|
2385
|
-
function
|
|
2386
|
-
return
|
|
2405
|
+
tones: E
|
|
2406
|
+
}) : [], P = j[0]?.points ?? N[0]?.points ?? [];
|
|
2407
|
+
function F(e) {
|
|
2408
|
+
return ne({
|
|
2387
2409
|
timestamp: Jn(e, n),
|
|
2388
|
-
locale:
|
|
2410
|
+
locale: C,
|
|
2389
2411
|
format: r
|
|
2390
2412
|
});
|
|
2391
2413
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return
|
|
2414
|
+
function L(e) {
|
|
2415
|
+
return re({
|
|
2394
2416
|
value: e,
|
|
2395
|
-
locale:
|
|
2417
|
+
locale: C,
|
|
2396
2418
|
format: i
|
|
2397
2419
|
});
|
|
2398
2420
|
}
|
|
2399
|
-
let
|
|
2421
|
+
let fe = P.map(({ timestamp: e }) => ({
|
|
2400
2422
|
id: String(e),
|
|
2401
|
-
label:
|
|
2402
|
-
})),
|
|
2423
|
+
label: F(e)
|
|
2424
|
+
})), B = `${Qt({
|
|
2403
2425
|
series: e,
|
|
2404
2426
|
markers: s,
|
|
2405
2427
|
timestampUnit: n,
|
|
2406
2428
|
isStacked: d
|
|
2407
2429
|
})}${Zn({
|
|
2408
2430
|
bands: h,
|
|
2409
|
-
crossings:
|
|
2410
|
-
})}`,
|
|
2431
|
+
crossings: g
|
|
2432
|
+
})}`, V = [...j.map(({ id: e, label: t, tone: n }) => ({
|
|
2411
2433
|
id: e,
|
|
2412
2434
|
label: t,
|
|
2413
2435
|
tone: n,
|
|
2414
2436
|
shape: qn[u]
|
|
2415
|
-
})), ...
|
|
2437
|
+
})), ...N.map(({ id: e, label: t, tone: n }) => ({
|
|
2416
2438
|
id: e,
|
|
2417
2439
|
label: t,
|
|
2418
2440
|
tone: n,
|
|
2419
2441
|
shape: "band"
|
|
2420
|
-
}))],
|
|
2421
|
-
if (
|
|
2422
|
-
...
|
|
2442
|
+
}))], he = w?.seriesValues !== void 0;
|
|
2443
|
+
if (x.status === "loading") return /* @__PURE__ */ X(rr, {
|
|
2444
|
+
...x,
|
|
2423
2445
|
series: e,
|
|
2424
2446
|
height: c,
|
|
2425
2447
|
showTimeAxis: m
|
|
2426
2448
|
});
|
|
2427
|
-
if (
|
|
2428
|
-
...
|
|
2429
|
-
message:
|
|
2449
|
+
if (ie !== void 0) return /* @__PURE__ */ X(le, {
|
|
2450
|
+
...x,
|
|
2451
|
+
message: ie
|
|
2430
2452
|
});
|
|
2431
|
-
if (
|
|
2432
|
-
...
|
|
2433
|
-
series:
|
|
2434
|
-
children: /* @__PURE__ */ X(
|
|
2453
|
+
if (P.length === 0) return /* @__PURE__ */ X(ce, {
|
|
2454
|
+
...x,
|
|
2455
|
+
series: V,
|
|
2456
|
+
children: /* @__PURE__ */ X(ue, { children: te })
|
|
2435
2457
|
});
|
|
2436
|
-
let
|
|
2437
|
-
crossings:
|
|
2458
|
+
let be = P.map((e) => e.timestamp), xe = _n({
|
|
2459
|
+
crossings: g,
|
|
2438
2460
|
series: e,
|
|
2439
2461
|
bands: h
|
|
2440
|
-
}),
|
|
2462
|
+
}), U = [...s.flatMap((e) => e.kind === "event" ? [e] : []), ...xe.flatMap(({ crossing: e, timestamp: t }) => t === void 0 ? [] : [{
|
|
2441
2463
|
id: e.id,
|
|
2442
2464
|
timestamp: t,
|
|
2443
2465
|
label: e.label,
|
|
2444
2466
|
value: e.value
|
|
2445
2467
|
}])];
|
|
2446
|
-
function
|
|
2468
|
+
function W(e) {
|
|
2447
2469
|
return {
|
|
2448
|
-
label: e === void 0 ? void 0 :
|
|
2449
|
-
rows: [...
|
|
2470
|
+
label: e === void 0 ? void 0 : F(e),
|
|
2471
|
+
rows: [...j.map((t) => {
|
|
2450
2472
|
let n = t.points.find((t) => t.timestamp === e);
|
|
2451
2473
|
return {
|
|
2452
2474
|
id: t.id,
|
|
2453
2475
|
label: t.label,
|
|
2454
2476
|
tone: t.tone,
|
|
2455
|
-
value:
|
|
2477
|
+
value: L(n?.value ?? null)
|
|
2456
2478
|
};
|
|
2457
2479
|
}), ...Qn({
|
|
2458
|
-
bands:
|
|
2480
|
+
bands: N,
|
|
2459
2481
|
timestamp: e,
|
|
2460
|
-
valueText:
|
|
2482
|
+
valueText: L
|
|
2461
2483
|
})],
|
|
2462
|
-
notes: [...s.filter((t) => t.kind !== "event" && t.timestamp === e).map((e) => e.label), ...
|
|
2484
|
+
notes: [...s.filter((t) => t.kind !== "event" && t.timestamp === e).map((e) => e.label), ...U.filter((t) => vn(be, t.timestamp) === e).map((e) => `${e.label} · ${F(e.timestamp)}`)]
|
|
2463
2485
|
};
|
|
2464
2486
|
}
|
|
2465
|
-
let
|
|
2466
|
-
width:
|
|
2467
|
-
height:
|
|
2487
|
+
let G = be[0] ?? 0, K = be.at(-1) ?? G, Ee = {
|
|
2488
|
+
width: D.width,
|
|
2489
|
+
height: D.height,
|
|
2468
2490
|
value: Yn({
|
|
2469
2491
|
format: i,
|
|
2470
2492
|
tickFormat: a,
|
|
@@ -2475,32 +2497,32 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2475
2497
|
isStacked: d,
|
|
2476
2498
|
isZeroBased: u === "area",
|
|
2477
2499
|
bands: h,
|
|
2478
|
-
crossings:
|
|
2500
|
+
crossings: g
|
|
2479
2501
|
}),
|
|
2480
|
-
timeDomain: $t(Jn(
|
|
2502
|
+
timeDomain: $t(Jn(G, n), Jn(K, n)),
|
|
2481
2503
|
timeFormat: r,
|
|
2482
|
-
locale:
|
|
2504
|
+
locale: C,
|
|
2483
2505
|
gutter: p,
|
|
2484
2506
|
hasValueTitle: o !== void 0
|
|
2485
|
-
},
|
|
2486
|
-
instants:
|
|
2487
|
-
x: (e) =>
|
|
2488
|
-
right:
|
|
2489
|
-
}), Oe =
|
|
2490
|
-
...
|
|
2491
|
-
topInset: zn(
|
|
2507
|
+
}, De = y(Ee), q = Rn({
|
|
2508
|
+
instants: U,
|
|
2509
|
+
x: (e) => De.x.position(Jn(e, n)),
|
|
2510
|
+
right: De.box.right
|
|
2511
|
+
}), Oe = y({
|
|
2512
|
+
...Ee,
|
|
2513
|
+
topInset: zn(q)
|
|
2492
2514
|
}), { box: J } = Oe;
|
|
2493
2515
|
function Y(e) {
|
|
2494
2516
|
return Oe.x.position(Jn(e, n));
|
|
2495
2517
|
}
|
|
2496
2518
|
let Q = Oe.y.position;
|
|
2497
2519
|
function Ae(e) {
|
|
2498
|
-
return `${
|
|
2520
|
+
return `${F(e[0])} to ${F(e[1])}`;
|
|
2499
2521
|
}
|
|
2500
|
-
let je =
|
|
2501
|
-
onRangeChange:
|
|
2502
|
-
rangeStep:
|
|
2503
|
-
} : void 0, Me =
|
|
2522
|
+
let je = v !== void 0 && b !== void 0 && K !== G ? {
|
|
2523
|
+
onRangeChange: v,
|
|
2524
|
+
rangeStep: b
|
|
2525
|
+
} : void 0, Me = be.map((e) => ({
|
|
2504
2526
|
id: String(e),
|
|
2505
2527
|
x: Y(e),
|
|
2506
2528
|
y: 0
|
|
@@ -2508,44 +2530,44 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2508
2530
|
return /* @__PURE__ */ X("div", {
|
|
2509
2531
|
className: "xeuugli",
|
|
2510
2532
|
children: /* @__PURE__ */ X(l, {
|
|
2511
|
-
items:
|
|
2512
|
-
readout: (e) =>
|
|
2513
|
-
locate:
|
|
2533
|
+
items: fe,
|
|
2534
|
+
readout: (e) => oe(W(Number(e))),
|
|
2535
|
+
locate: we({
|
|
2514
2536
|
marks: Me,
|
|
2515
2537
|
width: J.width,
|
|
2516
2538
|
height: J.height,
|
|
2517
2539
|
axis: "x"
|
|
2518
2540
|
}),
|
|
2519
|
-
revision:
|
|
2541
|
+
revision: B,
|
|
2520
2542
|
inspected: f?.id,
|
|
2521
2543
|
onInspectedChange: f?.onChange,
|
|
2522
2544
|
within: f?.within,
|
|
2523
2545
|
render: (e, { inspected: r, cursor: i }) => {
|
|
2524
|
-
let a = r === null ? void 0 : Number(r), c =
|
|
2525
|
-
plotRef:
|
|
2546
|
+
let a = r === null ? void 0 : Number(r), c = W(f === void 0 || f.isSource ? a : void 0), l = /* @__PURE__ */ Z(_e, {
|
|
2547
|
+
plotRef: D.ref,
|
|
2526
2548
|
box: J,
|
|
2527
|
-
label:
|
|
2528
|
-
title:
|
|
2549
|
+
label: ee({
|
|
2550
|
+
title: S,
|
|
2529
2551
|
marks: "observations",
|
|
2530
2552
|
isSelectable: !1
|
|
2531
2553
|
}),
|
|
2532
|
-
readoutId:
|
|
2554
|
+
readoutId: O,
|
|
2533
2555
|
children: [
|
|
2534
|
-
/* @__PURE__ */ X(
|
|
2556
|
+
/* @__PURE__ */ X(de, {
|
|
2535
2557
|
box: J,
|
|
2536
2558
|
xTicks: m ? Oe.xTicks : [],
|
|
2537
2559
|
yTicks: Oe.yTicks,
|
|
2538
2560
|
yTitle: o
|
|
2539
2561
|
}),
|
|
2540
|
-
/* @__PURE__ */ Z(
|
|
2562
|
+
/* @__PURE__ */ Z(ye, {
|
|
2541
2563
|
box: J,
|
|
2542
2564
|
children: [
|
|
2543
2565
|
/* @__PURE__ */ X(Bn, {
|
|
2544
|
-
bands:
|
|
2566
|
+
bands: N,
|
|
2545
2567
|
x: Y,
|
|
2546
2568
|
y: Q
|
|
2547
2569
|
}),
|
|
2548
|
-
|
|
2570
|
+
j.map((e) => {
|
|
2549
2571
|
let t = e.points.map((e) => ({
|
|
2550
2572
|
x: Y(e.timestamp),
|
|
2551
2573
|
y: e.value === null ? null : Q(e.value + e.base)
|
|
@@ -2555,16 +2577,16 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2555
2577
|
y1: e.value === null ? null : Q(e.value + e.base)
|
|
2556
2578
|
}));
|
|
2557
2579
|
return /* @__PURE__ */ Z("g", { children: [
|
|
2558
|
-
u === "area" && /* @__PURE__ */ X(
|
|
2559
|
-
d:
|
|
2580
|
+
u === "area" && /* @__PURE__ */ X(ge, {
|
|
2581
|
+
d: Ce(n),
|
|
2560
2582
|
tone: e.tone,
|
|
2561
2583
|
isPale: !d
|
|
2562
2584
|
}),
|
|
2563
|
-
/* @__PURE__ */ X(
|
|
2564
|
-
d:
|
|
2585
|
+
/* @__PURE__ */ X(pe, {
|
|
2586
|
+
d: H(t),
|
|
2565
2587
|
tone: e.tone
|
|
2566
2588
|
}),
|
|
2567
|
-
|
|
2589
|
+
Se(t).map((t) => /* @__PURE__ */ X(I, {
|
|
2568
2590
|
x: t.x,
|
|
2569
2591
|
y: t.y,
|
|
2570
2592
|
tone: e.tone,
|
|
@@ -2572,32 +2594,32 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2572
2594
|
}, t.x))
|
|
2573
2595
|
] }, e.id);
|
|
2574
2596
|
}),
|
|
2575
|
-
|
|
2597
|
+
g.map((e) => /* @__PURE__ */ X(z, {
|
|
2576
2598
|
x1: J.left,
|
|
2577
2599
|
x2: J.right,
|
|
2578
2600
|
y1: Q(e.value),
|
|
2579
2601
|
y2: Q(e.value)
|
|
2580
2602
|
}, e.id)),
|
|
2581
2603
|
s.map((e) => {
|
|
2582
|
-
if (e.kind === "time") return /* @__PURE__ */ X(
|
|
2604
|
+
if (e.kind === "time") return /* @__PURE__ */ X(me, {
|
|
2583
2605
|
x: Y(e.timestamp),
|
|
2584
2606
|
top: J.top,
|
|
2585
2607
|
bottom: J.bottom
|
|
2586
2608
|
}, e.id);
|
|
2587
|
-
let t =
|
|
2588
|
-
return e.kind === "point" ? /* @__PURE__ */ X(
|
|
2609
|
+
let t = j.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base;
|
|
2610
|
+
return e.kind === "point" ? /* @__PURE__ */ X(R, {
|
|
2589
2611
|
x: Y(e.timestamp),
|
|
2590
2612
|
y: Q(e.value + (t ?? 0))
|
|
2591
2613
|
}, e.id) : void 0;
|
|
2592
2614
|
}),
|
|
2593
|
-
a !== void 0 && /* @__PURE__ */ X(
|
|
2615
|
+
a !== void 0 && /* @__PURE__ */ X(me, {
|
|
2594
2616
|
x: Y(a),
|
|
2595
2617
|
top: J.top,
|
|
2596
2618
|
bottom: J.bottom
|
|
2597
2619
|
}),
|
|
2598
|
-
a !== void 0 &&
|
|
2620
|
+
a !== void 0 && j.flatMap((e) => {
|
|
2599
2621
|
let t = e.points.find((e) => e.timestamp === a);
|
|
2600
|
-
return t === void 0 || t.value === null ? [] : [/* @__PURE__ */ X(
|
|
2622
|
+
return t === void 0 || t.value === null ? [] : [/* @__PURE__ */ X(I, {
|
|
2601
2623
|
x: Y(t.timestamp),
|
|
2602
2624
|
y: Q(t.value + t.base),
|
|
2603
2625
|
tone: e.tone,
|
|
@@ -2607,13 +2629,13 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2607
2629
|
]
|
|
2608
2630
|
}),
|
|
2609
2631
|
/* @__PURE__ */ X(Vn, {
|
|
2610
|
-
placed:
|
|
2632
|
+
placed: q,
|
|
2611
2633
|
x: Y,
|
|
2612
2634
|
y: Q,
|
|
2613
2635
|
top: J.top,
|
|
2614
2636
|
bottom: J.bottom
|
|
2615
2637
|
}),
|
|
2616
|
-
i !== null && /* @__PURE__ */ X(
|
|
2638
|
+
i !== null && /* @__PURE__ */ X(ae, {
|
|
2617
2639
|
x: Y(Number(i)),
|
|
2618
2640
|
top: J.top,
|
|
2619
2641
|
bottom: J.bottom,
|
|
@@ -2621,33 +2643,33 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2621
2643
|
})
|
|
2622
2644
|
]
|
|
2623
2645
|
});
|
|
2624
|
-
return /* @__PURE__ */ Z(
|
|
2625
|
-
...
|
|
2646
|
+
return /* @__PURE__ */ Z(ce, {
|
|
2647
|
+
...x,
|
|
2626
2648
|
figure: e,
|
|
2627
|
-
titleDetail:
|
|
2628
|
-
series:
|
|
2629
|
-
seriesLegend: /* @__PURE__ */ X(
|
|
2630
|
-
id:
|
|
2649
|
+
titleDetail: he ? void 0 : c.label,
|
|
2650
|
+
series: V,
|
|
2651
|
+
seriesLegend: /* @__PURE__ */ X(M, {
|
|
2652
|
+
id: O,
|
|
2631
2653
|
label: c.label,
|
|
2632
|
-
legend:
|
|
2654
|
+
legend: V,
|
|
2633
2655
|
rows: c.rows,
|
|
2634
|
-
x: Y(a ??
|
|
2656
|
+
x: Y(a ?? G),
|
|
2635
2657
|
width: J.width,
|
|
2636
2658
|
notes: c.notes,
|
|
2637
|
-
hasSeriesSummary:
|
|
2659
|
+
hasSeriesSummary: he
|
|
2638
2660
|
}),
|
|
2639
|
-
children: [/* @__PURE__ */ X(
|
|
2640
|
-
label: `${
|
|
2661
|
+
children: [/* @__PURE__ */ X(se, {
|
|
2662
|
+
label: `${S} observations`,
|
|
2641
2663
|
columns: [
|
|
2642
2664
|
{
|
|
2643
2665
|
id: "time",
|
|
2644
2666
|
label: `Time (${n})`
|
|
2645
2667
|
},
|
|
2646
|
-
...
|
|
2668
|
+
...j.map((e) => ({
|
|
2647
2669
|
id: `series:${e.id}`,
|
|
2648
2670
|
label: e.label
|
|
2649
2671
|
})),
|
|
2650
|
-
...
|
|
2672
|
+
...N.flatMap((e) => [{
|
|
2651
2673
|
id: `band:${e.id}`,
|
|
2652
2674
|
label: e.label
|
|
2653
2675
|
}, {
|
|
@@ -2655,15 +2677,15 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2655
2677
|
label: `${e.label}: ${e.rangeLabel}`
|
|
2656
2678
|
}])
|
|
2657
2679
|
],
|
|
2658
|
-
rows:
|
|
2680
|
+
rows: P.map((e, t) => ({
|
|
2659
2681
|
id: e.timestamp,
|
|
2660
2682
|
values: [
|
|
2661
|
-
|
|
2662
|
-
...
|
|
2683
|
+
F(e.timestamp),
|
|
2684
|
+
...j.map((e) => L(e.points[t]?.value ?? null)),
|
|
2663
2685
|
...Qn({
|
|
2664
|
-
bands:
|
|
2686
|
+
bands: N,
|
|
2665
2687
|
timestamp: e.timestamp,
|
|
2666
|
-
valueText:
|
|
2688
|
+
valueText: L
|
|
2667
2689
|
}).map((e) => e.value)
|
|
2668
2690
|
]
|
|
2669
2691
|
}))
|
|
@@ -2671,26 +2693,26 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2671
2693
|
className: "xrvj5dj x1n8ia3y",
|
|
2672
2694
|
children: [
|
|
2673
2695
|
je === void 0 ? l : /* @__PURE__ */ X(Mn, {
|
|
2674
|
-
value:
|
|
2696
|
+
value: _,
|
|
2675
2697
|
onValueChange: je.onRangeChange,
|
|
2676
|
-
min:
|
|
2677
|
-
max:
|
|
2698
|
+
min: G,
|
|
2699
|
+
max: K,
|
|
2678
2700
|
step: je.rangeStep,
|
|
2679
2701
|
describe: Ae,
|
|
2680
|
-
label: `${
|
|
2681
|
-
left: Y(
|
|
2682
|
-
width: Y(
|
|
2702
|
+
label: `${S} time range`,
|
|
2703
|
+
left: Y(G),
|
|
2704
|
+
width: Y(K) - Y(G),
|
|
2683
2705
|
height: J.bottom,
|
|
2684
2706
|
children: l
|
|
2685
2707
|
}),
|
|
2686
2708
|
je !== void 0 && /* @__PURE__ */ Z("div", {
|
|
2687
2709
|
className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
2688
|
-
children: [/* @__PURE__ */ X("span", { children:
|
|
2710
|
+
children: [/* @__PURE__ */ X("span", { children: _ === null ? "Drag on the plot with a mouse to select a range of time." : `Selected range: ${Ae(_)}` }), _ === null ? /* @__PURE__ */ X(t, {
|
|
2689
2711
|
type: "button",
|
|
2690
2712
|
onClick: (e) => {
|
|
2691
2713
|
ke({ options: () => je }, "onRangeChange", cr({
|
|
2692
|
-
first:
|
|
2693
|
-
last:
|
|
2714
|
+
first: G,
|
|
2715
|
+
last: K,
|
|
2694
2716
|
step: je.rangeStep
|
|
2695
2717
|
}), {
|
|
2696
2718
|
reason: "trigger-press",
|
|
@@ -2709,16 +2731,16 @@ function or({ series: e, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
|
|
|
2709
2731
|
children: "Clear range"
|
|
2710
2732
|
})]
|
|
2711
2733
|
}),
|
|
2712
|
-
s.length +
|
|
2734
|
+
s.length + xe.length > 0 && /* @__PURE__ */ Z("ul", {
|
|
2713
2735
|
className: "x78zum5 x1a02dak x1n8ia3y x1ghz6dp x1717udv xe8uvvx xy8obcc x153jb6y xj0a0fe",
|
|
2714
2736
|
children: [s.map((e) => /* @__PURE__ */ Z("li", { children: [
|
|
2715
|
-
|
|
2737
|
+
F(e.timestamp),
|
|
2716
2738
|
" · ",
|
|
2717
2739
|
e.label,
|
|
2718
|
-
e.kind === "point" && ` · ${
|
|
2719
|
-
] }, e.id)),
|
|
2740
|
+
e.kind === "point" && ` · ${L(e.value)}`
|
|
2741
|
+
] }, e.id)), xe.map((e) => /* @__PURE__ */ X("li", { children: $n({
|
|
2720
2742
|
found: e,
|
|
2721
|
-
timeText:
|
|
2743
|
+
timeText: F
|
|
2722
2744
|
}) }, e.crossing.id))]
|
|
2723
2745
|
})
|
|
2724
2746
|
]
|