@pie-element/categorize 13.1.2-next.6 → 13.1.2-next.8

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.
@@ -39453,8 +39453,8 @@ Bx.create({
39453
39453
  })) ?? null };
39454
39454
  }
39455
39455
  });
39456
- var Oq = "placeholder", kq = new qd("tiptap__placeholder"), Aq = 200;
39457
- function jq(e) {
39456
+ var Oq = "placeholder", kq = new qd("tiptap__placeholder");
39457
+ function Aq(e) {
39458
39458
  let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
39459
39459
  return o && u.push(l), U_.node(i, i + a.nodeSize, {
39460
39460
  class: u.join(" "),
@@ -39466,156 +39466,198 @@ function jq(e) {
39466
39466
  }) : n
39467
39467
  });
39468
39468
  }
39469
- function Mq({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
39469
+ function jq(e, t) {
39470
+ return typeof e == "function" ? e(t) : e;
39471
+ }
39472
+ function Mq({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
39473
+ let { anchor: s } = i, c = [], l = e.isEmpty;
39474
+ return r.nodesBetween(a, o, (r, i) => {
39475
+ let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && Jb(r);
39476
+ return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(Aq({
39477
+ editor: e,
39478
+ isEmptyDoc: l,
39479
+ dataAttribute: n,
39480
+ hasAnchor: a,
39481
+ placeholder: t.placeholder,
39482
+ classes: {
39483
+ emptyEditor: t.emptyEditorClass,
39484
+ emptyNode: jq(t.emptyNodeClass, {
39485
+ editor: e,
39486
+ node: r,
39487
+ pos: i,
39488
+ hasAnchor: a
39489
+ })
39490
+ },
39491
+ node: r,
39492
+ pos: i
39493
+ })), t.includeChildren;
39494
+ }), c;
39495
+ }
39496
+ function Nq({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
39470
39497
  if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
39471
- let { anchor: a } = i, o = [], s = e.isEmpty, c = {
39472
- emptyEditor: t.emptyEditorClass,
39473
- emptyNode: t.emptyNodeClass
39474
- };
39498
+ let { anchor: a } = i, o = [], s = e.isEmpty;
39475
39499
  if (t.showOnlyCurrent && !t.includeChildren) {
39476
- let i = r.resolve(a), l = i.depth > 0 ? i.node(1) : i.nodeAfter, u = i.depth > 0 ? i.before(1) : a;
39477
- if (l && l.type.isTextblock && Jb(l)) {
39478
- let r = a >= u && a <= u + l.nodeSize;
39479
- o.push(jq({
39500
+ let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
39501
+ if (c && c.type.isTextblock && Jb(c)) {
39502
+ let r = a >= l && a <= l + c.nodeSize;
39503
+ o.push(Aq({
39480
39504
  editor: e,
39481
39505
  isEmptyDoc: s,
39482
39506
  dataAttribute: n,
39483
39507
  hasAnchor: r,
39484
39508
  placeholder: t.placeholder,
39485
- classes: c,
39486
- node: l,
39487
- pos: u
39509
+ classes: {
39510
+ emptyEditor: t.emptyEditorClass,
39511
+ emptyNode: jq(t.emptyNodeClass, {
39512
+ editor: e,
39513
+ node: c,
39514
+ pos: l,
39515
+ hasAnchor: r
39516
+ })
39517
+ },
39518
+ node: c,
39519
+ pos: l
39488
39520
  }));
39489
39521
  }
39490
- } else {
39491
- let i = kq.getState(e.state), l = i?.topPos ?? 0, u = i?.bottomPos ?? r.content.size;
39492
- r.nodesBetween(l, u, (r, i) => {
39493
- let l = a >= i && a <= i + r.nodeSize, u = !r.isLeaf && Jb(r);
39494
- return r.type.isTextblock && (l || !t.showOnlyCurrent) && u && o.push(jq({
39495
- editor: e,
39496
- isEmptyDoc: s,
39497
- dataAttribute: n,
39498
- hasAnchor: l,
39499
- placeholder: t.placeholder,
39500
- classes: c,
39501
- node: r,
39502
- pos: i
39503
- })), t.includeChildren;
39504
- });
39505
- }
39522
+ } else o.push(...Mq({
39523
+ editor: e,
39524
+ options: t,
39525
+ dataAttribute: n,
39526
+ doc: r,
39527
+ selection: i,
39528
+ from: 0,
39529
+ to: r.content.size
39530
+ }));
39506
39531
  return K_.create(r, o);
39507
39532
  }
39508
- function Nq(e) {
39509
- return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
39533
+ function Pq(e, t) {
39534
+ let n = e.resolve(t);
39535
+ if (n.depth === 0) {
39536
+ let e = n.nodeAfter ?? n.nodeBefore;
39537
+ if (!e) return {
39538
+ from: t,
39539
+ to: t
39540
+ };
39541
+ let r = n.nodeAfter ? t : t - e.nodeSize;
39542
+ return {
39543
+ from: r,
39544
+ to: r + e.nodeSize
39545
+ };
39546
+ }
39547
+ let r = n.before(1);
39548
+ return {
39549
+ from: r,
39550
+ to: r + n.node(1).nodeSize
39551
+ };
39510
39552
  }
39511
- function Pq(e) {
39512
- let t = getComputedStyle(e), n = `${t.overflow} ${t.overflowY} ${t.overflowX}`;
39513
- return /auto|scroll|overlay/.test(n);
39553
+ function Fq(e, t) {
39554
+ return {
39555
+ from: Math.max(0, t.from - 1),
39556
+ to: Math.min(e.content.size, t.to - 1)
39557
+ };
39514
39558
  }
39515
- function Fq(e) {
39516
- let t = e;
39517
- for (; t;) {
39518
- if (Pq(t)) return t;
39519
- let e = t.parentElement;
39520
- if (!e) {
39521
- let e = t.getRootNode();
39522
- if (e instanceof ShadowRoot) {
39523
- t = e.host;
39524
- continue;
39525
- }
39526
- return window;
39527
- }
39528
- t = e;
39559
+ function Iq(e, t, n) {
39560
+ let r = [];
39561
+ return e.forEach((e, i) => {
39562
+ let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
39563
+ s < n && c > t && r.push({
39564
+ from: a,
39565
+ to: o
39566
+ });
39567
+ }), r;
39568
+ }
39569
+ function Lq(e) {
39570
+ if (e.length === 0) return [];
39571
+ let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
39572
+ for (let e = 1; e < t.length; e += 1) {
39573
+ let r = n[n.length - 1], i = t[e];
39574
+ i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
39529
39575
  }
39530
- return window;
39576
+ return n;
39531
39577
  }
39532
- function Iq(e) {
39533
- return e === window ? {
39534
- top: 0,
39535
- bottom: window.innerHeight
39536
- } : e.getBoundingClientRect();
39578
+ function Rq(e, t) {
39579
+ let n = Iq(e, t.from, t.to);
39580
+ return n.push(Fq(e, Pq(e, t.from))), t.to > t.from ? n.push(Fq(e, Pq(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(Fq(e, Pq(e, Math.min(t.from + 1, e.content.size)))), n;
39537
39581
  }
39538
- function Lq({ doc: e, view: t, scrollContainer: n }) {
39539
- let r = t.dom.getBoundingClientRect(), i = n ? Iq(n) : {
39540
- top: 0,
39541
- bottom: window.innerHeight
39542
- }, a = Math.max(r.top, i.top) - Aq, o = Math.min(r.bottom, i.bottom) + Aq;
39543
- if (a >= o) return {
39544
- top: 0,
39545
- bottom: e.content.size
39546
- };
39547
- let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
39548
- left: s,
39549
- top: a + 2
39550
- }), l = t.posAtCoords({
39551
- left: s,
39552
- top: o - 2
39553
- });
39554
- return {
39555
- top: c ? c.pos : 0,
39556
- bottom: l ? l.pos : e.content.size
39557
- };
39582
+ function zq(e, t, n) {
39583
+ let r = [];
39584
+ if (e.docChanged) {
39585
+ let t = Lb(e);
39586
+ for (let e of t) r.push(...Rq(n.doc, e.newRange));
39587
+ }
39588
+ return e.selectionSet && (r.push(Fq(n.doc, Pq(n.doc, e.mapping.map(t.selection.anchor)))), r.push(Fq(n.doc, Pq(n.doc, n.selection.anchor)))), Lq(r);
39558
39589
  }
39559
- var Rq = {
39560
- init() {
39561
- return {
39562
- topPos: null,
39563
- bottomPos: null
39564
- };
39565
- },
39566
- apply(e, t) {
39567
- let n = e.getMeta(kq);
39568
- return n?.positions ? {
39569
- topPos: n.positions.top,
39570
- bottomPos: n.positions.bottom
39571
- } : e.docChanged ? {
39572
- topPos: t.topPos === null ? null : e.mapping.map(t.topPos),
39573
- bottomPos: t.bottomPos === null ? null : e.mapping.map(t.bottomPos)
39574
- } : t;
39590
+ function Bq(e, t, n) {
39591
+ let r = Math.max(0, Math.min(e, n.content.size));
39592
+ return {
39593
+ from: r,
39594
+ to: Math.max(r, Math.min(t, n.content.size))
39595
+ };
39596
+ }
39597
+ function Vq({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
39598
+ let s = e;
39599
+ for (let e of t) {
39600
+ let { from: t, to: c } = Bq(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
39601
+ l.length && (s = s.remove(l));
39602
+ let u = Mq({
39603
+ editor: n,
39604
+ options: r,
39605
+ dataAttribute: i,
39606
+ doc: a,
39607
+ selection: o,
39608
+ from: t,
39609
+ to: c
39610
+ });
39611
+ u.length && (s = s.add(a, u));
39575
39612
  }
39576
- };
39577
- function zq(e) {
39578
- let t = Fq(e.dom), n = () => {
39579
- let n = Lq({
39580
- view: e,
39581
- doc: e.state.doc,
39582
- scrollContainer: t
39583
- }), r = kq.getState(e.state);
39584
- if (r?.topPos === n.top && r?.bottomPos === n.bottom) return;
39585
- let i = e.state.tr.setMeta(kq, { positions: n });
39586
- e.dispatch(i);
39587
- }, r = null, i = 0, a = () => {
39588
- r === null && (r = requestAnimationFrame(() => {
39589
- r = null;
39590
- let e = performance.now();
39591
- e - i >= 150 ? (i = e, n()) : a();
39592
- }));
39593
- };
39594
- return t.addEventListener("scroll", a, { passive: !0 }), n(), {
39595
- update(t, n) {
39596
- e.state.doc.content.size !== n.doc.content.size && a();
39613
+ return s;
39614
+ }
39615
+ function Hq({ editor: e, options: t, dataAttribute: n }) {
39616
+ return {
39617
+ init(r, i) {
39618
+ return Nq({
39619
+ editor: e,
39620
+ options: t,
39621
+ dataAttribute: n,
39622
+ doc: i.doc,
39623
+ selection: i.selection
39624
+ }) ?? K_.empty;
39597
39625
  },
39598
- destroy: () => {
39599
- r !== null && cancelAnimationFrame(r), t.removeEventListener("scroll", a);
39626
+ apply(r, i, a, o) {
39627
+ return !r.docChanged && !r.selectionSet ? i : Vq({
39628
+ decorations: i.map(r.mapping, r.doc),
39629
+ ranges: zq(r, a, o),
39630
+ editor: e,
39631
+ options: t,
39632
+ dataAttribute: n,
39633
+ doc: o.doc,
39634
+ selection: o.selection
39635
+ });
39600
39636
  }
39601
39637
  };
39602
39638
  }
39603
- function Bq({ editor: e, options: t }) {
39604
- let n = t.dataAttribute ? `data-${Nq(t.dataAttribute)}` : `data-${Oq}`;
39639
+ function Uq(e) {
39640
+ return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
39641
+ }
39642
+ function Wq({ editor: e, options: t }) {
39643
+ let n = t.dataAttribute ? `data-${Uq(t.dataAttribute)}` : `data-${Oq}`, r = t.showOnlyCurrent && !t.includeChildren;
39605
39644
  return new H({
39606
39645
  key: kq,
39607
- state: Rq,
39608
- view: zq,
39609
- props: { decorations: ({ doc: r, selection: i }) => Mq({
39646
+ ...r ? {} : { state: Hq({
39647
+ editor: e,
39648
+ options: t,
39649
+ dataAttribute: n
39650
+ }) },
39651
+ props: { decorations: r ? ({ doc: r, selection: i }) => Nq({
39610
39652
  editor: e,
39611
39653
  options: t,
39612
39654
  dataAttribute: n,
39613
39655
  doc: r,
39614
39656
  selection: i
39615
- }) }
39657
+ }) : (n) => t.showOnlyWhenEditable && !e.isEditable ? K_.empty : kq.getState(n) ?? K_.empty }
39616
39658
  });
39617
39659
  }
39618
- var Vq = Bx.create({
39660
+ var Gq = Bx.create({
39619
39661
  name: "placeholder",
39620
39662
  addOptions() {
39621
39663
  return {
@@ -39629,12 +39671,25 @@ var Vq = Bx.create({
39629
39671
  };
39630
39672
  },
39631
39673
  addProseMirrorPlugins() {
39632
- return [Bq({
39674
+ return [Wq({
39633
39675
  editor: this.editor,
39634
39676
  options: this.options
39635
39677
  })];
39636
39678
  }
39637
39679
  });
39680
+ function Kq(e, t) {
39681
+ return !e.selection.empty && !Yb(e.selection) && t.isEditable;
39682
+ }
39683
+ function qq(e, t) {
39684
+ return Kq(e, t) && !t.isFocused && !t.view.dragging;
39685
+ }
39686
+ function Jq() {
39687
+ var e;
39688
+ (e = window.getSelection()) == null || e.removeAllRanges();
39689
+ }
39690
+ function Yq(e) {
39691
+ e.focus();
39692
+ }
39638
39693
  Bx.create({
39639
39694
  name: "selection",
39640
39695
  addOptions() {
@@ -39644,13 +39699,25 @@ Bx.create({
39644
39699
  let { editor: e, options: t } = this;
39645
39700
  return [new H({
39646
39701
  key: new qd("selection"),
39647
- props: { decorations(n) {
39648
- return n.selection.empty || e.isFocused || !e.isEditable || Yb(n.selection) || e.view.dragging ? null : K_.create(n.doc, [U_.inline(n.selection.from, n.selection.to, { class: t.className })]);
39649
- } }
39702
+ props: {
39703
+ decorations(n) {
39704
+ return qq(n, e) ? K_.create(n.doc, [U_.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
39705
+ },
39706
+ handleDOMEvents: {
39707
+ blur(t) {
39708
+ return Kq(t.state, e) && Jq(), !1;
39709
+ },
39710
+ focus(t) {
39711
+ return Kq(t.state, e) && requestAnimationFrame(() => {
39712
+ !e.isDestroyed && t.hasFocus() && Yq(t);
39713
+ }), !1;
39714
+ }
39715
+ }
39716
+ }
39650
39717
  })];
39651
39718
  }
39652
39719
  });
39653
- function Hq({ types: e, node: t }) {
39720
+ function Xq({ types: e, node: t }) {
39654
39721
  return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
39655
39722
  }
39656
39723
  Bx.create({
@@ -39672,7 +39739,7 @@ Bx.create({
39672
39739
  state: {
39673
39740
  init: (e, t) => {
39674
39741
  let r = t.tr.doc.lastChild;
39675
- return !Hq({
39742
+ return !Xq({
39676
39743
  node: r,
39677
39744
  types: n
39678
39745
  });
@@ -39680,7 +39747,7 @@ Bx.create({
39680
39747
  apply: (e, t) => {
39681
39748
  if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
39682
39749
  let r = e.doc.lastChild;
39683
- return !Hq({
39750
+ return !Xq({
39684
39751
  node: r,
39685
39752
  types: n
39686
39753
  });
@@ -39715,7 +39782,7 @@ Bx.create({
39715
39782
  };
39716
39783
  }
39717
39784
  });
39718
- var Uq = Mx.create({
39785
+ var Zq = Mx.create({
39719
39786
  name: "superscript",
39720
39787
  addOptions() {
39721
39788
  return { HTMLAttributes: {} };
@@ -39745,7 +39812,7 @@ var Uq = Mx.create({
39745
39812
  addKeyboardShortcuts() {
39746
39813
  return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
39747
39814
  }
39748
- }), Wq = Mx.create({
39815
+ }), Qq = Mx.create({
39749
39816
  name: "subscript",
39750
39817
  addOptions() {
39751
39818
  return { HTMLAttributes: {} };
@@ -39775,7 +39842,7 @@ var Uq = Mx.create({
39775
39842
  addKeyboardShortcuts() {
39776
39843
  return { "Mod-,": () => this.editor.commands.toggleSubscript() };
39777
39844
  }
39778
- }), Gq = Bx.create({
39845
+ }), $q = Bx.create({
39779
39846
  name: "textAlign",
39780
39847
  addOptions() {
39781
39848
  return {
@@ -39817,7 +39884,7 @@ var Uq = Mx.create({
39817
39884
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
39818
39885
  };
39819
39886
  }
39820
- }), Kq = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, qq = gS.create({
39887
+ }), eJ = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, tJ = gS.create({
39821
39888
  name: "image",
39822
39889
  addOptions() {
39823
39890
  return {
@@ -39910,7 +39977,7 @@ var Uq = Mx.create({
39910
39977
  },
39911
39978
  addInputRules() {
39912
39979
  return [nS({
39913
- find: Kq,
39980
+ find: eJ,
39914
39981
  type: this.type,
39915
39982
  getAttributes: (e) => {
39916
39983
  let [, , t, n, r] = e;
@@ -39922,17 +39989,17 @@ var Uq = Mx.create({
39922
39989
  }
39923
39990
  })];
39924
39991
  }
39925
- }), Jq = Vq, Yq = {
39992
+ }), nJ = Gq, rJ = {
39926
39993
  position: "bottom",
39927
39994
  alignment: "left",
39928
39995
  alwaysVisible: !1,
39929
39996
  showDone: !0,
39930
39997
  doneOn: "blur"
39931
- }, Xq = {
39998
+ }, iJ = {
39932
39999
  options: {},
39933
40000
  respAreaToolbar: () => {},
39934
40001
  onHandleAreaChange: () => {}
39935
- }, Zq = [
40002
+ }, aJ = [
39936
40003
  "bold",
39937
40004
  "italic",
39938
40005
  "underline",
@@ -39954,7 +40021,7 @@ var Uq = Mx.create({
39954
40021
  "h3",
39955
40022
  "undo",
39956
40023
  "redo"
39957
- ], Qq = {
40024
+ ], oJ = {
39958
40025
  "--white": "#fff",
39959
40026
  "--black": "#2e2b29",
39960
40027
  "--black-contrast": "#110f0e",
@@ -39973,14 +40040,18 @@ var Uq = Mx.create({
39973
40040
  "--red": "#ff5c33",
39974
40041
  "--red-light": "#ffebe5",
39975
40042
  "--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
39976
- }, $q = (e) => {
40043
+ }, sJ = (e) => ({
40044
+ spellcheck: e ? "true" : "false",
40045
+ autocorrect: e ? "on" : "off",
40046
+ autocapitalize: e ? "on" : "off"
40047
+ }), cJ = (e) => {
39977
40048
  let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = Ht([]), [a, o] = Ht(!1), { toolbarOpts: s } = e, c = Ft((e) => {
39978
40049
  i((t) => {
39979
40050
  let n = t.filter((t) => t.pos !== e);
39980
40051
  return n.length === 0 && o(!1), n;
39981
40052
  });
39982
40053
  }, [i]), l = {
39983
- ...Yq,
40054
+ ...rJ,
39984
40055
  ...s
39985
40056
  }, u = Ft((t) => {
39986
40057
  let n = t.getHTML();
@@ -39991,13 +40062,13 @@ var Uq = Mx.create({
39991
40062
  e.onDone,
39992
40063
  l.doneOn
39993
40064
  ]), d = Bt(() => ({
39994
- ...Xq,
40065
+ ...iJ,
39995
40066
  ...e.responseAreaProps,
39996
40067
  onInlineDropdownToolbarClose: u
39997
40068
  }), [e.responseAreaProps, u]), f = Bt(() => {
39998
40069
  let { customPlugins: t, ...n } = e.pluginProps || {};
39999
40070
  t ||= [];
40000
- let r = (e.activePlugins || Zq)?.filter((e) => {
40071
+ let r = (e.activePlugins || aJ)?.filter((e) => {
40001
40072
  let t = Rc[e] || e, r = n[t] || {};
40002
40073
  return !r || !r.disabled;
40003
40074
  });
@@ -40015,103 +40086,112 @@ var Uq = Mx.create({
40015
40086
  setKeypadInteraction: {},
40016
40087
  media: {}
40017
40088
  });
40018
- }, [e, d.type]), p = SA({
40019
- extensions: [
40020
- Gq.configure({
40021
- types: [
40022
- "heading",
40023
- "paragraph",
40024
- "div",
40025
- "headingParagraph",
40026
- "h1",
40027
- "h2",
40028
- "h3",
40029
- "h4",
40030
- "h5",
40031
- "h6",
40032
- "td",
40033
- "th"
40034
- ],
40035
- alignments: [
40036
- "left",
40037
- "right",
40038
- "center",
40039
- "justify"
40040
- ]
40041
- }),
40042
- Eq,
40043
- Dq.configure({ limit: e.charactersLimit || 1e6 }),
40044
- gq.configure({ trailingNode: {
40089
+ }, [e, d.type]), p = [
40090
+ $q.configure({
40091
+ types: [
40092
+ "heading",
40093
+ "paragraph",
40094
+ "div",
40095
+ "headingParagraph",
40096
+ "h1",
40097
+ "h2",
40098
+ "h3",
40099
+ "h4",
40100
+ "h5",
40101
+ "h6",
40102
+ "td",
40103
+ "th"
40104
+ ],
40105
+ alignments: [
40106
+ "left",
40107
+ "right",
40108
+ "center",
40109
+ "justify"
40110
+ ]
40111
+ }),
40112
+ Eq,
40113
+ Dq.configure({ limit: e.charactersLimit || 1e6 }),
40114
+ gq.configure({
40115
+ trailingNode: {
40045
40116
  node: "paragraph",
40046
40117
  notAfter: ["paragraph", "div"]
40047
- } }),
40048
- bR,
40049
- JO,
40050
- xR,
40051
- YO,
40052
- XO,
40053
- Jq.configure({
40054
- placeholder: e.placeholder,
40055
- showOnlyWhenEditable: !0,
40056
- showOnlyCurrent: !1,
40057
- includeChildren: !0
40058
- }),
40059
- WO,
40060
- OO,
40061
- qO,
40062
- KO,
40063
- iI.configure(d),
40064
- aI.configure(d),
40065
- sI.configure(d),
40066
- cI.configure(d),
40067
- oI.configure(d),
40068
- GI.configure({
40069
- toolbarOpts: l,
40070
- math: e.pluginProps?.math || {}
40071
- }),
40072
- Wq,
40073
- Uq,
40074
- qq,
40075
- fL.configure({
40076
- toolbarOpts: l,
40077
- imageHandling: {
40078
- disableImageAlignmentButtons: e.disableImageAlignmentButtons,
40079
- onDone: (t) => e.onDone?.(t.getHTML()),
40080
- onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
40081
- let { src: n } = t.attrs;
40082
- e.imageSupport.delete(n, (e) => {
40083
- c(t.pos);
40084
- });
40085
- }),
40086
- insertImageRequested: e.imageSupport && ((t, n, r) => {
40087
- let [o, s] = n, l = (n) => {
40088
- let r;
40089
- a && n && (r = e.onChange), c(s), r?.(t.getHTML());
40090
- };
40091
- t._insertingImage = !0, i((e) => [...e, o]), (() => {
40092
- let n = r(l), i = Ot(() => {
40093
- let e = () => window.removeEventListener("focus", i);
40094
- if (!t._insertingImage) {
40095
- e();
40096
- return;
40097
- }
40098
- c(s), t._insertingImage = !1, e();
40099
- }, 500);
40100
- window.addEventListener("focus", i), e.imageSupport.add(n);
40101
- })();
40102
- }),
40103
- maxImageWidth: e.maxImageWidth,
40104
- maxImageHeight: e.maxImageHeight
40105
- },
40106
- limit: 3
40107
- }),
40108
- NL.configure({ uploadSoundSupport: e.uploadSoundSupport }),
40109
- zL.configure({ extraCSSRules: e.extraCSSRules })
40110
- ],
40118
+ },
40119
+ link: {
40120
+ autolink: !1,
40121
+ linkOnPaste: !1
40122
+ }
40123
+ }),
40124
+ bR,
40125
+ JO,
40126
+ xR,
40127
+ YO,
40128
+ XO,
40129
+ nJ.configure({
40130
+ placeholder: e.placeholder,
40131
+ showOnlyWhenEditable: !0,
40132
+ showOnlyCurrent: !1,
40133
+ includeChildren: !0
40134
+ }),
40135
+ WO,
40136
+ OO,
40137
+ qO,
40138
+ KO,
40139
+ iI.configure(d),
40140
+ aI.configure(d),
40141
+ sI.configure(d),
40142
+ cI.configure(d),
40143
+ oI.configure(d),
40144
+ GI.configure({
40145
+ toolbarOpts: l,
40146
+ math: e.pluginProps?.math || {}
40147
+ }),
40148
+ Qq,
40149
+ Zq,
40150
+ tJ,
40151
+ fL.configure({
40152
+ toolbarOpts: l,
40153
+ imageHandling: {
40154
+ disableImageAlignmentButtons: e.disableImageAlignmentButtons,
40155
+ onDone: (t) => e.onDone?.(t.getHTML()),
40156
+ onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
40157
+ let { src: n } = t.attrs;
40158
+ e.imageSupport.delete(n, (e) => {
40159
+ c(t.pos);
40160
+ });
40161
+ }),
40162
+ insertImageRequested: e.imageSupport && ((t, n, r) => {
40163
+ let [o, s] = n, l = (n) => {
40164
+ let r;
40165
+ a && n && (r = e.onChange), c(s), r?.(t.getHTML());
40166
+ };
40167
+ t._insertingImage = !0, i((e) => [...e, o]), (() => {
40168
+ let n = r(l), i = Ot(() => {
40169
+ let e = () => window.removeEventListener("focus", i);
40170
+ if (!t._insertingImage) {
40171
+ e();
40172
+ return;
40173
+ }
40174
+ c(s), t._insertingImage = !1, e();
40175
+ }, 500);
40176
+ window.addEventListener("focus", i), e.imageSupport.add(n);
40177
+ })();
40178
+ }),
40179
+ maxImageWidth: e.maxImageWidth,
40180
+ maxImageHeight: e.maxImageHeight
40181
+ },
40182
+ limit: 3
40183
+ }),
40184
+ NL.configure({ uploadSoundSupport: e.uploadSoundSupport }),
40185
+ zL.configure({ extraCSSRules: e.extraCSSRules })
40186
+ ], m = e.spellCheck !== !1, h = SA({
40187
+ extensions: p,
40111
40188
  immediatelyRender: !1,
40112
- editorProps: { handleKeyDown(t, n) {
40113
- return e.onKeyDown ? e.onKeyDown(n) : !1;
40114
- } },
40189
+ editorProps: {
40190
+ attributes: sJ(m),
40191
+ handleKeyDown(t, n) {
40192
+ return e.onKeyDown ? e.onKeyDown(n) : !1;
40193
+ }
40194
+ },
40115
40195
  editable: !e.disabled,
40116
40196
  content: Uc(e.markup),
40117
40197
  onUpdate: ({ editor: t, transaction: n }) => {
@@ -40122,22 +40202,29 @@ var Uq = Mx.create({
40122
40202
  }
40123
40203
  }, [e.charactersLimit]);
40124
40204
  Rt(() => {
40125
- e.editorRef && e.editorRef(p);
40126
- }, [e.editorRef, p]), Rt(() => {
40127
- p?.setEditable(!e.disabled);
40128
- }, [e.disabled, p]), Rt(() => {
40129
- if (!p) return;
40205
+ e.editorRef && e.editorRef(h);
40206
+ }, [e.editorRef, h]), Rt(() => {
40207
+ h?.setEditable(!e.disabled);
40208
+ }, [e.disabled, h]), Rt(() => {
40209
+ if (!h) return;
40210
+ let e = h.options?.editorProps, t = sJ(m);
40211
+ e?.attributes?.spellcheck !== t.spellcheck && h.setOptions({ editorProps: {
40212
+ ...e,
40213
+ attributes: t
40214
+ } });
40215
+ }, [m, h]), Rt(() => {
40216
+ if (!h) return;
40130
40217
  let t = Uc(e.markup);
40131
- t !== p.getHTML() && p.commands.setContent(t, { emitUpdate: !1 });
40132
- }, [e.markup, p]), Rt(() => {
40133
- Object.entries(Qq).forEach(([e, t]) => {
40218
+ t !== h.getHTML() && h.commands.setContent(t, { emitUpdate: !1 });
40219
+ }, [e.markup, h]), Rt(() => {
40220
+ Object.entries(oJ).forEach(([e, t]) => {
40134
40221
  document.documentElement.style.setProperty(e, t);
40135
40222
  });
40136
40223
  }, []);
40137
- let m = vA({
40138
- editor: p,
40224
+ let g = vA({
40225
+ editor: h,
40139
40226
  selector: (e) => ({ isFocused: e.editor?.isFocused })
40140
- }), h = Bt(() => {
40227
+ }), _ = Bt(() => {
40141
40228
  let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
40142
40229
  return {
40143
40230
  width: SR(n),
@@ -40152,20 +40239,20 @@ var Uq = Mx.create({
40152
40239
  ...e,
40153
40240
  activePlugins: f,
40154
40241
  toolbarOpts: l,
40155
- editorState: m,
40156
- editor: p,
40157
- children: p && /* @__PURE__ */ P(eJ, {
40242
+ editorState: g,
40243
+ editor: h,
40244
+ children: h && /* @__PURE__ */ P(lJ, {
40158
40245
  style: {
40159
- minHeight: h.minHeight,
40160
- height: h.height,
40161
- maxHeight: h.maxHeight
40246
+ minHeight: _.minHeight,
40247
+ height: _.height,
40248
+ maxHeight: _.maxHeight
40162
40249
  },
40163
40250
  showParagraph: t && !t.disabled,
40164
40251
  separateParagraph: n && !n.disabled,
40165
- editor: p
40252
+ editor: h
40166
40253
  })
40167
40254
  });
40168
- }, eJ = j(hA, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
40255
+ }, lJ = j(hA, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
40169
40256
  display: "flex",
40170
40257
  outline: "none !important",
40171
40258
  "& .ProseMirror": {
@@ -40193,26 +40280,26 @@ var Uq = Mx.create({
40193
40280
  } },
40194
40281
  ...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
40195
40282
  }
40196
- })), tJ = $q;
40283
+ })), uJ = cJ;
40197
40284
  //#endregion
40198
40285
  //#region ../../lib-react/config-ui/dist/feedback-config/feedback-selector.js
40199
- function nJ(e) {
40286
+ function dJ(e) {
40200
40287
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
40201
40288
  }
40202
- function rJ(e, t) {
40203
- return !e || nJ(e) ? e : nJ(e.default) ? e.default : t && nJ(e[t]) ? e[t] : t && nJ(e[t]?.default) ? e[t].default : e;
40289
+ function fJ(e, t) {
40290
+ return !e || dJ(e) ? e : dJ(e.default) ? e.default : t && dJ(e[t]) ? e[t] : t && dJ(e[t]?.default) ? e[t].default : e;
40204
40291
  }
40205
- var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ = Ce, oJ = aJ.default, sJ = oJ && typeof oJ == "object" ? oJ : aJ, cJ = j(tJ)(({ theme: e }) => ({ fontFamily: e.typography.fontFamily })), lJ = {
40292
+ var pJ = fJ(re, "InputContainer") || fJ(gJ.InputContainer, "InputContainer"), mJ = Ce, hJ = mJ.default, gJ = hJ && typeof hJ == "object" ? hJ : mJ, _J = j(uJ)(({ theme: e }) => ({ fontFamily: e.typography.fontFamily })), vJ = {
40206
40293
  default: "Simple Feedback",
40207
40294
  none: "No Feedback",
40208
40295
  custom: "Customized Feedback"
40209
- }, uJ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), dJ = j(iJ)(() => ({ paddingBottom: 0 })), fJ = j("div")(({ theme: e }) => ({
40296
+ }, yJ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), bJ = j(pJ)(() => ({ paddingBottom: 0 })), xJ = j("div")(({ theme: e }) => ({
40210
40297
  marginTop: "0px",
40211
40298
  background: k.backgroundDark(),
40212
40299
  padding: 0,
40213
40300
  marginBottom: e.spacing(2),
40214
40301
  borderRadius: "4px"
40215
- })), pJ = j("div")(({ theme: e }) => ({
40302
+ })), SJ = j("div")(({ theme: e }) => ({
40216
40303
  marginTop: "0px",
40217
40304
  background: k.backgroundDark(),
40218
40305
  padding: e.spacing(2),
@@ -40220,7 +40307,7 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40220
40307
  borderRadius: "4px",
40221
40308
  fontFamily: e.typography.fontFamily,
40222
40309
  cursor: "default"
40223
- })), mJ = j(Pc)(({ theme: e }) => ({ paddingTop: e.spacing(1) })), hJ = {
40310
+ })), CJ = j(Pc)(({ theme: e }) => ({ paddingTop: e.spacing(1) })), wJ = {
40224
40311
  type: I.default.oneOf([
40225
40312
  "default",
40226
40313
  "custom",
@@ -40228,11 +40315,11 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40228
40315
  ]),
40229
40316
  default: I.default.string,
40230
40317
  custom: I.default.string
40231
- }, gJ = class extends N.Component {
40318
+ }, TJ = class extends N.Component {
40232
40319
  static propTypes = {
40233
40320
  keys: I.default.arrayOf(I.default.string),
40234
40321
  label: I.default.string.isRequired,
40235
- feedback: I.default.shape(hJ).isRequired,
40322
+ feedback: I.default.shape(wJ).isRequired,
40236
40323
  onChange: I.default.func.isRequired,
40237
40324
  toolbarOpts: I.default.object,
40238
40325
  mathMlOptions: I.default.object
@@ -40254,36 +40341,36 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40254
40341
  };
40255
40342
  render() {
40256
40343
  let { keys: e, label: t, feedback: n, toolbarOpts: r, mathMlOptions: i = {} } = this.props;
40257
- return /* @__PURE__ */ F(uJ, { children: [
40258
- /* @__PURE__ */ P(dJ, {
40344
+ return /* @__PURE__ */ F(yJ, { children: [
40345
+ /* @__PURE__ */ P(bJ, {
40259
40346
  label: t,
40260
40347
  extraClasses: { label: { transform: "translateY(-20%)" } },
40261
- children: /* @__PURE__ */ P(mJ, {
40262
- keys: e || Object.keys(lJ),
40348
+ children: /* @__PURE__ */ P(CJ, {
40349
+ keys: e || Object.keys(vJ),
40263
40350
  label: t,
40264
40351
  value: n.type,
40265
40352
  onChange: this.changeType,
40266
- feedbackLabels: lJ
40353
+ feedbackLabels: vJ
40267
40354
  })
40268
40355
  }),
40269
- n.type === "custom" && /* @__PURE__ */ P(fJ, { children: /* @__PURE__ */ P(cJ, {
40356
+ n.type === "custom" && /* @__PURE__ */ P(xJ, { children: /* @__PURE__ */ P(_J, {
40270
40357
  onChange: this.changeCustom,
40271
40358
  markup: n.custom || "",
40272
40359
  toolbarOpts: r,
40273
40360
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
40274
40361
  mathMlOptions: i
40275
40362
  }) }),
40276
- n.type === "default" && /* @__PURE__ */ F(pJ, { children: [" ", n.default] })
40363
+ n.type === "default" && /* @__PURE__ */ F(SJ, { children: [" ", n.default] })
40277
40364
  ] });
40278
40365
  }
40279
- }, _J = Ve(/*#__PURE__*/ P("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"), vJ = j("div")(() => ({
40366
+ }, EJ = Ve(/*#__PURE__*/ P("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"), DJ = j("div")(() => ({
40280
40367
  display: "flex",
40281
40368
  flex: 1,
40282
40369
  flexDirection: "column"
40283
- })), yJ = j(dn)(() => ({
40370
+ })), OJ = j(dn)(() => ({
40284
40371
  paddingTop: 0,
40285
40372
  paddingBottom: 0
40286
- })), bJ = (e) => xt({}, {
40373
+ })), kJ = (e) => xt({}, {
40287
40374
  correct: {
40288
40375
  type: "default",
40289
40376
  default: "Correct"
@@ -40296,21 +40383,21 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40296
40383
  type: "default",
40297
40384
  default: "Nearly"
40298
40385
  }
40299
- }, e), xJ = class extends N.Component {
40386
+ }, e), AJ = class extends N.Component {
40300
40387
  static propTypes = {
40301
40388
  allowPartial: I.default.bool,
40302
40389
  className: I.default.string,
40303
40390
  feedback: I.default.shape({
40304
- correct: I.default.shape(hJ),
40305
- incorrect: I.default.shape(hJ),
40306
- partial: I.default.shape(hJ)
40391
+ correct: I.default.shape(wJ),
40392
+ incorrect: I.default.shape(wJ),
40393
+ partial: I.default.shape(wJ)
40307
40394
  }),
40308
40395
  onChange: I.default.func.isRequired,
40309
40396
  toolbarOpts: I.default.object
40310
40397
  };
40311
40398
  static defaultProps = {
40312
40399
  allowPartial: !0,
40313
- feedback: bJ()
40400
+ feedback: kJ()
40314
40401
  };
40315
40402
  onChange(e, t) {
40316
40403
  let { feedback: n, onChange: r } = this.props;
@@ -40332,22 +40419,22 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40332
40419
  exit: 195
40333
40420
  } } },
40334
40421
  children: [/* @__PURE__ */ P(vn, {
40335
- expandIcon: /* @__PURE__ */ P(_J, {}),
40422
+ expandIcon: /* @__PURE__ */ P(EJ, {}),
40336
40423
  children: /* @__PURE__ */ P(me, { children: "Feedback" })
40337
- }), /* @__PURE__ */ P(yJ, { children: /* @__PURE__ */ F(vJ, { children: [
40338
- /* @__PURE__ */ P(gJ, {
40424
+ }), /* @__PURE__ */ P(OJ, { children: /* @__PURE__ */ F(DJ, { children: [
40425
+ /* @__PURE__ */ P(TJ, {
40339
40426
  label: "If correct, show",
40340
40427
  feedback: n.correct,
40341
40428
  onChange: this.onCorrectChange,
40342
40429
  toolbarOpts: r
40343
40430
  }),
40344
- t && /* @__PURE__ */ P(gJ, {
40431
+ t && /* @__PURE__ */ P(TJ, {
40345
40432
  label: "If partially correct, show",
40346
40433
  feedback: n.partial,
40347
40434
  onChange: this.onPartialChange,
40348
40435
  toolbarOpts: r
40349
40436
  }),
40350
- /* @__PURE__ */ P(gJ, {
40437
+ /* @__PURE__ */ P(TJ, {
40351
40438
  label: "If incorrect, show",
40352
40439
  feedback: n.incorrect,
40353
40440
  onChange: this.onIncorrectChange,
@@ -40357,7 +40444,7 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40357
40444
  })
40358
40445
  });
40359
40446
  }
40360
- }, SJ = j(Qs)(() => ({})), CJ = class extends N.Component {
40447
+ }, jJ = j(Qs)(() => ({})), MJ = class extends N.Component {
40361
40448
  static propTypes = {
40362
40449
  className: I.default.string,
40363
40450
  contentClassName: I.default.string,
@@ -40378,7 +40465,7 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40378
40465
  indicatorColor: "primary",
40379
40466
  value: e,
40380
40467
  onChange: this.handleChange,
40381
- children: N.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ P(SJ, { label: e.props.title }, t) : null)
40468
+ children: N.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ P(jJ, { label: e.props.title }, t) : null)
40382
40469
  }), /* @__PURE__ */ P("div", {
40383
40470
  className: r,
40384
40471
  style: i,
@@ -40386,7 +40473,7 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40386
40473
  })]
40387
40474
  });
40388
40475
  }
40389
- }, wJ = j(Oa)(({ theme: e, mini: t }) => ({
40476
+ }, NJ = j(Oa)(({ theme: e, mini: t }) => ({
40390
40477
  margin: 0,
40391
40478
  marginLeft: 0,
40392
40479
  padding: 0,
@@ -40400,7 +40487,7 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40400
40487
  fontSize: e.typography.fontSize - 3
40401
40488
  }
40402
40489
  }
40403
- })), TJ = j(_a)(({ theme: e, mini: t, error: n }) => ({
40490
+ })), PJ = j(_a)(({ theme: e, mini: t, error: n }) => ({
40404
40491
  color: `${k.tertiary()} !important`,
40405
40492
  ...t && {
40406
40493
  margin: 0,
@@ -40409,9 +40496,9 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40409
40496
  height: e.spacing(3)
40410
40497
  },
40411
40498
  ...n && { color: `${e.palette.error.main} !important` }
40412
- })), EJ = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ P(wJ, {
40499
+ })), FJ = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ P(NJ, {
40413
40500
  mini: e,
40414
- control: /* @__PURE__ */ P(TJ, {
40501
+ control: /* @__PURE__ */ P(PJ, {
40415
40502
  checked: t,
40416
40503
  onChange: n,
40417
40504
  value: r,
@@ -40420,21 +40507,21 @@ var iJ = rJ(re, "InputContainer") || rJ(sJ.InputContainer, "InputContainer"), aJ
40420
40507
  }),
40421
40508
  label: i
40422
40509
  });
40423
- EJ.propTypes = {
40510
+ FJ.propTypes = {
40424
40511
  mini: I.default.bool,
40425
40512
  checked: I.default.bool.isRequired,
40426
40513
  onChange: I.default.func.isRequired,
40427
40514
  value: I.default.string,
40428
40515
  label: I.default.string.isRequired,
40429
40516
  error: I.default.bool
40430
- }, EJ.defaultProps = {
40517
+ }, FJ.defaultProps = {
40431
40518
  value: "",
40432
40519
  mini: !1,
40433
40520
  error: !1
40434
40521
  };
40435
40522
  //#endregion
40436
40523
  //#region ../../lib-react/config-ui/dist/number-text-field.js
40437
- var DJ = (0, Fc.default)("@pie-lib:config-ui:number-text-field"), OJ = j(Dc)(({ theme: e }) => ({
40524
+ var IJ = (0, Fc.default)("@pie-lib:config-ui:number-text-field"), LJ = j(Dc)(({ theme: e }) => ({
40438
40525
  marginRight: e.spacing(1),
40439
40526
  "& .MuiInputLabel-root": {
40440
40527
  width: "auto",
@@ -40456,11 +40543,11 @@ var DJ = (0, Fc.default)("@pie-lib:config-ui:number-text-field"), OJ = j(Dc)(({
40456
40543
  minHeight: "auto",
40457
40544
  padding: "6px 0 7px"
40458
40545
  }
40459
- })), kJ = (e, t) => {
40546
+ })), RJ = (e, t) => {
40460
40547
  if (!ht(e) && !ht(t)) return 0;
40461
40548
  if (!ht(e) && ht(t)) return t;
40462
40549
  if (ht(e)) return e;
40463
- }, AJ = class extends N.Component {
40550
+ }, zJ = class extends N.Component {
40464
40551
  static propTypes = {
40465
40552
  disabled: I.default.bool,
40466
40553
  className: I.default.string,
@@ -40486,13 +40573,13 @@ var DJ = (0, Fc.default)("@pie-lib:config-ui:number-text-field"), OJ = j(Dc)(({
40486
40573
  this.setState({ value: t });
40487
40574
  }
40488
40575
  clamp(e, t = this.props.min, n = this.props.max) {
40489
- return ht(e) ? (ht(n) && (e = Math.min(e, n)), ht(t) && (e = Math.max(e, t)), e) : kJ(t, n);
40576
+ return ht(e) ? (ht(n) && (e = Math.min(e, n)), ht(t) && (e = Math.max(e, t)), e) : RJ(t, n);
40490
40577
  }
40491
40578
  onBlur = (e) => {
40492
40579
  let t = e.target.value, n = parseFloat(t);
40493
- DJ("rawNumber: ", n);
40580
+ IJ("rawNumber: ", n);
40494
40581
  let r = this.clamp(n);
40495
- DJ("number: ", r), r !== this.state.value && (DJ("trigger update..."), this.setState({ value: r.toString() }, () => {
40582
+ IJ("number: ", r), r !== this.state.value && (IJ("trigger update..."), this.setState({ value: r.toString() }, () => {
40496
40583
  this.props.onChange(e, r);
40497
40584
  }));
40498
40585
  };
@@ -40512,7 +40599,7 @@ var DJ = (0, Fc.default)("@pie-lib:config-ui:number-text-field"), OJ = j(Dc)(({
40512
40599
  };
40513
40600
  render() {
40514
40601
  let { className: e, label: t, disabled: n, suffix: r, min: i, max: a, inputClassName: o, disableUnderline: s, showErrorWhenOutsideRange: c, variant: l } = this.props, u = c && this.getError();
40515
- return /* @__PURE__ */ P(OJ, {
40602
+ return /* @__PURE__ */ P(LJ, {
40516
40603
  variant: s ? "filled" : l || "standard",
40517
40604
  inputRef: (e) => {
40518
40605
  this.inputRef = e;
@@ -40547,19 +40634,19 @@ var DJ = (0, Fc.default)("@pie-lib:config-ui:number-text-field"), OJ = j(Dc)(({
40547
40634
  };
40548
40635
  //#endregion
40549
40636
  //#region ../../lib-react/config-ui/dist/two-choice.js
40550
- function jJ(e) {
40637
+ function BJ(e) {
40551
40638
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
40552
40639
  }
40553
- function MJ(e, t) {
40554
- return !e || jJ(e) ? e : jJ(e.default) ? e.default : t && jJ(e[t]) ? e[t] : t && jJ(e[t]?.default) ? e[t].default : e;
40640
+ function VJ(e, t) {
40641
+ return !e || BJ(e) ? e : BJ(e.default) ? e.default : t && BJ(e[t]) ? e[t] : t && BJ(e[t]?.default) ? e[t].default : e;
40555
40642
  }
40556
- var NJ = MJ(re, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ = Ce, FJ = PJ.default, IJ = FJ && typeof FJ == "object" ? FJ : PJ, LJ = j("div")(({ theme: e, direction: t }) => ({
40643
+ var HJ = VJ(re, "InputContainer") || VJ(GJ.InputContainer, "InputContainer"), UJ = Ce, WJ = UJ.default, GJ = WJ && typeof WJ == "object" ? WJ : UJ, KJ = j("div")(({ theme: e, direction: t }) => ({
40557
40644
  display: "flex",
40558
40645
  flexWrap: "wrap",
40559
40646
  paddingLeft: 0,
40560
40647
  marginTop: e.spacing(1),
40561
40648
  ...t === "vertical" && { flexDirection: "column" }
40562
- })), RJ = class extends N.Component {
40649
+ })), qJ = class extends N.Component {
40563
40650
  static propTypes = {
40564
40651
  header: I.default.string.isRequired,
40565
40652
  className: I.default.string,
@@ -40577,10 +40664,10 @@ var NJ = MJ(re, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
40577
40664
  label: e,
40578
40665
  value: e
40579
40666
  } : e), s = n || Ac;
40580
- return /* @__PURE__ */ P(NJ, {
40667
+ return /* @__PURE__ */ P(HJ, {
40581
40668
  label: e,
40582
40669
  className: t,
40583
- children: /* @__PURE__ */ P(LJ, {
40670
+ children: /* @__PURE__ */ P(KJ, {
40584
40671
  direction: a,
40585
40672
  children: o.map((e, t) => /* @__PURE__ */ P(s, {
40586
40673
  value: e.value,
@@ -40591,7 +40678,7 @@ var NJ = MJ(re, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
40591
40678
  })
40592
40679
  });
40593
40680
  }
40594
- }, zJ = I.default.shape({
40681
+ }, JJ = I.default.shape({
40595
40682
  label: I.default.string,
40596
40683
  value: I.default.string
40597
40684
  });
@@ -40600,14 +40687,14 @@ var NJ = MJ(re, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
40600
40687
  header: I.default.string.isRequired,
40601
40688
  value: I.default.string.isRequired,
40602
40689
  onChange: I.default.func.isRequired,
40603
- one: I.default.oneOfType([zJ, I.default.string]),
40604
- two: I.default.oneOfType([zJ, I.default.string]),
40690
+ one: I.default.oneOfType([JJ, I.default.string]),
40691
+ two: I.default.oneOfType([JJ, I.default.string]),
40605
40692
  className: I.default.string,
40606
40693
  customLabel: I.default.func
40607
40694
  };
40608
40695
  render() {
40609
40696
  let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
40610
- return /* @__PURE__ */ P(RJ, {
40697
+ return /* @__PURE__ */ P(qJ, {
40611
40698
  customLabel: i,
40612
40699
  header: n,
40613
40700
  className: r,
@@ -40619,21 +40706,21 @@ var NJ = MJ(re, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
40619
40706
  });
40620
40707
  //#endregion
40621
40708
  //#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
40622
- var BJ = Object.defineProperty, VJ = (e, t) => {
40709
+ var YJ = Object.defineProperty, XJ = (e, t) => {
40623
40710
  let n = {};
40624
- for (var r in e) BJ(n, r, {
40711
+ for (var r in e) YJ(n, r, {
40625
40712
  get: e[r],
40626
40713
  enumerable: !0
40627
40714
  });
40628
- return t || BJ(n, Symbol.toStringTag, { value: "Module" }), n;
40629
- }, HJ = j("div")(() => ({
40715
+ return t || YJ(n, Symbol.toStringTag, { value: "Module" }), n;
40716
+ }, ZJ = j("div")(() => ({
40630
40717
  display: "flex",
40631
40718
  flexDirection: "column",
40632
40719
  position: "relative"
40633
- })), UJ = j("div")(() => ({
40720
+ })), QJ = j("div")(() => ({
40634
40721
  display: "flex",
40635
40722
  justifyContent: "space-between"
40636
- })), WJ = j("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), GJ = j("div")(() => ({ flex: "1" })), KJ = j("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), qJ = class extends N.Component {
40723
+ })), $J = j("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), eY = j("div")(() => ({ flex: "1" })), tY = j("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), nY = class extends N.Component {
40637
40724
  static propTypes = {
40638
40725
  mode: I.default.oneOf(["tabbed", "inline"]),
40639
40726
  secondary: I.default.oneOfType([I.default.arrayOf(I.default.node), I.default.node]),
@@ -40651,7 +40738,7 @@ var BJ = Object.defineProperty, VJ = (e, t) => {
40651
40738
  } catch (e) {
40652
40739
  console.log(e.toString());
40653
40740
  }
40654
- return /* @__PURE__ */ F(HJ, {
40741
+ return /* @__PURE__ */ F(ZJ, {
40655
40742
  style: {
40656
40743
  minHeight: i,
40657
40744
  minWidth: a,
@@ -40659,28 +40746,28 @@ var BJ = Object.defineProperty, VJ = (e, t) => {
40659
40746
  maxWidth: s
40660
40747
  },
40661
40748
  children: [
40662
- e === "inline" && /* @__PURE__ */ F(UJ, { children: [/* @__PURE__ */ P(GJ, {
40749
+ e === "inline" && /* @__PURE__ */ F(QJ, { children: [/* @__PURE__ */ P(eY, {
40663
40750
  className: "design-container",
40664
40751
  children: n
40665
- }), l && /* @__PURE__ */ P(KJ, {
40752
+ }), l && /* @__PURE__ */ P(tY, {
40666
40753
  className: "settings-container",
40667
40754
  children: t
40668
40755
  })] }),
40669
- e === "tabbed" && l && /* @__PURE__ */ F(CJ, {
40756
+ e === "tabbed" && l && /* @__PURE__ */ F(MJ, {
40670
40757
  onChange: this.onTabsChange,
40671
40758
  contentClassName: "content-container",
40672
40759
  indicatorColor: "primary",
40673
- children: [/* @__PURE__ */ P(WJ, {
40760
+ children: [/* @__PURE__ */ P($J, {
40674
40761
  title: "Design",
40675
40762
  className: "design-container",
40676
40763
  children: n
40677
- }), /* @__PURE__ */ P(WJ, {
40764
+ }), /* @__PURE__ */ P($J, {
40678
40765
  title: "Settings",
40679
40766
  className: "settings-container",
40680
40767
  children: t
40681
40768
  })]
40682
40769
  }),
40683
- e === "tabbed" && !l && /* @__PURE__ */ P(WJ, {
40770
+ e === "tabbed" && !l && /* @__PURE__ */ P($J, {
40684
40771
  className: "design-container",
40685
40772
  children: n
40686
40773
  })
@@ -40690,18 +40777,18 @@ var BJ = Object.defineProperty, VJ = (e, t) => {
40690
40777
  };
40691
40778
  //#endregion
40692
40779
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
40693
- function JJ() {
40694
- return JJ = Object.assign ? Object.assign.bind() : function(e) {
40780
+ function rY() {
40781
+ return rY = Object.assign ? Object.assign.bind() : function(e) {
40695
40782
  for (var t = 1; t < arguments.length; t++) {
40696
40783
  var n = arguments[t];
40697
40784
  for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
40698
40785
  }
40699
40786
  return e;
40700
- }, JJ.apply(null, arguments);
40787
+ }, rY.apply(null, arguments);
40701
40788
  }
40702
40789
  //#endregion
40703
40790
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
40704
- function YJ(e, t) {
40791
+ function iY(e, t) {
40705
40792
  if (e == null) return {};
40706
40793
  var n = {};
40707
40794
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -40712,19 +40799,19 @@ function YJ(e, t) {
40712
40799
  }
40713
40800
  //#endregion
40714
40801
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
40715
- function XJ(e, t) {
40716
- return XJ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
40802
+ function aY(e, t) {
40803
+ return aY = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
40717
40804
  return e.__proto__ = t, e;
40718
- }, XJ(e, t);
40805
+ }, aY(e, t);
40719
40806
  }
40720
40807
  //#endregion
40721
40808
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
40722
- function ZJ(e, t) {
40723
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, XJ(e, t);
40809
+ function oY(e, t) {
40810
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, aY(e, t);
40724
40811
  }
40725
40812
  //#endregion
40726
40813
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
40727
- var QJ = (function() {
40814
+ var sY = (function() {
40728
40815
  if (typeof Map < "u") return Map;
40729
40816
  function e(e, t) {
40730
40817
  var n = -1;
@@ -40763,34 +40850,34 @@ var QJ = (function() {
40763
40850
  }
40764
40851
  }, t;
40765
40852
  }();
40766
- })(), $J = typeof window < "u" && typeof document < "u" && window.document === document, eY = (function() {
40853
+ })(), cY = typeof window < "u" && typeof document < "u" && window.document === document, lY = (function() {
40767
40854
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
40768
- })(), tY = (function() {
40769
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(eY) : function(e) {
40855
+ })(), uY = (function() {
40856
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(lY) : function(e) {
40770
40857
  return setTimeout(function() {
40771
40858
  return e(Date.now());
40772
40859
  }, 1e3 / 60);
40773
40860
  };
40774
- })(), nY = 2;
40775
- function rY(e, t) {
40861
+ })(), dY = 2;
40862
+ function fY(e, t) {
40776
40863
  var n = !1, r = !1, i = 0;
40777
40864
  function a() {
40778
40865
  n && (n = !1, e()), r && s();
40779
40866
  }
40780
40867
  function o() {
40781
- tY(a);
40868
+ uY(a);
40782
40869
  }
40783
40870
  function s() {
40784
40871
  var e = Date.now();
40785
40872
  if (n) {
40786
- if (e - i < nY) return;
40873
+ if (e - i < dY) return;
40787
40874
  r = !0;
40788
40875
  } else n = !0, r = !1, setTimeout(o, t);
40789
40876
  i = e;
40790
40877
  }
40791
40878
  return s;
40792
40879
  }
40793
- var iY = 20, aY = [
40880
+ var pY = 20, mY = [
40794
40881
  "top",
40795
40882
  "right",
40796
40883
  "bottom",
@@ -40799,9 +40886,9 @@ var iY = 20, aY = [
40799
40886
  "height",
40800
40887
  "size",
40801
40888
  "weight"
40802
- ], oY = typeof MutationObserver < "u", sY = function() {
40889
+ ], hY = typeof MutationObserver < "u", gY = function() {
40803
40890
  function e() {
40804
- this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = rY(this.refresh.bind(this), iY);
40891
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = fY(this.refresh.bind(this), pY);
40805
40892
  }
40806
40893
  return e.prototype.addObserver = function(e) {
40807
40894
  ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
@@ -40818,23 +40905,23 @@ var iY = 20, aY = [
40818
40905
  return e.broadcastActive();
40819
40906
  }), e.length > 0;
40820
40907
  }, e.prototype.connect_ = function() {
40821
- !$J || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), oY ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
40908
+ !cY || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), hY ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
40822
40909
  attributes: !0,
40823
40910
  childList: !0,
40824
40911
  characterData: !0,
40825
40912
  subtree: !0
40826
40913
  })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
40827
40914
  }, e.prototype.disconnect_ = function() {
40828
- !$J || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
40915
+ !cY || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
40829
40916
  }, e.prototype.onTransitionEnd_ = function(e) {
40830
40917
  var t = e.propertyName, n = t === void 0 ? "" : t;
40831
- aY.some(function(e) {
40918
+ mY.some(function(e) {
40832
40919
  return !!~n.indexOf(e);
40833
40920
  }) && this.refresh();
40834
40921
  }, e.getInstance = function() {
40835
40922
  return this.instance_ ||= new e(), this.instance_;
40836
40923
  }, e.instance_ = null, e;
40837
- }(), cY = (function(e, t) {
40924
+ }(), _Y = (function(e, t) {
40838
40925
  for (var n = 0, r = Object.keys(t); n < r.length; n++) {
40839
40926
  var i = r[n];
40840
40927
  Object.defineProperty(e, i, {
@@ -40845,19 +40932,19 @@ var iY = 20, aY = [
40845
40932
  });
40846
40933
  }
40847
40934
  return e;
40848
- }), lY = (function(e) {
40849
- return e && e.ownerDocument && e.ownerDocument.defaultView || eY;
40850
- }), uY = bY(0, 0, 0, 0);
40851
- function dY(e) {
40935
+ }), vY = (function(e) {
40936
+ return e && e.ownerDocument && e.ownerDocument.defaultView || lY;
40937
+ }), yY = kY(0, 0, 0, 0);
40938
+ function bY(e) {
40852
40939
  return parseFloat(e) || 0;
40853
40940
  }
40854
- function fY(e) {
40941
+ function xY(e) {
40855
40942
  return [...arguments].slice(1).reduce(function(t, n) {
40856
40943
  var r = e["border-" + n + "-width"];
40857
- return t + dY(r);
40944
+ return t + bY(r);
40858
40945
  }, 0);
40859
40946
  }
40860
- function pY(e) {
40947
+ function SY(e) {
40861
40948
  for (var t = [
40862
40949
  "top",
40863
40950
  "right",
@@ -40865,40 +40952,40 @@ function pY(e) {
40865
40952
  "left"
40866
40953
  ], n = {}, r = 0, i = t; r < i.length; r++) {
40867
40954
  var a = i[r], o = e["padding-" + a];
40868
- n[a] = dY(o);
40955
+ n[a] = bY(o);
40869
40956
  }
40870
40957
  return n;
40871
40958
  }
40872
- function mY(e) {
40959
+ function CY(e) {
40873
40960
  var t = e.getBBox();
40874
- return bY(0, 0, t.width, t.height);
40961
+ return kY(0, 0, t.width, t.height);
40875
40962
  }
40876
- function hY(e) {
40963
+ function wY(e) {
40877
40964
  var t = e.clientWidth, n = e.clientHeight;
40878
- if (!t && !n) return uY;
40879
- var r = lY(e).getComputedStyle(e), i = pY(r), a = i.left + i.right, o = i.top + i.bottom, s = dY(r.width), c = dY(r.height);
40880
- if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= fY(r, "left", "right") + a), Math.round(c + o) !== n && (c -= fY(r, "top", "bottom") + o)), !_Y(e)) {
40965
+ if (!t && !n) return yY;
40966
+ var r = vY(e).getComputedStyle(e), i = SY(r), a = i.left + i.right, o = i.top + i.bottom, s = bY(r.width), c = bY(r.height);
40967
+ if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= xY(r, "left", "right") + a), Math.round(c + o) !== n && (c -= xY(r, "top", "bottom") + o)), !EY(e)) {
40881
40968
  var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
40882
40969
  Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
40883
40970
  }
40884
- return bY(i.left, i.top, s, c);
40971
+ return kY(i.left, i.top, s, c);
40885
40972
  }
40886
- var gY = (function() {
40973
+ var TY = (function() {
40887
40974
  return typeof SVGGraphicsElement < "u" ? function(e) {
40888
- return e instanceof lY(e).SVGGraphicsElement;
40975
+ return e instanceof vY(e).SVGGraphicsElement;
40889
40976
  } : function(e) {
40890
- return e instanceof lY(e).SVGElement && typeof e.getBBox == "function";
40977
+ return e instanceof vY(e).SVGElement && typeof e.getBBox == "function";
40891
40978
  };
40892
40979
  })();
40893
- function _Y(e) {
40894
- return e === lY(e).document.documentElement;
40980
+ function EY(e) {
40981
+ return e === vY(e).document.documentElement;
40895
40982
  }
40896
- function vY(e) {
40897
- return $J ? gY(e) ? mY(e) : hY(e) : uY;
40983
+ function DY(e) {
40984
+ return cY ? TY(e) ? CY(e) : wY(e) : yY;
40898
40985
  }
40899
- function yY(e) {
40986
+ function OY(e) {
40900
40987
  var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
40901
- return cY(a, {
40988
+ return _Y(a, {
40902
40989
  x: t,
40903
40990
  y: n,
40904
40991
  width: r,
@@ -40909,7 +40996,7 @@ function yY(e) {
40909
40996
  left: t
40910
40997
  }), a;
40911
40998
  }
40912
- function bY(e, t, n, r) {
40999
+ function kY(e, t, n, r) {
40913
41000
  return {
40914
41001
  x: e,
40915
41002
  y: t,
@@ -40917,42 +41004,42 @@ function bY(e, t, n, r) {
40917
41004
  height: r
40918
41005
  };
40919
41006
  }
40920
- var xY = function() {
41007
+ var AY = function() {
40921
41008
  function e(e) {
40922
- this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = bY(0, 0, 0, 0), this.target = e;
41009
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = kY(0, 0, 0, 0), this.target = e;
40923
41010
  }
40924
41011
  return e.prototype.isActive = function() {
40925
- var e = vY(this.target);
41012
+ var e = DY(this.target);
40926
41013
  return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
40927
41014
  }, e.prototype.broadcastRect = function() {
40928
41015
  var e = this.contentRect_;
40929
41016
  return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
40930
41017
  }, e;
40931
- }(), SY = function() {
41018
+ }(), jY = function() {
40932
41019
  function e(e, t) {
40933
- var n = yY(t);
40934
- cY(this, {
41020
+ var n = OY(t);
41021
+ _Y(this, {
40935
41022
  target: e,
40936
41023
  contentRect: n
40937
41024
  });
40938
41025
  }
40939
41026
  return e;
40940
- }(), CY = function() {
41027
+ }(), MY = function() {
40941
41028
  function e(e, t, n) {
40942
- if (this.activeObservations_ = [], this.observations_ = new QJ(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
41029
+ if (this.activeObservations_ = [], this.observations_ = new sY(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
40943
41030
  this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
40944
41031
  }
40945
41032
  return e.prototype.observe = function(e) {
40946
41033
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
40947
41034
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
40948
- if (!(e instanceof lY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
41035
+ if (!(e instanceof vY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
40949
41036
  var t = this.observations_;
40950
- t.has(e) || (t.set(e, new xY(e)), this.controller_.addObserver(this), this.controller_.refresh());
41037
+ t.has(e) || (t.set(e, new AY(e)), this.controller_.addObserver(this), this.controller_.refresh());
40951
41038
  }
40952
41039
  }, e.prototype.unobserve = function(e) {
40953
41040
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
40954
41041
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
40955
- if (!(e instanceof lY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
41042
+ if (!(e instanceof vY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
40956
41043
  var t = this.observations_;
40957
41044
  t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
40958
41045
  }
@@ -40966,7 +41053,7 @@ var xY = function() {
40966
41053
  }, e.prototype.broadcastActive = function() {
40967
41054
  if (this.hasActive()) {
40968
41055
  var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
40969
- return new SY(e.target, e.broadcastRect());
41056
+ return new jY(e.target, e.broadcastRect());
40970
41057
  });
40971
41058
  this.callback_.call(e, t, e), this.clearActive();
40972
41059
  }
@@ -40975,12 +41062,12 @@ var xY = function() {
40975
41062
  }, e.prototype.hasActive = function() {
40976
41063
  return this.activeObservations_.length > 0;
40977
41064
  }, e;
40978
- }(), wY = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new QJ(), TY = function() {
41065
+ }(), NY = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new sY(), PY = function() {
40979
41066
  function e(t) {
40980
41067
  if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
40981
41068
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
40982
- var n = new CY(t, sY.getInstance(), this);
40983
- wY.set(this, n);
41069
+ var n = new MY(t, gY.getInstance(), this);
41070
+ NY.set(this, n);
40984
41071
  }
40985
41072
  return e;
40986
41073
  }();
@@ -40989,27 +41076,27 @@ var xY = function() {
40989
41076
  "unobserve",
40990
41077
  "disconnect"
40991
41078
  ].forEach(function(e) {
40992
- TY.prototype[e] = function() {
41079
+ PY.prototype[e] = function() {
40993
41080
  var t;
40994
- return (t = wY.get(this))[e].apply(t, arguments);
41081
+ return (t = NY.get(this))[e].apply(t, arguments);
40995
41082
  };
40996
41083
  });
40997
- var EY = (function() {
40998
- return eY.ResizeObserver === void 0 ? TY : eY.ResizeObserver;
40999
- })(), DY = [
41084
+ var FY = (function() {
41085
+ return lY.ResizeObserver === void 0 ? PY : lY.ResizeObserver;
41086
+ })(), IY = [
41000
41087
  "client",
41001
41088
  "offset",
41002
41089
  "scroll",
41003
41090
  "bounds",
41004
41091
  "margin"
41005
41092
  ];
41006
- function OY(e) {
41093
+ function LY(e) {
41007
41094
  var t = [];
41008
- return DY.forEach(function(n) {
41095
+ return IY.forEach(function(n) {
41009
41096
  e[n] && t.push(n);
41010
41097
  }), t;
41011
41098
  }
41012
- function kY(e, t) {
41099
+ function RY(e, t) {
41013
41100
  var n = {};
41014
41101
  if (t.indexOf("client") > -1 && (n.client = {
41015
41102
  top: e.clientTop,
@@ -41048,14 +41135,14 @@ function kY(e, t) {
41048
41135
  }
41049
41136
  return n;
41050
41137
  }
41051
- function AY(e) {
41138
+ function zY(e) {
41052
41139
  return e && e.ownerDocument && e.ownerDocument.defaultView || window;
41053
41140
  }
41054
- function jY(e) {
41141
+ function BY(e) {
41055
41142
  return function(t) {
41056
41143
  var n, r;
41057
41144
  return r = n = /*#__PURE__*/ function(n) {
41058
- ZJ(r, n);
41145
+ oY(r, n);
41059
41146
  function r() {
41060
41147
  var t, r = [...arguments];
41061
41148
  return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
@@ -41066,24 +41153,24 @@ function jY(e) {
41066
41153
  bounds: {},
41067
41154
  margin: {}
41068
41155
  } }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
41069
- var r = kY(t._node, e || OY(t.props));
41156
+ var r = RY(t._node, e || LY(t.props));
41070
41157
  n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
41071
41158
  t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
41072
41159
  });
41073
41160
  }, t._handleRef = function(e) {
41074
- t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = AY(t._node);
41161
+ t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = zY(t._node);
41075
41162
  var n = t.props.innerRef;
41076
41163
  n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
41077
41164
  }, t;
41078
41165
  }
41079
41166
  var i = r.prototype;
41080
41167
  return i.componentDidMount = function() {
41081
- this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new EY(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(kY(this._node, e || OY(this.props))));
41168
+ this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new FY(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(RY(this._node, e || LY(this.props))));
41082
41169
  }, i.componentWillUnmount = function() {
41083
41170
  this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
41084
41171
  }, i.render = function() {
41085
41172
  var e = this.props;
41086
- return e.innerRef, e.onResize, jt(t, JJ({}, YJ(e, ["innerRef", "onResize"]), {
41173
+ return e.innerRef, e.onResize, jt(t, rY({}, iY(e, ["innerRef", "onResize"]), {
41087
41174
  measureRef: this._handleRef,
41088
41175
  measure: this.measure,
41089
41176
  contentRect: this.state.contentRect
@@ -41100,7 +41187,7 @@ function jY(e) {
41100
41187
  }, r;
41101
41188
  };
41102
41189
  }
41103
- var MY = jY()(function(e) {
41190
+ var VY = BY()(function(e) {
41104
41191
  var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
41105
41192
  return i({
41106
41193
  measure: t,
@@ -41108,10 +41195,10 @@ var MY = jY()(function(e) {
41108
41195
  contentRect: r
41109
41196
  });
41110
41197
  });
41111
- MY.displayName = "Measure", MY.propTypes.children = I.default.func;
41198
+ VY.displayName = "Measure", VY.propTypes.children = I.default.func;
41112
41199
  //#endregion
41113
41200
  //#region ../../lib-react/config-ui/dist/layout/settings-box.js
41114
- var NY = j("div")(() => ({
41201
+ var HY = j("div")(() => ({
41115
41202
  backgroundColor: k.white(),
41116
41203
  border: `2px solid ${k.border()}`,
41117
41204
  display: "flex",
@@ -41121,7 +41208,7 @@ var NY = j("div")(() => ({
41121
41208
  maxWidth: "300px",
41122
41209
  padding: "20px 4px 4px 20px",
41123
41210
  zIndex: 99
41124
- })), PY = class extends N.Component {
41211
+ })), UY = class extends N.Component {
41125
41212
  static propTypes = {
41126
41213
  className: I.default.string,
41127
41214
  children: I.default.oneOfType([I.default.arrayOf(I.default.node), I.default.node]).isRequired
@@ -41129,19 +41216,19 @@ var NY = j("div")(() => ({
41129
41216
  static defaultProps = {};
41130
41217
  render() {
41131
41218
  let { className: e, children: t } = this.props;
41132
- return /* @__PURE__ */ P(NY, {
41219
+ return /* @__PURE__ */ P(HY, {
41133
41220
  className: e,
41134
41221
  children: t
41135
41222
  });
41136
41223
  }
41137
- }, FY = Ze({
41224
+ }, WY = Ze({
41138
41225
  typography: { fontFamily: "inherit" },
41139
41226
  components: { MuiButton: { styleOverrides: { contained: {
41140
41227
  backgroundColor: "#e0e0e0",
41141
41228
  color: "#000000",
41142
41229
  "&:hover": { backgroundColor: "#bdbdbd" }
41143
41230
  } } } }
41144
- }), IY = class extends N.Component {
41231
+ }), GY = class extends N.Component {
41145
41232
  static propTypes = {
41146
41233
  children: I.default.oneOfType([
41147
41234
  I.default.string,
@@ -41174,19 +41261,19 @@ var NY = j("div")(() => ({
41174
41261
  return /* @__PURE__ */ P(w, {
41175
41262
  injectFirst: !0,
41176
41263
  children: /* @__PURE__ */ P(et, {
41177
- theme: FY,
41178
- children: /* @__PURE__ */ P(MY, {
41264
+ theme: WY,
41265
+ children: /* @__PURE__ */ P(VY, {
41179
41266
  bounds: !0,
41180
41267
  onResize: this.onResize,
41181
41268
  children: ({ measureRef: e }) => {
41182
- let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ P(PY, {
41269
+ let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ P(UY, {
41183
41270
  className: "settings-box",
41184
41271
  children: n
41185
41272
  }) : n;
41186
41273
  return /* @__PURE__ */ F("div", {
41187
41274
  ref: e,
41188
41275
  className: "main-container extraCSSRules",
41189
- children: [a?.rules ? /* @__PURE__ */ P("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ P(qJ, {
41276
+ children: [a?.rules ? /* @__PURE__ */ P("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ P(nY, {
41190
41277
  mode: o,
41191
41278
  secondary: s,
41192
41279
  dimensions: i,
@@ -41198,36 +41285,36 @@ var NY = j("div")(() => ({
41198
41285
  })
41199
41286
  });
41200
41287
  }
41201
- }, LY = jY("bounds")(IY), RY = /* @__PURE__ */ VJ({
41202
- ConfigLayout: () => LY,
41203
- LayoutContents: () => qJ
41204
- }), zY = /* @__PURE__ */ VJ({
41205
- firstAvailableIndex: () => VY,
41206
- normalizeChoices: () => BY
41207
- }), BY = (e) => {
41288
+ }, KY = BY("bounds")(GY), qY = /* @__PURE__ */ XJ({
41289
+ ConfigLayout: () => KY,
41290
+ LayoutContents: () => nY
41291
+ }), JY = /* @__PURE__ */ XJ({
41292
+ firstAvailableIndex: () => XY,
41293
+ normalizeChoices: () => YY
41294
+ }), YY = (e) => {
41208
41295
  let t = e.choices.map((e, t) => (e.value ||= `${t}`, e));
41209
41296
  return {
41210
41297
  ...e,
41211
41298
  choices: t
41212
41299
  };
41213
- }, VY = (e, t) => ct(e, `${t}`) ? VY(e, t + 1) : `${t}`, HY = j("div")(() => ({
41300
+ }, XY = (e, t) => ct(e, `${t}`) ? XY(e, t + 1) : `${t}`, ZY = j("div")(() => ({
41214
41301
  display: "flex",
41215
41302
  width: "100%",
41216
41303
  justifyContent: "space-between"
41217
- })), UY = j(ee)(({ theme: e }) => ({
41304
+ })), QY = j(ee)(({ theme: e }) => ({
41218
41305
  color: "rgba(0, 0, 0, 0.89)",
41219
41306
  fontSize: e.typography.fontSize,
41220
41307
  paddingTop: e.spacing(2)
41221
- })), WY = j(qs)(({ checked: e }) => ({
41308
+ })), $Y = j(qs)(({ checked: e }) => ({
41222
41309
  "&.Mui-checked .MuiSwitch-thumb": { color: `${k.tertiary()} !important` },
41223
41310
  "&.Mui-checked .MuiSwitch-track": { backgroundColor: `${k.tertiaryLight()} !important` },
41224
41311
  "& .MuiSwitch-track": { backgroundColor: e ? `${k.tertiaryLight()} !important` : void 0 }
41225
- })), GY = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ F(HY, { children: [/* @__PURE__ */ P(UY, { children: n }), /* @__PURE__ */ P(WY, {
41312
+ })), eX = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ F(ZY, { children: [/* @__PURE__ */ P(QY, { children: n }), /* @__PURE__ */ P($Y, {
41226
41313
  checked: e,
41227
41314
  disabled: t,
41228
41315
  onChange: (e) => r(e.target.checked)
41229
41316
  })] });
41230
- GY.propTypes = {
41317
+ eX.propTypes = {
41231
41318
  checked: I.default.bool,
41232
41319
  disabled: I.default.bool,
41233
41320
  label: I.default.string.isRequired,
@@ -41235,20 +41322,20 @@ GY.propTypes = {
41235
41322
  };
41236
41323
  //#endregion
41237
41324
  //#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
41238
- var KY = j(Oa)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
41325
+ var tX = j(Oa)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
41239
41326
  color: "rgba(0, 0, 0, 0.89)",
41240
41327
  fontSize: e.typography.fontSize - 2,
41241
41328
  left: "-5px",
41242
41329
  position: "relative"
41243
- } })), qY = j(Ds)(() => ({ color: `${k.tertiary()} !important` })), JY = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ P(KY, {
41330
+ } })), nX = j(Ds)(() => ({ color: `${k.tertiary()} !important` })), rX = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ P(tX, {
41244
41331
  value: t,
41245
- control: /* @__PURE__ */ P(qY, {
41332
+ control: /* @__PURE__ */ P(nX, {
41246
41333
  checked: n,
41247
41334
  onChange: r
41248
41335
  }),
41249
41336
  label: e
41250
41337
  });
41251
- JY.propTypes = {
41338
+ rX.propTypes = {
41252
41339
  label: I.default.string,
41253
41340
  value: I.default.string,
41254
41341
  checked: I.default.bool,
@@ -41256,26 +41343,26 @@ JY.propTypes = {
41256
41343
  };
41257
41344
  //#endregion
41258
41345
  //#region ../../lib-react/config-ui/dist/settings/panel.js
41259
- var YY = (0, Fc.default)("pie-lib:config-ui:settings:panel"), XY = {
41346
+ var iX = (0, Fc.default)("pie-lib:config-ui:settings:panel"), aX = {
41260
41347
  label: I.default.string,
41261
41348
  value: I.default.string
41262
- }, ZY = {
41349
+ }, oX = {
41263
41350
  label: I.default.string,
41264
41351
  value: I.default.string,
41265
41352
  onChange: I.default.func
41266
- }, QY = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ P(EJ, {
41353
+ }, sX = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ P(FJ, {
41267
41354
  checked: t,
41268
41355
  label: e,
41269
41356
  onChange: (e) => {
41270
41357
  n(e.target.checked);
41271
41358
  }
41272
41359
  });
41273
- QY.propTypes = {
41360
+ sX.propTypes = {
41274
41361
  label: I.default.string,
41275
41362
  value: I.default.bool,
41276
41363
  onChange: I.default.func
41277
41364
  };
41278
- var $Y = j(RJ)(({ theme: e }) => ({
41365
+ var cX = j(qJ)(({ theme: e }) => ({
41279
41366
  marginTop: e.spacing(.5),
41280
41367
  paddingBottom: e.spacing(.5),
41281
41368
  width: "100%",
@@ -41286,29 +41373,29 @@ var $Y = j(RJ)(({ theme: e }) => ({
41286
41373
  marginTop: e.spacing(2.5)
41287
41374
  },
41288
41375
  "& > div": { marginTop: e.spacing(2.5) }
41289
- })), eX = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ P($Y, {
41376
+ })), lX = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ P(cX, {
41290
41377
  direction: "horizontal",
41291
- customLabel: JY,
41378
+ customLabel: rX,
41292
41379
  value: t,
41293
41380
  header: e,
41294
41381
  opts: r,
41295
41382
  onChange: n
41296
41383
  });
41297
- eX.propTypes = {
41298
- ...ZY,
41299
- choices: I.default.arrayOf(I.default.shape(XY))
41384
+ lX.propTypes = {
41385
+ ...oX,
41386
+ choices: I.default.arrayOf(I.default.shape(aX))
41300
41387
  };
41301
- var tX = eX, nX = j("p")(({ theme: e }) => ({
41388
+ var uX = lX, dX = j("p")(({ theme: e }) => ({
41302
41389
  margin: 0,
41303
41390
  fontSize: e.typography.fontSize
41304
- })), rX = j(as)(({ theme: e }) => ({
41391
+ })), fX = j(as)(({ theme: e }) => ({
41305
41392
  marginTop: e.spacing(.5),
41306
41393
  border: "2px solid lightgrey",
41307
41394
  padding: `0 ${e.spacing(1)}`,
41308
41395
  borderRadius: "4px"
41309
- })), iX = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
41396
+ })), pX = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
41310
41397
  let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
41311
- return /* @__PURE__ */ F("div", { children: [e && /* @__PURE__ */ P(nX, { children: e }), /* @__PURE__ */ P(rX, {
41398
+ return /* @__PURE__ */ F("div", { children: [e && /* @__PURE__ */ P(dX, { children: e }), /* @__PURE__ */ P(fX, {
41312
41399
  value: t || r && r[0],
41313
41400
  onChange: ({ target: e }) => n(e.value),
41314
41401
  input: /* @__PURE__ */ P(Ra, { id: `dropdown-${e}` }),
@@ -41323,14 +41410,14 @@ var tX = eX, nX = j("p")(({ theme: e }) => ({
41323
41410
  }, t))
41324
41411
  })] });
41325
41412
  };
41326
- iX.propTypes = {
41327
- ...ZY,
41413
+ pX.propTypes = {
41414
+ ...oX,
41328
41415
  choices: I.default.arrayOf(I.default.string)
41329
41416
  };
41330
- var aX = j(me)(({ theme: e }) => ({
41417
+ var mX = j(me)(({ theme: e }) => ({
41331
41418
  marginRight: e.spacing(3),
41332
41419
  marginTop: e.spacing(1)
41333
- })), oX = ({ label: e }) => /* @__PURE__ */ P(aX, { children: e }), sX = j(AJ)(({ theme: e }) => ({
41420
+ })), hX = ({ label: e }) => /* @__PURE__ */ P(mX, { children: e }), gX = j(zJ)(({ theme: e }) => ({
41334
41421
  width: "35%",
41335
41422
  marginRight: e.spacing(3),
41336
41423
  marginTop: e.spacing(1),
@@ -41341,7 +41428,7 @@ var aX = j(me)(({ theme: e }) => ({
41341
41428
  padding: `0 ${e.spacing(1)}`,
41342
41429
  backgroundColor: "transparent"
41343
41430
  }
41344
- })), cX = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ P(sX, {
41431
+ })), _X = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ P(gX, {
41345
41432
  variant: "standard",
41346
41433
  label: e || "Label",
41347
41434
  value: t,
@@ -41352,45 +41439,45 @@ var aX = j(me)(({ theme: e }) => ({
41352
41439
  showErrorWhenOutsideRange: !0,
41353
41440
  disableUnderline: !0
41354
41441
  });
41355
- cX.propTypes = {
41356
- ...ZY,
41442
+ _X.propTypes = {
41443
+ ...oX,
41357
41444
  suffix: I.default.string,
41358
41445
  min: I.default.number,
41359
41446
  max: I.default.number,
41360
41447
  value: I.default.number
41361
- }, oX.propTypes = { ...ZY };
41362
- var lX = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ P(GY, {
41448
+ }, hX.propTypes = { ...oX };
41449
+ var vX = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ P(eX, {
41363
41450
  label: t,
41364
41451
  checked: !!n,
41365
41452
  disabled: !!e,
41366
41453
  toggle: r
41367
41454
  });
41368
- lX.propTypes = {
41369
- ...ZY,
41455
+ vX.propTypes = {
41456
+ ...oX,
41370
41457
  value: I.default.bool
41371
41458
  };
41372
- var uX = {
41373
- toggle: lX,
41374
- radio: tX,
41375
- dropdown: iX,
41376
- numberField: cX,
41377
- checkbox: QY,
41378
- textField: oX
41379
- }, dX = j("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), fX = j("div")(({ theme: e }) => ({
41459
+ var yX = {
41460
+ toggle: vX,
41461
+ radio: uX,
41462
+ dropdown: pX,
41463
+ numberField: _X,
41464
+ checkbox: sX,
41465
+ textField: hX
41466
+ }, bX = j("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), xX = j("div")(({ theme: e }) => ({
41380
41467
  color: "#495B8F",
41381
41468
  fontSize: e.typography.fontSize + 2,
41382
41469
  fontWeight: 600,
41383
41470
  marginBottom: e.spacing(1)
41384
- })), pX = j("p")(({ theme: e }) => ({
41471
+ })), SX = j("p")(({ theme: e }) => ({
41385
41472
  fontSize: e.typography.fontSize,
41386
41473
  marginBottom: 0
41387
- })), mX = (e) => {
41474
+ })), CX = (e) => {
41388
41475
  let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
41389
41476
  let { isConfigProperty: o, ...s } = Et(e, r || n), c = Et(o ? i : t, n), l = {
41390
41477
  ...s,
41391
41478
  key: n,
41392
41479
  value: c
41393
- }, u = uX[l.type];
41480
+ }, u = yX[l.type];
41394
41481
  return /* @__PURE__ */ P(u, {
41395
41482
  ...l,
41396
41483
  onChange: (e) => a(n, e, o)
@@ -41399,18 +41486,18 @@ var uX = {
41399
41486
  let n = e[t];
41400
41487
  if (!n) return null;
41401
41488
  let { type: r, label: i, fields: a, choices: s } = n;
41402
- return r === "numberFields" ? /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(pX, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
41489
+ return r === "numberFields" ? /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(SX, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
41403
41490
  };
41404
- return /* @__PURE__ */ F(dX, { children: [/* @__PURE__ */ P(fX, { children: n }), Object.keys(r).map((e) => s(r, e))] });
41491
+ return /* @__PURE__ */ F(bX, { children: [/* @__PURE__ */ P(xX, { children: n }), Object.keys(r).map((e) => s(r, e))] });
41405
41492
  };
41406
- mX.propTypes = {
41493
+ CX.propTypes = {
41407
41494
  model: I.default.object,
41408
41495
  label: I.default.string,
41409
41496
  group: I.default.object,
41410
41497
  configuration: I.default.object,
41411
41498
  onChange: I.default.func
41412
41499
  };
41413
- var hX = class extends N.Component {
41500
+ var wX = class extends N.Component {
41414
41501
  static propTypes = {
41415
41502
  model: I.default.object,
41416
41503
  configuration: I.default.object,
@@ -41424,13 +41511,13 @@ var hX = class extends N.Component {
41424
41511
  onChangeConfiguration: () => {}
41425
41512
  };
41426
41513
  change = (e, t, n = !1) => {
41427
- YY("[changeModel]", e, t);
41514
+ iX("[changeModel]", e, t);
41428
41515
  let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
41429
41516
  n ? (vt(o, e, t), i(o, e)) : (vt(a, e, t), r(a, e));
41430
41517
  };
41431
41518
  render() {
41432
41519
  let { groups: e, model: t, configuration: n, modal: r } = this.props;
41433
- return YY("render:", t), /* @__PURE__ */ F("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ P(mX, {
41520
+ return iX("render:", t), /* @__PURE__ */ F("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ P(CX, {
41434
41521
  label: r,
41435
41522
  model: t,
41436
41523
  configuration: n,
@@ -41438,59 +41525,59 @@ var hX = class extends N.Component {
41438
41525
  onChange: this.change
41439
41526
  }, r) : null), r] });
41440
41527
  }
41441
- }, gX = /* @__PURE__ */ VJ({
41442
- Panel: () => hX,
41443
- checkbox: () => wX,
41444
- checkboxes: () => TX,
41445
- dropdown: () => xX,
41446
- numberField: () => SX,
41447
- numberFields: () => CX,
41448
- radio: () => bX,
41449
- textField: () => _X,
41450
- toggle: () => vX
41451
- }), _X = (e, t = !0) => ({
41528
+ }, TX = /* @__PURE__ */ XJ({
41529
+ Panel: () => wX,
41530
+ checkbox: () => NX,
41531
+ checkboxes: () => PX,
41532
+ dropdown: () => AX,
41533
+ numberField: () => jX,
41534
+ numberFields: () => MX,
41535
+ radio: () => kX,
41536
+ textField: () => EX,
41537
+ toggle: () => DX
41538
+ }), EX = (e, t = !0) => ({
41452
41539
  label: e,
41453
41540
  type: "textField",
41454
41541
  isConfigProperty: t
41455
- }), vX = (e, t = !1, n = !1) => ({
41542
+ }), DX = (e, t = !1, n = !1) => ({
41456
41543
  type: "toggle",
41457
41544
  label: e,
41458
41545
  isConfigProperty: t,
41459
41546
  disabled: n
41460
- }), yX = (e) => typeof e == "string" ? {
41547
+ }), OX = (e) => typeof e == "string" ? {
41461
41548
  label: e,
41462
41549
  value: e
41463
- } : e, bX = function() {
41550
+ } : e, kX = function() {
41464
41551
  let [e, t, n = !1] = Array.prototype.slice.call(arguments);
41465
41552
  return {
41466
41553
  type: "radio",
41467
41554
  label: e,
41468
- choices: t && t.map((e) => yX(e)),
41555
+ choices: t && t.map((e) => OX(e)),
41469
41556
  isConfigProperty: n
41470
41557
  };
41471
- }, xX = (e, t, n = !1) => ({
41558
+ }, AX = (e, t, n = !1) => ({
41472
41559
  type: "dropdown",
41473
41560
  label: e,
41474
41561
  choices: t,
41475
41562
  isConfigProperty: n
41476
- }), SX = (e, t, n = !1) => ({
41563
+ }), jX = (e, t, n = !1) => ({
41477
41564
  ...t,
41478
41565
  label: e,
41479
41566
  type: "numberField",
41480
41567
  isConfigProperty: n
41481
- }), CX = (e, t, n = !1) => (Object.keys(t).map((e) => {
41482
- t[e] = SX(t[e].label, t[e], n);
41568
+ }), MX = (e, t, n = !1) => (Object.keys(t).map((e) => {
41569
+ t[e] = jX(t[e].label, t[e], n);
41483
41570
  }), {
41484
41571
  type: "numberFields",
41485
41572
  label: e,
41486
41573
  fields: t
41487
- }), wX = (e, t, n = !1) => ({
41574
+ }), NX = (e, t, n = !1) => ({
41488
41575
  ...t,
41489
41576
  label: e,
41490
41577
  type: "checkbox",
41491
41578
  isConfigProperty: n
41492
- }), TX = (e, t, n = !1) => (Object.keys(t).map((e) => {
41493
- t[e] = wX(t[e].label, t[e], n);
41579
+ }), PX = (e, t, n = !1) => (Object.keys(t).map((e) => {
41580
+ t[e] = NX(t[e].label, t[e], n);
41494
41581
  }), {
41495
41582
  type: "checkboxes",
41496
41583
  label: e,
@@ -41498,13 +41585,13 @@ var hX = class extends N.Component {
41498
41585
  });
41499
41586
  //#endregion
41500
41587
  //#region ../../lib-react/config-ui/dist/index.js
41501
- function EX(e) {
41588
+ function FX(e) {
41502
41589
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
41503
41590
  }
41504
- function DX(e, t) {
41505
- return !e || EX(e) ? e : EX(e.default) ? e.default : t && EX(e[t]) ? e[t] : t && EX(e[t]?.default) ? e[t].default : e;
41591
+ function IX(e, t) {
41592
+ return !e || FX(e) ? e : FX(e.default) ? e.default : t && FX(e[t]) ? e[t] : t && FX(e[t]?.default) ? e[t].default : e;
41506
41593
  }
41507
- var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX = Ce, AX = kX.default, jX = AX && typeof AX == "object" ? AX : kX, MX = class e extends CustomEvent {
41594
+ var LX = IX(re, "InputContainer") || IX(BX.InputContainer, "InputContainer"), RX = Ce, zX = RX.default, BX = zX && typeof zX == "object" ? zX : RX, VX = class e extends CustomEvent {
41508
41595
  static {
41509
41596
  this.TYPE = "model.updated";
41510
41597
  }
@@ -41517,7 +41604,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41517
41604
  }
41518
41605
  }), this.update = t, this.reset = n;
41519
41606
  }
41520
- }, NX = class e extends CustomEvent {
41607
+ }, HX = class e extends CustomEvent {
41521
41608
  static {
41522
41609
  this.TYPE = "delete.image";
41523
41610
  }
@@ -41530,7 +41617,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41530
41617
  }
41531
41618
  }), this.src = t, this.done = n;
41532
41619
  }
41533
- }, PX = class e extends CustomEvent {
41620
+ }, UX = class e extends CustomEvent {
41534
41621
  static {
41535
41622
  this.TYPE = "insert.image";
41536
41623
  }
@@ -41540,7 +41627,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41540
41627
  detail: t
41541
41628
  }), this.handler = t;
41542
41629
  }
41543
- }, FX = class e extends CustomEvent {
41630
+ }, WX = class e extends CustomEvent {
41544
41631
  static {
41545
41632
  this.TYPE = "delete.sound";
41546
41633
  }
@@ -41553,7 +41640,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41553
41640
  }
41554
41641
  }), this.src = t, this.done = n;
41555
41642
  }
41556
- }, IX = class e extends CustomEvent {
41643
+ }, GX = class e extends CustomEvent {
41557
41644
  static {
41558
41645
  this.TYPE = "insert.sound";
41559
41646
  }
@@ -41563,17 +41650,17 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41563
41650
  detail: t
41564
41651
  }), this.handler = t;
41565
41652
  }
41566
- }, LX = (e = {}, t = {}) => ({
41653
+ }, KX = (e = {}, t = {}) => ({
41567
41654
  ...t,
41568
41655
  ...e
41569
- }), RX = Ve(/*#__PURE__*/ P("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), "Info"), zX = j(tJ)({
41656
+ }), qX = Ve(/*#__PURE__*/ P("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), "Info"), JX = j(uJ)({
41570
41657
  flex: "1",
41571
41658
  maxWidth: "100%"
41572
- }), BX = j("div")(({ theme: e }) => ({
41659
+ }), YX = j("div")(({ theme: e }) => ({
41573
41660
  display: "flex",
41574
41661
  justifyContent: "space-between",
41575
41662
  paddingBottom: e.spacing(1)
41576
- })), VX = class extends N.Component {
41663
+ })), XX = class extends N.Component {
41577
41664
  static propTypes = {
41578
41665
  configuration: I.default.object.isRequired,
41579
41666
  deleteFocusedEl: I.default.func,
@@ -41603,7 +41690,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41603
41690
  }
41604
41691
  render() {
41605
41692
  let { onChange: e, configuration: t, label: n, deleteFocusedEl: r, disabled: i, imageSupport: a, toolbarOpts: o, spellCheck: s, error: c, maxImageWidth: l, maxImageHeight: u, uploadSoundSupport: d, mathMlOptions: f = {}, focusedEl: p, index: m } = this.props, { headers: h, baseInputConfiguration: g } = t;
41606
- return /* @__PURE__ */ P(BX, { children: /* @__PURE__ */ P(zX, {
41693
+ return /* @__PURE__ */ P(YX, { children: /* @__PURE__ */ P(JX, {
41607
41694
  imageSupport: a,
41608
41695
  disabled: i,
41609
41696
  autoFocus: p != null && p === m,
@@ -41611,7 +41698,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41611
41698
  label: "label",
41612
41699
  markup: n,
41613
41700
  onChange: e,
41614
- pluginProps: LX(h?.inputConfiguration, g),
41701
+ pluginProps: KX(h?.inputConfiguration, g),
41615
41702
  toolbarOpts: o,
41616
41703
  spellCheck: s,
41617
41704
  error: c,
@@ -41625,7 +41712,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41625
41712
  mathMlOptions: f
41626
41713
  }) });
41627
41714
  }
41628
- }, HX = j(f)(({ theme: e }) => ({ height: e.spacing(4) })), UX = class extends N.Component {
41715
+ }, ZX = j(f)(({ theme: e }) => ({ height: e.spacing(4) })), QX = class extends N.Component {
41629
41716
  static propTypes = {
41630
41717
  label: I.default.string,
41631
41718
  onClick: I.default.func,
@@ -41634,7 +41721,7 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41634
41721
  static defaultProps = { label: "Add" };
41635
41722
  render() {
41636
41723
  let { label: e, onClick: t, disabled: n } = this.props;
41637
- return /* @__PURE__ */ P(HX, {
41724
+ return /* @__PURE__ */ P(ZX, {
41638
41725
  onClick: t,
41639
41726
  disabled: n,
41640
41727
  size: "small",
@@ -41643,34 +41730,34 @@ var OX = DX(re, "InputContainer") || DX(jX.InputContainer, "InputContainer"), kX
41643
41730
  children: e
41644
41731
  });
41645
41732
  }
41646
- }, WX = j(f)({
41733
+ }, $X = j(f)({
41647
41734
  margin: 0,
41648
41735
  padding: 0
41649
- }), GX = ({ label: e, onClick: t, disabled: n }) => /* @__PURE__ */ P(WX, {
41736
+ }), eZ = ({ label: e, onClick: t, disabled: n }) => /* @__PURE__ */ P($X, {
41650
41737
  onClick: t,
41651
41738
  size: "small",
41652
41739
  color: "primary",
41653
41740
  disabled: n,
41654
41741
  children: e
41655
- }), KX = Ve(/*#__PURE__*/ P("path", { d: "M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" }), "RemoveCircleOutline");
41742
+ }), tZ = Ve(/*#__PURE__*/ P("path", { d: "M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" }), "RemoveCircleOutline");
41656
41743
  //#endregion
41657
41744
  //#region src/author/design/categories/choice-preview.tsx
41658
- function qX(e) {
41745
+ function nZ(e) {
41659
41746
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
41660
41747
  }
41661
- function JX(e, t) {
41662
- return !e || qX(e) ? e : qX(e.default) ? e.default : t && qX(e[t]) ? e[t] : t && qX(e[t]?.default) ? e[t].default : e;
41748
+ function rZ(e, t) {
41749
+ return !e || nZ(e) ? e : nZ(e.default) ? e.default : t && nZ(e[t]) ? e[t] : t && nZ(e[t]?.default) ? e[t].default : e;
41663
41750
  }
41664
- var YX = JX(S, "HtmlAndMath") || JX(QX.HtmlAndMath, "HtmlAndMath"), XX = Ce, ZX = XX.default, QX = ZX && typeof ZX == "object" ? ZX : XX, $X = j("div")({
41751
+ var iZ = rZ(S, "HtmlAndMath") || rZ(sZ.HtmlAndMath, "HtmlAndMath"), aZ = Ce, oZ = aZ.default, sZ = oZ && typeof oZ == "object" ? oZ : aZ, cZ = j("div")({
41665
41752
  position: "relative",
41666
41753
  overflow: "auto",
41667
41754
  touchAction: "none"
41668
- }), eZ = j(wn)({
41755
+ }), lZ = j(wn)({
41669
41756
  position: "absolute",
41670
41757
  right: 0,
41671
41758
  top: 0,
41672
41759
  color: `${k.tertiary()} !important`
41673
- }), tZ = class extends N.Component {
41760
+ }), uZ = class extends N.Component {
41674
41761
  static propTypes = {
41675
41762
  alternateResponseIndex: I.default.number,
41676
41763
  category: I.default.object,
@@ -41685,7 +41772,7 @@ var YX = JX(S, "HtmlAndMath") || JX(QX.HtmlAndMath, "HtmlAndMath"), XX = Ce, ZX
41685
41772
  };
41686
41773
  render() {
41687
41774
  let { alternateResponseIndex: e, category: t, choice: n, choiceIndex: r } = this.props, i = t && t.id, a = e === void 0 ? `${n.id}-${i}-${r}` : `${n.id}-${i}-${r}-alt-${e}`;
41688
- return /* @__PURE__ */ F($X, { children: [n ? /* @__PURE__ */ P(Qt, {
41775
+ return /* @__PURE__ */ F(cZ, { children: [n ? /* @__PURE__ */ P(Qt, {
41689
41776
  alternateResponseIndex: e,
41690
41777
  category: t,
41691
41778
  choice: n,
@@ -41694,19 +41781,19 @@ var YX = JX(S, "HtmlAndMath") || JX(QX.HtmlAndMath, "HtmlAndMath"), XX = Ce, ZX
41694
41781
  type: "choice-preview",
41695
41782
  id: a,
41696
41783
  categoryId: i,
41697
- children: /* @__PURE__ */ P(YX, { html: n?.content })
41698
- }) : null, /* @__PURE__ */ P(eZ, {
41784
+ children: /* @__PURE__ */ P(iZ, { html: n?.content })
41785
+ }) : null, /* @__PURE__ */ P(lZ, {
41699
41786
  "aria-label": "delete",
41700
41787
  onClick: this.delete,
41701
41788
  size: "large",
41702
- children: /* @__PURE__ */ P(KX, {})
41789
+ children: /* @__PURE__ */ P(tZ, {})
41703
41790
  })] });
41704
41791
  }
41705
41792
  };
41706
41793
  //#endregion
41707
41794
  //#region src/author/design/categories/droppable-placeholder.tsx
41708
41795
  (0, Fc.default)("@pie-element:categorize:configure");
41709
- var nZ = j("div")(({ theme: e }) => ({
41796
+ var dZ = j("div")(({ theme: e }) => ({
41710
41797
  display: "flex",
41711
41798
  alignItems: "center",
41712
41799
  justifyContent: "center",
@@ -41714,20 +41801,20 @@ var nZ = j("div")(({ theme: e }) => ({
41714
41801
  color: `rgba(${e.palette.common.black}, 0.4)`,
41715
41802
  width: "100%",
41716
41803
  height: "100%"
41717
- })), rZ = () => /* @__PURE__ */ P(nZ, { children: "Drag your correct answers here" }), iZ = ({ alternateResponseIndex: e, category: t, choices: n, onDeleteChoice: r }) => /* @__PURE__ */ P(N.Fragment, { children: (n || []).map((n, i) => n && /* @__PURE__ */ P(tZ, {
41804
+ })), fZ = () => /* @__PURE__ */ P(dZ, { children: "Drag your correct answers here" }), pZ = ({ alternateResponseIndex: e, category: t, choices: n, onDeleteChoice: r }) => /* @__PURE__ */ P(N.Fragment, { children: (n || []).map((n, i) => n && /* @__PURE__ */ P(uZ, {
41718
41805
  alternateResponseIndex: e,
41719
41806
  category: t,
41720
41807
  choice: n,
41721
41808
  choiceIndex: i,
41722
41809
  onDelete: (e) => r(e, i)
41723
41810
  }, i)) });
41724
- iZ.propTypes = {
41811
+ pZ.propTypes = {
41725
41812
  alternateResponseIndex: I.default.number,
41726
41813
  category: I.default.object,
41727
41814
  choices: I.default.array,
41728
41815
  onDeleteChoice: I.default.func
41729
41816
  };
41730
- var aZ = ({ alternateResponseIndex: e, category: t, choices: n, onDeleteChoice: r, categoryId: i, isAlternate: a }) => {
41817
+ var mZ = ({ alternateResponseIndex: e, category: t, choices: n, onDeleteChoice: r, categoryId: i, isAlternate: a }) => {
41731
41818
  let { setNodeRef: o, isOver: s } = Ne({
41732
41819
  id: `${i}-${a ? "alternate" : "standard"}`,
41733
41820
  data: {
@@ -41747,7 +41834,7 @@ var aZ = ({ alternateResponseIndex: e, category: t, choices: n, onDeleteChoice:
41747
41834
  minHeight: "100px",
41748
41835
  height: "auto"
41749
41836
  },
41750
- children: (n || []).length === 0 ? /* @__PURE__ */ P(rZ, {}) : /* @__PURE__ */ P(iZ, {
41837
+ children: (n || []).length === 0 ? /* @__PURE__ */ P(fZ, {}) : /* @__PURE__ */ P(pZ, {
41751
41838
  alternateResponseIndex: e,
41752
41839
  category: t,
41753
41840
  choices: n,
@@ -41756,7 +41843,7 @@ var aZ = ({ alternateResponseIndex: e, category: t, choices: n, onDeleteChoice:
41756
41843
  })
41757
41844
  });
41758
41845
  };
41759
- aZ.propTypes = {
41846
+ mZ.propTypes = {
41760
41847
  alternateResponseIndex: I.default.number,
41761
41848
  category: I.default.object,
41762
41849
  choices: I.default.array,
@@ -41764,19 +41851,19 @@ aZ.propTypes = {
41764
41851
  categoryId: I.default.string.isRequired,
41765
41852
  isAlternate: I.default.bool
41766
41853
  };
41767
- var oZ = je.withUid(aZ), sZ = j(We, { shouldForwardProp: (e) => e !== "isDuplicated" })(({ theme: e, isDuplicated: t }) => ({
41854
+ var hZ = je.withUid(mZ), gZ = j(We, { shouldForwardProp: (e) => e !== "isDuplicated" })(({ theme: e, isDuplicated: t }) => ({
41768
41855
  minWidth: "196px",
41769
41856
  padding: e.spacing(1),
41770
41857
  overflow: "visible",
41771
41858
  ...t && { border: "1px solid red" }
41772
- })), cZ = j(ta)(({ theme: e }) => ({ padding: `${e.spacing(1)} 0 0` })), lZ = j("div")(({ theme: e }) => ({
41859
+ })), _Z = j(ta)(({ theme: e }) => ({ padding: `${e.spacing(1)} 0 0` })), vZ = j("div")(({ theme: e }) => ({
41773
41860
  padding: e.spacing(2),
41774
41861
  "& p": { margin: 0 }
41775
- })), uZ = j("div")(({ theme: e }) => ({
41862
+ })), yZ = j("div")(({ theme: e }) => ({
41776
41863
  fontSize: e.typography.fontSize - 2,
41777
41864
  color: e.palette.error.main,
41778
41865
  paddingBottom: e.spacing(1)
41779
- })), dZ = class extends N.Component {
41866
+ })), bZ = class extends N.Component {
41780
41867
  static propTypes = {
41781
41868
  alternateResponseIndex: I.default.number,
41782
41869
  category: I.default.object.isRequired,
@@ -41812,10 +41899,10 @@ var oZ = je.withUid(aZ), sZ = j(We, { shouldForwardProp: (e) => e !== "isDuplica
41812
41899
  };
41813
41900
  render() {
41814
41901
  let { alternateResponseIndex: e, category: t, configuration: n, deleteFocusedEl: r, focusedEl: i, index: a, error: o, isDuplicated: s, onDelete: c, onDeleteChoice: l, imageSupport: u, spellCheck: d, toolbarOpts: f, maxImageWidth: p, maxImageHeight: m, uploadSoundSupport: h, mathMlOptions: g = {} } = this.props;
41815
- return /* @__PURE__ */ F(sZ, {
41902
+ return /* @__PURE__ */ F(gZ, {
41816
41903
  isDuplicated: s,
41817
41904
  children: [
41818
- /* @__PURE__ */ F("span", { children: [e || e === 0 ? /* @__PURE__ */ P(lZ, { dangerouslySetInnerHTML: { __html: t.label } }) : /* @__PURE__ */ P(VX, {
41905
+ /* @__PURE__ */ F("span", { children: [e || e === 0 ? /* @__PURE__ */ P(vZ, { dangerouslySetInnerHTML: { __html: t.label } }) : /* @__PURE__ */ P(XX, {
41819
41906
  label: t.label,
41820
41907
  focusedEl: i,
41821
41908
  deleteFocusedEl: r,
@@ -41832,8 +41919,8 @@ var oZ = je.withUid(aZ), sZ = j(We, { shouldForwardProp: (e) => e !== "isDuplica
41832
41919
  uploadSoundSupport: h,
41833
41920
  mathMlOptions: g,
41834
41921
  configuration: n
41835
- }), o && /* @__PURE__ */ P(uZ, { children: o })] }),
41836
- /* @__PURE__ */ P(oZ, {
41922
+ }), o && /* @__PURE__ */ P(yZ, { children: o })] }),
41923
+ /* @__PURE__ */ P(hZ, {
41837
41924
  alternateResponseIndex: e,
41838
41925
  category: t,
41839
41926
  choices: t.choices,
@@ -41842,25 +41929,25 @@ var oZ = je.withUid(aZ), sZ = j(We, { shouldForwardProp: (e) => e !== "isDuplica
41842
41929
  extraStyles: { minHeight: "100px" },
41843
41930
  isAlternate: this.props.isAlternate
41844
41931
  }),
41845
- c && /* @__PURE__ */ P(cZ, { children: /* @__PURE__ */ P(GX, {
41932
+ c && /* @__PURE__ */ P(_Z, { children: /* @__PURE__ */ P(eZ, {
41846
41933
  label: "delete",
41847
41934
  onClick: c
41848
41935
  }) })
41849
41936
  ]
41850
41937
  });
41851
41938
  }
41852
- }, fZ = j("div")(({ theme: e }) => ({
41939
+ }, xZ = j("div")(({ theme: e }) => ({
41853
41940
  display: "flex",
41854
41941
  justifyContent: "space-between",
41855
41942
  marginBottom: e.spacing(1)
41856
- })), pZ = j("div")({
41943
+ })), SZ = j("div")({
41857
41944
  display: "flex",
41858
41945
  alignItems: "center"
41859
- }), mZ = j(zs)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
41946
+ }), CZ = j(zs)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
41860
41947
  fontSize: e.typography.fontSize - 2,
41861
41948
  whiteSpace: "pre",
41862
41949
  maxWidth: "500px"
41863
- } })), hZ = class extends N.Component {
41950
+ } })), wZ = class extends N.Component {
41864
41951
  static propTypes = {
41865
41952
  buttonLabel: I.default.string,
41866
41953
  onAdd: I.default.func.isRequired,
@@ -41873,63 +41960,63 @@ var oZ = je.withUid(aZ), sZ = j(We, { shouldForwardProp: (e) => e !== "isDuplica
41873
41960
  static defaultProps = {};
41874
41961
  render() {
41875
41962
  let { onAdd: e, label: t, buttonLabel: n, info: r, buttonDisabled: i, variant: a, tooltip: o } = this.props;
41876
- return /* @__PURE__ */ F(fZ, { children: [/* @__PURE__ */ F(pZ, { children: [/* @__PURE__ */ P(me, {
41963
+ return /* @__PURE__ */ F(xZ, { children: [/* @__PURE__ */ F(SZ, { children: [/* @__PURE__ */ P(me, {
41877
41964
  variant: a || "title",
41878
41965
  children: t
41879
- }), r] }), /* @__PURE__ */ P(mZ, {
41966
+ }), r] }), /* @__PURE__ */ P(CZ, {
41880
41967
  title: o || "",
41881
41968
  enterTouchDelay: 50,
41882
41969
  leaveTouchDelay: 3e3,
41883
- children: /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(UX, {
41970
+ children: /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(QX, {
41884
41971
  onClick: e,
41885
41972
  label: n,
41886
41973
  disabled: i
41887
41974
  }) })
41888
41975
  })] });
41889
41976
  }
41890
- }, gZ = (e) => {
41977
+ }, TZ = (e) => {
41891
41978
  let { minChoices: t, maxChoices: n, maxCategories: r } = e || {};
41892
41979
  return t ||= 1, "Validation requirements:" + ("\nThe choices content should not be empty and should be unique.\nThere should be at least 1 " + (r ? `and at most ${r} ` : "") + "category" + (r ? "s" : "") + " defined." + (t ? `\nThere should be at least ${t} choices defined.` : "") + (n ? `\nNo more than ${n} choices should be defined.` : "") + "\nAt least one token should be assigned to at least one category.");
41893
- }, _Z = {
41980
+ }, EZ = {
41894
41981
  enabled: "Yes",
41895
41982
  disabled: "No",
41896
41983
  perChoice: "Set Per Choice"
41897
- }, vZ = (e) => (e || []).reduce((e, t) => Math.max(e, t.length), 0), yZ = (e) => {
41984
+ }, DZ = (e) => (e || []).reduce((e, t) => Math.max(e, t.length), 0), OZ = (e) => {
41898
41985
  let { correctResponse: t = [] } = e || {};
41899
41986
  return t.reduce((e, t) => {
41900
- let n = t?.choices?.length || 0, r = t?.alternateResponses || [], i = Math.max(n, vZ(r));
41987
+ let n = t?.choices?.length || 0, r = t?.alternateResponses || [], i = Math.max(n, DZ(r));
41901
41988
  return i > e ? i : e;
41902
41989
  }, 0);
41903
41990
  };
41904
41991
  //#endregion
41905
41992
  //#region src/author/design/categories/RowLabel.tsx
41906
- function bZ(e) {
41993
+ function kZ(e) {
41907
41994
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
41908
41995
  }
41909
- function xZ(e, t) {
41910
- return !e || bZ(e) ? e : bZ(e.default) ? e.default : t && bZ(e[t]) ? e[t] : t && bZ(e[t]?.default) ? e[t].default : e;
41996
+ function AZ(e, t) {
41997
+ return !e || kZ(e) ? e : kZ(e.default) ? e.default : t && kZ(e[t]) ? e[t] : t && kZ(e[t]?.default) ? e[t].default : e;
41911
41998
  }
41912
- var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ = Ce, wZ = CZ.default, TZ = wZ && typeof wZ == "object" ? wZ : CZ, EZ = j(SZ)(({ theme: e }) => ({
41999
+ var jZ = AZ(re, "InputContainer") || AZ(PZ.InputContainer, "InputContainer"), MZ = Ce, NZ = MZ.default, PZ = NZ && typeof NZ == "object" ? NZ : MZ, FZ = j(jZ)(({ theme: e }) => ({
41913
42000
  width: "100%",
41914
42001
  paddingTop: e.spacing(1),
41915
42002
  marginTop: e.spacing(1)
41916
- })), DZ = ({ categoriesPerRow: e, configuration: t, disabled: n, markup: r, imageSupport: i, onChange: a, toolbarOpts: o, spellCheck: s, maxImageWidth: c, maxImageHeight: l, uploadSoundSupport: u, mathMlOptions: d = {} }) => {
42003
+ })), IZ = ({ categoriesPerRow: e, configuration: t, disabled: n, markup: r, imageSupport: i, onChange: a, toolbarOpts: o, spellCheck: s, maxImageWidth: c, maxImageHeight: l, uploadSoundSupport: u, mathMlOptions: d = {} }) => {
41917
42004
  let { rowLabels: f, baseInputConfiguration: p } = t;
41918
42005
  return /* @__PURE__ */ P("div", {
41919
42006
  style: {
41920
42007
  gridColumn: `1/${e + 1}`,
41921
42008
  width: "100%"
41922
42009
  },
41923
- children: /* @__PURE__ */ P(EZ, {
42010
+ children: /* @__PURE__ */ P(FZ, {
41924
42011
  label: "Row Label",
41925
- children: /* @__PURE__ */ P(tJ, {
42012
+ children: /* @__PURE__ */ P(uJ, {
41926
42013
  disabled: n,
41927
42014
  markup: r,
41928
42015
  onChange: a,
41929
42016
  imageSupport: i,
41930
42017
  nonEmpty: !1,
41931
42018
  toolbarOpts: o,
41932
- pluginProps: LX(f?.inputConfiguration, p),
42019
+ pluginProps: KX(f?.inputConfiguration, p),
41933
42020
  spellCheck: s,
41934
42021
  maxImageWidth: c,
41935
42022
  maxImageHeight: l,
@@ -41939,19 +42026,19 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
41939
42026
  })
41940
42027
  })
41941
42028
  });
41942
- }, OZ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(3) })), kZ = j("div")(({ theme: e }) => ({
42029
+ }, LZ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(3) })), RZ = j("div")(({ theme: e }) => ({
41943
42030
  display: "grid",
41944
42031
  gridRowGap: e.spacing(1),
41945
42032
  gridColumnGap: e.spacing(1)
41946
- })), AZ = j(zs)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
42033
+ })), zZ = j(zs)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
41947
42034
  fontSize: e.typography.fontSize - 2,
41948
42035
  whiteSpace: "pre",
41949
42036
  maxWidth: "500px"
41950
- } })), jZ = j("div")(({ theme: e }) => ({
42037
+ } })), BZ = j("div")(({ theme: e }) => ({
41951
42038
  fontSize: e.typography.fontSize - 2,
41952
42039
  color: e.palette.error.main,
41953
42040
  paddingTop: e.spacing(.5)
41954
- })), MZ = class extends N.Component {
42041
+ })), VZ = class extends N.Component {
41955
42042
  static propTypes = {
41956
42043
  defaultImageMaxHeight: I.default.number,
41957
42044
  defaultImageMaxWidth: I.default.number,
@@ -41972,7 +42059,7 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
41972
42059
  };
41973
42060
  state = { focusedEl: null };
41974
42061
  add = () => {
41975
- let { model: e, categories: t } = this.props, { categoriesPerRow: n, correctResponse: r, allowAlternateEnabled: i } = e, a = zY.firstAvailableIndex(e.categories.map((e) => e.id), 1), o = {
42062
+ let { model: e, categories: t } = this.props, { categoriesPerRow: n, correctResponse: r, allowAlternateEnabled: i } = e, a = JY.firstAvailableIndex(e.categories.map((e) => e.id), 1), o = {
41976
42063
  id: a,
41977
42064
  label: "Category " + a
41978
42065
  }, s = e.categories.length % n === 0, c = [...e.rowLabels];
@@ -42008,18 +42095,18 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
42008
42095
  i.length < t ? i.push(e) : i[t] = e, this.props.onModelChanged({ rowLabels: i });
42009
42096
  };
42010
42097
  render() {
42011
- let { model: e, categories: t, imageSupport: n, uploadSoundSupport: r, toolbarOpts: i, spellCheck: a, configuration: o, defaultImageMaxHeight: s, defaultImageMaxWidth: c, mathMlOptions: l = {} } = this.props, { categoriesPerRow: u, rowLabels: d, errors: f } = e, { associationError: p, categoriesError: m, categoriesErrors: h } = f || {}, { maxCategories: g, maxImageWidth: _ = {}, maxImageHeight: v = {} } = o || {}, y = { gridTemplateColumns: `repeat(${u}, 1fr)` }, b = gZ(o);
42012
- return /* @__PURE__ */ F(OZ, { children: [
42013
- /* @__PURE__ */ P(hZ, {
42098
+ let { model: e, categories: t, imageSupport: n, uploadSoundSupport: r, toolbarOpts: i, spellCheck: a, configuration: o, defaultImageMaxHeight: s, defaultImageMaxWidth: c, mathMlOptions: l = {} } = this.props, { categoriesPerRow: u, rowLabels: d, errors: f } = e, { associationError: p, categoriesError: m, categoriesErrors: h } = f || {}, { maxCategories: g, maxImageWidth: _ = {}, maxImageHeight: v = {} } = o || {}, y = { gridTemplateColumns: `repeat(${u}, 1fr)` }, b = TZ(o);
42099
+ return /* @__PURE__ */ F(LZ, { children: [
42100
+ /* @__PURE__ */ P(wZ, {
42014
42101
  label: "Categories",
42015
42102
  buttonLabel: "ADD A CATEGORY",
42016
42103
  onAdd: this.add,
42017
- info: /* @__PURE__ */ P(AZ, {
42104
+ info: /* @__PURE__ */ P(zZ, {
42018
42105
  disableFocusListener: !0,
42019
42106
  disableTouchListener: !0,
42020
42107
  placement: "right",
42021
42108
  title: b,
42022
- children: /* @__PURE__ */ P(RX, {
42109
+ children: /* @__PURE__ */ P(qX, {
42023
42110
  fontSize: "small",
42024
42111
  color: "primary",
42025
42112
  style: { marginLeft: "5px" }
@@ -42027,11 +42114,11 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
42027
42114
  }),
42028
42115
  buttonDisabled: g && t && g === t.length
42029
42116
  }),
42030
- /* @__PURE__ */ P(kZ, {
42117
+ /* @__PURE__ */ P(RZ, {
42031
42118
  style: y,
42032
42119
  children: t.map((e, t) => {
42033
42120
  let f = t % u === 0, p = t / u;
42034
- return /* @__PURE__ */ F(N.Fragment, { children: [f && /* @__PURE__ */ P(DZ, {
42121
+ return /* @__PURE__ */ F(N.Fragment, { children: [f && /* @__PURE__ */ P(IZ, {
42035
42122
  categoriesPerRow: u,
42036
42123
  disabled: !1,
42037
42124
  rowIndex: p,
@@ -42045,7 +42132,7 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
42045
42132
  uploadSoundSupport: r,
42046
42133
  mathMlOptions: l,
42047
42134
  configuration: o
42048
- }), /* @__PURE__ */ P(dZ, {
42135
+ }), /* @__PURE__ */ P(bZ, {
42049
42136
  imageSupport: n,
42050
42137
  focusedEl: this.state.focusedEl,
42051
42138
  deleteFocusedEl: this.deleteFocusedEl,
@@ -42065,15 +42152,15 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
42065
42152
  })] }, t);
42066
42153
  })
42067
42154
  }),
42068
- p && /* @__PURE__ */ P(jZ, { children: p }),
42069
- m && /* @__PURE__ */ P(jZ, { children: m })
42155
+ p && /* @__PURE__ */ P(BZ, { children: p }),
42156
+ m && /* @__PURE__ */ P(BZ, { children: m })
42070
42157
  ] });
42071
42158
  }
42072
- }, NZ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), PZ = j("div")(({ theme: e }) => ({
42159
+ }, HZ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), UZ = j("div")(({ theme: e }) => ({
42073
42160
  display: "grid",
42074
42161
  gridRowGap: e.spacing(1),
42075
42162
  gridColumnGap: e.spacing(1)
42076
- })), FZ = j("div")({ gridColumn: "1 / 3" }), IZ = class extends N.Component {
42163
+ })), WZ = j("div")({ gridColumn: "1 / 3" }), GZ = class extends N.Component {
42077
42164
  static propTypes = {
42078
42165
  altIndex: I.default.number.isRequired,
42079
42166
  configuration: I.default.object,
@@ -42096,17 +42183,17 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
42096
42183
  };
42097
42184
  render() {
42098
42185
  let { altIndex: e, model: t, configuration: n, categories: r, imageSupport: i, spellCheck: a, uploadSoundSupport: o, mathMlOptions: s = {} } = this.props, { categoriesPerRow: c, errors: l, rowLabels: u } = t, { duplicateAlternate: d } = l || {}, f = { gridTemplateColumns: `repeat(${c}, 1fr)` }, p = d ? d.index === e : !1;
42099
- return /* @__PURE__ */ P(NZ, { children: /* @__PURE__ */ P(PZ, {
42186
+ return /* @__PURE__ */ P(HZ, { children: /* @__PURE__ */ P(UZ, {
42100
42187
  style: f,
42101
42188
  children: r.map((t, r) => {
42102
42189
  let l = r % c === 0, f = r / c;
42103
- return /* @__PURE__ */ F(N.Fragment, { children: [l && /* @__PURE__ */ P(FZ, {
42190
+ return /* @__PURE__ */ F(N.Fragment, { children: [l && /* @__PURE__ */ P(WZ, {
42104
42191
  style: {
42105
42192
  gridColumn: `1/${c + 1}`,
42106
42193
  width: "100%"
42107
42194
  },
42108
42195
  dangerouslySetInnerHTML: { __html: u[f] || "" }
42109
- }), /* @__PURE__ */ P(dZ, {
42196
+ }), /* @__PURE__ */ P(bZ, {
42110
42197
  alternateResponseIndex: e,
42111
42198
  imageSupport: i,
42112
42199
  isDuplicated: p && d.category === t.id,
@@ -42121,30 +42208,30 @@ var SZ = xZ(re, "InputContainer") || xZ(TZ.InputContainer, "InputContainer"), CZ
42121
42208
  })
42122
42209
  }) });
42123
42210
  }
42124
- }, LZ = Ve(/*#__PURE__*/ P("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle");
42211
+ }, KZ = Ve(/*#__PURE__*/ P("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle");
42125
42212
  //#endregion
42126
42213
  //#region src/author/design/choices/choice.tsx
42127
42214
  (0, Fc.default)("@pie-element:categorize:configure:choice");
42128
- var RZ = (e) => {
42215
+ var qZ = (e) => {
42129
42216
  if (e.lockChoiceOrder) return !0;
42130
42217
  let t = e.choice.categoryCount || 0;
42131
42218
  return t === 0 || e.correctResponseCount < t;
42132
- }, zZ = j(We)(({ theme: e }) => ({
42219
+ }, JZ = j(We)(({ theme: e }) => ({
42133
42220
  minWidth: "196px",
42134
42221
  padding: e.spacing(1),
42135
42222
  overflow: "visible"
42136
- })), BZ = j(ta)({
42223
+ })), YZ = j(ta)({
42137
42224
  padding: 0,
42138
42225
  justifyContent: "space-between"
42139
- }), VZ = j("span", { shouldForwardProp: (e) => e !== "draggable" })(({ draggable: e }) => ({
42226
+ }), XZ = j("span", { shouldForwardProp: (e) => e !== "draggable" })(({ draggable: e }) => ({
42140
42227
  cursor: e ? "move" : "inherit",
42141
42228
  touchAction: "none"
42142
- })), HZ = j("div")(({ theme: e }) => ({
42229
+ })), ZZ = j("div")(({ theme: e }) => ({
42143
42230
  fontSize: e.typography.fontSize - 2,
42144
42231
  color: e.palette.error.main,
42145
42232
  paddingBottom: e.spacing(1)
42146
- })), UZ = ({ allowMultiplePlacements: e, configuration: t, choice: n, deleteFocusedEl: r, focusedEl: i, index: a, onDelete: o, onChange: s, correctResponseCount: c, lockChoiceOrder: l, imageSupport: u, spellCheck: d, toolbarOpts: f, error: p, maxImageWidth: m, maxImageHeight: h, uploadSoundSupport: g }) => {
42147
- let _ = RZ({
42233
+ })), QZ = ({ allowMultiplePlacements: e, configuration: t, choice: n, deleteFocusedEl: r, focusedEl: i, index: a, onDelete: o, onChange: s, correctResponseCount: c, lockChoiceOrder: l, imageSupport: u, spellCheck: d, toolbarOpts: f, error: p, maxImageWidth: m, maxImageHeight: h, uploadSoundSupport: g }) => {
42234
+ let _ = qZ({
42148
42235
  choice: n,
42149
42236
  correctResponseCount: c,
42150
42237
  lockChoiceOrder: l
@@ -42167,20 +42254,20 @@ var RZ = (e) => {
42167
42254
  n.content = e, s(n);
42168
42255
  }, w = () => {
42169
42256
  n.categoryCount === 1 ? n.categoryCount = 0 : n.categoryCount = 1, s(n);
42170
- }, ee = ((e) => e === _Z.perChoice)(e);
42171
- return /* @__PURE__ */ F(zZ, {
42257
+ }, ee = ((e) => e === EZ.perChoice)(e);
42258
+ return /* @__PURE__ */ F(JZ, {
42172
42259
  ref: (e) => {
42173
42260
  b(e), S(e);
42174
42261
  },
42175
42262
  style: { opacity: x ? .5 : 1 },
42176
42263
  children: [
42177
- /* @__PURE__ */ P(BZ, { children: /* @__PURE__ */ P(VZ, {
42264
+ /* @__PURE__ */ P(YZ, { children: /* @__PURE__ */ P(XZ, {
42178
42265
  draggable: _,
42179
42266
  ...v,
42180
42267
  ...y,
42181
- children: /* @__PURE__ */ P(LZ, { color: _ ? "primary" : "disabled" })
42268
+ children: /* @__PURE__ */ P(KZ, { color: _ ? "primary" : "disabled" })
42182
42269
  }) }),
42183
- /* @__PURE__ */ P(VX, {
42270
+ /* @__PURE__ */ P(XX, {
42184
42271
  imageSupport: u,
42185
42272
  focusedEl: i,
42186
42273
  deleteFocusedEl: r,
@@ -42196,11 +42283,11 @@ var RZ = (e) => {
42196
42283
  uploadSoundSupport: g,
42197
42284
  configuration: t
42198
42285
  }),
42199
- p && /* @__PURE__ */ P(HZ, { children: p }),
42200
- /* @__PURE__ */ F(BZ, { children: [/* @__PURE__ */ P(GX, {
42286
+ p && /* @__PURE__ */ P(ZZ, { children: p }),
42287
+ /* @__PURE__ */ F(YZ, { children: [/* @__PURE__ */ P(eZ, {
42201
42288
  label: "delete",
42202
42289
  onClick: o
42203
- }), ee && /* @__PURE__ */ P(EJ, {
42290
+ }), ee && /* @__PURE__ */ P(FJ, {
42204
42291
  mini: !0,
42205
42292
  label: "Remove after placing",
42206
42293
  checked: n.categoryCount === 1,
@@ -42209,7 +42296,7 @@ var RZ = (e) => {
42209
42296
  ]
42210
42297
  });
42211
42298
  };
42212
- UZ.propTypes = {
42299
+ QZ.propTypes = {
42213
42300
  allowMultiplePlacements: I.default.string,
42214
42301
  configuration: I.default.object.isRequired,
42215
42302
  choice: I.default.object.isRequired,
@@ -42235,10 +42322,10 @@ UZ.propTypes = {
42235
42322
  spellCheck: I.default.bool,
42236
42323
  rearrangeChoices: I.default.func
42237
42324
  };
42238
- var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42325
+ var $Z = je.withUid(QZ), eQ = j("div")(({ theme: e }) => ({
42239
42326
  paddingTop: e.spacing(1),
42240
42327
  marginBottom: e.spacing(1)
42241
- })), KZ = j(Dc)({ width: "100%" }), qZ = class extends N.Component {
42328
+ })), tQ = j(Dc)({ width: "100%" }), nQ = class extends N.Component {
42242
42329
  static propTypes = {
42243
42330
  config: I.default.object,
42244
42331
  onModelChanged: I.default.func,
@@ -42250,7 +42337,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42250
42337
  };
42251
42338
  render() {
42252
42339
  let { config: e, spellCheck: t } = this.props;
42253
- return /* @__PURE__ */ P(GZ, { children: /* @__PURE__ */ P(KZ, {
42340
+ return /* @__PURE__ */ P(eQ, { children: /* @__PURE__ */ P(tQ, {
42254
42341
  InputLabelProps: { shrink: !0 },
42255
42342
  variant: "outlined",
42256
42343
  label: "Label",
@@ -42259,17 +42346,17 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42259
42346
  spellCheck: t
42260
42347
  }) });
42261
42348
  }
42262
- }, JZ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), YZ = j("div")(({ theme: e }) => ({
42349
+ }, rQ = j("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), iQ = j("div")(({ theme: e }) => ({
42263
42350
  paddingTop: e.spacing(1),
42264
42351
  paddingBottom: e.spacing(1),
42265
42352
  display: "grid",
42266
42353
  gridRowGap: e.spacing(1),
42267
42354
  gridColumnGap: e.spacing(1)
42268
- })), XZ = j("div")(({ theme: e }) => ({
42355
+ })), aQ = j("div")(({ theme: e }) => ({
42269
42356
  fontSize: e.typography.fontSize - 2,
42270
42357
  color: e.palette.error.main,
42271
42358
  paddingTop: e.spacing(.5)
42272
- })), ZZ = class extends N.Component {
42359
+ })), oQ = class extends N.Component {
42273
42360
  static propTypes = {
42274
42361
  model: I.default.object.isRequired,
42275
42362
  configuration: I.default.object.isRequired,
@@ -42301,7 +42388,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42301
42388
  addChoice = () => {
42302
42389
  let { onModelChanged: e, model: t, choices: n } = this.props, { maxAnswerChoices: r } = t || {};
42303
42390
  if (r && t.choices?.length >= r) return;
42304
- let i = zY.firstAvailableIndex(t.choices.map((e) => e.id), 1), a = {
42391
+ let i = JY.firstAvailableIndex(t.choices.map((e) => e.id), 1), a = {
42305
42392
  id: i,
42306
42393
  content: "Choice " + i
42307
42394
  };
@@ -42318,22 +42405,22 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42318
42405
  };
42319
42406
  render() {
42320
42407
  let { focusedEl: e } = this.state, { choices: t, model: n, imageSupport: r, uploadSoundSupport: i, onModelChanged: a, spellCheck: o, toolbarOpts: s, configuration: c, defaultImageMaxWidth: l, defaultImageMaxHeight: u } = this.props, { errors: d, allowMultiplePlacementsEnabled: f, lockChoiceOrder: p, maxAnswerChoices: m } = n, { choicesError: h, choicesErrors: g } = d || {}, { maxImageWidth: _ = {}, maxImageHeight: v = {} } = c || {}, y = { gridTemplateColumns: `repeat(${n.categoriesPerRow}, 1fr)` }, b = m && t?.length >= m ? `Only ${m} allowed maximum` : "";
42321
- return /* @__PURE__ */ F(JZ, { children: [
42322
- /* @__PURE__ */ P(hZ, {
42408
+ return /* @__PURE__ */ F(rQ, { children: [
42409
+ /* @__PURE__ */ P(wZ, {
42323
42410
  label: "Choices",
42324
42411
  buttonLabel: "ADD A CHOICE",
42325
42412
  onAdd: this.addChoice,
42326
42413
  buttonDisabled: m && t && t?.length >= m,
42327
42414
  tooltip: b
42328
42415
  }),
42329
- /* @__PURE__ */ P(qZ, {
42416
+ /* @__PURE__ */ P(nQ, {
42330
42417
  config: n,
42331
42418
  onModelChanged: a,
42332
42419
  spellCheck: o
42333
42420
  }),
42334
- /* @__PURE__ */ P(YZ, {
42421
+ /* @__PURE__ */ P(iQ, {
42335
42422
  style: y,
42336
- children: t.map((t, n) => /* @__PURE__ */ P(WZ, {
42423
+ children: t.map((t, n) => /* @__PURE__ */ P($Z, {
42337
42424
  choice: t,
42338
42425
  focusedEl: e,
42339
42426
  deleteFocusedEl: this.deleteFocusedEl,
@@ -42353,10 +42440,10 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42353
42440
  configuration: c
42354
42441
  }, t.id))
42355
42442
  }),
42356
- h && /* @__PURE__ */ P(XZ, { children: h })
42443
+ h && /* @__PURE__ */ P(aQ, { children: h })
42357
42444
  ] });
42358
42445
  }
42359
- }, QZ = (e, t, n) => ut(e).map((e) => {
42446
+ }, sQ = (e, t, n) => ut(e).map((e) => {
42360
42447
  let r = n.find((t) => t.category === e.id);
42361
42448
  return r && (e.choices = (r.choices || []).map((e) => {
42362
42449
  let n = t.find((t) => t.id === e);
@@ -42365,17 +42452,17 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42365
42452
  content: n.content
42366
42453
  });
42367
42454
  })), e;
42368
- }), $Z = (e, t, n) => !e.alternateResponses || e.alternateResponses.length === 0 ? [] : (e.alternateResponses[n] || []).map((e) => t.find((t) => t.id === e)), eQ = (e, t, n) => {
42455
+ }), cQ = (e, t, n) => !e.alternateResponses || e.alternateResponses.length === 0 ? [] : (e.alternateResponses[n] || []).map((e) => t.find((t) => t.id === e)), lQ = (e, t, n) => {
42369
42456
  let r = n.reduce((e, t) => t.alternateResponses && t.alternateResponses.length >= e ? t.alternateResponses.length : e, 0);
42370
42457
  return Array(r).fill(0).map((r, i) => n.map((n, r) => {
42371
42458
  let a = e[r];
42372
42459
  return {
42373
42460
  id: a.id,
42374
42461
  label: a.label,
42375
- choices: $Z(n, t, i)
42462
+ choices: cQ(n, t, i)
42376
42463
  };
42377
42464
  }));
42378
- }, { translator: tQ } = at, { dropdown: nQ, Panel: rQ, toggle: iQ, radio: aQ, numberField: oQ } = gX, { Provider: sQ } = je, cQ = class extends N.Component {
42465
+ }, { translator: uQ } = at, { dropdown: dQ, Panel: fQ, toggle: pQ, radio: mQ, numberField: hQ } = TX, { Provider: gQ } = je, _Q = class extends N.Component {
42379
42466
  containerRef = N.createRef();
42380
42467
  componentDidMount() {
42381
42468
  this.containerRef.current && setTimeout(() => o(this.containerRef.current), 0);
@@ -42386,16 +42473,16 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42386
42473
  children: this.props.children
42387
42474
  });
42388
42475
  }
42389
- }, lQ = j(hZ)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), uQ = j(OX)(({ theme: e }) => ({
42476
+ }, vQ = j(wZ)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), yQ = j(LX)(({ theme: e }) => ({
42390
42477
  width: "100%",
42391
42478
  paddingTop: e.spacing(1),
42392
42479
  marginTop: e.spacing(1),
42393
42480
  marginBottom: e.spacing(2)
42394
- })), dQ = j("div")(({ theme: e }) => ({
42481
+ })), bQ = j("div")(({ theme: e }) => ({
42395
42482
  fontSize: e.typography.fontSize - 2,
42396
42483
  color: e.palette.error.main,
42397
42484
  paddingTop: e.spacing(1)
42398
- })), fQ = class extends N.Component {
42485
+ })), xQ = class extends N.Component {
42399
42486
  static propTypes = {
42400
42487
  configuration: I.default.object,
42401
42488
  className: I.default.string,
@@ -42468,13 +42555,13 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42468
42555
  let { model: t } = this.props;
42469
42556
  return gt(e.id, t.correctResponse);
42470
42557
  };
42471
- checkAllowMultiplePlacements = (e, t) => e === _Z.enabled ? 0 : e === _Z.disabled ? 1 : t.categoryCount || 0;
42558
+ checkAllowMultiplePlacements = (e, t) => e === EZ.enabled ? 0 : e === EZ.disabled ? 1 : t.categoryCount || 0;
42472
42559
  isAlertModalOpened = () => {
42473
- let { model: e } = this.props, { maxChoicesPerCategory: t = 0 } = e || {}, n = yZ(e);
42560
+ let { model: e } = this.props, { maxChoicesPerCategory: t = 0 } = e || {}, n = OZ(e);
42474
42561
  return t !== 0 && n > t;
42475
42562
  };
42476
42563
  onAlertModalCancel = () => {
42477
- let { model: e } = this.props, t = yZ(e);
42564
+ let { model: e } = this.props, t = OZ(e);
42478
42565
  this.updateModel({ maxChoicesPerCategory: t });
42479
42566
  };
42480
42567
  onDragStart = (e) => {
@@ -42517,7 +42604,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42517
42604
  addChoiceToCategory = (e, t) => {
42518
42605
  let { model: n } = this.props, { choices: r = [], correctResponse: i = [], maxChoicesPerCategory: a = 0 } = n || {}, o = (r || []).find((t) => t.id === e.id), s = St(e.id, void 0, t, 0, i);
42519
42606
  o.categoryCount !== 0 && (s = yt(e, t, s));
42520
- let c = yZ(n);
42607
+ let c = OZ(n);
42521
42608
  this.updateModel({
42522
42609
  correctResponse: s,
42523
42610
  maxChoicesPerCategory: a !== 0 && a < c ? a + 1 : a
@@ -42531,7 +42618,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42531
42618
  let { model: i } = this.props, { choices: a, correctResponse: o = [], maxChoicesPerCategory: s = 0 } = i || {}, c = (a || []).find((t) => t.id === e);
42532
42619
  if (n === t || !c) return;
42533
42620
  c.categoryCount === 0 ? c.categoryCount === 0 && (o = St(c.id, void 0, n, 0, o)) : (o = St(c.id, t, n, r, o), o = yt(c, n, o));
42534
- let l = yZ(i);
42621
+ let l = OZ(i);
42535
42622
  this.updateModel({
42536
42623
  correctResponse: o,
42537
42624
  maxChoicesPerCategory: s !== 0 && s < l ? s + 1 : s
@@ -42540,7 +42627,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42540
42627
  addChoiceToAlternateCategory = (e, t, n) => {
42541
42628
  let { model: r } = this.props, { correctResponse: i, choices: a, maxChoicesPerCategory: o = 0 } = r, s = a.find((t) => t.id === e.id);
42542
42629
  i.forEach((r) => r.category === t ? (r.alternateResponses = r.alternateResponses || [], r.alternateResponses[n] === void 0 && (r.alternateResponses[n] = []), r.alternateResponses[n].push(e.id), s.categoryCount && s.categoryCount !== 0 && (r.alternateResponses[n] = r.alternateResponses[n].reduce((e, t) => (t === s.id ? e.findIndex((e) => e === s.id) === -1 && e.push(t) : e.push(t), e), [])), r) : (r.alternateResponses[n] && s.categoryCount !== 0 && (r.alternateResponses[n] = r.alternateResponses[n].filter((t) => t !== e.id)), r));
42543
- let c = yZ(r);
42630
+ let c = OZ(r);
42544
42631
  this.updateModel({
42545
42632
  correctResponse: i,
42546
42633
  maxChoicesPerCategory: o !== 0 && o < c ? o + 1 : o
@@ -42549,7 +42636,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42549
42636
  moveChoiceInAlternate = (e, t, n, r, i) => {
42550
42637
  let { model: a } = this.props, { choices: o, correctResponse: s = [], maxChoicesPerCategory: c = 0 } = a || {}, l = (o || []).find((t) => t.id === e);
42551
42638
  s = wt(e, t, n, r, s, i, l?.categoryCount);
42552
- let u = yZ(a);
42639
+ let u = OZ(a);
42553
42640
  this.updateModel({
42554
42641
  correctResponse: s,
42555
42642
  maxChoicesPerCategory: c !== 0 && c < u ? c + 1 : c
@@ -42564,16 +42651,16 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42564
42651
  if (!e) return null;
42565
42652
  if (e.type === "choice") {
42566
42653
  let r = t.choices?.find((t) => t.id === e.id);
42567
- return r ? /* @__PURE__ */ P(WZ, {
42654
+ return r ? /* @__PURE__ */ P($Z, {
42568
42655
  choice: r,
42569
42656
  configuration: n
42570
42657
  }) : null;
42571
42658
  } else if (e.type === "choice-preview" && e.alternateResponseIndex === void 0) {
42572
42659
  let n = t.choices?.find((t) => t.id === e.id);
42573
- return n ? /* @__PURE__ */ P(tZ, { choice: n }) : null;
42660
+ return n ? /* @__PURE__ */ P(uZ, { choice: n }) : null;
42574
42661
  } else if (e.type === "choice-preview" && e.alternateResponseIndex !== void 0) {
42575
42662
  let n = t.choices?.find((t) => t.id === e.id);
42576
- return n ? /* @__PURE__ */ P(tZ, {
42663
+ return n ? /* @__PURE__ */ P(uZ, {
42577
42664
  choice: n,
42578
42665
  alternateResponseIndex: e.alternateResponseIndex
42579
42666
  }) : null;
@@ -42586,66 +42673,66 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42586
42673
  label: "",
42587
42674
  columns: 2
42588
42675
  };
42589
- let me = QZ(n.categories || [], n.choices || [], n.correctResponse || []), he = eQ(n.categories || [], n.choices || [], n.correctResponse || []), ge = (() => {
42676
+ let me = sQ(n.categories || [], n.choices || [], n.correctResponse || []), he = lQ(n.categories || [], n.choices || [], n.correctResponse || []), ge = (() => {
42590
42677
  if (n.allowMultiplePlacementsEnabled != null) return n.allowMultiplePlacementsEnabled;
42591
42678
  let e = (n.correctResponse || []).flatMap((e) => e.choices || []);
42592
- return e.length === new Set(e).size ? _Z.disabled : _Z.enabled;
42679
+ return e.length === new Set(e).size ? EZ.disabled : EZ.enabled;
42593
42680
  })(), _e = n.choices.map((e) => (e.correctResponseCount = this.countChoiceInCorrectResponse(e), e.categoryCount = this.checkAllowMultiplePlacements(ge, e), e)), ve = m && m.prompt, be = p && p.prompt, xe = {
42594
- partialScoring: _.settings && iQ(_.label),
42595
- lockChoiceOrder: f.settings && iQ(f.label),
42596
- categoriesPerRow: c.settings && oQ(c.label, {
42681
+ partialScoring: _.settings && pQ(_.label),
42682
+ lockChoiceOrder: f.settings && pQ(f.label),
42683
+ categoriesPerRow: c.settings && hQ(c.label, {
42597
42684
  label: c.label,
42598
42685
  min: g,
42599
42686
  max: 6
42600
42687
  }),
42601
- choicesPosition: l.settings && aQ(l.label, [
42688
+ choicesPosition: l.settings && mQ(l.label, [
42602
42689
  "below",
42603
42690
  "above",
42604
42691
  "left",
42605
42692
  "right"
42606
42693
  ]),
42607
- allowMultiplePlacementsEnabled: o.settings && nQ(o.label, [
42608
- _Z.enabled,
42609
- _Z.disabled,
42610
- _Z.perChoice
42694
+ allowMultiplePlacementsEnabled: o.settings && dQ(o.label, [
42695
+ EZ.enabled,
42696
+ EZ.disabled,
42697
+ EZ.perChoice
42611
42698
  ]),
42612
- maxAnswerChoices: O.settings && oQ(O.label, {
42699
+ maxAnswerChoices: O.settings && hQ(O.label, {
42613
42700
  label: "",
42614
42701
  min: _e?.length || 0,
42615
42702
  max: 30
42616
42703
  }),
42617
- allowMaxChoicesPerCategory: h.settings && iQ(h.label),
42618
- maxChoicesPerCategory: k === !0 && oQ(h.label, {
42704
+ allowMaxChoicesPerCategory: h.settings && pQ(h.label),
42705
+ maxChoicesPerCategory: k === !0 && hQ(h.label, {
42619
42706
  label: "",
42620
42707
  min: 0,
42621
42708
  max: 30
42622
42709
  }),
42623
- promptEnabled: v.settings && iQ(v.label),
42624
- feedbackEnabled: d.settings && iQ(d.label),
42625
- allowAlternateEnabled: a.settings && iQ(a.label),
42626
- "language.enabled": E.settings && iQ(E.label, !0),
42627
- language: E.settings && E.enabled && nQ(D.label, D.options)
42710
+ promptEnabled: v.settings && pQ(v.label),
42711
+ feedbackEnabled: d.settings && pQ(d.label),
42712
+ allowAlternateEnabled: a.settings && pQ(a.label),
42713
+ "language.enabled": E.settings && pQ(E.label, !0),
42714
+ language: E.settings && E.enabled && dQ(D.label, D.options)
42628
42715
  }, Se = {
42629
- teacherInstructionsEnabled: w.settings && iQ(w.label),
42630
- studentInstructionsEnabled: C.settings && iQ(C.label),
42631
- rationaleEnabled: y.settings && iQ(y.label),
42632
- spellCheckEnabled: S.settings && iQ(S.label),
42633
- scoringType: b.settings && aQ(b.label, ["auto", "rubric"]),
42634
- rubricEnabled: ee?.settings && iQ(ee?.label)
42635
- }, Ce = this.isAlertModalOpened(), we = tQ.t("translation:categorize:maxChoicesPerCategoryRestriction", {
42716
+ teacherInstructionsEnabled: w.settings && pQ(w.label),
42717
+ studentInstructionsEnabled: C.settings && pQ(C.label),
42718
+ rationaleEnabled: y.settings && pQ(y.label),
42719
+ spellCheckEnabled: S.settings && pQ(S.label),
42720
+ scoringType: b.settings && mQ(b.label, ["auto", "rubric"]),
42721
+ rubricEnabled: ee?.settings && pQ(ee?.label)
42722
+ }, Ce = this.isAlertModalOpened(), we = uQ.t("translation:categorize:maxChoicesPerCategoryRestriction", {
42636
42723
  lng: n.language,
42637
42724
  maxChoicesPerCategory: A
42638
42725
  });
42639
42726
  return /* @__PURE__ */ P(Je, {
42640
42727
  onDragStart: this.onDragStart,
42641
42728
  onDragEnd: this.onDragEnd,
42642
- children: /* @__PURE__ */ F(sQ, {
42729
+ children: /* @__PURE__ */ F(gQ, {
42643
42730
  value: this.uid,
42644
- children: [/* @__PURE__ */ F(RY.ConfigLayout, {
42731
+ children: [/* @__PURE__ */ F(qY.ConfigLayout, {
42645
42732
  extraCSSRules: le,
42646
42733
  dimensions: u,
42647
42734
  hideSettings: x,
42648
- settings: /* @__PURE__ */ P(rQ, {
42735
+ settings: /* @__PURE__ */ P(fQ, {
42649
42736
  model: {
42650
42737
  ...n,
42651
42738
  allowMultiplePlacementsEnabled: ge
@@ -42665,27 +42752,27 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42665
42752
  })
42666
42753
  }),
42667
42754
  children: [
42668
- se && /* @__PURE__ */ F(uQ, {
42755
+ se && /* @__PURE__ */ F(yQ, {
42669
42756
  label: w.label,
42670
- children: [/* @__PURE__ */ P(tJ, {
42757
+ children: [/* @__PURE__ */ P(uJ, {
42671
42758
  markup: n.teacherInstructions || "",
42672
42759
  onChange: this.changeTeacherInstructions,
42673
42760
  imageSupport: t,
42674
42761
  error: fe,
42675
42762
  nonEmpty: !1,
42676
42763
  toolbarOpts: pe,
42677
- pluginProps: LX(w?.inputConfiguration, s),
42764
+ pluginProps: KX(w?.inputConfiguration, s),
42678
42765
  spellCheck: oe,
42679
42766
  maxImageWidth: m && m.teacherInstructions || ve,
42680
42767
  maxImageHeight: p && p.teacherInstructions || be,
42681
42768
  uploadSoundSupport: r,
42682
42769
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
42683
42770
  mathMlOptions: T
42684
- }), fe && /* @__PURE__ */ P(dQ, { children: fe })]
42771
+ }), fe && /* @__PURE__ */ P(bQ, { children: fe })]
42685
42772
  }),
42686
- ie && /* @__PURE__ */ F(uQ, {
42773
+ ie && /* @__PURE__ */ F(yQ, {
42687
42774
  label: v.label,
42688
- children: [/* @__PURE__ */ P(tJ, {
42775
+ children: [/* @__PURE__ */ P(uJ, {
42689
42776
  markup: n.prompt || "",
42690
42777
  onChange: this.onPromptChanged,
42691
42778
  imageSupport: t,
@@ -42693,16 +42780,16 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42693
42780
  nonEmpty: !1,
42694
42781
  disableUnderline: !0,
42695
42782
  toolbarOpts: pe,
42696
- pluginProps: LX(v?.inputConfiguration, s),
42783
+ pluginProps: KX(v?.inputConfiguration, s),
42697
42784
  spellCheck: oe,
42698
42785
  maxImageWidth: m && m.prompt,
42699
42786
  maxImageHeight: p && p.prompt,
42700
42787
  uploadSoundSupport: r,
42701
42788
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
42702
42789
  mathMlOptions: T
42703
- }), ue && /* @__PURE__ */ P(dQ, { children: ue })]
42790
+ }), ue && /* @__PURE__ */ P(bQ, { children: ue })]
42704
42791
  }),
42705
- /* @__PURE__ */ P(MZ, {
42792
+ /* @__PURE__ */ P(VZ, {
42706
42793
  imageSupport: t,
42707
42794
  uploadSoundSupport: r,
42708
42795
  model: n,
@@ -42715,7 +42802,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42715
42802
  defaultImageMaxHeight: be,
42716
42803
  mathMlOptions: T
42717
42804
  }),
42718
- /* @__PURE__ */ P(ZZ, {
42805
+ /* @__PURE__ */ P(oQ, {
42719
42806
  imageSupport: t,
42720
42807
  uploadSoundSupport: r,
42721
42808
  choices: _e,
@@ -42730,17 +42817,17 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42730
42817
  defaultImageMaxWidth: ve,
42731
42818
  defaultImageMaxHeight: be
42732
42819
  }),
42733
- te && /* @__PURE__ */ P(lQ, {
42820
+ te && /* @__PURE__ */ P(vQ, {
42734
42821
  label: "Alternate Responses",
42735
42822
  buttonLabel: "ADD AN ALTERNATE RESPONSE",
42736
42823
  onAdd: this.onAddAlternateResponse
42737
42824
  }),
42738
- te && he.map((i, a) => /* @__PURE__ */ F(N.Fragment, { children: [/* @__PURE__ */ P(lQ, {
42825
+ te && he.map((i, a) => /* @__PURE__ */ F(N.Fragment, { children: [/* @__PURE__ */ P(vQ, {
42739
42826
  variant: "subtitle1",
42740
42827
  label: "Alternate Response",
42741
42828
  buttonLabel: "REMOVE ALTERNATE RESPONSE",
42742
42829
  onAdd: () => this.onRemoveAlternateResponse(a)
42743
- }), /* @__PURE__ */ P(IZ, {
42830
+ }), /* @__PURE__ */ P(GZ, {
42744
42831
  altIndex: a,
42745
42832
  imageSupport: t,
42746
42833
  model: n,
@@ -42750,35 +42837,35 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42750
42837
  uploadSoundSupport: r,
42751
42838
  mathMlOptions: T
42752
42839
  })] }, a)),
42753
- ae && /* @__PURE__ */ F(uQ, {
42840
+ ae && /* @__PURE__ */ F(yQ, {
42754
42841
  label: y.label,
42755
- children: [/* @__PURE__ */ P(tJ, {
42842
+ children: [/* @__PURE__ */ P(uJ, {
42756
42843
  markup: n.rationale || "",
42757
42844
  onChange: this.changeRationale,
42758
42845
  imageSupport: t,
42759
42846
  error: de,
42760
42847
  nonEmpty: !1,
42761
42848
  toolbarOpts: pe,
42762
- pluginProps: LX(v?.inputConfiguration, s),
42849
+ pluginProps: KX(v?.inputConfiguration, s),
42763
42850
  spellCheck: oe,
42764
42851
  maxImageWidth: m && m.rationale || ve,
42765
42852
  maxImageHeight: p && p.rationale || be,
42766
42853
  uploadSoundSupport: r,
42767
42854
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
42768
42855
  mathMlOptions: T
42769
- }), de && /* @__PURE__ */ P(dQ, { children: de })]
42856
+ }), de && /* @__PURE__ */ P(bQ, { children: de })]
42770
42857
  }),
42771
- re && /* @__PURE__ */ P(xJ, {
42858
+ re && /* @__PURE__ */ P(AJ, {
42772
42859
  feedback: n.feedback,
42773
42860
  onChange: this.changeFeedback,
42774
42861
  toolbarOpts: pe
42775
42862
  })
42776
42863
  ]
42777
- }), /* @__PURE__ */ P(ye, { children: /* @__PURE__ */ P(cQ, { children: this.renderDragOverlay() }) })]
42864
+ }), /* @__PURE__ */ P(ye, { children: /* @__PURE__ */ P(_Q, { children: this.renderDragOverlay() }) })]
42778
42865
  })
42779
42866
  });
42780
42867
  }
42781
- }, pQ = class extends N.Component {
42868
+ }, SQ = class extends N.Component {
42782
42869
  static propTypes = {
42783
42870
  configuration: I.default.object,
42784
42871
  onConfigurationChanged: I.default.func,
@@ -42790,7 +42877,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42790
42877
  static defaultProps = {};
42791
42878
  render() {
42792
42879
  let { model: e, onModelChanged: t, configuration: n, onConfigurationChanged: r, imageSupport: i, uploadSoundSupport: a } = this.props;
42793
- return /* @__PURE__ */ P(fQ, {
42880
+ return /* @__PURE__ */ P(xQ, {
42794
42881
  imageSupport: i,
42795
42882
  uploadSoundSupport: a,
42796
42883
  title: "Design",
@@ -42800,7 +42887,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42800
42887
  onConfigurationChanged: r
42801
42888
  });
42802
42889
  }
42803
- }, mQ = {
42890
+ }, CQ = {
42804
42891
  model: {
42805
42892
  allowAlternateEnabled: !0,
42806
42893
  allowMaxChoicesPerCategory: !1,
@@ -42964,9 +43051,9 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42964
43051
  options: []
42965
43052
  }
42966
43053
  }
42967
- }, hQ = class e extends HTMLElement {
43054
+ }, wQ = class e extends HTMLElement {
42968
43055
  static createDefaultModel = (e = {}) => ({
42969
- ...mQ.model,
43056
+ ...CQ.model,
42970
43057
  ...e
42971
43058
  });
42972
43059
  static disableAlternateResponses = (e) => {
@@ -42983,14 +43070,14 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42983
43070
  };
42984
43071
  };
42985
43072
  constructor() {
42986
- super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = mQ.configuration;
43073
+ super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = CQ.configuration;
42987
43074
  }
42988
43075
  set model(t) {
42989
43076
  this._model = e.createDefaultModel(t), t.choices && t.choices.length >= t.maxAnswerChoices && (this._model.maxAnswerChoices = t.choices.length, console.warn("Max Answer Choices can't be less than choices length!")), this.render();
42990
43077
  }
42991
43078
  set configuration(e) {
42992
43079
  let t = {
42993
- ...mQ.configuration,
43080
+ ...CQ.configuration,
42994
43081
  ...e
42995
43082
  };
42996
43083
  this._configuration = t, t?.language?.enabled ? t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value) : t.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
@@ -42999,7 +43086,7 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
42999
43086
  })) : delete this._model.language, this.render();
43000
43087
  }
43001
43088
  onModelChanged(e) {
43002
- this._model = e, this.render(), this.dispatchEvent(new MX(this._model, !1));
43089
+ this._model = e, this.render(), this.dispatchEvent(new VX(this._model, !1));
43003
43090
  }
43004
43091
  onConfigurationChanged(e) {
43005
43092
  this._configuration = e, this.render();
@@ -43008,19 +43095,19 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
43008
43095
  this.render();
43009
43096
  }
43010
43097
  insertImage(e) {
43011
- this.dispatchEvent(new PX(e));
43098
+ this.dispatchEvent(new UX(e));
43012
43099
  }
43013
43100
  onDeleteImage(e, t) {
43014
- this.dispatchEvent(new NX(e, t));
43101
+ this.dispatchEvent(new HX(e, t));
43015
43102
  }
43016
43103
  insertSound(e) {
43017
- this.dispatchEvent(new IX(e));
43104
+ this.dispatchEvent(new GX(e));
43018
43105
  }
43019
43106
  onDeleteSound(e, t) {
43020
- this.dispatchEvent(new FX(e, t));
43107
+ this.dispatchEvent(new WX(e, t));
43021
43108
  }
43022
43109
  render() {
43023
- let e = N.createElement(pQ, {
43110
+ let e = N.createElement(SQ, {
43024
43111
  model: this._model,
43025
43112
  configuration: this._configuration,
43026
43113
  onModelChanged: this.onModelChanged.bind(this),
@@ -43043,6 +43130,6 @@ var WZ = je.withUid(UZ), GZ = j("div")(({ theme: e }) => ({
43043
43130
  }
43044
43131
  };
43045
43132
  //#endregion
43046
- export { hQ as default };
43133
+ export { wQ as default };
43047
43134
 
43048
43135
  //# sourceMappingURL=index.js.map