@pie-element/inline-dropdown 10.1.2-next.1 → 10.1.2-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
- import { L as e, Nt as t, Pt as n, Rt as r, S as i, a, d as o, f as s, ft as c, ht as l, i as u, j as d, k as f, m as p, n as m, o as h, p as g, pt as _, t as v, v as y, w as b } from "../Close-CMvmRhfL.js";
2
- import { _ as x, o as S } from "../dist-CAsDMEWi.js";
1
+ import { i as e } from "../rolldown-runtime-CWhphoD1.js";
2
+ import { It as t, L as n, Lt as r, S as i, a, d as o, dt as s, f as c, i as l, j as u, k as d, m as f, n as p, o as m, p as h, pt as g, t as _, ut as v, v as y, w as b } from "../Close-DvuMD5vl.js";
3
+ import { _ as x, o as S } from "../dist-BJd6t-uW.js";
3
4
  import C, { useRef as w } from "react";
4
5
  import { createRoot as T } from "react-dom/client";
5
6
  import E from "react-dom";
@@ -34,7 +35,7 @@ var te = class e extends CustomEvent {
34
35
  }
35
36
  }), this.component = t, this.complete = n;
36
37
  }
37
- }, k = /* @__PURE__ */ r(t(), 1), re = "height ease-in 300ms, opacity ease-in 300ms", ie = l("div")(() => ({
38
+ }, k = /* @__PURE__ */ e(t(), 1), re = "height ease-in 300ms, opacity ease-in 300ms", ie = g("div")(() => ({
38
39
  position: "relative",
39
40
  height: 0,
40
41
  overflow: "hidden",
@@ -70,7 +71,7 @@ var te = class e extends CustomEvent {
70
71
  }
71
72
  })), ae = (e) => {
72
73
  let { show: t, children: n, className: r } = e, i = w(null);
73
- return /* @__PURE__ */ D(_, {
74
+ return /* @__PURE__ */ D(s, {
74
75
  nodeRef: i,
75
76
  in: t,
76
77
  appear: !0,
@@ -167,7 +168,7 @@ se.propTypes = {
167
168
  fgFill: k.default.string.isRequired,
168
169
  borderFill: k.default.string.isRequired
169
170
  };
170
- var ce = l("div")(({ size: e }) => ({
171
+ var ce = g("div")(({ size: e }) => ({
171
172
  width: e || "25px",
172
173
  height: e || "25px"
173
174
  })), A = ({ open: e, size: t }) => /* @__PURE__ */ D(ce, {
@@ -977,7 +978,7 @@ var je = {}, V = (e) => !j(e) && typeof e != "boolean" && typeof e != "number",
977
978
  init(e = {}) {
978
979
  e.interpolation ||= { escapeValue: !0 };
979
980
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
980
- this.escape = t === void 0 ? xe : t, this.escapeValue = n === void 0 ? !0 : n, this.useRawValueToEscape = r === void 0 ? !1 : r, this.prefix = i ? F(i) : a || "{{", this.suffix = o ? F(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? F(d) : f || F("$t("), this.nestingSuffix = p ? F(p) : m || F(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ === void 0 ? !1 : _, this.resetRegExp();
981
+ this.escape = t === void 0 ? xe : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? F(i) : a || "{{", this.suffix = o ? F(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? F(d) : f || F("$t("), this.nestingSuffix = p ? F(p) : m || F(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
981
982
  }
982
983
  reset() {
983
984
  this.options && this.init(this.options);
@@ -1616,29 +1617,29 @@ function G(e) {
1616
1617
  function $e(e, t) {
1617
1618
  return !e || G(e) ? e : G(e.default) ? e.default : t && G(e[t]) ? e[t] : t && G(e[t]?.default) ? e[t].default : e;
1618
1619
  }
1619
- var et = $e(g, "Readable") || $e(rt.Readable, "Readable"), tt = a, nt = tt.default, rt = nt && typeof nt == "object" ? nt : tt, { translator: K } = Qe, it = {
1620
+ var et = $e(h, "Readable") || $e(rt.Readable, "Readable"), tt = a, nt = tt.default, rt = nt && typeof nt == "object" ? nt : tt, { translator: K } = Qe, it = {
1620
1621
  WebkitTouchCallout: "none",
1621
1622
  WebkitUserSelect: "none",
1622
1623
  KhtmlUserSelect: "none",
1623
1624
  MozUserSelect: "none",
1624
1625
  msUserSelect: "none",
1625
1626
  userSelect: "none"
1626
- }, at = l("div")(() => ({
1627
+ }, at = g("div")(() => ({
1627
1628
  width: "100%",
1628
1629
  cursor: "pointer"
1629
- })), ot = l("div")(() => ({
1630
+ })), ot = g("div")(() => ({
1630
1631
  margin: "0 auto",
1631
1632
  textAlign: "center",
1632
1633
  display: "flex"
1633
- })), st = l("div")(() => ({
1634
+ })), st = g("div")(() => ({
1634
1635
  width: "fit-content",
1635
1636
  minWidth: "140px",
1636
1637
  alignSelf: "center",
1637
1638
  verticalAlign: "middle",
1638
- color: `var(--correct-answer-toggle-label-color, ${c.text()})`,
1639
+ color: `var(--correct-answer-toggle-label-color, ${v.text()})`,
1639
1640
  fontWeight: "normal",
1640
1641
  ...it
1641
- })), ct = l("div")(() => ({
1642
+ })), ct = g("div")(() => ({
1642
1643
  position: "absolute",
1643
1644
  width: "25px",
1644
1645
  "&.enter": { opacity: "0" },
@@ -1651,7 +1652,7 @@ var et = $e(g, "Readable") || $e(rt.Readable, "Readable"), tt = a, nt = tt.defau
1651
1652
  opacity: "0",
1652
1653
  transition: "opacity 0.3s ease-in"
1653
1654
  }
1654
- })), lt = l("div")(() => ({
1655
+ })), lt = g("div")(() => ({
1655
1656
  width: "25px",
1656
1657
  marginRight: "5px",
1657
1658
  display: "flex",
@@ -1701,7 +1702,7 @@ var et = $e(g, "Readable") || $e(rt.Readable, "Readable"), tt = a, nt = tt.defau
1701
1702
  children: /* @__PURE__ */ O(ot, {
1702
1703
  onClick: this.onClick.bind(this),
1703
1704
  onTouchEnd: this.onTouch.bind(this),
1704
- children: [/* @__PURE__ */ O(lt, { children: [/* @__PURE__ */ D(_, {
1705
+ children: [/* @__PURE__ */ O(lt, { children: [/* @__PURE__ */ D(s, {
1705
1706
  nodeRef: this.openIconRef,
1706
1707
  timeout: 400,
1707
1708
  in: t,
@@ -1716,7 +1717,7 @@ var et = $e(g, "Readable") || $e(rt.Readable, "Readable"), tt = a, nt = tt.defau
1716
1717
  ref: this.openIconRef,
1717
1718
  children: /* @__PURE__ */ D(A, { open: t }, "correct-open")
1718
1719
  })
1719
- }), /* @__PURE__ */ D(_, {
1720
+ }), /* @__PURE__ */ D(s, {
1720
1721
  nodeRef: this.closedIconRef,
1721
1722
  timeout: 5e3,
1722
1723
  in: !t,
@@ -1795,16 +1796,16 @@ var mt = /* @__PURE__ */ q(((e, t) => {
1795
1796
  mt();
1796
1797
  //#endregion
1797
1798
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toUpperFirst.js
1798
- var ht = /* @__PURE__ */ q(((e, t) => {
1799
+ var J = /* @__PURE__ */ q(((e, t) => {
1799
1800
  t.exports = function(e) {
1800
1801
  return e.length ? e.charAt(0).toUpperCase() + e.substring(1) : e;
1801
1802
  };
1802
1803
  }));
1803
- ht();
1804
+ J();
1804
1805
  //#endregion
1805
1806
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixInfo.js
1806
- var gt = /* @__PURE__ */ q(((e, t) => {
1807
- var n = ht(), r = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, i = typeof document > "u" ? {} : document.documentElement.style;
1807
+ var ht = /* @__PURE__ */ q(((e, t) => {
1808
+ var n = J(), r = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, i = typeof document > "u" ? {} : document.documentElement.style;
1808
1809
  t.exports = (function() {
1809
1810
  var e = (function() {
1810
1811
  for (var e in i) if (r.test(e)) return e.match(r)[0];
@@ -1821,54 +1822,54 @@ var gt = /* @__PURE__ */ q(((e, t) => {
1821
1822
  };
1822
1823
  })();
1823
1824
  }));
1824
- gt();
1825
+ ht();
1825
1826
  //#endregion
1826
1827
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js
1827
- var _t = /* @__PURE__ */ q(((e, t) => {
1828
+ var gt = /* @__PURE__ */ q(((e, t) => {
1828
1829
  t.exports = /[-\s]+(.)?/g;
1829
1830
  }));
1830
- _t();
1831
+ gt();
1831
1832
  //#endregion
1832
1833
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js
1833
- var vt = /* @__PURE__ */ q(((e, t) => {
1834
+ var _t = /* @__PURE__ */ q(((e, t) => {
1834
1835
  var n = function(e, t) {
1835
1836
  return t ? t.toUpperCase() : "";
1836
- }, r = _t();
1837
+ }, r = gt();
1837
1838
  t.exports = function(e) {
1838
1839
  return e ? e.replace(r, n) : "";
1839
1840
  };
1840
1841
  }));
1841
- vt();
1842
+ _t();
1842
1843
  //#endregion
1843
1844
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js
1844
- var yt = /* @__PURE__ */ q(((e, t) => {
1845
+ var vt = /* @__PURE__ */ q(((e, t) => {
1845
1846
  var n = /::/g, r = /([A-Z]+)([A-Z][a-z])/g, i = /([a-z\d])([A-Z])/g, a = /_/g;
1846
1847
  t.exports = function(e, t) {
1847
1848
  return e ? e.replace(n, "/").replace(r, "$1_$2").replace(i, "$1_$2").replace(a, t || "-") : "";
1848
1849
  };
1849
1850
  }));
1850
- yt();
1851
+ vt();
1851
1852
  //#endregion
1852
1853
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js
1853
- var bt = /* @__PURE__ */ q(((e, t) => {
1854
- var n = yt();
1854
+ var yt = /* @__PURE__ */ q(((e, t) => {
1855
+ var n = vt();
1855
1856
  t.exports = function(e) {
1856
1857
  return n(e).toLowerCase();
1857
1858
  };
1858
1859
  }));
1859
- bt();
1860
+ yt();
1860
1861
  //#endregion
1861
1862
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js
1862
- var xt = /* @__PURE__ */ q(((e, t) => {
1863
+ var bt = /* @__PURE__ */ q(((e, t) => {
1863
1864
  t.exports = function(e) {
1864
1865
  return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
1865
1866
  };
1866
1867
  }));
1867
- xt();
1868
+ bt();
1868
1869
  //#endregion
1869
1870
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js
1870
- var St = /* @__PURE__ */ q(((e, t) => {
1871
- var n = vt(), r = bt(), i = xt(), a = ht(), o = gt(), s = pt(), c = typeof document > "u" ? {} : document.documentElement.style;
1871
+ var xt = /* @__PURE__ */ q(((e, t) => {
1872
+ var n = _t(), r = yt(), i = bt(), a = J(), o = ht(), s = pt(), c = typeof document > "u" ? {} : document.documentElement.style;
1872
1873
  t.exports = function(e) {
1873
1874
  return function(t, l) {
1874
1875
  l ||= {};
@@ -1885,45 +1886,45 @@ var St = /* @__PURE__ */ q(((e, t) => {
1885
1886
  };
1886
1887
  };
1887
1888
  }));
1888
- St();
1889
+ xt();
1889
1890
  //#endregion
1890
1891
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js
1891
- var Ct = /* @__PURE__ */ q(((e, t) => {
1892
- t.exports = St()();
1892
+ var St = /* @__PURE__ */ q(((e, t) => {
1893
+ t.exports = xt()();
1893
1894
  }));
1894
- Ct();
1895
+ St();
1895
1896
  //#endregion
1896
1897
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js
1897
- var wt = /* @__PURE__ */ q(((e, t) => {
1898
+ var Ct = /* @__PURE__ */ q(((e, t) => {
1898
1899
  var n = Object.prototype.hasOwnProperty;
1899
1900
  t.exports = function(e, t) {
1900
1901
  return n.call(e, t);
1901
1902
  };
1902
1903
  }));
1903
- wt();
1904
+ Ct();
1904
1905
  //#endregion
1905
1906
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js
1906
- var Tt = /* @__PURE__ */ q(((e, t) => {
1907
+ var wt = /* @__PURE__ */ q(((e, t) => {
1907
1908
  var n = Object.prototype.toString;
1908
1909
  t.exports = function(e) {
1909
1910
  return !!e && n.call(e) === "[object Object]";
1910
1911
  };
1911
1912
  }));
1912
- Tt();
1913
+ wt();
1913
1914
  //#endregion
1914
1915
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js
1915
- var Et = /* @__PURE__ */ q(((e, t) => {
1916
+ var Tt = /* @__PURE__ */ q(((e, t) => {
1916
1917
  var n = Object.prototype.toString;
1917
1918
  t.exports = function(e) {
1918
1919
  return n.apply(e) === "[object Function]";
1919
1920
  };
1920
1921
  }));
1921
- Et();
1922
+ Tt();
1922
1923
  //#endregion
1923
1924
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js
1924
- var Dt = /* @__PURE__ */ q(((e, t) => {
1925
- gt();
1926
- var n = Ct(), r = bt(), i = vt(), a = wt(), o = Tt(), s = Et(), c = function(e, t, r, i) {
1925
+ var Et = /* @__PURE__ */ q(((e, t) => {
1926
+ ht();
1927
+ var n = St(), r = yt(), i = _t(), a = Ct(), o = wt(), s = Tt(), c = function(e, t, r, i) {
1927
1928
  n(t).forEach(function(t) {
1928
1929
  e[i ? i(t) : t] = r;
1929
1930
  });
@@ -1963,11 +1964,11 @@ var Dt = /* @__PURE__ */ q(((e, t) => {
1963
1964
  };
1964
1965
  t.exports = d;
1965
1966
  }));
1966
- Dt();
1967
+ Et();
1967
1968
  //#endregion
1968
1969
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js
1969
- var Ot = /* @__PURE__ */ q(((e, t) => {
1970
- var n = Dt(), r = wt();
1970
+ var Dt = /* @__PURE__ */ q(((e, t) => {
1971
+ var n = Et(), r = Ct();
1971
1972
  t.exports = function(e, t) {
1972
1973
  e = n(e, t);
1973
1974
  var i = [], a;
@@ -1975,25 +1976,25 @@ var Ot = /* @__PURE__ */ q(((e, t) => {
1975
1976
  return i.join("; ");
1976
1977
  };
1977
1978
  }));
1978
- Ot();
1979
+ Dt();
1979
1980
  //#endregion
1980
1981
  //#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js
1981
- var kt = /* @__PURE__ */ q(((e, t) => {
1982
+ var Ot = /* @__PURE__ */ q(((e, t) => {
1982
1983
  t.exports = {
1983
1984
  prefixProperties: pt(),
1984
1985
  cssUnitless: mt(),
1985
- object: Dt(),
1986
- string: Ot()
1986
+ object: Et(),
1987
+ string: Dt()
1987
1988
  };
1988
1989
  }));
1989
- kt();
1990
+ Ot();
1990
1991
  //#endregion
1991
1992
  //#region ../../lib-react/mask-markup/dist/serialization.js
1992
- var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:mask-markup:serialization"), Nt = ["span"], Pt = [
1993
+ var kt = /* @__PURE__ */ e(u(), 1), At = Ot(), jt = (0, kt.default)("@pie-lib:mask-markup:serialization"), Mt = ["span"], Nt = [
1993
1994
  "em",
1994
1995
  "strong",
1995
1996
  "u"
1996
- ], Ft = 3, It = 8, Lt = 1, Rt = (e) => {
1997
+ ], Pt = 3, Ft = 8, It = 1, Lt = (e) => {
1997
1998
  if (!e.attributes || e.attributes.length <= 0) return;
1998
1999
  let t = {}, n;
1999
2000
  for (n = 0; n < e.attributes.length; n++) {
@@ -2001,44 +2002,44 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2001
2002
  t[r.name] = r.value;
2002
2003
  }
2003
2004
  return t;
2004
- }, zt = (e) => Nt.includes(e) ? "inline" : Pt.includes(e) ? "mark" : "block", Bt = (e) => {
2005
+ }, Rt = (e) => Mt.includes(e) ? "inline" : Nt.includes(e) ? "mark" : "block", zt = (e) => {
2005
2006
  let t = /([\w-]*)\s*:\s*([^;]*)/g, n, r = {};
2006
2007
  for (; n = t.exec(e);) r[n[1]] = n[2].trim();
2007
2008
  return r;
2008
- }, Vt = (e) => (0, jt.object)(e, {
2009
+ }, Bt = (e) => (0, At.object)(e, {
2009
2010
  camelize: !0,
2010
2011
  addUnits: !1
2011
- }), Ht = (e, t) => Vt(Bt(e.getAttribute(t))), Ut = (e, t, n) => {
2012
+ }), Vt = (e, t) => Bt(zt(e.getAttribute(t))), Ht = (e, t, n) => {
2012
2013
  let r = e.getAttribute(n);
2013
2014
  return delete t.class, r;
2014
- }, Wt = (e) => (t, n) => {
2015
+ }, Ut = (e) => (t, n) => {
2015
2016
  if (!e.getAttribute) return t;
2016
2017
  if (e.getAttribute(n)) switch (n) {
2017
2018
  case "style":
2018
- t.style = Ht(e, n);
2019
+ t.style = Vt(e, n);
2019
2020
  break;
2020
2021
  case "class":
2021
- t.className = Ut(e, t, n);
2022
+ t.className = Ht(e, t, n);
2022
2023
  break;
2023
2024
  default:
2024
2025
  t[n] = e.getAttribute(n);
2025
2026
  break;
2026
2027
  }
2027
2028
  return t;
2028
- }, Gt = [
2029
+ }, Wt = [
2029
2030
  "border",
2030
2031
  "class",
2031
2032
  "style"
2032
- ], Kt = {
2033
+ ], Gt = {
2033
2034
  b: "bold",
2034
2035
  em: "italic",
2035
2036
  u: "underline",
2036
2037
  s: "strikethrough",
2037
2038
  code: "code",
2038
2039
  strong: "strong"
2039
- }, qt = (e, t = []) => {
2040
- if (e.nodeType === It) return null;
2041
- if (e.nodeType === Ft) {
2040
+ }, Kt = (e, t = []) => {
2041
+ if (e.nodeType === Ft) return null;
2042
+ if (e.nodeType === Pt) {
2042
2043
  let n = { text: e.textContent };
2043
2044
  return t.length > 0 && (n.marks = t.map((e) => ({
2044
2045
  type: e,
@@ -2048,19 +2049,19 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2048
2049
  leaves: [n]
2049
2050
  };
2050
2051
  }
2051
- if (e.nodeType === Lt) {
2052
- let n = e.tagName.toLowerCase(), r = Kt[n];
2053
- if (r) return Mt("[deserialize] mark: ", r), {
2052
+ if (e.nodeType === It) {
2053
+ let n = e.tagName.toLowerCase(), r = Gt[n];
2054
+ if (r) return jt("[deserialize] mark: ", r), {
2054
2055
  _flatten: !0,
2055
- nodes: Jt(e.childNodes, [...t, r])
2056
+ nodes: qt(e.childNodes, [...t, r])
2056
2057
  };
2057
2058
  if (n === "math") return {
2058
2059
  isMath: !0,
2059
2060
  nodes: [e]
2060
2061
  };
2061
- let i = Rt(e) || {};
2062
+ let i = Lt(e) || {};
2062
2063
  n === "audio" && i.controls === "" && (i.controls = !0);
2063
- let a = Gt.reduce(Wt(e), { ...i }), o = zt(n), s = Jt(e.childNodes, t);
2064
+ let a = Wt.reduce(Ut(e), { ...i }), o = Rt(n), s = qt(e.childNodes, t);
2064
2065
  return {
2065
2066
  object: o,
2066
2067
  type: n,
@@ -2072,14 +2073,14 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2072
2073
  };
2073
2074
  }
2074
2075
  return null;
2075
- }, Jt = (e, t = []) => {
2076
+ }, qt = (e, t = []) => {
2076
2077
  let n = [];
2077
2078
  for (let r = 0; r < e.length; r++) {
2078
- let i = qt(e[r], t);
2079
+ let i = Kt(e[r], t);
2079
2080
  i !== null && (i._flatten && i.nodes ? n.push(...i.nodes) : n.push(i));
2080
2081
  }
2081
2082
  return n;
2082
- }, Yt = (e) => {
2083
+ }, Jt = (e) => {
2083
2084
  if (!e || !e.trim()) return {
2084
2085
  object: "value",
2085
2086
  document: {
@@ -2094,7 +2095,7 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2094
2095
  }]
2095
2096
  }
2096
2097
  };
2097
- let t = Jt(new DOMParser().parseFromString(e, "text/html").body.childNodes);
2098
+ let t = qt(new DOMParser().parseFromString(e, "text/html").body.childNodes);
2098
2099
  return !t.some((e) => e.object === "block" || e.object === "inline") && t.length > 0 && (t = [{
2099
2100
  object: "block",
2100
2101
  type: "span",
@@ -2115,19 +2116,19 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2115
2116
  nodes: t
2116
2117
  }
2117
2118
  };
2118
- }, Xt = l("div")(({ theme: e }) => ({
2119
+ }, Yt = g("div")(({ theme: e }) => ({
2119
2120
  paddingTop: e.spacing(.5),
2120
2121
  paddingBottom: e.spacing(.5)
2121
- })), Zt = l("span")(() => ({
2122
+ })), Xt = g("span")(() => ({
2122
2123
  display: "inline-block",
2123
2124
  width: ".75em"
2124
- })), Qt = ["tbody", "tr"], $t = (e, t) => {
2125
+ })), Zt = ["tbody", "tr"], Qt = (e, t) => {
2125
2126
  let n = t.trim() === "", r = e && e.type;
2126
- if (!(n && Qt.includes(r))) return t;
2127
- }, en = (e) => {
2127
+ if (!(n && Zt.includes(r))) return t;
2128
+ }, $t = (e) => {
2128
2129
  let t = e.leaves.find((e) => x(e, "marks", []).length);
2129
- return t ? t.marks[0] : null;
2130
- }, tn = (e, t, n, r, i, a) => {
2130
+ return t ? t.marks : null;
2131
+ }, en = (e, t, n, r, i, a) => {
2131
2132
  if (!t) return null;
2132
2133
  let o = [];
2133
2134
  return (e.nodes || []).forEach((e, s) => {
@@ -2137,26 +2138,22 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2137
2138
  let i = r(e, t, n);
2138
2139
  if (i) {
2139
2140
  let t = e.data?.dataset?.component === "blank";
2140
- t && o.push(/* @__PURE__ */ D(Zt, {}, `spacer-${s}`)), o.push(i), t && o.push(/* @__PURE__ */ D(Zt, {}, `spacer-${s}`));
2141
+ t && o.push(/* @__PURE__ */ D(Xt, {}, `spacer-${s}-before`)), o.push(i), t && o.push(/* @__PURE__ */ D(Xt, {}, `spacer-${s}-after`));
2141
2142
  return;
2142
2143
  }
2143
2144
  }
2144
2145
  if (e.object === "text") {
2145
2146
  let t = e.leaves.reduce((e, t) => {
2146
- let n = t.text, r = $t(i, n);
2147
+ let n = t.text, r = Qt(i, n);
2147
2148
  return r ? e + r : e;
2148
- }, ""), n = en(e);
2149
- if (n) {
2150
- let e;
2151
- for (e in Kt) if (Kt[e] === n.type) {
2152
- let n = e;
2153
- o.push(/* @__PURE__ */ D(n, { children: t }, c));
2154
- break;
2155
- }
2149
+ }, ""), n = $t(e);
2150
+ if (n?.length > 0) {
2151
+ let e = n.map((e) => Object.keys(Gt).find((t) => Gt[t] === e.type)).filter(Boolean);
2152
+ e.length > 0 ? o.push(e.reduceRight((e, t, n) => /* @__PURE__ */ D(t, { children: e }, `${c}-${t}-${n}`), t)) : o.push(t);
2156
2153
  } else t.length > 0 && o.push(t);
2157
2154
  } else {
2158
- let i = tn(e, t, n, r, e, a);
2159
- if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ D(Xt, { children: i }, c));
2155
+ let i = en(e, t, n, r, e, a);
2156
+ if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ D(Yt, { children: i }, c));
2160
2157
  else {
2161
2158
  let t = e.type;
2162
2159
  e.nodes && e.nodes.length > 0 ? o.push(/* @__PURE__ */ D(t, {
@@ -2166,14 +2163,14 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2166
2163
  }
2167
2164
  }
2168
2165
  }), o;
2169
- }, nn = l("div")(() => ({
2166
+ }, tn = g("div")(() => ({
2170
2167
  display: "initial",
2171
2168
  "&:not(.MathJax) table": { borderCollapse: "collapse" },
2172
2169
  "&:not(.MathJax) table td, &:not(.MathJax) table th": {
2173
2170
  padding: "8px 12px",
2174
2171
  textAlign: "left"
2175
2172
  }
2176
- })), rn = class extends C.Component {
2173
+ })), nn = class extends C.Component {
2177
2174
  constructor(e) {
2178
2175
  super(e), this.internalContainerRef = C.createRef();
2179
2176
  }
@@ -2187,7 +2184,7 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2187
2184
  };
2188
2185
  componentDidMount() {
2189
2186
  let e = this.props.containerRef || this.internalContainerRef;
2190
- e.current && typeof n == "function" && n(e.current);
2187
+ e.current && typeof r == "function" && r(e.current);
2191
2188
  }
2192
2189
  handleChange = (e, t) => {
2193
2190
  let n = {
@@ -2197,16 +2194,16 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2197
2194
  this.props.onChange(n);
2198
2195
  };
2199
2196
  render() {
2200
- let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = tn(t, e, this.handleChange, this.props.renderChildren, null, n);
2201
- return /* @__PURE__ */ D(nn, {
2197
+ let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = en(t, e, this.handleChange, this.props.renderChildren, null, n);
2198
+ return /* @__PURE__ */ D(tn, {
2202
2199
  ref: r || this.internalContainerRef,
2203
2200
  children: i
2204
2201
  });
2205
2202
  }
2206
- }, an = (e, t) => {
2203
+ }, rn = (e, t) => {
2207
2204
  let { markup: n } = ft(e, t);
2208
- return Yt(n).document;
2209
- }, on = (e, t) => class extends C.Component {
2205
+ return Jt(n).document;
2206
+ }, an = (e, t) => class extends C.Component {
2210
2207
  static propTypes = {
2211
2208
  markup: k.default.string,
2212
2209
  layout: k.default.object,
@@ -2228,8 +2225,8 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2228
2225
  }
2229
2226
  }
2230
2227
  render() {
2231
- let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || an(n, e);
2232
- return /* @__PURE__ */ D(rn, {
2228
+ let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || rn(n, e);
2229
+ return /* @__PURE__ */ D(nn, {
2233
2230
  containerRef: this.containerRef,
2234
2231
  elementType: o,
2235
2232
  layout: s,
@@ -2238,21 +2235,21 @@ var At = /* @__PURE__ */ r(d(), 1), jt = kt(), Mt = (0, At.default)("@pie-lib:ma
2238
2235
  renderChildren: t(this.props)
2239
2236
  });
2240
2237
  }
2241
- }, sn = e(/*#__PURE__*/ D("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), cn = e(/*#__PURE__*/ D("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
2238
+ }, on = n(/*#__PURE__*/ D("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), sn = n(/*#__PURE__*/ D("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
2242
2239
  //#endregion
2243
2240
  //#region ../../lib-react/mask-markup/dist/components/dropdown.js
2244
- function J(e) {
2241
+ function Y(e) {
2245
2242
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
2246
2243
  }
2247
- function ln(e, t) {
2248
- return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
2244
+ function cn(e, t) {
2245
+ return !e || Y(e) ? e : Y(e.default) ? e.default : t && Y(e[t]) ? e[t] : t && Y(e[t]?.default) ? e[t].default : e;
2249
2246
  }
2250
- var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.default, fn = Y && typeof Y == "object" ? Y : dn, pn = l(b)(() => ({
2251
- color: c.text(),
2252
- border: `1px solid ${c.borderGray()}`,
2247
+ var ln = cn(m, "InlineMenu") || cn(fn.InlineMenu, "InlineMenu"), un = a, dn = un.default, fn = dn && typeof dn == "object" ? dn : un, pn = v.v("pie"), mn = g(b)(() => ({
2248
+ color: v.text(),
2249
+ border: `1px solid ${v.borderGray()}`,
2253
2250
  borderRadius: "4px",
2254
2251
  justifyContent: "space-between",
2255
- backgroundColor: c.background(),
2252
+ backgroundColor: v.background(),
2256
2253
  position: "relative",
2257
2254
  height: "45px",
2258
2255
  width: "fit-content",
@@ -2264,37 +2261,28 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2264
2261
  right: "4px",
2265
2262
  top: "calc(50% - 12px)",
2266
2263
  pointerEvents: "none",
2267
- color: c.text(),
2264
+ color: v.text(),
2268
2265
  marginLeft: "5px"
2269
2266
  },
2270
2267
  "&.Mui-focused": {
2271
- outline: `3px solid ${c.tertiary()}`,
2268
+ outline: `3px solid ${v.tertiary()}`,
2272
2269
  outlineOffset: "2px",
2273
2270
  borderWidth: "3px"
2274
2271
  },
2275
2272
  "&.disabledCorrect": {
2276
2273
  borderWidth: "2px",
2277
- borderColor: c.correct(),
2278
- color: `${c.text()} !important`
2274
+ borderColor: v.correct(),
2275
+ color: `${v.text()} !important`
2279
2276
  },
2280
2277
  "&.disabledIncorrect": {
2281
2278
  borderWidth: "2px",
2282
- borderColor: c.incorrectWithIcon(),
2283
- color: `${c.text()} !important`
2279
+ borderColor: v.incorrectWithIcon(),
2280
+ color: `${v.text()} !important`
2284
2281
  }
2285
- })), mn = l(un)(() => ({
2286
- backgroundColor: c.background(),
2287
- border: `1px solid ${c.correct()} !important`,
2288
- "&:hover": {
2289
- border: `1px solid ${c.text()} `,
2290
- borderColor: "initial"
2291
- },
2292
- "&:focus": {
2293
- border: `1px solid ${c.text()}`,
2294
- borderColor: "initial"
2295
- },
2282
+ })), hn = g(ln)(() => ({
2283
+ "& .MuiPaper-root": { backgroundColor: pn("background", v.defaults.WHITE) },
2296
2284
  "& .MuiList-root": { padding: 0 }
2297
- })), hn = l(m)(() => ({
2285
+ })), gn = g(p)(() => ({
2298
2286
  height: 24,
2299
2287
  overflow: "hidden",
2300
2288
  fontSize: "1rem",
@@ -2302,42 +2290,42 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2302
2290
  fontFamily: "inherit",
2303
2291
  lineHeight: "1.5em",
2304
2292
  whiteSpace: "nowrap",
2305
- color: c.text(),
2306
- backgroundColor: c.background(),
2293
+ color: v.text(),
2294
+ backgroundColor: v.background(),
2307
2295
  "&.Mui-focusVisible": {
2308
- outline: `3px solid ${c.tertiary()}`,
2296
+ outline: `3px solid ${v.tertiary()}`,
2309
2297
  outlineOffset: "-1px",
2310
- color: c.text(),
2311
- backgroundColor: c.background()
2298
+ color: v.text(),
2299
+ backgroundColor: v.background()
2312
2300
  },
2313
2301
  "&:hover": {
2314
- color: c.text(),
2315
- backgroundColor: c.dropdownBackground()
2302
+ color: v.text(),
2303
+ backgroundColor: v.dropdownBackground()
2316
2304
  },
2317
2305
  boxSizing: "border-box",
2318
2306
  padding: "16px 8px",
2319
2307
  borderRadius: "4px",
2320
2308
  "&.selected": {
2321
- color: `${c.text()} !important`,
2322
- backgroundColor: `${c.background()} !important`,
2309
+ color: `${v.text()} !important`,
2310
+ backgroundColor: `${v.background()} !important`,
2323
2311
  "&:hover": {
2324
- color: c.text(),
2325
- backgroundColor: `${c.dropdownBackground()} !important`
2312
+ color: v.text(),
2313
+ backgroundColor: `${v.dropdownBackground()} !important`
2326
2314
  }
2327
2315
  }
2328
- })), gn = l("span")(() => ({ fontSize: "max(1rem, 14px)" })), _n = l("span")(() => ({
2316
+ })), _n = g("span")(() => ({ fontSize: "max(1rem, 14px)" })), vn = g("span")(() => ({
2329
2317
  fontSize: "max(1rem, 14px)",
2330
2318
  flexShrink: 0,
2331
2319
  paddingLeft: "8px"
2332
- })), vn = l(y)(() => ({
2320
+ })), yn = g(y)(() => ({
2333
2321
  position: "absolute",
2334
2322
  left: "-10000px",
2335
2323
  top: "auto",
2336
2324
  width: "1px",
2337
2325
  height: "1px",
2338
2326
  overflow: "hidden"
2339
- })), yn = l(u)(() => ({
2340
- color: `${c.white()} !important`,
2327
+ })), bn = g(l)(() => ({
2328
+ color: `${v.white()} !important`,
2341
2329
  position: "absolute",
2342
2330
  top: "-8px !important",
2343
2331
  left: "-8px",
@@ -2345,10 +2333,10 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2345
2333
  borderRadius: "50%",
2346
2334
  fontSize: "16px",
2347
2335
  padding: "2px",
2348
- "&.correct": { backgroundColor: c.correct() },
2349
- "&.incorrect": { backgroundColor: c.incorrectWithIcon() }
2350
- })), bn = l(v)(() => ({
2351
- color: `${c.white()} !important`,
2336
+ "&.correct": { backgroundColor: v.correct() },
2337
+ "&.incorrect": { backgroundColor: v.incorrectWithIcon() }
2338
+ })), xn = g(_)(() => ({
2339
+ color: `${v.white()} !important`,
2352
2340
  position: "absolute",
2353
2341
  top: "-8px !important",
2354
2342
  left: "-8px",
@@ -2356,9 +2344,9 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2356
2344
  borderRadius: "50%",
2357
2345
  fontSize: "16px",
2358
2346
  padding: "2px",
2359
- "&.correct": { backgroundColor: c.correct() },
2360
- "&.incorrect": { backgroundColor: c.incorrectWithIcon() }
2361
- })), xn = class extends C.Component {
2347
+ "&.correct": { backgroundColor: v.correct() },
2348
+ "&.incorrect": { backgroundColor: v.incorrectWithIcon() }
2349
+ })), Sn = class extends C.Component {
2362
2350
  static propTypes = {
2363
2351
  id: k.default.string,
2364
2352
  value: k.default.string,
@@ -2385,16 +2373,16 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2385
2373
  this.hiddenRef.current && this.state.menuWidth === null && this.setState({ menuWidth: this.hiddenRef.current.clientWidth });
2386
2374
  }
2387
2375
  componentDidUpdate(e, t) {
2388
- let r = this.hiddenRef.current;
2376
+ let n = this.hiddenRef.current;
2389
2377
  if (!t.anchorEl && this.state.anchorEl && this.elementRefs.forEach((e) => {
2390
2378
  if (!e) return;
2391
- let t = e.querySelector("[data-latex], [data-raw]"), r = e.querySelector("mjx-container"), i = e.querySelector("[data-math-handled=\"true\"]");
2392
- t && (!i || !r) && n(e);
2393
- }), r) {
2394
- let e = r.clientWidth;
2379
+ let t = e.querySelector("[data-latex], [data-raw]"), n = e.querySelector("mjx-container"), i = e.querySelector("[data-math-handled=\"true\"]");
2380
+ t && (!i || !n) && r(e);
2381
+ }), n) {
2382
+ let e = n.clientWidth;
2395
2383
  e !== this.state.menuWidth && (this.elementRefs.forEach((e) => {
2396
- e && n(e);
2397
- }), n(r), this.setState({ menuWidth: e }));
2384
+ e && r(e);
2385
+ }), r(n), this.setState({ menuWidth: e }));
2398
2386
  }
2399
2387
  }
2400
2388
  handleClick = (e) => {
@@ -2442,7 +2430,7 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2442
2430
  let { id: e, correct: t, disabled: n, value: r, choices: i, showCorrectAnswer: a, singleQuery: o, correctValue: s } = this.props, { anchorEl: c } = this.state, l = !!c, u = `dropdown-button-${e}`, d = `dropdown-menu-${e}`, f = `dropdown-value-${e}`, p;
2443
2431
  this.elementRefs = [], n && t !== void 0 && (p = t || a ? "disabledCorrect" : "disabledIncorrect");
2444
2432
  let m = parseInt(e, 10) + 1, h = o ? "Query-label" : `Query-label-${m}`, g = o ? "Query" : `Query ${m}`, _ = null;
2445
- return n && t !== void 0 && (_ = t || a ? /* @__PURE__ */ D(yn, { className: "correct" }) : /* @__PURE__ */ D(bn, { className: "incorrect" })), /* @__PURE__ */ O(ee, { children: [
2433
+ return n && t !== void 0 && (_ = t || a ? /* @__PURE__ */ D(bn, { className: "correct" }) : /* @__PURE__ */ D(xn, { className: "incorrect" })), /* @__PURE__ */ O(ee, { children: [
2446
2434
  /* @__PURE__ */ D("div", {
2447
2435
  ref: this.hiddenRef,
2448
2436
  style: {
@@ -2453,19 +2441,19 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2453
2441
  },
2454
2442
  tabIndex: -1,
2455
2443
  "aria-hidden": "true",
2456
- children: (i || []).map((e, t) => /* @__PURE__ */ D(hn, {
2444
+ children: (i || []).map((e, t) => /* @__PURE__ */ D(gn, {
2457
2445
  tabIndex: -1,
2458
2446
  "aria-hidden": "true",
2459
- children: /* @__PURE__ */ D(gn, { dangerouslySetInnerHTML: { __html: e.label } })
2447
+ children: /* @__PURE__ */ D(_n, { dangerouslySetInnerHTML: { __html: e.label } })
2460
2448
  }, t))
2461
2449
  }),
2462
- /* @__PURE__ */ D(vn, {
2450
+ /* @__PURE__ */ D(yn, {
2463
2451
  id: h,
2464
2452
  tabIndex: -1,
2465
2453
  "aria-hidden": "true",
2466
2454
  children: g
2467
2455
  }),
2468
- /* @__PURE__ */ O(pn, {
2456
+ /* @__PURE__ */ O(mn, {
2469
2457
  ref: this.buttonRef,
2470
2458
  style: {
2471
2459
  ...this.state.menuWidth && { minWidth: `calc(${this.state.menuWidth}px + 8px)` },
@@ -2485,15 +2473,15 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2485
2473
  "aria-labelledby": f,
2486
2474
  children: [
2487
2475
  _,
2488
- /* @__PURE__ */ D(gn, {
2476
+ /* @__PURE__ */ D(_n, {
2489
2477
  id: f,
2490
2478
  ref: this.previewRef,
2491
2479
  dangerouslySetInnerHTML: { __html: s || (l && this.state.previewValue ? this.getLabel(i, this.state.previewValue) : this.getLabel(i, r) || "") }
2492
2480
  }),
2493
- D(l ? cn : sn, {})
2481
+ D(l ? sn : on, {})
2494
2482
  ]
2495
2483
  }),
2496
- /* @__PURE__ */ D(mn, {
2484
+ /* @__PURE__ */ D(hn, {
2497
2485
  id: d,
2498
2486
  anchorEl: c,
2499
2487
  keepMounted: !0,
@@ -2525,7 +2513,7 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2525
2513
  },
2526
2514
  children: (i || []).map((t, n) => {
2527
2515
  let i = `dropdown-option-${e}-${n}`;
2528
- return /* @__PURE__ */ O(hn, {
2516
+ return /* @__PURE__ */ O(gn, {
2529
2517
  id: i,
2530
2518
  className: t.value === r ? "selected" : "",
2531
2519
  selected: t.value === r,
@@ -2534,20 +2522,20 @@ var un = ln(h, "InlineMenu") || ln(fn.InlineMenu, "InlineMenu"), dn = a, Y = dn.
2534
2522
  role: "option",
2535
2523
  "aria-selected": this.state.highlightedOptionId === i ? "true" : void 0,
2536
2524
  onMouseOver: () => this.handleHover(n),
2537
- children: [/* @__PURE__ */ D(gn, {
2525
+ children: [/* @__PURE__ */ D(_n, {
2538
2526
  ref: (e) => this.elementRefs[n] = e,
2539
2527
  dangerouslySetInnerHTML: { __html: t.label }
2540
- }), /* @__PURE__ */ D(_n, { dangerouslySetInnerHTML: { __html: t.value === r ? " &check;" : "" } })]
2528
+ }), /* @__PURE__ */ D(vn, { dangerouslySetInnerHTML: { __html: t.value === r ? " &check;" : "" } })]
2541
2529
  }, `${t.label}-${n}`);
2542
2530
  })
2543
2531
  })
2544
2532
  ] });
2545
2533
  }
2546
- }, Sn = on("dropdown", (e) => (t, n, r) => {
2534
+ }, Cn = an("dropdown", (e) => (t, n, r) => {
2547
2535
  let i = t.data && t.data.dataset || {};
2548
2536
  if (i.component === "dropdown") {
2549
2537
  let { choices: a, disabled: o, feedback: s, showCorrectAnswer: c } = e, l = a && a[i.id] && a[i.id].find((e) => e.correct), u = c ? l && l.value : n[i.id];
2550
- return /* @__PURE__ */ D(xn, {
2538
+ return /* @__PURE__ */ D(Sn, {
2551
2539
  correct: s && s[i.id] && s[i.id] === "correct",
2552
2540
  disabled: o || c,
2553
2541
  value: u,
@@ -2568,23 +2556,23 @@ function X(e) {
2568
2556
  function Z(e, t) {
2569
2557
  return !e || X(e) ? e : X(e.default) ? e.default : t && X(e[t]) ? e[t] : t && X(e[t]?.default) ? e[t].default : e;
2570
2558
  }
2571
- var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt") || Z($.PreviewPrompt, "PreviewPrompt"), wn = Z(f, "Collapsible") || Z($.Collapsible, "Collapsible"), Tn = a, En = Tn.default, $ = En && typeof En == "object" ? En : Tn, Dn = l(Cn)({
2572
- color: c.text(),
2573
- backgroundColor: c.background()
2574
- }), On = l(wn)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), kn = l("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), An = l("div")({
2559
+ var wn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(f, "PreviewPrompt") || Z($.PreviewPrompt, "PreviewPrompt"), Tn = Z(d, "Collapsible") || Z($.Collapsible, "Collapsible"), En = a, Dn = En.default, $ = Dn && typeof Dn == "object" ? Dn : En, On = g(wn)({
2560
+ color: v.text(),
2561
+ backgroundColor: v.background()
2562
+ }), kn = g(Tn)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), An = g("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), jn = g("div")({
2575
2563
  display: "flex",
2576
2564
  whiteSpace: "break-spaces"
2577
- }), jn = l("div")(({ correct: e }) => ({
2565
+ }), Mn = g("div")(({ correct: e }) => ({
2578
2566
  display: "flex",
2579
- ...e ? { color: c.correct() } : { color: c.incorrectWithIcon() }
2580
- })), Mn = l("h2")({
2567
+ ...e ? { color: v.correct() } : { color: v.incorrectWithIcon() }
2568
+ })), Nn = g("h2")({
2581
2569
  position: "absolute",
2582
2570
  left: "-10000px",
2583
2571
  top: "auto",
2584
2572
  width: "1px",
2585
2573
  height: "1px",
2586
2574
  overflow: "hidden"
2587
- }), Nn = class extends C.Component {
2575
+ }), Pn = class extends C.Component {
2588
2576
  static propTypes = {
2589
2577
  prompt: k.default.string,
2590
2578
  disabled: k.default.bool,
@@ -2606,19 +2594,19 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
2606
2594
  S(e.feedback) && this.setState({ showCorrectAnswer: !1 });
2607
2595
  }
2608
2596
  componentDidUpdate() {
2609
- n(E.findDOMNode(this));
2597
+ r(E.findDOMNode(this));
2610
2598
  }
2611
2599
  toggleShowCorrect = () => {
2612
2600
  this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
2613
2601
  };
2614
2602
  render() {
2615
- let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: c, displayType: l, language: u } = this.props, { extraCSSRules: d } = r || {}, f = n === "evaluate", p = !1, m = i && (s(i) || o(i)), h = a && (s(a) || o(a)), g = (Object.keys(c) || []).map((e) => (c[e] || []).reduce((e, t) => (t.rationale && s(t.rationale) && (p = !0, e.push(t)), e), []));
2616
- return /* @__PURE__ */ O(Dn, {
2603
+ let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: s, displayType: l, language: u } = this.props, { extraCSSRules: d } = r || {}, f = n === "evaluate", p = !1, m = i && (c(i) || o(i)), h = a && (c(a) || o(a)), g = (Object.keys(s) || []).map((e) => (s[e] || []).reduce((e, t) => (t.rationale && c(t.rationale) && (p = !0, e.push(t)), e), []));
2604
+ return /* @__PURE__ */ O(On, {
2617
2605
  extraCSSRules: d,
2618
2606
  style: { display: `${l}` },
2619
2607
  children: [
2620
- n === "gather" && /* @__PURE__ */ D(Mn, { children: "Inline Dropdown Question" }),
2621
- h && /* @__PURE__ */ D(On, {
2608
+ n === "gather" && /* @__PURE__ */ D(Nn, { children: "Inline Dropdown Question" }),
2609
+ h && /* @__PURE__ */ D(kn, {
2622
2610
  labels: {
2623
2611
  hidden: "Show Teacher Instructions",
2624
2612
  visible: "Hide Teacher Instructions"
@@ -2632,21 +2620,21 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
2632
2620
  onToggle: this.toggleShowCorrect,
2633
2621
  language: u
2634
2622
  }),
2635
- /* @__PURE__ */ D(Sn, {
2623
+ /* @__PURE__ */ D(Cn, {
2636
2624
  ...this.props,
2637
2625
  showCorrectAnswer: e
2638
2626
  }),
2639
- p && /* @__PURE__ */ D(On, {
2627
+ p && /* @__PURE__ */ D(kn, {
2640
2628
  labels: {
2641
2629
  hidden: "Show Rationale for choices",
2642
2630
  visible: "Hide Rationale for choices"
2643
2631
  },
2644
- children: g.map((e, t) => /* @__PURE__ */ D(kn, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ O(An, { children: [/* @__PURE__ */ D(jn, {
2632
+ children: g.map((e, t) => /* @__PURE__ */ D(An, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ O(jn, { children: [/* @__PURE__ */ D(Mn, {
2645
2633
  correct: e.correct,
2646
2634
  dangerouslySetInnerHTML: { __html: `${e.label}: ` }
2647
2635
  }), /* @__PURE__ */ D(Q, { prompt: e.rationale })] }, e.label)) }, t))
2648
2636
  }),
2649
- m && /* @__PURE__ */ D(wn, {
2637
+ m && /* @__PURE__ */ D(Tn, {
2650
2638
  labels: {
2651
2639
  hidden: "Show Rationale",
2652
2640
  visible: "Hide Rationale"
@@ -2656,7 +2644,7 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
2656
2644
  ]
2657
2645
  });
2658
2646
  }
2659
- }, Pn = class extends HTMLElement {
2647
+ }, Fn = class extends HTMLElement {
2660
2648
  constructor() {
2661
2649
  super(), this._model = null, this._session = null, this._root = null;
2662
2650
  }
@@ -2675,7 +2663,7 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
2675
2663
  }
2676
2664
  _render = () => {
2677
2665
  if (this._model && this._session) {
2678
- let e = C.createElement(Nn, {
2666
+ let e = C.createElement(Pn, {
2679
2667
  model: this._model,
2680
2668
  prompt: this._model.prompt,
2681
2669
  rationale: this._model.rationale,
@@ -2691,7 +2679,7 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
2691
2679
  onChange: this.changeSession
2692
2680
  });
2693
2681
  this.setLangAttribute(), this._root ||= T(this), this._root.render(e), queueMicrotask(() => {
2694
- n(this);
2682
+ r(this);
2695
2683
  });
2696
2684
  }
2697
2685
  };
@@ -2705,10 +2693,10 @@ var Cn = Z(i, "UiLayout") || Z($.UiLayout, "UiLayout"), Q = Z(p, "PreviewPrompt"
2705
2693
  this.setAttribute("aria-label", "Inline Dropdown Question"), this.setAttribute("role", "region"), this._render();
2706
2694
  }
2707
2695
  disconnectedCallback() {
2708
- this._root && this._root.unmount();
2696
+ this._root &&= (this._root.unmount(), null);
2709
2697
  }
2710
2698
  };
2711
2699
  //#endregion
2712
- export { Pn as default };
2700
+ export { Fn as default };
2713
2701
 
2714
2702
  //# sourceMappingURL=index.js.map