@mechane-ai/elements 0.48.0 → 0.49.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.
Files changed (140) hide show
  1. package/README.md +40 -2
  2. package/dist/ai.js +5 -5
  3. package/dist/{article-BXZr10QQ.js → article-CRlhq9oA.js} +532 -464
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +243 -1
  6. package/dist/{categorical-values-BpVq8cFj.js → categorical-values-BYP_R5gS.js} +13 -13
  7. package/dist/{cells-xVmnQ9oQ.js → cells-CNZE4us2.js} +2 -2
  8. package/dist/charts/cartesian.js +1 -1
  9. package/dist/charts/cells.js +1 -1
  10. package/dist/charts/comparison.js +1 -1
  11. package/dist/charts/distribution.js +1 -1
  12. package/dist/charts/figure.js +12 -12
  13. package/dist/charts/graph.js +1 -1
  14. package/dist/charts/hierarchy.js +1 -1
  15. package/dist/charts/image.js +1 -1
  16. package/dist/charts/matrix.js +1 -1
  17. package/dist/charts/plot.js +7 -7
  18. package/dist/charts/relationship.js +1 -1
  19. package/dist/charts/text.js +1 -1
  20. package/dist/charts/timeline.js +1 -1
  21. package/dist/charts/trend.js +1 -1
  22. package/dist/charts.js +7 -7
  23. package/dist/{code-block-DioAM2bZ.js → code-block-BZsY2sh3.js} +1 -1
  24. package/dist/collections.js +1 -1
  25. package/dist/content/code.js +1 -1
  26. package/dist/content/diff.js +3 -3
  27. package/dist/content/link.js +1 -1
  28. package/dist/content/markdown.js +2 -2
  29. package/dist/content/tree.js +1 -1
  30. package/dist/{content-link-NWuHp5rC.js → content-link-PnpcnTCx.js} +1 -1
  31. package/dist/content.js +1 -1
  32. package/dist/{dates-Cww8UR_n.js → dates-ckJdYF7t.js} +1 -1
  33. package/dist/{dumbbell-plot-DQdTxDeO.js → dumbbell-plot-B-Tn7ewW.js} +49 -48
  34. package/dist/{embedding-map-CF-J-8JW.js → embedding-map-Bljn-A5q.js} +533 -533
  35. package/dist/feedback.js +1 -1
  36. package/dist/figure-frame-CEijciL7.js +289 -0
  37. package/dist/forms/dates.js +1 -1
  38. package/dist/forms.js +3 -3
  39. package/dist/{image-grid-Dl2sjIMB.js → image-grid-mrG5u9oE.js} +49 -49
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +5 -5
  42. package/dist/kits/interpretability.js +320 -302
  43. package/dist/kits/operations.js +6 -6
  44. package/dist/kits/research.js +558 -0
  45. package/dist/kits/training.js +6 -6
  46. package/dist/layout.js +205 -110
  47. package/dist/lesson/spec.js +11 -11
  48. package/dist/lesson.js +4 -4
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation.js +2 -2
  51. package/dist/packages/charts/src/cartesian/index.d.ts +1 -1
  52. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +18 -0
  53. package/dist/packages/charts/src/chart-theme.d.ts +1 -1
  54. package/dist/packages/charts/src/figure/caption-scope.d.ts +12 -0
  55. package/dist/packages/charts/src/figure/figure-frame.d.ts +2 -1
  56. package/dist/packages/charts/src/index.d.ts +2 -0
  57. package/dist/packages/charts/src/plot/plot-surface.d.ts +3 -1
  58. package/dist/packages/collections/src/index.d.ts +1 -1
  59. package/dist/packages/collections/src/metrics.d.ts +9 -1
  60. package/dist/packages/content/src/index.d.ts +2 -0
  61. package/dist/packages/content/src/text-match.d.ts +22 -0
  62. package/dist/packages/core/src/index.d.ts +1 -0
  63. package/dist/packages/core/src/surfaces.d.ts +12 -2
  64. package/dist/packages/forms/src/index.d.ts +2 -0
  65. package/dist/packages/forms/src/token-input.d.ts +24 -0
  66. package/dist/packages/kits/src/interpretability/index.d.ts +1 -1
  67. package/dist/packages/kits/src/interpretability/logit-lens.d.ts +10 -1
  68. package/dist/packages/kits/src/research/finding-card.d.ts +43 -0
  69. package/dist/packages/kits/src/research/index.d.ts +8 -0
  70. package/dist/packages/kits/src/research/milestone-path.d.ts +36 -0
  71. package/dist/packages/kits/src/research/specimen-diff.d.ts +41 -0
  72. package/dist/packages/kits/src/research/work-heartbeat.d.ts +34 -0
  73. package/dist/packages/layout/src/figure-grid.d.ts +8 -0
  74. package/dist/packages/layout/src/index.d.ts +4 -1
  75. package/dist/packages/layout/src/sidebar.d.ts +7 -0
  76. package/dist/packages/layout/src/workbench.d.ts +4 -1
  77. package/dist/packages/teaching/src/article/article-context.d.ts +2 -0
  78. package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +13 -0
  79. package/dist/packages/teaching/src/article/article.d.ts +6 -1
  80. package/dist/packages/teaching/src/article/figure.d.ts +20 -3
  81. package/dist/packages/teaching/src/article/index.d.ts +1 -1
  82. package/dist/packages/teaching/src/article/view-essay.d.ts +2 -1
  83. package/dist/packages/teaching/src/lesson/define-lesson.d.ts +4 -0
  84. package/dist/packages/teaching/src/lesson/index.d.ts +2 -2
  85. package/dist/packages/teaching/src/lesson/lesson-player.d.ts +19 -3
  86. package/dist/packages/teaching/src/lesson/lesson-store.d.ts +2 -0
  87. package/dist/packages/teaching/src/lesson/playback.d.ts +9 -6
  88. package/dist/packages/teaching/src/lesson/use-lesson.d.ts +7 -2
  89. package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +4 -1
  90. package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +5 -6
  91. package/dist/packages/teaching/src/scene/scene-geometry.d.ts +1 -1
  92. package/dist/packages/teaching/src/scene/scene-node.d.ts +4 -1
  93. package/dist/packages/teaching/src/scene/scene-validate.d.ts +6 -0
  94. package/dist/packages/teaching/src/scene/scene-wire.d.ts +6 -1
  95. package/dist/packages/teaching/src/scene/scene.d.ts +1 -1
  96. package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +5 -1
  97. package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +1 -1
  98. package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +1 -1
  99. package/dist/packages/teaching/src/time/tween.d.ts +2 -0
  100. package/dist/{param-CqKUTHaO.js → param-BdqTpZER.js} +175 -108
  101. package/dist/{pierre-diff-DlvjyuJn.js → pierre-diff-aGyQK5xK.js} +1 -1
  102. package/dist/{plot-axes-DJkLW4wk.js → plot-axes-D5S9BnBa.js} +1 -1
  103. package/dist/{plot-layout-CZVSJ-le.js → plot-layout-B2xRt-_k.js} +146 -132
  104. package/dist/{plot-marks-uozcbOIX.js → plot-marks-FVsbFkUs.js} +3 -3
  105. package/dist/{plot-surface-CbVBvgqZ.js → plot-surface-0cKFwtws.js} +11 -11
  106. package/dist/{plot-width-DcqtSgzb.js → plot-width-D3hTycYX.js} +1 -1
  107. package/dist/{reference-lines-BDcttOp0.js → reference-lines-nSxcZVF5.js} +2 -2
  108. package/dist/{scene-0z2gbaDE.js → scene-BwJKueD6.js} +1228 -1126
  109. package/dist/scene.js +1 -1
  110. package/dist/{slope-chart-BKVEAVCs.js → slope-chart-CGTYbFxi.js} +182 -182
  111. package/dist/{src-CpdJlDhO.js → src-9EJskqB_.js} +73 -31
  112. package/dist/{src-Dcfq8vE4.js → src-B2rgpWap.js} +48 -14
  113. package/dist/{src-BPTDJqt0.js → src-Ci8DeY8J.js} +1 -1
  114. package/dist/{src-CGc_hjxJ.js → src-DFW49IAs.js} +143 -111
  115. package/dist/{src-BD6xlvDt.js → src-Dxs3Buo_.js} +203 -137
  116. package/dist/{src-CExIrXPC.js → src-npqwq3Sa.js} +1 -1
  117. package/dist/styles2.css +136 -17
  118. package/dist/{time-series-BgzGNOk0.js → time-series-Dh8y5ba0.js} +1018 -944
  119. package/dist/{token-heatmap-BrW1OsKD.js → token-heatmap-BTrZ3-N4.js} +86 -86
  120. package/dist/{token-predictions-yerq_Oet.js → token-predictions-CUe4junQ.js} +129 -129
  121. package/dist/{transport-BJweqDPj.js → transport-4V9rfYHN.js} +291 -246
  122. package/dist/{tree-diagram-D09BRqE-.js → tree-diagram-Dpqmo-fh.js} +118 -118
  123. package/dist/{treemap-CW4WsJNL.js → treemap-BUSaVD3m.js} +28 -28
  124. package/dist/use-tween-BsaEO862.js +10 -0
  125. package/dist/{violin-plot-DrtPZ1-T.js → violin-plot-BxaLwdRi.js} +126 -126
  126. package/dist/{waterfall-DYLSnGjm.js → waterfall-CcDMdKec.js} +43 -43
  127. package/package.json +5 -1
  128. package/recipes/counting-cards.tsx +3 -3
  129. package/skills/review-explainer/SKILL.md +2 -1
  130. package/skills/upgrade-elements/references/releases.md +61 -0
  131. package/skills/use-elements/SKILL.md +3 -1
  132. package/skills/use-elements/references/kits.md +7 -6
  133. package/skills/use-elements/references/styling.md +23 -0
  134. package/skills/use-elements/references/teaching.md +13 -0
  135. package/skills/write-explainer/references/article.md +50 -2
  136. package/skills/write-explainer/references/lesson.md +18 -9
  137. package/skills/write-explainer/references/scene-parts.md +17 -12
  138. package/skills/write-explainer/references/scene.md +25 -3
  139. package/dist/figure-frame-BJ3REgTA.js +0 -270
  140. package/dist/use-tween-5HZ55_9d.js +0 -72
@@ -1,28 +1,30 @@
1
- import { k as e } from "./src-CpdJlDhO.js";
2
- import { g as t } from "./src-BD6xlvDt.js";
3
- import { d as n, u as r } from "./src-CExIrXPC.js";
4
- import { n as i, t as a } from "./chart-tones-ei3BC2AL.js";
5
- import { A as o, O as s, S as c, T as l, a as u, b as d, c as f, i as p, k as m, m as h, n as g, o as _, p as v, w as ee } from "./plot-layout-CZVSJ-le.js";
6
- import { i as y, n as b, r as x, t as S } from "./categorical-values-BpVq8cFj.js";
7
- import { a as C } from "./tone-scope-DKiSw-JR.js";
8
- import { n as w, r as te, t as T } from "./figure-format-B8kRZMlo.js";
9
- import { a as E, i as D, o as O, r as k, t as A } from "./scale-C2xgZyZN.js";
10
- import { t as ne } from "./chart-cursor-1mFd48Jc.js";
11
- import { c as re, i as ie, l as ae, n as j, o as M, r as oe, s as N, t as se } from "./figure-frame-BJ3REgTA.js";
12
- import { n as P, t as F } from "./plot-width-DcqtSgzb.js";
13
- import { t as ce } from "./plot-axes-DJkLW4wk.js";
14
- import { a as I, c as L, d as R, f as le, i as z, l as ue, n as B, o as de, r as V, s as fe, t as pe } from "./plot-marks-uozcbOIX.js";
15
- import { n as me, r as he, t as ge } from "./plot-surface-CbVBvgqZ.js";
16
- import { n as _e, t as ve } from "./reference-lines-BDcttOp0.js";
17
- import { n as ye, r as be, t as xe } from "./path-BglsXpnO.js";
18
- import { t as Se } from "./locate-Bcg3QcP4.js";
19
- import * as H from "@stylexjs/stylex";
20
- import { createParts as U } from "@ui-sdk/react/primitive";
21
- import { useEffect as Ce, useId as W, useRef as we, useState as G } from "react";
22
- import { bindDrag as K, createChange as q, createSpans as Te, definePrimitive as Ee, dispatch as De } from "@ui-sdk/core";
23
- import { Fragment as Oe, jsx as J, jsxs as Y } from "react/jsx-runtime";
1
+ import { t as e } from "./accessibility-P89UG9-r.js";
2
+ import { k as t } from "./src-9EJskqB_.js";
3
+ import { x as n } from "./src-Dxs3Buo_.js";
4
+ import { d as r, u as i } from "./src-npqwq3Sa.js";
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 g, m as _, n as v, o as y, p as b, w as x } from "./plot-layout-B2xRt-_k.js";
7
+ import { i as ee, n as S, r as C, t as w } from "./categorical-values-BYP_R5gS.js";
8
+ import { i as T } from "./chart-link-AE_xuxiP.js";
9
+ import { a as E } from "./tone-scope-DKiSw-JR.js";
10
+ import { n as te, r as ne, t as D } from "./figure-format-B8kRZMlo.js";
11
+ import { a as O, i as k, o as A, r as j, t as re } from "./scale-C2xgZyZN.js";
12
+ import { t as ie } from "./chart-cursor-1mFd48Jc.js";
13
+ import { c as ae, i as M, l as oe, n as se, o as N, r as ce, s as P, t as le } from "./figure-frame-CEijciL7.js";
14
+ import { n as F, t as I } from "./plot-width-D3hTycYX.js";
15
+ import { t as ue } from "./plot-axes-D5S9BnBa.js";
16
+ import { a as L, c as R, d as z, f as B, i as de, l as fe, n as V, o as pe, r as H, s as me, t as he } from "./plot-marks-FVsbFkUs.js";
17
+ import { n as ge, r as _e, t as ve } from "./plot-surface-0cKFwtws.js";
18
+ import { n as ye, t as be } from "./reference-lines-nSxcZVF5.js";
19
+ import { n as xe, r as U, t as Se } from "./path-BglsXpnO.js";
20
+ import { t as Ce } from "./locate-Bcg3QcP4.js";
21
+ import * as W from "@stylexjs/stylex";
22
+ import { createParts as G } from "@ui-sdk/react/primitive";
23
+ import { useEffect as K, useId as we, useRef as q, useState as Te } from "react";
24
+ import { bindDrag as Ee, createChange as De, createSpans as Oe, definePrimitive as J, dispatch as ke } from "@ui-sdk/core";
25
+ import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
24
26
  // packages/charts/src/cartesian/bar-data.ts
25
- function ke({ composition: e, series: t, categoryIds: n, domain: r }) {
27
+ function Q({ composition: e, series: t, categoryIds: n, domain: r }) {
26
28
  if (e === void 0) return;
27
29
  if (e.buckets.length !== n.length) return "Composition requires one explicit bucket per category.";
28
30
  let i = e.annotation;
@@ -39,26 +41,26 @@ function ke({ composition: e, series: t, categoryIds: n, domain: r }) {
39
41
  }
40
42
  }
41
43
  }
42
- var X = 6;
43
- function Z(e, t) {
44
+ var Ae = 6;
45
+ function je(e, t) {
44
46
  return e === null ? !0 : e === void 0 || !Number.isFinite(e) ? !1 : e >= t[0] && e <= t[1];
45
47
  }
46
- function Q({ marker: e, categoryCount: t, domain: n }) {
48
+ function Me({ marker: e, categoryCount: t, domain: n }) {
47
49
  let r = e.kind === "tick" ? [e.values] : [e.lower, e.upper];
48
50
  if (r.some((e) => e.length !== t)) return "Every bar marker requires one explicit value per category.";
49
- if (r.some((e) => e.some((e) => !Z(e, n)))) return "Bar marker values must be finite and within the supplied domain.";
51
+ if (r.some((e) => e.some((e) => !je(e, n)))) return "Bar marker values must be finite and within the supplied domain.";
50
52
  if (e.kind === "range") for (let [t, n] of e.lower.entries()) {
51
53
  let r = e.upper[t] ?? null;
52
54
  if (n === null != (r === null) || n !== null && r !== null && n > r) return "A range marker needs both bounds, with the lower bound at most the upper bound, or neither.";
53
55
  }
54
56
  }
55
- function Ae({ markers: e, annotations: t, emphasizedCategoryIds: n, seriesIds: r, categoryIds: i, domain: a }) {
56
- if (e.length > X) return `Supply at most ${X} bar markers.`;
57
+ function Ne({ markers: e, annotations: t, emphasizedCategoryIds: n, seriesIds: r, categoryIds: i, domain: a }) {
58
+ if (e.length > Ae) return `Supply at most ${Ae} bar markers.`;
57
59
  let o = [...e, ...t];
58
60
  if (new Set(o.map((e) => e.id)).size !== o.length || r.some((e) => o.some((t) => t.id === e))) return "Bar series, markers, and annotations require distinct identifiers.";
59
61
  for (let t of e) {
60
62
  if (!r.includes(t.seriesId)) return "Each bar marker must refer to a supplied series.";
61
- let e = Q({
63
+ let e = Me({
62
64
  marker: t,
63
65
  categoryCount: i.length,
64
66
  domain: a
@@ -72,25 +74,25 @@ function Ae({ markers: e, annotations: t, emphasizedCategoryIds: n, seriesIds: r
72
74
  if (new Set(t.map((e) => JSON.stringify([e.categoryId, e.seriesId ?? null]))).size !== t.length) return "Each bar can hold one annotation.";
73
75
  if (new Set(n).size !== n.length || n.some((e) => !i.includes(e))) return "Emphasized categories must be unique supplied categories.";
74
76
  }
75
- function je({ marker: e, index: t, valueText: n }) {
77
+ function Pe({ marker: e, index: t, valueText: n }) {
76
78
  if (e.kind === "tick") return n(e.values[t] ?? null);
77
79
  let r = e.lower[t] ?? null, i = e.upper[t] ?? null;
78
80
  return r === null || i === null ? n(null) : `${n(r)} – ${n(i)}`;
79
81
  }
80
- function Me(e, t) {
82
+ function Fe(e, t) {
81
83
  return e.kind === "tick" ? e.values[t] ?? null : e.upper[t] ?? null;
82
84
  }
83
85
  // packages/charts/src/cartesian/value-labels.ts
84
- var Ne = 6.5, Pe = 14, Fe = 6, Ie = .5;
85
- function Le(e, t) {
86
- let n = (e.text.length + t.text.length) * Ne * Ie + Fe;
87
- return Math.abs(e.x - t.x) < n && Math.abs(e.y - t.y) < Pe;
86
+ var Ie = 6.5, Le = 14, Re = 6, ze = .5;
87
+ function Be(e, t) {
88
+ let n = (e.text.length + t.text.length) * Ie * ze + Re;
89
+ return Math.abs(e.x - t.x) < n && Math.abs(e.y - t.y) < Le;
88
90
  }
89
- function Re(e) {
90
- return e.filter((t, n) => e.slice(0, n).every((e) => !Le(t, e)));
91
+ function Ve(e) {
92
+ return e.filter((t, n) => e.slice(0, n).every((e) => !Be(t, e)));
91
93
  }
92
- function ze({ x: e, text: t, left: n, right: r }) {
93
- let i = t.length * Ne * Ie;
94
+ function He({ x: e, text: t, left: n, right: r }) {
95
+ let i = t.length * Ie * ze;
94
96
  return e - i < n ? {
95
97
  x: n,
96
98
  anchor: "start"
@@ -103,16 +105,16 @@ function ze({ x: e, text: t, left: n, right: r }) {
103
105
  };
104
106
  }
105
107
  // packages/charts/src/cartesian/bar-overlays.tsx
106
- var Be = 3, Ve = 14, He = .6, Ue = .5;
107
- function We({ marker: e, index: t, span: n, base: r, y: i }) {
108
- let a = n.x + n.width * Ue;
108
+ var Ue = 3, We = 14, Ge = .6, Ke = .5;
109
+ function qe({ marker: e, index: t, span: n, base: r, y: i }) {
110
+ let a = n.x + n.width * Ke;
109
111
  if (e.kind === "tick") {
110
112
  let o = e.values[t] ?? null;
111
113
  if (o === null) return [];
112
114
  let s = {
113
115
  key: "tick",
114
- x1: n.x - Be,
115
- x2: n.x + n.width + Be,
116
+ x1: n.x - Ue,
117
+ x2: n.x + n.width + Ue,
116
118
  y1: i(o),
117
119
  y2: i(o)
118
120
  };
@@ -126,7 +128,7 @@ function We({ marker: e, index: t, span: n, base: r, y: i }) {
126
128
  }
127
129
  let o = e.lower[t] ?? null, s = e.upper[t] ?? null;
128
130
  if (o === null || s === null) return [];
129
- let c = Math.min(Ve, n.width * He) * Ue;
131
+ let c = Math.min(We, n.width * Ge) * Ke;
130
132
  return [
131
133
  {
132
134
  key: "whisker",
@@ -151,37 +153,37 @@ function We({ marker: e, index: t, span: n, base: r, y: i }) {
151
153
  }
152
154
  ];
153
155
  }
154
- function Ge({ markers: e, categoryIds: t, span: n, barTop: r, y: i, isReceded: a }) {
155
- return /* @__PURE__ */ J("g", { children: e.map((e) => /* @__PURE__ */ J("g", { children: t.map((t, o) => {
156
- let s = We({
156
+ function Je({ markers: e, categoryIds: t, span: n, barTop: r, y: i, isReceded: a }) {
157
+ return /* @__PURE__ */ X("g", { children: e.map((e) => /* @__PURE__ */ X("g", { children: t.map((t, o) => {
158
+ let s = qe({
157
159
  marker: e,
158
160
  index: o,
159
161
  span: n(t, e.seriesId),
160
162
  base: r(o, e.seriesId),
161
163
  y: i
162
164
  });
163
- return /* @__PURE__ */ J("g", {
164
- ...H.props(P.emphasis, a(t) && P.receded),
165
- children: s.map(({ key: t, ...n }) => /* @__PURE__ */ J(fe, {
165
+ return /* @__PURE__ */ X("g", {
166
+ ...W.props(F.emphasis, a(t) && F.receded),
167
+ children: s.map(({ key: t, ...n }) => /* @__PURE__ */ X(me, {
166
168
  ...n,
167
169
  tone: e.tone ?? "neutral"
168
170
  }, t))
169
171
  }, t);
170
172
  }) }, e.id)) });
171
173
  }
172
- function Ke({ annotations: e, left: t, right: n }) {
173
- return /* @__PURE__ */ J("g", {
174
+ function Ye({ annotations: e, left: t, right: n }) {
175
+ return /* @__PURE__ */ X("g", {
174
176
  "aria-hidden": !0,
175
- children: Re(e).map((e) => {
176
- let r = ze({
177
+ children: Ve(e).map((e) => {
178
+ let r = He({
177
179
  x: e.x,
178
180
  text: e.text,
179
181
  left: t,
180
182
  right: n
181
183
  });
182
- return /* @__PURE__ */ J("g", {
183
- ...H.props(P.emphasis, e.isReceded && P.receded),
184
- children: /* @__PURE__ */ J(L, {
184
+ return /* @__PURE__ */ X("g", {
185
+ ...W.props(F.emphasis, e.isReceded && F.receded),
186
+ children: /* @__PURE__ */ X(R, {
185
187
  x: r.x,
186
188
  y: e.y,
187
189
  anchor: r.anchor,
@@ -192,7 +194,7 @@ function Ke({ annotations: e, left: t, right: n }) {
192
194
  });
193
195
  }
194
196
  // packages/charts/src/cartesian/composition-bars.tsx
195
- var qe = {
197
+ var Xe = {
196
198
  mark: {
197
199
  k3nNDw: "x1hj3fc7",
198
200
  k1ekBW: "xwcsmn1",
@@ -208,17 +210,17 @@ var qe = {
208
210
  "--x-transform": e ?? void 0,
209
211
  "--x-opacity": t ?? void 0
210
212
  }]
211
- }, Je = .18, Ye = .3;
212
- function Xe({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a, y: o, isSelected: s, isInspected: c, highlighted: l, toneOf: u }) {
213
+ }, Ze = .18, Qe = .3;
214
+ function $e({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a, y: o, isSelected: s, isInspected: c, highlighted: l, toneOf: u }) {
213
215
  let d = n !== void 0, f = n !== void 0 && !t.some((e) => e.id === n.id) ? [...t, n] : t;
214
216
  function p(e, t) {
215
217
  let n = o(t), r = o(t + e);
216
218
  return `translateY(${Math.min(n, r)}px) scaleY(${Math.max(+(e === 0 && t === 0), Math.abs(r - n))})`;
217
219
  }
218
- let m = d ? Je : +(e.kind === "total");
219
- return /* @__PURE__ */ Y(Oe, { children: [e.kind !== "gap" && /* @__PURE__ */ J("g", {
220
- ...H.props(qe.mark, qe.geometry(p(e.total, 0), m)),
221
- children: /* @__PURE__ */ J(V, {
220
+ let m = d ? Ze : +(e.kind === "total");
221
+ return /* @__PURE__ */ Z(Y, { children: [e.kind !== "gap" && /* @__PURE__ */ X("g", {
222
+ ...W.props(Xe.mark, Xe.geometry(p(e.total, 0), m)),
223
+ children: /* @__PURE__ */ X(H, {
222
224
  x: i,
223
225
  y: 0,
224
226
  width: a,
@@ -230,10 +232,10 @@ function Xe({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a,
230
232
  }), f.map((o, f) => {
231
233
  let m = o.values[r];
232
234
  if (m == null) return null;
233
- let h = d ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), g = d ? n.id === o.id : e.kind === "parts", _ = l != null && l !== o.id, v = g ? !d && _ ? Ye : 1 : 0;
234
- return /* @__PURE__ */ J("g", {
235
- ...H.props(qe.mark, qe.geometry(p(m, h), v)),
236
- children: /* @__PURE__ */ J(V, {
235
+ let h = d ? 0 : t.slice(0, f).reduce((e, t) => e + (t.values[r] ?? 0), 0), g = d ? n.id === o.id : e.kind === "parts", _ = l != null && l !== o.id, v = g ? !d && _ ? Qe : 1 : 0;
236
+ return /* @__PURE__ */ X("g", {
237
+ ...W.props(Xe.mark, Xe.geometry(p(m, h), v)),
238
+ children: /* @__PURE__ */ X(H, {
237
239
  x: i,
238
240
  y: 0,
239
241
  width: a,
@@ -246,16 +248,16 @@ function Xe({ bucket: e, series: t, focusedSeries: n, index: r, x: i, width: a,
246
248
  })] });
247
249
  }
248
250
  // packages/charts/src/cartesian/bar-chart.tsx
249
- var Ze = { placeholder: {
251
+ var et = { placeholder: {
250
252
  kqGvvJ: "x1we84gm",
251
253
  $$css: !0
252
- } }, Qe = 18, $e = 8, et = 14, tt = .08, nt = 8, rt = 8, it = .5;
253
- function at({ 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 }) {
254
+ } }, tt = 18, nt = 8, rt = 14, it = .08, at = 8, ot = 8, st = .5;
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 }) {
254
256
  let m = f && e.length === 0 && p.report?.seriesValues === void 0;
255
- return /* @__PURE__ */ Y(j, {
257
+ return /* @__PURE__ */ Z(se, {
256
258
  ...p,
257
259
  series: e,
258
- seriesLegend: m ? /* @__PURE__ */ J(N, {}) : /* @__PURE__ */ J(M, {
260
+ seriesLegend: m ? /* @__PURE__ */ X(P, {}) : /* @__PURE__ */ X(N, {
259
261
  id: i,
260
262
  label: a,
261
263
  summary: o,
@@ -268,11 +270,11 @@ function at({ legend: e, layoutLegend: t, notes: n, children: r, inspectionId: i
268
270
  width: l,
269
271
  offset: u
270
272
  }),
271
- children: [d !== void 0 && /* @__PURE__ */ J(ae, { ...d }), r]
273
+ children: [d !== void 0 && /* @__PURE__ */ X(oe, { ...d }), r]
272
274
  });
273
275
  }
274
- function ot() {
275
- let e = C();
276
+ function lt() {
277
+ let e = E();
276
278
  return (t) => t.map((t, n) => ({
277
279
  id: t.id,
278
280
  label: t.label,
@@ -283,41 +285,41 @@ function ot() {
283
285
  })
284
286
  }));
285
287
  }
286
- function st({ title: e = "Loading chart", series: t = [], height: n = "compact", ...i }) {
287
- let a = W(), o = ot()(t);
288
- return /* @__PURE__ */ J("div", {
288
+ function ut({ title: e = "Loading chart", series: t = [], height: n = "compact", ...r }) {
289
+ let a = we(), o = lt()(t);
290
+ return /* @__PURE__ */ X("div", {
289
291
  "aria-hidden": !0,
290
292
  inert: !0,
291
- children: /* @__PURE__ */ J(at, {
292
- ...i,
293
+ children: /* @__PURE__ */ X(ct, {
294
+ ...r,
293
295
  title: e,
294
296
  status: "loading",
295
297
  legend: o,
296
298
  inspectionId: a,
297
299
  isLoading: !0,
298
- children: /* @__PURE__ */ J("div", {
299
- ...H.props(P.plot, Ze.placeholder),
300
- children: /* @__PURE__ */ J(r, { height: f[n] })
300
+ children: /* @__PURE__ */ X("div", {
301
+ ...W.props(F.plot, et.placeholder),
302
+ children: /* @__PURE__ */ X(i, { height: m[n] })
301
303
  })
302
304
  })
303
305
  });
304
306
  }
305
- function ct(e, t) {
307
+ function dt(e, t) {
306
308
  return Array.from({ length: t }, (t, n) => e.reduce((e, t) => e + Math.max(0, t.values[n] ?? 0), 0));
307
309
  }
308
- function lt({ categories: e, series: t, domain: n, mode: r }) {
309
- if (e.length > x.items || t.length > x.series) return `Choose a window with at most ${x.items} categories and ${x.series} series.`;
310
- if (O(n) !== void 0 || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
311
- if (!o(e) || !o(t)) return "Bar categories and series require unique identifiers.";
310
+ function ft({ categories: e, series: t, domain: n, mode: r }) {
311
+ if (e.length > C.items || t.length > C.series) return `Choose a window with at most ${C.items} categories and ${C.series} series.`;
312
+ if (A(n) !== void 0 || n[0] > 0 || n[1] < 0) return "The bar domain must be finite, increasing, and include zero.";
313
+ if (!u(e) || !u(t)) return "Bar categories and series require unique identifiers.";
312
314
  for (let i of t) {
313
315
  if (i.values.length !== e.length) return "Every series requires one explicit value per category.";
314
- if (i.values.some((e) => e !== null && E(e, n))) return "Bar values must be finite and within the supplied domain.";
316
+ if (i.values.some((e) => e !== null && O(e, n))) return "Bar values must be finite and within the supplied domain.";
315
317
  if (r === "stacked" && i.values.some((e) => e === null || e < 0)) return "Stacked bars require present nonnegative values.";
316
318
  }
317
- if (r === "stacked" && ct(t, e.length).some((e) => e > n[1])) return "Stacked bar totals must fit the supplied domain.";
319
+ if (r === "stacked" && dt(t, e.length).some((e) => e > n[1])) return "Stacked bar totals must fit the supplied domain.";
318
320
  }
319
- function ut({ categories: e, series: t, mode: n, composition: r, referenceLines: i, markers: a }) {
320
- let o = n === "stacked" || r !== void 0, s = t.flatMap((e) => e.values), c = o ? ct(t, e.length) : [], l = r?.focusedSeries?.values ?? [], u = r?.buckets.map((e) => e.kind === "gap" ? null : e.total) ?? [], d = a.flatMap((e) => e.kind === "tick" ? e.values : [...e.lower, ...e.upper]);
321
+ function pt({ categories: e, series: t, mode: n, composition: r, referenceLines: i, markers: a }) {
322
+ let o = n === "stacked" || r !== void 0, s = t.flatMap((e) => e.values), c = o ? dt(t, e.length) : [], l = r?.focusedSeries?.values ?? [], u = r?.buckets.map((e) => e.kind === "gap" ? null : e.total) ?? [], d = a.flatMap((e) => e.kind === "tick" ? e.values : [...e.lower, ...e.upper]);
321
323
  return [
322
324
  ...s,
323
325
  ...c,
@@ -328,61 +330,61 @@ function ut({ categories: e, series: t, mode: n, composition: r, referenceLines:
328
330
  ...r?.annotation === void 0 ? [] : [r.annotation.value]
329
331
  ];
330
332
  }
331
- function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFormat: i, tickFormat: a, valueLabel: o, highlighted: s, selected: c, onSelectedChange: l, height: d = "compact", composition: f, referenceLines: h = [], markers: g = [], annotations: _ = [], emphasizedCategoryIds: v = [], ...y }) {
332
- let { emptyLabel: b = "No categories", ...x } = y, { locale: S, title: w } = x, T = f?.focusedSeries, E = W(), D = W(), { ref: O, width: k, height: ie } = he(d), ae = C(), j = ot();
333
- if (x.status === "loading") return /* @__PURE__ */ J(st, {
334
- ...x,
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: _ = [], annotations: v = [], emphasizedCategoryIds: y = [], ...b }) {
334
+ let { emptyLabel: x = "No categories", ...ee } = b, { locale: S, title: C } = ee, w = p?.focusedSeries, T = we(), te = we(), { ref: D, width: O, height: k } = _e(d), A = E(), j = lt();
335
+ if (ee.status === "loading") return /* @__PURE__ */ X(ut, {
336
+ ...ee,
335
337
  series: t,
336
338
  height: d
337
339
  });
338
- let M = n ?? u({
339
- values: ut({
340
+ let M = n ?? f({
341
+ values: pt({
340
342
  categories: e,
341
343
  series: t,
342
344
  mode: r,
343
- composition: f,
344
- referenceLines: h,
345
- markers: g
345
+ composition: p,
346
+ referenceLines: m,
347
+ markers: _
346
348
  }),
347
349
  isZeroBased: !0
348
- }), N = T === void 0 ? void 0 : lt({
350
+ }), oe = w === void 0 ? void 0 : ft({
349
351
  categories: e,
350
- series: [T],
352
+ series: [w],
351
353
  domain: M,
352
354
  mode: "grouped"
353
- }), F = lt({
355
+ }), se = ft({
354
356
  categories: e,
355
357
  series: t,
356
358
  domain: M,
357
359
  mode: r
358
- }) ?? N, I = e.map((e) => e.id), L = Ae({
359
- markers: g,
360
- annotations: _,
361
- emphasizedCategoryIds: v,
362
- seriesIds: [...t, ...T === void 0 ? [] : [T]].map((e) => e.id),
363
- categoryIds: I,
360
+ }) ?? oe, N = e.map((e) => e.id), P = Ne({
361
+ markers: _,
362
+ annotations: v,
363
+ emphasizedCategoryIds: y,
364
+ seriesIds: [...t, ...w === void 0 ? [] : [w]].map((e) => e.id),
365
+ categoryIds: N,
364
366
  domain: M
365
- }) ?? _e({
366
- lines: h,
367
+ }) ?? ye({
368
+ lines: m,
367
369
  domain: M
368
- }), R = F ?? ke({
369
- composition: f,
370
+ }), I = se ?? Q({
371
+ composition: p,
370
372
  series: t,
371
- categoryIds: I,
373
+ categoryIds: N,
372
374
  domain: M
373
- }) ?? L;
374
- if (R !== void 0) return /* @__PURE__ */ J(oe, {
375
- ...x,
376
- message: R
375
+ }) ?? P;
376
+ if (I !== void 0) return /* @__PURE__ */ X(ce, {
377
+ ...ee,
378
+ message: I
377
379
  });
378
- function z(e) {
379
- return te({
380
+ function L(e) {
381
+ return ne({
380
382
  value: e,
381
383
  locale: S,
382
384
  format: i
383
385
  });
384
386
  }
385
- let ue = T !== void 0 && !t.some((e) => e.id === T.id), B = [...t, ...ue ? [T] : []], de = new Map(B.map((e, t) => [e.id, ae({
387
+ let R = w !== void 0 && !t.some((e) => e.id === w.id), z = [...t, ...R ? [w] : []], de = new Map(z.map((e, t) => [e.id, A({
386
388
  id: e.id,
387
389
  tone: e.tone,
388
390
  index: t
@@ -390,43 +392,43 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
390
392
  function fe(e) {
391
393
  return de.get(e) ?? "neutral";
392
394
  }
393
- let pe = f === void 0 ? void 0 : {
394
- id: E,
395
- label: f.contextLabel,
395
+ let V = p === void 0 ? void 0 : {
396
+ id: T,
397
+ label: p.contextLabel,
396
398
  tone: "neutral",
397
- values: f.buckets.map((e) => e.kind === "gap" ? null : e.total)
398
- }, ye = pe === void 0 ? t : [pe, ...B], be = (T !== void 0 && pe !== void 0 ? [T, pe] : t).map((e) => ({
399
+ values: p.buckets.map((e) => e.kind === "gap" ? null : e.total)
400
+ }, pe = V === void 0 ? t : [V, ...z], me = (w !== void 0 && V !== void 0 ? [w, V] : t).map((e) => ({
399
401
  id: e.id,
400
402
  label: e.label,
401
- tone: e.id === E ? "neutral" : fe(e.id)
402
- })), xe = g.map((e) => ({
403
+ tone: e.id === T ? "neutral" : fe(e.id)
404
+ })), he = _.map((e) => ({
403
405
  id: e.id,
404
406
  label: e.label,
405
407
  tone: e.tone ?? "neutral",
406
408
  shape: e.kind
407
409
  }));
408
- function Se(n) {
409
- let r = e[n], i = f?.buckets[n], a = T !== void 0 && pe !== void 0 ? [T, pe] : pe === void 0 || i?.kind === "parts" ? t : [], o = i === void 0 ? void 0 : i.kind === "gap" ? "No reported value" : z(i.total), s = a.map((e) => ({
410
+ function xe(n) {
411
+ let r = e[n], i = p?.buckets[n], a = w !== void 0 && V !== void 0 ? [w, V] : V === void 0 || i?.kind === "parts" ? t : [], o = i === void 0 ? void 0 : i.kind === "gap" ? "No reported value" : L(i.total), s = a.map((e) => ({
410
412
  id: e.id,
411
413
  label: e.label,
412
- tone: e.id === E ? "neutral" : fe(e.id),
413
- value: z(e.values[n] ?? null)
414
- })), c = g.map((e) => ({
414
+ tone: e.id === T ? "neutral" : fe(e.id),
415
+ value: L(e.values[n] ?? null)
416
+ })), c = _.map((e) => ({
415
417
  id: e.id,
416
418
  label: e.label,
417
419
  tone: e.tone ?? "neutral",
418
420
  shape: e.kind,
419
- value: je({
421
+ value: Pe({
420
422
  marker: e,
421
423
  index: n,
422
- valueText: z
424
+ valueText: L
423
425
  })
424
- })), l = h.map((e) => ({
426
+ })), l = m.map((e) => ({
425
427
  id: e.id,
426
428
  label: e.label,
427
429
  tone: e.tone ?? "neutral",
428
430
  shape: "dashed",
429
- value: z(e.value)
431
+ value: L(e.value)
430
432
  }));
431
433
  return {
432
434
  category: r,
@@ -437,12 +439,12 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
437
439
  ...c,
438
440
  ...l
439
441
  ],
440
- notes: _.filter((e) => e.categoryId === r?.id).map((e) => e.label)
442
+ notes: v.filter((e) => e.categoryId === r?.id).map((e) => e.label)
441
443
  };
442
444
  }
443
- let U = f?.annotation, Ce = _.length > 0 || U !== void 0, we = p({
444
- width: k,
445
- height: ie,
445
+ let U = p?.annotation, Se = v.length > 0 || U !== void 0, Ce = h({
446
+ width: O,
447
+ height: k,
446
448
  direction: "columns",
447
449
  categories: e.map((e) => ({
448
450
  id: e.id,
@@ -455,20 +457,20 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
455
457
  },
456
458
  valueDomain: M,
457
459
  locale: S,
458
- topInset: Ce ? Qe : 0,
460
+ topInset: Se ? tt : 0,
459
461
  hasValueTitle: o !== void 0
460
- }), { box: G, band: K } = we, q = we.value.position, Te = A({
462
+ }), { box: G, band: K } = Ce, q = Ce.value.position, Te = re({
461
463
  ids: t.map((e) => e.id),
462
464
  range: [0, K.bandwidth],
463
- padding: tt
464
- }), Ee = r === "stacked" || f !== void 0;
465
+ padding: it
466
+ }), Ee = r === "stacked" || p !== void 0;
465
467
  function De(e) {
466
468
  return K.start(e) ?? G.left;
467
469
  }
468
470
  function Oe(e) {
469
- return De(e) + K.bandwidth * it;
471
+ return De(e) + K.bandwidth * st;
470
472
  }
471
- function X(e, t) {
473
+ function J(e, t) {
472
474
  let n = De(e);
473
475
  return Ee ? {
474
476
  x: n,
@@ -478,20 +480,20 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
478
480
  width: Te.bandwidth
479
481
  };
480
482
  }
481
- function Z(e, n) {
483
+ function ke(e, n) {
482
484
  if (!Ee) return t.find((e) => e.id === n)?.values[e] ?? null;
483
485
  let r = t.flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null));
484
486
  return r.length === 0 ? null : r.reduce((e, t) => e + t, 0);
485
487
  }
486
- function Q(e, n) {
487
- let r = (n === void 0 ? t : t.filter((e) => e.id === n)).flatMap((t) => [t.values[e] ?? null].filter((e) => e !== null)), i = Ee ? r.reduce((e, t) => e + Math.max(0, t), 0) : Math.max(0, ...r), a = f?.buckets[e], o = a === void 0 || a.kind === "gap" ? 0 : a.total, s = g.filter((e) => n === void 0 || e.seriesId === n).flatMap((t) => [Me(t, e)].filter((e) => e !== null));
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 = Ee ? 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 = _.filter((e) => n === void 0 || e.seriesId === n).flatMap((t) => [Fe(t, e)].filter((e) => e !== null));
488
490
  return Math.max(0, i, o, ...s);
489
491
  }
490
- function Ne(e) {
491
- return Math.max(et, q(e) - $e);
492
+ function Ae(e) {
493
+ return Math.max(rt, q(e) - nt);
492
494
  }
493
- let Pe = {
494
- label: `${w} observations`,
495
+ let je = {
496
+ label: `${C} observations`,
495
497
  columns: [{
496
498
  id: "category",
497
499
  label: "Category"
@@ -502,94 +504,94 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
502
504
  rows: [...e.map((e, t) => ({
503
505
  id: e.id,
504
506
  values: [e.label, [
505
- ...ye.map((e) => `${e.label}: ${z(e.values[t] ?? null)}`),
506
- ...g.map((e) => `${e.label}: ${je({
507
+ ...pe.map((e) => `${e.label}: ${L(e.values[t] ?? null)}`),
508
+ ..._.map((e) => `${e.label}: ${Pe({
507
509
  marker: e,
508
510
  index: t,
509
- valueText: z
511
+ valueText: L
510
512
  })}`),
511
- ..._.filter((t) => t.categoryId === e.id).map((e) => e.label)
513
+ ...v.filter((t) => t.categoryId === e.id).map((e) => e.label)
512
514
  ].join(" · ")]
513
- })), ...h.map((e) => ({
515
+ })), ...m.map((e) => ({
514
516
  id: `reference:${e.id}`,
515
- values: [e.label, z(e.value)]
517
+ values: [e.label, L(e.value)]
516
518
  }))]
517
519
  };
518
- return /* @__PURE__ */ J(ee, {
520
+ return /* @__PURE__ */ X(l, {
519
521
  items: e,
520
- readout: (e) => re(Se(I.indexOf(e))),
522
+ readout: (e) => ae(xe(N.indexOf(e))),
521
523
  locate: (e) => K.idAt(e.x / e.width * G.width),
522
524
  selected: c ?? null,
523
- onSelect: l,
525
+ onSelect: u,
524
526
  render: (n, { inspected: i, cursor: a }) => {
525
- let u = Se(I.indexOf(i ?? ""));
527
+ let l = xe(N.indexOf(i ?? ""));
526
528
  function d(e) {
527
- let t = v.includes(e);
528
- return v.length > 0 && !t && i !== e;
529
+ let t = y.includes(e);
530
+ return y.length > 0 && !t && i !== e;
529
531
  }
530
- let p = U === void 0 || !I.includes(U.categoryId) ? [] : [{
532
+ let f = U === void 0 || !N.includes(U.categoryId) ? [] : [{
531
533
  id: `composition:${U.categoryId}`,
532
534
  text: U.label,
533
535
  x: Oe(U.categoryId),
534
- y: Ne(U.value),
536
+ y: Ae(U.value),
535
537
  isReceded: d(U.categoryId)
536
- }], ee = _.map((e) => {
538
+ }], h = v.map((e) => {
537
539
  let t = e.seriesId === void 0 ? {
538
540
  x: De(e.categoryId),
539
541
  width: K.bandwidth
540
- } : X(e.categoryId, e.seriesId);
542
+ } : J(e.categoryId, e.seriesId);
541
543
  return {
542
544
  id: e.id,
543
545
  text: e.label,
544
- x: t.x + t.width * it,
545
- y: Ne(Q(I.indexOf(e.categoryId), e.seriesId)),
546
+ x: t.x + t.width * st,
547
+ y: Ae(Y(N.indexOf(e.categoryId), e.seriesId)),
546
548
  isReceded: d(e.categoryId)
547
549
  };
548
- }), y = [...p, ...ee];
549
- return /* @__PURE__ */ J(at, {
550
- ...x,
550
+ }), b = [...f, ...h];
551
+ return /* @__PURE__ */ X(ct, {
552
+ ...ee,
551
553
  figure: n,
552
- legend: [...be, ...xe],
553
- layoutLegend: [...j(t), ...xe],
554
- notes: u.notes,
555
- inspectionId: D,
556
- label: u.label,
557
- titleDetail: u.category === void 0 ? void 0 : [u.category.axisLabel ?? u.category.label, u.summary].filter(Boolean).join(" · "),
558
- summary: u.summary,
559
- rows: u.rows,
554
+ legend: [...me, ...he],
555
+ layoutLegend: [...j(t), ...he],
556
+ notes: l.notes,
557
+ inspectionId: te,
558
+ label: l.label,
559
+ titleDetail: l.category === void 0 ? void 0 : [l.category.axisLabel ?? l.category.label, l.summary].filter(Boolean).join(" · "),
560
+ summary: l.summary,
561
+ rows: l.rows,
560
562
  x: Oe(i ?? ""),
561
- width: k,
562
- offset: K.bandwidth * it + rt,
563
- data: Pe,
564
- children: e.length === 0 || t.length === 0 && f === void 0 ? /* @__PURE__ */ J(se, { children: b }) : /* @__PURE__ */ Y(me, {
565
- plotRef: O,
563
+ width: O,
564
+ offset: K.bandwidth * st + ot,
565
+ data: je,
566
+ children: e.length === 0 || t.length === 0 && p === void 0 ? /* @__PURE__ */ X(le, { children: x }) : /* @__PURE__ */ Z(ge, {
567
+ plotRef: D,
566
568
  box: G,
567
- label: m({
568
- title: w,
569
+ label: g({
570
+ title: C,
569
571
  marks: "categories",
570
- isSelectable: l !== void 0
572
+ isSelectable: u !== void 0
571
573
  }),
572
- readoutId: D,
574
+ readoutId: te,
573
575
  children: [
574
- /* @__PURE__ */ J(ce, {
576
+ /* @__PURE__ */ X(ue, {
575
577
  box: G,
576
- xTicks: we.bandTicks,
577
- yTicks: we.valueTicks,
578
+ xTicks: Ce.bandTicks,
579
+ yTicks: Ce.valueTicks,
578
580
  yTitle: o
579
581
  }),
580
- /* @__PURE__ */ Y(ge, {
582
+ /* @__PURE__ */ Z(ve, {
581
583
  box: G,
582
584
  children: [
583
585
  e.map((e, n) => {
584
- let a = f?.buckets[n], o = {
586
+ let a = p?.buckets[n], o = {
585
587
  isSelected: c === e.id,
586
588
  isInspected: i === e.id
587
589
  };
588
590
  return a === void 0 ? t.map((i, a) => {
589
591
  let c = i.values[n];
590
592
  if (c == null || r === "stacked" && c === 0) return null;
591
- let l = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u = q(l), f = q(l + c), p = s != null && s !== i.id, m = X(e.id, i.id);
592
- return /* @__PURE__ */ J(V, {
593
+ let l = r === "stacked" ? t.slice(0, a).reduce((e, t) => e + (t.values[n] ?? 0), 0) : 0, u = q(l), f = q(l + c), p = s != null && s !== i.id, m = J(e.id, i.id);
594
+ return /* @__PURE__ */ X(H, {
593
595
  ...o,
594
596
  x: m.x,
595
597
  y: Math.min(u, f),
@@ -599,13 +601,13 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
599
601
  emphasis: p || d(e.id) ? "receded" : "normal",
600
602
  mark: t.length === 1 ? e.id : `${e.id}:${i.id}`
601
603
  }, `${e.id}:${i.id}`);
602
- }) : /* @__PURE__ */ J("g", {
603
- ...H.props(P.emphasis, d(e.id) && P.receded),
604
- children: /* @__PURE__ */ J(Xe, {
604
+ }) : /* @__PURE__ */ X("g", {
605
+ ...W.props(F.emphasis, d(e.id) && F.receded),
606
+ children: /* @__PURE__ */ X($e, {
605
607
  ...o,
606
608
  bucket: a,
607
609
  series: t,
608
- focusedSeries: T,
610
+ focusedSeries: w,
609
611
  index: n,
610
612
  x: De(e.id),
611
613
  width: K.bandwidth,
@@ -615,39 +617,39 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
615
617
  })
616
618
  }, e.id);
617
619
  }),
618
- /* @__PURE__ */ J(le, {
620
+ /* @__PURE__ */ X(B, {
619
621
  x1: G.left,
620
622
  x2: G.right,
621
623
  y1: q(0),
622
624
  y2: q(0)
623
625
  }),
624
- /* @__PURE__ */ J(Ge, {
625
- markers: g,
626
- categoryIds: I,
627
- span: X,
628
- barTop: Z,
626
+ /* @__PURE__ */ X(Je, {
627
+ markers: _,
628
+ categoryIds: N,
629
+ span: J,
630
+ barTop: ke,
629
631
  y: q,
630
632
  isReceded: d
631
633
  })
632
634
  ]
633
635
  }),
634
- /* @__PURE__ */ J(ve, {
635
- lines: h,
636
+ /* @__PURE__ */ X(be, {
637
+ lines: m,
636
638
  box: G,
637
639
  position: q,
638
- valueText: z,
639
- avoid: Re(y)
640
+ valueText: L,
641
+ avoid: Ve(b)
640
642
  }),
641
- /* @__PURE__ */ J(Ke, {
642
- annotations: y,
643
+ /* @__PURE__ */ X(Ye, {
644
+ annotations: b,
643
645
  left: G.left,
644
646
  right: G.right
645
647
  }),
646
- a !== null && /* @__PURE__ */ J(ne, {
648
+ a !== null && /* @__PURE__ */ X(ie, {
647
649
  x: Oe(a),
648
650
  top: G.top,
649
651
  bottom: G.bottom,
650
- width: Math.max(nt, K.bandwidth)
652
+ width: Math.max(at, K.bandwidth)
651
653
  })
652
654
  ]
653
655
  })
@@ -656,13 +658,13 @@ function dt({ categories: e, series: t, domain: n, mode: r = "grouped", valueFor
656
658
  });
657
659
  }
658
660
  // packages/charts/src/cartesian/breakdown-bar.tsx
659
- var ft = {
661
+ var ht = {
660
662
  kzqmXN: "x5lhr3w",
661
663
  kGVxlE: "x1iotiob",
662
664
  kZKoxP: "x5yr21d",
663
665
  $$css: !0
664
- }, pt = { segment: (e, t, n) => [
665
- ft,
666
+ }, gt = { segment: (e, t, n) => [
667
+ ht,
666
668
  {
667
669
  kWkggS: t == null ? t : "xl8spv7",
668
670
  $$css: !0
@@ -672,68 +674,68 @@ var ft = {
672
674
  "--x-backgroundColor": t ?? void 0,
673
675
  "--x-boxShadow": `inset 0 0 0 1px ${n}` == null ? void 0 : `inset 0 0 0 1px ${n}`
674
676
  }
675
- ] }, mt = 100;
676
- function ht({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange: o, ...s }) {
677
- let { emptyLabel: c = "No values", ...l } = s, { locale: u, title: d } = l, f = C();
678
- if (l.status === "loading") return /* @__PURE__ */ J(ie, {
679
- ...l,
677
+ ] }, _t = 100;
678
+ 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 = E();
680
+ if (u.status === "loading") return /* @__PURE__ */ X(M, {
681
+ ...u,
680
682
  height: "compact"
681
683
  });
682
- let p = y(e), m = e.reduce((e, t) => e + (t.value ?? 0), 0), h = 2 ** -52 * Math.max(m, t, 1) * e.length;
683
- if (p !== void 0) return /* @__PURE__ */ J(oe, {
684
- ...l,
685
- message: p
684
+ let m = ee(e), h = e.reduce((e, t) => e + (t.value ?? 0), 0), g = 2 ** -52 * Math.max(h, t, 1) * e.length;
685
+ if (m !== void 0) return /* @__PURE__ */ X(ce, {
686
+ ...u,
687
+ message: m
686
688
  });
687
- if (!Number.isFinite(t) || t < 0 || m - t > h) return /* @__PURE__ */ J(oe, {
688
- ...l,
689
+ if (!Number.isFinite(t) || t < 0 || h - t > g) return /* @__PURE__ */ X(ce, {
690
+ ...u,
689
691
  message: "The total must be finite and at least the sum of recorded values."
690
692
  });
691
- function g(e) {
692
- return te({
693
+ function _(e) {
694
+ return ne({
693
695
  value: e,
694
- locale: u,
696
+ locale: d,
695
697
  format: n
696
698
  });
697
699
  }
698
- let _ = e.map((e, t) => ({
700
+ let v = e.map((e, t) => ({
699
701
  id: e.id,
700
702
  label: e.label,
701
- valueLabel: g(e.value),
702
- tone: f({
703
+ valueLabel: _(e.value),
704
+ tone: p({
703
705
  id: e.id,
704
706
  tone: e.tone,
705
707
  index: t
706
708
  })
707
709
  }));
708
- return /* @__PURE__ */ J(ee, {
709
- items: b(_),
710
+ return /* @__PURE__ */ X(l, {
711
+ items: S(v),
710
712
  arrows: "both",
711
713
  selected: r ?? null,
712
- onSelect: o,
713
- render: (n, r) => /* @__PURE__ */ J(j, {
714
- ...l,
714
+ onSelect: i,
715
+ render: (n, r) => /* @__PURE__ */ X(se, {
716
+ ...u,
715
717
  figure: n,
716
- children: e.length === 0 ? /* @__PURE__ */ J(se, { children: c }) : /* @__PURE__ */ Y(Oe, { children: [
717
- /* @__PURE__ */ J("div", {
718
+ children: e.length === 0 ? /* @__PURE__ */ X(le, { children: c }) : /* @__PURE__ */ Z(Y, { children: [
719
+ /* @__PURE__ */ X("div", {
718
720
  "aria-hidden": !0,
719
721
  className: "x78zum5 x170jfvy xb3r6kr x1r7kqkb xmkeg23 x1y0btm7 x1ey3b81 x1jfksii",
720
722
  children: e.map((e, n) => {
721
- let r = _[n]?.tone ?? "neutral";
722
- return e.value === null ? null : /* @__PURE__ */ J("span", { ...H.props(pt.segment(t === 0 ? 0 : e.value / t * mt, a[r], i[r])) }, e.id);
723
+ let r = v[n]?.tone ?? "neutral";
724
+ return e.value === null ? null : /* @__PURE__ */ X("span", { ...W.props(gt.segment(t === 0 ? 0 : e.value / t * _t, o[r], a[r])) }, e.id);
723
725
  })
724
726
  }),
725
- /* @__PURE__ */ J(S, {
726
- title: d,
727
- items: _,
728
- view: o === void 0 ? void 0 : r
727
+ /* @__PURE__ */ X(w, {
728
+ title: f,
729
+ items: v,
730
+ view: i === void 0 ? void 0 : r
729
731
  }),
730
- t - m > h && /* @__PURE__ */ Y("p", {
732
+ t - h > g && /* @__PURE__ */ Z("p", {
731
733
  className: "x153jb6y x1ghz6dp xy8obcc",
732
734
  children: [
733
735
  "Unassigned portion: ",
734
- g(t - m),
736
+ _(t - h),
735
737
  " of ",
736
- g(t)
738
+ _(t)
737
739
  ]
738
740
  })
739
741
  ] })
@@ -741,15 +743,15 @@ function ht({ items: e, total: t, valueFormat: n, selected: r, onSelectedChange:
741
743
  });
742
744
  }
743
745
  // packages/charts/src/cartesian/bridge-data.ts
744
- function gt(e) {
746
+ function yt(e) {
745
747
  return e.kind !== "change" || e.value === null ? "neutral" : e.value < 0 ? "negative" : "positive";
746
748
  }
747
- function _t(e) {
749
+ function bt(e) {
748
750
  let t = e.map((e) => e.kind === "total" ? 0 : e.value);
749
751
  return e[0]?.kind !== "start" || t.includes(null) ? null : t.reduce((e, t) => e + (t ?? 0), 0);
750
752
  }
751
- function vt({ step: e, before: t, after: n }) {
752
- let r = e.tone ?? gt(e);
753
+ function xt({ step: e, before: t, after: n }) {
754
+ let r = e.tone ?? yt(e);
753
755
  switch (e.kind) {
754
756
  case "start": return {
755
757
  step: e,
@@ -771,56 +773,56 @@ function vt({ step: e, before: t, after: n }) {
771
773
  };
772
774
  }
773
775
  }
774
- function yt(e) {
775
- return e.map((t, n) => vt({
776
+ function St(e) {
777
+ return e.map((t, n) => xt({
776
778
  step: t,
777
- before: _t(e.slice(0, n)),
778
- after: _t(e.slice(0, n + 1))
779
+ before: bt(e.slice(0, n)),
780
+ after: bt(e.slice(0, n + 1))
779
781
  }));
780
782
  }
781
- function bt(e) {
783
+ function Ct(e) {
782
784
  let t = e.flatMap((e) => [e.from, e.to].filter((e) => e !== null)), n = Math.min(0, ...t), r = Math.max(0, ...t);
783
785
  return n === r ? [n, n + 1] : [n, r];
784
786
  }
785
- function xt({ steps: e, domain: t }) {
786
- if (e.length > x.items) return `Choose a bridge with at most ${x.items} steps.`;
787
- if (!o(e)) return "Bridge steps require unique identifiers.";
787
+ function wt({ steps: e, domain: t }) {
788
+ if (e.length > C.items) return `Choose a bridge with at most ${C.items} steps.`;
789
+ if (!u(e)) return "Bridge steps require unique identifiers.";
788
790
  if (e.length > 0 && e[0]?.kind !== "start") return "A bridge begins with one start step.";
789
791
  if (e.filter((e) => e.kind === "start").length > 1) return "A bridge has exactly one start step.";
790
792
  if (e.some((e) => {
791
793
  let t = e.kind === "total" ? null : e.value;
792
794
  return t !== null && !Number.isFinite(t);
793
795
  })) return "Bridge values must be finite numbers or explicit missing changes.";
794
- let n = bt(yt(e));
796
+ let n = Ct(St(e));
795
797
  if (t === void 0) return Number.isFinite(n[0]) && Number.isFinite(n[1]) ? void 0 : "Running totals must stay finite.";
796
798
  let r = t[0] <= n[0] && t[1] >= n[1];
797
- if (!D(t) || !r) return "The bridge domain must be finite, increasing, and contain zero and every running total.";
799
+ if (!k(t) || !r) return "The bridge domain must be finite, increasing, and contain zero and every running total.";
798
800
  }
799
801
  // packages/charts/src/cartesian/bridge-chart.tsx
800
- var St = 12, Ct = 6, wt = 14, Tt = 12, Et = 8, Dt = 8, Ot = .5;
801
- function kt(e) {
802
+ var Tt = 12, Et = 6, Dt = 14, Ot = 12, kt = 8, At = 8, jt = .5;
803
+ function Mt(e) {
802
804
  return typeof e == "function" ? (t) => t === 0 ? e(0) : `${t > 0 ? "+" : "−"}${e(Math.abs(t))}` : {
803
805
  ...e,
804
806
  signDisplay: "exceptZero"
805
807
  };
806
808
  }
807
- function At({ level: e, valueText: t, changeText: n }) {
809
+ function Nt({ level: e, valueText: t, changeText: n }) {
808
810
  return e.step.kind === "change" && e.step.value !== null ? n(e.step.value) : e.to === null ? "—" : t(e.to);
809
811
  }
810
- function jt({ level: e, valueText: t, changeText: n }) {
811
- return e.step.kind === "change" ? e.step.value === null ? T : n(e.step.value) : e.to === null ? T : t(e.to);
812
+ function Pt({ level: e, valueText: t, changeText: n }) {
813
+ return e.step.kind === "change" ? e.step.value === null ? D : n(e.step.value) : e.to === null ? D : t(e.to);
812
814
  }
813
- function Mt({ level: e, valueText: t }) {
814
- return e.from === null || e.to === null ? T : `${t(e.from)} → ${t(e.to)}`;
815
+ function Ft({ level: e, valueText: t }) {
816
+ return e.from === null || e.to === null ? D : `${t(e.from)} → ${t(e.to)}`;
815
817
  }
816
- function Nt(e, t, n) {
818
+ function It(e, t, n) {
817
819
  if (e.from === null || e.to === null) {
818
- let r = Math.min(n - Tt, t(e.from ?? 0) - Tt * Ot);
820
+ let r = Math.min(n - Ot, t(e.from ?? 0) - Ot * jt);
819
821
  return {
820
822
  isKnown: !1,
821
823
  top: r,
822
- height: Tt,
823
- labelY: r - Ct
824
+ height: Ot,
825
+ labelY: r - Et
824
826
  };
825
827
  }
826
828
  let r = Math.max(e.from, e.to), i = Math.min(e.from, e.to), a = t(r), o = r <= 0 && i < 0;
@@ -828,42 +830,42 @@ function Nt(e, t, n) {
828
830
  isKnown: !0,
829
831
  top: a,
830
832
  height: Math.max(1, t(i) - a),
831
- labelY: o ? t(i) + wt : a - Ct
833
+ labelY: o ? t(i) + Dt : a - Et
832
834
  };
833
835
  }
834
- function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r, valueLabel: i, domain: a, referenceLines: o = [], selected: s, onSelectedChange: c, height: l = "regular", ...d }) {
835
- let { emptyLabel: f = "No steps", ...h } = d, { locale: g, title: _ } = h, v = he(l), y = W();
836
- if (h.status === "loading") return /* @__PURE__ */ J(ie, {
837
- ...h,
838
- height: l
836
+ 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: _, title: v } = m, y = _e(u), b = we();
838
+ if (m.status === "loading") return /* @__PURE__ */ X(M, {
839
+ ...m,
840
+ height: u
839
841
  });
840
- let b = yt(e), x = bt(b), S = a ?? u({ values: [...x, ...o.map((e) => e.value)] }), C = xt({
842
+ let x = St(e), ee = Ct(x), S = a ?? f({ values: [...ee, ...o.map((e) => e.value)] }), C = wt({
841
843
  steps: e,
842
844
  domain: a
843
- }) ?? _e({
845
+ }) ?? ye({
844
846
  lines: o,
845
847
  domain: S
846
848
  });
847
- if (C !== void 0) return /* @__PURE__ */ J(oe, {
848
- ...h,
849
+ if (C !== void 0) return /* @__PURE__ */ X(ce, {
850
+ ...m,
849
851
  message: C
850
852
  });
851
853
  function w(e) {
852
- return (t) => te({
854
+ return (t) => ne({
853
855
  value: t,
854
- locale: g,
856
+ locale: _,
855
857
  format: e
856
858
  });
857
859
  }
858
- let T = w(t), E = w(n), D = o.map((e) => ({
860
+ let T = w(t), E = w(n), te = o.map((e) => ({
859
861
  id: e.id,
860
862
  label: e.label,
861
863
  tone: e.tone ?? "neutral",
862
864
  shape: "dashed",
863
865
  value: T(e.value)
864
866
  }));
865
- function O(e) {
866
- let t = b.find((t) => t.step.id === e);
867
+ function D(e) {
868
+ let t = x.find((t) => t.step.id === e);
867
869
  if (t === void 0) return {
868
870
  level: t,
869
871
  label: void 0,
@@ -874,7 +876,7 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
874
876
  id: "running",
875
877
  label: "Running total",
876
878
  tone: "neutral",
877
- value: Mt({
879
+ value: Ft({
878
880
  level: t,
879
881
  valueText: T
880
882
  })
@@ -882,19 +884,19 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
882
884
  return {
883
885
  level: t,
884
886
  label: t.step.label,
885
- summary: jt({
887
+ summary: Pt({
886
888
  level: t,
887
889
  valueText: T,
888
890
  changeText: E
889
891
  }),
890
- rows: [...n, ...D]
892
+ rows: [...n, ...te]
891
893
  };
892
894
  }
893
- let k = p({
894
- width: v.width,
895
- height: v.height,
895
+ let O = h({
896
+ width: y.width,
897
+ height: y.height,
896
898
  direction: "columns",
897
- categories: b.map((e) => ({
899
+ categories: x.map((e) => ({
898
900
  id: e.step.id,
899
901
  label: e.step.axisLabel ?? e.step.label
900
902
  })),
@@ -904,45 +906,45 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
904
906
  tickFormat: r
905
907
  },
906
908
  valueDomain: S,
907
- locale: g,
908
- topInset: St,
909
+ locale: _,
910
+ topInset: Tt,
909
911
  hasValueTitle: i !== void 0
910
- }), { box: A, band: N } = k, P = k.value.position, F = b.map((e) => ({
912
+ }), { box: k, band: A } = O, j = O.value.position, re = x.map((e) => ({
911
913
  id: e.step.id,
912
914
  label: e.step.label
913
915
  }));
914
- function I(e) {
915
- return N.start(e) ?? A.left;
916
+ function P(e) {
917
+ return A.start(e) ?? k.left;
916
918
  }
917
- function R(e) {
918
- return I(e) + N.bandwidth * Ot;
919
+ function F(e) {
920
+ return P(e) + A.bandwidth * jt;
919
921
  }
920
- let ue = Re([...b.filter((e) => e.step.kind !== "change"), ...b.filter((e) => e.step.kind === "change")].map((e) => ({
922
+ let I = Ve([...x.filter((e) => e.step.kind !== "change"), ...x.filter((e) => e.step.kind === "change")].map((e) => ({
921
923
  id: e.step.id,
922
924
  isTotal: e.step.kind !== "change",
923
- text: At({
925
+ text: Nt({
924
926
  level: e,
925
927
  valueText: T,
926
928
  changeText: E
927
929
  }),
928
- x: R(e.step.id),
929
- y: Nt(e, P, A.bottom).labelY
930
+ x: F(e.step.id),
931
+ y: It(e, j, k.bottom).labelY
930
932
  })));
931
- return /* @__PURE__ */ J(ee, {
932
- items: F,
933
- readout: (e) => re(O(e)),
934
- locate: (e) => N.idAt(e.x / e.width * A.width),
933
+ return /* @__PURE__ */ X(l, {
934
+ items: re,
935
+ readout: (e) => ae(D(e)),
936
+ locate: (e) => A.idAt(e.x / e.width * k.width),
935
937
  selected: s ?? null,
936
938
  onSelect: c,
937
939
  render: (e, { inspected: t, cursor: n }) => {
938
- let r = O(t);
939
- return /* @__PURE__ */ Y(j, {
940
- ...h,
940
+ let r = D(t);
941
+ return /* @__PURE__ */ Z(se, {
942
+ ...m,
941
943
  figure: e,
942
944
  titleDetail: r.level === void 0 ? void 0 : `${r.label} · ${r.summary}`,
943
945
  children: [
944
- /* @__PURE__ */ J(ae, {
945
- label: `${_} steps`,
946
+ /* @__PURE__ */ X(oe, {
947
+ label: `${v} steps`,
946
948
  columns: [
947
949
  {
948
950
  id: "step",
@@ -957,19 +959,19 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
957
959
  label: "Running total"
958
960
  }
959
961
  ],
960
- rows: [...b.map((e) => ({
962
+ rows: [...x.map((e) => ({
961
963
  id: e.step.id,
962
964
  values: [
963
965
  e.step.label,
964
- jt({
966
+ Pt({
965
967
  level: e,
966
968
  valueText: T,
967
969
  changeText: E
968
970
  }),
969
- e.step.kind === "change" ? Mt({
971
+ e.step.kind === "change" ? Ft({
970
972
  level: e,
971
973
  valueText: T
972
- }) : jt({
974
+ }) : Pt({
973
975
  level: e,
974
976
  valueText: T,
975
977
  changeText: E
@@ -984,51 +986,51 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
984
986
  ]
985
987
  }))]
986
988
  }),
987
- /* @__PURE__ */ J(M, {
988
- id: y,
989
+ /* @__PURE__ */ X(N, {
990
+ id: b,
989
991
  label: r.label,
990
992
  summary: r.summary,
991
993
  legend: [],
992
994
  hasLegend: !1,
993
995
  rows: r.rows,
994
- x: R(t ?? ""),
995
- width: v.width,
996
- offset: N.bandwidth * Ot + Dt
996
+ x: F(t ?? ""),
997
+ width: y.width,
998
+ offset: A.bandwidth * jt + At
997
999
  }),
998
- b.length === 0 ? /* @__PURE__ */ J(se, { children: f }) : /* @__PURE__ */ Y(me, {
999
- plotRef: v.ref,
1000
- box: A,
1001
- label: m({
1002
- title: _,
1000
+ x.length === 0 ? /* @__PURE__ */ X(le, { children: p }) : /* @__PURE__ */ Z(ge, {
1001
+ plotRef: y.ref,
1002
+ box: k,
1003
+ label: g({
1004
+ title: v,
1003
1005
  marks: "steps",
1004
1006
  isSelectable: c !== void 0
1005
1007
  }),
1006
- readoutId: y,
1008
+ readoutId: b,
1007
1009
  children: [
1008
- /* @__PURE__ */ J(ce, {
1009
- box: A,
1010
- xTicks: k.bandTicks,
1011
- yTicks: k.valueTicks,
1010
+ /* @__PURE__ */ X(ue, {
1011
+ box: k,
1012
+ xTicks: O.bandTicks,
1013
+ yTicks: O.valueTicks,
1012
1014
  yTitle: i
1013
1015
  }),
1014
- /* @__PURE__ */ Y(ge, {
1015
- box: A,
1016
+ /* @__PURE__ */ Z(ve, {
1017
+ box: k,
1016
1018
  children: [
1017
- b.map((e, t) => {
1018
- let n = b[t + 1];
1019
- return n === void 0 || e.to === null || n.from === null ? null : /* @__PURE__ */ J(z, {
1020
- x1: I(e.step.id) + N.bandwidth,
1021
- x2: I(n.step.id),
1022
- y1: P(e.to),
1023
- y2: P(e.to)
1019
+ x.map((e, t) => {
1020
+ let n = x[t + 1];
1021
+ return n === void 0 || e.to === null || n.from === null ? null : /* @__PURE__ */ X(de, {
1022
+ x1: P(e.step.id) + A.bandwidth,
1023
+ x2: P(n.step.id),
1024
+ y1: j(e.to),
1025
+ y2: j(e.to)
1024
1026
  }, `connector:${e.step.id}`);
1025
1027
  }),
1026
- b.map((e) => {
1027
- let n = Nt(e, P, A.bottom);
1028
- return /* @__PURE__ */ J(V, {
1029
- x: I(e.step.id),
1028
+ x.map((e) => {
1029
+ let n = It(e, j, k.bottom);
1030
+ return /* @__PURE__ */ X(H, {
1031
+ x: P(e.step.id),
1030
1032
  y: n.top,
1031
- width: N.bandwidth,
1033
+ width: A.bandwidth,
1032
1034
  height: n.height,
1033
1035
  tone: n.isKnown ? e.tone : "neutral",
1034
1036
  isHollow: !n.isKnown,
@@ -1036,33 +1038,33 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1036
1038
  isInspected: t === e.step.id
1037
1039
  }, e.step.id);
1038
1040
  }),
1039
- /* @__PURE__ */ J(le, {
1040
- x1: A.left,
1041
- x2: A.right,
1042
- y1: P(0),
1043
- y2: P(0)
1041
+ /* @__PURE__ */ X(B, {
1042
+ x1: k.left,
1043
+ x2: k.right,
1044
+ y1: j(0),
1045
+ y2: j(0)
1044
1046
  })
1045
1047
  ]
1046
1048
  }),
1047
- /* @__PURE__ */ J(ve, {
1049
+ /* @__PURE__ */ X(be, {
1048
1050
  lines: o,
1049
- box: A,
1050
- position: P,
1051
+ box: k,
1052
+ position: j,
1051
1053
  valueText: T,
1052
- avoid: ue,
1053
- marks: b.map((e) => {
1054
- let t = Nt(e, P, A.bottom);
1054
+ avoid: I,
1055
+ marks: x.map((e) => {
1056
+ let t = It(e, j, k.bottom);
1055
1057
  return {
1056
- left: I(e.step.id),
1057
- right: I(e.step.id) + N.bandwidth,
1058
+ left: P(e.step.id),
1059
+ right: P(e.step.id) + A.bandwidth,
1058
1060
  top: t.top,
1059
1061
  bottom: t.top + t.height
1060
1062
  };
1061
1063
  })
1062
1064
  }),
1063
- /* @__PURE__ */ J("g", {
1065
+ /* @__PURE__ */ X("g", {
1064
1066
  "aria-hidden": !0,
1065
- children: ue.map((e) => /* @__PURE__ */ J(L, {
1067
+ children: I.map((e) => /* @__PURE__ */ X(R, {
1066
1068
  x: e.x,
1067
1069
  y: e.y,
1068
1070
  anchor: "middle",
@@ -1070,11 +1072,11 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1070
1072
  children: e.text
1071
1073
  }, e.id))
1072
1074
  }),
1073
- n !== null && /* @__PURE__ */ J(ne, {
1074
- x: R(n),
1075
- top: A.top,
1076
- bottom: A.bottom,
1077
- width: Math.max(Et, N.bandwidth)
1075
+ n !== null && /* @__PURE__ */ X(ie, {
1076
+ x: F(n),
1077
+ top: k.top,
1078
+ bottom: k.bottom,
1079
+ width: Math.max(kt, A.bandwidth)
1078
1080
  })
1079
1081
  ]
1080
1082
  })
@@ -1084,7 +1086,7 @@ function Pt({ steps: e, valueFormat: t, changeFormat: n = kt(t), tickFormat: r,
1084
1086
  });
1085
1087
  }
1086
1088
  // packages/charts/src/cartesian/scatter-plot.tsx
1087
- var Ft = { points: 1e3 }, It = {
1089
+ var Rt = { points: 1e3 }, zt = {
1088
1090
  target: {
1089
1091
  kVAEAm: "x10l6tqk",
1090
1092
  k1xSpc: "xrvj5dj",
@@ -1123,212 +1125,250 @@ var Ft = { points: 1e3 }, It = {
1123
1125
  $$css: !0
1124
1126
  }
1125
1127
  };
1126
- function Lt(e, t) {
1128
+ function Bt(e, t) {
1127
1129
  return !e.every(Number.isFinite) || e[0] > e[1] ? !1 : e[0] >= t[0] && e[1] <= t[1];
1128
1130
  }
1129
- function Rt(e, t) {
1131
+ function Vt(e, t) {
1130
1132
  return Number.isFinite(e) && e > 0 && e <= t[1] - t[0];
1131
1133
  }
1132
- function zt({ points: e, x: t, y: n, xDomain: r, yDomain: i, range: a, onRangeChange: s, rangeStep: c }) {
1133
- let l = O(r, t.scale) ?? O(i, n.scale);
1134
- if (l !== void 0) return l;
1135
- if (e.length > Ft.points) return `This plot exceeds the ${Ft.points}-point render limit. Supply a smaller, labelled sample.`;
1136
- if (!o(e)) return "Scatter points must have unique identifiers.";
1134
+ function Ht({ points: e, x: t, y: n, xDomain: r, yDomain: i, range: a, onRangeChange: o, rangeStep: s }) {
1135
+ let c = A(r, t.scale) ?? A(i, n.scale);
1136
+ if (c !== void 0) return c;
1137
+ if (e.length > Rt.points) return `This plot exceeds the ${Rt.points}-point render limit. Supply a smaller, labelled sample.`;
1138
+ if (!u(e)) return "Scatter points must have unique identifiers.";
1137
1139
  if (e.some((e) => !Number.isFinite(e.x) || !Number.isFinite(e.y))) return "Scatter coordinates must be finite.";
1138
- if (e.some((e) => E(e.x, r) || E(e.y, i))) return "Scatter coordinates fall outside the declared domain. Widen the domain or supply a labelled window of points.";
1139
- if (s !== void 0) {
1140
- if (c === void 0 || !Rt(c.x, r) || !Rt(c.y, i)) return "Range selection steps must be finite, positive, and no larger than their domain span.";
1141
- if (a != null && (!Lt(a.x, r) || !Lt(a.y, i))) return "The selected range must have finite, ordered bounds inside the declared domain.";
1140
+ if (e.some((e) => O(e.x, r) || O(e.y, i))) return "Scatter coordinates fall outside the declared domain. Widen the domain or supply a labelled window of points.";
1141
+ if (o !== void 0) {
1142
+ 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
+ if (a != null && (!Bt(a.x, r) || !Bt(a.y, i))) return "The selected range must have finite, ordered bounds inside the declared domain.";
1142
1144
  }
1143
1145
  }
1144
- function Bt(e, t) {
1146
+ function Ut(e, t) {
1145
1147
  return [Math.min(e, t), Math.max(e, t)];
1146
1148
  }
1147
- function Vt(e) {
1148
- let { points: t, x: n, y: r, range: i, onRangeChange: a, rangeStep: o, selected: d, onSelectedChange: f, height: p = "regular", ...h } = e, { emptyLabel: v = "No points were supplied.", ...y } = h, { locale: b, title: x } = y, S = W(), w = he(p), T = C(), [E, D] = G(null), O = we(null);
1149
- if (Ce(() => () => O.current?.(), []), y.status === "loading") return /* @__PURE__ */ J(ie, {
1150
- ...y,
1151
- height: p
1149
+ 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: _, onSelectedChange: b, height: x = "regular", ...ee } = e, { emptyLabel: S = "No points were supplied.", ...C } = ee, { locale: w, title: te } = C, D = we(), O = _e(x), k = E(), A = T(), [j, re] = Te(null), ie = q(null);
1151
+ if (K(() => () => ie.current?.(), []), C.status === "loading") return /* @__PURE__ */ X(M, {
1152
+ ...C,
1153
+ height: x
1152
1154
  });
1153
- let k = n.domain ?? u({
1155
+ let ae = n.domain ?? f({
1154
1156
  values: t.map((e) => e.x),
1155
1157
  scale: n.scale
1156
- }), A = r.domain ?? u({
1158
+ }), N = r.domain ?? f({
1157
1159
  values: t.map((e) => e.y),
1158
1160
  scale: r.scale
1159
- }), ne = zt({
1161
+ }), P = Ht({
1160
1162
  points: t,
1161
1163
  x: n,
1162
1164
  y: r,
1163
- xDomain: k,
1164
- yDomain: A,
1165
- range: i,
1166
- onRangeChange: a,
1167
- rangeStep: o
1168
- }), re = i ?? null;
1169
- if (ne !== void 0) return /* @__PURE__ */ J(oe, {
1170
- ...y,
1171
- message: ne
1165
+ xDomain: ae,
1166
+ yDomain: N,
1167
+ range: p,
1168
+ onRangeChange: m,
1169
+ rangeStep: h
1170
+ }) ?? (a.length > 0 ? ye({
1171
+ lines: a,
1172
+ domain: N
1173
+ }) : void 0), I = p ?? null;
1174
+ if (P !== void 0) return /* @__PURE__ */ X(ce, {
1175
+ ...C,
1176
+ message: P
1172
1177
  });
1173
- let M = _({
1174
- width: w.width,
1175
- height: w.height,
1178
+ let z = y({
1179
+ width: O.width,
1180
+ height: O.height,
1176
1181
  x: n,
1177
1182
  y: r,
1178
- xDomain: k,
1179
- yDomain: A,
1180
- locale: b
1181
- }), { box: N } = M;
1182
- function F(e) {
1183
- return te({
1183
+ xDomain: ae,
1184
+ yDomain: N,
1185
+ locale: w
1186
+ }), { box: B } = z;
1187
+ function de(e) {
1188
+ return ne({
1184
1189
  value: e,
1185
- locale: b,
1190
+ locale: w,
1186
1191
  format: n.format
1187
1192
  });
1188
1193
  }
1189
- function L(e) {
1190
- return te({
1194
+ function V(e) {
1195
+ return ne({
1191
1196
  value: e,
1192
- locale: b,
1197
+ locale: w,
1193
1198
  format: r.format
1194
1199
  });
1195
1200
  }
1196
- let R = t.map((e) => ({
1201
+ let pe = t.map((e) => ({
1197
1202
  id: e.id,
1198
- label: `${e.label}, ${n.label}: ${F(e.x)}, ${r.label}: ${L(e.y)}`
1199
- })), le = t.map((e, t) => ({
1203
+ label: `${e.label}, ${n.label}: ${de(e.x)}, ${r.label}: ${V(e.y)}`
1204
+ })), H = t.map((e, t) => ({
1200
1205
  ...e,
1201
- tone: T({
1206
+ tone: k({
1202
1207
  id: e.id,
1203
1208
  tone: e.tone,
1204
1209
  index: t
1205
1210
  }),
1206
- left: M.x.position(e.x),
1207
- top: M.y.position(e.y)
1208
- })), z = new Map(le.map((e) => [e.id, {
1211
+ left: z.x.position(e.x),
1212
+ top: z.y.position(e.y)
1213
+ })), me = new Map(H.map((e) => [e.id, {
1209
1214
  left: e.left,
1210
1215
  top: e.top,
1211
1216
  right: e.left,
1212
1217
  bottom: e.top
1213
- }])), ue = E === null ? i : {
1214
- x: Bt(E.start.x, E.end.x),
1215
- y: Bt(E.start.y, E.end.y)
1218
+ }])), he = j === null ? p : {
1219
+ x: Ut(j.start.x, j.end.x),
1220
+ y: Ut(j.start.y, j.end.y)
1216
1221
  };
1217
- function B(e, t, n) {
1218
- let r = e.getBoundingClientRect(), i = (t - r.left) / r.width * N.width, a = (n - r.top) / r.height * N.height;
1222
+ function xe(e, t, n) {
1223
+ let r = e.getBoundingClientRect(), i = (t - r.left) / r.width * B.width, a = (n - r.top) / r.height * B.height;
1219
1224
  return {
1220
- x: M.x.valueAt(Math.min(N.right, Math.max(N.left, i))),
1221
- y: M.y.valueAt(Math.min(N.bottom, Math.max(N.top, a)))
1225
+ x: z.x.valueAt(Math.min(B.right, Math.max(B.left, i))),
1226
+ y: z.y.valueAt(Math.min(B.bottom, Math.max(B.top, a)))
1222
1227
  };
1223
1228
  }
1224
- function de(t) {
1225
- let n = t.button === 0 && t.pointerType !== "touch", r = t.currentTarget, i = r.parentElement, o = t.target instanceof Element && t.target.closest("[data-brush]") !== null, s = n && o;
1226
- if (a === void 0 || O.current !== null || !s || i === null) return;
1227
- let c = B(r, t.clientX, t.clientY);
1228
- D({
1229
- start: c,
1230
- end: c
1231
- }), O.current = K(i, t.nativeEvent, {
1229
+ function Se(t) {
1230
+ 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 || ie.current !== null || !o || i === null) return;
1232
+ let s = xe(r, t.clientX, t.clientY);
1233
+ re({
1234
+ start: s,
1235
+ end: s
1236
+ }), ie.current = Ee(i, t.nativeEvent, {
1232
1237
  cancelOnEscape: !0,
1233
- onMove: ({ x: e, y: t }) => D({
1234
- start: c,
1235
- end: B(r, e, t)
1238
+ onMove: ({ x: e, y: t }) => re({
1239
+ start: s,
1240
+ end: xe(r, e, t)
1236
1241
  }),
1237
1242
  onEnd: (t, n) => {
1238
- if (O.current = null, D(null), n) return;
1239
- let i = B(r, t.clientX, t.clientY), a = {
1240
- x: Bt(c.x, i.x),
1241
- y: Bt(c.y, i.y)
1243
+ if (ie.current = null, re(null), n) return;
1244
+ let i = xe(r, t.clientX, t.clientY), a = {
1245
+ x: Ut(s.x, i.x),
1246
+ y: Ut(s.y, i.y)
1242
1247
  };
1243
- De({ options: () => e }, "onRangeChange", a, {
1248
+ ke({ options: () => e }, "onRangeChange", a, {
1244
1249
  reason: "drag",
1245
1250
  event: t
1246
1251
  });
1247
1252
  }
1248
1253
  });
1249
1254
  }
1250
- return /* @__PURE__ */ J(ee, {
1251
- items: R,
1252
- place: (e) => z.get(e),
1253
- selected: d ?? null,
1254
- onSelect: f,
1255
- render: (e, { inspected: i, cursor: u }) => /* @__PURE__ */ Y(j, {
1256
- ...y,
1255
+ let Ce = new Map(H.map((e) => [e.id, e])), G = o.map((e) => Ce.get(e)).filter((e) => e !== void 0), De = G.length >= 2 ? U(G.map((e) => ({
1256
+ x: e.left,
1257
+ y: e.top
1258
+ }))) : "", Oe = new Set(u), J = i === !0 ? { label: "y = x" } : i === !1 || i === void 0 ? null : i, Y = Math.max(ae[0], N[0]), Q = Math.min(ae[1], N[1]), Ae = J !== null && Q > Y;
1259
+ return /* @__PURE__ */ X(l, {
1260
+ ...A,
1261
+ items: pe,
1262
+ place: (e) => me.get(e),
1263
+ selected: _ ?? null,
1264
+ onSelect: b,
1265
+ render: (e, { inspected: i, cursor: o }) => /* @__PURE__ */ Z(se, {
1266
+ ...C,
1257
1267
  figure: e,
1258
- footer: /* @__PURE__ */ J(c, {
1259
- id: S,
1260
- children: s(R, i)
1268
+ footer: /* @__PURE__ */ X(d, {
1269
+ id: D,
1270
+ children: s(pe, i)
1261
1271
  }),
1262
1272
  children: [
1263
- t.length === 0 ? /* @__PURE__ */ J(se, { children: v }) : /* @__PURE__ */ Y(me, {
1264
- plotRef: w.ref,
1265
- box: N,
1266
- label: m({
1267
- title: x,
1268
- isSelectable: f !== void 0
1273
+ t.length === 0 ? /* @__PURE__ */ X(le, { children: S }) : /* @__PURE__ */ Z(ge, {
1274
+ plotRef: O.ref,
1275
+ box: B,
1276
+ label: g({
1277
+ title: te,
1278
+ isSelectable: b !== void 0
1269
1279
  }),
1270
- readoutId: S,
1271
- onPointerDown: de,
1272
- overlay: le.map((e, t) => /* @__PURE__ */ J(l, {
1280
+ readoutId: D,
1281
+ onPointerDown: Se,
1282
+ overlay: H.map((e, t) => /* @__PURE__ */ X(c, {
1273
1283
  value: e.id,
1274
- render: /* @__PURE__ */ J("button", {
1284
+ render: /* @__PURE__ */ X("button", {
1275
1285
  type: "button",
1276
1286
  tabIndex: -1,
1277
1287
  title: e.label,
1278
- "aria-label": R[t]?.label,
1279
- "aria-pressed": f === void 0 ? void 0 : d === e.id
1288
+ "aria-label": pe[t]?.label,
1289
+ "aria-pressed": b === void 0 ? void 0 : _ === e.id
1280
1290
  }),
1281
- ...H.props(It.target, It.location(e.left, e.top)),
1282
- children: /* @__PURE__ */ J("span", {
1291
+ ...W.props(zt.target, zt.location(e.left, e.top)),
1292
+ children: /* @__PURE__ */ X("span", {
1283
1293
  "aria-hidden": !0,
1284
- ...H.props(It.ring, u === e.id && P.cursor)
1294
+ ...W.props(zt.ring, o === e.id && F.cursor)
1285
1295
  })
1286
1296
  }, e.id)),
1287
1297
  children: [
1288
- /* @__PURE__ */ J(ce, {
1289
- box: N,
1290
- xTicks: M.xTicks,
1291
- yTicks: M.yTicks,
1292
- xTitle: g(n),
1293
- yTitle: g(r),
1298
+ /* @__PURE__ */ X(ue, {
1299
+ box: B,
1300
+ xTicks: z.xTicks,
1301
+ yTicks: z.yTicks,
1302
+ xTitle: v(n),
1303
+ yTitle: v(r),
1294
1304
  grid: "both"
1295
1305
  }),
1296
- a !== void 0 && /* @__PURE__ */ J("rect", {
1306
+ m !== void 0 && /* @__PURE__ */ X("rect", {
1297
1307
  "data-brush": "",
1298
- x: N.left,
1299
- y: N.top,
1300
- width: N.innerWidth,
1301
- height: N.innerHeight,
1308
+ x: B.left,
1309
+ y: B.top,
1310
+ width: B.innerWidth,
1311
+ height: B.innerHeight,
1302
1312
  className: "xsid9ct xy6m8k3"
1303
1313
  }),
1304
- /* @__PURE__ */ Y(ge, {
1305
- box: N,
1306
- children: [ue != null && /* @__PURE__ */ J(Ht, {
1307
- range: ue,
1308
- plot: M
1309
- }), le.map((e) => /* @__PURE__ */ J(I, {
1310
- mark: e.id,
1311
- x: e.left,
1312
- y: e.top,
1313
- tone: e.tone,
1314
- isInspected: i === e.id,
1315
- isSelected: d === e.id
1316
- }, e.id))]
1314
+ /* @__PURE__ */ Z(ve, {
1315
+ box: B,
1316
+ pad: 6,
1317
+ children: [
1318
+ Ae && /* @__PURE__ */ X(Gt, {
1319
+ spec: J,
1320
+ low: Y,
1321
+ high: Q,
1322
+ plot: z
1323
+ }),
1324
+ a.length > 0 && /* @__PURE__ */ X(be, {
1325
+ lines: a,
1326
+ box: B,
1327
+ position: z.y.position,
1328
+ valueText: V
1329
+ }),
1330
+ De !== "" && /* @__PURE__ */ X(fe, {
1331
+ d: De,
1332
+ tone: "series1",
1333
+ stroke: "dashed"
1334
+ }),
1335
+ he != null && /* @__PURE__ */ X(Kt, {
1336
+ range: he,
1337
+ plot: z
1338
+ }),
1339
+ H.map((e) => /* @__PURE__ */ X(L, {
1340
+ mark: e.id,
1341
+ x: e.left,
1342
+ y: e.top,
1343
+ tone: e.tone,
1344
+ isInspected: i === e.id,
1345
+ isSelected: _ === e.id
1346
+ }, e.id)),
1347
+ H.filter((e) => Oe.has(e.id)).map((e) => {
1348
+ let t = e.left > B.right - 90, n = e.top < B.top + 18;
1349
+ return /* @__PURE__ */ X(R, {
1350
+ x: e.left + (t ? -8 : 8),
1351
+ y: e.top + (n ? 14 : -6),
1352
+ anchor: t ? "end" : "start",
1353
+ children: e.label
1354
+ }, `label-${e.id}`);
1355
+ })
1356
+ ]
1317
1357
  })
1318
1358
  ]
1319
1359
  }),
1320
- a !== void 0 && o !== void 0 && /* @__PURE__ */ J(Wt, {
1360
+ m !== void 0 && h !== void 0 && /* @__PURE__ */ X(Jt, {
1321
1361
  x: n,
1322
1362
  y: r,
1323
- xDomain: k,
1324
- yDomain: A,
1325
- range: re,
1326
- rangeStep: o,
1327
- locale: b,
1328
- onRangeChange: a
1363
+ xDomain: ae,
1364
+ yDomain: N,
1365
+ range: I,
1366
+ rangeStep: h,
1367
+ locale: w,
1368
+ onRangeChange: m
1329
1369
  }),
1330
- /* @__PURE__ */ J(ae, {
1331
- label: `${x} points`,
1370
+ /* @__PURE__ */ X(oe, {
1371
+ label: `${te} points`,
1332
1372
  columns: [
1333
1373
  {
1334
1374
  id: "point",
@@ -1347,8 +1387,8 @@ function Vt(e) {
1347
1387
  id: e.id,
1348
1388
  values: [
1349
1389
  e.label,
1350
- F(e.x),
1351
- L(e.y)
1390
+ de(e.x),
1391
+ V(e.y)
1352
1392
  ]
1353
1393
  }))
1354
1394
  })
@@ -1356,9 +1396,40 @@ function Vt(e) {
1356
1396
  })
1357
1397
  });
1358
1398
  }
1359
- function Ht({ range: e, plot: t }) {
1399
+ function Gt({ spec: e, low: t, high: n, plot: r }) {
1400
+ let { box: i } = r, a = r.x.position(n), o = r.y.position(n);
1401
+ return /* @__PURE__ */ Z("g", { children: [
1402
+ /* @__PURE__ */ X("line", {
1403
+ x1: r.x.position(t),
1404
+ y1: r.y.position(t),
1405
+ x2: a,
1406
+ y2: o,
1407
+ className: "xhq4mlf xnpr05h xlz5em3 x47corl x13efnbd"
1408
+ }),
1409
+ e.label !== void 0 && /* @__PURE__ */ X(R, {
1410
+ x: a - 6,
1411
+ y: o + 14,
1412
+ anchor: "end",
1413
+ children: e.label
1414
+ }),
1415
+ e.aboveLabel !== void 0 && /* @__PURE__ */ X("text", {
1416
+ x: i.left + 8,
1417
+ y: i.top + 14,
1418
+ className: "x1q7gtio x1hz01jw xy8obcc x47corl",
1419
+ children: e.aboveLabel
1420
+ }),
1421
+ e.belowLabel !== void 0 && /* @__PURE__ */ X("text", {
1422
+ x: i.right - 8,
1423
+ y: i.bottom - 8,
1424
+ textAnchor: "end",
1425
+ className: "x1q7gtio x1hz01jw xy8obcc x47corl",
1426
+ children: e.belowLabel
1427
+ })
1428
+ ] });
1429
+ }
1430
+ function Kt({ range: e, plot: t }) {
1360
1431
  let n = t.x.position(e.x[0]), r = t.y.position(e.y[1]);
1361
- return /* @__PURE__ */ J("rect", {
1432
+ return /* @__PURE__ */ X("rect", {
1362
1433
  x: n,
1363
1434
  y: r,
1364
1435
  width: t.x.position(e.x[1]) - n,
@@ -1366,56 +1437,56 @@ function Ht({ range: e, plot: t }) {
1366
1437
  className: "x1e0kj8g xv7c1pl x1tg5nk6 xnpr05h x15lqr97 x47corl"
1367
1438
  });
1368
1439
  }
1369
- function Ut({ axis: e, domain: n, value: r, step: i, locale: a, onChange: o }) {
1440
+ function qt({ axis: e, domain: t, value: r, step: i, locale: a, onChange: o }) {
1370
1441
  function s(t) {
1371
- return te({
1442
+ return ne({
1372
1443
  value: t,
1373
1444
  locale: a,
1374
1445
  format: e.format
1375
1446
  });
1376
1447
  }
1377
- return /* @__PURE__ */ Y(t.Root, {
1448
+ return /* @__PURE__ */ Z(n.Root, {
1378
1449
  value: [...r],
1379
1450
  format: e.format,
1380
- min: n[0],
1381
- max: n[1],
1451
+ min: t[0],
1452
+ max: t[1],
1382
1453
  step: i,
1383
1454
  locale: a,
1384
1455
  onValueChange: (e, t) => o(e, t),
1385
- children: [/* @__PURE__ */ Y("div", {
1456
+ children: [/* @__PURE__ */ Z("div", {
1386
1457
  className: "x78zum5 x1a02dak x1qughib x1hnptsi x153jb6y xy8obcc xj0a0fe",
1387
- children: [/* @__PURE__ */ J(t.Label, { children: e.label }), /* @__PURE__ */ Y("span", { children: [
1458
+ children: [/* @__PURE__ */ X(n.Label, { children: e.label }), /* @__PURE__ */ Z("span", { children: [
1388
1459
  s(r[0]),
1389
1460
  " – ",
1390
1461
  s(r[1])
1391
1462
  ] })]
1392
- }), /* @__PURE__ */ J(t.Control, { children: /* @__PURE__ */ Y(t.Track, { children: [
1393
- /* @__PURE__ */ J(t.Indicator, {}),
1394
- /* @__PURE__ */ J(t.Thumb, {
1463
+ }), /* @__PURE__ */ X(n.Control, { children: /* @__PURE__ */ Z(n.Track, { children: [
1464
+ /* @__PURE__ */ X(n.Indicator, {}),
1465
+ /* @__PURE__ */ X(n.Thumb, {
1395
1466
  index: 0,
1396
1467
  "aria-label": `${e.label} minimum`
1397
1468
  }),
1398
- /* @__PURE__ */ J(t.Thumb, {
1469
+ /* @__PURE__ */ X(n.Thumb, {
1399
1470
  index: 1,
1400
1471
  "aria-label": `${e.label} maximum`
1401
1472
  })
1402
1473
  ] }) })]
1403
1474
  });
1404
1475
  }
1405
- function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale: s, onRangeChange: c }) {
1476
+ function Jt({ x: e, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale: s, onRangeChange: c }) {
1406
1477
  let l = a ?? {
1407
1478
  x: r,
1408
1479
  y: i
1409
1480
  };
1410
- return /* @__PURE__ */ Y("fieldset", {
1481
+ return /* @__PURE__ */ Z("fieldset", {
1411
1482
  className: "xrvj5dj x1n8ia3y x1xxf3xd xc342km x1717udv xeuugli",
1412
1483
  children: [
1413
- /* @__PURE__ */ J("legend", {
1484
+ /* @__PURE__ */ X("legend", {
1414
1485
  className: "x153jb6y xy8obcc x1jfksii",
1415
1486
  children: "Drag with a mouse, or adjust these bounds to select a coordinate range."
1416
1487
  }),
1417
- /* @__PURE__ */ J(Ut, {
1418
- axis: t,
1488
+ /* @__PURE__ */ X(qt, {
1489
+ axis: e,
1419
1490
  domain: r,
1420
1491
  value: l.x,
1421
1492
  step: o.x,
@@ -1425,7 +1496,7 @@ function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale
1425
1496
  y: l.y
1426
1497
  }, t)
1427
1498
  }),
1428
- /* @__PURE__ */ J(Ut, {
1499
+ /* @__PURE__ */ X(qt, {
1429
1500
  axis: n,
1430
1501
  domain: i,
1431
1502
  value: l.y,
@@ -1436,11 +1507,11 @@ function Wt({ x: t, y: n, xDomain: r, yDomain: i, range: a, rangeStep: o, locale
1436
1507
  y: e
1437
1508
  }, t)
1438
1509
  }),
1439
- /* @__PURE__ */ J(e, {
1510
+ /* @__PURE__ */ X(t, {
1440
1511
  type: "button",
1441
1512
  disabled: a === null,
1442
1513
  onClick: (e) => {
1443
- De({ options: () => ({ onRangeChange: c }) }, "onRangeChange", null, {
1514
+ ke({ options: () => ({ onRangeChange: c }) }, "onRangeChange", null, {
1444
1515
  reason: "clear-press",
1445
1516
  event: e.nativeEvent
1446
1517
  });
@@ -1456,14 +1527,14 @@ var $ = {
1456
1527
  pointsPerSeries: 2e3,
1457
1528
  markers: 200,
1458
1529
  panels: 12
1459
- }, Gt = .01;
1460
- function Kt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1530
+ }, Yt = .01;
1531
+ function Xt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1461
1532
  let i = e[0]?.points.map((e) => e.timestamp) ?? r;
1462
1533
  if (e.length > $.series || i.length > $.pointsPerSeries || n.length > $.markers) return `Choose a window with at most ${$.series} series, ${$.pointsPerSeries} observations per series, and ${$.markers} markers.`;
1463
- if (!o(e) || !o(n)) return "Series and markers require unique identifiers.";
1534
+ if (!u(e) || !u(n)) return "Series and markers require unique identifiers.";
1464
1535
  for (let n of e) {
1465
1536
  if (n.points.length !== i.length) return "Every series must supply the same observation timestamps.";
1466
- let e = Zt({
1537
+ let e = tn({
1467
1538
  points: n.points,
1468
1539
  timestamps: i,
1469
1540
  isStacked: t
@@ -1471,18 +1542,18 @@ function Kt({ series: e, isStacked: t, markers: n, timeline: r = [] }) {
1471
1542
  if (e !== void 0) return e;
1472
1543
  }
1473
1544
  for (let t of n) {
1474
- let n = qt({
1545
+ let n = Zt({
1475
1546
  marker: t,
1476
1547
  series: e,
1477
1548
  timestamps: i
1478
1549
  });
1479
1550
  if (n !== void 0) return n;
1480
1551
  }
1481
- let a = e.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value])), s = Math.max(0, ...a) - Math.min(0, ...a), c = (i.at(-1) ?? 0) - (i[0] ?? 0);
1482
- if (!Number.isFinite(s) || !Number.isFinite(c)) return "The elapsed-time and value ranges must be finite.";
1552
+ let a = e.flatMap((e) => e.points.flatMap((e) => e.value === null ? [] : [e.value])), o = Math.max(0, ...a) - Math.min(0, ...a), s = (i.at(-1) ?? 0) - (i[0] ?? 0);
1553
+ if (!Number.isFinite(o) || !Number.isFinite(s)) return "The elapsed-time and value ranges must be finite.";
1483
1554
  if (t && i.some((t, n) => !Number.isFinite(e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)))) return "Stacked observation totals must be finite.";
1484
1555
  }
1485
- function qt({ marker: e, series: t, timestamps: n }) {
1556
+ function Zt({ marker: e, series: t, timestamps: n }) {
1486
1557
  if (e.kind === "event") {
1487
1558
  let t = n[0] ?? 0, r = n.at(-1) ?? t, i = e.timestamp >= t && e.timestamp <= r;
1488
1559
  return Number.isFinite(e.timestamp) && i ? void 0 : "Every event marker must fall inside the observed time range.";
@@ -1490,7 +1561,7 @@ function qt({ marker: e, series: t, timestamps: n }) {
1490
1561
  if (!n.includes(e.timestamp)) return "Every time and point marker must align with an observation timestamp.";
1491
1562
  if (e.kind !== "time") return t.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.value === e.value ? void 0 : "Point markers must reference the recorded series value.";
1492
1563
  }
1493
- function Jt({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1564
+ function Qt({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1494
1565
  return JSON.stringify([
1495
1566
  n,
1496
1567
  r,
@@ -1510,12 +1581,12 @@ function Jt({ series: e, markers: t, timestampUnit: n, isStacked: r }) {
1510
1581
  ])
1511
1582
  ]);
1512
1583
  }
1513
- function Yt(e, t) {
1584
+ function $t(e, t) {
1514
1585
  if (e !== t) return [e, t];
1515
- let n = Math.max(1, Math.abs(e) * Gt), r = e - n, i = t + n;
1586
+ let n = Math.max(1, Math.abs(e) * Yt), r = e - n, i = t + n;
1516
1587
  return [Number.isFinite(r) ? r : e, Number.isFinite(i) ? i : t];
1517
1588
  }
1518
- function Xt({ series: e, isStacked: t, tones: n }) {
1589
+ function en({ series: e, isStacked: t, tones: n }) {
1519
1590
  let r = e.filter((e) => e.tone === void 0);
1520
1591
  return e.map((i, a) => {
1521
1592
  let o = r.findIndex((e) => e.id === i.id), s = n({
@@ -1537,7 +1608,7 @@ function Xt({ series: e, isStacked: t, tones: n }) {
1537
1608
  };
1538
1609
  });
1539
1610
  }
1540
- function Zt({ points: e, timestamps: t, isStacked: n }) {
1611
+ function tn({ points: e, timestamps: t, isStacked: n }) {
1541
1612
  for (let [r, i] of e.entries()) {
1542
1613
  let a = e[r - 1], o = a !== void 0 && i.timestamp <= a.timestamp;
1543
1614
  if (!Number.isFinite(i.timestamp) || i.timestamp !== t[r] || o) return "Observation timestamps must be finite, aligned, and strictly increasing.";
@@ -1546,40 +1617,40 @@ function Zt({ points: e, timestamps: t, isStacked: n }) {
1546
1617
  }
1547
1618
  }
1548
1619
  // packages/charts/src/cartesian/time-series-line.tsx
1549
- function Qt({ series: e, x: t, y: n, pointRadius: r = 3 }) {
1620
+ function nn({ series: e, x: t, y: n, pointRadius: r = 3 }) {
1550
1621
  let i = e.points.findLastIndex((e) => e.value !== null);
1551
- return /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J("path", {
1552
- d: be(e.points.map((e) => ({
1622
+ return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("path", {
1623
+ d: U(e.points.map((e) => ({
1553
1624
  x: t(e.timestamp),
1554
1625
  y: e.value === null ? null : n(e.value + e.base)
1555
1626
  }))),
1556
1627
  fill: "none",
1557
- stroke: a[e.tone],
1558
- ...H.props(P.mark)
1628
+ stroke: o[e.tone],
1629
+ ...W.props(F.mark)
1559
1630
  }), e.points.filter((t, n) => {
1560
1631
  if (t.value === null) return !1;
1561
1632
  let r = e.points[n - 1]?.value === null || e.points[n + 1]?.value === null;
1562
1633
  return e.points.length === 1 || n === i || r;
1563
- }).map((i) => /* @__PURE__ */ J("circle", {
1634
+ }).map((i) => /* @__PURE__ */ X("circle", {
1564
1635
  cx: t(i.timestamp),
1565
1636
  cy: n((i.value ?? 0) + i.base),
1566
1637
  r,
1567
- fill: a[e.tone]
1638
+ fill: o[e.tone]
1568
1639
  }, i.timestamp))] });
1569
1640
  }
1570
1641
  // packages/charts/src/cartesian/sparkline.tsx
1571
- var $t = {
1642
+ var rn = {
1572
1643
  minimum: "Lowest",
1573
1644
  maximum: "Highest",
1574
1645
  last: "Latest"
1575
- }, en = 2.5, tn = 3, nn = {
1646
+ }, an = 2.5, on = 3, sn = {
1576
1647
  inline: {
1577
1648
  width: 128,
1578
1649
  height: 32
1579
1650
  },
1580
1651
  figure: { height: 48 }
1581
1652
  };
1582
- function rn({ points: e, marked: t }) {
1653
+ function cn({ points: e, marked: t }) {
1583
1654
  let n = e.flatMap((e) => e.value === null ? [] : [{
1584
1655
  ...e,
1585
1656
  value: e.value
@@ -1596,115 +1667,118 @@ function rn({ points: e, marked: t }) {
1596
1667
  }];
1597
1668
  });
1598
1669
  }
1599
- function an({ title: e, summary: t, unit: n, timestampUnit: r, series: i, valueDomain: o, markedPoints: s = [], baseline: c, layout: l = "inline" }) {
1600
- let u = W(), f = F(), p = l === "figure", m = p ? f.width : nn.inline.width, h = p ? nn.figure.height : nn.inline.height, g = W(), _ = C(), v = on({
1601
- title: e,
1602
- summary: t,
1603
- unit: n,
1604
- series: i,
1605
- valueDomain: o,
1606
- markedPoints: s,
1607
- baseline: c
1608
- }), ee = i.points.some((e) => e.value !== null);
1609
- if (v !== void 0 || !ee) return /* @__PURE__ */ J("span", {
1670
+ function ln({ title: t, summary: n, unit: r, timestampUnit: i, series: a, valueDomain: s, markedPoints: c = [], baseline: l, layout: u = "inline" }) {
1671
+ let d = we(), f = I(), m = u === "figure", h = m ? f.width : sn.inline.width, g = m ? sn.figure.height : sn.inline.height, _ = we(), v = E(), y = x(), b = un({
1672
+ title: t,
1673
+ summary: n,
1674
+ unit: r,
1675
+ series: a,
1676
+ valueDomain: s,
1677
+ markedPoints: c,
1678
+ baseline: l
1679
+ }), ee = a.points.some((e) => e.value !== null);
1680
+ if (b !== void 0 || !ee) return /* @__PURE__ */ X("span", {
1610
1681
  role: "img",
1611
- "aria-label": `${e}. ${t} Values in ${n}; timestamps in ${r}. ${v ?? "No recorded values. Missing observations remain unavailable."}`,
1612
- title: v ?? "No recorded values",
1682
+ "aria-label": `${t}. ${n} Values in ${r}; timestamps in ${i}. ${b ?? "No recorded values. Missing observations remain unavailable."}`,
1683
+ title: b ?? "No recorded values",
1613
1684
  className: "x2pejg6 x10w6t97 x2lah0s xxymvpz x3nfvp2 x6s0dn4 xl56j7k x153jb6y x1hz01jw xy8obcc",
1614
- children: v === void 0 ? "No data" : "Invalid trend"
1685
+ children: b === void 0 ? "No data" : "Invalid trend"
1615
1686
  });
1616
- let y = i.points[0]?.timestamp ?? 0, b = i.points.at(-1)?.timestamp ?? y, x = k({
1617
- domain: Yt(y, b),
1618
- range: [tn, m - tn]
1619
- }).position, S = k({
1620
- domain: o,
1621
- range: [h - tn, tn]
1622
- }).position, w = Xt({
1623
- series: [i],
1687
+ let S = a.points[0]?.timestamp ?? 0, C = a.points.at(-1)?.timestamp ?? S, w = j({
1688
+ domain: $t(S, C),
1689
+ range: [on, h - on]
1690
+ }).position, T = j({
1691
+ domain: s,
1692
+ range: [g - on, on]
1693
+ }).position, te = en({
1694
+ series: [a],
1624
1695
  isStacked: !1,
1625
- tones: _
1626
- })[0], te = a[w?.tone ?? "series1"], T = rn({
1627
- points: i.points,
1628
- marked: s
1629
- }), E = T.map(({ kind: e, point: t }) => `${$t[e]}: ${t.value} ${n}.`).join(" "), D = c === void 0 ? "" : `Reference: ${c} ${n}.`, O = /* @__PURE__ */ Y("svg", {
1696
+ tones: v
1697
+ })[0], ne = o[te?.tone ?? "series1"], D = cn({
1698
+ points: a.points,
1699
+ marked: c
1700
+ }), O = D.map(({ kind: e, point: t }) => `${rn[e]}: ${t.value} ${r}.`).join(" "), k = l === void 0 ? "" : `Reference: ${l} ${r}.`, A = /* @__PURE__ */ Z("svg", {
1630
1701
  role: "img",
1631
- "aria-labelledby": u,
1632
- "aria-describedby": g,
1702
+ "aria-labelledby": d,
1703
+ "aria-describedby": _,
1633
1704
  focusable: "false",
1634
- viewBox: `0 0 ${m} ${h}`,
1635
- width: m,
1636
- height: h,
1705
+ viewBox: `0 0 ${h} ${g}`,
1706
+ width: h,
1707
+ height: g,
1637
1708
  ...{
1638
1709
  0: { className: "x1rg5ohu x2pejg6 x10w6t97 x2lah0s xxymvpz" },
1639
1710
  1: { className: "x1lliihq xh8yej3 xt7dq6l" }
1640
- }[!!p | 0],
1711
+ }[!!m | 0],
1641
1712
  children: [
1642
- /* @__PURE__ */ J("title", {
1643
- id: u,
1644
- children: e
1713
+ /* @__PURE__ */ X("title", {
1714
+ id: d,
1715
+ children: t
1645
1716
  }),
1646
- /* @__PURE__ */ Y("desc", {
1647
- id: g,
1717
+ /* @__PURE__ */ Z("desc", {
1718
+ id: _,
1648
1719
  children: [
1649
- t,
1650
- " Values in ",
1651
1720
  n,
1652
- "; timestamps in ",
1721
+ " Values in ",
1653
1722
  r,
1723
+ "; timestamps in ",
1724
+ i,
1654
1725
  ". Displayed value domain: ",
1655
- o[0],
1726
+ s[0],
1656
1727
  " to",
1657
1728
  " ",
1658
- o[1],
1729
+ s[1],
1659
1730
  " ",
1660
- n,
1731
+ r,
1661
1732
  ". ",
1662
- E,
1733
+ O,
1663
1734
  " ",
1664
- D
1735
+ k
1665
1736
  ]
1666
1737
  }),
1667
- c !== void 0 && /* @__PURE__ */ J("line", {
1668
- x1: tn,
1669
- x2: m - tn,
1670
- y1: S(c),
1671
- y2: S(c),
1738
+ l !== void 0 && /* @__PURE__ */ X("line", {
1739
+ x1: on,
1740
+ x2: h - on,
1741
+ y1: T(l),
1742
+ y2: T(l),
1672
1743
  className: "x1crw9hw xnpr05h xbw2l0c x13efnbd"
1673
1744
  }),
1674
- w !== void 0 && /* @__PURE__ */ J(Qt, {
1675
- series: w,
1676
- x,
1677
- y: S,
1745
+ te !== void 0 && /* @__PURE__ */ X(nn, {
1746
+ series: te,
1747
+ x: w,
1748
+ y: T,
1678
1749
  pointRadius: 2
1679
1750
  }),
1680
- T.map(({ kind: e, point: t }) => e === "last" ? /* @__PURE__ */ J("circle", {
1681
- cx: x(t.timestamp),
1682
- cy: S(t.value),
1683
- r: en,
1684
- fill: te
1685
- }, e) : /* @__PURE__ */ J("circle", {
1686
- cx: x(t.timestamp),
1687
- cy: S(t.value),
1688
- r: en,
1689
- stroke: te,
1751
+ D.map(({ kind: e, point: t }) => e === "last" ? /* @__PURE__ */ X("circle", {
1752
+ cx: w(t.timestamp),
1753
+ cy: T(t.value),
1754
+ r: an,
1755
+ fill: ne
1756
+ }, e) : /* @__PURE__ */ X("circle", {
1757
+ cx: w(t.timestamp),
1758
+ cy: T(t.value),
1759
+ r: an,
1760
+ stroke: ne,
1690
1761
  className: "x1fytgo2 x1r6sdyr x13efnbd"
1691
1762
  }, e))
1692
1763
  ]
1693
1764
  });
1694
- return p ? /* @__PURE__ */ J(d, {
1695
- title: e,
1696
- description: t,
1697
- children: /* @__PURE__ */ J("div", {
1765
+ return m ? /* @__PURE__ */ X(p, {
1766
+ title: y ? /* @__PURE__ */ X("span", {
1767
+ ...W.props(e.hidden),
1768
+ children: t
1769
+ }) : t,
1770
+ description: y ? void 0 : n,
1771
+ children: /* @__PURE__ */ X("div", {
1698
1772
  ref: f.ref,
1699
1773
  className: "x1lliihq xeuugli",
1700
- children: O
1774
+ children: A
1701
1775
  })
1702
- }) : O;
1776
+ }) : A;
1703
1777
  }
1704
- function on({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPoints: a, baseline: o }) {
1778
+ function un({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPoints: a, baseline: o }) {
1705
1779
  if (e.trim() === "" || t.trim() === "" || n.trim() === "") return "A trend requires a title, a readable summary, and a value unit.";
1706
- if (!D(i)) return "The displayed value domain must have finite, increasing bounds.";
1707
- let s = Kt({
1780
+ if (!k(i)) return "The displayed value domain must have finite, increasing bounds.";
1781
+ let s = Xt({
1708
1782
  series: [r],
1709
1783
  isStacked: !1,
1710
1784
  markers: []
@@ -1715,11 +1789,11 @@ function on({ title: e, summary: t, unit: n, series: r, valueDomain: i, markedPo
1715
1789
  if (!(o === void 0 || o >= i[0] && o <= i[1])) return "The reference value must be inside the declared value domain.";
1716
1790
  }
1717
1791
  // packages/charts/src/cartesian/time-series-bands.ts
1718
- var sn = {
1792
+ var dn = {
1719
1793
  bands: 4,
1720
1794
  crossings: 4
1721
1795
  };
1722
- function cn(e) {
1796
+ function fn(e) {
1723
1797
  let t = [
1724
1798
  e.lower,
1725
1799
  e.center,
@@ -1727,18 +1801,18 @@ function cn(e) {
1727
1801
  ].filter((e) => e !== null);
1728
1802
  return t.some((e) => !Number.isFinite(e)) ? "Band values must be finite numbers or explicit missing values." : e.lower === null == (e.upper === null) ? t.every((e, n) => n === 0 || (t[n - 1] ?? e) <= e) ? void 0 : "Band values must satisfy lower ≤ center ≤ upper." : "A band observation needs both bounds or neither.";
1729
1803
  }
1730
- function ln({ bands: e, crossings: t, series: n, timestamps: r }) {
1731
- if (e.length > sn.bands || t.length > sn.crossings) return `Supply at most ${sn.bands} bands and ${sn.crossings} crossings.`;
1732
- if (!o([...n, ...e]) || !o(t)) return "Series, bands, and crossings require unique identifiers.";
1804
+ function pn({ bands: e, crossings: t, series: n, timestamps: r }) {
1805
+ if (e.length > dn.bands || t.length > dn.crossings) return `Supply at most ${dn.bands} bands and ${dn.crossings} crossings.`;
1806
+ if (!u([...n, ...e]) || !u(t)) return "Series, bands, and crossings require unique identifiers.";
1733
1807
  for (let t of e) {
1734
1808
  if (t.points.length !== r.length || t.points.some((e, t) => e.timestamp !== r[t])) return "Every band must supply the same observation timestamps as the series.";
1735
- let e = t.points.map(cn).find((e) => e !== void 0);
1809
+ let e = t.points.map(fn).find((e) => e !== void 0);
1736
1810
  if (e !== void 0) return e;
1737
1811
  }
1738
1812
  let i = new Set([...n, ...e].map((e) => e.id));
1739
1813
  for (let e of t) if (!(i.has(e.seriesId) && e.label.trim() !== "") || !Number.isFinite(e.value)) return "Each crossing needs a label, a finite value, and a supplied series or band.";
1740
1814
  }
1741
- function un({ series: e, bands: t, tones: n }) {
1815
+ function mn({ series: e, bands: t, tones: n }) {
1742
1816
  let r = e.filter((e) => e.tone === void 0).length, i = t.filter((e) => e.tone === void 0);
1743
1817
  return t.map((e) => {
1744
1818
  let t = r + i.findIndex((t) => t.id === e.id);
@@ -1752,7 +1826,7 @@ function un({ series: e, bands: t, tones: n }) {
1752
1826
  };
1753
1827
  });
1754
1828
  }
1755
- function dn({ start: e, end: t, value: n, direction: r }) {
1829
+ function hn({ start: e, end: t, value: n, direction: r }) {
1756
1830
  let i = e > n && t <= n, a = e < n && t >= n;
1757
1831
  switch (r) {
1758
1832
  case "falling": return i;
@@ -1760,7 +1834,7 @@ function dn({ start: e, end: t, value: n, direction: r }) {
1760
1834
  case void 0: return i || a;
1761
1835
  }
1762
1836
  }
1763
- function fn({ points: e, crossing: t }) {
1837
+ function gn({ points: e, crossing: t }) {
1764
1838
  let n = e.flatMap((t, n) => {
1765
1839
  let r = e[n + 1];
1766
1840
  return t.value === null || r === void 0 || r.value === null ? [] : [{
@@ -1769,7 +1843,7 @@ function fn({ points: e, crossing: t }) {
1769
1843
  from: t.value,
1770
1844
  to: r.value
1771
1845
  }];
1772
- }).find(({ from: e, to: n }) => dn({
1846
+ }).find(({ from: e, to: n }) => hn({
1773
1847
  start: e,
1774
1848
  end: n,
1775
1849
  value: t.value,
@@ -1779,10 +1853,10 @@ function fn({ points: e, crossing: t }) {
1779
1853
  let r = (t.value - n.from) / (n.to - n.from);
1780
1854
  return n.start + r * (n.end - n.start);
1781
1855
  }
1782
- function pn({ crossings: e, series: t, bands: n }) {
1856
+ function _n({ crossings: e, series: t, bands: n }) {
1783
1857
  return e.map((e) => ({
1784
1858
  crossing: e,
1785
- timestamp: fn({
1859
+ timestamp: gn({
1786
1860
  points: t.find((t) => t.id === e.seriesId)?.points ?? n.find((t) => t.id === e.seriesId)?.points.map((e) => ({
1787
1861
  timestamp: e.timestamp,
1788
1862
  value: e.center
@@ -1791,11 +1865,11 @@ function pn({ crossings: e, series: t, bands: n }) {
1791
1865
  })
1792
1866
  }));
1793
1867
  }
1794
- function mn(e, t) {
1868
+ function vn(e, t) {
1795
1869
  let n = Math.min(...e.map((e) => Math.abs(e - t)));
1796
1870
  return e.find((e) => Math.abs(e - t) === n);
1797
1871
  }
1798
- function hn(e) {
1872
+ function yn(e) {
1799
1873
  return e.flatMap((e) => e.points.flatMap((e) => [
1800
1874
  e.lower,
1801
1875
  e.center,
@@ -1803,23 +1877,23 @@ function hn(e) {
1803
1877
  ].filter((e) => e !== null)));
1804
1878
  }
1805
1879
  // packages/charts/src/chart-range.tsx
1806
- var gn = "axis", _n = "selected", vn = "drawn";
1807
- function yn({ value: e }) {
1880
+ var bn = "axis", xn = "selected", Sn = "drawn";
1881
+ function Cn({ value: e }) {
1808
1882
  return {
1809
1883
  value: e,
1810
1884
  spans: e === null ? [] : [{
1811
- id: _n,
1812
- track: gn,
1885
+ id: xn,
1886
+ track: bn,
1813
1887
  start: e[0],
1814
1888
  end: e[1]
1815
1889
  }]
1816
1890
  };
1817
1891
  }
1818
- function bn(e, t) {
1892
+ function wn(e, t) {
1819
1893
  let { draft: n } = e;
1820
1894
  return n?.action === "draw" ? t.filter((e) => e.id === n.id) : t;
1821
1895
  }
1822
- var xn = Ee({
1896
+ var Tn = J({
1823
1897
  name: "chart-range",
1824
1898
  options: {
1825
1899
  value: "value",
@@ -1831,12 +1905,12 @@ var xn = Ee({
1831
1905
  },
1832
1906
  controlled: ["value"],
1833
1907
  state: (e) => ({
1834
- ...yn(e),
1908
+ ...Cn(e),
1835
1909
  draft: null
1836
1910
  }),
1837
- sync: yn,
1911
+ sync: Cn,
1838
1912
  api: (e) => {
1839
- let t = q(e);
1913
+ let t = De(e);
1840
1914
  function n(n, { id: r, action: i, reason: a, event: o }) {
1841
1915
  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 } : {
1842
1916
  reason: a,
@@ -1844,7 +1918,7 @@ var xn = Ee({
1844
1918
  });
1845
1919
  return l && i === "delete" && e.element("root")?.querySelector("[tabindex=\"0\"]:not([data-span-id])")?.focus(), l;
1846
1920
  }
1847
- let r = Te(e, {
1921
+ let r = Oe(e, {
1848
1922
  key: "spans",
1849
1923
  draft: "draft",
1850
1924
  axis: "x",
@@ -1853,7 +1927,7 @@ var xn = Ee({
1853
1927
  step: () => e.options().step,
1854
1928
  create: (e) => ({
1855
1929
  ...e,
1856
- id: vn
1930
+ id: Sn
1857
1931
  }),
1858
1932
  label: (t) => e.options().describe([t.start, t.end]),
1859
1933
  createAutoScroll: !1,
@@ -1862,13 +1936,13 @@ var xn = Ee({
1862
1936
  return {
1863
1937
  spans: r,
1864
1938
  shown(t) {
1865
- return bn(t, r.spans(t)).map((t) => ({
1939
+ return wn(t, r.spans(t)).map((t) => ({
1866
1940
  id: t.id,
1867
1941
  label: e.options().describe([t.start, t.end])
1868
1942
  }));
1869
1943
  },
1870
1944
  draw(e) {
1871
- e.button === 0 && e.pointerType !== "touch" && r.trackPointerdown(e, gn);
1945
+ e.button === 0 && e.pointerType !== "touch" && r.trackPointerdown(e, bn);
1872
1946
  },
1873
1947
  setRange(n, r) {
1874
1948
  let { min: i, max: a, step: o } = e.options(), s = [Number(n), Number(r)].map((e) => i + Math.round((e - i) / o) * o), c = Math.max(i, Math.min(...s)), l = Math.min(a, Math.max(...s));
@@ -1886,7 +1960,7 @@ var xn = Ee({
1886
1960
  state: (e, { api: t }) => ({ spans: t.shown(e) }),
1887
1961
  on: { pointerdown: (e, { api: t }) => t.draw(e) }
1888
1962
  }),
1889
- track: e({ bind: (e, { api: t }) => t.spans.bindTrack(e, gn) }),
1963
+ track: e({ bind: (e, { api: t }) => t.spans.bindTrack(e, bn) }),
1890
1964
  span: e({
1891
1965
  role: "group",
1892
1966
  props: { value: "string" },
@@ -1908,17 +1982,17 @@ var xn = Ee({
1908
1982
  })
1909
1983
  }),
1910
1984
  agent: { actions: ["setRange", "clear"] }
1911
- }), Sn = U(xn, {
1985
+ }), En = G(Tn, {
1912
1986
  root: "div",
1913
1987
  track: "div",
1914
1988
  span: "div"
1915
- }), Cn = Sn.Root, wn = Sn.Track, Tn = Sn.Span, En = {
1989
+ }), Dn = En.Root, On = En.Track, kn = En.Span, An = {
1916
1990
  kVAEAm: "x10l6tqk",
1917
1991
  k87sOh: "x13vifvy",
1918
1992
  kfzvcC: "x47corl",
1919
1993
  $$css: !0
1920
- }, Dn = { track: (e, t, n) => [
1921
- En,
1994
+ }, jn = { track: (e, t, n) => [
1995
+ An,
1922
1996
  {
1923
1997
  kbCHJM: e == null ? e : "xgq9j65",
1924
1998
  kzqmXN: t == null ? t : "x5lhr3w",
@@ -1931,26 +2005,26 @@ var xn = Ee({
1931
2005
  "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(n)
1932
2006
  }
1933
2007
  ] };
1934
- function On({ left: e, width: t, height: n, label: r, children: i, ...a }) {
1935
- return /* @__PURE__ */ J(Cn, {
2008
+ function Mn({ left: e, width: t, height: n, label: r, children: i, ...a }) {
2009
+ return /* @__PURE__ */ X(Dn, {
1936
2010
  ...a,
1937
2011
  "aria-label": r,
1938
2012
  className: "x1n2onr6 xeuugli",
1939
- render: (r, { spans: a }) => /* @__PURE__ */ Y("div", {
2013
+ render: (r, { spans: a }) => /* @__PURE__ */ Z("div", {
1940
2014
  ...r,
1941
- children: [i, /* @__PURE__ */ J(wn, {
1942
- ...H.props(Dn.track(e, t, n)),
1943
- children: a.map((e) => /* @__PURE__ */ Y(Tn, {
2015
+ children: [i, /* @__PURE__ */ X(On, {
2016
+ ...W.props(jn.track(e, t, n)),
2017
+ children: a.map((e) => /* @__PURE__ */ Z(kn, {
1944
2018
  value: e.id,
1945
2019
  "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.`,
1946
2020
  className: "x10l6tqk x13vifvy x5yr21d x9f619 x1qatu44 x1l0rsgs x1616tdu xbsl7fq xbm8b0d x1n2ykn x1t137rt x19rmrnh x9v5kkp x13qnu6 x1bqaal",
1947
2021
  children: [
1948
- /* @__PURE__ */ J("span", { className: "x10l6tqk x67bb7w x5ve5x3 x7it7wx x1ey2m1c xdk7pt x1jm3nie x1o753nm x1jzqe4 x3onkmb" }),
1949
- /* @__PURE__ */ J("span", {
2022
+ /* @__PURE__ */ X("span", { className: "x10l6tqk x67bb7w x5ve5x3 x7it7wx x1ey2m1c xdk7pt x1jm3nie x1o753nm x1jzqe4 x3onkmb" }),
2023
+ /* @__PURE__ */ X("span", {
1950
2024
  "data-span-edge": "start",
1951
2025
  className: "x10l6tqk x67bb7w x5ve5x3 x13vifvy x5yr21d x1fsd2vl x7eptgl x1765b1"
1952
2026
  }),
1953
- /* @__PURE__ */ J("span", {
2027
+ /* @__PURE__ */ X("span", {
1954
2028
  "data-span-edge": "end",
1955
2029
  className: "x10l6tqk x67bb7w x5ve5x3 x13vifvy x5yr21d x1fsd2vl x7eptgl xpa5qit"
1956
2030
  })
@@ -1961,11 +2035,11 @@ function On({ left: e, width: t, height: n, label: r, children: i, ...a }) {
1961
2035
  });
1962
2036
  }
1963
2037
  // packages/charts/src/cartesian/time-series-overlays.tsx
1964
- var kn = 16, An = 6, jn = 6.5, Mn = 4;
1965
- function Nn({ instants: e, x: t, right: n, ends: r }) {
2038
+ var Nn = 16, Pn = 6, Fn = 6.5, In = 4;
2039
+ function Ln({ instants: e, x: t, right: n, ends: r }) {
1966
2040
  let [i, ...a] = e;
1967
2041
  if (i === void 0) return [];
1968
- let o = t(i.timestamp), s = i.label.length * jn + An, c = o + s > n ? "end" : "start", l = c === "start" ? o : o - s, u = c === "start" ? o + s : o, d = r.findIndex((e) => l > e), f = d === -1 ? Math.min(r.length, 1) : d, p = [
2042
+ let o = t(i.timestamp), s = i.label.length * Fn + Pn, c = o + s > n ? "end" : "start", l = c === "start" ? o : o - s, u = c === "start" ? o + s : o, d = r.findIndex((e) => l > e), f = d === -1 ? Math.min(r.length, 1) : d, p = [
1969
2043
  ...r.slice(0, f),
1970
2044
  Math.max(u, r[f] ?? u),
1971
2045
  ...r.slice(f + 1)
@@ -1974,26 +2048,26 @@ function Nn({ instants: e, x: t, right: n, ends: r }) {
1974
2048
  ...i,
1975
2049
  lane: f,
1976
2050
  anchor: c
1977
- }, ...Nn({
2051
+ }, ...Ln({
1978
2052
  instants: a,
1979
2053
  x: t,
1980
2054
  right: n,
1981
2055
  ends: p
1982
2056
  })];
1983
2057
  }
1984
- function Pn({ instants: e, x: t, right: n }) {
1985
- return Nn({
2058
+ function Rn({ instants: e, x: t, right: n }) {
2059
+ return Ln({
1986
2060
  instants: e.toSorted((e, t) => e.timestamp - t.timestamp),
1987
2061
  x: t,
1988
2062
  right: n,
1989
2063
  ends: []
1990
2064
  });
1991
2065
  }
1992
- function Fn(e) {
1993
- return Math.max(0, ...e.map((e) => e.lane + 1)) * kn;
2066
+ function zn(e) {
2067
+ return Math.max(0, ...e.map((e) => e.lane + 1)) * Nn;
1994
2068
  }
1995
- function In({ bands: e, x: t, y: n }) {
1996
- return /* @__PURE__ */ J("g", { children: e.map((e) => {
2069
+ function Bn({ bands: e, x: t, y: n }) {
2070
+ return /* @__PURE__ */ X("g", { children: e.map((e) => {
1997
2071
  function r(t) {
1998
2072
  return e.points.map((e) => {
1999
2073
  let r = t(e);
@@ -2001,15 +2075,15 @@ function In({ bands: e, x: t, y: n }) {
2001
2075
  });
2002
2076
  }
2003
2077
  let i = r((e) => e.lower), a = r((e) => e.upper), o = r((e) => e.center), s = e.points.map((e) => t(e.timestamp));
2004
- return /* @__PURE__ */ Y("g", { children: [/* @__PURE__ */ J(B, {
2005
- d: xe(s.map((e, t) => ({
2078
+ return /* @__PURE__ */ Z("g", { children: [/* @__PURE__ */ X(V, {
2079
+ d: Se(s.map((e, t) => ({
2006
2080
  x: e,
2007
2081
  y0: i[t] ?? null,
2008
2082
  y1: a[t] ?? null
2009
2083
  }))),
2010
2084
  tone: e.tone
2011
- }), /* @__PURE__ */ J(ue, {
2012
- d: be(s.map((e, t) => ({
2085
+ }), /* @__PURE__ */ X(fe, {
2086
+ d: U(s.map((e, t) => ({
2013
2087
  x: e,
2014
2088
  y: o[t] ?? null
2015
2089
  }))),
@@ -2017,25 +2091,25 @@ function In({ bands: e, x: t, y: n }) {
2017
2091
  })] }, e.id);
2018
2092
  }) });
2019
2093
  }
2020
- function Ln({ placed: e, x: t, y: n, top: r, bottom: i }) {
2021
- let a = r - Fn(e);
2022
- return /* @__PURE__ */ J("g", {
2094
+ function Vn({ placed: e, x: t, y: n, top: r, bottom: i }) {
2095
+ let a = r - zn(e);
2096
+ return /* @__PURE__ */ X("g", {
2023
2097
  "aria-hidden": !0,
2024
2098
  children: e.map((e) => {
2025
- let r = t(e.timestamp), o = a + (e.lane + 1 / 2) * kn, s = e.anchor === "start" ? r + An : r - An;
2026
- return /* @__PURE__ */ Y("g", { children: [
2027
- /* @__PURE__ */ J(de, {
2099
+ let r = t(e.timestamp), o = a + (e.lane + 1 / 2) * Nn, s = e.anchor === "start" ? r + Pn : r - Pn;
2100
+ return /* @__PURE__ */ Z("g", { children: [
2101
+ /* @__PURE__ */ X(pe, {
2028
2102
  x: r,
2029
2103
  top: o,
2030
2104
  bottom: i
2031
2105
  }),
2032
- /* @__PURE__ */ J(L, {
2106
+ /* @__PURE__ */ X(R, {
2033
2107
  x: s,
2034
- y: o + Mn,
2108
+ y: o + In,
2035
2109
  anchor: e.anchor,
2036
2110
  children: e.label
2037
2111
  }),
2038
- e.value !== void 0 && /* @__PURE__ */ J(R, {
2112
+ e.value !== void 0 && /* @__PURE__ */ X(z, {
2039
2113
  x: r,
2040
2114
  y: n(e.value)
2041
2115
  })
@@ -2044,35 +2118,35 @@ function Ln({ placed: e, x: t, y: n, top: r, bottom: i }) {
2044
2118
  });
2045
2119
  }
2046
2120
  // packages/charts/src/cartesian/time-series.tsx
2047
- var Rn = {
2121
+ var Hn = {
2048
2122
  seconds: 1e3,
2049
2123
  milliseconds: 1
2050
- }, zn = 24, Bn = 12, Vn = 2.5, Hn = 4, Un = {
2124
+ }, Un = 24, Wn = 12, Gn = 2.5, Kn = 4, qn = {
2051
2125
  line: "line",
2052
2126
  area: "swatch"
2053
2127
  };
2054
- function Wn(e, t) {
2055
- return e * Rn[t];
2128
+ function Jn(e, t) {
2129
+ return e * Hn[t];
2056
2130
  }
2057
- function Gn({ format: e, tickFormat: t, label: n = "" }) {
2131
+ function Yn({ format: e, tickFormat: t, label: n = "" }) {
2058
2132
  return {
2059
2133
  label: n,
2060
2134
  format: e,
2061
2135
  tickFormat: t
2062
2136
  };
2063
2137
  }
2064
- function Kn({ series: e, isStacked: t, isZeroBased: n, bands: r, crossings: i }) {
2138
+ function Xn({ series: e, isStacked: t, isZeroBased: n, bands: r, crossings: i }) {
2065
2139
  let a = (e[0]?.points ?? []).map((t, n) => e.reduce((e, t) => e + (t.points[n]?.value ?? 0), 0)), o = t ? a : e.flatMap((e) => e.points.map((e) => e.value));
2066
- return u({
2140
+ return f({
2067
2141
  values: [
2068
2142
  ...o,
2069
- ...hn(r),
2143
+ ...yn(r),
2070
2144
  ...i.map((e) => e.value)
2071
2145
  ],
2072
2146
  isZeroBased: n
2073
2147
  });
2074
2148
  }
2075
- function qn({ bands: e, crossings: t }) {
2149
+ function Zn({ bands: e, crossings: t }) {
2076
2150
  return JSON.stringify([e.map((e) => [
2077
2151
  e.id,
2078
2152
  e.label,
@@ -2092,7 +2166,7 @@ function qn({ bands: e, crossings: t }) {
2092
2166
  e.direction
2093
2167
  ])]);
2094
2168
  }
2095
- function Jn({ bands: e, timestamp: t, valueText: n }) {
2169
+ function Qn({ bands: e, timestamp: t, valueText: n }) {
2096
2170
  return e.flatMap((e) => {
2097
2171
  let r = e.points.find((e) => e.timestamp === t), i = r?.center ?? null, a = r?.lower !== null && r?.upper !== null && r !== void 0;
2098
2172
  return [{
@@ -2110,28 +2184,28 @@ function Jn({ bands: e, timestamp: t, valueText: n }) {
2110
2184
  }];
2111
2185
  });
2112
2186
  }
2113
- function Yn({ found: e, timeText: t }) {
2187
+ function $n({ found: e, timeText: t }) {
2114
2188
  return e.timestamp === void 0 ? `${e.crossing.label} · Not reached in this range` : `About ${t(e.timestamp)} · ${e.crossing.label}`;
2115
2189
  }
2116
- function Xn(e) {
2117
- return /* @__PURE__ */ J(nr, {
2190
+ function er(e) {
2191
+ return /* @__PURE__ */ X(or, {
2118
2192
  ...e,
2119
2193
  kind: "line",
2120
2194
  isStacked: !1
2121
2195
  });
2122
2196
  }
2123
- function Zn({ isStacked: e = !1, ...t }) {
2124
- return /* @__PURE__ */ J(nr, {
2197
+ function tr({ isStacked: e = !1, ...t }) {
2198
+ return /* @__PURE__ */ X(or, {
2125
2199
  ...t,
2126
2200
  kind: "area",
2127
2201
  isStacked: e
2128
2202
  });
2129
2203
  }
2130
- function Qn(e) {
2131
- return /* @__PURE__ */ J($n, { ...e });
2204
+ function nr(e) {
2205
+ return /* @__PURE__ */ X(rr, { ...e });
2132
2206
  }
2133
- function $n({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2134
- let o = W(), s = C(), c = Xt({
2207
+ function rr({ series: e, height: t = "compact", showTimeAxis: n = !0, ...a }) {
2208
+ let o = we(), s = E(), c = en({
2135
2209
  series: e.map((e) => ({
2136
2210
  ...e,
2137
2211
  points: []
@@ -2139,15 +2213,15 @@ function $n({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2139
2213
  isStacked: !1,
2140
2214
  tones: s
2141
2215
  });
2142
- return /* @__PURE__ */ J("div", {
2216
+ return /* @__PURE__ */ X("div", {
2143
2217
  "aria-hidden": !0,
2144
2218
  inert: !0,
2145
2219
  className: "xeuugli",
2146
- children: /* @__PURE__ */ J(j, {
2220
+ children: /* @__PURE__ */ X(se, {
2147
2221
  ...a,
2148
2222
  status: "loading",
2149
2223
  series: c,
2150
- seriesLegend: /* @__PURE__ */ J(M, {
2224
+ seriesLegend: /* @__PURE__ */ X(N, {
2151
2225
  id: o,
2152
2226
  label: void 0,
2153
2227
  legend: c,
@@ -2156,61 +2230,61 @@ function $n({ series: e, height: t = "compact", showTimeAxis: i = !0, ...a }) {
2156
2230
  width: 0,
2157
2231
  hasSeriesSummary: a.report?.seriesValues !== void 0
2158
2232
  }),
2159
- children: /* @__PURE__ */ J("div", {
2233
+ children: /* @__PURE__ */ X("div", {
2160
2234
  className: "xrvj5dj x1n8ia3y",
2161
- children: /* @__PURE__ */ Y("div", {
2235
+ children: /* @__PURE__ */ Z("div", {
2162
2236
  className: "xeuugli",
2163
- children: [/* @__PURE__ */ J(r, { height: f[t] - zn }), /* @__PURE__ */ J("div", {
2237
+ children: [/* @__PURE__ */ X(i, { height: m[t] - Un }), /* @__PURE__ */ X("div", {
2164
2238
  className: "x78zum5 x6s0dn4 x1qughib x8zbtdt xxk0z11",
2165
- children: i && /* @__PURE__ */ Y(Oe, { children: [/* @__PURE__ */ J(n, { width: "8ch" }), /* @__PURE__ */ J(n, { width: "8ch" })] })
2239
+ children: n && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(r, { width: "8ch" }), /* @__PURE__ */ X(r, { width: "8ch" })] })
2166
2240
  })]
2167
2241
  })
2168
2242
  })
2169
2243
  })
2170
2244
  });
2171
2245
  }
2172
- function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact", locale: i, status: a }) {
2173
- let s = we(null), [c, l] = G(), u = JSON.stringify(e.map((e) => [
2246
+ function ir({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact", locale: i, status: a }) {
2247
+ let o = q(null), [s, c] = Te(), l = JSON.stringify(e.map((e) => [
2174
2248
  e.id,
2175
2249
  e.title,
2176
- Jt({
2250
+ Qt({
2177
2251
  series: e.series,
2178
2252
  markers: e.markers ?? [],
2179
2253
  timestampUnit: t,
2180
2254
  isStacked: !1
2181
2255
  })
2182
- ])), d = JSON.stringify(e[0]?.series[0]?.points.map((e) => e.timestamp) ?? []), p = e.every((e) => JSON.stringify(e.series[0]?.points.map((e) => e.timestamp) ?? []) === d);
2183
- if (c !== void 0 && c.signature !== u && l(void 0), a === "loading") return /* @__PURE__ */ J(tr, {
2256
+ ])), d = JSON.stringify(e[0]?.series[0]?.points.map((e) => e.timestamp) ?? []), f = e.every((e) => JSON.stringify(e.series[0]?.points.map((e) => e.timestamp) ?? []) === d);
2257
+ if (s !== void 0 && s.signature !== l && c(void 0), a === "loading") return /* @__PURE__ */ X(ar, {
2184
2258
  charts: e,
2185
2259
  height: r,
2186
2260
  locale: i
2187
2261
  });
2188
- if (!p || !o(e)) return /* @__PURE__ */ J(oe, {
2262
+ if (!f || !u(e)) return /* @__PURE__ */ X(ce, {
2189
2263
  title: "Small multiples",
2190
2264
  locale: i,
2191
2265
  message: "Charts need unique identifiers and aligned observation timestamps."
2192
2266
  });
2193
- if (e.length > $.panels) return /* @__PURE__ */ J(oe, {
2267
+ if (e.length > $.panels) return /* @__PURE__ */ X(ce, {
2194
2268
  title: "Small multiples",
2195
2269
  locale: i,
2196
2270
  message: `Choose at most ${$.panels} panels.`
2197
2271
  });
2198
- if (e.length === 0) return /* @__PURE__ */ J(j, {
2272
+ if (e.length === 0) return /* @__PURE__ */ X(se, {
2199
2273
  title: "Small multiples",
2200
2274
  locale: i,
2201
- children: /* @__PURE__ */ J(se, { children: "No charts" })
2275
+ children: /* @__PURE__ */ X(le, { children: "No charts" })
2202
2276
  });
2203
- let m = h({
2204
- height: f[r],
2277
+ let p = _({
2278
+ height: m[r],
2205
2279
  locale: i,
2206
2280
  hasValueTitle: e.some((e) => e.valueLabel !== void 0),
2207
2281
  axes: e.map((e) => ({
2208
- axis: Gn({
2282
+ axis: Yn({
2209
2283
  format: e.valueFormat,
2210
2284
  tickFormat: e.tickFormat,
2211
2285
  label: e.valueLabel
2212
2286
  }),
2213
- domain: Kn({
2287
+ domain: Xn({
2214
2288
  series: e.series,
2215
2289
  isStacked: !1,
2216
2290
  isZeroBased: !1,
@@ -2218,19 +2292,19 @@ function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
2218
2292
  crossings: []
2219
2293
  })
2220
2294
  }))
2221
- }), g = e.every((e) => e.report !== void 0);
2222
- return /* @__PURE__ */ J("div", {
2223
- ref: s,
2295
+ }), h = e.every((e) => e.report !== void 0);
2296
+ return /* @__PURE__ */ X("div", {
2297
+ ref: o,
2224
2298
  ...{
2225
2299
  0: { className: "xrvj5dj x1j825kq" },
2226
2300
  1: { className: "xrvj5dj xxhr3t" }
2227
- }[!!g | 0],
2228
- children: e.map(({ id: o, ...d }, f) => /* @__PURE__ */ J("div", {
2301
+ }[!!h | 0],
2302
+ children: e.map(({ id: u, ...d }, f) => /* @__PURE__ */ X("div", {
2229
2303
  ...{
2230
2304
  0: {},
2231
2305
  1: { className: "x1y332i5" }
2232
- }[!!(g && f > 0) | 0],
2233
- children: /* @__PURE__ */ J(nr, {
2306
+ }[!!(h && f > 0) | 0],
2307
+ children: /* @__PURE__ */ X(or, {
2234
2308
  ...d,
2235
2309
  locale: i,
2236
2310
  status: a,
@@ -2240,41 +2314,41 @@ function er({ charts: e, timestampUnit: t, timeFormat: n, height: r = "compact",
2240
2314
  kind: "line",
2241
2315
  isStacked: !1,
2242
2316
  sharedInspection: {
2243
- id: c?.signature === u ? c.id : null,
2244
- isSource: c?.chartId === o,
2245
- onChange: (e) => l(e === null ? void 0 : {
2317
+ id: s?.signature === l ? s.id : null,
2318
+ isSource: s?.chartId === u,
2319
+ onChange: (e) => c(e === null ? void 0 : {
2246
2320
  id: e,
2247
- signature: u,
2248
- chartId: o
2321
+ signature: l,
2322
+ chartId: u
2249
2323
  }),
2250
- within: (e) => s.current?.contains(e) === !0
2324
+ within: (e) => o.current?.contains(e) === !0
2251
2325
  },
2252
- gutter: m,
2326
+ gutter: p,
2253
2327
  showTimeAxis: f === e.length - 1
2254
2328
  })
2255
- }, o))
2329
+ }, u))
2256
2330
  });
2257
2331
  }
2258
- function tr({ charts: e, height: t, locale: n }) {
2259
- if (!o(e) || e.length > $.panels) return /* @__PURE__ */ J(oe, {
2332
+ function ar({ charts: e, height: t, locale: n }) {
2333
+ if (!u(e) || e.length > $.panels) return /* @__PURE__ */ X(ce, {
2260
2334
  title: "Small multiples",
2261
2335
  locale: n,
2262
2336
  message: `Choose at most ${$.panels} panels with unique identifiers.`
2263
2337
  });
2264
2338
  let r = e.every((e) => e.report !== void 0);
2265
- return /* @__PURE__ */ J("div", {
2339
+ return /* @__PURE__ */ X("div", {
2266
2340
  "aria-hidden": !0,
2267
2341
  inert: !0,
2268
2342
  ...{
2269
2343
  0: { className: "xrvj5dj x1j825kq" },
2270
2344
  1: { className: "xrvj5dj xxhr3t" }
2271
2345
  }[!!r | 0],
2272
- children: e.map(({ id: i, ...a }, o) => /* @__PURE__ */ J("div", {
2346
+ children: e.map(({ id: i, ...a }, o) => /* @__PURE__ */ X("div", {
2273
2347
  ...{
2274
2348
  0: {},
2275
2349
  1: { className: "x1y332i5" }
2276
2350
  }[!!(r && o > 0) | 0],
2277
- children: /* @__PURE__ */ J($n, {
2351
+ children: /* @__PURE__ */ X(rr, {
2278
2352
  ...a,
2279
2353
  locale: n,
2280
2354
  height: t,
@@ -2283,87 +2357,87 @@ function tr({ charts: e, height: t, locale: n }) {
2283
2357
  }, i))
2284
2358
  });
2285
2359
  }
2286
- function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFormat: a, valueLabel: o, markers: s = [], height: c = "compact", kind: l, isStacked: u, sharedInspection: d, gutter: f, showTimeAxis: p = !0, bands: h = [], crossings: g = [], range: _ = null, onRangeChange: y, rangeStep: b, emptyLabel: x = "No observations", ...S }) {
2287
- let { title: T, locale: E, report: D } = S, O = C(), k = he(c), A = W(), ie = h[0]?.points.map((e) => e.timestamp) ?? [], N = t[0]?.points.map((e) => e.timestamp) ?? ie, P = Kt({
2288
- series: t,
2289
- isStacked: u,
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: _ = [], range: v = null, onRangeChange: y, rangeStep: x, emptyLabel: ee = "No observations", ...S }) {
2361
+ let { title: C, locale: w, report: T } = S, D = E(), O = _e(c), k = we(), A = h[0]?.points.map((e) => e.timestamp) ?? [], j = e[0]?.points.map((e) => e.timestamp) ?? A, re = Xt({
2362
+ series: e,
2363
+ isStacked: d,
2290
2364
  markers: s,
2291
- timeline: ie
2292
- }) ?? ln({
2365
+ timeline: A
2366
+ }) ?? pn({
2293
2367
  bands: h,
2294
- crossings: g,
2295
- series: t,
2296
- timestamps: N
2297
- }) ?? rr({
2298
- range: _,
2299
- rangeStep: b,
2368
+ crossings: _,
2369
+ series: e,
2370
+ timestamps: j
2371
+ }) ?? sr({
2372
+ range: v,
2373
+ rangeStep: x,
2300
2374
  isSelectable: y !== void 0,
2301
- timeline: N
2302
- }), F = P === void 0 ? Xt({
2303
- series: t,
2304
- isStacked: u,
2305
- tones: O
2306
- }) : [], L = P === void 0 ? un({
2307
- series: t,
2375
+ timeline: j
2376
+ }), M = re === void 0 ? en({
2377
+ series: e,
2378
+ isStacked: d,
2379
+ tones: D
2380
+ }) : [], P = re === void 0 ? mn({
2381
+ series: e,
2308
2382
  bands: h,
2309
- tones: O
2310
- }) : [], z = F[0]?.points ?? L[0]?.points ?? [];
2311
- function B(e) {
2312
- return w({
2313
- timestamp: Wn(e, n),
2314
- locale: E,
2383
+ tones: D
2384
+ }) : [], F = M[0]?.points ?? P[0]?.points ?? [];
2385
+ function I(e) {
2386
+ return te({
2387
+ timestamp: Jn(e, n),
2388
+ locale: w,
2315
2389
  format: r
2316
2390
  });
2317
2391
  }
2318
- function V(e) {
2319
- return te({
2392
+ function R(e) {
2393
+ return ne({
2320
2394
  value: e,
2321
- locale: E,
2395
+ locale: w,
2322
2396
  format: i
2323
2397
  });
2324
2398
  }
2325
- let fe = z.map(({ timestamp: e }) => ({
2399
+ let de = F.map(({ timestamp: e }) => ({
2326
2400
  id: String(e),
2327
- label: B(e)
2328
- })), _e = `${Jt({
2329
- series: t,
2401
+ label: I(e)
2402
+ })), V = `${Qt({
2403
+ series: e,
2330
2404
  markers: s,
2331
2405
  timestampUnit: n,
2332
- isStacked: u
2333
- })}${qn({
2406
+ isStacked: d
2407
+ })}${Zn({
2334
2408
  bands: h,
2335
- crossings: g
2336
- })}`, ve = [...F.map(({ id: e, label: t, tone: n }) => ({
2409
+ crossings: _
2410
+ })}`, H = [...M.map(({ id: e, label: t, tone: n }) => ({
2337
2411
  id: e,
2338
2412
  label: t,
2339
2413
  tone: n,
2340
- shape: Un[l]
2341
- })), ...L.map(({ id: e, label: t, tone: n }) => ({
2414
+ shape: qn[u]
2415
+ })), ...P.map(({ id: e, label: t, tone: n }) => ({
2342
2416
  id: e,
2343
2417
  label: t,
2344
2418
  tone: n,
2345
2419
  shape: "band"
2346
- }))], H = D?.seriesValues !== void 0;
2347
- if (S.status === "loading") return /* @__PURE__ */ J($n, {
2420
+ }))], me = T?.seriesValues !== void 0;
2421
+ if (S.status === "loading") return /* @__PURE__ */ X(rr, {
2348
2422
  ...S,
2349
- series: t,
2423
+ series: e,
2350
2424
  height: c,
2351
- showTimeAxis: p
2425
+ showTimeAxis: m
2352
2426
  });
2353
- if (P !== void 0) return /* @__PURE__ */ J(oe, {
2427
+ if (re !== void 0) return /* @__PURE__ */ X(ce, {
2354
2428
  ...S,
2355
- message: P
2429
+ message: re
2356
2430
  });
2357
- if (z.length === 0) return /* @__PURE__ */ J(j, {
2431
+ if (F.length === 0) return /* @__PURE__ */ X(se, {
2358
2432
  ...S,
2359
- series: ve,
2360
- children: /* @__PURE__ */ J(se, { children: x })
2433
+ series: H,
2434
+ children: /* @__PURE__ */ X(le, { children: ee })
2361
2435
  });
2362
- let U = z.map((e) => e.timestamp), Ce = pn({
2363
- crossings: g,
2364
- series: t,
2436
+ let ye = F.map((e) => e.timestamp), be = _n({
2437
+ crossings: _,
2438
+ series: e,
2365
2439
  bands: h
2366
- }), we = [...s.flatMap((e) => e.kind === "event" ? [e] : []), ...Ce.flatMap(({ crossing: e, timestamp: t }) => t === void 0 ? [] : [{
2440
+ }), W = [...s.flatMap((e) => e.kind === "event" ? [e] : []), ...be.flatMap(({ crossing: e, timestamp: t }) => t === void 0 ? [] : [{
2367
2441
  id: e.id,
2368
2442
  timestamp: t,
2369
2443
  label: e.label,
@@ -2371,160 +2445,160 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2371
2445
  }])];
2372
2446
  function G(e) {
2373
2447
  return {
2374
- label: e === void 0 ? void 0 : B(e),
2375
- rows: [...F.map((t) => {
2448
+ label: e === void 0 ? void 0 : I(e),
2449
+ rows: [...M.map((t) => {
2376
2450
  let n = t.points.find((t) => t.timestamp === e);
2377
2451
  return {
2378
2452
  id: t.id,
2379
2453
  label: t.label,
2380
2454
  tone: t.tone,
2381
- value: V(n?.value ?? null)
2455
+ value: R(n?.value ?? null)
2382
2456
  };
2383
- }), ...Jn({
2384
- bands: L,
2457
+ }), ...Qn({
2458
+ bands: P,
2385
2459
  timestamp: e,
2386
- valueText: V
2460
+ valueText: R
2387
2461
  })],
2388
- notes: [...s.filter((t) => t.kind !== "event" && t.timestamp === e).map((e) => e.label), ...we.filter((t) => mn(U, t.timestamp) === e).map((e) => `${e.label} · ${B(e.timestamp)}`)]
2462
+ notes: [...s.filter((t) => t.kind !== "event" && t.timestamp === e).map((e) => e.label), ...W.filter((t) => vn(ye, t.timestamp) === e).map((e) => `${e.label} · ${I(e.timestamp)}`)]
2389
2463
  };
2390
2464
  }
2391
- let K = U[0] ?? 0, q = U.at(-1) ?? K, Te = {
2392
- width: k.width,
2393
- height: k.height,
2394
- value: Gn({
2465
+ let K = ye[0] ?? 0, q = ye.at(-1) ?? K, Te = {
2466
+ width: O.width,
2467
+ height: O.height,
2468
+ value: Yn({
2395
2469
  format: i,
2396
2470
  tickFormat: a,
2397
2471
  label: o
2398
2472
  }),
2399
- valueDomain: Kn({
2400
- series: t,
2401
- isStacked: u,
2402
- isZeroBased: l === "area",
2473
+ valueDomain: Xn({
2474
+ series: e,
2475
+ isStacked: d,
2476
+ isZeroBased: u === "area",
2403
2477
  bands: h,
2404
- crossings: g
2478
+ crossings: _
2405
2479
  }),
2406
- timeDomain: Yt(Wn(K, n), Wn(q, n)),
2480
+ timeDomain: $t(Jn(K, n), Jn(q, n)),
2407
2481
  timeFormat: r,
2408
- locale: E,
2409
- gutter: f,
2482
+ locale: w,
2483
+ gutter: p,
2410
2484
  hasValueTitle: o !== void 0
2411
- }, Ee = v(Te), Oe = Pn({
2412
- instants: we,
2413
- x: (e) => Ee.x.position(Wn(e, n)),
2485
+ }, Ee = b(Te), De = Rn({
2486
+ instants: W,
2487
+ x: (e) => Ee.x.position(Jn(e, n)),
2414
2488
  right: Ee.box.right
2415
- }), ke = v({
2489
+ }), Oe = b({
2416
2490
  ...Te,
2417
- topInset: Fn(Oe)
2418
- }), { box: X } = ke;
2419
- function Z(e) {
2420
- return ke.x.position(Wn(e, n));
2491
+ topInset: zn(De)
2492
+ }), { box: J } = Oe;
2493
+ function Y(e) {
2494
+ return Oe.x.position(Jn(e, n));
2421
2495
  }
2422
- let Q = ke.y.position;
2496
+ let Q = Oe.y.position;
2423
2497
  function Ae(e) {
2424
- return `${B(e[0])} to ${B(e[1])}`;
2498
+ return `${I(e[0])} to ${I(e[1])}`;
2425
2499
  }
2426
- let je = y !== void 0 && b !== void 0 && q !== K ? {
2500
+ let je = y !== void 0 && x !== void 0 && q !== K ? {
2427
2501
  onRangeChange: y,
2428
- rangeStep: b
2429
- } : void 0, Me = U.map((e) => ({
2502
+ rangeStep: x
2503
+ } : void 0, Me = ye.map((e) => ({
2430
2504
  id: String(e),
2431
- x: Z(e),
2505
+ x: Y(e),
2432
2506
  y: 0
2433
2507
  }));
2434
- return /* @__PURE__ */ J("div", {
2508
+ return /* @__PURE__ */ X("div", {
2435
2509
  className: "xeuugli",
2436
- children: /* @__PURE__ */ J(ee, {
2437
- items: fe,
2438
- readout: (e) => re(G(Number(e))),
2439
- locate: Se({
2510
+ children: /* @__PURE__ */ X(l, {
2511
+ items: de,
2512
+ readout: (e) => ae(G(Number(e))),
2513
+ locate: Ce({
2440
2514
  marks: Me,
2441
- width: X.width,
2442
- height: X.height,
2515
+ width: J.width,
2516
+ height: J.height,
2443
2517
  axis: "x"
2444
2518
  }),
2445
- revision: _e,
2446
- inspected: d?.id,
2447
- onInspectedChange: d?.onChange,
2448
- within: d?.within,
2449
- render: (t, { inspected: r, cursor: i }) => {
2450
- let a = r === null ? void 0 : Number(r), c = G(d === void 0 || d.isSource ? a : void 0), f = /* @__PURE__ */ Y(me, {
2451
- plotRef: k.ref,
2452
- box: X,
2453
- label: m({
2454
- title: T,
2519
+ revision: V,
2520
+ inspected: f?.id,
2521
+ onInspectedChange: f?.onChange,
2522
+ within: f?.within,
2523
+ render: (e, { inspected: r, cursor: i }) => {
2524
+ let a = r === null ? void 0 : Number(r), c = G(f === void 0 || f.isSource ? a : void 0), l = /* @__PURE__ */ Z(ge, {
2525
+ plotRef: O.ref,
2526
+ box: J,
2527
+ label: g({
2528
+ title: C,
2455
2529
  marks: "observations",
2456
2530
  isSelectable: !1
2457
2531
  }),
2458
- readoutId: A,
2532
+ readoutId: k,
2459
2533
  children: [
2460
- /* @__PURE__ */ J(ce, {
2461
- box: X,
2462
- xTicks: p ? ke.xTicks : [],
2463
- yTicks: ke.yTicks,
2534
+ /* @__PURE__ */ X(ue, {
2535
+ box: J,
2536
+ xTicks: m ? Oe.xTicks : [],
2537
+ yTicks: Oe.yTicks,
2464
2538
  yTitle: o
2465
2539
  }),
2466
- /* @__PURE__ */ Y(ge, {
2467
- box: X,
2540
+ /* @__PURE__ */ Z(ve, {
2541
+ box: J,
2468
2542
  children: [
2469
- /* @__PURE__ */ J(In, {
2470
- bands: L,
2471
- x: Z,
2543
+ /* @__PURE__ */ X(Bn, {
2544
+ bands: P,
2545
+ x: Y,
2472
2546
  y: Q
2473
2547
  }),
2474
- F.map((e) => {
2548
+ M.map((e) => {
2475
2549
  let t = e.points.map((e) => ({
2476
- x: Z(e.timestamp),
2550
+ x: Y(e.timestamp),
2477
2551
  y: e.value === null ? null : Q(e.value + e.base)
2478
2552
  })), n = e.points.map((e) => ({
2479
- x: Z(e.timestamp),
2553
+ x: Y(e.timestamp),
2480
2554
  y0: e.value === null ? null : Q(e.base),
2481
2555
  y1: e.value === null ? null : Q(e.value + e.base)
2482
2556
  }));
2483
- return /* @__PURE__ */ Y("g", { children: [
2484
- l === "area" && /* @__PURE__ */ J(pe, {
2485
- d: xe(n),
2557
+ return /* @__PURE__ */ Z("g", { children: [
2558
+ u === "area" && /* @__PURE__ */ X(he, {
2559
+ d: Se(n),
2486
2560
  tone: e.tone,
2487
- isPale: !u
2561
+ isPale: !d
2488
2562
  }),
2489
- /* @__PURE__ */ J(ue, {
2490
- d: be(t),
2563
+ /* @__PURE__ */ X(fe, {
2564
+ d: U(t),
2491
2565
  tone: e.tone
2492
2566
  }),
2493
- ye(t).map((t) => /* @__PURE__ */ J(I, {
2567
+ xe(t).map((t) => /* @__PURE__ */ X(L, {
2494
2568
  x: t.x,
2495
2569
  y: t.y,
2496
2570
  tone: e.tone,
2497
- radius: Vn
2571
+ radius: Gn
2498
2572
  }, t.x))
2499
2573
  ] }, e.id);
2500
2574
  }),
2501
- g.map((e) => /* @__PURE__ */ J(le, {
2502
- x1: X.left,
2503
- x2: X.right,
2575
+ _.map((e) => /* @__PURE__ */ X(B, {
2576
+ x1: J.left,
2577
+ x2: J.right,
2504
2578
  y1: Q(e.value),
2505
2579
  y2: Q(e.value)
2506
2580
  }, e.id)),
2507
2581
  s.map((e) => {
2508
- if (e.kind === "time") return /* @__PURE__ */ J(de, {
2509
- x: Z(e.timestamp),
2510
- top: X.top,
2511
- bottom: X.bottom
2582
+ if (e.kind === "time") return /* @__PURE__ */ X(pe, {
2583
+ x: Y(e.timestamp),
2584
+ top: J.top,
2585
+ bottom: J.bottom
2512
2586
  }, e.id);
2513
- let t = F.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base;
2514
- return e.kind === "point" ? /* @__PURE__ */ J(R, {
2515
- x: Z(e.timestamp),
2587
+ let t = M.find((t) => t.id === e.seriesId)?.points.find((t) => t.timestamp === e.timestamp)?.base;
2588
+ return e.kind === "point" ? /* @__PURE__ */ X(z, {
2589
+ x: Y(e.timestamp),
2516
2590
  y: Q(e.value + (t ?? 0))
2517
2591
  }, e.id) : void 0;
2518
2592
  }),
2519
- a !== void 0 && /* @__PURE__ */ J(de, {
2520
- x: Z(a),
2521
- top: X.top,
2522
- bottom: X.bottom
2593
+ a !== void 0 && /* @__PURE__ */ X(pe, {
2594
+ x: Y(a),
2595
+ top: J.top,
2596
+ bottom: J.bottom
2523
2597
  }),
2524
- a !== void 0 && F.flatMap((e) => {
2598
+ a !== void 0 && M.flatMap((e) => {
2525
2599
  let t = e.points.find((e) => e.timestamp === a);
2526
- return t === void 0 || t.value === null ? [] : [/* @__PURE__ */ J(I, {
2527
- x: Z(t.timestamp),
2600
+ return t === void 0 || t.value === null ? [] : [/* @__PURE__ */ X(L, {
2601
+ x: Y(t.timestamp),
2528
2602
  y: Q(t.value + t.base),
2529
2603
  tone: e.tone,
2530
2604
  isInspected: !0
@@ -2532,48 +2606,48 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2532
2606
  })
2533
2607
  ]
2534
2608
  }),
2535
- /* @__PURE__ */ J(Ln, {
2536
- placed: Oe,
2537
- x: Z,
2609
+ /* @__PURE__ */ X(Vn, {
2610
+ placed: De,
2611
+ x: Y,
2538
2612
  y: Q,
2539
- top: X.top,
2540
- bottom: X.bottom
2613
+ top: J.top,
2614
+ bottom: J.bottom
2541
2615
  }),
2542
- i !== null && /* @__PURE__ */ J(ne, {
2543
- x: Z(Number(i)),
2544
- top: X.top,
2545
- bottom: X.bottom,
2546
- width: Bn
2616
+ i !== null && /* @__PURE__ */ X(ie, {
2617
+ x: Y(Number(i)),
2618
+ top: J.top,
2619
+ bottom: J.bottom,
2620
+ width: Wn
2547
2621
  })
2548
2622
  ]
2549
2623
  });
2550
- return /* @__PURE__ */ Y(j, {
2624
+ return /* @__PURE__ */ Z(se, {
2551
2625
  ...S,
2552
- figure: t,
2553
- titleDetail: H ? void 0 : c.label,
2554
- series: ve,
2555
- seriesLegend: /* @__PURE__ */ J(M, {
2556
- id: A,
2626
+ figure: e,
2627
+ titleDetail: me ? void 0 : c.label,
2628
+ series: H,
2629
+ seriesLegend: /* @__PURE__ */ X(N, {
2630
+ id: k,
2557
2631
  label: c.label,
2558
- legend: ve,
2632
+ legend: H,
2559
2633
  rows: c.rows,
2560
- x: Z(a ?? K),
2561
- width: X.width,
2634
+ x: Y(a ?? K),
2635
+ width: J.width,
2562
2636
  notes: c.notes,
2563
- hasSeriesSummary: H
2637
+ hasSeriesSummary: me
2564
2638
  }),
2565
- children: [/* @__PURE__ */ J(ae, {
2566
- label: `${T} observations`,
2639
+ children: [/* @__PURE__ */ X(oe, {
2640
+ label: `${C} observations`,
2567
2641
  columns: [
2568
2642
  {
2569
2643
  id: "time",
2570
2644
  label: `Time (${n})`
2571
2645
  },
2572
- ...F.map((e) => ({
2646
+ ...M.map((e) => ({
2573
2647
  id: `series:${e.id}`,
2574
2648
  label: e.label
2575
2649
  })),
2576
- ...L.flatMap((e) => [{
2650
+ ...P.flatMap((e) => [{
2577
2651
  id: `band:${e.id}`,
2578
2652
  label: e.label
2579
2653
  }, {
@@ -2581,40 +2655,40 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2581
2655
  label: `${e.label}: ${e.rangeLabel}`
2582
2656
  }])
2583
2657
  ],
2584
- rows: z.map((e, t) => ({
2658
+ rows: F.map((e, t) => ({
2585
2659
  id: e.timestamp,
2586
2660
  values: [
2587
- B(e.timestamp),
2588
- ...F.map((e) => V(e.points[t]?.value ?? null)),
2589
- ...Jn({
2590
- bands: L,
2661
+ I(e.timestamp),
2662
+ ...M.map((e) => R(e.points[t]?.value ?? null)),
2663
+ ...Qn({
2664
+ bands: P,
2591
2665
  timestamp: e.timestamp,
2592
- valueText: V
2666
+ valueText: R
2593
2667
  }).map((e) => e.value)
2594
2668
  ]
2595
2669
  }))
2596
- }), /* @__PURE__ */ Y("div", {
2670
+ }), /* @__PURE__ */ Z("div", {
2597
2671
  className: "xrvj5dj x1n8ia3y",
2598
2672
  children: [
2599
- je === void 0 ? f : /* @__PURE__ */ J(On, {
2600
- value: _,
2673
+ je === void 0 ? l : /* @__PURE__ */ X(Mn, {
2674
+ value: v,
2601
2675
  onValueChange: je.onRangeChange,
2602
2676
  min: K,
2603
2677
  max: q,
2604
2678
  step: je.rangeStep,
2605
2679
  describe: Ae,
2606
- label: `${T} time range`,
2607
- left: Z(K),
2608
- width: Z(q) - Z(K),
2609
- height: X.bottom,
2610
- children: f
2680
+ label: `${C} time range`,
2681
+ left: Y(K),
2682
+ width: Y(q) - Y(K),
2683
+ height: J.bottom,
2684
+ children: l
2611
2685
  }),
2612
- je !== void 0 && /* @__PURE__ */ Y("div", {
2686
+ je !== void 0 && /* @__PURE__ */ Z("div", {
2613
2687
  className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi x153jb6y xy8obcc xas2l8k xj0a0fe",
2614
- children: [/* @__PURE__ */ J("span", { children: _ === null ? "Drag on the plot with a mouse to select a range of time." : `Selected range: ${Ae(_)}` }), _ === null ? /* @__PURE__ */ J(e, {
2688
+ children: [/* @__PURE__ */ X("span", { children: v === null ? "Drag on the plot with a mouse to select a range of time." : `Selected range: ${Ae(v)}` }), v === null ? /* @__PURE__ */ X(t, {
2615
2689
  type: "button",
2616
2690
  onClick: (e) => {
2617
- De({ options: () => je }, "onRangeChange", ir({
2691
+ ke({ options: () => je }, "onRangeChange", cr({
2618
2692
  first: K,
2619
2693
  last: q,
2620
2694
  step: je.rangeStep
@@ -2624,10 +2698,10 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2624
2698
  });
2625
2699
  },
2626
2700
  children: "Select a range"
2627
- }) : /* @__PURE__ */ J(e, {
2701
+ }) : /* @__PURE__ */ X(t, {
2628
2702
  type: "button",
2629
2703
  onClick: (e) => {
2630
- De({ options: () => je }, "onRangeChange", null, {
2704
+ ke({ options: () => je }, "onRangeChange", null, {
2631
2705
  reason: "clear-press",
2632
2706
  event: e.nativeEvent
2633
2707
  });
@@ -2635,16 +2709,16 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2635
2709
  children: "Clear range"
2636
2710
  })]
2637
2711
  }),
2638
- s.length + Ce.length > 0 && /* @__PURE__ */ Y("ul", {
2712
+ s.length + be.length > 0 && /* @__PURE__ */ Z("ul", {
2639
2713
  className: "x78zum5 x1a02dak x1n8ia3y x1ghz6dp x1717udv xe8uvvx xy8obcc x153jb6y xj0a0fe",
2640
- children: [s.map((e) => /* @__PURE__ */ Y("li", { children: [
2641
- B(e.timestamp),
2714
+ children: [s.map((e) => /* @__PURE__ */ Z("li", { children: [
2715
+ I(e.timestamp),
2642
2716
  " · ",
2643
2717
  e.label,
2644
- e.kind === "point" && ` · ${V(e.value)}`
2645
- ] }, e.id)), Ce.map((e) => /* @__PURE__ */ J("li", { children: Yn({
2718
+ e.kind === "point" && ` · ${R(e.value)}`
2719
+ ] }, e.id)), be.map((e) => /* @__PURE__ */ X("li", { children: $n({
2646
2720
  found: e,
2647
- timeText: B
2721
+ timeText: I
2648
2722
  }) }, e.crossing.id))]
2649
2723
  })
2650
2724
  ]
@@ -2654,7 +2728,7 @@ function nr({ series: t, timestampUnit: n, timeFormat: r, valueFormat: i, tickFo
2654
2728
  })
2655
2729
  });
2656
2730
  }
2657
- function rr({ range: e, rangeStep: t, isSelectable: n, timeline: r }) {
2731
+ function sr({ range: e, rangeStep: t, isSelectable: n, timeline: r }) {
2658
2732
  let i = r[0], a = r.at(-1);
2659
2733
  if (!n || i === void 0 || a === void 0) return;
2660
2734
  let o = a - i;
@@ -2663,8 +2737,8 @@ function rr({ range: e, rangeStep: t, isSelectable: n, timeline: r }) {
2663
2737
  if (e !== null && (!(e[0] >= i && e[1] <= a) || e[0] >= e[1])) return "The selected range must have ordered ends inside the observed time.";
2664
2738
  }
2665
2739
  }
2666
- function ir({ first: e, last: t, step: n }) {
2667
- let r = Math.max(1, Math.round((t - e) / Hn / n)) * n, i = Math.min(e + r, t - n);
2740
+ function cr({ first: e, last: t, step: n }) {
2741
+ let r = Math.max(1, Math.round((t - e) / Kn / n)) * n, i = Math.min(e + r, t - n);
2668
2742
  return [i, Math.min(t, Math.max(i + n, t - r))];
2669
2743
  }
2670
- export { Qn as a, $ as c, Pt as d, ht as f, tr as i, Vt as l, st as m, Xn as n, sn as o, dt as p, er as r, an as s, Zn as t, Ft as u };
2744
+ export { nr as a, $ as c, Lt as d, vt as f, ar as i, Wt as l, ut as m, er as n, dn as o, mt as p, ir as r, ln as s, tr as t, Rt as u };