@will1123/lx-ui-utils 1.0.3 → 1.0.5-pre1

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.
@@ -233,7 +233,7 @@ function defaultOnOpen(response) {
233
233
  }
234
234
  function sse(config, handlers) {
235
235
  return __async(this, null, function* () {
236
- const { url, method = "POST", headers = {}, body, signal, token, openWhenHidden = true } = config;
236
+ const { url, method = "POST", headers = {}, params, signal, token, openWhenHidden = true } = config;
237
237
  const requestHeaders = __spreadValues({
238
238
  "Content-Type": "application/json;charset=utf-8"
239
239
  }, headers);
@@ -243,7 +243,7 @@ function sse(config, handlers) {
243
243
  yield fetchEventSource(url, {
244
244
  method,
245
245
  headers: requestHeaders,
246
- body: JSON.stringify(body),
246
+ body: JSON.stringify(params),
247
247
  signal,
248
248
  openWhenHidden,
249
249
  onopen(response) {
@@ -3406,7 +3406,7 @@ function expandOrCloneMode(mode) {
3406
3406
  }
3407
3407
  return mode;
3408
3408
  }
3409
- var version = "11.11.1";
3409
+ var version$1 = "11.11.1";
3410
3410
  class HTMLInjectionError extends Error {
3411
3411
  constructor(reason, html2) {
3412
3412
  super(reason);
@@ -4032,7 +4032,7 @@ const HLJS = function(hljs2) {
4032
4032
  hljs2.safeMode = function() {
4033
4033
  SAFE_MODE = true;
4034
4034
  };
4035
- hljs2.versionString = version;
4035
+ hljs2.versionString = version$1;
4036
4036
  hljs2.regex = {
4037
4037
  concat,
4038
4038
  lookahead,
@@ -11122,14 +11122,14 @@ function requireCrystal() {
11122
11122
  keywords: CRYSTAL_KEYWORDS
11123
11123
  };
11124
11124
  function recursiveParen(begin, end) {
11125
- const contains3 = [
11125
+ const contains = [
11126
11126
  {
11127
11127
  begin,
11128
11128
  end
11129
11129
  }
11130
11130
  ];
11131
- contains3[0].contains = contains3;
11132
- return contains3;
11131
+ contains[0].contains = contains;
11132
+ return contains;
11133
11133
  }
11134
11134
  const STRING = {
11135
11135
  className: "string",
@@ -54571,9 +54571,6 @@ class ParseError {
54571
54571
  }
54572
54572
  }
54573
54573
  ParseError.prototype.__proto__ = Error.prototype;
54574
- var contains = function contains2(list2, elem) {
54575
- return list2.indexOf(elem) !== -1;
54576
- };
54577
54574
  var deflt = function deflt2(setting, defaultIfUndefined) {
54578
54575
  return setting === void 0 ? defaultIfUndefined : setting;
54579
54576
  };
@@ -54635,7 +54632,6 @@ var protocolFromUrl = function protocolFromUrl2(url) {
54635
54632
  return protocol[1].toLowerCase();
54636
54633
  };
54637
54634
  var utils = {
54638
- contains,
54639
54635
  deflt,
54640
54636
  escape,
54641
54637
  hyphenate,
@@ -55179,7 +55175,6 @@ var tallDelim = function tallDelim2(label, midHeight) {
55179
55175
  }
55180
55176
  };
55181
55177
  class DocumentFragment {
55182
- // HtmlDomNode
55183
55178
  // Never used; needed for satisfying interface.
55184
55179
  constructor(children) {
55185
55180
  this.children = void 0;
@@ -55196,7 +55191,7 @@ class DocumentFragment {
55196
55191
  this.style = {};
55197
55192
  }
55198
55193
  hasClass(className) {
55199
- return utils.contains(this.classes, className);
55194
+ return this.classes.includes(className);
55200
55195
  }
55201
55196
  /** Convert the fragment into a node. */
55202
55197
  toNode() {
@@ -57887,6 +57882,7 @@ var toNode = function toNode2(tagName) {
57887
57882
  }
57888
57883
  return node;
57889
57884
  };
57885
+ var invalidAttributeNameRegex = /[\s"'>/=\x00-\x1f]/;
57890
57886
  var toMarkup = function toMarkup2(tagName) {
57891
57887
  var markup = "<" + tagName;
57892
57888
  if (this.classes.length) {
@@ -57903,6 +57899,9 @@ var toMarkup = function toMarkup2(tagName) {
57903
57899
  }
57904
57900
  for (var attr in this.attributes) {
57905
57901
  if (this.attributes.hasOwnProperty(attr)) {
57902
+ if (invalidAttributeNameRegex.test(attr)) {
57903
+ throw new ParseError("Invalid attribute name '" + attr + "'");
57904
+ }
57906
57905
  markup += " " + attr + '="' + utils.escape(this.attributes[attr]) + '"';
57907
57906
  }
57908
57907
  }
@@ -57935,7 +57934,7 @@ class Span {
57935
57934
  this.attributes[attribute] = value;
57936
57935
  }
57937
57936
  hasClass(className) {
57938
- return utils.contains(this.classes, className);
57937
+ return this.classes.includes(className);
57939
57938
  }
57940
57939
  toNode() {
57941
57940
  return toNode.call(this, "span");
@@ -57961,7 +57960,7 @@ class Anchor {
57961
57960
  this.attributes[attribute] = value;
57962
57961
  }
57963
57962
  hasClass(className) {
57964
- return utils.contains(this.classes, className);
57963
+ return this.classes.includes(className);
57965
57964
  }
57966
57965
  toNode() {
57967
57966
  return toNode.call(this, "a");
@@ -57985,7 +57984,7 @@ class Img {
57985
57984
  this.style = style;
57986
57985
  }
57987
57986
  hasClass(className) {
57988
- return utils.contains(this.classes, className);
57987
+ return this.classes.includes(className);
57989
57988
  }
57990
57989
  toNode() {
57991
57990
  var node = document.createElement("img");
@@ -58050,7 +58049,7 @@ class SymbolNode {
58050
58049
  }
58051
58050
  }
58052
58051
  hasClass(className) {
58053
- return utils.contains(this.classes, className);
58052
+ return this.classes.includes(className);
58054
58053
  }
58055
58054
  /**
58056
58055
  * Creates a text node or span from a symbol node. Note that a span is only
@@ -58793,6 +58792,7 @@ defineSymbol(math, main, inner, "…", "\\ldots", true);
58793
58792
  defineSymbol(math, main, inner, "⋯", "\\@cdots", true);
58794
58793
  defineSymbol(math, main, inner, "⋱", "\\ddots", true);
58795
58794
  defineSymbol(math, main, textord, "⋮", "\\varvdots");
58795
+ defineSymbol(text, main, textord, "⋮", "\\varvdots");
58796
58796
  defineSymbol(math, main, accent, "ˊ", "\\acute");
58797
58797
  defineSymbol(math, main, accent, "ˋ", "\\grave");
58798
58798
  defineSymbol(math, main, accent, "¨", "\\ddot");
@@ -59411,6 +59411,10 @@ var fontMap = {
59411
59411
  variant: "italic",
59412
59412
  fontName: "Math-Italic"
59413
59413
  },
59414
+ "mathsfit": {
59415
+ variant: "sans-serif-italic",
59416
+ fontName: "SansSerif-Italic"
59417
+ },
59414
59418
  // "boldsymbol" is missing because they require the use of multiple fonts:
59415
59419
  // Math-BoldItalic and Main-Bold. This is handled by a special case in
59416
59420
  // makeOrd which ends up calling boldsymbol.
@@ -59679,9 +59683,9 @@ var buildExpression$1 = function buildExpression(expression, options, isRealGrou
59679
59683
  traverseNonSpaceNodes(groups, (node2, prev) => {
59680
59684
  var prevType = prev.classes[0];
59681
59685
  var type = node2.classes[0];
59682
- if (prevType === "mbin" && utils.contains(binRightCanceller, type)) {
59686
+ if (prevType === "mbin" && binRightCanceller.includes(type)) {
59683
59687
  prev.classes[0] = "mord";
59684
- } else if (type === "mbin" && utils.contains(binLeftCanceller, prevType)) {
59688
+ } else if (type === "mbin" && binLeftCanceller.includes(prevType)) {
59685
59689
  node2.classes[0] = "mord";
59686
59690
  }
59687
59691
  }, {
@@ -59897,7 +59901,15 @@ class MathNode {
59897
59901
  node.className = createClass(this.classes);
59898
59902
  }
59899
59903
  for (var i = 0; i < this.children.length; i++) {
59900
- node.appendChild(this.children[i].toNode());
59904
+ if (this.children[i] instanceof TextNode && this.children[i + 1] instanceof TextNode) {
59905
+ var text2 = this.children[i].toText() + this.children[++i].toText();
59906
+ while (this.children[i + 1] instanceof TextNode) {
59907
+ text2 += this.children[++i].toText();
59908
+ }
59909
+ node.appendChild(new TextNode(text2).toNode());
59910
+ } else {
59911
+ node.appendChild(this.children[i].toNode());
59912
+ }
59901
59913
  }
59902
59914
  return node;
59903
59915
  }
@@ -60069,6 +60081,8 @@ var getVariant = function getVariant2(group, options) {
60069
60081
  return "bold";
60070
60082
  } else if (font === "mathbb") {
60071
60083
  return "double-struck";
60084
+ } else if (font === "mathsfit") {
60085
+ return "sans-serif-italic";
60072
60086
  } else if (font === "mathfrak") {
60073
60087
  return "fraktur";
60074
60088
  } else if (font === "mathscr" || font === "mathcal") {
@@ -60079,7 +60093,7 @@ var getVariant = function getVariant2(group, options) {
60079
60093
  return "monospace";
60080
60094
  }
60081
60095
  var text2 = group.text;
60082
- if (utils.contains(["\\imath", "\\jmath"], text2)) {
60096
+ if (["\\imath", "\\jmath"].includes(text2)) {
60083
60097
  return null;
60084
60098
  }
60085
60099
  if (symbols[mode][text2] && symbols[mode][text2].replace) {
@@ -60091,6 +60105,20 @@ var getVariant = function getVariant2(group, options) {
60091
60105
  }
60092
60106
  return null;
60093
60107
  };
60108
+ function isNumberPunctuation(group) {
60109
+ if (!group) {
60110
+ return false;
60111
+ }
60112
+ if (group.type === "mi" && group.children.length === 1) {
60113
+ var child = group.children[0];
60114
+ return child instanceof TextNode && child.text === ".";
60115
+ } else if (group.type === "mo" && group.children.length === 1 && group.getAttribute("separator") === "true" && group.getAttribute("lspace") === "0em" && group.getAttribute("rspace") === "0em") {
60116
+ var _child = group.children[0];
60117
+ return _child instanceof TextNode && _child.text === ",";
60118
+ } else {
60119
+ return false;
60120
+ }
60121
+ }
60094
60122
  var buildExpression2 = function buildExpression3(expression, options, isOrdgroup) {
60095
60123
  if (expression.length === 1) {
60096
60124
  var group = buildGroup2(expression[0], options);
@@ -60111,18 +60139,24 @@ var buildExpression2 = function buildExpression3(expression, options, isOrdgroup
60111
60139
  } else if (_group.type === "mn" && lastGroup.type === "mn") {
60112
60140
  lastGroup.children.push(..._group.children);
60113
60141
  continue;
60114
- } else if (_group.type === "mi" && _group.children.length === 1 && lastGroup.type === "mn") {
60115
- var child = _group.children[0];
60116
- if (child instanceof TextNode && child.text === ".") {
60117
- lastGroup.children.push(..._group.children);
60118
- continue;
60142
+ } else if (isNumberPunctuation(_group) && lastGroup.type === "mn") {
60143
+ lastGroup.children.push(..._group.children);
60144
+ continue;
60145
+ } else if (_group.type === "mn" && isNumberPunctuation(lastGroup)) {
60146
+ _group.children = [...lastGroup.children, ..._group.children];
60147
+ groups.pop();
60148
+ } else if ((_group.type === "msup" || _group.type === "msub") && _group.children.length >= 1 && (lastGroup.type === "mn" || isNumberPunctuation(lastGroup))) {
60149
+ var base = _group.children[0];
60150
+ if (base instanceof MathNode && base.type === "mn") {
60151
+ base.children = [...lastGroup.children, ...base.children];
60152
+ groups.pop();
60119
60153
  }
60120
60154
  } else if (lastGroup.type === "mi" && lastGroup.children.length === 1) {
60121
60155
  var lastChild = lastGroup.children[0];
60122
60156
  if (lastChild instanceof TextNode && lastChild.text === "̸" && (_group.type === "mo" || _group.type === "mi" || _group.type === "mn")) {
60123
- var _child = _group.children[0];
60124
- if (_child instanceof TextNode && _child.text.length > 0) {
60125
- _child.text = _child.text.slice(0, 1) + "̸" + _child.text.slice(1);
60157
+ var child = _group.children[0];
60158
+ if (child instanceof TextNode && child.text.length > 0) {
60159
+ child.text = child.text.slice(0, 1) + "̸" + child.text.slice(1);
60126
60160
  groups.pop();
60127
60161
  }
60128
60162
  }
@@ -60150,7 +60184,7 @@ var buildGroup2 = function buildGroup3(group, options) {
60150
60184
  function buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) {
60151
60185
  var expression = buildExpression2(tree, options);
60152
60186
  var wrapper;
60153
- if (expression.length === 1 && expression[0] instanceof MathNode && utils.contains(["mrow", "mtable"], expression[0].type)) {
60187
+ if (expression.length === 1 && expression[0] instanceof MathNode && ["mrow", "mtable"].includes(expression[0].type)) {
60154
60188
  wrapper = expression[0];
60155
60189
  } else {
60156
60190
  wrapper = new mathMLTree.MathNode("mrow", expression);
@@ -60317,7 +60351,7 @@ var svgSpan = function svgSpan2(group, options) {
60317
60351
  function buildSvgSpan_() {
60318
60352
  var viewBoxWidth = 4e5;
60319
60353
  var label = group.label.slice(1);
60320
- if (utils.contains(["widehat", "widecheck", "widetilde", "utilde"], label)) {
60354
+ if (["widehat", "widecheck", "widetilde", "utilde"].includes(label)) {
60321
60355
  var grp = group;
60322
60356
  var numChars = groupLength(grp.base);
60323
60357
  var viewBoxHeight;
@@ -61672,11 +61706,11 @@ var makeStackedDelim = function makeStackedDelim2(delim, heightTotal, center, op
61672
61706
  top = "\\Uparrow";
61673
61707
  repeat = "‖";
61674
61708
  bottom = "\\Downarrow";
61675
- } else if (utils.contains(verts, delim)) {
61709
+ } else if (verts.includes(delim)) {
61676
61710
  repeat = "∣";
61677
61711
  svgLabel = "vert";
61678
61712
  viewBoxWidth = 333;
61679
- } else if (utils.contains(doubleVerts, delim)) {
61713
+ } else if (doubleVerts.includes(delim)) {
61680
61714
  repeat = "∥";
61681
61715
  svgLabel = "doublevert";
61682
61716
  viewBoxWidth = 556;
@@ -61905,9 +61939,9 @@ var makeSizedDelim = function makeSizedDelim2(delim, size, options, mode, classe
61905
61939
  } else if (delim === ">" || delim === "\\gt" || delim === "⟩") {
61906
61940
  delim = "\\rangle";
61907
61941
  }
61908
- if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) {
61942
+ if (stackLargeDelimiters.includes(delim) || stackNeverDelimiters.includes(delim)) {
61909
61943
  return makeLargeDelim(delim, size, false, options, mode, classes);
61910
- } else if (utils.contains(stackAlwaysDelimiters, delim)) {
61944
+ } else if (stackAlwaysDelimiters.includes(delim)) {
61911
61945
  return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);
61912
61946
  } else {
61913
61947
  throw new ParseError("Illegal delimiter: '" + delim + "'");
@@ -62007,9 +62041,9 @@ var makeCustomSizedDelim = function makeCustomSizedDelim2(delim, height, center,
62007
62041
  delim = "\\rangle";
62008
62042
  }
62009
62043
  var sequence;
62010
- if (utils.contains(stackNeverDelimiters, delim)) {
62044
+ if (stackNeverDelimiters.includes(delim)) {
62011
62045
  sequence = stackNeverDelimiterSequence;
62012
- } else if (utils.contains(stackLargeDelimiters, delim)) {
62046
+ } else if (stackLargeDelimiters.includes(delim)) {
62013
62047
  sequence = stackLargeDelimiterSequence;
62014
62048
  } else {
62015
62049
  sequence = stackAlwaysDelimiterSequence;
@@ -62119,7 +62153,7 @@ var delimiterSizes = {
62119
62153
  var delimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
62120
62154
  function checkDelimiter(delim, context) {
62121
62155
  var symDelim = checkSymbolNodeType(delim);
62122
- if (symDelim && utils.contains(delimiters, symDelim.text)) {
62156
+ if (symDelim && delimiters.includes(symDelim.text)) {
62123
62157
  return symDelim;
62124
62158
  } else if (symDelim) {
62125
62159
  throw new ParseError("Invalid delimiter '" + symDelim.text + "' after '" + context.funcName + "'", delim);
@@ -63408,7 +63442,7 @@ defineEnvironment({
63408
63442
  numArgs: 0
63409
63443
  },
63410
63444
  handler(context) {
63411
- if (utils.contains(["gather", "gather*"], context.envName)) {
63445
+ if (["gather", "gather*"].includes(context.envName)) {
63412
63446
  validateAmsEnvironmentContext(context);
63413
63447
  }
63414
63448
  var res = {
@@ -63561,6 +63595,7 @@ defineFunction({
63561
63595
  "\\mathit",
63562
63596
  "\\mathbf",
63563
63597
  "\\mathnormal",
63598
+ "\\mathsfit",
63564
63599
  // families
63565
63600
  "\\mathbb",
63566
63601
  "\\mathcal",
@@ -64360,11 +64395,14 @@ defineFunction({
64360
64395
  case "\\htmlData": {
64361
64396
  var data = value.split(",");
64362
64397
  for (var i = 0; i < data.length; i++) {
64363
- var keyVal = data[i].split("=");
64364
- if (keyVal.length !== 2) {
64365
- throw new ParseError("Error parsing key-value for \\htmlData");
64398
+ var item = data[i];
64399
+ var firstEquals = item.indexOf("=");
64400
+ if (firstEquals < 0) {
64401
+ throw new ParseError("\\htmlData key/value '" + item + "' missing equals sign");
64366
64402
  }
64367
- attributes["data-" + keyVal[0].trim()] = keyVal[1].trim();
64403
+ var key = item.slice(0, firstEquals);
64404
+ var _value = item.slice(firstEquals + 1);
64405
+ attributes["data-" + key.trim()] = _value;
64368
64406
  }
64369
64407
  trustContext = {
64370
64408
  command: "\\htmlData",
@@ -64862,7 +64900,7 @@ var htmlBuilder$2 = (grp, options) => {
64862
64900
  }
64863
64901
  var style = options.style;
64864
64902
  var large = false;
64865
- if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {
64903
+ if (style.size === Style$1.DISPLAY.size && group.symbol && !noSuccessor.includes(group.name)) {
64866
64904
  large = true;
64867
64905
  }
64868
64906
  var base;
@@ -64928,7 +64966,7 @@ var mathmlBuilder$1 = (group, options) => {
64928
64966
  var node;
64929
64967
  if (group.symbol) {
64930
64968
  node = new MathNode("mo", [makeText(group.name, group.mode)]);
64931
- if (utils.contains(noSuccessor, group.name)) {
64969
+ if (noSuccessor.includes(group.name)) {
64932
64970
  node.setAttribute("largeop", "false");
64933
64971
  }
64934
64972
  } else if (group.body) {
@@ -65067,7 +65105,8 @@ defineFunction({
65067
65105
  type: "op",
65068
65106
  names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
65069
65107
  props: {
65070
- numArgs: 0
65108
+ numArgs: 0,
65109
+ allowedInArgument: true
65071
65110
  },
65072
65111
  handler(_ref5) {
65073
65112
  var {
@@ -65410,7 +65449,8 @@ defineFunction({
65410
65449
  names: ["\\relax"],
65411
65450
  props: {
65412
65451
  numArgs: 0,
65413
- allowedInText: true
65452
+ allowedInText: true,
65453
+ allowedInArgument: true
65414
65454
  },
65415
65455
  handler(_ref) {
65416
65456
  var {
@@ -65428,6 +65468,8 @@ defineFunction({
65428
65468
  props: {
65429
65469
  numArgs: 2,
65430
65470
  numOptionalArgs: 1,
65471
+ allowedInText: true,
65472
+ allowedInMath: true,
65431
65473
  argTypes: ["size", "size", "size"]
65432
65474
  },
65433
65475
  handler(_ref, args, optArgs) {
@@ -66546,7 +66588,7 @@ defineMacro("\\char", function(context) {
66546
66588
  }
66547
66589
  return "\\@char{" + number + "}";
66548
66590
  });
66549
- var newcommand = (context, existsOK, nonexistsOK) => {
66591
+ var newcommand = (context, existsOK, nonexistsOK, skipIfExists) => {
66550
66592
  var arg = context.consumeArg().tokens;
66551
66593
  if (arg.length !== 1) {
66552
66594
  throw new ParseError("\\newcommand's first argument must be a macro name");
@@ -66574,15 +66616,17 @@ var newcommand = (context, existsOK, nonexistsOK) => {
66574
66616
  numArgs = parseInt(argText);
66575
66617
  arg = context.consumeArg().tokens;
66576
66618
  }
66577
- context.macros.set(name, {
66578
- tokens: arg,
66579
- numArgs
66580
- });
66619
+ if (!(exists && skipIfExists)) {
66620
+ context.macros.set(name, {
66621
+ tokens: arg,
66622
+ numArgs
66623
+ });
66624
+ }
66581
66625
  return "";
66582
66626
  };
66583
- defineMacro("\\newcommand", (context) => newcommand(context, false, true));
66584
- defineMacro("\\renewcommand", (context) => newcommand(context, true, false));
66585
- defineMacro("\\providecommand", (context) => newcommand(context, true, true));
66627
+ defineMacro("\\newcommand", (context) => newcommand(context, false, true, false));
66628
+ defineMacro("\\renewcommand", (context) => newcommand(context, true, false, false));
66629
+ defineMacro("\\providecommand", (context) => newcommand(context, true, true, true));
66586
66630
  defineMacro("\\message", (context) => {
66587
66631
  var arg = context.consumeArgs(1)[0];
66588
66632
  console.log(arg.reverse().map((token) => token.text).join(""));
@@ -66654,7 +66698,7 @@ defineMacro("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');
66654
66698
  defineMacro("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');
66655
66699
  defineMacro("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');
66656
66700
  defineMacro("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');
66657
- defineMacro("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}");
66701
+ defineMacro("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");
66658
66702
  defineMacro("⋮", "\\vdots");
66659
66703
  defineMacro("\\varGamma", "\\mathit{\\Gamma}");
66660
66704
  defineMacro("\\varDelta", "\\mathit{\\Delta}");
@@ -66673,6 +66717,8 @@ defineMacro("\\boxed", "\\fbox{$\\displaystyle{#1}$}");
66673
66717
  defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
66674
66718
  defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
66675
66719
  defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
66720
+ defineMacro("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");
66721
+ defineMacro("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
66676
66722
  var dotsByToken = {
66677
66723
  ",": "\\dotsc",
66678
66724
  "\\not": "\\dotsb",
@@ -66736,7 +66782,7 @@ defineMacro("\\dots", function(context) {
66736
66782
  } else if (next.slice(0, 4) === "\\not") {
66737
66783
  thedots = "\\dotsb";
66738
66784
  } else if (next in symbols.math) {
66739
- if (utils.contains(["bin", "rel"], symbols.math[next].group)) {
66785
+ if (["bin", "rel"].includes(symbols.math[next].group)) {
66740
66786
  thedots = "\\dotsb";
66741
66787
  }
66742
66788
  }
@@ -67196,7 +67242,7 @@ class MacroExpander {
67196
67242
  }
67197
67243
  this.pushToken(new Token("EOF", end.loc));
67198
67244
  this.pushTokens(tokens);
67199
- return start.range(end, "");
67245
+ return new Token("", SourceLocation.range(start, end));
67200
67246
  }
67201
67247
  /**
67202
67248
  * Consume all following space tokens, without expansion.
@@ -68158,7 +68204,11 @@ class Parser {
68158
68204
  var symbol = symbolToken.text;
68159
68205
  this.consume();
68160
68206
  this.consumeSpaces();
68161
- var group = this.parseGroup(name);
68207
+ var group;
68208
+ do {
68209
+ var _group;
68210
+ group = this.parseGroup(name);
68211
+ } while (((_group = group) == null ? void 0 : _group.type) === "internal");
68162
68212
  if (!group) {
68163
68213
  throw new ParseError("Expected group after '" + symbol + "'", symbolToken);
68164
68214
  }
@@ -68195,6 +68245,9 @@ class Parser {
68195
68245
  */
68196
68246
  parseAtom(breakOnTokenText) {
68197
68247
  var base = this.parseGroup("atom", breakOnTokenText);
68248
+ if ((base == null ? void 0 : base.type) === "internal") {
68249
+ return base;
68250
+ }
68198
68251
  if (this.mode === "text") {
68199
68252
  return base;
68200
68253
  }
@@ -68406,11 +68459,11 @@ class Parser {
68406
68459
  if (optional2) {
68407
68460
  throw new ParseError("A primitive argument cannot be optional");
68408
68461
  }
68409
- var _group = this.parseGroup(name);
68410
- if (_group == null) {
68462
+ var _group2 = this.parseGroup(name);
68463
+ if (_group2 == null) {
68411
68464
  throw new ParseError("Expected group as " + name, this.fetch());
68412
68465
  }
68413
- return _group;
68466
+ return _group2;
68414
68467
  }
68415
68468
  case "original":
68416
68469
  case null:
@@ -68475,7 +68528,7 @@ class Parser {
68475
68528
  if (res == null) {
68476
68529
  return null;
68477
68530
  }
68478
- var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);
68531
+ var match = /^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);
68479
68532
  if (!match) {
68480
68533
  throw new ParseError("Invalid color: '" + res.text + "'", res);
68481
68534
  }
@@ -68838,11 +68891,20 @@ var renderToHTMLTree = function renderToHTMLTree2(expression, options) {
68838
68891
  return renderError(error2, expression, settings);
68839
68892
  }
68840
68893
  };
68894
+ var version = "0.16.27";
68895
+ var __domTree = {
68896
+ Span,
68897
+ Anchor,
68898
+ SymbolNode,
68899
+ SvgNode,
68900
+ PathNode,
68901
+ LineNode
68902
+ };
68841
68903
  var katex = {
68842
68904
  /**
68843
68905
  * Current KaTeX version
68844
68906
  */
68845
- version: "0.16.12",
68907
+ version,
68846
68908
  /**
68847
68909
  * Renders the given LaTeX into an HTML+MathML combination, and adds
68848
68910
  * it as a child to the specified DOM node.
@@ -68858,7 +68920,7 @@ var katex = {
68858
68920
  */
68859
68921
  ParseError,
68860
68922
  /**
68861
- * The shema of Settings
68923
+ * The schema of Settings
68862
68924
  */
68863
68925
  SETTINGS_SCHEMA,
68864
68926
  /**
@@ -68910,18 +68972,11 @@ var katex = {
68910
68972
  /**
68911
68973
  * Expose the dom tree node types, which can be useful for type checking nodes.
68912
68974
  *
68913
- * NOTE: This method is not currently recommended for public use.
68975
+ * NOTE: These methods are not currently recommended for public use.
68914
68976
  * The internal tree representation is unstable and is very likely
68915
68977
  * to change. Use at your own risk.
68916
68978
  */
68917
- __domTree: {
68918
- Span,
68919
- Anchor,
68920
- SymbolNode,
68921
- SvgNode,
68922
- PathNode,
68923
- LineNode
68924
- }
68979
+ __domTree
68925
68980
  };
68926
68981
  function copyToClipboard(text2) {
68927
68982
  return __async(this, null, function* () {
@@ -69147,7 +69202,7 @@ function bindMarkdownCodeBoxEvents(containerOrConfig, config) {
69147
69202
  const codeBox = copyButton.closest(".lx-ui-code-box");
69148
69203
  const codeElement = codeBox == null ? void 0 : codeBox.querySelector(".lx-ui-code-box-content");
69149
69204
  if (codeElement) {
69150
- const text2 = codeElement.textContent || "";
69205
+ const text2 = (codeElement.textContent || "").trim();
69151
69206
  const success = yield copyToClipboard(text2);
69152
69207
  if (success) {
69153
69208
  onCopySuccess == null ? void 0 : onCopySuccess(text2);