@forsakringskassan/docs-generator 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/runtime.mjs CHANGED
@@ -1321,6 +1321,46 @@ var init_dist = __esm({
1321
1321
  });
1322
1322
 
1323
1323
  // node_modules/dompurify/dist/purify.es.mjs
1324
+ function _arrayLikeToArray(r3, a2) {
1325
+ (null == a2 || a2 > r3.length) && (a2 = r3.length);
1326
+ for (var e6 = 0, n3 = Array(a2); e6 < a2; e6++) n3[e6] = r3[e6];
1327
+ return n3;
1328
+ }
1329
+ function _arrayWithHoles(r3) {
1330
+ if (Array.isArray(r3)) return r3;
1331
+ }
1332
+ function _iterableToArrayLimit(r3, l5) {
1333
+ var t5 = null == r3 ? null : "undefined" != typeof Symbol && r3[Symbol.iterator] || r3["@@iterator"];
1334
+ if (null != t5) {
1335
+ var e6, n3, i3, u2, a2 = [], f2 = true, o4 = false;
1336
+ try {
1337
+ if (i3 = (t5 = t5.call(r3)).next, 0 === l5) ;
1338
+ else for (; !(f2 = (e6 = i3.call(t5)).done) && (a2.push(e6.value), a2.length !== l5); f2 = true) ;
1339
+ } catch (r4) {
1340
+ o4 = true, n3 = r4;
1341
+ } finally {
1342
+ try {
1343
+ if (!f2 && null != t5.return && (u2 = t5.return(), Object(u2) !== u2)) return;
1344
+ } finally {
1345
+ if (o4) throw n3;
1346
+ }
1347
+ }
1348
+ return a2;
1349
+ }
1350
+ }
1351
+ function _nonIterableRest() {
1352
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1353
+ }
1354
+ function _slicedToArray(r3, e6) {
1355
+ return _arrayWithHoles(r3) || _iterableToArrayLimit(r3, e6) || _unsupportedIterableToArray(r3, e6) || _nonIterableRest();
1356
+ }
1357
+ function _unsupportedIterableToArray(r3, a2) {
1358
+ if (r3) {
1359
+ if ("string" == typeof r3) return _arrayLikeToArray(r3, a2);
1360
+ var t5 = {}.toString.call(r3).slice(8, -1);
1361
+ return "Object" === t5 && r3.constructor && (t5 = r3.constructor.name), "Map" === t5 || "Set" === t5 ? Array.from(r3) : "Arguments" === t5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t5) ? _arrayLikeToArray(r3, a2) : void 0;
1362
+ }
1363
+ }
1324
1364
  function unapply(func) {
1325
1365
  return function(thisArg) {
1326
1366
  if (thisArg instanceof RegExp) {
@@ -1375,7 +1415,10 @@ function cleanArray(array4) {
1375
1415
  }
1376
1416
  function clone(object3) {
1377
1417
  const newObject = create(null);
1378
- for (const [property3, value2] of entries(object3)) {
1418
+ for (const _ref2 of entries(object3)) {
1419
+ var _ref3 = _slicedToArray(_ref2, 2);
1420
+ const property3 = _ref3[0];
1421
+ const value2 = _ref3[1];
1379
1422
  const isPropertyExist = objectHasOwnProperty(object3, property3);
1380
1423
  if (isPropertyExist) {
1381
1424
  if (arrayIsArray(value2)) {
@@ -1456,34 +1499,23 @@ function isRegex(value2) {
1456
1499
  function createDOMPurify() {
1457
1500
  let window3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
1458
1501
  const DOMPurify = (root4) => createDOMPurify(root4);
1459
- DOMPurify.version = "3.4.2";
1502
+ DOMPurify.version = "3.4.5";
1460
1503
  DOMPurify.removed = [];
1461
1504
  if (!window3 || !window3.document || window3.document.nodeType !== NODE_TYPE.document || !window3.Element) {
1462
1505
  DOMPurify.isSupported = false;
1463
1506
  return DOMPurify;
1464
1507
  }
1465
- let {
1466
- document: document2
1467
- } = window3;
1508
+ let document2 = window3.document;
1468
1509
  const originalDocument = document2;
1469
1510
  const currentScript = originalDocument.currentScript;
1470
- const {
1471
- DocumentFragment: DocumentFragment3,
1472
- HTMLTemplateElement,
1473
- Node: Node2,
1474
- Element: Element3,
1475
- NodeFilter,
1476
- NamedNodeMap = window3.NamedNodeMap || window3.MozNamedAttrMap,
1477
- HTMLFormElement,
1478
- DOMParser: DOMParser2,
1479
- trustedTypes
1480
- } = window3;
1511
+ const DocumentFragment3 = window3.DocumentFragment, HTMLTemplateElement = window3.HTMLTemplateElement, Node2 = window3.Node, Element3 = window3.Element, NodeFilter = window3.NodeFilter, _window$NamedNodeMap = window3.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === void 0 ? window3.NamedNodeMap || window3.MozNamedAttrMap : _window$NamedNodeMap, HTMLFormElement = window3.HTMLFormElement, DOMParser2 = window3.DOMParser, trustedTypes = window3.trustedTypes;
1481
1512
  const ElementPrototype = Element3.prototype;
1482
1513
  const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
1483
1514
  const remove3 = lookupGetter(ElementPrototype, "remove");
1484
1515
  const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
1485
1516
  const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
1486
1517
  const getParentNode = lookupGetter(ElementPrototype, "parentNode");
1518
+ const getNodeType = Node2 && Node2.prototype ? lookupGetter(Node2.prototype, "nodeType") : null;
1487
1519
  if (typeof HTMLTemplateElement === "function") {
1488
1520
  const template = document2.createElement("template");
1489
1521
  if (template.content && template.content.ownerDocument) {
@@ -1492,30 +1524,12 @@ function createDOMPurify() {
1492
1524
  }
1493
1525
  let trustedTypesPolicy;
1494
1526
  let emptyHTML = "";
1495
- const {
1496
- implementation,
1497
- createNodeIterator,
1498
- createDocumentFragment,
1499
- getElementsByTagName
1500
- } = document2;
1501
- const {
1502
- importNode
1503
- } = originalDocument;
1527
+ const _document = document2, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
1528
+ const importNode = originalDocument.importNode;
1504
1529
  let hooks = _createHooksMap();
1505
1530
  DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
1506
- const {
1507
- MUSTACHE_EXPR: MUSTACHE_EXPR2,
1508
- ERB_EXPR: ERB_EXPR2,
1509
- TMPLIT_EXPR: TMPLIT_EXPR2,
1510
- DATA_ATTR: DATA_ATTR2,
1511
- ARIA_ATTR: ARIA_ATTR2,
1512
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
1513
- ATTR_WHITESPACE: ATTR_WHITESPACE2,
1514
- CUSTOM_ELEMENT: CUSTOM_ELEMENT2
1515
- } = EXPRESSIONS;
1516
- let {
1517
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
1518
- } = EXPRESSIONS;
1531
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
1532
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
1519
1533
  let ALLOWED_TAGS = null;
1520
1534
  const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
1521
1535
  let ALLOWED_ATTR = null;
@@ -1876,11 +1890,37 @@ function createDOMPurify() {
1876
1890
  null
1877
1891
  );
1878
1892
  };
1893
+ const _scrubTemplateExpressions = function _scrubTemplateExpressions2(node2) {
1894
+ node2.normalize();
1895
+ const walker = createNodeIterator.call(
1896
+ node2.ownerDocument || node2,
1897
+ node2,
1898
+ // eslint-disable-next-line no-bitwise
1899
+ NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION,
1900
+ null
1901
+ );
1902
+ let currentNode = walker.nextNode();
1903
+ while (currentNode) {
1904
+ let data5 = currentNode.data;
1905
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
1906
+ data5 = stringReplace(data5, expr, " ");
1907
+ });
1908
+ currentNode.data = data5;
1909
+ currentNode = walker.nextNode();
1910
+ }
1911
+ };
1879
1912
  const _isClobbered = function _isClobbered2(element3) {
1880
1913
  return element3 instanceof HTMLFormElement && (typeof element3.nodeName !== "string" || typeof element3.textContent !== "string" || typeof element3.removeChild !== "function" || !(element3.attributes instanceof NamedNodeMap) || typeof element3.removeAttribute !== "function" || typeof element3.setAttribute !== "function" || typeof element3.namespaceURI !== "string" || typeof element3.insertBefore !== "function" || typeof element3.hasChildNodes !== "function");
1881
1914
  };
1882
1915
  const _isNode = function _isNode2(value2) {
1883
- return typeof Node2 === "function" && value2 instanceof Node2;
1916
+ if (!getNodeType || typeof value2 !== "object" || value2 === null) {
1917
+ return false;
1918
+ }
1919
+ try {
1920
+ return typeof getNodeType(value2) === "number";
1921
+ } catch (_3) {
1922
+ return false;
1923
+ }
1884
1924
  };
1885
1925
  function _executeHooks(hooks2, currentNode, data5) {
1886
1926
  arrayForEach(hooks2, (hook2) => {
@@ -1948,7 +1988,7 @@ function createDOMPurify() {
1948
1988
  }
1949
1989
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
1950
1990
  content = currentNode.textContent;
1951
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
1991
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
1952
1992
  content = stringReplace(content, expr, " ");
1953
1993
  });
1954
1994
  if (currentNode.textContent !== content) {
@@ -1969,8 +2009,8 @@ function createDOMPurify() {
1969
2009
  return false;
1970
2010
  }
1971
2011
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
1972
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
1973
- else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
2012
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ;
2013
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ;
1974
2014
  else if (!nameIsPermitted || FORBID_ATTR[lcName]) {
1975
2015
  if (
1976
2016
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
@@ -1984,9 +2024,9 @@ function createDOMPurify() {
1984
2024
  return false;
1985
2025
  }
1986
2026
  } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
1987
- else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE2, ""))) ;
2027
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
1988
2028
  else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value2, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
1989
- else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value2, ATTR_WHITESPACE2, ""))) ;
2029
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value2, ATTR_WHITESPACE$1, ""))) ;
1990
2030
  else if (value2) {
1991
2031
  return false;
1992
2032
  } else ;
@@ -1994,13 +2034,11 @@ function createDOMPurify() {
1994
2034
  };
1995
2035
  const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]);
1996
2036
  const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
1997
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT2, tagName);
2037
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
1998
2038
  };
1999
2039
  const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
2000
2040
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
2001
- const {
2002
- attributes
2003
- } = currentNode;
2041
+ const attributes = currentNode.attributes;
2004
2042
  if (!attributes || _isClobbered(currentNode)) {
2005
2043
  return;
2006
2044
  }
@@ -2014,11 +2052,7 @@ function createDOMPurify() {
2014
2052
  let l5 = attributes.length;
2015
2053
  while (l5--) {
2016
2054
  const attr = attributes[l5];
2017
- const {
2018
- name,
2019
- namespaceURI,
2020
- value: attrValue
2021
- } = attr;
2055
+ const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
2022
2056
  const lcName = transformCaseFunc(name);
2023
2057
  const initValue = attrValue;
2024
2058
  let value2 = name === "value" ? initValue : stringTrim(initValue);
@@ -2052,7 +2086,7 @@ function createDOMPurify() {
2052
2086
  continue;
2053
2087
  }
2054
2088
  if (SAFE_FOR_TEMPLATES) {
2055
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2089
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
2056
2090
  value2 = stringReplace(value2, expr, " ");
2057
2091
  });
2058
2092
  }
@@ -2109,6 +2143,24 @@ function createDOMPurify() {
2109
2143
  }
2110
2144
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
2111
2145
  };
2146
+ const _sanitizeAttachedShadowRoots2 = function _sanitizeAttachedShadowRoots(root4) {
2147
+ if (root4.nodeType === NODE_TYPE.element && root4.shadowRoot instanceof DocumentFragment3) {
2148
+ const sr = root4.shadowRoot;
2149
+ _sanitizeAttachedShadowRoots2(sr);
2150
+ _sanitizeShadowDOM2(sr);
2151
+ }
2152
+ const childNodes = root4.childNodes;
2153
+ if (!childNodes) {
2154
+ return;
2155
+ }
2156
+ const snapshot = [];
2157
+ arrayForEach(childNodes, (child) => {
2158
+ arrayPush(snapshot, child);
2159
+ });
2160
+ for (const child of snapshot) {
2161
+ _sanitizeAttachedShadowRoots2(child);
2162
+ }
2163
+ };
2112
2164
  DOMPurify.sanitize = function(dirty) {
2113
2165
  let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2114
2166
  let body = null;
@@ -2143,7 +2195,8 @@ function createDOMPurify() {
2143
2195
  throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
2144
2196
  }
2145
2197
  }
2146
- } else if (dirty instanceof Node2) {
2198
+ _sanitizeAttachedShadowRoots2(dirty);
2199
+ } else if (_isNode(dirty)) {
2147
2200
  body = _initDocument("<!---->");
2148
2201
  importedNode = body.ownerDocument.importNode(dirty, true);
2149
2202
  if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
@@ -2153,6 +2206,7 @@ function createDOMPurify() {
2153
2206
  } else {
2154
2207
  body.appendChild(importedNode);
2155
2208
  }
2209
+ _sanitizeAttachedShadowRoots2(importedNode);
2156
2210
  } else {
2157
2211
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
2158
2212
  dirty.indexOf("<") === -1) {
@@ -2175,16 +2229,14 @@ function createDOMPurify() {
2175
2229
  }
2176
2230
  }
2177
2231
  if (IN_PLACE) {
2232
+ if (SAFE_FOR_TEMPLATES) {
2233
+ _scrubTemplateExpressions(dirty);
2234
+ }
2178
2235
  return dirty;
2179
2236
  }
2180
2237
  if (RETURN_DOM) {
2181
2238
  if (SAFE_FOR_TEMPLATES) {
2182
- body.normalize();
2183
- let html2 = body.innerHTML;
2184
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2185
- html2 = stringReplace(html2, expr, " ");
2186
- });
2187
- body.innerHTML = html2;
2239
+ _scrubTemplateExpressions(body);
2188
2240
  }
2189
2241
  if (RETURN_DOM_FRAGMENT) {
2190
2242
  returnNode = createDocumentFragment.call(body.ownerDocument);
@@ -2204,7 +2256,7 @@ function createDOMPurify() {
2204
2256
  serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
2205
2257
  }
2206
2258
  if (SAFE_FOR_TEMPLATES) {
2207
- arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2259
+ arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], (expr) => {
2208
2260
  serializedHTML = stringReplace(serializedHTML, expr, " ");
2209
2261
  });
2210
2262
  }
@@ -2248,25 +2300,20 @@ function createDOMPurify() {
2248
2300
  };
2249
2301
  return DOMPurify;
2250
2302
  }
