@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,30 +1,31 @@
1
1
  import { n as e, t } from "./chart-link-AE_xuxiP.js";
2
2
  import { i as n, t as r } from "./tone-scope-DKiSw-JR.js";
3
- import { a as i, c as a, i as o, l as s, n as c, o as l, t as u } from "./transport-BJweqDPj.js";
4
- import { d, n as f, t as p, u as m } from "./param-CqKUTHaO.js";
3
+ import { a as i, c as a, i as o, l as s, n as c, o as l, t as u } from "./transport-4V9rfYHN.js";
4
+ import { d, f, n as p, t as m } from "./param-BdqTpZER.js";
5
5
  import { i as h, r as g } from "./tokens.stylex-dF5CACEJ.js";
6
- import { T as _, m as v } from "./src-CpdJlDhO.js";
7
- import { t as y } from "./accessibility-P89UG9-r.js";
8
- import { r as b } from "./figure-format-B8kRZMlo.js";
9
- import { t as x } from "./forms-CEbwzlRR.js";
10
- import { g as S, i as C } from "./src-BD6xlvDt.js";
11
- import { t as w } from "./chart-tones-ei3BC2AL.js";
12
- import * as T from "@stylexjs/stylex";
6
+ import { T as _, m as v } from "./src-9EJskqB_.js";
7
+ import { C as y } from "./plot-layout-B2xRt-_k.js";
8
+ import { t as b } from "./accessibility-P89UG9-r.js";
9
+ import { r as x } from "./figure-format-B8kRZMlo.js";
10
+ import { t as S } from "./forms-CEbwzlRR.js";
11
+ import { l as C, x as w } from "./src-Dxs3Buo_.js";
12
+ import { t as T } from "./chart-tones-ei3BC2AL.js";
13
+ import * as E from "@stylexjs/stylex";
13
14
  import { usePart as ee, usePrimitive as te } from "@ui-sdk/react/primitive";
14
- import { createContext as E, isValidElement as D, use as O, useEffect as k, useId as A, useLayoutEffect as ne, useRef as j, useState as M, useSyncExternalStore as re } from "react";
15
- import { createChange as ie, createLocalStorage as ae, definePrimitive as oe, matchesShortcut as N } from "@ui-sdk/core";
16
- import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
15
+ import { createContext as D, isValidElement as O, use as k, useEffect as A, useId as j, useLayoutEffect as ne, useRef as M, useState as N, useSyncExternalStore as re } from "react";
16
+ import { createChange as ie, createLocalStorage as ae, definePrimitive as oe, matchesShortcut as P } from "@ui-sdk/core";
17
+ import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
17
18
  import { scrubTo as se } from "@ui-sdk/core/number";
18
19
  // packages/teaching/src/article/article-context.ts
19
- var ce = E(null);
20
- function L() {
21
- return O(ce);
22
- }
23
- var le = E(null);
20
+ var ce = D(null);
24
21
  function R() {
25
- return O(le);
22
+ return k(ce);
23
+ }
24
+ var le = D(null);
25
+ function ue() {
26
+ return k(le);
26
27
  }
27
- function ue(e) {
28
+ function de(e) {
28
29
  let t = { values: e }, n = /* @__PURE__ */ new Map();
29
30
  return {
30
31
  add: (e, t) => (n.set(e, t), () => {
@@ -38,7 +39,7 @@ function ue(e) {
38
39
  };
39
40
  }
40
41
  // packages/teaching/src/article/article-labels.ts
41
- var de = {
42
+ var fe = {
42
43
  contents: "Contents",
43
44
  figure: "Figure",
44
45
  notes: "Notes",
@@ -62,12 +63,15 @@ var de = {
62
63
  tutorHints: "Tutor hints",
63
64
  steps: "Reveal steps",
64
65
  progress: "Reading progress"
66
+ }, pe = {
67
+ x38b25u: "x38b25u",
68
+ $$css: !0
65
69
  };
66
70
  // packages/teaching/src/article/article-error.tsx
67
71
  function z({ children: e }) {
68
- return /* @__PURE__ */ F("div", {
72
+ return /* @__PURE__ */ I("div", {
69
73
  className: "x1iemlrz",
70
- children: /* @__PURE__ */ F(d, { children: e })
74
+ children: /* @__PURE__ */ I(f, { children: e })
71
75
  });
72
76
  }
73
77
  function B(e, t) {
@@ -77,7 +81,7 @@ function V(e) {
77
81
  return `${e} must be rendered inside an <Article>.`;
78
82
  }
79
83
  // packages/teaching/src/article/beat-steps.ts
80
- function fe({ beat: e, step: t, view: n }) {
84
+ function me({ beat: e, step: t, view: n }) {
81
85
  let r = n === "present" ? e?.scrollySteps.length ?? 0 : 0;
82
86
  return r === 0 ? {
83
87
  scrolly: null,
@@ -87,32 +91,32 @@ function fe({ beat: e, step: t, view: n }) {
87
91
  reveal: Math.max(0, t - (r - 1))
88
92
  };
89
93
  }
90
- function pe(e) {
94
+ function he(e) {
91
95
  return Object.fromEntries(e.beats.flatMap((e) => e.scrollySteps.length > 1 ? [[e.id, e.scrollySteps.length - 1]] : []));
92
96
  }
93
97
  // packages/teaching/src/article/notes.tsx
94
98
  h.focusWidth, g.focus;
95
- function me({ children: e }) {
96
- return /* @__PURE__ */ F("aside", {
99
+ function ge({ children: e }) {
100
+ return /* @__PURE__ */ I("aside", {
97
101
  className: "x1lliihq x9f619 xhff0hu x1umj4g3 x1ga0w67 xyumdvf xhzquy7 x1t7ytsu x97x49r x153jb6y xtqrqnz x1778rvt xyen2ro x1wo0zam xza49il x14atkfc x4iwnoa x1m1vpj6 x1hw0jy8 x14z9mp x1kn4fvo",
98
102
  children: e
99
103
  });
100
104
  }
101
- function he(e) {
105
+ function _e(e) {
102
106
  return `fn-${e}`;
103
107
  }
104
- function ge(e) {
108
+ function ve(e) {
105
109
  return `fnref-${e}`;
106
110
  }
107
- function _e({ id: e }) {
108
- let t = L();
109
- if (t === null) return /* @__PURE__ */ F(d, { children: V("Footnote") });
111
+ function ye({ id: e }) {
112
+ let t = R();
113
+ if (t === null) return /* @__PURE__ */ I(f, { children: V("Footnote") });
110
114
  let n = t.outline.footnotes.findIndex((t) => t.id === e) + 1;
111
- return /* @__PURE__ */ F("sup", {
115
+ return /* @__PURE__ */ I("sup", {
112
116
  className: "x14ju556",
113
- children: /* @__PURE__ */ F("a", {
114
- id: t.view === "sheet" ? void 0 : ge(e),
115
- href: `#${he(e)}`,
117
+ children: /* @__PURE__ */ I("a", {
118
+ id: t.view === "sheet" ? void 0 : ve(e),
119
+ href: `#${_e(e)}`,
116
120
  "aria-label": `${t.labels.note} ${n}`,
117
121
  className: "x3crp0m x7ixh4y xy8obcc xss6m8b xkrqix3 x1ok0vyi x5638nf x13qnu6 x9v5kkp x19rmrnh x7s97pk",
118
122
  children: n
@@ -120,31 +124,31 @@ function _e({ id: e }) {
120
124
  });
121
125
  }
122
126
  function H({ beat: e }) {
123
- let t = L(), n = A(), r = t?.outline.footnotes ?? [], i = e === void 0 ? r : r.filter((t) => t.beat === e), a = e !== void 0;
124
- return t === null || i.length === 0 ? null : /* @__PURE__ */ I("section", {
127
+ let t = R(), n = j(), r = t?.outline.footnotes ?? [], i = e === void 0 ? r : r.filter((t) => t.beat === e), a = e !== void 0;
128
+ return t === null || i.length === 0 ? null : /* @__PURE__ */ L("section", {
125
129
  "aria-labelledby": n,
126
130
  ...{
127
131
  0: { className: "xrvj5dj x1hnptsi x1b5qhtu x1tku9c6 xmblgzg x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xtqrqnz x1778rvt" },
128
132
  1: { className: "xrvj5dj x1b5qhtu x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xunmzkg x1m1vpj6 x3bg4vu xy8obcc xas2l8k" }
129
133
  }[!!a | 0],
130
- children: [/* @__PURE__ */ F("h2", {
134
+ children: [/* @__PURE__ */ I("h2", {
131
135
  id: n,
132
136
  ...{
133
137
  0: { className: "x1ghz6dp xbixft x12myhf4 x4fansv x1b5ytql" },
134
138
  1: { className: "x1ghz6dp xbixft x1b5ytql xy8obcc xas2l8k" }
135
139
  }[!!a | 0],
136
140
  children: t.labels.notes
137
- }), /* @__PURE__ */ F("ol", {
141
+ }), /* @__PURE__ */ I("ol", {
138
142
  ...{
139
143
  0: { className: "xrvj5dj x1hnptsi x1ghz6dp x1sbza1b" },
140
144
  1: { className: "xrvj5dj x1ghz6dp x1sbza1b xfko13i" }
141
145
  }[!!a | 0],
142
- children: i.map((e) => /* @__PURE__ */ I("li", {
143
- id: he(e.id),
146
+ children: i.map((e) => /* @__PURE__ */ L("li", {
147
+ id: _e(e.id),
144
148
  value: r.indexOf(e) + 1,
145
- className: "xqalb56 xk5a76m",
146
- children: [e.content, /* @__PURE__ */ F("a", {
147
- href: `#${ge(e.id)}`,
149
+ className: "xvfl8lj xk5a76m",
150
+ children: [e.content, /* @__PURE__ */ I("a", {
151
+ href: `#${ve(e.id)}`,
148
152
  "aria-label": t.labels.backToText,
149
153
  className: "xa1dmyi x7ixh4y xkrqix3 x1ok0vyi x13qnu6 x9v5kkp x19rmrnh x7s97pk",
150
154
  children: "↩"
@@ -153,44 +157,44 @@ function H({ beat: e }) {
153
157
  })]
154
158
  });
155
159
  }
156
- function ve(e) {
160
+ function be(e) {
157
161
  return `ref-${e}`;
158
162
  }
159
- function ye({ id: e }) {
160
- let t = L();
161
- if (t === null) return /* @__PURE__ */ F(d, { children: V("Cite") });
163
+ function xe({ id: e }) {
164
+ let t = R();
165
+ if (t === null) return /* @__PURE__ */ I(f, { children: V("Cite") });
162
166
  let { references: n } = t.outline, r = n.findIndex((t) => t.id === e), i = n[r];
163
- return i === void 0 ? /* @__PURE__ */ F(d, { children: `Unknown reference "${e}": add it to the article's References.` }) : /* @__PURE__ */ F("a", {
164
- href: `#${ve(e)}`,
167
+ return i === void 0 ? /* @__PURE__ */ I(f, { children: `Unknown reference "${e}": add it to the article's References.` }) : /* @__PURE__ */ I("a", {
168
+ href: `#${be(e)}`,
165
169
  "aria-label": `${i.authors.join(", ")}, ${i.year}`,
166
170
  className: "x3crp0m x7ixh4y xy8obcc xss6m8b xkrqix3 x1ok0vyi x5638nf x13qnu6 x9v5kkp x19rmrnh x7s97pk",
167
171
  children: `[${r + 1}]`
168
172
  });
169
173
  }
170
- function be({ items: e }) {
171
- let t = L(), { beat: n, lesson: r } = a(), i = t?.view === "present" && n !== r.beats.at(-1)?.id, o = A(), s = e.find((t, n) => e.findIndex((e) => e.id === t.id) !== n);
172
- return t === null || s !== void 0 ? /* @__PURE__ */ F(z, { children: t === null ? V("References") : `Two references share the id "${s?.id ?? ""}".` }) : /* @__PURE__ */ I("section", {
174
+ function Se({ items: e }) {
175
+ let t = R(), { beat: n, lesson: r } = a(), i = t?.view === "present" && n !== r.beats.at(-1)?.id, o = j(), s = e.find((t, n) => e.findIndex((e) => e.id === t.id) !== n);
176
+ return t === null || s !== void 0 ? /* @__PURE__ */ I(z, { children: t === null ? V("References") : `Two references share the id "${s?.id ?? ""}".` }) : /* @__PURE__ */ L("section", {
173
177
  "aria-labelledby": o,
174
178
  hidden: i,
175
179
  ...{
176
180
  0: { className: "xrvj5dj x1hnptsi x1b5qhtu x1tku9c6 xmblgzg x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xtqrqnz x1778rvt" },
177
181
  1: { className: "x1hnptsi x1b5qhtu x1tku9c6 xmblgzg x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xtqrqnz x1778rvt x1s85apg" }
178
182
  }[!!i | 0],
179
- children: [/* @__PURE__ */ F("h2", {
183
+ children: [/* @__PURE__ */ I("h2", {
180
184
  id: o,
181
185
  className: "x1ghz6dp xbixft x12myhf4 x4fansv x1b5ytql",
182
186
  children: t.labels.references
183
- }), /* @__PURE__ */ F("ol", {
187
+ }), /* @__PURE__ */ I("ol", {
184
188
  className: "xrvj5dj x1hnptsi x1ghz6dp x1sbza1b",
185
- children: e.map((e) => /* @__PURE__ */ I("li", {
186
- id: ve(e.id),
187
- className: "xqalb56 xk5a76m",
189
+ children: e.map((e) => /* @__PURE__ */ L("li", {
190
+ id: be(e.id),
191
+ className: "xvfl8lj xk5a76m",
188
192
  children: [
189
193
  `${e.authors.join(", ")}. ${e.year}. `,
190
- e.url === void 0 ? /* @__PURE__ */ F("span", {
194
+ e.url === void 0 ? /* @__PURE__ */ I("span", {
191
195
  className: "xbixft",
192
196
  children: e.title
193
- }) : /* @__PURE__ */ F("a", {
197
+ }) : /* @__PURE__ */ I("a", {
194
198
  href: e.url,
195
199
  className: "xj0a0fe xibglb1 x1ok0vyi x13qnu6 x9v5kkp x19rmrnh x7s97pk xbixft",
196
200
  children: e.title
@@ -202,58 +206,58 @@ function be({ items: e }) {
202
206
  });
203
207
  }
204
208
  // packages/teaching/src/article/beat.tsx
205
- function xe(e) {
209
+ function Ce(e) {
206
210
  return e?.states?.[0]?.values ?? {};
207
211
  }
208
212
  function U(e, t) {
209
213
  return e.beats.find((e) => e.id === t);
210
214
  }
211
- function W({ id: e, children: t }) {
212
- let n = L(), { beat: r, step: i } = a(), o = A();
213
- if (n === null) return /* @__PURE__ */ F(z, { children: V("Beat") });
214
- let c = U(n.lesson, e), l = r === e, u = n.outline.beats.find((t) => t.id === e), f = fe({
215
+ function we({ id: e, children: t }) {
216
+ let n = R(), { beat: r, step: i } = a(), o = j();
217
+ if (n === null) return /* @__PURE__ */ I(z, { children: V("Beat") });
218
+ let c = U(n.lesson, e), l = r === e, u = n.outline.beats.find((t) => t.id === e), d = me({
215
219
  beat: u,
216
220
  step: l ? i : 0,
217
221
  view: n.view
218
- }), p = n.view === "static", m = n.view === "present" && !l, h = c === void 0 ? /* @__PURE__ */ F(d, { children: `Lesson "${n.lesson.id}" has no beat "${e}". Its beats: ${n.lesson.beats.map((e) => e.id).join(", ")}.` }) : c.title, g = /* @__PURE__ */ I(le, {
222
+ }), p = n.view === "static", m = n.view === "present" && !l, h = c === void 0 ? /* @__PURE__ */ I(f, { children: `Lesson "${n.lesson.id}" has no beat "${e}". Its beats: ${n.lesson.beats.map((e) => e.id).join(", ")}.` }) : c.title, g = /* @__PURE__ */ L(le, {
219
223
  value: {
220
224
  id: e,
221
225
  isCurrent: l,
222
- step: f.reveal,
223
- scrolly: f.scrolly
226
+ step: d.reveal,
227
+ scrolly: d.scrolly
224
228
  },
225
229
  children: [
226
- /* @__PURE__ */ F("h2", {
230
+ /* @__PURE__ */ I("h2", {
227
231
  id: o,
228
232
  className: "xdj266r x14yccmi x71lla1 xgkpprq x1b5ytql x1wjjqco x1w2vvpw x37gifx",
229
233
  children: h
230
234
  }),
231
- u === void 0 ? /* @__PURE__ */ F(z, { children: B("Beat", e) }) : null,
235
+ u === void 0 ? /* @__PURE__ */ I(z, { children: B("Beat", e) }) : null,
232
236
  t,
233
- n.view === "present" ? /* @__PURE__ */ F(H, { beat: e }) : null
237
+ n.view === "present" ? /* @__PURE__ */ I(H, { beat: e }) : null
234
238
  ]
235
239
  });
236
- return /* @__PURE__ */ F("section", {
240
+ return /* @__PURE__ */ I("section", {
237
241
  id: e,
238
242
  "aria-labelledby": o,
239
243
  "data-beat": e,
240
244
  "data-current": l ? "" : void 0,
241
245
  hidden: m,
242
246
  ...{
243
- 0: { className: "x1lliihq xeuugli x1b5qhtu x16jagqu xyri2b x1xpcpqf x123szhz xqalb56 xbixft x1hz01jw x1i2cqwi x1ytb0s6 x1mzt3pk" },
244
- 1: { className: "xeuugli x1b5qhtu x16jagqu xyri2b x1xpcpqf x123szhz xqalb56 xbixft x1hz01jw x1i2cqwi x1ytb0s6 x1mzt3pk x1s85apg" }
247
+ 0: { className: "x1lliihq x9f619 xeuugli x1b5qhtu x16jagqu xyri2b x1xpcpqf x123szhz xvfl8lj xbixft x1hz01jw x1i2cqwi x1ytb0s6 x1mzt3pk" },
248
+ 1: { className: "x9f619 xeuugli x1b5qhtu x16jagqu xyri2b x1xpcpqf x123szhz xvfl8lj xbixft x1hz01jw x1i2cqwi x1ytb0s6 x1mzt3pk x1s85apg" }
245
249
  }[!!m | 0],
246
- children: p ? /* @__PURE__ */ F(s, {
250
+ children: p ? /* @__PURE__ */ I(s, {
247
251
  lesson: n.lesson,
248
252
  locale: n.locale,
249
- values: xe(c),
253
+ values: Ce(c),
250
254
  isReadOnly: !0,
251
255
  children: g
252
256
  }) : g
253
257
  });
254
258
  }
255
259
  // packages/teaching/src/article/exercise-styles.ts
256
- var G = {
260
+ var W = {
257
261
  box: {
258
262
  k1xSpc: "xrvj5dj",
259
263
  kOIVth: "x1n8ia3y",
@@ -339,7 +343,7 @@ var G = {
339
343
  kOIVth: "x1n8ia3y",
340
344
  $$css: !0
341
345
  }
342
- }, Se = {
346
+ }, Te = {
343
347
  kicker: "Challenge",
344
348
  reached: "Reached.",
345
349
  notYet: "Not reached yet.",
@@ -347,66 +351,66 @@ var G = {
347
351
  of: "of",
348
352
  showOutcome: "Show what you find"
349
353
  };
350
- function Ce({ id: e, prompt: t, isReached: n, hints: r = [], children: i, labels: a }) {
351
- let o = L(), s = {
352
- ...Se,
354
+ function Ee({ id: e, prompt: t, isReached: n, hints: r = [], children: i, labels: a }) {
355
+ let o = R(), s = {
356
+ ...Te,
353
357
  ...a
354
- }, c = A(), l = o?.challenges;
355
- if (k(() => l?.add(e, n), [
358
+ }, c = j(), l = o?.challenges;
359
+ if (A(() => l?.add(e, n), [
356
360
  l,
357
361
  e,
358
362
  n
359
- ]), o === null) return /* @__PURE__ */ F(z, { children: V("Challenge") });
360
- let u = o.progress.reached.includes(e), d = Math.min(o.progress.hints[e] ?? 0, r.length), f = /* @__PURE__ */ I(P, { children: [
361
- o.outline.challenges.some((t) => t.id === e) ? null : /* @__PURE__ */ F(z, { children: B("Challenge", e) }),
362
- /* @__PURE__ */ F("p", {
363
- ...T.props(G.kicker),
363
+ ]), o === null) return /* @__PURE__ */ I(z, { children: V("Challenge") });
364
+ let u = o.progress.reached.includes(e), d = Math.min(o.progress.hints[e] ?? 0, r.length), f = /* @__PURE__ */ L(F, { children: [
365
+ o.outline.challenges.some((t) => t.id === e) ? null : /* @__PURE__ */ I(z, { children: B("Challenge", e) }),
366
+ /* @__PURE__ */ I("p", {
367
+ ...E.props(W.kicker),
364
368
  children: s.kicker
365
369
  }),
366
- /* @__PURE__ */ F("div", {
370
+ /* @__PURE__ */ I("div", {
367
371
  id: c,
368
- ...T.props(G.prompt),
372
+ ...E.props(W.prompt),
369
373
  children: t
370
374
  })
371
375
  ] });
372
- return o.view === "static" ? /* @__PURE__ */ I("section", {
376
+ return o.view === "static" ? /* @__PURE__ */ L("section", {
373
377
  "aria-labelledby": c,
374
- ...T.props(G.box),
378
+ ...E.props(W.box),
375
379
  children: [
376
380
  f,
377
- r.length > 0 ? /* @__PURE__ */ F("ol", {
378
- ...T.props(G.hints),
379
- children: r.map((e) => /* @__PURE__ */ F("li", { children: e }, e))
381
+ r.length > 0 ? /* @__PURE__ */ I("ol", {
382
+ ...E.props(W.hints),
383
+ children: r.map((e) => /* @__PURE__ */ I("li", { children: e }, e))
380
384
  }) : null,
381
- /* @__PURE__ */ I("details", {
382
- ...T.props(G.details),
383
- children: [/* @__PURE__ */ F("summary", {
384
- ...T.props(G.summary),
385
+ /* @__PURE__ */ L("details", {
386
+ ...E.props(W.details),
387
+ children: [/* @__PURE__ */ I("summary", {
388
+ ...E.props(W.summary),
385
389
  children: s.showOutcome
386
390
  }), i]
387
391
  })
388
392
  ]
389
- }) : /* @__PURE__ */ I("section", {
393
+ }) : /* @__PURE__ */ L("section", {
390
394
  "aria-labelledby": c,
391
- ...T.props(G.box),
395
+ ...E.props(W.box),
392
396
  children: [
393
397
  f,
394
- /* @__PURE__ */ F("p", {
398
+ /* @__PURE__ */ I("p", {
395
399
  role: "status",
396
- ...T.props(G.verdict),
397
- children: /* @__PURE__ */ F("span", {
398
- ...T.props(u ? G.right : G.meta),
400
+ ...E.props(W.verdict),
401
+ children: /* @__PURE__ */ I("span", {
402
+ ...E.props(u ? W.right : W.meta),
399
403
  children: u ? s.reached : s.notYet
400
404
  })
401
405
  }),
402
- d > 0 ? /* @__PURE__ */ F("ol", {
403
- ...T.props(G.hints),
404
- children: r.slice(0, d).map((e) => /* @__PURE__ */ F("li", { children: e }, e))
406
+ d > 0 ? /* @__PURE__ */ I("ol", {
407
+ ...E.props(W.hints),
408
+ children: r.slice(0, d).map((e) => /* @__PURE__ */ I("li", { children: e }, e))
405
409
  }) : null,
406
- u ? /* @__PURE__ */ F("div", { children: i }) : null,
407
- !u && d < r.length ? /* @__PURE__ */ F("div", {
408
- ...T.props(G.actions),
409
- children: /* @__PURE__ */ F(_, {
410
+ u ? /* @__PURE__ */ I("div", { children: i }) : null,
411
+ !u && d < r.length ? /* @__PURE__ */ I("div", {
412
+ ...E.props(W.actions),
413
+ children: /* @__PURE__ */ I(_, {
410
414
  density: "compact",
411
415
  onClick: (t) => o.progressApi.showHint(e, {
412
416
  reason: "hint-press",
@@ -419,7 +423,7 @@ function Ce({ id: e, prompt: t, isReached: n, hints: r = [], children: i, labels
419
423
  });
420
424
  }
421
425
  // packages/teaching/src/article/figure.tsx
422
- var we = {
426
+ var G = {
423
427
  figure: {
424
428
  k1xSpc: "xrvj5dj",
425
429
  kOIVth: "x1hnptsi",
@@ -427,7 +431,7 @@ var we = {
427
431
  kUOVxO: "xrxpjvj",
428
432
  kqGvvJ: "xtru72a",
429
433
  klnimT: "x18xfj1p",
430
- k4rD7h: "xqalb56",
434
+ k4rD7h: "xvfl8lj",
431
435
  kiIUUe: "x1qgqlal",
432
436
  $$css: !0
433
437
  },
@@ -435,6 +439,16 @@ var we = {
435
439
  kqGvvJ: "x10im51j",
436
440
  $$css: !0
437
441
  },
442
+ frame: {
443
+ k1xSpc: "xrvj5dj",
444
+ k7Eaqz: "xeuugli",
445
+ kMzoRj: "xmkeg23 x3rjliz",
446
+ ksu8eU: "x1y0btm7",
447
+ kVAM5u: "x1ey3b81",
448
+ kaIpWk: "xy32g2j",
449
+ kWkggS: "xpvm0e4",
450
+ $$css: !0
451
+ },
438
452
  description: {
439
453
  kogj98: "x1ghz6dp",
440
454
  ks0D6T: "x1b5qhtu",
@@ -443,71 +457,90 @@ var we = {
443
457
  kLWn49: "x1ytb0s6",
444
458
  $$css: !0
445
459
  }
446
- }, Te = E(!1), K = E(!1), Ee = {
460
+ }, De = D(!1), K = D(!1), Oe = {
447
461
  text: { $$css: !0 },
448
462
  wide: {
449
463
  k71WvV: "x14z9mp x1kn4fvo",
450
464
  $$css: !0
451
465
  }
452
- };
453
- function De(e) {
454
- let t = L()?.outline.figures.indexOf(e) ?? -1;
466
+ }, ke = /* @__PURE__ */ new Set(["static", "sheet"]);
467
+ function Ae(e) {
468
+ let t = R()?.outline.figures.indexOf(e) ?? -1;
455
469
  return t === -1 ? void 0 : t + 1;
456
470
  }
457
- function Oe(e) {
471
+ function je(e) {
458
472
  return `Unknown figure "${e}": no Figure in the article has this id.`;
459
473
  }
460
- function q({ id: e, caption: t, description: n, size: r = "wide", children: i }) {
461
- let a = L(), o = De(e), s = A(), c = O(Te), l = O(K);
462
- if (a === null) return /* @__PURE__ */ F(z, { children: V("Figure") });
463
- let { view: u, labels: f } = a, p = u === "sheet", m = u === "static", h = n !== void 0;
464
- return /* @__PURE__ */ I("figure", {
465
- id: p || c ? void 0 : e,
466
- "aria-describedby": h ? s : void 0,
467
- ...T.props(we.figure, !p && Ee[l ? "text" : r], p && we.cell),
474
+ function q({ id: e, caption: t, description: n, size: r = "wide", header: i, footer: a, isFramed: o, children: s }) {
475
+ let c = R(), l = Ae(e), u = j(), d = k(De), p = k(K), m = i !== void 0 || a !== void 0;
476
+ if (c === null) return /* @__PURE__ */ I(z, { children: V("Figure") });
477
+ if (o === !1 && m) return /* @__PURE__ */ I(z, { children: "A Figure with a header or footer keeps its frame, so it cannot set isFramed to false." });
478
+ let { view: h, labels: g } = c, _ = h === "sheet", v = h === "static", x = n !== void 0, S = o ?? m, C = ke.has(h), w = /* @__PURE__ */ I(y, { children: s });
479
+ return /* @__PURE__ */ L("figure", {
480
+ id: _ || d ? void 0 : e,
481
+ "aria-describedby": x ? u : void 0,
482
+ ...E.props(G.figure, !_ && Oe[p ? "text" : r], _ && G.cell),
468
483
  children: [
469
- i,
470
- /* @__PURE__ */ F("figcaption", {
484
+ S ? /* @__PURE__ */ L("div", {
485
+ ...E.props(G.frame, pe),
486
+ children: [
487
+ i === void 0 ? null : /* @__PURE__ */ I("div", {
488
+ inert: C,
489
+ className: "x78zum5 x1a02dak x6s0dn4 xl56j7k x8zbtdt xpb3s3w xeuugli xn9t2bk x1doqdfy x8i819h x1ey3b81 x1y0btm7 xc342km xso031l xvl0991",
490
+ children: i
491
+ }),
492
+ /* @__PURE__ */ I("div", {
493
+ className: "xeuugli x1mvvolr xgdeu5z x1n01ctf xcbmdgg",
494
+ children: w
495
+ }),
496
+ a === void 0 ? null : /* @__PURE__ */ I("div", {
497
+ inert: C,
498
+ className: "x78zum5 x1a02dak x6s0dn4 xl56j7k x8zbtdt xpb3s3w xeuugli xn9t2bk x1doqdfy x8i819h x1ey3b81 x1y0btm7 xc342km x178xt8z x18orsgv",
499
+ children: a
500
+ })
501
+ ]
502
+ }) : w,
503
+ /* @__PURE__ */ I("figcaption", {
471
504
  className: "x1ghz6dp x1b5qhtu x153jb6y x1hz01jw xy8obcc xas2l8k xj0a0fe",
472
- children: o === void 0 ? /* @__PURE__ */ F(d, { children: B("Figure", e) }) : /* @__PURE__ */ I(P, { children: [
473
- /* @__PURE__ */ F("span", {
505
+ children: l === void 0 ? /* @__PURE__ */ I(f, { children: B("Figure", e) }) : /* @__PURE__ */ L(F, { children: [
506
+ /* @__PURE__ */ I("span", {
474
507
  className: "xbixft x1b5ytql",
475
- children: `${f.figure} ${o}.`
508
+ children: `${g.figure} ${l}.`
476
509
  }),
477
510
  " ",
478
511
  t
479
512
  ] })
480
513
  }),
481
- h ? /* @__PURE__ */ I("p", {
482
- id: s,
483
- ...T.props(we.description, !m && y.hidden),
484
- children: [/* @__PURE__ */ F("span", {
514
+ x ? /* @__PURE__ */ L("p", {
515
+ id: u,
516
+ ...E.props(G.description, !v && b.hidden),
517
+ children: [/* @__PURE__ */ I("span", {
485
518
  className: "x1b5ytql",
486
- children: `${f.figureDescription}: `
519
+ children: `${g.figureDescription}: `
487
520
  }), n]
488
521
  }) : null
489
522
  ]
490
523
  });
491
524
  }
492
- function ke({ to: e }) {
493
- let t = L(), n = De(e);
494
- return n === void 0 || t === null ? /* @__PURE__ */ F(d, { children: t === null ? V("FigureReference") : Oe(e) }) : /* @__PURE__ */ F("a", {
525
+ function Me({ to: e }) {
526
+ let t = R(), n = Ae(e);
527
+ return n === void 0 || t === null ? /* @__PURE__ */ I(f, { children: t === null ? V("FigureReference") : je(e) }) : /* @__PURE__ */ I("a", {
495
528
  href: `#${encodeURIComponent(e)}`,
496
529
  className: "x1heor9g xujl8zx xibglb1 x1ohr1zr x1ok0vyi xd636jy x13qnu6 x9v5kkp x19rmrnh x7s97pk",
497
530
  children: `${t.labels.figure} ${n}`
498
531
  });
499
532
  }
500
- function Ae(e) {
501
- let t = L(), n = R();
533
+ function Ne(e) {
534
+ let t = R(), n = ue();
502
535
  return t?.view !== "present" || n === null || n.isCurrent && n.step >= e;
503
536
  }
504
- function je({ at: e, children: t }) {
505
- let n = L(), r = R(), i = Ae(e);
506
- if (n === null || r === null) return /* @__PURE__ */ F(z, { children: n === null ? V("Reveal") : "Reveal must sit inside a Beat." });
537
+ function Pe({ at: e, children: t }) {
538
+ let n = R(), r = ue(), i = Ne(e);
539
+ if (n === null || r === null) return /* @__PURE__ */ I(z, { children: n === null ? V("Reveal") : "Reveal must sit inside a Beat." });
507
540
  let a = n.lesson.beats.find((e) => e.id === r.id)?.steps ?? 0;
508
- if (!(Number.isInteger(e) && e >= 0 && e <= a)) return /* @__PURE__ */ F(z, { children: `Reveal at ${e}, but beat "${r.id}" has reveal steps 0 to ${a}.` });
541
+ if (!(Number.isInteger(e) && e >= 0 && e <= a)) return /* @__PURE__ */ I(z, { children: `Reveal at ${e}, but beat "${r.id}" has reveal steps 0 to ${a}.` });
509
542
  let o = !i;
510
- return /* @__PURE__ */ F("div", {
543
+ return /* @__PURE__ */ I("div", {
511
544
  hidden: o,
512
545
  "data-reveal-at": e,
513
546
  ...{
@@ -518,7 +551,7 @@ function je({ at: e, children: t }) {
518
551
  });
519
552
  }
520
553
  // packages/teaching/src/article/predict.tsx
521
- var Me = {
554
+ var Fe = {
522
555
  kicker: "Predict",
523
556
  yourGuess: "Your guess",
524
557
  commit: "Lock in my guess",
@@ -530,77 +563,77 @@ var Me = {
530
563
  range: "Between",
531
564
  needsReader: "Commits the reader’s own prediction; only the reader can make it."
532
565
  };
533
- function Ne(e, t) {
566
+ function Ie(e, t) {
534
567
  if ("options" in e) return e.options.some((t) => t.id === e.answer) ? { answer: e.answer } : { error: `Predict "${e.id}" has no option "${e.answer}" for its answer.` };
535
568
  if (e.answerFrom === void 0) return { answer: e.answer };
536
569
  let n = t[e.answerFrom];
537
570
  return typeof n == "number" ? { answer: n } : { error: `Predict "${e.id}" takes its answer from "${e.answerFrom}", which is not a number of the lesson.` };
538
571
  }
539
572
  function J(e, t, n) {
540
- return "options" in e ? e.options.find((e) => e.id === t)?.label ?? String(t) : typeof t == "number" ? b({
573
+ return "options" in e ? e.options.find((e) => e.id === t)?.label ?? String(t) : typeof t == "number" ? x({
541
574
  value: t,
542
575
  locale: n,
543
576
  format: e.format
544
577
  }) : t;
545
578
  }
546
- function Pe(e, t, n) {
579
+ function Le(e, t, n) {
547
580
  return "options" in e || typeof t != "number" || typeof n != "number" ? t === n : Math.abs(t - n) <= (e.tolerance ?? e.step);
548
581
  }
549
- function Fe({ props: e, record: t, article: n, words: r }) {
582
+ function Re({ props: e, record: t, article: n, words: r }) {
550
583
  let i = J(e, t.value, n.locale), a = J(e, t.answer, n.locale);
551
- return /* @__PURE__ */ I("div", {
584
+ return /* @__PURE__ */ L("div", {
552
585
  role: "status",
553
- ...T.props(G.result),
554
- children: [/* @__PURE__ */ I("p", {
555
- ...T.props(G.verdict),
586
+ ...E.props(W.result),
587
+ children: [/* @__PURE__ */ L("p", {
588
+ ...E.props(W.verdict),
556
589
  children: [
557
- /* @__PURE__ */ F("span", {
558
- ...T.props(t.isCorrect ? G.right : G.wrong),
590
+ /* @__PURE__ */ I("span", {
591
+ ...E.props(t.isCorrect ? W.right : W.wrong),
559
592
  children: t.isCorrect ? r.right : r.wrong
560
593
  }),
561
594
  " ",
562
595
  `${r.youGuessed} ${i}. ${r.answerIs} ${a}.`
563
596
  ]
564
- }), /* @__PURE__ */ F("div", { children: e.children })]
597
+ }), /* @__PURE__ */ I("div", { children: e.children })]
565
598
  });
566
599
  }
567
- function Ie(e) {
568
- let { id: t, prompt: n, children: r, labels: i } = e, o = L(), { values: s } = a(), c = {
569
- ...Me,
600
+ function ze(e) {
601
+ let { id: t, prompt: n, children: r, labels: i } = e, o = R(), { values: s } = a(), c = {
602
+ ...Fe,
570
603
  ...i
571
- }, l = A(), u = "options" in e ? null : se((e.min + e.max) / 2, e).value, [d, f] = M(u);
572
- if (o === null) return /* @__PURE__ */ F(z, { children: V("Predict") });
573
- if (!o.outline.predictions.some((e) => e.id === t)) return /* @__PURE__ */ F(z, { children: B("Predict", t) });
574
- let p = Ne(e, s);
575
- if ("error" in p) return /* @__PURE__ */ F(z, { children: p.error });
576
- let m = o.progress.predictions[t], h = /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("p", {
577
- ...T.props(G.kicker),
604
+ }, l = j(), u = "options" in e ? null : se((e.min + e.max) / 2, e).value, [d, f] = N(u);
605
+ if (o === null) return /* @__PURE__ */ I(z, { children: V("Predict") });
606
+ if (!o.outline.predictions.some((e) => e.id === t)) return /* @__PURE__ */ I(z, { children: B("Predict", t) });
607
+ let p = Ie(e, s);
608
+ if ("error" in p) return /* @__PURE__ */ I(z, { children: p.error });
609
+ let m = o.progress.predictions[t], h = /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("p", {
610
+ ...E.props(W.kicker),
578
611
  children: c.kicker
579
- }), /* @__PURE__ */ F("div", {
612
+ }), /* @__PURE__ */ I("div", {
580
613
  id: l,
581
- ...T.props(G.prompt),
614
+ ...E.props(W.prompt),
582
615
  children: n
583
616
  })] });
584
617
  if (o.view === "static") {
585
618
  let t = "options" in e ? e.options.map((e) => e.label).join(" · ") : null, n = "options" in e ? null : `${c.range} ${J(e, e.min, o.locale)} – ${J(e, e.max, o.locale)}`;
586
- return /* @__PURE__ */ I("section", {
619
+ return /* @__PURE__ */ L("section", {
587
620
  "aria-labelledby": l,
588
- ...T.props(G.box),
621
+ ...E.props(W.box),
589
622
  children: [
590
623
  h,
591
- /* @__PURE__ */ F("p", {
592
- ...T.props(G.meta),
624
+ /* @__PURE__ */ I("p", {
625
+ ...E.props(W.meta),
593
626
  children: t ?? n
594
627
  }),
595
- /* @__PURE__ */ I("details", {
596
- ...T.props(G.details),
628
+ /* @__PURE__ */ L("details", {
629
+ ...E.props(W.details),
597
630
  children: [
598
- /* @__PURE__ */ F("summary", {
599
- ...T.props(G.summary),
631
+ /* @__PURE__ */ I("summary", {
632
+ ...E.props(W.summary),
600
633
  children: c.showAnswer
601
634
  }),
602
- /* @__PURE__ */ F("p", {
603
- ...T.props(G.verdict),
635
+ /* @__PURE__ */ I("p", {
636
+ ...E.props(W.verdict),
604
637
  children: `${c.answerIs} ${J(e, p.answer, o.locale)}.`
605
638
  }),
606
639
  r
@@ -613,21 +646,21 @@ function Ie(e) {
613
646
  d === null || "error" in p || o === null || o.progressApi.commit(t, {
614
647
  value: d,
615
648
  answer: p.answer,
616
- isCorrect: Pe(e, d, p.answer)
649
+ isCorrect: Le(e, d, p.answer)
617
650
  }, {
618
651
  reason: "commit",
619
652
  event: n.nativeEvent
620
653
  });
621
654
  }
622
- let y = "options" in e ? /* @__PURE__ */ F(C.Root, {
655
+ let y = "options" in e ? /* @__PURE__ */ I(C.Root, {
623
656
  value: typeof d == "string" ? d : "",
624
657
  onValueChange: (e) => f(e),
625
658
  "aria-labelledby": l,
626
- children: e.options.map((e) => /* @__PURE__ */ F(x.Root, { children: /* @__PURE__ */ F(x.Label, { children: /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ F(C.Item, {
659
+ children: e.options.map((e) => /* @__PURE__ */ I(S.Root, { children: /* @__PURE__ */ I(S.Label, { children: /* @__PURE__ */ L(v, { children: [/* @__PURE__ */ I(C.Item, {
627
660
  value: e.id,
628
- children: /* @__PURE__ */ F(C.Indicator, {})
661
+ children: /* @__PURE__ */ I(C.Indicator, {})
629
662
  }), e.label] }) }) }, e.id))
630
- }) : /* @__PURE__ */ I(S.Root, {
663
+ }) : /* @__PURE__ */ L(w.Root, {
631
664
  locale: o.locale,
632
665
  value: typeof d == "number" ? d : e.min,
633
666
  onValueChange: (e) => f(e),
@@ -635,24 +668,24 @@ function Ie(e) {
635
668
  max: e.max,
636
669
  step: e.step,
637
670
  format: e.format,
638
- children: [/* @__PURE__ */ I(v, {
671
+ children: [/* @__PURE__ */ L(v, {
639
672
  shouldSpaceBetween: !0,
640
- children: [/* @__PURE__ */ F(S.Label, { children: c.yourGuess }), /* @__PURE__ */ F(S.Value, {})]
641
- }), /* @__PURE__ */ I(S.Control, { children: [/* @__PURE__ */ F(S.Track, { children: /* @__PURE__ */ F(S.Indicator, {}) }), /* @__PURE__ */ F(S.Thumb, {})] })]
673
+ children: [/* @__PURE__ */ I(w.Label, { children: c.yourGuess }), /* @__PURE__ */ I(w.Value, {})]
674
+ }), /* @__PURE__ */ L(w.Control, { children: [/* @__PURE__ */ I(w.Track, { children: /* @__PURE__ */ I(w.Indicator, {}) }), /* @__PURE__ */ I(w.Thumb, {})] })]
642
675
  });
643
- return /* @__PURE__ */ I("section", {
676
+ return /* @__PURE__ */ L("section", {
644
677
  "aria-labelledby": l,
645
- ...T.props(G.box),
646
- children: [h, m === void 0 ? /* @__PURE__ */ I("div", {
647
- ...T.props(G.controls),
648
- children: [y, /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F(_, {
678
+ ...E.props(W.box),
679
+ children: [h, m === void 0 ? /* @__PURE__ */ L("div", {
680
+ ...E.props(W.controls),
681
+ children: [y, /* @__PURE__ */ I("div", { children: /* @__PURE__ */ I(_, {
649
682
  variant: "solid",
650
683
  disabled: d === null,
651
684
  "data-agent-confirm": c.needsReader,
652
685
  onClick: g,
653
686
  children: c.commit
654
687
  }) })]
655
- }) : /* @__PURE__ */ F(Fe, {
688
+ }) : /* @__PURE__ */ I(Re, {
656
689
  props: e,
657
690
  record: m,
658
691
  article: o,
@@ -661,18 +694,18 @@ function Ie(e) {
661
694
  });
662
695
  }
663
696
  // packages/teaching/src/article/lesson-values.ts
664
- function Le(e, t) {
697
+ function Be(e, t) {
665
698
  let n = new Map(Object.entries(e.params));
666
699
  return Object.entries(t).flatMap(([t, r]) => {
667
700
  let i = n.get(t);
668
- return i === void 0 ? [`Lesson "${e.id}" has no param "${t}".`] : m({
701
+ return i === void 0 ? [`Lesson "${e.id}" has no param "${t}".`] : d({
669
702
  name: t,
670
703
  param: i,
671
704
  value: r
672
705
  }) ?? [];
673
706
  }).at(0);
674
707
  }
675
- function Re(e, t) {
708
+ function Ve(e, t) {
676
709
  return e.beats.flatMap((e) => e.states ?? []).find((e) => e.id === t)?.values;
677
710
  }
678
711
  // packages/teaching/src/article/walk.ts
@@ -682,7 +715,7 @@ function* Y({ node: e, place: t, placeOf: n }) {
682
715
  place: t,
683
716
  placeOf: n
684
717
  });
685
- else if (typeof e == "object" && D(e)) {
718
+ else if (typeof e == "object" && O(e)) {
686
719
  yield {
687
720
  element: e,
688
721
  place: t
@@ -703,11 +736,11 @@ function X(e, t) {
703
736
  return typeof n == "string" ? n : void 0;
704
737
  }
705
738
  // packages/teaching/src/article/scrolly.tsx
706
- var ze = /* @__PURE__ */ new Set(["static", "sheet"]);
707
- function Be({ children: e }) {
739
+ var He = /* @__PURE__ */ new Set(["static", "sheet"]);
740
+ function Ue({ children: e }) {
708
741
  return e;
709
742
  }
710
- function Ve(e, t) {
743
+ function We(e, t) {
711
744
  let n = [...Y({
712
745
  node: e,
713
746
  place: {
@@ -715,24 +748,24 @@ function Ve(e, t) {
715
748
  figure: null
716
749
  },
717
750
  placeOf: ({ place: e }) => e
718
- })].flatMap(({ element: e }) => e.type === Be && D(e) ? [e.props] : []), r = n.find((e) => e.state !== void 0 && Re(t, e.state) === void 0);
751
+ })].flatMap(({ element: e }) => e.type === Ue && O(e) ? [e.props] : []), r = n.find((e) => e.state !== void 0 && Ve(t, e.state) === void 0);
719
752
  if (r !== void 0) return { error: `ScrollyStep "${r.id}" shows state "${r.state ?? ""}", which no beat declares.` };
720
753
  let i = n.map((e) => ({
721
754
  id: e.id,
722
- values: (e.state === void 0 ? void 0 : Re(t, e.state)) ?? e.values ?? {},
755
+ values: (e.state === void 0 ? void 0 : Ve(t, e.state)) ?? e.values ?? {},
723
756
  content: e.children
724
- })), a = i.map((e) => Le(t, e.values)).find((e) => e !== void 0);
757
+ })), a = i.map((e) => Be(t, e.values)).find((e) => e !== void 0);
725
758
  return a === void 0 ? { steps: i } : { error: a };
726
759
  }
727
- function He({ figure: e, children: t }) {
728
- let n = L(), { setMany: r } = a(), [i, o] = M(null), c = j(null), l = n === null ? { error: V("Scrolly") } : Ve(t, n.lesson), u = "steps" in l ? l.steps : [], d = "error" in l ? l.error : void 0, f = n?.view === "article", p = R(), m = j({
760
+ function Ge({ figure: e, children: t }) {
761
+ let n = R(), { setMany: r } = a(), [i, o] = N(null), c = M(null), l = n === null ? { error: V("Scrolly") } : We(t, n.lesson), u = "steps" in l ? l.steps : [], d = "error" in l ? l.error : void 0, f = n?.view === "article", p = ue(), m = M({
729
762
  steps: u,
730
763
  setMany: r,
731
764
  applied: ""
732
765
  }), h = u.map((e) => e.id).join("\n");
733
- if (k(() => {
766
+ if (A(() => {
734
767
  m.current.steps = u, m.current.setMany = r;
735
- }), k(() => {
768
+ }), A(() => {
736
769
  let e = c.current;
737
770
  if (e === null || !f) return;
738
771
  let t = new IntersectionObserver((e) => {
@@ -741,22 +774,22 @@ function He({ figure: e, children: t }) {
741
774
  }, { rootMargin: "-50% 0px -50% 0px" });
742
775
  for (let n of e.querySelectorAll("[data-step]")) t.observe(n);
743
776
  return () => t.disconnect();
744
- }, [f, h]), n === null || d !== void 0) return /* @__PURE__ */ F(z, { children: d ?? V("Scrolly") });
777
+ }, [f, h]), n === null || d !== void 0) return /* @__PURE__ */ I(z, { children: d ?? V("Scrolly") });
745
778
  if (n.view === "present") {
746
779
  let t = n.outline.beats.find((e) => e.id === p?.id)?.scrollySteps.findIndex((e) => e.id === u[0]?.id) ?? 0, r = Math.min((p?.scrolly ?? 0) - t, u.length - 1), i = r < 0 ? void 0 : u[r]?.id;
747
- return /* @__PURE__ */ F("div", {
780
+ return /* @__PURE__ */ I("div", {
748
781
  className: "x12h1iku x812sq7 x18xfj1p xtru72a x14z9mp x1kn4fvo",
749
- children: /* @__PURE__ */ I("div", {
782
+ children: /* @__PURE__ */ L("div", {
750
783
  className: "xrvj5dj x1mkdm3x xrz0ok8 xaml1ju x7a106z",
751
- children: [/* @__PURE__ */ F("div", {
784
+ children: [/* @__PURE__ */ I("div", {
752
785
  className: "x1ms6mhf xgkxs2y x1b6q7f1",
753
- children: /* @__PURE__ */ F(K, {
786
+ children: /* @__PURE__ */ I(K, {
754
787
  value: !0,
755
788
  children: e
756
789
  })
757
- }), /* @__PURE__ */ F("ol", {
790
+ }), /* @__PURE__ */ I("ol", {
758
791
  className: "xrvj5dj x1hnptsi x7sv70a xru1beq xgkxs2y xeuugli x1ghz6dp x1717udv xe8uvvx",
759
- children: u.map((e) => /* @__PURE__ */ F("li", {
792
+ children: u.map((e) => /* @__PURE__ */ I("li", {
760
793
  "data-step": e.id,
761
794
  "data-active": i === e.id ? "" : void 0,
762
795
  "aria-current": i === e.id ? "step" : void 0,
@@ -770,41 +803,41 @@ function He({ figure: e, children: t }) {
770
803
  })
771
804
  });
772
805
  }
773
- return ze.has(n.view) ? /* @__PURE__ */ F("div", {
806
+ return He.has(n.view) ? /* @__PURE__ */ I("div", {
774
807
  className: "x12h1iku x812sq7 x18xfj1p xtru72a x14z9mp x1kn4fvo xrvj5dj xaml1ju",
775
- children: u.map((t, r) => /* @__PURE__ */ I("div", {
808
+ children: u.map((t, r) => /* @__PURE__ */ L("div", {
776
809
  className: "xrvj5dj xaml1ju",
777
- children: [/* @__PURE__ */ F("div", {
810
+ children: [/* @__PURE__ */ I("div", {
778
811
  className: "x1b5qhtu",
779
812
  children: t.content
780
- }), /* @__PURE__ */ F(s, {
813
+ }), /* @__PURE__ */ I(s, {
781
814
  lesson: n.lesson,
782
815
  locale: n.locale,
783
816
  values: t.values,
784
817
  isReadOnly: !0,
785
- children: /* @__PURE__ */ F(Te, {
818
+ children: /* @__PURE__ */ I(De, {
786
819
  value: r > 0,
787
- children: /* @__PURE__ */ F(K, {
820
+ children: /* @__PURE__ */ I(K, {
788
821
  value: !0,
789
822
  children: e
790
823
  })
791
824
  })
792
825
  })]
793
826
  }, t.id))
794
- }) : /* @__PURE__ */ F("div", {
827
+ }) : /* @__PURE__ */ I("div", {
795
828
  className: "x12h1iku x812sq7 x18xfj1p xtru72a x14z9mp x1kn4fvo",
796
- children: /* @__PURE__ */ I("div", {
829
+ children: /* @__PURE__ */ L("div", {
797
830
  className: "xrvj5dj x1mkdm3x xrz0ok8 x1i3977y x7a106z",
798
- children: [/* @__PURE__ */ F("div", {
799
- className: "x7wzq59 x13vifvy x1vjfegm x1ms6mhf xru1beq xgkxs2y x1b6q7f1 xn9t2bk xpvm0e4",
800
- children: /* @__PURE__ */ F(K, {
831
+ children: [/* @__PURE__ */ I("div", {
832
+ className: "x7wzq59 x8yoas0 x1vjfegm x1ms6mhf xru1beq xgkxs2y x1b6q7f1 xn9t2bk xpvm0e4",
833
+ children: /* @__PURE__ */ I(K, {
801
834
  value: !0,
802
835
  children: e
803
836
  })
804
- }), /* @__PURE__ */ F("div", {
837
+ }), /* @__PURE__ */ I("div", {
805
838
  ref: c,
806
839
  className: "x7sv70a xru1beq xgkxs2y xrvj5dj xxhr3t xeuugli",
807
- children: u.map((e, t) => /* @__PURE__ */ F("div", {
840
+ children: u.map((e, t) => /* @__PURE__ */ I("div", {
808
841
  "data-step": e.id,
809
842
  "data-active": i === e.id ? "" : void 0,
810
843
  ...{
@@ -813,7 +846,7 @@ function He({ figure: e, children: t }) {
813
846
  1: { className: "x78zum5 x6s0dn4 x13qphff x1hbw6r9 x12ldcl5" },
814
847
  3: { className: "x78zum5 x6s0dn4 xwnajww xyvmra8 x12ldcl5" }
815
848
  }[(t === 0) << 1 | (i !== null && i !== e.id)],
816
- children: /* @__PURE__ */ F("div", {
849
+ children: /* @__PURE__ */ I("div", {
817
850
  className: "x1b5qhtu",
818
851
  children: e.content
819
852
  })
@@ -823,42 +856,42 @@ function He({ figure: e, children: t }) {
823
856
  });
824
857
  }
825
858
  // packages/teaching/src/article/article-outline.ts
826
- var Z = "(scrolly figure)", Ue = /* @__PURE__ */ new Map([
859
+ var Z = "(scrolly figure)", Ke = /* @__PURE__ */ new Map([
860
+ [m, "name"],
827
861
  [p, "name"],
828
- [f, "name"],
829
862
  [i, "name"],
830
863
  [o, "name"],
831
864
  [l, "name"],
832
865
  [c, "name"],
833
866
  [u, "for"]
834
867
  ]);
835
- function We({ element: e, place: t, prop: n }) {
836
- return e.type === W ? {
868
+ function qe({ element: e, place: t, prop: n }) {
869
+ return e.type === we ? {
837
870
  beat: X(e, "id") ?? null,
838
871
  figure: null
839
872
  } : e.type === q ? {
840
873
  ...t,
841
874
  figure: X(e, "id") ?? null
842
- } : e.type === He && n === "figure" ? {
875
+ } : e.type === Ge && n === "figure" ? {
843
876
  ...t,
844
877
  figure: Z
845
878
  } : t;
846
879
  }
847
- function Ge(e) {
848
- let t = Ue.get(e.type);
880
+ function Je(e) {
881
+ let t = Ke.get(e.type);
849
882
  return t === void 0 ? void 0 : X(e, t);
850
883
  }
851
- function Ke(e) {
852
- return e.flatMap(({ element: e, place: t }) => e.type === q && D(e) ? [{
884
+ function Ye(e) {
885
+ return e.flatMap(({ element: e, place: t }) => e.type === q && O(e) ? [{
853
886
  id: e.props.id,
854
887
  beat: t.beat,
855
888
  hasDescription: e.props.description !== void 0,
856
889
  size: t.figure === Z ? "text" : e.props.size ?? "wide",
857
890
  node: e
858
- }] : e.type !== He || !D(e) || [...Y({
891
+ }] : e.type !== Ge || !O(e) || [...Y({
859
892
  node: e.props.figure,
860
893
  place: t,
861
- placeOf: We
894
+ placeOf: qe
862
895
  })].some((e) => e.element.type === q) ? [] : [{
863
896
  id: Z,
864
897
  beat: t.beat,
@@ -867,36 +900,36 @@ function Ke(e) {
867
900
  node: e.props.figure
868
901
  }]);
869
902
  }
870
- function qe(e, t) {
903
+ function Xe(e, t) {
871
904
  return e.flatMap(({ element: e, place: n }) => {
872
905
  if (n.beat !== t) return [];
873
- let r = e.type === q && D(e) ? e.props.reads ?? [] : [], i = n.figure === null ? void 0 : Ge(e);
906
+ let r = e.type === q && O(e) ? e.props.reads ?? [] : [], i = n.figure === null ? void 0 : Je(e);
874
907
  return i === void 0 ? r : [...r, i];
875
908
  });
876
909
  }
877
- function Je(e) {
910
+ function Ze(e) {
878
911
  let t = [...Y({
879
912
  node: e,
880
913
  place: {
881
914
  beat: null,
882
915
  figure: null
883
916
  },
884
- placeOf: We
885
- })], n = Ke(t), r = t.flatMap(({ element: e }) => e.type === W ? X(e, "id") ?? [] : []), i = t.flatMap(({ element: e }) => e.type === be && D(e) ? e.props.items : []);
917
+ placeOf: qe
918
+ })], n = Ye(t), r = t.flatMap(({ element: e }) => e.type === we ? X(e, "id") ?? [] : []), i = t.flatMap(({ element: e }) => e.type === Se && O(e) ? e.props.items : []);
886
919
  return {
887
920
  beats: r.map((e) => ({
888
921
  id: e,
889
922
  figures: n.filter((t) => t.beat === e),
890
- figureNames: [...new Set(qe(t, e))],
891
- proseParams: [...new Set(t.flatMap(({ element: t, place: n }) => n.beat === e && n.figure === null && t.type === p ? X(t, "name") ?? [] : []))],
892
- scrollySteps: t.flatMap(({ element: t, place: n }) => n.beat === e && t.type === Be && D(t) ? [{
923
+ figureNames: [...new Set(Xe(t, e))],
924
+ proseParams: [...new Set(t.flatMap(({ element: t, place: n }) => n.beat === e && n.figure === null && t.type === m ? X(t, "name") ?? [] : []))],
925
+ scrollySteps: t.flatMap(({ element: t, place: n }) => n.beat === e && t.type === Ue && O(t) ? [{
893
926
  id: t.props.id,
894
927
  values: t.props.values,
895
928
  state: t.props.state
896
929
  }] : [])
897
930
  })),
898
931
  figures: n.filter((e) => e.id !== Z).map((e) => e.id),
899
- footnotes: t.flatMap(({ element: e, place: t }) => e.type === _e && D(e) ? [{
932
+ footnotes: t.flatMap(({ element: e, place: t }) => e.type === ye && O(e) ? [{
900
933
  id: e.props.id,
901
934
  beat: t.beat,
902
935
  content: e.props.children
@@ -908,7 +941,7 @@ function Je(e) {
908
941
  }] : []),
909
942
  transports: t.flatMap(({ element: e }) => e.type === u ? X(e, "for") ?? [] : []),
910
943
  predictions: t.flatMap(({ element: e, place: t }) => {
911
- let n = e.type === Ie ? X(e, "id") : void 0, r = X(e, "answerFrom");
944
+ let n = e.type === ze ? X(e, "id") : void 0, r = X(e, "answerFrom");
912
945
  return n === void 0 ? [] : [{
913
946
  id: n,
914
947
  beat: t.beat,
@@ -916,7 +949,7 @@ function Je(e) {
916
949
  }];
917
950
  }),
918
951
  challenges: t.flatMap(({ element: e, place: t }) => {
919
- let n = e.type === Ce ? X(e, "id") : void 0;
952
+ let n = e.type === Ee ? X(e, "id") : void 0;
920
953
  return n === void 0 ? [] : [{
921
954
  id: n,
922
955
  beat: t.beat
@@ -924,29 +957,29 @@ function Je(e) {
924
957
  })
925
958
  };
926
959
  }
927
- function Ye(e) {
960
+ function Qe(e) {
928
961
  return Object.fromEntries(e.predictions.flatMap((e) => e.answerFrom === void 0 ? [] : [[e.id, e.answerFrom]]));
929
962
  }
930
963
  // packages/teaching/src/article/progress-store.ts
931
- var Xe = {
964
+ var $e = {
932
965
  predictions: {},
933
966
  reached: [],
934
967
  hints: {},
935
968
  visited: []
936
- }, Ze = "n:", Qe = "s:", $e = "p.", et = "h.";
937
- function tt(e) {
938
- return typeof e == "number" ? `${Ze}${e}` : `${Qe}${e}`;
969
+ }, et = "n:", tt = "s:", nt = "p.", rt = "h.";
970
+ function it(e) {
971
+ return typeof e == "number" ? `${et}${e}` : `${tt}${e}`;
939
972
  }
940
- function nt(e) {
941
- if (e?.startsWith(Qe) === !0) return e.slice(2);
942
- let t = e?.startsWith(Ze) === !0 ? Number(e.slice(2)) : NaN;
973
+ function at(e) {
974
+ if (e?.startsWith(tt) === !0) return e.slice(2);
975
+ let t = e?.startsWith(et) === !0 ? Number(e.slice(2)) : NaN;
943
976
  return Number.isFinite(t) ? t : void 0;
944
977
  }
945
- function rt(e) {
978
+ function ot(e) {
946
979
  return new URLSearchParams([
947
980
  ...Object.entries(e.predictions).flatMap(([e, t]) => [
948
- [`p.${e}.v`, tt(t.value)],
949
- [`p.${e}.a`, tt(t.answer)],
981
+ [`p.${e}.v`, it(t.value)],
982
+ [`p.${e}.a`, it(t.answer)],
950
983
  [`p.${e}.c`, String(t.isCorrect)]
951
984
  ]),
952
985
  ...e.reached.map((e) => ["r", e]),
@@ -954,9 +987,9 @@ function rt(e) {
954
987
  ...e.visited.map((e) => ["v", e])
955
988
  ]).toString();
956
989
  }
957
- function it(e) {
958
- let t = new URLSearchParams(e), n = [...t.keys()], r = [...new Set(n.filter((e) => e.startsWith($e)).map((e) => e.slice(2, e.lastIndexOf("."))))].flatMap((e) => {
959
- let n = nt(t.get(`p.${e}.v`)), r = nt(t.get(`p.${e}.a`));
990
+ function st(e) {
991
+ let t = new URLSearchParams(e), n = [...t.keys()], r = [...new Set(n.filter((e) => e.startsWith(nt)).map((e) => e.slice(2, e.lastIndexOf("."))))].flatMap((e) => {
992
+ let n = at(t.get(`p.${e}.v`)), r = at(t.get(`p.${e}.a`));
960
993
  return n === void 0 || r === void 0 ? [] : [[e, {
961
994
  value: n,
962
995
  answer: r,
@@ -964,7 +997,7 @@ function it(e) {
964
997
  }]];
965
998
  }), i = n.flatMap((e) => {
966
999
  let n = Number(t.get(e));
967
- return e.startsWith(et) && Number.isInteger(n) && n > 0 ? [[e.slice(2), n]] : [];
1000
+ return e.startsWith(rt) && Number.isInteger(n) && n > 0 ? [[e.slice(2), n]] : [];
968
1001
  });
969
1002
  return {
970
1003
  predictions: Object.fromEntries(r),
@@ -973,7 +1006,7 @@ function it(e) {
973
1006
  visited: [...new Set(t.getAll("v"))]
974
1007
  };
975
1008
  }
976
- function at(e, t) {
1009
+ function ct(e, t) {
977
1010
  return {
978
1011
  predictions: {
979
1012
  ...t.predictions,
@@ -987,14 +1020,14 @@ function at(e, t) {
987
1020
  visited: [.../* @__PURE__ */ new Set([...t.visited, ...e.visited])]
988
1021
  };
989
1022
  }
990
- function ot(e) {
1023
+ function lt(e) {
991
1024
  return {
992
1025
  reason: e.reason,
993
1026
  ...e.event !== void 0 && { event: e.event },
994
1027
  ...e.source !== void 0 && { source: e.source }
995
1028
  };
996
1029
  }
997
- var st = oe({
1030
+ var ut = oe({
998
1031
  name: "lesson-progress",
999
1032
  options: {
1000
1033
  progress: "value",
@@ -1003,7 +1036,7 @@ var st = oe({
1003
1036
  storageKey: "string"
1004
1037
  },
1005
1038
  controlled: ["progress"],
1006
- state: (e) => ({ progress: e.progress ?? e.defaultProgress ?? Xe }),
1039
+ state: (e) => ({ progress: e.progress ?? e.defaultProgress ?? $e }),
1007
1040
  sync: (e) => e.progress === void 0 ? {} : { progress: e.progress },
1008
1041
  api: (e) => {
1009
1042
  let t = ie(e);
@@ -1011,7 +1044,7 @@ var st = oe({
1011
1044
  return e.store.get().progress;
1012
1045
  }
1013
1046
  function r(e, n) {
1014
- return t("progress", e, ot(n));
1047
+ return t("progress", e, lt(n));
1015
1048
  }
1016
1049
  return {
1017
1050
  commit(e, t, i) {
@@ -1049,14 +1082,14 @@ var st = oe({
1049
1082
  }, t);
1050
1083
  },
1051
1084
  reset(e) {
1052
- return r(Xe, e ?? { reason: "reset" });
1085
+ return r($e, e ?? { reason: "reset" });
1053
1086
  },
1054
1087
  connect() {
1055
1088
  let { storageKey: t } = e.options();
1056
1089
  if (t === void 0) return () => void 0;
1057
- let i = ae(t), a = it(i.get() ?? "");
1058
- return rt(a) !== "" && r(at(n(), a), { reason: "restore" }), e.store.subscribe(() => {
1059
- i.set(rt(n()));
1090
+ let i = ae(t), a = st(i.get() ?? "");
1091
+ return ot(a) !== "" && r(ct(n(), a), { reason: "restore" }), e.store.subscribe(() => {
1092
+ i.set(ot(n()));
1060
1093
  });
1061
1094
  }
1062
1095
  };
@@ -1064,8 +1097,8 @@ var st = oe({
1064
1097
  slots: (e) => ({ root: e({ bind: (e, t) => t.api.connect() }) }),
1065
1098
  agent: { actions: [] }
1066
1099
  });
1067
- function ct(e, t) {
1068
- let { onProgressChange: n } = e, r = te(st, {
1100
+ function dt(e, t) {
1101
+ let { onProgressChange: n } = e, r = te(ut, {
1069
1102
  ...e,
1070
1103
  onProgressChange: (e, t) => {
1071
1104
  t.source === "agent" ? t.cancel() : n?.(e, t);
@@ -1074,14 +1107,30 @@ function ct(e, t) {
1074
1107
  return re(r.instance.subscribe, r.instance.get, r.instance.get), ee(r, "root", {}, t(r.state.progress, r.api), "article");
1075
1108
  }
1076
1109
  // packages/teaching/src/article/view-essay.tsx
1077
- var lt = "-33% 0px -62% 0px";
1078
- function ut({ beats: e, current: t, isCompact: n, onPick: r }) {
1079
- return /* @__PURE__ */ F("ol", {
1110
+ var ft = "-33% 0px -62% 0px", pt = 8, mt = /* @__PURE__ */ new Set(["auto", "scroll"]);
1111
+ function ht(e) {
1112
+ let t = e.parentElement;
1113
+ return t === null ? document.scrollingElement : mt.has(getComputedStyle(t).overflowY) && t.scrollHeight > t.clientHeight ? t : ht(t);
1114
+ }
1115
+ function gt(e, t) {
1116
+ if (e.contains(t) || !e.checkVisibility()) return;
1117
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
1118
+ r.top < n.bottom && r.bottom > n.top && ht(t)?.scrollBy({
1119
+ top: r.top - n.bottom - pt,
1120
+ behavior: "instant"
1121
+ });
1122
+ }
1123
+ function _t(e, t) {
1124
+ let n = location.hash === "" ? null : document.querySelector(`#${CSS.escape(decodeURIComponent(location.hash.slice(1)))}`);
1125
+ n !== null && e.contains(n) && gt(t, n);
1126
+ }
1127
+ function vt({ beats: e, current: t, isCompact: n, onPick: r }) {
1128
+ return /* @__PURE__ */ I("ol", {
1080
1129
  ...{
1081
1130
  0: { className: "xrvj5dj xfko13i x1ghz6dp x1717udv x3ct3a4" },
1082
1131
  1: { className: "xrvj5dj xfko13i x1ghz6dp x1717udv x3ct3a4 x3bg4vu" }
1083
1132
  }[!!n | 0],
1084
- children: e.map((e) => /* @__PURE__ */ F("li", { children: /* @__PURE__ */ F("a", {
1133
+ children: e.map((e) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I("a", {
1085
1134
  href: `#${encodeURIComponent(e.id)}`,
1086
1135
  "aria-current": e.id === t ? "location" : void 0,
1087
1136
  onClick: r,
@@ -1093,8 +1142,8 @@ function ut({ beats: e, current: t, isCompact: n, onPick: r }) {
1093
1142
  }) }, e.id))
1094
1143
  });
1095
1144
  }
1096
- function dt({ article: e, header: t, children: n }) {
1097
- let { beat: r, goTo: i } = a(), o = j(null), s = j(null), c = j({
1145
+ function yt({ article: e, header: t, children: n }) {
1146
+ let { beat: r, goTo: i } = a(), o = M(null), s = M(null), c = M({
1098
1147
  beat: r,
1099
1148
  goTo: i,
1100
1149
  scrolled: r
@@ -1105,52 +1154,59 @@ function dt({ article: e, header: t, children: n }) {
1105
1154
  title: n.title
1106
1155
  }];
1107
1156
  }), u = l.find((e) => e.id === r)?.title ?? l[0]?.title ?? "";
1108
- return k(() => {
1157
+ return A(() => {
1109
1158
  c.current.beat = r, c.current.goTo = i;
1110
1159
  let e = o.current;
1111
1160
  r !== null && r !== c.current.scrolled && e !== null && (c.current.scrolled = r, e.querySelector(`[data-beat="${CSS.escape(r)}"]`)?.scrollIntoView({ block: "start" }));
1112
- }), k(() => {
1161
+ }), A(() => {
1113
1162
  let t = o.current;
1114
1163
  if (t === null) return;
1115
1164
  let n = new Set(e.lesson.beats.map((e) => e.id)), r = new IntersectionObserver((e) => {
1116
1165
  let t = e.find((e) => e.isIntersecting)?.target, r = t instanceof HTMLElement ? t.dataset.beat : void 0;
1117
1166
  r !== void 0 && n.has(r) && (c.current.scrolled = r, r !== c.current.beat && c.current.goTo(r, 0, { reason: "scroll" }));
1118
- }, { rootMargin: lt });
1167
+ }, { rootMargin: ft });
1119
1168
  for (let e of t.querySelectorAll("[data-beat]")) r.observe(e);
1120
1169
  return () => r.disconnect();
1121
- }, [e.lesson]), /* @__PURE__ */ I("div", {
1170
+ }, [e.lesson]), A(() => {
1171
+ let e = o.current, t = s.current;
1172
+ if (e === null || t === null) return;
1173
+ let n = new AbortController();
1174
+ return e.addEventListener("focusin", (e) => {
1175
+ e.target instanceof Element && gt(t, e.target);
1176
+ }, { signal: n.signal }), globalThis.addEventListener("hashchange", () => _t(e, t), { signal: n.signal }), _t(e, t), () => n.abort();
1177
+ }, [e.hasContents]), e.hasContents ? /* @__PURE__ */ L("div", {
1122
1178
  ref: o,
1123
- className: "xrvj5dj x1mkdm3x x1xlo7gb xpoj3vq x7a106z",
1124
- children: [/* @__PURE__ */ I("nav", {
1179
+ className: "xrvj5dj x1n1i2jm xglu9to x1mkdm3x x1xlo7gb xpoj3vq x7a106z",
1180
+ children: [/* @__PURE__ */ L("nav", {
1125
1181
  "aria-label": e.labels.contents,
1126
1182
  className: "x1s85apg x1mbwsne x7wzq59 x1leig9i xe0zcna",
1127
- children: [/* @__PURE__ */ F("p", {
1183
+ children: [/* @__PURE__ */ I("p", {
1128
1184
  className: "x1ghz6dp x1jfksii x153jb6y xy8obcc xas2l8k x1b5ytql",
1129
1185
  children: e.labels.contents
1130
- }), /* @__PURE__ */ F(ut, {
1186
+ }), /* @__PURE__ */ I(vt, {
1131
1187
  beats: l,
1132
1188
  current: r,
1133
1189
  isCompact: !1
1134
1190
  })]
1135
- }), /* @__PURE__ */ I("div", {
1191
+ }), /* @__PURE__ */ L("div", {
1136
1192
  className: "xeuugli",
1137
1193
  children: [
1138
1194
  t,
1139
- /* @__PURE__ */ I("details", {
1195
+ /* @__PURE__ */ L("details", {
1140
1196
  ref: s,
1141
1197
  className: "x1lliihq xwuzx6 x7wzq59 x13vifvy xhtitgo xm8yyvp xn9t2bk xso031l x1q0q8m5 x1qndepd xpvm0e4",
1142
- children: [/* @__PURE__ */ I("summary", {
1198
+ children: [/* @__PURE__ */ L("summary", {
1143
1199
  className: "x78zum5 x1hnptsi x1pha0wt x1ypdohk xbixft xtqrqnz x1778rvt x1ok0vyi x13qnu6 x9v5kkp x19rmrnh",
1144
- children: [/* @__PURE__ */ F("span", {
1200
+ children: [/* @__PURE__ */ I("span", {
1145
1201
  className: "x153jb6y x2lah0s",
1146
1202
  children: e.labels.contents
1147
- }), /* @__PURE__ */ F("span", {
1203
+ }), /* @__PURE__ */ I("span", {
1148
1204
  className: "xb3r6kr xlyipyv xuxw1ft xk4h15q",
1149
1205
  children: u
1150
1206
  })]
1151
- }), /* @__PURE__ */ F("nav", {
1207
+ }), /* @__PURE__ */ I("nav", {
1152
1208
  "aria-label": e.labels.contents,
1153
- children: /* @__PURE__ */ F(ut, {
1209
+ children: /* @__PURE__ */ I(vt, {
1154
1210
  beats: l,
1155
1211
  current: r,
1156
1212
  isCompact: !0,
@@ -1161,32 +1217,43 @@ function dt({ article: e, header: t, children: n }) {
1161
1217
  })]
1162
1218
  }),
1163
1219
  n,
1164
- /* @__PURE__ */ F(H, {})
1220
+ /* @__PURE__ */ I(H, {})
1165
1221
  ]
1166
1222
  })]
1223
+ }) : /* @__PURE__ */ I("div", {
1224
+ ref: o,
1225
+ className: "xrvj5dj xpoj3vq x7a106z x1mkdm3x x1n1i2jm",
1226
+ children: /* @__PURE__ */ L("div", {
1227
+ className: "xeuugli",
1228
+ children: [
1229
+ t,
1230
+ n,
1231
+ /* @__PURE__ */ I(H, {})
1232
+ ]
1233
+ })
1167
1234
  });
1168
1235
  }
1169
1236
  // packages/teaching/src/article/view-present.tsx
1170
- var ft = "input, textarea, select, [contenteditable=\"true\"], [role=\"slider\"], [role=\"radio\"], [role=\"radiogroup\"], [role=\"tab\"], [role=\"combobox\"], [role=\"spinbutton\"], [role=\"listbox\"], [role=\"menu\"], [role=\"grid\"], [role=\"application\"]", pt = `${ft}, button, a, summary, [role="button"], [role="checkbox"], [role="switch"], [role="link"]`;
1171
- function mt(e, t) {
1237
+ var bt = "input, textarea, select, [contenteditable=\"true\"], [role=\"slider\"], [role=\"radio\"], [role=\"radiogroup\"], [role=\"tab\"], [role=\"combobox\"], [role=\"spinbutton\"], [role=\"listbox\"], [role=\"menu\"], [role=\"grid\"], [role=\"application\"]", xt = `${bt}, button, a, summary, [role="button"], [role="checkbox"], [role="switch"], [role="link"]`;
1238
+ function St(e, t) {
1172
1239
  return e instanceof Element && e.closest(t) !== null;
1173
1240
  }
1174
- function ht({ article: e, children: t }) {
1175
- let { beat: n, step: r, next: i, previous: o, lesson: s } = a(), c = j(null), l = j({
1241
+ function Ct({ article: e, children: t }) {
1242
+ let { beat: n, step: r, next: i, previous: o, lesson: s } = a(), c = M(null), l = M({
1176
1243
  next: i,
1177
1244
  previous: o
1178
- }), u = j(n), d = s.beats, f = d.findIndex((e) => e.id === n), p = U(s, n ?? ""), m = e.outline.beats.find((e) => e.id === n)?.scrollySteps.length ?? 0, h = (p?.steps ?? 0) + Math.max(0, m - 1), g = f <= 0 && r === 0, v = f === d.length - 1 && r >= h, { labels: y } = e, b = `${y.beat} ${f + 1} ${y.of} ${d.length}`, x = h > 0 ? `, ${y.step} ${r + 1} ${y.of} ${h + 1}` : "";
1179
- return k(() => {
1245
+ }), u = M(n), d = s.beats, f = d.findIndex((e) => e.id === n), p = U(s, n ?? ""), m = e.outline.beats.find((e) => e.id === n)?.scrollySteps.length ?? 0, h = (p?.steps ?? 0) + Math.max(0, m - 1), g = f <= 0 && r === 0, v = f === d.length - 1 && r >= h, { labels: y } = e, b = `${y.beat} ${f + 1} ${y.of} ${d.length}`, x = h > 0 ? `, ${y.step} ${r + 1} ${y.of} ${h + 1}` : "";
1246
+ return A(() => {
1180
1247
  l.current = {
1181
1248
  next: i,
1182
1249
  previous: o
1183
1250
  };
1184
- }), k(() => {
1251
+ }), A(() => {
1185
1252
  u.current !== n && (u.current = n, c.current?.scrollIntoView({ block: "start" }));
1186
- }, [n]), k(() => {
1253
+ }, [n]), A(() => {
1187
1254
  function e(e) {
1188
- let t = N(e, "ArrowRight"), n = N(e, "Space"), r = N(e, "ArrowLeft"), i = n ? pt : ft;
1189
- !t && !n && !r || e.defaultPrevented || mt(e.target, i) || (e.preventDefault(), r ? l.current.previous({
1255
+ let t = P(e, "ArrowRight"), n = P(e, "Space"), r = P(e, "ArrowLeft"), i = n ? xt : bt;
1256
+ !t && !n && !r || e.defaultPrevented || St(e.target, i) || (e.preventDefault(), r ? l.current.previous({
1190
1257
  reason: "shortcut",
1191
1258
  event: e
1192
1259
  }) : l.current.next({
@@ -1195,38 +1262,38 @@ function ht({ article: e, children: t }) {
1195
1262
  }));
1196
1263
  }
1197
1264
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1198
- }, []), /* @__PURE__ */ F(P, { children: /* @__PURE__ */ I("div", {
1265
+ }, []), /* @__PURE__ */ I(F, { children: /* @__PURE__ */ L("div", {
1199
1266
  ref: c,
1200
1267
  className: "xrvj5dj xxq7klm x1ov3xa9 xdiyxhk",
1201
1268
  children: [
1202
- /* @__PURE__ */ I("div", {
1269
+ /* @__PURE__ */ L("div", {
1203
1270
  className: "x78zum5 x1a02dak x1qughib x1hnptsi x1qokhjc xso031l x1q0q8m5 x1qndepd x153jb6y xtqrqnz x1778rvt",
1204
- children: [/* @__PURE__ */ F("p", {
1271
+ children: [/* @__PURE__ */ I("p", {
1205
1272
  className: "x1ghz6dp xbixft xk4h15q",
1206
1273
  children: e.title
1207
- }), /* @__PURE__ */ F("p", {
1274
+ }), /* @__PURE__ */ I("p", {
1208
1275
  "aria-live": "polite",
1209
1276
  className: "x1ghz6dp xss6m8b",
1210
1277
  children: `${b}${x}`
1211
1278
  })]
1212
1279
  }),
1213
- /* @__PURE__ */ F("div", {
1280
+ /* @__PURE__ */ I("div", {
1214
1281
  className: "xeuugli xmblgzg",
1215
1282
  children: t
1216
1283
  }),
1217
- /* @__PURE__ */ I("div", {
1284
+ /* @__PURE__ */ L("div", {
1218
1285
  className: "xrvj5dj x1n8ia3y x7wzq59 x1ey2m1c x1qokhjc xpvm0e4",
1219
- children: [/* @__PURE__ */ F("div", {
1286
+ children: [/* @__PURE__ */ I("div", {
1220
1287
  "aria-hidden": !0,
1221
1288
  className: "x78zum5 xfko13i xeuugli",
1222
- children: d.map((e, t) => /* @__PURE__ */ F("span", { ...{
1289
+ children: d.map((e, t) => /* @__PURE__ */ I("span", { ...{
1223
1290
  0: { className: "x1iyjqo2 x1r8uery x8qmimb x1fxuffc x1fa40ue" },
1224
1291
  1: { className: "x1iyjqo2 x1r8uery x8qmimb x1fxuffc x1pt885t" }
1225
1292
  }[t <= f | 0] }, e.id))
1226
- }), /* @__PURE__ */ I("div", {
1293
+ }), /* @__PURE__ */ L("div", {
1227
1294
  className: "x78zum5 x1qughib x6s0dn4 x1n8ia3y",
1228
1295
  children: [
1229
- /* @__PURE__ */ F(_, {
1296
+ /* @__PURE__ */ I(_, {
1230
1297
  density: "compact",
1231
1298
  disabled: g,
1232
1299
  focusableWhenDisabled: !0,
@@ -1236,12 +1303,12 @@ function ht({ article: e, children: t }) {
1236
1303
  }),
1237
1304
  children: y.previous
1238
1305
  }),
1239
- /* @__PURE__ */ F("span", {
1306
+ /* @__PURE__ */ I("span", {
1240
1307
  "aria-hidden": !0,
1241
1308
  className: "x12ldcl5 xy8obcc x2b8uid",
1242
1309
  children: "← →"
1243
1310
  }),
1244
- /* @__PURE__ */ F(_, {
1311
+ /* @__PURE__ */ I(_, {
1245
1312
  density: "compact",
1246
1313
  variant: "solid",
1247
1314
  disabled: v,
@@ -1259,7 +1326,7 @@ function ht({ article: e, children: t }) {
1259
1326
  }) });
1260
1327
  }
1261
1328
  // packages/teaching/src/article/article-checks.ts
1262
- function gt(e, t) {
1329
+ function wt(e, t) {
1263
1330
  let n = new Map(Object.entries(e.reads)), r = {
1264
1331
  found: /* @__PURE__ */ new Set([t]),
1265
1332
  size: 0
@@ -1267,7 +1334,7 @@ function gt(e, t) {
1267
1334
  for (; r.found.size !== r.size;) r.size = r.found.size, r.found = /* @__PURE__ */ new Set([...r.found, ...[...r.found].flatMap((e) => n.get(e) ?? [])]);
1268
1335
  return r.found;
1269
1336
  }
1270
- function _t(e, t) {
1337
+ function Tt(e, t) {
1271
1338
  let n = new Set(e.beats.map((e) => e.id)), r = new Set(t.beats.map((e) => e.id));
1272
1339
  return [
1273
1340
  ...e.beats.filter((e) => !r.has(e.id)).map((e) => ({
@@ -1284,13 +1351,13 @@ function _t(e, t) {
1284
1351
  }))
1285
1352
  ];
1286
1353
  }
1287
- function vt(e) {
1354
+ function Et(e) {
1288
1355
  return e.beats.flatMap((e) => e.figures).filter((e) => !e.hasDescription).map((e) => ({
1289
1356
  beat: e.beat,
1290
1357
  message: `Figure "${e.id}" has no description.`
1291
1358
  }));
1292
1359
  }
1293
- function yt(e) {
1360
+ function Dt(e) {
1294
1361
  return [
1295
1362
  ...e.beats.map((e) => ({
1296
1363
  id: e.id,
@@ -1310,18 +1377,18 @@ function yt(e) {
1310
1377
  }))
1311
1378
  ];
1312
1379
  }
1313
- function bt(e) {
1314
- return [...Map.groupBy(yt(e), (e) => e.id)].flatMap(([e, t]) => t.length === 1 ? [] : [{
1380
+ function Ot(e) {
1381
+ return [...Map.groupBy(Dt(e), (e) => e.id)].flatMap(([e, t]) => t.length === 1 ? [] : [{
1315
1382
  beat: null,
1316
1383
  message: `${t.map((e) => e.part).join(" and ")} share the element id "${e}". Rename one.`
1317
1384
  }]);
1318
1385
  }
1319
- function xt(e, t) {
1386
+ function kt(e, t) {
1320
1387
  let n = new Set(t.transports), r = t.playbacks.filter((e) => !n.has(e.name)).map((e) => ({
1321
1388
  beat: e.beat,
1322
1389
  message: `Playback "${e.name}" has no Transport, so the reader cannot start it.`
1323
1390
  })), i = t.beats.flatMap((t) => {
1324
- let n = new Set(t.figureNames.flatMap((t) => [...gt(e, t)]));
1391
+ let n = new Set(t.figureNames.flatMap((t) => [...wt(e, t)]));
1325
1392
  return t.proseParams.filter((e) => !n.has(e)).map((e) => ({
1326
1393
  beat: t.id,
1327
1394
  message: `Param "${e}" in the prose of beat "${t.id}" changes no figure of that beat. Name it in a figure's reads.`
@@ -1329,7 +1396,7 @@ function xt(e, t) {
1329
1396
  });
1330
1397
  return [...r, ...i];
1331
1398
  }
1332
- function St(e) {
1399
+ function At(e) {
1333
1400
  return [...e.predictions.filter((e) => e.beat === null).map((e) => ({
1334
1401
  beat: null,
1335
1402
  message: `Predict "${e.id}" sits outside every Beat.`
@@ -1338,17 +1405,17 @@ function St(e) {
1338
1405
  message: `Challenge "${e.id}" sits outside every Beat.`
1339
1406
  }))];
1340
1407
  }
1341
- function Ct(e, t) {
1408
+ function jt(e, t) {
1342
1409
  return [
1343
- ..._t(e, t),
1344
- ...vt(t),
1345
- ...xt(e, t),
1346
- ...St(t),
1347
- ...bt(t)
1410
+ ...Tt(e, t),
1411
+ ...Et(t),
1412
+ ...kt(e, t),
1413
+ ...At(t),
1414
+ ...Ot(t)
1348
1415
  ];
1349
1416
  }
1350
1417
  // packages/teaching/src/article/view-sheet.tsx
1351
- var wt = {
1418
+ var Mt = {
1352
1419
  k3aq6I: "xsqj5wx",
1353
1420
  $$css: !0
1354
1421
  }, Q = {
@@ -1369,7 +1436,7 @@ var wt = {
1369
1436
  kzqmXN: "x2foucm",
1370
1437
  $$css: !0
1371
1438
  },
1372
- scaled: (e) => [wt, { "--x-transform": `scale(${e})` == null ? void 0 : `scale(${e})` }],
1439
+ scaled: (e) => [Mt, { "--x-transform": `scale(${e})` == null ? void 0 : `scale(${e})` }],
1373
1440
  widened: (e) => [{
1374
1441
  kzqmXN: e == null ? e : "x5lhr3w",
1375
1442
  $$css: !0
@@ -1378,21 +1445,21 @@ var wt = {
1378
1445
  kZKoxP: e == null ? e : "x16ye13r",
1379
1446
  $$css: !0
1380
1447
  }, { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }]
1381
- }, Tt = /* @__PURE__ */ new Set(["auto", "scroll"]);
1382
- function Et(e) {
1383
- let t = [...e.querySelectorAll("*")].filter((e) => Tt.has(getComputedStyle(e).overflowX)).map((e) => e.scrollWidth - e.clientWidth);
1448
+ }, Nt = /* @__PURE__ */ new Set(["auto", "scroll"]);
1449
+ function Pt(e) {
1450
+ let t = [...e.querySelectorAll("*")].filter((e) => Nt.has(getComputedStyle(e).overflowX)).map((e) => e.scrollWidth - e.clientWidth);
1384
1451
  return Math.max(0, ...t);
1385
1452
  }
1386
- function Dt({ frame: e, design: t, fit: n }) {
1387
- let r = Et(t), i = t.offsetWidth + r, a = Math.min(1, e.clientWidth / i);
1453
+ function Ft({ frame: e, design: t, fit: n }) {
1454
+ let r = Pt(t), i = t.offsetWidth + r, a = Math.min(1, e.clientWidth / i);
1388
1455
  return {
1389
1456
  scale: a,
1390
1457
  height: t.offsetHeight * a,
1391
1458
  width: r > 0 ? i : n.width
1392
1459
  };
1393
1460
  }
1394
- function Ot({ size: e, children: t }) {
1395
- let n = j(null), r = j(null), [i, a] = M({
1461
+ function It({ size: e, children: t }) {
1462
+ let n = M(null), r = M(null), [i, a] = N({
1396
1463
  scale: 1,
1397
1464
  height: void 0,
1398
1465
  width: void 0
@@ -1400,29 +1467,29 @@ function Ot({ size: e, children: t }) {
1400
1467
  return ne(() => {
1401
1468
  let e = n.current, t = r.current;
1402
1469
  if (e === null || t === null) return;
1403
- let i = new ResizeObserver(() => a((n) => Dt({
1470
+ let i = new ResizeObserver(() => a((n) => Ft({
1404
1471
  frame: e,
1405
1472
  design: t,
1406
1473
  fit: n
1407
1474
  }))), o = new AbortController();
1408
- return i.observe(e), i.observe(t), globalThis.matchMedia("print").addEventListener("change", () => a((n) => Dt({
1475
+ return i.observe(e), i.observe(t), globalThis.matchMedia("print").addEventListener("change", () => a((n) => Ft({
1409
1476
  frame: e,
1410
1477
  design: t,
1411
1478
  fit: n
1412
1479
  })), { signal: o.signal }), () => {
1413
1480
  i.disconnect(), o.abort();
1414
1481
  };
1415
- }, []), /* @__PURE__ */ F("div", {
1482
+ }, []), /* @__PURE__ */ I("div", {
1416
1483
  ref: n,
1417
- ...T.props(Q.frame, i.height !== void 0 && Q.reserved(i.height)),
1418
- children: /* @__PURE__ */ F("div", {
1484
+ ...E.props(Q.frame, i.height !== void 0 && Q.reserved(i.height)),
1485
+ children: /* @__PURE__ */ I("div", {
1419
1486
  ref: r,
1420
- ...T.props(Q.design, i.width === void 0 ? Q[e] : Q.widened(i.width), Q.scaled(i.scale)),
1487
+ ...E.props(Q.design, i.width === void 0 ? Q[e] : Q.widened(i.width), Q.scaled(i.scale)),
1421
1488
  children: t
1422
1489
  })
1423
1490
  });
1424
1491
  }
1425
- function kt({ beat: e, article: t }) {
1492
+ function Lt({ beat: e, article: t }) {
1426
1493
  let n = U(t.lesson, e.id), { labels: r } = t, i = [
1427
1494
  {
1428
1495
  term: r.goal,
@@ -1444,26 +1511,26 @@ function kt({ beat: e, article: t }) {
1444
1511
  term: e.term,
1445
1512
  value: e.value
1446
1513
  }]);
1447
- return /* @__PURE__ */ F("dl", {
1514
+ return /* @__PURE__ */ I("dl", {
1448
1515
  className: "xrvj5dj x16lqc3j x8zbtdt x1gkm1c7 x1ghz6dp xtqrqnz x1778rvt",
1449
- children: i.map((e) => /* @__PURE__ */ I("div", {
1516
+ children: i.map((e) => /* @__PURE__ */ L("div", {
1450
1517
  className: "xjp7ctv",
1451
- children: [/* @__PURE__ */ F("dt", {
1518
+ children: [/* @__PURE__ */ I("dt", {
1452
1519
  className: "x153jb6y",
1453
1520
  children: e.term
1454
- }), /* @__PURE__ */ F("dd", {
1521
+ }), /* @__PURE__ */ I("dd", {
1455
1522
  className: "x1ghz6dp",
1456
1523
  children: e.value
1457
1524
  })]
1458
1525
  }, e.term))
1459
1526
  });
1460
1527
  }
1461
- function At({ article: e }) {
1462
- let t = Ct(e.lesson, e.outline), { labels: n } = e;
1463
- return /* @__PURE__ */ I("div", {
1528
+ function Rt({ article: e }) {
1529
+ let t = jt(e.lesson, e.outline), { labels: n } = e;
1530
+ return /* @__PURE__ */ L("div", {
1464
1531
  className: "xrvj5dj x1m6b44x xeuugli xbixft x1hz01jw",
1465
1532
  children: [
1466
- /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F("h1", {
1533
+ /* @__PURE__ */ I("div", { children: /* @__PURE__ */ I("h1", {
1467
1534
  className: "x1ghz6dp x71lla1 xgkpprq x1b5ytql x1wjjqco",
1468
1535
  children: `${n.sheet}: ${e.title}`
1469
1536
  }) }),
@@ -1473,40 +1540,40 @@ function At({ article: e }) {
1473
1540
  label: n.opening,
1474
1541
  values: {}
1475
1542
  }, a = r?.states === void 0 || r.states.length === 0 ? [i] : r.states;
1476
- return /* @__PURE__ */ I("section", {
1543
+ return /* @__PURE__ */ L("section", {
1477
1544
  "aria-label": r?.title ?? t.id,
1478
1545
  className: "xrvj5dj x1n8ia3y xmblgzg x178xt8z x13fuv20 xhjagg4",
1479
1546
  children: [
1480
- /* @__PURE__ */ I("h2", {
1547
+ /* @__PURE__ */ L("h2", {
1481
1548
  className: "x1ghz6dp x1i2cqwi x4fansv x1b5ytql",
1482
1549
  children: [
1483
1550
  r?.title ?? t.id,
1484
1551
  " ",
1485
- /* @__PURE__ */ F("span", {
1552
+ /* @__PURE__ */ I("span", {
1486
1553
  className: "xiard35 xy8obcc x153jb6y xj57cvi",
1487
1554
  children: t.id
1488
1555
  })
1489
1556
  ]
1490
1557
  }),
1491
- /* @__PURE__ */ F(kt, {
1558
+ /* @__PURE__ */ I(Lt, {
1492
1559
  beat: t,
1493
1560
  article: e
1494
1561
  }),
1495
- /* @__PURE__ */ F("div", {
1562
+ /* @__PURE__ */ I("div", {
1496
1563
  className: "xrvj5dj x7te2vt xaml1ju",
1497
- children: a.map((n) => /* @__PURE__ */ I("div", {
1564
+ children: a.map((n) => /* @__PURE__ */ L("div", {
1498
1565
  className: "xrvj5dj x10ukxgv x1hnptsi xeuugli x1mvvolr xmkeg23 x1y0btm7 x1ey3b81 xy32g2j",
1499
- children: [/* @__PURE__ */ F("p", {
1566
+ children: [/* @__PURE__ */ I("p", {
1500
1567
  className: "x1ghz6dp xy8obcc xas2l8k x153jb6y",
1501
1568
  children: n.label
1502
- }), /* @__PURE__ */ F(s, {
1569
+ }), /* @__PURE__ */ I(s, {
1503
1570
  lesson: e.lesson,
1504
1571
  locale: e.locale,
1505
1572
  values: n.values,
1506
1573
  isReadOnly: !0,
1507
- children: /* @__PURE__ */ F("div", {
1574
+ children: /* @__PURE__ */ I("div", {
1508
1575
  className: "xrvj5dj x1j825kq xeuugli",
1509
- children: t.figures.map((e) => /* @__PURE__ */ F(Ot, {
1576
+ children: t.figures.map((e) => /* @__PURE__ */ I(It, {
1510
1577
  size: e.size,
1511
1578
  children: e.node
1512
1579
  }, e.id))
@@ -1517,18 +1584,18 @@ function At({ article: e }) {
1517
1584
  ]
1518
1585
  }, t.id);
1519
1586
  }),
1520
- /* @__PURE__ */ I("section", {
1587
+ /* @__PURE__ */ L("section", {
1521
1588
  "aria-label": n.checks,
1522
1589
  className: "xrvj5dj x1n8ia3y xmblgzg x178xt8z x13fuv20 xhjagg4",
1523
- children: [/* @__PURE__ */ F("h2", {
1590
+ children: [/* @__PURE__ */ I("h2", {
1524
1591
  className: "x1ghz6dp x1i2cqwi x4fansv x1b5ytql",
1525
1592
  children: n.checks
1526
- }), t.length === 0 ? /* @__PURE__ */ F("p", {
1593
+ }), t.length === 0 ? /* @__PURE__ */ I("p", {
1527
1594
  className: "x1ghz6dp x153jb6y xtqrqnz x1778rvt",
1528
1595
  children: n.noProblems
1529
- }) : /* @__PURE__ */ F("ul", {
1596
+ }) : /* @__PURE__ */ I("ul", {
1530
1597
  className: "xrvj5dj xunmzkg x1ghz6dp x1sbza1b x12myhf4",
1531
- children: t.map((e) => /* @__PURE__ */ F("li", {
1598
+ children: t.map((e) => /* @__PURE__ */ I("li", {
1532
1599
  className: "x1f9ixgr",
1533
1600
  children: e.message
1534
1601
  }, e.message))
@@ -1538,39 +1605,39 @@ function At({ article: e }) {
1538
1605
  });
1539
1606
  }
1540
1607
  // packages/teaching/src/article/view-static.tsx
1541
- function jt({ article: e, header: t, children: n }) {
1608
+ function zt({ article: e, header: t, children: n }) {
1542
1609
  let r = e.outline.beats.flatMap((t) => U(e.lesson, t.id) ?? []);
1543
- return /* @__PURE__ */ I("div", {
1610
+ return /* @__PURE__ */ L("div", {
1544
1611
  className: "xeuugli",
1545
1612
  children: [
1546
1613
  t,
1547
- /* @__PURE__ */ I("nav", {
1614
+ e.hasContents ? /* @__PURE__ */ L("nav", {
1548
1615
  "aria-label": e.labels.contents,
1549
1616
  className: "x1b5qhtu xtru72a x153jb6y xtqrqnz x1778rvt",
1550
- children: [/* @__PURE__ */ F("p", {
1617
+ children: [/* @__PURE__ */ I("p", {
1551
1618
  className: "x1ghz6dp xbixft x1b5ytql",
1552
1619
  children: e.labels.contents
1553
- }), /* @__PURE__ */ F("ol", {
1620
+ }), /* @__PURE__ */ I("ol", {
1554
1621
  className: "x1ghz6dp x1sbza1b",
1555
- children: r.map((e) => /* @__PURE__ */ F("li", { children: /* @__PURE__ */ F("a", {
1622
+ children: r.map((e) => /* @__PURE__ */ I("li", { children: /* @__PURE__ */ I("a", {
1556
1623
  href: `#${encodeURIComponent(e.id)}`,
1557
1624
  children: e.title
1558
1625
  }) }, e.id))
1559
1626
  })]
1560
- }),
1627
+ }) : null,
1561
1628
  n,
1562
- /* @__PURE__ */ F(H, {})
1629
+ /* @__PURE__ */ I(H, {})
1563
1630
  ]
1564
1631
  });
1565
1632
  }
1566
1633
  // packages/teaching/src/article/article.tsx
1567
- var Mt = /* @__PURE__ */ new Set(["article", "present"]), Nt = {
1568
- article: dt,
1569
- present: ht,
1570
- static: jt,
1571
- sheet: At
1634
+ var Bt = /* @__PURE__ */ new Set(["article", "present"]), Vt = {
1635
+ article: yt,
1636
+ present: Ct,
1637
+ static: zt,
1638
+ sheet: Rt
1572
1639
  };
1573
- function Pt() {
1640
+ function Ht() {
1574
1641
  let e = { pending: null };
1575
1642
  return {
1576
1643
  wait: (t) => {
@@ -1582,33 +1649,33 @@ function Pt() {
1582
1649
  }
1583
1650
  };
1584
1651
  }
1585
- var Ft = /* @__PURE__ */ new Map([
1652
+ var Ut = /* @__PURE__ */ new Map([
1586
1653
  ["press", "press"],
1587
1654
  ["link-press", "press"],
1588
1655
  ["scroll", "scroll"],
1589
1656
  ["shortcut", "shortcut"]
1590
1657
  ]);
1591
- function It(e) {
1658
+ function Wt(e) {
1592
1659
  return {
1593
- reason: Ft.get(e.reason) ?? "imperative",
1660
+ reason: Ut.get(e.reason) ?? "imperative",
1594
1661
  event: e.event,
1595
1662
  source: e.source
1596
1663
  };
1597
1664
  }
1598
- function Lt({ challenges: e, progressApi: t, isReading: n, moves: r, outline: i, opening: o }) {
1599
- let { values: s, beat: c, step: l, lesson: u, show: d, setMany: f } = a(), p = j(c), m = i.beats.find((e) => e.id === c), h = fe({
1665
+ function Gt({ challenges: e, progressApi: t, isReading: n, moves: r, outline: i, opening: o }) {
1666
+ let { values: s, beat: c, step: l, lesson: u, show: d, setMany: f } = a(), p = M(c), m = i.beats.find((e) => e.id === c), h = me({
1600
1667
  beat: m,
1601
1668
  step: l,
1602
1669
  view: "present"
1603
- }), g = j({
1670
+ }), g = M({
1604
1671
  beat: c,
1605
1672
  scrolly: h.scrolly
1606
1673
  });
1607
- return k(() => {
1674
+ return A(() => {
1608
1675
  e.remember(s);
1609
- }), k(() => {
1676
+ }), A(() => {
1610
1677
  n && p.current !== null && t.visit(p.current, { reason: "visit" });
1611
- }, [n, t]), k(() => {
1678
+ }, [n, t]), A(() => {
1612
1679
  let e = r.pending();
1613
1680
  if (e === null) return;
1614
1681
  let t = g.current.beat !== c, n = h.scrolly === null ? void 0 : m?.scrollySteps[h.scrolly], i = n !== void 0 && (t || g.current.scrolly !== h.scrolly), a = u.beats.find((e) => e.id === c)?.states?.[0];
@@ -1616,7 +1683,7 @@ function Lt({ challenges: e, progressApi: t, isReading: n, moves: r, outline: i,
1616
1683
  beat: c,
1617
1684
  scrolly: h.scrolly
1618
1685
  }, i) {
1619
- let t = n.state === void 0 ? n.values : Re(u, n.state);
1686
+ let t = n.state === void 0 ? n.values : Ve(u, n.state);
1620
1687
  f({
1621
1688
  ...o,
1622
1689
  ...a?.values,
@@ -1635,35 +1702,35 @@ function Lt({ challenges: e, progressApi: t, isReading: n, moves: r, outline: i,
1635
1702
  d
1636
1703
  ]), null;
1637
1704
  }
1638
- function Rt(e, t) {
1705
+ function Kt(e, t) {
1639
1706
  return new Intl.DateTimeFormat(t, {
1640
1707
  dateStyle: "long",
1641
1708
  timeZone: "UTC"
1642
1709
  }).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`));
1643
1710
  }
1644
- function zt({ lesson: e, locale: n, title: i, authors: a = [], date: o, summary: c, tones: l = {}, view: u = "article", math: d, storageKey: f, progress: p, defaultProgress: m, onProgressChange: h, labels: g, lessonProps: _, children: v }) {
1645
- let y = A(), [b] = M(Pt), x = Je(v), S = u === "present", [C] = M(() => ue(e.initial)), w = {
1646
- ...de,
1711
+ function qt({ lesson: e, locale: n, title: i, authors: a = [], date: o, summary: c, tones: l = {}, view: u = "article", math: d, storageKey: f, progress: p, defaultProgress: m, onProgressChange: h, labels: g, hasContents: _ = !0, lessonProps: v, children: y }) {
1712
+ let b = j(), [x] = N(Ht), S = Ze(y), C = u === "present", [w] = N(() => de(e.initial)), T = {
1713
+ ...fe,
1647
1714
  ...g
1648
- }, T = [a.length > 0 ? `${w.by} ${a.join(", ")}` : "", o === void 0 ? "" : Rt(o, n)].filter((e) => e !== "").join(" · "), ee = /* @__PURE__ */ I("header", {
1715
+ }, E = [a.length > 0 ? `${T.by} ${a.join(", ")}` : "", o === void 0 ? "" : Kt(o, n)].filter((e) => e !== "").join(" · "), ee = /* @__PURE__ */ L("header", {
1649
1716
  className: "xrvj5dj x1n8ia3y x1b5qhtu x123szhz xhlx3wy xso031l x1q0q8m5 x1qndepd",
1650
1717
  children: [
1651
- /* @__PURE__ */ F("h1", {
1652
- id: y,
1718
+ /* @__PURE__ */ I("h1", {
1719
+ id: b,
1653
1720
  className: "x1ghz6dp x71lla1 x1qqoz9m xgkpprq xdpi0mq x1b5ytql x1wjjqco x1w2vvpw",
1654
1721
  children: i
1655
1722
  }),
1656
- c === void 0 ? null : /* @__PURE__ */ F("p", {
1723
+ c === void 0 ? null : /* @__PURE__ */ I("p", {
1657
1724
  className: "x1ghz6dp x153jb6y x1i2cqwi x1ytb0s6",
1658
1725
  children: c
1659
1726
  }),
1660
- T === "" ? null : /* @__PURE__ */ F("p", {
1727
+ E === "" ? null : /* @__PURE__ */ I("p", {
1661
1728
  className: "x1ghz6dp x153jb6y xtqrqnz x1778rvt",
1662
- children: T
1729
+ children: E
1663
1730
  })
1664
1731
  ]
1665
- }), te = Nt[u];
1666
- return ct({
1732
+ }), te = Vt[u];
1733
+ return dt({
1667
1734
  progress: p,
1668
1735
  defaultProgress: m,
1669
1736
  onProgressChange: h,
@@ -1672,66 +1739,67 @@ function zt({ lesson: e, locale: n, title: i, authors: a = [], date: o, summary:
1672
1739
  let c = {
1673
1740
  view: u,
1674
1741
  title: i,
1742
+ hasContents: _,
1675
1743
  lesson: e,
1676
1744
  locale: n,
1677
- labels: w,
1745
+ labels: T,
1678
1746
  math: d,
1679
- outline: x,
1747
+ outline: S,
1680
1748
  progress: a,
1681
1749
  progressApi: o,
1682
- challenges: C
1750
+ challenges: w
1683
1751
  };
1684
1752
  return {
1685
- "aria-labelledby": u === "sheet" ? void 0 : y,
1753
+ "aria-labelledby": u === "sheet" ? void 0 : b,
1686
1754
  "aria-label": u === "sheet" ? i : void 0,
1687
- children: /* @__PURE__ */ F(s, {
1688
- ..._,
1755
+ children: /* @__PURE__ */ I(s, {
1756
+ ...v,
1689
1757
  lesson: e,
1690
1758
  locale: n,
1691
1759
  storageKey: f,
1692
1760
  onValuesChange: (t, n) => {
1693
- _?.onValuesChange?.(t, n);
1694
- let r = b.pending() !== null, i = n.source !== "agent" && n.reason !== "restore";
1761
+ v?.onValuesChange?.(t, n);
1762
+ let r = x.pending() !== null, i = n.source !== "agent" && n.reason !== "restore";
1695
1763
  if (n.canceled || !i || r) return;
1696
- let a = C.seen(), s = {
1764
+ let a = w.seen(), s = {
1697
1765
  ...t,
1698
1766
  ...e.compute(t)
1699
1767
  };
1700
- for (let [e, t] of C.entries()) !t(a) && t(s) && o.reach(e, {
1768
+ for (let [e, t] of w.entries()) !t(a) && t(s) && o.reach(e, {
1701
1769
  reason: "reach",
1702
1770
  event: n.event
1703
1771
  });
1704
1772
  },
1705
1773
  onBeatChange: (e, t) => {
1706
- _?.onBeatChange?.(e, t), t.canceled || e === null || (o.visit(e, {
1774
+ v?.onBeatChange?.(e, t), t.canceled || e === null || (o.visit(e, {
1707
1775
  reason: "visit",
1708
1776
  event: t.event,
1709
1777
  source: t.source
1710
- }), S && t.reason !== "restore" && b.wait(It(t)));
1778
+ }), C && t.reason !== "restore" && x.wait(Wt(t)));
1711
1779
  },
1712
1780
  onStepChange: (e, t) => {
1713
- _?.onStepChange?.(e, t), !t.canceled && S && t.reason !== "restore" && b.wait(It(t));
1781
+ v?.onStepChange?.(e, t), !t.canceled && C && t.reason !== "restore" && x.wait(Wt(t));
1714
1782
  },
1715
- addedSteps: S ? pe(x) : void 0,
1716
- children: /* @__PURE__ */ F(r, {
1783
+ addedSteps: C ? he(S) : void 0,
1784
+ children: /* @__PURE__ */ I(r, {
1717
1785
  ids: Object.keys(l),
1718
1786
  tones: l,
1719
- children: /* @__PURE__ */ F(t, { children: /* @__PURE__ */ I(ce, {
1787
+ children: /* @__PURE__ */ I(t, { children: /* @__PURE__ */ L(ce, {
1720
1788
  value: c,
1721
- children: [/* @__PURE__ */ F(Lt, {
1722
- challenges: C,
1789
+ children: [/* @__PURE__ */ I(Gt, {
1790
+ challenges: w,
1723
1791
  progressApi: o,
1724
- isReading: Mt.has(u),
1725
- moves: b,
1726
- outline: x,
1792
+ isReading: Bt.has(u),
1793
+ moves: x,
1794
+ outline: S,
1727
1795
  opening: {
1728
1796
  ...e.defaults,
1729
- ..._?.defaultValues
1797
+ ...v?.defaultValues
1730
1798
  }
1731
- }), /* @__PURE__ */ F(te, {
1799
+ }), /* @__PURE__ */ I(te, {
1732
1800
  article: c,
1733
1801
  header: ee,
1734
- children: v
1802
+ children: y
1735
1803
  })]
1736
1804
  }) })
1737
1805
  })
@@ -1741,18 +1809,18 @@ function zt({ lesson: e, locale: n, title: i, authors: a = [], date: o, summary:
1741
1809
  });
1742
1810
  }
1743
1811
  // packages/teaching/src/article/tex.tsx
1744
- function Bt({ children: e, isDisplay: t = !1 }) {
1745
- let n = L()?.math;
1746
- return /* @__PURE__ */ F("span", {
1812
+ function Jt({ children: e, isDisplay: t = !1 }) {
1813
+ let n = R()?.math;
1814
+ return /* @__PURE__ */ I("span", {
1747
1815
  role: "math",
1748
1816
  "aria-label": e,
1749
1817
  ...{
1750
1818
  0: { className: "xuxw1ft" },
1751
1819
  1: { className: "x1lliihq xhff0hu xw2csxc x10wlt62 x2b8uid xeaf4i8" }
1752
1820
  }[!!t | 0],
1753
- children: /* @__PURE__ */ F("span", {
1821
+ children: /* @__PURE__ */ I("span", {
1754
1822
  "aria-hidden": !0,
1755
- children: n === void 0 ? /* @__PURE__ */ F("code", {
1823
+ children: n === void 0 ? /* @__PURE__ */ I("code", {
1756
1824
  className: "xbixft xiard35 x1qlqyl8",
1757
1825
  children: e
1758
1826
  }) : n(e, { isDisplay: t })
@@ -1760,7 +1828,7 @@ function Bt({ children: e, isDisplay: t = !1 }) {
1760
1828
  });
1761
1829
  }
1762
1830
  // packages/teaching/src/article/linked-target.ts
1763
- function Vt(t) {
1831
+ function Yt(t) {
1764
1832
  let n = e(), r = n?.inspected === t;
1765
1833
  function i(e, r) {
1766
1834
  n?.inspected === t && n.inspect(null, {
@@ -1797,7 +1865,7 @@ function Vt(t) {
1797
1865
  };
1798
1866
  }
1799
1867
  // packages/teaching/src/article/term.tsx
1800
- var Ht = { hint: "Highlights it in the figures." }, Ut = /* @__PURE__ */ new Set(["Enter", " "]), Wt = {
1868
+ var Xt = { hint: "Highlights it in the figures." }, Zt = /* @__PURE__ */ new Set(["Enter", " "]), Qt = {
1801
1869
  k1xSpc: "xt0psk2",
1802
1870
  kogj98: "x1ghz6dp",
1803
1871
  kmVPX3: "x1717udv",
@@ -1820,11 +1888,11 @@ var Ht = { hint: "Highlights it in the figures." }, Ut = /* @__PURE__ */ new Set
1820
1888
  kZs9gx: "x19rmrnh",
1821
1889
  kiEn40: "x7s97pk",
1822
1890
  $$css: !0
1823
- }, Gt = {
1891
+ }, $t = {
1824
1892
  kmVMDM: "x6ur5ct",
1825
1893
  kWkggS: "xl8spv7",
1826
1894
  $$css: !0
1827
- }, Kt = {
1895
+ }, en = {
1828
1896
  kjVXCG: "x73je2i",
1829
1897
  kfJifR: "xhr4kjn",
1830
1898
  kDwRjp: "xbraz4a",
@@ -1835,16 +1903,16 @@ var Ht = { hint: "Highlights it in the figures." }, Ut = /* @__PURE__ */ new Set
1835
1903
  $$css: !0
1836
1904
  }, $ = {
1837
1905
  term: (e) => [
1838
- Wt,
1906
+ Qt,
1839
1907
  {
1840
1908
  k1TLXF: e == null ? e : "xnv2ixb",
1841
1909
  $$css: !0
1842
1910
  },
1843
1911
  { "--x-textDecorationColor": e ?? void 0 }
1844
1912
  ],
1845
- inspected: (e) => [Gt, { "--x-backgroundColor": `color-mix(in srgb, ${e} 16%, transparent)` == null ? void 0 : `color-mix(in srgb, ${e} 16%, transparent)` }],
1913
+ inspected: (e) => [$t, { "--x-backgroundColor": `color-mix(in srgb, ${e} 16%, transparent)` == null ? void 0 : `color-mix(in srgb, ${e} 16%, transparent)` }],
1846
1914
  part: (e) => [
1847
- Kt,
1915
+ en,
1848
1916
  {
1849
1917
  kMwMTN: e == null ? e : "x14rh7hd",
1850
1918
  $$css: !0
@@ -1857,33 +1925,33 @@ var Ht = { hint: "Highlights it in the figures." }, Ut = /* @__PURE__ */ new Set
1857
1925
  $$css: !0
1858
1926
  }
1859
1927
  };
1860
- function qt(e, t) {
1928
+ function tn(e, t) {
1861
1929
  let r = n(e);
1862
- return r === void 0 ? t : w[r];
1930
+ return r === void 0 ? t : T[r];
1863
1931
  }
1864
- function Jt({ inspects: e, children: t, labels: n }) {
1865
- let { isInspected: r, handlers: i } = Vt(e), a = qt(e, g.muted), o = A();
1866
- return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("button", {
1932
+ function nn({ inspects: e, children: t, labels: n }) {
1933
+ let { isInspected: r, handlers: i } = Yt(e), a = tn(e, g.muted), o = j();
1934
+ return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I("button", {
1867
1935
  type: "button",
1868
1936
  "aria-describedby": o,
1869
1937
  ...i,
1870
- ...T.props($.term(a), r && $.inspected(a)),
1938
+ ...E.props($.term(a), r && $.inspected(a)),
1871
1939
  children: t
1872
- }), /* @__PURE__ */ F("span", {
1940
+ }), /* @__PURE__ */ I("span", {
1873
1941
  id: o,
1874
1942
  hidden: !0,
1875
1943
  children: {
1876
- ...Ht,
1944
+ ...Xt,
1877
1945
  ...n
1878
1946
  }.hint
1879
1947
  })] });
1880
1948
  }
1881
- function Yt({ inspects: e, label: t, children: n, labels: r }) {
1882
- let { isInspected: i, handlers: a, press: o } = Vt(e), s = qt(e, g.muted), c = A();
1949
+ function rn({ inspects: e, label: t, children: n, labels: r }) {
1950
+ let { isInspected: i, handlers: a, press: o } = Yt(e), s = tn(e, g.muted), c = j();
1883
1951
  function l(e) {
1884
- Ut.has(e.key) && (e.preventDefault(), o(e.nativeEvent));
1952
+ Zt.has(e.key) && (e.preventDefault(), o(e.nativeEvent));
1885
1953
  }
1886
- return /* @__PURE__ */ I("g", {
1954
+ return /* @__PURE__ */ L("g", {
1887
1955
  role: "button",
1888
1956
  tabIndex: 0,
1889
1957
  "aria-label": t,
@@ -1891,14 +1959,14 @@ function Yt({ inspects: e, label: t, children: n, labels: r }) {
1891
1959
  "data-inspected": i ? "" : void 0,
1892
1960
  ...a,
1893
1961
  onKeyDown: l,
1894
- ...T.props($.part(s), i && $.partInspected),
1895
- children: [/* @__PURE__ */ F("desc", {
1962
+ ...E.props($.part(s), i && $.partInspected),
1963
+ children: [/* @__PURE__ */ I("desc", {
1896
1964
  id: c,
1897
1965
  children: {
1898
- ...Ht,
1966
+ ...Xt,
1899
1967
  ...r
1900
1968
  }.hint
1901
1969
  }), n]
1902
1970
  });
1903
1971
  }
1904
- export { de as S, W as _, Ct as a, _e as b, Je as c, Ie as d, q as f, Ce as g, Ae as h, zt as i, He as l, je as m, Jt as n, Xe as o, ke as p, Bt as r, Ye as s, Yt as t, Be as u, me as v, be as x, ye as y };
1972
+ export { fe as S, we as _, jt as a, ye as b, Ze as c, ze as d, q as f, Ee as g, Ne as h, qt as i, Ge as l, Pe as m, nn as n, $e as o, Me as p, Jt as r, Qe as s, rn as t, Ue as u, ge as v, Se as x, xe as y };