hyperbook 0.113.1 → 0.113.3
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-BNwEKIvk.js} +258 -258
- package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-CAvHx5xm.js} +2 -2
- package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-7qanePQL.js} +1138 -1073
- package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
- package/dist/assets/directive-bitflow/editor.js +3 -3
- package/dist/assets/directive-bitflow/flow.js +4 -4
- package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-4JaKZ7WT.js} +2 -2
- package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-6CQr_atd.js} +120 -120
- package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-B9iG-a48.js} +9 -9
- package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-BFYoOtcY.js} +36 -36
- package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-BI6aFdIS.js} +21 -21
- package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-Bf078mfo.js} +69 -69
- package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-BinE5Wvd.js} +19 -19
- package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BoX5-jkC.js} +31 -31
- package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-BqRsXShM.js} +34 -34
- package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-BxihQ8Oo.js} +21 -21
- package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-C5YguHZU.js} +101 -101
- package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-C8zwSmE6.js} +27 -27
- package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-C9JSBTNc.js} +91 -91
- package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-CCMI6UK4.js} +75 -75
- package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-CGDt8H6s.js} +24 -24
- package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-Ca1v0pjV.js} +102 -92
- package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-CaYn3Gmh.js} +31 -31
- package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-CbQue0If.js} +67 -67
- package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CjH3h0OO.js} +79 -79
- package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-CkO3QfOS.js} +8 -8
- package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-Cz4i5rfe.js} +39 -39
- package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-D0NtgeiX.js} +85 -85
- package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-D1C_1SPY.js} +14 -14
- package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-D45u7EVR.js} +227 -194
- package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-D9Ox4YpM.js} +33 -33
- package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-DJ1w2Xcm.js} +46 -46
- package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-DUqW2fmV.js} +94 -94
- package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-Deedj9EF.js} +25 -25
- package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-Dg6nnY_v.js} +68 -68
- package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DgxEzomz.js} +2 -2
- package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-Dl0-ZAT5.js} +52 -52
- package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-Do6dmZyj.js} +42 -42
- package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-DqnGC-DU.js} +31 -31
- package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-DwXXeSwk.js} +73 -73
- package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-b6qwcTj9.js} +15 -15
- package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-d105UFQI.js} +58 -58
- package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-jijMWQB6.js} +8 -8
- package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-kxO5_U9Y.js} +24 -24
- package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-p5AOgOal.js} +35 -35
- package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-q2APknM6.js} +46 -46
- package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-zVkWgm5I.js} +70 -70
- 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-mdyEMdsJ.js} +6 -6
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ag as Me, ah as ye, ai as Ne, aj as
|
|
3
|
-
import {
|
|
1
|
+
import { P as j, a2 as w, ac as $, ad as Z, a4 as F, ab as B, a9 as Y, Y as R, ae as x, j as o, a as T, a5 as S, af as U, b as L, s as _, aa as K } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { ag as Me, ah as ye, ai as Ne, aj as Ce } from "./dom-B6NPWBb1.js";
|
|
3
|
+
import { e as N, C as V, g as f, M as A, P as Q, F as X, B as J, U as ee, r as te, H as ae } from "./bitLoaders-7qanePQL.js";
|
|
4
4
|
const ne = S([
|
|
5
5
|
/** The same number, up to floating-point noise. */
|
|
6
6
|
"exact",
|
|
@@ -19,7 +19,7 @@ const ne = S([
|
|
|
19
19
|
"shown",
|
|
20
20
|
/** The learner has to supply it, and it has to be right. */
|
|
21
21
|
"required"
|
|
22
|
-
]), re = S(["value", "valueAndUnit"]), oe = S(["point", "comma", "both"]), se =
|
|
22
|
+
]), re = S(["value", "valueAndUnit"]), oe = S(["point", "comma", "both"]), se = j({
|
|
23
23
|
instruction: w().default(""),
|
|
24
24
|
/**
|
|
25
25
|
* What the answer should come to, written as a number or an expression.
|
|
@@ -31,14 +31,14 @@ const ne = S([
|
|
|
31
31
|
expected: w().default(""),
|
|
32
32
|
tolerance: ne.default("exact"),
|
|
33
33
|
/** The ± for `absolute`, or the percentage for `percent`. */
|
|
34
|
-
toleranceValue:
|
|
34
|
+
toleranceValue: R().min(0).default(0),
|
|
35
35
|
/** Places for `decimals`, figures for `significant`. */
|
|
36
|
-
digits:
|
|
36
|
+
digits: R().int().min(0).max(10).default(2),
|
|
37
37
|
unitMode: ie.default("none"),
|
|
38
38
|
/** The unit as the author writes it, e.g. `m/s^2`. */
|
|
39
39
|
unit: w().default(""),
|
|
40
40
|
/** Other spellings that count, one per line in the form. */
|
|
41
|
-
unitAlternatives:
|
|
41
|
+
unitAlternatives: F(w()).default([]),
|
|
42
42
|
scoring: re.default("value"),
|
|
43
43
|
decimalSeparator: oe.default("both"),
|
|
44
44
|
/**
|
|
@@ -46,20 +46,20 @@ const ne = S([
|
|
|
46
46
|
* Off, `3/4` is refused instead of quietly worked out — "give it as a
|
|
47
47
|
* decimal" is a real question and answering it with the division dodges it.
|
|
48
48
|
*/
|
|
49
|
-
allowExpression:
|
|
49
|
+
allowExpression: Y().default(!0),
|
|
50
50
|
/**
|
|
51
51
|
* Feedback for particular wrong answers — the classic slip, the
|
|
52
52
|
* unconverted unit, the factor of ten. Matched with the same tolerance as
|
|
53
53
|
* the right answer, so `9.8` catches `9.81` when the tolerance says it
|
|
54
54
|
* should.
|
|
55
55
|
*/
|
|
56
|
-
valueFeedback:
|
|
57
|
-
|
|
56
|
+
valueFeedback: F(
|
|
57
|
+
j({
|
|
58
58
|
value: w().default(""),
|
|
59
59
|
feedback: B
|
|
60
60
|
})
|
|
61
61
|
).default([]),
|
|
62
|
-
evaluation:
|
|
62
|
+
evaluation: $.default(Z)
|
|
63
63
|
}).check((e) => {
|
|
64
64
|
const t = e.value;
|
|
65
65
|
if (t.evaluation.mode !== "auto") return;
|
|
@@ -110,7 +110,7 @@ const ne = S([
|
|
|
110
110
|
message: "This is not a number the task can compare against."
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
|
-
}), Ae =
|
|
113
|
+
}), Ae = j({
|
|
114
114
|
/**
|
|
115
115
|
* Exactly what the learner typed.
|
|
116
116
|
*
|
|
@@ -122,11 +122,11 @@ const ne = S([
|
|
|
122
122
|
* report and a reviewer read.
|
|
123
123
|
*/
|
|
124
124
|
input: w().default("")
|
|
125
|
-
}), le = (e) => [e.unit, ...e.unitAlternatives].map((t) => t.trim()).filter((t) => t !== ""),
|
|
125
|
+
}), le = (e) => [e.unit, ...e.unitAlternatives].map((t) => t.trim()).filter((t) => t !== ""), C = (e, t, i = 1e-9) => {
|
|
126
126
|
if (e === t) return !0;
|
|
127
127
|
const n = Math.max(Math.abs(e), Math.abs(t));
|
|
128
128
|
return Math.abs(e - t) <= i * Math.max(1, n);
|
|
129
|
-
},
|
|
129
|
+
}, H = (e, t) => !Number.isFinite(e) || Math.abs(e) >= 1e21 ? e : Number(e.toFixed(Math.min(10, Math.max(0, t)))), P = (e, t) => !Number.isFinite(e) || e === 0 ? e : Number(e.toPrecision(Math.min(21, Math.max(1, t)))), W = (e, t, i) => {
|
|
130
130
|
switch (i.tolerance) {
|
|
131
131
|
case "absolute":
|
|
132
132
|
return Math.abs(e - t) <= i.toleranceValue + Number.EPSILON;
|
|
@@ -135,17 +135,17 @@ const ne = S([
|
|
|
135
135
|
return Math.abs(e - t) <= n + Number.EPSILON;
|
|
136
136
|
}
|
|
137
137
|
case "decimals":
|
|
138
|
-
return
|
|
139
|
-
P(e, i.digits),
|
|
140
|
-
P(t, i.digits)
|
|
141
|
-
);
|
|
142
|
-
case "significant":
|
|
143
|
-
return j(
|
|
138
|
+
return C(
|
|
144
139
|
H(e, i.digits),
|
|
145
140
|
H(t, i.digits)
|
|
146
141
|
);
|
|
142
|
+
case "significant":
|
|
143
|
+
return C(
|
|
144
|
+
P(e, i.digits),
|
|
145
|
+
P(t, i.digits)
|
|
146
|
+
);
|
|
147
147
|
default:
|
|
148
|
-
return
|
|
148
|
+
return C(e, t);
|
|
149
149
|
}
|
|
150
150
|
}, ce = (e, t) => {
|
|
151
151
|
switch (t.tolerance) {
|
|
@@ -186,7 +186,7 @@ const ne = S([
|
|
|
186
186
|
expected: n.ok ? n.value : void 0
|
|
187
187
|
};
|
|
188
188
|
}, ue = (e, t) => {
|
|
189
|
-
const i = le(e).map(
|
|
189
|
+
const i = le(e).map(U), n = U(t);
|
|
190
190
|
return e.unitMode === "none" ? n === "" : n === "" ? e.unitMode === "shown" : i.includes(n);
|
|
191
191
|
}, de = ({
|
|
192
192
|
data: e,
|
|
@@ -399,7 +399,7 @@ const ne = S([
|
|
|
399
399
|
readonly: a,
|
|
400
400
|
onChange: s
|
|
401
401
|
}) => {
|
|
402
|
-
const l = (g,
|
|
402
|
+
const l = (g, I) => L(D, g, n, I), u = T.useId(), m = `${u}-unit`, b = `${u}-hint`, p = G(e, t.input), r = pe(p, t.input, n, l), c = ge(e, l), E = e.unitMode === "shown" && e.unit.trim() !== "", h = T.useRef(null), M = !e.allowExpression && !a, y = () => {
|
|
403
403
|
const g = t.input;
|
|
404
404
|
s({ input: g.startsWith("-") ? g.slice(1) : `-${g}` }), h.current?.focus();
|
|
405
405
|
}, d = i, z = d === void 0 ? void 0 : d.valueCorrect && !d.unitCorrect ? d.unit === "" ? l("outcomeUnitMissing") : l("outcomeUnitWrong") : !d.valueCorrect && d.unitCorrect && d.unit !== "" ? l("outcomeValueWrong") : void 0;
|
|
@@ -529,7 +529,7 @@ const ne = S([
|
|
|
529
529
|
}
|
|
530
530
|
),
|
|
531
531
|
/* @__PURE__ */ o.jsx(
|
|
532
|
-
|
|
532
|
+
V,
|
|
533
533
|
{
|
|
534
534
|
label: a("expectedLabel"),
|
|
535
535
|
hint: a("expectedHint"),
|
|
@@ -584,7 +584,7 @@ const ne = S([
|
|
|
584
584
|
),
|
|
585
585
|
e.unitMode !== "none" && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
586
586
|
/* @__PURE__ */ o.jsx(
|
|
587
|
-
|
|
587
|
+
V,
|
|
588
588
|
{
|
|
589
589
|
label: a("unitLabel"),
|
|
590
590
|
hint: a("unitHint"),
|
|
@@ -686,9 +686,9 @@ const ne = S([
|
|
|
686
686
|
] })
|
|
687
687
|
] });
|
|
688
688
|
};
|
|
689
|
-
|
|
689
|
+
_("bitflow-styles-task-numeric", he);
|
|
690
690
|
const q = "task-numeric";
|
|
691
|
-
|
|
691
|
+
K({
|
|
692
692
|
type: q,
|
|
693
693
|
kind: "task",
|
|
694
694
|
schema: se,
|
|
@@ -733,16 +733,16 @@ export {
|
|
|
733
733
|
ie as UnitModeSchema,
|
|
734
734
|
ce as acceptedRange,
|
|
735
735
|
le as acceptedUnits,
|
|
736
|
-
|
|
736
|
+
U as canonicalUnit,
|
|
737
737
|
de as evaluate,
|
|
738
738
|
me as formMessages,
|
|
739
739
|
v as formatValue,
|
|
740
740
|
D as messages,
|
|
741
|
-
|
|
741
|
+
Ce as parseExpression,
|
|
742
742
|
x as parseQuantity,
|
|
743
743
|
G as read,
|
|
744
|
-
|
|
745
|
-
|
|
744
|
+
H as roundToDecimals,
|
|
745
|
+
P as roundToSignificant,
|
|
746
746
|
ue as unitAccepted,
|
|
747
747
|
W as withinTolerance
|
|
748
748
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { P as z, ak as ge, a2 as j, Y, ac as ve, ad as me, a9 as Q, a4 as ie, a as P, j as t, a5 as ye, b as A, aa as je, s as ke } from "./dom-B6NPWBb1.js";
|
|
2
|
+
import { e as Ne, i as R, g as le, r as X, P as Ce, F as oe, B as Pe, U as Le, H as Ae } from "./bitLoaders-7qanePQL.js";
|
|
3
3
|
const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a-fA-F]{6}$/, ze = j().regex($e, "A colour is six hex digits after a #, like #017460."), ne = z({
|
|
4
4
|
label: j().default(""),
|
|
5
5
|
min: Y().default(0),
|
|
@@ -13,7 +13,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
13
13
|
label: j().default(""),
|
|
14
14
|
color: ze.default("#017460"),
|
|
15
15
|
shape: Oe.default("circle")
|
|
16
|
-
}),
|
|
16
|
+
}), He = z({
|
|
17
17
|
id: j().min(1),
|
|
18
18
|
/** In axis units, never pixels — the plot is drawn at whatever size it is given. */
|
|
19
19
|
x: Y(),
|
|
@@ -28,19 +28,19 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
28
28
|
*/
|
|
29
29
|
expected: j().optional(),
|
|
30
30
|
/** A cluster centre. Drawn larger and apart from ordinary points; never open. */
|
|
31
|
-
centroid:
|
|
32
|
-
}), I = (e) => e.centroid ? "centroid" : e.expected !== void 0 ? "open" : "known",
|
|
31
|
+
centroid: Q().default(!1)
|
|
32
|
+
}), I = (e) => e.centroid ? "centroid" : e.expected !== void 0 ? "open" : "known", Te = z({
|
|
33
33
|
instruction: j().default(""),
|
|
34
34
|
axes: Se,
|
|
35
35
|
classes: ie(Ke).default([]),
|
|
36
|
-
points: ie(
|
|
37
|
-
showGrid:
|
|
36
|
+
points: ie(He).default([]),
|
|
37
|
+
showGrid: Q().default(!0),
|
|
38
38
|
/**
|
|
39
39
|
* A point per open point instead of one for the whole plot. On by default:
|
|
40
40
|
* a learner who places nine of ten points correctly got nine right, the
|
|
41
41
|
* same reasoning as task-code-trace's cell-by-cell credit.
|
|
42
42
|
*/
|
|
43
|
-
partialCredit:
|
|
43
|
+
partialCredit: Q().default(!0),
|
|
44
44
|
evaluation: ve.default(me)
|
|
45
45
|
}).check((e) => {
|
|
46
46
|
const { axes: s, classes: o, points: n } = e.value;
|
|
@@ -126,7 +126,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
126
126
|
}), it = z({
|
|
127
127
|
/** Open point id → the class the learner assigned it. */
|
|
128
128
|
assignments: ge(j(), j()).default({})
|
|
129
|
-
}),
|
|
129
|
+
}), _ = (e, s) => s === void 0 ? void 0 : e.classes.find((o) => o.id === s), U = (e, s) => _(e, s)?.label || s || "", he = (e) => e.points.filter((s) => s.expected !== void 0), re = (e) => e.points.filter((s) => s.centroid), ce = (e) => e.points.filter((s) => !s.centroid && s.class !== void 0), ae = (e, s) => {
|
|
130
130
|
const o = {};
|
|
131
131
|
for (const n of he(e)) {
|
|
132
132
|
const a = s?.assignments?.[n.id];
|
|
@@ -139,16 +139,16 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
139
139
|
earned: o.filter((n) => n === "correct").length,
|
|
140
140
|
possible: o.length
|
|
141
141
|
};
|
|
142
|
-
},
|
|
142
|
+
}, Fe = (e, s) => {
|
|
143
143
|
const o = Object.values(ae(e, s));
|
|
144
144
|
return o.length > 0 && o.every((n) => n === "correct");
|
|
145
|
-
},
|
|
145
|
+
}, Ee = ({
|
|
146
146
|
data: e,
|
|
147
147
|
answer: s
|
|
148
148
|
}) => {
|
|
149
149
|
if (e.evaluation.mode === "skip")
|
|
150
150
|
return { state: "unknown", allowRetry: !1 };
|
|
151
|
-
const o =
|
|
151
|
+
const o = Fe(e, s), n = Me(e, s), a = e.partialCredit && n.possible > 0 ? n : { earned: o ? 1 : 0, possible: 1 };
|
|
152
152
|
return {
|
|
153
153
|
state: o ? "correct" : "wrong",
|
|
154
154
|
score: a,
|
|
@@ -202,7 +202,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
202
202
|
xAxisNote: "x: {label}",
|
|
203
203
|
yAxisNote: "y: {label}"
|
|
204
204
|
}
|
|
205
|
-
},
|
|
205
|
+
}, Be = ".bitflow-point-plot{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-point-plot-diagram{width:100%;height:auto;background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-point-plot-grid line{stroke:var(--bitflow-color-neutral-200);stroke-width:calc(1.5 * var(--bitflow-point-plot-scale, 1))}.bitflow-point-plot-axis line{stroke:var(--bitflow-color-neutral-700);stroke-width:calc(3 * var(--bitflow-point-plot-scale, 1))}.bitflow-point-plot-ticks text{fill:var(--bitflow-color-text-muted);font-family:var(--bitflow-font-family);font-size:calc(22px * var(--bitflow-point-plot-scale, 1));font-variant-numeric:tabular-nums}.bitflow-point-plot-axis-label{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:calc(24px * var(--bitflow-point-plot-scale, 1));font-weight:var(--bitflow-font-weight-medium)}.bitflow-point-plot-point circle:not(.bitflow-point-plot-hit):not(.bitflow-point-plot-ring),.bitflow-point-plot-point polygon,.bitflow-point-plot-swatch-icon circle,.bitflow-point-plot-swatch-icon polygon{fill:var(--bitflow-point-plot-color, transparent);stroke:var(--bitflow-color-text);stroke-width:3}.bitflow-point-plot-mark{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:22px;font-weight:var(--bitflow-font-weight-bold);text-anchor:middle;dominant-baseline:central;pointer-events:none}.bitflow-point-plot-hit{fill:transparent;stroke:none;cursor:pointer}.bitflow-point-plot-ring{fill:none;stroke:var(--bitflow-color-text);stroke-width:2;stroke-dasharray:5 4;pointer-events:none}.bitflow-point-plot-point>:not(.bitflow-point-plot-hit){pointer-events:none}.bitflow-point-plot-centroid circle{fill:color-mix(in srgb,var(--bitflow-point-plot-color, transparent) 25%,transparent);stroke:var(--bitflow-point-plot-color, var(--bitflow-color-text));stroke-width:5}.bitflow-point-plot-centroid line{stroke:var(--bitflow-color-text);stroke-width:4}.bitflow-point-plot-label{fill:var(--bitflow-color-text);font-family:var(--bitflow-font-family);font-size:20px;text-anchor:middle}.bitflow-point-plot-verdict{font-family:var(--bitflow-font-family);font-size:24px;font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-verdict-correct{fill:var(--bitflow-color-correct)}.bitflow-point-plot-verdict-wrong{fill:var(--bitflow-color-wrong)}.bitflow-point-plot-catcher{cursor:crosshair}.bitflow-point-plot-palette{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-point-plot-swatch{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);min-height:44px;padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer}.bitflow-point-plot-swatch:has(:checked){border-color:var(--bitflow-color-neutral-900);font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-swatch:has(:focus-visible){box-shadow:var(--bitflow-shadow-outline)}.bitflow-point-plot-swatch-icon{width:1.5rem;height:1.5rem;flex:none}.bitflow-point-plot-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-point-plot-row-label{flex:1 1 10rem;font-variant-numeric:tabular-nums}.bitflow-point-plot-row>.bitflow-select{flex:1 1 10rem;width:auto}.bitflow-point-plot-badge{font-weight:var(--bitflow-font-weight-bold)}.bitflow-point-plot-badge-correct{color:var(--bitflow-color-correct)}.bitflow-point-plot-badge-wrong{color:var(--bitflow-color-wrong)}.bitflow-point-plot-written summary{cursor:pointer;color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-point-plot-written ul{margin:var(--bitflow-space-xxsmall) 0 0;padding-inline-start:var(--bitflow-space-medium)}.bitflow-point-plot-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-point-plot-editor-row>.bitflow-input,.bitflow-point-plot-editor-row>.bitflow-select{flex:1 1 var(--bitflow-point-plot-editor-min, 7rem);width:auto;min-width:0}.bitflow-point-plot-editor-row>.bitflow-point-plot-number,.bitflow-point-plot-number{flex:0 1 var(--bitflow-point-plot-number-width, 5.5rem);width:var(--bitflow-point-plot-number-width, 5.5rem)}.bitflow-point-plot-color-input{flex:none;width:2.5rem;height:44px;padding:2px;border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface)}", ee = (e, s) => Math.hypot(e.x - s.x, e.y - s.y), Re = (e, s) => {
|
|
206
206
|
let o;
|
|
207
207
|
for (const n of e) {
|
|
208
208
|
if (n.class === void 0) continue;
|
|
@@ -338,9 +338,9 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
338
338
|
}, fe = (e) => {
|
|
339
339
|
const s = Math.round(e * 100) / 100;
|
|
340
340
|
return String(s);
|
|
341
|
-
}, Z = 16,
|
|
342
|
-
const [s, o] =
|
|
343
|
-
return
|
|
341
|
+
}, Z = 16, T = 26, We = 42, Ye = 560, Ie = 2.2, Ue = (e) => {
|
|
342
|
+
const [s, o] = P.useState(1);
|
|
343
|
+
return P.useLayoutEffect(() => {
|
|
344
344
|
const n = e.current;
|
|
345
345
|
if (!n || typeof ResizeObserver > "u") return;
|
|
346
346
|
const a = () => {
|
|
@@ -354,7 +354,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
354
354
|
}, Ve = (e) => {
|
|
355
355
|
const s = e * 1.05;
|
|
356
356
|
return `0,${-s} ${s * 0.92},${s * 0.62} ${-s * 0.92},${s * 0.62}`;
|
|
357
|
-
}, Xe = (e) => `0,${-e} ${e},0 0,${e} ${-e},0`,
|
|
357
|
+
}, Xe = (e) => `0,${-e} ${e},0 0,${e} ${-e},0`, Je = (e) => {
|
|
358
358
|
const s = e * 0.82;
|
|
359
359
|
return `${-s},${-s} ${s},${-s} ${s},${s} ${-s},${s}`;
|
|
360
360
|
}, se = ({
|
|
@@ -364,7 +364,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
364
364
|
style: n
|
|
365
365
|
}) => {
|
|
366
366
|
if (e === "circle") return /* @__PURE__ */ t.jsx("circle", { r: s, className: o, style: n });
|
|
367
|
-
const a = e === "square" ?
|
|
367
|
+
const a = e === "square" ? Je(s) : e === "triangle" ? Ve(s) : Xe(s);
|
|
368
368
|
return /* @__PURE__ */ t.jsx("polygon", { points: a, className: o, style: n });
|
|
369
369
|
}, xe = ({
|
|
370
370
|
data: e,
|
|
@@ -375,21 +375,21 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
375
375
|
onAssign: p,
|
|
376
376
|
onPlacePoint: r
|
|
377
377
|
}) => {
|
|
378
|
-
const f = (l, d) => A($, l, n, d), u =
|
|
378
|
+
const f = (l, d) => A($, l, n, d), u = P.useRef(null), w = Ue(u), [v, k] = P.useState(e.classes[0]?.id), [x, N] = P.useState(""), C = !!p && !a, g = s?.assignments ?? {}, S = de(e.axes.x), F = de(e.axes.y), K = (l, d) => {
|
|
379
379
|
if (!p) return;
|
|
380
380
|
p(l.id, d);
|
|
381
|
-
const
|
|
381
|
+
const L = l.label || l.id;
|
|
382
382
|
N(
|
|
383
|
-
d === void 0 ? f("openUnassigned", { label:
|
|
383
|
+
d === void 0 ? f("openUnassigned", { label: L }) : f("openAssigned", { label: L, class: U(e, d) })
|
|
384
384
|
);
|
|
385
|
-
},
|
|
385
|
+
}, E = (l, d) => K(l, g[l.id] === d ? void 0 : d), V = (l) => {
|
|
386
386
|
if (!r) return;
|
|
387
387
|
const d = l.currentTarget.ownerSVGElement?.getBoundingClientRect();
|
|
388
388
|
if (!d || d.width === 0 || d.height === 0) return;
|
|
389
|
-
const
|
|
389
|
+
const L = (l.clientX - d.left) / d.width * te, H = (l.clientY - d.top) / d.height * W;
|
|
390
390
|
r(
|
|
391
|
-
pe(e.axes.x, Ze(e.axes.x,
|
|
392
|
-
pe(e.axes.y, qe(e.axes.y,
|
|
391
|
+
pe(e.axes.x, Ze(e.axes.x, L)),
|
|
392
|
+
pe(e.axes.y, qe(e.axes.y, H))
|
|
393
393
|
);
|
|
394
394
|
}, i = (l) => G(e.axes.x, l.x), c = (l) => D(e.axes.y, l.y), b = e.points.filter((l) => !l.centroid), h = e.points.filter((l) => l.centroid);
|
|
395
395
|
return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-point-plot", children: [
|
|
@@ -414,7 +414,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
414
414
|
},
|
|
415
415
|
`x${l}`
|
|
416
416
|
)),
|
|
417
|
-
|
|
417
|
+
F.map((l) => /* @__PURE__ */ t.jsx(
|
|
418
418
|
"line",
|
|
419
419
|
{
|
|
420
420
|
y1: D(e.axes.y, l),
|
|
@@ -456,7 +456,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
456
456
|
},
|
|
457
457
|
`xt${l}`
|
|
458
458
|
)),
|
|
459
|
-
|
|
459
|
+
F.map((l) => /* @__PURE__ */ t.jsx(
|
|
460
460
|
"text",
|
|
461
461
|
{
|
|
462
462
|
x: m.left - 10,
|
|
@@ -500,7 +500,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
500
500
|
}
|
|
501
501
|
),
|
|
502
502
|
b.map((l) => {
|
|
503
|
-
const d = I(l),
|
|
503
|
+
const d = I(l), L = g[l.id], H = o?.[l.id], B = _(e, d === "known" ? l.class : L);
|
|
504
504
|
return /* @__PURE__ */ t.jsxs(
|
|
505
505
|
"g",
|
|
506
506
|
{
|
|
@@ -512,10 +512,10 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
512
512
|
{
|
|
513
513
|
r: We,
|
|
514
514
|
className: "bitflow-point-plot-hit",
|
|
515
|
-
onClick: () => v !== void 0 &&
|
|
515
|
+
onClick: () => v !== void 0 && E(l, v)
|
|
516
516
|
}
|
|
517
517
|
),
|
|
518
|
-
d === "open" && !
|
|
518
|
+
d === "open" && !B ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
519
519
|
/* @__PURE__ */ t.jsx(
|
|
520
520
|
se,
|
|
521
521
|
{
|
|
@@ -525,13 +525,13 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
525
525
|
}
|
|
526
526
|
),
|
|
527
527
|
/* @__PURE__ */ t.jsx("text", { className: "bitflow-point-plot-mark", children: "?" })
|
|
528
|
-
] }) :
|
|
528
|
+
] }) : B && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
529
529
|
/* @__PURE__ */ t.jsx(
|
|
530
530
|
se,
|
|
531
531
|
{
|
|
532
|
-
shape:
|
|
532
|
+
shape: B.shape,
|
|
533
533
|
size: Z,
|
|
534
|
-
style: { "--bitflow-point-plot-color":
|
|
534
|
+
style: { "--bitflow-point-plot-color": B.color }
|
|
535
535
|
}
|
|
536
536
|
),
|
|
537
537
|
d === "open" && /* @__PURE__ */ t.jsx(
|
|
@@ -542,13 +542,13 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
542
542
|
}
|
|
543
543
|
)
|
|
544
544
|
] }),
|
|
545
|
-
|
|
545
|
+
H && /* @__PURE__ */ t.jsx(
|
|
546
546
|
"text",
|
|
547
547
|
{
|
|
548
|
-
className:
|
|
548
|
+
className: H === "correct" ? "bitflow-point-plot-verdict bitflow-point-plot-verdict-correct" : "bitflow-point-plot-verdict bitflow-point-plot-verdict-wrong",
|
|
549
549
|
x: Z + 14,
|
|
550
550
|
y: -24,
|
|
551
|
-
children:
|
|
551
|
+
children: H === "correct" ? "✓" : "✗"
|
|
552
552
|
}
|
|
553
553
|
),
|
|
554
554
|
l.label && /* @__PURE__ */ t.jsx("text", { className: "bitflow-point-plot-label", y: -26, children: l.label })
|
|
@@ -558,7 +558,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
558
558
|
);
|
|
559
559
|
}),
|
|
560
560
|
h.map((l) => {
|
|
561
|
-
const d =
|
|
561
|
+
const d = _(e, l.class);
|
|
562
562
|
return d ? /* @__PURE__ */ t.jsxs(
|
|
563
563
|
"g",
|
|
564
564
|
{
|
|
@@ -567,9 +567,9 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
567
567
|
style: { "--bitflow-point-plot-color": d.color },
|
|
568
568
|
children: [
|
|
569
569
|
/* @__PURE__ */ t.jsx("title", { children: f("centroidTitle", { class: U(e, l.class) }) }),
|
|
570
|
-
/* @__PURE__ */ t.jsx("circle", { r:
|
|
571
|
-
/* @__PURE__ */ t.jsx("line", { x1: -
|
|
572
|
-
/* @__PURE__ */ t.jsx("line", { x1: 0, y1: -
|
|
570
|
+
/* @__PURE__ */ t.jsx("circle", { r: T }),
|
|
571
|
+
/* @__PURE__ */ t.jsx("line", { x1: -T * 0.6, y1: 0, x2: T * 0.6, y2: 0 }),
|
|
572
|
+
/* @__PURE__ */ t.jsx("line", { x1: 0, y1: -T * 0.6, x2: 0, y2: T * 0.6 }),
|
|
573
573
|
l.label && /* @__PURE__ */ t.jsx("text", { className: "bitflow-point-plot-label", y: -34, children: l.label })
|
|
574
574
|
]
|
|
575
575
|
},
|
|
@@ -580,7 +580,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
580
580
|
}
|
|
581
581
|
),
|
|
582
582
|
p && /* @__PURE__ */ t.jsx(
|
|
583
|
-
|
|
583
|
+
Qe,
|
|
584
584
|
{
|
|
585
585
|
data: e,
|
|
586
586
|
answer: s,
|
|
@@ -594,7 +594,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
594
594
|
),
|
|
595
595
|
/* @__PURE__ */ t.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children: x })
|
|
596
596
|
] });
|
|
597
|
-
},
|
|
597
|
+
}, Qe = ({
|
|
598
598
|
data: e,
|
|
599
599
|
answer: s,
|
|
600
600
|
states: o,
|
|
@@ -604,7 +604,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
604
604
|
setActive: r,
|
|
605
605
|
onAssign: f
|
|
606
606
|
}) => {
|
|
607
|
-
const u = (x, N) => A($, x, n, N), w = s?.assignments ?? {}, v = he(e), k =
|
|
607
|
+
const u = (x, N) => A($, x, n, N), w = s?.assignments ?? {}, v = he(e), k = P.useId();
|
|
608
608
|
return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack-small bitflow-stack", children: [
|
|
609
609
|
!a && /* @__PURE__ */ t.jsx(
|
|
610
610
|
"div",
|
|
@@ -671,7 +671,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
671
671
|
})
|
|
672
672
|
] })
|
|
673
673
|
] });
|
|
674
|
-
},
|
|
674
|
+
}, _e = ({
|
|
675
675
|
data: e,
|
|
676
676
|
answer: s,
|
|
677
677
|
result: o,
|
|
@@ -681,7 +681,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
681
681
|
}) => {
|
|
682
682
|
const r = (u, w) => A($, u, a, w), f = o?.detail?.points;
|
|
683
683
|
return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-stack", children: [
|
|
684
|
-
/* @__PURE__ */ t.jsx(
|
|
684
|
+
/* @__PURE__ */ t.jsx(Le, { markdown: e.instruction }),
|
|
685
685
|
/* @__PURE__ */ t.jsx("p", { className: "bitflow-hint", children: r(n ? "howToReadonly" : "howTo") }),
|
|
686
686
|
/* @__PURE__ */ t.jsx(
|
|
687
687
|
xe,
|
|
@@ -714,13 +714,13 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
714
714
|
] }, a.id);
|
|
715
715
|
}) })
|
|
716
716
|
] });
|
|
717
|
-
},
|
|
717
|
+
}, J = ({
|
|
718
718
|
value: e,
|
|
719
719
|
onChange: s,
|
|
720
720
|
...o
|
|
721
721
|
}) => {
|
|
722
|
-
const [n, a] =
|
|
723
|
-
return
|
|
722
|
+
const [n, a] = P.useState(() => String(e));
|
|
723
|
+
return P.useEffect(() => {
|
|
724
724
|
Number(n.replace(",", ".")) !== e && a(String(e));
|
|
725
725
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
726
726
|
"input",
|
|
@@ -748,7 +748,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
748
748
|
onChange: o,
|
|
749
749
|
errors: n
|
|
750
750
|
}) => {
|
|
751
|
-
const a = (i, c) => A(De, i, s, c), p = (i) => o({ ...e, ...i }), [r, f] =
|
|
751
|
+
const a = (i, c) => A(De, i, s, c), p = (i) => o({ ...e, ...i }), [r, f] = P.useState(3), u = (i, c) => p({ axes: { ...e.axes, [i]: { ...e.axes[i], ...c } } }), w = (i, c) => p({
|
|
752
752
|
classes: e.classes.map((b) => b.id === i ? { ...b, ...c } : b)
|
|
753
753
|
}), v = (i) => p({
|
|
754
754
|
classes: e.classes.filter((c) => c.id !== i),
|
|
@@ -783,20 +783,20 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
783
783
|
points: e.points.map(
|
|
784
784
|
(c) => I(c) === "open" ? { ...c, expected: i(c) ?? c.expected } : c
|
|
785
785
|
)
|
|
786
|
-
}),
|
|
786
|
+
}), F = {
|
|
787
787
|
circle: a("shapeCircle"),
|
|
788
788
|
square: a("shapeSquare"),
|
|
789
789
|
triangle: a("shapeTriangle"),
|
|
790
790
|
diamond: a("shapeDiamond")
|
|
791
791
|
}, K = (i, c, b, h) => /* @__PURE__ */ t.jsx(X, { label: i, error: h, children: (l) => /* @__PURE__ */ t.jsx(
|
|
792
|
-
|
|
792
|
+
J,
|
|
793
793
|
{
|
|
794
794
|
...l,
|
|
795
795
|
className: "bitflow-input bitflow-point-plot-number",
|
|
796
796
|
value: c,
|
|
797
797
|
onChange: b
|
|
798
798
|
}
|
|
799
|
-
) }),
|
|
799
|
+
) }), E = (i) => /* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
800
800
|
/* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a(i === "x" ? "xAxisLegend" : "yAxisLegend") }),
|
|
801
801
|
/* @__PURE__ */ t.jsxs("div", { className: "bitflow-row", children: [
|
|
802
802
|
/* @__PURE__ */ t.jsx(X, { label: a("axisLabelField"), children: (c) => /* @__PURE__ */ t.jsx(
|
|
@@ -833,12 +833,12 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
833
833
|
onChange: (i) => p({ instruction: i })
|
|
834
834
|
}
|
|
835
835
|
),
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
E("x"),
|
|
837
|
+
E("y"),
|
|
838
838
|
/* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
839
839
|
/* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a("classesLabel") }),
|
|
840
840
|
/* @__PURE__ */ t.jsx("span", { className: "bitflow-hint", children: a("classesHint") }),
|
|
841
|
-
|
|
841
|
+
R(n, "classes") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: R(n, "classes") }),
|
|
842
842
|
e.classes.length === 0 && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text-muted", children: a("noClasses") }),
|
|
843
843
|
e.classes.map((i, c) => {
|
|
844
844
|
const b = i.label || a("unnamedClass", { number: c + 1 });
|
|
@@ -872,7 +872,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
872
872
|
value: i.shape,
|
|
873
873
|
"aria-label": a("classShapeOf", { class: b }),
|
|
874
874
|
onChange: (h) => w(i.id, { shape: h.target.value }),
|
|
875
|
-
children: q.map((h) => /* @__PURE__ */ t.jsx("option", { value: h, children:
|
|
875
|
+
children: q.map((h) => /* @__PURE__ */ t.jsx("option", { value: h, children: F[h] }, h))
|
|
876
876
|
}
|
|
877
877
|
),
|
|
878
878
|
/* @__PURE__ */ t.jsx(
|
|
@@ -918,14 +918,14 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
918
918
|
/* @__PURE__ */ t.jsxs("fieldset", { className: "bitflow-field", children: [
|
|
919
919
|
/* @__PURE__ */ t.jsx("legend", { className: "bitflow-label", children: a("pointsLabel") }),
|
|
920
920
|
/* @__PURE__ */ t.jsx("span", { className: "bitflow-hint", children: a("pointsHint") }),
|
|
921
|
-
|
|
921
|
+
R(n, "points") && /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: R(n, "points") }),
|
|
922
922
|
V.map((i) => /* @__PURE__ */ t.jsx("span", { className: "bitflow-field-error", role: "alert", children: i }, i)),
|
|
923
923
|
e.points.length === 0 && /* @__PURE__ */ t.jsx("p", { className: "bitflow-text-muted", children: a("noPoints") }),
|
|
924
924
|
e.points.map((i, c) => {
|
|
925
925
|
const b = I(i), h = c + 1, l = b === "open" ? "expected" : "class";
|
|
926
926
|
return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-point-plot-editor-row", children: [
|
|
927
927
|
/* @__PURE__ */ t.jsx(
|
|
928
|
-
|
|
928
|
+
J,
|
|
929
929
|
{
|
|
930
930
|
className: "bitflow-input bitflow-point-plot-number",
|
|
931
931
|
value: i.x,
|
|
@@ -934,7 +934,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
934
934
|
}
|
|
935
935
|
),
|
|
936
936
|
/* @__PURE__ */ t.jsx(
|
|
937
|
-
|
|
937
|
+
J,
|
|
938
938
|
{
|
|
939
939
|
className: "bitflow-input bitflow-point-plot-number",
|
|
940
940
|
value: i.y,
|
|
@@ -976,7 +976,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
976
976
|
onChange: (d) => k(i.id, { [l]: d.target.value || void 0 }),
|
|
977
977
|
children: [
|
|
978
978
|
/* @__PURE__ */ t.jsx("option", { value: "", children: a("chooseNone") }),
|
|
979
|
-
e.classes.map((d,
|
|
979
|
+
e.classes.map((d, L) => /* @__PURE__ */ t.jsx("option", { value: d.id, children: d.label || a("unnamedClass", { number: L + 1 }) }, d.id))
|
|
980
980
|
]
|
|
981
981
|
}
|
|
982
982
|
),
|
|
@@ -1014,7 +1014,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
1014
1014
|
type: "button",
|
|
1015
1015
|
className: "bitflow-button bitflow-button-secondary",
|
|
1016
1016
|
disabled: re(e).length === 0,
|
|
1017
|
-
onClick: () => S((i) =>
|
|
1017
|
+
onClick: () => S((i) => Re(g(re(e)), i)),
|
|
1018
1018
|
children: a("apply")
|
|
1019
1019
|
}
|
|
1020
1020
|
) })
|
|
@@ -1070,7 +1070,7 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
1070
1070
|
}
|
|
1071
1071
|
),
|
|
1072
1072
|
/* @__PURE__ */ t.jsx(
|
|
1073
|
-
|
|
1073
|
+
Pe,
|
|
1074
1074
|
{
|
|
1075
1075
|
evaluation: e.evaluation,
|
|
1076
1076
|
locale: s,
|
|
@@ -1083,9 +1083,9 @@ const q = ["circle", "square", "triangle", "diamond"], Oe = ye(q), $e = /^#[0-9a
|
|
|
1083
1083
|
je({
|
|
1084
1084
|
type: we,
|
|
1085
1085
|
kind: "task",
|
|
1086
|
-
schema:
|
|
1087
|
-
evaluate:
|
|
1088
|
-
Task:
|
|
1086
|
+
schema: Te,
|
|
1087
|
+
evaluate: Ee,
|
|
1088
|
+
Task: _e,
|
|
1089
1089
|
Form: tt,
|
|
1090
1090
|
info: (e) => ({
|
|
1091
1091
|
name: A($, "name", e),
|
|
@@ -1105,31 +1105,31 @@ je({
|
|
|
1105
1105
|
})
|
|
1106
1106
|
});
|
|
1107
1107
|
Ae(we);
|
|
1108
|
-
ke("bitflow-styles-task-point-plot",
|
|
1108
|
+
ke("bitflow-styles-task-point-plot", Be);
|
|
1109
1109
|
export {
|
|
1110
1110
|
it as AnswerSchema,
|
|
1111
1111
|
Se as AxesSchema,
|
|
1112
1112
|
ne as AxisSchema,
|
|
1113
1113
|
Ke as ClassSchema,
|
|
1114
|
-
|
|
1114
|
+
Te as DataSchema,
|
|
1115
1115
|
tt as Form,
|
|
1116
1116
|
xe as PlotView,
|
|
1117
|
-
|
|
1117
|
+
He as PointSchema,
|
|
1118
1118
|
q as SHAPES,
|
|
1119
1119
|
Oe as ShapeSchema,
|
|
1120
1120
|
we as TYPE,
|
|
1121
|
-
|
|
1122
|
-
|
|
1121
|
+
_e as Task,
|
|
1122
|
+
Fe as allCorrect,
|
|
1123
1123
|
re as centroids,
|
|
1124
|
-
|
|
1124
|
+
_ as classById,
|
|
1125
1125
|
U as classLabel,
|
|
1126
1126
|
ee as distance,
|
|
1127
|
-
|
|
1127
|
+
Ee as evaluate,
|
|
1128
1128
|
De as formMessages,
|
|
1129
1129
|
Ge as knn,
|
|
1130
1130
|
ce as knownPoints,
|
|
1131
1131
|
$ as messages,
|
|
1132
|
-
|
|
1132
|
+
Re as nearestCentroid,
|
|
1133
1133
|
he as openPoints,
|
|
1134
1134
|
ae as pointStates,
|
|
1135
1135
|
I as roleOf,
|