@mechane-ai/elements 0.34.0 → 0.35.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.
@@ -1,30 +1,29 @@
1
- import { d as e, u as t } from "../src-BOZsJ8td.js";
2
- import { i as n, n as r, r as i, t as a } from "../categorical-values-bWZBzMpX.js";
3
- import { D as o } from "../src-C-Sx37kz.js";
4
- import { t as s } from "../use-scroll-tab-index-Dxpdh4W7.js";
5
- import { s as c } from "../src-d7EAi61b.js";
6
- import { a as l, n as u, o as d, r as f, s as p, t as m } from "../chart-frame-Cr4P6MF5.js";
7
- import { n as h, r as g, t as _ } from "../chart-input-3wX0JoPE.js";
8
- import { r as v } from "../tokens.stylex-CJbIDPB9.js";
9
- import { t as y } from "../plot-width--OgdohB5.js";
10
- import { p as b } from "../src-BYKjPC-0.js";
11
- import * as x from "@stylexjs/stylex";
12
- import { useEffect as ee, useId as S, useMemo as te, useRef as ne, useState as C } from "react";
13
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
14
- import { scaleBand as re, scaleLinear as D } from "@visx/scale";
15
- import { AreaClosed as ie, Bar as ae, LinePath as O } from "@visx/shape";
1
+ import { d as e, u as t } from "../src-BHllGfI8.js";
2
+ import { i as n, n as r, r as i, t as a } from "../categorical-values-DpnNvPkc.js";
3
+ import { t as o } from "../accessibility-C-aIZ1Yx.js";
4
+ import { a as s, n as c, o as l, r as u, s as d, t as f } from "../chart-frame-BV0IPZtQ.js";
5
+ import { n as p, r as m, t as h } from "../chart-input-CN8PMrni.js";
6
+ import { r as g } from "../tokens.stylex-CJbIDPB9.js";
7
+ import { t as _ } from "../plot-width--OgdohB5.js";
8
+ import { D as v } from "../src-C-Sx37kz.js";
9
+ import { p as y } from "../src-BYKjPC-0.js";
10
+ import * as b from "@stylexjs/stylex";
11
+ import { useEffect as x, useId as S, useMemo as C, useRef as ee, useState as w } from "react";
12
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
13
+ import { scaleBand as O, scaleLinear as k } from "@visx/scale";
14
+ import { AreaClosed as te, Bar as A, LinePath as j } from "@visx/shape";
16
15
  // packages/charts/src/chart-cursor.tsx
