@pretextbook/web-editor 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as ce from "react";
2
- import Be, { useContext as ao, useState as vt, useRef as Me, useEffect as He, memo as lo, useCallback as qa, createRef as q1, createContext as Jd, createElement as W1, version as G0, useDebugValue as Yd, forwardRef as U1, useLayoutEffect as G1 } from "react";
2
+ import Be, { useContext as ao, useState as yt, useRef as Ce, useEffect as He, memo as lo, useCallback as qa, createRef as q1, createContext as Jd, createElement as W1, version as G0, useDebugValue as Yd, forwardRef as U1, useLayoutEffect as G1 } from "react";
3
3
  import K1, { flushSync as J1, createPortal as Xd } from "react-dom";
4
4
  var Yi = { exports: {} }, si = {};
5
5
  var K0;
@@ -232,7 +232,7 @@ React keys must be passed directly to JSX without using spread:
232
232
  var X, me = {}, Q = h.react_stack_bottom_frame.bind(
233
233
  h,
234
234
  s
235
- )(), we = W(n(s)), C = {};
235
+ )(), xe = W(n(s)), C = {};
236
236
  oi.Fragment = y, oi.jsx = function(x, R, V) {
237
237
  var q = 1e4 > re.recentlyCreatedOwnerStacks++;
238
238
  return c(
@@ -241,7 +241,7 @@ React keys must be passed directly to JSX without using spread:
241
241
  V,
242
242
  !1,
243
243
  q ? Error("react-stack-top-frame") : Q,
244
- q ? W(n(x)) : we
244
+ q ? W(n(x)) : xe
245
245
  );
246
246
  }, oi.jsxs = function(x, R, V) {
247
247
  var q = 1e4 > re.recentlyCreatedOwnerStacks++;
@@ -251,7 +251,7 @@ React keys must be passed directly to JSX without using spread:
251
251
  V,
252
252
  !0,
253
253
  q ? Error("react-stack-top-frame") : Q,
254
- q ? W(n(x)) : we
254
+ q ? W(n(x)) : xe
255
255
  );
256
256
  };
257
257
  })()), oi;
@@ -426,7 +426,7 @@ function X0(r, e) {
426
426
  for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
427
427
  return n;
428
428
  }
429
- var ke = /* @__PURE__ */ (function() {
429
+ var Te = /* @__PURE__ */ (function() {
430
430
  function r() {
431
431
  Qd(this, r);
432
432
  }
@@ -1261,8 +1261,8 @@ var ke = /* @__PURE__ */ (function() {
1261
1261
  }
1262
1262
  }]);
1263
1263
  })();
