@mechane-ai/elements 0.67.0 → 0.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/ai.js +226 -225
  2. package/dist/{article-anMy8fA5.js → article-CTSxWe4y.js} +104 -89
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +131 -1
  5. package/dist/{categorical-values-Bh7ZkEQn.js → categorical-values-DwomVcSd.js} +1 -1
  6. package/dist/{cells-X8SVrZBc.js → cells-BRI8LpMU.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/cells.js +1 -1
  9. package/dist/charts/comparison.js +1 -1
  10. package/dist/charts/distribution.js +1 -1
  11. package/dist/charts/figure.js +12 -12
  12. package/dist/charts/graph.js +1 -1
  13. package/dist/charts/hierarchy.js +1 -1
  14. package/dist/charts/image.js +1 -1
  15. package/dist/charts/matrix.js +2 -2
  16. package/dist/charts/plot.js +16 -15
  17. package/dist/charts/relationship.js +1 -1
  18. package/dist/charts/text.js +1 -1
  19. package/dist/charts/timeline.js +2 -2
  20. package/dist/charts/trend.js +1 -1
  21. package/dist/charts.js +3 -3
  22. package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
  23. package/dist/content/markdown.js +1 -1
  24. package/dist/content.js +1 -1
  25. package/dist/{dumbbell-plot-BQDGe0sQ.js → dumbbell-plot-S4RyfxmW.js} +5 -5
  26. package/dist/{embedding-map-DmmknG7A.js → embedding-map-Bm7aTA6z.js} +5 -5
  27. package/dist/figure-format-BVb7yFCA.js +46 -0
  28. package/dist/{figure-frame-DlyNTDzh.js → figure-frame-BHCNceS4.js} +1 -1
  29. package/dist/{image-grid-CxEAQvTf.js → image-grid-TTrLxvaI.js} +3 -3
  30. package/dist/kits/evaluation.js +5 -5
  31. package/dist/kits/interpretability.js +8 -8
  32. package/dist/kits/operations.js +4 -4
  33. package/dist/kits/research.js +1087 -230
  34. package/dist/kits/training.js +4 -4
  35. package/dist/lesson.js +3 -3
  36. package/dist/locate-Dcq5ZZSk.js +14 -0
  37. package/dist/markdown-JeuBeMDZ.js +293 -0
  38. package/dist/mdx.js +4 -4
  39. package/dist/packages/charts/src/plot/index.d.ts +3 -0
  40. package/dist/packages/charts/src/plot/locate.d.ts +3 -1
  41. package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
  42. package/dist/packages/charts/src/plot/spatial-layer.d.ts +36 -0
  43. package/dist/packages/charts/src/plot/step-history.d.ts +13 -0
  44. package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
  45. package/dist/packages/content/src/timeline-scrubber.d.ts +3 -1
  46. package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
  47. package/dist/packages/kits/src/research/index.d.ts +14 -0
  48. package/dist/packages/kits/src/research/motion-clip.d.ts +3 -0
  49. package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
  50. package/dist/packages/kits/src/research/motion-figure.d.ts +12 -0
  51. package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
  52. package/dist/packages/kits/src/research/motion-inspection.d.ts +14 -0
  53. package/dist/packages/kits/src/research/motion-location.d.ts +9 -0
  54. package/dist/packages/kits/src/research/motion-scene.d.ts +29 -0
  55. package/dist/packages/kits/src/research/motion-types.d.ts +54 -0
  56. package/dist/packages/kits/src/research/motion-view.d.ts +9 -0
  57. package/dist/packages/kits/src/research/native-motion-figure.d.ts +17 -0
  58. package/dist/packages/kits/src/research/native-motion.d.ts +18 -0
  59. package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
  60. package/dist/{param-CKr8EYxF.js → param-Dk92C-K1.js} +1 -1
  61. package/dist/plot-BIYlgY2B.js +223 -0
  62. package/dist/{plot-layout-CVzSbcU7.js → plot-layout-CNNFMC8H.js} +152 -102
  63. package/dist/{plot-surface-CBhI1alw.js → plot-surface-BSjoNIva.js} +1 -1
  64. package/dist/{reference-lines-C970JwWZ.js → reference-lines-Bet_hRyA.js} +1 -1
  65. package/dist/{scene-C3dCxckI.js → scene-C88Xkz4l.js} +7 -7
  66. package/dist/scene.js +1 -1
  67. package/dist/{slope-chart-DekEJxsy.js → slope-chart-B6Mtcta2.js} +6 -6
  68. package/dist/{src-BsqbWDxS.js → src-DCozYUGI.js} +146 -131
  69. package/dist/styles2.css +16 -4
  70. package/dist/{time-series-BSNnijxf.js → time-series-DJk-2Mt0.js} +7 -7
  71. package/dist/{timeline-CnxfYSIg.js → timeline-BHpj7i7K.js} +4 -4
  72. package/dist/{token-heatmap-CJaXo56P.js → token-heatmap-DEqEaoGE.js} +273 -288
  73. package/dist/{token-predictions-Bi7aKPnh.js → token-predictions-Bjdh0K-A.js} +5 -5
  74. package/dist/{transport-CXj0DV6o.js → transport-DQ1yzsQl.js} +2 -2
  75. package/dist/{tree-diagram-BxOZsjr1.js → tree-diagram-BxSDOBFj.js} +4 -4
  76. package/dist/{treemap-B2yOAetT.js → treemap-DzHAp4ia.js} +5 -5
  77. package/dist/{use-tween-C1TWJwce.js → use-tween-DbXVZBR8.js} +1 -1
  78. package/dist/{violin-plot-W2L_2JRo.js → violin-plot-B4Cf38Y9.js} +5 -5
  79. package/dist/visible-motion-D6NwjGNz.js +24 -0
  80. package/dist/{waterfall-Bt73N2Ng.js → waterfall-C9_pHZzv.js} +4 -4
  81. package/package.json +1 -1
  82. package/recipes/recorded-motion.tsx +14 -0
  83. package/skills/review-elements/SKILL.md +6 -0
  84. package/skills/review-explainer/SKILL.md +4 -0
  85. package/skills/use-elements/SKILL.md +2 -0
  86. package/skills/use-elements/references/kits.md +33 -0
  87. package/skills/write-explainer/SKILL.md +5 -0
  88. package/dist/figure-format-B8kRZMlo.js +0 -36
  89. package/dist/locate-Bcg3QcP4.js +0 -11
  90. package/dist/markdown-Diffqqm7.js +0 -313
@@ -1,29 +1,30 @@
1
1
  import { r as e } from "./tokens.stylex-dF5CACEJ.js";
2
2
  import { d as t, l as n, s as r } from "./dates-OTq-xU33.js";
3
- import { A as i, D as a, E as o, M as s, O as c, S as l, a as u, j as d, k as f } from "./plot-layout-CVzSbcU7.js";
3
+ import { A as i, D as a, E as o, M as s, O as c, S as l, a as u, j as d, k as f } from "./plot-layout-CNNFMC8H.js";
4
4
  import { i as p } from "./chart-link-AE_xuxiP.js";
5
- import { n as m, r as h } from "./figure-format-B8kRZMlo.js";
6
- import { i as g, l as _, n as ee, r as te, t as ne } from "./figure-frame-DlyNTDzh.js";
7
- import { n as v, t as re } from "./plot-width-D3hTycYX.js";
8
- import { n as y, r as b, t as ie } from "./heatmap-scale-Zte6Ya-g.js";
9
- import { t as ae } from "./color-legend-CIo7DhXB.js";
10
- import { m as x } from "./values-963L6n1m.js";
11
- import * as S from "@stylexjs/stylex";
5
+ import { r as m } from "./figure-format-BVb7yFCA.js";
6
+ import { i as h, l as g, n as _, r as ee, t as te } from "./figure-frame-BHCNceS4.js";
7
+ import { n as ne, t as re } from "./plot-width-D3hTycYX.js";
8
+ import { n as v, r as y, t as ie } from "./heatmap-scale-Zte6Ya-g.js";
9
+ import { t as ae } from "./color-legend-4As8881l.js";
10
+ import { m as b } from "./values-963L6n1m.js";
11
+ import * as x from "@stylexjs/stylex";
12
12
  import { useId as oe, useRef as se } from "react";
13
- import { announce as ce, cellsToText as C, isRTL as le } from "@ui-sdk/core";
14
- import { Fragment as ue, jsx as w, jsxs as T } from "react/jsx-runtime";
13
+ import { announce as ce, cellsToText as S, isRTL as le } from "@ui-sdk/core";
14
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
15
+ import { dateFormatter as E } from "@ui-sdk/core/date";
15
16
  // packages/charts/src/matrix/matrix-cells.ts
16
- var E = {
17
+ var D = {
17
18
  digitPx: 7,
18
19
  insetPx: 5,
19
20
  sides: 2,
20
21
  percent: 100
21
22
  };
22
- function de(e) {
23
- return Math.floor((e - E.insetPx * E.sides) / E.digitPx);
23
+ function ue(e) {
24
+ return Math.floor((e - D.insetPx * D.sides) / D.digitPx);
24
25
  }
25
- function fe({ value: e, locale: t, format: n, capacity: r }) {
26
- let i = typeof n != "function" && n.style === "percent" ? e * E.percent : e;
26
+ function de({ value: e, locale: t, format: n, capacity: r }) {
27
+ let i = typeof n != "function" && n.style === "percent" ? e * D.percent : e;
27
28
  return (typeof n == "function" || !(typeof n != "function" && (e === 0 || Math.abs(i) >= 1)) ? [n] : [
28
29
  n,
29
30
  {
@@ -37,33 +38,33 @@ function fe({ value: e, locale: t, format: n, capacity: r }) {
37
38
  minimumFractionDigits: 0,
38
39
  maximumFractionDigits: 1
39
40
  }
40
- ]).map((n) => h({
41
+ ]).map((n) => m({
41
42
  value: e,
42
43
  locale: t,
43
44
  format: n
44
45
  })).find((e) => e.length <= r);
45
46
  }
46
- function pe(e, t, n) {
47
+ function fe(e, t, n) {
47
48
  switch (e.kind) {
48
49
  case "masked": return "×";
49
50
  case "missing": return "—";
50
51
  case "value": return n ? "!" : t ?? (e.value === 0 ? "0" : "•");
51
52
  }
52
53
  }
53
- function me({ cell: e, domain: t, locale: n, format: r }) {
54
+ function pe({ cell: e, domain: t, locale: n, format: r }) {
54
55
  if (e === void 0) return "Not supplied";
55
56
  switch (e.kind) {
56
- case "value": return `${h({
57
+ case "value": return `${m({
57
58
  value: e.value,
58
59
  locale: n,
59
60
  format: r
60
- })}${b(e.value, t) ? "" : " (outside domain)"}`;
61
+ })}${y(e.value, t) ? "" : " (outside domain)"}`;
61
62
  case "masked": return `Masked: ${e.reason}`;
62
63
  case "missing": return `Missing: ${e.reason}`;
63
64
  }
64
65
  }
65
66
  // packages/charts/src/matrix/matrix-mark.tsx
66
- var D = {
67
+ var O = {
67
68
  interactive: {
68
69
  kkrTdU: "x1ypdohk",
69
70
  k3XXqK: "x1t137rt",
@@ -87,7 +88,7 @@ var D = {
87
88
  $$css: !0
88
89
  }, { "--x-boxShadow": e ?? void 0 }]
89
90
  };
90
- function he({ view: e, isSelectable: t, appearance: n, children: r }) {
91
+ function me({ view: e, isSelectable: t, appearance: n, children: r }) {
91
92
  let i = e.isInspected || e.isSelected, o = t && e.cell !== void 0;
92
93
  return /* @__PURE__ */ w(a, {
93
94
  value: e.id,
@@ -100,19 +101,19 @@ function he({ view: e, isSelectable: t, appearance: n, children: r }) {
100
101
  }) : /* @__PURE__ */ w("span", { role: "img" }),
101
102
  "aria-label": e.label,
102
103
  title: e.label,
103
- ...S.props(...n, o && D.interactive, e.edges !== void 0 && D.edges(e.edges), i && D.marked, !i && e.isCursor && v.cursor),
104
+ ...x.props(...n, o && O.interactive, e.edges !== void 0 && O.edges(e.edges), i && O.marked, !i && e.isCursor && ne.cursor),
104
105
  children: r
105
106
  });
106
107
  }
107
108
  // packages/charts/src/matrix/matrix-range.ts
108
- function O(e, t) {
109
+ function k(e, t) {
109
110
  return e.findIndex((e) => e.id === t);
110
111
  }
111
- function ge(e, { rows: t, columns: n }) {
112
- if (e !== null) return [e.anchor, e.end].every((e) => O(t, e.rowId) >= 0 && O(n, e.columnId) >= 0) ? void 0 : "The cell range must refer to a supplied row and column at both corners.";
112
+ function he(e, { rows: t, columns: n }) {
113
+ if (e !== null) return [e.anchor, e.end].every((e) => k(t, e.rowId) >= 0 && k(n, e.columnId) >= 0) ? void 0 : "The cell range must refer to a supplied row and column at both corners.";
113
114
  }
114
- function _e(e, { rows: t, columns: n }) {
115
- let r = O(t, e.anchor.rowId), i = O(t, e.end.rowId), a = O(n, e.anchor.columnId), o = O(n, e.end.columnId);
115
+ function ge(e, { rows: t, columns: n }) {
116
+ let r = k(t, e.anchor.rowId), i = k(t, e.end.rowId), a = k(n, e.anchor.columnId), o = k(n, e.end.columnId);
116
117
  return {
117
118
  top: Math.min(r, i),
118
119
  bottom: Math.max(r, i),
@@ -120,23 +121,23 @@ function _e(e, { rows: t, columns: n }) {
120
121
  right: Math.max(a, o)
121
122
  };
122
123
  }
123
- function ve(e, t, n) {
124
+ function _e(e, t, n) {
124
125
  let r = t >= e.top && t <= e.bottom, i = n >= e.left && n <= e.right;
125
126
  return r && i;
126
127
  }
127
- var k = {
128
+ var A = {
128
129
  ArrowUp: -1,
129
130
  ArrowDown: 1
130
- }, ye = {
131
+ }, ve = {
131
132
  ArrowLeft: -1,
132
133
  ArrowRight: 1
133
134
  };
134
- function be({ key: e, range: t, from: n, isReversed: r, rows: i, columns: a }) {
135
- let o = t?.anchor ?? n, s = t?.end ?? n, c = O(i, s.rowId), l = O(a, s.columnId), u = a.length - 1, d = r ? -1 : 1, f = {
135
+ function ye({ key: e, range: t, from: n, isReversed: r, rows: i, columns: a }) {
136
+ let o = t?.anchor ?? n, s = t?.end ?? n, c = k(i, s.rowId), l = k(a, s.columnId), u = a.length - 1, d = r ? -1 : 1, f = {
136
137
  Home: 0,
137
138
  End: u
138
- }, p = ye[e], m = k[e] ?? 0, h = f[e] ?? (p === void 0 ? void 0 : l + p * d);
139
- if (h === void 0 && k[e] === void 0) return;
139
+ }, p = ve[e], m = A[e] ?? 0, h = f[e] ?? (p === void 0 ? void 0 : l + p * d);
140
+ if (h === void 0 && A[e] === void 0) return;
140
141
  let g = i[Math.max(0, Math.min(i.length - 1, c + m))], _ = a[Math.max(0, Math.min(u, h ?? l))];
141
142
  if (g !== void 0 && _ !== void 0) return {
142
143
  anchor: o,
@@ -146,7 +147,7 @@ function be({ key: e, range: t, from: n, isReversed: r, rows: i, columns: a }) {
146
147
  }
147
148
  };
148
149
  }
149
- function xe({ rows: e, columns: t }) {
150
+ function be({ rows: e, columns: t }) {
150
151
  let [n, r, i, a] = [
151
152
  e[0],
152
153
  e.at(-1),
@@ -164,24 +165,24 @@ function xe({ rows: e, columns: t }) {
164
165
  }
165
166
  };
166
167
  }
167
- function Se({ bounds: e, rows: t, columns: n, read: r }) {
168
+ function xe({ bounds: e, rows: t, columns: n, read: r }) {
168
169
  let i = t.slice(e.top, e.bottom + 1).map((t) => n.slice(e.left, e.right + 1).map((e) => r({
169
170
  rowId: t.id,
170
171
  columnId: e.id
171
172
  })));
172
- return C(i.map((e) => [...e]));
173
+ return S(i.map((e) => [...e]));
173
174
  }
174
- function A({ items: e, from: t, to: n, noun: r }) {
175
+ function j({ items: e, from: t, to: n, noun: r }) {
175
176
  let i = e[t]?.label ?? "", a = e[n]?.label ?? "";
176
177
  return t === n ? `${r} ${i}` : `${r}s ${i} to ${a}`;
177
178
  }
178
- function Ce({ bounds: e, rows: t, columns: n, count: r, rowNoun: i = "row", columnNoun: a = "column" }) {
179
- return `${r === 1 ? "1 cell" : `${r} cells`} selected: ${A({
179
+ function Se({ bounds: e, rows: t, columns: n, count: r, rowNoun: i = "row", columnNoun: a = "column" }) {
180
+ return `${r === 1 ? "1 cell" : `${r} cells`} selected: ${j({
180
181
  items: t,
181
182
  from: e.top,
182
183
  to: e.bottom,
183
184
  noun: i
184
- })}, ${A({
185
+ })}, ${j({
185
186
  items: n,
186
187
  from: e.left,
187
188
  to: e.right,
@@ -189,7 +190,7 @@ function Ce({ bounds: e, rows: t, columns: n, count: r, rowNoun: i = "row", colu
189
190
  })}`;
190
191
  }
191
192
  // packages/charts/src/matrix/matrix-strip.tsx
192
- var we = {
193
+ var Ce = {
193
194
  k1xSpc: "xrvj5dj",
194
195
  kumcoG: "xqketvx",
195
196
  k1C7PZ: "xuwhhnn",
@@ -198,11 +199,11 @@ var we = {
198
199
  k7Eaqz: "xeuugli",
199
200
  kMv6JI: "x1hz01jw",
200
201
  $$css: !0
201
- }, Te = {
202
+ }, we = {
202
203
  kKwaWg: "x1e87kdn",
203
204
  $$css: !0
204
- }, j = {
205
- grid: (e) => [we, { "--x-gridTemplateColumns": `minmax(48px, max-content) repeat(${e}, minmax(14px, 1fr))` == null ? void 0 : `minmax(48px, max-content) repeat(${e}, minmax(14px, 1fr))` }],
205
+ }, M = {
206
+ grid: (e) => [Ce, { "--x-gridTemplateColumns": `minmax(48px, max-content) repeat(${e}, minmax(14px, 1fr))` == null ? void 0 : `minmax(48px, max-content) repeat(${e}, minmax(14px, 1fr))` }],
206
207
  header: {
207
208
  k7Eaqz: "xeuugli",
208
209
  khDVqt: "xuxw1ft",
@@ -241,7 +242,7 @@ var we = {
241
242
  kLWn49: "xo5v014",
242
243
  $$css: !0
243
244
  },
244
- measured: (e) => [Te, { "--x-backgroundImage": `linear-gradient(${e}, ${e})` == null ? void 0 : `linear-gradient(${e}, ${e})` }],
245
+ measured: (e) => [we, { "--x-backgroundImage": `linear-gradient(${e}, ${e})` == null ? void 0 : `linear-gradient(${e}, ${e})` }],
245
246
  empty: {
246
247
  kWkggS: "x1r7kqkb",
247
248
  $$css: !0
@@ -256,7 +257,7 @@ var we = {
256
257
  kVAM5u: "x159tnba",
257
258
  $$css: !0
258
259
  }
259
- }, Ee = {
260
+ }, Te = {
260
261
  clip: {
261
262
  kVQacm: "xb3r6kr",
262
263
  kg5iWk: "xbrixnn",
@@ -268,7 +269,7 @@ var we = {
268
269
  k9WMMc: "x1yc453h",
269
270
  $$css: !0
270
271
  }
271
- }, M = {
272
+ }, N = {
272
273
  text: { $$css: !0 },
273
274
  mono: {
274
275
  kMv6JI: "xiard35",
@@ -276,22 +277,22 @@ var we = {
276
277
  $$css: !0
277
278
  }
278
279
  };
279
- function N(e) {
280
- let t = e.cell === void 0 || e.cell.kind === "masked" ? j.empty : j.dashed;
280
+ function P(e) {
281
+ let t = e.cell === void 0 || e.cell.kind === "masked" ? M.empty : M.dashed;
281
282
  return [
282
- j.cell,
283
- e.fill === void 0 ? t : j.measured(e.fill),
284
- e.marking === "outlined" && j.outlined
283
+ M.cell,
284
+ e.fill === void 0 ? t : M.measured(e.fill),
285
+ e.marking === "outlined" && M.outlined
285
286
  ];
286
287
  }
287
- function P(e) {
288
+ function F(e) {
288
289
  return e.cell?.kind === "value" && !e.isOutside ? "" : e.glyph;
289
290
  }
290
- function De({ rows: e, columns: t, rowTitle: n, columnTitle: r, font: i, headers: a, viewAt: o, isSelectable: s }) {
291
+ function Ee({ rows: e, columns: t, rowTitle: n, columnTitle: r, font: i, headers: a, viewAt: o, isSelectable: s }) {
291
292
  return /* @__PURE__ */ T("div", {
292
- ...S.props(j.grid(t.length)),
293
+ ...x.props(M.grid(t.length)),
293
294
  children: [
294
- r !== void 0 && /* @__PURE__ */ T(ue, { children: [/* @__PURE__ */ w("span", { "aria-hidden": !0 }), /* @__PURE__ */ w("span", {
295
+ r !== void 0 && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", { "aria-hidden": !0 }), /* @__PURE__ */ w("span", {
295
296
  "aria-hidden": !0,
296
297
  className: "xeuugli xuxw1ft xy8obcc xas2l8k xbixft xk4h15q x17d9j0x",
297
298
  children: r
@@ -304,7 +305,7 @@ function De({ rows: e, columns: t, rowTitle: n, columnTitle: r, font: i, headers
304
305
  t.map((e) => /* @__PURE__ */ w("span", {
305
306
  "aria-hidden": !0,
306
307
  title: e.label,
307
- ...S.props(j.header, Ee[a], M[i]),
308
+ ...x.props(M.header, Te[a], N[i]),
308
309
  children: e.axisLabel ?? e.label
309
310
  }, e.id)),
310
311
  e.map((e) => /* @__PURE__ */ T("div", {
@@ -312,18 +313,18 @@ function De({ rows: e, columns: t, rowTitle: n, columnTitle: r, font: i, headers
312
313
  children: [/* @__PURE__ */ w("span", {
313
314
  "aria-hidden": !0,
314
315
  title: e.label,
315
- ...S.props(j.rowLabel, M[i]),
316
+ ...x.props(M.rowLabel, N[i]),
316
317
  children: e.label
317
318
  }), t.map((t) => {
318
319
  let n = o(e.id, t.id);
319
320
  return n === void 0 ? /* @__PURE__ */ w("span", {
320
321
  "aria-hidden": !0,
321
322
  className: "xqtp20y"
322
- }, t.id) : /* @__PURE__ */ w(he, {
323
+ }, t.id) : /* @__PURE__ */ w(me, {
323
324
  view: n,
324
325
  isSelectable: s,
325
- appearance: N(n),
326
- children: P(n)
326
+ appearance: P(n),
327
+ children: F(n)
327
328
  }, t.id);
328
329
  })]
329
330
  }, e.id))
@@ -331,11 +332,11 @@ function De({ rows: e, columns: t, rowTitle: n, columnTitle: r, font: i, headers
331
332
  });
332
333
  }
333
334
  // packages/charts/src/matrix/matrix-types.ts
334
- function F(e, t) {
335
+ function I(e, t) {
335
336
  return JSON.stringify([e, t]);
336
337
  }
337
338
  // packages/charts/src/matrix/matrix-figure.tsx
338
- var I = { cells: 4096 }, L = 2, Oe = 2, ke = 7.5, Ae = 160, je = 12, Me = 8, R = 2, Ne = {
339
+ var L = { cells: 4096 }, R = 2, De = 2, Oe = 7.5, ke = 160, Ae = 12, je = 8, z = 2, Me = {
339
340
  shown: {
340
341
  min: 40,
341
342
  max: 56
@@ -344,10 +345,10 @@ var I = { cells: 4096 }, L = 2, Oe = 2, ke = 7.5, Ae = 160, je = 12, Me = 8, R =
344
345
  min: 16,
345
346
  max: 36
346
347
  }
347
- }, Pe = {
348
+ }, Ne = {
348
349
  kKwaWg: "x1e87kdn",
349
350
  $$css: !0
350
- }, z = {
351
+ }, B = {
351
352
  axisText: {
352
353
  k1xSpc: "x104kibb",
353
354
  kVQacm: "xb3r6kr",
@@ -411,7 +412,7 @@ var I = { cells: 4096 }, L = 2, Oe = 2, ke = 7.5, Ae = 160, je = 12, Me = 8, R =
411
412
  kcqcaj: "xss6m8b",
412
413
  $$css: !0
413
414
  },
414
- measured: (e) => [Pe, { "--x-backgroundImage": `linear-gradient(${e}, ${e})` == null ? void 0 : `linear-gradient(${e}, ${e})` }],
415
+ measured: (e) => [Ne, { "--x-backgroundImage": `linear-gradient(${e}, ${e})` == null ? void 0 : `linear-gradient(${e}, ${e})` }],
415
416
  missing: {
416
417
  kMwMTN: "x153jb6y",
417
418
  kWkggS: "x1r7kqkb",
@@ -432,25 +433,25 @@ var I = { cells: 4096 }, L = 2, Oe = 2, ke = 7.5, Ae = 160, je = 12, Me = 8, R =
432
433
  kMwMTN: "x153jb6y",
433
434
  $$css: !0
434
435
  }
435
- }, Fe = {
436
+ }, Pe = {
436
437
  shown: {
437
438
  k7Eaqz: "x1gjsuxi",
438
439
  kAzted: "x17oiadl",
439
440
  $$css: !0
440
441
  },
441
442
  hidden: { $$css: !0 }
442
- }, Ie = {
443
+ }, Fe = {
443
444
  text: { $$css: !0 },
444
445
  mono: {
445
446
  kMv6JI: "xiard35",
446
447
  khDVqt: "x1sdyfia",
447
448
  $$css: !0
448
449
  }
449
- }, Le = {
450
+ }, Ie = {
450
451
  value: void 0,
451
- masked: z.masked,
452
- missing: z.missing
453
- }, Re = 28, ze = /* @__PURE__ */ new Set([
452
+ masked: B.masked,
453
+ missing: B.missing
454
+ }, Le = 28, Re = /* @__PURE__ */ new Set([
454
455
  "ArrowLeft",
455
456
  "ArrowRight",
456
457
  "ArrowUp",
@@ -458,77 +459,77 @@ var I = { cells: 4096 }, L = 2, Oe = 2, ke = 7.5, Ae = 160, je = 12, Me = 8, R =
458
459
  "Home",
459
460
  "End"
460
461
  ]);
461
- function Be(t, n, r) {
462
- if (t === void 0 || !ve(t, n, r)) return;
462
+ function ze(t, n, r) {
463
+ if (t === void 0 || !_e(t, n, r)) return;
463
464
  let i = e.ink, a = [
464
- n === t.top ? `inset 0 ${L}px 0 0 ${i}` : void 0,
465
- n === t.bottom ? `inset 0 -${L}px 0 0 ${i}` : void 0,
466
- r === t.left ? `inset ${L}px 0 0 0 ${i}` : void 0,
467
- r === t.right ? `inset -${L}px 0 0 0 ${i}` : void 0
465
+ n === t.top ? `inset 0 ${R}px 0 0 ${i}` : void 0,
466
+ n === t.bottom ? `inset 0 -${R}px 0 0 ${i}` : void 0,
467
+ r === t.left ? `inset ${R}px 0 0 0 ${i}` : void 0,
468
+ r === t.right ? `inset -${R}px 0 0 0 ${i}` : void 0
468
469
  ].filter((e) => e !== void 0);
469
470
  return a.length === 0 ? void 0 : a.join(", ");
470
471
  }
471
- function Ve(e, { lineCharacters: t, font: n }) {
472
+ function Be(e, { lineCharacters: t, font: n }) {
472
473
  let r = Array.from(e).length;
473
474
  if (n === "mono" || r <= t) return r <= t;
474
475
  let i = e.split(/(?<=[\s-])/u);
475
- return r <= t * R && i.every((e) => Array.from(e).length <= t);
476
+ return r <= t * z && i.every((e) => Array.from(e).length <= t);
476
477
  }
477
- function He({ rows: e, columns: t, cells: n, domain: r, palette: i }) {
478
- let a = y({
478
+ function Ve({ rows: e, columns: t, cells: n, domain: r, palette: i }) {
479
+ let a = v({
479
480
  domain: r,
480
481
  palette: i
481
482
  });
482
483
  if (a !== null) return a;
483
- if (e.length * t.length > I.cells || n.length > I.cells) return `This matrix exceeds the ${I.cells}-cell render limit. Supply a smaller, labelled window.`;
484
+ if (e.length * t.length > L.cells || n.length > L.cells) return `This matrix exceeds the ${L.cells}-cell render limit. Supply a smaller, labelled window.`;
484
485
  if (!s(e) || !s(t) || !s(n)) return "Matrix rows, columns, and cells must have unique identifiers.";
485
486
  let o = new Set(e.map((e) => e.id)), c = new Set(t.map((e) => e.id));
486
- return n.some((e) => !o.has(e.rowId) || !c.has(e.columnId)) ? "Every matrix cell must refer to a supplied row and column." : n.some((e) => e.kind === "value" && !Number.isFinite(e.value)) ? "Measured matrix values must be finite. Use a missing cell for unavailable values." : new Set(n.map((e) => F(e.rowId, e.columnId))).size === n.length ? void 0 : "A matrix coordinate may contain only one cell.";
487
+ return n.some((e) => !o.has(e.rowId) || !c.has(e.columnId)) ? "Every matrix cell must refer to a supplied row and column." : n.some((e) => e.kind === "value" && !Number.isFinite(e.value)) ? "Measured matrix values must be finite. Use a missing cell for unavailable values." : new Set(n.map((e) => I(e.rowId, e.columnId))).size === n.length ? void 0 : "A matrix coordinate may contain only one cell.";
487
488
  }
488
- function Ue(e) {
489
+ function He(e) {
489
490
  return e?.kind === "value" ? String(e.value) : "";
490
491
  }
491
- function B(t) {
492
- let { emptyLabel: n, rows: r, columns: a, cells: s, domain: u, palette: f, valueFormat: m, glyphFormat: h = m, valueLabel: v, variant: y, rowTitle: x, columnTitle: C, rowNoun: ue, columnNoun: E, axisFont: D = "text", headers: O = "clip", cellValues: k = "shown", marking: ye, cellLabel: A = (e, t) => `${e.label} → ${t.label}`, valueText: we, copyText: Te = Ue, notes: j = [], problem: Ee, selected: M, onSelectedChange: N, cellRange: P = null, onCellRangeChange: I, ...L } = t, { locale: R, title: Pe } = L, B = oe(), V = se(null), H = re(), We = p();
493
- if (L.status === "loading") return /* @__PURE__ */ w(g, { ...L });
494
- let U = Ee ?? He({
492
+ function V(t) {
493
+ let { emptyLabel: n, rows: r, columns: a, cells: s, domain: u, palette: f, valueFormat: m, glyphFormat: ne = m, valueLabel: v, variant: b, rowTitle: S, columnTitle: C, rowNoun: E, columnNoun: D, axisFont: O = "text", headers: k = "clip", cellValues: A = "shown", marking: ve, cellLabel: j = (e, t) => `${e.label} → ${t.label}`, valueText: Ce, copyText: we = He, notes: M = [], problem: Te, selected: N, onSelectedChange: P, cellRange: F = null, onCellRangeChange: L, ...R } = t, { locale: z, title: Ne } = R, V = oe(), H = se(null), U = re(), Ue = p();
494
+ if (R.status === "loading") return /* @__PURE__ */ w(h, { ...R });
495
+ let W = Te ?? Ve({
495
496
  rows: r,
496
497
  columns: a,
497
498
  cells: s,
498
499
  domain: u,
499
500
  palette: f
500
- }) ?? ge(P, {
501
+ }) ?? he(F, {
501
502
  rows: r,
502
503
  columns: a
503
504
  });
504
- if (U !== void 0) return /* @__PURE__ */ w(te, {
505
- ...L,
506
- message: U
505
+ if (W !== void 0) return /* @__PURE__ */ w(ee, {
506
+ ...R,
507
+ message: W
507
508
  });
508
- let W = y === "strip", Ge = new Map(s.map((e) => [F(e.rowId, e.columnId), e]));
509
- function G(e, t) {
510
- return Ge.get(F(e, t));
509
+ let G = b === "strip", We = new Map(s.map((e) => [I(e.rowId, e.columnId), e]));
510
+ function K(e, t) {
511
+ return We.get(I(e, t));
511
512
  }
512
- function Ke(e) {
513
- return we?.(e) ?? me({
513
+ function Ge(e) {
514
+ return Ce?.(e) ?? pe({
514
515
  cell: e,
515
516
  domain: u,
516
- locale: R,
517
+ locale: z,
517
518
  format: m
518
519
  });
519
520
  }
520
- let qe = Math.max(Array.from(x ?? "").length, ...r.map((e) => Array.from(e.label).length)), K = Math.min(Ae, qe * ke) + je, Je = Ne[k], q = H.width - K - Oe * (a.length + 2), J = Math.min(Je.max, Math.max(Je.min, Math.floor(q / Math.max(1, a.length)))), Ye = Math.floor((J - Me) / ke), Xe = a.some((e) => !Ve(e.label, {
521
+ let Ke = Math.max(Array.from(S ?? "").length, ...r.map((e) => Array.from(e.label).length)), qe = Math.min(ke, Ke * Oe) + Ae, Je = Me[A], q = U.width - qe - De * (a.length + 2), J = Math.min(Je.max, Math.max(Je.min, Math.floor(q / Math.max(1, a.length)))), Ye = Math.floor((J - je) / Oe), Xe = a.some((e) => !Be(e.label, {
521
522
  lineCharacters: Ye,
522
- font: D
523
- })), Ze = de(J), Y = r.flatMap((e, t) => a.flatMap((n, r) => {
524
- let i = ye?.(e, n);
523
+ font: O
524
+ })), Ze = ue(J), Y = r.flatMap((e, t) => a.flatMap((n, r) => {
525
+ let i = ve?.(e, n);
525
526
  if (i === "hidden") return [];
526
- let a = G(e.id, n.id), o = a?.id ?? F(e.id, n.id), s = a?.kind === "value" && !b(a.value, u), c = a?.kind === "value" && k === "shown" ? fe({
527
+ let a = K(e.id, n.id), o = a?.id ?? I(e.id, n.id), s = a?.kind === "value" && !y(a.value, u), c = a?.kind === "value" && A === "shown" ? de({
527
528
  value: a.value,
528
- locale: R,
529
- format: h,
529
+ locale: z,
530
+ format: ne,
530
531
  capacity: Ze
531
- }) : "", l = a === void 0 ? "·" : pe(a, c, s);
532
+ }) : "", l = a === void 0 ? "·" : fe(a, c, s);
532
533
  return [{
533
534
  id: o,
534
535
  row: e,
@@ -537,39 +538,39 @@ function B(t) {
537
538
  columnIndex: r,
538
539
  cell: a,
539
540
  mark: i,
540
- label: `${A(e, n)}: ${Ke(a)}`,
541
+ label: `${j(e, n)}: ${Ge(a)}`,
541
542
  isOutside: s,
542
543
  glyph: l
543
544
  }];
544
- })), X = Y.length < r.length * a.length, Qe = Y.filter((e) => W || e.cell !== void 0).map(({ id: e, label: t }) => ({
545
+ })), X = Y.length < r.length * a.length, Qe = Y.filter((e) => G || e.cell !== void 0).map(({ id: e, label: t }) => ({
545
546
  id: e,
546
547
  label: t
547
- })), $e = new Map(Y.map((e) => [e.id, e])), Z = P === null ? void 0 : _e(P, {
548
+ })), $e = new Map(Y.map((e) => [e.id, e])), Z = F === null ? void 0 : ge(F, {
548
549
  rows: r,
549
550
  columns: a
550
- }), et = I !== void 0, tt = Z === void 0 ? void 0 : Ce({
551
+ }), et = L !== void 0, tt = Z === void 0 ? void 0 : Se({
551
552
  bounds: Z,
552
553
  rows: r,
553
554
  columns: a,
554
- rowNoun: ue,
555
- columnNoun: E,
556
- count: Y.filter((e) => ve(Z, e.rowIndex, e.columnIndex)).length
555
+ rowNoun: E,
556
+ columnNoun: D,
557
+ count: Y.filter((e) => _e(Z, e.rowIndex, e.columnIndex)).length
557
558
  });
558
559
  function Q(e, t, n) {
559
- if (I?.(e, {
560
+ if (L?.(e, {
560
561
  reason: t,
561
562
  event: n
562
563
  }), e !== null && t === "list-navigation") {
563
- let t = _e(e, {
564
+ let t = ge(e, {
564
565
  rows: r,
565
566
  columns: a
566
- }), n = Y.filter((e) => ve(t, e.rowIndex, e.columnIndex)).length;
567
- ce(Ce({
567
+ }), n = Y.filter((e) => _e(t, e.rowIndex, e.columnIndex)).length;
568
+ ce(Se({
568
569
  bounds: t,
569
570
  rows: r,
570
571
  columns: a,
571
- rowNoun: ue,
572
- columnNoun: E,
572
+ rowNoun: E,
573
+ columnNoun: D,
573
574
  count: n
574
575
  }));
575
576
  }
@@ -591,22 +592,22 @@ function B(t) {
591
592
  function it(e, t) {
592
593
  let n = e.ctrlKey || e.metaKey;
593
594
  if (n && e.key === "a") {
594
- let t = xe({
595
+ let t = be({
595
596
  rows: r,
596
597
  columns: a
597
598
  });
598
599
  t !== void 0 && (e.preventDefault(), Q(t, "list-navigation", e.nativeEvent));
599
600
  return;
600
601
  }
601
- if (e.key === "Escape" || !e.shiftKey && ze.has(e.key)) {
602
- P !== null && Q(null, "list-navigation", e.nativeEvent);
602
+ if (e.key === "Escape" || !e.shiftKey && Re.has(e.key)) {
603
+ F !== null && Q(null, "list-navigation", e.nativeEvent);
603
604
  return;
604
605
  }
605
606
  let i = nt(t);
606
607
  if (!e.shiftKey || n || e.altKey || i === void 0) return;
607
- let o = be({
608
+ let o = ye({
608
609
  key: e.key,
609
- range: P,
610
+ range: F,
610
611
  from: i,
611
612
  isReversed: le(e.currentTarget),
612
613
  rows: r,
@@ -617,43 +618,43 @@ function B(t) {
617
618
  function at(e, t) {
618
619
  let n = rt(e.target);
619
620
  n !== void 0 && (e.shiftKey ? Q({
620
- anchor: P?.anchor ?? nt(t) ?? n,
621
+ anchor: F?.anchor ?? nt(t) ?? n,
621
622
  end: n
622
- }, "item-press", e.nativeEvent) : (V.current = n, P !== null && Q(null, "item-press", e.nativeEvent)));
623
+ }, "item-press", e.nativeEvent) : (H.current = n, F !== null && Q(null, "item-press", e.nativeEvent)));
623
624
  }
624
625
  function ot(e) {
625
- let t = V.current, n = rt(e.target);
626
+ let t = H.current, n = rt(e.target);
626
627
  if (t === null || n === void 0 || e.buttons !== 1) return;
627
- let r = P?.end.rowId === n.rowId && P.end.columnId === n.columnId, i = P === null && t.rowId === n.rowId && t.columnId === n.columnId;
628
+ let r = F?.end.rowId === n.rowId && F.end.columnId === n.columnId, i = F === null && t.rowId === n.rowId && t.columnId === n.columnId;
628
629
  !r && !i && Q({
629
630
  anchor: t,
630
631
  end: n
631
632
  }, "drag", e.nativeEvent);
632
633
  }
633
634
  function st(e, t) {
634
- let n = nt(t), i = P ?? (n === void 0 ? void 0 : {
635
+ let n = nt(t), i = F ?? (n === void 0 ? void 0 : {
635
636
  anchor: n,
636
637
  end: n
637
638
  });
638
639
  if (i === void 0) return;
639
- let o = Se({
640
- bounds: _e(i, {
640
+ let o = xe({
641
+ bounds: ge(i, {
641
642
  rows: r,
642
643
  columns: a
643
644
  }),
644
645
  rows: r,
645
646
  columns: a,
646
- read: ({ rowId: e, columnId: t }) => $e.has(G(e, t)?.id ?? F(e, t)) ? Te(G(e, t)) : ""
647
+ read: ({ rowId: e, columnId: t }) => $e.has(K(e, t)?.id ?? I(e, t)) ? we(K(e, t)) : ""
647
648
  });
648
649
  e.preventDefault(), e.clipboardData.setData("text/plain", o);
649
650
  }
650
651
  function ct(t) {
651
652
  return new Map(Y.map((n) => {
652
- let { cell: r, isOutside: i } = n, a = n.mark === "context" ? `color-mix(in srgb, ${e.muted} ${Re}%, ${e.surface})` : r?.kind === "value" && !i ? ie(r.value, {
653
+ let { cell: r, isOutside: i } = n, a = n.mark === "context" ? `color-mix(in srgb, ${e.muted} ${Le}%, ${e.surface})` : r?.kind === "value" && !i ? ie(r.value, {
653
654
  domain: u,
654
655
  palette: f
655
656
  }) : void 0;
656
- return [F(n.row.id, n.column.id), {
657
+ return [I(n.row.id, n.column.id), {
657
658
  id: n.id,
658
659
  row: n.row,
659
660
  column: n.column,
@@ -663,31 +664,31 @@ function B(t) {
663
664
  fill: a,
664
665
  isOutside: i,
665
666
  marking: n.mark,
666
- edges: Be(Z, n.rowIndex, n.columnIndex),
667
- isSelected: r !== void 0 && M === r.id,
667
+ edges: ze(Z, n.rowIndex, n.columnIndex),
668
+ isSelected: r !== void 0 && N === r.id,
668
669
  isInspected: t.inspected === n.id,
669
670
  isCursor: t.cursor === n.id
670
671
  }];
671
672
  }));
672
673
  }
673
674
  let lt = r.length === 0 || a.length === 0, $ = d({
674
- title: Pe,
675
- isSelectable: N !== void 0
676
- }), ut = Y.some((e) => e.glyph === "•"), dt = W || k === "hidden", ft = [
675
+ title: Ne,
676
+ isSelectable: P !== void 0
677
+ }), ut = Y.some((e) => e.glyph === "•"), dt = G || A === "hidden", ft = [
677
678
  s.some((e) => e.kind === "masked") ? "× Masked" : void 0,
678
679
  s.some((e) => e.kind === "missing") ? "— Missing" : void 0,
679
680
  Y.some((e) => e.cell === void 0) ? "· Not supplied" : void 0,
680
- s.some((e) => e.kind === "value" && !b(e.value, u)) ? "! Outside domain" : void 0,
681
+ s.some((e) => e.kind === "value" && !y(e.value, u)) ? "! Outside domain" : void 0,
681
682
  dt ? "Inspect a cell for its exact value" : void 0,
682
683
  !dt && ut ? "• Inspect a cell for its exact value" : void 0,
683
- ...j,
684
+ ...M,
684
685
  et ? "Shift with the arrow keys or a drag marks a block to copy" : void 0
685
686
  ].filter((e) => e !== void 0);
686
687
  return /* @__PURE__ */ w(o, {
687
- ...We,
688
+ ...Ue,
688
689
  items: Qe,
689
- columns: W && !X ? a.length : void 0,
690
- place: W && !X ? void 0 : (e) => {
690
+ columns: G && !X ? a.length : void 0,
691
+ place: G && !X ? void 0 : (e) => {
691
692
  let t = $e.get(e);
692
693
  return t === void 0 ? void 0 : {
693
694
  left: t.columnIndex,
@@ -696,9 +697,9 @@ function B(t) {
696
697
  bottom: t.rowIndex + 1
697
698
  };
698
699
  },
699
- selected: M ?? null,
700
- onSelect: N === void 0 ? void 0 : (e, t) => {
701
- s.some((t) => t.id === e) && N(e, t);
700
+ selected: N ?? null,
701
+ onSelect: P === void 0 ? void 0 : (e, t) => {
702
+ s.some((t) => t.id === e) && P(e, t);
702
703
  },
703
704
  render: (e, t) => {
704
705
  let o = ct(t), s = {
@@ -708,19 +709,19 @@ function B(t) {
708
709
  onPointerDown: (e) => at(e, t.cursor),
709
710
  onPointerMove: ot,
710
711
  onPointerUp: () => {
711
- V.current = null;
712
+ H.current = null;
712
713
  }
713
714
  } : {}
714
715
  };
715
- return /* @__PURE__ */ w(ee, {
716
- ...L,
716
+ return /* @__PURE__ */ w(_, {
717
+ ...R,
717
718
  figure: e,
718
719
  scaleLegend: lt ? void 0 : /* @__PURE__ */ w(ae, {
719
720
  label: v,
720
721
  domain: u,
721
722
  palette: f,
722
723
  valueFormat: m,
723
- locale: R
724
+ locale: z
724
725
  }),
725
726
  footer: lt ? void 0 : /* @__PURE__ */ T("div", {
726
727
  className: "xrvj5dj x1n8ia3y",
@@ -731,11 +732,11 @@ function B(t) {
731
732
  children: ft.map((e) => /* @__PURE__ */ w("li", { children: e }, e))
732
733
  }),
733
734
  /* @__PURE__ */ w(l, {
734
- id: B,
735
+ id: V,
735
736
  children: tt ?? i(Qe, t.inspected)
736
737
  }),
737
- /* @__PURE__ */ w(_, {
738
- label: `${Pe} cells`,
738
+ /* @__PURE__ */ w(g, {
739
+ label: `${Ne} cells`,
739
740
  columns: [{
740
741
  id: "cell",
741
742
  label: "Cell"
@@ -744,33 +745,33 @@ function B(t) {
744
745
  label: v
745
746
  }],
746
747
  rows: Y.map((e) => ({
747
- id: F(e.row.id, e.column.id),
748
- values: [A(e.row, e.column), Ke(e.cell)]
748
+ id: I(e.row.id, e.column.id),
749
+ values: [j(e.row, e.column), Ge(e.cell)]
749
750
  }))
750
751
  })
751
752
  ]
752
753
  }),
753
- children: lt ? /* @__PURE__ */ w(ne, { children: n }) : /* @__PURE__ */ w("div", {
754
- ref: H.ref,
754
+ children: lt ? /* @__PURE__ */ w(te, { children: n }) : /* @__PURE__ */ w("div", {
755
+ ref: U.ref,
755
756
  className: "xeuugli",
756
757
  children: /* @__PURE__ */ w(c, {
757
758
  role: "group",
758
759
  "aria-label": $,
759
- "aria-describedby": B,
760
+ "aria-describedby": V,
760
761
  ...s,
761
762
  ...{
762
763
  0: { className: "xysyzu8 x159tps6 xeuugli x1t137rt x13qnu6 x19rmrnh x9v5kkp x1bqaal x-default-marker" },
763
764
  1: { className: "xysyzu8 x159tps6 xeuugli x1t137rt x13qnu6 x19rmrnh x9v5kkp x1bqaal x10dazmo x-default-marker" }
764
- }[!!W | 0],
765
- children: W ? /* @__PURE__ */ w(De, {
765
+ }[!!G | 0],
766
+ children: G ? /* @__PURE__ */ w(Ee, {
766
767
  rows: r,
767
768
  columns: a,
768
- rowTitle: x,
769
+ rowTitle: S,
769
770
  columnTitle: C,
770
- font: D,
771
- headers: O,
772
- viewAt: (e, t) => o.get(F(e, t)),
773
- isSelectable: N !== void 0
771
+ font: O,
772
+ headers: k,
773
+ viewAt: (e, t) => o.get(I(e, t)),
774
+ isSelectable: P !== void 0
774
775
  }) : /* @__PURE__ */ T("table", {
775
776
  className: "x1vathgz x1jkpq5q xezivpi x1hz01jw",
776
777
  children: [/* @__PURE__ */ T("thead", { children: [C !== void 0 && /* @__PURE__ */ T("tr", { children: [/* @__PURE__ */ w("td", {}), /* @__PURE__ */ w("th", {
@@ -780,7 +781,7 @@ function B(t) {
780
781
  children: C
781
782
  })] }), /* @__PURE__ */ T("tr", { children: [/* @__PURE__ */ w("th", {
782
783
  className: "x1717udv xy8obcc xas2l8k x1yc453h xuxw1ft xbixft xk4h15q xngumbj",
783
- children: x
784
+ children: S
784
785
  }), a.map((e) => /* @__PURE__ */ w("th", {
785
786
  scope: "col",
786
787
  title: e.label,
@@ -789,7 +790,7 @@ function B(t) {
789
790
  1: { className: "x1717udv xy8obcc xas2l8k xj57cvi x153jb6y xuxw1ft x3ajldb x2b8uid" }
790
791
  }[!!Xe | 0],
791
792
  children: /* @__PURE__ */ w("span", {
792
- ...S.props(Xe ? z.rotated : [z.axisText, z.width(J)], Ie[D]),
793
+ ...x.props(Xe ? B.rotated : [B.axisText, B.width(J)], Fe[O]),
793
794
  children: e.label
794
795
  })
795
796
  }, e.id))] })] }), /* @__PURE__ */ w("tbody", { children: r.map((e) => /* @__PURE__ */ T("tr", { children: [/* @__PURE__ */ w("th", {
@@ -797,25 +798,25 @@ function B(t) {
797
798
  title: e.label,
798
799
  className: "x1717udv xy8obcc xas2l8k xj57cvi x153jb6y x1yc453h xuxw1ft",
799
800
  children: /* @__PURE__ */ w("span", {
800
- ...S.props(z.rowText, Ie[D]),
801
+ ...x.props(B.rowText, Fe[O]),
801
802
  children: e.label
802
803
  })
803
804
  }), a.map((t) => {
804
- let n = o.get(F(e.id, t.id));
805
+ let n = o.get(I(e.id, t.id));
805
806
  return /* @__PURE__ */ w("td", {
806
- ...S.props(z.cell, z.width(J)),
807
- children: n === void 0 ? null : /* @__PURE__ */ w(he, {
807
+ ...x.props(B.cell, B.width(J)),
808
+ children: n === void 0 ? null : /* @__PURE__ */ w(me, {
808
809
  view: n,
809
- isSelectable: N !== void 0,
810
+ isSelectable: P !== void 0,
810
811
  appearance: [
811
- z.value,
812
- z.square(J),
813
- Fe[k],
814
- n.cell === void 0 ? z.missing : Le[n.cell.kind],
815
- n.fill !== void 0 && z.measured(n.fill),
816
- n.isOutside && z.missing,
817
- n.marking === "outlined" && z.outlined,
818
- n.marking === "context" && z.context
812
+ B.value,
813
+ B.square(J),
814
+ Pe[A],
815
+ n.cell === void 0 ? B.missing : Ie[n.cell.kind],
816
+ n.fill !== void 0 && B.measured(n.fill),
817
+ n.isOutside && B.missing,
818
+ n.marking === "outlined" && B.outlined,
819
+ n.marking === "context" && B.context
819
820
  ],
820
821
  children: n.cell?.kind === "value" ? /* @__PURE__ */ w("span", {
821
822
  className: "xpvm0e4 x1r97e56",
@@ -832,47 +833,47 @@ function B(t) {
832
833
  });
833
834
  }
834
835
  // packages/charts/src/matrix/matrix-presets.ts
835
- function V({ rows: e, columns: t, values: n, noun: r, limit: i }) {
836
+ function H({ rows: e, columns: t, values: n, noun: r, limit: i }) {
836
837
  return e.length > i || t.length > i ? `This matrix draws at most ${i} ${r} on each side. Supply a smaller, labelled window.` : !s(e) || !s(t) ? `Matrix ${r} must have unique identifiers.` : n.length === e.length && n.every((e) => e.length === t.length) ? void 0 : `Supply one line of values per row and one value per column, for every ${r}.`;
837
838
  }
838
- function H(e, t, n) {
839
+ function U(e, t, n) {
839
840
  return e[t]?.[n] ?? null;
840
841
  }
841
- function We(e) {
842
+ function Ue(e) {
842
843
  return e.replaceAll(" ", "␣").replaceAll("\n", "⏎").replaceAll(" ", "⇥");
843
844
  }
844
845
  // packages/charts/src/matrix/attention-matrix.tsx
845
- var U = { tokens: 64 }, W = "␣ space · ⏎ newline · ⇥ tab", Ge = {
846
+ var W = { tokens: 64 }, G = "␣ space · ⏎ newline · ⇥ tab", We = {
846
847
  minimumFractionDigits: 2,
847
848
  maximumFractionDigits: 2
848
849
  };
849
- function G(e) {
850
+ function K(e) {
850
851
  return `${e.index} ${JSON.stringify(e.text)}`;
851
852
  }
852
- function Ke({ sources: e, destinations: t, weights: n, mask: r }) {
853
- return [...e, ...t].some((e) => !Number.isSafeInteger(e.index) || e.index < 0) ? "Token positions must be whole numbers of zero or more." : [e, t].every((e) => new Set(e.map((e) => e.index)).size === e.length && s(e)) ? n.flat().some((e) => e !== null && !(e >= 0 && e <= 1)) ? "Attention weights must lie between 0 and 1. Use null for a weight that was not recorded." : r === "causal" && t.some((t, r) => e.some((e, i) => e.index > t.index && H(n, r, i) !== null)) ? "A pair under the causal mask must have a null weight, so masked never reads as zero." : void 0 : "Tokens on each side must have unique identifiers and positions.";
853
+ function Ge({ sources: e, destinations: t, weights: n, mask: r }) {
854
+ return [...e, ...t].some((e) => !Number.isSafeInteger(e.index) || e.index < 0) ? "Token positions must be whole numbers of zero or more." : [e, t].every((e) => new Set(e.map((e) => e.index)).size === e.length && s(e)) ? n.flat().some((e) => e !== null && !(e >= 0 && e <= 1)) ? "Attention weights must lie between 0 and 1. Use null for a weight that was not recorded." : r === "causal" && t.some((t, r) => e.some((e, i) => e.index > t.index && U(n, r, i) !== null)) ? "A pair under the causal mask must have a null weight, so masked never reads as zero." : void 0 : "Tokens on each side must have unique identifiers and positions.";
854
855
  }
855
- function qe(e) {
856
- let { sources: t, destinations: n, weights: r, mask: i = "none", valueLabel: a = "Attention weight", valueFormat: o = Ge, emptyLabel: s = "No tokens were supplied.", ...c } = e, l = n.map((e) => ({
856
+ function Ke(e) {
857
+ let { sources: t, destinations: n, weights: r, mask: i = "none", valueLabel: a = "Attention weight", valueFormat: o = We, emptyLabel: s = "No tokens were supplied.", ...c } = e, l = n.map((e) => ({
857
858
  id: e.id,
858
- label: We(e.text)
859
+ label: Ue(e.text)
859
860
  })), u = t.map((e) => ({
860
861
  id: e.id,
861
- label: We(e.text)
862
- })), d = new Map(t.map((e) => [e.id, e])), f = new Map(n.map((e) => [e.id, e])), p = V({
862
+ label: Ue(e.text)
863
+ })), d = new Map(t.map((e) => [e.id, e])), f = new Map(n.map((e) => [e.id, e])), p = H({
863
864
  rows: l,
864
865
  columns: u,
865
866
  values: r,
866
867
  noun: "tokens",
867
- limit: U.tokens
868
- }) ?? Ke({
868
+ limit: W.tokens
869
+ }) ?? Ge({
869
870
  sources: t,
870
871
  destinations: n,
871
872
  weights: r,
872
873
  mask: i
873
874
  }), m = n.flatMap((e, n) => t.map((t, a) => {
874
- let o = H(r, n, a), s = {
875
- id: F(e.id, t.id),
875
+ let o = U(r, n, a), s = {
876
+ id: I(e.id, t.id),
876
877
  rowId: e.id,
877
878
  columnId: t.id
878
879
  };
@@ -892,9 +893,9 @@ function qe(e) {
892
893
  }));
893
894
  function h(e, t) {
894
895
  let n = f.get(e.id), r = d.get(t.id);
895
- return r === void 0 || n === void 0 ? `${e.id} → ${t.id}` : `Destination ${G(n)} attends to source ${G(r)}`;
896
+ return r === void 0 || n === void 0 ? `${e.id} → ${t.id}` : `Destination ${K(n)} attends to source ${K(r)}`;
896
897
  }
897
- return /* @__PURE__ */ w(B, {
898
+ return /* @__PURE__ */ w(V, {
898
899
  ...c,
899
900
  emptyLabel: s,
900
901
  problem: p,
@@ -912,11 +913,11 @@ function qe(e) {
912
913
  columnNoun: "source",
913
914
  axisFont: "mono",
914
915
  cellLabel: h,
915
- notes: [...t, ...n].some((e) => /\s/u.test(e.text)) ? [W] : []
916
+ notes: [...t, ...n].some((e) => /\s/u.test(e.text)) ? [G] : []
916
917
  });
917
918
  }
918
919
  // packages/charts/src/matrix/calendar-heatmap.tsx
919
- var K = { days: 1096 }, Je = [
920
+ var qe = { days: 1096 }, Je = [
920
921
  "sunday",
921
922
  "monday",
922
923
  "tuesday",
@@ -952,26 +953,14 @@ function $e({ from: e, to: n, weekStartsOn: i, locale: a }) {
952
953
  let n = r(c, t);
953
954
  return {
954
955
  id: Je[(o + t) % q] ?? i,
955
- label: m({
956
- timestamp: u(n),
957
- locale: a,
958
- format: Xe
959
- })
956
+ label: E(a, Xe).format(u(n))
960
957
  };
961
958
  }), f = Array.from({ length: l }, (i, o) => {
962
959
  let s = r(c, o * q), l = Array.from({ length: q }, (e, t) => r(s, t)).filter((t) => X(t) >= X(e) && X(t) <= X(n)), d = l.find((e) => e.day === 1) ?? (o === 0 ? l[0] : void 0);
963
960
  return {
964
961
  id: t(s),
965
- label: `Week of ${m({
966
- timestamp: u(l[0] ?? s),
967
- locale: a,
968
- format: Y
969
- })}`,
970
- axisLabel: d === void 0 ? "" : m({
971
- timestamp: u(d),
972
- locale: a,
973
- format: Ze
974
- })
962
+ label: `Week of ${E(a, Y).format(u(l[0] ?? s))}`,
963
+ axisLabel: d === void 0 ? "" : E(a, Ze).format(u(d))
975
964
  };
976
965
  }), p = X(n) - X(e) + 1;
977
966
  return {
@@ -988,14 +977,14 @@ function $e({ from: e, to: n, weekStartsOn: i, locale: a }) {
988
977
  };
989
978
  }
990
979
  function Z({ days: e, from: t, to: r }) {
991
- return t === void 0 || r === void 0 || X(r) < X(t) ? "The range needs two valid dates as YYYY-MM-DD, the first on or before the last." : X(r) - X(t) + 1 > K.days ? `This calendar draws at most ${K.days} days. Supply a shorter range.` : e.map((e) => n(e.date)).some((e) => e === void 0 || X(e) < X(t) || X(e) > X(r)) ? "Every day must be a valid YYYY-MM-DD date inside the range." : new Set(e.map((e) => e.date)).size === e.length ? e.some((e) => e.value !== null && !Number.isFinite(e.value)) ? "Day values must be finite. Use null for a day without a value." : void 0 : "Each date may appear only once.";
980
+ return t === void 0 || r === void 0 || X(r) < X(t) ? "The range needs two valid dates as YYYY-MM-DD, the first on or before the last." : X(r) - X(t) + 1 > qe.days ? `This calendar draws at most ${qe.days} days. Supply a shorter range.` : e.map((e) => n(e.date)).some((e) => e === void 0 || X(e) < X(t) || X(e) > X(r)) ? "Every day must be a valid YYYY-MM-DD date inside the range." : new Set(e.map((e) => e.date)).size === e.length ? e.some((e) => e.value !== null && !Number.isFinite(e.value)) ? "Day values must be finite. Use null for a day without a value." : void 0 : "Each date may appear only once.";
992
981
  }
993
982
  function et(e) {
994
- let { days: t, range: r, weekStartsOn: i, valueLabel: a, valueFormat: o, domain: s, emptyLabel: c = "No days were supplied.", ...l } = e, { locale: d } = l, f = n(r.from), p = n(r.to), h = Z({
983
+ let { days: t, range: r, weekStartsOn: i, valueLabel: a, valueFormat: o, domain: s, emptyLabel: c = "No days were supplied.", ...l } = e, { locale: d } = l, f = n(r.from), p = n(r.to), m = Z({
995
984
  days: t,
996
985
  from: f,
997
986
  to: p
998
- }), g = h === void 0 && t.length > 0 && f !== void 0 && p !== void 0 ? $e({
987
+ }), h = m === void 0 && t.length > 0 && f !== void 0 && p !== void 0 ? $e({
999
988
  from: f,
1000
989
  to: p,
1001
990
  weekStartsOn: i,
@@ -1004,8 +993,8 @@ function et(e) {
1004
993
  rows: [],
1005
994
  columns: [],
1006
995
  dates: []
1007
- }, _ = new Map(t.map((e) => [e.date, e.value])), ee = new Map(g.dates.map((e) => [`${e.rowId} ${e.columnId}`, e.date])), te = g.dates.map(({ date: e, rowId: t, columnId: n }) => {
1008
- let r = _.get(e) ?? null;
996
+ }, g = new Map(t.map((e) => [e.date, e.value])), _ = new Map(h.dates.map((e) => [`${e.rowId} ${e.columnId}`, e.date])), ee = h.dates.map(({ date: e, rowId: t, columnId: n }) => {
997
+ let r = g.get(e) ?? null;
1009
998
  return r === null ? {
1010
999
  id: e,
1011
1000
  rowId: t,
@@ -1020,24 +1009,20 @@ function et(e) {
1020
1009
  value: r
1021
1010
  };
1022
1011
  });
1023
- function ne(e, t) {
1024
- return ee.get(`${e.id} ${t.id}`);
1012
+ function te(e, t) {
1013
+ return _.get(`${e.id} ${t.id}`);
1025
1014
  }
1026
- function v(e, t) {
1027
- let r = n(ne(e, t) ?? "");
1028
- return r === void 0 ? `${e.label}, ${t.label}` : m({
1029
- timestamp: X(r) * J,
1030
- locale: d,
1031
- format: Y
1032
- });
1015
+ function ne(e, t) {
1016
+ let r = n(te(e, t) ?? "");
1017
+ return r === void 0 ? `${e.label}, ${t.label}` : E(d, Y).format(X(r) * J);
1033
1018
  }
1034
- return /* @__PURE__ */ w(B, {
1019
+ return /* @__PURE__ */ w(V, {
1035
1020
  ...l,
1036
1021
  emptyLabel: c,
1037
- problem: h,
1038
- rows: g.rows,
1039
- columns: g.columns,
1040
- cells: te,
1022
+ problem: m,
1023
+ rows: h.rows,
1024
+ columns: h.columns,
1025
+ cells: ee,
1041
1026
  domain: s ?? u({
1042
1027
  values: t.map((e) => e.value),
1043
1028
  isZeroBased: !0
@@ -1049,8 +1034,8 @@ function et(e) {
1049
1034
  headers: "overflow",
1050
1035
  rowNoun: "weekday",
1051
1036
  columnNoun: "week",
1052
- marking: (e, t) => ne(e, t) === void 0 ? "hidden" : void 0,
1053
- cellLabel: v
1037
+ marking: (e, t) => te(e, t) === void 0 ? "hidden" : void 0,
1038
+ cellLabel: ne
1054
1039
  });
1055
1040
  }
1056
1041
  // packages/charts/src/matrix/confusion-matrix.tsx
@@ -1062,14 +1047,14 @@ function rt(e) {
1062
1047
  return e.every((e) => e.every((e) => Number.isSafeInteger(e) && e >= 0)) ? void 0 : "Confusion counts must be whole numbers of zero or more.";
1063
1048
  }
1064
1049
  function it(e) {
1065
- let { classes: t, counts: n, normalize: r = "none", valueLabel: i = "Examples", valueFormat: a = Q, shareFormat: o = nt, emptyLabel: s = "No classes were supplied.", ...c } = e, { locale: l } = c, u = r === "row", d = V({
1050
+ let { classes: t, counts: n, normalize: r = "none", valueLabel: i = "Examples", valueFormat: a = Q, shareFormat: o = nt, emptyLabel: s = "No classes were supplied.", ...c } = e, { locale: l } = c, u = r === "row", d = H({
1066
1051
  rows: t,
1067
1052
  columns: t,
1068
1053
  values: n,
1069
1054
  noun: "classes",
1070
1055
  limit: tt.classes
1071
- }) ?? rt(n), f = t.map((e, t) => x(n[t] ?? [])), p = t.flatMap((e, r) => t.map((t, i) => {
1072
- let a = H(n, r, i) ?? 0, o = f[r] ?? 0, s = F(e.id, t.id), c = o === 0 ? null : a / o;
1056
+ }) ?? rt(n), f = t.map((e, t) => b(n[t] ?? [])), p = t.flatMap((e, r) => t.map((t, i) => {
1057
+ let a = U(n, r, i) ?? 0, o = f[r] ?? 0, s = I(e.id, t.id), c = o === 0 ? null : a / o;
1073
1058
  return {
1074
1059
  cell: u && c === null ? {
1075
1060
  id: s,
@@ -1088,22 +1073,22 @@ function it(e) {
1088
1073
  share: c,
1089
1074
  actual: e
1090
1075
  };
1091
- })), m = new Map(p.map((e) => [e.cell.id, e])), g = Math.max(1, ...p.map((e) => e.count));
1076
+ })), h = new Map(p.map((e) => [e.cell.id, e])), g = Math.max(1, ...p.map((e) => e.count));
1092
1077
  function _(e) {
1093
- let t = e === void 0 ? void 0 : m.get(e.id);
1078
+ let t = e === void 0 ? void 0 : h.get(e.id);
1094
1079
  if (t === void 0) return "Not supplied";
1095
- let n = h({
1080
+ let n = m({
1096
1081
  value: t.count,
1097
1082
  locale: l,
1098
1083
  format: a
1099
- }), r = h({
1084
+ }), r = m({
1100
1085
  value: t.share,
1101
1086
  locale: l,
1102
1087
  format: o
1103
1088
  });
1104
1089
  return t.share === null ? n : `${n} (${r} of actual ${t.actual.label})`;
1105
1090
  }
1106
- return /* @__PURE__ */ w(B, {
1091
+ return /* @__PURE__ */ w(V, {
1107
1092
  ...c,
1108
1093
  emptyLabel: s,
1109
1094
  problem: d,
@@ -1122,7 +1107,7 @@ function it(e) {
1122
1107
  marking: (e, t) => e.id === t.id ? "outlined" : void 0,
1123
1108
  cellLabel: (e, t) => `Actual ${e.label}, predicted ${t.label}`,
1124
1109
  valueText: _,
1125
- copyText: (e) => e === void 0 ? "" : String(m.get(e.id)?.count ?? ""),
1110
+ copyText: (e) => e === void 0 ? "" : String(h.get(e.id)?.count ?? ""),
1126
1111
  notes: ["Outlined: actual and predicted agree"]
1127
1112
  });
1128
1113
  }
@@ -1132,18 +1117,18 @@ var at = { variables: 64 }, ot = {
1132
1117
  maximumFractionDigits: 2
1133
1118
  };
1134
1119
  function st(e) {
1135
- return e.flat().some((e) => e !== null && !(e >= -1 && e <= 1)) ? "Correlation coefficients must lie between -1 and 1. Use null for a pair that was not computed." : e.every((t, n) => t.every((t, r) => t === H(e, r, n))) ? void 0 : "A correlation matrix must be symmetric: each pair needs the same value both ways.";
1120
+ return e.flat().some((e) => e !== null && !(e >= -1 && e <= 1)) ? "Correlation coefficients must lie between -1 and 1. Use null for a pair that was not computed." : e.every((t, n) => t.every((t, r) => t === U(e, r, n))) ? void 0 : "A correlation matrix must be symmetric: each pair needs the same value both ways.";
1136
1121
  }
1137
1122
  function ct(e) {
1138
- let { variables: t, coefficients: n, triangle: r = "full", valueLabel: i = "Correlation coefficient", valueFormat: a = ot, emptyLabel: o = "No variables were supplied.", ...s } = e, c = V({
1123
+ let { variables: t, coefficients: n, triangle: r = "full", valueLabel: i = "Correlation coefficient", valueFormat: a = ot, emptyLabel: o = "No variables were supplied.", ...s } = e, c = H({
1139
1124
  rows: t,
1140
1125
  columns: t,
1141
1126
  values: n,
1142
1127
  noun: "variables",
1143
1128
  limit: at.variables
1144
1129
  }) ?? st(n), l = new Map(t.map((e, t) => [e.id, t])), u = t.flatMap((e, r) => t.map((t, i) => {
1145
- let a = H(n, r, i), o = {
1146
- id: F(e.id, t.id),
1130
+ let a = U(n, r, i), o = {
1131
+ id: I(e.id, t.id),
1147
1132
  rowId: e.id,
1148
1133
  columnId: t.id
1149
1134
  };
@@ -1161,7 +1146,7 @@ function ct(e) {
1161
1146
  let n = l.get(e.id) ?? 0, i = l.get(t.id) ?? 0;
1162
1147
  return n === i ? "context" : r === "lower" && i > n ? "hidden" : void 0;
1163
1148
  }
1164
- return /* @__PURE__ */ w(B, {
1149
+ return /* @__PURE__ */ w(V, {
1165
1150
  ...s,
1166
1151
  emptyLabel: o,
1167
1152
  problem: c,
@@ -1180,7 +1165,7 @@ function ct(e) {
1180
1165
  }
1181
1166
  // packages/charts/src/matrix/matrix.tsx
1182
1167
  function lt({ variant: e = "values", emptyLabel: t = "No matrix values were supplied.", ...n }) {
1183
- return /* @__PURE__ */ w(B, {
1168
+ return /* @__PURE__ */ w(V, {
1184
1169
  ...n,
1185
1170
  variant: e,
1186
1171
  emptyLabel: t
@@ -1234,58 +1219,58 @@ var $ = {
1234
1219
  }
1235
1220
  }, ut = { tokens: 2048 };
1236
1221
  function dt(e) {
1237
- let { tokens: t, domain: n, palette: r, valueLabel: s, valueFormat: c, selected: u, onSelectedChange: m, ...h } = e, { emptyLabel: re = "No tokens were supplied.", ...y } = h, { locale: x, title: se } = y;
1238
- function ce(e) {
1222
+ let { tokens: t, domain: n, palette: r, valueLabel: s, valueFormat: c, selected: u, onSelectedChange: m, ...re } = e, { emptyLabel: v = "No tokens were supplied.", ...b } = re, { locale: se, title: ce } = b;
1223
+ function S(e) {
1239
1224
  return ft({
1240
1225
  token: e,
1241
1226
  domain: n,
1242
- locale: x,
1227
+ locale: se,
1243
1228
  format: c
1244
1229
  });
1245
1230
  }
1246
- let C = t.map((e) => ({
1231
+ let le = t.map((e) => ({
1247
1232
  id: e.id,
1248
- label: `Token ${e.index}, ${JSON.stringify(e.text)}, ${s}: ${ce(e)}`
1249
- })), le = oe(), ue = p();
1250
- if (y.status === "loading") return /* @__PURE__ */ w(g, {
1251
- ...y,
1233
+ label: `Token ${e.index}, ${JSON.stringify(e.text)}, ${s}: ${S(e)}`
1234
+ })), C = oe(), E = p();
1235
+ if (b.status === "loading") return /* @__PURE__ */ w(h, {
1236
+ ...b,
1252
1237
  height: "compact"
1253
1238
  });
1254
- let E = pt({
1239
+ let D = pt({
1255
1240
  tokens: t,
1256
1241
  domain: n,
1257
1242
  palette: r
1258
1243
  });
1259
- return E === null ? /* @__PURE__ */ w(o, {
1260
- ...ue,
1261
- items: C,
1244
+ return D === null ? /* @__PURE__ */ w(o, {
1245
+ ...E,
1246
+ items: le,
1262
1247
  arrows: "both",
1263
1248
  selected: u ?? null,
1264
1249
  onSelect: m,
1265
- render: (e, { inspected: o, cursor: p }) => /* @__PURE__ */ T(ee, {
1266
- ...y,
1250
+ render: (e, { inspected: o, cursor: p }) => /* @__PURE__ */ T(_, {
1251
+ ...b,
1267
1252
  figure: e,
1268
1253
  scaleLegend: /* @__PURE__ */ w(ae, {
1269
1254
  label: s,
1270
1255
  domain: n,
1271
1256
  palette: r,
1272
1257
  valueFormat: c,
1273
- locale: x
1258
+ locale: se
1274
1259
  }),
1275
1260
  footer: /* @__PURE__ */ w(l, {
1276
- id: le,
1277
- children: i(C, o)
1261
+ id: C,
1262
+ children: i(le, o)
1278
1263
  }),
1279
- children: [t.length === 0 ? /* @__PURE__ */ w(ne, { children: re }) : /* @__PURE__ */ w(f, {
1264
+ children: [t.length === 0 ? /* @__PURE__ */ w(te, { children: v }) : /* @__PURE__ */ w(f, {
1280
1265
  role: "group",
1281
1266
  "aria-label": d({
1282
- title: se,
1267
+ title: ce,
1283
1268
  isSelectable: m !== void 0
1284
1269
  }),
1285
- "aria-describedby": le,
1270
+ "aria-describedby": C,
1286
1271
  className: "x1ghz6dp xbixft xiard35 xtqrqnz x1778rvt x126k92a xj0a0fe x-default-marker",
1287
1272
  children: t.map((e, t) => {
1288
- let i = u === e.id, s = i || o === e.id, c = e.score !== null && !b(e.score, n), l = C[t]?.label;
1273
+ let i = u === e.id, s = i || o === e.id, c = e.score !== null && !y(e.score, n), l = le[t]?.label;
1289
1274
  return /* @__PURE__ */ w(a, {
1290
1275
  value: e.id,
1291
1276
  render: m === void 0 ? /* @__PURE__ */ w("span", {}) : /* @__PURE__ */ w("button", {
@@ -1295,15 +1280,15 @@ function dt(e) {
1295
1280
  "aria-pressed": i
1296
1281
  }),
1297
1282
  title: m === void 0 ? l : void 0,
1298
- ...S.props($.token, e.score === null || c ? $.missing : $.color(ie(e.score, {
1283
+ ...x.props($.token, e.score === null || c ? $.missing : $.color(ie(e.score, {
1299
1284
  domain: n,
1300
1285
  palette: r
1301
- })), m !== void 0 && $.interactive, s && $.selected, !s && p === e.id && v.cursor),
1286
+ })), m !== void 0 && $.interactive, s && $.selected, !s && p === e.id && ne.cursor),
1302
1287
  children: e.text
1303
1288
  }, e.id);
1304
1289
  })
1305
- }), /* @__PURE__ */ w(_, {
1306
- label: `${se} token values`,
1290
+ }), /* @__PURE__ */ w(g, {
1291
+ label: `${ce} token values`,
1307
1292
  columns: [
1308
1293
  {
1309
1294
  id: "index",
@@ -1323,26 +1308,26 @@ function dt(e) {
1323
1308
  values: [
1324
1309
  String(e.index),
1325
1310
  JSON.stringify(e.text),
1326
- ce(e)
1311
+ S(e)
1327
1312
  ]
1328
1313
  }))
1329
1314
  })]
1330
1315
  })
1331
- }) : /* @__PURE__ */ w(te, {
1332
- ...y,
1333
- message: E
1316
+ }) : /* @__PURE__ */ w(ee, {
1317
+ ...b,
1318
+ message: D
1334
1319
  });
1335
1320
  }
1336
1321
  function ft({ token: e, domain: t, locale: n, format: r }) {
1337
- let i = h({
1322
+ let i = m({
1338
1323
  value: e.score,
1339
1324
  locale: n,
1340
1325
  format: r
1341
1326
  });
1342
- return e.score === null || b(e.score, t) ? i : `${i} (outside domain)`;
1327
+ return e.score === null || y(e.score, t) ? i : `${i} (outside domain)`;
1343
1328
  }
1344
1329
  function pt({ tokens: e, domain: t, palette: n }) {
1345
- let r = y({
1330
+ let r = v({
1346
1331
  domain: t,
1347
1332
  palette: n
1348
1333
  });
@@ -1351,4 +1336,4 @@ function pt({ tokens: e, domain: t, palette: n }) {
1351
1336
  return t || n;
1352
1337
  }) ? "Token indices must be nonnegative integers and measured scores must be finite. Use null for unavailable scores." : null : r;
1353
1338
  }
1354
- export { at as a, et as c, U as d, I as f, ct as i, K as l, ut as n, it as o, F as p, lt as r, tt as s, dt as t, qe as u };
1339
+ export { at as a, et as c, W as d, L as f, ct as i, qe as l, ut as n, it as o, I as p, lt as r, tt as s, dt as t, Ke as u };