hyperbook 0.113.1 → 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.
- package/dist/asset-manifest.json +9 -9
- package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-CE3Yr86b.js} +155 -155
- package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-eYGRtw6N.js} +1 -1
- package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-CxvZkGrY.js} +1138 -1073
- package/dist/assets/directive-bitflow/editor.js +3 -3
- package/dist/assets/directive-bitflow/flow.js +3 -3
- package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-88c3K20U.js} +31 -31
- package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-B61LKxr1.js} +45 -45
- package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BG0PL-Z6.js} +30 -30
- package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-BNdpL6Ss.js} +78 -78
- package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-BO-d4HVC.js} +48 -48
- package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-BZhNY0lo.js} +12 -12
- package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-BadyFTU5.js} +8 -8
- package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-BlT1EcFH.js} +34 -34
- package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-BuQ-K_tR.js} +7 -7
- package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-Bw0pL0hW.js} +28 -28
- package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-BwBVUdJ9.js} +94 -94
- package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-BydYlLy4.js} +73 -73
- package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-C7RJxxAx.js} +63 -63
- package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-CERSJ9uS.js} +70 -70
- package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-CLHtOGrW.js} +11 -11
- package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-CWe2GjBK.js} +14 -14
- package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CfKpkSVC.js} +72 -72
- package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-CjKhq7gY.js} +23 -23
- package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-Cm4w1Zyc.js} +38 -38
- package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-D0U3nepG.js} +52 -52
- package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-D4PdXMcj.js} +33 -33
- package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-D9LOuqr2.js} +99 -99
- package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-DIb3CXwC.js} +42 -42
- package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-DQP0cUsP.js} +70 -70
- package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-DUOrQfVe.js} +27 -27
- package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DW3cUBvZ.js} +1 -1
- package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-DYWo0PUv.js} +24 -24
- package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-D_QhyFcx.js} +101 -91
- package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-Dn5hHVuT.js} +226 -193
- package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-DruC5d43.js} +69 -69
- package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-EKIgFddO.js} +105 -105
- package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-HXNGIC7K.js} +70 -70
- package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-ISbOe239.js} +42 -42
- package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-IsMJtrUT.js} +31 -31
- package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-TUXuIR22.js} +6 -6
- package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-WbE9UOFa.js} +24 -24
- package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-d5ebPDeY.js} +13 -13
- package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-ledofrbo.js} +33 -33
- package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-oNmOArKu.js} +1 -1
- package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-rp4UTV85.js} +84 -84
- package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-xTX3CXJW.js} +23 -23
- package/dist/assets/directive-bitflow/index.js +6 -6
- package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
- package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
- package/dist/assets/directive-bitflow/report.js +1 -1
- package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-vjEU4OvA.js} +2 -2
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { L as $, a4 as R, ac as me, ad as re, a9 as G, a2 as N, P as Y, j as s, a5 as X, a as W, b as A, aa as ve, s as xe } from "./dom-uYx_3K1r.js";
|
|
2
|
+
import { $ as ee, e as je, M as O, F as Z, g as y, P as K, C as ye, r as te, B as Te, y as Ne, U as Ce, H as ke } from "./bitLoaders-CxvZkGrY.js";
|
|
3
|
+
const C = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, U = (e, t) => Math.abs(e - t) <= oe * Math.max(1, Math.abs(e), Math.abs(t)), z = (e, t, a) => e.edges.find(
|
|
4
4
|
(r) => r.source === t && r.target === a || !e.directed && r.source === a && r.target === t
|
|
5
5
|
), q = (e, t) => {
|
|
6
6
|
const a = [];
|
|
@@ -22,9 +22,9 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
22
22
|
if (n === void 0) return a;
|
|
23
23
|
r.add(n);
|
|
24
24
|
for (const l of q(e, n)) {
|
|
25
|
-
const d =
|
|
25
|
+
const d = z(e, n, l);
|
|
26
26
|
if (!d) continue;
|
|
27
|
-
const b = o +
|
|
27
|
+
const b = o + C(e, d);
|
|
28
28
|
b < (a.get(l) ?? 1 / 0) && a.set(l, b);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -51,38 +51,38 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
51
51
|
}
|
|
52
52
|
return a;
|
|
53
53
|
}, ut = (e, t) => t.length < 2 || new Set(t).size !== t.length ? !1 : t.every(
|
|
54
|
-
(a, r) => r === 0 ||
|
|
54
|
+
(a, r) => r === 0 || z(e, t[r - 1], a) !== void 0
|
|
55
55
|
), Oe = (e, t) => {
|
|
56
56
|
for (let a = 1; a < t.length; a++)
|
|
57
|
-
if (!
|
|
57
|
+
if (!z(e, t[a - 1], t[a])) return a;
|
|
58
58
|
}, Le = (e, t) => {
|
|
59
59
|
let a = 0;
|
|
60
60
|
for (let r = 1; r < t.length; r++) {
|
|
61
|
-
const n =
|
|
61
|
+
const n = z(e, t[r - 1], t[r]);
|
|
62
62
|
if (!n) return;
|
|
63
|
-
a +=
|
|
63
|
+
a += C(e, n);
|
|
64
64
|
}
|
|
65
65
|
return a;
|
|
66
66
|
}, Ie = (e, t) => {
|
|
67
67
|
const a = [];
|
|
68
68
|
for (let r = 1; r < t.length; r++) {
|
|
69
|
-
const n =
|
|
69
|
+
const n = z(e, t[r - 1], t[r]);
|
|
70
70
|
n && a.push(n.id);
|
|
71
71
|
}
|
|
72
72
|
return a;
|
|
73
|
-
},
|
|
73
|
+
}, H = (e, t) => {
|
|
74
74
|
let a = t;
|
|
75
75
|
for (; e.get(a) !== a; ) a = e.get(a);
|
|
76
76
|
return a;
|
|
77
77
|
}, Pe = (e) => {
|
|
78
78
|
const t = new Map(e.nodes.map((o) => [o.id, o.id])), a = [...e.edges].sort((o, l) => {
|
|
79
|
-
const d =
|
|
79
|
+
const d = C(e, o) - C(e, l);
|
|
80
80
|
return d !== 0 ? d : o.id < l.id ? -1 : 1;
|
|
81
81
|
});
|
|
82
82
|
let r = 0, n = 0;
|
|
83
83
|
for (const o of a) {
|
|
84
|
-
const l =
|
|
85
|
-
l !== d && (t.set(l, d), r +=
|
|
84
|
+
const l = H(t, o.source), d = H(t, o.target);
|
|
85
|
+
l !== d && (t.set(l, d), r += C(e, o), n += 1);
|
|
86
86
|
}
|
|
87
87
|
return n === e.nodes.length - 1 ? r : void 0;
|
|
88
88
|
}, We = (e, t) => {
|
|
@@ -90,23 +90,23 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
90
90
|
if (a.length !== e.nodes.length - 1) return "wrongSize";
|
|
91
91
|
const r = new Map(e.nodes.map((n) => [n.id, n.id]));
|
|
92
92
|
for (const n of a) {
|
|
93
|
-
const o =
|
|
93
|
+
const o = H(r, n.source), l = H(r, n.target);
|
|
94
94
|
if (o === l) return "cycle";
|
|
95
95
|
r.set(o, l);
|
|
96
96
|
}
|
|
97
|
-
return new Set(e.nodes.map((n) =>
|
|
98
|
-
}, Ae = (e, t) => e.edges.filter((a) => t.includes(a.id)).reduce((a, r) => a +
|
|
97
|
+
return new Set(e.nodes.map((n) => H(r, n.id))).size === 1 ? "tree" : "disconnected";
|
|
98
|
+
}, Ae = (e, t) => e.edges.filter((a) => t.includes(a.id)).reduce((a, r) => a + C(e, r), 0), De = (e, t) => {
|
|
99
99
|
const a = new Set(t);
|
|
100
100
|
return e.edges.reduce((r, n) => {
|
|
101
101
|
const o = a.has(n.source), l = a.has(n.target);
|
|
102
|
-
return e.directed ? r + (o && !l ?
|
|
102
|
+
return e.directed ? r + (o && !l ? C(e, n) : 0) : r + (o !== l ? C(e, n) : 0);
|
|
103
103
|
}, 0);
|
|
104
|
-
},
|
|
104
|
+
}, He = (e, t, a) => {
|
|
105
105
|
if (t === a) return;
|
|
106
106
|
const r = /* @__PURE__ */ new Map(), n = (l) => (r.has(l) || r.set(l, /* @__PURE__ */ new Map()), r.get(l));
|
|
107
107
|
e.nodes.forEach((l) => n(l.id));
|
|
108
108
|
for (const l of e.edges) {
|
|
109
|
-
const d =
|
|
109
|
+
const d = C(e, l), b = n(l.source);
|
|
110
110
|
b.set(l.target, (b.get(l.target) ?? 0) + d);
|
|
111
111
|
const f = n(l.target);
|
|
112
112
|
e.directed ? f.set(l.source, f.get(l.source) ?? 0) : f.set(l.source, (f.get(l.source) ?? 0) + d);
|
|
@@ -132,20 +132,20 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
132
132
|
o += g;
|
|
133
133
|
}
|
|
134
134
|
return o;
|
|
135
|
-
}, ft = (e, t, a) => se(e, t).has(a),
|
|
135
|
+
}, ft = (e, t, a) => se(e, t).has(a), Me = $({
|
|
136
136
|
/** Stable across edits, so an answer keeps pointing at the same place. */
|
|
137
|
-
id:
|
|
138
|
-
label:
|
|
137
|
+
id: N().min(1),
|
|
138
|
+
label: N().default(""),
|
|
139
139
|
/**
|
|
140
140
|
* Where it sits, as a fraction of the diagram in each direction. Never
|
|
141
141
|
* pixels: the diagram is drawn at whatever size it is given.
|
|
142
142
|
*/
|
|
143
143
|
x: Y().min(0).max(1).default(0.5),
|
|
144
144
|
y: Y().min(0).max(1).default(0.5)
|
|
145
|
-
}),
|
|
146
|
-
id:
|
|
147
|
-
source:
|
|
148
|
-
target:
|
|
145
|
+
}), ze = $({
|
|
146
|
+
id: N().min(1),
|
|
147
|
+
source: N().min(1),
|
|
148
|
+
target: N().min(1),
|
|
149
149
|
/** Ignored entirely unless the graph is weighted, where it is the cost. */
|
|
150
150
|
weight: Y().positive().default(1)
|
|
151
151
|
}), ie = [
|
|
@@ -154,18 +154,18 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
154
154
|
"traversal",
|
|
155
155
|
"spanningTree",
|
|
156
156
|
"cut"
|
|
157
|
-
], Re = X(ie),
|
|
158
|
-
instruction:
|
|
157
|
+
], Re = X(ie), $e = X(["bfs", "dfs"]), Ee = X(["label", "authored"]), le = (e) => e === "path" || e === "shortestPath" || e === "cut", de = (e) => e !== "spanningTree", ce = (e) => e === "path" || e === "shortestPath" || e === "traversal", E = (e) => e === "spanningTree" ? "edges" : "nodes", Be = $({
|
|
158
|
+
instruction: N().default(""),
|
|
159
159
|
directed: G().default(!1),
|
|
160
160
|
/** Off, every edge costs one, and the weights are neither shown nor used. */
|
|
161
161
|
weighted: G().default(!1),
|
|
162
|
-
nodes: R(
|
|
163
|
-
edges: R(
|
|
162
|
+
nodes: R(Me).max(30).default([]),
|
|
163
|
+
edges: R(ze).max(90).default([]),
|
|
164
164
|
goal: Re.default("shortestPath"),
|
|
165
|
-
sourceId:
|
|
166
|
-
targetId:
|
|
167
|
-
traversal:
|
|
168
|
-
neighbourOrder:
|
|
165
|
+
sourceId: N().default(""),
|
|
166
|
+
targetId: N().default(""),
|
|
167
|
+
traversal: $e.default("bfs"),
|
|
168
|
+
neighbourOrder: Ee.default("label"),
|
|
169
169
|
/**
|
|
170
170
|
* Only a traversal can be partly right in a way worth a mark: the order is
|
|
171
171
|
* right up to the point it goes wrong. A route that does not arrive and a
|
|
@@ -253,15 +253,15 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
253
253
|
path: ["directed"],
|
|
254
254
|
message: "A spanning tree needs an undirected graph."
|
|
255
255
|
}));
|
|
256
|
-
}), bt =
|
|
256
|
+
}), bt = $({
|
|
257
257
|
/**
|
|
258
258
|
* The places chosen, in order where the order matters: a route, a traversal,
|
|
259
259
|
* or the near side of a cut.
|
|
260
260
|
*/
|
|
261
|
-
nodeIds: R(
|
|
261
|
+
nodeIds: R(N()).default([]),
|
|
262
262
|
/** The connections chosen. A spanning tree is the only goal that uses these. */
|
|
263
|
-
edgeIds: R(
|
|
264
|
-
}), he = (e, t) =>
|
|
263
|
+
edgeIds: R(N()).default([])
|
|
264
|
+
}), he = (e, t) => E(e) === "edges" ? t?.edgeIds ?? [] : t?.nodeIds ?? [], Ve = (e, t) => E(e) === "edges" ? { nodeIds: [], edgeIds: t } : { nodeIds: t, edgeIds: [] }, Fe = (e, t) => e.nodes.find((a) => a.id === t), pt = (e, t) => e.edges.find((a) => a.id === t), x = (e, t) => Fe(e, t)?.label || t, wt = [
|
|
265
265
|
"correct",
|
|
266
266
|
"empty",
|
|
267
267
|
"notFromSource",
|
|
@@ -289,7 +289,7 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
289
289
|
if (Oe(e, t) !== void 0) return v("broken");
|
|
290
290
|
if (e.goal === "path") return v("correct");
|
|
291
291
|
const a = Le(e, t), r = se(e, e.sourceId).get(e.targetId);
|
|
292
|
-
return r === void 0 ? v("notToTarget") :
|
|
292
|
+
return r === void 0 ? v("notToTarget") : U(a, r) ? v("correct") : v("notShortest");
|
|
293
293
|
}, Ze = (e, t) => {
|
|
294
294
|
const a = Se(e, e.sourceId);
|
|
295
295
|
let r = 0;
|
|
@@ -308,14 +308,14 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
308
308
|
if (a === "disconnected") return v("treeDisconnected");
|
|
309
309
|
if (a === "wrongSize") return v("treeWrongSize");
|
|
310
310
|
const r = Pe(e);
|
|
311
|
-
return r === void 0 ? v("treeDisconnected") :
|
|
311
|
+
return r === void 0 ? v("treeDisconnected") : U(Ae(e, t), r) ? v("correct") : v("notCheapestTree");
|
|
312
312
|
}, Ye = (e, t) => {
|
|
313
313
|
if (t.length === 0) return v("empty");
|
|
314
314
|
const a = new Set(t);
|
|
315
315
|
if (!a.has(e.sourceId) || a.has(e.targetId))
|
|
316
316
|
return v("notSeparating");
|
|
317
|
-
const r =
|
|
318
|
-
return r === void 0 ? v("notSeparating") :
|
|
317
|
+
const r = He(e, e.sourceId, e.targetId);
|
|
318
|
+
return r === void 0 ? v("notSeparating") : U(De(e, t), r) ? v("correct") : v("notCheapestCut");
|
|
319
319
|
}, qe = (e, t) => {
|
|
320
320
|
const a = he(e.goal, t).filter(
|
|
321
321
|
(r) => e.goal === "spanningTree" ? e.edges.some((n) => n.id === r) : e.nodes.some((n) => n.id === r)
|
|
@@ -346,7 +346,7 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
346
346
|
...a.correctPrefix === void 0 ? {} : { correctPrefix: a.correctPrefix }
|
|
347
347
|
}
|
|
348
348
|
};
|
|
349
|
-
},
|
|
349
|
+
}, M = {
|
|
350
350
|
en: {
|
|
351
351
|
name: "Graph path",
|
|
352
352
|
description: "A graph, and a route, traversal order, spanning tree or cut to pick out of it.",
|
|
@@ -453,7 +453,7 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
453
453
|
reasonNotSeparating: "Die nahe Seite muss {source} enthalten und {target} auf der anderen Seite lassen.",
|
|
454
454
|
reasonNotCheapestCut: "Das trennt sie, aber es gibt einen günstigeren Schnitt."
|
|
455
455
|
}
|
|
456
|
-
},
|
|
456
|
+
}, Ue = '.bitflow-graph{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-graph-diagram{width:100%;aspect-ratio:5 / 3;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);touch-action:none}.bitflow-graph-edge line{stroke:var(--bitflow-color-neutral-400);stroke-width:calc(3 * var(--bitflow-graph-scale, 1))}.bitflow-graph-edge marker path,.bitflow-graph-diagram marker path{fill:var(--bitflow-color-neutral-400)}.bitflow-graph-edge-hit{stroke:transparent;stroke-width:calc(26 * var(--bitflow-graph-scale, 1));cursor:pointer}.bitflow-graph-edge-chosen line{stroke:var(--bitflow-color-primary);stroke-width:calc(7 * var(--bitflow-graph-scale, 1))}.bitflow-graph-weight{fill:var(--bitflow-color-text-muted);font-family:var(--bitflow-font-family);font-size:calc(26px * var(--bitflow-graph-scale, 1))}.bitflow-graph-node circle{fill:var(--bitflow-color-surface);stroke:var(--bitflow-color-neutral-700);stroke-width:calc(3 * var(--bitflow-graph-scale, 1))}.bitflow-graph-node text{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:calc(30px * var(--bitflow-graph-scale, 1));font-weight:var(--bitflow-font-weight-medium);-webkit-user-select:none;user-select:none}.bitflow-graph-node{cursor:pointer}.bitflow-graph-node-movable{cursor:grab}.bitflow-graph-node-source circle{stroke:var(--bitflow-color-info);stroke-width:calc(6 * var(--bitflow-graph-scale, 1))}.bitflow-graph-node-target circle{stroke:var(--bitflow-color-manual);stroke-width:calc(6 * var(--bitflow-graph-scale, 1));stroke-dasharray:10 6}.bitflow-graph-node-chosen circle{fill:var(--bitflow-color-primary-light)}.bitflow-graph-node-right circle{fill:var(--bitflow-color-correct-surface);stroke:var(--bitflow-color-correct)}.bitflow-graph-step{fill:var(--bitflow-color-primary-dark);font-family:var(--bitflow-font-family);font-size:calc(26px * var(--bitflow-graph-scale, 1));font-weight:var(--bitflow-font-weight-bold)}.bitflow-graph-written summary{cursor:pointer;color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-graph-written ul{margin:var(--bitflow-space-xxsmall) 0 0;padding-left:var(--bitflow-space-medium)}.bitflow-graph-chosen{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall);margin:0;padding:0;list-style:none;counter-reset:bitflow-graph-step}.bitflow-graph-chip{counter-increment:bitflow-graph-step;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-radius:var(--bitflow-radius-full);background:var(--bitflow-color-primary-light);color:var(--bitflow-color-primary-dark);font-size:var(--bitflow-font-size-small)}.bitflow-graph-chip:before{content:counter(bitflow-graph-step) ". ";font-weight:var(--bitflow-font-weight-bold)}', Qe = {
|
|
457
457
|
en: {
|
|
458
458
|
instructionLabel: "Instruction",
|
|
459
459
|
instructionHint: "Shown above the diagram. Markdown is allowed.",
|
|
@@ -582,9 +582,9 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
582
582
|
onChange: o,
|
|
583
583
|
onMoveNode: l
|
|
584
584
|
}) => {
|
|
585
|
-
const d = (c, u) => A(
|
|
585
|
+
const d = (c, u) => A(M, c, a, u), b = `bitflow-graph-arrow-${W.useId().replace(/[^\w-]/g, "")}`, f = W.useRef(null), g = tt(f), h = _e * g, w = W.useRef(
|
|
586
586
|
void 0
|
|
587
|
-
), [i, p] = W.useState(""), m = ce(e.goal), k =
|
|
587
|
+
), [i, p] = W.useState(""), m = ce(e.goal), k = E(e.goal), D = !r && o !== void 0, B = new Set(t), be = new Set(
|
|
588
588
|
k === "edges" ? t : m ? Ie(e, t) : []
|
|
589
589
|
), V = (c, u) => p(d(c, u)), F = (c) => {
|
|
590
590
|
if (!D) return;
|
|
@@ -597,7 +597,7 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
597
597
|
place: pe(c),
|
|
598
598
|
count: u.length
|
|
599
599
|
});
|
|
600
|
-
}, pe = (c) => k === "edges" ? ue(e, c, d) : x(e, c),
|
|
600
|
+
}, pe = (c) => k === "edges" ? ue(e, c, d) : x(e, c), Q = (c) => {
|
|
601
601
|
const u = f.current?.getBoundingClientRect();
|
|
602
602
|
if (!(!u || u.width === 0 || u.height === 0))
|
|
603
603
|
return {
|
|
@@ -605,10 +605,10 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
605
605
|
y: (c.clientY - u.top) / u.height
|
|
606
606
|
};
|
|
607
607
|
}, _ = (c) => Math.min(1, Math.max(0, c)), we = (c) => {
|
|
608
|
-
const u = w.current, j =
|
|
608
|
+
const u = w.current, j = Q(c);
|
|
609
609
|
!u || !j || !l || l(u.id, _(j.x + u.dx), _(j.y + u.dy));
|
|
610
610
|
};
|
|
611
|
-
|
|
611
|
+
Ne(
|
|
612
612
|
(c) => we(c),
|
|
613
613
|
() => {
|
|
614
614
|
w.current = void 0;
|
|
@@ -700,7 +700,7 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
700
700
|
].filter(Boolean).join(" "),
|
|
701
701
|
onPointerDown: (S) => {
|
|
702
702
|
if (!l) return;
|
|
703
|
-
const L =
|
|
703
|
+
const L = Q(S);
|
|
704
704
|
w.current = {
|
|
705
705
|
id: c.id,
|
|
706
706
|
dx: L ? c.x - L.x : 0,
|
|
@@ -793,8 +793,8 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
793
793
|
choose: o,
|
|
794
794
|
announce: l
|
|
795
795
|
}) => {
|
|
796
|
-
const d = (h, w) => A(
|
|
797
|
-
return b ? /* @__PURE__ */ s.jsxs("div", { className: "bitflow-stack-small", children: [
|
|
796
|
+
const d = (h, w) => A(M, h, a, w), b = ce(e.goal), f = E(e.goal), g = new Set(t);
|
|
797
|
+
return b ? /* @__PURE__ */ s.jsxs("div", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
798
798
|
/* @__PURE__ */ s.jsxs("div", { className: "bitflow-field", children: [
|
|
799
799
|
/* @__PURE__ */ s.jsx("span", { className: "bitflow-label", children: e.goal === "traversal" ? d("chosenOrder") : d("chosenRoute") }),
|
|
800
800
|
t.length === 0 ? /* @__PURE__ */ s.jsx("p", { className: "bitflow-text-muted", children: d("nothingChosen") }) : /* @__PURE__ */ s.jsx("ol", { className: "bitflow-graph-chosen", children: t.map((h, w) => (
|
|
@@ -887,12 +887,12 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
887
887
|
locale: n,
|
|
888
888
|
onAnswerChange: o
|
|
889
889
|
}) => {
|
|
890
|
-
const l = (f, g) => A(
|
|
890
|
+
const l = (f, g) => A(M, f, n, g), d = {
|
|
891
891
|
source: x(e, e.sourceId),
|
|
892
892
|
target: x(e, e.targetId)
|
|
893
893
|
}, b = a?.detail?.reason;
|
|
894
894
|
return /* @__PURE__ */ s.jsxs("div", { className: "bitflow-stack", children: [
|
|
895
|
-
/* @__PURE__ */ s.jsx(
|
|
895
|
+
/* @__PURE__ */ s.jsx(Ce, { markdown: e.instruction }),
|
|
896
896
|
/* @__PURE__ */ s.jsx("p", { className: "bitflow-text-muted", children: r ? l("howToReadonly") : l(ot(e), d) }),
|
|
897
897
|
e.goal === "traversal" && /* @__PURE__ */ s.jsx("p", { className: "bitflow-text-muted", children: l(e.neighbourOrder === "label" ? "tieLabel" : "tieAuthored") }),
|
|
898
898
|
/* @__PURE__ */ s.jsx(
|
|
@@ -955,7 +955,7 @@ const N = (e, t) => e.weighted ? t.weight : 1, oe = 1e-9, Q = (e, t) => Math.abs
|
|
|
955
955
|
onChange: a,
|
|
956
956
|
errors: r
|
|
957
957
|
}) => {
|
|
958
|
-
const n = (i, p) => A(
|
|
958
|
+
const n = (i, p) => A(Qe, i, t, p), o = (i) => a({ ...e, ...i }), l = ee(e.nodes.map((i) => i.id)), d = ee(e.edges.map((i) => i.id)), b = (i, p) => o({
|
|
959
959
|
nodes: e.nodes.map(
|
|
960
960
|
(m) => m.id === i ? { ...m, ...p } : m
|
|
961
961
|
)
|
|
@@ -1275,8 +1275,8 @@ ve({
|
|
|
1275
1275
|
Task: st,
|
|
1276
1276
|
Form: ct,
|
|
1277
1277
|
info: (e) => ({
|
|
1278
|
-
name: A(
|
|
1279
|
-
description: A(
|
|
1278
|
+
name: A(M, "name", e),
|
|
1279
|
+
description: A(M, "description", e)
|
|
1280
1280
|
}),
|
|
1281
1281
|
defaultData: () => ({
|
|
1282
1282
|
instruction: "",
|
|
@@ -1294,49 +1294,49 @@ ve({
|
|
|
1294
1294
|
})
|
|
1295
1295
|
});
|
|
1296
1296
|
ke(fe);
|
|
1297
|
-
xe("bitflow-styles-task-graph-path",
|
|
1297
|
+
xe("bitflow-styles-task-graph-path", Ue);
|
|
1298
1298
|
export {
|
|
1299
1299
|
bt as AnswerSchema,
|
|
1300
1300
|
Be as DataSchema,
|
|
1301
1301
|
oe as EPSILON,
|
|
1302
|
-
|
|
1302
|
+
ze as EdgeSchema,
|
|
1303
1303
|
ct as Form,
|
|
1304
1304
|
ie as GOALS,
|
|
1305
1305
|
Re as GoalSchema,
|
|
1306
1306
|
ge as GraphView,
|
|
1307
|
-
|
|
1308
|
-
|
|
1307
|
+
Ee as NeighbourOrderSchema,
|
|
1308
|
+
Me as NodeSchema,
|
|
1309
1309
|
wt as REASONS,
|
|
1310
1310
|
fe as TYPE,
|
|
1311
1311
|
st as Task,
|
|
1312
|
-
|
|
1312
|
+
$e as TraversalSchema,
|
|
1313
1313
|
P as VIEW_HEIGHT,
|
|
1314
1314
|
I as VIEW_WIDTH,
|
|
1315
1315
|
he as answerOf,
|
|
1316
1316
|
Oe as breakIn,
|
|
1317
|
-
|
|
1317
|
+
C as costOf,
|
|
1318
1318
|
De as cutCost,
|
|
1319
1319
|
se as distancesFrom,
|
|
1320
|
-
|
|
1320
|
+
z as edgeBetween,
|
|
1321
1321
|
pt as edgeById,
|
|
1322
1322
|
ue as edgeName,
|
|
1323
1323
|
Xe as evaluate,
|
|
1324
|
-
|
|
1324
|
+
Qe as formMessages,
|
|
1325
1325
|
ut as isRoute,
|
|
1326
1326
|
ce as isSequence,
|
|
1327
1327
|
qe as judge,
|
|
1328
|
-
|
|
1329
|
-
|
|
1328
|
+
M as messages,
|
|
1329
|
+
He as minimumCutCost,
|
|
1330
1330
|
x as nameOf,
|
|
1331
1331
|
de as needsSource,
|
|
1332
1332
|
le as needsTarget,
|
|
1333
1333
|
q as neighboursOf,
|
|
1334
1334
|
Fe as nodeById,
|
|
1335
|
-
|
|
1335
|
+
E as picks,
|
|
1336
1336
|
ft as reaches,
|
|
1337
1337
|
Le as routeCost,
|
|
1338
1338
|
Ie as routeEdges,
|
|
1339
|
-
|
|
1339
|
+
U as sameCost,
|
|
1340
1340
|
Pe as spanningTreeCost,
|
|
1341
1341
|
Se as traversalOrder,
|
|
1342
1342
|
Ae as treeCost,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as k, ak as
|
|
2
|
-
import {
|
|
1
|
+
import { L as k, ak as z, a2 as j, a9 as E, ac as U, ad as M, a5 as _, a4 as P, a as $, j as r, b as y, an as G, ao as J, a6 as N, s as K, aa as Q } from "./dom-uYx_3K1r.js";
|
|
2
|
+
import { e as F, g as H, i as W, F as V, P as X, M as Y, B as ee, U as te, H as ae } from "./bitLoaders-CxvZkGrY.js";
|
|
3
3
|
const S = {
|
|
4
4
|
iff: ["<->", "<=>", "↔", "≡", "iff", "xnor"],
|
|
5
5
|
implies: ["->", "=>", "→", "⊃", "implies"],
|
|
@@ -7,7 +7,7 @@ const S = {
|
|
|
7
7
|
xor: ["⊕", "^", "xor"],
|
|
8
8
|
and: ["&&", "∧", "&", "·", "*", "and"],
|
|
9
9
|
not: ["¬", "!", "~", "not"]
|
|
10
|
-
},
|
|
10
|
+
}, C = /* @__PURE__ */ new Map([
|
|
11
11
|
["1", !0],
|
|
12
12
|
["0", !1],
|
|
13
13
|
["true", !0],
|
|
@@ -44,17 +44,17 @@ const S = {
|
|
|
44
44
|
const c = /^[\p{L}_][\p{L}\p{N}_]*/u.exec(n);
|
|
45
45
|
if (c) {
|
|
46
46
|
const f = c[0], v = f.toLowerCase(), x = Object.keys(S).find((u) => S[u].includes(v));
|
|
47
|
-
x ? t.push({ kind: "op", op: x }) :
|
|
47
|
+
x ? t.push({ kind: "op", op: x }) : C.has(v) ? t.push({ kind: "constant", value: C.get(v) }) : t.push({ kind: "name", name: f }), l += f.length;
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
|
-
if (
|
|
51
|
-
t.push({ kind: "constant", value:
|
|
50
|
+
if (C.has(n[0])) {
|
|
51
|
+
t.push({ kind: "constant", value: C.get(n[0]) }), l += 1;
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
54
|
return `“${s}” does not mean anything here.`;
|
|
55
55
|
}
|
|
56
56
|
return t;
|
|
57
|
-
},
|
|
57
|
+
}, B = (e) => {
|
|
58
58
|
const t = le(e);
|
|
59
59
|
if (typeof t == "string") return { ok: !1, error: t };
|
|
60
60
|
if (t.length === 0) return { ok: !1, error: "Write an expression." };
|
|
@@ -94,7 +94,7 @@ const S = {
|
|
|
94
94
|
xor: "⊕",
|
|
95
95
|
implies: "→",
|
|
96
96
|
iff: "↔"
|
|
97
|
-
},
|
|
97
|
+
}, R = {
|
|
98
98
|
iff: 1,
|
|
99
99
|
implies: 2,
|
|
100
100
|
or: 3,
|
|
@@ -106,7 +106,7 @@ const S = {
|
|
|
106
106
|
}, g = (e) => {
|
|
107
107
|
const t = (l, o) => {
|
|
108
108
|
const n = g(l);
|
|
109
|
-
return
|
|
109
|
+
return R[l.kind] < o ? `(${n})` : n;
|
|
110
110
|
};
|
|
111
111
|
switch (e.kind) {
|
|
112
112
|
case "variable":
|
|
@@ -114,9 +114,9 @@ const S = {
|
|
|
114
114
|
case "constant":
|
|
115
115
|
return e.value ? "1" : "0";
|
|
116
116
|
case "not":
|
|
117
|
-
return `¬${t(e.value,
|
|
117
|
+
return `¬${t(e.value, R.not)}`;
|
|
118
118
|
default: {
|
|
119
|
-
const l =
|
|
119
|
+
const l = R[e.kind], o = ne[e.kind];
|
|
120
120
|
return `${t(e.left, l)} ${o} ${t(
|
|
121
121
|
e.right,
|
|
122
122
|
l + 1
|
|
@@ -158,16 +158,16 @@ const S = {
|
|
|
158
158
|
case "iff":
|
|
159
159
|
return w(e.left, t) === w(e.right, t);
|
|
160
160
|
}
|
|
161
|
-
},
|
|
162
|
-
() =>
|
|
161
|
+
}, A = G(
|
|
162
|
+
() => J([
|
|
163
163
|
k({ kind: N("variable"), name: j().min(1) }),
|
|
164
164
|
k({ kind: N("constant"), value: E() }),
|
|
165
|
-
k({ kind: N("not"), value:
|
|
165
|
+
k({ kind: N("not"), value: A }),
|
|
166
166
|
...["and", "or", "xor", "implies", "iff"].map(
|
|
167
167
|
(e) => k({
|
|
168
168
|
kind: N(e),
|
|
169
|
-
left:
|
|
170
|
-
right:
|
|
169
|
+
left: A,
|
|
170
|
+
right: A
|
|
171
171
|
})
|
|
172
172
|
)
|
|
173
173
|
])
|
|
@@ -179,7 +179,7 @@ const S = {
|
|
|
179
179
|
* author usually wants, and what keeps the two from disagreeing.
|
|
180
180
|
*/
|
|
181
181
|
label: j().default(""),
|
|
182
|
-
expression:
|
|
182
|
+
expression: A,
|
|
183
183
|
/**
|
|
184
184
|
* Filled in already, as a worked step rather than a question. A table that
|
|
185
185
|
* builds up to something is taught by giving away the early columns.
|
|
@@ -200,10 +200,10 @@ const S = {
|
|
|
200
200
|
* with the first variable changing slowest, which is the same thing said
|
|
201
201
|
* the other way and is what most textbooks print.
|
|
202
202
|
*/
|
|
203
|
-
rowOrder:
|
|
203
|
+
rowOrder: _(["standard", "reversed"]).default("standard"),
|
|
204
204
|
/** A point per cell instead of one for the whole table. */
|
|
205
205
|
partialCredit: E().default(!0),
|
|
206
|
-
evaluation:
|
|
206
|
+
evaluation: U.default(M)
|
|
207
207
|
}).check((e) => {
|
|
208
208
|
const { variables: t, columns: l, evaluation: o } = e.value;
|
|
209
209
|
new Set(t).size !== t.length && e.issues.push({
|
|
@@ -255,7 +255,7 @@ const S = {
|
|
|
255
255
|
* three-state control has to be able to go back to having no answer, and an
|
|
256
256
|
* absent key would be indistinguishable from a cell never rendered.
|
|
257
257
|
*/
|
|
258
|
-
cells:
|
|
258
|
+
cells: z(j(), z(j(), E().nullable())).default({})
|
|
259
259
|
}), L = (e) => {
|
|
260
260
|
switch (e.kind) {
|
|
261
261
|
case "variable":
|
|
@@ -281,7 +281,7 @@ const S = {
|
|
|
281
281
|
)
|
|
282
282
|
};
|
|
283
283
|
});
|
|
284
|
-
},
|
|
284
|
+
}, I = (e, t, l) => e?.cells?.[t]?.[l] ?? null, oe = (e, t, l, o) => ({
|
|
285
285
|
cells: {
|
|
286
286
|
...e?.cells,
|
|
287
287
|
[t]: { ...e?.cells?.[t], [l]: o }
|
|
@@ -296,12 +296,12 @@ const S = {
|
|
|
296
296
|
])
|
|
297
297
|
)
|
|
298
298
|
])
|
|
299
|
-
),
|
|
299
|
+
), Z = (e) => O(e).flatMap(
|
|
300
300
|
(t) => e.columns.filter((l) => !l.given).map((l) => ({ rowId: t.id, columnId: l.id }))
|
|
301
301
|
), ce = (e, t) => {
|
|
302
302
|
const l = ie(e), o = {};
|
|
303
|
-
for (const { rowId: n, columnId: s } of
|
|
304
|
-
const d =
|
|
303
|
+
for (const { rowId: n, columnId: s } of Z(e)) {
|
|
304
|
+
const d = I(t, n, s);
|
|
305
305
|
o[n] ??= {}, o[n][s] = d === null ? "blank" : d === l[n][s] ? "correct" : "wrong";
|
|
306
306
|
}
|
|
307
307
|
return o;
|
|
@@ -311,7 +311,7 @@ const S = {
|
|
|
311
311
|
}) => {
|
|
312
312
|
if (e.evaluation.mode === "skip")
|
|
313
313
|
return { state: "unknown", allowRetry: !1 };
|
|
314
|
-
const l = ce(e, t), o =
|
|
314
|
+
const l = ce(e, t), o = Z(e), n = o.filter(
|
|
315
315
|
({ rowId: d, columnId: c }) => l[d]?.[c] === "correct"
|
|
316
316
|
).length, s = n === o.length && o.length > 0;
|
|
317
317
|
return {
|
|
@@ -363,7 +363,7 @@ const S = {
|
|
|
363
363
|
andValue: " und ",
|
|
364
364
|
isValue: "{name} ist {value}"
|
|
365
365
|
}
|
|
366
|
-
}, de = ".bitflow-truth-scroll{overflow-x:auto}.bitflow-truth-table{border-collapse:collapse;width:auto;min-width:100%}.bitflow-truth-table caption{text-align:left;padding-bottom:var(--bitflow-space-xxsmall)}.bitflow-truth-table th,.bitflow-truth-table td{padding:var(--bitflow-space-xxsmall);border:1px solid var(--bitflow-color-border);text-align:left;vertical-align:middle}.bitflow-truth-table thead th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-medium);white-space:nowrap}.bitflow-truth-input,.bitflow-truth-table tbody th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-standard);font-variant-numeric:tabular-nums;white-space:nowrap}.bitflow-truth-note{display:block;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-standard);color:var(--bitflow-color-text-muted)}.bitflow-truth-cell{padding:var(--bitflow-space-xxsmall)}.bitflow-truth-select{min-height:2.25rem;min-width:var(--bitflow-truth-cell-width, 6rem)}.bitflow-truth-cell-correct .bitflow-select{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-truth-cell-wrong .bitflow-select{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-truth-cell-blank .bitflow-select{border-style:dashed}.bitflow-truth-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-truth-editor-row>.bitflow-input{flex:1 1 var(--bitflow-truth-editor-min, 7rem);min-width:0}.bitflow-truth-expression{font-family:var(--bitflow-font-family-mono)}.bitflow-truth-actions{flex:none;flex-wrap:nowrap}", he = {
|
|
366
|
+
}, de = ".bitflow-truth-scroll{overflow-x:auto}.bitflow-truth-table{border-collapse:collapse;width:auto;min-width:100%}.bitflow-truth-table caption{text-align:left;padding-bottom:var(--bitflow-space-xxsmall)}.bitflow-truth-table th,.bitflow-truth-table td{padding:var(--bitflow-space-xxsmall);border:1px solid var(--bitflow-color-border);text-align:left;vertical-align:middle}.bitflow-truth-table thead th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-medium);white-space:nowrap;vertical-align:top;padding:var(--bitflow-space-xsmall)}.bitflow-truth-input,.bitflow-truth-table tbody th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-standard);font-variant-numeric:tabular-nums;white-space:nowrap;padding-inline:var(--bitflow-space-xsmall)}.bitflow-truth-note{display:block;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-standard);color:var(--bitflow-color-text-muted)}.bitflow-truth-cell{padding:var(--bitflow-space-xxsmall)}.bitflow-truth-select{min-height:2.25rem;min-width:var(--bitflow-truth-cell-width, 6rem)}.bitflow-truth-cell-correct .bitflow-select{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-truth-cell-wrong .bitflow-select{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-truth-cell-blank .bitflow-select{border-style:dashed}.bitflow-truth-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-truth-editor-row>.bitflow-input{flex:1 1 var(--bitflow-truth-editor-min, 7rem);min-width:0}.bitflow-truth-expression{font-family:var(--bitflow-font-family-mono)}.bitflow-truth-actions{flex:none;flex-wrap:nowrap}", he = {
|
|
367
367
|
en: {
|
|
368
368
|
instructionLabel: "Instruction",
|
|
369
369
|
instructionHint: "Shown above the table. Markdown is allowed.",
|
|
@@ -463,7 +463,7 @@ B`,
|
|
|
463
463
|
);
|
|
464
464
|
}),
|
|
465
465
|
e.columns.map((h, a) => {
|
|
466
|
-
const i = l?.[u.id]?.[h.id], m = h.given ? w(h.expression, u.inputs) :
|
|
466
|
+
const i = l?.[u.id]?.[h.id], m = h.given ? w(h.expression, u.inputs) : I(t, u.id, h.id), b = c("cellLabel", {
|
|
467
467
|
column: v(h, a),
|
|
468
468
|
inputs: x(u)
|
|
469
469
|
});
|
|
@@ -554,7 +554,7 @@ B`,
|
|
|
554
554
|
const i = { ...a };
|
|
555
555
|
let m = !1;
|
|
556
556
|
for (const b of e.columns) {
|
|
557
|
-
const p =
|
|
557
|
+
const p = B(i[b.id] ?? "");
|
|
558
558
|
(p.ok ? g(p.value) : void 0) !== g(b.expression) && (i[b.id] = g(b.expression), m = !0);
|
|
559
559
|
}
|
|
560
560
|
return m ? i : a;
|
|
@@ -566,7 +566,7 @@ B`,
|
|
|
566
566
|
)
|
|
567
567
|
}), x = (a, i) => {
|
|
568
568
|
c((b) => ({ ...b, [a]: i }));
|
|
569
|
-
const m =
|
|
569
|
+
const m = B(i);
|
|
570
570
|
m.ok && v(a, { expression: m.value });
|
|
571
571
|
}, u = (a, i) => {
|
|
572
572
|
const m = a + i;
|
|
@@ -576,7 +576,7 @@ B`,
|
|
|
576
576
|
}, h = O(e);
|
|
577
577
|
return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-stack", children: [
|
|
578
578
|
/* @__PURE__ */ r.jsx(
|
|
579
|
-
|
|
579
|
+
F,
|
|
580
580
|
{
|
|
581
581
|
label: n("instructionLabel"),
|
|
582
582
|
hint: n("instructionHint"),
|
|
@@ -586,7 +586,7 @@ B`,
|
|
|
586
586
|
}
|
|
587
587
|
),
|
|
588
588
|
/* @__PURE__ */ r.jsx(
|
|
589
|
-
|
|
589
|
+
F,
|
|
590
590
|
{
|
|
591
591
|
label: n("variablesLabel"),
|
|
592
592
|
hint: n("variablesHint"),
|
|
@@ -605,10 +605,10 @@ B`,
|
|
|
605
605
|
/* @__PURE__ */ r.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
606
606
|
/* @__PURE__ */ r.jsx("legend", { className: "bitflow-label", children: n("columnsLabel") }),
|
|
607
607
|
/* @__PURE__ */ r.jsx("span", { className: "bitflow-hint", children: n("columnsHint") }),
|
|
608
|
-
|
|
608
|
+
W(o, "columns") && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: W(o, "columns") }),
|
|
609
609
|
e.columns.length === 0 && /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: n("noColumns") }),
|
|
610
610
|
e.columns.map((a, i) => {
|
|
611
|
-
const m = d[a.id] ?? g(a.expression), b =
|
|
611
|
+
const m = d[a.id] ?? g(a.expression), b = B(m);
|
|
612
612
|
return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
613
613
|
/* @__PURE__ */ r.jsxs("div", { className: "bitflow-truth-editor-row", children: [
|
|
614
614
|
/* @__PURE__ */ r.jsx(
|
|
@@ -682,7 +682,7 @@ B`,
|
|
|
682
682
|
] }) : /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: b.error }),
|
|
683
683
|
H(o, `columns.${i}.expression`) && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: H(o, `columns.${i}.expression`) }),
|
|
684
684
|
/* @__PURE__ */ r.jsx(
|
|
685
|
-
|
|
685
|
+
V,
|
|
686
686
|
{
|
|
687
687
|
label: n("givenOf", { column: f(a, i) }),
|
|
688
688
|
hint: n("givenHint"),
|
|
@@ -749,7 +749,7 @@ B`,
|
|
|
749
749
|
}
|
|
750
750
|
),
|
|
751
751
|
/* @__PURE__ */ r.jsx(
|
|
752
|
-
|
|
752
|
+
V,
|
|
753
753
|
{
|
|
754
754
|
label: n("partialCreditLabel"),
|
|
755
755
|
hint: n("partialCreditHint"),
|
|
@@ -768,10 +768,10 @@ B`,
|
|
|
768
768
|
] })
|
|
769
769
|
] });
|
|
770
770
|
};
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
type:
|
|
771
|
+
K("bitflow-styles-task-boolean-logic", de);
|
|
772
|
+
const q = "task-boolean-logic";
|
|
773
|
+
Q({
|
|
774
|
+
type: q,
|
|
775
775
|
kind: "task",
|
|
776
776
|
schema: se,
|
|
777
777
|
evaluate: ue,
|
|
@@ -790,18 +790,18 @@ U({
|
|
|
790
790
|
evaluation: M()
|
|
791
791
|
})
|
|
792
792
|
});
|
|
793
|
-
ae(
|
|
793
|
+
ae(q);
|
|
794
794
|
export {
|
|
795
795
|
xe as AnswerSchema,
|
|
796
796
|
se as DataSchema,
|
|
797
797
|
pe as Form,
|
|
798
|
-
|
|
798
|
+
q as TYPE,
|
|
799
799
|
be as Task,
|
|
800
800
|
ue as evaluate,
|
|
801
801
|
he as formMessages,
|
|
802
802
|
g as format,
|
|
803
803
|
T as messages,
|
|
804
|
-
|
|
804
|
+
B as parse,
|
|
805
805
|
O as rowsOf,
|
|
806
806
|
w as valueOf,
|
|
807
807
|
ge as variablesIn
|