@pie-element/venn-classification 0.1.4-next.20261007075859 → 0.1.4

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.
@@ -1,21 +1,21 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, U as y, V as b, W as x, _ as S, b as C, c as w, d as T, f as E, g as D, h as O, j as k, k as A, l as j, m as M, n as ee, p as N, q as P, t as te, u as F, v as I, w as ne, x as re, y as L, z as ie } from "../VennClassification-BtSbTZPu.js";
2
- import { _ as ae, g as oe, h as se, i as ce, m as le, n as ue, p as R, v as z, y as de } from "../controller--P8AQebj.js";
3
- import { Editor as fe, Extension as pe } from "@tiptap/core";
4
- import { Plugin as me, PluginKey as B, TextSelection as V } from "@tiptap/pm/state";
5
- import { Table as H, TableView as he } from "@tiptap/extension-table";
6
- import { TableHeader as U } from "@tiptap/extension-table-header";
7
- import W from "@tiptap/starter-kit";
8
- import { TextStyle as G } from "@tiptap/extension-text-style";
9
- import { CharacterCount as ge } from "@tiptap/extension-character-count";
10
- import _e from "@tiptap/extension-superscript";
11
- import ve from "@tiptap/extension-subscript";
12
- import K from "@tiptap/extension-text-align";
13
- import q from "@tiptap/extension-image";
14
- import { TableRow as ye } from "@tiptap/extension-table-row";
15
- import { TableCell as be } from "@tiptap/extension-table-cell";
16
- import { Placeholder as xe } from "@tiptap/extensions";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, U as y, V as b, W as x, _ as S, b as C, c as w, d as T, f as E, g as D, h as O, j as k, k as A, l as j, m as M, n as ee, p as N, q as P, t as te, u as ne, v as F, w as re, x as ie, y as I, z as ae } from "../VennClassification-DKBN96xP.js";
2
+ import { _ as oe, g as se, h as ce, i as le, m as ue, n as de, p as L, v as R, y as fe } from "../controller--P8AQebj.js";
3
+ import { Editor as pe, Extension as me } from "@tiptap/core";
4
+ import { Plugin as he, PluginKey as z, TextSelection as B } from "@tiptap/pm/state";
5
+ import { Table as V, TableView as ge } from "@tiptap/extension-table";
6
+ import { TableHeader as H } from "@tiptap/extension-table-header";
7
+ import U from "@tiptap/starter-kit";
8
+ import { TextStyle as W } from "@tiptap/extension-text-style";
9
+ import { CharacterCount as _e } from "@tiptap/extension-character-count";
10
+ import ve from "@tiptap/extension-superscript";
11
+ import ye from "@tiptap/extension-subscript";
12
+ import G from "@tiptap/extension-text-align";
13
+ import K from "@tiptap/extension-image";
14
+ import { TableRow as be } from "@tiptap/extension-table-row";
15
+ import { TableCell as xe } from "@tiptap/extension-table-cell";
16
+ import { Placeholder as Se } from "@tiptap/extensions";
17
17
  //#region ../../shared/configure-events/dist/index.js
