hyperbook 0.113.0 → 0.113.2

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 (56) hide show
  1. package/README.md +18 -3
  2. package/dist/asset-manifest.json +9 -9
  3. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-CE3Yr86b.js} +155 -155
  4. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-eYGRtw6N.js} +1 -1
  5. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-CxvZkGrY.js} +1138 -1073
  6. package/dist/assets/directive-bitflow/editor.js +3 -3
  7. package/dist/assets/directive-bitflow/flow.js +3 -3
  8. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-88c3K20U.js} +31 -31
  9. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-B61LKxr1.js} +45 -45
  10. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BG0PL-Z6.js} +30 -30
  11. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-BNdpL6Ss.js} +78 -78
  12. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-BO-d4HVC.js} +48 -48
  13. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-BZhNY0lo.js} +12 -12
  14. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-BadyFTU5.js} +8 -8
  15. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-BlT1EcFH.js} +34 -34
  16. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-BuQ-K_tR.js} +7 -7
  17. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-Bw0pL0hW.js} +28 -28
  18. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-BwBVUdJ9.js} +94 -94
  19. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-BydYlLy4.js} +73 -73
  20. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-C7RJxxAx.js} +63 -63
  21. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-CERSJ9uS.js} +70 -70
  22. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-CLHtOGrW.js} +11 -11
  23. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-CWe2GjBK.js} +14 -14
  24. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CfKpkSVC.js} +72 -72
  25. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-CjKhq7gY.js} +23 -23
  26. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-Cm4w1Zyc.js} +38 -38
  27. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-D0U3nepG.js} +52 -52
  28. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-D4PdXMcj.js} +33 -33
  29. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-D9LOuqr2.js} +99 -99
  30. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-DIb3CXwC.js} +42 -42
  31. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-DQP0cUsP.js} +70 -70
  32. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-DUOrQfVe.js} +27 -27
  33. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DW3cUBvZ.js} +1 -1
  34. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-DYWo0PUv.js} +24 -24
  35. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-D_QhyFcx.js} +101 -91
  36. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-Dn5hHVuT.js} +226 -193
  37. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-DruC5d43.js} +69 -69
  38. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-EKIgFddO.js} +105 -105
  39. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-HXNGIC7K.js} +70 -70
  40. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-ISbOe239.js} +42 -42
  41. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-IsMJtrUT.js} +31 -31
  42. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-TUXuIR22.js} +6 -6
  43. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-WbE9UOFa.js} +24 -24
  44. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-d5ebPDeY.js} +13 -13
  45. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-ledofrbo.js} +33 -33
  46. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-oNmOArKu.js} +1 -1
  47. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-rp4UTV85.js} +84 -84
  48. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-xTX3CXJW.js} +23 -23
  49. package/dist/assets/directive-bitflow/index.js +6 -6
  50. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  51. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  52. package/dist/assets/directive-bitflow/report.js +1 -1
  53. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-vjEU4OvA.js} +2 -2
  54. package/dist/index.js +6351 -3340
  55. package/dist/schemas/hyperbook.schema.json +4 -4
  56. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