2251
- var entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor, freeze, seal, create, apply, construct, arrayForEach, arrayLastIndexOf, arrayPop, arrayPush, arraySplice, arrayIsArray, stringToLowerCase, stringToString, stringMatch, stringReplace, stringIndexOf, stringTrim, numberToString, booleanToString, bigintToString, symbolToString, objectHasOwnProperty, objectToString, regExpTest, typeErrorCreate, html$1, svg$1, svgFilters, svgDisallowed, mathMl$1, mathMlDisallowed, text, html, svg, mathMl, xml, MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR, DATA_ATTR, ARIA_ATTR, IS_ALLOWED_URI, IS_SCRIPT_OR_DATA, ATTR_WHITESPACE, DOCTYPE_NAME, CUSTOM_ELEMENT, EXPRESSIONS, NODE_TYPE, getGlobal, _createTrustedTypesPolicy, _createHooksMap, purify;
2303
+ var entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor, freeze, seal, create, _ref, apply, construct, arrayForEach, arrayLastIndexOf, arrayPop, arrayPush, arraySplice, arrayIsArray, stringToLowerCase, stringToString, stringMatch, stringReplace, stringIndexOf, stringTrim, numberToString, booleanToString, bigintToString, symbolToString, objectHasOwnProperty, objectToString, regExpTest, typeErrorCreate, html$1, svg$1, svgFilters, svgDisallowed, mathMl$1, mathMlDisallowed, text, html, svg, mathMl, xml, MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR, DATA_ATTR, ARIA_ATTR, IS_ALLOWED_URI, IS_SCRIPT_OR_DATA, ATTR_WHITESPACE, DOCTYPE_NAME, CUSTOM_ELEMENT, NODE_TYPE, getGlobal, _createTrustedTypesPolicy, _createHooksMap, purify;
2252
2304
  var init_purify_es = __esm({
2253
2305
  "node_modules/dompurify/dist/purify.es.mjs"() {
2254
- ({
2255
- entries,
2256
- setPrototypeOf,
2257
- isFrozen,
2258
- getPrototypeOf,
2259
- getOwnPropertyDescriptor
2260
- } = Object);
2261
- ({
2262
- freeze,
2263
- seal,
2264
- create
2265
- } = Object);
2266
- ({
2267
- apply,
2268
- construct
2269
- } = typeof Reflect !== "undefined" && Reflect);
2306
+ entries = Object.entries;
2307
+ setPrototypeOf = Object.setPrototypeOf;
2308
+ isFrozen = Object.isFrozen;
2309
+ getPrototypeOf = Object.getPrototypeOf;
2310
+ getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2311
+ freeze = Object.freeze;
2312
+ seal = Object.seal;
2313
+ create = Object.create;
2314
+ _ref = typeof Reflect !== "undefined" && Reflect;
2315
+ apply = _ref.apply;
2316
+ construct = _ref.construct;
2270
2317
  if (!freeze) {
2271
2318
  freeze = function freeze2(x6) {
2272
2319
  return x6;
@@ -2320,13 +2367,13 @@ var init_purify_es = __esm({
2320
2367
  mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
2321
2368
  mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
2322
2369
  text = freeze(["#text"]);
2323
- html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
2370
+ html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]);
2324
2371
  svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
2325
2372
  mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
2326
2373
  xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
2327
- MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
2328
- ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
2329
- TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
2374
+ MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
2375
+ ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
2376
+ TMPLIT_EXPR = seal(/\${[\w\W]*/g);
2330
2377
  DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
2331
2378
  ARIA_ATTR = seal(/^aria-[\-\w]+$/);
2332
2379
  IS_ALLOWED_URI = seal(
@@ -2340,19 +2387,6 @@ var init_purify_es = __esm({
2340
2387
  );
2341
2388
  DOCTYPE_NAME = seal(/^html$/i);
2342
2389
  CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
2343
- EXPRESSIONS = /* @__PURE__ */ Object.freeze({
2344
- __proto__: null,
2345
- ARIA_ATTR,
2346
- ATTR_WHITESPACE,
2347
- CUSTOM_ELEMENT,
2348
- DATA_ATTR,
2349
- DOCTYPE_NAME,
2350
- ERB_EXPR,
2351
- IS_ALLOWED_URI,
2352
- IS_SCRIPT_OR_DATA,
2353
- MUSTACHE_EXPR,
2354
- TMPLIT_EXPR
2355
- });
2356
2390
  NODE_TYPE = {
2357
2391
  element: 1,
2358
2392
  text: 3,
@@ -2423,16 +2457,11 @@ __export(katex_exports, {
2423
2457
  renderToString: () => renderToString,
2424
2458
  version: () => version
2425
2459
  });
2426
- function getDefaultValue(schema2) {
2427
- if ("default" in schema2) {
2428
- return schema2.default;
2429
- }
2430
- var type3 = schema2.type;
2431
- var defaultType = Array.isArray(type3) ? type3[0] : type3;
2432
- if (typeof defaultType !== "string") {
2433
- return defaultType.enum[0];
2460
+ function getImplicitDefault(type3) {
2461
+ if (typeof type3 !== "string") {
2462
+ return type3.enum[0];
2434
2463
  }
2435
- switch (defaultType) {
2464
+ switch (type3) {
2436
2465
  case "boolean":
2437
2466
  return false;
2438
2467
  case "string":
@@ -2441,15 +2470,28 @@ function getDefaultValue(schema2) {
2441
2470
  return 0;
2442
2471
  case "object":
2443
2472
  return {};
2473
+ default:
2474
+ throw new Error("Unexpected schema type; settings must declare an explicit default.");
2475
+ }
2476
+ }
2477
+ function getDefaultValue(schema2) {
2478
+ if (schema2.default !== void 0) {
2479
+ return schema2.default;
2444
2480
  }
2481
+ var type3 = Array.isArray(schema2.type) ? schema2.type[0] : schema2.type;
2482
+ return getImplicitDefault(type3);
2483
+ }
2484
+ function applySetting(target, prop, options2, schema2) {
2485
+ var optionValue = options2[prop];
2486
+ target[prop] = optionValue !== void 0 ? schema2.processor ? schema2.processor(optionValue) : optionValue : getDefaultValue(schema2);
2445
2487
  }
2446
2488
  function scriptFromCodepoint(codepoint) {
2447
2489
  for (var i3 = 0; i3 < scriptData.length; i3++) {
2448
- var script = scriptData[i3];
2449
- for (var _i = 0; _i < script.blocks.length; _i++) {
2450
- var block2 = script.blocks[_i];
2490
+ var script2 = scriptData[i3];
2491
+ for (var _i = 0; _i < script2.blocks.length; _i++) {
2492
+ var block2 = script2.blocks[_i];
2451
2493
  if (codepoint >= block2[0] && codepoint <= block2[1]) {
2452
- return script.name;
2494
+ return script2.name;
2453
2495
  }
2454
2496
  }
2455
2497
  }
@@ -2463,6 +2505,9 @@ function supportedCodepoint(codepoint) {
2463
2505
  }
2464
2506
  return false;
2465
2507
  }
2508
+ function isMathDomNode(node2) {
2509
+ return "toText" in node2;
2510
+ }
2466
2511
  function assertSymbolDomNode(group2) {
2467
2512
  if (group2 instanceof SymbolNode) {
2468
2513
  return group2;
@@ -2536,7 +2581,7 @@ function defineSymbol(mode, font, group2, replace2, name, acceptUnicodeChar) {
2536
2581
  symbols[mode][replace2] = symbols[mode][name];
2537
2582
  }
2538
2583
  }
2539
- function defineFunction(_ref) {
2584
+ function defineFunction(_ref2) {
2540
2585
  var {
2541
2586
  type: type3,
2542
2587
  names,
@@ -2544,7 +2589,7 @@ function defineFunction(_ref) {
2544
2589
  handler,
2545
2590
  htmlBuilder: htmlBuilder3,
2546
2591
  mathmlBuilder: mathmlBuilder3
2547
- } = _ref;
2592
+ } = _ref2;
2548
2593
  var data5 = {
2549
2594
  type: type3,
2550
2595
  numArgs: props.numArgs,
@@ -2693,6 +2738,9 @@ function buildMathML(tree, texExpression, options2, isDisplayMode, forMathmlOnly
2693
2738
  var wrapperClass = forMathmlOnly ? "katex" : "katex-mathml";
2694
2739
  return makeSpan([wrapperClass], [math2]);
2695
2740
  }
2741
+ function isAtom(value2) {
2742
+ return value2 in ATOMS;
2743
+ }
2696
2744
  function assertNodeType(node2, type3) {
2697
2745
  if (!node2 || node2.type !== type3) {
2698
2746
  throw new Error("Expected node of type " + type3 + ", but got " + (node2 ? "node of type " + node2.type : String(node2)));
@@ -2864,8 +2912,9 @@ function parseCD(parser30) {
2864
2912
  type: "styling",
2865
2913
  body: [arrow],
2866
2914
  mode: "math",
2867
- style: "display"
2915
+ style: "display",
2868
2916
  // CD is always displaystyle.
2917
+ resetFont: true
2869
2918
  };
2870
2919
  row.push(wrappedArrow);
2871
2920
  cell = newCell();
@@ -2901,6 +2950,9 @@ function parseCD(parser30) {
2901
2950
  hLinesBeforeRow: new Array(body.length + 1).fill([])
2902
2951
  };
2903
2952
  }
2953
+ function isMiddleDelimNode(node2) {
2954
+ return "isMiddle" in node2;
2955
+ }
2904
2956
  function checkDelimiter(delim, context) {
2905
2957
  var symDelim = checkSymbolNodeType(delim);
2906
2958
  if (symDelim && delimiters.has(symDelim.text)) {
@@ -2916,7 +2968,7 @@ function assertParsed(group2) {
2916
2968
  throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
2917
2969
  }
2918
2970
  }
2919
- function defineEnvironment(_ref) {
2971
+ function defineEnvironment(_ref2) {
2920
2972
  var {
2921
2973
  type: type3,
2922
2974
  names,
@@ -2924,7 +2976,7 @@ function defineEnvironment(_ref) {
2924
2976
  handler,
2925
2977
  htmlBuilder: htmlBuilder3,
2926
2978
  mathmlBuilder: mathmlBuilder3
2927
- } = _ref;
2979
+ } = _ref2;
2928
2980
  var data5 = {
2929
2981
  type: type3,
2930
2982
  numArgs: props.numArgs || 0,
@@ -2967,7 +3019,7 @@ function getAutoTag(name) {
2967
3019
  return !name.includes("*");
2968
3020
  }
2969
3021
  }
2970
- function parseArray(parser30, _ref, style4) {
3022
+ function parseArray(parser30, _ref2, style4) {
2971
3023
  var {
2972
3024
  hskipBeforeAndAfter,
2973
3025
  addJot,
@@ -2979,7 +3031,7 @@ function parseArray(parser30, _ref, style4) {
2979
3031
  emptySingleRow,
2980
3032
  maxNumCols,
2981
3033
  leqno
2982
- } = _ref;
3034
+ } = _ref2;
2983
3035
  parser30.gullet.beginGroup();
2984
3036
  if (!singleRow) {
2985
3037
  parser30.gullet.macros.set("\\cr", "\\\\\\relax");
@@ -3032,6 +3084,7 @@ function parseArray(parser30, _ref, style4) {
3032
3084
  type: "styling",
3033
3085
  mode: parser30.mode,
3034
3086
  style: style4,
3087
+ resetFont: true,
3035
3088
  body: [cell]
3036
3089
  };
3037
3090
  }
@@ -3110,12 +3163,13 @@ function sizingGroup(value2, options2, baseOptions) {
3110
3163
  }
3111
3164
  return makeFragment(inner2);
3112
3165
  }
3113
- var ParseError, uppercase, hyphenate, ESCAPE_LOOKUP, ESCAPE_REGEX, escape2, getBaseElem, characterNodesTypes, isCharacterBox, protocolFromUrl, SETTINGS_SCHEMA, Settings, Style, D, Dc, T, Tc, S, Sc, SS, SSc, styles, sup, sub, fracNum, fracDen, cramp, text$1, Style$1, scriptData, allBlocks, doubleBrushStroke, hLinePad, sqrtMain, sqrtSize1, sqrtSize2, sqrtSize3, sqrtSize4, phasePath, sqrtTall, sqrtPath, innerPath, path, tallDelim, DocumentFragment2, ptPerUnit, relativeUnit, validUnit, calculateSize, makeEm, createClass, initNode, toNode, invalidAttributeNameRegex, toMarkup, Span, Anchor, Img, iCombinations, SymbolNode, SvgNode, PathNode, LineNode, hasHtmlDomChildren, fontMetricsData, sigmasAndXis, extraCharacterMap, fontMetricsBySizeIndex, ATOMS, NON_ATOMS, symbols, math, text2, main, ams, accent, bin, close, inner, mathord, op, open, punct, rel, spacing, textord, ligatures, mathTextSymbols, ch, i3, textSymbols, _ch, _i, letters, _ch2, _i2, wideChar, _ch3, _i3, _ch4, _i4, extraLatin, _ch5, _i5, wideLatinLetterData, wideNumeralData, wideCharacterFont, lookupSymbol, makeSymbol, mathsym, boldsymbol, makeOrd, canCombine, tryCombineChars, sizeElementFromChildren, makeSpan, makeSvgSpan, makeLineSpan, makeAnchor, makeFragment, wrapFragment, getVListChildrenAndDepth, makeVList, makeGlue, retrieveTextFontName, fontMap, svgData, staticSvg, thinspace, mediumspace, thickspace, spacings, tightSpacings, _functions, _htmlGroupBuilders, _mathmlGroupBuilders, normalizeArgument, ordargument, binLeftCanceller, binRightCanceller, styleMap$1, DomEnum, buildExpression$1, _traverseNonSpaceNodes, checkPartialGroup, _getOutermostNode, getTypeOfDomTree, makeNullDelimiter, buildGroup$1, MathNode, TextNode, SpaceNode, noVariantSymbols, rowLikeTypes, makeText, makeRow, getVariant, buildExpression2, buildExpressionRow, buildGroup2, sizeStyleMap, sizeMultipliers, sizeAtStyle, Options, optionsFromSettings, displayWrap, buildTree, buildHTMLTree, stretchyCodePoint, stretchyMathML, katexImagesData, wideAccentLabels, stretchySvg, stretchyEnclose, getBaseSymbol, htmlBuilder$a, mathmlBuilder$9, NON_STRETCHY_ACCENT_REGEX, paddedNode, binrelClass, cdArrowFunctionName, newCell, isStartOfArrow, isLabelEnd, htmlBuilder$8, mathmlBuilder$7, globalMap, checkControlSequence, getRHS, letCommand, getMetrics, styleWrap, centerSpan, makeSmallDelim, mathrmSize, makeLargeDelim, makeGlyphSpan, makeInner, lapInEms, lap, verts, doubleVerts, makeStackedDelim, vbPad, emPad, sqrtSvg, makeSqrtImage, stackLargeDelimiters, stackAlwaysDelimiters, stackNeverDelimiters, sizeToMaxHeight, makeSizedDelim, stackNeverDelimiterSequence, stackAlwaysDelimiterSequence, stackLargeDelimiterSequence, delimTypeToFont, traverseSequence, makeCustomSizedDelim, makeLeftRightDelim, delimiterSizes, delimiters, htmlBuilder$7, mathmlBuilder$6, _environments, _macros, SourceLocation, Token, validateAmsEnvironmentContext, gatherEnvironments, htmlBuilder$6, alignMap, mathmlBuilder$5, alignedHandler, environments, htmlBuilder$5, mathmlBuilder$4, fontAliases, htmlBuilder$4, mathmlBuilder$3, wrapWithStyle, stylArray, delimFromValue, htmlBuilder$3, mathmlBuilder$2, sizeData, chooseMathStyle, assembleSupSub, noSuccessor, htmlBuilder$2, mathmlBuilder$1, singleCharBigOps, singleCharIntegrals, htmlBuilder$1, mathmlBuilder2, sizeFuncs, htmlBuilder2, styleMap, htmlBuilderDelegate, defaultVariant, cssSpace, regularSpace, pad, textFontFamilies, textFontWeights, textFontShapes, optionsWithFont, makeVerb, functions, spaceRegexString, controlWordRegexString, controlSymbolRegexString, controlWordWhitespaceRegexString, controlSpaceRegexString, combiningDiacriticalMarkString, combiningDiacriticalMarksEndRegex, tokenRegexString, Lexer, Namespace, macros, digitToNumber, newcommand, dotsByToken, dotsbGroups, spaceAfterDots, latexRaiseA, braketHelper, implicitCommands, MacroExpander, unicodeSubRegEx, uSubsAndSups, unicodeAccents, unicodeSymbols, Parser, parseTree, render, renderToString, generateParseTree, renderError, renderToDomTree, renderToHTMLTree, version, __domTree, katex;
3166
+ function isStyleStr(s2) {
3167
+ return s2 in styleMap;
3168
+ }
3169
+ var ParseError, uppercase, hyphenate, ESCAPE_LOOKUP, ESCAPE_REGEX, escape2, getBaseElem, characterNodesTypes, isCharacterBox, protocolFromUrl, SETTINGS_SCHEMA, Settings, Style, D, Dc, T, Tc, S, Sc, SS, SSc, styles, sup, sub, fracNum, fracDen, cramp, text$1, Style$1, scriptData, allBlocks, doubleBrushStroke, hLinePad, sqrtMain, sqrtSize1, sqrtSize2, sqrtSize3, sqrtSize4, phasePath, sqrtTall, sqrtPath, innerPath, path, tallDelim, DocumentFragment2, ptPerUnit, relativeUnit, validUnit, calculateSize, makeEm, createClass, cssStyleToString, initNode, toNode, invalidAttributeNameRegex, toMarkup, Span, Anchor, Img, iCombinations, SymbolNode, SvgNode, PathNode, LineNode, hasHtmlDomChildren, fontMetricsData, sigmasAndXis, extraCharacterMap, fontMetricsBySizeIndex, symbols, math, text2, main, ams, accent, bin, close, inner, mathord, op, open, punct, rel, spacing, textord, ligatures, mathTextSymbols, ch, i3, textSymbols, _ch, _i, letters, _ch2, _i2, wideChar, _ch3, _i3, _ch4, _i4, extraLatin, _ch5, _i5, boldUpright, italic, boldItalic, script, noFont, fraktur, doubleStruck, boldFraktur, sansSerif, boldSansSerif, italicSansSerif, monospace, wideLatinLetterData, wideNumeralData, wideCharacterFont, lookupSymbol, makeSymbol, mathsym, boldSymbol, makeOrd, canCombine, tryCombineChars, sizeElementFromChildren, makeSpan, makeSvgSpan, makeLineSpan, makeAnchor, makeFragment, wrapFragment, getVListChildrenAndDepth, makeVList, makeGlue, retrieveTextFontName, fontMap, svgData, staticSvg, thinspace, mediumspace, thickspace, spacings, tightSpacings, _functions, _htmlGroupBuilders, _mathmlGroupBuilders, normalizeArgument, ordargument, binLeftCanceller, binRightCanceller, styleMap$1, DomEnum, buildExpression$1, _traverseNonSpaceNodes, checkPartialGroup, _getOutermostNode, getTypeOfDomTree, makeNullDelimiter, buildGroup$1, MathNode, TextNode, SpaceNode, noVariantSymbols, rowLikeTypes, makeText, makeRow, mathFontVariants, getVariant, buildExpression2, buildExpressionRow, buildGroup2, sizeStyleMap, sizeMultipliers, sizeAtStyle, Options, optionsFromSettings, displayWrap, buildTree, buildHTMLTree, stretchyCodePoint, stretchyMathML, katexImagesData, wideAccentLabels, stretchySvg, stretchyEnclose, ATOMS, NON_ATOMS, getBaseSymbol, htmlBuilder$a, mathmlBuilder$9, NON_STRETCHY_ACCENT_REGEX, paddedNode, binrelClass, cdArrowFunctionName, newCell, isStartOfArrow, isLabelEnd, htmlBuilder$8, mathmlBuilder$7, globalMap, checkControlSequence, getRHS, letCommand, getMetrics, styleWrap, centerSpan, makeSmallDelim, mathrmSize, makeLargeDelim, makeGlyphSpan, makeInner, lapInEms, lap, verts, doubleVerts, makeStackedDelim, vbPad, emPad, sqrtSvg, makeSqrtImage, stackLargeDelimiters, stackAlwaysDelimiters, stackNeverDelimiters, sizeToMaxHeight, makeSizedDelim, stackNeverDelimiterSequence, stackAlwaysDelimiterSequence, stackLargeDelimiterSequence, delimTypeToFont, traverseSequence, makeCustomSizedDelim, makeLeftRightDelim, delimiterSizes, delimiters, htmlBuilder$7, mathmlBuilder$6, _environments, _macros, SourceLocation, Token, validateAmsEnvironmentContext, gatherEnvironments, htmlBuilder$6, alignMap, mathmlBuilder$5, alignedHandler, environments, htmlBuilder$5, mathmlBuilder$4, fontAliases, htmlBuilder$4, mathmlBuilder$3, wrapWithStyle, stylArray, delimFromValue, htmlBuilder$3, mathmlBuilder$2, sizeData, chooseMathStyle, assembleSupSub, noSuccessor, htmlBuilder$2, mathmlBuilder$1, singleCharBigOps, singleCharIntegrals, htmlBuilder$1, mathmlBuilder2, sizeFuncs, htmlBuilder2, styleMap, htmlBuilderDelegate, defaultVariant, cssSpace, regularSpace, pad, textFontFamilies, textFontWeights, textFontShapes, optionsWithFont, makeVerb, functions, spaceRegexString, controlWordRegexString, controlSymbolRegexString, controlWordWhitespaceRegexString, controlSpaceRegexString, combiningDiacriticalMarkString, combiningDiacriticalMarksEndRegex, tokenRegexString, Lexer, Namespace, macros, digitToNumber, newcommand, dotsByToken, dotsbGroups, spaceAfterDots, latexRaiseA, braketHelper, implicitCommands, MacroExpander, unicodeSubRegEx, uSubsAndSups, unicodeAccents, unicodeSymbols, Parser, parseTree, render, renderToString, generateParseTree, renderError, renderToDomTree, renderToHTMLTree, version, __domTree, katex;
3114
3170
  var init_katex = __esm({
3115
3171
  "node_modules/katex/dist/katex.mjs"() {
3116
3172
  ParseError = class _ParseError extends Error {
3117
- // Error start position based on passed-in Token or ParseNode.
3118
- // Length of affected text based on passed-in Token or ParseNode.
3119
3173
  // The underlying error message without any context added.
3120
3174
  constructor(message, token2) {
3121
3175
  var error3 = "KaTeX parse error: " + message;
@@ -3148,6 +3202,9 @@ var init_katex = __esm({
3148
3202
  }
3149
3203
  super(error3);
3150
3204
  this.name = "ParseError";
3205
+ this.position = void 0;
3206
+ this.length = void 0;
3207
+ this.rawMessage = void 0;
3151
3208
  Object.setPrototypeOf(this, _ParseError.prototype);
3152
3209
  this.position = start3;
3153
3210
  if (start3 != null && end2 != null) {
@@ -3296,11 +3353,26 @@ var init_katex = __esm({
3296
3353
  if (options2 === void 0) {
3297
3354
  options2 = {};
3298
3355
  }
3356
+ this.displayMode = void 0;
3357
+ this.output = void 0;
3358
+ this.leqno = void 0;
3359
+ this.fleqn = void 0;
3360
+ this.throwOnError = void 0;
3361
+ this.errorColor = void 0;
3362
+ this.macros = void 0;
3363
+ this.minRuleThickness = void 0;
3364
+ this.colorIsTextColor = void 0;
3365
+ this.strict = void 0;
3366
+ this.trust = void 0;
3367
+ this.maxSize = void 0;
3368
+ this.maxExpand = void 0;
3369
+ this.globalGroup = void 0;
3299
3370
  options2 = options2 || {};
3300
3371
  for (var prop of Object.keys(SETTINGS_SCHEMA)) {
3301
3372
  var schema2 = SETTINGS_SCHEMA[prop];
3302
- var optionValue = options2[prop];
3303
- this[prop] = optionValue !== void 0 ? schema2.processor ? schema2.processor(optionValue) : optionValue : getDefaultValue(schema2);
3373
+ if (schema2) {
3374
+ applySetting(this, prop, options2, schema2);
3375
+ }
3304
3376
  }
3305
3377
  }
3306
3378
  /**
@@ -3373,6 +3445,9 @@ var init_katex = __esm({
3373
3445
  };
3374
3446
  Style = class {
3375
3447
  constructor(id33, size4, cramped) {
3448
+ this.id = void 0;
3449
+ this.size = void 0;
3450
+ this.cramped = void 0;
3376
3451
  this.id = id33;
3377
3452
  this.size = size4;
3378
3453
  this.cramped = cramped;
@@ -3663,7 +3738,7 @@ var init_katex = __esm({
3663
3738
  tallDelim = function tallDelim2(label, midHeight) {
3664
3739
  switch (label) {
3665
3740
  case "lbrack":
3666
- return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v" + midHeight + " v1759 h84z";
3741
+ return "M403 1759 V84 H666 V0 H319 V1759 v" + midHeight + " v1759 v84 h347 v-84\nH403z M403 1759 V0 H319 V1759 v" + midHeight + " v1759 v84 h84z";
3667
3742
  case "rbrack":
3668
3743
  return "M347 1759 V0 H0 V84 H263 V1759 v" + midHeight + " v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v" + midHeight + " v1759 h84z";
3669
3744
  case "vert":
@@ -3689,6 +3764,12 @@ var init_katex = __esm({
3689
3764
  DocumentFragment2 = class {
3690
3765
  // Never used; needed for satisfying interface.
3691
3766
  constructor(children2) {
3767
+ this.children = void 0;
3768
+ this.classes = void 0;
3769
+ this.height = void 0;
3770
+ this.depth = void 0;
3771
+ this.maxFontSize = void 0;
3772
+ this.style = void 0;
3692
3773
  this.children = children2;
3693
3774
  this.classes = [];
3694
3775
  this.height = 0;
@@ -3720,8 +3801,12 @@ var init_katex = __esm({
3720
3801
  * MathDomNode's only.
3721
3802
  */
3722
3803
  toText() {
3723
- var toText = (child) => child.toText();
3724
- return this.children.map(toText).join("");
3804
+ return this.children.map((child) => {
3805
+ if (isMathDomNode(child)) {
3806
+ return child.toText();
3807
+ }
3808
+ throw new Error("Expected MathDomNode with toText, got " + child.constructor.name);
3809
+ }).join("");
3725
3810
  }
3726
3811
  };
3727
3812
  ptPerUnit = {
@@ -3796,6 +3881,16 @@ var init_katex = __esm({
3796
3881
  createClass = function createClass2(classes3) {
3797
3882
  return classes3.filter((cls) => cls).join(" ");
3798
3883
  };
3884
+ cssStyleToString = function cssStyleToString2(style4) {
3885
+ var styles6 = "";
3886
+ for (var key of Object.keys(style4)) {
3887
+ var value2 = style4[key];
3888
+ if (value2 !== void 0) {
3889
+ styles6 += hyphenate(key) + ":" + value2 + ";";
3890
+ }
3891
+ }
3892
+ return styles6;
3893
+ };
3799
3894
  initNode = function initNode2(classes3, options2, style4) {
3800
3895
  this.classes = classes3 || [];
3801
3896
  this.attributes = {};
@@ -3816,9 +3911,7 @@ var init_katex = __esm({
3816
3911
  toNode = function toNode2(tagName) {
3817
3912
  var node2 = document.createElement(tagName);
3818
3913
  node2.className = createClass(this.classes);
3819
- for (var key of Object.keys(this.style)) {
3820
- node2.style[key] = this.style[key];
3821
- }
3914
+ Object.assign(node2.style, this.style);
3822
3915
  for (var attr of Object.keys(this.attributes)) {
3823
3916
  node2.setAttribute(attr, this.attributes[attr]);
3824
3917
  }
@@ -3833,10 +3926,7 @@ var init_katex = __esm({
3833
3926
  if (this.classes.length) {
3834
3927
  markup += ' class="' + escape2(createClass(this.classes)) + '"';
3835
3928
  }
3836
- var styles6 = "";
3837
- for (var key of Object.keys(this.style)) {
3838
- styles6 += hyphenate(key) + ":" + this.style[key] + ";";
3839
- }
3929
+ var styles6 = cssStyleToString(this.style);
3840
3930
  if (styles6) {
3841
3931
  markup += ' style="' + escape2(styles6) + '"';
3842
3932
  }
@@ -3855,6 +3945,15 @@ var init_katex = __esm({
3855
3945
  };
3856
3946
  Span = class {
3857
3947
  constructor(classes3, children2, options2, style4) {
3948
+ this.children = void 0;
3949
+ this.attributes = void 0;
3950
+ this.classes = void 0;
3951
+ this.height = void 0;
3952
+ this.depth = void 0;
3953
+ this.width = void 0;
3954
+ this.maxFontSize = void 0;
3955
+ this.style = void 0;
3956
+ this.italic = void 0;
3858
3957
  initNode.call(this, classes3, options2, style4);
3859
3958
  this.children = children2 || [];
3860
3959
  }
@@ -3878,6 +3977,13 @@ var init_katex = __esm({
3878
3977
  };
3879
3978
  Anchor = class {
3880
3979
  constructor(href, classes3, children2, options2) {
3980
+ this.children = void 0;
3981
+ this.attributes = void 0;
3982
+ this.classes = void 0;
3983
+ this.height = void 0;
3984
+ this.depth = void 0;
3985
+ this.maxFontSize = void 0;
3986
+ this.style = void 0;
3881
3987
  initNode.call(this, classes3, options2);
3882
3988
  this.children = children2 || [];
3883
3989
  this.setAttribute("href", href);
@@ -3897,6 +4003,13 @@ var init_katex = __esm({
3897
4003
  };
3898
4004
  Img = class {
3899
4005
  constructor(src, alt, style4) {
4006
+ this.src = void 0;
4007
+ this.alt = void 0;
4008
+ this.classes = void 0;
4009
+ this.height = void 0;
4010
+ this.depth = void 0;
4011
+ this.maxFontSize = void 0;
4012
+ this.style = void 0;
3900
4013
  this.alt = alt;
3901
4014
  this.src = src;
3902
4015
  this.classes = ["mord"];
@@ -3913,17 +4026,12 @@ var init_katex = __esm({
3913
4026
  node2.src = this.src;
3914
4027
  node2.alt = this.alt;
3915
4028
  node2.className = "mord";
3916
- for (var key of Object.keys(this.style)) {
3917
- node2.style[key] = this.style[key];
3918
- }
4029
+ Object.assign(node2.style, this.style);
3919
4030
  return node2;
3920
4031
  }
3921
4032
  toMarkup() {
3922
4033
  var markup = '<img src="' + escape2(this.src) + '"' + (' alt="' + escape2(this.alt) + '"');
3923
- var styles6 = "";
3924
- for (var key of Object.keys(this.style)) {
3925
- styles6 += hyphenate(key) + ":" + this.style[key] + ";";
3926
- }
4034
+ var styles6 = cssStyleToString(this.style);
3927
4035
  if (styles6) {
3928
4036
  markup += ' style="' + escape2(styles6) + '"';
3929
4037
  }
@@ -3939,19 +4047,28 @@ var init_katex = __esm({
3939
4047
  "\xEC": "\u0131\u0300"
3940
4048
  };
3941
4049
  SymbolNode = class {
3942
- constructor(text4, height2, depth, italic, skew, width3, classes3, style4) {
4050
+ constructor(text4, height2, depth, italic2, skew, width3, classes3, style4) {
4051
+ this.text = void 0;
4052
+ this.height = void 0;
4053
+ this.depth = void 0;
4054
+ this.italic = void 0;
4055
+ this.skew = void 0;
4056
+ this.width = void 0;
4057
+ this.maxFontSize = void 0;
4058
+ this.classes = void 0;
4059
+ this.style = void 0;
3943
4060
  this.text = text4;
3944
4061
  this.height = height2 || 0;
3945
4062
  this.depth = depth || 0;
3946
- this.italic = italic || 0;
4063
+ this.italic = italic2 || 0;
3947
4064
  this.skew = skew || 0;
3948
4065
  this.width = width3 || 0;
3949
4066
  this.classes = classes3 || [];
3950
4067
  this.style = style4 || {};
3951
4068
  this.maxFontSize = 0;
3952
- var script = scriptFromCodepoint(this.text.charCodeAt(0));
3953
- if (script) {
3954
- this.classes.push(script + "_fallback");
4069
+ var script2 = scriptFromCodepoint(this.text.charCodeAt(0));
4070
+ if (script2) {
4071
+ this.classes.push(script2 + "_fallback");
3955
4072
  }
3956
4073
  if (/[îïíì]/.test(this.text)) {
3957
4074
  this.text = iCombinations[this.text];
@@ -3975,9 +4092,9 @@ var init_katex = __esm({
3975
4092
  span = span || document.createElement("span");
3976
4093
  span.className = createClass(this.classes);
3977
4094
  }
3978
- for (var key of Object.keys(this.style)) {
4095
+ if (Object.keys(this.style).length > 0) {
3979
4096
  span = span || document.createElement("span");
3980
- span.style[key] = this.style[key];
4097
+ Object.assign(span.style, this.style);
3981
4098
  }
3982
4099
  if (span) {
3983
4100
  span.appendChild(node2);
@@ -4002,9 +4119,7 @@ var init_katex = __esm({
4002
4119
  if (this.italic > 0) {
4003
4120
  styles6 += "margin-right:" + makeEm(this.italic) + ";";
4004
4121
  }
4005
- for (var key of Object.keys(this.style)) {
4006
- styles6 += hyphenate(key) + ":" + this.style[key] + ";";
4007
- }
4122
+ styles6 += cssStyleToString(this.style);
4008
4123
  if (styles6) {
4009
4124
  needsSpan = true;
4010
4125
  markup += ' style="' + escape2(styles6) + '"';
@@ -4022,6 +4137,8 @@ var init_katex = __esm({
4022
4137
  };
4023
4138
  SvgNode = class {
4024
4139
  constructor(children2, attributes) {
4140
+ this.children = void 0;
4141
+ this.attributes = void 0;
4025
4142
  this.children = children2 || [];
4026
4143
  this.attributes = attributes || {};
4027
4144
  }
@@ -4051,6 +4168,8 @@ var init_katex = __esm({
4051
4168
  };
4052
4169
  PathNode = class {
4053
4170
  constructor(pathName, alternate) {
4171
+ this.pathName = void 0;
4172
+ this.alternate = void 0;
4054
4173
  this.pathName = pathName;
4055
4174
  this.alternate = alternate;
4056
4175
  }
@@ -4074,6 +4193,7 @@ var init_katex = __esm({
4074
4193
  };
4075
4194
  LineNode = class {
4076
4195
  constructor(attributes) {
4196
+ this.attributes = void 0;
4077
4197
  this.attributes = attributes || {};
4078
4198
  }
4079
4199
  toNode() {
@@ -6327,21 +6447,6 @@ var init_katex = __esm({
6327
6447
  "\u044F": "r"
6328
6448
  };
6329
6449
  fontMetricsBySizeIndex = {};
6330
- ATOMS = {
6331
- "bin": 1,
6332
- "close": 1,
6333
- "inner": 1,
6334
- "open": 1,
6335
- "punct": 1,
6336
- "rel": 1
6337
- };
6338
- NON_ATOMS = {
6339
- "accent-token": 1,
6340
- "mathord": 1,
6341
- "op-token": 1,
6342
- "spacing": 1,
6343
- "textord": 1
6344
- };
6345
6450
  symbols = {
6346
6451
  "math": {},
6347
6452
  "text": {}
@@ -6813,8 +6918,8 @@ var init_katex = __esm({
6813
6918
  defineSymbol(text2, main, spacing, "\xA0", " ");
6814
6919
  defineSymbol(text2, main, spacing, "\xA0", "\\space");
6815
6920
  defineSymbol(text2, main, spacing, "\xA0", "\\nobreakspace");
6816
- defineSymbol(math, main, spacing, null, "\\nobreak");
6817
- defineSymbol(math, main, spacing, null, "\\allowbreak");
6921
+ defineSymbol(math, main, spacing, "", "\\nobreak");
6922
+ defineSymbol(math, main, spacing, "", "\\allowbreak");
6818
6923
  defineSymbol(math, main, punct, ",", ",");
6819
6924
  defineSymbol(math, main, punct, ";", ";");
6820
6925
  defineSymbol(math, ams, bin, "\u22BC", "\\barwedge", true);
@@ -6993,7 +7098,6 @@ var init_katex = __esm({
6993
7098
  defineSymbol(text2, ams, textord, "Z", "\u2124");
6994
7099
  defineSymbol(math, main, mathord, "h", "\u210E");
6995
7100
  defineSymbol(text2, main, mathord, "h", "\u210E");
6996
- wideChar = "";
6997
7101
  for (_i3 = 0; _i3 < letters.length; _i3++) {
6998
7102
  _ch3 = letters.charAt(_i3);
6999
7103
  wideChar = String.fromCharCode(55349, 56320 + _i3);
@@ -7056,90 +7160,136 @@ var init_katex = __esm({
7056
7160
  defineSymbol(math, main, mathord, _ch5, _ch5);
7057
7161
  defineSymbol(text2, main, textord, _ch5, _ch5);
7058
7162
  }
7163
+ boldUpright = {
7164
+ mathClass: "mathbf",
7165
+ textClass: "textbf",
7166
+ font: "Main-Bold"
7167
+ };
7168
+ italic = {
7169
+ mathClass: "mathnormal",
7170
+ textClass: "textit",
7171
+ font: "Math-Italic"
7172
+ };
7173
+ boldItalic = {
7174
+ mathClass: "boldsymbol",
7175
+ textClass: "boldsymbol",
7176
+ font: "Main-BoldItalic"
7177
+ };
7178
+ script = {
7179
+ mathClass: "mathscr",
7180
+ textClass: "textscr",
7181
+ font: "Script-Regular"
7182
+ };
7183
+ noFont = {
7184
+ mathClass: "",
7185
+ textClass: "",
7186
+ font: ""
7187
+ };
7188
+ fraktur = {
7189
+ mathClass: "mathfrak",
7190
+ textClass: "textfrak",
7191
+ font: "Fraktur-Regular"
7192
+ };
7193
+ doubleStruck = {
7194
+ mathClass: "mathbb",
7195
+ textClass: "textbb",
7196
+ font: "AMS-Regular"
7197
+ };
7198
+ boldFraktur = {
7199
+ mathClass: "mathboldfrak",
7200
+ textClass: "textboldfrak",
7201
+ font: "Fraktur-Regular"
7202
+ };
7203
+ sansSerif = {
7204
+ mathClass: "mathsf",
7205
+ textClass: "textsf",
7206
+ font: "SansSerif-Regular"
7207
+ };
7208
+ boldSansSerif = {
7209
+ mathClass: "mathboldsf",
7210
+ textClass: "textboldsf",
7211
+ font: "SansSerif-Bold"
7212
+ };
7213
+ italicSansSerif = {
7214
+ mathClass: "mathitsf",
7215
+ textClass: "textitsf",
7216
+ font: "SansSerif-Italic"
7217
+ };
7218
+ monospace = {
7219
+ mathClass: "mathtt",
7220
+ textClass: "texttt",
7221
+ font: "Typewriter-Regular"
7222
+ };
7059
7223
  wideLatinLetterData = [
7060
- ["mathbf", "textbf", "Main-Bold"],
7061
- // A-Z bold upright
7062
- ["mathbf", "textbf", "Main-Bold"],
7063
- // a-z bold upright
7064
- ["mathnormal", "textit", "Math-Italic"],
7065
- // A-Z italic
7066
- ["mathnormal", "textit", "Math-Italic"],
7067
- // a-z italic
7068
- ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
7069
- // A-Z bold italic
7070
- ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
7071
- // a-z bold italic
7224
+ boldUpright,
7225
+ boldUpright,
7226
+ // A-Z, a-z
7227
+ italic,
7228
+ italic,
7229
+ // A-Z, a-z
7230
+ boldItalic,
7231
+ boldItalic,
7232
+ // A-Z, a-z
7072
7233
  // Map fancy A-Z letters to script, not calligraphic.
7073
7234
  // This aligns with unicode-math and math fonts (except Cambria Math).
7074
- ["mathscr", "textscr", "Script-Regular"],
7075
- // A-Z script
7076
- ["", "", ""],
7077
- // a-z script. No font
7078
- ["", "", ""],
7079
- // A-Z bold script. No font
7080
- ["", "", ""],
7081
- // a-z bold script. No font
7082
- ["mathfrak", "textfrak", "Fraktur-Regular"],
7083
- // A-Z Fraktur
7084
- ["mathfrak", "textfrak", "Fraktur-Regular"],
7085
- // a-z Fraktur
7086
- ["mathbb", "textbb", "AMS-Regular"],
7087
- // A-Z double-struck
7088
- ["mathbb", "textbb", "AMS-Regular"],
7089
- // k double-struck
7235
+ script,
7236
+ noFont,
7237
+ // A-Z script, a-z — no font
7238
+ noFont,
7239
+ noFont,
7240
+ // A-Z bold script, a-z bold script — no font
7241
+ fraktur,
7242
+ fraktur,
7243
+ // A-Z, a-z
7244
+ doubleStruck,
7245
+ doubleStruck,
7246
+ // A-Z double-struck, k double-struck
7090
7247
  // Note that we are using a bold font, but font metrics for regular Fraktur.
7091
- ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
7092
- // A-Z bold Fraktur
7093
- ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
7094
- // a-z bold Fraktur
7095
- ["mathsf", "textsf", "SansSerif-Regular"],
7096
- // A-Z sans-serif
7097
- ["mathsf", "textsf", "SansSerif-Regular"],
7098
- // a-z sans-serif
7099
- ["mathboldsf", "textboldsf", "SansSerif-Bold"],
7100
- // A-Z bold sans-serif
7101
- ["mathboldsf", "textboldsf", "SansSerif-Bold"],
7102
- // a-z bold sans-serif
7103
- ["mathitsf", "textitsf", "SansSerif-Italic"],
7104
- // A-Z italic sans-serif
7105
- ["mathitsf", "textitsf", "SansSerif-Italic"],
7106
- // a-z italic sans-serif
7107
- ["", "", ""],
7108
- // A-Z bold italic sans. No font
7109
- ["", "", ""],
7110
- // a-z bold italic sans. No font
7111
- ["mathtt", "texttt", "Typewriter-Regular"],
7112
- // A-Z monospace
7113
- ["mathtt", "texttt", "Typewriter-Regular"]
7114
- // a-z monospace
7248
+ boldFraktur,
7249
+ boldFraktur,
7250
+ // A-Z, a-z
7251
+ sansSerif,
7252
+ sansSerif,
7253
+ // A-Z, a-z
7254
+ boldSansSerif,
7255
+ boldSansSerif,
7256
+ // A-Z, a-z
7257
+ italicSansSerif,
7258
+ italicSansSerif,
7259
+ // A-Z, a-z
7260
+ noFont,
7261
+ noFont,
7262
+ // A-Z bold italic sans, a-z bold italic sans - no font
7263
+ monospace,
7264
+ monospace
7265
+ // A-Z, a-z
7115
7266
  ];
7116
7267
  wideNumeralData = [
7117
- ["mathbf", "textbf", "Main-Bold"],
7118
- // 0-9 bold
7119
- ["", "", ""],
7268
+ boldUpright,
7269
+ // 0-9
7270
+ noFont,
7120
7271
  // 0-9 double-struck. No KaTeX font.
7121
- ["mathsf", "textsf", "SansSerif-Regular"],
7122
- // 0-9 sans-serif
7123
- ["mathboldsf", "textboldsf", "SansSerif-Bold"],
7124
- // 0-9 bold sans-serif
7125
- ["mathtt", "texttt", "Typewriter-Regular"]
7126
- // 0-9 monospace
7272
+ sansSerif,
7273
+ // 0-9
7274
+ boldSansSerif,
7275
+ // 0-9
7276
+ monospace
7277
+ // 0-9
7127
7278
  ];
7128
- wideCharacterFont = (wideChar2, mode) => {
7279
+ wideCharacterFont = (wideChar2) => {
7129
7280
  var H2 = wideChar2.charCodeAt(0);
7130
7281
  var L3 = wideChar2.charCodeAt(1);
7131
7282
  var codePoint = (H2 - 55296) * 1024 + (L3 - 56320) + 65536;
7132
- var j3 = mode === "math" ? 0 : 1;
7133
7283
  if (119808 <= codePoint && codePoint < 120484) {
7134
7284
  var i3 = Math.floor((codePoint - 119808) / 26);
7135
- return [wideLatinLetterData[i3][2], wideLatinLetterData[i3][j3]];
7285
+ return wideLatinLetterData[i3];
7136
7286
  } else if (120782 <= codePoint && codePoint <= 120831) {
7137
7287
  var _i = Math.floor((codePoint - 120782) / 10);
7138
- return [wideNumeralData[_i][2], wideNumeralData[_i][j3]];
7288
+ return wideNumeralData[_i];
7139
7289
  } else if (codePoint === 120485 || codePoint === 120486) {
7140
- return [wideLatinLetterData[0][2], wideLatinLetterData[0][j3]];
7290
+ return wideLatinLetterData[0];
7141
7291
  } else if (120486 < codePoint && codePoint < 120782) {
7142
- return ["", ""];
7292
+ return noFont;
7143
7293
  } else {
7144
7294
  throw new ParseError("Unsupported character: " + wideChar2);
7145
7295
  }
@@ -7162,11 +7312,11 @@ var init_katex = __esm({
7162
7312
  value2 = lookup2.value;
7163
7313
  var symbolNode;
7164
7314
  if (metrics) {
7165
- var italic = metrics.italic;
7315
+ var italic2 = metrics.italic;
7166
7316
  if (mode === "text" || options2 && options2.font === "mathit") {
7167
- italic = 0;
7317
+ italic2 = 0;
7168
7318
  }
7169
- symbolNode = new SymbolNode(value2, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes3);
7319
+ symbolNode = new SymbolNode(value2, metrics.height, metrics.depth, italic2, metrics.skew, metrics.width, classes3);
7170
7320
  } else {
7171
7321
  typeof console !== "undefined" && console.warn("No character metrics " + ("for '" + value2 + "' in style '" + fontName + "' and mode '" + mode + "'"));
7172
7322
  symbolNode = new SymbolNode(value2, 0, 0, 0, 0, 0, classes3);
@@ -7195,7 +7345,7 @@ var init_katex = __esm({
7195
7345
  return makeSymbol(value2, "AMS-Regular", mode, options2, classes3.concat(["amsrm"]));
7196
7346
  }
7197
7347
  };
7198
- boldsymbol = function boldsymbol2(value2, mode, options2, classes3, type3) {
7348
+ boldSymbol = function boldSymbol2(value2, mode, type3) {
7199
7349
  if (type3 !== "textord" && lookupSymbol(value2, "Math-BoldItalic", mode).metrics) {
7200
7350
  return {
7201
7351
  fontName: "Math-BoldItalic",
@@ -7212,28 +7362,36 @@ var init_katex = __esm({
7212
7362
  var mode = group2.mode;
7213
7363
  var text4 = group2.text;
7214
7364
  var classes3 = ["mord"];
7215
- var isFont = mode === "math" || mode === "text" && options2.font;
7216
- var fontOrFamily = isFont ? options2.font : options2.fontFamily;
7365
+ var {
7366
+ font,
7367
+ fontFamily,
7368
+ fontWeight,
7369
+ fontShape
7370
+ } = options2;
7371
+ var useFont = mode === "math" || mode === "text" && !!font;
7372
+ var fontOrFamily = useFont ? font : fontFamily;
7217
7373
  var wideFontName = "";
7218
7374
  var wideFontClass = "";
7219
7375
  if (text4.charCodeAt(0) === 55349) {
7220
- [wideFontName, wideFontClass] = wideCharacterFont(text4, mode);
7376
+ var wideCharData = wideCharacterFont(text4);
7377
+ wideFontName = wideCharData.font;
7378
+ wideFontClass = wideCharData[mode + "Class"];
7221
7379
  }
7222
- if (wideFontName.length > 0) {
7380
+ if (wideFontName) {
7223
7381
  return makeSymbol(text4, wideFontName, mode, options2, classes3.concat(wideFontClass));
7224
7382
  } else if (fontOrFamily) {
7225
7383
  var fontName;
7226
7384
  var fontClasses;
7227
7385
  if (fontOrFamily === "boldsymbol") {
7228
- var fontData = boldsymbol(text4, mode, options2, classes3, type3);
7386
+ var fontData = boldSymbol(text4, mode, type3);
7229
7387
  fontName = fontData.fontName;
7230
7388
  fontClasses = [fontData.fontClass];
7231
- } else if (isFont) {
7232
- fontName = fontMap[fontOrFamily].fontName;
7233
- fontClasses = [fontOrFamily];
7389
+ } else if (useFont) {
7390
+ fontName = fontMap[font].fontName;
7391
+ fontClasses = [font];
7234
7392
  } else {
7235
- fontName = retrieveTextFontName(fontOrFamily, options2.fontWeight, options2.fontShape);
7236
- fontClasses = [fontOrFamily, options2.fontWeight, options2.fontShape];
7393
+ fontName = retrieveTextFontName(fontFamily, fontWeight, fontShape);
7394
+ fontClasses = [fontFamily, fontWeight, fontShape];
7237
7395
  }
7238
7396
  if (lookupSymbol(text4, fontName, mode).metrics) {
7239
7397
  return makeSymbol(text4, fontName, mode, options2, classes3.concat(fontClasses));
@@ -7248,16 +7406,16 @@ var init_katex = __esm({
7248
7406
  if (type3 === "mathord") {
7249
7407
  return makeSymbol(text4, "Math-Italic", mode, options2, classes3.concat(["mathnormal"]));
7250
7408
  } else if (type3 === "textord") {
7251
- var font = symbols[mode][text4] && symbols[mode][text4].font;
7252
- if (font === "ams") {
7253
- var _fontName = retrieveTextFontName("amsrm", options2.fontWeight, options2.fontShape);
7254
- return makeSymbol(text4, _fontName, mode, options2, classes3.concat("amsrm", options2.fontWeight, options2.fontShape));
7255
- } else if (font === "main" || !font) {
7256
- var _fontName2 = retrieveTextFontName("textrm", options2.fontWeight, options2.fontShape);
7257
- return makeSymbol(text4, _fontName2, mode, options2, classes3.concat(options2.fontWeight, options2.fontShape));
7409
+ var _font = symbols[mode][text4] && symbols[mode][text4].font;
7410
+ if (_font === "ams") {
7411
+ var _fontName = retrieveTextFontName("amsrm", fontWeight, fontShape);
7412
+ return makeSymbol(text4, _fontName, mode, options2, classes3.concat("amsrm", fontWeight, fontShape));
7413
+ } else if (_font === "main" || !_font) {
7414
+ var _fontName2 = retrieveTextFontName("textrm", fontWeight, fontShape);
7415
+ return makeSymbol(text4, _fontName2, mode, options2, classes3.concat(fontWeight, fontShape));
7258
7416
  } else {
7259
- var _fontName3 = retrieveTextFontName(font, options2.fontWeight, options2.fontShape);
7260
- return makeSymbol(text4, _fontName3, mode, options2, classes3.concat(_fontName3, options2.fontWeight, options2.fontShape));
7417
+ var _fontName3 = retrieveTextFontName(_font, fontWeight, fontShape);
7418
+ return makeSymbol(text4, _fontName3, mode, options2, classes3.concat(_fontName3, fontWeight, fontShape));
7261
7419
  }
7262
7420
  } else {
7263
7421
  throw new Error("unexpected type: " + type3 + " in makeOrd");
@@ -7466,8 +7624,9 @@ var init_katex = __esm({
7466
7624
  rule.style.marginRight = makeEm(size4);
7467
7625
  return rule;
7468
7626
  };
7469
- retrieveTextFontName = function retrieveTextFontName2(fontFamily, fontWeight, fontShape) {
7470
- var baseFontName = "";
7627
+ retrieveTextFontName = (fontFamily, fontWeight, fontShape) => {
7628
+ var baseFontName;
7629
+ var fontStylesName;
7471
7630
  switch (fontFamily) {
7472
7631
  case "amsrm":
7473
7632
  baseFontName = "AMS";
@@ -7484,12 +7643,11 @@ var init_katex = __esm({
7484
7643
  default:
7485
7644
  baseFontName = fontFamily;
7486
7645
  }
7487
- var fontStylesName;
7488
7646
  if (fontWeight === "textbf" && fontShape === "textit") {
7489
7647
  fontStylesName = "BoldItalic";
7490
7648
  } else if (fontWeight === "textbf") {
7491
7649
  fontStylesName = "Bold";
7492
- } else if (fontWeight === "textit") {
7650
+ } else if (fontShape === "textit") {
7493
7651
  fontStylesName = "Italic";
7494
7652
  } else {
7495
7653
  fontStylesName = "Regular";
@@ -7832,6 +7990,10 @@ var init_katex = __esm({
7832
7990
  };
7833
7991
  MathNode = class {
7834
7992
  constructor(type3, children2, classes3) {
7993
+ this.type = void 0;
7994
+ this.attributes = void 0;
7995
+ this.children = void 0;
7996
+ this.classes = void 0;
7835
7997
  this.type = type3;
7836
7998
  this.attributes = {};
7837
7999
  this.children = children2 || [];
@@ -7907,6 +8069,7 @@ var init_katex = __esm({
7907
8069
  };
7908
8070
  TextNode = class {
7909
8071
  constructor(text4) {
8072
+ this.text = void 0;
7910
8073
  this.text = text4;
7911
8074
  }
7912
8075
  /**
@@ -7935,6 +8098,8 @@ var init_katex = __esm({
7935
8098
  * Create a Space node with width given in CSS ems.
7936
8099
  */
7937
8100
  constructor(width3) {
8101
+ this.width = void 0;
8102
+ this.character = void 0;
7938
8103
  this.width = width3;
7939
8104
  if (width3 >= 0.05555 && width3 <= 0.05556) {
7940
8105
  this.character = "\u200A";
@@ -8004,49 +8169,48 @@ var init_katex = __esm({
8004
8169
  return new MathNode("mrow", body);
8005
8170
  }
8006
8171
  };
8007
- getVariant = function getVariant2(group2, options2) {
8008
- if (options2.fontFamily === "texttt") {
8009
- return "monospace";
8010
- } else if (options2.fontFamily === "textsf") {
8011
- if (options2.fontShape === "textit" && options2.fontWeight === "textbf") {
8012
- return "sans-serif-bold-italic";
8172
+ mathFontVariants = {
8173
+ mathit: "italic",
8174
+ boldsymbol: (group2) => group2.type === "textord" ? "bold" : "bold-italic",
8175
+ mathbf: "bold",
8176
+ mathbb: "double-struck",
8177
+ mathsfit: "sans-serif-italic",
8178
+ mathfrak: "fraktur",
8179
+ mathscr: "script",
8180
+ mathcal: "script",
8181
+ mathsf: "sans-serif",
8182
+ mathtt: "monospace"
8183
+ };
8184
+ getVariant = (group2, options2) => {
8185
+ if (group2.mode === "text") {
8186
+ if (options2.fontFamily === "texttt") {
8187
+ return "monospace";
8188
+ } else if (options2.fontFamily === "textsf") {
8189
+ if (options2.fontShape === "textit" && options2.fontWeight === "textbf") {
8190
+ return "sans-serif-bold-italic";
8191
+ } else if (options2.fontShape === "textit") {
8192
+ return "sans-serif-italic";
8193
+ } else if (options2.fontWeight === "textbf") {
8194
+ return "bold-sans-serif";
8195
+ } else {
8196
+ return "sans-serif";
8197
+ }
8198
+ } else if (options2.fontShape === "textit" && options2.fontWeight === "textbf") {
8199
+ return "bold-italic";
8013
8200
  } else if (options2.fontShape === "textit") {
8014
- return "sans-serif-italic";
8201
+ return "italic";
8015
8202
  } else if (options2.fontWeight === "textbf") {
8016
- return "bold-sans-serif";
8017
- } else {
8018
- return "sans-serif";
8203
+ return "bold";
8019
8204
  }
8020
- } else if (options2.fontShape === "textit" && options2.fontWeight === "textbf") {
8021
- return "bold-italic";
8022
- } else if (options2.fontShape === "textit") {
8023
- return "italic";
8024
- } else if (options2.fontWeight === "textbf") {
8025
- return "bold";
8026
8205
  }
8027
8206
  var font = options2.font;
8028
8207
  if (!font || font === "mathnormal") {
8029
8208
  return null;
8030
8209
  }
8031
8210
  var mode = group2.mode;
8032
- if (font === "mathit") {
8033
- return "italic";
8034
- } else if (font === "boldsymbol") {
8035
- return group2.type === "textord" ? "bold" : "bold-italic";
8036
- } else if (font === "mathbf") {
8037
- return "bold";
8038
- } else if (font === "mathbb") {
8039
- return "double-struck";
8040
- } else if (font === "mathsfit") {
8041
- return "sans-serif-italic";
8042
- } else if (font === "mathfrak") {
8043
- return "fraktur";
8044
- } else if (font === "mathscr" || font === "mathcal") {
8045
- return "script";
8046
- } else if (font === "mathsf") {
8047
- return "sans-serif";
8048
- } else if (font === "mathtt") {
8049
- return "monospace";
8211
+ var mathVariant = mathFontVariants[font];
8212
+ if (mathVariant) {
8213
+ return typeof mathVariant === "function" ? mathVariant(group2) : mathVariant;
8050
8214
  }
8051
8215
  var text4 = group2.text;
8052
8216
  if (noVariantSymbols.has(text4)) {
@@ -8120,8 +8284,7 @@ var init_katex = __esm({
8120
8284
  return new MathNode("mrow");
8121
8285
  }
8122
8286
  if (_mathmlGroupBuilders[group2.type]) {
8123
- var result = _mathmlGroupBuilders[group2.type](group2, options2);
8124
- return result;
8287
+ return _mathmlGroupBuilders[group2.type](group2, options2);
8125
8288
  } else {
8126
8289
  throw new ParseError("Got group of unknown type: '" + group2.type + "'");
8127
8290
  }
@@ -8172,6 +8335,19 @@ var init_katex = __esm({
8172
8335
  };
8173
8336
  Options = class _Options {
8174
8337
  constructor(data5) {
8338
+ this.style = void 0;
8339
+ this.color = void 0;
8340
+ this.size = void 0;
8341
+ this.textSize = void 0;
8342
+ this.phantom = void 0;
8343
+ this.font = void 0;
8344
+ this.fontFamily = void 0;
8345
+ this.fontWeight = void 0;
8346
+ this.fontShape = void 0;
8347
+ this.sizeMultiplier = void 0;
8348
+ this.maxSize = void 0;
8349
+ this.minRuleThickness = void 0;
8350
+ this._fontMetrics = void 0;
8175
8351
  this.style = data5.style;
8176
8352
  this.color = data5.color;
8177
8353
  this.size = data5.size || _Options.BASESIZE;
@@ -8527,9 +8703,8 @@ var init_katex = __esm({
8527
8703
  function buildSvgSpan_() {
8528
8704
  var viewBoxWidth = 4e5;
8529
8705
  var label = group2.label.slice(1);
8530
- if (wideAccentLabels.has(label)) {
8531
- var grp = group2;
8532
- var numChars = grp.base.type === "ordgroup" ? grp.base.body.length : 1;
8706
+ if (wideAccentLabels.has(label) && "base" in group2) {
8707
+ var numChars = group2.base.type === "ordgroup" ? group2.base.body.length : 1;
8533
8708
  var viewBoxHeight;
8534
8709
  var pathName;
8535
8710
  var _height;
@@ -8574,15 +8749,20 @@ var init_katex = __esm({
8574
8749
  } else {
8575
8750
  var spans = [];
8576
8751
  var data5 = katexImagesData[label];
8752
+ if (!data5) {
8753
+ throw new Error('No SVG data for "' + label + '".');
8754
+ }
8577
8755
  var [paths, _minWidth, _viewBoxHeight] = data5;
8578
8756
  var _height2 = _viewBoxHeight / 1e3;
8579
8757
  var numSvgChildren = paths.length;
8580
8758
  var widthClasses;
8581
8759
  var aligns;
8582
8760
  if (numSvgChildren === 1) {
8583
- var align1 = data5[3];
8761
+ if (data5.length !== 4) {
8762
+ throw new Error('Expected 4-tuple for single-path SVG data "' + label + '".');
8763
+ }
8584
8764
  widthClasses = ["hide-tail"];
8585
- aligns = [align1];
8765
+ aligns = [data5[3]];
8586
8766
  } else if (numSvgChildren === 2) {
8587
8767
  widthClasses = ["halfarrow-left", "halfarrow-right"];
8588
8768
  aligns = ["xMinYMin", "xMaxYMin"];
@@ -8672,6 +8852,21 @@ var init_katex = __esm({
8672
8852
  img.style.height = makeEm(totalHeight);
8673
8853
  return img;
8674
8854
  };
8855
+ ATOMS = {
8856
+ "bin": 1,
8857
+ "close": 1,
8858
+ "inner": 1,
8859
+ "open": 1,
8860
+ "punct": 1,
8861
+ "rel": 1
8862
+ };
8863
+ NON_ATOMS = {
8864
+ "accent-token": 1,
8865
+ "mathord": 1,
8866
+ "op-token": 1,
8867
+ "spacing": 1,
8868
+ "textord": 1
8869
+ };
8675
8870
  getBaseSymbol = (group2) => {
8676
8871
  if (group2 instanceof SymbolNode) {
8677
8872
  return group2;
@@ -8842,11 +9037,11 @@ var init_katex = __esm({
8842
9037
  props: {
8843
9038
  numArgs: 1
8844
9039
  },
8845
- handler: (_ref, args) => {
9040
+ handler: (_ref2, args) => {
8846
9041
  var {
8847
9042
  parser: parser30,
8848
9043
  funcName
8849
- } = _ref;
9044
+ } = _ref2;
8850
9045
  var base = args[0];
8851
9046
  return {
8852
9047
  type: "accentUnder",
@@ -8925,11 +9120,11 @@ var init_katex = __esm({
8925
9120
  numArgs: 1,
8926
9121
  numOptionalArgs: 1
8927
9122
  },
8928
- handler(_ref, args, optArgs) {
9123
+ handler(_ref2, args, optArgs) {
8929
9124
  var {
8930
9125
  parser: parser30,
8931
9126
  funcName
8932
- } = _ref;
9127
+ } = _ref2;
8933
9128
  return {
8934
9129
  type: "xArrow",
8935
9130
  mode: parser30.mode,
@@ -8968,7 +9163,8 @@ var init_katex = __esm({
8968
9163
  }, {
8969
9164
  type: "elem",
8970
9165
  elem: arrowBody,
8971
- shift: arrowShift
9166
+ shift: arrowShift,
9167
+ wrapperClasses: ["svg-align"]
8972
9168
  }, {
8973
9169
  type: "elem",
8974
9170
  elem: lowerGroup,
@@ -8985,11 +9181,11 @@ var init_katex = __esm({
8985
9181
  }, {
8986
9182
  type: "elem",
8987
9183
  elem: arrowBody,
8988
- shift: arrowShift
9184
+ shift: arrowShift,
9185
+ wrapperClasses: ["svg-align"]
8989
9186
  }]
8990
9187
  });
8991
9188
  }
8992
- vlist.children[0].children[0].children[1].classes.push("svg-align");
8993
9189
  return makeSpan(["mrel", "x-arrow"], [vlist], options2);
8994
9190
  },
8995
9191
  mathmlBuilder(group2, options2) {
@@ -9021,11 +9217,11 @@ var init_katex = __esm({
9021
9217
  numArgs: 1,
9022
9218
  primitive: true
9023
9219
  },
9024
- handler(_ref, args) {
9220
+ handler(_ref2, args) {
9025
9221
  var {
9026
9222
  parser: parser30,
9027
9223
  funcName
9028
- } = _ref;
9224
+ } = _ref2;
9029
9225
  var body = args[0];
9030
9226
  return {
9031
9227
  type: "mclass",
@@ -9120,10 +9316,10 @@ var init_katex = __esm({
9120
9316
  numArgs: 1,
9121
9317
  allowedInText: true
9122
9318
  },
9123
- handler(_ref, args) {
9319
+ handler(_ref2, args) {
9124
9320
  var {
9125
9321
  parser: parser30
9126
- } = _ref;
9322
+ } = _ref2;
9127
9323
  return {
9128
9324
  type: "pmb",
9129
9325
  mode: parser30.mode,
@@ -9158,7 +9354,8 @@ var init_katex = __esm({
9158
9354
  type: "styling",
9159
9355
  body: [],
9160
9356
  mode: "math",
9161
- style: "display"
9357
+ style: "display",
9358
+ resetFont: true
9162
9359
  };
9163
9360
  };
9164
9361
  isStartOfArrow = (node2) => {
@@ -9173,11 +9370,11 @@ var init_katex = __esm({
9173
9370
  props: {
9174
9371
  numArgs: 1
9175
9372
  },
9176
- handler(_ref, args) {
9373
+ handler(_ref2, args) {
9177
9374
  var {
9178
9375
  parser: parser30,
9179
9376
  funcName
9180
- } = _ref;
9377
+ } = _ref2;
9181
9378
  return {
9182
9379
  type: "cdlabel",
9183
9380
  mode: parser30.mode,
@@ -9240,10 +9437,10 @@ var init_katex = __esm({
9240
9437
  numArgs: 1,
9241
9438
  allowedInText: true
9242
9439
  },
9243
- handler(_ref, args) {
9440
+ handler(_ref2, args) {
9244
9441
  var {
9245
9442
  parser: parser30
9246
- } = _ref;
9443
+ } = _ref2;
9247
9444
  var arg = assertNodeType(args[0], "ordgroup");
9248
9445
  var group2 = arg.body;
9249
9446
  var number7 = "";
@@ -9288,10 +9485,10 @@ var init_katex = __esm({
9288
9485
  allowedInText: true,
9289
9486
  argTypes: ["color", "original"]
9290
9487
  },
9291
- handler(_ref, args) {
9488
+ handler(_ref2, args) {
9292
9489
  var {
9293
9490
  parser: parser30
9294
- } = _ref;
9491
+ } = _ref2;
9295
9492
  var color2 = assertNodeType(args[0], "color-token").color;
9296
9493
  var body = args[1];
9297
9494
  return {
@@ -9338,10 +9535,10 @@ var init_katex = __esm({
9338
9535
  numOptionalArgs: 0,
9339
9536
  allowedInText: true
9340
9537
  },
9341
- handler(_ref, args, optArgs) {
9538
+ handler(_ref2, args, optArgs) {
9342
9539
  var {
9343
9540
  parser: parser30
9344
- } = _ref;
9541
+ } = _ref2;
9345
9542
  var size4 = parser30.gullet.future().text === "[" ? parser30.parseSizeGroup(true) : null;
9346
9543
  var newLine = !parser30.settings.displayMode || !parser30.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
9347
9544
  return {
@@ -9427,11 +9624,11 @@ var init_katex = __esm({
9427
9624
  numArgs: 0,
9428
9625
  allowedInText: true
9429
9626
  },
9430
- handler(_ref) {
9627
+ handler(_ref2) {
9431
9628
  var {
9432
9629
  parser: parser30,
9433
9630
  funcName
9434
- } = _ref;
9631
+ } = _ref2;
9435
9632
  parser30.consumeSpaces();
9436
9633
  var token2 = parser30.fetch();
9437
9634
  if (globalMap[token2.text]) {
@@ -9854,9 +10051,9 @@ var init_katex = __esm({
9854
10051
  var sizeMultiplier = newOptions.sizeMultiplier;
9855
10052
  var extraVinculum = Math.max(0, options2.minRuleThickness - options2.fontMetrics().sqrtRuleThickness);
9856
10053
  var span;
9857
- var spanHeight = 0;
9858
- var texHeight = 0;
9859
- var viewBoxHeight = 0;
10054
+ var spanHeight;
10055
+ var texHeight;
10056
+ var viewBoxHeight;
9860
10057
  var advanceWidth;
9861
10058
  if (delim.type === "small") {
9862
10059
  viewBoxHeight = 1e3 + 1e3 * extraVinculum + vbPad;
@@ -10207,7 +10404,8 @@ var init_katex = __esm({
10207
10404
  var innerDepth = 0;
10208
10405
  var hadMiddle = false;
10209
10406
  for (var i3 = 0; i3 < inner2.length; i3++) {
10210
- if (inner2[i3].isMiddle) {
10407
+ var node2 = inner2[i3];
10408
+ if (isMiddleDelimNode(node2)) {
10211
10409
  hadMiddle = true;
10212
10410
  } else {
10213
10411
  innerHeight2 = Math.max(inner2[i3].height, innerHeight2);
@@ -10226,8 +10424,8 @@ var init_katex = __esm({
10226
10424
  if (hadMiddle) {
10227
10425
  for (var _i = 1; _i < inner2.length; _i++) {
10228
10426
  var middleDelim = inner2[_i];
10229
- var isMiddle = middleDelim.isMiddle;
10230
- if (isMiddle) {
10427
+ if (isMiddleDelimNode(middleDelim)) {
10428
+ var isMiddle = middleDelim.isMiddle;
10231
10429
  inner2[_i] = makeLeftRightDelim(isMiddle.delim, innerHeight2, innerDepth, isMiddle.options, group2.mode, []);
10232
10430
  }
10233
10431
  }
@@ -10285,11 +10483,10 @@ var init_katex = __esm({
10285
10483
  middleDelim = makeNullDelimiter(options2, []);
10286
10484
  } else {
10287
10485
  middleDelim = makeSizedDelim(group2.delim, 1, options2, group2.mode, []);
10288
- var isMiddle = {
10486
+ middleDelim.isMiddle = {
10289
10487
  delim: group2.delim,
10290
10488
  options: options2
10291
10489
  };
10292
- middleDelim.isMiddle = isMiddle;
10293
10490
  }
10294
10491
  return middleDelim;
10295
10492
  },
@@ -10307,7 +10504,7 @@ var init_katex = __esm({
10307
10504
  var label = group2.label.slice(1);
10308
10505
  var scale3 = options2.sizeMultiplier;
10309
10506
  var img;
10310
- var imgShift = 0;
10507
+ var imgShift;
10311
10508
  var isSingleChar = isCharacterBox(group2.body);
10312
10509
  if (label === "sout") {
10313
10510
  img = makeSpan(["stretchy", "sout"]);
@@ -10347,8 +10544,8 @@ var init_katex = __esm({
10347
10544
  } else {
10348
10545
  inner2.classes.push("boxpad");
10349
10546
  }
10350
- var topPad = 0;
10351
- var bottomPad = 0;
10547
+ var topPad;
10548
+ var bottomPad;
10352
10549
  var ruleThickness = 0;
10353
10550
  if (/box/.test(label)) {
10354
10551
  ruleThickness = Math.max(
@@ -10431,7 +10628,7 @@ var init_katex = __esm({
10431
10628
  }
10432
10629
  };
10433
10630
  mathmlBuilder$6 = (group2, options2) => {
10434
- var fboxsep = 0;
10631
+ var fboxsep;
10435
10632
  var node2 = new MathNode(group2.label.includes("colorbox") ? "mpadded" : "menclose", [buildGroup2(group2.body, options2)]);
10436
10633
  switch (group2.label) {
10437
10634
  case "\\cancel":
@@ -10483,13 +10680,13 @@ var init_katex = __esm({
10483
10680
  props: {
10484
10681
  numArgs: 2,
10485
10682
  allowedInText: true,
10486
- argTypes: ["color", "text"]
10683
+ argTypes: ["color", "hbox"]
10487
10684
  },
10488
- handler(_ref, args, optArgs) {
10685
+ handler(_ref2, args, optArgs) {
10489
10686
  var {
10490
10687
  parser: parser30,
10491
10688
  funcName
10492
- } = _ref;
10689
+ } = _ref2;
10493
10690
  var color2 = assertNodeType(args[0], "color-token").color;
10494
10691
  var body = args[1];
10495
10692
  return {
@@ -10509,7 +10706,7 @@ var init_katex = __esm({
10509
10706
  props: {
10510
10707
  numArgs: 3,
10511
10708
  allowedInText: true,
10512
- argTypes: ["color", "color", "text"]
10709
+ argTypes: ["color", "color", "hbox"]
10513
10710
  },
10514
10711
  handler(_ref2, args, optArgs) {
10515
10712
  var {
@@ -10622,11 +10819,11 @@ var init_katex = __esm({
10622
10819
  _environments = {};
10623
10820
  _macros = {};
10624
10821
  SourceLocation = class _SourceLocation {
10625
- // The + prefix indicates that these fields aren't writeable
10626
- // Lexer holding the input string.
10627
- // Start offset, zero-based inclusive.
10628
10822
  // End offset, zero-based exclusive.
10629
10823
  constructor(lexer, start3, end2) {
10824
+ this.lexer = void 0;
10825
+ this.start = void 0;
10826
+ this.end = void 0;
10630
10827
  this.lexer = lexer;
10631
10828
  this.start = start3;
10632
10829
  this.end = end2;
@@ -10650,9 +10847,12 @@ var init_katex = __esm({
10650
10847
  }
10651
10848
  };
10652
10849
  Token = class _Token {
10653
- // don't expand the token
10654
10850
  // used in \noexpand
10655
10851
  constructor(text4, loc) {
10852
+ this.text = void 0;
10853
+ this.loc = void 0;
10854
+ this.noexpand = void 0;
10855
+ this.treatAsRelax = void 0;
10656
10856
  this.text = text4;
10657
10857
  this.loc = loc;
10658
10858
  }
@@ -10718,7 +10918,12 @@ var init_katex = __esm({
10718
10918
  if (nc < inrow.length) {
10719
10919
  nc = inrow.length;
10720
10920
  }
10721
- var outrow = new Array(inrow.length);
10921
+ var outrow = {
10922
+ cells: new Array(inrow.length),
10923
+ height: 0,
10924
+ depth: 0,
10925
+ pos: 0
10926
+ };
10722
10927
  for (c3 = 0; c3 < inrow.length; ++c3) {
10723
10928
  var elt = buildGroup$1(inrow[c3], options2);
10724
10929
  if (depth < elt.depth) {
@@ -10727,7 +10932,7 @@ var init_katex = __esm({
10727
10932
  if (height2 < elt.height) {
10728
10933
  height2 = elt.height;
10729
10934
  }
10730
- outrow[c3] = elt;
10935
+ outrow.cells[c3] = elt;
10731
10936
  }
10732
10937
  var rowGap = group2.rowGaps[r3];
10733
10938
  var gap = 0;
@@ -10832,7 +11037,7 @@ var init_katex = __esm({
10832
11037
  var colElems = [];
10833
11038
  for (r3 = 0; r3 < nr; ++r3) {
10834
11039
  var row = body[r3];
10835
- var elem = row[c3];
11040
+ var elem = row.cells[c3];
10836
11041
  if (!elem) {
10837
11042
  continue;
10838
11043
  }
@@ -11368,11 +11573,11 @@ var init_katex = __esm({
11368
11573
  numArgs: 1,
11369
11574
  argTypes: ["text"]
11370
11575
  },
11371
- handler(_ref, args) {
11576
+ handler(_ref2, args) {
11372
11577
  var {
11373
11578
  parser: parser30,
11374
11579
  funcName
11375
- } = _ref;
11580
+ } = _ref2;
11376
11581
  var nameGroup = args[0];
11377
11582
  if (nameGroup.type !== "ordgroup") {
11378
11583
  throw new ParseError("Invalid environment name", nameGroup);
@@ -11425,8 +11630,7 @@ var init_katex = __esm({
11425
11630
  fontAliases = {
11426
11631
  "\\Bbb": "\\mathbb",
11427
11632
  "\\bold": "\\mathbf",
11428
- "\\frak": "\\mathfrak",
11429
- "\\bm": "\\boldsymbol"
11633
+ "\\frak": "\\mathfrak"
11430
11634
  };
11431
11635
  defineFunction({
11432
11636
  type: "font",
@@ -11453,11 +11657,11 @@ var init_katex = __esm({
11453
11657
  numArgs: 1,
11454
11658
  allowedInArgument: true
11455
11659
  },
11456
- handler: (_ref, args) => {
11660
+ handler: (_ref2, args) => {
11457
11661
  var {
11458
11662
  parser: parser30,
11459
11663
  funcName
11460
- } = _ref;
11664
+ } = _ref2;
11461
11665
  var body = normalizeArgument(args[0]);
11462
11666
  var func = funcName;
11463
11667
  if (func in fontAliases) {
@@ -11515,11 +11719,10 @@ var init_katex = __esm({
11515
11719
  mode
11516
11720
  } = parser30;
11517
11721
  var body = parser30.parseExpression(true, breakOnTokenText);
11518
- var style4 = "math" + funcName.slice(1);
11519
11722
  return {
11520
11723
  type: "font",
11521
11724
  mode,
11522
- font: style4,
11725
+ font: "math" + funcName.slice(1),
11523
11726
  body: {
11524
11727
  type: "ordgroup",
11525
11728
  mode: parser30.mode,
@@ -11712,11 +11915,11 @@ var init_katex = __esm({
11712
11915
  numArgs: 2,
11713
11916
  allowedInArgument: true
11714
11917
  },
11715
- handler: (_ref, args) => {
11918
+ handler: (_ref2, args) => {
11716
11919
  var {
11717
11920
  parser: parser30,
11718
11921
  funcName
11719
- } = _ref;
11922
+ } = _ref2;
11720
11923
  var numer = args[0];
11721
11924
  var denom = args[1];
11722
11925
  var hasBarLine;
@@ -11954,17 +12157,18 @@ var init_katex = __esm({
11954
12157
  size: 0.1
11955
12158
  }, {
11956
12159
  type: "elem",
11957
- elem: braceBody
12160
+ elem: braceBody,
12161
+ wrapperClasses: ["svg-align"]
11958
12162
  }]
11959
12163
  });
11960
- vlist.children[0].children[0].children[1].classes.push("svg-align");
11961
12164
  } else {
11962
12165
  vlist = makeVList({
11963
12166
  positionType: "bottom",
11964
12167
  positionData: body.depth + 0.1 + braceBody.height,
11965
12168
  children: [{
11966
12169
  type: "elem",
11967
- elem: braceBody
12170
+ elem: braceBody,
12171
+ wrapperClasses: ["svg-align"]
11968
12172
  }, {
11969
12173
  type: "kern",
11970
12174
  size: 0.1
@@ -11973,7 +12177,6 @@ var init_katex = __esm({
11973
12177
  elem: body
11974
12178
  }]
11975
12179
  });
11976
- vlist.children[0].children[0].children[0].classes.push("svg-align");
11977
12180
  }
11978
12181
  if (supSubGroup) {
11979
12182
  var vSpan = makeSpan(["minner", group2.isOver ? "mover" : "munder"], [vlist], options2);
@@ -12020,11 +12223,11 @@ var init_katex = __esm({
12020
12223
  props: {
12021
12224
  numArgs: 1
12022
12225
  },
12023
- handler(_ref, args) {
12226
+ handler(_ref2, args) {
12024
12227
  var {
12025
12228
  parser: parser30,
12026
12229
  funcName
12027
- } = _ref;
12230
+ } = _ref2;
12028
12231
  return {
12029
12232
  type: "horizBrace",
12030
12233
  mode: parser30.mode,
@@ -12044,10 +12247,10 @@ var init_katex = __esm({
12044
12247
  argTypes: ["url", "original"],
12045
12248
  allowedInText: true
12046
12249
  },
12047
- handler: (_ref, args) => {
12250
+ handler: (_ref2, args) => {
12048
12251
  var {
12049
12252
  parser: parser30
12050
- } = _ref;
12253
+ } = _ref2;
12051
12254
  var body = args[1];
12052
12255
  var href = assertNodeType(args[0], "url").url;
12053
12256
  if (!parser30.settings.isTrusted({
@@ -12130,10 +12333,10 @@ var init_katex = __esm({
12130
12333
  allowedInText: true,
12131
12334
  primitive: true
12132
12335
  },
12133
- handler(_ref, args) {
12336
+ handler(_ref2, args) {
12134
12337
  var {
12135
12338
  parser: parser30
12136
- } = _ref;
12339
+ } = _ref2;
12137
12340
  return {
12138
12341
  type: "hbox",
12139
12342
  mode: parser30.mode,
@@ -12141,11 +12344,11 @@ var init_katex = __esm({
12141
12344
  };
12142
12345
  },
12143
12346
  htmlBuilder(group2, options2) {
12144
- var elements2 = buildExpression$1(group2.body, options2, false);
12347
+ var elements2 = buildExpression$1(group2.body, options2.withFont(""), false);
12145
12348
  return makeFragment(elements2);
12146
12349
  },
12147
12350
  mathmlBuilder(group2, options2) {
12148
- return new MathNode("mrow", buildExpression2(group2.body, options2));
12351
+ return new MathNode("mrow", buildExpression2(group2.body, options2.withFont("")));
12149
12352
  }
12150
12353
  });
12151
12354
  defineFunction({
@@ -12156,12 +12359,12 @@ var init_katex = __esm({
12156
12359
  argTypes: ["raw", "original"],
12157
12360
  allowedInText: true
12158
12361
  },
12159
- handler: (_ref, args) => {
12362
+ handler: (_ref2, args) => {
12160
12363
  var {
12161
12364
  parser: parser30,
12162
12365
  funcName,
12163
12366
  token: token2
12164
- } = _ref;
12367
+ } = _ref2;
12165
12368
  var value2 = assertNodeType(args[0], "raw").string;
12166
12369
  var body = args[1];
12167
12370
  if (parser30.settings.strict) {
@@ -12248,10 +12451,10 @@ var init_katex = __esm({
12248
12451
  allowedInArgument: true,
12249
12452
  allowedInText: true
12250
12453
  },
12251
- handler: (_ref, args) => {
12454
+ handler: (_ref2, args) => {
12252
12455
  var {
12253
12456
  parser: parser30
12254
- } = _ref;
12457
+ } = _ref2;
12255
12458
  return {
12256
12459
  type: "htmlmathml",
12257
12460
  mode: parser30.mode,
@@ -12298,10 +12501,10 @@ var init_katex = __esm({
12298
12501
  argTypes: ["raw", "url"],
12299
12502
  allowedInText: false
12300
12503
  },
12301
- handler: (_ref, args, optArgs) => {
12504
+ handler: (_ref2, args, optArgs) => {
12302
12505
  var {
12303
12506
  parser: parser30
12304
- } = _ref;
12507
+ } = _ref2;
12305
12508
  var width3 = {
12306
12509
  number: 0,
12307
12510
  unit: "em"
@@ -12414,11 +12617,11 @@ var init_katex = __esm({
12414
12617
  primitive: true,
12415
12618
  allowedInText: true
12416
12619
  },
12417
- handler(_ref, args) {
12620
+ handler(_ref2, args) {
12418
12621
  var {
12419
12622
  parser: parser30,
12420
12623
  funcName
12421
- } = _ref;
12624
+ } = _ref2;
12422
12625
  var size4 = assertNodeType(args[0], "size");
12423
12626
  if (parser30.settings.strict) {
12424
12627
  var mathFunction = funcName[1] === "m";
@@ -12457,11 +12660,11 @@ var init_katex = __esm({
12457
12660
  numArgs: 1,
12458
12661
  allowedInText: true
12459
12662
  },
12460
- handler: (_ref, args) => {
12663
+ handler: (_ref2, args) => {
12461
12664
  var {
12462
12665
  parser: parser30,
12463
12666
  funcName
12464
- } = _ref;
12667
+ } = _ref2;
12465
12668
  var body = args[0];
12466
12669
  return {
12467
12670
  type: "lap",
@@ -12507,11 +12710,11 @@ var init_katex = __esm({
12507
12710
  allowedInText: true,
12508
12711
  allowedInMath: false
12509
12712
  },
12510
- handler(_ref, args) {
12713
+ handler(_ref2, args) {
12511
12714
  var {
12512
12715
  funcName,
12513
12716
  parser: parser30
12514
- } = _ref;
12717
+ } = _ref2;
12515
12718
  var outerMode = parser30.mode;
12516
12719
  parser30.switchMode("math");
12517
12720
  var close2 = funcName === "\\(" ? "\\)" : "$";
@@ -12522,6 +12725,7 @@ var init_katex = __esm({
12522
12725
  type: "styling",
12523
12726
  mode: parser30.mode,
12524
12727
  style: "text",
12728
+ resetFont: true,
12525
12729
  body
12526
12730
  };
12527
12731
  }
@@ -12560,10 +12764,10 @@ var init_katex = __esm({
12560
12764
  numArgs: 4,
12561
12765
  primitive: true
12562
12766
  },
12563
- handler: (_ref, args) => {
12767
+ handler: (_ref2, args) => {
12564
12768
  var {
12565
12769
  parser: parser30
12566
- } = _ref;
12770
+ } = _ref2;
12567
12771
  return {
12568
12772
  type: "mathchoice",
12569
12773
  mode: parser30.mode,
@@ -12704,6 +12908,7 @@ var init_katex = __esm({
12704
12908
  large = true;
12705
12909
  }
12706
12910
  var base;
12911
+ var symbolItalic;
12707
12912
  if (group2.symbol) {
12708
12913
  var fontName = large ? "Size2-Regular" : "Size1-Regular";
12709
12914
  var stash = "";
@@ -12712,8 +12917,8 @@ var init_katex = __esm({
12712
12917
  group2.name = stash === "oiint" ? "\\iint" : "\\iiint";
12713
12918
  }
12714
12919
  base = makeSymbol(group2.name, fontName, "math", options2, ["mop", "op-symbol", large ? "large-op" : "small-op"]);
12920
+ symbolItalic = base.italic;
12715
12921
  if (stash.length > 0) {
12716
- var italic = base.italic;
12717
12922
  var oval = staticSvg(stash + "Size" + (large ? "2" : "1"), options2);
12718
12923
  base = makeVList({
12719
12924
  positionType: "individualShift",
@@ -12729,7 +12934,7 @@ var init_katex = __esm({
12729
12934
  });
12730
12935
  group2.name = "\\" + stash;
12731
12936
  base.classes.unshift("mop");
12732
- base.italic = italic;
12937
+ base.italic = symbolItalic;
12733
12938
  }
12734
12939
  } else if (group2.body) {
12735
12940
  var inner2 = buildExpression$1(group2.body, options2, true);
@@ -12749,8 +12954,9 @@ var init_katex = __esm({
12749
12954
  var baseShift = 0;
12750
12955
  var slant = 0;
12751
12956
  if ((base instanceof SymbolNode || group2.name === "\\oiint" || group2.name === "\\oiiint") && !group2.suppressBaseShift) {
12957
+ var _base$italic;
12752
12958
  baseShift = (base.height - base.depth) / 2 - options2.fontMetrics().axisHeight;
12753
- slant = base.italic || 0;
12959
+ slant = (_base$italic = base.italic) != null ? _base$italic : 0;
12754
12960
  }
12755
12961
  if (hasLimits) {
12756
12962
  return assembleSupSub(base, supGroup, subGroup, options2, style4, slant, baseShift);
@@ -12802,11 +13008,11 @@ var init_katex = __esm({
12802
13008
  props: {
12803
13009
  numArgs: 0
12804
13010
  },
12805
- handler: (_ref, args) => {
13011
+ handler: (_ref2, args) => {
12806
13012
  var {
12807
13013
  parser: parser30,
12808
13014
  funcName
12809
- } = _ref;
13015
+ } = _ref2;
12810
13016
  var fName = funcName;
12811
13017
  if (fName.length === 1) {
12812
13018
  fName = singleCharBigOps[fName];
@@ -13022,11 +13228,11 @@ var init_katex = __esm({
13022
13228
  props: {
13023
13229
  numArgs: 1
13024
13230
  },
13025
- handler: (_ref, args) => {
13231
+ handler: (_ref2, args) => {
13026
13232
  var {
13027
13233
  parser: parser30,
13028
13234
  funcName
13029
- } = _ref;
13235
+ } = _ref2;
13030
13236
  var body = args[0];
13031
13237
  return {
13032
13238
  type: "operatorname",
@@ -13059,10 +13265,10 @@ var init_katex = __esm({
13059
13265
  props: {
13060
13266
  numArgs: 1
13061
13267
  },
13062
- handler(_ref, args) {
13268
+ handler(_ref2, args) {
13063
13269
  var {
13064
13270
  parser: parser30
13065
- } = _ref;
13271
+ } = _ref2;
13066
13272
  var body = args[0];
13067
13273
  return {
13068
13274
  type: "overline",
@@ -13107,10 +13313,10 @@ var init_katex = __esm({
13107
13313
  numArgs: 1,
13108
13314
  allowedInText: true
13109
13315
  },
13110
- handler: (_ref, args) => {
13316
+ handler: (_ref2, args) => {
13111
13317
  var {
13112
13318
  parser: parser30
13113
- } = _ref;
13319
+ } = _ref2;
13114
13320
  var body = args[0];
13115
13321
  return {
13116
13322
  type: "phantom",
@@ -13167,10 +13373,10 @@ var init_katex = __esm({
13167
13373
  argTypes: ["size", "hbox"],
13168
13374
  allowedInText: true
13169
13375
  },
13170
- handler(_ref, args) {
13376
+ handler(_ref2, args) {
13171
13377
  var {
13172
13378
  parser: parser30
13173
- } = _ref;
13379
+ } = _ref2;
13174
13380
  var amount = assertNodeType(args[0], "size").value;
13175
13381
  var body = args[1];
13176
13382
  return {
@@ -13207,10 +13413,10 @@ var init_katex = __esm({
13207
13413
  allowedInText: true,
13208
13414
  allowedInArgument: true
13209
13415
  },
13210
- handler(_ref) {
13416
+ handler(_ref2) {
13211
13417
  var {
13212
13418
  parser: parser30
13213
- } = _ref;
13419
+ } = _ref2;
13214
13420
  return {
13215
13421
  type: "internal",
13216
13422
  mode: parser30.mode
@@ -13227,10 +13433,10 @@ var init_katex = __esm({
13227
13433
  allowedInMath: true,
13228
13434
  argTypes: ["size", "size", "size"]
13229
13435
  },
13230
- handler(_ref, args, optArgs) {
13436
+ handler(_ref2, args, optArgs) {
13231
13437
  var {
13232
13438
  parser: parser30
13233
- } = _ref;
13439
+ } = _ref2;
13234
13440
  var shift2 = optArgs[0];
13235
13441
  var width3 = assertNodeType(args[0], "size");
13236
13442
  var height2 = assertNodeType(args[1], "size");
@@ -13288,12 +13494,12 @@ var init_katex = __esm({
13288
13494
  numArgs: 0,
13289
13495
  allowedInText: true
13290
13496
  },
13291
- handler: (_ref, args) => {
13497
+ handler: (_ref2, args) => {
13292
13498
  var {
13293
13499
  breakOnTokenText,
13294
13500
  funcName,
13295
13501
  parser: parser30
13296
- } = _ref;
13502
+ } = _ref2;
13297
13503
  var body = parser30.parseExpression(false, breakOnTokenText);
13298
13504
  return {
13299
13505
  type: "sizing",
@@ -13320,15 +13526,15 @@ var init_katex = __esm({
13320
13526
  numOptionalArgs: 1,
13321
13527
  allowedInText: true
13322
13528
  },
13323
- handler: (_ref, args, optArgs) => {
13529
+ handler: (_ref2, args, optArgs) => {
13324
13530
  var {
13325
13531
  parser: parser30
13326
- } = _ref;
13532
+ } = _ref2;
13327
13533
  var smashHeight = false;
13328
13534
  var smashDepth = false;
13329
13535
  var tbArg = optArgs[0] && assertNodeType(optArgs[0], "ordgroup");
13330
13536
  if (tbArg) {
13331
- var letter = "";
13537
+ var letter;
13332
13538
  for (var i3 = 0; i3 < tbArg.body.length; ++i3) {
13333
13539
  var node2 = tbArg.body[i3];
13334
13540
  letter = assertSymbolNodeType(node2).text;
@@ -13406,10 +13612,10 @@ var init_katex = __esm({
13406
13612
  numArgs: 1,
13407
13613
  numOptionalArgs: 1
13408
13614
  },
13409
- handler(_ref, args, optArgs) {
13615
+ handler(_ref2, args, optArgs) {
13410
13616
  var {
13411
13617
  parser: parser30
13412
- } = _ref;
13618
+ } = _ref2;
13413
13619
  var index = optArgs[0];
13414
13620
  var body = args[0];
13415
13621
  return {
@@ -13501,14 +13707,17 @@ var init_katex = __esm({
13501
13707
  allowedInText: true,
13502
13708
  primitive: true
13503
13709
  },
13504
- handler(_ref, args) {
13710
+ handler(_ref2, args) {
13505
13711
  var {
13506
13712
  breakOnTokenText,
13507
13713
  funcName,
13508
13714
  parser: parser30
13509
- } = _ref;
13715
+ } = _ref2;
13510
13716
  var body = parser30.parseExpression(true, breakOnTokenText);
13511
13717
  var style4 = funcName.slice(1, funcName.length - 5);
13718
+ if (!isStyleStr(style4)) {
13719
+ throw new Error("Unknown style: " + style4);
13720
+ }
13512
13721
  return {
13513
13722
  type: "styling",
13514
13723
  mode: parser30.mode,
@@ -13520,12 +13729,18 @@ var init_katex = __esm({
13520
13729
  },
13521
13730
  htmlBuilder(group2, options2) {
13522
13731
  var newStyle = styleMap[group2.style];
13523
- var newOptions = options2.havingStyle(newStyle).withFont("");
13732
+ var newOptions = options2.havingStyle(newStyle);
13733
+ if (group2.resetFont) {
13734
+ newOptions = newOptions.withFont("");
13735
+ }
13524
13736
  return sizingGroup(group2.body, newOptions, options2);
13525
13737
  },
13526
13738
  mathmlBuilder(group2, options2) {
13527
13739
  var newStyle = styleMap[group2.style];
13528
13740
  var newOptions = options2.havingStyle(newStyle);
13741
+ if (group2.resetFont) {
13742
+ newOptions = newOptions.withFont("");
13743
+ }
13529
13744
  var inner2 = buildExpression2(group2.body, newOptions);
13530
13745
  var node2 = new MathNode("mstyle", inner2);
13531
13746
  var styleAttributes = {
@@ -13606,7 +13821,8 @@ var init_katex = __esm({
13606
13821
  if (subm) {
13607
13822
  var isOiint = group2.base && group2.base.type === "op" && group2.base.name && (group2.base.name === "\\oiint" || group2.base.name === "\\oiiint");
13608
13823
  if (base instanceof SymbolNode || isOiint) {
13609
- marginLeft = makeEm(-base.italic);
13824
+ var _base$italic;
13825
+ marginLeft = makeEm(-((_base$italic = base.italic) != null ? _base$italic : 0));
13610
13826
  }
13611
13827
  }
13612
13828
  var supsub;
@@ -13896,11 +14112,11 @@ var init_katex = __esm({
13896
14112
  allowedInArgument: true,
13897
14113
  allowedInText: true
13898
14114
  },
13899
- handler(_ref, args) {
14115
+ handler(_ref2, args) {
13900
14116
  var {
13901
14117
  parser: parser30,
13902
14118
  funcName
13903
- } = _ref;
14119
+ } = _ref2;
13904
14120
  var body = args[0];
13905
14121
  return {
13906
14122
  type: "text",
@@ -13926,10 +14142,10 @@ var init_katex = __esm({
13926
14142
  numArgs: 1,
13927
14143
  allowedInText: true
13928
14144
  },
13929
- handler(_ref, args) {
14145
+ handler(_ref2, args) {
13930
14146
  var {
13931
14147
  parser: parser30
13932
- } = _ref;
14148
+ } = _ref2;
13933
14149
  return {
13934
14150
  type: "underline",
13935
14151
  mode: parser30.mode,
@@ -13976,10 +14192,10 @@ var init_katex = __esm({
13976
14192
  // In LaTeX, \vcenter can act only on a box.
13977
14193
  allowedInText: false
13978
14194
  },
13979
- handler(_ref, args) {
14195
+ handler(_ref2, args) {
13980
14196
  var {
13981
14197
  parser: parser30
13982
- } = _ref;
14198
+ } = _ref2;
13983
14199
  return {
13984
14200
  type: "vcenter",
13985
14201
  mode: parser30.mode,
@@ -14053,9 +14269,11 @@ var init_katex = __esm({
14053
14269
  ("|" + controlWordWhitespaceRegexString) + // \macroName + spaces
14054
14270
  ("|" + controlSymbolRegexString + ")");
14055
14271
  Lexer = class {
14056
- // Category codes. The lexer only supports comment characters (14) for now.
14057
- // MacroExpander additionally distinguishes active (13).
14058
14272
  constructor(input, settings) {
14273
+ this.input = void 0;
14274
+ this.settings = void 0;
14275
+ this.tokenRegex = void 0;
14276
+ this.catcodes = void 0;
14059
14277
  this.input = input;
14060
14278
  this.settings = settings;
14061
14279
  this.tokenRegex = new RegExp(tokenRegexString, "g");
@@ -14110,6 +14328,9 @@ var init_katex = __esm({
14110
14328
  if (globalMacros === void 0) {
14111
14329
  globalMacros = {};
14112
14330
  }
14331
+ this.current = void 0;
14332
+ this.builtins = void 0;
14333
+ this.undefStack = void 0;
14113
14334
  this.current = globalMacros;
14114
14335
  this.builtins = builtins;
14115
14336
  this.undefStack = [];
@@ -14876,6 +15097,12 @@ var init_katex = __esm({
14876
15097
  };
14877
15098
  MacroExpander = class {
14878
15099
  constructor(input, settings, mode) {
15100
+ this.settings = void 0;
15101
+ this.expansionCount = void 0;
15102
+ this.lexer = void 0;
15103
+ this.macros = void 0;
15104
+ this.stack = void 0;
15105
+ this.mode = void 0;
14879
15106
  this.settings = settings;
14880
15107
  this.expansionCount = 0;
14881
15108
  this.feed(input);
@@ -15748,6 +15975,11 @@ var init_katex = __esm({
15748
15975
  };
15749
15976
  Parser = class _Parser2 {
15750
15977
  constructor(input, settings) {
15978
+ this.mode = void 0;
15979
+ this.gullet = void 0;
15980
+ this.settings = void 0;
15981
+ this.leftrightDepth = void 0;
15982
+ this.nextToken = void 0;
15751
15983
  this.mode = "math";
15752
15984
  this.gullet = new MacroExpander(input, settings, this.mode);
15753
15985
  this.settings = settings;
@@ -16169,8 +16401,9 @@ var init_katex = __esm({
16169
16401
  type: "styling",
16170
16402
  mode: group2.mode,
16171
16403
  body: [group2],
16172
- style: "text"
16404
+ style: "text",
16173
16405
  // simulate \textstyle
16406
+ resetFont: true
16174
16407
  } : null;
16175
16408
  }
16176
16409
  case "raw": {
@@ -16493,12 +16726,11 @@ var init_katex = __esm({
16493
16726
  var group2 = symbols[this.mode][text4].group;
16494
16727
  var loc = SourceLocation.range(nucleus);
16495
16728
  var s2;
16496
- if (ATOMS.hasOwnProperty(group2)) {
16497
- var family = group2;
16729
+ if (isAtom(group2)) {
16498
16730
  s2 = {
16499
16731
  type: "atom",
16500
16732
  mode: this.mode,
16501
- family,
16733
+ family: group2,
16502
16734
  loc,
16503
16735
  text: text4
16504
16736
  };
@@ -16546,7 +16778,6 @@ var init_katex = __esm({
16546
16778
  label: command,
16547
16779
  isStretchy: false,
16548
16780
  isShifty: true,
16549
- // TODO(ts)
16550
16781
  base: symbol
16551
16782
  };
16552
16783
  }
@@ -16625,7 +16856,7 @@ var init_katex = __esm({
16625
16856
  return renderError(error3, expression, settings);
16626
16857
  }
16627
16858
  };
16628
- version = "0.16.45";
16859
+ version = "0.16.47";
16629
16860
  __domTree = {
16630
16861
  Span,
16631
16862
  Anchor,
@@ -52021,16 +52252,16 @@ var init_dagre_BM42HDAG = __esm({
52021
52252
  });
52022
52253
 
52023
52254
  // node_modules/cytoscape/dist/cytoscape.esm.mjs
52024
- function _arrayLikeToArray(r3, a2) {
52255
+ function _arrayLikeToArray2(r3, a2) {
52025
52256
  (null == a2 || a2 > r3.length) && (a2 = r3.length);
52026
52257
  for (var e6 = 0, n3 = Array(a2); e6 < a2; e6++) n3[e6] = r3[e6];
52027
52258
  return n3;
52028
52259
  }
52029
- function _arrayWithHoles(r3) {
52260
+ function _arrayWithHoles2(r3) {
52030
52261
  if (Array.isArray(r3)) return r3;
52031
52262
  }
52032
52263
  function _arrayWithoutHoles(r3) {
52033
- if (Array.isArray(r3)) return _arrayLikeToArray(r3);
52264
+ if (Array.isArray(r3)) return _arrayLikeToArray2(r3);
52034
52265
  }
52035
52266
  function _classCallCheck(a2, n3) {
52036
52267
  if (!(a2 instanceof n3)) throw new TypeError("Cannot call a class as a function");
@@ -52049,7 +52280,7 @@ function _createClass(e6, r3, t5) {
52049
52280
  function _createForOfIteratorHelper(r3, e6) {
52050
52281
  var t5 = "undefined" != typeof Symbol && r3[Symbol.iterator] || r3["@@iterator"];
52051
52282
  if (!t5) {
52052
- if (Array.isArray(r3) || (t5 = _unsupportedIterableToArray(r3)) || e6) {
52283
+ if (Array.isArray(r3) || (t5 = _unsupportedIterableToArray2(r3)) || e6) {
52053
52284
  t5 && (r3 = t5);
52054
52285
  var n3 = 0, F3 = function() {
52055
52286
  };
@@ -52103,7 +52334,7 @@ function _defineProperty$1(e6, r3, t5) {
52103
52334
  function _iterableToArray(r3) {
52104
52335
  if ("undefined" != typeof Symbol && null != r3[Symbol.iterator] || null != r3["@@iterator"]) return Array.from(r3);
52105
52336
  }
52106
- function _iterableToArrayLimit(r3, l5) {
52337
+ function _iterableToArrayLimit2(r3, l5) {
52107
52338
  var t5 = null == r3 ? null : "undefined" != typeof Symbol && r3[Symbol.iterator] || r3["@@iterator"];
52108
52339
  if (null != t5) {
52109
52340
  var e6, n3, i3, u2, a2 = [], f2 = true, o4 = false;
@@ -52124,17 +52355,17 @@ function _iterableToArrayLimit(r3, l5) {
52124
52355
  return a2;
52125
52356
  }
52126
52357
  }
52127
- function _nonIterableRest() {
52358
+ function _nonIterableRest2() {
52128
52359
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52129
52360
  }
52130
52361
  function _nonIterableSpread() {
52131
52362
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52132
52363
  }
52133
- function _slicedToArray(r3, e6) {
52134
- return _arrayWithHoles(r3) || _iterableToArrayLimit(r3, e6) || _unsupportedIterableToArray(r3, e6) || _nonIterableRest();
52364
+ function _slicedToArray2(r3, e6) {
52365
+ return _arrayWithHoles2(r3) || _iterableToArrayLimit2(r3, e6) || _unsupportedIterableToArray2(r3, e6) || _nonIterableRest2();
52135
52366
  }
52136
52367
  function _toConsumableArray(r3) {
52137
- return _arrayWithoutHoles(r3) || _iterableToArray(r3) || _unsupportedIterableToArray(r3) || _nonIterableSpread();
52368
+ return _arrayWithoutHoles(r3) || _iterableToArray(r3) || _unsupportedIterableToArray2(r3) || _nonIterableSpread();
52138
52369
  }
52139
52370
  function _toPrimitive(t5, r3) {
52140
52371
  if ("object" != typeof t5 || !t5) return t5;
@@ -52158,11 +52389,11 @@ function _typeof(o4) {
52158
52389
  return o5 && "function" == typeof Symbol && o5.constructor === Symbol && o5 !== Symbol.prototype ? "symbol" : typeof o5;
52159
52390
  }, _typeof(o4);
52160
52391
  }
52161
- function _unsupportedIterableToArray(r3, a2) {
52392
+ function _unsupportedIterableToArray2(r3, a2) {
52162
52393
  if (r3) {
52163
- if ("string" == typeof r3) return _arrayLikeToArray(r3, a2);
52394
+ if ("string" == typeof r3) return _arrayLikeToArray2(r3, a2);
52164
52395
  var t5 = {}.toString.call(r3).slice(8, -1);
52165
- return "Object" === t5 && r3.constructor && (t5 = r3.constructor.name), "Map" === t5 || "Set" === t5 ? Array.from(r3) : "Arguments" === t5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t5) ? _arrayLikeToArray(r3, a2) : void 0;
52396
+ return "Object" === t5 && r3.constructor && (t5 = r3.constructor.name), "Map" === t5 || "Set" === t5 ? Array.from(r3) : "Arguments" === t5 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t5) ? _arrayLikeToArray2(r3, a2) : void 0;
52166
52397
  }
52167
52398
  }
52168
52399
  function getDefaultExportFromCjs(x6) {
@@ -52525,12 +52756,12 @@ function requireHeap$1() {
52525
52756
  return returnitem;
52526
52757
  };
52527
52758
  heappushpop = function(array4, item, cmp2) {
52528
- var _ref;
52759
+ var _ref2;
52529
52760
  if (cmp2 == null) {
52530
52761
  cmp2 = defaultCmp;
52531
52762
  }
52532
52763
  if (array4.length && cmp2(array4[0], item) < 0) {
52533
- _ref = [array4[0], item], item = _ref[0], array4[0] = _ref[1];
52764
+ _ref2 = [array4[0], item], item = _ref2[0], array4[0] = _ref2[1];
52534
52765
  _siftup(array4, 0, cmp2);
52535
52766
  }
52536
52767
  return item;
@@ -52542,7 +52773,7 @@ function requireHeap$1() {
52542
52773
  }
52543
52774
  _ref1 = (function() {
52544
52775
  _results1 = [];
52545
- for (var _j = 0, _ref = floor(array4.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--) {
52776
+ for (var _j = 0, _ref2 = floor(array4.length / 2); 0 <= _ref2 ? _j < _ref2 : _j > _ref2; 0 <= _ref2 ? _j++ : _j--) {
52546
52777
  _results1.push(_j);
52547
52778
  }
52548
52779
  return _results1;
@@ -52567,7 +52798,7 @@ function requireHeap$1() {
52567
52798
  return _siftup(array4, pos, cmp2);
52568
52799
  };
52569
52800
  nlargest = function(array4, n3, cmp2) {
52570
- var elem, result, _i, _len, _ref;
52801
+ var elem, result, _i, _len, _ref2;
52571
52802
  if (cmp2 == null) {
52572
52803
  cmp2 = defaultCmp;
52573
52804
  }
@@ -52576,15 +52807,15 @@ function requireHeap$1() {
52576
52807
  return result;
52577
52808
  }
52578
52809
  heapify(result, cmp2);
52579
- _ref = array4.slice(n3);
52580
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
52581
- elem = _ref[_i];
52810
+ _ref2 = array4.slice(n3);
52811
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
52812
+ elem = _ref2[_i];
52582
52813
  heappushpop(result, elem, cmp2);
52583
52814
  }
52584
52815
  return result.sort(cmp2).reverse();
52585
52816
  };
52586
52817
  nsmallest = function(array4, n3, cmp2) {
52587
- var elem, los, result, _i, _j, _len, _ref, _ref1, _results;
52818
+ var elem, los, result, _i, _j, _len, _ref2, _ref1, _results;
52588
52819
  if (cmp2 == null) {
52589
52820
  cmp2 = defaultCmp;
52590
52821
  }
@@ -52594,9 +52825,9 @@ function requireHeap$1() {
52594
52825
  return result;
52595
52826
  }
52596
52827
  los = result[result.length - 1];
52597
- _ref = array4.slice(n3);
52598
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
52599
- elem = _ref[_i];
52828
+ _ref2 = array4.slice(n3);
52829
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
52830
+ elem = _ref2[_i];
52600
52831
  if (cmp2(elem, los) < 0) {
52601
52832
  insort(result, elem, 0, null, cmp2);
52602
52833
  result.pop();
@@ -54669,7 +54900,7 @@ function createTypedArrayView(gl, glType, array4, stride, size4, i3) {
54669
54900
  }
54670
54901
  }
54671
54902
  function createBufferStaticDraw(gl, type3, attributeLoc, dataArray) {
54672
- var _getTypeInfo = getTypeInfo(gl, type3), _getTypeInfo2 = _slicedToArray(_getTypeInfo, 2), size4 = _getTypeInfo2[0], glType = _getTypeInfo2[1];
54903
+ var _getTypeInfo = getTypeInfo(gl, type3), _getTypeInfo2 = _slicedToArray2(_getTypeInfo, 2), size4 = _getTypeInfo2[0], glType = _getTypeInfo2[1];
54673
54904
  var data5 = createTypedArray(gl, glType, dataArray);
54674
54905
  var buffer = gl.createBuffer();
54675
54906
  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
@@ -54684,7 +54915,7 @@ function createBufferStaticDraw(gl, type3, attributeLoc, dataArray) {
54684
54915
  return buffer;
54685
54916
  }
54686
54917
  function createBufferDynamicDraw(gl, instances, type3, attributeLoc) {
54687
- var _getTypeInfo3 = getTypeInfo(gl, type3), _getTypeInfo4 = _slicedToArray(_getTypeInfo3, 3), size4 = _getTypeInfo4[0], glType = _getTypeInfo4[1], bytes = _getTypeInfo4[2];
54918
+ var _getTypeInfo3 = getTypeInfo(gl, type3), _getTypeInfo4 = _slicedToArray2(_getTypeInfo3, 3), size4 = _getTypeInfo4[0], glType = _getTypeInfo4[1], bytes = _getTypeInfo4[2];
54688
54919
  var dataArray = createTypedArray(gl, glType, instances * size4);
54689
54920
  var stride = size4 * bytes;
54690
54921
  var buffer = gl.createBuffer();
@@ -55019,7 +55250,7 @@ function getPickingIndexes(r3, mX1, mY1, mX2, mY2) {
55019
55250
  var x6, y6, w4, h2;
55020
55251
  var _util$getEffectivePan3 = getEffectivePanZoom(r3), pan2 = _util$getEffectivePan3.pan, zoom2 = _util$getEffectivePan3.zoom;
55021
55252
  {
55022
- var _util$modelToRendered = modelToRenderedPosition2(r3, pan2, zoom2, mX1, mY1), _util$modelToRendered2 = _slicedToArray(_util$modelToRendered, 2), cX1 = _util$modelToRendered2[0], cY1 = _util$modelToRendered2[1];
55253
+ var _util$modelToRendered = modelToRenderedPosition2(r3, pan2, zoom2, mX1, mY1), _util$modelToRendered2 = _slicedToArray2(_util$modelToRendered, 2), cX1 = _util$modelToRendered2[0], cY1 = _util$modelToRendered2[1];
55023
55254
  var t5 = 6;
55024
55255
  x6 = cX1 - t5 / 2;
55025
55256
  y6 = cY1 - t5 / 2;
@@ -57685,7 +57916,7 @@ var init_cytoscape_esm = __esm({
57685
57916
  top2 = bottom2 = padding2[0];
57686
57917
  left3 = right3 = padding2[1];
57687
57918
  } else if (padding2.length === 4) {
57688
- var _padding = _slicedToArray(padding2, 4);
57919
+ var _padding = _slicedToArray2(padding2, 4);
57689
57920
  top2 = _padding[0];
57690
57921
  right3 = _padding[1];
57691
57922
  bottom2 = _padding[2];
@@ -61232,8 +61463,8 @@ var init_cytoscape_esm = __esm({
61232
61463
  // just used for identifying when debugging
61233
61464
  query: true,
61234
61465
  regex: "(" + tokens.group + ")",
61235
- populate: function populate(selector, query, _ref) {
61236
- var _ref2 = _slicedToArray(_ref, 1), group2 = _ref2[0];
61466
+ populate: function populate(selector, query, _ref2) {
61467
+ var _ref22 = _slicedToArray2(_ref2, 1), group2 = _ref22[0];
61237
61468
  query.checks.push({
61238
61469
  type: Type2.GROUP,
61239
61470
  value: group2 === "*" ? group2 : group2 + "s"
@@ -61244,7 +61475,7 @@ var init_cytoscape_esm = __esm({
61244
61475
  query: true,
61245
61476
  regex: stateSelectorRegex,
61246
61477
  populate: function populate2(selector, query, _ref3) {
61247
- var _ref4 = _slicedToArray(_ref3, 1), state4 = _ref4[0];
61478
+ var _ref4 = _slicedToArray2(_ref3, 1), state4 = _ref4[0];
61248
61479
  query.checks.push({
61249
61480
  type: Type2.STATE,
61250
61481
  value: state4
@@ -61255,7 +61486,7 @@ var init_cytoscape_esm = __esm({
61255
61486
  query: true,
61256
61487
  regex: "\\#(" + tokens.id + ")",
61257
61488
  populate: function populate3(selector, query, _ref5) {
61258
- var _ref6 = _slicedToArray(_ref5, 1), id33 = _ref6[0];
61489
+ var _ref6 = _slicedToArray2(_ref5, 1), id33 = _ref6[0];
61259
61490
  query.checks.push({
61260
61491
  type: Type2.ID,
61261
61492
  value: cleanMetaChars(id33)
@@ -61266,7 +61497,7 @@ var init_cytoscape_esm = __esm({
61266
61497
  query: true,
61267
61498
  regex: "\\.(" + tokens.className + ")",
61268
61499
  populate: function populate4(selector, query, _ref7) {
61269
- var _ref8 = _slicedToArray(_ref7, 1), className = _ref8[0];
61500
+ var _ref8 = _slicedToArray2(_ref7, 1), className = _ref8[0];
61270
61501
  query.checks.push({
61271
61502
  type: Type2.CLASS,
61272
61503
  value: cleanMetaChars(className)
@@ -61277,7 +61508,7 @@ var init_cytoscape_esm = __esm({
61277
61508
  query: true,
61278
61509
  regex: "\\[\\s*(" + tokens.variable + ")\\s*\\]",
61279
61510
  populate: function populate5(selector, query, _ref9) {
61280
- var _ref10 = _slicedToArray(_ref9, 1), variable = _ref10[0];
61511
+ var _ref10 = _slicedToArray2(_ref9, 1), variable = _ref10[0];
61281
61512
  query.checks.push({
61282
61513
  type: Type2.DATA_EXIST,
61283
61514
  field: cleanMetaChars(variable)
@@ -61288,7 +61519,7 @@ var init_cytoscape_esm = __esm({
61288
61519
  query: true,
61289
61520
  regex: "\\[\\s*(" + tokens.variable + ")\\s*(" + tokens.comparatorOp + ")\\s*(" + tokens.value + ")\\s*\\]",
61290
61521
  populate: function populate6(selector, query, _ref11) {
61291
- var _ref12 = _slicedToArray(_ref11, 3), variable = _ref12[0], comparatorOp = _ref12[1], value2 = _ref12[2];
61522
+ var _ref12 = _slicedToArray2(_ref11, 3), variable = _ref12[0], comparatorOp = _ref12[1], value2 = _ref12[2];
61292
61523
  var valueIsString = new RegExp("^" + tokens.string + "$").exec(value2) != null;
61293
61524
  if (valueIsString) {
61294
61525
  value2 = value2.substring(1, value2.length - 1);
@@ -61307,7 +61538,7 @@ var init_cytoscape_esm = __esm({
61307
61538
  query: true,
61308
61539
  regex: "\\[\\s*(" + tokens.boolOp + ")\\s*(" + tokens.variable + ")\\s*\\]",
61309
61540
  populate: function populate7(selector, query, _ref13) {
61310
- var _ref14 = _slicedToArray(_ref13, 2), boolOp = _ref14[0], variable = _ref14[1];
61541
+ var _ref14 = _slicedToArray2(_ref13, 2), boolOp = _ref14[0], variable = _ref14[1];
61311
61542
  query.checks.push({
61312
61543
  type: Type2.DATA_BOOL,
61313
61544
  field: cleanMetaChars(variable),
@@ -61319,7 +61550,7 @@ var init_cytoscape_esm = __esm({
61319
61550
  query: true,
61320
61551
  regex: "\\[\\[\\s*(" + tokens.meta + ")\\s*(" + tokens.comparatorOp + ")\\s*(" + tokens.number + ")\\s*\\]\\]",
61321
61552
  populate: function populate8(selector, query, _ref15) {
61322
- var _ref16 = _slicedToArray(_ref15, 3), meta3 = _ref16[0], comparatorOp = _ref16[1], number7 = _ref16[2];
61553
+ var _ref16 = _slicedToArray2(_ref15, 3), meta3 = _ref16[0], comparatorOp = _ref16[1], number7 = _ref16[2];
61323
61554
  query.checks.push({
61324
61555
  type: Type2.META_COMPARE,
61325
61556
  field: cleanMetaChars(meta3),
@@ -72648,7 +72879,7 @@ var init_cytoscape_esm = __esm({
72648
72879
  var segStart = _pts[_i2];
72649
72880
  var segEnd = _pts[_i2 + 1];
72650
72881
  for (var b3 = 0; b3 < boxEdges.length; b3++) {
72651
- var _boxEdges$b = _slicedToArray(boxEdges[b3], 2), boxStart = _boxEdges$b[0], boxEnd = _boxEdges$b[1];
72882
+ var _boxEdges$b = _slicedToArray2(boxEdges[b3], 2), boxStart = _boxEdges$b[0], boxEnd = _boxEdges$b[1];
72652
72883
  if (doLinesIntersect(segStart, segEnd, boxStart, boxEnd)) {
72653
72884
  box.push(edge);
72654
72885
  _selected = true;
@@ -72892,8 +73123,8 @@ var init_cytoscape_esm = __esm({
72892
73123
  break;
72893
73124
  case "endpoints": {
72894
73125
  if (haveManualEndPts) {
72895
- var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt), _this$manualEndptToPx2 = _slicedToArray(_this$manualEndptToPx, 2), x1 = _this$manualEndptToPx2[0], y1 = _this$manualEndptToPx2[1];
72896
- var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt), _this$manualEndptToPx4 = _slicedToArray(_this$manualEndptToPx3, 2), x22 = _this$manualEndptToPx4[0], y22 = _this$manualEndptToPx4[1];
73126
+ var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt), _this$manualEndptToPx2 = _slicedToArray2(_this$manualEndptToPx, 2), x1 = _this$manualEndptToPx2[0], y1 = _this$manualEndptToPx2[1];
73127
+ var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt), _this$manualEndptToPx4 = _slicedToArray2(_this$manualEndptToPx3, 2), x22 = _this$manualEndptToPx4[0], y22 = _this$manualEndptToPx4[1];
72897
73128
  var endPts = {
72898
73129
  x1,
72899
73130
  y1,
@@ -73647,7 +73878,7 @@ var init_cytoscape_esm = __esm({
73647
73878
  }
73648
73879
  };
73649
73880
  BRp$b.findEndpoints = function(edge) {
73650
- var _ref, _tgtManEndpt$pfValue, _ref2, _srcManEndpt$pfValue;
73881
+ var _ref2, _tgtManEndpt$pfValue, _ref22, _srcManEndpt$pfValue;
73651
73882
  var r3 = this;
73652
73883
  var intersect3;
73653
73884
  var source = edge.source()[0];
@@ -73683,8 +73914,8 @@ var init_cytoscape_esm = __esm({
73683
73914
  var p22;
73684
73915
  var p1_i;
73685
73916
  var p2_i;
73686
- var tgtManEndptPt = (_ref = (tgtManEndpt === null || tgtManEndpt === void 0 || (_tgtManEndpt$pfValue = tgtManEndpt.pfValue) === null || _tgtManEndpt$pfValue === void 0 ? void 0 : _tgtManEndpt$pfValue.length) === 2 ? tgtManEndpt.pfValue : null) !== null && _ref !== void 0 ? _ref : [0, 0];
73687
- var srcManEndptPt = (_ref2 = (srcManEndpt === null || srcManEndpt === void 0 || (_srcManEndpt$pfValue = srcManEndpt.pfValue) === null || _srcManEndpt$pfValue === void 0 ? void 0 : _srcManEndpt$pfValue.length) === 2 ? srcManEndpt.pfValue : null) !== null && _ref2 !== void 0 ? _ref2 : [0, 0];
73917
+ var tgtManEndptPt = (_ref2 = (tgtManEndpt === null || tgtManEndpt === void 0 || (_tgtManEndpt$pfValue = tgtManEndpt.pfValue) === null || _tgtManEndpt$pfValue === void 0 ? void 0 : _tgtManEndpt$pfValue.length) === 2 ? tgtManEndpt.pfValue : null) !== null && _ref2 !== void 0 ? _ref2 : [0, 0];
73918
+ var srcManEndptPt = (_ref22 = (srcManEndpt === null || srcManEndpt === void 0 || (_srcManEndpt$pfValue = srcManEndpt.pfValue) === null || _srcManEndpt$pfValue === void 0 ? void 0 : _srcManEndpt$pfValue.length) === 2 ? srcManEndpt.pfValue : null) !== null && _ref22 !== void 0 ? _ref22 : [0, 0];
73688
73919
  if (bezier) {
73689
73920
  var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]];
73690
73921
  var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart;
@@ -80132,8 +80363,8 @@ var init_cytoscape_esm = __esm({
80132
80363
  }
80133
80364
  }, {
80134
80365
  key: "getScale",
80135
- value: function getScale(_ref) {
80136
- var w4 = _ref.w, h2 = _ref.h;
80366
+ value: function getScale(_ref2) {
80367
+ var w4 = _ref2.w, h2 = _ref2.h;
80137
80368
  var texHeight = this.texHeight, maxTexWidth = this.texSize;
80138
80369
  var scale3 = texHeight / h2;
80139
80370
  var texW = w4 * scale3;
@@ -80398,7 +80629,7 @@ var init_cytoscape_esm = __esm({
80398
80629
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
80399
80630
  var key = _step2.value;
80400
80631
  if (!keysToCollect.has(key)) {
80401
- var _atlas$getOffsets = atlas.getOffsets(key), _atlas$getOffsets2 = _slicedToArray(_atlas$getOffsets, 2), s1 = _atlas$getOffsets2[0], s2 = _atlas$getOffsets2[1];
80632
+ var _atlas$getOffsets = atlas.getOffsets(key), _atlas$getOffsets2 = _slicedToArray2(_atlas$getOffsets, 2), s1 = _atlas$getOffsets2[0], s2 = _atlas$getOffsets2[1];
80402
80633
  if (!newAtlas.canFit({
80403
80634
  w: s1.w + s2.w,
80404
80635
  h: s1.h
@@ -80435,7 +80666,7 @@ var init_cytoscape_esm = __esm({
80435
80666
  }, {
80436
80667
  key: "_copyTextureToNewAtlas",
80437
80668
  value: function _copyTextureToNewAtlas(key, oldAtlas, newAtlas) {
80438
- var _oldAtlas$getOffsets = oldAtlas.getOffsets(key), _oldAtlas$getOffsets2 = _slicedToArray(_oldAtlas$getOffsets, 2), s1 = _oldAtlas$getOffsets2[0], s2 = _oldAtlas$getOffsets2[1];
80669
+ var _oldAtlas$getOffsets = oldAtlas.getOffsets(key), _oldAtlas$getOffsets2 = _slicedToArray2(_oldAtlas$getOffsets, 2), s1 = _oldAtlas$getOffsets2[0], s2 = _oldAtlas$getOffsets2[1];
80439
80670
  if (s2.w === 0) {
80440
80671
  newAtlas.draw(key, s1, function(context) {
80441
80672
  context.drawImage(oldAtlas.canvas, s1.x, s1.y, s1.w, s1.h, 0, 0, s1.w, s1.h);
@@ -80669,7 +80900,7 @@ var init_cytoscape_esm = __esm({
80669
80900
  return keyArray.map(function(styleKey) {
80670
80901
  var bb = opts.getBoundingBox(ele, styleKey);
80671
80902
  var atlas = _this4.getOrCreateAtlas(ele, type3, bb, styleKey);
80672
- var _atlas$getOffsets3 = atlas.getOffsets(styleKey), _atlas$getOffsets4 = _slicedToArray(_atlas$getOffsets3, 2), tex1 = _atlas$getOffsets4[0], tex2 = _atlas$getOffsets4[1];
80903
+ var _atlas$getOffsets3 = atlas.getOffsets(styleKey), _atlas$getOffsets4 = _slicedToArray2(_atlas$getOffsets3, 2), tex1 = _atlas$getOffsets4[0], tex2 = _atlas$getOffsets4[1];
80673
80904
  return {
80674
80905
  atlas,
80675
80906
  tex: tex1,
@@ -80686,7 +80917,7 @@ var init_cytoscape_esm = __esm({
80686
80917
  var _iterator6 = _createForOfIteratorHelper(this.collections), _step6;
80687
80918
  try {
80688
80919
  for (_iterator6.s(); !(_step6 = _iterator6.n()).done; ) {
80689
- var _step6$value = _slicedToArray(_step6.value, 2), name = _step6$value[0], collection4 = _step6$value[1];
80920
+ var _step6$value = _slicedToArray2(_step6.value, 2), name = _step6$value[0], collection4 = _step6$value[1];
80690
80921
  var _collection$getCounts = collection4.getCounts(), keyCount = _collection$getCounts.keyCount, atlasCount = _collection$getCounts.atlasCount;
80691
80922
  debugInfo.push({
80692
80923
  type: name,
@@ -80875,7 +81106,7 @@ var init_cytoscape_esm = __esm({
80875
81106
  }, {
80876
81107
  key: "invalidate",
80877
81108
  value: function invalidate(eles) {
80878
- var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, type3 = _ref.type;
81109
+ var _ref2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, type3 = _ref2.type;
80879
81110
  var atlasManager = this.atlasManager;
80880
81111
  if (type3) {
80881
81112
  return atlasManager.invalidate(eles, {
@@ -81034,7 +81265,7 @@ var init_cytoscape_esm = __esm({
81034
81265
  }
81035
81266
  var atlasIndex = batchManager.getAtlasIndexForBatch(atlas);
81036
81267
  for (var _i = 0, _arr = [[tex1, true], [tex2, false]]; _i < _arr.length; _i++) {
81037
- var _arr$_i = _slicedToArray(_arr[_i], 2), tex = _arr$_i[0], first3 = _arr$_i[1];
81268
+ var _arr$_i = _slicedToArray2(_arr[_i], 2), tex = _arr$_i[0], first3 = _arr$_i[1];
81038
81269
  if (tex.w != 0) {
81039
81270
  var instance2 = this.instanceCount;
81040
81271
  this.vertTypeBuffer.getView(instance2)[0] = TEXTURE;
@@ -146341,13 +146572,13 @@ var init_timeline_definition_PNZ67QCA = __esm({
146341
146572
  }
146342
146573
  });
146343
146574
 
146344
- // node_modules/mermaid/node_modules/uuid/dist/esm-browser/stringify.js
146575
+ // node_modules/uuid/dist/stringify.js
146345
146576
  function unsafeStringify(arr, offset = 0) {
146346
146577
  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
146347
146578
  }
146348
146579
  var byteToHex;
146349
146580
  var init_stringify = __esm({
146350
- "node_modules/mermaid/node_modules/uuid/dist/esm-browser/stringify.js"() {
146581
+ "node_modules/uuid/dist/stringify.js"() {
146351
146582
  byteToHex = [];
146352
146583
  for (let i3 = 0; i3 < 256; ++i3) {
146353
146584
  byteToHex.push((i3 + 256).toString(16).slice(1));
@@ -146355,37 +146586,25 @@ var init_stringify = __esm({
146355
146586
  }
146356
146587
  });
146357
146588
 
146358
- // node_modules/mermaid/node_modules/uuid/dist/esm-browser/rng.js
146589
+ // node_modules/uuid/dist/rng.js
146359
146590
  function rng() {
146360
- if (!getRandomValues) {
146361
- if (typeof crypto === "undefined" || !crypto.getRandomValues) {
146362
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
146363
- }
146364
- getRandomValues = crypto.getRandomValues.bind(crypto);
146365
- }
146366
- return getRandomValues(rnds8);
146591
+ return crypto.getRandomValues(rnds8);
146367
146592
  }
146368
- var getRandomValues, rnds8;
146593
+ var rnds8;
146369
146594
  var init_rng = __esm({
146370
- "node_modules/mermaid/node_modules/uuid/dist/esm-browser/rng.js"() {
146595
+ "node_modules/uuid/dist/rng.js"() {
146371
146596
  rnds8 = new Uint8Array(16);
146372
146597
  }
146373
146598
  });
146374
146599
 
146375
- // node_modules/mermaid/node_modules/uuid/dist/esm-browser/native.js
146376
- var randomUUID, native_default;
146377
- var init_native = __esm({
146378
- "node_modules/mermaid/node_modules/uuid/dist/esm-browser/native.js"() {
146379
- randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
146380
- native_default = { randomUUID };
146381
- }
146382
- });
146383
-
146384
- // node_modules/mermaid/node_modules/uuid/dist/esm-browser/v4.js
146600
+ // node_modules/uuid/dist/v4.js
146385
146601
  function v4(options2, buf, offset) {
146386
- if (native_default.randomUUID && !buf && !options2) {
146387
- return native_default.randomUUID();
146602
+ if (!buf && !options2 && crypto.randomUUID) {
146603
+ return crypto.randomUUID();
146388
146604
  }
146605
+ return _v4(options2, buf, offset);
146606
+ }
146607
+ function _v4(options2, buf, offset) {
146389
146608
  options2 = options2 || {};
146390
146609
  const rnds = options2.random ?? options2.rng?.() ?? rng();
146391
146610
  if (rnds.length < 16) {
@@ -146407,17 +146626,16 @@ function v4(options2, buf, offset) {
146407
146626
  }
146408
146627
  var v4_default;
146409
146628
  var init_v4 = __esm({
146410
- "node_modules/mermaid/node_modules/uuid/dist/esm-browser/v4.js"() {
146411
- init_native();
146629
+ "node_modules/uuid/dist/v4.js"() {
146412
146630
  init_rng();
146413
146631
  init_stringify();
146414
146632
  v4_default = v4;
146415
146633
  }
146416
146634
  });
146417
146635
 
146418
- // node_modules/mermaid/node_modules/uuid/dist/esm-browser/index.js
146419
- var init_esm_browser = __esm({
146420
- "node_modules/mermaid/node_modules/uuid/dist/esm-browser/index.js"() {
146636
+ // node_modules/uuid/dist/index.js
146637
+ var init_dist2 = __esm({
146638
+ "node_modules/uuid/dist/index.js"() {
146421
146639
  init_v4();
146422
146640
  }
146423
146641
  });
@@ -146442,7 +146660,7 @@ var init_mindmap_definition_RKZ34NQL = __esm({
146442
146660
  init_chunk_5ZQYHXKU();
146443
146661
  init_chunk_CSCIHK7Q();
146444
146662
  init_chunk_AGHRB4JF();
146445
- init_esm_browser();
146663
+ init_dist2();
146446
146664
  init_dist();
146447
146665
  parser16 = (function() {
146448
146666
  var o4 = /* @__PURE__ */ __name(function(k3, v3, o22, l5) {
@@ -161084,7 +161302,7 @@ var require_cytoscape_fcose = __commonJS({
161084
161302
  548: (
161085
161303
  /***/
161086
161304
  ((module3, __unused_webpack_exports, __webpack_require__2) => {
161087
- var _slicedToArray2 = /* @__PURE__ */ (function() {
161305
+ var _slicedToArray3 = /* @__PURE__ */ (function() {
161088
161306
  function sliceIterator(arr, i3) {
161089
161307
  var _arr = [];
161090
161308
  var _n = true;
@@ -161241,10 +161459,10 @@ var require_cytoscape_fcose = __commonJS({
161241
161459
  var _iteratorError = void 0;
161242
161460
  try {
161243
161461
  for (var _iterator = componentResult.nodeIndexes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
161244
- var _ref = _step.value;
161245
- var _ref2 = _slicedToArray2(_ref, 2);
161246
- var key = _ref2[0];
161247
- var value2 = _ref2[1];
161462
+ var _ref2 = _step.value;
161463
+ var _ref22 = _slicedToArray3(_ref2, 2);
161464
+ var key = _ref22[0];
161465
+ var value2 = _ref22[1];
161248
161466
  var cyNode = options2.cy.getElementById(key);
161249
161467
  if (cyNode) {
161250
161468
  var nodeBB = cyNode.boundingBox();
@@ -171081,10 +171299,10 @@ function closeNested(details) {
171081
171299
  }
171082
171300
  function cloneScripts(element3, href) {
171083
171301
  const ts = String(Date.now());
171084
- for (const script of element3.querySelectorAll("script")) {
171302
+ for (const script2 of element3.querySelectorAll("script")) {
171085
171303
  const copy5 = document.createElement("script");
171086
- const src = script.getAttribute("src");
171087
- const type3 = script.getAttribute("type");
171304
+ const src = script2.getAttribute("src");
171305
+ const type3 = script2.getAttribute("type");
171088
171306
  if (type3) {
171089
171307
  copy5.setAttribute("type", type3);
171090
171308
  }
@@ -171093,10 +171311,10 @@ function cloneScripts(element3, href) {
171093
171311
  url.searchParams.append("ts", ts);
171094
171312
  copy5.src = url.toString();
171095
171313
  }
171096
- if (script.textContent) {
171097
- copy5.textContent = script.textContent;
171314
+ if (script2.textContent) {
171315
+ copy5.textContent = script2.textContent;
171098
171316
  }
171099
- script.replaceWith(copy5);
171317
+ script2.replaceWith(copy5);
171100
171318
  }
171101
171319
  }
171102
171320
  async function replaceContent(href) {
@@ -172487,7 +172705,7 @@ export {
172487
172705
  /*! Bundled license information:
172488
172706
 
172489
172707
  dompurify/dist/purify.es.mjs:
172490
- (*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE *)
172708
+ (*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE *)
172491
172709
 
172492
172710
  mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.mjs:
172493
172711
  (*! Bundled license information: