@pi-outpost/embed 0.35.2 → 0.37.0

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.
Files changed (59) hide show
  1. package/dist/CodeEditor-2Vx8PHAy.js +2790 -0
  2. package/dist/CodeEditor-Cb6i9oIs.cjs +6 -0
  3. package/dist/clike-8rZWBES0.cjs +1 -0
  4. package/dist/clike-D-dOQnrm.js +587 -0
  5. package/dist/{conversationExport-DU5Xp2g-.js → conversationExport-BXEb1n8C.js} +2 -2
  6. package/dist/{conversationExport-DwLc0HDC.cjs → conversationExport-DEKaUq-d.cjs} +1 -1
  7. package/dist/{conversationHistory-DTP8xNqg.cjs → conversationHistory-BCj7z0AY.cjs} +5 -5
  8. package/dist/{conversationHistory-DHEPfViO.js → conversationHistory-BsL2Q-mL.js} +4759 -4747
  9. package/dist/dist-B0lO3k1f.js +410 -0
  10. package/dist/dist-B7I27gkN.cjs +1 -0
  11. package/dist/dist-B8gmxwh-.cjs +23 -0
  12. package/dist/dist-BBUKMRrs.js +69 -0
  13. package/dist/dist-BWlGU9XM.js +395 -0
  14. package/dist/dist-BZcglaBe.cjs +1 -0
  15. package/dist/dist-BZjcsPqi.cjs +13 -0
  16. package/dist/dist-BfQGuM1r.js +1340 -0
  17. package/dist/dist-BhNvvg0I.js +471 -0
  18. package/dist/dist-BhXQJ0x3.js +10805 -0
  19. package/dist/dist-BlD6NhiG.js +296 -0
  20. package/dist/dist-Bppoi_v9.js +357 -0
  21. package/dist/dist-BvsCdwbL.cjs +1 -0
  22. package/dist/dist-C0_uLrCb.cjs +6 -0
  23. package/dist/dist-C8jjSrIs.cjs +11 -0
  24. package/dist/dist-C9dtxVRR.cjs +1 -0
  25. package/dist/dist-CA6ERWRG.js +380 -0
  26. package/dist/dist-CHKg1Qb9.js +1583 -0
  27. package/dist/dist-CyFPTQ2l.cjs +1 -0
  28. package/dist/dist-D8I4FQ-Q.cjs +1 -0
  29. package/dist/dist-DEl2Ze0j.cjs +2 -0
  30. package/dist/dist-DJbgM591.cjs +1 -0
  31. package/dist/dist-DPXHxuWb.js +855 -0
  32. package/dist/dist-DZrtSp8H.js +607 -0
  33. package/dist/dist-Dja2VlN5.cjs +1 -0
  34. package/dist/dist-DqbI0un6.cjs +1 -0
  35. package/dist/dist-Dr4zY56l.js +440 -0
  36. package/dist/dist-Dvqp7T4I.cjs +1 -0
  37. package/dist/dist-FSzij9Rn.js +271 -0
  38. package/dist/dist-Xjm88mbq.js +756 -0
  39. package/dist/dist-qNFo_ASR.cjs +9 -0
  40. package/dist/dist-qq9a_ch2.js +431 -0
  41. package/dist/dockerfile-4x0UkDoN.js +291 -0
  42. package/dist/dockerfile-C67wRfne.cjs +1 -0
  43. package/dist/docxExport-BKC_hi5D.js +67 -0
  44. package/dist/docxExport-V7joLrkm.cjs +3 -0
  45. package/dist/{docxExport-BWwEuboU.js → loadReferencedImage-FGse7G4p.js} +538 -306
  46. package/dist/{docxExport-PjDC4XKL.cjs → loadReferencedImage-QespeGh9.cjs} +7 -9
  47. package/dist/pi-outpost-embed.cjs +51 -24
  48. package/dist/pi-outpost-embed.js +3026 -2743
  49. package/dist/properties-C85NeSsH.js +20 -0
  50. package/dist/properties-XjDvZYDm.cjs +1 -0
  51. package/dist/ruby-Bx72aP7E.cjs +1 -0
  52. package/dist/ruby-CjYBP7RB.js +166 -0
  53. package/dist/shell-CD1ADQh5.cjs +1 -0
  54. package/dist/shell-CevoiH_y.js +109 -0
  55. package/dist/toml-CPJF62TK.js +28 -0
  56. package/dist/toml-OuUxin0A.cjs +1 -0
  57. package/package.json +1 -1
  58. package/dist/loadReferencedImage-C8Hn2ejN.js +0 -268
  59. package/dist/loadReferencedImage-q-G47ESL.cjs +0 -1
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "./rolldown-runtime-DArdT4gl.js";
2
- import { _ as t, h as n, i as r, n as i, t as a, u as o } from "./lib-BgQYQRfw.js";
3
- import { i as s, n as c, t as l } from "./loadReferencedImage-C8Hn2ejN.js";
2
+ import { _ as t, g as n, i as r, n as i, t as a, u as o } from "./lib-BgQYQRfw.js";
3
+ import { a as s, n as c, s as l } from "./workspacePath-Dzahj9-k.js";
4
4
  //#region ../node_modules/docx/dist/index.mjs
5
5
  var u = Object.create, d = Object.defineProperty, f = Object.getOwnPropertyDescriptor, p = Object.getOwnPropertyNames, m = Object.getPrototypeOf, h = Object.prototype.hasOwnProperty, g = (e, t) => () => (e && (t = e(e = 0)), t), _ = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), v = (e, t, n, r) => {
6
6
  if (t && typeof t == "object" || typeof t == "function") for (var i = p(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !h.call(e, s) && s !== n && d(e, s, {
@@ -33470,6 +33470,31 @@ Z({
33470
33470
  var n = new Q("mpadded", [Bp(e.body, t)]), r = e.dy.number + e.dy.unit;
33471
33471
  return n.setAttribute("voffset", r), n;
33472
33472
  }
33473
+ });
33474
+ var Uh = (e, t) => ({
33475
+ type: "reflectbox",
33476
+ mode: e.parser.mode,
33477
+ body: t[0]
33478
+ });
33479
+ Z({
33480
+ type: "reflectbox",
33481
+ names: ["\\reflectbox"],
33482
+ numArgs: 1,
33483
+ argTypes: ["hbox"],
33484
+ allowedInText: !0,
33485
+ handler: Uh,
33486
+ htmlBuilder(e, t) {
33487
+ return X(["mord", "reflectbox"], [Tp(e.body, t)], t);
33488
+ },
33489
+ mathmlBuilder(e, t) {
33490
+ return Bp(e.body, t);
33491
+ }
33492
+ }), Z({
33493
+ type: "reflectbox",
33494
+ names: ["\\mathreflectbox"],
33495
+ numArgs: 1,
33496
+ argTypes: ["math"],
33497
+ handler: Uh
33473
33498
  }), Z({
33474
33499
  type: "internal",
33475
33500
  names: ["\\relax"],
@@ -33515,14 +33540,14 @@ Z({
33515
33540
  return i >= 0 ? s.setAttribute("height", V(i)) : (s.setAttribute("height", V(i)), s.setAttribute("depth", V(-i))), s.setAttribute("voffset", V(i)), s;
33516
33541
  }
33517
33542
  });
33518
- function Uh(e, t, n) {
33543
+ function Wh(e, t, n) {
33519
33544
  for (var r = yp(e, t, !1), i = t.sizeMultiplier / n.sizeMultiplier, a = 0; a < r.length; a++) {
33520
33545
  var o = r[a].classes.indexOf("katex-sizing");
33521
33546
  o < 0 ? Array.prototype.push.apply(r[a].classes, t.sizingClasses(n)) : r[a].classes[o + 1] === "reset-size" + t.size && (r[a].classes[o + 1] = "reset-size" + n.size), r[a].height *= i, r[a].depth *= i;
33522
33547
  }
33523
33548
  return Yf(r);
33524
33549
  }
33525
- var Wh = [
33550
+ var Gh = [
33526
33551
  "\\tiny",
33527
33552
  "\\sixptsize",
33528
33553
  "\\scriptsize",
@@ -33537,7 +33562,7 @@ var Wh = [
33537
33562
  ];
33538
33563
  Z({
33539
33564
  type: "sizing",
33540
- names: Wh,
33565
+ names: Gh,
33541
33566
  numArgs: 0,
33542
33567
  allowedInText: !0,
33543
33568
  handler: (e, t) => {
@@ -33545,13 +33570,13 @@ Z({
33545
33570
  return {
33546
33571
  type: "sizing",
33547
33572
  mode: i.mode,
33548
- size: Wh.indexOf(r) + 1,
33573
+ size: Gh.indexOf(r) + 1,
33549
33574
  body: a
33550
33575
  };
33551
33576
  },
33552
33577
  htmlBuilder: (e, t) => {
33553
33578
  var n = t.havingSize(e.size);
33554
- return Uh(e.body, n, t);
33579
+ return Wh(e.body, n, t);
33555
33580
  },
33556
33581
  mathmlBuilder: (e, t) => {
33557
33582
  var n = t.havingSize(e.size), r = new Q("mstyle", Rp(e.body, n));
@@ -33664,14 +33689,14 @@ Z({
33664
33689
  return r ? new Q("mroot", [Bp(n, t), Bp(r, t)]) : new Q("msqrt", [Bp(n, t)]);
33665
33690
  }
33666
33691
  });
33667
- var Gh = {
33692
+ var Kh = {
33668
33693
  display: td.DISPLAY,
33669
33694
  text: td.TEXT,
33670
33695
  script: td.SCRIPT,
33671
33696
  scriptscript: td.SCRIPTSCRIPT
33672
33697
  };
33673
- function Kh(e) {
33674
- return e in Gh;
33698
+ function qh(e) {
33699
+ return e in Kh;
33675
33700
  }
33676
33701
  Z({
33677
33702
  type: "styling",
@@ -33686,7 +33711,7 @@ Z({
33686
33711
  primitive: !0,
33687
33712
  handler(e, t) {
33688
33713
  var n = e.breakOnTokenText, r = e.funcName, i = e.parser, a = i.parseExpression(!0, n), o = r.slice(1, r.length - 5);
33689
- if (!Kh(o)) throw Error("Unknown style: " + o);
33714
+ if (!qh(o)) throw Error("Unknown style: " + o);
33690
33715
  return {
33691
33716
  type: "styling",
33692
33717
  mode: i.mode,
@@ -33695,11 +33720,11 @@ Z({
33695
33720
  };
33696
33721
  },
33697
33722
  htmlBuilder(e, t) {
33698
- var n = Gh[e.style], r = t.havingStyle(n);
33699
- return e.resetFont && (r = r.withFont("")), Uh(e.body, r, t);
33723
+ var n = Kh[e.style], r = t.havingStyle(n);
33724
+ return e.resetFont && (r = r.withFont("")), Wh(e.body, r, t);
33700
33725
  },
33701
33726
  mathmlBuilder(e, t) {
33702
- var n = Gh[e.style], r = t.havingStyle(n);
33727
+ var n = Kh[e.style], r = t.havingStyle(n);
33703
33728
  e.resetFont && (r = r.withFont(""));
33704
33729
  var i = new Q("mstyle", Rp(e.body, r)), a = {
33705
33730
  display: ["0", "true"],
@@ -33710,14 +33735,14 @@ Z({
33710
33735
  return i.setAttribute("scriptlevel", a[0]), i.setAttribute("displaystyle", a[1]), i;
33711
33736
  }
33712
33737
  });
33713
- var qh = function(e, t) {
33738
+ var Jh = function(e, t) {
33714
33739
  var n = e.base;
33715
33740
  return n ? n.type === "op" ? n.limits && (t.style.size === td.DISPLAY.size || n.alwaysHandleSupSub) ? Rh : null : n.type === "operatorname" ? n.alwaysHandleSupSub && (t.style.size === td.DISPLAY.size || n.limits) ? Hh : null : n.type === "accent" ? Mu(n.base) ? fm : null : n.type === "horizBrace" && !e.sub === n.isOver ? Nh : null : null;
33716
33741
  };
33717
33742
  fp({
33718
33743
  type: "supsub",
33719
33744
  htmlBuilder(e, t) {
33720
- var n = qh(e, t);
33745
+ var n = Jh(e, t);
33721
33746
  if (n) return n(e, t);
33722
33747
  var r = e.base, i = e.sup, a = e.sub, o = Tp(r, t), s, c, l = t.fontMetrics(), u = 0, d = 0, f = r && Mu(r);
33723
33748
  if (i) {
@@ -33812,7 +33837,7 @@ fp({
33812
33837
  return n;
33813
33838
  }
33814
33839
  });
33815
- var Jh = {
33840
+ var Yh = {
33816
33841
  mi: "italic",
33817
33842
  mn: "normal",
33818
33843
  mtext: "normal"
@@ -33824,7 +33849,7 @@ fp({
33824
33849
  },
33825
33850
  mathmlBuilder(e, t) {
33826
33851
  var n = new Q("mi", [Np(e.text, e.mode, t)]), r = Ip(e, t) || "italic";
33827
- return r !== Jh[n.type] && n.setAttribute("mathvariant", r), n;
33852
+ return r !== Yh[n.type] && n.setAttribute("mathvariant", r), n;
33828
33853
  }
33829
33854
  }), fp({
33830
33855
  type: "textord",
@@ -33833,10 +33858,10 @@ fp({
33833
33858
  },
33834
33859
  mathmlBuilder(e, t) {
33835
33860
  var n = Np(e.text, e.mode, t), r = Ip(e, t) || "normal", i = e.mode === "text" ? new Q("mtext", [n]) : /[0-9]/.test(e.text) ? new Q("mn", [n]) : e.text === "\\prime" ? new Q("mo", [n]) : new Q("mi", [n]);
33836
- return r !== Jh[i.type] && i.setAttribute("mathvariant", r), i;
33861
+ return r !== Yh[i.type] && i.setAttribute("mathvariant", r), i;
33837
33862
  }
33838
33863
  });
33839
- var Yh = /* @__PURE__ */ new Map([["\\nobreak", "nobreak"], ["\\allowbreak", "allowbreak"]]), Xh = /* @__PURE__ */ new Map([
33864
+ var Xh = /* @__PURE__ */ new Map([["\\nobreak", "nobreak"], ["\\allowbreak", "allowbreak"]]), Zh = /* @__PURE__ */ new Map([
33840
33865
  [" ", {}],
33841
33866
  ["\\ ", {}],
33842
33867
  ["~", { className: "nobreak" }],
@@ -33846,7 +33871,7 @@ var Yh = /* @__PURE__ */ new Map([["\\nobreak", "nobreak"], ["\\allowbreak", "al
33846
33871
  fp({
33847
33872
  type: "spacing",
33848
33873
  htmlBuilder(e, t) {
33849
- var n = Xh.get(e.text), r = Yh.get(e.text);
33874
+ var n = Zh.get(e.text), r = Xh.get(e.text);
33850
33875
  if (n) {
33851
33876
  var i = n.className || "";
33852
33877
  if (e.mode === "text") {
@@ -33860,13 +33885,13 @@ fp({
33860
33885
  },
33861
33886
  mathmlBuilder(e, t) {
33862
33887
  var n;
33863
- if (Xh.has(e.text)) n = new Q("mtext", [new kp("\xA0")]);
33864
- else if (Yh.has(e.text)) return new Q("mspace");
33888
+ if (Zh.has(e.text)) n = new Q("mtext", [new kp("\xA0")]);
33889
+ else if (Xh.has(e.text)) return new Q("mspace");
33865
33890
  else throw new B("Unknown type of space \"" + e.text + "\"");
33866
33891
  return n;
33867
33892
  }
33868
33893
  });
33869
- var Zh = () => {
33894
+ var Qh = () => {
33870
33895
  var e = new Q("mtd", []);
33871
33896
  return e.setAttribute("width", "50%"), e;
33872
33897
  };
@@ -33874,29 +33899,29 @@ fp({
33874
33899
  type: "tag",
33875
33900
  mathmlBuilder(e, t) {
33876
33901
  var n = new Q("mtable", [new Q("mtr", [
33877
- Zh(),
33902
+ Qh(),
33878
33903
  new Q("mtd", [zp(e.body, t)]),
33879
- Zh(),
33904
+ Qh(),
33880
33905
  new Q("mtd", [zp(e.tag, t)])
33881
33906
  ])]);
33882
33907
  return n.setAttribute("width", "100%"), n;
33883
33908
  }
33884
33909
  });
33885
- var Qh = {
33910
+ var $h = {
33886
33911
  "\\text": void 0,
33887
33912
  "\\textrm": "textrm",
33888
33913
  "\\textsf": "textsf",
33889
33914
  "\\texttt": "texttt",
33890
33915
  "\\textnormal": "textrm"
33891
- }, $h = {
33916
+ }, eg = {
33892
33917
  "\\textbf": "textbf",
33893
33918
  "\\textmd": "textmd"
33894
- }, eg = {
33919
+ }, tg = {
33895
33920
  "\\textit": "textit",
33896
33921
  "\\textup": "textup"
33897
- }, tg = (e, t) => {
33922
+ }, ng = (e, t) => {
33898
33923
  var n = e.font;
33899
- return n ? Qh[n] ? t.withTextFontFamily(Qh[n]) : $h[n] ? t.withTextFontWeight($h[n]) : n === "\\emph" ? t.fontShape === "textit" ? t.withTextFontShape("textup") : t.withTextFontShape("textit") : t.withTextFontShape(eg[n]) : t;
33924
+ return n ? $h[n] ? t.withTextFontFamily($h[n]) : eg[n] ? t.withTextFontWeight(eg[n]) : n === "\\emph" ? t.fontShape === "textit" ? t.withTextFontShape("textup") : t.withTextFontShape("textit") : t.withTextFontShape(tg[n]) : t;
33900
33925
  };
33901
33926
  Z({
33902
33927
  type: "text",
@@ -33926,11 +33951,11 @@ Z({
33926
33951
  };
33927
33952
  },
33928
33953
  htmlBuilder(e, t) {
33929
- var n = tg(e, t);
33954
+ var n = ng(e, t);
33930
33955
  return X(["mord", "text"], yp(e.body, n, !0), n);
33931
33956
  },
33932
33957
  mathmlBuilder(e, t) {
33933
- var n = tg(e, t);
33958
+ var n = ng(e, t);
33934
33959
  return zp(e.body, n);
33935
33960
  }
33936
33961
  }), Z({
@@ -34012,20 +34037,20 @@ Z({
34012
34037
  throw new B("\\verb ended by end of line instead of matching delimiter");
34013
34038
  },
34014
34039
  htmlBuilder(e, t) {
34015
- for (var n = ng(e), r = [], i = t.havingStyle(t.style.text()), a = 0; a < n.length; a++) {
34040
+ for (var n = rg(e), r = [], i = t.havingStyle(t.style.text()), a = 0; a < n.length; a++) {
34016
34041
  var o = n[a];
34017
34042
  o === "~" && (o = "\\textasciitilde"), r.push(zf(o, "Typewriter-Regular", e.mode, i, ["mord", "texttt"]));
34018
34043
  }
34019
34044
  return X(["mord", "text"].concat(i.sizingClasses(t)), Wf(r), i);
34020
34045
  },
34021
34046
  mathmlBuilder(e, t) {
34022
- var n = new Q("mtext", [new kp(ng(e))]);
34047
+ var n = new Q("mtext", [new kp(rg(e))]);
34023
34048
  return n.setAttribute("mathvariant", "monospace"), n;
34024
34049
  }
34025
34050
  });
34026
- var ng = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), rg = lp, ig = "[ \r\n ]", ag = "\\\\[a-zA-Z@]+", og = "\\\\[^\ud800-\udfff]", sg = "(" + ag + ")" + ig + "*", cg = "\\\\(\n|[ \r ]+\n?)[ \r ]*", lg = "[̀-ͯ]", ug = RegExp(lg + "+$"), dg = "(" + ig + "+)|" + (cg + "|") + "([!-\\[\\]-‧‪-퟿豈-￿]" + (lg + "*") + "|[\ud800-\udbff][\udc00-\udfff]" + (lg + "*") + "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + ("|" + sg) + ("|" + og + ")"), fg = class {
34051
+ var rg = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), ig = lp, ag = "[ \r\n ]", og = "\\\\[a-zA-Z@]+", sg = "\\\\[^\ud800-\udfff]", cg = "(" + og + ")" + ag + "*", lg = "\\\\(\n|[ \r ]+\n?)[ \r ]*", ug = "[̀-ͯ]", dg = RegExp(ug + "+$"), fg = "(" + ag + "+)|" + (lg + "|") + "([!-\\[\\]-‧‪-퟿豈-￿]" + (ug + "*") + "|[\ud800-\udbff][\udc00-\udfff]" + (ug + "*") + "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + ("|" + cg) + ("|" + sg + ")"), pg = class {
34027
34052
  constructor(e, t) {
34028
- this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(dg, "g"), this.catcodes = {
34053
+ this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(fg, "g"), this.catcodes = {
34029
34054
  "%": 14,
34030
34055
  "~": 13
34031
34056
  };
@@ -34045,7 +34070,7 @@ var ng = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), rg = lp, ig = "[
34045
34070
  }
34046
34071
  return new ph(r, new fh(this, t, this.tokenRegex.lastIndex));
34047
34072
  }
34048
- }, pg = class {
34073
+ }, mg = class {
34049
34074
  constructor(e, t) {
34050
34075
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = t, this.builtins = e, this.undefStack = [];
34051
34076
  }
@@ -34077,7 +34102,7 @@ var ng = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), rg = lp, ig = "[
34077
34102
  }
34078
34103
  t == null ? delete this.current[e] : this.current[e] = t;
34079
34104
  }
34080
- }, mg = dh;
34105
+ }, hg = dh;
34081
34106
  $("\\noexpand", function(e) {
34082
34107
  var t = e.popToken();
34083
34108
  return e.isExpandable(t.text) && (t.noexpand = !0, t.treatAsRelax = !0), {
@@ -34121,7 +34146,7 @@ $("\\noexpand", function(e) {
34121
34146
  numArgs: 0
34122
34147
  };
34123
34148
  });
34124
- var hg = {
34149
+ var gg = {
34125
34150
  0: 0,
34126
34151
  1: 1,
34127
34152
  2: 2,
@@ -34155,12 +34180,12 @@ $("\\char", function(e) {
34155
34180
  else r = t.text.charCodeAt(0);
34156
34181
  } else n = 10;
34157
34182
  if (n) {
34158
- if (r = hg[t.text], r == null || r >= n) throw new B("Invalid base-" + n + " digit " + t.text);
34159
- for (var i; (i = hg[e.future().text]) != null && i < n;) r *= n, r += i, e.popToken();
34183
+ if (r = gg[t.text], r == null || r >= n) throw new B("Invalid base-" + n + " digit " + t.text);
34184
+ for (var i; (i = gg[e.future().text]) != null && i < n;) r *= n, r += i, e.popToken();
34160
34185
  }
34161
34186
  return "\\@char{" + r + "}";
34162
34187
  });
34163
- var gg = (e, t, n, r) => {
34188
+ var _g = (e, t, n, r) => {
34164
34189
  var i = e.consumeArg().tokens;
34165
34190
  if (i.length !== 1) throw new B("\\newcommand's first argument must be a macro name");
34166
34191
  var a = i[0].text, o = e.isDefined(a);
@@ -34177,7 +34202,7 @@ var gg = (e, t, n, r) => {
34177
34202
  numArgs: s
34178
34203
  }), "";
34179
34204
  };
34180
- $("\\newcommand", (e) => gg(e, !1, !0, !1)), $("\\renewcommand", (e) => gg(e, !0, !1, !1)), $("\\providecommand", (e) => gg(e, !0, !0, !0)), $("\\message", (e) => {
34205
+ $("\\newcommand", (e) => _g(e, !1, !0, !1)), $("\\renewcommand", (e) => _g(e, !0, !1, !1)), $("\\providecommand", (e) => _g(e, !0, !0, !0)), $("\\message", (e) => {
34181
34206
  var t = e.consumeArgs(1)[0];
34182
34207
  return console.log(t.reverse().map((e) => e.text).join("")), "";
34183
34208
  }), $("\\errmessage", (e) => {
@@ -34185,9 +34210,9 @@ $("\\newcommand", (e) => gg(e, !1, !0, !1)), $("\\renewcommand", (e) => gg(e, !0
34185
34210
  return console.error(t.reverse().map((e) => e.text).join("")), "";
34186
34211
  }), $("\\show", (e) => {
34187
34212
  var t = e.popToken(), n = t.text;
34188
- return console.log(t, e.macros.get(n), rg[n], Yd.math[n], Yd.text[n]), "";
34213
+ return console.log(t, e.macros.get(n), ig[n], Yd.math[n], Yd.text[n]), "";
34189
34214
  }), $("\\bgroup", "{"), $("\\egroup", "}"), $("~", "\\nobreakspace"), $("\\lq", "`"), $("\\rq", "'"), $("\\aa", "\\r a"), $("\\AA", "\\r A"), $("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), $("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), $("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), $("ℬ", "\\mathscr{B}"), $("ℰ", "\\mathscr{E}"), $("ℱ", "\\mathscr{F}"), $("ℋ", "\\mathscr{H}"), $("ℐ", "\\mathscr{I}"), $("ℒ", "\\mathscr{L}"), $("ℳ", "\\mathscr{M}"), $("ℛ", "\\mathscr{R}"), $("ℭ", "\\mathfrak{C}"), $("ℌ", "\\mathfrak{H}"), $("ℨ", "\\mathfrak{Z}"), $("\\Bbbk", "\\Bbb{k}"), $("\\llap", "\\mathllap{\\textrm{#1}}"), $("\\rlap", "\\mathrlap{\\textrm{#1}}"), $("\\clap", "\\mathclap{\\textrm{#1}}"), $("\\mathstrut", "\\vphantom{(}"), $("\\underbar", "\\underline{\\text{#1}}"), $("\\not", "\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char\"338}"), $("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), $("\\ne", "\\neq"), $("≠", "\\neq"), $("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), $("∉", "\\notin"), $("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), $("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), $("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), $("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), $("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), $("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), $("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), $("⟂", "\\perp"), $("‼", "\\mathclose{!\\mkern-0.8mu!}"), $("∌", "\\notni"), $("⌜", "\\ulcorner"), $("⌝", "\\urcorner"), $("⌞", "\\llcorner"), $("⌟", "\\lrcorner"), $("©", "\\copyright"), $("®", "\\textregistered"), $("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"), $("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"), $("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"), $("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"), $("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}"), $("⋮", "\\vdots"), $("\\varGamma", "\\mathit{\\Gamma}"), $("\\varDelta", "\\mathit{\\Delta}"), $("\\varTheta", "\\mathit{\\Theta}"), $("\\varLambda", "\\mathit{\\Lambda}"), $("\\varXi", "\\mathit{\\Xi}"), $("\\varPi", "\\mathit{\\Pi}"), $("\\varSigma", "\\mathit{\\Sigma}"), $("\\varUpsilon", "\\mathit{\\Upsilon}"), $("\\varPhi", "\\mathit{\\Phi}"), $("\\varPsi", "\\mathit{\\Psi}"), $("\\varOmega", "\\mathit{\\Omega}"), $("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), $("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), $("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), $("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), $("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), $("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"), $("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"), $("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
34190
- var _g = {
34215
+ var vg = {
34191
34216
  ",": "\\dotsc",
34192
34217
  "\\not": "\\dotsb",
34193
34218
  "+": "\\dotsb",
@@ -34235,12 +34260,12 @@ var _g = {
34235
34260
  "\\iiiint": "\\dotsi",
34236
34261
  "\\idotsint": "\\dotsi",
34237
34262
  "\\DOTSX": "\\dotsx"
34238
- }, vg = /* @__PURE__ */ new Set(["bin", "rel"]);
34263
+ }, yg = /* @__PURE__ */ new Set(["bin", "rel"]);
34239
34264
  $("\\dots", function(e) {
34240
34265
  var t = "\\dotso", n = e.expandAfterFuture().text;
34241
- return n in _g ? t = _g[n] : (n.slice(0, 4) === "\\not" || n in Yd.math && vg.has(Yd.math[n].group)) && (t = "\\dotsb"), t;
34266
+ return n in vg ? t = vg[n] : (n.slice(0, 4) === "\\not" || n in Yd.math && yg.has(Yd.math[n].group)) && (t = "\\dotsb"), t;
34242
34267
  });
34243
- var yg = {
34268
+ var bg = {
34244
34269
  ")": !0,
34245
34270
  "]": !0,
34246
34271
  "\\rbrack": !0,
@@ -34262,19 +34287,19 @@ var yg = {
34262
34287
  ",": !0
34263
34288
  };
34264
34289
  $("\\dotso", function(e) {
34265
- return e.future().text in yg ? "\\ldots\\," : "\\ldots";
34290
+ return e.future().text in bg ? "\\ldots\\," : "\\ldots";
34266
34291
  }), $("\\dotsc", function(e) {
34267
34292
  var t = e.future().text;
34268
- return t in yg && t !== "," ? "\\ldots\\," : "\\ldots";
34293
+ return t in bg && t !== "," ? "\\ldots\\," : "\\ldots";
34269
34294
  }), $("\\cdots", function(e) {
34270
- return e.future().text in yg ? "\\@cdots\\," : "\\@cdots";
34295
+ return e.future().text in bg ? "\\@cdots\\," : "\\@cdots";
34271
34296
  }), $("\\dotsb", "\\cdots"), $("\\dotsm", "\\cdots"), $("\\dotsi", "\\!\\cdots"), $("\\dotsx", "\\ldots\\,"), $("\\DOTSI", "\\relax"), $("\\DOTSB", "\\relax"), $("\\DOTSX", "\\relax"), $("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), $("\\,", "\\tmspace+{3mu}{.1667em}"), $("\\thinspace", "\\,"), $("\\>", "\\mskip{4mu}"), $("\\:", "\\tmspace+{4mu}{.2222em}"), $("\\medspace", "\\:"), $("\\;", "\\tmspace+{5mu}{.2777em}"), $("\\thickspace", "\\;"), $("\\!", "\\tmspace-{3mu}{.1667em}"), $("\\negthinspace", "\\!"), $("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), $("\\negthickspace", "\\tmspace-{5mu}{.277em}"), $("\\enspace", "\\kern.5em "), $("\\enskip", "\\hskip.5em\\relax"), $("\\quad", "\\hskip1em\\relax"), $("\\qquad", "\\hskip2em\\relax"), $("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), $("\\tag@paren", "\\tag@literal{({#1})}"), $("\\tag@literal", (e) => {
34272
34297
  if (e.macros.get("\\df@tag")) throw new B("Multiple \\tag");
34273
34298
  return "\\gdef\\df@tag{\\text{#1}}";
34274
34299
  }), $("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), $("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), $("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), $("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), $("\\newline", "\\\\\\relax"), $("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
34275
- var bg = V(Hd["Main-Regular"][84][1] - .7 * Hd["Main-Regular"][65][1]);
34276
- $("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + bg + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), $("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + bg + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), $("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), $("\\@hspace", "\\hskip #1\\relax"), $("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), $("\\ordinarycolon", ":"), $("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), $("\\dblcolon", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char\"2237}}"), $("\\coloneqq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2254}}"), $("\\Coloneqq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2237\\char\"3d}}"), $("\\coloneq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"3a\\char\"2212}}"), $("\\Coloneq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"2237\\char\"2212}}"), $("\\eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2255}}"), $("\\Eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"3d\\char\"2237}}"), $("\\eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2239}}"), $("\\Eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"2212\\char\"2237}}"), $("\\colonapprox", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"3a\\char\"2248}}"), $("\\Colonapprox", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"2237\\char\"2248}}"), $("\\colonsim", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"3a\\char\"223c}}"), $("\\Colonsim", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"2237\\char\"223c}}"), $("∷", "\\dblcolon"), $("∹", "\\eqcolon"), $("≔", "\\coloneqq"), $("≕", "\\eqqcolon"), $("⩴", "\\Coloneqq"), $("\\ratio", "\\vcentcolon"), $("\\coloncolon", "\\dblcolon"), $("\\colonequals", "\\coloneqq"), $("\\coloncolonequals", "\\Coloneqq"), $("\\equalscolon", "\\eqqcolon"), $("\\equalscoloncolon", "\\Eqqcolon"), $("\\colonminus", "\\coloneq"), $("\\coloncolonminus", "\\Coloneq"), $("\\minuscolon", "\\eqcolon"), $("\\minuscoloncolon", "\\Eqcolon"), $("\\coloncolonapprox", "\\Colonapprox"), $("\\coloncolonsim", "\\Colonsim"), $("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), $("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), $("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), $("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), $("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), $("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), $("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), $("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), $("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), $("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), $("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), $("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), $("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), $("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), $("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), $("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), $("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), $("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), $("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), $("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), $("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), $("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), $("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), $("\\imath", "\\html@mathml{\\@imath}{ı}"), $("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), $("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), $("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), $("⟦", "\\llbracket"), $("⟧", "\\rrbracket"), $("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), $("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), $("⦃", "\\lBrace"), $("⦄", "\\rBrace"), $("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), $("⦵", "\\minuso"), $("\\darr", "\\downarrow"), $("\\dArr", "\\Downarrow"), $("\\Darr", "\\Downarrow"), $("\\lang", "\\langle"), $("\\rang", "\\rangle"), $("\\uarr", "\\uparrow"), $("\\uArr", "\\Uparrow"), $("\\Uarr", "\\Uparrow"), $("\\N", "\\mathbb{N}"), $("\\R", "\\mathbb{R}"), $("\\Z", "\\mathbb{Z}"), $("\\alef", "\\aleph"), $("\\alefsym", "\\aleph"), $("\\Alpha", "\\mathrm{A}"), $("\\Beta", "\\mathrm{B}"), $("\\bull", "\\bullet"), $("\\Chi", "\\mathrm{X}"), $("\\clubs", "\\clubsuit"), $("\\cnums", "\\mathbb{C}"), $("\\Complex", "\\mathbb{C}"), $("\\Dagger", "\\ddagger"), $("\\diamonds", "\\diamondsuit"), $("\\empty", "\\emptyset"), $("\\Epsilon", "\\mathrm{E}"), $("\\Eta", "\\mathrm{H}"), $("\\exist", "\\exists"), $("\\harr", "\\leftrightarrow"), $("\\hArr", "\\Leftrightarrow"), $("\\Harr", "\\Leftrightarrow"), $("\\hearts", "\\heartsuit"), $("\\image", "\\Im"), $("\\infin", "\\infty"), $("\\Iota", "\\mathrm{I}"), $("\\isin", "\\in"), $("\\Kappa", "\\mathrm{K}"), $("\\larr", "\\leftarrow"), $("\\lArr", "\\Leftarrow"), $("\\Larr", "\\Leftarrow"), $("\\lrarr", "\\leftrightarrow"), $("\\lrArr", "\\Leftrightarrow"), $("\\Lrarr", "\\Leftrightarrow"), $("\\Mu", "\\mathrm{M}"), $("\\natnums", "\\mathbb{N}"), $("\\Nu", "\\mathrm{N}"), $("\\Omicron", "\\mathrm{O}"), $("\\plusmn", "\\pm"), $("\\rarr", "\\rightarrow"), $("\\rArr", "\\Rightarrow"), $("\\Rarr", "\\Rightarrow"), $("\\real", "\\Re"), $("\\reals", "\\mathbb{R}"), $("\\Reals", "\\mathbb{R}"), $("\\Rho", "\\mathrm{P}"), $("\\sdot", "\\cdot"), $("\\sect", "\\S"), $("\\spades", "\\spadesuit"), $("\\sub", "\\subset"), $("\\sube", "\\subseteq"), $("\\supe", "\\supseteq"), $("\\Tau", "\\mathrm{T}"), $("\\thetasym", "\\vartheta"), $("\\weierp", "\\wp"), $("\\Zeta", "\\mathrm{Z}"), $("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), $("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), $("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), $("\\bra", "\\mathinner{\\langle{#1}|}"), $("\\ket", "\\mathinner{|{#1}\\rangle}"), $("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), $("\\Bra", "\\left\\langle#1\\right|"), $("\\Ket", "\\left|#1\\right\\rangle");
34277
- var xg = (e) => (t) => {
34300
+ var xg = V(Hd["Main-Regular"][84][1] - .7 * Hd["Main-Regular"][65][1]);
34301
+ $("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + xg + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), $("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + xg + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), $("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), $("\\@hspace", "\\hskip #1\\relax"), $("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), $("\\ordinarycolon", ":"), $("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), $("\\dblcolon", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char\"2237}}"), $("\\coloneqq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2254}}"), $("\\Coloneqq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char\"2237\\char\"3d}}"), $("\\coloneq", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"3a\\char\"2212}}"), $("\\Coloneq", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char\"2237\\char\"2212}}"), $("\\eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2255}}"), $("\\Eqqcolon", "\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"3d\\char\"2237}}"), $("\\eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char\"2239}}"), $("\\Eqcolon", "\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char\"2212\\char\"2237}}"), $("\\colonapprox", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"3a\\char\"2248}}"), $("\\Colonapprox", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char\"2237\\char\"2248}}"), $("\\colonsim", "\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"3a\\char\"223c}}"), $("\\Colonsim", "\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char\"2237\\char\"223c}}"), $("∷", "\\dblcolon"), $("∹", "\\eqcolon"), $("≔", "\\coloneqq"), $("≕", "\\eqqcolon"), $("⩴", "\\Coloneqq"), $("\\ratio", "\\vcentcolon"), $("\\coloncolon", "\\dblcolon"), $("\\colonequals", "\\coloneqq"), $("\\coloncolonequals", "\\Coloneqq"), $("\\equalscolon", "\\eqqcolon"), $("\\equalscoloncolon", "\\Eqqcolon"), $("\\colonminus", "\\coloneq"), $("\\coloncolonminus", "\\Coloneq"), $("\\minuscolon", "\\eqcolon"), $("\\minuscoloncolon", "\\Eqcolon"), $("\\coloncolonapprox", "\\Colonapprox"), $("\\coloncolonsim", "\\Colonsim"), $("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), $("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), $("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), $("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), $("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), $("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), $("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), $("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), $("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), $("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), $("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), $("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), $("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), $("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), $("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), $("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), $("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), $("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), $("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), $("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), $("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), $("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), $("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), $("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), $("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), $("\\imath", "\\html@mathml{\\@imath}{ı}"), $("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), $("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), $("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), $("⟦", "\\llbracket"), $("⟧", "\\rrbracket"), $("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), $("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), $("↤", "\\mapsfrom"), $("\\mapsfrom", "\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"), $("⦃", "\\lBrace"), $("⦄", "\\rBrace"), $("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), $("⦵", "\\minuso"), $("\\darr", "\\downarrow"), $("\\dArr", "\\Downarrow"), $("\\Darr", "\\Downarrow"), $("\\lang", "\\langle"), $("\\rang", "\\rangle"), $("\\uarr", "\\uparrow"), $("\\uArr", "\\Uparrow"), $("\\Uarr", "\\Uparrow"), $("\\N", "\\mathbb{N}"), $("\\R", "\\mathbb{R}"), $("\\Z", "\\mathbb{Z}"), $("\\alef", "\\aleph"), $("\\alefsym", "\\aleph"), $("\\Alpha", "\\mathrm{A}"), $("\\Beta", "\\mathrm{B}"), $("\\bull", "\\bullet"), $("\\Chi", "\\mathrm{X}"), $("\\clubs", "\\clubsuit"), $("\\cnums", "\\mathbb{C}"), $("\\Complex", "\\mathbb{C}"), $("\\Dagger", "\\ddagger"), $("\\diamonds", "\\diamondsuit"), $("\\empty", "\\emptyset"), $("\\Epsilon", "\\mathrm{E}"), $("\\Eta", "\\mathrm{H}"), $("\\exist", "\\exists"), $("\\harr", "\\leftrightarrow"), $("\\hArr", "\\Leftrightarrow"), $("\\Harr", "\\Leftrightarrow"), $("\\hearts", "\\heartsuit"), $("\\image", "\\Im"), $("\\infin", "\\infty"), $("\\Iota", "\\mathrm{I}"), $("\\isin", "\\in"), $("\\Kappa", "\\mathrm{K}"), $("\\larr", "\\leftarrow"), $("\\lArr", "\\Leftarrow"), $("\\Larr", "\\Leftarrow"), $("\\lrarr", "\\leftrightarrow"), $("\\lrArr", "\\Leftrightarrow"), $("\\Lrarr", "\\Leftrightarrow"), $("\\Mu", "\\mathrm{M}"), $("\\natnums", "\\mathbb{N}"), $("\\Nu", "\\mathrm{N}"), $("\\Omicron", "\\mathrm{O}"), $("\\plusmn", "\\pm"), $("\\rarr", "\\rightarrow"), $("\\rArr", "\\Rightarrow"), $("\\Rarr", "\\Rightarrow"), $("\\real", "\\Re"), $("\\reals", "\\mathbb{R}"), $("\\Reals", "\\mathbb{R}"), $("\\Rho", "\\mathrm{P}"), $("\\sdot", "\\cdot"), $("\\sect", "\\S"), $("\\spades", "\\spadesuit"), $("\\sub", "\\subset"), $("\\sube", "\\subseteq"), $("\\supe", "\\supseteq"), $("\\Tau", "\\mathrm{T}"), $("\\thetasym", "\\vartheta"), $("\\weierp", "\\wp"), $("\\Zeta", "\\mathrm{Z}"), $("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), $("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), $("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), $("\\bra", "\\mathinner{\\langle{#1}|}"), $("\\ket", "\\mathinner{|{#1}\\rangle}"), $("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), $("\\Bra", "\\left\\langle#1\\right|"), $("\\Ket", "\\left|#1\\right\\rangle");
34302
+ var Sg = (e) => (t) => {
34278
34303
  var n = t.consumeArg().tokens, r = t.consumeArg().tokens, i = t.consumeArg().tokens, a = t.consumeArg().tokens, o = t.macros.get("|"), s = t.macros.get("\\|");
34279
34304
  t.macros.beginGroup();
34280
34305
  var c = (t) => (n) => {
@@ -34296,18 +34321,18 @@ var xg = (e) => (t) => {
34296
34321
  numArgs: 0
34297
34322
  };
34298
34323
  };
34299
- $("\\bra@ket", xg(!1)), $("\\bra@set", xg(!0)), $("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), $("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), $("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), $("\\angln", "{\\angl n}"), $("\\blue", "\\textcolor{##6495ed}{#1}"), $("\\orange", "\\textcolor{##ffa500}{#1}"), $("\\pink", "\\textcolor{##ff00af}{#1}"), $("\\red", "\\textcolor{##df0030}{#1}"), $("\\green", "\\textcolor{##28ae7b}{#1}"), $("\\gray", "\\textcolor{gray}{#1}"), $("\\purple", "\\textcolor{##9d38bd}{#1}"), $("\\blueA", "\\textcolor{##ccfaff}{#1}"), $("\\blueB", "\\textcolor{##80f6ff}{#1}"), $("\\blueC", "\\textcolor{##63d9ea}{#1}"), $("\\blueD", "\\textcolor{##11accd}{#1}"), $("\\blueE", "\\textcolor{##0c7f99}{#1}"), $("\\tealA", "\\textcolor{##94fff5}{#1}"), $("\\tealB", "\\textcolor{##26edd5}{#1}"), $("\\tealC", "\\textcolor{##01d1c1}{#1}"), $("\\tealD", "\\textcolor{##01a995}{#1}"), $("\\tealE", "\\textcolor{##208170}{#1}"), $("\\greenA", "\\textcolor{##b6ffb0}{#1}"), $("\\greenB", "\\textcolor{##8af281}{#1}"), $("\\greenC", "\\textcolor{##74cf70}{#1}"), $("\\greenD", "\\textcolor{##1fab54}{#1}"), $("\\greenE", "\\textcolor{##0d923f}{#1}"), $("\\goldA", "\\textcolor{##ffd0a9}{#1}"), $("\\goldB", "\\textcolor{##ffbb71}{#1}"), $("\\goldC", "\\textcolor{##ff9c39}{#1}"), $("\\goldD", "\\textcolor{##e07d10}{#1}"), $("\\goldE", "\\textcolor{##a75a05}{#1}"), $("\\redA", "\\textcolor{##fca9a9}{#1}"), $("\\redB", "\\textcolor{##ff8482}{#1}"), $("\\redC", "\\textcolor{##f9685d}{#1}"), $("\\redD", "\\textcolor{##e84d39}{#1}"), $("\\redE", "\\textcolor{##bc2612}{#1}"), $("\\maroonA", "\\textcolor{##ffbde0}{#1}"), $("\\maroonB", "\\textcolor{##ff92c6}{#1}"), $("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), $("\\maroonD", "\\textcolor{##ca337c}{#1}"), $("\\maroonE", "\\textcolor{##9e034e}{#1}"), $("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), $("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), $("\\purpleC", "\\textcolor{##aa87ff}{#1}"), $("\\purpleD", "\\textcolor{##7854ab}{#1}"), $("\\purpleE", "\\textcolor{##543b78}{#1}"), $("\\mintA", "\\textcolor{##f5f9e8}{#1}"), $("\\mintB", "\\textcolor{##edf2df}{#1}"), $("\\mintC", "\\textcolor{##e0e5cc}{#1}"), $("\\grayA", "\\textcolor{##f6f7f7}{#1}"), $("\\grayB", "\\textcolor{##f0f1f2}{#1}"), $("\\grayC", "\\textcolor{##e3e5e6}{#1}"), $("\\grayD", "\\textcolor{##d6d8da}{#1}"), $("\\grayE", "\\textcolor{##babec2}{#1}"), $("\\grayF", "\\textcolor{##888d93}{#1}"), $("\\grayG", "\\textcolor{##626569}{#1}"), $("\\grayH", "\\textcolor{##3b3e40}{#1}"), $("\\grayI", "\\textcolor{##21242c}{#1}"), $("\\kaBlue", "\\textcolor{##314453}{#1}"), $("\\kaGreen", "\\textcolor{##71B307}{#1}");
34300
- var Sg = {
34324
+ $("\\bra@ket", Sg(!1)), $("\\bra@set", Sg(!0)), $("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), $("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), $("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), $("\\angln", "{\\angl n}"), $("\\blue", "\\textcolor{##6495ed}{#1}"), $("\\orange", "\\textcolor{##ffa500}{#1}"), $("\\pink", "\\textcolor{##ff00af}{#1}"), $("\\red", "\\textcolor{##df0030}{#1}"), $("\\green", "\\textcolor{##28ae7b}{#1}"), $("\\gray", "\\textcolor{gray}{#1}"), $("\\purple", "\\textcolor{##9d38bd}{#1}"), $("\\blueA", "\\textcolor{##ccfaff}{#1}"), $("\\blueB", "\\textcolor{##80f6ff}{#1}"), $("\\blueC", "\\textcolor{##63d9ea}{#1}"), $("\\blueD", "\\textcolor{##11accd}{#1}"), $("\\blueE", "\\textcolor{##0c7f99}{#1}"), $("\\tealA", "\\textcolor{##94fff5}{#1}"), $("\\tealB", "\\textcolor{##26edd5}{#1}"), $("\\tealC", "\\textcolor{##01d1c1}{#1}"), $("\\tealD", "\\textcolor{##01a995}{#1}"), $("\\tealE", "\\textcolor{##208170}{#1}"), $("\\greenA", "\\textcolor{##b6ffb0}{#1}"), $("\\greenB", "\\textcolor{##8af281}{#1}"), $("\\greenC", "\\textcolor{##74cf70}{#1}"), $("\\greenD", "\\textcolor{##1fab54}{#1}"), $("\\greenE", "\\textcolor{##0d923f}{#1}"), $("\\goldA", "\\textcolor{##ffd0a9}{#1}"), $("\\goldB", "\\textcolor{##ffbb71}{#1}"), $("\\goldC", "\\textcolor{##ff9c39}{#1}"), $("\\goldD", "\\textcolor{##e07d10}{#1}"), $("\\goldE", "\\textcolor{##a75a05}{#1}"), $("\\redA", "\\textcolor{##fca9a9}{#1}"), $("\\redB", "\\textcolor{##ff8482}{#1}"), $("\\redC", "\\textcolor{##f9685d}{#1}"), $("\\redD", "\\textcolor{##e84d39}{#1}"), $("\\redE", "\\textcolor{##bc2612}{#1}"), $("\\maroonA", "\\textcolor{##ffbde0}{#1}"), $("\\maroonB", "\\textcolor{##ff92c6}{#1}"), $("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), $("\\maroonD", "\\textcolor{##ca337c}{#1}"), $("\\maroonE", "\\textcolor{##9e034e}{#1}"), $("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), $("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), $("\\purpleC", "\\textcolor{##aa87ff}{#1}"), $("\\purpleD", "\\textcolor{##7854ab}{#1}"), $("\\purpleE", "\\textcolor{##543b78}{#1}"), $("\\mintA", "\\textcolor{##f5f9e8}{#1}"), $("\\mintB", "\\textcolor{##edf2df}{#1}"), $("\\mintC", "\\textcolor{##e0e5cc}{#1}"), $("\\grayA", "\\textcolor{##f6f7f7}{#1}"), $("\\grayB", "\\textcolor{##f0f1f2}{#1}"), $("\\grayC", "\\textcolor{##e3e5e6}{#1}"), $("\\grayD", "\\textcolor{##d6d8da}{#1}"), $("\\grayE", "\\textcolor{##babec2}{#1}"), $("\\grayF", "\\textcolor{##888d93}{#1}"), $("\\grayG", "\\textcolor{##626569}{#1}"), $("\\grayH", "\\textcolor{##3b3e40}{#1}"), $("\\grayI", "\\textcolor{##21242c}{#1}"), $("\\kaBlue", "\\textcolor{##314453}{#1}"), $("\\kaGreen", "\\textcolor{##71B307}{#1}");
34325
+ var Cg = {
34301
34326
  "^": !0,
34302
34327
  _: !0,
34303
34328
  "\\limits": !0,
34304
34329
  "\\nolimits": !0
34305
- }, Cg = class {
34330
+ }, wg = class {
34306
34331
  constructor(e, t, n) {
34307
- this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new pg(mg, t.macros), this.mode = n, this.stack = [];
34332
+ this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new mg(hg, t.macros), this.mode = n, this.stack = [];
34308
34333
  }
34309
34334
  feed(e) {
34310
- this.lexer = new fg(e, this.settings);
34335
+ this.lexer = new pg(e, this.settings);
34311
34336
  }
34312
34337
  switchMode(e) {
34313
34338
  this.mode = e;
@@ -34444,7 +34469,7 @@ var Sg = {
34444
34469
  if (typeof r == "string") {
34445
34470
  var i = 0;
34446
34471
  if (r.includes("#")) for (var a = r.replace(/##/g, ""); a.includes("#" + (i + 1));) ++i;
34447
- for (var o = new fg(r, this.settings), s = [], c = o.lex(); c.text !== "EOF";) s.push(c), c = o.lex();
34472
+ for (var o = new pg(r, this.settings), s = [], c = o.lex(); c.text !== "EOF";) s.push(c), c = o.lex();
34448
34473
  return s.reverse(), {
34449
34474
  tokens: s,
34450
34475
  numArgs: i
@@ -34453,13 +34478,13 @@ var Sg = {
34453
34478
  return r;
34454
34479
  }
34455
34480
  isDefined(e) {
34456
- return this.macros.has(e) || Object.prototype.hasOwnProperty.call(rg, e) || Object.prototype.hasOwnProperty.call(Yd.math, e) || Object.prototype.hasOwnProperty.call(Yd.text, e) || Object.prototype.hasOwnProperty.call(Sg, e);
34481
+ return this.macros.has(e) || Object.prototype.hasOwnProperty.call(ig, e) || Object.prototype.hasOwnProperty.call(Yd.math, e) || Object.prototype.hasOwnProperty.call(Yd.text, e) || Object.prototype.hasOwnProperty.call(Cg, e);
34457
34482
  }
34458
34483
  isExpandable(e) {
34459
34484
  var t = this.macros.get(e);
34460
- return t == null ? Object.prototype.hasOwnProperty.call(rg, e) && !rg[e].primitive : typeof t == "string" || typeof t == "function" || !t.unexpandable;
34485
+ return t == null ? Object.prototype.hasOwnProperty.call(ig, e) && !ig[e].primitive : typeof t == "string" || typeof t == "function" || !t.unexpandable;
34461
34486
  }
34462
- }, wg = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, Tg = Object.freeze({
34487
+ }, Tg = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, Eg = Object.freeze({
34463
34488
  "₊": "+",
34464
34489
  "₋": "-",
34465
34490
  "₌": "=",
@@ -34562,7 +34587,7 @@ var Sg = {
34562
34587
  ᵠ: "ϕ",
34563
34588
  ᵡ: "χ",
34564
34589
  ᶿ: "θ"
34565
- }), Eg = {
34590
+ }), Dg = {
34566
34591
  "́": {
34567
34592
  text: "\\'",
34568
34593
  math: "\\acute"
@@ -34605,7 +34630,7 @@ var Sg = {
34605
34630
  },
34606
34631
  "̋": { text: "\\H" },
34607
34632
  "̧": { text: "\\c" }
34608
- }, Dg = {
34633
+ }, Og = {
34609
34634
  á: "á",
34610
34635
  à: "à",
34611
34636
  ä: "ä",
@@ -34950,9 +34975,9 @@ var Sg = {
34950
34975
  Ῠ: "Ῠ",
34951
34976
  Ώ: "Ώ",
34952
34977
  Ὼ: "Ὼ"
34953
- }, Og = class e {
34978
+ }, kg = class e {
34954
34979
  constructor(e, t) {
34955
- this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new Cg(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
34980
+ this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new wg(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
34956
34981
  }
34957
34982
  expect(e, t) {
34958
34983
  if (t === void 0 && (t = !0), this.fetch().text !== e) throw new B("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
@@ -34986,7 +35011,7 @@ var Sg = {
34986
35011
  for (var r = [];;) {
34987
35012
  this.mode === "math" && this.consumeSpaces();
34988
35013
  var i = this.fetch();
34989
- if (e.endOfExpression.has(i.text) || n && i.text === n || t && rg[i.text] && rg[i.text].infix) break;
35014
+ if (e.endOfExpression.has(i.text) || n && i.text === n || t && ig[i.text] && ig[i.text].infix) break;
34990
35015
  var a = this.parseAtom(n);
34991
35016
  if (!a) break;
34992
35017
  a.type !== "internal" && r.push(a);
@@ -35077,12 +35102,12 @@ var Sg = {
35077
35102
  mode: this.mode,
35078
35103
  body: o
35079
35104
  };
35080
- } else if (Tg[i.text]) {
35081
- var s = wg.test(i.text), c = [];
35082
- for (c.push(new ph(Tg[i.text])), this.consume();;) {
35105
+ } else if (Eg[i.text]) {
35106
+ var s = Tg.test(i.text), c = [];
35107
+ for (c.push(new ph(Eg[i.text])), this.consume();;) {
35083
35108
  var l = this.fetch().text;
35084
- if (!Tg[l] || wg.test(l) !== s) break;
35085
- c.unshift(new ph(Tg[l])), this.consume();
35109
+ if (!Eg[l] || Tg.test(l) !== s) break;
35110
+ c.unshift(new ph(Eg[l])), this.consume();
35086
35111
  }
35087
35112
  var u = this.subparse(c);
35088
35113
  s ? r = {
@@ -35115,7 +35140,7 @@ var Sg = {
35115
35140
  } : t;
35116
35141
  }
35117
35142
  parseFunction(e, t) {
35118
- var n = this.fetch(), r = n.text, i = rg[r];
35143
+ var n = this.fetch(), r = n.text, i = ig[r];
35119
35144
  if (!i) return null;
35120
35145
  if (this.consume(), t && t !== "atom" && !i.allowedInArgument) throw new B("Got function '" + r + "' with no arguments" + (t ? " as " + t : ""), n);
35121
35146
  if (this.mode === "text" && !i.allowedInText) throw new B("Can't use function '" + r + "' in text mode", n);
@@ -35129,7 +35154,7 @@ var Sg = {
35129
35154
  parser: this,
35130
35155
  token: r,
35131
35156
  breakOnTokenText: i
35132
- }, o = rg[e];
35157
+ }, o = ig[e];
35133
35158
  if (o && o.handler) return o.handler(a, t, n);
35134
35159
  throw new B("No function handler for " + e);
35135
35160
  }
@@ -35269,7 +35294,7 @@ var Sg = {
35269
35294
  body: o,
35270
35295
  semisimple: r === "\\begingroup" || void 0
35271
35296
  };
35272
- } else if (i = this.parseFunction(t, e) || this.parseSymbol(), i == null && r[0] === "\\" && !Object.prototype.hasOwnProperty.call(Sg, r)) {
35297
+ } else if (i = this.parseFunction(t, e) || this.parseSymbol(), i == null && r[0] === "\\" && !Object.prototype.hasOwnProperty.call(Cg, r)) {
35273
35298
  if (this.settings.throwOnError) throw new B("Undefined control sequence: " + r, n);
35274
35299
  i = this.formatUnsupportedCmd(r), this.consume();
35275
35300
  }
@@ -35318,8 +35343,8 @@ var Sg = {
35318
35343
  star: r
35319
35344
  };
35320
35345
  }
35321
- Object.prototype.hasOwnProperty.call(Dg, t[0]) && !Yd[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + t[0] + "\" used in math mode", e), t = Dg[t[0]] + t.slice(1));
35322
- var i = ug.exec(t);
35346
+ Object.prototype.hasOwnProperty.call(Og, t[0]) && !Yd[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + t[0] + "\" used in math mode", e), t = Og[t[0]] + t.slice(1));
35347
+ var i = dg.exec(t);
35323
35348
  i && (t = t.substring(0, i.index), t === "i" ? t = "ı" : t === "j" && (t = "ȷ"));
35324
35349
  var a;
35325
35350
  if (Yd[this.mode][t]) {
@@ -35346,8 +35371,8 @@ var Sg = {
35346
35371
  else return null;
35347
35372
  if (this.consume(), i) for (var c = 0; c < i[0].length; c++) {
35348
35373
  var l = i[0][c];
35349
- if (!Eg[l]) throw new B("Unknown accent ' " + l + "'", e);
35350
- var u = Eg[l][this.mode] || Eg[l].text;
35374
+ if (!Dg[l]) throw new B("Unknown accent ' " + l + "'", e);
35375
+ var u = Dg[l][this.mode] || Dg[l].text;
35351
35376
  if (!u) throw new B("Accent " + l + " unsupported in " + this.mode + " mode", e);
35352
35377
  a = {
35353
35378
  type: "accent",
@@ -35362,16 +35387,16 @@ var Sg = {
35362
35387
  return a;
35363
35388
  }
35364
35389
  };
35365
- Og.endOfExpression = /* @__PURE__ */ new Set([
35390
+ kg.endOfExpression = /* @__PURE__ */ new Set([
35366
35391
  "}",
35367
35392
  "\\endgroup",
35368
35393
  "\\end",
35369
35394
  "\\right",
35370
35395
  "&"
35371
35396
  ]);
35372
- var kg = function(e, t) {
35397
+ var Ag = function(e, t) {
35373
35398
  if (!(typeof e == "string" || e instanceof String)) throw TypeError("KaTeX can only parse string typed expression");
35374
- var n = new Og(e, t);
35399
+ var n = new kg(e, t);
35375
35400
  delete n.gullet.macros.current["\\df@tag"];
35376
35401
  var r = n.parse();
35377
35402
  if (delete n.gullet.macros.current["\\current@color"], delete n.gullet.macros.current["\\color"], n.gullet.macros.get("\\df@tag")) {
@@ -35384,43 +35409,43 @@ var kg = function(e, t) {
35384
35409
  }];
35385
35410
  }
35386
35411
  return r;
35387
- }, Ag = function(e, t, n) {
35412
+ }, jg = function(e, t, n) {
35388
35413
  t.textContent = "";
35389
- var r = Pg(e, n).toNode();
35414
+ var r = Fg(e, n).toNode();
35390
35415
  t.appendChild(r);
35391
35416
  };
35392
- typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), Ag = function() {
35417
+ typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), jg = function() {
35393
35418
  throw new B("KaTeX doesn't work in quirks mode.");
35394
35419
  });
35395
- var jg = function(e, t) {
35396
- return Pg(e, t).toMarkup();
35397
- }, Mg = function(e, t) {
35398
- return kg(e, new Ru(t));
35399
- }, Ng = function(e, t, n) {
35420
+ var Mg = function(e, t) {
35421
+ return Fg(e, t).toMarkup();
35422
+ }, Ng = function(e, t) {
35423
+ return Ag(e, new Ru(t));
35424
+ }, Pg = function(e, t, n) {
35400
35425
  if (n.throwOnError || !(e instanceof B)) throw e;
35401
35426
  var r = X(["katex-error"], [new Fd(t)]);
35402
35427
  return r.setAttribute("title", e.toString()), r.setAttribute("style", "color:" + n.errorColor), r;
35403
- }, Pg = function(e, t) {
35428
+ }, Fg = function(e, t) {
35404
35429
  var n = new Ru(t);
35405
35430
  try {
35406
- return Jp(kg(e, n), e, n);
35431
+ return Jp(Ag(e, n), e, n);
35407
35432
  } catch (t) {
35408
- return Ng(t, e, n);
35433
+ return Pg(t, e, n);
35409
35434
  }
35410
- }, Fg = {
35411
- version: "0.18.6",
35412
- render: Ag,
35413
- renderToString: jg,
35435
+ }, Ig = {
35436
+ version: "0.18.7",
35437
+ render: jg,
35438
+ renderToString: Mg,
35414
35439
  ParseError: B,
35415
35440
  SETTINGS_SCHEMA: Pu,
35416
- __parse: Mg,
35417
- __renderToDomTree: Pg,
35441
+ __parse: Ng,
35442
+ __renderToDomTree: Fg,
35418
35443
  __renderToHTMLTree: function(e, t) {
35419
35444
  var n = new Ru(t);
35420
35445
  try {
35421
- return Yp(kg(e, n), e, n);
35446
+ return Yp(Ag(e, n), e, n);
35422
35447
  } catch (t) {
35423
- return Ng(t, e, n);
35448
+ return Pg(t, e, n);
35424
35449
  }
35425
35450
  },
35426
35451
  __setFontMetrics: Gd,
@@ -35435,22 +35460,22 @@ var jg = function(e, t) {
35435
35460
  PathNode: Ld,
35436
35461
  LineNode: Rd
35437
35462
  }
35438
- }, Ig = class extends Error {
35463
+ }, Lg = class extends Error {
35439
35464
  constructor(e) {
35440
35465
  super(e), this.name = "MathMarkupError";
35441
35466
  }
35442
- }, Lg = {
35467
+ }, Rg = {
35443
35468
  amp: "&",
35444
35469
  lt: "<",
35445
35470
  gt: ">",
35446
35471
  quot: "\"",
35447
35472
  apos: "'"
35448
35473
  };
35449
- function Rg(e) {
35450
- return e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g, (e, t) => t.startsWith("#x") ? String.fromCodePoint(Number.parseInt(t.slice(2), 16)) : t.startsWith("#") ? String.fromCodePoint(Number.parseInt(t.slice(1), 10)) : Lg[t] ?? e);
35451
- }
35452
35474
  function zg(e) {
35453
- let t = e.children.map(zg);
35475
+ return e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-zA-Z]+);/g, (e, t) => t.startsWith("#x") ? String.fromCodePoint(Number.parseInt(t.slice(2), 16)) : t.startsWith("#") ? String.fromCodePoint(Number.parseInt(t.slice(1), 10)) : Rg[t] ?? e);
35476
+ }
35477
+ function Bg(e) {
35478
+ let t = e.children.map(Bg);
35454
35479
  return {
35455
35480
  tagName: e.tagName,
35456
35481
  attributes: e.attributes,
@@ -35460,8 +35485,8 @@ function zg(e) {
35460
35485
  }
35461
35486
  };
35462
35487
  }
35463
- var Bg = /<(\/?)([A-Za-z][\w:.-]*)((?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/y, Vg = /([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
35464
- function Hg(e) {
35488
+ var Vg = /<(\/?)([A-Za-z][\w:.-]*)((?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/y, Hg = /([\w:.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
35489
+ function Ug(e) {
35465
35490
  let t = {
35466
35491
  tagName: "#root",
35467
35492
  attributes: /* @__PURE__ */ new Map(),
@@ -35471,21 +35496,21 @@ function Hg(e) {
35471
35496
  for (; r < e.length;) {
35472
35497
  let i = e.indexOf("<", r), a = i === -1 ? e.length : i;
35473
35498
  if (a > r) {
35474
- let t = Rg(e.slice(r, a));
35499
+ let t = zg(e.slice(r, a));
35475
35500
  for (let e of n) e.text.push(t);
35476
35501
  }
35477
35502
  if (i === -1) break;
35478
- Bg.lastIndex = i;
35479
- let o = Bg.exec(e);
35480
- if (o === null) throw new Ig(`unreadable markup at ${i}`);
35503
+ Vg.lastIndex = i;
35504
+ let o = Vg.exec(e);
35505
+ if (o === null) throw new Lg(`unreadable markup at ${i}`);
35481
35506
  let [, s, c, l, u] = o;
35482
- if (r = Bg.lastIndex, s === "/") {
35507
+ if (r = Vg.lastIndex, s === "/") {
35483
35508
  let e = n.pop();
35484
- if (e === void 0 || e === t || e.tagName !== c) throw new Ig(`unexpected </${c}>`);
35509
+ if (e === void 0 || e === t || e.tagName !== c) throw new Lg(`unexpected </${c}>`);
35485
35510
  continue;
35486
35511
  }
35487
35512
  let d = /* @__PURE__ */ new Map();
35488
- for (let e of l.matchAll(Vg)) d.set(e[1], Rg(e[2] ?? e[3] ?? ""));
35513
+ for (let e of l.matchAll(Hg)) d.set(e[1], zg(e[2] ?? e[3] ?? ""));
35489
35514
  let f = {
35490
35515
  tagName: c,
35491
35516
  attributes: d,
@@ -35494,58 +35519,58 @@ function Hg(e) {
35494
35519
  };
35495
35520
  n[n.length - 1].children.push(f), u !== "/" && n.push(f);
35496
35521
  }
35497
- if (n.length !== 1) throw new Ig(`unclosed <${n[n.length - 1].tagName}>`);
35498
- return t.children.map(zg);
35522
+ if (n.length !== 1) throw new Lg(`unclosed <${n[n.length - 1].tagName}>`);
35523
+ return t.children.map(Bg);
35499
35524
  }
35500
- function Ug(e, t) {
35525
+ function Wg(e, t) {
35501
35526
  for (let n of e) {
35502
35527
  if (t(n)) return n;
35503
- let e = Ug(n.children, t);
35528
+ let e = Wg(n.children, t);
35504
35529
  if (e !== void 0) return e;
35505
35530
  }
35506
35531
  }
35507
- function Wg(e, t) {
35532
+ function Gg(e, t) {
35508
35533
  return (e.attributes.get("class") ?? "").split(/\s+/).includes(t);
35509
35534
  }
35510
35535
  //#endregion
35511
35536
  //#region ../shared/src/docx/mathmlToOmml.ts
35512
- var Gg = class extends Error {
35537
+ var Kg = class extends Error {
35513
35538
  element;
35514
35539
  constructor(e) {
35515
35540
  super(`no OMML mapping for MathML element <${e}>`), this.name = "UnsupportedMathError", this.element = e;
35516
35541
  }
35517
- }, Kg = /* @__PURE__ */ new Set(["∑"]), qg = /* @__PURE__ */ new Set([
35542
+ }, qg = /* @__PURE__ */ new Set(["∑"]), Jg = /* @__PURE__ */ new Set([
35518
35543
  "∫",
35519
35544
  "∬",
35520
35545
  "∭",
35521
35546
  "∮"
35522
- ]), Jg = /* @__PURE__ */ new Set(["(", "("]), Yg = /* @__PURE__ */ new Set([")", ")"]);
35523
- function Xg(e, t) {
35524
- let n = Ug(Hg(Fg.renderToString(e, {
35547
+ ]), Yg = /* @__PURE__ */ new Set(["(", "("]), Xg = /* @__PURE__ */ new Set([")", ")"]);
35548
+ function Zg(e, t) {
35549
+ let n = Wg(Ug(Ig.renderToString(e, {
35525
35550
  output: "mathml",
35526
35551
  displayMode: t,
35527
35552
  throwOnError: !1
35528
35553
  })), (e) => e.tagName.toLowerCase() === "math");
35529
- if (n === void 0) throw new Gg("math");
35554
+ if (n === void 0) throw new Kg("math");
35530
35555
  return n;
35531
35556
  }
35532
- function Zg(e) {
35533
- return [...e.children];
35534
- }
35535
35557
  function Qg(e) {
35536
- return (e.textContent ?? "").replace(/[\u2061-\u2064]/g, "").trim();
35558
+ return [...e.children];
35537
35559
  }
35538
35560
  function $g(e) {
35539
- return e.flatMap(e_);
35561
+ return (e.textContent ?? "").replace(/[\u2061-\u2064]/g, "").trim();
35540
35562
  }
35541
35563
  function e_(e) {
35564
+ return e.flatMap(t_);
35565
+ }
35566
+ function t_(e) {
35542
35567
  let t = e.tagName.toLowerCase().replace(/^m:/, "");
35543
35568
  switch (t) {
35544
35569
  case "math":
35545
35570
  case "semantics":
35546
35571
  case "mrow":
35547
35572
  case "mstyle":
35548
- case "mpadded": return i_(Zg(e));
35573
+ case "mpadded": return a_(Qg(e));
35549
35574
  case "annotation":
35550
35575
  case "annotation-xml":
35551
35576
  case "mphantom": return [];
@@ -35554,58 +35579,58 @@ function e_(e) {
35554
35579
  case "mn":
35555
35580
  case "mo":
35556
35581
  case "mtext": {
35557
- let t = Qg(e);
35582
+ let t = $g(e);
35558
35583
  return t === "" ? [] : [new qa(t)];
35559
35584
  }
35560
35585
  case "mfrac": {
35561
- let [t, n] = Zg(e);
35562
- if (t === void 0 || n === void 0) throw new Gg("mfrac");
35586
+ let [t, n] = Qg(e);
35587
+ if (t === void 0 || n === void 0) throw new Kg("mfrac");
35563
35588
  return [new Xa({
35564
- numerator: e_(t),
35565
- denominator: e_(n)
35589
+ numerator: t_(t),
35590
+ denominator: t_(n)
35566
35591
  })];
35567
35592
  }
35568
- case "msqrt": return [new vo({ children: $g(Zg(e)) })];
35593
+ case "msqrt": return [new vo({ children: e_(Qg(e)) })];
35569
35594
  case "mroot": {
35570
- let [t, n] = Zg(e);
35571
- if (t === void 0 || n === void 0) throw new Gg("mroot");
35595
+ let [t, n] = Qg(e);
35596
+ if (t === void 0 || n === void 0) throw new Kg("mroot");
35572
35597
  return [new vo({
35573
- children: e_(t),
35574
- degree: e_(n)
35598
+ children: t_(t),
35599
+ degree: t_(n)
35575
35600
  })];
35576
35601
  }
35577
35602
  case "msub":
35578
35603
  case "munder": {
35579
- let [n, r] = Zg(e);
35580
- if (n === void 0 || r === void 0) throw new Gg(t);
35604
+ let [n, r] = Qg(e);
35605
+ if (n === void 0 || r === void 0) throw new Kg(t);
35581
35606
  return [new uo({
35582
- children: e_(n),
35583
- subScript: e_(r)
35607
+ children: t_(n),
35608
+ subScript: t_(r)
35584
35609
  })];
35585
35610
  }
35586
35611
  case "msup":
35587
35612
  case "mover": {
35588
- let [n, r] = Zg(e);
35589
- if (n === void 0 || r === void 0) throw new Gg(t);
35613
+ let [n, r] = Qg(e);
35614
+ if (n === void 0 || r === void 0) throw new Kg(t);
35590
35615
  return [new co({
35591
- children: e_(n),
35592
- superScript: e_(r)
35616
+ children: t_(n),
35617
+ superScript: t_(r)
35593
35618
  })];
35594
35619
  }
35595
35620
  case "msubsup":
35596
35621
  case "munderover": {
35597
- let [n, r, i] = Zg(e);
35598
- if (n === void 0 || r === void 0 || i === void 0) throw new Gg(t);
35622
+ let [n, r, i] = Qg(e);
35623
+ if (n === void 0 || r === void 0 || i === void 0) throw new Kg(t);
35599
35624
  return [new po({
35600
- children: e_(n),
35601
- subScript: e_(r),
35602
- superScript: e_(i)
35625
+ children: t_(n),
35626
+ subScript: t_(r),
35627
+ superScript: t_(i)
35603
35628
  })];
35604
35629
  }
35605
- default: throw new Gg(t);
35630
+ default: throw new Kg(t);
35606
35631
  }
35607
35632
  }
35608
- var t_ = /* @__PURE__ */ new Set([
35633
+ var n_ = /* @__PURE__ */ new Set([
35609
35634
  "msub",
35610
35635
  "msup",
35611
35636
  "msubsup",
@@ -35613,93 +35638,93 @@ var t_ = /* @__PURE__ */ new Set([
35613
35638
  "mover",
35614
35639
  "munderover"
35615
35640
  ]);
35616
- function n_(e, t) {
35617
- if (!t_.has(e.tagName.toLowerCase())) return;
35618
- let [n, r, i] = Zg(e);
35641
+ function r_(e, t) {
35642
+ if (!n_.has(e.tagName.toLowerCase())) return;
35643
+ let [n, r, i] = Qg(e);
35619
35644
  if (n === void 0) return;
35620
- let a = Qg(n), o = Kg.has(a), s = qg.has(a);
35645
+ let a = $g(n), o = qg.has(a), s = Jg.has(a);
35621
35646
  if (!o && !s) return;
35622
35647
  let c = e.tagName.toLowerCase(), l = c === "msub" || c === "munder" || c === "msubsup" || c === "munderover" ? r : void 0, u = c === "msup" || c === "mover" ? r : c === "msubsup" || c === "munderover" ? i : void 0, d = {
35623
- children: $g(t),
35624
- ...l === void 0 ? {} : { subScript: e_(l) },
35625
- ...u === void 0 ? {} : { superScript: e_(u) }
35648
+ children: e_(t),
35649
+ ...l === void 0 ? {} : { subScript: t_(l) },
35650
+ ...u === void 0 ? {} : { superScript: t_(u) }
35626
35651
  };
35627
35652
  return [o ? new ao(d) : new oo(d)];
35628
35653
  }
35629
- function r_(e) {
35654
+ function i_(e) {
35630
35655
  let t = e[0], n = e[e.length - 1];
35631
- return e.length >= 2 && t !== void 0 && n !== void 0 && t.tagName.toLowerCase() === "mo" && n.tagName.toLowerCase() === "mo" && Jg.has(Qg(t)) && Yg.has(Qg(n)) ? [new So({ children: i_(e.slice(1, -1)) })] : i_(e);
35656
+ return e.length >= 2 && t !== void 0 && n !== void 0 && t.tagName.toLowerCase() === "mo" && n.tagName.toLowerCase() === "mo" && Yg.has($g(t)) && Xg.has($g(n)) ? [new So({ children: a_(e.slice(1, -1)) })] : a_(e);
35632
35657
  }
35633
- function i_(e) {
35658
+ function a_(e) {
35634
35659
  let t = [];
35635
35660
  for (let n = 0; n < e.length; n++) {
35636
- let r = n_(e[n], e.slice(n + 1));
35661
+ let r = r_(e[n], e.slice(n + 1));
35637
35662
  if (r !== void 0) return t.push(...r), t;
35638
- t.push(...e_(e[n]));
35663
+ t.push(...t_(e[n]));
35639
35664
  }
35640
35665
  return t;
35641
35666
  }
35642
- function a_(e, t) {
35643
- let n = Xg(e, t);
35644
- if (Ug([n], (e) => Wg(e, "katex-error")) !== void 0) throw new Gg("katex-error");
35645
- let r = Ug(n.children, (e) => e.tagName.toLowerCase() === "semantics"), i = Zg(r === void 0 ? n : r), a = r_((i.length === 1 && i[0].tagName.toLowerCase() === "mrow" ? Zg(i[0]) : i).filter((e) => e.tagName.toLowerCase() !== "annotation"));
35646
- if (a.length === 0) throw new Gg("empty");
35667
+ function o_(e, t) {
35668
+ let n = Zg(e, t);
35669
+ if (Wg([n], (e) => Gg(e, "katex-error")) !== void 0) throw new Kg("katex-error");
35670
+ let r = Wg(n.children, (e) => e.tagName.toLowerCase() === "semantics"), i = Qg(r === void 0 ? n : r), a = i_((i.length === 1 && i[0].tagName.toLowerCase() === "mrow" ? Qg(i[0]) : i).filter((e) => e.tagName.toLowerCase() !== "annotation"));
35671
+ if (a.length === 0) throw new Kg("empty");
35647
35672
  return a;
35648
35673
  }
35649
35674
  //#endregion
35650
35675
  //#region ../shared/src/docx/xmlText.ts
35651
- var o_ = "�", s_ = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g, c_ = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
35652
- function l_(e) {
35653
- return e.replace(s_, o_).replace(c_, o_);
35676
+ var s_ = "�", c_ = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/g, l_ = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
35677
+ function u_(e) {
35678
+ return e.replace(c_, s_).replace(l_, s_);
35654
35679
  }
35655
35680
  //#endregion
35656
35681
  //#region ../shared/src/docx/markdownToDocx.ts
35657
- var u_ = "Consolas, Courier New, monospace", d_ = 360, f_ = "md-ordered";
35658
- function p_(e) {
35682
+ var d_ = "Consolas, Courier New, monospace", f_ = 360, p_ = "md-ordered";
35683
+ function m_(e) {
35659
35684
  return r().use(o).use(i).use(a).parse(t(e));
35660
35685
  }
35661
- function m_(e, t) {
35686
+ function h_(e, t) {
35662
35687
  return new cr({
35663
- text: l_(e),
35688
+ text: u_(e),
35664
35689
  bold: t.bold,
35665
35690
  italics: t.italics,
35666
35691
  strike: t.strike,
35667
- ...t.code === !0 ? { font: u_ } : {}
35692
+ ...t.code === !0 ? { font: d_ } : {}
35668
35693
  });
35669
35694
  }
35670
- function h_(e, t, n = {}) {
35695
+ function g_(e, t, n = {}) {
35671
35696
  let r = [];
35672
35697
  for (let i of e) switch (i.type) {
35673
35698
  case "text":
35674
- r.push(m_(i.value, n));
35699
+ r.push(h_(i.value, n));
35675
35700
  break;
35676
35701
  case "strong":
35677
- r.push(...h_(i.children, t, {
35702
+ r.push(...g_(i.children, t, {
35678
35703
  ...n,
35679
35704
  bold: !0
35680
35705
  }));
35681
35706
  break;
35682
35707
  case "emphasis":
35683
- r.push(...h_(i.children, t, {
35708
+ r.push(...g_(i.children, t, {
35684
35709
  ...n,
35685
35710
  italics: !0
35686
35711
  }));
35687
35712
  break;
35688
35713
  case "delete":
35689
- r.push(...h_(i.children, t, {
35714
+ r.push(...g_(i.children, t, {
35690
35715
  ...n,
35691
35716
  strike: !0
35692
35717
  }));
35693
35718
  break;
35694
35719
  case "inlineCode":
35695
- r.push(m_(i.value, {
35720
+ r.push(h_(i.value, {
35696
35721
  ...n,
35697
35722
  code: !0
35698
35723
  }));
35699
35724
  break;
35700
35725
  case "link":
35701
35726
  r.push(new Oa({
35702
- children: h_(i.children, t, n),
35727
+ children: g_(i.children, t, n),
35703
35728
  link: i.url
35704
35729
  }));
35705
35730
  break;
@@ -35711,31 +35736,31 @@ function h_(e, t, n = {}) {
35711
35736
  break;
35712
35737
  case "image": {
35713
35738
  let e = t.get(i);
35714
- e === void 0 ? r.push(m_(i.alt ?? i.url, n)) : r.push(O_(e, i.alt));
35739
+ e === void 0 ? r.push(h_(i.alt ?? i.url, n)) : r.push(k_(e, i.alt));
35715
35740
  break;
35716
35741
  }
35717
35742
  case "inlineMath":
35718
- r.push(...g_(i.value, !1, n));
35743
+ r.push(...__(i.value, !1, n));
35719
35744
  break;
35720
- default: r.push(...h_(__(i), t, n));
35745
+ default: r.push(...g_(v_(i), t, n));
35721
35746
  }
35722
35747
  return r;
35723
35748
  }
35724
- function g_(e, t, n) {
35749
+ function __(e, t, n) {
35725
35750
  try {
35726
- return [new Ga({ children: a_(e, t) })];
35751
+ return [new Ga({ children: o_(e, t) })];
35727
35752
  } catch {
35728
- return [m_(e, {
35753
+ return [h_(e, {
35729
35754
  ...n,
35730
35755
  code: !0
35731
35756
  })];
35732
35757
  }
35733
35758
  }
35734
- function __(e) {
35759
+ function v_(e) {
35735
35760
  let t = e.children;
35736
35761
  return Array.isArray(t) ? t : [];
35737
35762
  }
35738
- var v_ = [
35763
+ var y_ = [
35739
35764
  _a.HEADING_1,
35740
35765
  _a.HEADING_2,
35741
35766
  _a.HEADING_3,
@@ -35743,17 +35768,17 @@ var v_ = [
35743
35768
  _a.HEADING_5,
35744
35769
  _a.HEADING_6
35745
35770
  ];
35746
- function y_(e, t) {
35771
+ function b_(e, t) {
35747
35772
  return new Wa({
35748
- heading: v_[Math.min(e.depth, 6) - 1],
35749
- children: h_(e.children, t)
35773
+ heading: y_[Math.min(e.depth, 6) - 1],
35774
+ children: g_(e.children, t)
35750
35775
  });
35751
35776
  }
35752
- function b_(e) {
35777
+ function x_(e) {
35753
35778
  return e.value.split("\n").map((e) => new Wa({
35754
35779
  children: [new cr({
35755
- text: l_(e === "" ? " " : e),
35756
- font: u_
35780
+ text: u_(e === "" ? " " : e),
35781
+ font: d_
35757
35782
  })],
35758
35783
  spacing: {
35759
35784
  before: 0,
@@ -35761,24 +35786,24 @@ function b_(e) {
35761
35786
  }
35762
35787
  }));
35763
35788
  }
35764
- var x_ = 624;
35765
- function S_(e, t) {
35766
- return e <= x_ ? {
35789
+ var S_ = 624;
35790
+ function C_(e, t) {
35791
+ return e <= S_ ? {
35767
35792
  width: Math.round(e),
35768
35793
  height: Math.round(t)
35769
35794
  } : {
35770
- width: x_,
35771
- height: Math.round(t * x_ / e)
35795
+ width: S_,
35796
+ height: Math.round(t * S_ / e)
35772
35797
  };
35773
35798
  }
35774
- function C_(e) {
35799
+ function w_(e) {
35775
35800
  return (e.lang ?? "").toLowerCase() === "mermaid";
35776
35801
  }
35777
- async function w_(e, t) {
35802
+ async function T_(e, t) {
35778
35803
  let n = /* @__PURE__ */ new Map();
35779
35804
  if (t === void 0) return n;
35780
35805
  let r = [], i = (e) => {
35781
- e.type === "code" && C_(e) && r.push(e);
35806
+ e.type === "code" && w_(e) && r.push(e);
35782
35807
  for (let t of e.children ?? []) i(t);
35783
35808
  };
35784
35809
  i(e);
@@ -35787,7 +35812,7 @@ async function w_(e, t) {
35787
35812
  } catch {}
35788
35813
  return n;
35789
35814
  }
35790
- async function T_(e, t) {
35815
+ async function E_(e, t) {
35791
35816
  let n = /* @__PURE__ */ new Map(), { imageKey: r, loadImage: i } = t;
35792
35817
  if (r === void 0 || i === void 0) return n;
35793
35818
  let a = [], o = (e) => {
@@ -35805,7 +35830,7 @@ async function T_(e, t) {
35805
35830
  }
35806
35831
  return n;
35807
35832
  }
35808
- function E_(e) {
35833
+ function D_(e) {
35809
35834
  return new $i({
35810
35835
  type: "svg",
35811
35836
  data: new TextEncoder().encode(e.svg),
@@ -35813,33 +35838,33 @@ function E_(e) {
35813
35838
  type: "png",
35814
35839
  data: e.png
35815
35840
  },
35816
- transformation: S_(e.width, e.height)
35841
+ transformation: C_(e.width, e.height)
35817
35842
  });
35818
35843
  }
35819
- function D_(e) {
35844
+ function O_(e) {
35820
35845
  return new Wa({
35821
35846
  alignment: bn.CENTER,
35822
- children: [E_(e)]
35847
+ children: [D_(e)]
35823
35848
  });
35824
35849
  }
35825
- function O_(e, t) {
35826
- return e.kind === "vector" ? E_(e.image) : new $i({
35850
+ function k_(e, t) {
35851
+ return e.kind === "vector" ? D_(e.image) : new $i({
35827
35852
  type: e.type,
35828
35853
  data: e.bytes,
35829
- transformation: S_(e.width, e.height),
35830
- ...k_(t)
35854
+ transformation: C_(e.width, e.height),
35855
+ ...A_(t)
35831
35856
  });
35832
35857
  }
35833
- function k_(e) {
35858
+ function A_(e) {
35834
35859
  let t = e?.trim() ?? "";
35835
35860
  return t === "" ? {} : { altText: {
35836
35861
  name: "Picture",
35837
35862
  description: t
35838
35863
  } };
35839
35864
  }
35840
- function A_(e) {
35865
+ function j_(e) {
35841
35866
  return e === 0 ? {} : {
35842
- indent: { left: d_ * e },
35867
+ indent: { left: f_ * e },
35843
35868
  border: { left: {
35844
35869
  style: Cn.SINGLE,
35845
35870
  size: 12,
@@ -35848,36 +35873,36 @@ function A_(e) {
35848
35873
  } }
35849
35874
  };
35850
35875
  }
35851
- function j_(e, t, n = 0) {
35876
+ function M_(e, t, n = 0) {
35852
35877
  let r = e.ordered === !0, i = r ? t.instance++ : 0, a = [];
35853
35878
  for (let o of e.children) {
35854
35879
  let e = !0;
35855
35880
  for (let s of o.children) {
35856
35881
  if (s.type === "list") {
35857
- a.push(...j_(s, t, n + 1));
35882
+ a.push(...M_(s, t, n + 1));
35858
35883
  continue;
35859
35884
  }
35860
35885
  if (s.type === "paragraph") {
35861
35886
  a.push(new Wa({
35862
- children: h_(s.children, t.images),
35887
+ children: g_(s.children, t.images),
35863
35888
  ...e ? r ? { numbering: {
35864
- reference: f_,
35889
+ reference: p_,
35865
35890
  level: n,
35866
35891
  instance: i
35867
- } } : { bullet: { level: n } } : { indent: { left: d_ * (n + 1) } }
35892
+ } } : { bullet: { level: n } } : { indent: { left: f_ * (n + 1) } }
35868
35893
  })), e = !1;
35869
35894
  continue;
35870
35895
  }
35871
- a.push(...P_([s], t));
35896
+ a.push(...F_([s], t));
35872
35897
  }
35873
35898
  }
35874
35899
  return a;
35875
35900
  }
35876
- function M_(e, t) {
35901
+ function N_(e, t) {
35877
35902
  return new ss({
35878
35903
  rows: e.children.map((e, n) => new ds({
35879
35904
  tableHeader: n === 0,
35880
- children: e.children.map((e) => new Yo({ children: [new Wa({ children: h_(e.children, t) })] }))
35905
+ children: e.children.map((e) => new Yo({ children: [new Wa({ children: g_(e.children, t) })] }))
35881
35906
  })),
35882
35907
  width: {
35883
35908
  size: 100,
@@ -35885,7 +35910,7 @@ function M_(e, t) {
35885
35910
  }
35886
35911
  });
35887
35912
  }
35888
- function N_() {
35913
+ function P_() {
35889
35914
  return new Wa({
35890
35915
  children: [],
35891
35916
  border: { bottom: {
@@ -35896,55 +35921,55 @@ function N_() {
35896
35921
  } }
35897
35922
  });
35898
35923
  }
35899
- function P_(e, t) {
35924
+ function F_(e, t) {
35900
35925
  let n = [];
35901
35926
  for (let r of e) switch (r.type) {
35902
35927
  case "heading":
35903
- n.push(y_(r, t.images));
35928
+ n.push(b_(r, t.images));
35904
35929
  break;
35905
35930
  case "paragraph":
35906
35931
  n.push(new Wa({
35907
- children: h_(r.children, t.images),
35908
- ...A_(t.quoteDepth)
35932
+ children: g_(r.children, t.images),
35933
+ ...j_(t.quoteDepth)
35909
35934
  }));
35910
35935
  break;
35911
35936
  case "list":
35912
- n.push(...j_(r, t));
35937
+ n.push(...M_(r, t));
35913
35938
  break;
35914
35939
  case "table":
35915
- n.push(M_(r, t.images));
35940
+ n.push(N_(r, t.images));
35916
35941
  break;
35917
35942
  case "code": {
35918
35943
  let e = t.diagrams.get(r);
35919
- e === void 0 ? n.push(...b_(r)) : n.push(D_(e));
35944
+ e === void 0 ? n.push(...x_(r)) : n.push(O_(e));
35920
35945
  break;
35921
35946
  }
35922
35947
  case "blockquote":
35923
- n.push(...P_(r.children, {
35948
+ n.push(...F_(r.children, {
35924
35949
  ...t,
35925
35950
  quoteDepth: t.quoteDepth + 1
35926
35951
  }));
35927
35952
  break;
35928
35953
  case "thematicBreak":
35929
- n.push(N_());
35954
+ n.push(P_());
35930
35955
  break;
35931
35956
  case "math":
35932
35957
  n.push(new Wa({
35933
- children: g_(r.value, !0, {}),
35958
+ children: __(r.value, !0, {}),
35934
35959
  alignment: bn.CENTER
35935
35960
  }));
35936
35961
  break;
35937
35962
  default: {
35938
- let e = h_(__(r), t.images);
35963
+ let e = g_(v_(r), t.images);
35939
35964
  e.length > 0 && n.push(new Wa({ children: e }));
35940
35965
  break;
35941
35966
  }
35942
35967
  }
35943
35968
  return n;
35944
35969
  }
35945
- async function F_(e, t = {}) {
35946
- let n = p_(e), r = await w_(n, t.renderDiagram), i = await T_(n, t);
35947
- return P_(n.children, {
35970
+ async function I_(e, t = {}) {
35971
+ let n = m_(e), r = await T_(n, t.renderDiagram), i = await E_(n, t);
35972
+ return F_(n.children, {
35948
35973
  instance: 0,
35949
35974
  quoteDepth: 0,
35950
35975
  diagrams: r,
@@ -35953,14 +35978,14 @@ async function F_(e, t = {}) {
35953
35978
  }
35954
35979
  //#endregion
35955
35980
  //#region ../shared/src/docx/document.ts
35956
- function I_(e) {
35981
+ function L_(e) {
35957
35982
  return new wl({
35958
- styles: { default: L_() },
35959
- numbering: { config: [R_()] },
35983
+ styles: { default: R_() },
35984
+ numbering: { config: [z_()] },
35960
35985
  sections: [{ children: e }]
35961
35986
  });
35962
35987
  }
35963
- function L_() {
35988
+ function R_() {
35964
35989
  let e = (e) => ({ paragraph: { outlineLevel: e } });
35965
35990
  return {
35966
35991
  heading1: e(0),
@@ -35971,9 +35996,9 @@ function L_() {
35971
35996
  heading6: e(5)
35972
35997
  };
35973
35998
  }
35974
- function R_() {
35999
+ function z_() {
35975
36000
  return {
35976
- reference: f_,
36001
+ reference: p_,
35977
36002
  levels: [
35978
36003
  wc.DECIMAL,
35979
36004
  wc.LOWER_LETTER,
@@ -35993,68 +36018,275 @@ function R_() {
35993
36018
  };
35994
36019
  }
35995
36020
  //#endregion
35996
- //#region ../ui/src/export/markdownToDocx.ts
35997
- async function z_(e, t) {
35998
- let n = t?.path ?? "", r = t?.serverUrl ?? "", i = t?.token ?? null, a = t?.workspace;
35999
- return F_(e, {
36000
- imageKey: (e) => c(n, e, r, i, a),
36001
- loadImage: (e) => l(n, e, r, i, a),
36002
- renderDiagram: s
36003
- });
36021
+ //#region ../shared/src/docx/svgSize.ts
36022
+ function B_(e) {
36023
+ let t = /viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e), n = t ? Number(t[1]) : NaN, r = t ? Number(t[2]) : NaN;
36024
+ return !Number.isFinite(n) || !Number.isFinite(r) || n <= 0 || r <= 0 ? null : {
36025
+ width: n,
36026
+ height: r
36027
+ };
36028
+ }
36029
+ function V_(e, t, n) {
36030
+ let r = /^[\s\S]*?<svg\b[^>]*>/.exec(e);
36031
+ return r === null ? e : r[0].replace(/\swidth="[^"]*"/, "").replace(/\sheight="[^"]*"/, "").replace(/\sstyle="[^"]*"/, (e) => {
36032
+ let t = e.replace(/max-width:[^;"]*;?/, "");
36033
+ return /style="\s*"/.test(t) ? "" : t;
36034
+ }).replace(/>$/, ` width="${t}" height="${n}">`) + e.slice(r[0].length);
36004
36035
  }
36005
36036
  //#endregion
36006
- //#region ../ui/src/export/plainTextToDocx.ts
36007
- var B_ = "Consolas, Courier New, monospace";
36008
- function V_(e) {
36009
- return e.replace(/\r\n/g, "\n").replace(/\n$/, "").split("\n").map((e) => new Wa({
36010
- children: [new cr({
36011
- text: l_(e === "" ? " " : e),
36012
- font: B_
36013
- })],
36014
- spacing: {
36015
- before: 0,
36016
- after: 0
36037
+ //#region ../ui/src/export/mermaidToImage.ts
36038
+ var H_ = class extends Error {
36039
+ constructor(e) {
36040
+ super(e), this.name = "DiagramError";
36041
+ }
36042
+ };
36043
+ function U_(e) {
36044
+ let t = B_(e);
36045
+ if (t === null) throw new H_("diagram has no usable viewBox");
36046
+ return t;
36047
+ }
36048
+ var W_ = [
36049
+ "fill",
36050
+ "fill-opacity",
36051
+ "stroke",
36052
+ "stroke-width",
36053
+ "stroke-opacity",
36054
+ "stroke-dasharray",
36055
+ "stroke-linecap",
36056
+ "stroke-linejoin",
36057
+ "opacity",
36058
+ "font-family",
36059
+ "font-size",
36060
+ "font-weight",
36061
+ "font-style",
36062
+ "text-anchor",
36063
+ "dominant-baseline"
36064
+ ];
36065
+ function G_(e) {
36066
+ let t = document.createElement("div");
36067
+ t.setAttribute("style", "position:absolute;left:-10000px;top:0;width:0;height:0;overflow:hidden"), t.innerHTML = e;
36068
+ let n = t.querySelector("svg");
36069
+ if (n === null) return e;
36070
+ document.body.append(t);
36071
+ try {
36072
+ let e = [n, ...n.querySelectorAll("*")].filter((e) => e.tagName.toLowerCase() !== "style").map((e) => {
36073
+ let t = window.getComputedStyle(e), n = [];
36074
+ for (let e of W_) {
36075
+ let r = t.getPropertyValue(e);
36076
+ r !== "" && n.push([e, r]);
36077
+ }
36078
+ return {
36079
+ element: e,
36080
+ painted: n
36081
+ };
36082
+ });
36083
+ for (let { element: t, painted: n } of e) {
36084
+ for (let [e, r] of n) t.setAttribute(e, r);
36085
+ t.removeAttribute("style"), t.removeAttribute("class");
36017
36086
  }
36018
- }));
36087
+ for (let e of [...n.querySelectorAll("style")]) e.remove();
36088
+ return n.outerHTML;
36089
+ } finally {
36090
+ t.remove();
36091
+ }
36092
+ }
36093
+ async function K_(e, t) {
36094
+ return n(async () => {
36095
+ let n = (await import("./mermaid.core-BJkDCzqA.js").then((e) => e.t)).default, r;
36096
+ try {
36097
+ n.initialize({
36098
+ startOnLoad: !1,
36099
+ theme: "default",
36100
+ look: "classic",
36101
+ securityLevel: "strict",
36102
+ suppressErrorRendering: !0,
36103
+ flowchart: { htmlLabels: !1 },
36104
+ htmlLabels: !1
36105
+ }), {svg: r} = await n.render(t, e);
36106
+ } catch (e) {
36107
+ throw new H_(`mermaid could not render the diagram: ${String(e)}`);
36108
+ } finally {
36109
+ n.initialize({
36110
+ startOnLoad: !1,
36111
+ look: "classic",
36112
+ securityLevel: "strict",
36113
+ suppressErrorRendering: !0
36114
+ });
36115
+ }
36116
+ let { width: i, height: a } = U_(r), o = V_(r, i, a), s = await J_(o, i, a);
36117
+ return {
36118
+ svg: G_(o),
36119
+ png: s,
36120
+ width: i,
36121
+ height: a
36122
+ };
36123
+ });
36124
+ }
36125
+ var q_ = 2;
36126
+ async function J_(e, t, n) {
36127
+ let r = document.createElement("canvas");
36128
+ r.width = Math.max(1, Math.round(t * q_)), r.height = Math.max(1, Math.round(n * q_));
36129
+ let i = r.getContext("2d");
36130
+ if (i === null) throw new H_("no 2d canvas context for the fallback image");
36131
+ let a = URL.createObjectURL(new Blob([e], { type: "image/svg+xml;charset=utf-8" }));
36132
+ try {
36133
+ let e = await Y_(a);
36134
+ return i.fillStyle = "#ffffff", i.fillRect(0, 0, r.width, r.height), i.drawImage(e, 0, 0, r.width, r.height), await X_(r);
36135
+ } finally {
36136
+ URL.revokeObjectURL(a);
36137
+ }
36138
+ }
36139
+ function Y_(e) {
36140
+ return new Promise((t, n) => {
36141
+ let r = new Image();
36142
+ r.onload = () => t(r), r.onerror = () => n(new H_("the browser would not draw the diagram")), r.src = e;
36143
+ });
36144
+ }
36145
+ async function X_(e) {
36146
+ let t = await new Promise((t) => e.toBlob(t, "image/png"));
36147
+ if (t === null) throw new H_("the canvas produced no image");
36148
+ return new Uint8Array(await t.arrayBuffer());
36019
36149
  }
36020
36150
  //#endregion
36021
- //#region ../ui/src/export/docxExport.ts
36022
- function H_(e) {
36023
- let t = e.split(/[/\\]/).pop() ?? "document", n = t.lastIndexOf(".");
36024
- return `${n > 0 ? t.slice(0, n) : t}.docx`;
36151
+ //#region ../ui/src/export/loadReferencedImage.ts
36152
+ function Z_(e) {
36153
+ return e !== "" && !c(e);
36025
36154
  }
36026
- function U_(e) {
36027
- return /\.(md|markdown)$/i.test(e);
36155
+ function Q_(e, t, n, r, i) {
36156
+ if (Z_(t)) return s(n, l(e, t), r, void 0, i);
36028
36157
  }
36029
- async function W_(e, t, n) {
36030
- return Ul.toBlob(I_(await G_(e, t, n)));
36158
+ async function $_(e, t, n, r, i) {
36159
+ let a = Q_(e, t, n, r, i);
36160
+ if (a !== void 0) try {
36161
+ let e = await fetch(a);
36162
+ return e.ok ? await ev(new Uint8Array(await e.arrayBuffer())) : void 0;
36163
+ } catch {
36164
+ return;
36165
+ }
36031
36166
  }
36032
- async function G_(e, t, n) {
36033
- return U_(t) ? z_(e, {
36034
- ...n,
36035
- path: t
36036
- }) : V_(e);
36167
+ async function ev(e) {
36168
+ if (tv(e)) return nv(new TextDecoder().decode(e));
36169
+ let t = av(e);
36170
+ return t === void 0 ? void 0 : {
36171
+ kind: "raster",
36172
+ ...t,
36173
+ bytes: e
36174
+ };
36037
36175
  }
36038
- async function K_(e, t, r) {
36039
- n(await W_(e, t, r), H_(t));
36176
+ function tv(e) {
36177
+ return new TextDecoder().decode(e.subarray(0, 512)).toLowerCase().includes("<svg");
36040
36178
  }
36041
- var q_ = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
36042
- async function J_(e, t, n) {
36043
- let r = await W_(e, t, n), i = { "Content-Type": q_ };
36044
- n?.token && (i.Authorization = `Bearer ${n.token}`);
36045
- let a = await fetch(`${n?.serverUrl ?? ""}/files/docx-template`, {
36046
- method: "POST",
36047
- headers: i,
36048
- body: r
36049
- });
36050
- if (!a.ok) {
36051
- let e = await a.json().catch(() => null);
36052
- throw Error(e?.message ?? `the server answered ${a.status}`);
36179
+ async function nv(e) {
36180
+ try {
36181
+ let { width: t, height: n } = rv(e), r = V_(e, t, n), i = await J_(r, t, n);
36182
+ return {
36183
+ kind: "vector",
36184
+ image: {
36185
+ svg: G_(r),
36186
+ png: i,
36187
+ width: t,
36188
+ height: n
36189
+ }
36190
+ };
36191
+ } catch {
36192
+ return;
36193
+ }
36194
+ }
36195
+ function rv(e) {
36196
+ try {
36197
+ return U_(e);
36198
+ } catch {
36199
+ let t = /<svg\b[^>]*>/.exec(e), n = iv(t?.[0] ?? "", "width"), r = iv(t?.[0] ?? "", "height");
36200
+ if (n === void 0 || r === void 0) throw new H_("the referenced svg states no size");
36201
+ return {
36202
+ width: n,
36203
+ height: r
36204
+ };
36205
+ }
36206
+ }
36207
+ function iv(e, t) {
36208
+ let n = RegExp(`\\s${t}="([^"]*)"`).exec(e)?.[1];
36209
+ if (n === void 0) return;
36210
+ let r = Number.parseFloat(n.replace(/px$/i, ""));
36211
+ return Number.isFinite(r) && r > 0 && !n.includes("%") ? r : void 0;
36212
+ }
36213
+ function av(e) {
36214
+ return uv(e) ?? dv(e) ?? fv(e) ?? mv(e);
36215
+ }
36216
+ function ov(e, t) {
36217
+ return (e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]) >>> 0;
36218
+ }
36219
+ function sv(e, t) {
36220
+ return e[t] | e[t + 1] << 8;
36221
+ }
36222
+ function cv(e, t) {
36223
+ return e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24 | 0;
36224
+ }
36225
+ var lv = [
36226
+ 137,
36227
+ 80,
36228
+ 78,
36229
+ 71,
36230
+ 13,
36231
+ 10,
36232
+ 26,
36233
+ 10
36234
+ ];
36235
+ function uv(e) {
36236
+ if (!(e.length < 24) && lv.every((t, n) => e[n] === t)) return hv("png", ov(e, 16), ov(e, 20));
36237
+ }
36238
+ function dv(e) {
36239
+ if (e.length < 10) return;
36240
+ let t = String.fromCharCode(...e.subarray(0, 6));
36241
+ if (t === "GIF87a" || t === "GIF89a") return hv("gif", sv(e, 6), sv(e, 8));
36242
+ }
36243
+ function fv(e) {
36244
+ if (!(e.length < 26 || e[0] !== 66 || e[1] !== 77)) return hv("bmp", Math.abs(cv(e, 18)), Math.abs(cv(e, 22)));
36245
+ }
36246
+ var pv = /* @__PURE__ */ new Set([
36247
+ 192,
36248
+ 193,
36249
+ 194,
36250
+ 195,
36251
+ 197,
36252
+ 198,
36253
+ 199,
36254
+ 201,
36255
+ 202,
36256
+ 203,
36257
+ 205,
36258
+ 206,
36259
+ 207
36260
+ ]);
36261
+ function mv(e) {
36262
+ if (e.length < 4 || e[0] !== 255 || e[1] !== 216) return;
36263
+ let t = 2;
36264
+ for (; t + 9 < e.length;) {
36265
+ if (e[t] !== 255) {
36266
+ t += 1;
36267
+ continue;
36268
+ }
36269
+ let n = e[t + 1];
36270
+ if (n === 255) {
36271
+ t += 1;
36272
+ continue;
36273
+ }
36274
+ if (n === 216 || n === 1 || n >= 208 && n <= 215) {
36275
+ t += 2;
36276
+ continue;
36277
+ }
36278
+ if (pv.has(n)) return hv("jpg", e[t + 7] << 8 | e[t + 8], e[t + 5] << 8 | e[t + 6]);
36279
+ let r = e[t + 2] << 8 | e[t + 3];
36280
+ if (r < 2) return;
36281
+ t += 2 + r;
36053
36282
  }
36054
- return a.blob();
36055
36283
  }
36056
- async function Y_(e, t, r) {
36057
- n(await J_(e, t, r), H_(t));
36284
+ function hv(e, t, n) {
36285
+ return t > 0 && n > 0 ? {
36286
+ type: e,
36287
+ width: t,
36288
+ height: n
36289
+ } : void 0;
36058
36290
  }
36059
36291
  //#endregion
36060
- export { K_ as downloadDocx, Y_ as downloadDocxInTemplate };
36292
+ export { U_ as a, I_ as c, Wa as d, cr as f, K_ as i, u_ as l, Q_ as n, V_ as o, G_ as r, L_ as s, $_ as t, Ul as u };