17
- function oe({ x: e, top: t, bottom: n, width: r }) {
18
- return /* @__PURE__ */ E("g", {
16
+ function ne({ x: e, top: t, bottom: n, width: r }) {
17
+ return /* @__PURE__ */ D("g", {
19
18
  "aria-hidden": !0,
20
19
  className: "xlshs6z xgs60n x17y187c xbabvq0 x47corl",
21
- children: [/* @__PURE__ */ T("line", {
20
+ children: [/* @__PURE__ */ E("line", {
22
21
  x1: e,
23
22
  x2: e,
24
23
  y1: t,
25
24
  y2: n,
26
25
  className: "xnpr05h x1ntoi03 x13efnbd"
27
- }), /* @__PURE__ */ T("line", {
26
+ }), /* @__PURE__ */ E("line", {
28
27
  x1: e - r / 2,
29
28
  x2: e + r / 2,
30
29
  y1: n + 4,
@@ -34,36 +33,21 @@ function oe({ x: e, top: t, bottom: n, width: r }) {
34
33
  });
35
34
  }
36
35
  // packages/charts/src/chart-data.tsx
37
- function se({ title: e, children: t }) {
38
- let n = s();
39
- return /* @__PURE__ */ E(c.Root, { children: [/* @__PURE__ */ T(c.Trigger, {
40
- render: /* @__PURE__ */ T(o, { density: "compact" }),
41
- children: "Chart data"
42
- }), /* @__PURE__ */ E(c.Portal, { children: [/* @__PURE__ */ T(c.Backdrop, {}), /* @__PURE__ */ E(c.Popup, { children: [
43
- /* @__PURE__ */ T(c.Title, { children: e }),
44
- /* @__PURE__ */ T("div", {
45
- ref: n.ref,
46
- role: "region",
47
- "aria-label": "Chart values",
48
- tabIndex: n.tabIndex,
49
- className: "xeuugli x1phlbz0 xysyzu8 x1we84gm",
50
- children: t
51
- }),
52
- /* @__PURE__ */ T(c.Close, {
53
- render: /* @__PURE__ */ T(o, {}),
54
- children: "Close"
55
- })
56
- ] })] })] });
36
+ function M({ children: e }) {
37
+ return /* @__PURE__ */ E("div", {
38
+ ...b.props(o.hidden),
39
+ children: e
40
+ });
57
41
  }
58
42
  // packages/charts/src/chart-inspection.tsx
59
- var k = {
43
+ var N = {
60
44
  kzqmXN: "x1xc55vz",
61
45
  kZKoxP: "xdk7pt",
62
46
  kmuXW: "x2lah0s",
63
47
  $$css: !0
64
- }, A = {
48
+ }, P = {
65
49
  swatch: (e) => [
66
- k,
50
+ N,
67
51
  {
68
52
  kWkggS: e == null ? e : "xl8spv7",
69
53
  $$css: !0
@@ -103,78 +87,78 @@ var k = {
103
87
  "--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
104
88
  "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
105
89
  }]
106
- }, j = 4;
107
- function ce() {
108
- return /* @__PURE__ */ T("ul", {
90
+ }, re = 4;
91
+ function ie() {
92
+ return /* @__PURE__ */ E("ul", {
109
93
  "aria-hidden": !0,
110
94
  inert: !0,
111
95
  className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k",
112
- children: Array.from({ length: j }, (t, n) => /* @__PURE__ */ E("li", {
96
+ children: Array.from({ length: re }, (t, n) => /* @__PURE__ */ D("li", {
113
97
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe x1f394nn x43dure",
114
- children: [/* @__PURE__ */ T("span", { ...x.props(A.swatch(v.line)) }), /* @__PURE__ */ E("span", {
98
+ children: [/* @__PURE__ */ E("span", { ...b.props(P.swatch(g.line)) }), /* @__PURE__ */ D("span", {
115
99
  className: "x1cqoux5 xeuugli",
116
100
  children: [
117
- /* @__PURE__ */ T(e, {}),
118
- /* @__PURE__ */ T("span", {
101
+ /* @__PURE__ */ E(e, {}),
102
+ /* @__PURE__ */ E("span", {
119
103
  className: "x1s85apg xannxpe",
120
- children: /* @__PURE__ */ T(e, {})
104
+ children: /* @__PURE__ */ E(e, {})
121
105
  }),
122
- /* @__PURE__ */ T("span", {
106
+ /* @__PURE__ */ E("span", {
123
107
  className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
124
- children: /* @__PURE__ */ T(e, {})
108
+ children: /* @__PURE__ */ E(e, {})
125
109
  })
126
110
  ]
127
111
  })]
128
112
  }, n))
129
113
  });
130
114
  }
131
- function le({ title: e, detail: t }) {
132
- return t === void 0 ? e : /* @__PURE__ */ E("span", {
115
+ function ae({ title: e, detail: t }) {
116
+ return t === void 0 ? e : /* @__PURE__ */ D("span", {
133
117
  "aria-label": e,
134
118
  className: "x1lliihq xb3r6kr xlyipyv xuxw1ft",
135
- children: [/* @__PURE__ */ T("span", {
119
+ children: [/* @__PURE__ */ E("span", {
136
120
  className: "xt0psk2 x1boff50",
137
121
  children: e
138
- }), /* @__PURE__ */ T("span", {
122
+ }), /* @__PURE__ */ E("span", {
139
123
  className: "x1s85apg xfodcyb",
140
124
  children: t
141
125
  })]
142
126
  });
143
127
  }
144
- function M({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: o, width: s, offset: c = 16, source: l, notes: u = [], hasSeriesSummary: d = !1 }) {
145
- let f = Math.min(260, s), m = o > s / 2 ? o - f - c : o + c, h = Math.max(0, Math.min(s - f, m)), g = t === void 0 ? [] : [
128
+ function oe({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x: o, width: s, offset: c = 16, source: l, notes: u = [], hasSeriesSummary: f = !1 }) {
129
+ let p = Math.min(260, s), m = o > s / 2 ? o - p - c : o + c, h = Math.max(0, Math.min(s - p, m)), g = t === void 0 ? [] : [
146
130
  t,
147
131
  n,
148
132
  ...a.map((e) => `${e.label}: ${e.value}`),
149
133
  ...u
150
134
  ].filter((e) => e !== void 0);
151
- return /* @__PURE__ */ E("div", {
135
+ return /* @__PURE__ */ D("div", {
152
136
  className: "xeuugli",
153
137
  children: [
154
- !d && /* @__PURE__ */ E("div", {
138
+ !f && /* @__PURE__ */ D("div", {
155
139
  className: "xrvj5dj xeuugli",
156
- children: [i !== void 0 && /* @__PURE__ */ T("ul", {
140
+ children: [i !== void 0 && /* @__PURE__ */ E("ul", {
157
141
  "aria-hidden": !0,
158
142
  inert: !0,
159
143
  className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc xlshs6z x47corl",
160
- children: i.map((e) => /* @__PURE__ */ E("li", {
144
+ children: i.map((e) => /* @__PURE__ */ D("li", {
161
145
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
162
- children: [/* @__PURE__ */ T("span", { ...x.props(A.swatch(p[e.tone])) }), /* @__PURE__ */ E("span", {
146
+ children: [/* @__PURE__ */ E("span", { ...b.props(P.swatch(d[e.tone])) }), /* @__PURE__ */ D("span", {
163
147
  className: "xeuugli",
164
- children: [e.label, /* @__PURE__ */ T("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
148
+ children: [e.label, /* @__PURE__ */ E("span", { className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b" })]
165
149
  })]
166
150
  }, e.id))
167
- }), /* @__PURE__ */ T("ul", {
151
+ }), /* @__PURE__ */ E("ul", {
168
152
  "aria-label": "Legend",
169
153
  className: "x78zum5 x1xnx9c1 xnby9oq x1a02dak x8zbtdt x1gkm1c7 x1ghz6dp x1717udv xe8uvvx x153jb6y xy8obcc xas2l8k x15r89dc",
170
- children: r.map((e) => /* @__PURE__ */ E("li", {
154
+ children: r.map((e) => /* @__PURE__ */ D("li", {
171
155
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
172
- children: [/* @__PURE__ */ T("span", {
156
+ children: [/* @__PURE__ */ E("span", {
173
157
  "aria-hidden": !0,
174
- ...x.props(A.swatch(p[e.tone]))
175
- }), /* @__PURE__ */ E("span", {
158
+ ...b.props(P.swatch(d[e.tone]))
159
+ }), /* @__PURE__ */ D("span", {
176
160
  className: "xeuugli",
177
- children: [e.label, /* @__PURE__ */ T("span", {
161
+ children: [e.label, /* @__PURE__ */ E("span", {
178
162
  className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
179
163
  children: t === void 0 ? "" : a.find((t) => t.id === e.id)?.value ?? "—"
180
164
  })]
@@ -182,36 +166,36 @@ function M({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x
182
166
  }, e.id))
183
167
  })]
184
168
  }),
185
- /* @__PURE__ */ T("span", {
169
+ /* @__PURE__ */ E("span", {
186
170
  id: e,
187
171
  "aria-live": l === "keyboard" ? "polite" : "off",
188
172
  className: "x10l6tqk x1i1rx1s xjm9jq1 x1717udv xb3r6kr x1hyvwdk xuxw1ft",
189
173
  children: g.join(" · ")
190
174
  }),
191
- t !== void 0 && /* @__PURE__ */ T("div", {
175
+ t !== void 0 && /* @__PURE__ */ E("div", {
192
176
  "aria-hidden": !0,
193
177
  className: "x1n2onr6 xqtp20y x1vjfegm",
194
- children: /* @__PURE__ */ E("div", {
195
- ...x.props(A.inspector, d && A.summaryInspector, A.position(h, f)),
178
+ children: /* @__PURE__ */ D("div", {
179
+ ...b.props(P.inspector, f && P.summaryInspector, P.position(h, p)),
196
180
  children: [
197
- /* @__PURE__ */ E("div", {
181
+ /* @__PURE__ */ D("div", {
198
182
  className: "x78zum5 x1qughib x1hnptsi xk4h15q",
199
- children: [/* @__PURE__ */ T("span", { children: t }), n !== void 0 && /* @__PURE__ */ T("span", { children: n })]
183
+ children: [/* @__PURE__ */ E("span", { children: t }), n !== void 0 && /* @__PURE__ */ E("span", { children: n })]
200
184
  }),
201
- /* @__PURE__ */ T("dl", {
185
+ /* @__PURE__ */ E("dl", {
202
186
  className: "xrvj5dj xunmzkg x1ghz6dp",
203
- children: a.map((e) => /* @__PURE__ */ E("div", {
187
+ children: a.map((e) => /* @__PURE__ */ D("div", {
204
188
  className: "x78zum5 x1qughib x1pha0wt x1hnptsi",
205
- children: [/* @__PURE__ */ E("dt", {
189
+ children: [/* @__PURE__ */ D("dt", {
206
190
  className: "x78zum5 x1pha0wt xunmzkg xeuugli xj0a0fe",
207
- children: [/* @__PURE__ */ T("span", { ...x.props(A.swatch(p[e.tone])) }), e.label]
208
- }), /* @__PURE__ */ T("dd", {
191
+ children: [/* @__PURE__ */ E("span", { ...b.props(P.swatch(d[e.tone])) }), e.label]
192
+ }), /* @__PURE__ */ E("dd", {
209
193
  className: "x1ghz6dp xuxw1ft",
210
194
  children: e.value
211
195
  })]
212
196
  }, e.id))
213
197
  }),
214
- u.map((e) => /* @__PURE__ */ T("span", { children: e }, e))
198
+ u.map((e) => /* @__PURE__ */ E("span", { children: e }, e))
215
199
  ]
216
200
  })
217
201
  })
@@ -219,7 +203,7 @@ function M({ id: e, label: t, summary: n, legend: r, layoutLegend: i, rows: a, x
219
203
  });
220
204
  }
221
205
  // packages/charts/src/cartesian/bar-data.ts
222
- function ue({ composition: e, series: t, categoryIds: n, domain: r }) {
206
+ function se({ composition: e, series: t, categoryIds: n, domain: r }) {
223
207
  if (e === void 0) return;
224
208
  if (e.buckets.length !== n.length) return "Composition requires one explicit bucket per category.";
225
209
  let i = e.annotation;
@@ -237,43 +221,43 @@ function ue({ composition: e, series: t, categoryIds: n, domain: r }) {
237
221
  }
238
222
  }
239
223
  // packages/charts/src/cartesian/composition-bars.tsx
240
- var N = { mark: {
224
+ var ce = { mark: {
241
225
  k3nNDw: "x1hj3fc7",
242
226
  k1ekBW: "xwcsmn1",
243
227
  kIyJzY: "xtitasy x12w9bfk",
244
228
  kAMwcw: "x1faw7qm",
245
229
  $$css: !0
246
230
  } };
247
- function de({ bucket: e, series: t, focusedSeries: n, index: r, x: a, width: o, y: s, isHighlighted: c, highlightedSeriesId: l }) {
248
- let u = n !== void 0, f = n !== void 0 && !t.some((e) => e.id === n.id) ? [...t, n] : t;
231
+ function le({ bucket: e, series: t, focusedSeries: n, index: r, x: a, width: o, y: s, isHighlighted: c, highlightedSeriesId: u }) {
232
+ let f = n !== void 0, p = n !== void 0 && !t.some((e) => e.id === n.id) ? [...t, n] : t;
249
233
  function m(e, t) {
250
234
  let n = s(t), r = s(t + e);
251
235
  return `translateY(${Math.min(n, r)}px) scaleY(${Math.max(+(e === 0), Math.abs(r - n))})`;
252
236
  }
253
- return /* @__PURE__ */ E(w, { children: [e.kind !== "gap" && /* @__PURE__ */ T("rect", {
237
+ return /* @__PURE__ */ D(T, { children: [e.kind !== "gap" && /* @__PURE__ */ E("rect", {
254
238
  x: a,
255
239
  y: 0,
256
240
  width: o,
257
241
  height: 1,
258
242
  vectorEffect: "non-scaling-stroke",
259
- fill: p.neutral,
260
- ...x.props(N.mark, c && d.selected),
243
+ fill: d.neutral,
244
+ ...b.props(ce.mark, c && l.selected),
261
245
  style: {
262
246
  transform: m(e.total, 0),
263
- opacity: u ? .18 : +(e.kind === "total")
247
+ opacity: f ? .18 : +(e.kind === "total")
264
248
  }
265
- }), f.map((s, f) => {
249
+ }), p.map((s, p) => {
266
250
  let h = s.values[r];
267
251
  if (h == null) return null;
268
- let g = n?.id === s.id, _ = u ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), v = u ? g : e.kind === "parts", y = !u && l !== void 0 && l !== s.id;
269
- return /* @__PURE__ */ T("rect", {
252
+ let g = n?.id === s.id, _ = f ? 0 : t.slice(0, p).reduce((e, t) => e + (t.values[r] ?? 0), 0), v = f ? g : e.kind === "parts", y = !f && u !== void 0 && u !== s.id;
253
+ return /* @__PURE__ */ E("rect", {
270
254
  x: a,
271
255
  y: 0,
272
256
  width: o,
273
257
  height: 1,
274
258
  vectorEffect: "non-scaling-stroke",
275
- fill: p[i(s.tone, f)],
276
- ...x.props(N.mark, c && d.selected),
259
+ fill: d[i(s.tone, p)],
260
+ ...b.props(ce.mark, c && l.selected),
277
261
  style: {
278
262
  transform: m(h, _),
279
263
  opacity: v ? y ? .3 : 1 : 0
@@ -282,7 +266,7 @@ function de({ bucket: e, series: t, focusedSeries: n, index: r, x: a, width: o,
282
266
  })] });
283
267
  }
284
268
  // packages/charts/src/cartesian/bar-chart.tsx
285
- var P = {
269
+ var ue = {
286
270
  plot: {
287
271
  kqGvvJ: "x1we84gm",
288
272
  $$css: !0
@@ -291,67 +275,67 @@ var P = {
291
275
  kSiTet: "xuzhngd",
292
276
  $$css: !0
293
277
  }
294
- }, fe = /* @__PURE__ */ new Set(["Enter", " "]), pe = 200;
295
- function F({ title: e, description: t, report: n, series: r, layoutSeries: a, children: o, inspectionId: s, label: c, detail: l, summary: u, rows: d = [], index: p = -1, formatValue: m = String, x: h = 0, width: g = 0, offset: _, source: v, data: y, isLoading: b = !1 }) {
278
+ }, de = /* @__PURE__ */ new Set(["Enter", " "]), fe = 200;
279
+ function F({ title: e, description: t, report: n, series: r, layoutSeries: a, children: o, inspectionId: s, label: c, detail: l, summary: d, rows: f = [], index: p = -1, formatValue: m = String, x: h = 0, width: g = 0, offset: _, source: v, data: y, isLoading: b = !1 }) {
296
280
  let x = r.map((e, t) => ({
297
281
  id: e.id,
298
282
  label: e.label,
299
283
  tone: i(e.tone, t)
300
- })), ee = a?.map((e, t) => ({
284
+ })), S = a?.map((e, t) => ({
301
285
  id: e.id,
302
286
  label: e.label,
303
287
  tone: i(e.tone, t)
304
- })), S = b && r.length === 0 && n?.seriesValues === void 0;
305
- return /* @__PURE__ */ E(f, {
306
- title: /* @__PURE__ */ T(le, {
288
+ })), C = b && r.length === 0 && n?.seriesValues === void 0;
289
+ return /* @__PURE__ */ D(u, {
290
+ title: /* @__PURE__ */ E(ae, {
307
291
  title: e,
308
292
  detail: l
309
293
  }),
310
294
  description: t,
311
295
  report: n,
312
296
  series: x,
313
- actions: /* @__PURE__ */ T(se, {
314
- title: e,
315
- children: y
316
- }),
317
- children: [S ? /* @__PURE__ */ T(ce, {}) : /* @__PURE__ */ T(M, {
318
- id: s,
319
- label: c,
320
- summary: u,
321
- legend: x,
322
- hasSeriesSummary: n?.seriesValues !== void 0,
323
- layoutLegend: ee,
324
- rows: d.map((e, t) => ({
325
- id: e.id,
326
- label: e.label,
327
- tone: i(e.tone, t),
328
- value: e.values[p] === null || e.values[p] === void 0 ? "Unavailable" : m(e.values[p])
329
- })),
330
- x: h,
331
- width: g,
332
- offset: _,
333
- source: v
334
- }), o]
297
+ children: [
298
+ /* @__PURE__ */ E(M, { children: y }),
299
+ C ? /* @__PURE__ */ E(ie, {}) : /* @__PURE__ */ E(oe, {
300
+ id: s,
301
+ label: c,
302
+ summary: d,
303
+ legend: x,
304
+ hasSeriesSummary: n?.seriesValues !== void 0,
305
+ layoutLegend: S,
306
+ rows: f.map((e, t) => ({
307
+ id: e.id,
308
+ label: e.label,
309
+ tone: i(e.tone, t),
310
+ value: e.values[p] === null || e.values[p] === void 0 ? "Unavailable" : m(e.values[p])
311
+ })),
312
+ x: h,
313
+ width: g,
314
+ offset: _,
315
+ source: v
316
+ }),
317
+ o
318
+ ]
335
319
  });
336
320
  }
337
- function I({ title: e = "Loading chart", description: n, report: r, series: i = [], height: a = pe }) {
321
+ function I({ title: e = "Loading chart", description: n, report: r, series: i = [], height: a = fe }) {
338
322
  let o = L(a), s = S();
339
- return o === void 0 ? /* @__PURE__ */ T("div", {
323
+ return o === void 0 ? /* @__PURE__ */ E("div", {
340
324
  "aria-hidden": !0,
341
325
  inert: !0,
342
- children: /* @__PURE__ */ T(F, {
326
+ children: /* @__PURE__ */ E(F, {
343
327
  title: e,
344
328
  description: n,
345
329
  report: r,
346
330
  series: i,
347
331
  inspectionId: s,
348
332
  isLoading: !0,
349
- children: /* @__PURE__ */ T("div", {
350
- ...x.props(d.plot, P.plot),
351
- children: /* @__PURE__ */ T(t, { height: a })
333
+ children: /* @__PURE__ */ E("div", {
334
+ ...b.props(l.plot, ue.plot),
335
+ children: /* @__PURE__ */ E(t, { height: a })
352
336
  })
353
337
  })
354
- }) : /* @__PURE__ */ T(_, {
338
+ }) : /* @__PURE__ */ E(h, {
355
339
  title: e,
356
340
  description: n,
357
341
  report: r,
@@ -361,10 +345,10 @@ function I({ title: e = "Loading chart", description: n, report: r, series: i =
361
345
  function L(e) {
362
346
  if (!Number.isFinite(e) || e < 48) return "Chart height must be at least 48 pixels.";
363
347
  }
364
- function me({ categories: e, series: t, domain: n, mode: i }) {
348
+ function pe({ categories: e, series: t, domain: n, mode: i }) {
365
349
  if (e.length > r.items || t.length > r.series) return `Choose a window with at most ${r.items} categories and ${r.series} series.`;
366
- if (!g(n) || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
367
- if (!h(e) || !h(t)) return "Bar categories and series require unique identifiers.";
350
+ if (!m(n) || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
351
+ if (!p(e) || !p(t)) return "Bar categories and series require unique identifiers.";
368
352
  for (let r of t) {
369
353
  if (r.values.length !== e.length) return "Every series requires one explicit value per category.";
370
354
  for (let e of r.values) {
@@ -374,64 +358,64 @@ function me({ categories: e, series: t, domain: n, mode: i }) {
374
358
  }
375
359
  if (i === "stacked" && e.some((e, r) => t.reduce((e, t) => e + (t.values[r] ?? 0), 0) > n[1])) return "Stacked bar totals must fit the supplied domain.";
376
360
  }
377
- var he = {
361
+ var me = {
378
362
  "x-default-marker": "x-default-marker",
379
363
  $$css: !0
380
364
  };
381
- function R({ title: e, description: t, report: n, categories: r, series: o, domain: s, mode: c = "grouped", formatValue: l, formatTick: u = l, highlightedSeriesId: f, selection: m, height: h = pe, composition: g }) {
382
- let v = g?.focusedSeries, b = S(), te = v === void 0 ? void 0 : me({
365
+ function he({ title: e, description: t, report: n, categories: r, series: o, domain: s, mode: c = "grouped", formatValue: u, formatTick: f = u, highlightedSeriesId: p, selection: m, height: g = fe, composition: v }) {
366
+ let y = v?.focusedSeries, C = S(), ee = y === void 0 ? void 0 : pe({
383
367
  categories: r,
384
- series: [v],
368
+ series: [y],
385
369
  domain: s,
386
370
  mode: "grouped"
387
- }), ne = me({
371
+ }), T = pe({
388
372
  categories: r,
389
373
  series: o,
390
374
  domain: s,
391
375
  mode: c
392
- }) ?? te, w = ue({
393
- composition: g,
376
+ }) ?? ee, te = se({
377
+ composition: v,
394
378
  series: o,
395
379
  categoryIds: r.map((e) => e.id),
396
380
  domain: s
397
- }) ?? L(h), ie = ne ?? w, O = g === void 0 ? void 0 : {
398
- id: b,
399
- label: g.contextLabel,
381
+ }) ?? L(g), j = T ?? te, M = v === void 0 ? void 0 : {
382
+ id: C,
383
+ label: v.contextLabel,
400
384
  tone: "neutral",
401
- values: g.buckets.map((e) => e.kind === "gap" ? null : e.total)
402
- }, se = O === void 0 ? o : [
403
- O,
385
+ values: v.buckets.map((e) => e.kind === "gap" ? null : e.total)
386
+ }, N = M === void 0 ? o : [
387
+ M,
404
388
  ...o,
405
- ...v === void 0 || o.some((e) => e.id === v.id) ? [] : [v]
406
- ], k = v !== void 0 && O !== void 0 ? [v, O] : o, { ref: A, width: j, element: ce } = y(), le = S(), [M, N] = C(), [I, R] = C();
407
- ee(() => {
389
+ ...y === void 0 || o.some((e) => e.id === y.id) ? [] : [y]
390
+ ], P = y !== void 0 && M !== void 0 ? [y, M] : o, { ref: re, width: ie, element: ae } = _(), oe = S(), [ce, I] = w(), [he, z] = w();
391
+ x(() => {
408
392
  function e(e) {
409
- e.target instanceof Node && ce?.contains(e.target) !== !0 && N(void 0);
393
+ e.target instanceof Node && ae?.contains(e.target) !== !0 && I(void 0);
410
394
  }
411
395
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
412
- }, [ce]);
413
- let ge = r.findIndex((e) => e.id === M?.id), B = r[ge], V = r[r.findIndex((e) => e.id === m?.selectedId)], H = r.find((e) => e.id === I) ?? V ?? r[0], U = r.findIndex((e) => e.id === H?.id), W = B, G = ge, K = g?.buckets[G], q = v !== void 0 && O !== void 0 ? [v, O] : O === void 0 || K?.kind === "parts" ? o : [], J = K === void 0 ? void 0 : K.kind === "gap" ? "No reported value" : l(K.total);
414
- if (ie !== void 0) return /* @__PURE__ */ T(_, {
396
+ }, [ae]);
397
+ let B = r.findIndex((e) => e.id === ce?.id), V = r[B], H = r[r.findIndex((e) => e.id === m?.selectedId)], U = r.find((e) => e.id === he) ?? H ?? r[0], W = r.findIndex((e) => e.id === U?.id), G = V, ge = B, K = v?.buckets[ge], q = y !== void 0 && M !== void 0 ? [y, M] : M === void 0 || K?.kind === "parts" ? o : [], J = K === void 0 ? void 0 : K.kind === "gap" ? "No reported value" : u(K.total);
398
+ if (j !== void 0) return /* @__PURE__ */ E(h, {
415
399
  title: e,
416
400
  description: t,
417
401
  report: n,
418
- message: ie
402
+ message: j
419
403
  });
420
- let Y = h - 28, X = D({
404
+ let Y = g - 28, X = k({
421
405
  domain: [...s],
422
406
  range: [Y, 12]
423
- }), Z = Math.max(44, ...X.ticks(3).map((e) => u(e).length * 7 + 12)), _e = Math.max(Z + 1, j - 16), Q = re({
407
+ }), Z = Math.max(44, ...X.ticks(3).map((e) => f(e).length * 7 + 12)), Q = Math.max(Z + 1, ie - 16), $ = O({
424
408
  domain: r.map((e) => e.id),
425
- range: [Z, _e],
409
+ range: [Z, Q],
426
410
  padding: .3
427
- }), $ = re({
411
+ }), _e = O({
428
412
  domain: o.map((e) => e.id),
429
- range: [0, Q.bandwidth()],
413
+ range: [0, $.bandwidth()],
430
414
  padding: .08
431
- }), ve = Math.min(120, Math.max(40, ...r.map((e) => (e.axisLabel ?? e.label).length * 7))), ye = Math.max(1, Math.ceil((ve + 16) / Q.step())), be = Math.max(1, Math.floor((Q.step() * ye - 16) / 7));
415
+ }), ve = Math.min(120, Math.max(40, ...r.map((e) => (e.axisLabel ?? e.label).length * 7))), ye = Math.max(1, Math.ceil((ve + 16) / $.step())), be = Math.max(1, Math.floor(($.step() * ye - 16) / 7));
432
416
  function xe(e) {
433
- let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * j, i = Math.floor((n - Z) / Q.step()), a = r[Math.max(0, Math.min(r.length - 1, i))];
434
- a !== void 0 && (e.type === "pointerdown" && R(a.id), N({
417
+ let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * ie, i = Math.floor((n - Z) / $.step()), a = r[Math.max(0, Math.min(r.length - 1, i))];
418
+ a !== void 0 && (e.type === "pointerdown" && z(a.id), I({
435
419
  id: a.id,
436
420
  source: "pointer"
437
421
  }));
@@ -439,68 +423,65 @@ function R({ title: e, description: t, report: n, categories: r, series: o, doma
439
423
  function Se(e) {
440
424
  if (e.altKey || e.ctrlKey || e.metaKey) return;
441
425
  if (e.key === "Escape") {
442
- e.preventDefault(), e.stopPropagation(), N(void 0);
426
+ e.preventDefault(), e.stopPropagation(), I(void 0);
443
427
  return;
444
428
  }
445
- if (fe.has(e.key)) {
446
- H !== void 0 && m !== void 0 && (e.preventDefault(), m.onSelect(H.id));
429
+ if (de.has(e.key)) {
430
+ U !== void 0 && m !== void 0 && (e.preventDefault(), m.onSelect(U.id));
447
431
  return;
448
432
  }
449
433
  let t = {
450
- ArrowRight: Math.min(r.length - 1, U + 1),
451
- ArrowLeft: Math.max(0, U - 1),
434
+ ArrowRight: Math.min(r.length - 1, W + 1),
435
+ ArrowLeft: Math.max(0, W - 1),
452
436
  Home: 0,
453
437
  End: r.length - 1
454
438
  }[e.key], n = t === void 0 ? void 0 : r[t];
455
- n !== void 0 && (e.preventDefault(), R(n.id), N({
439
+ n !== void 0 && (e.preventDefault(), z(n.id), I({
456
440
  id: n.id,
457
441
  source: "keyboard"
458
442
  }));
459
443
  }
460
- return /* @__PURE__ */ T(F, {
444
+ return /* @__PURE__ */ E(F, {
461
445
  title: e,
462
446
  description: t,
463
447
  report: n,
464
- series: k,
448
+ series: P,
465
449
  layoutSeries: o,
466
- inspectionId: le,
467
- label: W?.label,
468
- detail: W === void 0 ? void 0 : [W.axisLabel ?? W.label, J].filter(Boolean).join(" · "),
450
+ inspectionId: oe,
451
+ label: G?.label,
452
+ detail: G === void 0 ? void 0 : [G.axisLabel ?? G.label, J].filter(Boolean).join(" · "),
469
453
  summary: J,
470
454
  rows: q,
471
- index: G,
472
- formatValue: l,
473
- x: (Q(W?.id ?? "") ?? Z) + Q.bandwidth() / 2,
474
- width: j,
475
- offset: Q.bandwidth() / 2 + 8,
476
- source: M?.source,
477
- data: /* @__PURE__ */ T(a, {
478
- items: r.map((e, t) => ({
479
- id: e.id,
480
- label: e.label,
481
- valueLabel: z(se, t, l),
482
- tone: "neutral"
483
- })),
484
- selection: m
485
- }),
486
- children: /* @__PURE__ */ T("div", {
487
- ref: A,
488
- ...x.props(d.plot, P.plot),
489
- children: r.length === 0 || o.length === 0 && g === void 0 ? /* @__PURE__ */ T("p", {
455
+ index: ge,
456
+ formatValue: u,
457
+ x: ($(G?.id ?? "") ?? Z) + $.bandwidth() / 2,
458
+ width: ie,
459
+ offset: $.bandwidth() / 2 + 8,
460
+ source: ce?.source,
461
+ data: /* @__PURE__ */ E(a, { items: r.map((e, t) => ({
462
+ id: e.id,
463
+ label: e.label,
464
+ valueLabel: R(N, t, u),
465
+ tone: "neutral"
466
+ })) }),
467
+ children: /* @__PURE__ */ E("div", {
468
+ ref: re,
469
+ ...b.props(l.plot, ue.plot),
470
+ children: r.length === 0 || o.length === 0 && v === void 0 ? /* @__PURE__ */ E("p", {
490
471
  className: "x153jb6y x1ghz6dp xy8obcc",
491
472
  children: "No categories"
492
- }) : /* @__PURE__ */ E("svg", {
473
+ }) : /* @__PURE__ */ D("svg", {
493
474
  role: "img",
494
475
  "aria-label": `${e}. Use arrow keys to inspect categories.${m === void 0 ? "" : " Press Enter to select."}`,
495
- "aria-describedby": le,
476
+ "aria-describedby": oe,
496
477
  tabIndex: 0,
497
- viewBox: `0 0 ${j} ${h}`,
498
- height: h,
478
+ viewBox: `0 0 ${ie} ${g}`,
479
+ height: g,
499
480
  onKeyDown: Se,
500
481
  onFocus: (e) => {
501
482
  if (e.currentTarget.matches(":focus-visible")) {
502
- let e = V ?? r[0];
503
- R(e?.id), N(e === void 0 ? void 0 : {
483
+ let e = H ?? r[0];
484
+ z(e?.id), I(e === void 0 ? void 0 : {
504
485
  id: e.id,
505
486
  source: "keyboard"
506
487
  });
@@ -511,97 +492,97 @@ function R({ title: e, description: t, report: n, categories: r, series: o, doma
511
492
  },
512
493
  onPointerDown: xe,
513
494
  onPointerLeave: (e) => {
514
- e.pointerType === "mouse" && M?.source === "pointer" && N(void 0);
495
+ e.pointerType === "mouse" && ce?.source === "pointer" && I(void 0);
515
496
  },
516
- onBlur: () => N(void 0),
497
+ onBlur: () => I(void 0),
517
498
  onClick: () => {
518
- B !== void 0 && m?.onSelect(B.id);
499
+ V !== void 0 && m?.onSelect(V.id);
519
500
  },
520
- ...x.props(d.svg, d.inspectable, he),
501
+ ...b.props(l.svg, l.inspectable, me),
521
502
  children: [
522
- B !== void 0 && /* @__PURE__ */ T("rect", {
523
- x: (Q(B.id) ?? Z) - (Q.step() - Q.bandwidth()) / 2,
503
+ V !== void 0 && /* @__PURE__ */ E("rect", {
504
+ x: ($(V.id) ?? Z) - ($.step() - $.bandwidth()) / 2,
524
505
  y: 12,
525
- width: Q.step(),
506
+ width: $.step(),
526
507
  height: Y - 12,
527
508
  className: "x2wnxhi"
528
509
  }),
529
- X.ticks(3).map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
510
+ X.ticks(3).map((e) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
530
511
  x1: Z,
531
- x2: _e,
512
+ x2: Q,
532
513
  y1: X(e),
533
514
  y2: X(e),
534
- ...x.props(d.grid)
535
- }), /* @__PURE__ */ T("text", {
515
+ ...b.props(l.grid)
516
+ }), /* @__PURE__ */ E("text", {
536
517
  x: Z - 8,
537
518
  y: X(e),
538
519
  textAnchor: "end",
539
520
  dominantBaseline: "middle",
540
- ...x.props(d.label),
541
- children: u(e)
521
+ ...b.props(l.label),
522
+ children: f(e)
542
523
  })] }, e)),
543
- g?.annotation !== void 0 && r.some((e) => e.id === g.annotation?.categoryId) && /* @__PURE__ */ T("text", {
544
- x: Q(g.annotation.categoryId),
545
- y: Math.max(12, X(g.annotation.value) - 8),
546
- ...x.props(d.label),
547
- children: g.annotation.label
524
+ v?.annotation !== void 0 && r.some((e) => e.id === v.annotation?.categoryId) && /* @__PURE__ */ E("text", {
525
+ x: $(v.annotation.categoryId),
526
+ y: Math.max(12, X(v.annotation.value) - 8),
527
+ ...b.props(l.label),
528
+ children: v.annotation.label
548
529
  }),
549
530
  r.map((e, t) => {
550
- let n = e.axisLabel ?? e.label, r = g?.buckets[t];
551
- return /* @__PURE__ */ E("g", { children: [r === void 0 ? o.map((n, r) => {
531
+ let n = e.axisLabel ?? e.label, r = v?.buckets[t];
532
+ return /* @__PURE__ */ D("g", { children: [r === void 0 ? o.map((n, r) => {
552
533
  let a = n.values[t];
553
534
  if (a == null) return null;
554
- let s = c === "stacked" ? o.slice(0, r).reduce((e, n) => e + (n.values[t] ?? 0), 0) : 0, l = X(s), u = X(s + a), h = m?.selectedId === e.id || B?.id === e.id;
555
- return /* @__PURE__ */ T(ae, {
556
- x: (Q(e.id) ?? Z) + (c === "stacked" ? 0 : $(n.id) ?? 0),
557
- y: Math.min(l, u),
558
- width: c === "stacked" ? Q.bandwidth() : $.bandwidth(),
559
- height: Math.max(+(a === 0), Math.abs(u - l)),
560
- fill: p[i(n.tone, r)],
561
- ...x.props(h && d.selected, f !== void 0 && f !== n.id && P.mutedMark)
535
+ let s = c === "stacked" ? o.slice(0, r).reduce((e, n) => e + (n.values[t] ?? 0), 0) : 0, u = X(s), f = X(s + a), h = m?.selectedId === e.id || V?.id === e.id;
536
+ return /* @__PURE__ */ E(A, {
537
+ x: ($(e.id) ?? Z) + (c === "stacked" ? 0 : _e(n.id) ?? 0),
538
+ y: Math.min(u, f),
539
+ width: c === "stacked" ? $.bandwidth() : _e.bandwidth(),
540
+ height: Math.max(+(a === 0), Math.abs(f - u)),
541
+ fill: d[i(n.tone, r)],
542
+ ...b.props(h && l.selected, p !== void 0 && p !== n.id && ue.mutedMark)
562
543
  }, n.id);
563
- }) : /* @__PURE__ */ T(de, {
544
+ }) : /* @__PURE__ */ E(le, {
564
545
  bucket: r,
565
546
  series: o,
566
- focusedSeries: v,
547
+ focusedSeries: y,
567
548
  index: t,
568
- x: Q(e.id) ?? Z,
569
- width: Q.bandwidth(),
549
+ x: $(e.id) ?? Z,
550
+ width: $.bandwidth(),
570
551
  y: X,
571
- isHighlighted: m?.selectedId === e.id || B?.id === e.id,
572
- highlightedSeriesId: f
573
- }), t % ye === 0 && /* @__PURE__ */ T("text", {
574
- x: (Q(e.id) ?? Z) + Q.bandwidth() / 2,
575
- y: h - 4,
552
+ isHighlighted: m?.selectedId === e.id || V?.id === e.id,
553
+ highlightedSeriesId: p
554
+ }), t % ye === 0 && /* @__PURE__ */ E("text", {
555
+ x: ($(e.id) ?? Z) + $.bandwidth() / 2,
556
+ y: g - 4,
576
557
  textAnchor: "middle",
577
- ...x.props(d.label),
558
+ ...b.props(l.label),
578
559
  children: n.length > be ? `${n.slice(0, be - 1)}…` : n
579
560
  })] }, e.id);
580
561
  }),
581
- H !== void 0 && /* @__PURE__ */ T(oe, {
582
- x: (Q(H.id) ?? Z) + Q.bandwidth() / 2,
562
+ U !== void 0 && /* @__PURE__ */ E(ne, {
563
+ x: ($(U.id) ?? Z) + $.bandwidth() / 2,
583
564
  top: 12,
584
565
  bottom: Y,
585
- width: Math.max(8, Q.bandwidth())
566
+ width: Math.max(8, $.bandwidth())
586
567
  })
587
568
  ]
588
569
  })
589
570
  })
590
571
  });
591
572
  }
592
- function z(e, t, n) {
573
+ function R(e, t, n) {
593
574
  return e.map((e) => {
594
575
  let r = e.values[t];
595
576
  return `${e.label}: ${r == null ? "Unavailable" : n(r)}`;
596
577
  }).join(" · ");
597
578
  }
598
579
  // packages/charts/src/cartesian/breakdown-bar.tsx
599
- var ge = {
580
+ var z = {
600
581
  kzqmXN: "x5lhr3w",
601
582
  kZKoxP: "x5yr21d",
602
583
  $$css: !0
603
584
  }, B = { segment: (e, t) => [
604
- ge,
585
+ z,
605
586
  {
606
587
  kWkggS: t == null ? t : "xl8spv7",
607
588
  $$css: !0
@@ -612,26 +593,26 @@ var ge = {
612
593
  }
613
594
  ] };
614
595
  function V({ title: e, report: t, description: r, items: o, total: s, formatValue: c, selection: l }) {
615
- let u = n(o), d = o.reduce((e, t) => e + (t.value ?? 0), 0), m = 2 ** -52 * Math.max(d, s, 1) * o.length;
616
- return u === void 0 ? !Number.isFinite(s) || s < 0 || d - s > m ? /* @__PURE__ */ T(_, {
596
+ let f = n(o), p = o.reduce((e, t) => e + (t.value ?? 0), 0), m = 2 ** -52 * Math.max(p, s, 1) * o.length;
597
+ return f === void 0 ? !Number.isFinite(s) || s < 0 || p - s > m ? /* @__PURE__ */ E(h, {
617
598
  title: e,
618
599
  report: t,
619
600
  description: r,
620
601
  message: "The total must be finite and at least the sum of recorded values."
621
- }) : /* @__PURE__ */ T(f, {
602
+ }) : /* @__PURE__ */ E(u, {
622
603
  title: e,
623
604
  report: t,
624
605
  description: r,
625
- children: o.length === 0 ? /* @__PURE__ */ T("p", {
606
+ children: o.length === 0 ? /* @__PURE__ */ E("p", {
626
607
  className: "x153jb6y x1ghz6dp xy8obcc",
627
608
  children: "No values"
628
- }) : /* @__PURE__ */ E(w, { children: [
629
- /* @__PURE__ */ T("div", {
609
+ }) : /* @__PURE__ */ D(T, { children: [
610
+ /* @__PURE__ */ E("div", {
630
611
  "aria-hidden": !0,
631
612
  className: "x78zum5 x170jfvy xb3r6kr x1r7kqkb xmkeg23 x1y0btm7 x1ey3b81 x1jfksii",
632
- children: o.map((e, t) => e.value === null ? null : /* @__PURE__ */ T("span", { ...x.props(B.segment(s === 0 ? 0 : e.value / s * 100, p[i(e.tone, t)])) }, e.id))
613
+ children: o.map((e, t) => e.value === null ? null : /* @__PURE__ */ E("span", { ...b.props(B.segment(s === 0 ? 0 : e.value / s * 100, d[i(e.tone, t)])) }, e.id))
633
614
  }),
634
- /* @__PURE__ */ T(a, {
615
+ /* @__PURE__ */ E(a, {
635
616
  items: o.map((e, t) => ({
636
617
  id: e.id,
637
618
  label: e.label,
@@ -640,30 +621,30 @@ function V({ title: e, report: t, description: r, items: o, total: s, formatValu
640
621
  })),
641
622
  selection: l
642
623
  }),
643
- s - d > m && /* @__PURE__ */ E("p", {
624
+ s - p > m && /* @__PURE__ */ D("p", {
644
625
  className: "x153jb6y x1ghz6dp xy8obcc",
645
626
  children: [
646
627
  "Unassigned portion: ",
647
- c(s - d),
628
+ c(s - p),
648
629
  " of ",
649
630
  c(s)
650
631
  ]
651
632
  })
652
633
  ] })
653
- }) : /* @__PURE__ */ T(_, {
634
+ }) : /* @__PURE__ */ E(h, {
654
635
  title: e,
655
636
  report: t,
656
637
  description: r,
657
- message: u
638
+ message: f
658
639
  });
659
640
  }
660
641
  // packages/charts/src/cartesian/scatter-plot.tsx
661
- var H = 260, U = 56, W = 20, G = 12, K = 1e3, q = {
642
+ var H = 260, U = 56, W = 20, G = 12, ge = 1e3, K = {
662
643
  kzqmXN: "x1xc55vz",
663
644
  kZKoxP: "xdk7pt",
664
645
  kaIpWk: "x16rqkct",
665
646
  $$css: !0
666
- }, J = {
647
+ }, q = {
667
648
  brush: {
668
649
  kFalU9: "xx69xxh",
669
650
  kkrTdU: "xsid9ct",
@@ -701,7 +682,7 @@ var H = 260, U = 56, W = 20, G = 12, K = 1e3, q = {
701
682
  "--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
702
683
  }],
703
684
  dot: (e) => [
704
- q,
685
+ K,
705
686
  {
706
687
  kWkggS: e == null ? e : "xl8spv7",
707
688
  $$css: !0
@@ -716,78 +697,78 @@ var H = 260, U = 56, W = 20, G = 12, K = 1e3, q = {
716
697
  $$css: !0
717
698
  }
718
699
  };
719
- function Y(e) {
720
- let { title: t, report: n, description: r, points: i, xDomain: a, yDomain: o, xLabel: s, yLabel: c, formatX: d, formatY: h, selection: g, rangeSelection: v, emptyLabel: b } = e, { ref: ee, width: S } = y(), te = _e(e);
721
- if (te !== null) return /* @__PURE__ */ T(_, {
700
+ function J(e) {
701
+ let { title: t, report: n, description: r, points: i, xDomain: a, yDomain: o, xLabel: l, yLabel: p, formatX: m, formatY: g, selection: v, rangeSelection: y, emptyLabel: x } = e, { ref: S, width: C } = _(), ee = Z(e);
702
+ if (ee !== null) return /* @__PURE__ */ E(h, {
722
703
  title: t,
723
704
  report: n,
724
705
  description: r,
725
- message: te
706
+ message: ee
726
707
  });
727
- let ne = D({
708
+ let w = k({
728
709
  domain: [...a],
729
- range: [U, Math.max(U, S - W)]
730
- }), C = D({
710
+ range: [U, Math.max(U, C - W)]
711
+ }), T = k({
731
712
  domain: [...o],
732
713
  range: [216, G]
733
- }), w = i.find((e) => e.id === g?.selectedId);
734
- return /* @__PURE__ */ E(f, {
714
+ }), O = i.find((e) => e.id === v?.selectedId);
715
+ return /* @__PURE__ */ D(u, {
735
716
  title: t,
736
717
  report: n,
737
718
  description: r,
738
- footer: g !== void 0 && i.length > 0 ? /* @__PURE__ */ T(l, { children: w === void 0 ? "Select a point to inspect its label and coordinates." : `${w.label}, ${s}: ${d(w.x)}, ${c}: ${h(w.y)}` }) : void 0,
719
+ footer: v !== void 0 && i.length > 0 ? /* @__PURE__ */ E(s, { children: O === void 0 ? "Select a point to inspect its label and coordinates." : `${O.label}, ${l}: ${m(O.x)}, ${p}: ${g(O.y)}` }) : void 0,
739
720
  children: [
740
- i.length === 0 ? /* @__PURE__ */ T("p", {
721
+ i.length === 0 ? /* @__PURE__ */ E("p", {
741
722
  className: "x1ghz6dp x153jb6y",
742
- children: b
743
- }) : /* @__PURE__ */ E("div", {
744
- ref: ee,
723
+ children: x
724
+ }) : /* @__PURE__ */ D("div", {
725
+ ref: S,
745
726
  className: "x1n2onr6 xeuugli",
746
- children: [/* @__PURE__ */ T(X, {
747
- width: S,
748
- scaleX: ne,
749
- scaleY: C,
727
+ children: [/* @__PURE__ */ E(Y, {
728
+ width: C,
729
+ scaleX: w,
730
+ scaleY: T,
750
731
  ...e
751
- }, `${a[0]}:${a[1]}:${o[0]}:${o[1]}:${S}`), g !== void 0 && /* @__PURE__ */ T("div", {
732
+ }, `${a[0]}:${a[1]}:${o[0]}:${o[1]}:${C}`), v !== void 0 && /* @__PURE__ */ E("div", {
752
733
  className: "x10l6tqk x10a8y8t x1n71m9f x47corl",
753
- children: i.map((e) => /* @__PURE__ */ T("button", {
734
+ children: i.map((e) => /* @__PURE__ */ E("button", {
754
735
  type: "button",
755
736
  title: e.label,
756
- "aria-label": `${e.label}, ${s}: ${d(e.x)}, ${c}: ${h(e.y)}`,
757
- "aria-pressed": g.selectedId === e.id,
758
- onClick: () => g.onSelect(e.id),
759
- ...x.props(J.target, J.location(ne(e.x), C(e.y))),
760
- children: /* @__PURE__ */ T("span", {
737
+ "aria-label": `${e.label}, ${l}: ${m(e.x)}, ${p}: ${g(e.y)}`,
738
+ "aria-pressed": v.selectedId === e.id,
739
+ onClick: () => v.onSelect(e.id),
740
+ ...b.props(q.target, q.location(w(e.x), T(e.y))),
741
+ children: /* @__PURE__ */ E("span", {
761
742
  "aria-hidden": !0,
762
- ...x.props(J.dot(p[e.tone]), g.selectedId === e.id && J.selected)
743
+ ...b.props(q.dot(d[e.tone]), v.selectedId === e.id && q.selected)
763
744
  })
764
745
  }, e.id))
765
746
  })]
766
747
  }),
767
- v !== void 0 && /* @__PURE__ */ T(Z, {
748
+ y !== void 0 && /* @__PURE__ */ E(X, {
768
749
  ...e,
769
- rangeSelection: v
750
+ rangeSelection: y
770
751
  }),
771
- i.length > 0 && /* @__PURE__ */ T(m, { children: i.map((e) => /* @__PURE__ */ E(u, {
772
- label: `${e.label}, ${s}: ${d(e.x)}, ${c}: ${h(e.y)}`,
773
- isSelected: g?.selectedId === e.id,
774
- onSelect: g === void 0 ? void 0 : () => g.onSelect(e.id),
775
- children: [/* @__PURE__ */ T("span", { children: e.label }), /* @__PURE__ */ E("span", {
752
+ i.length > 0 && /* @__PURE__ */ E(f, { children: i.map((e) => /* @__PURE__ */ D(c, {
753
+ label: `${e.label}, ${l}: ${m(e.x)}, ${p}: ${g(e.y)}`,
754
+ isSelected: v?.selectedId === e.id,
755
+ onSelect: v === void 0 ? void 0 : () => v.onSelect(e.id),
756
+ children: [/* @__PURE__ */ E("span", { children: e.label }), /* @__PURE__ */ D("span", {
776
757
  className: "xeuugli xss6m8b xj0a0fe x153jb6y",
777
758
  children: [
778
- d(e.x),
759
+ m(e.x),
779
760
  " · ",
780
- h(e.y)
761
+ g(e.y)
781
762
  ]
782
763
  })]
783
764
  }, e.id)) })
784
765
  ]
785
766
  });
786
767
  }
787
- function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, formatX: o, formatY: s, selection: c, rangeSelection: l }) {
788
- let u = S(), [f, m] = C(null), h = f === null ? l?.value : {
789
- x: [Math.min(f.start.x, f.end.x), Math.max(f.start.x, f.end.x)],
790
- y: [Math.min(f.start.y, f.end.y), Math.max(f.start.y, f.end.y)]
768
+ function Y({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, formatX: o, formatY: s, selection: c, rangeSelection: u }) {
769
+ let f = S(), [p, m] = w(null), h = p === null ? u?.value : {
770
+ x: [Math.min(p.start.x, p.end.x), Math.max(p.start.x, p.end.x)],
771
+ y: [Math.min(p.start.y, p.end.y), Math.max(p.start.y, p.end.y)]
791
772
  };
792
773
  function g(r) {
793
774
  let i = r.currentTarget.getBoundingClientRect();
@@ -797,7 +778,7 @@ function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, fo
797
778
  };
798
779
  }
799
780
  function _(t) {
800
- if (l === void 0 || t.button !== 0 || t.pointerType === "touch") return;
781
+ if (u === void 0 || t.button !== 0 || t.pointerType === "touch") return;
801
782
  let n = t.currentTarget.getBoundingClientRect(), r = (t.clientX - n.left) / n.width * e, i = (t.clientY - n.top) / n.height * H;
802
783
  if (r < U || r > e - W || i < G || i > 216) return;
803
784
  let a = g(t);
@@ -808,20 +789,20 @@ function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, fo
808
789
  });
809
790
  }
810
791
  function v(e) {
811
- f !== null && f.pointerId === e.pointerId && m({
812
- ...f,
792
+ p !== null && p.pointerId === e.pointerId && m({
793
+ ...p,
813
794
  end: g(e)
814
795
  });
815
796
  }
816
797
  function y(e) {
817
- if (f === null || f.pointerId !== e.pointerId) return;
798
+ if (p === null || p.pointerId !== e.pointerId) return;
818
799
  let t = g(e), n = {
819
- x: [Math.min(f.start.x, t.x), Math.max(f.start.x, t.x)],
820
- y: [Math.min(f.start.y, t.y), Math.max(f.start.y, t.y)]
800
+ x: [Math.min(p.start.x, t.x), Math.max(p.start.x, t.x)],
801
+ y: [Math.min(p.start.y, t.y), Math.max(p.start.y, t.y)]
821
802
  };
822
- m(null), e.currentTarget.releasePointerCapture(e.pointerId), l?.onChange(n);
803
+ m(null), e.currentTarget.releasePointerCapture(e.pointerId), u?.onChange(n);
823
804
  }
824
- return /* @__PURE__ */ E("svg", {
805
+ return /* @__PURE__ */ D("svg", {
825
806
  width: e,
826
807
  height: H,
827
808
  viewBox: `0 0 ${e} ${H}`,
@@ -831,90 +812,90 @@ function X({ width: e, scaleX: t, scaleY: n, points: r, xLabel: i, yLabel: a, fo
831
812
  onPointerUp: y,
832
813
  onPointerCancel: () => m(null),
833
814
  onLostPointerCapture: () => m(null),
834
- ...x.props(d.svg, l !== void 0 && J.brush),
815
+ ...b.props(l.svg, u !== void 0 && q.brush),
835
816
  children: [
836
- /* @__PURE__ */ T("defs", { children: /* @__PURE__ */ T("clipPath", {
837
- id: u,
838
- children: /* @__PURE__ */ T("rect", {
817
+ /* @__PURE__ */ E("defs", { children: /* @__PURE__ */ E("clipPath", {
818
+ id: f,
819
+ children: /* @__PURE__ */ E("rect", {
839
820
  x: U,
840
821
  y: G,
841
822
  width: Math.max(0, e - U - W),
842
823
  height: 204
843
824
  })
844
825
  }) }),
845
- t.ticks(5).map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
826
+ t.ticks(5).map((e) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
846
827
  x1: t(e),
847
828
  x2: t(e),
848
829
  y1: G,
849
830
  y2: 216,
850
- ...x.props(d.grid)
851
- }), /* @__PURE__ */ T("text", {
831
+ ...b.props(l.grid)
832
+ }), /* @__PURE__ */ E("text", {
852
833
  x: t(e),
853
834
  y: 234,
854
835
  textAnchor: "middle",
855
- ...x.props(d.label),
836
+ ...b.props(l.label),
856
837
  children: o(e)
857
838
  })] }, e)),
858
- n.ticks(4).map((t) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
839
+ n.ticks(4).map((t) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
859
840
  x1: U,
860
841
  x2: e - W,
861
842
  y1: n(t),
862
843
  y2: n(t),
863
- ...x.props(d.grid)
864
- }), /* @__PURE__ */ T("text", {
844
+ ...b.props(l.grid)
845
+ }), /* @__PURE__ */ E("text", {
865
846
  x: 48,
866
847
  y: n(t) + 4,
867
848
  textAnchor: "end",
868
- ...x.props(d.label),
849
+ ...b.props(l.label),
869
850
  children: s(t)
870
851
  })] }, t)),
871
- /* @__PURE__ */ T("text", {
852
+ /* @__PURE__ */ E("text", {
872
853
  x: (U + e - W) / 2,
873
854
  y: 256,
874
855
  textAnchor: "middle",
875
- ...x.props(d.label),
856
+ ...b.props(l.label),
876
857
  children: i
877
858
  }),
878
- /* @__PURE__ */ T("text", {
859
+ /* @__PURE__ */ E("text", {
879
860
  x: 12,
880
861
  y: 108,
881
862
  textAnchor: "middle",
882
863
  transform: "rotate(-90 12 108)",
883
- ...x.props(d.label),
864
+ ...b.props(l.label),
884
865
  children: a
885
866
  }),
886
- /* @__PURE__ */ E("g", {
887
- clipPath: `url(#${u})`,
888
- children: [h != null && /* @__PURE__ */ T("rect", {
867
+ /* @__PURE__ */ D("g", {
868
+ clipPath: `url(#${f})`,
869
+ children: [h != null && /* @__PURE__ */ E("rect", {
889
870
  x: t(h.x[0]),
890
871
  y: n(h.y[1]),
891
872
  width: t(h.x[1]) - t(h.x[0]),
892
873
  height: n(h.y[0]) - n(h.y[1]),
893
874
  className: "x1e0kj8g xv7c1pl x1tg5nk6 xnpr05h x15lqr97 x47corl"
894
- }), c === void 0 && r.map((e) => /* @__PURE__ */ T("circle", {
875
+ }), c === void 0 && r.map((e) => /* @__PURE__ */ E("circle", {
895
876
  cx: t(e.x),
896
877
  cy: n(e.y),
897
878
  r: 4,
898
- fill: p[e.tone]
879
+ fill: d[e.tone]
899
880
  }, e.id))]
900
881
  })
901
882
  ]
902
883
  });
903
884
  }
904
- function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, formatX: a, formatY: s }) {
905
- let c = e.value ?? {
885
+ function X({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, formatX: a, formatY: o }) {
886
+ let s = e.value ?? {
906
887
  x: t,
907
888
  y: n
908
889
  };
909
- return /* @__PURE__ */ E("fieldset", {
890
+ return /* @__PURE__ */ D("fieldset", {
910
891
  className: "xrvj5dj x1n8ia3y x1xxf3xd xc342km x1717udv xeuugli",
911
892
  children: [
912
- /* @__PURE__ */ T("legend", {
893
+ /* @__PURE__ */ E("legend", {
913
894
  className: "x153jb6y xy8obcc x1jfksii",
914
895
  children: "Drag with a mouse, or adjust these bounds to select a coordinate range."
915
896
  }),
916
- /* @__PURE__ */ E(b.Root, {
917
- value: c.x,
897
+ /* @__PURE__ */ D(y.Root, {
898
+ value: s.x,
918
899
  min: t[0],
919
900
  max: t[1],
920
901
  step: e.xStep,
@@ -922,62 +903,62 @@ function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, fo
922
903
  thumbCollisionBehavior: "none",
923
904
  onValueChange: (t) => e.onChange({
924
905
  x: t,
925
- y: c.y
906
+ y: s.y
926
907
  }),
927
- children: [/* @__PURE__ */ E("div", {
908
+ children: [/* @__PURE__ */ D("div", {
928
909
  className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
929
- children: [/* @__PURE__ */ T(b.Label, { children: r }), /* @__PURE__ */ E("span", { children: [
930
- a(c.x[0]),
910
+ children: [/* @__PURE__ */ E(y.Label, { children: r }), /* @__PURE__ */ D("span", { children: [
911
+ a(s.x[0]),
931
912
  " – ",
932
- a(c.x[1])
913
+ a(s.x[1])
933
914
  ] })]
934
- }), /* @__PURE__ */ T(b.Control, { children: /* @__PURE__ */ E(b.Track, { children: [
935
- /* @__PURE__ */ T(b.Indicator, {}),
936
- /* @__PURE__ */ T(b.Thumb, {
915
+ }), /* @__PURE__ */ E(y.Control, { children: /* @__PURE__ */ D(y.Track, { children: [
916
+ /* @__PURE__ */ E(y.Indicator, {}),
917
+ /* @__PURE__ */ E(y.Thumb, {
937
918
  index: 0,
938
919
  "aria-label": `${r} minimum`,
939
920
  getAriaValueText: (e, t) => a(t)
940
921
  }),
941
- /* @__PURE__ */ T(b.Thumb, {
922
+ /* @__PURE__ */ E(y.Thumb, {
942
923
  index: 1,
943
924
  "aria-label": `${r} maximum`,
944
925
  getAriaValueText: (e, t) => a(t)
945
926
  })
946
927
  ] }) })]
947
928
  }),
948
- /* @__PURE__ */ E(b.Root, {
949
- value: c.y,
929
+ /* @__PURE__ */ D(y.Root, {
930
+ value: s.y,
950
931
  min: n[0],
951
932
  max: n[1],
952
933
  step: e.yStep,
953
934
  locale: e.locale,
954
935
  thumbCollisionBehavior: "none",
955
936
  onValueChange: (t) => e.onChange({
956
- x: c.x,
937
+ x: s.x,
957
938
  y: t
958
939
  }),
959
- children: [/* @__PURE__ */ E("div", {
940
+ children: [/* @__PURE__ */ D("div", {
960
941
  className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
961
- children: [/* @__PURE__ */ T(b.Label, { children: i }), /* @__PURE__ */ E("span", { children: [
962
- s(c.y[0]),
942
+ children: [/* @__PURE__ */ E(y.Label, { children: i }), /* @__PURE__ */ D("span", { children: [
943
+ o(s.y[0]),
963
944
  " – ",
964
- s(c.y[1])
945
+ o(s.y[1])
965
946
  ] })]
966
- }), /* @__PURE__ */ T(b.Control, { children: /* @__PURE__ */ E(b.Track, { children: [
967
- /* @__PURE__ */ T(b.Indicator, {}),
968
- /* @__PURE__ */ T(b.Thumb, {
947
+ }), /* @__PURE__ */ E(y.Control, { children: /* @__PURE__ */ D(y.Track, { children: [
948
+ /* @__PURE__ */ E(y.Indicator, {}),
949
+ /* @__PURE__ */ E(y.Thumb, {
969
950
  index: 0,
970
951
  "aria-label": `${i} minimum`,
971
- getAriaValueText: (e, t) => s(t)
952
+ getAriaValueText: (e, t) => o(t)
972
953
  }),
973
- /* @__PURE__ */ T(b.Thumb, {
954
+ /* @__PURE__ */ E(y.Thumb, {
974
955
  index: 1,
975
956
  "aria-label": `${i} maximum`,
976
- getAriaValueText: (e, t) => s(t)
957
+ getAriaValueText: (e, t) => o(t)
977
958
  })
978
959
  ] }) })]
979
960
  }),
980
- /* @__PURE__ */ T(o, {
961
+ /* @__PURE__ */ E(v, {
981
962
  type: "button",
982
963
  disabled: e.value === null,
983
964
  onClick: () => e.onChange(null),
@@ -986,10 +967,10 @@ function Z({ rangeSelection: e, xDomain: t, yDomain: n, xLabel: r, yLabel: i, fo
986
967
  ]
987
968
  });
988
969
  }
989
- function _e({ points: e, xDomain: t, yDomain: n, rangeSelection: r }) {
990
- if (!g(t) || !g(n)) return "Scatter domains must contain finite, increasing endpoints.";
991
- if (e.length > 1e3) return `This plot exceeds the ${K}-point render limit. Supply a smaller, labelled sample.`;
992
- if (!h(e)) return "Scatter points must have unique identifiers.";
970
+ function Z({ points: e, xDomain: t, yDomain: n, rangeSelection: r }) {
971
+ if (!m(t) || !m(n)) return "Scatter domains must contain finite, increasing endpoints.";
972
+ if (e.length > 1e3) return `This plot exceeds the ${ge}-point render limit. Supply a smaller, labelled sample.`;
973
+ if (!p(e)) return "Scatter points must have unique identifiers.";
993
974
  if (e.some((e) => !Number.isFinite(e.x) || !Number.isFinite(e.y))) return "Scatter coordinates must be finite.";
994
975
  if (e.some((e) => {
995
976
  let r = e.x < t[0] || e.x > t[1], i = e.y < n[0] || e.y > n[1];
@@ -1010,7 +991,7 @@ var $ = {
1010
991
  pointsPerSeries: 2e3,
1011
992
  markers: 200,
1012
993
  panels: 12
1013
- }, ve = .01, ye = [
994
+ }, _e = .01, ve = [
1014
995
  "series1",
1015
996
  "series2",
1016
997
  "series3",
@@ -1018,13 +999,13 @@ var $ = {
1018
999
  "series5",
1019
1000
  "series6"
1020
1001
  ];
1021
- function be({ series: e, isStacked: t, markers: n }) {
1002
+ function ye({ series: e, isStacked: t, markers: n }) {
1022
1003
  let r = e[0]?.points.map((e) => e.timestamp) ?? [];
1023
1004
  if (e.length > $.series || r.length > $.pointsPerSeries || n.length > $.markers) return `Choose a window with at most ${$.series} series, ${$.pointsPerSeries} observations per series, and ${$.markers} markers.`;
1024
- if (!h(e) || !h(n)) return "Series and markers require unique identifiers.";
1005
+ if (!p(e) || !p(n)) return "Series and markers require unique identifiers.";
1025
1006
  for (let n of e) {
1026
1007
  if (n.points.length !== r.length) return "Every series must supply the same observation timestamps.";
1027
- let e = we({
1008
+ let e = Ce({
1028
1009
  points: n.points,
1029
1010
  timestamps: r,
1030
1011
  isStacked: t
@@ -1042,7 +1023,7 @@ function be({ series: e, isStacked: t, markers: n }) {
1042
1023
  if (!Number.isFinite(a) || !Number.isFinite(o)) return "The elapsed-time and value ranges must be finite.";
1043
1024
  if (t && r.some((t, n) => !Number.isFinite(e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)))) return "Stacked observation totals must be finite.";
1044
1025
  }
1045
- function xe({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1026
+ function be({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1046
1027
  return JSON.stringify([
1047
1028
  n,
1048
1029
  r,
@@ -1062,15 +1043,15 @@ function xe({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1062
1043
  ])
1063
1044
  ]);
1064
1045
  }
1065
- function Se(e, t, n = !1) {
1046
+ function xe(e, t, n = !1) {
1066
1047
  if (e !== t) return [e, t];
1067
- let r = Math.max(1, Math.abs(e) * ve), i = n ? 0 : e - r, a = t + r;
1048
+ let r = Math.max(1, Math.abs(e) * _e), i = n ? 0 : e - r, a = t + r;
1068
1049
  return [Number.isFinite(i) ? i : e, Number.isFinite(a) ? a : t];
1069
1050
  }
1070
- function Ce(e, t) {
1051
+ function Se(e, t) {
1071
1052
  let n = e.filter((e) => e.tone === void 0);
1072
1053
  return e.map((r, i) => {
1073
- let a = n.findIndex((e) => e.id === r.id), o = r.tone ?? ye[a % ye.length] ?? "series1", s = r.points.map((n, r) => {
1054
+ let a = n.findIndex((e) => e.id === r.id), o = r.tone ?? ve[a % ve.length] ?? "series1", s = r.points.map((n, r) => {
1074
1055
  let a = t ? e.slice(0, i).reduce((e, t) => e + (t.points[r]?.value ?? 0), 0) : 0;
1075
1056
  return {
1076
1057
  ...n,
@@ -1085,7 +1066,7 @@ function Ce(e, t) {
1085
1066
  };
1086
1067
  });
1087
1068
  }
1088
- function we({ points: e, timestamps: t, isStacked: n }) {
1069
+ function Ce({ points: e, timestamps: t, isStacked: n }) {
1089
1070
  for (let [r, i] of e.entries()) {
1090
1071
  let a = e[r - 1], o = a !== void 0 && i.timestamp <= a.timestamp;
1091
1072
  if (!Number.isFinite(i.timestamp) || i.timestamp !== t[r] || o) return "Observation timestamps must be finite, aligned, and strictly increasing.";
@@ -1094,49 +1075,49 @@ function we({ points: e, timestamps: t, isStacked: n }) {
1094
1075
  }
1095
1076
  }
1096
1077
  // packages/charts/src/cartesian/time-series-line.tsx
1097
- function Te({ series: e, x: t, y: n, inspectedTimestamp: r, pointRadius: i = 3 }) {
1098
- return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(O, {
1078
+ function we({ series: e, x: t, y: n, inspectedTimestamp: r, pointRadius: i = 3 }) {
1079
+ return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(j, {
1099
1080
  data: [...e.points],
1100
1081
  defined: (e) => e.value !== null,
1101
1082
  x: (e) => t(e.timestamp),
1102
1083
  y: (e) => n((e.value ?? 0) + e.base),
1103
- stroke: p[e.tone],
1104
- ...x.props(d.mark)
1084
+ stroke: d[e.tone],
1085
+ ...b.props(l.mark)
1105
1086
  }), e.points.filter((t, n) => {
1106
1087
  if (t.value === null) return !1;
1107
1088
  let i = e.points[n - 1]?.value === null || e.points[n + 1]?.value === null;
1108
1089
  return e.points.length === 1 || i || t.timestamp === r;
1109
- }).map((r) => /* @__PURE__ */ T("circle", {
1090
+ }).map((r) => /* @__PURE__ */ E("circle", {
1110
1091
  cx: t(r.timestamp),
1111
1092
  cy: n((r.value ?? 0) + r.base),
1112
1093
  r: i,
1113
- fill: p[e.tone]
1094
+ fill: d[e.tone]
1114
1095
  }, r.timestamp))] });
1115
1096
  }
1116
1097
  // packages/charts/src/cartesian/sparkline.tsx
1117
- function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: a }) {
1118
- let o = S(), s = S(), c = De({
1098
+ function Te({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: a }) {
1099
+ let o = S(), s = S(), c = Ee({
1119
1100
  title: e,
1120
1101
  summary: t,
1121
1102
  unit: n,
1122
1103
  series: i,
1123
1104
  valueDomain: a
1124
1105
  }), l = i.points.some((e) => e.value !== null);
1125
- if (c !== void 0 || !l) return /* @__PURE__ */ T("span", {
1106
+ if (c !== void 0 || !l) return /* @__PURE__ */ E("span", {
1126
1107
  role: "img",
1127
1108
  "aria-label": `${e}. ${t} Values in ${n}; timestamps in ${r}. ${c ?? "No recorded values. Missing observations remain unavailable."}`,
1128
1109
  title: c ?? "No recorded values",
1129
1110
  className: "x2pejg6 x10w6t97 x2lah0s xxymvpz x3nfvp2 x6s0dn4 xl56j7k x153jb6y x1hz01jw xy8obcc",
1130
1111
  children: c === void 0 ? "No data" : "Invalid trend"
1131
1112
  });
1132
- let u = i.points[0]?.timestamp ?? 0, d = i.points.at(-1)?.timestamp ?? u, f = D({
1133
- domain: [...Se(u, d)],
1113
+ let u = i.points[0]?.timestamp ?? 0, d = i.points.at(-1)?.timestamp ?? u, f = k({
1114
+ domain: [...xe(u, d)],
1134
1115
  range: [3, 125]
1135
- }), p = D({
1116
+ }), p = k({
1136
1117
  domain: [...a],
1137
1118
  range: [29, 3]
1138
- }), m = Ce([i], !1)[0];
1139
- return /* @__PURE__ */ E("svg", {
1119
+ }), m = Se([i], !1)[0];
1120
+ return /* @__PURE__ */ D("svg", {
1140
1121
  role: "img",
1141
1122
  "aria-labelledby": o,
1142
1123
  "aria-describedby": s,
@@ -1146,11 +1127,11 @@ function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1146
1127
  height: 32,
1147
1128
  className: "x1rg5ohu x2pejg6 x10w6t97 x2lah0s xxymvpz",
1148
1129
  children: [
1149
- /* @__PURE__ */ T("title", {
1130
+ /* @__PURE__ */ E("title", {
1150
1131
  id: o,
1151
1132
  children: e
1152
1133
  }),
1153
- /* @__PURE__ */ E("desc", {
1134
+ /* @__PURE__ */ D("desc", {
1154
1135
  id: s,
1155
1136
  children: [
1156
1137
  t,
@@ -1168,7 +1149,7 @@ function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1168
1149
  "."
1169
1150
  ]
1170
1151
  }),
1171
- m !== void 0 && /* @__PURE__ */ T(Te, {
1152
+ m !== void 0 && /* @__PURE__ */ E(we, {
1172
1153
  series: m,
1173
1154
  x: f,
1174
1155
  y: p,
@@ -1177,10 +1158,10 @@ function Ee({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueD
1177
1158
  ]
1178
1159
  });
1179
1160
  }
1180
- function De({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
1161
+ function Ee({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
1181
1162
  if (e.trim() === "" || t.trim() === "" || n.trim() === "") return "A trend requires a title, a readable summary, and a value unit.";
1182
- if (!g(i)) return "The displayed value domain must have finite, increasing bounds.";
1183
- let a = be({
1163
+ if (!m(i)) return "The displayed value domain must have finite, increasing bounds.";
1164
+ let a = ye({
1184
1165
  series: [r],
1185
1166
  isStacked: !1,
1186
1167
  markers: []
@@ -1189,7 +1170,7 @@ function De({ title: e, summary: t, unit: n, series: r, valueDomain: i }) {
1189
1170
  if (r.points.some((e) => e.value !== null && (e.value < i[0] || e.value > i[1]))) return "Every recorded value must be inside the declared value domain.";
1190
1171
  }
1191
1172
  // packages/charts/src/cartesian/time-series.tsx
1192
- var Oe = {
1173
+ var De = {
1193
1174
  timeAxis: {
1194
1175
  k1xSpc: "x78zum5",
1195
1176
  kjj79g: "x1qughib",
@@ -1210,112 +1191,109 @@ var Oe = {
1210
1191
  "--x-paddingInlineEnd": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
1211
1192
  }]
1212
1193
  };
1213
- function ke(e) {
1214
- return /* @__PURE__ */ T(Ie, {
1194
+ function Oe(e) {
1195
+ return /* @__PURE__ */ E(Fe, {
1215
1196
  ...e,
1216
1197
  kind: "line",
1217
1198
  isStacked: !1
1218
1199
  });
1219
1200
  }
1220
- function Ae({ isStacked: e = !1, ...t }) {
1221
- return /* @__PURE__ */ T(Ie, {
1201
+ function ke({ isStacked: e = !1, ...t }) {
1202
+ return /* @__PURE__ */ E(Fe, {
1222
1203
  ...t,
1223
1204
  kind: "area",
1224
1205
  isStacked: e
1225
1206
  });
1226
1207
  }
1227
- function je(e) {
1228
- return /* @__PURE__ */ T(Me, { ...e });
1208
+ function Ae(e) {
1209
+ return /* @__PURE__ */ E(je, { ...e });
1229
1210
  }
1230
- function Me({ title: n, description: r, series: i, actions: a, report: o, height: s = 180, showTimeAxis: c = !0 }) {
1231
- let l = S(), u = Ce(i.map((e) => ({
1211
+ function je({ title: n, description: r, series: i, actions: a, report: o, height: s = 180, showTimeAxis: c = !0 }) {
1212
+ let d = S(), f = Se(i.map((e) => ({
1232
1213
  ...e,
1233
1214
  points: []
1234
1215
  })), !1);
1235
- return !Number.isFinite(s) || s < 48 ? /* @__PURE__ */ T(_, {
1216
+ return !Number.isFinite(s) || s < 48 ? /* @__PURE__ */ E(h, {
1236
1217
  title: n,
1237
1218
  description: r,
1238
1219
  report: o,
1239
1220
  message: "Chart height must be at least 48 pixels."
1240
- }) : /* @__PURE__ */ T("div", {
1221
+ }) : /* @__PURE__ */ E("div", {
1241
1222
  "aria-hidden": !0,
1242
1223
  inert: !0,
1243
1224
  className: "xeuugli",
1244
- children: /* @__PURE__ */ T(f, {
1225
+ children: /* @__PURE__ */ E(u, {
1245
1226
  title: n,
1246
1227
  description: r,
1247
1228
  report: o,
1248
- series: u,
1249
- actions: /* @__PURE__ */ E(w, { children: [a, /* @__PURE__ */ T(se, {
1250
- title: n,
1251
- children: null
1252
- })] }),
1253
- children: /* @__PURE__ */ E("div", {
1229
+ series: f,
1230
+ actions: a,
1231
+ children: /* @__PURE__ */ D("div", {
1254
1232
  className: "xrvj5dj x1n8ia3y",
1255
- children: [/* @__PURE__ */ T(M, {
1256
- id: l,
1233
+ children: [/* @__PURE__ */ E(oe, {
1234
+ id: d,
1257
1235
  label: void 0,
1258
- legend: u,
1236
+ legend: f,
1259
1237
  rows: [],
1260
1238
  x: 0,
1261
1239
  width: 0,
1262
1240
  source: void 0,
1263
1241
  hasSeriesSummary: o?.seriesValues !== void 0
1264
- }), /* @__PURE__ */ E("div", {
1265
- ...x.props(d.plot),
1266
- children: [/* @__PURE__ */ T(t, { height: s - 16 }), c && /* @__PURE__ */ E("div", {
1242
+ }), /* @__PURE__ */ D("div", {
1243
+ ...b.props(l.plot),
1244
+ children: [/* @__PURE__ */ E(t, { height: s - 16 }), c && /* @__PURE__ */ D("div", {
1267
1245
  className: "x78zum5 x1qughib x8zbtdt x1c87qhr xy8obcc xas2l8k x153jb6y xss6m8b",
1268
- children: [/* @__PURE__ */ T(e, { width: "8ch" }), /* @__PURE__ */ T(e, { width: "8ch" })]
1246
+ children: [/* @__PURE__ */ E(e, { width: "8ch" }), /* @__PURE__ */ E(e, { width: "8ch" })]
1269
1247
  })]
1270
1248
  })]
1271
1249
  })
1272
1250
  })
1273
1251
  });
1274
1252
  }
1275
- function Ne({ charts: e, ...t }) {
1276
- let n = ne(null), [r, i] = C(), a = JSON.stringify(e.map((e) => [
1253
+ function Me({ charts: e, ...t }) {
1254
+ let n = ee(null), [r, i] = w(), a = JSON.stringify(e.map((e) => [
1277
1255
  e.id,
1278
1256
  e.title,
1279
- xe({
1257
+ be({
1280
1258
  series: e.series,
1281
1259
  markers: e.markers ?? [],
1282
1260
  timestampUnit: t.timestampUnit,
1283
1261
  isStacked: !1
1284
1262
  })
1285
1263
  ])), o = JSON.stringify(e[0]?.series[0]?.points.map((e) => e.timestamp) ?? []), s = e.every((e) => JSON.stringify(e.series[0]?.points.map((e) => e.timestamp) ?? []) === o);
1286
- if (r !== void 0 && r.signature !== a && i(void 0), ee(() => {
1264
+ if (r !== void 0 && r.signature !== a && i(void 0), x(() => {
1287
1265
  function e(e) {
1288
1266
  e.target instanceof Node && n.current?.contains(e.target) !== !0 && i(void 0);
1289
1267
  }
1290
1268
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1291
- }, []), !s || !h(e)) return /* @__PURE__ */ T(_, {
1269
+ }, []), !s || !p(e)) return /* @__PURE__ */ E(h, {
1292
1270
  title: "Small multiples",
1293
1271
  message: "Charts need unique identifiers and aligned observation timestamps."
1294
1272
  });
1295
- if (e.length > $.panels) return /* @__PURE__ */ T(_, {
1273
+ if (e.length > $.panels) return /* @__PURE__ */ E(h, {
1296
1274
  title: "Small multiples",
1297
1275
  message: `Choose at most ${$.panels} panels.`
1298
1276
  });
1299
- if (e.length === 0) return /* @__PURE__ */ T(f, {
1277
+ if (e.length === 0) return /* @__PURE__ */ E(u, {
1300
1278
  title: "Small multiples",
1301
- children: /* @__PURE__ */ T("p", {
1279
+ children: /* @__PURE__ */ E("p", {
1302
1280
  className: "x153jb6y",
1303
1281
  children: "No charts"
1304
1282
  })
1305
1283
  });
1306
1284
  let c = Math.max(52, ...e.flatMap((e) => e.series.flatMap((t) => t.points.flatMap((t) => t.value === null || !Number.isFinite(t.value) ? [] : [(e.formatTick ?? e.formatValue)(t.value).length * 7 + 12])))), l = e.every((e) => e.report !== void 0);
1307
- return /* @__PURE__ */ T("div", {
1285
+ return /* @__PURE__ */ E("div", {
1308
1286
  ref: n,
1309
1287
  ...{
1310
1288
  0: { className: "xrvj5dj x1j825kq" },
1311
1289
  1: { className: "xrvj5dj xxhr3t" }
1312
1290
  }[!!l | 0],
1313
- children: e.map((n, o) => /* @__PURE__ */ T("div", {
1291
+ children: e.map((n, o) => /* @__PURE__ */ E("div", {
1314
1292
  ...{
1315
1293
  0: {},
1316
1294
  1: { className: "x1y332i5" }
1317
1295
  }[!!(l && o > 0) | 0],
1318
- children: /* @__PURE__ */ T(Ie, {
1296
+ children: /* @__PURE__ */ E(Fe, {
1319
1297
  ...t,
1320
1298
  title: n.title,
1321
1299
  description: n.description,
@@ -1341,25 +1319,25 @@ function Ne({ charts: e, ...t }) {
1341
1319
  }, n.id))
1342
1320
  });
1343
1321
  }
1344
- function Pe({ charts: e, height: t }) {
1345
- if (!h(e) || e.length > $.panels) return /* @__PURE__ */ T(_, {
1322
+ function Ne({ charts: e, height: t }) {
1323
+ if (!p(e) || e.length > $.panels) return /* @__PURE__ */ E(h, {
1346
1324
  title: "Small multiples",
1347
1325
  message: `Choose at most ${$.panels} panels with unique identifiers.`
1348
1326
  });
1349
1327
  let n = e.every((e) => e.report !== void 0);
1350
- return /* @__PURE__ */ T("div", {
1328
+ return /* @__PURE__ */ E("div", {
1351
1329
  "aria-hidden": !0,
1352
1330
  inert: !0,
1353
1331
  ...{
1354
1332
  0: { className: "xrvj5dj x1j825kq" },
1355
1333
  1: { className: "xrvj5dj xxhr3t" }
1356
1334
  }[!!n | 0],
1357
- children: e.map((r, i) => /* @__PURE__ */ T("div", {
1335
+ children: e.map((r, i) => /* @__PURE__ */ E("div", {
1358
1336
  ...{
1359
1337
  0: {},
1360
1338
  1: { className: "x1y332i5" }
1361
1339
  }[!!(n && i > 0) | 0],
1362
- children: /* @__PURE__ */ T(Me, {
1340
+ children: /* @__PURE__ */ E(je, {
1363
1341
  ...r,
1364
1342
  height: t,
1365
1343
  showTimeAxis: i === e.length - 1
@@ -1367,62 +1345,62 @@ function Pe({ charts: e, height: t }) {
1367
1345
  }, r.id))
1368
1346
  });
1369
1347
  }
1370
- var Fe = {
1348
+ var Pe = {
1371
1349
  "x-default-marker": "x-default-marker",
1372
1350
  $$css: !0
1373
1351
  };
1374
- function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimestamp: i, formatValue: a, formatTick: o = a, markers: s = [], height: c = 180, actions: l, report: u, kind: m, isStacked: h, sharedInspection: g, axisWidth: b, showTimeAxis: re = !0 }) {
1375
- let ae = !Number.isFinite(c) || c < 48 ? "Chart height must be at least 48 pixels." : be({
1352
+ function Fe({ title: e, description: t, series: n, timestampUnit: r, formatTimestamp: i, formatValue: a, formatTick: o = a, markers: s = [], height: c = 180, actions: f, report: p, kind: m, isStacked: v, sharedInspection: y, axisWidth: T, showTimeAxis: O = !0 }) {
1353
+ let A = !Number.isFinite(c) || c < 48 ? "Chart height must be at least 48 pixels." : ye({
1376
1354
  series: n,
1377
- isStacked: h,
1355
+ isStacked: v,
1378
1356
  markers: s
1379
- }), O = te(() => ae === void 0 ? Ce(n, h) : [], [
1357
+ }), j = C(() => A === void 0 ? Se(n, v) : [], [
1380
1358
  n,
1381
- h,
1382
- ae
1383
- ]), k = O[0]?.points ?? [], { ref: A, width: j, element: ce } = y(), ue = ne(null), [N, de] = C(), P = k.find((e) => e.timestamp === N) ?? k[0], [fe, pe] = C(), F = xe({
1359
+ v,
1360
+ A
1361
+ ]), N = j[0]?.points ?? [], { ref: P, width: re, element: ie } = _(), se = ee(null), [ce, le] = w(), ue = N.find((e) => e.timestamp === ce) ?? N[0], [de, fe] = w(), F = be({
1384
1362
  series: n,
1385
1363
  markers: s,
1386
1364
  timestampUnit: r,
1387
- isStacked: h
1388
- }), I = g === void 0 ? fe?.signature === F ? fe : void 0 : g.value, L = g === void 0 || g.isSource ? I : void 0, me = u?.seriesValues !== void 0, he = S();
1389
- fe !== void 0 && (fe.signature !== F || ae !== void 0) && pe(void 0);
1390
- let R = g !== void 0;
1391
- if (ee(() => {
1392
- if (R) return;
1365
+ isStacked: v
1366
+ }), I = y === void 0 ? de?.signature === F ? de : void 0 : y.value, L = y === void 0 || y.isSource ? I : void 0, pe = p?.seriesValues !== void 0, me = S();
1367
+ de !== void 0 && (de.signature !== F || A !== void 0) && fe(void 0);
1368
+ let he = y !== void 0;
1369
+ if (x(() => {
1370
+ if (he) return;
1393
1371
  function e(e) {
1394
- e.target instanceof Node && ue.current?.contains(e.target) !== !0 && pe(void 0);
1372
+ e.target instanceof Node && se.current?.contains(e.target) !== !0 && fe(void 0);
1395
1373
  }
1396
1374
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1397
- }, [R]), ae !== void 0) return /* @__PURE__ */ T(_, {
1375
+ }, [he]), A !== void 0) return /* @__PURE__ */ E(h, {
1398
1376
  title: e,
1399
1377
  description: t,
1400
- report: u,
1401
- message: ae
1378
+ report: p,
1379
+ message: A
1402
1380
  });
1403
- if (k.length === 0) return /* @__PURE__ */ T(f, {
1381
+ if (N.length === 0) return /* @__PURE__ */ E(u, {
1404
1382
  title: e,
1405
1383
  description: t,
1406
- actions: l,
1407
- report: u,
1408
- series: O,
1409
- children: /* @__PURE__ */ T("p", {
1384
+ actions: f,
1385
+ report: p,
1386
+ series: j,
1387
+ children: /* @__PURE__ */ E("p", {
1410
1388
  className: "x153jb6y",
1411
1389
  children: "No observations"
1412
1390
  })
1413
1391
  });
1414
- let z = c - 28, ge = z + 12, B = k[0]?.timestamp ?? 0, V = k.at(-1)?.timestamp ?? B, H = O.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value + e.base])), U = m === "area" ? Math.min(0, ...H) : Math.min(...H), W = m === "area" ? Math.max(0, ...H) : Math.max(...H), G = H.length === 0 ? 0 : U, K = H.length === 0 ? 1 : W, q = D({
1415
- domain: [...Se(G, K, m === "area")],
1416
- range: [z, 12]
1417
- }), J = q.ticks(3), Y = b ?? Math.max(44, ...J.map((e) => o(e).length * 7 + 12)), X = Math.max(Y + 1, j - 16), Z = D({
1418
- domain: [...Se(B, V)],
1419
- range: [Y, X]
1392
+ let R = c - 28, z = R + 12, B = N[0]?.timestamp ?? 0, V = N.at(-1)?.timestamp ?? B, H = j.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value + e.base])), U = m === "area" ? Math.min(0, ...H) : Math.min(...H), W = m === "area" ? Math.max(0, ...H) : Math.max(...H), G = H.length === 0 ? 0 : U, ge = H.length === 0 ? 1 : W, K = k({
1393
+ domain: [...xe(G, ge, m === "area")],
1394
+ range: [R, 12]
1395
+ }), q = K.ticks(3), J = T ?? Math.max(44, ...q.map((e) => o(e).length * 7 + 12)), Y = Math.max(J + 1, re - 16), X = k({
1396
+ domain: [...xe(B, V)],
1397
+ range: [J, Y]
1420
1398
  });
1421
- function _e(e) {
1422
- let t = ce?.getBoundingClientRect();
1399
+ function Z(e) {
1400
+ let t = ie?.getBoundingClientRect();
1423
1401
  if (t === void 0) return;
1424
- let n = Z.invert(e - t.left), r = k.find((e, t) => {
1425
- let r = k[t + 1];
1402
+ let n = X.invert(e - t.left), r = N.find((e, t) => {
1403
+ let r = N[t + 1];
1426
1404
  return r === void 0 || n <= e.timestamp + (r.timestamp - e.timestamp) / 2;
1427
1405
  });
1428
1406
  r !== void 0 && Q({
@@ -1432,15 +1410,15 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1432
1410
  });
1433
1411
  }
1434
1412
  function Q(e) {
1435
- g === void 0 ? pe(e) : g.onChange(e);
1413
+ y === void 0 ? fe(e) : y.onChange(e);
1436
1414
  }
1437
1415
  function $(e) {
1438
1416
  if (e.altKey || e.ctrlKey || e.metaKey) return;
1439
- let t = k.findIndex((e) => e.timestamp === P?.timestamp), n = {
1440
- ArrowRight: Math.min(k.length - 1, t + 1),
1417
+ let t = N.findIndex((e) => e.timestamp === ue?.timestamp), n = {
1418
+ ArrowRight: Math.min(N.length - 1, t + 1),
1441
1419
  ArrowLeft: Math.max(0, t - 1),
1442
1420
  Home: 0,
1443
- End: k.length - 1
1421
+ End: N.length - 1
1444
1422
  };
1445
1423
  switch (e.key) {
1446
1424
  case "Escape":
@@ -1451,8 +1429,8 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1451
1429
  case "Home":
1452
1430
  case "End": {
1453
1431
  e.preventDefault();
1454
- let t = k[n[e.key]];
1455
- t !== void 0 && (de(t.timestamp), Q({
1432
+ let t = N[n[e.key]];
1433
+ t !== void 0 && (le(t.timestamp), Q({
1456
1434
  signature: F,
1457
1435
  timestamp: t.timestamp,
1458
1436
  source: "keyboard"
@@ -1461,63 +1439,56 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1461
1439
  }
1462
1440
  }
1463
1441
  }
1464
- return /* @__PURE__ */ T("div", {
1465
- ref: ue,
1442
+ return /* @__PURE__ */ E("div", {
1443
+ ref: se,
1466
1444
  className: "xeuugli",
1467
- children: /* @__PURE__ */ T(f, {
1468
- title: me ? e : /* @__PURE__ */ T(le, {
1445
+ children: /* @__PURE__ */ D(u, {
1446
+ title: pe ? e : /* @__PURE__ */ E(ae, {
1469
1447
  title: e,
1470
1448
  detail: L === void 0 ? void 0 : i(L.timestamp)
1471
1449
  }),
1472
1450
  description: t,
1473
- report: u,
1474
- series: O,
1475
- actions: /* @__PURE__ */ E(w, { children: [
1476
- l,
1477
- " ",
1478
- /* @__PURE__ */ T(se, {
1479
- title: e,
1480
- children: /* @__PURE__ */ E("table", {
1481
- className: "xh8yej3 x1mwwwfo xy8obcc x1yc453h xss6m8b",
1451
+ report: p,
1452
+ series: j,
1453
+ actions: f,
1454
+ children: [/* @__PURE__ */ E(M, { children: /* @__PURE__ */ D("table", {
1455
+ className: "xh8yej3 x1mwwwfo xy8obcc x1yc453h xss6m8b",
1456
+ children: [
1457
+ /* @__PURE__ */ D("caption", { children: [e, " observations"] }),
1458
+ /* @__PURE__ */ E("thead", { children: /* @__PURE__ */ D("tr", { children: [/* @__PURE__ */ D("th", {
1459
+ scope: "col",
1460
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1482
1461
  children: [
1483
- /* @__PURE__ */ E("caption", { children: [e, " observations"] }),
1484
- /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ E("th", {
1485
- scope: "col",
1486
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1487
- children: [
1488
- "Time (",
1489
- r,
1490
- ")"
1491
- ]
1492
- }), O.map((e) => /* @__PURE__ */ T("th", {
1493
- scope: "col",
1494
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1495
- children: e.label
1496
- }, e.id))] }) }),
1497
- /* @__PURE__ */ T("tbody", { children: k.map((e, t) => /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
1498
- scope: "row",
1499
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1500
- children: i(e.timestamp)
1501
- }), O.map((e) => /* @__PURE__ */ T("td", {
1502
- className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1503
- children: e.points[t]?.value === null || e.points[t]?.value === void 0 ? "Unavailable" : a(e.points[t].value)
1504
- }, e.id))] }, e.timestamp)) })
1462
+ "Time (",
1463
+ r,
1464
+ ")"
1505
1465
  ]
1506
- })
1507
- })
1508
- ] }),
1509
- children: /* @__PURE__ */ E("div", {
1466
+ }), j.map((e) => /* @__PURE__ */ E("th", {
1467
+ scope: "col",
1468
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1469
+ children: e.label
1470
+ }, e.id))] }) }),
1471
+ /* @__PURE__ */ E("tbody", { children: N.map((e, t) => /* @__PURE__ */ D("tr", { children: [/* @__PURE__ */ E("th", {
1472
+ scope: "row",
1473
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1474
+ children: i(e.timestamp)
1475
+ }), j.map((e) => /* @__PURE__ */ E("td", {
1476
+ className: "x69ldcm x1yc453h xso031l x1q0q8m5 x1qndepd xj57cvi",
1477
+ children: e.points[t]?.value === null || e.points[t]?.value === void 0 ? "Unavailable" : a(e.points[t].value)
1478
+ }, e.id))] }, e.timestamp)) })
1479
+ ]
1480
+ }) }), /* @__PURE__ */ D("div", {
1510
1481
  className: "xrvj5dj x1n8ia3y",
1511
1482
  children: [
1512
- /* @__PURE__ */ T(M, {
1513
- id: he,
1483
+ /* @__PURE__ */ E(oe, {
1484
+ id: me,
1514
1485
  label: L === void 0 ? void 0 : i(L.timestamp),
1515
- legend: O.map(({ id: e, label: t, tone: n }) => ({
1486
+ legend: j.map(({ id: e, label: t, tone: n }) => ({
1516
1487
  id: e,
1517
1488
  label: t,
1518
1489
  tone: n
1519
1490
  })),
1520
- rows: O.map((e) => {
1491
+ rows: j.map((e) => {
1521
1492
  let t = e.points.find((e) => e.timestamp === L?.timestamp);
1522
1493
  return {
1523
1494
  id: e.id,
@@ -1526,27 +1497,27 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1526
1497
  value: t?.value === null || t === void 0 ? "Unavailable" : a(t.value)
1527
1498
  };
1528
1499
  }),
1529
- x: Z(I?.timestamp ?? B),
1530
- width: j,
1500
+ x: X(I?.timestamp ?? B),
1501
+ width: re,
1531
1502
  source: L?.source,
1532
1503
  notes: s.filter((e) => e.timestamp === L?.timestamp).map((e) => e.label),
1533
- hasSeriesSummary: me
1504
+ hasSeriesSummary: pe
1534
1505
  }),
1535
- /* @__PURE__ */ E("div", {
1536
- ref: A,
1537
- ...x.props(d.plot),
1538
- children: [/* @__PURE__ */ E("svg", {
1506
+ /* @__PURE__ */ D("div", {
1507
+ ref: P,
1508
+ ...b.props(l.plot),
1509
+ children: [/* @__PURE__ */ D("svg", {
1539
1510
  role: "img",
1540
1511
  "aria-label": `${e}. Use arrow keys to inspect observations.`,
1541
- "aria-describedby": he,
1512
+ "aria-describedby": me,
1542
1513
  tabIndex: 0,
1543
- viewBox: `0 0 ${j} ${ge}`,
1544
- height: ge,
1514
+ viewBox: `0 0 ${re} ${z}`,
1515
+ height: z,
1545
1516
  onKeyDown: $,
1546
1517
  onFocus: (e) => {
1547
1518
  if (e.currentTarget.matches(":focus-visible")) {
1548
1519
  let e = I?.timestamp ?? B;
1549
- de(e), Q({
1520
+ le(e), Q({
1550
1521
  signature: F,
1551
1522
  timestamp: e,
1552
1523
  source: "keyboard"
@@ -1554,86 +1525,86 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1554
1525
  }
1555
1526
  },
1556
1527
  onPointerMove: (e) => {
1557
- e.pointerType === "mouse" && _e(e.clientX);
1528
+ e.pointerType === "mouse" && Z(e.clientX);
1558
1529
  },
1559
- onPointerDown: (e) => _e(e.clientX),
1530
+ onPointerDown: (e) => Z(e.clientX),
1560
1531
  onPointerLeave: (e) => {
1561
1532
  e.pointerType === "mouse" && I?.source === "pointer" && Q(void 0);
1562
1533
  },
1563
1534
  onBlur: () => Q(void 0),
1564
- ...x.props(d.svg, d.inspectable, Fe),
1535
+ ...b.props(l.svg, l.inspectable, Pe),
1565
1536
  children: [
1566
- J.map((e) => /* @__PURE__ */ E("g", { children: [/* @__PURE__ */ T("line", {
1567
- x1: Y,
1568
- x2: X,
1569
- y1: q(e),
1570
- y2: q(e),
1571
- ...x.props(d.grid)
1572
- }), /* @__PURE__ */ T("text", {
1573
- x: Y - 8,
1574
- y: q(e),
1537
+ q.map((e) => /* @__PURE__ */ D("g", { children: [/* @__PURE__ */ E("line", {
1538
+ x1: J,
1539
+ x2: Y,
1540
+ y1: K(e),
1541
+ y2: K(e),
1542
+ ...b.props(l.grid)
1543
+ }), /* @__PURE__ */ E("text", {
1544
+ x: J - 8,
1545
+ y: K(e),
1575
1546
  textAnchor: "end",
1576
1547
  dominantBaseline: "middle",
1577
- ...x.props(d.label),
1548
+ ...b.props(l.label),
1578
1549
  children: o(e)
1579
1550
  })] }, e)),
1580
- O.map((e) => /* @__PURE__ */ E("g", { children: [m === "area" && /* @__PURE__ */ T(ie, {
1551
+ j.map((e) => /* @__PURE__ */ D("g", { children: [m === "area" && /* @__PURE__ */ E(te, {
1581
1552
  data: [...e.points],
1582
1553
  defined: (e) => e.value !== null,
1583
- x: (e) => Z(e.timestamp),
1584
- y0: (e) => q(e.base),
1585
- y1: (e) => q((e.value ?? 0) + e.base),
1586
- yScale: q,
1587
- fill: p[e.tone],
1588
- fillOpacity: h ? .65 : .15
1589
- }), /* @__PURE__ */ T(Te, {
1554
+ x: (e) => X(e.timestamp),
1555
+ y0: (e) => K(e.base),
1556
+ y1: (e) => K((e.value ?? 0) + e.base),
1557
+ yScale: K,
1558
+ fill: d[e.tone],
1559
+ fillOpacity: v ? .65 : .15
1560
+ }), /* @__PURE__ */ E(we, {
1590
1561
  series: e,
1591
- x: Z,
1592
- y: q,
1562
+ x: X,
1563
+ y: K,
1593
1564
  inspectedTimestamp: I?.timestamp
1594
1565
  })] }, e.id)),
1595
- s.map((e) => /* @__PURE__ */ E("g", { children: [e.kind === "time" ? /* @__PURE__ */ T("line", {
1596
- x1: Z(e.timestamp),
1597
- x2: Z(e.timestamp),
1566
+ s.map((e) => /* @__PURE__ */ D("g", { children: [e.kind === "time" ? /* @__PURE__ */ E("line", {
1567
+ x1: X(e.timestamp),
1568
+ x2: X(e.timestamp),
1598
1569
  y1: 12,
1599
- y2: z,
1570
+ y2: R,
1600
1571
  className: "xhq4mlf x1ntoi03 x13efnbd"
1601
- }) : /* @__PURE__ */ T("circle", {
1602
- cx: Z(e.timestamp),
1603
- cy: q(e.value + (O.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base ?? 0)),
1572
+ }) : /* @__PURE__ */ E("circle", {
1573
+ cx: X(e.timestamp),
1574
+ cy: K(e.value + (j.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base ?? 0)),
1604
1575
  r: 4,
1605
- fill: v.surface,
1606
- ...x.props(d.selected)
1607
- }), /* @__PURE__ */ T("title", { children: e.kind === "point" ? `${e.label}: ${a(e.value)}` : e.label })] }, e.id)),
1608
- I !== void 0 && /* @__PURE__ */ T("line", {
1609
- x1: Z(I.timestamp),
1610
- x2: Z(I.timestamp),
1576
+ fill: g.surface,
1577
+ ...b.props(l.selected)
1578
+ }), /* @__PURE__ */ E("title", { children: e.kind === "point" ? `${e.label}: ${a(e.value)}` : e.label })] }, e.id)),
1579
+ I !== void 0 && /* @__PURE__ */ E("line", {
1580
+ x1: X(I.timestamp),
1581
+ x2: X(I.timestamp),
1611
1582
  y1: 12,
1612
- y2: z,
1583
+ y2: R,
1613
1584
  className: "xhq4mlf x1ntoi03 x13efnbd"
1614
1585
  }),
1615
- P !== void 0 && /* @__PURE__ */ T(oe, {
1616
- x: Z(P.timestamp),
1586
+ ue !== void 0 && /* @__PURE__ */ E(ne, {
1587
+ x: X(ue.timestamp),
1617
1588
  top: 12,
1618
- bottom: z,
1619
- width: Math.min(16, (X - Y) / 2)
1589
+ bottom: R,
1590
+ width: Math.min(16, (Y - J) / 2)
1620
1591
  })
1621
1592
  ]
1622
- }), re && /* @__PURE__ */ E("div", {
1593
+ }), O && /* @__PURE__ */ D("div", {
1623
1594
  "aria-hidden": !0,
1624
- ...x.props(Oe.timeAxis, Oe.timeAxisInset(Y, Math.max(0, j - X))),
1625
- children: [/* @__PURE__ */ T("span", {
1595
+ ...b.props(De.timeAxis, De.timeAxisInset(J, Math.max(0, re - Y))),
1596
+ children: [/* @__PURE__ */ E("span", {
1626
1597
  className: "x1cqoux5 xeuugli xj0a0fe",
1627
1598
  children: i(B)
1628
- }), V !== B && /* @__PURE__ */ T("span", {
1599
+ }), V !== B && /* @__PURE__ */ E("span", {
1629
1600
  className: "x1cqoux5 xeuugli xj0a0fe xp4054r",
1630
1601
  children: i(V)
1631
1602
  })]
1632
1603
  })]
1633
1604
  }),
1634
- s.length > 0 && /* @__PURE__ */ T("ul", {
1605
+ s.length > 0 && /* @__PURE__ */ E("ul", {
1635
1606
  className: "x78zum5 x1a02dak x1n8ia3y x1ghz6dp x1717udv xe8uvvx xy8obcc x153jb6y xj0a0fe",
1636
- children: s.map((e) => /* @__PURE__ */ E("li", { children: [
1607
+ children: s.map((e) => /* @__PURE__ */ D("li", { children: [
1637
1608
  i(e.timestamp),
1638
1609
  " · ",
1639
1610
  e.label,
@@ -1641,8 +1612,8 @@ function Ie({ title: e, description: t, series: n, timestampUnit: r, formatTimes
1641
1612
  ] }, e.id))
1642
1613
  })
1643
1614
  ]
1644
- })
1615
+ })]
1645
1616
  })
1646
1617
  });
1647
1618
  }
1648
- export { Ae as AreaChart, R as BarChart, I as BarChartPlaceholder, V as BreakdownBar, ke as LineChart, K as MAX_SCATTER_POINTS, Y as ScatterPlot, Ne as SmallMultiples, Pe as SmallMultiplesPlaceholder, Ee as Sparkline, je as TimeSeriesChartPlaceholder, $ as timeSeriesLimits };
1619
+ export { ke as AreaChart, he as BarChart, I as BarChartPlaceholder, V as BreakdownBar, Oe as LineChart, ge as MAX_SCATTER_POINTS, J as ScatterPlot, Me as SmallMultiples, Ne as SmallMultiplesPlaceholder, Te as Sparkline, Ae as TimeSeriesChartPlaceholder, $ as timeSeriesLimits };