@pie-element/venn-classification 0.1.1-next.8 → 0.1.1-next.9
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/author/index.d.ts +2 -18
- package/dist/author/index.js +522 -395
- package/dist/author/index.js.map +1 -1
- package/dist/browser/{VennClassification-BgmjHIWB.js → VennClassification-B4UWtLFO.js} +133 -133
- package/dist/browser/{VennClassification-BgmjHIWB.js.map → VennClassification-B4UWtLFO.js.map} +1 -1
- package/dist/browser/author/index.js +3572 -3450
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +2 -2
- package/dist/browser/{controller-CmzKcNfc.js → controller-bkBJ6-j1.js} +8 -3
- package/dist/browser/{controller-CmzKcNfc.js.map → controller-bkBJ6-j1.js.map} +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/controller/defaults.d.ts +5 -0
- package/dist/controller/index.js +6 -1
- package/dist/controller/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, b as t, c as n, g as r, h as i,
|
|
1
|
+
import { _ as e, b as t, c as n, g as r, h as i, u as a, v as o, x as s, y as c } from "./controller-bkBJ6-j1.js";
|
|
2
2
|
//#region ../../../node_modules/.bun/svelte@5.57.0/node_modules/svelte/src/internal/disclose-version.js
|
|
3
3
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
4
4
|
//#endregion
|
|
@@ -2542,13 +2542,13 @@ var Gi = async (e) => {
|
|
|
2542
2542
|
function Ki(e) {
|
|
2543
2543
|
return (e || "").replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
2544
2544
|
}
|
|
2545
|
-
function qi(e,
|
|
2546
|
-
let
|
|
2547
|
-
return (e.imageUrl ?? "").trim() &&
|
|
2545
|
+
function qi(e, n) {
|
|
2546
|
+
let r = (e.imageAlt ?? "").trim();
|
|
2547
|
+
return (e.imageUrl ?? "").trim() && r ? r : Ki(e.label ?? "") || t("tileFallbackName", n);
|
|
2548
2548
|
}
|
|
2549
|
-
function Ji(e,
|
|
2550
|
-
let
|
|
2551
|
-
return
|
|
2549
|
+
function Ji(e, n, r, i) {
|
|
2550
|
+
let a = [qi(e, i), n === null ? t("tileNotPlaced", i) : t("tileInRegion", i, { region: n })];
|
|
2551
|
+
return r === "correct" && a.push(t("tileCorrect", i)), r === "incorrect" && a.push(t("tileIncorrect", i)), a.join(", ");
|
|
2552
2552
|
}
|
|
2553
2553
|
//#endregion
|
|
2554
2554
|
//#region src/delivery/Tile.svelte
|
|
@@ -2824,26 +2824,26 @@ var aa = /* @__PURE__ */ Y("<div class=\"teacher-instructions pie-teacher-instru
|
|
|
2824
2824
|
hash: "svelte-1jhejbv",
|
|
2825
2825
|
code: ".teacher-instructions.svelte-1jhejbv {margin-bottom:1rem;}.teacher-instructions-toggle.svelte-1jhejbv {padding:0;border:0;border-bottom:1px dotted currentColor;background:transparent;font:inherit;color:var(--pie-primary, #3f51b5);cursor:pointer;}.teacher-instructions-toggle.svelte-1jhejbv:focus-visible {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}"
|
|
2826
2826
|
};
|
|
2827
|
-
function sa(e,
|
|
2828
|
-
Ze(
|
|
2829
|
-
let
|
|
2830
|
-
var
|
|
2827
|
+
function sa(e, t) {
|
|
2828
|
+
Ze(t, !0), li(e, oa);
|
|
2829
|
+
let n = $(t, "html", 7), r = $(t, "language", 7), i = /* @__PURE__ */ z(!1), a = `venn-teacher-instructions-${Math.random().toString(36).slice(2, 10)}`;
|
|
2830
|
+
var o = {
|
|
2831
2831
|
get html() {
|
|
2832
|
-
return
|
|
2832
|
+
return n();
|
|
2833
2833
|
},
|
|
2834
2834
|
set html(e) {
|
|
2835
|
-
|
|
2835
|
+
n(e), R();
|
|
2836
2836
|
},
|
|
2837
2837
|
get language() {
|
|
2838
|
-
return
|
|
2838
|
+
return r();
|
|
2839
2839
|
},
|
|
2840
2840
|
set language(e) {
|
|
2841
|
-
|
|
2841
|
+
r(e), R();
|
|
2842
2842
|
}
|
|
2843
2843
|
}, c = aa(), l = H(c), u = dn(l, !0), d = U(l, 2);
|
|
2844
|
-
return ci(d,
|
|
2845
|
-
Q(l, "aria-expanded", J(
|
|
2846
|
-
}, [() =>
|
|
2844
|
+
return ci(d, n, !0), N(d), N(c), W((e) => {
|
|
2845
|
+
Q(l, "aria-expanded", J(i)), Q(l, "aria-controls", a), Vr(u, e), Q(d, "id", a), Q(d, "hidden", !J(i));
|
|
2846
|
+
}, [() => s(J(i) ? "hideTeacherInstructions" : "showTeacherInstructions", r())]), Cr("click", l, () => B(i, !J(i))), X(e, c), Qe(o);
|
|
2847
2847
|
}
|
|
2848
2848
|
wr(["click"]), Li(sa, {
|
|
2849
2849
|
html: {},
|
|
@@ -3046,27 +3046,27 @@ function Fa(e, t = ca) {
|
|
|
3046
3046
|
let r = e[""] ?? 0, i = va(n.width - 12, t), a = Math.ceil(r / i) * (t.h + 8) - 8 + 12;
|
|
3047
3047
|
return a > n.outsideStripHeight ? ma(n.scale, a) : n;
|
|
3048
3048
|
}
|
|
3049
|
-
function Ia(
|
|
3050
|
-
if (
|
|
3051
|
-
let [
|
|
3049
|
+
function Ia(e, t = ha(), n = ca) {
|
|
3050
|
+
if (e.circles?.length !== 2) throw Error(`buildLayout2Set requires exactly 2 circles (got ${e.circles?.length ?? 0})`);
|
|
3051
|
+
let [a, s] = t.circles, c = i(2), l = Math.max(a.cy + a.r, s.cy + s.r), u = Math.min(t.height - t.outsideStripHeight, l + t.outsideGap), d = (e, t, n) => (r, i) => {
|
|
3052
3052
|
let a = r - e, o = i - t;
|
|
3053
3053
|
return a * a + o * o <= n * n;
|
|
3054
|
-
}, f = d(
|
|
3054
|
+
}, f = d(a.cx, a.cy, a.r), p = d(s.cx, s.cy, s.r), m = {};
|
|
3055
3055
|
return {
|
|
3056
|
-
geometry:
|
|
3057
|
-
cell:
|
|
3058
|
-
regions: c.map((
|
|
3059
|
-
let c =
|
|
3060
|
-
if (c === "") d = (e,
|
|
3056
|
+
geometry: t,
|
|
3057
|
+
cell: n,
|
|
3058
|
+
regions: c.map((i) => {
|
|
3059
|
+
let c = o(i), l = r(e, i), d, h, g, _;
|
|
3060
|
+
if (c === "") d = (e, n) => e >= 0 && e <= t.width && n >= 0 && n <= t.height && !f(e, n) && !p(e, n), h = {
|
|
3061
3061
|
x: 0,
|
|
3062
3062
|
y: u,
|
|
3063
|
-
w:
|
|
3064
|
-
h:
|
|
3065
|
-
}, {capacity: g, slots: _} = Ta(
|
|
3063
|
+
w: t.width,
|
|
3064
|
+
h: t.height - u
|
|
3065
|
+
}, {capacity: g, slots: _} = Ta(t, u, n);
|
|
3066
3066
|
else if (c === "0" || c === "1" || c === "0,1") {
|
|
3067
|
-
d = c === "0" ? (e, t) => f(e, t) && !p(e, t) : c === "1" ? (e, t) => p(e, t) && !f(e, t) : (e, t) => f(e, t) && p(e, t), h = Ma(c,
|
|
3068
|
-
let e = Ca(c,
|
|
3069
|
-
g = Math.max(...e.map(wa)), _ = ja(e,
|
|
3067
|
+
d = c === "0" ? (e, t) => f(e, t) && !p(e, t) : c === "1" ? (e, t) => p(e, t) && !f(e, t) : (e, t) => f(e, t) && p(e, t), h = Ma(c, a, s);
|
|
3068
|
+
let e = Ca(c, a, s, n);
|
|
3069
|
+
g = Math.max(...e.map(wa)), _ = ja(e, a.cy, n, Ea(h));
|
|
3070
3070
|
} else d = () => !1, h = {
|
|
3071
3071
|
x: 0,
|
|
3072
3072
|
y: 0,
|
|
@@ -3074,7 +3074,7 @@ function Ia(t, n = ha(), r = ca) {
|
|
|
3074
3074
|
h: 0
|
|
3075
3075
|
}, g = 0, _ = () => [];
|
|
3076
3076
|
let v = {
|
|
3077
|
-
region:
|
|
3077
|
+
region: i,
|
|
3078
3078
|
key: c,
|
|
3079
3079
|
label: l,
|
|
3080
3080
|
hitRect: h,
|
|
@@ -3102,35 +3102,35 @@ function La(e, t, n) {
|
|
|
3102
3102
|
}
|
|
3103
3103
|
//#endregion
|
|
3104
3104
|
//#region src/delivery/dnd.ts
|
|
3105
|
-
function Ra({ model:
|
|
3106
|
-
let s =
|
|
3105
|
+
function Ra({ model: t, session: r, tileId: i, placement: o }) {
|
|
3106
|
+
let s = a(r, t), c = {
|
|
3107
3107
|
...s,
|
|
3108
3108
|
placements: {
|
|
3109
3109
|
...s.placements,
|
|
3110
|
-
[i]:
|
|
3110
|
+
[i]: o === null ? null : e(o)
|
|
3111
3111
|
}
|
|
3112
3112
|
};
|
|
3113
|
-
return c.completed = n(
|
|
3113
|
+
return c.completed = n(t, c), c;
|
|
3114
3114
|
}
|
|
3115
|
-
function za(
|
|
3116
|
-
let
|
|
3117
|
-
return Array.isArray(
|
|
3115
|
+
function za(t, n) {
|
|
3116
|
+
let r = t?.placements?.[n];
|
|
3117
|
+
return Array.isArray(r) ? e(r) : null;
|
|
3118
3118
|
}
|
|
3119
3119
|
function Ba(e, t, n) {
|
|
3120
3120
|
let r = za(e, t);
|
|
3121
|
-
return r === null || n === null ? r === n :
|
|
3121
|
+
return r === null || n === null ? r === n : c(r, n);
|
|
3122
3122
|
}
|
|
3123
3123
|
function Va(e, t) {
|
|
3124
3124
|
let n = t?.placements ?? {};
|
|
3125
3125
|
return (e.tiles || []).filter((e) => n[e.id] == null);
|
|
3126
3126
|
}
|
|
3127
|
-
function Ha(
|
|
3128
|
-
let
|
|
3129
|
-
for (let
|
|
3130
|
-
let
|
|
3131
|
-
if (
|
|
3132
|
-
let a =
|
|
3133
|
-
i[a] || (i[a] = []), i[a].push(
|
|
3127
|
+
function Ha(t, n) {
|
|
3128
|
+
let r = n?.placements ?? {}, i = {};
|
|
3129
|
+
for (let n of t.tiles || []) {
|
|
3130
|
+
let t = r[n.id];
|
|
3131
|
+
if (t == null) continue;
|
|
3132
|
+
let a = e(t).join(",");
|
|
3133
|
+
i[a] || (i[a] = []), i[a].push(n);
|
|
3134
3134
|
}
|
|
3135
3135
|
return i;
|
|
3136
3136
|
}
|
|
@@ -3140,16 +3140,16 @@ var Ua = /* @__PURE__ */ Y("<div class=\"venn-prompt svelte-gkcqor\"></div>"), W
|
|
|
3140
3140
|
hash: "svelte-gkcqor",
|
|
3141
3141
|
code: ".venn-root.svelte-gkcqor {display:flex;flex-direction:column;gap:16px;padding:16px;color:#0f172a;font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;--vc-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );}.venn-prompt.svelte-gkcqor {font-size:16px;line-height:1.5;}.venn-prompt.svelte-gkcqor p {margin:0 0 8px 0;}.toggle-correct.svelte-gkcqor {align-self:center;display:inline-flex;align-items:center;gap:8px;margin:0 0 4px 0;padding:0;background:transparent;border:0;color:inherit;font:inherit;font-size:14px;cursor:pointer;user-select:none;}.toggle-correct.svelte-gkcqor:focus-visible {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;border-radius:2px;}.toggle-icon.svelte-gkcqor {width:25px;height:25px;flex-shrink:0;}.toggle-label.svelte-gkcqor {line-height:1.2;}.toggle-correct.svelte-gkcqor:hover .toggle-label:where(.svelte-gkcqor),\n .toggle-correct.svelte-gkcqor:focus-visible .toggle-label:where(.svelte-gkcqor) {text-decoration:underline;}.venn-diagram.svelte-gkcqor {\n /*\n * Width and aspect ratio come from the geometry, inline. The width cap\n * keeps the diagram from dominating wide layouts, and the viewport-height\n * share keeps the prompt, toggle and tray in view in short windows, down\n * to the width that keeps tiles at 44 px (`diagramCssWidth`).\n */position:relative;margin:0 auto;}.venn-diagram.svelte-gkcqor svg:where(.svelte-gkcqor) {width:100%;height:100%;display:block;}.placed-tiles.svelte-gkcqor,\n .region-labels.svelte-gkcqor {position:absolute;inset:0;pointer-events:none;}.tile-wrapper.svelte-gkcqor {position:absolute;display:flex;pointer-events:auto;}.region-aria.svelte-gkcqor {position:absolute;width:1px;height:1px;transform:translate(-50%, -50%);opacity:0;pointer-events:none;}.venn-error.svelte-gkcqor {padding:12px 16px;border:1.5px solid #bf0d00;border-radius:8px;background:#fef2f2;color:#7f1d1d;font-size:14px;}\n /* Tailwind's `sr-only`, scoped: PIE players ship no Tailwind. */.sr-only.svelte-gkcqor {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.drag-ghost.svelte-gkcqor {position:fixed;top:0;left:0;transform:translate(-50%, -50%);pointer-events:none;z-index:1000;}"
|
|
3142
3142
|
};
|
|
3143
|
-
function ao(
|
|
3144
|
-
Ze(
|
|
3145
|
-
let
|
|
3143
|
+
function ao(e, n) {
|
|
3144
|
+
Ze(n, !0), li(e, io);
|
|
3145
|
+
let r = [{ label: "Set A" }, { label: "Set B" }], i = `venn-${Math.random().toString(36).slice(2, 10)}`, a = `${i}-mask-left-only`, c = `${i}-mask-right-only`, l = `${i}-mask-outside`, u = `${i}-clip-left`, d = null, f = /* @__PURE__ */ z(null), p = null, m = /* @__PURE__ */ z(!1), h = /* @__PURE__ */ z(null), g = /* @__PURE__ */ z(null), _ = /* @__PURE__ */ z(null), v = /* @__PURE__ */ z(null), y = /* @__PURE__ */ z(0), b = null, x = null, S = /* @__PURE__ */ I(() => n?.model?.circles ?? r), ee = /* @__PURE__ */ I(() => J(S).length === 2), C = /* @__PURE__ */ I(() => n?.model?.language), w = /* @__PURE__ */ I(() => ({
|
|
3146
3146
|
circles: J(S),
|
|
3147
|
-
tiles:
|
|
3148
|
-
regionLabels:
|
|
3147
|
+
tiles: n?.model?.tiles ?? [],
|
|
3148
|
+
regionLabels: n?.model?.regionLabels ?? {},
|
|
3149
3149
|
language: J(C),
|
|
3150
3150
|
scoringPolicy: "partialPerTile",
|
|
3151
3151
|
promptEnabled: !0
|
|
3152
|
-
})), te = /* @__PURE__ */ I(() =>
|
|
3152
|
+
})), te = /* @__PURE__ */ I(() => n?.model?.env?.mode === "evaluate"), ne = /* @__PURE__ */ I(() => n?.model?.disabled === !0), re = /* @__PURE__ */ I(() => n?.model?.prompt ?? null), T = /* @__PURE__ */ I(() => de(n?.session, n?.model, J(m))), E = /* @__PURE__ */ I(() => ({ placements: J(T) })), ae = /* @__PURE__ */ I(() => Ha(J(w), J(E))), oe = /* @__PURE__ */ I(() => Va(J(w), J(E))), se = /* @__PURE__ */ I(() => (J(w).tiles ?? []).some((e) => (e.imageUrl ?? "").trim()) ? la : ca), D = /* @__PURE__ */ I(() => Fa(Object.fromEntries(Object.entries(J(ae)).map(([e, t]) => [e, t.length])), J(se))), ce = /* @__PURE__ */ I(() => J(ee) ? Ia(J(w), J(D), J(se)) : null), le = /* @__PURE__ */ I(() => _a(J(y), J(D), J(se))), O = /* @__PURE__ */ I(() => [
|
|
3153
3153
|
"0",
|
|
3154
3154
|
"0,1",
|
|
3155
3155
|
"1",
|
|
@@ -3157,7 +3157,7 @@ function ao(n, r) {
|
|
|
3157
3157
|
"tray"
|
|
3158
3158
|
]), ue;
|
|
3159
3159
|
Tn(() => {
|
|
3160
|
-
let e =
|
|
3160
|
+
let e = n?.session, t = J(te) && !!n?.model?.correctRegionsById;
|
|
3161
3161
|
_r(() => {
|
|
3162
3162
|
(!t || e !== ue) && B(m, !1), ue = e;
|
|
3163
3163
|
});
|
|
@@ -3193,13 +3193,13 @@ function ao(n, r) {
|
|
|
3193
3193
|
};
|
|
3194
3194
|
}
|
|
3195
3195
|
function me(e, t) {
|
|
3196
|
-
let
|
|
3196
|
+
let r = Ra({
|
|
3197
3197
|
model: J(w),
|
|
3198
|
-
session:
|
|
3198
|
+
session: n?.session,
|
|
3199
3199
|
tileId: e,
|
|
3200
3200
|
placement: t
|
|
3201
3201
|
});
|
|
3202
|
-
|
|
3202
|
+
n.onSessionChange?.(r);
|
|
3203
3203
|
}
|
|
3204
3204
|
function he(e) {
|
|
3205
3205
|
return e ? (J(w).tiles || []).find((t) => t.id === e) ?? null : null;
|
|
@@ -3208,7 +3208,7 @@ function ao(n, r) {
|
|
|
3208
3208
|
return J(ce)?.regionByKey[e];
|
|
3209
3209
|
}
|
|
3210
3210
|
function _e(e) {
|
|
3211
|
-
return e === "tray" ?
|
|
3211
|
+
return e === "tray" ? t("tray", J(C)) : ge(e)?.label ?? t("unknownTarget", J(C));
|
|
3212
3212
|
}
|
|
3213
3213
|
function ve() {
|
|
3214
3214
|
B(h, null), B(_, null), B(g, null), B(v, null);
|
|
@@ -3216,38 +3216,38 @@ function ao(n, r) {
|
|
|
3216
3216
|
function ye() {
|
|
3217
3217
|
b?.(), J(h) !== null && ve();
|
|
3218
3218
|
}
|
|
3219
|
-
function be(e,
|
|
3220
|
-
let
|
|
3221
|
-
if (
|
|
3222
|
-
k(
|
|
3219
|
+
function be(e, r) {
|
|
3220
|
+
let i = qi(e, J(C)), a = r === "tray" ? null : r === null ? void 0 : ge(r)?.region;
|
|
3221
|
+
if (a === void 0 || Ba(n?.session, e.id, a)) {
|
|
3222
|
+
k(t("cancelled", J(C)));
|
|
3223
3223
|
return;
|
|
3224
3224
|
}
|
|
3225
|
-
me(e.id,
|
|
3226
|
-
name:
|
|
3227
|
-
target: _e(
|
|
3225
|
+
me(e.id, a), k(a === null ? t("returnedToTray", J(C), { name: i }) : t("placedIn", J(C), {
|
|
3226
|
+
name: i,
|
|
3227
|
+
target: _e(r)
|
|
3228
3228
|
}));
|
|
3229
3229
|
}
|
|
3230
|
-
function xe(e,
|
|
3230
|
+
function xe(e, n) {
|
|
3231
3231
|
if (J(ne)) return;
|
|
3232
|
-
|
|
3233
|
-
x:
|
|
3234
|
-
y:
|
|
3235
|
-
}, !0), B(g, Se(
|
|
3236
|
-
let
|
|
3232
|
+
n.preventDefault(), b?.(), n.currentTarget.setPointerCapture?.(n.pointerId), B(h, e.id, !0), B(_, null), B(v, {
|
|
3233
|
+
x: n.clientX,
|
|
3234
|
+
y: n.clientY
|
|
3235
|
+
}, !0), B(g, Se(n.clientX, n.clientY), !0), k(t("pickedUp", J(C), { name: qi(e, J(C)) }));
|
|
3236
|
+
let r = (e) => {
|
|
3237
3237
|
B(v, {
|
|
3238
3238
|
x: e.clientX,
|
|
3239
3239
|
y: e.clientY
|
|
3240
3240
|
}, !0), B(g, Se(e.clientX, e.clientY), !0);
|
|
3241
|
-
},
|
|
3242
|
-
|
|
3241
|
+
}, i = (t) => {
|
|
3242
|
+
o();
|
|
3243
3243
|
let n = Se(t.clientX, t.clientY), r = J(g);
|
|
3244
3244
|
ve(), !J(ne) && be(e, n ?? r);
|
|
3245
|
-
}, i = () => {
|
|
3246
|
-
a(), ve(), k(c("cancelled", J(C)));
|
|
3247
3245
|
}, a = () => {
|
|
3248
|
-
|
|
3246
|
+
o(), ve(), k(t("cancelled", J(C)));
|
|
3247
|
+
}, o = () => {
|
|
3248
|
+
window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", a), b === o && (b = null);
|
|
3249
3249
|
};
|
|
3250
|
-
b =
|
|
3250
|
+
b = o, window.addEventListener("pointermove", r), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", a);
|
|
3251
3251
|
}
|
|
3252
3252
|
function Se(e, t) {
|
|
3253
3253
|
if (Ce(e, t)) return "tray";
|
|
@@ -3270,14 +3270,14 @@ function ao(n, r) {
|
|
|
3270
3270
|
return;
|
|
3271
3271
|
}
|
|
3272
3272
|
}
|
|
3273
|
-
function Te(
|
|
3274
|
-
if (J(h) ===
|
|
3275
|
-
let
|
|
3276
|
-
ve(), be(
|
|
3273
|
+
function Te(e) {
|
|
3274
|
+
if (J(h) === e.id) {
|
|
3275
|
+
let t = J(_);
|
|
3276
|
+
ve(), be(e, t), we(e.id);
|
|
3277
3277
|
} else {
|
|
3278
|
-
let n = za(J(E),
|
|
3279
|
-
B(h,
|
|
3280
|
-
name: qi(
|
|
3278
|
+
let n = za(J(E), e.id), r = n === null ? J(O)[0] ?? null : o(n);
|
|
3279
|
+
B(h, e.id, !0), B(_, r, !0), k(t("pickedUpWithKeyboard", J(C), {
|
|
3280
|
+
name: qi(e, J(C)),
|
|
3281
3281
|
target: _e(r ?? "")
|
|
3282
3282
|
}));
|
|
3283
3283
|
}
|
|
@@ -3296,33 +3296,33 @@ function ao(n, r) {
|
|
|
3296
3296
|
x = null;
|
|
3297
3297
|
}, 0);
|
|
3298
3298
|
}
|
|
3299
|
-
function Oe(e,
|
|
3299
|
+
function Oe(e, n) {
|
|
3300
3300
|
if (!J(ne)) {
|
|
3301
|
-
if (
|
|
3302
|
-
|
|
3301
|
+
if (n.key === " " || n.key === "Enter") {
|
|
3302
|
+
n.preventDefault(), x = e.id, Te(e);
|
|
3303
3303
|
return;
|
|
3304
3304
|
}
|
|
3305
|
-
if (
|
|
3306
|
-
|
|
3305
|
+
if (n.key === "Escape" && J(h) === e.id) {
|
|
3306
|
+
n.preventDefault(), ve(), k(t("cancelled", J(C)));
|
|
3307
3307
|
return;
|
|
3308
3308
|
}
|
|
3309
|
-
if (J(h) === e.id && (
|
|
3310
|
-
|
|
3311
|
-
let e = J(_) ?? J(O)[0] ?? "0",
|
|
3312
|
-
|
|
3313
|
-
let
|
|
3314
|
-
|
|
3309
|
+
if (J(h) === e.id && (n.key === "ArrowLeft" || n.key === "ArrowRight" || n.key === "ArrowUp" || n.key === "ArrowDown" || n.key === "Tab")) {
|
|
3310
|
+
n.preventDefault();
|
|
3311
|
+
let e = J(_) ?? J(O)[0] ?? "0", r = J(O).indexOf(e);
|
|
3312
|
+
r < 0 && (r = 0);
|
|
3313
|
+
let i = n.key === "ArrowLeft" || n.key === "ArrowUp" || n.key === "Tab" && n.shiftKey ? -1 : 1;
|
|
3314
|
+
r = (r + i + J(O).length) % J(O).length, B(_, J(O)[r], !0), k(t("dropTarget", J(C), { target: _e(J(_)) }));
|
|
3315
3315
|
}
|
|
3316
3316
|
}
|
|
3317
3317
|
}
|
|
3318
3318
|
function A(e) {
|
|
3319
3319
|
if (J(h) === null || J(v) !== null) return;
|
|
3320
|
-
let
|
|
3321
|
-
|
|
3320
|
+
let n = e.relatedTarget;
|
|
3321
|
+
n && d?.contains(n) || (ve(), k(t("cancelled", J(C))));
|
|
3322
3322
|
}
|
|
3323
3323
|
function ke(e) {
|
|
3324
3324
|
if (!J(te) || J(m)) return null;
|
|
3325
|
-
let t =
|
|
3325
|
+
let t = n?.model?.correctness?.[e];
|
|
3326
3326
|
return t === "correct" || t === "incorrect" || t === "unanswered" ? t : null;
|
|
3327
3327
|
}
|
|
3328
3328
|
function j() {
|
|
@@ -3339,11 +3339,11 @@ function ao(n, r) {
|
|
|
3339
3339
|
}), Cn(() => {
|
|
3340
3340
|
J(T), J(w).tiles?.length, mr().then(j);
|
|
3341
3341
|
});
|
|
3342
|
-
let M = /* @__PURE__ */ I(() => J(te) ? Object.values(
|
|
3342
|
+
let M = /* @__PURE__ */ I(() => J(te) ? Object.values(n?.model?.correctness ?? {}).filter((e) => e === "incorrect" || e === "unanswered").length : 0), Ae = /* @__PURE__ */ I(() => J(h) === null ? J(g) ?? null : J(g) ?? J(_) ?? null), je = /* @__PURE__ */ I(() => J(Ae) === "0"), Me = /* @__PURE__ */ I(() => J(Ae) === "1"), Ne = /* @__PURE__ */ I(() => J(Ae) === "0,1"), Pe = /* @__PURE__ */ I(() => J(Ae) === ""), Fe = "rgba(37, 99, 235, 0.18)", Ie = /* @__PURE__ */ I(() => J(h) !== null && J(v) !== null ? he(J(h)) : null);
|
|
3343
3343
|
var Le = ro(), Re = H(Le), ze = (e) => {
|
|
3344
3344
|
sa(e, {
|
|
3345
3345
|
get html() {
|
|
3346
|
-
return
|
|
3346
|
+
return n.model.teacherInstructions;
|
|
3347
3347
|
},
|
|
3348
3348
|
get language() {
|
|
3349
3349
|
return J(C);
|
|
@@ -3351,7 +3351,7 @@ function ao(n, r) {
|
|
|
3351
3351
|
});
|
|
3352
3352
|
};
|
|
3353
3353
|
Z(Re, (e) => {
|
|
3354
|
-
|
|
3354
|
+
n?.model?.teacherInstructions && e(ze);
|
|
3355
3355
|
});
|
|
3356
3356
|
var Be = U(Re, 2), Ve = (e) => {
|
|
3357
3357
|
var t = Ua();
|
|
@@ -3361,38 +3361,38 @@ function ao(n, r) {
|
|
|
3361
3361
|
J(re) && e(Ve);
|
|
3362
3362
|
});
|
|
3363
3363
|
var He = U(Be, 2), Ue = (e) => {
|
|
3364
|
-
var
|
|
3364
|
+
var t = Ka(), n = H(t), r = (e) => {
|
|
3365
3365
|
X(e, Wa());
|
|
3366
|
-
},
|
|
3366
|
+
}, i = (e) => {
|
|
3367
3367
|
X(e, Ga());
|
|
3368
3368
|
};
|
|
3369
|
-
Z(
|
|
3370
|
-
J(m) ? e(
|
|
3369
|
+
Z(n, (e) => {
|
|
3370
|
+
J(m) ? e(r) : e(i, -1);
|
|
3371
3371
|
});
|
|
3372
|
-
var
|
|
3373
|
-
N(
|
|
3374
|
-
Q(
|
|
3375
|
-
}, [() =>
|
|
3372
|
+
var a = dn(U(n, 2), !0);
|
|
3373
|
+
N(t), W((e) => {
|
|
3374
|
+
Q(t, "aria-pressed", J(m)), Vr(a, e);
|
|
3375
|
+
}, [() => s(J(m) ? "hideCorrectAnswer" : "showCorrectAnswer", J(C))]), Cr("click", t, () => B(m, !J(m))), X(e, t);
|
|
3376
3376
|
};
|
|
3377
3377
|
Z(He, (e) => {
|
|
3378
3378
|
J(te) && J(M) > 0 && e(Ue);
|
|
3379
3379
|
});
|
|
3380
3380
|
var We = U(He, 2), Ge = (e) => {
|
|
3381
|
-
var
|
|
3382
|
-
W((e) => Vr(
|
|
3381
|
+
var n = qa(), r = dn(n, !0);
|
|
3382
|
+
W((e) => Vr(r, e), [() => t("unsupportedCircles", J(C), {
|
|
3383
3383
|
count: J(S).length,
|
|
3384
3384
|
supported: 2
|
|
3385
|
-
})]), X(e,
|
|
3385
|
+
})]), X(e, n);
|
|
3386
3386
|
}, Ke = (e) => {
|
|
3387
|
-
var
|
|
3388
|
-
let
|
|
3389
|
-
var
|
|
3387
|
+
var n = to(), r = un(n);
|
|
3388
|
+
let i;
|
|
3389
|
+
var o = H(r), s = H(o), d = H(s), p = H(d), m = U(p), b = U(m);
|
|
3390
3390
|
N(d);
|
|
3391
3391
|
var x = U(d), S = H(x), ee = U(S), te = U(ee);
|
|
3392
3392
|
N(x);
|
|
3393
3393
|
var re = U(x), T = dn(re), E = U(re), O = H(E), ue = U(O), de = U(ue);
|
|
3394
|
-
N(E), N(
|
|
3395
|
-
var k = U(
|
|
3394
|
+
N(E), N(s);
|
|
3395
|
+
var k = U(s), pe = U(k);
|
|
3396
3396
|
ni(pe, 17, () => J(D).circles, Qr, (e, t) => {
|
|
3397
3397
|
var n = Ja();
|
|
3398
3398
|
W(() => {
|
|
@@ -3402,7 +3402,7 @@ function ao(n, r) {
|
|
|
3402
3402
|
var me = U(pe), he = (e) => {
|
|
3403
3403
|
var t = Ya();
|
|
3404
3404
|
Q(t, "fill", Fe), W(() => {
|
|
3405
|
-
Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${
|
|
3405
|
+
Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${a})`);
|
|
3406
3406
|
}), X(e, t);
|
|
3407
3407
|
};
|
|
3408
3408
|
Z(me, (e) => {
|
|
@@ -3411,7 +3411,7 @@ function ao(n, r) {
|
|
|
3411
3411
|
var ge = U(me), _e = (e) => {
|
|
3412
3412
|
var t = Ya();
|
|
3413
3413
|
Q(t, "fill", Fe), W(() => {
|
|
3414
|
-
Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${
|
|
3414
|
+
Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${c})`);
|
|
3415
3415
|
}), X(e, t);
|
|
3416
3416
|
};
|
|
3417
3417
|
Z(ge, (e) => {
|
|
@@ -3452,8 +3452,8 @@ function ao(n, r) {
|
|
|
3452
3452
|
}, [() => n === 0 ? Math.max(20 * J(D).scale, J(t).cx - J(t).r) : Math.min(J(D).width - 20 * J(D).scale, J(t).cx + J(t).r), () => Math.max(26 * J(D).scale, J(t).cy - J(t).r - 12 * J(D).scale)]), X(e, r);
|
|
3453
3453
|
});
|
|
3454
3454
|
var Te = U(we);
|
|
3455
|
-
N(
|
|
3456
|
-
var A = U(
|
|
3455
|
+
N(o);
|
|
3456
|
+
var A = U(o, 2);
|
|
3457
3457
|
ni(A, 21, () => J(ce).regions, Qr, (e, t) => {
|
|
3458
3458
|
let n = /* @__PURE__ */ I(() => fe(J(t).hitRect.x + J(t).hitRect.w / 2, J(t).hitRect.y + J(t).hitRect.h / 2));
|
|
3459
3459
|
var r = $a();
|
|
@@ -3514,16 +3514,16 @@ function ao(n, r) {
|
|
|
3514
3514
|
Z(s, (e) => {
|
|
3515
3515
|
J(a) && e(c);
|
|
3516
3516
|
}), X(e, o);
|
|
3517
|
-
}), N(j), N(
|
|
3518
|
-
var M = U(
|
|
3517
|
+
}), N(j), N(r), ji(r, (e) => B(f, e), () => J(f));
|
|
3518
|
+
var M = U(r, 2);
|
|
3519
3519
|
{
|
|
3520
|
-
let e = /* @__PURE__ */ I(() => J(g) === "tray" || J(h) !== null && J(_) === "tray"),
|
|
3520
|
+
let e = /* @__PURE__ */ I(() => J(g) === "tray" || J(h) !== null && J(_) === "tray"), n = /* @__PURE__ */ I(() => t("tray", J(C)));
|
|
3521
3521
|
ia(M, {
|
|
3522
3522
|
get isDropTarget() {
|
|
3523
3523
|
return J(e);
|
|
3524
3524
|
},
|
|
3525
3525
|
get label() {
|
|
3526
|
-
return J(
|
|
3526
|
+
return J(n);
|
|
3527
3527
|
},
|
|
3528
3528
|
children: (e, t) => {
|
|
3529
3529
|
var n = Pr();
|
|
@@ -3570,11 +3570,11 @@ function ao(n, r) {
|
|
|
3570
3570
|
});
|
|
3571
3571
|
}
|
|
3572
3572
|
W((e) => {
|
|
3573
|
-
|
|
3573
|
+
i = _i(r, "", i, {
|
|
3574
3574
|
width: e,
|
|
3575
3575
|
"aspect-ratio": `${J(D).width ?? ""} / ${J(D).height ?? ""}`
|
|
3576
|
-
}), Q(
|
|
3577
|
-
}, [() => ga(J(D), J(se))]), ki(
|
|
3576
|
+
}), Q(o, "viewBox", `0 0 ${J(D).width ?? ""} ${J(D).height ?? ""}`), Q(d, "id", a), Q(d, "width", J(D).width), Q(d, "height", J(D).height), Q(p, "width", J(D).width), Q(p, "height", J(D).height), Q(m, "cx", J(D).circles[0].cx), Q(m, "cy", J(D).circles[0].cy), Q(m, "r", J(D).circles[0].r), Q(b, "cx", J(D).circles[1].cx), Q(b, "cy", J(D).circles[1].cy), Q(b, "r", J(D).circles[1].r), Q(x, "id", c), Q(x, "width", J(D).width), Q(x, "height", J(D).height), Q(S, "width", J(D).width), Q(S, "height", J(D).height), Q(ee, "cx", J(D).circles[1].cx), Q(ee, "cy", J(D).circles[1].cy), Q(ee, "r", J(D).circles[1].r), Q(te, "cx", J(D).circles[0].cx), Q(te, "cy", J(D).circles[0].cy), Q(te, "r", J(D).circles[0].r), Q(re, "id", u), Q(T, "cx", J(D).circles[0].cx), Q(T, "cy", J(D).circles[0].cy), Q(T, "r", J(D).circles[0].r), Q(E, "id", l), Q(E, "width", J(D).width), Q(E, "height", J(D).height), Q(O, "width", J(D).width), Q(O, "height", J(D).height), Q(ue, "cx", J(D).circles[0].cx), Q(ue, "cy", J(D).circles[0].cy), Q(ue, "r", J(D).circles[0].r), Q(de, "cx", J(D).circles[1].cx), Q(de, "cy", J(D).circles[1].cy), Q(de, "r", J(D).circles[1].r), Q(k, "x", J(D).scale), Q(k, "y", J(D).scale), Q(k, "width", J(D).width - 2 * J(D).scale), Q(k, "height", J(D).height - 2 * J(D).scale), Q(k, "stroke-width", 1.5 * J(D).scale), Q(k, "rx", 12 * J(D).scale), Q(Te, "x1", 16 * J(D).scale), Q(Te, "x2", J(D).width - 16 * J(D).scale), Q(Te, "y1", J(ce).outsideStripTop), Q(Te, "y2", J(ce).outsideStripTop), Q(Te, "stroke-width", J(D).scale), Q(Te, "stroke-dasharray", `${4 * J(D).scale} ${6 * J(D).scale}`);
|
|
3577
|
+
}, [() => ga(J(D), J(se))]), ki(r, "clientWidth", (e) => B(y, e)), X(e, n);
|
|
3578
3578
|
};
|
|
3579
3579
|
Z(We, (e) => {
|
|
3580
3580
|
J(ce) ? e(Ke, -1) : e(Ge);
|
|
@@ -3603,7 +3603,7 @@ function ao(n, r) {
|
|
|
3603
3603
|
};
|
|
3604
3604
|
Z(qe, (e) => {
|
|
3605
3605
|
J(Ie) && J(v) && e(Je);
|
|
3606
|
-
}), ji(U(qe, 2), (e) => p = e, () => p), N(Le), ji(Le, (e) => d = e, () => d), Cr("focusout", Le, A), X(
|
|
3606
|
+
}), ji(U(qe, 2), (e) => p = e, () => p), N(Le), ji(Le, (e) => d = e, () => d), Cr("focusout", Le, A), X(e, Le), Qe();
|
|
3607
3607
|
}
|
|
3608
3608
|
wr(["focusout", "click"]), Li(ao, {
|
|
3609
3609
|
model: { type: "Object" },
|
|
@@ -3611,6 +3611,6 @@ wr(["focusout", "click"]), Li(ao, {
|
|
|
3611
3611
|
onSessionChange: {}
|
|
3612
3612
|
}, [], []);
|
|
3613
3613
|
//#endregion
|
|
3614
|
-
export {
|
|
3614
|
+
export { H as A, Ze as B, Pr as C, J as D, Cr as E, B as F, N as H, z as I, R as L, dn as M, U as N, W as O, tn as P, I as R, X as S, wr as T, ie as U, je as V, Z as _, ji as a, Yr as b, Q as c, _i as d, hi as f, Qr as g, ni as h, $ as i, un as j, Cn as k, wi as l, ci as m, Ki as n, ki as o, li as p, Li as r, Si as s, ao as t, Ci as u, Zr as v, Y as w, Vr as x, Xr as y, Qe as z };
|
|
3615
3615
|
|
|
3616
|
-
//# sourceMappingURL=VennClassification-
|
|
3616
|
+
//# sourceMappingURL=VennClassification-B4UWtLFO.js.map
|