- import { L as M, ak as te, a2 as y, ac as ie, ad as X, a9 as ae, a4 as K, a as A, j as t, P as U, a5 as ne, b as O, aa as oe, s as se } from "./dom-uYx_3K1r.js";
2
- import { v as le, P as re, _ as L, e as de, M as ce, E as he, L as fe, R as me } from "./bitLoaders-DIGwTcpd.js";
1
+ import { L as R, ak as te, a2 as y, ac as ie, ad as X, a9 as ae, a4 as U, a as A, j as t, P as K, a5 as ne, b as O, aa as oe, s as se } from "./dom-uYx_3K1r.js";
2
+ import { e as le, M as re, i as L, P as de, F as ce, B as he, U as fe, H as me } from "./bitLoaders-CxvZkGrY.js";
3
3
  const pe = {
4
4
  /** Chen: 1, and n or m for "many". */
5
5
  chen: ["1", "n", "m"],
@@ -7,14 +7,14 @@ const pe = {
7
7
  minmax: ["(0,1)", "(1,1)", "(0,*)", "(1,*)"],
8
8
  /** UML multiplicities, as class diagrams write them. */
9
9
  uml: ["0..1", "1", "*", "1..*"]
10
- }, we = ne(["chen", "minmax", "uml"]), E = (e) => pe[e], ue = M({
10
+ }, we = ne(["chen", "minmax", "uml"]), E = (e) => pe[e], ue = R({
11
11
  /** Stable across edits, so a relationship keeps pointing at the same box. */
12
12
  id: y().min(1),
13
13
  name: y().default(""),
14
14
  /** Where the box's middle sits, as fractions of the diagram (0–1). */
15
- x: U().min(0).max(1).default(0.5),
16
- y: U().min(0).max(1).default(0.5)
17
- }), be = M({
15
+ x: K().min(0).max(1).default(0.5),
16
+ y: K().min(0).max(1).default(0.5)
17
+ }), be = R({
18
18
  id: y().min(1),
19
19
  /** The verb on the line or in the diamond: "borrows", "teaches". */
20
20
  name: y().default(""),
@@ -24,11 +24,11 @@ const pe = {
24
24
  expectedFrom: y().default(""),
25
25
  /** The label that belongs at the `to` end. */
26
26
  expectedTo: y().default("")
27
- }), xe = M({
27
+ }), xe = R({
28
28
  instruction: y().default(""),
29
29
  notation: we.default("chen"),
30
- entities: K(ue).default([]),
31
- relationships: K(be).default([]),
30
+ entities: U(ue).default([]),
31
+ relationships: U(be).default([]),
32
32
  /** A point per end rather than one for the whole diagram. */
33
33
  partialCredit: ae().default(!0),
34
34
  evaluation: ie.default(X)
@@ -77,7 +77,7 @@ const pe = {
77
77
  message: `Choose the answer for this end: one of ${u.join(", ")}.`
78
78
  });
79
79
  });
80
- }), T = (e, n) => `${e}:${n}`, Fe = M({
80
+ }), T = (e, n) => `${e}:${n}`, He = R({
81
81
  ends: te(y(), y()).default({})
82
82
  }), C = (e, n) => e.entities.find((s) => s.id === n), ye = (e, n, s) => {
83
83
  if (s === void 0) return !1;
@@ -104,7 +104,7 @@ const pe = {
104
104
  allowRetry: e.evaluation.enableRetry,
105
105
  detail: { ends: s }
106
106
  };
107
- }, R = {
107
+ }, M = {
108
108
  en: {
109
109
  name: "Cardinalities",
110
110
  description: "A diagram of entities and relationships whose ends the learner labels with cardinalities.",
@@ -129,7 +129,7 @@ const pe = {
129
129
  correct: "richtig",
130
130
  wrong: "falsch"
131
131
  }
132
- }, je = ".bitflow-cardinality{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-cardinality-diagram{width:100%;height:auto;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-cardinality-relationship line{stroke:var(--bitflow-color-neutral-700);stroke-width:calc(2.5 * var(--bitflow-cardinality-scale, 1))}.bitflow-cardinality-diamond{fill:var(--bitflow-color-surface);stroke:var(--bitflow-color-neutral-700);stroke-width:calc(2.5 * var(--bitflow-cardinality-scale, 1))}.bitflow-cardinality-diagram text{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);text-anchor:middle;dominant-baseline:central}.bitflow-cardinality-verb{font-size:calc(20px * var(--bitflow-cardinality-scale, 1));font-style:italic}.bitflow-cardinality-entity rect{fill:var(--bitflow-color-primary-light);stroke:var(--bitflow-color-primary);stroke-width:calc(2.5 * var(--bitflow-cardinality-scale, 1))}.bitflow-cardinality-entity text{font-size:calc(24px * var(--bitflow-cardinality-scale, 1));font-weight:var(--bitflow-font-weight-medium)}.bitflow-cardinality-end text{font-family:var(--bitflow-font-family-mono);font-size:calc(24px * var(--bitflow-cardinality-scale, 1));font-weight:var(--bitflow-font-weight-bold)}.bitflow-cardinality-end-correct text{fill:var(--bitflow-color-correct)}.bitflow-cardinality-end-wrong text{fill:var(--bitflow-color-wrong)}.bitflow-cardinality-row{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xsmall) var(--bitflow-space-small);margin:0;padding:var(--bitflow-space-xsmall) 0 0;border:0;border-top:1px solid var(--bitflow-color-border)}.bitflow-cardinality-row legend{float:left;width:100%;padding:0}.bitflow-cardinality-end-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);flex:1 1 10rem}.bitflow-select.bitflow-cardinality-select-correct{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-select.bitflow-cardinality-select-wrong{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-cardinality-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-cardinality-editor-row>.bitflow-input,.bitflow-cardinality-editor-row>.bitflow-select{flex:1 1 var(--bitflow-cardinality-editor-min, 7rem);width:auto;min-width:0}.bitflow-cardinality-editor-row>.bitflow-cardinality-percent{flex:0 1 5rem}", _ = 1e3, G = 600, Ne = 56, Ee = 34, Ce = 560, Oe = 2, ke = (e) => {
132
+ }, je = ".bitflow-cardinality{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-cardinality-diagram{width:100%;height:auto;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-cardinality-relationship line{stroke:var(--bitflow-color-neutral-700);stroke-width:calc(2.5 * var(--bitflow-cardinality-scale, 1))}.bitflow-cardinality-diamond{fill:var(--bitflow-color-surface);stroke:var(--bitflow-color-neutral-700);stroke-width:calc(2.5 * var(--bitflow-cardinality-scale, 1))}.bitflow-cardinality-diagram text{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);text-anchor:middle;dominant-baseline:central}.bitflow-cardinality-verb{font-size:calc(20px * var(--bitflow-cardinality-scale, 1));font-style:italic}.bitflow-cardinality-entity rect{fill:var(--bitflow-color-primary-light);stroke:var(--bitflow-color-primary);stroke-width:calc(2.5 * var(--bitflow-cardinality-scale, 1))}.bitflow-cardinality-entity text{font-size:calc(24px * var(--bitflow-cardinality-scale, 1));font-weight:var(--bitflow-font-weight-medium)}.bitflow-cardinality-end text{font-family:var(--bitflow-font-family-mono);font-size:calc(24px * var(--bitflow-cardinality-scale, 1));font-weight:var(--bitflow-font-weight-bold)}.bitflow-cardinality-end-correct text{fill:var(--bitflow-color-correct)}.bitflow-cardinality-end-wrong text{fill:var(--bitflow-color-wrong)}.bitflow-cardinality-row{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xsmall) var(--bitflow-space-small);margin:0;padding:var(--bitflow-space-xsmall) 0 0;border:0;border-top:1px solid var(--bitflow-color-border)}.bitflow-cardinality-row legend{float:left;width:100%;padding:0}.bitflow-cardinality-end-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);flex:1 1 10rem}.bitflow-select.bitflow-cardinality-select-correct{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-select.bitflow-cardinality-select-wrong{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-cardinality-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-cardinality-editor-row>.bitflow-input,.bitflow-cardinality-editor-row>.bitflow-select{flex:1 1 var(--bitflow-cardinality-editor-min, 7rem);width:auto;min-width:0}.bitflow-cardinality-editor-row>.bitflow-cardinality-percent{flex:0 1 5rem}", G = 1e3, Q = 600, Ne = 56, Ee = 34, Ce = 560, Oe = 2, ke = (e) => {
133
133
  const [n, s] = A.useState(1);
134
134
  return A.useLayoutEffect(() => {
135
135
  const o = e.current;
@@ -142,12 +142,12 @@ const pe = {
142
142
  const h = new ResizeObserver(a);
143
143
  return h.observe(o), () => h.disconnect();
144
144
  }, [e]), n;
145
- }, H = (e, n) => ({
146
- x: e.x * _,
147
- y: e.y * G,
145
+ }, $ = (e, n) => ({
146
+ x: e.x * G,
147
+ y: e.y * Q,
148
148
  halfWidth: Math.max(120, e.name.length * 15 + 40) * n / 2,
149
149
  halfHeight: Ne * n / 2
150
- }), Y = (e, n) => {
150
+ }), I = (e, n) => {
151
151
  const s = n.x - e.x, o = n.y - e.y;
152
152
  if (s === 0 && o === 0) return e;
153
153
  const a = Math.min(
@@ -165,7 +165,7 @@ const pe = {
165
165
  from: C(e, n.from)?.name || "?",
166
166
  name: n.name || "—",
167
167
  to: C(e, n.to)?.name || "?"
168
- }), Q = ({
168
+ }), V = ({
169
169
  data: e,
170
170
  answer: n,
171
171
  states: s,
@@ -174,14 +174,14 @@ const pe = {
174
174
  showAnswers: h,
175
175
  onChange: w
176
176
  }) => {
177
- const u = (f, m) => O(R, f, a, m), p = A.useRef(null), b = ke(p), g = A.useId(), $ = e.notation !== "uml", F = (f, m) => h ? m === "from" ? f.expectedFrom : f.expectedTo : n?.ends?.[T(f.id, m)];
177
+ const u = (f, m) => O(M, f, a, m), p = A.useRef(null), b = ke(p), g = A.useId(), F = e.notation !== "uml", H = (f, m) => h ? m === "from" ? f.expectedFrom : f.expectedTo : n?.ends?.[T(f.id, m)];
178
178
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-cardinality", children: [
179
179
  /* @__PURE__ */ t.jsxs(
180
180
  "svg",
181
181
  {
182
182
  ref: p,
183
183
  className: "bitflow-cardinality-diagram",
184
- viewBox: `0 0 ${_} ${G}`,
184
+ viewBox: `0 0 ${G} ${Q}`,
185
185
  role: "img",
186
186
  "aria-label": u("diagramLabel"),
187
187
  style: { "--bitflow-cardinality-scale": b },
@@ -189,10 +189,10 @@ const pe = {
189
189
  e.relationships.map((f) => {
190
190
  const m = C(e, f.from), i = C(e, f.to);
191
191
  if (!m || !i || m === i) return null;
192
- const d = H(m, b), c = H(i, b), l = Y(d, c), r = Y(c, d), x = { x: (l.x + r.x) / 2, y: (l.y + r.y) / 2 }, B = Math.hypot(r.x - l.x, r.y - l.y), Z = Math.abs(r.y - l.y) > Math.abs(r.x - l.x), k = Math.min(28 * b, B * (Z ? 0.16 : 0.08)), J = Math.min(Ee * b, B * 0.22);
192
+ const d = $(m, b), c = $(i, b), l = I(d, c), r = I(c, d), x = { x: (l.x + r.x) / 2, y: (l.y + r.y) / 2 }, B = Math.hypot(r.x - l.x, r.y - l.y), Z = Math.abs(r.y - l.y) > Math.abs(r.x - l.x), k = Math.min(28 * b, B * (Z ? 0.16 : 0.08)), J = Math.min(Ee * b, B * 0.22);
193
193
  return /* @__PURE__ */ t.jsxs("g", { className: "bitflow-cardinality-relationship", children: [
194
194
  /* @__PURE__ */ t.jsx("line", { x1: l.x, y1: l.y, x2: r.x, y2: r.y }),
195
- $ ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
195
+ F ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
196
196
  /* @__PURE__ */ t.jsx(
197
197
  "polygon",
198
198
  {
@@ -206,7 +206,7 @@ const pe = {
206
206
  const j = v === "from" ? l : r, N = v === "from" ? r : l, P = ze(j, N, J), S = Math.hypot(N.x - j.x, N.y - j.y) || 1, W = 18 * b, D = {
207
207
  x: P.x - (N.y - j.y) / S * W,
208
208
  y: P.y + (N.x - j.x) / S * W
209
- }, ee = F(f, v), z = h ? void 0 : s?.[T(f.id, v)];
209
+ }, ee = H(f, v), z = h ? void 0 : s?.[T(f.id, v)];
210
210
  return /* @__PURE__ */ t.jsx(
211
211
  "g",
212
212
  {
@@ -223,7 +223,7 @@ const pe = {
223
223
  ] }, f.id);
224
224
  }),
225
225
  e.entities.map((f) => {
226
- const m = H(f, b);
226
+ const m = $(f, b);
227
227
  return /* @__PURE__ */ t.jsxs("g", { className: "bitflow-cardinality-entity", children: [
228
228
  /* @__PURE__ */ t.jsx(
229
229
  "rect",
@@ -348,12 +348,12 @@ const pe = {
348
348
  locale: a,
349
349
  onAnswerChange: h
350
350
  }) => {
351
- const w = (p) => O(R, p, a), u = s?.detail?.ends;
351
+ const w = (p) => O(M, p, a), u = s?.detail?.ends;
352
352
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack", children: [
353
353
  /* @__PURE__ */ t.jsx(fe, { markdown: e.instruction }),
354
354
  /* @__PURE__ */ t.jsx("p", { className: "bitflow-hint", children: w(o ? "howToReadonly" : "howTo") }),
355
355
  /* @__PURE__ */ t.jsx(
356
- Q,
356
+ V,
357
357
  {
358
358
  data: e,
359
359
  answer: n,
@@ -364,12 +364,12 @@ const pe = {
364
364
  }
365
365
  )
366
366
  ] });
367
- }, q = (e, n) => {
367
+ }, Y = (e, n) => {
368
368
  for (let s = n.length + 1; ; s++) {
369
369
  const o = `${e}-${s}`;
370
370
  if (!n.includes(o)) return o;
371
371
  }
372
- }, I = (e, n, s) => /* @__PURE__ */ t.jsx(
372
+ }, q = (e, n, s) => /* @__PURE__ */ t.jsx(
373
373
  "input",
374
374
  {
375
375
  type: "number",
@@ -384,7 +384,7 @@ const pe = {
384
384
  o.target.value !== "" && a >= 0 && a <= 100 && s(a / 100);
385
385
  }
386
386
  }
387
- ), Re = ({ data: e, locale: n, onChange: s, errors: o }) => {
387
+ ), Me = ({ data: e, locale: n, onChange: s, errors: o }) => {
388
388
  const a = (i, d) => O(Te, i, n, d), h = (i) => s({ ...e, ...i }), w = E(e.notation), u = (i, d) => h({ entities: e.entities.map((c) => c.id === i ? { ...c, ...d } : c) }), p = (i, d) => h({
389
389
  relationships: e.relationships.map(
390
390
  (c) => c.id === i ? { ...c, ...d } : c
@@ -395,7 +395,7 @@ const pe = {
395
395
  entities: [
396
396
  ...e.entities,
397
397
  {
398
- id: q("entity", e.entities.map((d) => d.id)),
398
+ id: Y("entity", e.entities.map((d) => d.id)),
399
399
  name: "",
400
400
  x: [0.2, 0.8, 0.5][i % 3],
401
401
  y: [0.25, 0.25, 0.75][i % 3]
@@ -407,14 +407,14 @@ const pe = {
407
407
  relationships: e.relationships.filter(
408
408
  (d) => d.from !== i && d.to !== i
409
409
  )
410
- }), $ = (i) => h({
410
+ }), F = (i) => h({
411
411
  notation: i,
412
412
  relationships: e.relationships.map((d) => ({
413
413
  ...d,
414
414
  expectedFrom: E(i).includes(d.expectedFrom) ? d.expectedFrom : "",
415
415
  expectedTo: E(i).includes(d.expectedTo) ? d.expectedTo : ""
416
416
  }))
417
- }), F = [
417
+ }), H = [
418
418
  ...new Set(
419
419
  (o ?? []).filter((i) => /^relationships\.\d+\./.test(i.path)).map((i) => i.message)
420
420
  )
@@ -447,7 +447,7 @@ const pe = {
447
447
  { value: "minmax", label: a("notationMinmax") },
448
448
  { value: "uml", label: a("notationUml") }
449
449
  ],
450
- onChange: $
450
+ onChange: F
451
451
  }
452
452
  ),
453
453
  /* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
@@ -469,8 +469,8 @@ const pe = {
469
469
  onChange: (l) => u(i.id, { name: l.target.value })
470
470
  }
471
471
  ),
472
- I(i.x, a("entityXOf", { position: c }), (l) => u(i.id, { x: l })),
473
- I(i.y, a("entityYOf", { position: c }), (l) => u(i.id, { y: l })),
472
+ q(i.x, a("entityXOf", { position: c }), (l) => u(i.id, { x: l })),
473
+ q(i.y, a("entityYOf", { position: c }), (l) => u(i.id, { y: l })),
474
474
  /* @__PURE__ */ t.jsx(
475
475
  "button",
476
476
  {
@@ -489,7 +489,7 @@ const pe = {
489
489
  /* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a("relationshipsLabel") }),
490
490
  /* @__PURE__ */ t.jsx("span", { className: "bitflow-hint", children: a("relationshipsHint") }),
491
491
  L(o, "relationships") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: L(o, "relationships") }),
492
- F.map((i) => /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: i }, i)),
492
+ H.map((i) => /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: i }, i)),
493
493
  e.relationships.length === 0 && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text-muted", children: a("noRelationships") }),
494
494
  e.relationships.map((i, d) => {
495
495
  const c = d + 1, l = (r) => p(i.id, r);
@@ -543,7 +543,7 @@ const pe = {
543
543
  relationships: [
544
544
  ...e.relationships,
545
545
  {
546
- id: q("relationship", e.relationships.map((i) => i.id)),
546
+ id: Y("relationship", e.relationships.map((i) => i.id)),
547
547
  name: "",
548
548
  from: e.entities[0]?.id ?? "",
549
549
  to: e.entities[1]?.id ?? "",
@@ -558,7 +558,7 @@ const pe = {
558
558
  ] }),
559
559
  /* @__PURE__ */ t.jsxs("div", { className: "bitflow-field", children: [
560
560
  /* @__PURE__ */ t.jsx("span", { className: "bitflow-label", children: a("previewLabel") }),
561
- /* @__PURE__ */ t.jsx(Q, { data: e, locale: n, showAnswers: !0 })
561
+ /* @__PURE__ */ t.jsx(V, { data: e, locale: n, showAnswers: !0 })
562
562
  ] }),
563
563
  /* @__PURE__ */ t.jsxs(de, { summary: a("advanced"), children: [
564
564
  /* @__PURE__ */ t.jsx(
@@ -580,17 +580,17 @@ const pe = {
580
580
  )
581
581
  ] })
582
582
  ] });
583
- }, V = "task-cardinality";
583
+ }, _ = "task-cardinality";
584
584
  oe({
585
- type: V,
585
+ type: _,
586
586
  kind: "task",
587
587
  schema: xe,
588
588
  evaluate: ve,
589
589
  Task: Ae,
590
- Form: Re,
590
+ Form: Me,
591
591
  info: (e) => ({
592
- name: O(R, "name", e),
593
- description: O(R, "description", e)
592
+ name: O(M, "name", e),
593
+ description: O(M, "description", e)
594
594
  }),
595
595
  defaultData: () => ({
596
596
  instruction: "",
@@ -601,25 +601,25 @@ oe({
601
601
  evaluation: X()
602
602
  })
603
603
  });
604
- me(V);
604
+ me(_);
605
605
  se("bitflow-styles-task-cardinality", je);
606
606
  export {
607
- Fe as AnswerSchema,
607
+ He as AnswerSchema,
608
608
  xe as DataSchema,
609
- Q as Diagram,
609
+ V as Diagram,
610
610
  ue as EntitySchema,
611
- Re as Form,
611
+ Me as Form,
612
612
  pe as NOTATIONS,
613
613
  we as NotationSchema,
614
614
  be as RelationshipSchema,
615
- V as TYPE,
615
+ _ as TYPE,
616
616
  Ae as Task,
617
617
  T as endKey,
618
618
  ge as endStates,
619
619
  ve as evaluate,
620
620
  Te as formMessages,
621
621
  E as labelsOf,
622
- R as messages,
622
+ M as messages,
623
623
  Le as relationshipName,
624
624
  ye as sameLabel
625
625
  };
@@ -1,5 +1,5 @@
1
1
  import { L as v, a2 as b, a9 as m, j as i, $ as k, b as u, s as H, aa as L } from "./dom-uYx_3K1r.js";
2
- import { y as f, v as x, M as h, L as y, R as N } from "./bitLoaders-DIGwTcpd.js";
2
+ import { C as f, e as x, F as h, U as y, H as N } from "./bitLoaders-CxvZkGrY.js";
3
3
  const S = ".bitflow-certificate{border:var(--bitflow-border-width) solid var(--bitflow-color-primary-light);border-radius:var(--bitflow-radius-large);padding:var(--bitflow-space-large);background:var(--bitflow-color-surface);text-align:center}.bitflow-certificate-title{margin:0 0 var(--bitflow-space-small);font-size:var(--bitflow-font-size-xlarge);font-weight:var(--bitflow-font-weight-bold);color:var(--bitflow-color-primary-dark)}.bitflow-certificate-facts{display:flex;flex-direction:column;gap:var(--bitflow-space-small);margin:var(--bitflow-space-medium) 0 0}.bitflow-certificate-fact dt{font-size:var(--bitflow-font-size-small);text-transform:uppercase;letter-spacing:.06em;color:var(--bitflow-color-text-muted)}.bitflow-certificate-fact dd{margin:0;font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-medium)}.bitflow-certificate-actions{display:flex;justify-content:center}@media print{.bitflow-certificate-actions{display:none}.bitflow-certificate{border-color:var(--bitflow-color-neutral-400);background:none}}", p = {
4
4
  en: {
5
5
  name: "Certificate",
@@ -114,12 +114,12 @@ const S = ".bitflow-certificate{border:var(--bitflow-border-width) solid var(--b
114
114
  if (typeof o == "string" && o.trim() !== "") return o.trim();
115
115
  }
116
116
  }
117
- }, P = (e) => {
117
+ }, F = (e) => {
118
118
  const s = e?.completedAt ?? e?.updatedAt;
119
119
  if (!s) return;
120
120
  const t = new Date(s);
121
121
  return Number.isNaN(t.getTime()) ? void 0 : t;
122
- }, T = {
122
+ }, P = {
123
123
  en: {
124
124
  titleLabel: "Heading on the certificate",
125
125
  markdownLabel: "Message",
@@ -146,13 +146,13 @@ const S = ".bitflow-certificate{border:var(--bitflow-border-width) solid var(--b
146
146
  printLabelLabel: "Beschriftung der Druck-Schaltfläche",
147
147
  printLabelHint: "Leer lassen für „Drucken“."
148
148
  }
149
- }, F = ({
149
+ }, T = ({
150
150
  data: e,
151
151
  locale: s,
152
152
  attempt: t,
153
153
  flow: n
154
154
  }) => {
155
- const a = (c, w) => u(p, c, s, w), r = e.showScore && t ? k(t) : void 0, d = e.showName ? z(n, t) : void 0, o = e.showDate ? P(t) : void 0, l = [];
155
+ const a = (c, w) => u(p, c, s, w), r = e.showScore && t ? k(t) : void 0, d = e.showName ? z(n, t) : void 0, o = e.showDate ? F(t) : void 0, l = [];
156
156
  return d && l.push({ heading: a("nameHeading"), value: d }), r && r.possible > 0 && l.push({
157
157
  heading: a("scoreHeading"),
158
158
  // Partial credit produces fractions; two decimals is as fine as anyone
@@ -186,12 +186,12 @@ const S = ".bitflow-certificate{border:var(--bitflow-border-width) solid var(--b
186
186
  }
187
187
  ) })
188
188
  ] });
189
- }, A = ({
189
+ }, C = ({
190
190
  data: e,
191
191
  locale: s,
192
192
  onChange: t
193
193
  }) => {
194
- const n = (a) => u(T, a, s);
194
+ const n = (a) => u(P, a, s);
195
195
  return /* @__PURE__ */ i.jsxs("div", { className: "bitflow-stack", children: [
196
196
  /* @__PURE__ */ i.jsx(
197
197
  f,
@@ -261,8 +261,8 @@ L({
261
261
  type: g,
262
262
  kind: "end",
263
263
  schema: j,
264
- Task: F,
265
- Form: A,
264
+ Task: T,
265
+ Form: C,
266
266
  info: (e) => ({
267
267
  name: u(p, "name", e),
268
268
  description: u(p, "description", e)
@@ -280,10 +280,10 @@ L({
280
280
  N(g);
281
281
  export {
282
282
  j as DataSchema,
283
- A as Form,
283
+ C as Form,
284
284
  g as TYPE,
285
- F as Task,
286
- P as finishedAt,
285
+ T as Task,
286
+ F as finishedAt,
287
287
  p as messages,
288
288
  z as nameIn
289
289
  };
@@ -1,5 +1,5 @@
1
1
  import { L as k, a2 as o, a9 as w, j as a, b as d, s as f, aa as L } from "./dom-uYx_3K1r.js";
2
- import { y as c, v, M as y, L as x, R as F } from "./bitLoaders-DIGwTcpd.js";
2
+ import { C as c, e as v, F as x, U as y, H as F } from "./bitLoaders-CxvZkGrY.js";
3
3
  const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);margin:0}.bitflow-consent-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);min-height:44px;cursor:pointer}.bitflow-consent-required{margin:0;min-height:1.5em;color:var(--bitflow-color-warning);font-size:var(--bitflow-font-size-small)}", b = {
4
4
  en: {
5
5
  name: "Consent",
@@ -89,7 +89,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
89
89
  */
90
90
  allowDecline: w().default(!0),
91
91
  declineLabel: o().default("")
92
- }), u = (e, l) => l === !0 || e.allowDecline && l === !1, j = {
92
+ }), u = (e, l) => l === !0 || e.allowDecline && l === !1, C = {
93
93
  en: {
94
94
  titleLabel: "Title",
95
95
  markdownLabel: "What the learner is agreeing to",
@@ -116,7 +116,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
116
116
  requiredHintLabel: "Hinweis, solange nichts gewählt ist",
117
117
  requiredHintHint: "Leer lassen für „Wähle eins aus, bevor es losgeht.“"
118
118
  }
119
- }, C = ({
119
+ }, j = ({
120
120
  data: e,
121
121
  answer: l,
122
122
  readonly: t,
@@ -126,7 +126,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
126
126
  const s = (r) => d(b, r, i), m = e.agreeLabel || s("agreeFallback"), g = e.declineLabel || s("declineFallback"), p = u(e, l);
127
127
  return /* @__PURE__ */ a.jsxs("div", { className: "bitflow-stack", children: [
128
128
  e.title && /* @__PURE__ */ a.jsx("h1", { className: "bitflow-heading", children: e.title }),
129
- /* @__PURE__ */ a.jsx(x, { markdown: e.markdown }),
129
+ /* @__PURE__ */ a.jsx(y, { markdown: e.markdown }),
130
130
  e.allowDecline ? /* @__PURE__ */ a.jsxs("fieldset", { className: "bitflow-consent", children: [
131
131
  /* @__PURE__ */ a.jsx("legend", { className: "bitflow-label", children: s("choiceLegend") }),
132
132
  [
@@ -164,7 +164,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
164
164
  locale: l,
165
165
  onChange: t
166
166
  }) => {
167
- const i = (n) => d(j, n, l);
167
+ const i = (n) => d(C, n, l);
168
168
  return /* @__PURE__ */ a.jsxs("div", { className: "bitflow-stack", children: [
169
169
  /* @__PURE__ */ a.jsx(
170
170
  c,
@@ -194,7 +194,7 @@ const H = ".bitflow-consent{display:flex;flex-direction:column;gap:var(--bitflow
194
194
  }
195
195
  ),
196
196
  /* @__PURE__ */ a.jsx(
197
- y,
197
+ x,
198
198
  {
199
199
  label: i("allowDeclineLabel"),
200
200
  hint: i("allowDeclineHint"),
@@ -228,7 +228,7 @@ L({
228
228
  type: h,
229
229
  kind: "start",
230
230
  schema: q,
231
- Task: C,
231
+ Task: j,
232
232
  Form: D,
233
233
  info: (e) => ({
234
234
  name: d(b, "name", e),
@@ -251,7 +251,7 @@ export {
251
251
  q as DataSchema,
252
252
  D as Form,
253
253
  h as TYPE,
254
- C as Task,
254
+ j as Task,
255
255
  u as isDecided,
256
256
  b as messages
257
257
  };