@pie-element/venn-classification 0.1.1-next.16 → 0.1.1-next.17

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.
@@ -2658,39 +2658,35 @@ function Sa() {
2658
2658
  let e = window[_a];
2659
2659
  return typeof e?.renderMath == "function" ? e : null;
2660
2660
  }
2661
- function Ca() {
2662
- let e = Hi();
2663
- e && Vi("legacy-renderer-delegation", `window['${_a}'] renders this element's math with MathJax ${e}`);
2664
- }
2665
- var wa = async (e) => {
2661
+ var Ca = async (e) => {
2666
2662
  if (typeof window > "u") return;
2667
2663
  let t = typeof e == "string", n;
2668
2664
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
2669
2665
  let r = Sa();
2670
- return r ? (Ca(), await r.renderMath?.(n)) : await xa()(n), t ? n.innerHTML : void 0;
2666
+ return r ? await r.renderMath?.(n) : await xa()(n), t ? n.innerHTML : void 0;
2671
2667
  };
2672
2668
  //#endregion
2673
2669
  //#region src/delivery/tile-accessible-name.ts
2674
- function Ta(e) {
2670
+ function wa(e) {
2675
2671
  return (e || "").replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
2676
2672
  }
2677
- function Ea(e, n) {
2673
+ function Ta(e, n) {
2678
2674
  let r = (e.imageAlt ?? "").trim();
2679
- return (e.imageUrl ?? "").trim() && r ? r : Ta(e.label ?? "") || t("tileFallbackName", n);
2675
+ return (e.imageUrl ?? "").trim() && r ? r : wa(e.label ?? "") || t("tileFallbackName", n);
2680
2676
  }
2681
- function Da(e, n, r, i) {
2682
- let a = [Ea(e, i), n === null ? t("tileNotPlaced", i) : t("tileInRegion", i, { region: n })];
2677
+ function Ea(e, n, r, i) {
2678
+ let a = [Ta(e, i), n === null ? t("tileNotPlaced", i) : t("tileInRegion", i, { region: n })];
2683
2679
  return r === "correct" && a.push(t("tileCorrect", i)), r === "incorrect" && a.push(t("tileIncorrect", i)), a.join(", ");
2684
2680
  }
2685
2681
  //#endregion
2686
2682
  //#region src/delivery/Tile.svelte
2687
- var Oa = /* @__PURE__ */ Y("<img alt=\"\" class=\"tile-img svelte-1hgaksk\" aria-hidden=\"true\" draggable=\"false\"/>"), ka = /* @__PURE__ */ Y("<span></span>"), Aa = /* @__PURE__ */ Y("<span class=\"venn-badge venn-badge-correct svelte-1hgaksk\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z\"></path></svg></span>"), ja = /* @__PURE__ */ Y("<span class=\"venn-badge venn-badge-incorrect svelte-1hgaksk\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"currentColor\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\"></path></svg></span>"), Ma = /* @__PURE__ */ Y("<button type=\"button\"><span><!> <!></span> <!></button>"), Na = {
2683
+ var Da = /* @__PURE__ */ Y("<img alt=\"\" class=\"tile-img svelte-1hgaksk\" aria-hidden=\"true\" draggable=\"false\"/>"), Oa = /* @__PURE__ */ Y("<span></span>"), ka = /* @__PURE__ */ Y("<span class=\"venn-badge venn-badge-correct svelte-1hgaksk\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z\"></path></svg></span>"), Aa = /* @__PURE__ */ Y("<span class=\"venn-badge venn-badge-incorrect svelte-1hgaksk\" aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"currentColor\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\"></path></svg></span>"), ja = /* @__PURE__ */ Y("<button type=\"button\"><span><!> <!></span> <!></button>"), Ma = {
2688
2684
  hash: "svelte-1hgaksk",
2689
2685
  code: ".venn-tile.svelte-1hgaksk {position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:8px 14px;border:1.5px solid #334155;border-radius:10px;background:#ffffff;color:#0f172a;font-size:14px;font-weight:500;box-shadow:0 1px 2px rgba(15, 23, 42, 0.06);cursor:grab;touch-action:none;user-select:none;transition:box-shadow 120ms ease, transform 120ms ease, background 120ms ease;}.venn-tile.svelte-1hgaksk:focus-visible,\n .venn-tile.focused.svelte-1hgaksk {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}.venn-tile.svelte-1hgaksk:hover:not(:disabled) {background:#f8fafc;}.venn-tile.held.svelte-1hgaksk {cursor:grabbing;box-shadow:0 6px 18px rgba(15, 23, 42, 0.18);transform:translateY(-1px);background:#eef2ff;}.venn-tile.invisible.svelte-1hgaksk {visibility:hidden;}.venn-tile.ghost.svelte-1hgaksk {pointer-events:none;cursor:grabbing;box-shadow:0 10px 24px rgba(15, 23, 42, 0.22);transform:rotate(-1.5deg);background:#ffffff;opacity:0.96;}.venn-tile.correct.svelte-1hgaksk {border-color:#0ea449;}.venn-tile.incorrect.svelte-1hgaksk {border-color:#bf0d00;}.venn-tile.svelte-1hgaksk:disabled {cursor:default;}.tile-body.svelte-1hgaksk {display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;pointer-events:none;max-width:220px;}.tile-body-image.svelte-1hgaksk {flex-direction:column;gap:4px;}.tile-img.svelte-1hgaksk {width:40px;height:40px;object-fit:contain;flex-shrink:0;}.tile-label.svelte-1hgaksk {pointer-events:none;text-align:center;line-height:1.25;word-break:break-word;}.tile-label-below.svelte-1hgaksk {font-size:12px;font-weight:600;}.venn-tile.fit.svelte-1hgaksk {box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;padding:6px 10px;}.fit.svelte-1hgaksk .tile-body:where(.svelte-1hgaksk) {max-width:100%;max-height:100%;overflow:hidden;}.fit.svelte-1hgaksk .tile-label:where(.svelte-1hgaksk) {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;}.fit.svelte-1hgaksk .tile-label-below:where(.svelte-1hgaksk) {-webkit-line-clamp:1;line-clamp:1;}.venn-badge.svelte-1hgaksk {position:absolute;top:-8px;right:-8px;width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#ffffff;}.venn-badge-correct.svelte-1hgaksk {background:#0ea449;}.venn-badge-incorrect.svelte-1hgaksk {background:#bf0d00;}\n @media (prefers-reduced-motion: reduce) {.venn-tile.svelte-1hgaksk {transition:none;}\n }"
2690
2686
  };
2691
- function Pa(e, t) {
2692
- Xe(t, !0), si(e, Na);
2693
- let n = $(t, "id", 7), r = $(t, "label", 7), i = $(t, "imageUrl", 7), a = $(t, "imageAlt", 7), o = $(t, "name", 7), s = $(t, "language", 7), c = $(t, "correctness", 7, "neutral"), l = $(t, "held", 7, !1), u = $(t, "invisible", 7, !1), d = $(t, "ghost", 7, !1), f = $(t, "disabled", 7, !1), p = $(t, "focused", 7, !1), m = $(t, "fit", 7, !1), h = $(t, "onpointerdown", 7), g = $(t, "onkeydown", 7), _ = $(t, "onkeyup", 7), v = $(t, "onfocus", 7), y = $(t, "onclick", 7), b = /* @__PURE__ */ I(() => o() ?? Ea({
2687
+ function Na(e, t) {
2688
+ Xe(t, !0), si(e, Ma);
2689
+ let n = $(t, "id", 7), r = $(t, "label", 7), i = $(t, "imageUrl", 7), a = $(t, "imageAlt", 7), o = $(t, "name", 7), s = $(t, "language", 7), c = $(t, "correctness", 7, "neutral"), l = $(t, "held", 7, !1), u = $(t, "invisible", 7, !1), d = $(t, "ghost", 7, !1), f = $(t, "disabled", 7, !1), p = $(t, "focused", 7, !1), m = $(t, "fit", 7, !1), h = $(t, "onpointerdown", 7), g = $(t, "onkeydown", 7), _ = $(t, "onkeyup", 7), v = $(t, "onfocus", 7), y = $(t, "onclick", 7), b = /* @__PURE__ */ I(() => o() ?? Ta({
2694
2690
  label: r(),
2695
2691
  imageUrl: i(),
2696
2692
  imageAlt: a()
@@ -2804,19 +2800,19 @@ function Pa(e, t) {
2804
2800
  set onclick(e) {
2805
2801
  y(e), R();
2806
2802
  }
2807
- }, C = Ma();
2803
+ }, C = ja();
2808
2804
  let w;
2809
2805
  var te = H(C);
2810
2806
  let ne;
2811
2807
  var re = H(te), ie = (e) => {
2812
- var t = Oa();
2808
+ var t = Da();
2813
2809
  W(() => Q(t, "src", i())), X(e, t);
2814
2810
  };
2815
2811
  Z(re, (e) => {
2816
2812
  J(x) && e(ie);
2817
2813
  });
2818
2814
  var T = U(re, 2), E = (e) => {
2819
- var t = ka();
2815
+ var t = Oa();
2820
2816
  let n;
2821
2817
  oi(t, r, !0), N(t), W(() => n = pi(t, 1, "tile-label svelte-1hgaksk", null, n, { "tile-label-below": J(x) })), X(e, t);
2822
2818
  };
@@ -2824,9 +2820,9 @@ function Pa(e, t) {
2824
2820
  J(S) && e(E);
2825
2821
  }), N(te);
2826
2822
  var ae = U(te, 2), oe = (e) => {
2827
- X(e, Aa());
2823
+ X(e, ka());
2828
2824
  }, se = (e) => {
2829
- X(e, ja());
2825
+ X(e, Aa());
2830
2826
  };
2831
2827
  return Z(ae, (e) => {
2832
2828
  c() === "correct" ? e(oe) : c() === "incorrect" && e(se, 1);
@@ -2857,7 +2853,7 @@ Sr([
2857
2853
  "keydown",
2858
2854
  "keyup",
2859
2855
  "click"
2860
- ]), Li(Pa, {
2856
+ ]), Li(Na, {
2861
2857
  id: {},
2862
2858
  label: {},
2863
2859
  imageUrl: {},
@@ -2879,12 +2875,12 @@ Sr([
2879
2875
  }, [], [], { mode: "open" });
2880
2876
  //#endregion
2881
2877
  //#region src/delivery/Tray.svelte
2882
- var Fa = /* @__PURE__ */ Y("<div role=\"region\" data-region-key=\"tray\"><div class=\"tray-label svelte-1ogsh8s\"> </div> <div class=\"tray-items svelte-1ogsh8s\"><!></div></div>"), Ia = {
2878
+ var Pa = /* @__PURE__ */ Y("<div role=\"region\" data-region-key=\"tray\"><div class=\"tray-label svelte-1ogsh8s\"> </div> <div class=\"tray-items svelte-1ogsh8s\"><!></div></div>"), Fa = {
2883
2879
  hash: "svelte-1ogsh8s",
2884
2880
  code: ".venn-tray.svelte-1ogsh8s {border:1.5px dashed #94a3b8;border-radius:12px;padding:14px 16px;background:#f8fafc;min-height:120px;transition:background 120ms ease, border-color 120ms ease;}.venn-tray.drop-target.svelte-1ogsh8s {background:#e0f2fe;border-color:#0ea5e9;}.venn-tray.focused.svelte-1ogsh8s {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}.tray-label.svelte-1ogsh8s {font-size:12px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:8px;}.tray-items.svelte-1ogsh8s {display:flex;flex-wrap:wrap;gap:10px;}\n @media (prefers-reduced-motion: reduce) {.venn-tray.svelte-1ogsh8s {transition:none;}\n }"
2885
2881
  };
2886
- function La(e, t) {
2887
- Xe(t, !0), si(e, Ia);
2882
+ function Ia(e, t) {
2883
+ Xe(t, !0), si(e, Fa);
2888
2884
  let n = $(t, "isDropTarget", 7, !1), r = $(t, "focused", 7, !1), i = $(t, "label", 7), a = $(t, "onpointerenter", 7), o = $(t, "onpointerleave", 7), s = $(t, "children", 7);
2889
2885
  var c = {
2890
2886
  get isDropTarget() {
@@ -2923,7 +2919,7 @@ function La(e, t) {
2923
2919
  set children(e) {
2924
2920
  s(e), R();
2925
2921
  }
2926
- }, l = Fa();
2922
+ }, l = Pa();
2927
2923
  let u;
2928
2924
  var d = H(l), f = ln(d, !0), p = U(d, 2), m = H(p), h = (e) => {
2929
2925
  var t = Mr();
@@ -2942,7 +2938,7 @@ function La(e, t) {
2942
2938
  o()?.apply(this, e);
2943
2939
  }), X(e, l), Ze(c);
2944
2940
  }
2945
- Li(La, {
2941
+ Li(Ia, {
2946
2942
  isDropTarget: {},
2947
2943
  focused: {},
2948
2944
  label: {},
@@ -2952,12 +2948,12 @@ Li(La, {
2952
2948
  }, [], [], { mode: "open" });
2953
2949
  //#endregion
2954
2950
  //#region src/delivery/TeacherInstructions.svelte
2955
- var Ra = /* @__PURE__ */ Y("<div class=\"teacher-instructions pie-teacher-instructions svelte-1jhejbv\"><button type=\"button\" class=\"teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv\"> </button> <div class=\"teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv\"></div></div>"), za = {
2951
+ var La = /* @__PURE__ */ Y("<div class=\"teacher-instructions pie-teacher-instructions svelte-1jhejbv\"><button type=\"button\" class=\"teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv\"> </button> <div class=\"teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv\"></div></div>"), Ra = {
2956
2952
  hash: "svelte-1jhejbv",
2957
2953
  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;}"
2958
2954
  };
2959
- function Ba(e, t) {
2960
- Xe(t, !0), si(e, za);
2955
+ function za(e, t) {
2956
+ Xe(t, !0), si(e, Ra);
2961
2957
  let n = $(t, "html", 7), r = $(t, "language", 7), i = /* @__PURE__ */ z(!1), a = `venn-teacher-instructions-${Math.random().toString(36).slice(2, 10)}`;
2962
2958
  var o = {
2963
2959
  get html() {
@@ -2972,37 +2968,37 @@ function Ba(e, t) {
2972
2968
  set language(e) {
2973
2969
  r(e), R();
2974
2970
  }
2975
- }, c = Ra(), l = H(c), u = ln(l, !0), d = U(l, 2);
2971
+ }, c = La(), l = H(c), u = ln(l, !0), d = U(l, 2);
2976
2972
  return oi(d, n, !0), N(d), N(c), W((e) => {
2977
2973
  Q(l, "aria-expanded", J(i)), Q(l, "aria-controls", a), zr(u, e), Q(d, "id", a), Q(d, "hidden", !J(i));
2978
2974
  }, [() => s(J(i) ? "hideTeacherInstructions" : "showTeacherInstructions", r())]), xr("click", l, () => B(i, !J(i))), X(e, c), Ze(o);
2979
2975
  }
2980
- Sr(["click"]), Li(Ba, {
2976
+ Sr(["click"]), Li(za, {
2981
2977
  html: {},
2982
2978
  language: {}
2983
2979
  }, [], [], { mode: "open" });
2984
2980
  //#endregion
2985
2981
  //#region src/delivery/layout.ts
2986
- var Va = {
2982
+ var Ba = {
2987
2983
  w: 120,
2988
2984
  h: 52
2989
- }, Ha = {
2985
+ }, Va = {
2990
2986
  w: 120,
2991
2987
  h: 84
2992
- }, Ua = .6;
2993
- function Wa(e) {
2988
+ }, Ha = .6;
2989
+ function Ua(e) {
2994
2990
  return Math.min(1, 44 / Math.min(e.w, e.h));
2995
2991
  }
2996
- var Ga = {
2992
+ var Wa = {
2997
2993
  side: 24,
2998
2994
  top: 40,
2999
2995
  radius: 236,
3000
2996
  centerDistance: 200,
3001
2997
  outsideGap: 12,
3002
2998
  outsideStripHeight: 136
3003
- }, Ka = .05;
3004
- function qa(e = 1, t = 0) {
3005
- let n = Ga.side * e, r = Ga.radius * e, i = Ga.centerDistance * e, a = Ga.top * e + r, o = Ga.outsideGap * e, s = Math.max(Ga.outsideStripHeight * e, t);
2999
+ }, Ga = .05;
3000
+ function Ka(e = 1, t = 0) {
3001
+ let n = Wa.side * e, r = Wa.radius * e, i = Wa.centerDistance * e, a = Wa.top * e + r, o = Wa.outsideGap * e, s = Math.max(Wa.outsideStripHeight * e, t);
3006
3002
  return {
3007
3003
  width: 2 * n + 2 * r + i,
3008
3004
  height: a + r + o + s,
@@ -3020,37 +3016,37 @@ function qa(e = 1, t = 0) {
3020
3016
  }]
3021
3017
  };
3022
3018
  }
3023
- function Ja() {
3024
- return qa();
3019
+ function qa() {
3020
+ return Ka();
3025
3021
  }
3026
- function Ya(e, t) {
3027
- return `min(100%, max(min(720px, ${Ua * 100 * e.width / e.height}vh), ${e.width * Wa(t)}px))`;
3022
+ function Ja(e, t) {
3023
+ return `min(100%, max(min(720px, ${Ha * 100 * e.width / e.height}vh), ${e.width * Ua(t)}px))`;
3028
3024
  }
3029
- function Xa(e, t, n) {
3030
- return e > 0 ? Math.max(Wa(n), Math.min(1, e / t.width)) : 1;
3025
+ function Ya(e, t, n) {
3026
+ return e > 0 ? Math.max(Ua(n), Math.min(1, e / t.width)) : 1;
3031
3027
  }
3032
- function Za(e, t) {
3028
+ function Xa(e, t) {
3033
3029
  return Math.max(0, Math.floor((e + 8) / (t.w + 8) + 1e-9));
3034
3030
  }
3035
- function Qa(e, t) {
3031
+ function Za(e, t) {
3036
3032
  return t > e.r ? -1 : Math.sqrt(e.r * e.r - t * t);
3037
3033
  }
3038
- function $a(e, t, n) {
3039
- let r = Qa(e, Math.max(Math.abs(t - e.cy), Math.abs(n - e.cy)));
3034
+ function Qa(e, t, n) {
3035
+ let r = Za(e, Math.max(Math.abs(t - e.cy), Math.abs(n - e.cy)));
3040
3036
  return r < 0 ? null : [e.cx - r, e.cx + r];
3041
3037
  }
3042
- function eo(e, t, n) {
3043
- return Qa(e, t <= e.cy && e.cy <= n ? 0 : Math.min(Math.abs(t - e.cy), Math.abs(n - e.cy)));
3038
+ function $a(e, t, n) {
3039
+ return Za(e, t <= e.cy && e.cy <= n ? 0 : Math.min(Math.abs(t - e.cy), Math.abs(n - e.cy)));
3044
3040
  }
3045
- function to(e, t, n, r, i) {
3046
- let a = $a(t, r, i), o = $a(n, r, i), s, c;
3041
+ function eo(e, t, n, r, i) {
3042
+ let a = Qa(t, r, i), o = Qa(n, r, i), s, c;
3047
3043
  if (e === "0") {
3048
3044
  if (!a) return null;
3049
- let e = eo(n, r, i);
3045
+ let e = $a(n, r, i);
3050
3046
  [s, c] = [a[0], e < 0 ? a[1] : Math.min(a[1], n.cx - e)];
3051
3047
  } else if (e === "1") {
3052
3048
  if (!o) return null;
3053
- let e = eo(t, r, i);
3049
+ let e = $a(t, r, i);
3054
3050
  [s, c] = [e < 0 ? o[0] : Math.max(o[0], t.cx + e), o[1]];
3055
3051
  } else {
3056
3052
  if (!a || !o) return null;
@@ -3058,14 +3054,14 @@ function to(e, t, n, r, i) {
3058
3054
  }
3059
3055
  return c > s ? [s, c] : null;
3060
3056
  }
3061
- function no(e, t, n, r) {
3057
+ function to(e, t, n, r) {
3062
3058
  let i = r.h + 8, a = t.cy, o = Math.max(t.r, n.r);
3063
3059
  return [0, .5].map((s) => {
3064
3060
  let c = [], l = Math.ceil(o / i) + 1;
3065
3061
  for (let o = -l; o <= l; o++) {
3066
- let l = a + (o + s) * i, u = to(e, t, n, l - r.h / 2 - 6, l + r.h / 2 + 6);
3062
+ let l = a + (o + s) * i, u = eo(e, t, n, l - r.h / 2 - 6, l + r.h / 2 + 6);
3067
3063
  if (!u) continue;
3068
- let d = u[0] + 6, f = u[1] - 6, p = Za(f - d, r);
3064
+ let d = u[0] + 6, f = u[1] - 6, p = Xa(f - d, r);
3069
3065
  p > 0 && c.push({
3070
3066
  y: l,
3071
3067
  lo: d,
@@ -3076,11 +3072,11 @@ function no(e, t, n, r) {
3076
3072
  return c;
3077
3073
  });
3078
3074
  }
3079
- function ro(e) {
3075
+ function no(e) {
3080
3076
  return e.reduce((e, t) => e + t.n, 0);
3081
3077
  }
3082
- function io(e, t, n) {
3083
- let r = e.width - 6, i = Za(r - 6, n), a = n.h + 8, o = e.height - t, s = i * Math.max(0, Math.floor((o - 12 + 8) / a + 1e-9)), c = {
3078
+ function ro(e, t, n) {
3079
+ let r = e.width - 6, i = Xa(r - 6, n), a = n.h + 8, o = e.height - t, s = i * Math.max(0, Math.floor((o - 12 + 8) / a + 1e-9)), c = {
3084
3080
  x: e.width / 2,
3085
3081
  y: t + o / 2
3086
3082
  };
@@ -3089,7 +3085,7 @@ function io(e, t, n) {
3089
3085
  slots: (e) => {
3090
3086
  if (e <= 0) return [];
3091
3087
  let l = Math.min(e, s), u = i > 0 ? Math.ceil(l / i) : 0, d = t + (o - (u * a - 8)) / 2;
3092
- return lo(co(Array.from({ length: u }, (e, t) => ({
3088
+ return co(so(Array.from({ length: u }, (e, t) => ({
3093
3089
  y: d + n.h / 2 + t * a,
3094
3090
  lo: 6,
3095
3091
  hi: r,
@@ -3098,20 +3094,20 @@ function io(e, t, n) {
3098
3094
  }
3099
3095
  };
3100
3096
  }
3101
- function ao(e) {
3097
+ function io(e) {
3102
3098
  return {
3103
3099
  x: e.x + e.w / 2,
3104
3100
  y: e.y + e.h / 2
3105
3101
  };
3106
3102
  }
3107
- function oo(e, t, n) {
3103
+ function ao(e, t, n) {
3108
3104
  let r = t * n.w + (t - 1) * 8, i = (e.lo + e.hi) / 2 - r / 2 + n.w / 2;
3109
3105
  return Array.from({ length: t }, (t, r) => ({
3110
3106
  x: i + r * (n.w + 8),
3111
3107
  y: e.y
3112
3108
  }));
3113
3109
  }
3114
- function so(e, t, n) {
3110
+ function oo(e, t, n) {
3115
3111
  let r = [...e].sort((e, n) => Math.abs(e.y - t) - Math.abs(n.y - t) || e.y - n.y), i = [], a = 0;
3116
3112
  for (let e of r) {
3117
3113
  if (a >= n) break;
@@ -3119,39 +3115,39 @@ function so(e, t, n) {
3119
3115
  }
3120
3116
  return i.sort((e, t) => e.y - t.y);
3121
3117
  }
3122
- function co(e, t, n) {
3118
+ function so(e, t, n) {
3123
3119
  let r = [], i = t;
3124
3120
  for (let t of e) {
3125
3121
  let e = Math.min(t.n, i);
3126
- r.push(...oo(t, e, n)), i -= e;
3122
+ r.push(...ao(t, e, n)), i -= e;
3127
3123
  }
3128
3124
  return r;
3129
3125
  }
3130
- function lo(e, t, n) {
3126
+ function co(e, t, n) {
3131
3127
  let r = e[e.length - 1] ?? n;
3132
3128
  for (; e.length < t;) e.push({ ...r });
3133
3129
  return e;
3134
3130
  }
3135
- function uo(e, t, n, r) {
3136
- let i = Math.max(...e.map(ro));
3131
+ function lo(e, t, n, r) {
3132
+ let i = Math.max(...e.map(no));
3137
3133
  return (a) => {
3138
3134
  if (a <= 0) return [];
3139
3135
  let o = Math.min(a, i), s = null, c = [Infinity, Infinity];
3140
3136
  for (let n of e) {
3141
- if (ro(n) < o) continue;
3142
- let e = so(n, t, o), r = Math.abs(e.reduce((e, t) => e + t.y, 0) / e.length - t), i = [e.length, r];
3137
+ if (no(n) < o) continue;
3138
+ let e = oo(n, t, o), r = Math.abs(e.reduce((e, t) => e + t.y, 0) / e.length - t), i = [e.length, r];
3143
3139
  (i[0] < c[0] || i[0] === c[0] && i[1] < c[1] - 1e-9) && (s = e, c = i);
3144
3140
  }
3145
- return lo(s ? co(s, o, n) : [], a, r);
3141
+ return co(s ? so(s, o, n) : [], a, r);
3146
3142
  };
3147
3143
  }
3148
- function fo(e, t, n) {
3144
+ function uo(e, t, n) {
3149
3145
  let r = t.cy, i = 0, a = Math.min(t.r, n.r);
3150
3146
  for (let o = 0; o < 40; o++) {
3151
- let o = (i + a) / 2, s = to(e, t, n, r - o, r + o);
3147
+ let o = (i + a) / 2, s = eo(e, t, n, r - o, r + o);
3152
3148
  s && s[1] - s[0] >= 2 * o ? i = o : a = o;
3153
3149
  }
3154
- let o = to(e, t, n, r - i, r + i) ?? [0, 0];
3150
+ let o = eo(e, t, n, r - i, r + i) ?? [0, 0];
3155
3151
  return {
3156
3152
  x: o[0] + 1,
3157
3153
  y: r - i + 1,
@@ -3159,26 +3155,26 @@ function fo(e, t, n) {
3159
3155
  h: 2 * i - 2
3160
3156
  };
3161
3157
  }
3162
- function po(e, t, n) {
3158
+ function fo(e, t, n) {
3163
3159
  let [r, i] = t.circles;
3164
- return Math.max(...no(e, r, i, n).map(ro));
3160
+ return Math.max(...to(e, r, i, n).map(no));
3165
3161
  }
3166
- var mo = [
3162
+ var po = [
3167
3163
  "0",
3168
3164
  "0,1",
3169
3165
  "1"
3170
3166
  ];
3171
- function ho(e, t = Va) {
3172
- let n = qa();
3167
+ function mo(e, t = Ba) {
3168
+ let n = Ka();
3173
3169
  for (let r = 1;; r++) {
3174
3170
  let i = n;
3175
- if (mo.every((n) => po(n, i, t) >= (e[n] ?? 0))) break;
3176
- n = qa(1 + r * Ka);
3171
+ if (po.every((n) => fo(n, i, t) >= (e[n] ?? 0))) break;
3172
+ n = Ka(1 + r * Ga);
3177
3173
  }
3178
- let r = e[""] ?? 0, i = Za(n.width - 12, t), a = Math.ceil(r / i) * (t.h + 8) - 8 + 12;
3179
- return a > n.outsideStripHeight ? qa(n.scale, a) : n;
3174
+ let r = e[""] ?? 0, i = Xa(n.width - 12, t), a = Math.ceil(r / i) * (t.h + 8) - 8 + 12;
3175
+ return a > n.outsideStripHeight ? Ka(n.scale, a) : n;
3180
3176
  }
3181
- function go(e, t = Ja(), n = Va) {
3177
+ function ho(e, t = qa(), n = Ba) {
3182
3178
  if (e.circles?.length !== 2) throw Error(`buildLayout2Set requires exactly 2 circles (got ${e.circles?.length ?? 0})`);
3183
3179
  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) => {
3184
3180
  let a = r - e, o = i - t;
@@ -3194,11 +3190,11 @@ function go(e, t = Ja(), n = Va) {
3194
3190
  y: u,
3195
3191
  w: t.width,
3196
3192
  h: t.height - u
3197
- }, {capacity: g, slots: _} = io(t, u, n);
3193
+ }, {capacity: g, slots: _} = ro(t, u, n);
3198
3194
  else if (c === "0" || c === "1" || c === "0,1") {
3199
- 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 = fo(c, a, s);
3200
- let e = no(c, a, s, n);
3201
- g = Math.max(...e.map(ro)), _ = uo(e, a.cy, n, ao(h));
3195
+ 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 = uo(c, a, s);
3196
+ let e = to(c, a, s, n);
3197
+ g = Math.max(...e.map(no)), _ = lo(e, a.cy, n, io(h));
3202
3198
  } else d = () => !1, h = {
3203
3199
  x: 0,
3204
3200
  y: 0,
@@ -3220,7 +3216,7 @@ function go(e, t = Ja(), n = Va) {
3220
3216
  outsideStripTop: u
3221
3217
  };
3222
3218
  }
3223
- function _o(e, t, n) {
3219
+ function go(e, t, n) {
3224
3220
  for (let r of [
3225
3221
  "0,1",
3226
3222
  "0",
@@ -3234,7 +3230,7 @@ function _o(e, t, n) {
3234
3230
  }
3235
3231
  //#endregion
3236
3232
  //#region src/delivery/dnd.ts
3237
- function vo({ model: t, session: r, tileId: i, placement: o }) {
3233
+ function _o({ model: t, session: r, tileId: i, placement: o }) {
3238
3234
  let s = a(r, t), c = {
3239
3235
  ...s,
3240
3236
  placements: {
@@ -3244,19 +3240,19 @@ function vo({ model: t, session: r, tileId: i, placement: o }) {
3244
3240
  };
3245
3241
  return c.completed = n(t, c), c;
3246
3242
  }
3247
- function yo(t, n) {
3243
+ function vo(t, n) {
3248
3244
  let r = t?.placements?.[n];
3249
3245
  return Array.isArray(r) ? e(r) : null;
3250
3246
  }
3251
- function bo(e, t, n) {
3252
- let r = yo(e, t);
3247
+ function yo(e, t, n) {
3248
+ let r = vo(e, t);
3253
3249
  return r === null || n === null ? r === n : c(r, n);
3254
3250
  }
3255
- function xo(e, t) {
3251
+ function bo(e, t) {
3256
3252
  let n = t?.placements ?? {};
3257
3253
  return (e.tiles || []).filter((e) => n[e.id] == null);
3258
3254
  }
3259
- function So(t, n) {
3255
+ function xo(t, n) {
3260
3256
  let r = n?.placements ?? {}, i = {};
3261
3257
  for (let n of t.tiles || []) {
3262
3258
  let t = r[n.id];
@@ -3268,12 +3264,12 @@ function So(t, n) {
3268
3264
  }
3269
3265
  //#endregion
3270
3266
  //#region src/delivery/VennClassification.svelte
3271
- var Co = /* @__PURE__ */ Y("<div class=\"venn-prompt svelte-gkcqor\"></div>"), wo = /* @__PURE__ */ jr("<svg class=\"toggle-icon svelte-gkcqor\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-283 359 34 35\" aria-hidden=\"true\"><circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"#bce2ff\"></circle><path d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\" fill=\"#bce2ff\"></path><polygon points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\" fill=\"#1a9cff\"></polygon></svg>"), To = /* @__PURE__ */ jr("<svg class=\"toggle-icon svelte-gkcqor\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-129.5 127 34 35\" aria-hidden=\"true\"><path style=\"fill: #D0CAC5; stroke: #E6E3E0; stroke-width: 0.75; stroke-miterlimit: 10;\" d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\"></path><path style=\"fill: #B3ABA4; stroke: #CDC7C2; stroke-width: 0.5; stroke-miterlimit: 10;\" d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"></path><circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"white\"></circle><path d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\" fill=\"#bce2ff\"></path><polygon points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\" fill=\"#1a9cff\"></polygon></svg>"), Eo = /* @__PURE__ */ Y("<button type=\"button\" class=\"toggle-correct svelte-gkcqor\"><!> <span class=\"toggle-label svelte-gkcqor\"> </span></button>"), Do = /* @__PURE__ */ Y("<div class=\"venn-error svelte-gkcqor\" role=\"alert\"> </div>"), Oo = /* @__PURE__ */ jr("<circle fill=\"rgba(14, 165, 233, 0.12)\"></circle>"), ko = /* @__PURE__ */ jr("<rect x=\"0\" y=\"0\"></rect>"), Ao = /* @__PURE__ */ jr("<circle></circle>"), jo = /* @__PURE__ */ jr("<circle fill=\"none\" stroke=\"#1e293b\"></circle>"), Mo = /* @__PURE__ */ jr("<text font-weight=\"600\" fill=\"#0f172a\"> </text>"), No = /* @__PURE__ */ Y("<div class=\"region-aria svelte-gkcqor\" role=\"region\"></div>"), Po = /* @__PURE__ */ Y("<div class=\"tile-wrapper svelte-gkcqor\"><!></div>"), Fo = /* @__PURE__ */ Y("<div class=\"venn-diagram svelte-gkcqor\"><svg preserveAspectRatio=\"xMidYMid meet\" aria-hidden=\"true\" class=\"svelte-gkcqor\"><defs><mask maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\"><rect x=\"0\" y=\"0\" fill=\"black\"></rect><circle fill=\"white\"></circle><circle fill=\"black\"></circle></mask><mask maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\"><rect x=\"0\" y=\"0\" fill=\"black\"></rect><circle fill=\"white\"></circle><circle fill=\"black\"></circle></mask><clipPath clipPathUnits=\"userSpaceOnUse\"><circle></circle></clipPath><mask maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\"><rect x=\"0\" y=\"0\" fill=\"white\"></rect><circle fill=\"black\"></circle><circle fill=\"black\"></circle></mask></defs><rect fill=\"#ffffff\" stroke=\"#cbd5e1\"></rect><!><!><!><!><!><!><!><line stroke=\"#cbd5e1\"></line></svg> <div class=\"region-labels svelte-gkcqor\" aria-hidden=\"false\"></div> <div class=\"placed-tiles svelte-gkcqor\"></div></div> <!>", 1), Io = /* @__PURE__ */ Y("<div class=\"drag-ghost svelte-gkcqor\"><!></div>"), Lo = /* @__PURE__ */ Y("<div class=\"venn-root svelte-gkcqor\"><!> <!> <!> <!> <!> <div class=\"sr-only svelte-gkcqor\" aria-live=\"polite\" aria-atomic=\"true\"></div></div>"), Ro = {
3267
+ var So = /* @__PURE__ */ Y("<div class=\"venn-prompt svelte-gkcqor\"></div>"), Co = /* @__PURE__ */ jr("<svg class=\"toggle-icon svelte-gkcqor\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-283 359 34 35\" aria-hidden=\"true\"><circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"#bce2ff\"></circle><path d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\" fill=\"#bce2ff\"></path><polygon points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\" fill=\"#1a9cff\"></polygon></svg>"), wo = /* @__PURE__ */ jr("<svg class=\"toggle-icon svelte-gkcqor\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-129.5 127 34 35\" aria-hidden=\"true\"><path style=\"fill: #D0CAC5; stroke: #E6E3E0; stroke-width: 0.75; stroke-miterlimit: 10;\" d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\"></path><path style=\"fill: #B3ABA4; stroke: #CDC7C2; stroke-width: 0.5; stroke-miterlimit: 10;\" d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"></path><circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"white\"></circle><path d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\" fill=\"#bce2ff\"></path><polygon points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\" fill=\"#1a9cff\"></polygon></svg>"), To = /* @__PURE__ */ Y("<button type=\"button\" class=\"toggle-correct svelte-gkcqor\"><!> <span class=\"toggle-label svelte-gkcqor\"> </span></button>"), Eo = /* @__PURE__ */ Y("<div class=\"venn-error svelte-gkcqor\" role=\"alert\"> </div>"), Do = /* @__PURE__ */ jr("<circle fill=\"rgba(14, 165, 233, 0.12)\"></circle>"), Oo = /* @__PURE__ */ jr("<rect x=\"0\" y=\"0\"></rect>"), ko = /* @__PURE__ */ jr("<circle></circle>"), Ao = /* @__PURE__ */ jr("<circle fill=\"none\" stroke=\"#1e293b\"></circle>"), jo = /* @__PURE__ */ jr("<text font-weight=\"600\" fill=\"#0f172a\"> </text>"), Mo = /* @__PURE__ */ Y("<div class=\"region-aria svelte-gkcqor\" role=\"region\"></div>"), No = /* @__PURE__ */ Y("<div class=\"tile-wrapper svelte-gkcqor\"><!></div>"), Po = /* @__PURE__ */ Y("<div class=\"venn-diagram svelte-gkcqor\"><svg preserveAspectRatio=\"xMidYMid meet\" aria-hidden=\"true\" class=\"svelte-gkcqor\"><defs><mask maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\"><rect x=\"0\" y=\"0\" fill=\"black\"></rect><circle fill=\"white\"></circle><circle fill=\"black\"></circle></mask><mask maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\"><rect x=\"0\" y=\"0\" fill=\"black\"></rect><circle fill=\"white\"></circle><circle fill=\"black\"></circle></mask><clipPath clipPathUnits=\"userSpaceOnUse\"><circle></circle></clipPath><mask maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\"><rect x=\"0\" y=\"0\" fill=\"white\"></rect><circle fill=\"black\"></circle><circle fill=\"black\"></circle></mask></defs><rect fill=\"#ffffff\" stroke=\"#cbd5e1\"></rect><!><!><!><!><!><!><!><line stroke=\"#cbd5e1\"></line></svg> <div class=\"region-labels svelte-gkcqor\" aria-hidden=\"false\"></div> <div class=\"placed-tiles svelte-gkcqor\"></div></div> <!>", 1), Fo = /* @__PURE__ */ Y("<div class=\"drag-ghost svelte-gkcqor\"><!></div>"), Io = /* @__PURE__ */ Y("<div class=\"venn-root svelte-gkcqor\"><!> <!> <!> <!> <!> <div class=\"sr-only svelte-gkcqor\" aria-live=\"polite\" aria-atomic=\"true\"></div></div>"), Lo = {
3272
3268
  hash: "svelte-gkcqor",
3273
3269
  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;}"
3274
3270
  };
3275
- function zo(e, n) {
3276
- Xe(n, !0), si(e, Ro);
3271
+ function Ro(e, n) {
3272
+ Xe(n, !0), si(e, Lo);
3277
3273
  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(() => ({
3278
3274
  circles: J(S),
3279
3275
  tiles: n?.model?.tiles ?? [],
@@ -3281,7 +3277,7 @@ function zo(e, n) {
3281
3277
  language: J(C),
3282
3278
  scoringPolicy: "partialPerTile",
3283
3279
  promptEnabled: !0
3284
- })), 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(() => So(J(w), J(E))), oe = /* @__PURE__ */ I(() => xo(J(w), J(E))), se = /* @__PURE__ */ I(() => (J(w).tiles ?? []).some((e) => (e.imageUrl ?? "").trim()) ? Ha : Va), D = /* @__PURE__ */ I(() => ho(Object.fromEntries(Object.entries(J(ae)).map(([e, t]) => [e, t.length])), J(se))), ce = /* @__PURE__ */ I(() => J(ee) ? go(J(w), J(D), J(se)) : null), le = /* @__PURE__ */ I(() => Xa(J(y), J(D), J(se))), O = /* @__PURE__ */ I(() => [
3280
+ })), 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(() => xo(J(w), J(E))), oe = /* @__PURE__ */ I(() => bo(J(w), J(E))), se = /* @__PURE__ */ I(() => (J(w).tiles ?? []).some((e) => (e.imageUrl ?? "").trim()) ? Va : Ba), D = /* @__PURE__ */ I(() => mo(Object.fromEntries(Object.entries(J(ae)).map(([e, t]) => [e, t.length])), J(se))), ce = /* @__PURE__ */ I(() => J(ee) ? ho(J(w), J(D), J(se)) : null), le = /* @__PURE__ */ I(() => Ya(J(y), J(D), J(se))), O = /* @__PURE__ */ I(() => [
3285
3281
  "0",
3286
3282
  "0,1",
3287
3283
  "1",
@@ -3325,7 +3321,7 @@ function zo(e, n) {
3325
3321
  };
3326
3322
  }
3327
3323
  function me(e, t) {
3328
- let r = vo({
3324
+ let r = _o({
3329
3325
  model: J(w),
3330
3326
  session: n?.session,
3331
3327
  tileId: e,
@@ -3349,8 +3345,8 @@ function zo(e, n) {
3349
3345
  b?.(), J(h) !== null && ve();
3350
3346
  }
3351
3347
  function be(e, r) {
3352
- let i = Ea(e, J(C)), a = r === "tray" ? null : r === null ? void 0 : ge(r)?.region;
3353
- if (a === void 0 || bo(n?.session, e.id, a)) {
3348
+ let i = Ta(e, J(C)), a = r === "tray" ? null : r === null ? void 0 : ge(r)?.region;
3349
+ if (a === void 0 || yo(n?.session, e.id, a)) {
3354
3350
  k(t("cancelled", J(C)));
3355
3351
  return;
3356
3352
  }
@@ -3364,7 +3360,7 @@ function zo(e, n) {
3364
3360
  n.preventDefault(), b?.(), n.currentTarget.setPointerCapture?.(n.pointerId), B(h, e.id, !0), B(_, null), B(v, {
3365
3361
  x: n.clientX,
3366
3362
  y: n.clientY
3367
- }, !0), B(g, Se(n.clientX, n.clientY), !0), k(t("pickedUp", J(C), { name: Ea(e, J(C)) }));
3363
+ }, !0), B(g, Se(n.clientX, n.clientY), !0), k(t("pickedUp", J(C), { name: Ta(e, J(C)) }));
3368
3364
  let r = (e) => {
3369
3365
  B(v, {
3370
3366
  x: e.clientX,
@@ -3385,7 +3381,7 @@ function zo(e, n) {
3385
3381
  if (Ce(e, t)) return "tray";
3386
3382
  let n = pe(e, t);
3387
3383
  if (!n || !J(ce)) return null;
3388
- let r = _o(J(ce), n.x, n.y);
3384
+ let r = go(J(ce), n.x, n.y);
3389
3385
  return r ? r.key : null;
3390
3386
  }
3391
3387
  function Ce(e, t) {
@@ -3407,9 +3403,9 @@ function zo(e, n) {
3407
3403
  let t = J(_);
3408
3404
  ve(), be(e, t), we(e.id);
3409
3405
  } else {
3410
- let n = yo(J(E), e.id), r = n === null ? J(O)[0] ?? null : o(n);
3406
+ let n = vo(J(E), e.id), r = n === null ? J(O)[0] ?? null : o(n);
3411
3407
  B(h, e.id, !0), B(_, r, !0), k(t("pickedUpWithKeyboard", J(C), {
3412
- name: Ea(e, J(C)),
3408
+ name: Ta(e, J(C)),
3413
3409
  target: _e(r ?? "")
3414
3410
  }));
3415
3411
  }
@@ -3461,7 +3457,7 @@ function zo(e, n) {
3461
3457
  if (!d) return;
3462
3458
  let e = (e) => console.warn("venn-classification: MathJax render failed", e);
3463
3459
  try {
3464
- Promise.resolve(wa(d)).catch(e);
3460
+ Promise.resolve(Ca(d)).catch(e);
3465
3461
  } catch (t) {
3466
3462
  e(t);
3467
3463
  }
@@ -3472,8 +3468,8 @@ function zo(e, n) {
3472
3468
  J(T), J(w).tiles?.length, fr().then(M);
3473
3469
  });
3474
3470
  let ke = /* @__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);
3475
- var Le = Lo(), Re = H(Le), ze = (e) => {
3476
- Ba(e, {
3471
+ var Le = Io(), Re = H(Le), ze = (e) => {
3472
+ za(e, {
3477
3473
  get html() {
3478
3474
  return n.model.teacherInstructions;
3479
3475
  },
@@ -3486,17 +3482,17 @@ function zo(e, n) {
3486
3482
  n?.model?.teacherInstructions && e(ze);
3487
3483
  });
3488
3484
  var Be = U(Re, 2), Ve = (e) => {
3489
- var t = Co();
3485
+ var t = So();
3490
3486
  oi(t, () => J(re), !0), N(t), X(e, t);
3491
3487
  };
3492
3488
  Z(Be, (e) => {
3493
3489
  J(re) && e(Ve);
3494
3490
  });
3495
3491
  var He = U(Be, 2), Ue = (e) => {
3496
- var t = Eo(), n = H(t), r = (e) => {
3497
- X(e, wo());
3492
+ var t = To(), n = H(t), r = (e) => {
3493
+ X(e, Co());
3498
3494
  }, i = (e) => {
3499
- X(e, To());
3495
+ X(e, wo());
3500
3496
  };
3501
3497
  Z(n, (e) => {
3502
3498
  J(m) ? e(r) : e(i, -1);
@@ -3510,13 +3506,13 @@ function zo(e, n) {
3510
3506
  J(te) && J(ke) > 0 && e(Ue);
3511
3507
  });
3512
3508
  var We = U(He, 2), Ge = (e) => {
3513
- var n = Do(), r = ln(n, !0);
3509
+ var n = Eo(), r = ln(n, !0);
3514
3510
  W((e) => zr(r, e), [() => t("unsupportedCircles", J(C), {
3515
3511
  count: J(S).length,
3516
3512
  supported: 2
3517
3513
  })]), X(e, n);
3518
3514
  }, Ke = (e) => {
3519
- var n = Fo(), r = cn(n);
3515
+ var n = Po(), r = cn(n);
3520
3516
  let i;
3521
3517
  var o = H(r), s = H(o), d = H(s), p = H(d), m = U(p), b = U(m);
3522
3518
  N(d);
@@ -3526,13 +3522,13 @@ function zo(e, n) {
3526
3522
  N(E), N(s);
3527
3523
  var k = U(s), pe = U(k);
3528
3524
  ei(pe, 17, () => J(D).circles, Xr, (e, t) => {
3529
- var n = Oo();
3525
+ var n = Do();
3530
3526
  W(() => {
3531
3527
  Q(n, "cx", J(t).cx), Q(n, "cy", J(t).cy), Q(n, "r", J(t).r);
3532
3528
  }), X(e, n);
3533
3529
  });
3534
3530
  var me = U(pe), he = (e) => {
3535
- var t = ko();
3531
+ var t = Oo();
3536
3532
  Q(t, "fill", Fe), W(() => {
3537
3533
  Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${a})`);
3538
3534
  }), X(e, t);
@@ -3541,7 +3537,7 @@ function zo(e, n) {
3541
3537
  J(je) && e(he);
3542
3538
  });
3543
3539
  var ge = U(me), _e = (e) => {
3544
- var t = ko();
3540
+ var t = Oo();
3545
3541
  Q(t, "fill", Fe), W(() => {
3546
3542
  Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${c})`);
3547
3543
  }), X(e, t);
@@ -3550,7 +3546,7 @@ function zo(e, n) {
3550
3546
  J(Me) && e(_e);
3551
3547
  });
3552
3548
  var ve = U(ge), ye = (e) => {
3553
- var t = Ao();
3549
+ var t = ko();
3554
3550
  Q(t, "fill", Fe), W(() => {
3555
3551
  Q(t, "cx", J(D).circles[1].cx), Q(t, "cy", J(D).circles[1].cy), Q(t, "r", J(D).circles[1].r), Q(t, "clip-path", `url(#${u})`);
3556
3552
  }), X(e, t);
@@ -3559,7 +3555,7 @@ function zo(e, n) {
3559
3555
  J(Ne) && e(ye);
3560
3556
  });
3561
3557
  var be = U(ve), Se = (e) => {
3562
- var t = ko();
3558
+ var t = Oo();
3563
3559
  Q(t, "fill", Fe), W(() => {
3564
3560
  Q(t, "width", J(D).width), Q(t, "height", J(D).height), Q(t, "mask", `url(#${l})`);
3565
3561
  }), X(e, t);
@@ -3569,14 +3565,14 @@ function zo(e, n) {
3569
3565
  });
3570
3566
  var Ce = U(be);
3571
3567
  ei(Ce, 17, () => J(D).circles, Xr, (e, t) => {
3572
- var n = jo();
3568
+ var n = Ao();
3573
3569
  W(() => {
3574
3570
  Q(n, "cx", J(t).cx), Q(n, "cy", J(t).cy), Q(n, "r", J(t).r), Q(n, "stroke-width", 2 * J(D).scale);
3575
3571
  }), X(e, n);
3576
3572
  });
3577
3573
  var we = U(Ce);
3578
3574
  ei(we, 17, () => J(D).circles, Xr, (e, t, n) => {
3579
- var r = Mo();
3575
+ var r = jo();
3580
3576
  Q(r, "text-anchor", n === 0 ? "start" : "end");
3581
3577
  var i = ln(r, !0);
3582
3578
  W((e, t) => {
@@ -3588,7 +3584,7 @@ function zo(e, n) {
3588
3584
  var Oe = U(o, 2);
3589
3585
  ei(Oe, 21, () => J(ce).regions, Xr, (e, t) => {
3590
3586
  let n = /* @__PURE__ */ I(() => fe(J(t).hitRect.x + J(t).hitRect.w / 2, J(t).hitRect.y + J(t).hitRect.h / 2));
3591
- var r = No();
3587
+ var r = Mo();
3592
3588
  W(() => {
3593
3589
  Q(r, "aria-label", J(t).label), Q(r, "data-region-key", J(t).key), hi(r, `left: ${J(n).left ?? ""}%; top: ${J(n).top ?? ""}%;`);
3594
3590
  }), X(e, r);
@@ -3602,10 +3598,10 @@ function zo(e, n) {
3602
3598
  var n = Mr();
3603
3599
  ei(cn(n), 19, i, (e) => e.id, (e, n, r) => {
3604
3600
  let i = /* @__PURE__ */ I(() => fe(J(t)[J(r)].x, J(t)[J(r)].y));
3605
- var o = Po(), s = H(o);
3601
+ var o = No(), s = H(o);
3606
3602
  {
3607
- let e = /* @__PURE__ */ I(() => Da(J(n), J(a).label, j(J(n).id), J(C))), t = /* @__PURE__ */ I(() => j(J(n).id) ?? "neutral"), r = /* @__PURE__ */ I(() => J(h) === J(n).id), i = /* @__PURE__ */ I(() => J(h) === J(n).id && J(v) !== null);
3608
- Pa(s, {
3603
+ let e = /* @__PURE__ */ I(() => Ea(J(n), J(a).label, j(J(n).id), J(C))), t = /* @__PURE__ */ I(() => j(J(n).id) ?? "neutral"), r = /* @__PURE__ */ I(() => J(h) === J(n).id), i = /* @__PURE__ */ I(() => J(h) === J(n).id && J(v) !== null);
3604
+ Na(s, {
3609
3605
  fit: !0,
3610
3606
  get id() {
3611
3607
  return J(n).id;
@@ -3650,7 +3646,7 @@ function zo(e, n) {
3650
3646
  var ke = U(r, 2);
3651
3647
  {
3652
3648
  let e = /* @__PURE__ */ I(() => J(g) === "tray" || J(h) !== null && J(_) === "tray"), n = /* @__PURE__ */ I(() => t("tray", J(C)));
3653
- La(ke, {
3649
+ Ia(ke, {
3654
3650
  get isDropTarget() {
3655
3651
  return J(e);
3656
3652
  },
@@ -3661,8 +3657,8 @@ function zo(e, n) {
3661
3657
  var n = Mr();
3662
3658
  ei(cn(n), 17, () => J(oe), (e) => e.id, (e, t) => {
3663
3659
  {
3664
- let n = /* @__PURE__ */ I(() => Da(J(t), null, j(J(t).id), J(C))), r = /* @__PURE__ */ I(() => j(J(t).id) ?? "neutral"), i = /* @__PURE__ */ I(() => J(h) === J(t).id), a = /* @__PURE__ */ I(() => J(h) === J(t).id && J(v) !== null);
3665
- Pa(e, {
3660
+ let n = /* @__PURE__ */ I(() => Ea(J(t), null, j(J(t).id), J(C))), r = /* @__PURE__ */ I(() => j(J(t).id) ?? "neutral"), i = /* @__PURE__ */ I(() => J(h) === J(t).id), a = /* @__PURE__ */ I(() => J(h) === J(t).id && J(v) !== null);
3661
+ Na(e, {
3666
3662
  get id() {
3667
3663
  return J(t).id;
3668
3664
  },
@@ -3706,14 +3702,14 @@ function zo(e, n) {
3706
3702
  width: e,
3707
3703
  "aspect-ratio": `${J(D).width ?? ""} / ${J(D).height ?? ""}`
3708
3704
  }), 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}`);
3709
- }, [() => Ya(J(D), J(se))]), Di(r, "clientWidth", (e) => B(y, e)), X(e, n);
3705
+ }, [() => Ja(J(D), J(se))]), Di(r, "clientWidth", (e) => B(y, e)), X(e, n);
3710
3706
  };
3711
3707
  Z(We, (e) => {
3712
3708
  J(ce) ? e(Ke, -1) : e(Ge);
3713
3709
  });
3714
3710
  var qe = U(We, 2), Je = (e) => {
3715
- var t = Io();
3716
- Pa(H(t), {
3711
+ var t = Fo();
3712
+ Na(H(t), {
3717
3713
  get id() {
3718
3714
  return J(Ie).id;
3719
3715
  },
@@ -3737,12 +3733,12 @@ function zo(e, n) {
3737
3733
  J(Ie) && J(v) && e(Je);
3738
3734
  }), ki(U(qe, 2), (e) => p = e, () => p), N(Le), ki(Le, (e) => d = e, () => d), xr("focusout", Le, Oe), X(e, Le), Ze();
3739
3735
  }
3740
- Sr(["focusout", "click"]), Li(zo, {
3736
+ Sr(["focusout", "click"]), Li(Ro, {
3741
3737
  model: { type: "Object" },
3742
3738
  session: { type: "Object" },
3743
3739
  onSessionChange: {}
3744
3740
  }, [], []);
3745
3741
  //#endregion
3746
- export { H as A, Xe as B, Mr as C, J as D, xr as E, B as F, N as H, z as I, R as L, ln as M, U as N, W as O, $t as P, I as R, X as S, Sr as T, ie as U, Ae as V, Z as _, ki as a, qr as b, Q as c, hi as d, pi as f, Xr as g, ei as h, $ as i, cn as j, xn as k, Si as l, oi as m, Ta as n, Di as o, si as p, Li as r, bi as s, zo as t, xi as u, Yr as v, Y as w, zr as x, Jr as y, Ze as z };
3742
+ export { H as A, Xe as B, Mr as C, J as D, xr as E, B as F, N as H, z as I, R as L, ln as M, U as N, W as O, $t as P, I as R, X as S, Sr as T, ie as U, Ae as V, Z as _, ki as a, qr as b, Q as c, hi as d, pi as f, Xr as g, ei as h, $ as i, cn as j, xn as k, Si as l, oi as m, wa as n, Di as o, si as p, Li as r, bi as s, Ro as t, xi as u, Yr as v, Y as w, zr as x, Jr as y, Ze as z };
3747
3743
 
3748
- //# sourceMappingURL=VennClassification-BPq_DgNM.js.map
3744
+ //# sourceMappingURL=VennClassification-DrP-zXoc.js.map