1264
- Bl(ke, "DATA_PROPS", ["data-"]);
1265
- Bl(ke, "ARIA_PROPS", ["aria", "focus-target"]);
1264
+ Bl(Te, "DATA_PROPS", ["data-"]);
1265
+ Bl(Te, "ARIA_PROPS", ["aria", "focus-target"]);
1266
1266
  function Z0(r, e) {
1267
1267
  var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
1268
1268
  if (!t) {
@@ -2021,7 +2021,7 @@ var iu = function(e) {
2021
2021
  }, su = function(e) {
2022
2022
  var t = e.target, n = t === void 0 ? "document" : t, i = e.type, s = e.listener, o = e.options, a = e.when, l = a === void 0 ? !0 : a, u = ce.useRef(null), c = ce.useRef(null), d = iu(s), f = iu(o), h = function() {
2023
2023
  var k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, E = k.target;
2024
- Ee.isNotEmpty(E) && (m(), (k.when || l) && (u.current = ke.getTargetElement(E))), !c.current && u.current && (c.current = function(I) {
2024
+ Ee.isNotEmpty(E) && (m(), (k.when || l) && (u.current = Te.getTargetElement(E))), !c.current && u.current && (c.current = function(I) {
2025
2025
  return s && s(I);
2026
2026
  }, u.current.addEventListener(i, c.current, o));
2027
2027
  }, m = function() {
@@ -2029,7 +2029,7 @@ var iu = function(e) {
2029
2029
  }, v = function() {
2030
2030
  m(), d = null, f = null;
2031
2031
  }, y = ce.useCallback(function() {
2032
- l ? u.current = ke.getTargetElement(n) : (m(), u.current = null);
2032
+ l ? u.current = Te.getTargetElement(n) : (m(), u.current = null);
2033
2033
  }, [n, l]);
2034
2034
  return ce.useEffect(function() {
2035
2035
  y();
@@ -2053,7 +2053,7 @@ var iu = function(e) {
2053
2053
  return t.current = !0, e && e();
2054
2054
  }, []);
2055
2055
  }, wg = 0, Xi = function(e) {
2056
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = vt(!1), i = yg(n, 2), s = i[0], o = i[1], a = Me(null), l = ao(Fl), u = ke.isClient() ? window.document : void 0, c = t.document, d = c === void 0 ? u : c, f = t.manual, h = f === void 0 ? !1 : f, m = t.name, v = m === void 0 ? "style_".concat(++wg) : m, y = t.id, w = y === void 0 ? void 0 : y, k = t.media, E = k === void 0 ? void 0 : k, I = function(z) {
2056
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = yt(!1), i = yg(n, 2), s = i[0], o = i[1], a = Ce(null), l = ao(Fl), u = Te.isClient() ? window.document : void 0, c = t.document, d = c === void 0 ? u : c, f = t.manual, h = f === void 0 ? !1 : f, m = t.name, v = m === void 0 ? "style_".concat(++wg) : m, y = t.id, w = y === void 0 ? void 0 : y, k = t.media, E = k === void 0 ? void 0 : k, I = function(z) {
2057
2057
  var $ = z.querySelector('style[data-primereact-style-id="'.concat(v, '"]'));
2058
2058
  if ($)
2059
2059
  return $;
@@ -2068,10 +2068,10 @@ var iu = function(e) {
2068
2068
  }, N = function() {
2069
2069
  if (!(!d || s)) {
2070
2070
  var z = l?.styleContainer || d.head;
2071
- a.current = I(z), a.current.isConnected || (a.current.type = "text/css", w && (a.current.id = w), E && (a.current.media = E), ke.addNonce(a.current, l && l.nonce || uo.nonce), z.appendChild(a.current), v && a.current.setAttribute("data-primereact-style-id", v)), a.current.textContent = e, o(!0);
2071
+ a.current = I(z), a.current.isConnected || (a.current.type = "text/css", w && (a.current.id = w), E && (a.current.media = E), Te.addNonce(a.current, l && l.nonce || uo.nonce), z.appendChild(a.current), v && a.current.setAttribute("data-primereact-style-id", v)), a.current.textContent = e, o(!0);
2072
2072
  }
2073
2073
  }, D = function() {
2074
- !d || !a.current || (ke.removeInlineStyle(a.current), o(!1));
2074
+ !d || !a.current || (Te.removeInlineStyle(a.current), o(!1));
2075
2075
  };
2076
2076
  return He(function() {
2077
2077
  h || N();
@@ -2598,8 +2598,8 @@ svg.p-icon g,
2598
2598
  var v = f, y = /./g.test(v) && !!h[v.split(".")[0]], w = y ? Ee.toFlatCase(v.split(".")[1]) : Ee.toFlatCase(v), k = h.hostName && Ee.toFlatCase(h.hostName), E = k || h.props && h.props.__TYPE && Ee.toFlatCase(h.props.__TYPE) || "", I = w === "transition", O = "data-pc-", N = function(Q) {
2599
2599
  return Q != null && Q.props ? Q.hostName ? Q.props.__TYPE === Q.hostName ? Q.props : N(Q.parent) : Q.parent : void 0;
2600
2600
  }, D = function(Q) {
2601
- var we, C;
2602
- return ((we = h.props) === null || we === void 0 ? void 0 : we[Q]) || ((C = N(h)) === null || C === void 0 ? void 0 : C[Q]);
2601
+ var xe, C;
2602
+ return ((xe = h.props) === null || xe === void 0 ? void 0 : xe[Q]) || ((C = N(h)) === null || C === void 0 ? void 0 : C[Q]);
2603
2603
  };
2604
2604
  _e.cParams = h, _e.cName = E;
2605
2605
  var L = D("ptOptions") || _e.context.ptOptions || {}, z = L.mergeSections, $ = z === void 0 ? !0 : z, ee = L.mergeProps, re = ee === void 0 ? !1 : ee, ue = function() {
@@ -2957,14 +2957,14 @@ var Xa = function() {
2957
2957
  props: i,
2958
2958
  state: {
2959
2959
  panelSizes: D,
2960
- nested: ke.getAttribute(o.current && o.current.parentElement, "data-p-splitter-panel-nested") === !0
2960
+ nested: Te.getAttribute(o.current && o.current.parentElement, "data-p-splitter-panel-nested") === !0
2961
2961
  }
2962
- }, Q = Qi.setMetaData(Yo({}, me)), we = Q.ptm, C = Q.cx, x = Q.isUnstyled;
2962
+ }, Q = Qi.setMetaData(Yo({}, me)), xe = Q.ptm, C = Q.cx, x = Q.isUnstyled;
2963
2963
  zg(Qi.css.styles, x, {
2964
2964
  name: "splitter"
2965
2965
  });
2966
2966
  var R = function(U) {
2967
- return we(U, {
2967
+ return xe(U, {
2968
2968
  context: {
2969
2969
  nested: ee
2970
2970
  }
@@ -3003,24 +3003,24 @@ var Xa = function() {
3003
3003
  }, an = ce.useCallback(function() {
3004
3004
  var be = Cn().getItem(i.stateKey);
3005
3005
  be && L(JSON.parse(be));
3006
- }, [Cn, i.stateKey]), Nr = function(U, Z, xe) {
3006
+ }, [Cn, i.stateKey]), Nr = function(U, Z, Se) {
3007
3007
  var Dr = U.type === "touchstart" ? U.touches[0].pageX : U.pageX, Rr = U.type === "touchstart" ? U.touches[0].pageY : U.pageY;
3008
- a.current = l.current[Z], u.current = X ? ke.getWidth(o.current) : ke.getHeight(o.current), c.current = !0, d.current = X ? Dr : Rr, f.current = a.current.previousElementSibling, h.current = a.current.nextElementSibling, xe ? (m.current = X ? ke.getOuterWidth(f.current, !0) : ke.getOuterHeight(f.current, !0), w.current = X ? ke.getOuterWidth(h.current, !0) : ke.getOuterHeight(h.current, !0)) : (m.current = 100 * (X ? ke.getOuterWidth(f.current, !0) : ke.getOuterHeight(f.current, !0)) / u.current, w.current = 100 * (X ? ke.getOuterWidth(h.current, !0) : ke.getOuterHeight(h.current, !0)) / u.current), y.current = m.current, k.current = w.current, E.current = Z, !x() && ke.addClass(a.current, "p-splitter-gutter-resizing"), a.current.setAttribute("data-p-splitter-gutter-resizing", !0), !x() && ke.addClass(o.current, "p-splitter-resizing"), o.current.setAttribute("data-p-splitter-resizing", !0);
3008
+ a.current = l.current[Z], u.current = X ? Te.getWidth(o.current) : Te.getHeight(o.current), c.current = !0, d.current = X ? Dr : Rr, f.current = a.current.previousElementSibling, h.current = a.current.nextElementSibling, Se ? (m.current = X ? Te.getOuterWidth(f.current, !0) : Te.getOuterHeight(f.current, !0), w.current = X ? Te.getOuterWidth(h.current, !0) : Te.getOuterHeight(h.current, !0)) : (m.current = 100 * (X ? Te.getOuterWidth(f.current, !0) : Te.getOuterHeight(f.current, !0)) / u.current, w.current = 100 * (X ? Te.getOuterWidth(h.current, !0) : Te.getOuterHeight(h.current, !0)) / u.current), y.current = m.current, k.current = w.current, E.current = Z, !x() && Te.addClass(a.current, "p-splitter-gutter-resizing"), a.current.setAttribute("data-p-splitter-gutter-resizing", !0), !x() && Te.addClass(o.current, "p-splitter-resizing"), o.current.setAttribute("data-p-splitter-resizing", !0);
3009
3009
  }, jo = function(U) {
3010
- var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, xe = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, Dr, Rr, En, Go = U.type === "touchmove" ? U.touches[0].pageX : U.pageX, Ko = U.type === "touchmove" ? U.touches[0].pageY : U.pageY;
3011
- xe ? X ? (En = 100 * (m.current + Z) / u.current, Rr = 100 * (w.current - Z) / u.current) : (En = 100 * (m.current - Z) / u.current, Rr = 100 * (w.current + Z) / u.current) : (X ? Dr = Go * 100 / u.current - d.current * 100 / u.current : Dr = Ko * 100 / u.current - d.current * 100 / u.current, En = m.current + Dr, Rr = w.current - Dr), ni(E.current, En, Rr);
3010
+ var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, Se = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, Dr, Rr, En, Go = U.type === "touchmove" ? U.touches[0].pageX : U.pageX, Ko = U.type === "touchmove" ? U.touches[0].pageY : U.pageY;
3011
+ Se ? X ? (En = 100 * (m.current + Z) / u.current, Rr = 100 * (w.current - Z) / u.current) : (En = 100 * (m.current - Z) / u.current, Rr = 100 * (w.current + Z) / u.current) : (X ? Dr = Go * 100 / u.current - d.current * 100 / u.current : Dr = Ko * 100 / u.current - d.current * 100 / u.current, En = m.current + Dr, Rr = w.current - Dr), ni(E.current, En, Rr);
3012
3012
  }, qo = function(U) {
3013
3013
  var Z = lu(D);
3014
3014
  Z[E.current] = y.current, Z[E.current + 1] = k.current, i.onResizeEnd && i.onResizeEnd({
3015
3015
  originalEvent: U,
3016
3016
  sizes: Z
3017
- }), ue && ri(Z), L(Z), !x() && ke.removeClass(a.current, "p-splitter-gutter-resizing"), l.current && Object.keys(l.current).forEach(function(xe) {
3018
- return l.current[xe].setAttribute("data-p-splitter-gutter-resizing", !1);
3019
- }), !x() && ke.removeClass(o.current, "p-splitter-resizing"), o.current.setAttribute("data-p-splitter-resizing", !1), Ki();
3017
+ }), ue && ri(Z), L(Z), !x() && Te.removeClass(a.current, "p-splitter-gutter-resizing"), l.current && Object.keys(l.current).forEach(function(Se) {
3018
+ return l.current[Se].setAttribute("data-p-splitter-gutter-resizing", !1);
3019
+ }), !x() && Te.removeClass(o.current, "p-splitter-resizing"), o.current.setAttribute("data-p-splitter-resizing", !1), Ki();
3020
3020
  }, I1 = function() {
3021
3021
  L1(), qo();
3022
3022
  }, P1 = function(U, Z) {
3023
- var xe = i.children[Z].props && i.children[Z].props.minSize || 0;
3023
+ var Se = i.children[Z].props && i.children[Z].props.minSize || 0;
3024
3024
  switch (U.code) {
3025
3025
  case "ArrowLeft": {
3026
3026
  X && Ji(U, Z, i.step * -1), U.preventDefault();
@@ -3039,26 +3039,26 @@ var Xa = function() {
3039
3039
  break;
3040
3040
  }
3041
3041
  case "Home": {
3042
- ni(Z, 100 - xe, xe), U.preventDefault();
3042
+ ni(Z, 100 - Se, Se), U.preventDefault();
3043
3043
  break;
3044
3044
  }
3045
3045
  case "End": {
3046
- ni(Z, xe, 100 - xe), U.preventDefault();
3046
+ ni(Z, Se, 100 - Se), U.preventDefault();
3047
3047
  break;
3048
3048
  }
3049
3049
  case "NumpadEnter":
3050
3050
  case "Enter": {
3051
- v.current >= 100 - (xe || 5) ? ni(Z, xe, 100 - xe) : ni(Z, 100 - xe, xe), U.preventDefault();
3051
+ v.current >= 100 - (Se || 5) ? ni(Z, Se, 100 - Se) : ni(Z, 100 - Se, Se), U.preventDefault();
3052
3052
  break;
3053
3053
  }
3054
3054
  }
3055
- }, ni = function(U, Z, xe) {
3056
- E.current = U, a.current = l.current[U], u.current = X ? ke.getWidth(o.current) : ke.getHeight(o.current), f.current = a.current.previousElementSibling, h.current = a.current.nextElementSibling, ti(Z, xe) && (y.current = Z, k.current = xe, f.current.style.flexBasis = "calc(" + Z + "% - " + (i.children.length - 1) * i.gutterSize + "px)", h.current.style.flexBasis = "calc(" + xe + "% - " + (i.children.length - 1) * i.gutterSize + "px)", v.current = parseFloat(Z).toFixed(4));
3057
- }, z1 = function(U, Z, xe) {
3058
- Nr(U, Z, !0), jo(U, xe, !0);
3059
- }, Ji = function(U, Z, xe) {
3055
+ }, ni = function(U, Z, Se) {
3056
+ E.current = U, a.current = l.current[U], u.current = X ? Te.getWidth(o.current) : Te.getHeight(o.current), f.current = a.current.previousElementSibling, h.current = a.current.nextElementSibling, ti(Z, Se) && (y.current = Z, k.current = Se, f.current.style.flexBasis = "calc(" + Z + "% - " + (i.children.length - 1) * i.gutterSize + "px)", h.current.style.flexBasis = "calc(" + Se + "% - " + (i.children.length - 1) * i.gutterSize + "px)", v.current = parseFloat(Z).toFixed(4));
3057
+ }, z1 = function(U, Z, Se) {
3058
+ Nr(U, Z, !0), jo(U, Se, !0);
3059
+ }, Ji = function(U, Z, Se) {
3060
3060
  I.current || (I.current = setInterval(function() {
3061
- z1(U, Z, xe);
3061
+ z1(U, Z, Se);
3062
3062
  }, 40));
3063
3063
  }, L1 = function() {
3064
3064
  I.current && (clearInterval(I.current), I.current = null);
@@ -3085,16 +3085,16 @@ var Xa = function() {
3085
3085
  o.current && (s.current = ug());
3086
3086
  }), ce.useEffect(function() {
3087
3087
  var be = lu(o.current.children).filter(function(Z) {
3088
- return ke.getAttribute(Z, "data-pc-section") === "splitterpanel.root";
3088
+ return Te.getAttribute(Z, "data-pc-section") === "splitterpanel.root";
3089
3089
  }), U = [];
3090
- be.map(function(Z, xe) {
3091
- v.current = W(D, 0), U[xe] = W(D, xe), Z.childNodes && Ee.isNotEmpty(ke.find(Z, "[data-pc-name='splitter']") && ke.find(Z, "[data-pc-section='root']")) && (!x() && ke.addClass(Z, "p-splitter-panel-nested"), Z.setAttribute("data-p-splitter-panel-nested", !0), re(!0));
3090
+ be.map(function(Z, Se) {
3091
+ v.current = W(D, 0), U[Se] = W(D, Se), Z.childNodes && Ee.isNotEmpty(Te.find(Z, "[data-pc-name='splitter']") && Te.find(Z, "[data-pc-section='root']")) && (!x() && Te.addClass(Z, "p-splitter-panel-nested"), Z.setAttribute("data-p-splitter-panel-nested", !0), re(!0));
3092
3092
  }), L(U);
3093
3093
  }, []), ce.useEffect(function() {
3094
3094
  ue && an();
3095
3095
  }, [an, ue]);
3096
3096
  var $1 = function(U, Z) {
3097
- var xe = Ht(U, "id") || "".concat(s.current, "_").concat(Z), Dr = wi(Ht(U, "className"), C("panel.root")), Rr = t({
3097
+ var Se = Ht(U, "id") || "".concat(s.current, "_").concat(Z), Dr = wi(Ht(U, "className"), C("panel.root")), Rr = t({
3098
3098
  ref: function(Vt) {
3099
3099
  return l.current[Z] = Vt;
3100
3100
  },
@@ -3121,21 +3121,21 @@ var Xa = function() {
3121
3121
  return Uo(Vt);
3122
3122
  },
3123
3123
  "data-p-splitter-gutter-resizing": !1
3124
- }, we("gutter")), En = t({
3124
+ }, xe("gutter")), En = t({
3125
3125
  tabIndex: Ht(U, "tabIndex") || 0,
3126
3126
  className: C("gutterHandler"),
3127
3127
  role: "separator",
3128
3128
  "aria-orientation": X ? "vertical" : "horizontal",
3129
- "aria-controls": xe,
3129
+ "aria-controls": Se,
3130
3130
  "aria-label": Ht(U, "aria-label"),
3131
3131
  "aria-labelledby": Ht(U, "aria-labelledby"),
3132
3132
  "aria-valuenow": v.current,
3133
3133
  "aria-valuetext": parseFloat(v.current).toFixed(0) + "%",
3134
3134
  "aria-valuemin": Ht(U, "minSize") || "0",
3135
3135
  "aria-valuemax": "100"
3136
- }, we("gutterHandler")), Go = Z !== i.children.length - 1 && /* @__PURE__ */ ce.createElement("div", Rr, /* @__PURE__ */ ce.createElement("div", En)), Ko = "calc(" + W(D, Z) + "% - " + (te - 1) * i.gutterSize + "px)", j1 = t({
3136
+ }, xe("gutterHandler")), Go = Z !== i.children.length - 1 && /* @__PURE__ */ ce.createElement("div", Rr, /* @__PURE__ */ ce.createElement("div", En)), Ko = "calc(" + W(D, Z) + "% - " + (te - 1) * i.gutterSize + "px)", j1 = t({
3137
3137
  key: Z,
3138
- id: xe,
3138
+ id: Se,
3139
3139
  className: Dr,
3140
3140
  style: Yo(Yo({}, Ht(U, "style")), {}, {
3141
3141
  flexBasis: Ko
@@ -3152,7 +3152,7 @@ var Xa = function() {
3152
3152
  style: i.style,
3153
3153
  className: wi(i.className, C("root")),
3154
3154
  "data-p-splitter-resizing": !1
3155
- }, Qi.getOtherProps(i), we("root")), _1 = H1();
3155
+ }, Qi.getOtherProps(i), xe("root")), _1 = H1();
3156
3156
  return /* @__PURE__ */ ce.createElement("div", Ja({
3157
3157
  ref: o
3158
3158
  }, V1), _1);
@@ -3568,7 +3568,7 @@ function q4(r) {
3568
3568
  }
3569
3569
  var ph = q4;
3570
3570
  function W4(r, e, t = !0) {
3571
- let n = Me(!0);
3571
+ let n = Ce(!0);
3572
3572
  He(n.current || !t ? () => {
3573
3573
  n.current = !1;
3574
3574
  } : r, e);
@@ -3589,7 +3589,7 @@ function mh(r, e) {
3589
3589
  return r.Uri.parse(e);
3590
3590
  }
3591
3591
  function K4({ original: r, modified: e, language: t, originalLanguage: n, modifiedLanguage: i, originalModelPath: s, modifiedModelPath: o, keepCurrentOriginalModel: a = !1, keepCurrentModifiedModel: l = !1, theme: u = "light", loading: c = "Loading...", options: d = {}, height: f = "100%", width: h = "100%", className: m, wrapperProps: v = {}, beforeMount: y = pi, onMount: w = pi }) {
3592
- let [k, E] = vt(!1), [I, O] = vt(!0), N = Me(null), D = Me(null), L = Me(null), z = Me(w), $ = Me(y), ee = Me(!1);
3592
+ let [k, E] = yt(!1), [I, O] = yt(!0), N = Ce(null), D = Ce(null), L = Ce(null), z = Ce(w), $ = Ce(y), ee = Ce(!1);
3593
3593
  ph(() => {
3594
3594
  let W = hh.init();
3595
3595
  return W.then((X) => (D.current = X) && O(!1)).catch((X) => X?.type !== "cancelation" && console.error("Monaco initialization: error:", X)), () => N.current ? te() : W.cancel();
@@ -3638,14 +3638,14 @@ function K4({ original: r, modified: e, language: t, originalLanguage: n, modifi
3638
3638
  var J4 = K4;
3639
3639
  lo(J4);
3640
3640
  function Y4(r) {
3641
- let e = Me();
3641
+ let e = Ce();
3642
3642
  return He(() => {
3643
3643
  e.current = r;
3644
3644
  }, [r]), e.current;
3645
3645
  }
3646
3646
  var X4 = Y4, ts = /* @__PURE__ */ new Map();
3647
3647
  function Z4({ defaultValue: r, defaultLanguage: e, defaultPath: t, value: n, language: i, path: s, theme: o = "light", line: a, loading: l = "Loading...", options: u = {}, overrideServices: c = {}, saveViewState: d = !0, keepCurrentModel: f = !1, width: h = "100%", height: m = "100%", className: v, wrapperProps: y = {}, beforeMount: w = pi, onMount: k = pi, onChange: E, onValidate: I = pi }) {
3648
- let [O, N] = vt(!1), [D, L] = vt(!0), z = Me(null), $ = Me(null), ee = Me(null), re = Me(k), ue = Me(w), te = Me(), W = Me(n), X = X4(s), me = Me(!1), Q = Me(!1);
3648
+ let [O, N] = yt(!1), [D, L] = yt(!0), z = Ce(null), $ = Ce(null), ee = Ce(null), re = Ce(k), ue = Ce(w), te = Ce(), W = Ce(n), X = X4(s), me = Ce(!1), Q = Ce(!1);
3649
3649
  ph(() => {
3650
3650
  let x = hh.init();
3651
3651
  return x.then((R) => (z.current = R) && L(!1)).catch((R) => R?.type !== "cancelation" && console.error("Monaco initialization: error:", R)), () => $.current ? C() : x.cancel();
@@ -3664,7 +3664,7 @@ function Z4({ defaultValue: r, defaultLanguage: e, defaultPath: t, value: n, lan
3664
3664
  }, [a], O), Tt(() => {
3665
3665
  z.current?.editor.setTheme(o);
3666
3666
  }, [o], O);
3667
- let we = qa(() => {
3667
+ let xe = qa(() => {
3668
3668
  if (!(!ee.current || !z.current) && !me.current) {
3669
3669
  ue.current(z.current);
3670
3670
  let x = s || t, R = Pn(z.current, n || r || "", e || i || "", x || "");
@@ -3674,8 +3674,8 @@ function Z4({ defaultValue: r, defaultLanguage: e, defaultPath: t, value: n, lan
3674
3674
  He(() => {
3675
3675
  O && re.current($.current, z.current);
3676
3676
  }, [O]), He(() => {
3677
- !D && !O && we();
3678
- }, [D, O, we]), W.current = n, He(() => {
3677
+ !D && !O && xe();
3678
+ }, [D, O, xe]), W.current = n, He(() => {
3679
3679
  O && E && (te.current?.dispose(), te.current = $.current?.onDidChangeModelContent((x) => {
3680
3680
  Q.current || E($.current.getValue(), x);
3681
3681
  }));
@@ -3709,7 +3709,7 @@ const t2 = {
3709
3709
  tabSize: 2,
3710
3710
  padding: { top: 10, bottom: 10 }
3711
3711
  }, r2 = ({ content: r, onChange: e }) => {
3712
- const t = Me(null), n = Me(null), i = Me(null), [, s] = vt(!1), [, o] = vt(!1);
3712
+ const t = Ce(null), n = Ce(null), i = Ce(null), [, s] = yt(!1), [, o] = yt(!1);
3713
3713
  He(() => () => {
3714
3714
  n.current?.dispose?.(), i.current && clearTimeout(i.current);
3715
3715
  }, []);
@@ -9421,9 +9421,9 @@ function Tv(r, e, t) {
9421
9421
  return { node: n.startContainer, offset: Math.min(It(n.startContainer), n.startOffset) };
9422
9422
  }
9423
9423
  }
9424
- const tr = typeof navigator < "u" ? navigator : null, Bu = typeof document < "u" ? document : null, nn = tr && tr.userAgent || "", ol = /Edge\/(\d+)/.exec(nn), cf = /MSIE \d/.exec(nn), al = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nn), yt = !!(cf || al || ol), Ur = cf ? document.documentMode : al ? +al[1] : ol ? +ol[1] : 0, zt = !yt && /gecko\/(\d+)/i.test(nn);
9424
+ const tr = typeof navigator < "u" ? navigator : null, Bu = typeof document < "u" ? document : null, nn = tr && tr.userAgent || "", ol = /Edge\/(\d+)/.exec(nn), cf = /MSIE \d/.exec(nn), al = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nn), bt = !!(cf || al || ol), Ur = cf ? document.documentMode : al ? +al[1] : ol ? +ol[1] : 0, zt = !bt && /gecko\/(\d+)/i.test(nn);
9425
9425
  zt && +(/Firefox\/(\d+)/.exec(nn) || [0, 0])[1];
9426
- const ll = !yt && /Chrome\/(\d+)/.exec(nn), Ze = !!ll, df = ll ? +ll[1] : 0, ot = !yt && !!tr && /Apple Computer/.test(tr.vendor), jn = ot && (/Mobile\/\w+/.test(nn) || !!tr && tr.maxTouchPoints > 2), Rt = jn || (tr ? /Mac/.test(tr.platform) : !1), hf = tr ? /Win/.test(tr.platform) : !1, mr = /Android \d/.test(nn), $i = !!Bu && "webkitFontSmoothing" in Bu.documentElement.style, Mv = $i ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
9426
+ const ll = !bt && /Chrome\/(\d+)/.exec(nn), Ze = !!ll, df = ll ? +ll[1] : 0, ot = !bt && !!tr && /Apple Computer/.test(tr.vendor), jn = ot && (/Mobile\/\w+/.test(nn) || !!tr && tr.maxTouchPoints > 2), Rt = jn || (tr ? /Mac/.test(tr.platform) : !1), hf = tr ? /Win/.test(tr.platform) : !1, mr = /Android \d/.test(nn), $i = !!Bu && "webkitFontSmoothing" in Bu.documentElement.style, Mv = $i ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
9427
9427
  function Cv(r) {
9428
9428
  let e = r.defaultView && r.defaultView.visualViewport;
9429
9429
  return e ? {
@@ -10872,7 +10872,7 @@ function Xv(r) {
10872
10872
  if (!e)
10873
10873
  return;
10874
10874
  let t = r.cursorWrapper.dom, n = t.nodeName == "IMG";
10875
- n ? e.collapse(t.parentNode, rt(t) + 1) : e.collapse(t, 0), !n && !r.state.selection.visible && yt && Ur <= 11 && (t.disabled = !0, t.disabled = !1);
10875
+ n ? e.collapse(t.parentNode, rt(t) + 1) : e.collapse(t, 0), !n && !r.state.selection.visible && bt && Ur <= 11 && (t.disabled = !0, t.disabled = !1);
10876
10876
  }
10877
10877
  function Mf(r, e) {
10878
10878
  if (e instanceof ie) {
@@ -11346,17 +11346,17 @@ function d5(r, e) {
11346
11346
  }
11347
11347
  return new G(i, s, o);
11348
11348
  }
11349
- const ht = {}, ft = {}, h5 = { touchstart: !0, touchmove: !0 };
11349
+ const ft = {}, pt = {}, h5 = { touchstart: !0, touchmove: !0 };
11350
11350
  class f5 {
11351
11351
  constructor() {
11352
11352
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
11353
11353
  }
11354
11354
  }
11355
11355
  function p5(r) {
11356
- for (let e in ht) {
11357
- let t = ht[e];
11356
+ for (let e in ft) {
11357
+ let t = ft[e];
11358
11358
  r.dom.addEventListener(e, r.input.eventHandlers[e] = (n) => {
11359
- g5(r, n) && !Zl(r, n) && (r.editable || !(n.type in ft)) && t(r, n);
11359
+ g5(r, n) && !Zl(r, n) && (r.editable || !(n.type in pt)) && t(r, n);
11360
11360
  }, h5[e] ? { passive: !0 } : void 0);
11361
11361
  }
11362
11362
  ot && r.dom.addEventListener("input", () => null), pl(r);
@@ -11393,9 +11393,9 @@ function g5(r, e) {
11393
11393
  return !0;
11394
11394
  }
11395
11395
  function v5(r, e) {
11396
- !Zl(r, e) && ht[e.type] && (r.editable || !(e.type in ft)) && ht[e.type](r, e);
11396
+ !Zl(r, e) && ft[e.type] && (r.editable || !(e.type in pt)) && ft[e.type](r, e);
11397
11397
  }
11398
- ft.keydown = (r, e) => {
11398
+ pt.keydown = (r, e) => {
11399
11399
  let t = e;
11400
11400
  if (r.input.shiftKey = t.keyCode == 16 || t.shiftKey, !zf(r, t) && (r.input.lastKeyCode = t.keyCode, r.input.lastKeyCodeTime = Date.now(), !(mr && Ze && t.keyCode == 13)))
11401
11401
  if (t.keyCode != 229 && r.domObserver.forceFlush(), jn && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
@@ -11405,10 +11405,10 @@ ft.keydown = (r, e) => {
11405
11405
  }, 200);
11406
11406
  } else r.someProp("handleKeyDown", (n) => n(r, t)) || s5(r, t) ? t.preventDefault() : Vr(r, "key");
11407
11407
  };
11408
- ft.keyup = (r, e) => {
11408
+ pt.keyup = (r, e) => {
11409
11409
  e.keyCode == 16 && (r.input.shiftKey = !1);
11410
11410
  };
11411
- ft.keypress = (r, e) => {
11411
+ pt.keypress = (r, e) => {
11412
11412
  let t = e;
11413
11413
  if (zf(r, t) || !t.charCode || t.ctrlKey && !t.altKey || Rt && t.metaKey)
11414
11414
  return;
@@ -11496,7 +11496,7 @@ function e0(r) {
11496
11496
  return qs(r);
11497
11497
  }
11498
11498
  const Pf = Rt ? "metaKey" : "ctrlKey";
11499
- ht.mousedown = (r, e) => {
11499
+ ft.mousedown = (r, e) => {
11500
11500
  let t = e;
11501
11501
  r.input.shiftKey = t.shiftKey;
11502
11502
  let n = e0(r), i = Date.now(), s = "singleClick";
@@ -11550,18 +11550,18 @@ class M5 {
11550
11550
  !this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
11551
11551
  }
11552
11552
  }
11553
- ht.touchstart = (r) => {
11553
+ ft.touchstart = (r) => {
11554
11554
  r.input.lastTouch = Date.now(), e0(r), Vr(r, "pointer");
11555
11555
  };
11556
- ht.touchmove = (r) => {
11556
+ ft.touchmove = (r) => {
11557
11557
  r.input.lastTouch = Date.now(), Vr(r, "pointer");
11558
11558
  };
11559
- ht.contextmenu = (r) => e0(r);
11559
+ ft.contextmenu = (r) => e0(r);
11560
11560
  function zf(r, e) {
11561
11561
  return r.composing ? !0 : ot && Math.abs(e.timeStamp - r.input.compositionEndedAt) < 500 ? (r.input.compositionEndedAt = -2e8, !0) : !1;
11562
11562
  }
11563
11563
  const C5 = mr ? 5e3 : -1;
11564
- ft.compositionstart = ft.compositionupdate = (r) => {
11564
+ pt.compositionstart = pt.compositionupdate = (r) => {
11565
11565
  if (!r.composing) {
11566
11566
  r.domObserver.flush();
11567
11567
  let { state: e } = r, t = e.selection.$to;
@@ -11592,7 +11592,7 @@ function E5(r) {
11592
11592
  let n = e.childNodes[t];
11593
11593
  return n.nodeType == 1 && n.contentEditable == "false";
11594
11594
  }
11595
- ft.compositionend = (r, e) => {
11595
+ pt.compositionend = (r, e) => {
11596
11596
  r.composing && (r.input.composing = !1, r.input.compositionEndedAt = e.timeStamp, r.input.compositionPendingChanges = r.domObserver.pendingRecords().length ? r.input.compositionID : 0, r.input.compositionNode = null, r.input.compositionPendingChanges && Promise.resolve().then(() => r.domObserver.flush()), r.input.compositionID++, Lf(r, 20));
11597
11597
  };
11598
11598
  function Lf(r, e) {
@@ -11644,8 +11644,8 @@ function N5(r, e) {
11644
11644
  t.parentNode && t.parentNode.removeChild(t), r.focus();
11645
11645
  }, 50);
11646
11646
  }
11647
- const Oi = yt && Ur < 15 || jn && Mv < 604;
11648
- ht.copy = ft.cut = (r, e) => {
11647
+ const Oi = bt && Ur < 15 || jn && Mv < 604;
11648
+ ft.copy = pt.cut = (r, e) => {
11649
11649
  let t = e, n = r.state.selection, i = t.type == "cut";
11650
11650
  if (n.empty)
11651
11651
  return;
@@ -11681,7 +11681,7 @@ function Ff(r) {
11681
11681
  let t = r.getData("text/uri-list");
11682
11682
  return t ? t.replace(/\r?\n/g, " ") : "";
11683
11683
  }
11684
- ft.paste = (r, e) => {
11684
+ pt.paste = (r, e) => {
11685
11685
  let t = e;
11686
11686
  if (r.composing && !mr)
11687
11687
  return;
@@ -11698,7 +11698,7 @@ function Hf(r, e) {
11698
11698
  let t = r.someProp("dragCopies", (n) => !n(e));
11699
11699
  return t ?? !e[I5];
11700
11700
  }
11701
- ht.dragstart = (r, e) => {
11701
+ ft.dragstart = (r, e) => {
11702
11702
  let t = e, n = r.input.mouseDown;
11703
11703
  if (n && n.done(), !t.dataTransfer)
11704
11704
  return;
@@ -11714,14 +11714,14 @@ ht.dragstart = (r, e) => {
11714
11714
  let a = (o || r.state.selection).content(), { dom: l, text: u, slice: c } = Xl(r, a);
11715
11715
  (!t.dataTransfer.files.length || !Ze || df > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Oi ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Oi || t.dataTransfer.setData("text/plain", u), r.dragging = new $f(c, Hf(r, t), o);
11716
11716
  };
11717
- ht.dragend = (r) => {
11717
+ ft.dragend = (r) => {
11718
11718
  let e = r.dragging;
11719
11719
  window.setTimeout(() => {
11720
11720
  r.dragging == e && (r.dragging = null);
11721
11721
  }, 50);
11722
11722
  };
11723
- ft.dragover = ft.dragenter = (r, e) => e.preventDefault();
11724
- ft.drop = (r, e) => {
11723
+ pt.dragover = pt.dragenter = (r, e) => e.preventDefault();
11724
+ pt.drop = (r, e) => {
11725
11725
  try {
11726
11726
  P5(r, e, r.dragging);
11727
11727
  } finally {
@@ -11765,16 +11765,16 @@ function P5(r, e, t) {
11765
11765
  }
11766
11766
  r.focus(), r.dispatch(l.setMeta("uiEvent", "drop"));
11767
11767
  }
11768
- ht.focus = (r) => {
11768
+ ft.focus = (r) => {
11769
11769
  r.input.lastFocus = Date.now(), r.focused || (r.domObserver.stop(), r.dom.classList.add("ProseMirror-focused"), r.domObserver.start(), r.focused = !0, setTimeout(() => {
11770
11770
  r.docView && r.hasFocus() && !r.domObserver.currentSelection.eq(r.domSelectionRange()) && yr(r);
11771
11771
  }, 20));
11772
11772
  };
11773
- ht.blur = (r, e) => {
11773
+ ft.blur = (r, e) => {
11774
11774
  let t = e;
11775
11775
  r.focused && (r.domObserver.stop(), r.dom.classList.remove("ProseMirror-focused"), r.domObserver.start(), t.relatedTarget && r.dom.contains(t.relatedTarget) && r.domObserver.currentSelection.clear(), r.focused = !1);
11776
11776
  };
11777
- ht.beforeinput = (r, e) => {
11777
+ ft.beforeinput = (r, e) => {
11778
11778
  if (Ze && mr && e.inputType == "deleteContentBackward") {
11779
11779
  r.domObserver.flushSoon();
11780
11780
  let { domChangeCount: n } = r.input;
@@ -11786,8 +11786,8 @@ ht.beforeinput = (r, e) => {
11786
11786
  }, 50);
11787
11787
  }
11788
11788
  };
11789
- for (let r in ft)
11790
- ht[r] = ft[r];
11789
+ for (let r in pt)
11790
+ ft[r] = pt[r];
11791
11791
  function Di(r, e) {
11792
11792
  if (r == e)
11793
11793
  return !0;
@@ -12303,7 +12303,7 @@ const B5 = {
12303
12303
  attributes: !0,
12304
12304
  attributeOldValue: !0,
12305
12305
  subtree: !0
12306
- }, F5 = yt && Ur <= 11;
12306
+ }, F5 = bt && Ur <= 11;
12307
12307
  class $5 {
12308
12308
  constructor() {
12309
12309
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
@@ -12323,7 +12323,7 @@ class H5 {
12323
12323
  this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new $5(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((n) => {
12324
12324
  for (let i = 0; i < n.length; i++)
12325
12325
  this.queue.push(n[i]);
12326
- yt && Ur <= 11 && n.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
12326
+ bt && Ur <= 11 && n.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
12327
12327
  }), F5 && (this.onCharData = (n) => {
12328
12328
  this.queue.push({ target: n.target, type: "characterData", oldValue: n.prevValue }), this.flushSoon();
12329
12329
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
@@ -12364,7 +12364,7 @@ class H5 {
12364
12364
  if (Yu(this.view)) {
12365
12365
  if (this.suppressingSelectionUpdates)
12366
12366
  return yr(this.view);
12367
- if (yt && Ur <= 11 && !this.view.state.selection.empty) {
12367
+ if (bt && Ur <= 11 && !this.view.state.selection.empty) {
12368
12368
  let e = this.view.domSelectionRange();
12369
12369
  if (e.focusNode && wn(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
12370
12370
  return this.flushSoon();
@@ -12448,7 +12448,7 @@ class H5 {
12448
12448
  if (n.contentDOM && n.contentDOM != n.dom && !n.contentDOM.contains(e.target))
12449
12449
  return { from: n.posBefore, to: n.posAfter };
12450
12450
  let i = e.previousSibling, s = e.nextSibling;
12451
- if (yt && Ur <= 11 && e.addedNodes.length)
12451
+ if (bt && Ur <= 11 && e.addedNodes.length)
12452
12452
  for (let c = 0; c < e.addedNodes.length; c++) {
12453
12453
  let { previousSibling: d, nextSibling: f } = e.addedNodes[c];
12454
12454
  (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (i = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
@@ -12576,7 +12576,7 @@ function G5(r, e, t, n, i) {
12576
12576
  }
12577
12577
  return;
12578
12578
  }
12579
- r.state.selection.from < r.state.selection.to && m.start == m.endB && r.state.selection instanceof de && (m.start > r.state.selection.from && m.start <= r.state.selection.from + 2 && r.state.selection.from >= u.from ? m.start = r.state.selection.from : m.endA < r.state.selection.to && m.endA >= r.state.selection.to - 2 && r.state.selection.to <= u.to && (m.endB += r.state.selection.to - m.endA, m.endA = r.state.selection.to)), yt && Ur <= 11 && m.endB == m.start + 1 && m.endA == m.start && m.start > u.from && u.doc.textBetween(m.start - u.from - 1, m.start - u.from + 1) == "  " && (m.start--, m.endA--, m.endB--);
12579
+ r.state.selection.from < r.state.selection.to && m.start == m.endB && r.state.selection instanceof de && (m.start > r.state.selection.from && m.start <= r.state.selection.from + 2 && r.state.selection.from >= u.from ? m.start = r.state.selection.from : m.endA < r.state.selection.to && m.endA >= r.state.selection.to - 2 && r.state.selection.to <= u.to && (m.endB += r.state.selection.to - m.endA, m.endA = r.state.selection.to)), bt && Ur <= 11 && m.endB == m.start + 1 && m.endA == m.start && m.start > u.from && u.doc.textBetween(m.start - u.from - 1, m.start - u.from + 1) == "  " && (m.start--, m.endA--, m.endB--);
12580
12580
  let v = u.doc.resolveNoCache(m.start - u.from), y = u.doc.resolveNoCache(m.endB - u.from), w = c.resolve(m.start), k = v.sameParent(y) && v.parent.inlineContent && w.end() >= m.endA;
12581
12581
  if ((jn && r.input.lastIOSEnter > Date.now() - 225 && (!k || i.some((D) => D.nodeName == "DIV" || D.nodeName == "P")) || !k && v.pos < u.doc.content.size && (!v.sameParent(y) || !v.parent.inlineContent) && v.pos < y.pos && !/\S/.test(u.doc.textBetween(v.pos, y.pos, "", ""))) && r.someProp("handleKeyDown", (D) => D(r, cn(13, "Enter")))) {
12582
12582
  r.input.lastIOSEnter = 0;
@@ -12595,13 +12595,13 @@ function G5(r, e, t, n, i) {
12595
12595
  let L = D || r.state.tr.replace(E, I, u.doc.slice(m.start - u.from, m.endB - u.from));
12596
12596
  if (u.sel) {
12597
12597
  let z = lc(r, L.doc, u.sel);
12598
- z && !(Ze && r.composing && z.empty && (m.start != m.endB || r.input.lastChromeDelete < Date.now() - 100) && (z.head == E || z.head == L.mapping.map(I) - 1) || yt && z.empty && z.head == E) && L.setSelection(z);
12598
+ z && !(Ze && r.composing && z.empty && (m.start != m.endB || r.input.lastChromeDelete < Date.now() - 100) && (z.head == E || z.head == L.mapping.map(I) - 1) || bt && z.empty && z.head == E) && L.setSelection(z);
12599
12599
  }
12600
12600
  return s && L.setMeta("composition", s), L.scrollIntoView();
12601
12601
  }, N;
12602
12602
  if (k)
12603
12603
  if (v.pos == y.pos) {
12604
- yt && Ur <= 11 && v.parentOffset == 0 && (r.domObserver.suppressSelectionUpdates(), setTimeout(() => yr(r), 20));
12604
+ bt && Ur <= 11 && v.parentOffset == 0 && (r.domObserver.suppressSelectionUpdates(), setTimeout(() => yr(r), 20));
12605
12605
  let D = O(r.state.tr.delete(E, I)), L = c.resolve(m.start).marksAcross(c.resolve(m.endA));
12606
12606
  L && D.ensureMarks(L), r.dispatch(D);
12607
12607
  } else if (
@@ -12768,7 +12768,7 @@ class qf {
12768
12768
  let f = c == "preserve" && o && this.dom.style.overflowAnchor == null && Av(this);
12769
12769
  if (o) {
12770
12770
  this.domObserver.stop();
12771
- let h = d && (yt || Ze) && !this.composing && !i.selection.empty && !e.selection.empty && X5(i.selection, e.selection);
12771
+ let h = d && (bt || Ze) && !this.composing && !i.selection.empty && !e.selection.empty && X5(i.selection, e.selection);
12772
12772
  if (d) {
12773
12773
  let m = Ze ? this.trackWrites = this.domSelectionRange().focusNode : null;
12774
12774
  this.composing && (this.input.compositionNode = A5(this)), (s || !this.docView.update(e.doc, u, l, this)) && (this.docView.updateOuterDeco(u), this.docView.destroy(), this.docView = qu(e.doc, u, l, this.dom, this)), m && !this.trackWrites && (h = !0);
@@ -12843,7 +12843,7 @@ class qf {
12843
12843
  Query whether the view has focus.
12844
12844
  */
12845
12845
  hasFocus() {
12846
- if (yt) {
12846
+ if (bt) {
12847
12847
  let e = this.root.activeElement;
12848
12848
  if (e == this.dom)
12849
12849
  return !0;
@@ -13873,7 +13873,7 @@ function u0(r, e) {
13873
13873
  function Zf(r) {
13874
13874
  return typeof r == "function";
13875
13875
  }
13876
- function Te(r, e = void 0, ...t) {
13876
+ function Me(r, e = void 0, ...t) {
13877
13877
  return Zf(r) ? e ? r.bind(e)(...t) : r(...t) : r;
13878
13878
  }
13879
13879
  function e3(r = {}) {
@@ -13950,7 +13950,7 @@ function Qf(r) {
13950
13950
  });
13951
13951
  }), e;
13952
13952
  }
13953
- function ye(...r) {
13953
+ function ve(...r) {
13954
13954
  return r.filter((e) => !!e).reduce((e, t) => {
13955
13955
  const n = { ...e };
13956
13956
  return Object.entries(t).forEach(([i, s]) => {
@@ -13978,7 +13978,7 @@ function ye(...r) {
13978
13978
  function Ii(r, e) {
13979
13979
  return e.filter((t) => t.type === r.type.name).filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(r.attrs) || {} : {
13980
13980
  [t.name]: r.attrs[t.name]
13981
- }).reduce((t, n) => ye(t, n), {});
13981
+ }).reduce((t, n) => ve(t, n), {});
13982
13982
  }
13983
13983
  function t3(r) {
13984
13984
  return typeof r != "string" ? r : r.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(r) : r === "true" ? !0 : r === "false" ? !1 : r;
@@ -14029,22 +14029,22 @@ function r3(r, e) {
14029
14029
  };
14030
14030
  }, {}), h = yc({
14031
14031
  ...f,
14032
- content: Te(ne(u, "content", d)),
14033
- marks: Te(ne(u, "marks", d)),
14034
- group: Te(ne(u, "group", d)),
14035
- inline: Te(ne(u, "inline", d)),
14036
- atom: Te(ne(u, "atom", d)),
14037
- selectable: Te(ne(u, "selectable", d)),
14038
- draggable: Te(ne(u, "draggable", d)),
14039
- code: Te(ne(u, "code", d)),
14040
- whitespace: Te(ne(u, "whitespace", d)),
14041
- linebreakReplacement: Te(
14032
+ content: Me(ne(u, "content", d)),
14033
+ marks: Me(ne(u, "marks", d)),
14034
+ group: Me(ne(u, "group", d)),
14035
+ inline: Me(ne(u, "inline", d)),
14036
+ atom: Me(ne(u, "atom", d)),
14037
+ selectable: Me(ne(u, "selectable", d)),
14038
+ draggable: Me(ne(u, "draggable", d)),
14039
+ code: Me(ne(u, "code", d)),
14040
+ whitespace: Me(ne(u, "whitespace", d)),
14041
+ linebreakReplacement: Me(
14042
14042
  ne(u, "linebreakReplacement", d)
14043
14043
  ),
14044
- defining: Te(ne(u, "defining", d)),
14045
- isolating: Te(ne(u, "isolating", d)),
14044
+ defining: Me(ne(u, "defining", d)),
14045
+ isolating: Me(ne(u, "isolating", d)),
14046
14046
  attrs: Object.fromEntries(c.map(bc))
14047
- }), m = Te(ne(u, "parseHTML", d));
14047
+ }), m = Me(ne(u, "parseHTML", d));
14048
14048
  m && (h.parseDOM = m.map(
14049
14049
  (w) => vc(w, c)
14050
14050
  ));
@@ -14071,13 +14071,13 @@ function r3(r, e) {
14071
14071
  };
14072
14072
  }, {}), h = yc({
14073
14073
  ...f,
14074
- inclusive: Te(ne(u, "inclusive", d)),
14075
- excludes: Te(ne(u, "excludes", d)),
14076
- group: Te(ne(u, "group", d)),
14077
- spanning: Te(ne(u, "spanning", d)),
14078
- code: Te(ne(u, "code", d)),
14074
+ inclusive: Me(ne(u, "inclusive", d)),
14075
+ excludes: Me(ne(u, "excludes", d)),
14076
+ group: Me(ne(u, "group", d)),
14077
+ spanning: Me(ne(u, "spanning", d)),
14078
+ code: Me(ne(u, "code", d)),
14079
14079
  attrs: Object.fromEntries(c.map(bc))
14080
- }), m = Te(ne(u, "parseHTML", d));
14080
+ }), m = Me(ne(u, "parseHTML", d));
14081
14081
  m && (h.parseDOM = m.map(
14082
14082
  (y) => vc(y, c)
14083
14083
  ));
@@ -14305,7 +14305,7 @@ function xc(r, e) {
14305
14305
  name: n.name,
14306
14306
  options: n.options,
14307
14307
  storage: n.storage
14308
- }, s = Te(ne(n, "group", i));
14308
+ }, s = Me(ne(n, "group", i));
14309
14309
  return typeof s != "string" ? !1 : s.split(" ").includes("list");
14310
14310
  }
14311
14311
  function Co(r, {
@@ -14872,7 +14872,7 @@ var f0 = class {
14872
14872
  }
14873
14873
  get options() {
14874
14874
  return {
14875
- ...Te(
14875
+ ...Me(
14876
14876
  ne(this, "addOptions", {
14877
14877
  name: this.name
14878
14878
  })
@@ -14881,7 +14881,7 @@ var f0 = class {
14881
14881
  }
14882
14882
  get storage() {
14883
14883
  return {
14884
- ...Te(
14884
+ ...Me(
14885
14885
  ne(this, "addStorage", {
14886
14886
  name: this.name,
14887
14887
  options: this.options
@@ -15262,7 +15262,7 @@ var Eo = class {
15262
15262
  editor: this.editor,
15263
15263
  type: ma(e.name, this.schema)
15264
15264
  };
15265
- e.type === "mark" && ((t = Te(ne(e, "keepOnSplit", n))) == null || t) && this.splittableMarks.push(e.name);
15265
+ e.type === "mark" && ((t = Me(ne(e, "keepOnSplit", n))) == null || t) && this.splittableMarks.push(e.name);
15266
15266
  const i = ne(e, "onBeforeCreate", n), s = ne(e, "onCreate", n), o = ne(e, "onUpdate", n), a = ne(
15267
15267
  e,
15268
15268
  "onSelectionUpdate",
@@ -15289,7 +15289,7 @@ i0(K3, {
15289
15289
  TextDirection: () => wp,
15290
15290
  focusEventsPluginKey: () => mp
15291
15291
  });
15292
- var Se = class up extends f0 {
15292
+ var ke = class up extends f0 {
15293
15293
  constructor() {
15294
15294
  super(...arguments), this.type = "extension";
15295
15295
  }
@@ -15308,7 +15308,7 @@ var Se = class up extends f0 {
15308
15308
  const t = typeof e == "function" ? e() : e;
15309
15309
  return super.extend(t);
15310
15310
  }
15311
- }, cp = Se.create({
15311
+ }, cp = ke.create({
15312
15312
  name: "clipboardTextSerializer",
15313
15313
  addOptions() {
15314
15314
  return {
@@ -15331,14 +15331,14 @@ var Se = class up extends f0 {
15331
15331
  })
15332
15332
  ];
15333
15333
  }
15334
- }), dp = Se.create({
15334
+ }), dp = ke.create({
15335
15335
  name: "commands",
15336
15336
  addCommands() {
15337
15337
  return {
15338
15338
  ...Wf
15339
15339
  };
15340
15340
  }
15341
- }), hp = Se.create({
15341
+ }), hp = ke.create({
15342
15342
  name: "delete",
15343
15343
  onUpdate({ transaction: r, appendedTransactions: e }) {
15344
15344
  var t, n, i;
@@ -15394,7 +15394,7 @@ var Se = class up extends f0 {
15394
15394
  };
15395
15395
  (i = (n = (t = this.editor.options.coreExtensionOptions) == null ? void 0 : t.delete) == null ? void 0 : n.async) == null || i ? setTimeout(s, 0) : s();
15396
15396
  }
15397
- }), fp = Se.create({
15397
+ }), fp = ke.create({
15398
15398
  name: "drop",
15399
15399
  addProseMirrorPlugins() {
15400
15400
  return [
@@ -15413,7 +15413,7 @@ var Se = class up extends f0 {
15413
15413
  })
15414
15414
  ];
15415
15415
  }
15416
- }), pp = Se.create({
15416
+ }), pp = ke.create({
15417
15417
  name: "editable",
15418
15418
  addProseMirrorPlugins() {
15419
15419
  return [
@@ -15425,7 +15425,7 @@ var Se = class up extends f0 {
15425
15425
  })
15426
15426
  ];
15427
15427
  }
15428
- }), mp = new qe("focusEvents"), gp = Se.create({
15428
+ }), mp = new qe("focusEvents"), gp = ke.create({
15429
15429
  name: "focusEvents",
15430
15430
  addProseMirrorPlugins() {
15431
15431
  const { editor: r } = this;
@@ -15449,7 +15449,7 @@ var Se = class up extends f0 {
15449
15449
  })
15450
15450
  ];
15451
15451
  }
15452
- }), vp = Se.create({
15452
+ }), vp = ke.create({
15453
15453
  name: "keymap",
15454
15454
  addKeyboardShortcuts() {
15455
15455
  const r = () => this.editor.commands.first(({ commands: o }) => [
@@ -15527,7 +15527,7 @@ var Se = class up extends f0 {
15527
15527
  })
15528
15528
  ];
15529
15529
  }
15530
- }), yp = Se.create({
15530
+ }), yp = ke.create({
15531
15531
  name: "paste",
15532
15532
  addProseMirrorPlugins() {
15533
15533
  return [
@@ -15545,7 +15545,7 @@ var Se = class up extends f0 {
15545
15545
  })
15546
15546
  ];
15547
15547
  }
15548
- }), bp = Se.create({
15548
+ }), bp = ke.create({
15549
15549
  name: "tabindex",
15550
15550
  addProseMirrorPlugins() {
15551
15551
  return [
@@ -15557,7 +15557,7 @@ var Se = class up extends f0 {
15557
15557
  })
15558
15558
  ];
15559
15559
  }
15560
- }), wp = Se.create({
15560
+ }), wp = ke.create({
15561
15561
  name: "textDirection",
15562
15562
  addOptions() {
15563
15563
  return {
@@ -16235,7 +16235,7 @@ function Xr(r) {
16235
16235
  return new h0({
16236
16236
  find: r.find,
16237
16237
  handler: ({ state: e, range: t, match: n }) => {
16238
- const i = Te(r.getAttributes, void 0, n);
16238
+ const i = Me(r.getAttributes, void 0, n);
16239
16239
  if (i === !1 || i === null)
16240
16240
  return null;
16241
16241
  const { tr: s } = e, o = n[n.length - 1], a = n[0];
@@ -16255,7 +16255,7 @@ function vl(r) {
16255
16255
  return new h0({
16256
16256
  find: r.find,
16257
16257
  handler: ({ state: e, range: t, match: n }) => {
16258
- const i = e.doc.resolve(t.from), s = Te(r.getAttributes, void 0, n) || {};
16258
+ const i = e.doc.resolve(t.from), s = Me(r.getAttributes, void 0, n) || {};
16259
16259
  if (!i.node(-1).canReplaceWith(i.index(-1), i.indexAfter(-1), r.type))
16260
16260
  return null;
16261
16261
  e.tr.delete(t.from, t.to).setBlockType(t.from, t.from, r.type, s);
@@ -16263,11 +16263,11 @@ function vl(r) {
16263
16263
  undoable: r.undoable
16264
16264
  });
16265
16265
  }
16266
- function bt(r) {
16266
+ function ht(r) {
16267
16267
  return new h0({
16268
16268
  find: r.find,
16269
16269
  handler: ({ state: e, range: t, match: n, chain: i }) => {
16270
- const s = Te(r.getAttributes, void 0, n) || {}, o = e.tr.delete(t.from, t.to), l = o.doc.resolve(t.from).blockRange(), u = l && Vl(l, r.type, s);
16270
+ const s = Me(r.getAttributes, void 0, n) || {}, o = e.tr.delete(t.from, t.to), l = o.doc.resolve(t.from).blockRange(), u = l && Vl(l, r.type, s);
16271
16271
  if (!u)
16272
16272
  return null;
16273
16273
  if (o.wrap(l, u), r.keepMarks && r.editor) {
@@ -16648,7 +16648,7 @@ function s6(r, e, t = {}) {
16648
16648
  }
16649
16649
  }), s.docChanged && e.view.dispatch(s);
16650
16650
  }
16651
- var Ce = class xp extends f0 {
16651
+ var we = class xp extends f0 {
16652
16652
  constructor() {
16653
16653
  super(...arguments), this.type = "node";
16654
16654
  }
@@ -16790,7 +16790,7 @@ function Ao(r) {
16790
16790
  return new j3({
16791
16791
  find: r.find,
16792
16792
  handler: ({ state: e, range: t, match: n, pasteEvent: i }) => {
16793
- const s = Te(r.getAttributes, void 0, n, i);
16793
+ const s = Me(r.getAttributes, void 0, n, i);
16794
16794
  if (s === !1 || s === null)
16795
16795
  return null;
16796
16796
  const { tr: o } = e, a = n[n.length - 1], l = n[0];
@@ -17418,7 +17418,7 @@ function Tp(r, e) {
17418
17418
  };
17419
17419
  }
17420
17420
  const Mp = Tp(!1, !0), Cp = Tp(!0, !0);
17421
- Se.create({
17421
+ ke.create({
17422
17422
  name: "characterCount",
17423
17423
  addOptions() {
17424
17424
  return {
@@ -17487,7 +17487,7 @@ Se.create({
17487
17487
  ];
17488
17488
  }
17489
17489
  });
17490
- Se.create({
17490
+ ke.create({
17491
17491
  name: "dropCursor",
17492
17492
  addOptions() {
17493
17493
  return {
@@ -17500,7 +17500,7 @@ Se.create({
17500
17500
  return [a6(this.options)];
17501
17501
  }
17502
17502
  });
17503
- var M6 = Se.create({
17503
+ var M6 = ke.create({
17504
17504
  name: "focus",
17505
17505
  addOptions() {
17506
17506
  return {
@@ -17542,7 +17542,7 @@ var M6 = Se.create({
17542
17542
  })
17543
17543
  ];
17544
17544
  }
17545
- }), C6 = Se.create({
17545
+ }), C6 = ke.create({
17546
17546
  name: "gapCursor",
17547
17547
  addProseMirrorPlugins() {
17548
17548
  return [d6()];
@@ -17555,11 +17555,11 @@ var M6 = Se.create({
17555
17555
  storage: r.storage
17556
17556
  };
17557
17557
  return {
17558
- allowGapCursor: (e = Te(ne(r, "allowGapCursor", t))) != null ? e : null
17558
+ allowGapCursor: (e = Me(ne(r, "allowGapCursor", t))) != null ? e : null
17559
17559
  };
17560
17560
  }
17561
17561
  });
17562
- Se.create({
17562
+ ke.create({
17563
17563
  name: "placeholder",
17564
17564
  addOptions() {
17565
17565
  return {
@@ -17605,7 +17605,7 @@ Se.create({
17605
17605
  ];
17606
17606
  }
17607
17607
  });
17608
- Se.create({
17608
+ ke.create({
17609
17609
  name: "selection",
17610
17610
  addOptions() {
17611
17611
  return {
@@ -17633,7 +17633,7 @@ Se.create({
17633
17633
  function Mc({ types: r, node: e }) {
17634
17634
  return e && Array.isArray(r) && r.includes(e.type) || e?.type === r;
17635
17635
  }
17636
- Se.create({
17636
+ ke.create({
17637
17637
  name: "trailingNode",
17638
17638
  addOptions() {
17639
17639
  return {
@@ -17668,7 +17668,7 @@ Se.create({
17668
17668
  ];
17669
17669
  }
17670
17670
  });
17671
- var E6 = Se.create({
17671
+ var E6 = ke.create({
17672
17672
  name: "undoRedo",
17673
17673
  addOptions() {
17674
17674
  return {
@@ -18375,7 +18375,7 @@ var S7 = class extends Be.Component {
18375
18375
  };
18376
18376
  function Op(r) {
18377
18377
  var e;
18378
- const [t] = vt(() => new C7(r.editor)), n = y7.useSyncExternalStoreWithSelector(
18378
+ const [t] = yt(() => new C7(r.editor)), n = y7.useSyncExternalStoreWithSelector(
18379
18379
  t.subscribe,
18380
18380
  t.getSnapshot,
18381
18381
  t.getServerSnapshot,
@@ -18548,9 +18548,9 @@ var Bc = process.env.NODE_ENV !== "production", bl = typeof window > "u", E7 = b
18548
18548
  }
18549
18549
  };
18550
18550
  function O7(r = {}, e = []) {
18551
- const t = Me(r);
18551
+ const t = Ce(r);
18552
18552
  t.current = r;
18553
- const [n] = vt(() => new A7(t)), i = Ep.useSyncExternalStore(
18553
+ const [n] = yt(() => new A7(t)), i = Ep.useSyncExternalStore(
18554
18554
  n.subscribe,
18555
18555
  n.getEditor,
18556
18556
  n.getServerSnapshot
@@ -18848,7 +18848,7 @@ function Sn(r, e) {
18848
18848
  var z7 = Object.defineProperty, L7 = (r, e) => {
18849
18849
  for (var t in e)
18850
18850
  z7(r, t, { get: e[t], enumerable: !0 });
18851
- }, B7 = "listItem", Hc = "textStyle", Vc = /^\s*([-+*])\s$/, Bp = Ce.create({
18851
+ }, B7 = "listItem", Hc = "textStyle", Vc = /^\s*([-+*])\s$/, Bp = we.create({
18852
18852
  name: "bulletList",
18853
18853
  addOptions() {
18854
18854
  return {
@@ -18866,7 +18866,7 @@ var z7 = Object.defineProperty, L7 = (r, e) => {
18866
18866
  return [{ tag: "ul" }];
18867
18867
  },
18868
18868
  renderHTML({ HTMLAttributes: r }) {
18869
- return ["ul", ye(this.options.HTMLAttributes, r), 0];
18869
+ return ["ul", ve(this.options.HTMLAttributes, r), 0];
18870
18870
  },
18871
18871
  markdownTokenName: "list",
18872
18872
  parseMarkdown: (r, e) => r.type !== "list" || r.ordered ? [] : {
@@ -18889,11 +18889,11 @@ var z7 = Object.defineProperty, L7 = (r, e) => {
18889
18889
  };
18890
18890
  },
18891
18891
  addInputRules() {
18892
- let r = bt({
18892
+ let r = ht({
18893
18893
  find: Vc,
18894
18894
  type: this.type
18895
18895
  });
18896
- return (this.options.keepMarks || this.options.keepAttributes) && (r = bt({
18896
+ return (this.options.keepMarks || this.options.keepAttributes) && (r = ht({
18897
18897
  find: Vc,
18898
18898
  type: this.type,
18899
18899
  keepMarks: this.options.keepMarks,
@@ -18902,7 +18902,7 @@ var z7 = Object.defineProperty, L7 = (r, e) => {
18902
18902
  editor: this.editor
18903
18903
  })), [r];
18904
18904
  }
18905
- }), Fp = Ce.create({
18905
+ }), Fp = we.create({
18906
18906
  name: "listItem",
18907
18907
  addOptions() {
18908
18908
  return {
@@ -18921,7 +18921,7 @@ var z7 = Object.defineProperty, L7 = (r, e) => {
18921
18921
  ];
18922
18922
  },
18923
18923
  renderHTML({ HTMLAttributes: r }) {
18924
- return ["li", ye(this.options.HTMLAttributes, r), 0];
18924
+ return ["li", ve(this.options.HTMLAttributes, r), 0];
18925
18925
  },
18926
18926
  markdownTokenName: "list_item",
18927
18927
  parseMarkdown: (r, e) => {
@@ -19047,7 +19047,7 @@ var _i = (r, e) => {
19047
19047
  var t;
19048
19048
  const { $anchor: n } = e.selection, i = e.doc.resolve(n.pos - n.parentOffset - 2);
19049
19049
  return !(i.index() === i.parent.childCount - 1 || ((t = i.nodeAfter) == null ? void 0 : t.type.name) !== r);
19050
- }, H7 = Se.create({
19050
+ }, H7 = ke.create({
19051
19051
  name: "listKeymap",
19052
19052
  addOptions() {
19053
19053
  return {
@@ -19194,7 +19194,7 @@ function j7(r, e) {
19194
19194
  };
19195
19195
  });
19196
19196
  }
19197
- var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19197
+ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = we.create({
19198
19198
  name: "orderedList",
19199
19199
  addOptions() {
19200
19200
  return {
@@ -19229,7 +19229,7 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19229
19229
  },
19230
19230
  renderHTML({ HTMLAttributes: r }) {
19231
19231
  const { start: e, ...t } = r;
19232
- return e === 1 ? ["ol", ye(this.options.HTMLAttributes, t), 0] : ["ol", ye(this.options.HTMLAttributes, r), 0];
19232
+ return e === 1 ? ["ol", ve(this.options.HTMLAttributes, t), 0] : ["ol", ve(this.options.HTMLAttributes, r), 0];
19233
19233
  },
19234
19234
  markdownTokenName: "list",
19235
19235
  parseMarkdown: (r, e) => {
@@ -19285,13 +19285,13 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19285
19285
  };
19286
19286
  },
19287
19287
  addInputRules() {
19288
- let r = bt({
19288
+ let r = ht({
19289
19289
  find: qc,
19290
19290
  type: this.type,
19291
19291
  getAttributes: (e) => ({ start: +e[1] }),
19292
19292
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1]
19293
19293
  });
19294
- return (this.options.keepMarks || this.options.keepAttributes) && (r = bt({
19294
+ return (this.options.keepMarks || this.options.keepAttributes) && (r = ht({
19295
19295
  find: qc,
19296
19296
  type: this.type,
19297
19297
  keepMarks: this.options.keepMarks,
@@ -19301,7 +19301,7 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19301
19301
  editor: this.editor
19302
19302
  })), [r];
19303
19303
  }
19304
- }), W7 = /^\s*(\[([( |x])?\])\s$/, U7 = Ce.create({
19304
+ }), W7 = /^\s*(\[([( |x])?\])\s$/, U7 = we.create({
19305
19305
  name: "taskItem",
19306
19306
  addOptions() {
19307
19307
  return {
@@ -19341,7 +19341,7 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19341
19341
  renderHTML({ node: r, HTMLAttributes: e }) {
19342
19342
  return [
19343
19343
  "li",
19344
- ye(this.options.HTMLAttributes, e, {
19344
+ ve(this.options.HTMLAttributes, e, {
19345
19345
  "data-type": this.name
19346
19346
  }),
19347
19347
  [
@@ -19416,7 +19416,7 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19416
19416
  },
19417
19417
  addInputRules() {
19418
19418
  return [
19419
- bt({
19419
+ ht({
19420
19420
  find: W7,
19421
19421
  type: this.type,
19422
19422
  getAttributes: (r) => ({
@@ -19425,7 +19425,7 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19425
19425
  })
19426
19426
  ];
19427
19427
  }
19428
- }), G7 = Ce.create({
19428
+ }), G7 = we.create({
19429
19429
  name: "taskList",
19430
19430
  addOptions() {
19431
19431
  return {
@@ -19446,7 +19446,7 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19446
19446
  ];
19447
19447
  },
19448
19448
  renderHTML({ HTMLAttributes: r }) {
19449
- return ["ul", ye(this.options.HTMLAttributes, r, { "data-type": this.name }), 0];
19449
+ return ["ul", ve(this.options.HTMLAttributes, r, { "data-type": this.name }), 0];
19450
19450
  },
19451
19451
  parseMarkdown: (r, e) => e.createNode("taskList", {}, e.parseChildren(r.items || [])),
19452
19452
  renderMarkdown: (r, e) => r.content ? e.renderChildren(r.content, `
@@ -19538,14 +19538,14 @@ var q7 = "listItem", jc = "textStyle", qc = /^(\d+)\.\s$/, Wp = Ce.create({
19538
19538
  };
19539
19539
  }
19540
19540
  });
19541
- Se.create({
19541
+ ke.create({
19542
19542
  name: "listKit",
19543
19543
  addExtensions() {
19544
19544
  const r = [];
19545
19545
  return this.options.bulletList !== !1 && r.push(Bp.configure(this.options.bulletList)), this.options.listItem !== !1 && r.push(Fp.configure(this.options.listItem)), this.options.listKeymap !== !1 && r.push(H7.configure(this.options.listKeymap)), this.options.orderedList !== !1 && r.push(Wp.configure(this.options.orderedList)), this.options.taskItem !== !1 && r.push(U7.configure(this.options.taskItem)), this.options.taskList !== !1 && r.push(G7.configure(this.options.taskList)), r;
19546
19546
  }
19547
19547
  });
19548
- class gt {
19548
+ class vt {
19549
19549
  // The + prefix indicates that these fields aren't writeable
19550
19550
  // Lexer holding the input string.
19551
19551
  // Start offset, zero-based inclusive.
@@ -19562,7 +19562,7 @@ class gt {
19562
19562
  * - Otherwise, returns null.
19563
19563
  */
19564
19564
  static range(e, t) {
19565
- return t ? !e || !e.loc || !t.loc || e.loc.lexer !== t.loc.lexer ? null : new gt(e.loc.lexer, e.loc.start, t.loc.end) : e && e.loc;
19565
+ return t ? !e || !e.loc || !t.loc || e.loc.lexer !== t.loc.lexer ? null : new vt(e.loc.lexer, e.loc.start, t.loc.end) : e && e.loc;
19566
19566
  }
19567
19567
  }
19568
19568
  class At {
@@ -19576,7 +19576,7 @@ class At {
19576
19576
  * the whole input range enclosed by these two.
19577
19577
  */
19578
19578
  range(e, t) {
19579
- return new At(t, gt.range(this, e));
19579
+ return new At(t, vt.range(this, e));
19580
19580
  }
19581
19581
  }
19582
19582
  class _ {
@@ -19625,7 +19625,7 @@ var Up = function r(e) {
19625
19625
  }, rb = function(e) {
19626
19626
  var t = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);
19627
19627
  return t ? t[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]) ? null : t[1].toLowerCase() : "_relative";
19628
- }, ve = {
19628
+ }, ye = {
19629
19629
  deflt: K7,
19630
19630
  escape: Q7,
19631
19631
  hyphenate: Y7,
@@ -19785,7 +19785,7 @@ class w0 {
19785
19785
  */
19786
19786
  isTrusted(e) {
19787
19787
  if (e.url && !e.protocol) {
19788
- var t = ve.protocolFromUrl(e.url);
19788
+ var t = ye.protocolFromUrl(e.url);
19789
19789
  if (t == null)
19790
19790
  return !1;
19791
19791
  e.protocol = t;
@@ -22922,16 +22922,16 @@ var kl = {
22922
22922
  return t;
22923
22923
  }, Mb = /[\s"'>/=\x00-\x1f]/, Xp = function(e) {
22924
22924
  var t = "<" + e;
22925
- this.classes.length && (t += ' class="' + ve.escape(Zr(this.classes)) + '"');
22925
+ this.classes.length && (t += ' class="' + ye.escape(Zr(this.classes)) + '"');
22926
22926
  var n = "";
22927
22927
  for (var i in this.style)
22928
- this.style.hasOwnProperty(i) && (n += ve.hyphenate(i) + ":" + this.style[i] + ";");
22929
- n && (t += ' style="' + ve.escape(n) + '"');
22928
+ this.style.hasOwnProperty(i) && (n += ye.hyphenate(i) + ":" + this.style[i] + ";");
22929
+ n && (t += ' style="' + ye.escape(n) + '"');
22930
22930
  for (var s in this.attributes)
22931
22931
  if (this.attributes.hasOwnProperty(s)) {
22932
22932
  if (Mb.test(s))
22933
22933
  throw new _("Invalid attribute name '" + s + "'");
22934
- t += " " + s + '="' + ve.escape(this.attributes[s]) + '"';
22934
+ t += " " + s + '="' + ye.escape(this.attributes[s]) + '"';
22935
22935
  }
22936
22936
  t += ">";
22937
22937
  for (var o = 0; o < this.children.length; o++)
@@ -22992,10 +22992,10 @@ class Cb {
22992
22992
  return e;
22993
22993
  }
22994
22994
  toMarkup() {
22995
- var e = '<img src="' + ve.escape(this.src) + '"' + (' alt="' + ve.escape(this.alt) + '"'), t = "";
22995
+ var e = '<img src="' + ye.escape(this.src) + '"' + (' alt="' + ye.escape(this.alt) + '"'), t = "";
22996
22996
  for (var n in this.style)
22997
- this.style.hasOwnProperty(n) && (t += ve.hyphenate(n) + ":" + this.style[n] + ";");
22998
- return t && (e += ' style="' + ve.escape(t) + '"'), e += "'/>", e;
22997
+ this.style.hasOwnProperty(n) && (t += ye.hyphenate(n) + ":" + this.style[n] + ";");
22998
+ return t && (e += ' style="' + ye.escape(t) + '"'), e += "'/>", e;
22999
22999
  }
23000
23000
  }
23001
23001
  var Eb = {
@@ -23030,13 +23030,13 @@ class Bt {
23030
23030
  */
23031
23031
  toMarkup() {
23032
23032
  var e = !1, t = "<span";
23033
- this.classes.length && (e = !0, t += ' class="', t += ve.escape(Zr(this.classes)), t += '"');
23033
+ this.classes.length && (e = !0, t += ' class="', t += ye.escape(Zr(this.classes)), t += '"');
23034
23034
  var n = "";
23035
23035
  this.italic > 0 && (n += "margin-right:" + this.italic + "em;");
23036
23036
  for (var i in this.style)
23037
- this.style.hasOwnProperty(i) && (n += ve.hyphenate(i) + ":" + this.style[i] + ";");
23038
- n && (e = !0, t += ' style="' + ve.escape(n) + '"');
23039
- var s = ve.escape(this.text);
23037
+ this.style.hasOwnProperty(i) && (n += ye.hyphenate(i) + ":" + this.style[i] + ";");
23038
+ n && (e = !0, t += ' style="' + ye.escape(n) + '"');
23039
+ var s = ye.escape(this.text);
23040
23040
  return e ? (t += ">", t += s, t += "</span>", t) : s;
23041
23041
  }
23042
23042
  }
@@ -23055,7 +23055,7 @@ class xr {
23055
23055
  toMarkup() {
23056
23056
  var e = '<svg xmlns="http://www.w3.org/2000/svg"';
23057
23057
  for (var t in this.attributes)
23058
- Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + ve.escape(this.attributes[t]) + '"');
23058
+ Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + ye.escape(this.attributes[t]) + '"');
23059
23059
  e += ">";
23060
23060
  for (var n = 0; n < this.children.length; n++)
23061
23061
  e += this.children[n].toMarkup();
@@ -23071,7 +23071,7 @@ class Qr {
23071
23071
  return this.alternate ? t.setAttribute("d", this.alternate) : t.setAttribute("d", Wc[this.pathName]), t;
23072
23072
  }
23073
23073
  toMarkup() {
23074
- return this.alternate ? '<path d="' + ve.escape(this.alternate) + '"/>' : '<path d="' + ve.escape(Wc[this.pathName]) + '"/>';
23074
+ return this.alternate ? '<path d="' + ye.escape(this.alternate) + '"/>' : '<path d="' + ye.escape(Wc[this.pathName]) + '"/>';
23075
23075
  }
23076
23076
  }
23077
23077
  class Tl {
@@ -23087,7 +23087,7 @@ class Tl {
23087
23087
  toMarkup() {
23088
23088
  var e = "<line";
23089
23089
  for (var t in this.attributes)
23090
- Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + ve.escape(this.attributes[t]) + '"');
23090
+ Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="' + ye.escape(this.attributes[t]) + '"');
23091
23091
  return e += "/>", e;
23092
23092
  }
23093
23093
  }
@@ -23125,7 +23125,7 @@ function p(r, e, t, n, i, s) {
23125
23125
  replace: n
23126
23126
  }, s && n && (Ne[r][n] = Ne[r][i]);
23127
23127
  }
23128
- var g = "math", F = "text", b = "main", T = "ams", Re = "accent-token", Y = "bin", pt = "close", Xn = "inner", se = "mathord", Ke = "op-token", Dt = "open", Oo = "punct", M = "rel", Cr = "spacing", A = "textord";
23128
+ var g = "math", F = "text", b = "main", T = "ams", Re = "accent-token", Y = "bin", mt = "close", Xn = "inner", se = "mathord", Ke = "op-token", Dt = "open", Oo = "punct", M = "rel", Cr = "spacing", A = "textord";
23129
23129
  p(g, b, M, "≡", "\\equiv", !0);
23130
23130
  p(g, b, M, "≺", "\\prec", !0);
23131
23131
  p(g, b, M, "≻", "\\succ", !0);
@@ -23182,9 +23182,9 @@ p(F, b, A, "†", "\\textdagger");
23182
23182
  p(g, b, A, "‡", "\\ddag");
23183
23183
  p(F, b, A, "‡", "\\ddag");
23184
23184
  p(F, b, A, "‡", "\\textdaggerdbl");
23185
- p(g, b, pt, "⎱", "\\rmoustache", !0);
23185
+ p(g, b, mt, "⎱", "\\rmoustache", !0);
23186
23186
  p(g, b, Dt, "⎰", "\\lmoustache", !0);
23187
- p(g, b, pt, "⟯", "\\rgroup", !0);
23187
+ p(g, b, mt, "⟯", "\\rgroup", !0);
23188
23188
  p(g, b, Dt, "⟮", "\\lgroup", !0);
23189
23189
  p(g, b, Y, "∓", "\\mp", !0);
23190
23190
  p(g, b, Y, "⊖", "\\ominus", !0);
@@ -23316,9 +23316,9 @@ p(g, T, A, "ℷ", "\\gimel", !0);
23316
23316
  p(g, T, A, "ϝ", "\\digamma", !0);
23317
23317
  p(g, T, A, "ϰ", "\\varkappa");
23318
23318
  p(g, T, Dt, "┌", "\\@ulcorner", !0);
23319
- p(g, T, pt, "┐", "\\@urcorner", !0);
23319
+ p(g, T, mt, "┐", "\\@urcorner", !0);
23320
23320
  p(g, T, Dt, "└", "\\@llcorner", !0);
23321
- p(g, T, pt, "┘", "\\@lrcorner", !0);
23321
+ p(g, T, mt, "┘", "\\@lrcorner", !0);
23322
23322
  p(g, T, M, "≦", "\\leqq", !0);
23323
23323
  p(g, T, M, "⩽", "\\leqslant", !0);
23324
23324
  p(g, T, M, "⪕", "\\eqslantless", !0);
@@ -23539,11 +23539,11 @@ p(g, b, A, "√", "\\surd");
23539
23539
  p(g, b, Dt, "⟨", "\\langle", !0);
23540
23540
  p(g, b, Dt, "∣", "\\lvert");
23541
23541
  p(g, b, Dt, "∥", "\\lVert");
23542
- p(g, b, pt, "?", "?");
23543
- p(g, b, pt, "!", "!");
23544
- p(g, b, pt, "⟩", "\\rangle", !0);
23545
- p(g, b, pt, "∣", "\\rvert");
23546
- p(g, b, pt, "∥", "\\rVert");
23542
+ p(g, b, mt, "?", "?");
23543
+ p(g, b, mt, "!", "!");
23544
+ p(g, b, mt, "⟩", "\\rangle", !0);
23545
+ p(g, b, mt, "∣", "\\rvert");
23546
+ p(g, b, mt, "∥", "\\rVert");
23547
23547
  p(g, b, M, "=", "=");
23548
23548
  p(g, b, M, ":", ":");
23549
23549
  p(g, b, M, "≈", "\\approx", !0);
@@ -23599,23 +23599,23 @@ p(g, b, Y, "▹", "\\triangleright");
23599
23599
  p(g, b, Dt, "{", "\\{");
23600
23600
  p(F, b, A, "{", "\\{");
23601
23601
  p(F, b, A, "{", "\\textbraceleft");
23602
- p(g, b, pt, "}", "\\}");
23602
+ p(g, b, mt, "}", "\\}");
23603
23603
  p(F, b, A, "}", "\\}");
23604
23604
  p(F, b, A, "}", "\\textbraceright");
23605
23605
  p(g, b, Dt, "{", "\\lbrace");
23606
- p(g, b, pt, "}", "\\rbrace");
23606
+ p(g, b, mt, "}", "\\rbrace");
23607
23607
  p(g, b, Dt, "[", "\\lbrack", !0);
23608
23608
  p(F, b, A, "[", "\\lbrack", !0);
23609
- p(g, b, pt, "]", "\\rbrack", !0);
23609
+ p(g, b, mt, "]", "\\rbrack", !0);
23610
23610
  p(F, b, A, "]", "\\rbrack", !0);
23611
23611
  p(g, b, Dt, "(", "\\lparen", !0);
23612
- p(g, b, pt, ")", "\\rparen", !0);
23612
+ p(g, b, mt, ")", "\\rparen", !0);
23613
23613
  p(F, b, A, "<", "\\textless", !0);
23614
23614
  p(F, b, A, ">", "\\textgreater", !0);
23615
23615
  p(g, b, Dt, "⌊", "\\lfloor", !0);
23616
- p(g, b, pt, "⌋", "\\rfloor", !0);
23616
+ p(g, b, mt, "⌋", "\\rfloor", !0);
23617
23617
  p(g, b, Dt, "⌈", "\\lceil", !0);
23618
- p(g, b, pt, "⌉", "\\rceil", !0);
23618
+ p(g, b, mt, "⌉", "\\rceil", !0);
23619
23619
  p(g, b, A, "\\", "\\backslash");
23620
23620
  p(g, b, A, "∣", "|");
23621
23621
  p(g, b, A, "∣", "\\vert");
@@ -23945,11 +23945,11 @@ var vs = [
23945
23945
  o.height > t && (t = o.height), o.depth > n && (n = o.depth), o.maxFontSize > i && (i = o.maxFontSize);
23946
23946
  }
23947
23947
  e.height = t, e.depth = n, e.maxFontSize = i;
23948
- }, mt = function(e, t, n, i) {
23948
+ }, gt = function(e, t, n, i) {
23949
23949
  var s = new qi(e, t, n, i);
23950
23950
  return T0(s), s;
23951
23951
  }, Qp = (r, e, t, n) => new qi(r, e, t, n), Bb = function(e, t, n) {
23952
- var i = mt([e], [], t);
23952
+ var i = gt([e], [], t);
23953
23953
  return i.height = Math.max(n || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), i.style.borderBottomWidth = j(i.height), i.maxFontSize = 1, i;
23954
23954
  }, Fb = function(e, t, n, i) {
23955
23955
  var s = new k0(e, t, n, i);
@@ -23958,7 +23958,7 @@ var vs = [
23958
23958
  var t = new ji(e);
23959
23959
  return T0(t), t;
23960
23960
  }, $b = function(e, t) {
23961
- return e instanceof ji ? mt([], [e], t) : e;
23961
+ return e instanceof ji ? gt([], [e], t) : e;
23962
23962
  }, Hb = function(e) {
23963
23963
  if (e.positionType === "individualShift") {
23964
23964
  for (var t = e.children, n = [t[0]], i = -t[0].shift - t[0].elem.depth, s = i, o = 1; o < t.length; o++) {
@@ -24009,32 +24009,32 @@ var vs = [
24009
24009
  }
24010
24010
  }
24011
24011
  s += 2;
24012
- var u = mt(["pstrut"], []);
24012
+ var u = gt(["pstrut"], []);
24013
24013
  u.style.height = j(s);
24014
24014
  for (var c = [], d = i, f = i, h = i, m = 0; m < n.length; m++) {
24015
24015
  var v = n[m];
24016
24016
  if (v.type === "kern")
24017
24017
  h += v.size;
24018
24018
  else {
24019
- var y = v.elem, w = v.wrapperClasses || [], k = v.wrapperStyle || {}, E = mt(w, [u, y], void 0, k);
24019
+ var y = v.elem, w = v.wrapperClasses || [], k = v.wrapperStyle || {}, E = gt(w, [u, y], void 0, k);
24020
24020
  E.style.top = j(-s - h - y.depth), v.marginLeft && (E.style.marginLeft = v.marginLeft), v.marginRight && (E.style.marginRight = v.marginRight), c.push(E), h += y.height + y.depth;
24021
24021
  }
24022
24022
  d = Math.min(d, h), f = Math.max(f, h);
24023
24023
  }
24024
- var I = mt(["vlist"], c);
24024
+ var I = gt(["vlist"], c);
24025
24025
  I.style.height = j(f);
24026
24026
  var O;
24027
24027
  if (d < 0) {
24028
- var N = mt([], []), D = mt(["vlist"], [N]);
24028
+ var N = gt([], []), D = gt(["vlist"], [N]);
24029
24029
  D.style.height = j(-d);
24030
- var L = mt(["vlist-s"], [new Bt("​")]);
24031
- O = [mt(["vlist-r"], [I, L]), mt(["vlist-r"], [D])];
24030
+ var L = gt(["vlist-s"], [new Bt("​")]);
24031
+ O = [gt(["vlist-r"], [I, L]), gt(["vlist-r"], [D])];
24032
24032
  } else
24033
- O = [mt(["vlist-r"], [I])];
24034
- var z = mt(["vlist-t"], O);
24033
+ O = [gt(["vlist-r"], [I])];
24034
+ var z = gt(["vlist-t"], O);
24035
24035
  return O.length === 2 && z.classes.push("vlist-t2"), z.height = f, z.depth = -d, z;
24036
24036
  }, _b = (r, e) => {
24037
- var t = mt(["mspace"], [], e), n = Le(r, e);
24037
+ var t = gt(["mspace"], [], e), n = Le(r, e);
24038
24038
  return t.style.marginRight = j(n), t;
24039
24039
  }, ys = function(e, t, n) {
24040
24040
  var i = "";
@@ -24133,7 +24133,7 @@ var vs = [
24133
24133
  fontMap: tm,
24134
24134
  makeSymbol: _t,
24135
24135
  mathsym: Rb,
24136
- makeSpan: mt,
24136
+ makeSpan: gt,
24137
24137
  makeSvgSpan: Qp,
24138
24138
  makeLineSpan: Bb,
24139
24139
  makeAnchor: Fb,
@@ -24432,8 +24432,8 @@ class Ct {
24432
24432
  toMarkup() {
24433
24433
  var e = "<" + this.type;
24434
24434
  for (var t in this.attributes)
24435
- Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += ve.escape(this.attributes[t]), e += '"');
24436
- this.classes.length > 0 && (e += ' class ="' + ve.escape(Zr(this.classes)) + '"'), e += ">";
24435
+ Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += ye.escape(this.attributes[t]), e += '"');
24436
+ this.classes.length > 0 && (e += ' class ="' + ye.escape(Zr(this.classes)) + '"'), e += ">";
24437
24437
  for (var n = 0; n < this.children.length; n++)
24438
24438
  e += this.children[n].toMarkup();
24439
24439
  return e += "</" + this.type + ">", e;
@@ -24460,7 +24460,7 @@ class Xt {
24460
24460
  * (representing the text itself).
24461
24461
  */
24462
24462
  toMarkup() {
24463
- return ve.escape(this.toText());
24463
+ return ye.escape(this.toText());
24464
24464
  }
24465
24465
  /**
24466
24466
  * Converts the text node into a string
@@ -24851,9 +24851,9 @@ function Do(r) {
24851
24851
  var A0 = (r, e) => {
24852
24852
  var t, n, i;
24853
24853
  r && r.type === "supsub" ? (n = pe(r.base, "accent"), t = n.base, r.base = t, i = Ab(ge(r, e)), r.base = n) : (n = pe(r, "accent"), t = n.base);
24854
- var s = ge(t, e.havingCrampedStyle()), o = n.isShifty && ve.isCharacterBox(t), a = 0;
24854
+ var s = ge(t, e.havingCrampedStyle()), o = n.isShifty && ye.isCharacterBox(t), a = 0;
24855
24855
  if (o) {
24856
- var l = ve.getBaseElem(t), u = ge(l, e.havingCrampedStyle());
24856
+ var l = ye.getBaseElem(t), u = ge(l, e.havingCrampedStyle());
24857
24857
  a = Jc(u).skew;
24858
24858
  }
24859
24859
  var c = n.label === "\\c", d = c ? s.height + s.depth : Math.min(s.height, e.fontMetrics().xHeight), f;
@@ -25129,7 +25129,7 @@ K({
25129
25129
  mclass: "m" + n.slice(5),
25130
25130
  // TODO(kevinb): don't prefix with 'm'
25131
25131
  body: je(i),
25132
- isCharacterBox: ve.isCharacterBox(i)
25132
+ isCharacterBox: ye.isCharacterBox(i)
25133
25133
  };
25134
25134
  },
25135
25135
  htmlBuilder: um,
@@ -25154,7 +25154,7 @@ K({
25154
25154
  mode: t.mode,
25155
25155
  mclass: Ro(e[0]),
25156
25156
  body: je(e[1]),
25157
- isCharacterBox: ve.isCharacterBox(e[1])
25157
+ isCharacterBox: ye.isCharacterBox(e[1])
25158
25158
  };
25159
25159
  }
25160
25160
  });
@@ -25191,7 +25191,7 @@ K({
25191
25191
  mode: t.mode,
25192
25192
  mclass: o,
25193
25193
  body: [l],
25194
- isCharacterBox: ve.isCharacterBox(l)
25194
+ isCharacterBox: ye.isCharacterBox(l)
25195
25195
  };
25196
25196
  },
25197
25197
  htmlBuilder: um,
@@ -25713,11 +25713,11 @@ var fi = function(e, t, n) {
25713
25713
  n && ($ *= i.sizeMultiplier);
25714
25714
  var ee = z / 2 - $, re = [];
25715
25715
  if (d.length > 0) {
25716
- var ue = z - v - E, te = Math.round(z * 1e3), W = wb(d, Math.round(ue * 1e3)), X = new Qr(d, W), me = (f / 1e3).toFixed(3) + "em", Q = (te / 1e3).toFixed(3) + "em", we = new xr([X], {
25716
+ var ue = z - v - E, te = Math.round(z * 1e3), W = wb(d, Math.round(ue * 1e3)), X = new Qr(d, W), me = (f / 1e3).toFixed(3) + "em", Q = (te / 1e3).toFixed(3) + "em", xe = new xr([X], {
25717
25717
  width: me,
25718
25718
  height: Q,
25719
25719
  viewBox: "0 0 " + f + " " + te
25720
- }), C = P.makeSvgSpan([], [we], i);
25720
+ }), C = P.makeSvgSpan([], [xe], i);
25721
25721
  C.height = te / 1e3, C.style.width = me, C.style.height = Q, re.push({
25722
25722
  type: "elem",
25723
25723
  elem: C
@@ -26081,7 +26081,7 @@ K({
26081
26081
  }
26082
26082
  });
26083
26083
  var N0 = (r, e) => {
26084
- var t = P.wrapFragment(ge(r.body, e), e), n = r.label.slice(1), i = e.sizeMultiplier, s, o = 0, a = ve.isCharacterBox(r.body);
26084
+ var t = P.wrapFragment(ge(r.body, e), e), n = r.label.slice(1), i = e.sizeMultiplier, s, o = 0, a = ye.isCharacterBox(r.body);
26085
26085
  if (n === "sout")
26086
26086
  s = P.makeSpan(["stretchy", "sout"]), s.height = e.fontMetrics().defaultRuleThickness / i, o = -0.5 * e.fontMetrics().xHeight;
26087
26087
  else if (n === "phase") {
@@ -26452,11 +26452,11 @@ var or = function(e, t) {
26452
26452
  var re = E / 2 + t.fontMetrics().axisHeight, ue = e.cols || [], te = [], W, X, me = [];
26453
26453
  if (e.tags && e.tags.some((an) => an))
26454
26454
  for (n = 0; n < s; ++n) {
26455
- var Q = l[n], we = Q.pos - re, C = e.tags[n], x = void 0;
26455
+ var Q = l[n], xe = Q.pos - re, C = e.tags[n], x = void 0;
26456
26456
  C === !0 ? x = P.makeSpan(["eqn-num"], [], t) : C === !1 ? x = P.makeSpan([], [], t) : x = P.makeSpan([], Je(C, t, !0), t), x.depth = Q.depth, x.height = Q.height, me.push({
26457
26457
  type: "elem",
26458
26458
  elem: x,
26459
- shift: we
26459
+ shift: xe
26460
26460
  });
26461
26461
  }
26462
26462
  for (
@@ -26478,7 +26478,7 @@ var or = function(e, t) {
26478
26478
  }
26479
26479
  if (!(i >= a)) {
26480
26480
  var fe = void 0;
26481
- (i > 0 || e.hskipBeforeAndAfter) && (fe = ve.deflt(R.pregap, f), fe !== 0 && (W = P.makeSpan(["arraycolsep"], []), W.style.width = j(fe), te.push(W)));
26481
+ (i > 0 || e.hskipBeforeAndAfter) && (fe = ye.deflt(R.pregap, f), fe !== 0 && (W = P.makeSpan(["arraycolsep"], []), W.style.width = j(fe), te.push(W)));
26482
26482
  var We = [];
26483
26483
  for (n = 0; n < s; ++n) {
26484
26484
  var kt = l[n], Or = kt[i];
@@ -26494,7 +26494,7 @@ var or = function(e, t) {
26494
26494
  We = P.makeVList({
26495
26495
  positionType: "individualShift",
26496
26496
  children: We
26497
- }, t), We = P.makeSpan(["col-align-" + (R.align || "c")], [We]), te.push(We), (i < a - 1 || e.hskipBeforeAndAfter) && (fe = ve.deflt(R.postgap, f), fe !== 0 && (W = P.makeSpan(["arraycolsep"], []), W.style.width = j(fe), te.push(W)));
26497
+ }, t), We = P.makeSpan(["col-align-" + (R.align || "c")], [We]), te.push(We), (i < a - 1 || e.hskipBeforeAndAfter) && (fe = ye.deflt(R.postgap, f), fe !== 0 && (W = P.makeSpan(["arraycolsep"], []), W.style.width = j(fe), te.push(W)));
26498
26498
  }
26499
26499
  }
26500
26500
  if (l = P.makeSpan(["mtable"], te), u.length > 0) {
@@ -26965,7 +26965,7 @@ K({
26965
26965
  handler: (r, e) => {
26966
26966
  var {
26967
26967
  parser: t
26968
- } = r, n = e[0], i = ve.isCharacterBox(n);
26968
+ } = r, n = e[0], i = ye.isCharacterBox(n);
26969
26969
  return {
26970
26970
  type: "mclass",
26971
26971
  mode: t.mode,
@@ -27846,7 +27846,7 @@ K({
27846
27846
  });
27847
27847
  var Nm = (r, e, t, n, i, s, o) => {
27848
27848
  r = P.makeSpan([], [r]);
27849
- var a = t && ve.isCharacterBox(t), l, u;
27849
+ var a = t && ye.isCharacterBox(t), l, u;
27850
27850
  if (e) {
27851
27851
  var c = ge(e, n.havingStyle(i.sup()), n);
27852
27852
  u = {
@@ -28643,7 +28643,7 @@ var D8 = function(e, t) {
28643
28643
  return s ? Rm : null;
28644
28644
  } else {
28645
28645
  if (n.type === "accent")
28646
- return ve.isCharacterBox(n.base) ? A0 : null;
28646
+ return ye.isCharacterBox(n.base) ? A0 : null;
28647
28647
  if (n.type === "horizBrace") {
28648
28648
  var o = !e.sub;
28649
28649
  return o === n.isOver ? Om : null;
@@ -28662,7 +28662,7 @@ Mn({
28662
28662
  base: n,
28663
28663
  sup: i,
28664
28664
  sub: s
28665
- } = r, o = ge(n, e), a, l, u = e.fontMetrics(), c = 0, d = 0, f = n && ve.isCharacterBox(n);
28665
+ } = r, o = ge(n, e), a, l, u = e.fontMetrics(), c = 0, d = 0, f = n && ye.isCharacterBox(n);
28666
28666
  if (i) {
28667
28667
  var h = e.havingStyle(e.style.sup());
28668
28668
  a = ge(i, h, e), f || (c = o.height - h.fontMetrics().supDrop * h.sizeMultiplier / e.sizeMultiplier);
@@ -29046,17 +29046,17 @@ class wd {
29046
29046
  lex() {
29047
29047
  var e = this.input, t = this.tokenRegex.lastIndex;
29048
29048
  if (t === e.length)
29049
- return new At("EOF", new gt(this, t, t));
29049
+ return new At("EOF", new vt(this, t, t));
29050
29050
  var n = this.tokenRegex.exec(e);
29051
29051
  if (n === null || n.index !== t)
29052
- throw new _("Unexpected character: '" + e[t] + "'", new At(e[t], new gt(this, t, t + 1)));
29052
+ throw new _("Unexpected character: '" + e[t] + "'", new At(e[t], new vt(this, t, t + 1)));
29053
29053
  var i = n[6] || n[3] || (n[2] ? "\\ " : " ");
29054
29054
  if (this.catcodes[i] === 14) {
29055
29055
  var s = e.indexOf(`
29056
29056
  `, this.tokenRegex.lastIndex);
29057
29057
  return s === -1 ? (this.tokenRegex.lastIndex = e.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = s + 1, this.lex();
29058
29058
  }
29059
- return new At(i, new gt(this, t, this.tokenRegex.lastIndex));
29059
+ return new At(i, new vt(this, t, this.tokenRegex.lastIndex));
29060
29060
  }
29061
29061
  }
29062
29062
  class $8 {
@@ -29802,7 +29802,7 @@ class V8 {
29802
29802
  start: t,
29803
29803
  end: n
29804
29804
  } = this.consumeArg());
29805
- return this.pushToken(new At("EOF", n.loc)), this.pushTokens(i), new At("", gt.range(t, n));
29805
+ return this.pushToken(new At("EOF", n.loc)), this.pushTokens(i), new At("", vt.range(t, n));
29806
29806
  }
29807
29807
  /**
29808
29808
  * Consume all following space tokens, without expansion.
@@ -30963,7 +30963,7 @@ class zo {
30963
30963
  this.expect(o), this.gullet.endGroup(), s = {
30964
30964
  type: "ordgroup",
30965
30965
  mode: this.mode,
30966
- loc: gt.range(n, l),
30966
+ loc: vt.range(n, l),
30967
30967
  body: a,
30968
30968
  // A group formed by \begingroup...\endgroup is a semi-simple group
30969
30969
  // which doesn't affect spacing in math mode, i.e., is transparent.
@@ -30992,17 +30992,17 @@ class zo {
30992
30992
  s === "-" && e[n + 1].text === "-" && (n + 1 < t && e[n + 2].text === "-" ? (e.splice(n, 3, {
30993
30993
  type: "textord",
30994
30994
  mode: "text",
30995
- loc: gt.range(i, e[n + 2]),
30995
+ loc: vt.range(i, e[n + 2]),
30996
30996
  text: "---"
30997
30997
  }), t -= 2) : (e.splice(n, 2, {
30998
30998
  type: "textord",
30999
30999
  mode: "text",
31000
- loc: gt.range(i, e[n + 1]),
31000
+ loc: vt.range(i, e[n + 1]),
31001
31001
  text: "--"
31002
31002
  }), t -= 1)), (s === "'" || s === "`") && e[n + 1].text === s && (e.splice(n, 2, {
31003
31003
  type: "textord",
31004
31004
  mode: "text",
31005
- loc: gt.range(i, e[n + 1]),
31005
+ loc: vt.range(i, e[n + 1]),
31006
31006
  text: s + s
31007
31007
  }), t -= 1);
31008
31008
  }
@@ -31032,7 +31032,7 @@ class zo {
31032
31032
  var o;
31033
31033
  if (Ne[this.mode][t]) {
31034
31034
  this.settings.strict && this.mode === "math" && Ml.indexOf(t) >= 0 && this.settings.reportNonstrict("unicodeTextInMathMode", 'Latin-1/Unicode text character "' + t[0] + '" used in math mode', e);
31035
- var a = Ne[this.mode][t].group, l = gt.range(e), u;
31035
+ var a = Ne[this.mode][t].group, l = vt.range(e), u;
31036
31036
  if (Ob.hasOwnProperty(a)) {
31037
31037
  var c = a;
31038
31038
  u = {
@@ -31054,7 +31054,7 @@ class zo {
31054
31054
  this.settings.strict && (Gp(t.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Unicode text character "' + t[0] + '" used in math mode', e) : this.settings.reportNonstrict("unknownSymbol", 'Unrecognized Unicode character "' + t[0] + '"' + (" (" + t.charCodeAt(0) + ")"), e)), o = {
31055
31055
  type: "textord",
31056
31056
  mode: "text",
31057
- loc: gt.range(e),
31057
+ loc: vt.range(e),
31058
31058
  text: t
31059
31059
  };
31060
31060
  else
@@ -31070,7 +31070,7 @@ class zo {
31070
31070
  o = {
31071
31071
  type: "accent",
31072
31072
  mode: this.mode,
31073
- loc: gt.range(e),
31073
+ loc: vt.range(e),
31074
31074
  label: h,
31075
31075
  isStretchy: !1,
31076
31076
  isShifty: !0,
@@ -31219,7 +31219,7 @@ var _8 = function(e, t) {
31219
31219
  */
31220
31220
  __domTree: U8
31221
31221
  };
31222
- const G8 = Ce.create({
31222
+ const G8 = we.create({
31223
31223
  name: "m",
31224
31224
  content: "text*",
31225
31225
  group: "inline math",
@@ -31229,7 +31229,7 @@ const G8 = Ce.create({
31229
31229
  return [{ tag: "m" }];
31230
31230
  },
31231
31231
  renderHTML({ HTMLAttributes: r }) {
31232
- return ["span", ye({ class: "inlineMath" }, r)];
31232
+ return ["span", ve({ class: "inlineMath" }, r)];
31233
31233
  },
31234
31234
  addNodeView() {
31235
31235
  return ({ node: r, HTMLAttributes: e }) => {
@@ -31248,7 +31248,7 @@ const G8 = Ce.create({
31248
31248
  };
31249
31249
  };
31250
31250
  }
31251
- }), K8 = Ce.create({
31251
+ }), K8 = we.create({
31252
31252
  name: "me",
31253
31253
  content: "text*",
31254
31254
  group: "inline math",
@@ -31257,7 +31257,7 @@ const G8 = Ce.create({
31257
31257
  return [{ tag: "me" }];
31258
31258
  },
31259
31259
  renderHTML({ HTMLAttributes: r }) {
31260
- return ["div", ye({ class: "displayMath" }, r)];
31260
+ return ["div", ve({ class: "displayMath" }, r)];
31261
31261
  },
31262
31262
  addNodeView() {
31263
31263
  return ({ node: r, HTMLAttributes: e }) => {
@@ -31276,7 +31276,7 @@ const G8 = Ce.create({
31276
31276
  };
31277
31277
  };
31278
31278
  }
31279
- }), J8 = Ce.create({
31279
+ }), J8 = we.create({
31280
31280
  name: "md",
31281
31281
  content: "text*",
31282
31282
  group: "inline math",
@@ -31285,7 +31285,7 @@ const G8 = Ce.create({
31285
31285
  return [{ tag: "md" }];
31286
31286
  },
31287
31287
  renderHTML({ HTMLAttributes: r }) {
31288
- return ["div", ye({ class: "displayMath" }, r)];
31288
+ return ["div", ve({ class: "displayMath" }, r)];
31289
31289
  },
31290
31290
  addNodeView() {
31291
31291
  return ({ node: r, HTMLAttributes: e }) => {
@@ -31304,7 +31304,31 @@ const G8 = Ce.create({
31304
31304
  };
31305
31305
  };
31306
31306
  }
31307
- }), Y8 = Ce.create({
31307
+ }), Y8 = we.create({
31308
+ name: "ptxdoc",
31309
+ content: "title? (BasicBlock|block|rawptx|division)*",
31310
+ group: "root",
31311
+ selectable: !1,
31312
+ draggable: !1,
31313
+ defining: !1,
31314
+ parseHTML() {
31315
+ return [
31316
+ {
31317
+ tag: "ptxdoc"
31318
+ }
31319
+ ];
31320
+ },
31321
+ renderHTML({ HTMLAttributes: r }) {
31322
+ return [
31323
+ "article",
31324
+ ve(
31325
+ { class: "ptxdoc", label: "ptxdoc" },
31326
+ r
31327
+ ),
31328
+ 0
31329
+ ];
31330
+ }
31331
+ }), X8 = we.create({
31308
31332
  name: "introduction",
31309
31333
  content: "(BasicBlock|block|rawptx)*",
31310
31334
  group: "division introduction",
@@ -31321,7 +31345,7 @@ const G8 = Ce.create({
31321
31345
  renderHTML({ HTMLAttributes: r }) {
31322
31346
  return [
31323
31347
  "article",
31324
- ye(
31348
+ ve(
31325
31349
  { class: "introduction", label: "introduction" },
31326
31350
  r
31327
31351
  ),
@@ -31330,13 +31354,42 @@ const G8 = Ce.create({
31330
31354
  },
31331
31355
  addInputRules() {
31332
31356
  return [
31333
- bt({
31357
+ ht({
31334
31358
  find: new RegExp("^#intro\\s$"),
31335
31359
  type: this.type
31336
31360
  })
31337
31361
  ];
31338
31362
  }
31339
- }), X8 = Ce.create({
31363
+ }), Z8 = we.create({
31364
+ name: "part",
31365
+ content: "title ((introduction?|chapter+)|(BasicBlock|block|rawptx)+)",
31366
+ group: "division",
31367
+ selectable: !0,
31368
+ draggable: !0,
31369
+ defining: !1,
31370
+ parseHTML() {
31371
+ return [
31372
+ {
31373
+ tag: "part"
31374
+ }
31375
+ ];
31376
+ },
31377
+ renderHTML({ HTMLAttributes: r }) {
31378
+ return [
31379
+ "section",
31380
+ ve({ class: "part", ptxtag: "part" }, r),
31381
+ 0
31382
+ ];
31383
+ },
31384
+ addInputRules() {
31385
+ return [
31386
+ ht({
31387
+ find: new RegExp("^#part\\s$"),
31388
+ type: this.type
31389
+ })
31390
+ ];
31391
+ }
31392
+ }), Q8 = we.create({
31340
31393
  name: "chapter",
31341
31394
  content: "title ((introduction?|section+)|(BasicBlock|block|rawptx)+)",
31342
31395
  group: "division",
@@ -31353,19 +31406,19 @@ const G8 = Ce.create({
31353
31406
  renderHTML({ HTMLAttributes: r }) {
31354
31407
  return [
31355
31408
  "section",
31356
- ye({ class: "chapter", ptxtag: "chapter" }, r),
31409
+ ve({ class: "chapter", ptxtag: "chapter" }, r),
31357
31410
  0
31358
31411
  ];
31359
31412
  },
31360
31413
  addInputRules() {
31361
31414
  return [
31362
- bt({
31415
+ ht({
31363
31416
  find: new RegExp("^#ch\\s$"),
31364
31417
  type: this.type
31365
31418
  })
31366
31419
  ];
31367
31420
  }
31368
- }), Z8 = Ce.create({
31421
+ }), e9 = we.create({
31369
31422
  name: "section",
31370
31423
  content: "title ((introduction?|subsection+)|(BasicBlock|block|rawptx)+)",
31371
31424
  group: "division",
@@ -31382,19 +31435,19 @@ const G8 = Ce.create({
31382
31435
  renderHTML({ HTMLAttributes: r }) {
31383
31436
  return [
31384
31437
  "section",
31385
- ye({ class: "section", ptxtag: "section" }, r),
31438
+ ve({ class: "section", ptxtag: "section" }, r),
31386
31439
  0
31387
31440
  ];
31388
31441
  },
31389
31442
  addInputRules() {
31390
31443
  return [
31391
- bt({
31444
+ ht({
31392
31445
  find: new RegExp("^#sec\\s$"),
31393
31446
  type: this.type
31394
31447
  })
31395
31448
  ];
31396
31449
  }
31397
- }), Q8 = Ce.create({
31450
+ }), t9 = we.create({
31398
31451
  name: "subsection",
31399
31452
  content: "title (BasicBlock|block|rawptx)+",
31400
31453
  group: "division",
@@ -31422,7 +31475,7 @@ const G8 = Ce.create({
31422
31475
  renderHTML({ HTMLAttributes: r }) {
31423
31476
  return [
31424
31477
  "section",
31425
- ye(
31478
+ ve(
31426
31479
  { class: "subsection", ptxtag: "subsection" },
31427
31480
  r
31428
31481
  ),
@@ -31431,13 +31484,13 @@ const G8 = Ce.create({
31431
31484
  },
31432
31485
  addInputRules() {
31433
31486
  return [
31434
- bt({
31487
+ ht({
31435
31488
  find: new RegExp("^#subsec\\s$"),
31436
31489
  type: this.type
31437
31490
  })
31438
31491
  ];
31439
31492
  }
31440
- }), e9 = Ce.create({
31493
+ }), r9 = we.create({
31441
31494
  name: "worksheet",
31442
31495
  content: "title? ((introduction?)|(BasicBlock|block|rawptx)+)",
31443
31496
  group: "division",
@@ -31465,25 +31518,25 @@ const G8 = Ce.create({
31465
31518
  renderHTML({ HTMLAttributes: r }) {
31466
31519
  return [
31467
31520
  "section",
31468
- ye({ class: "worksheet", ptxtag: "worksheet" }, r),
31521
+ ve({ class: "worksheet", ptxtag: "worksheet" }, r),
31469
31522
  0
31470
31523
  ];
31471
31524
  },
31472
31525
  addInputRules() {
31473
31526
  return [
31474
- bt({
31527
+ ht({
31475
31528
  find: new RegExp("^#ws\\s$"),
31476
31529
  type: this.type
31477
31530
  })
31478
31531
  ];
31479
31532
  }
31480
- }), t9 = Se.create({
31533
+ }), n9 = ke.create({
31481
31534
  name: "divisions",
31482
31535
  addExtensions() {
31483
- return [Y8, X8, Z8, Q8, e9];
31536
+ return [X8, Z8, Q8, e9, t9, r9, Y8];
31484
31537
  }
31485
31538
  });
31486
- var r9 = Ce.create({
31539
+ var i9 = we.create({
31487
31540
  name: "text",
31488
31541
  group: "inline",
31489
31542
  parseMarkdown: (r) => ({
@@ -31491,7 +31544,7 @@ var r9 = Ce.create({
31491
31544
  text: r.text || ""
31492
31545
  }),
31493
31546
  renderMarkdown: (r) => r.text || ""
31494
- }), n9 = Ce.create({
31547
+ }), s9 = we.create({
31495
31548
  name: "hardBreak",
31496
31549
  markdownTokenName: "br",
31497
31550
  addOptions() {
@@ -31508,7 +31561,7 @@ var r9 = Ce.create({
31508
31561
  return [{ tag: "br" }];
31509
31562
  },
31510
31563
  renderHTML({ HTMLAttributes: r }) {
31511
- return ["br", ye(this.options.HTMLAttributes, r)];
31564
+ return ["br", ve(this.options.HTMLAttributes, r)];
31512
31565
  },
31513
31566
  renderText() {
31514
31567
  return `
@@ -31546,14 +31599,14 @@ var r9 = Ce.create({
31546
31599
  };
31547
31600
  }
31548
31601
  });
31549
- const i9 = r9.extend({}), s9 = n9.extend({}), o9 = Vi.create({
31602
+ const o9 = i9.extend({}), a9 = s9.extend({}), l9 = Vi.create({
31550
31603
  name: "term",
31551
31604
  group: "inline",
31552
31605
  parseHTML() {
31553
31606
  return [{ tag: "term" }];
31554
31607
  },
31555
31608
  renderHTML({ HTMLAttributes: r }) {
31556
- return ["span", ye({ class: "term" }, r), 0];
31609
+ return ["span", ve({ class: "term" }, r), 0];
31557
31610
  },
31558
31611
  addInputRules() {
31559
31612
  return [
@@ -31575,14 +31628,14 @@ const i9 = r9.extend({}), s9 = n9.extend({}), o9 = Vi.create({
31575
31628
  })
31576
31629
  ];
31577
31630
  }
31578
- }), a9 = Vi.create({
31631
+ }), u9 = Vi.create({
31579
31632
  name: "em",
31580
31633
  group: "inline",
31581
31634
  parseHTML() {
31582
31635
  return [{ tag: "em" }];
31583
31636
  },
31584
31637
  renderHTML({ HTMLAttributes: r }) {
31585
- return ["span", ye({ class: "em" }, r), 0];
31638
+ return ["span", ve({ class: "em" }, r), 0];
31586
31639
  },
31587
31640
  addInputRules() {
31588
31641
  return [
@@ -31604,14 +31657,14 @@ const i9 = r9.extend({}), s9 = n9.extend({}), o9 = Vi.create({
31604
31657
  })
31605
31658
  ];
31606
31659
  }
31607
- }), l9 = Vi.create({
31660
+ }), c9 = Vi.create({
31608
31661
  name: "alert",
31609
31662
  group: "inline",
31610
31663
  parseHTML() {
31611
31664
  return [{ tag: "alert" }];
31612
31665
  },
31613
31666
  renderHTML({ HTMLAttributes: r }) {
31614
- return ["span", ye({ class: "alert" }, r), 0];
31667
+ return ["span", ve({ class: "alert" }, r), 0];
31615
31668
  },
31616
31669
  addInputRules() {
31617
31670
  return [
@@ -31633,14 +31686,14 @@ const i9 = r9.extend({}), s9 = n9.extend({}), o9 = Vi.create({
31633
31686
  })
31634
31687
  ];
31635
31688
  }
31636
- }), u9 = Vi.create({
31689
+ }), d9 = Vi.create({
31637
31690
  name: "c",
31638
31691
  group: "inline",
31639
31692
  parseHTML() {
31640
31693
  return [{ tag: "c" }];
31641
31694
  },
31642
31695
  renderHTML({ HTMLAttributes: r }) {
31643
- return ["span", ye({ class: "c" }, r), 0];
31696
+ return ["span", ve({ class: "c" }, r), 0];
31644
31697
  },
31645
31698
  addInputRules() {
31646
31699
  return [
@@ -31662,10 +31715,10 @@ const i9 = r9.extend({}), s9 = n9.extend({}), o9 = Vi.create({
31662
31715
  })
31663
31716
  ];
31664
31717
  }
31665
- }), c9 = Se.create({
31718
+ }), h9 = ke.create({
31666
31719
  name: "myinline",
31667
31720
  addExtensions() {
31668
- return [i9, s9, o9, a9, l9, u9];
31721
+ return [o9, a9, l9, u9, c9, d9];
31669
31722
  }
31670
31723
  }), Ui = (r) => {
31671
31724
  const e = r.node.type.name.charAt(0).toUpperCase() + r.node.type.name.slice(1);
@@ -31681,7 +31734,7 @@ const i9 = r9.extend({}), s9 = n9.extend({}), o9 = Vi.create({
31681
31734
  /* @__PURE__ */ J.jsx(zp, { className: "thm-component-content" })
31682
31735
  ] });
31683
31736
  var Ha, Md;
31684
- function d9() {
31737
+ function f9() {
31685
31738
  if (Md) return Ha;
31686
31739
  Md = 1;
31687
31740
  var r = Object.defineProperty, e = Object.getOwnPropertyDescriptor, t = Object.getOwnPropertyNames, n = Object.prototype.hasOwnProperty, i = (C, x) => {
@@ -31704,7 +31757,7 @@ function d9() {
31704
31757
  XmlNode: () => N,
31705
31758
  XmlProcessingInstruction: () => W,
31706
31759
  XmlText: () => D,
31707
- parseXml: () => we
31760
+ parseXml: () => xe
31708
31761
  }), Ha = o(a);
31709
31762
  var l = "", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = class {
31710
31763
  constructor(C) {
@@ -32534,13 +32587,13 @@ function d9() {
32534
32587
  ` + C.slice(x + 1);
32535
32588
  return C;
32536
32589
  }
32537
- function we(C, x) {
32590
+ function xe(C, x) {
32538
32591
  return new me(C, x).document;
32539
32592
  }
32540
32593
  return Ha;
32541
32594
  }
32542
- var h9 = d9();
32543
- function f9(r) {
32595
+ var p9 = f9();
32596
+ function m9(r) {
32544
32597
  const e = String(r), t = [];
32545
32598
  return { toOffset: i, toPoint: n };
32546
32599
  function n(s) {
@@ -32579,7 +32632,7 @@ function Cd(r, e) {
32579
32632
  `, e);
32580
32633
  return n === -1 ? t : t === -1 || t + 1 === n ? n : t < n ? t : n;
32581
32634
  }
32582
- function p9(r) {
32635
+ function g9(r) {
32583
32636
  return !r || typeof r != "object" ? "" : "position" in r || "type" in r ? Ed(r.position) : "start" in r || "end" in r ? Ed(r) : "line" in r || "column" in r ? Dl(r) : "";
32584
32637
  }
32585
32638
  function Dl(r) {
@@ -32662,7 +32715,7 @@ class St extends Error {
32662
32715
  l && (s.place = l.position);
32663
32716
  }
32664
32717
  const a = s.place && "start" in s.place ? s.place.start : s.place;
32665
- this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = a ? a.column : void 0, this.fatal = void 0, this.file = "", this.message = i, this.line = a ? a.line : void 0, this.name = p9(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = o && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
32718
+ this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = a ? a.column : void 0, this.fatal = void 0, this.file = "", this.message = i, this.line = a ? a.line : void 0, this.name = g9(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = o && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
32666
32719
  }
32667
32720
  }
32668
32721
  St.prototype.file = "";
@@ -32678,11 +32731,11 @@ St.prototype.fatal = void 0;
32678
32731
  St.prototype.place = void 0;
32679
32732
  St.prototype.ruleId = void 0;
32680
32733
  St.prototype.source = void 0;
32681
- function m9(r) {
32682
- const e = f9(r);
32734
+ function v9(r) {
32735
+ const e = m9(r);
32683
32736
  let t;
32684
32737
  try {
32685
- t = h9.parseXml(String(r), {
32738
+ t = p9.parseXml(String(r), {
32686
32739
  // Positional offsets.
32687
32740
  includeOffsets: !0,
32688
32741
  // `<![CDATA[>&<]]>`
@@ -32709,19 +32762,19 @@ function m9(r) {
32709
32762
  );
32710
32763
  throw l.fatal = !0, l.url = "https://github.com/syntax-tree/xast-util-from-xml#throws", l;
32711
32764
  }
32712
- const n = { location: e }, i = y9(t, n);
32765
+ const n = { location: e }, i = w9(t, n);
32713
32766
  return Wm(t, i, n), i;
32714
32767
  }
32715
- function g9(r) {
32768
+ function y9(r) {
32716
32769
  return { type: "cdata", value: r.text };
32717
32770
  }
32718
- function v9(r) {
32771
+ function b9(r) {
32719
32772
  return { type: "comment", value: r.content };
32720
32773
  }
32721
- function y9(r, e) {
32774
+ function w9(r, e) {
32722
32775
  return { type: "root", children: qm(r.children, e) };
32723
32776
  }
32724
- function b9(r) {
32777
+ function x9(r) {
32725
32778
  return {
32726
32779
  type: "doctype",
32727
32780
  name: r.name,
@@ -32729,7 +32782,7 @@ function b9(r) {
32729
32782
  system: r.systemId || void 0
32730
32783
  };
32731
32784
  }
32732
- function w9(r, e) {
32785
+ function S9(r, e) {
32733
32786
  const t = qm(r.children, e);
32734
32787
  return {
32735
32788
  type: "element",
@@ -32739,13 +32792,13 @@ function w9(r, e) {
32739
32792
  children: t
32740
32793
  };
32741
32794
  }
32742
- function x9(r) {
32795
+ function k9(r) {
32743
32796
  return { type: "instruction", name: r.name, value: r.content };
32744
32797
  }
32745
- function S9(r) {
32798
+ function T9(r) {
32746
32799
  return { type: "text", value: r.text };
32747
32800
  }
32748
- function k9(r) {
32801
+ function M9(r) {
32749
32802
  const e = [];
32750
32803
  return r.version && e.push('version="' + r.version + '"'), r.encoding && e.push('encoding="' + r.encoding + '"'), r.standalone && e.push('standalone="' + r.standalone + '"'), { type: "instruction", name: "xml", value: e.join(" ") };
32751
32804
  }
@@ -32755,26 +32808,26 @@ function qm(r, e) {
32755
32808
  for (; ++n < r.length; ) {
32756
32809
  const i = r[n];
32757
32810
  let s;
32758
- i.type === "cdata" ? s = g9(
32811
+ i.type === "cdata" ? s = y9(
32759
32812
  /** @type {XmlCdata} */
32760
32813
  i
32761
- ) : i.type === "comment" ? s = v9(
32814
+ ) : i.type === "comment" ? s = b9(
32762
32815
  /** @type {XmlComment} */
32763
32816
  i
32764
- ) : i.type === "doctype" ? s = b9(
32817
+ ) : i.type === "doctype" ? s = x9(
32765
32818
  /** @type {XmlDocumentType} */
32766
32819
  i
32767
- ) : i.type === "element" ? s = w9(
32820
+ ) : i.type === "element" ? s = S9(
32768
32821
  /** @type {XmlElement} */
32769
32822
  i,
32770
32823
  e
32771
- ) : i.type === "pi" ? s = x9(
32824
+ ) : i.type === "pi" ? s = k9(
32772
32825
  /** @type {XmlProcessingInstruction} */
32773
32826
  i
32774
- ) : i.type === "text" ? s = S9(
32827
+ ) : i.type === "text" ? s = T9(
32775
32828
  /** @type {XmlText} */
32776
32829
  i
32777
- ) : i.type === "xmldecl" && (s = k9(
32830
+ ) : i.type === "xmldecl" && (s = M9(
32778
32831
  /** @type {XmlDeclaration} */
32779
32832
  i
32780
32833
  )), s && (Wm(i, s, e), t.push(s));
@@ -32794,17 +32847,17 @@ function Wm(r, e, t) {
32794
32847
  );
32795
32848
  n && i && (e.position = { start: n, end: i });
32796
32849
  }
32797
- const T9 = /["&'<>`]/g, M9 = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, C9 = (
32850
+ const C9 = /["&'<>`]/g, E9 = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, A9 = (
32798
32851
  // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
32799
32852
  /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
32800
- ), E9 = /[|\\{}()[\]^$+*?.]/g, Od = /* @__PURE__ */ new WeakMap();
32801
- function A9(r, e) {
32853
+ ), O9 = /[|\\{}()[\]^$+*?.]/g, Od = /* @__PURE__ */ new WeakMap();
32854
+ function N9(r, e) {
32802
32855
  if (r = r.replace(
32803
- e.subset ? O9(e.subset) : T9,
32856
+ e.subset ? D9(e.subset) : C9,
32804
32857
  n
32805
32858
  ), e.subset || e.escapeOnly)
32806
32859
  return r;
32807
- return r.replace(M9, t).replace(C9, n);
32860
+ return r.replace(E9, t).replace(A9, n);
32808
32861
  function t(i, s, o) {
32809
32862
  return e.format(
32810
32863
  (i.charCodeAt(0) - 55296) * 1024 + i.charCodeAt(1) - 56320 + 65536,
@@ -32820,45 +32873,45 @@ function A9(r, e) {
32820
32873
  );
32821
32874
  }
32822
32875
  }
32823
- function O9(r) {
32876
+ function D9(r) {
32824
32877
  let e = Od.get(r);
32825
- return e || (e = N9(r), Od.set(r, e)), e;
32878
+ return e || (e = R9(r), Od.set(r, e)), e;
32826
32879
  }
32827
- function N9(r) {
32880
+ function R9(r) {
32828
32881
  const e = [];
32829
32882
  let t = -1;
32830
32883
  for (; ++t < r.length; )
32831
- e.push(r[t].replace(E9, "\\$&"));
32884
+ e.push(r[t].replace(O9, "\\$&"));
32832
32885
  return new RegExp("(?:" + e.join("|") + ")", "g");
32833
32886
  }
32834
- function D9(r) {
32887
+ function I9(r) {
32835
32888
  return "&#x" + r.toString(16).toUpperCase() + ";";
32836
32889
  }
32837
- function R9(r, e) {
32838
- return A9(r, Object.assign({ format: D9 }, e));
32890
+ function P9(r, e) {
32891
+ return N9(r, Object.assign({ format: I9 }, e));
32839
32892
  }
32840
- const I9 = /[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;
32893
+ const z9 = /[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;
32841
32894
  function Qn(r, e, t) {
32842
- const n = P9(r);
32895
+ const n = L9(r);
32843
32896
  return t ? n.replace(t, i) : i(n);
32844
32897
  function i(s) {
32845
- return R9(s, { subset: e });
32898
+ return P9(s, { subset: e });
32846
32899
  }
32847
32900
  }
32848
- function P9(r) {
32849
- return String(r || "").replace(I9, "");
32901
+ function L9(r) {
32902
+ return String(r || "").replace(z9, "");
32850
32903
  }
32851
- const z9 = /]]>/g, L9 = [">"];
32852
- function B9(r) {
32853
- return "<![CDATA[" + Qn(r.value, L9, z9) + "]]>";
32904
+ const B9 = /]]>/g, F9 = [">"];
32905
+ function $9(r) {
32906
+ return "<![CDATA[" + Qn(r.value, F9, B9) + "]]>";
32854
32907
  }
32855
- function F9(r) {
32908
+ function H9(r) {
32856
32909
  return "<!--" + Qn(r.value, ["-"]) + "-->";
32857
32910
  }
32858
- const $9 = [" ", `
32911
+ const V9 = [" ", `
32859
32912
  `, " ", '"', "&", "'", "/", "<", "=", ">"];
32860
32913
  function ro(r) {
32861
- return Qn(r, $9);
32914
+ return Qn(r, V9);
32862
32915
  }
32863
32916
  function Nd(r, e) {
32864
32917
  const t = String(r);
@@ -32878,41 +32931,41 @@ function Rl(r, e) {
32878
32931
  }
32879
32932
  return n + Qn(t, ["<", "&", n]) + n;
32880
32933
  }
32881
- function H9(r, e) {
32934
+ function _9(r, e) {
32882
32935
  const t = ro(r.name), n = r.public, i = r.system;
32883
32936
  let s = "<!DOCTYPE";
32884
32937
  return t !== "" && (s += " " + t), n ? s += " PUBLIC " + Rl(n, e) : i && (s += " SYSTEM"), i && (s += " " + Rl(i, e)), s + ">";
32885
32938
  }
32886
- const V9 = {}.hasOwnProperty;
32887
- function _9(r, e) {
32939
+ const j9 = {}.hasOwnProperty;
32940
+ function q9(r, e) {
32888
32941
  const t = ro(r.name), n = Km(r, e), i = r.attributes || {}, s = n ? !1 : e.options.closeEmptyElements, o = [];
32889
32942
  let a;
32890
32943
  for (a in i)
32891
- if (V9.call(i, a)) {
32944
+ if (j9.call(i, a)) {
32892
32945
  const l = i[a];
32893
32946
  l != null && o.push(ro(a) + "=" + Rl(l, e));
32894
32947
  }
32895
32948
  return "<" + t + (o.length === 0 ? "" : " " + o.join(" ")) + (s ? (e.options.tightClose ? "" : " ") + "/" : "") + ">" + n + (s ? "" : "</" + t + ">");
32896
32949
  }
32897
- const j9 = /\?>/g, q9 = [">"];
32898
- function W9(r) {
32899
- const e = ro(r.name) || "x", t = Qn(r.value, q9, j9);
32950
+ const W9 = /\?>/g, U9 = [">"];
32951
+ function G9(r) {
32952
+ const e = ro(r.name) || "x", t = Qn(r.value, U9, W9);
32900
32953
  return "<?" + e + (t ? " " + t : "") + "?>";
32901
32954
  }
32902
- const U9 = ["&", "<"];
32955
+ const K9 = ["&", "<"];
32903
32956
  function Um(r) {
32904
- return Qn(r.value, U9);
32957
+ return Qn(r.value, K9);
32905
32958
  }
32906
- function G9(r, e) {
32959
+ function J9(r, e) {
32907
32960
  return e.options.allowDangerousXml ? r.value : Um(r);
32908
32961
  }
32909
- const K9 = {}.hasOwnProperty, Dd = {
32910
- cdata: B9,
32911
- comment: F9,
32912
- doctype: H9,
32913
- element: _9,
32914
- instruction: W9,
32915
- raw: G9,
32962
+ const Y9 = {}.hasOwnProperty, Dd = {
32963
+ cdata: $9,
32964
+ comment: H9,
32965
+ doctype: _9,
32966
+ element: q9,
32967
+ instruction: G9,
32968
+ raw: J9,
32916
32969
  root: Km,
32917
32970
  text: Um
32918
32971
  };
@@ -32920,7 +32973,7 @@ function Gm(r, e) {
32920
32973
  const t = r && r.type;
32921
32974
  if (!t)
32922
32975
  throw new Error("Expected node, not `" + r + "`");
32923
- if (!K9.call(Dd, t))
32976
+ if (!Y9.call(Dd, t))
32924
32977
  throw new Error("Cannot compile unknown node `" + t + "`");
32925
32978
  const n = Dd[t];
32926
32979
  return n(r, e);
@@ -32959,24 +33012,24 @@ const Jm = (
32959
33012
  */
32960
33013
  (function(r) {
32961
33014
  if (r == null)
32962
- return Z9;
33015
+ return ew;
32963
33016
  if (typeof r == "function")
32964
33017
  return Lo(r);
32965
33018
  if (typeof r == "object")
32966
- return Array.isArray(r) ? J9(r) : (
33019
+ return Array.isArray(r) ? X9(r) : (
32967
33020
  // Cast because `ReadonlyArray` goes into the above but `isArray`
32968
33021
  // narrows to `Array`.
32969
- Y9(
33022
+ Z9(
32970
33023
  /** @type {Props} */
32971
33024
  r
32972
33025
  )
32973
33026
  );
32974
33027
  if (typeof r == "string")
32975
- return X9(r);
33028
+ return Q9(r);
32976
33029
  throw new Error("Expected function, string, or object as test");
32977
33030
  })
32978
33031
  );
32979
- function J9(r) {
33032
+ function X9(r) {
32980
33033
  const e = [];
32981
33034
  let t = -1;
32982
33035
  for (; ++t < r.length; )
@@ -32989,7 +33042,7 @@ function J9(r) {
32989
33042
  return !1;
32990
33043
  }
32991
33044
  }
32992
- function Y9(r) {
33045
+ function Z9(r) {
32993
33046
  const e = (
32994
33047
  /** @type {Record<string, unknown>} */
32995
33048
  r
@@ -33007,7 +33060,7 @@ function Y9(r) {
33007
33060
  return !0;
33008
33061
  }
33009
33062
  }
33010
- function X9(r) {
33063
+ function Q9(r) {
33011
33064
  return Lo(e);
33012
33065
  function e(t) {
33013
33066
  return t && t.type === r;
@@ -33016,7 +33069,7 @@ function X9(r) {
33016
33069
  function Lo(r) {
33017
33070
  return e;
33018
33071
  function e(t, n, i) {
33019
- return !!(Q9(t) && r.call(
33072
+ return !!(tw(t) && r.call(
33020
33073
  this,
33021
33074
  t,
33022
33075
  typeof n == "number" ? n : void 0,
@@ -33024,14 +33077,14 @@ function Lo(r) {
33024
33077
  ));
33025
33078
  }
33026
33079
  }
33027
- function Z9() {
33080
+ function ew() {
33028
33081
  return !0;
33029
33082
  }
33030
- function Q9(r) {
33083
+ function tw(r) {
33031
33084
  return r !== null && typeof r == "object" && "type" in r;
33032
33085
  }
33033
- const Ym = [], ew = !0, Id = !1, Xm = "skip";
33034
- function tw(r, e, t, n) {
33086
+ const Ym = [], rw = !0, Id = !1, Xm = "skip";
33087
+ function nw(r, e, t, n) {
33035
33088
  let i;
33036
33089
  typeof e == "function" && typeof t != "function" ? (n = t, t = e) : i = e;
33037
33090
  const s = Jm(i), o = n ? -1 : 1;
@@ -33056,7 +33109,7 @@ function tw(r, e, t, n) {
33056
33109
  return f;
33057
33110
  function f() {
33058
33111
  let h = Ym, m, v, y;
33059
- if ((!e || s(l, u, c[c.length - 1] || void 0)) && (h = rw(t(l, c)), h[0] === Id))
33112
+ if ((!e || s(l, u, c[c.length - 1] || void 0)) && (h = iw(t(l, c)), h[0] === Id))
33060
33113
  return h;
33061
33114
  if ("children" in l && l.children) {
33062
33115
  const w = (
@@ -33075,18 +33128,18 @@ function tw(r, e, t, n) {
33075
33128
  }
33076
33129
  }
33077
33130
  }
33078
- function rw(r) {
33079
- return Array.isArray(r) ? r : typeof r == "number" ? [ew, r] : r == null ? Ym : [r];
33131
+ function iw(r) {
33132
+ return Array.isArray(r) ? r : typeof r == "number" ? [rw, r] : r == null ? Ym : [r];
33080
33133
  }
33081
- function nw(r, e, t, n) {
33134
+ function sw(r, e, t, n) {
33082
33135
  let i, s, o;
33083
- typeof e == "function" && typeof t != "function" ? (s = void 0, o = e, i = t) : (s = e, o = t, i = n), tw(r, s, a, i);
33136
+ typeof e == "function" && typeof t != "function" ? (s = void 0, o = e, i = t) : (s = e, o = t, i = n), nw(r, s, a, i);
33084
33137
  function a(l, u) {
33085
33138
  const c = u[u.length - 1], d = c ? c.children.indexOf(l) : void 0;
33086
33139
  return o(l, d, c);
33087
33140
  }
33088
33141
  }
33089
- const iw = [
33142
+ const ow = [
33090
33143
  "theorem",
33091
33144
  "lemma",
33092
33145
  "corollary",
@@ -33094,21 +33147,22 @@ const iw = [
33094
33147
  "claim",
33095
33148
  "fact",
33096
33149
  "proof"
33097
- ], sw = [
33150
+ ], aw = [
33098
33151
  "convention",
33099
33152
  "insight",
33100
33153
  "note",
33101
33154
  "observation",
33102
33155
  "remark",
33103
33156
  "warning"
33104
- ], ow = [
33157
+ ], lw = [
33105
33158
  "assumption",
33106
33159
  "axiom",
33107
33160
  "conjecture",
33108
33161
  "heuristic",
33109
33162
  "hypothesis",
33110
33163
  "principle"
33111
- ], aw = ["introduction", "chapter", "section", "subsection", "worksheet"], lw = ["example", "question", "problem"], uw = ["solution", "answer", "hint"], cw = [
33164
+ ], uw = ["introduction", "part", "chapter", "section", "subsection", "worksheet"], cw = ["example", "question", "problem"], dw = ["solution", "answer", "hint"], hw = [
33165
+ "ptxdoc",
33112
33166
  "p",
33113
33167
  "m",
33114
33168
  "me",
@@ -33116,40 +33170,44 @@ const iw = [
33116
33170
  "ol",
33117
33171
  "ul",
33118
33172
  "li",
33119
- ...aw,
33173
+ ...uw,
33120
33174
  "title",
33121
33175
  "definition",
33122
33176
  "statement",
33123
- ...iw,
33124
33177
  ...ow,
33125
- ...sw,
33126
33178
  ...lw,
33127
- ...uw,
33179
+ ...aw,
33180
+ ...cw,
33181
+ ...dw,
33128
33182
  "term",
33129
33183
  "em",
33130
33184
  "alert",
33131
33185
  "c",
33132
33186
  "pre"
33133
33187
  ];
33134
- function dw(r) {
33135
- const e = m9(r);
33136
- return console.log("xast before: ", e), nw(e, (n, i, s) => {
33137
- if (n.type === "element" && !cw.includes(n.name)) {
33138
- const o = {
33188
+ function fw(r) {
33189
+ let e = r.trim();
33190
+ e = `<ptxdoc>
33191
+ ${e}
33192
+ </ptxdoc>`;
33193
+ const t = v9(e);
33194
+ return console.log("xast before: ", t), sw(t, (i, s, o) => {
33195
+ if (i.type === "element" && !hw.includes(i.name)) {
33196
+ const a = {
33139
33197
  type: "element",
33140
33198
  name: "rawptx",
33141
33199
  attributes: {},
33142
33200
  children: [
33143
33201
  //{type: "text", value: '\n'},
33144
- { type: "text", value: Rd(n) }
33202
+ { type: "text", value: Rd(i) }
33145
33203
  //{type: "text", value: '\n'},
33146
33204
  ]
33147
33205
  };
33148
- return typeof i != "number" || !s ? void 0 : (s.children.splice(i, 1, o), Xm);
33206
+ return typeof s != "number" || !o ? void 0 : (o.children.splice(s, 1, a), Xm);
33149
33207
  }
33150
- }), console.log("xast after: ", e), Rd(e);
33208
+ }), console.log("xast after: ", t), Rd(t);
33151
33209
  }
33152
- function hw() {
33210
+ function pw() {
33153
33211
  return {
33154
33212
  label: {
33155
33213
  parseHTML: (r) => r.getAttribute("label")
@@ -33164,34 +33222,34 @@ function hw() {
33164
33222
  }
33165
33223
  function Tr(r, e) {
33166
33224
  return [
33167
- bt({
33225
+ ht({
33168
33226
  find: new RegExp(`^#${r}\\s$`, "i"),
33169
33227
  type: e
33170
33228
  }),
33171
- bt({
33229
+ ht({
33172
33230
  find: new RegExp(`(?:^)(<${r}>(\\s))$`, "i"),
33173
33231
  type: e
33174
33232
  }),
33175
- bt({
33233
+ ht({
33176
33234
  find: new RegExp(`(?:^)(${r}:(\\s))$`, "i"),
33177
33235
  type: e
33178
33236
  })
33179
33237
  ];
33180
33238
  }
33181
- const fw = [
33239
+ const mw = [
33182
33240
  "theorem",
33183
33241
  "lemma",
33184
33242
  "corollary",
33185
33243
  "proposition",
33186
33244
  "claim",
33187
33245
  "fact"
33188
- ], pw = Se.create({
33246
+ ], gw = ke.create({
33189
33247
  name: "theoremLike",
33190
33248
  addExtensions() {
33191
33249
  const r = [];
33192
- for (const e of fw)
33250
+ for (const e of mw)
33193
33251
  r.push(
33194
- Ce.create({
33252
+ we.create({
33195
33253
  name: e,
33196
33254
  content: "title? statement proof*",
33197
33255
  group: "block theoremLike",
@@ -33206,12 +33264,12 @@ const fw = [
33206
33264
  ];
33207
33265
  },
33208
33266
  addAttributes() {
33209
- return hw();
33267
+ return pw();
33210
33268
  },
33211
33269
  renderHTML({ HTMLAttributes: t }) {
33212
33270
  return [
33213
33271
  "article",
33214
- ye(
33272
+ ve(
33215
33273
  { class: `${e} theorem-like`, ptxtag: e },
33216
33274
  t
33217
33275
  // Include all attributes from the node
@@ -33227,7 +33285,7 @@ const fw = [
33227
33285
  })
33228
33286
  );
33229
33287
  return r.push(
33230
- Ce.create({
33288
+ we.create({
33231
33289
  name: "proof",
33232
33290
  content: "title? BasicBlock+",
33233
33291
  group: "block",
@@ -33239,7 +33297,7 @@ const fw = [
33239
33297
  renderHTML({ HTMLAttributes: e }) {
33240
33298
  return [
33241
33299
  "article",
33242
- ye(
33300
+ ve(
33243
33301
  { class: "proof", ptxtag: "proof" },
33244
33302
  e
33245
33303
  // Include all attributes from the node
@@ -33256,20 +33314,20 @@ const fw = [
33256
33314
  })
33257
33315
  ), r;
33258
33316
  }
33259
- }), mw = [
33317
+ }), vw = [
33260
33318
  "assumption",
33261
33319
  "axiom",
33262
33320
  "conjecture",
33263
33321
  "heuristic",
33264
33322
  "hypothesis",
33265
33323
  "principle"
33266
- ], gw = Se.create({
33324
+ ], yw = ke.create({
33267
33325
  name: "axiomLike",
33268
33326
  addExtensions() {
33269
33327
  const r = [];
33270
- for (const e of mw)
33328
+ for (const e of vw)
33271
33329
  r.push(
33272
- Ce.create({
33330
+ we.create({
33273
33331
  name: e,
33274
33332
  content: "title? statement",
33275
33333
  group: "block axiomLike",
@@ -33285,7 +33343,7 @@ const fw = [
33285
33343
  renderHTML({ HTMLAttributes: t }) {
33286
33344
  return [
33287
33345
  "article",
33288
- ye(
33346
+ ve(
33289
33347
  { class: `${e} axiom-like`, label: e },
33290
33348
  t
33291
33349
  ),
@@ -33302,7 +33360,7 @@ const fw = [
33302
33360
  );
33303
33361
  return r;
33304
33362
  }
33305
- }), vw = Ce.create({
33363
+ }), bw = we.create({
33306
33364
  name: "statement",
33307
33365
  content: "BasicBlock+",
33308
33366
  group: "blockContent",
@@ -33315,13 +33373,13 @@ const fw = [
33315
33373
  addInputRules() {
33316
33374
  return Tr("statement", this.type);
33317
33375
  }
33318
- }), yw = ["example", "question", "problem"], bw = Se.create({
33376
+ }), ww = ["example", "question", "problem"], xw = ke.create({
33319
33377
  name: "exampleLike",
33320
33378
  addExtensions() {
33321
33379
  const r = [];
33322
- for (const e of yw)
33380
+ for (const e of ww)
33323
33381
  r.push(
33324
- Ce.create({
33382
+ we.create({
33325
33383
  name: e,
33326
33384
  content: "title? (BasicBlock*|(statement hint* answer* solution*))",
33327
33385
  group: "block exampleLike",
@@ -33351,7 +33409,7 @@ const fw = [
33351
33409
  renderHTML({ HTMLAttributes: t }) {
33352
33410
  return [
33353
33411
  "article",
33354
- ye(
33412
+ ve(
33355
33413
  { class: `${e} theorem-like`, ptxtag: e },
33356
33414
  t
33357
33415
  // Include all attributes from the node
@@ -33368,7 +33426,7 @@ const fw = [
33368
33426
  );
33369
33427
  for (const e of ["hint", "answer", "solution"])
33370
33428
  r.push(
33371
- Ce.create({
33429
+ we.create({
33372
33430
  name: e,
33373
33431
  content: "title? BasicBlock+",
33374
33432
  group: "block solutionLike",
@@ -33398,7 +33456,7 @@ const fw = [
33398
33456
  renderHTML({ HTMLAttributes: t }) {
33399
33457
  return [
33400
33458
  "article",
33401
- ye(
33459
+ ve(
33402
33460
  { class: "proof", ptxtag: "proof" },
33403
33461
  t
33404
33462
  // Include all attributes from the node
@@ -33416,18 +33474,18 @@ const fw = [
33416
33474
  );
33417
33475
  return r;
33418
33476
  }
33419
- }), ww = [
33477
+ }), Sw = [
33420
33478
  "convention",
33421
33479
  "insight",
33422
33480
  "note",
33423
33481
  "observation",
33424
33482
  "remark",
33425
33483
  "warning"
33426
- ], xw = Se.create({
33484
+ ], kw = ke.create({
33427
33485
  name: "remarkLike",
33428
33486
  addExtensions() {
33429
- return ww.map(
33430
- (r) => Ce.create({
33487
+ return Sw.map(
33488
+ (r) => we.create({
33431
33489
  name: r,
33432
33490
  content: "title? BasicBlock+",
33433
33491
  group: "block remarkLike",
@@ -33443,7 +33501,7 @@ const fw = [
33443
33501
  renderHTML({ HTMLAttributes: e }) {
33444
33502
  return [
33445
33503
  "article",
33446
- ye(
33504
+ ve(
33447
33505
  { class: `${r} remark-like`, label: r },
33448
33506
  e
33449
33507
  ),
@@ -33459,7 +33517,7 @@ const fw = [
33459
33517
  })
33460
33518
  );
33461
33519
  }
33462
- }), Sw = Ce.create({
33520
+ }), Tw = we.create({
33463
33521
  name: "p",
33464
33522
  content: "inline*",
33465
33523
  group: "BasicBlock paragraph",
@@ -33477,25 +33535,25 @@ const fw = [
33477
33535
  renderHTML({ HTMLAttributes: r }) {
33478
33536
  return [
33479
33537
  "div",
33480
- ye({ class: "p", ptxtag: "p" }, r),
33538
+ ve({ class: "p", ptxtag: "p" }, r),
33481
33539
  0
33482
33540
  ];
33483
33541
  },
33484
33542
  addInputRules() {
33485
33543
  return [
33486
- bt({
33544
+ ht({
33487
33545
  find: new RegExp("^#p\\s$"),
33488
33546
  type: this.type
33489
33547
  })
33490
33548
  ];
33491
33549
  }
33492
- }), kw = Se.create({
33550
+ }), Mw = ke.create({
33493
33551
  name: "blocks",
33494
33552
  addExtensions() {
33495
- return [Sw, pw, bw, gw, xw, vw];
33553
+ return [Tw, gw, xw, yw, kw, bw];
33496
33554
  }
33497
33555
  });
33498
- var Va = 4, Tw = /^```([a-z]+)?[\s\n]$/, Mw = /^~~~([a-z]+)?[\s\n]$/, Cw = Ce.create({
33556
+ var Va = 4, Cw = /^```([a-z]+)?[\s\n]$/, Ew = /^~~~([a-z]+)?[\s\n]$/, Aw = we.create({
33499
33557
  name: "codeBlock",
33500
33558
  addOptions() {
33501
33559
  return {
@@ -33540,7 +33598,7 @@ var Va = 4, Tw = /^```([a-z]+)?[\s\n]$/, Mw = /^~~~([a-z]+)?[\s\n]$/, Cw = Ce.cr
33540
33598
  renderHTML({ node: r, HTMLAttributes: e }) {
33541
33599
  return [
33542
33600
  "pre",
33543
- ye(this.options.HTMLAttributes, e),
33601
+ ve(this.options.HTMLAttributes, e),
33544
33602
  [
33545
33603
  "code",
33546
33604
  {
@@ -33668,14 +33726,14 @@ var Va = 4, Tw = /^```([a-z]+)?[\s\n]$/, Mw = /^~~~([a-z]+)?[\s\n]$/, Cw = Ce.cr
33668
33726
  addInputRules() {
33669
33727
  return [
33670
33728
  vl({
33671
- find: Tw,
33729
+ find: Cw,
33672
33730
  type: this.type,
33673
33731
  getAttributes: (r) => ({
33674
33732
  language: r[1]
33675
33733
  })
33676
33734
  }),
33677
33735
  vl({
33678
- find: Mw,
33736
+ find: Ew,
33679
33737
  type: this.type,
33680
33738
  getAttributes: (r) => ({
33681
33739
  language: r[1]
@@ -33704,8 +33762,8 @@ var Va = 4, Tw = /^```([a-z]+)?[\s\n]$/, Mw = /^~~~([a-z]+)?[\s\n]$/, Cw = Ce.cr
33704
33762
  })
33705
33763
  ];
33706
33764
  }
33707
- }), Ew = Cw;
33708
- const Aw = Ce.create({
33765
+ }), Ow = Aw;
33766
+ const Nw = we.create({
33709
33767
  name: "title",
33710
33768
  content: "text*",
33711
33769
  // defining: true,
@@ -33715,7 +33773,7 @@ const Aw = Ce.create({
33715
33773
  renderHTML({ HTMLAttributes: r }) {
33716
33774
  return [
33717
33775
  "div",
33718
- ye({ class: "title", ptxtag: "title" }, r),
33776
+ ve({ class: "title", ptxtag: "title" }, r),
33719
33777
  0
33720
33778
  ];
33721
33779
  },
@@ -33742,7 +33800,7 @@ const Aw = Ce.create({
33742
33800
  ...Tr("title", this.type)
33743
33801
  ];
33744
33802
  }
33745
- }), Ow = Ce.create({
33803
+ }), Dw = we.create({
33746
33804
  name: "definition",
33747
33805
  content: "title? statement",
33748
33806
  group: "block definitionLike",
@@ -33761,7 +33819,7 @@ const Aw = Ce.create({
33761
33819
  renderHTML({ HTMLAttributes: r }) {
33762
33820
  return [
33763
33821
  "article",
33764
- ye(
33822
+ ve(
33765
33823
  { class: "definition definition-like", label: "definition" },
33766
33824
  r
33767
33825
  ),
@@ -33774,7 +33832,7 @@ const Aw = Ce.create({
33774
33832
  addInputRules() {
33775
33833
  return Tr("definition", this.type);
33776
33834
  }
33777
- }), Nw = Ce.create({
33835
+ }), Rw = we.create({
33778
33836
  name: "rawptx",
33779
33837
  content: "text*",
33780
33838
  marks: "",
@@ -33794,7 +33852,7 @@ const Aw = Ce.create({
33794
33852
  renderHTML({ HTMLAttributes: r }) {
33795
33853
  return [
33796
33854
  "pre",
33797
- ye({ class: "rawptx", ptxtag: "rawptx" }, r),
33855
+ ve({ class: "rawptx", ptxtag: "rawptx" }, r),
33798
33856
  0
33799
33857
  ];
33800
33858
  }
@@ -33808,9 +33866,10 @@ const Aw = Ce.create({
33808
33866
  function Pd(r) {
33809
33867
  return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
33810
33868
  }
33811
- function Dw(r) {
33869
+ function Iw(r) {
33812
33870
  let e = "";
33813
- return r.type !== "ptxFragment" ? (console.log("Top level node is not a ptxFragment"), "") : r.content ? r.content.length !== 1 ? (console.log("More than one child in json.content"), "") : (e += Zm(r.content[0]), e) : (console.log("No content in json"), "");
33871
+ return r.type !== "ptxFragment" ? (console.log("Top level node is not a ptxFragment"), "") : r.content ? r.content.length !== 1 ? (console.log("More than one child in json.content"), "") : (e += Zm(r.content[0]), e = e.replace(/^<ptxdoc>\s*/, `
33872
+ `).replace(/\s*<\/ptxdoc>/, ""), e) : (console.log("No content in json"), "");
33814
33873
  }
33815
33874
  function Zm(r) {
33816
33875
  let e = "";
@@ -33846,12 +33905,12 @@ function Zm(r) {
33846
33905
  const Qm = ["top", "right", "bottom", "left"], zd = ["start", "end"], Ld = /* @__PURE__ */ Qm.reduce((r, e) => r.concat(e, e + "-" + zd[0], e + "-" + zd[1]), []), nr = Math.min, ut = Math.max, no = Math.round, Qt = (r) => ({
33847
33906
  x: r,
33848
33907
  y: r
33849
- }), Rw = {
33908
+ }), Pw = {
33850
33909
  left: "right",
33851
33910
  right: "left",
33852
33911
  bottom: "top",
33853
33912
  top: "bottom"
33854
- }, Iw = {
33913
+ }, zw = {
33855
33914
  start: "end",
33856
33915
  end: "start"
33857
33916
  };
@@ -33873,9 +33932,9 @@ function e1(r) {
33873
33932
  function H0(r) {
33874
33933
  return r === "y" ? "height" : "width";
33875
33934
  }
33876
- const Pw = /* @__PURE__ */ new Set(["top", "bottom"]);
33935
+ const Lw = /* @__PURE__ */ new Set(["top", "bottom"]);
33877
33936
  function Zt(r) {
33878
- return Pw.has($t(r)) ? "y" : "x";
33937
+ return Lw.has($t(r)) ? "y" : "x";
33879
33938
  }
33880
33939
  function V0(r) {
33881
33940
  return e1(Zt(r));
@@ -33886,35 +33945,35 @@ function t1(r, e, t) {
33886
33945
  let o = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
33887
33946
  return e.reference[s] > e.floating[s] && (o = so(o)), [o, so(o)];
33888
33947
  }
33889
- function zw(r) {
33948
+ function Bw(r) {
33890
33949
  const e = so(r);
33891
33950
  return [io(r), e, io(e)];
33892
33951
  }
33893
33952
  function io(r) {
33894
- return r.replace(/start|end/g, (e) => Iw[e]);
33953
+ return r.replace(/start|end/g, (e) => zw[e]);
33895
33954
  }
33896
- const Bd = ["left", "right"], Fd = ["right", "left"], Lw = ["top", "bottom"], Bw = ["bottom", "top"];
33897
- function Fw(r, e, t) {
33955
+ const Bd = ["left", "right"], Fd = ["right", "left"], Fw = ["top", "bottom"], $w = ["bottom", "top"];
33956
+ function Hw(r, e, t) {
33898
33957
  switch (r) {
33899
33958
  case "top":
33900
33959
  case "bottom":
33901
33960
  return t ? e ? Fd : Bd : e ? Bd : Fd;
33902
33961
  case "left":
33903
33962
  case "right":
33904
- return e ? Lw : Bw;
33963
+ return e ? Fw : $w;
33905
33964
  default:
33906
33965
  return [];
33907
33966
  }
33908
33967
  }
33909
- function $w(r, e, t, n) {
33968
+ function Vw(r, e, t, n) {
33910
33969
  const i = Wt(r);
33911
- let s = Fw($t(r), t === "start", n);
33970
+ let s = Hw($t(r), t === "start", n);
33912
33971
  return i && (s = s.map((o) => o + "-" + i), e && (s = s.concat(s.map(io)))), s;
33913
33972
  }
33914
33973
  function so(r) {
33915
- return r.replace(/left|right|bottom|top/g, (e) => Rw[e]);
33974
+ return r.replace(/left|right|bottom|top/g, (e) => Pw[e]);
33916
33975
  }
33917
- function Hw(r) {
33976
+ function _w(r) {
33918
33977
  return {
33919
33978
  top: 0,
33920
33979
  right: 0,
@@ -33924,7 +33983,7 @@ function Hw(r) {
33924
33983
  };
33925
33984
  }
33926
33985
  function _0(r) {
33927
- return typeof r != "number" ? Hw(r) : {
33986
+ return typeof r != "number" ? _w(r) : {
33928
33987
  top: r,
33929
33988
  right: r,
33930
33989
  bottom: r,
@@ -33997,7 +34056,7 @@ function $d(r, e, t) {
33997
34056
  }
33998
34057
  return h;
33999
34058
  }
34000
- const Vw = async (r, e, t) => {
34059
+ const jw = async (r, e, t) => {
34001
34060
  const {
34002
34061
  placement: n = "bottom",
34003
34062
  strategy: i = "absolute",
@@ -34103,7 +34162,7 @@ async function Kn(r, e) {
34103
34162
  right: (O.right - w.right + m.right) / I.x
34104
34163
  };
34105
34164
  }
34106
- const _w = (r) => ({
34165
+ const qw = (r) => ({
34107
34166
  name: "arrow",
34108
34167
  options: r,
34109
34168
  async fn(e) {
@@ -34141,10 +34200,10 @@ const _w = (r) => ({
34141
34200
  };
34142
34201
  }
34143
34202
  });
34144
- function jw(r, e, t) {
34203
+ function Ww(r, e, t) {
34145
34204
  return (r ? [...t.filter((i) => Wt(i) === r), ...t.filter((i) => Wt(i) !== r)] : t.filter((i) => $t(i) === i)).filter((i) => r ? Wt(i) === r || (e ? io(i) !== i : !1) : !0);
34146
34205
  }
34147
- const qw = function(r) {
34206
+ const Uw = function(r) {
34148
34207
  return r === void 0 && (r = {}), {
34149
34208
  name: "autoPlacement",
34150
34209
  options: r,
@@ -34162,7 +34221,7 @@ const qw = function(r) {
34162
34221
  allowedPlacements: f = Ld,
34163
34222
  autoAlignment: h = !0,
34164
34223
  ...m
34165
- } = Er(r, e), v = d !== void 0 || f === Ld ? jw(d || null, h, f) : f, y = await Kn(e, m), w = ((t = o.autoPlacement) == null ? void 0 : t.index) || 0, k = v[w];
34224
+ } = Er(r, e), v = d !== void 0 || f === Ld ? Ww(d || null, h, f) : f, y = await Kn(e, m), w = ((t = o.autoPlacement) == null ? void 0 : t.index) || 0, k = v[w];
34166
34225
  if (k == null)
34167
34226
  return {};
34168
34227
  const E = t1(k, s, await (l.isRTL == null ? void 0 : l.isRTL(u.floating)));
@@ -34212,7 +34271,7 @@ const qw = function(r) {
34212
34271
  } : {};
34213
34272
  }
34214
34273
  };
34215
- }, Ww = function(r) {
34274
+ }, Gw = function(r) {
34216
34275
  return r === void 0 && (r = {}), {
34217
34276
  name: "flip",
34218
34277
  options: r,
@@ -34236,8 +34295,8 @@ const qw = function(r) {
34236
34295
  } = Er(r, e);
34237
34296
  if ((t = s.arrow) != null && t.alignmentOffset)
34238
34297
  return {};
34239
- const w = $t(i), k = Zt(a), E = $t(a) === a, I = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), O = f || (E || !v ? [so(a)] : zw(a)), N = m !== "none";
34240
- !f && N && O.push(...$w(a, v, m, I));
34298
+ const w = $t(i), k = Zt(a), E = $t(a) === a, I = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), O = f || (E || !v ? [so(a)] : Bw(a)), N = m !== "none";
34299
+ !f && N && O.push(...Vw(a, v, m, I));
34241
34300
  const D = [a, ...O], L = await Kn(e, y), z = [];
34242
34301
  let $ = ((n = s.flip) == null ? void 0 : n.overflows) || [];
34243
34302
  if (c && z.push(L[w]), d) {
@@ -34269,13 +34328,13 @@ const qw = function(r) {
34269
34328
  var ue;
34270
34329
  const me = (ue = $.filter((Q) => {
34271
34330
  if (N) {
34272
- const we = Zt(Q.placement);
34273
- return we === k || // Create a bias to the `y` side axis due to horizontal
34331
+ const xe = Zt(Q.placement);
34332
+ return xe === k || // Create a bias to the `y` side axis due to horizontal
34274
34333
  // reading directions favoring greater width.
34275
- we === "y";
34334
+ xe === "y";
34276
34335
  }
34277
34336
  return !0;
34278
- }).map((Q) => [Q.placement, Q.overflows.filter((we) => we > 0).reduce((we, C) => we + C, 0)]).sort((Q, we) => Q[1] - we[1])[0]) == null ? void 0 : ue[0];
34337
+ }).map((Q) => [Q.placement, Q.overflows.filter((xe) => xe > 0).reduce((xe, C) => xe + C, 0)]).sort((Q, xe) => Q[1] - xe[1])[0]) == null ? void 0 : ue[0];
34279
34338
  me && (X = me);
34280
34339
  break;
34281
34340
  }
@@ -34305,7 +34364,7 @@ function Hd(r, e) {
34305
34364
  function Vd(r) {
34306
34365
  return Qm.some((e) => r[e] >= 0);
34307
34366
  }
34308
- const Uw = function(r) {
34367
+ const Kw = function(r) {
34309
34368
  return r === void 0 && (r = {}), {
34310
34369
  name: "hide",
34311
34370
  options: r,
@@ -34356,7 +34415,7 @@ function r1(r) {
34356
34415
  height: i - t
34357
34416
  };
34358
34417
  }
34359
- function Gw(r) {
34418
+ function Jw(r) {
34360
34419
  const e = r.slice().sort((i, s) => i.y - s.y), t = [];
34361
34420
  let n = null;
34362
34421
  for (let i = 0; i < e.length; i++) {
@@ -34365,7 +34424,7 @@ function Gw(r) {
34365
34424
  }
34366
34425
  return t.map((i) => Gn(r1(i)));
34367
34426
  }
34368
- const Kw = function(r) {
34427
+ const Yw = function(r) {
34369
34428
  return r === void 0 && (r = {}), {
34370
34429
  name: "inline",
34371
34430
  options: r,
@@ -34380,7 +34439,7 @@ const Kw = function(r) {
34380
34439
  padding: a = 2,
34381
34440
  x: l,
34382
34441
  y: u
34383
- } = Er(r, e), c = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(n.reference)) || []), d = Gw(c), f = Gn(r1(c)), h = _0(a);
34442
+ } = Er(r, e), c = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(n.reference)) || []), d = Jw(c), f = Gn(r1(c)), h = _0(a);
34384
34443
  function m() {
34385
34444
  if (d.length === 2 && d[0].left > d[1].right && l != null && u != null)
34386
34445
  return d.find((y) => l > y.left - h.left && l < y.right + h.right && u > y.top - h.top && u < y.bottom + h.bottom) || f;
@@ -34426,13 +34485,13 @@ const Kw = function(r) {
34426
34485
  } : {};
34427
34486
  }
34428
34487
  };
34429
- }, Jw = /* @__PURE__ */ new Set(["left", "top"]);
34430
- async function Yw(r, e) {
34488
+ }, Xw = /* @__PURE__ */ new Set(["left", "top"]);
34489
+ async function Zw(r, e) {
34431
34490
  const {
34432
34491
  placement: t,
34433
34492
  platform: n,
34434
34493
  elements: i
34435
- } = r, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), o = $t(t), a = Wt(t), l = Zt(t) === "y", u = Jw.has(o) ? -1 : 1, c = s && l ? -1 : 1, d = Er(e, r);
34494
+ } = r, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), o = $t(t), a = Wt(t), l = Zt(t) === "y", u = Xw.has(o) ? -1 : 1, c = s && l ? -1 : 1, d = Er(e, r);
34436
34495
  let {
34437
34496
  mainAxis: f,
34438
34497
  crossAxis: h,
@@ -34454,7 +34513,7 @@ async function Yw(r, e) {
34454
34513
  y: h * c
34455
34514
  };
34456
34515
  }
34457
- const Xw = function(r) {
34516
+ const Qw = function(r) {
34458
34517
  return r === void 0 && (r = 0), {
34459
34518
  name: "offset",
34460
34519
  options: r,
@@ -34465,7 +34524,7 @@ const Xw = function(r) {
34465
34524
  y: s,
34466
34525
  placement: o,
34467
34526
  middlewareData: a
34468
- } = e, l = await Yw(e, r);
34527
+ } = e, l = await Zw(e, r);
34469
34528
  return o === ((t = a.offset) == null ? void 0 : t.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
34470
34529
  x: i + l.x,
34471
34530
  y: s + l.y,
@@ -34476,7 +34535,7 @@ const Xw = function(r) {
34476
34535
  };
34477
34536
  }
34478
34537
  };
34479
- }, Zw = function(r) {
34538
+ }, ex = function(r) {
34480
34539
  return r === void 0 && (r = {}), {
34481
34540
  name: "shift",
34482
34541
  options: r,
@@ -34532,7 +34591,7 @@ const Xw = function(r) {
34532
34591
  };
34533
34592
  }
34534
34593
  };
34535
- }, Qw = function(r) {
34594
+ }, tx = function(r) {
34536
34595
  return r === void 0 && (r = {}), {
34537
34596
  name: "size",
34538
34597
  options: r,
@@ -34599,7 +34658,7 @@ function ir(r) {
34599
34658
  function _d(r) {
34600
34659
  return !Bo() || typeof ShadowRoot > "u" ? !1 : r instanceof ShadowRoot || r instanceof Ot(r).ShadowRoot;
34601
34660
  }
34602
- const ex = /* @__PURE__ */ new Set(["inline", "contents"]);
34661
+ const rx = /* @__PURE__ */ new Set(["inline", "contents"]);
34603
34662
  function Gi(r) {
34604
34663
  const {
34605
34664
  overflow: e,
@@ -34607,15 +34666,15 @@ function Gi(r) {
34607
34666
  overflowY: n,
34608
34667
  display: i
34609
34668
  } = Gt(r);
34610
- return /auto|scroll|overlay|hidden|clip/.test(e + n + t) && !ex.has(i);
34669
+ return /auto|scroll|overlay|hidden|clip/.test(e + n + t) && !rx.has(i);
34611
34670
  }
34612
- const tx = /* @__PURE__ */ new Set(["table", "td", "th"]);
34613
- function rx(r) {
34614
- return tx.has(ei(r));
34671
+ const nx = /* @__PURE__ */ new Set(["table", "td", "th"]);
34672
+ function ix(r) {
34673
+ return nx.has(ei(r));
34615
34674
  }
34616
- const nx = [":popover-open", ":modal"];
34675
+ const sx = [":popover-open", ":modal"];
34617
34676
  function Fo(r) {
34618
- return nx.some((e) => {
34677
+ return sx.some((e) => {
34619
34678
  try {
34620
34679
  return r.matches(e);
34621
34680
  } catch {
@@ -34623,12 +34682,12 @@ function Fo(r) {
34623
34682
  }
34624
34683
  });
34625
34684
  }
34626
- const ix = ["transform", "translate", "scale", "rotate", "perspective"], sx = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ox = ["paint", "layout", "strict", "content"];
34685
+ const ox = ["transform", "translate", "scale", "rotate", "perspective"], ax = ["transform", "translate", "scale", "rotate", "perspective", "filter"], lx = ["paint", "layout", "strict", "content"];
34627
34686
  function j0(r) {
34628
34687
  const e = q0(), t = Ut(r) ? Gt(r) : r;
34629
- return ix.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || sx.some((n) => (t.willChange || "").includes(n)) || ox.some((n) => (t.contain || "").includes(n));
34688
+ return ox.some((n) => t[n] ? t[n] !== "none" : !1) || (t.containerType ? t.containerType !== "normal" : !1) || !e && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !e && (t.filter ? t.filter !== "none" : !1) || ax.some((n) => (t.willChange || "").includes(n)) || lx.some((n) => (t.contain || "").includes(n));
34630
34689
  }
34631
- function ax(r) {
34690
+ function ux(r) {
34632
34691
  let e = tn(r);
34633
34692
  for (; ir(e) && !Jn(e); ) {
34634
34693
  if (j0(e))
@@ -34642,9 +34701,9 @@ function ax(r) {
34642
34701
  function q0() {
34643
34702
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
34644
34703
  }
34645
- const lx = /* @__PURE__ */ new Set(["html", "body", "#document"]);
34704
+ const cx = /* @__PURE__ */ new Set(["html", "body", "#document"]);
34646
34705
  function Jn(r) {
34647
- return lx.has(ei(r));
34706
+ return cx.has(ei(r));
34648
34707
  }
34649
34708
  function Gt(r) {
34650
34709
  return Ot(r).getComputedStyle(r);
@@ -34711,15 +34770,15 @@ function $n(r) {
34711
34770
  y: a
34712
34771
  };
34713
34772
  }
34714
- const ux = /* @__PURE__ */ Qt(0);
34773
+ const dx = /* @__PURE__ */ Qt(0);
34715
34774
  function l1(r) {
34716
34775
  const e = Ot(r);
34717
- return !q0() || !e.visualViewport ? ux : {
34776
+ return !q0() || !e.visualViewport ? dx : {
34718
34777
  x: e.visualViewport.offsetLeft,
34719
34778
  y: e.visualViewport.offsetTop
34720
34779
  };
34721
34780
  }
34722
- function cx(r, e, t) {
34781
+ function hx(r, e, t) {
34723
34782
  return e === void 0 && (e = !1), !t || e && t !== Ot(r) ? !1 : e;
34724
34783
  }
34725
34784
  function Li(r, e, t, n) {
@@ -34727,7 +34786,7 @@ function Li(r, e, t, n) {
34727
34786
  const i = r.getBoundingClientRect(), s = a1(r);
34728
34787
  let o = Qt(1);
34729
34788
  e && (n ? Ut(n) && (o = $n(n)) : o = $n(r));
34730
- const a = cx(s, t, n) ? l1(s) : Qt(0);
34789
+ const a = hx(s, t, n) ? l1(s) : Qt(0);
34731
34790
  let l = (i.left + a.x) / o.x, u = (i.top + a.y) / o.y, c = i.width / o.x, d = i.height / o.y;
34732
34791
  if (s) {
34733
34792
  const f = Ot(s), h = n && Ut(n) ? Ot(n) : n;
@@ -34755,7 +34814,7 @@ function u1(r, e) {
34755
34814
  y: i
34756
34815
  };
34757
34816
  }
34758
- function dx(r) {
34817
+ function fx(r) {
34759
34818
  let {
34760
34819
  elements: e,
34761
34820
  rect: t,
@@ -34782,10 +34841,10 @@ function dx(r) {
34782
34841
  y: t.y * u.y - l.scrollTop * u.y + c.y + f.y
34783
34842
  };
34784
34843
  }
34785
- function hx(r) {
34844
+ function px(r) {
34786
34845
  return Array.from(r.getClientRects());
34787
34846
  }
34788
- function fx(r) {
34847
+ function mx(r) {
34789
34848
  const e = Ar(r), t = $o(r), n = r.ownerDocument.body, i = ut(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), s = ut(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
34790
34849
  let o = -t.scrollLeft + Ho(r);
34791
34850
  const a = -t.scrollTop;
@@ -34797,7 +34856,7 @@ function fx(r) {
34797
34856
  };
34798
34857
  }
34799
34858
  const jd = 25;
34800
- function px(r, e) {
34859
+ function gx(r, e) {
34801
34860
  const t = Ot(r), n = Ar(r), i = t.visualViewport;
34802
34861
  let s = n.clientWidth, o = n.clientHeight, a = 0, l = 0;
34803
34862
  if (i) {
@@ -34817,8 +34876,8 @@ function px(r, e) {
34817
34876
  y: l
34818
34877
  };
34819
34878
  }
34820
- const mx = /* @__PURE__ */ new Set(["absolute", "fixed"]);
34821
- function gx(r, e) {
34879
+ const vx = /* @__PURE__ */ new Set(["absolute", "fixed"]);
34880
+ function yx(r, e) {
34822
34881
  const t = Li(r, !0, e === "fixed"), n = t.top + r.clientTop, i = t.left + r.clientLeft, s = ir(r) ? $n(r) : Qt(1), o = r.clientWidth * s.x, a = r.clientHeight * s.y, l = i * s.x, u = n * s.y;
34823
34882
  return {
34824
34883
  width: o,
@@ -34830,11 +34889,11 @@ function gx(r, e) {
34830
34889
  function qd(r, e, t) {
34831
34890
  let n;
34832
34891
  if (e === "viewport")
34833
- n = px(r, t);
34892
+ n = gx(r, t);
34834
34893
  else if (e === "document")
34835
- n = fx(Ar(r));
34894
+ n = mx(Ar(r));
34836
34895
  else if (Ut(e))
34837
- n = gx(e, t);
34896
+ n = yx(e, t);
34838
34897
  else {
34839
34898
  const i = l1(r);
34840
34899
  n = {
@@ -34850,7 +34909,7 @@ function c1(r, e) {
34850
34909
  const t = tn(r);
34851
34910
  return t === e || !Ut(t) || Jn(t) ? !1 : Gt(t).position === "fixed" || c1(t, e);
34852
34911
  }
34853
- function vx(r, e) {
34912
+ function bx(r, e) {
34854
34913
  const t = e.get(r);
34855
34914
  if (t)
34856
34915
  return t;
@@ -34859,18 +34918,18 @@ function vx(r, e) {
34859
34918
  let o = s ? tn(r) : r;
34860
34919
  for (; Ut(o) && !Jn(o); ) {
34861
34920
  const a = Gt(o), l = j0(o);
34862
- !l && a.position === "fixed" && (i = null), (s ? !l && !i : !l && a.position === "static" && !!i && mx.has(i.position) || Gi(o) && !l && c1(r, o)) ? n = n.filter((c) => c !== o) : i = a, o = tn(o);
34921
+ !l && a.position === "fixed" && (i = null), (s ? !l && !i : !l && a.position === "static" && !!i && vx.has(i.position) || Gi(o) && !l && c1(r, o)) ? n = n.filter((c) => c !== o) : i = a, o = tn(o);
34863
34922
  }
34864
34923
  return e.set(r, n), n;
34865
34924
  }
34866
- function yx(r) {
34925
+ function wx(r) {
34867
34926
  let {
34868
34927
  element: e,
34869
34928
  boundary: t,
34870
34929
  rootBoundary: n,
34871
34930
  strategy: i
34872
34931
  } = r;
34873
- const o = [...t === "clippingAncestors" ? Fo(e) ? [] : vx(e, this._c) : [].concat(t), n], a = o[0], l = o.reduce((u, c) => {
34932
+ const o = [...t === "clippingAncestors" ? Fo(e) ? [] : bx(e, this._c) : [].concat(t), n], a = o[0], l = o.reduce((u, c) => {
34874
34933
  const d = qd(e, c, i);
34875
34934
  return u.top = ut(d.top, u.top), u.right = nr(d.right, u.right), u.bottom = nr(d.bottom, u.bottom), u.left = ut(d.left, u.left), u;
34876
34935
  }, qd(e, a, i));
@@ -34881,7 +34940,7 @@ function yx(r) {
34881
34940
  y: l.top
34882
34941
  };
34883
34942
  }
34884
- function bx(r) {
34943
+ function xx(r) {
34885
34944
  const {
34886
34945
  width: e,
34887
34946
  height: t
@@ -34891,7 +34950,7 @@ function bx(r) {
34891
34950
  height: t
34892
34951
  };
34893
34952
  }
34894
- function wx(r, e, t) {
34953
+ function Sx(r, e, t) {
34895
34954
  const n = ir(e), i = Ar(e), s = t === "fixed", o = Li(r, !0, s, e);
34896
34955
  let a = {
34897
34956
  scrollLeft: 0,
@@ -34940,14 +34999,14 @@ function d1(r, e) {
34940
34999
  return t;
34941
35000
  }
34942
35001
  let n = Wd(r, e);
34943
- for (; n && rx(n) && _a(n); )
35002
+ for (; n && ix(n) && _a(n); )
34944
35003
  n = Wd(n, e);
34945
- return n && Jn(n) && _a(n) && !j0(n) ? t : n || ax(r) || t;
35004
+ return n && Jn(n) && _a(n) && !j0(n) ? t : n || ux(r) || t;
34946
35005
  }
34947
- const xx = async function(r) {
35006
+ const kx = async function(r) {
34948
35007
  const e = this.getOffsetParent || d1, t = this.getDimensions, n = await t(r.floating);
34949
35008
  return {
34950
- reference: wx(r.reference, await e(r.floating), r.strategy),
35009
+ reference: Sx(r.reference, await e(r.floating), r.strategy),
34951
35010
  floating: {
34952
35011
  x: 0,
34953
35012
  y: 0,
@@ -34956,29 +35015,29 @@ const xx = async function(r) {
34956
35015
  }
34957
35016
  };
34958
35017
  };
34959
- function Sx(r) {
35018
+ function Tx(r) {
34960
35019
  return Gt(r).direction === "rtl";
34961
35020
  }
34962
- const kx = {
34963
- convertOffsetParentRelativeRectToViewportRelativeRect: dx,
35021
+ const Mx = {
35022
+ convertOffsetParentRelativeRectToViewportRelativeRect: fx,
34964
35023
  getDocumentElement: Ar,
34965
- getClippingRect: yx,
35024
+ getClippingRect: wx,
34966
35025
  getOffsetParent: d1,
34967
- getElementRects: xx,
34968
- getClientRects: hx,
34969
- getDimensions: bx,
35026
+ getElementRects: kx,
35027
+ getClientRects: px,
35028
+ getDimensions: xx,
34970
35029
  getScale: $n,
34971
35030
  isElement: Ut,
34972
- isRTL: Sx
34973
- }, h1 = Xw, f1 = qw, p1 = Zw, m1 = Ww, g1 = Qw, v1 = Uw, y1 = _w, b1 = Kw, w1 = (r, e, t) => {
35031
+ isRTL: Tx
35032
+ }, h1 = Qw, f1 = Uw, p1 = ex, m1 = Gw, g1 = tx, v1 = Kw, y1 = qw, b1 = Yw, w1 = (r, e, t) => {
34974
35033
  const n = /* @__PURE__ */ new Map(), i = {
34975
- platform: kx,
35034
+ platform: Mx,
34976
35035
  ...t
34977
35036
  }, s = {
34978
35037
  ...i.platform,
34979
35038
  _c: n
34980
35039
  };
34981
- return Vw(r, e, {
35040
+ return jw(r, e, {
34982
35041
  ...i,
34983
35042
  platform: s
34984
35043
  });
@@ -35053,12 +35112,12 @@ var fr = class {
35053
35112
  }
35054
35113
  }
35055
35114
  static get(r) {
35056
- return zl(r) || Ll(r, Tx(r));
35115
+ return zl(r) || Ll(r, Cx(r));
35057
35116
  }
35058
35117
  };
35059
- function Tx(r) {
35118
+ function Cx(r) {
35060
35119
  if (r.type.spec.tableRole != "table") throw new RangeError("Not a table node: " + r.type.name);
35061
- const e = Mx(r), t = r.childCount, n = [];
35120
+ const e = Ex(r), t = r.childCount, n = [];
35062
35121
  let i = 0, s = null;
35063
35122
  const o = [];
35064
35123
  for (let u = 0, c = e * t; u < c; u++) n[u] = 0;
@@ -35108,9 +35167,9 @@ function Tx(r) {
35108
35167
  const a = new fr(e, t, n, s);
35109
35168
  let l = !1;
35110
35169
  for (let u = 0; !l && u < o.length; u += 2) o[u] != null && o[u + 1] < t && (l = !0);
35111
- return l && Cx(a, o, r), a;
35170
+ return l && Ax(a, o, r), a;
35112
35171
  }
35113
- function Mx(r) {
35172
+ function Ex(r) {
35114
35173
  let e = -1, t = !1;
35115
35174
  for (let n = 0; n < r.childCount; n++) {
35116
35175
  const i = r.child(n);
@@ -35130,7 +35189,7 @@ function Mx(r) {
35130
35189
  }
35131
35190
  return e;
35132
35191
  }
35133
- function Cx(r, e, t) {
35192
+ function Ax(r, e, t) {
35134
35193
  r.problems || (r.problems = []);
35135
35194
  const n = {};
35136
35195
  for (let i = 0; i < r.map.length; i++) {
@@ -35143,7 +35202,7 @@ function Cx(r, e, t) {
35143
35202
  const l = o.attrs;
35144
35203
  for (let u = 0; u < l.colspan; u++) {
35145
35204
  const c = e[(i + u) % r.width * 2];
35146
- c != null && (!l.colwidth || l.colwidth[u] != c) && ((a || (a = Ex(l)))[u] = c);
35205
+ c != null && (!l.colwidth || l.colwidth[u] != c) && ((a || (a = Ox(l)))[u] = c);
35147
35206
  }
35148
35207
  a && r.problems.unshift({
35149
35208
  type: "colwidth mismatch",
@@ -35152,7 +35211,7 @@ function Cx(r, e, t) {
35152
35211
  });
35153
35212
  }
35154
35213
  }
35155
- function Ex(r) {
35214
+ function Ox(r) {
35156
35215
  if (r.colwidth) return r.colwidth.slice();
35157
35216
  const e = [];
35158
35217
  for (let t = 0; t < r.colspan; t++) e.push(0);
@@ -35170,7 +35229,7 @@ function W0(r) {
35170
35229
  return e;
35171
35230
  }
35172
35231
  new qe("selectingCells");
35173
- function Ax(r) {
35232
+ function Nx(r) {
35174
35233
  for (let e = r.depth - 1; e > 0; e--) if (r.node(e).type.spec.tableRole == "row") return r.node(0).resolve(r.before(e + 1));
35175
35234
  return null;
35176
35235
  }
@@ -35179,15 +35238,15 @@ function x1(r) {
35179
35238
  for (let t = e.depth; t > 0; t--) if (e.node(t).type.spec.tableRole == "row") return !0;
35180
35239
  return !1;
35181
35240
  }
35182
- function Ox(r) {
35241
+ function Dx(r) {
35183
35242
  const e = r.selection;
35184
35243
  if ("$anchorCell" in e && e.$anchorCell) return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
35185
35244
  if ("node" in e && e.node && e.node.type.spec.tableRole == "cell") return e.$anchor;
35186
- const t = Ax(e.$head) || Nx(e.$head);
35245
+ const t = Nx(e.$head) || Rx(e.$head);
35187
35246
  if (t) return t;
35188
35247
  throw new RangeError(`No cell found around position ${e.head}`);
35189
35248
  }
35190
- function Nx(r) {
35249
+ function Rx(r) {
35191
35250
  for (let e = r.nodeAfter, t = r.pos; e; e = e.firstChild, t++) {
35192
35251
  const n = e.type.spec.tableRole;
35193
35252
  if (n == "cell" || n == "header_cell") return r.doc.resolve(t);
@@ -35319,12 +35378,12 @@ var er = class cr extends ae {
35319
35378
  return new cr(e.resolve(t), e.resolve(n));
35320
35379
  }
35321
35380
  getBookmark() {
35322
- return new Dx(this.$anchorCell.pos, this.$headCell.pos);
35381
+ return new Ix(this.$anchorCell.pos, this.$headCell.pos);
35323
35382
  }
35324
35383
  };
35325
35384
  er.prototype.visible = !1;
35326
35385
  ae.jsonID("cell", er);
35327
- var Dx = class T1 {
35386
+ var Ix = class T1 {
35328
35387
  constructor(e, t) {
35329
35388
  this.anchor = e, this.head = t;
35330
35389
  }
@@ -35338,7 +35397,7 @@ var Dx = class T1 {
35338
35397
  };
35339
35398
  new qe("fix-tables");
35340
35399
  function M1(r) {
35341
- const e = r.selection, t = Ox(r), n = t.node(-1), i = t.start(-1), s = fr.get(n);
35400
+ const e = r.selection, t = Dx(r), n = t.node(-1), i = t.start(-1), s = fr.get(n);
35342
35401
  return {
35343
35402
  ...e instanceof er ? s.rectBetween(e.$anchorCell.pos - i, e.$headCell.pos - i) : s.findCell(t.pos - i),
35344
35403
  tableStart: i,
@@ -35346,7 +35405,7 @@ function M1(r) {
35346
35405
  table: n
35347
35406
  };
35348
35407
  }
35349
- function Rx(r) {
35408
+ function Px(r) {
35350
35409
  return function(e, t) {
35351
35410
  if (!x1(e)) return !1;
35352
35411
  if (t) {
@@ -35382,7 +35441,7 @@ function Kd(r, e, t) {
35382
35441
  return !0;
35383
35442
  }
35384
35443
  function U0(r, e) {
35385
- return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? Rx(r) : function(t, n) {
35444
+ return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? Px(r) : function(t, n) {
35386
35445
  if (!x1(t)) return !1;
35387
35446
  if (n) {
35388
35447
  const i = W0(t.schema), s = M1(t), o = t.tr, a = Kd("row", s, i), l = Kd("column", s, i), u = (r === "column" ? a : r === "row" && l) ? 1 : 0, c = r == "column" ? {
@@ -35480,11 +35539,11 @@ function C1(r, e, t) {
35480
35539
  return null;
35481
35540
  }
35482
35541
  new qe("tableColumnResizing");
35483
- function Ix(r, e) {
35542
+ function zx(r, e) {
35484
35543
  const t = Math.min(r.top, e.top), n = Math.max(r.bottom, e.bottom), i = Math.min(r.left, e.left), o = Math.max(r.right, e.right) - i, a = n - t, l = i, u = t;
35485
35544
  return new DOMRect(l, u, o, a);
35486
35545
  }
35487
- var Px = class {
35546
+ var Lx = class {
35488
35547
  constructor({
35489
35548
  editor: r,
35490
35549
  element: e,
@@ -35594,7 +35653,7 @@ var Px = class {
35594
35653
  const { $anchorCell: s, $headCell: o } = e, a = s ? s.pos : o.pos, l = o ? o.pos : s.pos, u = this.view.nodeDOM(a), c = this.view.nodeDOM(l);
35595
35654
  if (!u || !c)
35596
35655
  return;
35597
- const d = u === c ? u.getBoundingClientRect() : Ix(
35656
+ const d = u === c ? u.getBoundingClientRect() : zx(
35598
35657
  u.getBoundingClientRect(),
35599
35658
  c.getBoundingClientRect()
35600
35659
  );
@@ -35653,9 +35712,9 @@ var Px = class {
35653
35712
  }
35654
35713
  }, E1 = (r) => new Ve({
35655
35714
  key: typeof r.pluginKey == "string" ? new qe(r.pluginKey) : r.pluginKey,
35656
- view: (e) => new Px({ view: e, ...r })
35715
+ view: (e) => new Lx({ view: e, ...r })
35657
35716
  });
35658
- Se.create({
35717
+ ke.create({
35659
35718
  name: "bubbleMenu",
35660
35719
  addOptions() {
35661
35720
  return {
@@ -35681,7 +35740,7 @@ Se.create({
35681
35740
  ] : [];
35682
35741
  }
35683
35742
  });
35684
- var zx = class {
35743
+ var Bx = class {
35685
35744
  constructor({ editor: r, element: e, view: t, options: n, appendTo: i, shouldShow: s }) {
35686
35745
  this.preventHide = !1, this.isVisible = !1, this.shouldShow = ({ view: o, state: a }) => {
35687
35746
  const { selection: l } = a, { $anchor: u, empty: c } = l, d = u.depth === 1, f = u.parent.isTextblock && !u.parent.type.spec.code && !u.parent.textContent && u.parent.childCount === 0 && !this.getTextContent(u.parent);
@@ -35784,9 +35843,9 @@ var zx = class {
35784
35843
  }
35785
35844
  }, A1 = (r) => new Ve({
35786
35845
  key: typeof r.pluginKey == "string" ? new qe(r.pluginKey) : r.pluginKey,
35787
- view: (e) => new zx({ view: e, ...r })
35846
+ view: (e) => new Bx({ view: e, ...r })
35788
35847
  });
35789
- Se.create({
35848
+ ke.create({
35790
35849
  name: "floatingMenu",
35791
35850
  addOptions() {
35792
35851
  return {
@@ -35810,7 +35869,7 @@ Se.create({
35810
35869
  ] : [];
35811
35870
  }
35812
35871
  });
35813
- var Lx = Be.forwardRef(
35872
+ var Fx = Be.forwardRef(
35814
35873
  ({
35815
35874
  pluginKey: r = "bubbleMenu",
35816
35875
  editor: e,
@@ -35823,7 +35882,7 @@ var Lx = Be.forwardRef(
35823
35882
  children: l,
35824
35883
  ...u
35825
35884
  }, c) => {
35826
- const d = Me(document.createElement("div"));
35885
+ const d = Ce(document.createElement("div"));
35827
35886
  typeof c == "function" ? c(d.current) : c && (c.current = d.current);
35828
35887
  const { editor: f } = Rp(), h = e || f, m = {
35829
35888
  updateDelay: t,
@@ -35833,7 +35892,7 @@ var Lx = Be.forwardRef(
35833
35892
  shouldShow: s,
35834
35893
  getReferencedVirtualElement: o,
35835
35894
  options: a
35836
- }, v = Me(m);
35895
+ }, v = Ce(m);
35837
35896
  return v.current = m, He(() => {
35838
35897
  if (h?.isDestroyed)
35839
35898
  return;
@@ -35860,7 +35919,7 @@ var Lx = Be.forwardRef(
35860
35919
  );
35861
35920
  Be.forwardRef(
35862
35921
  ({ pluginKey: r = "floatingMenu", editor: e, appendTo: t, shouldShow: n = null, options: i, children: s, ...o }, a) => {
35863
- const l = Me(document.createElement("div"));
35922
+ const l = Ce(document.createElement("div"));
35864
35923
  typeof a == "function" ? a(l.current) : a && (a.current = l.current);
35865
35924
  const { editor: u } = Rp();
35866
35925
  return He(() => {
@@ -35890,7 +35949,7 @@ Be.forwardRef(
35890
35949
  }, [e, u, t, r, n, i]), Xd(/* @__PURE__ */ J.jsx("div", { ...o, children: s }), l.current);
35891
35950
  }
35892
35951
  );
35893
- const Bx = ({ editor: r }) => {
35952
+ const $x = ({ editor: r }) => {
35894
35953
  if (!r)
35895
35954
  return null;
35896
35955
  const [e] = Be.useState(!0), [t] = Be.useState(!0);
@@ -35909,7 +35968,7 @@ const Bx = ({ editor: r }) => {
35909
35968
  })
35910
35969
  });
35911
35970
  return /* @__PURE__ */ J.jsx(J.Fragment, { children: r && e && /* @__PURE__ */ J.jsx(
35912
- Lx,
35971
+ Fx,
35913
35972
  {
35914
35973
  shouldShow: null,
35915
35974
  editor: r,
@@ -36053,7 +36112,7 @@ const Bx = ({ editor: r }) => {
36053
36112
  "theorem",
36054
36113
  "warning",
36055
36114
  "webwork"
36056
- ], Fx = [
36115
+ ], Hx = [
36057
36116
  "address",
36058
36117
  "attribution",
36059
36118
  "caption",
@@ -36084,7 +36143,7 @@ const Bx = ({ editor: r }) => {
36084
36143
  "volume",
36085
36144
  "year",
36086
36145
  "xi:include"
36087
- ], $x = ["me", "men", "md", "mdn"], R1 = [
36146
+ ], Vx = ["me", "men", "md", "mdn"], R1 = [
36088
36147
  "ul",
36089
36148
  "ol",
36090
36149
  "li",
@@ -36114,7 +36173,7 @@ const Bx = ({ editor: r }) => {
36114
36173
  "tikz",
36115
36174
  "code",
36116
36175
  "c"
36117
- ], Hx = [
36176
+ ], _x = [
36118
36177
  ...O1,
36119
36178
  ...N1,
36120
36179
  ...D1,
@@ -36125,9 +36184,9 @@ const Bx = ({ editor: r }) => {
36125
36184
  ...N1,
36126
36185
  ...D1,
36127
36186
  ...R1,
36128
- ...$x
36187
+ ...Vx
36129
36188
  ];
36130
- function Vx(r) {
36189
+ function jx(r) {
36131
36190
  let e = !1, t = r.split(/\r\n|\r|\n/g), n = [t[0].trim()];
36132
36191
  t.length > 1 && n.push(t[1].trim());
36133
36192
  for (let i = 2; i < t.length; i++) {
@@ -36147,9 +36206,9 @@ function Vx(r) {
36147
36206
  return n.join(`
36148
36207
  `);
36149
36208
  }
36150
- function _x(r, e) {
36209
+ function qx(r, e) {
36151
36210
  const n = "some";
36152
- let i = Vx(r);
36211
+ let i = jx(r);
36153
36212
  console.log("Getting ready to start formatting.");
36154
36213
  for (let c of ja)
36155
36214
  if (i.includes("<" + c)) {
@@ -36163,7 +36222,7 @@ $&
36163
36222
  $&
36164
36223
  `);
36165
36224
  }
36166
- for (let c of Fx) {
36225
+ for (let c of Hx) {
36167
36226
  let d = new RegExp("<" + c + "(.*?)>", "g"), f = new RegExp("<\\/" + c + ">([\\s\\S]*?[.,!?;:]?)", "g"), h = new RegExp("<" + c + "(.*?)\\/>", "g");
36168
36227
  i = i.replace(d, `
36169
36228
  $&`), i = i.replace(f, `$&
@@ -36184,7 +36243,7 @@ $&`), i = i.replace(f, `$&
36184
36243
  case "some":
36185
36244
  for (let c = 0; c < u.length - 1; c++)
36186
36245
  if (u[c].trim().startsWith("</"))
36187
- for (let d of Hx)
36246
+ for (let d of _x)
36188
36247
  new RegExp("<" + d + "(.*?)>", "g").test(u[c + 1]) && (u[c] += `
36189
36248
  `);
36190
36249
  else u[c].trim().startsWith("<title>") && (u[c] += `
@@ -36199,25 +36258,26 @@ $&`), i = i.replace(f, `$&
36199
36258
  return i = u.join(`
36200
36259
  `), i;
36201
36260
  }
36202
- const jx = Ce.create({
36261
+ const Wx = we.create({
36203
36262
  name: "ptxFragment",
36204
36263
  topNode: !0,
36205
- content: "title? introduction? chapter* section* subsection* worksheet*"
36206
- }), qx = [
36207
- Ew.configure({
36264
+ //content: "title? introduction? part* chapter* section* subsection* worksheet*",
36265
+ content: "ptxdoc"
36266
+ }), Ux = [
36267
+ Ow.configure({
36208
36268
  defaultLanguage: "xml"
36209
36269
  }),
36210
36270
  //KeyboardCommands,
36211
- jx,
36212
- c9,
36271
+ Wx,
36272
+ h9,
36213
36273
  Bp,
36214
36274
  Wp,
36215
36275
  Fp,
36216
- kw,
36217
- t9,
36218
- Aw,
36219
- Ow,
36276
+ Mw,
36277
+ n9,
36220
36278
  Nw,
36279
+ Dw,
36280
+ Rw,
36221
36281
  G8,
36222
36282
  K8,
36223
36283
  J8,
@@ -36244,9 +36304,9 @@ const jx = Ce.create({
36244
36304
  // };
36245
36305
  // });
36246
36306
  //},
36247
- ], Wx = ({ content: r, onChange: e }) => {
36248
- const t = Me(null), n = O7({
36249
- extensions: qx,
36307
+ ], Gx = ({ content: r, onChange: e }) => {
36308
+ const t = Ce(null), n = O7({
36309
+ extensions: Ux,
36250
36310
  content: "",
36251
36311
  onContentError(a) {
36252
36312
  console.log("Content error: ", a.error), a.disableCollaboration(), a.editor.setEditable(!1, !1);
@@ -36254,20 +36314,20 @@ const jx = Ce.create({
36254
36314
  enableContentCheck: !0,
36255
36315
  onUpdate: ({ editor: a }) => {
36256
36316
  t.current && clearTimeout(t.current), t.current = setTimeout(() => {
36257
- e(_x(Dw(a.getJSON())));
36317
+ e(qx(Iw(a.getJSON())));
36258
36318
  }, 500);
36259
36319
  }
36260
36320
  });
36261
36321
  He(() => () => {
36262
36322
  t.current && clearTimeout(t.current);
36263
36323
  }, []);
36264
- const i = Me(!0);
36324
+ const i = Ce(!0);
36265
36325
  He(() => {
36266
36326
  if (n && r !== n.getHTML() && i.current) {
36267
36327
  const a = r;
36268
36328
  if (n)
36269
36329
  try {
36270
- n.commands.setContent(dw(a), {
36330
+ n.commands.setContent(fw(a), {
36271
36331
  emitUpdate: !1
36272
36332
  });
36273
36333
  } catch (l) {
@@ -36285,7 +36345,7 @@ const jx = Ce.create({
36285
36345
  }, [n]), He(() => {
36286
36346
  i.current = !0;
36287
36347
  }, [r]);
36288
- const [s, o] = vt(!1);
36348
+ const [s, o] = yt(!1);
36289
36349
  return He(() => {
36290
36350
  n && n.setEditable(s, !1);
36291
36351
  }, [n, s]), /* @__PURE__ */ J.jsxs("div", { className: "pretext-plus-editor__visual-editor", children: [
@@ -36305,9 +36365,9 @@ const jx = Ce.create({
36305
36365
  ] })
36306
36366
  ] }),
36307
36367
  /* @__PURE__ */ J.jsx("div", { className: (s ? "editable" : "read-only") + " ptx-page", children: /* @__PURE__ */ J.jsx(T7, { editor: n }) }),
36308
- /* @__PURE__ */ J.jsx(Bx, { editor: n })
36368
+ /* @__PURE__ */ J.jsx($x, { editor: n })
36309
36369
  ] });
36310
- }, Ux = (r, e, t) => {
36370
+ }, Kx = (r, e, t) => {
36311
36371
  const n = document.createElement("form");
36312
36372
  n.method = "POST", n.action = r, n.target = t, n.style.display = "none";
36313
36373
  for (const i in e)
@@ -36316,8 +36376,8 @@ const jx = Ce.create({
36316
36376
  s.type = "hidden", s.name = i, s.value = e[i], n.appendChild(s);
36317
36377
  }
36318
36378
  document.body.appendChild(n), n.submit(), n.remove();
36319
- }, Gx = ({ content: r, title: e, onRebuild: t }) => {
36320
- const [n, i] = vt(!1), s = Me(null);
36379
+ }, Jx = ({ content: r, title: e, onRebuild: t }) => {
36380
+ const [n, i] = yt(!1), s = Ce(null);
36321
36381
  He(() => {
36322
36382
  o();
36323
36383
  }, []);
@@ -36325,7 +36385,7 @@ const jx = Ce.create({
36325
36385
  const l = r, u = e || "Document Title";
36326
36386
  if (i(!0), t) {
36327
36387
  t(l, u, (d, f) => {
36328
- Ux(d, f, "fullPreview");
36388
+ Kx(d, f, "fullPreview");
36329
36389
  });
36330
36390
  return;
36331
36391
  }
@@ -36360,7 +36420,7 @@ const jx = Ce.create({
36360
36420
  )
36361
36421
  ] })
36362
36422
  ] });
36363
- }, Kx = (r) => {
36423
+ }, Yx = (r) => {
36364
36424
  let e;
36365
36425
  return r.showPreviewModeToggle === !1 ? e = null : e = /* @__PURE__ */ J.jsxs("label", { className: "pretext-plus-editor__preview-toggle", children: [
36366
36426
  /* @__PURE__ */ J.jsx(
@@ -36432,7 +36492,7 @@ const jx = Ce.create({
36432
36492
  e
36433
36493
  ] })
36434
36494
  ] });
36435
- }, Jx = `
36495
+ }, Xx = `
36436
36496
  <section>
36437
36497
  <title>My Section</title>
36438
36498
  <p>
@@ -36511,18 +36571,18 @@ const jx = Ce.create({
36511
36571
 
36512
36572
  <p> And that's the end of the demo. Thanks for coming!</p>
36513
36573
  </section>
36514
- `, Yx = Jx, Qx = (r) => {
36515
- const [e, t] = vt(r.content || Yx), [n, i] = vt(r.title || "Document Title"), [s, o] = vt(!1);
36574
+ `, Zx = Xx, tS = (r) => {
36575
+ const [e, t] = yt(r.content || Zx), [n, i] = yt(r.title || "Document Title"), [s, o] = yt(!1);
36516
36576
  let a;
36517
36577
  return s && r.onPreviewRebuild ? a = /* @__PURE__ */ J.jsx(
36518
- Gx,
36578
+ Jx,
36519
36579
  {
36520
36580
  content: e,
36521
36581
  title: n,
36522
36582
  onRebuild: r.onPreviewRebuild
36523
36583
  }
36524
36584
  ) : a = /* @__PURE__ */ J.jsx(
36525
- Wx,
36585
+ Gx,
36526
36586
  {
36527
36587
  content: e,
36528
36588
  onChange: (l) => {
@@ -36531,7 +36591,7 @@ const jx = Ce.create({
36531
36591
  }
36532
36592
  ), /* @__PURE__ */ J.jsxs("div", { className: "pretext-plus-editor", children: [
36533
36593
  /* @__PURE__ */ J.jsx(
36534
- Kx,
36594
+ Yx,
36535
36595
  {
36536
36596
  isChecked: s,
36537
36597
  onChange: () => o(!s),
@@ -36562,9 +36622,9 @@ const jx = Ce.create({
36562
36622
  };
36563
36623
  export {
36564
36624
  r2 as CodeEditor,
36565
- Qx as Editors,
36566
- Gx as FullPreview,
36567
- Wx as VisualEditor,
36568
- Ux as postToIframe
36625
+ tS as Editors,
36626
+ Jx as FullPreview,
36627
+ Gx as VisualEditor,
36628
+ Kx as postToIframe
36569
36629
  };
36570
36630
  //# sourceMappingURL=index.es.js.map