18
- var Se = class e extends CustomEvent {
18
+ var Ce = class e extends CustomEvent {
19
19
  static {
20
20
  this.TYPE = "model.updated";
21
21
  }
@@ -78,38 +78,38 @@ var Se = class e extends CustomEvent {
78
78
  };
79
79
  //#endregion
80
80
  //#region ../../lib-svelte/config-ui-svelte/dist/index.js
81
- var J = A("<aside class=\"pie-config-layout-settings svelte-9dr0jr\" aria-label=\"Settings\"><!></aside>"), Y = A("<div class=\"pie-config-layout svelte-9dr0jr\"><div class=\"pie-config-layout-contents svelte-9dr0jr\"><div class=\"pie-config-layout-design svelte-9dr0jr\"><!></div> <!></div></div>"), X = {
81
+ var q = A("<aside class=\"pie-config-layout-settings svelte-9dr0jr\" aria-label=\"Settings\"><!></aside>"), J = A("<div class=\"pie-config-layout svelte-9dr0jr\"><div class=\"pie-config-layout-contents svelte-9dr0jr\"><div class=\"pie-config-layout-design svelte-9dr0jr\"><!></div> <!></div></div>"), Y = {
82
82
  hash: "svelte-9dr0jr",
83
83
  code: ".pie-config-layout.svelte-9dr0jr {container-type:inline-size;}.pie-config-layout-contents.svelte-9dr0jr {display:flex;flex-direction:column;gap:16px;}.pie-config-layout-design.svelte-9dr0jr {flex:1 1 auto;min-width:0;}\n\n @container (min-width: 1135px) {.pie-config-layout-contents.svelte-9dr0jr {flex-direction:row;align-items:flex-start;}.pie-config-layout-settings.svelte-9dr0jr {flex:0 0 300px;position:sticky;top:0;}\n }"
84
84
  };
85
- function Z(e, t) {
86
- I(e, X);
85
+ function X(e, t) {
86
+ F(e, Y);
87
87
  let n = j(t, "hideSettings", 3, !1);
88
- var i = Y(), o = a(i), s = a(o);
88
+ var i = J(), o = a(i), s = a(o);
89
89
  v(a(s), () => t.children), P(s);
90
90
  var c = g(s, 2), l = (e) => {
91
- var n = J();
91
+ var n = q();
92
92
  v(a(n), () => t.settings), P(n), r(e, n);
93
93
  };
94
94
  _(c, (e) => {
95
95
  t.settings && !n() && e(l);
96
96
  }), P(o), P(i), r(e, i);
97
97
  }
98
- var Q = (e) => typeof e == "object" && !!e && !Array.isArray(e);
99
- function Ce(e, t) {
100
- if (!Q(t)) return e;
98
+ var Z = (e) => typeof e == "object" && !!e && !Array.isArray(e);
99
+ function we(e, t) {
100
+ if (!Z(t)) return e;
101
101
  let n = { ...e };
102
102
  for (let [r, i] of Object.entries(t)) {
103
103
  let t = e[r];
104
- n[r] = Q(t) && Q(i) ? {
104
+ n[r] = Z(t) && Z(i) ? {
105
105
  ...t,
106
106
  ...i
107
107
  } : i;
108
108
  }
109
109
  return n;
110
110
  }
111
- function we(e) {
112
- return Q(e) ? Object.values(e).some((e) => Q(e) && (e.settings === !0 || we(e))) : !1;
111
+ function Q(e) {
112
+ return Z(e) ? Object.values(e).some((e) => Z(e) && (e.settings === !0 || Q(e))) : !1;
113
113
  }
114
114
  var Te = (e, t = !1, n = !1) => ({
115
115
  type: "toggle",
@@ -128,13 +128,13 @@ var Te = (e, t = !1, n = !1) => ({
128
128
  function De(e, t) {
129
129
  let n = e;
130
130
  for (let e of t.split(".")) {
131
- if (!Q(n)) return;
131
+ if (!Z(n)) return;
132
132
  n = n[e];
133
133
  }
134
134
  return n;
135
135
  }
136
136
  function Oe(e, t, n) {
137
- let [r, ...i] = t.split("."), a = e[r], o = i.length === 0 ? n : Oe(Q(a) ? a : {}, i.join("."), n);
137
+ let [r, ...i] = t.split("."), a = e[r], o = i.length === 0 ? n : Oe(Z(a) ? a : {}, i.join("."), n);
138
138
  return {
139
139
  ...e,
140
140
  [r]: o
@@ -145,7 +145,7 @@ var ke = A("<label class=\"pie-settings-toggle svelte-1ang3sw\"><span> </span> <
145
145
  code: ".pie-settings-panel.svelte-1ang3sw {display:flex;flex-direction:column;gap:16px;padding:16px;border:1px solid var(--pie-border-light, #ccc);border-radius:4px;color:var(--pie-text, #212121);}fieldset.svelte-1ang3sw {margin:0;padding:0;border:0;min-width:0;}.pie-settings-group.svelte-1ang3sw {display:flex;flex-direction:column;gap:8px;}.pie-settings-group-name.svelte-1ang3sw {margin-bottom:8px;font-weight:600;}.pie-settings-toggle.svelte-1ang3sw {display:flex;align-items:center;justify-content:space-between;gap:12px;}.pie-settings-choice.svelte-1ang3sw legend:where(.svelte-1ang3sw) {margin-bottom:4px;}.pie-settings-choice-row.svelte-1ang3sw {display:flex;align-items:center;gap:8px;}input.svelte-1ang3sw {accent-color:var(--pie-primary, #3f51b5);}input.svelte-1ang3sw:focus-visible {outline:2px solid var(--pie-focus-outline, #1a73e8);outline-offset:2px;}"
146
146
  };
147
147
  function Fe(e, t) {
148
- o(t, !0), I(e, Pe);
148
+ o(t, !0), F(e, Pe);
149
149
  let n = j(t, "configuration", 19, () => ({})), s = Math.random().toString(36).slice(2, 10), u = y(() => Object.entries(t.groups).map(([e, t]) => [e, Object.entries(t).filter((e) => !!e[1])]).filter(([, e]) => e.length > 0)), h = (e, r) => De(r.isConfigProperty ? n() : t.model, e);
150
150
  function v(e, r, i) {
151
151
  r.isConfigProperty ? t.onChangeConfiguration?.(Oe(n(), e, i), e) : t.onChangeModel(Oe(t.model, e, i), e);
@@ -181,7 +181,7 @@ function Fe(e, t) {
181
181
  }), P(b), r(e, b), x();
182
182
  }
183
183
  e(["change"]);
184
- var Ie = Z, Le = Fe, Re = /mso-list:\s*(l\d+)\s+level(\d+)/i, ze = /^\(?(?:\d+(?:\.\d+)*|[a-z]+|[A-Z]+)[.)]$|^\d+(?:\.\d+)+$/, Be = /^[ivxlcdm]+$/i, Ve = {
184
+ var Ie = X, Le = Fe, Re = /mso-list:\s*(l\d+)\s+level(\d+)/i, ze = /^\(?(?:\d+(?:\.\d+)*|[a-z]+|[A-Z]+)[.)]$|^\d+(?:\.\d+)+$/, Be = /^[ivxlcdm]+$/i, Ve = {
185
185
  i: 1,
186
186
  v: 5,
187
187
  x: 10,
@@ -280,14 +280,22 @@ var Qe = [
280
280
  "subscript",
281
281
  "bulletList",
282
282
  "orderedList",
283
- "table"
284
- ], $e = (e) => Array.from(e.items ?? []).some((e) => e.kind === "file" && e.type.startsWith("image/")), et = (e, t) => new DOMParser().parseFromString(e, "text/html").querySelector(t) !== null, tt = (e) => e.includes("data-pm-slice") && et(e, "[data-pm-slice]"), nt = (e) => /data-latex|data-type="?mathml/.test(e) && et(e, "[data-latex], [data-type=\"mathml\"]"), rt = null, it = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), at = (e) => e.replace(/\r*\n|\r/g, "\n").replace(/\n+$/, ""), $ = (e) => {
283
+ "table",
284
+ "image"
285
+ ], $e = (e) => Array.from(e.items ?? []).some((e) => e.kind === "file" && e.type.startsWith("image/")), et = (e, t) => new DOMParser().parseFromString(e, "text/html").querySelector(t) !== null, tt = (e) => e.includes("data-pm-slice") && et(e, "[data-pm-slice]"), nt = (e) => /data-latex|data-type="?mathml/.test(e) && et(e, "[data-latex], [data-type=\"mathml\"]"), rt = null, it = /^data:image\/(?:png|jpeg|gif|webp);base64,/i, at = () => `img-${Date.now()}-${Math.random().toString(36).slice(2)}`;
286
+ function ot(e) {
287
+ if (!e.includes("data:image/")) return e;
288
+ let t = new DOMParser().parseFromString(e, "text/html");
289
+ for (let e of Array.from(t.body.querySelectorAll("img"))) it.test(e.getAttribute("src") ?? "") && e.setAttribute("data-type", "image-upload-node");
290
+ return t.body.innerHTML;
291
+ }
292
+ var st = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ct = (e) => e.replace(/\r*\n|\r/g, "\n").replace(/\n+$/, ""), $ = (e) => {
285
293
  let t = [];
286
294
  return e.forEach((e) => {
287
295
  t.push(e);
288
296
  }), t;
289
297
  };
290
- function ot(e, t) {
298
+ function lt(e, t) {
291
299
  let n = e.topNodeType.create(null, t), r = (e) => {
292
300
  let t = 0;
293
301
  for (let r = n[e]; r && !r.isLeaf && !r.type.spec.isolating; r = r[e]) t += 1;
@@ -295,7 +303,7 @@ function ot(e, t) {
295
303
  };
296
304
  return t.length ? n.slice(r("firstChild"), n.content.size - r("lastChild"), !0) : n.slice(0, 0);
297
305
  }
298
- var st = [
306
+ var ut = [
299
307
  [1e3, "m"],
300
308
  [900, "cm"],
301
309
  [500, "d"],
@@ -309,19 +317,19 @@ var st = [
309
317
  [5, "v"],
310
318
  [4, "iv"],
311
319
  [1, "i"]
312
- ], ct = (e) => st.reduce(({ numeral: e, rest: t }, [n, r]) => ({
320
+ ], dt = (e) => ut.reduce(({ numeral: e, rest: t }, [n, r]) => ({
313
321
  numeral: e + r.repeat(Math.floor(t / n)),
314
322
  rest: t % n
315
323
  }), {
316
324
  numeral: "",
317
325
  rest: e
318
- }).numeral, lt = (e) => (e > 26 ? lt(Math.floor((e - 1) / 26)) : "") + String.fromCharCode(97 + (e - 1) % 26);
319
- function ut(e, t) {
326
+ }).numeral, ft = (e) => (e > 26 ? ft(Math.floor((e - 1) / 26)) : "") + String.fromCharCode(97 + (e - 1) % 26);
327
+ function pt(e, t) {
320
328
  if (t < 1 || !e || !/^[aAiI]$/.test(e)) return String(t);
321
- let n = /^[aA]$/.test(e) ? lt(t) : ct(t);
329
+ let n = /^[aA]$/.test(e) ? ft(t) : dt(t);
322
330
  return e === e.toUpperCase() ? n.toUpperCase() : n;
323
331
  }
324
- function dt(e) {
332
+ function mt(e) {
325
333
  let t = e?.getData("text/html");
326
334
  if (!e || !t || tt(t)) return null;
327
335
  let n = e.getData("text/plain"), r = Array.from(e.types).includes("text/rtf") && n.trim() !== "";
@@ -330,35 +338,47 @@ function dt(e) {
330
338
  html: t
331
339
  };
332
340
  }
333
- var ft = (e) => (t, n) => {
334
- let { schema: r } = n, { paragraph: i, hardBreak: a, math: o } = r.nodes, s = (e) => i.create(null, e), c = (t) => t.filter((t) => e.has(t.type.name)).map((e) => e.type.create()), l = (e) => $(e).flatMap((e) => {
341
+ var ht = (e, t = null) => (n, r) => {
342
+ let { schema: i } = r, { paragraph: a, hardBreak: o, math: s, imageUploadNode: c } = i.nodes, l = (e) => a.create(null, e), u = (t) => t.filter((t) => e.has(t.type.name)).map((e) => e.type.create()), d = (e) => $(e).flatMap((e) => {
335
343
  if (e.isText) {
336
- let t = c(e.marks);
337
- return (e.text ?? "").split("\n").flatMap((e, n) => [...n && a ? [a.create(null, null, t)] : [], ...e ? [r.text(e, t)] : []]);
344
+ let t = u(e.marks);
345
+ return (e.text ?? "").split("\n").flatMap((e, n) => [...n && o ? [o.create(null, null, t)] : [], ...e ? [i.text(e, t)] : []]);
338
346
  }
339
- return e.type === a || o && e.type === o ? [e.mark(c(e.marks))] : e.isLeaf ? [] : l(e);
340
- }), u = (e) => {
347
+ return e.type === o || s && e.type === s ? [e.mark(u(e.marks))] : e.isLeaf ? [] : d(e);
348
+ }), f = (e) => {
349
+ let { src: n, width: r, height: i, alt: a } = e.attrs;
350
+ if (!t || !it.test(n ?? "")) return [];
351
+ let o = at();
352
+ return t.keys.push(o), [e.type.create({
353
+ src: n,
354
+ width: r,
355
+ height: i,
356
+ alt: a,
357
+ nodeKey: o,
358
+ loaded: !t.upload
359
+ })];
360
+ }, p = (e) => {
341
361
  let t = [];
342
- return e.descendants((e) => e.isTextblock ? (t.length && t.push(r.text(" ")), t.push(...l(e)), !1) : !0), t;
343
- }, d = (t) => {
362
+ return e.descendants((e) => e.isTextblock ? (t.length && t.push(i.text(" ")), t.push(...d(e)), !1) : !0), t;
363
+ }, m = (t) => {
344
364
  let n = t.type.name === "orderedList";
345
365
  if (e.has(t.type.name)) {
346
- let e = $(t).flatMap((e) => e.type.createAndFill(null, p(e)) ?? []), r = n ? {
366
+ let e = $(t).flatMap((e) => e.type.createAndFill(null, v(e)) ?? []), r = n ? {
347
367
  start: t.attrs.start,
348
368
  type: t.attrs.type
349
369
  } : null;
350
370
  return e.length ? [t.type.create(r, e)] : [];
351
371
  }
352
- let a = n ? t.attrs.start ?? 1 : 0;
372
+ let r = n ? t.attrs.start ?? 1 : 0;
353
373
  return $(t).flatMap((e) => {
354
- let o = r.text(n ? `${ut(t.attrs.type, a++)}. ` : "• "), [c, ...l] = p(e);
355
- return c?.type === i ? [s([o, ...$(c)]), ...l] : [
356
- s([o]),
357
- ...c ? [c] : [],
358
- ...l
374
+ let o = i.text(n ? `${pt(t.attrs.type, r++)}. ` : "• "), [s, ...c] = v(e);
375
+ return s?.type === a ? [l([o, ...$(s)]), ...c] : [
376
+ l([o]),
377
+ ...s ? [s] : [],
378
+ ...c
359
379
  ];
360
380
  });
361
- }, f = (t) => {
381
+ }, h = (t) => {
362
382
  let n = t.attrs.caption ?? null;
363
383
  if (e.has("table")) {
364
384
  let e = $(t).flatMap((e) => {
@@ -368,17 +388,17 @@ var ft = (e) => (t, n) => {
368
388
  colspan: t,
369
389
  rowspan: n,
370
390
  scope: r
371
- }, p(e)) ?? [];
391
+ }, v(e)) ?? [];
372
392
  });
373
393
  return t.length ? [e.type.create(null, t)] : [];
374
394
  });
375
395
  return e.length ? [t.type.create({ caption: n }, e)] : [];
376
396
  }
377
- return [...n ? [s([r.text(n)])] : [], ...$(t).map((e) => s($(e).flatMap((e, t) => t ? [r.text(" "), ...u(e)] : u(e))))];
378
- }, p = (e) => $(e).flatMap((e) => e.isTextblock ? [s(l(e))] : e.type.spec.tableRole === "table" ? f(e) : e.type.name === "bulletList" || e.type.name === "orderedList" ? d(e) : e.isLeaf ? [] : p(e));
379
- return ot(r, t.content.firstChild?.isInline ? [s(l(t.content))] : p(t.content));
397
+ return [...n ? [l([i.text(n)])] : [], ...$(t).map((e) => l($(e).flatMap((e, t) => t ? [i.text(" "), ...p(e)] : p(e))))];
398
+ }, g = (e) => /^\s+$/.test(e.textContent) && $(e).every((e) => e.isText), _ = (e) => !!t && !!e && e.type === c, v = (e) => $(e).flatMap((e, t, n) => e.isTextblock && !e.content.size && (_(n[t - 1]) || _(n[t + 1])) ? [] : e.isTextblock && g(e) ? [l([i.text(e.textContent)])] : e.isTextblock ? [l(d(e))] : e.type.spec.tableRole === "table" ? h(e) : e.type.name === "bulletList" || e.type.name === "orderedList" ? m(e) : _(e) ? f(e) : e.isLeaf ? [] : v(e));
399
+ return lt(i, n.content.firstChild?.isInline ? [l(d(n.content))] : v(n.content));
380
400
  };
381
- function pt(e, t) {
401
+ function gt(e, t) {
382
402
  let { schema: n } = t, r = t.selection.$from.marks(), i = (e) => {
383
403
  let t = [];
384
404
  return e.descendants((e) => (e.isTextblock && t.length && t.push(n.text(" ", r)), e.isText && e.text && t.push(n.text(e.text, r)), e.type === n.nodes.math && t.push(e.mark([])), !e.isInline)), t;
@@ -391,9 +411,9 @@ function pt(e, t) {
391
411
  }), a.push(t.flatMap((e, t) => t ? [n.text(" ", r), ...e] : e)), !1;
392
412
  }
393
413
  return e.isTextblock ? (a.push(i(e)), !1) : !0;
394
- }), ot(n, a.map((e) => n.nodes.paragraph.create(null, e)));
414
+ }), lt(n, a.map((e) => n.nodes.paragraph.create(null, e)));
395
415
  }
396
- function mt(e, t, n) {
416
+ function _t(e, t, n) {
397
417
  rt = n;
398
418
  try {
399
419
  e.pasteHTML(t);
@@ -401,63 +421,72 @@ function mt(e, t, n) {
401
421
  rt = null;
402
422
  }
403
423
  }
404
- function ht(e, { text: t, html: n }, r) {
405
- let { selection: i, schema: a } = e.state, o = new Set(r.plainText ? [] : r.formatting);
406
- if ("$anchorCell" in i && !(o.has("table") && et(n, "table"))) {
407
- let n = at(t).split("\n").map((e) => `<tr>${e.split(" ").map((e) => `<td>${it(e)}</td>`).join("")}</tr>`);
424
+ function vt(e, { text: t, html: n }, r, i) {
425
+ let { selection: a, schema: o } = e.state, s = new Set(r.plainText ? [] : r.formatting);
426
+ if ("$anchorCell" in a && !(s.has("table") && et(n, "table"))) {
427
+ let n = ct(t).split("\n").map((e) => `<tr>${e.split(" ").map((e) => `<td>${st(e)}</td>`).join("")}</tr>`);
408
428
  e.pasteHTML(`<table><tbody>${n.join("")}</tbody></table>`);
409
429
  return;
410
430
  }
411
431
  if (!r.plainText) {
412
- mt(e, Ze(n), ft(o));
432
+ let t = s.has("image") && o.nodes.imageUploadNode ? {
433
+ keys: [],
434
+ upload: !!i
435
+ } : null;
436
+ _t(e, Ze(t ? ot(n) : n), ht(s, t));
437
+ let r = Promise.resolve();
438
+ for (let e of t?.keys ?? []) r = r.then(() => i?.(e));
413
439
  return;
414
440
  }
415
- if (a.nodes.math && nt(n)) {
416
- mt(e, n, pt);
441
+ if (o.nodes.math && nt(n)) {
442
+ _t(e, n, gt);
417
443
  return;
418
444
  }
419
- e.pasteText(i.$from.parent.type.spec.code ? at(t) : at(t).replace(/^$/gm, "\xA0"));
445
+ e.pasteText(a.$from.parent.type.spec.code ? ct(t) : ct(t).replace(/^$/gm, "\xA0"));
420
446
  }
421
- var gt = pe.create({
447
+ var yt = me.create({
422
448
  name: "externalPaste",
423
449
  priority: 1e3,
424
450
  addOptions() {
425
- return { settings: () => ({
426
- plainText: !1,
427
- formatting: Qe
428
- }) };
451
+ return {
452
+ settings: () => ({
453
+ plainText: !1,
454
+ formatting: Qe
455
+ }),
456
+ uploadImage: void 0
457
+ };
429
458
  },
430
459
  addProseMirrorPlugins() {
431
- let { settings: e } = this.options;
432
- return [new me({
433
- key: new B("externalPaste"),
460
+ let { settings: e, uploadImage: t } = this.options, { editor: n } = this, r = t ? (e) => t(n, e) : null;
461
+ return [new he({
462
+ key: new z("externalPaste"),
434
463
  props: {
435
464
  transformPasted(e, t) {
436
465
  return rt ? rt(e, t.state) : e;
437
466
  },
438
467
  handlePaste(t, n) {
439
- let r = dt(n.clipboardData);
440
- return r === null ? !1 : (ht(t, r, e()), !0);
468
+ let i = mt(n.clipboardData);
469
+ return i === null ? !1 : (vt(t, i, e(), r), !0);
441
470
  },
442
471
  handleDrop(t, n) {
443
- let r = t.dragging ? null : dt(n.dataTransfer), i = r === null ? null : t.posAtCoords({
472
+ let i = t.dragging ? null : mt(n.dataTransfer), a = i === null ? null : t.posAtCoords({
444
473
  left: n.clientX,
445
474
  top: n.clientY
446
475
  });
447
- return r === null || !i ? !1 : (t.dispatch(t.state.tr.setSelection(V.near(t.state.doc.resolve(i.pos)))), ht(t, r, e()), t.focus(), !0);
476
+ return i === null || !a ? !1 : (t.dispatch(t.state.tr.setSelection(B.near(t.state.doc.resolve(a.pos)))), vt(t, i, e(), r), t.focus(), !0);
448
477
  }
449
478
  }
450
479
  })];
451
480
  }
452
- }), _t = (e) => Array.from(e.children).find((e) => e.tagName === "CAPTION"), vt = {
481
+ }), bt = (e) => Array.from(e.children).find((e) => e.tagName === "CAPTION"), xt = {
453
482
  default: null,
454
- parseHTML: (e) => _t(e)?.textContent?.replace(/\s+/g, " ").trim() || null,
483
+ parseHTML: (e) => bt(e)?.textContent?.replace(/\s+/g, " ").trim() || null,
455
484
  renderHTML: () => ({})
456
- }, yt = {
485
+ }, St = {
457
486
  tag: "caption",
458
487
  ignore: !0
459
488
  };
460
- function bt(e, t) {
489
+ function Ct(e, t) {
461
490
  if (!t || !Array.isArray(e)) return e;
462
491
  let [n, r, ...i] = e;
463
492
  return [
@@ -467,59 +496,59 @@ function bt(e, t) {
467
496
  ...i
468
497
  ];
469
498
  }
470
- function xt(e, t) {
471
- let n = _t(e);
499
+ function wt(e, t) {
500
+ let n = bt(e);
472
501
  if (!t) {
473
502
  n?.remove();
474
503
  return;
475
504
  }
476
505
  n || (n = e.ownerDocument.createElement("caption"), n.setAttribute("contenteditable", "false"), e.insertBefore(n, e.firstChild)), n.textContent !== t && (n.textContent = t);
477
506
  }
478
- var St = [
507
+ var Tt = [
479
508
  "row",
480
509
  "col",
481
510
  "rowgroup",
482
511
  "colgroup"
483
- ], Ct = {
512
+ ], Et = {
484
513
  default: null,
485
514
  parseHTML: (e) => {
486
515
  let t = e.getAttribute("scope")?.trim().toLowerCase() ?? "";
487
- return St.includes(t) ? t : null;
516
+ return Tt.includes(t) ? t : null;
488
517
  },
489
518
  renderHTML: (e) => e.scope ? { scope: e.scope } : {}
490
- }, wt = class extends he {
519
+ }, Dt = class extends ge {
491
520
  constructor(...e) {
492
- super(...e), xt(this.table, this.node.attrs.caption);
521
+ super(...e), wt(this.table, this.node.attrs.caption);
493
522
  }
494
523
  update(e) {
495
524
  let t = super.update(e);
496
- return t && xt(this.table, e.attrs.caption), t;
525
+ return t && wt(this.table, e.attrs.caption), t;
497
526
  }
498
- }, Tt = H.extend({
527
+ }, Ot = V.extend({
499
528
  addAttributes() {
500
529
  return {
501
530
  ...this.parent?.(),
502
- caption: vt
531
+ caption: xt
503
532
  };
504
533
  },
505
534
  parseHTML() {
506
- return [...this.parent?.() ?? [], yt];
535
+ return [...this.parent?.() ?? [], St];
507
536
  },
508
537
  renderHTML(e) {
509
538
  let t = this.parent?.(e);
510
- return bt(t, e.node.attrs.caption);
539
+ return Ct(t, e.node.attrs.caption);
511
540
  }
512
- }).configure({ View: wt }), Et = U.extend({ addAttributes() {
541
+ }).configure({ View: Dt }), kt = H.extend({ addAttributes() {
513
542
  return {
514
543
  ...this.parent?.(),
515
- scope: Ct
544
+ scope: Et
516
545
  };
517
- } }), Dt = A("<button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Table\"></button>"), Ot = A("<button type=\"button\" title=\"Add Row\"></button> <button type=\"button\" title=\"Delete Row\"></button> <button type=\"button\" title=\"Add Column\"></button> <button type=\"button\" title=\"Delete Column\"></button> <button type=\"button\" title=\"Delete Table\"></button> <button type=\"button\" title=\"Toggle Table Border\"></button>", 1), kt = A("<div class=\"align-menu\"><button type=\"button\" class=\"align-menu-btn\" title=\"Align Left\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Center\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Right\"></button></div>"), At = A("<button type=\"button\" title=\"Bold\"></button> <button type=\"button\" title=\"Italic\"></button> <button type=\"button\" title=\"Strikethrough\"></button> <button type=\"button\" title=\"Code\"></button> <button type=\"button\" title=\"Underline\"></button> <button type=\"button\" title=\"Subscript\"></button> <button type=\"button\" title=\"Superscript\"></button> <button type=\"button\" title=\"Heading\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Image\"></button> <div class=\"align-dropdown\"><button type=\"button\" class=\"pie-toolbar-btn\" title=\"Text Alignment\"><!> <span class=\"dropdown-arrow\">▼</span></button> <!></div> <button type=\"button\" title=\"Bullet List\"></button> <button type=\"button\" title=\"Numbered List\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Undo\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Redo\"></button>", 1), jt = A("<div role=\"toolbar\" tabindex=\"-1\"><div class=\"toolbar-content\"><div class=\"toolbar-buttons\"><!> <!> <!></div> <button type=\"button\" class=\"done-btn\" title=\"Done\"></button></div></div>"), Mt = A("<div class=\"pie-editable-html editor-container editable-html svelte-rx7so6\"><div><div class=\"editor-children\"><div class=\"editor\"></div></div></div> <!></div>"), Nt = {
546
+ } }), At = A("<button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Table\"></button>"), jt = A("<button type=\"button\" title=\"Add Row\"></button> <button type=\"button\" title=\"Delete Row\"></button> <button type=\"button\" title=\"Add Column\"></button> <button type=\"button\" title=\"Delete Column\"></button> <button type=\"button\" title=\"Delete Table\"></button> <button type=\"button\" title=\"Toggle Table Border\"></button>", 1), Mt = A("<div class=\"align-menu\"><button type=\"button\" class=\"align-menu-btn\" title=\"Align Left\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Center\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Right\"></button></div>"), Nt = A("<button type=\"button\" title=\"Bold\"></button> <button type=\"button\" title=\"Italic\"></button> <button type=\"button\" title=\"Strikethrough\"></button> <button type=\"button\" title=\"Code\"></button> <button type=\"button\" title=\"Underline\"></button> <button type=\"button\" title=\"Subscript\"></button> <button type=\"button\" title=\"Superscript\"></button> <button type=\"button\" title=\"Heading\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Image\"></button> <div class=\"align-dropdown\"><button type=\"button\" class=\"pie-toolbar-btn\" title=\"Text Alignment\"><!> <span class=\"dropdown-arrow\">▼</span></button> <!></div> <button type=\"button\" title=\"Bullet List\"></button> <button type=\"button\" title=\"Numbered List\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Undo\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Redo\"></button>", 1), Pt = A("<div role=\"toolbar\" tabindex=\"-1\"><div class=\"toolbar-content\"><div class=\"toolbar-buttons\"><!> <!> <!></div> <button type=\"button\" class=\"done-btn\" title=\"Done\"></button></div></div>"), Ft = A("<div class=\"pie-editable-html editor-container editable-html svelte-rx7so6\"><div><div class=\"editor-children\"><div class=\"editor\"></div></div></div> <!></div>"), It = {
518
547
  hash: "svelte-rx7so6",
519
548
  code: ".pie-editable-html.svelte-rx7so6 {position:relative;padding:0px;border:1px solid #ccc;border-radius:4px;cursor:text;background-color:var(--pie-background, rgba(255, 255, 255, 0));width:100%;}.pie-editable-html.svelte-rx7so6 .editor-holder {position:relative;padding:0px;overflow-y:auto;color:var(--pie-text, black);background-color:var(--pie-background, rgba(255, 255, 255, 0));min-height:120px;}.pie-editable-html.svelte-rx7so6 .editor-holder.disabled {cursor:not-allowed;}.pie-editable-html.svelte-rx7so6 .editor-children {padding:10px 16px;}.pie-editable-html.svelte-rx7so6 .editor {padding:5px;min-height:100px;}\n\n /* Toolbar styles matching React version EXACTLY */.pie-editable-html.svelte-rx7so6 .toolbar {position:absolute;z-index:20;cursor:pointer;justify-content:space-between;background:var(--editable-html-toolbar-bg, #efefef);min-width:280px;margin:5px 0 0 0;padding:2px;box-shadow:0px 1px 5px 0px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 3px 1px -2px rgba(0, 0, 0, 0.12);box-sizing:border-box;display:flex;opacity:0;pointer-events:none;top:100%;left:0;}.pie-editable-html.svelte-rx7so6 .toolbar.focused {opacity:1;pointer-events:auto;}.pie-editable-html.svelte-rx7so6 .toolbar-content {display:flex;width:100%;justify-content:space-between;}.pie-editable-html.svelte-rx7so6 .toolbar-buttons {align-items:center;display:flex;width:100%;}.pie-editable-html.svelte-rx7so6 .toolbar button.pie-toolbar-btn {\n /* Reset all browser defaults */appearance:none;-webkit-appearance:none;-moz-appearance:none;\n\n /* Core button styling - matching React MenuBar exactly */color:grey !important;display:inline-flex !important;padding:2px !important;background:none !important;border:0 !important;border-width:0 !important;border-style:none !important;outline:none !important;box-shadow:none !important;cursor:pointer !important;align-items:center !important;justify-content:center !important;min-width:auto !important;width:auto !important;height:auto !important;margin:0 !important;font:inherit !important;text-align:inherit !important;text-transform:none !important;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:hover:not(:disabled) {color:black;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:focus {outline:2px solid #666;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:disabled {opacity:0.7;cursor:not-allowed;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:disabled:hover {color:grey;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn.active {background:var(--pie-primary, #3f51b5);color:var(--pie-white, #ffffff);}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn svg {width:24px;height:24px;}\n\n /* Done Button - matching React DoneButton component */.pie-editable-html.svelte-rx7so6 .done-btn {vertical-align:top;width:28px;height:28px;color:var(--editable-html-toolbar-check, #00bb00);padding:4px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;}.pie-editable-html.svelte-rx7so6 .done-btn:hover {background-color:rgba(0, 187, 0, 0.08);border-radius:4px;}.pie-editable-html.svelte-rx7so6 .done-btn svg {width:24px;height:24px;}\n\n /* Text alignment dropdown */.pie-editable-html.svelte-rx7so6 .align-dropdown {position:relative;}.pie-editable-html.svelte-rx7so6 .dropdown-arrow {margin-left:2px;font-size:8px;}.pie-editable-html.svelte-rx7so6 .align-menu {position:absolute;top:100%;left:0;background:var(--pie-white, #ffffff);display:flex;flex-direction:row;padding:2px;box-shadow:0px 1px 5px 0px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 3px 1px -2px rgba(0, 0, 0, 0.12);z-index:30;}.pie-editable-html.svelte-rx7so6 .align-menu-btn {color:var(--pie-disabled, grey);display:inline-flex;padding:4px;background:none;border:none;cursor:pointer;align-items:center;justify-content:center;min-width:32px;min-height:32px;}.pie-editable-html.svelte-rx7so6 .align-menu-btn:hover {color:var(--pie-black, #000000);background-color:rgba(0, 0, 0, 0.04);}\n\n /* ProseMirror editor styles */.pie-editable-html.svelte-rx7so6 .ProseMirror {outline:none !important;min-height:100px;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:14px;line-height:1.6;color:var(--pie-text, black);}.pie-editable-html.svelte-rx7so6 .ProseMirror p {margin:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror ul,\n .pie-editable-html.svelte-rx7so6 .ProseMirror ol {padding:0 1rem;margin:1.25rem 1rem 1.25rem 0.4rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror ul li p,\n .pie-editable-html.svelte-rx7so6 .ProseMirror ol li p {margin-top:0.25em;margin-bottom:0.25em;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h2,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h3,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h4,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h5,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h6 {line-height:1.1;margin-top:2.5rem;text-wrap:pretty;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h2 {margin-top:3.5rem;margin-bottom:1.5rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1 {font-size:1.4rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h2 {font-size:1.2rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h3 {font-size:1.1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h4,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h5,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h6 {font-size:1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror code {background-color:rgba(88, 5, 255, 0.05);border-radius:0.4rem;color:#2e2b29;font-size:0.85rem;padding:0.25em 0.3em;}.pie-editable-html.svelte-rx7so6 .ProseMirror pre {background:#2e2b29;border-radius:0.5rem;color:#fff;font-family:'JetBrainsMono', monospace;margin:1.5rem 0;padding:0.75rem 1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror pre code {background:none;color:inherit;font-size:0.8rem;padding:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror blockquote {border-left:3px solid rgba(61, 37, 20, 0.12);margin:1.5rem 0;padding-left:1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror hr {border:none;border-top:1px solid rgba(61, 37, 20, 0.08);margin:2rem 0;}.pie-editable-html.svelte-rx7so6 .ProseMirror img {max-width:100%;height:auto;}\n\n /* Table styles */.pie-editable-html.svelte-rx7so6 .ProseMirror table {table-layout:fixed;width:100%;border-collapse:collapse;color:var(--pie-text, black);background-color:var(--pie-background, rgba(255, 255, 255, 0));margin:1rem 0;}.pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) tr {border-top:1px solid #dfe2e5;}.pie-editable-html.svelte-rx7so6 .ProseMirror td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror th {padding:0.6em 1em;text-align:center;vertical-align:top;position:relative;}.pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) th {border:1px solid #dfe2e5;}.pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] {border:2px solid var(--pie-black, #000000);}.pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] th {border:1px solid var(--pie-black, #000000);}.pie-editable-html.svelte-rx7so6 .ProseMirror .selectedCell {background-color:rgba(200, 200, 255, 0.4);}\n\n /* Placeholder */.pie-editable-html.svelte-rx7so6 .ProseMirror p.is-editor-empty:first-child::before {content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror:focus {outline:none;}"
520
549
  };
521
- function Pt(e, i) {
522
- o(i, !0), I(e, Nt);
550
+ function Lt(e, i) {
551
+ o(i, !0), F(e, It);
523
552
  let s = j(i, "markup", 3, ""), l = j(i, "placeholder", 3, "Enter text here..."), d = j(i, "showToolbar", 3, !0), v = j(i, "disabled", 3, !1), y, C = b(null), w = b(!1), T = b(!1);
524
553
  function E() {
525
554
  return {
@@ -529,7 +558,7 @@ function Pt(e, i) {
529
558
  ...i.ariaLabel ? { "aria-label": i.ariaLabel } : {}
530
559
  };
531
560
  }
532
- let D = b(ie({
561
+ let D = b(ae({
533
562
  isBold: !1,
534
563
  canBold: !1,
535
564
  isItalic: !1,
@@ -575,11 +604,11 @@ function Pt(e, i) {
575
604
  textAlign: f(C).isActive({ textAlign: "right" }) ? "right" : f(C).isActive({ textAlign: "center" }) ? "center" : f(C).isActive({ textAlign: "justify" }) ? "justify" : "left"
576
605
  }, !0);
577
606
  }
578
- ne(() => {
579
- t(C, new fe({
607
+ re(() => {
608
+ t(C, new pe({
580
609
  element: y,
581
610
  extensions: [
582
- W.configure({
611
+ U.configure({
583
612
  heading: { levels: [
584
613
  1,
585
614
  2,
@@ -594,12 +623,12 @@ function Pt(e, i) {
594
623
  shouldAutoLink: () => !1
595
624
  }
596
625
  }),
597
- G,
598
- gt,
599
- ge.configure({ limit: 1e6 }),
626
+ W,
627
+ yt,
628
+ _e.configure({ limit: 1e6 }),
629
+ ye,
600
630
  ve,
601
- _e,
602
- K.configure({
631
+ G.configure({
603
632
  types: ["heading", "paragraph"],
604
633
  alignments: [
605
634
  "left",
@@ -607,15 +636,15 @@ function Pt(e, i) {
607
636
  "center"
608
637
  ]
609
638
  }),
610
- q,
611
- Tt.configure({
639
+ K,
640
+ Ot.configure({
612
641
  resizable: !0,
613
642
  HTMLAttributes: { border: "0" }
614
643
  }),
615
- ye,
616
- Et,
617
644
  be,
618
- xe.configure({ placeholder: () => l() })
645
+ kt,
646
+ xe,
647
+ Se.configure({ placeholder: () => l() })
619
648
  ],
620
649
  content: s() || "",
621
650
  editable: !v(),
@@ -658,56 +687,56 @@ function Pt(e, i) {
658
687
  function te() {
659
688
  f(C)?.chain().focus().toggleStrike().run();
660
689
  }
661
- function re() {
690
+ function ie() {
662
691
  f(C)?.chain().focus().toggleCode().run();
663
692
  }
664
- function ae() {
693
+ function oe() {
665
694
  f(C)?.chain().focus().toggleUnderline().run();
666
695
  }
667
- function oe() {
696
+ function se() {
668
697
  f(C)?.chain().focus().toggleSubscript().run();
669
698
  }
670
- function se() {
699
+ function ce() {
671
700
  f(C)?.chain().focus().toggleSuperscript().run();
672
701
  }
673
- function ce() {
702
+ function le() {
674
703
  f(C)?.chain().focus().toggleHeading({ level: 3 }).run();
675
704
  }
676
- function le() {
705
+ function ue() {
677
706
  f(C)?.chain().focus().toggleBulletList().run();
678
707
  }
679
- function ue() {
708
+ function de() {
680
709
  f(C)?.chain().focus().toggleOrderedList().run();
681
710
  }
682
- function R() {
711
+ function L() {
683
712
  f(C)?.chain().focus().undo().run();
684
713
  }
685
- function z() {
714
+ function R() {
686
715
  f(C)?.chain().focus().redo().run();
687
716
  }
688
- function de() {
717
+ function fe() {
689
718
  f(C)?.chain().focus().insertTable({
690
719
  rows: 2,
691
720
  cols: 2,
692
721
  withHeaderRow: !1
693
722
  }).run();
694
723
  }
695
- function pe() {
724
+ function me() {
696
725
  f(C)?.chain().focus().addRowAfter().run();
697
726
  }
698
- function me() {
727
+ function he() {
699
728
  f(C)?.chain().focus().deleteRow().run();
700
729
  }
701
- function B() {
730
+ function z() {
702
731
  f(C)?.chain().focus().addColumnAfter().run();
703
732
  }
704
- function V() {
733
+ function B() {
705
734
  f(C)?.chain().focus().deleteColumn().run();
706
735
  }
707
- function H() {
736
+ function V() {
708
737
  f(C)?.chain().focus().deleteTable().run();
709
738
  }
710
- function he() {
739
+ function ge() {
711
740
  if (!f(C)) return;
712
741
  let e = f(C).getAttributes("table"), t = {
713
742
  ...e,
@@ -715,136 +744,136 @@ function Pt(e, i) {
715
744
  };
716
745
  f(C).commands.updateAttributes("table", t);
717
746
  }
718
- function U(e) {
747
+ function H(e) {
719
748
  f(C)?.chain().focus().setTextAlign(e).run(), t(T, !1);
720
749
  }
721
- function Se() {
750
+ function Ce() {
722
751
  let e = window.prompt("Enter image URL:");
723
752
  e && f(C)?.chain().focus().setImage({ src: e }).run();
724
753
  }
725
- function J(e) {
754
+ function q(e) {
726
755
  e.preventDefault();
727
756
  }
728
- function Y() {
757
+ function J() {
729
758
  if (f(C)) {
730
759
  let e = f(C).getHTML();
731
760
  e !== s() && i.onChange?.(e), f(C).commands.blur();
732
761
  }
733
762
  }
734
- var X = Mt(), Z = a(X);
735
- let Q;
736
- var Ce = a(Z);
737
- F(a(Ce), (e) => y = e, () => y), P(Ce), P(Z);
738
- var we = g(Z, 2), Te = (e) => {
739
- var n = jt();
763
+ var Y = Ft(), X = a(Y);
764
+ let Z;
765
+ var we = a(X);
766
+ ne(a(we), (e) => y = e, () => y), P(we), P(X);
767
+ var Q = g(X, 2), Te = (e) => {
768
+ var n = Pt();
740
769
  let i;
741
770
  var o = a(n), s = a(o), l = a(s), d = (e) => {
742
- var t = Dt();
743
- L(t, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10.02H3V19z\"/></svg>", !0), P(t), p(() => t.disabled = !f(D).canTable), k("click", t, de), r(e, t);
771
+ var t = At();
772
+ I(t, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10.02H3V19z\"/></svg>", !0), P(t), p(() => t.disabled = !f(D).canTable), k("click", t, fe), r(e, t);
744
773
  };
745
774
  _(l, (e) => {
746
775
  f(D).isTable || e(d);
747
776
  });
748
777
  var h = g(l, 2), v = (e) => {
749
- var t = Ot(), n = c(t);
778
+ var t = jt(), n = c(t);
750
779
  let i;
751
- L(n, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z\"/></svg>", !0), P(n);
780
+ I(n, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z\"/></svg>", !0), P(n);
752
781
  var a = g(n, 2);
753
782
  let o;
754
- L(a, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z\"/></svg>", !0), P(a);
783
+ I(a, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z\"/></svg>", !0), P(a);
755
784
  var s = g(a, 2);
756
785
  let l;
757
- L(s, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z\"/></svg>", !0), P(s);
786
+ I(s, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z\"/></svg>", !0), P(s);
758
787
  var u = g(s, 2);
759
788
  let d;
760
- L(u, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z\"/></svg>", !0), P(u);
789
+ I(u, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z\"/></svg>", !0), P(u);
761
790
  var m = g(u, 2);
762
791
  let h;
763
- L(m, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z\"/></svg>", !0), P(m);
792
+ I(m, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z\"/></svg>", !0), P(m);
764
793
  var _ = g(m, 2);
765
794
  let v;
766
- L(_, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z\"/></svg>", !0), P(_), p(() => {
795
+ I(_, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z\"/></svg>", !0), P(_), p(() => {
767
796
  i = S(n, 1, "pie-toolbar-btn", null, i, { active: f(D).isTable }), n.disabled = !f(D).canTable, o = S(a, 1, "pie-toolbar-btn", null, o, { active: f(D).isTable }), a.disabled = !f(D).canTable, l = S(s, 1, "pie-toolbar-btn", null, l, { active: f(D).isTable }), s.disabled = !f(D).canTable, d = S(u, 1, "pie-toolbar-btn", null, d, { active: f(D).isTable }), u.disabled = !f(D).canTable, h = S(m, 1, "pie-toolbar-btn", null, h, { active: f(D).isTable }), m.disabled = !f(D).canTable, v = S(_, 1, "pie-toolbar-btn", null, v, { active: f(D).tableHasBorder }), _.disabled = !f(D).canTable;
768
- }), k("click", n, pe), k("click", a, me), k("click", s, B), k("click", u, V), k("click", m, H), k("click", _, he), r(e, t);
797
+ }), k("click", n, me), k("click", a, he), k("click", s, z), k("click", u, B), k("click", m, V), k("click", _, ge), r(e, t);
769
798
  };
770
799
  _(h, (e) => {
771
800
  f(D).isTable && e(v);
772
801
  });
773
802
  var y = g(h, 2), b = (e) => {
774
- var n = At(), i = c(n);
803
+ var n = Nt(), i = c(n);
775
804
  let o;
776
- L(i, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"/></svg>", !0), P(i);
805
+ I(i, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"/></svg>", !0), P(i);
777
806
  var s = g(i, 2);
778
807
  let l;
779
- L(s, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"/></svg>", !0), P(s);
808
+ I(s, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"/></svg>", !0), P(s);
780
809
  var d = g(s, 2);
781
810
  let h;
782
- L(d, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\"/></svg>", !0), P(d);
811
+ I(d, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\"/></svg>", !0), P(d);
783
812
  var v = g(d, 2);
784
813
  let y;
785
- L(v, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"/></svg>", !0), P(v);
814
+ I(v, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"/></svg>", !0), P(v);
786
815
  var b = g(v, 2);
787
816
  let x;
788
- L(b, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"/></svg>", !0), P(b);
817
+ I(b, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"/></svg>", !0), P(b);
789
818
  var C = g(b, 2);
790
819
  let w;
791
- L(C, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z\"/></svg>", !0), P(C);
820
+ I(C, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z\"/></svg>", !0), P(C);
792
821
  var E = g(C, 2);
793
822
  let O;
794
- L(E, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z\"/></svg>", !0), P(E);
823
+ I(E, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z\"/></svg>", !0), P(E);
795
824
  var A = g(E, 2);
796
825
  let j;
797
- L(A, () => "<svg width=\"20\" height=\"18\" viewBox=\"0 0 30 28\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z\"/></svg>", !0), P(A);
826
+ I(A, () => "<svg width=\"20\" height=\"18\" viewBox=\"0 0 30 28\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z\"/></svg>", !0), P(A);
798
827
  var M = g(A, 2);
799
- L(M, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"/></svg>", !0), P(M);
800
- var F = g(M, 2), I = a(F), ne = a(I), ie = (e) => {
801
- var t = m();
802
- L(c(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), r(e, t);
803
- }, de = (e) => {
828
+ I(M, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"/></svg>", !0), P(M);
829
+ var ne = g(M, 2), F = a(ne), re = a(F), ae = (e) => {
804
830
  var t = m();
805
- L(c(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>"), r(e, t);
831
+ I(c(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), r(e, t);
806
832
  }, fe = (e) => {
807
833
  var t = m();
808
- L(c(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), r(e, t);
834
+ I(c(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>"), r(e, t);
835
+ }, pe = (e) => {
836
+ var t = m();
837
+ I(c(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), r(e, t);
809
838
  };
810
- _(ne, (e) => {
811
- f(D).textAlign === "right" ? e(ie) : f(D).textAlign === "center" ? e(de, 1) : e(fe, -1);
812
- }), u(2), P(I);
813
- var pe = g(I, 2), me = (e) => {
814
- var t = kt(), n = a(t);
815
- L(n, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), P(n);
839
+ _(re, (e) => {
840
+ f(D).textAlign === "right" ? e(ae) : f(D).textAlign === "center" ? e(fe, 1) : e(pe, -1);
841
+ }), u(2), P(F);
842
+ var me = g(F, 2), he = (e) => {
843
+ var t = Mt(), n = a(t);
844
+ I(n, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), P(n);
816
845
  var i = g(n, 2);
817
- L(i, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>", !0), P(i);
846
+ I(i, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>", !0), P(i);
818
847
  var o = g(i, 2);
819
- L(o, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), P(o), P(t), k("click", n, () => U("left")), k("click", i, () => U("center")), k("click", o, () => U("right")), r(e, t);
848
+ I(o, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), P(o), P(t), k("click", n, () => H("left")), k("click", i, () => H("center")), k("click", o, () => H("right")), r(e, t);
820
849
  };
821
- _(pe, (e) => {
822
- f(T) && e(me);
823
- }), P(F);
824
- var B = g(F, 2);
825
- let V;
826
- L(B, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"/></svg>", !0), P(B);
827
- var H = g(B, 2);
828
- let he;
829
- L(H, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"/></svg>", !0), P(H);
830
- var W = g(H, 2);
831
- L(W, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>", !0), P(W);
832
- var G = g(W, 2);
833
- L(G, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>", !0), P(G), p(() => {
834
- o = S(i, 1, "pie-toolbar-btn", null, o, { active: f(D).isBold }), i.disabled = !f(D).canBold, l = S(s, 1, "pie-toolbar-btn", null, l, { active: f(D).isItalic }), s.disabled = !f(D).canItalic, h = S(d, 1, "pie-toolbar-btn", null, h, { active: f(D).isStrike }), d.disabled = !f(D).canStrike, y = S(v, 1, "pie-toolbar-btn", null, y, { active: f(D).isCode }), v.disabled = !f(D).canCode, x = S(b, 1, "pie-toolbar-btn", null, x, { active: f(D).isUnderline }), w = S(C, 1, "pie-toolbar-btn", null, w, { active: f(D).isSubScript }), O = S(E, 1, "pie-toolbar-btn", null, O, { active: f(D).isSuperScript }), j = S(A, 1, "pie-toolbar-btn", null, j, { active: f(D).isHeading3 }), V = S(B, 1, "pie-toolbar-btn", null, V, { active: f(D).isBulletList }), he = S(H, 1, "pie-toolbar-btn", null, he, { active: f(D).isOrderedList }), W.disabled = !f(D).canUndo, G.disabled = !f(D).canRedo;
835
- }), k("click", i, ee), k("click", s, N), k("click", d, te), k("click", v, re), k("click", b, ae), k("click", C, oe), k("click", E, se), k("click", A, ce), k("click", M, Se), k("click", I, () => t(T, !f(T))), k("click", B, le), k("click", H, ue), k("click", W, R), k("click", G, z), r(e, n);
850
+ _(me, (e) => {
851
+ f(T) && e(he);
852
+ }), P(ne);
853
+ var z = g(ne, 2);
854
+ let B;
855
+ I(z, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"/></svg>", !0), P(z);
856
+ var V = g(z, 2);
857
+ let ge;
858
+ I(V, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"/></svg>", !0), P(V);
859
+ var U = g(V, 2);
860
+ I(U, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>", !0), P(U);
861
+ var W = g(U, 2);
862
+ I(W, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>", !0), P(W), p(() => {
863
+ o = S(i, 1, "pie-toolbar-btn", null, o, { active: f(D).isBold }), i.disabled = !f(D).canBold, l = S(s, 1, "pie-toolbar-btn", null, l, { active: f(D).isItalic }), s.disabled = !f(D).canItalic, h = S(d, 1, "pie-toolbar-btn", null, h, { active: f(D).isStrike }), d.disabled = !f(D).canStrike, y = S(v, 1, "pie-toolbar-btn", null, y, { active: f(D).isCode }), v.disabled = !f(D).canCode, x = S(b, 1, "pie-toolbar-btn", null, x, { active: f(D).isUnderline }), w = S(C, 1, "pie-toolbar-btn", null, w, { active: f(D).isSubScript }), O = S(E, 1, "pie-toolbar-btn", null, O, { active: f(D).isSuperScript }), j = S(A, 1, "pie-toolbar-btn", null, j, { active: f(D).isHeading3 }), B = S(z, 1, "pie-toolbar-btn", null, B, { active: f(D).isBulletList }), ge = S(V, 1, "pie-toolbar-btn", null, ge, { active: f(D).isOrderedList }), U.disabled = !f(D).canUndo, W.disabled = !f(D).canRedo;
864
+ }), k("click", i, ee), k("click", s, N), k("click", d, te), k("click", v, ie), k("click", b, oe), k("click", C, se), k("click", E, ce), k("click", A, le), k("click", M, Ce), k("click", F, () => t(T, !f(T))), k("click", z, ue), k("click", V, de), k("click", U, L), k("click", W, R), r(e, n);
836
865
  };
837
866
  _(y, (e) => {
838
867
  f(D).isTable || e(b);
839
868
  }), P(s);
840
869
  var x = g(s, 2);
841
- L(x, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg>", !0), P(x), P(o), P(n), p(() => {
870
+ I(x, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg>", !0), P(x), P(o), P(n), p(() => {
842
871
  i = S(n, 1, "toolbar", null, i, { focused: f(w) }), n.inert = !f(w);
843
- }), k("mousedown", n, J), k("click", x, Y), r(e, n);
872
+ }), k("mousedown", n, q), k("click", x, J), r(e, n);
844
873
  };
845
- _(we, (e) => {
874
+ _(Q, (e) => {
846
875
  d() && f(C) && e(Te);
847
- }), P(X), p(() => Q = S(Z, 1, "editor-holder", null, Q, { disabled: v() })), k("focusin", X, A), k("focusout", X, M), r(e, X), x();
876
+ }), P(Y), p(() => Z = S(X, 1, "editor-holder", null, Z, { disabled: v() })), k("focusin", Y, A), k("focusout", Y, M), r(e, Y), x();
848
877
  }
849
878
  e([
850
879
  "focusin",
@@ -854,19 +883,19 @@ e([
854
883
  ]);
855
884
  //#endregion
856
885
  //#region ../../lib-svelte/editable-html-tiptap-svelte/dist/index.js
857
- var Ft = Pt, It = A("<button type=\"button\" role=\"radio\"><span class=\"cell-key svelte-1u97j9p\"> </span> <span class=\"cell-label svelte-1u97j9p\"> </span></button>"), Lt = A("<div class=\"region-picker svelte-1u97j9p\" role=\"radiogroup\" aria-label=\"Correct region\"></div>"), Rt = {
886
+ var Rt = Lt, zt = A("<button type=\"button\" role=\"radio\"><span class=\"cell-key svelte-1u97j9p\"> </span> <span class=\"cell-label svelte-1u97j9p\"> </span></button>"), Bt = A("<div class=\"region-picker svelte-1u97j9p\" role=\"radiogroup\" aria-label=\"Correct region\"></div>"), Vt = {
858
887
  hash: "svelte-1u97j9p",
859
888
  code: ".region-picker.svelte-1u97j9p {display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:6px;}.region-cell.svelte-1u97j9p {display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border:1.5px solid #cbd5e1;border-radius:6px;background:#ffffff;cursor:pointer;text-align:left;font-size:12px;}.region-cell.svelte-1u97j9p:hover {background:#f1f5f9;}.region-cell.selected.svelte-1u97j9p {border-color:#2563eb;background:#eff6ff;}.cell-key.svelte-1u97j9p {font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:11px;color:#64748b;}.cell-label.svelte-1u97j9p {font-weight:500;color:#0f172a;}"
860
889
  };
861
- function zt(e, t) {
862
- o(t, !0), I(e, Rt);
863
- let n = j(t, "circles", 7), c = j(t, "regionLabels", 23, () => ({})), l = j(t, "value", 7), u = j(t, "onchange", 7), m = y(() => se(n()?.length || 0));
890
+ function Ht(e, t) {
891
+ o(t, !0), F(e, Vt);
892
+ let n = j(t, "circles", 7), c = j(t, "regionLabels", 23, () => ({})), l = j(t, "value", 7), u = j(t, "onchange", 7), m = y(() => ce(n()?.length || 0));
864
893
  function h(e) {
865
- let t = z(e), r = c()?.[t];
866
- return r && r.trim().length > 0 ? r : le(n() || [], e);
894
+ let t = R(e), r = c()?.[t];
895
+ return r && r.trim().length > 0 ? r : ue(n() || [], e);
867
896
  }
868
897
  function _(e) {
869
- return de(e, l());
898
+ return fe(e, l());
870
899
  }
871
900
  var v = {
872
901
  get circles() {
@@ -893,9 +922,9 @@ function zt(e, t) {
893
922
  set onchange(e) {
894
923
  u(e), s();
895
924
  }
896
- }, b = Lt();
897
- return C(b, 21, () => f(m), (e) => z(e), (e, t) => {
898
- var n = It();
925
+ }, b = Bt();
926
+ return C(b, 21, () => f(m), (e) => R(e), (e, t) => {
927
+ var n = zt();
899
928
  let o;
900
929
  var s = a(n), c = d(s, !0), l = d(g(s, 2), !0);
901
930
  P(n), p((e, t, r, a) => {
@@ -903,12 +932,12 @@ function zt(e, t) {
903
932
  }, [
904
933
  () => _(f(t)),
905
934
  () => _(f(t)),
906
- () => z(f(t)) || "—",
935
+ () => R(f(t)) || "—",
907
936
  () => h(f(t))
908
937
  ]), k("click", n, () => u()(f(t))), r(e, n);
909
938
  }), P(b), r(e, b), x(v);
910
939
  }
911
- e(["click"]), w(zt, {
940
+ e(["click"]), w(Ht, {
912
941
  circles: {},
913
942
  regionLabels: {},
914
943
  value: {},
@@ -916,13 +945,13 @@ e(["click"]), w(zt, {
916
945
  }, [], [], { mode: "open" });
917
946
  //#endregion
918
947
  //#region src/author/Author.svelte
919
- var Bt = A("<div class=\"field-group svelte-13ppn6m\"><div class=\"field-header svelte-13ppn6m\"> </div> <!></div>"), Vt = A("<label class=\"circle-label-row svelte-13ppn6m\"><span></span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label>"), Ht = A("<div class=\"hint svelte-13ppn6m\">Add at least one tile; each tile needs a correct region and either a label (text or simple HTML) or an\n image URL plus short alt text.</div>"), Ut = A("<div class=\"tile-field-full svelte-13ppn6m\"><button type=\"button\" class=\"btn-ghost svelte-13ppn6m\">Remove image</button></div>"), Wt = A("<li class=\"tile-row svelte-13ppn6m\"><div class=\"tile-row-header svelte-13ppn6m\"><div class=\"tile-inputs svelte-13ppn6m\"><label class=\"svelte-13ppn6m\"><span>ID</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input svelte-13ppn6m\"><span>Label</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input tile-field-full svelte-13ppn6m\"><span>Image URL (optional)</span> <input type=\"text\" placeholder=\"https://… or data:image/…\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input tile-field-full svelte-13ppn6m\"><span>Image alt (required if image URL is set)</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <!></div> <div class=\"tile-actions svelte-13ppn6m\"><button type=\"button\" class=\"btn-ghost svelte-13ppn6m\" aria-label=\"Move up\">↑</button> <button type=\"button\" class=\"btn-ghost svelte-13ppn6m\" aria-label=\"Move down\">↓</button> <button type=\"button\" class=\"btn-ghost danger svelte-13ppn6m\" aria-label=\"Remove\">✕</button></div></div> <div class=\"tile-region svelte-13ppn6m\"><div class=\"region-header svelte-13ppn6m\">Correct region</div> <!></div></li>"), Gt = A("<label class=\"override-row svelte-13ppn6m\"><span class=\"override-key svelte-13ppn6m\"> </span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label>"), Kt = A("<div class=\"preview-diagram svelte-13ppn6m\"><!></div>"), qt = A("<p class=\"hint preview-diagram-placeholder svelte-13ppn6m\">Add at least one tile to see the diagram.</p>"), Jt = A("<p class=\"hint preview-diagram-placeholder svelte-13ppn6m\">Exactly two circles are required for the preview.</p>"), Yt = A("<img alt=\"\" class=\"preview-thumb svelte-13ppn6m\" aria-hidden=\"true\"/>"), Xt = A("<li class=\"svelte-13ppn6m\"><span class=\"preview-tile svelte-13ppn6m\"><!> </span> <span class=\"preview-arrow svelte-13ppn6m\">→</span> <span class=\"preview-region svelte-13ppn6m\"> </span></li>"), Zt = A("<div class=\"preview-list-heading svelte-13ppn6m\">Correct regions</div> <ol class=\"preview-list svelte-13ppn6m\"></ol>", 1), Qt = A("<div class=\"author-shell svelte-13ppn6m\"><div class=\"editor-column svelte-13ppn6m\"><!> <!> <div class=\"field-group svelte-13ppn6m\"><div class=\"field-header svelte-13ppn6m\">Circles</div> <p class=\"hint circle-count-note svelte-13ppn6m\">2 circles (4 regions).</p> <div class=\"circle-labels svelte-13ppn6m\"></div></div> <div class=\"field-group svelte-13ppn6m\"><div class=\"field-header-row svelte-13ppn6m\"><span class=\"field-header svelte-13ppn6m\">Tiles</span> <button type=\"button\" class=\"btn-add svelte-13ppn6m\">+ Add tile</button></div> <!> <ul class=\"tile-list svelte-13ppn6m\"></ul></div> <details class=\"field-group svelte-13ppn6m\"><summary class=\"field-header svelte-13ppn6m\">Region labels (advanced)</summary> <p class=\"hint svelte-13ppn6m\">Override the auto-composed region labels that delivery uses for aria-labels and visible region chrome.</p> <!></details></div> <button type=\"button\" class=\"split-gutter svelte-13ppn6m\" role=\"slider\" aria-orientation=\"vertical\" aria-label=\"Resize editor and preview panels\"></button> <div class=\"preview-column svelte-13ppn6m\"><div class=\"preview-header svelte-13ppn6m\">Preview</div> <div class=\"preview-note svelte-13ppn6m\">Live diagram with each tile in its authored <em>correct region</em>. Drag the vertical handle (or use\n arrow keys when it is focused) to change the editor / preview split.</div> <div class=\"preview-summary svelte-13ppn6m\"><div><strong>Circles:</strong> </div> <div><strong>Scoring:</strong> </div> <div><strong>Tiles:</strong> </div></div> <!> <!></div></div>"), $t = A("<div class=\"venn-author svelte-13ppn6m\"><!></div>"), en = {
948
+ var Ut = A("<div class=\"field-group svelte-13ppn6m\"><div class=\"field-header svelte-13ppn6m\"> </div> <!></div>"), Wt = A("<label class=\"circle-label-row svelte-13ppn6m\"><span></span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label>"), Gt = A("<div class=\"hint svelte-13ppn6m\">Add at least one tile; each tile needs a correct region and either a label (text or simple HTML) or an\n image URL plus short alt text.</div>"), Kt = A("<div class=\"tile-field-full svelte-13ppn6m\"><button type=\"button\" class=\"btn-ghost svelte-13ppn6m\">Remove image</button></div>"), qt = A("<li class=\"tile-row svelte-13ppn6m\"><div class=\"tile-row-header svelte-13ppn6m\"><div class=\"tile-inputs svelte-13ppn6m\"><label class=\"svelte-13ppn6m\"><span>ID</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input svelte-13ppn6m\"><span>Label</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input tile-field-full svelte-13ppn6m\"><span>Image URL (optional)</span> <input type=\"text\" placeholder=\"https://… or data:image/…\" class=\"svelte-13ppn6m\"/></label> <label class=\"label-input tile-field-full svelte-13ppn6m\"><span>Image alt (required if image URL is set)</span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label> <!></div> <div class=\"tile-actions svelte-13ppn6m\"><button type=\"button\" class=\"btn-ghost svelte-13ppn6m\" aria-label=\"Move up\">↑</button> <button type=\"button\" class=\"btn-ghost svelte-13ppn6m\" aria-label=\"Move down\">↓</button> <button type=\"button\" class=\"btn-ghost danger svelte-13ppn6m\" aria-label=\"Remove\">✕</button></div></div> <div class=\"tile-region svelte-13ppn6m\"><div class=\"region-header svelte-13ppn6m\">Correct region</div> <!></div></li>"), Jt = A("<label class=\"override-row svelte-13ppn6m\"><span class=\"override-key svelte-13ppn6m\"> </span> <input type=\"text\" class=\"svelte-13ppn6m\"/></label>"), Yt = A("<div class=\"preview-diagram svelte-13ppn6m\"><!></div>"), Xt = A("<p class=\"hint preview-diagram-placeholder svelte-13ppn6m\">Add at least one tile to see the diagram.</p>"), Zt = A("<p class=\"hint preview-diagram-placeholder svelte-13ppn6m\">Exactly two circles are required for the preview.</p>"), Qt = A("<img alt=\"\" class=\"preview-thumb svelte-13ppn6m\" aria-hidden=\"true\"/>"), $t = A("<li class=\"svelte-13ppn6m\"><span class=\"preview-tile svelte-13ppn6m\"><!> </span> <span class=\"preview-arrow svelte-13ppn6m\">→</span> <span class=\"preview-region svelte-13ppn6m\"> </span></li>"), en = A("<div class=\"preview-list-heading svelte-13ppn6m\">Correct regions</div> <ol class=\"preview-list svelte-13ppn6m\"></ol>", 1), tn = A("<div class=\"author-shell svelte-13ppn6m\"><div class=\"editor-column svelte-13ppn6m\"><!> <!> <div class=\"field-group svelte-13ppn6m\"><div class=\"field-header svelte-13ppn6m\">Circles</div> <p class=\"hint circle-count-note svelte-13ppn6m\">2 circles (4 regions).</p> <div class=\"circle-labels svelte-13ppn6m\"></div></div> <div class=\"field-group svelte-13ppn6m\"><div class=\"field-header-row svelte-13ppn6m\"><span class=\"field-header svelte-13ppn6m\">Tiles</span> <button type=\"button\" class=\"btn-add svelte-13ppn6m\">+ Add tile</button></div> <!> <ul class=\"tile-list svelte-13ppn6m\"></ul></div> <details class=\"field-group svelte-13ppn6m\"><summary class=\"field-header svelte-13ppn6m\">Region labels (advanced)</summary> <p class=\"hint svelte-13ppn6m\">Override the auto-composed region labels that delivery uses for aria-labels and visible region chrome.</p> <!></details></div> <button type=\"button\" class=\"split-gutter svelte-13ppn6m\" role=\"slider\" aria-orientation=\"vertical\" aria-label=\"Resize editor and preview panels\"></button> <div class=\"preview-column svelte-13ppn6m\"><div class=\"preview-header svelte-13ppn6m\">Preview</div> <div class=\"preview-note svelte-13ppn6m\">Live diagram with each tile in its authored <em>correct region</em>. Drag the vertical handle (or use\n arrow keys when it is focused) to change the editor / preview split.</div> <div class=\"preview-summary svelte-13ppn6m\"><div><strong>Circles:</strong> </div> <div><strong>Scoring:</strong> </div> <div><strong>Tiles:</strong> </div></div> <!> <!></div></div>"), nn = A("<div class=\"venn-author svelte-13ppn6m\"><!></div>"), rn = {
920
949
  hash: "svelte-13ppn6m",
921
950
  code: ".venn-author.svelte-13ppn6m {padding:24px;font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;color:#0f172a;box-sizing:border-box;--vc-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );}.author-shell.svelte-13ppn6m {display:flex;flex-direction:row;align-items:stretch;gap:0;width:100%;min-height:min(72vh, 720px);max-height:min(85vh, 960px);box-sizing:border-box;}.editor-column.svelte-13ppn6m {display:flex;flex-direction:column;gap:20px;flex-shrink:0;overflow:auto;min-width:0;}.split-gutter.svelte-13ppn6m {flex:0 0 6px;width:6px;margin:0;padding:0;border:none;border-left:1px solid #cbd5e1;border-right:1px solid #cbd5e1;cursor:col-resize;touch-action:none;background:#e2e8f0;align-self:stretch;}.split-gutter.svelte-13ppn6m:hover,\n .split-gutter.svelte-13ppn6m:focus-visible {background:#cbd5e1;}.split-gutter.svelte-13ppn6m:focus-visible {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}\n @media (max-width: 900px) {.author-shell.svelte-13ppn6m {flex-direction:column;min-height:unset;max-height:unset;}.editor-column.svelte-13ppn6m {width:100% !important;flex:none;max-width:none;}.split-gutter.svelte-13ppn6m {display:none;}.preview-column.svelte-13ppn6m {flex:none;width:100%;}\n }.field-group.svelte-13ppn6m {border:1px solid #e2e8f0;border-radius:8px;padding:16px;background:#ffffff;}.field-header.svelte-13ppn6m,\n .field-header-row.svelte-13ppn6m {display:flex;align-items:center;justify-content:space-between;font-weight:600;font-size:14px;margin-bottom:12px;color:#0f172a;}.field-header-row.svelte-13ppn6m {gap:8px;}.btn-add.svelte-13ppn6m {background:#2563eb;color:#ffffff;border:none;padding:6px 10px;border-radius:6px;font-size:12px;cursor:pointer;}.btn-add.svelte-13ppn6m:hover {background:#1d4ed8;}.btn-ghost.svelte-13ppn6m {background:transparent;border:1px solid #cbd5e1;border-radius:4px;padding:2px 8px;cursor:pointer;font-size:13px;}.btn-ghost.svelte-13ppn6m:hover:not(:disabled) {background:#f1f5f9;}.btn-ghost.svelte-13ppn6m:disabled {opacity:0.4;cursor:not-allowed;}.btn-ghost.danger.svelte-13ppn6m {color:#bf0d00;}.circle-labels.svelte-13ppn6m {display:flex;flex-direction:column;gap:8px;}.circle-count-note.svelte-13ppn6m {margin:0 0 4px 0;}.circle-label-row.svelte-13ppn6m {display:grid;grid-template-columns:120px minmax(0, 1fr);align-items:center;gap:8px;font-size:13px;}.circle-label-row.svelte-13ppn6m input:where(.svelte-13ppn6m),\n .tile-inputs.svelte-13ppn6m input:where(.svelte-13ppn6m),\n .override-row.svelte-13ppn6m input:where(.svelte-13ppn6m) {padding:6px 8px;border:1px solid #cbd5e1;border-radius:4px;font-size:13px;width:100%;box-sizing:border-box;}.tile-list.svelte-13ppn6m {list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;}.tile-row.svelte-13ppn6m {border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;background:#f8fafc;}.tile-row-header.svelte-13ppn6m {display:flex;gap:8px;align-items:center;}.tile-inputs.svelte-13ppn6m {flex:1;display:grid;grid-template-columns:140px 1fr;gap:8px;}.tile-inputs.svelte-13ppn6m label:where(.svelte-13ppn6m) {display:flex;flex-direction:column;gap:2px;font-size:12px;color:#475569;}.tile-inputs.svelte-13ppn6m .tile-field-full:where(.svelte-13ppn6m) {grid-column:1 / -1;}.tile-actions.svelte-13ppn6m {display:flex;gap:4px;}.tile-region.svelte-13ppn6m {margin-top:8px;}.region-header.svelte-13ppn6m {font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;}.override-row.svelte-13ppn6m {display:grid;grid-template-columns:100px minmax(0, 1fr);align-items:center;gap:8px;font-size:13px;margin-top:6px;}.override-key.svelte-13ppn6m {font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:12px;color:#64748b;}.hint.svelte-13ppn6m {font-size:12px;color:#64748b;margin:8px 0;}.preview-column.svelte-13ppn6m {flex:1 1 auto;min-width:0;overflow:auto;border:1px solid #e2e8f0;border-radius:8px;padding:16px;background:#ffffff;}.preview-diagram.svelte-13ppn6m {margin:12px 0 16px 0;max-width:100%;overflow-x:auto;}.preview-diagram.svelte-13ppn6m .venn-root {padding-top:8px;}.preview-list-heading.svelte-13ppn6m {font-size:12px;font-weight:600;color:#475569;margin:8px 0 6px 0;}.preview-diagram-placeholder.svelte-13ppn6m {margin:12px 0;}.preview-header.svelte-13ppn6m {font-weight:600;font-size:14px;margin-bottom:8px;}.preview-note.svelte-13ppn6m {font-size:12px;color:#64748b;margin-bottom:12px;}.preview-summary.svelte-13ppn6m {font-size:13px;line-height:1.5;color:#334155;margin-bottom:10px;}.preview-list.svelte-13ppn6m {list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px;}.preview-list.svelte-13ppn6m li:where(.svelte-13ppn6m) {display:flex;align-items:center;gap:6px;font-size:13px;}.preview-tile.svelte-13ppn6m {display:inline-flex;align-items:center;gap:6px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:4px;padding:2px 6px;color:#1d4ed8;}.preview-thumb.svelte-13ppn6m {width:22px;height:22px;object-fit:contain;flex-shrink:0;}.preview-arrow.svelte-13ppn6m {color:#94a3b8;}.preview-region.svelte-13ppn6m {color:#0f172a;}"
922
951
  };
923
- function tn(e, n) {
924
- o(n, !0), I(e, en);
925
- let l = j(n, "model", 7), u = j(n, "configuration", 7), m = y(() => Ce(R.configuration, u())), v = [{
952
+ function an(e, n) {
953
+ o(n, !0), F(e, rn);
954
+ let l = j(n, "model", 7), u = j(n, "configuration", 7), m = y(() => we(L.configuration, u())), v = [{
926
955
  label: "Partial credit per tile",
927
956
  value: "partialPerTile"
928
957
  }, {
@@ -930,10 +959,10 @@ function tn(e, n) {
930
959
  value: "allOrNothing"
931
960
  }];
932
961
  function S(e) {
933
- n.$$host.model = e, n.$$host.dispatchEvent(new Se(e));
962
+ n.$$host.model = e, n.$$host.dispatchEvent(new Ce(e));
934
963
  }
935
964
  function w() {
936
- return ce(l() || void 0);
965
+ return le(l() || void 0);
937
966
  }
938
967
  function A(e) {
939
968
  S({
@@ -944,13 +973,13 @@ function tn(e, n) {
944
973
  function M(e) {
945
974
  A({ prompt: e });
946
975
  }
947
- function ne(e, t) {
976
+ function re(e, t) {
948
977
  A({ circles: w().circles.map((n, r) => r === e ? {
949
978
  ...n,
950
979
  label: t
951
980
  } : n) });
952
981
  }
953
- function L() {
982
+ function I() {
954
983
  let e = w(), t = {
955
984
  id: `tile-${Date.now().toString(36)}-${Math.floor(Math.random() * 1e3).toString(36)}`,
956
985
  label: "New tile",
@@ -958,23 +987,23 @@ function tn(e, n) {
958
987
  };
959
988
  A({ tiles: [...e.tiles, t] });
960
989
  }
961
- function ie(e) {
990
+ function ae(e) {
962
991
  let t = w().tiles.slice();
963
992
  t.splice(e, 1), A({ tiles: t });
964
993
  }
965
- function de(e, t) {
994
+ function fe(e, t) {
966
995
  let n = w(), r = e + t;
967
996
  if (r < 0 || r >= n.tiles.length) return;
968
997
  let i = n.tiles.slice();
969
998
  [i[e], i[r]] = [i[r], i[e]], A({ tiles: i });
970
999
  }
971
- function fe(e, t) {
1000
+ function pe(e, t) {
972
1001
  A({ tiles: w().tiles.map((n, r) => r === e ? {
973
1002
  ...n,
974
1003
  label: t
975
1004
  } : n) });
976
1005
  }
977
- function pe(e, t) {
1006
+ function me(e, t) {
978
1007
  let n = w(), r = t.trim();
979
1008
  A({ tiles: n.tiles.map((t, n) => n === e ? {
980
1009
  ...t,
@@ -984,72 +1013,72 @@ function tn(e, n) {
984
1013
  }
985
1014
  } : t) });
986
1015
  }
987
- function me(e, t) {
1016
+ function he(e, t) {
988
1017
  A({ tiles: w().tiles.map((n, r) => r === e ? {
989
1018
  ...n,
990
1019
  imageAlt: t.trim() || void 0
991
1020
  } : n) });
992
1021
  }
993
- function B(e) {
1022
+ function z(e) {
994
1023
  A({ tiles: w().tiles.map((t, n) => {
995
1024
  if (n !== e) return t;
996
1025
  let { imageUrl: r, imageAlt: i, ...a } = t;
997
1026
  return a;
998
1027
  }) });
999
1028
  }
1000
- function V(e, t) {
1029
+ function B(e, t) {
1001
1030
  A({ tiles: w().tiles.map((n, r) => r === e ? {
1002
1031
  ...n,
1003
1032
  id: t
1004
1033
  } : n) });
1005
1034
  }
1006
- function H(e, t) {
1035
+ function V(e, t) {
1007
1036
  A({ tiles: w().tiles.map((n, r) => r === e ? {
1008
1037
  ...n,
1009
- correctRegion: ae(t)
1038
+ correctRegion: oe(t)
1010
1039
  } : n) });
1011
1040
  }
1012
- function he(e, t) {
1041
+ function ge(e, t) {
1013
1042
  let n = { ...w().regionLabels || {} };
1014
1043
  t.trim().length === 0 ? delete n[e] : n[e] = t, A({ regionLabels: n });
1015
1044
  }
1016
- let U = y(w), W = y(() => se(f(U).circles?.length || 0)), G = y(() => {
1045
+ let H = y(w), U = y(() => ce(f(H).circles?.length || 0)), W = y(() => {
1017
1046
  let e = /* @__PURE__ */ new Set();
1018
- return f(U).tiles.filter((t) => e.has(t.id) ? !1 : (e.add(t.id), !0));
1019
- }), ge = y(() => ue({
1020
- ...f(U),
1021
- tiles: f(G)
1022
- })), _e = y(() => ({
1023
- circles: f(U).circles,
1024
- tiles: f(G),
1025
- regionLabels: f(U).regionLabels ?? {},
1026
- prompt: f(U).promptEnabled === !1 ? null : f(U).prompt ?? null,
1047
+ return f(H).tiles.filter((t) => e.has(t.id) ? !1 : (e.add(t.id), !0));
1048
+ }), _e = y(() => de({
1049
+ ...f(H),
1050
+ tiles: f(W)
1051
+ })), ve = y(() => ({
1052
+ circles: f(H).circles,
1053
+ tiles: f(W),
1054
+ regionLabels: f(H).regionLabels ?? {},
1055
+ prompt: f(H).promptEnabled === !1 ? null : f(H).prompt ?? null,
1027
1056
  disabled: !0,
1028
1057
  env: { mode: "view" }
1029
- })), ve = b(null), K = b(0), q = b(null);
1058
+ })), ye = b(null), G = b(0), K = b(null);
1030
1059
  h(() => {
1031
- f(K) > 0 && f(q) === null && t(q, Math.floor((f(K) - 6) / 2), !0);
1060
+ f(G) > 0 && f(K) === null && t(K, Math.floor((f(G) - 6) / 2), !0);
1032
1061
  }), h(() => {
1033
- if (f(K) <= 0 || f(q) === null) return;
1034
- let e = f(K) - 200 - 6;
1035
- f(q) > e && t(q, e), f(q) < 260 && t(q, 260);
1062
+ if (f(G) <= 0 || f(K) === null) return;
1063
+ let e = f(G) - 200 - 6;
1064
+ f(K) > e && t(K, e), f(K) < 260 && t(K, 260);
1036
1065
  });
1037
- let ye = y(() => {
1038
- let e = f(K);
1066
+ let be = y(() => {
1067
+ let e = f(G);
1039
1068
  if (!e) return "50%";
1040
- let t = e - 200 - 6, n = f(q) ?? Math.floor((e - 6) / 2);
1069
+ let t = e - 200 - 6, n = f(K) ?? Math.floor((e - 6) / 2);
1041
1070
  return `${Math.min(Math.max(n, 260), t)}px`;
1042
1071
  });
1043
- function be(e) {
1044
- let n = f(ve);
1072
+ function xe(e) {
1073
+ let n = f(ye);
1045
1074
  if (!n) return;
1046
1075
  e.preventDefault();
1047
1076
  let r = n, i = e.currentTarget;
1048
1077
  i.setPointerCapture(e.pointerId);
1049
- let a = r.getBoundingClientRect(), o = e.clientX, s = f(q) ?? Math.floor((a.width - 6) / 2);
1078
+ let a = r.getBoundingClientRect(), o = e.clientX, s = f(K) ?? Math.floor((a.width - 6) / 2);
1050
1079
  function c(e) {
1051
1080
  let n = r.getBoundingClientRect().width - 200 - 6, i = e.clientX - o;
1052
- t(q, Math.min(Math.max(s + i, 260), n), !0);
1081
+ t(K, Math.min(Math.max(s + i, 260), n), !0);
1053
1082
  }
1054
1083
  function l(e) {
1055
1084
  try {
@@ -1059,13 +1088,13 @@ function tn(e, n) {
1059
1088
  }
1060
1089
  window.addEventListener("pointermove", c), window.addEventListener("pointerup", l), window.addEventListener("pointercancel", l);
1061
1090
  }
1062
- function xe(e) {
1063
- let n = f(ve);
1064
- if (!n || f(q) === null) return;
1091
+ function Se(e) {
1092
+ let n = f(ye);
1093
+ if (!n || f(K) === null) return;
1065
1094
  let r = n.getBoundingClientRect().width - 200 - 6;
1066
- e.key === "ArrowLeft" ? (e.preventDefault(), t(q, Math.max(260, f(q) - 24), !0)) : e.key === "ArrowRight" && (e.preventDefault(), t(q, Math.min(r, f(q) + 24), !0));
1095
+ e.key === "ArrowLeft" ? (e.preventDefault(), t(K, Math.max(260, f(K) - 24), !0)) : e.key === "ArrowRight" && (e.preventDefault(), t(K, Math.min(r, f(K) + 24), !0));
1067
1096
  }
1068
- var J = {
1097
+ var q = {
1069
1098
  get model() {
1070
1099
  return l();
1071
1100
  },
@@ -1078,7 +1107,7 @@ function tn(e, n) {
1078
1107
  set configuration(e) {
1079
1108
  u(e), s();
1080
1109
  }
1081
- }, Y = $t(), X = a(Y);
1110
+ }, J = nn(), Y = a(J);
1082
1111
  {
1083
1112
  let e = (e) => {
1084
1113
  {
@@ -1091,7 +1120,7 @@ function tn(e, n) {
1091
1120
  }));
1092
1121
  Le(e, {
1093
1122
  get model() {
1094
- return f(U);
1123
+ return f(H);
1095
1124
  },
1096
1125
  get configuration() {
1097
1126
  return f(m);
@@ -1102,20 +1131,20 @@ function tn(e, n) {
1102
1131
  onChangeModel: (e) => A(e)
1103
1132
  });
1104
1133
  }
1105
- }, n = y(() => f(m).settingsPanelDisabled === !0 || !we(f(m)));
1106
- Ie(X, {
1134
+ }, n = y(() => f(m).settingsPanelDisabled === !0 || !Q(f(m)));
1135
+ Ie(Y, {
1107
1136
  get hideSettings() {
1108
1137
  return f(n);
1109
1138
  },
1110
1139
  settings: e,
1111
1140
  children: (e, n) => {
1112
- var o = Qt(), s = a(o);
1141
+ var o = tn(), s = a(o);
1113
1142
  let l;
1114
1143
  var u = a(s), h = (e) => {
1115
- var t = Bt(), n = a(t), o = d(n, !0), s = g(n, 2);
1144
+ var t = Ut(), n = a(t), o = d(n, !0), s = g(n, 2);
1116
1145
  {
1117
- let e = y(() => f(U).teacherInstructions || ""), t = y(() => f(m).teacherInstructions?.label);
1118
- Ft(s, {
1146
+ let e = y(() => f(H).teacherInstructions || ""), t = y(() => f(m).teacherInstructions?.label);
1147
+ Rt(s, {
1119
1148
  get markup() {
1120
1149
  return f(e);
1121
1150
  },
@@ -1128,13 +1157,13 @@ function tn(e, n) {
1128
1157
  P(t), p(() => i(o, f(m).teacherInstructions?.label)), r(e, t);
1129
1158
  };
1130
1159
  _(u, (e) => {
1131
- f(U).teacherInstructionsEnabled !== !1 && e(h);
1160
+ f(H).teacherInstructionsEnabled !== !1 && e(h);
1132
1161
  });
1133
1162
  var v = g(u, 2), b = (e) => {
1134
- var t = Bt(), n = a(t), o = d(n, !0), s = g(n, 2);
1163
+ var t = Ut(), n = a(t), o = d(n, !0), s = g(n, 2);
1135
1164
  {
1136
- let e = y(() => f(U).prompt || ""), t = y(() => f(m).prompt?.label);
1137
- Ft(s, {
1165
+ let e = y(() => f(H).prompt || ""), t = y(() => f(m).prompt?.label);
1166
+ Rt(s, {
1138
1167
  get markup() {
1139
1168
  return f(e);
1140
1169
  },
@@ -1148,26 +1177,26 @@ function tn(e, n) {
1148
1177
  P(t), p(() => i(o, f(m).prompt?.label)), r(e, t);
1149
1178
  };
1150
1179
  _(v, (e) => {
1151
- f(U).promptEnabled !== !1 && e(b);
1180
+ f(H).promptEnabled !== !1 && e(b);
1152
1181
  });
1153
1182
  var x = g(v, 2), S = g(a(x), 4);
1154
- C(S, 21, () => f(U).circles, re, (e, t, n) => {
1155
- var i = Vt(), o = a(i);
1183
+ C(S, 21, () => f(H).circles, ie, (e, t, n) => {
1184
+ var i = Wt(), o = a(i);
1156
1185
  o.textContent = `Circle ${n + 1} label`;
1157
1186
  var s = g(o, 2);
1158
- E(s), P(i), p(() => O(s, f(t).label)), k("input", s, (e) => ne(n, e.currentTarget.value)), r(e, i);
1187
+ E(s), P(i), p(() => O(s, f(t).label)), k("input", s, (e) => re(n, e.currentTarget.value)), r(e, i);
1159
1188
  }), P(S), P(x);
1160
- var w = g(x, 2), j = a(w), I = g(a(j), 2);
1189
+ var w = g(x, 2), j = a(w), F = g(a(j), 2);
1161
1190
  P(j);
1162
- var ae = g(j, 2), se = (e) => {
1163
- r(e, Ht());
1191
+ var oe = g(j, 2), ce = (e) => {
1192
+ r(e, Gt());
1164
1193
  };
1165
- _(ae, (e) => {
1166
- f(U).tiles.length === 0 && e(se);
1194
+ _(oe, (e) => {
1195
+ f(H).tiles.length === 0 && e(ce);
1167
1196
  });
1168
- var ce = g(ae, 2);
1169
- C(ce, 21, () => f(U).tiles, re, (e, t, n) => {
1170
- var i = Wt(), o = a(i), s = a(o), c = a(s), l = g(a(c), 2);
1197
+ var le = g(oe, 2);
1198
+ C(le, 21, () => f(H).tiles, ie, (e, t, n) => {
1199
+ var i = qt(), o = a(i), s = a(o), c = a(s), l = g(a(c), 2);
1171
1200
  E(l), P(c);
1172
1201
  var u = g(c, 2), m = g(a(u), 2);
1173
1202
  E(m), P(u);
@@ -1176,8 +1205,8 @@ function tn(e, n) {
1176
1205
  var b = g(h, 2), x = g(a(b), 2);
1177
1206
  E(x), P(b);
1178
1207
  var S = g(b, 2), C = (e) => {
1179
- var t = Ut();
1180
- k("click", d(t), () => B(n)), r(e, t);
1208
+ var t = Kt();
1209
+ k("click", d(t), () => z(n)), r(e, t);
1181
1210
  }, w = y(() => (f(t).imageUrl ?? "").trim());
1182
1211
  _(S, (e) => {
1183
1212
  f(w) && e(C);
@@ -1187,60 +1216,60 @@ function tn(e, n) {
1187
1216
  var A = g(D, 2), j = g(A, 2);
1188
1217
  P(T), P(o);
1189
1218
  var M = g(o, 2);
1190
- zt(g(a(M), 2), {
1219
+ Ht(g(a(M), 2), {
1191
1220
  get circles() {
1192
- return f(U).circles;
1221
+ return f(H).circles;
1193
1222
  },
1194
1223
  get regionLabels() {
1195
- return f(U).regionLabels;
1224
+ return f(H).regionLabels;
1196
1225
  },
1197
1226
  get value() {
1198
1227
  return f(t).correctRegion;
1199
1228
  },
1200
- onchange: (e) => H(n, e)
1229
+ onchange: (e) => V(n, e)
1201
1230
  }), P(M), P(i), p(() => {
1202
- O(l, f(t).id), O(m, f(t).label), O(v, f(t).imageUrl ?? ""), O(x, f(t).imageAlt ?? ""), A.disabled = n === f(U).tiles.length - 1;
1203
- }), k("input", l, (e) => V(n, e.currentTarget.value)), k("input", m, (e) => fe(n, e.currentTarget.value)), k("input", v, (e) => pe(n, e.currentTarget.value)), k("input", x, (e) => me(n, e.currentTarget.value)), k("click", D, () => de(n, -1)), k("click", A, () => de(n, 1)), k("click", j, () => ie(n)), r(e, i);
1204
- }), P(ce), P(w);
1205
- var ue = g(w, 2);
1206
- C(g(a(ue), 4), 17, () => f(W), (e) => z(e), (e, t) => {
1207
- let n = y(() => z(f(t))), o = y(() => le(f(U).circles || [], f(t)));
1208
- var s = Gt(), c = a(s), l = d(c, !0), u = g(c, 2);
1231
+ O(l, f(t).id), O(m, f(t).label), O(v, f(t).imageUrl ?? ""), O(x, f(t).imageAlt ?? ""), A.disabled = n === f(H).tiles.length - 1;
1232
+ }), k("input", l, (e) => B(n, e.currentTarget.value)), k("input", m, (e) => pe(n, e.currentTarget.value)), k("input", v, (e) => me(n, e.currentTarget.value)), k("input", x, (e) => he(n, e.currentTarget.value)), k("click", D, () => fe(n, -1)), k("click", A, () => fe(n, 1)), k("click", j, () => ae(n)), r(e, i);
1233
+ }), P(le), P(w);
1234
+ var de = g(w, 2);
1235
+ C(g(a(de), 4), 17, () => f(U), (e) => R(e), (e, t) => {
1236
+ let n = y(() => R(f(t))), o = y(() => ue(f(H).circles || [], f(t)));
1237
+ var s = Jt(), c = a(s), l = d(c, !0), u = g(c, 2);
1209
1238
  E(u), P(s), p(() => {
1210
- i(l, f(n) || "(outside)"), N(u, "placeholder", f(o)), O(u, f(U).regionLabels?.[f(n)] ?? "");
1211
- }), k("input", u, (e) => he(f(n), e.currentTarget.value)), r(e, s);
1212
- }), P(ue), P(s);
1213
- var R = g(s, 2);
1214
- N(R, "aria-valuemin", 260);
1215
- var G = g(R, 2), Se = g(a(G), 4), J = a(Se), Y = g(a(J));
1216
- P(J);
1217
- var X = g(J, 2), Z = g(a(X));
1218
- P(X);
1219
- var Q = g(X, 2), Ce = g(a(Q));
1220
- P(Q), P(Se);
1221
- var we = g(Se, 2), Te = (e) => {
1222
- var t = Kt();
1239
+ i(l, f(n) || "(outside)"), N(u, "placeholder", f(o)), O(u, f(H).regionLabels?.[f(n)] ?? "");
1240
+ }), k("input", u, (e) => ge(f(n), e.currentTarget.value)), r(e, s);
1241
+ }), P(de), P(s);
1242
+ var L = g(s, 2);
1243
+ N(L, "aria-valuemin", 260);
1244
+ var W = g(L, 2), Ce = g(a(W), 4), q = a(Ce), J = g(a(q));
1245
+ P(q);
1246
+ var Y = g(q, 2), X = g(a(Y));
1247
+ P(Y);
1248
+ var Z = g(Y, 2), we = g(a(Z));
1249
+ P(Z), P(Ce);
1250
+ var Q = g(Ce, 2), Te = (e) => {
1251
+ var t = Yt();
1223
1252
  te(a(t), {
1224
1253
  get model() {
1225
- return f(_e);
1254
+ return f(ve);
1226
1255
  },
1227
1256
  get session() {
1228
- return f(ge);
1257
+ return f(_e);
1229
1258
  }
1230
1259
  }), P(t), r(e, t);
1231
1260
  }, Ee = (e) => {
1232
- r(e, qt());
1261
+ r(e, Xt());
1233
1262
  }, De = (e) => {
1234
- r(e, Jt());
1263
+ r(e, Zt());
1235
1264
  };
1236
- _(we, (e) => {
1237
- f(U).tiles.length > 0 && f(U).circles?.length === 2 ? e(Te) : f(U).tiles.length === 0 ? e(Ee, 1) : e(De, -1);
1265
+ _(Q, (e) => {
1266
+ f(H).tiles.length > 0 && f(H).circles?.length === 2 ? e(Te) : f(H).tiles.length === 0 ? e(Ee, 1) : e(De, -1);
1238
1267
  });
1239
- var Oe = g(we, 2), ke = (e) => {
1240
- var t = Zt(), n = g(c(t), 2);
1241
- C(n, 21, () => f(U).tiles, re, (e, t) => {
1242
- var n = Xt(), o = a(n), s = a(o), c = (e) => {
1243
- var n = Yt();
1268
+ var Oe = g(Q, 2), ke = (e) => {
1269
+ var t = en(), n = g(c(t), 2);
1270
+ C(n, 21, () => f(H).tiles, ie, (e, t) => {
1271
+ var n = $t(), o = a(n), s = a(o), c = (e) => {
1272
+ var n = Qt();
1244
1273
  p(() => N(n, "src", f(t).imageUrl)), r(e, n);
1245
1274
  }, l = y(() => (f(t).imageUrl ?? "").trim());
1246
1275
  _(s, (e) => {
@@ -1251,14 +1280,14 @@ function tn(e, n) {
1251
1280
  var m = d(g(o, 4), !0);
1252
1281
  P(n), p((e, t) => {
1253
1282
  i(u, ` ${e ?? ""}`), i(m, t);
1254
- }, [() => ee(f(t).label) || (f(t).imageAlt ?? "").trim() || f(t).id, () => oe(f(U), f(t).correctRegion)]), r(e, n);
1283
+ }, [() => ee(f(t).label) || (f(t).imageAlt ?? "").trim() || f(t).id, () => se(f(H), f(t).correctRegion)]), r(e, n);
1255
1284
  }), P(n), r(e, t);
1256
1285
  };
1257
1286
  _(Oe, (e) => {
1258
- f(U).tiles.length > 0 && e(ke);
1259
- }), P(G), P(o), F(o, (e) => t(ve, e), () => f(ve)), p((e, t) => {
1260
- l = D(s, "", l, { width: f(ye) }), N(R, "aria-valuemax", f(K) > 0 ? f(K) - 200 - 6 : 360), N(R, "aria-valuenow", e), i(Y, ` ${t ?? ""}`), i(Z, ` ${f(U).scoringPolicy === "allOrNothing" ? "All or nothing" : "Partial per tile"}`), i(Ce, ` ${f(U).tiles.length ?? ""}`);
1261
- }, [() => f(q) ?? (f(K) > 0 ? Math.floor((f(K) - 6) / 2) : 260), () => f(U).circles.map((e) => e.label).join(", ")]), k("click", I, L), k("pointerdown", R, be), k("keydown", R, xe), T(o, "clientWidth", (e) => t(K, e)), r(e, o);
1287
+ f(H).tiles.length > 0 && e(ke);
1288
+ }), P(W), P(o), ne(o, (e) => t(ye, e), () => f(ye)), p((e, t) => {
1289
+ l = D(s, "", l, { width: f(be) }), N(L, "aria-valuemax", f(G) > 0 ? f(G) - 200 - 6 : 360), N(L, "aria-valuenow", e), i(J, ` ${t ?? ""}`), i(X, ` ${f(H).scoringPolicy === "allOrNothing" ? "All or nothing" : "Partial per tile"}`), i(we, ` ${f(H).tiles.length ?? ""}`);
1290
+ }, [() => f(K) ?? (f(G) > 0 ? Math.floor((f(G) - 6) / 2) : 260), () => f(H).circles.map((e) => e.label).join(", ")]), k("click", F, I), k("pointerdown", L, xe), k("keydown", L, Se), T(o, "clientWidth", (e) => t(G, e)), r(e, o);
1262
1291
  },
1263
1292
  $$slots: {
1264
1293
  settings: !0,
@@ -1266,21 +1295,21 @@ function tn(e, n) {
1266
1295
  }
1267
1296
  });
1268
1297
  }
1269
- return P(Y), r(e, Y), x(J);
1298
+ return P(J), r(e, J), x(q);
1270
1299
  }
1271
1300
  e([
1272
1301
  "input",
1273
1302
  "click",
1274
1303
  "pointerdown",
1275
1304
  "keydown"
1276
- ]), w(tn, {
1305
+ ]), w(an, {
1277
1306
  model: { type: "Object" },
1278
1307
  configuration: { type: "Object" }
1279
1308
  }, [], []);
1280
1309
  //#endregion
1281
1310
  //#region src/author/index.ts
1282
- var nn = tn.element;
1311
+ var on = an.element;
1283
1312
  //#endregion
1284
- export { nn as default };
1313
+ export { on as default };
1285
1314
 
1286
1315
  //# sourceMappingURL=index.js.map